--- /dev/null
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata>Generated by IcoMoon</metadata>
+<defs>
+<font id="appicons" horiz-adv-x="1024">
+<font-face units-per-em="1024" ascent="960" descent="-64" />
+<missing-glyph horiz-adv-x="1024" />
+<glyph unicode=" " horiz-adv-x="512" d="" />
+<glyph unicode="" glyph-name="out" d="M330.317 960h363.38v-608.505h302.873l-484.563-415.495-484.561 415.495h302.871z" />
+<glyph unicode="" glyph-name="in" d="M512.007 916.417l512.005-380.127h-320.025v-556.708h-383.961v556.708h-320.027z" />
+<glyph unicode="" glyph-name="backup" d="M158.756 459.232c2.36-0.222 4.628-1.137 6.44-2.635 2.465-2.038 4.027-5.035 4.266-8.199 3.173-40.213 14.414-80.383 34.695-118.14 28.963-53.866 71.965-95.243 122.116-122.093l19.951 77.261c1.184 4.576 4.973 7.992 9.626 8.699 4.692 0.708 9.29-1.415 11.8-5.411l140.4-226.038c1.945-3.581 2.228-7.033 1.093-10.24-1.228-3.413-3.934-5.994-7.347-7.16l-259.049-86.835c-4.549-1.541-9.533-0.166-12.657 3.454-3.173 3.664-3.796 8.784-1.571 13.072l37.267 73.013c-87.221 41.503-162.493 110.146-211.654 201.728-30.908 57.487-48.59 118.638-54.085 179.872-0.573 6.368 4.026 12.029 10.386 12.778l145.945 16.859c0.793 0.084 1.59 0.086 2.377 0.012zM807.027 714.090c2.642-0.123 5.187-1.153 7.248-2.932l204.777-180.834c3.601-3.207 4.923-8.202 3.309-12.697-1.562-4.58-5.683-7.66-10.521-7.91l-81.808-4.289c7.679-96.244-14.081-195.777-68.781-284.155-34.323-55.533-78.458-101.448-128.702-136.833-5.214-3.664-12.416-2.538-16.257 2.622l-87.605 117.892c-1.894 2.582-2.652 5.83-2.175 8.952 0.572 3.162 2.375 5.994 4.975 7.783 33.23 22.854 62.38 52.702 84.953 89.168 32.178 52.037 46.446 109.942 44.645 166.807l-76.928-21.356c-4.556-1.29-9.386 0.251-12.331 3.956-2.986 3.704-3.456 8.741-1.228 12.945l125.425 234.66c2.132 3.456 5.024 5.454 8.346 6.036 0.888 0.167 1.779 0.227 2.659 0.186zM478.859 939.139c65.312 0.043 127.56-13.319 184.057-37.421 5.924-2.541 8.722-9.241 6.349-15.235l-54.179-136.536c-1.188-2.954-3.549-5.328-6.493-6.535-2.935-1.208-6.308-1.165-9.19 0.125-36.935 16.234-77.646 25.308-120.544 25.308-61.151 0-117.892-18.315-165.297-49.786l58.591-54.156c3.509-3.205 4.738-8.159 3.124-12.613-1.56-4.453-5.64-7.534-10.333-7.824l-265.546-16.777c-4.079-0.040-7.295 1.375-9.522 3.871-2.466 2.706-3.466 6.287-2.852 9.866l19.014 111.394 26.963 157.891c0.855 4.745 4.415 8.492 9.108 9.532s9.48-0.833 12.228-4.786l46.696-67.353c77.784 57.195 173.873 91.080 277.828 91.037z" />
+<glyph unicode="" glyph-name="transactions" d="M27.985 145.28h490.253c8.064-41.328 25.409-79.28 49.553-111.952h-567.792zM732.688 269.12v-50.342h119.296v50.342l86.64-70.28-86.64-70.28v54.822h-119.296v-54.822l-86.624 70.28 43.312 35.14zM792.36 387.583c-104.092 0-188.761-84.672-188.761-188.752 0-104.064 84.669-188.704 188.761-188.704 104.044 0 188.697 84.64 188.697 188.704 0 104.080-84.653 188.752-188.697 188.752zM792.36 430.511c127.708 0 231.624-103.952 231.624-231.68s-103.916-231.632-231.624-231.632c-127.74 0-231.688 103.904-231.688 231.632s103.948 231.68 231.688 231.68zM699.632 593.040h167.92l-27.984-55.968v-63.152c-15.376 2.64-31.072 4.304-47.2 4.304-22.32 0-43.92-2.896-64.736-7.872v66.72zM363.808 593.040h167.92l-27.984-55.968v-335.824h-111.952v335.824zM27.984 593.040h167.921l-27.987-55.968v-335.824h-111.947v335.824zM447.785 816.928c-30.929 0-55.985-25.056-55.985-55.968s25.056-55.968 55.985-55.968c30.896 0 55.952 25.056 55.952 55.968s-25.056 55.968-55.952 55.968zM447.785 928.88l447.768-279.856h-895.552z" />
+<glyph unicode="" glyph-name="bill" d="M678.867 244.823h18.202v-20.667c13.994-0.431 23.544-3.758 30.648-7.322l-5.988-20.434c-5.324 2.428-15.109 7.555-30.198 7.555-15.54 0-21.079-7.985-21.079-15.542 0-9.12 7.986-14.207 26.853-21.763 24.855-9.317 35.972-21.296 35.972-41.064 0-18.868-13.113-35.545-37.538-39.537v-22.86h-18.201v21.529c-13.974 0.431-27.968 4.463-35.973 9.787l6.009 20.864c8.67-5.127 21.079-9.787 34.622-9.787 13.994 0 23.544 6.891 23.544 17.538 0 10.022-7.769 16.44-24.21 22.431-23.29 8.457-38.399 19.104-38.399 39.734 0 19.103 13.31 33.781 35.737 37.777zM420.46 294.449c-16.753-25.445-32.606-51.595-47.854-77.686h47.854zM272.885 364.344v-147.582h90.404c-24.171 33.432-46.288 68.956-72.084 100.764 4.658 7.319 10.647 13.329 17.967 18.007 12.76-10.335 23.643-19.769 39.065-30.849 2.193-1.544 16.832-11.587 18.045-11.509 2.818 0.234 10.258 13.389 14.836 19.065 11.627 14.387 25.073 29.419 39.341 44.038v8.065zM565.034 372.057h186.1v-40.091h-186.1zM502.86 426.549c7.711 0 15.501 0 23.252 0 1.408-2.975-5.637-6.695-9.513-10.61-27.44-27.402-52.589-58.836-76.097-92.15v-127.069h-187.659v187.668h187.659v-8.359c20.768 19.575 42.375 37.426 62.358 50.52zM420.46 563.84c-16.735-25.445-32.606-51.575-47.835-77.668h47.835zM565.034 564.125h186.1v-40.076h-186.1zM272.885 633.717v-147.545h90.385c-24.172 33.432-46.269 68.941-72.064 100.767 4.658 7.319 10.647 13.308 17.967 17.986 12.76-10.315 23.643-19.769 39.065-30.866 2.193-1.527 16.832-11.569 18.045-11.471 2.818 0.197 10.258 13.388 14.836 19.064 11.627 14.388 25.073 29.401 39.341 44.023v8.042zM502.86 695.943c7.711 0 15.501 0 23.252 0 1.408-2.954-5.637-6.694-9.513-10.59-27.44-27.421-52.589-58.857-76.097-92.17v-127.053h-187.659v187.633h187.659v-8.339c20.768 19.574 42.375 37.405 62.358 50.52zM194.508 882.608v-869.323h634.916v674.609h-201.173v194.713zM121.461 960h548.128l232.92-228.046v-795.984h-781.048z" />
+<glyph unicode="" glyph-name="bookings" d="M768.745 319.184l32.375-49.895-336.235-218.041-104.357 160.979 49.896 32.353 72.021-111.040zM222.8 371.984h435.984v-92.856l-65.562-42.5v69.793h-304.878v-304.838h304.878v101.648l65.562 42.522v-209.753h-435.984zM768.745 907.184l32.375-49.876-336.235-218.044-104.357 160.981 49.896 32.334 72.021-111.044zM222.8 960h435.984v-92.855l-65.562-42.5v69.771h-304.878v-304.815h304.878v101.625l65.562 42.522v-209.732h-435.984z" />
+<glyph unicode="" glyph-name="box" d="M489.643 628.651v-627.84l-489.643 224.896v577.408zM1024 803.115l-156.331-53.717v-351.019l-131.2-42.88v348.885l-201.771-69.376 0.085-640.555 489.216 204.075zM858.837 794.667l139.947 47.659-497.707 117.675-117.675-31.957zM30.251 832.171l464.085-161.408 223.445 75.989-478.165 140.971z" />
+<glyph unicode="" glyph-name="close" d="M704.768 802.859l-191.872-191.872-191.829 191.829-159.317-159.317 191.829-191.872-191.872-191.829 159.36-159.36 191.872 191.829 191.829-191.829 159.36 159.36-191.787 191.787 191.829 191.872z" />
+<glyph unicode="" glyph-name="contacts" d="M560.42 450.81c-108.58 0-203.459-81.987-256.188-204.329h512.434c-52.788 122.342-147.666 204.329-256.245 204.329zM560.478 649.52c-55.503 0-100.427-39.742-100.427-88.729 0-48.938 44.924-88.73 100.427-88.73 55.447 0 100.37 39.792 100.37 88.73 0 48.987-44.923 88.729-100.37 88.729zM96.785 958.823h927.213v-1021.645h-927.213v66.561h-96.785v68.245h96.785v138.228h-96.785v68.245h96.785v138.229h-96.785v68.245h96.785v138.179h-96.785v68.245h96.785v138.228h-96.785v68.246h96.785z" />
+<glyph unicode="" glyph-name="dataadd" d="M49.907 331.566h393.013l-1.752-4.601c-13.537-36.902-20.929-76.743-20.929-118.278 0-41.533 7.392-81.371 20.929-118.268l1.75-4.595h-393.011c-27.546 0-49.907 22.379-49.907 49.902v145.982c0 27.523 22.36 49.859 49.907 49.859zM722.372 377.273v-133.834h-133.823v-84.832h133.823v-133.825h84.827v133.825h133.823v84.832h-133.823v133.834zM764.561 468.099c143.259 0 259.405-116.099 259.405-259.405 0-143.162-116.146-259.353-259.405-259.353-143.264 0-259.387 116.19-259.387 259.353 0 143.306 116.123 259.405 259.387 259.405zM49.907 641.902h698.291c27.546 0 49.881-22.333 49.881-49.862v-40.624l-7.067 0.63c-8.732 0.667-17.554 1.006-26.454 1.006-118.654 0-223.49-60.348-285.431-151.965l-3.117-4.857h-426.103c-27.546 0-49.907 22.333-49.907 49.895v145.916c0 27.529 22.36 49.862 49.907 49.862zM146.92 880.558c-31.203 0-56.632-25.408-56.632-56.636 0-31.271 25.429-56.627 56.632-56.627 31.225 0 56.632 25.356 56.632 56.627 0 31.229-25.407 56.636-56.632 56.636zM49.907 946.745h698.291c27.546 0 49.881-22.335 49.881-49.866v-145.967c0-27.574-22.335-49.858-49.881-49.858h-698.291c-27.546 0-49.907 22.284-49.907 49.858v145.967c0 27.53 22.36 49.866 49.907 49.866z" />
+<glyph unicode="" glyph-name="datadelete" d="M49.907 331.479h393.008l-1.747-4.587c-13.537-36.902-20.929-76.744-20.929-118.28s7.392-81.375 20.929-118.274l1.753-4.602h-393.014c-27.546 0-49.907 22.387-49.907 49.909v145.968c0 27.531 22.36 49.866 49.907 49.866zM670.156 355.545l-59.983-59.991 94.626-94.619-94.626-94.618 59.983-59.982 94.628 94.618 94.628-94.618 59.971 59.982-94.623 94.618 94.623 94.619-59.971 59.991-94.628-94.619zM764.561 468.012c143.259 0 259.405-116.092 259.405-259.4 0-143.173-116.146-259.357-259.405-259.357-143.264 0-259.387 116.184-259.387 259.357 0 143.308 116.123 259.4 259.387 259.4zM49.907 641.815h698.291c27.546 0 49.881-22.335 49.881-49.857v-40.611l-7.058 0.629c-8.732 0.667-17.555 1.006-26.455 1.006-118.657 0-223.495-60.349-285.438-151.967l-3.138-4.89h-426.083c-27.546 0-49.907 22.335-49.907 49.907v145.927c0 27.522 22.36 49.857 49.907 49.857zM146.92 880.471c-31.203 0-56.632-25.397-56.632-56.624 0-31.269 25.429-56.623 56.632-56.623 31.225 0 56.632 25.354 56.632 56.623 0 31.226-25.407 56.624-56.632 56.624zM49.907 946.659h698.291c27.546 0 49.881-22.335 49.881-49.857v-145.968c0-27.572-22.335-49.865-49.881-49.865h-698.291c-27.546 0-49.907 22.293-49.907 49.865v145.968c0 27.522 22.36 49.857 49.907 49.857z" />
+<glyph unicode="" glyph-name="dataedit" d="M575.169 263.586c0.538 0.022 1.084 0.017 1.638-0.017 4.031-0.243 8.476-1.969 13.011-5.318l31.691-23.35c14.545-10.75 38.33-28.289 52.878-39.072l31.66-23.345c14.548-10.748 12.845-25.423-3.677-32.677l-36.043-15.722c-16.557-7.289-43.707-19.059-60.321-26.284l-36.043-15.783c-16.569-7.194-28.51 1.608-26.472 19.553l4.448 39.131c2.038 17.944 5.344 47.345 7.356 65.323l4.384 39.103c1.313 11.564 7.427 18.125 15.492 18.458zM57.042 384.833h571.020l-53.307-72.209c-5.624-7.709-8.803-16.711-9.22-26.118-16.26-4.398-28.232-18.435-30.578-38.624l-4.493-40.025h-473.423c-31.504 0-57.042 25.573-57.042 57.078v62.818c0 31.505 25.539 57.080 57.042 57.080zM57.042 604.316h639.337c29.325 0 53.157-22.114 56.476-50.465l-93.382-126.464h-602.43c-31.504 0-57.042 25.571-57.042 57.038v62.818c0 31.5 25.539 57.073 57.042 57.073zM888.621 680.779c5.43 0.159 11.030-1.472 15.826-5.014l108.501-80.117c10.935-8.058 13.592-23.101 5.868-33.538l-275.899-373.688c-7.707-10.439-22.828-12.325-33.82-4.296l-108.473 80.12c-10.961 8.091-13.592 23.132-5.866 33.569l275.84 373.722c4.343 5.872 11.042 9.037 18.023 9.242zM57.042 821.237h639.337c31.595 0 57.14-25.573 57.14-57.047v-62.853c0-31.503-25.544-57.076-57.14-57.076h-639.337c-31.504 0-57.042 25.573-57.042 57.076v62.853c0 31.474 25.539 57.047 57.042 57.047z" />
+<glyph unicode="" glyph-name="datasets" d="M615.413-2.912h199.755v-34.72h-204.048c2.957 9.088 4.583 18.755 4.583 28.803 0 2-0.165 3.954-0.29 5.917zM208.944-2.912h221.008c-0.125-1.962-0.29-3.916-0.29-5.917 0-10.049 1.664-19.715 4.626-28.803h-225.344zM192.702 397.376h638.617c25.211 0 45.625-20.413 45.625-45.578v-133.5c0-25.173-20.414-45.626-45.625-45.626h-278.743v-135.178l0.959-0.582c14.686-9.916 24.337-26.706 24.337-45.74 0-30.461-24.708-55.171-55.21-55.171-30.457 0-55.174 24.71-55.174 55.171 0 17.131 7.82 32.444 20.084 42.564l3.836 2.868v136.068h-298.706c-25.164 0-45.582 20.453-45.582 45.626v133.5c0 25.165 20.418 45.578 45.582 45.578zM192.702 681.216h638.617c25.211 0 45.625-20.415 45.625-45.627v-133.466c0-25.164-20.414-45.579-45.625-45.579h-638.617c-25.164 0-45.582 20.415-45.582 45.579v133.466c0 25.212 20.418 45.627 45.582 45.627zM281.415 899.456c-28.501 0-51.751-23.211-51.751-51.788 0-28.585 23.25-51.796 51.751-51.796 28.583 0 51.833 23.21 51.833 51.796 0 28.578-23.25 51.788-51.833 51.788zM192.702 960h638.617c25.211 0 45.625-20.453 45.625-45.625v-133.501c0-25.165-20.414-45.578-45.625-45.578h-638.617c-25.164 0-45.582 20.413-45.582 45.578v133.501c0 25.172 20.418 45.625 45.582 45.625z" />
+<glyph unicode="" glyph-name="download" d="M1024-63.915l-1024-0.085v428.672l153.6 0.171v-275.243l718.421-0.768v275.84l151.979 0.085zM411.989 680.491v279.509h192.512v-279.509h211.456l-303.957-385.067-303.915 385.067z" />
+<glyph unicode="" glyph-name="duplicate" d="M169.813 790.272l598.997-0.811-1.408 170.539h-767.403v-767.403h169.813zM224.64 735.36v-799.36h799.36v799.36h-799.36zM928.896 289.749h-258.645v-258.603h-85.333v258.603h-258.603v85.333h258.603v258.645h85.333v-258.645h258.645v-85.333z" />
+<glyph unicode="" glyph-name="duplicate2" d="M736 464v144l160-160h-144c-8.837 0-16 7.163-16 16v0zM352 640v176c0 8.837-7.163 16-16 16v0h-144c-17.673 0-32-14.327-32-32v0-480c0-17.673 14.327-32 32-32v0h224v288c0.116 11.518 2.262 22.501 6.096 32.655l-0.217-0.655h-37.879c-17.673 0-32 14.327-32 32v0zM672 416v176c0 8.837-7.163 16-16 16v0h-144c-17.673 0-32-14.327-32-32v0-480c0-17.673 14.327-32 32-32v0h352c17.673 0 32 14.327 32 32v0 272c0 8.837-7.163 16-16 16v0h-176c-17.673 0-32 14.327-32 32v0zM416 832v-144c0-8.837 7.163-16 16-16v0h144z" />
+<glyph unicode="" glyph-name="edit" d="M107.093 248.875l214.827-199.979 512.683 520.96-214.699 199.893-512.811-520.875zM994.603 858.411l-81.664 75.947c-38.059 35.413-98.091 33.963-134.229-3.029l-102.357-104.875 219.136-203.819 102.229 104.704c36.224 37.12 34.816 95.787-3.115 131.072zM0.299-64l268.459 58.24-210.133 195.584-58.325-253.824z" />
+<glyph unicode="" glyph-name="email" d="M1024 141.056l-359.893 278.741 359.893 352.896zM0 788.011l375.211-363.136-375.211-308.907zM580.267 326.656c-21.333-21.035-69.12-21.035-98.603 6.997l-70.997 55.765-378.667-301.568 992 1.067-380.16 290.389-63.573-52.651zM1005.227 812.757l-422.229-413.227c-28.075-24.149-73.771-24.149-102.101 0l-448.896 412.459 973.227 0.768z" />
+<glyph unicode="" glyph-name="exit" d="M826.547 713.055l174.681-174.731-174.681-174.856v116.127h-324.501v117.521h324.501zM22.578 960h748.846v-322.493h-85.415v233.478h-527.32l143.325-93.695v-571.717h383.995v233.478h85.415v-322.493h-469.41v-180.559l-279.436 180.559z" />
+<glyph unicode="" glyph-name="file" d="M941.653 599.979h-360.021v360.021zM515.157 534.059v425.6h-428.245v-1023.659h861.995l0.427 599.083-434.176-1.024z" />
+<glyph unicode="" glyph-name="filter" d="M938.112 731.733h-937.6l333.184-523.819v-271.915h245.376v273.067zM0 960h938.667v-183.424h-938.667v183.424z" />
+<glyph unicode="" glyph-name="folder" d="M240.547 563.881h783.587l-188.453-456.336h-763.813zM0 788.589h297.559l59.547-131.005h477.942l-0.134-40.127h-631.676l-188.418-509.913h-14.82z" />
+<glyph unicode="" glyph-name="foldershare" d="M653.349 20.736h267.611v-42.272h-272.88c3.675 11.040 5.573 22.781 5.573 35.093 0 2.41-0.147 4.741-0.304 7.179zM102.976 20.736h293.6c-0.229-2.438-0.384-4.77-0.384-7.179 0-12.312 1.978-24.053 5.584-35.093h-298.8zM168.852 960h267.828c42.020 0 76.073-34.062 76.073-76.061v-36.467h342.328c42.010 0 76.072-34.062 76.072-76.062v-492.874c0-42.009-34.062-76.072-76.072-76.072h-296.568v-117.698l2.973-1.343c26.009-12.526 43.939-39.118 43.939-69.861 0-42.853-34.708-77.562-77.592-77.562-42.73 0-77.448 34.709-77.448 77.562 0 30.743 17.935 57.335 43.89 69.861l1.534 0.695v118.347h-326.957c-42 0-76.051 34.062-76.051 76.072v492.874c0 1.312 0.033 2.617 0.099 3.913l0.064 0.841-0.064 0.841c-0.066 1.297-0.099 2.602-0.099 3.915v103.019c0 41.999 34.051 76.061 76.052 76.061z" />
+<glyph unicode="" glyph-name="hdd" d="M263.952 106.688c-31.44 0-56.896-25.472-56.896-56.895 0-31.44 25.456-56.896 56.896-56.896 31.408 0 56.896 25.456 56.896 56.896 0 31.424-25.488 56.895-56.896 56.895zM760.040 106.689c-31.445 0-56.904-25.472-56.904-56.896 0-31.44 25.46-56.896 56.904-56.896 31.412 0 56.872 25.456 56.872 56.896 0 31.424-25.46 56.896-56.872 56.896zM511.968 454.832c52.784 0 95.584-42.784 95.584-95.584 0-52.784-42.8-95.568-95.584-95.568-52.8 0-95.584 42.784-95.584 95.568 0 52.8 42.784 95.584 95.584 95.584zM517.632 561.92c113.632-6.416 203.872-100.336 203.872-215.568h-27.312c0 101.072-79.856 183.6-179.744 188.416zM511.968 639.152c-154.592 0-279.904-125.312-279.904-279.904 0-154.576 125.312-279.888 279.904-279.888 154.576 0 279.888 125.312 279.888 279.888 0 154.592-125.312 279.904-279.888 279.904zM760.040 741.568c-31.445 0-56.904-25.488-56.904-56.896 0-31.424 25.46-56.896 56.904-56.896 31.412 0 56.872 25.472 56.872 56.896 0 31.408-25.46 56.896-56.872 56.896zM263.952 741.568c-31.44 0-56.896-25.488-56.896-56.896 0-31.424 25.456-56.896 56.896-56.896 31.408 0 56.896 25.472 56.896 56.896 0 31.408-25.488 56.896-56.896 56.896zM191.12 960h641.696c45.232 0 81.92-36.688 81.92-81.92v-860.16c0-45.232-36.688-81.92-81.92-81.92h-641.696c-45.232 0-81.92 36.688-81.92 81.92v860.16c0 45.231 36.688 81.92 81.92 81.92z" />
+<glyph unicode="" glyph-name="help" d="M512.085 960c-282.752 0-511.915-229.163-511.915-512.043 0-282.581 229.163-511.957 511.915-511.957s511.915 229.376 511.915 511.957c0 282.88-229.163 512.043-511.915 512.043zM585.429 100.309h-139.648v134.955h139.648v-134.955zM718.635 493.568c-11.776-16.811-34.517-38.272-68.053-64.469l-32.981-25.685c-18.048-13.995-29.952-30.379-35.925-49.024-3.755-11.819-5.76-30.208-6.059-55.125h-126.592c1.835 52.608 6.869 88.917 14.848 109.013 8.107 20.096 28.885 43.264 62.421 69.419l34.005 26.624c11.179 8.405 20.224 17.621 27.051 27.563 12.331 17.109 18.603 35.968 18.603 56.533 0 23.68-6.912 45.184-20.651 64.64-13.867 19.456-39.125 29.269-75.733 29.269-36.053 0-61.568-11.989-76.672-35.968-15.061-23.979-22.613-48.896-22.613-74.709h-134.997c3.755 88.661 34.731 151.552 92.928 188.629 36.736 23.68 81.92 35.499 135.509 35.499 70.357 0 128.853-16.853 175.36-50.432 46.549-33.664 69.845-83.499 69.845-149.461 0-40.491-10.155-74.581-30.293-102.315z" />
+<glyph unicode="" glyph-name="info" d="M512.043 960c-282.795 0-512.043-229.248-512.043-512s229.248-512 512.043-512c282.709 0 511.957 229.248 511.957 512s-229.248 512-511.957 512zM504.277 787.2c38.613 0 68.523-28.971 68.523-67.541 0-36.693-29.909-67.584-69.504-67.584-35.712 0-67.584 30.891-67.584 67.584 0.043 38.571 31.915 67.541 68.565 67.541zM635.563 152.917h-247.125v30.933c55.979 6.741 61.781 10.667 61.781 79.147v191.147c0 63.744-6.741 66.603-53.12 74.325v27.989c57.899 6.784 121.643 19.328 175.701 34.731v-328.235c0-66.645 4.779-71.424 62.763-79.147v-30.891z" />
+<glyph unicode="" glyph-name="invoice" d="M899.243 960h-765.013c-20.139 0-36.523-16.341-36.523-36.565v-950.869c0-20.139 16.384-36.565 36.523-36.565h765.013c20.224 0 36.565 16.427 36.565 36.565v950.869c0.043 20.224-16.341 36.565-36.565 36.565zM169.344 237.739h428.331v-94.421h-428.331v94.421zM169.344 274.347v88.32h428.331v-88.32h-428.331zM169.344 399.317v93.611h428.331v-93.611h-428.331zM169.344 529.536v49.835c0 20.053 17.067 36.309 38.059 36.309h390.272v-86.144h-428.331zM164.779 800.811c0 20.224 13.44 36.565 30.037 36.565h150.229c16.597 0 30.037-16.341 30.037-36.565v-22.869c0-20.224-13.397-36.565-30.037-36.565h-150.272c-16.597 0-30.037 16.341-30.037 36.565v22.869zM169.344 43.989v62.763h428.331v-99.072h-390.272c-20.992 0-38.059 16.256-38.059 36.309zM864.171 43.989c0-20.096-16.981-36.352-38.059-36.352h-191.915v99.072h229.973v-62.72zM864.171 143.317h-229.973v94.421h229.973v-94.421zM864.171 274.347h-229.973v88.32h229.973v-88.32zM864.171 399.317h-229.973v93.611h225.451v36.608h-225.451v86.144h191.915c21.035 0 38.059-16.256 38.059-36.309v-180.053z" />
+<glyph unicode="" glyph-name="license" d="M184.187 116.524h654.634c9.495 0 17.18-7.686 17.18-17.183v-7.098c0-9.497-7.685-17.184-17.18-17.184h-654.634c-9.495 0-17.18 7.687-17.18 17.184v7.098c0 9.497 7.685 17.183 17.18 17.183zM183.633 193.759h654.633c9.498 0 17.18-7.684 17.18-17.179v-7.096c0-9.494-7.682-17.177-17.18-17.177h-654.633c-9.495 0-17.18 7.683-17.18 17.177v7.096c0 9.495 7.685 17.179 17.18 17.179zM183.466 287.268h192.408c9.497 0 17.181-7.683 17.181-17.178v-7.096c0-9.494-7.685-17.178-17.181-17.178h-192.408c-9.498 0-17.18 7.684-17.18 17.178v7.096c0 9.495 7.682 17.178 17.18 17.178zM99.643 537.576c-11.375 0-20.618-9.245-20.618-20.621v-481.054c0-11.377 9.243-20.621 20.618-20.621h824.66c11.378 0 20.62 9.244 20.62 20.621v481.054c0 11.375-9.243 20.621-20.62 20.621h-244.5l75.062-146.538c1.21-2.987 0.874-6.627-1.057-9.53-1.947-2.938-5.201-4.681-8.674-4.681-1.459 0-2.852 0.303-4.278 0.923l-94.358 41.625-38.505-93.753c-1.644-3.975-5.502-6.544-9.815-6.544s-8.137 2.569-9.781 6.526l-76.288 147.109-75.164-144.457c-1.781-4.229-5.64-6.779-9.917-6.779-4.313 0-8.154 2.568-9.799 6.546l-38.656 93.989-94.274-41.896c-1.393-0.586-2.785-0.889-4.228-0.889-3.489 0-6.744 1.745-8.691 4.681-1.93 2.886-2.281 6.542-0.938 9.781l73.887 143.887zM511.984 825.451c1.987 0 3.971-1.141 4.71-3.423l20.049-61.625c1.408-4.319 5.468-7.263 10.015-7.263h64.778c4.798 0 6.793-6.166 2.917-9.009l-52.412-38.102c-3.675-2.669-5.2-7.434-3.791-11.762l20.014-61.599c1.46-4.556-3.741-8.362-7.633-5.555l-52.446 38.063c-3.693 2.69-8.709 2.69-12.416 0l-52.396-38.063c-3.891-2.808-9.111 0.999-7.615 5.555l19.998 61.599c1.393 4.328-0.134 9.093-3.792 11.762l-52.463 38.102c-3.876 2.844-1.862 9.009 2.936 9.009h64.794c4.564 0 8.608 2.944 10.016 7.263l20.014 61.625c0.747 2.282 2.735 3.423 4.722 3.423zM512.729 892.177c-95.819 0-173.767-77.967-173.767-173.802 0-95.82 77.948-173.785 173.767-173.785 95.835 0 173.818 77.966 173.818 173.785 0 95.835-77.983 173.802-173.818 173.802zM512.747 959.807c4.764 0 9.259-1.862 12.65-5.235l26.256-26.274 34.244 14.983c2.332 1.040 4.765 1.56 7.281 1.56 7.080 0 13.505-4.193 16.375-10.687l17.451-39.326 43.739-0.471c9.899 0 17.935-8.038 17.935-17.918v-37.148l34.829-13.589c4.464-1.711 7.988-5.085 9.949-9.464 1.915-4.362 2.049-9.243 0.338-13.723l-15.519-40.15 30.636-31.274c3.406-3.422 5.267-7.953 5.267-12.751-0.017-4.764-1.879-9.244-5.267-12.617l-26.291-26.257 14.999-34.244c1.947-4.377 2.081-9.243 0.37-13.723-1.31-3.389-3.859-6.257-7.568-8.524l-10.401-6.376h273.006c17.046 0 30.924-13.875 30.924-30.922v-618.497c0-17.047-13.877-30.922-30.924-30.922h-962.104c-17.045 0-30.921 13.875-30.921 30.922v618.497c0 17.047 13.876 30.922 30.921 30.922h262.841l-1.862 4.698c-1.192 3.054-2.215 7.767-0.218 12.97l15.484 40.164-30.585 31.275c-3.389 3.389-5.252 7.869-5.269 12.65 0 4.8 1.862 9.312 5.235 12.686l26.29 26.289-14.982 34.244c-1.962 4.38-2.096 9.228-0.37 13.709 1.729 4.479 5.083 8.002 9.463 9.932l39.378 17.466 0.47 43.722c0 9.915 8.035 17.953 17.903 17.953h37.128l13.607 34.797c2.651 6.879 9.378 11.476 16.728 11.476 2.214 0 4.378-0.403 6.425-1.192l40.218-15.485 31.222 30.587c3.424 3.405 7.919 5.267 12.719 5.267z" />
+<glyph unicode="" glyph-name="location" d="M507.349 960c-206.592 0-374.016-167.424-374.016-374.016 0-206.549 374.016-649.984 374.016-649.984s374.016 443.435 374.016 649.984c0 206.592-167.424 374.016-374.016 374.016zM510.635 394.752c-102.827 0-186.112 83.413-186.112 186.24s83.285 186.155 186.112 186.155c102.869 0 186.24-83.371 186.24-186.155 0-102.827-83.371-186.24-186.24-186.24z" />
+<glyph unicode="" glyph-name="next" d="M342.4-64l-135.040 133.589 382.635 378.453-382.635 378.411 135.040 133.547 517.717-512-517.717-512z" />
+<glyph unicode="" glyph-name="pdf" d="M940.459 611.499h-344.96v344.917zM496.555 313.515c-13.995 0-22.997-1.237-28.331-2.432v-180.907c5.333-1.28 13.952-1.28 21.717-1.28 56.661-0.384 93.525 30.805 93.525 96.853 0.512 57.429-33.152 87.765-86.912 87.765zM254.805 314.325c-12.715 0-21.376-1.195-25.899-2.432v-81.707c5.333-1.152 11.904-1.621 20.949-1.621 33.237 0 53.717 16.853 53.717 45.184-0.043 25.429-17.664 40.576-48.768 40.576zM506.624 534.229v425.771h-428.416v-1024h862.251l1.408 598.229h-435.243zM340.096 209.749c-21.333-20.139-52.907-29.141-89.813-29.141-8.192 0-15.616 0.384-21.376 1.237v-98.859h-61.909v272.811c19.328 3.285 46.336 5.76 84.48 5.76 38.528 0 66.091-7.424 84.48-22.229 17.707-13.909 29.525-36.864 29.525-63.957s-8.96-50.048-25.387-65.621zM604.075 115.797c-29.227-24.192-73.515-35.712-127.659-35.712-32.384 0-55.381 2.048-70.955 4.139v271.573c22.912 3.712 52.864 5.76 84.437 5.76 52.48 0 86.656-9.472 113.28-29.568 28.715-21.291 46.763-55.339 46.763-104.192 0-52.949-19.328-89.429-45.867-112zM860.245 308.267h-106.24v-63.189h99.243v-50.901h-99.243v-111.104h-62.763v276.48h169.003v-51.285z" />
+<glyph unicode="" glyph-name="percent" d="M819.2 395.312c-34.531 0-61.719-14.686-81.563-44.056-19.449-29.371-29.173-70.251-29.172-122.642-0.001-51.597 9.723-92.279 29.172-122.047 19.844-29.371 47.032-44.056 81.563-44.056 33.736 0 60.328 14.685 79.777 44.056 19.844 29.767 29.766 70.449 29.767 122.047-0.001 51.994-9.923 92.676-29.767 122.047-19.449 29.767-46.041 44.651-79.777 44.651zM819.2 470.921c62.709 0 112.52-21.83 149.433-65.488 36.911-43.659 55.366-102.599 55.367-176.819-0.001-74.22-18.655-133.16-55.963-176.819-36.913-43.262-86.525-64.893-148.837-64.893-63.505 0-113.712 21.631-150.623 64.893-36.912 43.659-55.368 102.598-55.367 176.819-0.001 74.617 18.455 133.556 55.367 176.819 37.308 43.658 87.515 65.488 150.623 65.488zM204.8 833.488c-34.134-0.001-61.123-14.885-80.967-44.651-19.448-29.371-29.172-69.855-29.172-121.451 0-52.391 9.724-93.272 29.172-122.642s46.437-44.056 80.967-44.056 61.519 14.685 80.967 44.056c19.845 29.37 29.767 70.251 29.767 122.642 0 51.199-9.923 91.683-29.767 121.451-19.845 29.767-46.834 44.65-80.967 44.651zM742.4 909.098h95.256l-556.056-922.195h-95.256l556.056 922.195zM204.8 909.098c62.71-0.001 112.719-21.83 150.028-65.488 37.308-43.263 55.962-102.004 55.963-176.223 0-75.015-18.655-134.152-55.963-177.414-36.912-43.262-86.921-64.893-150.028-64.893s-113.116 21.631-150.028 64.893c-36.515 43.658-54.772 102.796-54.772 177.414 0 73.823 18.456 132.564 55.367 176.223 36.911 43.658 86.722 65.487 149.433 65.488z" />
+<glyph unicode="" glyph-name="phone" d="M1024 221.397l-259.072 127.061c0 0-95.317-141.696-117.291-136.875-12.245 2.731-13.909 3.072-24.491 7.339-38.016 15.232-132.395 58.581-221.227 138.923l-0.725-0.853c-87.765 79.701-140.032 168.107-158.848 204.075-5.291 9.941-5.888 11.691-9.856 23.552-7.125 21.376 124.117 130.688 124.117 130.688l-152.96 244.693c0 0-202.795-15.744-203.648-217.515-1.109-275.328 239.403-501.589 239.403-501.589 130.816-119.979 325.803-272.683 589.056-244.48 200.661 21.504 195.541 224.981 195.541 224.981z" />
+<glyph unicode="" glyph-name="preview" d="M536.547 517.926c-30.9 0.726-62.232-8.88-88.437-29.489-59.822-47.104-70.185-133.811-23.081-193.667 47.081-59.864 133.78-70.206 193.644-23.114 59.865 47.082 70.206 133.781 23.093 193.645-26.478 33.675-65.49 51.691-105.219 52.625zM538.726 613.216c67.184-1.571 133.166-32.023 177.966-88.966 65.688-83.518 65.148-197.824 6.125-280.044l181.343-230.475-98.801-77.731-180.695 229.626c-94.572-40.282-207.937-14.438-274.56 70.206-79.646 101.242-62.158 247.856 39.081 327.512 44.306 34.845 97.287 51.093 149.541 49.871zM401.39 960h293.395c48.093 0 87.102-39.020 87.102-87.094v-310.935l-1.026 1.139c-18.362 19.89-39.475 37.484-62.783 52.259l-5.886 3.635v253.901c0 9.582-7.835 17.418-17.406 17.418h-288.834l-4.688-151.962c0 0-6.062-100.469-116.792-88.332l-94.904 2.562v-431.702c0-9.613 7.831-17.395 17.457-17.395h66.443l2.227-3.174c17.178-23.856 37.929-45.261 61.534-63.539l3.935-2.973h-134.139c-48.116 0-87.104 38.987-87.104 87.082v442.14l34.5 36.386 0.033 0.978 180.748 189.93h-0.501l-48.323-50.992 50.626 53.657h0.731l1.592 1.68h0.157z" />
+<glyph unicode="" glyph-name="print" d="M973.397 797.269h-922.837c-27.947 0-50.56-22.699-50.56-50.603v-455.083c0-27.904 22.613-50.603 50.56-50.603h108.885v-245.675h700.032v245.675h113.963c27.861 0 50.56 22.656 50.56 50.603v455.083c-0.043 27.904-22.699 50.603-50.603 50.603zM816.811 38.016h-614.699v467.925h614.699v-467.925zM263.125 960h497.664v-105.643h-497.664v105.643z" />
+<glyph unicode="" glyph-name="product" d="M847.526 928.092l-20.445-766.103-449.407-226.005-22.99 942.302zM676.943 960l145.556-17.855-492.85-49.808 22.994-942.292-145.559 76.622-30.656 887.369z" />
+<glyph unicode="" glyph-name="productcd" d="M713.475 301.588c15.763 0 28.526-12.777 28.526-28.513 0-15.739-12.764-28.518-28.526-28.518-15.742 0-28.504 12.779-28.504 28.518 0 15.736 12.762 28.513 28.504 28.513zM713.468 349.678c-42.308 0-76.6-34.294-76.6-76.6 0-42.33 34.293-76.602 76.6-76.602 42.328 0 76.622 34.272 76.622 76.602 0 42.306-34.294 76.6-76.622 76.6zM713.468 541.2c148.087 0 268.145-120.038 268.145-268.122 0-148.087-120.058-268.149-268.145-268.149s-268.125 120.061-268.125 268.149c0 148.084 120.039 268.122 268.125 268.122zM713.47 928.092l-9.76-365.934c-155.13-5.209-279.81-132.708-279.81-289.085 0-79.52 32.248-151.635 84.314-204.030l-264.596-133.058-22.99 942.302zM542.887 960l145.556-17.855-492.85-49.808 22.994-942.292-145.559 76.622-30.656 887.369z" />
+<glyph unicode="" glyph-name="reload" d="M565.855 960c114.155 0 219.698-33.218 307.364-89.379l81.368 89.379 50.056-259.353-281.34 5.376 83.466 91.634c-69.529 42.098-152.123 66.915-240.914 66.914-245.17 0.001-444.635-186.87-444.635-416.556 0-229.689 199.465-416.606 444.635-416.606 129.37 0 245.574 52.323 326.884 135.123l66.507-73.391c-99.399-96.774-238.764-157.158-393.392-157.158-301.84 0-546.493 229.255-546.493 512.032 0 282.728 244.653 511.984 546.493 511.984z" />
+<glyph unicode="" glyph-name="settings" d="M827.952 118.091l-19.911-19.927v-28.218l19.911-19.93h28.252l19.943 19.93v28.218l-19.943 19.927zM668.408 424.953l241.775-241.732c46.182-46.214 46.182-121.061 0-167.241-46.182-46.162-121.064-46.162-167.246 0l-268.686 268.676 66.22 66.168 59.574-59.586 72.931 72.974-5.4 10.615c-8.245 16.152-7.543 34.816 0.832 50.124zM871.565 890.932l152.509-152.479-276.639-276.67c-26.398 13.517-59.509 9.266-81.624-12.835-22.085-22.083-26.334-55.209-12.815-81.575l-52.958-52.955-59.605 59.59-251.618-251.667 2.432-2.413-4.283-25.536-107.576-75.725-25.986 25.983 74.117 109.187 25.563 4.251 2.4-2.43 251.679 251.635-59.604 59.6 52.926 52.943c26.43-13.505 59.541-9.253 81.626 12.832 22.083 22.1 26.332 55.24 12.815 81.621zM222.013 926.127c56.278-0.222 112.475-21.793 155.409-64.723 55.579-55.576 75.203-133.3 59.255-204.709l121.417-121.445c-7.766-4.219-16.428-6.745-25.537-6.745-8.532 0-17.003 2.064-24.546 5.93l-10.643 5.464-72.964-73.007 59.638-59.557-66.256-66.203-148.361 148.335c-71.398-15.929-149.126 3.677-204.705 59.237-57.241 57.237-76.513 138.076-57.816 211.215l154.337-154.378 108.666 50.701 50.684 108.645-154.395 154.344c18.289 4.67 37.058 6.969 55.817 6.895z" />
+<glyph unicode="" glyph-name="star" d="M512.043 960l158.208-320.555 353.749-51.413-255.957-249.515 60.459-352.427-316.459 166.4-316.501-166.4 60.459 352.427-256 249.515 353.792 51.413z" />
+<glyph unicode="" glyph-name="template" d="M502.522 615.239l80.861-74.562-92.996-19.661zM411.045 829.025h192.977l-70.344-75.324h-117.69l-5.087-164.232c0 0-6.541-108.612-126.229-95.489l-102.575 2.793v-466.617c0-10.396 8.467-18.817 18.858-18.817h527.19c10.354 0 18.821 8.421 18.821 18.817v559.653l75.36 75.979v-635.632c0-51.997-42.186-94.113-94.181-94.113h-527.19c-51.996 0-94.145 42.117-94.145 94.113v477.886l37.28 39.323 0.037 1.077 195.375 205.259h-0.546l-52.214-55.075 54.721 57.95h0.763l1.744 1.812h0.145zM707.15 880.343l131.403-121.256-162.198-175.828-2.761 27.837-43.293 14.716-1.217 29.473-43.201 11.446-5.196 33.247-35.771 4.578zM797.329 959.977c5.834-0.231 11.27-2.23 15.501-6.119l93.089-85.922c11.299-10.41 9.845-30.426-3.307-44.623l-17.841-19.376-134.038 123.651 17.859 19.376c8.187 8.874 19.013 13.399 28.736 13.013z" />
+<glyph unicode="" glyph-name="trash" d="M979.499 870.955h-267.179c0 27.051 5.205 89.045-51.925 89.045h-252.032c-56.789 0-52.139-61.995-52.139-89.045h-267.093c-29.355 0-44.501-61.995-44.501-89.003h979.371c0 26.965-15.147 89.003-44.501 89.003zM133.632 737.408l-2.347-745.387c0-30.933 27.179-56.021 60.715-56.021h683.989c33.579 0 60.757 25.088 60.757 55.979l-1.792 745.387h-801.323zM311.723 25.173h-89.045v623.189h89.045v-623.189zM489.771 25.173h-89.045v623.189h89.003v-623.189zM667.819 25.173h-89.045v623.189h89.045v-623.189zM845.909 25.173h-89.003v623.189h89.003v-623.189z" />
+<glyph unicode="" glyph-name="upload" d="M1024-63.915l-1024-0.085v428.672l153.6 0.171v-275.243l718.421-0.768v275.84l151.979 0.085zM411.989 574.933v-279.509h192.512v279.509h211.456l-303.957 385.067-303.915-385.067z" />
+<glyph unicode="" glyph-name="usergroup" d="M785.038 462.096h101.5c75.938 0 137.461-61.541 137.461-137.487v-180.049h-235.36v175.248c0 50.831-17.644 97.528-46.896 134.653 13.706 4.552 28.042 7.635 43.294 7.635zM137.483 462.096h101.522c10.666 0 20.915-1.499 30.915-3.802-31.125-37.687-49.792-85.934-49.792-138.487v-175.248h-220.128v180.049c0 75.946 61.606 137.487 137.483 137.487zM438.126 499.344h132.521c99.144 0 179.497-80.365 179.497-179.531v-235.093h-491.536v235.093c0 99.166 80.354 179.531 179.518 179.531zM839.089 701.056c61.432 0 111.263-49.845 111.263-111.291 0-61.491-49.831-111.333-111.263-111.333-61.479 0-111.329 49.843-111.329 111.333 0 61.446 49.85 111.291 111.329 111.291zM191.524 701.056c61.442 0 111.276-49.845 111.276-111.291 0-61.491-49.834-111.333-111.276-111.333-61.482 0-111.316 49.843-111.316 111.333 0 61.446 49.834 111.291 111.316 111.291zM508.642 811.36c2.509 0 5.002-0.064 7.48-0.189s4.938-0.313 7.381-0.561c2.443-0.248 4.868-0.557 7.274-0.924s4.792-0.794 7.158-1.278c2.366-0.484 4.71-1.025 7.032-1.623s4.622-1.251 6.898-1.958c2.276-0.708 4.527-1.47 6.754-2.285s4.427-1.683 6.601-2.602c2.174-0.919 4.321-1.89 6.439-2.91s4.208-2.091 6.267-3.209c2.060-1.119 4.089-2.286 6.087-3.499s3.964-2.474 5.898-3.78c1.933-1.306 3.833-2.657 5.699-4.052s3.696-2.834 5.491-4.315c1.795-1.481 3.553-3.004 5.274-4.568s3.404-3.169 5.048-4.812c1.644-1.644 3.249-3.327 4.813-5.047s3.088-3.479 4.569-5.274c1.481-1.795 2.92-3.625 4.315-5.491s2.747-3.765 4.053-5.698c1.306-1.933 2.567-3.899 3.781-5.897s2.381-4.027 3.5-6.087c1.119-2.059 2.19-4.149 3.21-6.267s1.992-4.265 2.911-6.438c0.92-2.174 1.788-4.374 2.603-6.601s1.578-4.478 2.285-6.754c0.708-2.276 1.361-4.575 1.959-6.898s1.139-4.667 1.623-7.032c0.484-2.366 0.911-4.752 1.278-7.158s0.676-4.831 0.924-7.275c0.248-2.443 0.436-4.904 0.561-7.382s0.189-4.972 0.189-7.48c0-2.508-0.064-5.001-0.189-7.477s-0.313-4.937-0.561-7.379c-0.248-2.442-0.557-4.867-0.924-7.272s-0.794-4.791-1.278-7.156c-0.484-2.365-1.026-4.709-1.623-7.030s-1.251-4.62-1.959-6.895c-0.708-2.275-1.47-4.526-2.285-6.752s-1.683-4.426-2.603-6.599c-0.919-2.173-1.89-4.319-2.911-6.437s-2.091-4.207-3.21-6.266c-1.119-2.059-2.286-4.088-3.5-6.085s-2.475-3.963-3.781-5.896c-1.306-1.933-2.658-3.832-4.053-5.697s-2.834-3.695-4.315-5.489c-1.481-1.794-3.005-3.552-4.569-5.273s-3.169-3.403-4.813-5.047c-1.644-1.644-3.327-3.248-5.048-4.812s-3.48-3.087-5.274-4.567c-1.795-1.481-3.626-2.919-5.491-4.314s-3.766-2.746-5.699-4.051c-1.933-1.306-3.9-2.566-5.898-3.78s-4.028-2.381-6.087-3.499c-2.060-1.119-4.149-2.189-6.267-3.209s-4.265-1.991-6.439-2.91c-2.174-0.919-4.375-1.787-6.601-2.602s-4.478-1.577-6.754-2.285c-2.276-0.708-4.575-1.361-6.898-1.958s-4.667-1.139-7.032-1.623c-2.366-0.484-4.752-0.91-7.158-1.278s-4.831-0.676-7.274-0.924c-2.443-0.248-4.904-0.436-7.381-0.561s-4.971-0.189-7.48-0.189c-2.508 0-5.001 0.064-7.478 0.189s-4.937 0.313-7.379 0.561c-2.442 0.248-4.867 0.557-7.272 0.924s-4.791 0.794-7.156 1.278c-2.365 0.484-4.709 1.025-7.030 1.623s-4.621 1.251-6.896 1.958c-2.275 0.708-4.526 1.47-6.752 2.285s-4.426 1.683-6.599 2.602c-2.173 0.919-4.319 1.89-6.437 2.91s-4.207 2.091-6.266 3.209c-2.059 1.119-4.088 2.285-6.085 3.499s-3.963 2.474-5.896 3.78c-1.933 1.306-3.832 2.657-5.697 4.051s-3.695 2.833-5.49 4.314c-1.794 1.481-3.552 3.004-5.273 4.567s-3.403 3.168-5.047 4.812c-1.644 1.644-3.248 3.326-4.812 5.047s-3.087 3.478-4.567 5.273c-1.481 1.794-2.919 3.625-4.314 5.489s-2.746 3.765-4.052 5.697c-1.306 1.933-2.566 3.898-3.78 5.896s-2.381 4.026-3.499 6.085c-1.119 2.059-2.189 4.148-3.209 6.266s-1.991 4.264-2.91 6.437c-0.919 2.173-1.787 4.373-2.602 6.599s-1.577 4.477-2.285 6.752c-0.708 2.275-1.361 4.574-1.958 6.895s-1.139 4.665-1.623 7.030c-0.484 2.365-0.91 4.75-1.278 7.156s-0.676 4.83-0.924 7.272c-0.248 2.442-0.436 4.903-0.561 7.379s-0.189 4.97-0.189 7.477c0 2.509 0.064 5.003 0.189 7.48s0.313 4.939 0.561 7.382c0.248 2.443 0.557 4.869 0.924 7.275s0.794 4.792 1.278 7.158c0.484 2.366 1.025 4.71 1.623 7.032s1.251 4.622 1.958 6.898c0.708 2.276 1.47 4.527 2.285 6.754s1.683 4.427 2.602 6.601c0.919 2.174 1.89 4.32 2.91 6.438s2.091 4.208 3.209 6.267c1.119 2.059 2.285 4.089 3.499 6.087s2.474 3.964 3.78 5.897c1.306 1.933 2.657 3.833 4.052 5.698s2.833 3.696 4.314 5.491c1.481 1.795 3.004 3.553 4.567 5.274s3.168 3.404 4.812 5.047c1.644 1.644 3.326 3.248 5.047 4.812s3.479 3.087 5.273 4.568c1.794 1.481 3.625 2.92 5.49 4.315s3.765 2.746 5.697 4.052c1.933 1.306 3.898 2.566 5.896 3.78s4.026 2.381 6.085 3.499c2.059 1.119 4.148 2.189 6.266 3.209s4.264 1.991 6.437 2.91c2.173 0.919 4.373 1.787 6.599 2.602s4.477 1.577 6.752 2.285c2.275 0.708 4.574 1.361 6.896 1.958s4.665 1.139 7.030 1.623c2.365 0.484 4.751 0.91 7.156 1.278s4.83 0.676 7.272 0.924c2.442 0.248 4.903 0.436 7.379 0.561s4.97 0.189 7.478 0.189z" />
+<glyph unicode="" glyph-name="userconfig" d="M1004.032 286.165h-23.979c-10.965 0-22.699 8.661-25.941 19.157l-13.781 33.493c-5.12 9.6-3.029 23.979 4.693 31.659l17.024 17.067c7.851 7.765 7.851 20.48 0 28.245l-28.288 28.331c-7.808 7.765-20.48 7.765-28.331 0l-17.024-16.981c-7.723-7.851-22.101-9.899-31.744-4.736l-33.451 13.824c-10.411 3.243-19.115 14.933-19.115 25.899v23.979c0 11.008-8.96 20.011-19.968 20.011h-40.021c-10.965 0-20.011-9.003-20.011-20.011v-23.979c0-11.008-8.619-22.656-19.029-25.899l-33.536-13.824c-9.771-5.163-23.979-3.072-31.829 4.736l-17.024 16.981c-7.765 7.765-20.437 7.765-28.288 0l-28.203-28.331c-7.893-7.723-7.893-20.48 0-28.245l16.896-17.067c7.851-7.68 9.984-22.101 4.736-31.659l-13.739-33.579c-3.285-10.581-14.976-19.072-25.941-19.072h-23.979c-11.008 0-20.053-9.003-20.053-20.011v-40.021c0-11.008 9.045-20.011 20.053-20.011h23.979c11.008 0 22.656-8.576 25.899-19.072l13.781-33.493c5.163-9.771 3.072-24.064-4.736-31.829l-16.939-16.896c-7.851-7.851-7.851-20.565 0-28.416l28.245-28.16c7.851-7.851 20.523-7.851 28.288 0l17.024 16.981c7.765 7.765 22.101 9.813 31.701 4.651l33.579-13.824c10.411-3.243 19.029-14.933 19.029-25.984v-23.936c0-10.923 9.045-19.925 20.011-19.925h40.021c11.008 0 19.968 9.003 19.968 19.925v23.936c0 11.093 8.704 22.741 19.115 25.984l33.579 13.824c9.643 5.163 23.979 3.072 31.787-4.651l16.896-16.981c7.851-7.851 20.523-7.851 28.331 0l28.288 28.16c7.851 7.851 7.851 20.565 0 28.416l-17.024 16.896c-7.765 7.765-9.813 22.101-4.693 31.829l13.781 33.493c3.243 10.496 15.019 19.072 25.941 19.072h23.979c10.965 0 19.968 9.003 19.968 20.011v40.021c0.043 11.008-8.96 20.011-19.925 20.011zM864.128 246.187c0-55.168-44.8-99.925-100.011-99.925-55.253 0-100.053 44.757-100.053 99.925 0 55.253 44.8 100.011 100.053 100.011 55.211-0.043 100.011-44.8 100.011-100.011zM461.312 267.179c0 73.899 37.547 139.008 94.549 177.451l0.171 0.128v66.773c0 3.072 0.939 7.936 2.901 14.72 1.877 6.656 4.011 13.653 6.272 21.035 2.645 8.363 5.589 17.408 8.619 26.965 6.869 12.8 12.501 26.923 17.536 41.685 1.493-0.896 2.944-1.664 4.523-1.877 15.019-2.603 26.283 25.899 29.44 60.757 3.157 34.261 6.699 44.928-16.171 46.72 0 1.579 0.341 3.115 0.341 4.736 0 39.125-4.053 72.277-12.416 99.328-8.192 27.008-8.576 46.464-22.955 63.104-14.379 16.683-42.027 31.232-61.099 38.784-18.901 7.467-39.083 11.179-60.587 11.179-21.931 0-42.539-9.643-61.568-17.365-18.987-7.68-49.579-15.701-63.744-32.64-14.208-16.896-11.264-37.12-19.541-64-8.021-26.283-9.856-65.024-9.899-103.040-0.341 0-0.64 0-0.939 0-24.107-1.536-20.352-12.075-17.152-46.933 3.285-34.773 14.507-63.317 29.483-60.672 1.451 0.213 2.859 0.939 4.224 1.749 5.163-15.616 11.051-30.464 18.219-43.819 3.072-8.789 5.76-17.109 8.064-24.704 1.877-6.528 3.712-12.971 5.461-19.328 1.664-6.4 2.987-11.093 3.712-14.123v-65.621c-11.904-5.419-25.685-11.52-41.429-18.475-15.744-6.869-32.427-14.123-50.133-21.888-17.536-7.723-35.328-15.317-53.163-22.997-17.835-7.765-34.816-14.933-51.029-21.675-16.085-6.571-30.635-12.587-43.691-17.749-13.013-5.12-23.552-9.045-31.659-11.733-15.744-5.76-28.544-14.507-38.528-26.24-9.984-11.648-17.92-23.595-23.595-35.925-6.912-14.165-12.075-29.227-15.531-44.971v-73.003h494.293c-20.779 32.896-32.981 71.808-32.981 113.664z" />
+<glyph unicode="" glyph-name="viewpdf" d="M186.878 198.357c-61.858-18.302-107.102-64.709-122.827-82.566 0.191 3.469-6.445-7.624-6.445-7.624s2.548 3.151 6.445 7.624c-0.066-1.354-1.068-4.711-4.028-12.017-10.629-26.259 22.267-25.589 22.267-25.589 93.244 14.117 104.589 120.172 104.589 120.172zM721.065 287.733c-17.328 0.001-28.016-1.035-28.016-1.035 99.242-80.847 191.531-62.003 191.531-62.003 37.782 4.708-19.861 37.254-19.861 37.254-53.296 21.995-110.573 25.78-143.653 25.783zM381.96 506.055c0 0-35.839-173.585-80.605-225.069l248.329 36.937c0 0-123.752 110.91-167.724 188.132zM845.111 705.497c4.827 0.315 10.331-1.799 16.15-6.633l38.243-31.943c18.558-15.55 48.954-40.949 67.525-56.433l38.272-31.99c18.607-15.533 18.321-40.666-0.508-55.8l-38.832-31.256c-18.859-15.249-49.683-40.059-68.539-55.228l-38.835-31.239c-18.822-15.249-34.021-2.515-33.753 28.201l0.526 59.012h-225.156c-15.85 0-28.705 12.878-28.705 28.729v62.246c0 15.834 12.855 28.694 28.705 28.694h226.241l0.506 59.362c0.198 21.13 7.54 33.585 18.16 34.279zM386.788 826.673c-2.777-0.341-5.637-3.384-8.408-10.615 0 0-13.398-64.091 20.135-170.59 0 0 28.535 84.507 7.050 149.183 0 0-8.859 33.241-18.777 32.022zM356.447 896.795c26.43 1.014 50.261-49.878 50.261-49.878 74.083-158.383 4.029-259.586 4.029-259.586 73.367-173.011 220.388-265.396 220.388-265.396 142.849 7.671 247.075-28.422 247.075-28.422 81.976-43.129 54.534-83.444 54.534-83.444-85.921-95.871-338.276 53.635-338.276 53.635l-325.281-54.828c-46.998-160.866-204.075-198.666-204.075-198.666-74.88-10.915-64.627 67.21-64.627 67.21 58.439 128.623 205.395 158.211 205.395 158.211 57.879 61.876 152.495 352.67 152.495 352.67-95.602 214.882-28.427 286.37-28.427 286.37 8.602 15.68 17.701 21.786 26.511 22.124z" />
+<glyph unicode="" glyph-name="website" d="M512.043 960c-282.709 0-512.043-229.248-512.043-512s229.291-512 512-512c282.709 0 512 229.248 512 512s-229.248 512-511.957 512zM470.229 375.808c0 0-158.677 36.693-189.568 98.603-62.208 124.715-69.589 100.608-77.227 139.221-7.893 38.656 3.797 117.973 3.797 117.973s-1.92-15.488 75.307 84.992c54.997 71.296 183.509 45.909 228.181 30.891 18.517-6.101-79.189 0-83.2-52.224-3.797-52.096 7.893-44.501 52.309-56.021 44.587-11.52 42.581 90.965 42.581 90.965l67.627-40.619 25.216-25.216c0 0 6.997-62.635-15.616-90.88-25.771-32.384-60.416-32.085-65.579-88.875-3.84-41.515 3.797-110.208 3.797-110.208s-8.789-11.392-21.291-1.877c-17.707 13.397-36.608 36.48-50.219 63.744-23.168 46.464-90.88 13.525-92.8 7.765-37.376-112.256 98.603-135.296 98.603-135.296l-1.92-32.939zM530.048-10.923c7.808 30.933 85.205 100.608 69.589 131.499-15.36 30.933-46.293 30.933-77.227 54.187-31.019 23.168-33.579 95.317 15.403 139.179 46.507 41.6 100.608 46.379 100.608 46.379s100.48-30.891 131.371-38.571c31.019-7.808 100.608 15.36 100.608-38.699 0.043-201.259-347.989-324.949-340.352-293.973z" />
+<glyph unicode="" glyph-name="back" d="M725.077-64l-517.717 512.043 517.717 511.957 135.083-133.547-382.677-378.411 382.677-378.453-135.083-133.589z" />
+<glyph unicode="" glyph-name="add" d="M896.896 564.352h-271.317v271.275h-225.365v-271.275h-271.317v-225.408h271.317v-271.275h225.365v271.275h271.317z" />
+<glyph unicode="" glyph-name="unsort" d="M512.703 960l315.21-258.374-85.959-70.509-160.623 131.755v-628.727l159.39 130.552 85.844-70.365-315.149-258.331-315.328 258.38 85.962 70.363 172.157-141.162v647.64l-170.87-139.961-85.844 70.365 229.248 187.912z" />
+<glyph unicode="" glyph-name="sortasc" d="M70.527 404.677h282.938v-56.239l-214.972-286.738h25.346c34.964 0 61.069 3.238 78.367 9.767 17.301 6.477 33.248 17.961 47.92 34.498 14.647 16.489 26.046 36.756 34.239 60.801l53.294-18.060-53.341-150.557h-310.322v56.533l215.821 285.905h-33.834c-22.895 0-41.321-2.746-55.306-8.148-13.963-5.446-26.108-13.493-36.386-24.192-10.308-10.647-25.052-33.076-44.267-67.231l-51.28 22.723zM198.482 785.99l-41.371-111.644h80.728zM169.305 893.216h91.328l121.988-313.878c6.624-16.685 12.464-26.989 17.618-30.865 5.15-3.878 14.623-5.744 28.412-5.546v-56.239h-192.311v56.239l11.657 0.294c10.674 0 18.181 1.423 22.45 4.219 4.27 2.798 6.43 6.281 6.43 10.355 0 3.484-1.89 10.7-5.546 21.543l-12.145 37.003h-123.595l-15.236-41.075c-3.116-8.736-4.662-14.478-4.662-17.177 0-3.139 1.128-5.938 3.36-8.439 2.208-2.553 5.865-4.417 10.92-5.595 3.311-0.737 12.44-1.129 27.408-1.129v-56.239h-157.38v56.239c10.084 0 17.446 0.882 22.132 2.601 4.637 1.768 8.515 4.366 11.533 7.9 2.993 3.484 6.332 10.012 10.035 19.532zM722.794 911.664h98.342v-739.152l133.285 133.284 69.635-69.538-251.846-251.848-0.343 0.394-0.392-0.394-251.75 251.848 69.488 69.538 133.579-133.531z" />
+<glyph unicode="" glyph-name="sortdesc" d="M198.5 297.507l-41.416-111.642h80.725zM169.301 404.733h91.325l121.994-313.878c6.577-16.683 12.465-26.989 17.617-30.865 5.154-3.878 14.623-5.742 28.415-5.546v-56.239h-192.317v56.239l11.63 0.294c10.7 0 18.207 1.425 22.475 4.221s6.43 6.281 6.43 10.357c0 3.482-1.866 10.696-5.546 21.539l-12.122 37.003h-123.614l-15.26-41.073c-3.093-8.738-4.663-14.527-4.663-17.177 0-3.141 1.13-5.938 3.386-8.44 2.209-2.553 5.84-4.417 10.895-5.546 3.337-0.786 12.465-1.178 27.432-1.178v-56.239h-157.377v56.239c10.111 0 17.47 0.884 22.133 2.601 4.66 1.768 8.49 4.366 11.532 7.852 2.991 3.533 6.329 10.059 10.009 19.579zM70.528 893.216h282.958v-56.239l-214.993-286.739h25.324c34.988 0 61.095 3.239 78.369 9.763 17.324 6.481 33.271 17.963 47.945 34.5 14.674 16.489 26.058 36.758 34.202 60.803l53.344-18.109-53.344-150.509h-310.339v56.533l215.823 285.905h-33.81c-22.918 0-41.37-2.749-55.355-8.146-13.938-5.447-26.109-13.496-36.365-24.195-10.304-10.651-25.075-33.074-44.264-67.23l-51.281 22.721zM722.811 911.664h98.345v-739.103l133.284 133.286 69.635-69.589-251.847-251.848-0.345 0.394-0.39-0.394-251.749 251.848 69.488 69.589 133.578-133.582z" />
+<glyph unicode="" glyph-name="save" d="M178.857 170.418v-103.511h664.66v103.511zM270.958 958.932h127.786v-260.744h-127.786zM5.556 960h168.819v-312.888h669.074v312.888h175.017v-1023.936h-1012.91z" />
+<glyph unicode="" glyph-name="helpdesk" d="M655.369 407.6c12.115 0 24.23-4.615 33.48-13.845l119.789-119.813c18.478-18.52 18.478-48.458 0-66.958l-47.553-47.545-186.732 186.753 47.533 47.562c9.253 9.23 21.369 13.845 33.484 13.845zM897.698 704.976v-54.003h-36.335zM901.583 751.248l-68.575-100.399v-26.523h64.69v-31.814h29.335v31.814h19.623v26.648h-19.623v100.274zM767.672 751.248c-14.24 0-26.093-3.645-35.581-10.895-9.492-7.25-15.147-19.231-16.929-35.898l30.186-3.022c0.574 8.834 2.742 15.169 6.471 18.981 3.74 3.77 8.77 5.707 15.093 5.707 6.406 0 11.415-1.813 15.054-5.457 3.613-3.647 5.436-8.813 5.436-15.563 0-6.125-2.083-12.313-6.249-18.563-3.096-4.522-11.48-13.169-25.138-25.876-16.957-15.731-28.301-28.376-34.070-37.898-5.752-9.5-9.199-19.604-10.345-30.251h106.208v28.148h-60.166c1.582 2.707 3.656 5.52 6.196 8.416 2.554 2.875 8.607 8.71 18.168 17.46 9.562 8.77 16.177 15.501 19.844 20.167 5.54 7.041 9.583 13.772 12.135 20.229 2.532 6.418 3.823 13.188 3.823 20.313 0 12.522-4.467 22.96-13.374 31.376-8.907 8.397-21.178 12.626-36.762 12.626zM72.135 802.064l188.8-188.751c-65.686-65.728-35.531-135.437 26.052-197.001l66.998-67.019c61.553-61.607 131.301-91.751 197.009-26.022l188.767-188.812-7.458-7.459c-117.643-117.668-294.475-64.645-436.242 77.106l-154.259 154.269c-141.76 141.794-194.769 318.607-77.104 436.273zM828.067 857.504c108.191 0 195.933-87.73 195.933-195.919 0-76.502-43.907-142.543-107.804-174.795l-117.913-110.295-0.541 91.752c-93.774 14.584-165.599 95.419-165.599 193.337 0 108.189 87.699 195.919 195.923 195.919zM176.328 886.64c12.11 0 24.22-4.614 33.464-13.843l119.798-119.813c18.489-18.5 18.489-48.481 0-66.98l-47.531-47.541-186.762 186.79 47.56 47.543c9.249 9.228 21.361 13.843 33.471 13.843z" />
+<glyph unicode="" glyph-name="printer" d="M320.066 191.88h319.97v-63.994h-319.97zM320.066 319.916h383.964v-64.042h-383.964zM256.035 383.925v-384.061h512.012v384.061zM896.129 626.646c-28.070 0-50.695-22.719-50.695-50.69 0-28.005 22.626-50.673 50.695-50.673 28.002 0 50.633 22.668 50.633 50.673 0 27.971-22.63 50.69-50.633 50.69zM64.008 703.976h896.129c35.381 0 64.008-28.695 64.008-64.010v-384.063c0-35.386-28.626-64.009-64.008-64.009h-128.020v-192.030c0-35.386-28.689-64.008-64.070-64.008h-512.012c-35.378 0-64.008 28.622-64.008 64.008v192.030h-128.019c-35.378 0-64.008 28.622-64.008 64.009v384.063c0 35.314 28.63 64.010 64.008 64.010zM256.037 960h512.007c35.381 0 64.069-28.696 64.069-64.010v-128.020h-64.069v128.020h-512.007v-128.020h-64.007v128.020c0 35.314 28.63 64.010 64.007 64.010z" />
+<glyph unicode="" glyph-name="user" d="M100.898 889.356v-696.084h96.937l0.038 1.365c3.405 61.006 113.105 122.36 206.793 156.259 6.877 2.522 39.762 20.416 21.366 68.625-47.147 48.187-82.771 126.228-82.771 203.019 0 117.624 77.781 179.268 168.739 179.268 90.905 0 169.124-61.644 169.124-179.268 0-76.498-35.834-154.229-82.699-202.52h0.261c-17.998-54.665 10.792-67.646 15.334-69.124 98.324-32.523 208.618-93.392 212.041-156.172l0.040-1.452h97.010v696.084zM30.24 960h963.456v-1024h-963.456z" />
+<glyph unicode="" glyph-name="open" d="M277.804 302.835c12.604 0 22.535-4.736 29.792-14.208s10.886-22.725 10.886-39.759c0-16.347-3.743-29.122-11.229-38.327s-17.608-13.807-30.365-13.807c-12.375 0-22.382 4.736-30.021 14.208s-11.459 22.343-11.459 38.613c0 16.041 3.82 28.931 11.459 38.67s17.952 14.609 30.938 14.609zM421.745 303.523h14.552c19.709 0 29.563-8.441 29.563-25.322 0-17.263-9.854-25.895-29.563-25.895h-14.552zM653.8 331.938v-164.306h34.949v90.288c0 11.916-0.306 20.777-0.917 26.582h0.458c1.528-3.055 4.278-7.6 8.25-13.635l67.72-103.235h37.355v164.306h-34.949v-90.861c0-11.229 0.306-18.753 0.917-22.572h-0.458c-2.521 4.43-5.271 8.899-8.25 13.406l-65.199 100.027zM528.894 331.938v-164.306h98.544v30.020h-61.533v37.582h53.741v30.020h-53.741v36.551h57.751v30.134zM384.734 331.938v-164.306h37.011v56.602h17.646c19.862 0 35.732 5.099 47.61 15.296s17.818 23.546 17.818 40.045c0 34.908-20.702 52.362-62.106 52.362zM278.835 334.688c-24.827 0-44.765-8.020-59.814-24.062s-22.573-37.047-22.573-63.018c0-24.596 7.41-44.552 22.23-59.867s33.994-22.973 57.522-22.973c24.139 0 43.714 7.906 58.725 23.718s22.516 36.627 22.516 62.445c0 25.131-7.238 45.373-21.714 60.727s-33.44 23.030-56.892 23.030zM0 541.472h1024v-554.672h-1024zM521.956 909.28c53.376 0 96.668-43.272 96.668-96.649 0-8.34-1.057-16.433-3.044-24.153l-0.215-0.755 186.251-182.251h-69.914l-143.052 137.242-1.702-1.622c-17.168-15.6-39.973-25.108-64.992-25.108-26.689 0-50.846 10.818-68.331 28.308l-1.372 1.439-111.477-106.947-20.772-33.312h-83.845l191.247 187.177-0.117 0.505c-1.287 6.291-1.963 12.805-1.963 19.477 0 53.377 43.251 96.649 96.628 96.649z" />
+<glyph unicode="" glyph-name="addcsv" d="M507.294 509.536h61.87l24.775-85.183c4.481-15.384 7.874-30.030 10.51-44.642h1.154c2.963 14.972 5.956 28.876 10.080 44.642l23.655 85.183h60.054l-68.325-183.495h-57.027zM428.881 513.66c21.414 0 40.552-4.856 51.794-10.493l-10.119-39.403c-8.267 4.496-24.021 10.491-39.77 10.491-13.899 0-21.774-5.635-21.774-14.975 0-8.631 7.118-13.158 29.62-21.022 34.924-12.040 49.552-29.651 49.911-56.683 0-34.168-27.014-59.304-79.532-59.304-24.018 0-45.44 5.304-59.304 12.751l10.114 40.921c10.544-6.377 32.29-13.887 49.19-13.887 17.262 0 24.38 6.030 24.38 15.418 0 9.337-5.633 13.854-27.017 20.969-37.923 12.804-52.551 33.411-52.156 55.205 0 34.15 29.259 60.013 74.661 60.013zM281.866 513.686c15.023 0 31.525-2.589 43.552-7.115l-9.026-42.403c-6.755 2.998-16.868 5.633-31.891 5.633-30.016 0-49.552-21.429-49.152-51.413 0-33.769 22.5-51.428 50.272-51.428 13.508 0 24.016 2.275 32.649 5.6l6.753-41.988c-10.114-4.532-29.255-8.274-51.030-8.274-59.3 0-97.153 36.029-97.153 93.819 0 53.685 36.732 97.571 105.025 97.571zM743.306 874.582v-88.658h-88.689v-42.042h88.689v-88.693h42.008v88.693h88.692v42.042h-88.692v88.658zM64.522 936.266h517.248c-16.505-17.542-30.441-37.46-41.379-59.188h-416.767v-877.928h439l-0.653 219.388 180.904-0.197v296.925c7.052-0.61 14.162-1.091 21.383-1.091 14.397 0 28.366 1.485 42.037 3.823v-370.869l-188.614-211.053h-553.16zM764.327 960c107.734 0 195.075-87.342 195.075-195.097 0-107.773-87.34-195.146-195.075-195.146-107.805 0-195.143 87.373-195.143 195.146 0 107.755 87.338 195.097 195.143 195.097z" />
+<glyph unicode="" glyph-name="agrement" d="M167.399 282.158h323.415c0 0 5.916-31.909 7.353-37.842h-330.768c-8.671 0-15.672 7.017-15.672 15.688v6.483c0 8.652 7.001 15.67 15.672 15.67zM166.669 403.101h286.113c0.132-1.774 0.017-3.559-0.635-5.28l-12.548-32.574h-272.93c-8.657 0-15.674 7.020-15.674 15.692v6.469c0 8.674 7.018 15.694 15.674 15.694zM164.498 521.836h277.904l3.993-8.972c1.888-4.295 0.969-9.356-2.323-12.716l-16.156-16.154h-263.419c-8.654 0-15.671 7.016-15.671 15.687v6.482c0 8.653 7.018 15.672 15.671 15.672zM742.87 626.071c-99.615 0-180.35-80.744-180.35-180.355 0-99.603 80.734-180.406 180.35-180.406 99.632 0 180.386 80.803 180.386 180.406 0 99.611-80.754 180.355-180.386 180.355zM163.987 639.365h326.827v-33.951c0-1.354-0.266-2.641-0.701-3.878h-326.127c-8.672 0-15.674 7.018-15.674 15.674v6.483c0 8.672 7.001 15.672 15.674 15.672zM742.875 723.684c3.759 0 7.519-1.433 10.393-4.299l28.972-28.939c3.14-3.158 7.869-4.042 11.913-2.239l37.526 16.592c7.435 3.325 16.073-0.082 19.366-7.485l19.533-44.028c1.802-4.042 5.862-6.7 10.325-6.7h48.152c8.106 0 14.672-6.549 14.672-14.686v-41.002c0-4.444 2.755-8.405 6.865-9.992l38.264-14.768c7.585-2.91 11.36-11.448 8.437-18.999l-17.345-44.912c-1.619-4.176-0.617-8.922 2.541-12.079l34.069-34.019c5.747-5.749 5.747-15.071 0-20.819l-29.005-28.972c-3.109-3.108-4.010-7.853-2.206-11.897l16.592-37.477c3.291-7.47-0.050-16.124-7.486-19.415l-43.993-19.515c-4.077-1.805-6.732-5.884-6.732-10.343v-48.088c0-8.152-6.566-14.753-14.672-14.753h-1.653l94.603-227.368c2.038-4.911-2.941-9.792-7.803-7.617l-110.426 48.72c-3.726 1.637-8.021-0.099-9.523-3.827l-45.115-109.69c-2.054-5.047-9.154-5.047-11.261-0.050l-91.812 220.185c-0.382 0.984-0.484 2.036-0.717 3.005-1.989-0.284-3.96-0.25-5.933 0.235l-91.844-220.601c-2.089-4.981-9.207-4.981-11.245 0.032l-45.129 109.69c-1.537 3.71-5.833 5.514-9.557 3.845l-110.424-48.722c-4.88-2.155-9.843 2.723-7.822 7.6l93.452 224.563h-0.135c-8.103 0-14.687 6.601-14.687 14.753v40.97c0 4.428-2.738 8.422-6.866 9.974l-38.228 14.786c-7.602 2.909-11.363 11.43-8.454 18.981l17.327 44.947c1.586 4.159 0.583 8.871-2.559 12.029l-34.051 34.019c-5.714 5.747-5.714 15.070 0 20.819l29.040 29.006c3.090 3.125 3.959 7.903 2.188 11.913l-16.624 37.493c-3.276 7.403 0.049 16.108 7.467 19.415l44.060 19.465c4.078 1.805 6.7 5.848 6.7 10.311v48.17c0 8.137 6.584 14.686 14.687 14.686h41.002c4.396 0 8.39 2.742 9.96 6.884l14.767 38.246c2.924 7.552 11.447 11.328 19.031 8.42l44.93-17.309c4.178-1.654 8.922-0.62 12.080 2.522l34.002 34.036c2.874 2.866 6.633 4.299 10.392 4.299zM163.837 771.753h206.951c8.672 0 15.689-6.999 15.689-15.672v-6.483c0-8.673-7.017-15.674-15.689-15.674h-206.951c-8.672 0-15.691 7.002-15.691 15.674v6.483c0 8.673 7.019 15.672 15.691 15.672zM26.215 955.958h721.289c14.469 0 26.233-11.762 26.233-26.214v-178.013l-15.84 15.805c-3.942 3.927-9.156 6.099-14.72 6.099s-10.778-2.172-14.72-6.081l-22.858-22.891v122.357c0 11.462-9.34 20.785-20.819 20.785h-595.842c-11.462 0-20.784-9.323-20.784-20.785v-752.636c0-11.478 9.322-20.801 20.784-20.801h353.1l-28.353-68.155h-387.471c-14.452 0-26.215 11.765-26.215 26.233v878.084c0 14.452 11.763 26.214 26.215 26.214z" />
+<glyph unicode="" glyph-name="archive" d="M382.656 229.376v-65.376h258.736v65.376zM25.92 276.432h972.224v-340.432h-972.224zM377.248 654.976v-65.36h258.704v65.36zM25.92 698.56h972.224v-354.064h-85.849l-28.506 178.992-614.892-178.992h-242.976zM230.155 960h544.695l183.054-160.745-0.594-35.335h-890.554l-3.332 36.015z" />
+<glyph unicode="" glyph-name="book" d="M218.304 915.376c-36.544 0-66.528-15.872-68.816-51.904h680v-861.232l50.896 41.552-0.224 871.584zM199.152 960h709.568c8.752 0 15.872-7.056 15.92-15.808l0.416-915.424c0 0-0.416-19.792-10.032-29.072-10.288-10.352-85.536-63.696-85.536-63.696l-730.528 0.16v911.392c0 71.904 44.528 112.448 100.192 112.448z" />
+<glyph unicode="" glyph-name="books" d="M388.141 684.389v-69.851h136.965v69.851zM53.72 684.389v-69.851h136.965v69.851zM796.229 768.546l227.965-594.285-210.584-80.797-228.061 594.285zM327.699 802.535h257.848v-709.023h-257.848zM0 802.535h257.848v-709.023h-257.848z" />
+<glyph unicode="" glyph-name="boxcheck-not" d="M54.769 905.18v-914.406h914.319v914.406zM0 960h1024.001v-1024h-1024.001z" />
+<glyph unicode="" glyph-name="boxcheck-ok" d="M759.844 675.892l78.078-89.453-417.686-366.378-234.16 271.422 90.010 77.264 155.903-180.906zM54.758 905.176v-914.467h914.442v914.467zM0 960h1024.144v-1024.048h-1024.144z" />
+<glyph unicode="" glyph-name="boxes" d="M768.12 191.88h256.024v-256.024h-256.024zM384.060 191.88h256.024v-256.024h-256.024zM0 191.88h256.024v-256.024h-256.024zM768.12 575.94h256.024v-256.024h-256.024zM384.060 575.94h256.024v-256.024h-256.024zM0 575.94h256.024v-256.024h-256.024zM768.12 960h256.024v-256.024h-256.024zM384.060 960h256.024v-256.024h-256.024zM0 960h256.024v-256.024h-256.024z" />
+<glyph unicode="" glyph-name="calendar1" d="M559.767 183.959h125.060v-121.123h-125.060zM365.241 183.959h125.012v-121.123h-125.012zM170.715 183.959h125.060v-121.123h-125.060zM744.356 374.453h125.059v-121.075h-125.059zM559.767 374.453h125.060v-121.075h-125.060zM365.241 374.453h125.012v-121.075h-125.012zM170.715 374.453h125.060v-121.075h-125.060zM744.356 568.979h125.059v-121.075h-125.059zM549.83 568.979h125.059v-121.075h-125.059zM355.304 568.979h125.060v-121.075h-125.060zM92.933 696.021v-702.974h838.384v702.974zM35.766 960h952.709v-1024.144h-952.709z" />
+<glyph unicode="" glyph-name="calendar2" d="M783.578 113.1h64.138v-60.297h-64.138zM662.84 113.1h64.138v-60.297h-64.138zM542.149 113.1h64.090v-60.297h-64.090zM421.41 113.1h64.138v-60.297h-64.138zM300.719 113.1h64.138v-60.297h-64.138zM179.98 113.1h64.138v-60.297h-64.138zM783.578 234.751h64.138v-60.297h-64.138zM662.84 234.751h64.138v-60.297h-64.138zM542.149 234.751h64.090v-60.297h-64.090zM421.41 234.751h64.138v-60.297h-64.138zM300.719 234.751h64.138v-60.297h-64.138zM179.98 234.751h64.138v-60.297h-64.138zM783.578 356.45h64.138v-60.345h-64.138zM662.84 356.45h64.138v-60.345h-64.138zM542.149 356.45h64.090v-60.345h-64.090zM421.41 356.45h64.138v-60.345h-64.138zM300.719 356.45h64.138v-60.345h-64.138zM179.98 356.45h64.138v-60.345h-64.138zM783.578 478.101h64.138v-60.393h-64.138zM662.84 478.101h64.138v-60.393h-64.138zM542.149 478.101h64.090v-60.393h-64.090zM421.41 478.101h64.138v-60.393h-64.138zM300.719 478.101h64.138v-60.393h-64.138zM179.98 478.101h64.138v-60.393h-64.138zM783.578 599.752h64.138v-60.393h-64.138zM662.84 599.752h64.138v-60.393h-64.138zM542.149 599.752h64.090v-60.393h-64.090zM421.41 599.752h64.138v-60.393h-64.138zM300.719 599.752h64.138v-60.393h-64.138zM179.98 599.752h64.138v-60.393h-64.138zM113.611 658.207v-668.026h796.688v668.026zM179.994 960h118.829v-115.082h94.894v64.137h226.348v-64.137h99.356v64.137h1.872v50.946h120.744v-50.946h122.578v-973.198h-905.325v973.198h120.704z" />
+<glyph unicode="" glyph-name="code" d="M684.251 763.073l339.893-251.789v-131.2l-339.893-250.662v136.459l222.52 178.772v2.121l-222.52 178.783zM339.941 763.073v-136.519l-222.478-178.771v-2.063l222.478-178.84v-137.458l-339.941 251.719v131.21zM543.108 906.232l92.079-15.94-155.219-900.571-92.020 15.881z" />
+<glyph unicode="" glyph-name="config" d="M381.354 165.487c-19.642-0.212-38.85-9.843-50.465-27.422-18.585-28.127-10.831-66.152 17.31-84.746 28.149-18.599 66.168-10.82 84.753 17.307s10.831 66.152-17.318 84.751c-10.553 6.973-22.495 10.237-34.281 10.11zM376.661 273.15l13.181-49.651 0.336-1.644c9.323-0.632 18.609-2.437 27.696-5.352l1.028 1.556 31.914 40.16 46.674-30.84-25.793-44.44-0.885-1.34c6.284-7.221 11.621-15.067 15.886-23.403l1.693 0.346 50.665 7.304 11.198-54.82-49.358-14.648-1.459-0.298c-0.649-9.365-2.46-18.691-5.399-27.815l1.422-0.939 40.987-30.643-30.851-46.69-45.253 24.544-1.258 0.831c-7.246-6.29-15.115-11.612-23.48-15.89l0.336-1.644 7.296-50.66-54.813-11.204-14.647 49.358-0.308 1.508c-9.343 0.667-18.646 2.494-27.753 5.443l-0.993-1.503-30.656-40.991-46.674 30.84 24.535 45.271 0.92 1.392c-6.245 7.216-11.54 15.045-15.79 23.371l-1.817-0.371-50.967-5.853-11.19 54.816 49.641 13.199 1.693 0.346c0.655 9.308 2.472 18.565 5.397 27.635l-1.637 1.082-40.161 31.894 30.851 46.69 44.427-25.794 1.474-0.974c7.192 6.24 15.006 11.545 23.304 15.802l-0.381 1.867-5.85 50.955zM793.477 432.158c-30.667 0.049-59.902-17.938-72.644-47.871-16.99-39.911 1.652-86.232 41.584-103.231 39.942-17.003 86.252 1.669 103.241 41.58s-1.652 86.232-41.595 103.235c-9.983 4.25-20.364 6.27-30.587 6.286zM747.395 565.87l28.209-59.775 0.807-2.003c11.946 1.365 24.116 1.236 36.294-0.343l0.94 2.207 31.064 58.233 66.229-28.193-22.324-62.229-0.809-1.901c9.63-7.68 18.206-16.37 25.539-25.929l2.063 0.831 62.423 21.007 26.9-66.778-59.064-29.997-1.777-0.716c1.352-12.003 1.227-24.225-0.374-36.455l2.017-0.859 58.987-29.264-28.202-66.251-62.968 20.555-1.785 0.76c-7.71-9.642-16.432-18.205-26.025-25.56l0.807-2.003 20.996-62.419-66.767-26.905-29.996 59.064-0.74 1.837c-11.979-1.325-24.177-1.173-36.387 0.445l-0.908-2.133-29.279-58.993-66.229 28.193 20.539 62.989 0.841 1.975c-9.579 7.683-18.097 16.362-25.409 25.911l-2.213-0.892-63.143-19.241-26.889 66.773 59.759 28.229 2.063 0.831c-1.333 11.932-1.181 24.068 0.414 36.226l-2.323 0.989-58.231 31.039 28.202 66.251 62.213-22.329 2.091-0.89c7.653 9.567 16.31 18.094 25.824 25.409l-0.916 2.274-19.234 63.128zM309.847 776.405c-58.868 0-106.744-47.907-106.744-106.744s47.876-106.744 106.744-106.744c58.884 0 106.759 47.907 106.759 106.744s-47.876 106.744-106.759 106.744zM262.126 960h97.636l5.2-89.524v-2.803c16.099-4.468 31.419-10.758 45.65-18.792l2.133 2.133 66.746 59.382 69.051-69.050-57.779-68.817-1.837-1.837c8.065-14.261 14.402-29.582 18.901-45.696h2.974l89.166-5.184v-97.667l-89.508-7.8h-2.631c-4.5-16.13-10.836-31.45-18.901-45.727l2.071-2.071 59.366-66.746-69.035-69.050-68.817 57.778-1.899 1.9c-14.246-8.018-29.551-14.308-45.65-18.777v-3.145l-5.2-89.181h-97.636l-7.831 89.524v2.912c-16.036 4.5-31.279 10.805-45.478 18.839l-2.289-2.289-68.583-57.56-69.035 69.050 59.584 66.98 2.133 2.133c-8.003 14.184-14.262 29.411-18.73 45.432h-3.425l-89.166 7.8v97.667l89.508 5.184h3.083c4.468 16.006 10.743 31.248 18.73 45.432l-2.351 2.351-57.545 68.568 69.050 69.050 66.964-59.615 2.071-2.071c14.183 8.049 29.442 14.355 45.478 18.855v3.254z" />
+<glyph unicode="" glyph-name="config3" d="M298.566 488.912c-60.501 0-109.67-49.21-109.67-109.71 0-60.42 49.168-109.65 109.67-109.65 60.545 0 109.754 49.23 109.754 109.65 0 60.5-49.21 109.71-109.754 109.71zM801.171 675.101c-10.64-0.231-21.408-2.551-31.72-7.186-41.168-18.461-59.666-67.022-41.168-108.212 18.461-41.168 67.064-59.565 108.253-41.147 41.166 18.583 59.664 67 41.166 108.294-13.846 30.829-44.611 48.943-76.531 48.251zM249.56 677.6h100.332l5.314-91.647v-3.25c16.582-4.562 32.291-11.042 46.937-19.293l1.917 1.939 70.748 59.437 70.98-71-61.043-68.584-2.104-2.146c8.293-14.646 14.792-30.416 19.417-47h2.646l91.999-8v-100.354l-91.646-5.355h-3c-4.626-16.539-11.125-32.29-19.417-46.938l1.854-1.874 59.396-70.73-70.959-70.959-68.582 61-2.208 2.208c-14.646-8.25-30.355-14.707-46.937-19.27v-2.938l-5.314-92h-100.332l-8.062 91.688v3.312c-16.457 4.605-32.144 11.106-46.708 19.355l-2.147-2.107-68.831-61.248-70.958 70.959 59.146 70.479 2.436 2.376c-8.228 14.626-14.686 30.25-19.292 46.687h-3.144l-91.999 5.355v100.354l91.645 8h3.499c4.606 16.502 11.063 32.147 19.292 46.728l-2.229 2.168-61.207 68.834 70.937 71 70.499-59.187 2.354-2.312c14.565 8.208 30.251 14.707 46.708 19.312v3zM846.211 815.2l69.937-26.562-18.688-66.144-0.896-2.292c10.083-7.355 19.291-16.063 27.5-25.855l2 0.939 65.124 22.562 30.665-68.312-60.706-31.644-2.208-0.979c1.915-12.709 2.269-25.353 1.125-37.855l1.896-0.709 62.041-30.060-26.604-69.938-65.332 20.501-2.126 0.813c-7.435-10.105-16.144-19.312-26-27.521l0.856-1.853 22.603-65.124-68.333-30.625-31.665 60.75-0.938 2.062c-12.665-1.939-25.395-2.312-37.895-1.146l-0.709-1.813-30-62.041-69.999 26.563 20.584 65.436 0.77 2.062c-10.062 7.437-19.27 16.229-27.497 26.041l-1.918-0.854-64.29-24.456-30.646 68.266 59.895 33.542 2.312 1c-1.915 12.688-2.269 25.334-1.102 37.833l-2.062 0.773-62.749 28.102 26.604 69.978 66.060-18.687 2.395-0.896c7.44 10.001 16.105 19.146 25.856 27.292l-0.917 2.21-24.502 64.249 68.356 30.728 33.5-59.978 1.062-2.418c12.624 1.916 25.228 2.312 37.643 1.208l0.835 2.105z" />
+<glyph unicode="" glyph-name="creditcard" d="M0 507.989h1022.235c1.716 0 0.91-0.101 0.077-0.152l-0.077-0.003v-277.909c-0.27-70.177-58.074-128.418-128.217-128.18h-767.32c-70.163 0.198-126.864 58.054-126.698 128.18zM128.844 794.287h767.204c70.141-0.144 126.862-55.684 126.673-125.914v-13.232c-3.308 0.437-6.491-0.073-10.007 0h-1011.356v13.232c0.208 70.229 57.241 126.133 127.486 125.914z" />
+<glyph unicode="" glyph-name="dat-export" d="M751.024 722.429l272.897-274.438-272.897-241.919v129.207c0 0-471.281 128.888-589.1-129.207 0 64.52 42.814 387.309 589.1 387.309zM0 857.551h682.643v-136.583h-68.297v68.291h-546.049v-682.587h546.049v68.291h68.297v-136.583h-682.643v750.879z" />
+<glyph unicode="" glyph-name="data-import" d="M434.996 722.48v-129.083c546.17 0 589.004-322.833 589.004-387.333-117.793 258.166-589.004 129.166-589.004 129.166v-129.166l-273.044 241.959zM0 857.6h682.672v-136.541h-68.25v68.291h-546.172v-682.702h546.172v68.291h68.25v-136.539h-682.672v750.951z" />
+<glyph unicode="" glyph-name="data-transfer" d="M631.392 200.288c0-43.386 87.959-78.641 196.402-78.641 108.292 0 196.206 35.255 196.206 78.641v-78.641c0-43.389-87.913-78.447-196.206-78.447-108.443 0-196.402 35.058-196.402 78.447zM0 200.288c0-43.386 87.911-78.444 196.398-78.444 108.443 0 196.402 35.058 196.402 78.444v-78.444c0-43.386-87.958-78.644-196.402-78.644-108.488 0-196.398 35.058-196.398 78.644zM631.392 318.048c0-43.385 87.959-78.439 196.402-78.439 108.292 0 196.206 35.054 196.206 78.439v-78.439c0-43.385-87.913-78.633-196.206-78.633-108.443 0-196.402 35.248-196.402 78.633zM0 318.048c0-43.385 87.911-78.439 196.398-78.439 108.443 0 196.402 35.054 196.402 78.439v-78.439c0-43.385-87.958-78.633-196.402-78.633-108.488 0-196.398 35.248-196.398 78.633zM807.864 493.924c-96.094-4.067-156.883-35.653-156.883-57.917 0-24.194 68.973-59.101 176.816-59.101 107.894 0 176.667 34.907 176.667 59.101 0 22.264-60.842 54.048-156.883 57.917v-57.715c0-10.859-8.926-19.786-19.784-19.786-11.008 0-19.933 8.926-19.933 19.786zM176.467 494.122c-96.094-4.067-156.883-35.851-156.883-58.115 0-24.046 68.921-58.906 176.814-58.906 107.896 0 176.618 34.859 176.618 58.906 0 22.462-60.787 54.048-156.882 58.115v-57.718c0-11.054-8.875-19.981-19.736-19.981-11.056 0-19.931 8.926-19.931 19.981zM891.51 681.2h33.516v-73.186h19.982l-36.64-59.502-36.592 59.502h19.734zM115.038 681.2l36.642-59.651h-19.982v-73.037h-33.518v73.037h-19.733zM196.398 733.904l631.398-0.196c10.858 0 19.784-8.924 19.784-19.782v-200.269c98.966-4.066 176.419-37.189 176.419-77.65v-78.637c0-43.387-87.912-78.442-196.203-78.442-108.442 0-196.4 35.054-196.4 78.442v78.637c0 40.461 77.496 73.584 176.467 77.65v180.534h-591.73v-180.534c98.968-4.066 176.666-37.189 176.666-77.65v-78.637c0-43.387-87.958-78.442-196.402-78.442-108.488 0-196.398 35.054-196.398 78.442v78.637c0 40.461 77.449 73.584 176.467 77.65v200.269c0 5.453 2.131 10.461 5.802 14.131 3.867 3.718 8.874 5.847 14.13 5.847zM568.271 852.8l59.649-36.589-59.649-36.643v19.982h-172.191v33.518h172.191z" />
+<glyph unicode="" glyph-name="date" d="M773.118 183.444h123.592v-95.5h-123.592zM535.399 183.444h195.265v-95.5h-195.265zM314.713 183.444h178.249v-95.5h-178.249zM116.737 183.444h155.523v-95.5h-155.523zM773.118 381.527h123.592v-155.63h-123.592zM535.399 381.527h195.265v-155.63h-195.265zM116.737 381.527h155.523v-155.63h-155.523zM773.118 528.339h123.592v-104.359h-123.592zM535.399 528.339h195.265v-104.359h-195.265zM314.713 528.339h178.249v-104.359h-178.249zM116.737 528.339h155.523v-104.359h-155.523zM74.289 570.791v-525.291h864.869v525.291zM0 783.98h197.971v-71.855c0-52.713 42.822-95.57 95.468-95.57 52.687 0 95.547 42.857 95.547 95.57v71.855h267.373v-71.855c0-52.713 42.862-95.57 95.551-95.57 52.67 0 95.512 42.857 95.512 95.57v71.855h176.625v-803.855h-1024.048zM751.919 915.828c23.495 0 42.449-18.979 42.449-42.404v-161.301c0-23.527-18.954-42.513-42.449-42.513-23.451 0-42.489 18.986-42.489 42.513v161.301c0 23.425 19.038 42.404 42.489 42.404zM293.446 915.828c23.47 0 42.486-18.979 42.486-42.404v-161.301c0-23.527-19.016-42.513-42.486-42.513-23.388 0-42.405 18.986-42.405 42.513v161.301c0 23.425 19.016 42.404 42.405 42.404z" />
+<glyph unicode="" glyph-name="edit2" d="M274.275 170.347h414.239v-59.972h-414.239zM274.275 319.994h274.523v-59.859h-274.523zM538.3 652.597l124.654-118.131-175.794-60.703zM733.506 879.512l132.897-122.607-164.010-177.769-2.757 28.093-43.811 14.927-1.29 29.823-43.576 11.524-5.307 33.636-36.157 4.633zM400.587 882.71h273.469l-74.657-79.878h-167.789v-133.717c0 0-3.401-115.301-131.836-105.273l-141.924-0.586v-527.46c0-11.042 8.943-19.955 19.94-19.955h558.898c11.026 0 19.939 8.914 19.939 19.955v540.494l79.935 80.565v-621.060c0-55.13-44.63-99.775-99.875-99.775h-558.898c-55.127 0-99.757 44.645-99.757 99.775v506.581l79.818 84.218v-0.644l167.553 176.88h-0.5zM824.674 959.976c5.907-0.24 11.417-2.268 15.705-6.204l94.043-86.856c11.524-10.497 9.97-30.759-3.286-45.098l-18.033-19.617-135.567 125.063 18.093 19.588c8.247 8.962 19.198 13.525 29.044 13.125z" />
+<glyph unicode="" glyph-name="editblog" d="M566.991 94.581l24.947-158.581-147.542 68.422zM517.894 361.402h228.958v-47.368h-228.958zM319.878 436.486l212.832-289.239-122.666-90.235-212.761 289.283zM229.507 504.913c18.39-0.372 36.487-7.225 50.633-19.991l-122.601-89.892c-15.254 32.737-5.821 72.669 24.449 94.857 13.254 9.708 28.563 14.605 43.839 15.015 1.228 0.033 2.455 0.037 3.681 0.012zM434.653 526.898h312.2v-47.313h-312.2zM371.173 701.245h375.68v-47.35h-375.68zM162.176 960h539.727l171.727-139.704v-39.344h-0.166v-750.301c0-39.464-32.003-71.441-71.441-71.441h-189.572l-11.262 71.441h200.834v750.301h-59.349c-26.326 0-47.66 21.336-47.66 47.639v59.917h-461.394v-360.274c-1.901 0.115-3.754 0.518-5.678 0.518-21.692 0-42.481-6.815-60.062-19.672-2.067-1.52-3.778-3.35-5.702-5.012v384.44z" />
+<glyph unicode="" glyph-name="filter2" d="M73.446 796.934h879.33l-339.020-393.805v-467.175l-192.302 109.973v366.352zM59.887 960h904.16c11.766 0 21.244-9.626 21.244-21.374v-24.8c0-11.747-9.478-21.374-21.244-21.374h-904.16c-11.766 0-21.244 9.626-21.244 21.374v24.8c0 11.747 9.478 21.374 21.244 21.374z" />
+<glyph unicode="" glyph-name="gift" d="M569.2 485.536h372.048v-514.086c0-19.544-15.876-35.418-35.46-35.418h-336.588zM75.12 485.536h372.016v-549.504h-336.558c-19.583 0-35.458 15.874-35.458 35.418zM569.216 698.704h379.849c19.605 0 35.479-15.874 35.479-35.458v-100.456c0-19.583-15.875-35.415-35.479-35.415h-379.849zM464.88 698.704h86.624v-762.672h-86.624zM67.298 698.704h379.854v-171.328h-379.854c-19.583 0-35.458 15.831-35.458 35.415v100.456c0 19.583 15.875 35.458 35.458 35.458zM508.185 861.328c52.959 0 95.895-32.457 95.895-72.455s-42.936-72.457-95.895-72.457c-52.96 0-95.897 32.458-95.897 72.457s42.936 72.455 95.897 72.455zM905.005 958.925c8.568 0.228 16.538-0.634 23.289-3.134 20.125-7.418 23-17.918 19.709-29.96-4.334-15.792-19.335-34.169-19.855-51.461-0.646-22.918 64.063-79.922 3.854-88.38-68.294-9.585-136.983-17.835-204.816-30.253-30.813-5.666-66.689-12.333-90.481 3.042 5.542 9.168 8.73 19.335 8.73 30.086 0 20.71-11.563 39.333-29.98 52.502 10.875 24.501 38.855 37.209 71.543 49.336 47.020 17.376 93.251 37.92 141.543 51.503 19.672 5.532 50.759 16.031 76.463 16.717zM104.65 959.999c73.635-0.274 208.913-47.197 220.7-52.841 6.686-3.208 79.957-41.46 71.394-48.417-27.916-22.626-31.916-52.46-17.374-83.459 6.707-14.378-85.77-12.376-94.248-12.044-45.084 1.998-90.959-4.376-135.624 3.79-17.125 3.125-51.687 7.459-64.583 20.377-23.666 23.625 0.167 58.085-2.25 85.668-1.541 17.211-17.541 34.627-22.833 50.126-9.388 27.41 11.347 36.924 44.817 36.8z" />
+<glyph unicode="" glyph-name="help-box" d="M455.927 211.275h83.341v-90.926h-83.341zM505.226 775.459c55.506 0 98.454-15.123 128.766-45.504 32.755-32.757 49.203-74.451 49.203-124.9 0-42.945-15.19-79.509-45.449-109.83-17.686-17.687-41.69-41.691-72.011-71.889-22.626-22.751-34.004-56.881-34.004-102.268h-68.201c0 55.512 8.814 97.208 26.506 124.899 12.631 20.188 36.634 48.009 71.944 83.389 20.197 20.13 30.322 44.135 30.322 71.948 0 35.259-8.877 61.831-26.567 79.514-15.127 15.135-36.505 22.695-64.325 22.695-22.748 0-41.689-7.56-56.758-22.695-25.252-25.314-37.881-63.134-37.881-113.645h-87.137c0 65.637 21.502 119.966 64.387 162.782 30.315 30.38 70.692 45.504 121.205 45.504zM512.072 859.791c-227.531 0-411.927-184.398-411.927-411.865 0-227.476 184.396-411.875 411.927-411.875 227.407 0 411.805 184.399 411.805 411.875 0 227.467-184.398 411.865-411.805 411.865zM512.072 960c282.288 0 512.072-229.723 512.072-512.074 0-282.357-229.784-512.070-512.072-512.070-282.415 0-512.072 229.713-512.072 512.070 0 282.351 229.657 512.074 512.072 512.074z" />
+<glyph unicode="" glyph-name="help-important" d="M507.315 298.77c19.908 0 36.064-16.138 36.064-35.934 0-19.937-16.156-36.055-36.064-36.055-19.836 0-35.924 16.118-35.924 36.055 0 19.796 16.089 35.934 35.924 35.934zM507.39 669.173c26.31 0 47.677-13.060 47.677-29.237l-15.248-275.861c0-17.798-14.468-32.436-32.429-32.436-17.967 0-32.377 14.639-32.377 32.436l-15.25 275.861c0 16.178 21.311 29.237 47.627 29.237zM507.416 748.672c-166.065 0-300.801-134.612-300.801-300.725 0-166.050 134.736-300.744 300.801-300.744 166.112 0 300.798 134.694 300.798 300.744 0 166.113-134.685 300.725-300.798 300.725zM887.833 793.306c84.375-90.694 136.12-212.047 136.12-345.359 0-133.251-51.746-254.604-136.12-345.238l-48.497 45.137c73.258 78.675 118.123 184.109 118.123 300.101 0 115.993-44.865 221.488-118.123 300.162zM136.12 793.306l48.498-45.197c-73.256-78.675-118.063-184.169-118.063-300.162 0-115.992 44.807-221.425 118.063-300.101l-48.498-45.137c-84.373 90.634-136.12 211.987-136.12 345.238 0 133.312 51.747 254.665 136.12 345.359zM507.416 811.169c200.301 0 363.175-162.912 363.175-363.222 0-200.249-162.875-363.101-363.175-363.101-200.243 0-363.178 162.852-363.178 363.101 0 200.31 162.935 363.222 363.178 363.222z" />
+<glyph unicode="" glyph-name="home" d="M508.323 698.153l350.585-312.937v-401.961c-0.233-15.248-10.293-24.915-18.465-29.463-8.645-4.865-17.965-6.908-27.969-6.971h-186.721c-6.423 0-12.71 2.505-17.29 6.971-4.506 4.401-7.102 10.593-7.102 16.868v193.335h-186.046v-193.335c0-6.276-2.627-12.467-7.139-16.868-4.576-4.466-10.863-6.971-17.285-6.971h-186.725c-9.934 0.063-19.317 2.106-27.93 6.971-8.178 4.548-18.261 14.216-18.503 29.463v401.961zM508.361 949.244c15.896 0 31.788-5.623 44.356-16.869l442.591-395.089c26.783-23.905 28.641-64.445 4.128-90.622-24.546-26.094-66.109-27.883-92.887-4l-398.227 355.472-398.227-355.472c-12.652-11.248-28.52-16.807-44.299-16.807-17.849 0-35.582 7.011-48.554 20.806l-0.058 0.105c-24.424 26.073-22.608 66.656 4.154 90.517l442.648 395.089c12.581 11.246 28.48 16.869 44.376 16.869z" />
+<glyph unicode="" glyph-name="image" d="M307.966 555.040l74.207-75.752 44.832 24.751 180.834-180.857 125.164 63.377 173.125-85.022v-160.753h-788.288v227.232zM659.088 585.44h20.88l-6.169-36.32h-8.499zM741.090 619.184l21.294-30.060-6-6.020-30.048 21.31zM600.798 619.184l14.754-14.77-30.048-21.31-6 6.020zM757.76 685.648l36.336-6.189v-8.502l-36.336-6.189zM581.552 685.648v-20.88l-36.336 6.189v8.502zM668.093 737.408c34.164 0 61.827-27.664 61.827-61.805 0-34.142-27.664-61.827-61.827-61.827-34.123 0-61.789 27.685-61.789 61.827 0 34.141 27.666 61.805 61.789 61.805zM754.053 765.248l6.043-6-21.332-30.064-14.748 14.751zM583.17 765.248l30.094-21.313-14.755-14.751-21.341 30.064zM665.804 799.248h8.496l6.165-36.336h-20.864zM73.045 884.771v-781.062h871.753v781.062zM1.92 960h1020.128v-1024h-1020.128z" />
+<glyph unicode="" glyph-name="info-box" d="M558.501 585.573l8.812-5.999c-3.401-40.465-5.090-91.863-5.090-154.179v-104.64c0-6.812 0.622-28.661 1.84-65.527 1.25-36.877 2.559-58.407 3.94-64.593 1.412-6.151 3.47-10.653 6.25-13.399 2.78-2.781 6.19-4.572 10.189-5.353 4.030-0.78 20.68-2.089 49.999-3.93l4.181-3.686v-43.189l-3.712-4.159c-38.598 2.468-75.786 3.689-111.566 3.689-35.528 0-72.556-1.221-111.145-3.689l-4.159 4.159v43.189l4.159 3.686c29.929 1.842 46.838 3.241 50.72 4.181 3.84 0.911 7.25 2.849 10.179 5.781 2.909 2.938 4.938 7.409 5.999 13.407 1.1 6.031 2.352 25.94 3.719 59.746 1.412 33.779 2.061 59.338 2.061 76.615v91.214c0 12.352-0.59 29.188-1.84 50.466-1.22 21.309-2.219 34.41-3 39.348-0.78 4.929-3.192 8.589-7.19 10.869-4 2.348-12.029 3.499-24.059 3.499l-38.908 0.439-4.15 3.723v19.896l3.691 3.72c58.957 7.102 108.644 18.658 149.081 34.717zM519.161 792.538c14.501 0 26.84-5.093 37.031-15.278 10.179-10.192 15.278-22.528 15.278-37.026 0-14.222-5.099-26.41-15.278-36.599-10.191-10.178-22.53-15.248-37.031-15.248-14.189 0-26.468 5.002-36.819 15.037-10.34 10.029-15.498 22.279-15.498 36.809 0 14.498 5.158 26.834 15.498 37.026 10.351 10.186 22.63 15.278 36.819 15.278zM109.277 878.064v-860.113h805.493v860.113zM109.277 960h805.493c45.249 0 81.937-36.688 81.937-81.936v-860.113c0-45.218-36.689-81.905-81.937-81.905h-805.493c-45.249 0-81.937 36.687-81.937 81.905v860.113c0 45.247 36.688 81.936 81.937 81.936z" />
+<glyph unicode="" glyph-name="laptop" d="M368.977 259.875l-98.63-12.88 71.641-11.873 94.66 12.835zM399.393 327.107l-196.069-22.998 456.381-84.479 215.176 40.307zM940.513 663.782l-67.169-349.152-410.874 58.137 68.905 280.211zM978.968 694.899l-473.187-12.482-82.305-334.593 475.824-67.319zM1023.936 729.287l-94.324-488.104-17.226-3.616 0.042-0.042-364.001-70.764-548.427 105.99v25.775l388.774 42.419 92.568 374.105z" />
+<glyph unicode="" glyph-name="laptop1" d="M335.976 196.112l-11.208-130.736h374.464l-13.998 130.736zM121.876 330.592h773.263c13.917 0 25.21-11.291 25.21-25.209l103.668-317.519c0-13.915-11.314-25.208-25.231-25.208l-973.567 0.938c-13.927 0-25.219 11.272-25.219 25.208l96.655 316.581c0 13.918 11.292 25.209 25.22 25.209zM168.336 862.896v-448.24h687.344v448.24zM117.743 932.4h788.517c14.448 0 26.14-11.711 26.14-26.147v-541.955c0-14.457-11.692-26.17-26.14-26.17h-788.517c-14.439 0-26.143 11.713-26.143 26.17v541.955c0 14.435 11.704 26.147 26.143 26.147z" />
+<glyph unicode="" glyph-name="locationmark" d="M347.641 194.294c7.673-10.772 15.253-21.385 22.561-31.306-35.154-20.427-57.603-47.682-57.603-76.8 0-59.63 93.225-111.948 199.47-111.948s199.421 52.318 199.421 111.948c0 29.118-22.451 56.373-57.539 76.8 7.246 9.92 14.873 20.533 22.5 31.306 45.017-27.357 73.281-65.548 73.281-108.106 0-82.932-106.403-150.188-237.663-150.188-131.314 0-237.719 67.256-237.719 150.188 0 42.557 28.276 80.798 73.291 108.106zM512.015 783.831c54.188 0 98.084-43.836 98.084-98.016 0-54.183-43.896-98.018-98.084-98.018-54.137 0-98.032 43.836-98.032 98.018 0 54.18 43.895 98.016 98.032 98.016zM512.012 856.641c-94.349 0-170.83-76.424-170.83-170.823 0-94.346 76.481-170.822 170.83-170.822 94.406 0 170.884 76.476 170.884 170.822 0 94.399-76.477 170.823-170.884 170.823zM512.064 960c174.083 0 315.205-141.118 315.205-315.248 0-174.078-315.205-558.552-315.205-558.552s-315.252 384.474-315.252 558.552c0 174.13 141.117 315.248 315.252 315.248z" />
+<glyph unicode="" glyph-name="mailsend" d="M27.191 706.781c-25.772-241.871 124.762-457.551 339.243-483.692 130.086-15.899 254.021 41.716 338.899 143.179l-99.362 77.659 417.947 168.715-62.835-446.319-94.675 73.987c-102.159-126.221-264.94-198.635-437.993-177.524-267.144 32.56-457.349 275.497-424.787 542.664 4.313 35.279 12.355 69.116 23.562 101.329zM119.785 802.29l301.541-301.517c9.96-9.956 26.039-9.956 35.971 0l300.424 300.37c6.124-4.049 10.197-10.971 10.197-18.876v-222.443l-254.765-102.9 107.427-83.946h-452.099c-22.788 22.312-43.559 47.202-61.051 74.628v334.661c0 8.758 5.061 16.291 12.355 20.023zM154.8 854.39h569.177c-0.319-5.431-2.529-10.81-6.738-14.938l-263.022-261.552c-8.813-8.573-22.738-8.625-31.099-0.080l-262.357 260.383c-4.368 4.42-6.284 10.331-5.962 16.186z" />
+<glyph unicode="" glyph-name="msstore" d="M409.424 357.12l0.469-151.774 206.107-29.042v180.816zM240.544 357.12v-130.678l160.208-21.082v151.76zM398.643 521.568l-155.99-23.896-2.813-132.104h160.208zM616.464 549.424l-206.576-26.001v-157.151h206.576zM797.756 758.576l148.020-50.584v-715.764l-146.156-56.228-721.38 140.539v548.995zM496.783 895.664l3.793-21.813c-30.845-13.688-60.171-36.646-56.943-74.167v-83.709l-22.513-4.166v103.772c0 0 2.252 52.438 75.663 80.084zM598.542 912.224c0 0 75.472-7.937 82.098-87.394v-65.041l-21.188-3.917v75.583c0 0-7.94 67.541-92.692 60.916 0 0-2.178-0.271-5.918-0.896l-2.874 18.167c12.396 1.437 25.824 2.354 40.574 2.583zM457.674 960c0 0 80.105-8.417 87.126-92.752v-132.586l-20.167-3.73h-2.312v143.357c0 0-8.438 71.669-98.377 64.647 0 0-137.72-16.875-130.688-98.377v-152.4l-23.896-4.416v173.67c0 0 4.218 99.794 188.314 102.586z" />
+<glyph unicode="" glyph-name="ok" d="M901.309 763.915l122.685-123.959-656.135-507.863-367.859 376.196 141.449 107.23 244.793-250.839z" />
+<glyph unicode="" glyph-name="pc" d="M733.791 206.687c-24.045-1.007-43.562-25.904-43.562-55.682 0-29.759 19.517-53.082 43.562-52.077 24.066 0.988 43.583 25.908 43.583 55.687 0 29.732-19.517 53.057-43.583 52.072zM725.783 323.154c-15.207-0.615-27.524-16.368-27.524-35.205 0-18.818 12.317-33.543 27.524-32.931 15.229 0.637 27.589 16.39 27.589 35.205 0 18.818-12.36 33.563-27.589 32.931zM166.106 344.351v-101.584l90.408-40.653v109.727zM787.832 570.544l-201.901-5.864 0.743-85.439 202.689 9.037zM187.417 637.953l-21.311-68.064 20.305-78.222h41.638l16.256 74.15-16.256 72.136zM586.674 715.977v-101.893l282.374 2.428v89.050zM586.062 861.608v-101.893l282.986-15.666v97.102zM518.083 960l384.025-32.009v-928.874l-384.025-63.168zM493.298 960v-1024.050l-371.389 205.733v737.537z" />
+<glyph unicode="" glyph-name="pc-datatransfer" d="M614.364 395.61v-214.028h338.216v214.028zM71.424 804.67v-214.069h338.216v214.069zM0 867.337h481.018v-184.968h302.406v-224.051h240.58v-339.401h-175.444l-0.046-42.411h71.329v-47.841h-272.693v47.841h71.232l0.048 42.411h-175.444v339.401h176.069v167.49h-238.036v-97.874h-175.397l-0.047-42.368h71.281v-47.884h-272.742v47.884h71.331l0.046 42.368h-175.49z" />
+<glyph unicode="" glyph-name="pc-mac" d="M432.304 112.864h159.373c21.749 0 39.395-17.602 39.395-39.374v-39.374l77.857-0.003c21.75 0 39.375-17.625 39.375-39.394v-39.374h-472.608v39.374c0 21.769 17.636 39.394 39.385 39.394h77.847v39.378c0 21.773 17.625 39.374 39.376 39.374zM512.013 307.84c-31.62 0-57.245-25.626-57.245-57.23 0-31.626 25.624-57.25 57.245-57.25 31.601 0 57.203 25.624 57.203 57.25 0 31.605-25.602 57.23-57.203 57.23zM585.056 700.678c23.917 0 49.209-13.038 67.294-35.539-59.169-32.417-49.545-116.917 10.226-139.522-8.229-18.249-12.144-26.395-22.77-42.499-14.749-22.501-35.628-50.582-61.417-50.769-22.959-0.208-28.834 14.957-60.001 14.729-31.125-0.168-37.668-15-60.585-14.773-25.833 0.23-45.585 25.542-60.377 47.999-41.311 62.999-45.699 136.834-20.167 176.103 18.125 27.894 46.751 44.23 73.627 44.23 27.333 0 44.543-15.024 67.168-15.024 21.959 0 35.335 15.062 67.003 15.062zM578.118 782.72c3.144-21.272-5.605-42.105-17.063-56.875-12.335-15.856-33.543-28.081-54.043-27.436-3.75 20.355 5.874 41.355 17.5 55.499 12.832 15.541 34.791 27.541 53.606 28.812zM118.154 861.072c-21.698 0-39.386-17.707-39.386-39.395v-433.229c0-21.688 17.687-39.376 39.386-39.376h787.688c21.706 0 39.374 17.688 39.374 39.376v433.229c0 21.688-17.669 39.395-39.374 39.395zM78.772 940.72h866.453c43.499 0 78.791-35.272 78.791-78.772v-630.106c0-43.499-35.291-78.77-78.791-78.77h-866.453c-43.498 0-78.772 35.271-78.772 78.77v630.106c0 43.5 35.274 78.772 78.772 78.772z" />
+<glyph unicode="" glyph-name="pc-windows" d="M236.966 33.696h550.062c21.646 0 39.291-17.648 39.291-39.273v-39.287h-628.624v39.287c0 0 17.646 39.273 39.27 39.273zM917.474 258.64c-15.688 0-28.418-12.75-28.418-28.48s12.73-28.48 28.418-28.48c15.73 0 28.478 12.749 28.478 28.48s-12.749 28.48-28.478 28.48zM519.666 562.511c36.604-24.667 74.146-42.791 160.274-13.312l-40.25-139.854c-84.483-35-125.086-15.206-161.754 9.669zM419.742 604.225c32.918-0.48 56.111-12.997 77.82-27.715l-42.189-145.060c-36.687 24.664-76.604 44.999-161.229 9.976l41.25 143.499 0.48 0.23c34.269 14.092 61.345 19.398 83.868 19.070zM568.209 731.259c36.564-24.71 77.167-44.273 161.647-9.398l-41.584-143.998c-81.041-36.227-125.168-15.937-161.688 8.856zM463.094 774.863c35.773 0.561 60.231-13 83.135-28.481l-41.666-143.747c-22.021 14.851-45.793 28.788-79.502 29.019-22.229 0.189-48.727-6.144-82.353-20.019l41.666 144.331c31.719 13.14 57.256 18.561 78.72 18.897zM119.1 858.8c-21.646 0-39.292-17.647-39.292-39.293v-471.478c0-21.645 17.647-39.293 39.292-39.293h785.8c21.647 0 39.292 17.648 39.292 39.293v471.478c0 21.646-17.645 39.293-39.292 39.293zM39.292 940.8h945.417c21.709 0 39.291-17.584 39.291-39.293v-709.686c0-21.71-17.582-39.293-39.291-39.293h-338.013l0.547-0.901c3.024-5.567 4.741-11.951 4.741-18.741v-11.437c0-21.71-17.586-39.274-39.292-39.274h-201.382c-21.709 0-39.294 17.563-39.294 39.274v11.437c0 6.79 1.717 13.173 4.741 18.741l0.547 0.901h-338.012c-21.728 0-39.292 17.582-39.292 39.293v709.686c0 21.709 17.564 39.293 39.292 39.293z" />
+<glyph unicode="" glyph-name="rndcheck-not" d="M102.028 909.967c-28.698 0-51.995-23.297-51.995-52.076v-819.786c0-28.777 23.297-52.073 51.995-52.073h819.943c28.7 0 51.994 23.295 51.994 52.073v819.786c0 28.779-23.294 52.076-51.994 52.076zM103.709 960h816.581c57.24 0 103.71-46.552 103.71-103.709v-816.583c0-57.159-46.47-103.708-103.71-103.708h-816.581c-57.238 0-103.709 46.549-103.709 103.708v816.583c0 57.157 46.471 103.709 103.709 103.709z" />
+<glyph unicode="" glyph-name="rndcheck-ok" d="M738.661 656.323l71.412-81.779-381.889-334.986-214.096 248.151 82.33 70.728 142.483-165.486zM102.083 909.962c-28.745 0-52.044-23.299-52.044-52.071v-819.9c0-28.77 23.299-52.072 52.044-52.072h819.955c28.746 0 52.044 23.302 52.044 52.072v819.9c0 28.772-23.298 52.071-52.044 52.071zM103.698 960h816.723c57.18 0 103.7-46.549 103.7-103.727v-816.666c0-57.184-46.52-103.727-103.7-103.727h-816.723c-57.178 0-103.698 46.544-103.698 103.727v816.666c0 57.178 46.52 103.727 103.698 103.727z" />
+<glyph unicode="" glyph-name="sale" d="M482.645 428.889v-12.534c0-11.389-3.407-20.83-10.136-28.275-6.811-7.445-15.615-11.184-26.375-11.184-7.725 0-13.915 2.088-18.481 6.274-4.488 4.171-6.812 9.552-6.812 16.083 0 14.432 9.386 22.842 27.995 25.273zM769.582 492.704c21.599 0 32.357-13.331 32.357-39.997h-68.538c1.455 11.391 5.565 20.903 12.295 28.545 6.731 7.641 14.706 11.451 23.886 11.451zM769.996 531.435c-26.253 0-48.31-9.034-66.252-27.090-17.946-18.067-26.915-42.552-26.915-73.453 0-29.82 8.345-53.060 24.92-69.715 16.616-16.665 40.002-25.003 69.994-25.003 27.539 0 49.927 4.6 67.166 13.81v41.461c-15.536-9.71-33.565-14.549-54.001-14.549-32.191 0-49.223 13.52-51.133 40.538h121.456v24.195c0 27.63-7.435 49.508-22.262 65.612-14.872 16.137-35.849 24.194-62.973 24.194zM457.058 531.435c-11.38 0-24.049-1.578-37.922-4.734-13.915-3.158-24.839-6.792-32.771-10.903v-43.269c19.937 13.208 41.036 19.803 63.176 19.803 22.138 0 33.104-10.167 33.104-30.54l-50.508-6.728c-42.782-5.565-64.214-26.417-64.214-62.54 0-17.070 5.192-30.745 15.575-40.994 10.343-10.239 24.588-15.357 42.616-15.357 24.505 0 42.99 10.424 55.451 31.265h0.788v-26.728h54.29v111.26c0 52.977-26.544 79.465-79.585 79.465zM267.981 605.811c-13.832 0-26.918-1.485-39.296-4.467-12.377-2.958-23.219-7.601-32.65-13.904-9.387-6.301-16.78-14.329-22.304-24.080-5.4-9.762-8.184-21.422-8.184-35.005 0-17.332 5.027-32.118 14.996-44.362 10.052-12.243 25.213-22.617 45.567-31.101 8.058-3.27 15.493-6.481 22.387-9.636 6.855-3.147 12.921-6.418 17.946-9.805 5.026-3.404 8.973-7.091 11.88-11.101 2.865-4.007 4.363-8.545 4.363-13.634 0-3.747-0.958-7.248-2.701-10.468-1.869-3.206-4.568-5.989-8.307-8.347-3.696-2.359-8.266-4.217-13.832-5.557-5.483-1.329-12.006-1.992-19.358-1.992-12.586 0-25.046 2.211-37.423 6.635-12.381 4.434-23.844 11.069-34.354 19.906v-58.183c9.43-4.849 20.561-8.482 33.482-10.904 12.917-2.42 26.541-3.633 40.872-3.633 13.915 0 27.166 1.329 39.67 3.997 12.626 2.67 23.591 7.063 33.064 13.178 9.428 6.126 16.904 14.113 22.427 23.997 5.485 9.888 8.267 22.109 8.267 36.647 0 10.54-1.538 19.791-4.734 27.715-3.158 7.954-7.726 15.017-13.625 21.184-5.941 6.189-13.044 11.736-21.35 16.646-8.35 4.913-17.695 9.542-28.12 13.904-7.604 3.158-14.498 6.21-20.521 9.189-6.023 2.961-11.214 6.004-15.494 9.098-4.237 3.074-7.478 6.355-9.802 9.803-2.327 3.458-3.407 7.362-3.407 11.734 0 3.988 0.997 7.601 3.073 10.81 2.035 3.218 4.986 5.981 8.681 8.286 3.781 2.295 8.35 4.082 13.833 5.359 5.441 1.265 11.547 1.91 18.193 1.91 4.86 0 9.968-0.374 15.411-1.099 5.317-0.716 10.76-1.84 16.241-3.365 5.4-1.516 10.757-3.428 15.95-5.733 5.069-2.294 9.885-4.964 14.204-7.986v54.373c-8.805 3.376-18.483 5.898-28.991 7.54-10.469 1.618-22.515 2.45-36.055 2.45zM582.117 616.354v-275.651h57.5v275.651zM625.263 954.894c9.98 0.12 19.785-4.458 26.096-12.904l67.454-89.873 112.276-4.426c15.325-0.602 28.077-11.92 30.487-27.019l17.944-110.924 97.402-56.106c13.21-7.632 19.233-23.571 14.373-38.098l-35.682-106.54 60.188-94.901c8.224-12.92 6.149-29.865-4.943-40.469l-81.079-77.745 9.138-111.973c1.246-15.285-8.431-29.283-23.136-33.541l-107.912-31.142-44.028-103.384c-5.94-14.124-21.102-22.171-36.055-18.961l-110.070 22.553-86.937-71.131c-5.9-4.839-13.168-7.268-20.354-7.268-7.27 0-14.452 2.429-20.435 7.268l-86.936 71.131-110.114-22.553c-14.912-3.251-30.072 4.881-36.012 18.961l-43.946 103.384-107.912 31.142c-14.787 4.259-24.465 18.256-23.219 33.541l9.138 111.973-81.079 77.745c-11.090 10.604-13.083 27.549-4.901 40.469l60.104 94.901-35.639 106.54c-4.86 14.527 1.163 30.466 14.455 38.098l97.322 56.106 17.942 110.924c2.408 15.099 15.161 26.417 30.489 27.019l112.273 4.426 67.456 89.873c9.179 12.243 25.753 16.345 39.502 9.751l101.514-48.255 101.433 48.255c4.297 2.074 8.87 3.099 13.406 3.153z" />
+<glyph unicode="" glyph-name="settings-bars" d="M764.252 285.696v-133.021h189.598v133.021zM70.060 285.715v-133.017h189.595v133.017zM420.167 505.934v-133.019h189.674v133.019zM810.134 960h97.828v-637.611h82.576v-206.406h-82.576v-178.158h-97.828v178.158h-82.581v206.406h82.581zM466.112 960h97.84v-417.37h82.517v-206.407h-82.517v-400.367h-97.84v400.367h-82.581v206.407h82.581zM116.005 960h97.775v-637.593h82.57v-206.401h-82.57v-180.15h-97.775v180.15h-82.64v206.401h82.64z" />
+<glyph unicode="" glyph-name="shop" d="M675.041 184.16c54.269 0 98.415-45.251 98.415-100.877 0-55.616-44.146-100.867-98.415-100.867-54.301 0-98.497 45.251-98.497 100.867 0 55.626 44.196 100.877 98.497 100.877zM201.965 184.16c54.274 0 98.419-45.251 98.419-100.877 0-55.616-44.145-100.867-98.419-100.867-54.24 0-98.365 45.251-98.365 100.867 0 55.626 44.124 100.877 98.365 100.877zM675.23 465.57c-19.584 0-36.136-14.043-39.354-33.374l-13.231-79.96c-1.467-8.79 1.054-17.789 6.886-24.654 6.219-7.354 15.418-11.573 25.218-11.573h5.022c19.282 0 36.188 12.792 41.125 31.114l2.904 10.854c5.243 19.261 11.794 43.469 18.96 72.074 2.094 8.397 0.23 17.166-5.134 24.043-5.614 7.186-14.447 11.477-23.69 11.477zM514.384 465.57c-19.383 0-35.165-15.77-35.165-35.146v-84.115c0-16.707 13.73-30.301 30.573-30.301 16.635 0 30.709 12.021 33.448 28.592l14.042 84.752c1.499 9.042-1.051 18.238-6.958 25.229-5.949 6.981-14.605 10.989-23.762 10.989zM354.736 465.57c-9.155 0-17.821-4.008-23.759-10.989-5.906-6.99-8.458-16.187-6.958-25.219l13.915-84.749c2.742-16.574 16.835-28.605 33.511-28.605 16.824 0 30.533 13.605 30.533 30.323v84.093c0 19.376-15.781 35.146-35.165 35.146zM183.028 465.57c-9.144 0-17.626-4.125-23.237-11.342-5.605-7.178-7.564-16.376-5.334-25.21 7.123-28.418 13.644-52.49 18.822-71.603l2.363-8.782c5.168-19.208 21.688-32.624 40.149-32.624h13.040c8.73 0 17.011 3.843 22.707 10.562 5.981 7.062 8.542 16.419 7.013 25.666l-13.232 79.96c-3.208 19.331-19.747 33.374-39.354 33.374zM710.22 687.863c-19.227 0-35.48-14.030-38.685-33.376l-12.094-73.25c-1.491-9.042 1.042-18.248 6.968-25.229 5.936-6.978 14.584-10.99 23.739-10.99h27.104c19.458 0 36.325 12.854 40.991 31.261 5.333 21.146 10.406 39.822 14.895 56.387l4.877 18.102c2.363 8.802 0.499 18.010-5.074 25.283-5.781 7.499-14.562 11.811-24.093 11.811zM513.864 687.863c-19.093 0-34.645-15.771-34.645-35.157v-72.543c0-19.374 15.783-35.146 35.165-35.146h26.981c19.603 0 36.157 14.032 39.365 33.346l12.187 73.269c1.467 8.875-1.030 17.907-6.875 24.79-6.155 7.274-15.227 11.44-24.875 11.44zM320.135 687.863c-9.637 0-18.688-4.166-24.856-11.44-5.843-6.883-8.365-15.934-6.874-24.79l12.197-73.269c3.19-19.314 19.751-33.346 39.367-33.346h26.845c19.384 0 35.165 15.771 35.165 35.146v72.543c0 19.386-15.512 35.157-34.573 35.157zM127.082 687.863c-9.326 0-18.211-4.342-23.793-11.616-5.302-6.906-7.073-15.654-4.824-24.019l5.333-19.75c4.398-16.208 9.366-34.45 14.595-55.032 4.874-19.093 21.854-32.427 41.304-32.427h31.469c9.174 0 17.832 4.013 23.759 10.99 5.928 6.981 8.459 16.187 6.979 25.229l-12.134 73.25c-3.178 19.346-20 33.376-39.97 33.376zM890.503 913.52l99.273-0.344c18.875-0.043 34.24-15.459 34.24-34.323s-15.344-34.198-34.199-34.198h-54.24c-19.595 0-36.532-13.293-41.208-32.314l-130.064-531.104c-6.438-26.291-29.824-44.645-56.885-44.645h-537.891c-27.083 0-50.594 18.342-57.178 44.615l-111.365 445.646c-2.447 9.792-0.282 19.96 5.896 27.906 6.219 7.938 15.563 12.491 25.656 12.491h741.183c19.563 0 36.594 13.217 41.439 32.154l17.875 69.688c6.707 26.158 30.259 44.428 57.468 44.428z" />
+<glyph unicode="" glyph-name="shop3" d="M231.45 80.224c39.711 0 71.942-32.217 71.942-71.842 0-39.707-32.231-71.822-71.942-71.822-39.523 0-71.754 32.115-71.754 71.822 0 39.625 32.231 71.842 71.754 71.842zM469.339 80.224c39.521 0 71.749-32.217 71.749-71.842 0-39.707-32.228-71.822-71.749-71.822-39.706 0-71.915 32.115-71.915 71.822 0 39.625 32.209 71.842 71.915 71.842zM475.264 398.752v-71.132h65.494c1.541 0 2.938 0.522 4.333 1.312l21.903 69.82zM316.784 398.752v-71.132h106.928v71.132zM192.76 398.752l33.12-71.132h39.352v71.132zM475.264 517.616v-67.392h107.877l21.142 67.392zM316.784 517.616v-67.392h106.928v67.392zM137.416 517.616l31.379-67.392h96.438v67.392zM475.264 640.298v-71.146h145.186l18.849 60.083c1.397 4.365 2.272 8.011 2.792 11.064zM316.784 640.298v-71.146h106.928v71.146zM82.025 640.298c0.52-2.792 1.375-5.926 2.604-9.312l28.791-61.835h151.812v71.146zM847.078 959.44h137.417c21.938 0 39.522-17.68 39.522-39.616 0-21.864-17.584-39.624-39.522-39.624h-137.417c-32.395 0-43-6.010-55.563-48.677-13.229-45.189-185.458-631.483-185.458-631.483-0.354-1.304-0.875-2.614-1.395-3.834-1.75-4.437-45.647-108.573-155.522-108.573h-310.501c-21.938 0-39.709 17.762-39.709 39.616s17.771 39.613 39.709 39.613h310.501c52.083 0 77.335 48.939 81.688 57.991 1.031 3.54 3.155 10.797 6.183 21.133l0.037 0.127h-321.291c-40.73 0-59.709 34.229-63.543 47.021l-142.293 305.364c-21.958 52.862-11.146 123.215 70.021 123.215 91.417 0 539.171 0 575.233 0 5.658 0 11.715-0.68 17.809-2.164l2.85-0.77 0.565 1.921c20.32 69.132 35.573 120.978 39.2 133.197 15.333 52.25 43.019 105.544 131.479 105.544z" />
+<glyph unicode="" glyph-name="shoppingcard" d="M572.606 148.691c32.177 0 58.388-26.226 58.388-58.473 0-32.311-26.211-58.452-58.388-58.452-32.306 0-58.519 26.14-58.519 58.452 0 32.247 26.213 58.473 58.519 58.473zM378.999 148.691c32.31 0 58.545-26.226 58.545-58.473 0-32.311-26.235-58.452-58.545-58.452-32.159 0-58.396 26.14-58.396 58.452 0 32.247 26.237 58.473 58.396 58.473zM577.429 407.917v-57.893h53.288c1.249 0 2.413 0.42 3.532 1.067l17.83 56.826zM448.446 407.917v-57.893h87.015v57.893zM347.525 407.917l26.956-57.893h32.011v57.893zM577.429 504.643v-54.839h87.792l17.206 54.839zM448.446 504.643v-54.839h87.015v54.839zM302.487 504.643l25.535-54.839h78.471v54.839zM577.429 604.49v-57.895h118.161l15.341 48.893c1.12 3.555 1.853 6.518 2.261 9.002zM448.446 604.49v-57.895h87.015v57.895zM233.622 747.044l-105.484-78.099-30.286 40.897-27.313-20.206 50.491-68.235 132.82 98.341zM162.561 854.308c89.776 0 162.538-72.784 162.538-162.551 0-89.781-72.762-162.565-162.538-162.565-89.778 0-162.561 72.784-162.561 162.565 0 89.767 72.783 162.551 162.561 162.551zM880.022 864.217h111.834c17.836 0 32.16-14.388 32.16-32.235 0-17.802-14.324-32.257-32.16-32.257h-111.834c-26.364 0-35.002-4.889-45.232-39.613-10.771-36.769-150.909-513.916-150.909-513.916-0.301-1.067-0.731-2.134-1.163-3.125-1.421-3.608-37.133-88.359-126.567-88.359h-252.662c-17.878 0-32.331 14.455-32.331 32.237 0 17.792 14.453 32.245 32.331 32.245h252.662c42.39 0 62.939 39.825 66.493 47.194 0.839 2.881 2.566 8.787 5.030 17.199l0.027 0.093h-261.468c-33.149 0-48.571 27.862-51.716 38.266l-85.729 183.992 1.535 0.521c24.159 8.864 46.117 22.326 64.81 39.321l0.855 0.815h110.506v57.895h-67.075l0.927 1.808c8.321 17.246 14.206 35.88 17.204 55.453l1.147 8.998h5.971c135.386 0 337.628 0 359.187 0 4.604 0 9.534-0.554 14.492-1.762l2.307-0.623 0.459 1.563c16.537 56.262 28.951 98.455 31.901 108.4 12.493 42.521 35.024 85.891 107.009 85.891z" />
+<glyph unicode="" glyph-name="stripe" d="M694.731 489.845c-8.948 0.084-18.745-5.26-18.745-5.26l-1.403-105.555c14.047-4.923 22.475 0.708 22.475 0.708 22.535 17.597 11.999 94.995 11.999 94.995-0.922 11.699-7.367 15.047-14.326 15.112zM907.050 501.474c-9.192 0-16.685-7.364-16.685-16.449v-34.449h33.312v34.449c0 9.085-7.435 16.449-16.627 16.449zM481.766 547.221h82.327v-220.962h-82.327zM82.936 548.461c33.29 0.549 61.325-10.628 61.325-10.628l-1.873-53.949c-15.513 5.631-40.803 8.441-40.803 8.441-34.715 0.474-15.513-22.514-15.513-22.514 63.81-26.266 64.747-51.139 64.747-51.139 16.45-76.463-37.525-92.883-37.525-92.883-33.31-16.414-107.423 4.689-107.423 4.689v56.77c43.145-15.952 65.683-7.51 65.683-7.51 14.518 18.762-8.957 27.677-8.957 27.677-3.747 0.474-28.568 13.604-28.568 13.604-68.962 52.544-11.767 108.84-11.767 108.84 18.836 13.72 40.701 18.271 60.675 18.601zM445.426 548.622c10.153-0.124 17.783-2.819 17.783-2.819v-67.546c-43.142 15.946-54.381-5.169-54.381-5.169l-1.405-147.76h-77.913v220.949l61.464 0.234c10.068-6.562 13.639-21.349 13.639-21.349 10.537 19.529 27.76 23.619 40.813 23.459zM720.792 549.035c3.791 0.018 7.595-0.259 11.385-0.849 5.327-0.831 10.536-2.201 15.512-4.226 2.341-0.96 4.624-2.060 6.848-3.272 5.853-3.208 11.589-8.406 15.277-14.026 4.331-6.761 8.487-13.938 11.706-21.319 4.564-10.513 6.965-21.934 8.487-33.261 2.106-15.594 1.931-31.37 0.176-46.988-2.342-21.156-7.902-41.597-14.457-61.792-4.157-12.855-12.819-23.86-24.174-30.884-12.408-7.686-26.456-10.841-40.972-11.298-11.823-0.381-23.881 1.61-35.293 4.437v-78.815h-79.546l0.703 299.771h64.033l10.595-16.18c-0.76 1.095 15.687 10.484 16.739 11.005 10.362 4.926 21.611 7.642 32.983 7.698zM906.006 550.439c117.987-0.585 90.15-139.739 90.15-139.739l-105.556-0.345c0.703-23.579 18.325-28.502 18.325-28.502 19.671-4.221 75.991 6.328 75.991 6.328v-55.581c-156.959-52.783-171.009 62.623-171.009 62.623-23.945 141.432 66.507 153.403 66.507 153.403 9.213 1.275 17.727 1.852 25.593 1.813zM270.934 611.958l-1.405-67.084h44.087l-11.241-50.67h-31.441v-90.066c-1.874-37.066 41.745-20.646 41.745-20.646v-54.885c-119.674-36.124-120.142 44.102-120.142 44.102l-0.937 121.495h-28.338v50.67h28.396l9.368 49.254zM523.277 649.253c21.020 0 38-17.017 38-38.003s-16.98-37.997-38-37.997c-20.961 0-38 17.011-38 37.997s17.038 38.003 38 38.003z" />
+<glyph unicode="" glyph-name="tag" d="M193.384 831.891c11.23-0.456 22.267-5.209 30.426-14.138 16.509-18.050 15.357-45.893-2.687-62.215-17.852-16.514-45.687-15.17-62.003 2.688-16.509 17.858-15.357 45.701 2.687 62.023 8.926 8.257 20.348 12.097 31.578 11.641zM191.18 864.915c-18.448-0.093-36.916-6.8-51.586-20.299-31.298-28.798-33.602-77.371-4.8-108.667 28.802-31.484 77.379-33.405 108.869-4.8 31.298 28.798 33.41 77.371 4.608 108.86-15.301 16.624-36.183 25.013-57.091 24.907zM202.764 960l225.614-31.873 1.538 1.153 574.883-626.642-399.96-366.696-574.886 626.839 1.538 1.148-12.289 227.506z" />
+<glyph unicode="" glyph-name="video" d="M838.739 328.251v-78.174h125.48v78.174zM69.984 328.251v-78.174h125.469v78.174zM838.739 487.963v-78.174h125.48v78.174zM69.984 487.963v-78.174h125.469v78.174zM255.263 628.044v-368.956h513.411v368.956zM838.739 647.674v-78.213h125.48v78.213zM69.984 647.674v-78.213h125.469v78.213zM0 791.666h70.3v-53.442h125.555v53.442h59.408v-95.938h513.411v95.938h70.453v-53.442h125.493v53.442h59.398v-687.333h-62.17v54.096h-125.487v-54.096h-67.687v87.078h-513.411v-87.078h-62.152v54.096h-125.47v-54.096h-67.641z" />
+<glyph unicode="" glyph-name="win10" d="M468.218 421.434l555.782-0.915-0.144-461.101-554.851 74.509zM0.305 426.777l417.968-2.594 0.321-384.454-418.273 54.812zM418.465 852.454l0.193-383.993-418.273-2.291-0.385 332.083zM1023.856 936.582v-463.236l-554.851-4.276v390.409z" />
+<glyph unicode="" glyph-name="stopwatches" d="M62.16 549.79h132v-60.078h-132v60.078zM62.16 280.402h132v-60.078h-132v60.078zM0 415.096h194.15v-60.078h-194.15v60.078zM951.526 629.82l29.992-29.992 42.48 42.48-102.466 102.466-42.48-42.48 29.992-29.992-41.594-41.594c-47.856 43.010-107.662 72.958-173.762 84.208v74.442h50.776v82.622h-218.658v-82.62h50.776v-74.442c-164.062-27.922-289.372-171.078-289.372-342.97 0-191.848 156.078-347.926 347.926-347.926s347.926 156.078 347.926 347.926c0 81.046-27.858 155.708-74.496 214.916l42.96 42.956zM635.136 105.62c-146.852 0-266.324 119.472-266.324 266.324s119.472 266.324 266.324 266.324 266.324-119.472 266.324-266.324c0-146.852-119.472-266.324-266.324-266.324zM635.136 578.192c-113.724 0-206.246-92.522-206.246-206.246s92.522-206.246 206.246-206.246 206.246 92.522 206.246 206.246-92.522 206.246-206.246 206.246zM656.378 350.704l-42.48 42.48 85.738 85.738 42.48-42.48-85.738-85.738z" />
+<glyph unicode="" glyph-name="paragraph" d="M780.568 485.99c-17.424 50.36-54.372 91.13-104.034 114.806-1.222 0.582-2.472 1.102-3.748 1.558l-148.456 53.074c-0.784 0.28-1.576 0.536-2.374 0.766-0.736 0.212-1.588 0.464-2.524 0.746-9.322 4.148-18.812 7.542-28.394 10.206-38.126 15.86-94.174 48.272-94.174 101.734 0 61.272 51.14 111.12 114 111.12h21c65.608 0 117-49.198 117-112 0-22.092 17.908-40 40-40s40 17.908 40 40c0 51.994-20.682 100.546-58.236 136.716-37.010 35.652-86.29 55.284-138.76 55.284h-21c-106.972 0-194-85.736-194-191.12 0-39.972 14.924-77.082 43.458-108.756-45.138-17.822-83.974-51.508-106.882-97.78-23.454-47.376-27.010-100.522-10.012-149.646 17.424-50.36 54.372-91.13 104.034-114.806 1.276-0.608 2.582-1.148 3.914-1.618l158.192-55.764c0.728-0.258 1.464-0.492 2.206-0.708 20.888-6.030 125.092-39.792 125.092-112.686 0-61.272-51.14-111.12-114-111.12h-21c-65.608 0-117 49.196-117 112 0 22.092-17.908 40-40 40s-40-17.908-40-40c0-51.994 20.682-100.546 58.236-136.716 37.012-35.648 86.292-55.28 138.762-55.28h21c106.972 0 194 85.736 194 191.12 0 49.424-22.808 94.474-65.958 130.28-30.148 25.016-71.24 45.922-115.81 58.938l-154.994 54.638c-29.264 14.484-50.916 38.526-61.074 67.882-9.936 28.72-7.768 59.968 6.106 87.992 25.696 51.906 84.694 77.538 139.842 64.402 8.558-3.408 17.334-6.53 26.272-9.34 2.698-1.17 5.454-2.016 8.236-2.56l144.33-51.6c29.304-14.48 50.982-38.538 61.148-67.92 9.936-28.718 7.768-59.968-6.106-87.992-9.802-19.798-1.698-43.792 18.1-53.596 5.704-2.824 11.754-4.162 17.716-4.162 14.728 0 28.9 8.17 35.878 22.262 23.458 47.374 27.012 100.522 10.014 149.646z" />
+<glyph unicode="" glyph-name="support" d="M512 960c-215.883 0-391.531-175.648-391.531-391.531v-361.406c0-49.828 40.531-90.359 90.352-90.359 49.828 0 90.359 40.531 90.359 90.359v301.172c0 49.82-40.531 90.352-90.359 90.352-10.141 0-19.734-2.055-28.852-5.148 12.852 171.023 155.805 306.328 330.031 306.328 174.133 0 317.047-135.18 330.016-306.086-9.062 3.102-18.711 4.906-28.836 4.906-49.828 0-90.359-40.531-90.359-90.352v-301.172c0-49.828 40.531-90.359 90.359-90.359 10.609 0 20.648 2.172 30.117 5.547v-35.664c0-16.617-13.531-30.117-30.117-30.117h-216.375c-12.477 34.984-45.594 60.234-84.805 60.234-49.82 0-90.352-40.531-90.352-90.352s40.531-90.352 90.352-90.352c39.211 0 72.328 25.258 84.805 60.234h216.375c49.82 0 90.352 40.531 90.352 90.352 0 181.156 0 300.531 0 481.883 0 215.883-175.648 391.531-391.531 391.531zM963.766 532.805v-350.312c34.977 12.469 60.234 45.586 60.234 84.805v180.703c0 39.211-25.258 72.328-60.234 84.805zM0 448v-180.703c0-39.219 25.258-72.336 60.234-84.805v350.312c-34.977-12.477-60.234-45.594-60.234-84.805z" />
+<glyph unicode="" glyph-name="mobile" d="M480.662 55.352c-12.786 0-23.172-12.453-23.172-27.832v-17.426c0-15.434 10.386-27.886 23.172-27.886h65.189c12.763 0 23.17 12.452 23.17 27.886v17.426c0 15.378-10.408 27.832-23.17 27.832zM286.313 833.5v-731.648h446.487v731.648zM415.901 918.418c-6.041 0-10.93-5.138-10.93-11.483 0-6.363 4.888-11.483 10.93-11.483h201.726c6.017 0 10.884 5.12 10.884 11.483 0 6.345-4.866 11.483-10.884 11.483zM301.18 960h421.619c33.081 0 59.963-28.233 59.963-63.104v-897.81c0-34.872-26.882-63.086-59.963-63.086h-421.619c-33.105 0-59.942 28.214-59.942 63.086v897.81c0 34.871 26.837 63.104 59.942 63.104z" />
+<glyph unicode="" glyph-name="website2" d="M819.943 157.727c-26.753-53.054-60.627-98.926-99.781-134.943 65.075 31.969 121.701 78.223 165.801 134.943zM662.958 157.727c-16.128-69.199-38.352-128.222-66.546-168.015 72.772 26.672 135.959 86.671 180.969 168.015zM400.257 157.727c28.289-114.559 71.317-183.726 111.669-183.726 40.468 0 83.462 69.168 111.782 183.726zM246.652 157.727c44.915-81.343 108.052-141.343 180.874-168.015-28.163 39.759-50.404 98.816-66.484 168.015zM138.038 157.727c44.13-56.655 100.709-102.912 165.718-134.912-39.169 35.986-72.898 81.858-99.763 134.912zM885.034 413.761c-3.905-78.93-20.626-152.897-47.779-218.146h75.379c40.482 64.065 66.020 138.322 71.748 218.146zM693.169 413.761c-1.792-75.008-9.233-150.241-22.21-218.146h125.302c28.723 64.065 46.851 138.322 50.947 218.146zM368.961 413.761c1.84-81.855 10.161-155.426 22.77-218.146h240.46c12.64 62.72 20.992 136.29 22.849 218.146zM176.857 413.761c4.048-79.824 22.161-154.081 50.85-218.146h125.334c-12.977 67.905-20.432 143.138-22.162 218.146zM39.65 413.761c5.761-79.824 31.265-154.081 71.763-218.146h75.268c-27.106 65.249-43.891 139.216-47.731 218.146zM848.857 669.679c23.409-66.127 36.898-139.838 37.297-217.983h99.781c-0.625 78.688-20.514 152.832-55.138 217.983zM676.335 669.679c11.233-69.072 17.073-144.111 17.25-217.983h154.694c-0.416 78.688-14.496 152.832-39.171 217.983zM386.034 669.679c-10.8-63.775-17.425-137.199-17.616-217.983h287.164c-0.191 80.783-6.83 154.208-17.664 217.983zM214.874 669.679c-24.593-65.151-38.737-139.295-39.106-217.983h154.694c0.194 73.871 6.034 148.91 17.203 217.983zM93.269 669.679c-34.674-65.151-54.547-139.295-55.139-217.983h99.669c0.447 78.145 13.969 151.856 37.265 217.983zM303.774 873.216c-76.435-37.6-141.462-94.848-187.992-165.648h74.131c28.577 66.112 67.427 122.912 113.861 165.648zM720.131 873.264c46.513-42.736 85.346-99.584 113.892-165.696h74.212c-46.547 70.8-111.557 128.112-188.104 165.696zM596.412 906.304c32.256-45.472 56.77-116.384 73.092-198.736h123.62c-45.202 96.944-114.981 168.816-196.712 198.736zM427.526 906.304c-81.734-29.92-151.449-101.792-196.667-198.736h123.622c16.319 82.352 40.833 153.264 73.044 198.736zM511.927 922.048c-43.872 0-90.883-81.584-118.708-214.48h237.498c-27.839 132.896-74.85 214.48-118.79 214.48zM511.927 960c282.43 0 512.073-229.664 512.073-511.952 0-105.312-32.051-203.295-86.787-284.815v-5.505h-3.953c-92.469-133.759-246.747-221.727-421.334-221.727-174.502 0-328.75 87.968-421.187 221.727h-3.92v5.489c-54.771 81.504-86.82 179.456-86.82 284.832 0 282.288 229.707 511.952 511.927 511.952z" />
+<glyph unicode="" glyph-name="private-cloud" d="M511.927 591.6c42.834 0 77.607-33.418 80.607-75.5h-0.062v-79.3h-161.214v79.050c2.874 42.207 37.71 75.75 80.669 75.75zM511.927 622.080c-59.67 0-108.172-46.836-111.297-105.668h-0.166v-79.612h-29.328v-205.568h281.728v205.568h-29.264v79.3h-0.397c-2.938 58.98-51.564 105.98-111.276 105.98zM508.666 760.64c115.73 0 213.605-87.793 246.168-208.627 18.102 5.062 37.102 7.958 56.832 7.958 117.27 0 212.334-95.064 212.334-212.315 0-75.437-39.501-141.521-98.835-179.188-23.77-19.333-53.998-31-87-31.293-8.728-1.040-17.499-1.832-26.499-1.832-8.832 0-17.562 0.73-26.104 1.792h-546.728c-8.669-1.042-17.501-1.792-26.565-1.792-117.27 0-212.269 91.394-212.269 204.126 0 112.708 94.999 204.126 212.269 204.126 16.23 0 31.96-1.918 47.168-5.25 28.626 127.75 129.168 222.294 249.229 222.294z" />
+<glyph unicode="" glyph-name="shield" d="M587.539 620.362c2.633-0.177 5.726-2.677 11.194-6.699 9.71-7.144 19.062-14.625 27.499-23.187 11.667-11.851 22.396-28.332 31.667-44.039 3.459-5.811 6.709-11.561 9.709-16.835 11.875-21.038 15.917-44.999 15.917-68.936 0-27.312 2.418-64.1-10.208-89.267-10.001-19.958-24.374-41.918-38.792-59.167-9.416-11.313-32.499-35.145-49.188-32.625 8.459 15.062 24.563 24.398 31.523 41.354 6.707 16.27 6.541 38.081 2.25 54.793-3.002 11.601-6.042 16.437-15.625 23.851-6.043 4.71-15.166 8.835-18.291 16.667-7.752 19.563 11.291 37.294 26.083 46.855 11.665 7.582 52.875 27.062 23.563 37.788-23.584 8.688-45.895-14.206-67.583 5.606-15.771 14.312-10.125 40.043-4.146 58.354 4.958 15.038 6.917 35.038 16 48.249 3.625 5.27 5.797 7.415 8.43 7.238zM472.218 636.236c6.833 0.022 12.912-0.915 16.35-3.572 17.749-13.707 1.104-50.706-3.374-67.061-5.979-21.976-7.667-52.249-28.708-66.205-15.459-10.251-8.189 9.518-19.875 16.041-14.040 7.832-38.748-13.773-34.875-29.124 1.981-7.835 20.792-14.917 27.875-14.561 15.374 0.77 30.667 16.437 40.103-0.274 21.731-38.395-27.228-78.956-21.605-117.768 1.022-7.187 26.833-96.080 19.001-96.518-40.625-2.043-79.793 41.937-98.5 73.687-6.665 11.312-9.083 10.645-18.582 16.726-18.854 12.149-32.689 38.148-33.731 60.354-0.979 20.355 7.835 36.355 22.48 49.706 6.792 6.211 10.625 9.211 19.397 11.211 8.541 1.914 20.144-2.274 25.665 7.206 5.106 8.707-0.938 15.544-7.624 20-11.313 7.481-40.521 3.75-43.563 21.145-1.875 10.811 7.75 11.773 13.376 18.398 5.666 6.769 2.541 11.163-0.293 16.125-2.478 4.374-4.75 9.206-0.624 16.477 9.915 17.398 33.499 26.648 49.459 37.561 14.248 9.774 29.040 21.292 45.956 25.875 6.824 1.836 20.303 4.536 31.691 4.572zM500.256 696.080c-136.998 0-248.080-111.041-248.080-248.078 0-137.041 111.082-248.082 248.080-248.082 136.997 0 248.080 111.041 248.080 248.082 0 137.036-111.083 248.078-248.080 248.078zM511.322 960c0 0 153.292-172.398 423.25-172.398 0 0 27.497-344.875-62.5-539.894-62.875-135.981-189.874-246-371.831-311.707-181.917 65.707-308.894 181.082-371.706 317.082-90.083 195.019-62.583 534.52-62.583 534.52 269.956 0 445.37 172.398 445.37 172.398z" />
+<glyph unicode="" glyph-name="cloud-data" d="M864 670c-3.808 0-7.606-0.136-11.388-0.406-11.4 36.354-32.826 69.152-62.046 94.38-39.278 33.914-90.14 51.808-142.172 49.884-50.996 89.422-146.334 146.142-248.394 146.142-128.204 0-241.65-88.114-275.706-211.726-73.786-32.8-122.294-106.482-122.294-188.274 0-79.748 45.55-149.052 112-183.272v75.272c0 49.626 40.374 90 90 90h616c49.628 0 90-40.374 90-90v-91.138c64.752 19.746 112 80.012 112 151.138 0 87.122-70.88 158-158 158zM820 482h-616c-16.568 0-30-13.432-30-30v-211.888h676v211.888c0 16.568-13.434 30-30 30zM431.23 328h-159.23c-16.568 0-30 13.432-30 30s13.432 30 30 30h159.23c16.566 0 30-13.432 30-30s-13.434-30-30-30zM624 328.288c-16.568 0-30 13.432-30 30s13.432 30 30 30c16.566 0 30-13.432 30-30s-13.434-30-30-30zM752 328.288c-16.568 0-30 13.432-30 30s13.432 30 30 30c16.566 0 30-13.432 30-30s-13.434-30-30-30zM174-34c0-16.568 13.432-30 30-30h616c16.566 0 30 13.432 30 30v214.112h-676zM752 96c16.566 0 30-13.432 30-30s-13.434-30-30-30c-16.568 0-30 13.432-30 30s13.432 30 30 30zM624 96c16.566 0 30-13.432 30-30s-13.434-30-30-30c-16.568 0-30 13.432-30 30s13.432 30 30 30zM272 96h159.23c16.566 0 30-13.432 30-30s-13.434-30-30-30h-159.23c-16.568 0-30 13.432-30 30s13.432 30 30 30z" />
+<glyph unicode="" glyph-name="mailserver" d="M39.545 906.796l373.545-302.749c0.637-0.5 1.272-0.999 1.955-1.431 14.908-9.659 32.047-14.614 49.545-14.614 17.455 0 35.273 4.931 51.591 15.022l375.092 303.794c5.727 4.658 8.954 11.749 8.592 19.137-0.319 7.364-4.137 14.16-10.228 18.273-15.364 10.318-33.273 15.772-51.818 15.772h-744.727c-18.545 0-36.5-5.455-51.864-15.796-6.137-4.113-9.956-10.887-10.272-18.273-0.364-7.385 2.817-14.476 8.59-19.135zM907.637 494.546c12.864 0 23.273 10.409 23.273 23.273v312.271c0 8.978-5.182 17.136-13.272 21-8.047 3.84-17.636 2.749-24.637-2.932l-345.637-280.202c-3.273-2.614-6.727-4.955-11.001-7.385-20.546-12.545-45.727-19.477-70.909-19.477-26.865 0-53.090 7.774-75.683 22.455-2.001 1.296-3.956 2.705-5.865 4.25l-345.997 280.405c-6.999 5.636-16.591 6.818-24.637 2.908-8.136-3.862-13.272-12.022-13.272-20.998v-428.66c0-51.34 41.773-93.092 93.092-93.092h23.273c12.862 0 23.271 10.409 23.271 23.273v46.545c0 64.159 52.183 116.363 116.363 116.363h651.638zM954.182 447.999h-698.182c-38.5 0-69.818-31.318-69.818-69.818v-93.092c0-38.5 31.318-69.818 69.818-69.818h698.182c38.5 0 69.818 31.318 69.818 69.818v93.092c0 38.5-31.318 69.818-69.818 69.818zM325.818 308.362c0-12.864-10.409-23.273-23.273-23.273s-23.271 10.412-23.271 23.273v46.545c0 12.864 10.409 23.273 23.273 23.273s23.273-10.409 23.273-23.273v-46.545zM418.909 308.362c0-12.864-10.409-23.273-23.273-23.273s-23.273 10.409-23.273 23.273v46.545c0 12.864 10.409 23.273 23.273 23.273s23.273-10.409 23.273-23.273v-46.545zM512.001 308.362c0-12.864-10.409-23.273-23.273-23.273s-23.273 10.409-23.273 23.273v46.545c0 12.864 10.409 23.273 23.273 23.273s23.273-10.409 23.273-23.273v-46.545zM744.727 285.091c-25.68 0-46.545 20.887-46.545 46.545s20.865 46.545 46.545 46.545 46.545-20.887 46.545-46.545c0.002-25.658-20.863-46.545-46.545-46.545zM884.364 285.091c-25.68 0-46.545 20.887-46.545 46.545s20.865 46.545 46.545 46.545 46.545-20.887 46.545-46.545c0.002-25.658-20.863-46.545-46.545-46.545zM954.182 168.726h-698.182c-38.5 0-69.818-31.318-69.818-69.818v-93.092c0-38.5 31.318-69.818 69.818-69.818h698.182c38.5 0 69.818 31.318 69.818 69.818v93.092c0 38.5-31.318 69.818-69.818 69.818zM325.818 29.090c0-12.864-10.409-23.273-23.273-23.273s-23.271 10.409-23.271 23.273v46.545c0 12.864 10.409 23.273 23.273 23.273s23.273-10.409 23.273-23.273v-46.545zM418.909 29.090c0-12.864-10.409-23.273-23.273-23.273s-23.273 10.409-23.273 23.273v46.545c0 12.864 10.409 23.273 23.273 23.273s23.273-10.409 23.273-23.273v-46.545zM512.001 29.090c0-12.864-10.409-23.273-23.273-23.273s-23.273 10.409-23.273 23.273v46.545c0 12.864 10.409 23.273 23.273 23.273s23.273-10.409 23.273-23.273v-46.545zM744.727 5.818c-25.68 0-46.545 20.887-46.545 46.545s20.865 46.545 46.545 46.545 46.545-20.887 46.545-46.545c0.002-25.658-20.863-46.545-46.545-46.545zM884.364 5.818c-25.68 0-46.545 20.887-46.545 46.545s20.865 46.545 46.545 46.545 46.545-20.887 46.545-46.545c0.002-25.658-20.863-46.545-46.545-46.545z" />
+<glyph unicode="" glyph-name="menu" d="M18.003 205.37h988.234v-269.514h-988.234zM18.003 582.709h988.234v-269.562h-988.234zM18.003 960h988.234v-269.562h-988.234z" />
+<glyph unicode="" glyph-name="rendezvous" d="M204.412 366.925c20.005 0.565 37.826-15.148 40.815-36.805l0.094-0.622c7.878 22.245 28.491 36.284 49.168 32.067 17.616-3.634 29.944-19.444 32.313-38.605 10.628 21.54 30.049 34.537 48.755 30.317 23.194-5.249 36.285-34.935 29.161-66.251l-1.373-6.070c10.888 14.32 28.165 21.751 44.854 17.344 23.031-6.058 36.122-32.125 29.219-58.225l-14.123-53.595c-6.879-26.064-31.129-42.285-54.136-36.227-19.361 5.134-31.504 24.379-30.882 45.885-11.123-15.623-27.378-24.379-43.131-20.815-19.642 4.464-31.854 26.475-30.858 52.164-10.139-12.916-25.445-19.946-40.798-16.782-14.884 3.024-25.95 14.872-30.474 30.003-4.336-2.695-9.223-4.57-14.532-5.321-21.635-2.964-41.7 13.35-44.853 36.45l-6.599 47.534c-3.153 23.090 11.791 44.219 33.356 47.22 1.349 0.185 2.693 0.295 4.026 0.333zM220.697 670.443h40.412c0 0-70.194-70.323 6.472-131.645 0 0 39.662-35.186 95.394 1.5l105.452 57.946 64.732-32.161 296.98-212.81c0 0 25.070-17.967 18.356-46.377 0 0-12.189-30.379-37.977-28.598l-138.304 99.296c-6.037 4.244-13.572 3.869-16.971-0.879-3.469-4.782-1.383-12.095 4.558-16.373l112.015-80.333c2.192-6.656 4.256-19.246-4.993-32.501 0 0-12.823-15.47-28.762-15.754l-139.43 100.457c-6.025 4.244-13.562 3.867-16.971-0.879-3.471-4.781-1.373-12.095 4.57-16.375l110.174-79.017c2.626-5.37 5.72-15.66-0.915-27.568 0 0-13.43-20.934-33.754-20.369l-99.696 71.507c-5.346 3.785-12.319 3-15.73-1.747-3.469-4.781-1.935-11.697 3.317-15.506l62.67-44.947c1.219-4.688 2.216-13.783-4.313-25.845 0 0-13.723-22.914-37.413-18.19l-66.105 49.133c0 0 50.377 122.421-56.575 133.273 0 0-21.32 81.166-102.862 45.628 0 0-37.036 33.663-83.791 6.342 0 0-56.482 47.138-105.521-20.934l-11.31 3.997c0 0 4.501 175.022 76.29 299.728zM966.743 682.517c0 0 21.038 0.305 24.473-27.32l32.813-239.657c0 0 3.19-25.597-23.966-28.751l-43.785-0.094c0 0 0.996 180.424-76.66 272.815zM115.214 709.398c3.803 0.051 8.081-0.594 12.877-2.197l46.344-24.437c0 0-82.514-168.269-83.51-320.89l-75.821 12.974c0 0-22.691 10.185-12.447 41.384l85.304 272.287c0 0 6.717 20.601 27.255 20.879zM473.014 751.751c6.525-0.188 13.194-1.978 19.553-5.136l162.029-69.723 0.199 0.094 95.021-42.286 93.521 11.251c86.792-100.266 70.289-255.852 70.289-255.852l-52.356-14.181-296.304 220.398-88.199 37.973-133.558-75.29c-20.97-11.814-49.979-0.059-64.852 26.253-14.815 26.347-9.847 57.253 11.124 69.102l164.842 92.918c5.784 3.252 12.165 4.668 18.691 4.48z" />
+<glyph unicode="" glyph-name="events" d="M960.678 366.457l63.222-63.199-266.16-266.165-0.163 0.201-150.263 150.245 63.212 63.224 87.214-87.247zM341.472 512.38c13.904 0 26.763-2.977 38.527-9.001 11.76-5.987 20.742-14.167 26.961-24.507 6.232-10.307 9.324-21.333 9.324-32.952 0-11.027-2.945-21.106-8.869-30.17-5.92-9.065-14.739-16.265-26.388-21.595 15.134-3.503 26.897-10.768 35.257-21.696 8.41-11.028 12.564-24.836 12.564-41.261 0-22.35-8.165-41.265-24.425-56.811-16.28-15.542-36.858-23.297-61.759-23.297-22.411 0-41.030 6.707-55.885 20.062-14.819 13.444-23.296 30.789-25.39 52.095l31.394 4.12c3.632-17.735 9.736-30.63 18.391-38.451 8.654-7.849 19.205-11.777 31.638-11.777 14.772 0 27.223 5.105 37.448 15.346 10.125 10.245 15.231 22.873 15.231 38.057 0 14.363-4.714 26.343-14.102 35.635-9.458 9.39-21.416 14.039-35.96 14.039-5.903 0-13.268-1.179-22.133-3.473l3.484 27.522c2.094-0.298 3.762-0.36 5.022-0.36 13.398 0 25.47 3.502 36.155 10.472 10.698 6.936 16.032 17.702 16.032 32.294 0 11.489-3.893 21.011-11.663 28.536-7.82 7.559-17.881 11.355-30.184 11.355-12.172 0-22.415-3.891-30.513-11.518-8.145-7.657-13.398-19.208-15.687-34.492l-31.347 5.533c3.796 21.072 12.547 37.402 26.144 48.918 13.613 11.584 30.512 17.377 50.732 17.377zM557.843 512.405h20.221v-256.666h-31.393v200.056c-7.559-7.264-17.457-14.496-29.692-21.662-12.321-7.198-23.3-12.565-33.097-16.197v30.3c17.57 8.31 32.916 18.255 46.099 30.003 13.107 11.686 22.415 23.104 27.863 34.165zM76.808 786.636h84.286v-94.785h152.748v94.785h214.198v-94.785h152.751v94.785h91.872c42.417 0 76.793-34.35 76.793-76.794v-406.333l-81.165-81.116v374.018h-687.115v-413.068h482.054l89.374-89.383h-652.604v89.383h0.065v526.499c0 42.443 34.338 76.794 76.742 76.794zM557.157 858.982h94.56v-136.173h-94.56zM190.225 858.982h94.535v-136.173h-94.535z" />
+</font></defs></svg>
\ No newline at end of file
@font-face {
- font-family: 'invoicejournal';
+ font-family: 'appicons';
src:
- url('fonts/invoicejournal.ttf?ujw2fz') format('truetype'),
- url('fonts/invoicejournal.woff?ujw2fz') format('woff'),
- url('fonts/invoicejournal.svg?ujw2fz#invoicejournal') format('svg');
+ url('fonts/appicons.ttf?o9n2mq') format('truetype'),
+ url('fonts/appicons.woff?o9n2mq') format('woff'),
+ url('fonts/appicons.svg?o9n2mq#appicons') format('svg');
font-weight: normal;
font-style: normal;
font-display: block;
[class^="icon-"], [class*=" icon-"] {
/* use !important to prevent issues with browser extensions that change fonts */
- font-family: 'invoicejournal' !important;
+ font-family: 'appicons' !important;
speak: never;
font-style: normal;
font-weight: normal;
-moz-osx-font-smoothing: grayscale;
}
-.icon-save:before {
- content: "\e934";
+.icon-menu:before {
+ content: "\e972";
}
-.icon-unsort:before {
- content: "\e931";
+.icon-rendezvous:before {
+ content: "\e973";
}
-.icon-sortasc:before {
- content: "\e932";
+.icon-events:before {
+ content: "\e974";
}
-.icon-sortdesc:before {
- content: "\e933";
+.icon-mailserver:before {
+ content: "\e971";
+}
+.icon-private-cloud:before {
+ content: "\e96e";
+}
+.icon-shield:before {
+ content: "\e96f";
+}
+.icon-cloud-data:before {
+ content: "\e970";
+}
+.icon-mobile:before {
+ content: "\e96c";
+}
+.icon-website2:before {
+ content: "\e96d";
+}
+.icon-stopwatches:before {
+ content: "\e969";
+}
+.icon-paragraph:before {
+ content: "\e96a";
+}
+.icon-support:before {
+ content: "\e96b";
+}
+.icon-helpdesk:before {
+ content: "\e935";
+}
+.icon-printer:before {
+ content: "\e936";
+}
+.icon-user:before {
+ content: "\e937";
+}
+.icon-open:before {
+ content: "\e938";
}
.icon-add:before {
content: "\e930";
}
-.icon-back:before {
- content: "\e92f";
+.icon-addcsv:before {
+ content: "\e939";
}
-.icon-out:before {
- content: "\e900";
+.icon-agrement:before {
+ content: "\e93a";
}
-.icon-in:before {
- content: "\e901";
+.icon-archive:before {
+ content: "\e93b";
+}
+.icon-back:before {
+ content: "\e92f";
}
.icon-backup:before {
content: "\e902";
}
-.icon-transactions:before {
- content: "\e903";
-}
.icon-bill:before {
content: "\e904";
}
+.icon-book:before {
+ content: "\e93c";
+}
.icon-bookings:before {
content: "\e905";
}
+.icon-books:before {
+ content: "\e93d";
+}
.icon-box:before {
content: "\e906";
}
+.icon-boxcheck-not:before {
+ content: "\e93e";
+}
+.icon-boxcheck-ok:before {
+ content: "\e93f";
+}
+.icon-boxes:before {
+ content: "\e940";
+}
+.icon-calendar1:before {
+ content: "\e941";
+}
+.icon-calendar2:before {
+ content: "\e942";
+}
.icon-close:before {
content: "\e907";
}
+.icon-code:before {
+ content: "\e943";
+}
+.icon-config:before {
+ content: "\e944";
+}
+.icon-config3:before {
+ content: "\e945";
+}
.icon-contacts:before {
content: "\e908";
}
+.icon-creditcard:before {
+ content: "\e946";
+}
+.icon-dat-export:before {
+ content: "\e947";
+}
+.icon-data-import:before {
+ content: "\e948";
+}
+.icon-data-transfer:before {
+ content: "\e949";
+}
.icon-dataadd:before {
content: "\e909";
}
.icon-datasets:before {
content: "\e90c";
}
+.icon-date:before {
+ content: "\e94a";
+}
.icon-download:before {
content: "\e90d";
}
.icon-edit:before {
content: "\e910";
}
+.icon-edit2:before {
+ content: "\e94b";
+}
+.icon-editblog:before {
+ content: "\e94c";
+}
.icon-email:before {
content: "\e911";
}
.icon-filter:before {
content: "\e914";
}
+.icon-filter2:before {
+ content: "\e94d";
+}
.icon-folder:before {
content: "\e915";
}
.icon-foldershare:before {
content: "\e916";
}
+.icon-gift:before {
+ content: "\e94e";
+}
.icon-hdd:before {
content: "\e917";
}
.icon-help:before {
content: "\e918";
}
+.icon-help-box:before {
+ content: "\e94f";
+}
+.icon-help-important:before {
+ content: "\e950";
+}
+.icon-home:before {
+ content: "\e951";
+}
+.icon-image:before {
+ content: "\e952";
+}
+.icon-in:before {
+ content: "\e901";
+}
.icon-info:before {
content: "\e919";
}
+.icon-info-box:before {
+ content: "\e953";
+}
.icon-invoice:before {
content: "\e91a";
}
+.icon-laptop:before {
+ content: "\e954";
+}
+.icon-laptop1:before {
+ content: "\e955";
+}
.icon-license:before {
content: "\e91b";
}
.icon-location:before {
content: "\e91c";
}
+.icon-locationmark:before {
+ content: "\e956";
+}
+.icon-mailsend:before {
+ content: "\e957";
+}
+.icon-msstore:before {
+ content: "\e958";
+}
.icon-next:before {
content: "\e91d";
}
+.icon-ok:before {
+ content: "\e959";
+}
+.icon-out:before {
+ content: "\e900";
+}
+.icon-pc:before {
+ content: "\e95a";
+}
+.icon-pc-datatransfer:before {
+ content: "\e95b";
+}
+.icon-pc-mac:before {
+ content: "\e95c";
+}
+.icon-pc-windows:before {
+ content: "\e95d";
+}
.icon-pdf:before {
content: "\e91e";
}
.icon-reload:before {
content: "\e925";
}
+.icon-rndcheck-not:before {
+ content: "\e95e";
+}
+.icon-rndcheck-ok:before {
+ content: "\e95f";
+}
+.icon-sale:before {
+ content: "\e960";
+}
+.icon-save:before {
+ content: "\e934";
+}
.icon-settings:before {
content: "\e926";
}
+.icon-settings-bars:before {
+ content: "\e961";
+}
+.icon-shop:before {
+ content: "\e962";
+}
+.icon-shop3:before {
+ content: "\e963";
+}
+.icon-shoppingcard:before {
+ content: "\e964";
+}
+.icon-sortasc:before {
+ content: "\e932";
+}
+.icon-sortdesc:before {
+ content: "\e933";
+}
.icon-star:before {
content: "\e927";
}
+.icon-stripe:before {
+ content: "\e965";
+}
+.icon-tag:before {
+ content: "\e966";
+}
.icon-template:before {
content: "\e928";
}
+.icon-transactions:before {
+ content: "\e903";
+}
.icon-trash:before {
content: "\e929";
}
+.icon-unsort:before {
+ content: "\e931";
+}
.icon-upload:before {
content: "\e92a";
}
+.icon-userconfig:before {
+ content: "\e92c";
+}
.icon-usergroup:before {
content: "\e92b";
}
-.icon-userconfig:before {
- content: "\e92c";
+.icon-video:before {
+ content: "\e967";
}
.icon-viewpdf:before {
content: "\e92d";
.icon-website:before {
content: "\e92e";
}
+.icon-win10:before {
+ content: "\e968";
+}
--- /dev/null
+<div id="dlgAddFiles" class="modal">
+ <div class="modal-content animate-top card-4">
+ <header>
+ <span onclick="document.getElementById('dlgAddFiles').style.display='none'; return false;"
+ class="button toolbarbtn display-topright" ><span class="icon icon-remove" style="font-size: 18px;"></span></span>
+ <h3 id="dlgAddFiles_title">Datei(en) hinzufügen</h3>
+ </header>
+ <div class="container">
+ <div id="dlg_AddFiles_infomsg"></div>
+ <form id="frm_AddFiles">
+ <input type="hidden" class="data_addFiles" id="AddFiles_folder" data-table="galleryitems" data-column="" data-id="" value=""/>
+ <div class="row">
+ <div class="cell container" style="width: 400px;">
+ <label for="AddFiles_file" class="label">Datei(en)</label>
+ <input type="file" class="input data_AddFiles " id="AddFiles_file" data-column="filename" data-table="files" multiple data-id="" value="" onchange="files.showUploadSize();"/>
+ </div>
+ </div>
+ <div class="row">
+ <div class="cell container" style="width: 300px;">
+ <label class="label" for="AddFiles_file_filesize">taille</label>
+ <input class="input border text data_formname readonly" data-column="column" data-id="" data-table="table" id="AddFiles_file_filesize" readonly>
+ </div>
+ </div>
+ </form>
+ </div>
+ <footer>
+ <button class="button theme-light margin-right border" onclick="document.getElementById('dlgAddFiles').style.display='none'; return false;"><span class="icon icon-remove"></span>Abbrechen</button>
+ <button class="button actionbtn margin-right border" id="btnAddFiles" onclick="files.addFiles();"><span class="icon icon-save"></span>Importieren</button>
+ </footer>
+ </div>
\ No newline at end of file
+++ /dev/null
-<div id="dlgAddress" class="modal" >
- <div class="modal-content animate-opacity card-4" >
- <header>
- <div class="bar-item SubHeadTitle">Adresse</div>
- <span onclick="myapp.closeDialog('Address');" class="button display-topright">×</span>
- </header>
- <div class="container padding">
- <form id="frm_addresses" >
- <div class="row">
- <div class="cell container" style="width: 400px;">
- <label class="label" for="addresses_receipient">Name / Firma</label>
- <input class="input data_addresses border text" data-column="receipient" data-id="" data-table="addresses" id="addresses_receipient" type="text">
- </div>
- <div class="cell container" style="width: 120px;">
- <label class="label" for="addresses_clientnumber">Kundern-Nr.</label>
- <input class="input data_addresses border text" data-column="clientnumber" data-id="" data-table="addresses" id="addresses_clientnumber" placeholder="YYMMDDNNN" type="text">
- </div>
- </div>
- <div class="row">
- <div class="cell" style="width: 60px;">
- <label class="label" for="addresses_title">Titel</label>
- <input class="input border data_addresses text" data-column="title" data-id="" data-table="addresses" id="addresses_title" type="text">
- </div>
- <div class="cell" style="width: 300px;">
- <label class="label" for="addresses_prename">Vorname</label>
- <input class="input border data_addresses text" data-column="prename" data-id="" data-table="addresses" id="addresses_prename" type="text">
- </div>
- <div class="cell" style="width: 300px;">
- <label class="label" for="addresses_surname">Nachname</label>
- <input class="input border data_addresses text" data-column="surname" data-id="" data-table="addresses" id="addresses_surname" type="text">
- </div>
- </div>
- <div class="row">
- <div class="cell container" style="width: 660px;">
- <label class="label" for="addresses_address">Adresse</label>
- <input class="input border data_addresses text" data-column="address" data-id="" data-table="addresses" id="addresses_address" type="text">
- </div>
- </div>
- <div class="row">
- <div class="cell container" style="width: 60px;">
- <label class="label" for="addresses_country">Land</label>
- <input class="input border data_addresses text" data-column="country" data-id="" data-table="addresses" id="addresses_country" type="text">
- </div>
- <div class="cell container" style="width: 120px;">
- <label class="label" for="addresses_zip">PLZ</label>
- <input class="input border data_addresses text" data-column="zip" data-id="" data-table="addresses" id="addresses_zip" type= "text">
- </div>
- <div class="cell container" style="width: 480px;">
- <label class="label" for="addresses_city">Ort</label>
- <input class="input data_addresses border text" data-column="city" data-id="" data-table="addresses" id="addresses_city" type="text">
- </div>
- </div>
- <div class="row">
- <div class="cell container" style="width: 400px;">
- <label class="label" for="addresses_email">E-mail</label>
- <input class="input data_addresses border text" data-column="email" data-id="" data-table="addresses" id="addresses_email" type="text">
- </div>
- </div>
- <div class="row">
- <div class="cell container" style="width: 400px;">
- <label class="label" for="addresses_phone">Telefon</label>
- <input class="input border text" data-column="phone" data-id="" data-table="addresses" id="addresses_phone" type="text">
- </div>
- </div>
- <div class="row">
- <div class="cell container" style="width: 300px;">
- <label class="label" for="addresses_iban">Kontonummer</label>
- <input class="input border text" data-column="iban" data-id="" data-table="addresses" id="addresses_iban" type="text">
- </div>
- <div class="cell container" style="width: 150px;">
- <label class="label" for="addresses_bic">BIC</label>
- <input class="input border text" data-column="bic" data-id="" data-table="addresses" id="addresses_bic" type="text">
- </div>
- </div>
- <div class="row">
- <div class="cell container" style="width: 200px;">
- <label class="label" for="addresses_vatid">USt-Id</label>
- <input class="input border text" data-column="vatid" data-id="" data-table="addresses" id="addresses_vatid" type="text">
- </div>
- <div class="cell container" style="width: 200px;">
- <label class="label" for="addresses_lang">Sprache</label>
- <input class="input border text" data-column="lang" data-id="" data-table="addresses" id="addresses_lang" type="text">
- </div>
- </div>
- </form>
- </div>
- <footer class="container right-align padding-16">
- <button class="button theme-light margin-right border" onclick="myapp.closeDialog('Address');"><span class="icon-close" style="font-size: 16px;"></span>Abbrechen</button>
- <button class="button moduletoolbar margin-right" id="btnCloseBooking" onclick="addresses.save();"><span class="icon-save" style="font-size: 16px;"></span>Speichern</button>
- </footer>
- </div>
-</div>
\ No newline at end of file
--- /dev/null
+<div id="dlgEmail" class="modal" >
+ <div class="modal-content animate-opacity card-4" >
+ <header>
+ <div class="bar-item SubHeadTitle">Email verschicken</div>
+ <span onclick="myapp.closeDialog('Email');" class="button display-topright">×</span>
+ </header>
+ <div class="container padding">
+ <form id="frm_email" >
+ <div class="row">
+ <div class="cell container">
+ <label class="label" for="email_templatename">Vorlage</label>
+ <select class="select border data_email" data-column="templatename" data-id="" data-selected="" data-table="email" id="email_templatename"></select>
+ </div>
+ <div class="cell container" >
+ <label class="label" for="email_to">An</label>
+ <input class="input data_email border text" data-column="to" data-id="" data-table="email" id="email_to" type="text">
+ </div>
+ <div class="cell container" >
+ <label class="label" for="email_cc">Kopie An:</label>
+ <input class="input data_email border text" data-column="cc" data-id="" data-table="email" id="email_cc" type="text">
+ </div>
+ <div class="cell container" >
+ <label class="label" for="email_bcc">Blind-Kopie an:</label>
+ <input class="input data_email border text" data-column="bcc" data-id="" data-table="email" id="email_bcc" type="text">
+ </div>
+ <div class="cell container" >
+ <label class="label" for="email_subject">Betreff</label>
+ <input class="input data_email border text" data-column="subject" data-id="" data-table="email" id="email_subject" type="text">
+ </div>
+ <div class="cell container">
+ <label class="label" for="email_body">Nachricht</label>
+ <textarea class="input border data_formname richeditarea" style="height: 400px;" data-id="" data-column="body" data-table="email" id="email_body" ></textarea>
+ </div>
+
+ </div>
+ </form>
+ </div>
+ <footer class="container right-align padding-16">
+ <button class="button theme-light margin-right border" onclick="myapp.closeDialog('Email');"><span class="icon-close" style="font-size: 16px;"></span>Abbrechen</button>
+ <button class="button moduletoolbar margin-right" id="btnCloseBooking" onclick="email.sendEmail();"><span class="icon-save" style="font-size: 16px;"></span>Senden</button>
+ </footer>
+ </div>
+</div>
\ No newline at end of file
-<div id="dlgInvoiceBooking" class="modal" >
- <div class="modal-content animate-opacity card-4" >
- <header>
- <div class="bar-item SubHeadTitle">Buchung</div>
- <span onclick="myapp.closeDialog('InvoiceBooking');" class="button display-topright">×</span>
- </header>
- <div class="container padding">
- <form id="frm_invoicebooking">
- <input type="hidden" data-id="" class="data_invoicebooking " data-column="id" data-table="bookings" id="invoicebooking_id" name="ident_invoicebooking_id" value="">
- <input type="hidden" data-id="" data-column="id_products" data-table="bookings" id="invoicebooking_id_products" name="invoicebooking_id_products" value="">
- <div class="row">
- <div class="container row">
- <div class="cell" style="width: 150px;">
- <label for="invoicebooking_sku" class="label">SKU</label>
- <input type="text" data-id="" data-column="sku" data-table="bookings" class="input data_invoicebooking border text" id="invoicebooking_sku" name="invoicebooking_sku"/>
- </div>
- <div class="cell" style="width: 450px;">
- <label for="invoicebooking_name" class="label">Name</label>
- <input type="text" data-id="" data-column="name" data-table="bookings" class="input border text data_invoicebooking" id="invoicebooking_name" name="invoicebooking_name"/>
- </div>
- </div>
- <div class="container row">
- <div class="cell" style="width: 50px;">
- <label for="invoicebooking_quantity" class="label">Anzahl</label>
- <input type="number" data-id="" data-column="quantity" data-table="bookings" class="input data_invoicebooking border number right-align " id="invoicebooking_quantity" name="invoicebooking_quantity" onblur="invoice.calculate();"/>
- </div>
- <div class="cell" style="width: 90px;">
- <label for="invoicebooking_unit" class="label">Einheit</label>
- <input type="text" data-id="" list="list_invoicebooking_units" data-column="unit" data-table="bookings" class="input data_invoicebooking border text" id="invoicebooking_unit" name="invoicebooking_unit" onblur=""/>
- <datalist id="list_invoicebooking_units"></datalist>
- </div>
- <div class="cell" style="width: 100px;">
- <label for="invoicebooking_unitamount" class="label">Preis</label>
- <input type="number" data-id="" data-column="unitamount" data-table="bookings" class="input data_invoicebooking border currency right-align " id="invoicebooking_unitamount" name="invoicebooking_unitamount" onblur="invoice.calculate();"/>
- </div>
- <div class="cell" style="width: 120px;" id="fld_taxpercent">
- <label for="invoicebooking_taxpercent" class="label">MwSt.(%)</label>
- <input type="number" data-id="" data-column="taxpercent" data-table="bookings" class="input data_invoicebooking border percent right-align " id="invoicebooking_taxpercent" name="invoicebooking_taxpercent" onblur="invoice.calculate();"/>
- </div>
- <div class="cell" style="width: 120px;" id="fld_taxamount" >
- <label for="invoicebooking_taxamount" class="label">Mehrwehrtsteuer</label>
- <input type="number" data-id="" data-column="taxamount" data-table="bookings" class="input data_invoicebooking border currency right-align" id="invoicebooking_taxamount" name="invoicebooking_taxamount" onblur="invoice.calculate();"/>
- </div>
- <div class="cell" style="width: 120px;" id="fld_netamount">
- <label for="invoicebooking_netamount" class="label">Netto</label>
- <input type="number" data-id="" data-column="netamount" data-table="bookings" class="input data_invoicebooking border currency right-align readonly" id="invoicebooking_netamount" name="invoicebooking_netamount" readonly />
- </div>
- <div class="cell" style="width: 120px;" id="fld_grossamount">
- <label for="invoicebooking_grossamount" class="label">Brutto</label>
- <input type="number" data-id="" data-column="grossamount" data-table="bookings" class="input data_invoicebooking border currency right-align readonly" id="invoicebooking_grossamount" name="invoicebooking_grossamount" readonly />
- </div>
-
- </div>
- <div class="container row">
- <div class="cell" style="width: 600px;">
- <label for="invoicebooking_description" class="label">Beschreibung</label>
- <textarea class="input border data_invoicebooking" style="height: 200px;" data-id="" data-column="description" data-table="bookings" id="invoicebooking_description" name="invoicebooking_description"></textarea>
- </div>
- </div>
- </div>
- </form>
- </div>
- <footer class="container right-align padding-16">
- <button class="button theme-light margin-right border" onclick="myapp.closeDialog('InvoiceBooking');"><span class="icon-close" style="font-size: 16px;"></span>Abbrechen</button>
- <button class="button moduletoolbar margin-right" id="btnCloseBooking" onclick="invoice.saveBooking();"><span class="icon-save" style="font-size: 16px;"></span>Speichern</button>
- </footer>
- </div>
-</div>
\ No newline at end of file
<script src="vendor/flatpickr/l10n/de.js?v=6" type="text/javascript"></script>
<script src="vendor/mustache/mustache.min.js?v=6" type="text/javascript"></script>
<script src="vendor/tinymce/js/tinymce/tinymce.min.js" type="text/javascript"></script>
- <!-- <script src="vendor/codemirror/lib/codemirror.js" type="text/javascript"></script>
- <script src="vendor/codemirror/addon/mode/overlay.js" type="text/javascript"></script>
- <script src="vendor/codemirror/mode/xml/xml.js" type="text/javascript"></script>
- <script src="vendor/codemirror/mode/css/css.js" type="text/javascript"></script>
- <script src="vendor/codemirror/mode/javascript/javascript.js" type="text/javascript"></script> -->
+ <script src="js/tableformatters.js?v=6" type="text/javascript"></script>
<script src="js/request.js?v=6" type="text/javascript"></script>
<script src="js/myapp.js?v=6" type="text/javascript"></script>
+ <script src="js/lang/de.js?v=6" type="text/javascript"></script>
+ <script src="js/lang/fr.js?v=6" type="text/javascript"></script>
<script src="js/dataform.js?v=6" type="text/javascript"></script>
<script src="js/timecalc.js?v=6" type="text/javascript"></script>
<script src="js/renderer.js?v=6" type="text/javascript"></script>
<script src="js/sqlite.js?v=6" type="text/javascript"></script>
<script src="js/report.js?v=6" type="text/javascript"></script>
<script src="js/email.js?v=6" type="text/javascript"></script>
+
<div id="modulescripts">
</div>
// }
// return false;
// },
- fillform: function(dataclass,choices,data){
+ fillform: function(dataclass,choices,data,setid=true){
var frm = document.querySelectorAll('.data_'+ dataclass);
//console.log("frmdata",frm);
if (data){
for (var f in frm){
var tblid = null;
- //console.log("ID",frm[f].id);
+ console.log("ID",frm[f].id);
if (frm[f].id){
- tblid = frm[f].id.replace(dataclass + "_","");
- frm[f].dataset.id=data['id'];
+ if (setid){
+ tblid = frm[f].id.replace(dataclass + "_","");
+ frm[f].dataset.id=data['id'];
+ }
+ else {
+ if (frm[f].dataset){
+ console.log("Fill dataset",frm[f].dataset);
+ tblid=frm[f].dataset.id;
+ }
+ }
}
- //console.log(frm[f].id +'=>' +tblid + "=>" +data[tblid]);
if (tblid != null && data[tblid]){
if (frm[f].tagName == 'INPUT'){
}
if (frm[f].tagName == 'SELECT'){
if (frm[f].multiple == true){
-
- choices[frm[f].id].set(JSON.parse(data[tblid]));
+ var jsdata = [];
+ let newjsdata=[];
+ if ((data[tblid] && data[tblid].startsWith("[") && data[tblid].endsWith("]"))){
+ jsdata = JSON.parse(data[tblid]);
+ } else if (data[tblid] && data[tblid] != "") {
+ jsdata.push(data[tblid]);
+ }
+ for (var i in jsdata){
+ newjsdata.push({'value':jsdata[i],'text':jsdata[i]});
+ }
+ choices[frm[f].id].setData(newjsdata);
+ choices[frm[f].id].set(jsdata);
} else {
- frm[f].value=data[tblid];
+ choices[frm[f].id].set(data[tblid]);
+ //frm[f].value=data[tblid];
}
}
if (frm[f].tagName == "TEXTAREA"){
//console.log("Set TextArea: " + frm[f].id + " => "+ data[tblid]);
- // if (frm[f].classList.contains("richeditarea")){
-
- // tinymce.get(frm[f].id).setContent(data[tblid]);
- // } else {
+ if (frm[f].classList.contains("richeditarea")){
+ tinymce.get(frm[f].id).setContent(data[tblid]);
+ } else {
frm[f].value = data[tblid];
- // }
+ }
}
}
}
-var emlformat = require('eml-format');
-import MsgReader from '@kenjiuno/msgreader'
+
let email = {
- templatetype: "eml",
- currenttemplate: {},
+ tmpfolder: usersystem.profilepath() + 'tmp/',
+ tmpbodyfile: null,
+ tmpbody: null,
+ tmpsubject: null,
+ tmptemplate: null,
+ callback: null,
+ generate: function(tmplid,maildata){
+ return new Promise((resolve, reject) => {
+ db.query("select * from mailtemplates WHERE id='"+tmplid+"'").then(data => {
+ email.tmpsubject = Mustache.render(data.subject,maildata);
+ email.tmpbody = Mustache.render(data.body,maildata);
+ }).then(data => resolve(data)).catch(err => reject(err));
+ });
+ },
+ sendSMTP: function (email,attach = [],callback = null){
+ email.callback = callback;
+ email.tmpbodyfile = report.tmpfolder + email.tmptemplate + ".mail.html";
+ //repdata = db.query("select * from public.mailtemplates WHERE id='".$tmpl."'");
+ result = fs.writeFileSync(email.tmpbodyfile, email.tmpbody);
+ var args= [];
+ args.push("-f",'"' + preferences.defaultdata.smtpfrom + '"');
+ args.push('-s','"'+preferences.defaultdata.smtpserver + ':' + preferences.defaultdata.smtpport+ '"');
+ args.push('-xu','"'+preferences.defaultdata.smtpuser+'"');
+ args.push('-xp',"'" + preferences.defaultdata.smtppassword + "'");
+ args.push('-q');
+ args.push('-o','tls=auto');
+ args.push('-t','"'+ email+ '"');
+ args.push('-u','"'+ email.tmpsubject+ '"');
+ args.push('-o','message-content-type=html');
+ args.push('-o','message-charset=ISO-8859-1');
+ args.push('-o','message-file='+ email.tmpbodyfile);
+ if ((attach) && (attach.length > 0)){
+ for (var a in attach){
+ args.push("-a",'"'+a + '"');
+ }
+
+ }
+ const mailout = spawn(usersystem.getApplicationPath()+ '/tools/sendEmail.exe', args);
+ mailout.stdout.on('data', (data) => {
+ console.log(`emailout stdout: ${data}`);
+ });
+ mailout.stderr.on('data', (data) => {
+ console.error(`emailout stderr: ${data}`);
+ });
+ mailout.on('close', (code) => {
+ console.log(`emailout: child process exited with code ${code}`);
+ if (code == 0){
+ //console.log("Copy",report.tmpoutput,"to",report.output);
+ email.tmpbodyfile = null;
+ email.tmpbody= null;
+ email.tmpsubject= null;
+ email.tmptemplate= null;
+ if (fs.existsSync(email.tmpbodyfile)){
+ fs.unlinkSync(email.tmpbodyfile);
+ }
+
+ email.callback({"mail":" Mail wurde erfolgreich verschickt an " + email});
+ }
+
+ });
+
+ },
openthunderbird: function(maildata){
let args =[];
let mailcfg =[];
const mailappout = spawn(preferences.global.mailapp, args);
//outlook.exe /c ipm.note /m "someone@microsoft.com&subject=test%20subject&body=test%20body" /a test.txt
},
- create: function(mailtemplate,repdata,accdata){
- if (mailtemplate == 'msg'){
- email.templatetype ='msg';
- const msgFileBuffer = fs.readFileSync('./data/test.msg')
- const msgtmpl = new MsgReader(msgFileBuffer)
- email.currenttemplate = msgtmpl.getFileData()
- } else {
- var eml = fs.readFileSync(preferences.global.currentdataset.datapath + '/templates/email/' + mailtemplate, "utf-8");
- emlformat.read(eml, function(error, data) {
- if (error) return console.log(error);
- email.currenttemplate = JSON.stringify(data, " ", 2);
- console.log(data);
- console.log("globalprefs",preferences.global);
- });
- }
- console.log("globalprefs",preferences.global);
- },
+ // create: function(mailtemplate,repdata,accdata){
+ // if (mailtemplate == 'msg'){
+ // email.templatetype ='msg';
+ // const msgFileBuffer = fs.readFileSync('./data/test.msg')
+ // const msgtmpl = new MsgReader(msgFileBuffer)
+ // email.currenttemplate = msgtmpl.getFileData()
+ // } else {
+ // var eml = fs.readFileSync(preferences.global.currentdataset.datapath + '/templates/email/' + mailtemplate, "utf-8");
+ // emlformat.read(eml, function(error, data) {
+ // if (error) return console.log(error);
+ // email.currenttemplate = JSON.stringify(data, " ", 2);
+ // console.log(data);
+ // console.log("globalprefs",preferences.global);
+ // });
+ // }
+ // console.log("globalprefs",preferences.global);
+ // },
// sendWithSMTP: function(maildata){
// const transporter = nodemailer.createTransport({
// host: preferences.global.mailserver,
+lbl["de"] = {
+ invoices:"Rechnungen",
+
+}
\ No newline at end of file
+lbl["fr"] = {
+ invoices:"factures",
+}
\ No newline at end of file
--- /dev/null
+const carbone = require('carbone');
+
+let report ={
+ id_report: null,
+ tmpfolder: usersystem.profilepath() + 'tmp/',
+ tmpoutput: null,
+ output: null,
+ callback: null,
+ data: null,
+ reportfile:null,
+ getReportList: function(reporttype){
+ fs.readdir(preferences.global.currentdataset.datapath + '/templates/'+ reporttype, (err, files) => {
+ if (err) console.log(err);
+ else {
+ let replist = [];
+ console.log(files);
+ let fileext = /\.(docx$|odt$)+/i;
+ files.forEach(file => {
+ console.log(file);
+ if (file.match(fileext)) {
+ replist.push({"value":file,"text":file});
+ }
+ });
+ return replist;
+ //dataform.fillselectlist(invoice.selects["invoices_id_template"],replist,'value','text');
+ }
+ });
+ },
+ open: function(reporttype,fname){
+ //console.log("prefs",preferences.global.currentdataset.datapath);
+ console.log("open", preferences.global.currentdataset.datapath + '/' + reporttype + '/' + fname);
+ if (fs.existsSync(preferences.global.currentdataset.datapath + '/' + reporttype + '/' + fname)){
+ window.open(preferences.global.currentdataset.datapath + '/' + reporttype + '/' + fname);
+ }
+ },
+ generate: function(id_report,reportdata,fname,callback){
+ report.id_report = id_report;
+ report.tmpoutput = report.tmpfolder + fname + ".pdf";
+ report.output = preferences.global.currentdataset.datapath + '/' + 'invoice' + '/' + fname + ".pdf";
+ report.reportfile = fname+ ".pdf";
+ //report.pdfoptions = JSON.parse(data.pdfoptions);
+ report.callback = callback;
+ let data = reportdata;
+
+ var options = {
+ convertTo : 'pdf' //can be docx, txt, ...
+ };
+ console.log("Render",preferences.global.currentdataset.datapath + '/templates/' + id_report);
+ console.log("to",report.tmpoutput);
+ carbone.render(preferences.global.currentdataset.datapath + '/templates/' + id_report, data, options, function(err, result){
+ if (err) {
+ console.log("XX ERR",err);
+ myapp.message("Error",err);
+ return;
+ }
+ console.log("docresult",result);
+ fs.writeFileSync(report.tmpoutput, result);
+ // to kill automatically LibreOffice workers
+ console.log("Copy",report.tmpoutput,"to",report.output);
+ if (fs.existsSync(report.output)){
+ fs.unlinkSync(report.output);
+ }
+ fs.copyFileSync(report.tmpoutput,report.output);
+ console.log("test callback",{"file":report.reportfile});
+ if (report.callback){
+ report.callback({"file":report.reportfile});
+ }
+ //process.exit();
+ });
+ }
+}
\ No newline at end of file
-const { fstat } = require("fs");
-
let preferences = {
global: null,
page: null,
defaultdata: {}
}
-
+let lbl ={};
let myapp = {
modules: [],
mods: {},
return new Promise(
function(resolve, reject){
if (document.getElementById("mod_" + idmodule).innerHTML == ''){
- var pnldoc = usersystem.readAppFile('modules/'+ module + '/' + idmodule + '.html');
-
+ var pnldocbaseic = usersystem.readAppFile('modules/'+ module + '/' + idmodule + '.html');
+ var pnldoc = Mustache.render(pnldocbaseic,lbl[preferences.global.language]);
if (pnldoc == ""){
reject('modules/'+ module + '/' + idmodule + '.html' + " data is empty");
}else {
for (var lc in modlinks){
if (document.getElementById("idxbar_" + lc)){
for (c in modlinks[lc]){
- document.getElementById("idxbar_" + lc).insertAdjacentHTML('beforeEnd','<button class="bar-item bodybtn border padding margin" onclick="'+ modlinks[lc][c].module+'.viewmodule();"><span class="'+ modlinks[lc][c].icon+'" style="font-size: 64px;"></span>'+ modlinks[lc][c].name+'</button> ');
+ document.getElementById("idxbar_" + lc).insertAdjacentHTML('beforeEnd','<button style="heigth:150px;width: 150px;" class="bar-item bodybtn border padding margin" onclick="'+ modlinks[lc][c].module+'.viewmodule();"><span class="'+ modlinks[lc][c].icon+'" style="font-size: 64px;"></span>'+ modlinks[lc][c].name+'</button> ');
}
}
}
+ },
+ togglemenu: function(){
+ var mnu = document.getElementById("mobilemenu");
+ if (mnu.style.display == 'none'){
+ mnu.style.display = 'block';
+ } else {
+ mnu.style.display = 'none';
+ }
}
// getCookie: function(cname) {
// var name = cname + "=";
}
document.addEventListener("DOMContentLoaded", function() {
+ preferences.global = usersystem.getPreference('invoicejournal');
+ if(preferences.global.dataset){
+ preferences.global["currentdataset"] = usersystem.getPreference(preferences.global.dataset);
+ }
myapp.loadmodules();
// for (var m in myapp.modules){
// eval(`${myapp.modules[m]}.init();`);
// }
//addresses.init();
- preferences.global = usersystem.getPreference('invoicejournal');
- if(preferences.global.dataset){
- preferences.global["currentdataset"] = usersystem.getPreference(preferences.global.dataset);
- } else {
- usersystem.setPreference('invoicejournal',{"dataset":"default"});
- usersystem.setPreference('default',{"datapath":usersystem.profilepath() + "default","database":"default.sqlite"});
- preferences.global = usersystem.getPreference('invoicejournal');
- preferences.global["currentdataset"] = usersystem.getPreference(preferences.global.dataset);
- }
- console.log("Content loaded",preferences);
+ // else {
+ // usersystem.setPreference('invoicejournal',{"dataset":"default"});
+ // usersystem.setPreference('default',{"datapath":usersystem.profilepath() + "default","database":"default.sqlite"});
+ // preferences.global = usersystem.getPreference('invoicejournal');
+ // preferences.global["currentdataset"] = usersystem.getPreference(preferences.global.dataset);
+ // }
+
+ //console.log("Content loaded",preferences);
db.connect(preferences.global.currentdataset.datapath + "/" + preferences.global.currentdataset.database);
myapp.loadpreferences();
let data = null;
if (fs.existsSync(filepath)){
//console.log("Read Key:" + filepath);
- let data = fs.readFileSync(filepath, 'utf-8');
+ let strdata = fs.readFileSync(filepath, 'utf-8');
+ let data =Mustache.render(strdata,lbl[preferences.global.language]);
if (data.startsWith("{") || data.startsWith("[")){
data = JSON.parse(data);
}
-const carbone = require('carbone');
-
-let report ={
+let report = {
id_report: null,
tmpfolder: usersystem.profilepath() + 'tmp/',
tmpoutput: null,
output: null,
+ pdfoptions: null,
callback: null,
data: null,
reportfile:null,
+
open: function(reporttype,fname){
- //console.log("prefs",preferences.global.currentdataset.datapath);
+ console.log("prefs",preferences.global.currentdataset.datapath);
console.log("open", preferences.global.currentdataset.datapath + '/' + reporttype + '/' + fname);
if (fs.existsSync(preferences.global.currentdataset.datapath + '/' + reporttype + '/' + fname)){
window.open(preferences.global.currentdataset.datapath + '/' + reporttype + '/' + fname);
}
},
generate: function(id_report,reportdata,fname,callback){
- report.id_report = id_report;
+ db.query("select * from reports WHERE id='"+id_report+"';").then(data => {
+ console.log(data);
+ report.id_report = id_report;
report.tmpoutput = report.tmpfolder + fname + ".pdf";
- report.output = preferences.global.currentdataset.datapath + '/' + 'invoice' + '/' + fname + ".pdf";
+ report.output = preferences.global.currentdataset.datapath + '/' + data.reporttype + '/' + fname + ".pdf";
report.reportfile = fname+ ".pdf";
- //report.pdfoptions = JSON.parse(data.pdfoptions);
+ report.pdfoptions = JSON.parse(data.pdfoptions);
report.callback = callback;
- let data = reportdata;
-
- var options = {
- convertTo : 'pdf' //can be docx, txt, ...
- };
- console.log("Render",preferences.global.currentdataset.datapath + '/templates/' + id_report);
- console.log("to",report.tmpoutput);
- carbone.render(preferences.global.currentdataset.datapath + '/templates/' + id_report, data, options, function(err, result){
- if (err) {
- console.log("XX ERR",err);
- myapp.message("Error",err);
- return;
- }
- console.log("docresult",result);
- fs.writeFileSync(report.tmpoutput, result);
- // to kill automatically LibreOffice workers
- console.log("Copy",report.tmpoutput,"to",report.output);
+ if (!fs.existsSync(report.tmpfolder)){
+ fs.mkdirSync(usersystem.profilepath() + 'tmp/');
+ }
+ if (!fs.existsSync(path.dirname(report.tmpoutput))){
+ fs.mkdirSync(path.dirname(report.tmpoutput));
+ }
+ if (fs.existsSync(report.tmpfolder + fname + ".pdf")){
+ fs.unlinkSync(report.tmpfolder + fname + ".pdf");
+ }
+ if (fs.existsSync(report.tmpfolder + id_report + ".content.html")){
+ fs.unlinkSync(report.tmpfolder + id_report + ".content.html");
+ }
+ if (fs.existsSync(report.tmpfolder + id_report + ".header.html")){
+ fs.unlinkSync(report.tmpfolder + id_report + ".header.html");
+ }
+ if (fs.existsSync(report.tmpfolder + id_report + ".footer.html")){
+ fs.unlinkSync(report.tmpfolder + id_report + ".footer.html");
+ }
+
+ let doQueries = async() => {
+ let queryres = {};
+ console.log("data.reportsql",data.reportsql);
+ let qq = JSON.parse(data.reportsql);
+ for (var i in qq){
+ console.log(i);
+ let qsql = qq[i].sql;
+ console.log(qsql);
+ for (var dd in reportdata){
+ qsql = qsql.replace('%%' + dd + '%%',reportdata[dd]);
+ }
+ console.log(qsql);
+ if (qq[i].type == 'query'){
+ queryres[i] = await db.query(qsql).catch(e => { console.log(e);});
+ } else if (qq[i].type == 'queryarray'){
+ queryres[i] = await db.queryarray(qsql).catch(e => { console.log(e);});
+ }
+
+ }
+ return queryres;
+ }
+ doQueries().then(result => {
+ console.log(result);
+ ;
+ console.log(data.contenthtml.replace(/\<\/head\>/,'<style>'+data.styles+'</style></head>'))
+ let content = Mustache.render(data.contenthtml.replace(/\<\/head\>/,'<style>'+data.styles+'</style></head>'),result);
+ let header = Mustache.render(data.headerhtml,result);
+ let footer = Mustache.render(data.footerhtml,result);
+ console.log(report.tmpfolder + id_report + ".content.html");
+ var result = fs.writeFileSync(report.tmpfolder + id_report + ".content.html",content);
+ result = fs.writeFileSync(report.tmpfolder + id_report + ".header.html", header);
+ result = fs.writeFileSync(report.tmpfolder + id_report + ".footer.html",footer);
+ //result = fs.writeFileSync(report.tmpfolder + id_report + ".data.js",JSON.stringify(result));
+ report.compile();
+ });
+ }).catch(e => { console.log(e);});;
+
+ },
+ compile: function(){
+ let args = [];
+ console.log("id_report",report.id_report)
+ console.log("pdfoptions",report.pdfoptions);
+ if (report.pdfoptions.bottom){ args.push("-B",report.pdfoptions.bottom + report.pdfoptions.unit); }
+ if (report.pdfoptions.left){ args.push("-L",report.pdfoptions.left+report.pdfoptions.unit); }
+ if (report.pdfoptions.right){ args.push("-R",report.pdfoptions.right+report.pdfoptions.unit); }
+ if (report.pdfoptions.top){ args.push("-T",report.pdfoptions.top+report.pdfoptions.unit); }
+ if (report.pdfoptions.orientation){ args.push("-O",report.pdfoptions.orientation); }
+ if (report.pdfoptions.size){ args.push("-s",report.pdfoptions.size); }
+ if (report.pdfoptions.encoding){ args.push("--encoding",report.pdfoptions.encoding); }
+ if (fs.existsSync(report.tmpfolder+ report.id_report + ".header.html")){
+ args.push("--header-html",report.tmpfolder+ report.id_report + ".header.html");
+ }
+ if (fs.existsSync(report.tmpfolder+ report.id_report + ".footer.html")){
+ args.push("--footer-html",report.tmpfolder+ report.id_report + ".footer.html" );
+ }
+ args.push(report.tmpfolder+ report.id_report + ".content.html" );
+ report.tmpoutput = report.tmpoutput.replace(/\\/g,"/");
+ args.push(report.tmpoutput);
+ console.log("Output to",report.tmpoutput);
+ console.log("AppPath",usersystem.getApplicationPath());
+ console.log(args);
+ const pdfout = spawn(usersystem.getApplicationPath()+ '/tools/wkhtmltopdf.exe', args);
+ pdfout.stdout.on('data', (data) => {
+
+ console.log(`pdfout stdout: ${data}`);
+ });
+
+ pdfout.stderr.on('data', (data) => {
+ console.error(`pdfout stderr: ${data}`);
+ });
+
+ pdfout.on('close', (code) => {
+ console.log(`pdfout: child process exited with code ${code}`);
+ if (code == 0){
+ console.log("Copy",report.tmpoutput,"to",report.output);
if (fs.existsSync(report.output)){
- fs.unlinkSync(report.output);
+ fs.unlinkSync(report.output);
}
fs.copyFileSync(report.tmpoutput,report.output);
- console.log("test callback",{"file":report.reportfile});
- if (report.callback){
report.callback({"file":report.reportfile});
}
- //process.exit();
+
});
}
-}
\ No newline at end of file
+}
+
--- /dev/null
+let formatters = {
+ ArrayToString: function(cell,formatterParams){
+ if ((cell.getValue() && cell.getValue().startsWith("[") && cell.getValue().endsWith("]"))){
+ return JSON.parse(cell.getValue()).join(",");
+ }
+ return cell.getValue();
+ },
+ Numeric: function(cell,formatterParams){
+ if (cell._cell.value){
+ nval = cell._cell.value;
+ if (nval < 0){cell.getElement().style.color="red";}
+ if (nval == 0.0){ return ""; }
+ return nval.toFixed(2).toString().replace(".",",");
+ }
+ return "";
+ },
+ Currency: function(cell,formatterParams){
+ if (cell._cell.value){
+ nval = cell._cell.value;
+ if (nval < 0){cell.getElement().style.color="red";}
+ if (nval == 0.0){ return ""; }
+ return nval.toFixed(2).toString().replace(".",",") + "€";
+ }
+ return "";
+ },
+ Percent: function(cell,formatterParams){
+ if (cell._cell.value){
+ nval = cell._cell.value;
+ if (nval < 0){cell.getElement().style.color="red";}
+ if (nval == 0.0){ return ""; }
+ return nval.toFixed(2).toString().replace(".",",") + "%";
+ }
+ return "";
+ }
+}
\ No newline at end of file
<div class="display-container bar toolbar">
<button class="bar-item toolbarbtn" onclick="myapp.gotoHome();"><span class="icon-back" style="font-size: 16px;"></span>zurück</button>
<div class="bar-item PageHeadTitle">Adressen</div>
+ <div class="hide-small">
<button class="bar-item toolbarbtn right" onclick="addresses.confirmremove();"><span class="icon-trash text-red" style="font-size: 16px;"></span>löschen</button>
<button class="bar-item toolbarbtn right" onclick="addresses.duplicate();"><span class="icon-duplicate" style="font-size: 16px;"></span>dupizieren</button>
<button class="bar-item toolbarbtn right" onclick="addresses.edit();"><span class="icon-edit" style="font-size: 16px;"></span>bearb.</button>
<button class="bar-item toolbarbtn right" onclick="addresses.add();"><span class="icon-add" style="font-size: 16px;"></span> neu</button>
</div>
-<div id="tbl_addresses"></div>
-<!-- <div class="display-container">
- <div class="cell-row">
- <div class="cell" style="width: 400px;">
- <div id="tbl_addresses"></div>
+ <div class="hide-large">
+ <button class="bar-item toolbarbtn right" onclick="myapp.togglemenu();"><span class="icon-menu" style="font-size: 36px;"></span></button>
+ <div class="bar" id="mobilemenu" style="display: none;">
+ <button class="bar-item toolbarbtn right" onclick="addresses.confirmremove();"><span class="icon-trash text-red" style="font-size: 16px;"></span>löschen</button>
+ <button class="bar-item toolbarbtn right" onclick="addresses.duplicate();"><span class="icon-duplicate" style="font-size: 16px;"></span>dupizieren</button>
+ <button class="bar-item toolbarbtn right" onclick="addresses.edit();"><span class="icon-edit" style="font-size: 16px;"></span>bearb.</button>
+ <button class="bar-item toolbarbtn right" onclick="addresses.add();"><span class="icon-add" style="font-size: 16px;"></span> neu</button>
</div>
- <div class="cell">
- <div class="row" >
- <div class="cell container" style="width: 400px; background-color: #e4e4e4; padding-bottom: 10px;">
-
- </div>
- <div class="cell" style="width: calc( 100vw - 800px);">
- <div class="bar moduletoolbar">
- <div class="bar-item SubHeadTitle">Kontakte</div>
- <button class="bar-item toolbarbtn right text-red" onclick="addresses.confirmremoveContacts();"><span class="icon icon-trash" style="font-size: 16px;"></span>löschen</button>
- <button class="bar-item toolbarbtn right" onclick="addresses.duplicateContacts();"><span class="icon icon-duplicate" style="font-size: 16px;"></span>dupl.</button>
- <button class="bar-item toolbarbtn right" onclick="addresses.editContacts();"><span class="icon icon-edit" style="font-size: 16px;"></span>bearb.</button>
- <button class="bar-item toolbarbtn right" onclick="addresses.addContacts();"><span class="icon icon-add" style="font-size: 16px;"></span>neu</button>
- </div>
- <div id="tbl_contacts"></div>
- </div>
- </div>
- <div class="row">
- <div class="bar moduletoolbar">
- <div class="bar-item SubHeadTitle">Mail Vorlagen</div>
- <button class="bar-item toolbarbtn right text-red" onclick="addresses.confirmremoveMailTemplate();"><span class="icon icon-trash" style="font-size: 16px;"></span>löschen</button>
- <button class="bar-item toolbarbtn right" onclick="addresses.duplicateMailtemplate();"><span class="icon icon-duplicate" style="font-size: 16px;"></span>dupl.</button>
- <button class="bar-item toolbarbtn right" onclick="addresses.editMailTemplate();"><span class="icon icon-edit" style="font-size: 16px;"></span>bearb.</button>
- <button class="bar-item toolbarbtn right" onclick="addresses.addMailTemplate();"><span class="icon icon-add" style="font-size: 16px;"></span>neu</button>
- </div>
- <div id="tbl_mailtemplates"></div>
-
- </div>
-
+ </div>
+</div>
+<div id="tbl_addresses"></div>
+<div id="dlgAddress" class="modal" >
+ <div class="modal-content animate-opacity card-4" >
+ <header>
+ <div class="bar-item SubHeadTitle">Adresse</div>
+ <span onclick="myapp.closeDialog('Address');" class="button display-topright">×</span>
+ </header>
+ <div class="container padding">
+ <form id="frm_addresses" >
+ <div class="row">
+ <div class="container twothird">
+ <label class="label" for="addresses_receipient">Name / Firma</label>
+ <input class="input data_addresses border text" data-column="receipient" data-id="" data-table="addresses" id="addresses_receipient" type="text">
+ </div>
+ <div class="container third">
+ <label class="label" for="addresses_clientnumber">Kundern-Nr.</label>
+ <input class="input data_addresses border text" data-column="clientnumber" data-id="" data-table="addresses" id="addresses_clientnumber" placeholder="YYMMDDNNN" type="text">
+ </div>
+ </div>
+ <div class="row">
+ <div class="container fifth">
+ <label class="label" for="addresses_title">Titel</label>
+ <input class="input border data_addresses text" data-column="title" data-id="" data-table="addresses" id="addresses_title" type="text">
+ </div>
+ <div class="container twofifth" >
+ <label class="label" for="addresses_prename">Vorname</label>
+ <input class="input border data_addresses text" data-column="prename" data-id="" data-table="addresses" id="addresses_prename" type="text">
+ </div>
+ <div class="container twofifth">
+ <label class="label" for="addresses_surname">Nachname</label>
+ <input class="input border data_addresses text" data-column="surname" data-id="" data-table="addresses" id="addresses_surname" type="text">
+ </div>
+ </div>
+ <div class="row">
+ <div class="container">
+ <label class="label" for="addresses_address">Adresse</label>
+ <input class="input border data_addresses text" data-column="address" data-id="" data-table="addresses" id="addresses_address" type="text">
+ </div>
+ </div>
+ <div class="row">
+ <div class="container fifth" >
+ <label class="label" for="addresses_country">Land</label>
+ <input class="input border data_addresses text" data-column="country" data-id="" data-table="addresses" id="addresses_country" type="text">
+ </div>
+ <div class="container fifth" >
+ <label class="label" for="addresses_zip">PLZ</label>
+ <input class="input border data_addresses text" data-column="zip" data-id="" data-table="addresses" id="addresses_zip" type= "text">
+ </div>
+ <div class="container threefifth">
+ <label class="label" for="addresses_city">Ort</label>
+ <input class="input data_addresses border text" data-column="city" data-id="" data-table="addresses" id="addresses_city" type="text">
+ </div>
+ </div>
+ <div class="row">
+ <div class="container">
+ <label class="label" for="addresses_email">E-mail</label>
+ <select class="select data_addresses border text" data-column="email" data-id="" data-table="addresses" id="addresses_email" type="text" multiple></select>
+ </div>
+ </div>
+ <div class="row">
+ <div class="container half" >
+ <label class="label" for="addresses_phone">Telefon</label>
+ <input class="input border text" data-column="phone" data-id="" data-table="addresses" id="addresses_phone" type="text">
+ </div>
+ </div>
+ <div class="row">
+ <div class="container twothird" >
+ <label class="label" for="addresses_iban">Kontonummer</label>
+ <input class="input border text" data-column="iban" data-id="" data-table="addresses" id="addresses_iban" type="text">
+ </div>
+ <div class="container third">
+ <label class="label" for="addresses_bic">BIC</label>
+ <input class="input border text" data-column="bic" data-id="" data-table="addresses" id="addresses_bic" type="text">
+ </div>
+ </div>
+ <div class="row">
+ <div class="container half" >
+ <label class="label" for="addresses_vatid">USt-Id</label>
+ <input class="input border text" data-column="vatid" data-id="" data-table="addresses" id="addresses_vatid" type="text">
+ </div>
+ <div class="container half">
+ <label class="label" for="addresses_lang">Sprache</label>
+ <input class="input border text" data-column="lang" data-id="" data-table="addresses" id="addresses_lang" type="text">
+ </div>
+ </div>
+ </form>
</div>
-
+ <footer class="container right-align padding-16">
+ <button class="button theme-light margin-right border" onclick="myapp.closeDialog('Address');"><span class="icon-close" style="font-size: 16px;"></span>Abbrechen</button>
+ <button class="button moduletoolbar margin-right" id="btnCloseBooking" onclick="addresses.save();"><span class="icon-save" style="font-size: 16px;"></span>Speichern</button>
+ </footer>
</div>
-</div> -->
\ No newline at end of file
+</div>
this.gettbldata();
myapp.viewmodule('addresses');
},
+ selects:{"addresses_email":null},
init: function(){
-
+ addresses.selects["addresses_email"] = new SlimSelect({
+ select: "#addresses_email",
+ searchText: '',
+ searchPlaceholder: 'Email...',
+ placeholder: 'E-mail(s)',
+ allowDeselectOption: true,
+ addable: function (value) {return value;/*return {text: value,value: value.toLowerCase()}*/}
+ //afterClose: function () { dataform.savefield(document.getElementById("music_mood"));}
+ });
addresses.tbl = new Tabulator("#tbl_addresses",{
headerFilterPlaceholder: "filter...",
height: "calc(100vh - 60px)",
- layout: "fitDataStretch",
+ layout: "fitColumn",
selectable: 1,
- rowDlbClick:function(e, row){
- // console.log("Filter selected");
- //
- // console.log(fsel);
- // addresses.current_id = fsel[0].id;
- addresses.edit();
- //invoices.getsums(fsel);
- },
+ // rowDlbClick:function(e, row){
+ // addresses.edit();
+ // },
rowContext:function(e, row){ e.preventDefault(); },
columns: [
{title: "Nr.", field: "clientnumber",headerFilter:"input" },
{title: "PLZ", field: "zip" },
{title: "Ort",field: "city"},
{title: "Land",field: "country"},
- {title: "E-mail",field: "email"},
+ {title: "E-mail",field: "email",formatter:formatters.ArrayToString},
{title: "Tel.",field: "phone"},
]
});
- // addresses.tblcontacts = new Tabulator("#tbl_contacts",{
- // //headerFilterPlaceholder: "filter...",
- // height: "400px",
- // layout: "fitColumns",
- // selectable: 1,
- // rowContext:function(e, row){ e.preventDefault(); },
- // columns: [
- // {title: "Surname", field: "surname"},
- // {title: "Prename", field: "prename"},
- // {title: "E-Mail", field: "email"},
- // {title: "Telefon", field: "phone"},
- // {title: "Position", field: "job"}
- // ]
- // });
- // addresses.tblmailtemplates = new Tabulator("#tbl_mailtemplates",{
- // //headerFilterPlaceholder: "filter...",
- // height: "calc(100vh - 560px)",
- // layout: "fitColumns",
- // selectable: 1,
- // rowContext:function(e, row){ e.preventDefault(); },
- // columns: [
- // {title: "Name", field: "templatename" ,width: 300},
- // {title: "Sender", field: "sendermail", width: 200},
- // {title: "Betreff", field: "subject"},
- // ]
- // });
if (addresses.tblselector == null){
if (document.getElementById("#tbl_addressselect")){
addresses.initSelector();
});
},
+
initSelector: function(){
addresses.tblselector = new Tabulator("#tbl_addressselect",{
+ responsiveLayout:true,
headerFilterPlaceholder: "Filter...",
height: "400px",
layout: "fitColumns",
dataform.cleanform('addresses');
db.query("select * from addresses where id='"+fsel[0].id+"';").then(data => {
console.log("Address Data:",data);
- dataform.fillform('addresses',{},data);
+ dataform.fillform('addresses',addresses.selects,data);
myapp.viewdialog("Address");
}).catch(e => { console.log(e);});
// postData({"get":"addresslist","dbschema":"dks","id":selid}).then(data => {
{title: "Status", field: "status",headerFilter:"select", headerFilterParams:{values:headerstatustypes},formatter:function(cell, formatterParams){ var value = cell.getValue(); return "<span class="+ statustypes[value].class+">" + statustypes[value].text + "</span>" } },
{title: "Anzahl", field: "quantity",hozAlign:"right" },
{title: "Einheit",field: "unit"},
- {title: "Preis", field: "unitamount",headerSort: false, formatter:"money",hozAlign:"right", formatterParams:{ decimal:",", thousand:".", symbol:"€", symbolAfter:"p", precision:2}},
+ {title: "Preis", field: "unitamount",headerSort: false, formatter:formatters.Currency,hozAlign:"right", formatterParams:{ decimal:",", thousand:".", symbol:"€", symbolAfter:"p", precision:2}},
{title: "MwSt (%)", field: "vatpercent",headerSort: false, formatter:"money",hozAlign:"right", formatterParams:{ decimal:",", thousand:".", symbol:"%", symbolAfter:"p", precision:2}},
{title: "MwSt", field: "taxamount",headerSort: false, formatter:"money",hozAlign:"right", formatterParams:{ decimal:",", thousand:".", symbol:"€", symbolAfter:"p", precision:2}},
{title: "Netto", field: "netamount",headerSort: false, formatter:"money",hozAlign:"right", formatterParams:{ decimal:",", thousand:".", symbol:"€", symbolAfter:"p", precision:2}},
</select>
</div>
</div>
- <div class="row" id="row_mailtemplate">
+ <!-- <div class="row" id="row_mailtemplate">
<div class="cell" style="width: 300px;">
<label class="label" for="invoices_mailtemplate">E-Mail-Vorlage</label>
<select class="select border data_invoices" data-column="mailtemplate" data-id="" data-selected="" data-table="invoices" id="invoices_mailtemplate" name="invoices_mailtemplate" onchange="dataform.savefield(this);" value="">
</select>
</div>
- </div>
+ </div> -->
<div class="row">
<div class="cell" style="max-width: 140px;">
<label class="label" for="invoices_invoicedate">Datum</label>
<label class="label" for="invoices_payedamount">Bezahlt</label>
<input class="input border currency right-align data_invoices" data-column="payedamount" data-id="" data-table="invoices" id="invoices_payedamount" onblur="dataform.savefield(this);" type="number">
</div>
- </div><!--<div class="row" >
- <div class="cell" style="width: 400px;">
- <label for="invoices_id_accounts" class="label">account</label>
-<select class="select border data_invoices " data-selected="" data-id="" data-column="id_accounts" data-table="invoices" value="" id="invoices_id_accounts" name="invoices_id_accounts" onchange="dataform.savefield(this);invoice.changeAccount(this)">
-</select>
- </div>
-</div>-->
+ </div>
<div class="row">
<div class="cell" style="width: 400px;">
<label class="label" for="invoices_accountname">Addressat</label> <input class="input border text data_invoices" data-column="accountname" data-id="" data-table="invoices" id="invoices_accountname" name="invoices_accountname"
</form>
</div>
<div class="cell">
- <div id="tbl_invoicebookings"></div>
+ <div class="row">
+ <label class="label" for="invoices_headertext">Begrüßung</label>
+ <textarea class="input border data_invoices richeditarea" style="width: 100%;" data-id="" data-column="headertext" data-table="invoices" id="invoices_headertext" ></textarea>
+ </div>
+ <div class="row">
+ <div id="tbl_invoicebookings"></div>
+ </div>
+ <div class="row">
+ <label class="label" for="invoices_footertext">Abschluss Text</label>
+ <textarea class="input border data_invoices richeditarea" style="width: 100%;" data-id="" data-column="headertext" data-table="invoices" id="invoices_footertext" ></textarea>
+ </div>
+ </div>
+ <div class="container cell" style="max-height: calc(100vh - 56px);width: 400px;">
+ <div id="tbl_invoicefiles"></div>
+ </div>
+</div>
+<div id="dlgInvoiceBooking" class="modal" >
+ <div class="modal-content animate-opacity card-4" >
+ <header>
+ <div class="bar-item SubHeadTitle">Buchung</div>
+ <span onclick="myapp.closeDialog('InvoiceBooking');" class="button display-topright">×</span>
+ </header>
+ <div class="container padding">
+ <form id="frm_invoicebooking">
+ <input type="hidden" data-id="" class="data_invoicebooking " data-column="id" data-table="bookings" id="invoicebooking_id" name="ident_invoicebooking_id" value="">
+ <input type="hidden" data-id="" data-column="id_products" data-table="bookings" id="invoicebooking_id_products" name="invoicebooking_id_products" value="">
+ <div class="row">
+ <div class="container row">
+ <div class="cell" style="width: 150px;">
+ <label for="invoicebooking_sku" class="label">SKU</label>
+ <input type="text" data-id="" data-column="sku" data-table="bookings" class="input data_invoicebooking border text" id="invoicebooking_sku" name="invoicebooking_sku"/>
+ </div>
+ <div class="cell" style="width: 450px;">
+ <label for="invoicebooking_name" class="label">Name</label>
+ <input type="text" data-id="" data-column="name" data-table="bookings" class="input border text data_invoicebooking" id="invoicebooking_name" name="invoicebooking_name"/>
+ </div>
+ </div>
+ <div class="container row">
+ <div class="cell" style="width: 50px;">
+ <label for="invoicebooking_quantity" class="label">Anzahl</label>
+ <input type="number" data-id="" data-column="quantity" data-table="bookings" class="input data_invoicebooking border number right-align " id="invoicebooking_quantity" name="invoicebooking_quantity" onblur="invoice.calculate();"/>
+ </div>
+ <div class="cell" style="width: 90px;">
+ <label for="invoicebooking_unit" class="label">Einheit</label>
+ <input type="text" data-id="" list="list_invoicebooking_units" data-column="unit" data-table="bookings" class="input data_invoicebooking border text" id="invoicebooking_unit" name="invoicebooking_unit" onblur=""/>
+ <datalist id="list_invoicebooking_units"></datalist>
+ </div>
+ <div class="cell" style="width: 100px;">
+ <label for="invoicebooking_unitamount" class="label">Preis</label>
+ <input type="number" data-id="" data-column="unitamount" data-table="bookings" class="input data_invoicebooking border currency right-align " id="invoicebooking_unitamount" name="invoicebooking_unitamount" onblur="invoice.calculate();"/>
+ </div>
+ <div class="cell" style="width: 120px;" id="fld_taxpercent">
+ <label for="invoicebooking_taxpercent" class="label">MwSt.(%)</label>
+ <input type="number" data-id="" data-column="taxpercent" data-table="bookings" class="input data_invoicebooking border percent right-align " id="invoicebooking_taxpercent" name="invoicebooking_taxpercent" onblur="invoice.calculate();"/>
+ </div>
+ <div class="cell" style="width: 120px;" id="fld_taxamount" >
+ <label for="invoicebooking_taxamount" class="label">Mehrwehrtsteuer</label>
+ <input type="number" data-id="" data-column="taxamount" data-table="bookings" class="input data_invoicebooking border currency right-align" id="invoicebooking_taxamount" name="invoicebooking_taxamount" onblur="invoice.calculate();"/>
+ </div>
+ <div class="cell" style="width: 120px;" id="fld_netamount">
+ <label for="invoicebooking_netamount" class="label">Netto</label>
+ <input type="number" data-id="" data-column="netamount" data-table="bookings" class="input data_invoicebooking border currency right-align readonly" id="invoicebooking_netamount" name="invoicebooking_netamount" readonly />
+ </div>
+ <div class="cell" style="width: 120px;" id="fld_grossamount">
+ <label for="invoicebooking_grossamount" class="label">Brutto</label>
+ <input type="number" data-id="" data-column="grossamount" data-table="bookings" class="input data_invoicebooking border currency right-align readonly" id="invoicebooking_grossamount" name="invoicebooking_grossamount" readonly />
+ </div>
+
+ </div>
+ <div class="container row">
+ <div class="cell" style="width: 600px;">
+ <label for="invoicebooking_description" class="label">Beschreibung</label>
+ <textarea class="input border data_invoicebooking richtextarea" style="height: 200px;" data-id="" data-column="description" data-table="bookings" id="invoicebooking_description" name="invoicebooking_description"></textarea>
+ </div>
+ </div>
+ </div>
+ </form>
+ </div>
+ <footer class="container right-align padding-16">
+ <button class="button theme-light margin-right border" onclick="myapp.closeDialog('InvoiceBooking');"><span class="icon-close" style="font-size: 16px;"></span>Abbrechen</button>
+ <button class="button moduletoolbar margin-right" id="btnCloseBooking" onclick="invoice.saveBooking();"><span class="icon-save" style="font-size: 16px;"></span>Speichern</button>
+ </footer>
</div>
</div>
\ No newline at end of file
dataform.cleanform('invoice');
if (id != null){
invoice.current_id = id;
- console.log("ID Invoice:",id);
+ //console.log("ID Invoice:",id);
db.query("SELECT inv.*,sum(bk.netamount) AS netamount,sum(bk.taxamount) AS vatamount,sum(bk.netamount + bk.taxamount) AS grossamount FROM invoices inv JOIN bookings bk ON (inv.id = bk.id_invoices) WHERE inv.id='"+id+"' GROUP BY inv.id;").then(data => {
- console.log("invoicedata",data);
+ //console.log("invoicedata",data);
dataform.fillform('invoices',invoice.selects,data);
+
if (data.pdffile){
invoice.hasPDF(data.pdffile);
}
invoice.getBookingData();
-
+ invoice.changedType();
myapp.viewmodule('invoice');
}).catch(e => { console.log(e);});;
}else {
select: "#invoices_id_template",
showSearch: false
});
- invoice.selects["invoices_mailtemplate"] =new SlimSelect({
- select: "#invoices_mailtemplate",
- showSearch: false
+ tinymce.init({
+ selector: '#invoices_headertext, #invoicebooking_description, #invoices_footertext',
+ plugins: 'paste importcss searchreplace autolink directionality visualblocks visualchars template autoresize charmap nonbreaking advlist lists textpattern noneditable charmap',
+ menubar: false,
+ toolbar: 'bold italic underline strikethrough fontsizeselect forecolor removeformat charmap',
+ toolbar_sticky: true,
+ language: 'de',
+ // content_css: [
+ // 'css/theme.css'
+ // ],
+ statusbar: false,
+ width: '100%',
+ min_height: 150,
+ max_height: 150,
+ forced_root_block : '',
+ branding: false,
+ importcss_append: true,
+ noneditable_noneditable_class: "mceNonEditable",
+ contextmenu: false,
+ setup: function(editor) {
+ editor.on('blur', function(e) {
+ if (e.target.id == 'invoices_headertext' || e.target.id == 'invoices_footertext'){
+ dataform.savefield(document.getElementById(e.target.id));
+ }
+ });
+ }
+ });
+ invoice.bookingtbl = new Tabulator("#tbl_invoicefiles",{
+ headerFilterPlaceholder: "filter...",
+ height: "calc(100vh - 60px)",
+ layout: "fitColumns",
+ selectable: 1,
+ rowContext:function(e, row){ e.preventDefault(); },
+ columns: [
+ {title: "DAtei",field: "file",formatter:"html"},
+ ]
});
-
- // invoice.selects["invoices_id_accounts"] = new SlimSelect({
- // select: "#invoices_id_accounts",
- // afterClose: function () { invoice.changeAccount(invoice.selects["invoice_id_accounts"]);}
-
- // });
-
-
- //invoice.getAccountsList();
invoice.getReportList();
- invoice.getMailTemplates();
+ // invoice.getMailTemplates();
invoice.getStatusList();
invoice.getDocumentList();
invoice.initbookings();
initbookings: function(){
invoice.bookingtbl = new Tabulator("#tbl_invoicebookings",{
headerFilterPlaceholder: "filter...",
- height: "calc(100vh - 60px)",
- layout: "fitDataFill",
+ height: "calc(100vh - 400px)",
+ layout: "fitColumns",
selectable: 1,
rowContext:function(e, row){ e.preventDefault(); },
columns: [
//{title:"SKU", field:"sku"},
- {title: "Produkt",field: "displayitem",formatter:"html",width: 300 },
+ {title: "Produkt",field: "displayitem",formatter:"html"},
{title: "Anzahl", field: "quantity",hozAlign:"right",width: 50 },
- {title: "Einheit",field: "unit",width: 80 },
- {title: "Preis", field: "unitamount",headerSort: false, formatter:"money",hozAlign:"right",width: 80, formatterParams:{ decimal:",", thousand:".", symbol:"€", symbolAfter:"p", precision:2}},
- {title: "MwSt (%)", field: "vatpercent",headerSort: false, formatter:"money",hozAlign:"right",width: 70, formatterParams:{ decimal:",", thousand:".", symbol:"%", symbolAfter:"p", precision:2}},
- {title: "Netto", field: "netamount",headerSort: false, formatter:"money",hozAlign:"right",width: 100, formatterParams:{ decimal:",", thousand:".", symbol:"€", symbolAfter:"p", precision:2},bottomCalc:"sum",bottomCalcFormatter:"money",bottomCalcFormatterParams:{ decimal:",", thousand:".", symbol:"€", symbolAfter:"p", precision:2 }},
- {title: "MwSt", field: "taxamount",headerSort: false, formatter:"money",hozAlign:"right",width: 90, formatterParams:{ decimal:",", thousand:".", symbol:"€", symbolAfter:"p", precision:2},bottomCalc:"sum",bottomCalcFormatter:"money",bottomCalcFormatterParams:{ decimal:",", thousand:".", symbol:"€", symbolAfter:"p", precision:2, }},
- {title: "Brutto", field: "grossamount",headerSort: false, formatter:"money",hozAlign:"right",width: 100, formatterParams:{ decimal:",", thousand:".", symbol:"€", symbolAfter:"p", precision:2},bottomCalc:"sum",bottomCalcFormatter:"money",bottomCalcFormatterParams:{ decimal:",", thousand:".", symbol:"€", symbolAfter:"p", precision:2, }},
- //,bottomCalcFormatter:"money", bottomCalcFormatterParams:{ decimal:",", thousand:".", symbol:"€", symbolAfter:"p", precision:2}
+ {title: "Einheit",field: "unit",width: 100 },
+ {title: "Preis", field: "unitamount",headerSort: false,hozAlign:"right",width: 80, formatter:formatters.Currency},
+ {title: "MwSt (%)", field: "vatpercent",headerSort: false,hozAlign:"right",width: 70, formatter:formatters.Percent},
+ {title: "Netto", field: "netamount",headerSort: false,hozAlign:"right",width: 100, formatter:formatters.Currency,bottomCalc:"sum",bottomCalcFormatter:formatters.Currency},
+ {title: "MwSt", field: "taxamount",headerSort: false, hozAlign:"right",width: 90,formatter:formatters.Currency,bottomCalc:"sum",bottomCalcFormatter:formatters.Currency},
+ {title: "Brutto", field: "grossamount",headerSort: false, hozAlign:"right",width: 100, formatter:formatters.Currency,bottomCalc:"sum",bottomCalcFormatter:formatters.Currency}
]
});
}).catch(e => { console.log(e);});;
},
getReportList: function(){
- console.log("read template path",preferences.global.currentdataset.datapath + '/templates/invoice');
- fs.readdir(preferences.global.currentdataset.datapath + '/templates/invoice', (err, files) => {
- if (err) console.log(err);
- else {
- let replist = [];
- console.log(files);
- let fileext = /\.(docx$|odt$)+/i;
- files.forEach(file => {
- console.log(file);
- if (file.match(fileext)) {
- replist.push({"value":file,"text":file});
- }
- });
- dataform.fillselectlist(invoice.selects["invoices_id_template"],replist,'value','text');
- }
- });
- return false;
- },
- getMailTemplates: function(){
- console.log("read template path",preferences.global.currentdataset.datapath + '/templates/email');
- fs.readdir(preferences.global.currentdataset.datapath + '/templates/email', (err, files) => {
- if (err) console.log(err);
- else {
- let replist = [];
- console.log(files);
- let fileext = /\.(eml$|msg$)+/i;
- files.forEach(file => {
- console.log(file);
- if (file.match(fileext)) {
- replist.push({"value":file,"text":file});
- }
- });
- dataform.fillselectlist(invoice.selects["invoices_mailtemplate"],replist,'value','text');
- }
- });
- return false;
+ db.queryarray("SELECT id as value,reportname as text FROM reports where reporttype ='invoice' ORDER BY reportname;").then(data => {
+ dataform.fillselectlist(invoice.selects["invoices_id_template"],data,'value','text');
+ });
},
getStatusList: function(){
db.queryarray("SELECT id, status,color FROM statustypes where reporttypes LIKE '%\"invoice\"%' ORDER BY pos;").then(data => {
dataform.savefield(document.getElementById("invoices_businessyear"));
}
},
- addProduct: function(){
-
- },
- setProduct: function(data){
- // let idbk = document.getElementById("bookings_id");
- // if (data && data.sqldata){
- // console.log(data);
- // dataform.setValue(document.getElementById("bookings_id_product"),data.sqldata.id);
- // dataform.setValue(document.getElementById("bookings_unit"),data.sqldata.unit);
- // dataform.setValue(document.getElementById("bookings_unitamount"),data.sqldata.salesprice);
- // dataform.setValue(document.getElementById("bookings_taxpercent"),data.sqldata.vatpercent);
- // //dataform.setValue(document.getElementById("bookings_vatamount-" + idbk),"");
- // dataform.setValue(document.getElementById("bookings_sku"),data.sqldata.sku);
- // dataform.setValue(document.getElementById("bookings_name"),data.sqldata.name);
- // dataform.setValue(document.getElementById("bookings_description"),data.sqldata.description);
- // invoice.calculate();
- // }
- },
getNewReference(strdate){
let newref=document.getElementById("invoices_reference").value;
let invtype=invoice.selects["invoices_invoicetype"].selected();
}
}
if (gtaxpercent != ""){
- gtaxpercent = gtaxpercent + "%";
+ gtaxpercent = gtaxpercent + "";
}
repdata["vatpercent"] = gtaxpercent;
report.generate(idreport,repdata, fname,invoice.afterPDFCreation);
{title: "Konto", field: "accountname",headerFilter:"input",width: 300},
{title: "Referenz",field: "reference",headerFilter:"input"},
{title: "Status", field: "status",headerFilter:"select",width: 125, headerFilterParams:{values:invoices.filters.statustypes},formatter:invoices.statusTypeFormatter},
- {title: "Netto", field: "netamount",hozAlign:"right",width: 125,formatter:"money", headerSort: false, formatterParams:{ decimal:",", thousand:".", symbol:"€", symbolAfter:"p", precision:2, },bottomCalc:"sum",bottomCalcFormatter:"money",bottomCalcFormatterParams:{ decimal:",", thousand:".", symbol:"€", symbolAfter:"p", precision:2, }},
- {title: "MwSt.", field: "vatamount",hozAlign:"right",width: 125,formatter:"money", headerSort: false, formatterParams:{ decimal:",", thousand:".", symbol:"€", symbolAfter:"p", precision:2, }, bottomCalc:"sum", bottomCalcFormatter:"money", bottomCalcFormatterParams:{ decimal:",", thousand:".", symbol:"€", symbolAfter:"p", precision:2, }},
- {title: "Brutto", field: "grossamount",hozAlign:"right",width: 125,headerSort: false,formatter:"money", formatterParams:{ decimal:",", thousand:".", symbol:"€", symbolAfter:"p", precision:2, }, bottomCalc:"sum", bottomCalcFormatter:"money", bottomCalcFormatterParams:{ decimal:",", thousand:".", symbol:"€", symbolAfter:"p", precision:2, }},
+ {title: "Netto", field: "netamount",hozAlign:"right",width: 125,formatter:formatters.Currency, headerSort: false, bottomCalc:"sum",bottomCalcFormatter:formatters.Currency},
+ {title: "MwSt.", field: "vatamount",hozAlign:"right",width: 125,formatter:formatters.Currency, bottomCalc:"sum", bottomCalcFormatter:formatters.Currency},
+ {title: "Brutto", field: "grossamount",hozAlign:"right",width: 125,headerSort: false,formatter:formatters.Currency, bottomCalc:"sum", bottomCalcFormatter:formatters.Currency},
]
});
{
"modules":[
- {"module":"invoices","icon":"icon-bill","name":"Rechnungen"},
+ {"module":"invoices","icon":"icon-bill","name":"{{ invoices }}"},
{"module":"addresses","icon":"icon-contacts","name":"Adressen"},
{"module":"products","icon":"icon-product","name":"Produkte"},
{"module":"offers","icon":"icon-box","name":"Angebote"}
+++ /dev/null
-<div class="container bar toolbar">
- <button class="bar-item toolbarbtn" onclick="products.gettbldata();myapp.viewmodule('products');"><span class="icon-back" style="font-size: 16px;"></span>zurück</button>
- <div class="bar-item PageHeadTitle">
- Produkt
- </div>
- <!-- <button class="bar-item toolbarbtn" id="btnCreateInvoice" onclick="invoice.createPDF();"><span class="icon-pdf" style="font-size: 16px;"></span>erstellen</button>
- <button class="bar-item toolbarbtn" id="btnOpenPDF" onclick=
- "invoice.openPDF();"><span class="icon-viewpdf" style="font-size: 16px;"></span>öffnen</button>
- <button class="bar-item toolbarbtn" onclick="invoice.importPDF();"><span class="icon-upload" style=
- "font-size: 16px;"></span>importieren</button>
- <button class="bar-item toolbarbtn" onclick="invoice.dlgSelectAddress();"><span class="icon-contacts" style="font-size: 16px;"></span>Adressen</button> -->
- <!-- <button class="bar-item toolbarbtn" id="btnSendEmail" onclick="invoice.sendEmail();"><span class="icon-email" style="font-size: 16px;"></span>senden</button> -->
- <!-- <button class="bar-item toolbarbtn right" onclick="product.confirmRemove();"><span class="icon-trash" style=
- "font-size: 16px;"></span>löschen</button>
- <button class="bar-item toolbarbtn right" onclick="invoice.duplicateBoking();"><span class="icon-duplicate" style="font-size: 16px;"></span>duplizieren</button>
- <button class="bar-item toolbarbtn right" onclick="invoice.editBooking();"><span class="icon-edit" style="font-size: 16px;"></span>bearbeiten</button>
- <button class="bar-item toolbarbtn right" onclick="invoice.addBooking();"><span class="icon-add" style="font-size: 16px;"></span>neu</button> -->
-</div>
-<div class="display-container">
-
-
- <div class="display-container twothird">
- <form id="frm_product">
- <div class="row" >
- <input class="data_products" data-column="id" data-id="" data-table="products" id="products_id" name="products_id" type="hidden" value="">
- <div class="container threequarter">
- <div class="row">
- <div class="container third">
- <label class="label" for="products_producttype">Typ</label>
- <select class="select border data_products" data-column="producttype" data-id="" data-selected="" data-table="products" id="products_producttype" name="products_producttype" value="">
- <option class="" value=""></option>
- <option class="" value="product">Produkt</option>
- <option class="" value="service">Dienstleistung</option>
- <option class="" value="package">Package</option>
- </select>
- </div>
- <div class="container third">
- <label class="label" for="products_productgroup">Produkt-Gruppe</label>
- <input class="input border text data_products" data-column="productgroup" data-id="" data-table="products" id="products_productgroup" name="products_productgroup" onblur="dataform.savefield(this);" placeholder="Gruppe" type="text">
- </div>
- <div class="container third">
- <label class="label" for="products_unit">Einheit</label>
- <input class="input border text data_products" data-column="unit" data-id="" data-table="products" id="products_unit" name="products_unit" onblur="dataform.savefield(this);" placeholder="Einheit" type="text">
- </div>
- </div>
- <div class="container row">
- <div class="container third">
- <label class="label" for="products_sku">no article</label>
- <input class="input border text data_products" data-column="sku" data-id="" data-table="products" id="products_sku" name="products_sku" onblur="dataform.savefield(this);" placeholder="no article" type="text">
- </div>
- <div class="contaienr twothird">
- <label class="label" for="products_name">name</label>
- <input class="input border text data_products" data-column="name" data-id="" data-table="products" id="products_name" name="products_name" onblur="dataform.savefield(this);" placeholder="name" type="text">
- </div>
- </div>
- <div class="container row">
- <div class="container cell twothird" style="height: 250px;">
- <label class="label" for="products_description">Beschreibung</label>
- <textarea data-id="" data-column="description" data-table="products" class="input border richeditarea data_products" id="products_description" name="products_description"></textarea>
- </div>
- <div class="container cell third" style="height: 250px;">
- <label class="label" for="products_note">Notiz</label>
- <textarea data-id="" data-column="note" data-table="products" class="input border richeditarea data_products" id="products_note" name="products_note"></textarea>
- </div>
- </div>
- </div>
- <div class="container quarter">
-
- <div class="container">
- <label class="label" for="products_salesprice">Netto</label>
- <input class="input border currency right-align data_products" data-column="salesprice" data-id="" data-table="products" id="products_salesprice" name="products_payedamount" onblur="dataform.savefield(this);" type="number">
- </div>
- <div class="container">
- <label class="label" for="products_vatpercent">MwSt(%)</label>
- <input class="input border percent right-align data_products" data-column="vatpercent" data-id="" data-table="products" id="products_vatpercent" name="products_vatpercent" onblur="dataform.savefield(this);" type="number">
- </div>
- <div class="container">
- <label class="label" for="products_vatamount">MwSt(€)</label>
- <input class="input border percent right-align data_products readonly" id="products_vatamount" name="products_vatamount" type="number" readonly>
- </div>
- <div class="container">
- <label class="label" for="products_grossprice">Brutto</label>
- <input class="input border currency right-align data_products readonly" id="products_grossprice" name="products_grossprice" type="number" readonly>
- </div>
- </div>
- </div>
- </form>
- <div class="row">
-
- <div class="container bar toolbar">
- <div class="bar-item PageHeadTitle">Lieferanten</div>
- <button class="bar-item toolbarbtn right" onclick="product.confirmRemoveSupplier();"><span class="icon-trash" style="font-size: 16px;"></span>löschen</button>
- <button class="bar-item toolbarbtn right" onclick="product.duplicateSupplier();"><span class="icon-duplicate" style="font-size: 16px;"></span>dupl.</button>
- <button class="bar-item toolbarbtn right" onclick="product.editSupplier();"><span class="icon-edit" style="font-size: 16px;"></span>bearb.</button>
- <button class="bar-item toolbarbtn right" onclick="priduct.addSupplier();"><span class="icon-add" style="font-size: 16px;"></span>neu</button>
- </div>
- <div id="tbl_supplier"></div>
- </div>
-</div>
-
-<div class="display-container third">
- <div class="container bar toolbar">
- <div class="bar-item PageHeadTitle">Bestand</div>
- <button class="bar-item toolbarbtn right" onclick="product.confirmRemoveStock();"><span class="icon-trash" style="font-size: 16px;"></span>löschen</button>
- <button class="bar-item toolbarbtn right" onclick="product.duplicateStock();"><span class="icon-duplicate" style="font-size: 16px;"></span>dupl.</button>
- <button class="bar-item toolbarbtn right" onclick="product.editstock();"><span class="icon-edit" style="font-size: 16px;"></span>bearb.</button>
- <button class="bar-item toolbarbtn right" onclick="priduct.addStock();"><span class="icon-add" style="font-size: 16px;"></span>neu</button>
- </div>
- <div id="tbl_stock"></div>
-</div>
-</div>
\ No newline at end of file
+++ /dev/null
-let product = {
- current_id: null,
- selects: {"products_producttype":null},
- tblstock: null,
- tblsupplier: null,
- init: function(){
- invoice.selects["products_producttype"] = new SlimSelect({
- select: "#products_producttype",
- showSearch: false,
- afterClose: function () { dataform.savefield(document.getElementById("products_producttype"));}
-
- });
- product.tblsupplier = new Tabulator("#tbl_supplier",{
- height: "calc(100vh - 470px)",
- layout: "fitColumns",
- selectable: 1,
- rowContext:function(e, row){ e.preventDefault(); },
- columns: [
- {title: "Lieferant", field: "supplier"},
- {title: "Bezeichnung", field: "sku"},
- {title: "Netto", field: "netprice",hozAlign:"right", width: 120,headerSort: false,formatter:"money", formatterParams:{ decimal:",", thousand:".", symbol:"€", symbolAfter:"p", precision:2, }},
- {title: "Brutto", field: "grossprice",hozAlign:"right",width: 120, headerSort: false,formatter:"money", formatterParams:{ decimal:",", thousand:".", symbol:"€", symbolAfter:"p", precision:2, }},
- ]
- });
- product.tblstock = new Tabulator("#tbl_stock",{
- height: "calc(100vh - 110px)",
- layout: "fitColumns",
- selectable: 1,
- rowContext:function(e, row){ e.preventDefault(); },
- columns: [
- {title: "Platz", field: "place"},
- {title: "Anzahl", field: "quantity",width: 80},
- ]
- });
- // tinymce.init({
- // selector: '#products_description,#products_note',
- // plugins: 'paste importcss searchreplace autolink directionality visualblocks visualchars template charmap nonbreaking advlist lists textpattern noneditable charmap',
- // menubar: false,
- // toolbar: 'bold italic underline strikethrough fontsizeselect forecolor removeformat charmap',
- // toolbar_sticky: true,
- // language: 'de',
- // content_css: [
- // 'css/theme.css'
- // ],
- // statusbar: false,
- // min_height: 200,
- // max_height: 200,
- // forced_root_block : '',
- // branding: false,
- // importcss_append: true,
- // noneditable_noneditable_class: "mceNonEditable",
- // contextmenu: false,
- // setup: function(editor) {
- // editor.on('blur', function(e) {
- // console.log("tmce blur:",e.target.id);
-
- // //dataform.savefield(document.getElementById(e.id));
- // //e.id
- // //console.log('The Editor has initialized.');
- // });
- // }
- // });
- },
- viewmodule: function(id){
- // myapp.loadmodule('product').then(result => {
- dataform.cleanform('product');
- if (id != null){
- product.current_id = id;
- console.log("ID Product:",id);
- db.query("SELECT * from products where id='"+id+"';").then(data => {
- dataform.fillform('products',product.selects,data);
- //invoice.getBookingData();
- //invoice.hasPDF(data.pdffile);
- myapp.viewmodule('product');
- }).catch(e => { console.log(e);});;
- }else {
- myapp.viewmodule('product');
- }
- // });
- },
- calculate: function(){
- var pid = document.getElementById("products_id").value;
- //var pprice = document.getElementById("products_purchaseprice-" + pid);
- //var marginpercent = document.getElementById("products_marginpercent-" + pid);
- var salesprice = document.getElementById("products_salesprice-" + pid);
- var vatpercent = document.getElementById("products_vatpercent-" + pid);
- var net = document.getElementById("products_netamount-" + pid);
- var vat = document.getElementById("products_vatamount-" + pid);
- var gross = document.getElementById("products_grossamount-" + pid);
- // if (pprice.value != null){
-
- // if (marginpercent.value != null){
- // salesprice.value = (parseFloat(pprice.value) + (parseFloat(pprice.value) * (parseFloat(marginpercent.value)/100))).toFixed(2);
- // }else {
- // salesprice.value = (parseFloat(pprice.value)).toFixed(2);
- // }
- // }
- var vatp = 0.0;
- if (vatpercent.value != null){
- vatp = vatpercent.value;
- }
- console.log(salesprice.value + "*" + vatp);
- vat.value= (parseFloat(salesprice.value) * (vatp/100)).toFixed(2);
- net.value= salesprice.value;
- gross.value= (parseFloat(net.value) + parseFloat(vat.value)).toFixed(2) ;
- }
-}
\ No newline at end of file
<div class="display-container bar toolbar">
<button class="bar-item toolbarbtn" onclick="myapp.gotoHome();"><span class="icon-back" style="font-size: 16px;"></span>zurück</button>
- <div class="bar-item PageHeadTitle">
- Produkte
- </div>
+ <div class="bar-item PageHeadTitle">Produkte</div>
<button class="bar-item toolbarbtn right" onclick="products.confirmRemove();"><span class="icon-trash" style="font-size: 16px;"></span>löschen</button>
- <button class="bar-item toolbarbtn right" onclick=
- "products.duplicate();"><span class="icon-duplicate" style="font-size: 16px;"></span>duplizieren</button> <button class="bar-item toolbarbtn right" onclick="products.edit();"><span class="icon-edit" style="font-size: 16px;"></span>
- bearbeiten</button>
- <button class="bar-item toolbarbtn right" onclick="products.add();"><span class="icon-add" style="font-size: 16px;"></span> neu</button>
+ <button class="bar-item toolbarbtn right" onclick="products.duplicate();"><span class="icon-duplicate" style="font-size: 16px;"></span>duplizieren</button>
+ <button class="bar-item toolbarbtn right" onclick="products.edit();"><span class="icon-edit" style="font-size: 16px;"></span>bearbeiten</button>
+ <button class="bar-item toolbarbtn right" onclick="products.add();"><span class="icon-add" style="font-size: 16px;"></span>neu</button>
+</div>
+<div id="tbl_products"></div>
+
+
+<div id="dlgProduct" class="modal" >
+ <div class="modal-content animate-opacity card-4" >
+ <header>
+ <div class="bar-item SubHeadTitle">Produkt / Dienstleistung</div>
+ <span onclick="myapp.closeDialog('Product');" class="button display-topright">×</span>
+ </header>
+ <div class="container padding">
+
+<form id="frm_product">
+ <div class="row" >
+ <input class="data_products" data-column="id" data-id="" data-table="products" id="products_id" name="products_id" type="hidden" value="">
+ <div class="container threequarter">
+ <div class="row">
+ <div class="container third">
+ <label class="label" for="products_producttype">Typ</label>
+ <select class="select border data_products" data-column="producttype" data-id="" data-selected="" data-table="products" id="products_producttype" name="products_producttype" value="">
+ <option class="" value=""></option>
+ <option class="" value="product">Produkt</option>
+ <option class="" value="service">Dienstleistung</option>
+ </select>
+ </div>
+ <div class="container third">
+ <label class="label" for="products_productgroup">Produkt-Gruppe</label>
+ <input class="input border text data_products" data-column="productgroup" data-id="" data-table="products" id="products_productgroup" name="products_productgroup" placeholder="Gruppe" type="text">
+ </div>
+ <div class="container third">
+ <label class="label" for="products_unit">Einheit</label>
+ <input class="input border text data_products" data-column="unit" data-id="" data-table="products" id="products_unit" name="products_unit" placeholder="Einheit" type="text">
+ </div>
+ </div>
+ <div class="container row">
+ <div class="container third">
+ <label class="label" for="products_sku">SKU</label>
+ <input class="input border text data_products" data-column="sku" data-id="" data-table="products" id="products_sku" name="products_sku" placeholder="no article" type="text">
+ </div>
+ <div class="contaienr twothird">
+ <label class="label" for="products_name">Name</label>
+ <input class="input border text data_products" data-column="name" data-id="" data-table="products" id="products_name" name="products_name" placeholder="name" type="text">
+ </div>
+ </div>
+ <div class="container row">
+ <div class="container cell twothird" style="height: 250px;">
+ <label class="label" for="products_description">Beschreibung</label>
+ <textarea data-id="" data-column="description" data-table="products" class="input border richeditarea data_products" id="products_description" ></textarea>
+ </div>
+ </div>
+ </div>
+ <div class="container quarter">
+
+ <div class="container">
+ <label class="label" for="products_salesprice">Netto</label>
+ <input class="input border currency right-align data_products" data-column="salesprice" data-id="" data-table="products" id="products_salesprice" type="number">
+ </div>
+ <div class="container">
+ <label class="label" for="products_vatpercent">MwSt(%)</label>
+ <input class="input border percent right-align data_products" data-column="vatpercent" data-id="" data-table="products" id="products_vatpercent" type="number">
+ </div>
+ <div class="container">
+ <label class="label" for="products_vatamount">MwSt(€)</label>
+ <input class="input border percent right-align data_products readonly" id="products_vatamount" type="number" readonly>
+ </div>
+ <div class="container">
+ <label class="label" for="products_grossprice">Brutto</label>
+ <input class="input border currency right-align data_products readonly" id="products_grossprice" type="number" readonly>
+ </div>
+ </div>
+ </div>
+ </form>
+</div>
+<footer class="container right-align padding-16">
+ <button class="button theme-light margin-right border" onclick="myapp.closeDialog('Product');"><span class="icon-close" style="font-size: 16px;"></span>Abbrechen</button>
+ <button class="button moduletoolbar margin-right" id="btnCloseBooking" onclick="products.save();"><span class="icon-save" style="font-size: 16px;"></span>Speichern</button>
+</footer>
</div>
-<div id="tbl_products"></div>
\ No newline at end of file
+</div>
\ No newline at end of file
let headerproducttypes = {
"":"",
"product":"Produkt",
- "service":"Dienstleistung",
- "package":"Pakete"
+ "service":"Service",
+ "individual":"Individual",
}
let products = {
tbl: null,
+ current_id: null,
+ selects: {"products_producttype":null},
+ filters:{
+ productypes:{"":""},
+ },
+ productypes: {},
viewmodule: function(){
myapp.viewmodule('products');
},
init: function(){
- products.tbl = new Tabulator("#tbl_products",{
+ invoice.selects["products_producttype"] = new SlimSelect({
+ select: "#products_producttype",
+ showSearch: false,
+ //afterClose: function () { dataform.savefield(document.getElementById("products_producttype"));}
+
+ });
+ tinymce.init({
+ selector: '#products_description',
+ plugins: 'paste importcss searchreplace autolink directionality visualblocks visualchars template charmap nonbreaking advlist lists textpattern noneditable charmap',
+ menubar: false,
+ toolbar: 'bold italic underline strikethrough fontsizeselect forecolor removeformat charmap',
+ toolbar_sticky: true,
+ language: 'de',
+ // content_css: [
+ // 'css/theme.css'
+ // ],
+ statusbar: false,
+ min_height: 200,
+ max_height: 200,
+ forced_root_block : '',
+ branding: false,
+ importcss_append: true,
+ noneditable_noneditable_class: "mceNonEditable",
+ contextmenu: false,
+ // setup: function(editor) {
+ // editor.on('blur', function(e) {
+ // console.log("tmce blur:",e.target.id);
+
+ // //dataform.savefield(document.getElementById(e.id));
+ // //e.id
+ // //console.log('The Editor has initialized.');
+ // });
+ // }
+ });
+
+ products.tbl = new Tabulator("#tbl_products",{
headerFilterPlaceholder: "filter...",
//groupBy:["producttype", "productgroup"],
//groupStartOpen:[true, true],
rowContext:function(e, row){ e.preventDefault(); },
columns: [
{title: "Typ", field: "producttype",width: 120,headerFilter:"select",headerFilterParams:{values:headerproducttypes}},
- {title: "Gruppe", field: "productgroup",headerFilter:"select",width: 120},
+ {title: "Gruppe", field: "productgroup",headerFilter:"input",width: 120},
{title: "Name", field: "name",headerFilter:"input"},
{title: "Einheit", field: "unit",width: 120,headerSort: false},
{title: "Netto", field: "salesprice",hozAlign:"right", width: 120,headerSort: false,formatter:"money", formatterParams:{ decimal:",", thousand:".", symbol:"€", symbolAfter:"p", precision:2, }},
]
});
products.gettbldata();
+
},
initSelector: function(){
},
gettbldata(){
let sel= products.tbl.getSelectedData();
- db.queryarray("SELECT *,round(salesprice+(round(salesprice * round((vatpercent/100.0),2),2)),2) as grossprice from products order by producttype,productgroup,name;") .then(data => {
+ db.queryarray("SELECT id, sku, name, producttype, unit, salesprice, vatpercent,productgroup,description,round(salesprice+(round(salesprice * round((vatpercent/100.0),2),2)),2) as grossprice FROM products union select id,null as sku,name,'individual' as producttype,unit,unitamount as salesprice,taxpercent as vatpercent,'individual' as productgroup,description,round(unitamount+(round(unitamount * round((taxpercent/100.0),2),2)),2) as grossprice from bookings where unitamount > 0 and name is not null and taxpercent is not null and id_products is null group by name,unitamount order by producttype,productgroup,sku,name;") .then(data => {
products.tbl.setData(data).then(dd => {
if (sel[0]){
products.tbl.selectRow(sel[0].id);
edit: function(){
var sel = products.tbl.getSelectedData();
if (sel[0]) {
- product.viewmodule(sel[0].id);
+ products.current_id = sel[0].id;
+ dataform.cleanform('addresses');
+ db.query("select * from products where id='"+sel[0].id+"';").then(data => {
+ //console.log("Address Data:",data);
+ dataform.fillform('products',{},data);
+ product.viewdialog('Product');
+ }).catch(e => { console.log(e);});
+
+ }
+ },
+ save: function(){
+
+ },
+ calculate: function(){
+ var pid = document.getElementById("products_id").value;
+ //var pprice = document.getElementById("products_purchaseprice-" + pid);
+ //var marginpercent = document.getElementById("products_marginpercent-" + pid);
+ var salesprice = document.getElementById("products_salesprice-" + pid);
+ var vatpercent = document.getElementById("products_vatpercent-" + pid);
+ var net = document.getElementById("products_netamount-" + pid);
+ var vat = document.getElementById("products_vatamount-" + pid);
+ var gross = document.getElementById("products_grossamount-" + pid);
+ // if (pprice.value != null){
+
+ // if (marginpercent.value != null){
+ // salesprice.value = (parseFloat(pprice.value) + (parseFloat(pprice.value) * (parseFloat(marginpercent.value)/100))).toFixed(2);
+ // }else {
+ // salesprice.value = (parseFloat(pprice.value)).toFixed(2);
+ // }
+ // }
+ var vatp = 0.0;
+ if (vatpercent.value != null){
+ vatp = vatpercent.value;
}
+ console.log(salesprice.value + "*" + vatp);
+ vat.value= (parseFloat(salesprice.value) * (vatp/100)).toFixed(2);
+ net.value= salesprice.value;
+ gross.value= (parseFloat(net.value) + parseFloat(vat.value)).toFixed(2) ;
}
+
}
\ No newline at end of file
<div class="container bar toolbar">
<button class="bar-item toolbarbtn" onclick="myapp.gotoHome();"><span class="icon-back" style="font-size: 16px;"></span>zurück</button>
- <div class="bar-item PageHeadTitle">
- Einstellungen
- </div>
+ <div class="bar-item PageHeadTitle">Einstellungen</div>
+ <button class="bar-item toolbarbtn right" onclick="myapp.viewtab('status');"><span class="icon-settings" style="font-size: 16px;"></span>Status</button>
+ <button class="bar-item toolbarbtn right" onclick="myapp.viewtab('documenttypes');"><span class="icon-settings" style="font-size: 16px;"></span>Document Typen</button>
+ <button class="bar-item toolbarbtn right" onclick="myapp.viewtab('default');"><span class="icon-settings" style="font-size: 16px;"></span>Allgemein</button>
</div>
-<div class="container">
+<div class="tab container" id="tab_default">
+
<div class="row">
- <div class="container cell" style="width: 400px;">
- <form id="frm_defaultdata">
+ <form id="frm_defaultdata">
+ <div class="container quarter">
+ <fieldset>
+ <legend>Unternehmens-Daten</legend>
+ <div class="row container group_container">
+ <div class="">
+ <label class="label">Unternehmen</label>
+ <input class="input border text data_defaultdata" data-column="pref" data-id="company" data-table="defaultdata" id="defaultdata_company" onblur="dataform.savefield(this);" placeholder="Name / Firma" type="text" value="">
+ </div>
+ <div class="">
+ <label class="label">Adresse</label>
+ <input class="input border text data_defaultdata" data-column="pref" data-id="address" data-table="defaultdata" id="defaultdata_address" onblur="dataform.savefield(this);" placeholder="Adresse" type="text" value="">
+ </div>
+ <div class="row">
+ <div class="cell" style="width: 40px;">
+ <label class="label">Land</label>
+ <input class="input border text data_defaultdata" data-column="pref" data-id="country" data-table="defaultdata" id="defaultdata_country" onblur="dataform.savefield(this);" type="text" value="">
+ </div>
+ <div class="cell" style="width: 90px;">
+ <label class="label">PLZ</label>
+ <input class="input border text data_defaultdata" data-column="pref" data-id="zip" data-table="defaultdata" id="defaultdata_zip" onblur="dataform.savefield(this);" placeholder="PLZ" type="text" value="">
+ </div>
+ <div class="cell" style="width: 270px;">
+ <label class="label">Ort</label>
+ <input class="input border text data_defaultdata" data-column="pref" data-id="city" data-table="defaultdata" id="defaultdata_city" onblur="dataform.savefield(this);" placeholder="Ort" type="text" value="">
+ </div>
+ </div>
+ <div class="">
+ <label class="label">Email</label>
+ <input class="input border text data_defaultdata" data-column="pref" data-id="email" data-table="defaultdata" id="defaultdata_email" onblur="dataform.savefield(this);" placeholder="E-mail" type="text" value="">
+ </div>
+ <div class="">
+ <label class="label">Webseite</label>
+ <input class="input border text data_defaultdata" data-column="pref" data-id="website" data-table="defaultdata" id="defaultdata_website" onblur="dataform.savefield(this);" placeholder="Webseite" type="text">
+ </div>
+ <div class="row">
+ <div class="cell">
+ <div class="">
+ <label class="label">USt.-Id</label>
+ <input class="input border text data_defaultdata" data-column="vatid" data-id="" data-table="defaultdata" id="defaultdata_vatid" onblur="dataform.savefield(this);" placeholder="USt-Id" type="text" value="">
+ </div>
+ </div>
+ <div class="cell">
+ <div class="">
+ <label class="label">RCS</label>
+ <input class="input border text data_defaultdata" data-column="rcs" data-id="" data-table="defaultdata" id="defaultdata_rcs" onblur="dataform.savefield(this);" placeholder="Handelsregister" type="text">
+ </div>
+ </div>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div class="container quarter">
<fieldset>
<legend>Standard-Werte</legend>
<div class="container group_container">
- <!--<div class="">
+ <div class="">
<label class="label" for="defaultdata_language">Sprache</label>
- <select class="select border data_defaultdata" data-column="pref" data-id="language" data-selected="" data-table="defaultdata" id="defaultdata_language" onchange="dataform.savefield(this);" placeholder="Sprache" value="de">
+ <select class="select border data_defaultdata" data-column="pref" data-id="language" data-selected="" data-table="defaultdata" id="defaultdata_language" onchange="dataform.savefield(this);" placeholder="Sprache">
+ <option class="de">deutsch</option>
+ <option class="fr">français</option>
</select>
- </div>-->
+ </div>
<div class="row">
<div class="cell">
<label class="label" for="defaultdata_vat">Mehrwertsteuer</label>
</div>
</fieldset>
+ </div>
+ <div class="container quarter">
<fieldset>
<legend>Mail-Einstellungen</legend>
<label class="label"></label>
<div class="container group_container">
- <div class="">
+ <!-- <div class="">
<label class="label" for="defaultdata_mailapp">Mail-Programm</label>
- <select class="select border text data_defaultdata" data-column="pref" data-id="mailapp" data-table="defaultdata" id="defaultdata_mailapp" onblur="dataform.savefield(this);" placeholder="Mail-App" type="text" value="">
- <option value="thunderbird">Thunderbird</option>
+ <select class="select border data_defaultdata" data-column="pref" data-id="mailapp" data-selected="" data-table="defaultdata" id="defaultdata_mailapp">
+ <option value="smtp">SMTP</option>
<option value="outlook">Outlook</option>
+ <option value="thunderbird">Thunderbird</option>
</select>
+ </div> -->
+ <div id="smtpsettings">
+ <div class="row">
+ <div class="cell">
+ <label class="label" for="defaultdata_smtpserver">Absender</label>
+ <input class="input border text data_defaultdata" data-column="pref" data-id="smtpserver" data-table="defaultdata" id="defaultdata_smtpfrom" onblur="dataform.savefield(this);" placeholder="Absender" type="text" value="">
+ </div>
+ </div>
+ <div class="row">
+ <div class="cell">
+ <label class="label" for="defaultdata_smtpserver">Mail-Server</label>
+ <input class="input border text data_defaultdata" data-column="pref" data-id="smtpserver" data-table="defaultdata" id="defaultdata_smtpserver" onblur="dataform.savefield(this);" placeholder="Mail-Server" type="text" value="">
+ </div>
+ <div class="cell">
+ <label class="label" for="defaultdata_smtpport">Port</label>
+ <input class="input border number right-align text-align-right data_defaultdata" data-column="pref" data-id="smtpport" data-table="defaultdata" id="defaultdata_smtpport" onblur="dataform.savefield(this);" text-align-right="" type="number" value="">
+ </div>
+ </div>
+ <div class="">
+ <label class="label" for="defaultdata_smtplogin">Login</label> <input class="input border text data_defaultdata" data-column="pref" data-id="smtplogin" data-table="defaultdata" id="defaultdata_smtplogin" onblur="dataform.savefield(this);" placeholder="Login" type="text" value="">
+ </div>
+ <div class="">
+ <label class="label" for="defaultdata_pref">Passwort</label> <input class="input border password data_defaultdata" data-column="pref" data-id="smtppassword" data-table="defaultdata" id="defaultdata_smtppassword" onblur="dataform.savefield(this);" placeholder="Passwort" type="password" value="">
</div>
</div>
+ </div>
</fieldset>
+</div>
</form>
</div>
- <div class="container cell" style="width: calc(100vw - 400px);">
- <div class="row" style="height: calc(50vh - 120px);">
+</div>
+
+<div class="display-container tab" style="width: calc(100vw - 70px);display: none;" id="tab_status" >
+
<div class="bar moduletoolbar">
<div class="bar-item subHeadTitle">Status</div>
<button class="bar-item toolbarbtn right text-red" onclick="settings.confirmRemoveStatus();"><span class="icon-trash" style="font-size: 16px;"></span>löschen</button>
<button class="bar-item toolbarbtn right" onclick="settings.addStatus();"><span class="icon-plus" style="font-size: 16px;"></span>neu</button>
</div>
<div id="tbl_status"></div>
- </div>
- <div class="row" style="height: calc(50vh - 120px);">
+
+</div>
+<div class="display-container tab" style="width: calc(100vw - 70px);display: none;" id="tab_documenttypes">
<div class="bar moduletoolbar">
<div class="bar-item subHeadTitle">Documente</div>
<button class="bar-item toolbarbtn right text-red" onclick="settings.confirmRemoveDocuments();"><span class="icon-trash" style="font-size: 16px;"></span>löschen</button>
<button class="bar-item toolbarbtn right" onclick="settings.addDocuments();"><span class="icon-plus" style="font-size: 16px;"></span>neu</button>
</div>
<div id="tbl_documents"></div>
- </div>
- </div>
- </div>
-
-</div>
\ No newline at end of file
+</div>
});
},
init: function(){
- settings.selects["mailapp"] = new SlimSelect({
- select: "#defaultdata_mailapp",
- showSearch: false,
- afterClose: function () { dataform.savefield(document.getElementById("dedata_mailapp"));}
- });
+ // settings.selects["mailapp"] = new SlimSelect({
+ // select: "#defaultdata_mailapp",
+ // showSearch: false,
+ // afterClose: function () { dataform.savefield(document.getElementById("dedata_mailapp"));}
+ // });
settings.selects["invoicetemplate"] = new SlimSelect({
select: "#defaultdata_invoicetemplate",
showSearch: false,
});
settings.getstatusdata();
settings.getdocumentdata();
+ settings.getDefaultData();
+ },
+ getDefaultData: function(){
+ console.log("Settings Data",preferences.defaultdata);
+ dataform.fillform("defaultdata",settings.selects,preferences.defaultdata,false);
},
getstatusdata: function(){
if (settings.tblstatus){
--- /dev/null
+<div class="display-container bar toolbar">
+ <button class="bar-item toolbarbtn" onclick="myapp.gotoHome();"><span class="icon-back" style="font-size: 16px;"></span>zurück</button>
+ <div class="bar-item PageHeadTitle">
+ Vorlagen
+ </div>
+ <button class="bar-item toolbarbtn text-red right" onclick="templates.confirmRemove();"><span class="icon-trash tlbicon"></span>löschen</button>
+ <button class="bar-item toolbarbtn right" onclick="templates.duplicate();"><span class="icon-duplicate tlbicon"></span>dupl</button>
+ <button class="bar-item toolbarbtn right" onclick="templates.save();"><span class="icon-save tlbicon"></span>Speichern</button>
+</div>
+
+<div class="display-container">
+ <div class="row">
+ <div class="cell" style="width: 400px;">
+ <div id="tbl_templates"></div>
+ </div>
+ <div class="cell">
+ <div class="panel" id="pnl_templatereport" style="width: 100%;display: none;">
+ <form id="frm_templates">
+ <div class="row">
+ <div class="cell container" style="width: 400px;">
+ <label class="label" for="templates_reporttype">Kategorie</label>
+ <select class="select border data_templates" data-column="reporttype" data-id="" data-selected="" data-table="label" id="templates_reporttype"></select>
+ </div>
+ <div class="cell container" style="width: 400px;">
+ <label class="label" for="templates_reportname">Name</label>
+ <input class="input data_templates border text" data-column="reportname" data-id="" data-table="newreports" id="templates_reportname" type="text">
+ </div>
+ </div>
+ <div class="row">
+ <!-- <div class="cell container" style="width: 200px;">
+ <label class="label" for="templates_pdfoptions-size">Size</label>
+ <select class="select border data_templates" data-column="pdfoptions-size" data-id="" data-selected="" data-table="label" id="templates_pdfoptions-size">
+ <option value="A4">A4</option>
+ </select>
+ </div>
+ <div class="cell container" style="width: 200px;">
+ <label class="label" for="templates_pdfoptions-orientation">Orientation</label>
+ <select class="select border data_templates" data-column="pdfoptions-orientation" data-id="" data-selected="" data-table="label" id="templates_pdfoptions-orientation">
+ <option value="Portrait">Portrait</option>
+ <option value="Landscape">Landscape</option>
+ </select>
+ </div> -->
+
+ <div class="cell container" style="width: 90px;">
+ <label class="label" for="templates_pdfoptions-top">Top (mm)</label>
+ <input class="input data_templates border number right-align" data-column="pdfoptions-top" data-id="" data-table="newreports" id="templates_pdfoptions-top" type="text">
+ </div>
+ <div class="cell container" style="width: 90px;">
+ <label class="label" for="templates_pdfoptions-bottom">Bottom (mm)</label>
+ <input class="input data_templates border number right-align" data-column="pdfoptions-bottom" data-id="" data-table="newreports" id="templates_pdfoptions-bottom" type="text">
+ </div>
+ <div class="cell container" style="width: 90px;">
+ <label class="label" for="templates_pdfoptions-left">Left (mm)</label>
+ <input class="input data_templates border number right-align" data-column="pdfoptions-left" data-id="" data-table="newreports" id="templates_pdfoptions-left" type="text">
+ </div>
+ <div class="cell container" style="width: 90px;">
+ <label class="label" for="templates_pdfoptions-right">Right (mm)</label>
+ <input class="input data_templates border number right-align" data-column="pdfoptions-right" data-id="" data-table="newreports" id="templates_pdfoptions-right" type="text">
+ </div>
+ </div>
+ <div class="row">
+ <div class="cell" style="width: 100%;">
+ <label class="label" for="templates_contentheader">Kopfzeile</label>
+ <textarea class="input border data_templates richeditarea" style="height: heightpx;" data-id="" data-column="contentheader" data-table="table" id="templates_contentheader" ></textarea>
+ </div>
+ <div class="cell" style="width: 100%;">
+ <label class="label" for="templates_contentheader">Kopfzeile</label>
+ <textarea class="input border data_templates richeditarea" style="height: heightpx;" data-id="" data-column="contentheader" data-table="table" id="templates_contentheader" ></textarea>
+ </div>
+ <!-- <div class="cell" style="width: 80px;">
+ <div class="bar-block moduletoolbar">
+ <button class="bar-item toolbarbtn border" onclick="myapp.viewtab('templateheader');return false;">Header</button>
+ <button class="bar-item toolbarbtn border" onclick="myapp.viewtab('templatebody');return false;">Body</button>
+ <button class="bar-item toolbarbtn border" onclick="myapp.viewtab('templatefooter');return false;">Footer</button>
+ <button class="bar-item toolbarbtn border" onclick="myapp.viewtab('templatestyle');return false;">Style</button>
+ <button class="bar-item toolbarbtn border" onclick="myapp.viewtab('templatereportsql');return false;">Data Queries</button>
+ </div>
+ </div> -->
+ <div class="cell">
+ <div id="tab_templateheader" class="row tab border" style="height:calc(100vh - 200px); width: calc(100vw - 500px); overflow-y: hidden;">
+ <div class="bar moduletoolbar">
+ <div class="bar-item SubHeadTitle">Kopfzeile</div>
+ </div>
+ <textarea class="input border data_templates codeeditor" style="width:calc(100vw - 510px);" data-id="" data-column="headerhtml" data-table="newreports" id="templates_headerhtml"></textarea>
+ </div>
+ <div id="tab_templatebody" class="row tab border" style="height:calc(100vh - 200px); width: calc(100vw - 500px); overflow-y: hidden;display:none;">
+ <div class="bar moduletoolbar">
+ <div class="bar-item SubHeadTitle">Seite</div>
+ </div>
+ <textarea class="input border data_templates codeeditor" style="width:calc(100vw - 510px);" data-id="" data-column="contenthtml" data-table="newreports" id="templates_contenthtml" ></textarea>
+ </div>
+ <div id="tab_templatefooter" class="row tab border" style="height:calc(100vh - 200px); width: calc(100vw - 500px); overflow-y: hidden;display:none;">
+ <div class="bar moduletoolbar">
+ <div class="bar-item SubHeadTitle">Fusszeile</div>
+ </div>
+ <textarea class="input border data_templates codeeditor" style="width:calc(100vw - 510px);" data-id="" data-column="footerhtml" data-table="newreports" id="templates_footerhtml" ></textarea>
+ </div>
+ <div id="tab_templatestyle" class="row tab border" style="height:calc(100vh - 120px); width: calc(100vw - 500px); overflow-y: hidden;display: none;" >
+ <div class="bar moduletoolbar">
+ <div class="bar-item SubHeadTitle">Layout Definition</div>
+ </div>
+ <textarea class="input border data_templates codeeditor" style="width:calc(100vw - 510px);" data-id="" data-column="styles" data-table="newreports" id="templates_styles" ></textarea>
+ </div>
+ </div>
+ <div id="tab_templatereportsql" class="row tab" style="height:calc(100vh - 120px); width: calc(100vw - 500px); overflow-y: hidden;display: none;" >
+ <div class="bar moduletoolbar">
+ <div class="bar-item SubHeadTitle">Daten Abfragen</div>
+ <button class="bar-item toolbarbtn right text-red" onclick="templates.confirmRemoveSQL();"><span class="icon-trash" style="font-size: 16px;"></span>löschen</button>
+ <button class="bar-item toolbarbtn right" onclick="templates.addSQL();"><span class="icon-add" style="font-size: 16px;"></span>neu</button>
+ </div>
+ <div id="tbl_reportsql"></div>
+ </div>
+ </div>
+ </div>
+ </form>
+ </div>
+ <div class="tab" id="pnl_templateemail" style="display: none;">
+ <div class="container" style="width: 400px;">
+ <label class="label" for="email_subject">Betreff</label>
+ <input class="input data_templates border text" data-column="headerhtml" data-id="" data-table="newreports" id="email_subject" onblur="dataform.savefield(this);" type="text">
+ </div>
+ <div class="cell" style="width: 100%;">
+ <label class="label" for="email_body">Nachricht</label>
+ <textarea class="input border data_templates richeditarea" style="height: calc(100vh - 300px);width:calc(100vw -500px);" data-id="" data-column="contenthtml" data-table="newreports" id="email_body" ></textarea>
+ </div>
+ </div>
+
+ </div>
+ </div>
+</div>
+<script src="vendor/codemirror/lib/codemirror.js" type="text/javascript"></script>
+<script src="vendor/codemirror/addon/mode/overlay.js" type="text/javascript"></script>
+<script src="vendor/codemirror/mode/xml/xml.js" type="text/javascript"></script>
+<script src="vendor/codemirror/mode/css/css.js" type="text/javascript"></script>
+<script src="vendor/codemirror/mode/javascript/javascript.js" type="text/javascript"></script>
+<!--
+ <div class="cell container" style="width: 200px; background-color: #e4e4e4; padding-bottom: 10px;" style="background-color: #e4e4e4; padding-bottom: 10px;">
+ <div class="cell container" style="width: 400px;">
+
+ </div>
+ </div>
+-->
--- /dev/null
+let templates = {
+ tbl:null,
+ tblreportsql: null,
+ selects: {"templates_pdfoptions-orientation":null,"templates_pdfoptions-size":null,"templates_reporttype":null},
+ editors: {"templates_headerhtml": null,"templates_contenthtml":null,"templates_footerhtml":null,"templates_styles":null,"templates_pdfoptions":null,"templates_reportsql":null},
+ current_id: null,
+ templatedata: {},
+ viewmodule: function(){
+ myapp.loadmodule('templates','templates').then(result => {
+ myapp.viewmodule('templates');
+ });
+ },
+
+ init: function(){
+ CodeMirror.defineMode("mustache", function(config, parserConfig) {
+ var mustacheOverlay = {
+ token: function(stream, state) {
+ var ch;
+ if (stream.match("{{")) {
+ while ((ch = stream.next()) != null)
+ if (ch == "}" && stream.next() == "}") {
+ stream.eat("}");
+ return "mustache";
+ }
+ }
+ while (stream.next() != null && !stream.match("{{", false)) {}
+ return null;
+ }
+ };
+ return CodeMirror.overlayMode(CodeMirror.getMode(config, parserConfig.backdrop || "text/html"), mustacheOverlay);
+ });
+ // templates.selects["templates_pdfoptions-orientation"] =new SlimSelect({
+ // select: "#templates_pdfoptions-orientation",
+ // showSearch: false
+ // });
+ // templates.selects["templates_pdfoptions-size"] =new SlimSelect({
+ // select: "#templates_pdfoptions-size",
+ // showSearch: false
+ // });
+ // templates.selects["templates_reporttype"] =new SlimSelect({
+ // select: "#templates_reporttype",
+ // showSearch: false
+ // });
+ var height = document.getElementById("tab_templateheader").style.height;
+ templates.editors["templates_headerhtml"] = CodeMirror.fromTextArea(document.getElementById("templates_headerhtml"), {mode: "mustache",lineNumbers: true});
+ templates.editors["templates_headerhtml"].setSize(null,height);
+ templates.editors["templates_contenthtml"] = CodeMirror.fromTextArea(document.getElementById("templates_contenthtml"), {mode: "mustache",lineNumbers: true});
+ templates.editors["templates_contenthtml"].setSize(null,height);
+ templates.editors["templates_footerhtml"] = CodeMirror.fromTextArea(document.getElementById("templates_footerhtml"), {mode: "mustache",lineNumbers: true});
+ templates.editors["templates_footerhtml"].setSize(null,height);
+ templates.editors["templates_styles"] = CodeMirror.fromTextArea(document.getElementById("templates_styles"), {mode: "css",lineNumbers: true});
+ templates.editors["templates_styles"].setSize(null,height);
+ templates.tblreportsql = new Tabulator("#tbl_reportsql",{
+ headerFilterPlaceholder: "filter...",
+ height: "calc(100vh - 300px)",
+ layout: "fitColumns",
+ selectable: true,
+ selectableRangeMode:"click",
+ rowContext:function(e, row){ e.preventDefault(); },
+ columns: [
+ {title: "Id", field: "id", width: 80, editor:"input"},
+ {title: "Abfrage-Typ", field: "type",width: 120 , edior:"select"},
+ {title: "SQL", field: "sql",editor:"input"},
+ ]
+ });
+ templates.tbl = new Tabulator("#tbl_templates",{
+ headerFilterPlaceholder: "filter...",
+ height: "calc(100vh - 60px)",
+ layout: "fitColumns",
+ selectable: 1,
+ rowClick:function(e, row){
+ templates.edit();
+ },
+ rowContext:function(e, row){ e.preventDefault(); },
+ columns: [
+ {title: "Name", field: "reportname"},
+ {title: "Typ", field: "reporttype"},
+ ]
+ });
+ templates.gettbldata();
+ templates.getTypesList();
+ },
+ gettbldata: function(){
+ if (templates.tbl){
+ db.queryarray("select * from newreports order by reportname,reporttype;").then(data => {
+ console.log(data);
+ templates.tbl.setData(data);
+ });
+ }
+ },
+ getTypesList: function(){
+ db.queryarray("SELECT reporttype as value,reporttype as text FROM newreports GROUP by reporttype ORDER BY reportname;").then(data => {
+ //console.log("ReportList",data);
+ dataform.fillselectlist(templates.selects["templates_reporttype"],data,'value','text');
+ }).catch(e => { console.log(e);});;
+ return false;
+ },
+ edit: function(){
+ let fsel = templates.tbl.getSelectedData();
+ if (fsel[0] ){
+ if (fsel[0].type == 'email'){
+ myapp.viewpanel('templateemail');
+ db.query("select * from newreports where id='"+ fsel[0].id+"';").then(data => {
+
+ }).catch(e => { console.log(e);});
+ }else {
+ myapp.viewpanel('templatereport');
+ db.query("select * from newreports where id='"+ fsel[0].id+"';").then(data => {
+ console.log("repdata",data);
+ document.getElementById("templates_reportname").value=data.reportname;
+ templates.selects["templates_reporttype"].set(data.reporttype);
+ // console.log("pdfoptions",data.pdfoptions);
+ // console.log("reportsql", data.reportsql);
+ data.reportsql = JSON.parse(data.reportsql);
+ data.pdfoptions = JSON.parse(data.pdfoptions);
+ templates.templatedata = data;
+ for (var opt in templates.templatedata.pdfoptions){
+ if (document.getElementById("templates_pdfoptions-"+opt)){
+ // console.log("Element -> templates_pdfptions-"+opt + " exists!");
+ if (templates.selects["templates_pdfoptions-"+opt]){
+ console.log(opt,"SET ", templates.templatedata.pdfoptions[opt])
+ templates.selects["templates_pdfoptions-"+opt].set(templates.templatedata.pdfoptions[opt]);
+ } else {
+ document.getElementById("templates_pdfoptions-"+opt).value=templates.templatedata.pdfoptions[opt];
+ }
+
+ }
+ //console.log("pdfoption",opt,templates.templatedata.pdfoptions[opt]);
+ }
+ let rtbldata = [];
+ for (var rsql in templates.templatedata.reportsql){
+ rtbldata.push({"id":rsql,"sql":templates.templatedata.reportsql[rsql].sql,"type":templates.templatedata.reportsql[rsql].type});
+ console.log("reportsql",rsql,templates.templatedata.reportsql[rsql]);
+ }
+ console.log(rtbldata);
+ templates.tblreportsql.setData(rtbldata);
+ templates.editors["templates_headerhtml"].setValue(data.headerhtml);
+ templates.editors["templates_contenthtml"].setValue(data.contenthtml);
+ templates.editors["templates_footerhtml"].setValue(data.footerhtml);
+ templates.editors["templates_styles"].setValue(data.styles);
+
+
+ //document.getElementById("templates_headerhtml").value= data.headerhtml;
+ // document.getElementById("templates_contenthtml").value= data.contenthtml;
+ // document.getElementById("templates_footerhtml").value= data.footerhtml;
+ // document.getElementById("templates_styles").value= data.styles;
+ // let dataheader=data.headerhtml.replace(/\<\/head\>/,"<style>" + data.styles + "</style></head>");
+ // let datafooter=data.footerhtml.replace(/\<\/head\>/,"<style>" + data.styles + "</style></head>");
+ // templates.setEditorData("templates_headerhtml",data.headerhtml,data.styles);
+ // templates.setEditorData("templates_contenthtml",data.contenthtml,data.styles);
+ // templates.setEditorData("templates_footerhtml",data.footerhtml,data.styles);
+
+ }).catch(e => { console.log(e);});
+ }
+ }
+ },
+ add: function(){
+
+ },
+ confirmRemove: function(){
+
+ },
+ remove: function(){
+
+ },
+ duplicate: function(){
+
+ },
+ preview: function(){
+
+ },
+ save: function(){
+
+ }
+}
\ No newline at end of file
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
},
+ "abort-controller": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
+ "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
+ "requires": {
+ "event-target-shim": "^5.0.0"
+ }
+ },
+ "abstract-leveldown": {
+ "version": "6.2.3",
+ "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz",
+ "integrity": "sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ==",
+ "requires": {
+ "buffer": "^5.5.0",
+ "immediate": "^3.2.3",
+ "level-concat-iterator": "~2.0.0",
+ "level-supports": "~1.0.0",
+ "xtend": "~4.0.0"
+ }
+ },
"ajv": {
"version": "6.12.5",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.5.tgz",
"readable-stream": "^2.0.6"
}
},
+ "argsarray": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/argsarray/-/argsarray-0.0.1.tgz",
+ "integrity": "sha1-bnIHtOzbObCviDA/pa4ivajfYcs="
+ },
"asar": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/asar/-/asar-3.0.3.tgz",
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
"integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==",
- "optional": true,
"requires": {
"safer-buffer": "~2.1.0"
}
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
- "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
- "optional": true
+ "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
},
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
- "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
- "optional": true
+ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
},
"at-least-node": {
"version": "1.0.0",
"integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==",
"dev": true
},
+ "attempt-x": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/attempt-x/-/attempt-x-1.1.3.tgz",
+ "integrity": "sha512-y/+ek8IjxVpTbj/phC87jK5YRhlP5Uu7FlQdCmYuut1DTjNruyrGqUWi5bcX1VKsQX1B0FX16A1hqHomKpHv3A=="
+ },
"author-regex": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/author-regex/-/author-regex-1.0.0.tgz",
"aws-sign2": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
- "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=",
- "optional": true
+ "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg="
},
"aws4": {
"version": "1.10.1",
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.1.tgz",
- "integrity": "sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA==",
- "optional": true
+ "integrity": "sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA=="
},
"balanced-match": {
"version": "1.0.0",
"base64-js": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz",
- "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==",
- "dev": true
+ "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g=="
},
"bcrypt-pbkdf": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
"integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
- "optional": true,
"requires": {
"tweetnacl": "^0.14.3"
}
"dev": true,
"optional": true
},
+ "boom": {
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz",
+ "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=",
+ "requires": {
+ "hoek": "4.x.x"
+ }
+ },
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"concat-map": "0.0.1"
}
},
+ "btoa": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/btoa/-/btoa-1.2.1.tgz",
+ "integrity": "sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g=="
+ },
+ "buffer": {
+ "version": "5.7.1",
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
+ "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
+ "requires": {
+ "base64-js": "^1.3.1",
+ "ieee754": "^1.1.13"
+ }
+ },
"buffer-alloc": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz",
"buffer-from": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
- "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
- "dev": true
+ "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A=="
},
"cacheable-request": {
"version": "6.1.0",
}
}
},
+ "cached-constructors-x": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/cached-constructors-x/-/cached-constructors-x-1.0.2.tgz",
+ "integrity": "sha512-7lKwmwXweW6E/31RHAJemLtZPfb2xvcABXknFF4b/dNYv4DbSGTgQHckXLQkNw6BB4HKFYW6mJgsNjADAy1ehw=="
+ },
"carbone": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/carbone/-/carbone-2.1.1.tgz",
"caseless": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
- "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=",
- "optional": true
+ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
},
"chownr": {
"version": "1.1.4",
"integrity": "sha1-BKEGZywYsIWrd02YPfo+oTjyIgU=",
"dev": true
},
+ "clone-buffer": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz",
+ "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg="
+ },
"clone-response": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz",
"mimic-response": "^1.0.0"
}
},
+ "co": {
+ "version": "4.6.0",
+ "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
+ "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ="
+ },
"code-point-at": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
- "optional": true,
"requires": {
"delayed-stream": "~1.0.0"
}
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
+ "cryptiles": {
+ "version": "3.1.4",
+ "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.4.tgz",
+ "integrity": "sha512-8I1sgZHfVwcSOY6mSGpVU3lw/GSIZvusg8dD2+OGehCJpOhQRLNcH0qb9upQnOH4XhgxxFJSg6E2kx95deb1Tw==",
+ "requires": {
+ "boom": "5.x.x"
+ },
+ "dependencies": {
+ "boom": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz",
+ "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==",
+ "requires": {
+ "hoek": "4.x.x"
+ }
+ }
+ }
+ },
"dashdash": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
"integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
- "optional": true,
"requires": {
"assert-plus": "^1.0.0"
}
"integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==",
"dev": true
},
+ "deferred-leveldown": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-5.3.0.tgz",
+ "integrity": "sha512-a59VOT+oDy7vtAbLRCZwWgxu2BaCfd5Hk7wxJd48ei7I+nsg8Orlb9CLG0PMZienk9BSUKgeAqkO2+Lw+1+Ukw==",
+ "requires": {
+ "abstract-leveldown": "~6.2.1",
+ "inherits": "^2.0.3"
+ }
+ },
"define-properties": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
- "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
- "optional": true
+ "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
},
"delegates": {
"version": "1.0.0",
"dev": true,
"optional": true
},
+ "double-ended-queue": {
+ "version": "2.1.0-0",
+ "resolved": "https://registry.npmjs.org/double-ended-queue/-/double-ended-queue-2.1.0-0.tgz",
+ "integrity": "sha1-ED01J/0xUo9AGIEwyEHv3XgmTlw="
+ },
"duplexer3": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz",
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
"integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
- "optional": true,
"requires": {
"jsbn": "~0.1.0",
"safer-buffer": "^2.1.0"
"dev": true,
"optional": true
},
+ "encoding-down": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/encoding-down/-/encoding-down-6.3.0.tgz",
+ "integrity": "sha512-QKrV0iKR6MZVJV08QY0wp1e7vF6QbhnbQhb07bwpEyuz4uZiZgPlEGdkCROuFkUwdxlFaiPIhjyarH1ee/3vhw==",
+ "requires": {
+ "abstract-leveldown": "^6.2.1",
+ "inherits": "^2.0.3",
+ "level-codec": "^9.0.0",
+ "level-errors": "^2.0.0"
+ }
+ },
"encoding-japanese": {
"version": "1.0.30",
"resolved": "https://registry.npmjs.org/encoding-japanese/-/encoding-japanese-1.0.30.tgz",
"once": "^1.4.0"
}
},
+ "end-stream": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/end-stream/-/end-stream-0.1.0.tgz",
+ "integrity": "sha1-MgA/P0OKKwFDFoE3+PpumGbIHtU=",
+ "requires": {
+ "write-stream": "~0.4.3"
+ }
+ },
"env-paths": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.0.tgz",
"integrity": "sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA==",
"dev": true
},
+ "errno": {
+ "version": "0.1.8",
+ "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz",
+ "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==",
+ "requires": {
+ "prr": "~1.0.1"
+ }
+ },
"error-ex": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
"dev": true,
"optional": true
},
+ "event-target-shim": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
+ "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ=="
+ },
"extend": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
- "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",
- "optional": true
+ "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
},
"extract-zip": {
"version": "1.7.0",
"extsprintf": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
- "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
- "optional": true
+ "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
},
"fast-deep-equal": {
"version": "3.1.3",
"fast-json-stable-stringify": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
- "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
- "optional": true
+ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="
},
"fd-slicer": {
"version": "1.1.0",
"pend": "~1.2.0"
}
},
+ "fetch-cookie": {
+ "version": "0.10.1",
+ "resolved": "https://registry.npmjs.org/fetch-cookie/-/fetch-cookie-0.10.1.tgz",
+ "integrity": "sha512-beB+VEd4cNeVG1PY+ee74+PkuCQnik78pgLi5Ah/7qdUfov8IctU0vLUbBT8/10Ma5GMBeI4wtxhGrEfKNYs2g==",
+ "requires": {
+ "tough-cookie": "^2.3.3 || ^3.0.1 || ^4.0.0"
+ }
+ },
"filename-reserved-regex": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-2.0.0.tgz",
"forever-agent": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
- "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=",
- "optional": true
+ "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
},
"form-data": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
"integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
- "optional": true,
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.6",
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
"integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
- "optional": true,
"requires": {
"assert-plus": "^1.0.0"
}
"har-schema": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
- "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=",
- "optional": true
+ "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI="
},
"har-validator": {
"version": "5.1.5",
"har-schema": "^2.0.0"
}
},
+ "has-own-property-x": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/has-own-property-x/-/has-own-property-x-3.2.0.tgz",
+ "integrity": "sha512-HtRQTYpRFz/YVaQ7jh2mU5iorMAxFcML9FNOLMI1f8VNJ2K0hpOlXoi1a+nmVl6oUcGnhd6zYOFAVe7NUFStyQ==",
+ "requires": {
+ "cached-constructors-x": "^1.0.0",
+ "to-object-x": "^1.5.0",
+ "to-property-key-x": "^2.0.2"
+ }
+ },
+ "has-symbol-support-x": {
+ "version": "1.4.2",
+ "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz",
+ "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw=="
+ },
+ "has-symbols": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz",
+ "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg=="
+ },
+ "has-to-string-tag-x": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz",
+ "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==",
+ "requires": {
+ "has-symbol-support-x": "^1.4.1"
+ }
+ },
"has-unicode": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
"integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk="
},
+ "hawk": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz",
+ "integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==",
+ "requires": {
+ "boom": "4.x.x",
+ "cryptiles": "3.x.x",
+ "hoek": "4.x.x",
+ "sntp": "2.x.x"
+ }
+ },
+ "hoek": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz",
+ "integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA=="
+ },
"hosted-git-info": {
"version": "2.8.8",
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz",
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
"integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
- "optional": true,
"requires": {
"assert-plus": "^1.0.0",
"jsprim": "^1.2.2",
"safer-buffer": ">= 2.1.2 < 3"
}
},
+ "ieee754": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
+ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
+ },
"ignore-walk": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.3.tgz",
"minimatch": "^3.0.4"
}
},
+ "immediate": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.3.0.tgz",
+ "integrity": "sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q=="
+ },
+ "infinity-x": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/infinity-x/-/infinity-x-1.0.2.tgz",
+ "integrity": "sha512-2Ioz+exrAwlHxFBaDHQIbvUyjKFt0YjIal34/agfzx738aT1zBQwSU5A8Zgb1IQ2r24BtXrkeZZusxE40MyZaQ=="
+ },
"inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
"integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="
},
+ "is-array-buffer-x": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/is-array-buffer-x/-/is-array-buffer-x-1.7.0.tgz",
+ "integrity": "sha512-ufSZRMY2WZX5xyNvk0NOZAG7cgi35B/sGQDGqv8w0X7MoQ2GC9vedanJhuYTPaC4PUCqLQsda1w7NF+dPZmAJw==",
+ "requires": {
+ "attempt-x": "^1.1.0",
+ "has-to-string-tag-x": "^1.4.1",
+ "is-object-like-x": "^1.5.1",
+ "object-get-own-property-descriptor-x": "^3.2.0",
+ "to-string-tag-x": "^1.4.1"
+ }
+ },
"is-arrayish": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
"integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=",
"dev": true
},
+ "is-date-object": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz",
+ "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g=="
+ },
+ "is-falsey-x": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/is-falsey-x/-/is-falsey-x-1.0.3.tgz",
+ "integrity": "sha512-RWjusR6LXAhGa0Vus7aD1rwJuJwdJsvG3daAVMDvOAgvGuGm4eilNgoSuXhpv2/2qpLDvioAKTNb3t3XYidCNg==",
+ "requires": {
+ "to-boolean-x": "^1.0.2"
+ }
+ },
+ "is-finite-x": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/is-finite-x/-/is-finite-x-3.0.4.tgz",
+ "integrity": "sha512-wdSI5zk/Pl21HzGcLWFoFzuDa8gsgcqhwZGAZryL2eU7RKf7+g+q4jL2gGItrBs/YtspkjOrJ4JxXNZqquoAWA==",
+ "requires": {
+ "infinity-x": "^1.0.1",
+ "is-nan-x": "^1.0.2"
+ }
+ },
"is-fullwidth-code-point": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
"number-is-nan": "^1.0.0"
}
},
+ "is-function-x": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/is-function-x/-/is-function-x-3.3.0.tgz",
+ "integrity": "sha512-SreSSU1dlgYaXR5c0mm4qJHKYHIiGiEY+7Cd8/aRLLoMP/VvofD2XcWgBnP833ajpU5XzXbUSpfysnfKZLJFlg==",
+ "requires": {
+ "attempt-x": "^1.1.1",
+ "has-to-string-tag-x": "^1.4.1",
+ "is-falsey-x": "^1.0.1",
+ "is-primitive": "^2.0.0",
+ "normalize-space-x": "^3.0.0",
+ "replace-comments-x": "^2.0.0",
+ "to-boolean-x": "^1.0.1",
+ "to-string-tag-x": "^1.4.2"
+ },
+ "dependencies": {
+ "is-primitive": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz",
+ "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU="
+ }
+ }
+ },
+ "is-index-x": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/is-index-x/-/is-index-x-1.1.0.tgz",
+ "integrity": "sha512-qULKLMepQLGC8rSVdi8uF2vI4LiDrU9XSDg1D+Aa657GIB7GV1jHpga7uXgQvkt/cpQ5mVBHUFTpSehYSqT6+A==",
+ "requires": {
+ "math-clamp-x": "^1.2.0",
+ "max-safe-integer": "^1.0.1",
+ "to-integer-x": "^3.0.0",
+ "to-number-x": "^2.0.0",
+ "to-string-symbols-supported-x": "^1.0.0"
+ }
+ },
+ "is-nan-x": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/is-nan-x/-/is-nan-x-1.0.3.tgz",
+ "integrity": "sha512-WenNBLVGSZID8shogsB++42vF7gvotCfneXM9KMCAKwNPXa8VfAu/RWwpqvnK7dLOP4Z7uitocb0TZ6rAiOccA=="
+ },
+ "is-nil-x": {
+ "version": "1.4.2",
+ "resolved": "https://registry.npmjs.org/is-nil-x/-/is-nil-x-1.4.2.tgz",
+ "integrity": "sha512-9aDY7ir7IGb5HlgqL+b38v2YMxf8S7MEHHxjHGzUhijg2crq47RKdxL37bS6dU0VN87wy2IBZP4akgQtIXmyvg==",
+ "requires": {
+ "lodash.isnull": "^3.0.0",
+ "validate.io-undefined": "^1.0.3"
+ }
+ },
+ "is-object-like-x": {
+ "version": "1.7.1",
+ "resolved": "https://registry.npmjs.org/is-object-like-x/-/is-object-like-x-1.7.1.tgz",
+ "integrity": "sha512-89nz+kESAW2Y7udq+PdRX/dZnRN2WP1b19Gdv4OYE1Xjoekn1xf31l0ZPzT40qdPD7I2nveNFm9rxxI0vmnGHA==",
+ "requires": {
+ "is-function-x": "^3.3.0",
+ "is-primitive": "^3.0.0"
+ }
+ },
+ "is-primitive": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-3.0.1.tgz",
+ "integrity": "sha512-GljRxhWvlCNRfZyORiH77FwdFwGcMO620o37EOYC0ORWdq+WYNVqW0w2Juzew4M+L81l6/QS3t5gkkihyRqv9w=="
+ },
+ "is-string": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz",
+ "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ=="
+ },
+ "is-symbol": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz",
+ "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==",
+ "requires": {
+ "has-symbols": "^1.0.1"
+ }
+ },
"is-typedarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
- "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
- "optional": true
+ "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
},
"isarray": {
"version": "1.0.0",
"isstream": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
- "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
- "optional": true
+ "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
},
"jsbn": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
- "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
- "optional": true
+ "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM="
},
"json-buffer": {
"version": "3.0.0",
"json-schema": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
- "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=",
- "optional": true
+ "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="
},
"json-schema-traverse": {
"version": "0.4.1",
"json-stringify-safe": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
- "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=",
- "optional": true
+ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
},
"jsonfile": {
"version": "4.0.0",
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
"integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
- "optional": true,
"requires": {
"assert-plus": "1.0.0",
"extsprintf": "1.3.0",
"json-buffer": "3.0.0"
}
},
+ "level": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/level/-/level-6.0.1.tgz",
+ "integrity": "sha512-psRSqJZCsC/irNhfHzrVZbmPYXDcEYhA5TVNwr+V92jF44rbf86hqGp8fiT702FyiArScYIlPSBTDUASCVNSpw==",
+ "requires": {
+ "level-js": "^5.0.0",
+ "level-packager": "^5.1.0",
+ "leveldown": "^5.4.0"
+ }
+ },
+ "level-codec": {
+ "version": "9.0.2",
+ "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-9.0.2.tgz",
+ "integrity": "sha512-UyIwNb1lJBChJnGfjmO0OR+ezh2iVu1Kas3nvBS/BzGnx79dv6g7unpKIDNPMhfdTEGoc7mC8uAu51XEtX+FHQ==",
+ "requires": {
+ "buffer": "^5.6.0"
+ }
+ },
+ "level-concat-iterator": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz",
+ "integrity": "sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw=="
+ },
+ "level-errors": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-2.0.1.tgz",
+ "integrity": "sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw==",
+ "requires": {
+ "errno": "~0.1.1"
+ }
+ },
+ "level-iterator-stream": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-4.0.2.tgz",
+ "integrity": "sha512-ZSthfEqzGSOMWoUGhTXdX9jv26d32XJuHz/5YnuHZzH6wldfWMOVwI9TBtKcya4BKTyTt3XVA0A3cF3q5CY30Q==",
+ "requires": {
+ "inherits": "^2.0.4",
+ "readable-stream": "^3.4.0",
+ "xtend": "^4.0.2"
+ },
+ "dependencies": {
+ "readable-stream": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
+ "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
+ "requires": {
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
+ }
+ }
+ }
+ },
+ "level-js": {
+ "version": "5.0.2",
+ "resolved": "https://registry.npmjs.org/level-js/-/level-js-5.0.2.tgz",
+ "integrity": "sha512-SnBIDo2pdO5VXh02ZmtAyPP6/+6YTJg2ibLtl9C34pWvmtMEmRTWpra+qO/hifkUtBTOtfx6S9vLDjBsBK4gRg==",
+ "requires": {
+ "abstract-leveldown": "~6.2.3",
+ "buffer": "^5.5.0",
+ "inherits": "^2.0.3",
+ "ltgt": "^2.1.2"
+ }
+ },
+ "level-packager": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/level-packager/-/level-packager-5.1.1.tgz",
+ "integrity": "sha512-HMwMaQPlTC1IlcwT3+swhqf/NUO+ZhXVz6TY1zZIIZlIR0YSn8GtAAWmIvKjNY16ZkEg/JcpAuQskxsXqC0yOQ==",
+ "requires": {
+ "encoding-down": "^6.3.0",
+ "levelup": "^4.3.2"
+ }
+ },
+ "level-supports": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-1.0.1.tgz",
+ "integrity": "sha512-rXM7GYnW8gsl1vedTJIbzOrRv85c/2uCMpiiCzO2fndd06U/kUXEEU9evYn4zFggBOg36IsBW8LzqIpETwwQzg==",
+ "requires": {
+ "xtend": "^4.0.2"
+ }
+ },
+ "level-write-stream": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/level-write-stream/-/level-write-stream-1.0.0.tgz",
+ "integrity": "sha1-P3+7Z5pVE3wP6zA97nZuEu4Twdw=",
+ "requires": {
+ "end-stream": "~0.1.0"
+ }
+ },
+ "leveldown": {
+ "version": "5.6.0",
+ "resolved": "https://registry.npmjs.org/leveldown/-/leveldown-5.6.0.tgz",
+ "integrity": "sha512-iB8O/7Db9lPaITU1aA2txU/cBEXAt4vWwKQRrrWuS6XDgbP4QZGj9BL2aNbwb002atoQ/lIotJkfyzz+ygQnUQ==",
+ "requires": {
+ "abstract-leveldown": "~6.2.1",
+ "napi-macros": "~2.0.0",
+ "node-gyp-build": "~4.1.0"
+ }
+ },
+ "levelup": {
+ "version": "4.4.0",
+ "resolved": "https://registry.npmjs.org/levelup/-/levelup-4.4.0.tgz",
+ "integrity": "sha512-94++VFO3qN95cM/d6eBXvd894oJE0w3cInq9USsyQzzoJxmiYzPAocNcuGCPGGjoXqDVJcr3C1jzt1TSjyaiLQ==",
+ "requires": {
+ "deferred-leveldown": "~5.3.0",
+ "level-errors": "~2.0.0",
+ "level-iterator-stream": "~4.0.0",
+ "level-supports": "~1.0.0",
+ "xtend": "~4.0.0"
+ }
+ },
+ "lie": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz",
+ "integrity": "sha1-mkNrLMd0bKWd56QfpGmz77dr2H4=",
+ "requires": {
+ "immediate": "~3.0.5"
+ },
+ "dependencies": {
+ "immediate": {
+ "version": "3.0.6",
+ "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz",
+ "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps="
+ }
+ }
+ },
"load-json-file": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz",
"integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=",
"dev": true
},
+ "lodash.isnull": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/lodash.isnull/-/lodash.isnull-3.0.0.tgz",
+ "integrity": "sha1-+vvlnqHcon7teGU0A53YTC4HxW4="
+ },
"lowercase-keys": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz",
"integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==",
"dev": true
},
+ "ltgt": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz",
+ "integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU="
+ },
"matcher": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz",
"escape-string-regexp": "^4.0.0"
}
},
+ "math-clamp-x": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/math-clamp-x/-/math-clamp-x-1.2.0.tgz",
+ "integrity": "sha512-tqpjpBcIf9UulApz3EjWXqTZpMlr2vLN9PryC9ghoyCuRmqZaf3JJhPddzgQpJnKLi2QhoFnvKBFtJekAIBSYg==",
+ "requires": {
+ "to-number-x": "^2.0.0"
+ }
+ },
+ "math-sign-x": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/math-sign-x/-/math-sign-x-3.0.0.tgz",
+ "integrity": "sha512-OzPas41Pn4d16KHnaXmGxxY3/l3zK4OIXtmIwdhgZsxz4FDDcNnbrABYPg2vGfxIkaT9ezGnzDviRH7RfF44jQ==",
+ "requires": {
+ "is-nan-x": "^1.0.1",
+ "to-number-x": "^2.0.0"
+ }
+ },
+ "max-safe-integer": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/max-safe-integer/-/max-safe-integer-1.0.1.tgz",
+ "integrity": "sha1-84BgvixWPYwC5tSK85Ei/YO29BA="
+ },
"mime-db": {
"version": "1.44.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz",
- "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==",
- "optional": true
+ "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg=="
},
"mime-types": {
"version": "2.1.27",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz",
"integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==",
- "optional": true,
"requires": {
"mime-db": "1.44.0"
}
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
+ "nan-x": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/nan-x/-/nan-x-1.0.2.tgz",
+ "integrity": "sha512-dndRmy03JQEN+Nh6WjQl7/OstIozeEmrtWe4TE7mEqJ8W8oMD8m2tHjsLPWt//e3hLAeRSbs4pxMyc5pk/nCkQ=="
+ },
+ "napi-macros": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.0.0.tgz",
+ "integrity": "sha512-A0xLykHtARfueITVDernsAWdtIMbOJgKgcluwENp3AlsKN/PloyO10HtmoqnFAQAcxPkgZN7wdfPfEd0zNGxbg=="
+ },
"needle": {
"version": "2.5.2",
"resolved": "https://registry.npmjs.org/needle/-/needle-2.5.2.tgz",
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.0.tgz",
"integrity": "sha512-ASCL5U13as7HhOExbT6OlWJJUV/lLzL2voOSP1UVehpRD8FbSrSDjfScK/KwAvVTI5AS6r4VwbOMlIqtvRidnA=="
},
+ "node-fetch": {
+ "version": "2.6.0",
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz",
+ "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA=="
+ },
"node-gyp": {
"version": "3.8.0",
"resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.8.0.tgz",
}
}
},
+ "node-gyp-build": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.1.1.tgz",
+ "integrity": "sha512-dSq1xmcPDKPZ2EED2S6zw/b9NKsqzXRE6dVr8TVQnI3FJOTteUMuqF3Qqs6LZg+mLGYJWqQzMbIjMtJqTv87nQ=="
+ },
"node-pre-gyp": {
"version": "0.11.0",
"resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.11.0.tgz",
}
}
},
+ "normalize-space-x": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/normalize-space-x/-/normalize-space-x-3.0.0.tgz",
+ "integrity": "sha512-tbCJerqZCCHPst4rRKgsTanLf45fjOyeAU5zE3mhDxJtFJKt66q39g2XArWhXelgTFVib8mNBUm6Wrd0LxYcfQ==",
+ "requires": {
+ "cached-constructors-x": "^1.0.0",
+ "trim-x": "^3.0.0",
+ "white-space-x": "^3.0.0"
+ }
+ },
"normalize-url": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
},
+ "object-get-own-property-descriptor-x": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/object-get-own-property-descriptor-x/-/object-get-own-property-descriptor-x-3.2.0.tgz",
+ "integrity": "sha512-Z/0fIrptD9YuzN+SNK/1kxAEaBcPQM4gSrtOSMSi9eplnL/AbyQcAyAlreAoAzmBon+DQ1Z+AdhxyQSvav5Fyg==",
+ "requires": {
+ "attempt-x": "^1.1.0",
+ "has-own-property-x": "^3.1.1",
+ "has-symbol-support-x": "^1.4.1",
+ "is-falsey-x": "^1.0.0",
+ "is-index-x": "^1.0.0",
+ "is-primitive": "^2.0.0",
+ "is-string": "^1.0.4",
+ "property-is-enumerable-x": "^1.1.0",
+ "to-object-x": "^1.4.1",
+ "to-property-key-x": "^2.0.1"
+ },
+ "dependencies": {
+ "is-primitive": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz",
+ "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU="
+ }
+ }
+ },
"object-keys": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
"author-regex": "^1.0.0"
}
},
+ "parse-int-x": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/parse-int-x/-/parse-int-x-2.0.0.tgz",
+ "integrity": "sha512-NIMm52gmd1+0qxJK8lV3OZ4zzWpRH1xcz9xCHXl+DNzddwUdS4NEtd7BmTeK7iCIXoaK5e6BoDMHgieH2eNIhg==",
+ "requires": {
+ "cached-constructors-x": "^1.0.0",
+ "nan-x": "^1.0.0",
+ "to-string-x": "^1.4.2",
+ "trim-left-x": "^3.0.0"
+ }
+ },
"parse-json": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
"performance-now": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
- "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=",
- "optional": true
+ "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
},
"pify": {
"version": "3.0.0",
"xmldom": "0.1.x"
}
},
+ "pouchdb": {
+ "version": "7.2.2",
+ "resolved": "https://registry.npmjs.org/pouchdb/-/pouchdb-7.2.2.tgz",
+ "integrity": "sha512-5gf5nw5XH/2H/DJj8b0YkvG9fhA/4Jt6kL0Y8QjtztVjb1y4J19Rg4rG+fUbXu96gsUrlyIvZ3XfM0b4mogGmw==",
+ "requires": {
+ "abort-controller": "3.0.0",
+ "argsarray": "0.0.1",
+ "buffer-from": "1.1.1",
+ "clone-buffer": "1.0.0",
+ "double-ended-queue": "2.1.0-0",
+ "fetch-cookie": "0.10.1",
+ "immediate": "3.3.0",
+ "inherits": "2.0.4",
+ "level": "6.0.1",
+ "level-codec": "9.0.2",
+ "level-write-stream": "1.0.0",
+ "leveldown": "5.6.0",
+ "levelup": "4.4.0",
+ "ltgt": "2.2.1",
+ "node-fetch": "2.6.0",
+ "readable-stream": "1.1.14",
+ "spark-md5": "3.0.1",
+ "through2": "3.0.2",
+ "uuid": "8.1.0",
+ "vuvuzela": "1.0.3"
+ },
+ "dependencies": {
+ "isarray": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
+ "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
+ },
+ "readable-stream": {
+ "version": "1.1.14",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
+ "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
+ "requires": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.1",
+ "isarray": "0.0.1",
+ "string_decoder": "~0.10.x"
+ }
+ },
+ "string_decoder": {
+ "version": "0.10.31",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+ "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
+ },
+ "uuid": {
+ "version": "8.1.0",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.1.0.tgz",
+ "integrity": "sha512-CI18flHDznR0lq54xBycOVmphdCYnQLKn8abKn7PXUiKUGdEd+/l9LWNJmugXel4hXq7S+RMNl34ecyC9TntWg=="
+ }
+ }
+ },
+ "pouchdb-ajax": {
+ "version": "6.4.3",
+ "resolved": "https://registry.npmjs.org/pouchdb-ajax/-/pouchdb-ajax-6.4.3.tgz",
+ "integrity": "sha512-3ySZrbEYjbosXShWFLk3xW8prrrUOG8z5aXKy+6lK/nokqdpqGj9NQX/gffy15VcDswbJyQtKpVQRevQlLuAGA==",
+ "requires": {
+ "buffer-from": "0.1.1",
+ "pouchdb-binary-utils": "6.4.3",
+ "pouchdb-errors": "6.4.3",
+ "pouchdb-promise": "6.4.3",
+ "pouchdb-utils": "6.4.3",
+ "request": "2.83.0"
+ },
+ "dependencies": {
+ "ajv": {
+ "version": "5.5.2",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz",
+ "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=",
+ "requires": {
+ "co": "^4.6.0",
+ "fast-deep-equal": "^1.0.0",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.3.0"
+ }
+ },
+ "buffer-from": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-0.1.1.tgz",
+ "integrity": "sha1-V7GLHaChnsBvM4N6UnWiQjUb114=",
+ "requires": {
+ "is-array-buffer-x": "^1.0.13"
+ }
+ },
+ "fast-deep-equal": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz",
+ "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ="
+ },
+ "har-validator": {
+ "version": "5.0.3",
+ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz",
+ "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=",
+ "requires": {
+ "ajv": "^5.1.0",
+ "har-schema": "^2.0.0"
+ }
+ },
+ "json-schema-traverse": {
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz",
+ "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A="
+ },
+ "oauth-sign": {
+ "version": "0.8.2",
+ "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz",
+ "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM="
+ },
+ "punycode": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
+ "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4="
+ },
+ "request": {
+ "version": "2.83.0",
+ "resolved": "https://registry.npmjs.org/request/-/request-2.83.0.tgz",
+ "integrity": "sha512-lR3gD69osqm6EYLk9wB/G1W/laGWjzH90t1vEa2xuxHD5KUrSzp9pUSfTm+YC5Nxt2T8nMPEvKlhbQayU7bgFw==",
+ "requires": {
+ "aws-sign2": "~0.7.0",
+ "aws4": "^1.6.0",
+ "caseless": "~0.12.0",
+ "combined-stream": "~1.0.5",
+ "extend": "~3.0.1",
+ "forever-agent": "~0.6.1",
+ "form-data": "~2.3.1",
+ "har-validator": "~5.0.3",
+ "hawk": "~6.0.2",
+ "http-signature": "~1.2.0",
+ "is-typedarray": "~1.0.0",
+ "isstream": "~0.1.2",
+ "json-stringify-safe": "~5.0.1",
+ "mime-types": "~2.1.17",
+ "oauth-sign": "~0.8.2",
+ "performance-now": "^2.1.0",
+ "qs": "~6.5.1",
+ "safe-buffer": "^5.1.1",
+ "stringstream": "~0.0.5",
+ "tough-cookie": "~2.3.3",
+ "tunnel-agent": "^0.6.0",
+ "uuid": "^3.1.0"
+ }
+ },
+ "tough-cookie": {
+ "version": "2.3.4",
+ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz",
+ "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==",
+ "requires": {
+ "punycode": "^1.4.1"
+ }
+ }
+ }
+ },
+ "pouchdb-authentication": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/pouchdb-authentication/-/pouchdb-authentication-1.1.3.tgz",
+ "integrity": "sha512-xzxmqAK6+rtJlVcFwebLBDlY0dDD5aqEb+bT0xStFp3s6HPC1QEa9C1NzkBScNBb8UG2BygTrVRMJzJLTR2LrA==",
+ "requires": {
+ "inherits": "2.0.3",
+ "pouchdb-ajax": "~6.4.0",
+ "pouchdb-binary-utils": "~6.4.0",
+ "pouchdb-promise": "~6.4.0",
+ "pouchdb-utils": "~6.4.0",
+ "url-join": "4.0.0",
+ "url-parse": "1.2.0"
+ },
+ "dependencies": {
+ "inherits": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
+ }
+ }
+ },
+ "pouchdb-binary-utils": {
+ "version": "6.4.3",
+ "resolved": "https://registry.npmjs.org/pouchdb-binary-utils/-/pouchdb-binary-utils-6.4.3.tgz",
+ "integrity": "sha512-eRKH/1eiZwrqNdAR3CL1XIIkq04I9hHIABHwIRboz1LjBSchKmaf4ZDngiWGDvRYT9Gl/MogGDGOk1WRMoV4wg==",
+ "requires": {
+ "buffer-from": "0.1.1"
+ },
+ "dependencies": {
+ "buffer-from": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-0.1.1.tgz",
+ "integrity": "sha1-V7GLHaChnsBvM4N6UnWiQjUb114=",
+ "requires": {
+ "is-array-buffer-x": "^1.0.13"
+ }
+ }
+ }
+ },
+ "pouchdb-collections": {
+ "version": "6.4.3",
+ "resolved": "https://registry.npmjs.org/pouchdb-collections/-/pouchdb-collections-6.4.3.tgz",
+ "integrity": "sha512-uWb9+hvjiijeyrCeEz/FUND1oj0AQK/f166egBOTofNlAwQLNrJUTn+uJ34b3NODAmKhg7+ZeDVvnl9D2pijuQ=="
+ },
+ "pouchdb-errors": {
+ "version": "6.4.3",
+ "resolved": "https://registry.npmjs.org/pouchdb-errors/-/pouchdb-errors-6.4.3.tgz",
+ "integrity": "sha512-EU83ZZJjorwGL9DQZ9HAILY8D+ulX2RYVMtsCfIuzaIJEUrHh/dhSIy5854n42NBOUWug3gFDyO58w5k+64HTQ==",
+ "requires": {
+ "inherits": "2.0.3"
+ },
+ "dependencies": {
+ "inherits": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
+ }
+ }
+ },
+ "pouchdb-promise": {
+ "version": "6.4.3",
+ "resolved": "https://registry.npmjs.org/pouchdb-promise/-/pouchdb-promise-6.4.3.tgz",
+ "integrity": "sha512-ruJaSFXwzsxRHQfwNHjQfsj58LBOY1RzGzde4PM5CWINZwFjCQAhZwfMrch2o/0oZT6d+Xtt0HTWhq35p3b0qw==",
+ "requires": {
+ "lie": "3.1.1"
+ }
+ },
+ "pouchdb-utils": {
+ "version": "6.4.3",
+ "resolved": "https://registry.npmjs.org/pouchdb-utils/-/pouchdb-utils-6.4.3.tgz",
+ "integrity": "sha512-22QXh743YXl/afheeumrUKsO/0Q4Q8bvoboFp/1quXq//BDJa9nv55WUZX0l05t3VPW+nD/pse2FzU9cs3nEag==",
+ "requires": {
+ "argsarray": "0.0.1",
+ "clone-buffer": "1.0.0",
+ "immediate": "3.0.6",
+ "inherits": "2.0.3",
+ "pouchdb-collections": "6.4.3",
+ "pouchdb-errors": "6.4.3",
+ "pouchdb-promise": "6.4.3",
+ "uuid": "3.2.1"
+ },
+ "dependencies": {
+ "immediate": {
+ "version": "3.0.6",
+ "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz",
+ "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps="
+ },
+ "inherits": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
+ },
+ "uuid": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz",
+ "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA=="
+ }
+ }
+ },
"prepend-http": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz",
"integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
"dev": true
},
+ "property-is-enumerable-x": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/property-is-enumerable-x/-/property-is-enumerable-x-1.1.0.tgz",
+ "integrity": "sha512-22cKy3w3OpRswU6to9iKWDDlg+F9vF2REcwGlGW23jyLjHb1U/jJEWA44sWupOnkhGfDgotU6Lw+N2oyhNi+5A==",
+ "requires": {
+ "to-object-x": "^1.4.1",
+ "to-property-key-x": "^2.0.1"
+ }
+ },
"proto-list": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz",
"dev": true,
"optional": true
},
+ "prr": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz",
+ "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY="
+ },
"psl": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz",
- "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==",
- "optional": true
+ "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ=="
},
"pump": {
"version": "3.0.0",
"punycode": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
- "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
- "optional": true
+ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
},
"qs": {
"version": "6.5.2",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
- "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",
- "optional": true
+ "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
+ },
+ "querystringify": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-1.0.0.tgz",
+ "integrity": "sha1-YoYkIRLFtxL6ZU5SZlK/ahP/Bcs="
},
"rc": {
"version": "1.2.8",
"util-deprecate": "~1.0.1"
}
},
+ "replace-comments-x": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/replace-comments-x/-/replace-comments-x-2.0.0.tgz",
+ "integrity": "sha512-+vMP4jqU+8HboLWms6YMNEiaZG5hh1oR6ENCnGYDF/UQ7aYiJUK/8tcl3+KZAHRCKKa3gqzrfiarlUBHQSgRlg==",
+ "requires": {
+ "require-coercible-to-string-x": "^1.0.0",
+ "to-string-x": "^1.4.2"
+ }
+ },
"request": {
"version": "2.88.2",
"resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz",
"uuid": "^3.3.2"
}
},
+ "require-coercible-to-string-x": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/require-coercible-to-string-x/-/require-coercible-to-string-x-1.0.2.tgz",
+ "integrity": "sha512-GZ3BSCL0n/zhho8ITganW9FGPh0Kxhq71nCjck8Qau/30Wf4Po8a3XpQdzEMFiXCwZ/0m0E3lKSdSG8gkcIofQ==",
+ "requires": {
+ "require-object-coercible-x": "^1.4.3",
+ "to-string-x": "^1.4.5"
+ }
+ },
+ "require-object-coercible-x": {
+ "version": "1.4.3",
+ "resolved": "https://registry.npmjs.org/require-object-coercible-x/-/require-object-coercible-x-1.4.3.tgz",
+ "integrity": "sha512-5wEaS+NIiU5HLJQTqBQ+6XHtX7yplUS374j/H/nRDlc7rMWfENqp026jnUHWAOCZ+ekixkXuFHEnTF28oqqVLA==",
+ "requires": {
+ "is-nil-x": "^1.4.2"
+ }
+ },
+ "requires-port": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
+ "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8="
+ },
"resolve": {
"version": "1.17.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz",
"integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA=="
},
+ "sntp": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz",
+ "integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==",
+ "requires": {
+ "hoek": "4.x.x"
+ }
+ },
+ "spark-md5": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/spark-md5/-/spark-md5-3.0.1.tgz",
+ "integrity": "sha512-0tF3AGSD1ppQeuffsLDIOWlKUd3lS92tFxcsrh5Pe3ZphhnoK+oXIBTzOAThZCiuINZLvpiLH/1VS1/ANEJVig=="
+ },
"spdx-correct": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz",
"version": "1.16.1",
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz",
"integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==",
- "optional": true,
"requires": {
"asn1": "~0.2.3",
"assert-plus": "^1.0.0",
"safe-buffer": "~5.1.0"
}
},
+ "stringstream": {
+ "version": "0.0.6",
+ "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.6.tgz",
+ "integrity": "sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA=="
+ },
"strip-ansi": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"inherits": "2"
}
},
+ "through2": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.2.tgz",
+ "integrity": "sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ==",
+ "requires": {
+ "inherits": "^2.0.4",
+ "readable-stream": "2 || 3"
+ }
+ },
"timsort": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz",
"integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q="
},
+ "to-boolean-x": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/to-boolean-x/-/to-boolean-x-1.0.3.tgz",
+ "integrity": "sha512-kQiMyJUgFprL8J+0CfgJuaSFKJMs3EvFe27/6aj/hVzVZT0HY4aA1QjPldLNxzBmjhLcapp7CctYHuD8QqtS3g=="
+ },
+ "to-integer-x": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/to-integer-x/-/to-integer-x-3.0.0.tgz",
+ "integrity": "sha512-794L2Lpwjtynm7RxahJi2YdbRY75gTxUW27TMuN26UgwPkmJb/+HPhkFEFbz+E4vNoiP0dxq5tq5fkXoXLaK/w==",
+ "requires": {
+ "is-finite-x": "^3.0.2",
+ "is-nan-x": "^1.0.1",
+ "math-sign-x": "^3.0.0",
+ "to-number-x": "^2.0.0"
+ }
+ },
+ "to-number-x": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/to-number-x/-/to-number-x-2.0.0.tgz",
+ "integrity": "sha512-lGOnCoccUoSzjZ/9Uen8TC4+VFaQcFGhTroWTv2tYWxXgyJV1zqAZ8hEIMkez/Eo790fBMOjidTnQ/OJSCvAoQ==",
+ "requires": {
+ "cached-constructors-x": "^1.0.0",
+ "nan-x": "^1.0.0",
+ "parse-int-x": "^2.0.0",
+ "to-primitive-x": "^1.1.0",
+ "trim-x": "^3.0.0"
+ }
+ },
+ "to-object-x": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/to-object-x/-/to-object-x-1.5.0.tgz",
+ "integrity": "sha512-AKn5GQcdWky+s20vjWkt+Wa6y3dxQH3yQyMBhOfBOPldUwqwhgvlqcIg5H092ntNc+TX8/Cxzs1kMHH19pyCnA==",
+ "requires": {
+ "cached-constructors-x": "^1.0.0",
+ "require-object-coercible-x": "^1.4.1"
+ }
+ },
+ "to-primitive-x": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/to-primitive-x/-/to-primitive-x-1.1.0.tgz",
+ "integrity": "sha512-gyMY0gi3wjK3e4MUBKqv9Zl8QGcWguIkaUr2VJmoBEsOpDcpDZSEyljR773eVG4maS48uX7muLkoQoh/BA82OQ==",
+ "requires": {
+ "has-symbol-support-x": "^1.4.1",
+ "is-date-object": "^1.0.1",
+ "is-function-x": "^3.2.0",
+ "is-nil-x": "^1.4.1",
+ "is-primitive": "^2.0.0",
+ "is-symbol": "^1.0.1",
+ "require-object-coercible-x": "^1.4.1",
+ "validate.io-undefined": "^1.0.3"
+ },
+ "dependencies": {
+ "is-primitive": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz",
+ "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU="
+ }
+ }
+ },
+ "to-property-key-x": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/to-property-key-x/-/to-property-key-x-2.0.2.tgz",
+ "integrity": "sha512-YISLpZFYIazNm0P8hLsKEEUEZ3m8U3+eDysJZqTu3+B9tQp+2TrMpaEGT8Agh4fZ5LSoums60/glNEzk5ozqrg==",
+ "requires": {
+ "has-symbol-support-x": "^1.4.1",
+ "to-primitive-x": "^1.1.0",
+ "to-string-x": "^1.4.2"
+ }
+ },
"to-readable-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz",
"integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==",
"dev": true
},
+ "to-string-symbols-supported-x": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/to-string-symbols-supported-x/-/to-string-symbols-supported-x-1.0.2.tgz",
+ "integrity": "sha512-3MRqhIhSNVDsVAk4M6WNcuBZrAQe54W13xrXX6RzxXS+pA4nj6DQ96RegQS5z9BSNyYbFsBsPvMVDIpP+a/5RA==",
+ "requires": {
+ "cached-constructors-x": "^1.0.2",
+ "has-symbol-support-x": "^1.4.2",
+ "is-symbol": "^1.0.1"
+ }
+ },
+ "to-string-tag-x": {
+ "version": "1.4.3",
+ "resolved": "https://registry.npmjs.org/to-string-tag-x/-/to-string-tag-x-1.4.3.tgz",
+ "integrity": "sha512-5+0EZ6dOVt/XArXmkooxPzWxmOR081HM/uXitUow7h11WYg5pPo15uYqDWuqO7ZY+O3Atn/dG26wcJCK+mFevg==",
+ "requires": {
+ "lodash.isnull": "^3.0.0",
+ "validate.io-undefined": "^1.0.3"
+ }
+ },
+ "to-string-x": {
+ "version": "1.4.5",
+ "resolved": "https://registry.npmjs.org/to-string-x/-/to-string-x-1.4.5.tgz",
+ "integrity": "sha512-5xzlZDyDa9BUWNjNzZzHgKQ95PnV7qjvEhbqpFaj1ixaHgfJXOFaa3xdMJ+WLYd4hhaMJaxt8Pt5uKaWXfruXA==",
+ "requires": {
+ "cached-constructors-x": "^1.0.0",
+ "is-symbol": "^1.0.1"
+ }
+ },
"tough-cookie": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
"integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==",
- "optional": true,
"requires": {
"psl": "^1.1.28",
"punycode": "^2.1.1"
}
},
+ "trim-left-x": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/trim-left-x/-/trim-left-x-3.0.0.tgz",
+ "integrity": "sha512-+m6cqkppI+CxQBTwWEZliOHpOBnCArGyMnS1WCLb6IRgukhTkiQu/TNEN5Lj2eM9jk8ewJsc7WxFZfmwNpRXWQ==",
+ "requires": {
+ "cached-constructors-x": "^1.0.0",
+ "require-coercible-to-string-x": "^1.0.0",
+ "white-space-x": "^3.0.0"
+ }
+ },
"trim-repeated": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz",
}
}
},
+ "trim-right-x": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/trim-right-x/-/trim-right-x-3.0.0.tgz",
+ "integrity": "sha512-iIqEsWEbWVodqdixJHi4FoayJkUxhoL4AvSNGp4FF4FfQKRPGizt8++/RnyC9od75y7P/S6EfONoVqP+NddiKA==",
+ "requires": {
+ "cached-constructors-x": "^1.0.0",
+ "require-coercible-to-string-x": "^1.0.0",
+ "white-space-x": "^3.0.0"
+ }
+ },
+ "trim-x": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/trim-x/-/trim-x-3.0.0.tgz",
+ "integrity": "sha512-w8s38RAUScQ6t3XqMkS75iz5ZkIYLQpVnv2lp3IuTS36JdlVzC54oe6okOf4Wz3UH4rr3XAb2xR3kR5Xei82fw==",
+ "requires": {
+ "trim-left-x": "^3.0.0",
+ "trim-right-x": "^3.0.0"
+ }
+ },
"truncate-utf8-bytes": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz",
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
"integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
- "optional": true,
"requires": {
"safe-buffer": "^5.0.1"
}
"tweetnacl": {
"version": "0.14.5",
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
- "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
- "optional": true
+ "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q="
},
"type-fest": {
"version": "0.13.1",
"punycode": "^2.1.0"
}
},
+ "url-join": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.0.tgz",
+ "integrity": "sha1-TTNA6AfTdzvamZH4MFrNzCpmXSo="
+ },
+ "url-parse": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.2.0.tgz",
+ "integrity": "sha512-DT1XbYAfmQP65M/mE6OALxmXzZ/z1+e5zk2TcSKe/KiYbNGZxgtttzC0mR/sjopbpOXcbniq7eIKmocJnUWlEw==",
+ "requires": {
+ "querystringify": "~1.0.0",
+ "requires-port": "~1.0.0"
+ }
+ },
"url-parse-lax": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz",
"uuid": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
- "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
- "optional": true
+ "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A=="
},
"validate-npm-package-license": {
"version": "3.0.4",
"spdx-expression-parse": "^3.0.0"
}
},
+ "validate.io-undefined": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/validate.io-undefined/-/validate.io-undefined-1.0.3.tgz",
+ "integrity": "sha1-fif8uzFbhB54JDQxiXZxkp4gt/Q="
+ },
"verror": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
"integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
- "optional": true,
"requires": {
"assert-plus": "^1.0.0",
"core-util-is": "1.0.2",
"extsprintf": "^1.2.0"
}
},
+ "vuvuzela": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/vuvuzela/-/vuvuzela-1.0.3.tgz",
+ "integrity": "sha1-O+FF5YJxxzylUnndhR8SpoIRSws="
+ },
"which": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
"isexe": "^2.0.0"
}
},
+ "white-space-x": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/white-space-x/-/white-space-x-3.0.1.tgz",
+ "integrity": "sha512-BwMFXQNPna/4RsNPOgldVYn+FkEv+lc3wUiFzuaW6Z2DH/oSk1UrRD6SBqDgWQO4JU+aBq3PVuPD9Vz0j7mh0w=="
+ },
"wide-align": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
+ "write-stream": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/write-stream/-/write-stream-0.4.3.tgz",
+ "integrity": "sha1-g8yMA0fQr2BXqThitOOuAd5cgcE=",
+ "requires": {
+ "readable-stream": "~0.0.2"
+ },
+ "dependencies": {
+ "readable-stream": {
+ "version": "0.0.4",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-0.0.4.tgz",
+ "integrity": "sha1-8y124/uGM0SlSNeZIwBxc2ZbO40="
+ }
+ }
+ },
"xmlbuilder": {
"version": "9.0.7",
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz",
"integrity": "sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ==",
"dev": true
},
+ "xtend": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
+ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ=="
+ },
"yallist": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
},
"dependencies": {
"@kenjiuno/msgreader": "^1.4.0",
+ "btoa": "^1.2.1",
"carbone": "^2.1.1",
"eml-format2": "^0.5.0",
+ "pouchdb": "^7.2.2",
+ "pouchdb-authentication": "^1.1.3",
"sqlite3": "^5.0.0"
}
}
+++ /dev/null
-<!DOCTYPE html>
-<html lang="de">
- <head>
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
- <meta content="width=device-width, initial-scale=1.0" name="viewport">
- <link href="vendor/tabulator/css/tabulator_site.css?v=6" rel="stylesheet">
- <link href="vendor/slimselect/slimselect.css?v=6" rel="stylesheet">
- <link href="vendor/flatpickr/flatpickr.min.css?v=6" rel="stylesheet">
- <link href="vendor/flatpickr/themes/airbnb.css?v=6" rel="stylesheet">
- <link href="css/icons.css?v=6" rel="stylesheet">
- <link href="css/theme.css?v=6" rel="stylesheet">
- <title>Invoice Journal</title>
- </head>
- <body>
-
- <!-- BEGIN Page -->
- <div class="display-container" id="apppanels" style="height: calc(100vh - 5px);width: 100%; overflow-y: hidden;">
- <div class="display-container panel animate-opacity" id="pnl_index">
- <div class="container bar toolbar">
- <button class="bar-item toolbarbtn" onclick="myapp.gotoHome();"><img src="img/invoicejournal.png" style="height: 40px;"></button>
- <div class="bar-item PageHeadTitle">Invoice Journal</div>
- </div>
-
- </div>
-
- <!-- END Page -->
- </div><!-- BEGIN global dialogs -->
- <div id="dialogs">
-
- </div>
-
- <script src="vendor/tabulator/js/tabulator.js?v=6" type="text/javascript"></script>
- <script src="vendor/moment/moment-with-locales.min.js?v=6" type="text/javascript"></script>
- <script src="vendor/slimselect/slimselect.min.js?v=6" type="text/javascript"></script>
- <script src="vendor/flatpickr/flatpickr.min.js?v=6" type="text/javascript"></script>
- <script src="vendor/flatpickr/l10n/de.js?v=6" type="text/javascript"></script>
- <script src="vendor/mustache/mustache.min.js?v=6" type="text/javascript"></script>
- <!-- <script src="vendor/tinymce/js/tinymce/tinymce.min.js" type="text/javascript"></script> -->
- <script src="js/request.js?v=6" type="text/javascript"></script>
- <script src="js/myapp.js?v=6" type="text/javascript"></script>
- <script src="js/dataform.js?v=6" type="text/javascript"></script>
- <script src="js/timecalc.js?v=6" type="text/javascript"></script>
- <script src="js/renderer.js?v=6" type="text/javascript"></script>
- <script src="js/sqlite.js?v=6" type="text/javascript"></script>
- <script src="js/report.js?v=6" type="text/javascript"></script>
- <div id="modulescripts">
-
- </div>
\ No newline at end of file
min-height : 30px;
width : 100%;
padding : 0 0 0 3px;
- border : 1px solid #dcdee2;
- border-radius : 2px;
+ border : 0px solid #dcdee2;
+ border-radius : 0px;
background-color: #fff;
outline : 0;
box-sizing : border-box;
display : flex;
user-select : none;
align-items : center;
- font-size : 12px;
+ font-size : 12pt;
padding : 3px 5px;
margin : 3px 5px 3px 0px;
- color : #fff;
- background-color : #bbb;
+ color : #000;
+ background-color : #fff;
/* border-radius : 4px; */
animation-name : scaleIn;
animation-duration : .2s;
.ss-main .ss-multi-selected .ss-values .ss-value .ss-value-delete {
margin: 0 0 0 5px;
- cursor: pointer
+ cursor: pointer;
+ color: red;
}
.ss-main .ss-multi-selected .ss-add {
.ss-content .ss-search input {
display : inline-flex;
- font-size : inherit;
+ font-size : 12pt;
line-height : inherit;
flex : 1 1 auto;
width : 100%;
min-width : 0px;
height : 30px;
- padding : 6px 8px;
+ padding : 2px 2px;
margin : 0;
border : 1px solid #dcdee2;
- border-radius : 4px;
+ border-radius : 0px;
background-color : #fff;
outline : 0;
text-align : left;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var Accessor = function Accessor(table) {
this.table = table; //hold Tabulator object
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Accessor=function(o){this.table=o,this.allowedTypes=["","data","download","clipboard","print","htmlOutput"]};Accessor.prototype.initializeColumn=function(o){var e=this,s=!1,t={};this.allowedTypes.forEach(function(r){var c,a="accessor"+(r.charAt(0).toUpperCase()+r.slice(1));o.definition[a]&&(c=e.lookupAccessor(o.definition[a]))&&(s=!0,t[a]={accessor:c,params:o.definition[a+"Params"]||{}})}),s&&(o.modules.accessor=t)},Accessor.prototype.lookupAccessor=function(o){var e=!1;switch(void 0===o?"undefined":_typeof(o)){case"string":this.accessors[o]?e=this.accessors[o]:console.warn("Accessor Error - No such accessor found, ignoring: ",o);break;case"function":e=o}return e},Accessor.prototype.transformRow=function(o,e){var s="accessor"+(e.charAt(0).toUpperCase()+e.slice(1)),t=o.getComponent(),r=Tabulator.prototype.helpers.deepClone(o.data||{});return this.table.columnManager.traverse(function(o){var c,a,n,i;o.modules.accessor&&(a=o.modules.accessor[s]||o.modules.accessor.accessor||!1)&&"undefined"!=(c=o.getFieldValue(r))&&(i=o.getComponent(),n="function"==typeof a.params?a.params(c,r,e,i,t):a.params,o.setFieldValue(r,a.accessor(c,r,e,n,i,t)))}),r},Accessor.prototype.accessors={},Tabulator.prototype.registerModule("accessor",Accessor);
\ No newline at end of file
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var Ajax = function Ajax(table) {
self.loading = false;
- reject();
+ reject(error);
});
} else {
reject();
if (!config.method || config.method.toLowerCase() == "get") {
config.method = "get";
- url += (url.includes("?") ? "&" : "?") + this.serializeParams(params);
+ url += (url.includes("?") ? "&" : "?") + this.modules.ajax.serializeParams(params);
}
}
}
return new Promise(function (resolve, reject) {
//set url
- url = self.urlGenerator(url, config, params);
+ url = self.urlGenerator.call(self.table, url, config, params);
//set body content if not GET request
if (config.method.toUpperCase() != "GET") {
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
-var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ajax=function(e){this.table=e,this.config=!1,this.url="",this.urlGenerator=!1,this.params=!1,this.loaderElement=this.createLoaderElement(),this.msgElement=this.createMsgElement(),this.loadingElement=!1,this.errorElement=!1,this.loaderPromise=!1,this.progressiveLoad=!1,this.loading=!1,this.requestOrder=0};Ajax.prototype.initialize=function(){var e;this.loaderElement.appendChild(this.msgElement),this.table.options.ajaxLoaderLoading&&("string"==typeof this.table.options.ajaxLoaderLoading?(e=document.createElement("template"),e.innerHTML=this.table.options.ajaxLoaderLoading.trim(),this.loadingElement=e.content.firstChild):this.loadingElement=this.table.options.ajaxLoaderLoading),this.loaderPromise=this.table.options.ajaxRequestFunc||this.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||this.defaultURLGenerator,this.table.options.ajaxLoaderError&&("string"==typeof this.table.options.ajaxLoaderError?(e=document.createElement("template"),e.innerHTML=this.table.options.ajaxLoaderError.trim(),this.errorElement=e.content.firstChild):this.errorElement=this.table.options.ajaxLoaderError),this.table.options.ajaxParams&&this.setParams(this.table.options.ajaxParams),this.table.options.ajaxConfig&&this.setConfig(this.table.options.ajaxConfig),this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.table.options.ajaxProgressiveLoad&&(this.table.options.pagination?(this.progressiveLoad=!1,console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time")):this.table.modExists("page")?(this.progressiveLoad=this.table.options.ajaxProgressiveLoad,this.table.modules.page.initializeProgressive(this.progressiveLoad)):console.error("Pagination plugin is required for progressive ajax loading"))},Ajax.prototype.createLoaderElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-loader"),e},Ajax.prototype.createMsgElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-loader-msg"),e.setAttribute("role","alert"),e},Ajax.prototype.setParams=function(e,t){if(t){this.params=this.params||{};for(var o in e)this.params[o]=e[o]}else this.params=e},Ajax.prototype.getParams=function(){return this.params||{}},Ajax.prototype.setConfig=function(e){if(this._loadDefaultConfig(),"string"==typeof e)this.config.method=e;else for(var t in e)this.config[t]=e[t]},Ajax.prototype._loadDefaultConfig=function(e){var t=this;if(!t.config||e){t.config={};for(var o in t.defaultConfig)t.config[o]=t.defaultConfig[o]}},Ajax.prototype.setUrl=function(e){this.url=e},Ajax.prototype.getUrl=function(){return this.url},Ajax.prototype.loadData=function(e,t){return this.progressiveLoad?this._loadDataProgressive():this._loadDataStandard(e,t)},Ajax.prototype.nextPage=function(e){var t;this.loading||(t=this.table.options.ajaxProgressiveLoadScrollMargin||2*this.table.rowManager.getElement().clientHeight,e<t&&this.table.modules.page.nextPage().then(function(){}).catch(function(){}))},Ajax.prototype.blockActiveRequest=function(){this.requestOrder++},Ajax.prototype._loadDataProgressive=function(){return this.table.rowManager.setData([]),this.table.modules.page.setPage(1)},Ajax.prototype._loadDataStandard=function(e,t){var o=this;return new Promise(function(a,r){o.sendRequest(e).then(function(i){o.table.rowManager.setData(i,e,t).then(function(){a()}).catch(function(e){r(e)})}).catch(function(e){r(e)})})},Ajax.prototype.generateParamsList=function(e,t){var o=this,a=[];if(t=t||"",Array.isArray(e))e.forEach(function(e,r){a=a.concat(o.generateParamsList(e,t?t+"["+r+"]":r))});else if("object"===(void 0===e?"undefined":_typeof(e)))for(var r in e)a=a.concat(o.generateParamsList(e[r],t?t+"["+r+"]":r));else a.push({key:t,value:e});return a},Ajax.prototype.serializeParams=function(e){var t=this.generateParamsList(e),o=[];return t.forEach(function(e){o.push(encodeURIComponent(e.key)+"="+encodeURIComponent(e.value))}),o.join("&")},Ajax.prototype.sendRequest=function(e){var t,o=this,a=this,r=a.url;return a.requestOrder++,t=a.requestOrder,a._loadDefaultConfig(),new Promise(function(i,n){!1!==a.table.options.ajaxRequesting.call(o.table,a.url,a.params)?(a.loading=!0,e||a.showLoader(),o.loaderPromise(r,a.config,a.params).then(function(e){t===a.requestOrder?(a.table.options.ajaxResponse&&(e=a.table.options.ajaxResponse.call(a.table,a.url,a.params,e)),i(e),a.hideLoader(),a.loading=!1):console.warn("Ajax Response Blocked - An active ajax request was blocked by an attempt to change table data while the request was being made")}).catch(function(e){console.error("Ajax Load Error: ",e),a.table.options.ajaxError.call(a.table,e),a.showError(),setTimeout(function(){a.hideLoader()},3e3),a.loading=!1,n()})):n()})},Ajax.prototype.showLoader=function(){if("function"==typeof this.table.options.ajaxLoader?this.table.options.ajaxLoader():this.table.options.ajaxLoader){for(this.hideLoader();this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.remove("tabulator-error"),this.msgElement.classList.add("tabulator-loading"),this.loadingElement?this.msgElement.appendChild(this.loadingElement):this.msgElement.innerHTML=this.table.modules.localize.getText("ajax|loading"),this.table.element.appendChild(this.loaderElement)}},Ajax.prototype.showError=function(){for(this.hideLoader();this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.remove("tabulator-loading"),this.msgElement.classList.add("tabulator-error"),this.errorElement?this.msgElement.appendChild(this.errorElement):this.msgElement.innerHTML=this.table.modules.localize.getText("ajax|error"),this.table.element.appendChild(this.loaderElement)},Ajax.prototype.hideLoader=function(){this.loaderElement.parentNode&&this.loaderElement.parentNode.removeChild(this.loaderElement)},Ajax.prototype.defaultConfig={method:"GET"},Ajax.prototype.defaultURLGenerator=function(e,t,o){return e&&o&&Object.keys(o).length&&(t.method&&"get"!=t.method.toLowerCase()||(t.method="get",e+=(e.includes("?")?"&":"?")+this.serializeParams(o))),e},Ajax.prototype.defaultLoaderPromise=function(e,t,o){var a,r=this;return new Promise(function(i,n){if(e=r.urlGenerator(e,t,o),"GET"!=t.method.toUpperCase())if(a="object"===_typeof(r.table.options.ajaxContentType)?r.table.options.ajaxContentType:r.contentTypeFormatters[r.table.options.ajaxContentType]){for(var s in a.headers)t.headers||(t.headers={}),void 0===t.headers[s]&&(t.headers[s]=a.headers[s]);t.body=a.body.call(r,e,t,o)}else console.warn("Ajax Error - Invalid ajaxContentType value:",r.table.options.ajaxContentType);e?(void 0===t.headers&&(t.headers={}),void 0===t.headers.Accept&&(t.headers.Accept="application/json"),void 0===t.headers["X-Requested-With"]&&(t.headers["X-Requested-With"]="XMLHttpRequest"),void 0===t.mode&&(t.mode="cors"),"cors"==t.mode?(void 0===t.headers["Access-Control-Allow-Origin"]&&(t.headers["Access-Control-Allow-Origin"]=window.location.origin),void 0===t.credentials&&(t.credentials="same-origin")):void 0===t.credentials&&(t.credentials="include"),fetch(e,t).then(function(e){e.ok?e.json().then(function(e){i(e)}).catch(function(e){n(e),console.warn("Ajax Load Error - Invalid JSON returned",e)}):(console.error("Ajax Load Error - Connection Error: "+e.status,e.statusText),n(e))}).catch(function(e){console.error("Ajax Load Error - Connection Error: ",e),n(e)})):(console.warn("Ajax Load Error - No URL Set"),i([]))})},Ajax.prototype.contentTypeFormatters={json:{headers:{"Content-Type":"application/json"},body:function(e,t,o){return JSON.stringify(o)}},form:{headers:{},body:function(e,t,o){var a=this.generateParamsList(o),r=new FormData;return a.forEach(function(e){r.append(e.key,e.value)}),r}}},Tabulator.prototype.registerModule("ajax",Ajax);
\ No newline at end of file
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
+var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ajax=function(e){this.table=e,this.config=!1,this.url="",this.urlGenerator=!1,this.params=!1,this.loaderElement=this.createLoaderElement(),this.msgElement=this.createMsgElement(),this.loadingElement=!1,this.errorElement=!1,this.loaderPromise=!1,this.progressiveLoad=!1,this.loading=!1,this.requestOrder=0};Ajax.prototype.initialize=function(){var e;this.loaderElement.appendChild(this.msgElement),this.table.options.ajaxLoaderLoading&&("string"==typeof this.table.options.ajaxLoaderLoading?(e=document.createElement("template"),e.innerHTML=this.table.options.ajaxLoaderLoading.trim(),this.loadingElement=e.content.firstChild):this.loadingElement=this.table.options.ajaxLoaderLoading),this.loaderPromise=this.table.options.ajaxRequestFunc||this.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||this.defaultURLGenerator,this.table.options.ajaxLoaderError&&("string"==typeof this.table.options.ajaxLoaderError?(e=document.createElement("template"),e.innerHTML=this.table.options.ajaxLoaderError.trim(),this.errorElement=e.content.firstChild):this.errorElement=this.table.options.ajaxLoaderError),this.table.options.ajaxParams&&this.setParams(this.table.options.ajaxParams),this.table.options.ajaxConfig&&this.setConfig(this.table.options.ajaxConfig),this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.table.options.ajaxProgressiveLoad&&(this.table.options.pagination?(this.progressiveLoad=!1,console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time")):this.table.modExists("page")?(this.progressiveLoad=this.table.options.ajaxProgressiveLoad,this.table.modules.page.initializeProgressive(this.progressiveLoad)):console.error("Pagination plugin is required for progressive ajax loading"))},Ajax.prototype.createLoaderElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-loader"),e},Ajax.prototype.createMsgElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-loader-msg"),e.setAttribute("role","alert"),e},Ajax.prototype.setParams=function(e,t){if(t){this.params=this.params||{};for(var o in e)this.params[o]=e[o]}else this.params=e},Ajax.prototype.getParams=function(){return this.params||{}},Ajax.prototype.setConfig=function(e){if(this._loadDefaultConfig(),"string"==typeof e)this.config.method=e;else for(var t in e)this.config[t]=e[t]},Ajax.prototype._loadDefaultConfig=function(e){var t=this;if(!t.config||e){t.config={};for(var o in t.defaultConfig)t.config[o]=t.defaultConfig[o]}},Ajax.prototype.setUrl=function(e){this.url=e},Ajax.prototype.getUrl=function(){return this.url},Ajax.prototype.loadData=function(e,t){return this.progressiveLoad?this._loadDataProgressive():this._loadDataStandard(e,t)},Ajax.prototype.nextPage=function(e){var t;this.loading||(t=this.table.options.ajaxProgressiveLoadScrollMargin||2*this.table.rowManager.getElement().clientHeight,e<t&&this.table.modules.page.nextPage().then(function(){}).catch(function(){}))},Ajax.prototype.blockActiveRequest=function(){this.requestOrder++},Ajax.prototype._loadDataProgressive=function(){return this.table.rowManager.setData([]),this.table.modules.page.setPage(1)},Ajax.prototype._loadDataStandard=function(e,t){var o=this;return new Promise(function(a,r){o.sendRequest(e).then(function(i){o.table.rowManager.setData(i,e,t).then(function(){a()}).catch(function(e){r(e)})}).catch(function(e){r(e)})})},Ajax.prototype.generateParamsList=function(e,t){var o=this,a=[];if(t=t||"",Array.isArray(e))e.forEach(function(e,r){a=a.concat(o.generateParamsList(e,t?t+"["+r+"]":r))});else if("object"===(void 0===e?"undefined":_typeof(e)))for(var r in e)a=a.concat(o.generateParamsList(e[r],t?t+"["+r+"]":r));else a.push({key:t,value:e});return a},Ajax.prototype.serializeParams=function(e){var t=this.generateParamsList(e),o=[];return t.forEach(function(e){o.push(encodeURIComponent(e.key)+"="+encodeURIComponent(e.value))}),o.join("&")},Ajax.prototype.sendRequest=function(e){var t,o=this,a=this,r=a.url;return a.requestOrder++,t=a.requestOrder,a._loadDefaultConfig(),new Promise(function(i,n){!1!==a.table.options.ajaxRequesting.call(o.table,a.url,a.params)?(a.loading=!0,e||a.showLoader(),o.loaderPromise(r,a.config,a.params).then(function(e){t===a.requestOrder?(a.table.options.ajaxResponse&&(e=a.table.options.ajaxResponse.call(a.table,a.url,a.params,e)),i(e),a.hideLoader(),a.loading=!1):console.warn("Ajax Response Blocked - An active ajax request was blocked by an attempt to change table data while the request was being made")}).catch(function(e){console.error("Ajax Load Error: ",e),a.table.options.ajaxError.call(a.table,e),a.showError(),setTimeout(function(){a.hideLoader()},3e3),a.loading=!1,n(e)})):n()})},Ajax.prototype.showLoader=function(){if("function"==typeof this.table.options.ajaxLoader?this.table.options.ajaxLoader():this.table.options.ajaxLoader){for(this.hideLoader();this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.remove("tabulator-error"),this.msgElement.classList.add("tabulator-loading"),this.loadingElement?this.msgElement.appendChild(this.loadingElement):this.msgElement.innerHTML=this.table.modules.localize.getText("ajax|loading"),this.table.element.appendChild(this.loaderElement)}},Ajax.prototype.showError=function(){for(this.hideLoader();this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.remove("tabulator-loading"),this.msgElement.classList.add("tabulator-error"),this.errorElement?this.msgElement.appendChild(this.errorElement):this.msgElement.innerHTML=this.table.modules.localize.getText("ajax|error"),this.table.element.appendChild(this.loaderElement)},Ajax.prototype.hideLoader=function(){this.loaderElement.parentNode&&this.loaderElement.parentNode.removeChild(this.loaderElement)},Ajax.prototype.defaultConfig={method:"GET"},Ajax.prototype.defaultURLGenerator=function(e,t,o){return e&&o&&Object.keys(o).length&&(t.method&&"get"!=t.method.toLowerCase()||(t.method="get",e+=(e.includes("?")?"&":"?")+this.modules.ajax.serializeParams(o))),e},Ajax.prototype.defaultLoaderPromise=function(e,t,o){var a,r=this;return new Promise(function(i,n){if(e=r.urlGenerator.call(r.table,e,t,o),"GET"!=t.method.toUpperCase())if(a="object"===_typeof(r.table.options.ajaxContentType)?r.table.options.ajaxContentType:r.contentTypeFormatters[r.table.options.ajaxContentType]){for(var s in a.headers)t.headers||(t.headers={}),void 0===t.headers[s]&&(t.headers[s]=a.headers[s]);t.body=a.body.call(r,e,t,o)}else console.warn("Ajax Error - Invalid ajaxContentType value:",r.table.options.ajaxContentType);e?(void 0===t.headers&&(t.headers={}),void 0===t.headers.Accept&&(t.headers.Accept="application/json"),void 0===t.headers["X-Requested-With"]&&(t.headers["X-Requested-With"]="XMLHttpRequest"),void 0===t.mode&&(t.mode="cors"),"cors"==t.mode?(void 0===t.headers["Access-Control-Allow-Origin"]&&(t.headers["Access-Control-Allow-Origin"]=window.location.origin),void 0===t.credentials&&(t.credentials="same-origin")):void 0===t.credentials&&(t.credentials="include"),fetch(e,t).then(function(e){e.ok?e.json().then(function(e){i(e)}).catch(function(e){n(e),console.warn("Ajax Load Error - Invalid JSON returned",e)}):(console.error("Ajax Load Error - Connection Error: "+e.status,e.statusText),n(e))}).catch(function(e){console.error("Ajax Load Error - Connection Error: ",e),n(e)})):(console.warn("Ajax Load Error - No URL Set"),i([]))})},Ajax.prototype.contentTypeFormatters={json:{headers:{"Content-Type":"application/json"},body:function(e,t,o){return JSON.stringify(o)}},form:{headers:{},body:function(e,t,o){var a=this.generateParamsList(o),r=new FormData;return a.forEach(function(e){r.append(e.key,e.value)}),r}}},Tabulator.prototype.registerModule("ajax",Ajax);
\ No newline at end of file
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
//public calc object
var CalcComponent = function CalcComponent(row) {
ColumnCalcs.prototype.initializeTopRow = function () {
if (!this.topInitialized) {
- // this.table.columnManager.headersElement.after(this.topElement);
this.table.columnManager.getElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling);
this.topInitialized = true;
}
};
ColumnCalcs.prototype.scrollHorizontal = function (left) {
- var hozAdjust = 0,
- scrollWidth = this.table.columnManager.getElement().scrollWidth - this.table.element.clientWidth;
-
if (this.botInitialized && this.botRow) {
this.botRow.getElement().style.marginLeft = -left + "px";
}
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
-var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},CalcComponent=function(t){this._row=t};CalcComponent.prototype.getData=function(t){return this._row.getData(t)},CalcComponent.prototype.getElement=function(){return this._row.getElement()},CalcComponent.prototype.getTable=function(){return this._row.table},CalcComponent.prototype.getCells=function(){var t=[];return this._row.getCells().forEach(function(o){t.push(o.getComponent())}),t},CalcComponent.prototype.getCell=function(t){var o=this._row.getCell(t);return!!o&&o.getComponent()},CalcComponent.prototype._getSelf=function(){return this._row};var ColumnCalcs=function(t){this.table=t,this.topCalcs=[],this.botCalcs=[],this.genColumn=!1,this.topElement=this.createElement(),this.botElement=this.createElement(),this.topRow=!1,this.botRow=!1,this.topInitialized=!1,this.botInitialized=!1,this.initialize()};ColumnCalcs.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-calcs-holder"),t},ColumnCalcs.prototype.initialize=function(){this.genColumn=new Column({field:"value"},this)},ColumnCalcs.prototype.registerColumnField=function(){},ColumnCalcs.prototype.initializeColumn=function(t){var o=t.definition,e={topCalcParams:o.topCalcParams||{},botCalcParams:o.bottomCalcParams||{}};if(o.topCalc){switch(_typeof(o.topCalc)){case"string":this.calculations[o.topCalc]?e.topCalc=this.calculations[o.topCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",o.topCalc);break;case"function":e.topCalc=o.topCalc}e.topCalc&&(t.modules.columnCalcs=e,this.topCalcs.push(t),"group"!=this.table.options.columnCalcs&&this.initializeTopRow())}if(o.bottomCalc){switch(_typeof(o.bottomCalc)){case"string":this.calculations[o.bottomCalc]?e.botCalc=this.calculations[o.bottomCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",o.bottomCalc);break;case"function":e.botCalc=o.bottomCalc}e.botCalc&&(t.modules.columnCalcs=e,this.botCalcs.push(t),"group"!=this.table.options.columnCalcs&&this.initializeBottomRow())}},ColumnCalcs.prototype.removeCalcs=function(){var t=!1;this.topInitialized&&(this.topInitialized=!1,this.topElement.parentNode.removeChild(this.topElement),t=!0),this.botInitialized&&(this.botInitialized=!1,this.table.footerManager.remove(this.botElement),t=!0),t&&this.table.rowManager.adjustTableSize()},ColumnCalcs.prototype.initializeTopRow=function(){this.topInitialized||(this.table.columnManager.getElement().insertBefore(this.topElement,this.table.columnManager.headersElement.nextSibling),this.topInitialized=!0)},ColumnCalcs.prototype.initializeBottomRow=function(){this.botInitialized||(this.table.footerManager.prepend(this.botElement),this.botInitialized=!0)},ColumnCalcs.prototype.scrollHorizontal=function(t){this.table.columnManager.getElement().scrollWidth,this.table.element.clientWidth;this.botInitialized&&this.botRow&&(this.botRow.getElement().style.marginLeft=-t+"px")},ColumnCalcs.prototype.recalc=function(t){var o;if(this.topInitialized||this.botInitialized){if(this.rowsToData(t),this.topInitialized){for(this.topRow&&this.topRow.deleteCells(),o=this.generateRow("top",this.rowsToData(t)),this.topRow=o;this.topElement.firstChild;)this.topElement.removeChild(this.topElement.firstChild);this.topElement.appendChild(o.getElement()),o.initialize(!0)}if(this.botInitialized){for(this.botRow&&this.botRow.deleteCells(),o=this.generateRow("bottom",this.rowsToData(t)),this.botRow=o;this.botElement.firstChild;)this.botElement.removeChild(this.botElement.firstChild);this.botElement.appendChild(o.getElement()),o.initialize(!0)}this.table.rowManager.adjustTableSize(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()}},ColumnCalcs.prototype.recalcRowGroup=function(t){this.recalcGroup(this.table.modules.groupRows.getRowGroup(t))},ColumnCalcs.prototype.recalcAll=function(){var t=this;if((this.topCalcs.length||this.botCalcs.length)&&("group"!==this.table.options.columnCalcs&&this.recalc(this.table.rowManager.activeRows),this.table.options.groupBy&&"table"!==this.table.options.columnCalcs)){table.modules.groupRows.getChildGroups().forEach(function(o){t.recalcGroup(o)})}},ColumnCalcs.prototype.recalcGroup=function(t){var o,e;t&&t.calcs&&(t.calcs.bottom&&(o=this.rowsToData(t.rows),e=this.generateRowData("bottom",o),t.calcs.bottom.updateData(e),t.calcs.bottom.reinitialize()),t.calcs.top&&(o=this.rowsToData(t.rows),e=this.generateRowData("top",o),t.calcs.top.updateData(e),t.calcs.top.reinitialize()))},ColumnCalcs.prototype.generateTopRow=function(t){return this.generateRow("top",this.rowsToData(t))},ColumnCalcs.prototype.generateBottomRow=function(t){return this.generateRow("bottom",this.rowsToData(t))},ColumnCalcs.prototype.rowsToData=function(t){var o=this,e=[];return t.forEach(function(t){if(e.push(t.getData()),o.table.options.dataTree&&o.table.options.dataTreeChildColumnCalcs&&t.modules.dataTree.open){var n=o.rowsToData(o.table.modules.dataTree.getFilteredTreeChildren(t));e=e.concat(n)}}),e},ColumnCalcs.prototype.generateRow=function(t,o){var e,n=this,l=this.generateRowData(t,o);return n.table.modExists("mutator")&&n.table.modules.mutator.disable(),e=new Row(l,this,"calc"),n.table.modExists("mutator")&&n.table.modules.mutator.enable(),e.getElement().classList.add("tabulator-calcs","tabulator-calcs-"+t),e.component=!1,e.getComponent=function(){return this.component||(this.component=new CalcComponent(this)),this.component},e.generateCells=function(){var o=[];n.table.columnManager.columnsByIndex.forEach(function(l){n.genColumn.setField(l.getField()),n.genColumn.hozAlign=l.hozAlign,l.definition[t+"CalcFormatter"]&&n.table.modExists("format")?n.genColumn.modules.format={formatter:n.table.modules.format.getFormatter(l.definition[t+"CalcFormatter"]),params:l.definition[t+"CalcFormatterParams"]||{}}:n.genColumn.modules.format={formatter:n.table.modules.format.getFormatter("plaintext"),params:{}},n.genColumn.definition.cssClass=l.definition.cssClass;var i=new Cell(n.genColumn,e);i.getElement(),i.column=l,i.setWidth(),l.cells.push(i),o.push(i),l.visible||i.hide()}),this.cells=o},e},ColumnCalcs.prototype.generateRowData=function(t,o){var e,n,l={},i="top"==t?this.topCalcs:this.botCalcs,a="top"==t?"topCalc":"botCalc";return i.forEach(function(t){var i=[];t.modules.columnCalcs&&t.modules.columnCalcs[a]&&(o.forEach(function(o){i.push(t.getFieldValue(o))}),n=a+"Params",e="function"==typeof t.modules.columnCalcs[n]?t.modules.columnCalcs[n](i,o):t.modules.columnCalcs[n],t.setFieldValue(l,t.modules.columnCalcs[a](i,o,e)))}),l},ColumnCalcs.prototype.hasTopCalcs=function(){return!!this.topCalcs.length},ColumnCalcs.prototype.hasBottomCalcs=function(){return!!this.botCalcs.length},ColumnCalcs.prototype.redraw=function(){this.topRow&&this.topRow.normalizeHeight(!0),this.botRow&&this.botRow.normalizeHeight(!0)},ColumnCalcs.prototype.getResults=function(){var t,o=this,e={};return this.table.options.groupBy&&this.table.modExists("groupRows")?(t=this.table.modules.groupRows.getGroups(!0),t.forEach(function(t){e[t.getKey()]=o.getGroupResults(t)})):e={top:this.topRow?this.topRow.getData():{},bottom:this.botRow?this.botRow.getData():{}},e},ColumnCalcs.prototype.getGroupResults=function(t){var o=this,e=t._getSelf(),n=t.getSubGroups(),l={};return n.forEach(function(t){l[t.getKey()]=o.getGroupResults(t)}),{top:e.calcs.top?e.calcs.top.getData():{},bottom:e.calcs.bottom?e.calcs.bottom.getData():{},groups:l}},ColumnCalcs.prototype.calculations={avg:function(t,o,e){var n=0,l=void 0!==e.precision?e.precision:2;return t.length&&(n=t.reduce(function(t,o){return Number(t)+Number(o)}),n/=t.length,n=!1!==l?n.toFixed(l):n),parseFloat(n).toString()},max:function(t,o,e){var n=null,l=void 0!==e.precision&&e.precision;return t.forEach(function(t){((t=Number(t))>n||null===n)&&(n=t)}),null!==n?!1!==l?n.toFixed(l):n:""},min:function(t,o,e){var n=null,l=void 0!==e.precision&&e.precision;return t.forEach(function(t){((t=Number(t))<n||null===n)&&(n=t)}),null!==n?!1!==l?n.toFixed(l):n:""},sum:function(t,o,e){var n=0,l=void 0!==e.precision&&e.precision;return t.length&&t.forEach(function(t){t=Number(t),n+=isNaN(t)?0:Number(t)}),!1!==l?n.toFixed(l):n},concat:function(t,o,e){var n=0;return t.length&&(n=t.reduce(function(t,o){return String(t)+String(o)})),n},count:function(t,o,e){var n=0;return t.length&&t.forEach(function(t){t&&n++}),n}},Tabulator.prototype.registerModule("columnCalcs",ColumnCalcs);
\ No newline at end of file
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
+var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},CalcComponent=function(t){this._row=t};CalcComponent.prototype.getData=function(t){return this._row.getData(t)},CalcComponent.prototype.getElement=function(){return this._row.getElement()},CalcComponent.prototype.getTable=function(){return this._row.table},CalcComponent.prototype.getCells=function(){var t=[];return this._row.getCells().forEach(function(o){t.push(o.getComponent())}),t},CalcComponent.prototype.getCell=function(t){var o=this._row.getCell(t);return!!o&&o.getComponent()},CalcComponent.prototype._getSelf=function(){return this._row};var ColumnCalcs=function(t){this.table=t,this.topCalcs=[],this.botCalcs=[],this.genColumn=!1,this.topElement=this.createElement(),this.botElement=this.createElement(),this.topRow=!1,this.botRow=!1,this.topInitialized=!1,this.botInitialized=!1,this.initialize()};ColumnCalcs.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-calcs-holder"),t},ColumnCalcs.prototype.initialize=function(){this.genColumn=new Column({field:"value"},this)},ColumnCalcs.prototype.registerColumnField=function(){},ColumnCalcs.prototype.initializeColumn=function(t){var o=t.definition,e={topCalcParams:o.topCalcParams||{},botCalcParams:o.bottomCalcParams||{}};if(o.topCalc){switch(_typeof(o.topCalc)){case"string":this.calculations[o.topCalc]?e.topCalc=this.calculations[o.topCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",o.topCalc);break;case"function":e.topCalc=o.topCalc}e.topCalc&&(t.modules.columnCalcs=e,this.topCalcs.push(t),"group"!=this.table.options.columnCalcs&&this.initializeTopRow())}if(o.bottomCalc){switch(_typeof(o.bottomCalc)){case"string":this.calculations[o.bottomCalc]?e.botCalc=this.calculations[o.bottomCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",o.bottomCalc);break;case"function":e.botCalc=o.bottomCalc}e.botCalc&&(t.modules.columnCalcs=e,this.botCalcs.push(t),"group"!=this.table.options.columnCalcs&&this.initializeBottomRow())}},ColumnCalcs.prototype.removeCalcs=function(){var t=!1;this.topInitialized&&(this.topInitialized=!1,this.topElement.parentNode.removeChild(this.topElement),t=!0),this.botInitialized&&(this.botInitialized=!1,this.table.footerManager.remove(this.botElement),t=!0),t&&this.table.rowManager.adjustTableSize()},ColumnCalcs.prototype.initializeTopRow=function(){this.topInitialized||(this.table.columnManager.getElement().insertBefore(this.topElement,this.table.columnManager.headersElement.nextSibling),this.topInitialized=!0)},ColumnCalcs.prototype.initializeBottomRow=function(){this.botInitialized||(this.table.footerManager.prepend(this.botElement),this.botInitialized=!0)},ColumnCalcs.prototype.scrollHorizontal=function(t){this.botInitialized&&this.botRow&&(this.botRow.getElement().style.marginLeft=-t+"px")},ColumnCalcs.prototype.recalc=function(t){var o;if(this.topInitialized||this.botInitialized){if(this.rowsToData(t),this.topInitialized){for(this.topRow&&this.topRow.deleteCells(),o=this.generateRow("top",this.rowsToData(t)),this.topRow=o;this.topElement.firstChild;)this.topElement.removeChild(this.topElement.firstChild);this.topElement.appendChild(o.getElement()),o.initialize(!0)}if(this.botInitialized){for(this.botRow&&this.botRow.deleteCells(),o=this.generateRow("bottom",this.rowsToData(t)),this.botRow=o;this.botElement.firstChild;)this.botElement.removeChild(this.botElement.firstChild);this.botElement.appendChild(o.getElement()),o.initialize(!0)}this.table.rowManager.adjustTableSize(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()}},ColumnCalcs.prototype.recalcRowGroup=function(t){this.recalcGroup(this.table.modules.groupRows.getRowGroup(t))},ColumnCalcs.prototype.recalcAll=function(){var t=this;if((this.topCalcs.length||this.botCalcs.length)&&("group"!==this.table.options.columnCalcs&&this.recalc(this.table.rowManager.activeRows),this.table.options.groupBy&&"table"!==this.table.options.columnCalcs)){table.modules.groupRows.getChildGroups().forEach(function(o){t.recalcGroup(o)})}},ColumnCalcs.prototype.recalcGroup=function(t){var o,e;t&&t.calcs&&(t.calcs.bottom&&(o=this.rowsToData(t.rows),e=this.generateRowData("bottom",o),t.calcs.bottom.updateData(e),t.calcs.bottom.reinitialize()),t.calcs.top&&(o=this.rowsToData(t.rows),e=this.generateRowData("top",o),t.calcs.top.updateData(e),t.calcs.top.reinitialize()))},ColumnCalcs.prototype.generateTopRow=function(t){return this.generateRow("top",this.rowsToData(t))},ColumnCalcs.prototype.generateBottomRow=function(t){return this.generateRow("bottom",this.rowsToData(t))},ColumnCalcs.prototype.rowsToData=function(t){var o=this,e=[];return t.forEach(function(t){if(e.push(t.getData()),o.table.options.dataTree&&o.table.options.dataTreeChildColumnCalcs&&t.modules.dataTree.open){var n=o.rowsToData(o.table.modules.dataTree.getFilteredTreeChildren(t));e=e.concat(n)}}),e},ColumnCalcs.prototype.generateRow=function(t,o){var e,n=this,i=this.generateRowData(t,o);return n.table.modExists("mutator")&&n.table.modules.mutator.disable(),e=new Row(i,this,"calc"),n.table.modExists("mutator")&&n.table.modules.mutator.enable(),e.getElement().classList.add("tabulator-calcs","tabulator-calcs-"+t),e.component=!1,e.getComponent=function(){return this.component||(this.component=new CalcComponent(this)),this.component},e.generateCells=function(){var o=[];n.table.columnManager.columnsByIndex.forEach(function(i){n.genColumn.setField(i.getField()),n.genColumn.hozAlign=i.hozAlign,i.definition[t+"CalcFormatter"]&&n.table.modExists("format")?n.genColumn.modules.format={formatter:n.table.modules.format.getFormatter(i.definition[t+"CalcFormatter"]),params:i.definition[t+"CalcFormatterParams"]||{}}:n.genColumn.modules.format={formatter:n.table.modules.format.getFormatter("plaintext"),params:{}},n.genColumn.definition.cssClass=i.definition.cssClass;var l=new Cell(n.genColumn,e);l.getElement(),l.column=i,l.setWidth(),i.cells.push(l),o.push(l),i.visible||l.hide()}),this.cells=o},e},ColumnCalcs.prototype.generateRowData=function(t,o){var e,n,i={},l="top"==t?this.topCalcs:this.botCalcs,a="top"==t?"topCalc":"botCalc";return l.forEach(function(t){var l=[];t.modules.columnCalcs&&t.modules.columnCalcs[a]&&(o.forEach(function(o){l.push(t.getFieldValue(o))}),n=a+"Params",e="function"==typeof t.modules.columnCalcs[n]?t.modules.columnCalcs[n](l,o):t.modules.columnCalcs[n],t.setFieldValue(i,t.modules.columnCalcs[a](l,o,e)))}),i},ColumnCalcs.prototype.hasTopCalcs=function(){return!!this.topCalcs.length},ColumnCalcs.prototype.hasBottomCalcs=function(){return!!this.botCalcs.length},ColumnCalcs.prototype.redraw=function(){this.topRow&&this.topRow.normalizeHeight(!0),this.botRow&&this.botRow.normalizeHeight(!0)},ColumnCalcs.prototype.getResults=function(){var t,o=this,e={};return this.table.options.groupBy&&this.table.modExists("groupRows")?(t=this.table.modules.groupRows.getGroups(!0),t.forEach(function(t){e[t.getKey()]=o.getGroupResults(t)})):e={top:this.topRow?this.topRow.getData():{},bottom:this.botRow?this.botRow.getData():{}},e},ColumnCalcs.prototype.getGroupResults=function(t){var o=this,e=t._getSelf(),n=t.getSubGroups(),i={};return n.forEach(function(t){i[t.getKey()]=o.getGroupResults(t)}),{top:e.calcs.top?e.calcs.top.getData():{},bottom:e.calcs.bottom?e.calcs.bottom.getData():{},groups:i}},ColumnCalcs.prototype.calculations={avg:function(t,o,e){var n=0,i=void 0!==e.precision?e.precision:2;return t.length&&(n=t.reduce(function(t,o){return Number(t)+Number(o)}),n/=t.length,n=!1!==i?n.toFixed(i):n),parseFloat(n).toString()},max:function(t,o,e){var n=null,i=void 0!==e.precision&&e.precision;return t.forEach(function(t){((t=Number(t))>n||null===n)&&(n=t)}),null!==n?!1!==i?n.toFixed(i):n:""},min:function(t,o,e){var n=null,i=void 0!==e.precision&&e.precision;return t.forEach(function(t){((t=Number(t))<n||null===n)&&(n=t)}),null!==n?!1!==i?n.toFixed(i):n:""},sum:function(t,o,e){var n=0,i=void 0!==e.precision&&e.precision;return t.length&&t.forEach(function(t){t=Number(t),n+=isNaN(t)?0:Number(t)}),!1!==i?n.toFixed(i):n},concat:function(t,o,e){var n=0;return t.length&&(n=t.reduce(function(t,o){return String(t)+String(o)})),n},count:function(t,o,e){var n=0;return t.length&&t.forEach(function(t){t&&n++}),n}},Tabulator.prototype.registerModule("columnCalcs",ColumnCalcs);
\ No newline at end of file
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var Clipboard = function Clipboard(table) {
this.table = table;
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Clipboard=function(t){this.table=t,this.mode=!0,this.pasteParser=function(){},this.pasteAction=function(){},this.customSelection=!1,this.rowRange=!1,this.blocked=!0};Clipboard.prototype.initialize=function(){var t=this;this.mode=this.table.options.clipboard,this.rowRange=this.table.options.clipboardCopyRowRange,!0!==this.mode&&"copy"!==this.mode||this.table.element.addEventListener("copy",function(e){var a,o,i;if(!t.blocked){if(e.preventDefault(),t.customSelection)a=t.customSelection,t.table.options.clipboardCopyFormatter&&(a=t.table.options.clipboardCopyFormatter("plain",a));else{var i=t.table.modules.export.generateExportList(t.table.options.clipboardCopyConfig,t.table.options.clipboardCopyStyled,t.rowRange,"clipboard");o=t.table.modules.export.genereateHTMLTable(i),a=o?t.generatePlainContent(i):"",t.table.options.clipboardCopyFormatter&&(a=t.table.options.clipboardCopyFormatter("plain",a),o=t.table.options.clipboardCopyFormatter("html",o))}window.clipboardData&&window.clipboardData.setData?window.clipboardData.setData("Text",a):e.clipboardData&&e.clipboardData.setData?(e.clipboardData.setData("text/plain",a),o&&e.clipboardData.setData("text/html",o)):e.originalEvent&&e.originalEvent.clipboardData.setData&&(e.originalEvent.clipboardData.setData("text/plain",a),o&&e.originalEvent.clipboardData.setData("text/html",o)),t.table.options.clipboardCopied.call(t.table,a,o),t.reset()}}),!0!==this.mode&&"paste"!==this.mode||this.table.element.addEventListener("paste",function(e){t.paste(e)}),this.setPasteParser(this.table.options.clipboardPasteParser),this.setPasteAction(this.table.options.clipboardPasteAction)},Clipboard.prototype.reset=function(){this.blocked=!0,this.customSelection=!1},Clipboard.prototype.generatePlainContent=function(t){var e=[];return t.forEach(function(t){var a=[];t.columns.forEach(function(e){var o="";if(e)if("group"===t.type&&(e.value=e.component.getKey()),null===e.value)o="";else switch(_typeof(e.value)){case"object":o=JSON.stringify(e.value);break;case"undefined":o="";break;default:o=e.value}a.push(o)}),e.push(a.join("\t"))}),e.join("\n")},Clipboard.prototype.copy=function(t,e){var t,a,o;this.blocked=!1,this.customSelection=!1,!0!==this.mode&&"copy"!==this.mode||(this.rowRange=t||this.table.options.clipboardCopyRowRange,void 0!==window.getSelection&&void 0!==document.createRange?(t=document.createRange(),t.selectNodeContents(this.table.element),a=window.getSelection(),a.toString()&&e&&(this.customSelection=a.toString()),a.removeAllRanges(),a.addRange(t)):void 0!==document.selection&&void 0!==document.body.createTextRange&&(o=document.body.createTextRange(),o.moveToElementText(this.table.element),o.select()),document.execCommand("copy"),a&&a.removeAllRanges())},Clipboard.prototype.setPasteAction=function(t){switch(void 0===t?"undefined":_typeof(t)){case"string":this.pasteAction=this.pasteActions[t],this.pasteAction||console.warn("Clipboard Error - No such paste action found:",t);break;case"function":this.pasteAction=t}},Clipboard.prototype.setPasteParser=function(t){switch(void 0===t?"undefined":_typeof(t)){case"string":this.pasteParser=this.pasteParsers[t],this.pasteParser||console.warn("Clipboard Error - No such paste parser found:",t);break;case"function":this.pasteParser=t}},Clipboard.prototype.paste=function(t){var e,a,o;this.checkPaseOrigin(t)&&(e=this.getPasteData(t),a=this.pasteParser.call(this,e),a?(t.preventDefault(),this.table.modExists("mutator")&&(a=this.mutateData(a)),o=this.pasteAction.call(this,a),this.table.options.clipboardPasted.call(this.table,e,a,o)):this.table.options.clipboardPasteError.call(this.table,e))},Clipboard.prototype.mutateData=function(t){var e=this,a=[];return Array.isArray(t)?t.forEach(function(t){a.push(e.table.modules.mutator.transformRow(t,"clipboard"))}):a=t,a},Clipboard.prototype.checkPaseOrigin=function(t){var e=!0;return("DIV"!=t.target.tagName||this.table.modules.edit.currentCell)&&(e=!1),e},Clipboard.prototype.getPasteData=function(t){var e;return window.clipboardData&&window.clipboardData.getData?e=window.clipboardData.getData("Text"):t.clipboardData&&t.clipboardData.getData?e=t.clipboardData.getData("text/plain"):t.originalEvent&&t.originalEvent.clipboardData.getData&&(e=t.originalEvent.clipboardData.getData("text/plain")),e},Clipboard.prototype.pasteParsers={table:function(t){var e=[],a=!0,o=this.table.columnManager.columns,i=[],n=[];return t=t.split("\n"),t.forEach(function(t){e.push(t.split("\t"))}),!(!e.length||1===e.length&&e[0].length<2)&&(!0,e[0].forEach(function(t){var e=o.find(function(e){return t&&e.definition.title&&t.trim()&&e.definition.title.trim()===t.trim()});e?i.push(e):a=!1}),a||(a=!0,i=[],e[0].forEach(function(t){var e=o.find(function(e){return t&&e.field&&t.trim()&&e.field.trim()===t.trim()});e?i.push(e):a=!1}),a||(i=this.table.columnManager.columnsByIndex)),a&&e.shift(),e.forEach(function(t){var e={};t.forEach(function(t,a){i[a]&&(e[i[a].field]=t)}),n.push(e)}),n)}},Clipboard.prototype.pasteActions={replace:function(t){return this.table.setData(t)},update:function(t){return this.table.updateOrAddData(t)},insert:function(t){return this.table.addData(t)}},Tabulator.prototype.registerModule("clipboard",Clipboard);
\ No newline at end of file
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var DataTree = function DataTree(table) {
this.table = table;
this.generateControlElement(row, el);
- row.element.classList.add("tabulator-tree-level-" + config.index);
+ row.getElement().classList.add("tabulator-tree-level-" + config.index);
if (config.index) {
if (this.branchEl) {
if (row instanceof Row) {
+ row.create();
+
config = row.modules.dataTree.children;
if (!config.index && config.children !== false) {
children = _this2.getChildren(row);
children.forEach(function (child) {
+ child.create();
output.push(child);
});
}
return output;
};
-DataTree.prototype.getChildren = function (row) {
+DataTree.prototype.getChildren = function (row, allChildren) {
var _this3 = this;
var config = row.modules.dataTree,
children = [],
output = [];
- if (config.children !== false && config.open) {
+ if (config.children !== false && (config.open || allChildren)) {
if (!Array.isArray(config.children)) {
config.children = this.generateChildren(row);
}
childArray.forEach(function (childData) {
var childRow = new Row(childData || {}, _this4.table.rowManager);
+
+ childRow.create();
+
childRow.modules.dataTree.index = row.modules.dataTree.index + 1;
childRow.modules.dataTree.parent = row;
+
if (childRow.modules.dataTree.children) {
childRow.modules.dataTree.open = _this4.startOpen(childRow.getComponent(), childRow.modules.dataTree.index);
}
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
-var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},DataTree=function(e){this.table=e,this.indent=10,this.field="",this.collapseEl=null,this.expandEl=null,this.branchEl=null,this.elementField=!1,this.startOpen=function(){},this.displayIndex=0};DataTree.prototype.initialize=function(){var e=null,t=this.table.columnManager.getFirstVisibileColumn(),a=this.table.options;switch(this.field=a.dataTreeChildField,this.indent=a.dataTreeChildIndent,this.elementField=a.dataTreeElementColumn||!!t&&t.field,a.dataTreeBranchElement&&(!0===a.dataTreeBranchElement?(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch")):"string"==typeof a.dataTreeBranchElement?(e=document.createElement("div"),e.innerHTML=a.dataTreeBranchElement,this.branchEl=e.firstChild):this.branchEl=a.dataTreeBranchElement),a.dataTreeCollapseElement?"string"==typeof a.dataTreeCollapseElement?(e=document.createElement("div"),e.innerHTML=a.dataTreeCollapseElement,this.collapseEl=e.firstChild):this.collapseEl=a.dataTreeCollapseElement:(this.collapseEl=document.createElement("div"),this.collapseEl.classList.add("tabulator-data-tree-control"),this.collapseEl.tabIndex=0,this.collapseEl.innerHTML="<div class='tabulator-data-tree-control-collapse'></div>"),a.dataTreeExpandElement?"string"==typeof a.dataTreeExpandElement?(e=document.createElement("div"),e.innerHTML=a.dataTreeExpandElement,this.expandEl=e.firstChild):this.expandEl=a.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.tabIndex=0,this.expandEl.innerHTML="<div class='tabulator-data-tree-control-expand'></div>"),_typeof(a.dataTreeStartExpanded)){case"boolean":this.startOpen=function(e,t){return a.dataTreeStartExpanded};break;case"function":this.startOpen=a.dataTreeStartExpanded;break;default:this.startOpen=function(e,t){return a.dataTreeStartExpanded[t]}}},DataTree.prototype.initializeRow=function(e){var t=e.getData()[this.field],a=Array.isArray(t),n=a||!a&&"object"===(void 0===t?"undefined":_typeof(t))&&null!==t;!n&&e.modules.dataTree&&e.modules.dataTree.branchEl&&e.modules.dataTree.branchEl.parentNode.removeChild(e.modules.dataTree.branchEl),!n&&e.modules.dataTree&&e.modules.dataTree.controlEl&&e.modules.dataTree.controlEl.parentNode.removeChild(e.modules.dataTree.controlEl),e.modules.dataTree={index:e.modules.dataTree?e.modules.dataTree.index:0,open:!!n&&(e.modules.dataTree?e.modules.dataTree.open:this.startOpen(e.getComponent(),0)),controlEl:!(!e.modules.dataTree||!n)&&e.modules.dataTree.controlEl,branchEl:!(!e.modules.dataTree||!n)&&e.modules.dataTree.branchEl,parent:!!e.modules.dataTree&&e.modules.dataTree.parent,children:n}},DataTree.prototype.layoutRow=function(e){var t=this.elementField?e.getCell(this.elementField):e.getCells()[0],a=t.getElement(),n=e.modules.dataTree;n.branchEl&&(n.branchEl.parentNode&&n.branchEl.parentNode.removeChild(n.branchEl),n.branchEl=!1),n.controlEl&&(n.controlEl.parentNode&&n.controlEl.parentNode.removeChild(n.controlEl),n.controlEl=!1),this.generateControlElement(e,a),e.element.classList.add("tabulator-tree-level-"+n.index),n.index&&(this.branchEl?(n.branchEl=this.branchEl.cloneNode(!0),a.insertBefore(n.branchEl,a.firstChild),this.table.rtl?n.branchEl.style.marginRight=(n.branchEl.offsetWidth+n.branchEl.style.marginLeft)*(n.index-1)+n.index*this.indent+"px":n.branchEl.style.marginLeft=(n.branchEl.offsetWidth+n.branchEl.style.marginRight)*(n.index-1)+n.index*this.indent+"px"):this.table.rtl?a.style.paddingRight=parseInt(window.getComputedStyle(a,null).getPropertyValue("padding-right"))+n.index*this.indent+"px":a.style.paddingLeft=parseInt(window.getComputedStyle(a,null).getPropertyValue("padding-left"))+n.index*this.indent+"px")},DataTree.prototype.generateControlElement=function(e,t){var a=this,n=e.modules.dataTree,t=t||e.getCells()[0].getElement(),r=n.controlEl;!1!==n.children&&(n.open?(n.controlEl=this.collapseEl.cloneNode(!0),n.controlEl.addEventListener("click",function(t){t.stopPropagation(),a.collapseRow(e)})):(n.controlEl=this.expandEl.cloneNode(!0),n.controlEl.addEventListener("click",function(t){t.stopPropagation(),a.expandRow(e)})),n.controlEl.addEventListener("mousedown",function(e){e.stopPropagation()}),r&&r.parentNode===t?r.parentNode.replaceChild(n.controlEl,r):t.insertBefore(n.controlEl,t.firstChild))},DataTree.prototype.setDisplayIndex=function(e){this.displayIndex=e},DataTree.prototype.getDisplayIndex=function(){return this.displayIndex},DataTree.prototype.getRows=function(e){var t=this,a=[];return e.forEach(function(e,n){var r,l;a.push(e),e instanceof Row&&(r=e.modules.dataTree.children,r.index||!1===r.children||(l=t.getChildren(e),l.forEach(function(e){a.push(e)})))}),a},DataTree.prototype.getChildren=function(e){var t=this,a=e.modules.dataTree,n=[],r=[];return!1!==a.children&&a.open&&(Array.isArray(a.children)||(a.children=this.generateChildren(e)),n=this.table.modExists("filter")&&this.table.options.dataTreeFilter?this.table.modules.filter.filter(a.children):a.children,this.table.modExists("sort")&&this.table.options.dataTreeSort&&this.table.modules.sort.sort(n),n.forEach(function(e){r.push(e),t.getChildren(e).forEach(function(e){r.push(e)})})),r},DataTree.prototype.generateChildren=function(e){var t=this,a=[],n=e.getData()[this.field];return Array.isArray(n)||(n=[n]),n.forEach(function(n){var r=new Row(n||{},t.table.rowManager);r.modules.dataTree.index=e.modules.dataTree.index+1,r.modules.dataTree.parent=e,r.modules.dataTree.children&&(r.modules.dataTree.open=t.startOpen(r.getComponent(),r.modules.dataTree.index)),a.push(r)}),a},DataTree.prototype.expandRow=function(e,t){var a=e.modules.dataTree;!1!==a.children&&(a.open=!0,e.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowExpanded(e.getComponent(),e.modules.dataTree.index))},DataTree.prototype.collapseRow=function(e){var t=e.modules.dataTree;!1!==t.children&&(t.open=!1,e.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowCollapsed(e.getComponent(),e.modules.dataTree.index))},DataTree.prototype.toggleRow=function(e){var t=e.modules.dataTree;!1!==t.children&&(t.open?this.collapseRow(e):this.expandRow(e))},DataTree.prototype.getTreeParent=function(e){return!!e.modules.dataTree.parent&&e.modules.dataTree.parent.getComponent()},DataTree.prototype.getFilteredTreeChildren=function(e){var t,a=e.modules.dataTree,n=[];return a.children&&(Array.isArray(a.children)||(a.children=this.generateChildren(e)),t=this.table.modExists("filter")&&this.table.options.dataTreeFilter?this.table.modules.filter.filter(a.children):a.children,t.forEach(function(e){e instanceof Row&&n.push(e)})),n},DataTree.prototype.rowDelete=function(e){var t,a=e.modules.dataTree.parent;a&&(t=this.findChildIndex(e,a),!1!==t&&a.data[this.field].splice(t,1),a.data[this.field].length||delete a.data[this.field],this.initializeRow(a),this.layoutRow(a)),this.table.rowManager.refreshActiveData("tree",!1,!0)},DataTree.prototype.addTreeChildRow=function(e,t,a,n){var r=!1;"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(e.data[this.field])||(e.data[this.field]=[],e.modules.dataTree.open=this.startOpen(e.getComponent(),e.modules.dataTree.index)),void 0!==n&&!1!==(r=this.findChildIndex(n,e))&&e.data[this.field].splice(a?r:r+1,0,t),!1===r&&(a?e.data[this.field].unshift(t):e.data[this.field].push(t)),this.initializeRow(e),this.layoutRow(e),this.table.rowManager.refreshActiveData("tree",!1,!0)},DataTree.prototype.findChildIndex=function(e,t){var a=this,n=!1;return"object"==(void 0===e?"undefined":_typeof(e))?e instanceof Row?n=e.data:e instanceof RowComponent?n=e._getSelf().data:"undefined"!=typeof HTMLElement&&e instanceof HTMLElement&&t.modules.dataTree&&(n=t.modules.dataTree.children.find(function(t){return t instanceof Row&&t.element===e}))&&(n=n.data):n=void 0!==e&&null!==e&&t.data[this.field].find(function(t){return t.data[a.table.options.index]==e}),n&&(Array.isArray(t.data[this.field])&&(n=t.data[this.field].indexOf(n)),-1==n&&(n=!1)),n},DataTree.prototype.getTreeChildren=function(e,t,a){var n=this,r=e.modules.dataTree,l=[];return r.children&&(Array.isArray(r.children)||(r.children=this.generateChildren(e)),r.children.forEach(function(e){e instanceof Row&&(l.push(t?e.getComponent():e),a&&(l=l.concat(n.getTreeChildren(e,t,a))))})),l},DataTree.prototype.checkForRestyle=function(e){e.row.cells.indexOf(e)||e.row.reinitialize()},DataTree.prototype.getChildField=function(){return this.field},DataTree.prototype.redrawNeeded=function(e){return!!this.field&&void 0!==e[this.field]||!!this.elementField&&void 0!==e[this.elementField]},Tabulator.prototype.registerModule("dataTree",DataTree);
\ No newline at end of file
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
+var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},DataTree=function(e){this.table=e,this.indent=10,this.field="",this.collapseEl=null,this.expandEl=null,this.branchEl=null,this.elementField=!1,this.startOpen=function(){},this.displayIndex=0};DataTree.prototype.initialize=function(){var e=null,t=this.table.columnManager.getFirstVisibileColumn(),a=this.table.options;switch(this.field=a.dataTreeChildField,this.indent=a.dataTreeChildIndent,this.elementField=a.dataTreeElementColumn||!!t&&t.field,a.dataTreeBranchElement&&(!0===a.dataTreeBranchElement?(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch")):"string"==typeof a.dataTreeBranchElement?(e=document.createElement("div"),e.innerHTML=a.dataTreeBranchElement,this.branchEl=e.firstChild):this.branchEl=a.dataTreeBranchElement),a.dataTreeCollapseElement?"string"==typeof a.dataTreeCollapseElement?(e=document.createElement("div"),e.innerHTML=a.dataTreeCollapseElement,this.collapseEl=e.firstChild):this.collapseEl=a.dataTreeCollapseElement:(this.collapseEl=document.createElement("div"),this.collapseEl.classList.add("tabulator-data-tree-control"),this.collapseEl.tabIndex=0,this.collapseEl.innerHTML="<div class='tabulator-data-tree-control-collapse'></div>"),a.dataTreeExpandElement?"string"==typeof a.dataTreeExpandElement?(e=document.createElement("div"),e.innerHTML=a.dataTreeExpandElement,this.expandEl=e.firstChild):this.expandEl=a.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.tabIndex=0,this.expandEl.innerHTML="<div class='tabulator-data-tree-control-expand'></div>"),_typeof(a.dataTreeStartExpanded)){case"boolean":this.startOpen=function(e,t){return a.dataTreeStartExpanded};break;case"function":this.startOpen=a.dataTreeStartExpanded;break;default:this.startOpen=function(e,t){return a.dataTreeStartExpanded[t]}}},DataTree.prototype.initializeRow=function(e){var t=e.getData()[this.field],a=Array.isArray(t),n=a||!a&&"object"===(void 0===t?"undefined":_typeof(t))&&null!==t;!n&&e.modules.dataTree&&e.modules.dataTree.branchEl&&e.modules.dataTree.branchEl.parentNode.removeChild(e.modules.dataTree.branchEl),!n&&e.modules.dataTree&&e.modules.dataTree.controlEl&&e.modules.dataTree.controlEl.parentNode.removeChild(e.modules.dataTree.controlEl),e.modules.dataTree={index:e.modules.dataTree?e.modules.dataTree.index:0,open:!!n&&(e.modules.dataTree?e.modules.dataTree.open:this.startOpen(e.getComponent(),0)),controlEl:!(!e.modules.dataTree||!n)&&e.modules.dataTree.controlEl,branchEl:!(!e.modules.dataTree||!n)&&e.modules.dataTree.branchEl,parent:!!e.modules.dataTree&&e.modules.dataTree.parent,children:n}},DataTree.prototype.layoutRow=function(e){var t=this.elementField?e.getCell(this.elementField):e.getCells()[0],a=t.getElement(),n=e.modules.dataTree;n.branchEl&&(n.branchEl.parentNode&&n.branchEl.parentNode.removeChild(n.branchEl),n.branchEl=!1),n.controlEl&&(n.controlEl.parentNode&&n.controlEl.parentNode.removeChild(n.controlEl),n.controlEl=!1),this.generateControlElement(e,a),e.getElement().classList.add("tabulator-tree-level-"+n.index),n.index&&(this.branchEl?(n.branchEl=this.branchEl.cloneNode(!0),a.insertBefore(n.branchEl,a.firstChild),this.table.rtl?n.branchEl.style.marginRight=(n.branchEl.offsetWidth+n.branchEl.style.marginLeft)*(n.index-1)+n.index*this.indent+"px":n.branchEl.style.marginLeft=(n.branchEl.offsetWidth+n.branchEl.style.marginRight)*(n.index-1)+n.index*this.indent+"px"):this.table.rtl?a.style.paddingRight=parseInt(window.getComputedStyle(a,null).getPropertyValue("padding-right"))+n.index*this.indent+"px":a.style.paddingLeft=parseInt(window.getComputedStyle(a,null).getPropertyValue("padding-left"))+n.index*this.indent+"px")},DataTree.prototype.generateControlElement=function(e,t){var a=this,n=e.modules.dataTree,t=t||e.getCells()[0].getElement(),r=n.controlEl;!1!==n.children&&(n.open?(n.controlEl=this.collapseEl.cloneNode(!0),n.controlEl.addEventListener("click",function(t){t.stopPropagation(),a.collapseRow(e)})):(n.controlEl=this.expandEl.cloneNode(!0),n.controlEl.addEventListener("click",function(t){t.stopPropagation(),a.expandRow(e)})),n.controlEl.addEventListener("mousedown",function(e){e.stopPropagation()}),r&&r.parentNode===t?r.parentNode.replaceChild(n.controlEl,r):t.insertBefore(n.controlEl,t.firstChild))},DataTree.prototype.setDisplayIndex=function(e){this.displayIndex=e},DataTree.prototype.getDisplayIndex=function(){return this.displayIndex},DataTree.prototype.getRows=function(e){var t=this,a=[];return e.forEach(function(e,n){var r,l;a.push(e),e instanceof Row&&(e.create(),r=e.modules.dataTree.children,r.index||!1===r.children||(l=t.getChildren(e),l.forEach(function(e){e.create(),a.push(e)})))}),a},DataTree.prototype.getChildren=function(e,t){var a=this,n=e.modules.dataTree,r=[],l=[];return!1!==n.children&&(n.open||t)&&(Array.isArray(n.children)||(n.children=this.generateChildren(e)),r=this.table.modExists("filter")&&this.table.options.dataTreeFilter?this.table.modules.filter.filter(n.children):n.children,this.table.modExists("sort")&&this.table.options.dataTreeSort&&this.table.modules.sort.sort(r),r.forEach(function(e){l.push(e),a.getChildren(e).forEach(function(e){l.push(e)})})),l},DataTree.prototype.generateChildren=function(e){var t=this,a=[],n=e.getData()[this.field];return Array.isArray(n)||(n=[n]),n.forEach(function(n){var r=new Row(n||{},t.table.rowManager);r.create(),r.modules.dataTree.index=e.modules.dataTree.index+1,r.modules.dataTree.parent=e,r.modules.dataTree.children&&(r.modules.dataTree.open=t.startOpen(r.getComponent(),r.modules.dataTree.index)),a.push(r)}),a},DataTree.prototype.expandRow=function(e,t){var a=e.modules.dataTree;!1!==a.children&&(a.open=!0,e.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowExpanded(e.getComponent(),e.modules.dataTree.index))},DataTree.prototype.collapseRow=function(e){var t=e.modules.dataTree;!1!==t.children&&(t.open=!1,e.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowCollapsed(e.getComponent(),e.modules.dataTree.index))},DataTree.prototype.toggleRow=function(e){var t=e.modules.dataTree;!1!==t.children&&(t.open?this.collapseRow(e):this.expandRow(e))},DataTree.prototype.getTreeParent=function(e){return!!e.modules.dataTree.parent&&e.modules.dataTree.parent.getComponent()},DataTree.prototype.getFilteredTreeChildren=function(e){var t,a=e.modules.dataTree,n=[];return a.children&&(Array.isArray(a.children)||(a.children=this.generateChildren(e)),t=this.table.modExists("filter")&&this.table.options.dataTreeFilter?this.table.modules.filter.filter(a.children):a.children,t.forEach(function(e){e instanceof Row&&n.push(e)})),n},DataTree.prototype.rowDelete=function(e){var t,a=e.modules.dataTree.parent;a&&(t=this.findChildIndex(e,a),!1!==t&&a.data[this.field].splice(t,1),a.data[this.field].length||delete a.data[this.field],this.initializeRow(a),this.layoutRow(a)),this.table.rowManager.refreshActiveData("tree",!1,!0)},DataTree.prototype.addTreeChildRow=function(e,t,a,n){var r=!1;"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(e.data[this.field])||(e.data[this.field]=[],e.modules.dataTree.open=this.startOpen(e.getComponent(),e.modules.dataTree.index)),void 0!==n&&!1!==(r=this.findChildIndex(n,e))&&e.data[this.field].splice(a?r:r+1,0,t),!1===r&&(a?e.data[this.field].unshift(t):e.data[this.field].push(t)),this.initializeRow(e),this.layoutRow(e),this.table.rowManager.refreshActiveData("tree",!1,!0)},DataTree.prototype.findChildIndex=function(e,t){var a=this,n=!1;return"object"==(void 0===e?"undefined":_typeof(e))?e instanceof Row?n=e.data:e instanceof RowComponent?n=e._getSelf().data:"undefined"!=typeof HTMLElement&&e instanceof HTMLElement&&t.modules.dataTree&&(n=t.modules.dataTree.children.find(function(t){return t instanceof Row&&t.element===e}))&&(n=n.data):n=void 0!==e&&null!==e&&t.data[this.field].find(function(t){return t.data[a.table.options.index]==e}),n&&(Array.isArray(t.data[this.field])&&(n=t.data[this.field].indexOf(n)),-1==n&&(n=!1)),n},DataTree.prototype.getTreeChildren=function(e,t,a){var n=this,r=e.modules.dataTree,l=[];return r.children&&(Array.isArray(r.children)||(r.children=this.generateChildren(e)),r.children.forEach(function(e){e instanceof Row&&(l.push(t?e.getComponent():e),a&&(l=l.concat(n.getTreeChildren(e,t,a))))})),l},DataTree.prototype.checkForRestyle=function(e){e.row.cells.indexOf(e)||e.row.reinitialize()},DataTree.prototype.getChildField=function(){return this.field},DataTree.prototype.redrawNeeded=function(e){return!!this.field&&void 0!==e[this.field]||!!this.elementField&&void 0!==e[this.elementField]},Tabulator.prototype.registerModule("dataTree",DataTree);
\ No newline at end of file
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var Download = function Download(table) {
this.table = table; //hold Tabulator object
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Download=function(e){this.table=e};Download.prototype.download=function(e,o,t,n,a){function r(t,n){a?!0===a?i.triggerDownload(t,n,e,o,!0):a(t):i.triggerDownload(t,n,e,o)}var i=this,l=!1;if("function"==typeof e?l=e:i.downloaders[e]?l=i.downloaders[e]:console.warn("Download Error - No such download type found: ",e),l){var s=this.generateExportList(n);l.call(this.table,s,t||{},r)}},Download.prototype.generateExportList=function(e){var o=this.table.modules.export.generateExportList(this.table.options.downloadConfig,!1,e||this.table.options.downloadRowRange,"download"),t=this.table.options.groupHeaderDownload;return t&&!Array.isArray(t)&&(t=[t]),o.forEach(function(e){var o;"group"===e.type&&(o=e.columns[0],t&&t[e.indent]&&(o.value=t[e.indent](o.value,e.component._group.getRowCount(),e.component._group.getData(),e.component)))}),o},Download.prototype.triggerDownload=function(e,o,t,n,a){var r=document.createElement("a"),i=new Blob([e],{type:o}),n=n||"Tabulator."+("function"==typeof t?"txt":t);(i=this.table.options.downloadReady.call(this.table,e,i))&&(a?window.open(window.URL.createObjectURL(i)):navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(i,n):(r.setAttribute("href",window.URL.createObjectURL(i)),r.setAttribute("download",n),r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r)),this.table.options.downloadComplete&&this.table.options.downloadComplete())},Download.prototype.commsReceived=function(e,o,t){switch(o){case"intercept":this.download(t.type,"",t.options,t.active,t.intercept)}},Download.prototype.downloaders={csv:function(e,o,t){var n=o&&o.delimiter?o.delimiter:",",a=[],r=[];e.forEach(function(e){var o=[];switch(e.type){case"group":console.warn("Download Warning - CSV downloader cannot process row groups");break;case"calc":console.warn("Download Warning - CSV downloader cannot process column calculations");break;case"header":e.columns.forEach(function(e,o){e&&1===e.depth&&(r[o]=void 0===e.value||null===e.value?"":'"'+String(e.value).split('"').join('""')+'"')});break;case"row":e.columns.forEach(function(e){if(e){switch(_typeof(e.value)){case"object":e.value=JSON.stringify(e.value);break;case"undefined":case"null":e.value=""}o.push('"'+String(e.value).split('"').join('""')+'"')}}),a.push(o.join(n))}}),r.length&&a.unshift(r.join(n)),a=a.join("\n"),o.bom&&(a="\ufeff"+a),t(a,"text/csv")},json:function(e,o,t){var n=[];e.forEach(function(e){var o={};switch(e.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":e.columns.forEach(function(e){e&&(o[e.component.getField()]=e.value)}),n.push(o)}}),n=JSON.stringify(n,null,"\t"),t(n,"application/json")},pdf:function(e,o,t){function n(e,o){var t=[];return e.columns.forEach(function(e){var n;if(e){switch(_typeof(e.value)){case"object":e.value=JSON.stringify(e.value);break;case"undefined":case"null":e.value=""}n={content:e.value,colSpan:e.width,rowSpan:e.height},o&&(n.styles=o),t.push(n)}else t.push("")}),t}var a=[],r=[],i={},l=o.rowGroupStyles||{fontStyle:"bold",fontSize:12,cellPadding:6,fillColor:220},s=o.rowCalcStyles||{fontStyle:"bold",fontSize:10,cellPadding:4,fillColor:232},c=o.jsPDF||{},u=o&&o.title?o.title:"";c.orientation||(c.orientation=o.orientation||"landscape"),c.unit||(c.unit="pt"),e.forEach(function(e){switch(e.type){case"header":a.push(n(e));break;case"group":r.push(n(e,l));break;case"calc":r.push(n(e,s));break;case"row":r.push(n(e))}});var d=new jsPDF(c);o&&o.autoTable&&(i="function"==typeof o.autoTable?o.autoTable(d)||{}:o.autoTable),u&&(i.addPageContent=function(e){d.text(u,40,30)}),i.head=a,i.body=r,d.autoTable(i),o&&o.documentProcessing&&o.documentProcessing(d),t(d.output("arraybuffer"),"application/pdf")},xlsx:function(e,o,t){function n(){var o=[],t=[],n={},a={s:{c:0,r:0},e:{c:e[0]?e[0].columns.reduce(function(e,o){return e+(o&&o.width?o.width:1)},0):0,r:e.length}};return e.forEach(function(e,n){var a=[];e.columns.forEach(function(e,o){e?(a.push(e.value instanceof Date||"object"!==_typeof(e.value)?e.value:JSON.stringify(e.value)),(e.width>1||e.height>-1)&&t.push({s:{r:n,c:o},e:{r:n+e.height-1,c:o+e.width-1}})):a.push("")}),o.push(a)}),XLSX.utils.sheet_add_aoa(n,o),n["!ref"]=XLSX.utils.encode_range(a),t.length&&(n["!merges"]=t),n}var a,r=this,i=o.sheetName||"Sheet1",l=XLSX.utils.book_new();if(l.SheetNames=[],l.Sheets={},o.sheetOnly)return void t(n());if(o.sheets)for(var s in o.sheets)!0===o.sheets[s]?(l.SheetNames.push(s),l.Sheets[s]=n()):(l.SheetNames.push(s),this.modules.comms.send(o.sheets[s],"download","intercept",{type:"xlsx",options:{sheetOnly:!0},active:r.active,intercept:function(e){l.Sheets[s]=e}}));else l.SheetNames.push(i),l.Sheets[i]=n();o.documentProcessing&&(l=o.documentProcessing(l)),a=XLSX.write(l,{bookType:"xlsx",bookSST:!0,type:"binary"}),t(function(e){for(var o=new ArrayBuffer(e.length),t=new Uint8Array(o),n=0;n!=e.length;++n)t[n]=255&e.charCodeAt(n);return o}(a),"application/octet-stream")},html:function(e,o,t){this.modExists("export",!0)&&t(this.modules.export.genereateHTMLTable(e),"text/html")}},Tabulator.prototype.registerModule("download",Download);
\ No newline at end of file
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var Edit = function Edit(table) {
this.table = table; //hold Tabulator object
//return a formatted value for a cell
Edit.prototype.bindEditor = function (cell) {
var self = this,
- element = cell.getElement();
+ element = cell.getElement(true);
element.setAttribute("tabindex", 0);
rightEdge -= parseInt(this.table.modules.frozenColumns.rightMargin);
}
+ if (this.table.options.virtualDomHoz) {
+ leftEdge -= parseInt(this.table.vdomHoz.vDomPadLeft);
+ rightEdge -= parseInt(this.table.vdomHoz.vDomPadLeft);
+ }
+
if (cellEl.offsetLeft < leftEdge) {
+
this.table.rowManager.element.scrollLeft -= leftEdge - cellEl.offsetLeft;
} else {
if (cellEl.offsetLeft + cellEl.offsetWidth > rightEdge) {
displayItems = [],
currentItems = [],
blurable = true,
- blockListShow = false;
+ blockListShow = false,
+ searchWord = "",
+ searchWordTimeout = null;
if (Array.isArray(editorParams) || !Array.isArray(editorParams) && (typeof editorParams === "undefined" ? "undefined" : _typeof(editorParams)) === "object" && !editorParams.values) {
console.warn("DEPRECATION WARNING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object");
output[val] = true;
}
});
-
- if (editorParams.sortValuesList) {
- if (editorParams.sortValuesList == "asc") {
- output = Object.keys(output).sort();
- } else {
- output = Object.keys(output).sort().reverse();
- }
- } else {
- output = Object.keys(output);
- }
} else {
console.warn("unable to find matching column to create select lookup list:", field);
}
- return output;
+ return Object.keys(output);
}
function parseItems(inputValues, curentValues) {
}
}
+ if (editorParams.sortValuesList) {
+ dataList.sort(function (a, b) {
+ return a.label < b.label ? -1 : a.label > b.label ? 1 : 0;
+ });
+
+ displayList.sort(function (a, b) {
+ return a.label < b.label ? -1 : a.label > b.label ? 1 : 0;
+ });
+
+ if (editorParams.sortValuesList !== "asc") {
+ dataList.reverse();
+ displayList.reverse();
+ }
+ }
+
dataItems = dataList;
displayItems = displayList;
success(item.value);
}
- initialDisplayValue = input.value;
+ initialDisplayValue = [item.value];
}
function chooseItems(silent) {
output.push(item.value);
});
- initialDisplayValue = input.value;
+ initialDisplayValue = output;
success(output);
}
self.table.rowManager.element.removeEventListener("scroll", cancelItem);
}
+ function scrollTovalue(char) {
+
+ clearTimeout(searchWordTimeout);
+
+ var character = String.fromCharCode(event.keyCode).toLowerCase();
+ searchWord += character.toLowerCase();
+
+ var match = dataItems.find(function (item) {
+ return typeof item.label !== "undefined" && item.label.toLowerCase().startsWith(searchWord);
+ });
+
+ if (match) {
+ setCurrentItem(match, !multiselect);
+ }
+
+ searchWordTimeout = setTimeout(function () {
+ searchWord = "";
+ }, 800);
+ }
+
//style input
input.setAttribute("type", "text");
if (self.currentCell === false) {
e.preventDefault();
}
+
+ if (e.keyCode >= 38 && e.keyCode <= 90) {
+ scrollTovalue(e.keyCode);
+ }
}
});
function showList() {
if (!listEl.parentNode) {
+
+ console.log("show", initialDisplayValue);
while (listEl.firstChild) {
listEl.removeChild(listEl.firstChild);
}var offset = Tabulator.prototype.helpers.elOffset(cellEl);
//set new value
function updateValue() {
- var calcVal = percent * Math.round(bar.offsetWidth / (element.clientWidth / 100)) + min;
+ var style = window.getComputedStyle(element, null);
+
+ var calcVal = percent * Math.round(bar.offsetWidth / ((element.clientWidth - parseInt(style.getPropertyValue("padding-left")) - parseInt(style.getPropertyValue("padding-right"))) / 100)) + min;
success(calcVal);
element.setAttribute("aria-valuenow", calcVal);
element.setAttribute("aria-label", value);
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
-var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Edit=function(e){this.table=e,this.currentCell=!1,this.mouseClick=!1,this.recursionBlock=!1,this.invalidEdit=!1,this.editedCells=[]};Edit.prototype.initializeColumn=function(e){var t=this,i={editor:!1,blocked:!1,check:e.definition.editable,params:e.definition.editorParams||{}};switch(_typeof(e.definition.editor)){case"string":"tick"===e.definition.editor&&(e.definition.editor="tickCross",console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor")),t.editors[e.definition.editor]?i.editor=t.editors[e.definition.editor]:console.warn("Editor Error - No such editor found: ",e.definition.editor);break;case"function":i.editor=e.definition.editor;break;case"boolean":!0===e.definition.editor&&("function"!=typeof e.definition.formatter?("tick"===e.definition.formatter&&(e.definition.formatter="tickCross",console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor")),t.editors[e.definition.formatter]?i.editor=t.editors[e.definition.formatter]:i.editor=t.editors.input):console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ",e.definition.formatter))}i.editor&&(e.modules.edit=i)},Edit.prototype.getCurrentCell=function(){return!!this.currentCell&&this.currentCell.getComponent()},Edit.prototype.clearEditor=function(e){var t,i=this.currentCell;if(this.invalidEdit=!1,i){for(this.currentCell=!1,t=i.getElement(),e?i.validate():t.classList.remove("tabulator-validation-fail"),t.classList.remove("tabulator-editing");t.firstChild;)t.removeChild(t.firstChild);i.row.getElement().classList.remove("tabulator-row-editing")}},Edit.prototype.cancelEdit=function(){if(this.currentCell){var e=this.currentCell,t=this.currentCell.getComponent();this.clearEditor(!0),e.setValueActual(e.getValue()),e.cellRendered(),("textarea"==e.column.definition.editor||e.column.definition.variableHeight)&&e.row.normalizeHeight(!0),e.column.cellEvents.cellEditCancelled&&e.column.cellEvents.cellEditCancelled.call(this.table,t),this.table.options.cellEditCancelled.call(this.table,t)}},Edit.prototype.bindEditor=function(e){var t=this,i=e.getElement();i.setAttribute("tabindex",0),i.addEventListener("click",function(e){i.classList.contains("tabulator-editing")||i.focus({preventScroll:!0})}),i.addEventListener("mousedown",function(e){2===e.button?e.preventDefault():t.mouseClick=!0}),i.addEventListener("focus",function(i){t.recursionBlock||t.edit(e,i,!1)})},Edit.prototype.focusCellNoEvent=function(e,t){this.recursionBlock=!0,t&&"ie"===this.table.browser||e.getElement().focus({preventScroll:!0}),this.recursionBlock=!1},Edit.prototype.editCell=function(e,t){this.focusCellNoEvent(e),this.edit(e,!1,t)},Edit.prototype.focusScrollAdjust=function(e){if("virtual"==this.table.rowManager.getRenderMode()){var t=this.table.rowManager.element.scrollTop,i=this.table.rowManager.element.clientHeight+this.table.rowManager.element.scrollTop,n=e.row.getElement();n.offsetTop;n.offsetTop<t?this.table.rowManager.element.scrollTop-=t-n.offsetTop:n.offsetTop+n.offsetHeight>i&&(this.table.rowManager.element.scrollTop+=n.offsetTop+n.offsetHeight-i);var o=this.table.rowManager.element.scrollLeft,a=this.table.rowManager.element.clientWidth+this.table.rowManager.element.scrollLeft,r=e.getElement();r.offsetLeft;this.table.modExists("frozenColumns")&&(o+=parseInt(this.table.modules.frozenColumns.leftMargin),a-=parseInt(this.table.modules.frozenColumns.rightMargin)),r.offsetLeft<o?this.table.rowManager.element.scrollLeft-=o-r.offsetLeft:r.offsetLeft+r.offsetWidth>a&&(this.table.rowManager.element.scrollLeft+=r.offsetLeft+r.offsetWidth-a)}},Edit.prototype.edit=function(e,t,i){function n(t){if(u.currentCell===e){var i=!0;return e.column.modules.validate&&u.table.modExists("validate")&&"manual"!=u.table.options.validationMode&&(i=u.table.modules.validate.validate(e.column.modules.validate,e,t)),!0===i||"highlight"===u.table.options.validationMode?(u.clearEditor(),e.modules.edit||(e.modules.edit={}),e.modules.edit.edited=!0,-1==u.editedCells.indexOf(e)&&u.editedCells.push(e),e.setValue(t,!0),u.table.options.dataTree&&u.table.modExists("dataTree")&&u.table.modules.dataTree.checkForRestyle(e),!0===i||(m.classList.add("tabulator-validation-fail"),u.table.options.validationFailed.call(u.table,e.getComponent(),t,i),!1)):(u.invalidEdit=!0,m.classList.add("tabulator-validation-fail"),u.focusCellNoEvent(e,!0),c(),u.table.options.validationFailed.call(u.table,e.getComponent(),t,i),!1)}}function o(){u.currentCell===e&&(u.cancelEdit(),u.table.options.dataTree&&u.table.modExists("dataTree")&&u.table.modules.dataTree.checkForRestyle(e))}function a(e){c=e}var r,l,s,u=this,d=!0,c=function(){},m=e.getElement();if(this.currentCell)return void(this.invalidEdit||this.cancelEdit());if(e.column.modules.edit.blocked)return this.mouseClick=!1,m.blur(),!1;switch(t&&t.stopPropagation(),_typeof(e.column.modules.edit.check)){case"function":d=e.column.modules.edit.check(e.getComponent());break;case"boolean":d=e.column.modules.edit.check}if(d||i){if(u.cancelEdit(),u.currentCell=e,this.focusScrollAdjust(e),l=e.getComponent(),this.mouseClick&&(this.mouseClick=!1,e.column.cellEvents.cellClick&&e.column.cellEvents.cellClick.call(this.table,t,l)),e.column.cellEvents.cellEditing&&e.column.cellEvents.cellEditing.call(this.table,l),u.table.options.cellEditing.call(this.table,l),s="function"==typeof e.column.modules.edit.params?e.column.modules.edit.params(l):e.column.modules.edit.params,!1===(r=e.column.modules.edit.editor.call(u,l,a,n,o,s)))return m.blur(),!1;if(!(r instanceof Node))return console.warn("Edit Error - Editor should return an instance of Node, the editor returned:",r),m.blur(),!1;for(m.classList.add("tabulator-editing"),e.row.getElement().classList.add("tabulator-row-editing");m.firstChild;)m.removeChild(m.firstChild);m.appendChild(r),c();for(var f=m.children,p=0;p<f.length;p++)f[p].addEventListener("click",function(e){e.stopPropagation()});return!0}return this.mouseClick=!1,m.blur(),!1},Edit.prototype.maskInput=function(e,t){function i(t){var l=n[t];void 0!==l&&l!==r&&l!==o&&l!==a&&(e.value=e.value+""+l,i(t+1))}var n=t.mask,o=void 0!==t.maskLetterChar?t.maskLetterChar:"A",a=void 0!==t.maskNumberChar?t.maskNumberChar:"9",r=void 0!==t.maskWildcardChar?t.maskWildcardChar:"*",l=!1;e.addEventListener("keydown",function(t){var i=e.value.length,s=t.key;if(t.keyCode>46){if(i>=n.length)return t.preventDefault(),t.stopPropagation(),l=!1,!1;switch(n[i]){case o:if(s.toUpperCase()==s.toLowerCase())return t.preventDefault(),t.stopPropagation(),l=!1,!1;break;case a:if(isNaN(s))return t.preventDefault(),t.stopPropagation(),l=!1,!1;break;case r:break;default:if(s!==n[i])return t.preventDefault(),t.stopPropagation(),l=!1,!1}l=!0}}),e.addEventListener("keyup",function(n){n.keyCode>46&&t.maskAutoFill&&i(e.value.length)}),e.placeholder||(e.placeholder=n),t.maskAutoFill&&i(e.value.length)},Edit.prototype.getEditedCells=function(){var e=[];return this.editedCells.forEach(function(t){e.push(t.getComponent())}),e},Edit.prototype.clearEdited=function(e){var t;e.modules.edit&&e.modules.edit.edited&&(e.modules.edit.edited=!1,e.modules.validate&&(e.modules.validate.invalid=!1)),(t=this.editedCells.indexOf(e))>-1&&this.editedCells.splice(t,1)},Edit.prototype.editors={input:function(e,t,i,n,o){function a(e){(null===r||void 0===r)&&""!==l.value||l.value!==r?i(l.value)&&(r=l.value):n()}var r=e.getValue(),l=document.createElement("input");if(l.setAttribute("type",o.search?"search":"text"),l.style.padding="4px",l.style.width="100%",l.style.boxSizing="border-box",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var s in o.elementAttributes)"+"==s.charAt(0)?(s=s.slice(1),l.setAttribute(s,l.getAttribute(s)+o.elementAttributes["+"+s])):l.setAttribute(s,o.elementAttributes[s]);return l.value=void 0!==r?r:"",t(function(){l.focus({preventScroll:!0}),l.style.height="100%"}),l.addEventListener("change",a),l.addEventListener("blur",a),l.addEventListener("keydown",function(e){switch(e.keyCode){case 13:a(e);break;case 27:n();break;case 35:case 36:e.stopPropagation()}}),o.mask&&this.table.modules.edit.maskInput(l,o),l},textarea:function(e,t,i,n,o){function a(t){(null===r||void 0===r)&&""!==u.value||u.value!==r?(i(u.value)&&(r=u.value),setTimeout(function(){e.getRow().normalizeHeight()},300)):n()}var r=e.getValue(),l=o.verticalNavigation||"hybrid",s=String(null!==r&&void 0!==r?r:""),u=(s.match(/(?:\r\n|\r|\n)/g),document.createElement("textarea")),d=0;if(u.style.display="block",u.style.padding="2px",u.style.height="100%",u.style.width="100%",u.style.boxSizing="border-box",u.style.whiteSpace="pre-wrap",u.style.resize="none",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var c in o.elementAttributes)"+"==c.charAt(0)?(c=c.slice(1),u.setAttribute(c,u.getAttribute(c)+o.elementAttributes["+"+c])):u.setAttribute(c,o.elementAttributes[c]);return u.value=s,t(function(){u.focus({preventScroll:!0}),u.style.height="100%",u.scrollHeight,u.style.height=u.scrollHeight+"px",e.getRow().normalizeHeight()}),u.addEventListener("change",a),u.addEventListener("blur",a),u.addEventListener("keyup",function(){u.style.height="";var t=u.scrollHeight;u.style.height=t+"px",t!=d&&(d=t,e.getRow().normalizeHeight())}),u.addEventListener("keydown",function(e){switch(e.keyCode){case 27:n();break;case 38:("editor"==l||"hybrid"==l&&u.selectionStart)&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 40:("editor"==l||"hybrid"==l&&u.selectionStart!==u.value.length)&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 35:case 36:e.stopPropagation()}}),o.mask&&this.table.modules.edit.maskInput(u,o),u},number:function(e,t,i,n,o){function a(){var e=s.value;isNaN(e)||""===e||(e=Number(e)),e!==r?i(e)&&(r=e):n()}var r=e.getValue(),l=o.verticalNavigation||"editor",s=document.createElement("input");if(s.setAttribute("type","number"),void 0!==o.max&&s.setAttribute("max",o.max),void 0!==o.min&&s.setAttribute("min",o.min),void 0!==o.step&&s.setAttribute("step",o.step),s.style.padding="4px",s.style.width="100%",s.style.boxSizing="border-box",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var u in o.elementAttributes)"+"==u.charAt(0)?(u=u.slice(1),s.setAttribute(u,s.getAttribute(u)+o.elementAttributes["+"+u])):s.setAttribute(u,o.elementAttributes[u]);s.value=r;var d=function(e){a()};return t(function(){s.removeEventListener("blur",d),s.focus({preventScroll:!0}),s.style.height="100%",s.addEventListener("blur",d)}),s.addEventListener("keydown",function(e){switch(e.keyCode){case 13:a();break;case 27:n();break;case 38:case 40:"editor"==l&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 35:case 36:e.stopPropagation()}}),o.mask&&this.table.modules.edit.maskInput(s,o),s},range:function(e,t,i,n,o){function a(){var e=l.value;isNaN(e)||""===e||(e=Number(e)),e!=r?i(e)&&(r=e):n()}var r=e.getValue(),l=document.createElement("input");if(l.setAttribute("type","range"),void 0!==o.max&&l.setAttribute("max",o.max),void 0!==o.min&&l.setAttribute("min",o.min),void 0!==o.step&&l.setAttribute("step",o.step),l.style.padding="4px",l.style.width="100%",l.style.boxSizing="border-box",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var s in o.elementAttributes)"+"==s.charAt(0)?(s=s.slice(1),l.setAttribute(s,l.getAttribute(s)+o.elementAttributes["+"+s])):l.setAttribute(s,o.elementAttributes[s]);return l.value=r,t(function(){l.focus({preventScroll:!0}),l.style.height="100%"}),l.addEventListener("blur",function(e){a()}),l.addEventListener("keydown",function(e){switch(e.keyCode){case 13:a();break;case 27:n()}}),l},select:function(e,t,i,n,o){function a(t){var i,n={},a=k.table.getData();return i=t?k.table.columnManager.getColumnByField(t):e.getColumn()._getSelf(),i?(a.forEach(function(e){var t=i.getFieldValue(e);null!==t&&void 0!==t&&""!==t&&(n[t]=!0)}),n=o.sortValuesList?"asc"==o.sortValuesList?Object.keys(n).sort():Object.keys(n).sort().reverse():Object.keys(n)):console.warn("unable to find matching column to create select lookup list:",t),n}function r(t,i){function n(e){var e={label:e.label,value:e.value,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1};return i.indexOf(e.value)>-1&&u(e),o.push(e),a.push(e),e}var o=[],a=[];if("function"==typeof t&&(t=t(e)),Array.isArray(t))t.forEach(function(e){var t;"object"===(void 0===e?"undefined":_typeof(e))?e.options?(t={label:e.label,group:!0,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1},a.push(t),e.options.forEach(function(e){n(e)})):n(e):(t={label:e,value:e,element:!1},i.indexOf(t.value)>-1&&u(t),o.push(t),a.push(t))});else for(var r in t){var s={label:t[r],value:r,element:!1};i.indexOf(s.value)>-1&&u(s),o.push(s),a.push(s)}N=o,S=a,l()}function l(){for(;P.firstChild;)P.removeChild(P.firstChild);S.forEach(function(t){var i=t.element;if(!i){if(i=document.createElement("div"),t.label=o.listItemFormatter?o.listItemFormatter(t.value,t.label,e,i,t.itemParams):t.label,t.group?(i.classList.add("tabulator-edit-select-list-group"),i.tabIndex=0,i.innerHTML=""===t.label?" ":t.label):(i.classList.add("tabulator-edit-select-list-item"),i.tabIndex=0,i.innerHTML=""===t.label?" ":t.label,i.addEventListener("click",function(){V=!0,setTimeout(function(){V=!1},10),I?(c(t),x.focus()):m(t)}),M.indexOf(t)>-1&&i.classList.add("active")),t.elementAttributes&&"object"==_typeof(t.elementAttributes))for(var n in t.elementAttributes)"+"==n.charAt(0)?(n=n.slice(1),i.setAttribute(n,x.getAttribute(n)+t.elementAttributes["+"+n])):i.setAttribute(n,t.elementAttributes[n]);i.addEventListener("mousedown",function(){O=!1,setTimeout(function(){O=!0},10)}),t.element=i}P.appendChild(i)})}function s(e,t){!I&&T&&T.element&&T.element.classList.remove("active"),T&&T.element&&T.element.classList.remove("focused"),T=e,e.element&&(e.element.classList.add("focused"),t&&e.element.classList.add("active")),e&&e.element&&e.element.scrollIntoView&&e.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}function u(e){-1==M.indexOf(e)&&(M.push(e),s(e,!0)),p()}function d(e){var t=M[e];e>-1&&(M.splice(e,1),t.element&&t.element.classList.remove("active"))}function c(e){e||(e=T);var t=M.indexOf(e);t>-1?d(t):(!0!==I&&M.length>=I&&d(0),u(e)),p()}function m(e){g(),e||(e=T),e&&(x.value=e.label,i(e.value)),w=x.value}function f(e){e||g();var t=[];M.forEach(function(e){t.push(e.value)}),w=x.value,i(t)}function p(){var e=[];M.forEach(function(t){e.push(t.label)}),x.value=e.join(", "),!1===k.currentCell&&f(!0)}function b(){for(var e=M.length,t=0;t<e;t++)d(0)}function v(){g(),n()}function h(){if(M=[],!P.parentNode){!0===o.values?r(a(),w):"string"==typeof o.values?r(a(o.values),w):r(o.values||[],w);var e=Tabulator.prototype.helpers.elOffset(A);P.style.minWidth=A.offsetWidth+"px",P.style.top=e.top+A.offsetHeight+"px",P.style.left=e.left+"px",P.addEventListener("mousedown",function(e){O=!1,setTimeout(function(){O=!0},10)}),document.body.appendChild(P)}}function g(){P.parentNode&&P.parentNode.removeChild(P),y()}function y(){k.table.rowManager.element.removeEventListener("scroll",v)}var E=this,k=this,A=e.getElement(),C=e.getValue(),L=o.verticalNavigation||"editor",w=void 0!==C||null===C?Array.isArray(C)?C:[C]:void 0!==o.defaultValue?o.defaultValue:[],x=document.createElement("input"),P=document.createElement("div"),I=o.multiselect,N=[],T={},S=[],M=[],O=!0,V=!1;if((Array.isArray(o)||!Array.isArray(o)&&"object"===(void 0===o?"undefined":_typeof(o))&&!o.values)&&(console.warn("DEPRECATION WARNING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object"),o={values:o}),x.setAttribute("type","text"),x.style.padding="4px",x.style.width="100%",x.style.boxSizing="border-box",x.style.cursor="default",x.readOnly=0!=this.currentCell,o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var j in o.elementAttributes)"+"==j.charAt(0)?(j=j.slice(1),x.setAttribute(j,x.getAttribute(j)+o.elementAttributes["+"+j])):x.setAttribute(j,o.elementAttributes[j]);return x.value=void 0!==C||null===C?C:"",x.addEventListener("search",function(e){x.value||(b(),f())}),x.addEventListener("keydown",function(e){var t;switch(e.keyCode){case 38:t=N.indexOf(T),("editor"==L||"hybrid"==L&&t)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t>0&&s(N[t-1],!I));break;case 40:t=N.indexOf(T),("editor"==L||"hybrid"==L&&t<N.length-1)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t<N.length-1&&(-1==t?s(N[0],!I):s(N[t+1],!I)));break;case 37:case 39:e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault();break;case 13:I?c():m();break;case 27:v();break;case 9:break;default:!1===k.currentCell&&e.preventDefault()}}),x.addEventListener("blur",function(e){O&&(I?f():v())}),x.addEventListener("focus",function(e){V||h()}),P=document.createElement("div"),P.classList.add("tabulator-edit-select-list"),t(function(){x.style.height="100%",x.focus({preventScroll:!0})}),setTimeout(function(){E.table.rowManager.element.addEventListener("scroll",v)},10),x},autocomplete:function(e,t,i,n,o){function a(){!0===o.values?T=r():"string"==typeof o.values&&(T=r(o.values))}function r(t){var i,n={},a=E.table.getData();return i=t?E.table.columnManager.getColumnByField(t):e.getColumn()._getSelf(),i?(a.forEach(function(e){var t=i.getFieldValue(e);null!==t&&void 0!==t&&""!==t&&(n[t]=!0)}),n=o.sortValuesList?"asc"==o.sortValuesList?Object.keys(n).sort():Object.keys(n).sort().reverse():Object.keys(n)):console.warn("unable to find matching column to create autocomplete lookup list:",t),n}function l(e,t){var i,n,a=[];i=T||(o.values||[]),o.searchFunc?(a=o.searchFunc(e,i),a instanceof Promise?(s(void 0!==o.searchingPlaceholder?o.searchingPlaceholder:"Searching..."),a.then(function(e){c(u(e),t)}).catch(function(e){console.err("error in autocomplete search promise:",e)})):c(u(a),t)):(n=u(i),""===e?o.showListOnEmpty&&(a=n):n.forEach(function(t){null===t.value&&void 0===t.value||(String(t.value).toLowerCase().indexOf(String(e).toLowerCase())>-1||String(t.title).toLowerCase().indexOf(String(e).toLowerCase())>-1)&&a.push(t)}),c(a,t))}function s(e){var t=document.createElement("div");d(),!1!==e&&(t.classList.add("tabulator-edit-select-list-notice"),t.tabIndex=0,e instanceof Node?t.appendChild(e):t.innerHTML=e,x.appendChild(t))}function u(e){var t=[];if(Array.isArray(e))e.forEach(function(e){var i={};"object"===(void 0===e?"undefined":_typeof(e))?(i.title=o.listItemFormatter?o.listItemFormatter(e.value,e.label):e.label,i.value=e.value):(i.title=o.listItemFormatter?o.listItemFormatter(e,e):e,i.value=e),t.push(i)});else for(var i in e){var n={title:o.listItemFormatter?o.listItemFormatter(i,e[i]):e[i],value:i};t.push(n)}return t}function d(){for(;x.firstChild;)x.removeChild(x.firstChild)}function c(e,t){e.length?m(e,t):o.emptyPlaceholder&&s(o.emptyPlaceholder)}function m(e,t){var i=!1;d(),P=e,P.forEach(function(e){var n=e.element;n||(n=document.createElement("div"),n.classList.add("tabulator-edit-select-list-item"),n.tabIndex=0,n.innerHTML=e.title,n.addEventListener("click",function(t){b(e),f()}),n.addEventListener("mousedown",function(e){N=!1,setTimeout(function(){N=!0},10)}),e.element=n,t&&e.value==A&&(w.value=e.title,e.element.classList.add("active"),i=!0),e===I&&(e.element.classList.add("active"),i=!0)),x.appendChild(n)}),i||b(!1)}function f(){v(),I?A!==I.value?(A=I.value,w.value=I.title,i(I.value)):n():o.freetext?(A=w.value,i(w.value)):o.allowEmpty&&""===w.value?(A=w.value,i(w.value)):n()}function p(){if(!x.parentNode){for(;x.firstChild;)x.removeChild(x.firstChild);var e=Tabulator.prototype.helpers.elOffset(k);x.style.minWidth=k.offsetWidth+"px",x.style.top=e.top+k.offsetHeight+"px",x.style.left=e.left+"px",document.body.appendChild(x)}}function b(e,t){I&&I.element&&I.element.classList.remove("active"),I=e,e&&e.element&&e.element.classList.add("active"),e&&e.element&&e.element.scrollIntoView&&e.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}function v(){x.parentNode&&x.parentNode.removeChild(x),g()}function h(){v(),n()}function g(){E.table.rowManager.element.removeEventListener("scroll",h)}var y=this,E=this,k=e.getElement(),A=e.getValue(),C=o.verticalNavigation||"editor",L=void 0!==A||null===A?A:void 0!==o.defaultValue?o.defaultValue:"",w=document.createElement("input"),x=document.createElement("div"),P=[],I=!1,N=!0,T=!1;if(w.setAttribute("type","search"),w.style.padding="4px",w.style.width="100%",w.style.boxSizing="border-box",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var S in o.elementAttributes)"+"==S.charAt(0)?(S=S.slice(1),w.setAttribute(S,w.getAttribute(S)+o.elementAttributes["+"+S])):w.setAttribute(S,o.elementAttributes[S]);return x.classList.add("tabulator-edit-select-list"),x.addEventListener("mousedown",function(e){N=!1,setTimeout(function(){N=!0},10)}),w.addEventListener("keydown",function(e){var t;switch(e.keyCode){case 38:t=P.indexOf(I),("editor"==C||"hybrid"==C&&t)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),b(t>0?P[t-1]:!1));break;case 40:t=P.indexOf(I),("editor"==C||"hybrid"==C&&t<P.length-1)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t<P.length-1&&b(-1==t?P[0]:P[t+1]));break;case 37:case 39:e.stopImmediatePropagation(),e.stopPropagation();break;case 13:f();break;case 27:h();break;case 36:case 35:e.stopImmediatePropagation()}}),w.addEventListener("keyup",function(e){switch(e.keyCode){case 38:case 37:case 39:case 40:case 13:case 27:break;default:l(w.value)}}),w.addEventListener("search",function(e){l(w.value)}),w.addEventListener("blur",function(e){N&&f()}),w.addEventListener("focus",function(e){var t=L;a(),p(),w.value=t,l(t,!0)}),t(function(){w.style.height="100%",w.focus({preventScroll:!0})}),o.mask&&this.table.modules.edit.maskInput(w,o),setTimeout(function(){y.table.rowManager.element.addEventListener("scroll",h)},10),a(),w.value=L,l(L,!0),w},star:function(e,t,i,n,o){function a(e){m.forEach(function(t,i){i<e?("ie"==l.table.browser?t.setAttribute("class","tabulator-star-active"):t.classList.replace("tabulator-star-inactive","tabulator-star-active"),t.innerHTML='<polygon fill="#488CE9" stroke="#014AAE" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>'):("ie"==l.table.browser?t.setAttribute("class","tabulator-star-inactive"):t.classList.replace("tabulator-star-active","tabulator-star-inactive"),t.innerHTML='<polygon fill="#010155" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>')})}function r(e){u=e,a(e)}var l=this,s=e.getElement(),u=e.getValue(),d=s.getElementsByTagName("svg").length||5,c=s.getElementsByTagName("svg")[0]?s.getElementsByTagName("svg")[0].getAttribute("width"):14,m=[],f=document.createElement("div"),p=document.createElementNS("http://www.w3.org/2000/svg","svg");if(s.style.whiteSpace="nowrap",s.style.overflow="hidden",s.style.textOverflow="ellipsis",f.style.verticalAlign="middle",f.style.display="inline-block",f.style.padding="4px",p.setAttribute("width",c),p.setAttribute("height",c),p.setAttribute("viewBox","0 0 512 512"),p.setAttribute("xml:space","preserve"),p.style.padding="0 1px",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var b in o.elementAttributes)"+"==b.charAt(0)?(b=b.slice(1),f.setAttribute(b,f.getAttribute(b)+o.elementAttributes["+"+b])):f.setAttribute(b,o.elementAttributes[b]);for(var v=1;v<=d;v++)!function(e){var t=document.createElement("span"),n=p.cloneNode(!0);m.push(n),t.addEventListener("mouseenter",function(t){t.stopPropagation(),t.stopImmediatePropagation(),a(e)}),t.addEventListener("mousemove",function(e){e.stopPropagation(),e.stopImmediatePropagation()}),t.addEventListener("click",function(t){t.stopPropagation(),t.stopImmediatePropagation(),i(e),s.blur()}),t.appendChild(n),f.appendChild(t)}(v);return u=Math.min(parseInt(u),d),a(u),f.addEventListener("mousemove",function(e){a(0)}),f.addEventListener("click",function(e){i(0)}),s.addEventListener("blur",function(e){n()}),s.addEventListener("keydown",function(e){switch(e.keyCode){case 39:r(u+1);break;case 37:r(u-1);break;case 13:i(u);break;case 27:n()}}),f},progress:function(e,t,i,n,o){function a(){var e=c*Math.round(p.offsetWidth/(s.clientWidth/100))+d;i(e),s.setAttribute("aria-valuenow",e),s.setAttribute("aria-label",m)}var r,l,s=e.getElement(),u=void 0===o.max?s.getElementsByTagName("div")[0].getAttribute("max")||100:o.max,d=void 0===o.min?s.getElementsByTagName("div")[0].getAttribute("min")||0:o.min,c=(u-d)/100,m=e.getValue()||0,f=document.createElement("div"),p=document.createElement("div");if(f.style.position="absolute",f.style.right="0",f.style.top="0",f.style.bottom="0",f.style.width="5px",f.classList.add("tabulator-progress-handle"),p.style.display="inline-block",p.style.position="relative",p.style.height="100%",p.style.backgroundColor="#488CE9",p.style.maxWidth="100%",p.style.minWidth="0%",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var b in o.elementAttributes)"+"==b.charAt(0)?(b=b.slice(1),p.setAttribute(b,p.getAttribute(b)+o.elementAttributes["+"+b])):p.setAttribute(b,o.elementAttributes[b]);return s.style.padding="4px 4px",m=Math.min(parseFloat(m),u),m=Math.max(parseFloat(m),d),m=Math.round((m-d)/c),p.style.width=m+"%",s.setAttribute("aria-valuemin",d),s.setAttribute("aria-valuemax",u),p.appendChild(f),f.addEventListener("mousedown",function(e){r=e.screenX,l=p.offsetWidth}),f.addEventListener("mouseover",function(){f.style.cursor="ew-resize"}),s.addEventListener("mousemove",function(e){r&&(p.style.width=l+e.screenX-r+"px")}),s.addEventListener("mouseup",function(e){r&&(e.stopPropagation(),e.stopImmediatePropagation(),r=!1,l=!1,a())}),s.addEventListener("keydown",function(e){switch(e.keyCode){case 39:e.preventDefault(),p.style.width=p.clientWidth+s.clientWidth/100+"px";break;case 37:e.preventDefault(),p.style.width=p.clientWidth-s.clientWidth/100+"px";break;case 9:case 13:a();break;case 27:n()}}),s.addEventListener("blur",function(){n()}),p},tickCross:function(e,t,i,n,o){function a(e){return s?e?d?u:l.checked:l.checked&&!d?(l.checked=!1,l.indeterminate=!0,d=!0,u):(d=!1,l.checked):l.checked}var r=e.getValue(),l=document.createElement("input"),s=o.tristate,u=void 0===o.indeterminateValue?null:o.indeterminateValue,d=!1;if(l.setAttribute("type","checkbox"),l.style.marginTop="5px",l.style.boxSizing="border-box",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var c in o.elementAttributes)"+"==c.charAt(0)?(c=c.slice(1),l.setAttribute(c,l.getAttribute(c)+o.elementAttributes["+"+c])):l.setAttribute(c,o.elementAttributes[c]);return l.value=r,!s||void 0!==r&&r!==u&&""!==r||(d=!0,l.indeterminate=!0),"firefox"!=this.table.browser&&t(function(){l.focus({preventScroll:!0})}),l.checked=!0===r||"true"===r||"True"===r||1===r,t(function(){l.focus()}),l.addEventListener("change",function(e){i(a())}),l.addEventListener("blur",function(e){i(a(!0))}),l.addEventListener("keydown",function(e){13==e.keyCode&&i(a()),27==e.keyCode&&n()}),l}},Tabulator.prototype.registerModule("edit",Edit);
\ No newline at end of file
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
+var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Edit=function(e){this.table=e,this.currentCell=!1,this.mouseClick=!1,this.recursionBlock=!1,this.invalidEdit=!1,this.editedCells=[]};Edit.prototype.initializeColumn=function(e){var t=this,i={editor:!1,blocked:!1,check:e.definition.editable,params:e.definition.editorParams||{}};switch(_typeof(e.definition.editor)){case"string":"tick"===e.definition.editor&&(e.definition.editor="tickCross",console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor")),t.editors[e.definition.editor]?i.editor=t.editors[e.definition.editor]:console.warn("Editor Error - No such editor found: ",e.definition.editor);break;case"function":i.editor=e.definition.editor;break;case"boolean":!0===e.definition.editor&&("function"!=typeof e.definition.formatter?("tick"===e.definition.formatter&&(e.definition.formatter="tickCross",console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor")),t.editors[e.definition.formatter]?i.editor=t.editors[e.definition.formatter]:i.editor=t.editors.input):console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ",e.definition.formatter))}i.editor&&(e.modules.edit=i)},Edit.prototype.getCurrentCell=function(){return!!this.currentCell&&this.currentCell.getComponent()},Edit.prototype.clearEditor=function(e){var t,i=this.currentCell;if(this.invalidEdit=!1,i){for(this.currentCell=!1,t=i.getElement(),e?i.validate():t.classList.remove("tabulator-validation-fail"),t.classList.remove("tabulator-editing");t.firstChild;)t.removeChild(t.firstChild);i.row.getElement().classList.remove("tabulator-row-editing")}},Edit.prototype.cancelEdit=function(){if(this.currentCell){var e=this.currentCell,t=this.currentCell.getComponent();this.clearEditor(!0),e.setValueActual(e.getValue()),e.cellRendered(),("textarea"==e.column.definition.editor||e.column.definition.variableHeight)&&e.row.normalizeHeight(!0),e.column.cellEvents.cellEditCancelled&&e.column.cellEvents.cellEditCancelled.call(this.table,t),this.table.options.cellEditCancelled.call(this.table,t)}},Edit.prototype.bindEditor=function(e){var t=this,i=e.getElement(!0);i.setAttribute("tabindex",0),i.addEventListener("click",function(e){i.classList.contains("tabulator-editing")||i.focus({preventScroll:!0})}),i.addEventListener("mousedown",function(e){2===e.button?e.preventDefault():t.mouseClick=!0}),i.addEventListener("focus",function(i){t.recursionBlock||t.edit(e,i,!1)})},Edit.prototype.focusCellNoEvent=function(e,t){this.recursionBlock=!0,t&&"ie"===this.table.browser||e.getElement().focus({preventScroll:!0}),this.recursionBlock=!1},Edit.prototype.editCell=function(e,t){this.focusCellNoEvent(e),this.edit(e,!1,t)},Edit.prototype.focusScrollAdjust=function(e){if("virtual"==this.table.rowManager.getRenderMode()){var t=this.table.rowManager.element.scrollTop,i=this.table.rowManager.element.clientHeight+this.table.rowManager.element.scrollTop,n=e.row.getElement();n.offsetTop;n.offsetTop<t?this.table.rowManager.element.scrollTop-=t-n.offsetTop:n.offsetTop+n.offsetHeight>i&&(this.table.rowManager.element.scrollTop+=n.offsetTop+n.offsetHeight-i);var o=this.table.rowManager.element.scrollLeft,a=this.table.rowManager.element.clientWidth+this.table.rowManager.element.scrollLeft,r=e.getElement();r.offsetLeft;this.table.modExists("frozenColumns")&&(o+=parseInt(this.table.modules.frozenColumns.leftMargin),a-=parseInt(this.table.modules.frozenColumns.rightMargin)),this.table.options.virtualDomHoz&&(o-=parseInt(this.table.vdomHoz.vDomPadLeft),a-=parseInt(this.table.vdomHoz.vDomPadLeft)),r.offsetLeft<o?this.table.rowManager.element.scrollLeft-=o-r.offsetLeft:r.offsetLeft+r.offsetWidth>a&&(this.table.rowManager.element.scrollLeft+=r.offsetLeft+r.offsetWidth-a)}},Edit.prototype.edit=function(e,t,i){function n(t){if(u.currentCell===e){var i=!0;return e.column.modules.validate&&u.table.modExists("validate")&&"manual"!=u.table.options.validationMode&&(i=u.table.modules.validate.validate(e.column.modules.validate,e,t)),!0===i||"highlight"===u.table.options.validationMode?(u.clearEditor(),e.modules.edit||(e.modules.edit={}),e.modules.edit.edited=!0,-1==u.editedCells.indexOf(e)&&u.editedCells.push(e),e.setValue(t,!0),u.table.options.dataTree&&u.table.modExists("dataTree")&&u.table.modules.dataTree.checkForRestyle(e),!0===i||(m.classList.add("tabulator-validation-fail"),u.table.options.validationFailed.call(u.table,e.getComponent(),t,i),!1)):(u.invalidEdit=!0,m.classList.add("tabulator-validation-fail"),u.focusCellNoEvent(e,!0),c(),u.table.options.validationFailed.call(u.table,e.getComponent(),t,i),!1)}}function o(){u.currentCell===e&&(u.cancelEdit(),u.table.options.dataTree&&u.table.modExists("dataTree")&&u.table.modules.dataTree.checkForRestyle(e))}function a(e){c=e}var r,l,s,u=this,d=!0,c=function(){},m=e.getElement();if(this.currentCell)return void(this.invalidEdit||this.cancelEdit());if(e.column.modules.edit.blocked)return this.mouseClick=!1,m.blur(),!1;switch(t&&t.stopPropagation(),_typeof(e.column.modules.edit.check)){case"function":d=e.column.modules.edit.check(e.getComponent());break;case"boolean":d=e.column.modules.edit.check}if(d||i){if(u.cancelEdit(),u.currentCell=e,this.focusScrollAdjust(e),l=e.getComponent(),this.mouseClick&&(this.mouseClick=!1,e.column.cellEvents.cellClick&&e.column.cellEvents.cellClick.call(this.table,t,l)),e.column.cellEvents.cellEditing&&e.column.cellEvents.cellEditing.call(this.table,l),u.table.options.cellEditing.call(this.table,l),s="function"==typeof e.column.modules.edit.params?e.column.modules.edit.params(l):e.column.modules.edit.params,!1===(r=e.column.modules.edit.editor.call(u,l,a,n,o,s)))return m.blur(),!1;if(!(r instanceof Node))return console.warn("Edit Error - Editor should return an instance of Node, the editor returned:",r),m.blur(),!1;for(m.classList.add("tabulator-editing"),e.row.getElement().classList.add("tabulator-row-editing");m.firstChild;)m.removeChild(m.firstChild);m.appendChild(r),c();for(var f=m.children,p=0;p<f.length;p++)f[p].addEventListener("click",function(e){e.stopPropagation()});return!0}return this.mouseClick=!1,m.blur(),!1},Edit.prototype.maskInput=function(e,t){function i(t){var l=n[t];void 0!==l&&l!==r&&l!==o&&l!==a&&(e.value=e.value+""+l,i(t+1))}var n=t.mask,o=void 0!==t.maskLetterChar?t.maskLetterChar:"A",a=void 0!==t.maskNumberChar?t.maskNumberChar:"9",r=void 0!==t.maskWildcardChar?t.maskWildcardChar:"*",l=!1;e.addEventListener("keydown",function(t){var i=e.value.length,s=t.key;if(t.keyCode>46){if(i>=n.length)return t.preventDefault(),t.stopPropagation(),l=!1,!1;switch(n[i]){case o:if(s.toUpperCase()==s.toLowerCase())return t.preventDefault(),t.stopPropagation(),l=!1,!1;break;case a:if(isNaN(s))return t.preventDefault(),t.stopPropagation(),l=!1,!1;break;case r:break;default:if(s!==n[i])return t.preventDefault(),t.stopPropagation(),l=!1,!1}l=!0}}),e.addEventListener("keyup",function(n){n.keyCode>46&&t.maskAutoFill&&i(e.value.length)}),e.placeholder||(e.placeholder=n),t.maskAutoFill&&i(e.value.length)},Edit.prototype.getEditedCells=function(){var e=[];return this.editedCells.forEach(function(t){e.push(t.getComponent())}),e},Edit.prototype.clearEdited=function(e){var t;e.modules.edit&&e.modules.edit.edited&&(e.modules.edit.edited=!1,e.modules.validate&&(e.modules.validate.invalid=!1)),(t=this.editedCells.indexOf(e))>-1&&this.editedCells.splice(t,1)},Edit.prototype.editors={input:function(e,t,i,n,o){function a(e){(null===r||void 0===r)&&""!==l.value||l.value!==r?i(l.value)&&(r=l.value):n()}var r=e.getValue(),l=document.createElement("input");if(l.setAttribute("type",o.search?"search":"text"),l.style.padding="4px",l.style.width="100%",l.style.boxSizing="border-box",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var s in o.elementAttributes)"+"==s.charAt(0)?(s=s.slice(1),l.setAttribute(s,l.getAttribute(s)+o.elementAttributes["+"+s])):l.setAttribute(s,o.elementAttributes[s]);return l.value=void 0!==r?r:"",t(function(){l.focus({preventScroll:!0}),l.style.height="100%"}),l.addEventListener("change",a),l.addEventListener("blur",a),l.addEventListener("keydown",function(e){switch(e.keyCode){case 13:a(e);break;case 27:n();break;case 35:case 36:e.stopPropagation()}}),o.mask&&this.table.modules.edit.maskInput(l,o),l},textarea:function(e,t,i,n,o){function a(t){(null===r||void 0===r)&&""!==u.value||u.value!==r?(i(u.value)&&(r=u.value),setTimeout(function(){e.getRow().normalizeHeight()},300)):n()}var r=e.getValue(),l=o.verticalNavigation||"hybrid",s=String(null!==r&&void 0!==r?r:""),u=(s.match(/(?:\r\n|\r|\n)/g),document.createElement("textarea")),d=0;if(u.style.display="block",u.style.padding="2px",u.style.height="100%",u.style.width="100%",u.style.boxSizing="border-box",u.style.whiteSpace="pre-wrap",u.style.resize="none",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var c in o.elementAttributes)"+"==c.charAt(0)?(c=c.slice(1),u.setAttribute(c,u.getAttribute(c)+o.elementAttributes["+"+c])):u.setAttribute(c,o.elementAttributes[c]);return u.value=s,t(function(){u.focus({preventScroll:!0}),u.style.height="100%",u.scrollHeight,u.style.height=u.scrollHeight+"px",e.getRow().normalizeHeight()}),u.addEventListener("change",a),u.addEventListener("blur",a),u.addEventListener("keyup",function(){u.style.height="";var t=u.scrollHeight;u.style.height=t+"px",t!=d&&(d=t,e.getRow().normalizeHeight())}),u.addEventListener("keydown",function(e){switch(e.keyCode){case 27:n();break;case 38:("editor"==l||"hybrid"==l&&u.selectionStart)&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 40:("editor"==l||"hybrid"==l&&u.selectionStart!==u.value.length)&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 35:case 36:e.stopPropagation()}}),o.mask&&this.table.modules.edit.maskInput(u,o),u},number:function(e,t,i,n,o){function a(){var e=s.value;isNaN(e)||""===e||(e=Number(e)),e!==r?i(e)&&(r=e):n()}var r=e.getValue(),l=o.verticalNavigation||"editor",s=document.createElement("input");if(s.setAttribute("type","number"),void 0!==o.max&&s.setAttribute("max",o.max),void 0!==o.min&&s.setAttribute("min",o.min),void 0!==o.step&&s.setAttribute("step",o.step),s.style.padding="4px",s.style.width="100%",s.style.boxSizing="border-box",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var u in o.elementAttributes)"+"==u.charAt(0)?(u=u.slice(1),s.setAttribute(u,s.getAttribute(u)+o.elementAttributes["+"+u])):s.setAttribute(u,o.elementAttributes[u]);s.value=r;var d=function(e){a()};return t(function(){s.removeEventListener("blur",d),s.focus({preventScroll:!0}),s.style.height="100%",s.addEventListener("blur",d)}),s.addEventListener("keydown",function(e){switch(e.keyCode){case 13:a();break;case 27:n();break;case 38:case 40:"editor"==l&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 35:case 36:e.stopPropagation()}}),o.mask&&this.table.modules.edit.maskInput(s,o),s},range:function(e,t,i,n,o){function a(){var e=l.value;isNaN(e)||""===e||(e=Number(e)),e!=r?i(e)&&(r=e):n()}var r=e.getValue(),l=document.createElement("input");if(l.setAttribute("type","range"),void 0!==o.max&&l.setAttribute("max",o.max),void 0!==o.min&&l.setAttribute("min",o.min),void 0!==o.step&&l.setAttribute("step",o.step),l.style.padding="4px",l.style.width="100%",l.style.boxSizing="border-box",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var s in o.elementAttributes)"+"==s.charAt(0)?(s=s.slice(1),l.setAttribute(s,l.getAttribute(s)+o.elementAttributes["+"+s])):l.setAttribute(s,o.elementAttributes[s]);return l.value=r,t(function(){l.focus({preventScroll:!0}),l.style.height="100%"}),l.addEventListener("blur",function(e){a()}),l.addEventListener("keydown",function(e){switch(e.keyCode){case 13:a();break;case 27:n()}}),l},select:function(e,t,i,n,o){function a(t){var i,n={},o=A.table.getData();return i=t?A.table.columnManager.getColumnByField(t):e.getColumn()._getSelf(),i?o.forEach(function(e){var t=i.getFieldValue(e);null!==t&&void 0!==t&&""!==t&&(n[t]=!0)}):console.warn("unable to find matching column to create select lookup list:",t),Object.keys(n)}function r(t,i){function n(e){var e={label:e.label,value:e.value,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1};return i.indexOf(e.value)>-1&&u(e),a.push(e),r.push(e),e}var a=[],r=[];if("function"==typeof t&&(t=t(e)),Array.isArray(t))t.forEach(function(e){var t;"object"===(void 0===e?"undefined":_typeof(e))?e.options?(t={label:e.label,group:!0,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1},r.push(t),e.options.forEach(function(e){n(e)})):n(e):(t={label:e,value:e,element:!1},i.indexOf(t.value)>-1&&u(t),a.push(t),r.push(t))});else for(var s in t){var d={label:t[s],value:s,element:!1};i.indexOf(d.value)>-1&&u(d),a.push(d),r.push(d)}o.sortValuesList&&(a.sort(function(e,t){return e.label<t.label?-1:e.label>t.label?1:0}),r.sort(function(e,t){return e.label<t.label?-1:e.label>t.label?1:0}),"asc"!==o.sortValuesList&&(a.reverse(),r.reverse())),N=a,M=r,l()}function l(){for(;I.firstChild;)I.removeChild(I.firstChild);M.forEach(function(t){var i=t.element;if(!i){if(i=document.createElement("div"),t.label=o.listItemFormatter?o.listItemFormatter(t.value,t.label,e,i,t.itemParams):t.label,t.group?(i.classList.add("tabulator-edit-select-list-group"),i.tabIndex=0,i.innerHTML=""===t.label?" ":t.label):(i.classList.add("tabulator-edit-select-list-item"),i.tabIndex=0,i.innerHTML=""===t.label?" ":t.label,i.addEventListener("click",function(){j=!0,setTimeout(function(){j=!1},10),T?(c(t),P.focus()):m(t)}),V.indexOf(t)>-1&&i.classList.add("active")),t.elementAttributes&&"object"==_typeof(t.elementAttributes))for(var n in t.elementAttributes)"+"==n.charAt(0)?(n=n.slice(1),i.setAttribute(n,P.getAttribute(n)+t.elementAttributes["+"+n])):i.setAttribute(n,t.elementAttributes[n]);i.addEventListener("mousedown",function(){O=!1,setTimeout(function(){O=!0},10)}),t.element=i}I.appendChild(i)})}function s(e,t){!T&&S&&S.element&&S.element.classList.remove("active"),S&&S.element&&S.element.classList.remove("focused"),S=e,e.element&&(e.element.classList.add("focused"),t&&e.element.classList.add("active")),e&&e.element&&e.element.scrollIntoView&&e.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}function u(e){-1==V.indexOf(e)&&(V.push(e),s(e,!0)),p()}function d(e){var t=V[e];e>-1&&(V.splice(e,1),t.element&&t.element.classList.remove("active"))}function c(e){e||(e=S);var t=V.indexOf(e);t>-1?d(t):(!0!==T&&V.length>=T&&d(0),u(e)),p()}function m(e){g(),e||(e=S),e&&(P.value=e.label,i(e.value)),x=[e.value]}function f(e){e||g();var t=[];V.forEach(function(e){t.push(e.value)}),x=t,i(t)}function p(){var e=[];V.forEach(function(t){e.push(t.label)}),P.value=e.join(", "),!1===A.currentCell&&f(!0)}function b(){for(var e=V.length,t=0;t<e;t++)d(0)}function v(){g(),n()}function h(){if(V=[],!I.parentNode){!0===o.values?r(a(),x):"string"==typeof o.values?r(a(o.values),x):r(o.values||[],x);var e=Tabulator.prototype.helpers.elOffset(C);I.style.minWidth=C.offsetWidth+"px",I.style.top=e.top+C.offsetHeight+"px",I.style.left=e.left+"px",I.addEventListener("mousedown",function(e){O=!1,setTimeout(function(){O=!0},10)}),document.body.appendChild(I)}}function g(){I.parentNode&&I.parentNode.removeChild(I),y()}function y(){A.table.rowManager.element.removeEventListener("scroll",v)}function E(e){clearTimeout(H);var t=String.fromCharCode(event.keyCode).toLowerCase();F+=t.toLowerCase();var i=N.find(function(e){return void 0!==e.label&&e.label.toLowerCase().startsWith(F)});i&&s(i,!T),H=setTimeout(function(){F=""},800)}var k=this,A=this,C=e.getElement(),L=e.getValue(),w=o.verticalNavigation||"editor",x=void 0!==L||null===L?Array.isArray(L)?L:[L]:void 0!==o.defaultValue?o.defaultValue:[],P=document.createElement("input"),I=document.createElement("div"),T=o.multiselect,N=[],S={},M=[],V=[],O=!0,j=!1,F="",H=null;if((Array.isArray(o)||!Array.isArray(o)&&"object"===(void 0===o?"undefined":_typeof(o))&&!o.values)&&(console.warn("DEPRECATION WARNING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object"),o={values:o}),P.setAttribute("type","text"),P.style.padding="4px",P.style.width="100%",P.style.boxSizing="border-box",P.style.cursor="default",P.readOnly=0!=this.currentCell,o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var W in o.elementAttributes)"+"==W.charAt(0)?(W=W.slice(1),P.setAttribute(W,P.getAttribute(W)+o.elementAttributes["+"+W])):P.setAttribute(W,o.elementAttributes[W]);return P.value=void 0!==L||null===L?L:"",P.addEventListener("search",function(e){P.value||(b(),f())}),P.addEventListener("keydown",function(e){var t;switch(e.keyCode){case 38:t=N.indexOf(S),("editor"==w||"hybrid"==w&&t)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t>0&&s(N[t-1],!T));break;case 40:t=N.indexOf(S),("editor"==w||"hybrid"==w&&t<N.length-1)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t<N.length-1&&(-1==t?s(N[0],!T):s(N[t+1],!T)));break;case 37:case 39:e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault();break;case 13:T?c():m();break;case 27:v();break;case 9:break;default:!1===A.currentCell&&e.preventDefault(),e.keyCode>=38&&e.keyCode<=90&&E(e.keyCode)}}),P.addEventListener("blur",function(e){O&&(T?f():v())}),P.addEventListener("focus",function(e){j||h()}),I=document.createElement("div"),I.classList.add("tabulator-edit-select-list"),t(function(){P.style.height="100%",P.focus({preventScroll:!0})}),setTimeout(function(){k.table.rowManager.element.addEventListener("scroll",v)},10),P},autocomplete:function(e,t,i,n,o){function a(){!0===o.values?N=r():"string"==typeof o.values&&(N=r(o.values))}function r(t){var i,n={},a=E.table.getData();return i=t?E.table.columnManager.getColumnByField(t):e.getColumn()._getSelf(),i?(a.forEach(function(e){var t=i.getFieldValue(e);null!==t&&void 0!==t&&""!==t&&(n[t]=!0)}),n=o.sortValuesList?"asc"==o.sortValuesList?Object.keys(n).sort():Object.keys(n).sort().reverse():Object.keys(n)):console.warn("unable to find matching column to create autocomplete lookup list:",t),n}function l(e,t){var i,n,a=[];i=N||(o.values||[]),o.searchFunc?(a=o.searchFunc(e,i),a instanceof Promise?(s(void 0!==o.searchingPlaceholder?o.searchingPlaceholder:"Searching..."),a.then(function(e){c(u(e),t)}).catch(function(e){console.err("error in autocomplete search promise:",e)})):c(u(a),t)):(n=u(i),""===e?o.showListOnEmpty&&(a=n):n.forEach(function(t){null===t.value&&void 0===t.value||(String(t.value).toLowerCase().indexOf(String(e).toLowerCase())>-1||String(t.title).toLowerCase().indexOf(String(e).toLowerCase())>-1)&&a.push(t)}),c(a,t))}function s(e){var t=document.createElement("div");d(),!1!==e&&(t.classList.add("tabulator-edit-select-list-notice"),t.tabIndex=0,e instanceof Node?t.appendChild(e):t.innerHTML=e,x.appendChild(t))}function u(e){var t=[];if(Array.isArray(e))e.forEach(function(e){var i={};"object"===(void 0===e?"undefined":_typeof(e))?(i.title=o.listItemFormatter?o.listItemFormatter(e.value,e.label):e.label,i.value=e.value):(i.title=o.listItemFormatter?o.listItemFormatter(e,e):e,i.value=e),t.push(i)});else for(var i in e){var n={title:o.listItemFormatter?o.listItemFormatter(i,e[i]):e[i],value:i};t.push(n)}return t}function d(){for(;x.firstChild;)x.removeChild(x.firstChild)}function c(e,t){e.length?m(e,t):o.emptyPlaceholder&&s(o.emptyPlaceholder)}function m(e,t){var i=!1;d(),P=e,P.forEach(function(e){var n=e.element;n||(n=document.createElement("div"),n.classList.add("tabulator-edit-select-list-item"),n.tabIndex=0,n.innerHTML=e.title,n.addEventListener("click",function(t){b(e),f()}),n.addEventListener("mousedown",function(e){T=!1,setTimeout(function(){T=!0},10)}),e.element=n,t&&e.value==A&&(w.value=e.title,e.element.classList.add("active"),i=!0),e===I&&(e.element.classList.add("active"),i=!0)),x.appendChild(n)}),i||b(!1)}function f(){v(),I?A!==I.value?(A=I.value,w.value=I.title,i(I.value)):n():o.freetext?(A=w.value,i(w.value)):o.allowEmpty&&""===w.value?(A=w.value,i(w.value)):n()}function p(){if(!x.parentNode){for(console.log("show",L);x.firstChild;)x.removeChild(x.firstChild);var e=Tabulator.prototype.helpers.elOffset(k);x.style.minWidth=k.offsetWidth+"px",x.style.top=e.top+k.offsetHeight+"px",x.style.left=e.left+"px",document.body.appendChild(x)}}function b(e,t){I&&I.element&&I.element.classList.remove("active"),I=e,e&&e.element&&e.element.classList.add("active"),e&&e.element&&e.element.scrollIntoView&&e.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}function v(){x.parentNode&&x.parentNode.removeChild(x),g()}function h(){v(),n()}function g(){E.table.rowManager.element.removeEventListener("scroll",h)}var y=this,E=this,k=e.getElement(),A=e.getValue(),C=o.verticalNavigation||"editor",L=void 0!==A||null===A?A:void 0!==o.defaultValue?o.defaultValue:"",w=document.createElement("input"),x=document.createElement("div"),P=[],I=!1,T=!0,N=!1;if(w.setAttribute("type","search"),w.style.padding="4px",w.style.width="100%",w.style.boxSizing="border-box",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var S in o.elementAttributes)"+"==S.charAt(0)?(S=S.slice(1),w.setAttribute(S,w.getAttribute(S)+o.elementAttributes["+"+S])):w.setAttribute(S,o.elementAttributes[S]);return x.classList.add("tabulator-edit-select-list"),x.addEventListener("mousedown",function(e){T=!1,setTimeout(function(){T=!0},10)}),w.addEventListener("keydown",function(e){var t;switch(e.keyCode){case 38:t=P.indexOf(I),("editor"==C||"hybrid"==C&&t)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),b(t>0?P[t-1]:!1));break;case 40:t=P.indexOf(I),("editor"==C||"hybrid"==C&&t<P.length-1)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t<P.length-1&&b(-1==t?P[0]:P[t+1]));break;case 37:case 39:e.stopImmediatePropagation(),e.stopPropagation();break;case 13:f();break;case 27:h();break;case 36:case 35:e.stopImmediatePropagation()}}),w.addEventListener("keyup",function(e){switch(e.keyCode){case 38:case 37:case 39:case 40:case 13:case 27:break;default:l(w.value)}}),w.addEventListener("search",function(e){l(w.value)}),w.addEventListener("blur",function(e){T&&f()}),w.addEventListener("focus",function(e){var t=L;a(),p(),w.value=t,l(t,!0)}),t(function(){w.style.height="100%",w.focus({preventScroll:!0})}),o.mask&&this.table.modules.edit.maskInput(w,o),setTimeout(function(){y.table.rowManager.element.addEventListener("scroll",h)},10),a(),w.value=L,l(L,!0),w},star:function(e,t,i,n,o){function a(e){m.forEach(function(t,i){i<e?("ie"==l.table.browser?t.setAttribute("class","tabulator-star-active"):t.classList.replace("tabulator-star-inactive","tabulator-star-active"),t.innerHTML='<polygon fill="#488CE9" stroke="#014AAE" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>'):("ie"==l.table.browser?t.setAttribute("class","tabulator-star-inactive"):t.classList.replace("tabulator-star-active","tabulator-star-inactive"),t.innerHTML='<polygon fill="#010155" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>')})}function r(e){u=e,a(e)}var l=this,s=e.getElement(),u=e.getValue(),d=s.getElementsByTagName("svg").length||5,c=s.getElementsByTagName("svg")[0]?s.getElementsByTagName("svg")[0].getAttribute("width"):14,m=[],f=document.createElement("div"),p=document.createElementNS("http://www.w3.org/2000/svg","svg");if(s.style.whiteSpace="nowrap",s.style.overflow="hidden",s.style.textOverflow="ellipsis",f.style.verticalAlign="middle",f.style.display="inline-block",f.style.padding="4px",p.setAttribute("width",c),p.setAttribute("height",c),p.setAttribute("viewBox","0 0 512 512"),p.setAttribute("xml:space","preserve"),p.style.padding="0 1px",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var b in o.elementAttributes)"+"==b.charAt(0)?(b=b.slice(1),f.setAttribute(b,f.getAttribute(b)+o.elementAttributes["+"+b])):f.setAttribute(b,o.elementAttributes[b]);for(var v=1;v<=d;v++)!function(e){var t=document.createElement("span"),n=p.cloneNode(!0);m.push(n),t.addEventListener("mouseenter",function(t){t.stopPropagation(),t.stopImmediatePropagation(),a(e)}),t.addEventListener("mousemove",function(e){e.stopPropagation(),e.stopImmediatePropagation()}),t.addEventListener("click",function(t){t.stopPropagation(),t.stopImmediatePropagation(),i(e),s.blur()}),t.appendChild(n),f.appendChild(t)}(v);return u=Math.min(parseInt(u),d),a(u),f.addEventListener("mousemove",function(e){a(0)}),f.addEventListener("click",function(e){i(0)}),s.addEventListener("blur",function(e){n()}),s.addEventListener("keydown",function(e){switch(e.keyCode){case 39:r(u+1);break;case 37:r(u-1);break;case 13:i(u);break;case 27:n()}}),f},progress:function(e,t,i,n,o){function a(){var e=window.getComputedStyle(s,null),t=c*Math.round(p.offsetWidth/((s.clientWidth-parseInt(e.getPropertyValue("padding-left"))-parseInt(e.getPropertyValue("padding-right")))/100))+d;i(t),s.setAttribute("aria-valuenow",t),s.setAttribute("aria-label",m)}var r,l,s=e.getElement(),u=void 0===o.max?s.getElementsByTagName("div")[0].getAttribute("max")||100:o.max,d=void 0===o.min?s.getElementsByTagName("div")[0].getAttribute("min")||0:o.min,c=(u-d)/100,m=e.getValue()||0,f=document.createElement("div"),p=document.createElement("div");if(f.style.position="absolute",f.style.right="0",f.style.top="0",f.style.bottom="0",f.style.width="5px",f.classList.add("tabulator-progress-handle"),p.style.display="inline-block",p.style.position="relative",p.style.height="100%",p.style.backgroundColor="#488CE9",p.style.maxWidth="100%",p.style.minWidth="0%",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var b in o.elementAttributes)"+"==b.charAt(0)?(b=b.slice(1),p.setAttribute(b,p.getAttribute(b)+o.elementAttributes["+"+b])):p.setAttribute(b,o.elementAttributes[b]);return s.style.padding="4px 4px",m=Math.min(parseFloat(m),u),m=Math.max(parseFloat(m),d),m=Math.round((m-d)/c),p.style.width=m+"%",s.setAttribute("aria-valuemin",d),s.setAttribute("aria-valuemax",u),p.appendChild(f),f.addEventListener("mousedown",function(e){r=e.screenX,l=p.offsetWidth}),f.addEventListener("mouseover",function(){f.style.cursor="ew-resize"}),s.addEventListener("mousemove",function(e){r&&(p.style.width=l+e.screenX-r+"px")}),s.addEventListener("mouseup",function(e){r&&(e.stopPropagation(),e.stopImmediatePropagation(),r=!1,l=!1,a())}),s.addEventListener("keydown",function(e){switch(e.keyCode){case 39:e.preventDefault(),p.style.width=p.clientWidth+s.clientWidth/100+"px";break;case 37:e.preventDefault(),p.style.width=p.clientWidth-s.clientWidth/100+"px";break;case 9:case 13:a();break;case 27:n()}}),s.addEventListener("blur",function(){n()}),p},tickCross:function(e,t,i,n,o){function a(e){return s?e?d?u:l.checked:l.checked&&!d?(l.checked=!1,l.indeterminate=!0,d=!0,u):(d=!1,l.checked):l.checked}var r=e.getValue(),l=document.createElement("input"),s=o.tristate,u=void 0===o.indeterminateValue?null:o.indeterminateValue,d=!1;if(l.setAttribute("type","checkbox"),l.style.marginTop="5px",l.style.boxSizing="border-box",o.elementAttributes&&"object"==_typeof(o.elementAttributes))for(var c in o.elementAttributes)"+"==c.charAt(0)?(c=c.slice(1),l.setAttribute(c,l.getAttribute(c)+o.elementAttributes["+"+c])):l.setAttribute(c,o.elementAttributes[c]);return l.value=r,!s||void 0!==r&&r!==u&&""!==r||(d=!0,l.indeterminate=!0),"firefox"!=this.table.browser&&t(function(){l.focus({preventScroll:!0})}),l.checked=!0===r||"true"===r||"True"===r||1===r,t(function(){l.focus()}),l.addEventListener("change",function(e){i(a())}),l.addEventListener("blur",function(e){i(a(!0))}),l.addEventListener("keydown",function(e){13==e.keyCode&&i(a()),27==e.keyCode&&n()}),l}},Tabulator.prototype.registerModule("edit",Edit);
\ No newline at end of file
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var ExportRow = function ExportRow(type, columns, component, indent) {
this.type = type;
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ExportRow=function(t,e,o,n){this.type=t,this.columns=e,this.component=o||!1,this.indent=n||0},ExportColumn=function(t,e,o,n,r){this.value=t,this.component=e||!1,this.width=o,this.height=n,this.depth=r},Export=function(t){this.table=t,this.config={},this.cloneTableStyle=!0,this.colVisProp=""};Export.prototype.generateExportList=function(t,e,o,n){this.cloneTableStyle=e,this.config=t||{},this.colVisProp=n;var r=!1!==this.config.columnHeaders?this.headersToExportRows(this.generateColumnGroupHeaders()):[],a=this.bodyToExportRows(this.rowLookup(o));return r.concat(a)},Export.prototype.genereateTable=function(t,e,o,n){var r=this.generateExportList(t,e,o,n);return this.genereateTableElement(r)},Export.prototype.rowLookup=function(t){var e=this,o=[];if("function"==typeof t)t.call(this.table).forEach(function(t){(t=e.table.rowManager.findRow(t))&&o.push(t)});else switch(t){case!0:case"visible":o=this.table.rowManager.getVisibleRows(!0);break;case"all":o=this.table.rowManager.rows;break;case"selected":o=this.table.modules.selectRow.selectedRows;break;case"active":default:o=this.table.options.pagination?this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length-2):this.table.rowManager.getDisplayRows()}return Object.assign([],o)},Export.prototype.generateColumnGroupHeaders=function(){var t=this,e=[];return(!1!==this.config.columnGroups?this.table.columnManager.columns:this.table.columnManager.columnsByIndex).forEach(function(o){var n=t.processColumnGroup(o);n&&e.push(n)}),e},Export.prototype.processColumnGroup=function(t){var e=this,o=t.columns,n=0,r=t.definition["title"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))]||t.definition.title,a={title:r,column:t,depth:1};if(o.length){if(a.subGroups=[],a.width=0,o.forEach(function(t){var o=e.processColumnGroup(t);o&&(a.width+=o.width,a.subGroups.push(o),o.depth>n&&(n=o.depth))}),a.depth+=n,!a.width)return!1}else{if(!this.columnVisCheck(t))return!1;a.width=1}return a},Export.prototype.columnVisCheck=function(t){return!1!==t.definition[this.colVisProp]&&(t.visible||!t.visible&&t.definition[this.colVisProp])},Export.prototype.headersToExportRows=function(t){function e(t,r){var a=n-r;if(void 0===o[r]&&(o[r]=[]),t.height=t.subGroups?1:a-t.depth+1,o[r].push(t),t.height>1)for(var l=1;l<t.height;l++)void 0===o[r+l]&&(o[r+l]=[]),o[r+l].push(!1);if(t.width>1)for(var i=1;i<t.width;i++)o[r].push(!1);t.subGroups&&t.subGroups.forEach(function(t){e(t,r+1)})}var o=[],n=0,r=[];return t.forEach(function(t){t.depth>n&&(n=t.depth)}),t.forEach(function(t){e(t,0)}),o.forEach(function(t){var e=[];t.forEach(function(t){t?e.push(new ExportColumn(t.title,t.column.getComponent(),t.width,t.height,t.depth)):e.push(null)}),r.push(new ExportRow("header",e))}),r},Export.prototype.bodyToExportRows=function(t){var e=this,o=[],n=[];return this.table.columnManager.columnsByIndex.forEach(function(t){e.columnVisCheck(t)&&o.push(t.getComponent())}),!1!==this.config.columnCalcs&&this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&t.unshift(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&t.push(this.table.modules.columnCalcs.botRow)),t=t.filter(function(t){switch(t.type){case"group":return!1!==e.config.rowGroups;case"calc":return!1!==e.config.columnCalcs;case"row":return!(e.table.options.dataTree&&!1===e.config.dataTree&&t.modules.dataTree.parent)}return!0}),t.forEach(function(t,r){var a=t.getData(e.colVisProp),l=[],i=0;switch(t.type){case"group":i=t.level,l.push(new ExportColumn(t.key,t.getComponent(),o.length,1));break;case"calc":case"row":o.forEach(function(t){l.push(new ExportColumn(t._column.getFieldValue(a),t,1,1))}),e.table.options.dataTree&&!1!==e.config.dataTree&&(i=t.modules.dataTree.index)}n.push(new ExportRow(t.type,l,t.getComponent(),i))}),n},Export.prototype.genereateTableElement=function(t){var e=this,o=document.createElement("table"),n=document.createElement("thead"),r=document.createElement("tbody"),a=this.lookupTableStyles(),l=this.table.options["rowFormatter"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],i={};return i.rowFormatter=null!==l?l:this.table.options.rowFormatter,this.table.options.dataTree&&!1!==this.config.dataTree&&this.table.modExists("columnCalcs")&&(i.treeElementField=this.table.modules.dataTree.elementField),i.groupHeader=this.table.options["groupHeader"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],i.groupHeader&&!Array.isArray(i.groupHeader)&&(i.groupHeader=[i.groupHeader]),o.classList.add("tabulator-print-table"),this.mapElementStyles(this.table.columnManager.getHeadersElement(),n,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),t.length>1e3&&console.warn("It may take a long time to render an HTML table with more than 1000 rows"),t.forEach(function(t,o){switch(t.type){case"header":n.appendChild(e.genereateHeaderElement(t,i,a));break;case"group":r.appendChild(e.genereateGroupElement(t,i,a));break;case"calc":r.appendChild(e.genereateCalcElement(t,i,a));break;case"row":var l=e.genereateRowElement(t,i,a);e.mapElementStyles(o%2&&a.evenRow?a.evenRow:a.oddRow,l,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),r.appendChild(l)}}),n.innerHTML&&o.appendChild(n),o.appendChild(r),this.mapElementStyles(this.table.element,o,["border-top","border-left","border-right","border-bottom"]),o},Export.prototype.lookupTableStyles=function(){var t={};return this.cloneTableStyle&&window.getComputedStyle&&(t.oddRow=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),t.evenRow=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),t.calcRow=this.table.element.querySelector(".tabulator-row.tabulator-calcs"),t.firstRow=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),t.firstGroup=this.table.element.getElementsByClassName("tabulator-group")[0],t.firstRow&&(t.styleCells=t.firstRow.getElementsByClassName("tabulator-cell"),t.firstCell=t.styleCells[0],t.lastCell=t.styleCells[t.styleCells.length-1])),t},Export.prototype.genereateHeaderElement=function(t,e,o){var n=this,r=document.createElement("tr");return t.columns.forEach(function(t){if(t){var e=document.createElement("th"),o=t.component._column.definition.cssClass?t.component._column.definition.cssClass.split(" "):[];e.colSpan=t.width,e.rowSpan=t.height,e.innerHTML=t.value,n.cloneTableStyle&&(e.style.boxSizing="border-box"),o.forEach(function(t){e.classList.add(t)}),n.mapElementStyles(t.component.getElement(),e,["text-align","border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),n.mapElementStyles(t.component._column.contentElement,e,["padding-top","padding-left","padding-right","padding-bottom"]),t.component._column.visible?n.mapElementStyles(t.component.getElement(),e,["width"]):t.component._column.definition.width&&(e.style.width=t.component._column.definition.width+"px"),t.component._column.parent&&n.mapElementStyles(t.component._column.parent.groupElement,e,["border-top"]),r.appendChild(e)}}),r},Export.prototype.genereateGroupElement=function(t,e,o){var n=document.createElement("tr"),r=document.createElement("td"),a=t.columns[0];return n.classList.add("tabulator-print-table-row"),e.groupHeader&&e.groupHeader[t.indent]?a.value=e.groupHeader[t.indent](a.value,t.component._group.getRowCount(),t.component._group.getData(),t.component):!1===e.groupHeader?a.value=a.value:a.value=t.component._group.generator(a.value,t.component._group.getRowCount(),t.component._group.getData(),t.component),r.colSpan=a.width,r.innerHTML=a.value,n.classList.add("tabulator-print-table-group"),n.classList.add("tabulator-group-level-"+t.indent),a.component.isVisible()&&n.classList.add("tabulator-group-visible"),this.mapElementStyles(o.firstGroup,n,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),this.mapElementStyles(o.firstGroup,r,["padding-top","padding-left","padding-right","padding-bottom"]),n.appendChild(r),n},Export.prototype.genereateCalcElement=function(t,e,o){var n=this.genereateRowElement(t,e,o);return n.classList.add("tabulator-print-table-calcs"),this.mapElementStyles(o.calcRow,n,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),n},Export.prototype.genereateRowElement=function(t,e,o){var n=this,r=document.createElement("tr");return r.classList.add("tabulator-print-table-row"),t.columns.forEach(function(a){if(a){var l=document.createElement("td"),s=a.component._column,p=a.value,c={modules:{},getValue:function(){return p},getField:function(){return s.definition.field},getElement:function(){return l},getColumn:function(){return s.getComponent()},getData:function(){return t.component.getData()},getRow:function(){return t.component},getComponent:function(){return c},column:s};if((s.definition.cssClass?s.definition.cssClass.split(" "):[]).forEach(function(t){l.classList.add(t)}),n.table.modExists("format")&&!1!==n.config.formatCells)p=n.table.modules.format.formatExportValue(c,n.colVisProp);else switch(void 0===p?"undefined":_typeof(p)){case"object":p=JSON.stringify(p);break;case"undefined":case"null":p="";break;default:p=p}p instanceof Node?l.appendChild(p):l.innerHTML=p,o.firstCell&&(n.mapElementStyles(o.firstCell,l,["padding-top","padding-left","padding-right","padding-bottom","border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size"]),s.definition.align&&(l.style.textAlign=s.definition.align)),n.table.options.dataTree&&!1!==n.config.dataTree&&(e.treeElementField&&e.treeElementField==s.field||!e.treeElementField&&0==i)&&(t.component._row.modules.dataTree.controlEl&&l.insertBefore(t.component._row.modules.dataTree.controlEl.cloneNode(!0),l.firstChild),t.component._row.modules.dataTree.branchEl&&l.insertBefore(t.component._row.modules.dataTree.branchEl.cloneNode(!0),l.firstChild)),r.appendChild(l),c.modules.format&&c.modules.format.renderedCallback&&c.modules.format.renderedCallback(),e.rowFormatter&&!1!==n.config.formatCells&&e.rowFormatter(t.component)}}),r},Export.prototype.genereateHTMLTable=function(t){var e=document.createElement("div");return e.appendChild(this.genereateTableElement(t)),e.innerHTML},Export.prototype.getHtml=function(t,e,o,n){var r=this.generateExportList(o||this.table.options.htmlOutputConfig,e,t,n||"htmlOutput");return this.genereateHTMLTable(r)},Export.prototype.mapElementStyles=function(t,e,o){if(this.cloneTableStyle&&t&&e){var n={"background-color":"backgroundColor",color:"fontColor",width:"width","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","text-align":"textAlign","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom","padding-top":"paddingTop","padding-left":"paddingLeft","padding-right":"paddingRight","padding-bottom":"paddingBottom"};if(window.getComputedStyle){var r=window.getComputedStyle(t);o.forEach(function(t){e.style[n[t]]=r.getPropertyValue(t)})}}},Tabulator.prototype.registerModule("export",Export);
\ No newline at end of file
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var Filter = function Filter(table) {
//set empty value function
column.modules.filter.emptyFunc = column.definition.headerFilterEmptyCheck || function (value) {
- return !value && value !== "0";
+ return !value && value !== "0" && value !== 0;
};
filterElement = document.createElement("div");
self.prevHeaderFilterChangeCheck = "{}";
this.headerFilterColumns.forEach(function (column) {
- column.modules.filter.value = null;
+ if (typeof column.modules.filter.value !== "undefined") {
+ delete column.modules.filter.value;
+ }
column.modules.filter.prevSuccess = undefined;
self.reloadHeaderFilter(column);
});
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
-var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Filter=function(e){this.table=e,this.filterList=[],this.headerFilters={},this.headerFilterColumns=[],this.prevHeaderFilterChangeCheck="",this.prevHeaderFilterChangeCheck="{}",this.changed=!1};Filter.prototype.initializeColumn=function(e,t){function r(t){var r,o="input"==e.modules.filter.tagType&&"text"==e.modules.filter.attrType||"textarea"==e.modules.filter.tagType?"partial":"match",a="",s="";if(void 0===e.modules.filter.prevSuccess||e.modules.filter.prevSuccess!==t){if(e.modules.filter.prevSuccess=t,e.modules.filter.emptyFunc(t))delete n.headerFilters[l];else{switch(e.modules.filter.value=t,_typeof(e.definition.headerFilterFunc)){case"string":n.filters[e.definition.headerFilterFunc]?(a=e.definition.headerFilterFunc,r=function(r){var i=e.definition.headerFilterFuncParams||{},l=e.getFieldValue(r);return i="function"==typeof i?i(t,l,r):i,n.filters[e.definition.headerFilterFunc](t,l,r,i)}):console.warn("Header Filter Error - Matching filter function not found: ",e.definition.headerFilterFunc);break;case"function":r=function(r){var i=e.definition.headerFilterFuncParams||{},n=e.getFieldValue(r);return i="function"==typeof i?i(t,n,r):i,e.definition.headerFilterFunc(t,n,r,i)},a=r}if(!r)switch(o){case"partial":r=function(r){var i=e.getFieldValue(r);return void 0!==i&&null!==i&&String(i).toLowerCase().indexOf(String(t).toLowerCase())>-1},a="like";break;default:r=function(r){return e.getFieldValue(r)==t},a="="}n.headerFilters[l]={value:t,func:r,type:a,params:i||{}}}s=JSON.stringify(n.headerFilters),n.prevHeaderFilterChangeCheck!==s&&(n.prevHeaderFilterChangeCheck=s,n.changed=!0,n.table.rowManager.filterRefresh())}return!0}var i,n=this,l=e.getField();e.modules.filter={success:r,attrType:!1,tagType:!1,emptyFunc:!1},this.generateHeaderFilterElement(e)},Filter.prototype.generateHeaderFilterElement=function(e,t,r){function i(){}var n,l,o,a,s,d,u,f=this,c=this,h=e.modules.filter.success,p=e.getField();if(e.modules.filter.headerElement&&e.modules.filter.headerElement.parentNode&&e.contentElement.removeChild(e.modules.filter.headerElement.parentNode),p){switch(e.modules.filter.emptyFunc=e.definition.headerFilterEmptyCheck||function(e){return!e&&"0"!==e},n=document.createElement("div"),n.classList.add("tabulator-header-filter"),_typeof(e.definition.headerFilter)){case"string":c.table.modules.edit.editors[e.definition.headerFilter]?(l=c.table.modules.edit.editors[e.definition.headerFilter],"tick"!==e.definition.headerFilter&&"tickCross"!==e.definition.headerFilter||e.definition.headerFilterEmptyCheck||(e.modules.filter.emptyFunc=function(e){return!0!==e&&!1!==e})):console.warn("Filter Error - Cannot build header filter, No such editor found: ",e.definition.editor);break;case"function":l=e.definition.headerFilter;break;case"boolean":e.modules.edit&&e.modules.edit.editor?l=e.modules.edit.editor:e.definition.formatter&&c.table.modules.edit.editors[e.definition.formatter]?(l=c.table.modules.edit.editors[e.definition.formatter],"tick"!==e.definition.formatter&&"tickCross"!==e.definition.formatter||e.definition.headerFilterEmptyCheck||(e.modules.filter.emptyFunc=function(e){return!0!==e&&!1!==e})):l=c.table.modules.edit.editors.input}if(l){if(a={getValue:function(){return void 0!==t?t:""},getField:function(){return e.definition.field},getElement:function(){return n},getColumn:function(){return e.getComponent()},getRow:function(){return{normalizeHeight:function(){}}}},u=e.definition.headerFilterParams||{},u="function"==typeof u?u.call(c.table):u,!(o=l.call(this.table.modules.edit,a,function(){},h,i,u)))return void console.warn("Filter Error - Cannot add filter to "+p+" column, editor returned a value of false");if(!(o instanceof Node))return void console.warn("Filter Error - Cannot add filter to "+p+" column, editor should return an instance of Node, the editor returned:",o);p?c.table.modules.localize.bind("headerFilters|columns|"+e.definition.field,function(e){o.setAttribute("placeholder",void 0!==e&&e?e:c.table.modules.localize.getText("headerFilters|default"))}):c.table.modules.localize.bind("headerFilters|default",function(e){o.setAttribute("placeholder",void 0!==c.column.definition.headerFilterPlaceholder&&c.column.definition.headerFilterPlaceholder?c.column.definition.headerFilterPlaceholder:e)}),o.addEventListener("click",function(e){e.stopPropagation(),o.focus()}),o.addEventListener("focus",function(e){var t=f.table.columnManager.element.scrollLeft;t!==f.table.rowManager.element.scrollLeft&&(f.table.rowManager.scrollHorizontal(t),f.table.columnManager.scrollHorizontal(t))}),s=!1,d=function(e){s&&clearTimeout(s),s=setTimeout(function(){h(o.value)},c.table.options.headerFilterLiveFilterDelay)},e.modules.filter.headerElement=o,e.modules.filter.attrType=o.hasAttribute("type")?o.getAttribute("type").toLowerCase():"",e.modules.filter.tagType=o.tagName.toLowerCase(),!1!==e.definition.headerFilterLiveFilter&&("autocomplete"!==e.definition.headerFilter&&"tickCross"!==e.definition.headerFilter&&("autocomplete"!==e.definition.editor&&"tickCross"!==e.definition.editor||!0!==e.definition.headerFilter)&&(o.addEventListener("keyup",d),o.addEventListener("search",d),"number"==e.modules.filter.attrType&&o.addEventListener("change",function(e){h(o.value)}),"text"==e.modules.filter.attrType&&"ie"!==this.table.browser&&o.setAttribute("type","search")),"input"!=e.modules.filter.tagType&&"select"!=e.modules.filter.tagType&&"textarea"!=e.modules.filter.tagType||o.addEventListener("mousedown",function(e){e.stopPropagation()})),n.appendChild(o),e.contentElement.appendChild(n),r||c.headerFilterColumns.push(e)}}else console.warn("Filter Error - Cannot add header filter, column has no field set:",e.definition.title)},Filter.prototype.hideHeaderFilterElements=function(){this.headerFilterColumns.forEach(function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="none")})},Filter.prototype.showHeaderFilterElements=function(){this.headerFilterColumns.forEach(function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="")})},Filter.prototype.setHeaderFilterFocus=function(e){e.modules.filter&&e.modules.filter.headerElement?e.modules.filter.headerElement.focus():console.warn("Column Filter Focus Error - No header filter set on column:",e.getField())},Filter.prototype.getHeaderFilterValue=function(e){if(e.modules.filter&&e.modules.filter.headerElement)return e.modules.filter.headerElement.value;console.warn("Column Filter Error - No header filter set on column:",e.getField())},Filter.prototype.setHeaderFilterValue=function(e,t){e&&(e.modules.filter&&e.modules.filter.headerElement?(this.generateHeaderFilterElement(e,t,!0),e.modules.filter.success(t)):console.warn("Column Filter Error - No header filter set on column:",e.getField()))},Filter.prototype.reloadHeaderFilter=function(e){e&&(e.modules.filter&&e.modules.filter.headerElement?this.generateHeaderFilterElement(e,e.modules.filter.value,!0):console.warn("Column Filter Error - No header filter set on column:",e.getField()))},Filter.prototype.hasChanged=function(){var e=this.changed;return this.changed=!1,e},Filter.prototype.setFilter=function(e,t,r,i){var n=this;n.filterList=[],Array.isArray(e)||(e=[{field:e,type:t,value:r,params:i}]),n.addFilter(e)},Filter.prototype.addFilter=function(e,t,r,i){var n=this;Array.isArray(e)||(e=[{field:e,type:t,value:r,params:i}]),e.forEach(function(e){(e=n.findFilter(e))&&(n.filterList.push(e),n.changed=!0)}),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},Filter.prototype.findFilter=function(e){var t,r=this;if(Array.isArray(e))return this.findSubFilters(e);var i=!1;return"function"==typeof e.field?i=function(t){return e.field(t,e.type||{})}:r.filters[e.type]?(t=r.table.columnManager.getColumnByField(e.field),i=t?function(i){return r.filters[e.type](e.value,t.getFieldValue(i),i,e.params||{})}:function(t){return r.filters[e.type](e.value,t[e.field],t,e.params||{})}):console.warn("Filter Error - No such filter type found, ignoring: ",e.type),e.func=i,!!e.func&&e},Filter.prototype.findSubFilters=function(e){var t=this,r=[];return e.forEach(function(e){(e=t.findFilter(e))&&r.push(e)}),!!r.length&&r},Filter.prototype.getFilters=function(e,t){var r=[];return e&&(r=this.getHeaderFilters()),t&&r.forEach(function(e){"function"==typeof e.type&&(e.type="function")}),r=r.concat(this.filtersToArray(this.filterList,t))},Filter.prototype.filtersToArray=function(e,t){var r=this,i=[];return e.forEach(function(e){var n;Array.isArray(e)?i.push(r.filtersToArray(e,t)):(n={field:e.field,type:e.type,value:e.value},t&&"function"==typeof n.type&&(n.type="function"),i.push(n))}),i},Filter.prototype.getHeaderFilters=function(){var e=[];for(var t in this.headerFilters)e.push({field:t,type:this.headerFilters[t].type,value:this.headerFilters[t].value});return e},Filter.prototype.removeFilter=function(e,t,r){var i=this;Array.isArray(e)||(e=[{field:e,type:t,value:r}]),e.forEach(function(e){var t=-1;t="object"==_typeof(e.field)?i.filterList.findIndex(function(t){return e===t}):i.filterList.findIndex(function(t){return e.field===t.field&&e.type===t.type&&e.value===t.value}),t>-1?(i.filterList.splice(t,1),i.changed=!0):console.warn("Filter Error - No matching filter type found, ignoring: ",e.type)}),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},Filter.prototype.clearFilter=function(e){this.filterList=[],e&&this.clearHeaderFilter(),this.changed=!0,this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},Filter.prototype.clearHeaderFilter=function(){var e=this;this.headerFilters={},e.prevHeaderFilterChangeCheck="{}",this.headerFilterColumns.forEach(function(t){t.modules.filter.value=null,t.modules.filter.prevSuccess=void 0,e.reloadHeaderFilter(t)}),this.changed=!0},Filter.prototype.search=function(e,t,r,i){var n=this,l=[],o=[];return Array.isArray(t)||(t=[{field:t,type:r,value:i}]),t.forEach(function(e){(e=n.findFilter(e))&&o.push(e)}),this.table.rowManager.rows.forEach(function(t){var r=!0;o.forEach(function(e){n.filterRecurse(e,t.getData())||(r=!1)}),r&&l.push("data"===e?t.getData("data"):t.getComponent())}),l},Filter.prototype.filter=function(e,t){var r=this,i=[],n=[];return r.table.options.dataFiltering&&r.table.options.dataFiltering.call(r.table,r.getFilters()),r.table.options.ajaxFiltering||!r.filterList.length&&!Object.keys(r.headerFilters).length?i=e.slice(0):e.forEach(function(e){r.filterRow(e)&&i.push(e)}),r.table.options.dataFiltered&&(i.forEach(function(e){n.push(e.getComponent())}),r.table.options.dataFiltered.call(r.table,r.getFilters(),n)),i},Filter.prototype.filterRow=function(e,t){var r=this,i=!0,n=e.getData();r.filterList.forEach(function(e){r.filterRecurse(e,n)||(i=!1)});for(var l in r.headerFilters)r.headerFilters[l].func(n)||(i=!1);return i},Filter.prototype.filterRecurse=function(e,t){var r=this,i=!1;return Array.isArray(e)?e.forEach(function(e){r.filterRecurse(e,t)&&(i=!0)}):i=e.func(t),i},Filter.prototype.filters={"=":function(e,t,r,i){return t==e},"<":function(e,t,r,i){return t<e},"<=":function(e,t,r,i){return t<=e},">":function(e,t,r,i){return t>e},">=":function(e,t,r,i){return t>=e},"!=":function(e,t,r,i){return t!=e},regex:function(e,t,r,i){return"string"==typeof e&&(e=new RegExp(e)),e.test(t)},like:function(e,t,r,i){return null===e||void 0===e?t===e:void 0!==t&&null!==t&&String(t).toLowerCase().indexOf(e.toLowerCase())>-1},keywords:function(e,t,r,i){var n=e.toLowerCase().split(void 0===i.separator?" ":i.separator),l=String(null===t||void 0===t?"":t).toLowerCase(),o=[];return n.forEach(function(e){l.includes(e)&&o.push(!0)}),i.matchAll?o.length===n.length:!!o.length},starts:function(e,t,r,i){return null===e||void 0===e?t===e:void 0!==t&&null!==t&&String(t).toLowerCase().startsWith(e.toLowerCase())},ends:function(e,t,r,i){return null===e||void 0===e?t===e:void 0!==t&&null!==t&&String(t).toLowerCase().endsWith(e.toLowerCase())},in:function(e,t,r,i){return Array.isArray(e)?!e.length||e.indexOf(t)>-1:(console.warn("Filter Error - filter value is not an array:",e),!1)}},Tabulator.prototype.registerModule("filter",Filter);
\ No newline at end of file
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
+var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Filter=function(e){this.table=e,this.filterList=[],this.headerFilters={},this.headerFilterColumns=[],this.prevHeaderFilterChangeCheck="",this.prevHeaderFilterChangeCheck="{}",this.changed=!1};Filter.prototype.initializeColumn=function(e,t){function r(t){var r,o="input"==e.modules.filter.tagType&&"text"==e.modules.filter.attrType||"textarea"==e.modules.filter.tagType?"partial":"match",a="",s="";if(void 0===e.modules.filter.prevSuccess||e.modules.filter.prevSuccess!==t){if(e.modules.filter.prevSuccess=t,e.modules.filter.emptyFunc(t))delete n.headerFilters[l];else{switch(e.modules.filter.value=t,_typeof(e.definition.headerFilterFunc)){case"string":n.filters[e.definition.headerFilterFunc]?(a=e.definition.headerFilterFunc,r=function(r){var i=e.definition.headerFilterFuncParams||{},l=e.getFieldValue(r);return i="function"==typeof i?i(t,l,r):i,n.filters[e.definition.headerFilterFunc](t,l,r,i)}):console.warn("Header Filter Error - Matching filter function not found: ",e.definition.headerFilterFunc);break;case"function":r=function(r){var i=e.definition.headerFilterFuncParams||{},n=e.getFieldValue(r);return i="function"==typeof i?i(t,n,r):i,e.definition.headerFilterFunc(t,n,r,i)},a=r}if(!r)switch(o){case"partial":r=function(r){var i=e.getFieldValue(r);return void 0!==i&&null!==i&&String(i).toLowerCase().indexOf(String(t).toLowerCase())>-1},a="like";break;default:r=function(r){return e.getFieldValue(r)==t},a="="}n.headerFilters[l]={value:t,func:r,type:a,params:i||{}}}s=JSON.stringify(n.headerFilters),n.prevHeaderFilterChangeCheck!==s&&(n.prevHeaderFilterChangeCheck=s,n.changed=!0,n.table.rowManager.filterRefresh())}return!0}var i,n=this,l=e.getField();e.modules.filter={success:r,attrType:!1,tagType:!1,emptyFunc:!1},this.generateHeaderFilterElement(e)},Filter.prototype.generateHeaderFilterElement=function(e,t,r){function i(){}var n,l,o,a,s,d,u,f=this,c=this,h=e.modules.filter.success,p=e.getField();if(e.modules.filter.headerElement&&e.modules.filter.headerElement.parentNode&&e.contentElement.removeChild(e.modules.filter.headerElement.parentNode),p){switch(e.modules.filter.emptyFunc=e.definition.headerFilterEmptyCheck||function(e){return!e&&"0"!==e&&0!==e},n=document.createElement("div"),n.classList.add("tabulator-header-filter"),_typeof(e.definition.headerFilter)){case"string":c.table.modules.edit.editors[e.definition.headerFilter]?(l=c.table.modules.edit.editors[e.definition.headerFilter],"tick"!==e.definition.headerFilter&&"tickCross"!==e.definition.headerFilter||e.definition.headerFilterEmptyCheck||(e.modules.filter.emptyFunc=function(e){return!0!==e&&!1!==e})):console.warn("Filter Error - Cannot build header filter, No such editor found: ",e.definition.editor);break;case"function":l=e.definition.headerFilter;break;case"boolean":e.modules.edit&&e.modules.edit.editor?l=e.modules.edit.editor:e.definition.formatter&&c.table.modules.edit.editors[e.definition.formatter]?(l=c.table.modules.edit.editors[e.definition.formatter],"tick"!==e.definition.formatter&&"tickCross"!==e.definition.formatter||e.definition.headerFilterEmptyCheck||(e.modules.filter.emptyFunc=function(e){return!0!==e&&!1!==e})):l=c.table.modules.edit.editors.input}if(l){if(a={getValue:function(){return void 0!==t?t:""},getField:function(){return e.definition.field},getElement:function(){return n},getColumn:function(){return e.getComponent()},getRow:function(){return{normalizeHeight:function(){}}}},u=e.definition.headerFilterParams||{},u="function"==typeof u?u.call(c.table):u,!(o=l.call(this.table.modules.edit,a,function(){},h,i,u)))return void console.warn("Filter Error - Cannot add filter to "+p+" column, editor returned a value of false");if(!(o instanceof Node))return void console.warn("Filter Error - Cannot add filter to "+p+" column, editor should return an instance of Node, the editor returned:",o);p?c.table.modules.localize.bind("headerFilters|columns|"+e.definition.field,function(e){o.setAttribute("placeholder",void 0!==e&&e?e:c.table.modules.localize.getText("headerFilters|default"))}):c.table.modules.localize.bind("headerFilters|default",function(e){o.setAttribute("placeholder",void 0!==c.column.definition.headerFilterPlaceholder&&c.column.definition.headerFilterPlaceholder?c.column.definition.headerFilterPlaceholder:e)}),o.addEventListener("click",function(e){e.stopPropagation(),o.focus()}),o.addEventListener("focus",function(e){var t=f.table.columnManager.element.scrollLeft;t!==f.table.rowManager.element.scrollLeft&&(f.table.rowManager.scrollHorizontal(t),f.table.columnManager.scrollHorizontal(t))}),s=!1,d=function(e){s&&clearTimeout(s),s=setTimeout(function(){h(o.value)},c.table.options.headerFilterLiveFilterDelay)},e.modules.filter.headerElement=o,e.modules.filter.attrType=o.hasAttribute("type")?o.getAttribute("type").toLowerCase():"",e.modules.filter.tagType=o.tagName.toLowerCase(),!1!==e.definition.headerFilterLiveFilter&&("autocomplete"!==e.definition.headerFilter&&"tickCross"!==e.definition.headerFilter&&("autocomplete"!==e.definition.editor&&"tickCross"!==e.definition.editor||!0!==e.definition.headerFilter)&&(o.addEventListener("keyup",d),o.addEventListener("search",d),"number"==e.modules.filter.attrType&&o.addEventListener("change",function(e){h(o.value)}),"text"==e.modules.filter.attrType&&"ie"!==this.table.browser&&o.setAttribute("type","search")),"input"!=e.modules.filter.tagType&&"select"!=e.modules.filter.tagType&&"textarea"!=e.modules.filter.tagType||o.addEventListener("mousedown",function(e){e.stopPropagation()})),n.appendChild(o),e.contentElement.appendChild(n),r||c.headerFilterColumns.push(e)}}else console.warn("Filter Error - Cannot add header filter, column has no field set:",e.definition.title)},Filter.prototype.hideHeaderFilterElements=function(){this.headerFilterColumns.forEach(function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="none")})},Filter.prototype.showHeaderFilterElements=function(){this.headerFilterColumns.forEach(function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="")})},Filter.prototype.setHeaderFilterFocus=function(e){e.modules.filter&&e.modules.filter.headerElement?e.modules.filter.headerElement.focus():console.warn("Column Filter Focus Error - No header filter set on column:",e.getField())},Filter.prototype.getHeaderFilterValue=function(e){if(e.modules.filter&&e.modules.filter.headerElement)return e.modules.filter.headerElement.value;console.warn("Column Filter Error - No header filter set on column:",e.getField())},Filter.prototype.setHeaderFilterValue=function(e,t){e&&(e.modules.filter&&e.modules.filter.headerElement?(this.generateHeaderFilterElement(e,t,!0),e.modules.filter.success(t)):console.warn("Column Filter Error - No header filter set on column:",e.getField()))},Filter.prototype.reloadHeaderFilter=function(e){e&&(e.modules.filter&&e.modules.filter.headerElement?this.generateHeaderFilterElement(e,e.modules.filter.value,!0):console.warn("Column Filter Error - No header filter set on column:",e.getField()))},Filter.prototype.hasChanged=function(){var e=this.changed;return this.changed=!1,e},Filter.prototype.setFilter=function(e,t,r,i){var n=this;n.filterList=[],Array.isArray(e)||(e=[{field:e,type:t,value:r,params:i}]),n.addFilter(e)},Filter.prototype.addFilter=function(e,t,r,i){var n=this;Array.isArray(e)||(e=[{field:e,type:t,value:r,params:i}]),e.forEach(function(e){(e=n.findFilter(e))&&(n.filterList.push(e),n.changed=!0)}),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},Filter.prototype.findFilter=function(e){var t,r=this;if(Array.isArray(e))return this.findSubFilters(e);var i=!1;return"function"==typeof e.field?i=function(t){return e.field(t,e.type||{})}:r.filters[e.type]?(t=r.table.columnManager.getColumnByField(e.field),i=t?function(i){return r.filters[e.type](e.value,t.getFieldValue(i),i,e.params||{})}:function(t){return r.filters[e.type](e.value,t[e.field],t,e.params||{})}):console.warn("Filter Error - No such filter type found, ignoring: ",e.type),e.func=i,!!e.func&&e},Filter.prototype.findSubFilters=function(e){var t=this,r=[];return e.forEach(function(e){(e=t.findFilter(e))&&r.push(e)}),!!r.length&&r},Filter.prototype.getFilters=function(e,t){var r=[];return e&&(r=this.getHeaderFilters()),t&&r.forEach(function(e){"function"==typeof e.type&&(e.type="function")}),r=r.concat(this.filtersToArray(this.filterList,t))},Filter.prototype.filtersToArray=function(e,t){var r=this,i=[];return e.forEach(function(e){var n;Array.isArray(e)?i.push(r.filtersToArray(e,t)):(n={field:e.field,type:e.type,value:e.value},t&&"function"==typeof n.type&&(n.type="function"),i.push(n))}),i},Filter.prototype.getHeaderFilters=function(){var e=[];for(var t in this.headerFilters)e.push({field:t,type:this.headerFilters[t].type,value:this.headerFilters[t].value});return e},Filter.prototype.removeFilter=function(e,t,r){var i=this;Array.isArray(e)||(e=[{field:e,type:t,value:r}]),e.forEach(function(e){var t=-1;t="object"==_typeof(e.field)?i.filterList.findIndex(function(t){return e===t}):i.filterList.findIndex(function(t){return e.field===t.field&&e.type===t.type&&e.value===t.value}),t>-1?(i.filterList.splice(t,1),i.changed=!0):console.warn("Filter Error - No matching filter type found, ignoring: ",e.type)}),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},Filter.prototype.clearFilter=function(e){this.filterList=[],e&&this.clearHeaderFilter(),this.changed=!0,this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},Filter.prototype.clearHeaderFilter=function(){var e=this;this.headerFilters={},e.prevHeaderFilterChangeCheck="{}",this.headerFilterColumns.forEach(function(t){void 0!==t.modules.filter.value&&delete t.modules.filter.value,t.modules.filter.prevSuccess=void 0,e.reloadHeaderFilter(t)}),this.changed=!0},Filter.prototype.search=function(e,t,r,i){var n=this,l=[],o=[];return Array.isArray(t)||(t=[{field:t,type:r,value:i}]),t.forEach(function(e){(e=n.findFilter(e))&&o.push(e)}),this.table.rowManager.rows.forEach(function(t){var r=!0;o.forEach(function(e){n.filterRecurse(e,t.getData())||(r=!1)}),r&&l.push("data"===e?t.getData("data"):t.getComponent())}),l},Filter.prototype.filter=function(e,t){var r=this,i=[],n=[];return r.table.options.dataFiltering&&r.table.options.dataFiltering.call(r.table,r.getFilters()),r.table.options.ajaxFiltering||!r.filterList.length&&!Object.keys(r.headerFilters).length?i=e.slice(0):e.forEach(function(e){r.filterRow(e)&&i.push(e)}),r.table.options.dataFiltered&&(i.forEach(function(e){n.push(e.getComponent())}),r.table.options.dataFiltered.call(r.table,r.getFilters(),n)),i},Filter.prototype.filterRow=function(e,t){var r=this,i=!0,n=e.getData();r.filterList.forEach(function(e){r.filterRecurse(e,n)||(i=!1)});for(var l in r.headerFilters)r.headerFilters[l].func(n)||(i=!1);return i},Filter.prototype.filterRecurse=function(e,t){var r=this,i=!1;return Array.isArray(e)?e.forEach(function(e){r.filterRecurse(e,t)&&(i=!0)}):i=e.func(t),i},Filter.prototype.filters={"=":function(e,t,r,i){return t==e},"<":function(e,t,r,i){return t<e},"<=":function(e,t,r,i){return t<=e},">":function(e,t,r,i){return t>e},">=":function(e,t,r,i){return t>=e},"!=":function(e,t,r,i){return t!=e},regex:function(e,t,r,i){return"string"==typeof e&&(e=new RegExp(e)),e.test(t)},like:function(e,t,r,i){return null===e||void 0===e?t===e:void 0!==t&&null!==t&&String(t).toLowerCase().indexOf(e.toLowerCase())>-1},keywords:function(e,t,r,i){var n=e.toLowerCase().split(void 0===i.separator?" ":i.separator),l=String(null===t||void 0===t?"":t).toLowerCase(),o=[];return n.forEach(function(e){l.includes(e)&&o.push(!0)}),i.matchAll?o.length===n.length:!!o.length},starts:function(e,t,r,i){return null===e||void 0===e?t===e:void 0!==t&&null!==t&&String(t).toLowerCase().startsWith(e.toLowerCase())},ends:function(e,t,r,i){return null===e||void 0===e?t===e:void 0!==t&&null!==t&&String(t).toLowerCase().endsWith(e.toLowerCase())},in:function(e,t,r,i){return Array.isArray(e)?!e.length||e.indexOf(t)>-1:(console.warn("Filter Error - filter value is not an array:",e),!1)}},Tabulator.prototype.registerModule("filter",Filter);
\ No newline at end of file
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var Format = function Format(table) {
this.table = table; //hold Tabulator object
//image element
image: function image(cell, formatterParams, onRendered) {
- var el = document.createElement("img");
- el.setAttribute("src", cell.getValue());
+ var el = document.createElement("img"),
+ src = cell.getValue();
+
+ if (formatterParams.urlPrefix) {
+ src = formatterParams.urlPrefix + cell.getValue();
+ }
+
+ if (formatterParams.urlSuffix) {
+ src = src + formatterParams.urlSuffix;
+ }
+
+ el.setAttribute("src", src);
switch (_typeof(formatterParams.height)) {
case "number":
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
-var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Format=function(e){this.table=e};Format.prototype.initializeColumn=function(e){e.modules.format=this.lookupFormatter(e,""),void 0!==e.definition.formatterPrint&&(e.modules.format.print=this.lookupFormatter(e,"Print")),void 0!==e.definition.formatterClipboard&&(e.modules.format.clipboard=this.lookupFormatter(e,"Clipboard")),void 0!==e.definition.formatterHtmlOutput&&(e.modules.format.htmlOutput=this.lookupFormatter(e,"HtmlOutput"))},Format.prototype.lookupFormatter=function(e,t){var o={params:e.definition["formatter"+t+"Params"]||{}},r=e.definition["formatter"+t];switch(void 0===r?"undefined":_typeof(r)){case"string":"tick"===r&&(r="tickCross",void 0===o.params.crossElement&&(o.params.crossElement=!1),console.warn("DEPRECATION WARNING - the tick formatter has been deprecated, please use the tickCross formatter with the crossElement param set to false")),this.formatters[r]?o.formatter=this.formatters[r]:(console.warn("Formatter Error - No such formatter found: ",r),o.formatter=this.formatters.plaintext);break;case"function":o.formatter=r;break;default:o.formatter=this.formatters.plaintext}return o},Format.prototype.cellRendered=function(e){e.modules.format&&e.modules.format.renderedCallback&&!e.modules.format.rendered&&(e.modules.format.renderedCallback(),e.modules.format.rendered=!0)},Format.prototype.formatValue=function(e){function t(t){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=t,e.modules.format.rendered=!1}var o=e.getComponent(),r="function"==typeof e.column.modules.format.params?e.column.modules.format.params(o):e.column.modules.format.params;return e.column.modules.format.formatter.call(this,o,r,t)},Format.prototype.formatExportValue=function(e,t){var o,r=e.column.modules.format[t];if(r){var a=function(t){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=t,e.modules.format.rendered=!1};return o="function"==typeof r.params?r.params(component):r.params,r.formatter.call(this,e.getComponent(),o,a)}return this.formatValue(e)},Format.prototype.sanitizeHTML=function(e){if(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(e).replace(/[&<>"'`=\/]/g,function(e){return t[e]})}return e},Format.prototype.emptyToSpace=function(e){return null===e||void 0===e||""===e?" ":e},Format.prototype.getFormatter=function(e){var e;switch(void 0===e?"undefined":_typeof(e)){case"string":this.formatters[e]?e=this.formatters[e]:(console.warn("Formatter Error - No such formatter found: ",e),e=this.formatters.plaintext);break;case"function":e=e;break;default:e=this.formatters.plaintext}return e},Format.prototype.formatters={plaintext:function(e,t,o){return this.emptyToSpace(this.sanitizeHTML(e.getValue()))},html:function(e,t,o){return e.getValue()},textarea:function(e,t,o){return e.getElement().style.whiteSpace="pre-wrap",this.emptyToSpace(this.sanitizeHTML(e.getValue()))},money:function(e,t,o){var r,a,n,l,i=parseFloat(e.getValue()),s=t.decimal||".",c=t.thousand||",",d=t.symbol||"",u=!!t.symbolAfter,m=void 0!==t.precision?t.precision:2;if(isNaN(i))return this.emptyToSpace(this.sanitizeHTML(e.getValue()));for(r=!1!==m?i.toFixed(m):i,r=String(r).split("."),a=r[0],n=r.length>1?s+r[1]:"",l=/(\d+)(\d{3})/;l.test(a);)a=a.replace(l,"$1"+c+"$2");return u?a+n+d:d+a+n},link:function(e,t,o){var r,a=e.getValue(),n=t.urlPrefix||"",l=t.download,i=a,s=document.createElement("a");if(t.labelField&&(r=e.getData(),i=r[t.labelField]),t.label)switch(_typeof(t.label)){case"string":i=t.label;break;case"function":i=t.label(e)}if(i){if(t.urlField&&(r=e.getData(),a=r[t.urlField]),t.url)switch(_typeof(t.url)){case"string":a=t.url;break;case"function":a=t.url(e)}return s.setAttribute("href",n+a),t.target&&s.setAttribute("target",t.target),t.download&&(l="function"==typeof l?l(e):!0===l?"":l,s.setAttribute("download",l)),s.innerHTML=this.emptyToSpace(this.sanitizeHTML(i)),s}return" "},image:function(e,t,o){var r=document.createElement("img");switch(r.setAttribute("src",e.getValue()),_typeof(t.height)){case"number":r.style.height=t.height+"px";break;case"string":r.style.height=t.height}switch(_typeof(t.width)){case"number":r.style.width=t.width+"px";break;case"string":r.style.width=t.width}return r.addEventListener("load",function(){e.getRow().normalizeHeight()}),r},tickCross:function(e,t,o){var r=e.getValue(),a=e.getElement(),n=t.allowEmpty,l=t.allowTruthy,i=void 0!==t.tickElement?t.tickElement:'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#2DC214" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/></svg>',s=void 0!==t.crossElement?t.crossElement:'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#CE1515" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/></svg>';return l&&r||!0===r||"true"===r||"True"===r||1===r||"1"===r?(a.setAttribute("aria-checked",!0),i||""):!n||"null"!==r&&""!==r&&null!==r&&void 0!==r?(a.setAttribute("aria-checked",!1),s||""):(a.setAttribute("aria-checked","mixed"),"")},datetime:function(e,t,o){var r=t.inputFormat||"YYYY-MM-DD hh:mm:ss",a=t.outputFormat||"DD/MM/YYYY hh:mm:ss",n=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",l=e.getValue(),i=moment(l,r);return i.isValid()?t.timezone?i.tz(t.timezone).format(a):i.format(a):!0===n?l:"function"==typeof n?n(l):n},datetimediff:function(e,t,o){var r=t.inputFormat||"YYYY-MM-DD hh:mm:ss",a=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",n=void 0!==t.suffix&&t.suffix,l=void 0!==t.unit?t.unit:void 0,i=void 0!==t.humanize&&t.humanize,s=void 0!==t.date?t.date:moment(),c=e.getValue(),d=moment(c,r);return d.isValid()?i?moment.duration(d.diff(s)).humanize(n):d.diff(s,l)+(n?" "+n:""):!0===a?c:"function"==typeof a?a(c):a},lookup:function(e,t,o){var r=e.getValue();return void 0===t[r]?(console.warn("Missing display value for "+r),r):t[r]},star:function(e,t,o){var r=e.getValue(),a=e.getElement(),n=t&&t.stars?t.stars:5,l=document.createElement("span"),i=document.createElementNS("http://www.w3.org/2000/svg","svg");l.style.verticalAlign="middle",i.setAttribute("width","14"),i.setAttribute("height","14"),i.setAttribute("viewBox","0 0 512 512"),i.setAttribute("xml:space","preserve"),i.style.padding="0 1px",r=r&&!isNaN(r)?parseInt(r):0,r=Math.max(0,Math.min(r,n));for(var s=1;s<=n;s++){var c=i.cloneNode(!0);c.innerHTML=s<=r?'<polygon fill="#FFEA00" stroke="#C1AB60" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>':'<polygon fill="#D2D2D2" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>',l.appendChild(c)}return a.style.whiteSpace="nowrap",a.style.overflow="hidden",a.style.textOverflow="ellipsis",a.setAttribute("aria-label",r),l},traffic:function(e,t,o){var r,a,n=this.sanitizeHTML(e.getValue())||0,l=document.createElement("span"),i=t&&t.max?t.max:100,s=t&&t.min?t.min:0,c=t&&void 0!==t.color?t.color:["red","orange","green"],d="#666666";if(!isNaN(n)&&void 0!==e.getValue()){switch(l.classList.add("tabulator-traffic-light"),a=parseFloat(n)<=i?parseFloat(n):i,a=parseFloat(a)>=s?parseFloat(a):s,r=(i-s)/100,a=Math.round((a-s)/r),void 0===c?"undefined":_typeof(c)){case"string":d=c;break;case"function":d=c(n);break;case"object":if(Array.isArray(c)){var u=100/c.length,m=Math.floor(a/u);m=Math.min(m,c.length-1),m=Math.max(m,0),d=c[m];break}}return l.style.backgroundColor=d,l}},progress:function(e,t,o){var r,a,n,l,i,s=this.sanitizeHTML(e.getValue())||0,c=e.getElement(),d=t&&t.max?t.max:100,u=t&&t.min?t.min:0,m=t&&t.legendAlign?t.legendAlign:"center";switch(a=parseFloat(s)<=d?parseFloat(s):d,a=parseFloat(a)>=u?parseFloat(a):u,r=(d-u)/100,a=Math.round((a-u)/r),_typeof(t.color)){case"string":n=t.color;break;case"function":n=t.color(s);break;case"object":if(Array.isArray(t.color)){var f=100/t.color.length,p=Math.floor(a/f);p=Math.min(p,t.color.length-1),p=Math.max(p,0),n=t.color[p];break}default:n="#2DC214"}switch(_typeof(t.legend)){case"string":l=t.legend;break;case"function":l=t.legend(s);break;case"boolean":l=s;break;default:l=!1}switch(_typeof(t.legendColor)){case"string":i=t.legendColor;break;case"function":i=t.legendColor(s);break;case"object":if(Array.isArray(t.legendColor)){var f=100/t.legendColor.length,p=Math.floor(a/f);p=Math.min(p,t.legendColor.length-1),p=Math.max(p,0),i=t.legendColor[p]}break;default:i="#000"}c.style.minWidth="30px",c.style.position="relative",c.setAttribute("aria-label",a);var h=document.createElement("div");if(h.style.display="inline-block",h.style.position="relative",h.style.width=a+"%",h.style.backgroundColor=n,h.style.height="100%",h.setAttribute("data-max",d),h.setAttribute("data-min",u),l){var g=document.createElement("div");g.style.position="absolute",g.style.top="4px",g.style.left=0,g.style.textAlign=m,g.style.width="100%",g.style.color=i,g.innerHTML=l}return o(function(){if(!(e instanceof CellComponent)){var t=document.createElement("div");t.style.position="absolute",t.style.top="4px",t.style.bottom="4px",t.style.left="4px",t.style.right="4px",c.appendChild(t),c=t}c.appendChild(h),l&&c.appendChild(g)}),""},color:function(e,t,o){return e.getElement().style.backgroundColor=this.sanitizeHTML(e.getValue()),""},buttonTick:function(e,t,o){return'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#2DC214" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/></svg>'},buttonCross:function(e,t,o){return'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#CE1515" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/></svg>'},rownum:function(e,t,o){return this.table.rowManager.activeRows.indexOf(e.getRow()._getSelf())+1},handle:function(e,t,o){return e.getElement().classList.add("tabulator-row-handle"),"<div class='tabulator-row-handle-box'><div class='tabulator-row-handle-bar'></div><div class='tabulator-row-handle-bar'></div><div class='tabulator-row-handle-bar'></div></div>"},responsiveCollapse:function(e,t,o){function r(e){var t=n.element;n.open=e,t&&(n.open?(a.classList.add("open"),t.style.display=""):(a.classList.remove("open"),t.style.display="none"))}var a=document.createElement("div"),n=e.getRow()._row.modules.responsiveLayout;return a.classList.add("tabulator-responsive-collapse-toggle"),a.innerHTML="<span class='tabulator-responsive-collapse-toggle-open'>+</span><span class='tabulator-responsive-collapse-toggle-close'>-</span>",e.getElement().classList.add("tabulator-row-handle"),a.addEventListener("click",function(e){e.stopImmediatePropagation(),r(!n.open)}),r(n.open),a},rowSelection:function(e,t,o){var r=this,a=document.createElement("input");if(a.type="checkbox",this.table.modExists("selectRow",!0))if(a.addEventListener("click",function(e){e.stopPropagation()}),"function"==typeof e.getRow){var n=e.getRow();n instanceof RowComponent?(a.addEventListener("change",function(e){n.toggleSelect()}),a.checked=n.isSelected&&n.isSelected(),this.table.modules.selectRow.registerRowSelectCheckbox(n,a)):a=""}else a.addEventListener("change",function(e){r.table.modules.selectRow.selectedRows.length?r.table.deselectRow():r.table.selectRow(t.rowRange)}),this.table.modules.selectRow.registerHeaderSelectCheckbox(a);return a}},Tabulator.prototype.registerModule("format",Format);
\ No newline at end of file
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
+var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Format=function(e){this.table=e};Format.prototype.initializeColumn=function(e){e.modules.format=this.lookupFormatter(e,""),void 0!==e.definition.formatterPrint&&(e.modules.format.print=this.lookupFormatter(e,"Print")),void 0!==e.definition.formatterClipboard&&(e.modules.format.clipboard=this.lookupFormatter(e,"Clipboard")),void 0!==e.definition.formatterHtmlOutput&&(e.modules.format.htmlOutput=this.lookupFormatter(e,"HtmlOutput"))},Format.prototype.lookupFormatter=function(e,t){var o={params:e.definition["formatter"+t+"Params"]||{}},r=e.definition["formatter"+t];switch(void 0===r?"undefined":_typeof(r)){case"string":"tick"===r&&(r="tickCross",void 0===o.params.crossElement&&(o.params.crossElement=!1),console.warn("DEPRECATION WARNING - the tick formatter has been deprecated, please use the tickCross formatter with the crossElement param set to false")),this.formatters[r]?o.formatter=this.formatters[r]:(console.warn("Formatter Error - No such formatter found: ",r),o.formatter=this.formatters.plaintext);break;case"function":o.formatter=r;break;default:o.formatter=this.formatters.plaintext}return o},Format.prototype.cellRendered=function(e){e.modules.format&&e.modules.format.renderedCallback&&!e.modules.format.rendered&&(e.modules.format.renderedCallback(),e.modules.format.rendered=!0)},Format.prototype.formatValue=function(e){function t(t){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=t,e.modules.format.rendered=!1}var o=e.getComponent(),r="function"==typeof e.column.modules.format.params?e.column.modules.format.params(o):e.column.modules.format.params;return e.column.modules.format.formatter.call(this,o,r,t)},Format.prototype.formatExportValue=function(e,t){var o,r=e.column.modules.format[t];if(r){var a=function(t){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=t,e.modules.format.rendered=!1};return o="function"==typeof r.params?r.params(component):r.params,r.formatter.call(this,e.getComponent(),o,a)}return this.formatValue(e)},Format.prototype.sanitizeHTML=function(e){if(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(e).replace(/[&<>"'`=\/]/g,function(e){return t[e]})}return e},Format.prototype.emptyToSpace=function(e){return null===e||void 0===e||""===e?" ":e},Format.prototype.getFormatter=function(e){var e;switch(void 0===e?"undefined":_typeof(e)){case"string":this.formatters[e]?e=this.formatters[e]:(console.warn("Formatter Error - No such formatter found: ",e),e=this.formatters.plaintext);break;case"function":e=e;break;default:e=this.formatters.plaintext}return e},Format.prototype.formatters={plaintext:function(e,t,o){return this.emptyToSpace(this.sanitizeHTML(e.getValue()))},html:function(e,t,o){return e.getValue()},textarea:function(e,t,o){return e.getElement().style.whiteSpace="pre-wrap",this.emptyToSpace(this.sanitizeHTML(e.getValue()))},money:function(e,t,o){var r,a,n,l,i=parseFloat(e.getValue()),s=t.decimal||".",c=t.thousand||",",u=t.symbol||"",d=!!t.symbolAfter,m=void 0!==t.precision?t.precision:2;if(isNaN(i))return this.emptyToSpace(this.sanitizeHTML(e.getValue()));for(r=!1!==m?i.toFixed(m):i,r=String(r).split("."),a=r[0],n=r.length>1?s+r[1]:"",l=/(\d+)(\d{3})/;l.test(a);)a=a.replace(l,"$1"+c+"$2");return d?a+n+u:u+a+n},link:function(e,t,o){var r,a=e.getValue(),n=t.urlPrefix||"",l=t.download,i=a,s=document.createElement("a");if(t.labelField&&(r=e.getData(),i=r[t.labelField]),t.label)switch(_typeof(t.label)){case"string":i=t.label;break;case"function":i=t.label(e)}if(i){if(t.urlField&&(r=e.getData(),a=r[t.urlField]),t.url)switch(_typeof(t.url)){case"string":a=t.url;break;case"function":a=t.url(e)}return s.setAttribute("href",n+a),t.target&&s.setAttribute("target",t.target),t.download&&(l="function"==typeof l?l(e):!0===l?"":l,s.setAttribute("download",l)),s.innerHTML=this.emptyToSpace(this.sanitizeHTML(i)),s}return" "},image:function(e,t,o){var r=document.createElement("img"),a=e.getValue();switch(t.urlPrefix&&(a=t.urlPrefix+e.getValue()),t.urlSuffix&&(a+=t.urlSuffix),r.setAttribute("src",a),_typeof(t.height)){case"number":r.style.height=t.height+"px";break;case"string":r.style.height=t.height}switch(_typeof(t.width)){case"number":r.style.width=t.width+"px";break;case"string":r.style.width=t.width}return r.addEventListener("load",function(){e.getRow().normalizeHeight()}),r},tickCross:function(e,t,o){var r=e.getValue(),a=e.getElement(),n=t.allowEmpty,l=t.allowTruthy,i=void 0!==t.tickElement?t.tickElement:'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#2DC214" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/></svg>',s=void 0!==t.crossElement?t.crossElement:'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#CE1515" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/></svg>';return l&&r||!0===r||"true"===r||"True"===r||1===r||"1"===r?(a.setAttribute("aria-checked",!0),i||""):!n||"null"!==r&&""!==r&&null!==r&&void 0!==r?(a.setAttribute("aria-checked",!1),s||""):(a.setAttribute("aria-checked","mixed"),"")},datetime:function(e,t,o){var r=t.inputFormat||"YYYY-MM-DD hh:mm:ss",a=t.outputFormat||"DD/MM/YYYY hh:mm:ss",n=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",l=e.getValue(),i=moment(l,r);return i.isValid()?t.timezone?i.tz(t.timezone).format(a):i.format(a):!0===n?l:"function"==typeof n?n(l):n},datetimediff:function(e,t,o){var r=t.inputFormat||"YYYY-MM-DD hh:mm:ss",a=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",n=void 0!==t.suffix&&t.suffix,l=void 0!==t.unit?t.unit:void 0,i=void 0!==t.humanize&&t.humanize,s=void 0!==t.date?t.date:moment(),c=e.getValue(),u=moment(c,r);return u.isValid()?i?moment.duration(u.diff(s)).humanize(n):u.diff(s,l)+(n?" "+n:""):!0===a?c:"function"==typeof a?a(c):a},lookup:function(e,t,o){var r=e.getValue();return void 0===t[r]?(console.warn("Missing display value for "+r),r):t[r]},star:function(e,t,o){var r=e.getValue(),a=e.getElement(),n=t&&t.stars?t.stars:5,l=document.createElement("span"),i=document.createElementNS("http://www.w3.org/2000/svg","svg");l.style.verticalAlign="middle",i.setAttribute("width","14"),i.setAttribute("height","14"),i.setAttribute("viewBox","0 0 512 512"),i.setAttribute("xml:space","preserve"),i.style.padding="0 1px",r=r&&!isNaN(r)?parseInt(r):0,r=Math.max(0,Math.min(r,n));for(var s=1;s<=n;s++){var c=i.cloneNode(!0);c.innerHTML=s<=r?'<polygon fill="#FFEA00" stroke="#C1AB60" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>':'<polygon fill="#D2D2D2" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>',l.appendChild(c)}return a.style.whiteSpace="nowrap",a.style.overflow="hidden",a.style.textOverflow="ellipsis",a.setAttribute("aria-label",r),l},traffic:function(e,t,o){var r,a,n=this.sanitizeHTML(e.getValue())||0,l=document.createElement("span"),i=t&&t.max?t.max:100,s=t&&t.min?t.min:0,c=t&&void 0!==t.color?t.color:["red","orange","green"],u="#666666";if(!isNaN(n)&&void 0!==e.getValue()){switch(l.classList.add("tabulator-traffic-light"),a=parseFloat(n)<=i?parseFloat(n):i,a=parseFloat(a)>=s?parseFloat(a):s,r=(i-s)/100,a=Math.round((a-s)/r),void 0===c?"undefined":_typeof(c)){case"string":u=c;break;case"function":u=c(n);break;case"object":if(Array.isArray(c)){var d=100/c.length,m=Math.floor(a/d);m=Math.min(m,c.length-1),m=Math.max(m,0),u=c[m];break}}return l.style.backgroundColor=u,l}},progress:function(e,t,o){var r,a,n,l,i,s=this.sanitizeHTML(e.getValue())||0,c=e.getElement(),u=t&&t.max?t.max:100,d=t&&t.min?t.min:0,m=t&&t.legendAlign?t.legendAlign:"center";switch(a=parseFloat(s)<=u?parseFloat(s):u,a=parseFloat(a)>=d?parseFloat(a):d,r=(u-d)/100,a=Math.round((a-d)/r),_typeof(t.color)){case"string":n=t.color;break;case"function":n=t.color(s);break;case"object":if(Array.isArray(t.color)){var f=100/t.color.length,p=Math.floor(a/f);p=Math.min(p,t.color.length-1),p=Math.max(p,0),n=t.color[p];break}default:n="#2DC214"}switch(_typeof(t.legend)){case"string":l=t.legend;break;case"function":l=t.legend(s);break;case"boolean":l=s;break;default:l=!1}switch(_typeof(t.legendColor)){case"string":i=t.legendColor;break;case"function":i=t.legendColor(s);break;case"object":if(Array.isArray(t.legendColor)){var f=100/t.legendColor.length,p=Math.floor(a/f);p=Math.min(p,t.legendColor.length-1),p=Math.max(p,0),i=t.legendColor[p]}break;default:i="#000"}c.style.minWidth="30px",c.style.position="relative",c.setAttribute("aria-label",a);var h=document.createElement("div");if(h.style.display="inline-block",h.style.position="relative",h.style.width=a+"%",h.style.backgroundColor=n,h.style.height="100%",h.setAttribute("data-max",u),h.setAttribute("data-min",d),l){var g=document.createElement("div");g.style.position="absolute",g.style.top="4px",g.style.left=0,g.style.textAlign=m,g.style.width="100%",g.style.color=i,g.innerHTML=l}return o(function(){if(!(e instanceof CellComponent)){var t=document.createElement("div");t.style.position="absolute",t.style.top="4px",t.style.bottom="4px",t.style.left="4px",t.style.right="4px",c.appendChild(t),c=t}c.appendChild(h),l&&c.appendChild(g)}),""},color:function(e,t,o){return e.getElement().style.backgroundColor=this.sanitizeHTML(e.getValue()),""},buttonTick:function(e,t,o){return'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#2DC214" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/></svg>'},buttonCross:function(e,t,o){return'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#CE1515" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/></svg>'},rownum:function(e,t,o){return this.table.rowManager.activeRows.indexOf(e.getRow()._getSelf())+1},handle:function(e,t,o){return e.getElement().classList.add("tabulator-row-handle"),"<div class='tabulator-row-handle-box'><div class='tabulator-row-handle-bar'></div><div class='tabulator-row-handle-bar'></div><div class='tabulator-row-handle-bar'></div></div>"},responsiveCollapse:function(e,t,o){function r(e){var t=n.element;n.open=e,t&&(n.open?(a.classList.add("open"),t.style.display=""):(a.classList.remove("open"),t.style.display="none"))}var a=document.createElement("div"),n=e.getRow()._row.modules.responsiveLayout;return a.classList.add("tabulator-responsive-collapse-toggle"),a.innerHTML="<span class='tabulator-responsive-collapse-toggle-open'>+</span><span class='tabulator-responsive-collapse-toggle-close'>-</span>",e.getElement().classList.add("tabulator-row-handle"),a.addEventListener("click",function(e){e.stopImmediatePropagation(),r(!n.open)}),r(n.open),a},rowSelection:function(e,t,o){var r=this,a=document.createElement("input");if(a.type="checkbox",this.table.modExists("selectRow",!0))if(a.addEventListener("click",function(e){e.stopPropagation()}),"function"==typeof e.getRow){var n=e.getRow();n instanceof RowComponent?(a.addEventListener("change",function(e){n.toggleSelect()}),a.checked=n.isSelected&&n.isSelected(),this.table.modules.selectRow.registerRowSelectCheckbox(n,a)):a=""}else a.addEventListener("change",function(e){r.table.modules.selectRow.selectedRows.length?r.table.deselectRow():r.table.selectRow(t.rowRange)}),this.table.modules.selectRow.registerHeaderSelectCheckbox(a);return a}},Tabulator.prototype.registerModule("format",Format);
\ No newline at end of file
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var FrozenColumns = function FrozenColumns(table) {
this.table = table; //hold Tabulator object
if (allCells) {
column.cells.forEach(function (cell) {
- _this2.layoutElement(cell.getElement(), column);
+ _this2.layoutElement(cell.getElement(true), column);
});
}
});
if (allCells) {
column.cells.forEach(function (cell) {
- _this2.layoutElement(cell.getElement(), column);
+ _this2.layoutElement(cell.getElement(true), column);
});
}
});
var cell = row.getCell(column);
if (cell) {
- _this3.layoutElement(cell.getElement(), column);
+ _this3.layoutElement(cell.getElement(true), column);
}
});
var cell = row.getCell(column);
if (cell) {
- _this3.layoutElement(cell.getElement(), column);
+ _this3.layoutElement(cell.getElement(true), column);
}
});
};
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
-var FrozenColumns=function(t){this.table=t,this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.rightPadding=0,this.initializationMode="left",this.active=!1,this.scrollEndTimer=!1};FrozenColumns.prototype.reset=function(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.rightMargin=0,this.active=!1,this.table.columnManager.headersElement.style.marginLeft=0,this.table.columnManager.element.style.paddingRight=0},FrozenColumns.prototype.initializeColumn=function(t){var e={margin:0,edge:!1};t.isGroup||(this.frozenCheck(t)?(e.position=this.initializationMode,"left"==this.initializationMode?this.leftColumns.push(t):this.rightColumns.unshift(t),this.active=!0,t.modules.frozen=e):this.initializationMode="right")},FrozenColumns.prototype.frozenCheck=function(t){return t.parent.isGroup&&t.definition.frozen&&console.warn("Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups"),t.parent.isGroup?this.frozenCheck(t.parent):t.definition.frozen},FrozenColumns.prototype.scrollHorizontal=function(){var t,e=this;this.active&&(clearTimeout(this.scrollEndTimer),this.scrollEndTimer=setTimeout(function(){e.layout()},100),t=this.table.rowManager.getVisibleRows(),this.calcMargins(),this.layoutColumnPosition(),this.layoutCalcRows(),t.forEach(function(t){"row"===t.type&&e.layoutRow(t)}),this.table.rowManager.tableElement.style.marginRight=this.rightMargin)},FrozenColumns.prototype.calcMargins=function(){this.leftMargin=this._calcSpace(this.leftColumns,this.leftColumns.length)+"px",this.table.columnManager.headersElement.style.marginLeft=this.leftMargin,this.rightMargin=this._calcSpace(this.rightColumns,this.rightColumns.length)+"px",this.table.columnManager.element.style.paddingRight=this.rightMargin,this.rightPadding=this.table.rowManager.element.clientWidth+this.table.columnManager.scrollLeft},FrozenColumns.prototype.layoutCalcRows=function(){this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&this.table.modules.columnCalcs.topRow&&this.layoutRow(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&this.table.modules.columnCalcs.botRow&&this.layoutRow(this.table.modules.columnCalcs.botRow))},FrozenColumns.prototype.layoutColumnPosition=function(t){var e=this,o=[];this.leftColumns.forEach(function(n,l){if(n.modules.frozen.margin=e._calcSpace(e.leftColumns,l)+e.table.columnManager.scrollLeft+"px",l==e.leftColumns.length-1?n.modules.frozen.edge=!0:n.modules.frozen.edge=!1,n.parent.isGroup){var i=e.getColGroupParentElement(n);o.includes(i)||(e.layoutElement(i,n),o.push(i)),n.modules.frozen.edge&&i.classList.add("tabulator-frozen-"+n.modules.frozen.position)}else e.layoutElement(n.getElement(),n);t&&n.cells.forEach(function(t){e.layoutElement(t.getElement(),n)})}),this.rightColumns.forEach(function(o,n){o.modules.frozen.margin=e.rightPadding-e._calcSpace(e.rightColumns,n+1)+"px",n==e.rightColumns.length-1?o.modules.frozen.edge=!0:o.modules.frozen.edge=!1,o.parent.isGroup?e.layoutElement(e.getColGroupParentElement(o),o):e.layoutElement(o.getElement(),o),t&&o.cells.forEach(function(t){e.layoutElement(t.getElement(),o)})})},FrozenColumns.prototype.getColGroupParentElement=function(t){return t.parent.isGroup?this.getColGroupParentElement(t.parent):t.getElement()},FrozenColumns.prototype.layout=function(){var t=this;t.active&&(this.calcMargins(),t.table.rowManager.getDisplayRows().forEach(function(e){"row"===e.type&&t.layoutRow(e)}),this.layoutCalcRows(),this.layoutColumnPosition(!0),this.table.rowManager.tableElement.style.marginRight=this.rightMargin)},FrozenColumns.prototype.layoutRow=function(t){var e=this;t.getElement().style.paddingLeft=this.leftMargin,this.leftColumns.forEach(function(o){var n=t.getCell(o);n&&e.layoutElement(n.getElement(),o)}),this.rightColumns.forEach(function(o){var n=t.getCell(o);n&&e.layoutElement(n.getElement(),o)})},FrozenColumns.prototype.layoutElement=function(t,e){e.modules.frozen&&(t.style.position="absolute",t.style.left=e.modules.frozen.margin,t.classList.add("tabulator-frozen"),e.modules.frozen.edge&&t.classList.add("tabulator-frozen-"+e.modules.frozen.position))},FrozenColumns.prototype._calcSpace=function(t,e){for(var o=0,n=0;n<e;n++)t[n].visible&&(o+=t[n].getWidth());return o},Tabulator.prototype.registerModule("frozenColumns",FrozenColumns);
\ No newline at end of file
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
+var FrozenColumns=function(t){this.table=t,this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.rightPadding=0,this.initializationMode="left",this.active=!1,this.scrollEndTimer=!1};FrozenColumns.prototype.reset=function(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.rightMargin=0,this.active=!1,this.table.columnManager.headersElement.style.marginLeft=0,this.table.columnManager.element.style.paddingRight=0},FrozenColumns.prototype.initializeColumn=function(t){var e={margin:0,edge:!1};t.isGroup||(this.frozenCheck(t)?(e.position=this.initializationMode,"left"==this.initializationMode?this.leftColumns.push(t):this.rightColumns.unshift(t),this.active=!0,t.modules.frozen=e):this.initializationMode="right")},FrozenColumns.prototype.frozenCheck=function(t){return t.parent.isGroup&&t.definition.frozen&&console.warn("Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups"),t.parent.isGroup?this.frozenCheck(t.parent):t.definition.frozen},FrozenColumns.prototype.scrollHorizontal=function(){var t,e=this;this.active&&(clearTimeout(this.scrollEndTimer),this.scrollEndTimer=setTimeout(function(){e.layout()},100),t=this.table.rowManager.getVisibleRows(),this.calcMargins(),this.layoutColumnPosition(),this.layoutCalcRows(),t.forEach(function(t){"row"===t.type&&e.layoutRow(t)}),this.table.rowManager.tableElement.style.marginRight=this.rightMargin)},FrozenColumns.prototype.calcMargins=function(){this.leftMargin=this._calcSpace(this.leftColumns,this.leftColumns.length)+"px",this.table.columnManager.headersElement.style.marginLeft=this.leftMargin,this.rightMargin=this._calcSpace(this.rightColumns,this.rightColumns.length)+"px",this.table.columnManager.element.style.paddingRight=this.rightMargin,this.rightPadding=this.table.rowManager.element.clientWidth+this.table.columnManager.scrollLeft},FrozenColumns.prototype.layoutCalcRows=function(){this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&this.table.modules.columnCalcs.topRow&&this.layoutRow(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&this.table.modules.columnCalcs.botRow&&this.layoutRow(this.table.modules.columnCalcs.botRow))},FrozenColumns.prototype.layoutColumnPosition=function(t){var e=this,o=[];this.leftColumns.forEach(function(n,l){if(n.modules.frozen.margin=e._calcSpace(e.leftColumns,l)+e.table.columnManager.scrollLeft+"px",l==e.leftColumns.length-1?n.modules.frozen.edge=!0:n.modules.frozen.edge=!1,n.parent.isGroup){var i=e.getColGroupParentElement(n);o.includes(i)||(e.layoutElement(i,n),o.push(i)),n.modules.frozen.edge&&i.classList.add("tabulator-frozen-"+n.modules.frozen.position)}else e.layoutElement(n.getElement(),n);t&&n.cells.forEach(function(t){e.layoutElement(t.getElement(!0),n)})}),this.rightColumns.forEach(function(o,n){o.modules.frozen.margin=e.rightPadding-e._calcSpace(e.rightColumns,n+1)+"px",n==e.rightColumns.length-1?o.modules.frozen.edge=!0:o.modules.frozen.edge=!1,o.parent.isGroup?e.layoutElement(e.getColGroupParentElement(o),o):e.layoutElement(o.getElement(),o),t&&o.cells.forEach(function(t){e.layoutElement(t.getElement(!0),o)})})},FrozenColumns.prototype.getColGroupParentElement=function(t){return t.parent.isGroup?this.getColGroupParentElement(t.parent):t.getElement()},FrozenColumns.prototype.layout=function(){var t=this;t.active&&(this.calcMargins(),t.table.rowManager.getDisplayRows().forEach(function(e){"row"===e.type&&t.layoutRow(e)}),this.layoutCalcRows(),this.layoutColumnPosition(!0),this.table.rowManager.tableElement.style.marginRight=this.rightMargin)},FrozenColumns.prototype.layoutRow=function(t){var e=this;t.getElement().style.paddingLeft=this.leftMargin,this.leftColumns.forEach(function(o){var n=t.getCell(o);n&&e.layoutElement(n.getElement(!0),o)}),this.rightColumns.forEach(function(o){var n=t.getCell(o);n&&e.layoutElement(n.getElement(!0),o)})},FrozenColumns.prototype.layoutElement=function(t,e){e.modules.frozen&&(t.style.position="absolute",t.style.left=e.modules.frozen.margin,t.classList.add("tabulator-frozen"),e.modules.frozen.edge&&t.classList.add("tabulator-frozen-"+e.modules.frozen.position))},FrozenColumns.prototype._calcSpace=function(t,e){for(var o=0,n=0;n<e;n++)t[n].visible&&(o+=t[n].getWidth());return o},Tabulator.prototype.registerModule("frozenColumns",FrozenColumns);
\ No newline at end of file
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var FrozenRows = function FrozenRows(table) {
this.table = table; //hold Tabulator object
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var FrozenRows=function(e){this.table=e,this.topElement=document.createElement("div"),this.rows=[],this.displayIndex=0};FrozenRows.prototype.initialize=function(){this.rows=[],this.topElement.classList.add("tabulator-frozen-rows-holder"),this.table.columnManager.getElement().insertBefore(this.topElement,this.table.columnManager.headersElement.nextSibling)},FrozenRows.prototype.setDisplayIndex=function(e){this.displayIndex=e},FrozenRows.prototype.getDisplayIndex=function(){return this.displayIndex},FrozenRows.prototype.isFrozen=function(){return!!this.rows.length},FrozenRows.prototype.getRows=function(e){var o=e.slice(0);return this.rows.forEach(function(e){var t=o.indexOf(e);t>-1&&o.splice(t,1)}),o},FrozenRows.prototype.freezeRow=function(e){e.modules.frozen?console.warn("Freeze Error - Row is already frozen"):(e.modules.frozen=!0,this.topElement.appendChild(e.getElement()),e.initialize(),e.normalizeHeight(),this.table.rowManager.adjustTableSize(),this.rows.push(e),this.table.rowManager.refreshActiveData("display"),this.styleRows())},FrozenRows.prototype.unfreezeRow=function(e){this.rows.indexOf(e);e.modules.frozen?(e.modules.frozen=!1,this.detachRow(e),this.table.rowManager.adjustTableSize(),this.table.rowManager.refreshActiveData("display"),this.rows.length&&this.styleRows()):console.warn("Freeze Error - Row is already unfrozen")},FrozenRows.prototype.detachRow=function(e){var o=this.rows.indexOf(e);if(o>-1){var t=e.getElement();t.parentNode.removeChild(t),this.rows.splice(o,1)}},FrozenRows.prototype.styleRows=function(e){var o=this;this.rows.forEach(function(e,t){o.table.rowManager.styleRow(e,t)})},Tabulator.prototype.registerModule("frozenRows",FrozenRows);
\ No newline at end of file
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
//public group object
var GroupComponent = function GroupComponent(group) {
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var GroupComponent=function(t){this._group=t,this.type="GroupComponent"};GroupComponent.prototype.getKey=function(){return this._group.key},GroupComponent.prototype.getField=function(){return this._group.field},GroupComponent.prototype.getElement=function(){return this._group.element},GroupComponent.prototype.getRows=function(){return this._group.getRows(!0)},GroupComponent.prototype.getSubGroups=function(){return this._group.getSubGroups(!0)},GroupComponent.prototype.getParentGroup=function(){return!!this._group.parent&&this._group.parent.getComponent()},GroupComponent.prototype.getVisibility=function(){return console.warn("getVisibility function is deprecated, you should now use the isVisible function"),this._group.visible},GroupComponent.prototype.isVisible=function(){return this._group.visible},GroupComponent.prototype.show=function(){this._group.show()},GroupComponent.prototype.hide=function(){this._group.hide()},GroupComponent.prototype.toggle=function(){this._group.toggleVisibility()},GroupComponent.prototype._getSelf=function(){return this._group},GroupComponent.prototype.getTable=function(){return this._group.groupManager.table};var Group=function(t,o,e,r,i,s,n){this.groupManager=t,this.parent=o,this.key=r,this.level=e,this.field=i,this.hasSubGroups=e<t.groupIDLookups.length-1,this.addRow=this.hasSubGroups?this._addRowToGroup:this._addRow,this.type="group",this.old=n,this.rows=[],this.groups=[],this.groupList=[],this.generator=s,this.elementContents=!1,this.height=0,this.outerHeight=0,this.initialized=!1,this.calcs={},this.initialized=!1,this.modules={},this.arrowElement=!1,this.visible=n?n.visible:void 0!==t.startOpen[e]?t.startOpen[e]:t.startOpen[0],this.component=null,this.createElements(),this.addBindings(),this.createValueGroups()};Group.prototype.wipe=function(){this.groupList.length?this.groupList.forEach(function(t){t.wipe()}):(this.element=!1,this.arrowElement=!1,this.elementContents=!1)},Group.prototype.createElements=function(){var t=document.createElement("div");t.classList.add("tabulator-arrow"),this.element=document.createElement("div"),this.element.classList.add("tabulator-row"),this.element.classList.add("tabulator-group"),this.element.classList.add("tabulator-group-level-"+this.level),this.element.setAttribute("role","rowgroup"),this.arrowElement=document.createElement("div"),this.arrowElement.classList.add("tabulator-group-toggle"),this.arrowElement.appendChild(t),!1!==this.groupManager.table.options.movableRows&&this.groupManager.table.modExists("moveRow")&&this.groupManager.table.modules.moveRow.initializeGroupHeader(this)},Group.prototype.createValueGroups=function(){var t=this,o=this.level+1;this.groupManager.allowedValues&&this.groupManager.allowedValues[o]&&this.groupManager.allowedValues[o].forEach(function(e){t._createGroup(e,o)})},Group.prototype.addBindings=function(){var t,o,e,r,i=this;i.groupManager.table.options.groupClick&&i.element.addEventListener("click",function(t){i.groupManager.table.options.groupClick.call(i.groupManager.table,t,i.getComponent())}),i.groupManager.table.options.groupDblClick&&i.element.addEventListener("dblclick",function(t){i.groupManager.table.options.groupDblClick.call(i.groupManager.table,t,i.getComponent())}),i.groupManager.table.options.groupContext&&i.element.addEventListener("contextmenu",function(t){i.groupManager.table.options.groupContext.call(i.groupManager.table,t,i.getComponent())}),(i.groupManager.table.options.groupContextMenu||i.groupManager.table.options.groupClickMenu)&&i.groupManager.table.modExists("menu")&&i.groupManager.table.modules.menu.initializeGroup.call(i.groupManager.table.modules.menu,i),i.groupManager.table.options.groupTap&&(e=!1,i.element.addEventListener("touchstart",function(t){e=!0},{passive:!0}),i.element.addEventListener("touchend",function(t){e&&i.groupManager.table.options.groupTap(t,i.getComponent()),e=!1})),i.groupManager.table.options.groupDblTap&&(t=null,i.element.addEventListener("touchend",function(o){t?(clearTimeout(t),t=null,i.groupManager.table.options.groupDblTap(o,i.getComponent())):t=setTimeout(function(){clearTimeout(t),t=null},300)})),i.groupManager.table.options.groupTapHold&&(o=null,i.element.addEventListener("touchstart",function(t){clearTimeout(o),o=setTimeout(function(){clearTimeout(o),o=null,e=!1,i.groupManager.table.options.groupTapHold(t,i.getComponent())},1e3)},{passive:!0}),i.element.addEventListener("touchend",function(t){clearTimeout(o),o=null})),i.groupManager.table.options.groupToggleElement&&(r="arrow"==i.groupManager.table.options.groupToggleElement?i.arrowElement:i.element,r.addEventListener("click",function(t){t.stopPropagation(),t.stopImmediatePropagation(),i.toggleVisibility()}))},Group.prototype._createGroup=function(t,o){var e=o+"_"+t,r=new Group(this.groupManager,this,o,t,this.groupManager.groupIDLookups[o].field,this.groupManager.headerGenerator[o]||this.groupManager.headerGenerator[0],!!this.old&&this.old.groups[e]);this.groups[e]=r,this.groupList.push(r)},Group.prototype._addRowToGroup=function(t){var o=this.level+1;if(this.hasSubGroups){var e=this.groupManager.groupIDLookups[o].func(t.getData()),r=o+"_"+e;this.groupManager.allowedValues&&this.groupManager.allowedValues[o]?this.groups[r]&&this.groups[r].addRow(t):(this.groups[r]||this._createGroup(e,o),this.groups[r].addRow(t))}},Group.prototype._addRow=function(t){this.rows.push(t),t.modules.group=this},Group.prototype.insertRow=function(t,o,e){var r=this.conformRowData({});t.updateData(r);var i=this.rows.indexOf(o);i>-1?e?this.rows.splice(i+1,0,t):this.rows.splice(i,0,t):e?this.rows.push(t):this.rows.unshift(t),t.modules.group=this,this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this),this.groupManager.updateGroupRows(!0)},Group.prototype.scrollHeader=function(t){this.arrowElement.style.marginLeft=t,this.groupList.forEach(function(o){o.scrollHeader(t)})},Group.prototype.getRowIndex=function(t){},Group.prototype.conformRowData=function(t){return this.field?t[this.field]=this.key:console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"),this.parent&&(t=this.parent.conformRowData(t)),t},Group.prototype.removeRow=function(t){var o=this.rows.indexOf(t),e=t.getElement();o>-1&&this.rows.splice(o,1),this.groupManager.table.options.groupValues||this.rows.length?(e.parentNode&&e.parentNode.removeChild(e),this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this)):(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this),this.groupManager.updateGroupRows(!0))},Group.prototype.removeGroup=function(t){var o,e=t.level+"_"+t.key;this.groups[e]&&(delete this.groups[e],o=this.groupList.indexOf(t),o>-1&&this.groupList.splice(o,1),this.groupList.length||(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this)))},Group.prototype.getHeadersAndRows=function(t){var o=[];return o.push(this),this._visSet(),this.visible?this.groupList.length?this.groupList.forEach(function(e){o=o.concat(e.getHeadersAndRows(t))}):(!t&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),o.push(this.calcs.top)),o=o.concat(this.rows),!t&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),o.push(this.calcs.bottom))):this.groupList.length||"table"==this.groupManager.table.options.columnCalcs||this.groupManager.table.modExists("columnCalcs")&&(!t&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),o.push(this.calcs.top))),!t&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),o.push(this.calcs.bottom)))),o},Group.prototype.getData=function(t,o){var e=[];return this._visSet(),(!t||t&&this.visible)&&this.rows.forEach(function(t){e.push(t.getData(o||"data"))}),e},Group.prototype.getRowCount=function(){var t=0;return this.groupList.length?this.groupList.forEach(function(o){t+=o.getRowCount()}):t=this.rows.length,t},Group.prototype.toggleVisibility=function(){this.visible?this.hide():this.show()},Group.prototype.hide=function(){this.visible=!1,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination?this.groupManager.updateGroupRows(!0):(this.element.classList.remove("tabulator-group-visible"),this.groupList.length?this.groupList.forEach(function(t){t.getHeadersAndRows().forEach(function(t){t.detachElement()})}):this.rows.forEach(function(t){var o=t.getElement();o.parentNode.removeChild(o)}),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()),this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!1)},Group.prototype.show=function(){var t=this;if(t.visible=!0,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination)this.groupManager.updateGroupRows(!0);else{this.element.classList.add("tabulator-group-visible");var o=t.getElement();this.groupList.length?this.groupList.forEach(function(t){t.getHeadersAndRows().forEach(function(t){var e=t.getElement();o.parentNode.insertBefore(e,o.nextSibling),t.initialize(),o=e})}):t.rows.forEach(function(t){var e=t.getElement();o.parentNode.insertBefore(e,o.nextSibling),t.initialize(),o=e}),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()}this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!0)},Group.prototype._visSet=function(){var t=[];"function"==typeof this.visible&&(this.rows.forEach(function(o){t.push(o.getData())}),this.visible=this.visible(this.key,this.getRowCount(),t,this.getComponent()))},Group.prototype.getRowGroup=function(t){var o=!1;return this.groupList.length?this.groupList.forEach(function(e){var r=e.getRowGroup(t);r&&(o=r)}):this.rows.find(function(o){return o===t})&&(o=this),o},Group.prototype.getSubGroups=function(t){var o=[];return this.groupList.forEach(function(e){o.push(t?e.getComponent():e)}),o},Group.prototype.getRows=function(t){var o=[];return this.rows.forEach(function(e){o.push(t?e.getComponent():e)}),o},Group.prototype.generateGroupHeaderContents=function(){var t=[];for(this.rows.forEach(function(o){t.push(o.getData())}),this.elementContents=this.generator(this.key,this.getRowCount(),t,this.getComponent());this.element.firstChild;)this.element.removeChild(this.element.firstChild);"string"==typeof this.elementContents?this.element.innerHTML=this.elementContents:this.element.appendChild(this.elementContents),this.element.insertBefore(this.arrowElement,this.element.firstChild)},Group.prototype.getPath=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t.unshift(this.key),this.parent&&this.parent.getPath(t),t},Group.prototype.getElement=function(){this.addBindingsd=!1,this._visSet(),this.visible?this.element.classList.add("tabulator-group-visible"):this.element.classList.remove("tabulator-group-visible");for(var t=0;t<this.element.childNodes.length;++t)this.element.childNodes[t].parentNode.removeChild(this.element.childNodes[t]);return this.generateGroupHeaderContents(),this.element},Group.prototype.detachElement=function(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)},Group.prototype.normalizeHeight=function(){this.setHeight(this.element.clientHeight)},Group.prototype.initialize=function(t){this.initialized&&!t||(this.normalizeHeight(),this.initialized=!0)},Group.prototype.reinitialize=function(){this.initialized=!1,this.height=0,Tabulator.prototype.helpers.elVisible(this.element)&&this.initialize(!0)},Group.prototype.setHeight=function(t){this.height!=t&&(this.height=t,this.outerHeight=this.element.offsetHeight)},Group.prototype.getHeight=function(){return this.outerHeight},Group.prototype.getGroup=function(){return this},Group.prototype.reinitializeHeight=function(){},Group.prototype.calcHeight=function(){},Group.prototype.setCellHeight=function(){},Group.prototype.clearCellHeight=function(){},Group.prototype.getComponent=function(){return this.component||(this.component=new GroupComponent(this)),this.component};var GroupRows=function(t){this.table=t,this.groupIDLookups=!1,this.startOpen=[function(){return!1}],this.headerGenerator=[function(){return""}],this.groupList=[],this.allowedValues=!1,this.groups={},this.displayIndex=0};GroupRows.prototype.initialize=function(){var t=this,o=t.table.options.groupBy,e=t.table.options.groupStartOpen,r=t.table.options.groupHeader;if(this.allowedValues=t.table.options.groupValues,Array.isArray(o)&&Array.isArray(r)&&o.length>r.length&&console.warn("Error creating group headers, groupHeader array is shorter than groupBy array"),t.headerGenerator=[function(){return""}],this.startOpen=[function(){return!1}],t.table.modules.localize.bind("groups|item",function(o,e){t.headerGenerator[0]=function(t,r,i){return(void 0===t?"":t)+"<span>("+r+" "+(1===r?o:e.groups.items)+")</span>"}}),this.groupIDLookups=[],Array.isArray(o)||o)this.table.modExists("columnCalcs")&&"table"!=this.table.options.columnCalcs&&"both"!=this.table.options.columnCalcs&&this.table.modules.columnCalcs.removeCalcs();else if(this.table.modExists("columnCalcs")&&"group"!=this.table.options.columnCalcs){var i=this.table.columnManager.getRealColumns();i.forEach(function(o){o.definition.topCalc&&t.table.modules.columnCalcs.initializeTopRow(),o.definition.bottomCalc&&t.table.modules.columnCalcs.initializeBottomRow()})}Array.isArray(o)||(o=[o]),o.forEach(function(o,e){var r,i;"function"==typeof o?r=o:(i=t.table.columnManager.getColumnByField(o),r=i?function(t){return i.getFieldValue(t)}:function(t){return t[o]}),t.groupIDLookups.push({field:"function"!=typeof o&&o,func:r,values:!!t.allowedValues&&t.allowedValues[e]})}),e&&(Array.isArray(e)||(e=[e]),e.forEach(function(t){t="function"==typeof t?t:function(){return!0}}),t.startOpen=e),r&&(t.headerGenerator=Array.isArray(r)?r:[r]),this.initialized=!0},GroupRows.prototype.setDisplayIndex=function(t){this.displayIndex=t},GroupRows.prototype.getDisplayIndex=function(){return this.displayIndex},GroupRows.prototype.getRows=function(t){return this.groupIDLookups.length?(this.table.options.dataGrouping.call(this.table),this.generateGroups(t),this.table.options.dataGrouped&&this.table.options.dataGrouped.call(this.table,this.getGroups(!0)),this.updateGroupRows()):t.slice(0)},GroupRows.prototype.getGroups=function(t){var o=[];return this.groupList.forEach(function(e){o.push(t?e.getComponent():e)}),o},GroupRows.prototype.getChildGroups=function(t){var o=this,e=[];return t||(t=this),t.groupList.forEach(function(t){t.groupList.length?e=e.concat(o.getChildGroups(t)):e.push(t)}),e},GroupRows.prototype.wipe=function(){this.groupList.forEach(function(t){t.wipe()})},GroupRows.prototype.pullGroupListData=function(t){var o=this,e=[];return t.forEach(function(t){var r={};r.level=0,r.rowCount=0,r.headerContent="";var i=[];t.hasSubGroups?(i=o.pullGroupListData(t.groupList),r.level=t.level,r.rowCount=i.length-t.groupList.length,r.headerContent=t.generator(t.key,r.rowCount,t.rows,t),e.push(r),e=e.concat(i)):(r.level=t.level,r.headerContent=t.generator(t.key,t.rows.length,t.rows,t),r.rowCount=t.getRows().length,e.push(r),t.getRows().forEach(function(t){e.push(t.getData("data"))}))}),e},GroupRows.prototype.getGroupedData=function(){return this.pullGroupListData(this.groupList)},GroupRows.prototype.getRowGroup=function(t){var o=!1;return this.groupList.forEach(function(e){var r=e.getRowGroup(t);r&&(o=r)}),o},GroupRows.prototype.countGroups=function(){return this.groupList.length},GroupRows.prototype.generateGroups=function(t){var o=this,e=o.groups;o.groups={},o.groupList=[],this.allowedValues&&this.allowedValues[0]?(this.allowedValues[0].forEach(function(t){o.createGroup(t,0,e)}),t.forEach(function(t){o.assignRowToExistingGroup(t,e)})):t.forEach(function(t){o.assignRowToGroup(t,e)})},GroupRows.prototype.createGroup=function(t,o,e){var r,i=o+"_"+t;e=e||[],r=new Group(this,!1,o,t,this.groupIDLookups[0].field,this.headerGenerator[0],e[i]),this.groups[i]=r,this.groupList.push(r)},GroupRows.prototype.assignRowToExistingGroup=function(t,o){var e=this.groupIDLookups[0].func(t.getData()),r="0_"+e;this.groups[r]&&this.groups[r].addRow(t)},GroupRows.prototype.assignRowToGroup=function(t,o){var e=this.groupIDLookups[0].func(t.getData()),r=!this.groups["0_"+e];return r&&this.createGroup(e,0,o),this.groups["0_"+e].addRow(t),!r},GroupRows.prototype.reassignRowToGroup=function(t){var o=t.getGroup(),e=o.getPath(),r=this.getExpectedPath(t);e.length==r.length&&e.every(function(t,o){return t===r[o]})||(o.removeRow(t),this.assignRowToGroup(t,self.groups),this.table.rowManager.refreshActiveData("group",!1,!0))},GroupRows.prototype.getExpectedPath=function(t){var o=[],e=t.getData();return this.groupIDLookups.forEach(function(t){o.push(t.func(e))}),o},GroupRows.prototype.updateGroupRows=function(t){var o=this,e=[];if(o.groupList.forEach(function(t){e=e.concat(t.getHeadersAndRows())}),t){var r=o.table.rowManager.setDisplayRows(e,this.getDisplayIndex());!0!==r&&this.setDisplayIndex(r),o.table.rowManager.refreshActiveData("group",!0,!0)}return e},GroupRows.prototype.scrollHeaders=function(t){this.table.options.virtualDomHoz&&(t-=this.table.vdomHoz.vDomPadLeft),t+="px",this.groupList.forEach(function(o){o.scrollHeader(t)})},GroupRows.prototype.removeGroup=function(t){var o,e=t.level+"_"+t.key;this.groups[e]&&(delete this.groups[e],(o=this.groupList.indexOf(t))>-1&&this.groupList.splice(o,1))},Tabulator.prototype.registerModule("groupRows",GroupRows);
\ No newline at end of file
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var History = function History(table) {
this.table = table; //hold Tabulator object
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var History=function(t){this.table=t,this.history=[],this.index=-1};History.prototype.clear=function(){this.history=[],this.index=-1},History.prototype.action=function(t,o,e){this.history=this.history.slice(0,this.index+1),this.history.push({type:t,component:o,data:e}),this.index++},History.prototype.getHistoryUndoSize=function(){return this.index+1},History.prototype.getHistoryRedoSize=function(){return this.history.length-(this.index+1)},History.prototype.clearComponentHistory=function(t){var o=this.history.findIndex(function(o){return o.component===t});o>-1&&(this.history.splice(o,1),o<=this.index&&this.index--,this.clearComponentHistory(t))},History.prototype.undo=function(){if(this.index>-1){var t=this.history[this.index];return this.undoers[t.type].call(this,t),this.index--,this.table.options.historyUndo.call(this.table,t.type,t.component.getComponent(),t.data),!0}return console.warn("History Undo Error - No more history to undo"),!1},History.prototype.redo=function(){if(this.history.length-1>this.index){this.index++;var t=this.history[this.index];return this.redoers[t.type].call(this,t),this.table.options.historyRedo.call(this.table,t.type,t.component.getComponent(),t.data),!0}return console.warn("History Redo Error - No more history to redo"),!1},History.prototype.undoers={cellEdit:function(t){t.component.setValueProcessData(t.data.oldValue)},rowAdd:function(t){t.component.deleteActual()},rowDelete:function(t){var o=this.table.rowManager.addRowActual(t.data.data,t.data.pos,t.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(t.component,o)},rowMove:function(t){this.table.rowManager.moveRowActual(t.component,this.table.rowManager.rows[t.data.posFrom],!t.data.after),this.table.rowManager.redraw()}},History.prototype.redoers={cellEdit:function(t){t.component.setValueProcessData(t.data.newValue)},rowAdd:function(t){var o=this.table.rowManager.addRowActual(t.data.data,t.data.pos,t.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(t.component,o)},rowDelete:function(t){t.component.deleteActual()},rowMove:function(t){this.table.rowManager.moveRowActual(t.component,this.table.rowManager.rows[t.data.posTo],t.data.after),this.table.rowManager.redraw()}},History.prototype._rebindRow=function(t,o){this.history.forEach(function(e){if(e.component instanceof Row)e.component===t&&(e.component=o);else if(e.component instanceof Cell&&e.component.row===t){var i=e.component.column.getField();i&&(e.component=o.getCell(i))}})},Tabulator.prototype.registerModule("history",History);
\ No newline at end of file
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var HtmlTableImport = function HtmlTableImport(table) {
this.table = table; //hold Tabulator object
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},HtmlTableImport=function(t){this.table=t,this.fieldIndex=[],this.hasIndex=!1};HtmlTableImport.prototype.parseTable=function(){var t=this,e=t.table.element,o=t.table.options,a=(o.columns,e.getElementsByTagName("th")),n=e.getElementsByTagName("tbody")[0],l=[];t.hasIndex=!1,t.table.options.htmlImporting.call(this.table),n=n?n.getElementsByTagName("tr"):[],t._extractOptions(e,o),a.length?t._extractHeaders(a,n):t._generateBlankHeaders(a,n);for(var r=0;r<n.length;r++){var i=n[r],s=i.getElementsByTagName("td"),p={};t.hasIndex||(p[o.index]=r);for(var m=0;m<s.length;m++){var d=s[m];void 0!==this.fieldIndex[m]&&(p[this.fieldIndex[m]]=d.innerHTML)}l.push(p)}var f=document.createElement("div"),b=e.attributes;for(var m in b)"object"==_typeof(b[m])&&f.setAttribute(b[m].name,b[m].value);e.parentNode.replaceChild(f,e),o.data=l,t.table.options.htmlImported.call(this.table),this.table.element=f},HtmlTableImport.prototype._extractOptions=function(t,e,o){var a=t.attributes,n=o?Object.assign([],o):Object.keys(e),l={};n.forEach(function(t){l[t.toLowerCase()]=t});for(var r in a){var i,s=a[r];s&&"object"==(void 0===s?"undefined":_typeof(s))&&s.name&&0===s.name.indexOf("tabulator-")&&(i=s.name.replace("tabulator-",""),void 0!==l[i]&&(e[l[i]]=this._attribValue(s.value)))}},HtmlTableImport.prototype._attribValue=function(t){return"true"===t||"false"!==t&&t},HtmlTableImport.prototype._findCol=function(t){return this.table.options.columns.find(function(e){return e.title===t})||!1},HtmlTableImport.prototype._extractHeaders=function(t,e){for(var o=0;o<t.length;o++){var a,n=t[o],l=!1,r=this._findCol(n.textContent);r?l=!0:r={title:n.textContent.trim()},r.field||(r.field=n.textContent.trim().toLowerCase().replace(" ","_")),a=n.getAttribute("width"),a&&!r.width&&(r.width=a),n.attributes,this._extractOptions(n,r,Column.prototype.defaultOptionList),this.fieldIndex[o]=r.field,r.field==this.table.options.index&&(this.hasIndex=!0),l||this.table.options.columns.push(r)}},HtmlTableImport.prototype._generateBlankHeaders=function(t,e){for(var o=0;o<t.length;o++){var a=t[o],n={title:"",field:"col"+o};this.fieldIndex[o]=n.field;var l=a.getAttribute("width");l&&(n.width=l),this.table.options.columns.push(n)}},Tabulator.prototype.registerModule("htmlTableImport",HtmlTableImport);
\ No newline at end of file
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var Keybindings = function Keybindings(table) {
this.table = table; //hold Tabulator object
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Keybindings=function(t){this.table=t,this.watchKeys=null,this.pressedKeys=null,this.keyupBinding=!1,this.keydownBinding=!1};Keybindings.prototype.initialize=function(){var t=this.table.options.keybindings,e={};if(this.watchKeys={},this.pressedKeys=[],!1!==t){for(var i in this.bindings)e[i]=this.bindings[i];if(Object.keys(t).length)for(var n in t)e[n]=t[n];this.mapBindings(e),this.bindEvents()}},Keybindings.prototype.mapBindings=function(t){var e=this,i=this;for(var n in t)!function(n){e.actions[n]?t[n]&&("object"!==_typeof(t[n])&&(t[n]=[t[n]]),t[n].forEach(function(t){i.mapBinding(n,t)})):console.warn("Key Binding Error - no such action:",n)}(n)},Keybindings.prototype.mapBinding=function(t,e){var i=this,n={action:this.actions[t],keys:[],ctrl:!1,shift:!1,meta:!1};e.toString().toLowerCase().split(" ").join("").split("+").forEach(function(t){switch(t){case"ctrl":n.ctrl=!0;break;case"shift":n.shift=!0;break;case"meta":n.meta=!0;break;default:t=parseInt(t),n.keys.push(t),i.watchKeys[t]||(i.watchKeys[t]=[]),i.watchKeys[t].push(n)}})},Keybindings.prototype.bindEvents=function(){var t=this;this.keyupBinding=function(e){var i=e.keyCode,n=t.watchKeys[i];n&&(t.pressedKeys.push(i),n.forEach(function(i){t.checkBinding(e,i)}))},this.keydownBinding=function(e){var i=e.keyCode;if(t.watchKeys[i]){var n=t.pressedKeys.indexOf(i);n>-1&&t.pressedKeys.splice(n,1)}},this.table.element.addEventListener("keydown",this.keyupBinding),this.table.element.addEventListener("keyup",this.keydownBinding)},Keybindings.prototype.clearBindings=function(){this.keyupBinding&&this.table.element.removeEventListener("keydown",this.keyupBinding),this.keydownBinding&&this.table.element.removeEventListener("keyup",this.keydownBinding)},Keybindings.prototype.checkBinding=function(t,e){var i=this,n=!0;return t.ctrlKey==e.ctrl&&t.shiftKey==e.shift&&t.metaKey==e.meta&&(e.keys.forEach(function(t){-1==i.pressedKeys.indexOf(t)&&(n=!1)}),n&&e.action.call(i,t),!0)},Keybindings.prototype.bindings={navPrev:"shift + 9",navNext:9,navUp:38,navDown:40,scrollPageUp:33,scrollPageDown:34,scrollToStart:36,scrollToEnd:35,undo:"ctrl + 90",redo:"ctrl + 89",copyToClipboard:"ctrl + 67"},Keybindings.prototype.actions={keyBlock:function(t){t.stopPropagation(),t.preventDefault()},scrollPageUp:function(t){var e=this.table.rowManager,i=e.scrollTop-e.height;e.element.scrollHeight;t.preventDefault(),e.displayRowsCount&&(i>=0?e.element.scrollTop=i:e.scrollToRow(e.getDisplayRows()[0])),this.table.element.focus()},scrollPageDown:function(t){var e=this.table.rowManager,i=e.scrollTop+e.height,n=e.element.scrollHeight;t.preventDefault(),e.displayRowsCount&&(i<=n?e.element.scrollTop=i:e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1])),this.table.element.focus()},scrollToStart:function(t){var e=this.table.rowManager;t.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[0]),this.table.element.focus()},scrollToEnd:function(t){var e=this.table.rowManager;t.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1]),this.table.element.focus()},navPrev:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().prev())},navNext:function(t){var e,i=!1,n=this.table.options.tabEndNewRow;this.table.modExists("edit")&&(i=this.table.modules.edit.currentCell)&&(t.preventDefault(),e=i.nav(),e.next()||n&&(i.getElement().firstChild.blur(),n=!0===n?this.table.addRow({}):"function"==typeof n?this.table.addRow(n(i.row.getComponent())):this.table.addRow(Object.assign({},n)),n.then(function(){setTimeout(function(){e.next()})})))},navLeft:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().left())},navRight:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().right())},navUp:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().up())},navDown:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().down())},undo:function(t){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(t.preventDefault(),this.table.modules.history.undo()))},redo:function(t){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(t.preventDefault(),this.table.modules.history.redo()))},copyToClipboard:function(t){this.table.modules.edit.currentCell||this.table.modExists("clipboard",!0)&&this.table.modules.clipboard.copy(!1,!0)}},Tabulator.prototype.registerModule("keybindings",Keybindings);
\ No newline at end of file
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var Menu = function Menu(table) {
this.table = table; //hold Tabulator object
- this.menuEl = false;
+ this.menuElements = [];
this.blurEvent = this.hideMenu.bind(this);
this.escEvent = this.escMenu.bind(this);
this.nestedMenuBlock = false;
+ this.positionReversedX = false;
};
Menu.prototype.initializeColumnHeader = function (column) {
headerMenuEl.innerHTML = "⋮";
headerMenuEl.addEventListener("click", function (e) {
- var menu = typeof column.definition.headerMenu == "function" ? column.definition.headerMenu(column.getComponent(), e) : column.definition.headerMenu;
e.stopPropagation();
e.preventDefault();
- _this.loadMenu(e, column, menu);
+ _this.LoadMenuEvent(column, column.definition.headerMenu, e);
});
column.titleElement.insertBefore(headerMenuEl, column.titleElement.firstChild);
};
Menu.prototype.LoadMenuEvent = function (component, menu, e) {
- menu = typeof menu == "function" ? menu(component.getComponent(), e) : menu;
+ menu = typeof menu == "function" ? menu.call(this.table, component.getComponent(), e) : menu;
// if(component instanceof Cell){
// e.stopImmediatePropagation();
Menu.prototype.initializeCell = function (cell) {
if (cell.column.definition.contextMenu) {
- cell.getElement().addEventListener("contextmenu", this.LoadMenuEvent.bind(this, cell, cell.column.definition.contextMenu));
+ cell.getElement(true).addEventListener("contextmenu", this.LoadMenuEvent.bind(this, cell, cell.column.definition.contextMenu));
this.tapHold(cell, cell.column.definition.contextMenu);
}
if (cell.column.definition.clickMenu) {
- cell.getElement().addEventListener("click", this.LoadMenuEvent.bind(this, cell, cell.column.definition.clickMenu));
+ cell.getElement(true).addEventListener("click", this.LoadMenuEvent.bind(this, cell, cell.column.definition.clickMenu));
}
};
}
};
-Menu.prototype.loadMenu = function (e, component, menu) {
+Menu.prototype.loadMenu = function (e, component, menu, parentEl) {
var _this3 = this;
- var docHeight = Math.max(document.body.offsetHeight, window.innerHeight),
- touch = !(e instanceof MouseEvent);
+ var touch = !(e instanceof MouseEvent);
+
+ var menuEl = document.createElement("div");
+ menuEl.classList.add("tabulator-menu");
if (!touch) {
e.preventDefault();
return;
}
- if (this.nestedMenuBlock) {
- //abort if child menu already open
- if (this.isOpen()) {
- return;
+ if (!parentEl) {
+ if (this.nestedMenuBlock) {
+ //abort if child menu already open
+ if (this.isOpen()) {
+ return;
+ }
+ } else {
+ this.nestedMenuBlock = setTimeout(function () {
+ _this3.nestedMenuBlock = false;
+ }, 100);
}
- } else {
- this.nestedMenuBlock = setTimeout(function () {
- _this3.nestedMenuBlock = false;
- }, 100);
- }
-
- this.hideMenu();
- this.menuEl = document.createElement("div");
- this.menuEl.classList.add("tabulator-menu");
+ this.hideMenu();
+ this.menuElements = [];
+ }
menu.forEach(function (item) {
- var itemEl = document.createElement("div");
- var label = item.label;
- var disabled = item.disabled;
+ var itemEl = document.createElement("div"),
+ label = item.label,
+ disabled = item.disabled;
if (item.separator) {
itemEl.classList.add("tabulator-menu-separator");
itemEl.classList.add("tabulator-menu-item");
if (typeof label == "function") {
- label = label(component.getComponent());
+ label = label.call(_this3.table, component.getComponent());
}
if (label instanceof Node) {
}
if (typeof disabled == "function") {
- disabled = disabled(component.getComponent());
+ disabled = disabled.call(_this3.table, component.getComponent());
}
if (disabled) {
e.stopPropagation();
});
} else {
- itemEl.addEventListener("click", function (e) {
- _this3.hideMenu();
- item.action(e, component.getComponent());
- });
+ if (item.menu && item.menu.length) {
+ itemEl.addEventListener("click", function (e) {
+ e.stopPropagation();
+ _this3.hideOldSubMenus(menuEl);
+ _this3.loadMenu(e, component, item.menu, itemEl);
+ });
+ } else {
+ if (item.action) {
+ itemEl.addEventListener("click", function (e) {
+ item.action(e, component.getComponent());
+ });
+ }
+ }
+ }
+
+ if (item.menu && item.menu.length) {
+ itemEl.classList.add("tabulator-menu-item-submenu");
}
}
- _this3.menuEl.appendChild(itemEl);
+ menuEl.appendChild(itemEl);
});
- this.menuEl.style.top = (touch ? e.touches[0].pageY : e.pageY) + "px";
- this.menuEl.style.left = (touch ? e.touches[0].pageX : e.pageX) + "px";
+ menuEl.addEventListener("click", function (e) {
+ _this3.hideMenu();
+ });
+
+ this.menuElements.push(menuEl);
+ this.positionMenu(menuEl, parentEl, touch, e);
+};
+
+Menu.prototype.hideOldSubMenus = function (menuEl) {
+ var index = this.menuElements.indexOf(menuEl);
+
+ if (index > -1) {
+ for (var i = this.menuElements.length - 1; i > index; i--) {
+ var el = this.menuElements[i];
+
+ if (el.parentNode) {
+ el.parentNode.removeChild(el);
+ }
+
+ this.menuElements.pop();
+ }
+ }
+};
+
+Menu.prototype.positionMenu = function (element, parentEl, touch, e) {
+ var _this4 = this;
+
+ var docHeight = Math.max(document.body.offsetHeight, window.innerHeight),
+ x,
+ y,
+ parentOffset;
+
+ if (!parentEl) {
+ x = touch ? e.touches[0].pageX : e.pageX;
+ y = touch ? e.touches[0].pageY : e.pageY;
+
+ this.positionReversedX = false;
+ } else {
+ parentOffset = Tabulator.prototype.helpers.elOffset(parentEl);
+ x = parentOffset.left + parentEl.offsetWidth;
+ y = parentOffset.top - 1;
+ }
+
+ element.style.top = y + "px";
+ element.style.left = x + "px";
setTimeout(function () {
- _this3.table.rowManager.element.addEventListener("scroll", _this3.blurEvent);
- document.body.addEventListener("click", _this3.blurEvent);
- document.body.addEventListener("contextmenu", _this3.blurEvent);
- document.body.addEventListener("keydown", _this3.escEvent);
+ _this4.table.rowManager.element.addEventListener("scroll", _this4.blurEvent);
+ document.body.addEventListener("click", _this4.blurEvent);
+ document.body.addEventListener("contextmenu", _this4.blurEvent);
+ window.addEventListener("resize", _this4.blurEvent);
+ document.body.addEventListener("keydown", _this4.escEvent);
}, 100);
- document.body.appendChild(this.menuEl);
+ document.body.appendChild(element);
- //move menu to start on right edge if it is too close to the edge of the screen
- if (e.pageX + this.menuEl.offsetWidth >= document.body.offsetWidth) {
- this.menuEl.style.left = "";
- this.menuEl.style.right = document.body.offsetWidth - e.pageX + "px";
+ //move menu to start on bottom edge if it is too close to the edge of the screen
+ if (y + element.offsetHeight >= docHeight) {
+ element.style.top = "";
+
+ if (parentEl) {
+ element.style.bottom = docHeight - parentOffset.top - parentEl.offsetHeight - 1 + "px";
+ } else {
+ element.style.bottom = docHeight - y + "px";
+ }
}
- //move menu to start on bottom edge if it is too close to the edge of the screen
- if (e.pageY + this.menuEl.offsetHeight >= docHeight) {
- this.menuEl.style.top = "";
- this.menuEl.style.bottom = docHeight - e.pageY + "px";
+ //move menu to start on right edge if it is too close to the edge of the screen
+ if (x + element.offsetWidth >= document.body.offsetWidth || this.positionReversedX) {
+ element.style.left = "";
+
+ if (parentEl) {
+ element.style.right = document.documentElement.offsetWidth - parentOffset.left + "px";
+ } else {
+ element.style.right = document.documentElement.offsetWidth - x + "px";
+ }
+
+ this.positionReversedX = true;
}
};
Menu.prototype.isOpen = function () {
- return !!this.menuEl.parentNode;
+ return !!this.menuElements.length;
};
Menu.prototype.escMenu = function (e) {
};
Menu.prototype.hideMenu = function () {
- if (this.menuEl.parentNode) {
- this.menuEl.parentNode.removeChild(this.menuEl);
- }
-
- if (this.escEvent) {
- document.body.removeEventListener("keydown", this.escEvent);
- }
+ this.menuElements.forEach(function (menuEl) {
+ if (menuEl.parentNode) {
+ menuEl.parentNode.removeChild(menuEl);
+ }
+ });
- if (this.blurEvent) {
- document.body.removeEventListener("click", this.blurEvent);
- document.body.removeEventListener("contextmenu", this.blurEvent);
- this.table.rowManager.element.removeEventListener("scroll", this.blurEvent);
- }
+ document.body.removeEventListener("keydown", this.escEvent);
+ document.body.removeEventListener("click", this.blurEvent);
+ document.body.removeEventListener("contextmenu", this.blurEvent);
+ window.removeEventListener("resize", this.blurEvent);
+ this.table.rowManager.element.removeEventListener("scroll", this.blurEvent);
};
//default accessors
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
-var Menu=function(e){this.table=e,this.menuEl=!1,this.blurEvent=this.hideMenu.bind(this),this.escEvent=this.escMenu.bind(this),this.nestedMenuBlock=!1};Menu.prototype.initializeColumnHeader=function(e){var t,n=this;e.definition.headerContextMenu&&(e.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,e,e.definition.headerContextMenu)),this.tapHold(e,e.definition.headerContextMenu)),e.definition.headerMenu&&(t=document.createElement("span"),t.classList.add("tabulator-header-menu-button"),t.innerHTML="⋮",t.addEventListener("click",function(t){var i="function"==typeof e.definition.headerMenu?e.definition.headerMenu(e.getComponent(),t):e.definition.headerMenu;t.stopPropagation(),t.preventDefault(),n.loadMenu(t,e,i)}),e.titleElement.insertBefore(t,e.titleElement.firstChild))},Menu.prototype.LoadMenuEvent=function(e,t,n){t="function"==typeof t?t(e.getComponent(),n):t,this.loadMenu(n,e,t)},Menu.prototype.tapHold=function(e,t){var n=this,i=e.getElement(),o=null,u=!1;i.addEventListener("touchstart",function(i){clearTimeout(o),u=!1,o=setTimeout(function(){clearTimeout(o),o=null,u=!0,n.LoadMenuEvent(e,t,i)},1e3)},{passive:!0}),i.addEventListener("touchend",function(e){clearTimeout(o),o=null,u&&e.preventDefault()})},Menu.prototype.initializeCell=function(e){e.column.definition.contextMenu&&(e.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,e,e.column.definition.contextMenu)),this.tapHold(e,e.column.definition.contextMenu)),e.column.definition.clickMenu&&e.getElement().addEventListener("click",this.LoadMenuEvent.bind(this,e,e.column.definition.clickMenu))},Menu.prototype.initializeRow=function(e){this.table.options.rowContextMenu&&(e.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,e,this.table.options.rowContextMenu)),this.tapHold(e,this.table.options.rowContextMenu)),this.table.options.rowClickMenu&&e.getElement().addEventListener("click",this.LoadMenuEvent.bind(this,e,this.table.options.rowClickMenu))},Menu.prototype.initializeGroup=function(e){this.table.options.groupContextMenu&&(e.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,e,this.table.options.groupContextMenu)),this.tapHold(e,this.table.options.groupContextMenu)),this.table.options.groupClickMenu&&e.getElement().addEventListener("click",this.LoadMenuEvent.bind(this,e,this.table.options.groupClickMenu))},Menu.prototype.loadMenu=function(e,t,n){var i=this,o=Math.max(document.body.offsetHeight,window.innerHeight),u=!(e instanceof MouseEvent);if(u||e.preventDefault(),n&&n.length){if(this.nestedMenuBlock){if(this.isOpen())return}else this.nestedMenuBlock=setTimeout(function(){i.nestedMenuBlock=!1},100);this.hideMenu(),this.menuEl=document.createElement("div"),this.menuEl.classList.add("tabulator-menu"),n.forEach(function(e){var n=document.createElement("div"),o=e.label,u=e.disabled;e.separator?n.classList.add("tabulator-menu-separator"):(n.classList.add("tabulator-menu-item"),"function"==typeof o&&(o=o(t.getComponent())),o instanceof Node?n.appendChild(o):n.innerHTML=o,"function"==typeof u&&(u=u(t.getComponent())),u?(n.classList.add("tabulator-menu-item-disabled"),n.addEventListener("click",function(e){e.stopPropagation()})):n.addEventListener("click",function(n){i.hideMenu(),e.action(n,t.getComponent())})),i.menuEl.appendChild(n)}),this.menuEl.style.top=(u?e.touches[0].pageY:e.pageY)+"px",this.menuEl.style.left=(u?e.touches[0].pageX:e.pageX)+"px",setTimeout(function(){i.table.rowManager.element.addEventListener("scroll",i.blurEvent),document.body.addEventListener("click",i.blurEvent),document.body.addEventListener("contextmenu",i.blurEvent),document.body.addEventListener("keydown",i.escEvent)},100),document.body.appendChild(this.menuEl),e.pageX+this.menuEl.offsetWidth>=document.body.offsetWidth&&(this.menuEl.style.left="",this.menuEl.style.right=document.body.offsetWidth-e.pageX+"px"),e.pageY+this.menuEl.offsetHeight>=o&&(this.menuEl.style.top="",this.menuEl.style.bottom=o-e.pageY+"px")}},Menu.prototype.isOpen=function(){return!!this.menuEl.parentNode},Menu.prototype.escMenu=function(e){27==e.keyCode&&this.hideMenu()},Menu.prototype.hideMenu=function(){this.menuEl.parentNode&&this.menuEl.parentNode.removeChild(this.menuEl),this.escEvent&&document.body.removeEventListener("keydown",this.escEvent),this.blurEvent&&(document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent))},Menu.prototype.menus={},Tabulator.prototype.registerModule("menu",Menu);
\ No newline at end of file
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
+var Menu=function(e){this.table=e,this.menuElements=[],this.blurEvent=this.hideMenu.bind(this),this.escEvent=this.escMenu.bind(this),this.nestedMenuBlock=!1,this.positionReversedX=!1};Menu.prototype.initializeColumnHeader=function(e){var t,n=this;e.definition.headerContextMenu&&(e.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,e,e.definition.headerContextMenu)),this.tapHold(e,e.definition.headerContextMenu)),e.definition.headerMenu&&(t=document.createElement("span"),t.classList.add("tabulator-header-menu-button"),t.innerHTML="⋮",t.addEventListener("click",function(t){t.stopPropagation(),t.preventDefault(),n.LoadMenuEvent(e,e.definition.headerMenu,t)}),e.titleElement.insertBefore(t,e.titleElement.firstChild))},Menu.prototype.LoadMenuEvent=function(e,t,n){t="function"==typeof t?t.call(this.table,e.getComponent(),n):t,this.loadMenu(n,e,t)},Menu.prototype.tapHold=function(e,t){var n=this,i=e.getElement(),o=null,s=!1;i.addEventListener("touchstart",function(i){clearTimeout(o),s=!1,o=setTimeout(function(){clearTimeout(o),o=null,s=!0,n.LoadMenuEvent(e,t,i)},1e3)},{passive:!0}),i.addEventListener("touchend",function(e){clearTimeout(o),o=null,s&&e.preventDefault()})},Menu.prototype.initializeCell=function(e){e.column.definition.contextMenu&&(e.getElement(!0).addEventListener("contextmenu",this.LoadMenuEvent.bind(this,e,e.column.definition.contextMenu)),this.tapHold(e,e.column.definition.contextMenu)),e.column.definition.clickMenu&&e.getElement(!0).addEventListener("click",this.LoadMenuEvent.bind(this,e,e.column.definition.clickMenu))},Menu.prototype.initializeRow=function(e){this.table.options.rowContextMenu&&(e.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,e,this.table.options.rowContextMenu)),this.tapHold(e,this.table.options.rowContextMenu)),this.table.options.rowClickMenu&&e.getElement().addEventListener("click",this.LoadMenuEvent.bind(this,e,this.table.options.rowClickMenu))},Menu.prototype.initializeGroup=function(e){this.table.options.groupContextMenu&&(e.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,e,this.table.options.groupContextMenu)),this.tapHold(e,this.table.options.groupContextMenu)),this.table.options.groupClickMenu&&e.getElement().addEventListener("click",this.LoadMenuEvent.bind(this,e,this.table.options.groupClickMenu))},Menu.prototype.loadMenu=function(e,t,n,i){var o=this,s=!(e instanceof MouseEvent),u=document.createElement("div");if(u.classList.add("tabulator-menu"),s||e.preventDefault(),n&&n.length){if(!i){if(this.nestedMenuBlock){if(this.isOpen())return}else this.nestedMenuBlock=setTimeout(function(){o.nestedMenuBlock=!1},100);this.hideMenu(),this.menuElements=[]}n.forEach(function(e){var n=document.createElement("div"),i=e.label,s=e.disabled;e.separator?n.classList.add("tabulator-menu-separator"):(n.classList.add("tabulator-menu-item"),"function"==typeof i&&(i=i.call(o.table,t.getComponent())),i instanceof Node?n.appendChild(i):n.innerHTML=i,"function"==typeof s&&(s=s.call(o.table,t.getComponent())),s?(n.classList.add("tabulator-menu-item-disabled"),n.addEventListener("click",function(e){e.stopPropagation()})):e.menu&&e.menu.length?n.addEventListener("click",function(i){i.stopPropagation(),o.hideOldSubMenus(u),o.loadMenu(i,t,e.menu,n)}):e.action&&n.addEventListener("click",function(n){e.action(n,t.getComponent())}),e.menu&&e.menu.length&&n.classList.add("tabulator-menu-item-submenu")),u.appendChild(n)}),u.addEventListener("click",function(e){o.hideMenu()}),this.menuElements.push(u),this.positionMenu(u,i,s,e)}},Menu.prototype.hideOldSubMenus=function(e){var t=this.menuElements.indexOf(e);if(t>-1)for(var n=this.menuElements.length-1;n>t;n--){var i=this.menuElements[n];i.parentNode&&i.parentNode.removeChild(i),this.menuElements.pop()}},Menu.prototype.positionMenu=function(e,t,n,i){var o,s,u,d=this,l=Math.max(document.body.offsetHeight,window.innerHeight);t?(u=Tabulator.prototype.helpers.elOffset(t),o=u.left+t.offsetWidth,s=u.top-1):(o=n?i.touches[0].pageX:i.pageX,s=n?i.touches[0].pageY:i.pageY,this.positionReversedX=!1),e.style.top=s+"px",e.style.left=o+"px",setTimeout(function(){d.table.rowManager.element.addEventListener("scroll",d.blurEvent),document.body.addEventListener("click",d.blurEvent),document.body.addEventListener("contextmenu",d.blurEvent),window.addEventListener("resize",d.blurEvent),document.body.addEventListener("keydown",d.escEvent)},100),document.body.appendChild(e),s+e.offsetHeight>=l&&(e.style.top="",e.style.bottom=t?l-u.top-t.offsetHeight-1+"px":l-s+"px"),(o+e.offsetWidth>=document.body.offsetWidth||this.positionReversedX)&&(e.style.left="",e.style.right=t?document.documentElement.offsetWidth-u.left+"px":document.documentElement.offsetWidth-o+"px",this.positionReversedX=!0)},Menu.prototype.isOpen=function(){return!!this.menuElements.length},Menu.prototype.escMenu=function(e){27==e.keyCode&&this.hideMenu()},Menu.prototype.hideMenu=function(){this.menuElements.forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)}),document.body.removeEventListener("keydown",this.escEvent),document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),window.removeEventListener("resize",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent)},Menu.prototype.menus={},Tabulator.prototype.registerModule("menu",Menu);
\ No newline at end of file
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var MoveColumns = function MoveColumns(table) {
this.table = table; //hold Tabulator object
if (after) {
column.getCells().forEach(function (cell, i) {
- var cellEl = cell.getElement();
+ var cellEl = cell.getElement(true);
cellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl.nextSibling);
});
} else {
column.getCells().forEach(function (cell, i) {
- var cellEl = cell.getElement();
+ var cellEl = cell.getElement(true);
cellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl);
});
}
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
-var MoveColumns=function(e){this.table=e,this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=250,this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.startX=0,this.autoScrollMargin=40,this.autoScrollStep=5,this.autoScrollTimeout=!1,this.touchMove=!1,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this)};MoveColumns.prototype.createPlaceholderElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-col"),e.classList.add("tabulator-col-placeholder"),e},MoveColumns.prototype.initializeColumn=function(e){var t,o=this,n={};e.modules.frozen||(t=e.getElement(),n.mousemove=function(n){e.parent===o.moving.parent&&((o.touchMove?n.touches[0].pageX:n.pageX)-Tabulator.prototype.helpers.elOffset(t).left+o.table.columnManager.element.scrollLeft>e.getWidth()/2?o.toCol===e&&o.toColAfter||(t.parentNode.insertBefore(o.placeholderElement,t.nextSibling),o.moveColumn(e,!0)):(o.toCol!==e||o.toColAfter)&&(t.parentNode.insertBefore(o.placeholderElement,t),o.moveColumn(e,!1)))}.bind(o),t.addEventListener("mousedown",function(t){o.touchMove=!1,1===t.which&&(o.checkTimeout=setTimeout(function(){o.startMove(t,e)},o.checkPeriod))}),t.addEventListener("mouseup",function(e){1===e.which&&o.checkTimeout&&clearTimeout(o.checkTimeout)}),o.bindTouchEvents(e)),e.modules.moveColumn=n},MoveColumns.prototype.bindTouchEvents=function(e){var t,o,n,l,i,s,m,r=this,u=e.getElement(),h=!1;u.addEventListener("touchstart",function(u){r.checkTimeout=setTimeout(function(){r.touchMove=!0,t=e,o=e.nextColumn(),l=o?o.getWidth()/2:0,n=e.prevColumn(),i=n?n.getWidth()/2:0,s=0,m=0,h=!1,r.startMove(u,e)},r.checkPeriod)},{passive:!0}),u.addEventListener("touchmove",function(u){var a,c;r.moving&&(r.moveHover(u),h||(h=u.touches[0].pageX),a=u.touches[0].pageX-h,a>0?o&&a-s>l&&(c=o)!==e&&(h=u.touches[0].pageX,c.getElement().parentNode.insertBefore(r.placeholderElement,c.getElement().nextSibling),r.moveColumn(c,!0)):n&&-a-m>i&&(c=n)!==e&&(h=u.touches[0].pageX,c.getElement().parentNode.insertBefore(r.placeholderElement,c.getElement()),r.moveColumn(c,!1)),c&&(t=c,o=c.nextColumn(),s=l,l=o?o.getWidth()/2:0,n=c.prevColumn(),m=i,i=n?n.getWidth()/2:0))},{passive:!0}),u.addEventListener("touchend",function(e){r.checkTimeout&&clearTimeout(r.checkTimeout),r.moving&&r.endMove(e)})},MoveColumns.prototype.startMove=function(e,t){var o=t.getElement();this.moving=t,this.startX=(this.touchMove?e.touches[0].pageX:e.pageX)-Tabulator.prototype.helpers.elOffset(o).left,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",o.parentNode.insertBefore(this.placeholderElement,o),o.parentNode.removeChild(o),this.hoverElement=o.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.table.columnManager.getElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.bottom="0",this.touchMove||(this._bindMouseMove(),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove)),this.moveHover(e)},MoveColumns.prototype._bindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach(function(e){e.modules.moveColumn.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveColumn.mousemove)})},MoveColumns.prototype._unbindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach(function(e){e.modules.moveColumn.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveColumn.mousemove)})},MoveColumns.prototype.moveColumn=function(e,t){var o=this.moving.getCells();this.toCol=e,this.toColAfter=t,t?e.getCells().forEach(function(e,t){var n=e.getElement();n.parentNode.insertBefore(o[t].getElement(),n.nextSibling)}):e.getCells().forEach(function(e,t){var n=e.getElement();n.parentNode.insertBefore(o[t].getElement(),n)})},MoveColumns.prototype.endMove=function(e){(1===e.which||this.touchMove)&&(this._unbindMouseMove(),this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toCol&&this.table.columnManager.moveColumnActual(this.moving,this.toCol,this.toColAfter),this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.touchMove||(document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove)))},MoveColumns.prototype.moveHover=function(e){var t,o=this,n=o.table.columnManager.getElement(),l=n.scrollLeft,i=(o.touchMove?e.touches[0].pageX:e.pageX)-Tabulator.prototype.helpers.elOffset(n).left+l;o.hoverElement.style.left=i-o.startX+"px",i-l<o.autoScrollMargin&&(o.autoScrollTimeout||(o.autoScrollTimeout=setTimeout(function(){t=Math.max(0,l-5),o.table.rowManager.getElement().scrollLeft=t,o.autoScrollTimeout=!1},1))),l+n.clientWidth-i<o.autoScrollMargin&&(o.autoScrollTimeout||(o.autoScrollTimeout=setTimeout(function(){t=Math.min(n.clientWidth,l+5),o.table.rowManager.getElement().scrollLeft=t,o.autoScrollTimeout=!1},1)))},Tabulator.prototype.registerModule("moveColumn",MoveColumns);
\ No newline at end of file
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
+var MoveColumns=function(e){this.table=e,this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=250,this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.startX=0,this.autoScrollMargin=40,this.autoScrollStep=5,this.autoScrollTimeout=!1,this.touchMove=!1,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this)};MoveColumns.prototype.createPlaceholderElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-col"),e.classList.add("tabulator-col-placeholder"),e},MoveColumns.prototype.initializeColumn=function(e){var t,o=this,n={};e.modules.frozen||(t=e.getElement(),n.mousemove=function(n){e.parent===o.moving.parent&&((o.touchMove?n.touches[0].pageX:n.pageX)-Tabulator.prototype.helpers.elOffset(t).left+o.table.columnManager.element.scrollLeft>e.getWidth()/2?o.toCol===e&&o.toColAfter||(t.parentNode.insertBefore(o.placeholderElement,t.nextSibling),o.moveColumn(e,!0)):(o.toCol!==e||o.toColAfter)&&(t.parentNode.insertBefore(o.placeholderElement,t),o.moveColumn(e,!1)))}.bind(o),t.addEventListener("mousedown",function(t){o.touchMove=!1,1===t.which&&(o.checkTimeout=setTimeout(function(){o.startMove(t,e)},o.checkPeriod))}),t.addEventListener("mouseup",function(e){1===e.which&&o.checkTimeout&&clearTimeout(o.checkTimeout)}),o.bindTouchEvents(e)),e.modules.moveColumn=n},MoveColumns.prototype.bindTouchEvents=function(e){var t,o,n,l,i,s,m,r=this,u=e.getElement(),h=!1;u.addEventListener("touchstart",function(u){r.checkTimeout=setTimeout(function(){r.touchMove=!0,t=e,o=e.nextColumn(),l=o?o.getWidth()/2:0,n=e.prevColumn(),i=n?n.getWidth()/2:0,s=0,m=0,h=!1,r.startMove(u,e)},r.checkPeriod)},{passive:!0}),u.addEventListener("touchmove",function(u){var a,c;r.moving&&(r.moveHover(u),h||(h=u.touches[0].pageX),a=u.touches[0].pageX-h,a>0?o&&a-s>l&&(c=o)!==e&&(h=u.touches[0].pageX,c.getElement().parentNode.insertBefore(r.placeholderElement,c.getElement().nextSibling),r.moveColumn(c,!0)):n&&-a-m>i&&(c=n)!==e&&(h=u.touches[0].pageX,c.getElement().parentNode.insertBefore(r.placeholderElement,c.getElement()),r.moveColumn(c,!1)),c&&(t=c,o=c.nextColumn(),s=l,l=o?o.getWidth()/2:0,n=c.prevColumn(),m=i,i=n?n.getWidth()/2:0))},{passive:!0}),u.addEventListener("touchend",function(e){r.checkTimeout&&clearTimeout(r.checkTimeout),r.moving&&r.endMove(e)})},MoveColumns.prototype.startMove=function(e,t){var o=t.getElement();this.moving=t,this.startX=(this.touchMove?e.touches[0].pageX:e.pageX)-Tabulator.prototype.helpers.elOffset(o).left,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",o.parentNode.insertBefore(this.placeholderElement,o),o.parentNode.removeChild(o),this.hoverElement=o.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.table.columnManager.getElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.bottom="0",this.touchMove||(this._bindMouseMove(),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove)),this.moveHover(e)},MoveColumns.prototype._bindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach(function(e){e.modules.moveColumn.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveColumn.mousemove)})},MoveColumns.prototype._unbindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach(function(e){e.modules.moveColumn.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveColumn.mousemove)})},MoveColumns.prototype.moveColumn=function(e,t){var o=this.moving.getCells();this.toCol=e,this.toColAfter=t,t?e.getCells().forEach(function(e,t){var n=e.getElement(!0);n.parentNode.insertBefore(o[t].getElement(),n.nextSibling)}):e.getCells().forEach(function(e,t){var n=e.getElement(!0);n.parentNode.insertBefore(o[t].getElement(),n)})},MoveColumns.prototype.endMove=function(e){(1===e.which||this.touchMove)&&(this._unbindMouseMove(),this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toCol&&this.table.columnManager.moveColumnActual(this.moving,this.toCol,this.toColAfter),this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.touchMove||(document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove)))},MoveColumns.prototype.moveHover=function(e){var t,o=this,n=o.table.columnManager.getElement(),l=n.scrollLeft,i=(o.touchMove?e.touches[0].pageX:e.pageX)-Tabulator.prototype.helpers.elOffset(n).left+l;o.hoverElement.style.left=i-o.startX+"px",i-l<o.autoScrollMargin&&(o.autoScrollTimeout||(o.autoScrollTimeout=setTimeout(function(){t=Math.max(0,l-5),o.table.rowManager.getElement().scrollLeft=t,o.autoScrollTimeout=!1},1))),l+n.clientWidth-i<o.autoScrollMargin&&(o.autoScrollTimeout||(o.autoScrollTimeout=setTimeout(function(){t=Math.min(n.clientWidth,l+5),o.table.rowManager.getElement().scrollLeft=t,o.autoScrollTimeout=!1},1)))},Tabulator.prototype.registerModule("moveColumn",MoveColumns);
\ No newline at end of file
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var MoveRows = function MoveRows(table) {
//same table drag drop
config.mousemove = function (e) {
- if (e.pageY - Tabulator.prototype.helpers.elOffset(row.element).top + self.table.rowManager.element.scrollTop > row.getHeight() / 2) {
+ var rowEl = row.getElement();
+
+ if (e.pageY - Tabulator.prototype.helpers.elOffset(rowEl).top + self.table.rowManager.element.scrollTop > row.getHeight() / 2) {
if (self.toRow !== row || !self.toRowAfter) {
- var rowEl = row.getElement();
rowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling);
self.moveRow(row, true);
}
} else {
if (self.toRow !== row || self.toRowAfter) {
- var rowEl = row.getElement();
rowEl.parentNode.insertBefore(self.placeholderElement, rowEl);
self.moveRow(row, false);
}
MoveRows.prototype.initializeCell = function (cell) {
var self = this,
- cellEl = cell.getElement();
+ cellEl = cell.getElement(true);
cellEl.addEventListener("mousedown", function (e) {
if (e.which === 1) {
}
});
- this.bindTouchEvents(cell.row, cell.getElement());
+ this.bindTouchEvents(cell.row, cellEl);
};
MoveRows.prototype.bindTouchEvents = function (row, element) {
var receiver = false,
success = false;
- console.trace("drop");
-
e.stopImmediatePropagation();
switch (_typeof(this.table.options.movableRowsReceiver)) {
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
-var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},MoveRows=function(e){this.table=e,this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=150,this.moving=!1,this.toRow=!1,this.toRowAfter=!1,this.hasHandle=!1,this.startY=0,this.startX=0,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this),this.tableRowDropEvent=!1,this.touchMove=!1,this.connection=!1,this.connectionSelectorsTables=!1,this.connectionSelectorsElements=!1,this.connectionElements=[],this.connections=[],this.connectedTable=!1,this.connectedRow=!1};MoveRows.prototype.createPlaceholderElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-row"),e.classList.add("tabulator-row-placeholder"),e},MoveRows.prototype.initialize=function(e){this.connectionSelectorsTables=this.table.options.movableRowsConnectedTables,this.connectionSelectorsElements=this.table.options.movableRowsConnectedElements,this.connection=this.connectionSelectorsTables||this.connectionSelectorsElements},MoveRows.prototype.setHandle=function(e){this.hasHandle=e},MoveRows.prototype.initializeGroupHeader=function(e){var t=this,o={};o.mouseup=function(e){t.tableRowDrop(e,row)}.bind(t),o.mousemove=function(o){if(o.pageY-Tabulator.prototype.helpers.elOffset(e.element).top+t.table.rowManager.element.scrollTop>e.getHeight()/2){if(t.toRow!==e||!t.toRowAfter){var n=e.getElement();n.parentNode.insertBefore(t.placeholderElement,n.nextSibling),t.moveRow(e,!0)}}else if(t.toRow!==e||t.toRowAfter){var n=e.getElement();n.previousSibling&&(n.parentNode.insertBefore(t.placeholderElement,n),t.moveRow(e,!1))}}.bind(t),e.modules.moveRow=o},MoveRows.prototype.initializeRow=function(e){var t,o=this,n={};n.mouseup=function(t){o.tableRowDrop(t,e)}.bind(o),n.mousemove=function(t){if(t.pageY-Tabulator.prototype.helpers.elOffset(e.element).top+o.table.rowManager.element.scrollTop>e.getHeight()/2){if(o.toRow!==e||!o.toRowAfter){var n=e.getElement();n.parentNode.insertBefore(o.placeholderElement,n.nextSibling),o.moveRow(e,!0)}}else if(o.toRow!==e||o.toRowAfter){var n=e.getElement();n.parentNode.insertBefore(o.placeholderElement,n),o.moveRow(e,!1)}}.bind(o),this.hasHandle||(t=e.getElement(),t.addEventListener("mousedown",function(t){1===t.which&&(o.checkTimeout=setTimeout(function(){o.startMove(t,e)},o.checkPeriod))}),t.addEventListener("mouseup",function(e){1===e.which&&o.checkTimeout&&clearTimeout(o.checkTimeout)}),this.bindTouchEvents(e,e.getElement())),e.modules.moveRow=n},MoveRows.prototype.initializeCell=function(e){var t=this,o=e.getElement();o.addEventListener("mousedown",function(o){1===o.which&&(t.checkTimeout=setTimeout(function(){t.startMove(o,e.row)},t.checkPeriod))}),o.addEventListener("mouseup",function(e){1===e.which&&t.checkTimeout&&clearTimeout(t.checkTimeout)}),this.bindTouchEvents(e.row,e.getElement())},MoveRows.prototype.bindTouchEvents=function(e,t){var o,n,s,i,l,c,r,a=this,h=!1;t.addEventListener("touchstart",function(t){a.checkTimeout=setTimeout(function(){a.touchMove=!0,o=e,n=e.nextRow(),i=n?n.getHeight()/2:0,s=e.prevRow(),l=s?s.getHeight()/2:0,c=0,r=0,h=!1,a.startMove(t,e)},a.checkPeriod)},{passive:!0}),this.moving,this.toRow,this.toRowAfter,t.addEventListener("touchmove",function(t){var m,v;a.moving&&(t.preventDefault(),a.moveHover(t),h||(h=t.touches[0].pageY),m=t.touches[0].pageY-h,m>0?n&&m-c>i&&(v=n)!==e&&(h=t.touches[0].pageY,v.getElement().parentNode.insertBefore(a.placeholderElement,v.getElement().nextSibling),a.moveRow(v,!0)):s&&-m-r>l&&(v=s)!==e&&(h=t.touches[0].pageY,v.getElement().parentNode.insertBefore(a.placeholderElement,v.getElement()),a.moveRow(v,!1)),v&&(o=v,n=v.nextRow(),c=i,i=n?n.getHeight()/2:0,s=v.prevRow(),r=l,l=s?s.getHeight()/2:0))}),t.addEventListener("touchend",function(e){a.checkTimeout&&clearTimeout(a.checkTimeout),a.moving&&(a.endMove(e),a.touchMove=!1)})},MoveRows.prototype._bindMouseMove=function(){this.table.rowManager.getDisplayRows().forEach(function(e){"row"!==e.type&&"group"!==e.type||!e.modules.moveRow.mousemove||e.getElement().addEventListener("mousemove",e.modules.moveRow.mousemove)})},MoveRows.prototype._unbindMouseMove=function(){this.table.rowManager.getDisplayRows().forEach(function(e){"row"!==e.type&&"group"!==e.type||!e.modules.moveRow.mousemove||e.getElement().removeEventListener("mousemove",e.modules.moveRow.mousemove)})},MoveRows.prototype.startMove=function(e,t){var o=t.getElement();this.setStartPosition(e,t),this.moving=t,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",this.connection?(this.table.element.classList.add("tabulator-movingrow-sending"),this.connectToTables(t)):(o.parentNode.insertBefore(this.placeholderElement,o),o.parentNode.removeChild(o)),this.hoverElement=o.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.connection?(document.body.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this.hoverElement.style.width=this.table.element.clientWidth+"px",this.hoverElement.style.whiteSpace="nowrap",this.hoverElement.style.overflow="hidden",this.hoverElement.style.pointerEvents="none"):(this.table.rowManager.getTableElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this._bindMouseMove()),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove),this.moveHover(e)},MoveRows.prototype.setStartPosition=function(e,t){var o,n,s=this.touchMove?e.touches[0].pageX:e.pageX,i=this.touchMove?e.touches[0].pageY:e.pageY;o=t.getElement(),this.connection?(n=o.getBoundingClientRect(),this.startX=n.left-s+window.pageXOffset,this.startY=n.top-i+window.pageYOffset):this.startY=i-o.getBoundingClientRect().top},MoveRows.prototype.endMove=function(e){e&&1!==e.which&&!this.touchMove||(this._unbindMouseMove(),this.connection||(this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement)),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toRow&&this.table.rowManager.moveRow(this.moving,this.toRow,this.toRowAfter),this.moving=!1,this.toRow=!1,this.toRowAfter=!1,document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove),this.connection&&(this.table.element.classList.remove("tabulator-movingrow-sending"),this.disconnectFromTables()))},MoveRows.prototype.moveRow=function(e,t){this.toRow=e,this.toRowAfter=t},MoveRows.prototype.moveHover=function(e){this.connection?this.moveHoverConnections.call(this,e):this.moveHoverTable.call(this,e)},MoveRows.prototype.moveHoverTable=function(e){var t=this.table.rowManager.getElement(),o=t.scrollTop,n=(this.touchMove?e.touches[0].pageY:e.pageY)-t.getBoundingClientRect().top+o;this.hoverElement.style.top=n-this.startY+"px"},MoveRows.prototype.moveHoverConnections=function(e){this.hoverElement.style.left=this.startX+(this.touchMove?e.touches[0].pageX:e.pageX)+"px",this.hoverElement.style.top=this.startY+(this.touchMove?e.touches[0].pageY:e.pageY)+"px"},MoveRows.prototype.elementRowDrop=function(e,t,o){this.table.options.movableRowsElementDrop&&this.table.options.movableRowsElementDrop(e,t,!!o&&o.getComponent())},MoveRows.prototype.connectToTables=function(e){var t,o=this;this.connectionSelectorsTables&&(t=this.table.modules.comms.getConnections(this.connectionSelectorsTables),this.table.options.movableRowsSendingStart.call(this.table,t),this.table.modules.comms.send(this.connectionSelectorsTables,"moveRow","connect",{row:e})),this.connectionSelectorsElements&&(this.connectionElements=[],Array.isArray(this.connectionSelectorsElements)||(this.connectionSelectorsElements=[this.connectionSelectorsElements]),this.connectionSelectorsElements.forEach(function(e){"string"==typeof e?o.connectionElements=o.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(e))):o.connectionElements.push(e)}),this.connectionElements.forEach(function(e){var t=function(t){o.elementRowDrop(t,e,o.moving)};e.addEventListener("mouseup",t),e.tabulatorElementDropEvent=t,e.classList.add("tabulator-movingrow-receiving")}))},MoveRows.prototype.disconnectFromTables=function(){var e;this.connectionSelectorsTables&&(e=this.table.modules.comms.getConnections(this.connectionSelectorsTables),this.table.options.movableRowsSendingStop.call(this.table,e),this.table.modules.comms.send(this.connectionSelectorsTables,"moveRow","disconnect")),this.connectionElements.forEach(function(e){e.classList.remove("tabulator-movingrow-receiving"),e.removeEventListener("mouseup",e.tabulatorElementDropEvent),delete e.tabulatorElementDropEvent})},MoveRows.prototype.connect=function(e,t){var o=this;return this.connectedTable?(console.warn("Move Row Error - Table cannot accept connection, already connected to table:",this.connectedTable),!1):(this.connectedTable=e,this.connectedRow=t,this.table.element.classList.add("tabulator-movingrow-receiving"),o.table.rowManager.getDisplayRows().forEach(function(e){"row"===e.type&&e.modules.moveRow&&e.modules.moveRow.mouseup&&e.getElement().addEventListener("mouseup",e.modules.moveRow.mouseup)}),o.tableRowDropEvent=o.tableRowDrop.bind(o),o.table.element.addEventListener("mouseup",o.tableRowDropEvent),this.table.options.movableRowsReceivingStart.call(this.table,t,e),!0)},MoveRows.prototype.disconnect=function(e){var t=this;e===this.connectedTable?(this.connectedTable=!1,this.connectedRow=!1,this.table.element.classList.remove("tabulator-movingrow-receiving"),t.table.rowManager.getDisplayRows().forEach(function(e){"row"===e.type&&e.modules.moveRow&&e.modules.moveRow.mouseup&&e.getElement().removeEventListener("mouseup",e.modules.moveRow.mouseup)}),t.table.element.removeEventListener("mouseup",t.tableRowDropEvent),this.table.options.movableRowsReceivingStop.call(this.table,e)):console.warn("Move Row Error - trying to disconnect from non connected table")},MoveRows.prototype.dropComplete=function(e,t,o){var n=!1;if(o){switch(_typeof(this.table.options.movableRowsSender)){case"string":n=this.senders[this.table.options.movableRowsSender];break;case"function":n=this.table.options.movableRowsSender}n?n.call(this,this.moving.getComponent(),t?t.getComponent():void 0,e):this.table.options.movableRowsSender&&console.warn("Mover Row Error - no matching sender found:",this.table.options.movableRowsSender),this.table.options.movableRowsSent.call(this.table,this.moving.getComponent(),t?t.getComponent():void 0,e)}else this.table.options.movableRowsSentFailed.call(this.table,this.moving.getComponent(),t?t.getComponent():void 0,e);this.endMove()},MoveRows.prototype.tableRowDrop=function(e,t){var o=!1,n=!1;switch(console.trace("drop"),e.stopImmediatePropagation(),_typeof(this.table.options.movableRowsReceiver)){case"string":o=this.receivers[this.table.options.movableRowsReceiver];break;case"function":o=this.table.options.movableRowsReceiver}o?n=o.call(this,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):console.warn("Mover Row Error - no matching receiver found:",this.table.options.movableRowsReceiver),n?this.table.options.movableRowsReceived.call(this.table,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):this.table.options.movableRowsReceivedFailed.call(this.table,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable),this.table.modules.comms.send(this.connectedTable,"moveRow","dropcomplete",{row:t,success:n})},MoveRows.prototype.receivers={insert:function(e,t,o){return this.table.addRow(e.getData(),void 0,t),!0},add:function(e,t,o){return this.table.addRow(e.getData()),!0},update:function(e,t,o){return!!t&&(t.update(e.getData()),!0)},replace:function(e,t,o){return!!t&&(this.table.addRow(e.getData(),void 0,t),t.delete(),!0)}},MoveRows.prototype.senders={delete:function(e,t,o){e.delete()}},MoveRows.prototype.commsReceived=function(e,t,o){switch(t){case"connect":return this.connect(e,o.row);case"disconnect":return this.disconnect(e);case"dropcomplete":return this.dropComplete(e,o.row,o.success)}},Tabulator.prototype.registerModule("moveRow",MoveRows);
\ No newline at end of file
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
+var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},MoveRows=function(e){this.table=e,this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=150,this.moving=!1,this.toRow=!1,this.toRowAfter=!1,this.hasHandle=!1,this.startY=0,this.startX=0,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this),this.tableRowDropEvent=!1,this.touchMove=!1,this.connection=!1,this.connectionSelectorsTables=!1,this.connectionSelectorsElements=!1,this.connectionElements=[],this.connections=[],this.connectedTable=!1,this.connectedRow=!1};MoveRows.prototype.createPlaceholderElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-row"),e.classList.add("tabulator-row-placeholder"),e},MoveRows.prototype.initialize=function(e){this.connectionSelectorsTables=this.table.options.movableRowsConnectedTables,this.connectionSelectorsElements=this.table.options.movableRowsConnectedElements,this.connection=this.connectionSelectorsTables||this.connectionSelectorsElements},MoveRows.prototype.setHandle=function(e){this.hasHandle=e},MoveRows.prototype.initializeGroupHeader=function(e){var t=this,o={};o.mouseup=function(e){t.tableRowDrop(e,row)}.bind(t),o.mousemove=function(o){if(o.pageY-Tabulator.prototype.helpers.elOffset(e.element).top+t.table.rowManager.element.scrollTop>e.getHeight()/2){if(t.toRow!==e||!t.toRowAfter){var n=e.getElement();n.parentNode.insertBefore(t.placeholderElement,n.nextSibling),t.moveRow(e,!0)}}else if(t.toRow!==e||t.toRowAfter){var n=e.getElement();n.previousSibling&&(n.parentNode.insertBefore(t.placeholderElement,n),t.moveRow(e,!1))}}.bind(t),e.modules.moveRow=o},MoveRows.prototype.initializeRow=function(e){var t,o=this,n={};n.mouseup=function(t){o.tableRowDrop(t,e)}.bind(o),n.mousemove=function(t){var n=e.getElement();t.pageY-Tabulator.prototype.helpers.elOffset(n).top+o.table.rowManager.element.scrollTop>e.getHeight()/2?o.toRow===e&&o.toRowAfter||(n.parentNode.insertBefore(o.placeholderElement,n.nextSibling),o.moveRow(e,!0)):(o.toRow!==e||o.toRowAfter)&&(n.parentNode.insertBefore(o.placeholderElement,n),o.moveRow(e,!1))}.bind(o),this.hasHandle||(t=e.getElement(),t.addEventListener("mousedown",function(t){1===t.which&&(o.checkTimeout=setTimeout(function(){o.startMove(t,e)},o.checkPeriod))}),t.addEventListener("mouseup",function(e){1===e.which&&o.checkTimeout&&clearTimeout(o.checkTimeout)}),this.bindTouchEvents(e,e.getElement())),e.modules.moveRow=n},MoveRows.prototype.initializeCell=function(e){var t=this,o=e.getElement(!0);o.addEventListener("mousedown",function(o){1===o.which&&(t.checkTimeout=setTimeout(function(){t.startMove(o,e.row)},t.checkPeriod))}),o.addEventListener("mouseup",function(e){1===e.which&&t.checkTimeout&&clearTimeout(t.checkTimeout)}),this.bindTouchEvents(e.row,o)},MoveRows.prototype.bindTouchEvents=function(e,t){var o,n,s,i,l,c,r,a=this,h=!1;t.addEventListener("touchstart",function(t){a.checkTimeout=setTimeout(function(){a.touchMove=!0,o=e,n=e.nextRow(),i=n?n.getHeight()/2:0,s=e.prevRow(),l=s?s.getHeight()/2:0,c=0,r=0,h=!1,a.startMove(t,e)},a.checkPeriod)},{passive:!0}),this.moving,this.toRow,this.toRowAfter,t.addEventListener("touchmove",function(t){var m,v;a.moving&&(t.preventDefault(),a.moveHover(t),h||(h=t.touches[0].pageY),m=t.touches[0].pageY-h,m>0?n&&m-c>i&&(v=n)!==e&&(h=t.touches[0].pageY,v.getElement().parentNode.insertBefore(a.placeholderElement,v.getElement().nextSibling),a.moveRow(v,!0)):s&&-m-r>l&&(v=s)!==e&&(h=t.touches[0].pageY,v.getElement().parentNode.insertBefore(a.placeholderElement,v.getElement()),a.moveRow(v,!1)),v&&(o=v,n=v.nextRow(),c=i,i=n?n.getHeight()/2:0,s=v.prevRow(),r=l,l=s?s.getHeight()/2:0))}),t.addEventListener("touchend",function(e){a.checkTimeout&&clearTimeout(a.checkTimeout),a.moving&&(a.endMove(e),a.touchMove=!1)})},MoveRows.prototype._bindMouseMove=function(){this.table.rowManager.getDisplayRows().forEach(function(e){"row"!==e.type&&"group"!==e.type||!e.modules.moveRow.mousemove||e.getElement().addEventListener("mousemove",e.modules.moveRow.mousemove)})},MoveRows.prototype._unbindMouseMove=function(){this.table.rowManager.getDisplayRows().forEach(function(e){"row"!==e.type&&"group"!==e.type||!e.modules.moveRow.mousemove||e.getElement().removeEventListener("mousemove",e.modules.moveRow.mousemove)})},MoveRows.prototype.startMove=function(e,t){var o=t.getElement();this.setStartPosition(e,t),this.moving=t,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",this.connection?(this.table.element.classList.add("tabulator-movingrow-sending"),this.connectToTables(t)):(o.parentNode.insertBefore(this.placeholderElement,o),o.parentNode.removeChild(o)),this.hoverElement=o.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.connection?(document.body.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this.hoverElement.style.width=this.table.element.clientWidth+"px",this.hoverElement.style.whiteSpace="nowrap",this.hoverElement.style.overflow="hidden",this.hoverElement.style.pointerEvents="none"):(this.table.rowManager.getTableElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this._bindMouseMove()),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove),this.moveHover(e)},MoveRows.prototype.setStartPosition=function(e,t){var o,n,s=this.touchMove?e.touches[0].pageX:e.pageX,i=this.touchMove?e.touches[0].pageY:e.pageY;o=t.getElement(),this.connection?(n=o.getBoundingClientRect(),this.startX=n.left-s+window.pageXOffset,this.startY=n.top-i+window.pageYOffset):this.startY=i-o.getBoundingClientRect().top},MoveRows.prototype.endMove=function(e){e&&1!==e.which&&!this.touchMove||(this._unbindMouseMove(),this.connection||(this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement)),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toRow&&this.table.rowManager.moveRow(this.moving,this.toRow,this.toRowAfter),this.moving=!1,this.toRow=!1,this.toRowAfter=!1,document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove),this.connection&&(this.table.element.classList.remove("tabulator-movingrow-sending"),this.disconnectFromTables()))},MoveRows.prototype.moveRow=function(e,t){this.toRow=e,this.toRowAfter=t},MoveRows.prototype.moveHover=function(e){this.connection?this.moveHoverConnections.call(this,e):this.moveHoverTable.call(this,e)},MoveRows.prototype.moveHoverTable=function(e){var t=this.table.rowManager.getElement(),o=t.scrollTop,n=(this.touchMove?e.touches[0].pageY:e.pageY)-t.getBoundingClientRect().top+o;this.hoverElement.style.top=n-this.startY+"px"},MoveRows.prototype.moveHoverConnections=function(e){this.hoverElement.style.left=this.startX+(this.touchMove?e.touches[0].pageX:e.pageX)+"px",this.hoverElement.style.top=this.startY+(this.touchMove?e.touches[0].pageY:e.pageY)+"px"},MoveRows.prototype.elementRowDrop=function(e,t,o){this.table.options.movableRowsElementDrop&&this.table.options.movableRowsElementDrop(e,t,!!o&&o.getComponent())},MoveRows.prototype.connectToTables=function(e){var t,o=this;this.connectionSelectorsTables&&(t=this.table.modules.comms.getConnections(this.connectionSelectorsTables),this.table.options.movableRowsSendingStart.call(this.table,t),this.table.modules.comms.send(this.connectionSelectorsTables,"moveRow","connect",{row:e})),this.connectionSelectorsElements&&(this.connectionElements=[],Array.isArray(this.connectionSelectorsElements)||(this.connectionSelectorsElements=[this.connectionSelectorsElements]),this.connectionSelectorsElements.forEach(function(e){"string"==typeof e?o.connectionElements=o.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(e))):o.connectionElements.push(e)}),this.connectionElements.forEach(function(e){var t=function(t){o.elementRowDrop(t,e,o.moving)};e.addEventListener("mouseup",t),e.tabulatorElementDropEvent=t,e.classList.add("tabulator-movingrow-receiving")}))},MoveRows.prototype.disconnectFromTables=function(){var e;this.connectionSelectorsTables&&(e=this.table.modules.comms.getConnections(this.connectionSelectorsTables),this.table.options.movableRowsSendingStop.call(this.table,e),this.table.modules.comms.send(this.connectionSelectorsTables,"moveRow","disconnect")),this.connectionElements.forEach(function(e){e.classList.remove("tabulator-movingrow-receiving"),e.removeEventListener("mouseup",e.tabulatorElementDropEvent),delete e.tabulatorElementDropEvent})},MoveRows.prototype.connect=function(e,t){var o=this;return this.connectedTable?(console.warn("Move Row Error - Table cannot accept connection, already connected to table:",this.connectedTable),!1):(this.connectedTable=e,this.connectedRow=t,this.table.element.classList.add("tabulator-movingrow-receiving"),o.table.rowManager.getDisplayRows().forEach(function(e){"row"===e.type&&e.modules.moveRow&&e.modules.moveRow.mouseup&&e.getElement().addEventListener("mouseup",e.modules.moveRow.mouseup)}),o.tableRowDropEvent=o.tableRowDrop.bind(o),o.table.element.addEventListener("mouseup",o.tableRowDropEvent),this.table.options.movableRowsReceivingStart.call(this.table,t,e),!0)},MoveRows.prototype.disconnect=function(e){var t=this;e===this.connectedTable?(this.connectedTable=!1,this.connectedRow=!1,this.table.element.classList.remove("tabulator-movingrow-receiving"),t.table.rowManager.getDisplayRows().forEach(function(e){"row"===e.type&&e.modules.moveRow&&e.modules.moveRow.mouseup&&e.getElement().removeEventListener("mouseup",e.modules.moveRow.mouseup)}),t.table.element.removeEventListener("mouseup",t.tableRowDropEvent),this.table.options.movableRowsReceivingStop.call(this.table,e)):console.warn("Move Row Error - trying to disconnect from non connected table")},MoveRows.prototype.dropComplete=function(e,t,o){var n=!1;if(o){switch(_typeof(this.table.options.movableRowsSender)){case"string":n=this.senders[this.table.options.movableRowsSender];break;case"function":n=this.table.options.movableRowsSender}n?n.call(this,this.moving.getComponent(),t?t.getComponent():void 0,e):this.table.options.movableRowsSender&&console.warn("Mover Row Error - no matching sender found:",this.table.options.movableRowsSender),this.table.options.movableRowsSent.call(this.table,this.moving.getComponent(),t?t.getComponent():void 0,e)}else this.table.options.movableRowsSentFailed.call(this.table,this.moving.getComponent(),t?t.getComponent():void 0,e);this.endMove()},MoveRows.prototype.tableRowDrop=function(e,t){var o=!1,n=!1;switch(e.stopImmediatePropagation(),_typeof(this.table.options.movableRowsReceiver)){case"string":o=this.receivers[this.table.options.movableRowsReceiver];break;case"function":o=this.table.options.movableRowsReceiver}o?n=o.call(this,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):console.warn("Mover Row Error - no matching receiver found:",this.table.options.movableRowsReceiver),n?this.table.options.movableRowsReceived.call(this.table,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):this.table.options.movableRowsReceivedFailed.call(this.table,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable),this.table.modules.comms.send(this.connectedTable,"moveRow","dropcomplete",{row:t,success:n})},MoveRows.prototype.receivers={insert:function(e,t,o){return this.table.addRow(e.getData(),void 0,t),!0},add:function(e,t,o){return this.table.addRow(e.getData()),!0},update:function(e,t,o){return!!t&&(t.update(e.getData()),!0)},replace:function(e,t,o){return!!t&&(this.table.addRow(e.getData(),void 0,t),t.delete(),!0)}},MoveRows.prototype.senders={delete:function(e,t,o){e.delete()}},MoveRows.prototype.commsReceived=function(e,t,o){switch(t){case"connect":return this.connect(e,o.row);case"disconnect":return this.disconnect(e);case"dropcomplete":return this.dropComplete(e,o.row,o.success)}},Tabulator.prototype.registerModule("moveRow",MoveRows);
\ No newline at end of file
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var Mutator = function Mutator(table) {
this.table = table; //hold Tabulator object
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mutator=function(t){this.table=t,this.allowedTypes=["","data","edit","clipboard"],this.enabled=!0};Mutator.prototype.initializeColumn=function(t){var o=this,e=!1,a={};this.allowedTypes.forEach(function(r){var u,n="mutator"+(r.charAt(0).toUpperCase()+r.slice(1));t.definition[n]&&(u=o.lookupMutator(t.definition[n]))&&(e=!0,a[n]={mutator:u,params:t.definition[n+"Params"]||{}})}),e&&(t.modules.mutate=a)},Mutator.prototype.lookupMutator=function(t){var o=!1;switch(void 0===t?"undefined":_typeof(t)){case"string":this.mutators[t]?o=this.mutators[t]:console.warn("Mutator Error - No such mutator found, ignoring: ",t);break;case"function":o=t}return o},Mutator.prototype.transformRow=function(t,o,e){var a,r=this,u="mutator"+(o.charAt(0).toUpperCase()+o.slice(1));return this.enabled&&r.table.columnManager.traverse(function(r){var n,i,s;r.modules.mutate&&(n=r.modules.mutate[u]||r.modules.mutate.mutator||!1)&&(a=r.getFieldValue(void 0!==e?e:t),"data"!=o&&void 0===a||(s=r.getComponent(),i="function"==typeof n.params?n.params(a,t,o,s):n.params,r.setFieldValue(t,n.mutator(a,t,o,i,s))))}),t},Mutator.prototype.transformCell=function(t,o){var e=t.column.modules.mutate.mutatorEdit||t.column.modules.mutate.mutator||!1,a={};return e?(a=Object.assign(a,t.row.getData()),t.column.setFieldValue(a,o),e.mutator(o,a,"edit",e.params,t.getComponent())):o},Mutator.prototype.enable=function(){this.enabled=!0},Mutator.prototype.disable=function(){this.enabled=!1},Mutator.prototype.mutators={},Tabulator.prototype.registerModule("mutator",Mutator);
\ No newline at end of file
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var Page = function Page(table) {
page = parseInt(page);
- if (page > 0 && page <= _this2.max) {
+ if (page > 0 && page <= _this2.max || _this2.mode !== "local") {
_this2.page = page;
_this2.trigger().then(function () {
resolve();
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
-var Page=function(e){this.table=e,this.mode="local",this.progressiveLoad=!1,this.size=0,this.page=1,this.count=5,this.max=1,this.displayIndex=0,this.initialLoad=!0,this.pageSizes=[],this.dataReceivedNames={},this.dataSentNames={},this.createElements()};Page.prototype.createElements=function(){var e;this.element=document.createElement("span"),this.element.classList.add("tabulator-paginator"),this.pagesElement=document.createElement("span"),this.pagesElement.classList.add("tabulator-pages"),e=document.createElement("button"),e.classList.add("tabulator-page"),e.setAttribute("type","button"),e.setAttribute("role","button"),e.setAttribute("aria-label",""),e.setAttribute("title",""),this.firstBut=e.cloneNode(!0),this.firstBut.setAttribute("data-page","first"),this.prevBut=e.cloneNode(!0),this.prevBut.setAttribute("data-page","prev"),this.nextBut=e.cloneNode(!0),this.nextBut.setAttribute("data-page","next"),this.lastBut=e.cloneNode(!0),this.lastBut.setAttribute("data-page","last"),this.table.options.paginationSizeSelector&&(this.pageSizeSelect=document.createElement("select"),this.pageSizeSelect.classList.add("tabulator-page-size"))},Page.prototype.generatePageSizeSelectList=function(){var e=this,t=[];if(this.pageSizeSelect){if(Array.isArray(this.table.options.paginationSizeSelector))t=this.table.options.paginationSizeSelector,this.pageSizes=t,-1==this.pageSizes.indexOf(this.size)&&t.unshift(this.size);else if(-1==this.pageSizes.indexOf(this.size)){t=[];for(var a=1;a<5;a++)t.push(this.size*a);this.pageSizes=t}else t=this.pageSizes;for(;this.pageSizeSelect.firstChild;)this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild);t.forEach(function(t){var a=document.createElement("option");a.value=t,!0===t?e.table.modules.localize.bind("pagination|all",function(e){a.innerHTML=e}):a.innerHTML=t,e.pageSizeSelect.appendChild(a)}),this.pageSizeSelect.value=this.size}},Page.prototype.initialize=function(e){var t,a,i,s=this;this.dataSentNames=Object.assign({},this.paginationDataSentNames),this.dataSentNames=Object.assign(this.dataSentNames,this.table.options.paginationDataSent),this.dataReceivedNames=Object.assign({},this.paginationDataReceivedNames),this.dataReceivedNames=Object.assign(this.dataReceivedNames,this.table.options.paginationDataReceived),s.table.modules.localize.bind("pagination|first",function(e){s.firstBut.innerHTML=e}),s.table.modules.localize.bind("pagination|first_title",function(e){s.firstBut.setAttribute("aria-label",e),s.firstBut.setAttribute("title",e)}),s.table.modules.localize.bind("pagination|prev",function(e){s.prevBut.innerHTML=e}),s.table.modules.localize.bind("pagination|prev_title",function(e){s.prevBut.setAttribute("aria-label",e),s.prevBut.setAttribute("title",e)}),s.table.modules.localize.bind("pagination|next",function(e){s.nextBut.innerHTML=e}),s.table.modules.localize.bind("pagination|next_title",function(e){s.nextBut.setAttribute("aria-label",e),s.nextBut.setAttribute("title",e)}),s.table.modules.localize.bind("pagination|last",function(e){s.lastBut.innerHTML=e}),s.table.modules.localize.bind("pagination|last_title",function(e){s.lastBut.setAttribute("aria-label",e),s.lastBut.setAttribute("title",e)}),s.firstBut.addEventListener("click",function(){s.setPage(1).then(function(){}).catch(function(){})}),s.prevBut.addEventListener("click",function(){s.previousPage().then(function(){}).catch(function(){})}),s.nextBut.addEventListener("click",function(){s.nextPage().then(function(){}).catch(function(){})}),s.lastBut.addEventListener("click",function(){s.setPage(s.max).then(function(){}).catch(function(){})}),s.table.options.paginationElement&&(s.element=s.table.options.paginationElement),this.pageSizeSelect&&(t=document.createElement("label"),s.table.modules.localize.bind("pagination|page_size",function(e){s.pageSizeSelect.setAttribute("aria-label",e),s.pageSizeSelect.setAttribute("title",e),t.innerHTML=e}),s.element.appendChild(t),s.element.appendChild(s.pageSizeSelect),s.pageSizeSelect.addEventListener("change",function(e){s.setPageSize("true"==s.pageSizeSelect.value||s.pageSizeSelect.value),s.setPage(1).then(function(){}).catch(function(){})})),s.element.appendChild(s.firstBut),s.element.appendChild(s.prevBut),s.element.appendChild(s.pagesElement),s.element.appendChild(s.nextBut),s.element.appendChild(s.lastBut),s.table.options.paginationElement||e||s.table.footerManager.append(s.element,s),s.mode=s.table.options.pagination,s.table.options.paginationSize?s.size=s.table.options.paginationSize:(a=document.createElement("div"),a.classList.add("tabulator-row"),a.style.visibility=e,i=document.createElement("div"),i.classList.add("tabulator-cell"),i.innerHTML="Page Row Test",a.appendChild(i),s.table.rowManager.getTableElement().appendChild(a),s.size=Math.floor(s.table.rowManager.getElement().clientHeight/a.offsetHeight),s.table.rowManager.getTableElement().removeChild(a)),s.count=s.table.options.paginationButtonCount,s.generatePageSizeSelectList()},Page.prototype.initializeProgressive=function(e){this.initialize(!0),this.mode="progressive_"+e,this.progressiveLoad=!0},Page.prototype.setDisplayIndex=function(e){this.displayIndex=e},Page.prototype.getDisplayIndex=function(){return this.displayIndex},Page.prototype.setMaxRows=function(e){this.max=e?!0===this.size?1:Math.ceil(e/this.size):1,this.page>this.max&&(this.page=this.max)},Page.prototype.reset=function(e,t){return("local"==this.mode||e)&&(this.page=1),t&&(this.initialLoad=!0),!0},Page.prototype.setMaxPage=function(e){e=parseInt(e),this.max=e||1,this.page>this.max&&(this.page=this.max,this.trigger())},Page.prototype.setPage=function(e){var t=this,a=this;switch(e){case"first":return this.setPage(1);case"prev":return this.previousPage();case"next":return this.nextPage();case"last":return this.setPage(this.max)}return new Promise(function(i,s){e=parseInt(e),e>0&&e<=t.max?(t.page=e,t.trigger().then(function(){i()}).catch(function(){s()}),a.table.options.persistence&&a.table.modExists("persistence",!0)&&a.table.modules.persistence.config.page&&a.table.modules.persistence.save("page")):(console.warn("Pagination Error - Requested page is out of range of 1 - "+t.max+":",e),s())})},Page.prototype.setPageToRow=function(e){var t=this;return new Promise(function(a,i){var s=t.table.rowManager.getDisplayRows(t.displayIndex-1),n=s.indexOf(e);if(n>-1){var o=!0===t.size?1:Math.ceil((n+1)/t.size);t.setPage(o).then(function(){a()}).catch(function(){i()})}else console.warn("Pagination Error - Requested row is not visible"),i()})},Page.prototype.setPageSize=function(e){!0!==e&&(e=parseInt(e)),e>0&&(this.size=e),this.pageSizeSelect&&this.generatePageSizeSelectList(),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.page&&this.table.modules.persistence.save("page")},Page.prototype._setPageButtons=function(){for(var e=this,t=Math.floor((this.count-1)/2),a=Math.ceil((this.count-1)/2),i=this.max-this.page+t+1<this.count?this.max-this.count+1:Math.max(this.page-t,1),s=this.page<=a?Math.min(this.count,this.max):Math.min(this.page+a,this.max);e.pagesElement.firstChild;)e.pagesElement.removeChild(e.pagesElement.firstChild);1==e.page?(e.firstBut.disabled=!0,e.prevBut.disabled=!0):(e.firstBut.disabled=!1,e.prevBut.disabled=!1),e.page==e.max?(e.lastBut.disabled=!0,e.nextBut.disabled=!0):(e.lastBut.disabled=!1,e.nextBut.disabled=!1);for(var n=i;n<=s;n++)n>0&&n<=e.max&&e.pagesElement.appendChild(e._generatePageButton(n));this.footerRedraw()},Page.prototype._generatePageButton=function(e){var t=this,a=document.createElement("button");return a.classList.add("tabulator-page"),e==t.page&&a.classList.add("active"),a.setAttribute("type","button"),a.setAttribute("role","button"),t.table.modules.localize.bind("pagination|page_title",function(t){a.setAttribute("aria-label",t+" "+e),a.setAttribute("title",t+" "+e)}),a.setAttribute("data-page",e),a.textContent=e,a.addEventListener("click",function(a){t.setPage(e).then(function(){}).catch(function(){})}),a},Page.prototype.previousPage=function(){var e=this;return new Promise(function(t,a){e.page>1?(e.page--,e.trigger().then(function(){t()}).catch(function(){a()}),e.table.options.persistence&&e.table.modExists("persistence",!0)&&e.table.modules.persistence.config.page&&e.table.modules.persistence.save("page")):(console.warn("Pagination Error - Previous page would be less than page 1:",0),a())})},Page.prototype.nextPage=function(){var e=this;return new Promise(function(t,a){e.page<e.max?(e.page++,e.trigger().then(function(){t()}).catch(function(){a()}),e.table.options.persistence&&e.table.modExists("persistence",!0)&&e.table.modules.persistence.config.page&&e.table.modules.persistence.save("page")):(e.progressiveLoad||console.warn("Pagination Error - Next page would be greater than maximum page of "+e.max+":",e.max+1),a())})},Page.prototype.getPage=function(){return this.page},Page.prototype.getPageMax=function(){return this.max},Page.prototype.getPageSize=function(e){return this.size},Page.prototype.getMode=function(){return this.mode},Page.prototype.getRows=function(e){var t,a,i;if("local"==this.mode){t=[],!0===this.size?(a=0,i=e.length):(a=this.size*(this.page-1),i=a+parseInt(this.size)),this._setPageButtons();for(var s=a;s<i;s++)e[s]&&t.push(e[s]);return t}return this._setPageButtons(),e.slice(0)},Page.prototype.trigger=function(){var e,t=this;return new Promise(function(a,i){switch(t.mode){case"local":e=t.table.rowManager.scrollLeft,t.table.rowManager.refreshActiveData("page"),t.table.rowManager.scrollHorizontal(e),t.table.options.pageLoaded.call(t.table,t.getPage()),a();break;case"remote":case"progressive_load":case"progressive_scroll":t.table.modules.ajax.blockActiveRequest(),t._getRemotePage().then(function(){a()}).catch(function(){i()});break;default:console.warn("Pagination Error - no such pagination mode:",t.mode),i()}})},Page.prototype._getRemotePage=function(){var e,t,a=this,i=this;return new Promise(function(s,n){if(i.table.modExists("ajax",!0)||n(),e=Tabulator.prototype.helpers.deepClone(i.table.modules.ajax.getParams()||{}),t=i.table.modules.ajax.getParams(),t[a.dataSentNames.page]=i.page,a.size&&(t[a.dataSentNames.size]=a.size),a.table.options.ajaxSorting&&a.table.modExists("sort")){var o=i.table.modules.sort.getSort();o.forEach(function(e){delete e.column}),t[a.dataSentNames.sorters]=o}if(a.table.options.ajaxFiltering&&a.table.modExists("filter")){var r=i.table.modules.filter.getFilters(!0,!0);t[a.dataSentNames.filters]=r}i.table.modules.ajax.setParams(t),i.table.modules.ajax.sendRequest(a.progressiveLoad).then(function(e){i._parseRemoteData(e),s()}).catch(function(e){n()}),i.table.modules.ajax.setParams(e)})},Page.prototype._parseRemoteData=function(e){var t,e,a,i=this;if(void 0===e[this.dataReceivedNames.last_page]&&console.warn("Remote Pagination Error - Server response missing '"+this.dataReceivedNames.last_page+"' property"),e[this.dataReceivedNames.data]){if(this.max=parseInt(e[this.dataReceivedNames.last_page])||1,this.progressiveLoad)switch(this.mode){case"progressive_load":1==this.page?this.table.rowManager.setData(e[this.dataReceivedNames.data],!1,this.initialLoad&&1==this.page):this.table.rowManager.addRows(e[this.dataReceivedNames.data]),this.page<this.max&&setTimeout(function(){i.nextPage().then(function(){}).catch(function(){})},i.table.options.ajaxProgressiveLoadDelay);break;case"progressive_scroll":e=this.table.rowManager.getData().concat(e[this.dataReceivedNames.data]),this.table.rowManager.setData(e,!0,this.initialLoad&&1==this.page),a=this.table.options.ajaxProgressiveLoadScrollMargin||2*this.table.rowManager.element.clientHeight,i.table.rowManager.element.scrollHeight<=i.table.rowManager.element.clientHeight+a&&i.nextPage().then(function(){}).catch(function(){})}else t=this.table.rowManager.scrollLeft,this.table.rowManager.setData(e[this.dataReceivedNames.data],!1,this.initialLoad&&1==this.page),this.table.rowManager.scrollHorizontal(t),this.table.columnManager.scrollHorizontal(t),this.table.options.pageLoaded.call(this.table,this.getPage());this.initialLoad=!1}else console.warn("Remote Pagination Error - Server response missing '"+this.dataReceivedNames.data+"' property")},Page.prototype.footerRedraw=function(){var e=this.table.footerManager.element;Math.ceil(e.clientWidth)-e.scrollWidth<0?this.pagesElement.style.display="none":(this.pagesElement.style.display="",Math.ceil(e.clientWidth)-e.scrollWidth<0&&(this.pagesElement.style.display="none"))},Page.prototype.paginationDataSentNames={page:"page",size:"size",sorters:"sorters",filters:"filters"},Page.prototype.paginationDataReceivedNames={current_page:"current_page",last_page:"last_page",data:"data"},Tabulator.prototype.registerModule("page",Page);
\ No newline at end of file
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
+var Page=function(e){this.table=e,this.mode="local",this.progressiveLoad=!1,this.size=0,this.page=1,this.count=5,this.max=1,this.displayIndex=0,this.initialLoad=!0,this.pageSizes=[],this.dataReceivedNames={},this.dataSentNames={},this.createElements()};Page.prototype.createElements=function(){var e;this.element=document.createElement("span"),this.element.classList.add("tabulator-paginator"),this.pagesElement=document.createElement("span"),this.pagesElement.classList.add("tabulator-pages"),e=document.createElement("button"),e.classList.add("tabulator-page"),e.setAttribute("type","button"),e.setAttribute("role","button"),e.setAttribute("aria-label",""),e.setAttribute("title",""),this.firstBut=e.cloneNode(!0),this.firstBut.setAttribute("data-page","first"),this.prevBut=e.cloneNode(!0),this.prevBut.setAttribute("data-page","prev"),this.nextBut=e.cloneNode(!0),this.nextBut.setAttribute("data-page","next"),this.lastBut=e.cloneNode(!0),this.lastBut.setAttribute("data-page","last"),this.table.options.paginationSizeSelector&&(this.pageSizeSelect=document.createElement("select"),this.pageSizeSelect.classList.add("tabulator-page-size"))},Page.prototype.generatePageSizeSelectList=function(){var e=this,t=[];if(this.pageSizeSelect){if(Array.isArray(this.table.options.paginationSizeSelector))t=this.table.options.paginationSizeSelector,this.pageSizes=t,-1==this.pageSizes.indexOf(this.size)&&t.unshift(this.size);else if(-1==this.pageSizes.indexOf(this.size)){t=[];for(var a=1;a<5;a++)t.push(this.size*a);this.pageSizes=t}else t=this.pageSizes;for(;this.pageSizeSelect.firstChild;)this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild);t.forEach(function(t){var a=document.createElement("option");a.value=t,!0===t?e.table.modules.localize.bind("pagination|all",function(e){a.innerHTML=e}):a.innerHTML=t,e.pageSizeSelect.appendChild(a)}),this.pageSizeSelect.value=this.size}},Page.prototype.initialize=function(e){var t,a,i,s=this;this.dataSentNames=Object.assign({},this.paginationDataSentNames),this.dataSentNames=Object.assign(this.dataSentNames,this.table.options.paginationDataSent),this.dataReceivedNames=Object.assign({},this.paginationDataReceivedNames),this.dataReceivedNames=Object.assign(this.dataReceivedNames,this.table.options.paginationDataReceived),s.table.modules.localize.bind("pagination|first",function(e){s.firstBut.innerHTML=e}),s.table.modules.localize.bind("pagination|first_title",function(e){s.firstBut.setAttribute("aria-label",e),s.firstBut.setAttribute("title",e)}),s.table.modules.localize.bind("pagination|prev",function(e){s.prevBut.innerHTML=e}),s.table.modules.localize.bind("pagination|prev_title",function(e){s.prevBut.setAttribute("aria-label",e),s.prevBut.setAttribute("title",e)}),s.table.modules.localize.bind("pagination|next",function(e){s.nextBut.innerHTML=e}),s.table.modules.localize.bind("pagination|next_title",function(e){s.nextBut.setAttribute("aria-label",e),s.nextBut.setAttribute("title",e)}),s.table.modules.localize.bind("pagination|last",function(e){s.lastBut.innerHTML=e}),s.table.modules.localize.bind("pagination|last_title",function(e){s.lastBut.setAttribute("aria-label",e),s.lastBut.setAttribute("title",e)}),s.firstBut.addEventListener("click",function(){s.setPage(1).then(function(){}).catch(function(){})}),s.prevBut.addEventListener("click",function(){s.previousPage().then(function(){}).catch(function(){})}),s.nextBut.addEventListener("click",function(){s.nextPage().then(function(){}).catch(function(){})}),s.lastBut.addEventListener("click",function(){s.setPage(s.max).then(function(){}).catch(function(){})}),s.table.options.paginationElement&&(s.element=s.table.options.paginationElement),this.pageSizeSelect&&(t=document.createElement("label"),s.table.modules.localize.bind("pagination|page_size",function(e){s.pageSizeSelect.setAttribute("aria-label",e),s.pageSizeSelect.setAttribute("title",e),t.innerHTML=e}),s.element.appendChild(t),s.element.appendChild(s.pageSizeSelect),s.pageSizeSelect.addEventListener("change",function(e){s.setPageSize("true"==s.pageSizeSelect.value||s.pageSizeSelect.value),s.setPage(1).then(function(){}).catch(function(){})})),s.element.appendChild(s.firstBut),s.element.appendChild(s.prevBut),s.element.appendChild(s.pagesElement),s.element.appendChild(s.nextBut),s.element.appendChild(s.lastBut),s.table.options.paginationElement||e||s.table.footerManager.append(s.element,s),s.mode=s.table.options.pagination,s.table.options.paginationSize?s.size=s.table.options.paginationSize:(a=document.createElement("div"),a.classList.add("tabulator-row"),a.style.visibility=e,i=document.createElement("div"),i.classList.add("tabulator-cell"),i.innerHTML="Page Row Test",a.appendChild(i),s.table.rowManager.getTableElement().appendChild(a),s.size=Math.floor(s.table.rowManager.getElement().clientHeight/a.offsetHeight),s.table.rowManager.getTableElement().removeChild(a)),s.count=s.table.options.paginationButtonCount,s.generatePageSizeSelectList()},Page.prototype.initializeProgressive=function(e){this.initialize(!0),this.mode="progressive_"+e,this.progressiveLoad=!0},Page.prototype.setDisplayIndex=function(e){this.displayIndex=e},Page.prototype.getDisplayIndex=function(){return this.displayIndex},Page.prototype.setMaxRows=function(e){this.max=e?!0===this.size?1:Math.ceil(e/this.size):1,this.page>this.max&&(this.page=this.max)},Page.prototype.reset=function(e,t){return("local"==this.mode||e)&&(this.page=1),t&&(this.initialLoad=!0),!0},Page.prototype.setMaxPage=function(e){e=parseInt(e),this.max=e||1,this.page>this.max&&(this.page=this.max,this.trigger())},Page.prototype.setPage=function(e){var t=this,a=this;switch(e){case"first":return this.setPage(1);case"prev":return this.previousPage();case"next":return this.nextPage();case"last":return this.setPage(this.max)}return new Promise(function(i,s){e=parseInt(e),e>0&&e<=t.max||"local"!==t.mode?(t.page=e,t.trigger().then(function(){i()}).catch(function(){s()}),a.table.options.persistence&&a.table.modExists("persistence",!0)&&a.table.modules.persistence.config.page&&a.table.modules.persistence.save("page")):(console.warn("Pagination Error - Requested page is out of range of 1 - "+t.max+":",e),s())})},Page.prototype.setPageToRow=function(e){var t=this;return new Promise(function(a,i){var s=t.table.rowManager.getDisplayRows(t.displayIndex-1),n=s.indexOf(e);if(n>-1){var o=!0===t.size?1:Math.ceil((n+1)/t.size);t.setPage(o).then(function(){a()}).catch(function(){i()})}else console.warn("Pagination Error - Requested row is not visible"),i()})},Page.prototype.setPageSize=function(e){!0!==e&&(e=parseInt(e)),e>0&&(this.size=e),this.pageSizeSelect&&this.generatePageSizeSelectList(),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.page&&this.table.modules.persistence.save("page")},Page.prototype._setPageButtons=function(){for(var e=this,t=Math.floor((this.count-1)/2),a=Math.ceil((this.count-1)/2),i=this.max-this.page+t+1<this.count?this.max-this.count+1:Math.max(this.page-t,1),s=this.page<=a?Math.min(this.count,this.max):Math.min(this.page+a,this.max);e.pagesElement.firstChild;)e.pagesElement.removeChild(e.pagesElement.firstChild);1==e.page?(e.firstBut.disabled=!0,e.prevBut.disabled=!0):(e.firstBut.disabled=!1,e.prevBut.disabled=!1),e.page==e.max?(e.lastBut.disabled=!0,e.nextBut.disabled=!0):(e.lastBut.disabled=!1,e.nextBut.disabled=!1);for(var n=i;n<=s;n++)n>0&&n<=e.max&&e.pagesElement.appendChild(e._generatePageButton(n));this.footerRedraw()},Page.prototype._generatePageButton=function(e){var t=this,a=document.createElement("button");return a.classList.add("tabulator-page"),e==t.page&&a.classList.add("active"),a.setAttribute("type","button"),a.setAttribute("role","button"),t.table.modules.localize.bind("pagination|page_title",function(t){a.setAttribute("aria-label",t+" "+e),a.setAttribute("title",t+" "+e)}),a.setAttribute("data-page",e),a.textContent=e,a.addEventListener("click",function(a){t.setPage(e).then(function(){}).catch(function(){})}),a},Page.prototype.previousPage=function(){var e=this;return new Promise(function(t,a){e.page>1?(e.page--,e.trigger().then(function(){t()}).catch(function(){a()}),e.table.options.persistence&&e.table.modExists("persistence",!0)&&e.table.modules.persistence.config.page&&e.table.modules.persistence.save("page")):(console.warn("Pagination Error - Previous page would be less than page 1:",0),a())})},Page.prototype.nextPage=function(){var e=this;return new Promise(function(t,a){e.page<e.max?(e.page++,e.trigger().then(function(){t()}).catch(function(){a()}),e.table.options.persistence&&e.table.modExists("persistence",!0)&&e.table.modules.persistence.config.page&&e.table.modules.persistence.save("page")):(e.progressiveLoad||console.warn("Pagination Error - Next page would be greater than maximum page of "+e.max+":",e.max+1),a())})},Page.prototype.getPage=function(){return this.page},Page.prototype.getPageMax=function(){return this.max},Page.prototype.getPageSize=function(e){return this.size},Page.prototype.getMode=function(){return this.mode},Page.prototype.getRows=function(e){var t,a,i;if("local"==this.mode){t=[],!0===this.size?(a=0,i=e.length):(a=this.size*(this.page-1),i=a+parseInt(this.size)),this._setPageButtons();for(var s=a;s<i;s++)e[s]&&t.push(e[s]);return t}return this._setPageButtons(),e.slice(0)},Page.prototype.trigger=function(){var e,t=this;return new Promise(function(a,i){switch(t.mode){case"local":e=t.table.rowManager.scrollLeft,t.table.rowManager.refreshActiveData("page"),t.table.rowManager.scrollHorizontal(e),t.table.options.pageLoaded.call(t.table,t.getPage()),a();break;case"remote":case"progressive_load":case"progressive_scroll":t.table.modules.ajax.blockActiveRequest(),t._getRemotePage().then(function(){a()}).catch(function(){i()});break;default:console.warn("Pagination Error - no such pagination mode:",t.mode),i()}})},Page.prototype._getRemotePage=function(){var e,t,a=this,i=this;return new Promise(function(s,n){if(i.table.modExists("ajax",!0)||n(),e=Tabulator.prototype.helpers.deepClone(i.table.modules.ajax.getParams()||{}),t=i.table.modules.ajax.getParams(),t[a.dataSentNames.page]=i.page,a.size&&(t[a.dataSentNames.size]=a.size),a.table.options.ajaxSorting&&a.table.modExists("sort")){var o=i.table.modules.sort.getSort();o.forEach(function(e){delete e.column}),t[a.dataSentNames.sorters]=o}if(a.table.options.ajaxFiltering&&a.table.modExists("filter")){var r=i.table.modules.filter.getFilters(!0,!0);t[a.dataSentNames.filters]=r}i.table.modules.ajax.setParams(t),i.table.modules.ajax.sendRequest(a.progressiveLoad).then(function(e){i._parseRemoteData(e),s()}).catch(function(e){n()}),i.table.modules.ajax.setParams(e)})},Page.prototype._parseRemoteData=function(e){var t,e,a,i=this;if(void 0===e[this.dataReceivedNames.last_page]&&console.warn("Remote Pagination Error - Server response missing '"+this.dataReceivedNames.last_page+"' property"),e[this.dataReceivedNames.data]){if(this.max=parseInt(e[this.dataReceivedNames.last_page])||1,this.progressiveLoad)switch(this.mode){case"progressive_load":1==this.page?this.table.rowManager.setData(e[this.dataReceivedNames.data],!1,this.initialLoad&&1==this.page):this.table.rowManager.addRows(e[this.dataReceivedNames.data]),this.page<this.max&&setTimeout(function(){i.nextPage().then(function(){}).catch(function(){})},i.table.options.ajaxProgressiveLoadDelay);break;case"progressive_scroll":e=this.table.rowManager.getData().concat(e[this.dataReceivedNames.data]),this.table.rowManager.setData(e,!0,this.initialLoad&&1==this.page),a=this.table.options.ajaxProgressiveLoadScrollMargin||2*this.table.rowManager.element.clientHeight,i.table.rowManager.element.scrollHeight<=i.table.rowManager.element.clientHeight+a&&i.nextPage().then(function(){}).catch(function(){})}else t=this.table.rowManager.scrollLeft,this.table.rowManager.setData(e[this.dataReceivedNames.data],!1,this.initialLoad&&1==this.page),this.table.rowManager.scrollHorizontal(t),this.table.columnManager.scrollHorizontal(t),this.table.options.pageLoaded.call(this.table,this.getPage());this.initialLoad=!1}else console.warn("Remote Pagination Error - Server response missing '"+this.dataReceivedNames.data+"' property")},Page.prototype.footerRedraw=function(){var e=this.table.footerManager.element;Math.ceil(e.clientWidth)-e.scrollWidth<0?this.pagesElement.style.display="none":(this.pagesElement.style.display="",Math.ceil(e.clientWidth)-e.scrollWidth<0&&(this.pagesElement.style.display="none"))},Page.prototype.paginationDataSentNames={page:"page",size:"size",sorters:"sorters",filters:"filters"},Page.prototype.paginationDataReceivedNames={current_page:"current_page",last_page:"last_page",data:"data"},Tabulator.prototype.registerModule("page",Page);
\ No newline at end of file
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var Persistence = function Persistence(table) {
this.table = table; //hold Tabulator object
}
}
}
+
+ if (this.config.columns) {
+ this.table.options.columns = this.load("columns", this.table.options.columns);
+ }
};
Persistence.prototype.initializeColumn = function (column) {
}
keys.forEach(function (key) {
- if (typeof column[key] !== "undefined") {
+ if (key !== "columns" && typeof column[key] !== "undefined") {
from[key] = column[key];
}
});
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
-var Persistence=function(e){this.table=e,this.mode="",this.id="",this.defWatcherBlock=!1,this.config={},this.readFunc=!1,this.writeFunc=!1};Persistence.prototype.localStorageTest=function(){var e="_tabulator_test";try{return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch(e){return!1}},Persistence.prototype.initialize=function(){var e,t=this.table.options.persistenceMode,i=this.table.options.persistenceID;this.mode=!0!==t?t:this.localStorageTest()?"local":"cookie",this.table.options.persistenceReaderFunc?"function"==typeof this.table.options.persistenceReaderFunc?this.readFunc=this.table.options.persistenceReaderFunc:this.readers[this.table.options.persistenceReaderFunc]?this.readFunc=this.readers[this.table.options.persistenceReaderFunc]:console.warn("Persistence Read Error - invalid reader set",this.table.options.persistenceReaderFunc):this.readers[this.mode]?this.readFunc=this.readers[this.mode]:console.warn("Persistence Read Error - invalid reader set",this.mode),this.table.options.persistenceWriterFunc?"function"==typeof this.table.options.persistenceWriterFunc?this.writeFunc=this.table.options.persistenceWriterFunc:this.readers[this.table.options.persistenceWriterFunc]?this.writeFunc=this.readers[this.table.options.persistenceWriterFunc]:console.warn("Persistence Write Error - invalid reader set",this.table.options.persistenceWriterFunc):this.writers[this.mode]?this.writeFunc=this.writers[this.mode]:console.warn("Persistence Write Error - invalid writer set",this.mode),this.id="tabulator-"+(i||this.table.element.getAttribute("id")||""),this.config={sort:!0===this.table.options.persistence||this.table.options.persistence.sort,filter:!0===this.table.options.persistence||this.table.options.persistence.filter,group:!0===this.table.options.persistence||this.table.options.persistence.group,page:!0===this.table.options.persistence||this.table.options.persistence.page,columns:!0===this.table.options.persistence?["title","width","visible"]:this.table.options.persistence.columns},this.config.page&&(e=this.retreiveData("page"))&&(void 0===e.paginationSize||!0!==this.config.page&&!this.config.page.size||(this.table.options.paginationSize=e.paginationSize),void 0===e.paginationInitialPage||!0!==this.config.page&&!this.config.page.page||(this.table.options.paginationInitialPage=e.paginationInitialPage)),this.config.group&&(e=this.retreiveData("group"))&&(void 0===e.groupBy||!0!==this.config.group&&!this.config.group.groupBy||(this.table.options.groupBy=e.groupBy),void 0===e.groupStartOpen||!0!==this.config.group&&!this.config.group.groupStartOpen||(this.table.options.groupStartOpen=e.groupStartOpen),void 0===e.groupHeader||!0!==this.config.group&&!this.config.group.groupHeader||(this.table.options.groupHeader=e.groupHeader))},Persistence.prototype.initializeColumn=function(e){var t,i,o=this;this.config.columns&&(this.defWatcherBlock=!0,t=e.getDefinition(),i=!0===this.config.columns?Object.keys(t):this.config.columns,i.forEach(function(e){var i=Object.getOwnPropertyDescriptor(t,e),s=t[e];i&&Object.defineProperty(t,e,{set:function(e){s=e,o.defWatcherBlock||o.save("columns"),i.set&&i.set(e)},get:function(){return i.get&&i.get(),s}})}),this.defWatcherBlock=!1)},Persistence.prototype.load=function(e,t){var i=this.retreiveData(e);return t&&(i=i?this.mergeDefinition(t,i):t),i},Persistence.prototype.retreiveData=function(e){return!!this.readFunc&&this.readFunc(this.id,e)},Persistence.prototype.mergeDefinition=function(e,t){var i=this,o=[];return t=t||[],t.forEach(function(t,s){var n,r=i._findColumn(e,t);r&&(!0===i.config.columns||void 0==i.config.columns?(n=Object.keys(r),n.push("width")):n=i.config.columns,n.forEach(function(e){void 0!==t[e]&&(r[e]=t[e])}),r.columns&&(r.columns=i.mergeDefinition(r.columns,t.columns)),o.push(r))}),e.forEach(function(e,s){i._findColumn(t,e)||(o.length>s?o.splice(s,0,e):o.push(e))}),o},Persistence.prototype._findColumn=function(e,t){var i=t.columns?"group":t.field?"field":"object";return e.find(function(e){switch(i){case"group":return e.title===t.title&&e.columns.length===t.columns.length;case"field":return e.field===t.field;case"object":return e===t}})},Persistence.prototype.save=function(e){var t={};switch(e){case"columns":t=this.parseColumns(this.table.columnManager.getColumns());break;case"filter":t=this.table.modules.filter.getFilters();break;case"sort":t=this.validateSorters(this.table.modules.sort.getSort());break;case"group":t=this.getGroupConfig();break;case"page":t=this.getPageConfig()}this.writeFunc&&this.writeFunc(this.id,e,t)},Persistence.prototype.validateSorters=function(e){return e.forEach(function(e){e.column=e.field,delete e.field}),e},Persistence.prototype.getGroupConfig=function(){var e={};return this.config.group&&((!0===this.config.group||this.config.group.groupBy)&&(e.groupBy=this.table.options.groupBy),(!0===this.config.group||this.config.group.groupStartOpen)&&(e.groupStartOpen=this.table.options.groupStartOpen),(!0===this.config.group||this.config.group.groupHeader)&&(e.groupHeader=this.table.options.groupHeader)),e},Persistence.prototype.getPageConfig=function(){var e={};return this.config.page&&((!0===this.config.page||this.config.page.size)&&(e.paginationSize=this.table.modules.page.getPageSize()),(!0===this.config.page||this.config.page.page)&&(e.paginationInitialPage=this.table.modules.page.getPage())),e},Persistence.prototype.parseColumns=function(e){var t=this,i=[],o=["headerContextMenu","headerMenu","contextMenu","clickMenu"];return e.forEach(function(e){var s,n={},r=e.getDefinition();e.isGroup?(n.title=r.title,n.columns=t.parseColumns(e.getColumns())):(n.field=e.getField(),!0===t.config.columns||void 0==t.config.columns?(s=Object.keys(r),s.push("width")):s=t.config.columns,s.forEach(function(t){switch(t){case"width":n.width=e.getWidth();break;case"visible":n.visible=e.visible;break;default:"function"!=typeof r[t]&&-1===o.indexOf(t)&&(n[t]=r[t])}})),i.push(n)}),i},Persistence.prototype.readers={local:function(e,t){var i=localStorage.getItem(e+"-"+t);return!!i&&JSON.parse(i)},cookie:function(e,t){var i,o,s=document.cookie,n=e+"-"+t,r=s.indexOf(n+"=");return r>-1&&(s=s.substr(r),i=s.indexOf(";"),i>-1&&(s=s.substr(0,i)),o=s.replace(n+"=","")),!!o&&JSON.parse(o)}},Persistence.prototype.writers={local:function(e,t,i){localStorage.setItem(e+"-"+t,JSON.stringify(i))},cookie:function(e,t,i){var o=new Date;o.setDate(o.getDate()+1e4),document.cookie=e+"-"+t+"="+JSON.stringify(i)+"; expires="+o.toUTCString()}},Tabulator.prototype.registerModule("persistence",Persistence);
\ No newline at end of file
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
+var Persistence=function(e){this.table=e,this.mode="",this.id="",this.defWatcherBlock=!1,this.config={},this.readFunc=!1,this.writeFunc=!1};Persistence.prototype.localStorageTest=function(){var e="_tabulator_test";try{return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch(e){return!1}},Persistence.prototype.initialize=function(){var e,t=this.table.options.persistenceMode,i=this.table.options.persistenceID;this.mode=!0!==t?t:this.localStorageTest()?"local":"cookie",this.table.options.persistenceReaderFunc?"function"==typeof this.table.options.persistenceReaderFunc?this.readFunc=this.table.options.persistenceReaderFunc:this.readers[this.table.options.persistenceReaderFunc]?this.readFunc=this.readers[this.table.options.persistenceReaderFunc]:console.warn("Persistence Read Error - invalid reader set",this.table.options.persistenceReaderFunc):this.readers[this.mode]?this.readFunc=this.readers[this.mode]:console.warn("Persistence Read Error - invalid reader set",this.mode),this.table.options.persistenceWriterFunc?"function"==typeof this.table.options.persistenceWriterFunc?this.writeFunc=this.table.options.persistenceWriterFunc:this.readers[this.table.options.persistenceWriterFunc]?this.writeFunc=this.readers[this.table.options.persistenceWriterFunc]:console.warn("Persistence Write Error - invalid reader set",this.table.options.persistenceWriterFunc):this.writers[this.mode]?this.writeFunc=this.writers[this.mode]:console.warn("Persistence Write Error - invalid writer set",this.mode),this.id="tabulator-"+(i||this.table.element.getAttribute("id")||""),this.config={sort:!0===this.table.options.persistence||this.table.options.persistence.sort,filter:!0===this.table.options.persistence||this.table.options.persistence.filter,group:!0===this.table.options.persistence||this.table.options.persistence.group,page:!0===this.table.options.persistence||this.table.options.persistence.page,columns:!0===this.table.options.persistence?["title","width","visible"]:this.table.options.persistence.columns},this.config.page&&(e=this.retreiveData("page"))&&(void 0===e.paginationSize||!0!==this.config.page&&!this.config.page.size||(this.table.options.paginationSize=e.paginationSize),void 0===e.paginationInitialPage||!0!==this.config.page&&!this.config.page.page||(this.table.options.paginationInitialPage=e.paginationInitialPage)),this.config.group&&(e=this.retreiveData("group"))&&(void 0===e.groupBy||!0!==this.config.group&&!this.config.group.groupBy||(this.table.options.groupBy=e.groupBy),void 0===e.groupStartOpen||!0!==this.config.group&&!this.config.group.groupStartOpen||(this.table.options.groupStartOpen=e.groupStartOpen),void 0===e.groupHeader||!0!==this.config.group&&!this.config.group.groupHeader||(this.table.options.groupHeader=e.groupHeader)),this.config.columns&&(this.table.options.columns=this.load("columns",this.table.options.columns))},Persistence.prototype.initializeColumn=function(e){var t,i,o=this;this.config.columns&&(this.defWatcherBlock=!0,t=e.getDefinition(),i=!0===this.config.columns?Object.keys(t):this.config.columns,i.forEach(function(e){var i=Object.getOwnPropertyDescriptor(t,e),s=t[e];i&&Object.defineProperty(t,e,{set:function(e){s=e,o.defWatcherBlock||o.save("columns"),i.set&&i.set(e)},get:function(){return i.get&&i.get(),s}})}),this.defWatcherBlock=!1)},Persistence.prototype.load=function(e,t){var i=this.retreiveData(e);return t&&(i=i?this.mergeDefinition(t,i):t),i},Persistence.prototype.retreiveData=function(e){return!!this.readFunc&&this.readFunc(this.id,e)},Persistence.prototype.mergeDefinition=function(e,t){var i=this,o=[];return t=t||[],t.forEach(function(t,s){var n,r=i._findColumn(e,t);r&&(!0===i.config.columns||void 0==i.config.columns?(n=Object.keys(r),n.push("width")):n=i.config.columns,n.forEach(function(e){"columns"!==e&&void 0!==t[e]&&(r[e]=t[e])}),r.columns&&(r.columns=i.mergeDefinition(r.columns,t.columns)),o.push(r))}),e.forEach(function(e,s){i._findColumn(t,e)||(o.length>s?o.splice(s,0,e):o.push(e))}),o},Persistence.prototype._findColumn=function(e,t){var i=t.columns?"group":t.field?"field":"object";return e.find(function(e){switch(i){case"group":return e.title===t.title&&e.columns.length===t.columns.length;case"field":return e.field===t.field;case"object":return e===t}})},Persistence.prototype.save=function(e){var t={};switch(e){case"columns":t=this.parseColumns(this.table.columnManager.getColumns());break;case"filter":t=this.table.modules.filter.getFilters();break;case"sort":t=this.validateSorters(this.table.modules.sort.getSort());break;case"group":t=this.getGroupConfig();break;case"page":t=this.getPageConfig()}this.writeFunc&&this.writeFunc(this.id,e,t)},Persistence.prototype.validateSorters=function(e){return e.forEach(function(e){e.column=e.field,delete e.field}),e},Persistence.prototype.getGroupConfig=function(){var e={};return this.config.group&&((!0===this.config.group||this.config.group.groupBy)&&(e.groupBy=this.table.options.groupBy),(!0===this.config.group||this.config.group.groupStartOpen)&&(e.groupStartOpen=this.table.options.groupStartOpen),(!0===this.config.group||this.config.group.groupHeader)&&(e.groupHeader=this.table.options.groupHeader)),e},Persistence.prototype.getPageConfig=function(){var e={};return this.config.page&&((!0===this.config.page||this.config.page.size)&&(e.paginationSize=this.table.modules.page.getPageSize()),(!0===this.config.page||this.config.page.page)&&(e.paginationInitialPage=this.table.modules.page.getPage())),e},Persistence.prototype.parseColumns=function(e){var t=this,i=[],o=["headerContextMenu","headerMenu","contextMenu","clickMenu"];return e.forEach(function(e){var s,n={},r=e.getDefinition();e.isGroup?(n.title=r.title,n.columns=t.parseColumns(e.getColumns())):(n.field=e.getField(),!0===t.config.columns||void 0==t.config.columns?(s=Object.keys(r),s.push("width")):s=t.config.columns,s.forEach(function(t){switch(t){case"width":n.width=e.getWidth();break;case"visible":n.visible=e.visible;break;default:"function"!=typeof r[t]&&-1===o.indexOf(t)&&(n[t]=r[t])}})),i.push(n)}),i},Persistence.prototype.readers={local:function(e,t){var i=localStorage.getItem(e+"-"+t);return!!i&&JSON.parse(i)},cookie:function(e,t){var i,o,s=document.cookie,n=e+"-"+t,r=s.indexOf(n+"=");return r>-1&&(s=s.substr(r),i=s.indexOf(";"),i>-1&&(s=s.substr(0,i)),o=s.replace(n+"=","")),!!o&&JSON.parse(o)}},Persistence.prototype.writers={local:function(e,t,i){localStorage.setItem(e+"-"+t,JSON.stringify(i))},cookie:function(e,t,i){var o=new Date;o.setDate(o.getDate()+1e4),document.cookie=e+"-"+t+"="+JSON.stringify(i)+"; expires="+o.toUTCString()}},Tabulator.prototype.registerModule("persistence",Persistence);
\ No newline at end of file
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var Print = function Print(table) {
this.table = table; //hold Tabulator object
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var Print=function(t){this.table=t,this.element=!1,this.manualBlock=!1};Print.prototype.initialize=function(){window.addEventListener("beforeprint",this.replaceTable.bind(this)),window.addEventListener("afterprint",this.cleanup.bind(this))},Print.prototype.replaceTable=function(){this.manualBlock||(this.element=document.createElement("div"),this.element.classList.add("tabulator-print-table"),this.element.appendChild(this.table.modules.export.genereateTable(this.table.options.printConfig,this.table.options.printStyled,this.table.options.printRowRange,"print")),this.table.element.style.display="none",this.table.element.parentNode.insertBefore(this.element,this.table.element))},Print.prototype.cleanup=function(){document.body.classList.remove("tabulator-print-fullscreen-hide"),this.element&&this.element.parentNode&&(this.element.parentNode.removeChild(this.element),this.table.element.style.display="")},Print.prototype.printFullscreen=function(t,e,i){var n,l,o=window.scrollX,a=window.scrollY,s=document.createElement("div"),r=document.createElement("div"),p=this.table.modules.export.genereateTable(void 0!==i?i:this.table.options.printConfig,void 0!==e?e:this.table.options.printStyled,t,"print");this.manualBlock=!0,this.element=document.createElement("div"),this.element.classList.add("tabulator-print-fullscreen"),this.table.options.printHeader&&(s.classList.add("tabulator-print-header"),n="function"==typeof this.table.options.printHeader?this.table.options.printHeader.call(this.table):this.table.options.printHeader,"string"==typeof n?s.innerHTML=n:s.appendChild(n),this.element.appendChild(s)),this.element.appendChild(p),this.table.options.printFooter&&(r.classList.add("tabulator-print-footer"),l="function"==typeof this.table.options.printFooter?this.table.options.printFooter.call(this.table):this.table.options.printFooter,"string"==typeof l?r.innerHTML=l:r.appendChild(l),this.element.appendChild(r)),document.body.classList.add("tabulator-print-fullscreen-hide"),document.body.appendChild(this.element),this.table.options.printFormatter&&this.table.options.printFormatter(this.element,p),window.print(),this.cleanup(),window.scrollTo(o,a),this.manualBlock=!1},Tabulator.prototype.registerModule("print",Print);
\ No newline at end of file
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var ReactiveData = function ReactiveData(table) {
this.table = table; //hold Tabulator object
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var ReactiveData=function(e){this.table=e,this.data=!1,this.blocked=!1,this.origFuncs={},this.currentVersion=0};ReactiveData.prototype.watchData=function(e){var t,a=this;this.currentVersion++,t=this.currentVersion,a.unwatchData(),a.data=e,a.origFuncs.push=e.push,Object.defineProperty(a.data,"push",{enumerable:!1,configurable:!0,value:function(){var r=Array.from(arguments);return a.blocked||t!==a.currentVersion||r.forEach(function(e){a.table.rowManager.addRowActual(e,!1)}),a.origFuncs.push.apply(e,arguments)}}),a.origFuncs.unshift=e.unshift,Object.defineProperty(a.data,"unshift",{enumerable:!1,configurable:!0,value:function(){var r=Array.from(arguments);return a.blocked||t!==a.currentVersion||r.forEach(function(e){a.table.rowManager.addRowActual(e,!0)}),a.origFuncs.unshift.apply(e,arguments)}}),a.origFuncs.shift=e.shift,Object.defineProperty(a.data,"shift",{enumerable:!1,configurable:!0,value:function(){var r;return a.blocked||t!==a.currentVersion||a.data.length&&(r=a.table.rowManager.getRowFromDataObject(a.data[0]))&&r.deleteActual(),a.origFuncs.shift.call(e)}}),a.origFuncs.pop=e.pop,Object.defineProperty(a.data,"pop",{enumerable:!1,configurable:!0,value:function(){var r;return a.blocked||t!==a.currentVersion||a.data.length&&(r=a.table.rowManager.getRowFromDataObject(a.data[a.data.length-1]))&&r.deleteActual(),a.origFuncs.pop.call(e)}}),a.origFuncs.splice=e.splice,Object.defineProperty(a.data,"splice",{enumerable:!1,configurable:!0,value:function(){var r,n=Array.from(arguments),o=n[0]<0?e.length+n[0]:n[0],i=n[1],c=!!n[2]&&n.slice(2);if(!a.blocked&&t===a.currentVersion){if(c&&(r=!!e[o]&&a.table.rowManager.getRowFromDataObject(e[o]),r?c.forEach(function(e){a.table.rowManager.addRowActual(e,!0,r,!0)}):(c=c.slice().reverse(),c.forEach(function(e){a.table.rowManager.addRowActual(e,!0,!1,!0)}))),0!==i){var u=e.slice(o,void 0===n[1]?n[1]:o+i);u.forEach(function(e,t){var r=a.table.rowManager.getRowFromDataObject(e);r&&r.deleteActual(t!==u.length-1)})}(c||0!==i)&&a.table.rowManager.reRenderInPosition()}return a.origFuncs.splice.apply(e,arguments)}})},ReactiveData.prototype.unwatchData=function(){if(!1!==this.data)for(var e in this.origFuncs)Object.defineProperty(this.data,e,{enumerable:!0,configurable:!0,writable:!0,value:this.origFuncs.key})},ReactiveData.prototype.watchRow=function(e){var t=e.getData();this.blocked=!0;for(var a in t)this.watchKey(e,t,a);this.table.options.dataTree&&this.watchTreeChildren(e),this.blocked=!1},ReactiveData.prototype.watchTreeChildren=function(e){function t(){a.table.modules.dataTree.initializeRow(e),a.table.modules.dataTree.layoutRow(e),a.table.rowManager.refreshActiveData("tree",!1,!0)}var a=this,r=e.getData()[this.table.options.dataTreeChildField],n={};r&&(n.push=r.push,Object.defineProperty(r,"push",{enumerable:!1,configurable:!0,value:function(){var e=n.push.apply(r,arguments);return t(),e}}),n.unshift=r.unshift,Object.defineProperty(r,"unshift",{enumerable:!1,configurable:!0,value:function(){var e=n.unshift.apply(r,arguments);return t(),e}}),n.shift=r.shift,Object.defineProperty(r,"shift",{enumerable:!1,configurable:!0,value:function(){var e=n.shift.call(r);return t(),e}}),n.pop=r.pop,Object.defineProperty(r,"pop",{enumerable:!1,configurable:!0,value:function(){var e=n.pop.call(r);return t(),e}}),n.splice=r.splice,Object.defineProperty(r,"splice",{enumerable:!1,configurable:!0,value:function(){var e=n.splice.apply(r,arguments);return t(),e}}))},ReactiveData.prototype.watchKey=function(e,t,a){var r=this,n=Object.getOwnPropertyDescriptor(t,a),o=t[a],i=this.currentVersion;Object.defineProperty(t,a,{set:function(t){if(o=t,!r.blocked&&i===r.currentVersion){var c={};c[a]=t,e.updateData(c)}n.set&&n.set(t)},get:function(){return n.get&&n.get(),o}})},ReactiveData.prototype.unwatchRow=function(e){var t=e.getData();for(var a in t)Object.defineProperty(t,a,{value:t[a]})},ReactiveData.prototype.block=function(){this.blocked=!0},ReactiveData.prototype.unblock=function(){this.blocked=!1},Tabulator.prototype.registerModule("reactiveData",ReactiveData);
\ No newline at end of file
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var ResizeColumns = function ResizeColumns(table) {
this.table = table; //hold Tabulator object
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var ResizeColumns=function(e){this.table=e,this.startColumn=!1,this.startX=!1,this.startWidth=!1,this.handle=null,this.prevHandle=null};ResizeColumns.prototype.initializeColumn=function(e,t,i){var o=this,n=!1,s=this.table.options.resizableColumns;if("header"===e&&(n="textarea"==t.definition.formatter||t.definition.variableHeight,t.modules.resize={variableHeight:n}),!0===s||s==e){var a=document.createElement("div");a.className="tabulator-col-resize-handle";var l=document.createElement("div");l.className="tabulator-col-resize-handle prev",a.addEventListener("click",function(e){e.stopPropagation()});var r=function(e){var i=t.getLastColumn();i&&o._checkResizability(i)&&(o.startColumn=t,o._mouseDown(e,i,a))};a.addEventListener("mousedown",r),a.addEventListener("touchstart",r,{passive:!0}),a.addEventListener("dblclick",function(e){var i=t.getLastColumn();i&&o._checkResizability(i)&&(e.stopPropagation(),i.reinitializeWidth(!0))}),l.addEventListener("click",function(e){e.stopPropagation()});var d=function(e){var i,n,s;(i=t.getFirstColumn())&&(n=o.table.columnManager.findColumnIndex(i),(s=n>0&&o.table.columnManager.getColumnByIndex(n-1))&&o._checkResizability(s)&&(o.startColumn=t,o._mouseDown(e,s,l)))};l.addEventListener("mousedown",d),l.addEventListener("touchstart",d,{passive:!0}),l.addEventListener("dblclick",function(e){var i,n,s;(i=t.getFirstColumn())&&(n=o.table.columnManager.findColumnIndex(i),(s=n>0&&o.table.columnManager.getColumnByIndex(n-1))&&o._checkResizability(s)&&(e.stopPropagation(),s.reinitializeWidth(!0)))}),i.appendChild(a),i.appendChild(l)}},ResizeColumns.prototype._checkResizability=function(e){return void 0!==e.definition.resizable?e.definition.resizable:this.table.options.resizableColumns},ResizeColumns.prototype._mouseDown=function(e,t,i){function o(e){s.table.rtl?t.setWidth(s.startWidth-((void 0===e.screenX?e.touches[0].screenX:e.screenX)-s.startX)):t.setWidth(s.startWidth+((void 0===e.screenX?e.touches[0].screenX:e.screenX)-s.startX)),s.table.options.virtualDomHoz&&s.table.vdomHoz.reinitialize(!0),!s.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights()}function n(e){s.startColumn.modules.edit&&(s.startColumn.modules.edit.blocked=!1),s.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights(),document.body.removeEventListener("mouseup",n),document.body.removeEventListener("mousemove",o),i.removeEventListener("touchmove",o),i.removeEventListener("touchend",n),s.table.element.classList.remove("tabulator-block-select"),s.table.options.persistence&&s.table.modExists("persistence",!0)&&s.table.modules.persistence.config.columns&&s.table.modules.persistence.save("columns"),s.table.options.columnResized.call(s.table,t.getComponent())}var s=this;s.table.element.classList.add("tabulator-block-select"),e.stopPropagation(),s.startColumn.modules.edit&&(s.startColumn.modules.edit.blocked=!0),s.startX=void 0===e.screenX?e.touches[0].screenX:e.screenX,s.startWidth=t.getWidth(),document.body.addEventListener("mousemove",o),document.body.addEventListener("mouseup",n),i.addEventListener("touchmove",o,{passive:!0}),i.addEventListener("touchend",n)},Tabulator.prototype.registerModule("resizeColumns",ResizeColumns);
\ No newline at end of file
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var ResizeRows = function ResizeRows(table) {
this.table = table; //hold Tabulator object
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var ResizeRows=function(e){this.table=e,this.startColumn=!1,this.startY=!1,this.startHeight=!1,this.handle=null,this.prevHandle=null};ResizeRows.prototype.initializeRow=function(e){var t=this,o=e.getElement(),s=document.createElement("div");s.className="tabulator-row-resize-handle";var n=document.createElement("div");n.className="tabulator-row-resize-handle prev",s.addEventListener("click",function(e){e.stopPropagation()});var a=function(o){t.startRow=e,t._mouseDown(o,e,s)};s.addEventListener("mousedown",a),s.addEventListener("touchstart",a,{passive:!0}),n.addEventListener("click",function(e){e.stopPropagation()});var r=function(o){var s=t.table.rowManager.prevDisplayRow(e);s&&(t.startRow=s,t._mouseDown(o,s,n))};n.addEventListener("mousedown",r),n.addEventListener("touchstart",r,{passive:!0}),o.appendChild(s),o.appendChild(n)},ResizeRows.prototype._mouseDown=function(e,t,o){function s(e){t.setHeight(a.startHeight+((void 0===e.screenY?e.touches[0].screenY:e.screenY)-a.startY))}function n(e){document.body.removeEventListener("mouseup",s),document.body.removeEventListener("mousemove",s),o.removeEventListener("touchmove",s),o.removeEventListener("touchend",n),a.table.element.classList.remove("tabulator-block-select"),a.table.options.rowResized.call(this.table,t.getComponent())}var a=this;a.table.element.classList.add("tabulator-block-select"),e.stopPropagation(),a.startY=void 0===e.screenY?e.touches[0].screenY:e.screenY,a.startHeight=t.getHeight(),document.body.addEventListener("mousemove",s),document.body.addEventListener("mouseup",n),o.addEventListener("touchmove",s,{passive:!0}),o.addEventListener("touchend",n)},Tabulator.prototype.registerModule("resizeRows",ResizeRows);
\ No newline at end of file
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var ResizeTable = function ResizeTable(table) {
this.table = table; //hold Tabulator object
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var ResizeTable=function(e){this.table=e,this.binding=!1,this.observer=!1,this.containerObserver=!1,this.tableHeight=0,this.tableWidth=0,this.containerHeight=0,this.containerWidth=0,this.autoResize=!1};ResizeTable.prototype.initialize=function(e){var t,i=this,n=this.table;this.tableHeight=n.element.clientHeight,this.tableWidth=n.element.clientWidth,n.element.parentNode&&(this.containerHeight=n.element.parentNode.clientHeight,this.containerWidth=n.element.parentNode.clientWidth),"undefined"!=typeof ResizeObserver&&"virtual"===n.rowManager.getRenderMode()?(this.autoResize=!0,this.observer=new ResizeObserver(function(e){if(!n.browserMobile||n.browserMobile&&!n.modules.edit.currentCell){var t=Math.floor(e[0].contentRect.height),r=Math.floor(e[0].contentRect.width);i.tableHeight==t&&i.tableWidth==r||(i.tableHeight=t,i.tableWidth=r,n.element.parentNode&&(i.containerHeight=n.element.parentNode.clientHeight,i.containerWidth=n.element.parentNode.clientWidth),n.options.virtualDomHoz&&n.vdomHoz.reinitialize(!0),n.redraw())}}),this.observer.observe(n.element),t=window.getComputedStyle(n.element),this.table.element.parentNode&&!this.table.rowManager.fixedHeight&&(t.getPropertyValue("max-height")||t.getPropertyValue("min-height"))&&(this.containerObserver=new ResizeObserver(function(e){if(!n.browserMobile||n.browserMobile&&!n.modules.edit.currentCell){var t=Math.floor(e[0].contentRect.height),r=Math.floor(e[0].contentRect.width);i.containerHeight==t&&i.containerWidth==r||(i.containerHeight=t,i.containerWidth=r,i.tableHeight=n.element.clientHeight,i.tableWidth=n.element.clientWidth),n.options.virtualDomHoz&&n.vdomHoz.reinitialize(!0),n.redraw()}}),this.containerObserver.observe(this.table.element.parentNode))):(this.binding=function(){(!n.browserMobile||n.browserMobile&&!n.modules.edit.currentCell)&&(n.options.virtualDomHoz&&n.vdomHoz.reinitialize(!0),n.redraw())},window.addEventListener("resize",this.binding))},ResizeTable.prototype.clearBindings=function(e){this.binding&&window.removeEventListener("resize",this.binding),this.observer&&this.observer.unobserve(this.table.element),this.containerObserver&&this.containerObserver.unobserve(this.table.element.parentNode)},Tabulator.prototype.registerModule("resizeTable",ResizeTable);
\ No newline at end of file
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var ResponsiveLayout = function ResponsiveLayout(table) {
this.table = table; //hold Tabulator object
};
output.push({
+ field: column.field,
title: column.definition.title,
value: column.modules.format.formatter.call(self.table.modules.format, mockCellComponent, column.modules.format.params)
});
} else {
output.push({
+ field: column.field,
title: column.definition.title,
value: value
});
};
ResponsiveLayout.prototype.formatCollapsedData = function (data) {
- var list = document.createElement("table"),
- listContents = "";
+ var list = document.createElement("table");
data.forEach(function (item) {
- var div = document.createElement("div");
+ var row = document.createElement("tr");
+ var titleData = document.createElement("td");
+ var valueData = document.createElement("td");
+ var node_content;
+
+ var titleHighlight = document.createElement("strong");
+ titleData.appendChild(titleHighlight);
+ this.table.modules.localize.bind("columns|" + item.field, function (text) {
+ titleHighlight.innerText = text || item.title;
+ });
if (item.value instanceof Node) {
- div.appendChild(item.value);
- item.value = div.innerHTML;
+ node_content = document.createElement("div");
+ node_content.appendChild(item.value);
+ valueData.appendChild(node_content);
+ } else {
+ valueData.innerHTML = item.value;
}
- listContents += "<tr><td><strong>" + item.title + "</strong></td><td>" + item.value + "</td></tr>";
- });
-
- list.innerHTML = listContents;
+ row.appendChild(titleData);
+ row.appendChild(valueData);
+ list.appendChild(row);
+ }, this);
return Object.keys(data).length ? list : "";
};
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
-var ResponsiveLayout=function(e){this.table=e,this.columns=[],this.hiddenColumns=[],this.mode="",this.index=0,this.collapseFormatter=[],this.collapseStartOpen=!0,this.collapseHandleColumn=!1};ResponsiveLayout.prototype.initialize=function(){var e=this,t=[];this.mode=this.table.options.responsiveLayout,this.collapseFormatter=this.table.options.responsiveLayoutCollapseFormatter||this.formatCollapsedData,this.collapseStartOpen=this.table.options.responsiveLayoutCollapseStartOpen,this.hiddenColumns=[],this.table.columnManager.columnsByIndex.forEach(function(o,n){o.modules.responsive&&o.modules.responsive.order&&o.modules.responsive.visible&&(o.modules.responsive.index=n,t.push(o),o.visible||"collapse"!==e.mode||e.hiddenColumns.push(o))}),t=t.reverse(),t=t.sort(function(e,t){return t.modules.responsive.order-e.modules.responsive.order||t.modules.responsive.index-e.modules.responsive.index}),this.columns=t,"collapse"===this.mode&&this.generateCollapsedContent();for(var o=this.table.columnManager.columnsByIndex,n=Array.isArray(o),s=0,o=n?o:o[Symbol.iterator]();;){var i;if(n){if(s>=o.length)break;i=o[s++]}else{if(s=o.next(),s.done)break;i=s.value}var l=i;if("responsiveCollapse"==l.definition.formatter){this.collapseHandleColumn=l;break}}this.collapseHandleColumn&&(this.hiddenColumns.length?this.collapseHandleColumn.show():this.collapseHandleColumn.hide())},ResponsiveLayout.prototype.initializeColumn=function(e){var t=e.getDefinition();e.modules.responsive={order:void 0===t.responsive?1:t.responsive,visible:!1!==t.visible}},ResponsiveLayout.prototype.initializeRow=function(e){var t;"calc"!==e.type&&(t=document.createElement("div"),t.classList.add("tabulator-responsive-collapse"),e.modules.responsiveLayout={element:t,open:this.collapseStartOpen},this.collapseStartOpen||(t.style.display="none"))},ResponsiveLayout.prototype.layoutRow=function(e){var t=e.getElement();e.modules.responsiveLayout&&(t.appendChild(e.modules.responsiveLayout.element),this.generateCollapsedRowContent(e))},ResponsiveLayout.prototype.updateColumnVisibility=function(e,t){e.modules.responsive&&(e.modules.responsive.visible=t,this.initialize())},ResponsiveLayout.prototype.hideColumn=function(e){var t=this.hiddenColumns.length;e.hide(!1,!0),"collapse"===this.mode&&(this.hiddenColumns.unshift(e),this.generateCollapsedContent(),this.collapseHandleColumn&&!t&&this.collapseHandleColumn.show())},ResponsiveLayout.prototype.showColumn=function(e){var t;e.show(!1,!0),e.setWidth(e.getWidth()),"collapse"===this.mode&&(t=this.hiddenColumns.indexOf(e),t>-1&&this.hiddenColumns.splice(t,1),this.generateCollapsedContent(),this.collapseHandleColumn&&!this.hiddenColumns.length&&this.collapseHandleColumn.hide())},ResponsiveLayout.prototype.update=function(){for(var e=this,t=!0;t;){var o="fitColumns"==e.table.modules.layout.getMode()?e.table.columnManager.getFlexBaseWidth():e.table.columnManager.getWidth(),n=(e.table.options.headerVisible?e.table.columnManager.element.clientWidth:e.table.element.clientWidth)-o;if(n<0){var s=e.columns[e.index];s?(e.hideColumn(s),e.index++):t=!1}else{var i=e.columns[e.index-1];i&&n>0&&n>=i.getWidth()?(e.showColumn(i),e.index--):t=!1}e.table.rowManager.activeRowsCount||e.table.rowManager.renderEmptyScroll()}},ResponsiveLayout.prototype.generateCollapsedContent=function(){var e=this;this.table.rowManager.getDisplayRows().forEach(function(t){e.generateCollapsedRowContent(t)})},ResponsiveLayout.prototype.generateCollapsedRowContent=function(e){var t,o;if(e.modules.responsiveLayout){for(t=e.modules.responsiveLayout.element;t.firstChild;)t.removeChild(t.firstChild);o=this.collapseFormatter(this.generateCollapsedRowData(e)),o&&t.appendChild(o)}},ResponsiveLayout.prototype.generateCollapsedRowData=function(e){var t,o=this,n=e.getData(),s=[];return this.hiddenColumns.forEach(function(i){var l=i.getFieldValue(n);i.definition.title&&i.field&&(i.modules.format&&o.table.options.responsiveLayoutCollapseUseFormatters?(t={value:!1,data:{},getValue:function(){return l},getData:function(){return n},getElement:function(){return document.createElement("div")},getRow:function(){return e.getComponent()},getColumn:function(){return i.getComponent()}},s.push({title:i.definition.title,value:i.modules.format.formatter.call(o.table.modules.format,t,i.modules.format.params)})):s.push({title:i.definition.title,value:l}))}),s},ResponsiveLayout.prototype.formatCollapsedData=function(e){var t=document.createElement("table"),o="";return e.forEach(function(e){var t=document.createElement("div");e.value instanceof Node&&(t.appendChild(e.value),e.value=t.innerHTML),o+="<tr><td><strong>"+e.title+"</strong></td><td>"+e.value+"</td></tr>"}),t.innerHTML=o,Object.keys(e).length?t:""},Tabulator.prototype.registerModule("responsiveLayout",ResponsiveLayout);
\ No newline at end of file
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
+var ResponsiveLayout=function(e){this.table=e,this.columns=[],this.hiddenColumns=[],this.mode="",this.index=0,this.collapseFormatter=[],this.collapseStartOpen=!0,this.collapseHandleColumn=!1};ResponsiveLayout.prototype.initialize=function(){var e=this,t=[];this.mode=this.table.options.responsiveLayout,this.collapseFormatter=this.table.options.responsiveLayoutCollapseFormatter||this.formatCollapsedData,this.collapseStartOpen=this.table.options.responsiveLayoutCollapseStartOpen,this.hiddenColumns=[],this.table.columnManager.columnsByIndex.forEach(function(o,n){o.modules.responsive&&o.modules.responsive.order&&o.modules.responsive.visible&&(o.modules.responsive.index=n,t.push(o),o.visible||"collapse"!==e.mode||e.hiddenColumns.push(o))}),t=t.reverse(),t=t.sort(function(e,t){return t.modules.responsive.order-e.modules.responsive.order||t.modules.responsive.index-e.modules.responsive.index}),this.columns=t,"collapse"===this.mode&&this.generateCollapsedContent();for(var o=this.table.columnManager.columnsByIndex,n=Array.isArray(o),s=0,o=n?o:o[Symbol.iterator]();;){var i;if(n){if(s>=o.length)break;i=o[s++]}else{if(s=o.next(),s.done)break;i=s.value}var l=i;if("responsiveCollapse"==l.definition.formatter){this.collapseHandleColumn=l;break}}this.collapseHandleColumn&&(this.hiddenColumns.length?this.collapseHandleColumn.show():this.collapseHandleColumn.hide())},ResponsiveLayout.prototype.initializeColumn=function(e){var t=e.getDefinition();e.modules.responsive={order:void 0===t.responsive?1:t.responsive,visible:!1!==t.visible}},ResponsiveLayout.prototype.initializeRow=function(e){var t;"calc"!==e.type&&(t=document.createElement("div"),t.classList.add("tabulator-responsive-collapse"),e.modules.responsiveLayout={element:t,open:this.collapseStartOpen},this.collapseStartOpen||(t.style.display="none"))},ResponsiveLayout.prototype.layoutRow=function(e){var t=e.getElement();e.modules.responsiveLayout&&(t.appendChild(e.modules.responsiveLayout.element),this.generateCollapsedRowContent(e))},ResponsiveLayout.prototype.updateColumnVisibility=function(e,t){e.modules.responsive&&(e.modules.responsive.visible=t,this.initialize())},ResponsiveLayout.prototype.hideColumn=function(e){var t=this.hiddenColumns.length;e.hide(!1,!0),"collapse"===this.mode&&(this.hiddenColumns.unshift(e),this.generateCollapsedContent(),this.collapseHandleColumn&&!t&&this.collapseHandleColumn.show())},ResponsiveLayout.prototype.showColumn=function(e){var t;e.show(!1,!0),e.setWidth(e.getWidth()),"collapse"===this.mode&&(t=this.hiddenColumns.indexOf(e),t>-1&&this.hiddenColumns.splice(t,1),this.generateCollapsedContent(),this.collapseHandleColumn&&!this.hiddenColumns.length&&this.collapseHandleColumn.hide())},ResponsiveLayout.prototype.update=function(){for(var e=this,t=!0;t;){var o="fitColumns"==e.table.modules.layout.getMode()?e.table.columnManager.getFlexBaseWidth():e.table.columnManager.getWidth(),n=(e.table.options.headerVisible?e.table.columnManager.element.clientWidth:e.table.element.clientWidth)-o;if(n<0){var s=e.columns[e.index];s?(e.hideColumn(s),e.index++):t=!1}else{var i=e.columns[e.index-1];i&&n>0&&n>=i.getWidth()?(e.showColumn(i),e.index--):t=!1}e.table.rowManager.activeRowsCount||e.table.rowManager.renderEmptyScroll()}},ResponsiveLayout.prototype.generateCollapsedContent=function(){var e=this;this.table.rowManager.getDisplayRows().forEach(function(t){e.generateCollapsedRowContent(t)})},ResponsiveLayout.prototype.generateCollapsedRowContent=function(e){var t,o;if(e.modules.responsiveLayout){for(t=e.modules.responsiveLayout.element;t.firstChild;)t.removeChild(t.firstChild);o=this.collapseFormatter(this.generateCollapsedRowData(e)),o&&t.appendChild(o)}},ResponsiveLayout.prototype.generateCollapsedRowData=function(e){var t,o=this,n=e.getData(),s=[];return this.hiddenColumns.forEach(function(i){var l=i.getFieldValue(n);i.definition.title&&i.field&&(i.modules.format&&o.table.options.responsiveLayoutCollapseUseFormatters?(t={value:!1,data:{},getValue:function(){return l},getData:function(){return n},getElement:function(){return document.createElement("div")},getRow:function(){return e.getComponent()},getColumn:function(){return i.getComponent()}},s.push({field:i.field,title:i.definition.title,value:i.modules.format.formatter.call(o.table.modules.format,t,i.modules.format.params)})):s.push({field:i.field,title:i.definition.title,value:l}))}),s},ResponsiveLayout.prototype.formatCollapsedData=function(e){var t=document.createElement("table");return e.forEach(function(e){var o,n=document.createElement("tr"),s=document.createElement("td"),i=document.createElement("td"),l=document.createElement("strong");s.appendChild(l),this.table.modules.localize.bind("columns|"+e.field,function(t){l.innerText=t||e.title}),e.value instanceof Node?(o=document.createElement("div"),o.appendChild(e.value),i.appendChild(o)):i.innerHTML=e.value,n.appendChild(s),n.appendChild(i),t.appendChild(n)},this),Object.keys(e).length?t:""},Tabulator.prototype.registerModule("responsiveLayout",ResponsiveLayout);
\ No newline at end of file
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var SelectRow = function SelectRow(table) {
this.table = table; //hold Tabulator object
if (row) {
if (this.selectedRows.indexOf(row) == -1) {
+ row.getElement().classList.add("tabulator-selected");
if (!row.modules.select) {
row.modules.select = {};
}
if (row.modules.select.checkboxEl) {
row.modules.select.checkboxEl.checked = true;
}
- row.getElement().classList.add("tabulator-selected");
this.selectedRows.push(row);
if (index > -1) {
+ row.getElement().classList.remove("tabulator-selected");
if (!row.modules.select) {
row.modules.select = {};
}
if (row.modules.select.checkboxEl) {
row.modules.select.checkboxEl.checked = false;
}
- row.getElement().classList.remove("tabulator-selected");
self.selectedRows.splice(index, 1);
if (this.table.options.dataTreeSelectPropagate) {
};
SelectRow.prototype.childRowSelection = function (row, select) {
- var children = this.table.modules.dataTree.getChildren(row);
+ var children = this.table.modules.dataTree.getChildren(row, true);
if (select) {
for (var _iterator = children, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
-var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},SelectRow=function(e){this.table=e,this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],this.headerCheckboxElement=null};SelectRow.prototype.clearSelectionData=function(e){this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],e||this._rowSelectionChanged()},SelectRow.prototype.initializeRow=function(e){var t=this,o=e.getElement(),l=function e(){setTimeout(function(){t.selecting=!1},50),document.body.removeEventListener("mouseup",e)};e.modules.select={selected:!1},t.table.options.selectableCheck.call(this.table,e.getComponent())?(o.classList.add("tabulator-selectable"),o.classList.remove("tabulator-unselectable"),t.table.options.selectable&&"highlight"!=t.table.options.selectable&&("click"===t.table.options.selectableRangeMode?o.addEventListener("click",function(o){if(o.shiftKey){t.table._clearSelection(),t.lastClickedRow=t.lastClickedRow||e;var l=t.table.rowManager.getDisplayRowIndex(t.lastClickedRow),s=t.table.rowManager.getDisplayRowIndex(e),c=l<=s?l:s,i=l>=s?l:s,n=t.table.rowManager.getDisplayRows().slice(0),a=n.splice(c,i-c+1);o.ctrlKey||o.metaKey?(a.forEach(function(o){o!==t.lastClickedRow&&(!0===t.table.options.selectable||t.isRowSelected(e)?t.toggleRow(o):t.selectedRows.length<t.table.options.selectable&&t.toggleRow(o))}),t.lastClickedRow=e):(t.deselectRows(void 0,!0),!0!==t.table.options.selectable&&a.length>t.table.options.selectable&&(a=a.slice(0,t.table.options.selectable)),t.selectRows(a)),t.table._clearSelection()}else o.ctrlKey||o.metaKey?(t.toggleRow(e),t.lastClickedRow=e):(t.deselectRows(void 0,!0),t.selectRows(e),t.lastClickedRow=e)}):(o.addEventListener("click",function(o){t.table.modExists("edit")&&t.table.modules.edit.getCurrentCell()||t.table._clearSelection(),t.selecting||t.toggleRow(e)}),o.addEventListener("mousedown",function(o){if(o.shiftKey)return t.table._clearSelection(),t.selecting=!0,t.selectPrev=[],document.body.addEventListener("mouseup",l),document.body.addEventListener("keyup",l),t.toggleRow(e),!1}),o.addEventListener("mouseenter",function(o){t.selecting&&(t.table._clearSelection(),t.toggleRow(e),t.selectPrev[1]==e&&t.toggleRow(t.selectPrev[0]))}),o.addEventListener("mouseout",function(o){t.selecting&&(t.table._clearSelection(),t.selectPrev.unshift(e))})))):(o.classList.add("tabulator-unselectable"),o.classList.remove("tabulator-selectable"))},SelectRow.prototype.toggleRow=function(e){this.table.options.selectableCheck.call(this.table,e.getComponent())&&(e.modules.select&&e.modules.select.selected?this._deselectRow(e):this._selectRow(e))},SelectRow.prototype.selectRows=function(e){var t,o=this;switch(void 0===e?"undefined":_typeof(e)){case"undefined":this.table.rowManager.rows.forEach(function(e){o._selectRow(e,!0,!0)}),this._rowSelectionChanged();break;case"string":t=this.table.rowManager.findRow(e),t?this._selectRow(t,!0,!0):this.table.rowManager.getRows(e).forEach(function(e){o._selectRow(e,!0,!0)}),this._rowSelectionChanged();break;default:Array.isArray(e)?(e.forEach(function(e){o._selectRow(e,!0,!0)}),this._rowSelectionChanged()):this._selectRow(e,!1,!0)}},SelectRow.prototype._selectRow=function(e,t,o){if(!isNaN(this.table.options.selectable)&&!0!==this.table.options.selectable&&!o&&this.selectedRows.length>=this.table.options.selectable){if(!this.table.options.selectableRollingSelection)return!1;this._deselectRow(this.selectedRows[0])}var l=this.table.rowManager.findRow(e);l?-1==this.selectedRows.indexOf(l)&&(l.modules.select||(l.modules.select={}),l.modules.select.selected=!0,l.modules.select.checkboxEl&&(l.modules.select.checkboxEl.checked=!0),l.getElement().classList.add("tabulator-selected"),this.selectedRows.push(l),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(l,!0),t||this.table.options.rowSelected.call(this.table,l.getComponent()),this._rowSelectionChanged(t)):t||console.warn("Selection Error - No such row found, ignoring selection:"+e)},SelectRow.prototype.isRowSelected=function(e){return-1!==this.selectedRows.indexOf(e)},SelectRow.prototype.deselectRows=function(e,t){var o,l=this;if(void 0===e){o=l.selectedRows.length;for(var s=0;s<o;s++)l._deselectRow(l.selectedRows[0],!0);l._rowSelectionChanged(t)}else Array.isArray(e)?(e.forEach(function(e){l._deselectRow(e,!0)}),l._rowSelectionChanged(t)):l._deselectRow(e,t)},SelectRow.prototype._deselectRow=function(e,t){var o,l=this,s=l.table.rowManager.findRow(e);s?(o=l.selectedRows.findIndex(function(e){return e==s}))>-1&&(s.modules.select||(s.modules.select={}),s.modules.select.selected=!1,s.modules.select.checkboxEl&&(s.modules.select.checkboxEl.checked=!1),s.getElement().classList.remove("tabulator-selected"),l.selectedRows.splice(o,1),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(s,!1),t||l.table.options.rowDeselected.call(this.table,s.getComponent()),l._rowSelectionChanged(t)):t||console.warn("Deselection Error - No such row found, ignoring selection:"+e)},SelectRow.prototype.getSelectedData=function(){var e=[];return this.selectedRows.forEach(function(t){e.push(t.getData())}),e},SelectRow.prototype.getSelectedRows=function(){var e=[];return this.selectedRows.forEach(function(t){e.push(t.getComponent())}),e},SelectRow.prototype._rowSelectionChanged=function(e){this.headerCheckboxElement&&(0===this.selectedRows.length?(this.headerCheckboxElement.checked=!1,this.headerCheckboxElement.indeterminate=!1):this.table.rowManager.rows.length===this.selectedRows.length?(this.headerCheckboxElement.checked=!0,this.headerCheckboxElement.indeterminate=!1):(this.headerCheckboxElement.indeterminate=!0,this.headerCheckboxElement.checked=!1)),e||this.table.options.rowSelectionChanged.call(this.table,this.getSelectedData(),this.getSelectedRows())},SelectRow.prototype.registerRowSelectCheckbox=function(e,t){e._row.modules.select||(e._row.modules.select={}),e._row.modules.select.checkboxEl=t},SelectRow.prototype.registerHeaderSelectCheckbox=function(e){this.headerCheckboxElement=e},SelectRow.prototype.childRowSelection=function(e,t){var o=this.table.modules.dataTree.getChildren(e);if(t)for(var l=o,s=Array.isArray(l),c=0,l=s?l:l[Symbol.iterator]();;){var i;if(s){if(c>=l.length)break;i=l[c++]}else{if(c=l.next(),c.done)break;i=c.value}var n=i;this._selectRow(n,!0)}else for(var a=o,r=Array.isArray(a),d=0,a=r?a:a[Symbol.iterator]();;){var h;if(r){if(d>=a.length)break;h=a[d++]}else{if(d=a.next(),d.done)break;h=d.value}var w=h;this._deselectRow(w,!0)}},Tabulator.prototype.registerModule("selectRow",SelectRow);
\ No newline at end of file
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
+var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},SelectRow=function(e){this.table=e,this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],this.headerCheckboxElement=null};SelectRow.prototype.clearSelectionData=function(e){this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],e||this._rowSelectionChanged()},SelectRow.prototype.initializeRow=function(e){var t=this,o=e.getElement(),l=function e(){setTimeout(function(){t.selecting=!1},50),document.body.removeEventListener("mouseup",e)};e.modules.select={selected:!1},t.table.options.selectableCheck.call(this.table,e.getComponent())?(o.classList.add("tabulator-selectable"),o.classList.remove("tabulator-unselectable"),t.table.options.selectable&&"highlight"!=t.table.options.selectable&&("click"===t.table.options.selectableRangeMode?o.addEventListener("click",function(o){if(o.shiftKey){t.table._clearSelection(),t.lastClickedRow=t.lastClickedRow||e;var l=t.table.rowManager.getDisplayRowIndex(t.lastClickedRow),s=t.table.rowManager.getDisplayRowIndex(e),c=l<=s?l:s,i=l>=s?l:s,n=t.table.rowManager.getDisplayRows().slice(0),a=n.splice(c,i-c+1);o.ctrlKey||o.metaKey?(a.forEach(function(o){o!==t.lastClickedRow&&(!0===t.table.options.selectable||t.isRowSelected(e)?t.toggleRow(o):t.selectedRows.length<t.table.options.selectable&&t.toggleRow(o))}),t.lastClickedRow=e):(t.deselectRows(void 0,!0),!0!==t.table.options.selectable&&a.length>t.table.options.selectable&&(a=a.slice(0,t.table.options.selectable)),t.selectRows(a)),t.table._clearSelection()}else o.ctrlKey||o.metaKey?(t.toggleRow(e),t.lastClickedRow=e):(t.deselectRows(void 0,!0),t.selectRows(e),t.lastClickedRow=e)}):(o.addEventListener("click",function(o){t.table.modExists("edit")&&t.table.modules.edit.getCurrentCell()||t.table._clearSelection(),t.selecting||t.toggleRow(e)}),o.addEventListener("mousedown",function(o){if(o.shiftKey)return t.table._clearSelection(),t.selecting=!0,t.selectPrev=[],document.body.addEventListener("mouseup",l),document.body.addEventListener("keyup",l),t.toggleRow(e),!1}),o.addEventListener("mouseenter",function(o){t.selecting&&(t.table._clearSelection(),t.toggleRow(e),t.selectPrev[1]==e&&t.toggleRow(t.selectPrev[0]))}),o.addEventListener("mouseout",function(o){t.selecting&&(t.table._clearSelection(),t.selectPrev.unshift(e))})))):(o.classList.add("tabulator-unselectable"),o.classList.remove("tabulator-selectable"))},SelectRow.prototype.toggleRow=function(e){this.table.options.selectableCheck.call(this.table,e.getComponent())&&(e.modules.select&&e.modules.select.selected?this._deselectRow(e):this._selectRow(e))},SelectRow.prototype.selectRows=function(e){var t,o=this;switch(void 0===e?"undefined":_typeof(e)){case"undefined":this.table.rowManager.rows.forEach(function(e){o._selectRow(e,!0,!0)}),this._rowSelectionChanged();break;case"string":t=this.table.rowManager.findRow(e),t?this._selectRow(t,!0,!0):this.table.rowManager.getRows(e).forEach(function(e){o._selectRow(e,!0,!0)}),this._rowSelectionChanged();break;default:Array.isArray(e)?(e.forEach(function(e){o._selectRow(e,!0,!0)}),this._rowSelectionChanged()):this._selectRow(e,!1,!0)}},SelectRow.prototype._selectRow=function(e,t,o){if(!isNaN(this.table.options.selectable)&&!0!==this.table.options.selectable&&!o&&this.selectedRows.length>=this.table.options.selectable){if(!this.table.options.selectableRollingSelection)return!1;this._deselectRow(this.selectedRows[0])}var l=this.table.rowManager.findRow(e);l?-1==this.selectedRows.indexOf(l)&&(l.getElement().classList.add("tabulator-selected"),l.modules.select||(l.modules.select={}),l.modules.select.selected=!0,l.modules.select.checkboxEl&&(l.modules.select.checkboxEl.checked=!0),this.selectedRows.push(l),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(l,!0),t||this.table.options.rowSelected.call(this.table,l.getComponent()),this._rowSelectionChanged(t)):t||console.warn("Selection Error - No such row found, ignoring selection:"+e)},SelectRow.prototype.isRowSelected=function(e){return-1!==this.selectedRows.indexOf(e)},SelectRow.prototype.deselectRows=function(e,t){var o,l=this;if(void 0===e){o=l.selectedRows.length;for(var s=0;s<o;s++)l._deselectRow(l.selectedRows[0],!0);l._rowSelectionChanged(t)}else Array.isArray(e)?(e.forEach(function(e){l._deselectRow(e,!0)}),l._rowSelectionChanged(t)):l._deselectRow(e,t)},SelectRow.prototype._deselectRow=function(e,t){var o,l=this,s=l.table.rowManager.findRow(e);s?(o=l.selectedRows.findIndex(function(e){return e==s}))>-1&&(s.getElement().classList.remove("tabulator-selected"),s.modules.select||(s.modules.select={}),s.modules.select.selected=!1,s.modules.select.checkboxEl&&(s.modules.select.checkboxEl.checked=!1),l.selectedRows.splice(o,1),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(s,!1),t||l.table.options.rowDeselected.call(this.table,s.getComponent()),l._rowSelectionChanged(t)):t||console.warn("Deselection Error - No such row found, ignoring selection:"+e)},SelectRow.prototype.getSelectedData=function(){var e=[];return this.selectedRows.forEach(function(t){e.push(t.getData())}),e},SelectRow.prototype.getSelectedRows=function(){var e=[];return this.selectedRows.forEach(function(t){e.push(t.getComponent())}),e},SelectRow.prototype._rowSelectionChanged=function(e){this.headerCheckboxElement&&(0===this.selectedRows.length?(this.headerCheckboxElement.checked=!1,this.headerCheckboxElement.indeterminate=!1):this.table.rowManager.rows.length===this.selectedRows.length?(this.headerCheckboxElement.checked=!0,this.headerCheckboxElement.indeterminate=!1):(this.headerCheckboxElement.indeterminate=!0,this.headerCheckboxElement.checked=!1)),e||this.table.options.rowSelectionChanged.call(this.table,this.getSelectedData(),this.getSelectedRows())},SelectRow.prototype.registerRowSelectCheckbox=function(e,t){e._row.modules.select||(e._row.modules.select={}),e._row.modules.select.checkboxEl=t},SelectRow.prototype.registerHeaderSelectCheckbox=function(e){this.headerCheckboxElement=e},SelectRow.prototype.childRowSelection=function(e,t){var o=this.table.modules.dataTree.getChildren(e,!0);if(t)for(var l=o,s=Array.isArray(l),c=0,l=s?l:l[Symbol.iterator]();;){var i;if(s){if(c>=l.length)break;i=l[c++]}else{if(c=l.next(),c.done)break;i=c.value}var n=i;this._selectRow(n,!0)}else for(var a=o,r=Array.isArray(a),d=0,a=r?a:a[Symbol.iterator]();;){var h;if(r){if(d>=a.length)break;h=a[d++]}else{if(d=a.next(),d.done)break;h=d.value}var w=h;this._deselectRow(w,!0)}},Tabulator.prototype.registerModule("selectRow",SelectRow);
\ No newline at end of file
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var Sort = function Sort(table) {
this.table = table; //hold Tabulator object
//sort numbers
number: function number(a, b, aRow, bRow, column, dir, params) {
var alignEmptyValues = params.alignEmptyValues;
- var decimal = params.decimalSeparator || ".";
- var thousand = params.thousandSeparator || ",";
+ var decimal = params.decimalSeparator;
+ var thousand = params.thousandSeparator;
var emptyAlign = 0;
- a = parseFloat(String(a).split(thousand).join("").split(decimal).join("."));
- b = parseFloat(String(b).split(thousand).join("").split(decimal).join("."));
+ a = String(a);
+ b = String(b);
+
+ if (thousand) {
+ a = a.split(thousand).join("");
+ b = b.split(thousand).join("");
+ }
+
+ if (decimal) {
+ a = a.split(decimal).join(".");
+ b = b.split(decimal).join(".");
+ }
+
+ a = parseFloat(a);
+ b = parseFloat(b);
//handle non numeric values
if (isNaN(a)) {
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
-var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sort=function(t){this.table=t,this.sortList=[],this.changed=!1};Sort.prototype.initializeColumn=function(t,e){var r,o,n=this,i=!1;switch(_typeof(t.definition.sorter)){case"string":n.sorters[t.definition.sorter]?i=n.sorters[t.definition.sorter]:console.warn("Sort Error - No such sorter found: ",t.definition.sorter);break;case"function":i=t.definition.sorter}t.modules.sort={sorter:i,dir:"none",params:t.definition.sorterParams||{},startingDir:t.definition.headerSortStartingDir||"asc",tristate:void 0!==t.definition.headerSortTristate?t.definition.headerSortTristate:this.table.options.headerSortTristate},(void 0===t.definition.headerSort?!1!==this.table.options.headerSort:!1!==t.definition.headerSort)&&(r=t.getElement(),r.classList.add("tabulator-sortable"),o=document.createElement("div"),o.classList.add("tabulator-col-sorter"),"object"==_typeof(this.table.options.headerSortElement)?o.appendChild(this.table.options.headerSortElement):o.innerHTML=this.table.options.headerSortElement,e.appendChild(o),t.modules.sort.element=o,r.addEventListener("click",function(e){var r="",o=[],i=!1;if(t.modules.sort){if(t.modules.sort.tristate)r="none"==t.modules.sort.dir?t.modules.sort.startingDir:t.modules.sort.dir==t.modules.sort.startingDir?"asc"==t.modules.sort.dir?"desc":"asc":"none";else switch(t.modules.sort.dir){case"asc":r="desc";break;case"desc":r="asc";break;default:r=t.modules.sort.startingDir}n.table.options.columnHeaderSortMulti&&(e.shiftKey||e.ctrlKey)?(o=n.getSort(),i=o.findIndex(function(e){return e.field===t.getField()}),i>-1?(o[i].dir=r,i!=o.length-1&&(i=o.splice(i,1)[0],"none"!=r&&o.push(i))):"none"!=r&&o.push({column:t,dir:r}),n.setSort(o)):"none"==r?n.clear():n.setSort(t,r),n.table.rowManager.sorterRefresh(!n.sortList.length)}}))},Sort.prototype.hasChanged=function(){var t=this.changed;return this.changed=!1,t},Sort.prototype.getSort=function(){var t=this,e=[];return t.sortList.forEach(function(t){t.column&&e.push({column:t.column.getComponent(),field:t.column.getField(),dir:t.dir})}),e},Sort.prototype.setSort=function(t,e){var r=this,o=[];Array.isArray(t)||(t=[{column:t,dir:e}]),t.forEach(function(t){var e;e=r.table.columnManager.findColumn(t.column),e?(t.column=e,o.push(t),r.changed=!0):console.warn("Sort Warning - Sort field does not exist and is being ignored: ",t.column)}),r.sortList=o,this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.sort&&this.table.modules.persistence.save("sort")},Sort.prototype.clear=function(){this.setSort([])},Sort.prototype.findSorter=function(t){var e,r=this.table.rowManager.activeRows[0],o="string";if(r&&(r=r.getData(),t.getField()))switch(e=t.getFieldValue(r),void 0===e?"undefined":_typeof(e)){case"undefined":o="string";break;case"boolean":o="boolean";break;default:isNaN(e)||""===e?e.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)&&(o="alphanum"):o="number"}return this.sorters[o]},Sort.prototype.sort=function(t){var e=this,r=this.table.options.sortOrderReverse?e.sortList.slice().reverse():e.sortList,o=[],n=[];e.table.options.dataSorting&&e.table.options.dataSorting.call(e.table,e.getSort()),e.clearColumnHeaders(),e.table.options.ajaxSorting?r.forEach(function(t,r){e.setColumnHeader(t.column,t.dir)}):(r.forEach(function(t,r){var n=t.column.modules.sort;t.column&&n&&(n.sorter||(n.sorter=e.findSorter(t.column)),t.params="function"==typeof n.params?n.params(t.column.getComponent(),t.dir):n.params,o.push(t)),e.setColumnHeader(t.column,t.dir)}),o.length&&e._sortItems(t,o)),e.table.options.dataSorted&&(t.forEach(function(t){n.push(t.getComponent())}),e.table.options.dataSorted.call(e.table,e.getSort(),n))},Sort.prototype.clearColumnHeaders=function(){this.table.columnManager.getRealColumns().forEach(function(t){t.modules.sort&&(t.modules.sort.dir="none",t.getElement().setAttribute("aria-sort","none"))})},Sort.prototype.setColumnHeader=function(t,e){t.modules.sort.dir=e,t.getElement().setAttribute("aria-sort",e)},Sort.prototype._sortItems=function(t,e){var r=this,o=e.length-1;t.sort(function(t,n){for(var i,s=o;s>=0;s--){var a=e[s];if(0!==(i=r._sortRow(t,n,a.column,a.dir,a.params)))break}return i})},Sort.prototype._sortRow=function(t,e,r,o,n){var i,s,a="asc"==o?t:e,l="asc"==o?e:t;return t=r.getFieldValue(a.getData()),e=r.getFieldValue(l.getData()),t=void 0!==t?t:"",e=void 0!==e?e:"",i=a.getComponent(),s=l.getComponent(),r.modules.sort.sorter.call(this,t,e,i,s,r.getComponent(),o,n)},Sort.prototype.sorters={number:function(t,e,r,o,n,i,s){var a=s.alignEmptyValues,l=s.decimalSeparator||".",u=s.thousandSeparator||",",c=0;if(t=parseFloat(String(t).split(u).join("").split(l).join(".")),e=parseFloat(String(e).split(u).join("").split(l).join(".")),isNaN(t))c=isNaN(e)?0:-1;else{if(!isNaN(e))return t-e;c=1}return("top"===a&&"desc"===i||"bottom"===a&&"asc"===i)&&(c*=-1),c},string:function(t,e,r,o,n,i,s){var a,l=s.alignEmptyValues,u=0;if(t){if(e){switch(_typeof(s.locale)){case"boolean":s.locale&&(a=this.table.modules.localize.getLocale());break;case"string":a=s.locale}return String(t).toLowerCase().localeCompare(String(e).toLowerCase(),a)}u=1}else u=e?-1:0;return("top"===l&&"desc"===i||"bottom"===l&&"asc"===i)&&(u*=-1),u},date:function(t,e,r,o,n,i,s){return s.format||(s.format="DD/MM/YYYY"),this.sorters.datetime.call(this,t,e,r,o,n,i,s)},time:function(t,e,r,o,n,i,s){return s.format||(s.format="HH:mm"),this.sorters.datetime.call(this,t,e,r,o,n,i,s)},datetime:function(t,e,r,o,n,i,s){var a=s.format||"DD/MM/YYYY HH:mm:ss",l=s.alignEmptyValues,u=0;if("undefined"!=typeof moment){if(t=moment(t,a),e=moment(e,a),t.isValid()){if(e.isValid())return t-e;u=1}else u=e.isValid()?-1:0;return("top"===l&&"desc"===i||"bottom"===l&&"asc"===i)&&(u*=-1),u}console.error("Sort Error - 'datetime' sorter is dependant on moment.js")},boolean:function(t,e,r,o,n,i,s){return(!0===t||"true"===t||"True"===t||1===t?1:0)-(!0===e||"true"===e||"True"===e||1===e?1:0)},array:function(t,e,r,o,n,i,s){function a(t){switch(c){case"length":return t.length;case"sum":return t.reduce(function(t,e){return t+e});case"max":return Math.max.apply(null,t);case"min":return Math.min.apply(null,t);case"avg":return t.reduce(function(t,e){return t+e})/t.length}}var l=0,u=0,c=s.type||"length",d=s.alignEmptyValues,m=0;if(Array.isArray(t)){if(Array.isArray(e))return l=t?a(t):0,u=e?a(e):0,l-u;d=1}else d=Array.isArray(e)?-1:0;return("top"===d&&"desc"===i||"bottom"===d&&"asc"===i)&&(m*=-1),m},exists:function(t,e,r,o,n,i,s){return(void 0===t?0:1)-(void 0===e?0:1)},alphanum:function(t,e,r,o,n,i,s){var a,l,u,c,d,m=0,f=/(\d+)|(\D+)/g,p=/\d/,h=s.alignEmptyValues,g=0;if(t||0===t){if(e||0===e){if(isFinite(t)&&isFinite(e))return t-e;if(a=String(t).toLowerCase(),l=String(e).toLowerCase(),a===l)return 0;if(!p.test(a)||!p.test(l))return a>l?1:-1;for(a=a.match(f),l=l.match(f),d=a.length>l.length?l.length:a.length;m<d;)if(u=a[m],c=l[m++],u!==c)return isFinite(u)&&isFinite(c)?("0"===u.charAt(0)&&(u="."+u),"0"===c.charAt(0)&&(c="."+c),u-c):u>c?1:-1;return a.length>l.length}g=1}else g=e||0===e?-1:0;return("top"===h&&"desc"===i||"bottom"===h&&"asc"===i)&&(g*=-1),g}},Tabulator.prototype.registerModule("sort",Sort);
\ No newline at end of file
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
+var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sort=function(t){this.table=t,this.sortList=[],this.changed=!1};Sort.prototype.initializeColumn=function(t,e){var r,o,n=this,i=!1;switch(_typeof(t.definition.sorter)){case"string":n.sorters[t.definition.sorter]?i=n.sorters[t.definition.sorter]:console.warn("Sort Error - No such sorter found: ",t.definition.sorter);break;case"function":i=t.definition.sorter}t.modules.sort={sorter:i,dir:"none",params:t.definition.sorterParams||{},startingDir:t.definition.headerSortStartingDir||"asc",tristate:void 0!==t.definition.headerSortTristate?t.definition.headerSortTristate:this.table.options.headerSortTristate},(void 0===t.definition.headerSort?!1!==this.table.options.headerSort:!1!==t.definition.headerSort)&&(r=t.getElement(),r.classList.add("tabulator-sortable"),o=document.createElement("div"),o.classList.add("tabulator-col-sorter"),"object"==_typeof(this.table.options.headerSortElement)?o.appendChild(this.table.options.headerSortElement):o.innerHTML=this.table.options.headerSortElement,e.appendChild(o),t.modules.sort.element=o,r.addEventListener("click",function(e){var r="",o=[],i=!1;if(t.modules.sort){if(t.modules.sort.tristate)r="none"==t.modules.sort.dir?t.modules.sort.startingDir:t.modules.sort.dir==t.modules.sort.startingDir?"asc"==t.modules.sort.dir?"desc":"asc":"none";else switch(t.modules.sort.dir){case"asc":r="desc";break;case"desc":r="asc";break;default:r=t.modules.sort.startingDir}n.table.options.columnHeaderSortMulti&&(e.shiftKey||e.ctrlKey)?(o=n.getSort(),i=o.findIndex(function(e){return e.field===t.getField()}),i>-1?(o[i].dir=r,i!=o.length-1&&(i=o.splice(i,1)[0],"none"!=r&&o.push(i))):"none"!=r&&o.push({column:t,dir:r}),n.setSort(o)):"none"==r?n.clear():n.setSort(t,r),n.table.rowManager.sorterRefresh(!n.sortList.length)}}))},Sort.prototype.hasChanged=function(){var t=this.changed;return this.changed=!1,t},Sort.prototype.getSort=function(){var t=this,e=[];return t.sortList.forEach(function(t){t.column&&e.push({column:t.column.getComponent(),field:t.column.getField(),dir:t.dir})}),e},Sort.prototype.setSort=function(t,e){var r=this,o=[];Array.isArray(t)||(t=[{column:t,dir:e}]),t.forEach(function(t){var e;e=r.table.columnManager.findColumn(t.column),e?(t.column=e,o.push(t),r.changed=!0):console.warn("Sort Warning - Sort field does not exist and is being ignored: ",t.column)}),r.sortList=o,this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.sort&&this.table.modules.persistence.save("sort")},Sort.prototype.clear=function(){this.setSort([])},Sort.prototype.findSorter=function(t){var e,r=this.table.rowManager.activeRows[0],o="string";if(r&&(r=r.getData(),t.getField()))switch(e=t.getFieldValue(r),void 0===e?"undefined":_typeof(e)){case"undefined":o="string";break;case"boolean":o="boolean";break;default:isNaN(e)||""===e?e.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)&&(o="alphanum"):o="number"}return this.sorters[o]},Sort.prototype.sort=function(t){var e=this,r=this.table.options.sortOrderReverse?e.sortList.slice().reverse():e.sortList,o=[],n=[];e.table.options.dataSorting&&e.table.options.dataSorting.call(e.table,e.getSort()),e.clearColumnHeaders(),e.table.options.ajaxSorting?r.forEach(function(t,r){e.setColumnHeader(t.column,t.dir)}):(r.forEach(function(t,r){var n=t.column.modules.sort;t.column&&n&&(n.sorter||(n.sorter=e.findSorter(t.column)),t.params="function"==typeof n.params?n.params(t.column.getComponent(),t.dir):n.params,o.push(t)),e.setColumnHeader(t.column,t.dir)}),o.length&&e._sortItems(t,o)),e.table.options.dataSorted&&(t.forEach(function(t){n.push(t.getComponent())}),e.table.options.dataSorted.call(e.table,e.getSort(),n))},Sort.prototype.clearColumnHeaders=function(){this.table.columnManager.getRealColumns().forEach(function(t){t.modules.sort&&(t.modules.sort.dir="none",t.getElement().setAttribute("aria-sort","none"))})},Sort.prototype.setColumnHeader=function(t,e){t.modules.sort.dir=e,t.getElement().setAttribute("aria-sort",e)},Sort.prototype._sortItems=function(t,e){var r=this,o=e.length-1;t.sort(function(t,n){for(var i,s=o;s>=0;s--){var a=e[s];if(0!==(i=r._sortRow(t,n,a.column,a.dir,a.params)))break}return i})},Sort.prototype._sortRow=function(t,e,r,o,n){var i,s,a="asc"==o?t:e,l="asc"==o?e:t;return t=r.getFieldValue(a.getData()),e=r.getFieldValue(l.getData()),t=void 0!==t?t:"",e=void 0!==e?e:"",i=a.getComponent(),s=l.getComponent(),r.modules.sort.sorter.call(this,t,e,i,s,r.getComponent(),o,n)},Sort.prototype.sorters={number:function(t,e,r,o,n,i,s){var a=s.alignEmptyValues,l=s.decimalSeparator,u=s.thousandSeparator,c=0;if(t=String(t),e=String(e),u&&(t=t.split(u).join(""),e=e.split(u).join("")),l&&(t=t.split(l).join("."),e=e.split(l).join(".")),t=parseFloat(t),e=parseFloat(e),isNaN(t))c=isNaN(e)?0:-1;else{if(!isNaN(e))return t-e;c=1}return("top"===a&&"desc"===i||"bottom"===a&&"asc"===i)&&(c*=-1),c},string:function(t,e,r,o,n,i,s){var a,l=s.alignEmptyValues,u=0;if(t){if(e){switch(_typeof(s.locale)){case"boolean":s.locale&&(a=this.table.modules.localize.getLocale());break;case"string":a=s.locale}return String(t).toLowerCase().localeCompare(String(e).toLowerCase(),a)}u=1}else u=e?-1:0;return("top"===l&&"desc"===i||"bottom"===l&&"asc"===i)&&(u*=-1),u},date:function(t,e,r,o,n,i,s){return s.format||(s.format="DD/MM/YYYY"),this.sorters.datetime.call(this,t,e,r,o,n,i,s)},time:function(t,e,r,o,n,i,s){return s.format||(s.format="HH:mm"),this.sorters.datetime.call(this,t,e,r,o,n,i,s)},datetime:function(t,e,r,o,n,i,s){var a=s.format||"DD/MM/YYYY HH:mm:ss",l=s.alignEmptyValues,u=0;if("undefined"!=typeof moment){if(t=moment(t,a),e=moment(e,a),t.isValid()){if(e.isValid())return t-e;u=1}else u=e.isValid()?-1:0;return("top"===l&&"desc"===i||"bottom"===l&&"asc"===i)&&(u*=-1),u}console.error("Sort Error - 'datetime' sorter is dependant on moment.js")},boolean:function(t,e,r,o,n,i,s){return(!0===t||"true"===t||"True"===t||1===t?1:0)-(!0===e||"true"===e||"True"===e||1===e?1:0)},array:function(t,e,r,o,n,i,s){function a(t){switch(c){case"length":return t.length;case"sum":return t.reduce(function(t,e){return t+e});case"max":return Math.max.apply(null,t);case"min":return Math.min.apply(null,t);case"avg":return t.reduce(function(t,e){return t+e})/t.length}}var l=0,u=0,c=s.type||"length",d=s.alignEmptyValues,m=0;if(Array.isArray(t)){if(Array.isArray(e))return l=t?a(t):0,u=e?a(e):0,l-u;d=1}else d=Array.isArray(e)?-1:0;return("top"===d&&"desc"===i||"bottom"===d&&"asc"===i)&&(m*=-1),m},exists:function(t,e,r,o,n,i,s){return(void 0===t?0:1)-(void 0===e?0:1)},alphanum:function(t,e,r,o,n,i,s){var a,l,u,c,d,m=0,f=/(\d+)|(\D+)/g,p=/\d/,h=s.alignEmptyValues,g=0;if(t||0===t){if(e||0===e){if(isFinite(t)&&isFinite(e))return t-e;if(a=String(t).toLowerCase(),l=String(e).toLowerCase(),a===l)return 0;if(!p.test(a)||!p.test(l))return a>l?1:-1;for(a=a.match(f),l=l.match(f),d=a.length>l.length?l.length:a.length;m<d;)if(u=a[m],c=l[m++],u!==c)return isFinite(u)&&isFinite(c)?("0"===u.charAt(0)&&(u="."+u),"0"===c.charAt(0)&&(c="."+c),u-c):u>c?1:-1;return a.length>l.length}g=1}else g=e||0===e?-1:0;return("top"===h&&"desc"===i||"bottom"===h&&"asc"===i)&&(g*=-1),g}},Tabulator.prototype.registerModule("sort",Sort);
\ No newline at end of file
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var Validate = function Validate(table) {
this.table = table;
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Validate=function(t){this.table=t,this.invalidCells=[]};Validate.prototype.initializeColumn=function(t){var i,n=this,e=[];t.definition.validator&&(Array.isArray(t.definition.validator)?t.definition.validator.forEach(function(t){(i=n._extractValidator(t))&&e.push(i)}):(i=this._extractValidator(t.definition.validator))&&e.push(i),t.modules.validate=!!e.length&&e)},Validate.prototype._extractValidator=function(t){var i,n,e;switch(void 0===t?"undefined":_typeof(t)){case"string":return e=t.indexOf(":"),e>-1?(i=t.substring(0,e),n=t.substring(e+1)):i=t,this._buildValidator(i,n);case"function":return this._buildValidator(t);case"object":return this._buildValidator(t.type,t.parameters)}},Validate.prototype._buildValidator=function(t,i){var n="function"==typeof t?t:this.validators[t];return n?{type:"function"==typeof t?"function":t,func:n,params:i}:(console.warn("Validator Setup Error - No matching validator found:",t),!1)},Validate.prototype.validate=function(t,i,n){var e=this,a=[],o=this.invalidCells.indexOf(i);return t&&t.forEach(function(t){t.func.call(e,i.getComponent(),n,t.params)||a.push({type:t.type,parameters:t.params})}),a=!a.length||a,i.modules.validate||(i.modules.validate={}),!0===a?(i.modules.validate.invalid=!1,i.getElement().classList.remove("tabulator-validation-fail"),o>-1&&this.invalidCells.splice(o,1)):(i.modules.validate.invalid=!0,"manual"!==this.table.options.validationMode&&i.getElement().classList.add("tabulator-validation-fail"),-1==o&&this.invalidCells.push(i)),a},Validate.prototype.getInvalidCells=function(){var t=[];return this.invalidCells.forEach(function(i){t.push(i.getComponent())}),t},Validate.prototype.clearValidation=function(t){var i;t.modules.validate&&t.modules.validate.invalid&&(t.getElement().classList.remove("tabulator-validation-fail"),t.modules.validate.invalid=!1,(i=this.invalidCells.indexOf(t))>-1&&this.invalidCells.splice(i,1))},Validate.prototype.validators={integer:function(t,i,n){return""===i||null===i||void 0===i||"number"==typeof(i=Number(i))&&isFinite(i)&&Math.floor(i)===i},float:function(t,i,n){return""===i||null===i||void 0===i||"number"==typeof(i=Number(i))&&isFinite(i)&&i%1!=0},numeric:function(t,i,n){return""===i||null===i||void 0===i||!isNaN(i)},string:function(t,i,n){return""===i||null===i||void 0===i||isNaN(i)},max:function(t,i,n){return""===i||null===i||void 0===i||parseFloat(i)<=n},min:function(t,i,n){return""===i||null===i||void 0===i||parseFloat(i)>=n},starts:function(t,i,n){return""===i||null===i||void 0===i||String(i).toLowerCase().startsWith(String(n).toLowerCase())},ends:function(t,i,n){return""===i||null===i||void 0===i||String(i).toLowerCase().endsWith(String(n).toLowerCase())},minLength:function(t,i,n){return""===i||null===i||void 0===i||String(i).length>=n},maxLength:function(t,i,n){return""===i||null===i||void 0===i||String(i).length<=n},in:function(t,i,n){return""===i||null===i||void 0===i||("string"==typeof n&&(n=n.split("|")),""===i||n.indexOf(i)>-1)},regex:function(t,i,n){return""===i||null===i||void 0===i||new RegExp(n).test(i)},unique:function(t,i,n){if(""===i||null===i||void 0===i)return!0;var e=!0,a=t.getData(),o=t.getColumn()._getSelf();return this.table.rowManager.rows.forEach(function(t){var n=t.getData();n!==a&&i==o.getFieldValue(n)&&(e=!1)}),e},required:function(t,i,n){return""!==i&&null!==i&&void 0!==i}},Tabulator.prototype.registerModule("validate",Validate);
\ No newline at end of file
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
'use strict';
_this4.table.modules.columnCalcs.recalc(_this4.table.rowManager.activeRows);
}
- _this4.redraw();
+ _this4.redraw(true);
if (_this4.table.modules.layout.getMode() != "fitColumns") {
this.width = null; //column width
this.widthStyled = ""; //column width prestyled to improve render efficiency
+ this.maxWidth = null; //column maximum width
+ this.maxWidthStyled = ""; //column maximum prestyled to improve render efficiency
this.minWidth = null; //column minimum width
this.minWidthStyled = ""; //column minimum prestyled to improve render efficiency
this.widthFixed = false; //user has specified a width for this column
//set min width if present
this.setMinWidth(typeof def.minWidth == "undefined" ? this.table.options.columnMinWidth : parseInt(def.minWidth));
+ if (def.maxWidth || this.table.options.columnMaxWidth) {
+ if (def.maxWidth !== false) {
+ this.setMaxWidth(typeof def.maxWidth == "undefined" ? this.table.options.columnMaxWidth : parseInt(def.maxWidth));
+ }
+ }
+
this.reinitializeWidth();
//set tooltip if present
this.table.modules.menu.initializeColumnHeader(this);
}
+ this.titleElement.style.textAlign = this.definition.headerHozAlign || this.table.options.headerHozAlign;
+
this.element.appendChild(this.groupElement);
};
if (this.parent.isGroup) {
this.parent.matchChildWidths();
}
+
+ if (!this.silent && this.table.options.virtualDomHoz) {
+ this.table.vdomHoz.reinitialize();
+ }
}
};
if (this.parent.isGroup) {
this.parent.matchChildWidths();
}
+
+ if (!this.silent && this.table.options.virtualDomHoz) {
+ this.table.vdomHoz.reinitialize();
+ }
}
};
}
};
+Column.prototype.removeChild = function (child) {
+ var index = this.columns.indexOf(child);
+
+ if (index > -1) {
+ this.columns.splice(index, 1);
+ }
+
+ if (!this.columns.length) {
+ this.delete();
+ }
+};
+
Column.prototype.setWidth = function (width) {
this.widthFixed = true;
this.setWidthActual(width);
width = Math.max(this.minWidth, width);
+ if (this.maxWidth) {
+ width = Math.min(this.maxWidth, width);
+ }
+
this.width = width;
this.widthStyled = width ? width + "px" : "";
});
};
+Column.prototype.setMaxWidth = function (maxWidth) {
+ this.maxWidth = maxWidth;
+ this.maxWidthStyled = maxWidth ? maxWidth + "px" : "";
+
+ this.element.style.maxWidth = this.maxWidthStyled;
+
+ this.cells.forEach(function (cell) {
+ cell.setMaxWidth();
+ });
+};
+
Column.prototype.delete = function () {
var _this9 = this;
return new Promise(function (resolve, reject) {
+ var index;
if (_this9.isGroup) {
_this9.columns.forEach(function (column) {
_this9.titleElement = false;
_this9.groupElement = false;
+ if (_this9.parent.isGroup) {
+ _this9.parent.removeChild(_this9);
+ }
+
_this9.table.columnManager.deregisterColumn(_this9);
if (_this9.table.options.virtualDomHoz) {
var definition;
if (!_this10.isGroup) {
- definition = Object.assign({}, _this10.getDefinition());
- definition = Object.assign(definition, updates);
+ if (!_this10.parent.isGroup) {
+ definition = Object.assign({}, _this10.getDefinition());
+ definition = Object.assign(definition, updates);
- _this10.table.columnManager.addColumn(definition, false, _this10).then(function (column) {
+ _this10.table.columnManager.addColumn(definition, false, _this10).then(function (column) {
- if (definition.field == _this10.field) {
- _this10.field = false; //cleair field name to prevent deletion of duplicate column from arrays
- }
+ if (definition.field == _this10.field) {
+ _this10.field = false; //cleair field name to prevent deletion of duplicate column from arrays
+ }
- _this10.delete().then(function () {
- resolve(column.getComponent());
+ _this10.delete().then(function () {
+ resolve(column.getComponent());
+ }).catch(function (err) {
+ reject(err);
+ });
}).catch(function (err) {
reject(err);
});
- }).catch(function (err) {
- reject(err);
- });
+ } else {
+ console.warn("Column Update Error - The updateDefinition function is only available on ungrouped columns");
+ reject("Column Update Error - The updateDefinition function is only available on columns, not column groups");
+ }
} else {
- console.warn("Column Update Error - The updateDefinition function is only available on columns, not column groups");
+ console.warn("Column Update Error - The updateDefinition function is only available on ungrouped columns");
reject("Column Update Error - The updateDefinition function is only available on columns, not column groups");
}
});
}
};
-Column.prototype.defaultOptionList = ["title", "field", "columns", "visible", "align", "hozAlign", "vertAlign", "width", "minWidth", "widthGrow", "widthShrink", "resizable", "frozen", "responsive", "tooltip", "cssClass", "rowHandle", "hideInHtml", "print", "htmlOutput", "sorter", "sorterParams", "formatter", "formatterParams", "variableHeight", "editable", "editor", "editorParams", "validator", "mutator", "mutatorParams", "mutatorData", "mutatorDataParams", "mutatorEdit", "mutatorEditParams", "mutatorClipboard", "mutatorClipboardParams", "accessor", "accessorParams", "accessorData", "accessorDataParams", "accessorDownload", "accessorDownloadParams", "accessorClipboard", "accessorClipboardParams", "accessorPrint", "accessorPrintParams", "accessorHtmlOutput", "accessorHtmlOutputParams", "clipboard", "download", "downloadTitle", "topCalc", "topCalcParams", "topCalcFormatter", "topCalcFormatterParams", "bottomCalc", "bottomCalcParams", "bottomCalcFormatter", "bottomCalcFormatterParams", "cellClick", "cellDblClick", "cellContext", "cellTap", "cellDblTap", "cellTapHold", "cellMouseEnter", "cellMouseLeave", "cellMouseOver", "cellMouseOut", "cellMouseMove", "cellEditing", "cellEdited", "cellEditCancelled", "headerSort", "headerSortStartingDir", "headerSortTristate", "headerClick", "headerDblClick", "headerContext", "headerTap", "headerDblTap", "headerTapHold", "headerTooltip", "headerVertical", "headerHozAlign", "editableTitle", "titleFormatter", "titleFormatterParams", "headerFilter", "headerFilterPlaceholder", "headerFilterParams", "headerFilterEmptyCheck", "headerFilterFunc", "headerFilterFuncParams", "headerFilterLiveFilter", "print", "headerContextMenu", "headerMenu", "contextMenu",
+Column.prototype.defaultOptionList = ["title", "field", "columns", "visible", "align", "hozAlign", "vertAlign", "width", "minWidth", "maxWidth", "widthGrow", "widthShrink", "resizable", "frozen", "responsive", "tooltip", "cssClass", "rowHandle", "hideInHtml", "print", "htmlOutput", "sorter", "sorterParams", "formatter", "formatterParams", "variableHeight", "editable", "editor", "editorParams", "validator", "mutator", "mutatorParams", "mutatorData", "mutatorDataParams", "mutatorEdit", "mutatorEditParams", "mutatorClipboard", "mutatorClipboardParams", "accessor", "accessorParams", "accessorData", "accessorDataParams", "accessorDownload", "accessorDownloadParams", "accessorClipboard", "accessorClipboardParams", "accessorPrint", "accessorPrintParams", "accessorHtmlOutput", "accessorHtmlOutputParams", "clipboard", "download", "downloadTitle", "topCalc", "topCalcParams", "topCalcFormatter", "topCalcFormatterParams", "bottomCalc", "bottomCalcParams", "bottomCalcFormatter", "bottomCalcFormatterParams", "cellClick", "cellDblClick", "cellContext", "cellTap", "cellDblTap", "cellTapHold", "cellMouseEnter", "cellMouseLeave", "cellMouseOver", "cellMouseOut", "cellMouseMove", "cellEditing", "cellEdited", "cellEditCancelled", "headerSort", "headerSortStartingDir", "headerSortTristate", "headerClick", "headerDblClick", "headerContext", "headerTap", "headerDblTap", "headerTapHold", "headerTooltip", "headerVertical", "headerHozAlign", "editableTitle", "titleFormatter", "titleFormatterParams", "headerFilter", "headerFilterPlaceholder", "headerFilterParams", "headerFilterEmptyCheck", "headerFilterFunc", "headerFilterFuncParams", "headerFilterLiveFilter", "print", "headerContextMenu", "headerMenu", "contextMenu",
// "headerClickMenu",
"clickMenu", "formatterPrint", "formatterPrintParams", "formatterClipboard", "formatterClipboardParams", "formatterHtmlOutput", "formatterHtmlOutputParams", "titlePrint", "titleClipboard", "titleHtmlOutput", "titleDownload"];
} else if (typeof HTMLElement !== "undefined" && subject instanceof HTMLElement) {
//subject is a HTML element of the row
var match = self.rows.find(function (row) {
- return row.element === subject;
+ return row.getElement() === subject;
});
return match || false;
modExists;
if (this.renderMode === "virtual") {
- var otherHeight = Math.floor(this.columnManager.getElement().offsetHeight + (this.table.footerManager && !this.table.footerManager.external ? this.table.footerManager.getElement().offsetHeight : 0));
+
+ var otherHeight = Math.floor(this.columnManager.getElement().getBoundingClientRect().height + (this.table.footerManager && this.table.footerManager.active && !this.table.footerManager.external ? this.table.footerManager.getElement().getBoundingClientRect().height : 0));
if (this.fixedHeight) {
this.element.style.minHeight = "calc(100% - " + otherHeight + "px)";
this.element.style.maxHeight = "calc(100% - " + otherHeight + "px)";
} else {
this.element.style.height = "";
- this.element.style.height = Math.floor(this.table.element.clientHeight) - otherHeight + "px";
+ this.element.style.height = this.table.element.clientHeight - otherHeight + "px";
this.element.scrollTop = this.scrollTop;
}
this.vDomWindowBuffer = this.table.options.virtualDomBuffer || this.height;
//check if the table has changed size when dealing with variable height tables
- if (!this.fixedHeight && Math.floor(initialHeight) != Math.floor(this.element.clientHeight)) {
+ if (!this.fixedHeight && initialHeight != this.element.clientHeight) {
modExists = this.table.modExists("resizeTable");
if (modExists && !this.table.modules.resizeTable.autoResize || !modExists) {
for (var _i7 = this.leftCol; _i7 <= this.rightCol; _i7++) {
var column = this.columns[_i7];
- if (column.visible) {
+ if (column && column.visible) {
var cell = row.getCell(column);
- row.element.appendChild(cell.getElement());
+ row.getElement().appendChild(cell.getElement());
cell.cellRendered();
}
}
VDomHoz.prototype.reinitializeRow = function (row, force) {
if (row.type !== "group") {
if (force || !row.modules.vdomHoz || row.modules.vdomHoz.leftCol !== this.leftCol || row.modules.vdomHoz.rightCol !== this.rightCol) {
- while (row.element.firstChild) {
- row.element.removeChild(row.element.firstChild);
+ var rowEl = row.getElement();
+ while (rowEl.firstChild) {
+ rowEl.removeChild(rowEl.firstChild);
}this.initializeRow(row);
}
}
this.parent = parent;
this.data = {};
this.type = type; //type of element
- this.element = this.createElement();
+ this.element = false;
this.modules = {}; //hold module variables;
this.cells = [];
this.height = 0; //hold element height
this.component = null;
+ this.created = false;
+
this.setData(data);
- this.generateElement();
+};
+
+Row.prototype.create = function () {
+ if (!this.created) {
+ this.created = true;
+ this.generateElement();
+ }
};
Row.prototype.createElement = function () {
el.classList.add("tabulator-row");
el.setAttribute("role", "row");
- return el;
+ this.element = el;
};
Row.prototype.getElement = function () {
+ this.create();
return this.element;
};
tapHold,
tap;
+ this.createElement();
+
//set row selection characteristics
if (self.table.options.selectable !== false && self.table.modExists("selectRow")) {
self.table.modules.selectRow.initializeRow(this);
Row.prototype.initialize = function (force) {
var _this21 = this;
+ this.create();
+
if (!this.initialized || force) {
this.deleteCells();
Row.prototype.reinitializeHeight = function () {
this.heightInitialized = false;
- if (this.element.offsetParent !== null) {
+ if (this.element && this.element.offsetParent !== null) {
this.normalizeHeight(true);
}
};
this.heightStyled = "";
}
- if (this.element.offsetParent !== null) {
+ if (this.element && this.element.offsetParent !== null) {
this.initialize(true);
}
Row.prototype.updateData = function (updatedData) {
var _this22 = this;
- var visible = Tabulator.prototype.helpers.elVisible(this.element),
+ var visible = this.element && Tabulator.prototype.helpers.elVisible(this.element),
tempData = {},
newRowData;
this.detatchModules();
this.deleteCells();
- while (this.element.firstChild) {
- this.element.removeChild(this.element.firstChild);
- }this.element = false;
- this.modules = {};
-
- if (this.element.parentNode) {
- this.element.parentNode.removeChild(this.element);
+ if (this.element) {
+ while (this.element.firstChild) {
+ this.element.removeChild(this.element.firstChild);
+ }if (this.element.parentNode) {
+ this.element.parentNode.removeChild(this.element);
+ }
}
+
+ this.element = false;
+ this.modules = {};
};
Row.prototype.getGroup = function () {
};
//////////////////// Getters ////////////////////
-Cell.prototype.getElement = function () {
+Cell.prototype.getElement = function (containerOnly) {
if (!this.loaded) {
this.loaded = true;
- this.layoutElement();
+ if (!containerOnly) {
+ this.layoutElement();
+ }
}
return this.element;
this.element.style.minWidth = this.column.minWidthStyled;
};
+Cell.prototype.setMaxWidth = function () {
+ this.maxWidth = this.column.maxWidth;
+ this.element.style.maxWidth = this.column.maxWidthStyled;
+};
+
Cell.prototype.checkHeight = function () {
// var height = this.element.css("height");
this.row.reinitializeHeight();
layoutColumnsOnNewData: false, //update column widths on setData
columnMinWidth: 40, //minimum global width for a column
+ columnMaxWidth: false, //minimum global width for a column
columnHeaderVertAlign: "top", //vertical alignment of column headers
columnVertAlign: false, // DEPRECATED - Left to allow warning
mod.persistence.initialize();
}
- if (options.persistence && this.modExists("persistence", true) && mod.persistence.config.columns) {
- options.columns = mod.persistence.load("columns", options.columns);
- }
-
if (options.movableRows && this.modExists("moveRow")) {
mod.moveRow.initialize();
}
}
};
+//set standard filters
+Tabulator.prototype.refreshFilter = function () {
+ if (this.modExists("filter", true)) {
+ this.rowManager.filterRefresh();
+ }
+};
+
//add filter to array
Tabulator.prototype.addFilter = function (field, type, value, params) {
if (this.modExists("filter", true)) {
}
};
+Tabulator.prototype.clearHistory = function () {
+ if (this.options.history && this.modExists("history", true)) {
+ return this.modules.history.clear();
+ } else {
+ return false;
+ }
+};
+
/////////////// Download Management //////////////
Tabulator.prototype.download = function (type, filename, options, active) {
Layout.prototype.layout = function () {
this.modes[this.mode].call(this, this.table.columnManager.columnsByIndex);
+
+ if (this.mode.indexOf("fitData") === 0 && this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.columns) {
+
+ this.table.modules.persistence.save("columns");
+ }
};
//layout render functions
oversizeSpace = 0,
remainingSpace = 0,
nextColWidth = 0,
+ remainingFlexGrowUnits = flexGrowUnits,
gap = 0,
changeUnits = 0,
undersizeCols = [];
oversizeCols.push(col);
} else {
- undersizeCols.push(col);
+ if (col.column.maxWidth && col.column.maxWidth < width) {
+
+ col.width = col.column.maxWidth;
+
+ freeSpace -= col.column.maxWidth;
+
+ remainingFlexGrowUnits -= shrinkCols ? col.column.definition.widthShrink || 1 : col.column.definition.widthGrow || 1;
+
+ if (remainingFlexGrowUnits) {
+
+ colWidth = Math.floor(freeSpace / remainingFlexGrowUnits);
+ }
+ } else {
- changeUnits += shrinkCols ? col.column.definition.widthShrink || 1 : col.column.definition.widthGrow || 1;
+ undersizeCols.push(col);
+
+ changeUnits += shrinkCols ? col.column.definition.widthShrink || 1 : col.column.definition.widthGrow || 1;
+ }
}
});
self.loading = false;
- reject();
+ reject(error);
});
} else {
reject();
if (!config.method || config.method.toLowerCase() == "get") {
config.method = "get";
- url += (url.includes("?") ? "&" : "?") + this.serializeParams(params);
+ url += (url.includes("?") ? "&" : "?") + this.modules.ajax.serializeParams(params);
}
}
}
return new Promise(function (resolve, reject) {
//set url
- url = self.urlGenerator(url, config, params);
+ url = self.urlGenerator.call(self.table, url, config, params);
//set body content if not GET request
if (config.method.toUpperCase() != "GET") {
ColumnCalcs.prototype.initializeTopRow = function () {
if (!this.topInitialized) {
- // this.table.columnManager.headersElement.after(this.topElement);
this.table.columnManager.getElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling);
this.topInitialized = true;
}
};
ColumnCalcs.prototype.scrollHorizontal = function (left) {
- var hozAdjust = 0,
- scrollWidth = this.table.columnManager.getElement().scrollWidth - this.table.element.clientWidth;
-
if (this.botInitialized && this.botRow) {
this.botRow.getElement().style.marginLeft = -left + "px";
}
this.generateControlElement(row, el);
- row.element.classList.add("tabulator-tree-level-" + config.index);
+ row.getElement().classList.add("tabulator-tree-level-" + config.index);
if (config.index) {
if (this.branchEl) {
if (row instanceof Row) {
+ row.create();
+
config = row.modules.dataTree.children;
if (!config.index && config.children !== false) {
children = _this48.getChildren(row);
children.forEach(function (child) {
+ child.create();
output.push(child);
});
}
return output;
};
-DataTree.prototype.getChildren = function (row) {
+DataTree.prototype.getChildren = function (row, allChildren) {
var _this49 = this;
var config = row.modules.dataTree,
children = [],
output = [];
- if (config.children !== false && config.open) {
+ if (config.children !== false && (config.open || allChildren)) {
if (!Array.isArray(config.children)) {
config.children = this.generateChildren(row);
}
childArray.forEach(function (childData) {
var childRow = new Row(childData || {}, _this50.table.rowManager);
+
+ childRow.create();
+
childRow.modules.dataTree.index = row.modules.dataTree.index + 1;
childRow.modules.dataTree.parent = row;
+
if (childRow.modules.dataTree.children) {
childRow.modules.dataTree.open = _this50.startOpen(childRow.getComponent(), childRow.modules.dataTree.index);
}
//return a formatted value for a cell
Edit.prototype.bindEditor = function (cell) {
var self = this,
- element = cell.getElement();
+ element = cell.getElement(true);
element.setAttribute("tabindex", 0);
rightEdge -= parseInt(this.table.modules.frozenColumns.rightMargin);
}
+ if (this.table.options.virtualDomHoz) {
+ leftEdge -= parseInt(this.table.vdomHoz.vDomPadLeft);
+ rightEdge -= parseInt(this.table.vdomHoz.vDomPadLeft);
+ }
+
if (cellEl.offsetLeft < leftEdge) {
+
this.table.rowManager.element.scrollLeft -= leftEdge - cellEl.offsetLeft;
} else {
if (cellEl.offsetLeft + cellEl.offsetWidth > rightEdge) {
displayItems = [],
currentItems = [],
blurable = true,
- blockListShow = false;
+ blockListShow = false,
+ searchWord = "",
+ searchWordTimeout = null;
if (Array.isArray(editorParams) || !Array.isArray(editorParams) && (typeof editorParams === 'undefined' ? 'undefined' : _typeof(editorParams)) === "object" && !editorParams.values) {
console.warn("DEPRECATION WARNING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object");
output[val] = true;
}
});
-
- if (editorParams.sortValuesList) {
- if (editorParams.sortValuesList == "asc") {
- output = Object.keys(output).sort();
- } else {
- output = Object.keys(output).sort().reverse();
- }
- } else {
- output = Object.keys(output);
- }
} else {
console.warn("unable to find matching column to create select lookup list:", field);
}
- return output;
+ return Object.keys(output);
}
function parseItems(inputValues, curentValues) {
}
}
+ if (editorParams.sortValuesList) {
+ dataList.sort(function (a, b) {
+ return a.label < b.label ? -1 : a.label > b.label ? 1 : 0;
+ });
+
+ displayList.sort(function (a, b) {
+ return a.label < b.label ? -1 : a.label > b.label ? 1 : 0;
+ });
+
+ if (editorParams.sortValuesList !== "asc") {
+ dataList.reverse();
+ displayList.reverse();
+ }
+ }
+
dataItems = dataList;
displayItems = displayList;
success(item.value);
}
- initialDisplayValue = input.value;
+ initialDisplayValue = [item.value];
}
function chooseItems(silent) {
output.push(item.value);
});
- initialDisplayValue = input.value;
+ initialDisplayValue = output;
success(output);
}
self.table.rowManager.element.removeEventListener("scroll", cancelItem);
}
+ function scrollTovalue(char) {
+
+ clearTimeout(searchWordTimeout);
+
+ var character = String.fromCharCode(event.keyCode).toLowerCase();
+ searchWord += character.toLowerCase();
+
+ var match = dataItems.find(function (item) {
+ return typeof item.label !== "undefined" && item.label.toLowerCase().startsWith(searchWord);
+ });
+
+ if (match) {
+ setCurrentItem(match, !multiselect);
+ }
+
+ searchWordTimeout = setTimeout(function () {
+ searchWord = "";
+ }, 800);
+ }
+
//style input
input.setAttribute("type", "text");
if (self.currentCell === false) {
e.preventDefault();
}
+
+ if (e.keyCode >= 38 && e.keyCode <= 90) {
+ scrollTovalue(e.keyCode);
+ }
}
});
function showList() {
if (!listEl.parentNode) {
+
+ console.log("show", initialDisplayValue);
while (listEl.firstChild) {
listEl.removeChild(listEl.firstChild);
}var offset = Tabulator.prototype.helpers.elOffset(cellEl);
//set new value
function updateValue() {
- var calcVal = percent * Math.round(bar.offsetWidth / (element.clientWidth / 100)) + min;
+ var style = window.getComputedStyle(element, null);
+
+ var calcVal = percent * Math.round(bar.offsetWidth / ((element.clientWidth - parseInt(style.getPropertyValue("padding-left")) - parseInt(style.getPropertyValue("padding-right"))) / 100)) + min;
success(calcVal);
element.setAttribute("aria-valuenow", calcVal);
element.setAttribute("aria-label", value);
//set empty value function
column.modules.filter.emptyFunc = column.definition.headerFilterEmptyCheck || function (value) {
- return !value && value !== "0";
+ return !value && value !== "0" && value !== 0;
};
filterElement = document.createElement("div");
self.prevHeaderFilterChangeCheck = "{}";
this.headerFilterColumns.forEach(function (column) {
- column.modules.filter.value = null;
+ if (typeof column.modules.filter.value !== "undefined") {
+ delete column.modules.filter.value;
+ }
column.modules.filter.prevSuccess = undefined;
self.reloadHeaderFilter(column);
});
//image element
image: function image(cell, formatterParams, onRendered) {
- var el = document.createElement("img");
- el.setAttribute("src", cell.getValue());
+ var el = document.createElement("img"),
+ src = cell.getValue();
+
+ if (formatterParams.urlPrefix) {
+ src = formatterParams.urlPrefix + cell.getValue();
+ }
+
+ if (formatterParams.urlSuffix) {
+ src = src + formatterParams.urlSuffix;
+ }
+
+ el.setAttribute("src", src);
switch (_typeof(formatterParams.height)) {
case "number":
if (allCells) {
column.cells.forEach(function (cell) {
- _this66.layoutElement(cell.getElement(), column);
+ _this66.layoutElement(cell.getElement(true), column);
});
}
});
if (allCells) {
column.cells.forEach(function (cell) {
- _this66.layoutElement(cell.getElement(), column);
+ _this66.layoutElement(cell.getElement(true), column);
});
}
});
var cell = row.getCell(column);
if (cell) {
- _this67.layoutElement(cell.getElement(), column);
+ _this67.layoutElement(cell.getElement(true), column);
}
});
var cell = row.getCell(column);
if (cell) {
- _this67.layoutElement(cell.getElement(), column);
+ _this67.layoutElement(cell.getElement(true), column);
}
});
};
Tabulator.prototype.registerModule("keybindings", Keybindings);
var Menu = function Menu(table) {
this.table = table; //hold Tabulator object
- this.menuEl = false;
+ this.menuElements = [];
this.blurEvent = this.hideMenu.bind(this);
this.escEvent = this.escMenu.bind(this);
this.nestedMenuBlock = false;
+ this.positionReversedX = false;
};
Menu.prototype.initializeColumnHeader = function (column) {
headerMenuEl.innerHTML = "⋮";
headerMenuEl.addEventListener("click", function (e) {
- var menu = typeof column.definition.headerMenu == "function" ? column.definition.headerMenu(column.getComponent(), e) : column.definition.headerMenu;
e.stopPropagation();
e.preventDefault();
- _this71.loadMenu(e, column, menu);
+ _this71.LoadMenuEvent(column, column.definition.headerMenu, e);
});
column.titleElement.insertBefore(headerMenuEl, column.titleElement.firstChild);
};
Menu.prototype.LoadMenuEvent = function (component, menu, e) {
- menu = typeof menu == "function" ? menu(component.getComponent(), e) : menu;
+ menu = typeof menu == "function" ? menu.call(this.table, component.getComponent(), e) : menu;
// if(component instanceof Cell){
// e.stopImmediatePropagation();
Menu.prototype.initializeCell = function (cell) {
if (cell.column.definition.contextMenu) {
- cell.getElement().addEventListener("contextmenu", this.LoadMenuEvent.bind(this, cell, cell.column.definition.contextMenu));
+ cell.getElement(true).addEventListener("contextmenu", this.LoadMenuEvent.bind(this, cell, cell.column.definition.contextMenu));
this.tapHold(cell, cell.column.definition.contextMenu);
}
if (cell.column.definition.clickMenu) {
- cell.getElement().addEventListener("click", this.LoadMenuEvent.bind(this, cell, cell.column.definition.clickMenu));
+ cell.getElement(true).addEventListener("click", this.LoadMenuEvent.bind(this, cell, cell.column.definition.clickMenu));
}
};
}
};
-Menu.prototype.loadMenu = function (e, component, menu) {
+Menu.prototype.loadMenu = function (e, component, menu, parentEl) {
var _this73 = this;
- var docHeight = Math.max(document.body.offsetHeight, window.innerHeight),
- touch = !(e instanceof MouseEvent);
+ var touch = !(e instanceof MouseEvent);
+
+ var menuEl = document.createElement("div");
+ menuEl.classList.add("tabulator-menu");
if (!touch) {
e.preventDefault();
return;
}
- if (this.nestedMenuBlock) {
- //abort if child menu already open
- if (this.isOpen()) {
- return;
+ if (!parentEl) {
+ if (this.nestedMenuBlock) {
+ //abort if child menu already open
+ if (this.isOpen()) {
+ return;
+ }
+ } else {
+ this.nestedMenuBlock = setTimeout(function () {
+ _this73.nestedMenuBlock = false;
+ }, 100);
}
- } else {
- this.nestedMenuBlock = setTimeout(function () {
- _this73.nestedMenuBlock = false;
- }, 100);
- }
- this.hideMenu();
-
- this.menuEl = document.createElement("div");
- this.menuEl.classList.add("tabulator-menu");
+ this.hideMenu();
+ this.menuElements = [];
+ }
menu.forEach(function (item) {
- var itemEl = document.createElement("div");
- var label = item.label;
- var disabled = item.disabled;
+ var itemEl = document.createElement("div"),
+ label = item.label,
+ disabled = item.disabled;
if (item.separator) {
itemEl.classList.add("tabulator-menu-separator");
itemEl.classList.add("tabulator-menu-item");
if (typeof label == "function") {
- label = label(component.getComponent());
+ label = label.call(_this73.table, component.getComponent());
}
if (label instanceof Node) {
}
if (typeof disabled == "function") {
- disabled = disabled(component.getComponent());
+ disabled = disabled.call(_this73.table, component.getComponent());
}
if (disabled) {
e.stopPropagation();
});
} else {
- itemEl.addEventListener("click", function (e) {
- _this73.hideMenu();
- item.action(e, component.getComponent());
- });
+ if (item.menu && item.menu.length) {
+ itemEl.addEventListener("click", function (e) {
+ e.stopPropagation();
+ _this73.hideOldSubMenus(menuEl);
+ _this73.loadMenu(e, component, item.menu, itemEl);
+ });
+ } else {
+ if (item.action) {
+ itemEl.addEventListener("click", function (e) {
+ item.action(e, component.getComponent());
+ });
+ }
+ }
+ }
+
+ if (item.menu && item.menu.length) {
+ itemEl.classList.add("tabulator-menu-item-submenu");
}
}
- _this73.menuEl.appendChild(itemEl);
+ menuEl.appendChild(itemEl);
+ });
+
+ menuEl.addEventListener("click", function (e) {
+ _this73.hideMenu();
});
- this.menuEl.style.top = (touch ? e.touches[0].pageY : e.pageY) + "px";
- this.menuEl.style.left = (touch ? e.touches[0].pageX : e.pageX) + "px";
+ this.menuElements.push(menuEl);
+ this.positionMenu(menuEl, parentEl, touch, e);
+};
+
+Menu.prototype.hideOldSubMenus = function (menuEl) {
+ var index = this.menuElements.indexOf(menuEl);
+
+ if (index > -1) {
+ for (var _i13 = this.menuElements.length - 1; _i13 > index; _i13--) {
+ var el = this.menuElements[_i13];
+
+ if (el.parentNode) {
+ el.parentNode.removeChild(el);
+ }
+
+ this.menuElements.pop();
+ }
+ }
+};
+
+Menu.prototype.positionMenu = function (element, parentEl, touch, e) {
+ var _this74 = this;
+
+ var docHeight = Math.max(document.body.offsetHeight, window.innerHeight),
+ x,
+ y,
+ parentOffset;
+
+ if (!parentEl) {
+ x = touch ? e.touches[0].pageX : e.pageX;
+ y = touch ? e.touches[0].pageY : e.pageY;
+
+ this.positionReversedX = false;
+ } else {
+ parentOffset = Tabulator.prototype.helpers.elOffset(parentEl);
+ x = parentOffset.left + parentEl.offsetWidth;
+ y = parentOffset.top - 1;
+ }
+
+ element.style.top = y + "px";
+ element.style.left = x + "px";
setTimeout(function () {
- _this73.table.rowManager.element.addEventListener("scroll", _this73.blurEvent);
- document.body.addEventListener("click", _this73.blurEvent);
- document.body.addEventListener("contextmenu", _this73.blurEvent);
- document.body.addEventListener("keydown", _this73.escEvent);
+ _this74.table.rowManager.element.addEventListener("scroll", _this74.blurEvent);
+ document.body.addEventListener("click", _this74.blurEvent);
+ document.body.addEventListener("contextmenu", _this74.blurEvent);
+ window.addEventListener("resize", _this74.blurEvent);
+ document.body.addEventListener("keydown", _this74.escEvent);
}, 100);
- document.body.appendChild(this.menuEl);
+ document.body.appendChild(element);
- //move menu to start on right edge if it is too close to the edge of the screen
- if (e.pageX + this.menuEl.offsetWidth >= document.body.offsetWidth) {
- this.menuEl.style.left = "";
- this.menuEl.style.right = document.body.offsetWidth - e.pageX + "px";
+ //move menu to start on bottom edge if it is too close to the edge of the screen
+ if (y + element.offsetHeight >= docHeight) {
+ element.style.top = "";
+
+ if (parentEl) {
+ element.style.bottom = docHeight - parentOffset.top - parentEl.offsetHeight - 1 + "px";
+ } else {
+ element.style.bottom = docHeight - y + "px";
+ }
}
- //move menu to start on bottom edge if it is too close to the edge of the screen
- if (e.pageY + this.menuEl.offsetHeight >= docHeight) {
- this.menuEl.style.top = "";
- this.menuEl.style.bottom = docHeight - e.pageY + "px";
+ //move menu to start on right edge if it is too close to the edge of the screen
+ if (x + element.offsetWidth >= document.body.offsetWidth || this.positionReversedX) {
+ element.style.left = "";
+
+ if (parentEl) {
+ element.style.right = document.documentElement.offsetWidth - parentOffset.left + "px";
+ } else {
+ element.style.right = document.documentElement.offsetWidth - x + "px";
+ }
+
+ this.positionReversedX = true;
}
};
Menu.prototype.isOpen = function () {
- return !!this.menuEl.parentNode;
+ return !!this.menuElements.length;
};
Menu.prototype.escMenu = function (e) {
};
Menu.prototype.hideMenu = function () {
- if (this.menuEl.parentNode) {
- this.menuEl.parentNode.removeChild(this.menuEl);
- }
-
- if (this.escEvent) {
- document.body.removeEventListener("keydown", this.escEvent);
- }
+ this.menuElements.forEach(function (menuEl) {
+ if (menuEl.parentNode) {
+ menuEl.parentNode.removeChild(menuEl);
+ }
+ });
- if (this.blurEvent) {
- document.body.removeEventListener("click", this.blurEvent);
- document.body.removeEventListener("contextmenu", this.blurEvent);
- this.table.rowManager.element.removeEventListener("scroll", this.blurEvent);
- }
+ document.body.removeEventListener("keydown", this.escEvent);
+ document.body.removeEventListener("click", this.blurEvent);
+ document.body.removeEventListener("contextmenu", this.blurEvent);
+ window.removeEventListener("resize", this.blurEvent);
+ this.table.rowManager.element.removeEventListener("scroll", this.blurEvent);
};
//default accessors
if (after) {
column.getCells().forEach(function (cell, i) {
- var cellEl = cell.getElement();
+ var cellEl = cell.getElement(true);
cellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl.nextSibling);
});
} else {
column.getCells().forEach(function (cell, i) {
- var cellEl = cell.getElement();
+ var cellEl = cell.getElement(true);
cellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl);
});
}
//same table drag drop
config.mousemove = function (e) {
- if (e.pageY - Tabulator.prototype.helpers.elOffset(row.element).top + self.table.rowManager.element.scrollTop > row.getHeight() / 2) {
+ var rowEl = row.getElement();
+
+ if (e.pageY - Tabulator.prototype.helpers.elOffset(rowEl).top + self.table.rowManager.element.scrollTop > row.getHeight() / 2) {
if (self.toRow !== row || !self.toRowAfter) {
- var rowEl = row.getElement();
rowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling);
self.moveRow(row, true);
}
} else {
if (self.toRow !== row || self.toRowAfter) {
- var rowEl = row.getElement();
rowEl.parentNode.insertBefore(self.placeholderElement, rowEl);
self.moveRow(row, false);
}
MoveRows.prototype.initializeCell = function (cell) {
var self = this,
- cellEl = cell.getElement();
+ cellEl = cell.getElement(true);
cellEl.addEventListener("mousedown", function (e) {
if (e.which === 1) {
}
});
- this.bindTouchEvents(cell.row, cell.getElement());
+ this.bindTouchEvents(cell.row, cellEl);
};
MoveRows.prototype.bindTouchEvents = function (row, element) {
//establish connection with other tables
MoveRows.prototype.connectToTables = function (row) {
- var _this74 = this;
+ var _this75 = this;
var connectionTables;
this.connectionSelectorsElements.forEach(function (query) {
if (typeof query === "string") {
- _this74.connectionElements = _this74.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(query)));
+ _this75.connectionElements = _this75.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(query)));
} else {
- _this74.connectionElements.push(query);
+ _this75.connectionElements.push(query);
}
});
this.connectionElements.forEach(function (element) {
var dropEvent = function dropEvent(e) {
- _this74.elementRowDrop(e, element, _this74.moving);
+ _this75.elementRowDrop(e, element, _this75.moving);
};
element.addEventListener("mouseup", dropEvent);
var receiver = false,
success = false;
- console.trace("drop");
-
e.stopImmediatePropagation();
switch (_typeof(this.table.options.movableRowsReceiver)) {
};
Page.prototype.generatePageSizeSelectList = function () {
- var _this75 = this;
+ var _this76 = this;
var pageSizes = [];
if (this.pageSizes.indexOf(this.size) == -1) {
pageSizes = [];
- for (var _i13 = 1; _i13 < 5; _i13++) {
- pageSizes.push(this.size * _i13);
+ for (var _i14 = 1; _i14 < 5; _i14++) {
+ pageSizes.push(this.size * _i14);
}
this.pageSizes = pageSizes;
itemEl.value = item;
if (item === true) {
- _this75.table.modules.localize.bind("pagination|all", function (value) {
+ _this76.table.modules.localize.bind("pagination|all", function (value) {
itemEl.innerHTML = value;
});
} else {
itemEl.innerHTML = item;
}
- _this75.pageSizeSelect.appendChild(itemEl);
+ _this76.pageSizeSelect.appendChild(itemEl);
});
this.pageSizeSelect.value = this.size;
//set current page number
Page.prototype.setPage = function (page) {
- var _this76 = this;
+ var _this77 = this;
var self = this;
page = parseInt(page);
- if (page > 0 && page <= _this76.max) {
- _this76.page = page;
- _this76.trigger().then(function () {
+ if (page > 0 && page <= _this77.max || _this77.mode !== "local") {
+ _this77.page = page;
+ _this77.trigger().then(function () {
resolve();
}).catch(function () {
reject();
self.table.modules.persistence.save("page");
}
} else {
- console.warn("Pagination Error - Requested page is out of range of 1 - " + _this76.max + ":", page);
+ console.warn("Pagination Error - Requested page is out of range of 1 - " + _this77.max + ":", page);
reject();
}
});
};
Page.prototype.setPageToRow = function (row) {
- var _this77 = this;
+ var _this78 = this;
return new Promise(function (resolve, reject) {
- var rows = _this77.table.rowManager.getDisplayRows(_this77.displayIndex - 1);
+ var rows = _this78.table.rowManager.getDisplayRows(_this78.displayIndex - 1);
var index = rows.indexOf(row);
if (index > -1) {
- var page = _this77.size === true ? 1 : Math.ceil((index + 1) / _this77.size);
+ var page = _this78.size === true ? 1 : Math.ceil((index + 1) / _this78.size);
- _this77.setPage(page).then(function () {
+ _this78.setPage(page).then(function () {
resolve();
}).catch(function () {
reject();
self.nextBut.disabled = false;
}
- for (var _i14 = min; _i14 <= max; _i14++) {
- if (_i14 > 0 && _i14 <= self.max) {
- self.pagesElement.appendChild(self._generatePageButton(_i14));
+ for (var _i15 = min; _i15 <= max; _i15++) {
+ if (_i15 > 0 && _i15 <= self.max) {
+ self.pagesElement.appendChild(self._generatePageButton(_i15));
}
}
//previous page
Page.prototype.previousPage = function () {
- var _this78 = this;
+ var _this79 = this;
return new Promise(function (resolve, reject) {
- if (_this78.page > 1) {
- _this78.page--;
- _this78.trigger().then(function () {
+ if (_this79.page > 1) {
+ _this79.page--;
+ _this79.trigger().then(function () {
resolve();
}).catch(function () {
reject();
});
- if (_this78.table.options.persistence && _this78.table.modExists("persistence", true) && _this78.table.modules.persistence.config.page) {
- _this78.table.modules.persistence.save("page");
+ if (_this79.table.options.persistence && _this79.table.modExists("persistence", true) && _this79.table.modules.persistence.config.page) {
+ _this79.table.modules.persistence.save("page");
}
} else {
console.warn("Pagination Error - Previous page would be less than page 1:", 0);
//next page
Page.prototype.nextPage = function () {
- var _this79 = this;
+ var _this80 = this;
return new Promise(function (resolve, reject) {
- if (_this79.page < _this79.max) {
- _this79.page++;
- _this79.trigger().then(function () {
+ if (_this80.page < _this80.max) {
+ _this80.page++;
+ _this80.trigger().then(function () {
resolve();
}).catch(function () {
reject();
});
- if (_this79.table.options.persistence && _this79.table.modExists("persistence", true) && _this79.table.modules.persistence.config.page) {
- _this79.table.modules.persistence.save("page");
+ if (_this80.table.options.persistence && _this80.table.modExists("persistence", true) && _this80.table.modules.persistence.config.page) {
+ _this80.table.modules.persistence.save("page");
}
} else {
- if (!_this79.progressiveLoad) {
- console.warn("Pagination Error - Next page would be greater than maximum page of " + _this79.max + ":", _this79.max + 1);
+ if (!_this80.progressiveLoad) {
+ console.warn("Pagination Error - Next page would be greater than maximum page of " + _this80.max + ":", _this80.max + 1);
}
reject();
}
this._setPageButtons();
- for (var _i15 = start; _i15 < end; _i15++) {
- if (data[_i15]) {
- output.push(data[_i15]);
+ for (var _i16 = start; _i16 < end; _i16++) {
+ if (data[_i16]) {
+ output.push(data[_i16]);
}
}
};
Page.prototype.trigger = function () {
- var _this80 = this;
+ var _this81 = this;
var left;
return new Promise(function (resolve, reject) {
- switch (_this80.mode) {
+ switch (_this81.mode) {
case "local":
- left = _this80.table.rowManager.scrollLeft;
+ left = _this81.table.rowManager.scrollLeft;
- _this80.table.rowManager.refreshActiveData("page");
- _this80.table.rowManager.scrollHorizontal(left);
+ _this81.table.rowManager.refreshActiveData("page");
+ _this81.table.rowManager.scrollHorizontal(left);
- _this80.table.options.pageLoaded.call(_this80.table, _this80.getPage());
+ _this81.table.options.pageLoaded.call(_this81.table, _this81.getPage());
resolve();
break;
case "remote":
case "progressive_load":
case "progressive_scroll":
- _this80.table.modules.ajax.blockActiveRequest();
- _this80._getRemotePage().then(function () {
+ _this81.table.modules.ajax.blockActiveRequest();
+ _this81._getRemotePage().then(function () {
resolve();
}).catch(function () {
reject();
break;
default:
- console.warn("Pagination Error - no such pagination mode:", _this80.mode);
+ console.warn("Pagination Error - no such pagination mode:", _this81.mode);
reject();
}
});
};
Page.prototype._getRemotePage = function () {
- var _this81 = this;
+ var _this82 = this;
var self = this,
oldParams,
pageParams = self.table.modules.ajax.getParams();
//configure request params
- pageParams[_this81.dataSentNames.page] = self.page;
+ pageParams[_this82.dataSentNames.page] = self.page;
//set page size if defined
- if (_this81.size) {
- pageParams[_this81.dataSentNames.size] = _this81.size;
+ if (_this82.size) {
+ pageParams[_this82.dataSentNames.size] = _this82.size;
}
//set sort data if defined
- if (_this81.table.options.ajaxSorting && _this81.table.modExists("sort")) {
+ if (_this82.table.options.ajaxSorting && _this82.table.modExists("sort")) {
var sorters = self.table.modules.sort.getSort();
sorters.forEach(function (item) {
delete item.column;
});
- pageParams[_this81.dataSentNames.sorters] = sorters;
+ pageParams[_this82.dataSentNames.sorters] = sorters;
}
//set filter data if defined
- if (_this81.table.options.ajaxFiltering && _this81.table.modExists("filter")) {
+ if (_this82.table.options.ajaxFiltering && _this82.table.modExists("filter")) {
var filters = self.table.modules.filter.getFilters(true, true);
- pageParams[_this81.dataSentNames.filters] = filters;
+ pageParams[_this82.dataSentNames.filters] = filters;
}
self.table.modules.ajax.setParams(pageParams);
- self.table.modules.ajax.sendRequest(_this81.progressiveLoad).then(function (data) {
+ self.table.modules.ajax.sendRequest(_this82.progressiveLoad).then(function (data) {
self._parseRemoteData(data);
resolve();
}).catch(function (e) {
}
}
}
+
+ if (this.config.columns) {
+ this.table.options.columns = this.load("columns", this.table.options.columns);
+ }
};
Persistence.prototype.initializeColumn = function (column) {
}
keys.forEach(function (key) {
- if (typeof column[key] !== "undefined") {
+ if (key !== "columns" && typeof column[key] !== "undefined") {
from[key] = column[key];
}
});
};
ResizeTable.prototype.initialize = function (row) {
- var _this82 = this;
+ var _this83 = this;
var table = this.table,
tableStyle;
var nodeHeight = Math.floor(entry[0].contentRect.height);
var nodeWidth = Math.floor(entry[0].contentRect.width);
- if (_this82.tableHeight != nodeHeight || _this82.tableWidth != nodeWidth) {
- _this82.tableHeight = nodeHeight;
- _this82.tableWidth = nodeWidth;
+ if (_this83.tableHeight != nodeHeight || _this83.tableWidth != nodeWidth) {
+ _this83.tableHeight = nodeHeight;
+ _this83.tableWidth = nodeWidth;
if (table.element.parentNode) {
- _this82.containerHeight = table.element.parentNode.clientHeight;
- _this82.containerWidth = table.element.parentNode.clientWidth;
+ _this83.containerHeight = table.element.parentNode.clientHeight;
+ _this83.containerWidth = table.element.parentNode.clientWidth;
}
if (table.options.virtualDomHoz) {
var nodeHeight = Math.floor(entry[0].contentRect.height);
var nodeWidth = Math.floor(entry[0].contentRect.width);
- if (_this82.containerHeight != nodeHeight || _this82.containerWidth != nodeWidth) {
- _this82.containerHeight = nodeHeight;
- _this82.containerWidth = nodeWidth;
- _this82.tableHeight = table.element.clientHeight;
- _this82.tableWidth = table.element.clientWidth;
+ if (_this83.containerHeight != nodeHeight || _this83.containerWidth != nodeWidth) {
+ _this83.containerHeight = nodeHeight;
+ _this83.containerWidth = nodeWidth;
+ _this83.tableHeight = table.element.clientHeight;
+ _this83.tableWidth = table.element.clientWidth;
}
if (table.options.virtualDomHoz) {
}
//assign collapse column
- for (var _iterator = this.table.columnManager.columnsByIndex, _isArray = Array.isArray(_iterator), _i16 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
+ for (var _iterator = this.table.columnManager.columnsByIndex, _isArray = Array.isArray(_iterator), _i17 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
var _ref;
if (_isArray) {
- if (_i16 >= _iterator.length) break;
- _ref = _iterator[_i16++];
+ if (_i17 >= _iterator.length) break;
+ _ref = _iterator[_i17++];
} else {
- _i16 = _iterator.next();
- if (_i16.done) break;
- _ref = _i16.value;
+ _i17 = _iterator.next();
+ if (_i17.done) break;
+ _ref = _i17.value;
}
var col = _ref;
};
output.push({
+ field: column.field,
title: column.definition.title,
value: column.modules.format.formatter.call(self.table.modules.format, mockCellComponent, column.modules.format.params)
});
} else {
output.push({
+ field: column.field,
title: column.definition.title,
value: value
});
};
ResponsiveLayout.prototype.formatCollapsedData = function (data) {
- var list = document.createElement("table"),
- listContents = "";
+ var list = document.createElement("table");
data.forEach(function (item) {
- var div = document.createElement("div");
+ var row = document.createElement("tr");
+ var titleData = document.createElement("td");
+ var valueData = document.createElement("td");
+ var node_content;
+
+ var titleHighlight = document.createElement("strong");
+ titleData.appendChild(titleHighlight);
+ this.table.modules.localize.bind("columns|" + item.field, function (text) {
+ titleHighlight.innerText = text || item.title;
+ });
if (item.value instanceof Node) {
- div.appendChild(item.value);
- item.value = div.innerHTML;
+ node_content = document.createElement("div");
+ node_content.appendChild(item.value);
+ valueData.appendChild(node_content);
+ } else {
+ valueData.innerHTML = item.value;
}
- listContents += "<tr><td><strong>" + item.title + "</strong></td><td>" + item.value + "</td></tr>";
- });
-
- list.innerHTML = listContents;
+ row.appendChild(titleData);
+ row.appendChild(valueData);
+ list.appendChild(row);
+ }, this);
return Object.keys(data).length ? list : "";
};
//select a number of rows
SelectRow.prototype.selectRows = function (rows) {
- var _this83 = this;
+ var _this84 = this;
var rowMatch;
switch (typeof rows === 'undefined' ? 'undefined' : _typeof(rows)) {
case "undefined":
this.table.rowManager.rows.forEach(function (row) {
- _this83._selectRow(row, true, true);
+ _this84._selectRow(row, true, true);
});
this._rowSelectionChanged();
this._selectRow(rowMatch, true, true);
} else {
this.table.rowManager.getRows(rows).forEach(function (row) {
- _this83._selectRow(row, true, true);
+ _this84._selectRow(row, true, true);
});
}
default:
if (Array.isArray(rows)) {
rows.forEach(function (row) {
- _this83._selectRow(row, true, true);
+ _this84._selectRow(row, true, true);
});
this._rowSelectionChanged();
if (row) {
if (this.selectedRows.indexOf(row) == -1) {
+ row.getElement().classList.add("tabulator-selected");
if (!row.modules.select) {
row.modules.select = {};
}
if (row.modules.select.checkboxEl) {
row.modules.select.checkboxEl.checked = true;
}
- row.getElement().classList.add("tabulator-selected");
this.selectedRows.push(row);
rowCount = self.selectedRows.length;
- for (var _i17 = 0; _i17 < rowCount; _i17++) {
+ for (var _i18 = 0; _i18 < rowCount; _i18++) {
self._deselectRow(self.selectedRows[0], true);
}
if (index > -1) {
+ row.getElement().classList.remove("tabulator-selected");
if (!row.modules.select) {
row.modules.select = {};
}
if (row.modules.select.checkboxEl) {
row.modules.select.checkboxEl.checked = false;
}
- row.getElement().classList.remove("tabulator-selected");
self.selectedRows.splice(index, 1);
if (this.table.options.dataTreeSelectPropagate) {
};
SelectRow.prototype.childRowSelection = function (row, select) {
- var children = this.table.modules.dataTree.getChildren(row);
+ var children = this.table.modules.dataTree.getChildren(row, true);
if (select) {
- for (var _iterator2 = children, _isArray2 = Array.isArray(_iterator2), _i18 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
+ for (var _iterator2 = children, _isArray2 = Array.isArray(_iterator2), _i19 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
var _ref2;
if (_isArray2) {
- if (_i18 >= _iterator2.length) break;
- _ref2 = _iterator2[_i18++];
+ if (_i19 >= _iterator2.length) break;
+ _ref2 = _iterator2[_i19++];
} else {
- _i18 = _iterator2.next();
- if (_i18.done) break;
- _ref2 = _i18.value;
+ _i19 = _iterator2.next();
+ if (_i19.done) break;
+ _ref2 = _i19.value;
}
var child = _ref2;
this._selectRow(child, true);
}
} else {
- for (var _iterator3 = children, _isArray3 = Array.isArray(_iterator3), _i19 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
+ for (var _iterator3 = children, _isArray3 = Array.isArray(_iterator3), _i20 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
var _ref3;
if (_isArray3) {
- if (_i19 >= _iterator3.length) break;
- _ref3 = _iterator3[_i19++];
+ if (_i20 >= _iterator3.length) break;
+ _ref3 = _iterator3[_i20++];
} else {
- _i19 = _iterator3.next();
- if (_i19.done) break;
- _ref3 = _i19.value;
+ _i20 = _iterator3.next();
+ if (_i20.done) break;
+ _ref3 = _i20.value;
}
var _child = _ref3;
//sort each item in sort list
Sort.prototype._sortItems = function (data, sortList) {
- var _this84 = this;
+ var _this85 = this;
var sorterCount = sortList.length - 1;
for (var i = sorterCount; i >= 0; i--) {
var sortItem = sortList[i];
- result = _this84._sortRow(a, b, sortItem.column, sortItem.dir, sortItem.params);
+ result = _this85._sortRow(a, b, sortItem.column, sortItem.dir, sortItem.params);
if (result !== 0) {
break;
//sort numbers
number: function number(a, b, aRow, bRow, column, dir, params) {
var alignEmptyValues = params.alignEmptyValues;
- var decimal = params.decimalSeparator || ".";
- var thousand = params.thousandSeparator || ",";
+ var decimal = params.decimalSeparator;
+ var thousand = params.thousandSeparator;
var emptyAlign = 0;
- a = parseFloat(String(a).split(thousand).join("").split(decimal).join("."));
- b = parseFloat(String(b).split(thousand).join("").split(decimal).join("."));
+ a = String(a);
+ b = String(b);
+
+ if (thousand) {
+ a = a.split(thousand).join("");
+ b = b.split(thousand).join("");
+ }
+
+ if (decimal) {
+ a = a.split(decimal).join(".");
+ b = b.split(decimal).join(".");
+ }
+
+ a = parseFloat(a);
+ b = parseFloat(b);
//handle non numeric values
if (isNaN(a)) {
--- /dev/null
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
+"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),o=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;n<o;){var s=e[n];if(t.call(i,s,n,e))return n;n++}return-1}}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),o=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;n<o;){var s=e[n];if(t.call(i,s,n,e))return s;n++}}}),String.prototype.includes||(String.prototype.includes=function(t,e){if(t instanceof RegExp)throw TypeError("first argument must not be a RegExp");return void 0===e&&(e=0),-1!==this.indexOf(t,e)}),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(t,e){if(null==this)throw new TypeError('"this" is null or not defined');var o=Object(this),i=o.length>>>0;if(0===i)return!1;var n,s,a=0|e,r=Math.max(a>=0?a:i-Math.abs(a),0);for(;r<i;){if((n=o[r])===(s=t)||"number"==typeof n&&"number"==typeof s&&isNaN(n)&&isNaN(s))return!0;r++}return!1}}),"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var o=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(null!=n)for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(o[s]=n[s])}return o},writable:!0,configurable:!0});var ColumnManager=function(t){this.table=t,this.blockHozScrollEvent=!1,this.headersElement=this.createHeadersElement(),this.element=this.createHeaderElement(),this.rowManager=null,this.columns=[],this.columnsByIndex=[],this.columnsByField={},this.scrollLeft=0,this.element.insertBefore(this.headersElement,this.element.firstChild)};ColumnManager.prototype.createHeadersElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-headers"),t},ColumnManager.prototype.createHeaderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-header"),this.table.options.headerVisible||t.classList.add("tabulator-header-hidden"),t},ColumnManager.prototype.initialize=function(){},ColumnManager.prototype.setRowManager=function(t){this.rowManager=t},ColumnManager.prototype.getElement=function(){return this.element},ColumnManager.prototype.getHeadersElement=function(){return this.headersElement},ColumnManager.prototype.scrollHorizontal=function(t){var e=0,o=this.element.scrollWidth-this.table.element.clientWidth;this.element.scrollLeft=t,t>o?(e=t-o,this.element.style.marginLeft=-e+"px"):this.element.style.marginLeft=0,this.scrollLeft=t,this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.scrollHorizontal()},ColumnManager.prototype.generateColumnsFromRowData=function(t){var e,o,i=[],n=this.table.options.autoColumnsDefinitions;if(t&&t.length){for(var s in e=t[0]){var a={field:s,title:s},r=e[s];switch(void 0===r?"undefined":_typeof(r)){case"undefined":o="string";break;case"boolean":o="boolean";break;case"object":o=Array.isArray(r)?"array":"string";break;default:o=isNaN(r)||""===r?r.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)?"alphanum":"string":"number"}a.sorter=o,i.push(a)}if(n)switch(void 0===n?"undefined":_typeof(n)){case"function":this.table.options.columns=n.call(this.table,i);break;case"object":Array.isArray(n)?i.forEach((function(t){var e=n.find((function(e){return e.field===t.field}));e&&Object.assign(t,e)})):i.forEach((function(t){n[t.field]&&Object.assign(t,n[t.field])})),this.table.options.columns=i}else this.table.options.columns=i;this.setColumns(this.table.options.columns)}},ColumnManager.prototype.setColumns=function(t,e){for(var o=this;o.headersElement.firstChild;)o.headersElement.removeChild(o.headersElement.firstChild);o.columns=[],o.columnsByIndex=[],o.columnsByField={},o.table.modExists("frozenColumns")&&o.table.modules.frozenColumns.reset(),t.forEach((function(t,e){o._addColumn(t)})),o._reIndexColumns(),o.table.options.responsiveLayout&&o.table.modExists("responsiveLayout",!0)&&o.table.modules.responsiveLayout.initialize(),this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitialize(!1,!0),o.redraw(!0)},ColumnManager.prototype._addColumn=function(t,e,o){var i=new Column(t,this),n=i.getElement(),s=o?this.findColumnIndex(o):o;if(o&&s>-1){var a=this.columns.indexOf(o.getTopColumn()),r=o.getElement();e?(this.columns.splice(a,0,i),r.parentNode.insertBefore(n,r)):(this.columns.splice(a+1,0,i),r.parentNode.insertBefore(n,r.nextSibling))}else e?(this.columns.unshift(i),this.headersElement.insertBefore(i.getElement(),this.headersElement.firstChild)):(this.columns.push(i),this.headersElement.appendChild(i.getElement())),i.columnRendered();return i},ColumnManager.prototype.registerColumnField=function(t){t.definition.field&&(this.columnsByField[t.definition.field]=t)},ColumnManager.prototype.registerColumnPosition=function(t){this.columnsByIndex.push(t)},ColumnManager.prototype._reIndexColumns=function(){this.columnsByIndex=[],this.columns.forEach((function(t){t.reRegisterPosition()}))},ColumnManager.prototype._verticalAlignHeaders=function(){var t=this,e=0;t.columns.forEach((function(t){var o;t.clearVerticalAlign(),(o=t.getHeight())>e&&(e=o)})),t.columns.forEach((function(o){o.verticalAlign(t.table.options.columnHeaderVertAlign,e)})),t.rowManager.adjustTableSize()},ColumnManager.prototype.findColumn=function(t){return"object"!=(void 0===t?"undefined":_typeof(t))?this.columnsByField[t]||!1:t instanceof Column?t:t instanceof ColumnComponent?t._getSelf()||!1:"undefined"!=typeof HTMLElement&&t instanceof HTMLElement&&this.columns.find((function(e){return e.element===t}))||!1},ColumnManager.prototype.getColumnByField=function(t){return this.columnsByField[t]},ColumnManager.prototype.getColumnsByFieldRoot=function(t){var e=this,o=[];return Object.keys(this.columnsByField).forEach((function(i){i.split(".")[0]===t&&o.push(e.columnsByField[i])})),o},ColumnManager.prototype.getColumnByIndex=function(t){return this.columnsByIndex[t]},ColumnManager.prototype.getFirstVisibileColumn=function(t){return(t=this.columnsByIndex.findIndex((function(t){return t.visible})))>-1&&this.columnsByIndex[t]},ColumnManager.prototype.getColumns=function(){return this.columns},ColumnManager.prototype.findColumnIndex=function(t){return this.columnsByIndex.findIndex((function(e){return t===e}))},ColumnManager.prototype.getRealColumns=function(){return this.columnsByIndex},ColumnManager.prototype.traverse=function(t){this.columnsByIndex.forEach((function(e,o){t(e,o)}))},ColumnManager.prototype.getDefinitions=function(t){var e=[];return this.columnsByIndex.forEach((function(o){(!t||t&&o.visible)&&e.push(o.getDefinition())})),e},ColumnManager.prototype.getDefinitionTree=function(){var t=[];return this.columns.forEach((function(e){t.push(e.getDefinition(!0))})),t},ColumnManager.prototype.getComponents=function(t){var e=[];return(t?this.columns:this.columnsByIndex).forEach((function(t){e.push(t.getComponent())})),e},ColumnManager.prototype.getWidth=function(){var t=0;return this.columnsByIndex.forEach((function(e){e.visible&&(t+=e.getWidth())})),t},ColumnManager.prototype.moveColumn=function(t,e,o){this.moveColumnActual(t,e,o),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),e.element.parentNode.insertBefore(t.element,e.element),o&&e.element.parentNode.insertBefore(e.element,t.element),this._verticalAlignHeaders(),this.table.rowManager.reinitialize()},ColumnManager.prototype.moveColumnActual=function(t,e,o){t.parent.isGroup?this._moveColumnInArray(t.parent.columns,t,e,o):this._moveColumnInArray(this.columns,t,e,o),this._moveColumnInArray(this.columnsByIndex,t,e,o,!0),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitialize(!0),this.table.options.columnMoved&&this.table.options.columnMoved.call(this.table,t.getComponent(),this.table.columnManager.getComponents()),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns")},ColumnManager.prototype._moveColumnInArray=function(t,e,o,i,n){var s,a=this,r=t.indexOf(e),l=[];r>-1&&(t.splice(r,1),(s=t.indexOf(o))>-1?i&&(s+=1):s=r,t.splice(s,0,e),n&&(this.table.options.dataTree&&this.table.modExists("dataTree",!0)&&this.table.rowManager.rows.forEach((function(t){l=l.concat(a.table.modules.dataTree.getTreeChildren(t,!1,!0))})),(l=l.concat(this.table.rowManager.rows)).forEach((function(t){if(t.cells.length){var e=t.cells.splice(r,1)[0];t.cells.splice(s,0,e)}}))))},ColumnManager.prototype.scrollToColumn=function(t,e,o){var i=this,n=0,s=0,a=0,r=t.getElement();return new Promise((function(l,u){if(void 0===e&&(e=i.table.options.scrollToColumnPosition),void 0===o&&(o=i.table.options.scrollToColumnIfVisible),t.visible){switch(e){case"middle":case"center":a=-i.element.clientWidth/2;break;case"right":a=r.clientWidth-i.headersElement.clientWidth}if(!o&&(s=r.offsetLeft)>0&&s+r.offsetWidth<i.element.clientWidth)return!1;n=r.offsetLeft+a,n=Math.max(Math.min(n,i.table.rowManager.element.scrollWidth-i.table.rowManager.element.clientWidth),0),i.table.rowManager.scrollHorizontal(n),i.scrollHorizontal(n),l()}else console.warn("Scroll Error - Column not visible"),u("Scroll Error - Column not visible")}))},ColumnManager.prototype.generateCells=function(t){var e=[];return this.columnsByIndex.forEach((function(o){e.push(o.generateCell(t))})),e},ColumnManager.prototype.getFlexBaseWidth=function(){var t=this,e=t.table.element.clientWidth,o=0;return t.rowManager.element.scrollHeight>t.rowManager.element.clientHeight&&(e-=t.rowManager.element.offsetWidth-t.rowManager.element.clientWidth),this.columnsByIndex.forEach((function(i){var n,s,a;i.visible&&(n=i.definition.width||0,s=void 0===i.minWidth?t.table.options.columnMinWidth:parseInt(i.minWidth),a="string"==typeof n?n.indexOf("%")>-1?e/100*parseInt(n):parseInt(n):n,o+=a>s?a:s)})),o},ColumnManager.prototype.addColumn=function(t,e,o){var i=this;return new Promise((function(n,s){var a=i._addColumn(t,e,o);i._reIndexColumns(),i.table.options.responsiveLayout&&i.table.modExists("responsiveLayout",!0)&&i.table.modules.responsiveLayout.initialize(),i.table.modExists("columnCalcs")&&i.table.modules.columnCalcs.recalc(i.table.rowManager.activeRows),i.redraw(!0),"fitColumns"!=i.table.modules.layout.getMode()&&a.reinitializeWidth(),i._verticalAlignHeaders(),i.table.rowManager.reinitialize(),i.table.options.virtualDomHoz&&i.table.vdomHoz.reinitialize(),n(a)}))},ColumnManager.prototype.deregisterColumn=function(t){var e,o=t.getField();o&&delete this.columnsByField[o],(e=this.columnsByIndex.indexOf(t))>-1&&this.columnsByIndex.splice(e,1),(e=this.columns.indexOf(t))>-1&&this.columns.splice(e,1),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this._verticalAlignHeaders(),this.redraw()},ColumnManager.prototype.redraw=function(t){t&&(Tabulator.prototype.helpers.elVisible(this.element)&&this._verticalAlignHeaders(),this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),["fitColumns","fitDataStretch"].indexOf(this.table.modules.layout.getMode())>-1||t?this.table.modules.layout.layout():this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),t&&(this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns"),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.redraw()),this.table.footerManager.redraw()};var ColumnComponent=function(t){this._column=t,this.type="ColumnComponent"};ColumnComponent.prototype.getElement=function(){return this._column.getElement()},ColumnComponent.prototype.getDefinition=function(){return this._column.getDefinition()},ColumnComponent.prototype.getField=function(){return this._column.getField()},ColumnComponent.prototype.getCells=function(){var t=[];return this._column.cells.forEach((function(e){t.push(e.getComponent())})),t},ColumnComponent.prototype.getVisibility=function(){return console.warn("getVisibility function is deprecated, you should now use the isVisible function"),this._column.visible},ColumnComponent.prototype.isVisible=function(){return this._column.visible},ColumnComponent.prototype.show=function(){this._column.isGroup?this._column.columns.forEach((function(t){t.show()})):this._column.show()},ColumnComponent.prototype.hide=function(){this._column.isGroup?this._column.columns.forEach((function(t){t.hide()})):this._column.hide()},ColumnComponent.prototype.toggle=function(){this._column.visible?this.hide():this.show()},ColumnComponent.prototype.delete=function(){return this._column.delete()},ColumnComponent.prototype.getSubColumns=function(){var t=[];return this._column.columns.length&&this._column.columns.forEach((function(e){t.push(e.getComponent())})),t},ColumnComponent.prototype.getParentColumn=function(){return this._column.parent instanceof Column&&this._column.parent.getComponent()},ColumnComponent.prototype._getSelf=function(){return this._column},ColumnComponent.prototype.scrollTo=function(){return this._column.table.columnManager.scrollToColumn(this._column)},ColumnComponent.prototype.getTable=function(){return this._column.table},ColumnComponent.prototype.headerFilterFocus=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterFocus(this._column)},ColumnComponent.prototype.reloadHeaderFilter=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.reloadHeaderFilter(this._column)},ColumnComponent.prototype.getHeaderFilterValue=function(){if(this._column.table.modExists("filter",!0))return this._column.table.modules.filter.getHeaderFilterValue(this._column)},ColumnComponent.prototype.setHeaderFilterValue=function(t){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterValue(this._column,t)},ColumnComponent.prototype.move=function(t,e){var o=this._column.table.columnManager.findColumn(t);o?this._column.table.columnManager.moveColumn(this._column,o,e):console.warn("Move Error - No matching column found:",o)},ColumnComponent.prototype.getNextColumn=function(){var t=this._column.nextColumn();return!!t&&t.getComponent()},ColumnComponent.prototype.getPrevColumn=function(){var t=this._column.prevColumn();return!!t&&t.getComponent()},ColumnComponent.prototype.updateDefinition=function(t){return this._column.updateDefinition(t)},ColumnComponent.prototype.getWidth=function(){return this._column.getWidth()},ColumnComponent.prototype.setWidth=function(t){var e;return e=!0===t?this._column.reinitializeWidth(!0):this._column.setWidth(t),this._column.table.options.virtualDomHoz&&this._column.table.vdomHoz.reinitialize(!0),e},ColumnComponent.prototype.validate=function(){return this._column.validate()};var Column=function t(e,o){var i=this;this.table=o.table,this.definition=e,this.parent=o,this.type="column",this.columns=[],this.cells=[],this.element=this.createElement(),this.contentElement=!1,this.titleHolderElement=!1,this.titleElement=!1,this.groupElement=this.createGroupElement(),this.isGroup=!1,this.tooltip=!1,this.hozAlign="",this.vertAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.titleFormatterRendered=!1,this.setField(this.definition.field),this.table.options.invalidOptionWarnings&&this.checkDefinition(),this.modules={},this.cellEvents={cellClick:!1,cellDblClick:!1,cellContext:!1,cellTap:!1,cellDblTap:!1,cellTapHold:!1,cellMouseEnter:!1,cellMouseLeave:!1,cellMouseOver:!1,cellMouseOut:!1,cellMouseMove:!1},this.width=null,this.widthStyled="",this.maxWidth=null,this.maxWidthStyled="",this.minWidth=null,this.minWidthStyled="",this.widthFixed=!1,this.visible=!0,this.component=null,this._mapDepricatedFunctionality(),e.columns?(this.isGroup=!0,e.columns.forEach((function(e,o){var n=new t(e,i);i.attachColumn(n)})),i.checkColumnVisibility()):o.registerColumnField(this),e.rowHandle&&!1!==this.table.options.movableRows&&this.table.modExists("moveRow")&&this.table.modules.moveRow.setHandle(!0),this._buildHeader(),this.bindModuleColumns()};Column.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col"),t.setAttribute("role","columnheader"),t.setAttribute("aria-sort","none"),t},Column.prototype.createGroupElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col-group-cols"),t},Column.prototype.checkDefinition=function(){var t=this;Object.keys(this.definition).forEach((function(e){-1===t.defaultOptionList.indexOf(e)&&console.warn("Invalid column definition option in '"+(t.field||t.definition.title)+"' column:",e)}))},Column.prototype.setField=function(t){this.field=t,this.fieldStructure=t?this.table.options.nestedFieldSeparator?t.split(this.table.options.nestedFieldSeparator):[t]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNestedData:this._setFlatData},Column.prototype.registerColumnPosition=function(t){this.parent.registerColumnPosition(t)},Column.prototype.registerColumnField=function(t){this.parent.registerColumnField(t)},Column.prototype.reRegisterPosition=function(){this.isGroup?this.columns.forEach((function(t){t.reRegisterPosition()})):this.registerColumnPosition(this)},Column.prototype._mapDepricatedFunctionality=function(){void 0!==this.definition.hideInHtml&&(this.definition.htmlOutput=!this.definition.hideInHtml,console.warn("hideInHtml column definition property is deprecated, you should now use htmlOutput")),void 0!==this.definition.align&&(this.definition.hozAlign=this.definition.align,console.warn("align column definition property is deprecated, you should now use hozAlign")),void 0!==this.definition.downloadTitle&&(this.definition.titleDownload=this.definition.downloadTitle,console.warn("downloadTitle definition property is deprecated, you should now use titleDownload"))},Column.prototype.setTooltip=function(){var t=this,e=t.definition,o=e.headerTooltip||!1===e.tooltip?e.headerTooltip:t.table.options.tooltipsHeader;o?!0===o?e.field?t.table.modules.localize.bind("columns|"+e.field,(function(o){t.element.setAttribute("title",o||e.title)})):t.element.setAttribute("title",e.title):("function"==typeof o&&!1===(o=o(t.getComponent()))&&(o=""),t.element.setAttribute("title",o)):t.element.setAttribute("title","")},Column.prototype._buildHeader=function(){for(var t=this,e=t.definition;t.element.firstChild;)t.element.removeChild(t.element.firstChild);e.headerVertical&&(t.element.classList.add("tabulator-col-vertical"),"flip"===e.headerVertical&&t.element.classList.add("tabulator-col-vertical-flip")),t.contentElement=t._bindEvents(),t.contentElement=t._buildColumnHeaderContent(),t.element.appendChild(t.contentElement),t.isGroup?t._buildGroupHeader():t._buildColumnHeader(),t.setTooltip(),t.table.options.resizableColumns&&t.table.modExists("resizeColumns")&&t.table.modules.resizeColumns.initializeColumn("header",t,t.element),e.headerFilter&&t.table.modExists("filter")&&t.table.modExists("edit")&&(void 0!==e.headerFilterPlaceholder&&e.field&&t.table.modules.localize.setHeaderFilterColumnPlaceholder(e.field,e.headerFilterPlaceholder),t.table.modules.filter.initializeColumn(t)),t.table.modExists("frozenColumns")&&t.table.modules.frozenColumns.initializeColumn(t),t.table.options.movableColumns&&!t.isGroup&&t.table.modExists("moveColumn")&&t.table.modules.moveColumn.initializeColumn(t),(e.topCalc||e.bottomCalc)&&t.table.modExists("columnCalcs")&&t.table.modules.columnCalcs.initializeColumn(t),t.table.modExists("persistence")&&t.table.modules.persistence.config.columns&&t.table.modules.persistence.initializeColumn(t),t.element.addEventListener("mouseenter",(function(e){t.setTooltip()}))},Column.prototype._bindEvents=function(){var t,e,o,i=this,n=i.definition;"function"==typeof n.headerClick&&i.element.addEventListener("click",(function(t){n.headerClick(t,i.getComponent())})),"function"==typeof n.headerDblClick&&i.element.addEventListener("dblclick",(function(t){n.headerDblClick(t,i.getComponent())})),"function"==typeof n.headerContext&&i.element.addEventListener("contextmenu",(function(t){n.headerContext(t,i.getComponent())})),"function"==typeof n.headerTap&&(o=!1,i.element.addEventListener("touchstart",(function(t){o=!0}),{passive:!0}),i.element.addEventListener("touchend",(function(t){o&&n.headerTap(t,i.getComponent()),o=!1}))),"function"==typeof n.headerDblTap&&(t=null,i.element.addEventListener("touchend",(function(e){t?(clearTimeout(t),t=null,n.headerDblTap(e,i.getComponent())):t=setTimeout((function(){clearTimeout(t),t=null}),300)}))),"function"==typeof n.headerTapHold&&(e=null,i.element.addEventListener("touchstart",(function(t){clearTimeout(e),e=setTimeout((function(){clearTimeout(e),e=null,o=!1,n.headerTapHold(t,i.getComponent())}),1e3)}),{passive:!0}),i.element.addEventListener("touchend",(function(t){clearTimeout(e),e=null}))),"function"==typeof n.cellClick&&(i.cellEvents.cellClick=n.cellClick),"function"==typeof n.cellDblClick&&(i.cellEvents.cellDblClick=n.cellDblClick),"function"==typeof n.cellContext&&(i.cellEvents.cellContext=n.cellContext),"function"==typeof n.cellMouseEnter&&(i.cellEvents.cellMouseEnter=n.cellMouseEnter),"function"==typeof n.cellMouseLeave&&(i.cellEvents.cellMouseLeave=n.cellMouseLeave),"function"==typeof n.cellMouseOver&&(i.cellEvents.cellMouseOver=n.cellMouseOver),"function"==typeof n.cellMouseOut&&(i.cellEvents.cellMouseOut=n.cellMouseOut),"function"==typeof n.cellMouseMove&&(i.cellEvents.cellMouseMove=n.cellMouseMove),"function"==typeof n.cellTap&&(i.cellEvents.cellTap=n.cellTap),"function"==typeof n.cellDblTap&&(i.cellEvents.cellDblTap=n.cellDblTap),"function"==typeof n.cellTapHold&&(i.cellEvents.cellTapHold=n.cellTapHold),"function"==typeof n.cellEdited&&(i.cellEvents.cellEdited=n.cellEdited),"function"==typeof n.cellEditing&&(i.cellEvents.cellEditing=n.cellEditing),"function"==typeof n.cellEditCancelled&&(i.cellEvents.cellEditCancelled=n.cellEditCancelled)},Column.prototype._buildColumnHeader=function(){var t=this,e=this.definition,o=this.table;(o.modExists("sort")&&o.modules.sort.initializeColumn(this,this.titleHolderElement),(e.headerContextMenu||e.headerClickMenu||e.headerMenu)&&o.modExists("menu")&&o.modules.menu.initializeColumnHeader(this),o.modExists("format")&&o.modules.format.initializeColumn(this),void 0!==e.editor&&o.modExists("edit")&&o.modules.edit.initializeColumn(this),void 0!==e.validator&&o.modExists("validate")&&o.modules.validate.initializeColumn(this),o.modExists("mutator")&&o.modules.mutator.initializeColumn(this),o.modExists("accessor")&&o.modules.accessor.initializeColumn(this),_typeof(o.options.responsiveLayout)&&o.modExists("responsiveLayout")&&o.modules.responsiveLayout.initializeColumn(this),void 0!==e.visible&&(e.visible?this.show(!0):this.hide(!0)),e.cssClass)&&e.cssClass.split(" ").forEach((function(e){t.element.classList.add(e)}));e.field&&this.element.setAttribute("tabulator-field",e.field),this.setMinWidth(void 0===e.minWidth?this.table.options.columnMinWidth:parseInt(e.minWidth)),(e.maxWidth||this.table.options.columnMaxWidth)&&!1!==e.maxWidth&&this.setMaxWidth(void 0===e.maxWidth?this.table.options.columnMaxWidth:parseInt(e.maxWidth)),this.reinitializeWidth(),this.tooltip=this.definition.tooltip||!1===this.definition.tooltip?this.definition.tooltip:this.table.options.tooltips,this.hozAlign=void 0===this.definition.hozAlign?this.table.options.cellHozAlign:this.definition.hozAlign,this.vertAlign=void 0===this.definition.vertAlign?this.table.options.cellVertAlign:this.definition.vertAlign,this.titleElement.style.textAlign=this.definition.headerHozAlign||this.table.options.headerHozAlign},Column.prototype._buildColumnHeaderContent=function(){this.definition,this.table;var t=document.createElement("div");return t.classList.add("tabulator-col-content"),this.titleHolderElement=document.createElement("div"),this.titleHolderElement.classList.add("tabulator-col-title-holder"),t.appendChild(this.titleHolderElement),this.titleElement=this._buildColumnHeaderTitle(),this.titleHolderElement.appendChild(this.titleElement),t},Column.prototype._buildColumnHeaderTitle=function(){var t=this,e=t.definition,o=t.table,i=document.createElement("div");if(i.classList.add("tabulator-col-title"),e.editableTitle){var n=document.createElement("input");n.classList.add("tabulator-title-editor"),n.addEventListener("click",(function(t){t.stopPropagation(),n.focus()})),n.addEventListener("change",(function(){e.title=n.value,o.options.columnTitleChanged.call(t.table,t.getComponent())})),i.appendChild(n),e.field?o.modules.localize.bind("columns|"+e.field,(function(t){n.value=t||e.title||" "})):n.value=e.title||" "}else e.field?o.modules.localize.bind("columns|"+e.field,(function(o){t._formatColumnHeaderTitle(i,o||e.title||" ")})):t._formatColumnHeaderTitle(i,e.title||" ");return i},Column.prototype._formatColumnHeaderTitle=function(t,e){var o,i,n,s,a,r=this;if(this.definition.titleFormatter&&this.table.modExists("format"))switch(o=this.table.modules.format.getFormatter(this.definition.titleFormatter),a=function(t){r.titleFormatterRendered=t},s={getValue:function(){return e},getElement:function(){return t}},n="function"==typeof(n=this.definition.titleFormatterParams||{})?n():n,void 0===(i=o.call(this.table.modules.format,s,n,a))?"undefined":_typeof(i)){case"object":i instanceof Node?t.appendChild(i):(t.innerHTML="",console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",i));break;case"undefined":case"null":t.innerHTML="";break;default:t.innerHTML=i}else t.innerHTML=e},Column.prototype._buildGroupHeader=function(){var t=this;(this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.definition.cssClass)&&this.definition.cssClass.split(" ").forEach((function(e){t.element.classList.add(e)}));(this.definition.headerContextMenu||this.definition.headerMenu)&&this.table.modExists("menu")&&this.table.modules.menu.initializeColumnHeader(this),this.titleElement.style.textAlign=this.definition.headerHozAlign||this.table.options.headerHozAlign,this.element.appendChild(this.groupElement)},Column.prototype._getFlatData=function(t){return t[this.field]},Column.prototype._getNestedData=function(t){for(var e,o=t,i=this.fieldStructure,n=i.length,s=0;s<n&&(e=o=o[i[s]],o);s++);return e},Column.prototype._setFlatData=function(t,e){this.field&&(t[this.field]=e)},Column.prototype._setNestedData=function(t,e){for(var o=t,i=this.fieldStructure,n=i.length,s=0;s<n;s++)if(s==n-1)o[i[s]]=e;else{if(!o[i[s]]){if(void 0===e)break;o[i[s]]={}}o=o[i[s]]}},Column.prototype.attachColumn=function(t){this.groupElement?(this.columns.push(t),this.groupElement.appendChild(t.getElement())):console.warn("Column Warning - Column being attached to another column instead of column group")},Column.prototype.verticalAlign=function(t,e){var o=this.parent.isGroup?this.parent.getGroupElement().clientHeight:e||this.parent.getHeadersElement().clientHeight;this.element.style.height=o+"px",this.isGroup&&(this.groupElement.style.minHeight=o-this.contentElement.offsetHeight+"px"),this.isGroup||"top"===t||(this.element.style.paddingTop="bottom"===t?this.element.clientHeight-this.contentElement.offsetHeight+"px":(this.element.clientHeight-this.contentElement.offsetHeight)/2+"px"),this.columns.forEach((function(e){e.verticalAlign(t)}))},Column.prototype.clearVerticalAlign=function(){this.element.style.paddingTop="",this.element.style.height="",this.element.style.minHeight="",this.groupElement.style.minHeight="",this.columns.forEach((function(t){t.clearVerticalAlign()}))},Column.prototype.bindModuleColumns=function(){"rownum"==this.definition.formatter&&(this.table.rowManager.rowNumColumn=this)},Column.prototype.getElement=function(){return this.element},Column.prototype.getGroupElement=function(){return this.groupElement},Column.prototype.getField=function(){return this.field},Column.prototype.getFirstColumn=function(){return this.isGroup?!!this.columns.length&&this.columns[0].getFirstColumn():this},Column.prototype.getLastColumn=function(){return this.isGroup?!!this.columns.length&&this.columns[this.columns.length-1].getLastColumn():this},Column.prototype.getColumns=function(){return this.columns},Column.prototype.getCells=function(){return this.cells},Column.prototype.getTopColumn=function(){return this.parent.isGroup?this.parent.getTopColumn():this},Column.prototype.getDefinition=function(t){var e=[];return this.isGroup&&t&&(this.columns.forEach((function(t){e.push(t.getDefinition(!0))})),this.definition.columns=e),this.definition},Column.prototype.checkColumnVisibility=function(){var t=!1;this.columns.forEach((function(e){e.visible&&(t=!0)})),t?(this.show(),this.parent.table.options.columnVisibilityChanged.call(this.table,this.getComponent(),!1)):this.hide()},Column.prototype.show=function(t,e){this.visible||(this.visible=!0,this.element.style.display="",this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach((function(t){t.show()})),this.isGroup||null!==this.width||this.reinitializeWidth(),this.table.columnManager._verticalAlignHeaders(),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns"),!e&&this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.updateColumnVisibility(this,this.visible),t||this.table.options.columnVisibilityChanged.call(this.table,this.getComponent(),!0),this.parent.isGroup&&this.parent.matchChildWidths(),!this.silent&&this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitialize())},Column.prototype.hide=function(t,e){this.visible&&(this.visible=!1,this.element.style.display="none",this.table.columnManager._verticalAlignHeaders(),this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach((function(t){t.hide()})),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns"),!e&&this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.updateColumnVisibility(this,this.visible),t||this.table.options.columnVisibilityChanged.call(this.table,this.getComponent(),!1),this.parent.isGroup&&this.parent.matchChildWidths(),!this.silent&&this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitialize())},Column.prototype.matchChildWidths=function(){var t=0;this.contentElement&&this.columns.length&&(this.columns.forEach((function(e){e.visible&&(t+=e.getWidth())})),this.contentElement.style.maxWidth=t-1+"px",this.parent.isGroup&&this.parent.matchChildWidths())},Column.prototype.removeChild=function(t){var e=this.columns.indexOf(t);e>-1&&this.columns.splice(e,1),this.columns.length||this.delete()},Column.prototype.setWidth=function(t){this.widthFixed=!0,this.setWidthActual(t)},Column.prototype.setWidthActual=function(t){isNaN(t)&&(t=Math.floor(this.table.element.clientWidth/100*parseInt(t))),t=Math.max(this.minWidth,t),this.maxWidth&&(t=Math.min(this.maxWidth,t)),this.width=t,this.widthStyled=t?t+"px":"",this.element.style.width=this.widthStyled,this.isGroup||this.cells.forEach((function(t){t.setWidth()})),this.parent.isGroup&&this.parent.matchChildWidths(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()},Column.prototype.checkCellHeights=function(){var t=[];this.cells.forEach((function(e){e.row.heightInitialized&&(null!==e.row.getElement().offsetParent?(t.push(e.row),e.row.clearCellHeight()):e.row.heightInitialized=!1)})),t.forEach((function(t){t.calcHeight()})),t.forEach((function(t){t.setCellHeight()}))},Column.prototype.getWidth=function(){var t=0;return this.isGroup?this.columns.forEach((function(e){e.visible&&(t+=e.getWidth())})):t=this.width,t},Column.prototype.getHeight=function(){return this.element.offsetHeight},Column.prototype.setMinWidth=function(t){this.minWidth=t,this.minWidthStyled=t?t+"px":"",this.element.style.minWidth=this.minWidthStyled,this.cells.forEach((function(t){t.setMinWidth()}))},Column.prototype.setMaxWidth=function(t){this.maxWidth=t,this.maxWidthStyled=t?t+"px":"",this.element.style.maxWidth=this.maxWidthStyled,this.cells.forEach((function(t){t.setMaxWidth()}))},Column.prototype.delete=function(){var t=this;return new Promise((function(e,o){t.isGroup&&t.columns.forEach((function(t){t.delete()})),t.table.modExists("edit")&&t.table.modules.edit.currentCell.column===t&&t.table.modules.edit.cancelEdit();for(var i=t.cells.length,n=0;n<i;n++)t.cells[0].delete();t.element.parentNode&&t.element.parentNode.removeChild(t.element),t.element=!1,t.contentElement=!1,t.titleElement=!1,t.groupElement=!1,t.parent.isGroup&&t.parent.removeChild(t),t.table.columnManager.deregisterColumn(t),t.table.options.virtualDomHoz&&t.table.vdomHoz.reinitialize(!0),e()}))},Column.prototype.columnRendered=function(){this.titleFormatterRendered&&this.titleFormatterRendered()},Column.prototype.validate=function(){var t=[];return this.cells.forEach((function(e){e.validate()||t.push(e.getComponent())})),!t.length||t},Column.prototype.generateCell=function(t){var e=new Cell(this,t);return this.cells.push(e),e},Column.prototype.nextColumn=function(){var t=this.table.columnManager.findColumnIndex(this);return t>-1&&this._nextVisibleColumn(t+1)},Column.prototype._nextVisibleColumn=function(t){var e=this.table.columnManager.getColumnByIndex(t);return!e||e.visible?e:this._nextVisibleColumn(t+1)},Column.prototype.prevColumn=function(){var t=this.table.columnManager.findColumnIndex(this);return t>-1&&this._prevVisibleColumn(t-1)},Column.prototype._prevVisibleColumn=function(t){var e=this.table.columnManager.getColumnByIndex(t);return!e||e.visible?e:this._prevVisibleColumn(t-1)},Column.prototype.reinitializeWidth=function(t){this.widthFixed=!1,void 0===this.definition.width||t||this.setWidth(this.definition.width),this.table.modExists("filter")&&this.table.modules.filter.hideHeaderFilterElements(),this.fitToData(),this.table.modExists("filter")&&this.table.modules.filter.showHeaderFilterElements()},Column.prototype.fitToData=function(){this.widthFixed||(this.element.style.width="",this.cells.forEach((function(t){t.clearWidth()})));var t=this.element.offsetWidth;this.width&&this.widthFixed||(this.cells.forEach((function(e){var o=e.getWidth();o>t&&(t=o)})),t&&this.setWidthActual(t+1))},Column.prototype.updateDefinition=function(t){var e=this;return new Promise((function(o,i){var n;e.isGroup||e.parent.isGroup?(console.warn("Column Update Error - The updateDefinition function is only available on ungrouped columns"),i("Column Update Error - The updateDefinition function is only available on columns, not column groups")):(n=Object.assign({},e.getDefinition()),n=Object.assign(n,t),e.table.columnManager.addColumn(n,!1,e).then((function(t){n.field==e.field&&(e.field=!1),e.delete().then((function(){o(t.getComponent())})).catch((function(t){i(t)}))})).catch((function(t){i(t)})))}))},Column.prototype.deleteCell=function(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)},Column.prototype.defaultOptionList=["title","field","columns","visible","align","hozAlign","vertAlign","width","minWidth","maxWidth","widthGrow","widthShrink","resizable","frozen","responsive","tooltip","cssClass","rowHandle","hideInHtml","print","htmlOutput","sorter","sorterParams","formatter","formatterParams","variableHeight","editable","editor","editorParams","validator","mutator","mutatorParams","mutatorData","mutatorDataParams","mutatorEdit","mutatorEditParams","mutatorClipboard","mutatorClipboardParams","accessor","accessorParams","accessorData","accessorDataParams","accessorDownload","accessorDownloadParams","accessorClipboard","accessorClipboardParams","accessorPrint","accessorPrintParams","accessorHtmlOutput","accessorHtmlOutputParams","clipboard","download","downloadTitle","topCalc","topCalcParams","topCalcFormatter","topCalcFormatterParams","bottomCalc","bottomCalcParams","bottomCalcFormatter","bottomCalcFormatterParams","cellClick","cellDblClick","cellContext","cellTap","cellDblTap","cellTapHold","cellMouseEnter","cellMouseLeave","cellMouseOver","cellMouseOut","cellMouseMove","cellEditing","cellEdited","cellEditCancelled","headerSort","headerSortStartingDir","headerSortTristate","headerClick","headerDblClick","headerContext","headerTap","headerDblTap","headerTapHold","headerTooltip","headerVertical","headerHozAlign","editableTitle","titleFormatter","titleFormatterParams","headerFilter","headerFilterPlaceholder","headerFilterParams","headerFilterEmptyCheck","headerFilterFunc","headerFilterFuncParams","headerFilterLiveFilter","print","headerContextMenu","headerMenu","contextMenu","clickMenu","formatterPrint","formatterPrintParams","formatterClipboard","formatterClipboardParams","formatterHtmlOutput","formatterHtmlOutputParams","titlePrint","titleClipboard","titleHtmlOutput","titleDownload"],Column.prototype.getComponent=function(){return this.component||(this.component=new ColumnComponent(this)),this.component};var RowManager=function(t){this.table=t,this.element=this.createHolderElement(),this.tableElement=this.createTableElement(),this.heightFixer=this.createTableElement(),this.columnManager=null,this.height=0,this.firstRender=!1,this.renderMode="virtual",this.fixedHeight=!1,this.rows=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.scrollTop=0,this.scrollLeft=0,this.vDomRowHeight=20,this.vDomTop=0,this.vDomBottom=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomMaxRenderChain=90,this.vDomWindowBuffer=0,this.vDomWindowMinTotalRows=20,this.vDomWindowMinMarginRows=5,this.vDomTopNewRows=[],this.vDomBottomNewRows=[],this.rowNumColumn=!1,this.redrawBlock=!1,this.redrawBlockRestoreConfig=!1,this.redrawBlockRederInPosition=!1};RowManager.prototype.createHolderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-tableHolder"),t.setAttribute("tabindex",0),t},RowManager.prototype.createTableElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-table"),t},RowManager.prototype.getElement=function(){return this.element},RowManager.prototype.getTableElement=function(){return this.tableElement},RowManager.prototype.getRowPosition=function(t,e){return e?this.activeRows.indexOf(t):this.rows.indexOf(t)},RowManager.prototype.setColumnManager=function(t){this.columnManager=t},RowManager.prototype.initialize=function(){var t=this;t.setRenderMode(),t.element.appendChild(t.tableElement),t.firstRender=!0,t.element.addEventListener("scroll",(function(){var e=t.element.scrollLeft;t.scrollLeft!=e&&(t.columnManager.scrollHorizontal(e),t.table.options.groupBy&&t.table.modules.groupRows.scrollHeaders(e),t.table.modExists("columnCalcs")&&t.table.modules.columnCalcs.scrollHorizontal(e),t.table.options.scrollHorizontal(e)),t.scrollLeft=e})),"virtual"===this.renderMode&&t.element.addEventListener("scroll",(function(){var e=t.element.scrollTop,o=t.scrollTop>e;t.scrollTop!=e?(t.scrollTop=e,t.scrollVertical(o),"scroll"==t.table.options.ajaxProgressiveLoad&&t.table.modules.ajax.nextPage(t.element.scrollHeight-t.element.clientHeight-e),t.table.options.scrollVertical(e)):t.scrollTop=e}))},RowManager.prototype.findRow=function(t){var e=this;return"object"!=(void 0===t?"undefined":_typeof(t))?null!=t&&(e.rows.find((function(o){return o.data[e.table.options.index]==t}))||!1):t instanceof Row?t:t instanceof RowComponent?t._getSelf()||!1:"undefined"!=typeof HTMLElement&&t instanceof HTMLElement&&e.rows.find((function(e){return e.getElement()===t}))||!1},RowManager.prototype.getRowFromDataObject=function(t){return this.rows.find((function(e){return e.data===t}))||!1},RowManager.prototype.getRowFromPosition=function(t,e){return e?this.activeRows[t]:this.rows[t]},RowManager.prototype.scrollToRow=function(t,e,o){var i,n=this,s=this.getDisplayRows().indexOf(t),a=t.getElement(),r=0;return new Promise((function(t,l){if(s>-1){if(void 0===e&&(e=n.table.options.scrollToRowPosition),void 0===o&&(o=n.table.options.scrollToRowIfVisible),"nearest"===e)switch(n.renderMode){case"classic":i=Tabulator.prototype.helpers.elOffset(a).top,e=Math.abs(n.element.scrollTop-i)>Math.abs(n.element.scrollTop+n.element.clientHeight-i)?"bottom":"top";break;case"virtual":e=Math.abs(n.vDomTop-s)>Math.abs(n.vDomBottom-s)?"bottom":"top"}if(!o&&Tabulator.prototype.helpers.elVisible(a)&&(r=Tabulator.prototype.helpers.elOffset(a).top-Tabulator.prototype.helpers.elOffset(n.element).top)>0&&r<n.element.clientHeight-a.offsetHeight)return!1;switch(n.renderMode){case"classic":n.element.scrollTop=Tabulator.prototype.helpers.elOffset(a).top-Tabulator.prototype.helpers.elOffset(n.element).top+n.element.scrollTop;break;case"virtual":n._virtualRenderFill(s,!0)}switch(e){case"middle":case"center":n.element.scrollHeight-n.element.scrollTop==n.element.clientHeight?n.element.scrollTop=n.element.scrollTop+(a.offsetTop-n.element.scrollTop)-(n.element.scrollHeight-a.offsetTop)/2:n.element.scrollTop=n.element.scrollTop-n.element.clientHeight/2;break;case"bottom":n.element.scrollHeight-n.element.scrollTop==n.element.clientHeight?n.element.scrollTop=n.element.scrollTop-(n.element.scrollHeight-a.offsetTop)+a.offsetHeight:n.element.scrollTop=n.element.scrollTop-n.element.clientHeight+a.offsetHeight}t()}else console.warn("Scroll Error - Row not visible"),l("Scroll Error - Row not visible")}))},RowManager.prototype.setData=function(t,e,o){var i=this,n=this;return new Promise((function(s,a){e&&i.getDisplayRows().length?n.table.options.pagination?n._setDataActual(t,!0):i.reRenderInPosition((function(){n._setDataActual(t)})):(i.table.options.autoColumns&&o&&i.table.columnManager.generateColumnsFromRowData(t),i.resetScroll(),i._setDataActual(t)),s()}))},RowManager.prototype._setDataActual=function(t,e){var o=this;o.table.options.dataLoading.call(this.table,t),this._wipeElements(),this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.clear(),Array.isArray(t)?(this.table.modExists("selectRow")&&this.table.modules.selectRow.clearSelectionData(),this.table.options.reactiveData&&this.table.modExists("reactiveData",!0)&&this.table.modules.reactiveData.watchData(t),t.forEach((function(t,e){if(t&&"object"===(void 0===t?"undefined":_typeof(t))){var i=new Row(t,o);o.rows.push(i)}else console.warn("Data Loading Warning - Invalid row data detected and ignored, expecting object but received:",t)})),o.refreshActiveData(!1,!1,e),o.table.options.dataLoaded.call(this.table,t)):console.error("Data Loading Error - Unable to process data due to invalid data type \nExpecting: array \nReceived: ",void 0===t?"undefined":_typeof(t),"\nData: ",t)},RowManager.prototype._wipeElements=function(){this.rows.forEach((function(t){t.wipe()})),this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.wipe(),this.rows=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.adjustTableSize()},RowManager.prototype.deleteRow=function(t,e){var o=this.rows.indexOf(t),i=this.activeRows.indexOf(t);i>-1&&this.activeRows.splice(i,1),o>-1&&this.rows.splice(o,1),this.setActiveRows(this.activeRows),this.displayRowIterator((function(e){var o=e.indexOf(t);o>-1&&e.splice(o,1)})),e||this.reRenderInPosition(),this.regenerateRowNumbers(),this.table.options.rowDeleted.call(this.table,t.getComponent()),this.table.options.dataChanged&&this.table.options.dataChanged.call(this.table,this.getData()),this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.groupRows.updateGroupRows(!0):this.table.options.pagination&&this.table.modExists("page")?this.refreshActiveData(!1,!1,!0):this.table.options.pagination&&this.table.modExists("page")&&this.refreshActiveData("page")},RowManager.prototype.addRow=function(t,e,o,i){var n=this.addRowActual(t,e,o,i);return this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowAdd",n,{data:t,pos:e,index:o}),n},RowManager.prototype.addRows=function(t,e,o){var i=this,n=this,s=[];return new Promise((function(a,r){e=i.findAddRowPos(e),Array.isArray(t)||(t=[t]),t.length-1,(void 0===o&&e||void 0!==o&&!e)&&t.reverse(),t.forEach((function(t,i){var a=n.addRow(t,e,o,!0);s.push(a)})),i.table.options.groupBy&&i.table.modExists("groupRows")?i.table.modules.groupRows.updateGroupRows(!0):i.table.options.pagination&&i.table.modExists("page")?i.refreshActiveData(!1,!1,!0):i.reRenderInPosition(),i.table.modExists("columnCalcs")&&i.table.modules.columnCalcs.recalc(i.table.rowManager.activeRows),i.regenerateRowNumbers(),a(s)}))},RowManager.prototype.findAddRowPos=function(t){return void 0===t&&(t=this.table.options.addRowPos),"pos"===t&&(t=!0),"bottom"===t&&(t=!1),t},RowManager.prototype.addRowActual=function(t,e,o,i){var n,s,a=t instanceof Row?t:new Row(t||{},this),r=this.findAddRowPos(e),l=-1;if(!o&&this.table.options.pagination&&"page"==this.table.options.paginationAddRow&&(s=this.getDisplayRows(),r?s.length?o=s[0]:this.activeRows.length&&(o=this.activeRows[this.activeRows.length-1],r=!1):s.length&&(o=s[s.length-1],r=!(s.length<this.table.modules.page.getPageSize()))),void 0!==o&&(o=this.findRow(o)),this.table.options.groupBy&&this.table.modExists("groupRows")){this.table.modules.groupRows.assignRowToGroup(a);var u=a.getGroup().rows;u.length>1&&(!o||o&&-1==u.indexOf(o)?r?u[0]!==a&&(o=u[0],this._moveRowInArray(a.getGroup().rows,a,o,!r)):u[u.length-1]!==a&&(o=u[u.length-1],this._moveRowInArray(a.getGroup().rows,a,o,!r)):this._moveRowInArray(a.getGroup().rows,a,o,!r))}return o&&(l=this.rows.indexOf(o)),o&&l>-1?(n=this.activeRows.indexOf(o),this.displayRowIterator((function(t){var e=t.indexOf(o);e>-1&&t.splice(r?e:e+1,0,a)})),n>-1&&this.activeRows.splice(r?n:n+1,0,a),this.rows.splice(r?l:l+1,0,a)):r?(this.displayRowIterator((function(t){t.unshift(a)})),this.activeRows.unshift(a),this.rows.unshift(a)):(this.displayRowIterator((function(t){t.push(a)})),this.activeRows.push(a),this.rows.push(a)),this.setActiveRows(this.activeRows),this.table.options.rowAdded.call(this.table,a.getComponent()),this.table.options.dataChanged&&this.table.options.dataChanged.call(this.table,this.getData()),i||this.reRenderInPosition(),a},RowManager.prototype.moveRow=function(t,e,o){this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowMove",t,{posFrom:this.getRowPosition(t),posTo:this.getRowPosition(e),to:e,after:o}),this.moveRowActual(t,e,o),this.regenerateRowNumbers(),this.table.options.rowMoved.call(this.table,t.getComponent())},RowManager.prototype.moveRowActual=function(t,e,o){var i=this;if(this._moveRowInArray(this.rows,t,e,o),this._moveRowInArray(this.activeRows,t,e,o),this.displayRowIterator((function(n){i._moveRowInArray(n,t,e,o)})),this.table.options.groupBy&&this.table.modExists("groupRows")){!o&&e instanceof Group&&(e=this.table.rowManager.prevDisplayRow(t)||e);var n=e.getGroup(),s=t.getGroup();n===s?this._moveRowInArray(n.rows,t,e,o):(s&&s.removeRow(t),n.insertRow(t,e,o))}},RowManager.prototype._moveRowInArray=function(t,e,o,i){var n,s,a;if(e!==o&&((n=t.indexOf(e))>-1&&(t.splice(n,1),(s=t.indexOf(o))>-1?i?t.splice(s+1,0,e):t.splice(s,0,e):t.splice(n,0,e)),t===this.getDisplayRows())){a=s>n?s:n+1;for(var r=n<s?n:s;r<=a;r++)t[r]&&this.styleRow(t[r],r)}},RowManager.prototype.clearData=function(){this.setData([])},RowManager.prototype.getRowIndex=function(t){return this.findRowIndex(t,this.rows)},RowManager.prototype.getDisplayRowIndex=function(t){var e=this.getDisplayRows().indexOf(t);return e>-1&&e},RowManager.prototype.nextDisplayRow=function(t,e){var o=this.getDisplayRowIndex(t),i=!1;return!1!==o&&o<this.displayRowsCount-1&&(i=this.getDisplayRows()[o+1]),!i||i instanceof Row&&"row"==i.type?i:this.nextDisplayRow(i,e)},RowManager.prototype.prevDisplayRow=function(t,e){var o=this.getDisplayRowIndex(t),i=!1;return o&&(i=this.getDisplayRows()[o-1]),!e||!i||i instanceof Row&&"row"==i.type?i:this.prevDisplayRow(i,e)},RowManager.prototype.findRowIndex=function(t,e){var o;return!!((t=this.findRow(t))&&(o=e.indexOf(t))>-1)&&o},RowManager.prototype.getData=function(t,e){var o=[];return this.getRows(t).forEach((function(t){"row"==t.type&&o.push(t.getData(e||"data"))})),o},RowManager.prototype.getComponents=function(t){var e=[];return this.getRows(t).forEach((function(t){e.push(t.getComponent())})),e},RowManager.prototype.getDataCount=function(t){return this.getRows(t).length},RowManager.prototype._genRemoteRequest=function(){var t=this,e=this.table,o=e.options,i={};if(e.modExists("page")){if(o.ajaxSorting){var n=this.table.modules.sort.getSort();n.forEach((function(t){delete t.column})),i[this.table.modules.page.paginationDataSentNames.sorters]=n}if(o.ajaxFiltering){var s=this.table.modules.filter.getFilters(!0,!0);i[this.table.modules.page.paginationDataSentNames.filters]=s}this.table.modules.ajax.setParams(i,!0)}e.modules.ajax.sendRequest().then((function(e){t._setDataActual(e,!0)})).catch((function(t){}))},RowManager.prototype.filterRefresh=function(){var t=this.table,e=t.options,o=this.scrollLeft;e.ajaxFiltering?"remote"==e.pagination&&t.modExists("page")?(t.modules.page.reset(!0),t.modules.page.setPage(1).then((function(){})).catch((function(){}))):e.ajaxProgressiveLoad?t.modules.ajax.loadData().then((function(){})).catch((function(){})):this._genRemoteRequest():this.refreshActiveData("filter"),this.scrollHorizontal(o)},RowManager.prototype.sorterRefresh=function(t){var e=this.table,o=this.table.options,i=this.scrollLeft;o.ajaxSorting?("remote"==o.pagination||o.progressiveLoad)&&e.modExists("page")?(e.modules.page.reset(!0),e.modules.page.setPage(1).then((function(){})).catch((function(){}))):o.ajaxProgressiveLoad?e.modules.ajax.loadData().then((function(){})).catch((function(){})):this._genRemoteRequest():this.refreshActiveData(t?"filter":"sort"),this.scrollHorizontal(i)},RowManager.prototype.scrollHorizontal=function(t){this.scrollLeft=t,this.element.scrollLeft=t,this.table.options.groupBy&&this.table.modules.groupRows.scrollHeaders(t),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.scrollHorizontal(t)},RowManager.prototype.refreshActiveData=function(t,e,o){var i,n=this.table,s=["all","filter","sort","display","freeze","group","tree","page"];if(this.redrawBlock)(!this.redrawBlockRestoreConfig||s.indexOf(t)<s.indexOf(this.redrawBlockRestoreConfig.stage))&&(this.redrawBlockRestoreConfig={stage:t,skipStage:e,renderInPosition:o});else{switch(this.table.modExists("edit")&&this.table.modules.edit.cancelEdit(),t||(t="all"),n.options.selectable&&!n.options.selectablePersistence&&n.modExists("selectRow")&&n.modules.selectRow.deselectRows(),t){case"all":case"filter":e?e=!1:n.modExists("filter")?this.setActiveRows(n.modules.filter.filter(this.rows)):this.setActiveRows(this.rows.slice(0));case"sort":e?e=!1:n.modExists("sort")&&n.modules.sort.sort(this.activeRows),this.regenerateRowNumbers();case"display":this.resetDisplayRows();case"freeze":e?e=!1:this.table.modExists("frozenRows")&&n.modules.frozenRows.isFrozen()&&(n.modules.frozenRows.getDisplayIndex()||n.modules.frozenRows.setDisplayIndex(this.getNextDisplayIndex()),i=n.modules.frozenRows.getDisplayIndex(),!0!==(i=this.setDisplayRows(n.modules.frozenRows.getRows(this.getDisplayRows(i-1)),i))&&n.modules.frozenRows.setDisplayIndex(i));case"group":e?e=!1:n.options.groupBy&&n.modExists("groupRows")&&(n.modules.groupRows.getDisplayIndex()||n.modules.groupRows.setDisplayIndex(this.getNextDisplayIndex()),i=n.modules.groupRows.getDisplayIndex(),!0!==(i=this.setDisplayRows(n.modules.groupRows.getRows(this.getDisplayRows(i-1)),i))&&n.modules.groupRows.setDisplayIndex(i));case"tree":e?e=!1:n.options.dataTree&&n.modExists("dataTree")&&(n.modules.dataTree.getDisplayIndex()||n.modules.dataTree.setDisplayIndex(this.getNextDisplayIndex()),i=n.modules.dataTree.getDisplayIndex(),!0!==(i=this.setDisplayRows(n.modules.dataTree.getRows(this.getDisplayRows(i-1)),i))&&n.modules.dataTree.setDisplayIndex(i)),n.options.pagination&&n.modExists("page")&&!o&&"local"==n.modules.page.getMode()&&n.modules.page.reset();case"page":e?e=!1:n.options.pagination&&n.modExists("page")&&(n.modules.page.getDisplayIndex()||n.modules.page.setDisplayIndex(this.getNextDisplayIndex()),i=n.modules.page.getDisplayIndex(),"local"==n.modules.page.getMode()&&n.modules.page.setMaxRows(this.getDisplayRows(i-1).length),!0!==(i=this.setDisplayRows(n.modules.page.getRows(this.getDisplayRows(i-1)),i))&&n.modules.page.setDisplayIndex(i))}Tabulator.prototype.helpers.elVisible(this.element)&&(o?this.reRenderInPosition():("all"===t&&this.table.options.virtualDomHoz&&this.table.vdomHoz.dataChange(),this.renderTable(),n.options.layoutColumnsOnNewData&&this.table.columnManager.redraw(!0))),n.modExists("columnCalcs")&&n.modules.columnCalcs.recalc(this.activeRows)}},RowManager.prototype.regenerateRowNumbers=function(){var t=this;this.rowNumColumn&&this.activeRows.forEach((function(e){var o=e.getCell(t.rowNumColumn);o&&o._generateContents()}))},RowManager.prototype.setActiveRows=function(t){this.activeRows=t,this.activeRowsCount=this.activeRows.length},RowManager.prototype.resetDisplayRows=function(){this.displayRows=[],this.displayRows.push(this.activeRows.slice(0)),this.displayRowsCount=this.displayRows[0].length,this.table.modExists("frozenRows")&&this.table.modules.frozenRows.setDisplayIndex(0),this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.setDisplayIndex(0),this.table.options.pagination&&this.table.modExists("page")&&this.table.modules.page.setDisplayIndex(0)},RowManager.prototype.getNextDisplayIndex=function(){return this.displayRows.length},RowManager.prototype.setDisplayRows=function(t,e){var o=!0;return e&&void 0!==this.displayRows[e]?(this.displayRows[e]=t,o=!0):(this.displayRows.push(t),o=e=this.displayRows.length-1),e==this.displayRows.length-1&&(this.displayRowsCount=this.displayRows[this.displayRows.length-1].length),o},RowManager.prototype.getDisplayRows=function(t){return void 0===t?this.displayRows.length?this.displayRows[this.displayRows.length-1]:[]:this.displayRows[t]||[]},RowManager.prototype.getVisibleRows=function(t){var e=this.element.scrollTop,o=this.element.clientHeight+e,i=!1,n=0,s=0,a=this.getDisplayRows();if(t){this.getDisplayRows();for(var r=this.vDomTop;r<=this.vDomBottom;r++)if(a[r])if(i){if(!(o-a[r].getElement().offsetTop>=0))break;s=r}else if(e-a[r].getElement().offsetTop>=0)n=r;else{if(i=!0,!(o-a[r].getElement().offsetTop>=0))break;s=r}}else n=this.vDomTop,s=this.vDomBottom;return a.slice(n,s+1)},RowManager.prototype.displayRowIterator=function(t){this.displayRows.forEach(t),this.displayRowsCount=this.displayRows[this.displayRows.length-1].length},RowManager.prototype.getRows=function(t){var e;switch(t){case"active":e=this.activeRows;break;case"display":e=this.table.rowManager.getDisplayRows();break;case"visible":e=this.getVisibleRows(!0);break;case"selected":e=this.table.modules.selectRow.selectedRows;break;default:e=this.rows}return e},RowManager.prototype.reRenderInPosition=function(t){if("virtual"==this.getRenderMode())if(this.redrawBlock)t?t():this.redrawBlockRederInPosition=!0;else{for(var e=this.element.scrollTop,o=!1,i=!1,n=this.scrollLeft,s=this.getDisplayRows(),a=this.vDomTop;a<=this.vDomBottom;a++)if(s[a]){var r=e-s[a].getElement().offsetTop;if(!(!1===i||Math.abs(r)<i))break;i=r,o=a}t&&t(),this._virtualRenderFill(!1===o?this.displayRowsCount-1:o,!0,i||0),this.scrollHorizontal(n)}else this.renderTable(),t&&t()},RowManager.prototype.setRenderMode=function(){this.table.options.virtualDom?(this.renderMode="virtual",this.table.element.clientHeight||this.table.options.height?this.fixedHeight=!0:this.fixedHeight=!1):this.renderMode="classic"},RowManager.prototype.getRenderMode=function(){return this.renderMode},RowManager.prototype.renderTable=function(){switch(this.table.options.renderStarted.call(this.table),this.element.scrollTop=0,this.renderMode){case"classic":this._simpleRender();break;case"virtual":this._virtualRenderFill()}this.firstRender&&(this.displayRowsCount?(this.firstRender=!1,this.table.modules.layout.layout()):this.renderEmptyScroll()),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout(),this.displayRowsCount||this.table.options.placeholder&&(this.table.options.placeholder.setAttribute("tabulator-render-mode",this.renderMode),this.getElement().appendChild(this.table.options.placeholder),this.table.options.placeholder.style.width=this.table.columnManager.getWidth()+"px"),this.table.options.renderComplete.call(this.table)},RowManager.prototype._simpleRender=function(){this._clearVirtualDom(),this.displayRowsCount?this.checkClassicModeGroupHeaderWidth():this.renderEmptyScroll()},RowManager.prototype.checkClassicModeGroupHeaderWidth=function(){var t=this,e=this.tableElement,o=!0;t.getDisplayRows().forEach((function(i,n){t.styleRow(i,n),e.appendChild(i.getElement()),i.initialize(!0),"group"!==i.type&&(o=!1)})),e.style.minWidth=o?t.table.columnManager.getWidth()+"px":""},RowManager.prototype.renderEmptyScroll=function(){this.table.options.placeholder?this.tableElement.style.display="none":this.tableElement.style.minWidth=this.table.columnManager.getWidth()+"px"},RowManager.prototype._clearVirtualDom=function(){var t=this.tableElement;for(this.table.options.placeholder&&this.table.options.placeholder.parentNode&&this.table.options.placeholder.parentNode.removeChild(this.table.options.placeholder);t.firstChild;)t.removeChild(t.firstChild);t.style.paddingTop="",t.style.paddingBottom="",t.style.minWidth="",t.style.minHeight="",t.style.display="",t.style.visibility="",this.scrollTop=0,this.scrollLeft=0,this.vDomTop=0,this.vDomBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0},RowManager.prototype.styleRow=function(t,e){var o=t.getElement();e%2?(o.classList.add("tabulator-row-even"),o.classList.remove("tabulator-row-odd")):(o.classList.add("tabulator-row-odd"),o.classList.remove("tabulator-row-even"))},RowManager.prototype._virtualRenderFill=function(t,e,o){var i=this.tableElement,n=this.element,s=0,a=0,r=0,l=0,u=!0,c=this.getDisplayRows();if(o=o||0,t=t||0){for(;i.firstChild;)i.removeChild(i.firstChild);var d=(this.displayRowsCount-t+1)*this.vDomRowHeight;d<this.height&&(t-=Math.ceil((this.height-d)/this.vDomRowHeight))<0&&(t=0),t-=s=Math.min(Math.max(Math.floor(this.vDomWindowBuffer/this.vDomRowHeight),this.vDomWindowMinMarginRows),t)}else this._clearVirtualDom();if(this.displayRowsCount&&Tabulator.prototype.helpers.elVisible(this.element)){for(this.vDomTop=t,this.vDomBottom=t-1;(a<=this.height+this.vDomWindowBuffer||l<this.vDomWindowMinTotalRows)&&this.vDomBottom<this.displayRowsCount-1;){var h,p=this.vDomBottom+1,m=c[p];this.styleRow(m,p),i.appendChild(m.getElement()),m.initialize(),m.heightInitialized||m.normalizeHeight(!0),h=m.getHeight(),l<s?r+=h:a+=h,h>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*h),"group"!==m.type&&(u=!1),this.vDomBottom++,l++}t?(this.vDomTopPad=e?this.vDomRowHeight*this.vDomTop+o:this.scrollTop-r,this.vDomBottomPad=this.vDomBottom==this.displayRowsCount-1?0:Math.max(this.vDomScrollHeight-this.vDomTopPad-a-r,0)):(this.vDomTopPad=0,this.vDomRowHeight=Math.floor((a+r)/l),this.vDomBottomPad=this.vDomRowHeight*(this.displayRowsCount-this.vDomBottom-1),this.vDomScrollHeight=r+a+this.vDomBottomPad-this.height),i.style.paddingTop=this.vDomTopPad+"px",i.style.paddingBottom=this.vDomBottomPad+"px",e&&(this.scrollTop=this.vDomTopPad+r+o-(this.element.scrollWidth>this.element.clientWidth?this.element.offsetHeight-this.element.clientHeight:0)),this.scrollTop=Math.min(this.scrollTop,this.element.scrollHeight-this.height),this.element.scrollWidth>this.element.offsetWidth&&e&&(this.scrollTop+=this.element.offsetHeight-this.element.clientHeight),this.vDomScrollPosTop=this.scrollTop,this.vDomScrollPosBottom=this.scrollTop,n.scrollTop=this.scrollTop,i.style.minWidth=u?this.table.columnManager.getWidth()+"px":"",this.table.options.groupBy&&"fitDataFill"!=this.table.modules.layout.getMode()&&this.displayRowsCount==this.table.modules.groupRows.countGroups()&&(this.tableElement.style.minWidth=this.table.columnManager.getWidth())}else this.renderEmptyScroll();this.fixedHeight||this.adjustTableSize()},RowManager.prototype.scrollVertical=function(t){var e=this.scrollTop-this.vDomScrollPosTop,o=this.scrollTop-this.vDomScrollPosBottom,i=2*this.vDomWindowBuffer;if(-e>i||o>i){var n=this.scrollLeft;this._virtualRenderFill(Math.floor(this.element.scrollTop/this.element.scrollHeight*this.displayRowsCount)),this.scrollHorizontal(n)}else t?(e<0&&this._addTopRow(-e),o<0&&(this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer?this._removeBottomRow(-o):this.vDomScrollPosBottom=this.scrollTop)):(e>=0&&(this.scrollTop>this.vDomWindowBuffer?this._removeTopRow(e):this.vDomScrollPosTop=this.scrollTop),o>=0&&this._addBottomRow(o))},RowManager.prototype._addTopRow=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.tableElement,i=this.getDisplayRows();if(this.vDomTop){var n=this.vDomTop-1,s=i[n],a=s.getHeight()||this.vDomRowHeight;t>=a&&(this.styleRow(s,n),o.insertBefore(s.getElement(),o.firstChild),s.initialized&&s.heightInitialized||(this.vDomTopNewRows.push(s),s.heightInitialized||s.clearCellHeight()),s.initialize(),this.vDomTopPad-=a,this.vDomTopPad<0&&(this.vDomTopPad=n*this.vDomRowHeight),n||(this.vDomTopPad=0),o.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop-=a,this.vDomTop--),t=-(this.scrollTop-this.vDomScrollPosTop),s.getHeight()>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*s.getHeight()),e<this.vDomMaxRenderChain&&this.vDomTop&&t>=(i[this.vDomTop-1].getHeight()||this.vDomRowHeight)?this._addTopRow(t,e+1):this._quickNormalizeRowHeight(this.vDomTopNewRows)}},RowManager.prototype._removeTopRow=function(t){var e=this.tableElement,o=this.getDisplayRows()[this.vDomTop],i=o.getHeight()||this.vDomRowHeight;if(t>=i){var n=o.getElement();n.parentNode.removeChild(n),this.vDomTopPad+=i,e.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop+=this.vDomTop?i:i+this.vDomWindowBuffer,this.vDomTop++,t=this.scrollTop-this.vDomScrollPosTop,this._removeTopRow(t)}},RowManager.prototype._addBottomRow=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.tableElement,i=this.getDisplayRows();if(this.vDomBottom<this.displayRowsCount-1){var n=this.vDomBottom+1,s=i[n],a=s.getHeight()||this.vDomRowHeight;t>=a&&(this.styleRow(s,n),o.appendChild(s.getElement()),s.initialized&&s.heightInitialized||(this.vDomBottomNewRows.push(s),s.heightInitialized||s.clearCellHeight()),s.initialize(),this.vDomBottomPad-=a,(this.vDomBottomPad<0||n==this.displayRowsCount-1)&&(this.vDomBottomPad=0),o.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom+=a,this.vDomBottom++),t=this.scrollTop-this.vDomScrollPosBottom,s.getHeight()>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*s.getHeight()),e<this.vDomMaxRenderChain&&this.vDomBottom<this.displayRowsCount-1&&t>=(i[this.vDomBottom+1].getHeight()||this.vDomRowHeight)?this._addBottomRow(t,e+1):this._quickNormalizeRowHeight(this.vDomBottomNewRows)}},RowManager.prototype._removeBottomRow=function(t){var e=this.tableElement,o=this.getDisplayRows()[this.vDomBottom],i=o.getHeight()||this.vDomRowHeight;if(t>=i){var n=o.getElement();n.parentNode&&n.parentNode.removeChild(n),this.vDomBottomPad+=i,this.vDomBottomPad<0&&(this.vDomBottomPad=0),e.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom-=i,this.vDomBottom--,t=-(this.scrollTop-this.vDomScrollPosBottom),this._removeBottomRow(t)}},RowManager.prototype._quickNormalizeRowHeight=function(t){t.forEach((function(t){t.calcHeight()})),t.forEach((function(t){t.setCellHeight()})),t.length=0},RowManager.prototype.normalizeHeight=function(){this.activeRows.forEach((function(t){t.normalizeHeight()}))},RowManager.prototype.adjustTableSize=function(){var t,e=this.element.clientHeight;if("virtual"===this.renderMode){var o=Math.floor(this.columnManager.getElement().getBoundingClientRect().height+(this.table.footerManager&&this.table.footerManager.active&&!this.table.footerManager.external?this.table.footerManager.getElement().getBoundingClientRect().height:0));this.fixedHeight?(this.element.style.minHeight="calc(100% - "+o+"px)",this.element.style.height="calc(100% - "+o+"px)",this.element.style.maxHeight="calc(100% - "+o+"px)"):(this.element.style.height="",this.element.style.height=this.table.element.clientHeight-o+"px",this.element.scrollTop=this.scrollTop),this.height=this.element.clientHeight,this.vDomWindowBuffer=this.table.options.virtualDomBuffer||this.height,this.fixedHeight||e==this.element.clientHeight||((t=this.table.modExists("resizeTable"))&&!this.table.modules.resizeTable.autoResize||!t)&&this.redraw()}},RowManager.prototype.reinitialize=function(){this.rows.forEach((function(t){t.reinitialize(!0)}))},RowManager.prototype.blockRedraw=function(){this.redrawBlock=!0,this.redrawBlockRestoreConfig=!1},RowManager.prototype.restoreRedraw=function(){this.redrawBlock=!1,this.redrawBlockRestoreConfig?(this.refreshActiveData(this.redrawBlockRestoreConfig.stage,this.redrawBlockRestoreConfig.skipStage,this.redrawBlockRestoreConfig.renderInPosition),this.redrawBlockRestoreConfig=!1):this.redrawBlockRederInPosition&&this.reRenderInPosition(),this.redrawBlockRederInPosition=!1},RowManager.prototype.redraw=function(t){var e=this.scrollLeft;this.adjustTableSize(),this.table.tableWidth=this.table.element.clientWidth,t?this.renderTable():("classic"==this.renderMode?this.table.options.groupBy?this.refreshActiveData("group",!1,!1):this._simpleRender():(this.reRenderInPosition(),this.scrollHorizontal(e)),this.displayRowsCount||this.table.options.placeholder&&this.getElement().appendChild(this.table.options.placeholder))},RowManager.prototype.resetScroll=function(){if(this.element.scrollLeft=0,this.element.scrollTop=0,"ie"===this.table.browser){var t=document.createEvent("Event");t.initEvent("scroll",!1,!0),this.element.dispatchEvent(t)}else this.element.dispatchEvent(new Event("scroll"))};var VDomHoz=function(t){this.table=t,this.element=this.table.rowManager.tableElement,this.holderEl=this.table.rowManager.element,this.leftCol=0,this.rightCol=0,this.scrollLeft=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0,this.fitDataColAvg=0,this.window=200,this.initialized=!1,this.columns=[],this.compatabilityCheck()&&this.initialize()};VDomHoz.prototype.compatabilityCheck=function(){var t=this.table.options,e=!0;return"fitDataTable"==t.layout&&(console.warn("Horizontal Vitrual DOM is not compatible with fitDataTable layout mode"),e=!1),t.responsiveLayout&&(console.warn("Horizontal Vitrual DOM is not compatible with responsive columns"),e=!1),this.table.rtl&&(console.warn("Horizontal Vitrual DOM is not currently compatible with RTL text direction"),e=!1),t.columns&&t.columns.find((function(t){return t.frozen}))&&(console.warn("Horizontal Vitrual DOM is not compatible with frozen columns"),e=!1),e||(t.virtualDomHoz=!1),e},VDomHoz.prototype.initialize=function(){var t=this;this.holderEl.addEventListener("scroll",(function(){var e=t.holderEl.scrollLeft;t.scrollLeft!=e&&(t.scrollLeft=e,t.scroll(e-(t.vDomScrollPosLeft+t.window)))}))},VDomHoz.prototype.deinitialize=function(){this.initialized=!1},VDomHoz.prototype.clear=function(){this.columns=[],this.leftCol=-1,this.rightCol=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0},VDomHoz.prototype.dataChange=function(){var t,e,o=!1,i=0,n=0;if("fitData"===this.table.options.layout){if(this.table.columnManager.columnsByIndex.forEach((function(t){!t.definition.width&&t.visible&&(o=!0)})),o&&o&&this.table.rowManager.getDisplayRows().length&&(this.vDomScrollPosRight=this.scrollLeft+this.holderEl.clientWidth+this.window,t=this.table.options.groupBy?this.table.modules.groupRows.getGroups(!1)[0].getRows(!1)[0]:this.table.rowManager.getDisplayRows()[0])){e=t.getElement(),t.generateCells(),this.element.appendChild(e);for(n=0;n<t.cells.length;n++){var s=t.cells[n];if(e.appendChild(s.getElement()),s.column.reinitializeWidth(),(i+=s.column.getWidth())>this.vDomScrollPosRight)break}for(e.parentNode.removeChild(e),this.fitDataColAvg=Math.floor(i/(n+1));n<this.table.columnManager.columnsByIndex.length;n++)this.table.columnManager.columnsByIndex[n].setWidth(this.fitDataColAvg);this.reinitialize(!1,!0)}}else"fitColumns"===this.table.options.layout&&(this.table.modules.layout.layout(),this.table.vdomHoz.reinitialize(!1,!0))},VDomHoz.prototype.fitDataLayoutOverride=function(){for(var t=this.leftCol;t<=this.rightCol;t++)this.columns[t].reinitializeWidth()},VDomHoz.prototype.reinitialize=function(t,e){var o=this,i={cols:this.columns,leftCol:this.leftCol,rightCol:this.rightCol};if(!t||this.initialized){this.clear(),this.scrollLeft=this.holderEl.scrollLeft,this.vDomScrollPosLeft=this.scrollLeft-this.window,this.vDomScrollPosRight=this.scrollLeft+this.holderEl.clientWidth+this.window;var n=0;this.table.columnManager.columnsByIndex.forEach((function(t){var e={};if(t.visible){var i=t.getWidth();e.leftPos=n,e.rightPos=n+i,n+i>o.vDomScrollPosLeft&&n<o.vDomScrollPosRight?(-1==o.leftCol&&(o.leftCol=o.columns.length,o.vDomPadLeft=n),o.rightCol=o.columns.length):-1!==o.leftCol&&(o.vDomPadRight+=i),o.columns.push(t),t.modules.vdomHoz=e,n+=i}})),this.element.style.paddingLeft=this.vDomPadLeft+"px",this.element.style.paddingRight=this.vDomPadRight+"px",this.initialized=!0,e||t&&!this.reinitChanged(i)||this.renitializeRows(),this.holderEl.scrollLeft=this.scrollLeft}},VDomHoz.prototype.reinitChanged=function(t){var e=this,o=!0;return t.cols.length!==this.columns.length||t.leftCol!==this.leftCol||t.rightCol!==this.rightCol||(t.cols.forEach((function(t,i){t!==e.columns[i]&&(o=!1)})),!o)},VDomHoz.prototype.renitializeRows=function(){var t=this;this.table.rowManager.getVisibleRows().forEach((function(e){t.reinitializeRow(e,!0)}))},VDomHoz.prototype.scroll=function(t){this.vDomScrollPosLeft+=t,this.vDomScrollPosRight+=t,t>.8*this.holderEl.clientWidth?this.reinitialize():t>0?(this.addColRight(),this.removeColLeft()):(this.addColLeft(),this.removeColRight())},VDomHoz.prototype.colPositionAdjust=function(t,e,o){for(var i=t;i<e;i++){var n=this.columns[i];n.modules.vdomHoz.leftPos-=o,n.modules.vdomHoz.rightPos-=o}},VDomHoz.prototype.addColRight=function(){var t,e,o=this.columns[this.rightCol+1];o&&o.modules.vdomHoz.leftPos<=this.vDomScrollPosRight&&(this.table.rowManager.getVisibleRows().forEach((function(t){if("group"!==t.type){var e=t.getCell(o);t.getElement().appendChild(e.getElement()),e.cellRendered()}})),this.fitDataColAvg&&(t=o.getWidth())===this.fitDataColAvg&&(o.reinitializeWidth(),(e=t-o.getWidth())&&(o.modules.vdomHoz.rightPos-=e,this.colPositionAdjust(this.rightCol+1,this.columns.length,e))),this.rightCol++,this.rightCol>=this.columns.length-1?this.vDomPadRight=0:this.vDomPadRight-=o.getWidth(),this.element.style.paddingRight=this.vDomPadRight+"px",this.addColRight())},VDomHoz.prototype.addColLeft=function(){var t=this.columns[this.leftCol-1];t&&t.modules.vdomHoz.rightPos>=this.vDomScrollPosLeft&&(this.table.rowManager.getVisibleRows().forEach((function(e){if("group"!==e.type){var o=e.getCell(t);e.getElement().prepend(o.getElement()),o.cellRendered()}})),this.leftCol?this.vDomPadLeft-=t.getWidth():this.vDomPadLeft=0,this.element.style.paddingLeft=this.vDomPadLeft+"px",this.leftCol--,this.addColLeft())},VDomHoz.prototype.removeColRight=function(t){var e;(t=this.columns[this.rightCol])&&t.modules.vdomHoz.leftPos>this.vDomScrollPosRight&&(e=this.table.rowManager.getVisibleRows(),t.modules.vdomHoz.visible=!1,e.forEach((function(e){if("group"!==e.type){var o=e.getCell(t);e.getElement().removeChild(o.getElement())}})),this.vDomPadRight+=t.getWidth(),this.element.style.paddingRight=this.vDomPadRight+"px",this.rightCol--,this.removeColRight())},VDomHoz.prototype.removeColLeft=function(){var t=this.columns[this.leftCol];t&&t.modules.vdomHoz.rightPos<this.vDomScrollPosLeft&&(this.table.rowManager.getVisibleRows().forEach((function(e){if("group"!==e.type){var o=e.getCell(t);e.getElement().removeChild(o.getElement())}})),this.vDomPadLeft+=t.getWidth(),this.element.style.paddingLeft=this.vDomPadLeft+"px",this.leftCol++,this.removeColLeft())},VDomHoz.prototype.initializeRow=function(t){if("group"!==t.type){t.modules.vdomHoz={leftCol:this.leftCol,rightCol:this.rightCol};for(var e=this.leftCol;e<=this.rightCol;e++){var o=this.columns[e];if(o&&o.visible){var i=t.getCell(o);t.getElement().appendChild(i.getElement()),i.cellRendered()}}}},VDomHoz.prototype.reinitializeRow=function(t,e){if("group"!==t.type&&(e||!t.modules.vdomHoz||t.modules.vdomHoz.leftCol!==this.leftCol||t.modules.vdomHoz.rightCol!==this.rightCol)){for(var o=t.getElement();o.firstChild;)o.removeChild(o.firstChild);this.initializeRow(t)}};var RowComponent=function(t){this._row=t};RowComponent.prototype.getData=function(t){return this._row.getData(t)},RowComponent.prototype.getElement=function(){return this._row.getElement()},RowComponent.prototype.getCells=function(){var t=[];return this._row.getCells().forEach((function(e){t.push(e.getComponent())})),t},RowComponent.prototype.getCell=function(t){var e=this._row.getCell(t);return!!e&&e.getComponent()},RowComponent.prototype.getIndex=function(){return this._row.getData("data")[this._row.table.options.index]},RowComponent.prototype.getPosition=function(t){return this._row.table.rowManager.getRowPosition(this._row,t)},RowComponent.prototype.delete=function(){return this._row.delete()},RowComponent.prototype.scrollTo=function(){return this._row.table.rowManager.scrollToRow(this._row)},RowComponent.prototype.pageTo=function(){if(this._row.table.modExists("page",!0))return this._row.table.modules.page.setPageToRow(this._row)},RowComponent.prototype.move=function(t,e){this._row.moveToRow(t,e)},RowComponent.prototype.update=function(t){return this._row.updateData(t)},RowComponent.prototype.normalizeHeight=function(){this._row.normalizeHeight(!0)},RowComponent.prototype.select=function(){this._row.table.modules.selectRow.selectRows(this._row)},RowComponent.prototype.deselect=function(){this._row.table.modules.selectRow.deselectRows(this._row)},RowComponent.prototype.toggleSelect=function(){this._row.table.modules.selectRow.toggleRow(this._row)},RowComponent.prototype.isSelected=function(){return this._row.table.modules.selectRow.isRowSelected(this._row)},RowComponent.prototype._getSelf=function(){return this._row},RowComponent.prototype.validate=function(){return this._row.validate()},RowComponent.prototype.freeze=function(){this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.freezeRow(this._row)},RowComponent.prototype.unfreeze=function(){this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.unfreezeRow(this._row)},RowComponent.prototype.isFrozen=function(){return!!this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.rows.indexOf(this._row)>-1},RowComponent.prototype.treeCollapse=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.collapseRow(this._row)},RowComponent.prototype.treeExpand=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.expandRow(this._row)},RowComponent.prototype.treeToggle=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.toggleRow(this._row)},RowComponent.prototype.getTreeParent=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeParent(this._row)},RowComponent.prototype.getTreeChildren=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeChildren(this._row,!0)},RowComponent.prototype.addTreeChild=function(t,e,o){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.addTreeChildRow(this._row,t,e,o)},RowComponent.prototype.reformat=function(){return this._row.reinitialize()},RowComponent.prototype.getGroup=function(){return this._row.getGroup().getComponent()},RowComponent.prototype.getTable=function(){return this._row.table},RowComponent.prototype.getNextRow=function(){var t=this._row.nextRow();return t?t.getComponent():t},RowComponent.prototype.getPrevRow=function(){var t=this._row.prevRow();return t?t.getComponent():t};var Row=function(t,e){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"row";this.table=e.table,this.parent=e,this.data={},this.type=o,this.element=!1,this.modules={},this.cells=[],this.height=0,this.heightStyled="",this.manualHeight=!1,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.component=null,this.created=!1,this.setData(t)};Row.prototype.create=function(){this.created||(this.created=!0,this.generateElement())},Row.prototype.createElement=function(){var t=document.createElement("div");t.classList.add("tabulator-row"),t.setAttribute("role","row"),this.element=t},Row.prototype.getElement=function(){return this.create(),this.element},Row.prototype.detachElement=function(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)},Row.prototype.generateElement=function(){var t,e,o,i=this;this.createElement(),!1!==i.table.options.selectable&&i.table.modExists("selectRow")&&i.table.modules.selectRow.initializeRow(this),!1!==i.table.options.movableRows&&i.table.modExists("moveRow")&&i.table.modules.moveRow.initializeRow(this),!1!==i.table.options.dataTree&&i.table.modExists("dataTree")&&i.table.modules.dataTree.initializeRow(this),"collapse"===i.table.options.responsiveLayout&&i.table.modExists("responsiveLayout")&&i.table.modules.responsiveLayout.initializeRow(this),(i.table.options.rowContextMenu||i.table.options.rowClickMenu)&&this.table.modExists("menu")&&i.table.modules.menu.initializeRow(this),i.table.options.rowClick&&i.element.addEventListener("click",(function(t){i.table.options.rowClick(t,i.getComponent())})),i.table.options.rowDblClick&&i.element.addEventListener("dblclick",(function(t){i.table.options.rowDblClick(t,i.getComponent())})),i.table.options.rowContext&&i.element.addEventListener("contextmenu",(function(t){i.table.options.rowContext(t,i.getComponent())})),i.table.options.rowMouseEnter&&i.element.addEventListener("mouseenter",(function(t){i.table.options.rowMouseEnter(t,i.getComponent())})),i.table.options.rowMouseLeave&&i.element.addEventListener("mouseleave",(function(t){i.table.options.rowMouseLeave(t,i.getComponent())})),i.table.options.rowMouseOver&&i.element.addEventListener("mouseover",(function(t){i.table.options.rowMouseOver(t,i.getComponent())})),i.table.options.rowMouseOut&&i.element.addEventListener("mouseout",(function(t){i.table.options.rowMouseOut(t,i.getComponent())})),i.table.options.rowMouseMove&&i.element.addEventListener("mousemove",(function(t){i.table.options.rowMouseMove(t,i.getComponent())})),i.table.options.rowTap&&(o=!1,i.element.addEventListener("touchstart",(function(t){o=!0}),{passive:!0}),i.element.addEventListener("touchend",(function(t){o&&i.table.options.rowTap(t,i.getComponent()),o=!1}))),i.table.options.rowDblTap&&(t=null,i.element.addEventListener("touchend",(function(e){t?(clearTimeout(t),t=null,i.table.options.rowDblTap(e,i.getComponent())):t=setTimeout((function(){clearTimeout(t),t=null}),300)}))),i.table.options.rowTapHold&&(e=null,i.element.addEventListener("touchstart",(function(t){clearTimeout(e),e=setTimeout((function(){clearTimeout(e),e=null,o=!1,i.table.options.rowTapHold(t,i.getComponent())}),1e3)}),{passive:!0}),i.element.addEventListener("touchend",(function(t){clearTimeout(e),e=null})))},Row.prototype.generateCells=function(){this.cells=this.table.columnManager.generateCells(this)},Row.prototype.initialize=function(t){var e=this;if(this.create(),!this.initialized||t){for(this.deleteCells();this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layoutRow(this),this.generateCells(),this.table.options.virtualDomHoz&&this.table.vdomHoz.initialized?this.table.vdomHoz.initializeRow(this):this.cells.forEach((function(t){e.element.appendChild(t.getElement()),t.cellRendered()})),t&&this.normalizeHeight(),this.table.options.dataTree&&this.table.modExists("dataTree")&&this.table.modules.dataTree.layoutRow(this),"collapse"===this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout")&&this.table.modules.responsiveLayout.layoutRow(this),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent()),this.table.options.resizableRows&&this.table.modExists("resizeRows")&&this.table.modules.resizeRows.initializeRow(this),this.initialized=!0}else this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitializeRow(this)},Row.prototype.reinitializeHeight=function(){this.heightInitialized=!1,this.element&&null!==this.element.offsetParent&&this.normalizeHeight(!0)},Row.prototype.reinitialize=function(t){this.initialized=!1,this.heightInitialized=!1,this.manualHeight||(this.height=0,this.heightStyled=""),this.element&&null!==this.element.offsetParent&&this.initialize(!0),this.table.options.dataTree&&this.table.modExists("dataTree",!0)&&this.table.modules.dataTree.getTreeChildren(this,!1,!0).forEach((function(t){t.reinitialize(!0)}))},Row.prototype.calcHeight=function(t){var e=0,o=this.table.options.resizableRows?this.element.clientHeight:0;this.cells.forEach((function(t){var o=t.getHeight();o>e&&(e=o)})),this.height=t?Math.max(e,o):this.manualHeight?this.height:Math.max(e,o),this.heightStyled=this.height?this.height+"px":"",this.outerHeight=this.element.offsetHeight},Row.prototype.setCellHeight=function(){this.cells.forEach((function(t){t.setHeight()})),this.heightInitialized=!0},Row.prototype.clearCellHeight=function(){this.cells.forEach((function(t){t.clearHeight()}))},Row.prototype.normalizeHeight=function(t){t&&this.clearCellHeight(),this.calcHeight(t),this.setCellHeight()},Row.prototype.setHeight=function(t,e){(this.height!=t||e)&&(this.manualHeight=!0,this.height=t,this.heightStyled=t?t+"px":"",this.setCellHeight(),this.outerHeight=this.element.offsetHeight)},Row.prototype.getHeight=function(){return this.outerHeight},Row.prototype.getWidth=function(){return this.element.offsetWidth},Row.prototype.deleteCell=function(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)},Row.prototype.setData=function(t){this.table.modExists("mutator")&&(t=this.table.modules.mutator.transformRow(t,"data")),this.data=t,this.table.options.reactiveData&&this.table.modExists("reactiveData",!0)&&this.table.modules.reactiveData.watchRow(this)},Row.prototype.updateData=function(t){var e,o=this,i=this.element&&Tabulator.prototype.helpers.elVisible(this.element),n={};return new Promise((function(s,a){for(var r in"string"==typeof t&&(t=JSON.parse(t)),o.table.options.reactiveData&&o.table.modExists("reactiveData",!0)&&o.table.modules.reactiveData.block(),o.table.modExists("mutator")?(n=Object.assign(n,o.data),n=Object.assign(n,t),e=o.table.modules.mutator.transformRow(n,"data",t)):e=t,e)o.data[r]=e[r];for(var r in o.table.options.reactiveData&&o.table.modExists("reactiveData",!0)&&o.table.modules.reactiveData.unblock(),t){o.table.columnManager.getColumnsByFieldRoot(r).forEach((function(t){var n=o.getCell(t.getField());if(n){var s=t.getFieldValue(e);n.getValue()!=s&&(n.setValueProcessData(s),i&&n.cellRendered())}}))}o.table.options.groupUpdateOnCellEdit&&o.table.options.groupBy&&o.table.modExists("groupRows")&&o.table.modules.groupRows.reassignRowToGroup(o.row),i?(o.normalizeHeight(!0),o.table.options.rowFormatter&&o.table.options.rowFormatter(o.getComponent())):(o.initialized=!1,o.height=0,o.heightStyled=""),!1!==o.table.options.dataTree&&o.table.modExists("dataTree")&&o.table.modules.dataTree.redrawNeeded(t)&&(o.table.modules.dataTree.initializeRow(o),i&&(o.table.modules.dataTree.layoutRow(o),o.table.rowManager.refreshActiveData("tree",!1,!0))),o.table.options.rowUpdated.call(o.table,o.getComponent()),o.table.options.dataChanged&&o.table.options.dataChanged.call(o.table,o.table.rowManager.getData()),s()}))},Row.prototype.getData=function(t){return t&&this.table.modExists("accessor")?this.table.modules.accessor.transformRow(this,t):this.data},Row.prototype.getCell=function(t){return t=this.table.columnManager.findColumn(t),this.cells.find((function(e){return e.column===t}))},Row.prototype.getCellIndex=function(t){return this.cells.findIndex((function(e){return e===t}))},Row.prototype.findNextEditableCell=function(t){var e=!1;if(t<this.cells.length-1)for(var o=t+1;o<this.cells.length;o++){var i=this.cells[o];if(i.column.modules.edit&&Tabulator.prototype.helpers.elVisible(i.getElement())){var n=!0;if("function"==typeof i.column.modules.edit.check&&(n=i.column.modules.edit.check(i.getComponent())),n){e=i;break}}}return e},Row.prototype.findPrevEditableCell=function(t){var e=!1;if(t>0)for(var o=t-1;o>=0;o--){var i=this.cells[o],n=!0;if(i.column.modules.edit&&Tabulator.prototype.helpers.elVisible(i.getElement())&&("function"==typeof i.column.modules.edit.check&&(n=i.column.modules.edit.check(i.getComponent())),n)){e=i;break}}return e},Row.prototype.getCells=function(){return this.cells},Row.prototype.nextRow=function(){return this.table.rowManager.nextDisplayRow(this,!0)||!1},Row.prototype.prevRow=function(){return this.table.rowManager.prevDisplayRow(this,!0)||!1},Row.prototype.moveToRow=function(t,e){var o=this.table.rowManager.findRow(t);o?(this.table.rowManager.moveRowActual(this,o,!e),this.table.rowManager.refreshActiveData("display",!1,!0)):console.warn("Move Error - No matching row found:",t)},Row.prototype.validate=function(){var t=[];return this.cells.forEach((function(e){e.validate()||t.push(e.getComponent())})),!t.length||t},Row.prototype.delete=function(){var t=this;return new Promise((function(e,o){var i,n;t.table.options.history&&t.table.modExists("history")&&(t.table.options.groupBy&&t.table.modExists("groupRows")?(i=(n=t.getGroup().rows).indexOf(t))&&(i=n[i-1]):(i=t.table.rowManager.getRowIndex(t))&&(i=t.table.rowManager.rows[i-1]),t.table.modules.history.action("rowDelete",t,{data:t.getData(),pos:!i,index:i})),t.deleteActual(),e()}))},Row.prototype.deleteActual=function(t){this.table.rowManager.getRowIndex(this);this.detatchModules(),this.table.options.reactiveData&&this.table.modExists("reactiveData",!0),this.modules.group&&this.modules.group.removeRow(this),this.table.rowManager.deleteRow(this,t),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.element=!1,this.table.options.dataTree&&this.table.modExists("dataTree",!0)&&this.table.modules.dataTree.rowDelete(this),this.table.modExists("columnCalcs")&&(this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.columnCalcs.recalcRowGroup(this):this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows))},Row.prototype.detatchModules=function(){this.table.modExists("selectRow")&&this.table.modules.selectRow._deselectRow(this,!0),this.table.modExists("edit")&&this.table.modules.edit.currentCell.row===this&&this.table.modules.edit.cancelEdit(),this.table.modExists("frozenRows")&&this.table.modules.frozenRows.detachRow(this)},Row.prototype.deleteCells=function(){for(var t=this.cells.length,e=0;e<t;e++)this.cells[0].delete()},Row.prototype.wipe=function(){if(this.detatchModules(),this.deleteCells(),this.element){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.parentNode&&this.element.parentNode.removeChild(this.element)}this.element=!1,this.modules={}},Row.prototype.getGroup=function(){return this.modules.group||!1},Row.prototype.getComponent=function(){return this.component||(this.component=new RowComponent(this)),this.component};var CellComponent=function(t){this._cell=t};CellComponent.prototype.getValue=function(){return this._cell.getValue()},CellComponent.prototype.getOldValue=function(){return this._cell.getOldValue()},CellComponent.prototype.getInitialValue=function(){return this._cell.initialValue},CellComponent.prototype.getElement=function(){return this._cell.getElement()},CellComponent.prototype.getRow=function(){return this._cell.row.getComponent()},CellComponent.prototype.getData=function(){return this._cell.row.getData()},CellComponent.prototype.getField=function(){return this._cell.column.getField()},CellComponent.prototype.getColumn=function(){return this._cell.column.getComponent()},CellComponent.prototype.setValue=function(t,e){void 0===e&&(e=!0),this._cell.setValue(t,e)},CellComponent.prototype.restoreOldValue=function(){this._cell.setValueActual(this._cell.getOldValue())},CellComponent.prototype.restoreInitialValue=function(){this._cell.setValueActual(this._cell.initialValue)},CellComponent.prototype.edit=function(t){return this._cell.edit(t)},CellComponent.prototype.cancelEdit=function(){this._cell.cancelEdit()},CellComponent.prototype.isEdited=function(){return!!this._cell.modules.edit&&this._cell.modules.edit.edited},CellComponent.prototype.clearEdited=function(){self.table.modExists("edit",!0)&&this._cell.table.modules.edit.clearEdited(this._cell)},CellComponent.prototype.isValid=function(){return!this._cell.modules.validate||!this._cell.modules.validate.invalid},CellComponent.prototype.validate=function(){return this._cell.validate()},CellComponent.prototype.clearValidation=function(){this._cell.table.modExists("validate",!0)&&this._cell.table.modules.validate.clearValidation(this._cell)},CellComponent.prototype.nav=function(){return this._cell.nav()},CellComponent.prototype.checkHeight=function(){this._cell.checkHeight()},CellComponent.prototype.getTable=function(){return this._cell.table},CellComponent.prototype._getSelf=function(){return this._cell};var Cell=function(t,e){this.table=t.table,this.column=t,this.row=e,this.element=null,this.value=null,this.initialValue,this.oldValue=null,this.modules={},this.height=null,this.width=null,this.minWidth=null,this.component=null,this.loaded=!1,this.build()};Cell.prototype.build=function(){this.generateElement(),this.setWidth(),this._configureCell(),this.setValueActual(this.column.getFieldValue(this.row.data)),this.initialValue=this.value},Cell.prototype.generateElement=function(){this.element=document.createElement("div"),this.element.className="tabulator-cell",this.element.setAttribute("role","gridcell"),this.element=this.element},Cell.prototype._configureCell=function(){var t=this,e=t.column.cellEvents,o=t.element,i=this.column.getField();(o.style.textAlign=t.column.hozAlign,t.column.vertAlign&&(o.style.display="inline-flex",o.style.alignItems={top:"flex-start",bottom:"flex-end",middle:"center"}[t.column.vertAlign]||"",t.column.hozAlign&&(o.style.justifyContent={left:"flex-start",right:"flex-end",center:"center"}[t.column.hozAlign]||"")),i&&o.setAttribute("tabulator-field",i),t.column.definition.cssClass)&&t.column.definition.cssClass.split(" ").forEach((function(t){o.classList.add(t)}));"hover"===this.table.options.tooltipGenerationMode&&o.addEventListener("mouseenter",(function(e){t._generateTooltip()})),t._bindClickEvents(e),t._bindTouchEvents(e),t._bindMouseEvents(e),t.column.modules.edit&&t.table.modules.edit.bindEditor(t),t.column.definition.rowHandle&&!1!==t.table.options.movableRows&&t.table.modExists("moveRow")&&t.table.modules.moveRow.initializeCell(t),t.column.visible||t.hide()},Cell.prototype._bindClickEvents=function(t){var e=this,o=e.element;(t.cellClick||e.table.options.cellClick)&&o.addEventListener("click",(function(o){var i=e.getComponent();t.cellClick&&t.cellClick.call(e.table,o,i),e.table.options.cellClick&&e.table.options.cellClick.call(e.table,o,i)})),t.cellDblClick||this.table.options.cellDblClick?o.addEventListener("dblclick",(function(o){var i=e.getComponent();t.cellDblClick&&t.cellDblClick.call(e.table,o,i),e.table.options.cellDblClick&&e.table.options.cellDblClick.call(e.table,o,i)})):o.addEventListener("dblclick",(function(t){if(!e.table.modExists("edit")||e.table.modules.edit.currentCell!==e){t.preventDefault();try{if(document.selection)(o=document.body.createTextRange()).moveToElementText(e.element),o.select();else if(window.getSelection){var o;(o=document.createRange()).selectNode(e.element),window.getSelection().removeAllRanges(),window.getSelection().addRange(o)}}catch(t){}}})),(t.cellContext||this.table.options.cellContext)&&o.addEventListener("contextmenu",(function(o){var i=e.getComponent();t.cellContext&&t.cellContext.call(e.table,o,i),e.table.options.cellContext&&e.table.options.cellContext.call(e.table,o,i)}))},Cell.prototype._bindMouseEvents=function(t){var e=this,o=e.element;(t.cellMouseEnter||e.table.options.cellMouseEnter)&&o.addEventListener("mouseenter",(function(o){var i=e.getComponent();t.cellMouseEnter&&t.cellMouseEnter.call(e.table,o,i),e.table.options.cellMouseEnter&&e.table.options.cellMouseEnter.call(e.table,o,i)})),(t.cellMouseLeave||e.table.options.cellMouseLeave)&&o.addEventListener("mouseleave",(function(o){var i=e.getComponent();t.cellMouseLeave&&t.cellMouseLeave.call(e.table,o,i),e.table.options.cellMouseLeave&&e.table.options.cellMouseLeave.call(e.table,o,i)})),(t.cellMouseOver||e.table.options.cellMouseOver)&&o.addEventListener("mouseover",(function(o){var i=e.getComponent();t.cellMouseOver&&t.cellMouseOver.call(e.table,o,i),e.table.options.cellMouseOver&&e.table.options.cellMouseOver.call(e.table,o,i)})),(t.cellMouseOut||e.table.options.cellMouseOut)&&o.addEventListener("mouseout",(function(o){var i=e.getComponent();t.cellMouseOut&&t.cellMouseOut.call(e.table,o,i),e.table.options.cellMouseOut&&e.table.options.cellMouseOut.call(e.table,o,i)})),(t.cellMouseMove||e.table.options.cellMouseMove)&&o.addEventListener("mousemove",(function(o){var i=e.getComponent();t.cellMouseMove&&t.cellMouseMove.call(e.table,o,i),e.table.options.cellMouseMove&&e.table.options.cellMouseMove.call(e.table,o,i)}))},Cell.prototype._bindTouchEvents=function(t){var e,o,i,n=this,s=n.element;(t.cellTap||this.table.options.cellTap)&&(i=!1,s.addEventListener("touchstart",(function(t){i=!0}),{passive:!0}),s.addEventListener("touchend",(function(e){if(i){var o=n.getComponent();t.cellTap&&t.cellTap.call(n.table,e,o),n.table.options.cellTap&&n.table.options.cellTap.call(n.table,e,o)}i=!1}))),(t.cellDblTap||this.table.options.cellDblTap)&&(e=null,s.addEventListener("touchend",(function(o){if(e){clearTimeout(e),e=null;var i=n.getComponent();t.cellDblTap&&t.cellDblTap.call(n.table,o,i),n.table.options.cellDblTap&&n.table.options.cellDblTap.call(n.table,o,i)}else e=setTimeout((function(){clearTimeout(e),e=null}),300)}))),(t.cellTapHold||this.table.options.cellTapHold)&&(o=null,s.addEventListener("touchstart",(function(e){clearTimeout(o),o=setTimeout((function(){clearTimeout(o),o=null,i=!1;var s=n.getComponent();t.cellTapHold&&t.cellTapHold.call(n.table,e,s),n.table.options.cellTapHold&&n.table.options.cellTapHold.call(n.table,e,s)}),1e3)}),{passive:!0}),s.addEventListener("touchend",(function(t){clearTimeout(o),o=null})))},Cell.prototype._generateContents=function(){var t;switch(void 0===(t=this.table.modExists("format")?this.table.modules.format.formatValue(this):this.element.innerHTML=this.value)?"undefined":_typeof(t)){case"object":if(t instanceof Node){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.appendChild(t)}else this.element.innerHTML="",null!=t&&console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",t);break;case"undefined":case"null":this.element.innerHTML="";break;default:this.element.innerHTML=t}},Cell.prototype.cellRendered=function(){this.table.modExists("format")&&this.table.modules.format.cellRendered&&this.table.modules.format.cellRendered(this)},Cell.prototype._generateTooltip=function(){var t=this.column.tooltip;t?(!0===t?t=this.value:"function"==typeof t&&!1===(t=t(this.getComponent()))&&(t=""),void 0===t&&(t=""),this.element.setAttribute("title",t)):this.element.setAttribute("title","")},Cell.prototype.getElement=function(t){return this.loaded||(this.loaded=!0,t||this.layoutElement()),this.element},Cell.prototype.getValue=function(){return this.value},Cell.prototype.getOldValue=function(){return this.oldValue},Cell.prototype.setValue=function(t,e){var o;this.setValueProcessData(t,e)&&(this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("cellEdit",this,{oldValue:this.oldValue,newValue:this.value}),o=this.getComponent(),this.column.cellEvents.cellEdited&&this.column.cellEvents.cellEdited.call(this.table,o),this.table.options.groupUpdateOnCellEdit&&this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.reassignRowToGroup(this.row),this.cellRendered(),this.table.options.cellEdited.call(this.table,o),this.table.options.dataChanged&&this.table.options.dataChanged.call(this.table,this.table.rowManager.getData()))},Cell.prototype.setValueProcessData=function(t,e){var o=!1;return this.value!=t&&(o=!0,e&&this.column.modules.mutate&&(t=this.table.modules.mutator.transformCell(this,t))),this.setValueActual(t),o&&this.table.modExists("columnCalcs")&&(this.column.definition.topCalc||this.column.definition.bottomCalc)&&(this.table.options.groupBy&&this.table.modExists("groupRows")?("table"!=this.table.options.columnCalcs&&"both"!=this.table.options.columnCalcs||this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),"table"!=this.table.options.columnCalcs&&this.table.modules.columnCalcs.recalcRowGroup(this.row)):this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows)),o},Cell.prototype.setValueActual=function(t){this.oldValue=this.value,this.value=t,this.table.options.reactiveData&&this.table.modExists("reactiveData")&&this.table.modules.reactiveData.block(),this.column.setFieldValue(this.row.data,t),this.table.options.reactiveData&&this.table.modExists("reactiveData")&&this.table.modules.reactiveData.unblock(),this.loaded&&this.layoutElement()},Cell.prototype.layoutElement=function(){this._generateContents(),this._generateTooltip(),this.table.options.resizableColumns&&this.table.modExists("resizeColumns")&&"row"===this.row.type&&this.table.modules.resizeColumns.initializeColumn("cell",this.column,this.element),(this.column.definition.contextMenu||this.column.definition.clickMenu)&&this.table.modExists("menu")&&this.table.modules.menu.initializeCell(this),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layoutElement(this.element,this.column)},Cell.prototype.setWidth=function(){this.width=this.column.width,this.element.style.width=this.column.widthStyled},Cell.prototype.clearWidth=function(){this.width="",this.element.style.width=""},Cell.prototype.getWidth=function(){return this.width||this.element.offsetWidth},Cell.prototype.setMinWidth=function(){this.minWidth=this.column.minWidth,this.element.style.minWidth=this.column.minWidthStyled},Cell.prototype.setMaxWidth=function(){this.maxWidth=this.column.maxWidth,this.element.style.maxWidth=this.column.maxWidthStyled},Cell.prototype.checkHeight=function(){this.row.reinitializeHeight()},Cell.prototype.clearHeight=function(){this.element.style.height="",this.height=null},Cell.prototype.setHeight=function(){this.height=this.row.height,this.element.style.height=this.row.heightStyled},Cell.prototype.getHeight=function(){return this.height||this.element.offsetHeight},Cell.prototype.show=function(){this.element.style.display=this.column.vertAlign?"inline-flex":""},Cell.prototype.hide=function(){this.element.style.display="none"},Cell.prototype.edit=function(t){if(this.table.modExists("edit",!0))return this.table.modules.edit.editCell(this,t)},Cell.prototype.cancelEdit=function(){if(this.table.modExists("edit",!0)){var t=this.table.modules.edit.getCurrentCell();t&&t._getSelf()===this?this.table.modules.edit.cancelEdit():console.warn("Cancel Editor Error - This cell is not currently being edited ")}},Cell.prototype.validate=function(){return!this.column.modules.validate||!this.table.modExists("validate",!0)||!0===this.table.modules.validate.validate(this.column.modules.validate,this,this.getValue())},Cell.prototype.delete=function(){!this.table.rowManager.redrawBlock&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.modules.validate&&this.modules.validate.invalid&&this.table.modules.validate.clearValidation(this),this.modules.edit&&this.modules.edit.edited&&this.table.modules.edit.clearEdited(this),this.table.options.history&&this.table.modules.history.clearComponentHistory(this),this.element=!1,this.column.deleteCell(this),this.row.deleteCell(this),this.calcs={}},Cell.prototype.nav=function(){var t=this,e=!1,o=this.row.getCellIndex(this);return{next:function(){var e,o=this.right();return!!o||!(!(e=t.table.rowManager.nextDisplayRow(t.row,!0))||!(o=e.findNextEditableCell(-1)))&&(o.edit(),!0)},prev:function(){var e,o=this.left();return!!o||!(!(e=t.table.rowManager.prevDisplayRow(t.row,!0))||!(o=e.findPrevEditableCell(e.cells.length)))&&(o.edit(),!0)},left:function(){return!!(e=t.row.findPrevEditableCell(o))&&(e.edit(),!0)},right:function(){return!!(e=t.row.findNextEditableCell(o))&&(e.edit(),!0)},up:function(){var e=t.table.rowManager.prevDisplayRow(t.row,!0);e&&e.cells[o].edit()},down:function(){var e=t.table.rowManager.nextDisplayRow(t.row,!0);e&&e.cells[o].edit()}}},Cell.prototype.getIndex=function(){this.row.getCellIndex(this)},Cell.prototype.getComponent=function(){return this.component||(this.component=new CellComponent(this)),this.component};var FooterManager=function(t){this.table=t,this.active=!1,this.element=this.createElement(),this.external=!1,this.links=[],this._initialize()};FooterManager.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-footer"),t},FooterManager.prototype._initialize=function(t){if(this.table.options.footerElement)switch(_typeof(this.table.options.footerElement)){case"string":"<"===this.table.options.footerElement[0]?this.element.innerHTML=this.table.options.footerElement:(this.external=!0,this.element=document.querySelector(this.table.options.footerElement));break;default:this.element=this.table.options.footerElement}},FooterManager.prototype.getElement=function(){return this.element},FooterManager.prototype.append=function(t,e){this.activate(e),this.element.appendChild(t),this.table.rowManager.adjustTableSize()},FooterManager.prototype.prepend=function(t,e){this.activate(e),this.element.insertBefore(t,this.element.firstChild),this.table.rowManager.adjustTableSize()},FooterManager.prototype.remove=function(t){t.parentNode.removeChild(t),this.deactivate()},FooterManager.prototype.deactivate=function(t){this.element.firstChild&&!t||(this.external||this.element.parentNode.removeChild(this.element),this.active=!1)},FooterManager.prototype.activate=function(t){this.active||(this.active=!0,this.external||(this.table.element.appendChild(this.getElement()),this.table.element.style.display="")),t&&this.links.push(t)},FooterManager.prototype.redraw=function(){this.links.forEach((function(t){t.footerRedraw()}))};var Tabulator=function t(e,o){this.options={},this.columnManager=null,this.rowManager=null,this.footerManager=null,this.vdomHoz=null,this.browser="",this.browserSlow=!1,this.browserMobile=!1,this.rtl=!1,this.modules={},this.initializeElement(e)&&(this.initializeOptions(o||{}),this._create()),t.prototype.comms.register(this)};Tabulator.prototype.defaultOptions={height:!1,minHeight:!1,maxHeight:!1,layout:"fitData",layoutColumnsOnNewData:!1,columnMinWidth:40,columnMaxWidth:!1,columnHeaderVertAlign:"top",columnVertAlign:!1,resizableColumns:!0,resizableRows:!1,autoResize:!0,columns:[],cellHozAlign:"",cellVertAlign:"",headerHozAlign:"",data:[],autoColumns:!1,autoColumnsDefinitions:!1,reactiveData:!1,nestedFieldSeparator:".",tooltips:!1,tooltipsHeader:!1,tooltipGenerationMode:"load",initialSort:!1,initialFilter:!1,initialHeaderFilter:!1,columnHeaderSortMulti:!0,sortOrderReverse:!1,headerSort:!0,headerSortTristate:!1,headerSortElement:"<div class='tabulator-arrow'></div>",footerElement:!1,index:"id",textDirection:"auto",keybindings:[],tabEndNewRow:!1,invalidOptionWarnings:!0,clipboard:!1,clipboardCopyStyled:!0,clipboardCopyConfig:!1,clipboardCopyFormatter:!1,clipboardCopyRowRange:"active",clipboardPasteParser:"table",clipboardPasteAction:"insert",clipboardCopied:function(){},clipboardPasted:function(){},clipboardPasteError:function(){},downloadDataFormatter:!1,downloadReady:function(t,e){return e},downloadComplete:!1,downloadConfig:{},downloadRowRange:"active",dataTree:!1,dataTreeFilter:!0,dataTreeSort:!0,dataTreeElementColumn:!1,dataTreeBranchElement:!0,dataTreeChildIndent:9,dataTreeChildField:"_children",dataTreeCollapseElement:!1,dataTreeExpandElement:!1,dataTreeStartExpanded:!1,dataTreeRowExpanded:function(){},dataTreeRowCollapsed:function(){},dataTreeChildColumnCalcs:!1,dataTreeSelectPropagate:!1,printAsHtml:!1,printFormatter:!1,printHeader:!1,printFooter:!1,printCopyStyle:!0,printStyled:!0,printVisibleRows:!0,printRowRange:"visible",printConfig:{},addRowPos:"bottom",selectable:"highlight",selectableRangeMode:"drag",selectableRollingSelection:!0,selectablePersistence:!0,selectableCheck:function(t,e){return!0},headerFilterLiveFilterDelay:300,headerFilterPlaceholder:!1,headerVisible:!0,history:!1,locale:!1,langs:{},virtualDom:!0,virtualDomBuffer:0,virtualDomHoz:!1,persistentLayout:!1,persistentSort:!1,persistentFilter:!1,persistenceID:"",persistenceMode:!0,persistenceReaderFunc:!1,persistenceWriterFunc:!1,persistence:!1,responsiveLayout:!1,responsiveLayoutCollapseStartOpen:!0,responsiveLayoutCollapseUseFormatters:!0,responsiveLayoutCollapseFormatter:!1,pagination:!1,paginationSize:!1,paginationInitialPage:1,paginationButtonCount:5,paginationSizeSelector:!1,paginationElement:!1,paginationDataSent:{},paginationDataReceived:{},paginationAddRow:"page",ajaxURL:!1,ajaxURLGenerator:!1,ajaxParams:{},ajaxConfig:"get",ajaxContentType:"form",ajaxRequestFunc:!1,ajaxLoader:!0,ajaxLoaderLoading:!1,ajaxLoaderError:!1,ajaxFiltering:!1,ajaxSorting:!1,ajaxProgressiveLoad:!1,ajaxProgressiveLoadDelay:0,ajaxProgressiveLoadScrollMargin:0,groupBy:!1,groupStartOpen:!0,groupValues:!1,groupUpdateOnCellEdit:!1,groupHeader:!1,groupHeaderPrint:null,groupHeaderClipboard:null,groupHeaderHtmlOutput:null,groupHeaderDownload:null,htmlOutputConfig:!1,movableColumns:!1,movableRows:!1,movableRowsConnectedTables:!1,movableRowsConnectedElements:!1,movableRowsSender:!1,movableRowsReceiver:"insert",movableRowsSendingStart:function(){},movableRowsSent:function(){},movableRowsSentFailed:function(){},movableRowsSendingStop:function(){},movableRowsReceivingStart:function(){},movableRowsReceived:function(){},movableRowsReceivedFailed:function(){},movableRowsReceivingStop:function(){},movableRowsElementDrop:function(){},scrollToRowPosition:"top",scrollToRowIfVisible:!0,scrollToColumnPosition:"left",scrollToColumnIfVisible:!0,rowFormatter:!1,rowFormatterPrint:null,rowFormatterClipboard:null,rowFormatterHtmlOutput:null,placeholder:!1,tableBuilding:function(){},tableBuilt:function(){},renderStarted:function(){},renderComplete:function(){},rowClick:!1,rowDblClick:!1,rowContext:!1,rowTap:!1,rowDblTap:!1,rowTapHold:!1,rowMouseEnter:!1,rowMouseLeave:!1,rowMouseOver:!1,rowMouseOut:!1,rowMouseMove:!1,rowContextMenu:!1,rowClickMenu:!1,rowAdded:function(){},rowDeleted:function(){},rowMoved:function(){},rowUpdated:function(){},rowSelectionChanged:function(){},rowSelected:function(){},rowDeselected:function(){},rowResized:function(){},cellClick:!1,cellDblClick:!1,cellContext:!1,cellTap:!1,cellDblTap:!1,cellTapHold:!1,cellMouseEnter:!1,cellMouseLeave:!1,cellMouseOver:!1,cellMouseOut:!1,cellMouseMove:!1,cellEditing:function(){},cellEdited:function(){},cellEditCancelled:function(){},columnMoved:!1,columnResized:function(){},columnTitleChanged:function(){},columnVisibilityChanged:function(){},htmlImporting:function(){},htmlImported:function(){},dataLoading:function(){},dataLoaded:function(){},dataEdited:!1,dataChanged:!1,ajaxRequesting:function(){},ajaxResponse:!1,ajaxError:function(){},dataFiltering:!1,dataFiltered:!1,dataSorting:function(){},dataSorted:function(){},groupToggleElement:"arrow",groupClosedShowCalcs:!1,dataGrouping:function(){},dataGrouped:!1,groupVisibilityChanged:function(){},groupClick:!1,groupDblClick:!1,groupContext:!1,groupContextMenu:!1,groupClickMenu:!1,groupTap:!1,groupDblTap:!1,groupTapHold:!1,columnCalcs:!0,pageLoaded:function(){},localized:function(){},validationMode:"blocking",validationFailed:function(){},historyUndo:function(){},historyRedo:function(){},scrollHorizontal:function(){},scrollVertical:function(){}},Tabulator.prototype.initializeOptions=function(t){if(!1!==t.invalidOptionWarnings)for(var e in t)void 0===this.defaultOptions[e]&&console.warn("Invalid table constructor option:",e);for(var e in this.defaultOptions)e in t?this.options[e]=t[e]:Array.isArray(this.defaultOptions[e])?this.options[e]=Object.assign([],this.defaultOptions[e]):"object"===_typeof(this.defaultOptions[e])&&null!==this.defaultOptions[e]?this.options[e]=Object.assign({},this.defaultOptions[e]):this.options[e]=this.defaultOptions[e]},Tabulator.prototype.initializeElement=function(t){return"undefined"!=typeof HTMLElement&&t instanceof HTMLElement?(this.element=t,!0):"string"==typeof t?(this.element=document.querySelector(t),!!this.element||(console.error("Tabulator Creation Error - no element found matching selector: ",t),!1)):(console.error("Tabulator Creation Error - Invalid element provided:",t),!1)},Tabulator.prototype.rtlCheck=function(){var t=window.getComputedStyle(this.element);switch(this.options.textDirection){case"auto":if("rtl"!==t.direction)break;case"rtl":this.element.classList.add("tabulator-rtl"),this.rtl=!0;break;case"ltr":this.element.classList.add("tabulator-ltr");default:this.rtl=!1}},Tabulator.prototype._mapDepricatedFunctionality=function(){(this.options.persistentLayout||this.options.persistentSort||this.options.persistentFilter)&&(this.options.persistence||(this.options.persistence={})),this.options.dataEdited&&(console.warn("DEPRECATION WARNING - dataEdited option has been deprecated, please use the dataChanged option instead"),this.options.dataChanged=this.options.dataEdited),this.options.downloadDataFormatter&&console.warn("DEPRECATION WARNING - downloadDataFormatter option has been deprecated"),void 0!==this.options.clipboardCopyHeader&&(this.options.columnHeaders=this.options.clipboardCopyHeader,console.warn("DEPRECATION WARNING - clipboardCopyHeader option has been deprecated, please use the columnHeaders property on the clipboardCopyConfig option")),!0!==this.options.printVisibleRows&&(console.warn("printVisibleRows option is deprecated, you should now use the printRowRange option"),this.options.persistence.printRowRange="active"),!0!==this.options.printCopyStyle&&(console.warn("printCopyStyle option is deprecated, you should now use the printStyled option"),this.options.persistence.printStyled=this.options.printCopyStyle),this.options.persistentLayout&&(console.warn("persistentLayout option is deprecated, you should now use the persistence option"),!0!==this.options.persistence&&void 0===this.options.persistence.columns&&(this.options.persistence.columns=!0)),this.options.persistentSort&&(console.warn("persistentSort option is deprecated, you should now use the persistence option"),!0!==this.options.persistence&&void 0===this.options.persistence.sort&&(this.options.persistence.sort=!0)),this.options.persistentFilter&&(console.warn("persistentFilter option is deprecated, you should now use the persistence option"),!0!==this.options.persistence&&void 0===this.options.persistence.filter&&(this.options.persistence.filter=!0)),this.options.columnVertAlign&&(console.warn("columnVertAlign option is deprecated, you should now use the columnHeaderVertAlign option"),this.options.columnHeaderVertAlign=this.options.columnVertAlign)},Tabulator.prototype._clearSelection=function(){this.element.classList.add("tabulator-block-select"),window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty(),this.element.classList.remove("tabulator-block-select")},Tabulator.prototype._create=function(){this._clearObjectPointers(),this._mapDepricatedFunctionality(),this.bindModules(),this.rtlCheck(),"TABLE"===this.element.tagName&&this.modExists("htmlTableImport",!0)&&this.modules.htmlTableImport.parseTable(),this.columnManager=new ColumnManager(this),this.rowManager=new RowManager(this),this.footerManager=new FooterManager(this),this.columnManager.setRowManager(this.rowManager),this.rowManager.setColumnManager(this.columnManager),this.options.virtualDomHoz&&(this.vdomHoz=new VDomHoz(this)),this._buildElement(),this._loadInitialData()},Tabulator.prototype._clearObjectPointers=function(){this.options.columns=this.options.columns.slice(0),this.options.reactiveData||(this.options.data=this.options.data.slice(0))},Tabulator.prototype._buildElement=function(){var t=this,e=this.element,o=this.modules,i=this.options;for(i.tableBuilding.call(this),e.classList.add("tabulator"),e.setAttribute("role","grid");e.firstChild;)e.removeChild(e.firstChild);for(var n in i.height&&(i.height=isNaN(i.height)?i.height:i.height+"px",e.style.height=i.height),!1!==i.minHeight&&(i.minHeight=isNaN(i.minHeight)?i.minHeight:i.minHeight+"px",e.style.minHeight=i.minHeight),!1!==i.maxHeight&&(i.maxHeight=isNaN(i.maxHeight)?i.maxHeight:i.maxHeight+"px",e.style.maxHeight=i.maxHeight),this.columnManager.initialize(),this.rowManager.initialize(),this._detectBrowser(),this.modExists("layout",!0)&&o.layout.initialize(i.layout),o.localize.initialize(),!1!==i.headerFilterPlaceholder&&o.localize.setHeaderFilterPlaceholder(i.headerFilterPlaceholder),i.langs)o.localize.installLang(n,i.langs[n]);if(o.localize.setLocale(i.locale),"string"==typeof i.placeholder){var s=document.createElement("div");s.classList.add("tabulator-placeholder");var a=document.createElement("span");a.innerHTML=i.placeholder,s.appendChild(a),i.placeholder=s}if(e.appendChild(this.columnManager.getElement()),e.appendChild(this.rowManager.getElement()),i.footerElement&&this.footerManager.activate(),i.persistence&&this.modExists("persistence",!0)&&o.persistence.initialize(),i.movableRows&&this.modExists("moveRow")&&o.moveRow.initialize(),i.autoColumns&&this.options.data&&this.columnManager.generateColumnsFromRowData(this.options.data),this.modExists("columnCalcs")&&o.columnCalcs.initialize(),this.columnManager.setColumns(i.columns),i.dataTree&&this.modExists("dataTree",!0)&&o.dataTree.initialize(),this.modExists("frozenRows")&&this.modules.frozenRows.initialize(),(i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.sort||i.initialSort)&&this.modExists("sort",!0)){var r=[];i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.sort?!1===(r=o.persistence.load("sort"))&&i.initialSort&&(r=i.initialSort):i.initialSort&&(r=i.initialSort),o.sort.setSort(r)}if((i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.filter||i.initialFilter)&&this.modExists("filter",!0)){var l=[];i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.filter?!1===(l=o.persistence.load("filter"))&&i.initialFilter&&(l=i.initialFilter):i.initialFilter&&(l=i.initialFilter),o.filter.setFilter(l)}i.initialHeaderFilter&&this.modExists("filter",!0)&&i.initialHeaderFilter.forEach((function(e){var i=t.columnManager.findColumn(e.field);if(!i)return console.warn("Column Filter Error - No matching column found:",e.field),!1;o.filter.setHeaderFilterValue(i,e.value)})),this.modExists("ajax")&&o.ajax.initialize(),i.pagination&&this.modExists("page",!0)&&o.page.initialize(),i.groupBy&&this.modExists("groupRows",!0)&&o.groupRows.initialize(),this.modExists("keybindings")&&o.keybindings.initialize(),this.modExists("selectRow")&&o.selectRow.clearSelectionData(!0),i.autoResize&&this.modExists("resizeTable")&&o.resizeTable.initialize(),this.modExists("clipboard")&&o.clipboard.initialize(),i.printAsHtml&&this.modExists("print")&&o.print.initialize(),i.tableBuilt.call(this)},Tabulator.prototype._loadInitialData=function(){var t=this;if(t.options.pagination&&t.modExists("page"))if(t.modules.page.reset(!0,!0),"local"==t.options.pagination){if(t.options.data.length)t.rowManager.setData(t.options.data,!1,!0);else{if((t.options.ajaxURL||t.options.ajaxURLGenerator)&&t.modExists("ajax"))return void t.modules.ajax.loadData(!1,!0).then((function(){})).catch((function(){t.options.paginationInitialPage&&t.modules.page.setPage(t.options.paginationInitialPage)}));t.rowManager.setData(t.options.data,!1,!0)}t.options.paginationInitialPage&&t.modules.page.setPage(t.options.paginationInitialPage)}else t.options.ajaxURL?t.modules.page.setPage(t.options.paginationInitialPage).then((function(){})).catch((function(){})):t.rowManager.setData([],!1,!0);else t.options.data.length?t.rowManager.setData(t.options.data):(t.options.ajaxURL||t.options.ajaxURLGenerator)&&t.modExists("ajax")?t.modules.ajax.loadData(!1,!0).then((function(){})).catch((function(){})):t.rowManager.setData(t.options.data,!1,!0)},Tabulator.prototype.destroy=function(){var t=this.element;for(Tabulator.prototype.comms.deregister(this),this.options.reactiveData&&this.modExists("reactiveData",!0)&&this.modules.reactiveData.unwatchData(),this.rowManager.rows.forEach((function(t){t.wipe()})),this.rowManager.rows=[],this.rowManager.activeRows=[],this.rowManager.displayRows=[],this.options.autoResize&&this.modExists("resizeTable")&&this.modules.resizeTable.clearBindings(),this.modExists("keybindings")&&this.modules.keybindings.clearBindings();t.firstChild;)t.removeChild(t.firstChild);t.classList.remove("tabulator")},Tabulator.prototype._detectBrowser=function(){var t=navigator.userAgent||navigator.vendor||window.opera;t.indexOf("Trident")>-1?(this.browser="ie",this.browserSlow=!0):t.indexOf("Edge")>-1?(this.browser="edge",this.browserSlow=!0):t.indexOf("Firefox")>-1?(this.browser="firefox",this.browserSlow=!1):(this.browser="other",this.browserSlow=!1),this.browserMobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4))},Tabulator.prototype.blockRedraw=function(){return this.rowManager.blockRedraw()},Tabulator.prototype.restoreRedraw=function(){return this.rowManager.restoreRedraw()},Tabulator.prototype.setDataFromLocalFile=function(t){var e=this;return new Promise((function(o,i){var n=document.createElement("input");n.type="file",n.accept=t||".json,application/json",n.addEventListener("change",(function(t){var s,a=n.files[0],r=new FileReader;r.readAsText(a),r.onload=function(t){try{s=JSON.parse(r.result)}catch(t){return console.warn("File Load Error - File contents is invalid JSON",t),void i(t)}e.setData(s).then((function(t){o(t)})).catch((function(t){o(t)}))},r.onerror=function(t){console.warn("File Load Error - Unable to read file"),i()}})),n.click()}))},Tabulator.prototype.setData=function(t,e,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(t,e,o,!1,!0)},Tabulator.prototype._setData=function(t,e,o,i,n){return"string"!=typeof t?t?this.rowManager.setData(t,i,n):this.modExists("ajax")&&(this.modules.ajax.getUrl||this.options.ajaxURLGenerator)?"remote"==this.options.pagination&&this.modExists("page",!0)?(this.modules.page.reset(!0,!0),this.modules.page.setPage(1)):this.modules.ajax.loadData(i,n):this.rowManager.setData([],i,n):0==t.indexOf("{")||0==t.indexOf("[")?this.rowManager.setData(JSON.parse(t),i,n):this.modExists("ajax",!0)?(e&&this.modules.ajax.setParams(e),o&&this.modules.ajax.setConfig(o),this.modules.ajax.setUrl(t),"remote"==this.options.pagination&&this.modExists("page",!0)?(this.modules.page.reset(!0,!0),this.modules.page.setPage(1)):this.modules.ajax.loadData(i,n)):void 0},Tabulator.prototype.clearData=function(){this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this.rowManager.clearData()},Tabulator.prototype.getData=function(t){return!0===t&&(console.warn("passing a boolean to the getData function is deprecated, you should now pass the string 'active'"),t="active"),this.rowManager.getData(t)},Tabulator.prototype.getDataCount=function(t){return!0===t&&(console.warn("passing a boolean to the getDataCount function is deprecated, you should now pass the string 'active'"),t="active"),this.rowManager.getDataCount(t)},Tabulator.prototype.searchRows=function(t,e,o){if(this.modExists("filter",!0))return this.modules.filter.search("rows",t,e,o)},Tabulator.prototype.searchData=function(t,e,o){if(this.modExists("filter",!0))return this.modules.filter.search("data",t,e,o)},Tabulator.prototype.getHtml=function(t,e,o){if(this.modExists("export",!0))return this.modules.export.getHtml(t,e,o)},Tabulator.prototype.print=function(t,e,o){if(this.modExists("print",!0))return this.modules.print.printFullscreen(t,e,o)},Tabulator.prototype.getAjaxUrl=function(){if(this.modExists("ajax",!0))return this.modules.ajax.getUrl()},Tabulator.prototype.replaceData=function(t,e,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(t,e,o,!0)},Tabulator.prototype.updateData=function(t){var e=this,o=this,i=0;return new Promise((function(n,s){e.modExists("ajax")&&e.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?t.forEach((function(t){var e=o.rowManager.findRow(t[o.options.index]);e&&(i++,e.updateData(t).then((function(){--i||n()})))})):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))}))},Tabulator.prototype.addData=function(t,e,o){var i=this;return new Promise((function(n,s){i.modExists("ajax")&&i.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?i.rowManager.addRows(t,e,o).then((function(t){var e=[];t.forEach((function(t){e.push(t.getComponent())})),n(e)})):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))}))},Tabulator.prototype.updateOrAddData=function(t){var e=this,o=this,i=[],n=0;return new Promise((function(s,a){e.modExists("ajax")&&e.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?t.forEach((function(t){var e=o.rowManager.findRow(t[o.options.index]);n++,e?e.updateData(t).then((function(){n--,i.push(e.getComponent()),n||s(i)})):o.rowManager.addRows(t).then((function(t){n--,i.push(t[0].getComponent()),n||s(i)}))})):(console.warn("Update Error - No data provided"),a("Update Error - No data provided"))}))},Tabulator.prototype.getRow=function(t){var e=this.rowManager.findRow(t);return e?e.getComponent():(console.warn("Find Error - No matching row found:",t),!1)},Tabulator.prototype.getRowFromPosition=function(t,e){var o=this.rowManager.getRowFromPosition(t,e);return o?o.getComponent():(console.warn("Find Error - No matching row found:",t),!1)},Tabulator.prototype.deleteRow=function(t){var e=this;return new Promise((function(o,i){var n=e,s=0,a=0,r=[];function l(){++s==t.length&&a&&(n.rowManager.reRenderInPosition(),o())}Array.isArray(t)||(t=[t]),t.forEach((function(t){var o=e.rowManager.findRow(t,!0);o?r.push(o):(console.warn("Delete Error - No matching row found:",t),i("Delete Error - No matching row found"),l())})),r.sort((function(t,o){return e.rowManager.rows.indexOf(t)>e.rowManager.rows.indexOf(o)?1:-1})),r.forEach((function(t){t.delete().then((function(){a++,l()})).catch((function(t){l(),i(t)}))}))}))},Tabulator.prototype.addRow=function(t,e,o){var i=this;return new Promise((function(n,s){"string"==typeof t&&(t=JSON.parse(t)),i.rowManager.addRows(t,e,o).then((function(t){i.modExists("columnCalcs")&&i.modules.columnCalcs.recalc(i.rowManager.activeRows),n(t[0].getComponent())}))}))},Tabulator.prototype.updateOrAddRow=function(t,e){var o=this;return new Promise((function(i,n){var s=o.rowManager.findRow(t);"string"==typeof e&&(e=JSON.parse(e)),s?s.updateData(e).then((function(){o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(o.rowManager.activeRows),i(s.getComponent())})).catch((function(t){n(t)})):s=o.rowManager.addRows(e).then((function(t){o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(o.rowManager.activeRows),i(t[0].getComponent())})).catch((function(t){n(t)}))}))},Tabulator.prototype.updateRow=function(t,e){var o=this;return new Promise((function(i,n){var s=o.rowManager.findRow(t);"string"==typeof e&&(e=JSON.parse(e)),s?s.updateData(e).then((function(){i(s.getComponent())})).catch((function(t){n(t)})):(console.warn("Update Error - No matching row found:",t),n("Update Error - No matching row found"))}))},Tabulator.prototype.scrollToRow=function(t,e,o){var i=this;return new Promise((function(n,s){var a=i.rowManager.findRow(t);a?i.rowManager.scrollToRow(a,e,o).then((function(){n()})).catch((function(t){s(t)})):(console.warn("Scroll Error - No matching row found:",t),s("Scroll Error - No matching row found"))}))},Tabulator.prototype.moveRow=function(t,e,o){var i=this.rowManager.findRow(t);i?i.moveToRow(e,o):console.warn("Move Error - No matching row found:",t)},Tabulator.prototype.getRows=function(t){return!0===t&&(console.warn("passing a boolean to the getRows function is deprecated, you should now pass the string 'active'"),t="active"),this.rowManager.getComponents(t)},Tabulator.prototype.getRowPosition=function(t,e){var o=this.rowManager.findRow(t);return o?this.rowManager.getRowPosition(o,e):(console.warn("Position Error - No matching row found:",t),!1)},Tabulator.prototype.copyToClipboard=function(t){this.modExists("clipboard",!0)&&this.modules.clipboard.copy(t)},Tabulator.prototype.setColumns=function(t){this.columnManager.setColumns(t)},Tabulator.prototype.getColumns=function(t){return this.columnManager.getComponents(t)},Tabulator.prototype.getColumn=function(t){var e=this.columnManager.findColumn(t);return e?e.getComponent():(console.warn("Find Error - No matching column found:",t),!1)},Tabulator.prototype.getColumnDefinitions=function(){return this.columnManager.getDefinitionTree()},Tabulator.prototype.getColumnLayout=function(){if(this.modExists("persistence",!0))return this.modules.persistence.parseColumns(this.columnManager.getColumns())},Tabulator.prototype.setColumnLayout=function(t){return!!this.modExists("persistence",!0)&&(this.columnManager.setColumns(this.modules.persistence.mergeDefinition(this.options.columns,t)),!0)},Tabulator.prototype.showColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Show Error - No matching column found:",t),!1;e.show(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},Tabulator.prototype.hideColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Hide Error - No matching column found:",t),!1;e.hide(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},Tabulator.prototype.toggleColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Visibility Toggle Error - No matching column found:",t),!1;e.visible?e.hide():e.show()},Tabulator.prototype.addColumn=function(t,e,o){var i=this;return new Promise((function(n,s){var a=i.columnManager.findColumn(o);i.columnManager.addColumn(t,e,a).then((function(t){n(t.getComponent())})).catch((function(t){s(t)}))}))},Tabulator.prototype.deleteColumn=function(t){var e=this;return new Promise((function(o,i){var n=e.columnManager.findColumn(t);n?n.delete().then((function(){o()})).catch((function(t){i(t)})):(console.warn("Column Delete Error - No matching column found:",t),i())}))},Tabulator.prototype.updateColumnDefinition=function(t,e){var o=this;return new Promise((function(i,n){var s=o.columnManager.findColumn(t);s?s.updateDefinition(e).then((function(t){i(t)})).catch((function(t){n(t)})):(console.warn("Column Update Error - No matching column found:",t),n())}))},Tabulator.prototype.moveColumn=function(t,e,o){var i=this.columnManager.findColumn(t),n=this.columnManager.findColumn(e);i?n?this.columnManager.moveColumn(i,n,o):console.warn("Move Error - No matching column found:",n):console.warn("Move Error - No matching column found:",t)},Tabulator.prototype.scrollToColumn=function(t,e,o){var i=this;return new Promise((function(n,s){var a=i.columnManager.findColumn(t);a?i.columnManager.scrollToColumn(a,e,o).then((function(){n()})).catch((function(t){s(t)})):(console.warn("Scroll Error - No matching column found:",t),s("Scroll Error - No matching column found"))}))},Tabulator.prototype.setLocale=function(t){this.modules.localize.setLocale(t)},Tabulator.prototype.getLocale=function(){return this.modules.localize.getLocale()},Tabulator.prototype.getLang=function(t){return this.modules.localize.getLang(t)},Tabulator.prototype.redraw=function(t){this.columnManager.redraw(t),this.rowManager.redraw(t)},Tabulator.prototype.setHeight=function(t){"classic"!==this.rowManager.renderMode?(this.options.height=isNaN(t)?t:t+"px",this.element.style.height=this.options.height,this.rowManager.setRenderMode(),this.rowManager.redraw()):console.warn("setHeight function is not available in classic render mode")},Tabulator.prototype.setSort=function(t,e){this.modExists("sort",!0)&&(this.modules.sort.setSort(t,e),this.rowManager.sorterRefresh())},Tabulator.prototype.getSorters=function(){if(this.modExists("sort",!0))return this.modules.sort.getSort()},Tabulator.prototype.clearSort=function(){this.modExists("sort",!0)&&(this.modules.sort.clear(),this.rowManager.sorterRefresh())},Tabulator.prototype.setFilter=function(t,e,o,i){this.modExists("filter",!0)&&(this.modules.filter.setFilter(t,e,o,i),this.rowManager.filterRefresh())},Tabulator.prototype.refreshFilter=function(){this.modExists("filter",!0)&&this.rowManager.filterRefresh()},Tabulator.prototype.addFilter=function(t,e,o,i){this.modExists("filter",!0)&&(this.modules.filter.addFilter(t,e,o,i),this.rowManager.filterRefresh())},Tabulator.prototype.getFilters=function(t){if(this.modExists("filter",!0))return this.modules.filter.getFilters(t)},Tabulator.prototype.setHeaderFilterFocus=function(t){if(this.modExists("filter",!0)){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Filter Focus Error - No matching column found:",t),!1;this.modules.filter.setHeaderFilterFocus(e)}},Tabulator.prototype.getHeaderFilterValue=function(t){if(this.modExists("filter",!0)){var e=this.columnManager.findColumn(t);if(e)return this.modules.filter.getHeaderFilterValue(e);console.warn("Column Filter Error - No matching column found:",t)}},Tabulator.prototype.setHeaderFilterValue=function(t,e){if(this.modExists("filter",!0)){var o=this.columnManager.findColumn(t);if(!o)return console.warn("Column Filter Error - No matching column found:",t),!1;this.modules.filter.setHeaderFilterValue(o,e)}},Tabulator.prototype.getHeaderFilters=function(){if(this.modExists("filter",!0))return this.modules.filter.getHeaderFilters()},Tabulator.prototype.removeFilter=function(t,e,o){this.modExists("filter",!0)&&(this.modules.filter.removeFilter(t,e,o),this.rowManager.filterRefresh())},Tabulator.prototype.clearFilter=function(t){this.modExists("filter",!0)&&(this.modules.filter.clearFilter(t),this.rowManager.filterRefresh())},Tabulator.prototype.clearHeaderFilter=function(){this.modExists("filter",!0)&&(this.modules.filter.clearHeaderFilter(),this.rowManager.filterRefresh())},Tabulator.prototype.selectRow=function(t){this.modExists("selectRow",!0)&&(!0===t&&(console.warn("passing a boolean to the selectRowselectRow function is deprecated, you should now pass the string 'active'"),t="active"),this.modules.selectRow.selectRows(t))},Tabulator.prototype.deselectRow=function(t){this.modExists("selectRow",!0)&&this.modules.selectRow.deselectRows(t)},Tabulator.prototype.toggleSelectRow=function(t){this.modExists("selectRow",!0)&&this.modules.selectRow.toggleRow(t)},Tabulator.prototype.getSelectedRows=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedRows()},Tabulator.prototype.getSelectedData=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedData()},Tabulator.prototype.getInvalidCells=function(){if(this.modExists("validate",!0))return this.modules.validate.getInvalidCells()},Tabulator.prototype.clearCellValidation=function(t){var e=this;this.modExists("validate",!0)&&(t||(t=this.modules.validate.getInvalidCells()),Array.isArray(t)||(t=[t]),t.forEach((function(t){e.modules.validate.clearValidation(t._getSelf())})))},Tabulator.prototype.validate=function(t){var e=[];return this.rowManager.rows.forEach((function(t){var o=t.validate();!0!==o&&(e=e.concat(o))})),!e.length||e},Tabulator.prototype.setMaxPage=function(t){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setMaxPage(t)},Tabulator.prototype.setPage=function(t){return this.options.pagination&&this.modExists("page")?this.modules.page.setPage(t):new Promise((function(t,e){e()}))},Tabulator.prototype.setPageToRow=function(t){var e=this;return new Promise((function(o,i){e.options.pagination&&e.modExists("page")&&(t=e.rowManager.findRow(t))?e.modules.page.setPageToRow(t).then((function(){o()})).catch((function(){i()})):i()}))},Tabulator.prototype.setPageSize=function(t){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setPageSize(t),this.modules.page.setPage(1).then((function(){})).catch((function(){}))},Tabulator.prototype.getPageSize=function(){if(this.options.pagination&&this.modExists("page",!0))return this.modules.page.getPageSize()},Tabulator.prototype.previousPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.previousPage()},Tabulator.prototype.nextPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.nextPage()},Tabulator.prototype.getPage=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPage()},Tabulator.prototype.getPageMax=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPageMax()},Tabulator.prototype.setGroupBy=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupBy=t,this.modules.groupRows.initialize(),this.rowManager.refreshActiveData("display"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")},Tabulator.prototype.setGroupValues=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupValues=t,this.modules.groupRows.initialize(),this.rowManager.refreshActiveData("display"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")},Tabulator.prototype.setGroupStartOpen=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupStartOpen=t,this.modules.groupRows.initialize(),this.options.groupBy?(this.rowManager.refreshActiveData("group"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")):console.warn("Grouping Update - cant refresh view, no groups have been set")},Tabulator.prototype.setGroupHeader=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupHeader=t,this.modules.groupRows.initialize(),this.options.groupBy?(this.rowManager.refreshActiveData("group"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")):console.warn("Grouping Update - cant refresh view, no groups have been set")},Tabulator.prototype.getGroups=function(t){return!!this.modExists("groupRows",!0)&&this.modules.groupRows.getGroups(!0)},Tabulator.prototype.getGroupedData=function(){if(this.modExists("groupRows",!0))return this.options.groupBy?this.modules.groupRows.getGroupedData():this.getData()},Tabulator.prototype.getEditedCells=function(){if(this.modExists("edit",!0))return this.modules.edit.getEditedCells()},Tabulator.prototype.clearCellEdited=function(t){var e=this;this.modExists("edit",!0)&&(t||(t=this.modules.edit.getEditedCells()),Array.isArray(t)||(t=[t]),t.forEach((function(t){e.modules.edit.clearEdited(t._getSelf())})))},Tabulator.prototype.getCalcResults=function(){return!!this.modExists("columnCalcs",!0)&&this.modules.columnCalcs.getResults()},Tabulator.prototype.recalc=function(){this.modExists("columnCalcs",!0)&&this.modules.columnCalcs.recalcAll(this.rowManager.activeRows)},Tabulator.prototype.navigatePrev=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&t.nav().prev()},Tabulator.prototype.navigateNext=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&t.nav().next()},Tabulator.prototype.navigateLeft=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().left())},Tabulator.prototype.navigateRight=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().right())},Tabulator.prototype.navigateUp=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().up())},Tabulator.prototype.navigateDown=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().down())},Tabulator.prototype.undo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.undo()},Tabulator.prototype.redo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.redo()},Tabulator.prototype.getHistoryUndoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryUndoSize()},Tabulator.prototype.getHistoryRedoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryRedoSize()},Tabulator.prototype.clearHistory=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.clear()},Tabulator.prototype.download=function(t,e,o,i){this.modExists("download",!0)&&this.modules.download.download(t,e,o,i)},Tabulator.prototype.downloadToTab=function(t,e,o,i){this.modExists("download",!0)&&this.modules.download.download(t,e,o,i,!0)},Tabulator.prototype.tableComms=function(t,e,o,i){this.modules.comms.receive(t,e,o,i)},Tabulator.prototype.moduleBindings={},Tabulator.prototype.extendModule=function(t,e,o){if(Tabulator.prototype.moduleBindings[t]){var i=Tabulator.prototype.moduleBindings[t].prototype[e];if(i)if("object"==(void 0===o?"undefined":_typeof(o)))for(var n in o)i[n]=o[n];else console.warn("Module Error - Invalid value type, it must be an object");else console.warn("Module Error - property does not exist:",e)}else console.warn("Module Error - module does not exist:",t)},Tabulator.prototype.registerModule=function(t,e){Tabulator.prototype.moduleBindings[t]=e},Tabulator.prototype.bindModules=function(){for(var t in this.modules={},Tabulator.prototype.moduleBindings)this.modules[t]=new Tabulator.prototype.moduleBindings[t](this)},Tabulator.prototype.modExists=function(t,e){return!!this.modules[t]||(e&&console.error("Tabulator Module Not Installed: "+t),!1)},Tabulator.prototype.helpers={elVisible:function(t){return!(t.offsetWidth<=0&&t.offsetHeight<=0)},elOffset:function(t){var e=t.getBoundingClientRect();return{top:e.top+window.pageYOffset-document.documentElement.clientTop,left:e.left+window.pageXOffset-document.documentElement.clientLeft}},deepClone:function(t){var e=Object.assign(Array.isArray(t)?[]:{},t);for(var o in t)null!=t[o]&&"object"===_typeof(t[o])&&(t[o]instanceof Date?e[o]=new Date(t[o]):e[o]=this.deepClone(t[o]));return e}},Tabulator.prototype.comms={tables:[],register:function(t){Tabulator.prototype.comms.tables.push(t)},deregister:function(t){var e=Tabulator.prototype.comms.tables.indexOf(t);e>-1&&Tabulator.prototype.comms.tables.splice(e,1)},lookupTable:function(t,e){var o,i,n=[];if("string"==typeof t){if((o=document.querySelectorAll(t)).length)for(var s=0;s<o.length;s++)(i=Tabulator.prototype.comms.matchElement(o[s]))&&n.push(i)}else"undefined"!=typeof HTMLElement&&t instanceof HTMLElement||t instanceof Tabulator?(i=Tabulator.prototype.comms.matchElement(t))&&n.push(i):Array.isArray(t)?t.forEach((function(t){n=n.concat(Tabulator.prototype.comms.lookupTable(t))})):e||console.warn("Table Connection Error - Invalid Selector",t);return n},matchElement:function(t){return Tabulator.prototype.comms.tables.find((function(e){return t instanceof Tabulator?e===t:e.element===t}))}},Tabulator.prototype.findTable=function(t){var e=Tabulator.prototype.comms.lookupTable(t,!0);return!(Array.isArray(e)&&!e.length)&&e};var Layout=function(t){this.table=t,this.mode=null};Layout.prototype.initialize=function(t){this.modes[t]?this.mode=t:(console.warn("Layout Error - invalid mode set, defaulting to 'fitData' : "+t),this.mode="fitData"),this.table.element.setAttribute("tabulator-layout",this.mode)},Layout.prototype.getMode=function(){return this.mode},Layout.prototype.layout=function(){this.modes[this.mode].call(this,this.table.columnManager.columnsByIndex),0===this.mode.indexOf("fitData")&&this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns")},Layout.prototype.modes={fitData:function(t){this.table.options.virtualDomHoz?this.table.vdomHoz.fitDataLayoutOverride():t.forEach((function(t){t.reinitializeWidth()})),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitDataFill:function(t){t.forEach((function(t){t.reinitializeWidth()})),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitDataTable:function(t){t.forEach((function(t){t.reinitializeWidth()})),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitDataStretch:function(t){var e=this,o=0,i=this.table.rowManager.element.clientWidth,n=0,s=!1;t.forEach((function(t,i){t.widthFixed||t.reinitializeWidth(),(e.table.options.responsiveLayout?t.modules.responsive.visible:t.visible)&&(s=t),t.visible&&(o+=t.getWidth())})),s?(n=i-o+s.getWidth(),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&(s.setWidth(0),this.table.modules.responsiveLayout.update()),n>0?s.setWidth(n):s.reinitializeWidth()):this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitColumns:function(t){var e,o,i=this.table.element.clientWidth,n=0,s=0,a=0,r=[],l=[],u=0,c=0;function d(t){return"string"==typeof t?t.indexOf("%")>-1?i/100*parseInt(t):parseInt(t):t}function h(t,e,o,i){var n=[],s=0,r=0,l=0,u=a,c=0,p=0,m=[];function f(t){return o*(t.column.definition.widthGrow||1)}function g(t){return d(t.width)-o*(t.column.definition.widthShrink||0)}return t.forEach((function(t,s){var a=i?g(t):f(t);t.column.minWidth>=a?n.push(t):t.column.maxWidth&&t.column.maxWidth<a?(t.width=t.column.maxWidth,e-=t.column.maxWidth,(u-=i?t.column.definition.widthShrink||1:t.column.definition.widthGrow||1)&&(o=Math.floor(e/u))):(m.push(t),p+=i?t.column.definition.widthShrink||1:t.column.definition.widthGrow||1)})),n.length?(n.forEach((function(t){s+=i?t.width-t.column.minWidth:t.column.minWidth,t.width=t.column.minWidth})),c=(r=e-s)-(l=p?Math.floor(r/p):r)*p,c+=h(m,r,l,i)):(c=p?e-Math.floor(e/p)*p:e,m.forEach((function(t){t.width=i?g(t):f(t)}))),c}this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight&&(i-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),t.forEach((function(t){var e,o,i;t.visible&&(e=t.definition.width,o=parseInt(t.minWidth),e?(i=d(e),n+=i>o?i:o,t.definition.widthShrink&&(l.push({column:t,width:i>o?i:o}),u+=t.definition.widthShrink)):(r.push({column:t,width:0}),a+=t.definition.widthGrow||1))})),s=i-n,e=Math.floor(s/a);c=h(r,s,e,!1);r.length&&c>0&&(r[r.length-1].width+=+c),r.forEach((function(t){s-=t.width})),(o=Math.abs(c)+s)>0&&u&&(c=h(l,o,Math.floor(o/u),!0)),l.length&&(l[l.length-1].width-=c),r.forEach((function(t){t.column.setWidth(t.width)})),l.forEach((function(t){t.column.setWidth(t.width)}))}},Tabulator.prototype.registerModule("layout",Layout);var Localize=function(t){this.table=t,this.locale="default",this.lang=!1,this.bindings={},this.langList={}};Localize.prototype.initialize=function(){this.langList=Tabulator.prototype.helpers.deepClone(this.langs)},Localize.prototype.setHeaderFilterPlaceholder=function(t){this.langList.default.headerFilters.default=t},Localize.prototype.setHeaderFilterColumnPlaceholder=function(t,e){this.langList.default.headerFilters.columns[t]=e,this.lang&&!this.lang.headerFilters.columns[t]&&(this.lang.headerFilters.columns[t]=e)},Localize.prototype.installLang=function(t,e){this.langList[t]?this._setLangProp(this.langList[t],e):this.langList[t]=e},Localize.prototype._setLangProp=function(t,e){for(var o in e)t[o]&&"object"==_typeof(t[o])?this._setLangProp(t[o],e[o]):t[o]=e[o]},Localize.prototype.setLocale=function(t){if(!0===(t=t||"default")&&navigator.language&&(t=navigator.language.toLowerCase()),t&&!this.langList[t]){var e=t.split("-")[0];this.langList[e]?(console.warn("Localization Error - Exact matching locale not found, using closest match: ",t,e),t=e):(console.warn("Localization Error - Matching locale not found, using default: ",t),t="default")}this.locale=t,this.lang=Tabulator.prototype.helpers.deepClone(this.langList.default||{}),"default"!=t&&function t(e,o){for(var i in e)"object"==_typeof(e[i])?(o[i]||(o[i]={}),t(e[i],o[i])):o[i]=e[i]}(this.langList[t],this.lang),this.table.options.localized.call(this.table,this.locale,this.lang),this._executeBindings()},Localize.prototype.getLocale=function(t){return self.locale},Localize.prototype.getLang=function(t){return t?this.langList[t]:this.lang},Localize.prototype.getText=function(t,e){var o=(t=e?t+"|"+e:t).split("|");return this._getLangElement(o,this.locale)||""},Localize.prototype._getLangElement=function(t,e){var o=this.lang;return t.forEach((function(t){var e;o&&(e=o[t],o=void 0!==e&&e)})),o},Localize.prototype.bind=function(t,e){this.bindings[t]||(this.bindings[t]=[]),this.bindings[t].push(e),e(this.getText(t),this.lang)},Localize.prototype._executeBindings=function(){var t=this,e=function(e){t.bindings[e].forEach((function(o){o(t.getText(e),t.lang)}))};for(var o in t.bindings)e(o)},Localize.prototype.langs={default:{groups:{item:"item",items:"items"},columns:{},ajax:{loading:"Loading",error:"Error"},pagination:{page_size:"Page Size",page_title:"Show Page",first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page",all:"All"},headerFilters:{default:"filter column...",columns:{}}}},Tabulator.prototype.registerModule("localize",Localize);var Comms=function(t){this.table=t};Comms.prototype.getConnections=function(t){var e=this,o=[];return Tabulator.prototype.comms.lookupTable(t).forEach((function(t){e.table!==t&&o.push(t)})),o},Comms.prototype.send=function(t,e,o,i){var n=this,s=this.getConnections(t);s.forEach((function(t){t.tableComms(n.table.element,e,o,i)})),!s.length&&t&&console.warn("Table Connection Error - No tables matching selector found",t)},Comms.prototype.receive=function(t,e,o,i){if(this.table.modExists(e))return this.table.modules[e].commsReceived(t,o,i);console.warn("Inter-table Comms Error - no such module:",e)},Tabulator.prototype.registerModule("comms",Comms);var Accessor=function(t){this.table=t,this.allowedTypes=["","data","download","clipboard","print","htmlOutput"]};Accessor.prototype.initializeColumn=function(t){var e=this,o=!1,i={};this.allowedTypes.forEach((function(n){var s,a="accessor"+(n.charAt(0).toUpperCase()+n.slice(1));t.definition[a]&&(s=e.lookupAccessor(t.definition[a]))&&(o=!0,i[a]={accessor:s,params:t.definition[a+"Params"]||{}})})),o&&(t.modules.accessor=i)},Accessor.prototype.lookupAccessor=function(t){var e=!1;switch(void 0===t?"undefined":_typeof(t)){case"string":this.accessors[t]?e=this.accessors[t]:console.warn("Accessor Error - No such accessor found, ignoring: ",t);break;case"function":e=t}return e},Accessor.prototype.transformRow=function(t,e){var o="accessor"+(e.charAt(0).toUpperCase()+e.slice(1)),i=t.getComponent(),n=Tabulator.prototype.helpers.deepClone(t.data||{});return this.table.columnManager.traverse((function(t){var s,a,r,l;t.modules.accessor&&(a=t.modules.accessor[o]||t.modules.accessor.accessor||!1)&&"undefined"!=(s=t.getFieldValue(n))&&(l=t.getComponent(),r="function"==typeof a.params?a.params(s,n,e,l,i):a.params,t.setFieldValue(n,a.accessor(s,n,e,r,l,i)))})),n},Accessor.prototype.accessors={},Tabulator.prototype.registerModule("accessor",Accessor);var Ajax=function(t){this.table=t,this.config=!1,this.url="",this.urlGenerator=!1,this.params=!1,this.loaderElement=this.createLoaderElement(),this.msgElement=this.createMsgElement(),this.loadingElement=!1,this.errorElement=!1,this.loaderPromise=!1,this.progressiveLoad=!1,this.loading=!1,this.requestOrder=0};Ajax.prototype.initialize=function(){var t;this.loaderElement.appendChild(this.msgElement),this.table.options.ajaxLoaderLoading&&("string"==typeof this.table.options.ajaxLoaderLoading?((t=document.createElement("template")).innerHTML=this.table.options.ajaxLoaderLoading.trim(),this.loadingElement=t.content.firstChild):this.loadingElement=this.table.options.ajaxLoaderLoading),this.loaderPromise=this.table.options.ajaxRequestFunc||this.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||this.defaultURLGenerator,this.table.options.ajaxLoaderError&&("string"==typeof this.table.options.ajaxLoaderError?((t=document.createElement("template")).innerHTML=this.table.options.ajaxLoaderError.trim(),this.errorElement=t.content.firstChild):this.errorElement=this.table.options.ajaxLoaderError),this.table.options.ajaxParams&&this.setParams(this.table.options.ajaxParams),this.table.options.ajaxConfig&&this.setConfig(this.table.options.ajaxConfig),this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.table.options.ajaxProgressiveLoad&&(this.table.options.pagination?(this.progressiveLoad=!1,console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time")):this.table.modExists("page")?(this.progressiveLoad=this.table.options.ajaxProgressiveLoad,this.table.modules.page.initializeProgressive(this.progressiveLoad)):console.error("Pagination plugin is required for progressive ajax loading"))},Ajax.prototype.createLoaderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-loader"),t},Ajax.prototype.createMsgElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-loader-msg"),t.setAttribute("role","alert"),t},Ajax.prototype.setParams=function(t,e){if(e)for(var o in this.params=this.params||{},t)this.params[o]=t[o];else this.params=t},Ajax.prototype.getParams=function(){return this.params||{}},Ajax.prototype.setConfig=function(t){if(this._loadDefaultConfig(),"string"==typeof t)this.config.method=t;else for(var e in t)this.config[e]=t[e]},Ajax.prototype._loadDefaultConfig=function(t){if(!this.config||t)for(var e in this.config={},this.defaultConfig)this.config[e]=this.defaultConfig[e]},Ajax.prototype.setUrl=function(t){this.url=t},Ajax.prototype.getUrl=function(){return this.url},Ajax.prototype.loadData=function(t,e){return this.progressiveLoad?this._loadDataProgressive():this._loadDataStandard(t,e)},Ajax.prototype.nextPage=function(t){this.loading||t<(this.table.options.ajaxProgressiveLoadScrollMargin||2*this.table.rowManager.getElement().clientHeight)&&this.table.modules.page.nextPage().then((function(){})).catch((function(){}))},Ajax.prototype.blockActiveRequest=function(){this.requestOrder++},Ajax.prototype._loadDataProgressive=function(){return this.table.rowManager.setData([]),this.table.modules.page.setPage(1)},Ajax.prototype._loadDataStandard=function(t,e){var o=this;return new Promise((function(i,n){o.sendRequest(t).then((function(s){o.table.rowManager.setData(s,t,e).then((function(){i()})).catch((function(t){n(t)}))})).catch((function(t){n(t)}))}))},Ajax.prototype.generateParamsList=function(t,e){var o=this,i=[];if(e=e||"",Array.isArray(t))t.forEach((function(t,n){i=i.concat(o.generateParamsList(t,e?e+"["+n+"]":n))}));else if("object"===(void 0===t?"undefined":_typeof(t)))for(var n in t)i=i.concat(o.generateParamsList(t[n],e?e+"["+n+"]":n));else i.push({key:e,value:t});return i},Ajax.prototype.serializeParams=function(t){var e=this.generateParamsList(t),o=[];return e.forEach((function(t){o.push(encodeURIComponent(t.key)+"="+encodeURIComponent(t.value))})),o.join("&")},Ajax.prototype.sendRequest=function(t){var e,o=this,i=this,n=i.url;return i.requestOrder++,e=i.requestOrder,i._loadDefaultConfig(),new Promise((function(s,a){!1!==i.table.options.ajaxRequesting.call(o.table,i.url,i.params)?(i.loading=!0,t||i.showLoader(),o.loaderPromise(n,i.config,i.params).then((function(t){e===i.requestOrder?(i.table.options.ajaxResponse&&(t=i.table.options.ajaxResponse.call(i.table,i.url,i.params,t)),s(t),i.hideLoader(),i.loading=!1):console.warn("Ajax Response Blocked - An active ajax request was blocked by an attempt to change table data while the request was being made")})).catch((function(t){console.error("Ajax Load Error: ",t),i.table.options.ajaxError.call(i.table,t),i.showError(),setTimeout((function(){i.hideLoader()}),3e3),i.loading=!1,a(t)}))):a()}))},Ajax.prototype.showLoader=function(){if("function"==typeof this.table.options.ajaxLoader?this.table.options.ajaxLoader():this.table.options.ajaxLoader){for(this.hideLoader();this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.remove("tabulator-error"),this.msgElement.classList.add("tabulator-loading"),this.loadingElement?this.msgElement.appendChild(this.loadingElement):this.msgElement.innerHTML=this.table.modules.localize.getText("ajax|loading"),this.table.element.appendChild(this.loaderElement)}},Ajax.prototype.showError=function(){for(this.hideLoader();this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.remove("tabulator-loading"),this.msgElement.classList.add("tabulator-error"),this.errorElement?this.msgElement.appendChild(this.errorElement):this.msgElement.innerHTML=this.table.modules.localize.getText("ajax|error"),this.table.element.appendChild(this.loaderElement)},Ajax.prototype.hideLoader=function(){this.loaderElement.parentNode&&this.loaderElement.parentNode.removeChild(this.loaderElement)},Ajax.prototype.defaultConfig={method:"GET"},Ajax.prototype.defaultURLGenerator=function(t,e,o){return t&&o&&Object.keys(o).length&&(e.method&&"get"!=e.method.toLowerCase()||(e.method="get",t+=(t.includes("?")?"&":"?")+this.modules.ajax.serializeParams(o))),t},Ajax.prototype.defaultLoaderPromise=function(t,e,o){var i,n=this;return new Promise((function(s,a){if(t=n.urlGenerator.call(n.table,t,e,o),"GET"!=e.method.toUpperCase())if(i="object"===_typeof(n.table.options.ajaxContentType)?n.table.options.ajaxContentType:n.contentTypeFormatters[n.table.options.ajaxContentType]){for(var r in i.headers)e.headers||(e.headers={}),void 0===e.headers[r]&&(e.headers[r]=i.headers[r]);e.body=i.body.call(n,t,e,o)}else console.warn("Ajax Error - Invalid ajaxContentType value:",n.table.options.ajaxContentType);t?(void 0===e.headers&&(e.headers={}),void 0===e.headers.Accept&&(e.headers.Accept="application/json"),void 0===e.headers["X-Requested-With"]&&(e.headers["X-Requested-With"]="XMLHttpRequest"),void 0===e.mode&&(e.mode="cors"),"cors"==e.mode?(void 0===e.headers["Access-Control-Allow-Origin"]&&(e.headers["Access-Control-Allow-Origin"]=window.location.origin),void 0===e.credentials&&(e.credentials="same-origin")):void 0===e.credentials&&(e.credentials="include"),fetch(t,e).then((function(t){t.ok?t.json().then((function(t){s(t)})).catch((function(t){a(t),console.warn("Ajax Load Error - Invalid JSON returned",t)})):(console.error("Ajax Load Error - Connection Error: "+t.status,t.statusText),a(t))})).catch((function(t){console.error("Ajax Load Error - Connection Error: ",t),a(t)}))):(console.warn("Ajax Load Error - No URL Set"),s([]))}))},Ajax.prototype.contentTypeFormatters={json:{headers:{"Content-Type":"application/json"},body:function(t,e,o){return JSON.stringify(o)}},form:{headers:{},body:function(t,e,o){var i=this.generateParamsList(o),n=new FormData;return i.forEach((function(t){n.append(t.key,t.value)})),n}}},Tabulator.prototype.registerModule("ajax",Ajax);var CalcComponent=function(t){this._row=t};CalcComponent.prototype.getData=function(t){return this._row.getData(t)},CalcComponent.prototype.getElement=function(){return this._row.getElement()},CalcComponent.prototype.getTable=function(){return this._row.table},CalcComponent.prototype.getCells=function(){var t=[];return this._row.getCells().forEach((function(e){t.push(e.getComponent())})),t},CalcComponent.prototype.getCell=function(t){var e=this._row.getCell(t);return!!e&&e.getComponent()},CalcComponent.prototype._getSelf=function(){return this._row};var ColumnCalcs=function(t){this.table=t,this.topCalcs=[],this.botCalcs=[],this.genColumn=!1,this.topElement=this.createElement(),this.botElement=this.createElement(),this.topRow=!1,this.botRow=!1,this.topInitialized=!1,this.botInitialized=!1,this.initialize()};ColumnCalcs.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-calcs-holder"),t},ColumnCalcs.prototype.initialize=function(){this.genColumn=new Column({field:"value"},this)},ColumnCalcs.prototype.registerColumnField=function(){},ColumnCalcs.prototype.initializeColumn=function(t){var e=t.definition,o={topCalcParams:e.topCalcParams||{},botCalcParams:e.bottomCalcParams||{}};if(e.topCalc){switch(_typeof(e.topCalc)){case"string":this.calculations[e.topCalc]?o.topCalc=this.calculations[e.topCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",e.topCalc);break;case"function":o.topCalc=e.topCalc}o.topCalc&&(t.modules.columnCalcs=o,this.topCalcs.push(t),"group"!=this.table.options.columnCalcs&&this.initializeTopRow())}if(e.bottomCalc){switch(_typeof(e.bottomCalc)){case"string":this.calculations[e.bottomCalc]?o.botCalc=this.calculations[e.bottomCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",e.bottomCalc);break;case"function":o.botCalc=e.bottomCalc}o.botCalc&&(t.modules.columnCalcs=o,this.botCalcs.push(t),"group"!=this.table.options.columnCalcs&&this.initializeBottomRow())}},ColumnCalcs.prototype.removeCalcs=function(){var t=!1;this.topInitialized&&(this.topInitialized=!1,this.topElement.parentNode.removeChild(this.topElement),t=!0),this.botInitialized&&(this.botInitialized=!1,this.table.footerManager.remove(this.botElement),t=!0),t&&this.table.rowManager.adjustTableSize()},ColumnCalcs.prototype.initializeTopRow=function(){this.topInitialized||(this.table.columnManager.getElement().insertBefore(this.topElement,this.table.columnManager.headersElement.nextSibling),this.topInitialized=!0)},ColumnCalcs.prototype.initializeBottomRow=function(){this.botInitialized||(this.table.footerManager.prepend(this.botElement),this.botInitialized=!0)},ColumnCalcs.prototype.scrollHorizontal=function(t){this.botInitialized&&this.botRow&&(this.botRow.getElement().style.marginLeft=-t+"px")},ColumnCalcs.prototype.recalc=function(t){var e;if(this.topInitialized||this.botInitialized){if(this.rowsToData(t),this.topInitialized){for(this.topRow&&this.topRow.deleteCells(),e=this.generateRow("top",this.rowsToData(t)),this.topRow=e;this.topElement.firstChild;)this.topElement.removeChild(this.topElement.firstChild);this.topElement.appendChild(e.getElement()),e.initialize(!0)}if(this.botInitialized){for(this.botRow&&this.botRow.deleteCells(),e=this.generateRow("bottom",this.rowsToData(t)),this.botRow=e;this.botElement.firstChild;)this.botElement.removeChild(this.botElement.firstChild);this.botElement.appendChild(e.getElement()),e.initialize(!0)}this.table.rowManager.adjustTableSize(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()}},ColumnCalcs.prototype.recalcRowGroup=function(t){this.recalcGroup(this.table.modules.groupRows.getRowGroup(t))},ColumnCalcs.prototype.recalcAll=function(){var t=this;(this.topCalcs.length||this.botCalcs.length)&&("group"!==this.table.options.columnCalcs&&this.recalc(this.table.rowManager.activeRows),this.table.options.groupBy&&"table"!==this.table.options.columnCalcs&&table.modules.groupRows.getChildGroups().forEach((function(e){t.recalcGroup(e)})))},ColumnCalcs.prototype.recalcGroup=function(t){var e,o;t&&t.calcs&&(t.calcs.bottom&&(e=this.rowsToData(t.rows),o=this.generateRowData("bottom",e),t.calcs.bottom.updateData(o),t.calcs.bottom.reinitialize()),t.calcs.top&&(e=this.rowsToData(t.rows),o=this.generateRowData("top",e),t.calcs.top.updateData(o),t.calcs.top.reinitialize()))},ColumnCalcs.prototype.generateTopRow=function(t){return this.generateRow("top",this.rowsToData(t))},ColumnCalcs.prototype.generateBottomRow=function(t){return this.generateRow("bottom",this.rowsToData(t))},ColumnCalcs.prototype.rowsToData=function(t){var e=this,o=[];return t.forEach((function(t){if(o.push(t.getData()),e.table.options.dataTree&&e.table.options.dataTreeChildColumnCalcs&&t.modules.dataTree.open){var i=e.rowsToData(e.table.modules.dataTree.getFilteredTreeChildren(t));o=o.concat(i)}})),o},ColumnCalcs.prototype.generateRow=function(t,e){var o,i=this,n=this.generateRowData(t,e);return i.table.modExists("mutator")&&i.table.modules.mutator.disable(),o=new Row(n,this,"calc"),i.table.modExists("mutator")&&i.table.modules.mutator.enable(),o.getElement().classList.add("tabulator-calcs","tabulator-calcs-"+t),o.component=!1,o.getComponent=function(){return this.component||(this.component=new CalcComponent(this)),this.component},o.generateCells=function(){var e=[];i.table.columnManager.columnsByIndex.forEach((function(n){i.genColumn.setField(n.getField()),i.genColumn.hozAlign=n.hozAlign,n.definition[t+"CalcFormatter"]&&i.table.modExists("format")?i.genColumn.modules.format={formatter:i.table.modules.format.getFormatter(n.definition[t+"CalcFormatter"]),params:n.definition[t+"CalcFormatterParams"]||{}}:i.genColumn.modules.format={formatter:i.table.modules.format.getFormatter("plaintext"),params:{}},i.genColumn.definition.cssClass=n.definition.cssClass;var s=new Cell(i.genColumn,o);s.getElement(),s.column=n,s.setWidth(),n.cells.push(s),e.push(s),n.visible||s.hide()})),this.cells=e},o},ColumnCalcs.prototype.generateRowData=function(t,e){var o,i,n={},s="top"==t?this.topCalcs:this.botCalcs,a="top"==t?"topCalc":"botCalc";return s.forEach((function(t){var s=[];t.modules.columnCalcs&&t.modules.columnCalcs[a]&&(e.forEach((function(e){s.push(t.getFieldValue(e))})),i=a+"Params",o="function"==typeof t.modules.columnCalcs[i]?t.modules.columnCalcs[i](s,e):t.modules.columnCalcs[i],t.setFieldValue(n,t.modules.columnCalcs[a](s,e,o)))})),n},ColumnCalcs.prototype.hasTopCalcs=function(){return!!this.topCalcs.length},ColumnCalcs.prototype.hasBottomCalcs=function(){return!!this.botCalcs.length},ColumnCalcs.prototype.redraw=function(){this.topRow&&this.topRow.normalizeHeight(!0),this.botRow&&this.botRow.normalizeHeight(!0)},ColumnCalcs.prototype.getResults=function(){var t=this,e={};return this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.groupRows.getGroups(!0).forEach((function(o){e[o.getKey()]=t.getGroupResults(o)})):e={top:this.topRow?this.topRow.getData():{},bottom:this.botRow?this.botRow.getData():{}},e},ColumnCalcs.prototype.getGroupResults=function(t){var e=this,o=t._getSelf(),i=t.getSubGroups(),n={};return i.forEach((function(t){n[t.getKey()]=e.getGroupResults(t)})),{top:o.calcs.top?o.calcs.top.getData():{},bottom:o.calcs.bottom?o.calcs.bottom.getData():{},groups:n}},ColumnCalcs.prototype.calculations={avg:function(t,e,o){var i=0,n=void 0!==o.precision?o.precision:2;return t.length&&(i=t.reduce((function(t,e){return Number(t)+Number(e)})),i/=t.length,i=!1!==n?i.toFixed(n):i),parseFloat(i).toString()},max:function(t,e,o){var i=null,n=void 0!==o.precision&&o.precision;return t.forEach((function(t){((t=Number(t))>i||null===i)&&(i=t)})),null!==i?!1!==n?i.toFixed(n):i:""},min:function(t,e,o){var i=null,n=void 0!==o.precision&&o.precision;return t.forEach((function(t){((t=Number(t))<i||null===i)&&(i=t)})),null!==i?!1!==n?i.toFixed(n):i:""},sum:function(t,e,o){var i=0,n=void 0!==o.precision&&o.precision;return t.length&&t.forEach((function(t){t=Number(t),i+=isNaN(t)?0:Number(t)})),!1!==n?i.toFixed(n):i},concat:function(t,e,o){var i=0;return t.length&&(i=t.reduce((function(t,e){return String(t)+String(e)}))),i},count:function(t,e,o){var i=0;return t.length&&t.forEach((function(t){t&&i++})),i}},Tabulator.prototype.registerModule("columnCalcs",ColumnCalcs);var Clipboard=function(t){this.table=t,this.mode=!0,this.pasteParser=function(){},this.pasteAction=function(){},this.customSelection=!1,this.rowRange=!1,this.blocked=!0};Clipboard.prototype.initialize=function(){var t=this;this.mode=this.table.options.clipboard,this.rowRange=this.table.options.clipboardCopyRowRange,!0!==this.mode&&"copy"!==this.mode||this.table.element.addEventListener("copy",(function(e){var o,i;if(!t.blocked){if(e.preventDefault(),t.customSelection)o=t.customSelection,t.table.options.clipboardCopyFormatter&&(o=t.table.options.clipboardCopyFormatter("plain",o));else{var n=t.table.modules.export.generateExportList(t.table.options.clipboardCopyConfig,t.table.options.clipboardCopyStyled,t.rowRange,"clipboard");o=(i=t.table.modules.export.genereateHTMLTable(n))?t.generatePlainContent(n):"",t.table.options.clipboardCopyFormatter&&(o=t.table.options.clipboardCopyFormatter("plain",o),i=t.table.options.clipboardCopyFormatter("html",i))}window.clipboardData&&window.clipboardData.setData?window.clipboardData.setData("Text",o):e.clipboardData&&e.clipboardData.setData?(e.clipboardData.setData("text/plain",o),i&&e.clipboardData.setData("text/html",i)):e.originalEvent&&e.originalEvent.clipboardData.setData&&(e.originalEvent.clipboardData.setData("text/plain",o),i&&e.originalEvent.clipboardData.setData("text/html",i)),t.table.options.clipboardCopied.call(t.table,o,i),t.reset()}})),!0!==this.mode&&"paste"!==this.mode||this.table.element.addEventListener("paste",(function(e){t.paste(e)})),this.setPasteParser(this.table.options.clipboardPasteParser),this.setPasteAction(this.table.options.clipboardPasteAction)},Clipboard.prototype.reset=function(){this.blocked=!0,this.customSelection=!1},Clipboard.prototype.generatePlainContent=function(t){var e=[];return t.forEach((function(t){var o=[];t.columns.forEach((function(e){var i="";if(e)if("group"===t.type&&(e.value=e.component.getKey()),null===e.value)i="";else switch(_typeof(e.value)){case"object":i=JSON.stringify(e.value);break;case"undefined":i="";break;default:i=e.value}o.push(i)})),e.push(o.join("\t"))})),e.join("\n")},Clipboard.prototype.copy=function(t,e){var o,i;this.blocked=!1,this.customSelection=!1,!0!==this.mode&&"copy"!==this.mode||(this.rowRange=t||this.table.options.clipboardCopyRowRange,void 0!==window.getSelection&&void 0!==document.createRange?((t=document.createRange()).selectNodeContents(this.table.element),(o=window.getSelection()).toString()&&e&&(this.customSelection=o.toString()),o.removeAllRanges(),o.addRange(t)):void 0!==document.selection&&void 0!==document.body.createTextRange&&((i=document.body.createTextRange()).moveToElementText(this.table.element),i.select()),document.execCommand("copy"),o&&o.removeAllRanges())},Clipboard.prototype.setPasteAction=function(t){switch(void 0===t?"undefined":_typeof(t)){case"string":this.pasteAction=this.pasteActions[t],this.pasteAction||console.warn("Clipboard Error - No such paste action found:",t);break;case"function":this.pasteAction=t}},Clipboard.prototype.setPasteParser=function(t){switch(void 0===t?"undefined":_typeof(t)){case"string":this.pasteParser=this.pasteParsers[t],this.pasteParser||console.warn("Clipboard Error - No such paste parser found:",t);break;case"function":this.pasteParser=t}},Clipboard.prototype.paste=function(t){var e,o,i;this.checkPaseOrigin(t)&&(e=this.getPasteData(t),(o=this.pasteParser.call(this,e))?(t.preventDefault(),this.table.modExists("mutator")&&(o=this.mutateData(o)),i=this.pasteAction.call(this,o),this.table.options.clipboardPasted.call(this.table,e,o,i)):this.table.options.clipboardPasteError.call(this.table,e))},Clipboard.prototype.mutateData=function(t){var e=this,o=[];return Array.isArray(t)?t.forEach((function(t){o.push(e.table.modules.mutator.transformRow(t,"clipboard"))})):o=t,o},Clipboard.prototype.checkPaseOrigin=function(t){var e=!0;return("DIV"!=t.target.tagName||this.table.modules.edit.currentCell)&&(e=!1),e},Clipboard.prototype.getPasteData=function(t){var e;return window.clipboardData&&window.clipboardData.getData?e=window.clipboardData.getData("Text"):t.clipboardData&&t.clipboardData.getData?e=t.clipboardData.getData("text/plain"):t.originalEvent&&t.originalEvent.clipboardData.getData&&(e=t.originalEvent.clipboardData.getData("text/plain")),e},Clipboard.prototype.pasteParsers={table:function(t){var e=[],o=!0,i=this.table.columnManager.columns,n=[],s=[];return(t=t.split("\n")).forEach((function(t){e.push(t.split("\t"))})),!(!e.length||1===e.length&&e[0].length<2)&&(!0,e[0].forEach((function(t){var e=i.find((function(e){return t&&e.definition.title&&t.trim()&&e.definition.title.trim()===t.trim()}));e?n.push(e):o=!1})),o||(o=!0,n=[],e[0].forEach((function(t){var e=i.find((function(e){return t&&e.field&&t.trim()&&e.field.trim()===t.trim()}));e?n.push(e):o=!1})),o||(n=this.table.columnManager.columnsByIndex)),o&&e.shift(),e.forEach((function(t){var e={};t.forEach((function(t,o){n[o]&&(e[n[o].field]=t)})),s.push(e)})),s)}},Clipboard.prototype.pasteActions={replace:function(t){return this.table.setData(t)},update:function(t){return this.table.updateOrAddData(t)},insert:function(t){return this.table.addData(t)}},Tabulator.prototype.registerModule("clipboard",Clipboard);var DataTree=function(t){this.table=t,this.indent=10,this.field="",this.collapseEl=null,this.expandEl=null,this.branchEl=null,this.elementField=!1,this.startOpen=function(){},this.displayIndex=0};DataTree.prototype.initialize=function(){var t=null,e=this.table.columnManager.getFirstVisibileColumn(),o=this.table.options;switch(this.field=o.dataTreeChildField,this.indent=o.dataTreeChildIndent,this.elementField=o.dataTreeElementColumn||!!e&&e.field,o.dataTreeBranchElement&&(!0===o.dataTreeBranchElement?(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch")):"string"==typeof o.dataTreeBranchElement?((t=document.createElement("div")).innerHTML=o.dataTreeBranchElement,this.branchEl=t.firstChild):this.branchEl=o.dataTreeBranchElement),o.dataTreeCollapseElement?"string"==typeof o.dataTreeCollapseElement?((t=document.createElement("div")).innerHTML=o.dataTreeCollapseElement,this.collapseEl=t.firstChild):this.collapseEl=o.dataTreeCollapseElement:(this.collapseEl=document.createElement("div"),this.collapseEl.classList.add("tabulator-data-tree-control"),this.collapseEl.tabIndex=0,this.collapseEl.innerHTML="<div class='tabulator-data-tree-control-collapse'></div>"),o.dataTreeExpandElement?"string"==typeof o.dataTreeExpandElement?((t=document.createElement("div")).innerHTML=o.dataTreeExpandElement,this.expandEl=t.firstChild):this.expandEl=o.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.tabIndex=0,this.expandEl.innerHTML="<div class='tabulator-data-tree-control-expand'></div>"),_typeof(o.dataTreeStartExpanded)){case"boolean":this.startOpen=function(t,e){return o.dataTreeStartExpanded};break;case"function":this.startOpen=o.dataTreeStartExpanded;break;default:this.startOpen=function(t,e){return o.dataTreeStartExpanded[e]}}},DataTree.prototype.initializeRow=function(t){var e=t.getData()[this.field],o=Array.isArray(e),i=o||!o&&"object"===(void 0===e?"undefined":_typeof(e))&&null!==e;!i&&t.modules.dataTree&&t.modules.dataTree.branchEl&&t.modules.dataTree.branchEl.parentNode.removeChild(t.modules.dataTree.branchEl),!i&&t.modules.dataTree&&t.modules.dataTree.controlEl&&t.modules.dataTree.controlEl.parentNode.removeChild(t.modules.dataTree.controlEl),t.modules.dataTree={index:t.modules.dataTree?t.modules.dataTree.index:0,open:!!i&&(t.modules.dataTree?t.modules.dataTree.open:this.startOpen(t.getComponent(),0)),controlEl:!(!t.modules.dataTree||!i)&&t.modules.dataTree.controlEl,branchEl:!(!t.modules.dataTree||!i)&&t.modules.dataTree.branchEl,parent:!!t.modules.dataTree&&t.modules.dataTree.parent,children:i}},DataTree.prototype.layoutRow=function(t){var e=(this.elementField?t.getCell(this.elementField):t.getCells()[0]).getElement(),o=t.modules.dataTree;o.branchEl&&(o.branchEl.parentNode&&o.branchEl.parentNode.removeChild(o.branchEl),o.branchEl=!1),o.controlEl&&(o.controlEl.parentNode&&o.controlEl.parentNode.removeChild(o.controlEl),o.controlEl=!1),this.generateControlElement(t,e),t.getElement().classList.add("tabulator-tree-level-"+o.index),o.index&&(this.branchEl?(o.branchEl=this.branchEl.cloneNode(!0),e.insertBefore(o.branchEl,e.firstChild),this.table.rtl?o.branchEl.style.marginRight=(o.branchEl.offsetWidth+o.branchEl.style.marginLeft)*(o.index-1)+o.index*this.indent+"px":o.branchEl.style.marginLeft=(o.branchEl.offsetWidth+o.branchEl.style.marginRight)*(o.index-1)+o.index*this.indent+"px"):this.table.rtl?e.style.paddingRight=parseInt(window.getComputedStyle(e,null).getPropertyValue("padding-right"))+o.index*this.indent+"px":e.style.paddingLeft=parseInt(window.getComputedStyle(e,null).getPropertyValue("padding-left"))+o.index*this.indent+"px")},DataTree.prototype.generateControlElement=function(t,e){var o=this,i=t.modules.dataTree,n=(e=e||t.getCells()[0].getElement(),i.controlEl);!1!==i.children&&(i.open?(i.controlEl=this.collapseEl.cloneNode(!0),i.controlEl.addEventListener("click",(function(e){e.stopPropagation(),o.collapseRow(t)}))):(i.controlEl=this.expandEl.cloneNode(!0),i.controlEl.addEventListener("click",(function(e){e.stopPropagation(),o.expandRow(t)}))),i.controlEl.addEventListener("mousedown",(function(t){t.stopPropagation()})),n&&n.parentNode===e?n.parentNode.replaceChild(i.controlEl,n):e.insertBefore(i.controlEl,e.firstChild))},DataTree.prototype.setDisplayIndex=function(t){this.displayIndex=t},DataTree.prototype.getDisplayIndex=function(){return this.displayIndex},DataTree.prototype.getRows=function(t){var e=this,o=[];return t.forEach((function(t,i){var n;o.push(t),t instanceof Row&&(t.create(),(n=t.modules.dataTree.children).index||!1===n.children||e.getChildren(t).forEach((function(t){t.create(),o.push(t)})))})),o},DataTree.prototype.getChildren=function(t,e){var o=this,i=t.modules.dataTree,n=[],s=[];return!1!==i.children&&(i.open||e)&&(Array.isArray(i.children)||(i.children=this.generateChildren(t)),n=this.table.modExists("filter")&&this.table.options.dataTreeFilter?this.table.modules.filter.filter(i.children):i.children,this.table.modExists("sort")&&this.table.options.dataTreeSort&&this.table.modules.sort.sort(n),n.forEach((function(t){s.push(t),o.getChildren(t).forEach((function(t){s.push(t)}))}))),s},DataTree.prototype.generateChildren=function(t){var e=this,o=[],i=t.getData()[this.field];return Array.isArray(i)||(i=[i]),i.forEach((function(i){var n=new Row(i||{},e.table.rowManager);n.create(),n.modules.dataTree.index=t.modules.dataTree.index+1,n.modules.dataTree.parent=t,n.modules.dataTree.children&&(n.modules.dataTree.open=e.startOpen(n.getComponent(),n.modules.dataTree.index)),o.push(n)})),o},DataTree.prototype.expandRow=function(t,e){var o=t.modules.dataTree;!1!==o.children&&(o.open=!0,t.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowExpanded(t.getComponent(),t.modules.dataTree.index))},DataTree.prototype.collapseRow=function(t){var e=t.modules.dataTree;!1!==e.children&&(e.open=!1,t.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowCollapsed(t.getComponent(),t.modules.dataTree.index))},DataTree.prototype.toggleRow=function(t){var e=t.modules.dataTree;!1!==e.children&&(e.open?this.collapseRow(t):this.expandRow(t))},DataTree.prototype.getTreeParent=function(t){return!!t.modules.dataTree.parent&&t.modules.dataTree.parent.getComponent()},DataTree.prototype.getFilteredTreeChildren=function(t){var e=t.modules.dataTree,o=[];return e.children&&(Array.isArray(e.children)||(e.children=this.generateChildren(t)),(this.table.modExists("filter")&&this.table.options.dataTreeFilter?this.table.modules.filter.filter(e.children):e.children).forEach((function(t){t instanceof Row&&o.push(t)}))),o},DataTree.prototype.rowDelete=function(t){var e,o=t.modules.dataTree.parent;o&&(!1!==(e=this.findChildIndex(t,o))&&o.data[this.field].splice(e,1),o.data[this.field].length||delete o.data[this.field],this.initializeRow(o),this.layoutRow(o)),this.table.rowManager.refreshActiveData("tree",!1,!0)},DataTree.prototype.addTreeChildRow=function(t,e,o,i){var n=!1;"string"==typeof e&&(e=JSON.parse(e)),Array.isArray(t.data[this.field])||(t.data[this.field]=[],t.modules.dataTree.open=this.startOpen(t.getComponent(),t.modules.dataTree.index)),void 0!==i&&!1!==(n=this.findChildIndex(i,t))&&t.data[this.field].splice(o?n:n+1,0,e),!1===n&&(o?t.data[this.field].unshift(e):t.data[this.field].push(e)),this.initializeRow(t),this.layoutRow(t),this.table.rowManager.refreshActiveData("tree",!1,!0)},DataTree.prototype.findChildIndex=function(t,e){var o=this,i=!1;return"object"==(void 0===t?"undefined":_typeof(t))?t instanceof Row?i=t.data:t instanceof RowComponent?i=t._getSelf().data:"undefined"!=typeof HTMLElement&&t instanceof HTMLElement&&e.modules.dataTree&&(i=e.modules.dataTree.children.find((function(e){return e instanceof Row&&e.element===t})))&&(i=i.data):i=null!=t&&e.data[this.field].find((function(e){return e.data[o.table.options.index]==t})),i&&(Array.isArray(e.data[this.field])&&(i=e.data[this.field].indexOf(i)),-1==i&&(i=!1)),i},DataTree.prototype.getTreeChildren=function(t,e,o){var i=this,n=t.modules.dataTree,s=[];return n.children&&(Array.isArray(n.children)||(n.children=this.generateChildren(t)),n.children.forEach((function(t){t instanceof Row&&(s.push(e?t.getComponent():t),o&&(s=s.concat(i.getTreeChildren(t,e,o))))}))),s},DataTree.prototype.checkForRestyle=function(t){t.row.cells.indexOf(t)||t.row.reinitialize()},DataTree.prototype.getChildField=function(){return this.field},DataTree.prototype.redrawNeeded=function(t){return!!this.field&&void 0!==t[this.field]||!!this.elementField&&void 0!==t[this.elementField]},Tabulator.prototype.registerModule("dataTree",DataTree);var Download=function(t){this.table=t};Download.prototype.download=function(t,e,o,i,n){var s=this,a=!1;if("function"==typeof t?a=t:s.downloaders[t]?a=s.downloaders[t]:console.warn("Download Error - No such download type found: ",t),a){var r=this.generateExportList(i);a.call(this.table,r,o||{},(function(o,i){n?!0===n?s.triggerDownload(o,i,t,e,!0):n(o):s.triggerDownload(o,i,t,e)}))}},Download.prototype.generateExportList=function(t){var e=this.table.modules.export.generateExportList(this.table.options.downloadConfig,!1,t||this.table.options.downloadRowRange,"download"),o=this.table.options.groupHeaderDownload;return o&&!Array.isArray(o)&&(o=[o]),e.forEach((function(t){var e;"group"===t.type&&(e=t.columns[0],o&&o[t.indent]&&(e.value=o[t.indent](e.value,t.component._group.getRowCount(),t.component._group.getData(),t.component)))})),e},Download.prototype.triggerDownload=function(t,e,o,i,n){var s=document.createElement("a"),a=new Blob([t],{type:e});i=i||"Tabulator."+("function"==typeof o?"txt":o);(a=this.table.options.downloadReady.call(this.table,t,a))&&(n?window.open(window.URL.createObjectURL(a)):navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(a,i):(s.setAttribute("href",window.URL.createObjectURL(a)),s.setAttribute("download",i),s.style.display="none",document.body.appendChild(s),s.click(),document.body.removeChild(s)),this.table.options.downloadComplete&&this.table.options.downloadComplete())},Download.prototype.commsReceived=function(t,e,o){switch(e){case"intercept":this.download(o.type,"",o.options,o.active,o.intercept)}},Download.prototype.downloaders={csv:function(t,e,o){var i=e&&e.delimiter?e.delimiter:",",n=[],s=[];t.forEach((function(t){var e=[];switch(t.type){case"group":console.warn("Download Warning - CSV downloader cannot process row groups");break;case"calc":console.warn("Download Warning - CSV downloader cannot process column calculations");break;case"header":t.columns.forEach((function(t,e){t&&1===t.depth&&(s[e]=void 0===t.value||null===t.value?"":'"'+String(t.value).split('"').join('""')+'"')}));break;case"row":t.columns.forEach((function(t){if(t){switch(_typeof(t.value)){case"object":t.value=JSON.stringify(t.value);break;case"undefined":case"null":t.value=""}e.push('"'+String(t.value).split('"').join('""')+'"')}})),n.push(e.join(i))}})),s.length&&n.unshift(s.join(i)),n=n.join("\n"),e.bom&&(n="\ufeff"+n),o(n,"text/csv")},json:function(t,e,o){var i=[];t.forEach((function(t){var e={};switch(t.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":t.columns.forEach((function(t){t&&(e[t.component.getField()]=t.value)})),i.push(e)}})),o(i=JSON.stringify(i,null,"\t"),"application/json")},pdf:function(t,e,o){var i=[],n=[],s={},a=e.rowGroupStyles||{fontStyle:"bold",fontSize:12,cellPadding:6,fillColor:220},r=e.rowCalcStyles||{fontStyle:"bold",fontSize:10,cellPadding:4,fillColor:232},l=e.jsPDF||{},u=e&&e.title?e.title:"";function c(t,e){var o=[];return t.columns.forEach((function(t){var i;if(t){switch(_typeof(t.value)){case"object":t.value=JSON.stringify(t.value);break;case"undefined":case"null":t.value=""}i={content:t.value,colSpan:t.width,rowSpan:t.height},e&&(i.styles=e),o.push(i)}else o.push("")})),o}l.orientation||(l.orientation=e.orientation||"landscape"),l.unit||(l.unit="pt"),t.forEach((function(t){switch(t.type){case"header":i.push(c(t));break;case"group":n.push(c(t,a));break;case"calc":n.push(c(t,r));break;case"row":n.push(c(t))}}));var d=new jsPDF(l);e&&e.autoTable&&(s="function"==typeof e.autoTable?e.autoTable(d)||{}:e.autoTable),u&&(s.addPageContent=function(t){d.text(u,40,30)}),s.head=i,s.body=n,d.autoTable(s),e&&e.documentProcessing&&e.documentProcessing(d),o(d.output("arraybuffer"),"application/pdf")},xlsx:function(t,e,o){var i=e.sheetName||"Sheet1",n=XLSX.utils.book_new();function s(){var e=[],o=[],i={},n={s:{c:0,r:0},e:{c:t[0]?t[0].columns.reduce((function(t,e){return t+(e&&e.width?e.width:1)}),0):0,r:t.length}};return t.forEach((function(t,i){var n=[];t.columns.forEach((function(t,e){t?(n.push(t.value instanceof Date||"object"!==_typeof(t.value)?t.value:JSON.stringify(t.value)),(t.width>1||t.height>-1)&&o.push({s:{r:i,c:e},e:{r:i+t.height-1,c:e+t.width-1}})):n.push("")})),e.push(n)})),XLSX.utils.sheet_add_aoa(i,e),i["!ref"]=XLSX.utils.encode_range(n),o.length&&(i["!merges"]=o),i}if(n.SheetNames=[],n.Sheets={},e.sheetOnly)o(s());else{if(e.sheets)for(var a in e.sheets)!0===e.sheets[a]?(n.SheetNames.push(a),n.Sheets[a]=s()):(n.SheetNames.push(a),this.modules.comms.send(e.sheets[a],"download","intercept",{type:"xlsx",options:{sheetOnly:!0},active:this.active,intercept:function(t){n.Sheets[a]=t}}));else n.SheetNames.push(i),n.Sheets[i]=s();e.documentProcessing&&(n=e.documentProcessing(n)),o(function(t){for(var e=new ArrayBuffer(t.length),o=new Uint8Array(e),i=0;i!=t.length;++i)o[i]=255&t.charCodeAt(i);return e}(XLSX.write(n,{bookType:"xlsx",bookSST:!0,type:"binary"})),"application/octet-stream")}},html:function(t,e,o){this.modExists("export",!0)&&o(this.modules.export.genereateHTMLTable(t),"text/html")}},Tabulator.prototype.registerModule("download",Download);var Edit=function(t){this.table=t,this.currentCell=!1,this.mouseClick=!1,this.recursionBlock=!1,this.invalidEdit=!1,this.editedCells=[]};Edit.prototype.initializeColumn=function(t){var e={editor:!1,blocked:!1,check:t.definition.editable,params:t.definition.editorParams||{}};switch(_typeof(t.definition.editor)){case"string":"tick"===t.definition.editor&&(t.definition.editor="tickCross",console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor")),this.editors[t.definition.editor]?e.editor=this.editors[t.definition.editor]:console.warn("Editor Error - No such editor found: ",t.definition.editor);break;case"function":e.editor=t.definition.editor;break;case"boolean":!0===t.definition.editor&&("function"!=typeof t.definition.formatter?("tick"===t.definition.formatter&&(t.definition.formatter="tickCross",console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor")),this.editors[t.definition.formatter]?e.editor=this.editors[t.definition.formatter]:e.editor=this.editors.input):console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ",t.definition.formatter))}e.editor&&(t.modules.edit=e)},Edit.prototype.getCurrentCell=function(){return!!this.currentCell&&this.currentCell.getComponent()},Edit.prototype.clearEditor=function(t){var e,o=this.currentCell;if(this.invalidEdit=!1,o){for(this.currentCell=!1,e=o.getElement(),t?o.validate():e.classList.remove("tabulator-validation-fail"),e.classList.remove("tabulator-editing");e.firstChild;)e.removeChild(e.firstChild);o.row.getElement().classList.remove("tabulator-row-editing")}},Edit.prototype.cancelEdit=function(){if(this.currentCell){var t=this.currentCell,e=this.currentCell.getComponent();this.clearEditor(!0),t.setValueActual(t.getValue()),t.cellRendered(),("textarea"==t.column.definition.editor||t.column.definition.variableHeight)&&t.row.normalizeHeight(!0),t.column.cellEvents.cellEditCancelled&&t.column.cellEvents.cellEditCancelled.call(this.table,e),this.table.options.cellEditCancelled.call(this.table,e)}},Edit.prototype.bindEditor=function(t){var e=this,o=t.getElement(!0);o.setAttribute("tabindex",0),o.addEventListener("click",(function(t){o.classList.contains("tabulator-editing")||o.focus({preventScroll:!0})})),o.addEventListener("mousedown",(function(t){2===t.button?t.preventDefault():e.mouseClick=!0})),o.addEventListener("focus",(function(o){e.recursionBlock||e.edit(t,o,!1)}))},Edit.prototype.focusCellNoEvent=function(t,e){this.recursionBlock=!0,e&&"ie"===this.table.browser||t.getElement().focus({preventScroll:!0}),this.recursionBlock=!1},Edit.prototype.editCell=function(t,e){this.focusCellNoEvent(t),this.edit(t,!1,e)},Edit.prototype.focusScrollAdjust=function(t){if("virtual"==this.table.rowManager.getRenderMode()){var e=this.table.rowManager.element.scrollTop,o=this.table.rowManager.element.clientHeight+this.table.rowManager.element.scrollTop,i=t.row.getElement();i.offsetTop;i.offsetTop<e?this.table.rowManager.element.scrollTop-=e-i.offsetTop:i.offsetTop+i.offsetHeight>o&&(this.table.rowManager.element.scrollTop+=i.offsetTop+i.offsetHeight-o);var n=this.table.rowManager.element.scrollLeft,s=this.table.rowManager.element.clientWidth+this.table.rowManager.element.scrollLeft,a=t.getElement();a.offsetLeft;this.table.modExists("frozenColumns")&&(n+=parseInt(this.table.modules.frozenColumns.leftMargin),s-=parseInt(this.table.modules.frozenColumns.rightMargin)),this.table.options.virtualDomHoz&&(n-=parseInt(this.table.vdomHoz.vDomPadLeft),s-=parseInt(this.table.vdomHoz.vDomPadLeft)),a.offsetLeft<n?this.table.rowManager.element.scrollLeft-=n-a.offsetLeft:a.offsetLeft+a.offsetWidth>s&&(this.table.rowManager.element.scrollLeft+=a.offsetLeft+a.offsetWidth-s)}},Edit.prototype.edit=function(t,e,o){var i,n,s,a=this,r=!0,l=function(){},u=t.getElement();if(!this.currentCell){if(t.column.modules.edit.blocked)return this.mouseClick=!1,u.blur(),!1;switch(e&&e.stopPropagation(),_typeof(t.column.modules.edit.check)){case"function":r=t.column.modules.edit.check(t.getComponent());break;case"boolean":r=t.column.modules.edit.check}if(r||o){if(a.cancelEdit(),a.currentCell=t,this.focusScrollAdjust(t),n=t.getComponent(),this.mouseClick&&(this.mouseClick=!1,t.column.cellEvents.cellClick&&t.column.cellEvents.cellClick.call(this.table,e,n)),t.column.cellEvents.cellEditing&&t.column.cellEvents.cellEditing.call(this.table,n),a.table.options.cellEditing.call(this.table,n),s="function"==typeof t.column.modules.edit.params?t.column.modules.edit.params(n):t.column.modules.edit.params,!1===(i=t.column.modules.edit.editor.call(a,n,(function(t){l=t}),(function(e){if(a.currentCell===t){var o=!0;return t.column.modules.validate&&a.table.modExists("validate")&&"manual"!=a.table.options.validationMode&&(o=a.table.modules.validate.validate(t.column.modules.validate,t,e)),!0===o||"highlight"===a.table.options.validationMode?(a.clearEditor(),t.modules.edit||(t.modules.edit={}),t.modules.edit.edited=!0,-1==a.editedCells.indexOf(t)&&a.editedCells.push(t),t.setValue(e,!0),a.table.options.dataTree&&a.table.modExists("dataTree")&&a.table.modules.dataTree.checkForRestyle(t),!0===o||(u.classList.add("tabulator-validation-fail"),a.table.options.validationFailed.call(a.table,t.getComponent(),e,o),!1)):(a.invalidEdit=!0,u.classList.add("tabulator-validation-fail"),a.focusCellNoEvent(t,!0),l(),a.table.options.validationFailed.call(a.table,t.getComponent(),e,o),!1)}}),(function(){a.currentCell===t&&(a.cancelEdit(),a.table.options.dataTree&&a.table.modExists("dataTree")&&a.table.modules.dataTree.checkForRestyle(t))}),s)))return u.blur(),!1;if(!(i instanceof Node))return console.warn("Edit Error - Editor should return an instance of Node, the editor returned:",i),u.blur(),!1;for(u.classList.add("tabulator-editing"),t.row.getElement().classList.add("tabulator-row-editing");u.firstChild;)u.removeChild(u.firstChild);u.appendChild(i),l();for(var c=u.children,d=0;d<c.length;d++)c[d].addEventListener("click",(function(t){t.stopPropagation()}));return!0}return this.mouseClick=!1,u.blur(),!1}this.invalidEdit||this.cancelEdit()},Edit.prototype.maskInput=function(t,e){var o=e.mask,i=void 0!==e.maskLetterChar?e.maskLetterChar:"A",n=void 0!==e.maskNumberChar?e.maskNumberChar:"9",s=void 0!==e.maskWildcardChar?e.maskWildcardChar:"*";function a(e){var r=o[e];void 0!==r&&r!==s&&r!==i&&r!==n&&(t.value=t.value+""+r,a(e+1))}t.addEventListener("keydown",(function(e){var a=t.value.length,r=e.key;if(e.keyCode>46){if(a>=o.length)return e.preventDefault(),e.stopPropagation(),!1,!1;switch(o[a]){case i:if(r.toUpperCase()==r.toLowerCase())return e.preventDefault(),e.stopPropagation(),!1,!1;break;case n:if(isNaN(r))return e.preventDefault(),e.stopPropagation(),!1,!1;break;case s:break;default:if(r!==o[a])return e.preventDefault(),e.stopPropagation(),!1,!1}!0}})),t.addEventListener("keyup",(function(o){o.keyCode>46&&e.maskAutoFill&&a(t.value.length)})),t.placeholder||(t.placeholder=o),e.maskAutoFill&&a(t.value.length)},Edit.prototype.getEditedCells=function(){var t=[];return this.editedCells.forEach((function(e){t.push(e.getComponent())})),t},Edit.prototype.clearEdited=function(t){var e;t.modules.edit&&t.modules.edit.edited&&(t.modules.edit.edited=!1,t.modules.validate&&(t.modules.validate.invalid=!1)),(e=this.editedCells.indexOf(t))>-1&&this.editedCells.splice(e,1)},Edit.prototype.editors={input:function(t,e,o,i,n){var s=t.getValue(),a=document.createElement("input");if(a.setAttribute("type",n.search?"search":"text"),a.style.padding="4px",a.style.width="100%",a.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var r in n.elementAttributes)"+"==r.charAt(0)?(r=r.slice(1),a.setAttribute(r,a.getAttribute(r)+n.elementAttributes["+"+r])):a.setAttribute(r,n.elementAttributes[r]);function l(t){null==s&&""!==a.value||a.value!==s?o(a.value)&&(s=a.value):i()}return a.value=void 0!==s?s:"",e((function(){a.focus({preventScroll:!0}),a.style.height="100%"})),a.addEventListener("change",l),a.addEventListener("blur",l),a.addEventListener("keydown",(function(t){switch(t.keyCode){case 13:l();break;case 27:i();break;case 35:case 36:t.stopPropagation()}})),n.mask&&this.table.modules.edit.maskInput(a,n),a},textarea:function(t,e,o,i,n){var s=t.getValue(),a=n.verticalNavigation||"hybrid",r=String(null!=s?s:""),l=((r.match(/(?:\r\n|\r|\n)/g)||[]).length,document.createElement("textarea")),u=0;if(l.style.display="block",l.style.padding="2px",l.style.height="100%",l.style.width="100%",l.style.boxSizing="border-box",l.style.whiteSpace="pre-wrap",l.style.resize="none",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var c in n.elementAttributes)"+"==c.charAt(0)?(c=c.slice(1),l.setAttribute(c,l.getAttribute(c)+n.elementAttributes["+"+c])):l.setAttribute(c,n.elementAttributes[c]);function d(e){null==s&&""!==l.value||l.value!==s?(o(l.value)&&(s=l.value),setTimeout((function(){t.getRow().normalizeHeight()}),300)):i()}return l.value=r,e((function(){l.focus({preventScroll:!0}),l.style.height="100%",l.scrollHeight,l.style.height=l.scrollHeight+"px",t.getRow().normalizeHeight()})),l.addEventListener("change",d),l.addEventListener("blur",d),l.addEventListener("keyup",(function(){l.style.height="";var e=l.scrollHeight;l.style.height=e+"px",e!=u&&(u=e,t.getRow().normalizeHeight())})),l.addEventListener("keydown",(function(t){switch(t.keyCode){case 27:i();break;case 38:("editor"==a||"hybrid"==a&&l.selectionStart)&&(t.stopImmediatePropagation(),t.stopPropagation());break;case 40:("editor"==a||"hybrid"==a&&l.selectionStart!==l.value.length)&&(t.stopImmediatePropagation(),t.stopPropagation());break;case 35:case 36:t.stopPropagation()}})),n.mask&&this.table.modules.edit.maskInput(l,n),l},number:function(t,e,o,i,n){var s=t.getValue(),a=n.verticalNavigation||"editor",r=document.createElement("input");if(r.setAttribute("type","number"),void 0!==n.max&&r.setAttribute("max",n.max),void 0!==n.min&&r.setAttribute("min",n.min),void 0!==n.step&&r.setAttribute("step",n.step),r.style.padding="4px",r.style.width="100%",r.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var l in n.elementAttributes)"+"==l.charAt(0)?(l=l.slice(1),r.setAttribute(l,r.getAttribute(l)+n.elementAttributes["+"+l])):r.setAttribute(l,n.elementAttributes[l]);r.value=s;var u=function(t){c()};function c(){var t=r.value;isNaN(t)||""===t||(t=Number(t)),t!==s?o(t)&&(s=t):i()}return e((function(){r.removeEventListener("blur",u),r.focus({preventScroll:!0}),r.style.height="100%",r.addEventListener("blur",u)})),r.addEventListener("keydown",(function(t){switch(t.keyCode){case 13:c();break;case 27:i();break;case 38:case 40:"editor"==a&&(t.stopImmediatePropagation(),t.stopPropagation());break;case 35:case 36:t.stopPropagation()}})),n.mask&&this.table.modules.edit.maskInput(r,n),r},range:function(t,e,o,i,n){var s=t.getValue(),a=document.createElement("input");if(a.setAttribute("type","range"),void 0!==n.max&&a.setAttribute("max",n.max),void 0!==n.min&&a.setAttribute("min",n.min),void 0!==n.step&&a.setAttribute("step",n.step),a.style.padding="4px",a.style.width="100%",a.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var r in n.elementAttributes)"+"==r.charAt(0)?(r=r.slice(1),a.setAttribute(r,a.getAttribute(r)+n.elementAttributes["+"+r])):a.setAttribute(r,n.elementAttributes[r]);function l(){var t=a.value;isNaN(t)||""===t||(t=Number(t)),t!=s?o(t)&&(s=t):i()}return a.value=s,e((function(){a.focus({preventScroll:!0}),a.style.height="100%"})),a.addEventListener("blur",(function(t){l()})),a.addEventListener("keydown",(function(t){switch(t.keyCode){case 13:l();break;case 27:i()}})),a},select:function(t,e,o,i,n){var s=this,a=this,r=t.getElement(),l=t.getValue(),u=n.verticalNavigation||"editor",c=void 0!==l||null===l?Array.isArray(l)?l:[l]:void 0!==n.defaultValue?n.defaultValue:[],d=document.createElement("input"),h=document.createElement("div"),p=n.multiselect,m=[],f={},g=[],b=[],v=!0,w=!1,y="",C=null;function E(e){var o,i={},n=a.table.getData();return(o=e?a.table.columnManager.getColumnByField(e):t.getColumn()._getSelf())?n.forEach((function(t){var e=o.getFieldValue(t);null!=e&&""!==e&&(i[e]=!0)})):console.warn("unable to find matching column to create select lookup list:",e),Object.keys(i)}function R(e,o){var i=[],s=[];function a(t){t={label:t.label,value:t.value,itemParams:t.itemParams,elementAttributes:t.elementAttributes,element:!1};return o.indexOf(t.value)>-1&&M(t),i.push(t),s.push(t),t}if("function"==typeof e&&(e=e(t)),Array.isArray(e))e.forEach((function(t){var e;"object"===(void 0===t?"undefined":_typeof(t))?t.options?(e={label:t.label,group:!0,itemParams:t.itemParams,elementAttributes:t.elementAttributes,element:!1},s.push(e),t.options.forEach((function(t){a(t)}))):a(t):(e={label:t,value:t,element:!1},o.indexOf(e.value)>-1&&M(e),i.push(e),s.push(e))}));else for(var r in e){var l={label:e[r],value:r,element:!1};o.indexOf(l.value)>-1&&M(l),i.push(l),s.push(l)}n.sortValuesList&&(i.sort((function(t,e){return t.label<e.label?-1:t.label>e.label?1:0})),s.sort((function(t,e){return t.label<e.label?-1:t.label>e.label?1:0})),"asc"!==n.sortValuesList&&(i.reverse(),s.reverse())),m=i,g=s,function(){for(;h.firstChild;)h.removeChild(h.firstChild);g.forEach((function(e){var o=e.element;if(!o){if(o=document.createElement("div"),e.label=n.listItemFormatter?n.listItemFormatter(e.value,e.label,t,o,e.itemParams):e.label,e.group?(o.classList.add("tabulator-edit-select-list-group"),o.tabIndex=0,o.innerHTML=""===e.label?" ":e.label):(o.classList.add("tabulator-edit-select-list-item"),o.tabIndex=0,o.innerHTML=""===e.label?" ":e.label,o.addEventListener("click",(function(){w=!0,setTimeout((function(){w=!1}),10),p?(L(e),d.focus()):D(e)})),b.indexOf(e)>-1&&o.classList.add("active")),e.elementAttributes&&"object"==_typeof(e.elementAttributes))for(var i in e.elementAttributes)"+"==i.charAt(0)?(i=i.slice(1),o.setAttribute(i,d.getAttribute(i)+e.elementAttributes["+"+i])):o.setAttribute(i,e.elementAttributes[i]);o.addEventListener("mousedown",(function(){v=!1,setTimeout((function(){v=!0}),10)})),e.element=o}h.appendChild(o)}))}()}function x(t,e){!p&&f&&f.element&&f.element.classList.remove("active"),f&&f.element&&f.element.classList.remove("focused"),f=t,t.element&&(t.element.classList.add("focused"),e&&t.element.classList.add("active")),t&&t.element&&t.element.scrollIntoView&&t.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}function M(t){-1==b.indexOf(t)&&(b.push(t),x(t,!0)),k()}function T(t){var e=b[t];t>-1&&(b.splice(t,1),e.element&&e.element.classList.remove("active"))}function L(t){t||(t=f);var e=b.indexOf(t);e>-1?T(e):(!0!==p&&b.length>=p&&T(0),M(t)),k()}function D(t){H(),t||(t=f),t&&(d.value=t.label,o(t.value)),c=[t.value]}function z(t){t||H();var e=[];b.forEach((function(t){e.push(t.value)})),c=e,o(e)}function k(){var t=[];b.forEach((function(e){t.push(e.label)})),d.value=t.join(", "),!1===a.currentCell&&z(!0)}function S(){H(),i()}function H(){h.parentNode&&h.parentNode.removeChild(h),a.table.rowManager.element.removeEventListener("scroll",S)}if((Array.isArray(n)||!Array.isArray(n)&&"object"===(void 0===n?"undefined":_typeof(n))&&!n.values)&&(console.warn("DEPRECATION WARNING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object"),n={values:n}),d.setAttribute("type","text"),d.style.padding="4px",d.style.width="100%",d.style.boxSizing="border-box",d.style.cursor="default",d.readOnly=0!=this.currentCell,n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var P in n.elementAttributes)"+"==P.charAt(0)?(P=P.slice(1),d.setAttribute(P,d.getAttribute(P)+n.elementAttributes["+"+P])):d.setAttribute(P,n.elementAttributes[P]);return d.value=void 0!==l||null===l?l:"",d.addEventListener("search",(function(t){d.value||(!function(){for(var t=b.length,e=0;e<t;e++)T(0)}(),z())})),d.addEventListener("keydown",(function(t){var e;switch(t.keyCode){case 38:e=m.indexOf(f),("editor"==u||"hybrid"==u&&e)&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault(),e>0&&x(m[e-1],!p));break;case 40:e=m.indexOf(f),("editor"==u||"hybrid"==u&&e<m.length-1)&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault(),e<m.length-1&&x(-1==e?m[0]:m[e+1],!p));break;case 37:case 39:t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault();break;case 13:p?L():D();break;case 27:S();break;case 9:break;default:!1===a.currentCell&&t.preventDefault(),t.keyCode>=38&&t.keyCode<=90&&function(t){clearTimeout(C);var e=String.fromCharCode(event.keyCode).toLowerCase();y+=e.toLowerCase();var o=m.find((function(t){return void 0!==t.label&&t.label.toLowerCase().startsWith(y)}));o&&x(o,!p),C=setTimeout((function(){y=""}),800)}(t.keyCode)}})),d.addEventListener("blur",(function(t){v&&(p?z():S())})),d.addEventListener("focus",(function(t){w||function(){if(b=[],!h.parentNode){!0===n.values?R(E(),c):"string"==typeof n.values?R(E(n.values),c):R(n.values||[],c);var t=Tabulator.prototype.helpers.elOffset(r);h.style.minWidth=r.offsetWidth+"px",h.style.top=t.top+r.offsetHeight+"px",h.style.left=t.left+"px",h.addEventListener("mousedown",(function(t){v=!1,setTimeout((function(){v=!0}),10)})),document.body.appendChild(h)}}()})),(h=document.createElement("div")).classList.add("tabulator-edit-select-list"),e((function(){d.style.height="100%",d.focus({preventScroll:!0})})),setTimeout((function(){s.table.rowManager.element.addEventListener("scroll",S)}),10),d},autocomplete:function(t,e,o,i,n){var s=this,a=this,r=t.getElement(),l=t.getValue(),u=n.verticalNavigation||"editor",c=void 0!==l||null===l?l:void 0!==n.defaultValue?n.defaultValue:"",d=document.createElement("input"),h=document.createElement("div"),p=[],m=!1,f=!0,g=!1;if(d.setAttribute("type","search"),d.style.padding="4px",d.style.width="100%",d.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var b in n.elementAttributes)"+"==b.charAt(0)?(b=b.slice(1),d.setAttribute(b,d.getAttribute(b)+n.elementAttributes["+"+b])):d.setAttribute(b,n.elementAttributes[b]);function v(){!0===n.values?g=w():"string"==typeof n.values&&(g=w(n.values))}function w(e){var o,i={},s=a.table.getData();return(o=e?a.table.columnManager.getColumnByField(e):t.getColumn()._getSelf())?(s.forEach((function(t){var e=o.getFieldValue(t);null!=e&&""!==e&&(i[e]=!0)})),i=n.sortValuesList?"asc"==n.sortValuesList?Object.keys(i).sort():Object.keys(i).sort().reverse():Object.keys(i)):console.warn("unable to find matching column to create autocomplete lookup list:",e),i}function y(t,e){var o,i,s=[];o=g||(n.values||[]),n.searchFunc?(s=n.searchFunc(t,o))instanceof Promise?(C(void 0!==n.searchingPlaceholder?n.searchingPlaceholder:"Searching..."),s.then((function(t){x(E(t),e)})).catch((function(t){console.err("error in autocomplete search promise:",t)}))):x(E(s),e):(i=E(o),""===t?n.showListOnEmpty&&(s=i):i.forEach((function(e){null===e.value&&void 0===e.value||(String(e.value).toLowerCase().indexOf(String(t).toLowerCase())>-1||String(e.title).toLowerCase().indexOf(String(t).toLowerCase())>-1)&&s.push(e)})),x(s,e))}function C(t){var e=document.createElement("div");R(),!1!==t&&(e.classList.add("tabulator-edit-select-list-notice"),e.tabIndex=0,t instanceof Node?e.appendChild(t):e.innerHTML=t,h.appendChild(e))}function E(t){var e=[];if(Array.isArray(t))t.forEach((function(t){var o={};"object"===(void 0===t?"undefined":_typeof(t))?(o.title=n.listItemFormatter?n.listItemFormatter(t.value,t.label):t.label,o.value=t.value):(o.title=n.listItemFormatter?n.listItemFormatter(t,t):t,o.value=t),e.push(o)}));else for(var o in t){var i={title:n.listItemFormatter?n.listItemFormatter(o,t[o]):t[o],value:o};e.push(i)}return e}function R(){for(;h.firstChild;)h.removeChild(h.firstChild)}function x(t,e){t.length?function(t,e){var o=!1;R(),(p=t).forEach((function(t){var i=t.element;i||((i=document.createElement("div")).classList.add("tabulator-edit-select-list-item"),i.tabIndex=0,i.innerHTML=t.title,i.addEventListener("click",(function(e){T(t),M()})),i.addEventListener("mousedown",(function(t){f=!1,setTimeout((function(){f=!0}),10)})),t.element=i,e&&t.value==l&&(d.value=t.title,t.element.classList.add("active"),o=!0),t===m&&(t.element.classList.add("active"),o=!0)),h.appendChild(i)})),o||T(!1)}(t,e):n.emptyPlaceholder&&C(n.emptyPlaceholder)}function M(){L(),m?l!==m.value?(l=m.value,d.value=m.title,o(m.value)):i():n.freetext||n.allowEmpty&&""===d.value?(l=d.value,o(d.value)):i()}function T(t,e){m&&m.element&&m.element.classList.remove("active"),m=t,t&&t.element&&t.element.classList.add("active"),t&&t.element&&t.element.scrollIntoView&&t.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}function L(){h.parentNode&&h.parentNode.removeChild(h),a.table.rowManager.element.removeEventListener("scroll",D)}function D(){L(),i()}return h.classList.add("tabulator-edit-select-list"),h.addEventListener("mousedown",(function(t){f=!1,setTimeout((function(){f=!0}),10)})),d.addEventListener("keydown",(function(t){var e;switch(t.keyCode){case 38:e=p.indexOf(m),("editor"==u||"hybrid"==u&&e)&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault(),T(e>0&&p[e-1]));break;case 40:e=p.indexOf(m),("editor"==u||"hybrid"==u&&e<p.length-1)&&(t.stopImmediatePropagation(),t.stopPropagation(),t.preventDefault(),e<p.length-1&&T(-1==e?p[0]:p[e+1]));break;case 37:case 39:t.stopImmediatePropagation(),t.stopPropagation();break;case 13:M();break;case 27:D();break;case 36:case 35:t.stopImmediatePropagation()}})),d.addEventListener("keyup",(function(t){switch(t.keyCode){case 38:case 37:case 39:case 40:case 13:case 27:break;default:y(d.value)}})),d.addEventListener("search",(function(t){y(d.value)})),d.addEventListener("blur",(function(t){f&&M()})),d.addEventListener("focus",(function(t){var e=c;v(),function(){if(!h.parentNode){for(console.log("show",c);h.firstChild;)h.removeChild(h.firstChild);var t=Tabulator.prototype.helpers.elOffset(r);h.style.minWidth=r.offsetWidth+"px",h.style.top=t.top+r.offsetHeight+"px",h.style.left=t.left+"px",document.body.appendChild(h)}}(),d.value=e,y(e,!0)})),e((function(){d.style.height="100%",d.focus({preventScroll:!0})})),n.mask&&this.table.modules.edit.maskInput(d,n),setTimeout((function(){s.table.rowManager.element.addEventListener("scroll",D)}),10),v(),d.value=c,y(c,!0),d},star:function(t,e,o,i,n){var s=this,a=t.getElement(),r=t.getValue(),l=a.getElementsByTagName("svg").length||5,u=a.getElementsByTagName("svg")[0]?a.getElementsByTagName("svg")[0].getAttribute("width"):14,c=[],d=document.createElement("div"),h=document.createElementNS("http://www.w3.org/2000/svg","svg");function p(t){c.forEach((function(e,o){o<t?("ie"==s.table.browser?e.setAttribute("class","tabulator-star-active"):e.classList.replace("tabulator-star-inactive","tabulator-star-active"),e.innerHTML='<polygon fill="#488CE9" stroke="#014AAE" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>'):("ie"==s.table.browser?e.setAttribute("class","tabulator-star-inactive"):e.classList.replace("tabulator-star-active","tabulator-star-inactive"),e.innerHTML='<polygon fill="#010155" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>')}))}function m(t){var e=document.createElement("span"),i=h.cloneNode(!0);c.push(i),e.addEventListener("mouseenter",(function(e){e.stopPropagation(),e.stopImmediatePropagation(),p(t)})),e.addEventListener("mousemove",(function(t){t.stopPropagation(),t.stopImmediatePropagation()})),e.addEventListener("click",(function(e){e.stopPropagation(),e.stopImmediatePropagation(),o(t),a.blur()})),e.appendChild(i),d.appendChild(e)}function f(t){r=t,p(t)}if(a.style.whiteSpace="nowrap",a.style.overflow="hidden",a.style.textOverflow="ellipsis",d.style.verticalAlign="middle",d.style.display="inline-block",d.style.padding="4px",h.setAttribute("width",u),h.setAttribute("height",u),h.setAttribute("viewBox","0 0 512 512"),h.setAttribute("xml:space","preserve"),h.style.padding="0 1px",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var g in n.elementAttributes)"+"==g.charAt(0)?(g=g.slice(1),d.setAttribute(g,d.getAttribute(g)+n.elementAttributes["+"+g])):d.setAttribute(g,n.elementAttributes[g]);for(var b=1;b<=l;b++)m(b);return p(r=Math.min(parseInt(r),l)),d.addEventListener("mousemove",(function(t){p(0)})),d.addEventListener("click",(function(t){o(0)})),a.addEventListener("blur",(function(t){i()})),a.addEventListener("keydown",(function(t){switch(t.keyCode){case 39:f(r+1);break;case 37:f(r-1);break;case 13:o(r);break;case 27:i()}})),d},progress:function(t,e,o,i,n){var s,a,r=t.getElement(),l=void 0===n.max?r.getElementsByTagName("div")[0].getAttribute("max")||100:n.max,u=void 0===n.min?r.getElementsByTagName("div")[0].getAttribute("min")||0:n.min,c=(l-u)/100,d=t.getValue()||0,h=document.createElement("div"),p=document.createElement("div");function m(){var t=window.getComputedStyle(r,null),e=c*Math.round(p.offsetWidth/((r.clientWidth-parseInt(t.getPropertyValue("padding-left"))-parseInt(t.getPropertyValue("padding-right")))/100))+u;o(e),r.setAttribute("aria-valuenow",e),r.setAttribute("aria-label",d)}if(h.style.position="absolute",h.style.right="0",h.style.top="0",h.style.bottom="0",h.style.width="5px",h.classList.add("tabulator-progress-handle"),p.style.display="inline-block",p.style.position="relative",p.style.height="100%",p.style.backgroundColor="#488CE9",p.style.maxWidth="100%",p.style.minWidth="0%",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var f in n.elementAttributes)"+"==f.charAt(0)?(f=f.slice(1),p.setAttribute(f,p.getAttribute(f)+n.elementAttributes["+"+f])):p.setAttribute(f,n.elementAttributes[f]);return r.style.padding="4px 4px",d=Math.min(parseFloat(d),l),d=Math.max(parseFloat(d),u),d=Math.round((d-u)/c),p.style.width=d+"%",r.setAttribute("aria-valuemin",u),r.setAttribute("aria-valuemax",l),p.appendChild(h),h.addEventListener("mousedown",(function(t){s=t.screenX,a=p.offsetWidth})),h.addEventListener("mouseover",(function(){h.style.cursor="ew-resize"})),r.addEventListener("mousemove",(function(t){s&&(p.style.width=a+t.screenX-s+"px")})),r.addEventListener("mouseup",(function(t){s&&(t.stopPropagation(),t.stopImmediatePropagation(),s=!1,a=!1,m())})),r.addEventListener("keydown",(function(t){switch(t.keyCode){case 39:t.preventDefault(),p.style.width=p.clientWidth+r.clientWidth/100+"px";break;case 37:t.preventDefault(),p.style.width=p.clientWidth-r.clientWidth/100+"px";break;case 9:case 13:m();break;case 27:i()}})),r.addEventListener("blur",(function(){i()})),p},tickCross:function(t,e,o,i,n){var s=t.getValue(),a=document.createElement("input"),r=n.tristate,l=void 0===n.indeterminateValue?null:n.indeterminateValue,u=!1;if(a.setAttribute("type","checkbox"),a.style.marginTop="5px",a.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var c in n.elementAttributes)"+"==c.charAt(0)?(c=c.slice(1),a.setAttribute(c,a.getAttribute(c)+n.elementAttributes["+"+c])):a.setAttribute(c,n.elementAttributes[c]);function d(t){return r?t?u?l:a.checked:a.checked&&!u?(a.checked=!1,a.indeterminate=!0,u=!0,l):(u=!1,a.checked):a.checked}return a.value=s,!r||void 0!==s&&s!==l&&""!==s||(u=!0,a.indeterminate=!0),"firefox"!=this.table.browser&&e((function(){a.focus({preventScroll:!0})})),a.checked=!0===s||"true"===s||"True"===s||1===s,e((function(){a.focus()})),a.addEventListener("change",(function(t){o(d())})),a.addEventListener("blur",(function(t){o(d(!0))})),a.addEventListener("keydown",(function(t){13==t.keyCode&&o(d()),27==t.keyCode&&i()})),a}},Tabulator.prototype.registerModule("edit",Edit);var ExportRow=function(t,e,o,i){this.type=t,this.columns=e,this.component=o||!1,this.indent=i||0},ExportColumn=function(t,e,o,i,n){this.value=t,this.component=e||!1,this.width=o,this.height=i,this.depth=n},Export=function(t){this.table=t,this.config={},this.cloneTableStyle=!0,this.colVisProp=""};Export.prototype.generateExportList=function(t,e,o,i){this.cloneTableStyle=e,this.config=t||{},this.colVisProp=i;var n=!1!==this.config.columnHeaders?this.headersToExportRows(this.generateColumnGroupHeaders()):[],s=this.bodyToExportRows(this.rowLookup(o));return n.concat(s)},Export.prototype.genereateTable=function(t,e,o,i){var n=this.generateExportList(t,e,o,i);return this.genereateTableElement(n)},Export.prototype.rowLookup=function(t){var e=this,o=[];if("function"==typeof t)t.call(this.table).forEach((function(t){(t=e.table.rowManager.findRow(t))&&o.push(t)}));else switch(t){case!0:case"visible":o=this.table.rowManager.getVisibleRows(!0);break;case"all":o=this.table.rowManager.rows;break;case"selected":o=this.table.modules.selectRow.selectedRows;break;case"active":default:o=this.table.options.pagination?this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length-2):this.table.rowManager.getDisplayRows()}return Object.assign([],o)},Export.prototype.generateColumnGroupHeaders=function(){var t=this,e=[];return(!1!==this.config.columnGroups?this.table.columnManager.columns:this.table.columnManager.columnsByIndex).forEach((function(o){var i=t.processColumnGroup(o);i&&e.push(i)})),e},Export.prototype.processColumnGroup=function(t){var e=this,o=t.columns,i=0,n={title:t.definition["title"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))]||t.definition.title,column:t,depth:1};if(o.length){if(n.subGroups=[],n.width=0,o.forEach((function(t){var o=e.processColumnGroup(t);o&&(n.width+=o.width,n.subGroups.push(o),o.depth>i&&(i=o.depth))})),n.depth+=i,!n.width)return!1}else{if(!this.columnVisCheck(t))return!1;n.width=1}return n},Export.prototype.columnVisCheck=function(t){return!1!==t.definition[this.colVisProp]&&(t.visible||!t.visible&&t.definition[this.colVisProp])},Export.prototype.headersToExportRows=function(t){var e=[],o=0,i=[];return t.forEach((function(t){t.depth>o&&(o=t.depth)})),t.forEach((function(t){!function t(i,n){var s=o-n;if(void 0===e[n]&&(e[n]=[]),i.height=i.subGroups?1:s-i.depth+1,e[n].push(i),i.height>1)for(var a=1;a<i.height;a++)void 0===e[n+a]&&(e[n+a]=[]),e[n+a].push(!1);if(i.width>1)for(var r=1;r<i.width;r++)e[n].push(!1);i.subGroups&&i.subGroups.forEach((function(e){t(e,n+1)}))}(t,0)})),e.forEach((function(t){var e=[];t.forEach((function(t){t?e.push(new ExportColumn(t.title,t.column.getComponent(),t.width,t.height,t.depth)):e.push(null)})),i.push(new ExportRow("header",e))})),i},Export.prototype.bodyToExportRows=function(t){var e=this,o=[],i=[];return this.table.columnManager.columnsByIndex.forEach((function(t){e.columnVisCheck(t)&&o.push(t.getComponent())})),!1!==this.config.columnCalcs&&this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&t.unshift(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&t.push(this.table.modules.columnCalcs.botRow)),(t=t.filter((function(t){switch(t.type){case"group":return!1!==e.config.rowGroups;case"calc":return!1!==e.config.columnCalcs;case"row":return!(e.table.options.dataTree&&!1===e.config.dataTree&&t.modules.dataTree.parent)}return!0}))).forEach((function(t,n){var s=t.getData(e.colVisProp),a=[],r=0;switch(t.type){case"group":r=t.level,a.push(new ExportColumn(t.key,t.getComponent(),o.length,1));break;case"calc":case"row":o.forEach((function(t){a.push(new ExportColumn(t._column.getFieldValue(s),t,1,1))})),e.table.options.dataTree&&!1!==e.config.dataTree&&(r=t.modules.dataTree.index)}i.push(new ExportRow(t.type,a,t.getComponent(),r))})),i},Export.prototype.genereateTableElement=function(t){var e=this,o=document.createElement("table"),i=document.createElement("thead"),n=document.createElement("tbody"),s=this.lookupTableStyles(),a=this.table.options["rowFormatter"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],r={};return r.rowFormatter=null!==a?a:this.table.options.rowFormatter,this.table.options.dataTree&&!1!==this.config.dataTree&&this.table.modExists("columnCalcs")&&(r.treeElementField=this.table.modules.dataTree.elementField),r.groupHeader=this.table.options["groupHeader"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],r.groupHeader&&!Array.isArray(r.groupHeader)&&(r.groupHeader=[r.groupHeader]),o.classList.add("tabulator-print-table"),this.mapElementStyles(this.table.columnManager.getHeadersElement(),i,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),t.length>1e3&&console.warn("It may take a long time to render an HTML table with more than 1000 rows"),t.forEach((function(t,o){switch(t.type){case"header":i.appendChild(e.genereateHeaderElement(t,r,s));break;case"group":n.appendChild(e.genereateGroupElement(t,r,s));break;case"calc":n.appendChild(e.genereateCalcElement(t,r,s));break;case"row":var a=e.genereateRowElement(t,r,s);e.mapElementStyles(o%2&&s.evenRow?s.evenRow:s.oddRow,a,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),n.appendChild(a)}})),i.innerHTML&&o.appendChild(i),o.appendChild(n),this.mapElementStyles(this.table.element,o,["border-top","border-left","border-right","border-bottom"]),o},Export.prototype.lookupTableStyles=function(){var t={};return this.cloneTableStyle&&window.getComputedStyle&&(t.oddRow=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),t.evenRow=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),t.calcRow=this.table.element.querySelector(".tabulator-row.tabulator-calcs"),t.firstRow=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),t.firstGroup=this.table.element.getElementsByClassName("tabulator-group")[0],t.firstRow&&(t.styleCells=t.firstRow.getElementsByClassName("tabulator-cell"),t.firstCell=t.styleCells[0],t.lastCell=t.styleCells[t.styleCells.length-1])),t},Export.prototype.genereateHeaderElement=function(t,e,o){var i=this,n=document.createElement("tr");return t.columns.forEach((function(t){if(t){var e=document.createElement("th"),o=t.component._column.definition.cssClass?t.component._column.definition.cssClass.split(" "):[];e.colSpan=t.width,e.rowSpan=t.height,e.innerHTML=t.value,i.cloneTableStyle&&(e.style.boxSizing="border-box"),o.forEach((function(t){e.classList.add(t)})),i.mapElementStyles(t.component.getElement(),e,["text-align","border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),i.mapElementStyles(t.component._column.contentElement,e,["padding-top","padding-left","padding-right","padding-bottom"]),t.component._column.visible?i.mapElementStyles(t.component.getElement(),e,["width"]):t.component._column.definition.width&&(e.style.width=t.component._column.definition.width+"px"),t.component._column.parent&&i.mapElementStyles(t.component._column.parent.groupElement,e,["border-top"]),n.appendChild(e)}})),n},Export.prototype.genereateGroupElement=function(t,e,o){var i=document.createElement("tr"),n=document.createElement("td"),s=t.columns[0];return i.classList.add("tabulator-print-table-row"),e.groupHeader&&e.groupHeader[t.indent]?s.value=e.groupHeader[t.indent](s.value,t.component._group.getRowCount(),t.component._group.getData(),t.component):!1===e.groupHeader?s.value=s.value:s.value=t.component._group.generator(s.value,t.component._group.getRowCount(),t.component._group.getData(),t.component),n.colSpan=s.width,n.innerHTML=s.value,i.classList.add("tabulator-print-table-group"),i.classList.add("tabulator-group-level-"+t.indent),s.component.isVisible()&&i.classList.add("tabulator-group-visible"),this.mapElementStyles(o.firstGroup,i,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),this.mapElementStyles(o.firstGroup,n,["padding-top","padding-left","padding-right","padding-bottom"]),i.appendChild(n),i},Export.prototype.genereateCalcElement=function(t,e,o){var i=this.genereateRowElement(t,e,o);return i.classList.add("tabulator-print-table-calcs"),this.mapElementStyles(o.calcRow,i,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),i},Export.prototype.genereateRowElement=function(t,e,o){var n=this,s=document.createElement("tr");return s.classList.add("tabulator-print-table-row"),t.columns.forEach((function(a){if(a){var r=document.createElement("td"),l=a.component._column,u=a.value,c={modules:{},getValue:function(){return u},getField:function(){return l.definition.field},getElement:function(){return r},getColumn:function(){return l.getComponent()},getData:function(){return t.component.getData()},getRow:function(){return t.component},getComponent:function(){return c},column:l};if((l.definition.cssClass?l.definition.cssClass.split(" "):[]).forEach((function(t){r.classList.add(t)})),n.table.modExists("format")&&!1!==n.config.formatCells)u=n.table.modules.format.formatExportValue(c,n.colVisProp);else switch(void 0===u?"undefined":_typeof(u)){case"object":u=JSON.stringify(u);break;case"undefined":case"null":u="";break;default:u=u}u instanceof Node?r.appendChild(u):r.innerHTML=u,o.firstCell&&(n.mapElementStyles(o.firstCell,r,["padding-top","padding-left","padding-right","padding-bottom","border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size"]),l.definition.align&&(r.style.textAlign=l.definition.align)),n.table.options.dataTree&&!1!==n.config.dataTree&&(e.treeElementField&&e.treeElementField==l.field||!e.treeElementField&&0==i)&&(t.component._row.modules.dataTree.controlEl&&r.insertBefore(t.component._row.modules.dataTree.controlEl.cloneNode(!0),r.firstChild),t.component._row.modules.dataTree.branchEl&&r.insertBefore(t.component._row.modules.dataTree.branchEl.cloneNode(!0),r.firstChild)),s.appendChild(r),c.modules.format&&c.modules.format.renderedCallback&&c.modules.format.renderedCallback(),e.rowFormatter&&!1!==n.config.formatCells&&e.rowFormatter(t.component)}})),s},Export.prototype.genereateHTMLTable=function(t){var e=document.createElement("div");return e.appendChild(this.genereateTableElement(t)),e.innerHTML},Export.prototype.getHtml=function(t,e,o,i){var n=this.generateExportList(o||this.table.options.htmlOutputConfig,e,t,i||"htmlOutput");return this.genereateHTMLTable(n)},Export.prototype.mapElementStyles=function(t,e,o){if(this.cloneTableStyle&&t&&e){var i={"background-color":"backgroundColor",color:"fontColor",width:"width","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","text-align":"textAlign","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom","padding-top":"paddingTop","padding-left":"paddingLeft","padding-right":"paddingRight","padding-bottom":"paddingBottom"};if(window.getComputedStyle){var n=window.getComputedStyle(t);o.forEach((function(t){e.style[i[t]]=n.getPropertyValue(t)}))}}},Tabulator.prototype.registerModule("export",Export);var Filter=function(t){this.table=t,this.filterList=[],this.headerFilters={},this.headerFilterColumns=[],this.prevHeaderFilterChangeCheck="",this.prevHeaderFilterChangeCheck="{}",this.changed=!1};Filter.prototype.initializeColumn=function(t,e){var o=this,i=t.getField();t.modules.filter={success:function(e){var n,s="input"==t.modules.filter.tagType&&"text"==t.modules.filter.attrType||"textarea"==t.modules.filter.tagType?"partial":"match",a="",r="";if(void 0===t.modules.filter.prevSuccess||t.modules.filter.prevSuccess!==e){if(t.modules.filter.prevSuccess=e,t.modules.filter.emptyFunc(e))delete o.headerFilters[i];else{switch(t.modules.filter.value=e,_typeof(t.definition.headerFilterFunc)){case"string":o.filters[t.definition.headerFilterFunc]?(a=t.definition.headerFilterFunc,n=function(i){var n=t.definition.headerFilterFuncParams||{},s=t.getFieldValue(i);return n="function"==typeof n?n(e,s,i):n,o.filters[t.definition.headerFilterFunc](e,s,i,n)}):console.warn("Header Filter Error - Matching filter function not found: ",t.definition.headerFilterFunc);break;case"function":a=n=function(o){var i=t.definition.headerFilterFuncParams||{},n=t.getFieldValue(o);return i="function"==typeof i?i(e,n,o):i,t.definition.headerFilterFunc(e,n,o,i)}}if(!n)switch(s){case"partial":n=function(o){var i=t.getFieldValue(o);return null!=i&&String(i).toLowerCase().indexOf(String(e).toLowerCase())>-1},a="like";break;default:n=function(o){return t.getFieldValue(o)==e},a="="}o.headerFilters[i]={value:e,func:n,type:a,params:{}}}r=JSON.stringify(o.headerFilters),o.prevHeaderFilterChangeCheck!==r&&(o.prevHeaderFilterChangeCheck=r,o.changed=!0,o.table.rowManager.filterRefresh())}return!0},attrType:!1,tagType:!1,emptyFunc:!1},this.generateHeaderFilterElement(t)},Filter.prototype.generateHeaderFilterElement=function(t,e,o){var i,n,s,a,r,l,u,c=this,d=this,h=t.modules.filter.success,p=t.getField();if(t.modules.filter.headerElement&&t.modules.filter.headerElement.parentNode&&t.contentElement.removeChild(t.modules.filter.headerElement.parentNode),p){switch(t.modules.filter.emptyFunc=t.definition.headerFilterEmptyCheck||function(t){return!t&&"0"!==t&&0!==t},(i=document.createElement("div")).classList.add("tabulator-header-filter"),_typeof(t.definition.headerFilter)){case"string":d.table.modules.edit.editors[t.definition.headerFilter]?(n=d.table.modules.edit.editors[t.definition.headerFilter],"tick"!==t.definition.headerFilter&&"tickCross"!==t.definition.headerFilter||t.definition.headerFilterEmptyCheck||(t.modules.filter.emptyFunc=function(t){return!0!==t&&!1!==t})):console.warn("Filter Error - Cannot build header filter, No such editor found: ",t.definition.editor);break;case"function":n=t.definition.headerFilter;break;case"boolean":t.modules.edit&&t.modules.edit.editor?n=t.modules.edit.editor:t.definition.formatter&&d.table.modules.edit.editors[t.definition.formatter]?(n=d.table.modules.edit.editors[t.definition.formatter],"tick"!==t.definition.formatter&&"tickCross"!==t.definition.formatter||t.definition.headerFilterEmptyCheck||(t.modules.filter.emptyFunc=function(t){return!0!==t&&!1!==t})):n=d.table.modules.edit.editors.input}if(n){if(a={getValue:function(){return void 0!==e?e:""},getField:function(){return t.definition.field},getElement:function(){return i},getColumn:function(){return t.getComponent()},getRow:function(){return{normalizeHeight:function(){}}}},u="function"==typeof(u=t.definition.headerFilterParams||{})?u.call(d.table):u,!(s=n.call(this.table.modules.edit,a,(function(){}),h,(function(){}),u)))return void console.warn("Filter Error - Cannot add filter to "+p+" column, editor returned a value of false");if(!(s instanceof Node))return void console.warn("Filter Error - Cannot add filter to "+p+" column, editor should return an instance of Node, the editor returned:",s);p?d.table.modules.localize.bind("headerFilters|columns|"+t.definition.field,(function(t){s.setAttribute("placeholder",void 0!==t&&t?t:d.table.modules.localize.getText("headerFilters|default"))})):d.table.modules.localize.bind("headerFilters|default",(function(t){s.setAttribute("placeholder",void 0!==d.column.definition.headerFilterPlaceholder&&d.column.definition.headerFilterPlaceholder?d.column.definition.headerFilterPlaceholder:t)})),s.addEventListener("click",(function(t){t.stopPropagation(),s.focus()})),s.addEventListener("focus",(function(t){var e=c.table.columnManager.element.scrollLeft;e!==c.table.rowManager.element.scrollLeft&&(c.table.rowManager.scrollHorizontal(e),c.table.columnManager.scrollHorizontal(e))})),r=!1,l=function(t){r&&clearTimeout(r),r=setTimeout((function(){h(s.value)}),d.table.options.headerFilterLiveFilterDelay)},t.modules.filter.headerElement=s,t.modules.filter.attrType=s.hasAttribute("type")?s.getAttribute("type").toLowerCase():"",t.modules.filter.tagType=s.tagName.toLowerCase(),!1!==t.definition.headerFilterLiveFilter&&("autocomplete"!==t.definition.headerFilter&&"tickCross"!==t.definition.headerFilter&&("autocomplete"!==t.definition.editor&&"tickCross"!==t.definition.editor||!0!==t.definition.headerFilter)&&(s.addEventListener("keyup",l),s.addEventListener("search",l),"number"==t.modules.filter.attrType&&s.addEventListener("change",(function(t){h(s.value)})),"text"==t.modules.filter.attrType&&"ie"!==this.table.browser&&s.setAttribute("type","search")),"input"!=t.modules.filter.tagType&&"select"!=t.modules.filter.tagType&&"textarea"!=t.modules.filter.tagType||s.addEventListener("mousedown",(function(t){t.stopPropagation()}))),i.appendChild(s),t.contentElement.appendChild(i),o||d.headerFilterColumns.push(t)}}else console.warn("Filter Error - Cannot add header filter, column has no field set:",t.definition.title)},Filter.prototype.hideHeaderFilterElements=function(){this.headerFilterColumns.forEach((function(t){t.modules.filter&&t.modules.filter.headerElement&&(t.modules.filter.headerElement.style.display="none")}))},Filter.prototype.showHeaderFilterElements=function(){this.headerFilterColumns.forEach((function(t){t.modules.filter&&t.modules.filter.headerElement&&(t.modules.filter.headerElement.style.display="")}))},Filter.prototype.setHeaderFilterFocus=function(t){t.modules.filter&&t.modules.filter.headerElement?t.modules.filter.headerElement.focus():console.warn("Column Filter Focus Error - No header filter set on column:",t.getField())},Filter.prototype.getHeaderFilterValue=function(t){if(t.modules.filter&&t.modules.filter.headerElement)return t.modules.filter.headerElement.value;console.warn("Column Filter Error - No header filter set on column:",t.getField())},Filter.prototype.setHeaderFilterValue=function(t,e){t&&(t.modules.filter&&t.modules.filter.headerElement?(this.generateHeaderFilterElement(t,e,!0),t.modules.filter.success(e)):console.warn("Column Filter Error - No header filter set on column:",t.getField()))},Filter.prototype.reloadHeaderFilter=function(t){t&&(t.modules.filter&&t.modules.filter.headerElement?this.generateHeaderFilterElement(t,t.modules.filter.value,!0):console.warn("Column Filter Error - No header filter set on column:",t.getField()))},Filter.prototype.hasChanged=function(){var t=this.changed;return this.changed=!1,t},Filter.prototype.setFilter=function(t,e,o,i){this.filterList=[],Array.isArray(t)||(t=[{field:t,type:e,value:o,params:i}]),this.addFilter(t)},Filter.prototype.addFilter=function(t,e,o,i){var n=this;Array.isArray(t)||(t=[{field:t,type:e,value:o,params:i}]),t.forEach((function(t){(t=n.findFilter(t))&&(n.filterList.push(t),n.changed=!0)})),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},Filter.prototype.findFilter=function(t){var e,o=this;if(Array.isArray(t))return this.findSubFilters(t);var i=!1;return"function"==typeof t.field?i=function(e){return t.field(e,t.type||{})}:o.filters[t.type]?i=(e=o.table.columnManager.getColumnByField(t.field))?function(i){return o.filters[t.type](t.value,e.getFieldValue(i),i,t.params||{})}:function(e){return o.filters[t.type](t.value,e[t.field],e,t.params||{})}:console.warn("Filter Error - No such filter type found, ignoring: ",t.type),t.func=i,!!t.func&&t},Filter.prototype.findSubFilters=function(t){var e=this,o=[];return t.forEach((function(t){(t=e.findFilter(t))&&o.push(t)})),!!o.length&&o},Filter.prototype.getFilters=function(t,e){var o=[];return t&&(o=this.getHeaderFilters()),e&&o.forEach((function(t){"function"==typeof t.type&&(t.type="function")})),o=o.concat(this.filtersToArray(this.filterList,e))},Filter.prototype.filtersToArray=function(t,e){var o=this,i=[];return t.forEach((function(t){var n;Array.isArray(t)?i.push(o.filtersToArray(t,e)):(n={field:t.field,type:t.type,value:t.value},e&&"function"==typeof n.type&&(n.type="function"),i.push(n))})),i},Filter.prototype.getHeaderFilters=function(){var t=[];for(var e in this.headerFilters)t.push({field:e,type:this.headerFilters[e].type,value:this.headerFilters[e].value});return t},Filter.prototype.removeFilter=function(t,e,o){var i=this;Array.isArray(t)||(t=[{field:t,type:e,value:o}]),t.forEach((function(t){var e=-1;(e="object"==_typeof(t.field)?i.filterList.findIndex((function(e){return t===e})):i.filterList.findIndex((function(e){return t.field===e.field&&t.type===e.type&&t.value===e.value})))>-1?(i.filterList.splice(e,1),i.changed=!0):console.warn("Filter Error - No matching filter type found, ignoring: ",t.type)})),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},Filter.prototype.clearFilter=function(t){this.filterList=[],t&&this.clearHeaderFilter(),this.changed=!0,this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},Filter.prototype.clearHeaderFilter=function(){var t=this;this.headerFilters={},t.prevHeaderFilterChangeCheck="{}",this.headerFilterColumns.forEach((function(e){void 0!==e.modules.filter.value&&delete e.modules.filter.value,e.modules.filter.prevSuccess=void 0,t.reloadHeaderFilter(e)})),this.changed=!0},Filter.prototype.search=function(t,e,o,i){var n=this,s=[],a=[];return Array.isArray(e)||(e=[{field:e,type:o,value:i}]),e.forEach((function(t){(t=n.findFilter(t))&&a.push(t)})),this.table.rowManager.rows.forEach((function(e){var o=!0;a.forEach((function(t){n.filterRecurse(t,e.getData())||(o=!1)})),o&&s.push("data"===t?e.getData("data"):e.getComponent())})),s},Filter.prototype.filter=function(t,e){var o=this,i=[],n=[];return o.table.options.dataFiltering&&o.table.options.dataFiltering.call(o.table,o.getFilters()),o.table.options.ajaxFiltering||!o.filterList.length&&!Object.keys(o.headerFilters).length?i=t.slice(0):t.forEach((function(t){o.filterRow(t)&&i.push(t)})),o.table.options.dataFiltered&&(i.forEach((function(t){n.push(t.getComponent())})),o.table.options.dataFiltered.call(o.table,o.getFilters(),n)),i},Filter.prototype.filterRow=function(t,e){var o=this,i=!0,n=t.getData();for(var s in o.filterList.forEach((function(t){o.filterRecurse(t,n)||(i=!1)})),o.headerFilters)o.headerFilters[s].func(n)||(i=!1);return i},Filter.prototype.filterRecurse=function(t,e){var o=this,i=!1;return Array.isArray(t)?t.forEach((function(t){o.filterRecurse(t,e)&&(i=!0)})):i=t.func(e),i},Filter.prototype.filters={"=":function(t,e,o,i){return e==t},"<":function(t,e,o,i){return e<t},"<=":function(t,e,o,i){return e<=t},">":function(t,e,o,i){return e>t},">=":function(t,e,o,i){return e>=t},"!=":function(t,e,o,i){return e!=t},regex:function(t,e,o,i){return"string"==typeof t&&(t=new RegExp(t)),t.test(e)},like:function(t,e,o,i){return null==t?e===t:null!=e&&String(e).toLowerCase().indexOf(t.toLowerCase())>-1},keywords:function(t,e,o,i){var n=t.toLowerCase().split(void 0===i.separator?" ":i.separator),s=String(null==e?"":e).toLowerCase(),a=[];return n.forEach((function(t){s.includes(t)&&a.push(!0)})),i.matchAll?a.length===n.length:!!a.length},starts:function(t,e,o,i){return null==t?e===t:null!=e&&String(e).toLowerCase().startsWith(t.toLowerCase())},ends:function(t,e,o,i){return null==t?e===t:null!=e&&String(e).toLowerCase().endsWith(t.toLowerCase())},in:function(t,e,o,i){return Array.isArray(t)?!t.length||t.indexOf(e)>-1:(console.warn("Filter Error - filter value is not an array:",t),!1)}},Tabulator.prototype.registerModule("filter",Filter);var Format=function(t){this.table=t};Format.prototype.initializeColumn=function(t){t.modules.format=this.lookupFormatter(t,""),void 0!==t.definition.formatterPrint&&(t.modules.format.print=this.lookupFormatter(t,"Print")),void 0!==t.definition.formatterClipboard&&(t.modules.format.clipboard=this.lookupFormatter(t,"Clipboard")),void 0!==t.definition.formatterHtmlOutput&&(t.modules.format.htmlOutput=this.lookupFormatter(t,"HtmlOutput"))},Format.prototype.lookupFormatter=function(t,e){var o={params:t.definition["formatter"+e+"Params"]||{}},i=t.definition["formatter"+e];switch(void 0===i?"undefined":_typeof(i)){case"string":"tick"===i&&(i="tickCross",void 0===o.params.crossElement&&(o.params.crossElement=!1),console.warn("DEPRECATION WARNING - the tick formatter has been deprecated, please use the tickCross formatter with the crossElement param set to false")),this.formatters[i]?o.formatter=this.formatters[i]:(console.warn("Formatter Error - No such formatter found: ",i),o.formatter=this.formatters.plaintext);break;case"function":o.formatter=i;break;default:o.formatter=this.formatters.plaintext}return o},Format.prototype.cellRendered=function(t){t.modules.format&&t.modules.format.renderedCallback&&!t.modules.format.rendered&&(t.modules.format.renderedCallback(),t.modules.format.rendered=!0)},Format.prototype.formatValue=function(t){var e=t.getComponent(),o="function"==typeof t.column.modules.format.params?t.column.modules.format.params(e):t.column.modules.format.params;return t.column.modules.format.formatter.call(this,e,o,(function(e){t.modules.format||(t.modules.format={}),t.modules.format.renderedCallback=e,t.modules.format.rendered=!1}))},Format.prototype.formatExportValue=function(t,e){var o,i=t.column.modules.format[e];if(i){return o="function"==typeof i.params?i.params(component):i.params,i.formatter.call(this,t.getComponent(),o,(function(e){t.modules.format||(t.modules.format={}),t.modules.format.renderedCallback=e,t.modules.format.rendered=!1}))}return this.formatValue(t)},Format.prototype.sanitizeHTML=function(t){if(t){var e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(t).replace(/[&<>"'`=\/]/g,(function(t){return e[t]}))}return t},Format.prototype.emptyToSpace=function(t){return null==t||""===t?" ":t},Format.prototype.getFormatter=function(t){switch(void 0===t?"undefined":_typeof(t)){case"string":this.formatters[t]?t=this.formatters[t]:(console.warn("Formatter Error - No such formatter found: ",t),t=this.formatters.plaintext);break;case"function":t=t;break;default:t=this.formatters.plaintext}return t},Format.prototype.formatters={plaintext:function(t,e,o){return this.emptyToSpace(this.sanitizeHTML(t.getValue()))},html:function(t,e,o){return t.getValue()},textarea:function(t,e,o){return t.getElement().style.whiteSpace="pre-wrap",this.emptyToSpace(this.sanitizeHTML(t.getValue()))},money:function(t,e,o){var i,n,s,a,r=parseFloat(t.getValue()),l=e.decimal||".",u=e.thousand||",",c=e.symbol||"",d=!!e.symbolAfter,h=void 0!==e.precision?e.precision:2;if(isNaN(r))return this.emptyToSpace(this.sanitizeHTML(t.getValue()));for(i=!1!==h?r.toFixed(h):r,n=(i=String(i).split("."))[0],s=i.length>1?l+i[1]:"",a=/(\d+)(\d{3})/;a.test(n);)n=n.replace(a,"$1"+u+"$2");return d?n+s+c:c+n+s},link:function(t,e,o){var i=t.getValue(),n=e.urlPrefix||"",s=e.download,a=i,r=document.createElement("a");if(e.labelField&&(a=t.getData()[e.labelField]),e.label)switch(_typeof(e.label)){case"string":a=e.label;break;case"function":a=e.label(t)}if(a){if(e.urlField&&(i=t.getData()[e.urlField]),e.url)switch(_typeof(e.url)){case"string":i=e.url;break;case"function":i=e.url(t)}return r.setAttribute("href",n+i),e.target&&r.setAttribute("target",e.target),e.download&&(s="function"==typeof s?s(t):!0===s?"":s,r.setAttribute("download",s)),r.innerHTML=this.emptyToSpace(this.sanitizeHTML(a)),r}return" "},image:function(t,e,o){var i=document.createElement("img"),n=t.getValue();switch(e.urlPrefix&&(n=e.urlPrefix+t.getValue()),e.urlSuffix&&(n+=e.urlSuffix),i.setAttribute("src",n),_typeof(e.height)){case"number":i.style.height=e.height+"px";break;case"string":i.style.height=e.height}switch(_typeof(e.width)){case"number":i.style.width=e.width+"px";break;case"string":i.style.width=e.width}return i.addEventListener("load",(function(){t.getRow().normalizeHeight()})),i},tickCross:function(t,e,o){var i=t.getValue(),n=t.getElement(),s=e.allowEmpty,a=e.allowTruthy,r=void 0!==e.tickElement?e.tickElement:'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#2DC214" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/></svg>',l=void 0!==e.crossElement?e.crossElement:'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#CE1515" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/></svg>';return a&&i||!0===i||"true"===i||"True"===i||1===i||"1"===i?(n.setAttribute("aria-checked",!0),r||""):!s||"null"!==i&&""!==i&&null!=i?(n.setAttribute("aria-checked",!1),l||""):(n.setAttribute("aria-checked","mixed"),"")},datetime:function(t,e,o){var i=e.inputFormat||"YYYY-MM-DD hh:mm:ss",n=e.outputFormat||"DD/MM/YYYY hh:mm:ss",s=void 0!==e.invalidPlaceholder?e.invalidPlaceholder:"",a=t.getValue(),r=moment(a,i);return r.isValid()?e.timezone?r.tz(e.timezone).format(n):r.format(n):!0===s?a:"function"==typeof s?s(a):s},datetimediff:function(t,e,o){var i=e.inputFormat||"YYYY-MM-DD hh:mm:ss",n=void 0!==e.invalidPlaceholder?e.invalidPlaceholder:"",s=void 0!==e.suffix&&e.suffix,a=void 0!==e.unit?e.unit:void 0,r=void 0!==e.humanize&&e.humanize,l=void 0!==e.date?e.date:moment(),u=t.getValue(),c=moment(u,i);return c.isValid()?r?moment.duration(c.diff(l)).humanize(s):c.diff(l,a)+(s?" "+s:""):!0===n?u:"function"==typeof n?n(u):n},lookup:function(t,e,o){var i=t.getValue();return void 0===e[i]?(console.warn("Missing display value for "+i),i):e[i]},star:function(t,e,o){var i=t.getValue(),n=t.getElement(),s=e&&e.stars?e.stars:5,a=document.createElement("span"),r=document.createElementNS("http://www.w3.org/2000/svg","svg");a.style.verticalAlign="middle",r.setAttribute("width","14"),r.setAttribute("height","14"),r.setAttribute("viewBox","0 0 512 512"),r.setAttribute("xml:space","preserve"),r.style.padding="0 1px",i=i&&!isNaN(i)?parseInt(i):0,i=Math.max(0,Math.min(i,s));for(var l=1;l<=s;l++){var u=r.cloneNode(!0);u.innerHTML=l<=i?'<polygon fill="#FFEA00" stroke="#C1AB60" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>':'<polygon fill="#D2D2D2" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>',a.appendChild(u)}return n.style.whiteSpace="nowrap",n.style.overflow="hidden",n.style.textOverflow="ellipsis",n.setAttribute("aria-label",i),a},traffic:function(t,e,o){var i,n,s=this.sanitizeHTML(t.getValue())||0,a=document.createElement("span"),r=e&&e.max?e.max:100,l=e&&e.min?e.min:0,u=e&&void 0!==e.color?e.color:["red","orange","green"],c="#666666";if(!isNaN(s)&&void 0!==t.getValue()){switch(a.classList.add("tabulator-traffic-light"),n=parseFloat(s)<=r?parseFloat(s):r,n=parseFloat(n)>=l?parseFloat(n):l,i=(r-l)/100,n=Math.round((n-l)/i),void 0===u?"undefined":_typeof(u)){case"string":c=u;break;case"function":c=u(s);break;case"object":if(Array.isArray(u)){var d=100/u.length,h=Math.floor(n/d);h=Math.min(h,u.length-1),c=u[h=Math.max(h,0)];break}}return a.style.backgroundColor=c,a}},progress:function(t,e,o){var i,n,s,a,r,l=this.sanitizeHTML(t.getValue())||0,u=t.getElement(),c=e&&e.max?e.max:100,d=e&&e.min?e.min:0,h=e&&e.legendAlign?e.legendAlign:"center";switch(n=parseFloat(l)<=c?parseFloat(l):c,n=parseFloat(n)>=d?parseFloat(n):d,i=(c-d)/100,n=Math.round((n-d)/i),_typeof(e.color)){case"string":s=e.color;break;case"function":s=e.color(l);break;case"object":if(Array.isArray(e.color)){var p=100/e.color.length,m=Math.floor(n/p);m=Math.min(m,e.color.length-1),m=Math.max(m,0),s=e.color[m];break}default:s="#2DC214"}switch(_typeof(e.legend)){case"string":a=e.legend;break;case"function":a=e.legend(l);break;case"boolean":a=l;break;default:a=!1}switch(_typeof(e.legendColor)){case"string":r=e.legendColor;break;case"function":r=e.legendColor(l);break;case"object":if(Array.isArray(e.legendColor)){p=100/e.legendColor.length,m=Math.floor(n/p);m=Math.min(m,e.legendColor.length-1),m=Math.max(m,0),r=e.legendColor[m]}break;default:r="#000"}u.style.minWidth="30px",u.style.position="relative",u.setAttribute("aria-label",n);var f=document.createElement("div");if(f.style.display="inline-block",f.style.position="relative",f.style.width=n+"%",f.style.backgroundColor=s,f.style.height="100%",f.setAttribute("data-max",c),f.setAttribute("data-min",d),a){var g=document.createElement("div");g.style.position="absolute",g.style.top="4px",g.style.left=0,g.style.textAlign=h,g.style.width="100%",g.style.color=r,g.innerHTML=a}return o((function(){if(!(t instanceof CellComponent)){var e=document.createElement("div");e.style.position="absolute",e.style.top="4px",e.style.bottom="4px",e.style.left="4px",e.style.right="4px",u.appendChild(e),u=e}u.appendChild(f),a&&u.appendChild(g)})),""},color:function(t,e,o){return t.getElement().style.backgroundColor=this.sanitizeHTML(t.getValue()),""},buttonTick:function(t,e,o){return'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#2DC214" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/></svg>'},buttonCross:function(t,e,o){return'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#CE1515" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/></svg>'},rownum:function(t,e,o){return this.table.rowManager.activeRows.indexOf(t.getRow()._getSelf())+1},handle:function(t,e,o){return t.getElement().classList.add("tabulator-row-handle"),"<div class='tabulator-row-handle-box'><div class='tabulator-row-handle-bar'></div><div class='tabulator-row-handle-bar'></div><div class='tabulator-row-handle-bar'></div></div>"},responsiveCollapse:function(t,e,o){var i=document.createElement("div"),n=t.getRow()._row.modules.responsiveLayout;function s(t){var e=n.element;n.open=t,e&&(n.open?(i.classList.add("open"),e.style.display=""):(i.classList.remove("open"),e.style.display="none"))}return i.classList.add("tabulator-responsive-collapse-toggle"),i.innerHTML="<span class='tabulator-responsive-collapse-toggle-open'>+</span><span class='tabulator-responsive-collapse-toggle-close'>-</span>",t.getElement().classList.add("tabulator-row-handle"),i.addEventListener("click",(function(t){t.stopImmediatePropagation(),s(!n.open)})),s(n.open),i},rowSelection:function(t,e,o){var i=this,n=document.createElement("input");if(n.type="checkbox",this.table.modExists("selectRow",!0))if(n.addEventListener("click",(function(t){t.stopPropagation()})),"function"==typeof t.getRow){var s=t.getRow();s instanceof RowComponent?(n.addEventListener("change",(function(t){s.toggleSelect()})),n.checked=s.isSelected&&s.isSelected(),this.table.modules.selectRow.registerRowSelectCheckbox(s,n)):n=""}else n.addEventListener("change",(function(t){i.table.modules.selectRow.selectedRows.length?i.table.deselectRow():i.table.selectRow(e.rowRange)})),this.table.modules.selectRow.registerHeaderSelectCheckbox(n);return n}},Tabulator.prototype.registerModule("format",Format);var FrozenColumns=function(t){this.table=t,this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.rightPadding=0,this.initializationMode="left",this.active=!1,this.scrollEndTimer=!1};FrozenColumns.prototype.reset=function(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.rightMargin=0,this.active=!1,this.table.columnManager.headersElement.style.marginLeft=0,this.table.columnManager.element.style.paddingRight=0},FrozenColumns.prototype.initializeColumn=function(t){var e={margin:0,edge:!1};t.isGroup||(this.frozenCheck(t)?(e.position=this.initializationMode,"left"==this.initializationMode?this.leftColumns.push(t):this.rightColumns.unshift(t),this.active=!0,t.modules.frozen=e):this.initializationMode="right")},FrozenColumns.prototype.frozenCheck=function(t){return t.parent.isGroup&&t.definition.frozen&&console.warn("Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups"),t.parent.isGroup?this.frozenCheck(t.parent):t.definition.frozen},FrozenColumns.prototype.scrollHorizontal=function(){var t,e=this;this.active&&(clearTimeout(this.scrollEndTimer),this.scrollEndTimer=setTimeout((function(){e.layout()}),100),t=this.table.rowManager.getVisibleRows(),this.calcMargins(),this.layoutColumnPosition(),this.layoutCalcRows(),t.forEach((function(t){"row"===t.type&&e.layoutRow(t)})),this.table.rowManager.tableElement.style.marginRight=this.rightMargin)},FrozenColumns.prototype.calcMargins=function(){this.leftMargin=this._calcSpace(this.leftColumns,this.leftColumns.length)+"px",this.table.columnManager.headersElement.style.marginLeft=this.leftMargin,this.rightMargin=this._calcSpace(this.rightColumns,this.rightColumns.length)+"px",this.table.columnManager.element.style.paddingRight=this.rightMargin,this.rightPadding=this.table.rowManager.element.clientWidth+this.table.columnManager.scrollLeft},FrozenColumns.prototype.layoutCalcRows=function(){this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&this.table.modules.columnCalcs.topRow&&this.layoutRow(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&this.table.modules.columnCalcs.botRow&&this.layoutRow(this.table.modules.columnCalcs.botRow))},FrozenColumns.prototype.layoutColumnPosition=function(t){var e=this,o=[];this.leftColumns.forEach((function(i,n){if(i.modules.frozen.margin=e._calcSpace(e.leftColumns,n)+e.table.columnManager.scrollLeft+"px",n==e.leftColumns.length-1?i.modules.frozen.edge=!0:i.modules.frozen.edge=!1,i.parent.isGroup){var s=e.getColGroupParentElement(i);o.includes(s)||(e.layoutElement(s,i),o.push(s)),i.modules.frozen.edge&&s.classList.add("tabulator-frozen-"+i.modules.frozen.position)}else e.layoutElement(i.getElement(),i);t&&i.cells.forEach((function(t){e.layoutElement(t.getElement(!0),i)}))})),this.rightColumns.forEach((function(o,i){o.modules.frozen.margin=e.rightPadding-e._calcSpace(e.rightColumns,i+1)+"px",i==e.rightColumns.length-1?o.modules.frozen.edge=!0:o.modules.frozen.edge=!1,o.parent.isGroup?e.layoutElement(e.getColGroupParentElement(o),o):e.layoutElement(o.getElement(),o),t&&o.cells.forEach((function(t){e.layoutElement(t.getElement(!0),o)}))}))},FrozenColumns.prototype.getColGroupParentElement=function(t){return t.parent.isGroup?this.getColGroupParentElement(t.parent):t.getElement()},FrozenColumns.prototype.layout=function(){var t=this;t.active&&(this.calcMargins(),t.table.rowManager.getDisplayRows().forEach((function(e){"row"===e.type&&t.layoutRow(e)})),this.layoutCalcRows(),this.layoutColumnPosition(!0),this.table.rowManager.tableElement.style.marginRight=this.rightMargin)},FrozenColumns.prototype.layoutRow=function(t){var e=this;t.getElement().style.paddingLeft=this.leftMargin,this.leftColumns.forEach((function(o){var i=t.getCell(o);i&&e.layoutElement(i.getElement(!0),o)})),this.rightColumns.forEach((function(o){var i=t.getCell(o);i&&e.layoutElement(i.getElement(!0),o)}))},FrozenColumns.prototype.layoutElement=function(t,e){e.modules.frozen&&(t.style.position="absolute",t.style.left=e.modules.frozen.margin,t.classList.add("tabulator-frozen"),e.modules.frozen.edge&&t.classList.add("tabulator-frozen-"+e.modules.frozen.position))},FrozenColumns.prototype._calcSpace=function(t,e){for(var o=0,i=0;i<e;i++)t[i].visible&&(o+=t[i].getWidth());return o},Tabulator.prototype.registerModule("frozenColumns",FrozenColumns);var FrozenRows=function(t){this.table=t,this.topElement=document.createElement("div"),this.rows=[],this.displayIndex=0};FrozenRows.prototype.initialize=function(){this.rows=[],this.topElement.classList.add("tabulator-frozen-rows-holder"),this.table.columnManager.getElement().insertBefore(this.topElement,this.table.columnManager.headersElement.nextSibling)},FrozenRows.prototype.setDisplayIndex=function(t){this.displayIndex=t},FrozenRows.prototype.getDisplayIndex=function(){return this.displayIndex},FrozenRows.prototype.isFrozen=function(){return!!this.rows.length},FrozenRows.prototype.getRows=function(t){var e=t.slice(0);return this.rows.forEach((function(t){var o=e.indexOf(t);o>-1&&e.splice(o,1)})),e},FrozenRows.prototype.freezeRow=function(t){t.modules.frozen?console.warn("Freeze Error - Row is already frozen"):(t.modules.frozen=!0,this.topElement.appendChild(t.getElement()),t.initialize(),t.normalizeHeight(),this.table.rowManager.adjustTableSize(),this.rows.push(t),this.table.rowManager.refreshActiveData("display"),this.styleRows())},FrozenRows.prototype.unfreezeRow=function(t){this.rows.indexOf(t);t.modules.frozen?(t.modules.frozen=!1,this.detachRow(t),this.table.rowManager.adjustTableSize(),this.table.rowManager.refreshActiveData("display"),this.rows.length&&this.styleRows()):console.warn("Freeze Error - Row is already unfrozen")},FrozenRows.prototype.detachRow=function(t){var e=this.rows.indexOf(t);if(e>-1){var o=t.getElement();o.parentNode.removeChild(o),this.rows.splice(e,1)}},FrozenRows.prototype.styleRows=function(t){var e=this;this.rows.forEach((function(t,o){e.table.rowManager.styleRow(t,o)}))},Tabulator.prototype.registerModule("frozenRows",FrozenRows);var GroupComponent=function(t){this._group=t,this.type="GroupComponent"};GroupComponent.prototype.getKey=function(){return this._group.key},GroupComponent.prototype.getField=function(){return this._group.field},GroupComponent.prototype.getElement=function(){return this._group.element},GroupComponent.prototype.getRows=function(){return this._group.getRows(!0)},GroupComponent.prototype.getSubGroups=function(){return this._group.getSubGroups(!0)},GroupComponent.prototype.getParentGroup=function(){return!!this._group.parent&&this._group.parent.getComponent()},GroupComponent.prototype.getVisibility=function(){return console.warn("getVisibility function is deprecated, you should now use the isVisible function"),this._group.visible},GroupComponent.prototype.isVisible=function(){return this._group.visible},GroupComponent.prototype.show=function(){this._group.show()},GroupComponent.prototype.hide=function(){this._group.hide()},GroupComponent.prototype.toggle=function(){this._group.toggleVisibility()},GroupComponent.prototype._getSelf=function(){return this._group},GroupComponent.prototype.getTable=function(){return this._group.groupManager.table};var Group=function(t,e,o,i,n,s,a){this.groupManager=t,this.parent=e,this.key=i,this.level=o,this.field=n,this.hasSubGroups=o<t.groupIDLookups.length-1,this.addRow=this.hasSubGroups?this._addRowToGroup:this._addRow,this.type="group",this.old=a,this.rows=[],this.groups=[],this.groupList=[],this.generator=s,this.elementContents=!1,this.height=0,this.outerHeight=0,this.initialized=!1,this.calcs={},this.initialized=!1,this.modules={},this.arrowElement=!1,this.visible=a?a.visible:void 0!==t.startOpen[o]?t.startOpen[o]:t.startOpen[0],this.component=null,this.createElements(),this.addBindings(),this.createValueGroups()};Group.prototype.wipe=function(){this.groupList.length?this.groupList.forEach((function(t){t.wipe()})):(this.element=!1,this.arrowElement=!1,this.elementContents=!1)},Group.prototype.createElements=function(){var t=document.createElement("div");t.classList.add("tabulator-arrow"),this.element=document.createElement("div"),this.element.classList.add("tabulator-row"),this.element.classList.add("tabulator-group"),this.element.classList.add("tabulator-group-level-"+this.level),this.element.setAttribute("role","rowgroup"),this.arrowElement=document.createElement("div"),this.arrowElement.classList.add("tabulator-group-toggle"),this.arrowElement.appendChild(t),!1!==this.groupManager.table.options.movableRows&&this.groupManager.table.modExists("moveRow")&&this.groupManager.table.modules.moveRow.initializeGroupHeader(this)},Group.prototype.createValueGroups=function(){var t=this,e=this.level+1;this.groupManager.allowedValues&&this.groupManager.allowedValues[e]&&this.groupManager.allowedValues[e].forEach((function(o){t._createGroup(o,e)}))},Group.prototype.addBindings=function(){var t,e,o,i=this;i.groupManager.table.options.groupClick&&i.element.addEventListener("click",(function(t){i.groupManager.table.options.groupClick.call(i.groupManager.table,t,i.getComponent())})),i.groupManager.table.options.groupDblClick&&i.element.addEventListener("dblclick",(function(t){i.groupManager.table.options.groupDblClick.call(i.groupManager.table,t,i.getComponent())})),i.groupManager.table.options.groupContext&&i.element.addEventListener("contextmenu",(function(t){i.groupManager.table.options.groupContext.call(i.groupManager.table,t,i.getComponent())})),(i.groupManager.table.options.groupContextMenu||i.groupManager.table.options.groupClickMenu)&&i.groupManager.table.modExists("menu")&&i.groupManager.table.modules.menu.initializeGroup.call(i.groupManager.table.modules.menu,i),i.groupManager.table.options.groupTap&&(o=!1,i.element.addEventListener("touchstart",(function(t){o=!0}),{passive:!0}),i.element.addEventListener("touchend",(function(t){o&&i.groupManager.table.options.groupTap(t,i.getComponent()),o=!1}))),i.groupManager.table.options.groupDblTap&&(t=null,i.element.addEventListener("touchend",(function(e){t?(clearTimeout(t),t=null,i.groupManager.table.options.groupDblTap(e,i.getComponent())):t=setTimeout((function(){clearTimeout(t),t=null}),300)}))),i.groupManager.table.options.groupTapHold&&(e=null,i.element.addEventListener("touchstart",(function(t){clearTimeout(e),e=setTimeout((function(){clearTimeout(e),e=null,o=!1,i.groupManager.table.options.groupTapHold(t,i.getComponent())}),1e3)}),{passive:!0}),i.element.addEventListener("touchend",(function(t){clearTimeout(e),e=null}))),i.groupManager.table.options.groupToggleElement&&("arrow"==i.groupManager.table.options.groupToggleElement?i.arrowElement:i.element).addEventListener("click",(function(t){t.stopPropagation(),t.stopImmediatePropagation(),i.toggleVisibility()}))},Group.prototype._createGroup=function(t,e){var o=e+"_"+t,i=new Group(this.groupManager,this,e,t,this.groupManager.groupIDLookups[e].field,this.groupManager.headerGenerator[e]||this.groupManager.headerGenerator[0],!!this.old&&this.old.groups[o]);this.groups[o]=i,this.groupList.push(i)},Group.prototype._addRowToGroup=function(t){var e=this.level+1;if(this.hasSubGroups){var o=this.groupManager.groupIDLookups[e].func(t.getData()),i=e+"_"+o;this.groupManager.allowedValues&&this.groupManager.allowedValues[e]?this.groups[i]&&this.groups[i].addRow(t):(this.groups[i]||this._createGroup(o,e),this.groups[i].addRow(t))}},Group.prototype._addRow=function(t){this.rows.push(t),t.modules.group=this},Group.prototype.insertRow=function(t,e,o){var i=this.conformRowData({});t.updateData(i);var n=this.rows.indexOf(e);n>-1?o?this.rows.splice(n+1,0,t):this.rows.splice(n,0,t):o?this.rows.push(t):this.rows.unshift(t),t.modules.group=this,this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this),this.groupManager.updateGroupRows(!0)},Group.prototype.scrollHeader=function(t){this.arrowElement.style.marginLeft=t,this.groupList.forEach((function(e){e.scrollHeader(t)}))},Group.prototype.getRowIndex=function(t){},Group.prototype.conformRowData=function(t){return this.field?t[this.field]=this.key:console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"),this.parent&&(t=this.parent.conformRowData(t)),t},Group.prototype.removeRow=function(t){var e=this.rows.indexOf(t),o=t.getElement();e>-1&&this.rows.splice(e,1),this.groupManager.table.options.groupValues||this.rows.length?(o.parentNode&&o.parentNode.removeChild(o),this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this)):(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this),this.groupManager.updateGroupRows(!0))},Group.prototype.removeGroup=function(t){var e,o=t.level+"_"+t.key;this.groups[o]&&(delete this.groups[o],(e=this.groupList.indexOf(t))>-1&&this.groupList.splice(e,1),this.groupList.length||(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this)))},Group.prototype.getHeadersAndRows=function(t){var e=[];return e.push(this),this._visSet(),this.visible?this.groupList.length?this.groupList.forEach((function(o){e=e.concat(o.getHeadersAndRows(t))})):(!t&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),e.push(this.calcs.top)),e=e.concat(this.rows),!t&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),e.push(this.calcs.bottom))):this.groupList.length||"table"==this.groupManager.table.options.columnCalcs||this.groupManager.table.modExists("columnCalcs")&&(!t&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),e.push(this.calcs.top))),!t&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),e.push(this.calcs.bottom)))),e},Group.prototype.getData=function(t,e){var o=[];return this._visSet(),(!t||t&&this.visible)&&this.rows.forEach((function(t){o.push(t.getData(e||"data"))})),o},Group.prototype.getRowCount=function(){var t=0;return this.groupList.length?this.groupList.forEach((function(e){t+=e.getRowCount()})):t=this.rows.length,t},Group.prototype.toggleVisibility=function(){this.visible?this.hide():this.show()},Group.prototype.hide=function(){this.visible=!1,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination?this.groupManager.updateGroupRows(!0):(this.element.classList.remove("tabulator-group-visible"),this.groupList.length?this.groupList.forEach((function(t){t.getHeadersAndRows().forEach((function(t){t.detachElement()}))})):this.rows.forEach((function(t){var e=t.getElement();e.parentNode.removeChild(e)})),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()),this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!1)},Group.prototype.show=function(){if(this.visible=!0,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination)this.groupManager.updateGroupRows(!0);else{this.element.classList.add("tabulator-group-visible");var t=this.getElement();this.groupList.length?this.groupList.forEach((function(e){e.getHeadersAndRows().forEach((function(e){var o=e.getElement();t.parentNode.insertBefore(o,t.nextSibling),e.initialize(),t=o}))})):this.rows.forEach((function(e){var o=e.getElement();t.parentNode.insertBefore(o,t.nextSibling),e.initialize(),t=o})),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()}this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!0)},Group.prototype._visSet=function(){var t=[];"function"==typeof this.visible&&(this.rows.forEach((function(e){t.push(e.getData())})),this.visible=this.visible(this.key,this.getRowCount(),t,this.getComponent()))},Group.prototype.getRowGroup=function(t){var e=!1;return this.groupList.length?this.groupList.forEach((function(o){var i=o.getRowGroup(t);i&&(e=i)})):this.rows.find((function(e){return e===t}))&&(e=this),e},Group.prototype.getSubGroups=function(t){var e=[];return this.groupList.forEach((function(o){e.push(t?o.getComponent():o)})),e},Group.prototype.getRows=function(t){var e=[];return this.rows.forEach((function(o){e.push(t?o.getComponent():o)})),e},Group.prototype.generateGroupHeaderContents=function(){var t=[];for(this.rows.forEach((function(e){t.push(e.getData())})),this.elementContents=this.generator(this.key,this.getRowCount(),t,this.getComponent());this.element.firstChild;)this.element.removeChild(this.element.firstChild);"string"==typeof this.elementContents?this.element.innerHTML=this.elementContents:this.element.appendChild(this.elementContents),this.element.insertBefore(this.arrowElement,this.element.firstChild)},Group.prototype.getPath=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t.unshift(this.key),this.parent&&this.parent.getPath(t),t},Group.prototype.getElement=function(){this.addBindingsd=!1,this._visSet(),this.visible?this.element.classList.add("tabulator-group-visible"):this.element.classList.remove("tabulator-group-visible");for(var t=0;t<this.element.childNodes.length;++t)this.element.childNodes[t].parentNode.removeChild(this.element.childNodes[t]);return this.generateGroupHeaderContents(),this.element},Group.prototype.detachElement=function(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)},Group.prototype.normalizeHeight=function(){this.setHeight(this.element.clientHeight)},Group.prototype.initialize=function(t){this.initialized&&!t||(this.normalizeHeight(),this.initialized=!0)},Group.prototype.reinitialize=function(){this.initialized=!1,this.height=0,Tabulator.prototype.helpers.elVisible(this.element)&&this.initialize(!0)},Group.prototype.setHeight=function(t){this.height!=t&&(this.height=t,this.outerHeight=this.element.offsetHeight)},Group.prototype.getHeight=function(){return this.outerHeight},Group.prototype.getGroup=function(){return this},Group.prototype.reinitializeHeight=function(){},Group.prototype.calcHeight=function(){},Group.prototype.setCellHeight=function(){},Group.prototype.clearCellHeight=function(){},Group.prototype.getComponent=function(){return this.component||(this.component=new GroupComponent(this)),this.component};var GroupRows=function(t){this.table=t,this.groupIDLookups=!1,this.startOpen=[function(){return!1}],this.headerGenerator=[function(){return""}],this.groupList=[],this.allowedValues=!1,this.groups={},this.displayIndex=0};GroupRows.prototype.initialize=function(){var t=this,e=t.table.options.groupBy,o=t.table.options.groupStartOpen,i=t.table.options.groupHeader;(this.allowedValues=t.table.options.groupValues,Array.isArray(e)&&Array.isArray(i)&&e.length>i.length&&console.warn("Error creating group headers, groupHeader array is shorter than groupBy array"),t.headerGenerator=[function(){return""}],this.startOpen=[function(){return!1}],t.table.modules.localize.bind("groups|item",(function(e,o){t.headerGenerator[0]=function(t,i,n){return(void 0===t?"":t)+"<span>("+i+" "+(1===i?e:o.groups.items)+")</span>"}})),this.groupIDLookups=[],Array.isArray(e)||e)?this.table.modExists("columnCalcs")&&"table"!=this.table.options.columnCalcs&&"both"!=this.table.options.columnCalcs&&this.table.modules.columnCalcs.removeCalcs():this.table.modExists("columnCalcs")&&"group"!=this.table.options.columnCalcs&&this.table.columnManager.getRealColumns().forEach((function(e){e.definition.topCalc&&t.table.modules.columnCalcs.initializeTopRow(),e.definition.bottomCalc&&t.table.modules.columnCalcs.initializeBottomRow()}));Array.isArray(e)||(e=[e]),e.forEach((function(e,o){var i,n;i="function"==typeof e?e:(n=t.table.columnManager.getColumnByField(e))?function(t){return n.getFieldValue(t)}:function(t){return t[e]},t.groupIDLookups.push({field:"function"!=typeof e&&e,func:i,values:!!t.allowedValues&&t.allowedValues[o]})})),o&&(Array.isArray(o)||(o=[o]),o.forEach((function(t){t="function"==typeof t?t:function(){return!0}})),t.startOpen=o),i&&(t.headerGenerator=Array.isArray(i)?i:[i]),this.initialized=!0},GroupRows.prototype.setDisplayIndex=function(t){this.displayIndex=t},GroupRows.prototype.getDisplayIndex=function(){return this.displayIndex},GroupRows.prototype.getRows=function(t){return this.groupIDLookups.length?(this.table.options.dataGrouping.call(this.table),this.generateGroups(t),this.table.options.dataGrouped&&this.table.options.dataGrouped.call(this.table,this.getGroups(!0)),this.updateGroupRows()):t.slice(0)},GroupRows.prototype.getGroups=function(t){var e=[];return this.groupList.forEach((function(o){e.push(t?o.getComponent():o)})),e},GroupRows.prototype.getChildGroups=function(t){var e=this,o=[];return t||(t=this),t.groupList.forEach((function(t){t.groupList.length?o=o.concat(e.getChildGroups(t)):o.push(t)})),o},GroupRows.prototype.wipe=function(){this.groupList.forEach((function(t){t.wipe()}))},GroupRows.prototype.pullGroupListData=function(t){var e=this,o=[];return t.forEach((function(t){var i={level:0,rowCount:0,headerContent:""},n=[];t.hasSubGroups?(n=e.pullGroupListData(t.groupList),i.level=t.level,i.rowCount=n.length-t.groupList.length,i.headerContent=t.generator(t.key,i.rowCount,t.rows,t),o.push(i),o=o.concat(n)):(i.level=t.level,i.headerContent=t.generator(t.key,t.rows.length,t.rows,t),i.rowCount=t.getRows().length,o.push(i),t.getRows().forEach((function(t){o.push(t.getData("data"))})))})),o},GroupRows.prototype.getGroupedData=function(){return this.pullGroupListData(this.groupList)},GroupRows.prototype.getRowGroup=function(t){var e=!1;return this.groupList.forEach((function(o){var i=o.getRowGroup(t);i&&(e=i)})),e},GroupRows.prototype.countGroups=function(){return this.groupList.length},GroupRows.prototype.generateGroups=function(t){var e=this,o=e.groups;e.groups={},e.groupList=[],this.allowedValues&&this.allowedValues[0]?(this.allowedValues[0].forEach((function(t){e.createGroup(t,0,o)})),t.forEach((function(t){e.assignRowToExistingGroup(t,o)}))):t.forEach((function(t){e.assignRowToGroup(t,o)}))},GroupRows.prototype.createGroup=function(t,e,o){var i,n=e+"_"+t;o=o||[],i=new Group(this,!1,e,t,this.groupIDLookups[0].field,this.headerGenerator[0],o[n]),this.groups[n]=i,this.groupList.push(i)},GroupRows.prototype.assignRowToExistingGroup=function(t,e){var o="0_"+this.groupIDLookups[0].func(t.getData());this.groups[o]&&this.groups[o].addRow(t)},GroupRows.prototype.assignRowToGroup=function(t,e){var o=this.groupIDLookups[0].func(t.getData()),i=!this.groups["0_"+o];return i&&this.createGroup(o,0,e),this.groups["0_"+o].addRow(t),!i},GroupRows.prototype.reassignRowToGroup=function(t){var e=t.getGroup(),o=e.getPath(),i=this.getExpectedPath(t);o.length==i.length&&o.every((function(t,e){return t===i[e]}))||(e.removeRow(t),this.assignRowToGroup(t,self.groups),this.table.rowManager.refreshActiveData("group",!1,!0))},GroupRows.prototype.getExpectedPath=function(t){var e=[],o=t.getData();return this.groupIDLookups.forEach((function(t){e.push(t.func(o))})),e},GroupRows.prototype.updateGroupRows=function(t){var e=[];if(this.groupList.forEach((function(t){e=e.concat(t.getHeadersAndRows())})),t){var o=this.table.rowManager.setDisplayRows(e,this.getDisplayIndex());!0!==o&&this.setDisplayIndex(o),this.table.rowManager.refreshActiveData("group",!0,!0)}return e},GroupRows.prototype.scrollHeaders=function(t){this.table.options.virtualDomHoz&&(t-=this.table.vdomHoz.vDomPadLeft),t+="px",this.groupList.forEach((function(e){e.scrollHeader(t)}))},GroupRows.prototype.removeGroup=function(t){var e,o=t.level+"_"+t.key;this.groups[o]&&(delete this.groups[o],(e=this.groupList.indexOf(t))>-1&&this.groupList.splice(e,1))},Tabulator.prototype.registerModule("groupRows",GroupRows);var History=function(t){this.table=t,this.history=[],this.index=-1};History.prototype.clear=function(){this.history=[],this.index=-1},History.prototype.action=function(t,e,o){this.history=this.history.slice(0,this.index+1),this.history.push({type:t,component:e,data:o}),this.index++},History.prototype.getHistoryUndoSize=function(){return this.index+1},History.prototype.getHistoryRedoSize=function(){return this.history.length-(this.index+1)},History.prototype.clearComponentHistory=function(t){var e=this.history.findIndex((function(e){return e.component===t}));e>-1&&(this.history.splice(e,1),e<=this.index&&this.index--,this.clearComponentHistory(t))},History.prototype.undo=function(){if(this.index>-1){var t=this.history[this.index];return this.undoers[t.type].call(this,t),this.index--,this.table.options.historyUndo.call(this.table,t.type,t.component.getComponent(),t.data),!0}return console.warn("History Undo Error - No more history to undo"),!1},History.prototype.redo=function(){if(this.history.length-1>this.index){this.index++;var t=this.history[this.index];return this.redoers[t.type].call(this,t),this.table.options.historyRedo.call(this.table,t.type,t.component.getComponent(),t.data),!0}return console.warn("History Redo Error - No more history to redo"),!1},History.prototype.undoers={cellEdit:function(t){t.component.setValueProcessData(t.data.oldValue)},rowAdd:function(t){t.component.deleteActual()},rowDelete:function(t){var e=this.table.rowManager.addRowActual(t.data.data,t.data.pos,t.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(t.component,e)},rowMove:function(t){this.table.rowManager.moveRowActual(t.component,this.table.rowManager.rows[t.data.posFrom],!t.data.after),this.table.rowManager.redraw()}},History.prototype.redoers={cellEdit:function(t){t.component.setValueProcessData(t.data.newValue)},rowAdd:function(t){var e=this.table.rowManager.addRowActual(t.data.data,t.data.pos,t.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(t.component,e)},rowDelete:function(t){t.component.deleteActual()},rowMove:function(t){this.table.rowManager.moveRowActual(t.component,this.table.rowManager.rows[t.data.posTo],t.data.after),this.table.rowManager.redraw()}},History.prototype._rebindRow=function(t,e){this.history.forEach((function(o){if(o.component instanceof Row)o.component===t&&(o.component=e);else if(o.component instanceof Cell&&o.component.row===t){var i=o.component.column.getField();i&&(o.component=e.getCell(i))}}))},Tabulator.prototype.registerModule("history",History);var HtmlTableImport=function(t){this.table=t,this.fieldIndex=[],this.hasIndex=!1};HtmlTableImport.prototype.parseTable=function(){var t=this.table.element,e=this.table.options,o=(e.columns,t.getElementsByTagName("th")),i=t.getElementsByTagName("tbody")[0],n=[];this.hasIndex=!1,this.table.options.htmlImporting.call(this.table),i=i?i.getElementsByTagName("tr"):[],this._extractOptions(t,e),o.length?this._extractHeaders(o,i):this._generateBlankHeaders(o,i);for(var s=0;s<i.length;s++){var a=i[s].getElementsByTagName("td"),r={};this.hasIndex||(r[e.index]=s);for(var l=0;l<a.length;l++){var u=a[l];void 0!==this.fieldIndex[l]&&(r[this.fieldIndex[l]]=u.innerHTML)}n.push(r)}var c=document.createElement("div"),d=t.attributes;for(var l in d)"object"==_typeof(d[l])&&c.setAttribute(d[l].name,d[l].value);t.parentNode.replaceChild(c,t),e.data=n,this.table.options.htmlImported.call(this.table),this.table.element=c},HtmlTableImport.prototype._extractOptions=function(t,e,o){var i=t.attributes,n=o?Object.assign([],o):Object.keys(e),s={};for(var a in n.forEach((function(t){s[t.toLowerCase()]=t})),i){var r,l=i[a];l&&"object"==(void 0===l?"undefined":_typeof(l))&&l.name&&0===l.name.indexOf("tabulator-")&&(r=l.name.replace("tabulator-",""),void 0!==s[r]&&(e[s[r]]=this._attribValue(l.value)))}},HtmlTableImport.prototype._attribValue=function(t){return"true"===t||"false"!==t&&t},HtmlTableImport.prototype._findCol=function(t){return this.table.options.columns.find((function(e){return e.title===t}))||!1},HtmlTableImport.prototype._extractHeaders=function(t,e){for(var o=0;o<t.length;o++){var i,n=t[o],s=!1,a=this._findCol(n.textContent);a?s=!0:a={title:n.textContent.trim()},a.field||(a.field=n.textContent.trim().toLowerCase().replace(" ","_")),(i=n.getAttribute("width"))&&!a.width&&(a.width=i),n.attributes,this._extractOptions(n,a,Column.prototype.defaultOptionList),this.fieldIndex[o]=a.field,a.field==this.table.options.index&&(this.hasIndex=!0),s||this.table.options.columns.push(a)}},HtmlTableImport.prototype._generateBlankHeaders=function(t,e){for(var o=0;o<t.length;o++){var i=t[o],n={title:"",field:"col"+o};this.fieldIndex[o]=n.field;var s=i.getAttribute("width");s&&(n.width=s),this.table.options.columns.push(n)}},Tabulator.prototype.registerModule("htmlTableImport",HtmlTableImport);var Keybindings=function(t){this.table=t,this.watchKeys=null,this.pressedKeys=null,this.keyupBinding=!1,this.keydownBinding=!1};Keybindings.prototype.initialize=function(){var t=this.table.options.keybindings,e={};if(this.watchKeys={},this.pressedKeys=[],!1!==t){for(var o in this.bindings)e[o]=this.bindings[o];if(Object.keys(t).length)for(var i in t)e[i]=t[i];this.mapBindings(e),this.bindEvents()}},Keybindings.prototype.mapBindings=function(t){var e=this,o=this,i=function(i){e.actions[i]?t[i]&&("object"!==_typeof(t[i])&&(t[i]=[t[i]]),t[i].forEach((function(t){o.mapBinding(i,t)}))):console.warn("Key Binding Error - no such action:",i)};for(var n in t)i(n)},Keybindings.prototype.mapBinding=function(t,e){var o=this,i={action:this.actions[t],keys:[],ctrl:!1,shift:!1,meta:!1};e.toString().toLowerCase().split(" ").join("").split("+").forEach((function(t){switch(t){case"ctrl":i.ctrl=!0;break;case"shift":i.shift=!0;break;case"meta":i.meta=!0;break;default:t=parseInt(t),i.keys.push(t),o.watchKeys[t]||(o.watchKeys[t]=[]),o.watchKeys[t].push(i)}}))},Keybindings.prototype.bindEvents=function(){var t=this;this.keyupBinding=function(e){var o=e.keyCode,i=t.watchKeys[o];i&&(t.pressedKeys.push(o),i.forEach((function(o){t.checkBinding(e,o)})))},this.keydownBinding=function(e){var o=e.keyCode;if(t.watchKeys[o]){var i=t.pressedKeys.indexOf(o);i>-1&&t.pressedKeys.splice(i,1)}},this.table.element.addEventListener("keydown",this.keyupBinding),this.table.element.addEventListener("keyup",this.keydownBinding)},Keybindings.prototype.clearBindings=function(){this.keyupBinding&&this.table.element.removeEventListener("keydown",this.keyupBinding),this.keydownBinding&&this.table.element.removeEventListener("keyup",this.keydownBinding)},Keybindings.prototype.checkBinding=function(t,e){var o=this,i=!0;return t.ctrlKey==e.ctrl&&t.shiftKey==e.shift&&t.metaKey==e.meta&&(e.keys.forEach((function(t){-1==o.pressedKeys.indexOf(t)&&(i=!1)})),i&&e.action.call(o,t),!0)},Keybindings.prototype.bindings={navPrev:"shift + 9",navNext:9,navUp:38,navDown:40,scrollPageUp:33,scrollPageDown:34,scrollToStart:36,scrollToEnd:35,undo:"ctrl + 90",redo:"ctrl + 89",copyToClipboard:"ctrl + 67"},Keybindings.prototype.actions={keyBlock:function(t){t.stopPropagation(),t.preventDefault()},scrollPageUp:function(t){var e=this.table.rowManager,o=e.scrollTop-e.height;e.element.scrollHeight;t.preventDefault(),e.displayRowsCount&&(o>=0?e.element.scrollTop=o:e.scrollToRow(e.getDisplayRows()[0])),this.table.element.focus()},scrollPageDown:function(t){var e=this.table.rowManager,o=e.scrollTop+e.height,i=e.element.scrollHeight;t.preventDefault(),e.displayRowsCount&&(o<=i?e.element.scrollTop=o:e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1])),this.table.element.focus()},scrollToStart:function(t){var e=this.table.rowManager;t.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[0]),this.table.element.focus()},scrollToEnd:function(t){var e=this.table.rowManager;t.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1]),this.table.element.focus()},navPrev:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().prev())},navNext:function(t){var e,o=!1,i=this.table.options.tabEndNewRow;this.table.modExists("edit")&&(o=this.table.modules.edit.currentCell)&&(t.preventDefault(),(e=o.nav()).next()||i&&(o.getElement().firstChild.blur(),(i=!0===i?this.table.addRow({}):"function"==typeof i?this.table.addRow(i(o.row.getComponent())):this.table.addRow(Object.assign({},i))).then((function(){setTimeout((function(){e.next()}))}))))},navLeft:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().left())},navRight:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().right())},navUp:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().up())},navDown:function(t){var e=!1;this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell)&&(t.preventDefault(),e.nav().down())},undo:function(t){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(t.preventDefault(),this.table.modules.history.undo()))},redo:function(t){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(t.preventDefault(),this.table.modules.history.redo()))},copyToClipboard:function(t){this.table.modules.edit.currentCell||this.table.modExists("clipboard",!0)&&this.table.modules.clipboard.copy(!1,!0)}},Tabulator.prototype.registerModule("keybindings",Keybindings);var Menu=function(t){this.table=t,this.menuElements=[],this.blurEvent=this.hideMenu.bind(this),this.escEvent=this.escMenu.bind(this),this.nestedMenuBlock=!1,this.positionReversedX=!1};Menu.prototype.initializeColumnHeader=function(t){var e,o=this;t.definition.headerContextMenu&&(t.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,t,t.definition.headerContextMenu)),this.tapHold(t,t.definition.headerContextMenu)),t.definition.headerMenu&&((e=document.createElement("span")).classList.add("tabulator-header-menu-button"),e.innerHTML="⋮",e.addEventListener("click",(function(e){e.stopPropagation(),e.preventDefault(),o.LoadMenuEvent(t,t.definition.headerMenu,e)})),t.titleElement.insertBefore(e,t.titleElement.firstChild))},Menu.prototype.LoadMenuEvent=function(t,e,o){e="function"==typeof e?e.call(this.table,t.getComponent(),o):e,this.loadMenu(o,t,e)},Menu.prototype.tapHold=function(t,e){var o=this,i=t.getElement(),n=null,s=!1;i.addEventListener("touchstart",(function(i){clearTimeout(n),s=!1,n=setTimeout((function(){clearTimeout(n),n=null,s=!0,o.LoadMenuEvent(t,e,i)}),1e3)}),{passive:!0}),i.addEventListener("touchend",(function(t){clearTimeout(n),n=null,s&&t.preventDefault()}))},Menu.prototype.initializeCell=function(t){t.column.definition.contextMenu&&(t.getElement(!0).addEventListener("contextmenu",this.LoadMenuEvent.bind(this,t,t.column.definition.contextMenu)),this.tapHold(t,t.column.definition.contextMenu)),t.column.definition.clickMenu&&t.getElement(!0).addEventListener("click",this.LoadMenuEvent.bind(this,t,t.column.definition.clickMenu))},Menu.prototype.initializeRow=function(t){this.table.options.rowContextMenu&&(t.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,t,this.table.options.rowContextMenu)),this.tapHold(t,this.table.options.rowContextMenu)),this.table.options.rowClickMenu&&t.getElement().addEventListener("click",this.LoadMenuEvent.bind(this,t,this.table.options.rowClickMenu))},Menu.prototype.initializeGroup=function(t){this.table.options.groupContextMenu&&(t.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,t,this.table.options.groupContextMenu)),this.tapHold(t,this.table.options.groupContextMenu)),this.table.options.groupClickMenu&&t.getElement().addEventListener("click",this.LoadMenuEvent.bind(this,t,this.table.options.groupClickMenu))},Menu.prototype.loadMenu=function(t,e,o,i){var n=this,s=!(t instanceof MouseEvent),a=document.createElement("div");if(a.classList.add("tabulator-menu"),s||t.preventDefault(),o&&o.length){if(!i){if(this.nestedMenuBlock){if(this.isOpen())return}else this.nestedMenuBlock=setTimeout((function(){n.nestedMenuBlock=!1}),100);this.hideMenu(),this.menuElements=[]}o.forEach((function(t){var o=document.createElement("div"),i=t.label,s=t.disabled;t.separator?o.classList.add("tabulator-menu-separator"):(o.classList.add("tabulator-menu-item"),"function"==typeof i&&(i=i.call(n.table,e.getComponent())),i instanceof Node?o.appendChild(i):o.innerHTML=i,"function"==typeof s&&(s=s.call(n.table,e.getComponent())),s?(o.classList.add("tabulator-menu-item-disabled"),o.addEventListener("click",(function(t){t.stopPropagation()}))):t.menu&&t.menu.length?o.addEventListener("click",(function(i){i.stopPropagation(),n.hideOldSubMenus(a),n.loadMenu(i,e,t.menu,o)})):t.action&&o.addEventListener("click",(function(o){t.action(o,e.getComponent())})),t.menu&&t.menu.length&&o.classList.add("tabulator-menu-item-submenu")),a.appendChild(o)})),a.addEventListener("click",(function(t){n.hideMenu()})),this.menuElements.push(a),this.positionMenu(a,i,s,t)}},Menu.prototype.hideOldSubMenus=function(t){var e=this.menuElements.indexOf(t);if(e>-1)for(var o=this.menuElements.length-1;o>e;o--){var i=this.menuElements[o];i.parentNode&&i.parentNode.removeChild(i),this.menuElements.pop()}},Menu.prototype.positionMenu=function(t,e,o,i){var n,s,a,r=this,l=Math.max(document.body.offsetHeight,window.innerHeight);e?(n=(a=Tabulator.prototype.helpers.elOffset(e)).left+e.offsetWidth,s=a.top-1):(n=o?i.touches[0].pageX:i.pageX,s=o?i.touches[0].pageY:i.pageY,this.positionReversedX=!1),t.style.top=s+"px",t.style.left=n+"px",setTimeout((function(){r.table.rowManager.element.addEventListener("scroll",r.blurEvent),document.body.addEventListener("click",r.blurEvent),document.body.addEventListener("contextmenu",r.blurEvent),window.addEventListener("resize",r.blurEvent),document.body.addEventListener("keydown",r.escEvent)}),100),document.body.appendChild(t),s+t.offsetHeight>=l&&(t.style.top="",t.style.bottom=e?l-a.top-e.offsetHeight-1+"px":l-s+"px"),(n+t.offsetWidth>=document.body.offsetWidth||this.positionReversedX)&&(t.style.left="",t.style.right=e?document.documentElement.offsetWidth-a.left+"px":document.documentElement.offsetWidth-n+"px",this.positionReversedX=!0)},Menu.prototype.isOpen=function(){return!!this.menuElements.length},Menu.prototype.escMenu=function(t){27==t.keyCode&&this.hideMenu()},Menu.prototype.hideMenu=function(){this.menuElements.forEach((function(t){t.parentNode&&t.parentNode.removeChild(t)})),document.body.removeEventListener("keydown",this.escEvent),document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),window.removeEventListener("resize",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent)},Menu.prototype.menus={},Tabulator.prototype.registerModule("menu",Menu);var MoveColumns=function(t){this.table=t,this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=250,this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.startX=0,this.autoScrollMargin=40,this.autoScrollStep=5,this.autoScrollTimeout=!1,this.touchMove=!1,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this)};MoveColumns.prototype.createPlaceholderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col"),t.classList.add("tabulator-col-placeholder"),t},MoveColumns.prototype.initializeColumn=function(t){var e,o=this,i={};t.modules.frozen||(e=t.getElement(),i.mousemove=function(i){t.parent===o.moving.parent&&((o.touchMove?i.touches[0].pageX:i.pageX)-Tabulator.prototype.helpers.elOffset(e).left+o.table.columnManager.element.scrollLeft>t.getWidth()/2?o.toCol===t&&o.toColAfter||(e.parentNode.insertBefore(o.placeholderElement,e.nextSibling),o.moveColumn(t,!0)):(o.toCol!==t||o.toColAfter)&&(e.parentNode.insertBefore(o.placeholderElement,e),o.moveColumn(t,!1)))}.bind(o),e.addEventListener("mousedown",(function(e){o.touchMove=!1,1===e.which&&(o.checkTimeout=setTimeout((function(){o.startMove(e,t)}),o.checkPeriod))})),e.addEventListener("mouseup",(function(t){1===t.which&&o.checkTimeout&&clearTimeout(o.checkTimeout)})),o.bindTouchEvents(t)),t.modules.moveColumn=i},MoveColumns.prototype.bindTouchEvents=function(t){var e,o,i,n,s,a,r=this,l=t.getElement(),u=!1;l.addEventListener("touchstart",(function(l){r.checkTimeout=setTimeout((function(){r.touchMove=!0,t,e=t.nextColumn(),i=e?e.getWidth()/2:0,o=t.prevColumn(),n=o?o.getWidth()/2:0,s=0,a=0,u=!1,r.startMove(l,t)}),r.checkPeriod)}),{passive:!0}),l.addEventListener("touchmove",(function(l){var c,d;r.moving&&(r.moveHover(l),u||(u=l.touches[0].pageX),(c=l.touches[0].pageX-u)>0?e&&c-s>i&&(d=e)!==t&&(u=l.touches[0].pageX,d.getElement().parentNode.insertBefore(r.placeholderElement,d.getElement().nextSibling),r.moveColumn(d,!0)):o&&-c-a>n&&(d=o)!==t&&(u=l.touches[0].pageX,d.getElement().parentNode.insertBefore(r.placeholderElement,d.getElement()),r.moveColumn(d,!1)),d&&(d,e=d.nextColumn(),s=i,i=e?e.getWidth()/2:0,o=d.prevColumn(),a=n,n=o?o.getWidth()/2:0))}),{passive:!0}),l.addEventListener("touchend",(function(t){r.checkTimeout&&clearTimeout(r.checkTimeout),r.moving&&r.endMove(t)}))},MoveColumns.prototype.startMove=function(t,e){var o=e.getElement();this.moving=e,this.startX=(this.touchMove?t.touches[0].pageX:t.pageX)-Tabulator.prototype.helpers.elOffset(o).left,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=e.getWidth()+"px",this.placeholderElement.style.height=e.getHeight()+"px",o.parentNode.insertBefore(this.placeholderElement,o),o.parentNode.removeChild(o),this.hoverElement=o.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.table.columnManager.getElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.bottom="0",this.touchMove||(this._bindMouseMove(),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove)),this.moveHover(t)},MoveColumns.prototype._bindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach((function(t){t.modules.moveColumn.mousemove&&t.getElement().addEventListener("mousemove",t.modules.moveColumn.mousemove)}))},MoveColumns.prototype._unbindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach((function(t){t.modules.moveColumn.mousemove&&t.getElement().removeEventListener("mousemove",t.modules.moveColumn.mousemove)}))},MoveColumns.prototype.moveColumn=function(t,e){var o=this.moving.getCells();this.toCol=t,this.toColAfter=e,e?t.getCells().forEach((function(t,e){var i=t.getElement(!0);i.parentNode.insertBefore(o[e].getElement(),i.nextSibling)})):t.getCells().forEach((function(t,e){var i=t.getElement(!0);i.parentNode.insertBefore(o[e].getElement(),i)}))},MoveColumns.prototype.endMove=function(t){(1===t.which||this.touchMove)&&(this._unbindMouseMove(),this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toCol&&this.table.columnManager.moveColumnActual(this.moving,this.toCol,this.toColAfter),this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.touchMove||(document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove)))},MoveColumns.prototype.moveHover=function(t){var e,o=this,i=o.table.columnManager.getElement(),n=i.scrollLeft,s=(o.touchMove?t.touches[0].pageX:t.pageX)-Tabulator.prototype.helpers.elOffset(i).left+n;o.hoverElement.style.left=s-o.startX+"px",s-n<o.autoScrollMargin&&(o.autoScrollTimeout||(o.autoScrollTimeout=setTimeout((function(){e=Math.max(0,n-5),o.table.rowManager.getElement().scrollLeft=e,o.autoScrollTimeout=!1}),1))),n+i.clientWidth-s<o.autoScrollMargin&&(o.autoScrollTimeout||(o.autoScrollTimeout=setTimeout((function(){e=Math.min(i.clientWidth,n+5),o.table.rowManager.getElement().scrollLeft=e,o.autoScrollTimeout=!1}),1)))},Tabulator.prototype.registerModule("moveColumn",MoveColumns);var MoveRows=function(t){this.table=t,this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=150,this.moving=!1,this.toRow=!1,this.toRowAfter=!1,this.hasHandle=!1,this.startY=0,this.startX=0,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this),this.tableRowDropEvent=!1,this.touchMove=!1,this.connection=!1,this.connectionSelectorsTables=!1,this.connectionSelectorsElements=!1,this.connectionElements=[],this.connections=[],this.connectedTable=!1,this.connectedRow=!1};MoveRows.prototype.createPlaceholderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-row"),t.classList.add("tabulator-row-placeholder"),t},MoveRows.prototype.initialize=function(t){this.connectionSelectorsTables=this.table.options.movableRowsConnectedTables,this.connectionSelectorsElements=this.table.options.movableRowsConnectedElements,this.connection=this.connectionSelectorsTables||this.connectionSelectorsElements},MoveRows.prototype.setHandle=function(t){this.hasHandle=t},MoveRows.prototype.initializeGroupHeader=function(t){var e=this,o={};o.mouseup=function(t){e.tableRowDrop(t,row)}.bind(e),o.mousemove=function(o){var i;o.pageY-Tabulator.prototype.helpers.elOffset(t.element).top+e.table.rowManager.element.scrollTop>t.getHeight()/2?e.toRow===t&&e.toRowAfter||((i=t.getElement()).parentNode.insertBefore(e.placeholderElement,i.nextSibling),e.moveRow(t,!0)):(e.toRow!==t||e.toRowAfter)&&(i=t.getElement()).previousSibling&&(i.parentNode.insertBefore(e.placeholderElement,i),e.moveRow(t,!1))}.bind(e),t.modules.moveRow=o},MoveRows.prototype.initializeRow=function(t){var e,o=this,i={};i.mouseup=function(e){o.tableRowDrop(e,t)}.bind(o),i.mousemove=function(e){var i=t.getElement();e.pageY-Tabulator.prototype.helpers.elOffset(i).top+o.table.rowManager.element.scrollTop>t.getHeight()/2?o.toRow===t&&o.toRowAfter||(i.parentNode.insertBefore(o.placeholderElement,i.nextSibling),o.moveRow(t,!0)):(o.toRow!==t||o.toRowAfter)&&(i.parentNode.insertBefore(o.placeholderElement,i),o.moveRow(t,!1))}.bind(o),this.hasHandle||((e=t.getElement()).addEventListener("mousedown",(function(e){1===e.which&&(o.checkTimeout=setTimeout((function(){o.startMove(e,t)}),o.checkPeriod))})),e.addEventListener("mouseup",(function(t){1===t.which&&o.checkTimeout&&clearTimeout(o.checkTimeout)})),this.bindTouchEvents(t,t.getElement())),t.modules.moveRow=i},MoveRows.prototype.initializeCell=function(t){var e=this,o=t.getElement(!0);o.addEventListener("mousedown",(function(o){1===o.which&&(e.checkTimeout=setTimeout((function(){e.startMove(o,t.row)}),e.checkPeriod))})),o.addEventListener("mouseup",(function(t){1===t.which&&e.checkTimeout&&clearTimeout(e.checkTimeout)})),this.bindTouchEvents(t.row,o)},MoveRows.prototype.bindTouchEvents=function(t,e){var o,i,n,s,a,r,l=this,u=!1;e.addEventListener("touchstart",(function(e){l.checkTimeout=setTimeout((function(){l.touchMove=!0,t,o=t.nextRow(),n=o?o.getHeight()/2:0,i=t.prevRow(),s=i?i.getHeight()/2:0,a=0,r=0,u=!1,l.startMove(e,t)}),l.checkPeriod)}),{passive:!0}),this.moving,this.toRow,this.toRowAfter,e.addEventListener("touchmove",(function(e){var c,d;l.moving&&(e.preventDefault(),l.moveHover(e),u||(u=e.touches[0].pageY),(c=e.touches[0].pageY-u)>0?o&&c-a>n&&(d=o)!==t&&(u=e.touches[0].pageY,d.getElement().parentNode.insertBefore(l.placeholderElement,d.getElement().nextSibling),l.moveRow(d,!0)):i&&-c-r>s&&(d=i)!==t&&(u=e.touches[0].pageY,d.getElement().parentNode.insertBefore(l.placeholderElement,d.getElement()),l.moveRow(d,!1)),d&&(d,o=d.nextRow(),a=n,n=o?o.getHeight()/2:0,i=d.prevRow(),r=s,s=i?i.getHeight()/2:0))})),e.addEventListener("touchend",(function(t){l.checkTimeout&&clearTimeout(l.checkTimeout),l.moving&&(l.endMove(t),l.touchMove=!1)}))},MoveRows.prototype._bindMouseMove=function(){this.table.rowManager.getDisplayRows().forEach((function(t){"row"!==t.type&&"group"!==t.type||!t.modules.moveRow.mousemove||t.getElement().addEventListener("mousemove",t.modules.moveRow.mousemove)}))},MoveRows.prototype._unbindMouseMove=function(){this.table.rowManager.getDisplayRows().forEach((function(t){"row"!==t.type&&"group"!==t.type||!t.modules.moveRow.mousemove||t.getElement().removeEventListener("mousemove",t.modules.moveRow.mousemove)}))},MoveRows.prototype.startMove=function(t,e){var o=e.getElement();this.setStartPosition(t,e),this.moving=e,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=e.getWidth()+"px",this.placeholderElement.style.height=e.getHeight()+"px",this.connection?(this.table.element.classList.add("tabulator-movingrow-sending"),this.connectToTables(e)):(o.parentNode.insertBefore(this.placeholderElement,o),o.parentNode.removeChild(o)),this.hoverElement=o.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.connection?(document.body.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this.hoverElement.style.width=this.table.element.clientWidth+"px",this.hoverElement.style.whiteSpace="nowrap",this.hoverElement.style.overflow="hidden",this.hoverElement.style.pointerEvents="none"):(this.table.rowManager.getTableElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this._bindMouseMove()),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove),this.moveHover(t)},MoveRows.prototype.setStartPosition=function(t,e){var o,i,n=this.touchMove?t.touches[0].pageX:t.pageX,s=this.touchMove?t.touches[0].pageY:t.pageY;o=e.getElement(),this.connection?(i=o.getBoundingClientRect(),this.startX=i.left-n+window.pageXOffset,this.startY=i.top-s+window.pageYOffset):this.startY=s-o.getBoundingClientRect().top},MoveRows.prototype.endMove=function(t){t&&1!==t.which&&!this.touchMove||(this._unbindMouseMove(),this.connection||(this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement)),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toRow&&this.table.rowManager.moveRow(this.moving,this.toRow,this.toRowAfter),this.moving=!1,this.toRow=!1,this.toRowAfter=!1,document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove),this.connection&&(this.table.element.classList.remove("tabulator-movingrow-sending"),this.disconnectFromTables()))},MoveRows.prototype.moveRow=function(t,e){this.toRow=t,this.toRowAfter=e},MoveRows.prototype.moveHover=function(t){this.connection?this.moveHoverConnections.call(this,t):this.moveHoverTable.call(this,t)},MoveRows.prototype.moveHoverTable=function(t){var e=this.table.rowManager.getElement(),o=e.scrollTop,i=(this.touchMove?t.touches[0].pageY:t.pageY)-e.getBoundingClientRect().top+o;this.hoverElement.style.top=i-this.startY+"px"},MoveRows.prototype.moveHoverConnections=function(t){this.hoverElement.style.left=this.startX+(this.touchMove?t.touches[0].pageX:t.pageX)+"px",this.hoverElement.style.top=this.startY+(this.touchMove?t.touches[0].pageY:t.pageY)+"px"},MoveRows.prototype.elementRowDrop=function(t,e,o){this.table.options.movableRowsElementDrop&&this.table.options.movableRowsElementDrop(t,e,!!o&&o.getComponent())},MoveRows.prototype.connectToTables=function(t){var e,o=this;this.connectionSelectorsTables&&(e=this.table.modules.comms.getConnections(this.connectionSelectorsTables),this.table.options.movableRowsSendingStart.call(this.table,e),this.table.modules.comms.send(this.connectionSelectorsTables,"moveRow","connect",{row:t})),this.connectionSelectorsElements&&(this.connectionElements=[],Array.isArray(this.connectionSelectorsElements)||(this.connectionSelectorsElements=[this.connectionSelectorsElements]),this.connectionSelectorsElements.forEach((function(t){"string"==typeof t?o.connectionElements=o.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(t))):o.connectionElements.push(t)})),this.connectionElements.forEach((function(t){var e=function(e){o.elementRowDrop(e,t,o.moving)};t.addEventListener("mouseup",e),t.tabulatorElementDropEvent=e,t.classList.add("tabulator-movingrow-receiving")})))},MoveRows.prototype.disconnectFromTables=function(){var t;this.connectionSelectorsTables&&(t=this.table.modules.comms.getConnections(this.connectionSelectorsTables),this.table.options.movableRowsSendingStop.call(this.table,t),this.table.modules.comms.send(this.connectionSelectorsTables,"moveRow","disconnect")),this.connectionElements.forEach((function(t){t.classList.remove("tabulator-movingrow-receiving"),t.removeEventListener("mouseup",t.tabulatorElementDropEvent),delete t.tabulatorElementDropEvent}))},MoveRows.prototype.connect=function(t,e){return this.connectedTable?(console.warn("Move Row Error - Table cannot accept connection, already connected to table:",this.connectedTable),!1):(this.connectedTable=t,this.connectedRow=e,this.table.element.classList.add("tabulator-movingrow-receiving"),this.table.rowManager.getDisplayRows().forEach((function(t){"row"===t.type&&t.modules.moveRow&&t.modules.moveRow.mouseup&&t.getElement().addEventListener("mouseup",t.modules.moveRow.mouseup)})),this.tableRowDropEvent=this.tableRowDrop.bind(this),this.table.element.addEventListener("mouseup",this.tableRowDropEvent),this.table.options.movableRowsReceivingStart.call(this.table,e,t),!0)},MoveRows.prototype.disconnect=function(t){t===this.connectedTable?(this.connectedTable=!1,this.connectedRow=!1,this.table.element.classList.remove("tabulator-movingrow-receiving"),this.table.rowManager.getDisplayRows().forEach((function(t){"row"===t.type&&t.modules.moveRow&&t.modules.moveRow.mouseup&&t.getElement().removeEventListener("mouseup",t.modules.moveRow.mouseup)})),this.table.element.removeEventListener("mouseup",this.tableRowDropEvent),this.table.options.movableRowsReceivingStop.call(this.table,t)):console.warn("Move Row Error - trying to disconnect from non connected table")},MoveRows.prototype.dropComplete=function(t,e,o){var i=!1;if(o){switch(_typeof(this.table.options.movableRowsSender)){case"string":i=this.senders[this.table.options.movableRowsSender];break;case"function":i=this.table.options.movableRowsSender}i?i.call(this,this.moving.getComponent(),e?e.getComponent():void 0,t):this.table.options.movableRowsSender&&console.warn("Mover Row Error - no matching sender found:",this.table.options.movableRowsSender),this.table.options.movableRowsSent.call(this.table,this.moving.getComponent(),e?e.getComponent():void 0,t)}else this.table.options.movableRowsSentFailed.call(this.table,this.moving.getComponent(),e?e.getComponent():void 0,t);this.endMove()},MoveRows.prototype.tableRowDrop=function(t,e){var o=!1,i=!1;switch(t.stopImmediatePropagation(),_typeof(this.table.options.movableRowsReceiver)){case"string":o=this.receivers[this.table.options.movableRowsReceiver];break;case"function":o=this.table.options.movableRowsReceiver}o?i=o.call(this,this.connectedRow.getComponent(),e?e.getComponent():void 0,this.connectedTable):console.warn("Mover Row Error - no matching receiver found:",this.table.options.movableRowsReceiver),i?this.table.options.movableRowsReceived.call(this.table,this.connectedRow.getComponent(),e?e.getComponent():void 0,this.connectedTable):this.table.options.movableRowsReceivedFailed.call(this.table,this.connectedRow.getComponent(),e?e.getComponent():void 0,this.connectedTable),this.table.modules.comms.send(this.connectedTable,"moveRow","dropcomplete",{row:e,success:i})},MoveRows.prototype.receivers={insert:function(t,e,o){return this.table.addRow(t.getData(),void 0,e),!0},add:function(t,e,o){return this.table.addRow(t.getData()),!0},update:function(t,e,o){return!!e&&(e.update(t.getData()),!0)},replace:function(t,e,o){return!!e&&(this.table.addRow(t.getData(),void 0,e),e.delete(),!0)}},MoveRows.prototype.senders={delete:function(t,e,o){t.delete()}},MoveRows.prototype.commsReceived=function(t,e,o){switch(e){case"connect":return this.connect(t,o.row);case"disconnect":return this.disconnect(t);case"dropcomplete":return this.dropComplete(t,o.row,o.success)}},Tabulator.prototype.registerModule("moveRow",MoveRows);var Mutator=function(t){this.table=t,this.allowedTypes=["","data","edit","clipboard"],this.enabled=!0};Mutator.prototype.initializeColumn=function(t){var e=this,o=!1,i={};this.allowedTypes.forEach((function(n){var s,a="mutator"+(n.charAt(0).toUpperCase()+n.slice(1));t.definition[a]&&(s=e.lookupMutator(t.definition[a]))&&(o=!0,i[a]={mutator:s,params:t.definition[a+"Params"]||{}})})),o&&(t.modules.mutate=i)},Mutator.prototype.lookupMutator=function(t){var e=!1;switch(void 0===t?"undefined":_typeof(t)){case"string":this.mutators[t]?e=this.mutators[t]:console.warn("Mutator Error - No such mutator found, ignoring: ",t);break;case"function":e=t}return e},Mutator.prototype.transformRow=function(t,e,o){var i,n="mutator"+(e.charAt(0).toUpperCase()+e.slice(1));return this.enabled&&this.table.columnManager.traverse((function(s){var a,r,l;s.modules.mutate&&(a=s.modules.mutate[n]||s.modules.mutate.mutator||!1)&&(i=s.getFieldValue(void 0!==o?o:t),"data"!=e&&void 0===i||(l=s.getComponent(),r="function"==typeof a.params?a.params(i,t,e,l):a.params,s.setFieldValue(t,a.mutator(i,t,e,r,l))))})),t},Mutator.prototype.transformCell=function(t,e){var o=t.column.modules.mutate.mutatorEdit||t.column.modules.mutate.mutator||!1,i={};return o?(i=Object.assign(i,t.row.getData()),t.column.setFieldValue(i,e),o.mutator(e,i,"edit",o.params,t.getComponent())):e},Mutator.prototype.enable=function(){this.enabled=!0},Mutator.prototype.disable=function(){this.enabled=!1},Mutator.prototype.mutators={},Tabulator.prototype.registerModule("mutator",Mutator);var Page=function(t){this.table=t,this.mode="local",this.progressiveLoad=!1,this.size=0,this.page=1,this.count=5,this.max=1,this.displayIndex=0,this.initialLoad=!0,this.pageSizes=[],this.dataReceivedNames={},this.dataSentNames={},this.createElements()};Page.prototype.createElements=function(){var t;this.element=document.createElement("span"),this.element.classList.add("tabulator-paginator"),this.pagesElement=document.createElement("span"),this.pagesElement.classList.add("tabulator-pages"),(t=document.createElement("button")).classList.add("tabulator-page"),t.setAttribute("type","button"),t.setAttribute("role","button"),t.setAttribute("aria-label",""),t.setAttribute("title",""),this.firstBut=t.cloneNode(!0),this.firstBut.setAttribute("data-page","first"),this.prevBut=t.cloneNode(!0),this.prevBut.setAttribute("data-page","prev"),this.nextBut=t.cloneNode(!0),this.nextBut.setAttribute("data-page","next"),this.lastBut=t.cloneNode(!0),this.lastBut.setAttribute("data-page","last"),this.table.options.paginationSizeSelector&&(this.pageSizeSelect=document.createElement("select"),this.pageSizeSelect.classList.add("tabulator-page-size"))},Page.prototype.generatePageSizeSelectList=function(){var t=this,e=[];if(this.pageSizeSelect){if(Array.isArray(this.table.options.paginationSizeSelector))e=this.table.options.paginationSizeSelector,this.pageSizes=e,-1==this.pageSizes.indexOf(this.size)&&e.unshift(this.size);else if(-1==this.pageSizes.indexOf(this.size)){e=[];for(var o=1;o<5;o++)e.push(this.size*o);this.pageSizes=e}else e=this.pageSizes;for(;this.pageSizeSelect.firstChild;)this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild);e.forEach((function(e){var o=document.createElement("option");o.value=e,!0===e?t.table.modules.localize.bind("pagination|all",(function(t){o.innerHTML=t})):o.innerHTML=e,t.pageSizeSelect.appendChild(o)})),this.pageSizeSelect.value=this.size}},Page.prototype.initialize=function(t){var e,o,i,n=this;this.dataSentNames=Object.assign({},this.paginationDataSentNames),this.dataSentNames=Object.assign(this.dataSentNames,this.table.options.paginationDataSent),this.dataReceivedNames=Object.assign({},this.paginationDataReceivedNames),this.dataReceivedNames=Object.assign(this.dataReceivedNames,this.table.options.paginationDataReceived),n.table.modules.localize.bind("pagination|first",(function(t){n.firstBut.innerHTML=t})),n.table.modules.localize.bind("pagination|first_title",(function(t){n.firstBut.setAttribute("aria-label",t),n.firstBut.setAttribute("title",t)})),n.table.modules.localize.bind("pagination|prev",(function(t){n.prevBut.innerHTML=t})),n.table.modules.localize.bind("pagination|prev_title",(function(t){n.prevBut.setAttribute("aria-label",t),n.prevBut.setAttribute("title",t)})),n.table.modules.localize.bind("pagination|next",(function(t){n.nextBut.innerHTML=t})),n.table.modules.localize.bind("pagination|next_title",(function(t){n.nextBut.setAttribute("aria-label",t),n.nextBut.setAttribute("title",t)})),n.table.modules.localize.bind("pagination|last",(function(t){n.lastBut.innerHTML=t})),n.table.modules.localize.bind("pagination|last_title",(function(t){n.lastBut.setAttribute("aria-label",t),n.lastBut.setAttribute("title",t)})),n.firstBut.addEventListener("click",(function(){n.setPage(1).then((function(){})).catch((function(){}))})),n.prevBut.addEventListener("click",(function(){n.previousPage().then((function(){})).catch((function(){}))})),n.nextBut.addEventListener("click",(function(){n.nextPage().then((function(){})).catch((function(){}))})),n.lastBut.addEventListener("click",(function(){n.setPage(n.max).then((function(){})).catch((function(){}))})),n.table.options.paginationElement&&(n.element=n.table.options.paginationElement),this.pageSizeSelect&&(e=document.createElement("label"),n.table.modules.localize.bind("pagination|page_size",(function(t){n.pageSizeSelect.setAttribute("aria-label",t),n.pageSizeSelect.setAttribute("title",t),e.innerHTML=t})),n.element.appendChild(e),n.element.appendChild(n.pageSizeSelect),n.pageSizeSelect.addEventListener("change",(function(t){n.setPageSize("true"==n.pageSizeSelect.value||n.pageSizeSelect.value),n.setPage(1).then((function(){})).catch((function(){}))}))),n.element.appendChild(n.firstBut),n.element.appendChild(n.prevBut),n.element.appendChild(n.pagesElement),n.element.appendChild(n.nextBut),n.element.appendChild(n.lastBut),n.table.options.paginationElement||t||n.table.footerManager.append(n.element,n),n.mode=n.table.options.pagination,n.table.options.paginationSize?n.size=n.table.options.paginationSize:((o=document.createElement("div")).classList.add("tabulator-row"),o.style.visibility=t,(i=document.createElement("div")).classList.add("tabulator-cell"),i.innerHTML="Page Row Test",o.appendChild(i),n.table.rowManager.getTableElement().appendChild(o),n.size=Math.floor(n.table.rowManager.getElement().clientHeight/o.offsetHeight),n.table.rowManager.getTableElement().removeChild(o)),n.count=n.table.options.paginationButtonCount,n.generatePageSizeSelectList()},Page.prototype.initializeProgressive=function(t){this.initialize(!0),this.mode="progressive_"+t,this.progressiveLoad=!0},Page.prototype.setDisplayIndex=function(t){this.displayIndex=t},Page.prototype.getDisplayIndex=function(){return this.displayIndex},Page.prototype.setMaxRows=function(t){this.max=t?!0===this.size?1:Math.ceil(t/this.size):1,this.page>this.max&&(this.page=this.max)},Page.prototype.reset=function(t,e){return("local"==this.mode||t)&&(this.page=1),e&&(this.initialLoad=!0),!0},Page.prototype.setMaxPage=function(t){t=parseInt(t),this.max=t||1,this.page>this.max&&(this.page=this.max,this.trigger())},Page.prototype.setPage=function(t){var e=this,o=this;switch(t){case"first":return this.setPage(1);case"prev":return this.previousPage();case"next":return this.nextPage();case"last":return this.setPage(this.max)}return new Promise((function(i,n){(t=parseInt(t))>0&&t<=e.max||"local"!==e.mode?(e.page=t,e.trigger().then((function(){i()})).catch((function(){n()})),o.table.options.persistence&&o.table.modExists("persistence",!0)&&o.table.modules.persistence.config.page&&o.table.modules.persistence.save("page")):(console.warn("Pagination Error - Requested page is out of range of 1 - "+e.max+":",t),n())}))},Page.prototype.setPageToRow=function(t){var e=this;return new Promise((function(o,i){var n=e.table.rowManager.getDisplayRows(e.displayIndex-1).indexOf(t);if(n>-1){var s=!0===e.size?1:Math.ceil((n+1)/e.size);e.setPage(s).then((function(){o()})).catch((function(){i()}))}else console.warn("Pagination Error - Requested row is not visible"),i()}))},Page.prototype.setPageSize=function(t){!0!==t&&(t=parseInt(t)),t>0&&(this.size=t),this.pageSizeSelect&&this.generatePageSizeSelectList(),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.page&&this.table.modules.persistence.save("page")},Page.prototype._setPageButtons=function(){for(var t=Math.floor((this.count-1)/2),e=Math.ceil((this.count-1)/2),o=this.max-this.page+t+1<this.count?this.max-this.count+1:Math.max(this.page-t,1),i=this.page<=e?Math.min(this.count,this.max):Math.min(this.page+e,this.max);this.pagesElement.firstChild;)this.pagesElement.removeChild(this.pagesElement.firstChild);1==this.page?(this.firstBut.disabled=!0,this.prevBut.disabled=!0):(this.firstBut.disabled=!1,this.prevBut.disabled=!1),this.page==this.max?(this.lastBut.disabled=!0,this.nextBut.disabled=!0):(this.lastBut.disabled=!1,this.nextBut.disabled=!1);for(var n=o;n<=i;n++)n>0&&n<=this.max&&this.pagesElement.appendChild(this._generatePageButton(n));this.footerRedraw()},Page.prototype._generatePageButton=function(t){var e=this,o=document.createElement("button");return o.classList.add("tabulator-page"),t==e.page&&o.classList.add("active"),o.setAttribute("type","button"),o.setAttribute("role","button"),e.table.modules.localize.bind("pagination|page_title",(function(e){o.setAttribute("aria-label",e+" "+t),o.setAttribute("title",e+" "+t)})),o.setAttribute("data-page",t),o.textContent=t,o.addEventListener("click",(function(o){e.setPage(t).then((function(){})).catch((function(){}))})),o},Page.prototype.previousPage=function(){var t=this;return new Promise((function(e,o){t.page>1?(t.page--,t.trigger().then((function(){e()})).catch((function(){o()})),t.table.options.persistence&&t.table.modExists("persistence",!0)&&t.table.modules.persistence.config.page&&t.table.modules.persistence.save("page")):(console.warn("Pagination Error - Previous page would be less than page 1:",0),o())}))},Page.prototype.nextPage=function(){var t=this;return new Promise((function(e,o){t.page<t.max?(t.page++,t.trigger().then((function(){e()})).catch((function(){o()})),t.table.options.persistence&&t.table.modExists("persistence",!0)&&t.table.modules.persistence.config.page&&t.table.modules.persistence.save("page")):(t.progressiveLoad||console.warn("Pagination Error - Next page would be greater than maximum page of "+t.max+":",t.max+1),o())}))},Page.prototype.getPage=function(){return this.page},Page.prototype.getPageMax=function(){return this.max},Page.prototype.getPageSize=function(t){return this.size},Page.prototype.getMode=function(){return this.mode},Page.prototype.getRows=function(t){var e,o,i;if("local"==this.mode){e=[],!0===this.size?(o=0,i=t.length):i=(o=this.size*(this.page-1))+parseInt(this.size),this._setPageButtons();for(var n=o;n<i;n++)t[n]&&e.push(t[n]);return e}return this._setPageButtons(),t.slice(0)},Page.prototype.trigger=function(){var t,e=this;return new Promise((function(o,i){switch(e.mode){case"local":t=e.table.rowManager.scrollLeft,e.table.rowManager.refreshActiveData("page"),e.table.rowManager.scrollHorizontal(t),e.table.options.pageLoaded.call(e.table,e.getPage()),o();break;case"remote":case"progressive_load":case"progressive_scroll":e.table.modules.ajax.blockActiveRequest(),e._getRemotePage().then((function(){o()})).catch((function(){i()}));break;default:console.warn("Pagination Error - no such pagination mode:",e.mode),i()}}))},Page.prototype._getRemotePage=function(){var t,e,o=this,i=this;return new Promise((function(n,s){if(i.table.modExists("ajax",!0)||s(),t=Tabulator.prototype.helpers.deepClone(i.table.modules.ajax.getParams()||{}),(e=i.table.modules.ajax.getParams())[o.dataSentNames.page]=i.page,o.size&&(e[o.dataSentNames.size]=o.size),o.table.options.ajaxSorting&&o.table.modExists("sort")){var a=i.table.modules.sort.getSort();a.forEach((function(t){delete t.column})),e[o.dataSentNames.sorters]=a}if(o.table.options.ajaxFiltering&&o.table.modExists("filter")){var r=i.table.modules.filter.getFilters(!0,!0);e[o.dataSentNames.filters]=r}i.table.modules.ajax.setParams(e),i.table.modules.ajax.sendRequest(o.progressiveLoad).then((function(t){i._parseRemoteData(t),n()})).catch((function(t){s()})),i.table.modules.ajax.setParams(t)}))},Page.prototype._parseRemoteData=function(t){var e,o,i=this;if(void 0===t[this.dataReceivedNames.last_page]&&console.warn("Remote Pagination Error - Server response missing '"+this.dataReceivedNames.last_page+"' property"),t[this.dataReceivedNames.data]){if(this.max=parseInt(t[this.dataReceivedNames.last_page])||1,this.progressiveLoad)switch(this.mode){case"progressive_load":1==this.page?this.table.rowManager.setData(t[this.dataReceivedNames.data],!1,this.initialLoad&&1==this.page):this.table.rowManager.addRows(t[this.dataReceivedNames.data]),this.page<this.max&&setTimeout((function(){i.nextPage().then((function(){})).catch((function(){}))}),i.table.options.ajaxProgressiveLoadDelay);break;case"progressive_scroll":t=this.table.rowManager.getData().concat(t[this.dataReceivedNames.data]),this.table.rowManager.setData(t,!0,this.initialLoad&&1==this.page),o=this.table.options.ajaxProgressiveLoadScrollMargin||2*this.table.rowManager.element.clientHeight,i.table.rowManager.element.scrollHeight<=i.table.rowManager.element.clientHeight+o&&i.nextPage().then((function(){})).catch((function(){}))}else e=this.table.rowManager.scrollLeft,this.table.rowManager.setData(t[this.dataReceivedNames.data],!1,this.initialLoad&&1==this.page),this.table.rowManager.scrollHorizontal(e),this.table.columnManager.scrollHorizontal(e),this.table.options.pageLoaded.call(this.table,this.getPage());this.initialLoad=!1}else console.warn("Remote Pagination Error - Server response missing '"+this.dataReceivedNames.data+"' property")},Page.prototype.footerRedraw=function(){var t=this.table.footerManager.element;Math.ceil(t.clientWidth)-t.scrollWidth<0?this.pagesElement.style.display="none":(this.pagesElement.style.display="",Math.ceil(t.clientWidth)-t.scrollWidth<0&&(this.pagesElement.style.display="none"))},Page.prototype.paginationDataSentNames={page:"page",size:"size",sorters:"sorters",filters:"filters"},Page.prototype.paginationDataReceivedNames={current_page:"current_page",last_page:"last_page",data:"data"},Tabulator.prototype.registerModule("page",Page);var Persistence=function(t){this.table=t,this.mode="",this.id="",this.defWatcherBlock=!1,this.config={},this.readFunc=!1,this.writeFunc=!1};Persistence.prototype.localStorageTest=function(){var t="_tabulator_test";try{return window.localStorage.setItem(t,t),window.localStorage.removeItem(t),!0}catch(t){return!1}},Persistence.prototype.initialize=function(){var t,e=this.table.options.persistenceMode,o=this.table.options.persistenceID;this.mode=!0!==e?e:this.localStorageTest()?"local":"cookie",this.table.options.persistenceReaderFunc?"function"==typeof this.table.options.persistenceReaderFunc?this.readFunc=this.table.options.persistenceReaderFunc:this.readers[this.table.options.persistenceReaderFunc]?this.readFunc=this.readers[this.table.options.persistenceReaderFunc]:console.warn("Persistence Read Error - invalid reader set",this.table.options.persistenceReaderFunc):this.readers[this.mode]?this.readFunc=this.readers[this.mode]:console.warn("Persistence Read Error - invalid reader set",this.mode),this.table.options.persistenceWriterFunc?"function"==typeof this.table.options.persistenceWriterFunc?this.writeFunc=this.table.options.persistenceWriterFunc:this.readers[this.table.options.persistenceWriterFunc]?this.writeFunc=this.readers[this.table.options.persistenceWriterFunc]:console.warn("Persistence Write Error - invalid reader set",this.table.options.persistenceWriterFunc):this.writers[this.mode]?this.writeFunc=this.writers[this.mode]:console.warn("Persistence Write Error - invalid writer set",this.mode),this.id="tabulator-"+(o||this.table.element.getAttribute("id")||""),this.config={sort:!0===this.table.options.persistence||this.table.options.persistence.sort,filter:!0===this.table.options.persistence||this.table.options.persistence.filter,group:!0===this.table.options.persistence||this.table.options.persistence.group,page:!0===this.table.options.persistence||this.table.options.persistence.page,columns:!0===this.table.options.persistence?["title","width","visible"]:this.table.options.persistence.columns},this.config.page&&(t=this.retreiveData("page"))&&(void 0===t.paginationSize||!0!==this.config.page&&!this.config.page.size||(this.table.options.paginationSize=t.paginationSize),void 0===t.paginationInitialPage||!0!==this.config.page&&!this.config.page.page||(this.table.options.paginationInitialPage=t.paginationInitialPage)),this.config.group&&(t=this.retreiveData("group"))&&(void 0===t.groupBy||!0!==this.config.group&&!this.config.group.groupBy||(this.table.options.groupBy=t.groupBy),void 0===t.groupStartOpen||!0!==this.config.group&&!this.config.group.groupStartOpen||(this.table.options.groupStartOpen=t.groupStartOpen),void 0===t.groupHeader||!0!==this.config.group&&!this.config.group.groupHeader||(this.table.options.groupHeader=t.groupHeader)),this.config.columns&&(this.table.options.columns=this.load("columns",this.table.options.columns))},Persistence.prototype.initializeColumn=function(t){var e,o=this;this.config.columns&&(this.defWatcherBlock=!0,e=t.getDefinition(),(!0===this.config.columns?Object.keys(e):this.config.columns).forEach((function(t){var i=Object.getOwnPropertyDescriptor(e,t),n=e[t];i&&Object.defineProperty(e,t,{set:function(t){n=t,o.defWatcherBlock||o.save("columns"),i.set&&i.set(t)},get:function(){return i.get&&i.get(),n}})})),this.defWatcherBlock=!1)},Persistence.prototype.load=function(t,e){var o=this.retreiveData(t);return e&&(o=o?this.mergeDefinition(e,o):e),o},Persistence.prototype.retreiveData=function(t){return!!this.readFunc&&this.readFunc(this.id,t)},Persistence.prototype.mergeDefinition=function(t,e){var o=this,i=[];return(e=e||[]).forEach((function(e,n){var s,a=o._findColumn(t,e);a&&(!0===o.config.columns||null==o.config.columns?(s=Object.keys(a)).push("width"):s=o.config.columns,s.forEach((function(t){"columns"!==t&&void 0!==e[t]&&(a[t]=e[t])})),a.columns&&(a.columns=o.mergeDefinition(a.columns,e.columns)),i.push(a))})),t.forEach((function(t,n){o._findColumn(e,t)||(i.length>n?i.splice(n,0,t):i.push(t))})),i},Persistence.prototype._findColumn=function(t,e){var o=e.columns?"group":e.field?"field":"object";return t.find((function(t){switch(o){case"group":return t.title===e.title&&t.columns.length===e.columns.length;case"field":return t.field===e.field;case"object":return t===e}}))},Persistence.prototype.save=function(t){var e={};switch(t){case"columns":e=this.parseColumns(this.table.columnManager.getColumns());break;case"filter":e=this.table.modules.filter.getFilters();break;case"sort":e=this.validateSorters(this.table.modules.sort.getSort());break;case"group":e=this.getGroupConfig();break;case"page":e=this.getPageConfig()}this.writeFunc&&this.writeFunc(this.id,t,e)},Persistence.prototype.validateSorters=function(t){return t.forEach((function(t){t.column=t.field,delete t.field})),t},Persistence.prototype.getGroupConfig=function(){var t={};return this.config.group&&((!0===this.config.group||this.config.group.groupBy)&&(t.groupBy=this.table.options.groupBy),(!0===this.config.group||this.config.group.groupStartOpen)&&(t.groupStartOpen=this.table.options.groupStartOpen),(!0===this.config.group||this.config.group.groupHeader)&&(t.groupHeader=this.table.options.groupHeader)),t},Persistence.prototype.getPageConfig=function(){var t={};return this.config.page&&((!0===this.config.page||this.config.page.size)&&(t.paginationSize=this.table.modules.page.getPageSize()),(!0===this.config.page||this.config.page.page)&&(t.paginationInitialPage=this.table.modules.page.getPage())),t},Persistence.prototype.parseColumns=function(t){var e=this,o=[],i=["headerContextMenu","headerMenu","contextMenu","clickMenu"];return t.forEach((function(t){var n,s={},a=t.getDefinition();t.isGroup?(s.title=a.title,s.columns=e.parseColumns(t.getColumns())):(s.field=t.getField(),!0===e.config.columns||null==e.config.columns?(n=Object.keys(a)).push("width"):n=e.config.columns,n.forEach((function(e){switch(e){case"width":s.width=t.getWidth();break;case"visible":s.visible=t.visible;break;default:"function"!=typeof a[e]&&-1===i.indexOf(e)&&(s[e]=a[e])}}))),o.push(s)})),o},Persistence.prototype.readers={local:function(t,e){var o=localStorage.getItem(t+"-"+e);return!!o&&JSON.parse(o)},cookie:function(t,e){var o,i,n=document.cookie,s=t+"-"+e,a=n.indexOf(s+"=");return a>-1&&(n=n.substr(a),(o=n.indexOf(";"))>-1&&(n=n.substr(0,o)),i=n.replace(s+"=","")),!!i&&JSON.parse(i)}},Persistence.prototype.writers={local:function(t,e,o){localStorage.setItem(t+"-"+e,JSON.stringify(o))},cookie:function(t,e,o){var i=new Date;i.setDate(i.getDate()+1e4),document.cookie=t+"-"+e+"="+JSON.stringify(o)+"; expires="+i.toUTCString()}},Tabulator.prototype.registerModule("persistence",Persistence);var Print=function(t){this.table=t,this.element=!1,this.manualBlock=!1};Print.prototype.initialize=function(){window.addEventListener("beforeprint",this.replaceTable.bind(this)),window.addEventListener("afterprint",this.cleanup.bind(this))},Print.prototype.replaceTable=function(){this.manualBlock||(this.element=document.createElement("div"),this.element.classList.add("tabulator-print-table"),this.element.appendChild(this.table.modules.export.genereateTable(this.table.options.printConfig,this.table.options.printStyled,this.table.options.printRowRange,"print")),this.table.element.style.display="none",this.table.element.parentNode.insertBefore(this.element,this.table.element))},Print.prototype.cleanup=function(){document.body.classList.remove("tabulator-print-fullscreen-hide"),this.element&&this.element.parentNode&&(this.element.parentNode.removeChild(this.element),this.table.element.style.display="")},Print.prototype.printFullscreen=function(t,e,o){var i,n,s=window.scrollX,a=window.scrollY,r=document.createElement("div"),l=document.createElement("div"),u=this.table.modules.export.genereateTable(void 0!==o?o:this.table.options.printConfig,void 0!==e?e:this.table.options.printStyled,t,"print");this.manualBlock=!0,this.element=document.createElement("div"),this.element.classList.add("tabulator-print-fullscreen"),this.table.options.printHeader&&(r.classList.add("tabulator-print-header"),"string"==typeof(i="function"==typeof this.table.options.printHeader?this.table.options.printHeader.call(this.table):this.table.options.printHeader)?r.innerHTML=i:r.appendChild(i),this.element.appendChild(r)),this.element.appendChild(u),this.table.options.printFooter&&(l.classList.add("tabulator-print-footer"),"string"==typeof(n="function"==typeof this.table.options.printFooter?this.table.options.printFooter.call(this.table):this.table.options.printFooter)?l.innerHTML=n:l.appendChild(n),this.element.appendChild(l)),document.body.classList.add("tabulator-print-fullscreen-hide"),document.body.appendChild(this.element),this.table.options.printFormatter&&this.table.options.printFormatter(this.element,u),window.print(),this.cleanup(),window.scrollTo(s,a),this.manualBlock=!1},Tabulator.prototype.registerModule("print",Print);var ReactiveData=function(t){this.table=t,this.data=!1,this.blocked=!1,this.origFuncs={},this.currentVersion=0};ReactiveData.prototype.watchData=function(t){var e,o=this;this.currentVersion++,e=this.currentVersion,o.unwatchData(),o.data=t,o.origFuncs.push=t.push,Object.defineProperty(o.data,"push",{enumerable:!1,configurable:!0,value:function(){var i=Array.from(arguments);return o.blocked||e!==o.currentVersion||i.forEach((function(t){o.table.rowManager.addRowActual(t,!1)})),o.origFuncs.push.apply(t,arguments)}}),o.origFuncs.unshift=t.unshift,Object.defineProperty(o.data,"unshift",{enumerable:!1,configurable:!0,value:function(){var i=Array.from(arguments);return o.blocked||e!==o.currentVersion||i.forEach((function(t){o.table.rowManager.addRowActual(t,!0)})),o.origFuncs.unshift.apply(t,arguments)}}),o.origFuncs.shift=t.shift,Object.defineProperty(o.data,"shift",{enumerable:!1,configurable:!0,value:function(){var i;return o.blocked||e!==o.currentVersion||o.data.length&&(i=o.table.rowManager.getRowFromDataObject(o.data[0]))&&i.deleteActual(),o.origFuncs.shift.call(t)}}),o.origFuncs.pop=t.pop,Object.defineProperty(o.data,"pop",{enumerable:!1,configurable:!0,value:function(){var i;return o.blocked||e!==o.currentVersion||o.data.length&&(i=o.table.rowManager.getRowFromDataObject(o.data[o.data.length-1]))&&i.deleteActual(),o.origFuncs.pop.call(t)}}),o.origFuncs.splice=t.splice,Object.defineProperty(o.data,"splice",{enumerable:!1,configurable:!0,value:function(){var i,n=Array.from(arguments),s=n[0]<0?t.length+n[0]:n[0],a=n[1],r=!!n[2]&&n.slice(2);if(!o.blocked&&e===o.currentVersion){if(r&&((i=!!t[s]&&o.table.rowManager.getRowFromDataObject(t[s]))?r.forEach((function(t){o.table.rowManager.addRowActual(t,!0,i,!0)})):(r=r.slice().reverse()).forEach((function(t){o.table.rowManager.addRowActual(t,!0,!1,!0)}))),0!==a){var l=t.slice(s,void 0===n[1]?n[1]:s+a);l.forEach((function(t,e){var i=o.table.rowManager.getRowFromDataObject(t);i&&i.deleteActual(e!==l.length-1)}))}(r||0!==a)&&o.table.rowManager.reRenderInPosition()}return o.origFuncs.splice.apply(t,arguments)}})},ReactiveData.prototype.unwatchData=function(){if(!1!==this.data)for(var t in this.origFuncs)Object.defineProperty(this.data,t,{enumerable:!0,configurable:!0,writable:!0,value:this.origFuncs.key})},ReactiveData.prototype.watchRow=function(t){var e=t.getData();for(var o in this.blocked=!0,e)this.watchKey(t,e,o);this.table.options.dataTree&&this.watchTreeChildren(t),this.blocked=!1},ReactiveData.prototype.watchTreeChildren=function(t){var e=this,o=t.getData()[this.table.options.dataTreeChildField],i={};function n(){e.table.modules.dataTree.initializeRow(t),e.table.modules.dataTree.layoutRow(t),e.table.rowManager.refreshActiveData("tree",!1,!0)}o&&(i.push=o.push,Object.defineProperty(o,"push",{enumerable:!1,configurable:!0,value:function(){var t=i.push.apply(o,arguments);return n(),t}}),i.unshift=o.unshift,Object.defineProperty(o,"unshift",{enumerable:!1,configurable:!0,value:function(){var t=i.unshift.apply(o,arguments);return n(),t}}),i.shift=o.shift,Object.defineProperty(o,"shift",{enumerable:!1,configurable:!0,value:function(){var t=i.shift.call(o);return n(),t}}),i.pop=o.pop,Object.defineProperty(o,"pop",{enumerable:!1,configurable:!0,value:function(){var t=i.pop.call(o);return n(),t}}),i.splice=o.splice,Object.defineProperty(o,"splice",{enumerable:!1,configurable:!0,value:function(){var t=i.splice.apply(o,arguments);return n(),t}}))},ReactiveData.prototype.watchKey=function(t,e,o){var i=this,n=Object.getOwnPropertyDescriptor(e,o),s=e[o],a=this.currentVersion;Object.defineProperty(e,o,{set:function(e){if(s=e,!i.blocked&&a===i.currentVersion){var r={};r[o]=e,t.updateData(r)}n.set&&n.set(e)},get:function(){return n.get&&n.get(),s}})},ReactiveData.prototype.unwatchRow=function(t){var e=t.getData();for(var o in e)Object.defineProperty(e,o,{value:e[o]})},ReactiveData.prototype.block=function(){this.blocked=!0},ReactiveData.prototype.unblock=function(){this.blocked=!1},Tabulator.prototype.registerModule("reactiveData",ReactiveData);var ResizeColumns=function(t){this.table=t,this.startColumn=!1,this.startX=!1,this.startWidth=!1,this.handle=null,this.prevHandle=null};ResizeColumns.prototype.initializeColumn=function(t,e,o){var i=this,n=!1,s=this.table.options.resizableColumns;if("header"===t&&(n="textarea"==e.definition.formatter||e.definition.variableHeight,e.modules.resize={variableHeight:n}),!0===s||s==t){var a=document.createElement("div");a.className="tabulator-col-resize-handle";var r=document.createElement("div");r.className="tabulator-col-resize-handle prev",a.addEventListener("click",(function(t){t.stopPropagation()}));var l=function(t){var o=e.getLastColumn();o&&i._checkResizability(o)&&(i.startColumn=e,i._mouseDown(t,o,a))};a.addEventListener("mousedown",l),a.addEventListener("touchstart",l,{passive:!0}),a.addEventListener("dblclick",(function(t){var o=e.getLastColumn();o&&i._checkResizability(o)&&(t.stopPropagation(),o.reinitializeWidth(!0))})),r.addEventListener("click",(function(t){t.stopPropagation()}));var u=function(t){var o,n,s;(o=e.getFirstColumn())&&(s=(n=i.table.columnManager.findColumnIndex(o))>0&&i.table.columnManager.getColumnByIndex(n-1))&&i._checkResizability(s)&&(i.startColumn=e,i._mouseDown(t,s,r))};r.addEventListener("mousedown",u),r.addEventListener("touchstart",u,{passive:!0}),r.addEventListener("dblclick",(function(t){var o,n,s;(o=e.getFirstColumn())&&(s=(n=i.table.columnManager.findColumnIndex(o))>0&&i.table.columnManager.getColumnByIndex(n-1))&&i._checkResizability(s)&&(t.stopPropagation(),s.reinitializeWidth(!0))})),o.appendChild(a),o.appendChild(r)}},ResizeColumns.prototype._checkResizability=function(t){return void 0!==t.definition.resizable?t.definition.resizable:this.table.options.resizableColumns},ResizeColumns.prototype._mouseDown=function(t,e,o){var i=this;function n(t){i.table.rtl?e.setWidth(i.startWidth-((void 0===t.screenX?t.touches[0].screenX:t.screenX)-i.startX)):e.setWidth(i.startWidth+((void 0===t.screenX?t.touches[0].screenX:t.screenX)-i.startX)),i.table.options.virtualDomHoz&&i.table.vdomHoz.reinitialize(!0),!i.table.browserSlow&&e.modules.resize&&e.modules.resize.variableHeight&&e.checkCellHeights()}function s(t){i.startColumn.modules.edit&&(i.startColumn.modules.edit.blocked=!1),i.table.browserSlow&&e.modules.resize&&e.modules.resize.variableHeight&&e.checkCellHeights(),document.body.removeEventListener("mouseup",s),document.body.removeEventListener("mousemove",n),o.removeEventListener("touchmove",n),o.removeEventListener("touchend",s),i.table.element.classList.remove("tabulator-block-select"),i.table.options.persistence&&i.table.modExists("persistence",!0)&&i.table.modules.persistence.config.columns&&i.table.modules.persistence.save("columns"),i.table.options.columnResized.call(i.table,e.getComponent())}i.table.element.classList.add("tabulator-block-select"),t.stopPropagation(),i.startColumn.modules.edit&&(i.startColumn.modules.edit.blocked=!0),i.startX=void 0===t.screenX?t.touches[0].screenX:t.screenX,i.startWidth=e.getWidth(),document.body.addEventListener("mousemove",n),document.body.addEventListener("mouseup",s),o.addEventListener("touchmove",n,{passive:!0}),o.addEventListener("touchend",s)},Tabulator.prototype.registerModule("resizeColumns",ResizeColumns);var ResizeRows=function(t){this.table=t,this.startColumn=!1,this.startY=!1,this.startHeight=!1,this.handle=null,this.prevHandle=null};ResizeRows.prototype.initializeRow=function(t){var e=this,o=t.getElement(),i=document.createElement("div");i.className="tabulator-row-resize-handle";var n=document.createElement("div");n.className="tabulator-row-resize-handle prev",i.addEventListener("click",(function(t){t.stopPropagation()}));var s=function(o){e.startRow=t,e._mouseDown(o,t,i)};i.addEventListener("mousedown",s),i.addEventListener("touchstart",s,{passive:!0}),n.addEventListener("click",(function(t){t.stopPropagation()}));var a=function(o){var i=e.table.rowManager.prevDisplayRow(t);i&&(e.startRow=i,e._mouseDown(o,i,n))};n.addEventListener("mousedown",a),n.addEventListener("touchstart",a,{passive:!0}),o.appendChild(i),o.appendChild(n)},ResizeRows.prototype._mouseDown=function(t,e,o){var i=this;function n(t){e.setHeight(i.startHeight+((void 0===t.screenY?t.touches[0].screenY:t.screenY)-i.startY))}function s(t){document.body.removeEventListener("mouseup",n),document.body.removeEventListener("mousemove",n),o.removeEventListener("touchmove",n),o.removeEventListener("touchend",s),i.table.element.classList.remove("tabulator-block-select"),i.table.options.rowResized.call(this.table,e.getComponent())}i.table.element.classList.add("tabulator-block-select"),t.stopPropagation(),i.startY=void 0===t.screenY?t.touches[0].screenY:t.screenY,i.startHeight=e.getHeight(),document.body.addEventListener("mousemove",n),document.body.addEventListener("mouseup",s),o.addEventListener("touchmove",n,{passive:!0}),o.addEventListener("touchend",s)},Tabulator.prototype.registerModule("resizeRows",ResizeRows);var ResizeTable=function(t){this.table=t,this.binding=!1,this.observer=!1,this.containerObserver=!1,this.tableHeight=0,this.tableWidth=0,this.containerHeight=0,this.containerWidth=0,this.autoResize=!1};ResizeTable.prototype.initialize=function(t){var e,o=this,i=this.table;this.tableHeight=i.element.clientHeight,this.tableWidth=i.element.clientWidth,i.element.parentNode&&(this.containerHeight=i.element.parentNode.clientHeight,this.containerWidth=i.element.parentNode.clientWidth),"undefined"!=typeof ResizeObserver&&"virtual"===i.rowManager.getRenderMode()?(this.autoResize=!0,this.observer=new ResizeObserver((function(t){if(!i.browserMobile||i.browserMobile&&!i.modules.edit.currentCell){var e=Math.floor(t[0].contentRect.height),n=Math.floor(t[0].contentRect.width);o.tableHeight==e&&o.tableWidth==n||(o.tableHeight=e,o.tableWidth=n,i.element.parentNode&&(o.containerHeight=i.element.parentNode.clientHeight,o.containerWidth=i.element.parentNode.clientWidth),i.options.virtualDomHoz&&i.vdomHoz.reinitialize(!0),i.redraw())}})),this.observer.observe(i.element),e=window.getComputedStyle(i.element),this.table.element.parentNode&&!this.table.rowManager.fixedHeight&&(e.getPropertyValue("max-height")||e.getPropertyValue("min-height"))&&(this.containerObserver=new ResizeObserver((function(t){if(!i.browserMobile||i.browserMobile&&!i.modules.edit.currentCell){var e=Math.floor(t[0].contentRect.height),n=Math.floor(t[0].contentRect.width);o.containerHeight==e&&o.containerWidth==n||(o.containerHeight=e,o.containerWidth=n,o.tableHeight=i.element.clientHeight,o.tableWidth=i.element.clientWidth),i.options.virtualDomHoz&&i.vdomHoz.reinitialize(!0),i.redraw()}})),this.containerObserver.observe(this.table.element.parentNode))):(this.binding=function(){(!i.browserMobile||i.browserMobile&&!i.modules.edit.currentCell)&&(i.options.virtualDomHoz&&i.vdomHoz.reinitialize(!0),i.redraw())},window.addEventListener("resize",this.binding))},ResizeTable.prototype.clearBindings=function(t){this.binding&&window.removeEventListener("resize",this.binding),this.observer&&this.observer.unobserve(this.table.element),this.containerObserver&&this.containerObserver.unobserve(this.table.element.parentNode)},Tabulator.prototype.registerModule("resizeTable",ResizeTable);var ResponsiveLayout=function(t){this.table=t,this.columns=[],this.hiddenColumns=[],this.mode="",this.index=0,this.collapseFormatter=[],this.collapseStartOpen=!0,this.collapseHandleColumn=!1};ResponsiveLayout.prototype.initialize=function(){var t=this,e=[];this.mode=this.table.options.responsiveLayout,this.collapseFormatter=this.table.options.responsiveLayoutCollapseFormatter||this.formatCollapsedData,this.collapseStartOpen=this.table.options.responsiveLayoutCollapseStartOpen,this.hiddenColumns=[],this.table.columnManager.columnsByIndex.forEach((function(o,i){o.modules.responsive&&o.modules.responsive.order&&o.modules.responsive.visible&&(o.modules.responsive.index=i,e.push(o),o.visible||"collapse"!==t.mode||t.hiddenColumns.push(o))})),e=(e=e.reverse()).sort((function(t,e){return e.modules.responsive.order-t.modules.responsive.order||e.modules.responsive.index-t.modules.responsive.index})),this.columns=e,"collapse"===this.mode&&this.generateCollapsedContent();var o=this.table.columnManager.columnsByIndex,i=Array.isArray(o),n=0;for(o=i?o:o[Symbol.iterator]();;){var s;if(i){if(n>=o.length)break;s=o[n++]}else{if((n=o.next()).done)break;s=n.value}var a=s;if("responsiveCollapse"==a.definition.formatter){this.collapseHandleColumn=a;break}}this.collapseHandleColumn&&(this.hiddenColumns.length?this.collapseHandleColumn.show():this.collapseHandleColumn.hide())},ResponsiveLayout.prototype.initializeColumn=function(t){var e=t.getDefinition();t.modules.responsive={order:void 0===e.responsive?1:e.responsive,visible:!1!==e.visible}},ResponsiveLayout.prototype.initializeRow=function(t){var e;"calc"!==t.type&&((e=document.createElement("div")).classList.add("tabulator-responsive-collapse"),t.modules.responsiveLayout={element:e,open:this.collapseStartOpen},this.collapseStartOpen||(e.style.display="none"))},ResponsiveLayout.prototype.layoutRow=function(t){var e=t.getElement();t.modules.responsiveLayout&&(e.appendChild(t.modules.responsiveLayout.element),this.generateCollapsedRowContent(t))},ResponsiveLayout.prototype.updateColumnVisibility=function(t,e){t.modules.responsive&&(t.modules.responsive.visible=e,this.initialize())},ResponsiveLayout.prototype.hideColumn=function(t){var e=this.hiddenColumns.length;t.hide(!1,!0),"collapse"===this.mode&&(this.hiddenColumns.unshift(t),this.generateCollapsedContent(),this.collapseHandleColumn&&!e&&this.collapseHandleColumn.show())},ResponsiveLayout.prototype.showColumn=function(t){var e;t.show(!1,!0),t.setWidth(t.getWidth()),"collapse"===this.mode&&((e=this.hiddenColumns.indexOf(t))>-1&&this.hiddenColumns.splice(e,1),this.generateCollapsedContent(),this.collapseHandleColumn&&!this.hiddenColumns.length&&this.collapseHandleColumn.hide())},ResponsiveLayout.prototype.update=function(){for(var t=!0;t;){var e="fitColumns"==this.table.modules.layout.getMode()?this.table.columnManager.getFlexBaseWidth():this.table.columnManager.getWidth(),o=(this.table.options.headerVisible?this.table.columnManager.element.clientWidth:this.table.element.clientWidth)-e;if(o<0){var i=this.columns[this.index];i?(this.hideColumn(i),this.index++):t=!1}else{var n=this.columns[this.index-1];n&&o>0&&o>=n.getWidth()?(this.showColumn(n),this.index--):t=!1}this.table.rowManager.activeRowsCount||this.table.rowManager.renderEmptyScroll()}},ResponsiveLayout.prototype.generateCollapsedContent=function(){var t=this;this.table.rowManager.getDisplayRows().forEach((function(e){t.generateCollapsedRowContent(e)}))},ResponsiveLayout.prototype.generateCollapsedRowContent=function(t){var e,o;if(t.modules.responsiveLayout){for(e=t.modules.responsiveLayout.element;e.firstChild;)e.removeChild(e.firstChild);(o=this.collapseFormatter(this.generateCollapsedRowData(t)))&&e.appendChild(o)}},ResponsiveLayout.prototype.generateCollapsedRowData=function(t){var e,o=this,i=t.getData(),n=[];return this.hiddenColumns.forEach((function(s){var a=s.getFieldValue(i);s.definition.title&&s.field&&(s.modules.format&&o.table.options.responsiveLayoutCollapseUseFormatters?(e={value:!1,data:{},getValue:function(){return a},getData:function(){return i},getElement:function(){return document.createElement("div")},getRow:function(){return t.getComponent()},getColumn:function(){return s.getComponent()}},n.push({field:s.field,title:s.definition.title,value:s.modules.format.formatter.call(o.table.modules.format,e,s.modules.format.params)})):n.push({field:s.field,title:s.definition.title,value:a}))})),n},ResponsiveLayout.prototype.formatCollapsedData=function(t){var e=document.createElement("table");return t.forEach((function(t){var o,i=document.createElement("tr"),n=document.createElement("td"),s=document.createElement("td"),a=document.createElement("strong");n.appendChild(a),this.table.modules.localize.bind("columns|"+t.field,(function(e){a.innerText=e||t.title})),t.value instanceof Node?((o=document.createElement("div")).appendChild(t.value),s.appendChild(o)):s.innerHTML=t.value,i.appendChild(n),i.appendChild(s),e.appendChild(i)}),this),Object.keys(t).length?e:""},Tabulator.prototype.registerModule("responsiveLayout",ResponsiveLayout);var SelectRow=function(t){this.table=t,this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],this.headerCheckboxElement=null};SelectRow.prototype.clearSelectionData=function(t){this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],t||this._rowSelectionChanged()},SelectRow.prototype.initializeRow=function(t){var e=this,o=t.getElement(),i=function t(){setTimeout((function(){e.selecting=!1}),50),document.body.removeEventListener("mouseup",t)};t.modules.select={selected:!1},e.table.options.selectableCheck.call(this.table,t.getComponent())?(o.classList.add("tabulator-selectable"),o.classList.remove("tabulator-unselectable"),e.table.options.selectable&&"highlight"!=e.table.options.selectable&&("click"===e.table.options.selectableRangeMode?o.addEventListener("click",(function(o){if(o.shiftKey){e.table._clearSelection(),e.lastClickedRow=e.lastClickedRow||t;var i=e.table.rowManager.getDisplayRowIndex(e.lastClickedRow),n=e.table.rowManager.getDisplayRowIndex(t),s=i<=n?i:n,a=i>=n?i:n,r=e.table.rowManager.getDisplayRows().slice(0).splice(s,a-s+1);o.ctrlKey||o.metaKey?(r.forEach((function(o){o!==e.lastClickedRow&&(!0===e.table.options.selectable||e.isRowSelected(t)||e.selectedRows.length<e.table.options.selectable)&&e.toggleRow(o)})),e.lastClickedRow=t):(e.deselectRows(void 0,!0),!0!==e.table.options.selectable&&r.length>e.table.options.selectable&&(r=r.slice(0,e.table.options.selectable)),e.selectRows(r)),e.table._clearSelection()}else o.ctrlKey||o.metaKey?(e.toggleRow(t),e.lastClickedRow=t):(e.deselectRows(void 0,!0),e.selectRows(t),e.lastClickedRow=t)})):(o.addEventListener("click",(function(o){e.table.modExists("edit")&&e.table.modules.edit.getCurrentCell()||e.table._clearSelection(),e.selecting||e.toggleRow(t)})),o.addEventListener("mousedown",(function(o){if(o.shiftKey)return e.table._clearSelection(),e.selecting=!0,e.selectPrev=[],document.body.addEventListener("mouseup",i),document.body.addEventListener("keyup",i),e.toggleRow(t),!1})),o.addEventListener("mouseenter",(function(o){e.selecting&&(e.table._clearSelection(),e.toggleRow(t),e.selectPrev[1]==t&&e.toggleRow(e.selectPrev[0]))})),o.addEventListener("mouseout",(function(o){e.selecting&&(e.table._clearSelection(),e.selectPrev.unshift(t))}))))):(o.classList.add("tabulator-unselectable"),o.classList.remove("tabulator-selectable"))},SelectRow.prototype.toggleRow=function(t){this.table.options.selectableCheck.call(this.table,t.getComponent())&&(t.modules.select&&t.modules.select.selected?this._deselectRow(t):this._selectRow(t))},SelectRow.prototype.selectRows=function(t){var e,o=this;switch(void 0===t?"undefined":_typeof(t)){case"undefined":this.table.rowManager.rows.forEach((function(t){o._selectRow(t,!0,!0)})),this._rowSelectionChanged();break;case"string":(e=this.table.rowManager.findRow(t))?this._selectRow(e,!0,!0):this.table.rowManager.getRows(t).forEach((function(t){o._selectRow(t,!0,!0)})),this._rowSelectionChanged();break;default:Array.isArray(t)?(t.forEach((function(t){o._selectRow(t,!0,!0)})),this._rowSelectionChanged()):this._selectRow(t,!1,!0)}},SelectRow.prototype._selectRow=function(t,e,o){if(!isNaN(this.table.options.selectable)&&!0!==this.table.options.selectable&&!o&&this.selectedRows.length>=this.table.options.selectable){if(!this.table.options.selectableRollingSelection)return!1;this._deselectRow(this.selectedRows[0])}var i=this.table.rowManager.findRow(t);i?-1==this.selectedRows.indexOf(i)&&(i.getElement().classList.add("tabulator-selected"),i.modules.select||(i.modules.select={}),i.modules.select.selected=!0,i.modules.select.checkboxEl&&(i.modules.select.checkboxEl.checked=!0),this.selectedRows.push(i),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(i,!0),e||this.table.options.rowSelected.call(this.table,i.getComponent()),this._rowSelectionChanged(e)):e||console.warn("Selection Error - No such row found, ignoring selection:"+t)},SelectRow.prototype.isRowSelected=function(t){return-1!==this.selectedRows.indexOf(t)},SelectRow.prototype.deselectRows=function(t,e){var o,i=this;if(void 0===t){o=i.selectedRows.length;for(var n=0;n<o;n++)i._deselectRow(i.selectedRows[0],!0);i._rowSelectionChanged(e)}else Array.isArray(t)?(t.forEach((function(t){i._deselectRow(t,!0)})),i._rowSelectionChanged(e)):i._deselectRow(t,e)},SelectRow.prototype._deselectRow=function(t,e){var o,i=this.table.rowManager.findRow(t);i?(o=this.selectedRows.findIndex((function(t){return t==i})))>-1&&(i.getElement().classList.remove("tabulator-selected"),i.modules.select||(i.modules.select={}),i.modules.select.selected=!1,i.modules.select.checkboxEl&&(i.modules.select.checkboxEl.checked=!1),this.selectedRows.splice(o,1),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(i,!1),e||this.table.options.rowDeselected.call(this.table,i.getComponent()),this._rowSelectionChanged(e)):e||console.warn("Deselection Error - No such row found, ignoring selection:"+t)},SelectRow.prototype.getSelectedData=function(){var t=[];return this.selectedRows.forEach((function(e){t.push(e.getData())})),t},SelectRow.prototype.getSelectedRows=function(){var t=[];return this.selectedRows.forEach((function(e){t.push(e.getComponent())})),t},SelectRow.prototype._rowSelectionChanged=function(t){this.headerCheckboxElement&&(0===this.selectedRows.length?(this.headerCheckboxElement.checked=!1,this.headerCheckboxElement.indeterminate=!1):this.table.rowManager.rows.length===this.selectedRows.length?(this.headerCheckboxElement.checked=!0,this.headerCheckboxElement.indeterminate=!1):(this.headerCheckboxElement.indeterminate=!0,this.headerCheckboxElement.checked=!1)),t||this.table.options.rowSelectionChanged.call(this.table,this.getSelectedData(),this.getSelectedRows())},SelectRow.prototype.registerRowSelectCheckbox=function(t,e){t._row.modules.select||(t._row.modules.select={}),t._row.modules.select.checkboxEl=e},SelectRow.prototype.registerHeaderSelectCheckbox=function(t){this.headerCheckboxElement=t},SelectRow.prototype.childRowSelection=function(t,e){var o=this.table.modules.dataTree.getChildren(t,!0);if(e){var i=o,n=Array.isArray(i),s=0;for(i=n?i:i[Symbol.iterator]();;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if((s=i.next()).done)break;a=s.value}var r=a;this._selectRow(r,!0)}}else{var l=o,u=Array.isArray(l),c=0;for(l=u?l:l[Symbol.iterator]();;){var d;if(u){if(c>=l.length)break;d=l[c++]}else{if((c=l.next()).done)break;d=c.value}var h=d;this._deselectRow(h,!0)}}},Tabulator.prototype.registerModule("selectRow",SelectRow);var Sort=function(t){this.table=t,this.sortList=[],this.changed=!1};Sort.prototype.initializeColumn=function(t,e){var o,i,n=this,s=!1;switch(_typeof(t.definition.sorter)){case"string":n.sorters[t.definition.sorter]?s=n.sorters[t.definition.sorter]:console.warn("Sort Error - No such sorter found: ",t.definition.sorter);break;case"function":s=t.definition.sorter}t.modules.sort={sorter:s,dir:"none",params:t.definition.sorterParams||{},startingDir:t.definition.headerSortStartingDir||"asc",tristate:void 0!==t.definition.headerSortTristate?t.definition.headerSortTristate:this.table.options.headerSortTristate},(void 0===t.definition.headerSort?!1!==this.table.options.headerSort:!1!==t.definition.headerSort)&&((o=t.getElement()).classList.add("tabulator-sortable"),(i=document.createElement("div")).classList.add("tabulator-col-sorter"),"object"==_typeof(this.table.options.headerSortElement)?i.appendChild(this.table.options.headerSortElement):i.innerHTML=this.table.options.headerSortElement,e.appendChild(i),t.modules.sort.element=i,o.addEventListener("click",(function(e){var o="",i=[],s=!1;if(t.modules.sort){if(t.modules.sort.tristate)o="none"==t.modules.sort.dir?t.modules.sort.startingDir:t.modules.sort.dir==t.modules.sort.startingDir?"asc"==t.modules.sort.dir?"desc":"asc":"none";else switch(t.modules.sort.dir){case"asc":o="desc";break;case"desc":o="asc";break;default:o=t.modules.sort.startingDir}n.table.options.columnHeaderSortMulti&&(e.shiftKey||e.ctrlKey)?((s=(i=n.getSort()).findIndex((function(e){return e.field===t.getField()})))>-1?(i[s].dir=o,s!=i.length-1&&(s=i.splice(s,1)[0],"none"!=o&&i.push(s))):"none"!=o&&i.push({column:t,dir:o}),n.setSort(i)):"none"==o?n.clear():n.setSort(t,o),n.table.rowManager.sorterRefresh(!n.sortList.length)}})))},Sort.prototype.hasChanged=function(){var t=this.changed;return this.changed=!1,t},Sort.prototype.getSort=function(){var t=[];return this.sortList.forEach((function(e){e.column&&t.push({column:e.column.getComponent(),field:e.column.getField(),dir:e.dir})})),t},Sort.prototype.setSort=function(t,e){var o=this,i=[];Array.isArray(t)||(t=[{column:t,dir:e}]),t.forEach((function(t){var e;(e=o.table.columnManager.findColumn(t.column))?(t.column=e,i.push(t),o.changed=!0):console.warn("Sort Warning - Sort field does not exist and is being ignored: ",t.column)})),o.sortList=i,this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.sort&&this.table.modules.persistence.save("sort")},Sort.prototype.clear=function(){this.setSort([])},Sort.prototype.findSorter=function(t){var e,o=this.table.rowManager.activeRows[0],i="string";if(o&&(o=o.getData(),t.getField()))switch(void 0===(e=t.getFieldValue(o))?"undefined":_typeof(e)){case"undefined":i="string";break;case"boolean":i="boolean";break;default:isNaN(e)||""===e?e.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)&&(i="alphanum"):i="number"}return this.sorters[i]},Sort.prototype.sort=function(t){var e=this,o=this.table.options.sortOrderReverse?e.sortList.slice().reverse():e.sortList,i=[],n=[];e.table.options.dataSorting&&e.table.options.dataSorting.call(e.table,e.getSort()),e.clearColumnHeaders(),e.table.options.ajaxSorting?o.forEach((function(t,o){e.setColumnHeader(t.column,t.dir)})):(o.forEach((function(t,o){var n=t.column.modules.sort;t.column&&n&&(n.sorter||(n.sorter=e.findSorter(t.column)),t.params="function"==typeof n.params?n.params(t.column.getComponent(),t.dir):n.params,i.push(t)),e.setColumnHeader(t.column,t.dir)})),i.length&&e._sortItems(t,i)),e.table.options.dataSorted&&(t.forEach((function(t){n.push(t.getComponent())})),e.table.options.dataSorted.call(e.table,e.getSort(),n))},Sort.prototype.clearColumnHeaders=function(){this.table.columnManager.getRealColumns().forEach((function(t){t.modules.sort&&(t.modules.sort.dir="none",t.getElement().setAttribute("aria-sort","none"))}))},Sort.prototype.setColumnHeader=function(t,e){t.modules.sort.dir=e,t.getElement().setAttribute("aria-sort",e)},Sort.prototype._sortItems=function(t,e){var o=this,i=e.length-1;t.sort((function(t,n){for(var s,a=i;a>=0;a--){var r=e[a];if(0!==(s=o._sortRow(t,n,r.column,r.dir,r.params)))break}return s}))},Sort.prototype._sortRow=function(t,e,o,i,n){var s,a,r="asc"==i?t:e,l="asc"==i?e:t;return t=void 0!==(t=o.getFieldValue(r.getData()))?t:"",e=void 0!==(e=o.getFieldValue(l.getData()))?e:"",s=r.getComponent(),a=l.getComponent(),o.modules.sort.sorter.call(this,t,e,s,a,o.getComponent(),i,n)},Sort.prototype.sorters={number:function(t,e,o,i,n,s,a){var r=a.alignEmptyValues,l=a.decimalSeparator,u=a.thousandSeparator,c=0;if(t=String(t),e=String(e),u&&(t=t.split(u).join(""),e=e.split(u).join("")),l&&(t=t.split(l).join("."),e=e.split(l).join(".")),t=parseFloat(t),e=parseFloat(e),isNaN(t))c=isNaN(e)?0:-1;else{if(!isNaN(e))return t-e;c=1}return("top"===r&&"desc"===s||"bottom"===r&&"asc"===s)&&(c*=-1),c},string:function(t,e,o,i,n,s,a){var r,l=a.alignEmptyValues,u=0;if(t){if(e){switch(_typeof(a.locale)){case"boolean":a.locale&&(r=this.table.modules.localize.getLocale());break;case"string":r=a.locale}return String(t).toLowerCase().localeCompare(String(e).toLowerCase(),r)}u=1}else u=e?-1:0;return("top"===l&&"desc"===s||"bottom"===l&&"asc"===s)&&(u*=-1),u},date:function(t,e,o,i,n,s,a){return a.format||(a.format="DD/MM/YYYY"),this.sorters.datetime.call(this,t,e,o,i,n,s,a)},time:function(t,e,o,i,n,s,a){return a.format||(a.format="HH:mm"),this.sorters.datetime.call(this,t,e,o,i,n,s,a)},datetime:function(t,e,o,i,n,s,a){var r=a.format||"DD/MM/YYYY HH:mm:ss",l=a.alignEmptyValues,u=0;if("undefined"!=typeof moment){if(t=moment(t,r),e=moment(e,r),t.isValid()){if(e.isValid())return t-e;u=1}else u=e.isValid()?-1:0;return("top"===l&&"desc"===s||"bottom"===l&&"asc"===s)&&(u*=-1),u}console.error("Sort Error - 'datetime' sorter is dependant on moment.js")},boolean:function(t,e,o,i,n,s,a){return(!0===t||"true"===t||"True"===t||1===t?1:0)-(!0===e||"true"===e||"True"===e||1===e?1:0)},array:function(t,e,o,i,n,s,a){var r=a.type||"length",l=a.alignEmptyValues,u=0;function c(t){switch(r){case"length":return t.length;case"sum":return t.reduce((function(t,e){return t+e}));case"max":return Math.max.apply(null,t);case"min":return Math.min.apply(null,t);case"avg":return t.reduce((function(t,e){return t+e}))/t.length}}if(Array.isArray(t)){if(Array.isArray(e))return(t?c(t):0)-(e?c(e):0);l=1}else l=Array.isArray(e)?-1:0;return("top"===l&&"desc"===s||"bottom"===l&&"asc"===s)&&(u*=-1),u},exists:function(t,e,o,i,n,s,a){return(void 0===t?0:1)-(void 0===e?0:1)},alphanum:function(t,e,o,i,n,s,a){var r,l,u,c,d,h=0,p=/(\d+)|(\D+)/g,m=/\d/,f=a.alignEmptyValues,g=0;if(t||0===t){if(e||0===e){if(isFinite(t)&&isFinite(e))return t-e;if((r=String(t).toLowerCase())===(l=String(e).toLowerCase()))return 0;if(!m.test(r)||!m.test(l))return r>l?1:-1;for(r=r.match(p),l=l.match(p),d=r.length>l.length?l.length:r.length;h<d;)if((u=r[h])!==(c=l[h++]))return isFinite(u)&&isFinite(c)?("0"===u.charAt(0)&&(u="."+u),"0"===c.charAt(0)&&(c="."+c),u-c):u>c?1:-1;return r.length>l.length}g=1}else g=e||0===e?-1:0;return("top"===f&&"desc"===s||"bottom"===f&&"asc"===s)&&(g*=-1),g}},Tabulator.prototype.registerModule("sort",Sort);var Validate=function(t){this.table=t,this.invalidCells=[]};Validate.prototype.initializeColumn=function(t){var e,o=this,i=[];t.definition.validator&&(Array.isArray(t.definition.validator)?t.definition.validator.forEach((function(t){(e=o._extractValidator(t))&&i.push(e)})):(e=this._extractValidator(t.definition.validator))&&i.push(e),t.modules.validate=!!i.length&&i)},Validate.prototype._extractValidator=function(t){var e,o,i;switch(void 0===t?"undefined":_typeof(t)){case"string":return(i=t.indexOf(":"))>-1?(e=t.substring(0,i),o=t.substring(i+1)):e=t,this._buildValidator(e,o);case"function":return this._buildValidator(t);case"object":return this._buildValidator(t.type,t.parameters)}},Validate.prototype._buildValidator=function(t,e){var o="function"==typeof t?t:this.validators[t];return o?{type:"function"==typeof t?"function":t,func:o,params:e}:(console.warn("Validator Setup Error - No matching validator found:",t),!1)},Validate.prototype.validate=function(t,e,o){var i=this,n=[],s=this.invalidCells.indexOf(e);return t&&t.forEach((function(t){t.func.call(i,e.getComponent(),o,t.params)||n.push({type:t.type,parameters:t.params})})),n=!n.length||n,e.modules.validate||(e.modules.validate={}),!0===n?(e.modules.validate.invalid=!1,e.getElement().classList.remove("tabulator-validation-fail"),s>-1&&this.invalidCells.splice(s,1)):(e.modules.validate.invalid=!0,"manual"!==this.table.options.validationMode&&e.getElement().classList.add("tabulator-validation-fail"),-1==s&&this.invalidCells.push(e)),n},Validate.prototype.getInvalidCells=function(){var t=[];return this.invalidCells.forEach((function(e){t.push(e.getComponent())})),t},Validate.prototype.clearValidation=function(t){var e;t.modules.validate&&t.modules.validate.invalid&&(t.getElement().classList.remove("tabulator-validation-fail"),t.modules.validate.invalid=!1,(e=this.invalidCells.indexOf(t))>-1&&this.invalidCells.splice(e,1))},Validate.prototype.validators={integer:function(t,e,o){return""===e||null==e||"number"==typeof(e=Number(e))&&isFinite(e)&&Math.floor(e)===e},float:function(t,e,o){return""===e||null==e||"number"==typeof(e=Number(e))&&isFinite(e)&&e%1!=0},numeric:function(t,e,o){return""===e||null==e||!isNaN(e)},string:function(t,e,o){return""===e||null==e||isNaN(e)},max:function(t,e,o){return""===e||null==e||parseFloat(e)<=o},min:function(t,e,o){return""===e||null==e||parseFloat(e)>=o},starts:function(t,e,o){return""===e||null==e||String(e).toLowerCase().startsWith(String(o).toLowerCase())},ends:function(t,e,o){return""===e||null==e||String(e).toLowerCase().endsWith(String(o).toLowerCase())},minLength:function(t,e,o){return""===e||null==e||String(e).length>=o},maxLength:function(t,e,o){return""===e||null==e||String(e).length<=o},in:function(t,e,o){return""===e||null==e||("string"==typeof o&&(o=o.split("|")),""===e||o.indexOf(e)>-1)},regex:function(t,e,o){return""===e||null==e||new RegExp(o).test(e)},unique:function(t,e,o){if(""===e||null==e)return!0;var i=!0,n=t.getData(),s=t.getColumn()._getSelf();return this.table.rowManager.rows.forEach((function(t){var o=t.getData();o!==n&&e==s.getFieldValue(o)&&(i=!1)})),i},required:function(t,e,o){return""!==e&&null!=e}},Tabulator.prototype.registerModule("validate",Validate);export default Tabulator;
\ No newline at end of file
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
;(function (global, factory) {
if ((typeof exports === 'undefined' ? 'undefined' : _typeof(exports)) === 'object' && typeof module !== 'undefined') {
_this4.table.modules.columnCalcs.recalc(_this4.table.rowManager.activeRows);
}
- _this4.redraw();
+ _this4.redraw(true);
if (_this4.table.modules.layout.getMode() != "fitColumns") {
this.widthStyled = ""; //column width prestyled to improve render efficiency
+ this.maxWidth = null; //column maximum width
+
+ this.maxWidthStyled = ""; //column maximum prestyled to improve render efficiency
+
this.minWidth = null; //column minimum width
this.minWidthStyled = ""; //column minimum prestyled to improve render efficiency
this.setMinWidth(typeof def.minWidth == "undefined" ? this.table.options.columnMinWidth : parseInt(def.minWidth));
+ if (def.maxWidth || this.table.options.columnMaxWidth) {
+
+ if (def.maxWidth !== false) {
+
+ this.setMaxWidth(typeof def.maxWidth == "undefined" ? this.table.options.columnMaxWidth : parseInt(def.maxWidth));
+ }
+ }
+
this.reinitializeWidth();
//set tooltip if present
this.table.modules.menu.initializeColumnHeader(this);
}
+ this.titleElement.style.textAlign = this.definition.headerHozAlign || this.table.options.headerHozAlign;
+
this.element.appendChild(this.groupElement);
};
this.parent.matchChildWidths();
}
+
+ if (!this.silent && this.table.options.virtualDomHoz) {
+
+ this.table.vdomHoz.reinitialize();
+ }
}
};
this.parent.matchChildWidths();
}
+
+ if (!this.silent && this.table.options.virtualDomHoz) {
+
+ this.table.vdomHoz.reinitialize();
+ }
}
};
}
};
+ Column.prototype.removeChild = function (child) {
+
+ var index = this.columns.indexOf(child);
+
+ if (index > -1) {
+
+ this.columns.splice(index, 1);
+ }
+
+ if (!this.columns.length) {
+
+ this.delete();
+ }
+ };
+
Column.prototype.setWidth = function (width) {
this.widthFixed = true;
width = Math.max(this.minWidth, width);
+ if (this.maxWidth) {
+
+ width = Math.min(this.maxWidth, width);
+ }
+
this.width = width;
this.widthStyled = width ? width + "px" : "";
});
};
+ Column.prototype.setMaxWidth = function (maxWidth) {
+
+ this.maxWidth = maxWidth;
+
+ this.maxWidthStyled = maxWidth ? maxWidth + "px" : "";
+
+ this.element.style.maxWidth = this.maxWidthStyled;
+
+ this.cells.forEach(function (cell) {
+
+ cell.setMaxWidth();
+ });
+ };
+
Column.prototype.delete = function () {
var _this9 = this;
return new Promise(function (resolve, reject) {
+ var index;
+
if (_this9.isGroup) {
_this9.columns.forEach(function (column) {
_this9.groupElement = false;
+ if (_this9.parent.isGroup) {
+
+ _this9.parent.removeChild(_this9);
+ }
+
_this9.table.columnManager.deregisterColumn(_this9);
if (_this9.table.options.virtualDomHoz) {
if (!_this10.isGroup) {
- definition = Object.assign({}, _this10.getDefinition());
+ if (!_this10.parent.isGroup) {
- definition = Object.assign(definition, updates);
+ definition = Object.assign({}, _this10.getDefinition());
- _this10.table.columnManager.addColumn(definition, false, _this10).then(function (column) {
+ definition = Object.assign(definition, updates);
- if (definition.field == _this10.field) {
+ _this10.table.columnManager.addColumn(definition, false, _this10).then(function (column) {
- _this10.field = false; //cleair field name to prevent deletion of duplicate column from arrays
- }
+ if (definition.field == _this10.field) {
+
+ _this10.field = false; //cleair field name to prevent deletion of duplicate column from arrays
+ }
- _this10.delete().then(function () {
+ _this10.delete().then(function () {
- resolve(column.getComponent());
+ resolve(column.getComponent());
+ }).catch(function (err) {
+
+ reject(err);
+ });
}).catch(function (err) {
reject(err);
});
- }).catch(function (err) {
+ } else {
- reject(err);
- });
+ console.warn("Column Update Error - The updateDefinition function is only available on ungrouped columns");
+
+ reject("Column Update Error - The updateDefinition function is only available on columns, not column groups");
+ }
} else {
- console.warn("Column Update Error - The updateDefinition function is only available on columns, not column groups");
+ console.warn("Column Update Error - The updateDefinition function is only available on ungrouped columns");
reject("Column Update Error - The updateDefinition function is only available on columns, not column groups");
}
}
};
- Column.prototype.defaultOptionList = ["title", "field", "columns", "visible", "align", "hozAlign", "vertAlign", "width", "minWidth", "widthGrow", "widthShrink", "resizable", "frozen", "responsive", "tooltip", "cssClass", "rowHandle", "hideInHtml", "print", "htmlOutput", "sorter", "sorterParams", "formatter", "formatterParams", "variableHeight", "editable", "editor", "editorParams", "validator", "mutator", "mutatorParams", "mutatorData", "mutatorDataParams", "mutatorEdit", "mutatorEditParams", "mutatorClipboard", "mutatorClipboardParams", "accessor", "accessorParams", "accessorData", "accessorDataParams", "accessorDownload", "accessorDownloadParams", "accessorClipboard", "accessorClipboardParams", "accessorPrint", "accessorPrintParams", "accessorHtmlOutput", "accessorHtmlOutputParams", "clipboard", "download", "downloadTitle", "topCalc", "topCalcParams", "topCalcFormatter", "topCalcFormatterParams", "bottomCalc", "bottomCalcParams", "bottomCalcFormatter", "bottomCalcFormatterParams", "cellClick", "cellDblClick", "cellContext", "cellTap", "cellDblTap", "cellTapHold", "cellMouseEnter", "cellMouseLeave", "cellMouseOver", "cellMouseOut", "cellMouseMove", "cellEditing", "cellEdited", "cellEditCancelled", "headerSort", "headerSortStartingDir", "headerSortTristate", "headerClick", "headerDblClick", "headerContext", "headerTap", "headerDblTap", "headerTapHold", "headerTooltip", "headerVertical", "headerHozAlign", "editableTitle", "titleFormatter", "titleFormatterParams", "headerFilter", "headerFilterPlaceholder", "headerFilterParams", "headerFilterEmptyCheck", "headerFilterFunc", "headerFilterFuncParams", "headerFilterLiveFilter", "print", "headerContextMenu", "headerMenu", "contextMenu",
+ Column.prototype.defaultOptionList = ["title", "field", "columns", "visible", "align", "hozAlign", "vertAlign", "width", "minWidth", "maxWidth", "widthGrow", "widthShrink", "resizable", "frozen", "responsive", "tooltip", "cssClass", "rowHandle", "hideInHtml", "print", "htmlOutput", "sorter", "sorterParams", "formatter", "formatterParams", "variableHeight", "editable", "editor", "editorParams", "validator", "mutator", "mutatorParams", "mutatorData", "mutatorDataParams", "mutatorEdit", "mutatorEditParams", "mutatorClipboard", "mutatorClipboardParams", "accessor", "accessorParams", "accessorData", "accessorDataParams", "accessorDownload", "accessorDownloadParams", "accessorClipboard", "accessorClipboardParams", "accessorPrint", "accessorPrintParams", "accessorHtmlOutput", "accessorHtmlOutputParams", "clipboard", "download", "downloadTitle", "topCalc", "topCalcParams", "topCalcFormatter", "topCalcFormatterParams", "bottomCalc", "bottomCalcParams", "bottomCalcFormatter", "bottomCalcFormatterParams", "cellClick", "cellDblClick", "cellContext", "cellTap", "cellDblTap", "cellTapHold", "cellMouseEnter", "cellMouseLeave", "cellMouseOver", "cellMouseOut", "cellMouseMove", "cellEditing", "cellEdited", "cellEditCancelled", "headerSort", "headerSortStartingDir", "headerSortTristate", "headerClick", "headerDblClick", "headerContext", "headerTap", "headerDblTap", "headerTapHold", "headerTooltip", "headerVertical", "headerHozAlign", "editableTitle", "titleFormatter", "titleFormatterParams", "headerFilter", "headerFilterPlaceholder", "headerFilterParams", "headerFilterEmptyCheck", "headerFilterFunc", "headerFilterFuncParams", "headerFilterLiveFilter", "print", "headerContextMenu", "headerMenu", "contextMenu",
// "headerClickMenu",
var match = self.rows.find(function (row) {
- return row.element === subject;
+ return row.getElement() === subject;
});
return match || false;
if (this.renderMode === "virtual") {
- var otherHeight = Math.floor(this.columnManager.getElement().offsetHeight + (this.table.footerManager && !this.table.footerManager.external ? this.table.footerManager.getElement().offsetHeight : 0));
+ var otherHeight = Math.floor(this.columnManager.getElement().getBoundingClientRect().height + (this.table.footerManager && this.table.footerManager.active && !this.table.footerManager.external ? this.table.footerManager.getElement().getBoundingClientRect().height : 0));
if (this.fixedHeight) {
this.element.style.height = "";
- this.element.style.height = Math.floor(this.table.element.clientHeight) - otherHeight + "px";
+ this.element.style.height = this.table.element.clientHeight - otherHeight + "px";
this.element.scrollTop = this.scrollTop;
}
//check if the table has changed size when dealing with variable height tables
- if (!this.fixedHeight && Math.floor(initialHeight) != Math.floor(this.element.clientHeight)) {
+ if (!this.fixedHeight && initialHeight != this.element.clientHeight) {
modExists = this.table.modExists("resizeTable");
var column = this.columns[_i7];
- if (column.visible) {
+ if (column && column.visible) {
var cell = row.getCell(column);
- row.element.appendChild(cell.getElement());
+ row.getElement().appendChild(cell.getElement());
cell.cellRendered();
}
if (force || !row.modules.vdomHoz || row.modules.vdomHoz.leftCol !== this.leftCol || row.modules.vdomHoz.rightCol !== this.rightCol) {
- while (row.element.firstChild) {
- row.element.removeChild(row.element.firstChild);
+ var rowEl = row.getElement();
+
+ while (rowEl.firstChild) {
+ rowEl.removeChild(rowEl.firstChild);
}this.initializeRow(row);
}
}
this.type = type; //type of element
- this.element = this.createElement();
+ this.element = false;
this.modules = {}; //hold module variables;
this.component = null;
+ this.created = false;
+
this.setData(data);
+ };
- this.generateElement();
+ Row.prototype.create = function () {
+
+ if (!this.created) {
+
+ this.created = true;
+
+ this.generateElement();
+ }
};
Row.prototype.createElement = function () {
el.setAttribute("role", "row");
- return el;
+ this.element = el;
};
Row.prototype.getElement = function () {
+ this.create();
+
return this.element;
};
tapHold,
tap;
+ this.createElement();
+
//set row selection characteristics
if (self.table.options.selectable !== false && self.table.modExists("selectRow")) {
Row.prototype.initialize = function (force) {
var _this21 = this;
+ this.create();
+
if (!this.initialized || force) {
this.deleteCells();
this.heightInitialized = false;
- if (this.element.offsetParent !== null) {
+ if (this.element && this.element.offsetParent !== null) {
this.normalizeHeight(true);
}
this.heightStyled = "";
}
- if (this.element.offsetParent !== null) {
+ if (this.element && this.element.offsetParent !== null) {
this.initialize(true);
}
Row.prototype.updateData = function (updatedData) {
var _this22 = this;
- var visible = Tabulator.prototype.helpers.elVisible(this.element),
+ var visible = this.element && Tabulator.prototype.helpers.elVisible(this.element),
tempData = {},
newRowData;
this.deleteCells();
- while (this.element.firstChild) {
- this.element.removeChild(this.element.firstChild);
- }this.element = false;
-
- this.modules = {};
+ if (this.element) {
- if (this.element.parentNode) {
+ while (this.element.firstChild) {
+ this.element.removeChild(this.element.firstChild);
+ }if (this.element.parentNode) {
- this.element.parentNode.removeChild(this.element);
+ this.element.parentNode.removeChild(this.element);
+ }
}
+
+ this.element = false;
+
+ this.modules = {};
};
Row.prototype.getGroup = function () {
//////////////////// Getters ////////////////////
- Cell.prototype.getElement = function () {
+ Cell.prototype.getElement = function (containerOnly) {
if (!this.loaded) {
this.loaded = true;
- this.layoutElement();
+ if (!containerOnly) {
+
+ this.layoutElement();
+ }
}
return this.element;
this.element.style.minWidth = this.column.minWidthStyled;
};
+ Cell.prototype.setMaxWidth = function () {
+
+ this.maxWidth = this.column.maxWidth;
+
+ this.element.style.maxWidth = this.column.maxWidthStyled;
+ };
+
Cell.prototype.checkHeight = function () {
// var height = this.element.css("height");
columnMinWidth: 40, //minimum global width for a column
+ columnMaxWidth: false, //minimum global width for a column
+
columnHeaderVertAlign: "top", //vertical alignment of column headers
columnVertAlign: false, // DEPRECATED - Left to allow warning
mod.persistence.initialize();
}
- if (options.persistence && this.modExists("persistence", true) && mod.persistence.config.columns) {
-
- options.columns = mod.persistence.load("columns", options.columns);
- }
-
if (options.movableRows && this.modExists("moveRow")) {
mod.moveRow.initialize();
}
};
+ //set standard filters
+
+ Tabulator.prototype.refreshFilter = function () {
+
+ if (this.modExists("filter", true)) {
+
+ this.rowManager.filterRefresh();
+ }
+ };
+
//add filter to array
Tabulator.prototype.addFilter = function (field, type, value, params) {
}
};
+ Tabulator.prototype.clearHistory = function () {
+
+ if (this.options.history && this.modExists("history", true)) {
+
+ return this.modules.history.clear();
+ } else {
+
+ return false;
+ }
+ };
+
/////////////// Download Management //////////////
Layout.prototype.layout = function () {
this.modes[this.mode].call(this, this.table.columnManager.columnsByIndex);
+
+ if (this.mode.indexOf("fitData") === 0 && this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.columns) {
+
+ this.table.modules.persistence.save("columns");
+ }
};
//layout render functions
oversizeSpace = 0,
remainingSpace = 0,
nextColWidth = 0,
+ remainingFlexGrowUnits = flexGrowUnits,
gap = 0,
changeUnits = 0,
undersizeCols = [];
oversizeCols.push(col);
} else {
- undersizeCols.push(col);
+ if (col.column.maxWidth && col.column.maxWidth < width) {
+
+ col.width = col.column.maxWidth;
- changeUnits += shrinkCols ? col.column.definition.widthShrink || 1 : col.column.definition.widthGrow || 1;
+ freeSpace -= col.column.maxWidth;
+
+ remainingFlexGrowUnits -= shrinkCols ? col.column.definition.widthShrink || 1 : col.column.definition.widthGrow || 1;
+
+ if (remainingFlexGrowUnits) {
+
+ colWidth = Math.floor(freeSpace / remainingFlexGrowUnits);
+ }
+ } else {
+
+ undersizeCols.push(col);
+
+ changeUnits += shrinkCols ? col.column.definition.widthShrink || 1 : col.column.definition.widthGrow || 1;
+ }
}
});
self.loading = false;
- reject();
+ reject(error);
});
} else {
reject();
if (!config.method || config.method.toLowerCase() == "get") {
config.method = "get";
- url += (url.includes("?") ? "&" : "?") + this.serializeParams(params);
+ url += (url.includes("?") ? "&" : "?") + this.modules.ajax.serializeParams(params);
}
}
}
return new Promise(function (resolve, reject) {
//set url
- url = self.urlGenerator(url, config, params);
+ url = self.urlGenerator.call(self.table, url, config, params);
//set body content if not GET request
if (config.method.toUpperCase() != "GET") {
ColumnCalcs.prototype.initializeTopRow = function () {
if (!this.topInitialized) {
- // this.table.columnManager.headersElement.after(this.topElement);
this.table.columnManager.getElement().insertBefore(this.topElement, this.table.columnManager.headersElement.nextSibling);
this.topInitialized = true;
}
};
ColumnCalcs.prototype.scrollHorizontal = function (left) {
- var hozAdjust = 0,
- scrollWidth = this.table.columnManager.getElement().scrollWidth - this.table.element.clientWidth;
-
if (this.botInitialized && this.botRow) {
this.botRow.getElement().style.marginLeft = -left + "px";
}
this.generateControlElement(row, el);
- row.element.classList.add("tabulator-tree-level-" + config.index);
+ row.getElement().classList.add("tabulator-tree-level-" + config.index);
if (config.index) {
if (this.branchEl) {
if (row instanceof Row) {
+ row.create();
+
config = row.modules.dataTree.children;
if (!config.index && config.children !== false) {
children = _this48.getChildren(row);
children.forEach(function (child) {
+ child.create();
output.push(child);
});
}
return output;
};
- DataTree.prototype.getChildren = function (row) {
+ DataTree.prototype.getChildren = function (row, allChildren) {
var _this49 = this;
var config = row.modules.dataTree,
children = [],
output = [];
- if (config.children !== false && config.open) {
+ if (config.children !== false && (config.open || allChildren)) {
if (!Array.isArray(config.children)) {
config.children = this.generateChildren(row);
}
childArray.forEach(function (childData) {
var childRow = new Row(childData || {}, _this50.table.rowManager);
+
+ childRow.create();
+
childRow.modules.dataTree.index = row.modules.dataTree.index + 1;
childRow.modules.dataTree.parent = row;
+
if (childRow.modules.dataTree.children) {
childRow.modules.dataTree.open = _this50.startOpen(childRow.getComponent(), childRow.modules.dataTree.index);
}
//return a formatted value for a cell
Edit.prototype.bindEditor = function (cell) {
var self = this,
- element = cell.getElement();
+ element = cell.getElement(true);
element.setAttribute("tabindex", 0);
rightEdge -= parseInt(this.table.modules.frozenColumns.rightMargin);
}
+ if (this.table.options.virtualDomHoz) {
+ leftEdge -= parseInt(this.table.vdomHoz.vDomPadLeft);
+ rightEdge -= parseInt(this.table.vdomHoz.vDomPadLeft);
+ }
+
if (cellEl.offsetLeft < leftEdge) {
+
this.table.rowManager.element.scrollLeft -= leftEdge - cellEl.offsetLeft;
} else {
if (cellEl.offsetLeft + cellEl.offsetWidth > rightEdge) {
displayItems = [],
currentItems = [],
blurable = true,
- blockListShow = false;
+ blockListShow = false,
+ searchWord = "",
+ searchWordTimeout = null;
if (Array.isArray(editorParams) || !Array.isArray(editorParams) && (typeof editorParams === 'undefined' ? 'undefined' : _typeof(editorParams)) === "object" && !editorParams.values) {
console.warn("DEPRECATION WARNING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object");
output[val] = true;
}
});
-
- if (editorParams.sortValuesList) {
- if (editorParams.sortValuesList == "asc") {
- output = Object.keys(output).sort();
- } else {
- output = Object.keys(output).sort().reverse();
- }
- } else {
- output = Object.keys(output);
- }
} else {
console.warn("unable to find matching column to create select lookup list:", field);
}
- return output;
+ return Object.keys(output);
}
function parseItems(inputValues, curentValues) {
}
}
+ if (editorParams.sortValuesList) {
+ dataList.sort(function (a, b) {
+ return a.label < b.label ? -1 : a.label > b.label ? 1 : 0;
+ });
+
+ displayList.sort(function (a, b) {
+ return a.label < b.label ? -1 : a.label > b.label ? 1 : 0;
+ });
+
+ if (editorParams.sortValuesList !== "asc") {
+ dataList.reverse();
+ displayList.reverse();
+ }
+ }
+
dataItems = dataList;
displayItems = displayList;
success(item.value);
}
- initialDisplayValue = input.value;
+ initialDisplayValue = [item.value];
}
function chooseItems(silent) {
output.push(item.value);
});
- initialDisplayValue = input.value;
+ initialDisplayValue = output;
success(output);
}
self.table.rowManager.element.removeEventListener("scroll", cancelItem);
}
+ function scrollTovalue(char) {
+
+ clearTimeout(searchWordTimeout);
+
+ var character = String.fromCharCode(event.keyCode).toLowerCase();
+ searchWord += character.toLowerCase();
+
+ var match = dataItems.find(function (item) {
+ return typeof item.label !== "undefined" && item.label.toLowerCase().startsWith(searchWord);
+ });
+
+ if (match) {
+ setCurrentItem(match, !multiselect);
+ }
+
+ searchWordTimeout = setTimeout(function () {
+ searchWord = "";
+ }, 800);
+ }
+
//style input
input.setAttribute("type", "text");
if (self.currentCell === false) {
e.preventDefault();
}
+
+ if (e.keyCode >= 38 && e.keyCode <= 90) {
+ scrollTovalue(e.keyCode);
+ }
}
});
function showList() {
if (!listEl.parentNode) {
+
+ console.log("show", initialDisplayValue);
while (listEl.firstChild) {
listEl.removeChild(listEl.firstChild);
}var offset = Tabulator.prototype.helpers.elOffset(cellEl);
//set new value
function updateValue() {
- var calcVal = percent * Math.round(bar.offsetWidth / (element.clientWidth / 100)) + min;
+ var style = window.getComputedStyle(element, null);
+
+ var calcVal = percent * Math.round(bar.offsetWidth / ((element.clientWidth - parseInt(style.getPropertyValue("padding-left")) - parseInt(style.getPropertyValue("padding-right"))) / 100)) + min;
success(calcVal);
element.setAttribute("aria-valuenow", calcVal);
element.setAttribute("aria-label", value);
//set empty value function
column.modules.filter.emptyFunc = column.definition.headerFilterEmptyCheck || function (value) {
- return !value && value !== "0";
+ return !value && value !== "0" && value !== 0;
};
filterElement = document.createElement("div");
self.prevHeaderFilterChangeCheck = "{}";
this.headerFilterColumns.forEach(function (column) {
- column.modules.filter.value = null;
+ if (typeof column.modules.filter.value !== "undefined") {
+ delete column.modules.filter.value;
+ }
column.modules.filter.prevSuccess = undefined;
self.reloadHeaderFilter(column);
});
//image element
image: function image(cell, formatterParams, onRendered) {
- var el = document.createElement("img");
- el.setAttribute("src", cell.getValue());
+ var el = document.createElement("img"),
+ src = cell.getValue();
+
+ if (formatterParams.urlPrefix) {
+ src = formatterParams.urlPrefix + cell.getValue();
+ }
+
+ if (formatterParams.urlSuffix) {
+ src = src + formatterParams.urlSuffix;
+ }
+
+ el.setAttribute("src", src);
switch (_typeof(formatterParams.height)) {
case "number":
if (allCells) {
column.cells.forEach(function (cell) {
- _this66.layoutElement(cell.getElement(), column);
+ _this66.layoutElement(cell.getElement(true), column);
});
}
});
if (allCells) {
column.cells.forEach(function (cell) {
- _this66.layoutElement(cell.getElement(), column);
+ _this66.layoutElement(cell.getElement(true), column);
});
}
});
var cell = row.getCell(column);
if (cell) {
- _this67.layoutElement(cell.getElement(), column);
+ _this67.layoutElement(cell.getElement(true), column);
}
});
var cell = row.getCell(column);
if (cell) {
- _this67.layoutElement(cell.getElement(), column);
+ _this67.layoutElement(cell.getElement(true), column);
}
});
};
Tabulator.prototype.registerModule("keybindings", Keybindings);
var Menu = function Menu(table) {
this.table = table; //hold Tabulator object
- this.menuEl = false;
+ this.menuElements = [];
this.blurEvent = this.hideMenu.bind(this);
this.escEvent = this.escMenu.bind(this);
this.nestedMenuBlock = false;
+ this.positionReversedX = false;
};
Menu.prototype.initializeColumnHeader = function (column) {
headerMenuEl.innerHTML = "⋮";
headerMenuEl.addEventListener("click", function (e) {
- var menu = typeof column.definition.headerMenu == "function" ? column.definition.headerMenu(column.getComponent(), e) : column.definition.headerMenu;
e.stopPropagation();
e.preventDefault();
- _this71.loadMenu(e, column, menu);
+ _this71.LoadMenuEvent(column, column.definition.headerMenu, e);
});
column.titleElement.insertBefore(headerMenuEl, column.titleElement.firstChild);
};
Menu.prototype.LoadMenuEvent = function (component, menu, e) {
- menu = typeof menu == "function" ? menu(component.getComponent(), e) : menu;
+ menu = typeof menu == "function" ? menu.call(this.table, component.getComponent(), e) : menu;
// if(component instanceof Cell){
// e.stopImmediatePropagation();
Menu.prototype.initializeCell = function (cell) {
if (cell.column.definition.contextMenu) {
- cell.getElement().addEventListener("contextmenu", this.LoadMenuEvent.bind(this, cell, cell.column.definition.contextMenu));
+ cell.getElement(true).addEventListener("contextmenu", this.LoadMenuEvent.bind(this, cell, cell.column.definition.contextMenu));
this.tapHold(cell, cell.column.definition.contextMenu);
}
if (cell.column.definition.clickMenu) {
- cell.getElement().addEventListener("click", this.LoadMenuEvent.bind(this, cell, cell.column.definition.clickMenu));
+ cell.getElement(true).addEventListener("click", this.LoadMenuEvent.bind(this, cell, cell.column.definition.clickMenu));
}
};
}
};
- Menu.prototype.loadMenu = function (e, component, menu) {
+ Menu.prototype.loadMenu = function (e, component, menu, parentEl) {
var _this73 = this;
- var docHeight = Math.max(document.body.offsetHeight, window.innerHeight),
- touch = !(e instanceof MouseEvent);
+ var touch = !(e instanceof MouseEvent);
+
+ var menuEl = document.createElement("div");
+ menuEl.classList.add("tabulator-menu");
if (!touch) {
e.preventDefault();
return;
}
- if (this.nestedMenuBlock) {
- //abort if child menu already open
- if (this.isOpen()) {
- return;
+ if (!parentEl) {
+ if (this.nestedMenuBlock) {
+ //abort if child menu already open
+ if (this.isOpen()) {
+ return;
+ }
+ } else {
+ this.nestedMenuBlock = setTimeout(function () {
+ _this73.nestedMenuBlock = false;
+ }, 100);
}
- } else {
- this.nestedMenuBlock = setTimeout(function () {
- _this73.nestedMenuBlock = false;
- }, 100);
- }
- this.hideMenu();
-
- this.menuEl = document.createElement("div");
- this.menuEl.classList.add("tabulator-menu");
+ this.hideMenu();
+ this.menuElements = [];
+ }
menu.forEach(function (item) {
- var itemEl = document.createElement("div");
- var label = item.label;
- var disabled = item.disabled;
+ var itemEl = document.createElement("div"),
+ label = item.label,
+ disabled = item.disabled;
if (item.separator) {
itemEl.classList.add("tabulator-menu-separator");
itemEl.classList.add("tabulator-menu-item");
if (typeof label == "function") {
- label = label(component.getComponent());
+ label = label.call(_this73.table, component.getComponent());
}
if (label instanceof Node) {
}
if (typeof disabled == "function") {
- disabled = disabled(component.getComponent());
+ disabled = disabled.call(_this73.table, component.getComponent());
}
if (disabled) {
e.stopPropagation();
});
} else {
- itemEl.addEventListener("click", function (e) {
- _this73.hideMenu();
- item.action(e, component.getComponent());
- });
+ if (item.menu && item.menu.length) {
+ itemEl.addEventListener("click", function (e) {
+ e.stopPropagation();
+ _this73.hideOldSubMenus(menuEl);
+ _this73.loadMenu(e, component, item.menu, itemEl);
+ });
+ } else {
+ if (item.action) {
+ itemEl.addEventListener("click", function (e) {
+ item.action(e, component.getComponent());
+ });
+ }
+ }
+ }
+
+ if (item.menu && item.menu.length) {
+ itemEl.classList.add("tabulator-menu-item-submenu");
}
}
- _this73.menuEl.appendChild(itemEl);
+ menuEl.appendChild(itemEl);
});
- this.menuEl.style.top = (touch ? e.touches[0].pageY : e.pageY) + "px";
- this.menuEl.style.left = (touch ? e.touches[0].pageX : e.pageX) + "px";
+ menuEl.addEventListener("click", function (e) {
+ _this73.hideMenu();
+ });
+
+ this.menuElements.push(menuEl);
+ this.positionMenu(menuEl, parentEl, touch, e);
+ };
+
+ Menu.prototype.hideOldSubMenus = function (menuEl) {
+ var index = this.menuElements.indexOf(menuEl);
+
+ if (index > -1) {
+ for (var _i13 = this.menuElements.length - 1; _i13 > index; _i13--) {
+ var el = this.menuElements[_i13];
+
+ if (el.parentNode) {
+ el.parentNode.removeChild(el);
+ }
+
+ this.menuElements.pop();
+ }
+ }
+ };
+
+ Menu.prototype.positionMenu = function (element, parentEl, touch, e) {
+ var _this74 = this;
+
+ var docHeight = Math.max(document.body.offsetHeight, window.innerHeight),
+ x,
+ y,
+ parentOffset;
+
+ if (!parentEl) {
+ x = touch ? e.touches[0].pageX : e.pageX;
+ y = touch ? e.touches[0].pageY : e.pageY;
+
+ this.positionReversedX = false;
+ } else {
+ parentOffset = Tabulator.prototype.helpers.elOffset(parentEl);
+ x = parentOffset.left + parentEl.offsetWidth;
+ y = parentOffset.top - 1;
+ }
+
+ element.style.top = y + "px";
+ element.style.left = x + "px";
setTimeout(function () {
- _this73.table.rowManager.element.addEventListener("scroll", _this73.blurEvent);
- document.body.addEventListener("click", _this73.blurEvent);
- document.body.addEventListener("contextmenu", _this73.blurEvent);
- document.body.addEventListener("keydown", _this73.escEvent);
+ _this74.table.rowManager.element.addEventListener("scroll", _this74.blurEvent);
+ document.body.addEventListener("click", _this74.blurEvent);
+ document.body.addEventListener("contextmenu", _this74.blurEvent);
+ window.addEventListener("resize", _this74.blurEvent);
+ document.body.addEventListener("keydown", _this74.escEvent);
}, 100);
- document.body.appendChild(this.menuEl);
+ document.body.appendChild(element);
- //move menu to start on right edge if it is too close to the edge of the screen
- if (e.pageX + this.menuEl.offsetWidth >= document.body.offsetWidth) {
- this.menuEl.style.left = "";
- this.menuEl.style.right = document.body.offsetWidth - e.pageX + "px";
+ //move menu to start on bottom edge if it is too close to the edge of the screen
+ if (y + element.offsetHeight >= docHeight) {
+ element.style.top = "";
+
+ if (parentEl) {
+ element.style.bottom = docHeight - parentOffset.top - parentEl.offsetHeight - 1 + "px";
+ } else {
+ element.style.bottom = docHeight - y + "px";
+ }
}
- //move menu to start on bottom edge if it is too close to the edge of the screen
- if (e.pageY + this.menuEl.offsetHeight >= docHeight) {
- this.menuEl.style.top = "";
- this.menuEl.style.bottom = docHeight - e.pageY + "px";
+ //move menu to start on right edge if it is too close to the edge of the screen
+ if (x + element.offsetWidth >= document.body.offsetWidth || this.positionReversedX) {
+ element.style.left = "";
+
+ if (parentEl) {
+ element.style.right = document.documentElement.offsetWidth - parentOffset.left + "px";
+ } else {
+ element.style.right = document.documentElement.offsetWidth - x + "px";
+ }
+
+ this.positionReversedX = true;
}
};
Menu.prototype.isOpen = function () {
- return !!this.menuEl.parentNode;
+ return !!this.menuElements.length;
};
Menu.prototype.escMenu = function (e) {
};
Menu.prototype.hideMenu = function () {
- if (this.menuEl.parentNode) {
- this.menuEl.parentNode.removeChild(this.menuEl);
- }
-
- if (this.escEvent) {
- document.body.removeEventListener("keydown", this.escEvent);
- }
+ this.menuElements.forEach(function (menuEl) {
+ if (menuEl.parentNode) {
+ menuEl.parentNode.removeChild(menuEl);
+ }
+ });
- if (this.blurEvent) {
- document.body.removeEventListener("click", this.blurEvent);
- document.body.removeEventListener("contextmenu", this.blurEvent);
- this.table.rowManager.element.removeEventListener("scroll", this.blurEvent);
- }
+ document.body.removeEventListener("keydown", this.escEvent);
+ document.body.removeEventListener("click", this.blurEvent);
+ document.body.removeEventListener("contextmenu", this.blurEvent);
+ window.removeEventListener("resize", this.blurEvent);
+ this.table.rowManager.element.removeEventListener("scroll", this.blurEvent);
};
//default accessors
if (after) {
column.getCells().forEach(function (cell, i) {
- var cellEl = cell.getElement();
+ var cellEl = cell.getElement(true);
cellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl.nextSibling);
});
} else {
column.getCells().forEach(function (cell, i) {
- var cellEl = cell.getElement();
+ var cellEl = cell.getElement(true);
cellEl.parentNode.insertBefore(movingCells[i].getElement(), cellEl);
});
}
//same table drag drop
config.mousemove = function (e) {
- if (e.pageY - Tabulator.prototype.helpers.elOffset(row.element).top + self.table.rowManager.element.scrollTop > row.getHeight() / 2) {
+ var rowEl = row.getElement();
+
+ if (e.pageY - Tabulator.prototype.helpers.elOffset(rowEl).top + self.table.rowManager.element.scrollTop > row.getHeight() / 2) {
if (self.toRow !== row || !self.toRowAfter) {
- var rowEl = row.getElement();
rowEl.parentNode.insertBefore(self.placeholderElement, rowEl.nextSibling);
self.moveRow(row, true);
}
} else {
if (self.toRow !== row || self.toRowAfter) {
- var rowEl = row.getElement();
rowEl.parentNode.insertBefore(self.placeholderElement, rowEl);
self.moveRow(row, false);
}
MoveRows.prototype.initializeCell = function (cell) {
var self = this,
- cellEl = cell.getElement();
+ cellEl = cell.getElement(true);
cellEl.addEventListener("mousedown", function (e) {
if (e.which === 1) {
}
});
- this.bindTouchEvents(cell.row, cell.getElement());
+ this.bindTouchEvents(cell.row, cellEl);
};
MoveRows.prototype.bindTouchEvents = function (row, element) {
//establish connection with other tables
MoveRows.prototype.connectToTables = function (row) {
- var _this74 = this;
+ var _this75 = this;
var connectionTables;
this.connectionSelectorsElements.forEach(function (query) {
if (typeof query === "string") {
- _this74.connectionElements = _this74.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(query)));
+ _this75.connectionElements = _this75.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(query)));
} else {
- _this74.connectionElements.push(query);
+ _this75.connectionElements.push(query);
}
});
this.connectionElements.forEach(function (element) {
var dropEvent = function dropEvent(e) {
- _this74.elementRowDrop(e, element, _this74.moving);
+ _this75.elementRowDrop(e, element, _this75.moving);
};
element.addEventListener("mouseup", dropEvent);
var receiver = false,
success = false;
- console.trace("drop");
-
e.stopImmediatePropagation();
switch (_typeof(this.table.options.movableRowsReceiver)) {
};
Page.prototype.generatePageSizeSelectList = function () {
- var _this75 = this;
+ var _this76 = this;
var pageSizes = [];
if (this.pageSizes.indexOf(this.size) == -1) {
pageSizes = [];
- for (var _i13 = 1; _i13 < 5; _i13++) {
- pageSizes.push(this.size * _i13);
+ for (var _i14 = 1; _i14 < 5; _i14++) {
+ pageSizes.push(this.size * _i14);
}
this.pageSizes = pageSizes;
itemEl.value = item;
if (item === true) {
- _this75.table.modules.localize.bind("pagination|all", function (value) {
+ _this76.table.modules.localize.bind("pagination|all", function (value) {
itemEl.innerHTML = value;
});
} else {
itemEl.innerHTML = item;
}
- _this75.pageSizeSelect.appendChild(itemEl);
+ _this76.pageSizeSelect.appendChild(itemEl);
});
this.pageSizeSelect.value = this.size;
//set current page number
Page.prototype.setPage = function (page) {
- var _this76 = this;
+ var _this77 = this;
var self = this;
page = parseInt(page);
- if (page > 0 && page <= _this76.max) {
- _this76.page = page;
- _this76.trigger().then(function () {
+ if (page > 0 && page <= _this77.max || _this77.mode !== "local") {
+ _this77.page = page;
+ _this77.trigger().then(function () {
resolve();
}).catch(function () {
reject();
self.table.modules.persistence.save("page");
}
} else {
- console.warn("Pagination Error - Requested page is out of range of 1 - " + _this76.max + ":", page);
+ console.warn("Pagination Error - Requested page is out of range of 1 - " + _this77.max + ":", page);
reject();
}
});
};
Page.prototype.setPageToRow = function (row) {
- var _this77 = this;
+ var _this78 = this;
return new Promise(function (resolve, reject) {
- var rows = _this77.table.rowManager.getDisplayRows(_this77.displayIndex - 1);
+ var rows = _this78.table.rowManager.getDisplayRows(_this78.displayIndex - 1);
var index = rows.indexOf(row);
if (index > -1) {
- var page = _this77.size === true ? 1 : Math.ceil((index + 1) / _this77.size);
+ var page = _this78.size === true ? 1 : Math.ceil((index + 1) / _this78.size);
- _this77.setPage(page).then(function () {
+ _this78.setPage(page).then(function () {
resolve();
}).catch(function () {
reject();
self.nextBut.disabled = false;
}
- for (var _i14 = min; _i14 <= max; _i14++) {
- if (_i14 > 0 && _i14 <= self.max) {
- self.pagesElement.appendChild(self._generatePageButton(_i14));
+ for (var _i15 = min; _i15 <= max; _i15++) {
+ if (_i15 > 0 && _i15 <= self.max) {
+ self.pagesElement.appendChild(self._generatePageButton(_i15));
}
}
//previous page
Page.prototype.previousPage = function () {
- var _this78 = this;
+ var _this79 = this;
return new Promise(function (resolve, reject) {
- if (_this78.page > 1) {
- _this78.page--;
- _this78.trigger().then(function () {
+ if (_this79.page > 1) {
+ _this79.page--;
+ _this79.trigger().then(function () {
resolve();
}).catch(function () {
reject();
});
- if (_this78.table.options.persistence && _this78.table.modExists("persistence", true) && _this78.table.modules.persistence.config.page) {
- _this78.table.modules.persistence.save("page");
+ if (_this79.table.options.persistence && _this79.table.modExists("persistence", true) && _this79.table.modules.persistence.config.page) {
+ _this79.table.modules.persistence.save("page");
}
} else {
console.warn("Pagination Error - Previous page would be less than page 1:", 0);
//next page
Page.prototype.nextPage = function () {
- var _this79 = this;
+ var _this80 = this;
return new Promise(function (resolve, reject) {
- if (_this79.page < _this79.max) {
- _this79.page++;
- _this79.trigger().then(function () {
+ if (_this80.page < _this80.max) {
+ _this80.page++;
+ _this80.trigger().then(function () {
resolve();
}).catch(function () {
reject();
});
- if (_this79.table.options.persistence && _this79.table.modExists("persistence", true) && _this79.table.modules.persistence.config.page) {
- _this79.table.modules.persistence.save("page");
+ if (_this80.table.options.persistence && _this80.table.modExists("persistence", true) && _this80.table.modules.persistence.config.page) {
+ _this80.table.modules.persistence.save("page");
}
} else {
- if (!_this79.progressiveLoad) {
- console.warn("Pagination Error - Next page would be greater than maximum page of " + _this79.max + ":", _this79.max + 1);
+ if (!_this80.progressiveLoad) {
+ console.warn("Pagination Error - Next page would be greater than maximum page of " + _this80.max + ":", _this80.max + 1);
}
reject();
}
this._setPageButtons();
- for (var _i15 = start; _i15 < end; _i15++) {
- if (data[_i15]) {
- output.push(data[_i15]);
+ for (var _i16 = start; _i16 < end; _i16++) {
+ if (data[_i16]) {
+ output.push(data[_i16]);
}
}
};
Page.prototype.trigger = function () {
- var _this80 = this;
+ var _this81 = this;
var left;
return new Promise(function (resolve, reject) {
- switch (_this80.mode) {
+ switch (_this81.mode) {
case "local":
- left = _this80.table.rowManager.scrollLeft;
+ left = _this81.table.rowManager.scrollLeft;
- _this80.table.rowManager.refreshActiveData("page");
- _this80.table.rowManager.scrollHorizontal(left);
+ _this81.table.rowManager.refreshActiveData("page");
+ _this81.table.rowManager.scrollHorizontal(left);
- _this80.table.options.pageLoaded.call(_this80.table, _this80.getPage());
+ _this81.table.options.pageLoaded.call(_this81.table, _this81.getPage());
resolve();
break;
case "remote":
case "progressive_load":
case "progressive_scroll":
- _this80.table.modules.ajax.blockActiveRequest();
- _this80._getRemotePage().then(function () {
+ _this81.table.modules.ajax.blockActiveRequest();
+ _this81._getRemotePage().then(function () {
resolve();
}).catch(function () {
reject();
break;
default:
- console.warn("Pagination Error - no such pagination mode:", _this80.mode);
+ console.warn("Pagination Error - no such pagination mode:", _this81.mode);
reject();
}
});
};
Page.prototype._getRemotePage = function () {
- var _this81 = this;
+ var _this82 = this;
var self = this,
oldParams,
pageParams = self.table.modules.ajax.getParams();
//configure request params
- pageParams[_this81.dataSentNames.page] = self.page;
+ pageParams[_this82.dataSentNames.page] = self.page;
//set page size if defined
- if (_this81.size) {
- pageParams[_this81.dataSentNames.size] = _this81.size;
+ if (_this82.size) {
+ pageParams[_this82.dataSentNames.size] = _this82.size;
}
//set sort data if defined
- if (_this81.table.options.ajaxSorting && _this81.table.modExists("sort")) {
+ if (_this82.table.options.ajaxSorting && _this82.table.modExists("sort")) {
var sorters = self.table.modules.sort.getSort();
sorters.forEach(function (item) {
delete item.column;
});
- pageParams[_this81.dataSentNames.sorters] = sorters;
+ pageParams[_this82.dataSentNames.sorters] = sorters;
}
//set filter data if defined
- if (_this81.table.options.ajaxFiltering && _this81.table.modExists("filter")) {
+ if (_this82.table.options.ajaxFiltering && _this82.table.modExists("filter")) {
var filters = self.table.modules.filter.getFilters(true, true);
- pageParams[_this81.dataSentNames.filters] = filters;
+ pageParams[_this82.dataSentNames.filters] = filters;
}
self.table.modules.ajax.setParams(pageParams);
- self.table.modules.ajax.sendRequest(_this81.progressiveLoad).then(function (data) {
+ self.table.modules.ajax.sendRequest(_this82.progressiveLoad).then(function (data) {
self._parseRemoteData(data);
resolve();
}).catch(function (e) {
}
}
}
+
+ if (this.config.columns) {
+ this.table.options.columns = this.load("columns", this.table.options.columns);
+ }
};
Persistence.prototype.initializeColumn = function (column) {
}
keys.forEach(function (key) {
- if (typeof column[key] !== "undefined") {
+ if (key !== "columns" && typeof column[key] !== "undefined") {
from[key] = column[key];
}
});
};
ResizeTable.prototype.initialize = function (row) {
- var _this82 = this;
+ var _this83 = this;
var table = this.table,
tableStyle;
var nodeHeight = Math.floor(entry[0].contentRect.height);
var nodeWidth = Math.floor(entry[0].contentRect.width);
- if (_this82.tableHeight != nodeHeight || _this82.tableWidth != nodeWidth) {
- _this82.tableHeight = nodeHeight;
- _this82.tableWidth = nodeWidth;
+ if (_this83.tableHeight != nodeHeight || _this83.tableWidth != nodeWidth) {
+ _this83.tableHeight = nodeHeight;
+ _this83.tableWidth = nodeWidth;
if (table.element.parentNode) {
- _this82.containerHeight = table.element.parentNode.clientHeight;
- _this82.containerWidth = table.element.parentNode.clientWidth;
+ _this83.containerHeight = table.element.parentNode.clientHeight;
+ _this83.containerWidth = table.element.parentNode.clientWidth;
}
if (table.options.virtualDomHoz) {
var nodeHeight = Math.floor(entry[0].contentRect.height);
var nodeWidth = Math.floor(entry[0].contentRect.width);
- if (_this82.containerHeight != nodeHeight || _this82.containerWidth != nodeWidth) {
- _this82.containerHeight = nodeHeight;
- _this82.containerWidth = nodeWidth;
- _this82.tableHeight = table.element.clientHeight;
- _this82.tableWidth = table.element.clientWidth;
+ if (_this83.containerHeight != nodeHeight || _this83.containerWidth != nodeWidth) {
+ _this83.containerHeight = nodeHeight;
+ _this83.containerWidth = nodeWidth;
+ _this83.tableHeight = table.element.clientHeight;
+ _this83.tableWidth = table.element.clientWidth;
}
if (table.options.virtualDomHoz) {
}
//assign collapse column
- for (var _iterator = this.table.columnManager.columnsByIndex, _isArray = Array.isArray(_iterator), _i16 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
+ for (var _iterator = this.table.columnManager.columnsByIndex, _isArray = Array.isArray(_iterator), _i17 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
var _ref;
if (_isArray) {
- if (_i16 >= _iterator.length) break;
- _ref = _iterator[_i16++];
+ if (_i17 >= _iterator.length) break;
+ _ref = _iterator[_i17++];
} else {
- _i16 = _iterator.next();
- if (_i16.done) break;
- _ref = _i16.value;
+ _i17 = _iterator.next();
+ if (_i17.done) break;
+ _ref = _i17.value;
}
var col = _ref;
};
output.push({
+ field: column.field,
title: column.definition.title,
value: column.modules.format.formatter.call(self.table.modules.format, mockCellComponent, column.modules.format.params)
});
} else {
output.push({
+ field: column.field,
title: column.definition.title,
value: value
});
};
ResponsiveLayout.prototype.formatCollapsedData = function (data) {
- var list = document.createElement("table"),
- listContents = "";
+ var list = document.createElement("table");
data.forEach(function (item) {
- var div = document.createElement("div");
+ var row = document.createElement("tr");
+ var titleData = document.createElement("td");
+ var valueData = document.createElement("td");
+ var node_content;
+
+ var titleHighlight = document.createElement("strong");
+ titleData.appendChild(titleHighlight);
+ this.table.modules.localize.bind("columns|" + item.field, function (text) {
+ titleHighlight.innerText = text || item.title;
+ });
if (item.value instanceof Node) {
- div.appendChild(item.value);
- item.value = div.innerHTML;
+ node_content = document.createElement("div");
+ node_content.appendChild(item.value);
+ valueData.appendChild(node_content);
+ } else {
+ valueData.innerHTML = item.value;
}
- listContents += "<tr><td><strong>" + item.title + "</strong></td><td>" + item.value + "</td></tr>";
- });
-
- list.innerHTML = listContents;
+ row.appendChild(titleData);
+ row.appendChild(valueData);
+ list.appendChild(row);
+ }, this);
return Object.keys(data).length ? list : "";
};
//select a number of rows
SelectRow.prototype.selectRows = function (rows) {
- var _this83 = this;
+ var _this84 = this;
var rowMatch;
switch (typeof rows === 'undefined' ? 'undefined' : _typeof(rows)) {
case "undefined":
this.table.rowManager.rows.forEach(function (row) {
- _this83._selectRow(row, true, true);
+ _this84._selectRow(row, true, true);
});
this._rowSelectionChanged();
this._selectRow(rowMatch, true, true);
} else {
this.table.rowManager.getRows(rows).forEach(function (row) {
- _this83._selectRow(row, true, true);
+ _this84._selectRow(row, true, true);
});
}
default:
if (Array.isArray(rows)) {
rows.forEach(function (row) {
- _this83._selectRow(row, true, true);
+ _this84._selectRow(row, true, true);
});
this._rowSelectionChanged();
if (row) {
if (this.selectedRows.indexOf(row) == -1) {
+ row.getElement().classList.add("tabulator-selected");
if (!row.modules.select) {
row.modules.select = {};
}
if (row.modules.select.checkboxEl) {
row.modules.select.checkboxEl.checked = true;
}
- row.getElement().classList.add("tabulator-selected");
this.selectedRows.push(row);
rowCount = self.selectedRows.length;
- for (var _i17 = 0; _i17 < rowCount; _i17++) {
+ for (var _i18 = 0; _i18 < rowCount; _i18++) {
self._deselectRow(self.selectedRows[0], true);
}
if (index > -1) {
+ row.getElement().classList.remove("tabulator-selected");
if (!row.modules.select) {
row.modules.select = {};
}
if (row.modules.select.checkboxEl) {
row.modules.select.checkboxEl.checked = false;
}
- row.getElement().classList.remove("tabulator-selected");
self.selectedRows.splice(index, 1);
if (this.table.options.dataTreeSelectPropagate) {
};
SelectRow.prototype.childRowSelection = function (row, select) {
- var children = this.table.modules.dataTree.getChildren(row);
+ var children = this.table.modules.dataTree.getChildren(row, true);
if (select) {
- for (var _iterator2 = children, _isArray2 = Array.isArray(_iterator2), _i18 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
+ for (var _iterator2 = children, _isArray2 = Array.isArray(_iterator2), _i19 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
var _ref2;
if (_isArray2) {
- if (_i18 >= _iterator2.length) break;
- _ref2 = _iterator2[_i18++];
+ if (_i19 >= _iterator2.length) break;
+ _ref2 = _iterator2[_i19++];
} else {
- _i18 = _iterator2.next();
- if (_i18.done) break;
- _ref2 = _i18.value;
+ _i19 = _iterator2.next();
+ if (_i19.done) break;
+ _ref2 = _i19.value;
}
var child = _ref2;
this._selectRow(child, true);
}
} else {
- for (var _iterator3 = children, _isArray3 = Array.isArray(_iterator3), _i19 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
+ for (var _iterator3 = children, _isArray3 = Array.isArray(_iterator3), _i20 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
var _ref3;
if (_isArray3) {
- if (_i19 >= _iterator3.length) break;
- _ref3 = _iterator3[_i19++];
+ if (_i20 >= _iterator3.length) break;
+ _ref3 = _iterator3[_i20++];
} else {
- _i19 = _iterator3.next();
- if (_i19.done) break;
- _ref3 = _i19.value;
+ _i20 = _iterator3.next();
+ if (_i20.done) break;
+ _ref3 = _i20.value;
}
var _child = _ref3;
//sort each item in sort list
Sort.prototype._sortItems = function (data, sortList) {
- var _this84 = this;
+ var _this85 = this;
var sorterCount = sortList.length - 1;
for (var i = sorterCount; i >= 0; i--) {
var sortItem = sortList[i];
- result = _this84._sortRow(a, b, sortItem.column, sortItem.dir, sortItem.params);
+ result = _this85._sortRow(a, b, sortItem.column, sortItem.dir, sortItem.params);
if (result !== 0) {
break;
//sort numbers
number: function number(a, b, aRow, bRow, column, dir, params) {
var alignEmptyValues = params.alignEmptyValues;
- var decimal = params.decimalSeparator || ".";
- var thousand = params.thousandSeparator || ",";
+ var decimal = params.decimalSeparator;
+ var thousand = params.thousandSeparator;
var emptyAlign = 0;
- a = parseFloat(String(a).split(thousand).join("").split(decimal).join("."));
- b = parseFloat(String(b).split(thousand).join("").split(decimal).join("."));
+ a = String(a);
+ b = String(b);
+
+ if (thousand) {
+ a = a.split(thousand).join("");
+ b = b.split(thousand).join("");
+ }
+
+ if (decimal) {
+ a = a.split(decimal).join(".");
+ b = b.split(decimal).join(".");
+ }
+
+ a = parseFloat(a);
+ b = parseFloat(b);
//handle non numeric values
if (isNaN(a)) {
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
-var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(e,t){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Tabulator=t()}(this,function(){"use strict";Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(e){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),o=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;n<o;){var s=t[n];if(e.call(i,s,n,t))return n;n++}return-1}}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),o=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;n<o;){var s=t[n];if(e.call(i,s,n,t))return s;n++}}}),String.prototype.includes||(String.prototype.includes=function(e,t){if(e instanceof RegExp)throw TypeError("first argument must not be a RegExp");return void 0===t&&(t=0),-1!==this.indexOf(e,t)}),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(e,t){if(null==this)throw new TypeError('"this" is null or not defined');var o=Object(this),i=o.length>>>0;if(0===i)return!1;for(var n=0|t,s=Math.max(n>=0?n:i-Math.abs(n),0);s<i;){if(function(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}(o[s],e))return!0;s++}return!1}}),"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(e,t){if(null===e||void 0===e)throw new TypeError("Cannot convert undefined or null to object");for(var o=Object(e),i=1;i<arguments.length;i++){var n=arguments[i];if(null!==n&&void 0!==n)for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(o[s]=n[s])}return o},writable:!0,configurable:!0});var t=function(e){this.table=e,this.blockHozScrollEvent=!1,this.headersElement=this.createHeadersElement(),this.element=this.createHeaderElement(),this.rowManager=null,this.columns=[],this.columnsByIndex=[],this.columnsByField={},this.scrollLeft=0,this.element.insertBefore(this.headersElement,this.element.firstChild)};t.prototype.createHeadersElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-headers"),e},t.prototype.createHeaderElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-header"),this.table.options.headerVisible||e.classList.add("tabulator-header-hidden"),e},t.prototype.initialize=function(){},t.prototype.setRowManager=function(e){this.rowManager=e},t.prototype.getElement=function(){return this.element},t.prototype.getHeadersElement=function(){return this.headersElement},t.prototype.scrollHorizontal=function(e){var t=0,o=this.element.scrollWidth-this.table.element.clientWidth;this.element.scrollLeft=e,e>o?(t=e-o,this.element.style.marginLeft=-t+"px"):this.element.style.marginLeft=0,this.scrollLeft=e,this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.scrollHorizontal()},t.prototype.generateColumnsFromRowData=function(e){var t,o,i=[],n=this.table.options.autoColumnsDefinitions;if(e&&e.length){t=e[0];for(var s in t){var a={field:s,title:s},r=t[s];switch(void 0===r?"undefined":_typeof(r)){case"undefined":o="string";break;case"boolean":o="boolean";break;case"object":o=Array.isArray(r)?"array":"string";break;default:o=isNaN(r)||""===r?r.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)?"alphanum":"string":"number"}a.sorter=o,i.push(a)}if(n)switch(void 0===n?"undefined":_typeof(n)){case"function":this.table.options.columns=n.call(this.table,i);break;case"object":Array.isArray(n)?i.forEach(function(e){var t=n.find(function(t){return t.field===e.field});t&&Object.assign(e,t)}):i.forEach(function(e){n[e.field]&&Object.assign(e,n[e.field])}),this.table.options.columns=i}else this.table.options.columns=i;this.setColumns(this.table.options.columns)}},t.prototype.setColumns=function(e,t){for(var o=this;o.headersElement.firstChild;)o.headersElement.removeChild(o.headersElement.firstChild);o.columns=[],o.columnsByIndex=[],o.columnsByField={},o.table.modExists("frozenColumns")&&o.table.modules.frozenColumns.reset(),e.forEach(function(e,t){o._addColumn(e)}),o._reIndexColumns(),o.table.options.responsiveLayout&&o.table.modExists("responsiveLayout",!0)&&o.table.modules.responsiveLayout.initialize(),this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitialize(!1,!0),o.redraw(!0)},t.prototype._addColumn=function(e,t,o){var i=new n(e,this),s=i.getElement(),a=o?this.findColumnIndex(o):o;if(o&&a>-1){var r=this.columns.indexOf(o.getTopColumn()),l=o.getElement();t?(this.columns.splice(r,0,i),l.parentNode.insertBefore(s,l)):(this.columns.splice(r+1,0,i),l.parentNode.insertBefore(s,l.nextSibling))}else t?(this.columns.unshift(i),this.headersElement.insertBefore(i.getElement(),this.headersElement.firstChild)):(this.columns.push(i),this.headersElement.appendChild(i.getElement())),i.columnRendered();return i},t.prototype.registerColumnField=function(e){e.definition.field&&(this.columnsByField[e.definition.field]=e)},t.prototype.registerColumnPosition=function(e){this.columnsByIndex.push(e)},t.prototype._reIndexColumns=function(){this.columnsByIndex=[],this.columns.forEach(function(e){e.reRegisterPosition()})},t.prototype._verticalAlignHeaders=function(){var e=this,t=0;e.columns.forEach(function(e){var o;e.clearVerticalAlign(),(o=e.getHeight())>t&&(t=o)}),e.columns.forEach(function(o){o.verticalAlign(e.table.options.columnHeaderVertAlign,t)}),e.rowManager.adjustTableSize()},t.prototype.findColumn=function(e){var t=this;if("object"!=(void 0===e?"undefined":_typeof(e)))return this.columnsByField[e]||!1;if(e instanceof n)return e;if(e instanceof o)return e._getSelf()||!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement){return t.columns.find(function(t){return t.element===e})||!1}return!1},t.prototype.getColumnByField=function(e){return this.columnsByField[e]},t.prototype.getColumnsByFieldRoot=function(e){var t=this,o=[];return Object.keys(this.columnsByField).forEach(function(i){i.split(".")[0]===e&&o.push(t.columnsByField[i])}),o},t.prototype.getColumnByIndex=function(e){return this.columnsByIndex[e]},t.prototype.getFirstVisibileColumn=function(e){var e=this.columnsByIndex.findIndex(function(e){return e.visible});return e>-1&&this.columnsByIndex[e]},t.prototype.getColumns=function(){return this.columns},t.prototype.findColumnIndex=function(e){return this.columnsByIndex.findIndex(function(t){return e===t})},t.prototype.getRealColumns=function(){return this.columnsByIndex},t.prototype.traverse=function(e){this.columnsByIndex.forEach(function(t,o){e(t,o)})},t.prototype.getDefinitions=function(e){var t=this,o=[];return t.columnsByIndex.forEach(function(t){(!e||e&&t.visible)&&o.push(t.getDefinition())}),o},t.prototype.getDefinitionTree=function(){var e=this,t=[];return e.columns.forEach(function(e){t.push(e.getDefinition(!0))}),t},t.prototype.getComponents=function(e){var t=this,o=[];return(e?t.columns:t.columnsByIndex).forEach(function(e){o.push(e.getComponent())}),o},t.prototype.getWidth=function(){var e=0;return this.columnsByIndex.forEach(function(t){t.visible&&(e+=t.getWidth())}),e},t.prototype.moveColumn=function(e,t,o){this.moveColumnActual(e,t,o),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),t.element.parentNode.insertBefore(e.element,t.element),o&&t.element.parentNode.insertBefore(t.element,e.element),this._verticalAlignHeaders(),this.table.rowManager.reinitialize()},t.prototype.moveColumnActual=function(e,t,o){e.parent.isGroup?this._moveColumnInArray(e.parent.columns,e,t,o):this._moveColumnInArray(this.columns,e,t,o),this._moveColumnInArray(this.columnsByIndex,e,t,o,!0),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitialize(!0),this.table.options.columnMoved&&this.table.options.columnMoved.call(this.table,e.getComponent(),this.table.columnManager.getComponents()),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns")},t.prototype._moveColumnInArray=function(e,t,o,i,n){var s,a=this,r=e.indexOf(t),l=[];r>-1&&(e.splice(r,1),s=e.indexOf(o),s>-1?i&&(s+=1):s=r,e.splice(s,0,t),n&&(this.table.options.dataTree&&this.table.modExists("dataTree",!0)&&this.table.rowManager.rows.forEach(function(e){l=l.concat(a.table.modules.dataTree.getTreeChildren(e,!1,!0))}),l=l.concat(this.table.rowManager.rows),l.forEach(function(e){if(e.cells.length){var t=e.cells.splice(r,1)[0];e.cells.splice(s,0,t)}})))},t.prototype.scrollToColumn=function(e,t,o){var i=this,n=0,s=0,a=0,r=e.getElement();return new Promise(function(l,c){if(void 0===t&&(t=i.table.options.scrollToColumnPosition),void 0===o&&(o=i.table.options.scrollToColumnIfVisible),e.visible){switch(t){case"middle":case"center":a=-i.element.clientWidth/2;break;case"right":a=r.clientWidth-i.headersElement.clientWidth}if(!o&&(s=r.offsetLeft)>0&&s+r.offsetWidth<i.element.clientWidth)return!1;n=r.offsetLeft+a,n=Math.max(Math.min(n,i.table.rowManager.element.scrollWidth-i.table.rowManager.element.clientWidth),0),i.table.rowManager.scrollHorizontal(n),i.scrollHorizontal(n),l()}else console.warn("Scroll Error - Column not visible"),c("Scroll Error - Column not visible")})},t.prototype.generateCells=function(e){var t=this,o=[];return t.columnsByIndex.forEach(function(t){o.push(t.generateCell(e))}),o},t.prototype.getFlexBaseWidth=function(){var e=this,t=e.table.element.clientWidth,o=0;return e.rowManager.element.scrollHeight>e.rowManager.element.clientHeight&&(t-=e.rowManager.element.offsetWidth-e.rowManager.element.clientWidth),this.columnsByIndex.forEach(function(i){var n,s,a;i.visible&&(n=i.definition.width||0,s=void 0===i.minWidth?e.table.options.columnMinWidth:parseInt(i.minWidth),a="string"==typeof n?n.indexOf("%")>-1?t/100*parseInt(n):parseInt(n):n,o+=a>s?a:s)}),o},t.prototype.addColumn=function(e,t,o){var i=this;return new Promise(function(n,s){var a=i._addColumn(e,t,o);i._reIndexColumns(),i.table.options.responsiveLayout&&i.table.modExists("responsiveLayout",!0)&&i.table.modules.responsiveLayout.initialize(),i.table.modExists("columnCalcs")&&i.table.modules.columnCalcs.recalc(i.table.rowManager.activeRows),i.redraw(),"fitColumns"!=i.table.modules.layout.getMode()&&a.reinitializeWidth(),i._verticalAlignHeaders(),i.table.rowManager.reinitialize(),i.table.options.virtualDomHoz&&i.table.vdomHoz.reinitialize(),n(a)})},t.prototype.deregisterColumn=function(e){var t,o=e.getField();o&&delete this.columnsByField[o],t=this.columnsByIndex.indexOf(e),t>-1&&this.columnsByIndex.splice(t,1),t=this.columns.indexOf(e),t>-1&&this.columns.splice(t,1),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this._verticalAlignHeaders(),this.redraw()},t.prototype.redraw=function(e){e&&(h.prototype.helpers.elVisible(this.element)&&this._verticalAlignHeaders(),this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),["fitColumns","fitDataStretch"].indexOf(this.table.modules.layout.getMode())>-1?this.table.modules.layout.layout():e?this.table.modules.layout.layout():this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),e&&(this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns"),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.redraw()),this.table.footerManager.redraw()};var o=function(e){this._column=e,this.type="ColumnComponent"};o.prototype.getElement=function(){return this._column.getElement()},o.prototype.getDefinition=function(){return this._column.getDefinition()},o.prototype.getField=function(){return this._column.getField()},o.prototype.getCells=function(){var e=[];return this._column.cells.forEach(function(t){e.push(t.getComponent())}),e},o.prototype.getVisibility=function(){return console.warn("getVisibility function is deprecated, you should now use the isVisible function"),this._column.visible},o.prototype.isVisible=function(){return this._column.visible},o.prototype.show=function(){this._column.isGroup?this._column.columns.forEach(function(e){e.show()}):this._column.show()},o.prototype.hide=function(){this._column.isGroup?this._column.columns.forEach(function(e){e.hide()}):this._column.hide()},o.prototype.toggle=function(){this._column.visible?this.hide():this.show()},o.prototype.delete=function(){return this._column.delete()},o.prototype.getSubColumns=function(){var e=[];return this._column.columns.length&&this._column.columns.forEach(function(t){e.push(t.getComponent())}),e},o.prototype.getParentColumn=function(){return this._column.parent instanceof n&&this._column.parent.getComponent()},o.prototype._getSelf=function(){return this._column},o.prototype.scrollTo=function(){return this._column.table.columnManager.scrollToColumn(this._column)},o.prototype.getTable=function(){return this._column.table},o.prototype.headerFilterFocus=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterFocus(this._column)},o.prototype.reloadHeaderFilter=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.reloadHeaderFilter(this._column)},o.prototype.getHeaderFilterValue=function(){if(this._column.table.modExists("filter",!0))return this._column.table.modules.filter.getHeaderFilterValue(this._column)},o.prototype.setHeaderFilterValue=function(e){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterValue(this._column,e)},o.prototype.move=function(e,t){var o=this._column.table.columnManager.findColumn(e);o?this._column.table.columnManager.moveColumn(this._column,o,t):console.warn("Move Error - No matching column found:",o)},o.prototype.getNextColumn=function(){var e=this._column.nextColumn();return!!e&&e.getComponent()},o.prototype.getPrevColumn=function(){var e=this._column.prevColumn();return!!e&&e.getComponent()},o.prototype.updateDefinition=function(e){return this._column.updateDefinition(e)},o.prototype.getWidth=function(){return this._column.getWidth()},o.prototype.setWidth=function(e){var t;return t=!0===e?this._column.reinitializeWidth(!0):this._column.setWidth(e),this._column.table.options.virtualDomHoz&&this._column.table.vdomHoz.reinitialize(!0),t},o.prototype.validate=function(){return this._column.validate()};var n=function e(t,o){var i=this;this.table=o.table,this.definition=t,this.parent=o,this.type="column",this.columns=[],this.cells=[],this.element=this.createElement(),this.contentElement=!1,this.titleHolderElement=!1,this.titleElement=!1,this.groupElement=this.createGroupElement(),this.isGroup=!1,this.tooltip=!1,this.hozAlign="",this.vertAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.titleFormatterRendered=!1,this.setField(this.definition.field),this.table.options.invalidOptionWarnings&&this.checkDefinition(),this.modules={},this.cellEvents={cellClick:!1,cellDblClick:!1,cellContext:!1,cellTap:!1,cellDblTap:!1,cellTapHold:!1,cellMouseEnter:!1,cellMouseLeave:!1,cellMouseOver:!1,cellMouseOut:!1,cellMouseMove:!1},this.width=null,this.widthStyled="",this.minWidth=null,this.minWidthStyled="",this.widthFixed=!1,this.visible=!0,this.component=null,this._mapDepricatedFunctionality(),t.columns?(this.isGroup=!0,t.columns.forEach(function(t,o){var n=new e(t,i);i.attachColumn(n)}),i.checkColumnVisibility()):o.registerColumnField(this),t.rowHandle&&!1!==this.table.options.movableRows&&this.table.modExists("moveRow")&&this.table.modules.moveRow.setHandle(!0),this._buildHeader(),this.bindModuleColumns()};n.prototype.createElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-col"),e.setAttribute("role","columnheader"),e.setAttribute("aria-sort","none"),e},n.prototype.createGroupElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-col-group-cols"),e},n.prototype.checkDefinition=function(){var e=this;Object.keys(this.definition).forEach(function(t){-1===e.defaultOptionList.indexOf(t)&&console.warn("Invalid column definition option in '"+(e.field||e.definition.title)+"' column:",t)})},n.prototype.setField=function(e){this.field=e,this.fieldStructure=e?this.table.options.nestedFieldSeparator?e.split(this.table.options.nestedFieldSeparator):[e]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNestedData:this._setFlatData},n.prototype.registerColumnPosition=function(e){this.parent.registerColumnPosition(e)},n.prototype.registerColumnField=function(e){this.parent.registerColumnField(e)},n.prototype.reRegisterPosition=function(){this.isGroup?this.columns.forEach(function(e){e.reRegisterPosition()}):this.registerColumnPosition(this)},n.prototype._mapDepricatedFunctionality=function(){void 0!==this.definition.hideInHtml&&(this.definition.htmlOutput=!this.definition.hideInHtml,console.warn("hideInHtml column definition property is deprecated, you should now use htmlOutput")),void 0!==this.definition.align&&(this.definition.hozAlign=this.definition.align,console.warn("align column definition property is deprecated, you should now use hozAlign")),void 0!==this.definition.downloadTitle&&(this.definition.titleDownload=this.definition.downloadTitle,console.warn("downloadTitle definition property is deprecated, you should now use titleDownload"))},n.prototype.setTooltip=function(){var e=this,t=e.definition,o=t.headerTooltip||!1===t.tooltip?t.headerTooltip:e.table.options.tooltipsHeader;o?!0===o?t.field?e.table.modules.localize.bind("columns|"+t.field,function(o){e.element.setAttribute("title",o||t.title)}):e.element.setAttribute("title",t.title):("function"==typeof o&&!1===(o=o(e.getComponent()))&&(o=""),e.element.setAttribute("title",o)):e.element.setAttribute("title","")},n.prototype._buildHeader=function(){for(var e=this,t=e.definition;e.element.firstChild;)e.element.removeChild(e.element.firstChild);t.headerVertical&&(e.element.classList.add("tabulator-col-vertical"),"flip"===t.headerVertical&&e.element.classList.add("tabulator-col-vertical-flip")),e.contentElement=e._bindEvents(),e.contentElement=e._buildColumnHeaderContent(),e.element.appendChild(e.contentElement),e.isGroup?e._buildGroupHeader():e._buildColumnHeader(),e.setTooltip(),e.table.options.resizableColumns&&e.table.modExists("resizeColumns")&&e.table.modules.resizeColumns.initializeColumn("header",e,e.element),t.headerFilter&&e.table.modExists("filter")&&e.table.modExists("edit")&&(void 0!==t.headerFilterPlaceholder&&t.field&&e.table.modules.localize.setHeaderFilterColumnPlaceholder(t.field,t.headerFilterPlaceholder),e.table.modules.filter.initializeColumn(e)),e.table.modExists("frozenColumns")&&e.table.modules.frozenColumns.initializeColumn(e),e.table.options.movableColumns&&!e.isGroup&&e.table.modExists("moveColumn")&&e.table.modules.moveColumn.initializeColumn(e),(t.topCalc||t.bottomCalc)&&e.table.modExists("columnCalcs")&&e.table.modules.columnCalcs.initializeColumn(e),e.table.modExists("persistence")&&e.table.modules.persistence.config.columns&&e.table.modules.persistence.initializeColumn(e),e.element.addEventListener("mouseenter",function(t){e.setTooltip()})},n.prototype._bindEvents=function(){var e,t,o,i=this,n=i.definition;"function"==typeof n.headerClick&&i.element.addEventListener("click",function(e){n.headerClick(e,i.getComponent())}),"function"==typeof n.headerDblClick&&i.element.addEventListener("dblclick",function(e){n.headerDblClick(e,i.getComponent())}),"function"==typeof n.headerContext&&i.element.addEventListener("contextmenu",function(e){n.headerContext(e,i.getComponent())}),"function"==typeof n.headerTap&&(o=!1,i.element.addEventListener("touchstart",function(e){o=!0},{passive:!0}),i.element.addEventListener("touchend",function(e){o&&n.headerTap(e,i.getComponent()),o=!1})),"function"==typeof n.headerDblTap&&(e=null,i.element.addEventListener("touchend",function(t){e?(clearTimeout(e),e=null,n.headerDblTap(t,i.getComponent())):e=setTimeout(function(){clearTimeout(e),e=null},300)})),"function"==typeof n.headerTapHold&&(t=null,i.element.addEventListener("touchstart",function(e){clearTimeout(t),t=setTimeout(function(){clearTimeout(t),t=null,o=!1,n.headerTapHold(e,i.getComponent())},1e3)},{passive:!0}),i.element.addEventListener("touchend",function(e){clearTimeout(t),t=null})),"function"==typeof n.cellClick&&(i.cellEvents.cellClick=n.cellClick),"function"==typeof n.cellDblClick&&(i.cellEvents.cellDblClick=n.cellDblClick),"function"==typeof n.cellContext&&(i.cellEvents.cellContext=n.cellContext),"function"==typeof n.cellMouseEnter&&(i.cellEvents.cellMouseEnter=n.cellMouseEnter),"function"==typeof n.cellMouseLeave&&(i.cellEvents.cellMouseLeave=n.cellMouseLeave),"function"==typeof n.cellMouseOver&&(i.cellEvents.cellMouseOver=n.cellMouseOver),"function"==typeof n.cellMouseOut&&(i.cellEvents.cellMouseOut=n.cellMouseOut),"function"==typeof n.cellMouseMove&&(i.cellEvents.cellMouseMove=n.cellMouseMove),"function"==typeof n.cellTap&&(i.cellEvents.cellTap=n.cellTap),"function"==typeof n.cellDblTap&&(i.cellEvents.cellDblTap=n.cellDblTap),"function"==typeof n.cellTapHold&&(i.cellEvents.cellTapHold=n.cellTapHold),"function"==typeof n.cellEdited&&(i.cellEvents.cellEdited=n.cellEdited),"function"==typeof n.cellEditing&&(i.cellEvents.cellEditing=n.cellEditing),"function"==typeof n.cellEditCancelled&&(i.cellEvents.cellEditCancelled=n.cellEditCancelled)},n.prototype._buildColumnHeader=function(){var e=this,t=this.definition,o=this.table;if(o.modExists("sort")&&o.modules.sort.initializeColumn(this,this.titleHolderElement),(t.headerContextMenu||t.headerClickMenu||t.headerMenu)&&o.modExists("menu")&&o.modules.menu.initializeColumnHeader(this),o.modExists("format")&&o.modules.format.initializeColumn(this),void 0!==t.editor&&o.modExists("edit")&&o.modules.edit.initializeColumn(this),void 0!==t.validator&&o.modExists("validate")&&o.modules.validate.initializeColumn(this),o.modExists("mutator")&&o.modules.mutator.initializeColumn(this),o.modExists("accessor")&&o.modules.accessor.initializeColumn(this),_typeof(o.options.responsiveLayout)&&o.modExists("responsiveLayout")&&o.modules.responsiveLayout.initializeColumn(this),void 0!==t.visible&&(t.visible?this.show(!0):this.hide(!0)),t.cssClass){t.cssClass.split(" ").forEach(function(t){e.element.classList.add(t)})}t.field&&this.element.setAttribute("tabulator-field",t.field),this.setMinWidth(void 0===t.minWidth?this.table.options.columnMinWidth:parseInt(t.minWidth)),this.reinitializeWidth(),this.tooltip=this.definition.tooltip||!1===this.definition.tooltip?this.definition.tooltip:this.table.options.tooltips,this.hozAlign=void 0===this.definition.hozAlign?this.table.options.cellHozAlign:this.definition.hozAlign,this.vertAlign=void 0===this.definition.vertAlign?this.table.options.cellVertAlign:this.definition.vertAlign,this.titleElement.style.textAlign=this.definition.headerHozAlign||this.table.options.headerHozAlign},n.prototype._buildColumnHeaderContent=function(){var e=(this.definition,this.table,document.createElement("div"));return e.classList.add("tabulator-col-content"),this.titleHolderElement=document.createElement("div"),this.titleHolderElement.classList.add("tabulator-col-title-holder"),e.appendChild(this.titleHolderElement),this.titleElement=this._buildColumnHeaderTitle(),this.titleHolderElement.appendChild(this.titleElement),e},n.prototype._buildColumnHeaderTitle=function(){var e=this,t=e.definition,o=e.table,i=document.createElement("div");if(i.classList.add("tabulator-col-title"),t.editableTitle){var n=document.createElement("input");n.classList.add("tabulator-title-editor"),n.addEventListener("click",function(e){e.stopPropagation(),n.focus()}),n.addEventListener("change",function(){t.title=n.value,o.options.columnTitleChanged.call(e.table,e.getComponent())}),i.appendChild(n),t.field?o.modules.localize.bind("columns|"+t.field,function(e){n.value=e||t.title||" "}):n.value=t.title||" "}else t.field?o.modules.localize.bind("columns|"+t.field,function(o){e._formatColumnHeaderTitle(i,o||t.title||" ")}):e._formatColumnHeaderTitle(i,t.title||" ");return i},n.prototype._formatColumnHeaderTitle=function(e,t){var o,i,n,s,a,r=this;if(this.definition.titleFormatter&&this.table.modExists("format"))switch(o=this.table.modules.format.getFormatter(this.definition.titleFormatter),a=function(e){r.titleFormatterRendered=e},s={getValue:function(){return t},getElement:function(){return e}},n=this.definition.titleFormatterParams||{},n="function"==typeof n?n():n,i=o.call(this.table.modules.format,s,n,a),void 0===i?"undefined":_typeof(i)){case"object":i instanceof Node?e.appendChild(i):(e.innerHTML="",console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",i));break;case"undefined":case"null":e.innerHTML="";break;default:e.innerHTML=i}else e.innerHTML=t},n.prototype._buildGroupHeader=function(){var e=this;if(this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.definition.cssClass){this.definition.cssClass.split(" ").forEach(function(t){e.element.classList.add(t)})}(this.definition.headerContextMenu||this.definition.headerMenu)&&this.table.modExists("menu")&&this.table.modules.menu.initializeColumnHeader(this),this.element.appendChild(this.groupElement)},n.prototype._getFlatData=function(e){return e[this.field]},n.prototype._getNestedData=function(e){for(var t,o=e,i=this.fieldStructure,n=i.length,s=0;s<n&&(o=o[i[s]],t=o,o);s++);return t},n.prototype._setFlatData=function(e,t){this.field&&(e[this.field]=t)},n.prototype._setNestedData=function(e,t){for(var o=e,i=this.fieldStructure,n=i.length,s=0;s<n;s++)if(s==n-1)o[i[s]]=t;else{if(!o[i[s]]){if(void 0===t)break;o[i[s]]={}}o=o[i[s]]}},n.prototype.attachColumn=function(e){var t=this;t.groupElement?(t.columns.push(e),t.groupElement.appendChild(e.getElement())):console.warn("Column Warning - Column being attached to another column instead of column group")},n.prototype.verticalAlign=function(e,t){var o=this.parent.isGroup?this.parent.getGroupElement().clientHeight:t||this.parent.getHeadersElement().clientHeight;this.element.style.height=o+"px",this.isGroup&&(this.groupElement.style.minHeight=o-this.contentElement.offsetHeight+"px"),this.isGroup||"top"===e||(this.element.style.paddingTop="bottom"===e?this.element.clientHeight-this.contentElement.offsetHeight+"px":(this.element.clientHeight-this.contentElement.offsetHeight)/2+"px"),this.columns.forEach(function(t){t.verticalAlign(e)})},n.prototype.clearVerticalAlign=function(){this.element.style.paddingTop="",this.element.style.height="",this.element.style.minHeight="",this.groupElement.style.minHeight="",this.columns.forEach(function(e){e.clearVerticalAlign()})},n.prototype.bindModuleColumns=function(){"rownum"==this.definition.formatter&&(this.table.rowManager.rowNumColumn=this)},n.prototype.getElement=function(){return this.element},n.prototype.getGroupElement=function(){return this.groupElement},n.prototype.getField=function(){return this.field},n.prototype.getFirstColumn=function(){return this.isGroup?!!this.columns.length&&this.columns[0].getFirstColumn():this},n.prototype.getLastColumn=function(){return this.isGroup?!!this.columns.length&&this.columns[this.columns.length-1].getLastColumn():this},n.prototype.getColumns=function(){return this.columns},n.prototype.getCells=function(){return this.cells},n.prototype.getTopColumn=function(){return this.parent.isGroup?this.parent.getTopColumn():this},n.prototype.getDefinition=function(e){var t=[];return this.isGroup&&e&&(this.columns.forEach(function(e){t.push(e.getDefinition(!0))}),this.definition.columns=t),this.definition},n.prototype.checkColumnVisibility=function(){var e=!1;this.columns.forEach(function(t){t.visible&&(e=!0)}),e?(this.show(),this.parent.table.options.columnVisibilityChanged.call(this.table,this.getComponent(),!1)):this.hide()},n.prototype.show=function(e,t){this.visible||(this.visible=!0,this.element.style.display="",this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach(function(e){e.show()}),this.isGroup||null!==this.width||this.reinitializeWidth(),this.table.columnManager._verticalAlignHeaders(),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns"),!t&&this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.updateColumnVisibility(this,this.visible),e||this.table.options.columnVisibilityChanged.call(this.table,this.getComponent(),!0),this.parent.isGroup&&this.parent.matchChildWidths())},n.prototype.hide=function(e,t){this.visible&&(this.visible=!1,this.element.style.display="none",this.table.columnManager._verticalAlignHeaders(),this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach(function(e){e.hide()}),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns"),!t&&this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.updateColumnVisibility(this,this.visible),e||this.table.options.columnVisibilityChanged.call(this.table,this.getComponent(),!1),this.parent.isGroup&&this.parent.matchChildWidths())},n.prototype.matchChildWidths=function(){var e=0;this.contentElement&&this.columns.length&&(this.columns.forEach(function(t){t.visible&&(e+=t.getWidth())}),this.contentElement.style.maxWidth=e-1+"px",this.parent.isGroup&&this.parent.matchChildWidths())},n.prototype.setWidth=function(e){this.widthFixed=!0,this.setWidthActual(e)},n.prototype.setWidthActual=function(e){isNaN(e)&&(e=Math.floor(this.table.element.clientWidth/100*parseInt(e))),e=Math.max(this.minWidth,e),this.width=e,this.widthStyled=e?e+"px":"",this.element.style.width=this.widthStyled,this.isGroup||this.cells.forEach(function(e){e.setWidth()}),this.parent.isGroup&&this.parent.matchChildWidths(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()},n.prototype.checkCellHeights=function(){var e=[];this.cells.forEach(function(t){t.row.heightInitialized&&(null!==t.row.getElement().offsetParent?(e.push(t.row),t.row.clearCellHeight()):t.row.heightInitialized=!1)}),e.forEach(function(e){e.calcHeight()}),e.forEach(function(e){e.setCellHeight()})},n.prototype.getWidth=function(){var e=0;return this.isGroup?this.columns.forEach(function(t){t.visible&&(e+=t.getWidth())}):e=this.width,e},n.prototype.getHeight=function(){return this.element.offsetHeight},n.prototype.setMinWidth=function(e){this.minWidth=e,this.minWidthStyled=e?e+"px":"",this.element.style.minWidth=this.minWidthStyled,this.cells.forEach(function(e){e.setMinWidth()})},
-n.prototype.delete=function(){var e=this;return new Promise(function(t,o){e.isGroup&&e.columns.forEach(function(e){e.delete()}),e.table.modExists("edit")&&e.table.modules.edit.currentCell.column===e&&e.table.modules.edit.cancelEdit();for(var i=e.cells.length,n=0;n<i;n++)e.cells[0].delete();e.element.parentNode&&e.element.parentNode.removeChild(e.element),e.element=!1,e.contentElement=!1,e.titleElement=!1,e.groupElement=!1,e.table.columnManager.deregisterColumn(e),e.table.options.virtualDomHoz&&e.table.vdomHoz.reinitialize(!0),t()})},n.prototype.columnRendered=function(){this.titleFormatterRendered&&this.titleFormatterRendered()},n.prototype.validate=function(){var e=[];return this.cells.forEach(function(t){t.validate()||e.push(t.getComponent())}),!e.length||e},n.prototype.generateCell=function(e){var t=this,o=new u(t,e);return this.cells.push(o),o},n.prototype.nextColumn=function(){var e=this.table.columnManager.findColumnIndex(this);return e>-1&&this._nextVisibleColumn(e+1)},n.prototype._nextVisibleColumn=function(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._nextVisibleColumn(e+1)},n.prototype.prevColumn=function(){var e=this.table.columnManager.findColumnIndex(this);return e>-1&&this._prevVisibleColumn(e-1)},n.prototype._prevVisibleColumn=function(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._prevVisibleColumn(e-1)},n.prototype.reinitializeWidth=function(e){this.widthFixed=!1,void 0===this.definition.width||e||this.setWidth(this.definition.width),this.table.modExists("filter")&&this.table.modules.filter.hideHeaderFilterElements(),this.fitToData(),this.table.modExists("filter")&&this.table.modules.filter.showHeaderFilterElements()},n.prototype.fitToData=function(){var e=this;this.widthFixed||(this.element.style.width="",e.cells.forEach(function(e){e.clearWidth()}));var t=this.element.offsetWidth;e.width&&this.widthFixed||(e.cells.forEach(function(e){var o=e.getWidth();o>t&&(t=o)}),t&&e.setWidthActual(t+1))},n.prototype.updateDefinition=function(e){var t=this;return new Promise(function(o,i){var n;t.isGroup?(console.warn("Column Update Error - The updateDefinition function is only available on columns, not column groups"),i("Column Update Error - The updateDefinition function is only available on columns, not column groups")):(n=Object.assign({},t.getDefinition()),n=Object.assign(n,e),t.table.columnManager.addColumn(n,!1,t).then(function(e){n.field==t.field&&(t.field=!1),t.delete().then(function(){o(e.getComponent())}).catch(function(e){i(e)})}).catch(function(e){i(e)}))})},n.prototype.deleteCell=function(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)},n.prototype.defaultOptionList=["title","field","columns","visible","align","hozAlign","vertAlign","width","minWidth","widthGrow","widthShrink","resizable","frozen","responsive","tooltip","cssClass","rowHandle","hideInHtml","print","htmlOutput","sorter","sorterParams","formatter","formatterParams","variableHeight","editable","editor","editorParams","validator","mutator","mutatorParams","mutatorData","mutatorDataParams","mutatorEdit","mutatorEditParams","mutatorClipboard","mutatorClipboardParams","accessor","accessorParams","accessorData","accessorDataParams","accessorDownload","accessorDownloadParams","accessorClipboard","accessorClipboardParams","accessorPrint","accessorPrintParams","accessorHtmlOutput","accessorHtmlOutputParams","clipboard","download","downloadTitle","topCalc","topCalcParams","topCalcFormatter","topCalcFormatterParams","bottomCalc","bottomCalcParams","bottomCalcFormatter","bottomCalcFormatterParams","cellClick","cellDblClick","cellContext","cellTap","cellDblTap","cellTapHold","cellMouseEnter","cellMouseLeave","cellMouseOver","cellMouseOut","cellMouseMove","cellEditing","cellEdited","cellEditCancelled","headerSort","headerSortStartingDir","headerSortTristate","headerClick","headerDblClick","headerContext","headerTap","headerDblTap","headerTapHold","headerTooltip","headerVertical","headerHozAlign","editableTitle","titleFormatter","titleFormatterParams","headerFilter","headerFilterPlaceholder","headerFilterParams","headerFilterEmptyCheck","headerFilterFunc","headerFilterFuncParams","headerFilterLiveFilter","print","headerContextMenu","headerMenu","contextMenu","clickMenu","formatterPrint","formatterPrintParams","formatterClipboard","formatterClipboardParams","formatterHtmlOutput","formatterHtmlOutputParams","titlePrint","titleClipboard","titleHtmlOutput","titleDownload"],n.prototype.getComponent=function(){return this.component||(this.component=new o(this)),this.component};var s=function(e){this.table=e,this.element=this.createHolderElement(),this.tableElement=this.createTableElement(),this.heightFixer=this.createTableElement(),this.columnManager=null,this.height=0,this.firstRender=!1,this.renderMode="virtual",this.fixedHeight=!1,this.rows=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.scrollTop=0,this.scrollLeft=0,this.vDomRowHeight=20,this.vDomTop=0,this.vDomBottom=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomMaxRenderChain=90,this.vDomWindowBuffer=0,this.vDomWindowMinTotalRows=20,this.vDomWindowMinMarginRows=5,this.vDomTopNewRows=[],this.vDomBottomNewRows=[],this.rowNumColumn=!1,this.redrawBlock=!1,this.redrawBlockRestoreConfig=!1,this.redrawBlockRederInPosition=!1};s.prototype.createHolderElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-tableHolder"),e.setAttribute("tabindex",0),e},s.prototype.createTableElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-table"),e},s.prototype.getElement=function(){return this.element},s.prototype.getTableElement=function(){return this.tableElement},s.prototype.getRowPosition=function(e,t){return t?this.activeRows.indexOf(e):this.rows.indexOf(e)},s.prototype.setColumnManager=function(e){this.columnManager=e},s.prototype.initialize=function(){var e=this;e.setRenderMode(),e.element.appendChild(e.tableElement),e.firstRender=!0,e.element.addEventListener("scroll",function(){var t=e.element.scrollLeft;e.scrollLeft!=t&&(e.columnManager.scrollHorizontal(t),e.table.options.groupBy&&e.table.modules.groupRows.scrollHeaders(t),e.table.modExists("columnCalcs")&&e.table.modules.columnCalcs.scrollHorizontal(t),e.table.options.scrollHorizontal(t)),e.scrollLeft=t}),"virtual"===this.renderMode&&e.element.addEventListener("scroll",function(){var t=e.element.scrollTop,o=e.scrollTop>t;e.scrollTop!=t?(e.scrollTop=t,e.scrollVertical(o),"scroll"==e.table.options.ajaxProgressiveLoad&&e.table.modules.ajax.nextPage(e.element.scrollHeight-e.element.clientHeight-t),e.table.options.scrollVertical(t)):e.scrollTop=t})},s.prototype.findRow=function(e){var t=this;if("object"!=(void 0===e?"undefined":_typeof(e))){if(void 0===e||null===e)return!1;return t.rows.find(function(o){return o.data[t.table.options.index]==e})||!1}if(e instanceof l)return e;if(e instanceof r)return e._getSelf()||!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement){return t.rows.find(function(t){return t.element===e})||!1}return!1},s.prototype.getRowFromDataObject=function(e){return this.rows.find(function(t){return t.data===e})||!1},s.prototype.getRowFromPosition=function(e,t){return t?this.activeRows[e]:this.rows[e]},s.prototype.scrollToRow=function(e,t,o){var i,n=this,s=this.getDisplayRows().indexOf(e),a=e.getElement(),r=0;return new Promise(function(e,l){if(s>-1){if(void 0===t&&(t=n.table.options.scrollToRowPosition),void 0===o&&(o=n.table.options.scrollToRowIfVisible),"nearest"===t)switch(n.renderMode){case"classic":i=h.prototype.helpers.elOffset(a).top,t=Math.abs(n.element.scrollTop-i)>Math.abs(n.element.scrollTop+n.element.clientHeight-i)?"bottom":"top";break;case"virtual":t=Math.abs(n.vDomTop-s)>Math.abs(n.vDomBottom-s)?"bottom":"top"}if(!o&&h.prototype.helpers.elVisible(a)&&(r=h.prototype.helpers.elOffset(a).top-h.prototype.helpers.elOffset(n.element).top)>0&&r<n.element.clientHeight-a.offsetHeight)return!1;switch(n.renderMode){case"classic":n.element.scrollTop=h.prototype.helpers.elOffset(a).top-h.prototype.helpers.elOffset(n.element).top+n.element.scrollTop;break;case"virtual":n._virtualRenderFill(s,!0)}switch(t){case"middle":case"center":n.element.scrollHeight-n.element.scrollTop==n.element.clientHeight?n.element.scrollTop=n.element.scrollTop+(a.offsetTop-n.element.scrollTop)-(n.element.scrollHeight-a.offsetTop)/2:n.element.scrollTop=n.element.scrollTop-n.element.clientHeight/2;break;case"bottom":n.element.scrollHeight-n.element.scrollTop==n.element.clientHeight?n.element.scrollTop=n.element.scrollTop-(n.element.scrollHeight-a.offsetTop)+a.offsetHeight:n.element.scrollTop=n.element.scrollTop-n.element.clientHeight+a.offsetHeight}e()}else console.warn("Scroll Error - Row not visible"),l("Scroll Error - Row not visible")})},s.prototype.setData=function(e,t,o){var i=this,n=this;return new Promise(function(s,a){t&&i.getDisplayRows().length?n.table.options.pagination?n._setDataActual(e,!0):i.reRenderInPosition(function(){n._setDataActual(e)}):(i.table.options.autoColumns&&o&&i.table.columnManager.generateColumnsFromRowData(e),i.resetScroll(),i._setDataActual(e)),s()})},s.prototype._setDataActual=function(e,t){var o=this;o.table.options.dataLoading.call(this.table,e),this._wipeElements(),this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.clear(),Array.isArray(e)?(this.table.modExists("selectRow")&&this.table.modules.selectRow.clearSelectionData(),this.table.options.reactiveData&&this.table.modExists("reactiveData",!0)&&this.table.modules.reactiveData.watchData(e),e.forEach(function(e,t){if(e&&"object"===(void 0===e?"undefined":_typeof(e))){var i=new l(e,o);o.rows.push(i)}else console.warn("Data Loading Warning - Invalid row data detected and ignored, expecting object but received:",e)}),o.refreshActiveData(!1,!1,t),o.table.options.dataLoaded.call(this.table,e)):console.error("Data Loading Error - Unable to process data due to invalid data type \nExpecting: array \nReceived: ",void 0===e?"undefined":_typeof(e),"\nData: ",e)},s.prototype._wipeElements=function(){this.rows.forEach(function(e){e.wipe()}),this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.wipe(),this.rows=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.adjustTableSize()},s.prototype.deleteRow=function(e,t){var o=this.rows.indexOf(e),i=this.activeRows.indexOf(e);i>-1&&this.activeRows.splice(i,1),o>-1&&this.rows.splice(o,1),this.setActiveRows(this.activeRows),this.displayRowIterator(function(t){var o=t.indexOf(e);o>-1&&t.splice(o,1)}),t||this.reRenderInPosition(),this.regenerateRowNumbers(),this.table.options.rowDeleted.call(this.table,e.getComponent()),this.table.options.dataChanged&&this.table.options.dataChanged.call(this.table,this.getData()),this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.groupRows.updateGroupRows(!0):this.table.options.pagination&&this.table.modExists("page")?this.refreshActiveData(!1,!1,!0):this.table.options.pagination&&this.table.modExists("page")&&this.refreshActiveData("page")},s.prototype.addRow=function(e,t,o,i){var n=this.addRowActual(e,t,o,i);return this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowAdd",n,{data:e,pos:t,index:o}),n},s.prototype.addRows=function(e,t,o){var i=this,n=this,s=0,a=[];return new Promise(function(r,l){t=i.findAddRowPos(t),Array.isArray(e)||(e=[e]),s=e.length-1,(void 0===o&&t||void 0!==o&&!t)&&e.reverse(),e.forEach(function(e,i){var s=n.addRow(e,t,o,!0);a.push(s)}),i.table.options.groupBy&&i.table.modExists("groupRows")?i.table.modules.groupRows.updateGroupRows(!0):i.table.options.pagination&&i.table.modExists("page")?i.refreshActiveData(!1,!1,!0):i.reRenderInPosition(),i.table.modExists("columnCalcs")&&i.table.modules.columnCalcs.recalc(i.table.rowManager.activeRows),i.regenerateRowNumbers(),r(a)})},s.prototype.findAddRowPos=function(e){return void 0===e&&(e=this.table.options.addRowPos),"pos"===e&&(e=!0),"bottom"===e&&(e=!1),e},s.prototype.addRowActual=function(e,t,o,i){var n,s,a=e instanceof l?e:new l(e||{},this),r=this.findAddRowPos(t),c=-1;if(!o&&this.table.options.pagination&&"page"==this.table.options.paginationAddRow&&(s=this.getDisplayRows(),r?s.length?o=s[0]:this.activeRows.length&&(o=this.activeRows[this.activeRows.length-1],r=!1):s.length&&(o=s[s.length-1],r=!(s.length<this.table.modules.page.getPageSize()))),void 0!==o&&(o=this.findRow(o)),this.table.options.groupBy&&this.table.modExists("groupRows")){this.table.modules.groupRows.assignRowToGroup(a);var u=a.getGroup().rows;u.length>1&&(!o||o&&-1==u.indexOf(o)?r?u[0]!==a&&(o=u[0],this._moveRowInArray(a.getGroup().rows,a,o,!r)):u[u.length-1]!==a&&(o=u[u.length-1],this._moveRowInArray(a.getGroup().rows,a,o,!r)):this._moveRowInArray(a.getGroup().rows,a,o,!r))}return o&&(c=this.rows.indexOf(o)),o&&c>-1?(n=this.activeRows.indexOf(o),this.displayRowIterator(function(e){var t=e.indexOf(o);t>-1&&e.splice(r?t:t+1,0,a)}),n>-1&&this.activeRows.splice(r?n:n+1,0,a),this.rows.splice(r?c:c+1,0,a)):r?(this.displayRowIterator(function(e){e.unshift(a)}),this.activeRows.unshift(a),this.rows.unshift(a)):(this.displayRowIterator(function(e){e.push(a)}),this.activeRows.push(a),this.rows.push(a)),this.setActiveRows(this.activeRows),this.table.options.rowAdded.call(this.table,a.getComponent()),this.table.options.dataChanged&&this.table.options.dataChanged.call(this.table,this.getData()),i||this.reRenderInPosition(),a},s.prototype.moveRow=function(e,t,o){this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowMove",e,{posFrom:this.getRowPosition(e),posTo:this.getRowPosition(t),to:t,after:o}),this.moveRowActual(e,t,o),this.regenerateRowNumbers(),this.table.options.rowMoved.call(this.table,e.getComponent())},s.prototype.moveRowActual=function(e,t,o){var i=this;if(this._moveRowInArray(this.rows,e,t,o),this._moveRowInArray(this.activeRows,e,t,o),this.displayRowIterator(function(n){i._moveRowInArray(n,e,t,o)}),this.table.options.groupBy&&this.table.modExists("groupRows")){!o&&t instanceof H&&(t=this.table.rowManager.prevDisplayRow(e)||t);var n=t.getGroup(),s=e.getGroup();n===s?this._moveRowInArray(n.rows,e,t,o):(s&&s.removeRow(e),n.insertRow(e,t,o))}},s.prototype._moveRowInArray=function(e,t,o,i){var n,s,a,r;if(t!==o&&(n=e.indexOf(t),n>-1&&(e.splice(n,1),s=e.indexOf(o),s>-1?i?e.splice(s+1,0,t):e.splice(s,0,t):e.splice(n,0,t)),e===this.getDisplayRows())){a=n<s?n:s,r=s>n?s:n+1;for(var l=a;l<=r;l++)e[l]&&this.styleRow(e[l],l)}},s.prototype.clearData=function(){this.setData([])},s.prototype.getRowIndex=function(e){return this.findRowIndex(e,this.rows)},s.prototype.getDisplayRowIndex=function(e){var t=this.getDisplayRows().indexOf(e);return t>-1&&t},s.prototype.nextDisplayRow=function(e,t){var o=this.getDisplayRowIndex(e),i=!1;return!1!==o&&o<this.displayRowsCount-1&&(i=this.getDisplayRows()[o+1]),!i||i instanceof l&&"row"==i.type?i:this.nextDisplayRow(i,t)},s.prototype.prevDisplayRow=function(e,t){var o=this.getDisplayRowIndex(e),i=!1;return o&&(i=this.getDisplayRows()[o-1]),!t||!i||i instanceof l&&"row"==i.type?i:this.prevDisplayRow(i,t)},s.prototype.findRowIndex=function(e,t){var o;return!!((e=this.findRow(e))&&(o=t.indexOf(e))>-1)&&o},s.prototype.getData=function(e,t){var o=[];return this.getRows(e).forEach(function(e){"row"==e.type&&o.push(e.getData(t||"data"))}),o},s.prototype.getComponents=function(e){var t=[];return this.getRows(e).forEach(function(e){t.push(e.getComponent())}),t},s.prototype.getDataCount=function(e){return this.getRows(e).length},s.prototype._genRemoteRequest=function(){var e=this,t=this.table,o=t.options,i={};if(t.modExists("page")){if(o.ajaxSorting){var n=this.table.modules.sort.getSort();n.forEach(function(e){delete e.column}),i[this.table.modules.page.paginationDataSentNames.sorters]=n}if(o.ajaxFiltering){var s=this.table.modules.filter.getFilters(!0,!0);i[this.table.modules.page.paginationDataSentNames.filters]=s}this.table.modules.ajax.setParams(i,!0)}t.modules.ajax.sendRequest().then(function(t){e._setDataActual(t,!0)}).catch(function(e){})},s.prototype.filterRefresh=function(){var e=this.table,t=e.options,o=this.scrollLeft;t.ajaxFiltering?"remote"==t.pagination&&e.modExists("page")?(e.modules.page.reset(!0),e.modules.page.setPage(1).then(function(){}).catch(function(){})):t.ajaxProgressiveLoad?e.modules.ajax.loadData().then(function(){}).catch(function(){}):this._genRemoteRequest():this.refreshActiveData("filter"),this.scrollHorizontal(o)},s.prototype.sorterRefresh=function(e){var t=this.table,o=this.table.options,i=this.scrollLeft;o.ajaxSorting?("remote"==o.pagination||o.progressiveLoad)&&t.modExists("page")?(t.modules.page.reset(!0),t.modules.page.setPage(1).then(function(){}).catch(function(){})):o.ajaxProgressiveLoad?t.modules.ajax.loadData().then(function(){}).catch(function(){}):this._genRemoteRequest():this.refreshActiveData(e?"filter":"sort"),this.scrollHorizontal(i)},s.prototype.scrollHorizontal=function(e){this.scrollLeft=e,this.element.scrollLeft=e,this.table.options.groupBy&&this.table.modules.groupRows.scrollHeaders(e),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.scrollHorizontal(e)},s.prototype.refreshActiveData=function(e,t,o){var i,n=this,s=this.table,a=["all","filter","sort","display","freeze","group","tree","page"];if(this.redrawBlock)return void((!this.redrawBlockRestoreConfig||a.indexOf(e)<a.indexOf(this.redrawBlockRestoreConfig.stage))&&(this.redrawBlockRestoreConfig={stage:e,skipStage:t,renderInPosition:o}));switch(n.table.modExists("edit")&&n.table.modules.edit.cancelEdit(),e||(e="all"),s.options.selectable&&!s.options.selectablePersistence&&s.modExists("selectRow")&&s.modules.selectRow.deselectRows(),e){case"all":case"filter":t?t=!1:s.modExists("filter")?n.setActiveRows(s.modules.filter.filter(n.rows)):n.setActiveRows(n.rows.slice(0));case"sort":t?t=!1:s.modExists("sort")&&s.modules.sort.sort(this.activeRows),this.regenerateRowNumbers();case"display":this.resetDisplayRows();case"freeze":t?t=!1:this.table.modExists("frozenRows")&&s.modules.frozenRows.isFrozen()&&(s.modules.frozenRows.getDisplayIndex()||s.modules.frozenRows.setDisplayIndex(this.getNextDisplayIndex()),i=s.modules.frozenRows.getDisplayIndex(),!0!==(i=n.setDisplayRows(s.modules.frozenRows.getRows(this.getDisplayRows(i-1)),i))&&s.modules.frozenRows.setDisplayIndex(i));case"group":t?t=!1:s.options.groupBy&&s.modExists("groupRows")&&(s.modules.groupRows.getDisplayIndex()||s.modules.groupRows.setDisplayIndex(this.getNextDisplayIndex()),i=s.modules.groupRows.getDisplayIndex(),!0!==(i=n.setDisplayRows(s.modules.groupRows.getRows(this.getDisplayRows(i-1)),i))&&s.modules.groupRows.setDisplayIndex(i));case"tree":t?t=!1:s.options.dataTree&&s.modExists("dataTree")&&(s.modules.dataTree.getDisplayIndex()||s.modules.dataTree.setDisplayIndex(this.getNextDisplayIndex()),i=s.modules.dataTree.getDisplayIndex(),!0!==(i=n.setDisplayRows(s.modules.dataTree.getRows(this.getDisplayRows(i-1)),i))&&s.modules.dataTree.setDisplayIndex(i)),s.options.pagination&&s.modExists("page")&&!o&&"local"==s.modules.page.getMode()&&s.modules.page.reset();case"page":t?t=!1:s.options.pagination&&s.modExists("page")&&(s.modules.page.getDisplayIndex()||s.modules.page.setDisplayIndex(this.getNextDisplayIndex()),i=s.modules.page.getDisplayIndex(),"local"==s.modules.page.getMode()&&s.modules.page.setMaxRows(this.getDisplayRows(i-1).length),!0!==(i=n.setDisplayRows(s.modules.page.getRows(this.getDisplayRows(i-1)),i))&&s.modules.page.setDisplayIndex(i))}h.prototype.helpers.elVisible(n.element)&&(o?n.reRenderInPosition():("all"===e&&this.table.options.virtualDomHoz&&this.table.vdomHoz.dataChange(),n.renderTable(),s.options.layoutColumnsOnNewData&&n.table.columnManager.redraw(!0))),s.modExists("columnCalcs")&&s.modules.columnCalcs.recalc(this.activeRows)},s.prototype.regenerateRowNumbers=function(){var e=this;this.rowNumColumn&&this.activeRows.forEach(function(t){var o=t.getCell(e.rowNumColumn);o&&o._generateContents()})},s.prototype.setActiveRows=function(e){this.activeRows=e,this.activeRowsCount=this.activeRows.length},s.prototype.resetDisplayRows=function(){this.displayRows=[],this.displayRows.push(this.activeRows.slice(0)),this.displayRowsCount=this.displayRows[0].length,this.table.modExists("frozenRows")&&this.table.modules.frozenRows.setDisplayIndex(0),this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.setDisplayIndex(0),this.table.options.pagination&&this.table.modExists("page")&&this.table.modules.page.setDisplayIndex(0)},s.prototype.getNextDisplayIndex=function(){return this.displayRows.length},s.prototype.setDisplayRows=function(e,t){var o=!0;return t&&void 0!==this.displayRows[t]?(this.displayRows[t]=e,o=!0):(this.displayRows.push(e),o=t=this.displayRows.length-1),t==this.displayRows.length-1&&(this.displayRowsCount=this.displayRows[this.displayRows.length-1].length),o},s.prototype.getDisplayRows=function(e){return void 0===e?this.displayRows.length?this.displayRows[this.displayRows.length-1]:[]:this.displayRows[e]||[]},s.prototype.getVisibleRows=function(e){var t=this.element.scrollTop,o=this.element.clientHeight+t,i=!1,n=0,s=0,a=this.getDisplayRows();if(e){this.getDisplayRows();for(var r=this.vDomTop;r<=this.vDomBottom;r++)if(a[r])if(i){if(!(o-a[r].getElement().offsetTop>=0))break;s=r}else if(t-a[r].getElement().offsetTop>=0)n=r;else{if(i=!0,!(o-a[r].getElement().offsetTop>=0))break;s=r}}else n=this.vDomTop,s=this.vDomBottom;return a.slice(n,s+1)},s.prototype.displayRowIterator=function(e){this.displayRows.forEach(e),this.displayRowsCount=this.displayRows[this.displayRows.length-1].length},s.prototype.getRows=function(e){var t;switch(e){case"active":t=this.activeRows;break;case"display":t=this.table.rowManager.getDisplayRows();break;case"visible":t=this.getVisibleRows(!0);break;case"selected":t=this.table.modules.selectRow.selectedRows;break;default:t=this.rows}return t},s.prototype.reRenderInPosition=function(e){if("virtual"==this.getRenderMode())if(this.redrawBlock)e?e():this.redrawBlockRederInPosition=!0;else{for(var t=this.element.scrollTop,o=!1,i=!1,n=this.scrollLeft,s=this.getDisplayRows(),a=this.vDomTop;a<=this.vDomBottom;a++)if(s[a]){var r=t-s[a].getElement().offsetTop;if(!(!1===i||Math.abs(r)<i))break;i=r,o=a}e&&e(),this._virtualRenderFill(!1===o?this.displayRowsCount-1:o,!0,i||0),this.scrollHorizontal(n)}else this.renderTable(),e&&e()},s.prototype.setRenderMode=function(){this.table.options.virtualDom?(this.renderMode="virtual",this.table.element.clientHeight||this.table.options.height?this.fixedHeight=!0:this.fixedHeight=!1):this.renderMode="classic"},s.prototype.getRenderMode=function(){return this.renderMode},s.prototype.renderTable=function(){switch(this.table.options.renderStarted.call(this.table),this.element.scrollTop=0,this.renderMode){case"classic":this._simpleRender();break;case"virtual":this._virtualRenderFill()}this.firstRender&&(this.displayRowsCount?(this.firstRender=!1,this.table.modules.layout.layout()):this.renderEmptyScroll()),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout(),this.displayRowsCount||this.table.options.placeholder&&(this.table.options.placeholder.setAttribute("tabulator-render-mode",this.renderMode),this.getElement().appendChild(this.table.options.placeholder),this.table.options.placeholder.style.width=this.table.columnManager.getWidth()+"px"),this.table.options.renderComplete.call(this.table)},s.prototype._simpleRender=function(){this._clearVirtualDom(),this.displayRowsCount?this.checkClassicModeGroupHeaderWidth():this.renderEmptyScroll()},s.prototype.checkClassicModeGroupHeaderWidth=function(){var e=this,t=this.tableElement,o=!0;e.getDisplayRows().forEach(function(i,n){e.styleRow(i,n),t.appendChild(i.getElement()),i.initialize(!0),"group"!==i.type&&(o=!1)}),t.style.minWidth=o?e.table.columnManager.getWidth()+"px":""},s.prototype.renderEmptyScroll=function(){this.table.options.placeholder?this.tableElement.style.display="none":this.tableElement.style.minWidth=this.table.columnManager.getWidth()+"px"},s.prototype._clearVirtualDom=function(){var e=this.tableElement;for(this.table.options.placeholder&&this.table.options.placeholder.parentNode&&this.table.options.placeholder.parentNode.removeChild(this.table.options.placeholder);e.firstChild;)e.removeChild(e.firstChild);e.style.paddingTop="",e.style.paddingBottom="",e.style.minWidth="",e.style.minHeight="",e.style.display="",e.style.visibility="",this.scrollTop=0,this.scrollLeft=0,this.vDomTop=0,this.vDomBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0},s.prototype.styleRow=function(e,t){var o=e.getElement();t%2?(o.classList.add("tabulator-row-even"),o.classList.remove("tabulator-row-odd")):(o.classList.add("tabulator-row-odd"),o.classList.remove("tabulator-row-even"))},s.prototype._virtualRenderFill=function(e,t,o){var i=this,n=i.tableElement,s=i.element,a=0,r=0,l=0,c=0,u=!0,d=i.getDisplayRows();if(e=e||0,o=o||0,e){for(;n.firstChild;)n.removeChild(n.firstChild);var p=(i.displayRowsCount-e+1)*i.vDomRowHeight;p<i.height&&(e-=Math.ceil((i.height-p)/i.vDomRowHeight))<0&&(e=0),a=Math.min(Math.max(Math.floor(i.vDomWindowBuffer/i.vDomRowHeight),i.vDomWindowMinMarginRows),e),e-=a}else i._clearVirtualDom();if(i.displayRowsCount&&h.prototype.helpers.elVisible(i.element)){for(i.vDomTop=e,i.vDomBottom=e-1;(r<=i.height+i.vDomWindowBuffer||c<i.vDomWindowMinTotalRows)&&i.vDomBottom<i.displayRowsCount-1;){var m=i.vDomBottom+1,f=d[m],g=0;i.styleRow(f,m),n.appendChild(f.getElement()),f.initialize(),f.heightInitialized||f.normalizeHeight(!0),g=f.getHeight(),c<a?l+=g:r+=g,g>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*g),"group"!==f.type&&(u=!1),i.vDomBottom++,c++}e?(i.vDomTopPad=t?i.vDomRowHeight*this.vDomTop+o:i.scrollTop-l,i.vDomBottomPad=i.vDomBottom==i.displayRowsCount-1?0:Math.max(i.vDomScrollHeight-i.vDomTopPad-r-l,0)):(this.vDomTopPad=0,i.vDomRowHeight=Math.floor((r+l)/c),i.vDomBottomPad=i.vDomRowHeight*(i.displayRowsCount-i.vDomBottom-1),i.vDomScrollHeight=l+r+i.vDomBottomPad-i.height),n.style.paddingTop=i.vDomTopPad+"px",n.style.paddingBottom=i.vDomBottomPad+"px",t&&(this.scrollTop=i.vDomTopPad+l+o-(this.element.scrollWidth>this.element.clientWidth?this.element.offsetHeight-this.element.clientHeight:0)),this.scrollTop=Math.min(this.scrollTop,this.element.scrollHeight-this.height),this.element.scrollWidth>this.element.offsetWidth&&t&&(this.scrollTop+=this.element.offsetHeight-this.element.clientHeight),this.vDomScrollPosTop=this.scrollTop,this.vDomScrollPosBottom=this.scrollTop,s.scrollTop=this.scrollTop,n.style.minWidth=u?i.table.columnManager.getWidth()+"px":"",i.table.options.groupBy&&"fitDataFill"!=i.table.modules.layout.getMode()&&i.displayRowsCount==i.table.modules.groupRows.countGroups()&&(i.tableElement.style.minWidth=i.table.columnManager.getWidth())}else this.renderEmptyScroll();this.fixedHeight||this.adjustTableSize()},s.prototype.scrollVertical=function(e){var t=this.scrollTop-this.vDomScrollPosTop,o=this.scrollTop-this.vDomScrollPosBottom,i=2*this.vDomWindowBuffer;if(-t>i||o>i){var n=this.scrollLeft;this._virtualRenderFill(Math.floor(this.element.scrollTop/this.element.scrollHeight*this.displayRowsCount)),this.scrollHorizontal(n)}else e?(t<0&&this._addTopRow(-t),o<0&&(this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer?this._removeBottomRow(-o):this.vDomScrollPosBottom=this.scrollTop)):(t>=0&&(this.scrollTop>this.vDomWindowBuffer?this._removeTopRow(t):this.vDomScrollPosTop=this.scrollTop),o>=0&&this._addBottomRow(o))},s.prototype._addTopRow=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.tableElement,i=this.getDisplayRows();if(this.vDomTop){var n=this.vDomTop-1,s=i[n],a=s.getHeight()||this.vDomRowHeight;e>=a&&(this.styleRow(s,n),o.insertBefore(s.getElement(),o.firstChild),s.initialized&&s.heightInitialized||(this.vDomTopNewRows.push(s),s.heightInitialized||s.clearCellHeight()),s.initialize(),this.vDomTopPad-=a,this.vDomTopPad<0&&(this.vDomTopPad=n*this.vDomRowHeight),n||(this.vDomTopPad=0),o.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop-=a,this.vDomTop--),e=-(this.scrollTop-this.vDomScrollPosTop),s.getHeight()>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*s.getHeight()),t<this.vDomMaxRenderChain&&this.vDomTop&&e>=(i[this.vDomTop-1].getHeight()||this.vDomRowHeight)?this._addTopRow(e,t+1):this._quickNormalizeRowHeight(this.vDomTopNewRows)}},s.prototype._removeTopRow=function(e){var t=this.tableElement,o=this.getDisplayRows()[this.vDomTop],i=o.getHeight()||this.vDomRowHeight;if(e>=i){var n=o.getElement();n.parentNode.removeChild(n),this.vDomTopPad+=i,t.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop+=this.vDomTop?i:i+this.vDomWindowBuffer,this.vDomTop++,e=this.scrollTop-this.vDomScrollPosTop,this._removeTopRow(e)}},s.prototype._addBottomRow=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.tableElement,i=this.getDisplayRows();if(this.vDomBottom<this.displayRowsCount-1){var n=this.vDomBottom+1,s=i[n],a=s.getHeight()||this.vDomRowHeight;e>=a&&(this.styleRow(s,n),o.appendChild(s.getElement()),s.initialized&&s.heightInitialized||(this.vDomBottomNewRows.push(s),s.heightInitialized||s.clearCellHeight()),s.initialize(),this.vDomBottomPad-=a,(this.vDomBottomPad<0||n==this.displayRowsCount-1)&&(this.vDomBottomPad=0),o.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom+=a,this.vDomBottom++),e=this.scrollTop-this.vDomScrollPosBottom,s.getHeight()>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*s.getHeight()),t<this.vDomMaxRenderChain&&this.vDomBottom<this.displayRowsCount-1&&e>=(i[this.vDomBottom+1].getHeight()||this.vDomRowHeight)?this._addBottomRow(e,t+1):this._quickNormalizeRowHeight(this.vDomBottomNewRows)}},s.prototype._removeBottomRow=function(e){var t=this.tableElement,o=this.getDisplayRows()[this.vDomBottom],i=o.getHeight()||this.vDomRowHeight;if(e>=i){var n=o.getElement();n.parentNode&&n.parentNode.removeChild(n),this.vDomBottomPad+=i,this.vDomBottomPad<0&&(this.vDomBottomPad=0),t.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom-=i,this.vDomBottom--,e=-(this.scrollTop-this.vDomScrollPosBottom),this._removeBottomRow(e)}},s.prototype._quickNormalizeRowHeight=function(e){e.forEach(function(e){e.calcHeight()}),e.forEach(function(e){e.setCellHeight()}),e.length=0},s.prototype.normalizeHeight=function(){this.activeRows.forEach(function(e){e.normalizeHeight()})},s.prototype.adjustTableSize=function(){var e,t=this.element.clientHeight;if("virtual"===this.renderMode){var o=Math.floor(this.columnManager.getElement().offsetHeight+(this.table.footerManager&&!this.table.footerManager.external?this.table.footerManager.getElement().offsetHeight:0));this.fixedHeight?(this.element.style.minHeight="calc(100% - "+o+"px)",this.element.style.height="calc(100% - "+o+"px)",this.element.style.maxHeight="calc(100% - "+o+"px)"):(this.element.style.height="",this.element.style.height=Math.floor(this.table.element.clientHeight)-o+"px",this.element.scrollTop=this.scrollTop),this.height=this.element.clientHeight,this.vDomWindowBuffer=this.table.options.virtualDomBuffer||this.height,this.fixedHeight||Math.floor(t)==Math.floor(this.element.clientHeight)||((e=this.table.modExists("resizeTable"))&&!this.table.modules.resizeTable.autoResize||!e)&&this.redraw()}},s.prototype.reinitialize=function(){this.rows.forEach(function(e){e.reinitialize(!0)})},s.prototype.blockRedraw=function(){this.redrawBlock=!0,this.redrawBlockRestoreConfig=!1},s.prototype.restoreRedraw=function(){this.redrawBlock=!1,this.redrawBlockRestoreConfig?(this.refreshActiveData(this.redrawBlockRestoreConfig.stage,this.redrawBlockRestoreConfig.skipStage,this.redrawBlockRestoreConfig.renderInPosition),
-this.redrawBlockRestoreConfig=!1):this.redrawBlockRederInPosition&&this.reRenderInPosition(),this.redrawBlockRederInPosition=!1},s.prototype.redraw=function(e){var t=this.scrollLeft;this.adjustTableSize(),this.table.tableWidth=this.table.element.clientWidth,e?this.renderTable():("classic"==this.renderMode?this.table.options.groupBy?this.refreshActiveData("group",!1,!1):this._simpleRender():(this.reRenderInPosition(),this.scrollHorizontal(t)),this.displayRowsCount||this.table.options.placeholder&&this.getElement().appendChild(this.table.options.placeholder))},s.prototype.resetScroll=function(){if(this.element.scrollLeft=0,this.element.scrollTop=0,"ie"===this.table.browser){var e=document.createEvent("Event");e.initEvent("scroll",!1,!0),this.element.dispatchEvent(e)}else this.element.dispatchEvent(new Event("scroll"))};var a=function(e){this.table=e,this.element=this.table.rowManager.tableElement,this.holderEl=this.table.rowManager.element,this.leftCol=0,this.rightCol=0,this.scrollLeft=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0,this.fitDataColAvg=0,this.window=200,this.initialized=!1,this.columns=[],this.compatabilityCheck()&&this.initialize()};a.prototype.compatabilityCheck=function(){var e=this.table.options,t=!0;return"fitDataTable"==e.layout&&(console.warn("Horizontal Vitrual DOM is not compatible with fitDataTable layout mode"),t=!1),e.responsiveLayout&&(console.warn("Horizontal Vitrual DOM is not compatible with responsive columns"),t=!1),this.table.rtl&&(console.warn("Horizontal Vitrual DOM is not currently compatible with RTL text direction"),t=!1),e.columns&&e.columns.find(function(e){return e.frozen})&&(console.warn("Horizontal Vitrual DOM is not compatible with frozen columns"),t=!1),t||(e.virtualDomHoz=!1),t},a.prototype.initialize=function(){var e=this;this.holderEl.addEventListener("scroll",function(){var t=e.holderEl.scrollLeft;e.scrollLeft!=t&&(e.scrollLeft=t,e.scroll(t-(e.vDomScrollPosLeft+e.window)))})},a.prototype.deinitialize=function(){this.initialized=!1},a.prototype.clear=function(){this.columns=[],this.leftCol=-1,this.rightCol=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0},a.prototype.dataChange=function(){var e,t,o,i=!1,n=0,s=0;if("fitData"===this.table.options.layout){if(this.table.columnManager.columnsByIndex.forEach(function(e){!e.definition.width&&e.visible&&(i=!0)}),i&&i&&this.table.rowManager.getDisplayRows().length&&(this.vDomScrollPosRight=this.scrollLeft+this.holderEl.clientWidth+this.window,this.table.options.groupBy?(e=this.table.modules.groupRows.getGroups(!1)[0],t=e.getRows(!1)[0]):t=this.table.rowManager.getDisplayRows()[0],t)){o=t.getElement(),t.generateCells(),this.element.appendChild(o);for(var s=0;s<t.cells.length;s++){var a=t.cells[s];if(o.appendChild(a.getElement()),a.column.reinitializeWidth(),(n+=a.column.getWidth())>this.vDomScrollPosRight)break}for(o.parentNode.removeChild(o),this.fitDataColAvg=Math.floor(n/(s+1)),s;s<this.table.columnManager.columnsByIndex.length;s++)this.table.columnManager.columnsByIndex[s].setWidth(this.fitDataColAvg);this.reinitialize(!1,!0)}}else"fitColumns"===this.table.options.layout&&(this.table.modules.layout.layout(),this.table.vdomHoz.reinitialize(!1,!0))},a.prototype.fitDataLayoutOverride=function(){for(var e=this.leftCol;e<=this.rightCol;e++)this.columns[e].reinitializeWidth()},a.prototype.reinitialize=function(e,t){var o=this,i={cols:this.columns,leftCol:this.leftCol,rightCol:this.rightCol};if(!e||this.initialized){this.clear(),this.scrollLeft=this.holderEl.scrollLeft,this.vDomScrollPosLeft=this.scrollLeft-this.window,this.vDomScrollPosRight=this.scrollLeft+this.holderEl.clientWidth+this.window;var n=0;this.table.columnManager.columnsByIndex.forEach(function(e){var t={};if(e.visible){var i=e.getWidth();t.leftPos=n,t.rightPos=n+i,n+i>o.vDomScrollPosLeft&&n<o.vDomScrollPosRight?(-1==o.leftCol&&(o.leftCol=o.columns.length,o.vDomPadLeft=n),o.rightCol=o.columns.length):-1!==o.leftCol&&(o.vDomPadRight+=i),o.columns.push(e),e.modules.vdomHoz=t,n+=i}}),this.element.style.paddingLeft=this.vDomPadLeft+"px",this.element.style.paddingRight=this.vDomPadRight+"px",this.initialized=!0,t||e&&!this.reinitChanged(i)||this.renitializeRows(),this.holderEl.scrollLeft=this.scrollLeft}},a.prototype.reinitChanged=function(e){var t=this,o=!0;return e.cols.length!==this.columns.length||e.leftCol!==this.leftCol||e.rightCol!==this.rightCol||(e.cols.forEach(function(e,i){e!==t.columns[i]&&(o=!1)}),!o)},a.prototype.renitializeRows=function(){var e=this;this.table.rowManager.getVisibleRows().forEach(function(t){e.reinitializeRow(t,!0)})},a.prototype.scroll=function(e){this.vDomScrollPosLeft+=e,this.vDomScrollPosRight+=e,e>.8*this.holderEl.clientWidth?this.reinitialize():e>0?(this.addColRight(),this.removeColLeft()):(this.addColLeft(),this.removeColRight())},a.prototype.colPositionAdjust=function(e,t,o){for(var i=e;i<t;i++){var n=this.columns[i];n.modules.vdomHoz.leftPos-=o,n.modules.vdomHoz.rightPos-=o}},a.prototype.addColRight=function(){var e,t,o,i=this.columns[this.rightCol+1];i&&i.modules.vdomHoz.leftPos<=this.vDomScrollPosRight&&(e=this.table.rowManager.getVisibleRows(),e.forEach(function(e){if("group"!==e.type){var t=e.getCell(i);e.getElement().appendChild(t.getElement()),t.cellRendered()}}),this.fitDataColAvg&&(t=i.getWidth())===this.fitDataColAvg&&(i.reinitializeWidth(),(o=t-i.getWidth())&&(i.modules.vdomHoz.rightPos-=o,this.colPositionAdjust(this.rightCol+1,this.columns.length,o))),this.rightCol++,this.rightCol>=this.columns.length-1?this.vDomPadRight=0:this.vDomPadRight-=i.getWidth(),this.element.style.paddingRight=this.vDomPadRight+"px",this.addColRight())},a.prototype.addColLeft=function(){var e=this.columns[this.leftCol-1];if(e&&e.modules.vdomHoz.rightPos>=this.vDomScrollPosLeft){this.table.rowManager.getVisibleRows().forEach(function(t){if("group"!==t.type){var o=t.getCell(e);t.getElement().prepend(o.getElement()),o.cellRendered()}}),this.leftCol?this.vDomPadLeft-=e.getWidth():this.vDomPadLeft=0,this.element.style.paddingLeft=this.vDomPadLeft+"px",this.leftCol--,this.addColLeft()}},a.prototype.removeColRight=function(e){var t,e=this.columns[this.rightCol];e&&e.modules.vdomHoz.leftPos>this.vDomScrollPosRight&&(t=this.table.rowManager.getVisibleRows(),e.modules.vdomHoz.visible=!1,t.forEach(function(t){if("group"!==t.type){var o=t.getCell(e);t.getElement().removeChild(o.getElement())}}),this.vDomPadRight+=e.getWidth(),this.element.style.paddingRight=this.vDomPadRight+"px",this.rightCol--,this.removeColRight())},a.prototype.removeColLeft=function(){var e,t=this.columns[this.leftCol];t&&t.modules.vdomHoz.rightPos<this.vDomScrollPosLeft&&(e=this.table.rowManager.getVisibleRows(),e.forEach(function(e){if("group"!==e.type){var o=e.getCell(t);e.getElement().removeChild(o.getElement())}}),this.vDomPadLeft+=t.getWidth(),this.element.style.paddingLeft=this.vDomPadLeft+"px",this.leftCol++,this.removeColLeft())},a.prototype.initializeRow=function(e){if("group"!==e.type){e.modules.vdomHoz={leftCol:this.leftCol,rightCol:this.rightCol};for(var t=this.leftCol;t<=this.rightCol;t++){var o=this.columns[t];if(o.visible){var i=e.getCell(o);e.element.appendChild(i.getElement()),i.cellRendered()}}}},a.prototype.reinitializeRow=function(e,t){if("group"!==e.type&&(t||!e.modules.vdomHoz||e.modules.vdomHoz.leftCol!==this.leftCol||e.modules.vdomHoz.rightCol!==this.rightCol)){for(;e.element.firstChild;)e.element.removeChild(e.element.firstChild);this.initializeRow(e)}};var r=function(e){this._row=e};r.prototype.getData=function(e){return this._row.getData(e)},r.prototype.getElement=function(){return this._row.getElement()},r.prototype.getCells=function(){var e=[];return this._row.getCells().forEach(function(t){e.push(t.getComponent())}),e},r.prototype.getCell=function(e){var t=this._row.getCell(e);return!!t&&t.getComponent()},r.prototype.getIndex=function(){return this._row.getData("data")[this._row.table.options.index]},r.prototype.getPosition=function(e){return this._row.table.rowManager.getRowPosition(this._row,e)},r.prototype.delete=function(){return this._row.delete()},r.prototype.scrollTo=function(){return this._row.table.rowManager.scrollToRow(this._row)},r.prototype.pageTo=function(){if(this._row.table.modExists("page",!0))return this._row.table.modules.page.setPageToRow(this._row)},r.prototype.move=function(e,t){this._row.moveToRow(e,t)},r.prototype.update=function(e){return this._row.updateData(e)},r.prototype.normalizeHeight=function(){this._row.normalizeHeight(!0)},r.prototype.select=function(){this._row.table.modules.selectRow.selectRows(this._row)},r.prototype.deselect=function(){this._row.table.modules.selectRow.deselectRows(this._row)},r.prototype.toggleSelect=function(){this._row.table.modules.selectRow.toggleRow(this._row)},r.prototype.isSelected=function(){return this._row.table.modules.selectRow.isRowSelected(this._row)},r.prototype._getSelf=function(){return this._row},r.prototype.validate=function(){return this._row.validate()},r.prototype.freeze=function(){this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.freezeRow(this._row)},r.prototype.unfreeze=function(){this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.unfreezeRow(this._row)},r.prototype.isFrozen=function(){if(this._row.table.modExists("frozenRows",!0)){return this._row.table.modules.frozenRows.rows.indexOf(this._row)>-1}return!1},r.prototype.treeCollapse=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.collapseRow(this._row)},r.prototype.treeExpand=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.expandRow(this._row)},r.prototype.treeToggle=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.toggleRow(this._row)},r.prototype.getTreeParent=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeParent(this._row)},r.prototype.getTreeChildren=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeChildren(this._row,!0)},r.prototype.addTreeChild=function(e,t,o){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.addTreeChildRow(this._row,e,t,o)},r.prototype.reformat=function(){return this._row.reinitialize()},r.prototype.getGroup=function(){return this._row.getGroup().getComponent()},r.prototype.getTable=function(){return this._row.table},r.prototype.getNextRow=function(){var e=this._row.nextRow();return e?e.getComponent():e},r.prototype.getPrevRow=function(){var e=this._row.prevRow();return e?e.getComponent():e};var l=function(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"row";this.table=t.table,this.parent=t,this.data={},this.type=o,this.element=this.createElement(),this.modules={},this.cells=[],this.height=0,this.heightStyled="",this.manualHeight=!1,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.component=null,this.setData(e),this.generateElement()};l.prototype.createElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-row"),e.setAttribute("role","row"),e},l.prototype.getElement=function(){return this.element},l.prototype.detachElement=function(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)},l.prototype.generateElement=function(){var e,t,o,i=this;!1!==i.table.options.selectable&&i.table.modExists("selectRow")&&i.table.modules.selectRow.initializeRow(this),!1!==i.table.options.movableRows&&i.table.modExists("moveRow")&&i.table.modules.moveRow.initializeRow(this),!1!==i.table.options.dataTree&&i.table.modExists("dataTree")&&i.table.modules.dataTree.initializeRow(this),"collapse"===i.table.options.responsiveLayout&&i.table.modExists("responsiveLayout")&&i.table.modules.responsiveLayout.initializeRow(this),(i.table.options.rowContextMenu||i.table.options.rowClickMenu)&&this.table.modExists("menu")&&i.table.modules.menu.initializeRow(this),i.table.options.rowClick&&i.element.addEventListener("click",function(e){i.table.options.rowClick(e,i.getComponent())}),i.table.options.rowDblClick&&i.element.addEventListener("dblclick",function(e){i.table.options.rowDblClick(e,i.getComponent())}),i.table.options.rowContext&&i.element.addEventListener("contextmenu",function(e){i.table.options.rowContext(e,i.getComponent())}),i.table.options.rowMouseEnter&&i.element.addEventListener("mouseenter",function(e){i.table.options.rowMouseEnter(e,i.getComponent())}),i.table.options.rowMouseLeave&&i.element.addEventListener("mouseleave",function(e){i.table.options.rowMouseLeave(e,i.getComponent())}),i.table.options.rowMouseOver&&i.element.addEventListener("mouseover",function(e){i.table.options.rowMouseOver(e,i.getComponent())}),i.table.options.rowMouseOut&&i.element.addEventListener("mouseout",function(e){i.table.options.rowMouseOut(e,i.getComponent())}),i.table.options.rowMouseMove&&i.element.addEventListener("mousemove",function(e){i.table.options.rowMouseMove(e,i.getComponent())}),i.table.options.rowTap&&(o=!1,i.element.addEventListener("touchstart",function(e){o=!0},{passive:!0}),i.element.addEventListener("touchend",function(e){o&&i.table.options.rowTap(e,i.getComponent()),o=!1})),i.table.options.rowDblTap&&(e=null,i.element.addEventListener("touchend",function(t){e?(clearTimeout(e),e=null,i.table.options.rowDblTap(t,i.getComponent())):e=setTimeout(function(){clearTimeout(e),e=null},300)})),i.table.options.rowTapHold&&(t=null,i.element.addEventListener("touchstart",function(e){clearTimeout(t),t=setTimeout(function(){clearTimeout(t),t=null,o=!1,i.table.options.rowTapHold(e,i.getComponent())},1e3)},{passive:!0}),i.element.addEventListener("touchend",function(e){clearTimeout(t),t=null}))},l.prototype.generateCells=function(){this.cells=this.table.columnManager.generateCells(this)},l.prototype.initialize=function(e){var t=this;if(!this.initialized||e){for(this.deleteCells();this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layoutRow(this),this.generateCells(),this.table.options.virtualDomHoz&&this.table.vdomHoz.initialized?this.table.vdomHoz.initializeRow(this):this.cells.forEach(function(e){t.element.appendChild(e.getElement()),e.cellRendered()}),e&&this.normalizeHeight(),this.table.options.dataTree&&this.table.modExists("dataTree")&&this.table.modules.dataTree.layoutRow(this),"collapse"===this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout")&&this.table.modules.responsiveLayout.layoutRow(this),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent()),this.table.options.resizableRows&&this.table.modExists("resizeRows")&&this.table.modules.resizeRows.initializeRow(this),this.initialized=!0}else this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitializeRow(this)},l.prototype.reinitializeHeight=function(){this.heightInitialized=!1,null!==this.element.offsetParent&&this.normalizeHeight(!0)},l.prototype.reinitialize=function(e){this.initialized=!1,this.heightInitialized=!1,this.manualHeight||(this.height=0,this.heightStyled=""),null!==this.element.offsetParent&&this.initialize(!0),this.table.options.dataTree&&this.table.modExists("dataTree",!0)&&this.table.modules.dataTree.getTreeChildren(this,!1,!0).forEach(function(e){e.reinitialize(!0)})},l.prototype.calcHeight=function(e){var t=0,o=this.table.options.resizableRows?this.element.clientHeight:0;this.cells.forEach(function(e){var o=e.getHeight();o>t&&(t=o)}),this.height=e?Math.max(t,o):this.manualHeight?this.height:Math.max(t,o),this.heightStyled=this.height?this.height+"px":"",this.outerHeight=this.element.offsetHeight},l.prototype.setCellHeight=function(){this.cells.forEach(function(e){e.setHeight()}),this.heightInitialized=!0},l.prototype.clearCellHeight=function(){this.cells.forEach(function(e){e.clearHeight()})},l.prototype.normalizeHeight=function(e){e&&this.clearCellHeight(),this.calcHeight(e),this.setCellHeight()},l.prototype.setHeight=function(e,t){(this.height!=e||t)&&(this.manualHeight=!0,this.height=e,this.heightStyled=e?e+"px":"",this.setCellHeight(),this.outerHeight=this.element.offsetHeight)},l.prototype.getHeight=function(){return this.outerHeight},l.prototype.getWidth=function(){return this.element.offsetWidth},l.prototype.deleteCell=function(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)},l.prototype.setData=function(e){this.table.modExists("mutator")&&(e=this.table.modules.mutator.transformRow(e,"data")),this.data=e,this.table.options.reactiveData&&this.table.modExists("reactiveData",!0)&&this.table.modules.reactiveData.watchRow(this)},l.prototype.updateData=function(e){var t,o=this,i=h.prototype.helpers.elVisible(this.element),n={};return new Promise(function(s,a){"string"==typeof e&&(e=JSON.parse(e)),o.table.options.reactiveData&&o.table.modExists("reactiveData",!0)&&o.table.modules.reactiveData.block(),o.table.modExists("mutator")?(n=Object.assign(n,o.data),n=Object.assign(n,e),t=o.table.modules.mutator.transformRow(n,"data",e)):t=e;for(var r in t)o.data[r]=t[r];o.table.options.reactiveData&&o.table.modExists("reactiveData",!0)&&o.table.modules.reactiveData.unblock();for(var r in e){o.table.columnManager.getColumnsByFieldRoot(r).forEach(function(e){var n=o.getCell(e.getField());if(n){var s=e.getFieldValue(t);n.getValue()!=s&&(n.setValueProcessData(s),i&&n.cellRendered())}})}o.table.options.groupUpdateOnCellEdit&&o.table.options.groupBy&&o.table.modExists("groupRows")&&o.table.modules.groupRows.reassignRowToGroup(o.row),i?(o.normalizeHeight(!0),o.table.options.rowFormatter&&o.table.options.rowFormatter(o.getComponent())):(o.initialized=!1,o.height=0,o.heightStyled=""),!1!==o.table.options.dataTree&&o.table.modExists("dataTree")&&o.table.modules.dataTree.redrawNeeded(e)&&(o.table.modules.dataTree.initializeRow(o),i&&(o.table.modules.dataTree.layoutRow(o),o.table.rowManager.refreshActiveData("tree",!1,!0))),o.table.options.rowUpdated.call(o.table,o.getComponent()),o.table.options.dataChanged&&o.table.options.dataChanged.call(o.table,o.table.rowManager.getData()),s()})},l.prototype.getData=function(e){return e&&this.table.modExists("accessor")?this.table.modules.accessor.transformRow(this,e):this.data},l.prototype.getCell=function(e){return e=this.table.columnManager.findColumn(e),this.cells.find(function(t){return t.column===e})},l.prototype.getCellIndex=function(e){return this.cells.findIndex(function(t){return t===e})},l.prototype.findNextEditableCell=function(e){var t=!1;if(e<this.cells.length-1)for(var o=e+1;o<this.cells.length;o++){var i=this.cells[o];if(i.column.modules.edit&&h.prototype.helpers.elVisible(i.getElement())){var n=!0;if("function"==typeof i.column.modules.edit.check&&(n=i.column.modules.edit.check(i.getComponent())),n){t=i;break}}}return t},l.prototype.findPrevEditableCell=function(e){var t=!1;if(e>0)for(var o=e-1;o>=0;o--){var i=this.cells[o],n=!0;if(i.column.modules.edit&&h.prototype.helpers.elVisible(i.getElement())&&("function"==typeof i.column.modules.edit.check&&(n=i.column.modules.edit.check(i.getComponent())),n)){t=i;break}}return t},l.prototype.getCells=function(){return this.cells},l.prototype.nextRow=function(){return this.table.rowManager.nextDisplayRow(this,!0)||!1},l.prototype.prevRow=function(){return this.table.rowManager.prevDisplayRow(this,!0)||!1},l.prototype.moveToRow=function(e,t){var o=this.table.rowManager.findRow(e);o?(this.table.rowManager.moveRowActual(this,o,!t),this.table.rowManager.refreshActiveData("display",!1,!0)):console.warn("Move Error - No matching row found:",e)},l.prototype.validate=function(){var e=[];return this.cells.forEach(function(t){t.validate()||e.push(t.getComponent())}),!e.length||e},l.prototype.delete=function(){var e=this;return new Promise(function(t,o){var i,n;e.table.options.history&&e.table.modExists("history")&&(e.table.options.groupBy&&e.table.modExists("groupRows")?(n=e.getGroup().rows,(i=n.indexOf(e))&&(i=n[i-1])):(i=e.table.rowManager.getRowIndex(e))&&(i=e.table.rowManager.rows[i-1]),e.table.modules.history.action("rowDelete",e,{data:e.getData(),pos:!i,index:i})),e.deleteActual(),t()})},l.prototype.deleteActual=function(e){this.table.rowManager.getRowIndex(this);this.detatchModules(),this.table.options.reactiveData&&this.table.modExists("reactiveData",!0),this.modules.group&&this.modules.group.removeRow(this),this.table.rowManager.deleteRow(this,e),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.element=!1,this.table.options.dataTree&&this.table.modExists("dataTree",!0)&&this.table.modules.dataTree.rowDelete(this),this.table.modExists("columnCalcs")&&(this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.columnCalcs.recalcRowGroup(this):this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows))},l.prototype.detatchModules=function(){this.table.modExists("selectRow")&&this.table.modules.selectRow._deselectRow(this,!0),this.table.modExists("edit")&&this.table.modules.edit.currentCell.row===this&&this.table.modules.edit.cancelEdit(),this.table.modExists("frozenRows")&&this.table.modules.frozenRows.detachRow(this)},l.prototype.deleteCells=function(){for(var e=this.cells.length,t=0;t<e;t++)this.cells[0].delete()},l.prototype.wipe=function(){for(this.detatchModules(),this.deleteCells();this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element=!1,this.modules={},this.element.parentNode&&this.element.parentNode.removeChild(this.element)},l.prototype.getGroup=function(){return this.modules.group||!1},l.prototype.getComponent=function(){return this.component||(this.component=new r(this)),this.component};var c=function(e){this._cell=e};c.prototype.getValue=function(){return this._cell.getValue()},c.prototype.getOldValue=function(){return this._cell.getOldValue()},c.prototype.getInitialValue=function(){return this._cell.initialValue},c.prototype.getElement=function(){return this._cell.getElement()},c.prototype.getRow=function(){return this._cell.row.getComponent()},c.prototype.getData=function(){return this._cell.row.getData()},c.prototype.getField=function(){return this._cell.column.getField()},c.prototype.getColumn=function(){return this._cell.column.getComponent()},c.prototype.setValue=function(e,t){void 0===t&&(t=!0),this._cell.setValue(e,t)},c.prototype.restoreOldValue=function(){this._cell.setValueActual(this._cell.getOldValue())},c.prototype.restoreInitialValue=function(){this._cell.setValueActual(this._cell.initialValue)},c.prototype.edit=function(e){return this._cell.edit(e)},c.prototype.cancelEdit=function(){this._cell.cancelEdit()},c.prototype.isEdited=function(){return!!this._cell.modules.edit&&this._cell.modules.edit.edited},c.prototype.clearEdited=function(){self.table.modExists("edit",!0)&&this._cell.table.modules.edit.clearEdited(this._cell)},c.prototype.isValid=function(){return!this._cell.modules.validate||!this._cell.modules.validate.invalid},c.prototype.validate=function(){return this._cell.validate()},c.prototype.clearValidation=function(){this._cell.table.modExists("validate",!0)&&this._cell.table.modules.validate.clearValidation(this._cell)},c.prototype.nav=function(){return this._cell.nav()},c.prototype.checkHeight=function(){this._cell.checkHeight()},c.prototype.getTable=function(){return this._cell.table},c.prototype._getSelf=function(){return this._cell};var u=function(e,t){this.table=e.table,this.column=e,this.row=t,this.element=null,this.value=null,this.initialValue,this.oldValue=null,this.modules={},this.height=null,this.width=null,this.minWidth=null,this.component=null,this.loaded=!1,this.build()};u.prototype.build=function(){this.generateElement(),this.setWidth(),this._configureCell(),this.setValueActual(this.column.getFieldValue(this.row.data)),this.initialValue=this.value},u.prototype.generateElement=function(){this.element=document.createElement("div"),this.element.className="tabulator-cell",this.element.setAttribute("role","gridcell"),this.element=this.element},u.prototype._configureCell=function(){var e=this,t=e.column.cellEvents,o=e.element,i=this.column.getField(),n={top:"flex-start",bottom:"flex-end",middle:"center"},s={left:"flex-start",right:"flex-end",center:"center"};if(o.style.textAlign=e.column.hozAlign,e.column.vertAlign&&(o.style.display="inline-flex",o.style.alignItems=n[e.column.vertAlign]||"",e.column.hozAlign&&(o.style.justifyContent=s[e.column.hozAlign]||"")),i&&o.setAttribute("tabulator-field",i),e.column.definition.cssClass){e.column.definition.cssClass.split(" ").forEach(function(e){o.classList.add(e)})}"hover"===this.table.options.tooltipGenerationMode&&o.addEventListener("mouseenter",function(t){e._generateTooltip()}),e._bindClickEvents(t),e._bindTouchEvents(t),e._bindMouseEvents(t),e.column.modules.edit&&e.table.modules.edit.bindEditor(e),e.column.definition.rowHandle&&!1!==e.table.options.movableRows&&e.table.modExists("moveRow")&&e.table.modules.moveRow.initializeCell(e),e.column.visible||e.hide()},u.prototype._bindClickEvents=function(e){var t=this,o=t.element;(e.cellClick||t.table.options.cellClick)&&o.addEventListener("click",function(o){var i=t.getComponent();e.cellClick&&e.cellClick.call(t.table,o,i),t.table.options.cellClick&&t.table.options.cellClick.call(t.table,o,i)}),e.cellDblClick||this.table.options.cellDblClick?o.addEventListener("dblclick",function(o){var i=t.getComponent();e.cellDblClick&&e.cellDblClick.call(t.table,o,i),t.table.options.cellDblClick&&t.table.options.cellDblClick.call(t.table,o,i)}):o.addEventListener("dblclick",function(e){if(!t.table.modExists("edit")||t.table.modules.edit.currentCell!==t){e.preventDefault();try{if(document.selection){var o=document.body.createTextRange();o.moveToElementText(t.element),o.select()}else if(window.getSelection){var o=document.createRange();o.selectNode(t.element),window.getSelection().removeAllRanges(),window.getSelection().addRange(o)}}catch(e){}}}),(e.cellContext||this.table.options.cellContext)&&o.addEventListener("contextmenu",function(o){var i=t.getComponent();e.cellContext&&e.cellContext.call(t.table,o,i),t.table.options.cellContext&&t.table.options.cellContext.call(t.table,o,i)})},u.prototype._bindMouseEvents=function(e){var t=this,o=t.element;(e.cellMouseEnter||t.table.options.cellMouseEnter)&&o.addEventListener("mouseenter",function(o){var i=t.getComponent();e.cellMouseEnter&&e.cellMouseEnter.call(t.table,o,i),t.table.options.cellMouseEnter&&t.table.options.cellMouseEnter.call(t.table,o,i)}),(e.cellMouseLeave||t.table.options.cellMouseLeave)&&o.addEventListener("mouseleave",function(o){var i=t.getComponent();e.cellMouseLeave&&e.cellMouseLeave.call(t.table,o,i),t.table.options.cellMouseLeave&&t.table.options.cellMouseLeave.call(t.table,o,i)}),(e.cellMouseOver||t.table.options.cellMouseOver)&&o.addEventListener("mouseover",function(o){var i=t.getComponent();e.cellMouseOver&&e.cellMouseOver.call(t.table,o,i),t.table.options.cellMouseOver&&t.table.options.cellMouseOver.call(t.table,o,i)}),(e.cellMouseOut||t.table.options.cellMouseOut)&&o.addEventListener("mouseout",function(o){var i=t.getComponent();e.cellMouseOut&&e.cellMouseOut.call(t.table,o,i),t.table.options.cellMouseOut&&t.table.options.cellMouseOut.call(t.table,o,i)}),(e.cellMouseMove||t.table.options.cellMouseMove)&&o.addEventListener("mousemove",function(o){var i=t.getComponent();e.cellMouseMove&&e.cellMouseMove.call(t.table,o,i),t.table.options.cellMouseMove&&t.table.options.cellMouseMove.call(t.table,o,i)})},u.prototype._bindTouchEvents=function(e){var t,o,i,n=this,s=n.element;(e.cellTap||this.table.options.cellTap)&&(i=!1,s.addEventListener("touchstart",function(e){i=!0},{passive:!0}),s.addEventListener("touchend",function(t){if(i){var o=n.getComponent();e.cellTap&&e.cellTap.call(n.table,t,o),n.table.options.cellTap&&n.table.options.cellTap.call(n.table,t,o)}i=!1})),(e.cellDblTap||this.table.options.cellDblTap)&&(t=null,s.addEventListener("touchend",function(o){if(t){clearTimeout(t),t=null;var i=n.getComponent();e.cellDblTap&&e.cellDblTap.call(n.table,o,i),n.table.options.cellDblTap&&n.table.options.cellDblTap.call(n.table,o,i)}else t=setTimeout(function(){clearTimeout(t),t=null},300)})),(e.cellTapHold||this.table.options.cellTapHold)&&(o=null,s.addEventListener("touchstart",function(t){clearTimeout(o),o=setTimeout(function(){clearTimeout(o),o=null,i=!1;var s=n.getComponent();e.cellTapHold&&e.cellTapHold.call(n.table,t,s),n.table.options.cellTapHold&&n.table.options.cellTapHold.call(n.table,t,s)},1e3)},{passive:!0}),s.addEventListener("touchend",function(e){clearTimeout(o),o=null}))},u.prototype._generateContents=function(){var e;switch(e=this.table.modExists("format")?this.table.modules.format.formatValue(this):this.element.innerHTML=this.value,void 0===e?"undefined":_typeof(e)){case"object":if(e instanceof Node){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.appendChild(e)}else this.element.innerHTML="",null!=e&&console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",e);break;case"undefined":case"null":this.element.innerHTML="";break;default:this.element.innerHTML=e}},u.prototype.cellRendered=function(){this.table.modExists("format")&&this.table.modules.format.cellRendered&&this.table.modules.format.cellRendered(this)},u.prototype._generateTooltip=function(){var e=this.column.tooltip;e?(!0===e?e=this.value:"function"==typeof e&&!1===(e=e(this.getComponent()))&&(e=""),void 0===e&&(e=""),this.element.setAttribute("title",e)):this.element.setAttribute("title","")},u.prototype.getElement=function(){return this.loaded||(this.loaded=!0,this.layoutElement()),this.element},u.prototype.getValue=function(){return this.value},u.prototype.getOldValue=function(){return this.oldValue},u.prototype.setValue=function(e,t){var o,i=this.setValueProcessData(e,t);i&&(this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("cellEdit",this,{oldValue:this.oldValue,newValue:this.value}),o=this.getComponent(),this.column.cellEvents.cellEdited&&this.column.cellEvents.cellEdited.call(this.table,o),this.table.options.groupUpdateOnCellEdit&&this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.reassignRowToGroup(this.row),this.cellRendered(),this.table.options.cellEdited.call(this.table,o),this.table.options.dataChanged&&this.table.options.dataChanged.call(this.table,this.table.rowManager.getData()))},u.prototype.setValueProcessData=function(e,t){var o=!1;return this.value!=e&&(o=!0,t&&this.column.modules.mutate&&(e=this.table.modules.mutator.transformCell(this,e))),this.setValueActual(e),o&&this.table.modExists("columnCalcs")&&(this.column.definition.topCalc||this.column.definition.bottomCalc)&&(this.table.options.groupBy&&this.table.modExists("groupRows")?("table"!=this.table.options.columnCalcs&&"both"!=this.table.options.columnCalcs||this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),"table"!=this.table.options.columnCalcs&&this.table.modules.columnCalcs.recalcRowGroup(this.row)):this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows)),o},u.prototype.setValueActual=function(e){this.oldValue=this.value,this.value=e,this.table.options.reactiveData&&this.table.modExists("reactiveData")&&this.table.modules.reactiveData.block(),this.column.setFieldValue(this.row.data,e),this.table.options.reactiveData&&this.table.modExists("reactiveData")&&this.table.modules.reactiveData.unblock(),this.loaded&&this.layoutElement()},u.prototype.layoutElement=function(){this._generateContents(),this._generateTooltip(),this.table.options.resizableColumns&&this.table.modExists("resizeColumns")&&"row"===this.row.type&&this.table.modules.resizeColumns.initializeColumn("cell",this.column,this.element),
-(this.column.definition.contextMenu||this.column.definition.clickMenu)&&this.table.modExists("menu")&&this.table.modules.menu.initializeCell(this),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layoutElement(this.element,this.column)},u.prototype.setWidth=function(){this.width=this.column.width,this.element.style.width=this.column.widthStyled},u.prototype.clearWidth=function(){this.width="",this.element.style.width=""},u.prototype.getWidth=function(){return this.width||this.element.offsetWidth},u.prototype.setMinWidth=function(){this.minWidth=this.column.minWidth,this.element.style.minWidth=this.column.minWidthStyled},u.prototype.checkHeight=function(){this.row.reinitializeHeight()},u.prototype.clearHeight=function(){this.element.style.height="",this.height=null},u.prototype.setHeight=function(){this.height=this.row.height,this.element.style.height=this.row.heightStyled},u.prototype.getHeight=function(){return this.height||this.element.offsetHeight},u.prototype.show=function(){this.element.style.display=this.column.vertAlign?"inline-flex":""},u.prototype.hide=function(){this.element.style.display="none"},u.prototype.edit=function(e){if(this.table.modExists("edit",!0))return this.table.modules.edit.editCell(this,e)},u.prototype.cancelEdit=function(){if(this.table.modExists("edit",!0)){var e=this.table.modules.edit.getCurrentCell();e&&e._getSelf()===this?this.table.modules.edit.cancelEdit():console.warn("Cancel Editor Error - This cell is not currently being edited ")}},u.prototype.validate=function(){if(this.column.modules.validate&&this.table.modExists("validate",!0)){return!0===this.table.modules.validate.validate(this.column.modules.validate,this,this.getValue())}return!0},u.prototype.delete=function(){!this.table.rowManager.redrawBlock&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.modules.validate&&this.modules.validate.invalid&&this.table.modules.validate.clearValidation(this),this.modules.edit&&this.modules.edit.edited&&this.table.modules.edit.clearEdited(this),this.table.options.history&&this.table.modules.history.clearComponentHistory(this),this.element=!1,this.column.deleteCell(this),this.row.deleteCell(this),this.calcs={}},u.prototype.nav=function(){var e=this,t=!1,o=this.row.getCellIndex(this);return{next:function(){var t,o=this.right();return!!o||!(!(t=e.table.rowManager.nextDisplayRow(e.row,!0))||!(o=t.findNextEditableCell(-1)))&&(o.edit(),!0)},prev:function(){var t,o=this.left();return!!o||!(!(t=e.table.rowManager.prevDisplayRow(e.row,!0))||!(o=t.findPrevEditableCell(t.cells.length)))&&(o.edit(),!0)},left:function(){return!!(t=e.row.findPrevEditableCell(o))&&(t.edit(),!0)},right:function(){return!!(t=e.row.findNextEditableCell(o))&&(t.edit(),!0)},up:function(){var t=e.table.rowManager.prevDisplayRow(e.row,!0);t&&t.cells[o].edit()},down:function(){var t=e.table.rowManager.nextDisplayRow(e.row,!0);t&&t.cells[o].edit()}}},u.prototype.getIndex=function(){this.row.getCellIndex(this)},u.prototype.getComponent=function(){return this.component||(this.component=new c(this)),this.component};var d=function(e){this.table=e,this.active=!1,this.element=this.createElement(),this.external=!1,this.links=[],this._initialize()};d.prototype.createElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-footer"),e},d.prototype._initialize=function(e){if(this.table.options.footerElement)switch(_typeof(this.table.options.footerElement)){case"string":"<"===this.table.options.footerElement[0]?this.element.innerHTML=this.table.options.footerElement:(this.external=!0,this.element=document.querySelector(this.table.options.footerElement));break;default:this.element=this.table.options.footerElement}},d.prototype.getElement=function(){return this.element},d.prototype.append=function(e,t){this.activate(t),this.element.appendChild(e),this.table.rowManager.adjustTableSize()},d.prototype.prepend=function(e,t){this.activate(t),this.element.insertBefore(e,this.element.firstChild),this.table.rowManager.adjustTableSize()},d.prototype.remove=function(e){e.parentNode.removeChild(e),this.deactivate()},d.prototype.deactivate=function(e){this.element.firstChild&&!e||(this.external||this.element.parentNode.removeChild(this.element),this.active=!1)},d.prototype.activate=function(e){this.active||(this.active=!0,this.external||(this.table.element.appendChild(this.getElement()),this.table.element.style.display="")),e&&this.links.push(e)},d.prototype.redraw=function(){this.links.forEach(function(e){e.footerRedraw()})};var h=function e(t,o){this.options={},this.columnManager=null,this.rowManager=null,this.footerManager=null,this.vdomHoz=null,this.browser="",this.browserSlow=!1,this.browserMobile=!1,this.rtl=!1,this.modules={},this.initializeElement(t)&&(this.initializeOptions(o||{}),this._create()),e.prototype.comms.register(this)};h.prototype.defaultOptions={height:!1,minHeight:!1,maxHeight:!1,layout:"fitData",layoutColumnsOnNewData:!1,columnMinWidth:40,columnHeaderVertAlign:"top",columnVertAlign:!1,resizableColumns:!0,resizableRows:!1,autoResize:!0,columns:[],cellHozAlign:"",cellVertAlign:"",headerHozAlign:"",data:[],autoColumns:!1,autoColumnsDefinitions:!1,reactiveData:!1,nestedFieldSeparator:".",tooltips:!1,tooltipsHeader:!1,tooltipGenerationMode:"load",initialSort:!1,initialFilter:!1,initialHeaderFilter:!1,columnHeaderSortMulti:!0,sortOrderReverse:!1,headerSort:!0,headerSortTristate:!1,headerSortElement:"<div class='tabulator-arrow'></div>",footerElement:!1,index:"id",textDirection:"auto",keybindings:[],tabEndNewRow:!1,invalidOptionWarnings:!0,clipboard:!1,clipboardCopyStyled:!0,clipboardCopyConfig:!1,clipboardCopyFormatter:!1,clipboardCopyRowRange:"active",clipboardPasteParser:"table",clipboardPasteAction:"insert",clipboardCopied:function(){},clipboardPasted:function(){},clipboardPasteError:function(){},downloadDataFormatter:!1,downloadReady:function(e,t){return t},downloadComplete:!1,downloadConfig:{},downloadRowRange:"active",dataTree:!1,dataTreeFilter:!0,dataTreeSort:!0,dataTreeElementColumn:!1,dataTreeBranchElement:!0,dataTreeChildIndent:9,dataTreeChildField:"_children",dataTreeCollapseElement:!1,dataTreeExpandElement:!1,dataTreeStartExpanded:!1,dataTreeRowExpanded:function(){},dataTreeRowCollapsed:function(){},dataTreeChildColumnCalcs:!1,dataTreeSelectPropagate:!1,printAsHtml:!1,printFormatter:!1,printHeader:!1,printFooter:!1,printCopyStyle:!0,printStyled:!0,printVisibleRows:!0,printRowRange:"visible",printConfig:{},addRowPos:"bottom",selectable:"highlight",selectableRangeMode:"drag",selectableRollingSelection:!0,selectablePersistence:!0,selectableCheck:function(e,t){return!0},headerFilterLiveFilterDelay:300,headerFilterPlaceholder:!1,headerVisible:!0,history:!1,locale:!1,langs:{},virtualDom:!0,virtualDomBuffer:0,virtualDomHoz:!1,persistentLayout:!1,persistentSort:!1,persistentFilter:!1,persistenceID:"",persistenceMode:!0,persistenceReaderFunc:!1,persistenceWriterFunc:!1,persistence:!1,responsiveLayout:!1,responsiveLayoutCollapseStartOpen:!0,responsiveLayoutCollapseUseFormatters:!0,responsiveLayoutCollapseFormatter:!1,pagination:!1,paginationSize:!1,paginationInitialPage:1,paginationButtonCount:5,paginationSizeSelector:!1,paginationElement:!1,paginationDataSent:{},paginationDataReceived:{},paginationAddRow:"page",ajaxURL:!1,ajaxURLGenerator:!1,ajaxParams:{},ajaxConfig:"get",ajaxContentType:"form",ajaxRequestFunc:!1,ajaxLoader:!0,ajaxLoaderLoading:!1,ajaxLoaderError:!1,ajaxFiltering:!1,ajaxSorting:!1,ajaxProgressiveLoad:!1,ajaxProgressiveLoadDelay:0,ajaxProgressiveLoadScrollMargin:0,groupBy:!1,groupStartOpen:!0,groupValues:!1,groupUpdateOnCellEdit:!1,groupHeader:!1,groupHeaderPrint:null,groupHeaderClipboard:null,groupHeaderHtmlOutput:null,groupHeaderDownload:null,htmlOutputConfig:!1,movableColumns:!1,movableRows:!1,movableRowsConnectedTables:!1,movableRowsConnectedElements:!1,movableRowsSender:!1,movableRowsReceiver:"insert",movableRowsSendingStart:function(){},movableRowsSent:function(){},movableRowsSentFailed:function(){},movableRowsSendingStop:function(){},movableRowsReceivingStart:function(){},movableRowsReceived:function(){},movableRowsReceivedFailed:function(){},movableRowsReceivingStop:function(){},movableRowsElementDrop:function(){},scrollToRowPosition:"top",scrollToRowIfVisible:!0,scrollToColumnPosition:"left",scrollToColumnIfVisible:!0,rowFormatter:!1,rowFormatterPrint:null,rowFormatterClipboard:null,rowFormatterHtmlOutput:null,placeholder:!1,tableBuilding:function(){},tableBuilt:function(){},renderStarted:function(){},renderComplete:function(){},rowClick:!1,rowDblClick:!1,rowContext:!1,rowTap:!1,rowDblTap:!1,rowTapHold:!1,rowMouseEnter:!1,rowMouseLeave:!1,rowMouseOver:!1,rowMouseOut:!1,rowMouseMove:!1,rowContextMenu:!1,rowClickMenu:!1,rowAdded:function(){},rowDeleted:function(){},rowMoved:function(){},rowUpdated:function(){},rowSelectionChanged:function(){},rowSelected:function(){},rowDeselected:function(){},rowResized:function(){},cellClick:!1,cellDblClick:!1,cellContext:!1,cellTap:!1,cellDblTap:!1,cellTapHold:!1,cellMouseEnter:!1,cellMouseLeave:!1,cellMouseOver:!1,cellMouseOut:!1,cellMouseMove:!1,cellEditing:function(){},cellEdited:function(){},cellEditCancelled:function(){},columnMoved:!1,columnResized:function(){},columnTitleChanged:function(){},columnVisibilityChanged:function(){},htmlImporting:function(){},htmlImported:function(){},dataLoading:function(){},dataLoaded:function(){},dataEdited:!1,dataChanged:!1,ajaxRequesting:function(){},ajaxResponse:!1,ajaxError:function(){},dataFiltering:!1,dataFiltered:!1,dataSorting:function(){},dataSorted:function(){},groupToggleElement:"arrow",groupClosedShowCalcs:!1,dataGrouping:function(){},dataGrouped:!1,groupVisibilityChanged:function(){},groupClick:!1,groupDblClick:!1,groupContext:!1,groupContextMenu:!1,groupClickMenu:!1,groupTap:!1,groupDblTap:!1,groupTapHold:!1,columnCalcs:!0,pageLoaded:function(){},localized:function(){},validationMode:"blocking",validationFailed:function(){},historyUndo:function(){},historyRedo:function(){},scrollHorizontal:function(){},scrollVertical:function(){}},h.prototype.initializeOptions=function(e){if(!1!==e.invalidOptionWarnings)for(var t in e)void 0===this.defaultOptions[t]&&console.warn("Invalid table constructor option:",t);for(var t in this.defaultOptions)t in e?this.options[t]=e[t]:Array.isArray(this.defaultOptions[t])?this.options[t]=Object.assign([],this.defaultOptions[t]):"object"===_typeof(this.defaultOptions[t])&&null!==this.defaultOptions[t]?this.options[t]=Object.assign({},this.defaultOptions[t]):this.options[t]=this.defaultOptions[t]},h.prototype.initializeElement=function(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement?(this.element=e,!0):"string"==typeof e?(this.element=document.querySelector(e),!!this.element||(console.error("Tabulator Creation Error - no element found matching selector: ",e),!1)):(console.error("Tabulator Creation Error - Invalid element provided:",e),!1)},h.prototype.rtlCheck=function(){var e=window.getComputedStyle(this.element);switch(this.options.textDirection){case"auto":if("rtl"!==e.direction)break;case"rtl":this.element.classList.add("tabulator-rtl"),this.rtl=!0;break;case"ltr":this.element.classList.add("tabulator-ltr");default:this.rtl=!1}},h.prototype._mapDepricatedFunctionality=function(){(this.options.persistentLayout||this.options.persistentSort||this.options.persistentFilter)&&(this.options.persistence||(this.options.persistence={})),this.options.dataEdited&&(console.warn("DEPRECATION WARNING - dataEdited option has been deprecated, please use the dataChanged option instead"),this.options.dataChanged=this.options.dataEdited),this.options.downloadDataFormatter&&console.warn("DEPRECATION WARNING - downloadDataFormatter option has been deprecated"),void 0!==this.options.clipboardCopyHeader&&(this.options.columnHeaders=this.options.clipboardCopyHeader,console.warn("DEPRECATION WARNING - clipboardCopyHeader option has been deprecated, please use the columnHeaders property on the clipboardCopyConfig option")),!0!==this.options.printVisibleRows&&(console.warn("printVisibleRows option is deprecated, you should now use the printRowRange option"),this.options.persistence.printRowRange="active"),!0!==this.options.printCopyStyle&&(console.warn("printCopyStyle option is deprecated, you should now use the printStyled option"),this.options.persistence.printStyled=this.options.printCopyStyle),this.options.persistentLayout&&(console.warn("persistentLayout option is deprecated, you should now use the persistence option"),!0!==this.options.persistence&&void 0===this.options.persistence.columns&&(this.options.persistence.columns=!0)),this.options.persistentSort&&(console.warn("persistentSort option is deprecated, you should now use the persistence option"),!0!==this.options.persistence&&void 0===this.options.persistence.sort&&(this.options.persistence.sort=!0)),this.options.persistentFilter&&(console.warn("persistentFilter option is deprecated, you should now use the persistence option"),!0!==this.options.persistence&&void 0===this.options.persistence.filter&&(this.options.persistence.filter=!0)),this.options.columnVertAlign&&(console.warn("columnVertAlign option is deprecated, you should now use the columnHeaderVertAlign option"),this.options.columnHeaderVertAlign=this.options.columnVertAlign)},h.prototype._clearSelection=function(){this.element.classList.add("tabulator-block-select"),window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty(),this.element.classList.remove("tabulator-block-select")},h.prototype._create=function(){this._clearObjectPointers(),this._mapDepricatedFunctionality(),this.bindModules(),this.rtlCheck(),"TABLE"===this.element.tagName&&this.modExists("htmlTableImport",!0)&&this.modules.htmlTableImport.parseTable(),this.columnManager=new t(this),this.rowManager=new s(this),this.footerManager=new d(this),this.columnManager.setRowManager(this.rowManager),this.rowManager.setColumnManager(this.columnManager),this.options.virtualDomHoz&&(this.vdomHoz=new a(this)),this._buildElement(),this._loadInitialData()},h.prototype._clearObjectPointers=function(){this.options.columns=this.options.columns.slice(0),this.options.reactiveData||(this.options.data=this.options.data.slice(0))},h.prototype._buildElement=function(){var e=this,t=this.element,o=this.modules,i=this.options;for(i.tableBuilding.call(this),t.classList.add("tabulator"),t.setAttribute("role","grid");t.firstChild;)t.removeChild(t.firstChild);i.height&&(i.height=isNaN(i.height)?i.height:i.height+"px",t.style.height=i.height),!1!==i.minHeight&&(i.minHeight=isNaN(i.minHeight)?i.minHeight:i.minHeight+"px",t.style.minHeight=i.minHeight),!1!==i.maxHeight&&(i.maxHeight=isNaN(i.maxHeight)?i.maxHeight:i.maxHeight+"px",t.style.maxHeight=i.maxHeight),this.columnManager.initialize(),this.rowManager.initialize(),this._detectBrowser(),this.modExists("layout",!0)&&o.layout.initialize(i.layout),o.localize.initialize(),!1!==i.headerFilterPlaceholder&&o.localize.setHeaderFilterPlaceholder(i.headerFilterPlaceholder);for(var n in i.langs)o.localize.installLang(n,i.langs[n]);if(o.localize.setLocale(i.locale),"string"==typeof i.placeholder){var s=document.createElement("div");s.classList.add("tabulator-placeholder");var a=document.createElement("span");a.innerHTML=i.placeholder,s.appendChild(a),i.placeholder=s}if(t.appendChild(this.columnManager.getElement()),t.appendChild(this.rowManager.getElement()),i.footerElement&&this.footerManager.activate(),i.persistence&&this.modExists("persistence",!0)&&o.persistence.initialize(),i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.columns&&(i.columns=o.persistence.load("columns",i.columns)),i.movableRows&&this.modExists("moveRow")&&o.moveRow.initialize(),i.autoColumns&&this.options.data&&this.columnManager.generateColumnsFromRowData(this.options.data),this.modExists("columnCalcs")&&o.columnCalcs.initialize(),this.columnManager.setColumns(i.columns),i.dataTree&&this.modExists("dataTree",!0)&&o.dataTree.initialize(),this.modExists("frozenRows")&&this.modules.frozenRows.initialize(),(i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.sort||i.initialSort)&&this.modExists("sort",!0)){var r=[];i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.sort?!1===(r=o.persistence.load("sort"))&&i.initialSort&&(r=i.initialSort):i.initialSort&&(r=i.initialSort),o.sort.setSort(r)}if((i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.filter||i.initialFilter)&&this.modExists("filter",!0)){var l=[];i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.filter?!1===(l=o.persistence.load("filter"))&&i.initialFilter&&(l=i.initialFilter):i.initialFilter&&(l=i.initialFilter),o.filter.setFilter(l)}i.initialHeaderFilter&&this.modExists("filter",!0)&&i.initialHeaderFilter.forEach(function(t){var i=e.columnManager.findColumn(t.field);if(!i)return console.warn("Column Filter Error - No matching column found:",t.field),!1;o.filter.setHeaderFilterValue(i,t.value)}),this.modExists("ajax")&&o.ajax.initialize(),i.pagination&&this.modExists("page",!0)&&o.page.initialize(),i.groupBy&&this.modExists("groupRows",!0)&&o.groupRows.initialize(),this.modExists("keybindings")&&o.keybindings.initialize(),this.modExists("selectRow")&&o.selectRow.clearSelectionData(!0),i.autoResize&&this.modExists("resizeTable")&&o.resizeTable.initialize(),this.modExists("clipboard")&&o.clipboard.initialize(),i.printAsHtml&&this.modExists("print")&&o.print.initialize(),i.tableBuilt.call(this)},h.prototype._loadInitialData=function(){var e=this;if(e.options.pagination&&e.modExists("page"))if(e.modules.page.reset(!0,!0),"local"==e.options.pagination){if(e.options.data.length)e.rowManager.setData(e.options.data,!1,!0);else{if((e.options.ajaxURL||e.options.ajaxURLGenerator)&&e.modExists("ajax"))return void e.modules.ajax.loadData(!1,!0).then(function(){}).catch(function(){e.options.paginationInitialPage&&e.modules.page.setPage(e.options.paginationInitialPage)});e.rowManager.setData(e.options.data,!1,!0)}e.options.paginationInitialPage&&e.modules.page.setPage(e.options.paginationInitialPage)}else e.options.ajaxURL?e.modules.page.setPage(e.options.paginationInitialPage).then(function(){}).catch(function(){}):e.rowManager.setData([],!1,!0);else e.options.data.length?e.rowManager.setData(e.options.data):(e.options.ajaxURL||e.options.ajaxURLGenerator)&&e.modExists("ajax")?e.modules.ajax.loadData(!1,!0).then(function(){}).catch(function(){}):e.rowManager.setData(e.options.data,!1,!0)},h.prototype.destroy=function(){var e=this.element;for(h.prototype.comms.deregister(this),this.options.reactiveData&&this.modExists("reactiveData",!0)&&this.modules.reactiveData.unwatchData(),this.rowManager.rows.forEach(function(e){e.wipe()}),this.rowManager.rows=[],this.rowManager.activeRows=[],this.rowManager.displayRows=[],this.options.autoResize&&this.modExists("resizeTable")&&this.modules.resizeTable.clearBindings(),this.modExists("keybindings")&&this.modules.keybindings.clearBindings();e.firstChild;)e.removeChild(e.firstChild);e.classList.remove("tabulator")},h.prototype._detectBrowser=function(){var e=navigator.userAgent||navigator.vendor||window.opera;e.indexOf("Trident")>-1?(this.browser="ie",this.browserSlow=!0):e.indexOf("Edge")>-1?(this.browser="edge",this.browserSlow=!0):e.indexOf("Firefox")>-1?(this.browser="firefox",this.browserSlow=!1):(this.browser="other",this.browserSlow=!1),this.browserMobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4))},h.prototype.blockRedraw=function(){return this.rowManager.blockRedraw()},h.prototype.restoreRedraw=function(){return this.rowManager.restoreRedraw()},h.prototype.setDataFromLocalFile=function(e){var t=this;return new Promise(function(o,i){var n=document.createElement("input");n.type="file",n.accept=e||".json,application/json",n.addEventListener("change",function(e){var s,a=n.files[0],r=new FileReader;r.readAsText(a),r.onload=function(e){try{s=JSON.parse(r.result)}catch(e){return console.warn("File Load Error - File contents is invalid JSON",e),void i(e)}t.setData(s).then(function(e){o(e)}).catch(function(e){o(e)})},r.onerror=function(e){console.warn("File Load Error - Unable to read file"),i()}}),n.click()})},h.prototype.setData=function(e,t,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(e,t,o,!1,!0)},h.prototype._setData=function(e,t,o,i,n){var s=this;return"string"!=typeof e?e?s.rowManager.setData(e,i,n):s.modExists("ajax")&&(s.modules.ajax.getUrl||s.options.ajaxURLGenerator)?"remote"==s.options.pagination&&s.modExists("page",!0)?(s.modules.page.reset(!0,!0),s.modules.page.setPage(1)):s.modules.ajax.loadData(i,n):s.rowManager.setData([],i,n):0==e.indexOf("{")||0==e.indexOf("[")?s.rowManager.setData(JSON.parse(e),i,n):s.modExists("ajax",!0)?(t&&s.modules.ajax.setParams(t),o&&s.modules.ajax.setConfig(o),s.modules.ajax.setUrl(e),"remote"==s.options.pagination&&s.modExists("page",!0)?(s.modules.page.reset(!0,!0),s.modules.page.setPage(1)):s.modules.ajax.loadData(i,n)):void 0},h.prototype.clearData=function(){this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this.rowManager.clearData()},h.prototype.getData=function(e){return!0===e&&(console.warn("passing a boolean to the getData function is deprecated, you should now pass the string 'active'"),e="active"),this.rowManager.getData(e)},h.prototype.getDataCount=function(e){return!0===e&&(console.warn("passing a boolean to the getDataCount function is deprecated, you should now pass the string 'active'"),e="active"),this.rowManager.getDataCount(e)},h.prototype.searchRows=function(e,t,o){if(this.modExists("filter",!0))return this.modules.filter.search("rows",e,t,o)},h.prototype.searchData=function(e,t,o){if(this.modExists("filter",!0))return this.modules.filter.search("data",e,t,o)},h.prototype.getHtml=function(e,t,o){if(this.modExists("export",!0))return this.modules.export.getHtml(e,t,o)},h.prototype.print=function(e,t,o){if(this.modExists("print",!0))return this.modules.print.printFullscreen(e,t,o)},h.prototype.getAjaxUrl=function(){if(this.modExists("ajax",!0))return this.modules.ajax.getUrl()},h.prototype.replaceData=function(e,t,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(e,t,o,!0)},h.prototype.updateData=function(e){var t=this,o=this,i=0;return new Promise(function(n,s){t.modExists("ajax")&&t.modules.ajax.blockActiveRequest(),"string"==typeof e&&(e=JSON.parse(e)),e?e.forEach(function(e){var t=o.rowManager.findRow(e[o.options.index]);t&&(i++,t.updateData(e).then(function(){--i||n()}))}):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))})},h.prototype.addData=function(e,t,o){var i=this;return new Promise(function(n,s){i.modExists("ajax")&&i.modules.ajax.blockActiveRequest(),"string"==typeof e&&(e=JSON.parse(e)),e?i.rowManager.addRows(e,t,o).then(function(e){var t=[];e.forEach(function(e){t.push(e.getComponent())}),n(t)}):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))})},h.prototype.updateOrAddData=function(e){var t=this,o=this,i=[],n=0;return new Promise(function(s,a){t.modExists("ajax")&&t.modules.ajax.blockActiveRequest(),"string"==typeof e&&(e=JSON.parse(e)),e?e.forEach(function(e){var t=o.rowManager.findRow(e[o.options.index]);n++,t?t.updateData(e).then(function(){n--,i.push(t.getComponent()),n||s(i)}):o.rowManager.addRows(e).then(function(e){n--,i.push(e[0].getComponent()),n||s(i)})}):(console.warn("Update Error - No data provided"),a("Update Error - No data provided"))})},h.prototype.getRow=function(e){var t=this.rowManager.findRow(e);return t?t.getComponent():(console.warn("Find Error - No matching row found:",e),!1)},h.prototype.getRowFromPosition=function(e,t){var o=this.rowManager.getRowFromPosition(e,t);return o?o.getComponent():(console.warn("Find Error - No matching row found:",e),!1)},h.prototype.deleteRow=function(e){var t=this;return new Promise(function(o,i){function n(){++a==e.length&&r&&(s.rowManager.reRenderInPosition(),o())}var s=t,a=0,r=0,l=[];Array.isArray(e)||(e=[e]),e.forEach(function(e){var o=t.rowManager.findRow(e,!0);o?l.push(o):(console.warn("Delete Error - No matching row found:",e),i("Delete Error - No matching row found"),n())}),l.sort(function(e,o){return t.rowManager.rows.indexOf(e)>t.rowManager.rows.indexOf(o)?1:-1}),l.forEach(function(e){e.delete().then(function(){r++,n()}).catch(function(e){n(),i(e)})})})},h.prototype.addRow=function(e,t,o){var i=this;return new Promise(function(n,s){"string"==typeof e&&(e=JSON.parse(e)),i.rowManager.addRows(e,t,o).then(function(e){i.modExists("columnCalcs")&&i.modules.columnCalcs.recalc(i.rowManager.activeRows),n(e[0].getComponent())})})},h.prototype.updateOrAddRow=function(e,t){var o=this;return new Promise(function(i,n){var s=o.rowManager.findRow(e);"string"==typeof t&&(t=JSON.parse(t)),s?s.updateData(t).then(function(){o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(o.rowManager.activeRows),i(s.getComponent())}).catch(function(e){n(e)}):s=o.rowManager.addRows(t).then(function(e){o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(o.rowManager.activeRows),i(e[0].getComponent())}).catch(function(e){n(e)})})},h.prototype.updateRow=function(e,t){var o=this;return new Promise(function(i,n){var s=o.rowManager.findRow(e);"string"==typeof t&&(t=JSON.parse(t)),s?s.updateData(t).then(function(){i(s.getComponent())}).catch(function(e){n(e)}):(console.warn("Update Error - No matching row found:",e),n("Update Error - No matching row found"))})},h.prototype.scrollToRow=function(e,t,o){var i=this;return new Promise(function(n,s){var a=i.rowManager.findRow(e);a?i.rowManager.scrollToRow(a,t,o).then(function(){n()}).catch(function(e){s(e)}):(console.warn("Scroll Error - No matching row found:",e),s("Scroll Error - No matching row found"))})},h.prototype.moveRow=function(e,t,o){var i=this.rowManager.findRow(e);i?i.moveToRow(t,o):console.warn("Move Error - No matching row found:",e)},h.prototype.getRows=function(e){return!0===e&&(console.warn("passing a boolean to the getRows function is deprecated, you should now pass the string 'active'"),e="active"),this.rowManager.getComponents(e)},h.prototype.getRowPosition=function(e,t){var o=this.rowManager.findRow(e);return o?this.rowManager.getRowPosition(o,t):(console.warn("Position Error - No matching row found:",e),!1)},h.prototype.copyToClipboard=function(e){this.modExists("clipboard",!0)&&this.modules.clipboard.copy(e)},h.prototype.setColumns=function(e){this.columnManager.setColumns(e)},h.prototype.getColumns=function(e){return this.columnManager.getComponents(e)},h.prototype.getColumn=function(e){var t=this.columnManager.findColumn(e);return t?t.getComponent():(console.warn("Find Error - No matching column found:",e),!1)},h.prototype.getColumnDefinitions=function(){return this.columnManager.getDefinitionTree()},h.prototype.getColumnLayout=function(){if(this.modExists("persistence",!0))return this.modules.persistence.parseColumns(this.columnManager.getColumns())},h.prototype.setColumnLayout=function(e){return!!this.modExists("persistence",!0)&&(this.columnManager.setColumns(this.modules.persistence.mergeDefinition(this.options.columns,e)),!0)},h.prototype.showColumn=function(e){var t=this.columnManager.findColumn(e);if(!t)return console.warn("Column Show Error - No matching column found:",e),!1;t.show(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},h.prototype.hideColumn=function(e){var t=this.columnManager.findColumn(e);if(!t)return console.warn("Column Hide Error - No matching column found:",e),!1;t.hide(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},h.prototype.toggleColumn=function(e){var t=this.columnManager.findColumn(e);if(!t)return console.warn("Column Visibility Toggle Error - No matching column found:",e),!1;t.visible?t.hide():t.show()},h.prototype.addColumn=function(e,t,o){var i=this;return new Promise(function(n,s){var a=i.columnManager.findColumn(o);i.columnManager.addColumn(e,t,a).then(function(e){n(e.getComponent())}).catch(function(e){s(e)})})},h.prototype.deleteColumn=function(e){var t=this;return new Promise(function(o,i){var n=t.columnManager.findColumn(e);n?n.delete().then(function(){o()}).catch(function(e){i(e)}):(console.warn("Column Delete Error - No matching column found:",e),i())})},h.prototype.updateColumnDefinition=function(e,t){var o=this;return new Promise(function(i,n){var s=o.columnManager.findColumn(e);s?s.updateDefinition(t).then(function(e){i(e)}).catch(function(e){n(e)}):(console.warn("Column Update Error - No matching column found:",e),n())})},h.prototype.moveColumn=function(e,t,o){var i=this.columnManager.findColumn(e),n=this.columnManager.findColumn(t);i?n?this.columnManager.moveColumn(i,n,o):console.warn("Move Error - No matching column found:",n):console.warn("Move Error - No matching column found:",e)},h.prototype.scrollToColumn=function(e,t,o){var i=this;return new Promise(function(n,s){var a=i.columnManager.findColumn(e);a?i.columnManager.scrollToColumn(a,t,o).then(function(){n()}).catch(function(e){s(e)}):(console.warn("Scroll Error - No matching column found:",e),s("Scroll Error - No matching column found"))})},h.prototype.setLocale=function(e){this.modules.localize.setLocale(e)},h.prototype.getLocale=function(){return this.modules.localize.getLocale()},h.prototype.getLang=function(e){return this.modules.localize.getLang(e)},h.prototype.redraw=function(e){this.columnManager.redraw(e),this.rowManager.redraw(e)},h.prototype.setHeight=function(e){"classic"!==this.rowManager.renderMode?(this.options.height=isNaN(e)?e:e+"px",this.element.style.height=this.options.height,this.rowManager.setRenderMode(),this.rowManager.redraw()):console.warn("setHeight function is not available in classic render mode")},
-h.prototype.setSort=function(e,t){this.modExists("sort",!0)&&(this.modules.sort.setSort(e,t),this.rowManager.sorterRefresh())},h.prototype.getSorters=function(){if(this.modExists("sort",!0))return this.modules.sort.getSort()},h.prototype.clearSort=function(){this.modExists("sort",!0)&&(this.modules.sort.clear(),this.rowManager.sorterRefresh())},h.prototype.setFilter=function(e,t,o,i){this.modExists("filter",!0)&&(this.modules.filter.setFilter(e,t,o,i),this.rowManager.filterRefresh())},h.prototype.addFilter=function(e,t,o,i){this.modExists("filter",!0)&&(this.modules.filter.addFilter(e,t,o,i),this.rowManager.filterRefresh())},h.prototype.getFilters=function(e){if(this.modExists("filter",!0))return this.modules.filter.getFilters(e)},h.prototype.setHeaderFilterFocus=function(e){if(this.modExists("filter",!0)){var t=this.columnManager.findColumn(e);if(!t)return console.warn("Column Filter Focus Error - No matching column found:",e),!1;this.modules.filter.setHeaderFilterFocus(t)}},h.prototype.getHeaderFilterValue=function(e){if(this.modExists("filter",!0)){var t=this.columnManager.findColumn(e);if(t)return this.modules.filter.getHeaderFilterValue(t);console.warn("Column Filter Error - No matching column found:",e)}},h.prototype.setHeaderFilterValue=function(e,t){if(this.modExists("filter",!0)){var o=this.columnManager.findColumn(e);if(!o)return console.warn("Column Filter Error - No matching column found:",e),!1;this.modules.filter.setHeaderFilterValue(o,t)}},h.prototype.getHeaderFilters=function(){if(this.modExists("filter",!0))return this.modules.filter.getHeaderFilters()},h.prototype.removeFilter=function(e,t,o){this.modExists("filter",!0)&&(this.modules.filter.removeFilter(e,t,o),this.rowManager.filterRefresh())},h.prototype.clearFilter=function(e){this.modExists("filter",!0)&&(this.modules.filter.clearFilter(e),this.rowManager.filterRefresh())},h.prototype.clearHeaderFilter=function(){this.modExists("filter",!0)&&(this.modules.filter.clearHeaderFilter(),this.rowManager.filterRefresh())},h.prototype.selectRow=function(e){this.modExists("selectRow",!0)&&(!0===e&&(console.warn("passing a boolean to the selectRowselectRow function is deprecated, you should now pass the string 'active'"),e="active"),this.modules.selectRow.selectRows(e))},h.prototype.deselectRow=function(e){this.modExists("selectRow",!0)&&this.modules.selectRow.deselectRows(e)},h.prototype.toggleSelectRow=function(e){this.modExists("selectRow",!0)&&this.modules.selectRow.toggleRow(e)},h.prototype.getSelectedRows=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedRows()},h.prototype.getSelectedData=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedData()},h.prototype.getInvalidCells=function(){if(this.modExists("validate",!0))return this.modules.validate.getInvalidCells()},h.prototype.clearCellValidation=function(e){var t=this;this.modExists("validate",!0)&&(e||(e=this.modules.validate.getInvalidCells()),Array.isArray(e)||(e=[e]),e.forEach(function(e){t.modules.validate.clearValidation(e._getSelf())}))},h.prototype.validate=function(e){var t=[];return this.rowManager.rows.forEach(function(e){var o=e.validate();!0!==o&&(t=t.concat(o))}),!t.length||t},h.prototype.setMaxPage=function(e){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setMaxPage(e)},h.prototype.setPage=function(e){return this.options.pagination&&this.modExists("page")?this.modules.page.setPage(e):new Promise(function(e,t){t()})},h.prototype.setPageToRow=function(e){var t=this;return new Promise(function(o,i){t.options.pagination&&t.modExists("page")?(e=t.rowManager.findRow(e),e?t.modules.page.setPageToRow(e).then(function(){o()}).catch(function(){i()}):i()):i()})},h.prototype.setPageSize=function(e){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setPageSize(e),this.modules.page.setPage(1).then(function(){}).catch(function(){})},h.prototype.getPageSize=function(){if(this.options.pagination&&this.modExists("page",!0))return this.modules.page.getPageSize()},h.prototype.previousPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.previousPage()},h.prototype.nextPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.nextPage()},h.prototype.getPage=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPage()},h.prototype.getPageMax=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPageMax()},h.prototype.setGroupBy=function(e){if(!this.modExists("groupRows",!0))return!1;this.options.groupBy=e,this.modules.groupRows.initialize(),this.rowManager.refreshActiveData("display"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")},h.prototype.setGroupValues=function(e){if(!this.modExists("groupRows",!0))return!1;this.options.groupValues=e,this.modules.groupRows.initialize(),this.rowManager.refreshActiveData("display"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")},h.prototype.setGroupStartOpen=function(e){if(!this.modExists("groupRows",!0))return!1;this.options.groupStartOpen=e,this.modules.groupRows.initialize(),this.options.groupBy?(this.rowManager.refreshActiveData("group"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")):console.warn("Grouping Update - cant refresh view, no groups have been set")},h.prototype.setGroupHeader=function(e){if(!this.modExists("groupRows",!0))return!1;this.options.groupHeader=e,this.modules.groupRows.initialize(),this.options.groupBy?(this.rowManager.refreshActiveData("group"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")):console.warn("Grouping Update - cant refresh view, no groups have been set")},h.prototype.getGroups=function(e){return!!this.modExists("groupRows",!0)&&this.modules.groupRows.getGroups(!0)},h.prototype.getGroupedData=function(){if(this.modExists("groupRows",!0))return this.options.groupBy?this.modules.groupRows.getGroupedData():this.getData()},h.prototype.getEditedCells=function(){if(this.modExists("edit",!0))return this.modules.edit.getEditedCells()},h.prototype.clearCellEdited=function(e){var t=this;this.modExists("edit",!0)&&(e||(e=this.modules.edit.getEditedCells()),Array.isArray(e)||(e=[e]),e.forEach(function(e){t.modules.edit.clearEdited(e._getSelf())}))},h.prototype.getCalcResults=function(){return!!this.modExists("columnCalcs",!0)&&this.modules.columnCalcs.getResults()},h.prototype.recalc=function(){this.modExists("columnCalcs",!0)&&this.modules.columnCalcs.recalcAll(this.rowManager.activeRows)},h.prototype.navigatePrev=function(){var e=!1;return!(!this.modExists("edit",!0)||!(e=this.modules.edit.currentCell))&&e.nav().prev()},h.prototype.navigateNext=function(){var e=!1;return!(!this.modExists("edit",!0)||!(e=this.modules.edit.currentCell))&&e.nav().next()},h.prototype.navigateLeft=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().left())},h.prototype.navigateRight=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().right())},h.prototype.navigateUp=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().up())},h.prototype.navigateDown=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().down())},h.prototype.undo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.undo()},h.prototype.redo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.redo()},h.prototype.getHistoryUndoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryUndoSize()},h.prototype.getHistoryRedoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryRedoSize()},h.prototype.download=function(e,t,o,i){this.modExists("download",!0)&&this.modules.download.download(e,t,o,i)},h.prototype.downloadToTab=function(e,t,o,i){this.modExists("download",!0)&&this.modules.download.download(e,t,o,i,!0)},h.prototype.tableComms=function(e,t,o,i){this.modules.comms.receive(e,t,o,i)},h.prototype.moduleBindings={},h.prototype.extendModule=function(e,t,o){if(h.prototype.moduleBindings[e]){var i=h.prototype.moduleBindings[e].prototype[t];if(i)if("object"==(void 0===o?"undefined":_typeof(o)))for(var n in o)i[n]=o[n];else console.warn("Module Error - Invalid value type, it must be an object");else console.warn("Module Error - property does not exist:",t)}else console.warn("Module Error - module does not exist:",e)},h.prototype.registerModule=function(e,t){h.prototype.moduleBindings[e]=t},h.prototype.bindModules=function(){this.modules={};for(var e in h.prototype.moduleBindings)this.modules[e]=new h.prototype.moduleBindings[e](this)},h.prototype.modExists=function(e,t){return!!this.modules[e]||(t&&console.error("Tabulator Module Not Installed: "+e),!1)},h.prototype.helpers={elVisible:function(e){return!(e.offsetWidth<=0&&e.offsetHeight<=0)},elOffset:function(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset-document.documentElement.clientTop,left:t.left+window.pageXOffset-document.documentElement.clientLeft}},deepClone:function(e){var t=Object.assign(Array.isArray(e)?[]:{},e);for(var o in e)null!=e[o]&&"object"===_typeof(e[o])&&(e[o]instanceof Date?t[o]=new Date(e[o]):t[o]=this.deepClone(e[o]));return t}},h.prototype.comms={tables:[],register:function(e){h.prototype.comms.tables.push(e)},deregister:function(e){var t=h.prototype.comms.tables.indexOf(e);t>-1&&h.prototype.comms.tables.splice(t,1)},lookupTable:function(e,t){var o,i,n=[];if("string"==typeof e){if(o=document.querySelectorAll(e),o.length)for(var s=0;s<o.length;s++)(i=h.prototype.comms.matchElement(o[s]))&&n.push(i)}else"undefined"!=typeof HTMLElement&&e instanceof HTMLElement||e instanceof h?(i=h.prototype.comms.matchElement(e))&&n.push(i):Array.isArray(e)?e.forEach(function(e){n=n.concat(h.prototype.comms.lookupTable(e))}):t||console.warn("Table Connection Error - Invalid Selector",e);return n},matchElement:function(e){return h.prototype.comms.tables.find(function(t){return e instanceof h?t===e:t.element===e})}},h.prototype.findTable=function(e){var t=h.prototype.comms.lookupTable(e,!0);return!(Array.isArray(t)&&!t.length)&&t};var p=function(e){this.table=e,this.mode=null};p.prototype.initialize=function(e){this.modes[e]?this.mode=e:(console.warn("Layout Error - invalid mode set, defaulting to 'fitData' : "+e),this.mode="fitData"),this.table.element.setAttribute("tabulator-layout",this.mode)},p.prototype.getMode=function(){return this.mode},p.prototype.layout=function(){this.modes[this.mode].call(this,this.table.columnManager.columnsByIndex)},p.prototype.modes={fitData:function(e){this.table.options.virtualDomHoz?this.table.vdomHoz.fitDataLayoutOverride():e.forEach(function(e){e.reinitializeWidth()}),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitDataFill:function(e){e.forEach(function(e){e.reinitializeWidth()}),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitDataTable:function(e){e.forEach(function(e){e.reinitializeWidth()}),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitDataStretch:function(e){var t=this,o=0,i=this.table.rowManager.element.clientWidth,n=0,s=!1;e.forEach(function(e,i){e.widthFixed||e.reinitializeWidth(),(t.table.options.responsiveLayout?e.modules.responsive.visible:e.visible)&&(s=e),e.visible&&(o+=e.getWidth())}),s?(n=i-o+s.getWidth(),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&(s.setWidth(0),this.table.modules.responsiveLayout.update()),n>0?s.setWidth(n):s.reinitializeWidth()):this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitColumns:function(e){function t(e){return"string"==typeof e?e.indexOf("%")>-1?n/100*parseInt(e):parseInt(e):e}function o(e,i,n,s){function a(e){return n*(e.column.definition.widthGrow||1)}function r(e){return t(e.width)-n*(e.column.definition.widthShrink||0)}var l=[],c=0,u=0,d=0,h=0,p=0,m=[];return e.forEach(function(e,t){var o=s?r(e):a(e);e.column.minWidth>=o?l.push(e):(m.push(e),p+=s?e.column.definition.widthShrink||1:e.column.definition.widthGrow||1)}),l.length?(l.forEach(function(e){c+=s?e.width-e.column.minWidth:e.column.minWidth,e.width=e.column.minWidth}),u=i-c,d=p?Math.floor(u/p):u,h=u-d*p,h+=o(m,u,d,s)):(h=p?i-Math.floor(i/p)*p:i,m.forEach(function(e){e.width=s?r(e):a(e)})),h}var i=this,n=i.table.element.clientWidth,s=0,a=0,r=0,l=0,c=[],u=[],d=0,h=0,p=0;this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight&&(n-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),e.forEach(function(e){var o,i,n;e.visible&&(o=e.definition.width,i=parseInt(e.minWidth),o?(n=t(o),s+=n>i?n:i,e.definition.widthShrink&&(u.push({column:e,width:n>i?n:i}),d+=e.definition.widthShrink)):(c.push({column:e,width:0}),r+=e.definition.widthGrow||1))}),a=n-s,l=Math.floor(a/r);var p=o(c,a,l,!1);c.length&&p>0&&(c[c.length-1].width+=+p),c.forEach(function(e){a-=e.width}),h=Math.abs(p)+a,h>0&&d&&(p=o(u,h,Math.floor(h/d),!0)),u.length&&(u[u.length-1].width-=p),c.forEach(function(e){e.column.setWidth(e.width)}),u.forEach(function(e){e.column.setWidth(e.width)})}},h.prototype.registerModule("layout",p);var m=function(e){this.table=e,this.locale="default",this.lang=!1,this.bindings={},this.langList={}};m.prototype.initialize=function(){this.langList=h.prototype.helpers.deepClone(this.langs)},m.prototype.setHeaderFilterPlaceholder=function(e){this.langList.default.headerFilters.default=e},m.prototype.setHeaderFilterColumnPlaceholder=function(e,t){this.langList.default.headerFilters.columns[e]=t,this.lang&&!this.lang.headerFilters.columns[e]&&(this.lang.headerFilters.columns[e]=t)},m.prototype.installLang=function(e,t){this.langList[e]?this._setLangProp(this.langList[e],t):this.langList[e]=t},m.prototype._setLangProp=function(e,t){for(var o in t)e[o]&&"object"==_typeof(e[o])?this._setLangProp(e[o],t[o]):e[o]=t[o]},m.prototype.setLocale=function(e){function t(e,o){for(var i in e)"object"==_typeof(e[i])?(o[i]||(o[i]={}),t(e[i],o[i])):o[i]=e[i]}var o=this;if(e=e||"default",!0===e&&navigator.language&&(e=navigator.language.toLowerCase()),e&&!o.langList[e]){var i=e.split("-")[0];o.langList[i]?(console.warn("Localization Error - Exact matching locale not found, using closest match: ",e,i),e=i):(console.warn("Localization Error - Matching locale not found, using default: ",e),e="default")}o.locale=e,o.lang=h.prototype.helpers.deepClone(o.langList.default||{}),"default"!=e&&t(o.langList[e],o.lang),o.table.options.localized.call(o.table,o.locale,o.lang),o._executeBindings()},m.prototype.getLocale=function(e){return self.locale},m.prototype.getLang=function(e){return e?this.langList[e]:this.lang},m.prototype.getText=function(e,t){var e=t?e+"|"+t:e,o=e.split("|");return this._getLangElement(o,this.locale)||""},m.prototype._getLangElement=function(e,t){var o=this,i=o.lang;return e.forEach(function(e){var t;i&&(t=i[e],i=void 0!==t&&t)}),i},m.prototype.bind=function(e,t){this.bindings[e]||(this.bindings[e]=[]),this.bindings[e].push(t),t(this.getText(e),this.lang)},m.prototype._executeBindings=function(){var e=this;for(var t in e.bindings)!function(t){e.bindings[t].forEach(function(o){o(e.getText(t),e.lang)})}(t)},m.prototype.langs={default:{groups:{item:"item",items:"items"},columns:{},ajax:{loading:"Loading",error:"Error"},pagination:{page_size:"Page Size",page_title:"Show Page",first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page",all:"All"},headerFilters:{default:"filter column...",columns:{}}}},h.prototype.registerModule("localize",m);var f=function(e){this.table=e};f.prototype.getConnections=function(e){var t,o=this,i=[];return t=h.prototype.comms.lookupTable(e),t.forEach(function(e){o.table!==e&&i.push(e)}),i},f.prototype.send=function(e,t,o,i){var n=this,s=this.getConnections(e);s.forEach(function(e){e.tableComms(n.table.element,t,o,i)}),!s.length&&e&&console.warn("Table Connection Error - No tables matching selector found",e)},f.prototype.receive=function(e,t,o,i){if(this.table.modExists(t))return this.table.modules[t].commsReceived(e,o,i);console.warn("Inter-table Comms Error - no such module:",t)},h.prototype.registerModule("comms",f);var g=function(e){this.table=e,this.allowedTypes=["","data","download","clipboard","print","htmlOutput"]};g.prototype.initializeColumn=function(e){var t=this,o=!1,i={};this.allowedTypes.forEach(function(n){var s,a="accessor"+(n.charAt(0).toUpperCase()+n.slice(1));e.definition[a]&&(s=t.lookupAccessor(e.definition[a]))&&(o=!0,i[a]={accessor:s,params:e.definition[a+"Params"]||{}})}),o&&(e.modules.accessor=i)},g.prototype.lookupAccessor=function(e){var t=!1;switch(void 0===e?"undefined":_typeof(e)){case"string":this.accessors[e]?t=this.accessors[e]:console.warn("Accessor Error - No such accessor found, ignoring: ",e);break;case"function":t=e}return t},g.prototype.transformRow=function(e,t){var o="accessor"+(t.charAt(0).toUpperCase()+t.slice(1)),i=e.getComponent(),n=h.prototype.helpers.deepClone(e.data||{});return this.table.columnManager.traverse(function(e){var s,a,r,l;e.modules.accessor&&(a=e.modules.accessor[o]||e.modules.accessor.accessor||!1)&&"undefined"!=(s=e.getFieldValue(n))&&(l=e.getComponent(),r="function"==typeof a.params?a.params(s,n,t,l,i):a.params,e.setFieldValue(n,a.accessor(s,n,t,r,l,i)))}),n},g.prototype.accessors={},h.prototype.registerModule("accessor",g);var b=function(e){this.table=e,this.config=!1,this.url="",this.urlGenerator=!1,this.params=!1,this.loaderElement=this.createLoaderElement(),this.msgElement=this.createMsgElement(),this.loadingElement=!1,this.errorElement=!1,this.loaderPromise=!1,this.progressiveLoad=!1,this.loading=!1,this.requestOrder=0};b.prototype.initialize=function(){var e;this.loaderElement.appendChild(this.msgElement),this.table.options.ajaxLoaderLoading&&("string"==typeof this.table.options.ajaxLoaderLoading?(e=document.createElement("template"),e.innerHTML=this.table.options.ajaxLoaderLoading.trim(),this.loadingElement=e.content.firstChild):this.loadingElement=this.table.options.ajaxLoaderLoading),this.loaderPromise=this.table.options.ajaxRequestFunc||this.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||this.defaultURLGenerator,this.table.options.ajaxLoaderError&&("string"==typeof this.table.options.ajaxLoaderError?(e=document.createElement("template"),e.innerHTML=this.table.options.ajaxLoaderError.trim(),this.errorElement=e.content.firstChild):this.errorElement=this.table.options.ajaxLoaderError),this.table.options.ajaxParams&&this.setParams(this.table.options.ajaxParams),this.table.options.ajaxConfig&&this.setConfig(this.table.options.ajaxConfig),this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.table.options.ajaxProgressiveLoad&&(this.table.options.pagination?(this.progressiveLoad=!1,console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time")):this.table.modExists("page")?(this.progressiveLoad=this.table.options.ajaxProgressiveLoad,this.table.modules.page.initializeProgressive(this.progressiveLoad)):console.error("Pagination plugin is required for progressive ajax loading"))},b.prototype.createLoaderElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-loader"),e},b.prototype.createMsgElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-loader-msg"),e.setAttribute("role","alert"),e},b.prototype.setParams=function(e,t){if(t){this.params=this.params||{};for(var o in e)this.params[o]=e[o]}else this.params=e},b.prototype.getParams=function(){return this.params||{}},b.prototype.setConfig=function(e){if(this._loadDefaultConfig(),"string"==typeof e)this.config.method=e;else for(var t in e)this.config[t]=e[t]},b.prototype._loadDefaultConfig=function(e){var t=this;if(!t.config||e){t.config={};for(var o in t.defaultConfig)t.config[o]=t.defaultConfig[o]}},b.prototype.setUrl=function(e){this.url=e},b.prototype.getUrl=function(){return this.url},b.prototype.loadData=function(e,t){return this.progressiveLoad?this._loadDataProgressive():this._loadDataStandard(e,t)},b.prototype.nextPage=function(e){var t;this.loading||(t=this.table.options.ajaxProgressiveLoadScrollMargin||2*this.table.rowManager.getElement().clientHeight,e<t&&this.table.modules.page.nextPage().then(function(){}).catch(function(){}))},b.prototype.blockActiveRequest=function(){this.requestOrder++},b.prototype._loadDataProgressive=function(){return this.table.rowManager.setData([]),this.table.modules.page.setPage(1)},b.prototype._loadDataStandard=function(e,t){var o=this;return new Promise(function(i,n){o.sendRequest(e).then(function(s){o.table.rowManager.setData(s,e,t).then(function(){i()}).catch(function(e){n(e)})}).catch(function(e){n(e)})})},b.prototype.generateParamsList=function(e,t){var o=this,i=[];if(t=t||"",Array.isArray(e))e.forEach(function(e,n){i=i.concat(o.generateParamsList(e,t?t+"["+n+"]":n))});else if("object"===(void 0===e?"undefined":_typeof(e)))for(var n in e)i=i.concat(o.generateParamsList(e[n],t?t+"["+n+"]":n));else i.push({key:t,value:e});return i},b.prototype.serializeParams=function(e){var t=this.generateParamsList(e),o=[];return t.forEach(function(e){o.push(encodeURIComponent(e.key)+"="+encodeURIComponent(e.value))}),o.join("&")},b.prototype.sendRequest=function(e){var t,o=this,i=this,n=i.url;return i.requestOrder++,t=i.requestOrder,i._loadDefaultConfig(),new Promise(function(s,a){!1!==i.table.options.ajaxRequesting.call(o.table,i.url,i.params)?(i.loading=!0,e||i.showLoader(),o.loaderPromise(n,i.config,i.params).then(function(e){t===i.requestOrder?(i.table.options.ajaxResponse&&(e=i.table.options.ajaxResponse.call(i.table,i.url,i.params,e)),s(e),i.hideLoader(),i.loading=!1):console.warn("Ajax Response Blocked - An active ajax request was blocked by an attempt to change table data while the request was being made")}).catch(function(e){console.error("Ajax Load Error: ",e),i.table.options.ajaxError.call(i.table,e),i.showError(),setTimeout(function(){i.hideLoader()},3e3),i.loading=!1,a()})):a()})},b.prototype.showLoader=function(){if("function"==typeof this.table.options.ajaxLoader?this.table.options.ajaxLoader():this.table.options.ajaxLoader){for(this.hideLoader();this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.remove("tabulator-error"),this.msgElement.classList.add("tabulator-loading"),this.loadingElement?this.msgElement.appendChild(this.loadingElement):this.msgElement.innerHTML=this.table.modules.localize.getText("ajax|loading"),this.table.element.appendChild(this.loaderElement)}},b.prototype.showError=function(){for(this.hideLoader();this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.remove("tabulator-loading"),this.msgElement.classList.add("tabulator-error"),this.errorElement?this.msgElement.appendChild(this.errorElement):this.msgElement.innerHTML=this.table.modules.localize.getText("ajax|error"),this.table.element.appendChild(this.loaderElement)},b.prototype.hideLoader=function(){this.loaderElement.parentNode&&this.loaderElement.parentNode.removeChild(this.loaderElement)},b.prototype.defaultConfig={method:"GET"},b.prototype.defaultURLGenerator=function(e,t,o){return e&&o&&Object.keys(o).length&&(t.method&&"get"!=t.method.toLowerCase()||(t.method="get",e+=(e.includes("?")?"&":"?")+this.serializeParams(o))),e},b.prototype.defaultLoaderPromise=function(e,t,o){var i,n=this;return new Promise(function(s,a){if(e=n.urlGenerator(e,t,o),"GET"!=t.method.toUpperCase())if(i="object"===_typeof(n.table.options.ajaxContentType)?n.table.options.ajaxContentType:n.contentTypeFormatters[n.table.options.ajaxContentType]){for(var r in i.headers)t.headers||(t.headers={}),void 0===t.headers[r]&&(t.headers[r]=i.headers[r]);t.body=i.body.call(n,e,t,o)}else console.warn("Ajax Error - Invalid ajaxContentType value:",n.table.options.ajaxContentType);e?(void 0===t.headers&&(t.headers={}),void 0===t.headers.Accept&&(t.headers.Accept="application/json"),void 0===t.headers["X-Requested-With"]&&(t.headers["X-Requested-With"]="XMLHttpRequest"),void 0===t.mode&&(t.mode="cors"),"cors"==t.mode?(void 0===t.headers["Access-Control-Allow-Origin"]&&(t.headers["Access-Control-Allow-Origin"]=window.location.origin),void 0===t.credentials&&(t.credentials="same-origin")):void 0===t.credentials&&(t.credentials="include"),fetch(e,t).then(function(e){e.ok?e.json().then(function(e){s(e)}).catch(function(e){a(e),console.warn("Ajax Load Error - Invalid JSON returned",e)}):(console.error("Ajax Load Error - Connection Error: "+e.status,e.statusText),a(e))}).catch(function(e){console.error("Ajax Load Error - Connection Error: ",e),a(e)})):(console.warn("Ajax Load Error - No URL Set"),s([]))})},b.prototype.contentTypeFormatters={json:{headers:{"Content-Type":"application/json"},body:function(e,t,o){return JSON.stringify(o)}},form:{headers:{},body:function(e,t,o){var i=this.generateParamsList(o),n=new FormData;return i.forEach(function(e){n.append(e.key,e.value)}),n}}},h.prototype.registerModule("ajax",b);var v=function(e){this._row=e};v.prototype.getData=function(e){return this._row.getData(e)},v.prototype.getElement=function(){return this._row.getElement()},v.prototype.getTable=function(){return this._row.table},v.prototype.getCells=function(){var e=[];return this._row.getCells().forEach(function(t){e.push(t.getComponent())}),e},v.prototype.getCell=function(e){var t=this._row.getCell(e);return!!t&&t.getComponent()},v.prototype._getSelf=function(){return this._row};var y=function(e){this.table=e,this.topCalcs=[],this.botCalcs=[],this.genColumn=!1,this.topElement=this.createElement(),this.botElement=this.createElement(),this.topRow=!1,this.botRow=!1,this.topInitialized=!1,this.botInitialized=!1,this.initialize()};y.prototype.createElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-calcs-holder"),e},y.prototype.initialize=function(){this.genColumn=new n({field:"value"},this)},y.prototype.registerColumnField=function(){},y.prototype.initializeColumn=function(e){var t=e.definition,o={topCalcParams:t.topCalcParams||{},botCalcParams:t.bottomCalcParams||{}};if(t.topCalc){switch(_typeof(t.topCalc)){case"string":this.calculations[t.topCalc]?o.topCalc=this.calculations[t.topCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",t.topCalc);break;case"function":o.topCalc=t.topCalc}o.topCalc&&(e.modules.columnCalcs=o,this.topCalcs.push(e),"group"!=this.table.options.columnCalcs&&this.initializeTopRow())}if(t.bottomCalc){switch(_typeof(t.bottomCalc)){case"string":this.calculations[t.bottomCalc]?o.botCalc=this.calculations[t.bottomCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",t.bottomCalc);break;case"function":o.botCalc=t.bottomCalc}o.botCalc&&(e.modules.columnCalcs=o,this.botCalcs.push(e),"group"!=this.table.options.columnCalcs&&this.initializeBottomRow())}},y.prototype.removeCalcs=function(){var e=!1;this.topInitialized&&(this.topInitialized=!1,this.topElement.parentNode.removeChild(this.topElement),e=!0),this.botInitialized&&(this.botInitialized=!1,this.table.footerManager.remove(this.botElement),e=!0),e&&this.table.rowManager.adjustTableSize()},y.prototype.initializeTopRow=function(){this.topInitialized||(this.table.columnManager.getElement().insertBefore(this.topElement,this.table.columnManager.headersElement.nextSibling),this.topInitialized=!0)},y.prototype.initializeBottomRow=function(){this.botInitialized||(this.table.footerManager.prepend(this.botElement),this.botInitialized=!0)},y.prototype.scrollHorizontal=function(e){this.table.columnManager.getElement().scrollWidth,this.table.element.clientWidth;this.botInitialized&&this.botRow&&(this.botRow.getElement().style.marginLeft=-e+"px")},y.prototype.recalc=function(e){var t;if(this.topInitialized||this.botInitialized){if(this.rowsToData(e),this.topInitialized){for(this.topRow&&this.topRow.deleteCells(),t=this.generateRow("top",this.rowsToData(e)),this.topRow=t;this.topElement.firstChild;)this.topElement.removeChild(this.topElement.firstChild);this.topElement.appendChild(t.getElement()),t.initialize(!0)}if(this.botInitialized){for(this.botRow&&this.botRow.deleteCells(),t=this.generateRow("bottom",this.rowsToData(e)),this.botRow=t;this.botElement.firstChild;)this.botElement.removeChild(this.botElement.firstChild);this.botElement.appendChild(t.getElement()),t.initialize(!0)}this.table.rowManager.adjustTableSize(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()}},y.prototype.recalcRowGroup=function(e){this.recalcGroup(this.table.modules.groupRows.getRowGroup(e))},y.prototype.recalcAll=function(){var e=this;if((this.topCalcs.length||this.botCalcs.length)&&("group"!==this.table.options.columnCalcs&&this.recalc(this.table.rowManager.activeRows),this.table.options.groupBy&&"table"!==this.table.options.columnCalcs)){table.modules.groupRows.getChildGroups().forEach(function(t){e.recalcGroup(t)})}},y.prototype.recalcGroup=function(e){var t,o;e&&e.calcs&&(e.calcs.bottom&&(t=this.rowsToData(e.rows),o=this.generateRowData("bottom",t),e.calcs.bottom.updateData(o),e.calcs.bottom.reinitialize()),e.calcs.top&&(t=this.rowsToData(e.rows),o=this.generateRowData("top",t),e.calcs.top.updateData(o),e.calcs.top.reinitialize()))},y.prototype.generateTopRow=function(e){return this.generateRow("top",this.rowsToData(e))},y.prototype.generateBottomRow=function(e){return this.generateRow("bottom",this.rowsToData(e))},y.prototype.rowsToData=function(e){var t=this,o=[];return e.forEach(function(e){if(o.push(e.getData()),t.table.options.dataTree&&t.table.options.dataTreeChildColumnCalcs&&e.modules.dataTree.open){var i=t.rowsToData(t.table.modules.dataTree.getFilteredTreeChildren(e));o=o.concat(i)}}),o},y.prototype.generateRow=function(e,t){var o,i=this,n=this.generateRowData(e,t);return i.table.modExists("mutator")&&i.table.modules.mutator.disable(),o=new l(n,this,"calc"),i.table.modExists("mutator")&&i.table.modules.mutator.enable(),o.getElement().classList.add("tabulator-calcs","tabulator-calcs-"+e),o.component=!1,o.getComponent=function(){return this.component||(this.component=new v(this)),this.component},o.generateCells=function(){var t=[];i.table.columnManager.columnsByIndex.forEach(function(n){i.genColumn.setField(n.getField()),i.genColumn.hozAlign=n.hozAlign,n.definition[e+"CalcFormatter"]&&i.table.modExists("format")?i.genColumn.modules.format={formatter:i.table.modules.format.getFormatter(n.definition[e+"CalcFormatter"]),params:n.definition[e+"CalcFormatterParams"]||{}}:i.genColumn.modules.format={formatter:i.table.modules.format.getFormatter("plaintext"),params:{}},i.genColumn.definition.cssClass=n.definition.cssClass;var s=new u(i.genColumn,o);s.getElement(),s.column=n,s.setWidth(),n.cells.push(s),t.push(s),
-n.visible||s.hide()}),this.cells=t},o},y.prototype.generateRowData=function(e,t){var o,i,n={},s="top"==e?this.topCalcs:this.botCalcs,a="top"==e?"topCalc":"botCalc";return s.forEach(function(e){var s=[];e.modules.columnCalcs&&e.modules.columnCalcs[a]&&(t.forEach(function(t){s.push(e.getFieldValue(t))}),i=a+"Params",o="function"==typeof e.modules.columnCalcs[i]?e.modules.columnCalcs[i](s,t):e.modules.columnCalcs[i],e.setFieldValue(n,e.modules.columnCalcs[a](s,t,o)))}),n},y.prototype.hasTopCalcs=function(){return!!this.topCalcs.length},y.prototype.hasBottomCalcs=function(){return!!this.botCalcs.length},y.prototype.redraw=function(){this.topRow&&this.topRow.normalizeHeight(!0),this.botRow&&this.botRow.normalizeHeight(!0)},y.prototype.getResults=function(){var e,t=this,o={};return this.table.options.groupBy&&this.table.modExists("groupRows")?(e=this.table.modules.groupRows.getGroups(!0),e.forEach(function(e){o[e.getKey()]=t.getGroupResults(e)})):o={top:this.topRow?this.topRow.getData():{},bottom:this.botRow?this.botRow.getData():{}},o},y.prototype.getGroupResults=function(e){var t=this,o=e._getSelf(),i=e.getSubGroups(),n={};return i.forEach(function(e){n[e.getKey()]=t.getGroupResults(e)}),{top:o.calcs.top?o.calcs.top.getData():{},bottom:o.calcs.bottom?o.calcs.bottom.getData():{},groups:n}},y.prototype.calculations={avg:function(e,t,o){var i=0,n=void 0!==o.precision?o.precision:2;return e.length&&(i=e.reduce(function(e,t){return Number(e)+Number(t)}),i/=e.length,i=!1!==n?i.toFixed(n):i),parseFloat(i).toString()},max:function(e,t,o){var i=null,n=void 0!==o.precision&&o.precision;return e.forEach(function(e){((e=Number(e))>i||null===i)&&(i=e)}),null!==i?!1!==n?i.toFixed(n):i:""},min:function(e,t,o){var i=null,n=void 0!==o.precision&&o.precision;return e.forEach(function(e){((e=Number(e))<i||null===i)&&(i=e)}),null!==i?!1!==n?i.toFixed(n):i:""},sum:function(e,t,o){var i=0,n=void 0!==o.precision&&o.precision;return e.length&&e.forEach(function(e){e=Number(e),i+=isNaN(e)?0:Number(e)}),!1!==n?i.toFixed(n):i},concat:function(e,t,o){var i=0;return e.length&&(i=e.reduce(function(e,t){return String(e)+String(t)})),i},count:function(e,t,o){var i=0;return e.length&&e.forEach(function(e){e&&i++}),i}},h.prototype.registerModule("columnCalcs",y);var w=function(e){this.table=e,this.mode=!0,this.pasteParser=function(){},this.pasteAction=function(){},this.customSelection=!1,this.rowRange=!1,this.blocked=!0};w.prototype.initialize=function(){var e=this;this.mode=this.table.options.clipboard,this.rowRange=this.table.options.clipboardCopyRowRange,!0!==this.mode&&"copy"!==this.mode||this.table.element.addEventListener("copy",function(t){var o,i,n;if(!e.blocked){if(t.preventDefault(),e.customSelection)o=e.customSelection,e.table.options.clipboardCopyFormatter&&(o=e.table.options.clipboardCopyFormatter("plain",o));else{var n=e.table.modules.export.generateExportList(e.table.options.clipboardCopyConfig,e.table.options.clipboardCopyStyled,e.rowRange,"clipboard");i=e.table.modules.export.genereateHTMLTable(n),o=i?e.generatePlainContent(n):"",e.table.options.clipboardCopyFormatter&&(o=e.table.options.clipboardCopyFormatter("plain",o),i=e.table.options.clipboardCopyFormatter("html",i))}window.clipboardData&&window.clipboardData.setData?window.clipboardData.setData("Text",o):t.clipboardData&&t.clipboardData.setData?(t.clipboardData.setData("text/plain",o),i&&t.clipboardData.setData("text/html",i)):t.originalEvent&&t.originalEvent.clipboardData.setData&&(t.originalEvent.clipboardData.setData("text/plain",o),i&&t.originalEvent.clipboardData.setData("text/html",i)),e.table.options.clipboardCopied.call(e.table,o,i),e.reset()}}),!0!==this.mode&&"paste"!==this.mode||this.table.element.addEventListener("paste",function(t){e.paste(t)}),this.setPasteParser(this.table.options.clipboardPasteParser),this.setPasteAction(this.table.options.clipboardPasteAction)},w.prototype.reset=function(){this.blocked=!0,this.customSelection=!1},w.prototype.generatePlainContent=function(e){var t=[];return e.forEach(function(e){var o=[];e.columns.forEach(function(t){var i="";if(t)if("group"===e.type&&(t.value=t.component.getKey()),null===t.value)i="";else switch(_typeof(t.value)){case"object":i=JSON.stringify(t.value);break;case"undefined":i="";break;default:i=t.value}o.push(i)}),t.push(o.join("\t"))}),t.join("\n")},w.prototype.copy=function(e,t){var e,o,i;this.blocked=!1,this.customSelection=!1,!0!==this.mode&&"copy"!==this.mode||(this.rowRange=e||this.table.options.clipboardCopyRowRange,void 0!==window.getSelection&&void 0!==document.createRange?(e=document.createRange(),e.selectNodeContents(this.table.element),o=window.getSelection(),o.toString()&&t&&(this.customSelection=o.toString()),o.removeAllRanges(),o.addRange(e)):void 0!==document.selection&&void 0!==document.body.createTextRange&&(i=document.body.createTextRange(),i.moveToElementText(this.table.element),i.select()),document.execCommand("copy"),o&&o.removeAllRanges())},w.prototype.setPasteAction=function(e){switch(void 0===e?"undefined":_typeof(e)){case"string":this.pasteAction=this.pasteActions[e],this.pasteAction||console.warn("Clipboard Error - No such paste action found:",e);break;case"function":this.pasteAction=e}},w.prototype.setPasteParser=function(e){switch(void 0===e?"undefined":_typeof(e)){case"string":this.pasteParser=this.pasteParsers[e],this.pasteParser||console.warn("Clipboard Error - No such paste parser found:",e);break;case"function":this.pasteParser=e}},w.prototype.paste=function(e){var t,o,i;this.checkPaseOrigin(e)&&(t=this.getPasteData(e),o=this.pasteParser.call(this,t),o?(e.preventDefault(),this.table.modExists("mutator")&&(o=this.mutateData(o)),i=this.pasteAction.call(this,o),this.table.options.clipboardPasted.call(this.table,t,o,i)):this.table.options.clipboardPasteError.call(this.table,t))},w.prototype.mutateData=function(e){var t=this,o=[];return Array.isArray(e)?e.forEach(function(e){o.push(t.table.modules.mutator.transformRow(e,"clipboard"))}):o=e,o},w.prototype.checkPaseOrigin=function(e){var t=!0;return("DIV"!=e.target.tagName||this.table.modules.edit.currentCell)&&(t=!1),t},w.prototype.getPasteData=function(e){var t;return window.clipboardData&&window.clipboardData.getData?t=window.clipboardData.getData("Text"):e.clipboardData&&e.clipboardData.getData?t=e.clipboardData.getData("text/plain"):e.originalEvent&&e.originalEvent.clipboardData.getData&&(t=e.originalEvent.clipboardData.getData("text/plain")),t},w.prototype.pasteParsers={table:function(e){var t=[],o=!0,i=this.table.columnManager.columns,n=[],s=[];return e=e.split("\n"),e.forEach(function(e){t.push(e.split("\t"))}),!(!t.length||1===t.length&&t[0].length<2)&&(!0,t[0].forEach(function(e){var t=i.find(function(t){return e&&t.definition.title&&e.trim()&&t.definition.title.trim()===e.trim()});t?n.push(t):o=!1}),o||(o=!0,n=[],t[0].forEach(function(e){var t=i.find(function(t){return e&&t.field&&e.trim()&&t.field.trim()===e.trim()});t?n.push(t):o=!1}),o||(n=this.table.columnManager.columnsByIndex)),o&&t.shift(),t.forEach(function(e){var t={};e.forEach(function(e,o){n[o]&&(t[n[o].field]=e)}),s.push(t)}),s)}},w.prototype.pasteActions={replace:function(e){return this.table.setData(e)},update:function(e){return this.table.updateOrAddData(e)},insert:function(e){return this.table.addData(e)}},h.prototype.registerModule("clipboard",w);var E=function(e){this.table=e,this.indent=10,this.field="",this.collapseEl=null,this.expandEl=null,this.branchEl=null,this.elementField=!1,this.startOpen=function(){},this.displayIndex=0};E.prototype.initialize=function(){var e=null,t=this.table.columnManager.getFirstVisibileColumn(),o=this.table.options;switch(this.field=o.dataTreeChildField,this.indent=o.dataTreeChildIndent,this.elementField=o.dataTreeElementColumn||!!t&&t.field,o.dataTreeBranchElement&&(!0===o.dataTreeBranchElement?(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch")):"string"==typeof o.dataTreeBranchElement?(e=document.createElement("div"),e.innerHTML=o.dataTreeBranchElement,this.branchEl=e.firstChild):this.branchEl=o.dataTreeBranchElement),o.dataTreeCollapseElement?"string"==typeof o.dataTreeCollapseElement?(e=document.createElement("div"),e.innerHTML=o.dataTreeCollapseElement,this.collapseEl=e.firstChild):this.collapseEl=o.dataTreeCollapseElement:(this.collapseEl=document.createElement("div"),this.collapseEl.classList.add("tabulator-data-tree-control"),this.collapseEl.tabIndex=0,this.collapseEl.innerHTML="<div class='tabulator-data-tree-control-collapse'></div>"),o.dataTreeExpandElement?"string"==typeof o.dataTreeExpandElement?(e=document.createElement("div"),e.innerHTML=o.dataTreeExpandElement,this.expandEl=e.firstChild):this.expandEl=o.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.tabIndex=0,this.expandEl.innerHTML="<div class='tabulator-data-tree-control-expand'></div>"),_typeof(o.dataTreeStartExpanded)){case"boolean":this.startOpen=function(e,t){return o.dataTreeStartExpanded};break;case"function":this.startOpen=o.dataTreeStartExpanded;break;default:this.startOpen=function(e,t){return o.dataTreeStartExpanded[t]}}},E.prototype.initializeRow=function(e){var t=e.getData()[this.field],o=Array.isArray(t),i=o||!o&&"object"===(void 0===t?"undefined":_typeof(t))&&null!==t;!i&&e.modules.dataTree&&e.modules.dataTree.branchEl&&e.modules.dataTree.branchEl.parentNode.removeChild(e.modules.dataTree.branchEl),!i&&e.modules.dataTree&&e.modules.dataTree.controlEl&&e.modules.dataTree.controlEl.parentNode.removeChild(e.modules.dataTree.controlEl),e.modules.dataTree={index:e.modules.dataTree?e.modules.dataTree.index:0,open:!!i&&(e.modules.dataTree?e.modules.dataTree.open:this.startOpen(e.getComponent(),0)),controlEl:!(!e.modules.dataTree||!i)&&e.modules.dataTree.controlEl,branchEl:!(!e.modules.dataTree||!i)&&e.modules.dataTree.branchEl,parent:!!e.modules.dataTree&&e.modules.dataTree.parent,children:i}},E.prototype.layoutRow=function(e){var t=this.elementField?e.getCell(this.elementField):e.getCells()[0],o=t.getElement(),i=e.modules.dataTree;i.branchEl&&(i.branchEl.parentNode&&i.branchEl.parentNode.removeChild(i.branchEl),i.branchEl=!1),i.controlEl&&(i.controlEl.parentNode&&i.controlEl.parentNode.removeChild(i.controlEl),i.controlEl=!1),this.generateControlElement(e,o),e.element.classList.add("tabulator-tree-level-"+i.index),i.index&&(this.branchEl?(i.branchEl=this.branchEl.cloneNode(!0),o.insertBefore(i.branchEl,o.firstChild),this.table.rtl?i.branchEl.style.marginRight=(i.branchEl.offsetWidth+i.branchEl.style.marginLeft)*(i.index-1)+i.index*this.indent+"px":i.branchEl.style.marginLeft=(i.branchEl.offsetWidth+i.branchEl.style.marginRight)*(i.index-1)+i.index*this.indent+"px"):this.table.rtl?o.style.paddingRight=parseInt(window.getComputedStyle(o,null).getPropertyValue("padding-right"))+i.index*this.indent+"px":o.style.paddingLeft=parseInt(window.getComputedStyle(o,null).getPropertyValue("padding-left"))+i.index*this.indent+"px")},E.prototype.generateControlElement=function(e,t){var o=this,i=e.modules.dataTree,t=t||e.getCells()[0].getElement(),n=i.controlEl;!1!==i.children&&(i.open?(i.controlEl=this.collapseEl.cloneNode(!0),i.controlEl.addEventListener("click",function(t){t.stopPropagation(),o.collapseRow(e)})):(i.controlEl=this.expandEl.cloneNode(!0),i.controlEl.addEventListener("click",function(t){t.stopPropagation(),o.expandRow(e)})),i.controlEl.addEventListener("mousedown",function(e){e.stopPropagation()}),n&&n.parentNode===t?n.parentNode.replaceChild(i.controlEl,n):t.insertBefore(i.controlEl,t.firstChild))},E.prototype.setDisplayIndex=function(e){this.displayIndex=e},E.prototype.getDisplayIndex=function(){return this.displayIndex},E.prototype.getRows=function(e){var t=this,o=[];return e.forEach(function(e,i){var n,s;o.push(e),e instanceof l&&(n=e.modules.dataTree.children,n.index||!1===n.children||(s=t.getChildren(e),s.forEach(function(e){o.push(e)})))}),o},E.prototype.getChildren=function(e){var t=this,o=e.modules.dataTree,i=[],n=[];return!1!==o.children&&o.open&&(Array.isArray(o.children)||(o.children=this.generateChildren(e)),i=this.table.modExists("filter")&&this.table.options.dataTreeFilter?this.table.modules.filter.filter(o.children):o.children,this.table.modExists("sort")&&this.table.options.dataTreeSort&&this.table.modules.sort.sort(i),i.forEach(function(e){n.push(e),t.getChildren(e).forEach(function(e){n.push(e)})})),n},E.prototype.generateChildren=function(e){var t=this,o=[],i=e.getData()[this.field];return Array.isArray(i)||(i=[i]),i.forEach(function(i){var n=new l(i||{},t.table.rowManager);n.modules.dataTree.index=e.modules.dataTree.index+1,n.modules.dataTree.parent=e,n.modules.dataTree.children&&(n.modules.dataTree.open=t.startOpen(n.getComponent(),n.modules.dataTree.index)),o.push(n)}),o},E.prototype.expandRow=function(e,t){var o=e.modules.dataTree;!1!==o.children&&(o.open=!0,e.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowExpanded(e.getComponent(),e.modules.dataTree.index))},E.prototype.collapseRow=function(e){var t=e.modules.dataTree;!1!==t.children&&(t.open=!1,e.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowCollapsed(e.getComponent(),e.modules.dataTree.index))},E.prototype.toggleRow=function(e){var t=e.modules.dataTree;!1!==t.children&&(t.open?this.collapseRow(e):this.expandRow(e))},E.prototype.getTreeParent=function(e){return!!e.modules.dataTree.parent&&e.modules.dataTree.parent.getComponent()},E.prototype.getFilteredTreeChildren=function(e){var t,o=e.modules.dataTree,i=[];return o.children&&(Array.isArray(o.children)||(o.children=this.generateChildren(e)),t=this.table.modExists("filter")&&this.table.options.dataTreeFilter?this.table.modules.filter.filter(o.children):o.children,t.forEach(function(e){e instanceof l&&i.push(e)})),i},E.prototype.rowDelete=function(e){var t,o=e.modules.dataTree.parent;o&&(t=this.findChildIndex(e,o),!1!==t&&o.data[this.field].splice(t,1),o.data[this.field].length||delete o.data[this.field],this.initializeRow(o),this.layoutRow(o)),this.table.rowManager.refreshActiveData("tree",!1,!0)},E.prototype.addTreeChildRow=function(e,t,o,i){var n=!1;"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(e.data[this.field])||(e.data[this.field]=[],e.modules.dataTree.open=this.startOpen(e.getComponent(),e.modules.dataTree.index)),void 0!==i&&!1!==(n=this.findChildIndex(i,e))&&e.data[this.field].splice(o?n:n+1,0,t),!1===n&&(o?e.data[this.field].unshift(t):e.data[this.field].push(t)),this.initializeRow(e),this.layoutRow(e),this.table.rowManager.refreshActiveData("tree",!1,!0)},E.prototype.findChildIndex=function(e,t){var o=this,i=!1;return"object"==(void 0===e?"undefined":_typeof(e))?e instanceof l?i=e.data:e instanceof r?i=e._getSelf().data:"undefined"!=typeof HTMLElement&&e instanceof HTMLElement&&t.modules.dataTree&&(i=t.modules.dataTree.children.find(function(t){return t instanceof l&&t.element===e}))&&(i=i.data):i=void 0!==e&&null!==e&&t.data[this.field].find(function(t){return t.data[o.table.options.index]==e}),i&&(Array.isArray(t.data[this.field])&&(i=t.data[this.field].indexOf(i)),-1==i&&(i=!1)),i},E.prototype.getTreeChildren=function(e,t,o){var i=this,n=e.modules.dataTree,s=[];return n.children&&(Array.isArray(n.children)||(n.children=this.generateChildren(e)),n.children.forEach(function(e){e instanceof l&&(s.push(t?e.getComponent():e),o&&(s=s.concat(i.getTreeChildren(e,t,o))))})),s},E.prototype.checkForRestyle=function(e){e.row.cells.indexOf(e)||e.row.reinitialize()},E.prototype.getChildField=function(){return this.field},E.prototype.redrawNeeded=function(e){return!!this.field&&void 0!==e[this.field]||!!this.elementField&&void 0!==e[this.elementField]},h.prototype.registerModule("dataTree",E);var C=function(e){this.table=e};C.prototype.download=function(e,t,o,i,n){function s(o,i){n?!0===n?a.triggerDownload(o,i,e,t,!0):n(o):a.triggerDownload(o,i,e,t)}var a=this,r=!1;if("function"==typeof e?r=e:a.downloaders[e]?r=a.downloaders[e]:console.warn("Download Error - No such download type found: ",e),r){var l=this.generateExportList(i);r.call(this.table,l,o||{},s)}},C.prototype.generateExportList=function(e){var t=this.table.modules.export.generateExportList(this.table.options.downloadConfig,!1,e||this.table.options.downloadRowRange,"download"),o=this.table.options.groupHeaderDownload;return o&&!Array.isArray(o)&&(o=[o]),t.forEach(function(e){var t;"group"===e.type&&(t=e.columns[0],o&&o[e.indent]&&(t.value=o[e.indent](t.value,e.component._group.getRowCount(),e.component._group.getData(),e.component)))}),t},C.prototype.triggerDownload=function(e,t,o,i,n){var s=document.createElement("a"),a=new Blob([e],{type:t}),i=i||"Tabulator."+("function"==typeof o?"txt":o);(a=this.table.options.downloadReady.call(this.table,e,a))&&(n?window.open(window.URL.createObjectURL(a)):navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(a,i):(s.setAttribute("href",window.URL.createObjectURL(a)),s.setAttribute("download",i),s.style.display="none",document.body.appendChild(s),s.click(),document.body.removeChild(s)),this.table.options.downloadComplete&&this.table.options.downloadComplete())},C.prototype.commsReceived=function(e,t,o){switch(t){case"intercept":this.download(o.type,"",o.options,o.active,o.intercept)}},C.prototype.downloaders={csv:function(e,t,o){var i=t&&t.delimiter?t.delimiter:",",n=[],s=[];e.forEach(function(e){var t=[];switch(e.type){case"group":console.warn("Download Warning - CSV downloader cannot process row groups");break;case"calc":console.warn("Download Warning - CSV downloader cannot process column calculations");break;case"header":e.columns.forEach(function(e,t){e&&1===e.depth&&(s[t]=void 0===e.value||null===e.value?"":'"'+String(e.value).split('"').join('""')+'"')});break;case"row":e.columns.forEach(function(e){if(e){switch(_typeof(e.value)){case"object":e.value=JSON.stringify(e.value);break;case"undefined":case"null":e.value=""}t.push('"'+String(e.value).split('"').join('""')+'"')}}),n.push(t.join(i))}}),s.length&&n.unshift(s.join(i)),n=n.join("\n"),t.bom&&(n="\ufeff"+n),o(n,"text/csv")},json:function(e,t,o){var i=[];e.forEach(function(e){var t={};switch(e.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":e.columns.forEach(function(e){e&&(t[e.component.getField()]=e.value)}),i.push(t)}}),i=JSON.stringify(i,null,"\t"),o(i,"application/json")},pdf:function(e,t,o){function i(e,t){var o=[];return e.columns.forEach(function(e){var i;if(e){switch(_typeof(e.value)){case"object":e.value=JSON.stringify(e.value);break;case"undefined":case"null":e.value=""}i={content:e.value,colSpan:e.width,rowSpan:e.height},t&&(i.styles=t),o.push(i)}else o.push("")}),o}var n=[],s=[],a={},r=t.rowGroupStyles||{fontStyle:"bold",fontSize:12,cellPadding:6,fillColor:220},l=t.rowCalcStyles||{fontStyle:"bold",fontSize:10,cellPadding:4,fillColor:232},c=t.jsPDF||{},u=t&&t.title?t.title:"";c.orientation||(c.orientation=t.orientation||"landscape"),c.unit||(c.unit="pt"),e.forEach(function(e){switch(e.type){case"header":n.push(i(e));break;case"group":s.push(i(e,r));break;case"calc":s.push(i(e,l));break;case"row":s.push(i(e))}});var d=new jsPDF(c);t&&t.autoTable&&(a="function"==typeof t.autoTable?t.autoTable(d)||{}:t.autoTable),u&&(a.addPageContent=function(e){d.text(u,40,30)}),a.head=n,a.body=s,d.autoTable(a),t&&t.documentProcessing&&t.documentProcessing(d),o(d.output("arraybuffer"),"application/pdf")},xlsx:function(e,t,o){function i(){var t=[],o=[],i={},n={s:{c:0,r:0},e:{c:e[0]?e[0].columns.reduce(function(e,t){return e+(t&&t.width?t.width:1)},0):0,r:e.length}};return e.forEach(function(e,i){var n=[];e.columns.forEach(function(e,t){e?(n.push(e.value instanceof Date||"object"!==_typeof(e.value)?e.value:JSON.stringify(e.value)),(e.width>1||e.height>-1)&&o.push({s:{r:i,c:t},e:{r:i+e.height-1,c:t+e.width-1}})):n.push("")}),t.push(n)}),XLSX.utils.sheet_add_aoa(i,t),i["!ref"]=XLSX.utils.encode_range(n),o.length&&(i["!merges"]=o),i}var n,s=this,a=t.sheetName||"Sheet1",r=XLSX.utils.book_new();if(r.SheetNames=[],r.Sheets={},t.sheetOnly)return void o(i());if(t.sheets)for(var l in t.sheets)!0===t.sheets[l]?(r.SheetNames.push(l),r.Sheets[l]=i()):(r.SheetNames.push(l),this.modules.comms.send(t.sheets[l],"download","intercept",{type:"xlsx",options:{sheetOnly:!0},active:s.active,intercept:function(e){r.Sheets[l]=e}}));else r.SheetNames.push(a),r.Sheets[a]=i();t.documentProcessing&&(r=t.documentProcessing(r)),n=XLSX.write(r,{bookType:"xlsx",bookSST:!0,type:"binary"}),o(function(e){for(var t=new ArrayBuffer(e.length),o=new Uint8Array(t),i=0;i!=e.length;++i)o[i]=255&e.charCodeAt(i);return t}(n),"application/octet-stream")},html:function(e,t,o){this.modExists("export",!0)&&o(this.modules.export.genereateHTMLTable(e),"text/html")}},h.prototype.registerModule("download",C);var R=function(e){this.table=e,this.currentCell=!1,this.mouseClick=!1,this.recursionBlock=!1,this.invalidEdit=!1,this.editedCells=[]};R.prototype.initializeColumn=function(e){var t=this,o={editor:!1,blocked:!1,check:e.definition.editable,params:e.definition.editorParams||{}};switch(_typeof(e.definition.editor)){case"string":"tick"===e.definition.editor&&(e.definition.editor="tickCross",console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor")),t.editors[e.definition.editor]?o.editor=t.editors[e.definition.editor]:console.warn("Editor Error - No such editor found: ",e.definition.editor);break;case"function":o.editor=e.definition.editor;break;case"boolean":!0===e.definition.editor&&("function"!=typeof e.definition.formatter?("tick"===e.definition.formatter&&(e.definition.formatter="tickCross",console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor")),t.editors[e.definition.formatter]?o.editor=t.editors[e.definition.formatter]:o.editor=t.editors.input):console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ",e.definition.formatter))}o.editor&&(e.modules.edit=o)},R.prototype.getCurrentCell=function(){return!!this.currentCell&&this.currentCell.getComponent()},R.prototype.clearEditor=function(e){var t,o=this.currentCell;if(this.invalidEdit=!1,o){for(this.currentCell=!1,t=o.getElement(),e?o.validate():t.classList.remove("tabulator-validation-fail"),t.classList.remove("tabulator-editing");t.firstChild;)t.removeChild(t.firstChild);o.row.getElement().classList.remove("tabulator-row-editing")}},R.prototype.cancelEdit=function(){if(this.currentCell){var e=this.currentCell,t=this.currentCell.getComponent();this.clearEditor(!0),e.setValueActual(e.getValue()),e.cellRendered(),("textarea"==e.column.definition.editor||e.column.definition.variableHeight)&&e.row.normalizeHeight(!0),e.column.cellEvents.cellEditCancelled&&e.column.cellEvents.cellEditCancelled.call(this.table,t),this.table.options.cellEditCancelled.call(this.table,t)}},R.prototype.bindEditor=function(e){var t=this,o=e.getElement();o.setAttribute("tabindex",0),o.addEventListener("click",function(e){o.classList.contains("tabulator-editing")||o.focus({preventScroll:!0})}),o.addEventListener("mousedown",function(e){2===e.button?e.preventDefault():t.mouseClick=!0}),o.addEventListener("focus",function(o){t.recursionBlock||t.edit(e,o,!1)})},R.prototype.focusCellNoEvent=function(e,t){this.recursionBlock=!0,t&&"ie"===this.table.browser||e.getElement().focus({preventScroll:!0}),this.recursionBlock=!1},R.prototype.editCell=function(e,t){this.focusCellNoEvent(e),this.edit(e,!1,t)},R.prototype.focusScrollAdjust=function(e){if("virtual"==this.table.rowManager.getRenderMode()){var t=this.table.rowManager.element.scrollTop,o=this.table.rowManager.element.clientHeight+this.table.rowManager.element.scrollTop,i=e.row.getElement();i.offsetTop;i.offsetTop<t?this.table.rowManager.element.scrollTop-=t-i.offsetTop:i.offsetTop+i.offsetHeight>o&&(this.table.rowManager.element.scrollTop+=i.offsetTop+i.offsetHeight-o);var n=this.table.rowManager.element.scrollLeft,s=this.table.rowManager.element.clientWidth+this.table.rowManager.element.scrollLeft,a=e.getElement();a.offsetLeft;this.table.modExists("frozenColumns")&&(n+=parseInt(this.table.modules.frozenColumns.leftMargin),s-=parseInt(this.table.modules.frozenColumns.rightMargin)),a.offsetLeft<n?this.table.rowManager.element.scrollLeft-=n-a.offsetLeft:a.offsetLeft+a.offsetWidth>s&&(this.table.rowManager.element.scrollLeft+=a.offsetLeft+a.offsetWidth-s)}},R.prototype.edit=function(e,t,o){function i(t){if(c.currentCell===e){var o=!0;return e.column.modules.validate&&c.table.modExists("validate")&&"manual"!=c.table.options.validationMode&&(o=c.table.modules.validate.validate(e.column.modules.validate,e,t)),!0===o||"highlight"===c.table.options.validationMode?(c.clearEditor(),e.modules.edit||(e.modules.edit={}),e.modules.edit.edited=!0,-1==c.editedCells.indexOf(e)&&c.editedCells.push(e),e.setValue(t,!0),c.table.options.dataTree&&c.table.modExists("dataTree")&&c.table.modules.dataTree.checkForRestyle(e),!0===o||(h.classList.add("tabulator-validation-fail"),c.table.options.validationFailed.call(c.table,e.getComponent(),t,o),!1)):(c.invalidEdit=!0,h.classList.add("tabulator-validation-fail"),c.focusCellNoEvent(e,!0),d(),c.table.options.validationFailed.call(c.table,e.getComponent(),t,o),!1)}}function n(){c.currentCell===e&&(c.cancelEdit(),c.table.options.dataTree&&c.table.modExists("dataTree")&&c.table.modules.dataTree.checkForRestyle(e))}function s(e){d=e}var a,r,l,c=this,u=!0,d=function(){},h=e.getElement();if(this.currentCell)return void(this.invalidEdit||this.cancelEdit());if(e.column.modules.edit.blocked)return this.mouseClick=!1,h.blur(),!1;switch(t&&t.stopPropagation(),_typeof(e.column.modules.edit.check)){case"function":u=e.column.modules.edit.check(e.getComponent());break;case"boolean":u=e.column.modules.edit.check}if(u||o){if(c.cancelEdit(),c.currentCell=e,this.focusScrollAdjust(e),r=e.getComponent(),this.mouseClick&&(this.mouseClick=!1,e.column.cellEvents.cellClick&&e.column.cellEvents.cellClick.call(this.table,t,r)),e.column.cellEvents.cellEditing&&e.column.cellEvents.cellEditing.call(this.table,r),c.table.options.cellEditing.call(this.table,r),l="function"==typeof e.column.modules.edit.params?e.column.modules.edit.params(r):e.column.modules.edit.params,!1===(a=e.column.modules.edit.editor.call(c,r,s,i,n,l)))return h.blur(),!1;if(!(a instanceof Node))return console.warn("Edit Error - Editor should return an instance of Node, the editor returned:",a),h.blur(),!1;for(h.classList.add("tabulator-editing"),e.row.getElement().classList.add("tabulator-row-editing");h.firstChild;)h.removeChild(h.firstChild);h.appendChild(a),d();for(var p=h.children,m=0;m<p.length;m++)p[m].addEventListener("click",function(e){e.stopPropagation()});return!0}return this.mouseClick=!1,h.blur(),!1},R.prototype.maskInput=function(e,t){function o(t){var r=i[t];void 0!==r&&r!==a&&r!==n&&r!==s&&(e.value=e.value+""+r,o(t+1))}var i=t.mask,n=void 0!==t.maskLetterChar?t.maskLetterChar:"A",s=void 0!==t.maskNumberChar?t.maskNumberChar:"9",a=void 0!==t.maskWildcardChar?t.maskWildcardChar:"*",r=!1;e.addEventListener("keydown",function(t){var o=e.value.length,l=t.key;if(t.keyCode>46){if(o>=i.length)return t.preventDefault(),t.stopPropagation(),r=!1,!1;switch(i[o]){case n:if(l.toUpperCase()==l.toLowerCase())return t.preventDefault(),t.stopPropagation(),r=!1,!1;break;case s:if(isNaN(l))return t.preventDefault(),t.stopPropagation(),r=!1,!1;break;case a:break;default:if(l!==i[o])return t.preventDefault(),t.stopPropagation(),r=!1,!1}r=!0}}),e.addEventListener("keyup",function(i){i.keyCode>46&&t.maskAutoFill&&o(e.value.length)}),e.placeholder||(e.placeholder=i),t.maskAutoFill&&o(e.value.length)},R.prototype.getEditedCells=function(){var e=[];return this.editedCells.forEach(function(t){e.push(t.getComponent())}),e},R.prototype.clearEdited=function(e){var t;e.modules.edit&&e.modules.edit.edited&&(e.modules.edit.edited=!1,e.modules.validate&&(e.modules.validate.invalid=!1)),(t=this.editedCells.indexOf(e))>-1&&this.editedCells.splice(t,1)},R.prototype.editors={input:function(e,t,o,i,n){function s(e){(null===a||void 0===a)&&""!==r.value||r.value!==a?o(r.value)&&(a=r.value):i()}var a=e.getValue(),r=document.createElement("input");if(r.setAttribute("type",n.search?"search":"text"),r.style.padding="4px",r.style.width="100%",r.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var l in n.elementAttributes)"+"==l.charAt(0)?(l=l.slice(1),r.setAttribute(l,r.getAttribute(l)+n.elementAttributes["+"+l])):r.setAttribute(l,n.elementAttributes[l]);return r.value=void 0!==a?a:"",t(function(){r.focus({preventScroll:!0}),r.style.height="100%"}),r.addEventListener("change",s),r.addEventListener("blur",s),r.addEventListener("keydown",function(e){switch(e.keyCode){case 13:s(e);break;case 27:i();break;case 35:case 36:e.stopPropagation()}}),n.mask&&this.table.modules.edit.maskInput(r,n),r},textarea:function(e,t,o,i,n){function s(t){(null===a||void 0===a)&&""!==c.value||c.value!==a?(o(c.value)&&(a=c.value),setTimeout(function(){e.getRow().normalizeHeight()},300)):i()}var a=e.getValue(),r=n.verticalNavigation||"hybrid",l=String(null!==a&&void 0!==a?a:""),c=(l.match(/(?:\r\n|\r|\n)/g),document.createElement("textarea")),u=0;if(c.style.display="block",c.style.padding="2px",c.style.height="100%",c.style.width="100%",c.style.boxSizing="border-box",c.style.whiteSpace="pre-wrap",c.style.resize="none",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var d in n.elementAttributes)"+"==d.charAt(0)?(d=d.slice(1),c.setAttribute(d,c.getAttribute(d)+n.elementAttributes["+"+d])):c.setAttribute(d,n.elementAttributes[d]);return c.value=l,t(function(){c.focus({preventScroll:!0}),c.style.height="100%",c.scrollHeight,c.style.height=c.scrollHeight+"px",e.getRow().normalizeHeight()}),c.addEventListener("change",s),c.addEventListener("blur",s),c.addEventListener("keyup",function(){c.style.height="";var t=c.scrollHeight;c.style.height=t+"px",t!=u&&(u=t,e.getRow().normalizeHeight())}),c.addEventListener("keydown",function(e){switch(e.keyCode){case 27:i();break;case 38:("editor"==r||"hybrid"==r&&c.selectionStart)&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 40:("editor"==r||"hybrid"==r&&c.selectionStart!==c.value.length)&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 35:case 36:e.stopPropagation()}}),n.mask&&this.table.modules.edit.maskInput(c,n),c},number:function(e,t,o,i,n){function s(){var e=l.value;isNaN(e)||""===e||(e=Number(e)),e!==a?o(e)&&(a=e):i()}var a=e.getValue(),r=n.verticalNavigation||"editor",l=document.createElement("input");if(l.setAttribute("type","number"),void 0!==n.max&&l.setAttribute("max",n.max),void 0!==n.min&&l.setAttribute("min",n.min),void 0!==n.step&&l.setAttribute("step",n.step),l.style.padding="4px",l.style.width="100%",l.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var c in n.elementAttributes)"+"==c.charAt(0)?(c=c.slice(1),l.setAttribute(c,l.getAttribute(c)+n.elementAttributes["+"+c])):l.setAttribute(c,n.elementAttributes[c]);l.value=a;var u=function(e){s()};return t(function(){l.removeEventListener("blur",u),l.focus({preventScroll:!0}),l.style.height="100%",l.addEventListener("blur",u)}),l.addEventListener("keydown",function(e){switch(e.keyCode){case 13:s();break;case 27:i();break;case 38:case 40:"editor"==r&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 35:case 36:e.stopPropagation()}}),n.mask&&this.table.modules.edit.maskInput(l,n),l},range:function(e,t,o,i,n){function s(){var e=r.value;isNaN(e)||""===e||(e=Number(e)),e!=a?o(e)&&(a=e):i()}var a=e.getValue(),r=document.createElement("input");if(r.setAttribute("type","range"),void 0!==n.max&&r.setAttribute("max",n.max),
-void 0!==n.min&&r.setAttribute("min",n.min),void 0!==n.step&&r.setAttribute("step",n.step),r.style.padding="4px",r.style.width="100%",r.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var l in n.elementAttributes)"+"==l.charAt(0)?(l=l.slice(1),r.setAttribute(l,r.getAttribute(l)+n.elementAttributes["+"+l])):r.setAttribute(l,n.elementAttributes[l]);return r.value=a,t(function(){r.focus({preventScroll:!0}),r.style.height="100%"}),r.addEventListener("blur",function(e){s()}),r.addEventListener("keydown",function(e){switch(e.keyCode){case 13:s();break;case 27:i()}}),r},select:function(e,t,o,i,n){function s(t){var o,i={},s=C.table.getData();return o=t?C.table.columnManager.getColumnByField(t):e.getColumn()._getSelf(),o?(s.forEach(function(e){var t=o.getFieldValue(e);null!==t&&void 0!==t&&""!==t&&(i[t]=!0)}),i=n.sortValuesList?"asc"==n.sortValuesList?Object.keys(i).sort():Object.keys(i).sort().reverse():Object.keys(i)):console.warn("unable to find matching column to create select lookup list:",t),i}function a(t,o){function i(e){var e={label:e.label,value:e.value,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1};return o.indexOf(e.value)>-1&&c(e),n.push(e),s.push(e),e}var n=[],s=[];if("function"==typeof t&&(t=t(e)),Array.isArray(t))t.forEach(function(e){var t;"object"===(void 0===e?"undefined":_typeof(e))?e.options?(t={label:e.label,group:!0,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1},s.push(t),e.options.forEach(function(e){i(e)})):i(e):(t={label:e,value:e,element:!1},o.indexOf(t.value)>-1&&c(t),n.push(t),s.push(t))});else for(var a in t){var l={label:t[a],value:a,element:!1};o.indexOf(l.value)>-1&&c(l),n.push(l),s.push(l)}z=n,H=s,r()}function r(){for(;D.firstChild;)D.removeChild(D.firstChild);H.forEach(function(t){var o=t.element;if(!o){if(o=document.createElement("div"),t.label=n.listItemFormatter?n.listItemFormatter(t.value,t.label,e,o,t.itemParams):t.label,t.group?(o.classList.add("tabulator-edit-select-list-group"),o.tabIndex=0,o.innerHTML=""===t.label?" ":t.label):(o.classList.add("tabulator-edit-select-list-item"),o.tabIndex=0,o.innerHTML=""===t.label?" ":t.label,o.addEventListener("click",function(){_=!0,setTimeout(function(){_=!1},10),k?(d(t),T.focus()):p(t)}),P.indexOf(t)>-1&&o.classList.add("active")),t.elementAttributes&&"object"==_typeof(t.elementAttributes))for(var i in t.elementAttributes)"+"==i.charAt(0)?(i=i.slice(1),o.setAttribute(i,T.getAttribute(i)+t.elementAttributes["+"+i])):o.setAttribute(i,t.elementAttributes[i]);o.addEventListener("mousedown",function(){A=!1,setTimeout(function(){A=!0},10)}),t.element=o}D.appendChild(o)})}function l(e,t){!k&&S&&S.element&&S.element.classList.remove("active"),S&&S.element&&S.element.classList.remove("focused"),S=e,e.element&&(e.element.classList.add("focused"),t&&e.element.classList.add("active")),e&&e.element&&e.element.scrollIntoView&&e.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}function c(e){-1==P.indexOf(e)&&(P.push(e),l(e,!0)),f()}function u(e){var t=P[e];e>-1&&(P.splice(e,1),t.element&&t.element.classList.remove("active"))}function d(e){e||(e=S);var t=P.indexOf(e);t>-1?u(t):(!0!==k&&P.length>=k&&u(0),c(e)),f()}function p(e){y(),e||(e=S),e&&(T.value=e.label,o(e.value)),L=T.value}function m(e){e||y();var t=[];P.forEach(function(e){t.push(e.value)}),L=T.value,o(t)}function f(){var e=[];P.forEach(function(t){e.push(t.label)}),T.value=e.join(", "),!1===C.currentCell&&m(!0)}function g(){for(var e=P.length,t=0;t<e;t++)u(0)}function b(){y(),i()}function v(){if(P=[],!D.parentNode){!0===n.values?a(s(),L):"string"==typeof n.values?a(s(n.values),L):a(n.values||[],L);var e=h.prototype.helpers.elOffset(R);D.style.minWidth=R.offsetWidth+"px",D.style.top=e.top+R.offsetHeight+"px",D.style.left=e.left+"px",D.addEventListener("mousedown",function(e){A=!1,setTimeout(function(){A=!0},10)}),document.body.appendChild(D)}}function y(){D.parentNode&&D.parentNode.removeChild(D),w()}function w(){C.table.rowManager.element.removeEventListener("scroll",b)}var E=this,C=this,R=e.getElement(),x=e.getValue(),M=n.verticalNavigation||"editor",L=void 0!==x||null===x?Array.isArray(x)?x:[x]:void 0!==n.defaultValue?n.defaultValue:[],T=document.createElement("input"),D=document.createElement("div"),k=n.multiselect,z=[],S={},H=[],P=[],A=!0,_=!1;if((Array.isArray(n)||!Array.isArray(n)&&"object"===(void 0===n?"undefined":_typeof(n))&&!n.values)&&(console.warn("DEPRECATION WARNING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object"),n={values:n}),T.setAttribute("type","text"),T.style.padding="4px",T.style.width="100%",T.style.boxSizing="border-box",T.style.cursor="default",T.readOnly=0!=this.currentCell,n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var F in n.elementAttributes)"+"==F.charAt(0)?(F=F.slice(1),T.setAttribute(F,T.getAttribute(F)+n.elementAttributes["+"+F])):T.setAttribute(F,n.elementAttributes[F]);return T.value=void 0!==x||null===x?x:"",T.addEventListener("search",function(e){T.value||(g(),m())}),T.addEventListener("keydown",function(e){var t;switch(e.keyCode){case 38:t=z.indexOf(S),("editor"==M||"hybrid"==M&&t)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t>0&&l(z[t-1],!k));break;case 40:t=z.indexOf(S),("editor"==M||"hybrid"==M&&t<z.length-1)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t<z.length-1&&(-1==t?l(z[0],!k):l(z[t+1],!k)));break;case 37:case 39:e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault();break;case 13:k?d():p();break;case 27:b();break;case 9:break;default:!1===C.currentCell&&e.preventDefault()}}),T.addEventListener("blur",function(e){A&&(k?m():b())}),T.addEventListener("focus",function(e){_||v()}),D=document.createElement("div"),D.classList.add("tabulator-edit-select-list"),t(function(){T.style.height="100%",T.focus({preventScroll:!0})}),setTimeout(function(){E.table.rowManager.element.addEventListener("scroll",b)},10),T},autocomplete:function(e,t,o,i,n){function s(){!0===n.values?S=a():"string"==typeof n.values&&(S=a(n.values))}function a(t){var o,i={},s=E.table.getData();return o=t?E.table.columnManager.getColumnByField(t):e.getColumn()._getSelf(),o?(s.forEach(function(e){var t=o.getFieldValue(e);null!==t&&void 0!==t&&""!==t&&(i[t]=!0)}),i=n.sortValuesList?"asc"==n.sortValuesList?Object.keys(i).sort():Object.keys(i).sort().reverse():Object.keys(i)):console.warn("unable to find matching column to create autocomplete lookup list:",t),i}function r(e,t){var o,i,s=[];o=S||(n.values||[]),n.searchFunc?(s=n.searchFunc(e,o),s instanceof Promise?(l(void 0!==n.searchingPlaceholder?n.searchingPlaceholder:"Searching..."),s.then(function(e){d(c(e),t)}).catch(function(e){console.err("error in autocomplete search promise:",e)})):d(c(s),t)):(i=c(o),""===e?n.showListOnEmpty&&(s=i):i.forEach(function(t){null===t.value&&void 0===t.value||(String(t.value).toLowerCase().indexOf(String(e).toLowerCase())>-1||String(t.title).toLowerCase().indexOf(String(e).toLowerCase())>-1)&&s.push(t)}),d(s,t))}function l(e){var t=document.createElement("div");u(),!1!==e&&(t.classList.add("tabulator-edit-select-list-notice"),t.tabIndex=0,e instanceof Node?t.appendChild(e):t.innerHTML=e,T.appendChild(t))}function c(e){var t=[];if(Array.isArray(e))e.forEach(function(e){var o={};"object"===(void 0===e?"undefined":_typeof(e))?(o.title=n.listItemFormatter?n.listItemFormatter(e.value,e.label):e.label,o.value=e.value):(o.title=n.listItemFormatter?n.listItemFormatter(e,e):e,o.value=e),t.push(o)});else for(var o in e){var i={title:n.listItemFormatter?n.listItemFormatter(o,e[o]):e[o],value:o};t.push(i)}return t}function u(){for(;T.firstChild;)T.removeChild(T.firstChild)}function d(e,t){e.length?p(e,t):n.emptyPlaceholder&&l(n.emptyPlaceholder)}function p(e,t){var o=!1;u(),D=e,D.forEach(function(e){var i=e.element;i||(i=document.createElement("div"),i.classList.add("tabulator-edit-select-list-item"),i.tabIndex=0,i.innerHTML=e.title,i.addEventListener("click",function(t){g(e),m()}),i.addEventListener("mousedown",function(e){z=!1,setTimeout(function(){z=!0},10)}),e.element=i,t&&e.value==R&&(L.value=e.title,e.element.classList.add("active"),o=!0),e===k&&(e.element.classList.add("active"),o=!0)),T.appendChild(i)}),o||g(!1)}function m(){b(),k?R!==k.value?(R=k.value,L.value=k.title,o(k.value)):i():n.freetext?(R=L.value,o(L.value)):n.allowEmpty&&""===L.value?(R=L.value,o(L.value)):i()}function f(){if(!T.parentNode){for(;T.firstChild;)T.removeChild(T.firstChild);var e=h.prototype.helpers.elOffset(C);T.style.minWidth=C.offsetWidth+"px",T.style.top=e.top+C.offsetHeight+"px",T.style.left=e.left+"px",document.body.appendChild(T)}}function g(e,t){k&&k.element&&k.element.classList.remove("active"),k=e,e&&e.element&&e.element.classList.add("active"),e&&e.element&&e.element.scrollIntoView&&e.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}function b(){T.parentNode&&T.parentNode.removeChild(T),y()}function v(){b(),i()}function y(){E.table.rowManager.element.removeEventListener("scroll",v)}var w=this,E=this,C=e.getElement(),R=e.getValue(),x=n.verticalNavigation||"editor",M=void 0!==R||null===R?R:void 0!==n.defaultValue?n.defaultValue:"",L=document.createElement("input"),T=document.createElement("div"),D=[],k=!1,z=!0,S=!1;if(L.setAttribute("type","search"),L.style.padding="4px",L.style.width="100%",L.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var H in n.elementAttributes)"+"==H.charAt(0)?(H=H.slice(1),L.setAttribute(H,L.getAttribute(H)+n.elementAttributes["+"+H])):L.setAttribute(H,n.elementAttributes[H]);return T.classList.add("tabulator-edit-select-list"),T.addEventListener("mousedown",function(e){z=!1,setTimeout(function(){z=!0},10)}),L.addEventListener("keydown",function(e){var t;switch(e.keyCode){case 38:t=D.indexOf(k),("editor"==x||"hybrid"==x&&t)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),g(t>0?D[t-1]:!1));break;case 40:t=D.indexOf(k),("editor"==x||"hybrid"==x&&t<D.length-1)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t<D.length-1&&g(-1==t?D[0]:D[t+1]));break;case 37:case 39:e.stopImmediatePropagation(),e.stopPropagation();break;case 13:m();break;case 27:v();break;case 36:case 35:e.stopImmediatePropagation()}}),L.addEventListener("keyup",function(e){switch(e.keyCode){case 38:case 37:case 39:case 40:case 13:case 27:break;default:r(L.value)}}),L.addEventListener("search",function(e){r(L.value)}),L.addEventListener("blur",function(e){z&&m()}),L.addEventListener("focus",function(e){var t=M;s(),f(),L.value=t,r(t,!0)}),t(function(){L.style.height="100%",L.focus({preventScroll:!0})}),n.mask&&this.table.modules.edit.maskInput(L,n),setTimeout(function(){w.table.rowManager.element.addEventListener("scroll",v)},10),s(),L.value=M,r(M,!0),L},star:function(e,t,o,i,n){function s(e){h.forEach(function(t,o){o<e?("ie"==r.table.browser?t.setAttribute("class","tabulator-star-active"):t.classList.replace("tabulator-star-inactive","tabulator-star-active"),t.innerHTML='<polygon fill="#488CE9" stroke="#014AAE" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>'):("ie"==r.table.browser?t.setAttribute("class","tabulator-star-inactive"):t.classList.replace("tabulator-star-active","tabulator-star-inactive"),t.innerHTML='<polygon fill="#010155" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>')})}function a(e){c=e,s(e)}var r=this,l=e.getElement(),c=e.getValue(),u=l.getElementsByTagName("svg").length||5,d=l.getElementsByTagName("svg")[0]?l.getElementsByTagName("svg")[0].getAttribute("width"):14,h=[],p=document.createElement("div"),m=document.createElementNS("http://www.w3.org/2000/svg","svg");if(l.style.whiteSpace="nowrap",l.style.overflow="hidden",l.style.textOverflow="ellipsis",p.style.verticalAlign="middle",p.style.display="inline-block",p.style.padding="4px",m.setAttribute("width",d),m.setAttribute("height",d),m.setAttribute("viewBox","0 0 512 512"),m.setAttribute("xml:space","preserve"),m.style.padding="0 1px",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var f in n.elementAttributes)"+"==f.charAt(0)?(f=f.slice(1),p.setAttribute(f,p.getAttribute(f)+n.elementAttributes["+"+f])):p.setAttribute(f,n.elementAttributes[f]);for(var g=1;g<=u;g++)!function(e){var t=document.createElement("span"),i=m.cloneNode(!0);h.push(i),t.addEventListener("mouseenter",function(t){t.stopPropagation(),t.stopImmediatePropagation(),s(e)}),t.addEventListener("mousemove",function(e){e.stopPropagation(),e.stopImmediatePropagation()}),t.addEventListener("click",function(t){t.stopPropagation(),t.stopImmediatePropagation(),o(e),l.blur()}),t.appendChild(i),p.appendChild(t)}(g);return c=Math.min(parseInt(c),u),s(c),p.addEventListener("mousemove",function(e){s(0)}),p.addEventListener("click",function(e){o(0)}),l.addEventListener("blur",function(e){i()}),l.addEventListener("keydown",function(e){switch(e.keyCode){case 39:a(c+1);break;case 37:a(c-1);break;case 13:o(c);break;case 27:i()}}),p},progress:function(e,t,o,i,n){function s(){var e=d*Math.round(m.offsetWidth/(l.clientWidth/100))+u;o(e),l.setAttribute("aria-valuenow",e),l.setAttribute("aria-label",h)}var a,r,l=e.getElement(),c=void 0===n.max?l.getElementsByTagName("div")[0].getAttribute("max")||100:n.max,u=void 0===n.min?l.getElementsByTagName("div")[0].getAttribute("min")||0:n.min,d=(c-u)/100,h=e.getValue()||0,p=document.createElement("div"),m=document.createElement("div");if(p.style.position="absolute",p.style.right="0",p.style.top="0",p.style.bottom="0",p.style.width="5px",p.classList.add("tabulator-progress-handle"),m.style.display="inline-block",m.style.position="relative",m.style.height="100%",m.style.backgroundColor="#488CE9",m.style.maxWidth="100%",m.style.minWidth="0%",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var f in n.elementAttributes)"+"==f.charAt(0)?(f=f.slice(1),m.setAttribute(f,m.getAttribute(f)+n.elementAttributes["+"+f])):m.setAttribute(f,n.elementAttributes[f]);return l.style.padding="4px 4px",h=Math.min(parseFloat(h),c),h=Math.max(parseFloat(h),u),h=Math.round((h-u)/d),m.style.width=h+"%",l.setAttribute("aria-valuemin",u),l.setAttribute("aria-valuemax",c),m.appendChild(p),p.addEventListener("mousedown",function(e){a=e.screenX,r=m.offsetWidth}),p.addEventListener("mouseover",function(){p.style.cursor="ew-resize"}),l.addEventListener("mousemove",function(e){a&&(m.style.width=r+e.screenX-a+"px")}),l.addEventListener("mouseup",function(e){a&&(e.stopPropagation(),e.stopImmediatePropagation(),a=!1,r=!1,s())}),l.addEventListener("keydown",function(e){switch(e.keyCode){case 39:e.preventDefault(),m.style.width=m.clientWidth+l.clientWidth/100+"px";break;case 37:e.preventDefault(),m.style.width=m.clientWidth-l.clientWidth/100+"px";break;case 9:case 13:s();break;case 27:i()}}),l.addEventListener("blur",function(){i()}),m},tickCross:function(e,t,o,i,n){function s(e){return l?e?u?c:r.checked:r.checked&&!u?(r.checked=!1,r.indeterminate=!0,u=!0,c):(u=!1,r.checked):r.checked}var a=e.getValue(),r=document.createElement("input"),l=n.tristate,c=void 0===n.indeterminateValue?null:n.indeterminateValue,u=!1;if(r.setAttribute("type","checkbox"),r.style.marginTop="5px",r.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var d in n.elementAttributes)"+"==d.charAt(0)?(d=d.slice(1),r.setAttribute(d,r.getAttribute(d)+n.elementAttributes["+"+d])):r.setAttribute(d,n.elementAttributes[d]);return r.value=a,!l||void 0!==a&&a!==c&&""!==a||(u=!0,r.indeterminate=!0),"firefox"!=this.table.browser&&t(function(){r.focus({preventScroll:!0})}),r.checked=!0===a||"true"===a||"True"===a||1===a,t(function(){r.focus()}),r.addEventListener("change",function(e){o(s())}),r.addEventListener("blur",function(e){o(s(!0))}),r.addEventListener("keydown",function(e){13==e.keyCode&&o(s()),27==e.keyCode&&i()}),r}},h.prototype.registerModule("edit",R);var x=function(e,t,o,i){this.type=e,this.columns=t,this.component=o||!1,this.indent=i||0},M=function(e,t,o,i,n){this.value=e,this.component=t||!1,this.width=o,this.height=i,this.depth=n},L=function(e){this.table=e,this.config={},this.cloneTableStyle=!0,this.colVisProp=""};L.prototype.generateExportList=function(e,t,o,i){this.cloneTableStyle=t,this.config=e||{},this.colVisProp=i;var n=!1!==this.config.columnHeaders?this.headersToExportRows(this.generateColumnGroupHeaders()):[],s=this.bodyToExportRows(this.rowLookup(o));return n.concat(s)},L.prototype.genereateTable=function(e,t,o,i){var n=this.generateExportList(e,t,o,i);return this.genereateTableElement(n)},L.prototype.rowLookup=function(e){var t=this,o=[];if("function"==typeof e)e.call(this.table).forEach(function(e){(e=t.table.rowManager.findRow(e))&&o.push(e)});else switch(e){case!0:case"visible":o=this.table.rowManager.getVisibleRows(!0);break;case"all":o=this.table.rowManager.rows;break;case"selected":o=this.table.modules.selectRow.selectedRows;break;case"active":default:o=this.table.options.pagination?this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length-2):this.table.rowManager.getDisplayRows()}return Object.assign([],o)},L.prototype.generateColumnGroupHeaders=function(){var e=this,t=[];return(!1!==this.config.columnGroups?this.table.columnManager.columns:this.table.columnManager.columnsByIndex).forEach(function(o){var i=e.processColumnGroup(o);i&&t.push(i)}),t},L.prototype.processColumnGroup=function(e){var t=this,o=e.columns,i=0,n=e.definition["title"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))]||e.definition.title,s={title:n,column:e,depth:1};if(o.length){if(s.subGroups=[],s.width=0,o.forEach(function(e){var o=t.processColumnGroup(e);o&&(s.width+=o.width,s.subGroups.push(o),o.depth>i&&(i=o.depth))}),s.depth+=i,!s.width)return!1}else{if(!this.columnVisCheck(e))return!1;s.width=1}return s},L.prototype.columnVisCheck=function(e){return!1!==e.definition[this.colVisProp]&&(e.visible||!e.visible&&e.definition[this.colVisProp])},L.prototype.headersToExportRows=function(e){function t(e,n){var s=i-n;if(void 0===o[n]&&(o[n]=[]),e.height=e.subGroups?1:s-e.depth+1,o[n].push(e),e.height>1)for(var a=1;a<e.height;a++)void 0===o[n+a]&&(o[n+a]=[]),o[n+a].push(!1);if(e.width>1)for(var r=1;r<e.width;r++)o[n].push(!1);e.subGroups&&e.subGroups.forEach(function(e){t(e,n+1)})}var o=[],i=0,n=[];return e.forEach(function(e){e.depth>i&&(i=e.depth)}),e.forEach(function(e){t(e,0)}),o.forEach(function(e){var t=[];e.forEach(function(e){e?t.push(new M(e.title,e.column.getComponent(),e.width,e.height,e.depth)):t.push(null)}),n.push(new x("header",t))}),n},L.prototype.bodyToExportRows=function(e){var t=this,o=[],i=[];return this.table.columnManager.columnsByIndex.forEach(function(e){t.columnVisCheck(e)&&o.push(e.getComponent())}),!1!==this.config.columnCalcs&&this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&e.unshift(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&e.push(this.table.modules.columnCalcs.botRow)),e=e.filter(function(e){switch(e.type){case"group":return!1!==t.config.rowGroups;case"calc":return!1!==t.config.columnCalcs;case"row":return!(t.table.options.dataTree&&!1===t.config.dataTree&&e.modules.dataTree.parent)}return!0}),e.forEach(function(e,n){var s=e.getData(t.colVisProp),a=[],r=0;switch(e.type){case"group":r=e.level,a.push(new M(e.key,e.getComponent(),o.length,1));break;case"calc":case"row":o.forEach(function(e){a.push(new M(e._column.getFieldValue(s),e,1,1))}),t.table.options.dataTree&&!1!==t.config.dataTree&&(r=e.modules.dataTree.index)}i.push(new x(e.type,a,e.getComponent(),r))}),i},L.prototype.genereateTableElement=function(e){var t=this,o=document.createElement("table"),i=document.createElement("thead"),n=document.createElement("tbody"),s=this.lookupTableStyles(),a=this.table.options["rowFormatter"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],r={};return r.rowFormatter=null!==a?a:this.table.options.rowFormatter,this.table.options.dataTree&&!1!==this.config.dataTree&&this.table.modExists("columnCalcs")&&(r.treeElementField=this.table.modules.dataTree.elementField),r.groupHeader=this.table.options["groupHeader"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],r.groupHeader&&!Array.isArray(r.groupHeader)&&(r.groupHeader=[r.groupHeader]),o.classList.add("tabulator-print-table"),this.mapElementStyles(this.table.columnManager.getHeadersElement(),i,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),e.length>1e3&&console.warn("It may take a long time to render an HTML table with more than 1000 rows"),e.forEach(function(e,o){switch(e.type){case"header":i.appendChild(t.genereateHeaderElement(e,r,s));break;case"group":n.appendChild(t.genereateGroupElement(e,r,s));break;case"calc":n.appendChild(t.genereateCalcElement(e,r,s));break;case"row":var a=t.genereateRowElement(e,r,s);t.mapElementStyles(o%2&&s.evenRow?s.evenRow:s.oddRow,a,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),n.appendChild(a)}}),i.innerHTML&&o.appendChild(i),o.appendChild(n),this.mapElementStyles(this.table.element,o,["border-top","border-left","border-right","border-bottom"]),o},L.prototype.lookupTableStyles=function(){var e={};return this.cloneTableStyle&&window.getComputedStyle&&(e.oddRow=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),e.evenRow=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),e.calcRow=this.table.element.querySelector(".tabulator-row.tabulator-calcs"),e.firstRow=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),e.firstGroup=this.table.element.getElementsByClassName("tabulator-group")[0],e.firstRow&&(e.styleCells=e.firstRow.getElementsByClassName("tabulator-cell"),e.firstCell=e.styleCells[0],e.lastCell=e.styleCells[e.styleCells.length-1])),e},L.prototype.genereateHeaderElement=function(e,t,o){var i=this,n=document.createElement("tr");return e.columns.forEach(function(e){if(e){var t=document.createElement("th"),o=e.component._column.definition.cssClass?e.component._column.definition.cssClass.split(" "):[];t.colSpan=e.width,t.rowSpan=e.height,t.innerHTML=e.value,i.cloneTableStyle&&(t.style.boxSizing="border-box"),o.forEach(function(e){t.classList.add(e)}),i.mapElementStyles(e.component.getElement(),t,["text-align","border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),i.mapElementStyles(e.component._column.contentElement,t,["padding-top","padding-left","padding-right","padding-bottom"]),e.component._column.visible?i.mapElementStyles(e.component.getElement(),t,["width"]):e.component._column.definition.width&&(t.style.width=e.component._column.definition.width+"px"),e.component._column.parent&&i.mapElementStyles(e.component._column.parent.groupElement,t,["border-top"]),n.appendChild(t)}}),n},L.prototype.genereateGroupElement=function(e,t,o){var i=document.createElement("tr"),n=document.createElement("td"),s=e.columns[0];return i.classList.add("tabulator-print-table-row"),t.groupHeader&&t.groupHeader[e.indent]?s.value=t.groupHeader[e.indent](s.value,e.component._group.getRowCount(),e.component._group.getData(),e.component):!1===t.groupHeader?s.value=s.value:s.value=e.component._group.generator(s.value,e.component._group.getRowCount(),e.component._group.getData(),e.component),n.colSpan=s.width,n.innerHTML=s.value,i.classList.add("tabulator-print-table-group"),i.classList.add("tabulator-group-level-"+e.indent),s.component.isVisible()&&i.classList.add("tabulator-group-visible"),this.mapElementStyles(o.firstGroup,i,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),this.mapElementStyles(o.firstGroup,n,["padding-top","padding-left","padding-right","padding-bottom"]),i.appendChild(n),i},L.prototype.genereateCalcElement=function(e,t,o){var i=this.genereateRowElement(e,t,o);return i.classList.add("tabulator-print-table-calcs"),this.mapElementStyles(o.calcRow,i,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),i},L.prototype.genereateRowElement=function(e,t,o){var n=this,s=document.createElement("tr");return s.classList.add("tabulator-print-table-row"),e.columns.forEach(function(a){if(a){var r=document.createElement("td"),l=a.component._column,c=a.value,u={modules:{},getValue:function(){return c},getField:function(){return l.definition.field},getElement:function(){return r},getColumn:function(){return l.getComponent()},getData:function(){return e.component.getData()},getRow:function(){return e.component},getComponent:function(){return u},column:l};if((l.definition.cssClass?l.definition.cssClass.split(" "):[]).forEach(function(e){r.classList.add(e)}),n.table.modExists("format")&&!1!==n.config.formatCells)c=n.table.modules.format.formatExportValue(u,n.colVisProp);else switch(void 0===c?"undefined":_typeof(c)){case"object":c=JSON.stringify(c);break;case"undefined":case"null":c="";break;default:c=c}c instanceof Node?r.appendChild(c):r.innerHTML=c,o.firstCell&&(n.mapElementStyles(o.firstCell,r,["padding-top","padding-left","padding-right","padding-bottom","border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size"]),l.definition.align&&(r.style.textAlign=l.definition.align)),n.table.options.dataTree&&!1!==n.config.dataTree&&(t.treeElementField&&t.treeElementField==l.field||!t.treeElementField&&0==i)&&(e.component._row.modules.dataTree.controlEl&&r.insertBefore(e.component._row.modules.dataTree.controlEl.cloneNode(!0),r.firstChild),e.component._row.modules.dataTree.branchEl&&r.insertBefore(e.component._row.modules.dataTree.branchEl.cloneNode(!0),r.firstChild)),s.appendChild(r),u.modules.format&&u.modules.format.renderedCallback&&u.modules.format.renderedCallback(),t.rowFormatter&&!1!==n.config.formatCells&&t.rowFormatter(e.component)}}),s},L.prototype.genereateHTMLTable=function(e){var t=document.createElement("div");return t.appendChild(this.genereateTableElement(e)),t.innerHTML},L.prototype.getHtml=function(e,t,o,i){var n=this.generateExportList(o||this.table.options.htmlOutputConfig,t,e,i||"htmlOutput");return this.genereateHTMLTable(n)},L.prototype.mapElementStyles=function(e,t,o){if(this.cloneTableStyle&&e&&t){var i={"background-color":"backgroundColor",color:"fontColor",width:"width","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","text-align":"textAlign","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom","padding-top":"paddingTop","padding-left":"paddingLeft","padding-right":"paddingRight","padding-bottom":"paddingBottom"};if(window.getComputedStyle){var n=window.getComputedStyle(e);o.forEach(function(e){t.style[i[e]]=n.getPropertyValue(e)})}}},h.prototype.registerModule("export",L);var T=function(e){this.table=e,this.filterList=[],this.headerFilters={},this.headerFilterColumns=[],this.prevHeaderFilterChangeCheck="",this.prevHeaderFilterChangeCheck="{}",this.changed=!1};T.prototype.initializeColumn=function(e,t){function o(t){var o,a="input"==e.modules.filter.tagType&&"text"==e.modules.filter.attrType||"textarea"==e.modules.filter.tagType?"partial":"match",r="",l="";if(void 0===e.modules.filter.prevSuccess||e.modules.filter.prevSuccess!==t){if(e.modules.filter.prevSuccess=t,e.modules.filter.emptyFunc(t))delete n.headerFilters[s];else{switch(e.modules.filter.value=t,_typeof(e.definition.headerFilterFunc)){case"string":n.filters[e.definition.headerFilterFunc]?(r=e.definition.headerFilterFunc,o=function(o){var i=e.definition.headerFilterFuncParams||{},s=e.getFieldValue(o);return i="function"==typeof i?i(t,s,o):i,n.filters[e.definition.headerFilterFunc](t,s,o,i)}):console.warn("Header Filter Error - Matching filter function not found: ",e.definition.headerFilterFunc);break;case"function":o=function(o){var i=e.definition.headerFilterFuncParams||{},n=e.getFieldValue(o);return i="function"==typeof i?i(t,n,o):i,e.definition.headerFilterFunc(t,n,o,i)},r=o}if(!o)switch(a){case"partial":o=function(o){var i=e.getFieldValue(o);return void 0!==i&&null!==i&&String(i).toLowerCase().indexOf(String(t).toLowerCase())>-1},r="like";break;default:o=function(o){return e.getFieldValue(o)==t},r="="}n.headerFilters[s]={value:t,func:o,type:r,params:i||{}}}l=JSON.stringify(n.headerFilters),n.prevHeaderFilterChangeCheck!==l&&(n.prevHeaderFilterChangeCheck=l,n.changed=!0,n.table.rowManager.filterRefresh())}return!0}var i,n=this,s=e.getField();e.modules.filter={success:o,attrType:!1,tagType:!1,emptyFunc:!1},this.generateHeaderFilterElement(e)},T.prototype.generateHeaderFilterElement=function(e,t,o){function i(){}var n,s,a,r,l,c,u,d=this,h=this,p=e.modules.filter.success,m=e.getField();if(e.modules.filter.headerElement&&e.modules.filter.headerElement.parentNode&&e.contentElement.removeChild(e.modules.filter.headerElement.parentNode),m){switch(e.modules.filter.emptyFunc=e.definition.headerFilterEmptyCheck||function(e){return!e&&"0"!==e},n=document.createElement("div"),n.classList.add("tabulator-header-filter"),_typeof(e.definition.headerFilter)){case"string":h.table.modules.edit.editors[e.definition.headerFilter]?(s=h.table.modules.edit.editors[e.definition.headerFilter],"tick"!==e.definition.headerFilter&&"tickCross"!==e.definition.headerFilter||e.definition.headerFilterEmptyCheck||(e.modules.filter.emptyFunc=function(e){return!0!==e&&!1!==e})):console.warn("Filter Error - Cannot build header filter, No such editor found: ",e.definition.editor);break;case"function":s=e.definition.headerFilter;break;case"boolean":e.modules.edit&&e.modules.edit.editor?s=e.modules.edit.editor:e.definition.formatter&&h.table.modules.edit.editors[e.definition.formatter]?(s=h.table.modules.edit.editors[e.definition.formatter],"tick"!==e.definition.formatter&&"tickCross"!==e.definition.formatter||e.definition.headerFilterEmptyCheck||(e.modules.filter.emptyFunc=function(e){return!0!==e&&!1!==e})):s=h.table.modules.edit.editors.input}if(s){if(r={getValue:function(){return void 0!==t?t:""},getField:function(){return e.definition.field},getElement:function(){return n},getColumn:function(){return e.getComponent()},getRow:function(){return{normalizeHeight:function(){}}}},u=e.definition.headerFilterParams||{},u="function"==typeof u?u.call(h.table):u,!(a=s.call(this.table.modules.edit,r,function(){},p,i,u)))return void console.warn("Filter Error - Cannot add filter to "+m+" column, editor returned a value of false");if(!(a instanceof Node))return void console.warn("Filter Error - Cannot add filter to "+m+" column, editor should return an instance of Node, the editor returned:",a);m?h.table.modules.localize.bind("headerFilters|columns|"+e.definition.field,function(e){a.setAttribute("placeholder",void 0!==e&&e?e:h.table.modules.localize.getText("headerFilters|default"))}):h.table.modules.localize.bind("headerFilters|default",function(e){a.setAttribute("placeholder",void 0!==h.column.definition.headerFilterPlaceholder&&h.column.definition.headerFilterPlaceholder?h.column.definition.headerFilterPlaceholder:e)}),a.addEventListener("click",function(e){e.stopPropagation(),a.focus()}),
-a.addEventListener("focus",function(e){var t=d.table.columnManager.element.scrollLeft;t!==d.table.rowManager.element.scrollLeft&&(d.table.rowManager.scrollHorizontal(t),d.table.columnManager.scrollHorizontal(t))}),l=!1,c=function(e){l&&clearTimeout(l),l=setTimeout(function(){p(a.value)},h.table.options.headerFilterLiveFilterDelay)},e.modules.filter.headerElement=a,e.modules.filter.attrType=a.hasAttribute("type")?a.getAttribute("type").toLowerCase():"",e.modules.filter.tagType=a.tagName.toLowerCase(),!1!==e.definition.headerFilterLiveFilter&&("autocomplete"!==e.definition.headerFilter&&"tickCross"!==e.definition.headerFilter&&("autocomplete"!==e.definition.editor&&"tickCross"!==e.definition.editor||!0!==e.definition.headerFilter)&&(a.addEventListener("keyup",c),a.addEventListener("search",c),"number"==e.modules.filter.attrType&&a.addEventListener("change",function(e){p(a.value)}),"text"==e.modules.filter.attrType&&"ie"!==this.table.browser&&a.setAttribute("type","search")),"input"!=e.modules.filter.tagType&&"select"!=e.modules.filter.tagType&&"textarea"!=e.modules.filter.tagType||a.addEventListener("mousedown",function(e){e.stopPropagation()})),n.appendChild(a),e.contentElement.appendChild(n),o||h.headerFilterColumns.push(e)}}else console.warn("Filter Error - Cannot add header filter, column has no field set:",e.definition.title)},T.prototype.hideHeaderFilterElements=function(){this.headerFilterColumns.forEach(function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="none")})},T.prototype.showHeaderFilterElements=function(){this.headerFilterColumns.forEach(function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="")})},T.prototype.setHeaderFilterFocus=function(e){e.modules.filter&&e.modules.filter.headerElement?e.modules.filter.headerElement.focus():console.warn("Column Filter Focus Error - No header filter set on column:",e.getField())},T.prototype.getHeaderFilterValue=function(e){if(e.modules.filter&&e.modules.filter.headerElement)return e.modules.filter.headerElement.value;console.warn("Column Filter Error - No header filter set on column:",e.getField())},T.prototype.setHeaderFilterValue=function(e,t){e&&(e.modules.filter&&e.modules.filter.headerElement?(this.generateHeaderFilterElement(e,t,!0),e.modules.filter.success(t)):console.warn("Column Filter Error - No header filter set on column:",e.getField()))},T.prototype.reloadHeaderFilter=function(e){e&&(e.modules.filter&&e.modules.filter.headerElement?this.generateHeaderFilterElement(e,e.modules.filter.value,!0):console.warn("Column Filter Error - No header filter set on column:",e.getField()))},T.prototype.hasChanged=function(){var e=this.changed;return this.changed=!1,e},T.prototype.setFilter=function(e,t,o,i){var n=this;n.filterList=[],Array.isArray(e)||(e=[{field:e,type:t,value:o,params:i}]),n.addFilter(e)},T.prototype.addFilter=function(e,t,o,i){var n=this;Array.isArray(e)||(e=[{field:e,type:t,value:o,params:i}]),e.forEach(function(e){(e=n.findFilter(e))&&(n.filterList.push(e),n.changed=!0)}),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},T.prototype.findFilter=function(e){var t,o=this;if(Array.isArray(e))return this.findSubFilters(e);var i=!1;return"function"==typeof e.field?i=function(t){return e.field(t,e.type||{})}:o.filters[e.type]?(t=o.table.columnManager.getColumnByField(e.field),i=t?function(i){return o.filters[e.type](e.value,t.getFieldValue(i),i,e.params||{})}:function(t){return o.filters[e.type](e.value,t[e.field],t,e.params||{})}):console.warn("Filter Error - No such filter type found, ignoring: ",e.type),e.func=i,!!e.func&&e},T.prototype.findSubFilters=function(e){var t=this,o=[];return e.forEach(function(e){(e=t.findFilter(e))&&o.push(e)}),!!o.length&&o},T.prototype.getFilters=function(e,t){var o=[];return e&&(o=this.getHeaderFilters()),t&&o.forEach(function(e){"function"==typeof e.type&&(e.type="function")}),o=o.concat(this.filtersToArray(this.filterList,t))},T.prototype.filtersToArray=function(e,t){var o=this,i=[];return e.forEach(function(e){var n;Array.isArray(e)?i.push(o.filtersToArray(e,t)):(n={field:e.field,type:e.type,value:e.value},t&&"function"==typeof n.type&&(n.type="function"),i.push(n))}),i},T.prototype.getHeaderFilters=function(){var e=[];for(var t in this.headerFilters)e.push({field:t,type:this.headerFilters[t].type,value:this.headerFilters[t].value});return e},T.prototype.removeFilter=function(e,t,o){var i=this;Array.isArray(e)||(e=[{field:e,type:t,value:o}]),e.forEach(function(e){var t=-1;t="object"==_typeof(e.field)?i.filterList.findIndex(function(t){return e===t}):i.filterList.findIndex(function(t){return e.field===t.field&&e.type===t.type&&e.value===t.value}),t>-1?(i.filterList.splice(t,1),i.changed=!0):console.warn("Filter Error - No matching filter type found, ignoring: ",e.type)}),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},T.prototype.clearFilter=function(e){this.filterList=[],e&&this.clearHeaderFilter(),this.changed=!0,this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},T.prototype.clearHeaderFilter=function(){var e=this;this.headerFilters={},e.prevHeaderFilterChangeCheck="{}",this.headerFilterColumns.forEach(function(t){t.modules.filter.value=null,t.modules.filter.prevSuccess=void 0,e.reloadHeaderFilter(t)}),this.changed=!0},T.prototype.search=function(e,t,o,i){var n=this,s=[],a=[];return Array.isArray(t)||(t=[{field:t,type:o,value:i}]),t.forEach(function(e){(e=n.findFilter(e))&&a.push(e)}),this.table.rowManager.rows.forEach(function(t){var o=!0;a.forEach(function(e){n.filterRecurse(e,t.getData())||(o=!1)}),o&&s.push("data"===e?t.getData("data"):t.getComponent())}),s},T.prototype.filter=function(e,t){var o=this,i=[],n=[];return o.table.options.dataFiltering&&o.table.options.dataFiltering.call(o.table,o.getFilters()),o.table.options.ajaxFiltering||!o.filterList.length&&!Object.keys(o.headerFilters).length?i=e.slice(0):e.forEach(function(e){o.filterRow(e)&&i.push(e)}),o.table.options.dataFiltered&&(i.forEach(function(e){n.push(e.getComponent())}),o.table.options.dataFiltered.call(o.table,o.getFilters(),n)),i},T.prototype.filterRow=function(e,t){var o=this,i=!0,n=e.getData();o.filterList.forEach(function(e){o.filterRecurse(e,n)||(i=!1)});for(var s in o.headerFilters)o.headerFilters[s].func(n)||(i=!1);return i},T.prototype.filterRecurse=function(e,t){var o=this,i=!1;return Array.isArray(e)?e.forEach(function(e){o.filterRecurse(e,t)&&(i=!0)}):i=e.func(t),i},T.prototype.filters={"=":function(e,t,o,i){return t==e},"<":function(e,t,o,i){return t<e},"<=":function(e,t,o,i){return t<=e},">":function(e,t,o,i){return t>e},">=":function(e,t,o,i){return t>=e},"!=":function(e,t,o,i){return t!=e},regex:function(e,t,o,i){return"string"==typeof e&&(e=new RegExp(e)),e.test(t)},like:function(e,t,o,i){return null===e||void 0===e?t===e:void 0!==t&&null!==t&&String(t).toLowerCase().indexOf(e.toLowerCase())>-1},keywords:function(e,t,o,i){var n=e.toLowerCase().split(void 0===i.separator?" ":i.separator),s=String(null===t||void 0===t?"":t).toLowerCase(),a=[];return n.forEach(function(e){s.includes(e)&&a.push(!0)}),i.matchAll?a.length===n.length:!!a.length},starts:function(e,t,o,i){return null===e||void 0===e?t===e:void 0!==t&&null!==t&&String(t).toLowerCase().startsWith(e.toLowerCase())},ends:function(e,t,o,i){return null===e||void 0===e?t===e:void 0!==t&&null!==t&&String(t).toLowerCase().endsWith(e.toLowerCase())},in:function(e,t,o,i){return Array.isArray(e)?!e.length||e.indexOf(t)>-1:(console.warn("Filter Error - filter value is not an array:",e),!1)}},h.prototype.registerModule("filter",T);var D=function(e){this.table=e};D.prototype.initializeColumn=function(e){e.modules.format=this.lookupFormatter(e,""),void 0!==e.definition.formatterPrint&&(e.modules.format.print=this.lookupFormatter(e,"Print")),void 0!==e.definition.formatterClipboard&&(e.modules.format.clipboard=this.lookupFormatter(e,"Clipboard")),void 0!==e.definition.formatterHtmlOutput&&(e.modules.format.htmlOutput=this.lookupFormatter(e,"HtmlOutput"))},D.prototype.lookupFormatter=function(e,t){var o={params:e.definition["formatter"+t+"Params"]||{}},i=e.definition["formatter"+t];switch(void 0===i?"undefined":_typeof(i)){case"string":"tick"===i&&(i="tickCross",void 0===o.params.crossElement&&(o.params.crossElement=!1),console.warn("DEPRECATION WARNING - the tick formatter has been deprecated, please use the tickCross formatter with the crossElement param set to false")),this.formatters[i]?o.formatter=this.formatters[i]:(console.warn("Formatter Error - No such formatter found: ",i),o.formatter=this.formatters.plaintext);break;case"function":o.formatter=i;break;default:o.formatter=this.formatters.plaintext}return o},D.prototype.cellRendered=function(e){e.modules.format&&e.modules.format.renderedCallback&&!e.modules.format.rendered&&(e.modules.format.renderedCallback(),e.modules.format.rendered=!0)},D.prototype.formatValue=function(e){function t(t){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=t,e.modules.format.rendered=!1}var o=e.getComponent(),i="function"==typeof e.column.modules.format.params?e.column.modules.format.params(o):e.column.modules.format.params;return e.column.modules.format.formatter.call(this,o,i,t)},D.prototype.formatExportValue=function(e,t){var o,i=e.column.modules.format[t];if(i){var n=function(t){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=t,e.modules.format.rendered=!1};return o="function"==typeof i.params?i.params(component):i.params,i.formatter.call(this,e.getComponent(),o,n)}return this.formatValue(e)},D.prototype.sanitizeHTML=function(e){if(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(e).replace(/[&<>"'`=\/]/g,function(e){return t[e]})}return e},D.prototype.emptyToSpace=function(e){return null===e||void 0===e||""===e?" ":e},D.prototype.getFormatter=function(e){var e;switch(void 0===e?"undefined":_typeof(e)){case"string":this.formatters[e]?e=this.formatters[e]:(console.warn("Formatter Error - No such formatter found: ",e),e=this.formatters.plaintext);break;case"function":e=e;break;default:e=this.formatters.plaintext}return e},D.prototype.formatters={plaintext:function(e,t,o){return this.emptyToSpace(this.sanitizeHTML(e.getValue()))},html:function(e,t,o){return e.getValue()},textarea:function(e,t,o){return e.getElement().style.whiteSpace="pre-wrap",this.emptyToSpace(this.sanitizeHTML(e.getValue()))},money:function(e,t,o){var i,n,s,a,r=parseFloat(e.getValue()),l=t.decimal||".",c=t.thousand||",",u=t.symbol||"",d=!!t.symbolAfter,h=void 0!==t.precision?t.precision:2;if(isNaN(r))return this.emptyToSpace(this.sanitizeHTML(e.getValue()));for(i=!1!==h?r.toFixed(h):r,i=String(i).split("."),n=i[0],s=i.length>1?l+i[1]:"",a=/(\d+)(\d{3})/;a.test(n);)n=n.replace(a,"$1"+c+"$2");return d?n+s+u:u+n+s},link:function(e,t,o){var i,n=e.getValue(),s=t.urlPrefix||"",a=t.download,r=n,l=document.createElement("a");if(t.labelField&&(i=e.getData(),r=i[t.labelField]),t.label)switch(_typeof(t.label)){case"string":r=t.label;break;case"function":r=t.label(e)}if(r){if(t.urlField&&(i=e.getData(),n=i[t.urlField]),t.url)switch(_typeof(t.url)){case"string":n=t.url;break;case"function":n=t.url(e)}return l.setAttribute("href",s+n),t.target&&l.setAttribute("target",t.target),t.download&&(a="function"==typeof a?a(e):!0===a?"":a,l.setAttribute("download",a)),l.innerHTML=this.emptyToSpace(this.sanitizeHTML(r)),l}return" "},image:function(e,t,o){var i=document.createElement("img");switch(i.setAttribute("src",e.getValue()),_typeof(t.height)){case"number":i.style.height=t.height+"px";break;case"string":i.style.height=t.height}switch(_typeof(t.width)){case"number":i.style.width=t.width+"px";break;case"string":i.style.width=t.width}return i.addEventListener("load",function(){e.getRow().normalizeHeight()}),i},tickCross:function(e,t,o){var i=e.getValue(),n=e.getElement(),s=t.allowEmpty,a=t.allowTruthy,r=void 0!==t.tickElement?t.tickElement:'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#2DC214" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/></svg>',l=void 0!==t.crossElement?t.crossElement:'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#CE1515" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/></svg>';return a&&i||!0===i||"true"===i||"True"===i||1===i||"1"===i?(n.setAttribute("aria-checked",!0),r||""):!s||"null"!==i&&""!==i&&null!==i&&void 0!==i?(n.setAttribute("aria-checked",!1),l||""):(n.setAttribute("aria-checked","mixed"),"")},datetime:function(e,t,o){var i=t.inputFormat||"YYYY-MM-DD hh:mm:ss",n=t.outputFormat||"DD/MM/YYYY hh:mm:ss",s=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",a=e.getValue(),r=moment(a,i);return r.isValid()?t.timezone?r.tz(t.timezone).format(n):r.format(n):!0===s?a:"function"==typeof s?s(a):s},datetimediff:function(e,t,o){var i=t.inputFormat||"YYYY-MM-DD hh:mm:ss",n=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",s=void 0!==t.suffix&&t.suffix,a=void 0!==t.unit?t.unit:void 0,r=void 0!==t.humanize&&t.humanize,l=void 0!==t.date?t.date:moment(),c=e.getValue(),u=moment(c,i);return u.isValid()?r?moment.duration(u.diff(l)).humanize(s):u.diff(l,a)+(s?" "+s:""):!0===n?c:"function"==typeof n?n(c):n},lookup:function(e,t,o){var i=e.getValue();return void 0===t[i]?(console.warn("Missing display value for "+i),i):t[i]},star:function(e,t,o){var i=e.getValue(),n=e.getElement(),s=t&&t.stars?t.stars:5,a=document.createElement("span"),r=document.createElementNS("http://www.w3.org/2000/svg","svg");a.style.verticalAlign="middle",r.setAttribute("width","14"),r.setAttribute("height","14"),r.setAttribute("viewBox","0 0 512 512"),r.setAttribute("xml:space","preserve"),r.style.padding="0 1px",i=i&&!isNaN(i)?parseInt(i):0,i=Math.max(0,Math.min(i,s));for(var l=1;l<=s;l++){var c=r.cloneNode(!0);c.innerHTML=l<=i?'<polygon fill="#FFEA00" stroke="#C1AB60" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>':'<polygon fill="#D2D2D2" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>',a.appendChild(c)}return n.style.whiteSpace="nowrap",n.style.overflow="hidden",n.style.textOverflow="ellipsis",n.setAttribute("aria-label",i),a},traffic:function(e,t,o){var i,n,s=this.sanitizeHTML(e.getValue())||0,a=document.createElement("span"),r=t&&t.max?t.max:100,l=t&&t.min?t.min:0,c=t&&void 0!==t.color?t.color:["red","orange","green"],u="#666666";if(!isNaN(s)&&void 0!==e.getValue()){switch(a.classList.add("tabulator-traffic-light"),n=parseFloat(s)<=r?parseFloat(s):r,n=parseFloat(n)>=l?parseFloat(n):l,i=(r-l)/100,n=Math.round((n-l)/i),void 0===c?"undefined":_typeof(c)){case"string":u=c;break;case"function":u=c(s);break;case"object":if(Array.isArray(c)){var d=100/c.length,h=Math.floor(n/d);h=Math.min(h,c.length-1),h=Math.max(h,0),u=c[h];break}}return a.style.backgroundColor=u,a}},progress:function(e,t,o){var i,n,s,a,r,l=this.sanitizeHTML(e.getValue())||0,u=e.getElement(),d=t&&t.max?t.max:100,h=t&&t.min?t.min:0,p=t&&t.legendAlign?t.legendAlign:"center";switch(n=parseFloat(l)<=d?parseFloat(l):d,n=parseFloat(n)>=h?parseFloat(n):h,i=(d-h)/100,n=Math.round((n-h)/i),_typeof(t.color)){case"string":s=t.color;break;case"function":s=t.color(l);break;case"object":if(Array.isArray(t.color)){var m=100/t.color.length,f=Math.floor(n/m);f=Math.min(f,t.color.length-1),f=Math.max(f,0),s=t.color[f];break}default:s="#2DC214"}switch(_typeof(t.legend)){case"string":a=t.legend;break;case"function":a=t.legend(l);break;case"boolean":a=l;break;default:a=!1}switch(_typeof(t.legendColor)){case"string":r=t.legendColor;break;case"function":r=t.legendColor(l);break;case"object":if(Array.isArray(t.legendColor)){var m=100/t.legendColor.length,f=Math.floor(n/m);f=Math.min(f,t.legendColor.length-1),f=Math.max(f,0),r=t.legendColor[f]}break;default:r="#000"}u.style.minWidth="30px",u.style.position="relative",u.setAttribute("aria-label",n);var g=document.createElement("div");if(g.style.display="inline-block",g.style.position="relative",g.style.width=n+"%",g.style.backgroundColor=s,g.style.height="100%",g.setAttribute("data-max",d),g.setAttribute("data-min",h),a){var b=document.createElement("div");b.style.position="absolute",b.style.top="4px",b.style.left=0,b.style.textAlign=p,b.style.width="100%",b.style.color=r,b.innerHTML=a}return o(function(){if(!(e instanceof c)){var t=document.createElement("div");t.style.position="absolute",t.style.top="4px",t.style.bottom="4px",t.style.left="4px",t.style.right="4px",u.appendChild(t),u=t}u.appendChild(g),a&&u.appendChild(b)}),""},color:function(e,t,o){return e.getElement().style.backgroundColor=this.sanitizeHTML(e.getValue()),""},buttonTick:function(e,t,o){return'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#2DC214" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/></svg>'},buttonCross:function(e,t,o){return'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#CE1515" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/></svg>'},rownum:function(e,t,o){return this.table.rowManager.activeRows.indexOf(e.getRow()._getSelf())+1},handle:function(e,t,o){return e.getElement().classList.add("tabulator-row-handle"),"<div class='tabulator-row-handle-box'><div class='tabulator-row-handle-bar'></div><div class='tabulator-row-handle-bar'></div><div class='tabulator-row-handle-bar'></div></div>"},responsiveCollapse:function(e,t,o){function i(e){var t=s.element;s.open=e,t&&(s.open?(n.classList.add("open"),t.style.display=""):(n.classList.remove("open"),t.style.display="none"))}var n=document.createElement("div"),s=e.getRow()._row.modules.responsiveLayout;return n.classList.add("tabulator-responsive-collapse-toggle"),n.innerHTML="<span class='tabulator-responsive-collapse-toggle-open'>+</span><span class='tabulator-responsive-collapse-toggle-close'>-</span>",e.getElement().classList.add("tabulator-row-handle"),n.addEventListener("click",function(e){e.stopImmediatePropagation(),i(!s.open)}),i(s.open),n},rowSelection:function(e,t,o){var i=this,n=document.createElement("input");if(n.type="checkbox",this.table.modExists("selectRow",!0))if(n.addEventListener("click",function(e){e.stopPropagation()}),"function"==typeof e.getRow){var s=e.getRow();s instanceof r?(n.addEventListener("change",function(e){s.toggleSelect()}),n.checked=s.isSelected&&s.isSelected(),this.table.modules.selectRow.registerRowSelectCheckbox(s,n)):n=""}else n.addEventListener("change",function(e){i.table.modules.selectRow.selectedRows.length?i.table.deselectRow():i.table.selectRow(t.rowRange)}),this.table.modules.selectRow.registerHeaderSelectCheckbox(n);return n}},h.prototype.registerModule("format",D);var k=function(e){this.table=e,this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.rightPadding=0,this.initializationMode="left",this.active=!1,this.scrollEndTimer=!1};k.prototype.reset=function(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.rightMargin=0,this.active=!1,this.table.columnManager.headersElement.style.marginLeft=0,this.table.columnManager.element.style.paddingRight=0},k.prototype.initializeColumn=function(e){var t={margin:0,edge:!1};e.isGroup||(this.frozenCheck(e)?(t.position=this.initializationMode,"left"==this.initializationMode?this.leftColumns.push(e):this.rightColumns.unshift(e),this.active=!0,e.modules.frozen=t):this.initializationMode="right")},k.prototype.frozenCheck=function(e){return e.parent.isGroup&&e.definition.frozen&&console.warn("Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups"),e.parent.isGroup?this.frozenCheck(e.parent):e.definition.frozen},k.prototype.scrollHorizontal=function(){var e,t=this;this.active&&(clearTimeout(this.scrollEndTimer),this.scrollEndTimer=setTimeout(function(){t.layout()},100),e=this.table.rowManager.getVisibleRows(),this.calcMargins(),this.layoutColumnPosition(),this.layoutCalcRows(),e.forEach(function(e){"row"===e.type&&t.layoutRow(e)}),this.table.rowManager.tableElement.style.marginRight=this.rightMargin)},k.prototype.calcMargins=function(){this.leftMargin=this._calcSpace(this.leftColumns,this.leftColumns.length)+"px",this.table.columnManager.headersElement.style.marginLeft=this.leftMargin,this.rightMargin=this._calcSpace(this.rightColumns,this.rightColumns.length)+"px",this.table.columnManager.element.style.paddingRight=this.rightMargin,this.rightPadding=this.table.rowManager.element.clientWidth+this.table.columnManager.scrollLeft},k.prototype.layoutCalcRows=function(){this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&this.table.modules.columnCalcs.topRow&&this.layoutRow(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&this.table.modules.columnCalcs.botRow&&this.layoutRow(this.table.modules.columnCalcs.botRow))},k.prototype.layoutColumnPosition=function(e){var t=this,o=[];this.leftColumns.forEach(function(i,n){if(i.modules.frozen.margin=t._calcSpace(t.leftColumns,n)+t.table.columnManager.scrollLeft+"px",n==t.leftColumns.length-1?i.modules.frozen.edge=!0:i.modules.frozen.edge=!1,i.parent.isGroup){var s=t.getColGroupParentElement(i);o.includes(s)||(t.layoutElement(s,i),o.push(s)),i.modules.frozen.edge&&s.classList.add("tabulator-frozen-"+i.modules.frozen.position)}else t.layoutElement(i.getElement(),i);e&&i.cells.forEach(function(e){t.layoutElement(e.getElement(),i)})}),this.rightColumns.forEach(function(o,i){o.modules.frozen.margin=t.rightPadding-t._calcSpace(t.rightColumns,i+1)+"px",i==t.rightColumns.length-1?o.modules.frozen.edge=!0:o.modules.frozen.edge=!1,o.parent.isGroup?t.layoutElement(t.getColGroupParentElement(o),o):t.layoutElement(o.getElement(),o),e&&o.cells.forEach(function(e){t.layoutElement(e.getElement(),o)})})},k.prototype.getColGroupParentElement=function(e){return e.parent.isGroup?this.getColGroupParentElement(e.parent):e.getElement()},k.prototype.layout=function(){var e=this;e.active&&(this.calcMargins(),e.table.rowManager.getDisplayRows().forEach(function(t){"row"===t.type&&e.layoutRow(t)}),this.layoutCalcRows(),this.layoutColumnPosition(!0),this.table.rowManager.tableElement.style.marginRight=this.rightMargin)},k.prototype.layoutRow=function(e){var t=this;e.getElement().style.paddingLeft=this.leftMargin,this.leftColumns.forEach(function(o){var i=e.getCell(o);i&&t.layoutElement(i.getElement(),o)}),this.rightColumns.forEach(function(o){var i=e.getCell(o);i&&t.layoutElement(i.getElement(),o)})},k.prototype.layoutElement=function(e,t){t.modules.frozen&&(e.style.position="absolute",e.style.left=t.modules.frozen.margin,e.classList.add("tabulator-frozen"),t.modules.frozen.edge&&e.classList.add("tabulator-frozen-"+t.modules.frozen.position))},k.prototype._calcSpace=function(e,t){for(var o=0,i=0;i<t;i++)e[i].visible&&(o+=e[i].getWidth());return o},h.prototype.registerModule("frozenColumns",k);var z=function(e){this.table=e,this.topElement=document.createElement("div"),this.rows=[],this.displayIndex=0};z.prototype.initialize=function(){this.rows=[],this.topElement.classList.add("tabulator-frozen-rows-holder"),this.table.columnManager.getElement().insertBefore(this.topElement,this.table.columnManager.headersElement.nextSibling)},z.prototype.setDisplayIndex=function(e){this.displayIndex=e},z.prototype.getDisplayIndex=function(){return this.displayIndex},z.prototype.isFrozen=function(){return!!this.rows.length},z.prototype.getRows=function(e){var t=e.slice(0);return this.rows.forEach(function(e){var o=t.indexOf(e);o>-1&&t.splice(o,1)}),t},z.prototype.freezeRow=function(e){e.modules.frozen?console.warn("Freeze Error - Row is already frozen"):(e.modules.frozen=!0,this.topElement.appendChild(e.getElement()),e.initialize(),e.normalizeHeight(),this.table.rowManager.adjustTableSize(),this.rows.push(e),this.table.rowManager.refreshActiveData("display"),this.styleRows())},z.prototype.unfreezeRow=function(e){this.rows.indexOf(e);e.modules.frozen?(e.modules.frozen=!1,this.detachRow(e),this.table.rowManager.adjustTableSize(),this.table.rowManager.refreshActiveData("display"),this.rows.length&&this.styleRows()):console.warn("Freeze Error - Row is already unfrozen")},z.prototype.detachRow=function(e){var t=this.rows.indexOf(e);if(t>-1){var o=e.getElement();o.parentNode.removeChild(o),this.rows.splice(t,1)}},z.prototype.styleRows=function(e){var t=this;this.rows.forEach(function(e,o){t.table.rowManager.styleRow(e,o)})},h.prototype.registerModule("frozenRows",z);var S=function(e){this._group=e,this.type="GroupComponent"};S.prototype.getKey=function(){return this._group.key},S.prototype.getField=function(){return this._group.field},S.prototype.getElement=function(){return this._group.element},S.prototype.getRows=function(){return this._group.getRows(!0)},S.prototype.getSubGroups=function(){return this._group.getSubGroups(!0)},S.prototype.getParentGroup=function(){return!!this._group.parent&&this._group.parent.getComponent()},S.prototype.getVisibility=function(){return console.warn("getVisibility function is deprecated, you should now use the isVisible function"),this._group.visible},S.prototype.isVisible=function(){return this._group.visible},S.prototype.show=function(){this._group.show()},S.prototype.hide=function(){this._group.hide()},S.prototype.toggle=function(){this._group.toggleVisibility()},S.prototype._getSelf=function(){return this._group},S.prototype.getTable=function(){return this._group.groupManager.table};var H=function(e,t,o,i,n,s,a){this.groupManager=e,this.parent=t,this.key=i,this.level=o,this.field=n,this.hasSubGroups=o<e.groupIDLookups.length-1,this.addRow=this.hasSubGroups?this._addRowToGroup:this._addRow,this.type="group",this.old=a,this.rows=[],this.groups=[],this.groupList=[],this.generator=s,this.elementContents=!1,this.height=0,this.outerHeight=0,this.initialized=!1,this.calcs={},this.initialized=!1,this.modules={},this.arrowElement=!1,this.visible=a?a.visible:void 0!==e.startOpen[o]?e.startOpen[o]:e.startOpen[0],this.component=null,this.createElements(),this.addBindings(),this.createValueGroups()};H.prototype.wipe=function(){this.groupList.length?this.groupList.forEach(function(e){e.wipe()}):(this.element=!1,this.arrowElement=!1,this.elementContents=!1)},H.prototype.createElements=function(){var e=document.createElement("div");e.classList.add("tabulator-arrow"),this.element=document.createElement("div"),this.element.classList.add("tabulator-row"),this.element.classList.add("tabulator-group"),this.element.classList.add("tabulator-group-level-"+this.level),this.element.setAttribute("role","rowgroup"),this.arrowElement=document.createElement("div"),this.arrowElement.classList.add("tabulator-group-toggle"),this.arrowElement.appendChild(e),!1!==this.groupManager.table.options.movableRows&&this.groupManager.table.modExists("moveRow")&&this.groupManager.table.modules.moveRow.initializeGroupHeader(this)},H.prototype.createValueGroups=function(){var e=this,t=this.level+1;this.groupManager.allowedValues&&this.groupManager.allowedValues[t]&&this.groupManager.allowedValues[t].forEach(function(o){e._createGroup(o,t)})},H.prototype.addBindings=function(){var e,t,o,i,n=this;n.groupManager.table.options.groupClick&&n.element.addEventListener("click",function(e){n.groupManager.table.options.groupClick.call(n.groupManager.table,e,n.getComponent())}),n.groupManager.table.options.groupDblClick&&n.element.addEventListener("dblclick",function(e){n.groupManager.table.options.groupDblClick.call(n.groupManager.table,e,n.getComponent())}),n.groupManager.table.options.groupContext&&n.element.addEventListener("contextmenu",function(e){n.groupManager.table.options.groupContext.call(n.groupManager.table,e,n.getComponent())}),(n.groupManager.table.options.groupContextMenu||n.groupManager.table.options.groupClickMenu)&&n.groupManager.table.modExists("menu")&&n.groupManager.table.modules.menu.initializeGroup.call(n.groupManager.table.modules.menu,n),n.groupManager.table.options.groupTap&&(o=!1,n.element.addEventListener("touchstart",function(e){o=!0},{passive:!0}),n.element.addEventListener("touchend",function(e){o&&n.groupManager.table.options.groupTap(e,n.getComponent()),o=!1})),n.groupManager.table.options.groupDblTap&&(e=null,n.element.addEventListener("touchend",function(t){e?(clearTimeout(e),e=null,n.groupManager.table.options.groupDblTap(t,n.getComponent())):e=setTimeout(function(){clearTimeout(e),e=null},300)})),n.groupManager.table.options.groupTapHold&&(t=null,n.element.addEventListener("touchstart",function(e){clearTimeout(t),t=setTimeout(function(){clearTimeout(t),t=null,o=!1,n.groupManager.table.options.groupTapHold(e,n.getComponent())},1e3)},{passive:!0}),n.element.addEventListener("touchend",function(e){clearTimeout(t),t=null})),n.groupManager.table.options.groupToggleElement&&(i="arrow"==n.groupManager.table.options.groupToggleElement?n.arrowElement:n.element,i.addEventListener("click",function(e){e.stopPropagation(),e.stopImmediatePropagation(),n.toggleVisibility()}))},H.prototype._createGroup=function(e,t){
-var o=t+"_"+e,i=new H(this.groupManager,this,t,e,this.groupManager.groupIDLookups[t].field,this.groupManager.headerGenerator[t]||this.groupManager.headerGenerator[0],!!this.old&&this.old.groups[o]);this.groups[o]=i,this.groupList.push(i)},H.prototype._addRowToGroup=function(e){var t=this.level+1;if(this.hasSubGroups){var o=this.groupManager.groupIDLookups[t].func(e.getData()),i=t+"_"+o;this.groupManager.allowedValues&&this.groupManager.allowedValues[t]?this.groups[i]&&this.groups[i].addRow(e):(this.groups[i]||this._createGroup(o,t),this.groups[i].addRow(e))}},H.prototype._addRow=function(e){this.rows.push(e),e.modules.group=this},H.prototype.insertRow=function(e,t,o){var i=this.conformRowData({});e.updateData(i);var n=this.rows.indexOf(t);n>-1?o?this.rows.splice(n+1,0,e):this.rows.splice(n,0,e):o?this.rows.push(e):this.rows.unshift(e),e.modules.group=this,this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this),this.groupManager.updateGroupRows(!0)},H.prototype.scrollHeader=function(e){this.arrowElement.style.marginLeft=e,this.groupList.forEach(function(t){t.scrollHeader(e)})},H.prototype.getRowIndex=function(e){},H.prototype.conformRowData=function(e){return this.field?e[this.field]=this.key:console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"),this.parent&&(e=this.parent.conformRowData(e)),e},H.prototype.removeRow=function(e){var t=this.rows.indexOf(e),o=e.getElement();t>-1&&this.rows.splice(t,1),this.groupManager.table.options.groupValues||this.rows.length?(o.parentNode&&o.parentNode.removeChild(o),this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this)):(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this),this.groupManager.updateGroupRows(!0))},H.prototype.removeGroup=function(e){var t,o=e.level+"_"+e.key;this.groups[o]&&(delete this.groups[o],t=this.groupList.indexOf(e),t>-1&&this.groupList.splice(t,1),this.groupList.length||(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this)))},H.prototype.getHeadersAndRows=function(e){var t=[];return t.push(this),this._visSet(),this.visible?this.groupList.length?this.groupList.forEach(function(o){t=t.concat(o.getHeadersAndRows(e))}):(!e&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),t.push(this.calcs.top)),t=t.concat(this.rows),!e&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),t.push(this.calcs.bottom))):this.groupList.length||"table"==this.groupManager.table.options.columnCalcs||this.groupManager.table.modExists("columnCalcs")&&(!e&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),t.push(this.calcs.top))),!e&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),t.push(this.calcs.bottom)))),t},H.prototype.getData=function(e,t){var o=[];return this._visSet(),(!e||e&&this.visible)&&this.rows.forEach(function(e){o.push(e.getData(t||"data"))}),o},H.prototype.getRowCount=function(){var e=0;return this.groupList.length?this.groupList.forEach(function(t){e+=t.getRowCount()}):e=this.rows.length,e},H.prototype.toggleVisibility=function(){this.visible?this.hide():this.show()},H.prototype.hide=function(){this.visible=!1,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination?this.groupManager.updateGroupRows(!0):(this.element.classList.remove("tabulator-group-visible"),this.groupList.length?this.groupList.forEach(function(e){e.getHeadersAndRows().forEach(function(e){e.detachElement()})}):this.rows.forEach(function(e){var t=e.getElement();t.parentNode.removeChild(t)}),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()),this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!1)},H.prototype.show=function(){var e=this;if(e.visible=!0,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination)this.groupManager.updateGroupRows(!0);else{this.element.classList.add("tabulator-group-visible");var t=e.getElement();this.groupList.length?this.groupList.forEach(function(e){e.getHeadersAndRows().forEach(function(e){var o=e.getElement();t.parentNode.insertBefore(o,t.nextSibling),e.initialize(),t=o})}):e.rows.forEach(function(e){var o=e.getElement();t.parentNode.insertBefore(o,t.nextSibling),e.initialize(),t=o}),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()}this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!0)},H.prototype._visSet=function(){var e=[];"function"==typeof this.visible&&(this.rows.forEach(function(t){e.push(t.getData())}),this.visible=this.visible(this.key,this.getRowCount(),e,this.getComponent()))},H.prototype.getRowGroup=function(e){var t=!1;return this.groupList.length?this.groupList.forEach(function(o){var i=o.getRowGroup(e);i&&(t=i)}):this.rows.find(function(t){return t===e})&&(t=this),t},H.prototype.getSubGroups=function(e){var t=[];return this.groupList.forEach(function(o){t.push(e?o.getComponent():o)}),t},H.prototype.getRows=function(e){var t=[];return this.rows.forEach(function(o){t.push(e?o.getComponent():o)}),t},H.prototype.generateGroupHeaderContents=function(){var e=[];for(this.rows.forEach(function(t){e.push(t.getData())}),this.elementContents=this.generator(this.key,this.getRowCount(),e,this.getComponent());this.element.firstChild;)this.element.removeChild(this.element.firstChild);"string"==typeof this.elementContents?this.element.innerHTML=this.elementContents:this.element.appendChild(this.elementContents),this.element.insertBefore(this.arrowElement,this.element.firstChild)},H.prototype.getPath=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.unshift(this.key),this.parent&&this.parent.getPath(e),e},H.prototype.getElement=function(){this.addBindingsd=!1,this._visSet(),this.visible?this.element.classList.add("tabulator-group-visible"):this.element.classList.remove("tabulator-group-visible");for(var e=0;e<this.element.childNodes.length;++e)this.element.childNodes[e].parentNode.removeChild(this.element.childNodes[e]);return this.generateGroupHeaderContents(),this.element},H.prototype.detachElement=function(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)},H.prototype.normalizeHeight=function(){this.setHeight(this.element.clientHeight)},H.prototype.initialize=function(e){this.initialized&&!e||(this.normalizeHeight(),this.initialized=!0)},H.prototype.reinitialize=function(){this.initialized=!1,this.height=0,h.prototype.helpers.elVisible(this.element)&&this.initialize(!0)},H.prototype.setHeight=function(e){this.height!=e&&(this.height=e,this.outerHeight=this.element.offsetHeight)},H.prototype.getHeight=function(){return this.outerHeight},H.prototype.getGroup=function(){return this},H.prototype.reinitializeHeight=function(){},H.prototype.calcHeight=function(){},H.prototype.setCellHeight=function(){},H.prototype.clearCellHeight=function(){},H.prototype.getComponent=function(){return this.component||(this.component=new S(this)),this.component};var P=function(e){this.table=e,this.groupIDLookups=!1,this.startOpen=[function(){return!1}],this.headerGenerator=[function(){return""}],this.groupList=[],this.allowedValues=!1,this.groups={},this.displayIndex=0};P.prototype.initialize=function(){var e=this,t=e.table.options.groupBy,o=e.table.options.groupStartOpen,i=e.table.options.groupHeader;if(this.allowedValues=e.table.options.groupValues,Array.isArray(t)&&Array.isArray(i)&&t.length>i.length&&console.warn("Error creating group headers, groupHeader array is shorter than groupBy array"),e.headerGenerator=[function(){return""}],this.startOpen=[function(){return!1}],e.table.modules.localize.bind("groups|item",function(t,o){e.headerGenerator[0]=function(e,i,n){return(void 0===e?"":e)+"<span>("+i+" "+(1===i?t:o.groups.items)+")</span>"}}),this.groupIDLookups=[],Array.isArray(t)||t)this.table.modExists("columnCalcs")&&"table"!=this.table.options.columnCalcs&&"both"!=this.table.options.columnCalcs&&this.table.modules.columnCalcs.removeCalcs();else if(this.table.modExists("columnCalcs")&&"group"!=this.table.options.columnCalcs){var n=this.table.columnManager.getRealColumns();n.forEach(function(t){t.definition.topCalc&&e.table.modules.columnCalcs.initializeTopRow(),t.definition.bottomCalc&&e.table.modules.columnCalcs.initializeBottomRow()})}Array.isArray(t)||(t=[t]),t.forEach(function(t,o){var i,n;"function"==typeof t?i=t:(n=e.table.columnManager.getColumnByField(t),i=n?function(e){return n.getFieldValue(e)}:function(e){return e[t]}),e.groupIDLookups.push({field:"function"!=typeof t&&t,func:i,values:!!e.allowedValues&&e.allowedValues[o]})}),o&&(Array.isArray(o)||(o=[o]),o.forEach(function(e){e="function"==typeof e?e:function(){return!0}}),e.startOpen=o),i&&(e.headerGenerator=Array.isArray(i)?i:[i]),this.initialized=!0},P.prototype.setDisplayIndex=function(e){this.displayIndex=e},P.prototype.getDisplayIndex=function(){return this.displayIndex},P.prototype.getRows=function(e){return this.groupIDLookups.length?(this.table.options.dataGrouping.call(this.table),this.generateGroups(e),this.table.options.dataGrouped&&this.table.options.dataGrouped.call(this.table,this.getGroups(!0)),this.updateGroupRows()):e.slice(0)},P.prototype.getGroups=function(e){var t=[];return this.groupList.forEach(function(o){t.push(e?o.getComponent():o)}),t},P.prototype.getChildGroups=function(e){var t=this,o=[];return e||(e=this),e.groupList.forEach(function(e){e.groupList.length?o=o.concat(t.getChildGroups(e)):o.push(e)}),o},P.prototype.wipe=function(){this.groupList.forEach(function(e){e.wipe()})},P.prototype.pullGroupListData=function(e){var t=this,o=[];return e.forEach(function(e){var i={};i.level=0,i.rowCount=0,i.headerContent="";var n=[];e.hasSubGroups?(n=t.pullGroupListData(e.groupList),i.level=e.level,i.rowCount=n.length-e.groupList.length,i.headerContent=e.generator(e.key,i.rowCount,e.rows,e),o.push(i),o=o.concat(n)):(i.level=e.level,i.headerContent=e.generator(e.key,e.rows.length,e.rows,e),i.rowCount=e.getRows().length,o.push(i),e.getRows().forEach(function(e){o.push(e.getData("data"))}))}),o},P.prototype.getGroupedData=function(){return this.pullGroupListData(this.groupList)},P.prototype.getRowGroup=function(e){var t=!1;return this.groupList.forEach(function(o){var i=o.getRowGroup(e);i&&(t=i)}),t},P.prototype.countGroups=function(){return this.groupList.length},P.prototype.generateGroups=function(e){var t=this,o=t.groups;t.groups={},t.groupList=[],this.allowedValues&&this.allowedValues[0]?(this.allowedValues[0].forEach(function(e){t.createGroup(e,0,o)}),e.forEach(function(e){t.assignRowToExistingGroup(e,o)})):e.forEach(function(e){t.assignRowToGroup(e,o)})},P.prototype.createGroup=function(e,t,o){var i,n=t+"_"+e;o=o||[],i=new H(this,!1,t,e,this.groupIDLookups[0].field,this.headerGenerator[0],o[n]),this.groups[n]=i,this.groupList.push(i)},P.prototype.assignRowToExistingGroup=function(e,t){var o=this.groupIDLookups[0].func(e.getData()),i="0_"+o;this.groups[i]&&this.groups[i].addRow(e)},P.prototype.assignRowToGroup=function(e,t){var o=this.groupIDLookups[0].func(e.getData()),i=!this.groups["0_"+o];return i&&this.createGroup(o,0,t),this.groups["0_"+o].addRow(e),!i},P.prototype.reassignRowToGroup=function(e){var t=e.getGroup(),o=t.getPath(),i=this.getExpectedPath(e);o.length==i.length&&o.every(function(e,t){return e===i[t]})||(t.removeRow(e),this.assignRowToGroup(e,self.groups),this.table.rowManager.refreshActiveData("group",!1,!0))},P.prototype.getExpectedPath=function(e){var t=[],o=e.getData();return this.groupIDLookups.forEach(function(e){t.push(e.func(o))}),t},P.prototype.updateGroupRows=function(e){var t=this,o=[];if(t.groupList.forEach(function(e){o=o.concat(e.getHeadersAndRows())}),e){var i=t.table.rowManager.setDisplayRows(o,this.getDisplayIndex());!0!==i&&this.setDisplayIndex(i),t.table.rowManager.refreshActiveData("group",!0,!0)}return o},P.prototype.scrollHeaders=function(e){this.table.options.virtualDomHoz&&(e-=this.table.vdomHoz.vDomPadLeft),e+="px",this.groupList.forEach(function(t){t.scrollHeader(e)})},P.prototype.removeGroup=function(e){var t,o=e.level+"_"+e.key;this.groups[o]&&(delete this.groups[o],(t=this.groupList.indexOf(e))>-1&&this.groupList.splice(t,1))},h.prototype.registerModule("groupRows",P);var A=function(e){this.table=e,this.history=[],this.index=-1};A.prototype.clear=function(){this.history=[],this.index=-1},A.prototype.action=function(e,t,o){this.history=this.history.slice(0,this.index+1),this.history.push({type:e,component:t,data:o}),this.index++},A.prototype.getHistoryUndoSize=function(){return this.index+1},A.prototype.getHistoryRedoSize=function(){return this.history.length-(this.index+1)},A.prototype.clearComponentHistory=function(e){var t=this.history.findIndex(function(t){return t.component===e});t>-1&&(this.history.splice(t,1),t<=this.index&&this.index--,this.clearComponentHistory(e))},A.prototype.undo=function(){if(this.index>-1){var e=this.history[this.index];return this.undoers[e.type].call(this,e),this.index--,this.table.options.historyUndo.call(this.table,e.type,e.component.getComponent(),e.data),!0}return console.warn("History Undo Error - No more history to undo"),!1},A.prototype.redo=function(){if(this.history.length-1>this.index){this.index++;var e=this.history[this.index];return this.redoers[e.type].call(this,e),this.table.options.historyRedo.call(this.table,e.type,e.component.getComponent(),e.data),!0}return console.warn("History Redo Error - No more history to redo"),!1},A.prototype.undoers={cellEdit:function(e){e.component.setValueProcessData(e.data.oldValue)},rowAdd:function(e){e.component.deleteActual()},rowDelete:function(e){var t=this.table.rowManager.addRowActual(e.data.data,e.data.pos,e.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(e.component,t)},rowMove:function(e){this.table.rowManager.moveRowActual(e.component,this.table.rowManager.rows[e.data.posFrom],!e.data.after),this.table.rowManager.redraw()}},A.prototype.redoers={cellEdit:function(e){e.component.setValueProcessData(e.data.newValue)},rowAdd:function(e){var t=this.table.rowManager.addRowActual(e.data.data,e.data.pos,e.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(e.component,t)},rowDelete:function(e){e.component.deleteActual()},rowMove:function(e){this.table.rowManager.moveRowActual(e.component,this.table.rowManager.rows[e.data.posTo],e.data.after),this.table.rowManager.redraw()}},A.prototype._rebindRow=function(e,t){this.history.forEach(function(o){if(o.component instanceof l)o.component===e&&(o.component=t);else if(o.component instanceof u&&o.component.row===e){var i=o.component.column.getField();i&&(o.component=t.getCell(i))}})},h.prototype.registerModule("history",A);var _=function(e){this.table=e,this.fieldIndex=[],this.hasIndex=!1};_.prototype.parseTable=function(){var e=this,t=e.table.element,o=e.table.options,i=(o.columns,t.getElementsByTagName("th")),n=t.getElementsByTagName("tbody")[0],s=[];e.hasIndex=!1,e.table.options.htmlImporting.call(this.table),n=n?n.getElementsByTagName("tr"):[],e._extractOptions(t,o),i.length?e._extractHeaders(i,n):e._generateBlankHeaders(i,n);for(var a=0;a<n.length;a++){var r=n[a],l=r.getElementsByTagName("td"),c={};e.hasIndex||(c[o.index]=a);for(var u=0;u<l.length;u++){var d=l[u];void 0!==this.fieldIndex[u]&&(c[this.fieldIndex[u]]=d.innerHTML)}s.push(c)}var h=document.createElement("div"),p=t.attributes;for(var u in p)"object"==_typeof(p[u])&&h.setAttribute(p[u].name,p[u].value);t.parentNode.replaceChild(h,t),o.data=s,e.table.options.htmlImported.call(this.table),this.table.element=h},_.prototype._extractOptions=function(e,t,o){var i=e.attributes,n=o?Object.assign([],o):Object.keys(t),s={};n.forEach(function(e){s[e.toLowerCase()]=e});for(var a in i){var r,l=i[a];l&&"object"==(void 0===l?"undefined":_typeof(l))&&l.name&&0===l.name.indexOf("tabulator-")&&(r=l.name.replace("tabulator-",""),void 0!==s[r]&&(t[s[r]]=this._attribValue(l.value)))}},_.prototype._attribValue=function(e){return"true"===e||"false"!==e&&e},_.prototype._findCol=function(e){return this.table.options.columns.find(function(t){return t.title===e})||!1},_.prototype._extractHeaders=function(e,t){for(var o=0;o<e.length;o++){var i,s=e[o],a=!1,r=this._findCol(s.textContent);r?a=!0:r={title:s.textContent.trim()},r.field||(r.field=s.textContent.trim().toLowerCase().replace(" ","_")),i=s.getAttribute("width"),i&&!r.width&&(r.width=i),s.attributes,this._extractOptions(s,r,n.prototype.defaultOptionList),this.fieldIndex[o]=r.field,r.field==this.table.options.index&&(this.hasIndex=!0),a||this.table.options.columns.push(r)}},_.prototype._generateBlankHeaders=function(e,t){for(var o=0;o<e.length;o++){var i=e[o],n={title:"",field:"col"+o};this.fieldIndex[o]=n.field;var s=i.getAttribute("width");s&&(n.width=s),this.table.options.columns.push(n)}},h.prototype.registerModule("htmlTableImport",_);var F=function(e){this.table=e,this.watchKeys=null,this.pressedKeys=null,this.keyupBinding=!1,this.keydownBinding=!1};F.prototype.initialize=function(){var e=this.table.options.keybindings,t={};if(this.watchKeys={},this.pressedKeys=[],!1!==e){for(var o in this.bindings)t[o]=this.bindings[o];if(Object.keys(e).length)for(var i in e)t[i]=e[i];this.mapBindings(t),this.bindEvents()}},F.prototype.mapBindings=function(e){var t=this,o=this;for(var i in e)!function(i){t.actions[i]?e[i]&&("object"!==_typeof(e[i])&&(e[i]=[e[i]]),e[i].forEach(function(e){o.mapBinding(i,e)})):console.warn("Key Binding Error - no such action:",i)}(i)},F.prototype.mapBinding=function(e,t){var o=this,i={action:this.actions[e],keys:[],ctrl:!1,shift:!1,meta:!1};t.toString().toLowerCase().split(" ").join("").split("+").forEach(function(e){switch(e){case"ctrl":i.ctrl=!0;break;case"shift":i.shift=!0;break;case"meta":i.meta=!0;break;default:e=parseInt(e),i.keys.push(e),o.watchKeys[e]||(o.watchKeys[e]=[]),o.watchKeys[e].push(i)}})},F.prototype.bindEvents=function(){var e=this;this.keyupBinding=function(t){var o=t.keyCode,i=e.watchKeys[o];i&&(e.pressedKeys.push(o),i.forEach(function(o){e.checkBinding(t,o)}))},this.keydownBinding=function(t){var o=t.keyCode;if(e.watchKeys[o]){var i=e.pressedKeys.indexOf(o);i>-1&&e.pressedKeys.splice(i,1)}},this.table.element.addEventListener("keydown",this.keyupBinding),this.table.element.addEventListener("keyup",this.keydownBinding)},F.prototype.clearBindings=function(){this.keyupBinding&&this.table.element.removeEventListener("keydown",this.keyupBinding),this.keydownBinding&&this.table.element.removeEventListener("keyup",this.keydownBinding)},F.prototype.checkBinding=function(e,t){var o=this,i=!0;return e.ctrlKey==t.ctrl&&e.shiftKey==t.shift&&e.metaKey==t.meta&&(t.keys.forEach(function(e){-1==o.pressedKeys.indexOf(e)&&(i=!1)}),i&&t.action.call(o,e),!0)},F.prototype.bindings={navPrev:"shift + 9",navNext:9,navUp:38,navDown:40,scrollPageUp:33,scrollPageDown:34,scrollToStart:36,scrollToEnd:35,undo:"ctrl + 90",redo:"ctrl + 89",copyToClipboard:"ctrl + 67"},F.prototype.actions={keyBlock:function(e){e.stopPropagation(),e.preventDefault()},scrollPageUp:function(e){var t=this.table.rowManager,o=t.scrollTop-t.height;t.element.scrollHeight;e.preventDefault(),t.displayRowsCount&&(o>=0?t.element.scrollTop=o:t.scrollToRow(t.getDisplayRows()[0])),this.table.element.focus()},scrollPageDown:function(e){var t=this.table.rowManager,o=t.scrollTop+t.height,i=t.element.scrollHeight;e.preventDefault(),t.displayRowsCount&&(o<=i?t.element.scrollTop=o:t.scrollToRow(t.getDisplayRows()[t.displayRowsCount-1])),this.table.element.focus()},scrollToStart:function(e){var t=this.table.rowManager;e.preventDefault(),t.displayRowsCount&&t.scrollToRow(t.getDisplayRows()[0]),this.table.element.focus()},scrollToEnd:function(e){var t=this.table.rowManager;e.preventDefault(),t.displayRowsCount&&t.scrollToRow(t.getDisplayRows()[t.displayRowsCount-1]),this.table.element.focus()},navPrev:function(e){var t=!1;this.table.modExists("edit")&&(t=this.table.modules.edit.currentCell)&&(e.preventDefault(),t.nav().prev())},navNext:function(e){var t,o=!1,i=this.table.options.tabEndNewRow;this.table.modExists("edit")&&(o=this.table.modules.edit.currentCell)&&(e.preventDefault(),t=o.nav(),t.next()||i&&(o.getElement().firstChild.blur(),i=!0===i?this.table.addRow({}):"function"==typeof i?this.table.addRow(i(o.row.getComponent())):this.table.addRow(Object.assign({},i)),i.then(function(){setTimeout(function(){t.next()})})))},navLeft:function(e){var t=!1;this.table.modExists("edit")&&(t=this.table.modules.edit.currentCell)&&(e.preventDefault(),t.nav().left())},navRight:function(e){var t=!1;this.table.modExists("edit")&&(t=this.table.modules.edit.currentCell)&&(e.preventDefault(),t.nav().right())},navUp:function(e){var t=!1;this.table.modExists("edit")&&(t=this.table.modules.edit.currentCell)&&(e.preventDefault(),t.nav().up())},navDown:function(e){var t=!1;this.table.modExists("edit")&&(t=this.table.modules.edit.currentCell)&&(e.preventDefault(),t.nav().down())},undo:function(e){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(e.preventDefault(),this.table.modules.history.undo()))},redo:function(e){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(e.preventDefault(),this.table.modules.history.redo()))},copyToClipboard:function(e){this.table.modules.edit.currentCell||this.table.modExists("clipboard",!0)&&this.table.modules.clipboard.copy(!1,!0)}},h.prototype.registerModule("keybindings",F);var N=function(e){this.table=e,this.menuEl=!1,this.blurEvent=this.hideMenu.bind(this),this.escEvent=this.escMenu.bind(this),this.nestedMenuBlock=!1};N.prototype.initializeColumnHeader=function(e){var t,o=this;e.definition.headerContextMenu&&(e.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,e,e.definition.headerContextMenu)),this.tapHold(e,e.definition.headerContextMenu)),e.definition.headerMenu&&(t=document.createElement("span"),t.classList.add("tabulator-header-menu-button"),t.innerHTML="⋮",t.addEventListener("click",function(t){var i="function"==typeof e.definition.headerMenu?e.definition.headerMenu(e.getComponent(),t):e.definition.headerMenu;t.stopPropagation(),t.preventDefault(),o.loadMenu(t,e,i)}),e.titleElement.insertBefore(t,e.titleElement.firstChild))},N.prototype.LoadMenuEvent=function(e,t,o){t="function"==typeof t?t(e.getComponent(),o):t,this.loadMenu(o,e,t)},N.prototype.tapHold=function(e,t){var o=this,i=e.getElement(),n=null,s=!1;i.addEventListener("touchstart",function(i){clearTimeout(n),s=!1,n=setTimeout(function(){clearTimeout(n),n=null,s=!0,o.LoadMenuEvent(e,t,i)},1e3)},{passive:!0}),i.addEventListener("touchend",function(e){clearTimeout(n),n=null,s&&e.preventDefault()})},N.prototype.initializeCell=function(e){e.column.definition.contextMenu&&(e.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,e,e.column.definition.contextMenu)),this.tapHold(e,e.column.definition.contextMenu)),e.column.definition.clickMenu&&e.getElement().addEventListener("click",this.LoadMenuEvent.bind(this,e,e.column.definition.clickMenu))},N.prototype.initializeRow=function(e){this.table.options.rowContextMenu&&(e.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,e,this.table.options.rowContextMenu)),this.tapHold(e,this.table.options.rowContextMenu)),this.table.options.rowClickMenu&&e.getElement().addEventListener("click",this.LoadMenuEvent.bind(this,e,this.table.options.rowClickMenu))},N.prototype.initializeGroup=function(e){this.table.options.groupContextMenu&&(e.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,e,this.table.options.groupContextMenu)),this.tapHold(e,this.table.options.groupContextMenu)),this.table.options.groupClickMenu&&e.getElement().addEventListener("click",this.LoadMenuEvent.bind(this,e,this.table.options.groupClickMenu))},N.prototype.loadMenu=function(e,t,o){var i=this,n=Math.max(document.body.offsetHeight,window.innerHeight),s=!(e instanceof MouseEvent);if(s||e.preventDefault(),o&&o.length){if(this.nestedMenuBlock){if(this.isOpen())return}else this.nestedMenuBlock=setTimeout(function(){i.nestedMenuBlock=!1},100);this.hideMenu(),this.menuEl=document.createElement("div"),this.menuEl.classList.add("tabulator-menu"),o.forEach(function(e){var o=document.createElement("div"),n=e.label,s=e.disabled;e.separator?o.classList.add("tabulator-menu-separator"):(o.classList.add("tabulator-menu-item"),"function"==typeof n&&(n=n(t.getComponent())),n instanceof Node?o.appendChild(n):o.innerHTML=n,"function"==typeof s&&(s=s(t.getComponent())),s?(o.classList.add("tabulator-menu-item-disabled"),o.addEventListener("click",function(e){e.stopPropagation()})):o.addEventListener("click",function(o){i.hideMenu(),e.action(o,t.getComponent())})),i.menuEl.appendChild(o)}),this.menuEl.style.top=(s?e.touches[0].pageY:e.pageY)+"px",this.menuEl.style.left=(s?e.touches[0].pageX:e.pageX)+"px",setTimeout(function(){i.table.rowManager.element.addEventListener("scroll",i.blurEvent),document.body.addEventListener("click",i.blurEvent),document.body.addEventListener("contextmenu",i.blurEvent),document.body.addEventListener("keydown",i.escEvent)},100),document.body.appendChild(this.menuEl),e.pageX+this.menuEl.offsetWidth>=document.body.offsetWidth&&(this.menuEl.style.left="",this.menuEl.style.right=document.body.offsetWidth-e.pageX+"px"),e.pageY+this.menuEl.offsetHeight>=n&&(this.menuEl.style.top="",this.menuEl.style.bottom=n-e.pageY+"px")}},N.prototype.isOpen=function(){return!!this.menuEl.parentNode},N.prototype.escMenu=function(e){27==e.keyCode&&this.hideMenu()},N.prototype.hideMenu=function(){this.menuEl.parentNode&&this.menuEl.parentNode.removeChild(this.menuEl),this.escEvent&&document.body.removeEventListener("keydown",this.escEvent),this.blurEvent&&(document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent))},N.prototype.menus={},h.prototype.registerModule("menu",N);var B=function(e){this.table=e,this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=250,this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.startX=0,this.autoScrollMargin=40,this.autoScrollStep=5,this.autoScrollTimeout=!1,this.touchMove=!1,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this)};B.prototype.createPlaceholderElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-col"),e.classList.add("tabulator-col-placeholder"),e},B.prototype.initializeColumn=function(e){var t,o=this,i={};e.modules.frozen||(t=e.getElement(),i.mousemove=function(i){e.parent===o.moving.parent&&((o.touchMove?i.touches[0].pageX:i.pageX)-h.prototype.helpers.elOffset(t).left+o.table.columnManager.element.scrollLeft>e.getWidth()/2?o.toCol===e&&o.toColAfter||(t.parentNode.insertBefore(o.placeholderElement,t.nextSibling),o.moveColumn(e,!0)):(o.toCol!==e||o.toColAfter)&&(t.parentNode.insertBefore(o.placeholderElement,t),o.moveColumn(e,!1)))}.bind(o),t.addEventListener("mousedown",function(t){o.touchMove=!1,1===t.which&&(o.checkTimeout=setTimeout(function(){o.startMove(t,e)},o.checkPeriod))}),t.addEventListener("mouseup",function(e){1===e.which&&o.checkTimeout&&clearTimeout(o.checkTimeout)}),o.bindTouchEvents(e)),e.modules.moveColumn=i},B.prototype.bindTouchEvents=function(e){var t,o,i,n,s,a,r,l=this,c=e.getElement(),u=!1;c.addEventListener("touchstart",function(c){l.checkTimeout=setTimeout(function(){l.touchMove=!0,t=e,o=e.nextColumn(),n=o?o.getWidth()/2:0,i=e.prevColumn(),s=i?i.getWidth()/2:0,a=0,r=0,u=!1,l.startMove(c,e)},l.checkPeriod)},{passive:!0}),c.addEventListener("touchmove",function(c){var d,h;l.moving&&(l.moveHover(c),u||(u=c.touches[0].pageX),d=c.touches[0].pageX-u,d>0?o&&d-a>n&&(h=o)!==e&&(u=c.touches[0].pageX,h.getElement().parentNode.insertBefore(l.placeholderElement,h.getElement().nextSibling),l.moveColumn(h,!0)):i&&-d-r>s&&(h=i)!==e&&(u=c.touches[0].pageX,h.getElement().parentNode.insertBefore(l.placeholderElement,h.getElement()),l.moveColumn(h,!1)),h&&(t=h,o=h.nextColumn(),a=n,n=o?o.getWidth()/2:0,i=h.prevColumn(),r=s,s=i?i.getWidth()/2:0))},{passive:!0}),c.addEventListener("touchend",function(e){l.checkTimeout&&clearTimeout(l.checkTimeout),l.moving&&l.endMove(e)})},B.prototype.startMove=function(e,t){var o=t.getElement();this.moving=t,this.startX=(this.touchMove?e.touches[0].pageX:e.pageX)-h.prototype.helpers.elOffset(o).left,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",o.parentNode.insertBefore(this.placeholderElement,o),o.parentNode.removeChild(o),this.hoverElement=o.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.table.columnManager.getElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.bottom="0",this.touchMove||(this._bindMouseMove(),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove)),this.moveHover(e)},B.prototype._bindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach(function(e){e.modules.moveColumn.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveColumn.mousemove)})},B.prototype._unbindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach(function(e){e.modules.moveColumn.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveColumn.mousemove)})},B.prototype.moveColumn=function(e,t){var o=this.moving.getCells();this.toCol=e,this.toColAfter=t,t?e.getCells().forEach(function(e,t){var i=e.getElement();i.parentNode.insertBefore(o[t].getElement(),i.nextSibling)}):e.getCells().forEach(function(e,t){var i=e.getElement();i.parentNode.insertBefore(o[t].getElement(),i)})},B.prototype.endMove=function(e){(1===e.which||this.touchMove)&&(this._unbindMouseMove(),this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement),
-this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toCol&&this.table.columnManager.moveColumnActual(this.moving,this.toCol,this.toColAfter),this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.touchMove||(document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove)))},B.prototype.moveHover=function(e){var t,o=this,i=o.table.columnManager.getElement(),n=i.scrollLeft,s=(o.touchMove?e.touches[0].pageX:e.pageX)-h.prototype.helpers.elOffset(i).left+n;o.hoverElement.style.left=s-o.startX+"px",s-n<o.autoScrollMargin&&(o.autoScrollTimeout||(o.autoScrollTimeout=setTimeout(function(){t=Math.max(0,n-5),o.table.rowManager.getElement().scrollLeft=t,o.autoScrollTimeout=!1},1))),n+i.clientWidth-s<o.autoScrollMargin&&(o.autoScrollTimeout||(o.autoScrollTimeout=setTimeout(function(){t=Math.min(i.clientWidth,n+5),o.table.rowManager.getElement().scrollLeft=t,o.autoScrollTimeout=!1},1)))},h.prototype.registerModule("moveColumn",B);var O=function(e){this.table=e,this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=150,this.moving=!1,this.toRow=!1,this.toRowAfter=!1,this.hasHandle=!1,this.startY=0,this.startX=0,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this),this.tableRowDropEvent=!1,this.touchMove=!1,this.connection=!1,this.connectionSelectorsTables=!1,this.connectionSelectorsElements=!1,this.connectionElements=[],this.connections=[],this.connectedTable=!1,this.connectedRow=!1};O.prototype.createPlaceholderElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-row"),e.classList.add("tabulator-row-placeholder"),e},O.prototype.initialize=function(e){this.connectionSelectorsTables=this.table.options.movableRowsConnectedTables,this.connectionSelectorsElements=this.table.options.movableRowsConnectedElements,this.connection=this.connectionSelectorsTables||this.connectionSelectorsElements},O.prototype.setHandle=function(e){this.hasHandle=e},O.prototype.initializeGroupHeader=function(e){var t=this,o={};o.mouseup=function(e){t.tableRowDrop(e,row)}.bind(t),o.mousemove=function(o){if(o.pageY-h.prototype.helpers.elOffset(e.element).top+t.table.rowManager.element.scrollTop>e.getHeight()/2){if(t.toRow!==e||!t.toRowAfter){var i=e.getElement();i.parentNode.insertBefore(t.placeholderElement,i.nextSibling),t.moveRow(e,!0)}}else if(t.toRow!==e||t.toRowAfter){var i=e.getElement();i.previousSibling&&(i.parentNode.insertBefore(t.placeholderElement,i),t.moveRow(e,!1))}}.bind(t),e.modules.moveRow=o},O.prototype.initializeRow=function(e){var t,o=this,i={};i.mouseup=function(t){o.tableRowDrop(t,e)}.bind(o),i.mousemove=function(t){if(t.pageY-h.prototype.helpers.elOffset(e.element).top+o.table.rowManager.element.scrollTop>e.getHeight()/2){if(o.toRow!==e||!o.toRowAfter){var i=e.getElement();i.parentNode.insertBefore(o.placeholderElement,i.nextSibling),o.moveRow(e,!0)}}else if(o.toRow!==e||o.toRowAfter){var i=e.getElement();i.parentNode.insertBefore(o.placeholderElement,i),o.moveRow(e,!1)}}.bind(o),this.hasHandle||(t=e.getElement(),t.addEventListener("mousedown",function(t){1===t.which&&(o.checkTimeout=setTimeout(function(){o.startMove(t,e)},o.checkPeriod))}),t.addEventListener("mouseup",function(e){1===e.which&&o.checkTimeout&&clearTimeout(o.checkTimeout)}),this.bindTouchEvents(e,e.getElement())),e.modules.moveRow=i},O.prototype.initializeCell=function(e){var t=this,o=e.getElement();o.addEventListener("mousedown",function(o){1===o.which&&(t.checkTimeout=setTimeout(function(){t.startMove(o,e.row)},t.checkPeriod))}),o.addEventListener("mouseup",function(e){1===e.which&&t.checkTimeout&&clearTimeout(t.checkTimeout)}),this.bindTouchEvents(e.row,e.getElement())},O.prototype.bindTouchEvents=function(e,t){var o,i,n,s,a,r,l,c=this,u=!1;t.addEventListener("touchstart",function(t){c.checkTimeout=setTimeout(function(){c.touchMove=!0,o=e,i=e.nextRow(),s=i?i.getHeight()/2:0,n=e.prevRow(),a=n?n.getHeight()/2:0,r=0,l=0,u=!1,c.startMove(t,e)},c.checkPeriod)},{passive:!0}),this.moving,this.toRow,this.toRowAfter,t.addEventListener("touchmove",function(t){var d,h;c.moving&&(t.preventDefault(),c.moveHover(t),u||(u=t.touches[0].pageY),d=t.touches[0].pageY-u,d>0?i&&d-r>s&&(h=i)!==e&&(u=t.touches[0].pageY,h.getElement().parentNode.insertBefore(c.placeholderElement,h.getElement().nextSibling),c.moveRow(h,!0)):n&&-d-l>a&&(h=n)!==e&&(u=t.touches[0].pageY,h.getElement().parentNode.insertBefore(c.placeholderElement,h.getElement()),c.moveRow(h,!1)),h&&(o=h,i=h.nextRow(),r=s,s=i?i.getHeight()/2:0,n=h.prevRow(),l=a,a=n?n.getHeight()/2:0))}),t.addEventListener("touchend",function(e){c.checkTimeout&&clearTimeout(c.checkTimeout),c.moving&&(c.endMove(e),c.touchMove=!1)})},O.prototype._bindMouseMove=function(){this.table.rowManager.getDisplayRows().forEach(function(e){"row"!==e.type&&"group"!==e.type||!e.modules.moveRow.mousemove||e.getElement().addEventListener("mousemove",e.modules.moveRow.mousemove)})},O.prototype._unbindMouseMove=function(){this.table.rowManager.getDisplayRows().forEach(function(e){"row"!==e.type&&"group"!==e.type||!e.modules.moveRow.mousemove||e.getElement().removeEventListener("mousemove",e.modules.moveRow.mousemove)})},O.prototype.startMove=function(e,t){var o=t.getElement();this.setStartPosition(e,t),this.moving=t,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",this.connection?(this.table.element.classList.add("tabulator-movingrow-sending"),this.connectToTables(t)):(o.parentNode.insertBefore(this.placeholderElement,o),o.parentNode.removeChild(o)),this.hoverElement=o.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.connection?(document.body.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this.hoverElement.style.width=this.table.element.clientWidth+"px",this.hoverElement.style.whiteSpace="nowrap",this.hoverElement.style.overflow="hidden",this.hoverElement.style.pointerEvents="none"):(this.table.rowManager.getTableElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this._bindMouseMove()),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove),this.moveHover(e)},O.prototype.setStartPosition=function(e,t){var o,i,n=this.touchMove?e.touches[0].pageX:e.pageX,s=this.touchMove?e.touches[0].pageY:e.pageY;o=t.getElement(),this.connection?(i=o.getBoundingClientRect(),this.startX=i.left-n+window.pageXOffset,this.startY=i.top-s+window.pageYOffset):this.startY=s-o.getBoundingClientRect().top},O.prototype.endMove=function(e){e&&1!==e.which&&!this.touchMove||(this._unbindMouseMove(),this.connection||(this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement)),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toRow&&this.table.rowManager.moveRow(this.moving,this.toRow,this.toRowAfter),this.moving=!1,this.toRow=!1,this.toRowAfter=!1,document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove),this.connection&&(this.table.element.classList.remove("tabulator-movingrow-sending"),this.disconnectFromTables()))},O.prototype.moveRow=function(e,t){this.toRow=e,this.toRowAfter=t},O.prototype.moveHover=function(e){this.connection?this.moveHoverConnections.call(this,e):this.moveHoverTable.call(this,e)},O.prototype.moveHoverTable=function(e){var t=this.table.rowManager.getElement(),o=t.scrollTop,i=(this.touchMove?e.touches[0].pageY:e.pageY)-t.getBoundingClientRect().top+o;this.hoverElement.style.top=i-this.startY+"px"},O.prototype.moveHoverConnections=function(e){this.hoverElement.style.left=this.startX+(this.touchMove?e.touches[0].pageX:e.pageX)+"px",this.hoverElement.style.top=this.startY+(this.touchMove?e.touches[0].pageY:e.pageY)+"px"},O.prototype.elementRowDrop=function(e,t,o){this.table.options.movableRowsElementDrop&&this.table.options.movableRowsElementDrop(e,t,!!o&&o.getComponent())},O.prototype.connectToTables=function(e){var t,o=this;this.connectionSelectorsTables&&(t=this.table.modules.comms.getConnections(this.connectionSelectorsTables),this.table.options.movableRowsSendingStart.call(this.table,t),this.table.modules.comms.send(this.connectionSelectorsTables,"moveRow","connect",{row:e})),this.connectionSelectorsElements&&(this.connectionElements=[],Array.isArray(this.connectionSelectorsElements)||(this.connectionSelectorsElements=[this.connectionSelectorsElements]),this.connectionSelectorsElements.forEach(function(e){"string"==typeof e?o.connectionElements=o.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(e))):o.connectionElements.push(e)}),this.connectionElements.forEach(function(e){var t=function(t){o.elementRowDrop(t,e,o.moving)};e.addEventListener("mouseup",t),e.tabulatorElementDropEvent=t,e.classList.add("tabulator-movingrow-receiving")}))},O.prototype.disconnectFromTables=function(){var e;this.connectionSelectorsTables&&(e=this.table.modules.comms.getConnections(this.connectionSelectorsTables),this.table.options.movableRowsSendingStop.call(this.table,e),this.table.modules.comms.send(this.connectionSelectorsTables,"moveRow","disconnect")),this.connectionElements.forEach(function(e){e.classList.remove("tabulator-movingrow-receiving"),e.removeEventListener("mouseup",e.tabulatorElementDropEvent),delete e.tabulatorElementDropEvent})},O.prototype.connect=function(e,t){var o=this;return this.connectedTable?(console.warn("Move Row Error - Table cannot accept connection, already connected to table:",this.connectedTable),!1):(this.connectedTable=e,this.connectedRow=t,this.table.element.classList.add("tabulator-movingrow-receiving"),o.table.rowManager.getDisplayRows().forEach(function(e){"row"===e.type&&e.modules.moveRow&&e.modules.moveRow.mouseup&&e.getElement().addEventListener("mouseup",e.modules.moveRow.mouseup)}),o.tableRowDropEvent=o.tableRowDrop.bind(o),o.table.element.addEventListener("mouseup",o.tableRowDropEvent),this.table.options.movableRowsReceivingStart.call(this.table,t,e),!0)},O.prototype.disconnect=function(e){var t=this;e===this.connectedTable?(this.connectedTable=!1,this.connectedRow=!1,this.table.element.classList.remove("tabulator-movingrow-receiving"),t.table.rowManager.getDisplayRows().forEach(function(e){"row"===e.type&&e.modules.moveRow&&e.modules.moveRow.mouseup&&e.getElement().removeEventListener("mouseup",e.modules.moveRow.mouseup)}),t.table.element.removeEventListener("mouseup",t.tableRowDropEvent),this.table.options.movableRowsReceivingStop.call(this.table,e)):console.warn("Move Row Error - trying to disconnect from non connected table")},O.prototype.dropComplete=function(e,t,o){var i=!1;if(o){switch(_typeof(this.table.options.movableRowsSender)){case"string":i=this.senders[this.table.options.movableRowsSender];break;case"function":i=this.table.options.movableRowsSender}i?i.call(this,this.moving.getComponent(),t?t.getComponent():void 0,e):this.table.options.movableRowsSender&&console.warn("Mover Row Error - no matching sender found:",this.table.options.movableRowsSender),this.table.options.movableRowsSent.call(this.table,this.moving.getComponent(),t?t.getComponent():void 0,e)}else this.table.options.movableRowsSentFailed.call(this.table,this.moving.getComponent(),t?t.getComponent():void 0,e);this.endMove()},O.prototype.tableRowDrop=function(e,t){var o=!1,i=!1;switch(console.trace("drop"),e.stopImmediatePropagation(),_typeof(this.table.options.movableRowsReceiver)){case"string":o=this.receivers[this.table.options.movableRowsReceiver];break;case"function":o=this.table.options.movableRowsReceiver}o?i=o.call(this,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):console.warn("Mover Row Error - no matching receiver found:",this.table.options.movableRowsReceiver),i?this.table.options.movableRowsReceived.call(this.table,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):this.table.options.movableRowsReceivedFailed.call(this.table,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable),this.table.modules.comms.send(this.connectedTable,"moveRow","dropcomplete",{row:t,success:i})},O.prototype.receivers={insert:function(e,t,o){return this.table.addRow(e.getData(),void 0,t),!0},add:function(e,t,o){return this.table.addRow(e.getData()),!0},update:function(e,t,o){return!!t&&(t.update(e.getData()),!0)},replace:function(e,t,o){return!!t&&(this.table.addRow(e.getData(),void 0,t),t.delete(),!0)}},O.prototype.senders={delete:function(e,t,o){e.delete()}},O.prototype.commsReceived=function(e,t,o){switch(t){case"connect":return this.connect(e,o.row);case"disconnect":return this.disconnect(e);case"dropcomplete":return this.dropComplete(e,o.row,o.success)}},h.prototype.registerModule("moveRow",O);var I=function(e){this.table=e,this.allowedTypes=["","data","edit","clipboard"],this.enabled=!0};I.prototype.initializeColumn=function(e){var t=this,o=!1,i={};this.allowedTypes.forEach(function(n){var s,a="mutator"+(n.charAt(0).toUpperCase()+n.slice(1));e.definition[a]&&(s=t.lookupMutator(e.definition[a]))&&(o=!0,i[a]={mutator:s,params:e.definition[a+"Params"]||{}})}),o&&(e.modules.mutate=i)},I.prototype.lookupMutator=function(e){var t=!1;switch(void 0===e?"undefined":_typeof(e)){case"string":this.mutators[e]?t=this.mutators[e]:console.warn("Mutator Error - No such mutator found, ignoring: ",e);break;case"function":t=e}return t},I.prototype.transformRow=function(e,t,o){var i,n=this,s="mutator"+(t.charAt(0).toUpperCase()+t.slice(1));return this.enabled&&n.table.columnManager.traverse(function(n){var a,r,l;n.modules.mutate&&(a=n.modules.mutate[s]||n.modules.mutate.mutator||!1)&&(i=n.getFieldValue(void 0!==o?o:e),"data"!=t&&void 0===i||(l=n.getComponent(),r="function"==typeof a.params?a.params(i,e,t,l):a.params,n.setFieldValue(e,a.mutator(i,e,t,r,l))))}),e},I.prototype.transformCell=function(e,t){var o=e.column.modules.mutate.mutatorEdit||e.column.modules.mutate.mutator||!1,i={};return o?(i=Object.assign(i,e.row.getData()),e.column.setFieldValue(i,t),o.mutator(t,i,"edit",o.params,e.getComponent())):t},I.prototype.enable=function(){this.enabled=!0},I.prototype.disable=function(){this.enabled=!1},I.prototype.mutators={},h.prototype.registerModule("mutator",I);var V=function(e){this.table=e,this.mode="local",this.progressiveLoad=!1,this.size=0,this.page=1,this.count=5,this.max=1,this.displayIndex=0,this.initialLoad=!0,this.pageSizes=[],this.dataReceivedNames={},this.dataSentNames={},this.createElements()};V.prototype.createElements=function(){var e;this.element=document.createElement("span"),this.element.classList.add("tabulator-paginator"),this.pagesElement=document.createElement("span"),this.pagesElement.classList.add("tabulator-pages"),e=document.createElement("button"),e.classList.add("tabulator-page"),e.setAttribute("type","button"),e.setAttribute("role","button"),e.setAttribute("aria-label",""),e.setAttribute("title",""),this.firstBut=e.cloneNode(!0),this.firstBut.setAttribute("data-page","first"),this.prevBut=e.cloneNode(!0),this.prevBut.setAttribute("data-page","prev"),this.nextBut=e.cloneNode(!0),this.nextBut.setAttribute("data-page","next"),this.lastBut=e.cloneNode(!0),this.lastBut.setAttribute("data-page","last"),this.table.options.paginationSizeSelector&&(this.pageSizeSelect=document.createElement("select"),this.pageSizeSelect.classList.add("tabulator-page-size"))},V.prototype.generatePageSizeSelectList=function(){var e=this,t=[];if(this.pageSizeSelect){if(Array.isArray(this.table.options.paginationSizeSelector))t=this.table.options.paginationSizeSelector,this.pageSizes=t,-1==this.pageSizes.indexOf(this.size)&&t.unshift(this.size);else if(-1==this.pageSizes.indexOf(this.size)){t=[];for(var o=1;o<5;o++)t.push(this.size*o);this.pageSizes=t}else t=this.pageSizes;for(;this.pageSizeSelect.firstChild;)this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild);t.forEach(function(t){var o=document.createElement("option");o.value=t,!0===t?e.table.modules.localize.bind("pagination|all",function(e){o.innerHTML=e}):o.innerHTML=t,e.pageSizeSelect.appendChild(o)}),this.pageSizeSelect.value=this.size}},V.prototype.initialize=function(e){var t,o,i,n=this;this.dataSentNames=Object.assign({},this.paginationDataSentNames),this.dataSentNames=Object.assign(this.dataSentNames,this.table.options.paginationDataSent),this.dataReceivedNames=Object.assign({},this.paginationDataReceivedNames),this.dataReceivedNames=Object.assign(this.dataReceivedNames,this.table.options.paginationDataReceived),n.table.modules.localize.bind("pagination|first",function(e){n.firstBut.innerHTML=e}),n.table.modules.localize.bind("pagination|first_title",function(e){n.firstBut.setAttribute("aria-label",e),n.firstBut.setAttribute("title",e)}),n.table.modules.localize.bind("pagination|prev",function(e){n.prevBut.innerHTML=e}),n.table.modules.localize.bind("pagination|prev_title",function(e){n.prevBut.setAttribute("aria-label",e),n.prevBut.setAttribute("title",e)}),n.table.modules.localize.bind("pagination|next",function(e){n.nextBut.innerHTML=e}),n.table.modules.localize.bind("pagination|next_title",function(e){n.nextBut.setAttribute("aria-label",e),n.nextBut.setAttribute("title",e)}),n.table.modules.localize.bind("pagination|last",function(e){n.lastBut.innerHTML=e}),n.table.modules.localize.bind("pagination|last_title",function(e){n.lastBut.setAttribute("aria-label",e),n.lastBut.setAttribute("title",e)}),n.firstBut.addEventListener("click",function(){n.setPage(1).then(function(){}).catch(function(){})}),n.prevBut.addEventListener("click",function(){n.previousPage().then(function(){}).catch(function(){})}),n.nextBut.addEventListener("click",function(){n.nextPage().then(function(){}).catch(function(){})}),n.lastBut.addEventListener("click",function(){n.setPage(n.max).then(function(){}).catch(function(){})}),n.table.options.paginationElement&&(n.element=n.table.options.paginationElement),this.pageSizeSelect&&(t=document.createElement("label"),n.table.modules.localize.bind("pagination|page_size",function(e){n.pageSizeSelect.setAttribute("aria-label",e),n.pageSizeSelect.setAttribute("title",e),t.innerHTML=e}),n.element.appendChild(t),n.element.appendChild(n.pageSizeSelect),n.pageSizeSelect.addEventListener("change",function(e){n.setPageSize("true"==n.pageSizeSelect.value||n.pageSizeSelect.value),n.setPage(1).then(function(){}).catch(function(){})})),n.element.appendChild(n.firstBut),n.element.appendChild(n.prevBut),n.element.appendChild(n.pagesElement),n.element.appendChild(n.nextBut),n.element.appendChild(n.lastBut),n.table.options.paginationElement||e||n.table.footerManager.append(n.element,n),n.mode=n.table.options.pagination,n.table.options.paginationSize?n.size=n.table.options.paginationSize:(o=document.createElement("div"),o.classList.add("tabulator-row"),o.style.visibility=e,i=document.createElement("div"),i.classList.add("tabulator-cell"),i.innerHTML="Page Row Test",o.appendChild(i),n.table.rowManager.getTableElement().appendChild(o),n.size=Math.floor(n.table.rowManager.getElement().clientHeight/o.offsetHeight),n.table.rowManager.getTableElement().removeChild(o)),n.count=n.table.options.paginationButtonCount,n.generatePageSizeSelectList()},V.prototype.initializeProgressive=function(e){this.initialize(!0),this.mode="progressive_"+e,this.progressiveLoad=!0},V.prototype.setDisplayIndex=function(e){this.displayIndex=e},V.prototype.getDisplayIndex=function(){return this.displayIndex},V.prototype.setMaxRows=function(e){this.max=e?!0===this.size?1:Math.ceil(e/this.size):1,this.page>this.max&&(this.page=this.max)},V.prototype.reset=function(e,t){return("local"==this.mode||e)&&(this.page=1),t&&(this.initialLoad=!0),!0},V.prototype.setMaxPage=function(e){e=parseInt(e),this.max=e||1,this.page>this.max&&(this.page=this.max,this.trigger())},V.prototype.setPage=function(e){var t=this,o=this;switch(e){case"first":return this.setPage(1);case"prev":return this.previousPage();case"next":return this.nextPage();case"last":return this.setPage(this.max)}return new Promise(function(i,n){e=parseInt(e),e>0&&e<=t.max?(t.page=e,t.trigger().then(function(){i()}).catch(function(){n()}),o.table.options.persistence&&o.table.modExists("persistence",!0)&&o.table.modules.persistence.config.page&&o.table.modules.persistence.save("page")):(console.warn("Pagination Error - Requested page is out of range of 1 - "+t.max+":",e),n())})},V.prototype.setPageToRow=function(e){var t=this;return new Promise(function(o,i){var n=t.table.rowManager.getDisplayRows(t.displayIndex-1),s=n.indexOf(e);if(s>-1){var a=!0===t.size?1:Math.ceil((s+1)/t.size);t.setPage(a).then(function(){o()}).catch(function(){i()})}else console.warn("Pagination Error - Requested row is not visible"),i()})},V.prototype.setPageSize=function(e){!0!==e&&(e=parseInt(e)),e>0&&(this.size=e),this.pageSizeSelect&&this.generatePageSizeSelectList(),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.page&&this.table.modules.persistence.save("page")},V.prototype._setPageButtons=function(){for(var e=this,t=Math.floor((this.count-1)/2),o=Math.ceil((this.count-1)/2),i=this.max-this.page+t+1<this.count?this.max-this.count+1:Math.max(this.page-t,1),n=this.page<=o?Math.min(this.count,this.max):Math.min(this.page+o,this.max);e.pagesElement.firstChild;)e.pagesElement.removeChild(e.pagesElement.firstChild);1==e.page?(e.firstBut.disabled=!0,e.prevBut.disabled=!0):(e.firstBut.disabled=!1,e.prevBut.disabled=!1),e.page==e.max?(e.lastBut.disabled=!0,e.nextBut.disabled=!0):(e.lastBut.disabled=!1,e.nextBut.disabled=!1);for(var s=i;s<=n;s++)s>0&&s<=e.max&&e.pagesElement.appendChild(e._generatePageButton(s));this.footerRedraw()},V.prototype._generatePageButton=function(e){var t=this,o=document.createElement("button");return o.classList.add("tabulator-page"),e==t.page&&o.classList.add("active"),o.setAttribute("type","button"),o.setAttribute("role","button"),t.table.modules.localize.bind("pagination|page_title",function(t){o.setAttribute("aria-label",t+" "+e),o.setAttribute("title",t+" "+e)}),o.setAttribute("data-page",e),o.textContent=e,o.addEventListener("click",function(o){t.setPage(e).then(function(){}).catch(function(){})}),o},V.prototype.previousPage=function(){var e=this;return new Promise(function(t,o){e.page>1?(e.page--,e.trigger().then(function(){t()}).catch(function(){o()}),e.table.options.persistence&&e.table.modExists("persistence",!0)&&e.table.modules.persistence.config.page&&e.table.modules.persistence.save("page")):(console.warn("Pagination Error - Previous page would be less than page 1:",0),o())})},V.prototype.nextPage=function(){var e=this;return new Promise(function(t,o){e.page<e.max?(e.page++,e.trigger().then(function(){t()}).catch(function(){o()}),e.table.options.persistence&&e.table.modExists("persistence",!0)&&e.table.modules.persistence.config.page&&e.table.modules.persistence.save("page")):(e.progressiveLoad||console.warn("Pagination Error - Next page would be greater than maximum page of "+e.max+":",e.max+1),o())})},V.prototype.getPage=function(){return this.page},V.prototype.getPageMax=function(){return this.max},V.prototype.getPageSize=function(e){return this.size},V.prototype.getMode=function(){return this.mode},V.prototype.getRows=function(e){var t,o,i;if("local"==this.mode){t=[],!0===this.size?(o=0,i=e.length):(o=this.size*(this.page-1),i=o+parseInt(this.size)),this._setPageButtons();for(var n=o;n<i;n++)e[n]&&t.push(e[n]);return t}return this._setPageButtons(),e.slice(0)},V.prototype.trigger=function(){var e,t=this;return new Promise(function(o,i){switch(t.mode){case"local":e=t.table.rowManager.scrollLeft,t.table.rowManager.refreshActiveData("page"),t.table.rowManager.scrollHorizontal(e),t.table.options.pageLoaded.call(t.table,t.getPage()),o();break;case"remote":case"progressive_load":case"progressive_scroll":t.table.modules.ajax.blockActiveRequest(),t._getRemotePage().then(function(){o()}).catch(function(){i()});break;default:console.warn("Pagination Error - no such pagination mode:",t.mode),i()}})},V.prototype._getRemotePage=function(){var e,t,o=this,i=this;return new Promise(function(n,s){if(i.table.modExists("ajax",!0)||s(),e=h.prototype.helpers.deepClone(i.table.modules.ajax.getParams()||{}),t=i.table.modules.ajax.getParams(),t[o.dataSentNames.page]=i.page,o.size&&(t[o.dataSentNames.size]=o.size),o.table.options.ajaxSorting&&o.table.modExists("sort")){var a=i.table.modules.sort.getSort();a.forEach(function(e){delete e.column}),t[o.dataSentNames.sorters]=a}if(o.table.options.ajaxFiltering&&o.table.modExists("filter")){var r=i.table.modules.filter.getFilters(!0,!0);t[o.dataSentNames.filters]=r}i.table.modules.ajax.setParams(t),i.table.modules.ajax.sendRequest(o.progressiveLoad).then(function(e){i._parseRemoteData(e),n()}).catch(function(e){s()}),i.table.modules.ajax.setParams(e)})},V.prototype._parseRemoteData=function(e){var t,e,o,i=this;if(void 0===e[this.dataReceivedNames.last_page]&&console.warn("Remote Pagination Error - Server response missing '"+this.dataReceivedNames.last_page+"' property"),e[this.dataReceivedNames.data]){if(this.max=parseInt(e[this.dataReceivedNames.last_page])||1,this.progressiveLoad)switch(this.mode){case"progressive_load":1==this.page?this.table.rowManager.setData(e[this.dataReceivedNames.data],!1,this.initialLoad&&1==this.page):this.table.rowManager.addRows(e[this.dataReceivedNames.data]),this.page<this.max&&setTimeout(function(){i.nextPage().then(function(){}).catch(function(){})},i.table.options.ajaxProgressiveLoadDelay);break;case"progressive_scroll":e=this.table.rowManager.getData().concat(e[this.dataReceivedNames.data]),this.table.rowManager.setData(e,!0,this.initialLoad&&1==this.page),o=this.table.options.ajaxProgressiveLoadScrollMargin||2*this.table.rowManager.element.clientHeight,i.table.rowManager.element.scrollHeight<=i.table.rowManager.element.clientHeight+o&&i.nextPage().then(function(){}).catch(function(){})}else t=this.table.rowManager.scrollLeft,this.table.rowManager.setData(e[this.dataReceivedNames.data],!1,this.initialLoad&&1==this.page),this.table.rowManager.scrollHorizontal(t),this.table.columnManager.scrollHorizontal(t),this.table.options.pageLoaded.call(this.table,this.getPage());this.initialLoad=!1}else console.warn("Remote Pagination Error - Server response missing '"+this.dataReceivedNames.data+"' property")},V.prototype.footerRedraw=function(){var e=this.table.footerManager.element;Math.ceil(e.clientWidth)-e.scrollWidth<0?this.pagesElement.style.display="none":(this.pagesElement.style.display="",Math.ceil(e.clientWidth)-e.scrollWidth<0&&(this.pagesElement.style.display="none"))},V.prototype.paginationDataSentNames={page:"page",size:"size",sorters:"sorters",filters:"filters"},V.prototype.paginationDataReceivedNames={current_page:"current_page",last_page:"last_page",data:"data"},h.prototype.registerModule("page",V);var j=function(e){this.table=e,this.mode="",this.id="",this.defWatcherBlock=!1,this.config={},this.readFunc=!1,this.writeFunc=!1};j.prototype.localStorageTest=function(){var e="_tabulator_test";try{return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch(e){return!1}},j.prototype.initialize=function(){var e,t=this.table.options.persistenceMode,o=this.table.options.persistenceID;this.mode=!0!==t?t:this.localStorageTest()?"local":"cookie",this.table.options.persistenceReaderFunc?"function"==typeof this.table.options.persistenceReaderFunc?this.readFunc=this.table.options.persistenceReaderFunc:this.readers[this.table.options.persistenceReaderFunc]?this.readFunc=this.readers[this.table.options.persistenceReaderFunc]:console.warn("Persistence Read Error - invalid reader set",this.table.options.persistenceReaderFunc):this.readers[this.mode]?this.readFunc=this.readers[this.mode]:console.warn("Persistence Read Error - invalid reader set",this.mode),this.table.options.persistenceWriterFunc?"function"==typeof this.table.options.persistenceWriterFunc?this.writeFunc=this.table.options.persistenceWriterFunc:this.readers[this.table.options.persistenceWriterFunc]?this.writeFunc=this.readers[this.table.options.persistenceWriterFunc]:console.warn("Persistence Write Error - invalid reader set",this.table.options.persistenceWriterFunc):this.writers[this.mode]?this.writeFunc=this.writers[this.mode]:console.warn("Persistence Write Error - invalid writer set",this.mode),this.id="tabulator-"+(o||this.table.element.getAttribute("id")||""),this.config={sort:!0===this.table.options.persistence||this.table.options.persistence.sort,filter:!0===this.table.options.persistence||this.table.options.persistence.filter,group:!0===this.table.options.persistence||this.table.options.persistence.group,page:!0===this.table.options.persistence||this.table.options.persistence.page,columns:!0===this.table.options.persistence?["title","width","visible"]:this.table.options.persistence.columns},this.config.page&&(e=this.retreiveData("page"))&&(void 0===e.paginationSize||!0!==this.config.page&&!this.config.page.size||(this.table.options.paginationSize=e.paginationSize),void 0===e.paginationInitialPage||!0!==this.config.page&&!this.config.page.page||(this.table.options.paginationInitialPage=e.paginationInitialPage)),this.config.group&&(e=this.retreiveData("group"))&&(void 0===e.groupBy||!0!==this.config.group&&!this.config.group.groupBy||(this.table.options.groupBy=e.groupBy),void 0===e.groupStartOpen||!0!==this.config.group&&!this.config.group.groupStartOpen||(this.table.options.groupStartOpen=e.groupStartOpen),void 0===e.groupHeader||!0!==this.config.group&&!this.config.group.groupHeader||(this.table.options.groupHeader=e.groupHeader))},j.prototype.initializeColumn=function(e){var t,o,i=this;this.config.columns&&(this.defWatcherBlock=!0,t=e.getDefinition(),o=!0===this.config.columns?Object.keys(t):this.config.columns,o.forEach(function(e){var o=Object.getOwnPropertyDescriptor(t,e),n=t[e];o&&Object.defineProperty(t,e,{set:function(e){n=e,i.defWatcherBlock||i.save("columns"),o.set&&o.set(e)},get:function(){return o.get&&o.get(),n}})}),this.defWatcherBlock=!1)},j.prototype.load=function(e,t){var o=this.retreiveData(e);return t&&(o=o?this.mergeDefinition(t,o):t),o},j.prototype.retreiveData=function(e){return!!this.readFunc&&this.readFunc(this.id,e)},j.prototype.mergeDefinition=function(e,t){var o=this,i=[];return t=t||[],t.forEach(function(t,n){var s,a=o._findColumn(e,t);a&&(!0===o.config.columns||void 0==o.config.columns?(s=Object.keys(a),s.push("width")):s=o.config.columns,s.forEach(function(e){void 0!==t[e]&&(a[e]=t[e])}),a.columns&&(a.columns=o.mergeDefinition(a.columns,t.columns)),i.push(a))}),e.forEach(function(e,n){o._findColumn(t,e)||(i.length>n?i.splice(n,0,e):i.push(e))}),i},j.prototype._findColumn=function(e,t){var o=t.columns?"group":t.field?"field":"object";return e.find(function(e){switch(o){case"group":return e.title===t.title&&e.columns.length===t.columns.length;case"field":return e.field===t.field;case"object":return e===t}})},j.prototype.save=function(e){var t={};switch(e){case"columns":t=this.parseColumns(this.table.columnManager.getColumns());break;case"filter":t=this.table.modules.filter.getFilters();break;case"sort":t=this.validateSorters(this.table.modules.sort.getSort());break;case"group":t=this.getGroupConfig();break;case"page":t=this.getPageConfig()}this.writeFunc&&this.writeFunc(this.id,e,t)},j.prototype.validateSorters=function(e){return e.forEach(function(e){e.column=e.field,delete e.field}),e},j.prototype.getGroupConfig=function(){var e={}
-;return this.config.group&&((!0===this.config.group||this.config.group.groupBy)&&(e.groupBy=this.table.options.groupBy),(!0===this.config.group||this.config.group.groupStartOpen)&&(e.groupStartOpen=this.table.options.groupStartOpen),(!0===this.config.group||this.config.group.groupHeader)&&(e.groupHeader=this.table.options.groupHeader)),e},j.prototype.getPageConfig=function(){var e={};return this.config.page&&((!0===this.config.page||this.config.page.size)&&(e.paginationSize=this.table.modules.page.getPageSize()),(!0===this.config.page||this.config.page.page)&&(e.paginationInitialPage=this.table.modules.page.getPage())),e},j.prototype.parseColumns=function(e){var t=this,o=[],i=["headerContextMenu","headerMenu","contextMenu","clickMenu"];return e.forEach(function(e){var n,s={},a=e.getDefinition();e.isGroup?(s.title=a.title,s.columns=t.parseColumns(e.getColumns())):(s.field=e.getField(),!0===t.config.columns||void 0==t.config.columns?(n=Object.keys(a),n.push("width")):n=t.config.columns,n.forEach(function(t){switch(t){case"width":s.width=e.getWidth();break;case"visible":s.visible=e.visible;break;default:"function"!=typeof a[t]&&-1===i.indexOf(t)&&(s[t]=a[t])}})),o.push(s)}),o},j.prototype.readers={local:function(e,t){var o=localStorage.getItem(e+"-"+t);return!!o&&JSON.parse(o)},cookie:function(e,t){var o,i,n=document.cookie,s=e+"-"+t,a=n.indexOf(s+"=");return a>-1&&(n=n.substr(a),o=n.indexOf(";"),o>-1&&(n=n.substr(0,o)),i=n.replace(s+"=","")),!!i&&JSON.parse(i)}},j.prototype.writers={local:function(e,t,o){localStorage.setItem(e+"-"+t,JSON.stringify(o))},cookie:function(e,t,o){var i=new Date;i.setDate(i.getDate()+1e4),document.cookie=e+"-"+t+"="+JSON.stringify(o)+"; expires="+i.toUTCString()}},h.prototype.registerModule("persistence",j);var W=function(e){this.table=e,this.element=!1,this.manualBlock=!1};W.prototype.initialize=function(){window.addEventListener("beforeprint",this.replaceTable.bind(this)),window.addEventListener("afterprint",this.cleanup.bind(this))},W.prototype.replaceTable=function(){this.manualBlock||(this.element=document.createElement("div"),this.element.classList.add("tabulator-print-table"),this.element.appendChild(this.table.modules.export.genereateTable(this.table.options.printConfig,this.table.options.printStyled,this.table.options.printRowRange,"print")),this.table.element.style.display="none",this.table.element.parentNode.insertBefore(this.element,this.table.element))},W.prototype.cleanup=function(){document.body.classList.remove("tabulator-print-fullscreen-hide"),this.element&&this.element.parentNode&&(this.element.parentNode.removeChild(this.element),this.table.element.style.display="")},W.prototype.printFullscreen=function(e,t,o){var i,n,s=window.scrollX,a=window.scrollY,r=document.createElement("div"),l=document.createElement("div"),c=this.table.modules.export.genereateTable(void 0!==o?o:this.table.options.printConfig,void 0!==t?t:this.table.options.printStyled,e,"print");this.manualBlock=!0,this.element=document.createElement("div"),this.element.classList.add("tabulator-print-fullscreen"),this.table.options.printHeader&&(r.classList.add("tabulator-print-header"),i="function"==typeof this.table.options.printHeader?this.table.options.printHeader.call(this.table):this.table.options.printHeader,"string"==typeof i?r.innerHTML=i:r.appendChild(i),this.element.appendChild(r)),this.element.appendChild(c),this.table.options.printFooter&&(l.classList.add("tabulator-print-footer"),n="function"==typeof this.table.options.printFooter?this.table.options.printFooter.call(this.table):this.table.options.printFooter,"string"==typeof n?l.innerHTML=n:l.appendChild(n),this.element.appendChild(l)),document.body.classList.add("tabulator-print-fullscreen-hide"),document.body.appendChild(this.element),this.table.options.printFormatter&&this.table.options.printFormatter(this.element,c),window.print(),this.cleanup(),window.scrollTo(s,a),this.manualBlock=!1},h.prototype.registerModule("print",W);var G=function(e){this.table=e,this.data=!1,this.blocked=!1,this.origFuncs={},this.currentVersion=0};G.prototype.watchData=function(e){var t,o=this;this.currentVersion++,t=this.currentVersion,o.unwatchData(),o.data=e,o.origFuncs.push=e.push,Object.defineProperty(o.data,"push",{enumerable:!1,configurable:!0,value:function(){var i=Array.from(arguments);return o.blocked||t!==o.currentVersion||i.forEach(function(e){o.table.rowManager.addRowActual(e,!1)}),o.origFuncs.push.apply(e,arguments)}}),o.origFuncs.unshift=e.unshift,Object.defineProperty(o.data,"unshift",{enumerable:!1,configurable:!0,value:function(){var i=Array.from(arguments);return o.blocked||t!==o.currentVersion||i.forEach(function(e){o.table.rowManager.addRowActual(e,!0)}),o.origFuncs.unshift.apply(e,arguments)}}),o.origFuncs.shift=e.shift,Object.defineProperty(o.data,"shift",{enumerable:!1,configurable:!0,value:function(){var i;return o.blocked||t!==o.currentVersion||o.data.length&&(i=o.table.rowManager.getRowFromDataObject(o.data[0]))&&i.deleteActual(),o.origFuncs.shift.call(e)}}),o.origFuncs.pop=e.pop,Object.defineProperty(o.data,"pop",{enumerable:!1,configurable:!0,value:function(){var i;return o.blocked||t!==o.currentVersion||o.data.length&&(i=o.table.rowManager.getRowFromDataObject(o.data[o.data.length-1]))&&i.deleteActual(),o.origFuncs.pop.call(e)}}),o.origFuncs.splice=e.splice,Object.defineProperty(o.data,"splice",{enumerable:!1,configurable:!0,value:function(){var i,n=Array.from(arguments),s=n[0]<0?e.length+n[0]:n[0],a=n[1],r=!!n[2]&&n.slice(2);if(!o.blocked&&t===o.currentVersion){if(r&&(i=!!e[s]&&o.table.rowManager.getRowFromDataObject(e[s]),i?r.forEach(function(e){o.table.rowManager.addRowActual(e,!0,i,!0)}):(r=r.slice().reverse(),r.forEach(function(e){o.table.rowManager.addRowActual(e,!0,!1,!0)}))),0!==a){var l=e.slice(s,void 0===n[1]?n[1]:s+a);l.forEach(function(e,t){var i=o.table.rowManager.getRowFromDataObject(e);i&&i.deleteActual(t!==l.length-1)})}(r||0!==a)&&o.table.rowManager.reRenderInPosition()}return o.origFuncs.splice.apply(e,arguments)}})},G.prototype.unwatchData=function(){if(!1!==this.data)for(var e in this.origFuncs)Object.defineProperty(this.data,e,{enumerable:!0,configurable:!0,writable:!0,value:this.origFuncs.key})},G.prototype.watchRow=function(e){var t=e.getData();this.blocked=!0;for(var o in t)this.watchKey(e,t,o);this.table.options.dataTree&&this.watchTreeChildren(e),this.blocked=!1},G.prototype.watchTreeChildren=function(e){function t(){o.table.modules.dataTree.initializeRow(e),o.table.modules.dataTree.layoutRow(e),o.table.rowManager.refreshActiveData("tree",!1,!0)}var o=this,i=e.getData()[this.table.options.dataTreeChildField],n={};i&&(n.push=i.push,Object.defineProperty(i,"push",{enumerable:!1,configurable:!0,value:function(){var e=n.push.apply(i,arguments);return t(),e}}),n.unshift=i.unshift,Object.defineProperty(i,"unshift",{enumerable:!1,configurable:!0,value:function(){var e=n.unshift.apply(i,arguments);return t(),e}}),n.shift=i.shift,Object.defineProperty(i,"shift",{enumerable:!1,configurable:!0,value:function(){var e=n.shift.call(i);return t(),e}}),n.pop=i.pop,Object.defineProperty(i,"pop",{enumerable:!1,configurable:!0,value:function(){var e=n.pop.call(i);return t(),e}}),n.splice=i.splice,Object.defineProperty(i,"splice",{enumerable:!1,configurable:!0,value:function(){var e=n.splice.apply(i,arguments);return t(),e}}))},G.prototype.watchKey=function(e,t,o){var i=this,n=Object.getOwnPropertyDescriptor(t,o),s=t[o],a=this.currentVersion;Object.defineProperty(t,o,{set:function(t){if(s=t,!i.blocked&&a===i.currentVersion){var r={};r[o]=t,e.updateData(r)}n.set&&n.set(t)},get:function(){return n.get&&n.get(),s}})},G.prototype.unwatchRow=function(e){var t=e.getData();for(var o in t)Object.defineProperty(t,o,{value:t[o]})},G.prototype.block=function(){this.blocked=!0},G.prototype.unblock=function(){this.blocked=!1},h.prototype.registerModule("reactiveData",G);var U=function(e){this.table=e,this.startColumn=!1,this.startX=!1,this.startWidth=!1,this.handle=null,this.prevHandle=null};U.prototype.initializeColumn=function(e,t,o){var i=this,n=!1,s=this.table.options.resizableColumns;if("header"===e&&(n="textarea"==t.definition.formatter||t.definition.variableHeight,t.modules.resize={variableHeight:n}),!0===s||s==e){var a=document.createElement("div");a.className="tabulator-col-resize-handle";var r=document.createElement("div");r.className="tabulator-col-resize-handle prev",a.addEventListener("click",function(e){e.stopPropagation()});var l=function(e){var o=t.getLastColumn();o&&i._checkResizability(o)&&(i.startColumn=t,i._mouseDown(e,o,a))};a.addEventListener("mousedown",l),a.addEventListener("touchstart",l,{passive:!0}),a.addEventListener("dblclick",function(e){var o=t.getLastColumn();o&&i._checkResizability(o)&&(e.stopPropagation(),o.reinitializeWidth(!0))}),r.addEventListener("click",function(e){e.stopPropagation()});var c=function(e){var o,n,s;(o=t.getFirstColumn())&&(n=i.table.columnManager.findColumnIndex(o),(s=n>0&&i.table.columnManager.getColumnByIndex(n-1))&&i._checkResizability(s)&&(i.startColumn=t,i._mouseDown(e,s,r)))};r.addEventListener("mousedown",c),r.addEventListener("touchstart",c,{passive:!0}),r.addEventListener("dblclick",function(e){var o,n,s;(o=t.getFirstColumn())&&(n=i.table.columnManager.findColumnIndex(o),(s=n>0&&i.table.columnManager.getColumnByIndex(n-1))&&i._checkResizability(s)&&(e.stopPropagation(),s.reinitializeWidth(!0)))}),o.appendChild(a),o.appendChild(r)}},U.prototype._checkResizability=function(e){return void 0!==e.definition.resizable?e.definition.resizable:this.table.options.resizableColumns},U.prototype._mouseDown=function(e,t,o){function i(e){s.table.rtl?t.setWidth(s.startWidth-((void 0===e.screenX?e.touches[0].screenX:e.screenX)-s.startX)):t.setWidth(s.startWidth+((void 0===e.screenX?e.touches[0].screenX:e.screenX)-s.startX)),s.table.options.virtualDomHoz&&s.table.vdomHoz.reinitialize(!0),!s.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights()}function n(e){s.startColumn.modules.edit&&(s.startColumn.modules.edit.blocked=!1),s.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights(),document.body.removeEventListener("mouseup",n),document.body.removeEventListener("mousemove",i),o.removeEventListener("touchmove",i),o.removeEventListener("touchend",n),s.table.element.classList.remove("tabulator-block-select"),s.table.options.persistence&&s.table.modExists("persistence",!0)&&s.table.modules.persistence.config.columns&&s.table.modules.persistence.save("columns"),s.table.options.columnResized.call(s.table,t.getComponent())}var s=this;s.table.element.classList.add("tabulator-block-select"),e.stopPropagation(),s.startColumn.modules.edit&&(s.startColumn.modules.edit.blocked=!0),s.startX=void 0===e.screenX?e.touches[0].screenX:e.screenX,s.startWidth=t.getWidth(),document.body.addEventListener("mousemove",i),document.body.addEventListener("mouseup",n),o.addEventListener("touchmove",i,{passive:!0}),o.addEventListener("touchend",n)},h.prototype.registerModule("resizeColumns",U);var X=function(e){this.table=e,this.startColumn=!1,this.startY=!1,this.startHeight=!1,this.handle=null,this.prevHandle=null};X.prototype.initializeRow=function(e){var t=this,o=e.getElement(),i=document.createElement("div");i.className="tabulator-row-resize-handle";var n=document.createElement("div");n.className="tabulator-row-resize-handle prev",i.addEventListener("click",function(e){e.stopPropagation()});var s=function(o){t.startRow=e,t._mouseDown(o,e,i)};i.addEventListener("mousedown",s),i.addEventListener("touchstart",s,{passive:!0}),n.addEventListener("click",function(e){e.stopPropagation()});var a=function(o){var i=t.table.rowManager.prevDisplayRow(e);i&&(t.startRow=i,t._mouseDown(o,i,n))};n.addEventListener("mousedown",a),n.addEventListener("touchstart",a,{passive:!0}),o.appendChild(i),o.appendChild(n)},X.prototype._mouseDown=function(e,t,o){function i(e){t.setHeight(s.startHeight+((void 0===e.screenY?e.touches[0].screenY:e.screenY)-s.startY))}function n(e){document.body.removeEventListener("mouseup",i),document.body.removeEventListener("mousemove",i),o.removeEventListener("touchmove",i),o.removeEventListener("touchend",n),s.table.element.classList.remove("tabulator-block-select"),s.table.options.rowResized.call(this.table,t.getComponent())}var s=this;s.table.element.classList.add("tabulator-block-select"),e.stopPropagation(),s.startY=void 0===e.screenY?e.touches[0].screenY:e.screenY,s.startHeight=t.getHeight(),document.body.addEventListener("mousemove",i),document.body.addEventListener("mouseup",n),o.addEventListener("touchmove",i,{passive:!0}),o.addEventListener("touchend",n)},h.prototype.registerModule("resizeRows",X);var Y=function(e){this.table=e,this.binding=!1,this.observer=!1,this.containerObserver=!1,this.tableHeight=0,this.tableWidth=0,this.containerHeight=0,this.containerWidth=0,this.autoResize=!1};Y.prototype.initialize=function(e){var t,o=this,i=this.table;this.tableHeight=i.element.clientHeight,this.tableWidth=i.element.clientWidth,i.element.parentNode&&(this.containerHeight=i.element.parentNode.clientHeight,this.containerWidth=i.element.parentNode.clientWidth),"undefined"!=typeof ResizeObserver&&"virtual"===i.rowManager.getRenderMode()?(this.autoResize=!0,this.observer=new ResizeObserver(function(e){if(!i.browserMobile||i.browserMobile&&!i.modules.edit.currentCell){var t=Math.floor(e[0].contentRect.height),n=Math.floor(e[0].contentRect.width);o.tableHeight==t&&o.tableWidth==n||(o.tableHeight=t,o.tableWidth=n,i.element.parentNode&&(o.containerHeight=i.element.parentNode.clientHeight,o.containerWidth=i.element.parentNode.clientWidth),i.options.virtualDomHoz&&i.vdomHoz.reinitialize(!0),i.redraw())}}),this.observer.observe(i.element),t=window.getComputedStyle(i.element),this.table.element.parentNode&&!this.table.rowManager.fixedHeight&&(t.getPropertyValue("max-height")||t.getPropertyValue("min-height"))&&(this.containerObserver=new ResizeObserver(function(e){if(!i.browserMobile||i.browserMobile&&!i.modules.edit.currentCell){var t=Math.floor(e[0].contentRect.height),n=Math.floor(e[0].contentRect.width);o.containerHeight==t&&o.containerWidth==n||(o.containerHeight=t,o.containerWidth=n,o.tableHeight=i.element.clientHeight,o.tableWidth=i.element.clientWidth),i.options.virtualDomHoz&&i.vdomHoz.reinitialize(!0),i.redraw()}}),this.containerObserver.observe(this.table.element.parentNode))):(this.binding=function(){(!i.browserMobile||i.browserMobile&&!i.modules.edit.currentCell)&&(i.options.virtualDomHoz&&i.vdomHoz.reinitialize(!0),i.redraw())},window.addEventListener("resize",this.binding))},Y.prototype.clearBindings=function(e){this.binding&&window.removeEventListener("resize",this.binding),this.observer&&this.observer.unobserve(this.table.element),this.containerObserver&&this.containerObserver.unobserve(this.table.element.parentNode)},h.prototype.registerModule("resizeTable",Y);var q=function(e){this.table=e,this.columns=[],this.hiddenColumns=[],this.mode="",this.index=0,this.collapseFormatter=[],this.collapseStartOpen=!0,this.collapseHandleColumn=!1};q.prototype.initialize=function(){var e=this,t=[];this.mode=this.table.options.responsiveLayout,this.collapseFormatter=this.table.options.responsiveLayoutCollapseFormatter||this.formatCollapsedData,this.collapseStartOpen=this.table.options.responsiveLayoutCollapseStartOpen,this.hiddenColumns=[],this.table.columnManager.columnsByIndex.forEach(function(o,i){o.modules.responsive&&o.modules.responsive.order&&o.modules.responsive.visible&&(o.modules.responsive.index=i,t.push(o),o.visible||"collapse"!==e.mode||e.hiddenColumns.push(o))}),t=t.reverse(),t=t.sort(function(e,t){return t.modules.responsive.order-e.modules.responsive.order||t.modules.responsive.index-e.modules.responsive.index}),this.columns=t,"collapse"===this.mode&&this.generateCollapsedContent();for(var o=this.table.columnManager.columnsByIndex,i=Array.isArray(o),n=0,o=i?o:o[Symbol.iterator]();;){var s;if(i){if(n>=o.length)break;s=o[n++]}else{if(n=o.next(),n.done)break;s=n.value}var a=s;if("responsiveCollapse"==a.definition.formatter){this.collapseHandleColumn=a;break}}this.collapseHandleColumn&&(this.hiddenColumns.length?this.collapseHandleColumn.show():this.collapseHandleColumn.hide())},q.prototype.initializeColumn=function(e){var t=e.getDefinition();e.modules.responsive={order:void 0===t.responsive?1:t.responsive,visible:!1!==t.visible}},q.prototype.initializeRow=function(e){var t;"calc"!==e.type&&(t=document.createElement("div"),t.classList.add("tabulator-responsive-collapse"),e.modules.responsiveLayout={element:t,open:this.collapseStartOpen},this.collapseStartOpen||(t.style.display="none"))},q.prototype.layoutRow=function(e){var t=e.getElement();e.modules.responsiveLayout&&(t.appendChild(e.modules.responsiveLayout.element),this.generateCollapsedRowContent(e))},q.prototype.updateColumnVisibility=function(e,t){e.modules.responsive&&(e.modules.responsive.visible=t,this.initialize())},q.prototype.hideColumn=function(e){var t=this.hiddenColumns.length;e.hide(!1,!0),"collapse"===this.mode&&(this.hiddenColumns.unshift(e),this.generateCollapsedContent(),this.collapseHandleColumn&&!t&&this.collapseHandleColumn.show())},q.prototype.showColumn=function(e){var t;e.show(!1,!0),e.setWidth(e.getWidth()),"collapse"===this.mode&&(t=this.hiddenColumns.indexOf(e),t>-1&&this.hiddenColumns.splice(t,1),this.generateCollapsedContent(),this.collapseHandleColumn&&!this.hiddenColumns.length&&this.collapseHandleColumn.hide())},q.prototype.update=function(){for(var e=this,t=!0;t;){var o="fitColumns"==e.table.modules.layout.getMode()?e.table.columnManager.getFlexBaseWidth():e.table.columnManager.getWidth(),i=(e.table.options.headerVisible?e.table.columnManager.element.clientWidth:e.table.element.clientWidth)-o;if(i<0){var n=e.columns[e.index];n?(e.hideColumn(n),e.index++):t=!1}else{var s=e.columns[e.index-1];s&&i>0&&i>=s.getWidth()?(e.showColumn(s),e.index--):t=!1}e.table.rowManager.activeRowsCount||e.table.rowManager.renderEmptyScroll()}},q.prototype.generateCollapsedContent=function(){var e=this;this.table.rowManager.getDisplayRows().forEach(function(t){e.generateCollapsedRowContent(t)})},q.prototype.generateCollapsedRowContent=function(e){var t,o;if(e.modules.responsiveLayout){for(t=e.modules.responsiveLayout.element;t.firstChild;)t.removeChild(t.firstChild);o=this.collapseFormatter(this.generateCollapsedRowData(e)),o&&t.appendChild(o)}},q.prototype.generateCollapsedRowData=function(e){var t,o=this,i=e.getData(),n=[];return this.hiddenColumns.forEach(function(s){var a=s.getFieldValue(i);s.definition.title&&s.field&&(s.modules.format&&o.table.options.responsiveLayoutCollapseUseFormatters?(t={value:!1,data:{},getValue:function(){return a},getData:function(){return i},getElement:function(){return document.createElement("div")},getRow:function(){return e.getComponent()},getColumn:function(){return s.getComponent()}},n.push({title:s.definition.title,value:s.modules.format.formatter.call(o.table.modules.format,t,s.modules.format.params)})):n.push({title:s.definition.title,value:a}))}),n},q.prototype.formatCollapsedData=function(e){var t=document.createElement("table"),o="";return e.forEach(function(e){var t=document.createElement("div");e.value instanceof Node&&(t.appendChild(e.value),e.value=t.innerHTML),o+="<tr><td><strong>"+e.title+"</strong></td><td>"+e.value+"</td></tr>"}),t.innerHTML=o,Object.keys(e).length?t:""},h.prototype.registerModule("responsiveLayout",q);var K=function(e){this.table=e,this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],this.headerCheckboxElement=null};K.prototype.clearSelectionData=function(e){this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],e||this._rowSelectionChanged()},K.prototype.initializeRow=function(e){var t=this,o=e.getElement(),i=function e(){setTimeout(function(){t.selecting=!1},50),document.body.removeEventListener("mouseup",e)};e.modules.select={selected:!1},t.table.options.selectableCheck.call(this.table,e.getComponent())?(o.classList.add("tabulator-selectable"),o.classList.remove("tabulator-unselectable"),t.table.options.selectable&&"highlight"!=t.table.options.selectable&&("click"===t.table.options.selectableRangeMode?o.addEventListener("click",function(o){if(o.shiftKey){t.table._clearSelection(),t.lastClickedRow=t.lastClickedRow||e;var i=t.table.rowManager.getDisplayRowIndex(t.lastClickedRow),n=t.table.rowManager.getDisplayRowIndex(e),s=i<=n?i:n,a=i>=n?i:n,r=t.table.rowManager.getDisplayRows().slice(0),l=r.splice(s,a-s+1);o.ctrlKey||o.metaKey?(l.forEach(function(o){o!==t.lastClickedRow&&(!0===t.table.options.selectable||t.isRowSelected(e)?t.toggleRow(o):t.selectedRows.length<t.table.options.selectable&&t.toggleRow(o))}),t.lastClickedRow=e):(t.deselectRows(void 0,!0),!0!==t.table.options.selectable&&l.length>t.table.options.selectable&&(l=l.slice(0,t.table.options.selectable)),t.selectRows(l)),t.table._clearSelection()}else o.ctrlKey||o.metaKey?(t.toggleRow(e),t.lastClickedRow=e):(t.deselectRows(void 0,!0),t.selectRows(e),t.lastClickedRow=e)}):(o.addEventListener("click",function(o){t.table.modExists("edit")&&t.table.modules.edit.getCurrentCell()||t.table._clearSelection(),t.selecting||t.toggleRow(e)}),o.addEventListener("mousedown",function(o){if(o.shiftKey)return t.table._clearSelection(),t.selecting=!0,t.selectPrev=[],document.body.addEventListener("mouseup",i),document.body.addEventListener("keyup",i),t.toggleRow(e),!1}),o.addEventListener("mouseenter",function(o){t.selecting&&(t.table._clearSelection(),t.toggleRow(e),t.selectPrev[1]==e&&t.toggleRow(t.selectPrev[0]))}),o.addEventListener("mouseout",function(o){t.selecting&&(t.table._clearSelection(),t.selectPrev.unshift(e))})))):(o.classList.add("tabulator-unselectable"),o.classList.remove("tabulator-selectable"))},K.prototype.toggleRow=function(e){this.table.options.selectableCheck.call(this.table,e.getComponent())&&(e.modules.select&&e.modules.select.selected?this._deselectRow(e):this._selectRow(e))},K.prototype.selectRows=function(e){var t,o=this;switch(void 0===e?"undefined":_typeof(e)){case"undefined":this.table.rowManager.rows.forEach(function(e){o._selectRow(e,!0,!0)}),this._rowSelectionChanged();break;case"string":t=this.table.rowManager.findRow(e),t?this._selectRow(t,!0,!0):this.table.rowManager.getRows(e).forEach(function(e){o._selectRow(e,!0,!0)}),this._rowSelectionChanged();break;default:Array.isArray(e)?(e.forEach(function(e){o._selectRow(e,!0,!0)}),this._rowSelectionChanged()):this._selectRow(e,!1,!0)}},K.prototype._selectRow=function(e,t,o){if(!isNaN(this.table.options.selectable)&&!0!==this.table.options.selectable&&!o&&this.selectedRows.length>=this.table.options.selectable){if(!this.table.options.selectableRollingSelection)return!1;this._deselectRow(this.selectedRows[0])}var i=this.table.rowManager.findRow(e);i?-1==this.selectedRows.indexOf(i)&&(i.modules.select||(i.modules.select={}),i.modules.select.selected=!0,i.modules.select.checkboxEl&&(i.modules.select.checkboxEl.checked=!0),i.getElement().classList.add("tabulator-selected"),this.selectedRows.push(i),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(i,!0),t||this.table.options.rowSelected.call(this.table,i.getComponent()),this._rowSelectionChanged(t)):t||console.warn("Selection Error - No such row found, ignoring selection:"+e)},K.prototype.isRowSelected=function(e){return-1!==this.selectedRows.indexOf(e)},K.prototype.deselectRows=function(e,t){var o,i=this;if(void 0===e){o=i.selectedRows.length;for(var n=0;n<o;n++)i._deselectRow(i.selectedRows[0],!0);i._rowSelectionChanged(t)}else Array.isArray(e)?(e.forEach(function(e){i._deselectRow(e,!0)}),i._rowSelectionChanged(t)):i._deselectRow(e,t)},K.prototype._deselectRow=function(e,t){var o,i=this,n=i.table.rowManager.findRow(e);n?(o=i.selectedRows.findIndex(function(e){return e==n}))>-1&&(n.modules.select||(n.modules.select={}),n.modules.select.selected=!1,n.modules.select.checkboxEl&&(n.modules.select.checkboxEl.checked=!1),n.getElement().classList.remove("tabulator-selected"),i.selectedRows.splice(o,1),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(n,!1),t||i.table.options.rowDeselected.call(this.table,n.getComponent()),i._rowSelectionChanged(t)):t||console.warn("Deselection Error - No such row found, ignoring selection:"+e)},K.prototype.getSelectedData=function(){var e=[];return this.selectedRows.forEach(function(t){e.push(t.getData())}),e},K.prototype.getSelectedRows=function(){var e=[];return this.selectedRows.forEach(function(t){e.push(t.getComponent())}),e},K.prototype._rowSelectionChanged=function(e){this.headerCheckboxElement&&(0===this.selectedRows.length?(this.headerCheckboxElement.checked=!1,this.headerCheckboxElement.indeterminate=!1):this.table.rowManager.rows.length===this.selectedRows.length?(this.headerCheckboxElement.checked=!0,this.headerCheckboxElement.indeterminate=!1):(this.headerCheckboxElement.indeterminate=!0,this.headerCheckboxElement.checked=!1)),e||this.table.options.rowSelectionChanged.call(this.table,this.getSelectedData(),this.getSelectedRows())},K.prototype.registerRowSelectCheckbox=function(e,t){e._row.modules.select||(e._row.modules.select={}),e._row.modules.select.checkboxEl=t},K.prototype.registerHeaderSelectCheckbox=function(e){this.headerCheckboxElement=e},K.prototype.childRowSelection=function(e,t){var o=this.table.modules.dataTree.getChildren(e);if(t)for(var i=o,n=Array.isArray(i),s=0,i=n?i:i[Symbol.iterator]();;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var r=a;this._selectRow(r,!0)}else for(var l=o,c=Array.isArray(l),u=0,l=c?l:l[Symbol.iterator]();;){var d;if(c){if(u>=l.length)break;d=l[u++]}else{if(u=l.next(),u.done)break;d=u.value}var h=d;this._deselectRow(h,!0)}},h.prototype.registerModule("selectRow",K);var J=function(e){this.table=e,this.sortList=[],this.changed=!1};J.prototype.initializeColumn=function(e,t){var o,i,n=this,s=!1;switch(_typeof(e.definition.sorter)){case"string":n.sorters[e.definition.sorter]?s=n.sorters[e.definition.sorter]:console.warn("Sort Error - No such sorter found: ",e.definition.sorter);break;case"function":s=e.definition.sorter}e.modules.sort={sorter:s,dir:"none",params:e.definition.sorterParams||{},startingDir:e.definition.headerSortStartingDir||"asc",tristate:void 0!==e.definition.headerSortTristate?e.definition.headerSortTristate:this.table.options.headerSortTristate},(void 0===e.definition.headerSort?!1!==this.table.options.headerSort:!1!==e.definition.headerSort)&&(o=e.getElement(),o.classList.add("tabulator-sortable"),i=document.createElement("div"),i.classList.add("tabulator-col-sorter"),"object"==_typeof(this.table.options.headerSortElement)?i.appendChild(this.table.options.headerSortElement):i.innerHTML=this.table.options.headerSortElement,t.appendChild(i),e.modules.sort.element=i,o.addEventListener("click",function(t){var o="",i=[],s=!1;if(e.modules.sort){if(e.modules.sort.tristate)o="none"==e.modules.sort.dir?e.modules.sort.startingDir:e.modules.sort.dir==e.modules.sort.startingDir?"asc"==e.modules.sort.dir?"desc":"asc":"none";else switch(e.modules.sort.dir){case"asc":o="desc";break;case"desc":o="asc";break;default:o=e.modules.sort.startingDir}n.table.options.columnHeaderSortMulti&&(t.shiftKey||t.ctrlKey)?(i=n.getSort(),s=i.findIndex(function(t){return t.field===e.getField()}),s>-1?(i[s].dir=o,s!=i.length-1&&(s=i.splice(s,1)[0],"none"!=o&&i.push(s))):"none"!=o&&i.push({column:e,dir:o}),n.setSort(i)):"none"==o?n.clear():n.setSort(e,o),n.table.rowManager.sorterRefresh(!n.sortList.length)}}))},J.prototype.hasChanged=function(){var e=this.changed;return this.changed=!1,e},J.prototype.getSort=function(){var e=this,t=[];return e.sortList.forEach(function(e){e.column&&t.push({column:e.column.getComponent(),field:e.column.getField(),dir:e.dir})}),t},J.prototype.setSort=function(e,t){var o=this,i=[];Array.isArray(e)||(e=[{column:e,dir:t}]),e.forEach(function(e){var t;t=o.table.columnManager.findColumn(e.column),t?(e.column=t,i.push(e),o.changed=!0):console.warn("Sort Warning - Sort field does not exist and is being ignored: ",e.column)}),o.sortList=i,this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.sort&&this.table.modules.persistence.save("sort")},J.prototype.clear=function(){this.setSort([])},J.prototype.findSorter=function(e){var t,o=this.table.rowManager.activeRows[0],i="string";if(o&&(o=o.getData(),e.getField()))switch(t=e.getFieldValue(o),void 0===t?"undefined":_typeof(t)){case"undefined":i="string";break;case"boolean":i="boolean";break;default:isNaN(t)||""===t?t.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)&&(i="alphanum"):i="number"}return this.sorters[i]},J.prototype.sort=function(e){var t=this,o=this.table.options.sortOrderReverse?t.sortList.slice().reverse():t.sortList,i=[],n=[];t.table.options.dataSorting&&t.table.options.dataSorting.call(t.table,t.getSort()),t.clearColumnHeaders(),t.table.options.ajaxSorting?o.forEach(function(e,o){t.setColumnHeader(e.column,e.dir)}):(o.forEach(function(e,o){var n=e.column.modules.sort;e.column&&n&&(n.sorter||(n.sorter=t.findSorter(e.column)),e.params="function"==typeof n.params?n.params(e.column.getComponent(),e.dir):n.params,i.push(e)),t.setColumnHeader(e.column,e.dir)}),i.length&&t._sortItems(e,i)),t.table.options.dataSorted&&(e.forEach(function(e){n.push(e.getComponent())}),t.table.options.dataSorted.call(t.table,t.getSort(),n))},J.prototype.clearColumnHeaders=function(){this.table.columnManager.getRealColumns().forEach(function(e){e.modules.sort&&(e.modules.sort.dir="none",e.getElement().setAttribute("aria-sort","none"))})},J.prototype.setColumnHeader=function(e,t){e.modules.sort.dir=t,e.getElement().setAttribute("aria-sort",t)},J.prototype._sortItems=function(e,t){var o=this,i=t.length-1;e.sort(function(e,n){for(var s,a=i;a>=0;a--){var r=t[a];if(0!==(s=o._sortRow(e,n,r.column,r.dir,r.params)))break}return s})},J.prototype._sortRow=function(e,t,o,i,n){var s,a,r="asc"==i?e:t,l="asc"==i?t:e;return e=o.getFieldValue(r.getData()),t=o.getFieldValue(l.getData()),e=void 0!==e?e:"",t=void 0!==t?t:"",s=r.getComponent(),a=l.getComponent(),o.modules.sort.sorter.call(this,e,t,s,a,o.getComponent(),i,n)},J.prototype.sorters={number:function(e,t,o,i,n,s,a){var r=a.alignEmptyValues,l=a.decimalSeparator||".",c=a.thousandSeparator||",",u=0;if(e=parseFloat(String(e).split(c).join("").split(l).join(".")),t=parseFloat(String(t).split(c).join("").split(l).join(".")),isNaN(e))u=isNaN(t)?0:-1;else{if(!isNaN(t))return e-t;u=1}return("top"===r&&"desc"===s||"bottom"===r&&"asc"===s)&&(u*=-1),u},string:function(e,t,o,i,n,s,a){var r,l=a.alignEmptyValues,c=0;if(e){if(t){switch(_typeof(a.locale)){case"boolean":a.locale&&(r=this.table.modules.localize.getLocale());break;case"string":r=a.locale}return String(e).toLowerCase().localeCompare(String(t).toLowerCase(),r)}c=1}else c=t?-1:0;return("top"===l&&"desc"===s||"bottom"===l&&"asc"===s)&&(c*=-1),c},date:function(e,t,o,i,n,s,a){return a.format||(a.format="DD/MM/YYYY"),this.sorters.datetime.call(this,e,t,o,i,n,s,a)},time:function(e,t,o,i,n,s,a){return a.format||(a.format="HH:mm"),this.sorters.datetime.call(this,e,t,o,i,n,s,a)},datetime:function(e,t,o,i,n,s,a){var r=a.format||"DD/MM/YYYY HH:mm:ss",l=a.alignEmptyValues,c=0;if("undefined"!=typeof moment){if(e=moment(e,r),t=moment(t,r),e.isValid()){if(t.isValid())return e-t;c=1}else c=t.isValid()?-1:0;return("top"===l&&"desc"===s||"bottom"===l&&"asc"===s)&&(c*=-1),c}console.error("Sort Error - 'datetime' sorter is dependant on moment.js")},boolean:function(e,t,o,i,n,s,a){return(!0===e||"true"===e||"True"===e||1===e?1:0)-(!0===t||"true"===t||"True"===t||1===t?1:0)},array:function(e,t,o,i,n,s,a){function r(e){switch(u){case"length":return e.length;case"sum":return e.reduce(function(e,t){return e+t});case"max":return Math.max.apply(null,e);case"min":return Math.min.apply(null,e);case"avg":return e.reduce(function(e,t){return e+t})/e.length}}
-var l=0,c=0,u=a.type||"length",d=a.alignEmptyValues,h=0;if(Array.isArray(e)){if(Array.isArray(t))return l=e?r(e):0,c=t?r(t):0,l-c;d=1}else d=Array.isArray(t)?-1:0;return("top"===d&&"desc"===s||"bottom"===d&&"asc"===s)&&(h*=-1),h},exists:function(e,t,o,i,n,s,a){return(void 0===e?0:1)-(void 0===t?0:1)},alphanum:function(e,t,o,i,n,s,a){var r,l,c,u,d,h=0,p=/(\d+)|(\D+)/g,m=/\d/,f=a.alignEmptyValues,g=0;if(e||0===e){if(t||0===t){if(isFinite(e)&&isFinite(t))return e-t;if(r=String(e).toLowerCase(),l=String(t).toLowerCase(),r===l)return 0;if(!m.test(r)||!m.test(l))return r>l?1:-1;for(r=r.match(p),l=l.match(p),d=r.length>l.length?l.length:r.length;h<d;)if(c=r[h],u=l[h++],c!==u)return isFinite(c)&&isFinite(u)?("0"===c.charAt(0)&&(c="."+c),"0"===u.charAt(0)&&(u="."+u),c-u):c>u?1:-1;return r.length>l.length}g=1}else g=t||0===t?-1:0;return("top"===f&&"desc"===s||"bottom"===f&&"asc"===s)&&(g*=-1),g}},h.prototype.registerModule("sort",J);var $=function(e){this.table=e,this.invalidCells=[]};return $.prototype.initializeColumn=function(e){var t,o=this,i=[];e.definition.validator&&(Array.isArray(e.definition.validator)?e.definition.validator.forEach(function(e){(t=o._extractValidator(e))&&i.push(t)}):(t=this._extractValidator(e.definition.validator))&&i.push(t),e.modules.validate=!!i.length&&i)},$.prototype._extractValidator=function(e){var t,o,i;switch(void 0===e?"undefined":_typeof(e)){case"string":return i=e.indexOf(":"),i>-1?(t=e.substring(0,i),o=e.substring(i+1)):t=e,this._buildValidator(t,o);case"function":return this._buildValidator(e);case"object":return this._buildValidator(e.type,e.parameters)}},$.prototype._buildValidator=function(e,t){var o="function"==typeof e?e:this.validators[e];return o?{type:"function"==typeof e?"function":e,func:o,params:t}:(console.warn("Validator Setup Error - No matching validator found:",e),!1)},$.prototype.validate=function(e,t,o){var i=this,n=[],s=this.invalidCells.indexOf(t);return e&&e.forEach(function(e){e.func.call(i,t.getComponent(),o,e.params)||n.push({type:e.type,parameters:e.params})}),n=!n.length||n,t.modules.validate||(t.modules.validate={}),!0===n?(t.modules.validate.invalid=!1,t.getElement().classList.remove("tabulator-validation-fail"),s>-1&&this.invalidCells.splice(s,1)):(t.modules.validate.invalid=!0,"manual"!==this.table.options.validationMode&&t.getElement().classList.add("tabulator-validation-fail"),-1==s&&this.invalidCells.push(t)),n},$.prototype.getInvalidCells=function(){var e=[];return this.invalidCells.forEach(function(t){e.push(t.getComponent())}),e},$.prototype.clearValidation=function(e){var t;e.modules.validate&&e.modules.validate.invalid&&(e.getElement().classList.remove("tabulator-validation-fail"),e.modules.validate.invalid=!1,(t=this.invalidCells.indexOf(e))>-1&&this.invalidCells.splice(t,1))},$.prototype.validators={integer:function(e,t,o){return""===t||null===t||void 0===t||"number"==typeof(t=Number(t))&&isFinite(t)&&Math.floor(t)===t},float:function(e,t,o){return""===t||null===t||void 0===t||"number"==typeof(t=Number(t))&&isFinite(t)&&t%1!=0},numeric:function(e,t,o){return""===t||null===t||void 0===t||!isNaN(t)},string:function(e,t,o){return""===t||null===t||void 0===t||isNaN(t)},max:function(e,t,o){return""===t||null===t||void 0===t||parseFloat(t)<=o},min:function(e,t,o){return""===t||null===t||void 0===t||parseFloat(t)>=o},starts:function(e,t,o){return""===t||null===t||void 0===t||String(t).toLowerCase().startsWith(String(o).toLowerCase())},ends:function(e,t,o){return""===t||null===t||void 0===t||String(t).toLowerCase().endsWith(String(o).toLowerCase())},minLength:function(e,t,o){return""===t||null===t||void 0===t||String(t).length>=o},maxLength:function(e,t,o){return""===t||null===t||void 0===t||String(t).length<=o},in:function(e,t,o){return""===t||null===t||void 0===t||("string"==typeof o&&(o=o.split("|")),""===t||o.indexOf(t)>-1)},regex:function(e,t,o){return""===t||null===t||void 0===t||new RegExp(o).test(t)},unique:function(e,t,o){if(""===t||null===t||void 0===t)return!0;var i=!0,n=e.getData(),s=e.getColumn()._getSelf();return this.table.rowManager.rows.forEach(function(e){var o=e.getData();o!==n&&t==s.getFieldValue(o)&&(i=!1)}),i},required:function(e,t,o){return""!==t&&null!==t&&void 0!==t}},h.prototype.registerModule("validate",$),h});
\ No newline at end of file
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
+var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(e,t){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Tabulator=t()}(this,function(){"use strict";Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(e){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),o=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;n<o;){var s=t[n];if(e.call(i,s,n,t))return n;n++}return-1}}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),o=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;n<o;){var s=t[n];if(e.call(i,s,n,t))return s;n++}}}),String.prototype.includes||(String.prototype.includes=function(e,t){if(e instanceof RegExp)throw TypeError("first argument must not be a RegExp");return void 0===t&&(t=0),-1!==this.indexOf(e,t)}),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(e,t){if(null==this)throw new TypeError('"this" is null or not defined');var o=Object(this),i=o.length>>>0;if(0===i)return!1;for(var n=0|t,s=Math.max(n>=0?n:i-Math.abs(n),0);s<i;){if(function(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}(o[s],e))return!0;s++}return!1}}),"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(e,t){if(null===e||void 0===e)throw new TypeError("Cannot convert undefined or null to object");for(var o=Object(e),i=1;i<arguments.length;i++){var n=arguments[i];if(null!==n&&void 0!==n)for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(o[s]=n[s])}return o},writable:!0,configurable:!0});var t=function(e){this.table=e,this.blockHozScrollEvent=!1,this.headersElement=this.createHeadersElement(),this.element=this.createHeaderElement(),this.rowManager=null,this.columns=[],this.columnsByIndex=[],this.columnsByField={},this.scrollLeft=0,this.element.insertBefore(this.headersElement,this.element.firstChild)};t.prototype.createHeadersElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-headers"),e},t.prototype.createHeaderElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-header"),this.table.options.headerVisible||e.classList.add("tabulator-header-hidden"),e},t.prototype.initialize=function(){},t.prototype.setRowManager=function(e){this.rowManager=e},t.prototype.getElement=function(){return this.element},t.prototype.getHeadersElement=function(){return this.headersElement},t.prototype.scrollHorizontal=function(e){var t=0,o=this.element.scrollWidth-this.table.element.clientWidth;this.element.scrollLeft=e,e>o?(t=e-o,this.element.style.marginLeft=-t+"px"):this.element.style.marginLeft=0,this.scrollLeft=e,this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.scrollHorizontal()},t.prototype.generateColumnsFromRowData=function(e){var t,o,i=[],n=this.table.options.autoColumnsDefinitions;if(e&&e.length){t=e[0];for(var s in t){var a={field:s,title:s},r=t[s];switch(void 0===r?"undefined":_typeof(r)){case"undefined":o="string";break;case"boolean":o="boolean";break;case"object":o=Array.isArray(r)?"array":"string";break;default:o=isNaN(r)||""===r?r.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)?"alphanum":"string":"number"}a.sorter=o,i.push(a)}if(n)switch(void 0===n?"undefined":_typeof(n)){case"function":this.table.options.columns=n.call(this.table,i);break;case"object":Array.isArray(n)?i.forEach(function(e){var t=n.find(function(t){return t.field===e.field});t&&Object.assign(e,t)}):i.forEach(function(e){n[e.field]&&Object.assign(e,n[e.field])}),this.table.options.columns=i}else this.table.options.columns=i;this.setColumns(this.table.options.columns)}},t.prototype.setColumns=function(e,t){for(var o=this;o.headersElement.firstChild;)o.headersElement.removeChild(o.headersElement.firstChild);o.columns=[],o.columnsByIndex=[],o.columnsByField={},o.table.modExists("frozenColumns")&&o.table.modules.frozenColumns.reset(),e.forEach(function(e,t){o._addColumn(e)}),o._reIndexColumns(),o.table.options.responsiveLayout&&o.table.modExists("responsiveLayout",!0)&&o.table.modules.responsiveLayout.initialize(),this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitialize(!1,!0),o.redraw(!0)},t.prototype._addColumn=function(e,t,o){var i=new n(e,this),s=i.getElement(),a=o?this.findColumnIndex(o):o;if(o&&a>-1){var r=this.columns.indexOf(o.getTopColumn()),l=o.getElement();t?(this.columns.splice(r,0,i),l.parentNode.insertBefore(s,l)):(this.columns.splice(r+1,0,i),l.parentNode.insertBefore(s,l.nextSibling))}else t?(this.columns.unshift(i),this.headersElement.insertBefore(i.getElement(),this.headersElement.firstChild)):(this.columns.push(i),this.headersElement.appendChild(i.getElement())),i.columnRendered();return i},t.prototype.registerColumnField=function(e){e.definition.field&&(this.columnsByField[e.definition.field]=e)},t.prototype.registerColumnPosition=function(e){this.columnsByIndex.push(e)},t.prototype._reIndexColumns=function(){this.columnsByIndex=[],this.columns.forEach(function(e){e.reRegisterPosition()})},t.prototype._verticalAlignHeaders=function(){var e=this,t=0;e.columns.forEach(function(e){var o;e.clearVerticalAlign(),(o=e.getHeight())>t&&(t=o)}),e.columns.forEach(function(o){o.verticalAlign(e.table.options.columnHeaderVertAlign,t)}),e.rowManager.adjustTableSize()},t.prototype.findColumn=function(e){var t=this;if("object"!=(void 0===e?"undefined":_typeof(e)))return this.columnsByField[e]||!1;if(e instanceof n)return e;if(e instanceof o)return e._getSelf()||!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement){return t.columns.find(function(t){return t.element===e})||!1}return!1},t.prototype.getColumnByField=function(e){return this.columnsByField[e]},t.prototype.getColumnsByFieldRoot=function(e){var t=this,o=[];return Object.keys(this.columnsByField).forEach(function(i){i.split(".")[0]===e&&o.push(t.columnsByField[i])}),o},t.prototype.getColumnByIndex=function(e){return this.columnsByIndex[e]},t.prototype.getFirstVisibileColumn=function(e){var e=this.columnsByIndex.findIndex(function(e){return e.visible});return e>-1&&this.columnsByIndex[e]},t.prototype.getColumns=function(){return this.columns},t.prototype.findColumnIndex=function(e){return this.columnsByIndex.findIndex(function(t){return e===t})},t.prototype.getRealColumns=function(){return this.columnsByIndex},t.prototype.traverse=function(e){this.columnsByIndex.forEach(function(t,o){e(t,o)})},t.prototype.getDefinitions=function(e){var t=this,o=[];return t.columnsByIndex.forEach(function(t){(!e||e&&t.visible)&&o.push(t.getDefinition())}),o},t.prototype.getDefinitionTree=function(){var e=this,t=[];return e.columns.forEach(function(e){t.push(e.getDefinition(!0))}),t},t.prototype.getComponents=function(e){var t=this,o=[];return(e?t.columns:t.columnsByIndex).forEach(function(e){o.push(e.getComponent())}),o},t.prototype.getWidth=function(){var e=0;return this.columnsByIndex.forEach(function(t){t.visible&&(e+=t.getWidth())}),e},t.prototype.moveColumn=function(e,t,o){this.moveColumnActual(e,t,o),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),t.element.parentNode.insertBefore(e.element,t.element),o&&t.element.parentNode.insertBefore(t.element,e.element),this._verticalAlignHeaders(),this.table.rowManager.reinitialize()},t.prototype.moveColumnActual=function(e,t,o){e.parent.isGroup?this._moveColumnInArray(e.parent.columns,e,t,o):this._moveColumnInArray(this.columns,e,t,o),this._moveColumnInArray(this.columnsByIndex,e,t,o,!0),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitialize(!0),this.table.options.columnMoved&&this.table.options.columnMoved.call(this.table,e.getComponent(),this.table.columnManager.getComponents()),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns")},t.prototype._moveColumnInArray=function(e,t,o,i,n){var s,a=this,r=e.indexOf(t),l=[];r>-1&&(e.splice(r,1),s=e.indexOf(o),s>-1?i&&(s+=1):s=r,e.splice(s,0,t),n&&(this.table.options.dataTree&&this.table.modExists("dataTree",!0)&&this.table.rowManager.rows.forEach(function(e){l=l.concat(a.table.modules.dataTree.getTreeChildren(e,!1,!0))}),l=l.concat(this.table.rowManager.rows),l.forEach(function(e){if(e.cells.length){var t=e.cells.splice(r,1)[0];e.cells.splice(s,0,t)}})))},t.prototype.scrollToColumn=function(e,t,o){var i=this,n=0,s=0,a=0,r=e.getElement();return new Promise(function(l,c){if(void 0===t&&(t=i.table.options.scrollToColumnPosition),void 0===o&&(o=i.table.options.scrollToColumnIfVisible),e.visible){switch(t){case"middle":case"center":a=-i.element.clientWidth/2;break;case"right":a=r.clientWidth-i.headersElement.clientWidth}if(!o&&(s=r.offsetLeft)>0&&s+r.offsetWidth<i.element.clientWidth)return!1;n=r.offsetLeft+a,n=Math.max(Math.min(n,i.table.rowManager.element.scrollWidth-i.table.rowManager.element.clientWidth),0),i.table.rowManager.scrollHorizontal(n),i.scrollHorizontal(n),l()}else console.warn("Scroll Error - Column not visible"),c("Scroll Error - Column not visible")})},t.prototype.generateCells=function(e){var t=this,o=[];return t.columnsByIndex.forEach(function(t){o.push(t.generateCell(e))}),o},t.prototype.getFlexBaseWidth=function(){var e=this,t=e.table.element.clientWidth,o=0;return e.rowManager.element.scrollHeight>e.rowManager.element.clientHeight&&(t-=e.rowManager.element.offsetWidth-e.rowManager.element.clientWidth),this.columnsByIndex.forEach(function(i){var n,s,a;i.visible&&(n=i.definition.width||0,s=void 0===i.minWidth?e.table.options.columnMinWidth:parseInt(i.minWidth),a="string"==typeof n?n.indexOf("%")>-1?t/100*parseInt(n):parseInt(n):n,o+=a>s?a:s)}),o},t.prototype.addColumn=function(e,t,o){var i=this;return new Promise(function(n,s){var a=i._addColumn(e,t,o);i._reIndexColumns(),i.table.options.responsiveLayout&&i.table.modExists("responsiveLayout",!0)&&i.table.modules.responsiveLayout.initialize(),i.table.modExists("columnCalcs")&&i.table.modules.columnCalcs.recalc(i.table.rowManager.activeRows),i.redraw(!0),"fitColumns"!=i.table.modules.layout.getMode()&&a.reinitializeWidth(),i._verticalAlignHeaders(),i.table.rowManager.reinitialize(),i.table.options.virtualDomHoz&&i.table.vdomHoz.reinitialize(),n(a)})},t.prototype.deregisterColumn=function(e){var t,o=e.getField();o&&delete this.columnsByField[o],t=this.columnsByIndex.indexOf(e),t>-1&&this.columnsByIndex.splice(t,1),t=this.columns.indexOf(e),t>-1&&this.columns.splice(t,1),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this._verticalAlignHeaders(),this.redraw()},t.prototype.redraw=function(e){e&&(h.prototype.helpers.elVisible(this.element)&&this._verticalAlignHeaders(),this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),["fitColumns","fitDataStretch"].indexOf(this.table.modules.layout.getMode())>-1?this.table.modules.layout.layout():e?this.table.modules.layout.layout():this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),e&&(this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns"),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.redraw()),this.table.footerManager.redraw()};var o=function(e){this._column=e,this.type="ColumnComponent"};o.prototype.getElement=function(){return this._column.getElement()},o.prototype.getDefinition=function(){return this._column.getDefinition()},o.prototype.getField=function(){return this._column.getField()},o.prototype.getCells=function(){var e=[];return this._column.cells.forEach(function(t){e.push(t.getComponent())}),e},o.prototype.getVisibility=function(){return console.warn("getVisibility function is deprecated, you should now use the isVisible function"),this._column.visible},o.prototype.isVisible=function(){return this._column.visible},o.prototype.show=function(){this._column.isGroup?this._column.columns.forEach(function(e){e.show()}):this._column.show()},o.prototype.hide=function(){this._column.isGroup?this._column.columns.forEach(function(e){e.hide()}):this._column.hide()},o.prototype.toggle=function(){this._column.visible?this.hide():this.show()},o.prototype.delete=function(){return this._column.delete()},o.prototype.getSubColumns=function(){var e=[];return this._column.columns.length&&this._column.columns.forEach(function(t){e.push(t.getComponent())}),e},o.prototype.getParentColumn=function(){return this._column.parent instanceof n&&this._column.parent.getComponent()},o.prototype._getSelf=function(){return this._column},o.prototype.scrollTo=function(){return this._column.table.columnManager.scrollToColumn(this._column)},o.prototype.getTable=function(){return this._column.table},o.prototype.headerFilterFocus=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterFocus(this._column)},o.prototype.reloadHeaderFilter=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.reloadHeaderFilter(this._column)},o.prototype.getHeaderFilterValue=function(){if(this._column.table.modExists("filter",!0))return this._column.table.modules.filter.getHeaderFilterValue(this._column)},o.prototype.setHeaderFilterValue=function(e){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterValue(this._column,e)},o.prototype.move=function(e,t){var o=this._column.table.columnManager.findColumn(e);o?this._column.table.columnManager.moveColumn(this._column,o,t):console.warn("Move Error - No matching column found:",o)},o.prototype.getNextColumn=function(){var e=this._column.nextColumn();return!!e&&e.getComponent()},o.prototype.getPrevColumn=function(){var e=this._column.prevColumn();return!!e&&e.getComponent()},o.prototype.updateDefinition=function(e){return this._column.updateDefinition(e)},o.prototype.getWidth=function(){return this._column.getWidth()},o.prototype.setWidth=function(e){var t;return t=!0===e?this._column.reinitializeWidth(!0):this._column.setWidth(e),this._column.table.options.virtualDomHoz&&this._column.table.vdomHoz.reinitialize(!0),t},o.prototype.validate=function(){return this._column.validate()};var n=function e(t,o){var i=this;this.table=o.table,this.definition=t,this.parent=o,this.type="column",this.columns=[],this.cells=[],this.element=this.createElement(),this.contentElement=!1,this.titleHolderElement=!1,this.titleElement=!1,this.groupElement=this.createGroupElement(),this.isGroup=!1,this.tooltip=!1,this.hozAlign="",this.vertAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.titleFormatterRendered=!1,this.setField(this.definition.field),this.table.options.invalidOptionWarnings&&this.checkDefinition(),this.modules={},this.cellEvents={cellClick:!1,cellDblClick:!1,cellContext:!1,cellTap:!1,cellDblTap:!1,cellTapHold:!1,cellMouseEnter:!1,cellMouseLeave:!1,cellMouseOver:!1,cellMouseOut:!1,cellMouseMove:!1},this.width=null,this.widthStyled="",this.maxWidth=null,this.maxWidthStyled="",this.minWidth=null,this.minWidthStyled="",this.widthFixed=!1,this.visible=!0,this.component=null,this._mapDepricatedFunctionality(),t.columns?(this.isGroup=!0,t.columns.forEach(function(t,o){var n=new e(t,i);i.attachColumn(n)}),i.checkColumnVisibility()):o.registerColumnField(this),t.rowHandle&&!1!==this.table.options.movableRows&&this.table.modExists("moveRow")&&this.table.modules.moveRow.setHandle(!0),this._buildHeader(),this.bindModuleColumns()};n.prototype.createElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-col"),e.setAttribute("role","columnheader"),e.setAttribute("aria-sort","none"),e},n.prototype.createGroupElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-col-group-cols"),e},n.prototype.checkDefinition=function(){var e=this;Object.keys(this.definition).forEach(function(t){-1===e.defaultOptionList.indexOf(t)&&console.warn("Invalid column definition option in '"+(e.field||e.definition.title)+"' column:",t)})},n.prototype.setField=function(e){this.field=e,this.fieldStructure=e?this.table.options.nestedFieldSeparator?e.split(this.table.options.nestedFieldSeparator):[e]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNestedData:this._setFlatData},n.prototype.registerColumnPosition=function(e){this.parent.registerColumnPosition(e)},n.prototype.registerColumnField=function(e){this.parent.registerColumnField(e)},n.prototype.reRegisterPosition=function(){this.isGroup?this.columns.forEach(function(e){e.reRegisterPosition()}):this.registerColumnPosition(this)},n.prototype._mapDepricatedFunctionality=function(){void 0!==this.definition.hideInHtml&&(this.definition.htmlOutput=!this.definition.hideInHtml,console.warn("hideInHtml column definition property is deprecated, you should now use htmlOutput")),void 0!==this.definition.align&&(this.definition.hozAlign=this.definition.align,console.warn("align column definition property is deprecated, you should now use hozAlign")),void 0!==this.definition.downloadTitle&&(this.definition.titleDownload=this.definition.downloadTitle,console.warn("downloadTitle definition property is deprecated, you should now use titleDownload"))},n.prototype.setTooltip=function(){var e=this,t=e.definition,o=t.headerTooltip||!1===t.tooltip?t.headerTooltip:e.table.options.tooltipsHeader;o?!0===o?t.field?e.table.modules.localize.bind("columns|"+t.field,function(o){e.element.setAttribute("title",o||t.title)}):e.element.setAttribute("title",t.title):("function"==typeof o&&!1===(o=o(e.getComponent()))&&(o=""),e.element.setAttribute("title",o)):e.element.setAttribute("title","")},n.prototype._buildHeader=function(){for(var e=this,t=e.definition;e.element.firstChild;)e.element.removeChild(e.element.firstChild);t.headerVertical&&(e.element.classList.add("tabulator-col-vertical"),"flip"===t.headerVertical&&e.element.classList.add("tabulator-col-vertical-flip")),e.contentElement=e._bindEvents(),e.contentElement=e._buildColumnHeaderContent(),e.element.appendChild(e.contentElement),e.isGroup?e._buildGroupHeader():e._buildColumnHeader(),e.setTooltip(),e.table.options.resizableColumns&&e.table.modExists("resizeColumns")&&e.table.modules.resizeColumns.initializeColumn("header",e,e.element),t.headerFilter&&e.table.modExists("filter")&&e.table.modExists("edit")&&(void 0!==t.headerFilterPlaceholder&&t.field&&e.table.modules.localize.setHeaderFilterColumnPlaceholder(t.field,t.headerFilterPlaceholder),e.table.modules.filter.initializeColumn(e)),e.table.modExists("frozenColumns")&&e.table.modules.frozenColumns.initializeColumn(e),e.table.options.movableColumns&&!e.isGroup&&e.table.modExists("moveColumn")&&e.table.modules.moveColumn.initializeColumn(e),(t.topCalc||t.bottomCalc)&&e.table.modExists("columnCalcs")&&e.table.modules.columnCalcs.initializeColumn(e),e.table.modExists("persistence")&&e.table.modules.persistence.config.columns&&e.table.modules.persistence.initializeColumn(e),e.element.addEventListener("mouseenter",function(t){e.setTooltip()})},n.prototype._bindEvents=function(){var e,t,o,i=this,n=i.definition;"function"==typeof n.headerClick&&i.element.addEventListener("click",function(e){n.headerClick(e,i.getComponent())}),"function"==typeof n.headerDblClick&&i.element.addEventListener("dblclick",function(e){n.headerDblClick(e,i.getComponent())}),"function"==typeof n.headerContext&&i.element.addEventListener("contextmenu",function(e){n.headerContext(e,i.getComponent())}),"function"==typeof n.headerTap&&(o=!1,i.element.addEventListener("touchstart",function(e){o=!0},{passive:!0}),i.element.addEventListener("touchend",function(e){o&&n.headerTap(e,i.getComponent()),o=!1})),"function"==typeof n.headerDblTap&&(e=null,i.element.addEventListener("touchend",function(t){e?(clearTimeout(e),e=null,n.headerDblTap(t,i.getComponent())):e=setTimeout(function(){clearTimeout(e),e=null},300)})),"function"==typeof n.headerTapHold&&(t=null,i.element.addEventListener("touchstart",function(e){clearTimeout(t),t=setTimeout(function(){clearTimeout(t),t=null,o=!1,n.headerTapHold(e,i.getComponent())},1e3)},{passive:!0}),i.element.addEventListener("touchend",function(e){clearTimeout(t),t=null})),"function"==typeof n.cellClick&&(i.cellEvents.cellClick=n.cellClick),"function"==typeof n.cellDblClick&&(i.cellEvents.cellDblClick=n.cellDblClick),"function"==typeof n.cellContext&&(i.cellEvents.cellContext=n.cellContext),"function"==typeof n.cellMouseEnter&&(i.cellEvents.cellMouseEnter=n.cellMouseEnter),"function"==typeof n.cellMouseLeave&&(i.cellEvents.cellMouseLeave=n.cellMouseLeave),"function"==typeof n.cellMouseOver&&(i.cellEvents.cellMouseOver=n.cellMouseOver),"function"==typeof n.cellMouseOut&&(i.cellEvents.cellMouseOut=n.cellMouseOut),"function"==typeof n.cellMouseMove&&(i.cellEvents.cellMouseMove=n.cellMouseMove),"function"==typeof n.cellTap&&(i.cellEvents.cellTap=n.cellTap),"function"==typeof n.cellDblTap&&(i.cellEvents.cellDblTap=n.cellDblTap),"function"==typeof n.cellTapHold&&(i.cellEvents.cellTapHold=n.cellTapHold),"function"==typeof n.cellEdited&&(i.cellEvents.cellEdited=n.cellEdited),"function"==typeof n.cellEditing&&(i.cellEvents.cellEditing=n.cellEditing),"function"==typeof n.cellEditCancelled&&(i.cellEvents.cellEditCancelled=n.cellEditCancelled)},n.prototype._buildColumnHeader=function(){var e=this,t=this.definition,o=this.table;if(o.modExists("sort")&&o.modules.sort.initializeColumn(this,this.titleHolderElement),(t.headerContextMenu||t.headerClickMenu||t.headerMenu)&&o.modExists("menu")&&o.modules.menu.initializeColumnHeader(this),o.modExists("format")&&o.modules.format.initializeColumn(this),void 0!==t.editor&&o.modExists("edit")&&o.modules.edit.initializeColumn(this),void 0!==t.validator&&o.modExists("validate")&&o.modules.validate.initializeColumn(this),o.modExists("mutator")&&o.modules.mutator.initializeColumn(this),o.modExists("accessor")&&o.modules.accessor.initializeColumn(this),_typeof(o.options.responsiveLayout)&&o.modExists("responsiveLayout")&&o.modules.responsiveLayout.initializeColumn(this),void 0!==t.visible&&(t.visible?this.show(!0):this.hide(!0)),t.cssClass){t.cssClass.split(" ").forEach(function(t){e.element.classList.add(t)})}t.field&&this.element.setAttribute("tabulator-field",t.field),this.setMinWidth(void 0===t.minWidth?this.table.options.columnMinWidth:parseInt(t.minWidth)),(t.maxWidth||this.table.options.columnMaxWidth)&&!1!==t.maxWidth&&this.setMaxWidth(void 0===t.maxWidth?this.table.options.columnMaxWidth:parseInt(t.maxWidth)),this.reinitializeWidth(),this.tooltip=this.definition.tooltip||!1===this.definition.tooltip?this.definition.tooltip:this.table.options.tooltips,this.hozAlign=void 0===this.definition.hozAlign?this.table.options.cellHozAlign:this.definition.hozAlign,this.vertAlign=void 0===this.definition.vertAlign?this.table.options.cellVertAlign:this.definition.vertAlign,this.titleElement.style.textAlign=this.definition.headerHozAlign||this.table.options.headerHozAlign},n.prototype._buildColumnHeaderContent=function(){var e=(this.definition,this.table,document.createElement("div"));return e.classList.add("tabulator-col-content"),this.titleHolderElement=document.createElement("div"),this.titleHolderElement.classList.add("tabulator-col-title-holder"),e.appendChild(this.titleHolderElement),this.titleElement=this._buildColumnHeaderTitle(),this.titleHolderElement.appendChild(this.titleElement),e},n.prototype._buildColumnHeaderTitle=function(){var e=this,t=e.definition,o=e.table,i=document.createElement("div");if(i.classList.add("tabulator-col-title"),t.editableTitle){var n=document.createElement("input");n.classList.add("tabulator-title-editor"),n.addEventListener("click",function(e){e.stopPropagation(),n.focus()}),n.addEventListener("change",function(){t.title=n.value,o.options.columnTitleChanged.call(e.table,e.getComponent())}),i.appendChild(n),t.field?o.modules.localize.bind("columns|"+t.field,function(e){n.value=e||t.title||" "}):n.value=t.title||" "}else t.field?o.modules.localize.bind("columns|"+t.field,function(o){e._formatColumnHeaderTitle(i,o||t.title||" ")}):e._formatColumnHeaderTitle(i,t.title||" ");return i},n.prototype._formatColumnHeaderTitle=function(e,t){var o,i,n,s,a,r=this;if(this.definition.titleFormatter&&this.table.modExists("format"))switch(o=this.table.modules.format.getFormatter(this.definition.titleFormatter),a=function(e){r.titleFormatterRendered=e},s={getValue:function(){return t},getElement:function(){return e}},n=this.definition.titleFormatterParams||{},n="function"==typeof n?n():n,i=o.call(this.table.modules.format,s,n,a),void 0===i?"undefined":_typeof(i)){case"object":i instanceof Node?e.appendChild(i):(e.innerHTML="",console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",i));break;case"undefined":case"null":e.innerHTML="";break;default:e.innerHTML=i}else e.innerHTML=t},n.prototype._buildGroupHeader=function(){var e=this;if(this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.definition.cssClass){this.definition.cssClass.split(" ").forEach(function(t){e.element.classList.add(t)})}(this.definition.headerContextMenu||this.definition.headerMenu)&&this.table.modExists("menu")&&this.table.modules.menu.initializeColumnHeader(this),this.titleElement.style.textAlign=this.definition.headerHozAlign||this.table.options.headerHozAlign,this.element.appendChild(this.groupElement)},n.prototype._getFlatData=function(e){return e[this.field]},n.prototype._getNestedData=function(e){for(var t,o=e,i=this.fieldStructure,n=i.length,s=0;s<n&&(o=o[i[s]],t=o,o);s++);return t},n.prototype._setFlatData=function(e,t){this.field&&(e[this.field]=t)},n.prototype._setNestedData=function(e,t){for(var o=e,i=this.fieldStructure,n=i.length,s=0;s<n;s++)if(s==n-1)o[i[s]]=t;else{if(!o[i[s]]){if(void 0===t)break;o[i[s]]={}}o=o[i[s]]}},n.prototype.attachColumn=function(e){var t=this;t.groupElement?(t.columns.push(e),t.groupElement.appendChild(e.getElement())):console.warn("Column Warning - Column being attached to another column instead of column group")},n.prototype.verticalAlign=function(e,t){var o=this.parent.isGroup?this.parent.getGroupElement().clientHeight:t||this.parent.getHeadersElement().clientHeight;this.element.style.height=o+"px",this.isGroup&&(this.groupElement.style.minHeight=o-this.contentElement.offsetHeight+"px"),this.isGroup||"top"===e||(this.element.style.paddingTop="bottom"===e?this.element.clientHeight-this.contentElement.offsetHeight+"px":(this.element.clientHeight-this.contentElement.offsetHeight)/2+"px"),this.columns.forEach(function(t){t.verticalAlign(e)})},n.prototype.clearVerticalAlign=function(){this.element.style.paddingTop="",this.element.style.height="",this.element.style.minHeight="",this.groupElement.style.minHeight="",this.columns.forEach(function(e){e.clearVerticalAlign()})},n.prototype.bindModuleColumns=function(){"rownum"==this.definition.formatter&&(this.table.rowManager.rowNumColumn=this)},n.prototype.getElement=function(){return this.element},n.prototype.getGroupElement=function(){return this.groupElement},n.prototype.getField=function(){return this.field},n.prototype.getFirstColumn=function(){return this.isGroup?!!this.columns.length&&this.columns[0].getFirstColumn():this},n.prototype.getLastColumn=function(){return this.isGroup?!!this.columns.length&&this.columns[this.columns.length-1].getLastColumn():this},n.prototype.getColumns=function(){return this.columns},n.prototype.getCells=function(){return this.cells},n.prototype.getTopColumn=function(){return this.parent.isGroup?this.parent.getTopColumn():this},n.prototype.getDefinition=function(e){var t=[];return this.isGroup&&e&&(this.columns.forEach(function(e){t.push(e.getDefinition(!0))}),this.definition.columns=t),this.definition},n.prototype.checkColumnVisibility=function(){var e=!1;this.columns.forEach(function(t){t.visible&&(e=!0)}),e?(this.show(),this.parent.table.options.columnVisibilityChanged.call(this.table,this.getComponent(),!1)):this.hide()},n.prototype.show=function(e,t){this.visible||(this.visible=!0,this.element.style.display="",this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach(function(e){e.show()}),this.isGroup||null!==this.width||this.reinitializeWidth(),this.table.columnManager._verticalAlignHeaders(),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns"),!t&&this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.updateColumnVisibility(this,this.visible),e||this.table.options.columnVisibilityChanged.call(this.table,this.getComponent(),!0),this.parent.isGroup&&this.parent.matchChildWidths(),!this.silent&&this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitialize())},n.prototype.hide=function(e,t){this.visible&&(this.visible=!1,this.element.style.display="none",this.table.columnManager._verticalAlignHeaders(),this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach(function(e){e.hide()}),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns"),!t&&this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.updateColumnVisibility(this,this.visible),e||this.table.options.columnVisibilityChanged.call(this.table,this.getComponent(),!1),this.parent.isGroup&&this.parent.matchChildWidths(),!this.silent&&this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitialize())},n.prototype.matchChildWidths=function(){var e=0;this.contentElement&&this.columns.length&&(this.columns.forEach(function(t){t.visible&&(e+=t.getWidth())}),this.contentElement.style.maxWidth=e-1+"px",this.parent.isGroup&&this.parent.matchChildWidths())},n.prototype.removeChild=function(e){var t=this.columns.indexOf(e);t>-1&&this.columns.splice(t,1),this.columns.length||this.delete()},n.prototype.setWidth=function(e){this.widthFixed=!0,this.setWidthActual(e)},n.prototype.setWidthActual=function(e){isNaN(e)&&(e=Math.floor(this.table.element.clientWidth/100*parseInt(e))),e=Math.max(this.minWidth,e),this.maxWidth&&(e=Math.min(this.maxWidth,e)),this.width=e,this.widthStyled=e?e+"px":"",this.element.style.width=this.widthStyled,this.isGroup||this.cells.forEach(function(e){e.setWidth()}),this.parent.isGroup&&this.parent.matchChildWidths(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()},n.prototype.checkCellHeights=function(){var e=[]
+;this.cells.forEach(function(t){t.row.heightInitialized&&(null!==t.row.getElement().offsetParent?(e.push(t.row),t.row.clearCellHeight()):t.row.heightInitialized=!1)}),e.forEach(function(e){e.calcHeight()}),e.forEach(function(e){e.setCellHeight()})},n.prototype.getWidth=function(){var e=0;return this.isGroup?this.columns.forEach(function(t){t.visible&&(e+=t.getWidth())}):e=this.width,e},n.prototype.getHeight=function(){return this.element.offsetHeight},n.prototype.setMinWidth=function(e){this.minWidth=e,this.minWidthStyled=e?e+"px":"",this.element.style.minWidth=this.minWidthStyled,this.cells.forEach(function(e){e.setMinWidth()})},n.prototype.setMaxWidth=function(e){this.maxWidth=e,this.maxWidthStyled=e?e+"px":"",this.element.style.maxWidth=this.maxWidthStyled,this.cells.forEach(function(e){e.setMaxWidth()})},n.prototype.delete=function(){var e=this;return new Promise(function(t,o){e.isGroup&&e.columns.forEach(function(e){e.delete()}),e.table.modExists("edit")&&e.table.modules.edit.currentCell.column===e&&e.table.modules.edit.cancelEdit();for(var i=e.cells.length,n=0;n<i;n++)e.cells[0].delete();e.element.parentNode&&e.element.parentNode.removeChild(e.element),e.element=!1,e.contentElement=!1,e.titleElement=!1,e.groupElement=!1,e.parent.isGroup&&e.parent.removeChild(e),e.table.columnManager.deregisterColumn(e),e.table.options.virtualDomHoz&&e.table.vdomHoz.reinitialize(!0),t()})},n.prototype.columnRendered=function(){this.titleFormatterRendered&&this.titleFormatterRendered()},n.prototype.validate=function(){var e=[];return this.cells.forEach(function(t){t.validate()||e.push(t.getComponent())}),!e.length||e},n.prototype.generateCell=function(e){var t=this,o=new u(t,e);return this.cells.push(o),o},n.prototype.nextColumn=function(){var e=this.table.columnManager.findColumnIndex(this);return e>-1&&this._nextVisibleColumn(e+1)},n.prototype._nextVisibleColumn=function(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._nextVisibleColumn(e+1)},n.prototype.prevColumn=function(){var e=this.table.columnManager.findColumnIndex(this);return e>-1&&this._prevVisibleColumn(e-1)},n.prototype._prevVisibleColumn=function(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._prevVisibleColumn(e-1)},n.prototype.reinitializeWidth=function(e){this.widthFixed=!1,void 0===this.definition.width||e||this.setWidth(this.definition.width),this.table.modExists("filter")&&this.table.modules.filter.hideHeaderFilterElements(),this.fitToData(),this.table.modExists("filter")&&this.table.modules.filter.showHeaderFilterElements()},n.prototype.fitToData=function(){var e=this;this.widthFixed||(this.element.style.width="",e.cells.forEach(function(e){e.clearWidth()}));var t=this.element.offsetWidth;e.width&&this.widthFixed||(e.cells.forEach(function(e){var o=e.getWidth();o>t&&(t=o)}),t&&e.setWidthActual(t+1))},n.prototype.updateDefinition=function(e){var t=this;return new Promise(function(o,i){var n;t.isGroup?(console.warn("Column Update Error - The updateDefinition function is only available on ungrouped columns"),i("Column Update Error - The updateDefinition function is only available on columns, not column groups")):t.parent.isGroup?(console.warn("Column Update Error - The updateDefinition function is only available on ungrouped columns"),i("Column Update Error - The updateDefinition function is only available on columns, not column groups")):(n=Object.assign({},t.getDefinition()),n=Object.assign(n,e),t.table.columnManager.addColumn(n,!1,t).then(function(e){n.field==t.field&&(t.field=!1),t.delete().then(function(){o(e.getComponent())}).catch(function(e){i(e)})}).catch(function(e){i(e)}))})},n.prototype.deleteCell=function(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)},n.prototype.defaultOptionList=["title","field","columns","visible","align","hozAlign","vertAlign","width","minWidth","maxWidth","widthGrow","widthShrink","resizable","frozen","responsive","tooltip","cssClass","rowHandle","hideInHtml","print","htmlOutput","sorter","sorterParams","formatter","formatterParams","variableHeight","editable","editor","editorParams","validator","mutator","mutatorParams","mutatorData","mutatorDataParams","mutatorEdit","mutatorEditParams","mutatorClipboard","mutatorClipboardParams","accessor","accessorParams","accessorData","accessorDataParams","accessorDownload","accessorDownloadParams","accessorClipboard","accessorClipboardParams","accessorPrint","accessorPrintParams","accessorHtmlOutput","accessorHtmlOutputParams","clipboard","download","downloadTitle","topCalc","topCalcParams","topCalcFormatter","topCalcFormatterParams","bottomCalc","bottomCalcParams","bottomCalcFormatter","bottomCalcFormatterParams","cellClick","cellDblClick","cellContext","cellTap","cellDblTap","cellTapHold","cellMouseEnter","cellMouseLeave","cellMouseOver","cellMouseOut","cellMouseMove","cellEditing","cellEdited","cellEditCancelled","headerSort","headerSortStartingDir","headerSortTristate","headerClick","headerDblClick","headerContext","headerTap","headerDblTap","headerTapHold","headerTooltip","headerVertical","headerHozAlign","editableTitle","titleFormatter","titleFormatterParams","headerFilter","headerFilterPlaceholder","headerFilterParams","headerFilterEmptyCheck","headerFilterFunc","headerFilterFuncParams","headerFilterLiveFilter","print","headerContextMenu","headerMenu","contextMenu","clickMenu","formatterPrint","formatterPrintParams","formatterClipboard","formatterClipboardParams","formatterHtmlOutput","formatterHtmlOutputParams","titlePrint","titleClipboard","titleHtmlOutput","titleDownload"],n.prototype.getComponent=function(){return this.component||(this.component=new o(this)),this.component};var s=function(e){this.table=e,this.element=this.createHolderElement(),this.tableElement=this.createTableElement(),this.heightFixer=this.createTableElement(),this.columnManager=null,this.height=0,this.firstRender=!1,this.renderMode="virtual",this.fixedHeight=!1,this.rows=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.scrollTop=0,this.scrollLeft=0,this.vDomRowHeight=20,this.vDomTop=0,this.vDomBottom=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomMaxRenderChain=90,this.vDomWindowBuffer=0,this.vDomWindowMinTotalRows=20,this.vDomWindowMinMarginRows=5,this.vDomTopNewRows=[],this.vDomBottomNewRows=[],this.rowNumColumn=!1,this.redrawBlock=!1,this.redrawBlockRestoreConfig=!1,this.redrawBlockRederInPosition=!1};s.prototype.createHolderElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-tableHolder"),e.setAttribute("tabindex",0),e},s.prototype.createTableElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-table"),e},s.prototype.getElement=function(){return this.element},s.prototype.getTableElement=function(){return this.tableElement},s.prototype.getRowPosition=function(e,t){return t?this.activeRows.indexOf(e):this.rows.indexOf(e)},s.prototype.setColumnManager=function(e){this.columnManager=e},s.prototype.initialize=function(){var e=this;e.setRenderMode(),e.element.appendChild(e.tableElement),e.firstRender=!0,e.element.addEventListener("scroll",function(){var t=e.element.scrollLeft;e.scrollLeft!=t&&(e.columnManager.scrollHorizontal(t),e.table.options.groupBy&&e.table.modules.groupRows.scrollHeaders(t),e.table.modExists("columnCalcs")&&e.table.modules.columnCalcs.scrollHorizontal(t),e.table.options.scrollHorizontal(t)),e.scrollLeft=t}),"virtual"===this.renderMode&&e.element.addEventListener("scroll",function(){var t=e.element.scrollTop,o=e.scrollTop>t;e.scrollTop!=t?(e.scrollTop=t,e.scrollVertical(o),"scroll"==e.table.options.ajaxProgressiveLoad&&e.table.modules.ajax.nextPage(e.element.scrollHeight-e.element.clientHeight-t),e.table.options.scrollVertical(t)):e.scrollTop=t})},s.prototype.findRow=function(e){var t=this;if("object"!=(void 0===e?"undefined":_typeof(e))){if(void 0===e||null===e)return!1;return t.rows.find(function(o){return o.data[t.table.options.index]==e})||!1}if(e instanceof l)return e;if(e instanceof r)return e._getSelf()||!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement){return t.rows.find(function(t){return t.getElement()===e})||!1}return!1},s.prototype.getRowFromDataObject=function(e){return this.rows.find(function(t){return t.data===e})||!1},s.prototype.getRowFromPosition=function(e,t){return t?this.activeRows[e]:this.rows[e]},s.prototype.scrollToRow=function(e,t,o){var i,n=this,s=this.getDisplayRows().indexOf(e),a=e.getElement(),r=0;return new Promise(function(e,l){if(s>-1){if(void 0===t&&(t=n.table.options.scrollToRowPosition),void 0===o&&(o=n.table.options.scrollToRowIfVisible),"nearest"===t)switch(n.renderMode){case"classic":i=h.prototype.helpers.elOffset(a).top,t=Math.abs(n.element.scrollTop-i)>Math.abs(n.element.scrollTop+n.element.clientHeight-i)?"bottom":"top";break;case"virtual":t=Math.abs(n.vDomTop-s)>Math.abs(n.vDomBottom-s)?"bottom":"top"}if(!o&&h.prototype.helpers.elVisible(a)&&(r=h.prototype.helpers.elOffset(a).top-h.prototype.helpers.elOffset(n.element).top)>0&&r<n.element.clientHeight-a.offsetHeight)return!1;switch(n.renderMode){case"classic":n.element.scrollTop=h.prototype.helpers.elOffset(a).top-h.prototype.helpers.elOffset(n.element).top+n.element.scrollTop;break;case"virtual":n._virtualRenderFill(s,!0)}switch(t){case"middle":case"center":n.element.scrollHeight-n.element.scrollTop==n.element.clientHeight?n.element.scrollTop=n.element.scrollTop+(a.offsetTop-n.element.scrollTop)-(n.element.scrollHeight-a.offsetTop)/2:n.element.scrollTop=n.element.scrollTop-n.element.clientHeight/2;break;case"bottom":n.element.scrollHeight-n.element.scrollTop==n.element.clientHeight?n.element.scrollTop=n.element.scrollTop-(n.element.scrollHeight-a.offsetTop)+a.offsetHeight:n.element.scrollTop=n.element.scrollTop-n.element.clientHeight+a.offsetHeight}e()}else console.warn("Scroll Error - Row not visible"),l("Scroll Error - Row not visible")})},s.prototype.setData=function(e,t,o){var i=this,n=this;return new Promise(function(s,a){t&&i.getDisplayRows().length?n.table.options.pagination?n._setDataActual(e,!0):i.reRenderInPosition(function(){n._setDataActual(e)}):(i.table.options.autoColumns&&o&&i.table.columnManager.generateColumnsFromRowData(e),i.resetScroll(),i._setDataActual(e)),s()})},s.prototype._setDataActual=function(e,t){var o=this;o.table.options.dataLoading.call(this.table,e),this._wipeElements(),this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.clear(),Array.isArray(e)?(this.table.modExists("selectRow")&&this.table.modules.selectRow.clearSelectionData(),this.table.options.reactiveData&&this.table.modExists("reactiveData",!0)&&this.table.modules.reactiveData.watchData(e),e.forEach(function(e,t){if(e&&"object"===(void 0===e?"undefined":_typeof(e))){var i=new l(e,o);o.rows.push(i)}else console.warn("Data Loading Warning - Invalid row data detected and ignored, expecting object but received:",e)}),o.refreshActiveData(!1,!1,t),o.table.options.dataLoaded.call(this.table,e)):console.error("Data Loading Error - Unable to process data due to invalid data type \nExpecting: array \nReceived: ",void 0===e?"undefined":_typeof(e),"\nData: ",e)},s.prototype._wipeElements=function(){this.rows.forEach(function(e){e.wipe()}),this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.wipe(),this.rows=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.adjustTableSize()},s.prototype.deleteRow=function(e,t){var o=this.rows.indexOf(e),i=this.activeRows.indexOf(e);i>-1&&this.activeRows.splice(i,1),o>-1&&this.rows.splice(o,1),this.setActiveRows(this.activeRows),this.displayRowIterator(function(t){var o=t.indexOf(e);o>-1&&t.splice(o,1)}),t||this.reRenderInPosition(),this.regenerateRowNumbers(),this.table.options.rowDeleted.call(this.table,e.getComponent()),this.table.options.dataChanged&&this.table.options.dataChanged.call(this.table,this.getData()),this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.groupRows.updateGroupRows(!0):this.table.options.pagination&&this.table.modExists("page")?this.refreshActiveData(!1,!1,!0):this.table.options.pagination&&this.table.modExists("page")&&this.refreshActiveData("page")},s.prototype.addRow=function(e,t,o,i){var n=this.addRowActual(e,t,o,i);return this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowAdd",n,{data:e,pos:t,index:o}),n},s.prototype.addRows=function(e,t,o){var i=this,n=this,s=0,a=[];return new Promise(function(r,l){t=i.findAddRowPos(t),Array.isArray(e)||(e=[e]),s=e.length-1,(void 0===o&&t||void 0!==o&&!t)&&e.reverse(),e.forEach(function(e,i){var s=n.addRow(e,t,o,!0);a.push(s)}),i.table.options.groupBy&&i.table.modExists("groupRows")?i.table.modules.groupRows.updateGroupRows(!0):i.table.options.pagination&&i.table.modExists("page")?i.refreshActiveData(!1,!1,!0):i.reRenderInPosition(),i.table.modExists("columnCalcs")&&i.table.modules.columnCalcs.recalc(i.table.rowManager.activeRows),i.regenerateRowNumbers(),r(a)})},s.prototype.findAddRowPos=function(e){return void 0===e&&(e=this.table.options.addRowPos),"pos"===e&&(e=!0),"bottom"===e&&(e=!1),e},s.prototype.addRowActual=function(e,t,o,i){var n,s,a=e instanceof l?e:new l(e||{},this),r=this.findAddRowPos(t),c=-1;if(!o&&this.table.options.pagination&&"page"==this.table.options.paginationAddRow&&(s=this.getDisplayRows(),r?s.length?o=s[0]:this.activeRows.length&&(o=this.activeRows[this.activeRows.length-1],r=!1):s.length&&(o=s[s.length-1],r=!(s.length<this.table.modules.page.getPageSize()))),void 0!==o&&(o=this.findRow(o)),this.table.options.groupBy&&this.table.modExists("groupRows")){this.table.modules.groupRows.assignRowToGroup(a);var u=a.getGroup().rows;u.length>1&&(!o||o&&-1==u.indexOf(o)?r?u[0]!==a&&(o=u[0],this._moveRowInArray(a.getGroup().rows,a,o,!r)):u[u.length-1]!==a&&(o=u[u.length-1],this._moveRowInArray(a.getGroup().rows,a,o,!r)):this._moveRowInArray(a.getGroup().rows,a,o,!r))}return o&&(c=this.rows.indexOf(o)),o&&c>-1?(n=this.activeRows.indexOf(o),this.displayRowIterator(function(e){var t=e.indexOf(o);t>-1&&e.splice(r?t:t+1,0,a)}),n>-1&&this.activeRows.splice(r?n:n+1,0,a),this.rows.splice(r?c:c+1,0,a)):r?(this.displayRowIterator(function(e){e.unshift(a)}),this.activeRows.unshift(a),this.rows.unshift(a)):(this.displayRowIterator(function(e){e.push(a)}),this.activeRows.push(a),this.rows.push(a)),this.setActiveRows(this.activeRows),this.table.options.rowAdded.call(this.table,a.getComponent()),this.table.options.dataChanged&&this.table.options.dataChanged.call(this.table,this.getData()),i||this.reRenderInPosition(),a},s.prototype.moveRow=function(e,t,o){this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowMove",e,{posFrom:this.getRowPosition(e),posTo:this.getRowPosition(t),to:t,after:o}),this.moveRowActual(e,t,o),this.regenerateRowNumbers(),this.table.options.rowMoved.call(this.table,e.getComponent())},s.prototype.moveRowActual=function(e,t,o){var i=this;if(this._moveRowInArray(this.rows,e,t,o),this._moveRowInArray(this.activeRows,e,t,o),this.displayRowIterator(function(n){i._moveRowInArray(n,e,t,o)}),this.table.options.groupBy&&this.table.modExists("groupRows")){!o&&t instanceof H&&(t=this.table.rowManager.prevDisplayRow(e)||t);var n=t.getGroup(),s=e.getGroup();n===s?this._moveRowInArray(n.rows,e,t,o):(s&&s.removeRow(e),n.insertRow(e,t,o))}},s.prototype._moveRowInArray=function(e,t,o,i){var n,s,a,r;if(t!==o&&(n=e.indexOf(t),n>-1&&(e.splice(n,1),s=e.indexOf(o),s>-1?i?e.splice(s+1,0,t):e.splice(s,0,t):e.splice(n,0,t)),e===this.getDisplayRows())){a=n<s?n:s,r=s>n?s:n+1;for(var l=a;l<=r;l++)e[l]&&this.styleRow(e[l],l)}},s.prototype.clearData=function(){this.setData([])},s.prototype.getRowIndex=function(e){return this.findRowIndex(e,this.rows)},s.prototype.getDisplayRowIndex=function(e){var t=this.getDisplayRows().indexOf(e);return t>-1&&t},s.prototype.nextDisplayRow=function(e,t){var o=this.getDisplayRowIndex(e),i=!1;return!1!==o&&o<this.displayRowsCount-1&&(i=this.getDisplayRows()[o+1]),!i||i instanceof l&&"row"==i.type?i:this.nextDisplayRow(i,t)},s.prototype.prevDisplayRow=function(e,t){var o=this.getDisplayRowIndex(e),i=!1;return o&&(i=this.getDisplayRows()[o-1]),!t||!i||i instanceof l&&"row"==i.type?i:this.prevDisplayRow(i,t)},s.prototype.findRowIndex=function(e,t){var o;return!!((e=this.findRow(e))&&(o=t.indexOf(e))>-1)&&o},s.prototype.getData=function(e,t){var o=[];return this.getRows(e).forEach(function(e){"row"==e.type&&o.push(e.getData(t||"data"))}),o},s.prototype.getComponents=function(e){var t=[];return this.getRows(e).forEach(function(e){t.push(e.getComponent())}),t},s.prototype.getDataCount=function(e){return this.getRows(e).length},s.prototype._genRemoteRequest=function(){var e=this,t=this.table,o=t.options,i={};if(t.modExists("page")){if(o.ajaxSorting){var n=this.table.modules.sort.getSort();n.forEach(function(e){delete e.column}),i[this.table.modules.page.paginationDataSentNames.sorters]=n}if(o.ajaxFiltering){var s=this.table.modules.filter.getFilters(!0,!0);i[this.table.modules.page.paginationDataSentNames.filters]=s}this.table.modules.ajax.setParams(i,!0)}t.modules.ajax.sendRequest().then(function(t){e._setDataActual(t,!0)}).catch(function(e){})},s.prototype.filterRefresh=function(){var e=this.table,t=e.options,o=this.scrollLeft;t.ajaxFiltering?"remote"==t.pagination&&e.modExists("page")?(e.modules.page.reset(!0),e.modules.page.setPage(1).then(function(){}).catch(function(){})):t.ajaxProgressiveLoad?e.modules.ajax.loadData().then(function(){}).catch(function(){}):this._genRemoteRequest():this.refreshActiveData("filter"),this.scrollHorizontal(o)},s.prototype.sorterRefresh=function(e){var t=this.table,o=this.table.options,i=this.scrollLeft;o.ajaxSorting?("remote"==o.pagination||o.progressiveLoad)&&t.modExists("page")?(t.modules.page.reset(!0),t.modules.page.setPage(1).then(function(){}).catch(function(){})):o.ajaxProgressiveLoad?t.modules.ajax.loadData().then(function(){}).catch(function(){}):this._genRemoteRequest():this.refreshActiveData(e?"filter":"sort"),this.scrollHorizontal(i)},s.prototype.scrollHorizontal=function(e){this.scrollLeft=e,this.element.scrollLeft=e,this.table.options.groupBy&&this.table.modules.groupRows.scrollHeaders(e),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.scrollHorizontal(e)},s.prototype.refreshActiveData=function(e,t,o){var i,n=this,s=this.table,a=["all","filter","sort","display","freeze","group","tree","page"];if(this.redrawBlock)return void((!this.redrawBlockRestoreConfig||a.indexOf(e)<a.indexOf(this.redrawBlockRestoreConfig.stage))&&(this.redrawBlockRestoreConfig={stage:e,skipStage:t,renderInPosition:o}));switch(n.table.modExists("edit")&&n.table.modules.edit.cancelEdit(),e||(e="all"),s.options.selectable&&!s.options.selectablePersistence&&s.modExists("selectRow")&&s.modules.selectRow.deselectRows(),e){case"all":case"filter":t?t=!1:s.modExists("filter")?n.setActiveRows(s.modules.filter.filter(n.rows)):n.setActiveRows(n.rows.slice(0));case"sort":t?t=!1:s.modExists("sort")&&s.modules.sort.sort(this.activeRows),this.regenerateRowNumbers();case"display":this.resetDisplayRows();case"freeze":t?t=!1:this.table.modExists("frozenRows")&&s.modules.frozenRows.isFrozen()&&(s.modules.frozenRows.getDisplayIndex()||s.modules.frozenRows.setDisplayIndex(this.getNextDisplayIndex()),i=s.modules.frozenRows.getDisplayIndex(),!0!==(i=n.setDisplayRows(s.modules.frozenRows.getRows(this.getDisplayRows(i-1)),i))&&s.modules.frozenRows.setDisplayIndex(i));case"group":t?t=!1:s.options.groupBy&&s.modExists("groupRows")&&(s.modules.groupRows.getDisplayIndex()||s.modules.groupRows.setDisplayIndex(this.getNextDisplayIndex()),i=s.modules.groupRows.getDisplayIndex(),!0!==(i=n.setDisplayRows(s.modules.groupRows.getRows(this.getDisplayRows(i-1)),i))&&s.modules.groupRows.setDisplayIndex(i));case"tree":t?t=!1:s.options.dataTree&&s.modExists("dataTree")&&(s.modules.dataTree.getDisplayIndex()||s.modules.dataTree.setDisplayIndex(this.getNextDisplayIndex()),i=s.modules.dataTree.getDisplayIndex(),!0!==(i=n.setDisplayRows(s.modules.dataTree.getRows(this.getDisplayRows(i-1)),i))&&s.modules.dataTree.setDisplayIndex(i)),s.options.pagination&&s.modExists("page")&&!o&&"local"==s.modules.page.getMode()&&s.modules.page.reset();case"page":t?t=!1:s.options.pagination&&s.modExists("page")&&(s.modules.page.getDisplayIndex()||s.modules.page.setDisplayIndex(this.getNextDisplayIndex()),i=s.modules.page.getDisplayIndex(),"local"==s.modules.page.getMode()&&s.modules.page.setMaxRows(this.getDisplayRows(i-1).length),!0!==(i=n.setDisplayRows(s.modules.page.getRows(this.getDisplayRows(i-1)),i))&&s.modules.page.setDisplayIndex(i))}h.prototype.helpers.elVisible(n.element)&&(o?n.reRenderInPosition():("all"===e&&this.table.options.virtualDomHoz&&this.table.vdomHoz.dataChange(),n.renderTable(),s.options.layoutColumnsOnNewData&&n.table.columnManager.redraw(!0))),s.modExists("columnCalcs")&&s.modules.columnCalcs.recalc(this.activeRows)},s.prototype.regenerateRowNumbers=function(){var e=this;this.rowNumColumn&&this.activeRows.forEach(function(t){var o=t.getCell(e.rowNumColumn);o&&o._generateContents()})},s.prototype.setActiveRows=function(e){this.activeRows=e,this.activeRowsCount=this.activeRows.length},s.prototype.resetDisplayRows=function(){this.displayRows=[],this.displayRows.push(this.activeRows.slice(0)),this.displayRowsCount=this.displayRows[0].length,this.table.modExists("frozenRows")&&this.table.modules.frozenRows.setDisplayIndex(0),this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.setDisplayIndex(0),this.table.options.pagination&&this.table.modExists("page")&&this.table.modules.page.setDisplayIndex(0)},s.prototype.getNextDisplayIndex=function(){return this.displayRows.length},s.prototype.setDisplayRows=function(e,t){var o=!0;return t&&void 0!==this.displayRows[t]?(this.displayRows[t]=e,o=!0):(this.displayRows.push(e),o=t=this.displayRows.length-1),t==this.displayRows.length-1&&(this.displayRowsCount=this.displayRows[this.displayRows.length-1].length),o},s.prototype.getDisplayRows=function(e){return void 0===e?this.displayRows.length?this.displayRows[this.displayRows.length-1]:[]:this.displayRows[e]||[]},s.prototype.getVisibleRows=function(e){var t=this.element.scrollTop,o=this.element.clientHeight+t,i=!1,n=0,s=0,a=this.getDisplayRows();if(e){this.getDisplayRows();for(var r=this.vDomTop;r<=this.vDomBottom;r++)if(a[r])if(i){if(!(o-a[r].getElement().offsetTop>=0))break;s=r}else if(t-a[r].getElement().offsetTop>=0)n=r;else{if(i=!0,!(o-a[r].getElement().offsetTop>=0))break;s=r}}else n=this.vDomTop,s=this.vDomBottom;return a.slice(n,s+1)},s.prototype.displayRowIterator=function(e){this.displayRows.forEach(e),this.displayRowsCount=this.displayRows[this.displayRows.length-1].length},s.prototype.getRows=function(e){var t;switch(e){case"active":t=this.activeRows;break;case"display":t=this.table.rowManager.getDisplayRows();break;case"visible":t=this.getVisibleRows(!0);break;case"selected":t=this.table.modules.selectRow.selectedRows;break;default:t=this.rows}return t},s.prototype.reRenderInPosition=function(e){if("virtual"==this.getRenderMode())if(this.redrawBlock)e?e():this.redrawBlockRederInPosition=!0;else{for(var t=this.element.scrollTop,o=!1,i=!1,n=this.scrollLeft,s=this.getDisplayRows(),a=this.vDomTop;a<=this.vDomBottom;a++)if(s[a]){var r=t-s[a].getElement().offsetTop;if(!(!1===i||Math.abs(r)<i))break;i=r,o=a}e&&e(),this._virtualRenderFill(!1===o?this.displayRowsCount-1:o,!0,i||0),this.scrollHorizontal(n)}else this.renderTable(),e&&e()},s.prototype.setRenderMode=function(){this.table.options.virtualDom?(this.renderMode="virtual",this.table.element.clientHeight||this.table.options.height?this.fixedHeight=!0:this.fixedHeight=!1):this.renderMode="classic"},s.prototype.getRenderMode=function(){return this.renderMode},s.prototype.renderTable=function(){switch(this.table.options.renderStarted.call(this.table),this.element.scrollTop=0,this.renderMode){case"classic":this._simpleRender();break;case"virtual":this._virtualRenderFill()}this.firstRender&&(this.displayRowsCount?(this.firstRender=!1,this.table.modules.layout.layout()):this.renderEmptyScroll()),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout(),this.displayRowsCount||this.table.options.placeholder&&(this.table.options.placeholder.setAttribute("tabulator-render-mode",this.renderMode),this.getElement().appendChild(this.table.options.placeholder),this.table.options.placeholder.style.width=this.table.columnManager.getWidth()+"px"),this.table.options.renderComplete.call(this.table)},s.prototype._simpleRender=function(){this._clearVirtualDom(),this.displayRowsCount?this.checkClassicModeGroupHeaderWidth():this.renderEmptyScroll()},s.prototype.checkClassicModeGroupHeaderWidth=function(){var e=this,t=this.tableElement,o=!0;e.getDisplayRows().forEach(function(i,n){e.styleRow(i,n),t.appendChild(i.getElement()),i.initialize(!0),"group"!==i.type&&(o=!1)}),t.style.minWidth=o?e.table.columnManager.getWidth()+"px":""},s.prototype.renderEmptyScroll=function(){this.table.options.placeholder?this.tableElement.style.display="none":this.tableElement.style.minWidth=this.table.columnManager.getWidth()+"px"},s.prototype._clearVirtualDom=function(){var e=this.tableElement;for(this.table.options.placeholder&&this.table.options.placeholder.parentNode&&this.table.options.placeholder.parentNode.removeChild(this.table.options.placeholder);e.firstChild;)e.removeChild(e.firstChild);e.style.paddingTop="",e.style.paddingBottom="",e.style.minWidth="",e.style.minHeight="",e.style.display="",e.style.visibility="",this.scrollTop=0,this.scrollLeft=0,this.vDomTop=0,this.vDomBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0},s.prototype.styleRow=function(e,t){var o=e.getElement();t%2?(o.classList.add("tabulator-row-even"),o.classList.remove("tabulator-row-odd")):(o.classList.add("tabulator-row-odd"),o.classList.remove("tabulator-row-even"))},s.prototype._virtualRenderFill=function(e,t,o){var i=this,n=i.tableElement,s=i.element,a=0,r=0,l=0,c=0,u=!0,d=i.getDisplayRows();if(e=e||0,o=o||0,e){for(;n.firstChild;)n.removeChild(n.firstChild);var p=(i.displayRowsCount-e+1)*i.vDomRowHeight;p<i.height&&(e-=Math.ceil((i.height-p)/i.vDomRowHeight))<0&&(e=0),a=Math.min(Math.max(Math.floor(i.vDomWindowBuffer/i.vDomRowHeight),i.vDomWindowMinMarginRows),e),e-=a}else i._clearVirtualDom();if(i.displayRowsCount&&h.prototype.helpers.elVisible(i.element)){for(i.vDomTop=e,i.vDomBottom=e-1;(r<=i.height+i.vDomWindowBuffer||c<i.vDomWindowMinTotalRows)&&i.vDomBottom<i.displayRowsCount-1;){var m=i.vDomBottom+1,f=d[m],g=0;i.styleRow(f,m),n.appendChild(f.getElement()),f.initialize(),f.heightInitialized||f.normalizeHeight(!0),g=f.getHeight(),c<a?l+=g:r+=g,g>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*g),"group"!==f.type&&(u=!1),i.vDomBottom++,c++}e?(i.vDomTopPad=t?i.vDomRowHeight*this.vDomTop+o:i.scrollTop-l,i.vDomBottomPad=i.vDomBottom==i.displayRowsCount-1?0:Math.max(i.vDomScrollHeight-i.vDomTopPad-r-l,0)):(this.vDomTopPad=0,i.vDomRowHeight=Math.floor((r+l)/c),i.vDomBottomPad=i.vDomRowHeight*(i.displayRowsCount-i.vDomBottom-1),i.vDomScrollHeight=l+r+i.vDomBottomPad-i.height),n.style.paddingTop=i.vDomTopPad+"px",n.style.paddingBottom=i.vDomBottomPad+"px",t&&(this.scrollTop=i.vDomTopPad+l+o-(this.element.scrollWidth>this.element.clientWidth?this.element.offsetHeight-this.element.clientHeight:0)),this.scrollTop=Math.min(this.scrollTop,this.element.scrollHeight-this.height),this.element.scrollWidth>this.element.offsetWidth&&t&&(this.scrollTop+=this.element.offsetHeight-this.element.clientHeight),this.vDomScrollPosTop=this.scrollTop,this.vDomScrollPosBottom=this.scrollTop,s.scrollTop=this.scrollTop,n.style.minWidth=u?i.table.columnManager.getWidth()+"px":"",i.table.options.groupBy&&"fitDataFill"!=i.table.modules.layout.getMode()&&i.displayRowsCount==i.table.modules.groupRows.countGroups()&&(i.tableElement.style.minWidth=i.table.columnManager.getWidth())}else this.renderEmptyScroll();this.fixedHeight||this.adjustTableSize()},s.prototype.scrollVertical=function(e){var t=this.scrollTop-this.vDomScrollPosTop,o=this.scrollTop-this.vDomScrollPosBottom,i=2*this.vDomWindowBuffer;if(-t>i||o>i){var n=this.scrollLeft;this._virtualRenderFill(Math.floor(this.element.scrollTop/this.element.scrollHeight*this.displayRowsCount)),this.scrollHorizontal(n)}else e?(t<0&&this._addTopRow(-t),o<0&&(this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer?this._removeBottomRow(-o):this.vDomScrollPosBottom=this.scrollTop)):(t>=0&&(this.scrollTop>this.vDomWindowBuffer?this._removeTopRow(t):this.vDomScrollPosTop=this.scrollTop),o>=0&&this._addBottomRow(o))},s.prototype._addTopRow=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.tableElement,i=this.getDisplayRows();if(this.vDomTop){var n=this.vDomTop-1,s=i[n],a=s.getHeight()||this.vDomRowHeight;e>=a&&(this.styleRow(s,n),o.insertBefore(s.getElement(),o.firstChild),s.initialized&&s.heightInitialized||(this.vDomTopNewRows.push(s),s.heightInitialized||s.clearCellHeight()),s.initialize(),this.vDomTopPad-=a,this.vDomTopPad<0&&(this.vDomTopPad=n*this.vDomRowHeight),n||(this.vDomTopPad=0),o.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop-=a,this.vDomTop--),e=-(this.scrollTop-this.vDomScrollPosTop),s.getHeight()>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*s.getHeight()),t<this.vDomMaxRenderChain&&this.vDomTop&&e>=(i[this.vDomTop-1].getHeight()||this.vDomRowHeight)?this._addTopRow(e,t+1):this._quickNormalizeRowHeight(this.vDomTopNewRows)}},s.prototype._removeTopRow=function(e){var t=this.tableElement,o=this.getDisplayRows()[this.vDomTop],i=o.getHeight()||this.vDomRowHeight;if(e>=i){var n=o.getElement();n.parentNode.removeChild(n),this.vDomTopPad+=i,t.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop+=this.vDomTop?i:i+this.vDomWindowBuffer,this.vDomTop++,e=this.scrollTop-this.vDomScrollPosTop,this._removeTopRow(e)}},s.prototype._addBottomRow=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.tableElement,i=this.getDisplayRows();if(this.vDomBottom<this.displayRowsCount-1){var n=this.vDomBottom+1,s=i[n],a=s.getHeight()||this.vDomRowHeight;e>=a&&(this.styleRow(s,n),o.appendChild(s.getElement()),s.initialized&&s.heightInitialized||(this.vDomBottomNewRows.push(s),s.heightInitialized||s.clearCellHeight()),s.initialize(),this.vDomBottomPad-=a,(this.vDomBottomPad<0||n==this.displayRowsCount-1)&&(this.vDomBottomPad=0),o.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom+=a,this.vDomBottom++),e=this.scrollTop-this.vDomScrollPosBottom,s.getHeight()>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*s.getHeight()),t<this.vDomMaxRenderChain&&this.vDomBottom<this.displayRowsCount-1&&e>=(i[this.vDomBottom+1].getHeight()||this.vDomRowHeight)?this._addBottomRow(e,t+1):this._quickNormalizeRowHeight(this.vDomBottomNewRows)}},s.prototype._removeBottomRow=function(e){var t=this.tableElement,o=this.getDisplayRows()[this.vDomBottom],i=o.getHeight()||this.vDomRowHeight;if(e>=i){var n=o.getElement();n.parentNode&&n.parentNode.removeChild(n),this.vDomBottomPad+=i,this.vDomBottomPad<0&&(this.vDomBottomPad=0),t.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom-=i,this.vDomBottom--,e=-(this.scrollTop-this.vDomScrollPosBottom),this._removeBottomRow(e)}},s.prototype._quickNormalizeRowHeight=function(e){e.forEach(function(e){e.calcHeight()}),e.forEach(function(e){e.setCellHeight()}),e.length=0},s.prototype.normalizeHeight=function(){this.activeRows.forEach(function(e){e.normalizeHeight()})},s.prototype.adjustTableSize=function(){var e,t=this.element.clientHeight;if("virtual"===this.renderMode){
+var o=Math.floor(this.columnManager.getElement().getBoundingClientRect().height+(this.table.footerManager&&this.table.footerManager.active&&!this.table.footerManager.external?this.table.footerManager.getElement().getBoundingClientRect().height:0));this.fixedHeight?(this.element.style.minHeight="calc(100% - "+o+"px)",this.element.style.height="calc(100% - "+o+"px)",this.element.style.maxHeight="calc(100% - "+o+"px)"):(this.element.style.height="",this.element.style.height=this.table.element.clientHeight-o+"px",this.element.scrollTop=this.scrollTop),this.height=this.element.clientHeight,this.vDomWindowBuffer=this.table.options.virtualDomBuffer||this.height,this.fixedHeight||t==this.element.clientHeight||((e=this.table.modExists("resizeTable"))&&!this.table.modules.resizeTable.autoResize||!e)&&this.redraw()}},s.prototype.reinitialize=function(){this.rows.forEach(function(e){e.reinitialize(!0)})},s.prototype.blockRedraw=function(){this.redrawBlock=!0,this.redrawBlockRestoreConfig=!1},s.prototype.restoreRedraw=function(){this.redrawBlock=!1,this.redrawBlockRestoreConfig?(this.refreshActiveData(this.redrawBlockRestoreConfig.stage,this.redrawBlockRestoreConfig.skipStage,this.redrawBlockRestoreConfig.renderInPosition),this.redrawBlockRestoreConfig=!1):this.redrawBlockRederInPosition&&this.reRenderInPosition(),this.redrawBlockRederInPosition=!1},s.prototype.redraw=function(e){var t=this.scrollLeft;this.adjustTableSize(),this.table.tableWidth=this.table.element.clientWidth,e?this.renderTable():("classic"==this.renderMode?this.table.options.groupBy?this.refreshActiveData("group",!1,!1):this._simpleRender():(this.reRenderInPosition(),this.scrollHorizontal(t)),this.displayRowsCount||this.table.options.placeholder&&this.getElement().appendChild(this.table.options.placeholder))},s.prototype.resetScroll=function(){if(this.element.scrollLeft=0,this.element.scrollTop=0,"ie"===this.table.browser){var e=document.createEvent("Event");e.initEvent("scroll",!1,!0),this.element.dispatchEvent(e)}else this.element.dispatchEvent(new Event("scroll"))};var a=function(e){this.table=e,this.element=this.table.rowManager.tableElement,this.holderEl=this.table.rowManager.element,this.leftCol=0,this.rightCol=0,this.scrollLeft=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0,this.fitDataColAvg=0,this.window=200,this.initialized=!1,this.columns=[],this.compatabilityCheck()&&this.initialize()};a.prototype.compatabilityCheck=function(){var e=this.table.options,t=!0;return"fitDataTable"==e.layout&&(console.warn("Horizontal Vitrual DOM is not compatible with fitDataTable layout mode"),t=!1),e.responsiveLayout&&(console.warn("Horizontal Vitrual DOM is not compatible with responsive columns"),t=!1),this.table.rtl&&(console.warn("Horizontal Vitrual DOM is not currently compatible with RTL text direction"),t=!1),e.columns&&e.columns.find(function(e){return e.frozen})&&(console.warn("Horizontal Vitrual DOM is not compatible with frozen columns"),t=!1),t||(e.virtualDomHoz=!1),t},a.prototype.initialize=function(){var e=this;this.holderEl.addEventListener("scroll",function(){var t=e.holderEl.scrollLeft;e.scrollLeft!=t&&(e.scrollLeft=t,e.scroll(t-(e.vDomScrollPosLeft+e.window)))})},a.prototype.deinitialize=function(){this.initialized=!1},a.prototype.clear=function(){this.columns=[],this.leftCol=-1,this.rightCol=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0},a.prototype.dataChange=function(){var e,t,o,i=!1,n=0,s=0;if("fitData"===this.table.options.layout){if(this.table.columnManager.columnsByIndex.forEach(function(e){!e.definition.width&&e.visible&&(i=!0)}),i&&i&&this.table.rowManager.getDisplayRows().length&&(this.vDomScrollPosRight=this.scrollLeft+this.holderEl.clientWidth+this.window,this.table.options.groupBy?(e=this.table.modules.groupRows.getGroups(!1)[0],t=e.getRows(!1)[0]):t=this.table.rowManager.getDisplayRows()[0],t)){o=t.getElement(),t.generateCells(),this.element.appendChild(o);for(var s=0;s<t.cells.length;s++){var a=t.cells[s];if(o.appendChild(a.getElement()),a.column.reinitializeWidth(),(n+=a.column.getWidth())>this.vDomScrollPosRight)break}for(o.parentNode.removeChild(o),this.fitDataColAvg=Math.floor(n/(s+1)),s;s<this.table.columnManager.columnsByIndex.length;s++)this.table.columnManager.columnsByIndex[s].setWidth(this.fitDataColAvg);this.reinitialize(!1,!0)}}else"fitColumns"===this.table.options.layout&&(this.table.modules.layout.layout(),this.table.vdomHoz.reinitialize(!1,!0))},a.prototype.fitDataLayoutOverride=function(){for(var e=this.leftCol;e<=this.rightCol;e++)this.columns[e].reinitializeWidth()},a.prototype.reinitialize=function(e,t){var o=this,i={cols:this.columns,leftCol:this.leftCol,rightCol:this.rightCol};if(!e||this.initialized){this.clear(),this.scrollLeft=this.holderEl.scrollLeft,this.vDomScrollPosLeft=this.scrollLeft-this.window,this.vDomScrollPosRight=this.scrollLeft+this.holderEl.clientWidth+this.window;var n=0;this.table.columnManager.columnsByIndex.forEach(function(e){var t={};if(e.visible){var i=e.getWidth();t.leftPos=n,t.rightPos=n+i,n+i>o.vDomScrollPosLeft&&n<o.vDomScrollPosRight?(-1==o.leftCol&&(o.leftCol=o.columns.length,o.vDomPadLeft=n),o.rightCol=o.columns.length):-1!==o.leftCol&&(o.vDomPadRight+=i),o.columns.push(e),e.modules.vdomHoz=t,n+=i}}),this.element.style.paddingLeft=this.vDomPadLeft+"px",this.element.style.paddingRight=this.vDomPadRight+"px",this.initialized=!0,t||e&&!this.reinitChanged(i)||this.renitializeRows(),this.holderEl.scrollLeft=this.scrollLeft}},a.prototype.reinitChanged=function(e){var t=this,o=!0;return e.cols.length!==this.columns.length||e.leftCol!==this.leftCol||e.rightCol!==this.rightCol||(e.cols.forEach(function(e,i){e!==t.columns[i]&&(o=!1)}),!o)},a.prototype.renitializeRows=function(){var e=this;this.table.rowManager.getVisibleRows().forEach(function(t){e.reinitializeRow(t,!0)})},a.prototype.scroll=function(e){this.vDomScrollPosLeft+=e,this.vDomScrollPosRight+=e,e>.8*this.holderEl.clientWidth?this.reinitialize():e>0?(this.addColRight(),this.removeColLeft()):(this.addColLeft(),this.removeColRight())},a.prototype.colPositionAdjust=function(e,t,o){for(var i=e;i<t;i++){var n=this.columns[i];n.modules.vdomHoz.leftPos-=o,n.modules.vdomHoz.rightPos-=o}},a.prototype.addColRight=function(){var e,t,o,i=this.columns[this.rightCol+1];i&&i.modules.vdomHoz.leftPos<=this.vDomScrollPosRight&&(e=this.table.rowManager.getVisibleRows(),e.forEach(function(e){if("group"!==e.type){var t=e.getCell(i);e.getElement().appendChild(t.getElement()),t.cellRendered()}}),this.fitDataColAvg&&(t=i.getWidth())===this.fitDataColAvg&&(i.reinitializeWidth(),(o=t-i.getWidth())&&(i.modules.vdomHoz.rightPos-=o,this.colPositionAdjust(this.rightCol+1,this.columns.length,o))),this.rightCol++,this.rightCol>=this.columns.length-1?this.vDomPadRight=0:this.vDomPadRight-=i.getWidth(),this.element.style.paddingRight=this.vDomPadRight+"px",this.addColRight())},a.prototype.addColLeft=function(){var e=this.columns[this.leftCol-1];if(e&&e.modules.vdomHoz.rightPos>=this.vDomScrollPosLeft){this.table.rowManager.getVisibleRows().forEach(function(t){if("group"!==t.type){var o=t.getCell(e);t.getElement().prepend(o.getElement()),o.cellRendered()}}),this.leftCol?this.vDomPadLeft-=e.getWidth():this.vDomPadLeft=0,this.element.style.paddingLeft=this.vDomPadLeft+"px",this.leftCol--,this.addColLeft()}},a.prototype.removeColRight=function(e){var t,e=this.columns[this.rightCol];e&&e.modules.vdomHoz.leftPos>this.vDomScrollPosRight&&(t=this.table.rowManager.getVisibleRows(),e.modules.vdomHoz.visible=!1,t.forEach(function(t){if("group"!==t.type){var o=t.getCell(e);t.getElement().removeChild(o.getElement())}}),this.vDomPadRight+=e.getWidth(),this.element.style.paddingRight=this.vDomPadRight+"px",this.rightCol--,this.removeColRight())},a.prototype.removeColLeft=function(){var e,t=this.columns[this.leftCol];t&&t.modules.vdomHoz.rightPos<this.vDomScrollPosLeft&&(e=this.table.rowManager.getVisibleRows(),e.forEach(function(e){if("group"!==e.type){var o=e.getCell(t);e.getElement().removeChild(o.getElement())}}),this.vDomPadLeft+=t.getWidth(),this.element.style.paddingLeft=this.vDomPadLeft+"px",this.leftCol++,this.removeColLeft())},a.prototype.initializeRow=function(e){if("group"!==e.type){e.modules.vdomHoz={leftCol:this.leftCol,rightCol:this.rightCol};for(var t=this.leftCol;t<=this.rightCol;t++){var o=this.columns[t];if(o&&o.visible){var i=e.getCell(o);e.getElement().appendChild(i.getElement()),i.cellRendered()}}}},a.prototype.reinitializeRow=function(e,t){if("group"!==e.type&&(t||!e.modules.vdomHoz||e.modules.vdomHoz.leftCol!==this.leftCol||e.modules.vdomHoz.rightCol!==this.rightCol)){for(var o=e.getElement();o.firstChild;)o.removeChild(o.firstChild);this.initializeRow(e)}};var r=function(e){this._row=e};r.prototype.getData=function(e){return this._row.getData(e)},r.prototype.getElement=function(){return this._row.getElement()},r.prototype.getCells=function(){var e=[];return this._row.getCells().forEach(function(t){e.push(t.getComponent())}),e},r.prototype.getCell=function(e){var t=this._row.getCell(e);return!!t&&t.getComponent()},r.prototype.getIndex=function(){return this._row.getData("data")[this._row.table.options.index]},r.prototype.getPosition=function(e){return this._row.table.rowManager.getRowPosition(this._row,e)},r.prototype.delete=function(){return this._row.delete()},r.prototype.scrollTo=function(){return this._row.table.rowManager.scrollToRow(this._row)},r.prototype.pageTo=function(){if(this._row.table.modExists("page",!0))return this._row.table.modules.page.setPageToRow(this._row)},r.prototype.move=function(e,t){this._row.moveToRow(e,t)},r.prototype.update=function(e){return this._row.updateData(e)},r.prototype.normalizeHeight=function(){this._row.normalizeHeight(!0)},r.prototype.select=function(){this._row.table.modules.selectRow.selectRows(this._row)},r.prototype.deselect=function(){this._row.table.modules.selectRow.deselectRows(this._row)},r.prototype.toggleSelect=function(){this._row.table.modules.selectRow.toggleRow(this._row)},r.prototype.isSelected=function(){return this._row.table.modules.selectRow.isRowSelected(this._row)},r.prototype._getSelf=function(){return this._row},r.prototype.validate=function(){return this._row.validate()},r.prototype.freeze=function(){this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.freezeRow(this._row)},r.prototype.unfreeze=function(){this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.unfreezeRow(this._row)},r.prototype.isFrozen=function(){if(this._row.table.modExists("frozenRows",!0)){return this._row.table.modules.frozenRows.rows.indexOf(this._row)>-1}return!1},r.prototype.treeCollapse=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.collapseRow(this._row)},r.prototype.treeExpand=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.expandRow(this._row)},r.prototype.treeToggle=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.toggleRow(this._row)},r.prototype.getTreeParent=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeParent(this._row)},r.prototype.getTreeChildren=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeChildren(this._row,!0)},r.prototype.addTreeChild=function(e,t,o){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.addTreeChildRow(this._row,e,t,o)},r.prototype.reformat=function(){return this._row.reinitialize()},r.prototype.getGroup=function(){return this._row.getGroup().getComponent()},r.prototype.getTable=function(){return this._row.table},r.prototype.getNextRow=function(){var e=this._row.nextRow();return e?e.getComponent():e},r.prototype.getPrevRow=function(){var e=this._row.prevRow();return e?e.getComponent():e};var l=function(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"row";this.table=t.table,this.parent=t,this.data={},this.type=o,this.element=!1,this.modules={},this.cells=[],this.height=0,this.heightStyled="",this.manualHeight=!1,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.component=null,this.created=!1,this.setData(e)};l.prototype.create=function(){this.created||(this.created=!0,this.generateElement())},l.prototype.createElement=function(){var e=document.createElement("div");e.classList.add("tabulator-row"),e.setAttribute("role","row"),this.element=e},l.prototype.getElement=function(){return this.create(),this.element},l.prototype.detachElement=function(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)},l.prototype.generateElement=function(){var e,t,o,i=this;this.createElement(),!1!==i.table.options.selectable&&i.table.modExists("selectRow")&&i.table.modules.selectRow.initializeRow(this),!1!==i.table.options.movableRows&&i.table.modExists("moveRow")&&i.table.modules.moveRow.initializeRow(this),!1!==i.table.options.dataTree&&i.table.modExists("dataTree")&&i.table.modules.dataTree.initializeRow(this),"collapse"===i.table.options.responsiveLayout&&i.table.modExists("responsiveLayout")&&i.table.modules.responsiveLayout.initializeRow(this),(i.table.options.rowContextMenu||i.table.options.rowClickMenu)&&this.table.modExists("menu")&&i.table.modules.menu.initializeRow(this),i.table.options.rowClick&&i.element.addEventListener("click",function(e){i.table.options.rowClick(e,i.getComponent())}),i.table.options.rowDblClick&&i.element.addEventListener("dblclick",function(e){i.table.options.rowDblClick(e,i.getComponent())}),i.table.options.rowContext&&i.element.addEventListener("contextmenu",function(e){i.table.options.rowContext(e,i.getComponent())}),i.table.options.rowMouseEnter&&i.element.addEventListener("mouseenter",function(e){i.table.options.rowMouseEnter(e,i.getComponent())}),i.table.options.rowMouseLeave&&i.element.addEventListener("mouseleave",function(e){i.table.options.rowMouseLeave(e,i.getComponent())}),i.table.options.rowMouseOver&&i.element.addEventListener("mouseover",function(e){i.table.options.rowMouseOver(e,i.getComponent())}),i.table.options.rowMouseOut&&i.element.addEventListener("mouseout",function(e){i.table.options.rowMouseOut(e,i.getComponent())}),i.table.options.rowMouseMove&&i.element.addEventListener("mousemove",function(e){i.table.options.rowMouseMove(e,i.getComponent())}),i.table.options.rowTap&&(o=!1,i.element.addEventListener("touchstart",function(e){o=!0},{passive:!0}),i.element.addEventListener("touchend",function(e){o&&i.table.options.rowTap(e,i.getComponent()),o=!1})),i.table.options.rowDblTap&&(e=null,i.element.addEventListener("touchend",function(t){e?(clearTimeout(e),e=null,i.table.options.rowDblTap(t,i.getComponent())):e=setTimeout(function(){clearTimeout(e),e=null},300)})),i.table.options.rowTapHold&&(t=null,i.element.addEventListener("touchstart",function(e){clearTimeout(t),t=setTimeout(function(){clearTimeout(t),t=null,o=!1,i.table.options.rowTapHold(e,i.getComponent())},1e3)},{passive:!0}),i.element.addEventListener("touchend",function(e){clearTimeout(t),t=null}))},l.prototype.generateCells=function(){this.cells=this.table.columnManager.generateCells(this)},l.prototype.initialize=function(e){var t=this;if(this.create(),!this.initialized||e){for(this.deleteCells();this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layoutRow(this),this.generateCells(),this.table.options.virtualDomHoz&&this.table.vdomHoz.initialized?this.table.vdomHoz.initializeRow(this):this.cells.forEach(function(e){t.element.appendChild(e.getElement()),e.cellRendered()}),e&&this.normalizeHeight(),this.table.options.dataTree&&this.table.modExists("dataTree")&&this.table.modules.dataTree.layoutRow(this),"collapse"===this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout")&&this.table.modules.responsiveLayout.layoutRow(this),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent()),this.table.options.resizableRows&&this.table.modExists("resizeRows")&&this.table.modules.resizeRows.initializeRow(this),this.initialized=!0}else this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitializeRow(this)},l.prototype.reinitializeHeight=function(){this.heightInitialized=!1,this.element&&null!==this.element.offsetParent&&this.normalizeHeight(!0)},l.prototype.reinitialize=function(e){this.initialized=!1,this.heightInitialized=!1,this.manualHeight||(this.height=0,this.heightStyled=""),this.element&&null!==this.element.offsetParent&&this.initialize(!0),this.table.options.dataTree&&this.table.modExists("dataTree",!0)&&this.table.modules.dataTree.getTreeChildren(this,!1,!0).forEach(function(e){e.reinitialize(!0)})},l.prototype.calcHeight=function(e){var t=0,o=this.table.options.resizableRows?this.element.clientHeight:0;this.cells.forEach(function(e){var o=e.getHeight();o>t&&(t=o)}),this.height=e?Math.max(t,o):this.manualHeight?this.height:Math.max(t,o),this.heightStyled=this.height?this.height+"px":"",this.outerHeight=this.element.offsetHeight},l.prototype.setCellHeight=function(){this.cells.forEach(function(e){e.setHeight()}),this.heightInitialized=!0},l.prototype.clearCellHeight=function(){this.cells.forEach(function(e){e.clearHeight()})},l.prototype.normalizeHeight=function(e){e&&this.clearCellHeight(),this.calcHeight(e),this.setCellHeight()},l.prototype.setHeight=function(e,t){(this.height!=e||t)&&(this.manualHeight=!0,this.height=e,this.heightStyled=e?e+"px":"",this.setCellHeight(),this.outerHeight=this.element.offsetHeight)},l.prototype.getHeight=function(){return this.outerHeight},l.prototype.getWidth=function(){return this.element.offsetWidth},l.prototype.deleteCell=function(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)},l.prototype.setData=function(e){this.table.modExists("mutator")&&(e=this.table.modules.mutator.transformRow(e,"data")),this.data=e,this.table.options.reactiveData&&this.table.modExists("reactiveData",!0)&&this.table.modules.reactiveData.watchRow(this)},l.prototype.updateData=function(e){var t,o=this,i=this.element&&h.prototype.helpers.elVisible(this.element),n={};return new Promise(function(s,a){"string"==typeof e&&(e=JSON.parse(e)),o.table.options.reactiveData&&o.table.modExists("reactiveData",!0)&&o.table.modules.reactiveData.block(),o.table.modExists("mutator")?(n=Object.assign(n,o.data),n=Object.assign(n,e),t=o.table.modules.mutator.transformRow(n,"data",e)):t=e;for(var r in t)o.data[r]=t[r];o.table.options.reactiveData&&o.table.modExists("reactiveData",!0)&&o.table.modules.reactiveData.unblock();for(var r in e){o.table.columnManager.getColumnsByFieldRoot(r).forEach(function(e){var n=o.getCell(e.getField());if(n){var s=e.getFieldValue(t);n.getValue()!=s&&(n.setValueProcessData(s),i&&n.cellRendered())}})}o.table.options.groupUpdateOnCellEdit&&o.table.options.groupBy&&o.table.modExists("groupRows")&&o.table.modules.groupRows.reassignRowToGroup(o.row),i?(o.normalizeHeight(!0),o.table.options.rowFormatter&&o.table.options.rowFormatter(o.getComponent())):(o.initialized=!1,o.height=0,o.heightStyled=""),!1!==o.table.options.dataTree&&o.table.modExists("dataTree")&&o.table.modules.dataTree.redrawNeeded(e)&&(o.table.modules.dataTree.initializeRow(o),i&&(o.table.modules.dataTree.layoutRow(o),o.table.rowManager.refreshActiveData("tree",!1,!0))),o.table.options.rowUpdated.call(o.table,o.getComponent()),o.table.options.dataChanged&&o.table.options.dataChanged.call(o.table,o.table.rowManager.getData()),s()})},l.prototype.getData=function(e){return e&&this.table.modExists("accessor")?this.table.modules.accessor.transformRow(this,e):this.data},l.prototype.getCell=function(e){return e=this.table.columnManager.findColumn(e),this.cells.find(function(t){return t.column===e})},l.prototype.getCellIndex=function(e){return this.cells.findIndex(function(t){return t===e})},l.prototype.findNextEditableCell=function(e){var t=!1;if(e<this.cells.length-1)for(var o=e+1;o<this.cells.length;o++){var i=this.cells[o];if(i.column.modules.edit&&h.prototype.helpers.elVisible(i.getElement())){var n=!0;if("function"==typeof i.column.modules.edit.check&&(n=i.column.modules.edit.check(i.getComponent())),n){t=i;break}}}return t},l.prototype.findPrevEditableCell=function(e){var t=!1;if(e>0)for(var o=e-1;o>=0;o--){var i=this.cells[o],n=!0;if(i.column.modules.edit&&h.prototype.helpers.elVisible(i.getElement())&&("function"==typeof i.column.modules.edit.check&&(n=i.column.modules.edit.check(i.getComponent())),n)){t=i;break}}return t},l.prototype.getCells=function(){return this.cells},l.prototype.nextRow=function(){return this.table.rowManager.nextDisplayRow(this,!0)||!1},l.prototype.prevRow=function(){return this.table.rowManager.prevDisplayRow(this,!0)||!1},l.prototype.moveToRow=function(e,t){var o=this.table.rowManager.findRow(e);o?(this.table.rowManager.moveRowActual(this,o,!t),this.table.rowManager.refreshActiveData("display",!1,!0)):console.warn("Move Error - No matching row found:",e)},l.prototype.validate=function(){var e=[];return this.cells.forEach(function(t){t.validate()||e.push(t.getComponent())}),!e.length||e},l.prototype.delete=function(){var e=this;return new Promise(function(t,o){var i,n;e.table.options.history&&e.table.modExists("history")&&(e.table.options.groupBy&&e.table.modExists("groupRows")?(n=e.getGroup().rows,(i=n.indexOf(e))&&(i=n[i-1])):(i=e.table.rowManager.getRowIndex(e))&&(i=e.table.rowManager.rows[i-1]),e.table.modules.history.action("rowDelete",e,{data:e.getData(),pos:!i,index:i})),e.deleteActual(),t()})},l.prototype.deleteActual=function(e){this.table.rowManager.getRowIndex(this);this.detatchModules(),this.table.options.reactiveData&&this.table.modExists("reactiveData",!0),this.modules.group&&this.modules.group.removeRow(this),this.table.rowManager.deleteRow(this,e),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.element=!1,this.table.options.dataTree&&this.table.modExists("dataTree",!0)&&this.table.modules.dataTree.rowDelete(this),this.table.modExists("columnCalcs")&&(this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.columnCalcs.recalcRowGroup(this):this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows))},l.prototype.detatchModules=function(){this.table.modExists("selectRow")&&this.table.modules.selectRow._deselectRow(this,!0),this.table.modExists("edit")&&this.table.modules.edit.currentCell.row===this&&this.table.modules.edit.cancelEdit(),this.table.modExists("frozenRows")&&this.table.modules.frozenRows.detachRow(this)},l.prototype.deleteCells=function(){for(var e=this.cells.length,t=0;t<e;t++)this.cells[0].delete()},l.prototype.wipe=function(){if(this.detatchModules(),this.deleteCells(),this.element){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.parentNode&&this.element.parentNode.removeChild(this.element)}this.element=!1,this.modules={}},l.prototype.getGroup=function(){return this.modules.group||!1},l.prototype.getComponent=function(){return this.component||(this.component=new r(this)),this.component};var c=function(e){this._cell=e};c.prototype.getValue=function(){return this._cell.getValue()},c.prototype.getOldValue=function(){return this._cell.getOldValue()},c.prototype.getInitialValue=function(){return this._cell.initialValue},c.prototype.getElement=function(){return this._cell.getElement()},c.prototype.getRow=function(){return this._cell.row.getComponent()},c.prototype.getData=function(){return this._cell.row.getData()},c.prototype.getField=function(){return this._cell.column.getField()},c.prototype.getColumn=function(){return this._cell.column.getComponent()},c.prototype.setValue=function(e,t){void 0===t&&(t=!0),this._cell.setValue(e,t)},c.prototype.restoreOldValue=function(){this._cell.setValueActual(this._cell.getOldValue())},c.prototype.restoreInitialValue=function(){this._cell.setValueActual(this._cell.initialValue)},c.prototype.edit=function(e){return this._cell.edit(e)},c.prototype.cancelEdit=function(){this._cell.cancelEdit()},c.prototype.isEdited=function(){return!!this._cell.modules.edit&&this._cell.modules.edit.edited},c.prototype.clearEdited=function(){self.table.modExists("edit",!0)&&this._cell.table.modules.edit.clearEdited(this._cell)},c.prototype.isValid=function(){return!this._cell.modules.validate||!this._cell.modules.validate.invalid},c.prototype.validate=function(){return this._cell.validate()},c.prototype.clearValidation=function(){this._cell.table.modExists("validate",!0)&&this._cell.table.modules.validate.clearValidation(this._cell)},c.prototype.nav=function(){return this._cell.nav()},c.prototype.checkHeight=function(){this._cell.checkHeight()},c.prototype.getTable=function(){return this._cell.table},c.prototype._getSelf=function(){return this._cell};var u=function(e,t){this.table=e.table,this.column=e,this.row=t,this.element=null,this.value=null,this.initialValue,this.oldValue=null,this.modules={},this.height=null,this.width=null,this.minWidth=null,this.component=null,this.loaded=!1,this.build()};u.prototype.build=function(){this.generateElement(),this.setWidth(),this._configureCell(),this.setValueActual(this.column.getFieldValue(this.row.data)),this.initialValue=this.value},u.prototype.generateElement=function(){this.element=document.createElement("div"),this.element.className="tabulator-cell",this.element.setAttribute("role","gridcell"),this.element=this.element},u.prototype._configureCell=function(){var e=this,t=e.column.cellEvents,o=e.element,i=this.column.getField(),n={top:"flex-start",bottom:"flex-end",middle:"center"},s={left:"flex-start",right:"flex-end",center:"center"};if(o.style.textAlign=e.column.hozAlign,e.column.vertAlign&&(o.style.display="inline-flex",o.style.alignItems=n[e.column.vertAlign]||"",e.column.hozAlign&&(o.style.justifyContent=s[e.column.hozAlign]||"")),i&&o.setAttribute("tabulator-field",i),e.column.definition.cssClass){e.column.definition.cssClass.split(" ").forEach(function(e){o.classList.add(e)})}"hover"===this.table.options.tooltipGenerationMode&&o.addEventListener("mouseenter",function(t){e._generateTooltip()}),e._bindClickEvents(t),e._bindTouchEvents(t),e._bindMouseEvents(t),e.column.modules.edit&&e.table.modules.edit.bindEditor(e),e.column.definition.rowHandle&&!1!==e.table.options.movableRows&&e.table.modExists("moveRow")&&e.table.modules.moveRow.initializeCell(e),e.column.visible||e.hide()},u.prototype._bindClickEvents=function(e){var t=this,o=t.element;(e.cellClick||t.table.options.cellClick)&&o.addEventListener("click",function(o){var i=t.getComponent();e.cellClick&&e.cellClick.call(t.table,o,i),t.table.options.cellClick&&t.table.options.cellClick.call(t.table,o,i)}),e.cellDblClick||this.table.options.cellDblClick?o.addEventListener("dblclick",function(o){var i=t.getComponent();e.cellDblClick&&e.cellDblClick.call(t.table,o,i),t.table.options.cellDblClick&&t.table.options.cellDblClick.call(t.table,o,i)}):o.addEventListener("dblclick",function(e){if(!t.table.modExists("edit")||t.table.modules.edit.currentCell!==t){e.preventDefault();try{if(document.selection){var o=document.body.createTextRange();o.moveToElementText(t.element),o.select()}else if(window.getSelection){var o=document.createRange();o.selectNode(t.element),window.getSelection().removeAllRanges(),window.getSelection().addRange(o)}}catch(e){}}}),(e.cellContext||this.table.options.cellContext)&&o.addEventListener("contextmenu",function(o){var i=t.getComponent();e.cellContext&&e.cellContext.call(t.table,o,i),t.table.options.cellContext&&t.table.options.cellContext.call(t.table,o,i)})},u.prototype._bindMouseEvents=function(e){var t=this,o=t.element;(e.cellMouseEnter||t.table.options.cellMouseEnter)&&o.addEventListener("mouseenter",function(o){var i=t.getComponent();e.cellMouseEnter&&e.cellMouseEnter.call(t.table,o,i),t.table.options.cellMouseEnter&&t.table.options.cellMouseEnter.call(t.table,o,i)}),(e.cellMouseLeave||t.table.options.cellMouseLeave)&&o.addEventListener("mouseleave",function(o){var i=t.getComponent();e.cellMouseLeave&&e.cellMouseLeave.call(t.table,o,i),t.table.options.cellMouseLeave&&t.table.options.cellMouseLeave.call(t.table,o,i)}),(e.cellMouseOver||t.table.options.cellMouseOver)&&o.addEventListener("mouseover",function(o){var i=t.getComponent();e.cellMouseOver&&e.cellMouseOver.call(t.table,o,i),t.table.options.cellMouseOver&&t.table.options.cellMouseOver.call(t.table,o,i)}),(e.cellMouseOut||t.table.options.cellMouseOut)&&o.addEventListener("mouseout",function(o){var i=t.getComponent();e.cellMouseOut&&e.cellMouseOut.call(t.table,o,i),t.table.options.cellMouseOut&&t.table.options.cellMouseOut.call(t.table,o,i)}),(e.cellMouseMove||t.table.options.cellMouseMove)&&o.addEventListener("mousemove",function(o){var i=t.getComponent();e.cellMouseMove&&e.cellMouseMove.call(t.table,o,i),t.table.options.cellMouseMove&&t.table.options.cellMouseMove.call(t.table,o,i)})},u.prototype._bindTouchEvents=function(e){var t,o,i,n=this,s=n.element;(e.cellTap||this.table.options.cellTap)&&(i=!1,s.addEventListener("touchstart",function(e){i=!0},{passive:!0}),s.addEventListener("touchend",function(t){if(i){var o=n.getComponent();e.cellTap&&e.cellTap.call(n.table,t,o),n.table.options.cellTap&&n.table.options.cellTap.call(n.table,t,o)}i=!1})),(e.cellDblTap||this.table.options.cellDblTap)&&(t=null,s.addEventListener("touchend",function(o){if(t){clearTimeout(t),t=null;var i=n.getComponent();e.cellDblTap&&e.cellDblTap.call(n.table,o,i),n.table.options.cellDblTap&&n.table.options.cellDblTap.call(n.table,o,i)}else t=setTimeout(function(){clearTimeout(t),t=null},300)})),(e.cellTapHold||this.table.options.cellTapHold)&&(o=null,s.addEventListener("touchstart",function(t){clearTimeout(o),o=setTimeout(function(){clearTimeout(o),o=null,i=!1;var s=n.getComponent();e.cellTapHold&&e.cellTapHold.call(n.table,t,s),n.table.options.cellTapHold&&n.table.options.cellTapHold.call(n.table,t,s)},1e3)},{passive:!0}),s.addEventListener("touchend",function(e){clearTimeout(o),o=null}))},u.prototype._generateContents=function(){var e;switch(e=this.table.modExists("format")?this.table.modules.format.formatValue(this):this.element.innerHTML=this.value,void 0===e?"undefined":_typeof(e)){case"object":if(e instanceof Node){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.appendChild(e)}else this.element.innerHTML="",null!=e&&console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",e);break;case"undefined":case"null":this.element.innerHTML="";break;default:this.element.innerHTML=e}},u.prototype.cellRendered=function(){this.table.modExists("format")&&this.table.modules.format.cellRendered&&this.table.modules.format.cellRendered(this)},u.prototype._generateTooltip=function(){var e=this.column.tooltip;e?(!0===e?e=this.value:"function"==typeof e&&!1===(e=e(this.getComponent()))&&(e=""),void 0===e&&(e=""),this.element.setAttribute("title",e)):this.element.setAttribute("title","")},u.prototype.getElement=function(e){return this.loaded||(this.loaded=!0,e||this.layoutElement()),this.element},u.prototype.getValue=function(){return this.value},u.prototype.getOldValue=function(){return this.oldValue},u.prototype.setValue=function(e,t){var o,i=this.setValueProcessData(e,t);i&&(this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("cellEdit",this,{oldValue:this.oldValue,newValue:this.value}),o=this.getComponent(),this.column.cellEvents.cellEdited&&this.column.cellEvents.cellEdited.call(this.table,o),this.table.options.groupUpdateOnCellEdit&&this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.reassignRowToGroup(this.row),this.cellRendered(),this.table.options.cellEdited.call(this.table,o),
+this.table.options.dataChanged&&this.table.options.dataChanged.call(this.table,this.table.rowManager.getData()))},u.prototype.setValueProcessData=function(e,t){var o=!1;return this.value!=e&&(o=!0,t&&this.column.modules.mutate&&(e=this.table.modules.mutator.transformCell(this,e))),this.setValueActual(e),o&&this.table.modExists("columnCalcs")&&(this.column.definition.topCalc||this.column.definition.bottomCalc)&&(this.table.options.groupBy&&this.table.modExists("groupRows")?("table"!=this.table.options.columnCalcs&&"both"!=this.table.options.columnCalcs||this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),"table"!=this.table.options.columnCalcs&&this.table.modules.columnCalcs.recalcRowGroup(this.row)):this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows)),o},u.prototype.setValueActual=function(e){this.oldValue=this.value,this.value=e,this.table.options.reactiveData&&this.table.modExists("reactiveData")&&this.table.modules.reactiveData.block(),this.column.setFieldValue(this.row.data,e),this.table.options.reactiveData&&this.table.modExists("reactiveData")&&this.table.modules.reactiveData.unblock(),this.loaded&&this.layoutElement()},u.prototype.layoutElement=function(){this._generateContents(),this._generateTooltip(),this.table.options.resizableColumns&&this.table.modExists("resizeColumns")&&"row"===this.row.type&&this.table.modules.resizeColumns.initializeColumn("cell",this.column,this.element),(this.column.definition.contextMenu||this.column.definition.clickMenu)&&this.table.modExists("menu")&&this.table.modules.menu.initializeCell(this),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layoutElement(this.element,this.column)},u.prototype.setWidth=function(){this.width=this.column.width,this.element.style.width=this.column.widthStyled},u.prototype.clearWidth=function(){this.width="",this.element.style.width=""},u.prototype.getWidth=function(){return this.width||this.element.offsetWidth},u.prototype.setMinWidth=function(){this.minWidth=this.column.minWidth,this.element.style.minWidth=this.column.minWidthStyled},u.prototype.setMaxWidth=function(){this.maxWidth=this.column.maxWidth,this.element.style.maxWidth=this.column.maxWidthStyled},u.prototype.checkHeight=function(){this.row.reinitializeHeight()},u.prototype.clearHeight=function(){this.element.style.height="",this.height=null},u.prototype.setHeight=function(){this.height=this.row.height,this.element.style.height=this.row.heightStyled},u.prototype.getHeight=function(){return this.height||this.element.offsetHeight},u.prototype.show=function(){this.element.style.display=this.column.vertAlign?"inline-flex":""},u.prototype.hide=function(){this.element.style.display="none"},u.prototype.edit=function(e){if(this.table.modExists("edit",!0))return this.table.modules.edit.editCell(this,e)},u.prototype.cancelEdit=function(){if(this.table.modExists("edit",!0)){var e=this.table.modules.edit.getCurrentCell();e&&e._getSelf()===this?this.table.modules.edit.cancelEdit():console.warn("Cancel Editor Error - This cell is not currently being edited ")}},u.prototype.validate=function(){if(this.column.modules.validate&&this.table.modExists("validate",!0)){return!0===this.table.modules.validate.validate(this.column.modules.validate,this,this.getValue())}return!0},u.prototype.delete=function(){!this.table.rowManager.redrawBlock&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.modules.validate&&this.modules.validate.invalid&&this.table.modules.validate.clearValidation(this),this.modules.edit&&this.modules.edit.edited&&this.table.modules.edit.clearEdited(this),this.table.options.history&&this.table.modules.history.clearComponentHistory(this),this.element=!1,this.column.deleteCell(this),this.row.deleteCell(this),this.calcs={}},u.prototype.nav=function(){var e=this,t=!1,o=this.row.getCellIndex(this);return{next:function(){var t,o=this.right();return!!o||!(!(t=e.table.rowManager.nextDisplayRow(e.row,!0))||!(o=t.findNextEditableCell(-1)))&&(o.edit(),!0)},prev:function(){var t,o=this.left();return!!o||!(!(t=e.table.rowManager.prevDisplayRow(e.row,!0))||!(o=t.findPrevEditableCell(t.cells.length)))&&(o.edit(),!0)},left:function(){return!!(t=e.row.findPrevEditableCell(o))&&(t.edit(),!0)},right:function(){return!!(t=e.row.findNextEditableCell(o))&&(t.edit(),!0)},up:function(){var t=e.table.rowManager.prevDisplayRow(e.row,!0);t&&t.cells[o].edit()},down:function(){var t=e.table.rowManager.nextDisplayRow(e.row,!0);t&&t.cells[o].edit()}}},u.prototype.getIndex=function(){this.row.getCellIndex(this)},u.prototype.getComponent=function(){return this.component||(this.component=new c(this)),this.component};var d=function(e){this.table=e,this.active=!1,this.element=this.createElement(),this.external=!1,this.links=[],this._initialize()};d.prototype.createElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-footer"),e},d.prototype._initialize=function(e){if(this.table.options.footerElement)switch(_typeof(this.table.options.footerElement)){case"string":"<"===this.table.options.footerElement[0]?this.element.innerHTML=this.table.options.footerElement:(this.external=!0,this.element=document.querySelector(this.table.options.footerElement));break;default:this.element=this.table.options.footerElement}},d.prototype.getElement=function(){return this.element},d.prototype.append=function(e,t){this.activate(t),this.element.appendChild(e),this.table.rowManager.adjustTableSize()},d.prototype.prepend=function(e,t){this.activate(t),this.element.insertBefore(e,this.element.firstChild),this.table.rowManager.adjustTableSize()},d.prototype.remove=function(e){e.parentNode.removeChild(e),this.deactivate()},d.prototype.deactivate=function(e){this.element.firstChild&&!e||(this.external||this.element.parentNode.removeChild(this.element),this.active=!1)},d.prototype.activate=function(e){this.active||(this.active=!0,this.external||(this.table.element.appendChild(this.getElement()),this.table.element.style.display="")),e&&this.links.push(e)},d.prototype.redraw=function(){this.links.forEach(function(e){e.footerRedraw()})};var h=function e(t,o){this.options={},this.columnManager=null,this.rowManager=null,this.footerManager=null,this.vdomHoz=null,this.browser="",this.browserSlow=!1,this.browserMobile=!1,this.rtl=!1,this.modules={},this.initializeElement(t)&&(this.initializeOptions(o||{}),this._create()),e.prototype.comms.register(this)};h.prototype.defaultOptions={height:!1,minHeight:!1,maxHeight:!1,layout:"fitData",layoutColumnsOnNewData:!1,columnMinWidth:40,columnMaxWidth:!1,columnHeaderVertAlign:"top",columnVertAlign:!1,resizableColumns:!0,resizableRows:!1,autoResize:!0,columns:[],cellHozAlign:"",cellVertAlign:"",headerHozAlign:"",data:[],autoColumns:!1,autoColumnsDefinitions:!1,reactiveData:!1,nestedFieldSeparator:".",tooltips:!1,tooltipsHeader:!1,tooltipGenerationMode:"load",initialSort:!1,initialFilter:!1,initialHeaderFilter:!1,columnHeaderSortMulti:!0,sortOrderReverse:!1,headerSort:!0,headerSortTristate:!1,headerSortElement:"<div class='tabulator-arrow'></div>",footerElement:!1,index:"id",textDirection:"auto",keybindings:[],tabEndNewRow:!1,invalidOptionWarnings:!0,clipboard:!1,clipboardCopyStyled:!0,clipboardCopyConfig:!1,clipboardCopyFormatter:!1,clipboardCopyRowRange:"active",clipboardPasteParser:"table",clipboardPasteAction:"insert",clipboardCopied:function(){},clipboardPasted:function(){},clipboardPasteError:function(){},downloadDataFormatter:!1,downloadReady:function(e,t){return t},downloadComplete:!1,downloadConfig:{},downloadRowRange:"active",dataTree:!1,dataTreeFilter:!0,dataTreeSort:!0,dataTreeElementColumn:!1,dataTreeBranchElement:!0,dataTreeChildIndent:9,dataTreeChildField:"_children",dataTreeCollapseElement:!1,dataTreeExpandElement:!1,dataTreeStartExpanded:!1,dataTreeRowExpanded:function(){},dataTreeRowCollapsed:function(){},dataTreeChildColumnCalcs:!1,dataTreeSelectPropagate:!1,printAsHtml:!1,printFormatter:!1,printHeader:!1,printFooter:!1,printCopyStyle:!0,printStyled:!0,printVisibleRows:!0,printRowRange:"visible",printConfig:{},addRowPos:"bottom",selectable:"highlight",selectableRangeMode:"drag",selectableRollingSelection:!0,selectablePersistence:!0,selectableCheck:function(e,t){return!0},headerFilterLiveFilterDelay:300,headerFilterPlaceholder:!1,headerVisible:!0,history:!1,locale:!1,langs:{},virtualDom:!0,virtualDomBuffer:0,virtualDomHoz:!1,persistentLayout:!1,persistentSort:!1,persistentFilter:!1,persistenceID:"",persistenceMode:!0,persistenceReaderFunc:!1,persistenceWriterFunc:!1,persistence:!1,responsiveLayout:!1,responsiveLayoutCollapseStartOpen:!0,responsiveLayoutCollapseUseFormatters:!0,responsiveLayoutCollapseFormatter:!1,pagination:!1,paginationSize:!1,paginationInitialPage:1,paginationButtonCount:5,paginationSizeSelector:!1,paginationElement:!1,paginationDataSent:{},paginationDataReceived:{},paginationAddRow:"page",ajaxURL:!1,ajaxURLGenerator:!1,ajaxParams:{},ajaxConfig:"get",ajaxContentType:"form",ajaxRequestFunc:!1,ajaxLoader:!0,ajaxLoaderLoading:!1,ajaxLoaderError:!1,ajaxFiltering:!1,ajaxSorting:!1,ajaxProgressiveLoad:!1,ajaxProgressiveLoadDelay:0,ajaxProgressiveLoadScrollMargin:0,groupBy:!1,groupStartOpen:!0,groupValues:!1,groupUpdateOnCellEdit:!1,groupHeader:!1,groupHeaderPrint:null,groupHeaderClipboard:null,groupHeaderHtmlOutput:null,groupHeaderDownload:null,htmlOutputConfig:!1,movableColumns:!1,movableRows:!1,movableRowsConnectedTables:!1,movableRowsConnectedElements:!1,movableRowsSender:!1,movableRowsReceiver:"insert",movableRowsSendingStart:function(){},movableRowsSent:function(){},movableRowsSentFailed:function(){},movableRowsSendingStop:function(){},movableRowsReceivingStart:function(){},movableRowsReceived:function(){},movableRowsReceivedFailed:function(){},movableRowsReceivingStop:function(){},movableRowsElementDrop:function(){},scrollToRowPosition:"top",scrollToRowIfVisible:!0,scrollToColumnPosition:"left",scrollToColumnIfVisible:!0,rowFormatter:!1,rowFormatterPrint:null,rowFormatterClipboard:null,rowFormatterHtmlOutput:null,placeholder:!1,tableBuilding:function(){},tableBuilt:function(){},renderStarted:function(){},renderComplete:function(){},rowClick:!1,rowDblClick:!1,rowContext:!1,rowTap:!1,rowDblTap:!1,rowTapHold:!1,rowMouseEnter:!1,rowMouseLeave:!1,rowMouseOver:!1,rowMouseOut:!1,rowMouseMove:!1,rowContextMenu:!1,rowClickMenu:!1,rowAdded:function(){},rowDeleted:function(){},rowMoved:function(){},rowUpdated:function(){},rowSelectionChanged:function(){},rowSelected:function(){},rowDeselected:function(){},rowResized:function(){},cellClick:!1,cellDblClick:!1,cellContext:!1,cellTap:!1,cellDblTap:!1,cellTapHold:!1,cellMouseEnter:!1,cellMouseLeave:!1,cellMouseOver:!1,cellMouseOut:!1,cellMouseMove:!1,cellEditing:function(){},cellEdited:function(){},cellEditCancelled:function(){},columnMoved:!1,columnResized:function(){},columnTitleChanged:function(){},columnVisibilityChanged:function(){},htmlImporting:function(){},htmlImported:function(){},dataLoading:function(){},dataLoaded:function(){},dataEdited:!1,dataChanged:!1,ajaxRequesting:function(){},ajaxResponse:!1,ajaxError:function(){},dataFiltering:!1,dataFiltered:!1,dataSorting:function(){},dataSorted:function(){},groupToggleElement:"arrow",groupClosedShowCalcs:!1,dataGrouping:function(){},dataGrouped:!1,groupVisibilityChanged:function(){},groupClick:!1,groupDblClick:!1,groupContext:!1,groupContextMenu:!1,groupClickMenu:!1,groupTap:!1,groupDblTap:!1,groupTapHold:!1,columnCalcs:!0,pageLoaded:function(){},localized:function(){},validationMode:"blocking",validationFailed:function(){},historyUndo:function(){},historyRedo:function(){},scrollHorizontal:function(){},scrollVertical:function(){}},h.prototype.initializeOptions=function(e){if(!1!==e.invalidOptionWarnings)for(var t in e)void 0===this.defaultOptions[t]&&console.warn("Invalid table constructor option:",t);for(var t in this.defaultOptions)t in e?this.options[t]=e[t]:Array.isArray(this.defaultOptions[t])?this.options[t]=Object.assign([],this.defaultOptions[t]):"object"===_typeof(this.defaultOptions[t])&&null!==this.defaultOptions[t]?this.options[t]=Object.assign({},this.defaultOptions[t]):this.options[t]=this.defaultOptions[t]},h.prototype.initializeElement=function(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement?(this.element=e,!0):"string"==typeof e?(this.element=document.querySelector(e),!!this.element||(console.error("Tabulator Creation Error - no element found matching selector: ",e),!1)):(console.error("Tabulator Creation Error - Invalid element provided:",e),!1)},h.prototype.rtlCheck=function(){var e=window.getComputedStyle(this.element);switch(this.options.textDirection){case"auto":if("rtl"!==e.direction)break;case"rtl":this.element.classList.add("tabulator-rtl"),this.rtl=!0;break;case"ltr":this.element.classList.add("tabulator-ltr");default:this.rtl=!1}},h.prototype._mapDepricatedFunctionality=function(){(this.options.persistentLayout||this.options.persistentSort||this.options.persistentFilter)&&(this.options.persistence||(this.options.persistence={})),this.options.dataEdited&&(console.warn("DEPRECATION WARNING - dataEdited option has been deprecated, please use the dataChanged option instead"),this.options.dataChanged=this.options.dataEdited),this.options.downloadDataFormatter&&console.warn("DEPRECATION WARNING - downloadDataFormatter option has been deprecated"),void 0!==this.options.clipboardCopyHeader&&(this.options.columnHeaders=this.options.clipboardCopyHeader,console.warn("DEPRECATION WARNING - clipboardCopyHeader option has been deprecated, please use the columnHeaders property on the clipboardCopyConfig option")),!0!==this.options.printVisibleRows&&(console.warn("printVisibleRows option is deprecated, you should now use the printRowRange option"),this.options.persistence.printRowRange="active"),!0!==this.options.printCopyStyle&&(console.warn("printCopyStyle option is deprecated, you should now use the printStyled option"),this.options.persistence.printStyled=this.options.printCopyStyle),this.options.persistentLayout&&(console.warn("persistentLayout option is deprecated, you should now use the persistence option"),!0!==this.options.persistence&&void 0===this.options.persistence.columns&&(this.options.persistence.columns=!0)),this.options.persistentSort&&(console.warn("persistentSort option is deprecated, you should now use the persistence option"),!0!==this.options.persistence&&void 0===this.options.persistence.sort&&(this.options.persistence.sort=!0)),this.options.persistentFilter&&(console.warn("persistentFilter option is deprecated, you should now use the persistence option"),!0!==this.options.persistence&&void 0===this.options.persistence.filter&&(this.options.persistence.filter=!0)),this.options.columnVertAlign&&(console.warn("columnVertAlign option is deprecated, you should now use the columnHeaderVertAlign option"),this.options.columnHeaderVertAlign=this.options.columnVertAlign)},h.prototype._clearSelection=function(){this.element.classList.add("tabulator-block-select"),window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty(),this.element.classList.remove("tabulator-block-select")},h.prototype._create=function(){this._clearObjectPointers(),this._mapDepricatedFunctionality(),this.bindModules(),this.rtlCheck(),"TABLE"===this.element.tagName&&this.modExists("htmlTableImport",!0)&&this.modules.htmlTableImport.parseTable(),this.columnManager=new t(this),this.rowManager=new s(this),this.footerManager=new d(this),this.columnManager.setRowManager(this.rowManager),this.rowManager.setColumnManager(this.columnManager),this.options.virtualDomHoz&&(this.vdomHoz=new a(this)),this._buildElement(),this._loadInitialData()},h.prototype._clearObjectPointers=function(){this.options.columns=this.options.columns.slice(0),this.options.reactiveData||(this.options.data=this.options.data.slice(0))},h.prototype._buildElement=function(){var e=this,t=this.element,o=this.modules,i=this.options;for(i.tableBuilding.call(this),t.classList.add("tabulator"),t.setAttribute("role","grid");t.firstChild;)t.removeChild(t.firstChild);i.height&&(i.height=isNaN(i.height)?i.height:i.height+"px",t.style.height=i.height),!1!==i.minHeight&&(i.minHeight=isNaN(i.minHeight)?i.minHeight:i.minHeight+"px",t.style.minHeight=i.minHeight),!1!==i.maxHeight&&(i.maxHeight=isNaN(i.maxHeight)?i.maxHeight:i.maxHeight+"px",t.style.maxHeight=i.maxHeight),this.columnManager.initialize(),this.rowManager.initialize(),this._detectBrowser(),this.modExists("layout",!0)&&o.layout.initialize(i.layout),o.localize.initialize(),!1!==i.headerFilterPlaceholder&&o.localize.setHeaderFilterPlaceholder(i.headerFilterPlaceholder);for(var n in i.langs)o.localize.installLang(n,i.langs[n]);if(o.localize.setLocale(i.locale),"string"==typeof i.placeholder){var s=document.createElement("div");s.classList.add("tabulator-placeholder");var a=document.createElement("span");a.innerHTML=i.placeholder,s.appendChild(a),i.placeholder=s}if(t.appendChild(this.columnManager.getElement()),t.appendChild(this.rowManager.getElement()),i.footerElement&&this.footerManager.activate(),i.persistence&&this.modExists("persistence",!0)&&o.persistence.initialize(),i.movableRows&&this.modExists("moveRow")&&o.moveRow.initialize(),i.autoColumns&&this.options.data&&this.columnManager.generateColumnsFromRowData(this.options.data),this.modExists("columnCalcs")&&o.columnCalcs.initialize(),this.columnManager.setColumns(i.columns),i.dataTree&&this.modExists("dataTree",!0)&&o.dataTree.initialize(),this.modExists("frozenRows")&&this.modules.frozenRows.initialize(),(i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.sort||i.initialSort)&&this.modExists("sort",!0)){var r=[];i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.sort?!1===(r=o.persistence.load("sort"))&&i.initialSort&&(r=i.initialSort):i.initialSort&&(r=i.initialSort),o.sort.setSort(r)}if((i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.filter||i.initialFilter)&&this.modExists("filter",!0)){var l=[];i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.filter?!1===(l=o.persistence.load("filter"))&&i.initialFilter&&(l=i.initialFilter):i.initialFilter&&(l=i.initialFilter),o.filter.setFilter(l)}i.initialHeaderFilter&&this.modExists("filter",!0)&&i.initialHeaderFilter.forEach(function(t){var i=e.columnManager.findColumn(t.field);if(!i)return console.warn("Column Filter Error - No matching column found:",t.field),!1;o.filter.setHeaderFilterValue(i,t.value)}),this.modExists("ajax")&&o.ajax.initialize(),i.pagination&&this.modExists("page",!0)&&o.page.initialize(),i.groupBy&&this.modExists("groupRows",!0)&&o.groupRows.initialize(),this.modExists("keybindings")&&o.keybindings.initialize(),this.modExists("selectRow")&&o.selectRow.clearSelectionData(!0),i.autoResize&&this.modExists("resizeTable")&&o.resizeTable.initialize(),this.modExists("clipboard")&&o.clipboard.initialize(),i.printAsHtml&&this.modExists("print")&&o.print.initialize(),i.tableBuilt.call(this)},h.prototype._loadInitialData=function(){var e=this;if(e.options.pagination&&e.modExists("page"))if(e.modules.page.reset(!0,!0),"local"==e.options.pagination){if(e.options.data.length)e.rowManager.setData(e.options.data,!1,!0);else{if((e.options.ajaxURL||e.options.ajaxURLGenerator)&&e.modExists("ajax"))return void e.modules.ajax.loadData(!1,!0).then(function(){}).catch(function(){e.options.paginationInitialPage&&e.modules.page.setPage(e.options.paginationInitialPage)});e.rowManager.setData(e.options.data,!1,!0)}e.options.paginationInitialPage&&e.modules.page.setPage(e.options.paginationInitialPage)}else e.options.ajaxURL?e.modules.page.setPage(e.options.paginationInitialPage).then(function(){}).catch(function(){}):e.rowManager.setData([],!1,!0);else e.options.data.length?e.rowManager.setData(e.options.data):(e.options.ajaxURL||e.options.ajaxURLGenerator)&&e.modExists("ajax")?e.modules.ajax.loadData(!1,!0).then(function(){}).catch(function(){}):e.rowManager.setData(e.options.data,!1,!0)},h.prototype.destroy=function(){var e=this.element;for(h.prototype.comms.deregister(this),this.options.reactiveData&&this.modExists("reactiveData",!0)&&this.modules.reactiveData.unwatchData(),this.rowManager.rows.forEach(function(e){e.wipe()}),this.rowManager.rows=[],this.rowManager.activeRows=[],this.rowManager.displayRows=[],this.options.autoResize&&this.modExists("resizeTable")&&this.modules.resizeTable.clearBindings(),this.modExists("keybindings")&&this.modules.keybindings.clearBindings();e.firstChild;)e.removeChild(e.firstChild);e.classList.remove("tabulator")},h.prototype._detectBrowser=function(){var e=navigator.userAgent||navigator.vendor||window.opera;e.indexOf("Trident")>-1?(this.browser="ie",this.browserSlow=!0):e.indexOf("Edge")>-1?(this.browser="edge",this.browserSlow=!0):e.indexOf("Firefox")>-1?(this.browser="firefox",this.browserSlow=!1):(this.browser="other",this.browserSlow=!1),this.browserMobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4))},h.prototype.blockRedraw=function(){return this.rowManager.blockRedraw()},h.prototype.restoreRedraw=function(){return this.rowManager.restoreRedraw()},h.prototype.setDataFromLocalFile=function(e){var t=this;return new Promise(function(o,i){var n=document.createElement("input");n.type="file",n.accept=e||".json,application/json",n.addEventListener("change",function(e){var s,a=n.files[0],r=new FileReader;r.readAsText(a),r.onload=function(e){try{s=JSON.parse(r.result)}catch(e){return console.warn("File Load Error - File contents is invalid JSON",e),void i(e)}t.setData(s).then(function(e){o(e)}).catch(function(e){o(e)})},r.onerror=function(e){console.warn("File Load Error - Unable to read file"),i()}}),n.click()})},h.prototype.setData=function(e,t,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(e,t,o,!1,!0)},h.prototype._setData=function(e,t,o,i,n){var s=this;return"string"!=typeof e?e?s.rowManager.setData(e,i,n):s.modExists("ajax")&&(s.modules.ajax.getUrl||s.options.ajaxURLGenerator)?"remote"==s.options.pagination&&s.modExists("page",!0)?(s.modules.page.reset(!0,!0),s.modules.page.setPage(1)):s.modules.ajax.loadData(i,n):s.rowManager.setData([],i,n):0==e.indexOf("{")||0==e.indexOf("[")?s.rowManager.setData(JSON.parse(e),i,n):s.modExists("ajax",!0)?(t&&s.modules.ajax.setParams(t),o&&s.modules.ajax.setConfig(o),s.modules.ajax.setUrl(e),"remote"==s.options.pagination&&s.modExists("page",!0)?(s.modules.page.reset(!0,!0),s.modules.page.setPage(1)):s.modules.ajax.loadData(i,n)):void 0},h.prototype.clearData=function(){this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this.rowManager.clearData()},h.prototype.getData=function(e){return!0===e&&(console.warn("passing a boolean to the getData function is deprecated, you should now pass the string 'active'"),e="active"),this.rowManager.getData(e)},h.prototype.getDataCount=function(e){return!0===e&&(console.warn("passing a boolean to the getDataCount function is deprecated, you should now pass the string 'active'"),e="active"),this.rowManager.getDataCount(e)},h.prototype.searchRows=function(e,t,o){if(this.modExists("filter",!0))return this.modules.filter.search("rows",e,t,o)},h.prototype.searchData=function(e,t,o){if(this.modExists("filter",!0))return this.modules.filter.search("data",e,t,o)},h.prototype.getHtml=function(e,t,o){if(this.modExists("export",!0))return this.modules.export.getHtml(e,t,o)},h.prototype.print=function(e,t,o){if(this.modExists("print",!0))return this.modules.print.printFullscreen(e,t,o)},h.prototype.getAjaxUrl=function(){if(this.modExists("ajax",!0))return this.modules.ajax.getUrl()},h.prototype.replaceData=function(e,t,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(e,t,o,!0)},h.prototype.updateData=function(e){var t=this,o=this,i=0;return new Promise(function(n,s){t.modExists("ajax")&&t.modules.ajax.blockActiveRequest(),"string"==typeof e&&(e=JSON.parse(e)),e?e.forEach(function(e){var t=o.rowManager.findRow(e[o.options.index]);t&&(i++,t.updateData(e).then(function(){--i||n()}))}):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))})},h.prototype.addData=function(e,t,o){var i=this;return new Promise(function(n,s){i.modExists("ajax")&&i.modules.ajax.blockActiveRequest(),"string"==typeof e&&(e=JSON.parse(e)),e?i.rowManager.addRows(e,t,o).then(function(e){var t=[];e.forEach(function(e){t.push(e.getComponent())}),n(t)}):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))})},h.prototype.updateOrAddData=function(e){var t=this,o=this,i=[],n=0;return new Promise(function(s,a){t.modExists("ajax")&&t.modules.ajax.blockActiveRequest(),"string"==typeof e&&(e=JSON.parse(e)),e?e.forEach(function(e){var t=o.rowManager.findRow(e[o.options.index]);n++,t?t.updateData(e).then(function(){n--,i.push(t.getComponent()),n||s(i)}):o.rowManager.addRows(e).then(function(e){n--,i.push(e[0].getComponent()),n||s(i)})}):(console.warn("Update Error - No data provided"),a("Update Error - No data provided"))})},h.prototype.getRow=function(e){var t=this.rowManager.findRow(e);return t?t.getComponent():(console.warn("Find Error - No matching row found:",e),!1)},h.prototype.getRowFromPosition=function(e,t){var o=this.rowManager.getRowFromPosition(e,t);return o?o.getComponent():(console.warn("Find Error - No matching row found:",e),!1)},h.prototype.deleteRow=function(e){var t=this;return new Promise(function(o,i){function n(){++a==e.length&&r&&(s.rowManager.reRenderInPosition(),o())}var s=t,a=0,r=0,l=[];Array.isArray(e)||(e=[e]),e.forEach(function(e){var o=t.rowManager.findRow(e,!0);o?l.push(o):(console.warn("Delete Error - No matching row found:",e),i("Delete Error - No matching row found"),n())}),l.sort(function(e,o){return t.rowManager.rows.indexOf(e)>t.rowManager.rows.indexOf(o)?1:-1}),l.forEach(function(e){e.delete().then(function(){r++,n()}).catch(function(e){n(),i(e)})})})},h.prototype.addRow=function(e,t,o){var i=this;return new Promise(function(n,s){"string"==typeof e&&(e=JSON.parse(e)),i.rowManager.addRows(e,t,o).then(function(e){i.modExists("columnCalcs")&&i.modules.columnCalcs.recalc(i.rowManager.activeRows),n(e[0].getComponent())})})},h.prototype.updateOrAddRow=function(e,t){var o=this;return new Promise(function(i,n){var s=o.rowManager.findRow(e);"string"==typeof t&&(t=JSON.parse(t)),s?s.updateData(t).then(function(){o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(o.rowManager.activeRows),i(s.getComponent())}).catch(function(e){n(e)}):s=o.rowManager.addRows(t).then(function(e){o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(o.rowManager.activeRows),i(e[0].getComponent())}).catch(function(e){n(e)})})},h.prototype.updateRow=function(e,t){var o=this;return new Promise(function(i,n){var s=o.rowManager.findRow(e);"string"==typeof t&&(t=JSON.parse(t)),s?s.updateData(t).then(function(){i(s.getComponent())}).catch(function(e){n(e)}):(console.warn("Update Error - No matching row found:",e),n("Update Error - No matching row found"))})},h.prototype.scrollToRow=function(e,t,o){var i=this;return new Promise(function(n,s){var a=i.rowManager.findRow(e);a?i.rowManager.scrollToRow(a,t,o).then(function(){n()}).catch(function(e){s(e)}):(console.warn("Scroll Error - No matching row found:",e),s("Scroll Error - No matching row found"))})},h.prototype.moveRow=function(e,t,o){var i=this.rowManager.findRow(e);i?i.moveToRow(t,o):console.warn("Move Error - No matching row found:",e)},h.prototype.getRows=function(e){return!0===e&&(console.warn("passing a boolean to the getRows function is deprecated, you should now pass the string 'active'"),e="active"),this.rowManager.getComponents(e)},h.prototype.getRowPosition=function(e,t){var o=this.rowManager.findRow(e);return o?this.rowManager.getRowPosition(o,t):(console.warn("Position Error - No matching row found:",e),!1)},h.prototype.copyToClipboard=function(e){this.modExists("clipboard",!0)&&this.modules.clipboard.copy(e)},h.prototype.setColumns=function(e){this.columnManager.setColumns(e)},h.prototype.getColumns=function(e){return this.columnManager.getComponents(e)},h.prototype.getColumn=function(e){var t=this.columnManager.findColumn(e);return t?t.getComponent():(console.warn("Find Error - No matching column found:",e),!1)},h.prototype.getColumnDefinitions=function(){return this.columnManager.getDefinitionTree()},h.prototype.getColumnLayout=function(){if(this.modExists("persistence",!0))return this.modules.persistence.parseColumns(this.columnManager.getColumns())},h.prototype.setColumnLayout=function(e){return!!this.modExists("persistence",!0)&&(this.columnManager.setColumns(this.modules.persistence.mergeDefinition(this.options.columns,e)),!0)},h.prototype.showColumn=function(e){var t=this.columnManager.findColumn(e);if(!t)return console.warn("Column Show Error - No matching column found:",e),!1;t.show(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},h.prototype.hideColumn=function(e){var t=this.columnManager.findColumn(e);if(!t)return console.warn("Column Hide Error - No matching column found:",e),!1;t.hide(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},h.prototype.toggleColumn=function(e){var t=this.columnManager.findColumn(e);if(!t)return console.warn("Column Visibility Toggle Error - No matching column found:",e),!1;t.visible?t.hide():t.show()},h.prototype.addColumn=function(e,t,o){var i=this;return new Promise(function(n,s){var a=i.columnManager.findColumn(o);i.columnManager.addColumn(e,t,a).then(function(e){n(e.getComponent())}).catch(function(e){s(e)})})},h.prototype.deleteColumn=function(e){var t=this;return new Promise(function(o,i){var n=t.columnManager.findColumn(e);n?n.delete().then(function(){o()}).catch(function(e){i(e)}):(console.warn("Column Delete Error - No matching column found:",e),i())})
+},h.prototype.updateColumnDefinition=function(e,t){var o=this;return new Promise(function(i,n){var s=o.columnManager.findColumn(e);s?s.updateDefinition(t).then(function(e){i(e)}).catch(function(e){n(e)}):(console.warn("Column Update Error - No matching column found:",e),n())})},h.prototype.moveColumn=function(e,t,o){var i=this.columnManager.findColumn(e),n=this.columnManager.findColumn(t);i?n?this.columnManager.moveColumn(i,n,o):console.warn("Move Error - No matching column found:",n):console.warn("Move Error - No matching column found:",e)},h.prototype.scrollToColumn=function(e,t,o){var i=this;return new Promise(function(n,s){var a=i.columnManager.findColumn(e);a?i.columnManager.scrollToColumn(a,t,o).then(function(){n()}).catch(function(e){s(e)}):(console.warn("Scroll Error - No matching column found:",e),s("Scroll Error - No matching column found"))})},h.prototype.setLocale=function(e){this.modules.localize.setLocale(e)},h.prototype.getLocale=function(){return this.modules.localize.getLocale()},h.prototype.getLang=function(e){return this.modules.localize.getLang(e)},h.prototype.redraw=function(e){this.columnManager.redraw(e),this.rowManager.redraw(e)},h.prototype.setHeight=function(e){"classic"!==this.rowManager.renderMode?(this.options.height=isNaN(e)?e:e+"px",this.element.style.height=this.options.height,this.rowManager.setRenderMode(),this.rowManager.redraw()):console.warn("setHeight function is not available in classic render mode")},h.prototype.setSort=function(e,t){this.modExists("sort",!0)&&(this.modules.sort.setSort(e,t),this.rowManager.sorterRefresh())},h.prototype.getSorters=function(){if(this.modExists("sort",!0))return this.modules.sort.getSort()},h.prototype.clearSort=function(){this.modExists("sort",!0)&&(this.modules.sort.clear(),this.rowManager.sorterRefresh())},h.prototype.setFilter=function(e,t,o,i){this.modExists("filter",!0)&&(this.modules.filter.setFilter(e,t,o,i),this.rowManager.filterRefresh())},h.prototype.refreshFilter=function(){this.modExists("filter",!0)&&this.rowManager.filterRefresh()},h.prototype.addFilter=function(e,t,o,i){this.modExists("filter",!0)&&(this.modules.filter.addFilter(e,t,o,i),this.rowManager.filterRefresh())},h.prototype.getFilters=function(e){if(this.modExists("filter",!0))return this.modules.filter.getFilters(e)},h.prototype.setHeaderFilterFocus=function(e){if(this.modExists("filter",!0)){var t=this.columnManager.findColumn(e);if(!t)return console.warn("Column Filter Focus Error - No matching column found:",e),!1;this.modules.filter.setHeaderFilterFocus(t)}},h.prototype.getHeaderFilterValue=function(e){if(this.modExists("filter",!0)){var t=this.columnManager.findColumn(e);if(t)return this.modules.filter.getHeaderFilterValue(t);console.warn("Column Filter Error - No matching column found:",e)}},h.prototype.setHeaderFilterValue=function(e,t){if(this.modExists("filter",!0)){var o=this.columnManager.findColumn(e);if(!o)return console.warn("Column Filter Error - No matching column found:",e),!1;this.modules.filter.setHeaderFilterValue(o,t)}},h.prototype.getHeaderFilters=function(){if(this.modExists("filter",!0))return this.modules.filter.getHeaderFilters()},h.prototype.removeFilter=function(e,t,o){this.modExists("filter",!0)&&(this.modules.filter.removeFilter(e,t,o),this.rowManager.filterRefresh())},h.prototype.clearFilter=function(e){this.modExists("filter",!0)&&(this.modules.filter.clearFilter(e),this.rowManager.filterRefresh())},h.prototype.clearHeaderFilter=function(){this.modExists("filter",!0)&&(this.modules.filter.clearHeaderFilter(),this.rowManager.filterRefresh())},h.prototype.selectRow=function(e){this.modExists("selectRow",!0)&&(!0===e&&(console.warn("passing a boolean to the selectRowselectRow function is deprecated, you should now pass the string 'active'"),e="active"),this.modules.selectRow.selectRows(e))},h.prototype.deselectRow=function(e){this.modExists("selectRow",!0)&&this.modules.selectRow.deselectRows(e)},h.prototype.toggleSelectRow=function(e){this.modExists("selectRow",!0)&&this.modules.selectRow.toggleRow(e)},h.prototype.getSelectedRows=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedRows()},h.prototype.getSelectedData=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedData()},h.prototype.getInvalidCells=function(){if(this.modExists("validate",!0))return this.modules.validate.getInvalidCells()},h.prototype.clearCellValidation=function(e){var t=this;this.modExists("validate",!0)&&(e||(e=this.modules.validate.getInvalidCells()),Array.isArray(e)||(e=[e]),e.forEach(function(e){t.modules.validate.clearValidation(e._getSelf())}))},h.prototype.validate=function(e){var t=[];return this.rowManager.rows.forEach(function(e){var o=e.validate();!0!==o&&(t=t.concat(o))}),!t.length||t},h.prototype.setMaxPage=function(e){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setMaxPage(e)},h.prototype.setPage=function(e){return this.options.pagination&&this.modExists("page")?this.modules.page.setPage(e):new Promise(function(e,t){t()})},h.prototype.setPageToRow=function(e){var t=this;return new Promise(function(o,i){t.options.pagination&&t.modExists("page")?(e=t.rowManager.findRow(e),e?t.modules.page.setPageToRow(e).then(function(){o()}).catch(function(){i()}):i()):i()})},h.prototype.setPageSize=function(e){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setPageSize(e),this.modules.page.setPage(1).then(function(){}).catch(function(){})},h.prototype.getPageSize=function(){if(this.options.pagination&&this.modExists("page",!0))return this.modules.page.getPageSize()},h.prototype.previousPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.previousPage()},h.prototype.nextPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.nextPage()},h.prototype.getPage=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPage()},h.prototype.getPageMax=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPageMax()},h.prototype.setGroupBy=function(e){if(!this.modExists("groupRows",!0))return!1;this.options.groupBy=e,this.modules.groupRows.initialize(),this.rowManager.refreshActiveData("display"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")},h.prototype.setGroupValues=function(e){if(!this.modExists("groupRows",!0))return!1;this.options.groupValues=e,this.modules.groupRows.initialize(),this.rowManager.refreshActiveData("display"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")},h.prototype.setGroupStartOpen=function(e){if(!this.modExists("groupRows",!0))return!1;this.options.groupStartOpen=e,this.modules.groupRows.initialize(),this.options.groupBy?(this.rowManager.refreshActiveData("group"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")):console.warn("Grouping Update - cant refresh view, no groups have been set")},h.prototype.setGroupHeader=function(e){if(!this.modExists("groupRows",!0))return!1;this.options.groupHeader=e,this.modules.groupRows.initialize(),this.options.groupBy?(this.rowManager.refreshActiveData("group"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")):console.warn("Grouping Update - cant refresh view, no groups have been set")},h.prototype.getGroups=function(e){return!!this.modExists("groupRows",!0)&&this.modules.groupRows.getGroups(!0)},h.prototype.getGroupedData=function(){if(this.modExists("groupRows",!0))return this.options.groupBy?this.modules.groupRows.getGroupedData():this.getData()},h.prototype.getEditedCells=function(){if(this.modExists("edit",!0))return this.modules.edit.getEditedCells()},h.prototype.clearCellEdited=function(e){var t=this;this.modExists("edit",!0)&&(e||(e=this.modules.edit.getEditedCells()),Array.isArray(e)||(e=[e]),e.forEach(function(e){t.modules.edit.clearEdited(e._getSelf())}))},h.prototype.getCalcResults=function(){return!!this.modExists("columnCalcs",!0)&&this.modules.columnCalcs.getResults()},h.prototype.recalc=function(){this.modExists("columnCalcs",!0)&&this.modules.columnCalcs.recalcAll(this.rowManager.activeRows)},h.prototype.navigatePrev=function(){var e=!1;return!(!this.modExists("edit",!0)||!(e=this.modules.edit.currentCell))&&e.nav().prev()},h.prototype.navigateNext=function(){var e=!1;return!(!this.modExists("edit",!0)||!(e=this.modules.edit.currentCell))&&e.nav().next()},h.prototype.navigateLeft=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().left())},h.prototype.navigateRight=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().right())},h.prototype.navigateUp=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().up())},h.prototype.navigateDown=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().down())},h.prototype.undo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.undo()},h.prototype.redo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.redo()},h.prototype.getHistoryUndoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryUndoSize()},h.prototype.getHistoryRedoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryRedoSize()},h.prototype.clearHistory=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.clear()},h.prototype.download=function(e,t,o,i){this.modExists("download",!0)&&this.modules.download.download(e,t,o,i)},h.prototype.downloadToTab=function(e,t,o,i){this.modExists("download",!0)&&this.modules.download.download(e,t,o,i,!0)},h.prototype.tableComms=function(e,t,o,i){this.modules.comms.receive(e,t,o,i)},h.prototype.moduleBindings={},h.prototype.extendModule=function(e,t,o){if(h.prototype.moduleBindings[e]){var i=h.prototype.moduleBindings[e].prototype[t];if(i)if("object"==(void 0===o?"undefined":_typeof(o)))for(var n in o)i[n]=o[n];else console.warn("Module Error - Invalid value type, it must be an object");else console.warn("Module Error - property does not exist:",t)}else console.warn("Module Error - module does not exist:",e)},h.prototype.registerModule=function(e,t){h.prototype.moduleBindings[e]=t},h.prototype.bindModules=function(){this.modules={};for(var e in h.prototype.moduleBindings)this.modules[e]=new h.prototype.moduleBindings[e](this)},h.prototype.modExists=function(e,t){return!!this.modules[e]||(t&&console.error("Tabulator Module Not Installed: "+e),!1)},h.prototype.helpers={elVisible:function(e){return!(e.offsetWidth<=0&&e.offsetHeight<=0)},elOffset:function(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset-document.documentElement.clientTop,left:t.left+window.pageXOffset-document.documentElement.clientLeft}},deepClone:function(e){var t=Object.assign(Array.isArray(e)?[]:{},e);for(var o in e)null!=e[o]&&"object"===_typeof(e[o])&&(e[o]instanceof Date?t[o]=new Date(e[o]):t[o]=this.deepClone(e[o]));return t}},h.prototype.comms={tables:[],register:function(e){h.prototype.comms.tables.push(e)},deregister:function(e){var t=h.prototype.comms.tables.indexOf(e);t>-1&&h.prototype.comms.tables.splice(t,1)},lookupTable:function(e,t){var o,i,n=[];if("string"==typeof e){if(o=document.querySelectorAll(e),o.length)for(var s=0;s<o.length;s++)(i=h.prototype.comms.matchElement(o[s]))&&n.push(i)}else"undefined"!=typeof HTMLElement&&e instanceof HTMLElement||e instanceof h?(i=h.prototype.comms.matchElement(e))&&n.push(i):Array.isArray(e)?e.forEach(function(e){n=n.concat(h.prototype.comms.lookupTable(e))}):t||console.warn("Table Connection Error - Invalid Selector",e);return n},matchElement:function(e){return h.prototype.comms.tables.find(function(t){return e instanceof h?t===e:t.element===e})}},h.prototype.findTable=function(e){var t=h.prototype.comms.lookupTable(e,!0);return!(Array.isArray(t)&&!t.length)&&t};var p=function(e){this.table=e,this.mode=null};p.prototype.initialize=function(e){this.modes[e]?this.mode=e:(console.warn("Layout Error - invalid mode set, defaulting to 'fitData' : "+e),this.mode="fitData"),this.table.element.setAttribute("tabulator-layout",this.mode)},p.prototype.getMode=function(){return this.mode},p.prototype.layout=function(){this.modes[this.mode].call(this,this.table.columnManager.columnsByIndex),0===this.mode.indexOf("fitData")&&this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns")},p.prototype.modes={fitData:function(e){this.table.options.virtualDomHoz?this.table.vdomHoz.fitDataLayoutOverride():e.forEach(function(e){e.reinitializeWidth()}),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitDataFill:function(e){e.forEach(function(e){e.reinitializeWidth()}),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitDataTable:function(e){e.forEach(function(e){e.reinitializeWidth()}),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitDataStretch:function(e){var t=this,o=0,i=this.table.rowManager.element.clientWidth,n=0,s=!1;e.forEach(function(e,i){e.widthFixed||e.reinitializeWidth(),(t.table.options.responsiveLayout?e.modules.responsive.visible:e.visible)&&(s=e),e.visible&&(o+=e.getWidth())}),s?(n=i-o+s.getWidth(),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&(s.setWidth(0),this.table.modules.responsiveLayout.update()),n>0?s.setWidth(n):s.reinitializeWidth()):this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitColumns:function(e){function t(e){return"string"==typeof e?e.indexOf("%")>-1?n/100*parseInt(e):parseInt(e):e}function o(e,i,n,s){function a(e){return n*(e.column.definition.widthGrow||1)}function l(e){return t(e.width)-n*(e.column.definition.widthShrink||0)}var c=[],u=0,d=0,h=0,p=r,m=0,f=0,g=[];return e.forEach(function(e,t){var o=s?l(e):a(e);e.column.minWidth>=o?c.push(e):e.column.maxWidth&&e.column.maxWidth<o?(e.width=e.column.maxWidth,i-=e.column.maxWidth,(p-=s?e.column.definition.widthShrink||1:e.column.definition.widthGrow||1)&&(n=Math.floor(i/p))):(g.push(e),f+=s?e.column.definition.widthShrink||1:e.column.definition.widthGrow||1)}),c.length?(c.forEach(function(e){u+=s?e.width-e.column.minWidth:e.column.minWidth,e.width=e.column.minWidth}),d=i-u,h=f?Math.floor(d/f):d,m=d-h*f,m+=o(g,d,h,s)):(m=f?i-Math.floor(i/f)*f:i,g.forEach(function(e){e.width=s?l(e):a(e)})),m}var i=this,n=i.table.element.clientWidth,s=0,a=0,r=0,l=0,c=[],u=[],d=0,h=0,p=0;this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight&&(n-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),e.forEach(function(e){var o,i,n;e.visible&&(o=e.definition.width,i=parseInt(e.minWidth),o?(n=t(o),s+=n>i?n:i,e.definition.widthShrink&&(u.push({column:e,width:n>i?n:i}),d+=e.definition.widthShrink)):(c.push({column:e,width:0}),r+=e.definition.widthGrow||1))}),a=n-s,l=Math.floor(a/r);var p=o(c,a,l,!1);c.length&&p>0&&(c[c.length-1].width+=+p),c.forEach(function(e){a-=e.width}),h=Math.abs(p)+a,h>0&&d&&(p=o(u,h,Math.floor(h/d),!0)),u.length&&(u[u.length-1].width-=p),c.forEach(function(e){e.column.setWidth(e.width)}),u.forEach(function(e){e.column.setWidth(e.width)})}},h.prototype.registerModule("layout",p);var m=function(e){this.table=e,this.locale="default",this.lang=!1,this.bindings={},this.langList={}};m.prototype.initialize=function(){this.langList=h.prototype.helpers.deepClone(this.langs)},m.prototype.setHeaderFilterPlaceholder=function(e){this.langList.default.headerFilters.default=e},m.prototype.setHeaderFilterColumnPlaceholder=function(e,t){this.langList.default.headerFilters.columns[e]=t,this.lang&&!this.lang.headerFilters.columns[e]&&(this.lang.headerFilters.columns[e]=t)},m.prototype.installLang=function(e,t){this.langList[e]?this._setLangProp(this.langList[e],t):this.langList[e]=t},m.prototype._setLangProp=function(e,t){for(var o in t)e[o]&&"object"==_typeof(e[o])?this._setLangProp(e[o],t[o]):e[o]=t[o]},m.prototype.setLocale=function(e){function t(e,o){for(var i in e)"object"==_typeof(e[i])?(o[i]||(o[i]={}),t(e[i],o[i])):o[i]=e[i]}var o=this;if(e=e||"default",!0===e&&navigator.language&&(e=navigator.language.toLowerCase()),e&&!o.langList[e]){var i=e.split("-")[0];o.langList[i]?(console.warn("Localization Error - Exact matching locale not found, using closest match: ",e,i),e=i):(console.warn("Localization Error - Matching locale not found, using default: ",e),e="default")}o.locale=e,o.lang=h.prototype.helpers.deepClone(o.langList.default||{}),"default"!=e&&t(o.langList[e],o.lang),o.table.options.localized.call(o.table,o.locale,o.lang),o._executeBindings()},m.prototype.getLocale=function(e){return self.locale},m.prototype.getLang=function(e){return e?this.langList[e]:this.lang},m.prototype.getText=function(e,t){var e=t?e+"|"+t:e,o=e.split("|");return this._getLangElement(o,this.locale)||""},m.prototype._getLangElement=function(e,t){var o=this,i=o.lang;return e.forEach(function(e){var t;i&&(t=i[e],i=void 0!==t&&t)}),i},m.prototype.bind=function(e,t){this.bindings[e]||(this.bindings[e]=[]),this.bindings[e].push(t),t(this.getText(e),this.lang)},m.prototype._executeBindings=function(){var e=this;for(var t in e.bindings)!function(t){e.bindings[t].forEach(function(o){o(e.getText(t),e.lang)})}(t)},m.prototype.langs={default:{groups:{item:"item",items:"items"},columns:{},ajax:{loading:"Loading",error:"Error"},pagination:{page_size:"Page Size",page_title:"Show Page",first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page",all:"All"},headerFilters:{default:"filter column...",columns:{}}}},h.prototype.registerModule("localize",m);var f=function(e){this.table=e};f.prototype.getConnections=function(e){var t,o=this,i=[];return t=h.prototype.comms.lookupTable(e),t.forEach(function(e){o.table!==e&&i.push(e)}),i},f.prototype.send=function(e,t,o,i){var n=this,s=this.getConnections(e);s.forEach(function(e){e.tableComms(n.table.element,t,o,i)}),!s.length&&e&&console.warn("Table Connection Error - No tables matching selector found",e)},f.prototype.receive=function(e,t,o,i){if(this.table.modExists(t))return this.table.modules[t].commsReceived(e,o,i);console.warn("Inter-table Comms Error - no such module:",t)},h.prototype.registerModule("comms",f);var g=function(e){this.table=e,this.allowedTypes=["","data","download","clipboard","print","htmlOutput"]};g.prototype.initializeColumn=function(e){var t=this,o=!1,i={};this.allowedTypes.forEach(function(n){var s,a="accessor"+(n.charAt(0).toUpperCase()+n.slice(1));e.definition[a]&&(s=t.lookupAccessor(e.definition[a]))&&(o=!0,i[a]={accessor:s,params:e.definition[a+"Params"]||{}})}),o&&(e.modules.accessor=i)},g.prototype.lookupAccessor=function(e){var t=!1;switch(void 0===e?"undefined":_typeof(e)){case"string":this.accessors[e]?t=this.accessors[e]:console.warn("Accessor Error - No such accessor found, ignoring: ",e);break;case"function":t=e}return t},g.prototype.transformRow=function(e,t){var o="accessor"+(t.charAt(0).toUpperCase()+t.slice(1)),i=e.getComponent(),n=h.prototype.helpers.deepClone(e.data||{});return this.table.columnManager.traverse(function(e){var s,a,r,l;e.modules.accessor&&(a=e.modules.accessor[o]||e.modules.accessor.accessor||!1)&&"undefined"!=(s=e.getFieldValue(n))&&(l=e.getComponent(),r="function"==typeof a.params?a.params(s,n,t,l,i):a.params,e.setFieldValue(n,a.accessor(s,n,t,r,l,i)))}),n},g.prototype.accessors={},h.prototype.registerModule("accessor",g);var b=function(e){this.table=e,this.config=!1,this.url="",this.urlGenerator=!1,this.params=!1,this.loaderElement=this.createLoaderElement(),this.msgElement=this.createMsgElement(),this.loadingElement=!1,this.errorElement=!1,this.loaderPromise=!1,this.progressiveLoad=!1,this.loading=!1,this.requestOrder=0};b.prototype.initialize=function(){var e;this.loaderElement.appendChild(this.msgElement),this.table.options.ajaxLoaderLoading&&("string"==typeof this.table.options.ajaxLoaderLoading?(e=document.createElement("template"),e.innerHTML=this.table.options.ajaxLoaderLoading.trim(),this.loadingElement=e.content.firstChild):this.loadingElement=this.table.options.ajaxLoaderLoading),this.loaderPromise=this.table.options.ajaxRequestFunc||this.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||this.defaultURLGenerator,this.table.options.ajaxLoaderError&&("string"==typeof this.table.options.ajaxLoaderError?(e=document.createElement("template"),e.innerHTML=this.table.options.ajaxLoaderError.trim(),this.errorElement=e.content.firstChild):this.errorElement=this.table.options.ajaxLoaderError),this.table.options.ajaxParams&&this.setParams(this.table.options.ajaxParams),this.table.options.ajaxConfig&&this.setConfig(this.table.options.ajaxConfig),this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.table.options.ajaxProgressiveLoad&&(this.table.options.pagination?(this.progressiveLoad=!1,console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time")):this.table.modExists("page")?(this.progressiveLoad=this.table.options.ajaxProgressiveLoad,this.table.modules.page.initializeProgressive(this.progressiveLoad)):console.error("Pagination plugin is required for progressive ajax loading"))},b.prototype.createLoaderElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-loader"),e},b.prototype.createMsgElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-loader-msg"),e.setAttribute("role","alert"),e},b.prototype.setParams=function(e,t){if(t){this.params=this.params||{};for(var o in e)this.params[o]=e[o]}else this.params=e},b.prototype.getParams=function(){return this.params||{}},b.prototype.setConfig=function(e){if(this._loadDefaultConfig(),"string"==typeof e)this.config.method=e;else for(var t in e)this.config[t]=e[t]},b.prototype._loadDefaultConfig=function(e){var t=this;if(!t.config||e){t.config={};for(var o in t.defaultConfig)t.config[o]=t.defaultConfig[o]}},b.prototype.setUrl=function(e){this.url=e},b.prototype.getUrl=function(){return this.url},b.prototype.loadData=function(e,t){return this.progressiveLoad?this._loadDataProgressive():this._loadDataStandard(e,t)},b.prototype.nextPage=function(e){var t;this.loading||(t=this.table.options.ajaxProgressiveLoadScrollMargin||2*this.table.rowManager.getElement().clientHeight,e<t&&this.table.modules.page.nextPage().then(function(){}).catch(function(){}))},b.prototype.blockActiveRequest=function(){this.requestOrder++},b.prototype._loadDataProgressive=function(){return this.table.rowManager.setData([]),this.table.modules.page.setPage(1)},b.prototype._loadDataStandard=function(e,t){var o=this;return new Promise(function(i,n){o.sendRequest(e).then(function(s){o.table.rowManager.setData(s,e,t).then(function(){i()}).catch(function(e){n(e)})}).catch(function(e){n(e)})})},b.prototype.generateParamsList=function(e,t){var o=this,i=[];if(t=t||"",Array.isArray(e))e.forEach(function(e,n){i=i.concat(o.generateParamsList(e,t?t+"["+n+"]":n))});else if("object"===(void 0===e?"undefined":_typeof(e)))for(var n in e)i=i.concat(o.generateParamsList(e[n],t?t+"["+n+"]":n));else i.push({key:t,value:e});return i},b.prototype.serializeParams=function(e){var t=this.generateParamsList(e),o=[];return t.forEach(function(e){o.push(encodeURIComponent(e.key)+"="+encodeURIComponent(e.value))}),o.join("&")},b.prototype.sendRequest=function(e){var t,o=this,i=this,n=i.url;return i.requestOrder++,t=i.requestOrder,i._loadDefaultConfig(),new Promise(function(s,a){!1!==i.table.options.ajaxRequesting.call(o.table,i.url,i.params)?(i.loading=!0,e||i.showLoader(),o.loaderPromise(n,i.config,i.params).then(function(e){t===i.requestOrder?(i.table.options.ajaxResponse&&(e=i.table.options.ajaxResponse.call(i.table,i.url,i.params,e)),s(e),i.hideLoader(),i.loading=!1):console.warn("Ajax Response Blocked - An active ajax request was blocked by an attempt to change table data while the request was being made")}).catch(function(e){console.error("Ajax Load Error: ",e),i.table.options.ajaxError.call(i.table,e),i.showError(),setTimeout(function(){i.hideLoader()},3e3),i.loading=!1,a(e)})):a()})},b.prototype.showLoader=function(){if("function"==typeof this.table.options.ajaxLoader?this.table.options.ajaxLoader():this.table.options.ajaxLoader){for(this.hideLoader();this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.remove("tabulator-error"),this.msgElement.classList.add("tabulator-loading"),this.loadingElement?this.msgElement.appendChild(this.loadingElement):this.msgElement.innerHTML=this.table.modules.localize.getText("ajax|loading"),this.table.element.appendChild(this.loaderElement)}},b.prototype.showError=function(){for(this.hideLoader();this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.remove("tabulator-loading"),this.msgElement.classList.add("tabulator-error"),this.errorElement?this.msgElement.appendChild(this.errorElement):this.msgElement.innerHTML=this.table.modules.localize.getText("ajax|error"),this.table.element.appendChild(this.loaderElement)},b.prototype.hideLoader=function(){this.loaderElement.parentNode&&this.loaderElement.parentNode.removeChild(this.loaderElement)},b.prototype.defaultConfig={method:"GET"},b.prototype.defaultURLGenerator=function(e,t,o){return e&&o&&Object.keys(o).length&&(t.method&&"get"!=t.method.toLowerCase()||(t.method="get",e+=(e.includes("?")?"&":"?")+this.modules.ajax.serializeParams(o))),e},b.prototype.defaultLoaderPromise=function(e,t,o){var i,n=this;return new Promise(function(s,a){if(e=n.urlGenerator.call(n.table,e,t,o),"GET"!=t.method.toUpperCase())if(i="object"===_typeof(n.table.options.ajaxContentType)?n.table.options.ajaxContentType:n.contentTypeFormatters[n.table.options.ajaxContentType]){for(var r in i.headers)t.headers||(t.headers={}),void 0===t.headers[r]&&(t.headers[r]=i.headers[r]);t.body=i.body.call(n,e,t,o)}else console.warn("Ajax Error - Invalid ajaxContentType value:",n.table.options.ajaxContentType);e?(void 0===t.headers&&(t.headers={}),void 0===t.headers.Accept&&(t.headers.Accept="application/json"),void 0===t.headers["X-Requested-With"]&&(t.headers["X-Requested-With"]="XMLHttpRequest"),void 0===t.mode&&(t.mode="cors"),"cors"==t.mode?(void 0===t.headers["Access-Control-Allow-Origin"]&&(t.headers["Access-Control-Allow-Origin"]=window.location.origin),void 0===t.credentials&&(t.credentials="same-origin")):void 0===t.credentials&&(t.credentials="include"),fetch(e,t).then(function(e){e.ok?e.json().then(function(e){s(e)}).catch(function(e){a(e),console.warn("Ajax Load Error - Invalid JSON returned",e)}):(console.error("Ajax Load Error - Connection Error: "+e.status,e.statusText),a(e))}).catch(function(e){console.error("Ajax Load Error - Connection Error: ",e),a(e)})):(console.warn("Ajax Load Error - No URL Set"),s([]))})},b.prototype.contentTypeFormatters={json:{headers:{"Content-Type":"application/json"},body:function(e,t,o){return JSON.stringify(o)}},form:{headers:{},body:function(e,t,o){var i=this.generateParamsList(o),n=new FormData;return i.forEach(function(e){n.append(e.key,e.value)}),n}}},h.prototype.registerModule("ajax",b);var v=function(e){this._row=e};v.prototype.getData=function(e){return this._row.getData(e)},v.prototype.getElement=function(){return this._row.getElement()},v.prototype.getTable=function(){return this._row.table},v.prototype.getCells=function(){var e=[];return this._row.getCells().forEach(function(t){e.push(t.getComponent())}),e},v.prototype.getCell=function(e){var t=this._row.getCell(e);return!!t&&t.getComponent()},v.prototype._getSelf=function(){return this._row};var y=function(e){this.table=e,this.topCalcs=[],this.botCalcs=[],this.genColumn=!1,this.topElement=this.createElement(),this.botElement=this.createElement(),this.topRow=!1,this.botRow=!1,this.topInitialized=!1,this.botInitialized=!1,this.initialize()};y.prototype.createElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-calcs-holder"),e},y.prototype.initialize=function(){this.genColumn=new n({field:"value"},this)},y.prototype.registerColumnField=function(){},y.prototype.initializeColumn=function(e){var t=e.definition,o={topCalcParams:t.topCalcParams||{},botCalcParams:t.bottomCalcParams||{}};if(t.topCalc){switch(_typeof(t.topCalc)){case"string":this.calculations[t.topCalc]?o.topCalc=this.calculations[t.topCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",t.topCalc);break;case"function":o.topCalc=t.topCalc}o.topCalc&&(e.modules.columnCalcs=o,this.topCalcs.push(e),"group"!=this.table.options.columnCalcs&&this.initializeTopRow())}if(t.bottomCalc){switch(_typeof(t.bottomCalc)){case"string":this.calculations[t.bottomCalc]?o.botCalc=this.calculations[t.bottomCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",t.bottomCalc);break;case"function":o.botCalc=t.bottomCalc}o.botCalc&&(e.modules.columnCalcs=o,this.botCalcs.push(e),"group"!=this.table.options.columnCalcs&&this.initializeBottomRow())}},y.prototype.removeCalcs=function(){var e=!1;this.topInitialized&&(this.topInitialized=!1,this.topElement.parentNode.removeChild(this.topElement),e=!0),this.botInitialized&&(this.botInitialized=!1,this.table.footerManager.remove(this.botElement),e=!0),e&&this.table.rowManager.adjustTableSize()},y.prototype.initializeTopRow=function(){this.topInitialized||(this.table.columnManager.getElement().insertBefore(this.topElement,this.table.columnManager.headersElement.nextSibling),this.topInitialized=!0)},y.prototype.initializeBottomRow=function(){this.botInitialized||(this.table.footerManager.prepend(this.botElement),this.botInitialized=!0)},y.prototype.scrollHorizontal=function(e){this.botInitialized&&this.botRow&&(this.botRow.getElement().style.marginLeft=-e+"px")},y.prototype.recalc=function(e){var t;if(this.topInitialized||this.botInitialized){if(this.rowsToData(e),this.topInitialized){for(this.topRow&&this.topRow.deleteCells(),t=this.generateRow("top",this.rowsToData(e)),this.topRow=t;this.topElement.firstChild;)this.topElement.removeChild(this.topElement.firstChild);this.topElement.appendChild(t.getElement()),t.initialize(!0)}if(this.botInitialized){for(this.botRow&&this.botRow.deleteCells(),t=this.generateRow("bottom",this.rowsToData(e)),this.botRow=t;this.botElement.firstChild;)this.botElement.removeChild(this.botElement.firstChild);this.botElement.appendChild(t.getElement()),t.initialize(!0)}this.table.rowManager.adjustTableSize(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()}},y.prototype.recalcRowGroup=function(e){this.recalcGroup(this.table.modules.groupRows.getRowGroup(e))},y.prototype.recalcAll=function(){var e=this
+;if((this.topCalcs.length||this.botCalcs.length)&&("group"!==this.table.options.columnCalcs&&this.recalc(this.table.rowManager.activeRows),this.table.options.groupBy&&"table"!==this.table.options.columnCalcs)){table.modules.groupRows.getChildGroups().forEach(function(t){e.recalcGroup(t)})}},y.prototype.recalcGroup=function(e){var t,o;e&&e.calcs&&(e.calcs.bottom&&(t=this.rowsToData(e.rows),o=this.generateRowData("bottom",t),e.calcs.bottom.updateData(o),e.calcs.bottom.reinitialize()),e.calcs.top&&(t=this.rowsToData(e.rows),o=this.generateRowData("top",t),e.calcs.top.updateData(o),e.calcs.top.reinitialize()))},y.prototype.generateTopRow=function(e){return this.generateRow("top",this.rowsToData(e))},y.prototype.generateBottomRow=function(e){return this.generateRow("bottom",this.rowsToData(e))},y.prototype.rowsToData=function(e){var t=this,o=[];return e.forEach(function(e){if(o.push(e.getData()),t.table.options.dataTree&&t.table.options.dataTreeChildColumnCalcs&&e.modules.dataTree.open){var i=t.rowsToData(t.table.modules.dataTree.getFilteredTreeChildren(e));o=o.concat(i)}}),o},y.prototype.generateRow=function(e,t){var o,i=this,n=this.generateRowData(e,t);return i.table.modExists("mutator")&&i.table.modules.mutator.disable(),o=new l(n,this,"calc"),i.table.modExists("mutator")&&i.table.modules.mutator.enable(),o.getElement().classList.add("tabulator-calcs","tabulator-calcs-"+e),o.component=!1,o.getComponent=function(){return this.component||(this.component=new v(this)),this.component},o.generateCells=function(){var t=[];i.table.columnManager.columnsByIndex.forEach(function(n){i.genColumn.setField(n.getField()),i.genColumn.hozAlign=n.hozAlign,n.definition[e+"CalcFormatter"]&&i.table.modExists("format")?i.genColumn.modules.format={formatter:i.table.modules.format.getFormatter(n.definition[e+"CalcFormatter"]),params:n.definition[e+"CalcFormatterParams"]||{}}:i.genColumn.modules.format={formatter:i.table.modules.format.getFormatter("plaintext"),params:{}},i.genColumn.definition.cssClass=n.definition.cssClass;var s=new u(i.genColumn,o);s.getElement(),s.column=n,s.setWidth(),n.cells.push(s),t.push(s),n.visible||s.hide()}),this.cells=t},o},y.prototype.generateRowData=function(e,t){var o,i,n={},s="top"==e?this.topCalcs:this.botCalcs,a="top"==e?"topCalc":"botCalc";return s.forEach(function(e){var s=[];e.modules.columnCalcs&&e.modules.columnCalcs[a]&&(t.forEach(function(t){s.push(e.getFieldValue(t))}),i=a+"Params",o="function"==typeof e.modules.columnCalcs[i]?e.modules.columnCalcs[i](s,t):e.modules.columnCalcs[i],e.setFieldValue(n,e.modules.columnCalcs[a](s,t,o)))}),n},y.prototype.hasTopCalcs=function(){return!!this.topCalcs.length},y.prototype.hasBottomCalcs=function(){return!!this.botCalcs.length},y.prototype.redraw=function(){this.topRow&&this.topRow.normalizeHeight(!0),this.botRow&&this.botRow.normalizeHeight(!0)},y.prototype.getResults=function(){var e,t=this,o={};return this.table.options.groupBy&&this.table.modExists("groupRows")?(e=this.table.modules.groupRows.getGroups(!0),e.forEach(function(e){o[e.getKey()]=t.getGroupResults(e)})):o={top:this.topRow?this.topRow.getData():{},bottom:this.botRow?this.botRow.getData():{}},o},y.prototype.getGroupResults=function(e){var t=this,o=e._getSelf(),i=e.getSubGroups(),n={};return i.forEach(function(e){n[e.getKey()]=t.getGroupResults(e)}),{top:o.calcs.top?o.calcs.top.getData():{},bottom:o.calcs.bottom?o.calcs.bottom.getData():{},groups:n}},y.prototype.calculations={avg:function(e,t,o){var i=0,n=void 0!==o.precision?o.precision:2;return e.length&&(i=e.reduce(function(e,t){return Number(e)+Number(t)}),i/=e.length,i=!1!==n?i.toFixed(n):i),parseFloat(i).toString()},max:function(e,t,o){var i=null,n=void 0!==o.precision&&o.precision;return e.forEach(function(e){((e=Number(e))>i||null===i)&&(i=e)}),null!==i?!1!==n?i.toFixed(n):i:""},min:function(e,t,o){var i=null,n=void 0!==o.precision&&o.precision;return e.forEach(function(e){((e=Number(e))<i||null===i)&&(i=e)}),null!==i?!1!==n?i.toFixed(n):i:""},sum:function(e,t,o){var i=0,n=void 0!==o.precision&&o.precision;return e.length&&e.forEach(function(e){e=Number(e),i+=isNaN(e)?0:Number(e)}),!1!==n?i.toFixed(n):i},concat:function(e,t,o){var i=0;return e.length&&(i=e.reduce(function(e,t){return String(e)+String(t)})),i},count:function(e,t,o){var i=0;return e.length&&e.forEach(function(e){e&&i++}),i}},h.prototype.registerModule("columnCalcs",y);var w=function(e){this.table=e,this.mode=!0,this.pasteParser=function(){},this.pasteAction=function(){},this.customSelection=!1,this.rowRange=!1,this.blocked=!0};w.prototype.initialize=function(){var e=this;this.mode=this.table.options.clipboard,this.rowRange=this.table.options.clipboardCopyRowRange,!0!==this.mode&&"copy"!==this.mode||this.table.element.addEventListener("copy",function(t){var o,i,n;if(!e.blocked){if(t.preventDefault(),e.customSelection)o=e.customSelection,e.table.options.clipboardCopyFormatter&&(o=e.table.options.clipboardCopyFormatter("plain",o));else{var n=e.table.modules.export.generateExportList(e.table.options.clipboardCopyConfig,e.table.options.clipboardCopyStyled,e.rowRange,"clipboard");i=e.table.modules.export.genereateHTMLTable(n),o=i?e.generatePlainContent(n):"",e.table.options.clipboardCopyFormatter&&(o=e.table.options.clipboardCopyFormatter("plain",o),i=e.table.options.clipboardCopyFormatter("html",i))}window.clipboardData&&window.clipboardData.setData?window.clipboardData.setData("Text",o):t.clipboardData&&t.clipboardData.setData?(t.clipboardData.setData("text/plain",o),i&&t.clipboardData.setData("text/html",i)):t.originalEvent&&t.originalEvent.clipboardData.setData&&(t.originalEvent.clipboardData.setData("text/plain",o),i&&t.originalEvent.clipboardData.setData("text/html",i)),e.table.options.clipboardCopied.call(e.table,o,i),e.reset()}}),!0!==this.mode&&"paste"!==this.mode||this.table.element.addEventListener("paste",function(t){e.paste(t)}),this.setPasteParser(this.table.options.clipboardPasteParser),this.setPasteAction(this.table.options.clipboardPasteAction)},w.prototype.reset=function(){this.blocked=!0,this.customSelection=!1},w.prototype.generatePlainContent=function(e){var t=[];return e.forEach(function(e){var o=[];e.columns.forEach(function(t){var i="";if(t)if("group"===e.type&&(t.value=t.component.getKey()),null===t.value)i="";else switch(_typeof(t.value)){case"object":i=JSON.stringify(t.value);break;case"undefined":i="";break;default:i=t.value}o.push(i)}),t.push(o.join("\t"))}),t.join("\n")},w.prototype.copy=function(e,t){var e,o,i;this.blocked=!1,this.customSelection=!1,!0!==this.mode&&"copy"!==this.mode||(this.rowRange=e||this.table.options.clipboardCopyRowRange,void 0!==window.getSelection&&void 0!==document.createRange?(e=document.createRange(),e.selectNodeContents(this.table.element),o=window.getSelection(),o.toString()&&t&&(this.customSelection=o.toString()),o.removeAllRanges(),o.addRange(e)):void 0!==document.selection&&void 0!==document.body.createTextRange&&(i=document.body.createTextRange(),i.moveToElementText(this.table.element),i.select()),document.execCommand("copy"),o&&o.removeAllRanges())},w.prototype.setPasteAction=function(e){switch(void 0===e?"undefined":_typeof(e)){case"string":this.pasteAction=this.pasteActions[e],this.pasteAction||console.warn("Clipboard Error - No such paste action found:",e);break;case"function":this.pasteAction=e}},w.prototype.setPasteParser=function(e){switch(void 0===e?"undefined":_typeof(e)){case"string":this.pasteParser=this.pasteParsers[e],this.pasteParser||console.warn("Clipboard Error - No such paste parser found:",e);break;case"function":this.pasteParser=e}},w.prototype.paste=function(e){var t,o,i;this.checkPaseOrigin(e)&&(t=this.getPasteData(e),o=this.pasteParser.call(this,t),o?(e.preventDefault(),this.table.modExists("mutator")&&(o=this.mutateData(o)),i=this.pasteAction.call(this,o),this.table.options.clipboardPasted.call(this.table,t,o,i)):this.table.options.clipboardPasteError.call(this.table,t))},w.prototype.mutateData=function(e){var t=this,o=[];return Array.isArray(e)?e.forEach(function(e){o.push(t.table.modules.mutator.transformRow(e,"clipboard"))}):o=e,o},w.prototype.checkPaseOrigin=function(e){var t=!0;return("DIV"!=e.target.tagName||this.table.modules.edit.currentCell)&&(t=!1),t},w.prototype.getPasteData=function(e){var t;return window.clipboardData&&window.clipboardData.getData?t=window.clipboardData.getData("Text"):e.clipboardData&&e.clipboardData.getData?t=e.clipboardData.getData("text/plain"):e.originalEvent&&e.originalEvent.clipboardData.getData&&(t=e.originalEvent.clipboardData.getData("text/plain")),t},w.prototype.pasteParsers={table:function(e){var t=[],o=!0,i=this.table.columnManager.columns,n=[],s=[];return e=e.split("\n"),e.forEach(function(e){t.push(e.split("\t"))}),!(!t.length||1===t.length&&t[0].length<2)&&(!0,t[0].forEach(function(e){var t=i.find(function(t){return e&&t.definition.title&&e.trim()&&t.definition.title.trim()===e.trim()});t?n.push(t):o=!1}),o||(o=!0,n=[],t[0].forEach(function(e){var t=i.find(function(t){return e&&t.field&&e.trim()&&t.field.trim()===e.trim()});t?n.push(t):o=!1}),o||(n=this.table.columnManager.columnsByIndex)),o&&t.shift(),t.forEach(function(e){var t={};e.forEach(function(e,o){n[o]&&(t[n[o].field]=e)}),s.push(t)}),s)}},w.prototype.pasteActions={replace:function(e){return this.table.setData(e)},update:function(e){return this.table.updateOrAddData(e)},insert:function(e){return this.table.addData(e)}},h.prototype.registerModule("clipboard",w);var E=function(e){this.table=e,this.indent=10,this.field="",this.collapseEl=null,this.expandEl=null,this.branchEl=null,this.elementField=!1,this.startOpen=function(){},this.displayIndex=0};E.prototype.initialize=function(){var e=null,t=this.table.columnManager.getFirstVisibileColumn(),o=this.table.options;switch(this.field=o.dataTreeChildField,this.indent=o.dataTreeChildIndent,this.elementField=o.dataTreeElementColumn||!!t&&t.field,o.dataTreeBranchElement&&(!0===o.dataTreeBranchElement?(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch")):"string"==typeof o.dataTreeBranchElement?(e=document.createElement("div"),e.innerHTML=o.dataTreeBranchElement,this.branchEl=e.firstChild):this.branchEl=o.dataTreeBranchElement),o.dataTreeCollapseElement?"string"==typeof o.dataTreeCollapseElement?(e=document.createElement("div"),e.innerHTML=o.dataTreeCollapseElement,this.collapseEl=e.firstChild):this.collapseEl=o.dataTreeCollapseElement:(this.collapseEl=document.createElement("div"),this.collapseEl.classList.add("tabulator-data-tree-control"),this.collapseEl.tabIndex=0,this.collapseEl.innerHTML="<div class='tabulator-data-tree-control-collapse'></div>"),o.dataTreeExpandElement?"string"==typeof o.dataTreeExpandElement?(e=document.createElement("div"),e.innerHTML=o.dataTreeExpandElement,this.expandEl=e.firstChild):this.expandEl=o.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.tabIndex=0,this.expandEl.innerHTML="<div class='tabulator-data-tree-control-expand'></div>"),_typeof(o.dataTreeStartExpanded)){case"boolean":this.startOpen=function(e,t){return o.dataTreeStartExpanded};break;case"function":this.startOpen=o.dataTreeStartExpanded;break;default:this.startOpen=function(e,t){return o.dataTreeStartExpanded[t]}}},E.prototype.initializeRow=function(e){var t=e.getData()[this.field],o=Array.isArray(t),i=o||!o&&"object"===(void 0===t?"undefined":_typeof(t))&&null!==t;!i&&e.modules.dataTree&&e.modules.dataTree.branchEl&&e.modules.dataTree.branchEl.parentNode.removeChild(e.modules.dataTree.branchEl),!i&&e.modules.dataTree&&e.modules.dataTree.controlEl&&e.modules.dataTree.controlEl.parentNode.removeChild(e.modules.dataTree.controlEl),e.modules.dataTree={index:e.modules.dataTree?e.modules.dataTree.index:0,open:!!i&&(e.modules.dataTree?e.modules.dataTree.open:this.startOpen(e.getComponent(),0)),controlEl:!(!e.modules.dataTree||!i)&&e.modules.dataTree.controlEl,branchEl:!(!e.modules.dataTree||!i)&&e.modules.dataTree.branchEl,parent:!!e.modules.dataTree&&e.modules.dataTree.parent,children:i}},E.prototype.layoutRow=function(e){var t=this.elementField?e.getCell(this.elementField):e.getCells()[0],o=t.getElement(),i=e.modules.dataTree;i.branchEl&&(i.branchEl.parentNode&&i.branchEl.parentNode.removeChild(i.branchEl),i.branchEl=!1),i.controlEl&&(i.controlEl.parentNode&&i.controlEl.parentNode.removeChild(i.controlEl),i.controlEl=!1),this.generateControlElement(e,o),e.getElement().classList.add("tabulator-tree-level-"+i.index),i.index&&(this.branchEl?(i.branchEl=this.branchEl.cloneNode(!0),o.insertBefore(i.branchEl,o.firstChild),this.table.rtl?i.branchEl.style.marginRight=(i.branchEl.offsetWidth+i.branchEl.style.marginLeft)*(i.index-1)+i.index*this.indent+"px":i.branchEl.style.marginLeft=(i.branchEl.offsetWidth+i.branchEl.style.marginRight)*(i.index-1)+i.index*this.indent+"px"):this.table.rtl?o.style.paddingRight=parseInt(window.getComputedStyle(o,null).getPropertyValue("padding-right"))+i.index*this.indent+"px":o.style.paddingLeft=parseInt(window.getComputedStyle(o,null).getPropertyValue("padding-left"))+i.index*this.indent+"px")},E.prototype.generateControlElement=function(e,t){var o=this,i=e.modules.dataTree,t=t||e.getCells()[0].getElement(),n=i.controlEl;!1!==i.children&&(i.open?(i.controlEl=this.collapseEl.cloneNode(!0),i.controlEl.addEventListener("click",function(t){t.stopPropagation(),o.collapseRow(e)})):(i.controlEl=this.expandEl.cloneNode(!0),i.controlEl.addEventListener("click",function(t){t.stopPropagation(),o.expandRow(e)})),i.controlEl.addEventListener("mousedown",function(e){e.stopPropagation()}),n&&n.parentNode===t?n.parentNode.replaceChild(i.controlEl,n):t.insertBefore(i.controlEl,t.firstChild))},E.prototype.setDisplayIndex=function(e){this.displayIndex=e},E.prototype.getDisplayIndex=function(){return this.displayIndex},E.prototype.getRows=function(e){var t=this,o=[];return e.forEach(function(e,i){var n,s;o.push(e),e instanceof l&&(e.create(),n=e.modules.dataTree.children,n.index||!1===n.children||(s=t.getChildren(e),s.forEach(function(e){e.create(),o.push(e)})))}),o},E.prototype.getChildren=function(e,t){var o=this,i=e.modules.dataTree,n=[],s=[];return!1!==i.children&&(i.open||t)&&(Array.isArray(i.children)||(i.children=this.generateChildren(e)),n=this.table.modExists("filter")&&this.table.options.dataTreeFilter?this.table.modules.filter.filter(i.children):i.children,this.table.modExists("sort")&&this.table.options.dataTreeSort&&this.table.modules.sort.sort(n),n.forEach(function(e){s.push(e),o.getChildren(e).forEach(function(e){s.push(e)})})),s},E.prototype.generateChildren=function(e){var t=this,o=[],i=e.getData()[this.field];return Array.isArray(i)||(i=[i]),i.forEach(function(i){var n=new l(i||{},t.table.rowManager);n.create(),n.modules.dataTree.index=e.modules.dataTree.index+1,n.modules.dataTree.parent=e,n.modules.dataTree.children&&(n.modules.dataTree.open=t.startOpen(n.getComponent(),n.modules.dataTree.index)),o.push(n)}),o},E.prototype.expandRow=function(e,t){var o=e.modules.dataTree;!1!==o.children&&(o.open=!0,e.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowExpanded(e.getComponent(),e.modules.dataTree.index))},E.prototype.collapseRow=function(e){var t=e.modules.dataTree;!1!==t.children&&(t.open=!1,e.reinitialize(),this.table.rowManager.refreshActiveData("tree",!1,!0),this.table.options.dataTreeRowCollapsed(e.getComponent(),e.modules.dataTree.index))},E.prototype.toggleRow=function(e){var t=e.modules.dataTree;!1!==t.children&&(t.open?this.collapseRow(e):this.expandRow(e))},E.prototype.getTreeParent=function(e){return!!e.modules.dataTree.parent&&e.modules.dataTree.parent.getComponent()},E.prototype.getFilteredTreeChildren=function(e){var t,o=e.modules.dataTree,i=[];return o.children&&(Array.isArray(o.children)||(o.children=this.generateChildren(e)),t=this.table.modExists("filter")&&this.table.options.dataTreeFilter?this.table.modules.filter.filter(o.children):o.children,t.forEach(function(e){e instanceof l&&i.push(e)})),i},E.prototype.rowDelete=function(e){var t,o=e.modules.dataTree.parent;o&&(t=this.findChildIndex(e,o),!1!==t&&o.data[this.field].splice(t,1),o.data[this.field].length||delete o.data[this.field],this.initializeRow(o),this.layoutRow(o)),this.table.rowManager.refreshActiveData("tree",!1,!0)},E.prototype.addTreeChildRow=function(e,t,o,i){var n=!1;"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(e.data[this.field])||(e.data[this.field]=[],e.modules.dataTree.open=this.startOpen(e.getComponent(),e.modules.dataTree.index)),void 0!==i&&!1!==(n=this.findChildIndex(i,e))&&e.data[this.field].splice(o?n:n+1,0,t),!1===n&&(o?e.data[this.field].unshift(t):e.data[this.field].push(t)),this.initializeRow(e),this.layoutRow(e),this.table.rowManager.refreshActiveData("tree",!1,!0)},E.prototype.findChildIndex=function(e,t){var o=this,i=!1;return"object"==(void 0===e?"undefined":_typeof(e))?e instanceof l?i=e.data:e instanceof r?i=e._getSelf().data:"undefined"!=typeof HTMLElement&&e instanceof HTMLElement&&t.modules.dataTree&&(i=t.modules.dataTree.children.find(function(t){return t instanceof l&&t.element===e}))&&(i=i.data):i=void 0!==e&&null!==e&&t.data[this.field].find(function(t){return t.data[o.table.options.index]==e}),i&&(Array.isArray(t.data[this.field])&&(i=t.data[this.field].indexOf(i)),-1==i&&(i=!1)),i},E.prototype.getTreeChildren=function(e,t,o){var i=this,n=e.modules.dataTree,s=[];return n.children&&(Array.isArray(n.children)||(n.children=this.generateChildren(e)),n.children.forEach(function(e){e instanceof l&&(s.push(t?e.getComponent():e),o&&(s=s.concat(i.getTreeChildren(e,t,o))))})),s},E.prototype.checkForRestyle=function(e){e.row.cells.indexOf(e)||e.row.reinitialize()},E.prototype.getChildField=function(){return this.field},E.prototype.redrawNeeded=function(e){return!!this.field&&void 0!==e[this.field]||!!this.elementField&&void 0!==e[this.elementField]},h.prototype.registerModule("dataTree",E);var C=function(e){this.table=e};C.prototype.download=function(e,t,o,i,n){function s(o,i){n?!0===n?a.triggerDownload(o,i,e,t,!0):n(o):a.triggerDownload(o,i,e,t)}var a=this,r=!1;if("function"==typeof e?r=e:a.downloaders[e]?r=a.downloaders[e]:console.warn("Download Error - No such download type found: ",e),r){var l=this.generateExportList(i);r.call(this.table,l,o||{},s)}},C.prototype.generateExportList=function(e){var t=this.table.modules.export.generateExportList(this.table.options.downloadConfig,!1,e||this.table.options.downloadRowRange,"download"),o=this.table.options.groupHeaderDownload;return o&&!Array.isArray(o)&&(o=[o]),t.forEach(function(e){var t;"group"===e.type&&(t=e.columns[0],o&&o[e.indent]&&(t.value=o[e.indent](t.value,e.component._group.getRowCount(),e.component._group.getData(),e.component)))}),t},C.prototype.triggerDownload=function(e,t,o,i,n){var s=document.createElement("a"),a=new Blob([e],{type:t}),i=i||"Tabulator."+("function"==typeof o?"txt":o);(a=this.table.options.downloadReady.call(this.table,e,a))&&(n?window.open(window.URL.createObjectURL(a)):navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(a,i):(s.setAttribute("href",window.URL.createObjectURL(a)),s.setAttribute("download",i),s.style.display="none",document.body.appendChild(s),s.click(),document.body.removeChild(s)),this.table.options.downloadComplete&&this.table.options.downloadComplete())},C.prototype.commsReceived=function(e,t,o){switch(t){case"intercept":this.download(o.type,"",o.options,o.active,o.intercept)}},C.prototype.downloaders={csv:function(e,t,o){var i=t&&t.delimiter?t.delimiter:",",n=[],s=[];e.forEach(function(e){var t=[];switch(e.type){case"group":console.warn("Download Warning - CSV downloader cannot process row groups");break;case"calc":console.warn("Download Warning - CSV downloader cannot process column calculations");break;case"header":e.columns.forEach(function(e,t){e&&1===e.depth&&(s[t]=void 0===e.value||null===e.value?"":'"'+String(e.value).split('"').join('""')+'"')});break;case"row":e.columns.forEach(function(e){if(e){switch(_typeof(e.value)){case"object":e.value=JSON.stringify(e.value);break;case"undefined":case"null":e.value=""}t.push('"'+String(e.value).split('"').join('""')+'"')}}),n.push(t.join(i))}}),s.length&&n.unshift(s.join(i)),n=n.join("\n"),t.bom&&(n="\ufeff"+n),o(n,"text/csv")},json:function(e,t,o){var i=[];e.forEach(function(e){var t={};switch(e.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":e.columns.forEach(function(e){e&&(t[e.component.getField()]=e.value)}),i.push(t)}}),i=JSON.stringify(i,null,"\t"),o(i,"application/json")},pdf:function(e,t,o){function i(e,t){var o=[];return e.columns.forEach(function(e){var i;if(e){switch(_typeof(e.value)){case"object":e.value=JSON.stringify(e.value);break;case"undefined":case"null":e.value=""}i={content:e.value,colSpan:e.width,rowSpan:e.height},t&&(i.styles=t),o.push(i)}else o.push("")}),o}var n=[],s=[],a={},r=t.rowGroupStyles||{fontStyle:"bold",fontSize:12,cellPadding:6,fillColor:220},l=t.rowCalcStyles||{fontStyle:"bold",fontSize:10,cellPadding:4,fillColor:232},c=t.jsPDF||{},u=t&&t.title?t.title:"";c.orientation||(c.orientation=t.orientation||"landscape"),c.unit||(c.unit="pt"),e.forEach(function(e){switch(e.type){case"header":n.push(i(e));break;case"group":s.push(i(e,r));break;case"calc":s.push(i(e,l));break;case"row":s.push(i(e))}});var d=new jsPDF(c);t&&t.autoTable&&(a="function"==typeof t.autoTable?t.autoTable(d)||{}:t.autoTable),u&&(a.addPageContent=function(e){d.text(u,40,30)}),a.head=n,a.body=s,d.autoTable(a),t&&t.documentProcessing&&t.documentProcessing(d),o(d.output("arraybuffer"),"application/pdf")},xlsx:function(e,t,o){function i(){var t=[],o=[],i={},n={s:{c:0,r:0},e:{c:e[0]?e[0].columns.reduce(function(e,t){return e+(t&&t.width?t.width:1)},0):0,r:e.length}};return e.forEach(function(e,i){var n=[];e.columns.forEach(function(e,t){e?(n.push(e.value instanceof Date||"object"!==_typeof(e.value)?e.value:JSON.stringify(e.value)),(e.width>1||e.height>-1)&&o.push({s:{r:i,c:t},e:{r:i+e.height-1,c:t+e.width-1}})):n.push("")}),t.push(n)}),XLSX.utils.sheet_add_aoa(i,t),i["!ref"]=XLSX.utils.encode_range(n),o.length&&(i["!merges"]=o),i}var n,s=this,a=t.sheetName||"Sheet1",r=XLSX.utils.book_new();if(r.SheetNames=[],r.Sheets={},t.sheetOnly)return void o(i());if(t.sheets)for(var l in t.sheets)!0===t.sheets[l]?(r.SheetNames.push(l),r.Sheets[l]=i()):(r.SheetNames.push(l),this.modules.comms.send(t.sheets[l],"download","intercept",{type:"xlsx",options:{sheetOnly:!0},active:s.active,intercept:function(e){r.Sheets[l]=e}}));else r.SheetNames.push(a),r.Sheets[a]=i();t.documentProcessing&&(r=t.documentProcessing(r)),n=XLSX.write(r,{bookType:"xlsx",bookSST:!0,type:"binary"}),o(function(e){for(var t=new ArrayBuffer(e.length),o=new Uint8Array(t),i=0;i!=e.length;++i)o[i]=255&e.charCodeAt(i);return t}(n),"application/octet-stream")},html:function(e,t,o){this.modExists("export",!0)&&o(this.modules.export.genereateHTMLTable(e),"text/html")}},h.prototype.registerModule("download",C);var x=function(e){this.table=e,this.currentCell=!1,this.mouseClick=!1,this.recursionBlock=!1,this.invalidEdit=!1,this.editedCells=[]};x.prototype.initializeColumn=function(e){var t=this,o={editor:!1,blocked:!1,check:e.definition.editable,params:e.definition.editorParams||{}};switch(_typeof(e.definition.editor)){case"string":"tick"===e.definition.editor&&(e.definition.editor="tickCross",console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor")),t.editors[e.definition.editor]?o.editor=t.editors[e.definition.editor]:console.warn("Editor Error - No such editor found: ",e.definition.editor);break;case"function":o.editor=e.definition.editor;break;case"boolean":!0===e.definition.editor&&("function"!=typeof e.definition.formatter?("tick"===e.definition.formatter&&(e.definition.formatter="tickCross",console.warn("DEPRECATION WARNING - the tick editor has been deprecated, please use the tickCross editor")),t.editors[e.definition.formatter]?o.editor=t.editors[e.definition.formatter]:o.editor=t.editors.input):console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ",e.definition.formatter))}o.editor&&(e.modules.edit=o)},x.prototype.getCurrentCell=function(){return!!this.currentCell&&this.currentCell.getComponent()},x.prototype.clearEditor=function(e){var t,o=this.currentCell;if(this.invalidEdit=!1,o){for(this.currentCell=!1,t=o.getElement(),e?o.validate():t.classList.remove("tabulator-validation-fail"),t.classList.remove("tabulator-editing");t.firstChild;)t.removeChild(t.firstChild);o.row.getElement().classList.remove("tabulator-row-editing")}},x.prototype.cancelEdit=function(){if(this.currentCell){var e=this.currentCell,t=this.currentCell.getComponent();this.clearEditor(!0),e.setValueActual(e.getValue()),e.cellRendered(),("textarea"==e.column.definition.editor||e.column.definition.variableHeight)&&e.row.normalizeHeight(!0),e.column.cellEvents.cellEditCancelled&&e.column.cellEvents.cellEditCancelled.call(this.table,t),this.table.options.cellEditCancelled.call(this.table,t)}},x.prototype.bindEditor=function(e){var t=this,o=e.getElement(!0);o.setAttribute("tabindex",0),o.addEventListener("click",function(e){o.classList.contains("tabulator-editing")||o.focus({preventScroll:!0})}),o.addEventListener("mousedown",function(e){2===e.button?e.preventDefault():t.mouseClick=!0}),o.addEventListener("focus",function(o){t.recursionBlock||t.edit(e,o,!1)})},x.prototype.focusCellNoEvent=function(e,t){this.recursionBlock=!0,t&&"ie"===this.table.browser||e.getElement().focus({preventScroll:!0}),this.recursionBlock=!1},x.prototype.editCell=function(e,t){this.focusCellNoEvent(e),this.edit(e,!1,t)},x.prototype.focusScrollAdjust=function(e){if("virtual"==this.table.rowManager.getRenderMode()){var t=this.table.rowManager.element.scrollTop,o=this.table.rowManager.element.clientHeight+this.table.rowManager.element.scrollTop,i=e.row.getElement();i.offsetTop;i.offsetTop<t?this.table.rowManager.element.scrollTop-=t-i.offsetTop:i.offsetTop+i.offsetHeight>o&&(this.table.rowManager.element.scrollTop+=i.offsetTop+i.offsetHeight-o);var n=this.table.rowManager.element.scrollLeft,s=this.table.rowManager.element.clientWidth+this.table.rowManager.element.scrollLeft,a=e.getElement();a.offsetLeft;this.table.modExists("frozenColumns")&&(n+=parseInt(this.table.modules.frozenColumns.leftMargin),s-=parseInt(this.table.modules.frozenColumns.rightMargin)),this.table.options.virtualDomHoz&&(n-=parseInt(this.table.vdomHoz.vDomPadLeft),s-=parseInt(this.table.vdomHoz.vDomPadLeft)),a.offsetLeft<n?this.table.rowManager.element.scrollLeft-=n-a.offsetLeft:a.offsetLeft+a.offsetWidth>s&&(this.table.rowManager.element.scrollLeft+=a.offsetLeft+a.offsetWidth-s)}},x.prototype.edit=function(e,t,o){function i(t){if(c.currentCell===e){var o=!0;return e.column.modules.validate&&c.table.modExists("validate")&&"manual"!=c.table.options.validationMode&&(o=c.table.modules.validate.validate(e.column.modules.validate,e,t)),!0===o||"highlight"===c.table.options.validationMode?(c.clearEditor(),e.modules.edit||(e.modules.edit={}),e.modules.edit.edited=!0,-1==c.editedCells.indexOf(e)&&c.editedCells.push(e),e.setValue(t,!0),c.table.options.dataTree&&c.table.modExists("dataTree")&&c.table.modules.dataTree.checkForRestyle(e),!0===o||(h.classList.add("tabulator-validation-fail"),c.table.options.validationFailed.call(c.table,e.getComponent(),t,o),!1)):(c.invalidEdit=!0,h.classList.add("tabulator-validation-fail"),c.focusCellNoEvent(e,!0),d(),c.table.options.validationFailed.call(c.table,e.getComponent(),t,o),!1)}}function n(){c.currentCell===e&&(c.cancelEdit(),c.table.options.dataTree&&c.table.modExists("dataTree")&&c.table.modules.dataTree.checkForRestyle(e))}function s(e){d=e}var a,r,l,c=this,u=!0,d=function(){},h=e.getElement();if(this.currentCell)return void(this.invalidEdit||this.cancelEdit());if(e.column.modules.edit.blocked)return this.mouseClick=!1,h.blur(),!1;switch(t&&t.stopPropagation(),_typeof(e.column.modules.edit.check)){case"function":u=e.column.modules.edit.check(e.getComponent());break;case"boolean":u=e.column.modules.edit.check}if(u||o){if(c.cancelEdit(),c.currentCell=e,this.focusScrollAdjust(e),r=e.getComponent(),this.mouseClick&&(this.mouseClick=!1,e.column.cellEvents.cellClick&&e.column.cellEvents.cellClick.call(this.table,t,r)),e.column.cellEvents.cellEditing&&e.column.cellEvents.cellEditing.call(this.table,r),c.table.options.cellEditing.call(this.table,r),l="function"==typeof e.column.modules.edit.params?e.column.modules.edit.params(r):e.column.modules.edit.params,!1===(a=e.column.modules.edit.editor.call(c,r,s,i,n,l)))return h.blur(),!1;if(!(a instanceof Node))return console.warn("Edit Error - Editor should return an instance of Node, the editor returned:",a),h.blur(),!1;for(h.classList.add("tabulator-editing"),e.row.getElement().classList.add("tabulator-row-editing");h.firstChild;)h.removeChild(h.firstChild);h.appendChild(a),d();for(var p=h.children,m=0;m<p.length;m++)p[m].addEventListener("click",function(e){e.stopPropagation()});return!0}return this.mouseClick=!1,h.blur(),!1},x.prototype.maskInput=function(e,t){function o(t){var r=i[t];void 0!==r&&r!==a&&r!==n&&r!==s&&(e.value=e.value+""+r,o(t+1))}var i=t.mask,n=void 0!==t.maskLetterChar?t.maskLetterChar:"A",s=void 0!==t.maskNumberChar?t.maskNumberChar:"9",a=void 0!==t.maskWildcardChar?t.maskWildcardChar:"*",r=!1;e.addEventListener("keydown",function(t){var o=e.value.length,l=t.key;if(t.keyCode>46){if(o>=i.length)return t.preventDefault(),t.stopPropagation(),r=!1,!1;switch(i[o]){case n:if(l.toUpperCase()==l.toLowerCase())return t.preventDefault(),t.stopPropagation(),r=!1,!1;break;case s:if(isNaN(l))return t.preventDefault(),t.stopPropagation(),r=!1,!1;break;case a:break;default:if(l!==i[o])return t.preventDefault(),t.stopPropagation(),r=!1,!1}r=!0}}),e.addEventListener("keyup",function(i){i.keyCode>46&&t.maskAutoFill&&o(e.value.length)}),e.placeholder||(e.placeholder=i),t.maskAutoFill&&o(e.value.length)},x.prototype.getEditedCells=function(){var e=[];return this.editedCells.forEach(function(t){e.push(t.getComponent())}),e},x.prototype.clearEdited=function(e){var t;e.modules.edit&&e.modules.edit.edited&&(e.modules.edit.edited=!1,e.modules.validate&&(e.modules.validate.invalid=!1)),(t=this.editedCells.indexOf(e))>-1&&this.editedCells.splice(t,1)},x.prototype.editors={input:function(e,t,o,i,n){function s(e){(null===a||void 0===a)&&""!==r.value||r.value!==a?o(r.value)&&(a=r.value):i()}var a=e.getValue(),r=document.createElement("input");if(r.setAttribute("type",n.search?"search":"text"),r.style.padding="4px",r.style.width="100%",r.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var l in n.elementAttributes)"+"==l.charAt(0)?(l=l.slice(1),r.setAttribute(l,r.getAttribute(l)+n.elementAttributes["+"+l])):r.setAttribute(l,n.elementAttributes[l]);return r.value=void 0!==a?a:"",t(function(){r.focus({preventScroll:!0}),r.style.height="100%"}),r.addEventListener("change",s),r.addEventListener("blur",s),r.addEventListener("keydown",function(e){switch(e.keyCode){case 13:s(e);break;case 27:i();break;case 35:case 36:e.stopPropagation()}}),n.mask&&this.table.modules.edit.maskInput(r,n),r},textarea:function(e,t,o,i,n){function s(t){(null===a||void 0===a)&&""!==c.value||c.value!==a?(o(c.value)&&(a=c.value),setTimeout(function(){e.getRow().normalizeHeight()},300)):i()}var a=e.getValue(),r=n.verticalNavigation||"hybrid",l=String(null!==a&&void 0!==a?a:""),c=(l.match(/(?:\r\n|\r|\n)/g),document.createElement("textarea")),u=0;if(c.style.display="block",c.style.padding="2px",c.style.height="100%",c.style.width="100%",c.style.boxSizing="border-box",c.style.whiteSpace="pre-wrap",c.style.resize="none",
+n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var d in n.elementAttributes)"+"==d.charAt(0)?(d=d.slice(1),c.setAttribute(d,c.getAttribute(d)+n.elementAttributes["+"+d])):c.setAttribute(d,n.elementAttributes[d]);return c.value=l,t(function(){c.focus({preventScroll:!0}),c.style.height="100%",c.scrollHeight,c.style.height=c.scrollHeight+"px",e.getRow().normalizeHeight()}),c.addEventListener("change",s),c.addEventListener("blur",s),c.addEventListener("keyup",function(){c.style.height="";var t=c.scrollHeight;c.style.height=t+"px",t!=u&&(u=t,e.getRow().normalizeHeight())}),c.addEventListener("keydown",function(e){switch(e.keyCode){case 27:i();break;case 38:("editor"==r||"hybrid"==r&&c.selectionStart)&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 40:("editor"==r||"hybrid"==r&&c.selectionStart!==c.value.length)&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 35:case 36:e.stopPropagation()}}),n.mask&&this.table.modules.edit.maskInput(c,n),c},number:function(e,t,o,i,n){function s(){var e=l.value;isNaN(e)||""===e||(e=Number(e)),e!==a?o(e)&&(a=e):i()}var a=e.getValue(),r=n.verticalNavigation||"editor",l=document.createElement("input");if(l.setAttribute("type","number"),void 0!==n.max&&l.setAttribute("max",n.max),void 0!==n.min&&l.setAttribute("min",n.min),void 0!==n.step&&l.setAttribute("step",n.step),l.style.padding="4px",l.style.width="100%",l.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var c in n.elementAttributes)"+"==c.charAt(0)?(c=c.slice(1),l.setAttribute(c,l.getAttribute(c)+n.elementAttributes["+"+c])):l.setAttribute(c,n.elementAttributes[c]);l.value=a;var u=function(e){s()};return t(function(){l.removeEventListener("blur",u),l.focus({preventScroll:!0}),l.style.height="100%",l.addEventListener("blur",u)}),l.addEventListener("keydown",function(e){switch(e.keyCode){case 13:s();break;case 27:i();break;case 38:case 40:"editor"==r&&(e.stopImmediatePropagation(),e.stopPropagation());break;case 35:case 36:e.stopPropagation()}}),n.mask&&this.table.modules.edit.maskInput(l,n),l},range:function(e,t,o,i,n){function s(){var e=r.value;isNaN(e)||""===e||(e=Number(e)),e!=a?o(e)&&(a=e):i()}var a=e.getValue(),r=document.createElement("input");if(r.setAttribute("type","range"),void 0!==n.max&&r.setAttribute("max",n.max),void 0!==n.min&&r.setAttribute("min",n.min),void 0!==n.step&&r.setAttribute("step",n.step),r.style.padding="4px",r.style.width="100%",r.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var l in n.elementAttributes)"+"==l.charAt(0)?(l=l.slice(1),r.setAttribute(l,r.getAttribute(l)+n.elementAttributes["+"+l])):r.setAttribute(l,n.elementAttributes[l]);return r.value=a,t(function(){r.focus({preventScroll:!0}),r.style.height="100%"}),r.addEventListener("blur",function(e){s()}),r.addEventListener("keydown",function(e){switch(e.keyCode){case 13:s();break;case 27:i()}}),r},select:function(e,t,o,i,n){function s(t){var o,i={},n=x.table.getData();return o=t?x.table.columnManager.getColumnByField(t):e.getColumn()._getSelf(),o?n.forEach(function(e){var t=o.getFieldValue(e);null!==t&&void 0!==t&&""!==t&&(i[t]=!0)}):console.warn("unable to find matching column to create select lookup list:",t),Object.keys(i)}function a(t,o){function i(e){var e={label:e.label,value:e.value,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1};return o.indexOf(e.value)>-1&&c(e),s.push(e),a.push(e),e}var s=[],a=[];if("function"==typeof t&&(t=t(e)),Array.isArray(t))t.forEach(function(e){var t;"object"===(void 0===e?"undefined":_typeof(e))?e.options?(t={label:e.label,group:!0,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1},a.push(t),e.options.forEach(function(e){i(e)})):i(e):(t={label:e,value:e,element:!1},o.indexOf(t.value)>-1&&c(t),s.push(t),a.push(t))});else for(var l in t){var u={label:t[l],value:l,element:!1};o.indexOf(u.value)>-1&&c(u),s.push(u),a.push(u)}n.sortValuesList&&(s.sort(function(e,t){return e.label<t.label?-1:e.label>t.label?1:0}),a.sort(function(e,t){return e.label<t.label?-1:e.label>t.label?1:0}),"asc"!==n.sortValuesList&&(s.reverse(),a.reverse())),S=s,P=a,r()}function r(){for(;k.firstChild;)k.removeChild(k.firstChild);P.forEach(function(t){var o=t.element;if(!o){if(o=document.createElement("div"),t.label=n.listItemFormatter?n.listItemFormatter(t.value,t.label,e,o,t.itemParams):t.label,t.group?(o.classList.add("tabulator-edit-select-list-group"),o.tabIndex=0,o.innerHTML=""===t.label?" ":t.label):(o.classList.add("tabulator-edit-select-list-item"),o.tabIndex=0,o.innerHTML=""===t.label?" ":t.label,o.addEventListener("click",function(){F=!0,setTimeout(function(){F=!1},10),z?(d(t),T.focus()):p(t)}),A.indexOf(t)>-1&&o.classList.add("active")),t.elementAttributes&&"object"==_typeof(t.elementAttributes))for(var i in t.elementAttributes)"+"==i.charAt(0)?(i=i.slice(1),o.setAttribute(i,T.getAttribute(i)+t.elementAttributes["+"+i])):o.setAttribute(i,t.elementAttributes[i]);o.addEventListener("mousedown",function(){_=!1,setTimeout(function(){_=!0},10)}),t.element=o}k.appendChild(o)})}function l(e,t){!z&&H&&H.element&&H.element.classList.remove("active"),H&&H.element&&H.element.classList.remove("focused"),H=e,e.element&&(e.element.classList.add("focused"),t&&e.element.classList.add("active")),e&&e.element&&e.element.scrollIntoView&&e.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}function c(e){-1==A.indexOf(e)&&(A.push(e),l(e,!0)),f()}function u(e){var t=A[e];e>-1&&(A.splice(e,1),t.element&&t.element.classList.remove("active"))}function d(e){e||(e=H);var t=A.indexOf(e);t>-1?u(t):(!0!==z&&A.length>=z&&u(0),c(e)),f()}function p(e){y(),e||(e=H),e&&(T.value=e.label,o(e.value)),D=[e.value]}function m(e){e||y();var t=[];A.forEach(function(e){t.push(e.value)}),D=t,o(t)}function f(){var e=[];A.forEach(function(t){e.push(t.label)}),T.value=e.join(", "),!1===x.currentCell&&m(!0)}function g(){for(var e=A.length,t=0;t<e;t++)u(0)}function b(){y(),i()}function v(){if(A=[],!k.parentNode){!0===n.values?a(s(),D):"string"==typeof n.values?a(s(n.values),D):a(n.values||[],D);var e=h.prototype.helpers.elOffset(R);k.style.minWidth=R.offsetWidth+"px",k.style.top=e.top+R.offsetHeight+"px",k.style.left=e.left+"px",k.addEventListener("mousedown",function(e){_=!1,setTimeout(function(){_=!0},10)}),document.body.appendChild(k)}}function y(){k.parentNode&&k.parentNode.removeChild(k),w()}function w(){x.table.rowManager.element.removeEventListener("scroll",b)}function E(e){clearTimeout(B);var t=String.fromCharCode(event.keyCode).toLowerCase();N+=t.toLowerCase();var o=S.find(function(e){return void 0!==e.label&&e.label.toLowerCase().startsWith(N)});o&&l(o,!z),B=setTimeout(function(){N=""},800)}var C=this,x=this,R=e.getElement(),M=e.getValue(),L=n.verticalNavigation||"editor",D=void 0!==M||null===M?Array.isArray(M)?M:[M]:void 0!==n.defaultValue?n.defaultValue:[],T=document.createElement("input"),k=document.createElement("div"),z=n.multiselect,S=[],H={},P=[],A=[],_=!0,F=!1,N="",B=null;if((Array.isArray(n)||!Array.isArray(n)&&"object"===(void 0===n?"undefined":_typeof(n))&&!n.values)&&(console.warn("DEPRECATION WARNING - values for the select editor must now be passed into the values property of the editorParams object, not as the editorParams object"),n={values:n}),T.setAttribute("type","text"),T.style.padding="4px",T.style.width="100%",T.style.boxSizing="border-box",T.style.cursor="default",T.readOnly=0!=this.currentCell,n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var O in n.elementAttributes)"+"==O.charAt(0)?(O=O.slice(1),T.setAttribute(O,T.getAttribute(O)+n.elementAttributes["+"+O])):T.setAttribute(O,n.elementAttributes[O]);return T.value=void 0!==M||null===M?M:"",T.addEventListener("search",function(e){T.value||(g(),m())}),T.addEventListener("keydown",function(e){var t;switch(e.keyCode){case 38:t=S.indexOf(H),("editor"==L||"hybrid"==L&&t)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t>0&&l(S[t-1],!z));break;case 40:t=S.indexOf(H),("editor"==L||"hybrid"==L&&t<S.length-1)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t<S.length-1&&(-1==t?l(S[0],!z):l(S[t+1],!z)));break;case 37:case 39:e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault();break;case 13:z?d():p();break;case 27:b();break;case 9:break;default:!1===x.currentCell&&e.preventDefault(),e.keyCode>=38&&e.keyCode<=90&&E(e.keyCode)}}),T.addEventListener("blur",function(e){_&&(z?m():b())}),T.addEventListener("focus",function(e){F||v()}),k=document.createElement("div"),k.classList.add("tabulator-edit-select-list"),t(function(){T.style.height="100%",T.focus({preventScroll:!0})}),setTimeout(function(){C.table.rowManager.element.addEventListener("scroll",b)},10),T},autocomplete:function(e,t,o,i,n){function s(){!0===n.values?S=a():"string"==typeof n.values&&(S=a(n.values))}function a(t){var o,i={},s=E.table.getData();return o=t?E.table.columnManager.getColumnByField(t):e.getColumn()._getSelf(),o?(s.forEach(function(e){var t=o.getFieldValue(e);null!==t&&void 0!==t&&""!==t&&(i[t]=!0)}),i=n.sortValuesList?"asc"==n.sortValuesList?Object.keys(i).sort():Object.keys(i).sort().reverse():Object.keys(i)):console.warn("unable to find matching column to create autocomplete lookup list:",t),i}function r(e,t){var o,i,s=[];o=S||(n.values||[]),n.searchFunc?(s=n.searchFunc(e,o),s instanceof Promise?(l(void 0!==n.searchingPlaceholder?n.searchingPlaceholder:"Searching..."),s.then(function(e){d(c(e),t)}).catch(function(e){console.err("error in autocomplete search promise:",e)})):d(c(s),t)):(i=c(o),""===e?n.showListOnEmpty&&(s=i):i.forEach(function(t){null===t.value&&void 0===t.value||(String(t.value).toLowerCase().indexOf(String(e).toLowerCase())>-1||String(t.title).toLowerCase().indexOf(String(e).toLowerCase())>-1)&&s.push(t)}),d(s,t))}function l(e){var t=document.createElement("div");u(),!1!==e&&(t.classList.add("tabulator-edit-select-list-notice"),t.tabIndex=0,e instanceof Node?t.appendChild(e):t.innerHTML=e,D.appendChild(t))}function c(e){var t=[];if(Array.isArray(e))e.forEach(function(e){var o={};"object"===(void 0===e?"undefined":_typeof(e))?(o.title=n.listItemFormatter?n.listItemFormatter(e.value,e.label):e.label,o.value=e.value):(o.title=n.listItemFormatter?n.listItemFormatter(e,e):e,o.value=e),t.push(o)});else for(var o in e){var i={title:n.listItemFormatter?n.listItemFormatter(o,e[o]):e[o],value:o};t.push(i)}return t}function u(){for(;D.firstChild;)D.removeChild(D.firstChild)}function d(e,t){e.length?p(e,t):n.emptyPlaceholder&&l(n.emptyPlaceholder)}function p(e,t){var o=!1;u(),T=e,T.forEach(function(e){var i=e.element;i||(i=document.createElement("div"),i.classList.add("tabulator-edit-select-list-item"),i.tabIndex=0,i.innerHTML=e.title,i.addEventListener("click",function(t){g(e),m()}),i.addEventListener("mousedown",function(e){z=!1,setTimeout(function(){z=!0},10)}),e.element=i,t&&e.value==x&&(L.value=e.title,e.element.classList.add("active"),o=!0),e===k&&(e.element.classList.add("active"),o=!0)),D.appendChild(i)}),o||g(!1)}function m(){b(),k?x!==k.value?(x=k.value,L.value=k.title,o(k.value)):i():n.freetext?(x=L.value,o(L.value)):n.allowEmpty&&""===L.value?(x=L.value,o(L.value)):i()}function f(){if(!D.parentNode){for(console.log("show",M);D.firstChild;)D.removeChild(D.firstChild);var e=h.prototype.helpers.elOffset(C);D.style.minWidth=C.offsetWidth+"px",D.style.top=e.top+C.offsetHeight+"px",D.style.left=e.left+"px",document.body.appendChild(D)}}function g(e,t){k&&k.element&&k.element.classList.remove("active"),k=e,e&&e.element&&e.element.classList.add("active"),e&&e.element&&e.element.scrollIntoView&&e.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})}function b(){D.parentNode&&D.parentNode.removeChild(D),y()}function v(){b(),i()}function y(){E.table.rowManager.element.removeEventListener("scroll",v)}var w=this,E=this,C=e.getElement(),x=e.getValue(),R=n.verticalNavigation||"editor",M=void 0!==x||null===x?x:void 0!==n.defaultValue?n.defaultValue:"",L=document.createElement("input"),D=document.createElement("div"),T=[],k=!1,z=!0,S=!1;if(L.setAttribute("type","search"),L.style.padding="4px",L.style.width="100%",L.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var H in n.elementAttributes)"+"==H.charAt(0)?(H=H.slice(1),L.setAttribute(H,L.getAttribute(H)+n.elementAttributes["+"+H])):L.setAttribute(H,n.elementAttributes[H]);return D.classList.add("tabulator-edit-select-list"),D.addEventListener("mousedown",function(e){z=!1,setTimeout(function(){z=!0},10)}),L.addEventListener("keydown",function(e){var t;switch(e.keyCode){case 38:t=T.indexOf(k),("editor"==R||"hybrid"==R&&t)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),g(t>0?T[t-1]:!1));break;case 40:t=T.indexOf(k),("editor"==R||"hybrid"==R&&t<T.length-1)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t<T.length-1&&g(-1==t?T[0]:T[t+1]));break;case 37:case 39:e.stopImmediatePropagation(),e.stopPropagation();break;case 13:m();break;case 27:v();break;case 36:case 35:e.stopImmediatePropagation()}}),L.addEventListener("keyup",function(e){switch(e.keyCode){case 38:case 37:case 39:case 40:case 13:case 27:break;default:r(L.value)}}),L.addEventListener("search",function(e){r(L.value)}),L.addEventListener("blur",function(e){z&&m()}),L.addEventListener("focus",function(e){var t=M;s(),f(),L.value=t,r(t,!0)}),t(function(){L.style.height="100%",L.focus({preventScroll:!0})}),n.mask&&this.table.modules.edit.maskInput(L,n),setTimeout(function(){w.table.rowManager.element.addEventListener("scroll",v)},10),s(),L.value=M,r(M,!0),L},star:function(e,t,o,i,n){function s(e){h.forEach(function(t,o){o<e?("ie"==r.table.browser?t.setAttribute("class","tabulator-star-active"):t.classList.replace("tabulator-star-inactive","tabulator-star-active"),t.innerHTML='<polygon fill="#488CE9" stroke="#014AAE" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>'):("ie"==r.table.browser?t.setAttribute("class","tabulator-star-inactive"):t.classList.replace("tabulator-star-active","tabulator-star-inactive"),t.innerHTML='<polygon fill="#010155" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>')})}function a(e){c=e,s(e)}var r=this,l=e.getElement(),c=e.getValue(),u=l.getElementsByTagName("svg").length||5,d=l.getElementsByTagName("svg")[0]?l.getElementsByTagName("svg")[0].getAttribute("width"):14,h=[],p=document.createElement("div"),m=document.createElementNS("http://www.w3.org/2000/svg","svg");if(l.style.whiteSpace="nowrap",l.style.overflow="hidden",l.style.textOverflow="ellipsis",p.style.verticalAlign="middle",p.style.display="inline-block",p.style.padding="4px",m.setAttribute("width",d),m.setAttribute("height",d),m.setAttribute("viewBox","0 0 512 512"),m.setAttribute("xml:space","preserve"),m.style.padding="0 1px",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var f in n.elementAttributes)"+"==f.charAt(0)?(f=f.slice(1),p.setAttribute(f,p.getAttribute(f)+n.elementAttributes["+"+f])):p.setAttribute(f,n.elementAttributes[f]);for(var g=1;g<=u;g++)!function(e){var t=document.createElement("span"),i=m.cloneNode(!0);h.push(i),t.addEventListener("mouseenter",function(t){t.stopPropagation(),t.stopImmediatePropagation(),s(e)}),t.addEventListener("mousemove",function(e){e.stopPropagation(),e.stopImmediatePropagation()}),t.addEventListener("click",function(t){t.stopPropagation(),t.stopImmediatePropagation(),o(e),l.blur()}),t.appendChild(i),p.appendChild(t)}(g);return c=Math.min(parseInt(c),u),s(c),p.addEventListener("mousemove",function(e){s(0)}),p.addEventListener("click",function(e){o(0)}),l.addEventListener("blur",function(e){i()}),l.addEventListener("keydown",function(e){switch(e.keyCode){case 39:a(c+1);break;case 37:a(c-1);break;case 13:o(c);break;case 27:i()}}),p},progress:function(e,t,o,i,n){function s(){var e=window.getComputedStyle(l,null),t=d*Math.round(m.offsetWidth/((l.clientWidth-parseInt(e.getPropertyValue("padding-left"))-parseInt(e.getPropertyValue("padding-right")))/100))+u;o(t),l.setAttribute("aria-valuenow",t),l.setAttribute("aria-label",h)}var a,r,l=e.getElement(),c=void 0===n.max?l.getElementsByTagName("div")[0].getAttribute("max")||100:n.max,u=void 0===n.min?l.getElementsByTagName("div")[0].getAttribute("min")||0:n.min,d=(c-u)/100,h=e.getValue()||0,p=document.createElement("div"),m=document.createElement("div");if(p.style.position="absolute",p.style.right="0",p.style.top="0",p.style.bottom="0",p.style.width="5px",p.classList.add("tabulator-progress-handle"),m.style.display="inline-block",m.style.position="relative",m.style.height="100%",m.style.backgroundColor="#488CE9",m.style.maxWidth="100%",m.style.minWidth="0%",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var f in n.elementAttributes)"+"==f.charAt(0)?(f=f.slice(1),m.setAttribute(f,m.getAttribute(f)+n.elementAttributes["+"+f])):m.setAttribute(f,n.elementAttributes[f]);return l.style.padding="4px 4px",h=Math.min(parseFloat(h),c),h=Math.max(parseFloat(h),u),h=Math.round((h-u)/d),m.style.width=h+"%",l.setAttribute("aria-valuemin",u),l.setAttribute("aria-valuemax",c),m.appendChild(p),p.addEventListener("mousedown",function(e){a=e.screenX,r=m.offsetWidth}),p.addEventListener("mouseover",function(){p.style.cursor="ew-resize"}),l.addEventListener("mousemove",function(e){a&&(m.style.width=r+e.screenX-a+"px")}),l.addEventListener("mouseup",function(e){a&&(e.stopPropagation(),e.stopImmediatePropagation(),a=!1,r=!1,s())}),l.addEventListener("keydown",function(e){switch(e.keyCode){case 39:e.preventDefault(),m.style.width=m.clientWidth+l.clientWidth/100+"px";break;case 37:e.preventDefault(),m.style.width=m.clientWidth-l.clientWidth/100+"px";break;case 9:case 13:s();break;case 27:i()}}),l.addEventListener("blur",function(){i()}),m},tickCross:function(e,t,o,i,n){function s(e){return l?e?u?c:r.checked:r.checked&&!u?(r.checked=!1,r.indeterminate=!0,u=!0,c):(u=!1,r.checked):r.checked}var a=e.getValue(),r=document.createElement("input"),l=n.tristate,c=void 0===n.indeterminateValue?null:n.indeterminateValue,u=!1;if(r.setAttribute("type","checkbox"),r.style.marginTop="5px",r.style.boxSizing="border-box",n.elementAttributes&&"object"==_typeof(n.elementAttributes))for(var d in n.elementAttributes)"+"==d.charAt(0)?(d=d.slice(1),r.setAttribute(d,r.getAttribute(d)+n.elementAttributes["+"+d])):r.setAttribute(d,n.elementAttributes[d]);return r.value=a,!l||void 0!==a&&a!==c&&""!==a||(u=!0,r.indeterminate=!0),"firefox"!=this.table.browser&&t(function(){r.focus({preventScroll:!0})}),r.checked=!0===a||"true"===a||"True"===a||1===a,t(function(){r.focus()}),r.addEventListener("change",function(e){o(s())}),r.addEventListener("blur",function(e){o(s(!0))}),r.addEventListener("keydown",function(e){13==e.keyCode&&o(s()),27==e.keyCode&&i()}),r}},h.prototype.registerModule("edit",x);var R=function(e,t,o,i){this.type=e,this.columns=t,this.component=o||!1,this.indent=i||0},M=function(e,t,o,i,n){this.value=e,this.component=t||!1,this.width=o,this.height=i,this.depth=n},L=function(e){this.table=e,this.config={},this.cloneTableStyle=!0,this.colVisProp=""};L.prototype.generateExportList=function(e,t,o,i){this.cloneTableStyle=t,this.config=e||{},this.colVisProp=i;var n=!1!==this.config.columnHeaders?this.headersToExportRows(this.generateColumnGroupHeaders()):[],s=this.bodyToExportRows(this.rowLookup(o));return n.concat(s)},L.prototype.genereateTable=function(e,t,o,i){var n=this.generateExportList(e,t,o,i);return this.genereateTableElement(n)},L.prototype.rowLookup=function(e){var t=this,o=[];if("function"==typeof e)e.call(this.table).forEach(function(e){(e=t.table.rowManager.findRow(e))&&o.push(e)});else switch(e){case!0:case"visible":o=this.table.rowManager.getVisibleRows(!0);break;case"all":o=this.table.rowManager.rows;break;case"selected":o=this.table.modules.selectRow.selectedRows;break;case"active":default:o=this.table.options.pagination?this.table.rowManager.getDisplayRows(this.table.rowManager.displayRows.length-2):this.table.rowManager.getDisplayRows()}return Object.assign([],o)},L.prototype.generateColumnGroupHeaders=function(){var e=this,t=[];return(!1!==this.config.columnGroups?this.table.columnManager.columns:this.table.columnManager.columnsByIndex).forEach(function(o){var i=e.processColumnGroup(o);i&&t.push(i)}),t},L.prototype.processColumnGroup=function(e){var t=this,o=e.columns,i=0,n=e.definition["title"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))]||e.definition.title,s={title:n,column:e,depth:1};if(o.length){if(s.subGroups=[],s.width=0,o.forEach(function(e){var o=t.processColumnGroup(e);o&&(s.width+=o.width,s.subGroups.push(o),o.depth>i&&(i=o.depth))}),s.depth+=i,!s.width)return!1}else{if(!this.columnVisCheck(e))return!1;s.width=1}return s},L.prototype.columnVisCheck=function(e){return!1!==e.definition[this.colVisProp]&&(e.visible||!e.visible&&e.definition[this.colVisProp])},L.prototype.headersToExportRows=function(e){function t(e,n){var s=i-n;if(void 0===o[n]&&(o[n]=[]),e.height=e.subGroups?1:s-e.depth+1,o[n].push(e),e.height>1)for(var a=1;a<e.height;a++)void 0===o[n+a]&&(o[n+a]=[]),o[n+a].push(!1);if(e.width>1)for(var r=1;r<e.width;r++)o[n].push(!1);e.subGroups&&e.subGroups.forEach(function(e){t(e,n+1)})}var o=[],i=0,n=[];return e.forEach(function(e){e.depth>i&&(i=e.depth)}),e.forEach(function(e){t(e,0)}),o.forEach(function(e){var t=[];e.forEach(function(e){e?t.push(new M(e.title,e.column.getComponent(),e.width,e.height,e.depth)):t.push(null)}),n.push(new R("header",t))}),n},L.prototype.bodyToExportRows=function(e){var t=this,o=[],i=[];return this.table.columnManager.columnsByIndex.forEach(function(e){t.columnVisCheck(e)&&o.push(e.getComponent())}),!1!==this.config.columnCalcs&&this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&e.unshift(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&e.push(this.table.modules.columnCalcs.botRow)),e=e.filter(function(e){switch(e.type){case"group":return!1!==t.config.rowGroups;case"calc":return!1!==t.config.columnCalcs;case"row":return!(t.table.options.dataTree&&!1===t.config.dataTree&&e.modules.dataTree.parent)}return!0}),e.forEach(function(e,n){var s=e.getData(t.colVisProp),a=[],r=0;switch(e.type){case"group":r=e.level,a.push(new M(e.key,e.getComponent(),o.length,1));break;case"calc":case"row":o.forEach(function(e){a.push(new M(e._column.getFieldValue(s),e,1,1))}),t.table.options.dataTree&&!1!==t.config.dataTree&&(r=e.modules.dataTree.index)}i.push(new R(e.type,a,e.getComponent(),r))}),i},L.prototype.genereateTableElement=function(e){var t=this,o=document.createElement("table"),i=document.createElement("thead"),n=document.createElement("tbody"),s=this.lookupTableStyles(),a=this.table.options["rowFormatter"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],r={};return r.rowFormatter=null!==a?a:this.table.options.rowFormatter,this.table.options.dataTree&&!1!==this.config.dataTree&&this.table.modExists("columnCalcs")&&(r.treeElementField=this.table.modules.dataTree.elementField),r.groupHeader=this.table.options["groupHeader"+(this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1))],r.groupHeader&&!Array.isArray(r.groupHeader)&&(r.groupHeader=[r.groupHeader]),o.classList.add("tabulator-print-table"),this.mapElementStyles(this.table.columnManager.getHeadersElement(),i,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),e.length>1e3&&console.warn("It may take a long time to render an HTML table with more than 1000 rows"),e.forEach(function(e,o){switch(e.type){case"header":i.appendChild(t.genereateHeaderElement(e,r,s));break;case"group":n.appendChild(t.genereateGroupElement(e,r,s));break;case"calc":n.appendChild(t.genereateCalcElement(e,r,s));break;case"row":var a=t.genereateRowElement(e,r,s);t.mapElementStyles(o%2&&s.evenRow?s.evenRow:s.oddRow,a,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),n.appendChild(a)}}),i.innerHTML&&o.appendChild(i),o.appendChild(n),this.mapElementStyles(this.table.element,o,["border-top","border-left","border-right","border-bottom"]),o},L.prototype.lookupTableStyles=function(){var e={};return this.cloneTableStyle&&window.getComputedStyle&&(e.oddRow=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),e.evenRow=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),e.calcRow=this.table.element.querySelector(".tabulator-row.tabulator-calcs"),e.firstRow=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),e.firstGroup=this.table.element.getElementsByClassName("tabulator-group")[0],e.firstRow&&(e.styleCells=e.firstRow.getElementsByClassName("tabulator-cell"),e.firstCell=e.styleCells[0],e.lastCell=e.styleCells[e.styleCells.length-1])),e},L.prototype.genereateHeaderElement=function(e,t,o){var i=this,n=document.createElement("tr");return e.columns.forEach(function(e){if(e){var t=document.createElement("th"),o=e.component._column.definition.cssClass?e.component._column.definition.cssClass.split(" "):[];t.colSpan=e.width,t.rowSpan=e.height,t.innerHTML=e.value,i.cloneTableStyle&&(t.style.boxSizing="border-box"),o.forEach(function(e){t.classList.add(e)}),i.mapElementStyles(e.component.getElement(),t,["text-align","border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),i.mapElementStyles(e.component._column.contentElement,t,["padding-top","padding-left","padding-right","padding-bottom"]),e.component._column.visible?i.mapElementStyles(e.component.getElement(),t,["width"]):e.component._column.definition.width&&(t.style.width=e.component._column.definition.width+"px"),e.component._column.parent&&i.mapElementStyles(e.component._column.parent.groupElement,t,["border-top"]),n.appendChild(t)}}),n},L.prototype.genereateGroupElement=function(e,t,o){var i=document.createElement("tr"),n=document.createElement("td"),s=e.columns[0];return i.classList.add("tabulator-print-table-row"),t.groupHeader&&t.groupHeader[e.indent]?s.value=t.groupHeader[e.indent](s.value,e.component._group.getRowCount(),e.component._group.getData(),e.component):!1===t.groupHeader?s.value=s.value:s.value=e.component._group.generator(s.value,e.component._group.getRowCount(),e.component._group.getData(),e.component),n.colSpan=s.width,n.innerHTML=s.value,i.classList.add("tabulator-print-table-group"),i.classList.add("tabulator-group-level-"+e.indent),s.component.isVisible()&&i.classList.add("tabulator-group-visible"),this.mapElementStyles(o.firstGroup,i,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),this.mapElementStyles(o.firstGroup,n,["padding-top","padding-left","padding-right","padding-bottom"]),i.appendChild(n),i},L.prototype.genereateCalcElement=function(e,t,o){var i=this.genereateRowElement(e,t,o);return i.classList.add("tabulator-print-table-calcs"),this.mapElementStyles(o.calcRow,i,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),i},L.prototype.genereateRowElement=function(e,t,o){var n=this,s=document.createElement("tr");return s.classList.add("tabulator-print-table-row"),e.columns.forEach(function(a){if(a){var r=document.createElement("td"),l=a.component._column,c=a.value,u={modules:{},getValue:function(){return c},getField:function(){return l.definition.field},getElement:function(){return r},getColumn:function(){return l.getComponent()},getData:function(){return e.component.getData()},getRow:function(){return e.component},getComponent:function(){return u},column:l};if((l.definition.cssClass?l.definition.cssClass.split(" "):[]).forEach(function(e){r.classList.add(e)}),n.table.modExists("format")&&!1!==n.config.formatCells)c=n.table.modules.format.formatExportValue(u,n.colVisProp);else switch(void 0===c?"undefined":_typeof(c)){case"object":c=JSON.stringify(c);break;case"undefined":case"null":c="";break;default:c=c}c instanceof Node?r.appendChild(c):r.innerHTML=c,o.firstCell&&(n.mapElementStyles(o.firstCell,r,["padding-top","padding-left","padding-right","padding-bottom","border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size"]),l.definition.align&&(r.style.textAlign=l.definition.align)),n.table.options.dataTree&&!1!==n.config.dataTree&&(t.treeElementField&&t.treeElementField==l.field||!t.treeElementField&&0==i)&&(e.component._row.modules.dataTree.controlEl&&r.insertBefore(e.component._row.modules.dataTree.controlEl.cloneNode(!0),r.firstChild),e.component._row.modules.dataTree.branchEl&&r.insertBefore(e.component._row.modules.dataTree.branchEl.cloneNode(!0),r.firstChild)),s.appendChild(r),u.modules.format&&u.modules.format.renderedCallback&&u.modules.format.renderedCallback(),t.rowFormatter&&!1!==n.config.formatCells&&t.rowFormatter(e.component)}}),s},L.prototype.genereateHTMLTable=function(e){var t=document.createElement("div");return t.appendChild(this.genereateTableElement(e)),t.innerHTML},L.prototype.getHtml=function(e,t,o,i){var n=this.generateExportList(o||this.table.options.htmlOutputConfig,t,e,i||"htmlOutput");return this.genereateHTMLTable(n)},L.prototype.mapElementStyles=function(e,t,o){if(this.cloneTableStyle&&e&&t){var i={"background-color":"backgroundColor",color:"fontColor",width:"width","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","text-align":"textAlign","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom","padding-top":"paddingTop","padding-left":"paddingLeft","padding-right":"paddingRight","padding-bottom":"paddingBottom"};if(window.getComputedStyle){var n=window.getComputedStyle(e);o.forEach(function(e){t.style[i[e]]=n.getPropertyValue(e)})}}},h.prototype.registerModule("export",L);var D=function(e){this.table=e,this.filterList=[],this.headerFilters={},this.headerFilterColumns=[],this.prevHeaderFilterChangeCheck="",this.prevHeaderFilterChangeCheck="{}",this.changed=!1};D.prototype.initializeColumn=function(e,t){function o(t){var o,a="input"==e.modules.filter.tagType&&"text"==e.modules.filter.attrType||"textarea"==e.modules.filter.tagType?"partial":"match",r="",l="";if(void 0===e.modules.filter.prevSuccess||e.modules.filter.prevSuccess!==t){if(e.modules.filter.prevSuccess=t,e.modules.filter.emptyFunc(t))delete n.headerFilters[s];else{switch(e.modules.filter.value=t,_typeof(e.definition.headerFilterFunc)){case"string":n.filters[e.definition.headerFilterFunc]?(r=e.definition.headerFilterFunc,o=function(o){var i=e.definition.headerFilterFuncParams||{},s=e.getFieldValue(o);return i="function"==typeof i?i(t,s,o):i,n.filters[e.definition.headerFilterFunc](t,s,o,i)}):console.warn("Header Filter Error - Matching filter function not found: ",e.definition.headerFilterFunc);break;case"function":o=function(o){var i=e.definition.headerFilterFuncParams||{},n=e.getFieldValue(o);return i="function"==typeof i?i(t,n,o):i,e.definition.headerFilterFunc(t,n,o,i)},r=o}if(!o)switch(a){case"partial":o=function(o){var i=e.getFieldValue(o);return void 0!==i&&null!==i&&String(i).toLowerCase().indexOf(String(t).toLowerCase())>-1},r="like";break;default:o=function(o){return e.getFieldValue(o)==t},r="="}n.headerFilters[s]={value:t,func:o,
+type:r,params:i||{}}}l=JSON.stringify(n.headerFilters),n.prevHeaderFilterChangeCheck!==l&&(n.prevHeaderFilterChangeCheck=l,n.changed=!0,n.table.rowManager.filterRefresh())}return!0}var i,n=this,s=e.getField();e.modules.filter={success:o,attrType:!1,tagType:!1,emptyFunc:!1},this.generateHeaderFilterElement(e)},D.prototype.generateHeaderFilterElement=function(e,t,o){function i(){}var n,s,a,r,l,c,u,d=this,h=this,p=e.modules.filter.success,m=e.getField();if(e.modules.filter.headerElement&&e.modules.filter.headerElement.parentNode&&e.contentElement.removeChild(e.modules.filter.headerElement.parentNode),m){switch(e.modules.filter.emptyFunc=e.definition.headerFilterEmptyCheck||function(e){return!e&&"0"!==e&&0!==e},n=document.createElement("div"),n.classList.add("tabulator-header-filter"),_typeof(e.definition.headerFilter)){case"string":h.table.modules.edit.editors[e.definition.headerFilter]?(s=h.table.modules.edit.editors[e.definition.headerFilter],"tick"!==e.definition.headerFilter&&"tickCross"!==e.definition.headerFilter||e.definition.headerFilterEmptyCheck||(e.modules.filter.emptyFunc=function(e){return!0!==e&&!1!==e})):console.warn("Filter Error - Cannot build header filter, No such editor found: ",e.definition.editor);break;case"function":s=e.definition.headerFilter;break;case"boolean":e.modules.edit&&e.modules.edit.editor?s=e.modules.edit.editor:e.definition.formatter&&h.table.modules.edit.editors[e.definition.formatter]?(s=h.table.modules.edit.editors[e.definition.formatter],"tick"!==e.definition.formatter&&"tickCross"!==e.definition.formatter||e.definition.headerFilterEmptyCheck||(e.modules.filter.emptyFunc=function(e){return!0!==e&&!1!==e})):s=h.table.modules.edit.editors.input}if(s){if(r={getValue:function(){return void 0!==t?t:""},getField:function(){return e.definition.field},getElement:function(){return n},getColumn:function(){return e.getComponent()},getRow:function(){return{normalizeHeight:function(){}}}},u=e.definition.headerFilterParams||{},u="function"==typeof u?u.call(h.table):u,!(a=s.call(this.table.modules.edit,r,function(){},p,i,u)))return void console.warn("Filter Error - Cannot add filter to "+m+" column, editor returned a value of false");if(!(a instanceof Node))return void console.warn("Filter Error - Cannot add filter to "+m+" column, editor should return an instance of Node, the editor returned:",a);m?h.table.modules.localize.bind("headerFilters|columns|"+e.definition.field,function(e){a.setAttribute("placeholder",void 0!==e&&e?e:h.table.modules.localize.getText("headerFilters|default"))}):h.table.modules.localize.bind("headerFilters|default",function(e){a.setAttribute("placeholder",void 0!==h.column.definition.headerFilterPlaceholder&&h.column.definition.headerFilterPlaceholder?h.column.definition.headerFilterPlaceholder:e)}),a.addEventListener("click",function(e){e.stopPropagation(),a.focus()}),a.addEventListener("focus",function(e){var t=d.table.columnManager.element.scrollLeft;t!==d.table.rowManager.element.scrollLeft&&(d.table.rowManager.scrollHorizontal(t),d.table.columnManager.scrollHorizontal(t))}),l=!1,c=function(e){l&&clearTimeout(l),l=setTimeout(function(){p(a.value)},h.table.options.headerFilterLiveFilterDelay)},e.modules.filter.headerElement=a,e.modules.filter.attrType=a.hasAttribute("type")?a.getAttribute("type").toLowerCase():"",e.modules.filter.tagType=a.tagName.toLowerCase(),!1!==e.definition.headerFilterLiveFilter&&("autocomplete"!==e.definition.headerFilter&&"tickCross"!==e.definition.headerFilter&&("autocomplete"!==e.definition.editor&&"tickCross"!==e.definition.editor||!0!==e.definition.headerFilter)&&(a.addEventListener("keyup",c),a.addEventListener("search",c),"number"==e.modules.filter.attrType&&a.addEventListener("change",function(e){p(a.value)}),"text"==e.modules.filter.attrType&&"ie"!==this.table.browser&&a.setAttribute("type","search")),"input"!=e.modules.filter.tagType&&"select"!=e.modules.filter.tagType&&"textarea"!=e.modules.filter.tagType||a.addEventListener("mousedown",function(e){e.stopPropagation()})),n.appendChild(a),e.contentElement.appendChild(n),o||h.headerFilterColumns.push(e)}}else console.warn("Filter Error - Cannot add header filter, column has no field set:",e.definition.title)},D.prototype.hideHeaderFilterElements=function(){this.headerFilterColumns.forEach(function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="none")})},D.prototype.showHeaderFilterElements=function(){this.headerFilterColumns.forEach(function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="")})},D.prototype.setHeaderFilterFocus=function(e){e.modules.filter&&e.modules.filter.headerElement?e.modules.filter.headerElement.focus():console.warn("Column Filter Focus Error - No header filter set on column:",e.getField())},D.prototype.getHeaderFilterValue=function(e){if(e.modules.filter&&e.modules.filter.headerElement)return e.modules.filter.headerElement.value;console.warn("Column Filter Error - No header filter set on column:",e.getField())},D.prototype.setHeaderFilterValue=function(e,t){e&&(e.modules.filter&&e.modules.filter.headerElement?(this.generateHeaderFilterElement(e,t,!0),e.modules.filter.success(t)):console.warn("Column Filter Error - No header filter set on column:",e.getField()))},D.prototype.reloadHeaderFilter=function(e){e&&(e.modules.filter&&e.modules.filter.headerElement?this.generateHeaderFilterElement(e,e.modules.filter.value,!0):console.warn("Column Filter Error - No header filter set on column:",e.getField()))},D.prototype.hasChanged=function(){var e=this.changed;return this.changed=!1,e},D.prototype.setFilter=function(e,t,o,i){var n=this;n.filterList=[],Array.isArray(e)||(e=[{field:e,type:t,value:o,params:i}]),n.addFilter(e)},D.prototype.addFilter=function(e,t,o,i){var n=this;Array.isArray(e)||(e=[{field:e,type:t,value:o,params:i}]),e.forEach(function(e){(e=n.findFilter(e))&&(n.filterList.push(e),n.changed=!0)}),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},D.prototype.findFilter=function(e){var t,o=this;if(Array.isArray(e))return this.findSubFilters(e);var i=!1;return"function"==typeof e.field?i=function(t){return e.field(t,e.type||{})}:o.filters[e.type]?(t=o.table.columnManager.getColumnByField(e.field),i=t?function(i){return o.filters[e.type](e.value,t.getFieldValue(i),i,e.params||{})}:function(t){return o.filters[e.type](e.value,t[e.field],t,e.params||{})}):console.warn("Filter Error - No such filter type found, ignoring: ",e.type),e.func=i,!!e.func&&e},D.prototype.findSubFilters=function(e){var t=this,o=[];return e.forEach(function(e){(e=t.findFilter(e))&&o.push(e)}),!!o.length&&o},D.prototype.getFilters=function(e,t){var o=[];return e&&(o=this.getHeaderFilters()),t&&o.forEach(function(e){"function"==typeof e.type&&(e.type="function")}),o=o.concat(this.filtersToArray(this.filterList,t))},D.prototype.filtersToArray=function(e,t){var o=this,i=[];return e.forEach(function(e){var n;Array.isArray(e)?i.push(o.filtersToArray(e,t)):(n={field:e.field,type:e.type,value:e.value},t&&"function"==typeof n.type&&(n.type="function"),i.push(n))}),i},D.prototype.getHeaderFilters=function(){var e=[];for(var t in this.headerFilters)e.push({field:t,type:this.headerFilters[t].type,value:this.headerFilters[t].value});return e},D.prototype.removeFilter=function(e,t,o){var i=this;Array.isArray(e)||(e=[{field:e,type:t,value:o}]),e.forEach(function(e){var t=-1;t="object"==_typeof(e.field)?i.filterList.findIndex(function(t){return e===t}):i.filterList.findIndex(function(t){return e.field===t.field&&e.type===t.type&&e.value===t.value}),t>-1?(i.filterList.splice(t,1),i.changed=!0):console.warn("Filter Error - No matching filter type found, ignoring: ",e.type)}),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},D.prototype.clearFilter=function(e){this.filterList=[],e&&this.clearHeaderFilter(),this.changed=!0,this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.filter&&this.table.modules.persistence.save("filter")},D.prototype.clearHeaderFilter=function(){var e=this;this.headerFilters={},e.prevHeaderFilterChangeCheck="{}",this.headerFilterColumns.forEach(function(t){void 0!==t.modules.filter.value&&delete t.modules.filter.value,t.modules.filter.prevSuccess=void 0,e.reloadHeaderFilter(t)}),this.changed=!0},D.prototype.search=function(e,t,o,i){var n=this,s=[],a=[];return Array.isArray(t)||(t=[{field:t,type:o,value:i}]),t.forEach(function(e){(e=n.findFilter(e))&&a.push(e)}),this.table.rowManager.rows.forEach(function(t){var o=!0;a.forEach(function(e){n.filterRecurse(e,t.getData())||(o=!1)}),o&&s.push("data"===e?t.getData("data"):t.getComponent())}),s},D.prototype.filter=function(e,t){var o=this,i=[],n=[];return o.table.options.dataFiltering&&o.table.options.dataFiltering.call(o.table,o.getFilters()),o.table.options.ajaxFiltering||!o.filterList.length&&!Object.keys(o.headerFilters).length?i=e.slice(0):e.forEach(function(e){o.filterRow(e)&&i.push(e)}),o.table.options.dataFiltered&&(i.forEach(function(e){n.push(e.getComponent())}),o.table.options.dataFiltered.call(o.table,o.getFilters(),n)),i},D.prototype.filterRow=function(e,t){var o=this,i=!0,n=e.getData();o.filterList.forEach(function(e){o.filterRecurse(e,n)||(i=!1)});for(var s in o.headerFilters)o.headerFilters[s].func(n)||(i=!1);return i},D.prototype.filterRecurse=function(e,t){var o=this,i=!1;return Array.isArray(e)?e.forEach(function(e){o.filterRecurse(e,t)&&(i=!0)}):i=e.func(t),i},D.prototype.filters={"=":function(e,t,o,i){return t==e},"<":function(e,t,o,i){return t<e},"<=":function(e,t,o,i){return t<=e},">":function(e,t,o,i){return t>e},">=":function(e,t,o,i){return t>=e},"!=":function(e,t,o,i){return t!=e},regex:function(e,t,o,i){return"string"==typeof e&&(e=new RegExp(e)),e.test(t)},like:function(e,t,o,i){return null===e||void 0===e?t===e:void 0!==t&&null!==t&&String(t).toLowerCase().indexOf(e.toLowerCase())>-1},keywords:function(e,t,o,i){var n=e.toLowerCase().split(void 0===i.separator?" ":i.separator),s=String(null===t||void 0===t?"":t).toLowerCase(),a=[];return n.forEach(function(e){s.includes(e)&&a.push(!0)}),i.matchAll?a.length===n.length:!!a.length},starts:function(e,t,o,i){return null===e||void 0===e?t===e:void 0!==t&&null!==t&&String(t).toLowerCase().startsWith(e.toLowerCase())},ends:function(e,t,o,i){return null===e||void 0===e?t===e:void 0!==t&&null!==t&&String(t).toLowerCase().endsWith(e.toLowerCase())},in:function(e,t,o,i){return Array.isArray(e)?!e.length||e.indexOf(t)>-1:(console.warn("Filter Error - filter value is not an array:",e),!1)}},h.prototype.registerModule("filter",D);var T=function(e){this.table=e};T.prototype.initializeColumn=function(e){e.modules.format=this.lookupFormatter(e,""),void 0!==e.definition.formatterPrint&&(e.modules.format.print=this.lookupFormatter(e,"Print")),void 0!==e.definition.formatterClipboard&&(e.modules.format.clipboard=this.lookupFormatter(e,"Clipboard")),void 0!==e.definition.formatterHtmlOutput&&(e.modules.format.htmlOutput=this.lookupFormatter(e,"HtmlOutput"))},T.prototype.lookupFormatter=function(e,t){var o={params:e.definition["formatter"+t+"Params"]||{}},i=e.definition["formatter"+t];switch(void 0===i?"undefined":_typeof(i)){case"string":"tick"===i&&(i="tickCross",void 0===o.params.crossElement&&(o.params.crossElement=!1),console.warn("DEPRECATION WARNING - the tick formatter has been deprecated, please use the tickCross formatter with the crossElement param set to false")),this.formatters[i]?o.formatter=this.formatters[i]:(console.warn("Formatter Error - No such formatter found: ",i),o.formatter=this.formatters.plaintext);break;case"function":o.formatter=i;break;default:o.formatter=this.formatters.plaintext}return o},T.prototype.cellRendered=function(e){e.modules.format&&e.modules.format.renderedCallback&&!e.modules.format.rendered&&(e.modules.format.renderedCallback(),e.modules.format.rendered=!0)},T.prototype.formatValue=function(e){function t(t){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=t,e.modules.format.rendered=!1}var o=e.getComponent(),i="function"==typeof e.column.modules.format.params?e.column.modules.format.params(o):e.column.modules.format.params;return e.column.modules.format.formatter.call(this,o,i,t)},T.prototype.formatExportValue=function(e,t){var o,i=e.column.modules.format[t];if(i){var n=function(t){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=t,e.modules.format.rendered=!1};return o="function"==typeof i.params?i.params(component):i.params,i.formatter.call(this,e.getComponent(),o,n)}return this.formatValue(e)},T.prototype.sanitizeHTML=function(e){if(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(e).replace(/[&<>"'`=\/]/g,function(e){return t[e]})}return e},T.prototype.emptyToSpace=function(e){return null===e||void 0===e||""===e?" ":e},T.prototype.getFormatter=function(e){var e;switch(void 0===e?"undefined":_typeof(e)){case"string":this.formatters[e]?e=this.formatters[e]:(console.warn("Formatter Error - No such formatter found: ",e),e=this.formatters.plaintext);break;case"function":e=e;break;default:e=this.formatters.plaintext}return e},T.prototype.formatters={plaintext:function(e,t,o){return this.emptyToSpace(this.sanitizeHTML(e.getValue()))},html:function(e,t,o){return e.getValue()},textarea:function(e,t,o){return e.getElement().style.whiteSpace="pre-wrap",this.emptyToSpace(this.sanitizeHTML(e.getValue()))},money:function(e,t,o){var i,n,s,a,r=parseFloat(e.getValue()),l=t.decimal||".",c=t.thousand||",",u=t.symbol||"",d=!!t.symbolAfter,h=void 0!==t.precision?t.precision:2;if(isNaN(r))return this.emptyToSpace(this.sanitizeHTML(e.getValue()));for(i=!1!==h?r.toFixed(h):r,i=String(i).split("."),n=i[0],s=i.length>1?l+i[1]:"",a=/(\d+)(\d{3})/;a.test(n);)n=n.replace(a,"$1"+c+"$2");return d?n+s+u:u+n+s},link:function(e,t,o){var i,n=e.getValue(),s=t.urlPrefix||"",a=t.download,r=n,l=document.createElement("a");if(t.labelField&&(i=e.getData(),r=i[t.labelField]),t.label)switch(_typeof(t.label)){case"string":r=t.label;break;case"function":r=t.label(e)}if(r){if(t.urlField&&(i=e.getData(),n=i[t.urlField]),t.url)switch(_typeof(t.url)){case"string":n=t.url;break;case"function":n=t.url(e)}return l.setAttribute("href",s+n),t.target&&l.setAttribute("target",t.target),t.download&&(a="function"==typeof a?a(e):!0===a?"":a,l.setAttribute("download",a)),l.innerHTML=this.emptyToSpace(this.sanitizeHTML(r)),l}return" "},image:function(e,t,o){var i=document.createElement("img"),n=e.getValue();switch(t.urlPrefix&&(n=t.urlPrefix+e.getValue()),t.urlSuffix&&(n+=t.urlSuffix),i.setAttribute("src",n),_typeof(t.height)){case"number":i.style.height=t.height+"px";break;case"string":i.style.height=t.height}switch(_typeof(t.width)){case"number":i.style.width=t.width+"px";break;case"string":i.style.width=t.width}return i.addEventListener("load",function(){e.getRow().normalizeHeight()}),i},tickCross:function(e,t,o){var i=e.getValue(),n=e.getElement(),s=t.allowEmpty,a=t.allowTruthy,r=void 0!==t.tickElement?t.tickElement:'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#2DC214" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/></svg>',l=void 0!==t.crossElement?t.crossElement:'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#CE1515" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/></svg>';return a&&i||!0===i||"true"===i||"True"===i||1===i||"1"===i?(n.setAttribute("aria-checked",!0),r||""):!s||"null"!==i&&""!==i&&null!==i&&void 0!==i?(n.setAttribute("aria-checked",!1),l||""):(n.setAttribute("aria-checked","mixed"),"")},datetime:function(e,t,o){var i=t.inputFormat||"YYYY-MM-DD hh:mm:ss",n=t.outputFormat||"DD/MM/YYYY hh:mm:ss",s=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",a=e.getValue(),r=moment(a,i);return r.isValid()?t.timezone?r.tz(t.timezone).format(n):r.format(n):!0===s?a:"function"==typeof s?s(a):s},datetimediff:function(e,t,o){var i=t.inputFormat||"YYYY-MM-DD hh:mm:ss",n=void 0!==t.invalidPlaceholder?t.invalidPlaceholder:"",s=void 0!==t.suffix&&t.suffix,a=void 0!==t.unit?t.unit:void 0,r=void 0!==t.humanize&&t.humanize,l=void 0!==t.date?t.date:moment(),c=e.getValue(),u=moment(c,i);return u.isValid()?r?moment.duration(u.diff(l)).humanize(s):u.diff(l,a)+(s?" "+s:""):!0===n?c:"function"==typeof n?n(c):n},lookup:function(e,t,o){var i=e.getValue();return void 0===t[i]?(console.warn("Missing display value for "+i),i):t[i]},star:function(e,t,o){var i=e.getValue(),n=e.getElement(),s=t&&t.stars?t.stars:5,a=document.createElement("span"),r=document.createElementNS("http://www.w3.org/2000/svg","svg");a.style.verticalAlign="middle",r.setAttribute("width","14"),r.setAttribute("height","14"),r.setAttribute("viewBox","0 0 512 512"),r.setAttribute("xml:space","preserve"),r.style.padding="0 1px",i=i&&!isNaN(i)?parseInt(i):0,i=Math.max(0,Math.min(i,s));for(var l=1;l<=s;l++){var c=r.cloneNode(!0);c.innerHTML=l<=i?'<polygon fill="#FFEA00" stroke="#C1AB60" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>':'<polygon fill="#D2D2D2" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>',a.appendChild(c)}return n.style.whiteSpace="nowrap",n.style.overflow="hidden",n.style.textOverflow="ellipsis",n.setAttribute("aria-label",i),a},traffic:function(e,t,o){var i,n,s=this.sanitizeHTML(e.getValue())||0,a=document.createElement("span"),r=t&&t.max?t.max:100,l=t&&t.min?t.min:0,c=t&&void 0!==t.color?t.color:["red","orange","green"],u="#666666";if(!isNaN(s)&&void 0!==e.getValue()){switch(a.classList.add("tabulator-traffic-light"),n=parseFloat(s)<=r?parseFloat(s):r,n=parseFloat(n)>=l?parseFloat(n):l,i=(r-l)/100,n=Math.round((n-l)/i),void 0===c?"undefined":_typeof(c)){case"string":u=c;break;case"function":u=c(s);break;case"object":if(Array.isArray(c)){var d=100/c.length,h=Math.floor(n/d);h=Math.min(h,c.length-1),h=Math.max(h,0),u=c[h];break}}return a.style.backgroundColor=u,a}},progress:function(e,t,o){var i,n,s,a,r,l=this.sanitizeHTML(e.getValue())||0,u=e.getElement(),d=t&&t.max?t.max:100,h=t&&t.min?t.min:0,p=t&&t.legendAlign?t.legendAlign:"center";switch(n=parseFloat(l)<=d?parseFloat(l):d,n=parseFloat(n)>=h?parseFloat(n):h,i=(d-h)/100,n=Math.round((n-h)/i),_typeof(t.color)){case"string":s=t.color;break;case"function":s=t.color(l);break;case"object":if(Array.isArray(t.color)){var m=100/t.color.length,f=Math.floor(n/m);f=Math.min(f,t.color.length-1),f=Math.max(f,0),s=t.color[f];break}default:s="#2DC214"}switch(_typeof(t.legend)){case"string":a=t.legend;break;case"function":a=t.legend(l);break;case"boolean":a=l;break;default:a=!1}switch(_typeof(t.legendColor)){case"string":r=t.legendColor;break;case"function":r=t.legendColor(l);break;case"object":if(Array.isArray(t.legendColor)){var m=100/t.legendColor.length,f=Math.floor(n/m);f=Math.min(f,t.legendColor.length-1),f=Math.max(f,0),r=t.legendColor[f]}break;default:r="#000"}u.style.minWidth="30px",u.style.position="relative",u.setAttribute("aria-label",n);var g=document.createElement("div");if(g.style.display="inline-block",g.style.position="relative",g.style.width=n+"%",g.style.backgroundColor=s,g.style.height="100%",g.setAttribute("data-max",d),g.setAttribute("data-min",h),a){var b=document.createElement("div");b.style.position="absolute",b.style.top="4px",b.style.left=0,b.style.textAlign=p,b.style.width="100%",b.style.color=r,b.innerHTML=a}return o(function(){if(!(e instanceof c)){var t=document.createElement("div");t.style.position="absolute",t.style.top="4px",t.style.bottom="4px",t.style.left="4px",t.style.right="4px",u.appendChild(t),u=t}u.appendChild(g),a&&u.appendChild(b)}),""},color:function(e,t,o){return e.getElement().style.backgroundColor=this.sanitizeHTML(e.getValue()),""},buttonTick:function(e,t,o){return'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#2DC214" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/></svg>'},buttonCross:function(e,t,o){return'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#CE1515" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/></svg>'},rownum:function(e,t,o){return this.table.rowManager.activeRows.indexOf(e.getRow()._getSelf())+1},handle:function(e,t,o){return e.getElement().classList.add("tabulator-row-handle"),"<div class='tabulator-row-handle-box'><div class='tabulator-row-handle-bar'></div><div class='tabulator-row-handle-bar'></div><div class='tabulator-row-handle-bar'></div></div>"},responsiveCollapse:function(e,t,o){function i(e){var t=s.element;s.open=e,t&&(s.open?(n.classList.add("open"),t.style.display=""):(n.classList.remove("open"),t.style.display="none"))}var n=document.createElement("div"),s=e.getRow()._row.modules.responsiveLayout;return n.classList.add("tabulator-responsive-collapse-toggle"),n.innerHTML="<span class='tabulator-responsive-collapse-toggle-open'>+</span><span class='tabulator-responsive-collapse-toggle-close'>-</span>",e.getElement().classList.add("tabulator-row-handle"),n.addEventListener("click",function(e){e.stopImmediatePropagation(),i(!s.open)}),i(s.open),n},rowSelection:function(e,t,o){var i=this,n=document.createElement("input");if(n.type="checkbox",this.table.modExists("selectRow",!0))if(n.addEventListener("click",function(e){e.stopPropagation()}),"function"==typeof e.getRow){var s=e.getRow();s instanceof r?(n.addEventListener("change",function(e){s.toggleSelect()}),n.checked=s.isSelected&&s.isSelected(),this.table.modules.selectRow.registerRowSelectCheckbox(s,n)):n=""}else n.addEventListener("change",function(e){i.table.modules.selectRow.selectedRows.length?i.table.deselectRow():i.table.selectRow(t.rowRange)}),this.table.modules.selectRow.registerHeaderSelectCheckbox(n);return n}},h.prototype.registerModule("format",T);var k=function(e){this.table=e,this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.rightPadding=0,this.initializationMode="left",this.active=!1,this.scrollEndTimer=!1};k.prototype.reset=function(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.leftMargin=0,this.rightMargin=0,this.rightMargin=0,this.active=!1,this.table.columnManager.headersElement.style.marginLeft=0,this.table.columnManager.element.style.paddingRight=0},k.prototype.initializeColumn=function(e){var t={margin:0,edge:!1};e.isGroup||(this.frozenCheck(e)?(t.position=this.initializationMode,"left"==this.initializationMode?this.leftColumns.push(e):this.rightColumns.unshift(e),this.active=!0,e.modules.frozen=t):this.initializationMode="right")},k.prototype.frozenCheck=function(e){return e.parent.isGroup&&e.definition.frozen&&console.warn("Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups"),e.parent.isGroup?this.frozenCheck(e.parent):e.definition.frozen},k.prototype.scrollHorizontal=function(){var e,t=this;this.active&&(clearTimeout(this.scrollEndTimer),this.scrollEndTimer=setTimeout(function(){t.layout()},100),e=this.table.rowManager.getVisibleRows(),this.calcMargins(),this.layoutColumnPosition(),this.layoutCalcRows(),e.forEach(function(e){"row"===e.type&&t.layoutRow(e)}),this.table.rowManager.tableElement.style.marginRight=this.rightMargin)},k.prototype.calcMargins=function(){this.leftMargin=this._calcSpace(this.leftColumns,this.leftColumns.length)+"px",this.table.columnManager.headersElement.style.marginLeft=this.leftMargin,this.rightMargin=this._calcSpace(this.rightColumns,this.rightColumns.length)+"px",this.table.columnManager.element.style.paddingRight=this.rightMargin,this.rightPadding=this.table.rowManager.element.clientWidth+this.table.columnManager.scrollLeft},k.prototype.layoutCalcRows=function(){this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&this.table.modules.columnCalcs.topRow&&this.layoutRow(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&this.table.modules.columnCalcs.botRow&&this.layoutRow(this.table.modules.columnCalcs.botRow))},k.prototype.layoutColumnPosition=function(e){var t=this,o=[];this.leftColumns.forEach(function(i,n){if(i.modules.frozen.margin=t._calcSpace(t.leftColumns,n)+t.table.columnManager.scrollLeft+"px",n==t.leftColumns.length-1?i.modules.frozen.edge=!0:i.modules.frozen.edge=!1,i.parent.isGroup){var s=t.getColGroupParentElement(i);o.includes(s)||(t.layoutElement(s,i),o.push(s)),i.modules.frozen.edge&&s.classList.add("tabulator-frozen-"+i.modules.frozen.position)}else t.layoutElement(i.getElement(),i);e&&i.cells.forEach(function(e){t.layoutElement(e.getElement(!0),i)})}),this.rightColumns.forEach(function(o,i){o.modules.frozen.margin=t.rightPadding-t._calcSpace(t.rightColumns,i+1)+"px",i==t.rightColumns.length-1?o.modules.frozen.edge=!0:o.modules.frozen.edge=!1,o.parent.isGroup?t.layoutElement(t.getColGroupParentElement(o),o):t.layoutElement(o.getElement(),o),e&&o.cells.forEach(function(e){t.layoutElement(e.getElement(!0),o)})})},k.prototype.getColGroupParentElement=function(e){return e.parent.isGroup?this.getColGroupParentElement(e.parent):e.getElement()},k.prototype.layout=function(){var e=this;e.active&&(this.calcMargins(),e.table.rowManager.getDisplayRows().forEach(function(t){"row"===t.type&&e.layoutRow(t)}),this.layoutCalcRows(),this.layoutColumnPosition(!0),this.table.rowManager.tableElement.style.marginRight=this.rightMargin)},k.prototype.layoutRow=function(e){var t=this;e.getElement().style.paddingLeft=this.leftMargin,this.leftColumns.forEach(function(o){var i=e.getCell(o);i&&t.layoutElement(i.getElement(!0),o)}),this.rightColumns.forEach(function(o){var i=e.getCell(o);i&&t.layoutElement(i.getElement(!0),o)})},k.prototype.layoutElement=function(e,t){t.modules.frozen&&(e.style.position="absolute",e.style.left=t.modules.frozen.margin,e.classList.add("tabulator-frozen"),t.modules.frozen.edge&&e.classList.add("tabulator-frozen-"+t.modules.frozen.position))},k.prototype._calcSpace=function(e,t){for(var o=0,i=0;i<t;i++)e[i].visible&&(o+=e[i].getWidth());return o},h.prototype.registerModule("frozenColumns",k);var z=function(e){this.table=e,this.topElement=document.createElement("div"),this.rows=[],this.displayIndex=0};z.prototype.initialize=function(){this.rows=[],this.topElement.classList.add("tabulator-frozen-rows-holder"),this.table.columnManager.getElement().insertBefore(this.topElement,this.table.columnManager.headersElement.nextSibling)},z.prototype.setDisplayIndex=function(e){this.displayIndex=e},z.prototype.getDisplayIndex=function(){return this.displayIndex},z.prototype.isFrozen=function(){return!!this.rows.length},z.prototype.getRows=function(e){var t=e.slice(0);return this.rows.forEach(function(e){var o=t.indexOf(e);o>-1&&t.splice(o,1)}),t},z.prototype.freezeRow=function(e){e.modules.frozen?console.warn("Freeze Error - Row is already frozen"):(e.modules.frozen=!0,this.topElement.appendChild(e.getElement()),e.initialize(),e.normalizeHeight(),this.table.rowManager.adjustTableSize(),this.rows.push(e),this.table.rowManager.refreshActiveData("display"),this.styleRows())},z.prototype.unfreezeRow=function(e){this.rows.indexOf(e);e.modules.frozen?(e.modules.frozen=!1,this.detachRow(e),this.table.rowManager.adjustTableSize(),this.table.rowManager.refreshActiveData("display"),this.rows.length&&this.styleRows()):console.warn("Freeze Error - Row is already unfrozen")},z.prototype.detachRow=function(e){var t=this.rows.indexOf(e);if(t>-1){var o=e.getElement();o.parentNode.removeChild(o),this.rows.splice(t,1)}},z.prototype.styleRows=function(e){var t=this;this.rows.forEach(function(e,o){t.table.rowManager.styleRow(e,o)})},h.prototype.registerModule("frozenRows",z);var S=function(e){this._group=e,this.type="GroupComponent"};S.prototype.getKey=function(){return this._group.key},S.prototype.getField=function(){return this._group.field},S.prototype.getElement=function(){return this._group.element},S.prototype.getRows=function(){return this._group.getRows(!0)},S.prototype.getSubGroups=function(){return this._group.getSubGroups(!0)},S.prototype.getParentGroup=function(){return!!this._group.parent&&this._group.parent.getComponent()},S.prototype.getVisibility=function(){return console.warn("getVisibility function is deprecated, you should now use the isVisible function"),this._group.visible},S.prototype.isVisible=function(){return this._group.visible},S.prototype.show=function(){this._group.show()},S.prototype.hide=function(){this._group.hide()},S.prototype.toggle=function(){this._group.toggleVisibility()},S.prototype._getSelf=function(){return this._group},S.prototype.getTable=function(){return this._group.groupManager.table};var H=function(e,t,o,i,n,s,a){this.groupManager=e,this.parent=t,this.key=i,this.level=o,this.field=n,this.hasSubGroups=o<e.groupIDLookups.length-1,this.addRow=this.hasSubGroups?this._addRowToGroup:this._addRow,this.type="group",this.old=a,this.rows=[],this.groups=[],this.groupList=[],this.generator=s,this.elementContents=!1,this.height=0,this.outerHeight=0,this.initialized=!1,this.calcs={},this.initialized=!1,this.modules={},this.arrowElement=!1,this.visible=a?a.visible:void 0!==e.startOpen[o]?e.startOpen[o]:e.startOpen[0],this.component=null,this.createElements(),this.addBindings(),this.createValueGroups()};H.prototype.wipe=function(){this.groupList.length?this.groupList.forEach(function(e){e.wipe()}):(this.element=!1,this.arrowElement=!1,this.elementContents=!1)
+},H.prototype.createElements=function(){var e=document.createElement("div");e.classList.add("tabulator-arrow"),this.element=document.createElement("div"),this.element.classList.add("tabulator-row"),this.element.classList.add("tabulator-group"),this.element.classList.add("tabulator-group-level-"+this.level),this.element.setAttribute("role","rowgroup"),this.arrowElement=document.createElement("div"),this.arrowElement.classList.add("tabulator-group-toggle"),this.arrowElement.appendChild(e),!1!==this.groupManager.table.options.movableRows&&this.groupManager.table.modExists("moveRow")&&this.groupManager.table.modules.moveRow.initializeGroupHeader(this)},H.prototype.createValueGroups=function(){var e=this,t=this.level+1;this.groupManager.allowedValues&&this.groupManager.allowedValues[t]&&this.groupManager.allowedValues[t].forEach(function(o){e._createGroup(o,t)})},H.prototype.addBindings=function(){var e,t,o,i,n=this;n.groupManager.table.options.groupClick&&n.element.addEventListener("click",function(e){n.groupManager.table.options.groupClick.call(n.groupManager.table,e,n.getComponent())}),n.groupManager.table.options.groupDblClick&&n.element.addEventListener("dblclick",function(e){n.groupManager.table.options.groupDblClick.call(n.groupManager.table,e,n.getComponent())}),n.groupManager.table.options.groupContext&&n.element.addEventListener("contextmenu",function(e){n.groupManager.table.options.groupContext.call(n.groupManager.table,e,n.getComponent())}),(n.groupManager.table.options.groupContextMenu||n.groupManager.table.options.groupClickMenu)&&n.groupManager.table.modExists("menu")&&n.groupManager.table.modules.menu.initializeGroup.call(n.groupManager.table.modules.menu,n),n.groupManager.table.options.groupTap&&(o=!1,n.element.addEventListener("touchstart",function(e){o=!0},{passive:!0}),n.element.addEventListener("touchend",function(e){o&&n.groupManager.table.options.groupTap(e,n.getComponent()),o=!1})),n.groupManager.table.options.groupDblTap&&(e=null,n.element.addEventListener("touchend",function(t){e?(clearTimeout(e),e=null,n.groupManager.table.options.groupDblTap(t,n.getComponent())):e=setTimeout(function(){clearTimeout(e),e=null},300)})),n.groupManager.table.options.groupTapHold&&(t=null,n.element.addEventListener("touchstart",function(e){clearTimeout(t),t=setTimeout(function(){clearTimeout(t),t=null,o=!1,n.groupManager.table.options.groupTapHold(e,n.getComponent())},1e3)},{passive:!0}),n.element.addEventListener("touchend",function(e){clearTimeout(t),t=null})),n.groupManager.table.options.groupToggleElement&&(i="arrow"==n.groupManager.table.options.groupToggleElement?n.arrowElement:n.element,i.addEventListener("click",function(e){e.stopPropagation(),e.stopImmediatePropagation(),n.toggleVisibility()}))},H.prototype._createGroup=function(e,t){var o=t+"_"+e,i=new H(this.groupManager,this,t,e,this.groupManager.groupIDLookups[t].field,this.groupManager.headerGenerator[t]||this.groupManager.headerGenerator[0],!!this.old&&this.old.groups[o]);this.groups[o]=i,this.groupList.push(i)},H.prototype._addRowToGroup=function(e){var t=this.level+1;if(this.hasSubGroups){var o=this.groupManager.groupIDLookups[t].func(e.getData()),i=t+"_"+o;this.groupManager.allowedValues&&this.groupManager.allowedValues[t]?this.groups[i]&&this.groups[i].addRow(e):(this.groups[i]||this._createGroup(o,t),this.groups[i].addRow(e))}},H.prototype._addRow=function(e){this.rows.push(e),e.modules.group=this},H.prototype.insertRow=function(e,t,o){var i=this.conformRowData({});e.updateData(i);var n=this.rows.indexOf(t);n>-1?o?this.rows.splice(n+1,0,e):this.rows.splice(n,0,e):o?this.rows.push(e):this.rows.unshift(e),e.modules.group=this,this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this),this.groupManager.updateGroupRows(!0)},H.prototype.scrollHeader=function(e){this.arrowElement.style.marginLeft=e,this.groupList.forEach(function(t){t.scrollHeader(e)})},H.prototype.getRowIndex=function(e){},H.prototype.conformRowData=function(e){return this.field?e[this.field]=this.key:console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"),this.parent&&(e=this.parent.conformRowData(e)),e},H.prototype.removeRow=function(e){var t=this.rows.indexOf(e),o=e.getElement();t>-1&&this.rows.splice(t,1),this.groupManager.table.options.groupValues||this.rows.length?(o.parentNode&&o.parentNode.removeChild(o),this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modules.columnCalcs.recalcGroup(this)):(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this),this.groupManager.updateGroupRows(!0))},H.prototype.removeGroup=function(e){var t,o=e.level+"_"+e.key;this.groups[o]&&(delete this.groups[o],t=this.groupList.indexOf(e),t>-1&&this.groupList.splice(t,1),this.groupList.length||(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this)))},H.prototype.getHeadersAndRows=function(e){var t=[];return t.push(this),this._visSet(),this.visible?this.groupList.length?this.groupList.forEach(function(o){t=t.concat(o.getHeadersAndRows(e))}):(!e&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),t.push(this.calcs.top)),t=t.concat(this.rows),!e&&"table"!=this.groupManager.table.options.columnCalcs&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),t.push(this.calcs.bottom))):this.groupList.length||"table"==this.groupManager.table.options.columnCalcs||this.groupManager.table.modExists("columnCalcs")&&(!e&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),t.push(this.calcs.top))),!e&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),t.push(this.calcs.bottom)))),t},H.prototype.getData=function(e,t){var o=[];return this._visSet(),(!e||e&&this.visible)&&this.rows.forEach(function(e){o.push(e.getData(t||"data"))}),o},H.prototype.getRowCount=function(){var e=0;return this.groupList.length?this.groupList.forEach(function(t){e+=t.getRowCount()}):e=this.rows.length,e},H.prototype.toggleVisibility=function(){this.visible?this.hide():this.show()},H.prototype.hide=function(){this.visible=!1,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination?this.groupManager.updateGroupRows(!0):(this.element.classList.remove("tabulator-group-visible"),this.groupList.length?this.groupList.forEach(function(e){e.getHeadersAndRows().forEach(function(e){e.detachElement()})}):this.rows.forEach(function(e){var t=e.getElement();t.parentNode.removeChild(t)}),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()),this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!1)},H.prototype.show=function(){var e=this;if(e.visible=!0,"classic"!=this.groupManager.table.rowManager.getRenderMode()||this.groupManager.table.options.pagination)this.groupManager.updateGroupRows(!0);else{this.element.classList.add("tabulator-group-visible");var t=e.getElement();this.groupList.length?this.groupList.forEach(function(e){e.getHeadersAndRows().forEach(function(e){var o=e.getElement();t.parentNode.insertBefore(o,t.nextSibling),e.initialize(),t=o})}):e.rows.forEach(function(e){var o=e.getElement();t.parentNode.insertBefore(o,t.nextSibling),e.initialize(),t=o}),this.groupManager.table.rowManager.setDisplayRows(this.groupManager.updateGroupRows(),this.groupManager.getDisplayIndex()),this.groupManager.table.rowManager.checkClassicModeGroupHeaderWidth()}this.groupManager.table.options.groupVisibilityChanged.call(this.table,this.getComponent(),!0)},H.prototype._visSet=function(){var e=[];"function"==typeof this.visible&&(this.rows.forEach(function(t){e.push(t.getData())}),this.visible=this.visible(this.key,this.getRowCount(),e,this.getComponent()))},H.prototype.getRowGroup=function(e){var t=!1;return this.groupList.length?this.groupList.forEach(function(o){var i=o.getRowGroup(e);i&&(t=i)}):this.rows.find(function(t){return t===e})&&(t=this),t},H.prototype.getSubGroups=function(e){var t=[];return this.groupList.forEach(function(o){t.push(e?o.getComponent():o)}),t},H.prototype.getRows=function(e){var t=[];return this.rows.forEach(function(o){t.push(e?o.getComponent():o)}),t},H.prototype.generateGroupHeaderContents=function(){var e=[];for(this.rows.forEach(function(t){e.push(t.getData())}),this.elementContents=this.generator(this.key,this.getRowCount(),e,this.getComponent());this.element.firstChild;)this.element.removeChild(this.element.firstChild);"string"==typeof this.elementContents?this.element.innerHTML=this.elementContents:this.element.appendChild(this.elementContents),this.element.insertBefore(this.arrowElement,this.element.firstChild)},H.prototype.getPath=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.unshift(this.key),this.parent&&this.parent.getPath(e),e},H.prototype.getElement=function(){this.addBindingsd=!1,this._visSet(),this.visible?this.element.classList.add("tabulator-group-visible"):this.element.classList.remove("tabulator-group-visible");for(var e=0;e<this.element.childNodes.length;++e)this.element.childNodes[e].parentNode.removeChild(this.element.childNodes[e]);return this.generateGroupHeaderContents(),this.element},H.prototype.detachElement=function(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)},H.prototype.normalizeHeight=function(){this.setHeight(this.element.clientHeight)},H.prototype.initialize=function(e){this.initialized&&!e||(this.normalizeHeight(),this.initialized=!0)},H.prototype.reinitialize=function(){this.initialized=!1,this.height=0,h.prototype.helpers.elVisible(this.element)&&this.initialize(!0)},H.prototype.setHeight=function(e){this.height!=e&&(this.height=e,this.outerHeight=this.element.offsetHeight)},H.prototype.getHeight=function(){return this.outerHeight},H.prototype.getGroup=function(){return this},H.prototype.reinitializeHeight=function(){},H.prototype.calcHeight=function(){},H.prototype.setCellHeight=function(){},H.prototype.clearCellHeight=function(){},H.prototype.getComponent=function(){return this.component||(this.component=new S(this)),this.component};var P=function(e){this.table=e,this.groupIDLookups=!1,this.startOpen=[function(){return!1}],this.headerGenerator=[function(){return""}],this.groupList=[],this.allowedValues=!1,this.groups={},this.displayIndex=0};P.prototype.initialize=function(){var e=this,t=e.table.options.groupBy,o=e.table.options.groupStartOpen,i=e.table.options.groupHeader;if(this.allowedValues=e.table.options.groupValues,Array.isArray(t)&&Array.isArray(i)&&t.length>i.length&&console.warn("Error creating group headers, groupHeader array is shorter than groupBy array"),e.headerGenerator=[function(){return""}],this.startOpen=[function(){return!1}],e.table.modules.localize.bind("groups|item",function(t,o){e.headerGenerator[0]=function(e,i,n){return(void 0===e?"":e)+"<span>("+i+" "+(1===i?t:o.groups.items)+")</span>"}}),this.groupIDLookups=[],Array.isArray(t)||t)this.table.modExists("columnCalcs")&&"table"!=this.table.options.columnCalcs&&"both"!=this.table.options.columnCalcs&&this.table.modules.columnCalcs.removeCalcs();else if(this.table.modExists("columnCalcs")&&"group"!=this.table.options.columnCalcs){var n=this.table.columnManager.getRealColumns();n.forEach(function(t){t.definition.topCalc&&e.table.modules.columnCalcs.initializeTopRow(),t.definition.bottomCalc&&e.table.modules.columnCalcs.initializeBottomRow()})}Array.isArray(t)||(t=[t]),t.forEach(function(t,o){var i,n;"function"==typeof t?i=t:(n=e.table.columnManager.getColumnByField(t),i=n?function(e){return n.getFieldValue(e)}:function(e){return e[t]}),e.groupIDLookups.push({field:"function"!=typeof t&&t,func:i,values:!!e.allowedValues&&e.allowedValues[o]})}),o&&(Array.isArray(o)||(o=[o]),o.forEach(function(e){e="function"==typeof e?e:function(){return!0}}),e.startOpen=o),i&&(e.headerGenerator=Array.isArray(i)?i:[i]),this.initialized=!0},P.prototype.setDisplayIndex=function(e){this.displayIndex=e},P.prototype.getDisplayIndex=function(){return this.displayIndex},P.prototype.getRows=function(e){return this.groupIDLookups.length?(this.table.options.dataGrouping.call(this.table),this.generateGroups(e),this.table.options.dataGrouped&&this.table.options.dataGrouped.call(this.table,this.getGroups(!0)),this.updateGroupRows()):e.slice(0)},P.prototype.getGroups=function(e){var t=[];return this.groupList.forEach(function(o){t.push(e?o.getComponent():o)}),t},P.prototype.getChildGroups=function(e){var t=this,o=[];return e||(e=this),e.groupList.forEach(function(e){e.groupList.length?o=o.concat(t.getChildGroups(e)):o.push(e)}),o},P.prototype.wipe=function(){this.groupList.forEach(function(e){e.wipe()})},P.prototype.pullGroupListData=function(e){var t=this,o=[];return e.forEach(function(e){var i={};i.level=0,i.rowCount=0,i.headerContent="";var n=[];e.hasSubGroups?(n=t.pullGroupListData(e.groupList),i.level=e.level,i.rowCount=n.length-e.groupList.length,i.headerContent=e.generator(e.key,i.rowCount,e.rows,e),o.push(i),o=o.concat(n)):(i.level=e.level,i.headerContent=e.generator(e.key,e.rows.length,e.rows,e),i.rowCount=e.getRows().length,o.push(i),e.getRows().forEach(function(e){o.push(e.getData("data"))}))}),o},P.prototype.getGroupedData=function(){return this.pullGroupListData(this.groupList)},P.prototype.getRowGroup=function(e){var t=!1;return this.groupList.forEach(function(o){var i=o.getRowGroup(e);i&&(t=i)}),t},P.prototype.countGroups=function(){return this.groupList.length},P.prototype.generateGroups=function(e){var t=this,o=t.groups;t.groups={},t.groupList=[],this.allowedValues&&this.allowedValues[0]?(this.allowedValues[0].forEach(function(e){t.createGroup(e,0,o)}),e.forEach(function(e){t.assignRowToExistingGroup(e,o)})):e.forEach(function(e){t.assignRowToGroup(e,o)})},P.prototype.createGroup=function(e,t,o){var i,n=t+"_"+e;o=o||[],i=new H(this,!1,t,e,this.groupIDLookups[0].field,this.headerGenerator[0],o[n]),this.groups[n]=i,this.groupList.push(i)},P.prototype.assignRowToExistingGroup=function(e,t){var o=this.groupIDLookups[0].func(e.getData()),i="0_"+o;this.groups[i]&&this.groups[i].addRow(e)},P.prototype.assignRowToGroup=function(e,t){var o=this.groupIDLookups[0].func(e.getData()),i=!this.groups["0_"+o];return i&&this.createGroup(o,0,t),this.groups["0_"+o].addRow(e),!i},P.prototype.reassignRowToGroup=function(e){var t=e.getGroup(),o=t.getPath(),i=this.getExpectedPath(e);o.length==i.length&&o.every(function(e,t){return e===i[t]})||(t.removeRow(e),this.assignRowToGroup(e,self.groups),this.table.rowManager.refreshActiveData("group",!1,!0))},P.prototype.getExpectedPath=function(e){var t=[],o=e.getData();return this.groupIDLookups.forEach(function(e){t.push(e.func(o))}),t},P.prototype.updateGroupRows=function(e){var t=this,o=[];if(t.groupList.forEach(function(e){o=o.concat(e.getHeadersAndRows())}),e){var i=t.table.rowManager.setDisplayRows(o,this.getDisplayIndex());!0!==i&&this.setDisplayIndex(i),t.table.rowManager.refreshActiveData("group",!0,!0)}return o},P.prototype.scrollHeaders=function(e){this.table.options.virtualDomHoz&&(e-=this.table.vdomHoz.vDomPadLeft),e+="px",this.groupList.forEach(function(t){t.scrollHeader(e)})},P.prototype.removeGroup=function(e){var t,o=e.level+"_"+e.key;this.groups[o]&&(delete this.groups[o],(t=this.groupList.indexOf(e))>-1&&this.groupList.splice(t,1))},h.prototype.registerModule("groupRows",P);var A=function(e){this.table=e,this.history=[],this.index=-1};A.prototype.clear=function(){this.history=[],this.index=-1},A.prototype.action=function(e,t,o){this.history=this.history.slice(0,this.index+1),this.history.push({type:e,component:t,data:o}),this.index++},A.prototype.getHistoryUndoSize=function(){return this.index+1},A.prototype.getHistoryRedoSize=function(){return this.history.length-(this.index+1)},A.prototype.clearComponentHistory=function(e){var t=this.history.findIndex(function(t){return t.component===e});t>-1&&(this.history.splice(t,1),t<=this.index&&this.index--,this.clearComponentHistory(e))},A.prototype.undo=function(){if(this.index>-1){var e=this.history[this.index];return this.undoers[e.type].call(this,e),this.index--,this.table.options.historyUndo.call(this.table,e.type,e.component.getComponent(),e.data),!0}return console.warn("History Undo Error - No more history to undo"),!1},A.prototype.redo=function(){if(this.history.length-1>this.index){this.index++;var e=this.history[this.index];return this.redoers[e.type].call(this,e),this.table.options.historyRedo.call(this.table,e.type,e.component.getComponent(),e.data),!0}return console.warn("History Redo Error - No more history to redo"),!1},A.prototype.undoers={cellEdit:function(e){e.component.setValueProcessData(e.data.oldValue)},rowAdd:function(e){e.component.deleteActual()},rowDelete:function(e){var t=this.table.rowManager.addRowActual(e.data.data,e.data.pos,e.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(e.component,t)},rowMove:function(e){this.table.rowManager.moveRowActual(e.component,this.table.rowManager.rows[e.data.posFrom],!e.data.after),this.table.rowManager.redraw()}},A.prototype.redoers={cellEdit:function(e){e.component.setValueProcessData(e.data.newValue)},rowAdd:function(e){var t=this.table.rowManager.addRowActual(e.data.data,e.data.pos,e.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(e.component,t)},rowDelete:function(e){e.component.deleteActual()},rowMove:function(e){this.table.rowManager.moveRowActual(e.component,this.table.rowManager.rows[e.data.posTo],e.data.after),this.table.rowManager.redraw()}},A.prototype._rebindRow=function(e,t){this.history.forEach(function(o){if(o.component instanceof l)o.component===e&&(o.component=t);else if(o.component instanceof u&&o.component.row===e){var i=o.component.column.getField();i&&(o.component=t.getCell(i))}})},h.prototype.registerModule("history",A);var _=function(e){this.table=e,this.fieldIndex=[],this.hasIndex=!1};_.prototype.parseTable=function(){var e=this,t=e.table.element,o=e.table.options,i=(o.columns,t.getElementsByTagName("th")),n=t.getElementsByTagName("tbody")[0],s=[];e.hasIndex=!1,e.table.options.htmlImporting.call(this.table),n=n?n.getElementsByTagName("tr"):[],e._extractOptions(t,o),i.length?e._extractHeaders(i,n):e._generateBlankHeaders(i,n);for(var a=0;a<n.length;a++){var r=n[a],l=r.getElementsByTagName("td"),c={};e.hasIndex||(c[o.index]=a);for(var u=0;u<l.length;u++){var d=l[u];void 0!==this.fieldIndex[u]&&(c[this.fieldIndex[u]]=d.innerHTML)}s.push(c)}var h=document.createElement("div"),p=t.attributes;for(var u in p)"object"==_typeof(p[u])&&h.setAttribute(p[u].name,p[u].value);t.parentNode.replaceChild(h,t),o.data=s,e.table.options.htmlImported.call(this.table),this.table.element=h},_.prototype._extractOptions=function(e,t,o){var i=e.attributes,n=o?Object.assign([],o):Object.keys(t),s={};n.forEach(function(e){s[e.toLowerCase()]=e});for(var a in i){var r,l=i[a];l&&"object"==(void 0===l?"undefined":_typeof(l))&&l.name&&0===l.name.indexOf("tabulator-")&&(r=l.name.replace("tabulator-",""),void 0!==s[r]&&(t[s[r]]=this._attribValue(l.value)))}},_.prototype._attribValue=function(e){return"true"===e||"false"!==e&&e},_.prototype._findCol=function(e){return this.table.options.columns.find(function(t){return t.title===e})||!1},_.prototype._extractHeaders=function(e,t){for(var o=0;o<e.length;o++){var i,s=e[o],a=!1,r=this._findCol(s.textContent);r?a=!0:r={title:s.textContent.trim()},r.field||(r.field=s.textContent.trim().toLowerCase().replace(" ","_")),i=s.getAttribute("width"),i&&!r.width&&(r.width=i),s.attributes,this._extractOptions(s,r,n.prototype.defaultOptionList),this.fieldIndex[o]=r.field,r.field==this.table.options.index&&(this.hasIndex=!0),a||this.table.options.columns.push(r)}},_.prototype._generateBlankHeaders=function(e,t){for(var o=0;o<e.length;o++){var i=e[o],n={title:"",field:"col"+o};this.fieldIndex[o]=n.field;var s=i.getAttribute("width");s&&(n.width=s),this.table.options.columns.push(n)}},h.prototype.registerModule("htmlTableImport",_);var F=function(e){this.table=e,this.watchKeys=null,this.pressedKeys=null,this.keyupBinding=!1,this.keydownBinding=!1};F.prototype.initialize=function(){var e=this.table.options.keybindings,t={};if(this.watchKeys={},this.pressedKeys=[],!1!==e){for(var o in this.bindings)t[o]=this.bindings[o];if(Object.keys(e).length)for(var i in e)t[i]=e[i];this.mapBindings(t),this.bindEvents()}},F.prototype.mapBindings=function(e){var t=this,o=this;for(var i in e)!function(i){t.actions[i]?e[i]&&("object"!==_typeof(e[i])&&(e[i]=[e[i]]),e[i].forEach(function(e){o.mapBinding(i,e)})):console.warn("Key Binding Error - no such action:",i)}(i)},F.prototype.mapBinding=function(e,t){var o=this,i={action:this.actions[e],keys:[],ctrl:!1,shift:!1,meta:!1};t.toString().toLowerCase().split(" ").join("").split("+").forEach(function(e){switch(e){case"ctrl":i.ctrl=!0;break;case"shift":i.shift=!0;break;case"meta":i.meta=!0;break;default:e=parseInt(e),i.keys.push(e),o.watchKeys[e]||(o.watchKeys[e]=[]),o.watchKeys[e].push(i)}})},F.prototype.bindEvents=function(){var e=this;this.keyupBinding=function(t){var o=t.keyCode,i=e.watchKeys[o];i&&(e.pressedKeys.push(o),i.forEach(function(o){e.checkBinding(t,o)}))},this.keydownBinding=function(t){var o=t.keyCode;if(e.watchKeys[o]){var i=e.pressedKeys.indexOf(o);i>-1&&e.pressedKeys.splice(i,1)}},this.table.element.addEventListener("keydown",this.keyupBinding),this.table.element.addEventListener("keyup",this.keydownBinding)},F.prototype.clearBindings=function(){this.keyupBinding&&this.table.element.removeEventListener("keydown",this.keyupBinding),this.keydownBinding&&this.table.element.removeEventListener("keyup",this.keydownBinding)},F.prototype.checkBinding=function(e,t){var o=this,i=!0;return e.ctrlKey==t.ctrl&&e.shiftKey==t.shift&&e.metaKey==t.meta&&(t.keys.forEach(function(e){-1==o.pressedKeys.indexOf(e)&&(i=!1)}),i&&t.action.call(o,e),!0)},F.prototype.bindings={navPrev:"shift + 9",navNext:9,navUp:38,navDown:40,scrollPageUp:33,scrollPageDown:34,scrollToStart:36,scrollToEnd:35,undo:"ctrl + 90",redo:"ctrl + 89",copyToClipboard:"ctrl + 67"},F.prototype.actions={keyBlock:function(e){e.stopPropagation(),e.preventDefault()},scrollPageUp:function(e){var t=this.table.rowManager,o=t.scrollTop-t.height;t.element.scrollHeight;e.preventDefault(),t.displayRowsCount&&(o>=0?t.element.scrollTop=o:t.scrollToRow(t.getDisplayRows()[0])),this.table.element.focus()},scrollPageDown:function(e){var t=this.table.rowManager,o=t.scrollTop+t.height,i=t.element.scrollHeight;e.preventDefault(),t.displayRowsCount&&(o<=i?t.element.scrollTop=o:t.scrollToRow(t.getDisplayRows()[t.displayRowsCount-1])),this.table.element.focus()},scrollToStart:function(e){var t=this.table.rowManager;e.preventDefault(),t.displayRowsCount&&t.scrollToRow(t.getDisplayRows()[0]),this.table.element.focus()},scrollToEnd:function(e){var t=this.table.rowManager;e.preventDefault(),t.displayRowsCount&&t.scrollToRow(t.getDisplayRows()[t.displayRowsCount-1]),this.table.element.focus()},navPrev:function(e){var t=!1;this.table.modExists("edit")&&(t=this.table.modules.edit.currentCell)&&(e.preventDefault(),t.nav().prev())},navNext:function(e){var t,o=!1,i=this.table.options.tabEndNewRow;this.table.modExists("edit")&&(o=this.table.modules.edit.currentCell)&&(e.preventDefault(),t=o.nav(),t.next()||i&&(o.getElement().firstChild.blur(),i=!0===i?this.table.addRow({}):"function"==typeof i?this.table.addRow(i(o.row.getComponent())):this.table.addRow(Object.assign({},i)),i.then(function(){setTimeout(function(){t.next()})})))},navLeft:function(e){var t=!1;this.table.modExists("edit")&&(t=this.table.modules.edit.currentCell)&&(e.preventDefault(),t.nav().left())},navRight:function(e){var t=!1;this.table.modExists("edit")&&(t=this.table.modules.edit.currentCell)&&(e.preventDefault(),t.nav().right())},navUp:function(e){var t=!1;this.table.modExists("edit")&&(t=this.table.modules.edit.currentCell)&&(e.preventDefault(),t.nav().up())},navDown:function(e){var t=!1;this.table.modExists("edit")&&(t=this.table.modules.edit.currentCell)&&(e.preventDefault(),t.nav().down())},undo:function(e){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(e.preventDefault(),this.table.modules.history.undo()))},redo:function(e){this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(this.table.modules.edit.currentCell||(e.preventDefault(),this.table.modules.history.redo()))},copyToClipboard:function(e){this.table.modules.edit.currentCell||this.table.modExists("clipboard",!0)&&this.table.modules.clipboard.copy(!1,!0)}},h.prototype.registerModule("keybindings",F);var N=function(e){this.table=e,this.menuElements=[],this.blurEvent=this.hideMenu.bind(this),this.escEvent=this.escMenu.bind(this),this.nestedMenuBlock=!1,this.positionReversedX=!1};N.prototype.initializeColumnHeader=function(e){var t,o=this;e.definition.headerContextMenu&&(e.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,e,e.definition.headerContextMenu)),this.tapHold(e,e.definition.headerContextMenu)),e.definition.headerMenu&&(t=document.createElement("span"),t.classList.add("tabulator-header-menu-button"),t.innerHTML="⋮",t.addEventListener("click",function(t){t.stopPropagation(),t.preventDefault(),o.LoadMenuEvent(e,e.definition.headerMenu,t)}),e.titleElement.insertBefore(t,e.titleElement.firstChild))},N.prototype.LoadMenuEvent=function(e,t,o){t="function"==typeof t?t.call(this.table,e.getComponent(),o):t,this.loadMenu(o,e,t)},N.prototype.tapHold=function(e,t){var o=this,i=e.getElement(),n=null,s=!1;i.addEventListener("touchstart",function(i){clearTimeout(n),s=!1,n=setTimeout(function(){clearTimeout(n),n=null,s=!0,o.LoadMenuEvent(e,t,i)},1e3)},{passive:!0}),i.addEventListener("touchend",function(e){clearTimeout(n),n=null,s&&e.preventDefault()})},N.prototype.initializeCell=function(e){e.column.definition.contextMenu&&(e.getElement(!0).addEventListener("contextmenu",this.LoadMenuEvent.bind(this,e,e.column.definition.contextMenu)),this.tapHold(e,e.column.definition.contextMenu)),e.column.definition.clickMenu&&e.getElement(!0).addEventListener("click",this.LoadMenuEvent.bind(this,e,e.column.definition.clickMenu))},N.prototype.initializeRow=function(e){this.table.options.rowContextMenu&&(e.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,e,this.table.options.rowContextMenu)),this.tapHold(e,this.table.options.rowContextMenu)),this.table.options.rowClickMenu&&e.getElement().addEventListener("click",this.LoadMenuEvent.bind(this,e,this.table.options.rowClickMenu))},N.prototype.initializeGroup=function(e){this.table.options.groupContextMenu&&(e.getElement().addEventListener("contextmenu",this.LoadMenuEvent.bind(this,e,this.table.options.groupContextMenu)),this.tapHold(e,this.table.options.groupContextMenu)),this.table.options.groupClickMenu&&e.getElement().addEventListener("click",this.LoadMenuEvent.bind(this,e,this.table.options.groupClickMenu))},N.prototype.loadMenu=function(e,t,o,i){var n=this,s=!(e instanceof MouseEvent),a=document.createElement("div");if(a.classList.add("tabulator-menu"),s||e.preventDefault(),o&&o.length){if(!i){if(this.nestedMenuBlock){if(this.isOpen())return}else this.nestedMenuBlock=setTimeout(function(){n.nestedMenuBlock=!1},100);this.hideMenu(),this.menuElements=[]}o.forEach(function(e){var o=document.createElement("div"),i=e.label,s=e.disabled;e.separator?o.classList.add("tabulator-menu-separator"):(o.classList.add("tabulator-menu-item"),"function"==typeof i&&(i=i.call(n.table,t.getComponent())),i instanceof Node?o.appendChild(i):o.innerHTML=i,"function"==typeof s&&(s=s.call(n.table,t.getComponent())),s?(o.classList.add("tabulator-menu-item-disabled"),o.addEventListener("click",function(e){e.stopPropagation()})):e.menu&&e.menu.length?o.addEventListener("click",function(i){i.stopPropagation(),n.hideOldSubMenus(a),n.loadMenu(i,t,e.menu,o)}):e.action&&o.addEventListener("click",function(o){e.action(o,t.getComponent())}),e.menu&&e.menu.length&&o.classList.add("tabulator-menu-item-submenu")),a.appendChild(o)}),a.addEventListener("click",function(e){n.hideMenu()}),this.menuElements.push(a),this.positionMenu(a,i,s,e)}},N.prototype.hideOldSubMenus=function(e){var t=this.menuElements.indexOf(e);if(t>-1)for(var o=this.menuElements.length-1;o>t;o--){var i=this.menuElements[o];i.parentNode&&i.parentNode.removeChild(i),this.menuElements.pop()}},N.prototype.positionMenu=function(e,t,o,i){var n,s,a,r=this,l=Math.max(document.body.offsetHeight,window.innerHeight);t?(a=h.prototype.helpers.elOffset(t),n=a.left+t.offsetWidth,s=a.top-1):(n=o?i.touches[0].pageX:i.pageX,s=o?i.touches[0].pageY:i.pageY,this.positionReversedX=!1),e.style.top=s+"px",e.style.left=n+"px",setTimeout(function(){r.table.rowManager.element.addEventListener("scroll",r.blurEvent),document.body.addEventListener("click",r.blurEvent),document.body.addEventListener("contextmenu",r.blurEvent),window.addEventListener("resize",r.blurEvent),document.body.addEventListener("keydown",r.escEvent)},100),document.body.appendChild(e),s+e.offsetHeight>=l&&(e.style.top="",e.style.bottom=t?l-a.top-t.offsetHeight-1+"px":l-s+"px"),(n+e.offsetWidth>=document.body.offsetWidth||this.positionReversedX)&&(e.style.left="",e.style.right=t?document.documentElement.offsetWidth-a.left+"px":document.documentElement.offsetWidth-n+"px",this.positionReversedX=!0)},N.prototype.isOpen=function(){return!!this.menuElements.length},N.prototype.escMenu=function(e){27==e.keyCode&&this.hideMenu()},N.prototype.hideMenu=function(){this.menuElements.forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)}),document.body.removeEventListener("keydown",this.escEvent),document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),window.removeEventListener("resize",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent)},N.prototype.menus={},h.prototype.registerModule("menu",N);var B=function(e){this.table=e,this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=250,this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.startX=0,this.autoScrollMargin=40,this.autoScrollStep=5,this.autoScrollTimeout=!1,this.touchMove=!1,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this)};B.prototype.createPlaceholderElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-col"),e.classList.add("tabulator-col-placeholder"),e},B.prototype.initializeColumn=function(e){
+var t,o=this,i={};e.modules.frozen||(t=e.getElement(),i.mousemove=function(i){e.parent===o.moving.parent&&((o.touchMove?i.touches[0].pageX:i.pageX)-h.prototype.helpers.elOffset(t).left+o.table.columnManager.element.scrollLeft>e.getWidth()/2?o.toCol===e&&o.toColAfter||(t.parentNode.insertBefore(o.placeholderElement,t.nextSibling),o.moveColumn(e,!0)):(o.toCol!==e||o.toColAfter)&&(t.parentNode.insertBefore(o.placeholderElement,t),o.moveColumn(e,!1)))}.bind(o),t.addEventListener("mousedown",function(t){o.touchMove=!1,1===t.which&&(o.checkTimeout=setTimeout(function(){o.startMove(t,e)},o.checkPeriod))}),t.addEventListener("mouseup",function(e){1===e.which&&o.checkTimeout&&clearTimeout(o.checkTimeout)}),o.bindTouchEvents(e)),e.modules.moveColumn=i},B.prototype.bindTouchEvents=function(e){var t,o,i,n,s,a,r,l=this,c=e.getElement(),u=!1;c.addEventListener("touchstart",function(c){l.checkTimeout=setTimeout(function(){l.touchMove=!0,t=e,o=e.nextColumn(),n=o?o.getWidth()/2:0,i=e.prevColumn(),s=i?i.getWidth()/2:0,a=0,r=0,u=!1,l.startMove(c,e)},l.checkPeriod)},{passive:!0}),c.addEventListener("touchmove",function(c){var d,h;l.moving&&(l.moveHover(c),u||(u=c.touches[0].pageX),d=c.touches[0].pageX-u,d>0?o&&d-a>n&&(h=o)!==e&&(u=c.touches[0].pageX,h.getElement().parentNode.insertBefore(l.placeholderElement,h.getElement().nextSibling),l.moveColumn(h,!0)):i&&-d-r>s&&(h=i)!==e&&(u=c.touches[0].pageX,h.getElement().parentNode.insertBefore(l.placeholderElement,h.getElement()),l.moveColumn(h,!1)),h&&(t=h,o=h.nextColumn(),a=n,n=o?o.getWidth()/2:0,i=h.prevColumn(),r=s,s=i?i.getWidth()/2:0))},{passive:!0}),c.addEventListener("touchend",function(e){l.checkTimeout&&clearTimeout(l.checkTimeout),l.moving&&l.endMove(e)})},B.prototype.startMove=function(e,t){var o=t.getElement();this.moving=t,this.startX=(this.touchMove?e.touches[0].pageX:e.pageX)-h.prototype.helpers.elOffset(o).left,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",o.parentNode.insertBefore(this.placeholderElement,o),o.parentNode.removeChild(o),this.hoverElement=o.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.table.columnManager.getElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.bottom="0",this.touchMove||(this._bindMouseMove(),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove)),this.moveHover(e)},B.prototype._bindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach(function(e){e.modules.moveColumn.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveColumn.mousemove)})},B.prototype._unbindMouseMove=function(){this.table.columnManager.columnsByIndex.forEach(function(e){e.modules.moveColumn.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveColumn.mousemove)})},B.prototype.moveColumn=function(e,t){var o=this.moving.getCells();this.toCol=e,this.toColAfter=t,t?e.getCells().forEach(function(e,t){var i=e.getElement(!0);i.parentNode.insertBefore(o[t].getElement(),i.nextSibling)}):e.getCells().forEach(function(e,t){var i=e.getElement(!0);i.parentNode.insertBefore(o[t].getElement(),i)})},B.prototype.endMove=function(e){(1===e.which||this.touchMove)&&(this._unbindMouseMove(),this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toCol&&this.table.columnManager.moveColumnActual(this.moving,this.toCol,this.toColAfter),this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.touchMove||(document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove)))},B.prototype.moveHover=function(e){var t,o=this,i=o.table.columnManager.getElement(),n=i.scrollLeft,s=(o.touchMove?e.touches[0].pageX:e.pageX)-h.prototype.helpers.elOffset(i).left+n;o.hoverElement.style.left=s-o.startX+"px",s-n<o.autoScrollMargin&&(o.autoScrollTimeout||(o.autoScrollTimeout=setTimeout(function(){t=Math.max(0,n-5),o.table.rowManager.getElement().scrollLeft=t,o.autoScrollTimeout=!1},1))),n+i.clientWidth-s<o.autoScrollMargin&&(o.autoScrollTimeout||(o.autoScrollTimeout=setTimeout(function(){t=Math.min(i.clientWidth,n+5),o.table.rowManager.getElement().scrollLeft=t,o.autoScrollTimeout=!1},1)))},h.prototype.registerModule("moveColumn",B);var O=function(e){this.table=e,this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=150,this.moving=!1,this.toRow=!1,this.toRowAfter=!1,this.hasHandle=!1,this.startY=0,this.startX=0,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this),this.tableRowDropEvent=!1,this.touchMove=!1,this.connection=!1,this.connectionSelectorsTables=!1,this.connectionSelectorsElements=!1,this.connectionElements=[],this.connections=[],this.connectedTable=!1,this.connectedRow=!1};O.prototype.createPlaceholderElement=function(){var e=document.createElement("div");return e.classList.add("tabulator-row"),e.classList.add("tabulator-row-placeholder"),e},O.prototype.initialize=function(e){this.connectionSelectorsTables=this.table.options.movableRowsConnectedTables,this.connectionSelectorsElements=this.table.options.movableRowsConnectedElements,this.connection=this.connectionSelectorsTables||this.connectionSelectorsElements},O.prototype.setHandle=function(e){this.hasHandle=e},O.prototype.initializeGroupHeader=function(e){var t=this,o={};o.mouseup=function(e){t.tableRowDrop(e,row)}.bind(t),o.mousemove=function(o){if(o.pageY-h.prototype.helpers.elOffset(e.element).top+t.table.rowManager.element.scrollTop>e.getHeight()/2){if(t.toRow!==e||!t.toRowAfter){var i=e.getElement();i.parentNode.insertBefore(t.placeholderElement,i.nextSibling),t.moveRow(e,!0)}}else if(t.toRow!==e||t.toRowAfter){var i=e.getElement();i.previousSibling&&(i.parentNode.insertBefore(t.placeholderElement,i),t.moveRow(e,!1))}}.bind(t),e.modules.moveRow=o},O.prototype.initializeRow=function(e){var t,o=this,i={};i.mouseup=function(t){o.tableRowDrop(t,e)}.bind(o),i.mousemove=function(t){var i=e.getElement();t.pageY-h.prototype.helpers.elOffset(i).top+o.table.rowManager.element.scrollTop>e.getHeight()/2?o.toRow===e&&o.toRowAfter||(i.parentNode.insertBefore(o.placeholderElement,i.nextSibling),o.moveRow(e,!0)):(o.toRow!==e||o.toRowAfter)&&(i.parentNode.insertBefore(o.placeholderElement,i),o.moveRow(e,!1))}.bind(o),this.hasHandle||(t=e.getElement(),t.addEventListener("mousedown",function(t){1===t.which&&(o.checkTimeout=setTimeout(function(){o.startMove(t,e)},o.checkPeriod))}),t.addEventListener("mouseup",function(e){1===e.which&&o.checkTimeout&&clearTimeout(o.checkTimeout)}),this.bindTouchEvents(e,e.getElement())),e.modules.moveRow=i},O.prototype.initializeCell=function(e){var t=this,o=e.getElement(!0);o.addEventListener("mousedown",function(o){1===o.which&&(t.checkTimeout=setTimeout(function(){t.startMove(o,e.row)},t.checkPeriod))}),o.addEventListener("mouseup",function(e){1===e.which&&t.checkTimeout&&clearTimeout(t.checkTimeout)}),this.bindTouchEvents(e.row,o)},O.prototype.bindTouchEvents=function(e,t){var o,i,n,s,a,r,l,c=this,u=!1;t.addEventListener("touchstart",function(t){c.checkTimeout=setTimeout(function(){c.touchMove=!0,o=e,i=e.nextRow(),s=i?i.getHeight()/2:0,n=e.prevRow(),a=n?n.getHeight()/2:0,r=0,l=0,u=!1,c.startMove(t,e)},c.checkPeriod)},{passive:!0}),this.moving,this.toRow,this.toRowAfter,t.addEventListener("touchmove",function(t){var d,h;c.moving&&(t.preventDefault(),c.moveHover(t),u||(u=t.touches[0].pageY),d=t.touches[0].pageY-u,d>0?i&&d-r>s&&(h=i)!==e&&(u=t.touches[0].pageY,h.getElement().parentNode.insertBefore(c.placeholderElement,h.getElement().nextSibling),c.moveRow(h,!0)):n&&-d-l>a&&(h=n)!==e&&(u=t.touches[0].pageY,h.getElement().parentNode.insertBefore(c.placeholderElement,h.getElement()),c.moveRow(h,!1)),h&&(o=h,i=h.nextRow(),r=s,s=i?i.getHeight()/2:0,n=h.prevRow(),l=a,a=n?n.getHeight()/2:0))}),t.addEventListener("touchend",function(e){c.checkTimeout&&clearTimeout(c.checkTimeout),c.moving&&(c.endMove(e),c.touchMove=!1)})},O.prototype._bindMouseMove=function(){this.table.rowManager.getDisplayRows().forEach(function(e){"row"!==e.type&&"group"!==e.type||!e.modules.moveRow.mousemove||e.getElement().addEventListener("mousemove",e.modules.moveRow.mousemove)})},O.prototype._unbindMouseMove=function(){this.table.rowManager.getDisplayRows().forEach(function(e){"row"!==e.type&&"group"!==e.type||!e.modules.moveRow.mousemove||e.getElement().removeEventListener("mousemove",e.modules.moveRow.mousemove)})},O.prototype.startMove=function(e,t){var o=t.getElement();this.setStartPosition(e,t),this.moving=t,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",this.connection?(this.table.element.classList.add("tabulator-movingrow-sending"),this.connectToTables(t)):(o.parentNode.insertBefore(this.placeholderElement,o),o.parentNode.removeChild(o)),this.hoverElement=o.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.connection?(document.body.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this.hoverElement.style.width=this.table.element.clientWidth+"px",this.hoverElement.style.whiteSpace="nowrap",this.hoverElement.style.overflow="hidden",this.hoverElement.style.pointerEvents="none"):(this.table.rowManager.getTableElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this._bindMouseMove()),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove),this.moveHover(e)},O.prototype.setStartPosition=function(e,t){var o,i,n=this.touchMove?e.touches[0].pageX:e.pageX,s=this.touchMove?e.touches[0].pageY:e.pageY;o=t.getElement(),this.connection?(i=o.getBoundingClientRect(),this.startX=i.left-n+window.pageXOffset,this.startY=i.top-s+window.pageYOffset):this.startY=s-o.getBoundingClientRect().top},O.prototype.endMove=function(e){e&&1!==e.which&&!this.touchMove||(this._unbindMouseMove(),this.connection||(this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement)),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toRow&&this.table.rowManager.moveRow(this.moving,this.toRow,this.toRowAfter),this.moving=!1,this.toRow=!1,this.toRowAfter=!1,document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove),this.connection&&(this.table.element.classList.remove("tabulator-movingrow-sending"),this.disconnectFromTables()))},O.prototype.moveRow=function(e,t){this.toRow=e,this.toRowAfter=t},O.prototype.moveHover=function(e){this.connection?this.moveHoverConnections.call(this,e):this.moveHoverTable.call(this,e)},O.prototype.moveHoverTable=function(e){var t=this.table.rowManager.getElement(),o=t.scrollTop,i=(this.touchMove?e.touches[0].pageY:e.pageY)-t.getBoundingClientRect().top+o;this.hoverElement.style.top=i-this.startY+"px"},O.prototype.moveHoverConnections=function(e){this.hoverElement.style.left=this.startX+(this.touchMove?e.touches[0].pageX:e.pageX)+"px",this.hoverElement.style.top=this.startY+(this.touchMove?e.touches[0].pageY:e.pageY)+"px"},O.prototype.elementRowDrop=function(e,t,o){this.table.options.movableRowsElementDrop&&this.table.options.movableRowsElementDrop(e,t,!!o&&o.getComponent())},O.prototype.connectToTables=function(e){var t,o=this;this.connectionSelectorsTables&&(t=this.table.modules.comms.getConnections(this.connectionSelectorsTables),this.table.options.movableRowsSendingStart.call(this.table,t),this.table.modules.comms.send(this.connectionSelectorsTables,"moveRow","connect",{row:e})),this.connectionSelectorsElements&&(this.connectionElements=[],Array.isArray(this.connectionSelectorsElements)||(this.connectionSelectorsElements=[this.connectionSelectorsElements]),this.connectionSelectorsElements.forEach(function(e){"string"==typeof e?o.connectionElements=o.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(e))):o.connectionElements.push(e)}),this.connectionElements.forEach(function(e){var t=function(t){o.elementRowDrop(t,e,o.moving)};e.addEventListener("mouseup",t),e.tabulatorElementDropEvent=t,e.classList.add("tabulator-movingrow-receiving")}))},O.prototype.disconnectFromTables=function(){var e;this.connectionSelectorsTables&&(e=this.table.modules.comms.getConnections(this.connectionSelectorsTables),this.table.options.movableRowsSendingStop.call(this.table,e),this.table.modules.comms.send(this.connectionSelectorsTables,"moveRow","disconnect")),this.connectionElements.forEach(function(e){e.classList.remove("tabulator-movingrow-receiving"),e.removeEventListener("mouseup",e.tabulatorElementDropEvent),delete e.tabulatorElementDropEvent})},O.prototype.connect=function(e,t){var o=this;return this.connectedTable?(console.warn("Move Row Error - Table cannot accept connection, already connected to table:",this.connectedTable),!1):(this.connectedTable=e,this.connectedRow=t,this.table.element.classList.add("tabulator-movingrow-receiving"),o.table.rowManager.getDisplayRows().forEach(function(e){"row"===e.type&&e.modules.moveRow&&e.modules.moveRow.mouseup&&e.getElement().addEventListener("mouseup",e.modules.moveRow.mouseup)}),o.tableRowDropEvent=o.tableRowDrop.bind(o),o.table.element.addEventListener("mouseup",o.tableRowDropEvent),this.table.options.movableRowsReceivingStart.call(this.table,t,e),!0)},O.prototype.disconnect=function(e){var t=this;e===this.connectedTable?(this.connectedTable=!1,this.connectedRow=!1,this.table.element.classList.remove("tabulator-movingrow-receiving"),t.table.rowManager.getDisplayRows().forEach(function(e){"row"===e.type&&e.modules.moveRow&&e.modules.moveRow.mouseup&&e.getElement().removeEventListener("mouseup",e.modules.moveRow.mouseup)}),t.table.element.removeEventListener("mouseup",t.tableRowDropEvent),this.table.options.movableRowsReceivingStop.call(this.table,e)):console.warn("Move Row Error - trying to disconnect from non connected table")},O.prototype.dropComplete=function(e,t,o){var i=!1;if(o){switch(_typeof(this.table.options.movableRowsSender)){case"string":i=this.senders[this.table.options.movableRowsSender];break;case"function":i=this.table.options.movableRowsSender}i?i.call(this,this.moving.getComponent(),t?t.getComponent():void 0,e):this.table.options.movableRowsSender&&console.warn("Mover Row Error - no matching sender found:",this.table.options.movableRowsSender),this.table.options.movableRowsSent.call(this.table,this.moving.getComponent(),t?t.getComponent():void 0,e)}else this.table.options.movableRowsSentFailed.call(this.table,this.moving.getComponent(),t?t.getComponent():void 0,e);this.endMove()},O.prototype.tableRowDrop=function(e,t){var o=!1,i=!1;switch(e.stopImmediatePropagation(),_typeof(this.table.options.movableRowsReceiver)){case"string":o=this.receivers[this.table.options.movableRowsReceiver];break;case"function":o=this.table.options.movableRowsReceiver}o?i=o.call(this,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):console.warn("Mover Row Error - no matching receiver found:",this.table.options.movableRowsReceiver),i?this.table.options.movableRowsReceived.call(this.table,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):this.table.options.movableRowsReceivedFailed.call(this.table,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable),this.table.modules.comms.send(this.connectedTable,"moveRow","dropcomplete",{row:t,success:i})},O.prototype.receivers={insert:function(e,t,o){return this.table.addRow(e.getData(),void 0,t),!0},add:function(e,t,o){return this.table.addRow(e.getData()),!0},update:function(e,t,o){return!!t&&(t.update(e.getData()),!0)},replace:function(e,t,o){return!!t&&(this.table.addRow(e.getData(),void 0,t),t.delete(),!0)}},O.prototype.senders={delete:function(e,t,o){e.delete()}},O.prototype.commsReceived=function(e,t,o){switch(t){case"connect":return this.connect(e,o.row);case"disconnect":return this.disconnect(e);case"dropcomplete":return this.dropComplete(e,o.row,o.success)}},h.prototype.registerModule("moveRow",O);var I=function(e){this.table=e,this.allowedTypes=["","data","edit","clipboard"],this.enabled=!0};I.prototype.initializeColumn=function(e){var t=this,o=!1,i={};this.allowedTypes.forEach(function(n){var s,a="mutator"+(n.charAt(0).toUpperCase()+n.slice(1));e.definition[a]&&(s=t.lookupMutator(e.definition[a]))&&(o=!0,i[a]={mutator:s,params:e.definition[a+"Params"]||{}})}),o&&(e.modules.mutate=i)},I.prototype.lookupMutator=function(e){var t=!1;switch(void 0===e?"undefined":_typeof(e)){case"string":this.mutators[e]?t=this.mutators[e]:console.warn("Mutator Error - No such mutator found, ignoring: ",e);break;case"function":t=e}return t},I.prototype.transformRow=function(e,t,o){var i,n=this,s="mutator"+(t.charAt(0).toUpperCase()+t.slice(1));return this.enabled&&n.table.columnManager.traverse(function(n){var a,r,l;n.modules.mutate&&(a=n.modules.mutate[s]||n.modules.mutate.mutator||!1)&&(i=n.getFieldValue(void 0!==o?o:e),"data"!=t&&void 0===i||(l=n.getComponent(),r="function"==typeof a.params?a.params(i,e,t,l):a.params,n.setFieldValue(e,a.mutator(i,e,t,r,l))))}),e},I.prototype.transformCell=function(e,t){var o=e.column.modules.mutate.mutatorEdit||e.column.modules.mutate.mutator||!1,i={};return o?(i=Object.assign(i,e.row.getData()),e.column.setFieldValue(i,t),o.mutator(t,i,"edit",o.params,e.getComponent())):t},I.prototype.enable=function(){this.enabled=!0},I.prototype.disable=function(){this.enabled=!1},I.prototype.mutators={},h.prototype.registerModule("mutator",I);var V=function(e){this.table=e,this.mode="local",this.progressiveLoad=!1,this.size=0,this.page=1,this.count=5,this.max=1,this.displayIndex=0,this.initialLoad=!0,this.pageSizes=[],this.dataReceivedNames={},this.dataSentNames={},this.createElements()};V.prototype.createElements=function(){var e;this.element=document.createElement("span"),this.element.classList.add("tabulator-paginator"),this.pagesElement=document.createElement("span"),this.pagesElement.classList.add("tabulator-pages"),e=document.createElement("button"),e.classList.add("tabulator-page"),e.setAttribute("type","button"),e.setAttribute("role","button"),e.setAttribute("aria-label",""),e.setAttribute("title",""),this.firstBut=e.cloneNode(!0),this.firstBut.setAttribute("data-page","first"),this.prevBut=e.cloneNode(!0),this.prevBut.setAttribute("data-page","prev"),this.nextBut=e.cloneNode(!0),this.nextBut.setAttribute("data-page","next"),this.lastBut=e.cloneNode(!0),this.lastBut.setAttribute("data-page","last"),this.table.options.paginationSizeSelector&&(this.pageSizeSelect=document.createElement("select"),this.pageSizeSelect.classList.add("tabulator-page-size"))},V.prototype.generatePageSizeSelectList=function(){var e=this,t=[];if(this.pageSizeSelect){if(Array.isArray(this.table.options.paginationSizeSelector))t=this.table.options.paginationSizeSelector,this.pageSizes=t,-1==this.pageSizes.indexOf(this.size)&&t.unshift(this.size);else if(-1==this.pageSizes.indexOf(this.size)){t=[];for(var o=1;o<5;o++)t.push(this.size*o);this.pageSizes=t}else t=this.pageSizes;for(;this.pageSizeSelect.firstChild;)this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild);t.forEach(function(t){var o=document.createElement("option");o.value=t,!0===t?e.table.modules.localize.bind("pagination|all",function(e){o.innerHTML=e}):o.innerHTML=t,e.pageSizeSelect.appendChild(o)}),this.pageSizeSelect.value=this.size}},V.prototype.initialize=function(e){var t,o,i,n=this;this.dataSentNames=Object.assign({},this.paginationDataSentNames),this.dataSentNames=Object.assign(this.dataSentNames,this.table.options.paginationDataSent),this.dataReceivedNames=Object.assign({},this.paginationDataReceivedNames),this.dataReceivedNames=Object.assign(this.dataReceivedNames,this.table.options.paginationDataReceived),n.table.modules.localize.bind("pagination|first",function(e){n.firstBut.innerHTML=e}),n.table.modules.localize.bind("pagination|first_title",function(e){n.firstBut.setAttribute("aria-label",e),n.firstBut.setAttribute("title",e)}),n.table.modules.localize.bind("pagination|prev",function(e){n.prevBut.innerHTML=e}),n.table.modules.localize.bind("pagination|prev_title",function(e){n.prevBut.setAttribute("aria-label",e),n.prevBut.setAttribute("title",e)}),n.table.modules.localize.bind("pagination|next",function(e){n.nextBut.innerHTML=e}),n.table.modules.localize.bind("pagination|next_title",function(e){n.nextBut.setAttribute("aria-label",e),n.nextBut.setAttribute("title",e)}),n.table.modules.localize.bind("pagination|last",function(e){n.lastBut.innerHTML=e}),n.table.modules.localize.bind("pagination|last_title",function(e){n.lastBut.setAttribute("aria-label",e),n.lastBut.setAttribute("title",e)}),n.firstBut.addEventListener("click",function(){n.setPage(1).then(function(){}).catch(function(){})}),n.prevBut.addEventListener("click",function(){n.previousPage().then(function(){}).catch(function(){})}),n.nextBut.addEventListener("click",function(){n.nextPage().then(function(){}).catch(function(){})}),n.lastBut.addEventListener("click",function(){n.setPage(n.max).then(function(){}).catch(function(){})}),n.table.options.paginationElement&&(n.element=n.table.options.paginationElement),this.pageSizeSelect&&(t=document.createElement("label"),n.table.modules.localize.bind("pagination|page_size",function(e){n.pageSizeSelect.setAttribute("aria-label",e),n.pageSizeSelect.setAttribute("title",e),t.innerHTML=e}),n.element.appendChild(t),n.element.appendChild(n.pageSizeSelect),n.pageSizeSelect.addEventListener("change",function(e){n.setPageSize("true"==n.pageSizeSelect.value||n.pageSizeSelect.value),n.setPage(1).then(function(){}).catch(function(){})})),n.element.appendChild(n.firstBut),n.element.appendChild(n.prevBut),n.element.appendChild(n.pagesElement),n.element.appendChild(n.nextBut),n.element.appendChild(n.lastBut),n.table.options.paginationElement||e||n.table.footerManager.append(n.element,n),n.mode=n.table.options.pagination,n.table.options.paginationSize?n.size=n.table.options.paginationSize:(o=document.createElement("div"),o.classList.add("tabulator-row"),o.style.visibility=e,i=document.createElement("div"),i.classList.add("tabulator-cell"),i.innerHTML="Page Row Test",o.appendChild(i),n.table.rowManager.getTableElement().appendChild(o),n.size=Math.floor(n.table.rowManager.getElement().clientHeight/o.offsetHeight),n.table.rowManager.getTableElement().removeChild(o)),n.count=n.table.options.paginationButtonCount,n.generatePageSizeSelectList()},V.prototype.initializeProgressive=function(e){this.initialize(!0),this.mode="progressive_"+e,this.progressiveLoad=!0},V.prototype.setDisplayIndex=function(e){this.displayIndex=e},V.prototype.getDisplayIndex=function(){return this.displayIndex},V.prototype.setMaxRows=function(e){this.max=e?!0===this.size?1:Math.ceil(e/this.size):1,this.page>this.max&&(this.page=this.max)},V.prototype.reset=function(e,t){return("local"==this.mode||e)&&(this.page=1),t&&(this.initialLoad=!0),!0},V.prototype.setMaxPage=function(e){e=parseInt(e),this.max=e||1,this.page>this.max&&(this.page=this.max,this.trigger())},V.prototype.setPage=function(e){var t=this,o=this;switch(e){case"first":return this.setPage(1);case"prev":return this.previousPage();case"next":return this.nextPage();case"last":return this.setPage(this.max)}return new Promise(function(i,n){e=parseInt(e),e>0&&e<=t.max||"local"!==t.mode?(t.page=e,t.trigger().then(function(){i()}).catch(function(){n()}),o.table.options.persistence&&o.table.modExists("persistence",!0)&&o.table.modules.persistence.config.page&&o.table.modules.persistence.save("page")):(console.warn("Pagination Error - Requested page is out of range of 1 - "+t.max+":",e),n())})},V.prototype.setPageToRow=function(e){var t=this;return new Promise(function(o,i){var n=t.table.rowManager.getDisplayRows(t.displayIndex-1),s=n.indexOf(e);if(s>-1){var a=!0===t.size?1:Math.ceil((s+1)/t.size);t.setPage(a).then(function(){o()}).catch(function(){i()})}else console.warn("Pagination Error - Requested row is not visible"),i()})},V.prototype.setPageSize=function(e){!0!==e&&(e=parseInt(e)),e>0&&(this.size=e),this.pageSizeSelect&&this.generatePageSizeSelectList(),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.page&&this.table.modules.persistence.save("page")},V.prototype._setPageButtons=function(){for(var e=this,t=Math.floor((this.count-1)/2),o=Math.ceil((this.count-1)/2),i=this.max-this.page+t+1<this.count?this.max-this.count+1:Math.max(this.page-t,1),n=this.page<=o?Math.min(this.count,this.max):Math.min(this.page+o,this.max);e.pagesElement.firstChild;)e.pagesElement.removeChild(e.pagesElement.firstChild);1==e.page?(e.firstBut.disabled=!0,e.prevBut.disabled=!0):(e.firstBut.disabled=!1,e.prevBut.disabled=!1),e.page==e.max?(e.lastBut.disabled=!0,e.nextBut.disabled=!0):(e.lastBut.disabled=!1,e.nextBut.disabled=!1);for(var s=i;s<=n;s++)s>0&&s<=e.max&&e.pagesElement.appendChild(e._generatePageButton(s));this.footerRedraw()},V.prototype._generatePageButton=function(e){var t=this,o=document.createElement("button");return o.classList.add("tabulator-page"),e==t.page&&o.classList.add("active"),o.setAttribute("type","button"),o.setAttribute("role","button"),t.table.modules.localize.bind("pagination|page_title",function(t){o.setAttribute("aria-label",t+" "+e),o.setAttribute("title",t+" "+e)}),o.setAttribute("data-page",e),o.textContent=e,o.addEventListener("click",function(o){t.setPage(e).then(function(){}).catch(function(){})}),o},V.prototype.previousPage=function(){var e=this;return new Promise(function(t,o){e.page>1?(e.page--,e.trigger().then(function(){t()}).catch(function(){o()}),e.table.options.persistence&&e.table.modExists("persistence",!0)&&e.table.modules.persistence.config.page&&e.table.modules.persistence.save("page")):(console.warn("Pagination Error - Previous page would be less than page 1:",0),o())})},V.prototype.nextPage=function(){var e=this;return new Promise(function(t,o){e.page<e.max?(e.page++,e.trigger().then(function(){t()}).catch(function(){o()}),e.table.options.persistence&&e.table.modExists("persistence",!0)&&e.table.modules.persistence.config.page&&e.table.modules.persistence.save("page")):(e.progressiveLoad||console.warn("Pagination Error - Next page would be greater than maximum page of "+e.max+":",e.max+1),o())})},V.prototype.getPage=function(){return this.page},V.prototype.getPageMax=function(){return this.max},V.prototype.getPageSize=function(e){return this.size},V.prototype.getMode=function(){return this.mode},V.prototype.getRows=function(e){var t,o,i;if("local"==this.mode){t=[],!0===this.size?(o=0,i=e.length):(o=this.size*(this.page-1),i=o+parseInt(this.size)),this._setPageButtons();for(var n=o;n<i;n++)e[n]&&t.push(e[n]);return t}return this._setPageButtons(),e.slice(0)},V.prototype.trigger=function(){var e,t=this;return new Promise(function(o,i){switch(t.mode){case"local":e=t.table.rowManager.scrollLeft,t.table.rowManager.refreshActiveData("page"),t.table.rowManager.scrollHorizontal(e),t.table.options.pageLoaded.call(t.table,t.getPage()),o();break;case"remote":case"progressive_load":case"progressive_scroll":t.table.modules.ajax.blockActiveRequest(),t._getRemotePage().then(function(){o()}).catch(function(){i()});break;default:console.warn("Pagination Error - no such pagination mode:",t.mode),i()}})},V.prototype._getRemotePage=function(){var e,t,o=this,i=this;return new Promise(function(n,s){if(i.table.modExists("ajax",!0)||s(),e=h.prototype.helpers.deepClone(i.table.modules.ajax.getParams()||{}),t=i.table.modules.ajax.getParams(),t[o.dataSentNames.page]=i.page,o.size&&(t[o.dataSentNames.size]=o.size),o.table.options.ajaxSorting&&o.table.modExists("sort")){var a=i.table.modules.sort.getSort();a.forEach(function(e){delete e.column}),t[o.dataSentNames.sorters]=a}if(o.table.options.ajaxFiltering&&o.table.modExists("filter")){var r=i.table.modules.filter.getFilters(!0,!0);t[o.dataSentNames.filters]=r}i.table.modules.ajax.setParams(t),i.table.modules.ajax.sendRequest(o.progressiveLoad).then(function(e){i._parseRemoteData(e),n()}).catch(function(e){s()}),i.table.modules.ajax.setParams(e)})},V.prototype._parseRemoteData=function(e){var t,e,o,i=this;if(void 0===e[this.dataReceivedNames.last_page]&&console.warn("Remote Pagination Error - Server response missing '"+this.dataReceivedNames.last_page+"' property"),e[this.dataReceivedNames.data]){if(this.max=parseInt(e[this.dataReceivedNames.last_page])||1,this.progressiveLoad)switch(this.mode){case"progressive_load":1==this.page?this.table.rowManager.setData(e[this.dataReceivedNames.data],!1,this.initialLoad&&1==this.page):this.table.rowManager.addRows(e[this.dataReceivedNames.data]),this.page<this.max&&setTimeout(function(){i.nextPage().then(function(){}).catch(function(){})},i.table.options.ajaxProgressiveLoadDelay);break;case"progressive_scroll":e=this.table.rowManager.getData().concat(e[this.dataReceivedNames.data]),this.table.rowManager.setData(e,!0,this.initialLoad&&1==this.page),o=this.table.options.ajaxProgressiveLoadScrollMargin||2*this.table.rowManager.element.clientHeight,i.table.rowManager.element.scrollHeight<=i.table.rowManager.element.clientHeight+o&&i.nextPage().then(function(){}).catch(function(){})}else t=this.table.rowManager.scrollLeft,this.table.rowManager.setData(e[this.dataReceivedNames.data],!1,this.initialLoad&&1==this.page),this.table.rowManager.scrollHorizontal(t),this.table.columnManager.scrollHorizontal(t),this.table.options.pageLoaded.call(this.table,this.getPage());this.initialLoad=!1}else console.warn("Remote Pagination Error - Server response missing '"+this.dataReceivedNames.data+"' property")},V.prototype.footerRedraw=function(){var e=this.table.footerManager.element;Math.ceil(e.clientWidth)-e.scrollWidth<0?this.pagesElement.style.display="none":(this.pagesElement.style.display="",Math.ceil(e.clientWidth)-e.scrollWidth<0&&(this.pagesElement.style.display="none"))},V.prototype.paginationDataSentNames={page:"page",size:"size",sorters:"sorters",filters:"filters"},V.prototype.paginationDataReceivedNames={current_page:"current_page",last_page:"last_page",data:"data"},h.prototype.registerModule("page",V);var j=function(e){this.table=e,this.mode="",this.id="",this.defWatcherBlock=!1,this.config={},this.readFunc=!1,this.writeFunc=!1};j.prototype.localStorageTest=function(){var e="_tabulator_test";try{return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch(e){return!1}},j.prototype.initialize=function(){var e,t=this.table.options.persistenceMode,o=this.table.options.persistenceID;this.mode=!0!==t?t:this.localStorageTest()?"local":"cookie",this.table.options.persistenceReaderFunc?"function"==typeof this.table.options.persistenceReaderFunc?this.readFunc=this.table.options.persistenceReaderFunc:this.readers[this.table.options.persistenceReaderFunc]?this.readFunc=this.readers[this.table.options.persistenceReaderFunc]:console.warn("Persistence Read Error - invalid reader set",this.table.options.persistenceReaderFunc):this.readers[this.mode]?this.readFunc=this.readers[this.mode]:console.warn("Persistence Read Error - invalid reader set",this.mode),
+this.table.options.persistenceWriterFunc?"function"==typeof this.table.options.persistenceWriterFunc?this.writeFunc=this.table.options.persistenceWriterFunc:this.readers[this.table.options.persistenceWriterFunc]?this.writeFunc=this.readers[this.table.options.persistenceWriterFunc]:console.warn("Persistence Write Error - invalid reader set",this.table.options.persistenceWriterFunc):this.writers[this.mode]?this.writeFunc=this.writers[this.mode]:console.warn("Persistence Write Error - invalid writer set",this.mode),this.id="tabulator-"+(o||this.table.element.getAttribute("id")||""),this.config={sort:!0===this.table.options.persistence||this.table.options.persistence.sort,filter:!0===this.table.options.persistence||this.table.options.persistence.filter,group:!0===this.table.options.persistence||this.table.options.persistence.group,page:!0===this.table.options.persistence||this.table.options.persistence.page,columns:!0===this.table.options.persistence?["title","width","visible"]:this.table.options.persistence.columns},this.config.page&&(e=this.retreiveData("page"))&&(void 0===e.paginationSize||!0!==this.config.page&&!this.config.page.size||(this.table.options.paginationSize=e.paginationSize),void 0===e.paginationInitialPage||!0!==this.config.page&&!this.config.page.page||(this.table.options.paginationInitialPage=e.paginationInitialPage)),this.config.group&&(e=this.retreiveData("group"))&&(void 0===e.groupBy||!0!==this.config.group&&!this.config.group.groupBy||(this.table.options.groupBy=e.groupBy),void 0===e.groupStartOpen||!0!==this.config.group&&!this.config.group.groupStartOpen||(this.table.options.groupStartOpen=e.groupStartOpen),void 0===e.groupHeader||!0!==this.config.group&&!this.config.group.groupHeader||(this.table.options.groupHeader=e.groupHeader)),this.config.columns&&(this.table.options.columns=this.load("columns",this.table.options.columns))},j.prototype.initializeColumn=function(e){var t,o,i=this;this.config.columns&&(this.defWatcherBlock=!0,t=e.getDefinition(),o=!0===this.config.columns?Object.keys(t):this.config.columns,o.forEach(function(e){var o=Object.getOwnPropertyDescriptor(t,e),n=t[e];o&&Object.defineProperty(t,e,{set:function(e){n=e,i.defWatcherBlock||i.save("columns"),o.set&&o.set(e)},get:function(){return o.get&&o.get(),n}})}),this.defWatcherBlock=!1)},j.prototype.load=function(e,t){var o=this.retreiveData(e);return t&&(o=o?this.mergeDefinition(t,o):t),o},j.prototype.retreiveData=function(e){return!!this.readFunc&&this.readFunc(this.id,e)},j.prototype.mergeDefinition=function(e,t){var o=this,i=[];return t=t||[],t.forEach(function(t,n){var s,a=o._findColumn(e,t);a&&(!0===o.config.columns||void 0==o.config.columns?(s=Object.keys(a),s.push("width")):s=o.config.columns,s.forEach(function(e){"columns"!==e&&void 0!==t[e]&&(a[e]=t[e])}),a.columns&&(a.columns=o.mergeDefinition(a.columns,t.columns)),i.push(a))}),e.forEach(function(e,n){o._findColumn(t,e)||(i.length>n?i.splice(n,0,e):i.push(e))}),i},j.prototype._findColumn=function(e,t){var o=t.columns?"group":t.field?"field":"object";return e.find(function(e){switch(o){case"group":return e.title===t.title&&e.columns.length===t.columns.length;case"field":return e.field===t.field;case"object":return e===t}})},j.prototype.save=function(e){var t={};switch(e){case"columns":t=this.parseColumns(this.table.columnManager.getColumns());break;case"filter":t=this.table.modules.filter.getFilters();break;case"sort":t=this.validateSorters(this.table.modules.sort.getSort());break;case"group":t=this.getGroupConfig();break;case"page":t=this.getPageConfig()}this.writeFunc&&this.writeFunc(this.id,e,t)},j.prototype.validateSorters=function(e){return e.forEach(function(e){e.column=e.field,delete e.field}),e},j.prototype.getGroupConfig=function(){var e={};return this.config.group&&((!0===this.config.group||this.config.group.groupBy)&&(e.groupBy=this.table.options.groupBy),(!0===this.config.group||this.config.group.groupStartOpen)&&(e.groupStartOpen=this.table.options.groupStartOpen),(!0===this.config.group||this.config.group.groupHeader)&&(e.groupHeader=this.table.options.groupHeader)),e},j.prototype.getPageConfig=function(){var e={};return this.config.page&&((!0===this.config.page||this.config.page.size)&&(e.paginationSize=this.table.modules.page.getPageSize()),(!0===this.config.page||this.config.page.page)&&(e.paginationInitialPage=this.table.modules.page.getPage())),e},j.prototype.parseColumns=function(e){var t=this,o=[],i=["headerContextMenu","headerMenu","contextMenu","clickMenu"];return e.forEach(function(e){var n,s={},a=e.getDefinition();e.isGroup?(s.title=a.title,s.columns=t.parseColumns(e.getColumns())):(s.field=e.getField(),!0===t.config.columns||void 0==t.config.columns?(n=Object.keys(a),n.push("width")):n=t.config.columns,n.forEach(function(t){switch(t){case"width":s.width=e.getWidth();break;case"visible":s.visible=e.visible;break;default:"function"!=typeof a[t]&&-1===i.indexOf(t)&&(s[t]=a[t])}})),o.push(s)}),o},j.prototype.readers={local:function(e,t){var o=localStorage.getItem(e+"-"+t);return!!o&&JSON.parse(o)},cookie:function(e,t){var o,i,n=document.cookie,s=e+"-"+t,a=n.indexOf(s+"=");return a>-1&&(n=n.substr(a),o=n.indexOf(";"),o>-1&&(n=n.substr(0,o)),i=n.replace(s+"=","")),!!i&&JSON.parse(i)}},j.prototype.writers={local:function(e,t,o){localStorage.setItem(e+"-"+t,JSON.stringify(o))},cookie:function(e,t,o){var i=new Date;i.setDate(i.getDate()+1e4),document.cookie=e+"-"+t+"="+JSON.stringify(o)+"; expires="+i.toUTCString()}},h.prototype.registerModule("persistence",j);var W=function(e){this.table=e,this.element=!1,this.manualBlock=!1};W.prototype.initialize=function(){window.addEventListener("beforeprint",this.replaceTable.bind(this)),window.addEventListener("afterprint",this.cleanup.bind(this))},W.prototype.replaceTable=function(){this.manualBlock||(this.element=document.createElement("div"),this.element.classList.add("tabulator-print-table"),this.element.appendChild(this.table.modules.export.genereateTable(this.table.options.printConfig,this.table.options.printStyled,this.table.options.printRowRange,"print")),this.table.element.style.display="none",this.table.element.parentNode.insertBefore(this.element,this.table.element))},W.prototype.cleanup=function(){document.body.classList.remove("tabulator-print-fullscreen-hide"),this.element&&this.element.parentNode&&(this.element.parentNode.removeChild(this.element),this.table.element.style.display="")},W.prototype.printFullscreen=function(e,t,o){var i,n,s=window.scrollX,a=window.scrollY,r=document.createElement("div"),l=document.createElement("div"),c=this.table.modules.export.genereateTable(void 0!==o?o:this.table.options.printConfig,void 0!==t?t:this.table.options.printStyled,e,"print");this.manualBlock=!0,this.element=document.createElement("div"),this.element.classList.add("tabulator-print-fullscreen"),this.table.options.printHeader&&(r.classList.add("tabulator-print-header"),i="function"==typeof this.table.options.printHeader?this.table.options.printHeader.call(this.table):this.table.options.printHeader,"string"==typeof i?r.innerHTML=i:r.appendChild(i),this.element.appendChild(r)),this.element.appendChild(c),this.table.options.printFooter&&(l.classList.add("tabulator-print-footer"),n="function"==typeof this.table.options.printFooter?this.table.options.printFooter.call(this.table):this.table.options.printFooter,"string"==typeof n?l.innerHTML=n:l.appendChild(n),this.element.appendChild(l)),document.body.classList.add("tabulator-print-fullscreen-hide"),document.body.appendChild(this.element),this.table.options.printFormatter&&this.table.options.printFormatter(this.element,c),window.print(),this.cleanup(),window.scrollTo(s,a),this.manualBlock=!1},h.prototype.registerModule("print",W);var G=function(e){this.table=e,this.data=!1,this.blocked=!1,this.origFuncs={},this.currentVersion=0};G.prototype.watchData=function(e){var t,o=this;this.currentVersion++,t=this.currentVersion,o.unwatchData(),o.data=e,o.origFuncs.push=e.push,Object.defineProperty(o.data,"push",{enumerable:!1,configurable:!0,value:function(){var i=Array.from(arguments);return o.blocked||t!==o.currentVersion||i.forEach(function(e){o.table.rowManager.addRowActual(e,!1)}),o.origFuncs.push.apply(e,arguments)}}),o.origFuncs.unshift=e.unshift,Object.defineProperty(o.data,"unshift",{enumerable:!1,configurable:!0,value:function(){var i=Array.from(arguments);return o.blocked||t!==o.currentVersion||i.forEach(function(e){o.table.rowManager.addRowActual(e,!0)}),o.origFuncs.unshift.apply(e,arguments)}}),o.origFuncs.shift=e.shift,Object.defineProperty(o.data,"shift",{enumerable:!1,configurable:!0,value:function(){var i;return o.blocked||t!==o.currentVersion||o.data.length&&(i=o.table.rowManager.getRowFromDataObject(o.data[0]))&&i.deleteActual(),o.origFuncs.shift.call(e)}}),o.origFuncs.pop=e.pop,Object.defineProperty(o.data,"pop",{enumerable:!1,configurable:!0,value:function(){var i;return o.blocked||t!==o.currentVersion||o.data.length&&(i=o.table.rowManager.getRowFromDataObject(o.data[o.data.length-1]))&&i.deleteActual(),o.origFuncs.pop.call(e)}}),o.origFuncs.splice=e.splice,Object.defineProperty(o.data,"splice",{enumerable:!1,configurable:!0,value:function(){var i,n=Array.from(arguments),s=n[0]<0?e.length+n[0]:n[0],a=n[1],r=!!n[2]&&n.slice(2);if(!o.blocked&&t===o.currentVersion){if(r&&(i=!!e[s]&&o.table.rowManager.getRowFromDataObject(e[s]),i?r.forEach(function(e){o.table.rowManager.addRowActual(e,!0,i,!0)}):(r=r.slice().reverse(),r.forEach(function(e){o.table.rowManager.addRowActual(e,!0,!1,!0)}))),0!==a){var l=e.slice(s,void 0===n[1]?n[1]:s+a);l.forEach(function(e,t){var i=o.table.rowManager.getRowFromDataObject(e);i&&i.deleteActual(t!==l.length-1)})}(r||0!==a)&&o.table.rowManager.reRenderInPosition()}return o.origFuncs.splice.apply(e,arguments)}})},G.prototype.unwatchData=function(){if(!1!==this.data)for(var e in this.origFuncs)Object.defineProperty(this.data,e,{enumerable:!0,configurable:!0,writable:!0,value:this.origFuncs.key})},G.prototype.watchRow=function(e){var t=e.getData();this.blocked=!0;for(var o in t)this.watchKey(e,t,o);this.table.options.dataTree&&this.watchTreeChildren(e),this.blocked=!1},G.prototype.watchTreeChildren=function(e){function t(){o.table.modules.dataTree.initializeRow(e),o.table.modules.dataTree.layoutRow(e),o.table.rowManager.refreshActiveData("tree",!1,!0)}var o=this,i=e.getData()[this.table.options.dataTreeChildField],n={};i&&(n.push=i.push,Object.defineProperty(i,"push",{enumerable:!1,configurable:!0,value:function(){var e=n.push.apply(i,arguments);return t(),e}}),n.unshift=i.unshift,Object.defineProperty(i,"unshift",{enumerable:!1,configurable:!0,value:function(){var e=n.unshift.apply(i,arguments);return t(),e}}),n.shift=i.shift,Object.defineProperty(i,"shift",{enumerable:!1,configurable:!0,value:function(){var e=n.shift.call(i);return t(),e}}),n.pop=i.pop,Object.defineProperty(i,"pop",{enumerable:!1,configurable:!0,value:function(){var e=n.pop.call(i);return t(),e}}),n.splice=i.splice,Object.defineProperty(i,"splice",{enumerable:!1,configurable:!0,value:function(){var e=n.splice.apply(i,arguments);return t(),e}}))},G.prototype.watchKey=function(e,t,o){var i=this,n=Object.getOwnPropertyDescriptor(t,o),s=t[o],a=this.currentVersion;Object.defineProperty(t,o,{set:function(t){if(s=t,!i.blocked&&a===i.currentVersion){var r={};r[o]=t,e.updateData(r)}n.set&&n.set(t)},get:function(){return n.get&&n.get(),s}})},G.prototype.unwatchRow=function(e){var t=e.getData();for(var o in t)Object.defineProperty(t,o,{value:t[o]})},G.prototype.block=function(){this.blocked=!0},G.prototype.unblock=function(){this.blocked=!1},h.prototype.registerModule("reactiveData",G);var U=function(e){this.table=e,this.startColumn=!1,this.startX=!1,this.startWidth=!1,this.handle=null,this.prevHandle=null};U.prototype.initializeColumn=function(e,t,o){var i=this,n=!1,s=this.table.options.resizableColumns;if("header"===e&&(n="textarea"==t.definition.formatter||t.definition.variableHeight,t.modules.resize={variableHeight:n}),!0===s||s==e){var a=document.createElement("div");a.className="tabulator-col-resize-handle";var r=document.createElement("div");r.className="tabulator-col-resize-handle prev",a.addEventListener("click",function(e){e.stopPropagation()});var l=function(e){var o=t.getLastColumn();o&&i._checkResizability(o)&&(i.startColumn=t,i._mouseDown(e,o,a))};a.addEventListener("mousedown",l),a.addEventListener("touchstart",l,{passive:!0}),a.addEventListener("dblclick",function(e){var o=t.getLastColumn();o&&i._checkResizability(o)&&(e.stopPropagation(),o.reinitializeWidth(!0))}),r.addEventListener("click",function(e){e.stopPropagation()});var c=function(e){var o,n,s;(o=t.getFirstColumn())&&(n=i.table.columnManager.findColumnIndex(o),(s=n>0&&i.table.columnManager.getColumnByIndex(n-1))&&i._checkResizability(s)&&(i.startColumn=t,i._mouseDown(e,s,r)))};r.addEventListener("mousedown",c),r.addEventListener("touchstart",c,{passive:!0}),r.addEventListener("dblclick",function(e){var o,n,s;(o=t.getFirstColumn())&&(n=i.table.columnManager.findColumnIndex(o),(s=n>0&&i.table.columnManager.getColumnByIndex(n-1))&&i._checkResizability(s)&&(e.stopPropagation(),s.reinitializeWidth(!0)))}),o.appendChild(a),o.appendChild(r)}},U.prototype._checkResizability=function(e){return void 0!==e.definition.resizable?e.definition.resizable:this.table.options.resizableColumns},U.prototype._mouseDown=function(e,t,o){function i(e){s.table.rtl?t.setWidth(s.startWidth-((void 0===e.screenX?e.touches[0].screenX:e.screenX)-s.startX)):t.setWidth(s.startWidth+((void 0===e.screenX?e.touches[0].screenX:e.screenX)-s.startX)),s.table.options.virtualDomHoz&&s.table.vdomHoz.reinitialize(!0),!s.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights()}function n(e){s.startColumn.modules.edit&&(s.startColumn.modules.edit.blocked=!1),s.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights(),document.body.removeEventListener("mouseup",n),document.body.removeEventListener("mousemove",i),o.removeEventListener("touchmove",i),o.removeEventListener("touchend",n),s.table.element.classList.remove("tabulator-block-select"),s.table.options.persistence&&s.table.modExists("persistence",!0)&&s.table.modules.persistence.config.columns&&s.table.modules.persistence.save("columns"),s.table.options.columnResized.call(s.table,t.getComponent())}var s=this;s.table.element.classList.add("tabulator-block-select"),e.stopPropagation(),s.startColumn.modules.edit&&(s.startColumn.modules.edit.blocked=!0),s.startX=void 0===e.screenX?e.touches[0].screenX:e.screenX,s.startWidth=t.getWidth(),document.body.addEventListener("mousemove",i),document.body.addEventListener("mouseup",n),o.addEventListener("touchmove",i,{passive:!0}),o.addEventListener("touchend",n)},h.prototype.registerModule("resizeColumns",U);var X=function(e){this.table=e,this.startColumn=!1,this.startY=!1,this.startHeight=!1,this.handle=null,this.prevHandle=null};X.prototype.initializeRow=function(e){var t=this,o=e.getElement(),i=document.createElement("div");i.className="tabulator-row-resize-handle";var n=document.createElement("div");n.className="tabulator-row-resize-handle prev",i.addEventListener("click",function(e){e.stopPropagation()});var s=function(o){t.startRow=e,t._mouseDown(o,e,i)};i.addEventListener("mousedown",s),i.addEventListener("touchstart",s,{passive:!0}),n.addEventListener("click",function(e){e.stopPropagation()});var a=function(o){var i=t.table.rowManager.prevDisplayRow(e);i&&(t.startRow=i,t._mouseDown(o,i,n))};n.addEventListener("mousedown",a),n.addEventListener("touchstart",a,{passive:!0}),o.appendChild(i),o.appendChild(n)},X.prototype._mouseDown=function(e,t,o){function i(e){t.setHeight(s.startHeight+((void 0===e.screenY?e.touches[0].screenY:e.screenY)-s.startY))}function n(e){document.body.removeEventListener("mouseup",i),document.body.removeEventListener("mousemove",i),o.removeEventListener("touchmove",i),o.removeEventListener("touchend",n),s.table.element.classList.remove("tabulator-block-select"),s.table.options.rowResized.call(this.table,t.getComponent())}var s=this;s.table.element.classList.add("tabulator-block-select"),e.stopPropagation(),s.startY=void 0===e.screenY?e.touches[0].screenY:e.screenY,s.startHeight=t.getHeight(),document.body.addEventListener("mousemove",i),document.body.addEventListener("mouseup",n),o.addEventListener("touchmove",i,{passive:!0}),o.addEventListener("touchend",n)},h.prototype.registerModule("resizeRows",X);var q=function(e){this.table=e,this.binding=!1,this.observer=!1,this.containerObserver=!1,this.tableHeight=0,this.tableWidth=0,this.containerHeight=0,this.containerWidth=0,this.autoResize=!1};q.prototype.initialize=function(e){var t,o=this,i=this.table;this.tableHeight=i.element.clientHeight,this.tableWidth=i.element.clientWidth,i.element.parentNode&&(this.containerHeight=i.element.parentNode.clientHeight,this.containerWidth=i.element.parentNode.clientWidth),"undefined"!=typeof ResizeObserver&&"virtual"===i.rowManager.getRenderMode()?(this.autoResize=!0,this.observer=new ResizeObserver(function(e){if(!i.browserMobile||i.browserMobile&&!i.modules.edit.currentCell){var t=Math.floor(e[0].contentRect.height),n=Math.floor(e[0].contentRect.width);o.tableHeight==t&&o.tableWidth==n||(o.tableHeight=t,o.tableWidth=n,i.element.parentNode&&(o.containerHeight=i.element.parentNode.clientHeight,o.containerWidth=i.element.parentNode.clientWidth),i.options.virtualDomHoz&&i.vdomHoz.reinitialize(!0),i.redraw())}}),this.observer.observe(i.element),t=window.getComputedStyle(i.element),this.table.element.parentNode&&!this.table.rowManager.fixedHeight&&(t.getPropertyValue("max-height")||t.getPropertyValue("min-height"))&&(this.containerObserver=new ResizeObserver(function(e){if(!i.browserMobile||i.browserMobile&&!i.modules.edit.currentCell){var t=Math.floor(e[0].contentRect.height),n=Math.floor(e[0].contentRect.width);o.containerHeight==t&&o.containerWidth==n||(o.containerHeight=t,o.containerWidth=n,o.tableHeight=i.element.clientHeight,o.tableWidth=i.element.clientWidth),i.options.virtualDomHoz&&i.vdomHoz.reinitialize(!0),i.redraw()}}),this.containerObserver.observe(this.table.element.parentNode))):(this.binding=function(){(!i.browserMobile||i.browserMobile&&!i.modules.edit.currentCell)&&(i.options.virtualDomHoz&&i.vdomHoz.reinitialize(!0),i.redraw())},window.addEventListener("resize",this.binding))},q.prototype.clearBindings=function(e){this.binding&&window.removeEventListener("resize",this.binding),this.observer&&this.observer.unobserve(this.table.element),this.containerObserver&&this.containerObserver.unobserve(this.table.element.parentNode)},h.prototype.registerModule("resizeTable",q);var Y=function(e){this.table=e,this.columns=[],this.hiddenColumns=[],this.mode="",this.index=0,this.collapseFormatter=[],this.collapseStartOpen=!0,this.collapseHandleColumn=!1};Y.prototype.initialize=function(){var e=this,t=[];this.mode=this.table.options.responsiveLayout,this.collapseFormatter=this.table.options.responsiveLayoutCollapseFormatter||this.formatCollapsedData,this.collapseStartOpen=this.table.options.responsiveLayoutCollapseStartOpen,this.hiddenColumns=[],this.table.columnManager.columnsByIndex.forEach(function(o,i){o.modules.responsive&&o.modules.responsive.order&&o.modules.responsive.visible&&(o.modules.responsive.index=i,t.push(o),o.visible||"collapse"!==e.mode||e.hiddenColumns.push(o))}),t=t.reverse(),t=t.sort(function(e,t){return t.modules.responsive.order-e.modules.responsive.order||t.modules.responsive.index-e.modules.responsive.index}),this.columns=t,"collapse"===this.mode&&this.generateCollapsedContent();for(var o=this.table.columnManager.columnsByIndex,i=Array.isArray(o),n=0,o=i?o:o[Symbol.iterator]();;){var s;if(i){if(n>=o.length)break;s=o[n++]}else{if(n=o.next(),n.done)break;s=n.value}var a=s;if("responsiveCollapse"==a.definition.formatter){this.collapseHandleColumn=a;break}}this.collapseHandleColumn&&(this.hiddenColumns.length?this.collapseHandleColumn.show():this.collapseHandleColumn.hide())},Y.prototype.initializeColumn=function(e){var t=e.getDefinition();e.modules.responsive={order:void 0===t.responsive?1:t.responsive,visible:!1!==t.visible}},Y.prototype.initializeRow=function(e){var t;"calc"!==e.type&&(t=document.createElement("div"),t.classList.add("tabulator-responsive-collapse"),e.modules.responsiveLayout={element:t,open:this.collapseStartOpen},this.collapseStartOpen||(t.style.display="none"))},Y.prototype.layoutRow=function(e){var t=e.getElement();e.modules.responsiveLayout&&(t.appendChild(e.modules.responsiveLayout.element),this.generateCollapsedRowContent(e))},Y.prototype.updateColumnVisibility=function(e,t){e.modules.responsive&&(e.modules.responsive.visible=t,this.initialize())},Y.prototype.hideColumn=function(e){var t=this.hiddenColumns.length;e.hide(!1,!0),"collapse"===this.mode&&(this.hiddenColumns.unshift(e),this.generateCollapsedContent(),this.collapseHandleColumn&&!t&&this.collapseHandleColumn.show())},Y.prototype.showColumn=function(e){var t;e.show(!1,!0),e.setWidth(e.getWidth()),"collapse"===this.mode&&(t=this.hiddenColumns.indexOf(e),t>-1&&this.hiddenColumns.splice(t,1),this.generateCollapsedContent(),this.collapseHandleColumn&&!this.hiddenColumns.length&&this.collapseHandleColumn.hide())},Y.prototype.update=function(){for(var e=this,t=!0;t;){var o="fitColumns"==e.table.modules.layout.getMode()?e.table.columnManager.getFlexBaseWidth():e.table.columnManager.getWidth(),i=(e.table.options.headerVisible?e.table.columnManager.element.clientWidth:e.table.element.clientWidth)-o;if(i<0){var n=e.columns[e.index];n?(e.hideColumn(n),e.index++):t=!1}else{var s=e.columns[e.index-1];s&&i>0&&i>=s.getWidth()?(e.showColumn(s),e.index--):t=!1}e.table.rowManager.activeRowsCount||e.table.rowManager.renderEmptyScroll()}},Y.prototype.generateCollapsedContent=function(){var e=this;this.table.rowManager.getDisplayRows().forEach(function(t){e.generateCollapsedRowContent(t)})},Y.prototype.generateCollapsedRowContent=function(e){var t,o;if(e.modules.responsiveLayout){for(t=e.modules.responsiveLayout.element;t.firstChild;)t.removeChild(t.firstChild);o=this.collapseFormatter(this.generateCollapsedRowData(e)),o&&t.appendChild(o)}},Y.prototype.generateCollapsedRowData=function(e){var t,o=this,i=e.getData(),n=[];return this.hiddenColumns.forEach(function(s){var a=s.getFieldValue(i);s.definition.title&&s.field&&(s.modules.format&&o.table.options.responsiveLayoutCollapseUseFormatters?(t={value:!1,data:{},getValue:function(){return a},getData:function(){return i},getElement:function(){return document.createElement("div")},getRow:function(){return e.getComponent()},getColumn:function(){return s.getComponent()}},n.push({field:s.field,title:s.definition.title,value:s.modules.format.formatter.call(o.table.modules.format,t,s.modules.format.params)})):n.push({field:s.field,title:s.definition.title,value:a}))}),n},Y.prototype.formatCollapsedData=function(e){var t=document.createElement("table");return e.forEach(function(e){var o,i=document.createElement("tr"),n=document.createElement("td"),s=document.createElement("td"),a=document.createElement("strong");n.appendChild(a),this.table.modules.localize.bind("columns|"+e.field,function(t){a.innerText=t||e.title}),e.value instanceof Node?(o=document.createElement("div"),o.appendChild(e.value),s.appendChild(o)):s.innerHTML=e.value,i.appendChild(n),i.appendChild(s),t.appendChild(i)},this),Object.keys(e).length?t:""},h.prototype.registerModule("responsiveLayout",Y);var K=function(e){this.table=e,this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],this.headerCheckboxElement=null};K.prototype.clearSelectionData=function(e){this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],e||this._rowSelectionChanged()},K.prototype.initializeRow=function(e){var t=this,o=e.getElement(),i=function e(){setTimeout(function(){t.selecting=!1},50),document.body.removeEventListener("mouseup",e)};e.modules.select={selected:!1},t.table.options.selectableCheck.call(this.table,e.getComponent())?(o.classList.add("tabulator-selectable"),o.classList.remove("tabulator-unselectable"),t.table.options.selectable&&"highlight"!=t.table.options.selectable&&("click"===t.table.options.selectableRangeMode?o.addEventListener("click",function(o){if(o.shiftKey){t.table._clearSelection(),t.lastClickedRow=t.lastClickedRow||e;var i=t.table.rowManager.getDisplayRowIndex(t.lastClickedRow),n=t.table.rowManager.getDisplayRowIndex(e),s=i<=n?i:n,a=i>=n?i:n,r=t.table.rowManager.getDisplayRows().slice(0),l=r.splice(s,a-s+1);o.ctrlKey||o.metaKey?(l.forEach(function(o){o!==t.lastClickedRow&&(!0===t.table.options.selectable||t.isRowSelected(e)?t.toggleRow(o):t.selectedRows.length<t.table.options.selectable&&t.toggleRow(o))}),t.lastClickedRow=e):(t.deselectRows(void 0,!0),!0!==t.table.options.selectable&&l.length>t.table.options.selectable&&(l=l.slice(0,t.table.options.selectable)),t.selectRows(l)),t.table._clearSelection()}else o.ctrlKey||o.metaKey?(t.toggleRow(e),t.lastClickedRow=e):(t.deselectRows(void 0,!0),t.selectRows(e),t.lastClickedRow=e)}):(o.addEventListener("click",function(o){t.table.modExists("edit")&&t.table.modules.edit.getCurrentCell()||t.table._clearSelection(),t.selecting||t.toggleRow(e)}),o.addEventListener("mousedown",function(o){if(o.shiftKey)return t.table._clearSelection(),t.selecting=!0,t.selectPrev=[],document.body.addEventListener("mouseup",i),document.body.addEventListener("keyup",i),t.toggleRow(e),!1}),o.addEventListener("mouseenter",function(o){t.selecting&&(t.table._clearSelection(),t.toggleRow(e),t.selectPrev[1]==e&&t.toggleRow(t.selectPrev[0]))}),o.addEventListener("mouseout",function(o){t.selecting&&(t.table._clearSelection(),t.selectPrev.unshift(e))})))):(o.classList.add("tabulator-unselectable"),o.classList.remove("tabulator-selectable"))},K.prototype.toggleRow=function(e){this.table.options.selectableCheck.call(this.table,e.getComponent())&&(e.modules.select&&e.modules.select.selected?this._deselectRow(e):this._selectRow(e))},K.prototype.selectRows=function(e){var t,o=this;switch(void 0===e?"undefined":_typeof(e)){case"undefined":this.table.rowManager.rows.forEach(function(e){o._selectRow(e,!0,!0)}),this._rowSelectionChanged();break;case"string":t=this.table.rowManager.findRow(e),t?this._selectRow(t,!0,!0):this.table.rowManager.getRows(e).forEach(function(e){o._selectRow(e,!0,!0)}),this._rowSelectionChanged();break;default:Array.isArray(e)?(e.forEach(function(e){o._selectRow(e,!0,!0)}),this._rowSelectionChanged()):this._selectRow(e,!1,!0)}},K.prototype._selectRow=function(e,t,o){if(!isNaN(this.table.options.selectable)&&!0!==this.table.options.selectable&&!o&&this.selectedRows.length>=this.table.options.selectable){if(!this.table.options.selectableRollingSelection)return!1;this._deselectRow(this.selectedRows[0])}var i=this.table.rowManager.findRow(e);i?-1==this.selectedRows.indexOf(i)&&(i.getElement().classList.add("tabulator-selected"),i.modules.select||(i.modules.select={}),i.modules.select.selected=!0,i.modules.select.checkboxEl&&(i.modules.select.checkboxEl.checked=!0),this.selectedRows.push(i),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(i,!0),t||this.table.options.rowSelected.call(this.table,i.getComponent()),this._rowSelectionChanged(t)):t||console.warn("Selection Error - No such row found, ignoring selection:"+e)},K.prototype.isRowSelected=function(e){return-1!==this.selectedRows.indexOf(e)},K.prototype.deselectRows=function(e,t){var o,i=this;if(void 0===e){o=i.selectedRows.length;for(var n=0;n<o;n++)i._deselectRow(i.selectedRows[0],!0);i._rowSelectionChanged(t)}else Array.isArray(e)?(e.forEach(function(e){i._deselectRow(e,!0)}),i._rowSelectionChanged(t)):i._deselectRow(e,t)},K.prototype._deselectRow=function(e,t){var o,i=this,n=i.table.rowManager.findRow(e);n?(o=i.selectedRows.findIndex(function(e){return e==n}))>-1&&(n.getElement().classList.remove("tabulator-selected"),n.modules.select||(n.modules.select={}),n.modules.select.selected=!1,n.modules.select.checkboxEl&&(n.modules.select.checkboxEl.checked=!1),i.selectedRows.splice(o,1),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(n,!1),t||i.table.options.rowDeselected.call(this.table,n.getComponent()),i._rowSelectionChanged(t)):t||console.warn("Deselection Error - No such row found, ignoring selection:"+e)},K.prototype.getSelectedData=function(){var e=[];return this.selectedRows.forEach(function(t){e.push(t.getData())}),e},K.prototype.getSelectedRows=function(){var e=[];return this.selectedRows.forEach(function(t){e.push(t.getComponent())}),e},K.prototype._rowSelectionChanged=function(e){this.headerCheckboxElement&&(0===this.selectedRows.length?(this.headerCheckboxElement.checked=!1,this.headerCheckboxElement.indeterminate=!1):this.table.rowManager.rows.length===this.selectedRows.length?(this.headerCheckboxElement.checked=!0,this.headerCheckboxElement.indeterminate=!1):(this.headerCheckboxElement.indeterminate=!0,this.headerCheckboxElement.checked=!1)),e||this.table.options.rowSelectionChanged.call(this.table,this.getSelectedData(),this.getSelectedRows())},K.prototype.registerRowSelectCheckbox=function(e,t){e._row.modules.select||(e._row.modules.select={}),e._row.modules.select.checkboxEl=t},K.prototype.registerHeaderSelectCheckbox=function(e){this.headerCheckboxElement=e},K.prototype.childRowSelection=function(e,t){var o=this.table.modules.dataTree.getChildren(e,!0);if(t)for(var i=o,n=Array.isArray(i),s=0,i=n?i:i[Symbol.iterator]();;){var a;if(n){if(s>=i.length)break;a=i[s++]}else{if(s=i.next(),s.done)break;a=s.value}var r=a;this._selectRow(r,!0)}else for(var l=o,c=Array.isArray(l),u=0,l=c?l:l[Symbol.iterator]();;){var d;if(c){if(u>=l.length)break;d=l[u++]}else{if(u=l.next(),u.done)break;d=u.value}var h=d;this._deselectRow(h,!0)}},h.prototype.registerModule("selectRow",K);var J=function(e){this.table=e,this.sortList=[],this.changed=!1};J.prototype.initializeColumn=function(e,t){var o,i,n=this,s=!1;switch(_typeof(e.definition.sorter)){case"string":n.sorters[e.definition.sorter]?s=n.sorters[e.definition.sorter]:console.warn("Sort Error - No such sorter found: ",e.definition.sorter);break;case"function":s=e.definition.sorter}e.modules.sort={sorter:s,dir:"none",params:e.definition.sorterParams||{},startingDir:e.definition.headerSortStartingDir||"asc",tristate:void 0!==e.definition.headerSortTristate?e.definition.headerSortTristate:this.table.options.headerSortTristate},(void 0===e.definition.headerSort?!1!==this.table.options.headerSort:!1!==e.definition.headerSort)&&(o=e.getElement(),o.classList.add("tabulator-sortable"),i=document.createElement("div"),i.classList.add("tabulator-col-sorter"),"object"==_typeof(this.table.options.headerSortElement)?i.appendChild(this.table.options.headerSortElement):i.innerHTML=this.table.options.headerSortElement,t.appendChild(i),e.modules.sort.element=i,o.addEventListener("click",function(t){var o="",i=[],s=!1;if(e.modules.sort){if(e.modules.sort.tristate)o="none"==e.modules.sort.dir?e.modules.sort.startingDir:e.modules.sort.dir==e.modules.sort.startingDir?"asc"==e.modules.sort.dir?"desc":"asc":"none";else switch(e.modules.sort.dir){case"asc":o="desc";break;case"desc":o="asc";break;default:o=e.modules.sort.startingDir}n.table.options.columnHeaderSortMulti&&(t.shiftKey||t.ctrlKey)?(i=n.getSort(),s=i.findIndex(function(t){return t.field===e.getField()}),s>-1?(i[s].dir=o,s!=i.length-1&&(s=i.splice(s,1)[0],"none"!=o&&i.push(s))):"none"!=o&&i.push({column:e,dir:o}),n.setSort(i)):"none"==o?n.clear():n.setSort(e,o),n.table.rowManager.sorterRefresh(!n.sortList.length)}}))},J.prototype.hasChanged=function(){var e=this.changed;return this.changed=!1,e},J.prototype.getSort=function(){var e=this,t=[];return e.sortList.forEach(function(e){e.column&&t.push({column:e.column.getComponent(),field:e.column.getField(),dir:e.dir})}),t},J.prototype.setSort=function(e,t){var o=this,i=[];Array.isArray(e)||(e=[{column:e,dir:t}]),e.forEach(function(e){var t
+;t=o.table.columnManager.findColumn(e.column),t?(e.column=t,i.push(e),o.changed=!0):console.warn("Sort Warning - Sort field does not exist and is being ignored: ",e.column)}),o.sortList=i,this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.sort&&this.table.modules.persistence.save("sort")},J.prototype.clear=function(){this.setSort([])},J.prototype.findSorter=function(e){var t,o=this.table.rowManager.activeRows[0],i="string";if(o&&(o=o.getData(),e.getField()))switch(t=e.getFieldValue(o),void 0===t?"undefined":_typeof(t)){case"undefined":i="string";break;case"boolean":i="boolean";break;default:isNaN(t)||""===t?t.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)&&(i="alphanum"):i="number"}return this.sorters[i]},J.prototype.sort=function(e){var t=this,o=this.table.options.sortOrderReverse?t.sortList.slice().reverse():t.sortList,i=[],n=[];t.table.options.dataSorting&&t.table.options.dataSorting.call(t.table,t.getSort()),t.clearColumnHeaders(),t.table.options.ajaxSorting?o.forEach(function(e,o){t.setColumnHeader(e.column,e.dir)}):(o.forEach(function(e,o){var n=e.column.modules.sort;e.column&&n&&(n.sorter||(n.sorter=t.findSorter(e.column)),e.params="function"==typeof n.params?n.params(e.column.getComponent(),e.dir):n.params,i.push(e)),t.setColumnHeader(e.column,e.dir)}),i.length&&t._sortItems(e,i)),t.table.options.dataSorted&&(e.forEach(function(e){n.push(e.getComponent())}),t.table.options.dataSorted.call(t.table,t.getSort(),n))},J.prototype.clearColumnHeaders=function(){this.table.columnManager.getRealColumns().forEach(function(e){e.modules.sort&&(e.modules.sort.dir="none",e.getElement().setAttribute("aria-sort","none"))})},J.prototype.setColumnHeader=function(e,t){e.modules.sort.dir=t,e.getElement().setAttribute("aria-sort",t)},J.prototype._sortItems=function(e,t){var o=this,i=t.length-1;e.sort(function(e,n){for(var s,a=i;a>=0;a--){var r=t[a];if(0!==(s=o._sortRow(e,n,r.column,r.dir,r.params)))break}return s})},J.prototype._sortRow=function(e,t,o,i,n){var s,a,r="asc"==i?e:t,l="asc"==i?t:e;return e=o.getFieldValue(r.getData()),t=o.getFieldValue(l.getData()),e=void 0!==e?e:"",t=void 0!==t?t:"",s=r.getComponent(),a=l.getComponent(),o.modules.sort.sorter.call(this,e,t,s,a,o.getComponent(),i,n)},J.prototype.sorters={number:function(e,t,o,i,n,s,a){var r=a.alignEmptyValues,l=a.decimalSeparator,c=a.thousandSeparator,u=0;if(e=String(e),t=String(t),c&&(e=e.split(c).join(""),t=t.split(c).join("")),l&&(e=e.split(l).join("."),t=t.split(l).join(".")),e=parseFloat(e),t=parseFloat(t),isNaN(e))u=isNaN(t)?0:-1;else{if(!isNaN(t))return e-t;u=1}return("top"===r&&"desc"===s||"bottom"===r&&"asc"===s)&&(u*=-1),u},string:function(e,t,o,i,n,s,a){var r,l=a.alignEmptyValues,c=0;if(e){if(t){switch(_typeof(a.locale)){case"boolean":a.locale&&(r=this.table.modules.localize.getLocale());break;case"string":r=a.locale}return String(e).toLowerCase().localeCompare(String(t).toLowerCase(),r)}c=1}else c=t?-1:0;return("top"===l&&"desc"===s||"bottom"===l&&"asc"===s)&&(c*=-1),c},date:function(e,t,o,i,n,s,a){return a.format||(a.format="DD/MM/YYYY"),this.sorters.datetime.call(this,e,t,o,i,n,s,a)},time:function(e,t,o,i,n,s,a){return a.format||(a.format="HH:mm"),this.sorters.datetime.call(this,e,t,o,i,n,s,a)},datetime:function(e,t,o,i,n,s,a){var r=a.format||"DD/MM/YYYY HH:mm:ss",l=a.alignEmptyValues,c=0;if("undefined"!=typeof moment){if(e=moment(e,r),t=moment(t,r),e.isValid()){if(t.isValid())return e-t;c=1}else c=t.isValid()?-1:0;return("top"===l&&"desc"===s||"bottom"===l&&"asc"===s)&&(c*=-1),c}console.error("Sort Error - 'datetime' sorter is dependant on moment.js")},boolean:function(e,t,o,i,n,s,a){return(!0===e||"true"===e||"True"===e||1===e?1:0)-(!0===t||"true"===t||"True"===t||1===t?1:0)},array:function(e,t,o,i,n,s,a){function r(e){switch(u){case"length":return e.length;case"sum":return e.reduce(function(e,t){return e+t});case"max":return Math.max.apply(null,e);case"min":return Math.min.apply(null,e);case"avg":return e.reduce(function(e,t){return e+t})/e.length}}var l=0,c=0,u=a.type||"length",d=a.alignEmptyValues,h=0;if(Array.isArray(e)){if(Array.isArray(t))return l=e?r(e):0,c=t?r(t):0,l-c;d=1}else d=Array.isArray(t)?-1:0;return("top"===d&&"desc"===s||"bottom"===d&&"asc"===s)&&(h*=-1),h},exists:function(e,t,o,i,n,s,a){return(void 0===e?0:1)-(void 0===t?0:1)},alphanum:function(e,t,o,i,n,s,a){var r,l,c,u,d,h=0,p=/(\d+)|(\D+)/g,m=/\d/,f=a.alignEmptyValues,g=0;if(e||0===e){if(t||0===t){if(isFinite(e)&&isFinite(t))return e-t;if(r=String(e).toLowerCase(),l=String(t).toLowerCase(),r===l)return 0;if(!m.test(r)||!m.test(l))return r>l?1:-1;for(r=r.match(p),l=l.match(p),d=r.length>l.length?l.length:r.length;h<d;)if(c=r[h],u=l[h++],c!==u)return isFinite(c)&&isFinite(u)?("0"===c.charAt(0)&&(c="."+c),"0"===u.charAt(0)&&(u="."+u),c-u):c>u?1:-1;return r.length>l.length}g=1}else g=t||0===t?-1:0;return("top"===f&&"desc"===s||"bottom"===f&&"asc"===s)&&(g*=-1),g}},h.prototype.registerModule("sort",J);var $=function(e){this.table=e,this.invalidCells=[]};return $.prototype.initializeColumn=function(e){var t,o=this,i=[];e.definition.validator&&(Array.isArray(e.definition.validator)?e.definition.validator.forEach(function(e){(t=o._extractValidator(e))&&i.push(t)}):(t=this._extractValidator(e.definition.validator))&&i.push(t),e.modules.validate=!!i.length&&i)},$.prototype._extractValidator=function(e){var t,o,i;switch(void 0===e?"undefined":_typeof(e)){case"string":return i=e.indexOf(":"),i>-1?(t=e.substring(0,i),o=e.substring(i+1)):t=e,this._buildValidator(t,o);case"function":return this._buildValidator(e);case"object":return this._buildValidator(e.type,e.parameters)}},$.prototype._buildValidator=function(e,t){var o="function"==typeof e?e:this.validators[e];return o?{type:"function"==typeof e?"function":e,func:o,params:t}:(console.warn("Validator Setup Error - No matching validator found:",e),!1)},$.prototype.validate=function(e,t,o){var i=this,n=[],s=this.invalidCells.indexOf(t);return e&&e.forEach(function(e){e.func.call(i,t.getComponent(),o,e.params)||n.push({type:e.type,parameters:e.params})}),n=!n.length||n,t.modules.validate||(t.modules.validate={}),!0===n?(t.modules.validate.invalid=!1,t.getElement().classList.remove("tabulator-validation-fail"),s>-1&&this.invalidCells.splice(s,1)):(t.modules.validate.invalid=!0,"manual"!==this.table.options.validationMode&&t.getElement().classList.add("tabulator-validation-fail"),-1==s&&this.invalidCells.push(t)),n},$.prototype.getInvalidCells=function(){var e=[];return this.invalidCells.forEach(function(t){e.push(t.getComponent())}),e},$.prototype.clearValidation=function(e){var t;e.modules.validate&&e.modules.validate.invalid&&(e.getElement().classList.remove("tabulator-validation-fail"),e.modules.validate.invalid=!1,(t=this.invalidCells.indexOf(e))>-1&&this.invalidCells.splice(t,1))},$.prototype.validators={integer:function(e,t,o){return""===t||null===t||void 0===t||"number"==typeof(t=Number(t))&&isFinite(t)&&Math.floor(t)===t},float:function(e,t,o){return""===t||null===t||void 0===t||"number"==typeof(t=Number(t))&&isFinite(t)&&t%1!=0},numeric:function(e,t,o){return""===t||null===t||void 0===t||!isNaN(t)},string:function(e,t,o){return""===t||null===t||void 0===t||isNaN(t)},max:function(e,t,o){return""===t||null===t||void 0===t||parseFloat(t)<=o},min:function(e,t,o){return""===t||null===t||void 0===t||parseFloat(t)>=o},starts:function(e,t,o){return""===t||null===t||void 0===t||String(t).toLowerCase().startsWith(String(o).toLowerCase())},ends:function(e,t,o){return""===t||null===t||void 0===t||String(t).toLowerCase().endsWith(String(o).toLowerCase())},minLength:function(e,t,o){return""===t||null===t||void 0===t||String(t).length>=o},maxLength:function(e,t,o){return""===t||null===t||void 0===t||String(t).length<=o},in:function(e,t,o){return""===t||null===t||void 0===t||("string"==typeof o&&(o=o.split("|")),""===t||o.indexOf(t)>-1)},regex:function(e,t,o){return""===t||null===t||void 0===t||new RegExp(o).test(t)},unique:function(e,t,o){if(""===t||null===t||void 0===t)return!0;var i=!0,n=e.getData(),s=e.getColumn()._getSelf();return this.table.rowManager.rows.forEach(function(e){var o=e.getData();o!==n&&t==s.getFieldValue(o)&&(i=!1)}),i},required:function(e,t,o){return""!==t&&null!==t&&void 0!==t}},h.prototype.registerModule("validate",$),h});
\ No newline at end of file
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
'use strict';
_this4.table.modules.columnCalcs.recalc(_this4.table.rowManager.activeRows);
}
- _this4.redraw();
+ _this4.redraw(true);
if (_this4.table.modules.layout.getMode() != "fitColumns") {
this.width = null; //column width
this.widthStyled = ""; //column width prestyled to improve render efficiency
+ this.maxWidth = null; //column maximum width
+ this.maxWidthStyled = ""; //column maximum prestyled to improve render efficiency
this.minWidth = null; //column minimum width
this.minWidthStyled = ""; //column minimum prestyled to improve render efficiency
this.widthFixed = false; //user has specified a width for this column
//set min width if present
this.setMinWidth(typeof def.minWidth == "undefined" ? this.table.options.columnMinWidth : parseInt(def.minWidth));
+ if (def.maxWidth || this.table.options.columnMaxWidth) {
+ if (def.maxWidth !== false) {
+ this.setMaxWidth(typeof def.maxWidth == "undefined" ? this.table.options.columnMaxWidth : parseInt(def.maxWidth));
+ }
+ }
+
this.reinitializeWidth();
//set tooltip if present
this.table.modules.menu.initializeColumnHeader(this);
}
+ this.titleElement.style.textAlign = this.definition.headerHozAlign || this.table.options.headerHozAlign;
+
this.element.appendChild(this.groupElement);
};
if (this.parent.isGroup) {
this.parent.matchChildWidths();
}
+
+ if (!this.silent && this.table.options.virtualDomHoz) {
+ this.table.vdomHoz.reinitialize();
+ }
}
};
if (this.parent.isGroup) {
this.parent.matchChildWidths();
}
+
+ if (!this.silent && this.table.options.virtualDomHoz) {
+ this.table.vdomHoz.reinitialize();
+ }
}
};
}
};
+Column.prototype.removeChild = function (child) {
+ var index = this.columns.indexOf(child);
+
+ if (index > -1) {
+ this.columns.splice(index, 1);
+ }
+
+ if (!this.columns.length) {
+ this.delete();
+ }
+};
+
Column.prototype.setWidth = function (width) {
this.widthFixed = true;
this.setWidthActual(width);
width = Math.max(this.minWidth, width);
+ if (this.maxWidth) {
+ width = Math.min(this.maxWidth, width);
+ }
+
this.width = width;
this.widthStyled = width ? width + "px" : "";
});
};
+Column.prototype.setMaxWidth = function (maxWidth) {
+ this.maxWidth = maxWidth;
+ this.maxWidthStyled = maxWidth ? maxWidth + "px" : "";
+
+ this.element.style.maxWidth = this.maxWidthStyled;
+
+ this.cells.forEach(function (cell) {
+ cell.setMaxWidth();
+ });
+};
+
Column.prototype.delete = function () {
var _this9 = this;
return new Promise(function (resolve, reject) {
+ var index;
if (_this9.isGroup) {
_this9.columns.forEach(function (column) {
_this9.titleElement = false;
_this9.groupElement = false;
+ if (_this9.parent.isGroup) {
+ _this9.parent.removeChild(_this9);
+ }
+
_this9.table.columnManager.deregisterColumn(_this9);
if (_this9.table.options.virtualDomHoz) {
var definition;
if (!_this10.isGroup) {
- definition = Object.assign({}, _this10.getDefinition());
- definition = Object.assign(definition, updates);
+ if (!_this10.parent.isGroup) {
+ definition = Object.assign({}, _this10.getDefinition());
+ definition = Object.assign(definition, updates);
- _this10.table.columnManager.addColumn(definition, false, _this10).then(function (column) {
+ _this10.table.columnManager.addColumn(definition, false, _this10).then(function (column) {
- if (definition.field == _this10.field) {
- _this10.field = false; //cleair field name to prevent deletion of duplicate column from arrays
- }
+ if (definition.field == _this10.field) {
+ _this10.field = false; //cleair field name to prevent deletion of duplicate column from arrays
+ }
- _this10.delete().then(function () {
- resolve(column.getComponent());
+ _this10.delete().then(function () {
+ resolve(column.getComponent());
+ }).catch(function (err) {
+ reject(err);
+ });
}).catch(function (err) {
reject(err);
});
- }).catch(function (err) {
- reject(err);
- });
+ } else {
+ console.warn("Column Update Error - The updateDefinition function is only available on ungrouped columns");
+ reject("Column Update Error - The updateDefinition function is only available on columns, not column groups");
+ }
} else {
- console.warn("Column Update Error - The updateDefinition function is only available on columns, not column groups");
+ console.warn("Column Update Error - The updateDefinition function is only available on ungrouped columns");
reject("Column Update Error - The updateDefinition function is only available on columns, not column groups");
}
});
}
};
-Column.prototype.defaultOptionList = ["title", "field", "columns", "visible", "align", "hozAlign", "vertAlign", "width", "minWidth", "widthGrow", "widthShrink", "resizable", "frozen", "responsive", "tooltip", "cssClass", "rowHandle", "hideInHtml", "print", "htmlOutput", "sorter", "sorterParams", "formatter", "formatterParams", "variableHeight", "editable", "editor", "editorParams", "validator", "mutator", "mutatorParams", "mutatorData", "mutatorDataParams", "mutatorEdit", "mutatorEditParams", "mutatorClipboard", "mutatorClipboardParams", "accessor", "accessorParams", "accessorData", "accessorDataParams", "accessorDownload", "accessorDownloadParams", "accessorClipboard", "accessorClipboardParams", "accessorPrint", "accessorPrintParams", "accessorHtmlOutput", "accessorHtmlOutputParams", "clipboard", "download", "downloadTitle", "topCalc", "topCalcParams", "topCalcFormatter", "topCalcFormatterParams", "bottomCalc", "bottomCalcParams", "bottomCalcFormatter", "bottomCalcFormatterParams", "cellClick", "cellDblClick", "cellContext", "cellTap", "cellDblTap", "cellTapHold", "cellMouseEnter", "cellMouseLeave", "cellMouseOver", "cellMouseOut", "cellMouseMove", "cellEditing", "cellEdited", "cellEditCancelled", "headerSort", "headerSortStartingDir", "headerSortTristate", "headerClick", "headerDblClick", "headerContext", "headerTap", "headerDblTap", "headerTapHold", "headerTooltip", "headerVertical", "headerHozAlign", "editableTitle", "titleFormatter", "titleFormatterParams", "headerFilter", "headerFilterPlaceholder", "headerFilterParams", "headerFilterEmptyCheck", "headerFilterFunc", "headerFilterFuncParams", "headerFilterLiveFilter", "print", "headerContextMenu", "headerMenu", "contextMenu",
+Column.prototype.defaultOptionList = ["title", "field", "columns", "visible", "align", "hozAlign", "vertAlign", "width", "minWidth", "maxWidth", "widthGrow", "widthShrink", "resizable", "frozen", "responsive", "tooltip", "cssClass", "rowHandle", "hideInHtml", "print", "htmlOutput", "sorter", "sorterParams", "formatter", "formatterParams", "variableHeight", "editable", "editor", "editorParams", "validator", "mutator", "mutatorParams", "mutatorData", "mutatorDataParams", "mutatorEdit", "mutatorEditParams", "mutatorClipboard", "mutatorClipboardParams", "accessor", "accessorParams", "accessorData", "accessorDataParams", "accessorDownload", "accessorDownloadParams", "accessorClipboard", "accessorClipboardParams", "accessorPrint", "accessorPrintParams", "accessorHtmlOutput", "accessorHtmlOutputParams", "clipboard", "download", "downloadTitle", "topCalc", "topCalcParams", "topCalcFormatter", "topCalcFormatterParams", "bottomCalc", "bottomCalcParams", "bottomCalcFormatter", "bottomCalcFormatterParams", "cellClick", "cellDblClick", "cellContext", "cellTap", "cellDblTap", "cellTapHold", "cellMouseEnter", "cellMouseLeave", "cellMouseOver", "cellMouseOut", "cellMouseMove", "cellEditing", "cellEdited", "cellEditCancelled", "headerSort", "headerSortStartingDir", "headerSortTristate", "headerClick", "headerDblClick", "headerContext", "headerTap", "headerDblTap", "headerTapHold", "headerTooltip", "headerVertical", "headerHozAlign", "editableTitle", "titleFormatter", "titleFormatterParams", "headerFilter", "headerFilterPlaceholder", "headerFilterParams", "headerFilterEmptyCheck", "headerFilterFunc", "headerFilterFuncParams", "headerFilterLiveFilter", "print", "headerContextMenu", "headerMenu", "contextMenu",
// "headerClickMenu",
"clickMenu", "formatterPrint", "formatterPrintParams", "formatterClipboard", "formatterClipboardParams", "formatterHtmlOutput", "formatterHtmlOutputParams", "titlePrint", "titleClipboard", "titleHtmlOutput", "titleDownload"];
} else if (typeof HTMLElement !== "undefined" && subject instanceof HTMLElement) {
//subject is a HTML element of the row
var match = self.rows.find(function (row) {
- return row.element === subject;
+ return row.getElement() === subject;
});
return match || false;
modExists;
if (this.renderMode === "virtual") {
- var otherHeight = Math.floor(this.columnManager.getElement().offsetHeight + (this.table.footerManager && !this.table.footerManager.external ? this.table.footerManager.getElement().offsetHeight : 0));
+
+ var otherHeight = Math.floor(this.columnManager.getElement().getBoundingClientRect().height + (this.table.footerManager && this.table.footerManager.active && !this.table.footerManager.external ? this.table.footerManager.getElement().getBoundingClientRect().height : 0));
if (this.fixedHeight) {
this.element.style.minHeight = "calc(100% - " + otherHeight + "px)";
this.element.style.maxHeight = "calc(100% - " + otherHeight + "px)";
} else {
this.element.style.height = "";
- this.element.style.height = Math.floor(this.table.element.clientHeight) - otherHeight + "px";
+ this.element.style.height = this.table.element.clientHeight - otherHeight + "px";
this.element.scrollTop = this.scrollTop;
}
this.vDomWindowBuffer = this.table.options.virtualDomBuffer || this.height;
//check if the table has changed size when dealing with variable height tables
- if (!this.fixedHeight && Math.floor(initialHeight) != Math.floor(this.element.clientHeight)) {
+ if (!this.fixedHeight && initialHeight != this.element.clientHeight) {
modExists = this.table.modExists("resizeTable");
if (modExists && !this.table.modules.resizeTable.autoResize || !modExists) {
for (var i = this.leftCol; i <= this.rightCol; i++) {
var column = this.columns[i];
- if (column.visible) {
+ if (column && column.visible) {
var cell = row.getCell(column);
- row.element.appendChild(cell.getElement());
+ row.getElement().appendChild(cell.getElement());
cell.cellRendered();
}
}
VDomHoz.prototype.reinitializeRow = function (row, force) {
if (row.type !== "group") {
if (force || !row.modules.vdomHoz || row.modules.vdomHoz.leftCol !== this.leftCol || row.modules.vdomHoz.rightCol !== this.rightCol) {
- while (row.element.firstChild) {
- row.element.removeChild(row.element.firstChild);
+ var rowEl = row.getElement();
+ while (rowEl.firstChild) {
+ rowEl.removeChild(rowEl.firstChild);
}this.initializeRow(row);
}
}
this.parent = parent;
this.data = {};
this.type = type; //type of element
- this.element = this.createElement();
+ this.element = false;
this.modules = {}; //hold module variables;
this.cells = [];
this.height = 0; //hold element height
this.component = null;
+ this.created = false;
+
this.setData(data);
- this.generateElement();
+};
+
+Row.prototype.create = function () {
+ if (!this.created) {
+ this.created = true;
+ this.generateElement();
+ }
};
Row.prototype.createElement = function () {
el.classList.add("tabulator-row");
el.setAttribute("role", "row");
- return el;
+ this.element = el;
};
Row.prototype.getElement = function () {
+ this.create();
return this.element;
};
tapHold,
tap;
+ this.createElement();
+
//set row selection characteristics
if (self.table.options.selectable !== false && self.table.modExists("selectRow")) {
self.table.modules.selectRow.initializeRow(this);
Row.prototype.initialize = function (force) {
var _this21 = this;
+ this.create();
+
if (!this.initialized || force) {
this.deleteCells();
Row.prototype.reinitializeHeight = function () {
this.heightInitialized = false;
- if (this.element.offsetParent !== null) {
+ if (this.element && this.element.offsetParent !== null) {
this.normalizeHeight(true);
}
};
this.heightStyled = "";
}
- if (this.element.offsetParent !== null) {
+ if (this.element && this.element.offsetParent !== null) {
this.initialize(true);
}
Row.prototype.updateData = function (updatedData) {
var _this22 = this;
- var visible = Tabulator.prototype.helpers.elVisible(this.element),
+ var visible = this.element && Tabulator.prototype.helpers.elVisible(this.element),
tempData = {},
newRowData;
this.detatchModules();
this.deleteCells();
- while (this.element.firstChild) {
- this.element.removeChild(this.element.firstChild);
- }this.element = false;
- this.modules = {};
-
- if (this.element.parentNode) {
- this.element.parentNode.removeChild(this.element);
+ if (this.element) {
+ while (this.element.firstChild) {
+ this.element.removeChild(this.element.firstChild);
+ }if (this.element.parentNode) {
+ this.element.parentNode.removeChild(this.element);
+ }
}
+
+ this.element = false;
+ this.modules = {};
};
Row.prototype.getGroup = function () {
};
//////////////////// Getters ////////////////////
-Cell.prototype.getElement = function () {
+Cell.prototype.getElement = function (containerOnly) {
if (!this.loaded) {
this.loaded = true;
- this.layoutElement();
+ if (!containerOnly) {
+ this.layoutElement();
+ }
}
return this.element;
this.element.style.minWidth = this.column.minWidthStyled;
};
+Cell.prototype.setMaxWidth = function () {
+ this.maxWidth = this.column.maxWidth;
+ this.element.style.maxWidth = this.column.maxWidthStyled;
+};
+
Cell.prototype.checkHeight = function () {
// var height = this.element.css("height");
this.row.reinitializeHeight();
layoutColumnsOnNewData: false, //update column widths on setData
columnMinWidth: 40, //minimum global width for a column
+ columnMaxWidth: false, //minimum global width for a column
columnHeaderVertAlign: "top", //vertical alignment of column headers
columnVertAlign: false, // DEPRECATED - Left to allow warning
mod.persistence.initialize();
}
- if (options.persistence && this.modExists("persistence", true) && mod.persistence.config.columns) {
- options.columns = mod.persistence.load("columns", options.columns);
- }
-
if (options.movableRows && this.modExists("moveRow")) {
mod.moveRow.initialize();
}
}
};
+//set standard filters
+Tabulator.prototype.refreshFilter = function () {
+ if (this.modExists("filter", true)) {
+ this.rowManager.filterRefresh();
+ }
+};
+
//add filter to array
Tabulator.prototype.addFilter = function (field, type, value, params) {
if (this.modExists("filter", true)) {
}
};
+Tabulator.prototype.clearHistory = function () {
+ if (this.options.history && this.modExists("history", true)) {
+ return this.modules.history.clear();
+ } else {
+ return false;
+ }
+};
+
/////////////// Download Management //////////////
Tabulator.prototype.download = function (type, filename, options, active) {
Layout.prototype.layout = function () {
this.modes[this.mode].call(this, this.table.columnManager.columnsByIndex);
+
+ if (this.mode.indexOf("fitData") === 0 && this.table.options.persistence && this.table.modExists("persistence", true) && this.table.modules.persistence.config.columns) {
+
+ this.table.modules.persistence.save("columns");
+ }
};
//layout render functions
oversizeSpace = 0,
remainingSpace = 0,
nextColWidth = 0,
+ remainingFlexGrowUnits = flexGrowUnits,
gap = 0,
changeUnits = 0,
undersizeCols = [];
oversizeCols.push(col);
} else {
- undersizeCols.push(col);
+ if (col.column.maxWidth && col.column.maxWidth < width) {
+
+ col.width = col.column.maxWidth;
+
+ freeSpace -= col.column.maxWidth;
+
+ remainingFlexGrowUnits -= shrinkCols ? col.column.definition.widthShrink || 1 : col.column.definition.widthGrow || 1;
+
+ if (remainingFlexGrowUnits) {
- changeUnits += shrinkCols ? col.column.definition.widthShrink || 1 : col.column.definition.widthGrow || 1;
+ colWidth = Math.floor(freeSpace / remainingFlexGrowUnits);
+ }
+ } else {
+
+ undersizeCols.push(col);
+
+ changeUnits += shrinkCols ? col.column.definition.widthShrink || 1 : col.column.definition.widthGrow || 1;
+ }
}
});
-/* Tabulator v4.8.3 (c) Oliver Folkerd */
-"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),o=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;n<o;){var l=e[n];if(t.call(i,l,n,e))return n;n++}return-1}}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),o=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;n<o;){var l=e[n];if(t.call(i,l,n,e))return l;n++}}}),String.prototype.includes||(String.prototype.includes=function(t,e){if(t instanceof RegExp)throw TypeError("first argument must not be a RegExp");return void 0===e&&(e=0),-1!==this.indexOf(t,e)}),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(t,e){if(null==this)throw new TypeError('"this" is null or not defined');var o=Object(this),i=o.length>>>0;if(0===i)return!1;for(var n=0|e,l=Math.max(n>=0?n:i-Math.abs(n),0);l<i;){if(function(t,e){return t===e||"number"==typeof t&&"number"==typeof e&&isNaN(t)&&isNaN(e)}(o[l],t))return!0;l++}return!1}}),"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(t,e){if(null===t||void 0===t)throw new TypeError("Cannot convert undefined or null to object");for(var o=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(null!==n&&void 0!==n)for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(o[l]=n[l])}return o},writable:!0,configurable:!0});var ColumnManager=function(t){this.table=t,this.blockHozScrollEvent=!1,this.headersElement=this.createHeadersElement(),this.element=this.createHeaderElement(),this.rowManager=null,this.columns=[],this.columnsByIndex=[],this.columnsByField={},this.scrollLeft=0,this.element.insertBefore(this.headersElement,this.element.firstChild)};ColumnManager.prototype.createHeadersElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-headers"),t},ColumnManager.prototype.createHeaderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-header"),this.table.options.headerVisible||t.classList.add("tabulator-header-hidden"),t},ColumnManager.prototype.initialize=function(){},ColumnManager.prototype.setRowManager=function(t){this.rowManager=t},ColumnManager.prototype.getElement=function(){return this.element},ColumnManager.prototype.getHeadersElement=function(){return this.headersElement},ColumnManager.prototype.scrollHorizontal=function(t){var e=0,o=this.element.scrollWidth-this.table.element.clientWidth;this.element.scrollLeft=t,t>o?(e=t-o,this.element.style.marginLeft=-e+"px"):this.element.style.marginLeft=0,this.scrollLeft=t,this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.scrollHorizontal()},ColumnManager.prototype.generateColumnsFromRowData=function(t){var e,o,i=[],n=this.table.options.autoColumnsDefinitions;if(t&&t.length){e=t[0];for(var l in e){var s={field:l,title:l},a=e[l];switch(void 0===a?"undefined":_typeof(a)){case"undefined":o="string";break;case"boolean":o="boolean";break;case"object":o=Array.isArray(a)?"array":"string";break;default:o=isNaN(a)||""===a?a.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)?"alphanum":"string":"number"}s.sorter=o,i.push(s)}if(n)switch(void 0===n?"undefined":_typeof(n)){case"function":this.table.options.columns=n.call(this.table,i);break;case"object":Array.isArray(n)?i.forEach(function(t){var e=n.find(function(e){return e.field===t.field});e&&Object.assign(t,e)}):i.forEach(function(t){n[t.field]&&Object.assign(t,n[t.field])}),this.table.options.columns=i}else this.table.options.columns=i;this.setColumns(this.table.options.columns)}},ColumnManager.prototype.setColumns=function(t,e){for(var o=this;o.headersElement.firstChild;)o.headersElement.removeChild(o.headersElement.firstChild);o.columns=[],o.columnsByIndex=[],o.columnsByField={},o.table.modExists("frozenColumns")&&o.table.modules.frozenColumns.reset(),t.forEach(function(t,e){o._addColumn(t)}),o._reIndexColumns(),o.table.options.responsiveLayout&&o.table.modExists("responsiveLayout",!0)&&o.table.modules.responsiveLayout.initialize(),this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitialize(!1,!0),o.redraw(!0)},ColumnManager.prototype._addColumn=function(t,e,o){var i=new Column(t,this),n=i.getElement(),l=o?this.findColumnIndex(o):o;if(o&&l>-1){var s=this.columns.indexOf(o.getTopColumn()),a=o.getElement();e?(this.columns.splice(s,0,i),a.parentNode.insertBefore(n,a)):(this.columns.splice(s+1,0,i),a.parentNode.insertBefore(n,a.nextSibling))}else e?(this.columns.unshift(i),this.headersElement.insertBefore(i.getElement(),this.headersElement.firstChild)):(this.columns.push(i),this.headersElement.appendChild(i.getElement())),i.columnRendered();return i},ColumnManager.prototype.registerColumnField=function(t){t.definition.field&&(this.columnsByField[t.definition.field]=t)},ColumnManager.prototype.registerColumnPosition=function(t){this.columnsByIndex.push(t)},ColumnManager.prototype._reIndexColumns=function(){this.columnsByIndex=[],this.columns.forEach(function(t){t.reRegisterPosition()})},ColumnManager.prototype._verticalAlignHeaders=function(){var t=this,e=0;t.columns.forEach(function(t){var o;t.clearVerticalAlign(),(o=t.getHeight())>e&&(e=o)}),t.columns.forEach(function(o){o.verticalAlign(t.table.options.columnHeaderVertAlign,e)}),t.rowManager.adjustTableSize()},ColumnManager.prototype.findColumn=function(t){var e=this;if("object"!=(void 0===t?"undefined":_typeof(t)))return this.columnsByField[t]||!1;if(t instanceof Column)return t;if(t instanceof ColumnComponent)return t._getSelf()||!1;if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement){return e.columns.find(function(e){return e.element===t})||!1}return!1},ColumnManager.prototype.getColumnByField=function(t){return this.columnsByField[t]},ColumnManager.prototype.getColumnsByFieldRoot=function(t){var e=this,o=[];return Object.keys(this.columnsByField).forEach(function(i){i.split(".")[0]===t&&o.push(e.columnsByField[i])}),o},ColumnManager.prototype.getColumnByIndex=function(t){return this.columnsByIndex[t]},ColumnManager.prototype.getFirstVisibileColumn=function(t){var t=this.columnsByIndex.findIndex(function(t){return t.visible});return t>-1&&this.columnsByIndex[t]},ColumnManager.prototype.getColumns=function(){return this.columns},ColumnManager.prototype.findColumnIndex=function(t){return this.columnsByIndex.findIndex(function(e){return t===e})},ColumnManager.prototype.getRealColumns=function(){return this.columnsByIndex},ColumnManager.prototype.traverse=function(t){this.columnsByIndex.forEach(function(e,o){t(e,o)})},ColumnManager.prototype.getDefinitions=function(t){var e=this,o=[];return e.columnsByIndex.forEach(function(e){(!t||t&&e.visible)&&o.push(e.getDefinition())}),o},ColumnManager.prototype.getDefinitionTree=function(){var t=this,e=[];return t.columns.forEach(function(t){e.push(t.getDefinition(!0))}),e},ColumnManager.prototype.getComponents=function(t){var e=this,o=[];return(t?e.columns:e.columnsByIndex).forEach(function(t){o.push(t.getComponent())}),o},ColumnManager.prototype.getWidth=function(){var t=0;return this.columnsByIndex.forEach(function(e){e.visible&&(t+=e.getWidth())}),t},ColumnManager.prototype.moveColumn=function(t,e,o){this.moveColumnActual(t,e,o),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),e.element.parentNode.insertBefore(t.element,e.element),o&&e.element.parentNode.insertBefore(e.element,t.element),this._verticalAlignHeaders(),this.table.rowManager.reinitialize()},ColumnManager.prototype.moveColumnActual=function(t,e,o){t.parent.isGroup?this._moveColumnInArray(t.parent.columns,t,e,o):this._moveColumnInArray(this.columns,t,e,o),this._moveColumnInArray(this.columnsByIndex,t,e,o,!0),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitialize(!0),this.table.options.columnMoved&&this.table.options.columnMoved.call(this.table,t.getComponent(),this.table.columnManager.getComponents()),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns")},ColumnManager.prototype._moveColumnInArray=function(t,e,o,i,n){var l,s=this,a=t.indexOf(e),r=[];a>-1&&(t.splice(a,1),l=t.indexOf(o),l>-1?i&&(l+=1):l=a,t.splice(l,0,e),n&&(this.table.options.dataTree&&this.table.modExists("dataTree",!0)&&this.table.rowManager.rows.forEach(function(t){r=r.concat(s.table.modules.dataTree.getTreeChildren(t,!1,!0))}),r=r.concat(this.table.rowManager.rows),r.forEach(function(t){if(t.cells.length){var e=t.cells.splice(a,1)[0];t.cells.splice(l,0,e)}})))},ColumnManager.prototype.scrollToColumn=function(t,e,o){var i=this,n=0,l=0,s=0,a=t.getElement();return new Promise(function(r,u){if(void 0===e&&(e=i.table.options.scrollToColumnPosition),void 0===o&&(o=i.table.options.scrollToColumnIfVisible),t.visible){switch(e){case"middle":case"center":s=-i.element.clientWidth/2;break;case"right":s=a.clientWidth-i.headersElement.clientWidth}if(!o&&(l=a.offsetLeft)>0&&l+a.offsetWidth<i.element.clientWidth)return!1;n=a.offsetLeft+s,n=Math.max(Math.min(n,i.table.rowManager.element.scrollWidth-i.table.rowManager.element.clientWidth),0),i.table.rowManager.scrollHorizontal(n),i.scrollHorizontal(n),r()}else console.warn("Scroll Error - Column not visible"),u("Scroll Error - Column not visible")})},ColumnManager.prototype.generateCells=function(t){var e=this,o=[];return e.columnsByIndex.forEach(function(e){o.push(e.generateCell(t))}),o},ColumnManager.prototype.getFlexBaseWidth=function(){var t=this,e=t.table.element.clientWidth,o=0;return t.rowManager.element.scrollHeight>t.rowManager.element.clientHeight&&(e-=t.rowManager.element.offsetWidth-t.rowManager.element.clientWidth),this.columnsByIndex.forEach(function(i){var n,l,s;i.visible&&(n=i.definition.width||0,l=void 0===i.minWidth?t.table.options.columnMinWidth:parseInt(i.minWidth),s="string"==typeof n?n.indexOf("%")>-1?e/100*parseInt(n):parseInt(n):n,o+=s>l?s:l)}),o},ColumnManager.prototype.addColumn=function(t,e,o){var i=this;return new Promise(function(n,l){var s=i._addColumn(t,e,o);i._reIndexColumns(),i.table.options.responsiveLayout&&i.table.modExists("responsiveLayout",!0)&&i.table.modules.responsiveLayout.initialize(),i.table.modExists("columnCalcs")&&i.table.modules.columnCalcs.recalc(i.table.rowManager.activeRows),i.redraw(),"fitColumns"!=i.table.modules.layout.getMode()&&s.reinitializeWidth(),i._verticalAlignHeaders(),i.table.rowManager.reinitialize(),i.table.options.virtualDomHoz&&i.table.vdomHoz.reinitialize(),n(s)})},ColumnManager.prototype.deregisterColumn=function(t){var e,o=t.getField();o&&delete this.columnsByField[o],e=this.columnsByIndex.indexOf(t),e>-1&&this.columnsByIndex.splice(e,1),e=this.columns.indexOf(t),e>-1&&this.columns.splice(e,1),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this._verticalAlignHeaders(),this.redraw()},ColumnManager.prototype.redraw=function(t){t&&(Tabulator.prototype.helpers.elVisible(this.element)&&this._verticalAlignHeaders(),this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),["fitColumns","fitDataStretch"].indexOf(this.table.modules.layout.getMode())>-1?this.table.modules.layout.layout():t?this.table.modules.layout.layout():this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),t&&(this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns"),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.redraw()),this.table.footerManager.redraw()};var ColumnComponent=function(t){this._column=t,this.type="ColumnComponent"};ColumnComponent.prototype.getElement=function(){return this._column.getElement()},ColumnComponent.prototype.getDefinition=function(){return this._column.getDefinition()},ColumnComponent.prototype.getField=function(){return this._column.getField()},ColumnComponent.prototype.getCells=function(){var t=[];return this._column.cells.forEach(function(e){t.push(e.getComponent())}),t},ColumnComponent.prototype.getVisibility=function(){return console.warn("getVisibility function is deprecated, you should now use the isVisible function"),this._column.visible},ColumnComponent.prototype.isVisible=function(){return this._column.visible},ColumnComponent.prototype.show=function(){this._column.isGroup?this._column.columns.forEach(function(t){t.show()}):this._column.show()},ColumnComponent.prototype.hide=function(){this._column.isGroup?this._column.columns.forEach(function(t){t.hide()}):this._column.hide()},ColumnComponent.prototype.toggle=function(){this._column.visible?this.hide():this.show()},ColumnComponent.prototype.delete=function(){return this._column.delete()},ColumnComponent.prototype.getSubColumns=function(){var t=[];return this._column.columns.length&&this._column.columns.forEach(function(e){t.push(e.getComponent())}),t},ColumnComponent.prototype.getParentColumn=function(){return this._column.parent instanceof Column&&this._column.parent.getComponent()},ColumnComponent.prototype._getSelf=function(){return this._column},ColumnComponent.prototype.scrollTo=function(){return this._column.table.columnManager.scrollToColumn(this._column)},ColumnComponent.prototype.getTable=function(){return this._column.table},ColumnComponent.prototype.headerFilterFocus=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterFocus(this._column)},ColumnComponent.prototype.reloadHeaderFilter=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.reloadHeaderFilter(this._column)},ColumnComponent.prototype.getHeaderFilterValue=function(){if(this._column.table.modExists("filter",!0))return this._column.table.modules.filter.getHeaderFilterValue(this._column)},ColumnComponent.prototype.setHeaderFilterValue=function(t){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterValue(this._column,t)},ColumnComponent.prototype.move=function(t,e){var o=this._column.table.columnManager.findColumn(t);o?this._column.table.columnManager.moveColumn(this._column,o,e):console.warn("Move Error - No matching column found:",o)},ColumnComponent.prototype.getNextColumn=function(){var t=this._column.nextColumn();return!!t&&t.getComponent()},ColumnComponent.prototype.getPrevColumn=function(){var t=this._column.prevColumn();return!!t&&t.getComponent()},ColumnComponent.prototype.updateDefinition=function(t){return this._column.updateDefinition(t)},ColumnComponent.prototype.getWidth=function(){return this._column.getWidth()},ColumnComponent.prototype.setWidth=function(t){var e;return e=!0===t?this._column.reinitializeWidth(!0):this._column.setWidth(t),this._column.table.options.virtualDomHoz&&this._column.table.vdomHoz.reinitialize(!0),e},ColumnComponent.prototype.validate=function(){return this._column.validate()};var Column=function t(e,o){var i=this;this.table=o.table,this.definition=e,this.parent=o,this.type="column",this.columns=[],this.cells=[],this.element=this.createElement(),this.contentElement=!1,this.titleHolderElement=!1,this.titleElement=!1,this.groupElement=this.createGroupElement(),this.isGroup=!1,this.tooltip=!1,this.hozAlign="",this.vertAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.titleFormatterRendered=!1,this.setField(this.definition.field),this.table.options.invalidOptionWarnings&&this.checkDefinition(),this.modules={},this.cellEvents={cellClick:!1,cellDblClick:!1,cellContext:!1,cellTap:!1,cellDblTap:!1,cellTapHold:!1,cellMouseEnter:!1,cellMouseLeave:!1,cellMouseOver:!1,cellMouseOut:!1,cellMouseMove:!1},this.width=null,this.widthStyled="",this.minWidth=null,this.minWidthStyled="",this.widthFixed=!1,this.visible=!0,this.component=null,this._mapDepricatedFunctionality(),e.columns?(this.isGroup=!0,e.columns.forEach(function(e,o){var n=new t(e,i);i.attachColumn(n)}),i.checkColumnVisibility()):o.registerColumnField(this),e.rowHandle&&!1!==this.table.options.movableRows&&this.table.modExists("moveRow")&&this.table.modules.moveRow.setHandle(!0),this._buildHeader(),this.bindModuleColumns()};Column.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col"),t.setAttribute("role","columnheader"),t.setAttribute("aria-sort","none"),t},Column.prototype.createGroupElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col-group-cols"),t},Column.prototype.checkDefinition=function(){var t=this;Object.keys(this.definition).forEach(function(e){-1===t.defaultOptionList.indexOf(e)&&console.warn("Invalid column definition option in '"+(t.field||t.definition.title)+"' column:",e)})},Column.prototype.setField=function(t){this.field=t,this.fieldStructure=t?this.table.options.nestedFieldSeparator?t.split(this.table.options.nestedFieldSeparator):[t]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNestedData:this._setFlatData},Column.prototype.registerColumnPosition=function(t){this.parent.registerColumnPosition(t)},Column.prototype.registerColumnField=function(t){this.parent.registerColumnField(t)},Column.prototype.reRegisterPosition=function(){this.isGroup?this.columns.forEach(function(t){t.reRegisterPosition()}):this.registerColumnPosition(this)},Column.prototype._mapDepricatedFunctionality=function(){void 0!==this.definition.hideInHtml&&(this.definition.htmlOutput=!this.definition.hideInHtml,console.warn("hideInHtml column definition property is deprecated, you should now use htmlOutput")),void 0!==this.definition.align&&(this.definition.hozAlign=this.definition.align,console.warn("align column definition property is deprecated, you should now use hozAlign")),void 0!==this.definition.downloadTitle&&(this.definition.titleDownload=this.definition.downloadTitle,console.warn("downloadTitle definition property is deprecated, you should now use titleDownload"))},Column.prototype.setTooltip=function(){var t=this,e=t.definition,o=e.headerTooltip||!1===e.tooltip?e.headerTooltip:t.table.options.tooltipsHeader;o?!0===o?e.field?t.table.modules.localize.bind("columns|"+e.field,function(o){t.element.setAttribute("title",o||e.title)}):t.element.setAttribute("title",e.title):("function"==typeof o&&!1===(o=o(t.getComponent()))&&(o=""),t.element.setAttribute("title",o)):t.element.setAttribute("title","")},Column.prototype._buildHeader=function(){for(var t=this,e=t.definition;t.element.firstChild;)t.element.removeChild(t.element.firstChild);e.headerVertical&&(t.element.classList.add("tabulator-col-vertical"),"flip"===e.headerVertical&&t.element.classList.add("tabulator-col-vertical-flip")),t.contentElement=t._bindEvents(),t.contentElement=t._buildColumnHeaderContent(),t.element.appendChild(t.contentElement),t.isGroup?t._buildGroupHeader():t._buildColumnHeader(),t.setTooltip(),t.table.options.resizableColumns&&t.table.modExists("resizeColumns")&&t.table.modules.resizeColumns.initializeColumn("header",t,t.element),e.headerFilter&&t.table.modExists("filter")&&t.table.modExists("edit")&&(void 0!==e.headerFilterPlaceholder&&e.field&&t.table.modules.localize.setHeaderFilterColumnPlaceholder(e.field,e.headerFilterPlaceholder),t.table.modules.filter.initializeColumn(t)),t.table.modExists("frozenColumns")&&t.table.modules.frozenColumns.initializeColumn(t),t.table.options.movableColumns&&!t.isGroup&&t.table.modExists("moveColumn")&&t.table.modules.moveColumn.initializeColumn(t),(e.topCalc||e.bottomCalc)&&t.table.modExists("columnCalcs")&&t.table.modules.columnCalcs.initializeColumn(t),t.table.modExists("persistence")&&t.table.modules.persistence.config.columns&&t.table.modules.persistence.initializeColumn(t),t.element.addEventListener("mouseenter",function(e){t.setTooltip()})},Column.prototype._bindEvents=function(){var t,e,o,i=this,n=i.definition;"function"==typeof n.headerClick&&i.element.addEventListener("click",function(t){n.headerClick(t,i.getComponent())}),"function"==typeof n.headerDblClick&&i.element.addEventListener("dblclick",function(t){n.headerDblClick(t,i.getComponent())}),"function"==typeof n.headerContext&&i.element.addEventListener("contextmenu",function(t){n.headerContext(t,i.getComponent())}),"function"==typeof n.headerTap&&(o=!1,i.element.addEventListener("touchstart",function(t){o=!0},{passive:!0}),i.element.addEventListener("touchend",function(t){o&&n.headerTap(t,i.getComponent()),o=!1})),"function"==typeof n.headerDblTap&&(t=null,i.element.addEventListener("touchend",function(e){t?(clearTimeout(t),t=null,n.headerDblTap(e,i.getComponent())):t=setTimeout(function(){clearTimeout(t),t=null},300)})),"function"==typeof n.headerTapHold&&(e=null,i.element.addEventListener("touchstart",function(t){clearTimeout(e),e=setTimeout(function(){clearTimeout(e),e=null,o=!1,n.headerTapHold(t,i.getComponent())},1e3)},{passive:!0}),i.element.addEventListener("touchend",function(t){clearTimeout(e),e=null})),"function"==typeof n.cellClick&&(i.cellEvents.cellClick=n.cellClick),"function"==typeof n.cellDblClick&&(i.cellEvents.cellDblClick=n.cellDblClick),"function"==typeof n.cellContext&&(i.cellEvents.cellContext=n.cellContext),"function"==typeof n.cellMouseEnter&&(i.cellEvents.cellMouseEnter=n.cellMouseEnter),"function"==typeof n.cellMouseLeave&&(i.cellEvents.cellMouseLeave=n.cellMouseLeave),"function"==typeof n.cellMouseOver&&(i.cellEvents.cellMouseOver=n.cellMouseOver),"function"==typeof n.cellMouseOut&&(i.cellEvents.cellMouseOut=n.cellMouseOut),"function"==typeof n.cellMouseMove&&(i.cellEvents.cellMouseMove=n.cellMouseMove),"function"==typeof n.cellTap&&(i.cellEvents.cellTap=n.cellTap),"function"==typeof n.cellDblTap&&(i.cellEvents.cellDblTap=n.cellDblTap),"function"==typeof n.cellTapHold&&(i.cellEvents.cellTapHold=n.cellTapHold),"function"==typeof n.cellEdited&&(i.cellEvents.cellEdited=n.cellEdited),"function"==typeof n.cellEditing&&(i.cellEvents.cellEditing=n.cellEditing),"function"==typeof n.cellEditCancelled&&(i.cellEvents.cellEditCancelled=n.cellEditCancelled)},Column.prototype._buildColumnHeader=function(){var t=this,e=this.definition,o=this.table;if(o.modExists("sort")&&o.modules.sort.initializeColumn(this,this.titleHolderElement),(e.headerContextMenu||e.headerClickMenu||e.headerMenu)&&o.modExists("menu")&&o.modules.menu.initializeColumnHeader(this),o.modExists("format")&&o.modules.format.initializeColumn(this),void 0!==e.editor&&o.modExists("edit")&&o.modules.edit.initializeColumn(this),void 0!==e.validator&&o.modExists("validate")&&o.modules.validate.initializeColumn(this),o.modExists("mutator")&&o.modules.mutator.initializeColumn(this),o.modExists("accessor")&&o.modules.accessor.initializeColumn(this),_typeof(o.options.responsiveLayout)&&o.modExists("responsiveLayout")&&o.modules.responsiveLayout.initializeColumn(this),void 0!==e.visible&&(e.visible?this.show(!0):this.hide(!0)),e.cssClass){e.cssClass.split(" ").forEach(function(e){t.element.classList.add(e)})}e.field&&this.element.setAttribute("tabulator-field",e.field),this.setMinWidth(void 0===e.minWidth?this.table.options.columnMinWidth:parseInt(e.minWidth)),this.reinitializeWidth(),this.tooltip=this.definition.tooltip||!1===this.definition.tooltip?this.definition.tooltip:this.table.options.tooltips,this.hozAlign=void 0===this.definition.hozAlign?this.table.options.cellHozAlign:this.definition.hozAlign,this.vertAlign=void 0===this.definition.vertAlign?this.table.options.cellVertAlign:this.definition.vertAlign,this.titleElement.style.textAlign=this.definition.headerHozAlign||this.table.options.headerHozAlign},Column.prototype._buildColumnHeaderContent=function(){var t=(this.definition,this.table,document.createElement("div"));return t.classList.add("tabulator-col-content"),this.titleHolderElement=document.createElement("div"),this.titleHolderElement.classList.add("tabulator-col-title-holder"),t.appendChild(this.titleHolderElement),this.titleElement=this._buildColumnHeaderTitle(),this.titleHolderElement.appendChild(this.titleElement),t},Column.prototype._buildColumnHeaderTitle=function(){var t=this,e=t.definition,o=t.table,i=document.createElement("div");if(i.classList.add("tabulator-col-title"),e.editableTitle){var n=document.createElement("input");n.classList.add("tabulator-title-editor"),n.addEventListener("click",function(t){t.stopPropagation(),n.focus()}),n.addEventListener("change",function(){e.title=n.value,o.options.columnTitleChanged.call(t.table,t.getComponent())}),i.appendChild(n),e.field?o.modules.localize.bind("columns|"+e.field,function(t){n.value=t||e.title||" "}):n.value=e.title||" "}else e.field?o.modules.localize.bind("columns|"+e.field,function(o){t._formatColumnHeaderTitle(i,o||e.title||" ")}):t._formatColumnHeaderTitle(i,e.title||" ");return i},Column.prototype._formatColumnHeaderTitle=function(t,e){var o,i,n,l,s,a=this;if(this.definition.titleFormatter&&this.table.modExists("format"))switch(o=this.table.modules.format.getFormatter(this.definition.titleFormatter),s=function(t){a.titleFormatterRendered=t},l={getValue:function(){return e},getElement:function(){return t}},n=this.definition.titleFormatterParams||{},n="function"==typeof n?n():n,i=o.call(this.table.modules.format,l,n,s),void 0===i?"undefined":_typeof(i)){case"object":i instanceof Node?t.appendChild(i):(t.innerHTML="",console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",i));break;case"undefined":case"null":t.innerHTML="";break;default:t.innerHTML=i}else t.innerHTML=e},Column.prototype._buildGroupHeader=function(){var t=this;if(this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.definition.cssClass){this.definition.cssClass.split(" ").forEach(function(e){t.element.classList.add(e)})}(this.definition.headerContextMenu||this.definition.headerMenu)&&this.table.modExists("menu")&&this.table.modules.menu.initializeColumnHeader(this),this.element.appendChild(this.groupElement)},Column.prototype._getFlatData=function(t){return t[this.field]},Column.prototype._getNestedData=function(t){for(var e,o=t,i=this.fieldStructure,n=i.length,l=0;l<n&&(o=o[i[l]],e=o,o);l++);return e},Column.prototype._setFlatData=function(t,e){this.field&&(t[this.field]=e)},Column.prototype._setNestedData=function(t,e){for(var o=t,i=this.fieldStructure,n=i.length,l=0;l<n;l++)if(l==n-1)o[i[l]]=e;else{if(!o[i[l]]){if(void 0===e)break;o[i[l]]={}}o=o[i[l]]}},Column.prototype.attachColumn=function(t){var e=this;e.groupElement?(e.columns.push(t),e.groupElement.appendChild(t.getElement())):console.warn("Column Warning - Column being attached to another column instead of column group")},Column.prototype.verticalAlign=function(t,e){var o=this.parent.isGroup?this.parent.getGroupElement().clientHeight:e||this.parent.getHeadersElement().clientHeight;this.element.style.height=o+"px",this.isGroup&&(this.groupElement.style.minHeight=o-this.contentElement.offsetHeight+"px"),this.isGroup||"top"===t||(this.element.style.paddingTop="bottom"===t?this.element.clientHeight-this.contentElement.offsetHeight+"px":(this.element.clientHeight-this.contentElement.offsetHeight)/2+"px"),this.columns.forEach(function(e){e.verticalAlign(t)})},Column.prototype.clearVerticalAlign=function(){this.element.style.paddingTop="",this.element.style.height="",this.element.style.minHeight="",this.groupElement.style.minHeight="",this.columns.forEach(function(t){t.clearVerticalAlign()})},Column.prototype.bindModuleColumns=function(){"rownum"==this.definition.formatter&&(this.table.rowManager.rowNumColumn=this)},Column.prototype.getElement=function(){return this.element},Column.prototype.getGroupElement=function(){return this.groupElement},Column.prototype.getField=function(){return this.field},Column.prototype.getFirstColumn=function(){return this.isGroup?!!this.columns.length&&this.columns[0].getFirstColumn():this},Column.prototype.getLastColumn=function(){return this.isGroup?!!this.columns.length&&this.columns[this.columns.length-1].getLastColumn():this},Column.prototype.getColumns=function(){return this.columns},Column.prototype.getCells=function(){return this.cells},Column.prototype.getTopColumn=function(){return this.parent.isGroup?this.parent.getTopColumn():this},Column.prototype.getDefinition=function(t){var e=[];return this.isGroup&&t&&(this.columns.forEach(function(t){e.push(t.getDefinition(!0))}),this.definition.columns=e),this.definition},Column.prototype.checkColumnVisibility=function(){var t=!1;this.columns.forEach(function(e){e.visible&&(t=!0)}),t?(this.show(),this.parent.table.options.columnVisibilityChanged.call(this.table,this.getComponent(),!1)):this.hide()},Column.prototype.show=function(t,e){this.visible||(this.visible=!0,this.element.style.display="",this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach(function(t){t.show()}),this.isGroup||null!==this.width||this.reinitializeWidth(),this.table.columnManager._verticalAlignHeaders(),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns"),!e&&this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.updateColumnVisibility(this,this.visible),t||this.table.options.columnVisibilityChanged.call(this.table,this.getComponent(),!0),this.parent.isGroup&&this.parent.matchChildWidths())},Column.prototype.hide=function(t,e){this.visible&&(this.visible=!1,this.element.style.display="none",this.table.columnManager._verticalAlignHeaders(),this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach(function(t){t.hide()}),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns"),!e&&this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.updateColumnVisibility(this,this.visible),t||this.table.options.columnVisibilityChanged.call(this.table,this.getComponent(),!1),this.parent.isGroup&&this.parent.matchChildWidths())},Column.prototype.matchChildWidths=function(){var t=0;this.contentElement&&this.columns.length&&(this.columns.forEach(function(e){e.visible&&(t+=e.getWidth())}),this.contentElement.style.maxWidth=t-1+"px",this.parent.isGroup&&this.parent.matchChildWidths())},Column.prototype.setWidth=function(t){this.widthFixed=!0,this.setWidthActual(t)},Column.prototype.setWidthActual=function(t){isNaN(t)&&(t=Math.floor(this.table.element.clientWidth/100*parseInt(t))),t=Math.max(this.minWidth,t),this.width=t,this.widthStyled=t?t+"px":"",this.element.style.width=this.widthStyled,this.isGroup||this.cells.forEach(function(t){
-t.setWidth()}),this.parent.isGroup&&this.parent.matchChildWidths(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()},Column.prototype.checkCellHeights=function(){var t=[];this.cells.forEach(function(e){e.row.heightInitialized&&(null!==e.row.getElement().offsetParent?(t.push(e.row),e.row.clearCellHeight()):e.row.heightInitialized=!1)}),t.forEach(function(t){t.calcHeight()}),t.forEach(function(t){t.setCellHeight()})},Column.prototype.getWidth=function(){var t=0;return this.isGroup?this.columns.forEach(function(e){e.visible&&(t+=e.getWidth())}):t=this.width,t},Column.prototype.getHeight=function(){return this.element.offsetHeight},Column.prototype.setMinWidth=function(t){this.minWidth=t,this.minWidthStyled=t?t+"px":"",this.element.style.minWidth=this.minWidthStyled,this.cells.forEach(function(t){t.setMinWidth()})},Column.prototype.delete=function(){var t=this;return new Promise(function(e,o){t.isGroup&&t.columns.forEach(function(t){t.delete()}),t.table.modExists("edit")&&t.table.modules.edit.currentCell.column===t&&t.table.modules.edit.cancelEdit();for(var i=t.cells.length,n=0;n<i;n++)t.cells[0].delete();t.element.parentNode&&t.element.parentNode.removeChild(t.element),t.element=!1,t.contentElement=!1,t.titleElement=!1,t.groupElement=!1,t.table.columnManager.deregisterColumn(t),t.table.options.virtualDomHoz&&t.table.vdomHoz.reinitialize(!0),e()})},Column.prototype.columnRendered=function(){this.titleFormatterRendered&&this.titleFormatterRendered()},Column.prototype.validate=function(){var t=[];return this.cells.forEach(function(e){e.validate()||t.push(e.getComponent())}),!t.length||t},Column.prototype.generateCell=function(t){var e=this,o=new Cell(e,t);return this.cells.push(o),o},Column.prototype.nextColumn=function(){var t=this.table.columnManager.findColumnIndex(this);return t>-1&&this._nextVisibleColumn(t+1)},Column.prototype._nextVisibleColumn=function(t){var e=this.table.columnManager.getColumnByIndex(t);return!e||e.visible?e:this._nextVisibleColumn(t+1)},Column.prototype.prevColumn=function(){var t=this.table.columnManager.findColumnIndex(this);return t>-1&&this._prevVisibleColumn(t-1)},Column.prototype._prevVisibleColumn=function(t){var e=this.table.columnManager.getColumnByIndex(t);return!e||e.visible?e:this._prevVisibleColumn(t-1)},Column.prototype.reinitializeWidth=function(t){this.widthFixed=!1,void 0===this.definition.width||t||this.setWidth(this.definition.width),this.table.modExists("filter")&&this.table.modules.filter.hideHeaderFilterElements(),this.fitToData(),this.table.modExists("filter")&&this.table.modules.filter.showHeaderFilterElements()},Column.prototype.fitToData=function(){var t=this;this.widthFixed||(this.element.style.width="",t.cells.forEach(function(t){t.clearWidth()}));var e=this.element.offsetWidth;t.width&&this.widthFixed||(t.cells.forEach(function(t){var o=t.getWidth();o>e&&(e=o)}),e&&t.setWidthActual(e+1))},Column.prototype.updateDefinition=function(t){var e=this;return new Promise(function(o,i){var n;e.isGroup?(console.warn("Column Update Error - The updateDefinition function is only available on columns, not column groups"),i("Column Update Error - The updateDefinition function is only available on columns, not column groups")):(n=Object.assign({},e.getDefinition()),n=Object.assign(n,t),e.table.columnManager.addColumn(n,!1,e).then(function(t){n.field==e.field&&(e.field=!1),e.delete().then(function(){o(t.getComponent())}).catch(function(t){i(t)})}).catch(function(t){i(t)}))})},Column.prototype.deleteCell=function(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)},Column.prototype.defaultOptionList=["title","field","columns","visible","align","hozAlign","vertAlign","width","minWidth","widthGrow","widthShrink","resizable","frozen","responsive","tooltip","cssClass","rowHandle","hideInHtml","print","htmlOutput","sorter","sorterParams","formatter","formatterParams","variableHeight","editable","editor","editorParams","validator","mutator","mutatorParams","mutatorData","mutatorDataParams","mutatorEdit","mutatorEditParams","mutatorClipboard","mutatorClipboardParams","accessor","accessorParams","accessorData","accessorDataParams","accessorDownload","accessorDownloadParams","accessorClipboard","accessorClipboardParams","accessorPrint","accessorPrintParams","accessorHtmlOutput","accessorHtmlOutputParams","clipboard","download","downloadTitle","topCalc","topCalcParams","topCalcFormatter","topCalcFormatterParams","bottomCalc","bottomCalcParams","bottomCalcFormatter","bottomCalcFormatterParams","cellClick","cellDblClick","cellContext","cellTap","cellDblTap","cellTapHold","cellMouseEnter","cellMouseLeave","cellMouseOver","cellMouseOut","cellMouseMove","cellEditing","cellEdited","cellEditCancelled","headerSort","headerSortStartingDir","headerSortTristate","headerClick","headerDblClick","headerContext","headerTap","headerDblTap","headerTapHold","headerTooltip","headerVertical","headerHozAlign","editableTitle","titleFormatter","titleFormatterParams","headerFilter","headerFilterPlaceholder","headerFilterParams","headerFilterEmptyCheck","headerFilterFunc","headerFilterFuncParams","headerFilterLiveFilter","print","headerContextMenu","headerMenu","contextMenu","clickMenu","formatterPrint","formatterPrintParams","formatterClipboard","formatterClipboardParams","formatterHtmlOutput","formatterHtmlOutputParams","titlePrint","titleClipboard","titleHtmlOutput","titleDownload"],Column.prototype.getComponent=function(){return this.component||(this.component=new ColumnComponent(this)),this.component};var RowManager=function(t){this.table=t,this.element=this.createHolderElement(),this.tableElement=this.createTableElement(),this.heightFixer=this.createTableElement(),this.columnManager=null,this.height=0,this.firstRender=!1,this.renderMode="virtual",this.fixedHeight=!1,this.rows=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.scrollTop=0,this.scrollLeft=0,this.vDomRowHeight=20,this.vDomTop=0,this.vDomBottom=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomMaxRenderChain=90,this.vDomWindowBuffer=0,this.vDomWindowMinTotalRows=20,this.vDomWindowMinMarginRows=5,this.vDomTopNewRows=[],this.vDomBottomNewRows=[],this.rowNumColumn=!1,this.redrawBlock=!1,this.redrawBlockRestoreConfig=!1,this.redrawBlockRederInPosition=!1};RowManager.prototype.createHolderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-tableHolder"),t.setAttribute("tabindex",0),t},RowManager.prototype.createTableElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-table"),t},RowManager.prototype.getElement=function(){return this.element},RowManager.prototype.getTableElement=function(){return this.tableElement},RowManager.prototype.getRowPosition=function(t,e){return e?this.activeRows.indexOf(t):this.rows.indexOf(t)},RowManager.prototype.setColumnManager=function(t){this.columnManager=t},RowManager.prototype.initialize=function(){var t=this;t.setRenderMode(),t.element.appendChild(t.tableElement),t.firstRender=!0,t.element.addEventListener("scroll",function(){var e=t.element.scrollLeft;t.scrollLeft!=e&&(t.columnManager.scrollHorizontal(e),t.table.options.groupBy&&t.table.modules.groupRows.scrollHeaders(e),t.table.modExists("columnCalcs")&&t.table.modules.columnCalcs.scrollHorizontal(e),t.table.options.scrollHorizontal(e)),t.scrollLeft=e}),"virtual"===this.renderMode&&t.element.addEventListener("scroll",function(){var e=t.element.scrollTop,o=t.scrollTop>e;t.scrollTop!=e?(t.scrollTop=e,t.scrollVertical(o),"scroll"==t.table.options.ajaxProgressiveLoad&&t.table.modules.ajax.nextPage(t.element.scrollHeight-t.element.clientHeight-e),t.table.options.scrollVertical(e)):t.scrollTop=e})},RowManager.prototype.findRow=function(t){var e=this;if("object"!=(void 0===t?"undefined":_typeof(t))){if(void 0===t||null===t)return!1;return e.rows.find(function(o){return o.data[e.table.options.index]==t})||!1}if(t instanceof Row)return t;if(t instanceof RowComponent)return t._getSelf()||!1;if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement){return e.rows.find(function(e){return e.element===t})||!1}return!1},RowManager.prototype.getRowFromDataObject=function(t){return this.rows.find(function(e){return e.data===t})||!1},RowManager.prototype.getRowFromPosition=function(t,e){return e?this.activeRows[t]:this.rows[t]},RowManager.prototype.scrollToRow=function(t,e,o){var i,n=this,l=this.getDisplayRows().indexOf(t),s=t.getElement(),a=0;return new Promise(function(t,r){if(l>-1){if(void 0===e&&(e=n.table.options.scrollToRowPosition),void 0===o&&(o=n.table.options.scrollToRowIfVisible),"nearest"===e)switch(n.renderMode){case"classic":i=Tabulator.prototype.helpers.elOffset(s).top,e=Math.abs(n.element.scrollTop-i)>Math.abs(n.element.scrollTop+n.element.clientHeight-i)?"bottom":"top";break;case"virtual":e=Math.abs(n.vDomTop-l)>Math.abs(n.vDomBottom-l)?"bottom":"top"}if(!o&&Tabulator.prototype.helpers.elVisible(s)&&(a=Tabulator.prototype.helpers.elOffset(s).top-Tabulator.prototype.helpers.elOffset(n.element).top)>0&&a<n.element.clientHeight-s.offsetHeight)return!1;switch(n.renderMode){case"classic":n.element.scrollTop=Tabulator.prototype.helpers.elOffset(s).top-Tabulator.prototype.helpers.elOffset(n.element).top+n.element.scrollTop;break;case"virtual":n._virtualRenderFill(l,!0)}switch(e){case"middle":case"center":n.element.scrollHeight-n.element.scrollTop==n.element.clientHeight?n.element.scrollTop=n.element.scrollTop+(s.offsetTop-n.element.scrollTop)-(n.element.scrollHeight-s.offsetTop)/2:n.element.scrollTop=n.element.scrollTop-n.element.clientHeight/2;break;case"bottom":n.element.scrollHeight-n.element.scrollTop==n.element.clientHeight?n.element.scrollTop=n.element.scrollTop-(n.element.scrollHeight-s.offsetTop)+s.offsetHeight:n.element.scrollTop=n.element.scrollTop-n.element.clientHeight+s.offsetHeight}t()}else console.warn("Scroll Error - Row not visible"),r("Scroll Error - Row not visible")})},RowManager.prototype.setData=function(t,e,o){var i=this,n=this;return new Promise(function(l,s){e&&i.getDisplayRows().length?n.table.options.pagination?n._setDataActual(t,!0):i.reRenderInPosition(function(){n._setDataActual(t)}):(i.table.options.autoColumns&&o&&i.table.columnManager.generateColumnsFromRowData(t),i.resetScroll(),i._setDataActual(t)),l()})},RowManager.prototype._setDataActual=function(t,e){var o=this;o.table.options.dataLoading.call(this.table,t),this._wipeElements(),this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.clear(),Array.isArray(t)?(this.table.modExists("selectRow")&&this.table.modules.selectRow.clearSelectionData(),this.table.options.reactiveData&&this.table.modExists("reactiveData",!0)&&this.table.modules.reactiveData.watchData(t),t.forEach(function(t,e){if(t&&"object"===(void 0===t?"undefined":_typeof(t))){var i=new Row(t,o);o.rows.push(i)}else console.warn("Data Loading Warning - Invalid row data detected and ignored, expecting object but received:",t)}),o.refreshActiveData(!1,!1,e),o.table.options.dataLoaded.call(this.table,t)):console.error("Data Loading Error - Unable to process data due to invalid data type \nExpecting: array \nReceived: ",void 0===t?"undefined":_typeof(t),"\nData: ",t)},RowManager.prototype._wipeElements=function(){this.rows.forEach(function(t){t.wipe()}),this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.wipe(),this.rows=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.adjustTableSize()},RowManager.prototype.deleteRow=function(t,e){var o=this.rows.indexOf(t),i=this.activeRows.indexOf(t);i>-1&&this.activeRows.splice(i,1),o>-1&&this.rows.splice(o,1),this.setActiveRows(this.activeRows),this.displayRowIterator(function(e){var o=e.indexOf(t);o>-1&&e.splice(o,1)}),e||this.reRenderInPosition(),this.regenerateRowNumbers(),this.table.options.rowDeleted.call(this.table,t.getComponent()),this.table.options.dataChanged&&this.table.options.dataChanged.call(this.table,this.getData()),this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.groupRows.updateGroupRows(!0):this.table.options.pagination&&this.table.modExists("page")?this.refreshActiveData(!1,!1,!0):this.table.options.pagination&&this.table.modExists("page")&&this.refreshActiveData("page")},RowManager.prototype.addRow=function(t,e,o,i){var n=this.addRowActual(t,e,o,i);return this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowAdd",n,{data:t,pos:e,index:o}),n},RowManager.prototype.addRows=function(t,e,o){var i=this,n=this,l=0,s=[];return new Promise(function(a,r){e=i.findAddRowPos(e),Array.isArray(t)||(t=[t]),l=t.length-1,(void 0===o&&e||void 0!==o&&!e)&&t.reverse(),t.forEach(function(t,i){var l=n.addRow(t,e,o,!0);s.push(l)}),i.table.options.groupBy&&i.table.modExists("groupRows")?i.table.modules.groupRows.updateGroupRows(!0):i.table.options.pagination&&i.table.modExists("page")?i.refreshActiveData(!1,!1,!0):i.reRenderInPosition(),i.table.modExists("columnCalcs")&&i.table.modules.columnCalcs.recalc(i.table.rowManager.activeRows),i.regenerateRowNumbers(),a(s)})},RowManager.prototype.findAddRowPos=function(t){return void 0===t&&(t=this.table.options.addRowPos),"pos"===t&&(t=!0),"bottom"===t&&(t=!1),t},RowManager.prototype.addRowActual=function(t,e,o,i){var n,l,s=t instanceof Row?t:new Row(t||{},this),a=this.findAddRowPos(e),r=-1;if(!o&&this.table.options.pagination&&"page"==this.table.options.paginationAddRow&&(l=this.getDisplayRows(),a?l.length?o=l[0]:this.activeRows.length&&(o=this.activeRows[this.activeRows.length-1],a=!1):l.length&&(o=l[l.length-1],a=!(l.length<this.table.modules.page.getPageSize()))),void 0!==o&&(o=this.findRow(o)),this.table.options.groupBy&&this.table.modExists("groupRows")){this.table.modules.groupRows.assignRowToGroup(s);var u=s.getGroup().rows;u.length>1&&(!o||o&&-1==u.indexOf(o)?a?u[0]!==s&&(o=u[0],this._moveRowInArray(s.getGroup().rows,s,o,!a)):u[u.length-1]!==s&&(o=u[u.length-1],this._moveRowInArray(s.getGroup().rows,s,o,!a)):this._moveRowInArray(s.getGroup().rows,s,o,!a))}return o&&(r=this.rows.indexOf(o)),o&&r>-1?(n=this.activeRows.indexOf(o),this.displayRowIterator(function(t){var e=t.indexOf(o);e>-1&&t.splice(a?e:e+1,0,s)}),n>-1&&this.activeRows.splice(a?n:n+1,0,s),this.rows.splice(a?r:r+1,0,s)):a?(this.displayRowIterator(function(t){t.unshift(s)}),this.activeRows.unshift(s),this.rows.unshift(s)):(this.displayRowIterator(function(t){t.push(s)}),this.activeRows.push(s),this.rows.push(s)),this.setActiveRows(this.activeRows),this.table.options.rowAdded.call(this.table,s.getComponent()),this.table.options.dataChanged&&this.table.options.dataChanged.call(this.table,this.getData()),i||this.reRenderInPosition(),s},RowManager.prototype.moveRow=function(t,e,o){this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowMove",t,{posFrom:this.getRowPosition(t),posTo:this.getRowPosition(e),to:e,after:o}),this.moveRowActual(t,e,o),this.regenerateRowNumbers(),this.table.options.rowMoved.call(this.table,t.getComponent())},RowManager.prototype.moveRowActual=function(t,e,o){var i=this;if(this._moveRowInArray(this.rows,t,e,o),this._moveRowInArray(this.activeRows,t,e,o),this.displayRowIterator(function(n){i._moveRowInArray(n,t,e,o)}),this.table.options.groupBy&&this.table.modExists("groupRows")){!o&&e instanceof Group&&(e=this.table.rowManager.prevDisplayRow(t)||e);var n=e.getGroup(),l=t.getGroup();n===l?this._moveRowInArray(n.rows,t,e,o):(l&&l.removeRow(t),n.insertRow(t,e,o))}},RowManager.prototype._moveRowInArray=function(t,e,o,i){var n,l,s,a;if(e!==o&&(n=t.indexOf(e),n>-1&&(t.splice(n,1),l=t.indexOf(o),l>-1?i?t.splice(l+1,0,e):t.splice(l,0,e):t.splice(n,0,e)),t===this.getDisplayRows())){s=n<l?n:l,a=l>n?l:n+1;for(var r=s;r<=a;r++)t[r]&&this.styleRow(t[r],r)}},RowManager.prototype.clearData=function(){this.setData([])},RowManager.prototype.getRowIndex=function(t){return this.findRowIndex(t,this.rows)},RowManager.prototype.getDisplayRowIndex=function(t){var e=this.getDisplayRows().indexOf(t);return e>-1&&e},RowManager.prototype.nextDisplayRow=function(t,e){var o=this.getDisplayRowIndex(t),i=!1;return!1!==o&&o<this.displayRowsCount-1&&(i=this.getDisplayRows()[o+1]),!i||i instanceof Row&&"row"==i.type?i:this.nextDisplayRow(i,e)},RowManager.prototype.prevDisplayRow=function(t,e){var o=this.getDisplayRowIndex(t),i=!1;return o&&(i=this.getDisplayRows()[o-1]),!e||!i||i instanceof Row&&"row"==i.type?i:this.prevDisplayRow(i,e)},RowManager.prototype.findRowIndex=function(t,e){var o;return!!((t=this.findRow(t))&&(o=e.indexOf(t))>-1)&&o},RowManager.prototype.getData=function(t,e){var o=[];return this.getRows(t).forEach(function(t){"row"==t.type&&o.push(t.getData(e||"data"))}),o},RowManager.prototype.getComponents=function(t){var e=[];return this.getRows(t).forEach(function(t){e.push(t.getComponent())}),e},RowManager.prototype.getDataCount=function(t){return this.getRows(t).length},RowManager.prototype._genRemoteRequest=function(){var t=this,e=this.table,o=e.options,i={};if(e.modExists("page")){if(o.ajaxSorting){var n=this.table.modules.sort.getSort();n.forEach(function(t){delete t.column}),i[this.table.modules.page.paginationDataSentNames.sorters]=n}if(o.ajaxFiltering){var l=this.table.modules.filter.getFilters(!0,!0);i[this.table.modules.page.paginationDataSentNames.filters]=l}this.table.modules.ajax.setParams(i,!0)}e.modules.ajax.sendRequest().then(function(e){t._setDataActual(e,!0)}).catch(function(t){})},RowManager.prototype.filterRefresh=function(){var t=this.table,e=t.options,o=this.scrollLeft;e.ajaxFiltering?"remote"==e.pagination&&t.modExists("page")?(t.modules.page.reset(!0),t.modules.page.setPage(1).then(function(){}).catch(function(){})):e.ajaxProgressiveLoad?t.modules.ajax.loadData().then(function(){}).catch(function(){}):this._genRemoteRequest():this.refreshActiveData("filter"),this.scrollHorizontal(o)},RowManager.prototype.sorterRefresh=function(t){var e=this.table,o=this.table.options,i=this.scrollLeft;o.ajaxSorting?("remote"==o.pagination||o.progressiveLoad)&&e.modExists("page")?(e.modules.page.reset(!0),e.modules.page.setPage(1).then(function(){}).catch(function(){})):o.ajaxProgressiveLoad?e.modules.ajax.loadData().then(function(){}).catch(function(){}):this._genRemoteRequest():this.refreshActiveData(t?"filter":"sort"),this.scrollHorizontal(i)},RowManager.prototype.scrollHorizontal=function(t){this.scrollLeft=t,this.element.scrollLeft=t,this.table.options.groupBy&&this.table.modules.groupRows.scrollHeaders(t),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.scrollHorizontal(t)},RowManager.prototype.refreshActiveData=function(t,e,o){var i,n=this,l=this.table,s=["all","filter","sort","display","freeze","group","tree","page"];if(this.redrawBlock)return void((!this.redrawBlockRestoreConfig||s.indexOf(t)<s.indexOf(this.redrawBlockRestoreConfig.stage))&&(this.redrawBlockRestoreConfig={stage:t,skipStage:e,renderInPosition:o}));switch(n.table.modExists("edit")&&n.table.modules.edit.cancelEdit(),t||(t="all"),l.options.selectable&&!l.options.selectablePersistence&&l.modExists("selectRow")&&l.modules.selectRow.deselectRows(),t){case"all":case"filter":e?e=!1:l.modExists("filter")?n.setActiveRows(l.modules.filter.filter(n.rows)):n.setActiveRows(n.rows.slice(0));case"sort":e?e=!1:l.modExists("sort")&&l.modules.sort.sort(this.activeRows),this.regenerateRowNumbers();case"display":this.resetDisplayRows();case"freeze":e?e=!1:this.table.modExists("frozenRows")&&l.modules.frozenRows.isFrozen()&&(l.modules.frozenRows.getDisplayIndex()||l.modules.frozenRows.setDisplayIndex(this.getNextDisplayIndex()),i=l.modules.frozenRows.getDisplayIndex(),!0!==(i=n.setDisplayRows(l.modules.frozenRows.getRows(this.getDisplayRows(i-1)),i))&&l.modules.frozenRows.setDisplayIndex(i));case"group":e?e=!1:l.options.groupBy&&l.modExists("groupRows")&&(l.modules.groupRows.getDisplayIndex()||l.modules.groupRows.setDisplayIndex(this.getNextDisplayIndex()),i=l.modules.groupRows.getDisplayIndex(),!0!==(i=n.setDisplayRows(l.modules.groupRows.getRows(this.getDisplayRows(i-1)),i))&&l.modules.groupRows.setDisplayIndex(i));case"tree":e?e=!1:l.options.dataTree&&l.modExists("dataTree")&&(l.modules.dataTree.getDisplayIndex()||l.modules.dataTree.setDisplayIndex(this.getNextDisplayIndex()),i=l.modules.dataTree.getDisplayIndex(),!0!==(i=n.setDisplayRows(l.modules.dataTree.getRows(this.getDisplayRows(i-1)),i))&&l.modules.dataTree.setDisplayIndex(i)),l.options.pagination&&l.modExists("page")&&!o&&"local"==l.modules.page.getMode()&&l.modules.page.reset();case"page":e?e=!1:l.options.pagination&&l.modExists("page")&&(l.modules.page.getDisplayIndex()||l.modules.page.setDisplayIndex(this.getNextDisplayIndex()),i=l.modules.page.getDisplayIndex(),"local"==l.modules.page.getMode()&&l.modules.page.setMaxRows(this.getDisplayRows(i-1).length),!0!==(i=n.setDisplayRows(l.modules.page.getRows(this.getDisplayRows(i-1)),i))&&l.modules.page.setDisplayIndex(i))}Tabulator.prototype.helpers.elVisible(n.element)&&(o?n.reRenderInPosition():("all"===t&&this.table.options.virtualDomHoz&&this.table.vdomHoz.dataChange(),n.renderTable(),l.options.layoutColumnsOnNewData&&n.table.columnManager.redraw(!0))),l.modExists("columnCalcs")&&l.modules.columnCalcs.recalc(this.activeRows)},RowManager.prototype.regenerateRowNumbers=function(){var t=this;this.rowNumColumn&&this.activeRows.forEach(function(e){var o=e.getCell(t.rowNumColumn);o&&o._generateContents()})},RowManager.prototype.setActiveRows=function(t){this.activeRows=t,this.activeRowsCount=this.activeRows.length},RowManager.prototype.resetDisplayRows=function(){this.displayRows=[],this.displayRows.push(this.activeRows.slice(0)),this.displayRowsCount=this.displayRows[0].length,this.table.modExists("frozenRows")&&this.table.modules.frozenRows.setDisplayIndex(0),this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.setDisplayIndex(0),this.table.options.pagination&&this.table.modExists("page")&&this.table.modules.page.setDisplayIndex(0)},RowManager.prototype.getNextDisplayIndex=function(){return this.displayRows.length},RowManager.prototype.setDisplayRows=function(t,e){var o=!0;return e&&void 0!==this.displayRows[e]?(this.displayRows[e]=t,o=!0):(this.displayRows.push(t),o=e=this.displayRows.length-1),e==this.displayRows.length-1&&(this.displayRowsCount=this.displayRows[this.displayRows.length-1].length),o},RowManager.prototype.getDisplayRows=function(t){return void 0===t?this.displayRows.length?this.displayRows[this.displayRows.length-1]:[]:this.displayRows[t]||[]},RowManager.prototype.getVisibleRows=function(t){var e=this.element.scrollTop,o=this.element.clientHeight+e,i=!1,n=0,l=0,s=this.getDisplayRows();if(t){this.getDisplayRows();for(var a=this.vDomTop;a<=this.vDomBottom;a++)if(s[a])if(i){if(!(o-s[a].getElement().offsetTop>=0))break;l=a}else if(e-s[a].getElement().offsetTop>=0)n=a;else{if(i=!0,!(o-s[a].getElement().offsetTop>=0))break;l=a}}else n=this.vDomTop,l=this.vDomBottom;return s.slice(n,l+1)},RowManager.prototype.displayRowIterator=function(t){this.displayRows.forEach(t),this.displayRowsCount=this.displayRows[this.displayRows.length-1].length},RowManager.prototype.getRows=function(t){var e;switch(t){case"active":e=this.activeRows;break;case"display":e=this.table.rowManager.getDisplayRows();break;case"visible":e=this.getVisibleRows(!0);break;case"selected":e=this.table.modules.selectRow.selectedRows;break;default:e=this.rows}return e},RowManager.prototype.reRenderInPosition=function(t){if("virtual"==this.getRenderMode())if(this.redrawBlock)t?t():this.redrawBlockRederInPosition=!0;else{for(var e=this.element.scrollTop,o=!1,i=!1,n=this.scrollLeft,l=this.getDisplayRows(),s=this.vDomTop;s<=this.vDomBottom;s++)if(l[s]){var a=e-l[s].getElement().offsetTop;if(!(!1===i||Math.abs(a)<i))break;i=a,o=s}t&&t(),this._virtualRenderFill(!1===o?this.displayRowsCount-1:o,!0,i||0),this.scrollHorizontal(n)}else this.renderTable(),t&&t()},RowManager.prototype.setRenderMode=function(){this.table.options.virtualDom?(this.renderMode="virtual",this.table.element.clientHeight||this.table.options.height?this.fixedHeight=!0:this.fixedHeight=!1):this.renderMode="classic"},RowManager.prototype.getRenderMode=function(){return this.renderMode},RowManager.prototype.renderTable=function(){switch(this.table.options.renderStarted.call(this.table),this.element.scrollTop=0,this.renderMode){case"classic":this._simpleRender();break;case"virtual":this._virtualRenderFill()}this.firstRender&&(this.displayRowsCount?(this.firstRender=!1,this.table.modules.layout.layout()):this.renderEmptyScroll()),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout(),this.displayRowsCount||this.table.options.placeholder&&(this.table.options.placeholder.setAttribute("tabulator-render-mode",this.renderMode),this.getElement().appendChild(this.table.options.placeholder),this.table.options.placeholder.style.width=this.table.columnManager.getWidth()+"px"),this.table.options.renderComplete.call(this.table)},RowManager.prototype._simpleRender=function(){this._clearVirtualDom(),this.displayRowsCount?this.checkClassicModeGroupHeaderWidth():this.renderEmptyScroll()},RowManager.prototype.checkClassicModeGroupHeaderWidth=function(){var t=this,e=this.tableElement,o=!0;t.getDisplayRows().forEach(function(i,n){t.styleRow(i,n),e.appendChild(i.getElement()),i.initialize(!0),"group"!==i.type&&(o=!1)}),e.style.minWidth=o?t.table.columnManager.getWidth()+"px":""},RowManager.prototype.renderEmptyScroll=function(){this.table.options.placeholder?this.tableElement.style.display="none":this.tableElement.style.minWidth=this.table.columnManager.getWidth()+"px"},RowManager.prototype._clearVirtualDom=function(){var t=this.tableElement;for(this.table.options.placeholder&&this.table.options.placeholder.parentNode&&this.table.options.placeholder.parentNode.removeChild(this.table.options.placeholder);t.firstChild;)t.removeChild(t.firstChild);t.style.paddingTop="",t.style.paddingBottom="",t.style.minWidth="",t.style.minHeight="",t.style.display="",t.style.visibility="",this.scrollTop=0,this.scrollLeft=0,this.vDomTop=0,this.vDomBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0},RowManager.prototype.styleRow=function(t,e){var o=t.getElement();e%2?(o.classList.add("tabulator-row-even"),o.classList.remove("tabulator-row-odd")):(o.classList.add("tabulator-row-odd"),o.classList.remove("tabulator-row-even"))},RowManager.prototype._virtualRenderFill=function(t,e,o){var i=this,n=i.tableElement,l=i.element,s=0,a=0,r=0,u=0,h=!0,c=i.getDisplayRows();if(t=t||0,o=o||0,t){for(;n.firstChild;)n.removeChild(n.firstChild);var d=(i.displayRowsCount-t+1)*i.vDomRowHeight;d<i.height&&(t-=Math.ceil((i.height-d)/i.vDomRowHeight))<0&&(t=0),s=Math.min(Math.max(Math.floor(i.vDomWindowBuffer/i.vDomRowHeight),i.vDomWindowMinMarginRows),t),t-=s}else i._clearVirtualDom();if(i.displayRowsCount&&Tabulator.prototype.helpers.elVisible(i.element)){for(i.vDomTop=t,i.vDomBottom=t-1;(a<=i.height+i.vDomWindowBuffer||u<i.vDomWindowMinTotalRows)&&i.vDomBottom<i.displayRowsCount-1;){var p=i.vDomBottom+1,m=c[p],f=0;i.styleRow(m,p),n.appendChild(m.getElement()),m.initialize(),m.heightInitialized||m.normalizeHeight(!0),f=m.getHeight(),u<s?r+=f:a+=f,f>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*f),"group"!==m.type&&(h=!1),i.vDomBottom++,u++}t?(i.vDomTopPad=e?i.vDomRowHeight*this.vDomTop+o:i.scrollTop-r,i.vDomBottomPad=i.vDomBottom==i.displayRowsCount-1?0:Math.max(i.vDomScrollHeight-i.vDomTopPad-a-r,0)):(this.vDomTopPad=0,i.vDomRowHeight=Math.floor((a+r)/u),i.vDomBottomPad=i.vDomRowHeight*(i.displayRowsCount-i.vDomBottom-1),i.vDomScrollHeight=r+a+i.vDomBottomPad-i.height),n.style.paddingTop=i.vDomTopPad+"px",n.style.paddingBottom=i.vDomBottomPad+"px",e&&(this.scrollTop=i.vDomTopPad+r+o-(this.element.scrollWidth>this.element.clientWidth?this.element.offsetHeight-this.element.clientHeight:0)),this.scrollTop=Math.min(this.scrollTop,this.element.scrollHeight-this.height),this.element.scrollWidth>this.element.offsetWidth&&e&&(this.scrollTop+=this.element.offsetHeight-this.element.clientHeight),this.vDomScrollPosTop=this.scrollTop,this.vDomScrollPosBottom=this.scrollTop,l.scrollTop=this.scrollTop,n.style.minWidth=h?i.table.columnManager.getWidth()+"px":"",i.table.options.groupBy&&"fitDataFill"!=i.table.modules.layout.getMode()&&i.displayRowsCount==i.table.modules.groupRows.countGroups()&&(i.tableElement.style.minWidth=i.table.columnManager.getWidth())}else this.renderEmptyScroll();this.fixedHeight||this.adjustTableSize()},RowManager.prototype.scrollVertical=function(t){var e=this.scrollTop-this.vDomScrollPosTop,o=this.scrollTop-this.vDomScrollPosBottom,i=2*this.vDomWindowBuffer;if(-e>i||o>i){var n=this.scrollLeft;this._virtualRenderFill(Math.floor(this.element.scrollTop/this.element.scrollHeight*this.displayRowsCount)),this.scrollHorizontal(n)}else t?(e<0&&this._addTopRow(-e),o<0&&(this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer?this._removeBottomRow(-o):this.vDomScrollPosBottom=this.scrollTop)):(e>=0&&(this.scrollTop>this.vDomWindowBuffer?this._removeTopRow(e):this.vDomScrollPosTop=this.scrollTop),o>=0&&this._addBottomRow(o))},RowManager.prototype._addTopRow=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.tableElement,i=this.getDisplayRows();if(this.vDomTop){var n=this.vDomTop-1,l=i[n],s=l.getHeight()||this.vDomRowHeight;t>=s&&(this.styleRow(l,n),o.insertBefore(l.getElement(),o.firstChild),l.initialized&&l.heightInitialized||(this.vDomTopNewRows.push(l),l.heightInitialized||l.clearCellHeight()),l.initialize(),this.vDomTopPad-=s,this.vDomTopPad<0&&(this.vDomTopPad=n*this.vDomRowHeight),n||(this.vDomTopPad=0),o.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop-=s,this.vDomTop--),t=-(this.scrollTop-this.vDomScrollPosTop),l.getHeight()>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*l.getHeight()),e<this.vDomMaxRenderChain&&this.vDomTop&&t>=(i[this.vDomTop-1].getHeight()||this.vDomRowHeight)?this._addTopRow(t,e+1):this._quickNormalizeRowHeight(this.vDomTopNewRows)}},RowManager.prototype._removeTopRow=function(t){var e=this.tableElement,o=this.getDisplayRows()[this.vDomTop],i=o.getHeight()||this.vDomRowHeight;if(t>=i){var n=o.getElement();n.parentNode.removeChild(n),this.vDomTopPad+=i,e.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop+=this.vDomTop?i:i+this.vDomWindowBuffer,this.vDomTop++,t=this.scrollTop-this.vDomScrollPosTop,this._removeTopRow(t)}},RowManager.prototype._addBottomRow=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.tableElement,i=this.getDisplayRows();if(this.vDomBottom<this.displayRowsCount-1){var n=this.vDomBottom+1,l=i[n],s=l.getHeight()||this.vDomRowHeight;t>=s&&(this.styleRow(l,n),o.appendChild(l.getElement()),l.initialized&&l.heightInitialized||(this.vDomBottomNewRows.push(l),l.heightInitialized||l.clearCellHeight()),l.initialize(),this.vDomBottomPad-=s,(this.vDomBottomPad<0||n==this.displayRowsCount-1)&&(this.vDomBottomPad=0),o.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom+=s,this.vDomBottom++),t=this.scrollTop-this.vDomScrollPosBottom,l.getHeight()>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*l.getHeight()),e<this.vDomMaxRenderChain&&this.vDomBottom<this.displayRowsCount-1&&t>=(i[this.vDomBottom+1].getHeight()||this.vDomRowHeight)?this._addBottomRow(t,e+1):this._quickNormalizeRowHeight(this.vDomBottomNewRows)}},RowManager.prototype._removeBottomRow=function(t){var e=this.tableElement,o=this.getDisplayRows()[this.vDomBottom],i=o.getHeight()||this.vDomRowHeight;if(t>=i){var n=o.getElement();n.parentNode&&n.parentNode.removeChild(n),this.vDomBottomPad+=i,this.vDomBottomPad<0&&(this.vDomBottomPad=0),e.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom-=i,this.vDomBottom--,t=-(this.scrollTop-this.vDomScrollPosBottom),this._removeBottomRow(t)
-}},RowManager.prototype._quickNormalizeRowHeight=function(t){t.forEach(function(t){t.calcHeight()}),t.forEach(function(t){t.setCellHeight()}),t.length=0},RowManager.prototype.normalizeHeight=function(){this.activeRows.forEach(function(t){t.normalizeHeight()})},RowManager.prototype.adjustTableSize=function(){var t,e=this.element.clientHeight;if("virtual"===this.renderMode){var o=Math.floor(this.columnManager.getElement().offsetHeight+(this.table.footerManager&&!this.table.footerManager.external?this.table.footerManager.getElement().offsetHeight:0));this.fixedHeight?(this.element.style.minHeight="calc(100% - "+o+"px)",this.element.style.height="calc(100% - "+o+"px)",this.element.style.maxHeight="calc(100% - "+o+"px)"):(this.element.style.height="",this.element.style.height=Math.floor(this.table.element.clientHeight)-o+"px",this.element.scrollTop=this.scrollTop),this.height=this.element.clientHeight,this.vDomWindowBuffer=this.table.options.virtualDomBuffer||this.height,this.fixedHeight||Math.floor(e)==Math.floor(this.element.clientHeight)||((t=this.table.modExists("resizeTable"))&&!this.table.modules.resizeTable.autoResize||!t)&&this.redraw()}},RowManager.prototype.reinitialize=function(){this.rows.forEach(function(t){t.reinitialize(!0)})},RowManager.prototype.blockRedraw=function(){this.redrawBlock=!0,this.redrawBlockRestoreConfig=!1},RowManager.prototype.restoreRedraw=function(){this.redrawBlock=!1,this.redrawBlockRestoreConfig?(this.refreshActiveData(this.redrawBlockRestoreConfig.stage,this.redrawBlockRestoreConfig.skipStage,this.redrawBlockRestoreConfig.renderInPosition),this.redrawBlockRestoreConfig=!1):this.redrawBlockRederInPosition&&this.reRenderInPosition(),this.redrawBlockRederInPosition=!1},RowManager.prototype.redraw=function(t){var e=this.scrollLeft;this.adjustTableSize(),this.table.tableWidth=this.table.element.clientWidth,t?this.renderTable():("classic"==this.renderMode?this.table.options.groupBy?this.refreshActiveData("group",!1,!1):this._simpleRender():(this.reRenderInPosition(),this.scrollHorizontal(e)),this.displayRowsCount||this.table.options.placeholder&&this.getElement().appendChild(this.table.options.placeholder))},RowManager.prototype.resetScroll=function(){if(this.element.scrollLeft=0,this.element.scrollTop=0,"ie"===this.table.browser){var t=document.createEvent("Event");t.initEvent("scroll",!1,!0),this.element.dispatchEvent(t)}else this.element.dispatchEvent(new Event("scroll"))};var VDomHoz=function(t){this.table=t,this.element=this.table.rowManager.tableElement,this.holderEl=this.table.rowManager.element,this.leftCol=0,this.rightCol=0,this.scrollLeft=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0,this.fitDataColAvg=0,this.window=200,this.initialized=!1,this.columns=[],this.compatabilityCheck()&&this.initialize()};VDomHoz.prototype.compatabilityCheck=function(){var t=this.table.options,e=!0;return"fitDataTable"==t.layout&&(console.warn("Horizontal Vitrual DOM is not compatible with fitDataTable layout mode"),e=!1),t.responsiveLayout&&(console.warn("Horizontal Vitrual DOM is not compatible with responsive columns"),e=!1),this.table.rtl&&(console.warn("Horizontal Vitrual DOM is not currently compatible with RTL text direction"),e=!1),t.columns&&t.columns.find(function(t){return t.frozen})&&(console.warn("Horizontal Vitrual DOM is not compatible with frozen columns"),e=!1),e||(t.virtualDomHoz=!1),e},VDomHoz.prototype.initialize=function(){var t=this;this.holderEl.addEventListener("scroll",function(){var e=t.holderEl.scrollLeft;t.scrollLeft!=e&&(t.scrollLeft=e,t.scroll(e-(t.vDomScrollPosLeft+t.window)))})},VDomHoz.prototype.deinitialize=function(){this.initialized=!1},VDomHoz.prototype.clear=function(){this.columns=[],this.leftCol=-1,this.rightCol=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0},VDomHoz.prototype.dataChange=function(){var t,e,o,i=!1,n=0,l=0;if("fitData"===this.table.options.layout){if(this.table.columnManager.columnsByIndex.forEach(function(t){!t.definition.width&&t.visible&&(i=!0)}),i&&i&&this.table.rowManager.getDisplayRows().length&&(this.vDomScrollPosRight=this.scrollLeft+this.holderEl.clientWidth+this.window,this.table.options.groupBy?(t=this.table.modules.groupRows.getGroups(!1)[0],e=t.getRows(!1)[0]):e=this.table.rowManager.getDisplayRows()[0],e)){o=e.getElement(),e.generateCells(),this.element.appendChild(o);for(var l=0;l<e.cells.length;l++){var s=e.cells[l];if(o.appendChild(s.getElement()),s.column.reinitializeWidth(),(n+=s.column.getWidth())>this.vDomScrollPosRight)break}for(o.parentNode.removeChild(o),this.fitDataColAvg=Math.floor(n/(l+1)),l;l<this.table.columnManager.columnsByIndex.length;l++)this.table.columnManager.columnsByIndex[l].setWidth(this.fitDataColAvg);this.reinitialize(!1,!0)}}else"fitColumns"===this.table.options.layout&&(this.table.modules.layout.layout(),this.table.vdomHoz.reinitialize(!1,!0))},VDomHoz.prototype.fitDataLayoutOverride=function(){for(var t=this.leftCol;t<=this.rightCol;t++)this.columns[t].reinitializeWidth()},VDomHoz.prototype.reinitialize=function(t,e){var o=this,i={cols:this.columns,leftCol:this.leftCol,rightCol:this.rightCol};if(!t||this.initialized){this.clear(),this.scrollLeft=this.holderEl.scrollLeft,this.vDomScrollPosLeft=this.scrollLeft-this.window,this.vDomScrollPosRight=this.scrollLeft+this.holderEl.clientWidth+this.window;var n=0;this.table.columnManager.columnsByIndex.forEach(function(t){var e={};if(t.visible){var i=t.getWidth();e.leftPos=n,e.rightPos=n+i,n+i>o.vDomScrollPosLeft&&n<o.vDomScrollPosRight?(-1==o.leftCol&&(o.leftCol=o.columns.length,o.vDomPadLeft=n),o.rightCol=o.columns.length):-1!==o.leftCol&&(o.vDomPadRight+=i),o.columns.push(t),t.modules.vdomHoz=e,n+=i}}),this.element.style.paddingLeft=this.vDomPadLeft+"px",this.element.style.paddingRight=this.vDomPadRight+"px",this.initialized=!0,e||t&&!this.reinitChanged(i)||this.renitializeRows(),this.holderEl.scrollLeft=this.scrollLeft}},VDomHoz.prototype.reinitChanged=function(t){var e=this,o=!0;return t.cols.length!==this.columns.length||t.leftCol!==this.leftCol||t.rightCol!==this.rightCol||(t.cols.forEach(function(t,i){t!==e.columns[i]&&(o=!1)}),!o)},VDomHoz.prototype.renitializeRows=function(){var t=this;this.table.rowManager.getVisibleRows().forEach(function(e){t.reinitializeRow(e,!0)})},VDomHoz.prototype.scroll=function(t){this.vDomScrollPosLeft+=t,this.vDomScrollPosRight+=t,t>.8*this.holderEl.clientWidth?this.reinitialize():t>0?(this.addColRight(),this.removeColLeft()):(this.addColLeft(),this.removeColRight())},VDomHoz.prototype.colPositionAdjust=function(t,e,o){for(var i=t;i<e;i++){var n=this.columns[i];n.modules.vdomHoz.leftPos-=o,n.modules.vdomHoz.rightPos-=o}},VDomHoz.prototype.addColRight=function(){var t,e,o,i=this.columns[this.rightCol+1];i&&i.modules.vdomHoz.leftPos<=this.vDomScrollPosRight&&(t=this.table.rowManager.getVisibleRows(),t.forEach(function(t){if("group"!==t.type){var e=t.getCell(i);t.getElement().appendChild(e.getElement()),e.cellRendered()}}),this.fitDataColAvg&&(e=i.getWidth())===this.fitDataColAvg&&(i.reinitializeWidth(),(o=e-i.getWidth())&&(i.modules.vdomHoz.rightPos-=o,this.colPositionAdjust(this.rightCol+1,this.columns.length,o))),this.rightCol++,this.rightCol>=this.columns.length-1?this.vDomPadRight=0:this.vDomPadRight-=i.getWidth(),this.element.style.paddingRight=this.vDomPadRight+"px",this.addColRight())},VDomHoz.prototype.addColLeft=function(){var t=this.columns[this.leftCol-1];if(t&&t.modules.vdomHoz.rightPos>=this.vDomScrollPosLeft){this.table.rowManager.getVisibleRows().forEach(function(e){if("group"!==e.type){var o=e.getCell(t);e.getElement().prepend(o.getElement()),o.cellRendered()}}),this.leftCol?this.vDomPadLeft-=t.getWidth():this.vDomPadLeft=0,this.element.style.paddingLeft=this.vDomPadLeft+"px",this.leftCol--,this.addColLeft()}},VDomHoz.prototype.removeColRight=function(t){var e,t=this.columns[this.rightCol];t&&t.modules.vdomHoz.leftPos>this.vDomScrollPosRight&&(e=this.table.rowManager.getVisibleRows(),t.modules.vdomHoz.visible=!1,e.forEach(function(e){if("group"!==e.type){var o=e.getCell(t);e.getElement().removeChild(o.getElement())}}),this.vDomPadRight+=t.getWidth(),this.element.style.paddingRight=this.vDomPadRight+"px",this.rightCol--,this.removeColRight())},VDomHoz.prototype.removeColLeft=function(){var t,e=this.columns[this.leftCol];e&&e.modules.vdomHoz.rightPos<this.vDomScrollPosLeft&&(t=this.table.rowManager.getVisibleRows(),t.forEach(function(t){if("group"!==t.type){var o=t.getCell(e);t.getElement().removeChild(o.getElement())}}),this.vDomPadLeft+=e.getWidth(),this.element.style.paddingLeft=this.vDomPadLeft+"px",this.leftCol++,this.removeColLeft())},VDomHoz.prototype.initializeRow=function(t){if("group"!==t.type){t.modules.vdomHoz={leftCol:this.leftCol,rightCol:this.rightCol};for(var e=this.leftCol;e<=this.rightCol;e++){var o=this.columns[e];if(o.visible){var i=t.getCell(o);t.element.appendChild(i.getElement()),i.cellRendered()}}}},VDomHoz.prototype.reinitializeRow=function(t,e){if("group"!==t.type&&(e||!t.modules.vdomHoz||t.modules.vdomHoz.leftCol!==this.leftCol||t.modules.vdomHoz.rightCol!==this.rightCol)){for(;t.element.firstChild;)t.element.removeChild(t.element.firstChild);this.initializeRow(t)}};var RowComponent=function(t){this._row=t};RowComponent.prototype.getData=function(t){return this._row.getData(t)},RowComponent.prototype.getElement=function(){return this._row.getElement()},RowComponent.prototype.getCells=function(){var t=[];return this._row.getCells().forEach(function(e){t.push(e.getComponent())}),t},RowComponent.prototype.getCell=function(t){var e=this._row.getCell(t);return!!e&&e.getComponent()},RowComponent.prototype.getIndex=function(){return this._row.getData("data")[this._row.table.options.index]},RowComponent.prototype.getPosition=function(t){return this._row.table.rowManager.getRowPosition(this._row,t)},RowComponent.prototype.delete=function(){return this._row.delete()},RowComponent.prototype.scrollTo=function(){return this._row.table.rowManager.scrollToRow(this._row)},RowComponent.prototype.pageTo=function(){if(this._row.table.modExists("page",!0))return this._row.table.modules.page.setPageToRow(this._row)},RowComponent.prototype.move=function(t,e){this._row.moveToRow(t,e)},RowComponent.prototype.update=function(t){return this._row.updateData(t)},RowComponent.prototype.normalizeHeight=function(){this._row.normalizeHeight(!0)},RowComponent.prototype.select=function(){this._row.table.modules.selectRow.selectRows(this._row)},RowComponent.prototype.deselect=function(){this._row.table.modules.selectRow.deselectRows(this._row)},RowComponent.prototype.toggleSelect=function(){this._row.table.modules.selectRow.toggleRow(this._row)},RowComponent.prototype.isSelected=function(){return this._row.table.modules.selectRow.isRowSelected(this._row)},RowComponent.prototype._getSelf=function(){return this._row},RowComponent.prototype.validate=function(){return this._row.validate()},RowComponent.prototype.freeze=function(){this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.freezeRow(this._row)},RowComponent.prototype.unfreeze=function(){this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.unfreezeRow(this._row)},RowComponent.prototype.isFrozen=function(){if(this._row.table.modExists("frozenRows",!0)){return this._row.table.modules.frozenRows.rows.indexOf(this._row)>-1}return!1},RowComponent.prototype.treeCollapse=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.collapseRow(this._row)},RowComponent.prototype.treeExpand=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.expandRow(this._row)},RowComponent.prototype.treeToggle=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.toggleRow(this._row)},RowComponent.prototype.getTreeParent=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeParent(this._row)},RowComponent.prototype.getTreeChildren=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeChildren(this._row,!0)},RowComponent.prototype.addTreeChild=function(t,e,o){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.addTreeChildRow(this._row,t,e,o)},RowComponent.prototype.reformat=function(){return this._row.reinitialize()},RowComponent.prototype.getGroup=function(){return this._row.getGroup().getComponent()},RowComponent.prototype.getTable=function(){return this._row.table},RowComponent.prototype.getNextRow=function(){var t=this._row.nextRow();return t?t.getComponent():t},RowComponent.prototype.getPrevRow=function(){var t=this._row.prevRow();return t?t.getComponent():t};var Row=function(t,e){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"row";this.table=e.table,this.parent=e,this.data={},this.type=o,this.element=this.createElement(),this.modules={},this.cells=[],this.height=0,this.heightStyled="",this.manualHeight=!1,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.component=null,this.setData(t),this.generateElement()};Row.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-row"),t.setAttribute("role","row"),t},Row.prototype.getElement=function(){return this.element},Row.prototype.detachElement=function(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)},Row.prototype.generateElement=function(){var t,e,o,i=this;!1!==i.table.options.selectable&&i.table.modExists("selectRow")&&i.table.modules.selectRow.initializeRow(this),!1!==i.table.options.movableRows&&i.table.modExists("moveRow")&&i.table.modules.moveRow.initializeRow(this),!1!==i.table.options.dataTree&&i.table.modExists("dataTree")&&i.table.modules.dataTree.initializeRow(this),"collapse"===i.table.options.responsiveLayout&&i.table.modExists("responsiveLayout")&&i.table.modules.responsiveLayout.initializeRow(this),(i.table.options.rowContextMenu||i.table.options.rowClickMenu)&&this.table.modExists("menu")&&i.table.modules.menu.initializeRow(this),i.table.options.rowClick&&i.element.addEventListener("click",function(t){i.table.options.rowClick(t,i.getComponent())}),i.table.options.rowDblClick&&i.element.addEventListener("dblclick",function(t){i.table.options.rowDblClick(t,i.getComponent())}),i.table.options.rowContext&&i.element.addEventListener("contextmenu",function(t){i.table.options.rowContext(t,i.getComponent())}),i.table.options.rowMouseEnter&&i.element.addEventListener("mouseenter",function(t){i.table.options.rowMouseEnter(t,i.getComponent())}),i.table.options.rowMouseLeave&&i.element.addEventListener("mouseleave",function(t){i.table.options.rowMouseLeave(t,i.getComponent())}),i.table.options.rowMouseOver&&i.element.addEventListener("mouseover",function(t){i.table.options.rowMouseOver(t,i.getComponent())}),i.table.options.rowMouseOut&&i.element.addEventListener("mouseout",function(t){i.table.options.rowMouseOut(t,i.getComponent())}),i.table.options.rowMouseMove&&i.element.addEventListener("mousemove",function(t){i.table.options.rowMouseMove(t,i.getComponent())}),i.table.options.rowTap&&(o=!1,i.element.addEventListener("touchstart",function(t){o=!0},{passive:!0}),i.element.addEventListener("touchend",function(t){o&&i.table.options.rowTap(t,i.getComponent()),o=!1})),i.table.options.rowDblTap&&(t=null,i.element.addEventListener("touchend",function(e){t?(clearTimeout(t),t=null,i.table.options.rowDblTap(e,i.getComponent())):t=setTimeout(function(){clearTimeout(t),t=null},300)})),i.table.options.rowTapHold&&(e=null,i.element.addEventListener("touchstart",function(t){clearTimeout(e),e=setTimeout(function(){clearTimeout(e),e=null,o=!1,i.table.options.rowTapHold(t,i.getComponent())},1e3)},{passive:!0}),i.element.addEventListener("touchend",function(t){clearTimeout(e),e=null}))},Row.prototype.generateCells=function(){this.cells=this.table.columnManager.generateCells(this)},Row.prototype.initialize=function(t){var e=this;if(!this.initialized||t){for(this.deleteCells();this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layoutRow(this),this.generateCells(),this.table.options.virtualDomHoz&&this.table.vdomHoz.initialized?this.table.vdomHoz.initializeRow(this):this.cells.forEach(function(t){e.element.appendChild(t.getElement()),t.cellRendered()}),t&&this.normalizeHeight(),this.table.options.dataTree&&this.table.modExists("dataTree")&&this.table.modules.dataTree.layoutRow(this),"collapse"===this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout")&&this.table.modules.responsiveLayout.layoutRow(this),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent()),this.table.options.resizableRows&&this.table.modExists("resizeRows")&&this.table.modules.resizeRows.initializeRow(this),this.initialized=!0}else this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitializeRow(this)},Row.prototype.reinitializeHeight=function(){this.heightInitialized=!1,null!==this.element.offsetParent&&this.normalizeHeight(!0)},Row.prototype.reinitialize=function(t){this.initialized=!1,this.heightInitialized=!1,this.manualHeight||(this.height=0,this.heightStyled=""),null!==this.element.offsetParent&&this.initialize(!0),this.table.options.dataTree&&this.table.modExists("dataTree",!0)&&this.table.modules.dataTree.getTreeChildren(this,!1,!0).forEach(function(t){t.reinitialize(!0)})},Row.prototype.calcHeight=function(t){var e=0,o=this.table.options.resizableRows?this.element.clientHeight:0;this.cells.forEach(function(t){var o=t.getHeight();o>e&&(e=o)}),this.height=t?Math.max(e,o):this.manualHeight?this.height:Math.max(e,o),this.heightStyled=this.height?this.height+"px":"",this.outerHeight=this.element.offsetHeight},Row.prototype.setCellHeight=function(){this.cells.forEach(function(t){t.setHeight()}),this.heightInitialized=!0},Row.prototype.clearCellHeight=function(){this.cells.forEach(function(t){t.clearHeight()})},Row.prototype.normalizeHeight=function(t){t&&this.clearCellHeight(),this.calcHeight(t),this.setCellHeight()},Row.prototype.setHeight=function(t,e){(this.height!=t||e)&&(this.manualHeight=!0,this.height=t,this.heightStyled=t?t+"px":"",this.setCellHeight(),this.outerHeight=this.element.offsetHeight)},Row.prototype.getHeight=function(){return this.outerHeight},Row.prototype.getWidth=function(){return this.element.offsetWidth},Row.prototype.deleteCell=function(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)},Row.prototype.setData=function(t){this.table.modExists("mutator")&&(t=this.table.modules.mutator.transformRow(t,"data")),this.data=t,this.table.options.reactiveData&&this.table.modExists("reactiveData",!0)&&this.table.modules.reactiveData.watchRow(this)},Row.prototype.updateData=function(t){var e,o=this,i=Tabulator.prototype.helpers.elVisible(this.element),n={};return new Promise(function(l,s){"string"==typeof t&&(t=JSON.parse(t)),o.table.options.reactiveData&&o.table.modExists("reactiveData",!0)&&o.table.modules.reactiveData.block(),o.table.modExists("mutator")?(n=Object.assign(n,o.data),n=Object.assign(n,t),e=o.table.modules.mutator.transformRow(n,"data",t)):e=t;for(var a in e)o.data[a]=e[a];o.table.options.reactiveData&&o.table.modExists("reactiveData",!0)&&o.table.modules.reactiveData.unblock();for(var a in t){o.table.columnManager.getColumnsByFieldRoot(a).forEach(function(t){var n=o.getCell(t.getField());if(n){var l=t.getFieldValue(e);n.getValue()!=l&&(n.setValueProcessData(l),i&&n.cellRendered())}})}o.table.options.groupUpdateOnCellEdit&&o.table.options.groupBy&&o.table.modExists("groupRows")&&o.table.modules.groupRows.reassignRowToGroup(o.row),i?(o.normalizeHeight(!0),o.table.options.rowFormatter&&o.table.options.rowFormatter(o.getComponent())):(o.initialized=!1,o.height=0,o.heightStyled=""),!1!==o.table.options.dataTree&&o.table.modExists("dataTree")&&o.table.modules.dataTree.redrawNeeded(t)&&(o.table.modules.dataTree.initializeRow(o),i&&(o.table.modules.dataTree.layoutRow(o),o.table.rowManager.refreshActiveData("tree",!1,!0))),o.table.options.rowUpdated.call(o.table,o.getComponent()),o.table.options.dataChanged&&o.table.options.dataChanged.call(o.table,o.table.rowManager.getData()),l()})},Row.prototype.getData=function(t){return t&&this.table.modExists("accessor")?this.table.modules.accessor.transformRow(this,t):this.data},Row.prototype.getCell=function(t){return t=this.table.columnManager.findColumn(t),this.cells.find(function(e){return e.column===t})},Row.prototype.getCellIndex=function(t){return this.cells.findIndex(function(e){return e===t})},Row.prototype.findNextEditableCell=function(t){var e=!1;if(t<this.cells.length-1)for(var o=t+1;o<this.cells.length;o++){var i=this.cells[o];if(i.column.modules.edit&&Tabulator.prototype.helpers.elVisible(i.getElement())){var n=!0;if("function"==typeof i.column.modules.edit.check&&(n=i.column.modules.edit.check(i.getComponent())),n){e=i;break}}}return e},Row.prototype.findPrevEditableCell=function(t){var e=!1;if(t>0)for(var o=t-1;o>=0;o--){var i=this.cells[o],n=!0;if(i.column.modules.edit&&Tabulator.prototype.helpers.elVisible(i.getElement())&&("function"==typeof i.column.modules.edit.check&&(n=i.column.modules.edit.check(i.getComponent())),n)){e=i;break}}return e},Row.prototype.getCells=function(){return this.cells},Row.prototype.nextRow=function(){return this.table.rowManager.nextDisplayRow(this,!0)||!1},Row.prototype.prevRow=function(){return this.table.rowManager.prevDisplayRow(this,!0)||!1},Row.prototype.moveToRow=function(t,e){var o=this.table.rowManager.findRow(t);o?(this.table.rowManager.moveRowActual(this,o,!e),this.table.rowManager.refreshActiveData("display",!1,!0)):console.warn("Move Error - No matching row found:",t)},Row.prototype.validate=function(){var t=[];return this.cells.forEach(function(e){e.validate()||t.push(e.getComponent())}),!t.length||t},Row.prototype.delete=function(){var t=this;return new Promise(function(e,o){var i,n;t.table.options.history&&t.table.modExists("history")&&(t.table.options.groupBy&&t.table.modExists("groupRows")?(n=t.getGroup().rows,(i=n.indexOf(t))&&(i=n[i-1])):(i=t.table.rowManager.getRowIndex(t))&&(i=t.table.rowManager.rows[i-1]),t.table.modules.history.action("rowDelete",t,{data:t.getData(),pos:!i,index:i})),t.deleteActual(),e()})},Row.prototype.deleteActual=function(t){this.table.rowManager.getRowIndex(this);this.detatchModules(),this.table.options.reactiveData&&this.table.modExists("reactiveData",!0),this.modules.group&&this.modules.group.removeRow(this),this.table.rowManager.deleteRow(this,t),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.element=!1,this.table.options.dataTree&&this.table.modExists("dataTree",!0)&&this.table.modules.dataTree.rowDelete(this),this.table.modExists("columnCalcs")&&(this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.columnCalcs.recalcRowGroup(this):this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows))},Row.prototype.detatchModules=function(){this.table.modExists("selectRow")&&this.table.modules.selectRow._deselectRow(this,!0),this.table.modExists("edit")&&this.table.modules.edit.currentCell.row===this&&this.table.modules.edit.cancelEdit(),this.table.modExists("frozenRows")&&this.table.modules.frozenRows.detachRow(this)},Row.prototype.deleteCells=function(){for(var t=this.cells.length,e=0;e<t;e++)this.cells[0].delete()},Row.prototype.wipe=function(){for(this.detatchModules(),this.deleteCells();this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element=!1,this.modules={},this.element.parentNode&&this.element.parentNode.removeChild(this.element)},Row.prototype.getGroup=function(){return this.modules.group||!1},Row.prototype.getComponent=function(){return this.component||(this.component=new RowComponent(this)),this.component};var CellComponent=function(t){this._cell=t};CellComponent.prototype.getValue=function(){return this._cell.getValue()},CellComponent.prototype.getOldValue=function(){return this._cell.getOldValue()},CellComponent.prototype.getInitialValue=function(){return this._cell.initialValue},CellComponent.prototype.getElement=function(){return this._cell.getElement()},CellComponent.prototype.getRow=function(){return this._cell.row.getComponent()},CellComponent.prototype.getData=function(){return this._cell.row.getData()},CellComponent.prototype.getField=function(){return this._cell.column.getField()},CellComponent.prototype.getColumn=function(){return this._cell.column.getComponent()},CellComponent.prototype.setValue=function(t,e){void 0===e&&(e=!0),this._cell.setValue(t,e)},CellComponent.prototype.restoreOldValue=function(){this._cell.setValueActual(this._cell.getOldValue())},CellComponent.prototype.restoreInitialValue=function(){this._cell.setValueActual(this._cell.initialValue)},CellComponent.prototype.edit=function(t){return this._cell.edit(t)},CellComponent.prototype.cancelEdit=function(){this._cell.cancelEdit()},CellComponent.prototype.isEdited=function(){return!!this._cell.modules.edit&&this._cell.modules.edit.edited},CellComponent.prototype.clearEdited=function(){self.table.modExists("edit",!0)&&this._cell.table.modules.edit.clearEdited(this._cell)},CellComponent.prototype.isValid=function(){return!this._cell.modules.validate||!this._cell.modules.validate.invalid},CellComponent.prototype.validate=function(){return this._cell.validate()},CellComponent.prototype.clearValidation=function(){this._cell.table.modExists("validate",!0)&&this._cell.table.modules.validate.clearValidation(this._cell)},CellComponent.prototype.nav=function(){return this._cell.nav()},CellComponent.prototype.checkHeight=function(){this._cell.checkHeight()},CellComponent.prototype.getTable=function(){return this._cell.table},CellComponent.prototype._getSelf=function(){return this._cell};var Cell=function(t,e){this.table=t.table,this.column=t,this.row=e,this.element=null,this.value=null,this.initialValue,this.oldValue=null,this.modules={},this.height=null,this.width=null,this.minWidth=null,this.component=null,this.loaded=!1,this.build()};Cell.prototype.build=function(){this.generateElement(),this.setWidth(),this._configureCell(),this.setValueActual(this.column.getFieldValue(this.row.data)),this.initialValue=this.value},Cell.prototype.generateElement=function(){this.element=document.createElement("div"),this.element.className="tabulator-cell",this.element.setAttribute("role","gridcell"),this.element=this.element},Cell.prototype._configureCell=function(){var t=this,e=t.column.cellEvents,o=t.element,i=this.column.getField(),n={top:"flex-start",bottom:"flex-end",middle:"center"},l={left:"flex-start",right:"flex-end",center:"center"};if(o.style.textAlign=t.column.hozAlign,t.column.vertAlign&&(o.style.display="inline-flex",o.style.alignItems=n[t.column.vertAlign]||"",t.column.hozAlign&&(o.style.justifyContent=l[t.column.hozAlign]||"")),i&&o.setAttribute("tabulator-field",i),t.column.definition.cssClass){t.column.definition.cssClass.split(" ").forEach(function(t){o.classList.add(t)})}"hover"===this.table.options.tooltipGenerationMode&&o.addEventListener("mouseenter",function(e){t._generateTooltip()}),t._bindClickEvents(e),t._bindTouchEvents(e),t._bindMouseEvents(e),t.column.modules.edit&&t.table.modules.edit.bindEditor(t),t.column.definition.rowHandle&&!1!==t.table.options.movableRows&&t.table.modExists("moveRow")&&t.table.modules.moveRow.initializeCell(t),t.column.visible||t.hide()},Cell.prototype._bindClickEvents=function(t){var e=this,o=e.element;(t.cellClick||e.table.options.cellClick)&&o.addEventListener("click",function(o){var i=e.getComponent();t.cellClick&&t.cellClick.call(e.table,o,i),e.table.options.cellClick&&e.table.options.cellClick.call(e.table,o,i)}),t.cellDblClick||this.table.options.cellDblClick?o.addEventListener("dblclick",function(o){var i=e.getComponent();t.cellDblClick&&t.cellDblClick.call(e.table,o,i),e.table.options.cellDblClick&&e.table.options.cellDblClick.call(e.table,o,i)}):o.addEventListener("dblclick",function(t){if(!e.table.modExists("edit")||e.table.modules.edit.currentCell!==e){t.preventDefault();try{if(document.selection){var o=document.body.createTextRange();o.moveToElementText(e.element),o.select()}else if(window.getSelection){var o=document.createRange();o.selectNode(e.element),window.getSelection().removeAllRanges(),window.getSelection().addRange(o)}}catch(t){}}}),(t.cellContext||this.table.options.cellContext)&&o.addEventListener("contextmenu",function(o){var i=e.getComponent();t.cellContext&&t.cellContext.call(e.table,o,i),e.table.options.cellContext&&e.table.options.cellContext.call(e.table,o,i)})},Cell.prototype._bindMouseEvents=function(t){var e=this,o=e.element;(t.cellMouseEnter||e.table.options.cellMouseEnter)&&o.addEventListener("mouseenter",function(o){var i=e.getComponent();t.cellMouseEnter&&t.cellMouseEnter.call(e.table,o,i),e.table.options.cellMouseEnter&&e.table.options.cellMouseEnter.call(e.table,o,i)}),(t.cellMouseLeave||e.table.options.cellMouseLeave)&&o.addEventListener("mouseleave",function(o){var i=e.getComponent();t.cellMouseLeave&&t.cellMouseLeave.call(e.table,o,i),e.table.options.cellMouseLeave&&e.table.options.cellMouseLeave.call(e.table,o,i)}),(t.cellMouseOver||e.table.options.cellMouseOver)&&o.addEventListener("mouseover",function(o){var i=e.getComponent();t.cellMouseOver&&t.cellMouseOver.call(e.table,o,i),e.table.options.cellMouseOver&&e.table.options.cellMouseOver.call(e.table,o,i)}),(t.cellMouseOut||e.table.options.cellMouseOut)&&o.addEventListener("mouseout",function(o){var i=e.getComponent();t.cellMouseOut&&t.cellMouseOut.call(e.table,o,i),e.table.options.cellMouseOut&&e.table.options.cellMouseOut.call(e.table,o,i)}),(t.cellMouseMove||e.table.options.cellMouseMove)&&o.addEventListener("mousemove",function(o){var i=e.getComponent();t.cellMouseMove&&t.cellMouseMove.call(e.table,o,i),e.table.options.cellMouseMove&&e.table.options.cellMouseMove.call(e.table,o,i)})},Cell.prototype._bindTouchEvents=function(t){var e,o,i,n=this,l=n.element;(t.cellTap||this.table.options.cellTap)&&(i=!1,l.addEventListener("touchstart",function(t){i=!0},{passive:!0}),l.addEventListener("touchend",function(e){if(i){var o=n.getComponent();t.cellTap&&t.cellTap.call(n.table,e,o),n.table.options.cellTap&&n.table.options.cellTap.call(n.table,e,o)}i=!1})),(t.cellDblTap||this.table.options.cellDblTap)&&(e=null,l.addEventListener("touchend",function(o){if(e){clearTimeout(e),e=null;var i=n.getComponent();t.cellDblTap&&t.cellDblTap.call(n.table,o,i),n.table.options.cellDblTap&&n.table.options.cellDblTap.call(n.table,o,i)}else e=setTimeout(function(){clearTimeout(e),e=null},300)})),(t.cellTapHold||this.table.options.cellTapHold)&&(o=null,l.addEventListener("touchstart",function(e){clearTimeout(o),o=setTimeout(function(){clearTimeout(o),o=null,i=!1;var l=n.getComponent();t.cellTapHold&&t.cellTapHold.call(n.table,e,l),n.table.options.cellTapHold&&n.table.options.cellTapHold.call(n.table,e,l)},1e3)},{passive:!0}),l.addEventListener("touchend",function(t){clearTimeout(o),o=null}))},Cell.prototype._generateContents=function(){var t;switch(t=this.table.modExists("format")?this.table.modules.format.formatValue(this):this.element.innerHTML=this.value,void 0===t?"undefined":_typeof(t)){case"object":if(t instanceof Node){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.appendChild(t)}else this.element.innerHTML="",null!=t&&console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",t);break;case"undefined":case"null":this.element.innerHTML="";break;default:this.element.innerHTML=t}},Cell.prototype.cellRendered=function(){this.table.modExists("format")&&this.table.modules.format.cellRendered&&this.table.modules.format.cellRendered(this)},
-Cell.prototype._generateTooltip=function(){var t=this.column.tooltip;t?(!0===t?t=this.value:"function"==typeof t&&!1===(t=t(this.getComponent()))&&(t=""),void 0===t&&(t=""),this.element.setAttribute("title",t)):this.element.setAttribute("title","")},Cell.prototype.getElement=function(){return this.loaded||(this.loaded=!0,this.layoutElement()),this.element},Cell.prototype.getValue=function(){return this.value},Cell.prototype.getOldValue=function(){return this.oldValue},Cell.prototype.setValue=function(t,e){var o,i=this.setValueProcessData(t,e);i&&(this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("cellEdit",this,{oldValue:this.oldValue,newValue:this.value}),o=this.getComponent(),this.column.cellEvents.cellEdited&&this.column.cellEvents.cellEdited.call(this.table,o),this.table.options.groupUpdateOnCellEdit&&this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.reassignRowToGroup(this.row),this.cellRendered(),this.table.options.cellEdited.call(this.table,o),this.table.options.dataChanged&&this.table.options.dataChanged.call(this.table,this.table.rowManager.getData()))},Cell.prototype.setValueProcessData=function(t,e){var o=!1;return this.value!=t&&(o=!0,e&&this.column.modules.mutate&&(t=this.table.modules.mutator.transformCell(this,t))),this.setValueActual(t),o&&this.table.modExists("columnCalcs")&&(this.column.definition.topCalc||this.column.definition.bottomCalc)&&(this.table.options.groupBy&&this.table.modExists("groupRows")?("table"!=this.table.options.columnCalcs&&"both"!=this.table.options.columnCalcs||this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),"table"!=this.table.options.columnCalcs&&this.table.modules.columnCalcs.recalcRowGroup(this.row)):this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows)),o},Cell.prototype.setValueActual=function(t){this.oldValue=this.value,this.value=t,this.table.options.reactiveData&&this.table.modExists("reactiveData")&&this.table.modules.reactiveData.block(),this.column.setFieldValue(this.row.data,t),this.table.options.reactiveData&&this.table.modExists("reactiveData")&&this.table.modules.reactiveData.unblock(),this.loaded&&this.layoutElement()},Cell.prototype.layoutElement=function(){this._generateContents(),this._generateTooltip(),this.table.options.resizableColumns&&this.table.modExists("resizeColumns")&&"row"===this.row.type&&this.table.modules.resizeColumns.initializeColumn("cell",this.column,this.element),(this.column.definition.contextMenu||this.column.definition.clickMenu)&&this.table.modExists("menu")&&this.table.modules.menu.initializeCell(this),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layoutElement(this.element,this.column)},Cell.prototype.setWidth=function(){this.width=this.column.width,this.element.style.width=this.column.widthStyled},Cell.prototype.clearWidth=function(){this.width="",this.element.style.width=""},Cell.prototype.getWidth=function(){return this.width||this.element.offsetWidth},Cell.prototype.setMinWidth=function(){this.minWidth=this.column.minWidth,this.element.style.minWidth=this.column.minWidthStyled},Cell.prototype.checkHeight=function(){this.row.reinitializeHeight()},Cell.prototype.clearHeight=function(){this.element.style.height="",this.height=null},Cell.prototype.setHeight=function(){this.height=this.row.height,this.element.style.height=this.row.heightStyled},Cell.prototype.getHeight=function(){return this.height||this.element.offsetHeight},Cell.prototype.show=function(){this.element.style.display=this.column.vertAlign?"inline-flex":""},Cell.prototype.hide=function(){this.element.style.display="none"},Cell.prototype.edit=function(t){if(this.table.modExists("edit",!0))return this.table.modules.edit.editCell(this,t)},Cell.prototype.cancelEdit=function(){if(this.table.modExists("edit",!0)){var t=this.table.modules.edit.getCurrentCell();t&&t._getSelf()===this?this.table.modules.edit.cancelEdit():console.warn("Cancel Editor Error - This cell is not currently being edited ")}},Cell.prototype.validate=function(){if(this.column.modules.validate&&this.table.modExists("validate",!0)){return!0===this.table.modules.validate.validate(this.column.modules.validate,this,this.getValue())}return!0},Cell.prototype.delete=function(){!this.table.rowManager.redrawBlock&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.modules.validate&&this.modules.validate.invalid&&this.table.modules.validate.clearValidation(this),this.modules.edit&&this.modules.edit.edited&&this.table.modules.edit.clearEdited(this),this.table.options.history&&this.table.modules.history.clearComponentHistory(this),this.element=!1,this.column.deleteCell(this),this.row.deleteCell(this),this.calcs={}},Cell.prototype.nav=function(){var t=this,e=!1,o=this.row.getCellIndex(this);return{next:function(){var e,o=this.right();return!!o||!(!(e=t.table.rowManager.nextDisplayRow(t.row,!0))||!(o=e.findNextEditableCell(-1)))&&(o.edit(),!0)},prev:function(){var e,o=this.left();return!!o||!(!(e=t.table.rowManager.prevDisplayRow(t.row,!0))||!(o=e.findPrevEditableCell(e.cells.length)))&&(o.edit(),!0)},left:function(){return!!(e=t.row.findPrevEditableCell(o))&&(e.edit(),!0)},right:function(){return!!(e=t.row.findNextEditableCell(o))&&(e.edit(),!0)},up:function(){var e=t.table.rowManager.prevDisplayRow(t.row,!0);e&&e.cells[o].edit()},down:function(){var e=t.table.rowManager.nextDisplayRow(t.row,!0);e&&e.cells[o].edit()}}},Cell.prototype.getIndex=function(){this.row.getCellIndex(this)},Cell.prototype.getComponent=function(){return this.component||(this.component=new CellComponent(this)),this.component};var FooterManager=function(t){this.table=t,this.active=!1,this.element=this.createElement(),this.external=!1,this.links=[],this._initialize()};FooterManager.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-footer"),t},FooterManager.prototype._initialize=function(t){if(this.table.options.footerElement)switch(_typeof(this.table.options.footerElement)){case"string":"<"===this.table.options.footerElement[0]?this.element.innerHTML=this.table.options.footerElement:(this.external=!0,this.element=document.querySelector(this.table.options.footerElement));break;default:this.element=this.table.options.footerElement}},FooterManager.prototype.getElement=function(){return this.element},FooterManager.prototype.append=function(t,e){this.activate(e),this.element.appendChild(t),this.table.rowManager.adjustTableSize()},FooterManager.prototype.prepend=function(t,e){this.activate(e),this.element.insertBefore(t,this.element.firstChild),this.table.rowManager.adjustTableSize()},FooterManager.prototype.remove=function(t){t.parentNode.removeChild(t),this.deactivate()},FooterManager.prototype.deactivate=function(t){this.element.firstChild&&!t||(this.external||this.element.parentNode.removeChild(this.element),this.active=!1)},FooterManager.prototype.activate=function(t){this.active||(this.active=!0,this.external||(this.table.element.appendChild(this.getElement()),this.table.element.style.display="")),t&&this.links.push(t)},FooterManager.prototype.redraw=function(){this.links.forEach(function(t){t.footerRedraw()})};var Tabulator=function t(e,o){this.options={},this.columnManager=null,this.rowManager=null,this.footerManager=null,this.vdomHoz=null,this.browser="",this.browserSlow=!1,this.browserMobile=!1,this.rtl=!1,this.modules={},this.initializeElement(e)&&(this.initializeOptions(o||{}),this._create()),t.prototype.comms.register(this)};Tabulator.prototype.defaultOptions={height:!1,minHeight:!1,maxHeight:!1,layout:"fitData",layoutColumnsOnNewData:!1,columnMinWidth:40,columnHeaderVertAlign:"top",columnVertAlign:!1,resizableColumns:!0,resizableRows:!1,autoResize:!0,columns:[],cellHozAlign:"",cellVertAlign:"",headerHozAlign:"",data:[],autoColumns:!1,autoColumnsDefinitions:!1,reactiveData:!1,nestedFieldSeparator:".",tooltips:!1,tooltipsHeader:!1,tooltipGenerationMode:"load",initialSort:!1,initialFilter:!1,initialHeaderFilter:!1,columnHeaderSortMulti:!0,sortOrderReverse:!1,headerSort:!0,headerSortTristate:!1,headerSortElement:"<div class='tabulator-arrow'></div>",footerElement:!1,index:"id",textDirection:"auto",keybindings:[],tabEndNewRow:!1,invalidOptionWarnings:!0,clipboard:!1,clipboardCopyStyled:!0,clipboardCopyConfig:!1,clipboardCopyFormatter:!1,clipboardCopyRowRange:"active",clipboardPasteParser:"table",clipboardPasteAction:"insert",clipboardCopied:function(){},clipboardPasted:function(){},clipboardPasteError:function(){},downloadDataFormatter:!1,downloadReady:function(t,e){return e},downloadComplete:!1,downloadConfig:{},downloadRowRange:"active",dataTree:!1,dataTreeFilter:!0,dataTreeSort:!0,dataTreeElementColumn:!1,dataTreeBranchElement:!0,dataTreeChildIndent:9,dataTreeChildField:"_children",dataTreeCollapseElement:!1,dataTreeExpandElement:!1,dataTreeStartExpanded:!1,dataTreeRowExpanded:function(){},dataTreeRowCollapsed:function(){},dataTreeChildColumnCalcs:!1,dataTreeSelectPropagate:!1,printAsHtml:!1,printFormatter:!1,printHeader:!1,printFooter:!1,printCopyStyle:!0,printStyled:!0,printVisibleRows:!0,printRowRange:"visible",printConfig:{},addRowPos:"bottom",selectable:"highlight",selectableRangeMode:"drag",selectableRollingSelection:!0,selectablePersistence:!0,selectableCheck:function(t,e){return!0},headerFilterLiveFilterDelay:300,headerFilterPlaceholder:!1,headerVisible:!0,history:!1,locale:!1,langs:{},virtualDom:!0,virtualDomBuffer:0,virtualDomHoz:!1,persistentLayout:!1,persistentSort:!1,persistentFilter:!1,persistenceID:"",persistenceMode:!0,persistenceReaderFunc:!1,persistenceWriterFunc:!1,persistence:!1,responsiveLayout:!1,responsiveLayoutCollapseStartOpen:!0,responsiveLayoutCollapseUseFormatters:!0,responsiveLayoutCollapseFormatter:!1,pagination:!1,paginationSize:!1,paginationInitialPage:1,paginationButtonCount:5,paginationSizeSelector:!1,paginationElement:!1,paginationDataSent:{},paginationDataReceived:{},paginationAddRow:"page",ajaxURL:!1,ajaxURLGenerator:!1,ajaxParams:{},ajaxConfig:"get",ajaxContentType:"form",ajaxRequestFunc:!1,ajaxLoader:!0,ajaxLoaderLoading:!1,ajaxLoaderError:!1,ajaxFiltering:!1,ajaxSorting:!1,ajaxProgressiveLoad:!1,ajaxProgressiveLoadDelay:0,ajaxProgressiveLoadScrollMargin:0,groupBy:!1,groupStartOpen:!0,groupValues:!1,groupUpdateOnCellEdit:!1,groupHeader:!1,groupHeaderPrint:null,groupHeaderClipboard:null,groupHeaderHtmlOutput:null,groupHeaderDownload:null,htmlOutputConfig:!1,movableColumns:!1,movableRows:!1,movableRowsConnectedTables:!1,movableRowsConnectedElements:!1,movableRowsSender:!1,movableRowsReceiver:"insert",movableRowsSendingStart:function(){},movableRowsSent:function(){},movableRowsSentFailed:function(){},movableRowsSendingStop:function(){},movableRowsReceivingStart:function(){},movableRowsReceived:function(){},movableRowsReceivedFailed:function(){},movableRowsReceivingStop:function(){},movableRowsElementDrop:function(){},scrollToRowPosition:"top",scrollToRowIfVisible:!0,scrollToColumnPosition:"left",scrollToColumnIfVisible:!0,rowFormatter:!1,rowFormatterPrint:null,rowFormatterClipboard:null,rowFormatterHtmlOutput:null,placeholder:!1,tableBuilding:function(){},tableBuilt:function(){},renderStarted:function(){},renderComplete:function(){},rowClick:!1,rowDblClick:!1,rowContext:!1,rowTap:!1,rowDblTap:!1,rowTapHold:!1,rowMouseEnter:!1,rowMouseLeave:!1,rowMouseOver:!1,rowMouseOut:!1,rowMouseMove:!1,rowContextMenu:!1,rowClickMenu:!1,rowAdded:function(){},rowDeleted:function(){},rowMoved:function(){},rowUpdated:function(){},rowSelectionChanged:function(){},rowSelected:function(){},rowDeselected:function(){},rowResized:function(){},cellClick:!1,cellDblClick:!1,cellContext:!1,cellTap:!1,cellDblTap:!1,cellTapHold:!1,cellMouseEnter:!1,cellMouseLeave:!1,cellMouseOver:!1,cellMouseOut:!1,cellMouseMove:!1,cellEditing:function(){},cellEdited:function(){},cellEditCancelled:function(){},columnMoved:!1,columnResized:function(){},columnTitleChanged:function(){},columnVisibilityChanged:function(){},htmlImporting:function(){},htmlImported:function(){},dataLoading:function(){},dataLoaded:function(){},dataEdited:!1,dataChanged:!1,ajaxRequesting:function(){},ajaxResponse:!1,ajaxError:function(){},dataFiltering:!1,dataFiltered:!1,dataSorting:function(){},dataSorted:function(){},groupToggleElement:"arrow",groupClosedShowCalcs:!1,dataGrouping:function(){},dataGrouped:!1,groupVisibilityChanged:function(){},groupClick:!1,groupDblClick:!1,groupContext:!1,groupContextMenu:!1,groupClickMenu:!1,groupTap:!1,groupDblTap:!1,groupTapHold:!1,columnCalcs:!0,pageLoaded:function(){},localized:function(){},validationMode:"blocking",validationFailed:function(){},historyUndo:function(){},historyRedo:function(){},scrollHorizontal:function(){},scrollVertical:function(){}},Tabulator.prototype.initializeOptions=function(t){if(!1!==t.invalidOptionWarnings)for(var e in t)void 0===this.defaultOptions[e]&&console.warn("Invalid table constructor option:",e);for(var e in this.defaultOptions)e in t?this.options[e]=t[e]:Array.isArray(this.defaultOptions[e])?this.options[e]=Object.assign([],this.defaultOptions[e]):"object"===_typeof(this.defaultOptions[e])&&null!==this.defaultOptions[e]?this.options[e]=Object.assign({},this.defaultOptions[e]):this.options[e]=this.defaultOptions[e]},Tabulator.prototype.initializeElement=function(t){return"undefined"!=typeof HTMLElement&&t instanceof HTMLElement?(this.element=t,!0):"string"==typeof t?(this.element=document.querySelector(t),!!this.element||(console.error("Tabulator Creation Error - no element found matching selector: ",t),!1)):(console.error("Tabulator Creation Error - Invalid element provided:",t),!1)},Tabulator.prototype.rtlCheck=function(){var t=window.getComputedStyle(this.element);switch(this.options.textDirection){case"auto":if("rtl"!==t.direction)break;case"rtl":this.element.classList.add("tabulator-rtl"),this.rtl=!0;break;case"ltr":this.element.classList.add("tabulator-ltr");default:this.rtl=!1}},Tabulator.prototype._mapDepricatedFunctionality=function(){(this.options.persistentLayout||this.options.persistentSort||this.options.persistentFilter)&&(this.options.persistence||(this.options.persistence={})),this.options.dataEdited&&(console.warn("DEPRECATION WARNING - dataEdited option has been deprecated, please use the dataChanged option instead"),this.options.dataChanged=this.options.dataEdited),this.options.downloadDataFormatter&&console.warn("DEPRECATION WARNING - downloadDataFormatter option has been deprecated"),void 0!==this.options.clipboardCopyHeader&&(this.options.columnHeaders=this.options.clipboardCopyHeader,console.warn("DEPRECATION WARNING - clipboardCopyHeader option has been deprecated, please use the columnHeaders property on the clipboardCopyConfig option")),!0!==this.options.printVisibleRows&&(console.warn("printVisibleRows option is deprecated, you should now use the printRowRange option"),this.options.persistence.printRowRange="active"),!0!==this.options.printCopyStyle&&(console.warn("printCopyStyle option is deprecated, you should now use the printStyled option"),this.options.persistence.printStyled=this.options.printCopyStyle),this.options.persistentLayout&&(console.warn("persistentLayout option is deprecated, you should now use the persistence option"),!0!==this.options.persistence&&void 0===this.options.persistence.columns&&(this.options.persistence.columns=!0)),this.options.persistentSort&&(console.warn("persistentSort option is deprecated, you should now use the persistence option"),!0!==this.options.persistence&&void 0===this.options.persistence.sort&&(this.options.persistence.sort=!0)),this.options.persistentFilter&&(console.warn("persistentFilter option is deprecated, you should now use the persistence option"),!0!==this.options.persistence&&void 0===this.options.persistence.filter&&(this.options.persistence.filter=!0)),this.options.columnVertAlign&&(console.warn("columnVertAlign option is deprecated, you should now use the columnHeaderVertAlign option"),this.options.columnHeaderVertAlign=this.options.columnVertAlign)},Tabulator.prototype._clearSelection=function(){this.element.classList.add("tabulator-block-select"),window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty(),this.element.classList.remove("tabulator-block-select")},Tabulator.prototype._create=function(){this._clearObjectPointers(),this._mapDepricatedFunctionality(),this.bindModules(),this.rtlCheck(),"TABLE"===this.element.tagName&&this.modExists("htmlTableImport",!0)&&this.modules.htmlTableImport.parseTable(),this.columnManager=new ColumnManager(this),this.rowManager=new RowManager(this),this.footerManager=new FooterManager(this),this.columnManager.setRowManager(this.rowManager),this.rowManager.setColumnManager(this.columnManager),this.options.virtualDomHoz&&(this.vdomHoz=new VDomHoz(this)),this._buildElement(),this._loadInitialData()},Tabulator.prototype._clearObjectPointers=function(){this.options.columns=this.options.columns.slice(0),this.options.reactiveData||(this.options.data=this.options.data.slice(0))},Tabulator.prototype._buildElement=function(){var t=this,e=this.element,o=this.modules,i=this.options;for(i.tableBuilding.call(this),e.classList.add("tabulator"),e.setAttribute("role","grid");e.firstChild;)e.removeChild(e.firstChild);i.height&&(i.height=isNaN(i.height)?i.height:i.height+"px",e.style.height=i.height),!1!==i.minHeight&&(i.minHeight=isNaN(i.minHeight)?i.minHeight:i.minHeight+"px",e.style.minHeight=i.minHeight),!1!==i.maxHeight&&(i.maxHeight=isNaN(i.maxHeight)?i.maxHeight:i.maxHeight+"px",e.style.maxHeight=i.maxHeight),this.columnManager.initialize(),this.rowManager.initialize(),this._detectBrowser(),this.modExists("layout",!0)&&o.layout.initialize(i.layout),o.localize.initialize(),!1!==i.headerFilterPlaceholder&&o.localize.setHeaderFilterPlaceholder(i.headerFilterPlaceholder);for(var n in i.langs)o.localize.installLang(n,i.langs[n]);if(o.localize.setLocale(i.locale),"string"==typeof i.placeholder){var l=document.createElement("div");l.classList.add("tabulator-placeholder");var s=document.createElement("span");s.innerHTML=i.placeholder,l.appendChild(s),i.placeholder=l}if(e.appendChild(this.columnManager.getElement()),e.appendChild(this.rowManager.getElement()),i.footerElement&&this.footerManager.activate(),i.persistence&&this.modExists("persistence",!0)&&o.persistence.initialize(),i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.columns&&(i.columns=o.persistence.load("columns",i.columns)),i.movableRows&&this.modExists("moveRow")&&o.moveRow.initialize(),i.autoColumns&&this.options.data&&this.columnManager.generateColumnsFromRowData(this.options.data),this.modExists("columnCalcs")&&o.columnCalcs.initialize(),this.columnManager.setColumns(i.columns),i.dataTree&&this.modExists("dataTree",!0)&&o.dataTree.initialize(),this.modExists("frozenRows")&&this.modules.frozenRows.initialize(),(i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.sort||i.initialSort)&&this.modExists("sort",!0)){var a=[];i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.sort?!1===(a=o.persistence.load("sort"))&&i.initialSort&&(a=i.initialSort):i.initialSort&&(a=i.initialSort),o.sort.setSort(a)}if((i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.filter||i.initialFilter)&&this.modExists("filter",!0)){var r=[];i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.filter?!1===(r=o.persistence.load("filter"))&&i.initialFilter&&(r=i.initialFilter):i.initialFilter&&(r=i.initialFilter),o.filter.setFilter(r)}i.initialHeaderFilter&&this.modExists("filter",!0)&&i.initialHeaderFilter.forEach(function(e){var i=t.columnManager.findColumn(e.field);if(!i)return console.warn("Column Filter Error - No matching column found:",e.field),!1;o.filter.setHeaderFilterValue(i,e.value)}),this.modExists("ajax")&&o.ajax.initialize(),i.pagination&&this.modExists("page",!0)&&o.page.initialize(),i.groupBy&&this.modExists("groupRows",!0)&&o.groupRows.initialize(),this.modExists("keybindings")&&o.keybindings.initialize(),this.modExists("selectRow")&&o.selectRow.clearSelectionData(!0),i.autoResize&&this.modExists("resizeTable")&&o.resizeTable.initialize(),this.modExists("clipboard")&&o.clipboard.initialize(),i.printAsHtml&&this.modExists("print")&&o.print.initialize(),i.tableBuilt.call(this)},Tabulator.prototype._loadInitialData=function(){var t=this;if(t.options.pagination&&t.modExists("page"))if(t.modules.page.reset(!0,!0),"local"==t.options.pagination){if(t.options.data.length)t.rowManager.setData(t.options.data,!1,!0);else{if((t.options.ajaxURL||t.options.ajaxURLGenerator)&&t.modExists("ajax"))return void t.modules.ajax.loadData(!1,!0).then(function(){}).catch(function(){t.options.paginationInitialPage&&t.modules.page.setPage(t.options.paginationInitialPage)});t.rowManager.setData(t.options.data,!1,!0)}t.options.paginationInitialPage&&t.modules.page.setPage(t.options.paginationInitialPage)}else t.options.ajaxURL?t.modules.page.setPage(t.options.paginationInitialPage).then(function(){}).catch(function(){}):t.rowManager.setData([],!1,!0);else t.options.data.length?t.rowManager.setData(t.options.data):(t.options.ajaxURL||t.options.ajaxURLGenerator)&&t.modExists("ajax")?t.modules.ajax.loadData(!1,!0).then(function(){}).catch(function(){}):t.rowManager.setData(t.options.data,!1,!0)},Tabulator.prototype.destroy=function(){var t=this.element;for(Tabulator.prototype.comms.deregister(this),this.options.reactiveData&&this.modExists("reactiveData",!0)&&this.modules.reactiveData.unwatchData(),this.rowManager.rows.forEach(function(t){t.wipe()}),this.rowManager.rows=[],this.rowManager.activeRows=[],this.rowManager.displayRows=[],this.options.autoResize&&this.modExists("resizeTable")&&this.modules.resizeTable.clearBindings(),this.modExists("keybindings")&&this.modules.keybindings.clearBindings();t.firstChild;)t.removeChild(t.firstChild);t.classList.remove("tabulator")},Tabulator.prototype._detectBrowser=function(){var t=navigator.userAgent||navigator.vendor||window.opera;t.indexOf("Trident")>-1?(this.browser="ie",this.browserSlow=!0):t.indexOf("Edge")>-1?(this.browser="edge",this.browserSlow=!0):t.indexOf("Firefox")>-1?(this.browser="firefox",this.browserSlow=!1):(this.browser="other",this.browserSlow=!1),this.browserMobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4))},Tabulator.prototype.blockRedraw=function(){return this.rowManager.blockRedraw()},Tabulator.prototype.restoreRedraw=function(){return this.rowManager.restoreRedraw()},Tabulator.prototype.setDataFromLocalFile=function(t){var e=this;return new Promise(function(o,i){var n=document.createElement("input");n.type="file",n.accept=t||".json,application/json",n.addEventListener("change",function(t){var l,s=n.files[0],a=new FileReader;a.readAsText(s),a.onload=function(t){try{l=JSON.parse(a.result)}catch(t){return console.warn("File Load Error - File contents is invalid JSON",t),void i(t)}e.setData(l).then(function(t){o(t)}).catch(function(t){o(t)})},a.onerror=function(t){console.warn("File Load Error - Unable to read file"),i()}}),n.click()})},Tabulator.prototype.setData=function(t,e,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(t,e,o,!1,!0)},Tabulator.prototype._setData=function(t,e,o,i,n){var l=this;return"string"!=typeof t?t?l.rowManager.setData(t,i,n):l.modExists("ajax")&&(l.modules.ajax.getUrl||l.options.ajaxURLGenerator)?"remote"==l.options.pagination&&l.modExists("page",!0)?(l.modules.page.reset(!0,!0),l.modules.page.setPage(1)):l.modules.ajax.loadData(i,n):l.rowManager.setData([],i,n):0==t.indexOf("{")||0==t.indexOf("[")?l.rowManager.setData(JSON.parse(t),i,n):l.modExists("ajax",!0)?(e&&l.modules.ajax.setParams(e),o&&l.modules.ajax.setConfig(o),l.modules.ajax.setUrl(t),"remote"==l.options.pagination&&l.modExists("page",!0)?(l.modules.page.reset(!0,!0),l.modules.page.setPage(1)):l.modules.ajax.loadData(i,n)):void 0},Tabulator.prototype.clearData=function(){this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this.rowManager.clearData()},Tabulator.prototype.getData=function(t){return!0===t&&(console.warn("passing a boolean to the getData function is deprecated, you should now pass the string 'active'"),t="active"),this.rowManager.getData(t)},Tabulator.prototype.getDataCount=function(t){return!0===t&&(console.warn("passing a boolean to the getDataCount function is deprecated, you should now pass the string 'active'"),t="active"),this.rowManager.getDataCount(t)},Tabulator.prototype.searchRows=function(t,e,o){if(this.modExists("filter",!0))return this.modules.filter.search("rows",t,e,o)},Tabulator.prototype.searchData=function(t,e,o){if(this.modExists("filter",!0))return this.modules.filter.search("data",t,e,o)},Tabulator.prototype.getHtml=function(t,e,o){if(this.modExists("export",!0))return this.modules.export.getHtml(t,e,o)},Tabulator.prototype.print=function(t,e,o){if(this.modExists("print",!0))return this.modules.print.printFullscreen(t,e,o)},Tabulator.prototype.getAjaxUrl=function(){if(this.modExists("ajax",!0))return this.modules.ajax.getUrl()},Tabulator.prototype.replaceData=function(t,e,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(t,e,o,!0)},Tabulator.prototype.updateData=function(t){var e=this,o=this,i=0;return new Promise(function(n,l){e.modExists("ajax")&&e.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?t.forEach(function(t){var e=o.rowManager.findRow(t[o.options.index]);e&&(i++,e.updateData(t).then(function(){--i||n()}))}):(console.warn("Update Error - No data provided"),l("Update Error - No data provided"))})},Tabulator.prototype.addData=function(t,e,o){var i=this;return new Promise(function(n,l){i.modExists("ajax")&&i.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?i.rowManager.addRows(t,e,o).then(function(t){var e=[];t.forEach(function(t){e.push(t.getComponent())}),n(e)}):(console.warn("Update Error - No data provided"),l("Update Error - No data provided"))})},Tabulator.prototype.updateOrAddData=function(t){var e=this,o=this,i=[],n=0;return new Promise(function(l,s){e.modExists("ajax")&&e.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?t.forEach(function(t){var e=o.rowManager.findRow(t[o.options.index]);n++,e?e.updateData(t).then(function(){n--,i.push(e.getComponent()),n||l(i)}):o.rowManager.addRows(t).then(function(t){n--,i.push(t[0].getComponent()),n||l(i)})}):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))})},Tabulator.prototype.getRow=function(t){var e=this.rowManager.findRow(t);return e?e.getComponent():(console.warn("Find Error - No matching row found:",t),!1)},Tabulator.prototype.getRowFromPosition=function(t,e){var o=this.rowManager.getRowFromPosition(t,e);return o?o.getComponent():(console.warn("Find Error - No matching row found:",t),!1)},Tabulator.prototype.deleteRow=function(t){var e=this;return new Promise(function(o,i){function n(){++s==t.length&&a&&(l.rowManager.reRenderInPosition(),o())}var l=e,s=0,a=0,r=[];Array.isArray(t)||(t=[t]),t.forEach(function(t){var o=e.rowManager.findRow(t,!0);o?r.push(o):(console.warn("Delete Error - No matching row found:",t),i("Delete Error - No matching row found"),n())}),r.sort(function(t,o){return e.rowManager.rows.indexOf(t)>e.rowManager.rows.indexOf(o)?1:-1}),r.forEach(function(t){t.delete().then(function(){a++,n()}).catch(function(t){n(),i(t)})})})},Tabulator.prototype.addRow=function(t,e,o){var i=this;return new Promise(function(n,l){"string"==typeof t&&(t=JSON.parse(t)),i.rowManager.addRows(t,e,o).then(function(t){i.modExists("columnCalcs")&&i.modules.columnCalcs.recalc(i.rowManager.activeRows),n(t[0].getComponent())})})},Tabulator.prototype.updateOrAddRow=function(t,e){var o=this;return new Promise(function(i,n){var l=o.rowManager.findRow(t);"string"==typeof e&&(e=JSON.parse(e)),l?l.updateData(e).then(function(){o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(o.rowManager.activeRows),i(l.getComponent())}).catch(function(t){n(t)}):l=o.rowManager.addRows(e).then(function(t){o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(o.rowManager.activeRows),i(t[0].getComponent())}).catch(function(t){n(t)})})},Tabulator.prototype.updateRow=function(t,e){var o=this;return new Promise(function(i,n){var l=o.rowManager.findRow(t);"string"==typeof e&&(e=JSON.parse(e)),l?l.updateData(e).then(function(){i(l.getComponent())}).catch(function(t){n(t)}):(console.warn("Update Error - No matching row found:",t),n("Update Error - No matching row found"))})},Tabulator.prototype.scrollToRow=function(t,e,o){var i=this;return new Promise(function(n,l){var s=i.rowManager.findRow(t);s?i.rowManager.scrollToRow(s,e,o).then(function(){n()}).catch(function(t){l(t)}):(console.warn("Scroll Error - No matching row found:",t),l("Scroll Error - No matching row found"))})},Tabulator.prototype.moveRow=function(t,e,o){var i=this.rowManager.findRow(t);i?i.moveToRow(e,o):console.warn("Move Error - No matching row found:",t)},Tabulator.prototype.getRows=function(t){return!0===t&&(console.warn("passing a boolean to the getRows function is deprecated, you should now pass the string 'active'"),t="active"),this.rowManager.getComponents(t)},Tabulator.prototype.getRowPosition=function(t,e){var o=this.rowManager.findRow(t);return o?this.rowManager.getRowPosition(o,e):(console.warn("Position Error - No matching row found:",t),!1)},Tabulator.prototype.copyToClipboard=function(t){this.modExists("clipboard",!0)&&this.modules.clipboard.copy(t)},Tabulator.prototype.setColumns=function(t){this.columnManager.setColumns(t)},Tabulator.prototype.getColumns=function(t){return this.columnManager.getComponents(t)},Tabulator.prototype.getColumn=function(t){var e=this.columnManager.findColumn(t);return e?e.getComponent():(console.warn("Find Error - No matching column found:",t),!1)},
-Tabulator.prototype.getColumnDefinitions=function(){return this.columnManager.getDefinitionTree()},Tabulator.prototype.getColumnLayout=function(){if(this.modExists("persistence",!0))return this.modules.persistence.parseColumns(this.columnManager.getColumns())},Tabulator.prototype.setColumnLayout=function(t){return!!this.modExists("persistence",!0)&&(this.columnManager.setColumns(this.modules.persistence.mergeDefinition(this.options.columns,t)),!0)},Tabulator.prototype.showColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Show Error - No matching column found:",t),!1;e.show(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},Tabulator.prototype.hideColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Hide Error - No matching column found:",t),!1;e.hide(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},Tabulator.prototype.toggleColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Visibility Toggle Error - No matching column found:",t),!1;e.visible?e.hide():e.show()},Tabulator.prototype.addColumn=function(t,e,o){var i=this;return new Promise(function(n,l){var s=i.columnManager.findColumn(o);i.columnManager.addColumn(t,e,s).then(function(t){n(t.getComponent())}).catch(function(t){l(t)})})},Tabulator.prototype.deleteColumn=function(t){var e=this;return new Promise(function(o,i){var n=e.columnManager.findColumn(t);n?n.delete().then(function(){o()}).catch(function(t){i(t)}):(console.warn("Column Delete Error - No matching column found:",t),i())})},Tabulator.prototype.updateColumnDefinition=function(t,e){var o=this;return new Promise(function(i,n){var l=o.columnManager.findColumn(t);l?l.updateDefinition(e).then(function(t){i(t)}).catch(function(t){n(t)}):(console.warn("Column Update Error - No matching column found:",t),n())})},Tabulator.prototype.moveColumn=function(t,e,o){var i=this.columnManager.findColumn(t),n=this.columnManager.findColumn(e);i?n?this.columnManager.moveColumn(i,n,o):console.warn("Move Error - No matching column found:",n):console.warn("Move Error - No matching column found:",t)},Tabulator.prototype.scrollToColumn=function(t,e,o){var i=this;return new Promise(function(n,l){var s=i.columnManager.findColumn(t);s?i.columnManager.scrollToColumn(s,e,o).then(function(){n()}).catch(function(t){l(t)}):(console.warn("Scroll Error - No matching column found:",t),l("Scroll Error - No matching column found"))})},Tabulator.prototype.setLocale=function(t){this.modules.localize.setLocale(t)},Tabulator.prototype.getLocale=function(){return this.modules.localize.getLocale()},Tabulator.prototype.getLang=function(t){return this.modules.localize.getLang(t)},Tabulator.prototype.redraw=function(t){this.columnManager.redraw(t),this.rowManager.redraw(t)},Tabulator.prototype.setHeight=function(t){"classic"!==this.rowManager.renderMode?(this.options.height=isNaN(t)?t:t+"px",this.element.style.height=this.options.height,this.rowManager.setRenderMode(),this.rowManager.redraw()):console.warn("setHeight function is not available in classic render mode")},Tabulator.prototype.setSort=function(t,e){this.modExists("sort",!0)&&(this.modules.sort.setSort(t,e),this.rowManager.sorterRefresh())},Tabulator.prototype.getSorters=function(){if(this.modExists("sort",!0))return this.modules.sort.getSort()},Tabulator.prototype.clearSort=function(){this.modExists("sort",!0)&&(this.modules.sort.clear(),this.rowManager.sorterRefresh())},Tabulator.prototype.setFilter=function(t,e,o,i){this.modExists("filter",!0)&&(this.modules.filter.setFilter(t,e,o,i),this.rowManager.filterRefresh())},Tabulator.prototype.addFilter=function(t,e,o,i){this.modExists("filter",!0)&&(this.modules.filter.addFilter(t,e,o,i),this.rowManager.filterRefresh())},Tabulator.prototype.getFilters=function(t){if(this.modExists("filter",!0))return this.modules.filter.getFilters(t)},Tabulator.prototype.setHeaderFilterFocus=function(t){if(this.modExists("filter",!0)){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Filter Focus Error - No matching column found:",t),!1;this.modules.filter.setHeaderFilterFocus(e)}},Tabulator.prototype.getHeaderFilterValue=function(t){if(this.modExists("filter",!0)){var e=this.columnManager.findColumn(t);if(e)return this.modules.filter.getHeaderFilterValue(e);console.warn("Column Filter Error - No matching column found:",t)}},Tabulator.prototype.setHeaderFilterValue=function(t,e){if(this.modExists("filter",!0)){var o=this.columnManager.findColumn(t);if(!o)return console.warn("Column Filter Error - No matching column found:",t),!1;this.modules.filter.setHeaderFilterValue(o,e)}},Tabulator.prototype.getHeaderFilters=function(){if(this.modExists("filter",!0))return this.modules.filter.getHeaderFilters()},Tabulator.prototype.removeFilter=function(t,e,o){this.modExists("filter",!0)&&(this.modules.filter.removeFilter(t,e,o),this.rowManager.filterRefresh())},Tabulator.prototype.clearFilter=function(t){this.modExists("filter",!0)&&(this.modules.filter.clearFilter(t),this.rowManager.filterRefresh())},Tabulator.prototype.clearHeaderFilter=function(){this.modExists("filter",!0)&&(this.modules.filter.clearHeaderFilter(),this.rowManager.filterRefresh())},Tabulator.prototype.selectRow=function(t){this.modExists("selectRow",!0)&&(!0===t&&(console.warn("passing a boolean to the selectRowselectRow function is deprecated, you should now pass the string 'active'"),t="active"),this.modules.selectRow.selectRows(t))},Tabulator.prototype.deselectRow=function(t){this.modExists("selectRow",!0)&&this.modules.selectRow.deselectRows(t)},Tabulator.prototype.toggleSelectRow=function(t){this.modExists("selectRow",!0)&&this.modules.selectRow.toggleRow(t)},Tabulator.prototype.getSelectedRows=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedRows()},Tabulator.prototype.getSelectedData=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedData()},Tabulator.prototype.getInvalidCells=function(){if(this.modExists("validate",!0))return this.modules.validate.getInvalidCells()},Tabulator.prototype.clearCellValidation=function(t){var e=this;this.modExists("validate",!0)&&(t||(t=this.modules.validate.getInvalidCells()),Array.isArray(t)||(t=[t]),t.forEach(function(t){e.modules.validate.clearValidation(t._getSelf())}))},Tabulator.prototype.validate=function(t){var e=[];return this.rowManager.rows.forEach(function(t){var o=t.validate();!0!==o&&(e=e.concat(o))}),!e.length||e},Tabulator.prototype.setMaxPage=function(t){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setMaxPage(t)},Tabulator.prototype.setPage=function(t){return this.options.pagination&&this.modExists("page")?this.modules.page.setPage(t):new Promise(function(t,e){e()})},Tabulator.prototype.setPageToRow=function(t){var e=this;return new Promise(function(o,i){e.options.pagination&&e.modExists("page")?(t=e.rowManager.findRow(t),t?e.modules.page.setPageToRow(t).then(function(){o()}).catch(function(){i()}):i()):i()})},Tabulator.prototype.setPageSize=function(t){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setPageSize(t),this.modules.page.setPage(1).then(function(){}).catch(function(){})},Tabulator.prototype.getPageSize=function(){if(this.options.pagination&&this.modExists("page",!0))return this.modules.page.getPageSize()},Tabulator.prototype.previousPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.previousPage()},Tabulator.prototype.nextPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.nextPage()},Tabulator.prototype.getPage=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPage()},Tabulator.prototype.getPageMax=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPageMax()},Tabulator.prototype.setGroupBy=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupBy=t,this.modules.groupRows.initialize(),this.rowManager.refreshActiveData("display"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")},Tabulator.prototype.setGroupValues=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupValues=t,this.modules.groupRows.initialize(),this.rowManager.refreshActiveData("display"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")},Tabulator.prototype.setGroupStartOpen=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupStartOpen=t,this.modules.groupRows.initialize(),this.options.groupBy?(this.rowManager.refreshActiveData("group"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")):console.warn("Grouping Update - cant refresh view, no groups have been set")},Tabulator.prototype.setGroupHeader=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupHeader=t,this.modules.groupRows.initialize(),this.options.groupBy?(this.rowManager.refreshActiveData("group"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")):console.warn("Grouping Update - cant refresh view, no groups have been set")},Tabulator.prototype.getGroups=function(t){return!!this.modExists("groupRows",!0)&&this.modules.groupRows.getGroups(!0)},Tabulator.prototype.getGroupedData=function(){if(this.modExists("groupRows",!0))return this.options.groupBy?this.modules.groupRows.getGroupedData():this.getData()},Tabulator.prototype.getEditedCells=function(){if(this.modExists("edit",!0))return this.modules.edit.getEditedCells()},Tabulator.prototype.clearCellEdited=function(t){var e=this;this.modExists("edit",!0)&&(t||(t=this.modules.edit.getEditedCells()),Array.isArray(t)||(t=[t]),t.forEach(function(t){e.modules.edit.clearEdited(t._getSelf())}))},Tabulator.prototype.getCalcResults=function(){return!!this.modExists("columnCalcs",!0)&&this.modules.columnCalcs.getResults()},Tabulator.prototype.recalc=function(){this.modExists("columnCalcs",!0)&&this.modules.columnCalcs.recalcAll(this.rowManager.activeRows)},Tabulator.prototype.navigatePrev=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&t.nav().prev()},Tabulator.prototype.navigateNext=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&t.nav().next()},Tabulator.prototype.navigateLeft=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().left())},Tabulator.prototype.navigateRight=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().right())},Tabulator.prototype.navigateUp=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().up())},Tabulator.prototype.navigateDown=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().down())},Tabulator.prototype.undo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.undo()},Tabulator.prototype.redo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.redo()},Tabulator.prototype.getHistoryUndoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryUndoSize()},Tabulator.prototype.getHistoryRedoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryRedoSize()},Tabulator.prototype.download=function(t,e,o,i){this.modExists("download",!0)&&this.modules.download.download(t,e,o,i)},Tabulator.prototype.downloadToTab=function(t,e,o,i){this.modExists("download",!0)&&this.modules.download.download(t,e,o,i,!0)},Tabulator.prototype.tableComms=function(t,e,o,i){this.modules.comms.receive(t,e,o,i)},Tabulator.prototype.moduleBindings={},Tabulator.prototype.extendModule=function(t,e,o){if(Tabulator.prototype.moduleBindings[t]){var i=Tabulator.prototype.moduleBindings[t].prototype[e];if(i)if("object"==(void 0===o?"undefined":_typeof(o)))for(var n in o)i[n]=o[n];else console.warn("Module Error - Invalid value type, it must be an object");else console.warn("Module Error - property does not exist:",e)}else console.warn("Module Error - module does not exist:",t)},Tabulator.prototype.registerModule=function(t,e){Tabulator.prototype.moduleBindings[t]=e},Tabulator.prototype.bindModules=function(){this.modules={};for(var t in Tabulator.prototype.moduleBindings)this.modules[t]=new Tabulator.prototype.moduleBindings[t](this)},Tabulator.prototype.modExists=function(t,e){return!!this.modules[t]||(e&&console.error("Tabulator Module Not Installed: "+t),!1)},Tabulator.prototype.helpers={elVisible:function(t){return!(t.offsetWidth<=0&&t.offsetHeight<=0)},elOffset:function(t){var e=t.getBoundingClientRect();return{top:e.top+window.pageYOffset-document.documentElement.clientTop,left:e.left+window.pageXOffset-document.documentElement.clientLeft}},deepClone:function(t){var e=Object.assign(Array.isArray(t)?[]:{},t);for(var o in t)null!=t[o]&&"object"===_typeof(t[o])&&(t[o]instanceof Date?e[o]=new Date(t[o]):e[o]=this.deepClone(t[o]));return e}},Tabulator.prototype.comms={tables:[],register:function(t){Tabulator.prototype.comms.tables.push(t)},deregister:function(t){var e=Tabulator.prototype.comms.tables.indexOf(t);e>-1&&Tabulator.prototype.comms.tables.splice(e,1)},lookupTable:function(t,e){var o,i,n=[];if("string"==typeof t){if(o=document.querySelectorAll(t),o.length)for(var l=0;l<o.length;l++)(i=Tabulator.prototype.comms.matchElement(o[l]))&&n.push(i)}else"undefined"!=typeof HTMLElement&&t instanceof HTMLElement||t instanceof Tabulator?(i=Tabulator.prototype.comms.matchElement(t))&&n.push(i):Array.isArray(t)?t.forEach(function(t){n=n.concat(Tabulator.prototype.comms.lookupTable(t))}):e||console.warn("Table Connection Error - Invalid Selector",t);return n},matchElement:function(t){return Tabulator.prototype.comms.tables.find(function(e){return t instanceof Tabulator?e===t:e.element===t})}},Tabulator.prototype.findTable=function(t){var e=Tabulator.prototype.comms.lookupTable(t,!0);return!(Array.isArray(e)&&!e.length)&&e};var Layout=function(t){this.table=t,this.mode=null};Layout.prototype.initialize=function(t){this.modes[t]?this.mode=t:(console.warn("Layout Error - invalid mode set, defaulting to 'fitData' : "+t),this.mode="fitData"),this.table.element.setAttribute("tabulator-layout",this.mode)},Layout.prototype.getMode=function(){return this.mode},Layout.prototype.layout=function(){this.modes[this.mode].call(this,this.table.columnManager.columnsByIndex)},Layout.prototype.modes={fitData:function(t){this.table.options.virtualDomHoz?this.table.vdomHoz.fitDataLayoutOverride():t.forEach(function(t){t.reinitializeWidth()}),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitDataFill:function(t){t.forEach(function(t){t.reinitializeWidth()}),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitDataTable:function(t){t.forEach(function(t){t.reinitializeWidth()}),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitDataStretch:function(t){var e=this,o=0,i=this.table.rowManager.element.clientWidth,n=0,l=!1;t.forEach(function(t,i){t.widthFixed||t.reinitializeWidth(),(e.table.options.responsiveLayout?t.modules.responsive.visible:t.visible)&&(l=t),t.visible&&(o+=t.getWidth())}),l?(n=i-o+l.getWidth(),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&(l.setWidth(0),this.table.modules.responsiveLayout.update()),n>0?l.setWidth(n):l.reinitializeWidth()):this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitColumns:function(t){function e(t){return"string"==typeof t?t.indexOf("%")>-1?n/100*parseInt(t):parseInt(t):t}function o(t,i,n,l){function s(t){return n*(t.column.definition.widthGrow||1)}function a(t){return e(t.width)-n*(t.column.definition.widthShrink||0)}var r=[],u=0,h=0,c=0,d=0,p=0,m=[];return t.forEach(function(t,e){var o=l?a(t):s(t);t.column.minWidth>=o?r.push(t):(m.push(t),p+=l?t.column.definition.widthShrink||1:t.column.definition.widthGrow||1)}),r.length?(r.forEach(function(t){u+=l?t.width-t.column.minWidth:t.column.minWidth,t.width=t.column.minWidth}),h=i-u,c=p?Math.floor(h/p):h,d=h-c*p,d+=o(m,h,c,l)):(d=p?i-Math.floor(i/p)*p:i,m.forEach(function(t){t.width=l?a(t):s(t)})),d}var i=this,n=i.table.element.clientWidth,l=0,s=0,a=0,r=0,u=[],h=[],c=0,d=0,p=0;this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight&&(n-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),t.forEach(function(t){var o,i,n;t.visible&&(o=t.definition.width,i=parseInt(t.minWidth),o?(n=e(o),l+=n>i?n:i,t.definition.widthShrink&&(h.push({column:t,width:n>i?n:i}),c+=t.definition.widthShrink)):(u.push({column:t,width:0}),a+=t.definition.widthGrow||1))}),s=n-l,r=Math.floor(s/a);var p=o(u,s,r,!1);u.length&&p>0&&(u[u.length-1].width+=+p),u.forEach(function(t){s-=t.width}),d=Math.abs(p)+s,d>0&&c&&(p=o(h,d,Math.floor(d/c),!0)),h.length&&(h[h.length-1].width-=p),u.forEach(function(t){t.column.setWidth(t.width)}),h.forEach(function(t){t.column.setWidth(t.width)})}},Tabulator.prototype.registerModule("layout",Layout);var Localize=function(t){this.table=t,this.locale="default",this.lang=!1,this.bindings={},this.langList={}};Localize.prototype.initialize=function(){this.langList=Tabulator.prototype.helpers.deepClone(this.langs)},Localize.prototype.setHeaderFilterPlaceholder=function(t){this.langList.default.headerFilters.default=t},Localize.prototype.setHeaderFilterColumnPlaceholder=function(t,e){this.langList.default.headerFilters.columns[t]=e,this.lang&&!this.lang.headerFilters.columns[t]&&(this.lang.headerFilters.columns[t]=e)},Localize.prototype.installLang=function(t,e){this.langList[t]?this._setLangProp(this.langList[t],e):this.langList[t]=e},Localize.prototype._setLangProp=function(t,e){for(var o in e)t[o]&&"object"==_typeof(t[o])?this._setLangProp(t[o],e[o]):t[o]=e[o]},Localize.prototype.setLocale=function(t){function e(t,o){for(var i in t)"object"==_typeof(t[i])?(o[i]||(o[i]={}),e(t[i],o[i])):o[i]=t[i]}var o=this;if(t=t||"default",!0===t&&navigator.language&&(t=navigator.language.toLowerCase()),t&&!o.langList[t]){var i=t.split("-")[0];o.langList[i]?(console.warn("Localization Error - Exact matching locale not found, using closest match: ",t,i),t=i):(console.warn("Localization Error - Matching locale not found, using default: ",t),t="default")}o.locale=t,o.lang=Tabulator.prototype.helpers.deepClone(o.langList.default||{}),"default"!=t&&e(o.langList[t],o.lang),o.table.options.localized.call(o.table,o.locale,o.lang),o._executeBindings()},Localize.prototype.getLocale=function(t){return self.locale},Localize.prototype.getLang=function(t){return t?this.langList[t]:this.lang},Localize.prototype.getText=function(t,e){var t=e?t+"|"+e:t,o=t.split("|");return this._getLangElement(o,this.locale)||""},Localize.prototype._getLangElement=function(t,e){var o=this,i=o.lang;return t.forEach(function(t){var e;i&&(e=i[t],i=void 0!==e&&e)}),i},Localize.prototype.bind=function(t,e){this.bindings[t]||(this.bindings[t]=[]),this.bindings[t].push(e),e(this.getText(t),this.lang)},Localize.prototype._executeBindings=function(){var t=this;for(var e in t.bindings)!function(e){t.bindings[e].forEach(function(o){o(t.getText(e),t.lang)})}(e)},Localize.prototype.langs={default:{groups:{item:"item",items:"items"},columns:{},ajax:{loading:"Loading",error:"Error"},pagination:{page_size:"Page Size",page_title:"Show Page",first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page",all:"All"},headerFilters:{default:"filter column...",columns:{}}}},Tabulator.prototype.registerModule("localize",Localize);var Comms=function(t){this.table=t};Comms.prototype.getConnections=function(t){var e,o=this,i=[];return e=Tabulator.prototype.comms.lookupTable(t),e.forEach(function(t){o.table!==t&&i.push(t)}),i},Comms.prototype.send=function(t,e,o,i){var n=this,l=this.getConnections(t);l.forEach(function(t){t.tableComms(n.table.element,e,o,i)}),!l.length&&t&&console.warn("Table Connection Error - No tables matching selector found",t)},Comms.prototype.receive=function(t,e,o,i){if(this.table.modExists(e))return this.table.modules[e].commsReceived(t,o,i);console.warn("Inter-table Comms Error - no such module:",e)},Tabulator.prototype.registerModule("comms",Comms);
\ No newline at end of file
+/* Tabulator v4.9.3 (c) Oliver Folkerd */
+"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),o=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;n<o;){var l=e[n];if(t.call(i,l,n,e))return n;n++}return-1}}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),o=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var i=arguments[1],n=0;n<o;){var l=e[n];if(t.call(i,l,n,e))return l;n++}}}),String.prototype.includes||(String.prototype.includes=function(t,e){if(t instanceof RegExp)throw TypeError("first argument must not be a RegExp");return void 0===e&&(e=0),-1!==this.indexOf(t,e)}),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(t,e){if(null==this)throw new TypeError('"this" is null or not defined');var o=Object(this),i=o.length>>>0;if(0===i)return!1;for(var n=0|e,l=Math.max(n>=0?n:i-Math.abs(n),0);l<i;){if(function(t,e){return t===e||"number"==typeof t&&"number"==typeof e&&isNaN(t)&&isNaN(e)}(o[l],t))return!0;l++}return!1}}),"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(t,e){if(null===t||void 0===t)throw new TypeError("Cannot convert undefined or null to object");for(var o=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(null!==n&&void 0!==n)for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(o[l]=n[l])}return o},writable:!0,configurable:!0});var ColumnManager=function(t){this.table=t,this.blockHozScrollEvent=!1,this.headersElement=this.createHeadersElement(),this.element=this.createHeaderElement(),this.rowManager=null,this.columns=[],this.columnsByIndex=[],this.columnsByField={},this.scrollLeft=0,this.element.insertBefore(this.headersElement,this.element.firstChild)};ColumnManager.prototype.createHeadersElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-headers"),t},ColumnManager.prototype.createHeaderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-header"),this.table.options.headerVisible||t.classList.add("tabulator-header-hidden"),t},ColumnManager.prototype.initialize=function(){},ColumnManager.prototype.setRowManager=function(t){this.rowManager=t},ColumnManager.prototype.getElement=function(){return this.element},ColumnManager.prototype.getHeadersElement=function(){return this.headersElement},ColumnManager.prototype.scrollHorizontal=function(t){var e=0,o=this.element.scrollWidth-this.table.element.clientWidth;this.element.scrollLeft=t,t>o?(e=t-o,this.element.style.marginLeft=-e+"px"):this.element.style.marginLeft=0,this.scrollLeft=t,this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.scrollHorizontal()},ColumnManager.prototype.generateColumnsFromRowData=function(t){var e,o,i=[],n=this.table.options.autoColumnsDefinitions;if(t&&t.length){e=t[0];for(var l in e){var s={field:l,title:l},a=e[l];switch(void 0===a?"undefined":_typeof(a)){case"undefined":o="string";break;case"boolean":o="boolean";break;case"object":o=Array.isArray(a)?"array":"string";break;default:o=isNaN(a)||""===a?a.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)?"alphanum":"string":"number"}s.sorter=o,i.push(s)}if(n)switch(void 0===n?"undefined":_typeof(n)){case"function":this.table.options.columns=n.call(this.table,i);break;case"object":Array.isArray(n)?i.forEach(function(t){var e=n.find(function(e){return e.field===t.field});e&&Object.assign(t,e)}):i.forEach(function(t){n[t.field]&&Object.assign(t,n[t.field])}),this.table.options.columns=i}else this.table.options.columns=i;this.setColumns(this.table.options.columns)}},ColumnManager.prototype.setColumns=function(t,e){for(var o=this;o.headersElement.firstChild;)o.headersElement.removeChild(o.headersElement.firstChild);o.columns=[],o.columnsByIndex=[],o.columnsByField={},o.table.modExists("frozenColumns")&&o.table.modules.frozenColumns.reset(),t.forEach(function(t,e){o._addColumn(t)}),o._reIndexColumns(),o.table.options.responsiveLayout&&o.table.modExists("responsiveLayout",!0)&&o.table.modules.responsiveLayout.initialize(),this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitialize(!1,!0),o.redraw(!0)},ColumnManager.prototype._addColumn=function(t,e,o){var i=new Column(t,this),n=i.getElement(),l=o?this.findColumnIndex(o):o;if(o&&l>-1){var s=this.columns.indexOf(o.getTopColumn()),a=o.getElement();e?(this.columns.splice(s,0,i),a.parentNode.insertBefore(n,a)):(this.columns.splice(s+1,0,i),a.parentNode.insertBefore(n,a.nextSibling))}else e?(this.columns.unshift(i),this.headersElement.insertBefore(i.getElement(),this.headersElement.firstChild)):(this.columns.push(i),this.headersElement.appendChild(i.getElement())),i.columnRendered();return i},ColumnManager.prototype.registerColumnField=function(t){t.definition.field&&(this.columnsByField[t.definition.field]=t)},ColumnManager.prototype.registerColumnPosition=function(t){this.columnsByIndex.push(t)},ColumnManager.prototype._reIndexColumns=function(){this.columnsByIndex=[],this.columns.forEach(function(t){t.reRegisterPosition()})},ColumnManager.prototype._verticalAlignHeaders=function(){var t=this,e=0;t.columns.forEach(function(t){var o;t.clearVerticalAlign(),(o=t.getHeight())>e&&(e=o)}),t.columns.forEach(function(o){o.verticalAlign(t.table.options.columnHeaderVertAlign,e)}),t.rowManager.adjustTableSize()},ColumnManager.prototype.findColumn=function(t){var e=this;if("object"!=(void 0===t?"undefined":_typeof(t)))return this.columnsByField[t]||!1;if(t instanceof Column)return t;if(t instanceof ColumnComponent)return t._getSelf()||!1;if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement){return e.columns.find(function(e){return e.element===t})||!1}return!1},ColumnManager.prototype.getColumnByField=function(t){return this.columnsByField[t]},ColumnManager.prototype.getColumnsByFieldRoot=function(t){var e=this,o=[];return Object.keys(this.columnsByField).forEach(function(i){i.split(".")[0]===t&&o.push(e.columnsByField[i])}),o},ColumnManager.prototype.getColumnByIndex=function(t){return this.columnsByIndex[t]},ColumnManager.prototype.getFirstVisibileColumn=function(t){var t=this.columnsByIndex.findIndex(function(t){return t.visible});return t>-1&&this.columnsByIndex[t]},ColumnManager.prototype.getColumns=function(){return this.columns},ColumnManager.prototype.findColumnIndex=function(t){return this.columnsByIndex.findIndex(function(e){return t===e})},ColumnManager.prototype.getRealColumns=function(){return this.columnsByIndex},ColumnManager.prototype.traverse=function(t){this.columnsByIndex.forEach(function(e,o){t(e,o)})},ColumnManager.prototype.getDefinitions=function(t){var e=this,o=[];return e.columnsByIndex.forEach(function(e){(!t||t&&e.visible)&&o.push(e.getDefinition())}),o},ColumnManager.prototype.getDefinitionTree=function(){var t=this,e=[];return t.columns.forEach(function(t){e.push(t.getDefinition(!0))}),e},ColumnManager.prototype.getComponents=function(t){var e=this,o=[];return(t?e.columns:e.columnsByIndex).forEach(function(t){o.push(t.getComponent())}),o},ColumnManager.prototype.getWidth=function(){var t=0;return this.columnsByIndex.forEach(function(e){e.visible&&(t+=e.getWidth())}),t},ColumnManager.prototype.moveColumn=function(t,e,o){this.moveColumnActual(t,e,o),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),e.element.parentNode.insertBefore(t.element,e.element),o&&e.element.parentNode.insertBefore(e.element,t.element),this._verticalAlignHeaders(),this.table.rowManager.reinitialize()},ColumnManager.prototype.moveColumnActual=function(t,e,o){t.parent.isGroup?this._moveColumnInArray(t.parent.columns,t,e,o):this._moveColumnInArray(this.columns,t,e,o),this._moveColumnInArray(this.columnsByIndex,t,e,o,!0),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitialize(!0),this.table.options.columnMoved&&this.table.options.columnMoved.call(this.table,t.getComponent(),this.table.columnManager.getComponents()),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns")},ColumnManager.prototype._moveColumnInArray=function(t,e,o,i,n){var l,s=this,a=t.indexOf(e),r=[];a>-1&&(t.splice(a,1),l=t.indexOf(o),l>-1?i&&(l+=1):l=a,t.splice(l,0,e),n&&(this.table.options.dataTree&&this.table.modExists("dataTree",!0)&&this.table.rowManager.rows.forEach(function(t){r=r.concat(s.table.modules.dataTree.getTreeChildren(t,!1,!0))}),r=r.concat(this.table.rowManager.rows),r.forEach(function(t){if(t.cells.length){var e=t.cells.splice(a,1)[0];t.cells.splice(l,0,e)}})))},ColumnManager.prototype.scrollToColumn=function(t,e,o){var i=this,n=0,l=0,s=0,a=t.getElement();return new Promise(function(r,u){if(void 0===e&&(e=i.table.options.scrollToColumnPosition),void 0===o&&(o=i.table.options.scrollToColumnIfVisible),t.visible){switch(e){case"middle":case"center":s=-i.element.clientWidth/2;break;case"right":s=a.clientWidth-i.headersElement.clientWidth}if(!o&&(l=a.offsetLeft)>0&&l+a.offsetWidth<i.element.clientWidth)return!1;n=a.offsetLeft+s,n=Math.max(Math.min(n,i.table.rowManager.element.scrollWidth-i.table.rowManager.element.clientWidth),0),i.table.rowManager.scrollHorizontal(n),i.scrollHorizontal(n),r()}else console.warn("Scroll Error - Column not visible"),u("Scroll Error - Column not visible")})},ColumnManager.prototype.generateCells=function(t){var e=this,o=[];return e.columnsByIndex.forEach(function(e){o.push(e.generateCell(t))}),o},ColumnManager.prototype.getFlexBaseWidth=function(){var t=this,e=t.table.element.clientWidth,o=0;return t.rowManager.element.scrollHeight>t.rowManager.element.clientHeight&&(e-=t.rowManager.element.offsetWidth-t.rowManager.element.clientWidth),this.columnsByIndex.forEach(function(i){var n,l,s;i.visible&&(n=i.definition.width||0,l=void 0===i.minWidth?t.table.options.columnMinWidth:parseInt(i.minWidth),s="string"==typeof n?n.indexOf("%")>-1?e/100*parseInt(n):parseInt(n):n,o+=s>l?s:l)}),o},ColumnManager.prototype.addColumn=function(t,e,o){var i=this;return new Promise(function(n,l){var s=i._addColumn(t,e,o);i._reIndexColumns(),i.table.options.responsiveLayout&&i.table.modExists("responsiveLayout",!0)&&i.table.modules.responsiveLayout.initialize(),i.table.modExists("columnCalcs")&&i.table.modules.columnCalcs.recalc(i.table.rowManager.activeRows),i.redraw(!0),"fitColumns"!=i.table.modules.layout.getMode()&&s.reinitializeWidth(),i._verticalAlignHeaders(),i.table.rowManager.reinitialize(),i.table.options.virtualDomHoz&&i.table.vdomHoz.reinitialize(),n(s)})},ColumnManager.prototype.deregisterColumn=function(t){var e,o=t.getField();o&&delete this.columnsByField[o],e=this.columnsByIndex.indexOf(t),e>-1&&this.columnsByIndex.splice(e,1),e=this.columns.indexOf(t),e>-1&&this.columns.splice(e,1),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.initialize(),this._verticalAlignHeaders(),this.redraw()},ColumnManager.prototype.redraw=function(t){t&&(Tabulator.prototype.helpers.elVisible(this.element)&&this._verticalAlignHeaders(),this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),["fitColumns","fitDataStretch"].indexOf(this.table.modules.layout.getMode())>-1?this.table.modules.layout.layout():t?this.table.modules.layout.layout():this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout(),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),t&&(this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns"),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.redraw()),this.table.footerManager.redraw()};var ColumnComponent=function(t){this._column=t,this.type="ColumnComponent"};ColumnComponent.prototype.getElement=function(){return this._column.getElement()},ColumnComponent.prototype.getDefinition=function(){return this._column.getDefinition()},ColumnComponent.prototype.getField=function(){return this._column.getField()},ColumnComponent.prototype.getCells=function(){var t=[];return this._column.cells.forEach(function(e){t.push(e.getComponent())}),t},ColumnComponent.prototype.getVisibility=function(){return console.warn("getVisibility function is deprecated, you should now use the isVisible function"),this._column.visible},ColumnComponent.prototype.isVisible=function(){return this._column.visible},ColumnComponent.prototype.show=function(){this._column.isGroup?this._column.columns.forEach(function(t){t.show()}):this._column.show()},ColumnComponent.prototype.hide=function(){this._column.isGroup?this._column.columns.forEach(function(t){t.hide()}):this._column.hide()},ColumnComponent.prototype.toggle=function(){this._column.visible?this.hide():this.show()},ColumnComponent.prototype.delete=function(){return this._column.delete()},ColumnComponent.prototype.getSubColumns=function(){var t=[];return this._column.columns.length&&this._column.columns.forEach(function(e){t.push(e.getComponent())}),t},ColumnComponent.prototype.getParentColumn=function(){return this._column.parent instanceof Column&&this._column.parent.getComponent()},ColumnComponent.prototype._getSelf=function(){return this._column},ColumnComponent.prototype.scrollTo=function(){return this._column.table.columnManager.scrollToColumn(this._column)},ColumnComponent.prototype.getTable=function(){return this._column.table},ColumnComponent.prototype.headerFilterFocus=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterFocus(this._column)},ColumnComponent.prototype.reloadHeaderFilter=function(){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.reloadHeaderFilter(this._column)},ColumnComponent.prototype.getHeaderFilterValue=function(){if(this._column.table.modExists("filter",!0))return this._column.table.modules.filter.getHeaderFilterValue(this._column)},ColumnComponent.prototype.setHeaderFilterValue=function(t){this._column.table.modExists("filter",!0)&&this._column.table.modules.filter.setHeaderFilterValue(this._column,t)},ColumnComponent.prototype.move=function(t,e){var o=this._column.table.columnManager.findColumn(t);o?this._column.table.columnManager.moveColumn(this._column,o,e):console.warn("Move Error - No matching column found:",o)},ColumnComponent.prototype.getNextColumn=function(){var t=this._column.nextColumn();return!!t&&t.getComponent()},ColumnComponent.prototype.getPrevColumn=function(){var t=this._column.prevColumn();return!!t&&t.getComponent()},ColumnComponent.prototype.updateDefinition=function(t){return this._column.updateDefinition(t)},ColumnComponent.prototype.getWidth=function(){return this._column.getWidth()},ColumnComponent.prototype.setWidth=function(t){var e;return e=!0===t?this._column.reinitializeWidth(!0):this._column.setWidth(t),this._column.table.options.virtualDomHoz&&this._column.table.vdomHoz.reinitialize(!0),e},ColumnComponent.prototype.validate=function(){return this._column.validate()};var Column=function t(e,o){var i=this;this.table=o.table,this.definition=e,this.parent=o,this.type="column",this.columns=[],this.cells=[],this.element=this.createElement(),this.contentElement=!1,this.titleHolderElement=!1,this.titleElement=!1,this.groupElement=this.createGroupElement(),this.isGroup=!1,this.tooltip=!1,this.hozAlign="",this.vertAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.titleFormatterRendered=!1,this.setField(this.definition.field),this.table.options.invalidOptionWarnings&&this.checkDefinition(),this.modules={},this.cellEvents={cellClick:!1,cellDblClick:!1,cellContext:!1,cellTap:!1,cellDblTap:!1,cellTapHold:!1,cellMouseEnter:!1,cellMouseLeave:!1,cellMouseOver:!1,cellMouseOut:!1,cellMouseMove:!1},this.width=null,this.widthStyled="",this.maxWidth=null,this.maxWidthStyled="",this.minWidth=null,this.minWidthStyled="",this.widthFixed=!1,this.visible=!0,this.component=null,this._mapDepricatedFunctionality(),e.columns?(this.isGroup=!0,e.columns.forEach(function(e,o){var n=new t(e,i);i.attachColumn(n)}),i.checkColumnVisibility()):o.registerColumnField(this),e.rowHandle&&!1!==this.table.options.movableRows&&this.table.modExists("moveRow")&&this.table.modules.moveRow.setHandle(!0),this._buildHeader(),this.bindModuleColumns()};Column.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col"),t.setAttribute("role","columnheader"),t.setAttribute("aria-sort","none"),t},Column.prototype.createGroupElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-col-group-cols"),t},Column.prototype.checkDefinition=function(){var t=this;Object.keys(this.definition).forEach(function(e){-1===t.defaultOptionList.indexOf(e)&&console.warn("Invalid column definition option in '"+(t.field||t.definition.title)+"' column:",e)})},Column.prototype.setField=function(t){this.field=t,this.fieldStructure=t?this.table.options.nestedFieldSeparator?t.split(this.table.options.nestedFieldSeparator):[t]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNestedData:this._setFlatData},Column.prototype.registerColumnPosition=function(t){this.parent.registerColumnPosition(t)},Column.prototype.registerColumnField=function(t){this.parent.registerColumnField(t)},Column.prototype.reRegisterPosition=function(){this.isGroup?this.columns.forEach(function(t){t.reRegisterPosition()}):this.registerColumnPosition(this)},Column.prototype._mapDepricatedFunctionality=function(){void 0!==this.definition.hideInHtml&&(this.definition.htmlOutput=!this.definition.hideInHtml,console.warn("hideInHtml column definition property is deprecated, you should now use htmlOutput")),void 0!==this.definition.align&&(this.definition.hozAlign=this.definition.align,console.warn("align column definition property is deprecated, you should now use hozAlign")),void 0!==this.definition.downloadTitle&&(this.definition.titleDownload=this.definition.downloadTitle,console.warn("downloadTitle definition property is deprecated, you should now use titleDownload"))},Column.prototype.setTooltip=function(){var t=this,e=t.definition,o=e.headerTooltip||!1===e.tooltip?e.headerTooltip:t.table.options.tooltipsHeader;o?!0===o?e.field?t.table.modules.localize.bind("columns|"+e.field,function(o){t.element.setAttribute("title",o||e.title)}):t.element.setAttribute("title",e.title):("function"==typeof o&&!1===(o=o(t.getComponent()))&&(o=""),t.element.setAttribute("title",o)):t.element.setAttribute("title","")},Column.prototype._buildHeader=function(){for(var t=this,e=t.definition;t.element.firstChild;)t.element.removeChild(t.element.firstChild);e.headerVertical&&(t.element.classList.add("tabulator-col-vertical"),"flip"===e.headerVertical&&t.element.classList.add("tabulator-col-vertical-flip")),t.contentElement=t._bindEvents(),t.contentElement=t._buildColumnHeaderContent(),t.element.appendChild(t.contentElement),t.isGroup?t._buildGroupHeader():t._buildColumnHeader(),t.setTooltip(),t.table.options.resizableColumns&&t.table.modExists("resizeColumns")&&t.table.modules.resizeColumns.initializeColumn("header",t,t.element),e.headerFilter&&t.table.modExists("filter")&&t.table.modExists("edit")&&(void 0!==e.headerFilterPlaceholder&&e.field&&t.table.modules.localize.setHeaderFilterColumnPlaceholder(e.field,e.headerFilterPlaceholder),t.table.modules.filter.initializeColumn(t)),t.table.modExists("frozenColumns")&&t.table.modules.frozenColumns.initializeColumn(t),t.table.options.movableColumns&&!t.isGroup&&t.table.modExists("moveColumn")&&t.table.modules.moveColumn.initializeColumn(t),(e.topCalc||e.bottomCalc)&&t.table.modExists("columnCalcs")&&t.table.modules.columnCalcs.initializeColumn(t),t.table.modExists("persistence")&&t.table.modules.persistence.config.columns&&t.table.modules.persistence.initializeColumn(t),t.element.addEventListener("mouseenter",function(e){t.setTooltip()})},Column.prototype._bindEvents=function(){var t,e,o,i=this,n=i.definition;"function"==typeof n.headerClick&&i.element.addEventListener("click",function(t){n.headerClick(t,i.getComponent())}),"function"==typeof n.headerDblClick&&i.element.addEventListener("dblclick",function(t){n.headerDblClick(t,i.getComponent())}),"function"==typeof n.headerContext&&i.element.addEventListener("contextmenu",function(t){n.headerContext(t,i.getComponent())}),"function"==typeof n.headerTap&&(o=!1,i.element.addEventListener("touchstart",function(t){o=!0},{passive:!0}),i.element.addEventListener("touchend",function(t){o&&n.headerTap(t,i.getComponent()),o=!1})),"function"==typeof n.headerDblTap&&(t=null,i.element.addEventListener("touchend",function(e){t?(clearTimeout(t),t=null,n.headerDblTap(e,i.getComponent())):t=setTimeout(function(){clearTimeout(t),t=null},300)})),"function"==typeof n.headerTapHold&&(e=null,i.element.addEventListener("touchstart",function(t){clearTimeout(e),e=setTimeout(function(){clearTimeout(e),e=null,o=!1,n.headerTapHold(t,i.getComponent())},1e3)},{passive:!0}),i.element.addEventListener("touchend",function(t){clearTimeout(e),e=null})),"function"==typeof n.cellClick&&(i.cellEvents.cellClick=n.cellClick),"function"==typeof n.cellDblClick&&(i.cellEvents.cellDblClick=n.cellDblClick),"function"==typeof n.cellContext&&(i.cellEvents.cellContext=n.cellContext),"function"==typeof n.cellMouseEnter&&(i.cellEvents.cellMouseEnter=n.cellMouseEnter),"function"==typeof n.cellMouseLeave&&(i.cellEvents.cellMouseLeave=n.cellMouseLeave),"function"==typeof n.cellMouseOver&&(i.cellEvents.cellMouseOver=n.cellMouseOver),"function"==typeof n.cellMouseOut&&(i.cellEvents.cellMouseOut=n.cellMouseOut),"function"==typeof n.cellMouseMove&&(i.cellEvents.cellMouseMove=n.cellMouseMove),"function"==typeof n.cellTap&&(i.cellEvents.cellTap=n.cellTap),"function"==typeof n.cellDblTap&&(i.cellEvents.cellDblTap=n.cellDblTap),"function"==typeof n.cellTapHold&&(i.cellEvents.cellTapHold=n.cellTapHold),"function"==typeof n.cellEdited&&(i.cellEvents.cellEdited=n.cellEdited),"function"==typeof n.cellEditing&&(i.cellEvents.cellEditing=n.cellEditing),"function"==typeof n.cellEditCancelled&&(i.cellEvents.cellEditCancelled=n.cellEditCancelled)},Column.prototype._buildColumnHeader=function(){var t=this,e=this.definition,o=this.table;if(o.modExists("sort")&&o.modules.sort.initializeColumn(this,this.titleHolderElement),(e.headerContextMenu||e.headerClickMenu||e.headerMenu)&&o.modExists("menu")&&o.modules.menu.initializeColumnHeader(this),o.modExists("format")&&o.modules.format.initializeColumn(this),void 0!==e.editor&&o.modExists("edit")&&o.modules.edit.initializeColumn(this),void 0!==e.validator&&o.modExists("validate")&&o.modules.validate.initializeColumn(this),o.modExists("mutator")&&o.modules.mutator.initializeColumn(this),o.modExists("accessor")&&o.modules.accessor.initializeColumn(this),_typeof(o.options.responsiveLayout)&&o.modExists("responsiveLayout")&&o.modules.responsiveLayout.initializeColumn(this),void 0!==e.visible&&(e.visible?this.show(!0):this.hide(!0)),e.cssClass){e.cssClass.split(" ").forEach(function(e){t.element.classList.add(e)})}e.field&&this.element.setAttribute("tabulator-field",e.field),this.setMinWidth(void 0===e.minWidth?this.table.options.columnMinWidth:parseInt(e.minWidth)),(e.maxWidth||this.table.options.columnMaxWidth)&&!1!==e.maxWidth&&this.setMaxWidth(void 0===e.maxWidth?this.table.options.columnMaxWidth:parseInt(e.maxWidth)),this.reinitializeWidth(),this.tooltip=this.definition.tooltip||!1===this.definition.tooltip?this.definition.tooltip:this.table.options.tooltips,this.hozAlign=void 0===this.definition.hozAlign?this.table.options.cellHozAlign:this.definition.hozAlign,this.vertAlign=void 0===this.definition.vertAlign?this.table.options.cellVertAlign:this.definition.vertAlign,this.titleElement.style.textAlign=this.definition.headerHozAlign||this.table.options.headerHozAlign},Column.prototype._buildColumnHeaderContent=function(){var t=(this.definition,this.table,document.createElement("div"));return t.classList.add("tabulator-col-content"),this.titleHolderElement=document.createElement("div"),this.titleHolderElement.classList.add("tabulator-col-title-holder"),t.appendChild(this.titleHolderElement),this.titleElement=this._buildColumnHeaderTitle(),this.titleHolderElement.appendChild(this.titleElement),t},Column.prototype._buildColumnHeaderTitle=function(){var t=this,e=t.definition,o=t.table,i=document.createElement("div");if(i.classList.add("tabulator-col-title"),e.editableTitle){var n=document.createElement("input");n.classList.add("tabulator-title-editor"),n.addEventListener("click",function(t){t.stopPropagation(),n.focus()}),n.addEventListener("change",function(){e.title=n.value,o.options.columnTitleChanged.call(t.table,t.getComponent())}),i.appendChild(n),e.field?o.modules.localize.bind("columns|"+e.field,function(t){n.value=t||e.title||" "}):n.value=e.title||" "}else e.field?o.modules.localize.bind("columns|"+e.field,function(o){t._formatColumnHeaderTitle(i,o||e.title||" ")}):t._formatColumnHeaderTitle(i,e.title||" ");return i},Column.prototype._formatColumnHeaderTitle=function(t,e){var o,i,n,l,s,a=this;if(this.definition.titleFormatter&&this.table.modExists("format"))switch(o=this.table.modules.format.getFormatter(this.definition.titleFormatter),s=function(t){a.titleFormatterRendered=t},l={getValue:function(){return e},getElement:function(){return t}},n=this.definition.titleFormatterParams||{},n="function"==typeof n?n():n,i=o.call(this.table.modules.format,l,n,s),void 0===i?"undefined":_typeof(i)){case"object":i instanceof Node?t.appendChild(i):(t.innerHTML="",console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",i));break;case"undefined":case"null":t.innerHTML="";break;default:t.innerHTML=i}else t.innerHTML=e},Column.prototype._buildGroupHeader=function(){var t=this;if(this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.definition.cssClass){this.definition.cssClass.split(" ").forEach(function(e){t.element.classList.add(e)})}(this.definition.headerContextMenu||this.definition.headerMenu)&&this.table.modExists("menu")&&this.table.modules.menu.initializeColumnHeader(this),this.titleElement.style.textAlign=this.definition.headerHozAlign||this.table.options.headerHozAlign,this.element.appendChild(this.groupElement)},Column.prototype._getFlatData=function(t){return t[this.field]},Column.prototype._getNestedData=function(t){for(var e,o=t,i=this.fieldStructure,n=i.length,l=0;l<n&&(o=o[i[l]],e=o,o);l++);return e},Column.prototype._setFlatData=function(t,e){this.field&&(t[this.field]=e)},Column.prototype._setNestedData=function(t,e){for(var o=t,i=this.fieldStructure,n=i.length,l=0;l<n;l++)if(l==n-1)o[i[l]]=e;else{if(!o[i[l]]){if(void 0===e)break;o[i[l]]={}}o=o[i[l]]}},Column.prototype.attachColumn=function(t){var e=this;e.groupElement?(e.columns.push(t),e.groupElement.appendChild(t.getElement())):console.warn("Column Warning - Column being attached to another column instead of column group")},Column.prototype.verticalAlign=function(t,e){var o=this.parent.isGroup?this.parent.getGroupElement().clientHeight:e||this.parent.getHeadersElement().clientHeight;this.element.style.height=o+"px",this.isGroup&&(this.groupElement.style.minHeight=o-this.contentElement.offsetHeight+"px"),this.isGroup||"top"===t||(this.element.style.paddingTop="bottom"===t?this.element.clientHeight-this.contentElement.offsetHeight+"px":(this.element.clientHeight-this.contentElement.offsetHeight)/2+"px"),this.columns.forEach(function(e){e.verticalAlign(t)})},Column.prototype.clearVerticalAlign=function(){this.element.style.paddingTop="",this.element.style.height="",this.element.style.minHeight="",this.groupElement.style.minHeight="",this.columns.forEach(function(t){t.clearVerticalAlign()})},Column.prototype.bindModuleColumns=function(){"rownum"==this.definition.formatter&&(this.table.rowManager.rowNumColumn=this)},Column.prototype.getElement=function(){return this.element},Column.prototype.getGroupElement=function(){return this.groupElement},Column.prototype.getField=function(){return this.field},Column.prototype.getFirstColumn=function(){return this.isGroup?!!this.columns.length&&this.columns[0].getFirstColumn():this},Column.prototype.getLastColumn=function(){return this.isGroup?!!this.columns.length&&this.columns[this.columns.length-1].getLastColumn():this},Column.prototype.getColumns=function(){return this.columns},Column.prototype.getCells=function(){return this.cells},Column.prototype.getTopColumn=function(){return this.parent.isGroup?this.parent.getTopColumn():this},Column.prototype.getDefinition=function(t){var e=[];return this.isGroup&&t&&(this.columns.forEach(function(t){e.push(t.getDefinition(!0))}),this.definition.columns=e),this.definition},Column.prototype.checkColumnVisibility=function(){var t=!1;this.columns.forEach(function(e){e.visible&&(t=!0)}),t?(this.show(),this.parent.table.options.columnVisibilityChanged.call(this.table,this.getComponent(),!1)):this.hide()},Column.prototype.show=function(t,e){this.visible||(this.visible=!0,this.element.style.display="",this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach(function(t){t.show()}),this.isGroup||null!==this.width||this.reinitializeWidth(),this.table.columnManager._verticalAlignHeaders(),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns"),!e&&this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.updateColumnVisibility(this,this.visible),t||this.table.options.columnVisibilityChanged.call(this.table,this.getComponent(),!0),this.parent.isGroup&&this.parent.matchChildWidths(),!this.silent&&this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitialize())},Column.prototype.hide=function(t,e){this.visible&&(this.visible=!1,this.element.style.display="none",this.table.columnManager._verticalAlignHeaders(),this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach(function(t){t.hide()}),this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns"),!e&&this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.updateColumnVisibility(this,this.visible),t||this.table.options.columnVisibilityChanged.call(this.table,this.getComponent(),!1),this.parent.isGroup&&this.parent.matchChildWidths(),!this.silent&&this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitialize())},Column.prototype.matchChildWidths=function(){var t=0;this.contentElement&&this.columns.length&&(this.columns.forEach(function(e){e.visible&&(t+=e.getWidth())
+}),this.contentElement.style.maxWidth=t-1+"px",this.parent.isGroup&&this.parent.matchChildWidths())},Column.prototype.removeChild=function(t){var e=this.columns.indexOf(t);e>-1&&this.columns.splice(e,1),this.columns.length||this.delete()},Column.prototype.setWidth=function(t){this.widthFixed=!0,this.setWidthActual(t)},Column.prototype.setWidthActual=function(t){isNaN(t)&&(t=Math.floor(this.table.element.clientWidth/100*parseInt(t))),t=Math.max(this.minWidth,t),this.maxWidth&&(t=Math.min(this.maxWidth,t)),this.width=t,this.widthStyled=t?t+"px":"",this.element.style.width=this.widthStyled,this.isGroup||this.cells.forEach(function(t){t.setWidth()}),this.parent.isGroup&&this.parent.matchChildWidths(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()},Column.prototype.checkCellHeights=function(){var t=[];this.cells.forEach(function(e){e.row.heightInitialized&&(null!==e.row.getElement().offsetParent?(t.push(e.row),e.row.clearCellHeight()):e.row.heightInitialized=!1)}),t.forEach(function(t){t.calcHeight()}),t.forEach(function(t){t.setCellHeight()})},Column.prototype.getWidth=function(){var t=0;return this.isGroup?this.columns.forEach(function(e){e.visible&&(t+=e.getWidth())}):t=this.width,t},Column.prototype.getHeight=function(){return this.element.offsetHeight},Column.prototype.setMinWidth=function(t){this.minWidth=t,this.minWidthStyled=t?t+"px":"",this.element.style.minWidth=this.minWidthStyled,this.cells.forEach(function(t){t.setMinWidth()})},Column.prototype.setMaxWidth=function(t){this.maxWidth=t,this.maxWidthStyled=t?t+"px":"",this.element.style.maxWidth=this.maxWidthStyled,this.cells.forEach(function(t){t.setMaxWidth()})},Column.prototype.delete=function(){var t=this;return new Promise(function(e,o){t.isGroup&&t.columns.forEach(function(t){t.delete()}),t.table.modExists("edit")&&t.table.modules.edit.currentCell.column===t&&t.table.modules.edit.cancelEdit();for(var i=t.cells.length,n=0;n<i;n++)t.cells[0].delete();t.element.parentNode&&t.element.parentNode.removeChild(t.element),t.element=!1,t.contentElement=!1,t.titleElement=!1,t.groupElement=!1,t.parent.isGroup&&t.parent.removeChild(t),t.table.columnManager.deregisterColumn(t),t.table.options.virtualDomHoz&&t.table.vdomHoz.reinitialize(!0),e()})},Column.prototype.columnRendered=function(){this.titleFormatterRendered&&this.titleFormatterRendered()},Column.prototype.validate=function(){var t=[];return this.cells.forEach(function(e){e.validate()||t.push(e.getComponent())}),!t.length||t},Column.prototype.generateCell=function(t){var e=this,o=new Cell(e,t);return this.cells.push(o),o},Column.prototype.nextColumn=function(){var t=this.table.columnManager.findColumnIndex(this);return t>-1&&this._nextVisibleColumn(t+1)},Column.prototype._nextVisibleColumn=function(t){var e=this.table.columnManager.getColumnByIndex(t);return!e||e.visible?e:this._nextVisibleColumn(t+1)},Column.prototype.prevColumn=function(){var t=this.table.columnManager.findColumnIndex(this);return t>-1&&this._prevVisibleColumn(t-1)},Column.prototype._prevVisibleColumn=function(t){var e=this.table.columnManager.getColumnByIndex(t);return!e||e.visible?e:this._prevVisibleColumn(t-1)},Column.prototype.reinitializeWidth=function(t){this.widthFixed=!1,void 0===this.definition.width||t||this.setWidth(this.definition.width),this.table.modExists("filter")&&this.table.modules.filter.hideHeaderFilterElements(),this.fitToData(),this.table.modExists("filter")&&this.table.modules.filter.showHeaderFilterElements()},Column.prototype.fitToData=function(){var t=this;this.widthFixed||(this.element.style.width="",t.cells.forEach(function(t){t.clearWidth()}));var e=this.element.offsetWidth;t.width&&this.widthFixed||(t.cells.forEach(function(t){var o=t.getWidth();o>e&&(e=o)}),e&&t.setWidthActual(e+1))},Column.prototype.updateDefinition=function(t){var e=this;return new Promise(function(o,i){var n;e.isGroup?(console.warn("Column Update Error - The updateDefinition function is only available on ungrouped columns"),i("Column Update Error - The updateDefinition function is only available on columns, not column groups")):e.parent.isGroup?(console.warn("Column Update Error - The updateDefinition function is only available on ungrouped columns"),i("Column Update Error - The updateDefinition function is only available on columns, not column groups")):(n=Object.assign({},e.getDefinition()),n=Object.assign(n,t),e.table.columnManager.addColumn(n,!1,e).then(function(t){n.field==e.field&&(e.field=!1),e.delete().then(function(){o(t.getComponent())}).catch(function(t){i(t)})}).catch(function(t){i(t)}))})},Column.prototype.deleteCell=function(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)},Column.prototype.defaultOptionList=["title","field","columns","visible","align","hozAlign","vertAlign","width","minWidth","maxWidth","widthGrow","widthShrink","resizable","frozen","responsive","tooltip","cssClass","rowHandle","hideInHtml","print","htmlOutput","sorter","sorterParams","formatter","formatterParams","variableHeight","editable","editor","editorParams","validator","mutator","mutatorParams","mutatorData","mutatorDataParams","mutatorEdit","mutatorEditParams","mutatorClipboard","mutatorClipboardParams","accessor","accessorParams","accessorData","accessorDataParams","accessorDownload","accessorDownloadParams","accessorClipboard","accessorClipboardParams","accessorPrint","accessorPrintParams","accessorHtmlOutput","accessorHtmlOutputParams","clipboard","download","downloadTitle","topCalc","topCalcParams","topCalcFormatter","topCalcFormatterParams","bottomCalc","bottomCalcParams","bottomCalcFormatter","bottomCalcFormatterParams","cellClick","cellDblClick","cellContext","cellTap","cellDblTap","cellTapHold","cellMouseEnter","cellMouseLeave","cellMouseOver","cellMouseOut","cellMouseMove","cellEditing","cellEdited","cellEditCancelled","headerSort","headerSortStartingDir","headerSortTristate","headerClick","headerDblClick","headerContext","headerTap","headerDblTap","headerTapHold","headerTooltip","headerVertical","headerHozAlign","editableTitle","titleFormatter","titleFormatterParams","headerFilter","headerFilterPlaceholder","headerFilterParams","headerFilterEmptyCheck","headerFilterFunc","headerFilterFuncParams","headerFilterLiveFilter","print","headerContextMenu","headerMenu","contextMenu","clickMenu","formatterPrint","formatterPrintParams","formatterClipboard","formatterClipboardParams","formatterHtmlOutput","formatterHtmlOutputParams","titlePrint","titleClipboard","titleHtmlOutput","titleDownload"],Column.prototype.getComponent=function(){return this.component||(this.component=new ColumnComponent(this)),this.component};var RowManager=function(t){this.table=t,this.element=this.createHolderElement(),this.tableElement=this.createTableElement(),this.heightFixer=this.createTableElement(),this.columnManager=null,this.height=0,this.firstRender=!1,this.renderMode="virtual",this.fixedHeight=!1,this.rows=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.scrollTop=0,this.scrollLeft=0,this.vDomRowHeight=20,this.vDomTop=0,this.vDomBottom=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomMaxRenderChain=90,this.vDomWindowBuffer=0,this.vDomWindowMinTotalRows=20,this.vDomWindowMinMarginRows=5,this.vDomTopNewRows=[],this.vDomBottomNewRows=[],this.rowNumColumn=!1,this.redrawBlock=!1,this.redrawBlockRestoreConfig=!1,this.redrawBlockRederInPosition=!1};RowManager.prototype.createHolderElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-tableHolder"),t.setAttribute("tabindex",0),t},RowManager.prototype.createTableElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-table"),t},RowManager.prototype.getElement=function(){return this.element},RowManager.prototype.getTableElement=function(){return this.tableElement},RowManager.prototype.getRowPosition=function(t,e){return e?this.activeRows.indexOf(t):this.rows.indexOf(t)},RowManager.prototype.setColumnManager=function(t){this.columnManager=t},RowManager.prototype.initialize=function(){var t=this;t.setRenderMode(),t.element.appendChild(t.tableElement),t.firstRender=!0,t.element.addEventListener("scroll",function(){var e=t.element.scrollLeft;t.scrollLeft!=e&&(t.columnManager.scrollHorizontal(e),t.table.options.groupBy&&t.table.modules.groupRows.scrollHeaders(e),t.table.modExists("columnCalcs")&&t.table.modules.columnCalcs.scrollHorizontal(e),t.table.options.scrollHorizontal(e)),t.scrollLeft=e}),"virtual"===this.renderMode&&t.element.addEventListener("scroll",function(){var e=t.element.scrollTop,o=t.scrollTop>e;t.scrollTop!=e?(t.scrollTop=e,t.scrollVertical(o),"scroll"==t.table.options.ajaxProgressiveLoad&&t.table.modules.ajax.nextPage(t.element.scrollHeight-t.element.clientHeight-e),t.table.options.scrollVertical(e)):t.scrollTop=e})},RowManager.prototype.findRow=function(t){var e=this;if("object"!=(void 0===t?"undefined":_typeof(t))){if(void 0===t||null===t)return!1;return e.rows.find(function(o){return o.data[e.table.options.index]==t})||!1}if(t instanceof Row)return t;if(t instanceof RowComponent)return t._getSelf()||!1;if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement){return e.rows.find(function(e){return e.getElement()===t})||!1}return!1},RowManager.prototype.getRowFromDataObject=function(t){return this.rows.find(function(e){return e.data===t})||!1},RowManager.prototype.getRowFromPosition=function(t,e){return e?this.activeRows[t]:this.rows[t]},RowManager.prototype.scrollToRow=function(t,e,o){var i,n=this,l=this.getDisplayRows().indexOf(t),s=t.getElement(),a=0;return new Promise(function(t,r){if(l>-1){if(void 0===e&&(e=n.table.options.scrollToRowPosition),void 0===o&&(o=n.table.options.scrollToRowIfVisible),"nearest"===e)switch(n.renderMode){case"classic":i=Tabulator.prototype.helpers.elOffset(s).top,e=Math.abs(n.element.scrollTop-i)>Math.abs(n.element.scrollTop+n.element.clientHeight-i)?"bottom":"top";break;case"virtual":e=Math.abs(n.vDomTop-l)>Math.abs(n.vDomBottom-l)?"bottom":"top"}if(!o&&Tabulator.prototype.helpers.elVisible(s)&&(a=Tabulator.prototype.helpers.elOffset(s).top-Tabulator.prototype.helpers.elOffset(n.element).top)>0&&a<n.element.clientHeight-s.offsetHeight)return!1;switch(n.renderMode){case"classic":n.element.scrollTop=Tabulator.prototype.helpers.elOffset(s).top-Tabulator.prototype.helpers.elOffset(n.element).top+n.element.scrollTop;break;case"virtual":n._virtualRenderFill(l,!0)}switch(e){case"middle":case"center":n.element.scrollHeight-n.element.scrollTop==n.element.clientHeight?n.element.scrollTop=n.element.scrollTop+(s.offsetTop-n.element.scrollTop)-(n.element.scrollHeight-s.offsetTop)/2:n.element.scrollTop=n.element.scrollTop-n.element.clientHeight/2;break;case"bottom":n.element.scrollHeight-n.element.scrollTop==n.element.clientHeight?n.element.scrollTop=n.element.scrollTop-(n.element.scrollHeight-s.offsetTop)+s.offsetHeight:n.element.scrollTop=n.element.scrollTop-n.element.clientHeight+s.offsetHeight}t()}else console.warn("Scroll Error - Row not visible"),r("Scroll Error - Row not visible")})},RowManager.prototype.setData=function(t,e,o){var i=this,n=this;return new Promise(function(l,s){e&&i.getDisplayRows().length?n.table.options.pagination?n._setDataActual(t,!0):i.reRenderInPosition(function(){n._setDataActual(t)}):(i.table.options.autoColumns&&o&&i.table.columnManager.generateColumnsFromRowData(t),i.resetScroll(),i._setDataActual(t)),l()})},RowManager.prototype._setDataActual=function(t,e){var o=this;o.table.options.dataLoading.call(this.table,t),this._wipeElements(),this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.clear(),Array.isArray(t)?(this.table.modExists("selectRow")&&this.table.modules.selectRow.clearSelectionData(),this.table.options.reactiveData&&this.table.modExists("reactiveData",!0)&&this.table.modules.reactiveData.watchData(t),t.forEach(function(t,e){if(t&&"object"===(void 0===t?"undefined":_typeof(t))){var i=new Row(t,o);o.rows.push(i)}else console.warn("Data Loading Warning - Invalid row data detected and ignored, expecting object but received:",t)}),o.refreshActiveData(!1,!1,e),o.table.options.dataLoaded.call(this.table,t)):console.error("Data Loading Error - Unable to process data due to invalid data type \nExpecting: array \nReceived: ",void 0===t?"undefined":_typeof(t),"\nData: ",t)},RowManager.prototype._wipeElements=function(){this.rows.forEach(function(t){t.wipe()}),this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.wipe(),this.rows=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.adjustTableSize()},RowManager.prototype.deleteRow=function(t,e){var o=this.rows.indexOf(t),i=this.activeRows.indexOf(t);i>-1&&this.activeRows.splice(i,1),o>-1&&this.rows.splice(o,1),this.setActiveRows(this.activeRows),this.displayRowIterator(function(e){var o=e.indexOf(t);o>-1&&e.splice(o,1)}),e||this.reRenderInPosition(),this.regenerateRowNumbers(),this.table.options.rowDeleted.call(this.table,t.getComponent()),this.table.options.dataChanged&&this.table.options.dataChanged.call(this.table,this.getData()),this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.groupRows.updateGroupRows(!0):this.table.options.pagination&&this.table.modExists("page")?this.refreshActiveData(!1,!1,!0):this.table.options.pagination&&this.table.modExists("page")&&this.refreshActiveData("page")},RowManager.prototype.addRow=function(t,e,o,i){var n=this.addRowActual(t,e,o,i);return this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowAdd",n,{data:t,pos:e,index:o}),n},RowManager.prototype.addRows=function(t,e,o){var i=this,n=this,l=0,s=[];return new Promise(function(a,r){e=i.findAddRowPos(e),Array.isArray(t)||(t=[t]),l=t.length-1,(void 0===o&&e||void 0!==o&&!e)&&t.reverse(),t.forEach(function(t,i){var l=n.addRow(t,e,o,!0);s.push(l)}),i.table.options.groupBy&&i.table.modExists("groupRows")?i.table.modules.groupRows.updateGroupRows(!0):i.table.options.pagination&&i.table.modExists("page")?i.refreshActiveData(!1,!1,!0):i.reRenderInPosition(),i.table.modExists("columnCalcs")&&i.table.modules.columnCalcs.recalc(i.table.rowManager.activeRows),i.regenerateRowNumbers(),a(s)})},RowManager.prototype.findAddRowPos=function(t){return void 0===t&&(t=this.table.options.addRowPos),"pos"===t&&(t=!0),"bottom"===t&&(t=!1),t},RowManager.prototype.addRowActual=function(t,e,o,i){var n,l,s=t instanceof Row?t:new Row(t||{},this),a=this.findAddRowPos(e),r=-1;if(!o&&this.table.options.pagination&&"page"==this.table.options.paginationAddRow&&(l=this.getDisplayRows(),a?l.length?o=l[0]:this.activeRows.length&&(o=this.activeRows[this.activeRows.length-1],a=!1):l.length&&(o=l[l.length-1],a=!(l.length<this.table.modules.page.getPageSize()))),void 0!==o&&(o=this.findRow(o)),this.table.options.groupBy&&this.table.modExists("groupRows")){this.table.modules.groupRows.assignRowToGroup(s);var u=s.getGroup().rows;u.length>1&&(!o||o&&-1==u.indexOf(o)?a?u[0]!==s&&(o=u[0],this._moveRowInArray(s.getGroup().rows,s,o,!a)):u[u.length-1]!==s&&(o=u[u.length-1],this._moveRowInArray(s.getGroup().rows,s,o,!a)):this._moveRowInArray(s.getGroup().rows,s,o,!a))}return o&&(r=this.rows.indexOf(o)),o&&r>-1?(n=this.activeRows.indexOf(o),this.displayRowIterator(function(t){var e=t.indexOf(o);e>-1&&t.splice(a?e:e+1,0,s)}),n>-1&&this.activeRows.splice(a?n:n+1,0,s),this.rows.splice(a?r:r+1,0,s)):a?(this.displayRowIterator(function(t){t.unshift(s)}),this.activeRows.unshift(s),this.rows.unshift(s)):(this.displayRowIterator(function(t){t.push(s)}),this.activeRows.push(s),this.rows.push(s)),this.setActiveRows(this.activeRows),this.table.options.rowAdded.call(this.table,s.getComponent()),this.table.options.dataChanged&&this.table.options.dataChanged.call(this.table,this.getData()),i||this.reRenderInPosition(),s},RowManager.prototype.moveRow=function(t,e,o){this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("rowMove",t,{posFrom:this.getRowPosition(t),posTo:this.getRowPosition(e),to:e,after:o}),this.moveRowActual(t,e,o),this.regenerateRowNumbers(),this.table.options.rowMoved.call(this.table,t.getComponent())},RowManager.prototype.moveRowActual=function(t,e,o){var i=this;if(this._moveRowInArray(this.rows,t,e,o),this._moveRowInArray(this.activeRows,t,e,o),this.displayRowIterator(function(n){i._moveRowInArray(n,t,e,o)}),this.table.options.groupBy&&this.table.modExists("groupRows")){!o&&e instanceof Group&&(e=this.table.rowManager.prevDisplayRow(t)||e);var n=e.getGroup(),l=t.getGroup();n===l?this._moveRowInArray(n.rows,t,e,o):(l&&l.removeRow(t),n.insertRow(t,e,o))}},RowManager.prototype._moveRowInArray=function(t,e,o,i){var n,l,s,a;if(e!==o&&(n=t.indexOf(e),n>-1&&(t.splice(n,1),l=t.indexOf(o),l>-1?i?t.splice(l+1,0,e):t.splice(l,0,e):t.splice(n,0,e)),t===this.getDisplayRows())){s=n<l?n:l,a=l>n?l:n+1;for(var r=s;r<=a;r++)t[r]&&this.styleRow(t[r],r)}},RowManager.prototype.clearData=function(){this.setData([])},RowManager.prototype.getRowIndex=function(t){return this.findRowIndex(t,this.rows)},RowManager.prototype.getDisplayRowIndex=function(t){var e=this.getDisplayRows().indexOf(t);return e>-1&&e},RowManager.prototype.nextDisplayRow=function(t,e){var o=this.getDisplayRowIndex(t),i=!1;return!1!==o&&o<this.displayRowsCount-1&&(i=this.getDisplayRows()[o+1]),!i||i instanceof Row&&"row"==i.type?i:this.nextDisplayRow(i,e)},RowManager.prototype.prevDisplayRow=function(t,e){var o=this.getDisplayRowIndex(t),i=!1;return o&&(i=this.getDisplayRows()[o-1]),!e||!i||i instanceof Row&&"row"==i.type?i:this.prevDisplayRow(i,e)},RowManager.prototype.findRowIndex=function(t,e){var o;return!!((t=this.findRow(t))&&(o=e.indexOf(t))>-1)&&o},RowManager.prototype.getData=function(t,e){var o=[];return this.getRows(t).forEach(function(t){"row"==t.type&&o.push(t.getData(e||"data"))}),o},RowManager.prototype.getComponents=function(t){var e=[];return this.getRows(t).forEach(function(t){e.push(t.getComponent())}),e},RowManager.prototype.getDataCount=function(t){return this.getRows(t).length},RowManager.prototype._genRemoteRequest=function(){var t=this,e=this.table,o=e.options,i={};if(e.modExists("page")){if(o.ajaxSorting){var n=this.table.modules.sort.getSort();n.forEach(function(t){delete t.column}),i[this.table.modules.page.paginationDataSentNames.sorters]=n}if(o.ajaxFiltering){var l=this.table.modules.filter.getFilters(!0,!0);i[this.table.modules.page.paginationDataSentNames.filters]=l}this.table.modules.ajax.setParams(i,!0)}e.modules.ajax.sendRequest().then(function(e){t._setDataActual(e,!0)}).catch(function(t){})},RowManager.prototype.filterRefresh=function(){var t=this.table,e=t.options,o=this.scrollLeft;e.ajaxFiltering?"remote"==e.pagination&&t.modExists("page")?(t.modules.page.reset(!0),t.modules.page.setPage(1).then(function(){}).catch(function(){})):e.ajaxProgressiveLoad?t.modules.ajax.loadData().then(function(){}).catch(function(){}):this._genRemoteRequest():this.refreshActiveData("filter"),this.scrollHorizontal(o)},RowManager.prototype.sorterRefresh=function(t){var e=this.table,o=this.table.options,i=this.scrollLeft;o.ajaxSorting?("remote"==o.pagination||o.progressiveLoad)&&e.modExists("page")?(e.modules.page.reset(!0),e.modules.page.setPage(1).then(function(){}).catch(function(){})):o.ajaxProgressiveLoad?e.modules.ajax.loadData().then(function(){}).catch(function(){}):this._genRemoteRequest():this.refreshActiveData(t?"filter":"sort"),this.scrollHorizontal(i)},RowManager.prototype.scrollHorizontal=function(t){this.scrollLeft=t,this.element.scrollLeft=t,this.table.options.groupBy&&this.table.modules.groupRows.scrollHeaders(t),this.table.modExists("columnCalcs")&&this.table.modules.columnCalcs.scrollHorizontal(t)},RowManager.prototype.refreshActiveData=function(t,e,o){var i,n=this,l=this.table,s=["all","filter","sort","display","freeze","group","tree","page"];if(this.redrawBlock)return void((!this.redrawBlockRestoreConfig||s.indexOf(t)<s.indexOf(this.redrawBlockRestoreConfig.stage))&&(this.redrawBlockRestoreConfig={stage:t,skipStage:e,renderInPosition:o}));switch(n.table.modExists("edit")&&n.table.modules.edit.cancelEdit(),t||(t="all"),l.options.selectable&&!l.options.selectablePersistence&&l.modExists("selectRow")&&l.modules.selectRow.deselectRows(),t){case"all":case"filter":e?e=!1:l.modExists("filter")?n.setActiveRows(l.modules.filter.filter(n.rows)):n.setActiveRows(n.rows.slice(0));case"sort":e?e=!1:l.modExists("sort")&&l.modules.sort.sort(this.activeRows),this.regenerateRowNumbers();case"display":this.resetDisplayRows();case"freeze":e?e=!1:this.table.modExists("frozenRows")&&l.modules.frozenRows.isFrozen()&&(l.modules.frozenRows.getDisplayIndex()||l.modules.frozenRows.setDisplayIndex(this.getNextDisplayIndex()),i=l.modules.frozenRows.getDisplayIndex(),!0!==(i=n.setDisplayRows(l.modules.frozenRows.getRows(this.getDisplayRows(i-1)),i))&&l.modules.frozenRows.setDisplayIndex(i));case"group":e?e=!1:l.options.groupBy&&l.modExists("groupRows")&&(l.modules.groupRows.getDisplayIndex()||l.modules.groupRows.setDisplayIndex(this.getNextDisplayIndex()),i=l.modules.groupRows.getDisplayIndex(),!0!==(i=n.setDisplayRows(l.modules.groupRows.getRows(this.getDisplayRows(i-1)),i))&&l.modules.groupRows.setDisplayIndex(i));case"tree":e?e=!1:l.options.dataTree&&l.modExists("dataTree")&&(l.modules.dataTree.getDisplayIndex()||l.modules.dataTree.setDisplayIndex(this.getNextDisplayIndex()),i=l.modules.dataTree.getDisplayIndex(),!0!==(i=n.setDisplayRows(l.modules.dataTree.getRows(this.getDisplayRows(i-1)),i))&&l.modules.dataTree.setDisplayIndex(i)),l.options.pagination&&l.modExists("page")&&!o&&"local"==l.modules.page.getMode()&&l.modules.page.reset();case"page":e?e=!1:l.options.pagination&&l.modExists("page")&&(l.modules.page.getDisplayIndex()||l.modules.page.setDisplayIndex(this.getNextDisplayIndex()),i=l.modules.page.getDisplayIndex(),"local"==l.modules.page.getMode()&&l.modules.page.setMaxRows(this.getDisplayRows(i-1).length),!0!==(i=n.setDisplayRows(l.modules.page.getRows(this.getDisplayRows(i-1)),i))&&l.modules.page.setDisplayIndex(i))}Tabulator.prototype.helpers.elVisible(n.element)&&(o?n.reRenderInPosition():("all"===t&&this.table.options.virtualDomHoz&&this.table.vdomHoz.dataChange(),n.renderTable(),l.options.layoutColumnsOnNewData&&n.table.columnManager.redraw(!0))),l.modExists("columnCalcs")&&l.modules.columnCalcs.recalc(this.activeRows)},RowManager.prototype.regenerateRowNumbers=function(){var t=this;this.rowNumColumn&&this.activeRows.forEach(function(e){var o=e.getCell(t.rowNumColumn);o&&o._generateContents()})},RowManager.prototype.setActiveRows=function(t){this.activeRows=t,this.activeRowsCount=this.activeRows.length},RowManager.prototype.resetDisplayRows=function(){this.displayRows=[],this.displayRows.push(this.activeRows.slice(0)),this.displayRowsCount=this.displayRows[0].length,this.table.modExists("frozenRows")&&this.table.modules.frozenRows.setDisplayIndex(0),this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.setDisplayIndex(0),this.table.options.pagination&&this.table.modExists("page")&&this.table.modules.page.setDisplayIndex(0)},RowManager.prototype.getNextDisplayIndex=function(){return this.displayRows.length},RowManager.prototype.setDisplayRows=function(t,e){var o=!0;return e&&void 0!==this.displayRows[e]?(this.displayRows[e]=t,o=!0):(this.displayRows.push(t),o=e=this.displayRows.length-1),e==this.displayRows.length-1&&(this.displayRowsCount=this.displayRows[this.displayRows.length-1].length),o},RowManager.prototype.getDisplayRows=function(t){return void 0===t?this.displayRows.length?this.displayRows[this.displayRows.length-1]:[]:this.displayRows[t]||[]},RowManager.prototype.getVisibleRows=function(t){var e=this.element.scrollTop,o=this.element.clientHeight+e,i=!1,n=0,l=0,s=this.getDisplayRows();if(t){this.getDisplayRows();for(var a=this.vDomTop;a<=this.vDomBottom;a++)if(s[a])if(i){if(!(o-s[a].getElement().offsetTop>=0))break;l=a}else if(e-s[a].getElement().offsetTop>=0)n=a;else{if(i=!0,!(o-s[a].getElement().offsetTop>=0))break;l=a}}else n=this.vDomTop,l=this.vDomBottom;return s.slice(n,l+1)},RowManager.prototype.displayRowIterator=function(t){this.displayRows.forEach(t),this.displayRowsCount=this.displayRows[this.displayRows.length-1].length},RowManager.prototype.getRows=function(t){var e;switch(t){case"active":e=this.activeRows;break;case"display":e=this.table.rowManager.getDisplayRows();break;case"visible":e=this.getVisibleRows(!0);break;case"selected":e=this.table.modules.selectRow.selectedRows;break;default:e=this.rows}return e},RowManager.prototype.reRenderInPosition=function(t){if("virtual"==this.getRenderMode())if(this.redrawBlock)t?t():this.redrawBlockRederInPosition=!0;else{for(var e=this.element.scrollTop,o=!1,i=!1,n=this.scrollLeft,l=this.getDisplayRows(),s=this.vDomTop;s<=this.vDomBottom;s++)if(l[s]){var a=e-l[s].getElement().offsetTop;if(!(!1===i||Math.abs(a)<i))break;i=a,o=s}t&&t(),this._virtualRenderFill(!1===o?this.displayRowsCount-1:o,!0,i||0),this.scrollHorizontal(n)}else this.renderTable(),t&&t()},RowManager.prototype.setRenderMode=function(){this.table.options.virtualDom?(this.renderMode="virtual",this.table.element.clientHeight||this.table.options.height?this.fixedHeight=!0:this.fixedHeight=!1):this.renderMode="classic"},RowManager.prototype.getRenderMode=function(){return this.renderMode},RowManager.prototype.renderTable=function(){switch(this.table.options.renderStarted.call(this.table),this.element.scrollTop=0,this.renderMode){case"classic":this._simpleRender();break;case"virtual":this._virtualRenderFill()}this.firstRender&&(this.displayRowsCount?(this.firstRender=!1,this.table.modules.layout.layout()):this.renderEmptyScroll()),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout(),this.displayRowsCount||this.table.options.placeholder&&(this.table.options.placeholder.setAttribute("tabulator-render-mode",this.renderMode),this.getElement().appendChild(this.table.options.placeholder),this.table.options.placeholder.style.width=this.table.columnManager.getWidth()+"px"),this.table.options.renderComplete.call(this.table)},RowManager.prototype._simpleRender=function(){this._clearVirtualDom(),this.displayRowsCount?this.checkClassicModeGroupHeaderWidth():this.renderEmptyScroll()},RowManager.prototype.checkClassicModeGroupHeaderWidth=function(){var t=this,e=this.tableElement,o=!0;t.getDisplayRows().forEach(function(i,n){t.styleRow(i,n),e.appendChild(i.getElement()),i.initialize(!0),"group"!==i.type&&(o=!1)}),e.style.minWidth=o?t.table.columnManager.getWidth()+"px":""},RowManager.prototype.renderEmptyScroll=function(){this.table.options.placeholder?this.tableElement.style.display="none":this.tableElement.style.minWidth=this.table.columnManager.getWidth()+"px"},RowManager.prototype._clearVirtualDom=function(){var t=this.tableElement;for(this.table.options.placeholder&&this.table.options.placeholder.parentNode&&this.table.options.placeholder.parentNode.removeChild(this.table.options.placeholder);t.firstChild;)t.removeChild(t.firstChild);t.style.paddingTop="",t.style.paddingBottom="",t.style.minWidth="",t.style.minHeight="",t.style.display="",t.style.visibility="",this.scrollTop=0,this.scrollLeft=0,this.vDomTop=0,this.vDomBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0},RowManager.prototype.styleRow=function(t,e){var o=t.getElement();e%2?(o.classList.add("tabulator-row-even"),o.classList.remove("tabulator-row-odd")):(o.classList.add("tabulator-row-odd"),o.classList.remove("tabulator-row-even"))},RowManager.prototype._virtualRenderFill=function(t,e,o){var i=this,n=i.tableElement,l=i.element,s=0,a=0,r=0,u=0,h=!0,c=i.getDisplayRows();if(t=t||0,o=o||0,t){for(;n.firstChild;)n.removeChild(n.firstChild);var d=(i.displayRowsCount-t+1)*i.vDomRowHeight;d<i.height&&(t-=Math.ceil((i.height-d)/i.vDomRowHeight))<0&&(t=0),s=Math.min(Math.max(Math.floor(i.vDomWindowBuffer/i.vDomRowHeight),i.vDomWindowMinMarginRows),t),t-=s}else i._clearVirtualDom();if(i.displayRowsCount&&Tabulator.prototype.helpers.elVisible(i.element)){for(i.vDomTop=t,i.vDomBottom=t-1;(a<=i.height+i.vDomWindowBuffer||u<i.vDomWindowMinTotalRows)&&i.vDomBottom<i.displayRowsCount-1;){var p=i.vDomBottom+1,m=c[p],f=0;i.styleRow(m,p),n.appendChild(m.getElement()),m.initialize(),m.heightInitialized||m.normalizeHeight(!0),f=m.getHeight(),u<s?r+=f:a+=f,f>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*f),"group"!==m.type&&(h=!1),i.vDomBottom++,u++}t?(i.vDomTopPad=e?i.vDomRowHeight*this.vDomTop+o:i.scrollTop-r,i.vDomBottomPad=i.vDomBottom==i.displayRowsCount-1?0:Math.max(i.vDomScrollHeight-i.vDomTopPad-a-r,0)):(this.vDomTopPad=0,i.vDomRowHeight=Math.floor((a+r)/u),i.vDomBottomPad=i.vDomRowHeight*(i.displayRowsCount-i.vDomBottom-1),i.vDomScrollHeight=r+a+i.vDomBottomPad-i.height),n.style.paddingTop=i.vDomTopPad+"px",n.style.paddingBottom=i.vDomBottomPad+"px",e&&(this.scrollTop=i.vDomTopPad+r+o-(this.element.scrollWidth>this.element.clientWidth?this.element.offsetHeight-this.element.clientHeight:0)),this.scrollTop=Math.min(this.scrollTop,this.element.scrollHeight-this.height),this.element.scrollWidth>this.element.offsetWidth&&e&&(this.scrollTop+=this.element.offsetHeight-this.element.clientHeight),this.vDomScrollPosTop=this.scrollTop,this.vDomScrollPosBottom=this.scrollTop,l.scrollTop=this.scrollTop,n.style.minWidth=h?i.table.columnManager.getWidth()+"px":"",i.table.options.groupBy&&"fitDataFill"!=i.table.modules.layout.getMode()&&i.displayRowsCount==i.table.modules.groupRows.countGroups()&&(i.tableElement.style.minWidth=i.table.columnManager.getWidth())}else this.renderEmptyScroll();this.fixedHeight||this.adjustTableSize()},RowManager.prototype.scrollVertical=function(t){var e=this.scrollTop-this.vDomScrollPosTop,o=this.scrollTop-this.vDomScrollPosBottom,i=2*this.vDomWindowBuffer;if(-e>i||o>i){var n=this.scrollLeft;this._virtualRenderFill(Math.floor(this.element.scrollTop/this.element.scrollHeight*this.displayRowsCount)),this.scrollHorizontal(n)}else t?(e<0&&this._addTopRow(-e),o<0&&(this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer?this._removeBottomRow(-o):this.vDomScrollPosBottom=this.scrollTop)):(e>=0&&(this.scrollTop>this.vDomWindowBuffer?this._removeTopRow(e):this.vDomScrollPosTop=this.scrollTop),o>=0&&this._addBottomRow(o))},RowManager.prototype._addTopRow=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.tableElement,i=this.getDisplayRows();if(this.vDomTop){var n=this.vDomTop-1,l=i[n],s=l.getHeight()||this.vDomRowHeight;t>=s&&(this.styleRow(l,n),o.insertBefore(l.getElement(),o.firstChild),l.initialized&&l.heightInitialized||(this.vDomTopNewRows.push(l),l.heightInitialized||l.clearCellHeight()),l.initialize(),this.vDomTopPad-=s,this.vDomTopPad<0&&(this.vDomTopPad=n*this.vDomRowHeight),n||(this.vDomTopPad=0),o.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop-=s,this.vDomTop--),t=-(this.scrollTop-this.vDomScrollPosTop),l.getHeight()>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*l.getHeight()),e<this.vDomMaxRenderChain&&this.vDomTop&&t>=(i[this.vDomTop-1].getHeight()||this.vDomRowHeight)?this._addTopRow(t,e+1):this._quickNormalizeRowHeight(this.vDomTopNewRows)}},RowManager.prototype._removeTopRow=function(t){var e=this.tableElement,o=this.getDisplayRows()[this.vDomTop],i=o.getHeight()||this.vDomRowHeight;if(t>=i){var n=o.getElement();n.parentNode.removeChild(n),this.vDomTopPad+=i,e.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop+=this.vDomTop?i:i+this.vDomWindowBuffer,this.vDomTop++,t=this.scrollTop-this.vDomScrollPosTop,this._removeTopRow(t)}},RowManager.prototype._addBottomRow=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this.tableElement,i=this.getDisplayRows();if(this.vDomBottom<this.displayRowsCount-1){var n=this.vDomBottom+1,l=i[n],s=l.getHeight()||this.vDomRowHeight;t>=s&&(this.styleRow(l,n),
+o.appendChild(l.getElement()),l.initialized&&l.heightInitialized||(this.vDomBottomNewRows.push(l),l.heightInitialized||l.clearCellHeight()),l.initialize(),this.vDomBottomPad-=s,(this.vDomBottomPad<0||n==this.displayRowsCount-1)&&(this.vDomBottomPad=0),o.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom+=s,this.vDomBottom++),t=this.scrollTop-this.vDomScrollPosBottom,l.getHeight()>this.vDomWindowBuffer&&(this.vDomWindowBuffer=2*l.getHeight()),e<this.vDomMaxRenderChain&&this.vDomBottom<this.displayRowsCount-1&&t>=(i[this.vDomBottom+1].getHeight()||this.vDomRowHeight)?this._addBottomRow(t,e+1):this._quickNormalizeRowHeight(this.vDomBottomNewRows)}},RowManager.prototype._removeBottomRow=function(t){var e=this.tableElement,o=this.getDisplayRows()[this.vDomBottom],i=o.getHeight()||this.vDomRowHeight;if(t>=i){var n=o.getElement();n.parentNode&&n.parentNode.removeChild(n),this.vDomBottomPad+=i,this.vDomBottomPad<0&&(this.vDomBottomPad=0),e.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom-=i,this.vDomBottom--,t=-(this.scrollTop-this.vDomScrollPosBottom),this._removeBottomRow(t)}},RowManager.prototype._quickNormalizeRowHeight=function(t){t.forEach(function(t){t.calcHeight()}),t.forEach(function(t){t.setCellHeight()}),t.length=0},RowManager.prototype.normalizeHeight=function(){this.activeRows.forEach(function(t){t.normalizeHeight()})},RowManager.prototype.adjustTableSize=function(){var t,e=this.element.clientHeight;if("virtual"===this.renderMode){var o=Math.floor(this.columnManager.getElement().getBoundingClientRect().height+(this.table.footerManager&&this.table.footerManager.active&&!this.table.footerManager.external?this.table.footerManager.getElement().getBoundingClientRect().height:0));this.fixedHeight?(this.element.style.minHeight="calc(100% - "+o+"px)",this.element.style.height="calc(100% - "+o+"px)",this.element.style.maxHeight="calc(100% - "+o+"px)"):(this.element.style.height="",this.element.style.height=this.table.element.clientHeight-o+"px",this.element.scrollTop=this.scrollTop),this.height=this.element.clientHeight,this.vDomWindowBuffer=this.table.options.virtualDomBuffer||this.height,this.fixedHeight||e==this.element.clientHeight||((t=this.table.modExists("resizeTable"))&&!this.table.modules.resizeTable.autoResize||!t)&&this.redraw()}},RowManager.prototype.reinitialize=function(){this.rows.forEach(function(t){t.reinitialize(!0)})},RowManager.prototype.blockRedraw=function(){this.redrawBlock=!0,this.redrawBlockRestoreConfig=!1},RowManager.prototype.restoreRedraw=function(){this.redrawBlock=!1,this.redrawBlockRestoreConfig?(this.refreshActiveData(this.redrawBlockRestoreConfig.stage,this.redrawBlockRestoreConfig.skipStage,this.redrawBlockRestoreConfig.renderInPosition),this.redrawBlockRestoreConfig=!1):this.redrawBlockRederInPosition&&this.reRenderInPosition(),this.redrawBlockRederInPosition=!1},RowManager.prototype.redraw=function(t){var e=this.scrollLeft;this.adjustTableSize(),this.table.tableWidth=this.table.element.clientWidth,t?this.renderTable():("classic"==this.renderMode?this.table.options.groupBy?this.refreshActiveData("group",!1,!1):this._simpleRender():(this.reRenderInPosition(),this.scrollHorizontal(e)),this.displayRowsCount||this.table.options.placeholder&&this.getElement().appendChild(this.table.options.placeholder))},RowManager.prototype.resetScroll=function(){if(this.element.scrollLeft=0,this.element.scrollTop=0,"ie"===this.table.browser){var t=document.createEvent("Event");t.initEvent("scroll",!1,!0),this.element.dispatchEvent(t)}else this.element.dispatchEvent(new Event("scroll"))};var VDomHoz=function(t){this.table=t,this.element=this.table.rowManager.tableElement,this.holderEl=this.table.rowManager.element,this.leftCol=0,this.rightCol=0,this.scrollLeft=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0,this.fitDataColAvg=0,this.window=200,this.initialized=!1,this.columns=[],this.compatabilityCheck()&&this.initialize()};VDomHoz.prototype.compatabilityCheck=function(){var t=this.table.options,e=!0;return"fitDataTable"==t.layout&&(console.warn("Horizontal Vitrual DOM is not compatible with fitDataTable layout mode"),e=!1),t.responsiveLayout&&(console.warn("Horizontal Vitrual DOM is not compatible with responsive columns"),e=!1),this.table.rtl&&(console.warn("Horizontal Vitrual DOM is not currently compatible with RTL text direction"),e=!1),t.columns&&t.columns.find(function(t){return t.frozen})&&(console.warn("Horizontal Vitrual DOM is not compatible with frozen columns"),e=!1),e||(t.virtualDomHoz=!1),e},VDomHoz.prototype.initialize=function(){var t=this;this.holderEl.addEventListener("scroll",function(){var e=t.holderEl.scrollLeft;t.scrollLeft!=e&&(t.scrollLeft=e,t.scroll(e-(t.vDomScrollPosLeft+t.window)))})},VDomHoz.prototype.deinitialize=function(){this.initialized=!1},VDomHoz.prototype.clear=function(){this.columns=[],this.leftCol=-1,this.rightCol=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0},VDomHoz.prototype.dataChange=function(){var t,e,o,i=!1,n=0,l=0;if("fitData"===this.table.options.layout){if(this.table.columnManager.columnsByIndex.forEach(function(t){!t.definition.width&&t.visible&&(i=!0)}),i&&i&&this.table.rowManager.getDisplayRows().length&&(this.vDomScrollPosRight=this.scrollLeft+this.holderEl.clientWidth+this.window,this.table.options.groupBy?(t=this.table.modules.groupRows.getGroups(!1)[0],e=t.getRows(!1)[0]):e=this.table.rowManager.getDisplayRows()[0],e)){o=e.getElement(),e.generateCells(),this.element.appendChild(o);for(var l=0;l<e.cells.length;l++){var s=e.cells[l];if(o.appendChild(s.getElement()),s.column.reinitializeWidth(),(n+=s.column.getWidth())>this.vDomScrollPosRight)break}for(o.parentNode.removeChild(o),this.fitDataColAvg=Math.floor(n/(l+1)),l;l<this.table.columnManager.columnsByIndex.length;l++)this.table.columnManager.columnsByIndex[l].setWidth(this.fitDataColAvg);this.reinitialize(!1,!0)}}else"fitColumns"===this.table.options.layout&&(this.table.modules.layout.layout(),this.table.vdomHoz.reinitialize(!1,!0))},VDomHoz.prototype.fitDataLayoutOverride=function(){for(var t=this.leftCol;t<=this.rightCol;t++)this.columns[t].reinitializeWidth()},VDomHoz.prototype.reinitialize=function(t,e){var o=this,i={cols:this.columns,leftCol:this.leftCol,rightCol:this.rightCol};if(!t||this.initialized){this.clear(),this.scrollLeft=this.holderEl.scrollLeft,this.vDomScrollPosLeft=this.scrollLeft-this.window,this.vDomScrollPosRight=this.scrollLeft+this.holderEl.clientWidth+this.window;var n=0;this.table.columnManager.columnsByIndex.forEach(function(t){var e={};if(t.visible){var i=t.getWidth();e.leftPos=n,e.rightPos=n+i,n+i>o.vDomScrollPosLeft&&n<o.vDomScrollPosRight?(-1==o.leftCol&&(o.leftCol=o.columns.length,o.vDomPadLeft=n),o.rightCol=o.columns.length):-1!==o.leftCol&&(o.vDomPadRight+=i),o.columns.push(t),t.modules.vdomHoz=e,n+=i}}),this.element.style.paddingLeft=this.vDomPadLeft+"px",this.element.style.paddingRight=this.vDomPadRight+"px",this.initialized=!0,e||t&&!this.reinitChanged(i)||this.renitializeRows(),this.holderEl.scrollLeft=this.scrollLeft}},VDomHoz.prototype.reinitChanged=function(t){var e=this,o=!0;return t.cols.length!==this.columns.length||t.leftCol!==this.leftCol||t.rightCol!==this.rightCol||(t.cols.forEach(function(t,i){t!==e.columns[i]&&(o=!1)}),!o)},VDomHoz.prototype.renitializeRows=function(){var t=this;this.table.rowManager.getVisibleRows().forEach(function(e){t.reinitializeRow(e,!0)})},VDomHoz.prototype.scroll=function(t){this.vDomScrollPosLeft+=t,this.vDomScrollPosRight+=t,t>.8*this.holderEl.clientWidth?this.reinitialize():t>0?(this.addColRight(),this.removeColLeft()):(this.addColLeft(),this.removeColRight())},VDomHoz.prototype.colPositionAdjust=function(t,e,o){for(var i=t;i<e;i++){var n=this.columns[i];n.modules.vdomHoz.leftPos-=o,n.modules.vdomHoz.rightPos-=o}},VDomHoz.prototype.addColRight=function(){var t,e,o,i=this.columns[this.rightCol+1];i&&i.modules.vdomHoz.leftPos<=this.vDomScrollPosRight&&(t=this.table.rowManager.getVisibleRows(),t.forEach(function(t){if("group"!==t.type){var e=t.getCell(i);t.getElement().appendChild(e.getElement()),e.cellRendered()}}),this.fitDataColAvg&&(e=i.getWidth())===this.fitDataColAvg&&(i.reinitializeWidth(),(o=e-i.getWidth())&&(i.modules.vdomHoz.rightPos-=o,this.colPositionAdjust(this.rightCol+1,this.columns.length,o))),this.rightCol++,this.rightCol>=this.columns.length-1?this.vDomPadRight=0:this.vDomPadRight-=i.getWidth(),this.element.style.paddingRight=this.vDomPadRight+"px",this.addColRight())},VDomHoz.prototype.addColLeft=function(){var t=this.columns[this.leftCol-1];if(t&&t.modules.vdomHoz.rightPos>=this.vDomScrollPosLeft){this.table.rowManager.getVisibleRows().forEach(function(e){if("group"!==e.type){var o=e.getCell(t);e.getElement().prepend(o.getElement()),o.cellRendered()}}),this.leftCol?this.vDomPadLeft-=t.getWidth():this.vDomPadLeft=0,this.element.style.paddingLeft=this.vDomPadLeft+"px",this.leftCol--,this.addColLeft()}},VDomHoz.prototype.removeColRight=function(t){var e,t=this.columns[this.rightCol];t&&t.modules.vdomHoz.leftPos>this.vDomScrollPosRight&&(e=this.table.rowManager.getVisibleRows(),t.modules.vdomHoz.visible=!1,e.forEach(function(e){if("group"!==e.type){var o=e.getCell(t);e.getElement().removeChild(o.getElement())}}),this.vDomPadRight+=t.getWidth(),this.element.style.paddingRight=this.vDomPadRight+"px",this.rightCol--,this.removeColRight())},VDomHoz.prototype.removeColLeft=function(){var t,e=this.columns[this.leftCol];e&&e.modules.vdomHoz.rightPos<this.vDomScrollPosLeft&&(t=this.table.rowManager.getVisibleRows(),t.forEach(function(t){if("group"!==t.type){var o=t.getCell(e);t.getElement().removeChild(o.getElement())}}),this.vDomPadLeft+=e.getWidth(),this.element.style.paddingLeft=this.vDomPadLeft+"px",this.leftCol++,this.removeColLeft())},VDomHoz.prototype.initializeRow=function(t){if("group"!==t.type){t.modules.vdomHoz={leftCol:this.leftCol,rightCol:this.rightCol};for(var e=this.leftCol;e<=this.rightCol;e++){var o=this.columns[e];if(o&&o.visible){var i=t.getCell(o);t.getElement().appendChild(i.getElement()),i.cellRendered()}}}},VDomHoz.prototype.reinitializeRow=function(t,e){if("group"!==t.type&&(e||!t.modules.vdomHoz||t.modules.vdomHoz.leftCol!==this.leftCol||t.modules.vdomHoz.rightCol!==this.rightCol)){for(var o=t.getElement();o.firstChild;)o.removeChild(o.firstChild);this.initializeRow(t)}};var RowComponent=function(t){this._row=t};RowComponent.prototype.getData=function(t){return this._row.getData(t)},RowComponent.prototype.getElement=function(){return this._row.getElement()},RowComponent.prototype.getCells=function(){var t=[];return this._row.getCells().forEach(function(e){t.push(e.getComponent())}),t},RowComponent.prototype.getCell=function(t){var e=this._row.getCell(t);return!!e&&e.getComponent()},RowComponent.prototype.getIndex=function(){return this._row.getData("data")[this._row.table.options.index]},RowComponent.prototype.getPosition=function(t){return this._row.table.rowManager.getRowPosition(this._row,t)},RowComponent.prototype.delete=function(){return this._row.delete()},RowComponent.prototype.scrollTo=function(){return this._row.table.rowManager.scrollToRow(this._row)},RowComponent.prototype.pageTo=function(){if(this._row.table.modExists("page",!0))return this._row.table.modules.page.setPageToRow(this._row)},RowComponent.prototype.move=function(t,e){this._row.moveToRow(t,e)},RowComponent.prototype.update=function(t){return this._row.updateData(t)},RowComponent.prototype.normalizeHeight=function(){this._row.normalizeHeight(!0)},RowComponent.prototype.select=function(){this._row.table.modules.selectRow.selectRows(this._row)},RowComponent.prototype.deselect=function(){this._row.table.modules.selectRow.deselectRows(this._row)},RowComponent.prototype.toggleSelect=function(){this._row.table.modules.selectRow.toggleRow(this._row)},RowComponent.prototype.isSelected=function(){return this._row.table.modules.selectRow.isRowSelected(this._row)},RowComponent.prototype._getSelf=function(){return this._row},RowComponent.prototype.validate=function(){return this._row.validate()},RowComponent.prototype.freeze=function(){this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.freezeRow(this._row)},RowComponent.prototype.unfreeze=function(){this._row.table.modExists("frozenRows",!0)&&this._row.table.modules.frozenRows.unfreezeRow(this._row)},RowComponent.prototype.isFrozen=function(){if(this._row.table.modExists("frozenRows",!0)){return this._row.table.modules.frozenRows.rows.indexOf(this._row)>-1}return!1},RowComponent.prototype.treeCollapse=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.collapseRow(this._row)},RowComponent.prototype.treeExpand=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.expandRow(this._row)},RowComponent.prototype.treeToggle=function(){this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.toggleRow(this._row)},RowComponent.prototype.getTreeParent=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeParent(this._row)},RowComponent.prototype.getTreeChildren=function(){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.getTreeChildren(this._row,!0)},RowComponent.prototype.addTreeChild=function(t,e,o){return!!this._row.table.modExists("dataTree",!0)&&this._row.table.modules.dataTree.addTreeChildRow(this._row,t,e,o)},RowComponent.prototype.reformat=function(){return this._row.reinitialize()},RowComponent.prototype.getGroup=function(){return this._row.getGroup().getComponent()},RowComponent.prototype.getTable=function(){return this._row.table},RowComponent.prototype.getNextRow=function(){var t=this._row.nextRow();return t?t.getComponent():t},RowComponent.prototype.getPrevRow=function(){var t=this._row.prevRow();return t?t.getComponent():t};var Row=function(t,e){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"row";this.table=e.table,this.parent=e,this.data={},this.type=o,this.element=!1,this.modules={},this.cells=[],this.height=0,this.heightStyled="",this.manualHeight=!1,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.component=null,this.created=!1,this.setData(t)};Row.prototype.create=function(){this.created||(this.created=!0,this.generateElement())},Row.prototype.createElement=function(){var t=document.createElement("div");t.classList.add("tabulator-row"),t.setAttribute("role","row"),this.element=t},Row.prototype.getElement=function(){return this.create(),this.element},Row.prototype.detachElement=function(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)},Row.prototype.generateElement=function(){var t,e,o,i=this;this.createElement(),!1!==i.table.options.selectable&&i.table.modExists("selectRow")&&i.table.modules.selectRow.initializeRow(this),!1!==i.table.options.movableRows&&i.table.modExists("moveRow")&&i.table.modules.moveRow.initializeRow(this),!1!==i.table.options.dataTree&&i.table.modExists("dataTree")&&i.table.modules.dataTree.initializeRow(this),"collapse"===i.table.options.responsiveLayout&&i.table.modExists("responsiveLayout")&&i.table.modules.responsiveLayout.initializeRow(this),(i.table.options.rowContextMenu||i.table.options.rowClickMenu)&&this.table.modExists("menu")&&i.table.modules.menu.initializeRow(this),i.table.options.rowClick&&i.element.addEventListener("click",function(t){i.table.options.rowClick(t,i.getComponent())}),i.table.options.rowDblClick&&i.element.addEventListener("dblclick",function(t){i.table.options.rowDblClick(t,i.getComponent())}),i.table.options.rowContext&&i.element.addEventListener("contextmenu",function(t){i.table.options.rowContext(t,i.getComponent())}),i.table.options.rowMouseEnter&&i.element.addEventListener("mouseenter",function(t){i.table.options.rowMouseEnter(t,i.getComponent())}),i.table.options.rowMouseLeave&&i.element.addEventListener("mouseleave",function(t){i.table.options.rowMouseLeave(t,i.getComponent())}),i.table.options.rowMouseOver&&i.element.addEventListener("mouseover",function(t){i.table.options.rowMouseOver(t,i.getComponent())}),i.table.options.rowMouseOut&&i.element.addEventListener("mouseout",function(t){i.table.options.rowMouseOut(t,i.getComponent())}),i.table.options.rowMouseMove&&i.element.addEventListener("mousemove",function(t){i.table.options.rowMouseMove(t,i.getComponent())}),i.table.options.rowTap&&(o=!1,i.element.addEventListener("touchstart",function(t){o=!0},{passive:!0}),i.element.addEventListener("touchend",function(t){o&&i.table.options.rowTap(t,i.getComponent()),o=!1})),i.table.options.rowDblTap&&(t=null,i.element.addEventListener("touchend",function(e){t?(clearTimeout(t),t=null,i.table.options.rowDblTap(e,i.getComponent())):t=setTimeout(function(){clearTimeout(t),t=null},300)})),i.table.options.rowTapHold&&(e=null,i.element.addEventListener("touchstart",function(t){clearTimeout(e),e=setTimeout(function(){clearTimeout(e),e=null,o=!1,i.table.options.rowTapHold(t,i.getComponent())},1e3)},{passive:!0}),i.element.addEventListener("touchend",function(t){clearTimeout(e),e=null}))},Row.prototype.generateCells=function(){this.cells=this.table.columnManager.generateCells(this)},Row.prototype.initialize=function(t){var e=this;if(this.create(),!this.initialized||t){for(this.deleteCells();this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layoutRow(this),this.generateCells(),this.table.options.virtualDomHoz&&this.table.vdomHoz.initialized?this.table.vdomHoz.initializeRow(this):this.cells.forEach(function(t){e.element.appendChild(t.getElement()),t.cellRendered()}),t&&this.normalizeHeight(),this.table.options.dataTree&&this.table.modExists("dataTree")&&this.table.modules.dataTree.layoutRow(this),"collapse"===this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout")&&this.table.modules.responsiveLayout.layoutRow(this),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent()),this.table.options.resizableRows&&this.table.modExists("resizeRows")&&this.table.modules.resizeRows.initializeRow(this),this.initialized=!0}else this.table.options.virtualDomHoz&&this.table.vdomHoz.reinitializeRow(this)},Row.prototype.reinitializeHeight=function(){this.heightInitialized=!1,this.element&&null!==this.element.offsetParent&&this.normalizeHeight(!0)},Row.prototype.reinitialize=function(t){this.initialized=!1,this.heightInitialized=!1,this.manualHeight||(this.height=0,this.heightStyled=""),this.element&&null!==this.element.offsetParent&&this.initialize(!0),this.table.options.dataTree&&this.table.modExists("dataTree",!0)&&this.table.modules.dataTree.getTreeChildren(this,!1,!0).forEach(function(t){t.reinitialize(!0)})},Row.prototype.calcHeight=function(t){var e=0,o=this.table.options.resizableRows?this.element.clientHeight:0;this.cells.forEach(function(t){var o=t.getHeight();o>e&&(e=o)}),this.height=t?Math.max(e,o):this.manualHeight?this.height:Math.max(e,o),this.heightStyled=this.height?this.height+"px":"",this.outerHeight=this.element.offsetHeight},Row.prototype.setCellHeight=function(){this.cells.forEach(function(t){t.setHeight()}),this.heightInitialized=!0},Row.prototype.clearCellHeight=function(){this.cells.forEach(function(t){t.clearHeight()})},Row.prototype.normalizeHeight=function(t){t&&this.clearCellHeight(),this.calcHeight(t),this.setCellHeight()},Row.prototype.setHeight=function(t,e){(this.height!=t||e)&&(this.manualHeight=!0,this.height=t,this.heightStyled=t?t+"px":"",this.setCellHeight(),this.outerHeight=this.element.offsetHeight)},Row.prototype.getHeight=function(){return this.outerHeight},Row.prototype.getWidth=function(){return this.element.offsetWidth},Row.prototype.deleteCell=function(t){var e=this.cells.indexOf(t);e>-1&&this.cells.splice(e,1)},Row.prototype.setData=function(t){this.table.modExists("mutator")&&(t=this.table.modules.mutator.transformRow(t,"data")),this.data=t,this.table.options.reactiveData&&this.table.modExists("reactiveData",!0)&&this.table.modules.reactiveData.watchRow(this)},Row.prototype.updateData=function(t){var e,o=this,i=this.element&&Tabulator.prototype.helpers.elVisible(this.element),n={};return new Promise(function(l,s){"string"==typeof t&&(t=JSON.parse(t)),o.table.options.reactiveData&&o.table.modExists("reactiveData",!0)&&o.table.modules.reactiveData.block(),o.table.modExists("mutator")?(n=Object.assign(n,o.data),n=Object.assign(n,t),e=o.table.modules.mutator.transformRow(n,"data",t)):e=t;for(var a in e)o.data[a]=e[a];o.table.options.reactiveData&&o.table.modExists("reactiveData",!0)&&o.table.modules.reactiveData.unblock();for(var a in t){o.table.columnManager.getColumnsByFieldRoot(a).forEach(function(t){var n=o.getCell(t.getField());if(n){var l=t.getFieldValue(e);n.getValue()!=l&&(n.setValueProcessData(l),i&&n.cellRendered())}})}o.table.options.groupUpdateOnCellEdit&&o.table.options.groupBy&&o.table.modExists("groupRows")&&o.table.modules.groupRows.reassignRowToGroup(o.row),i?(o.normalizeHeight(!0),o.table.options.rowFormatter&&o.table.options.rowFormatter(o.getComponent())):(o.initialized=!1,o.height=0,o.heightStyled=""),!1!==o.table.options.dataTree&&o.table.modExists("dataTree")&&o.table.modules.dataTree.redrawNeeded(t)&&(o.table.modules.dataTree.initializeRow(o),i&&(o.table.modules.dataTree.layoutRow(o),o.table.rowManager.refreshActiveData("tree",!1,!0))),o.table.options.rowUpdated.call(o.table,o.getComponent()),o.table.options.dataChanged&&o.table.options.dataChanged.call(o.table,o.table.rowManager.getData()),l()})},Row.prototype.getData=function(t){return t&&this.table.modExists("accessor")?this.table.modules.accessor.transformRow(this,t):this.data},Row.prototype.getCell=function(t){return t=this.table.columnManager.findColumn(t),this.cells.find(function(e){return e.column===t})},Row.prototype.getCellIndex=function(t){return this.cells.findIndex(function(e){return e===t})},Row.prototype.findNextEditableCell=function(t){var e=!1;if(t<this.cells.length-1)for(var o=t+1;o<this.cells.length;o++){var i=this.cells[o];if(i.column.modules.edit&&Tabulator.prototype.helpers.elVisible(i.getElement())){var n=!0;if("function"==typeof i.column.modules.edit.check&&(n=i.column.modules.edit.check(i.getComponent())),n){e=i;break}}}return e},Row.prototype.findPrevEditableCell=function(t){var e=!1;if(t>0)for(var o=t-1;o>=0;o--){var i=this.cells[o],n=!0;if(i.column.modules.edit&&Tabulator.prototype.helpers.elVisible(i.getElement())&&("function"==typeof i.column.modules.edit.check&&(n=i.column.modules.edit.check(i.getComponent())),n)){e=i;break}}return e},Row.prototype.getCells=function(){return this.cells},Row.prototype.nextRow=function(){return this.table.rowManager.nextDisplayRow(this,!0)||!1},Row.prototype.prevRow=function(){return this.table.rowManager.prevDisplayRow(this,!0)||!1},Row.prototype.moveToRow=function(t,e){var o=this.table.rowManager.findRow(t);o?(this.table.rowManager.moveRowActual(this,o,!e),this.table.rowManager.refreshActiveData("display",!1,!0)):console.warn("Move Error - No matching row found:",t)},Row.prototype.validate=function(){var t=[];return this.cells.forEach(function(e){e.validate()||t.push(e.getComponent())}),!t.length||t},Row.prototype.delete=function(){var t=this;return new Promise(function(e,o){var i,n;t.table.options.history&&t.table.modExists("history")&&(t.table.options.groupBy&&t.table.modExists("groupRows")?(n=t.getGroup().rows,(i=n.indexOf(t))&&(i=n[i-1])):(i=t.table.rowManager.getRowIndex(t))&&(i=t.table.rowManager.rows[i-1]),t.table.modules.history.action("rowDelete",t,{data:t.getData(),pos:!i,index:i})),t.deleteActual(),e()})},Row.prototype.deleteActual=function(t){this.table.rowManager.getRowIndex(this);this.detatchModules(),this.table.options.reactiveData&&this.table.modExists("reactiveData",!0),this.modules.group&&this.modules.group.removeRow(this),this.table.rowManager.deleteRow(this,t),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.element=!1,this.table.options.dataTree&&this.table.modExists("dataTree",!0)&&this.table.modules.dataTree.rowDelete(this),this.table.modExists("columnCalcs")&&(this.table.options.groupBy&&this.table.modExists("groupRows")?this.table.modules.columnCalcs.recalcRowGroup(this):this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows))},Row.prototype.detatchModules=function(){this.table.modExists("selectRow")&&this.table.modules.selectRow._deselectRow(this,!0),this.table.modExists("edit")&&this.table.modules.edit.currentCell.row===this&&this.table.modules.edit.cancelEdit(),this.table.modExists("frozenRows")&&this.table.modules.frozenRows.detachRow(this)},Row.prototype.deleteCells=function(){for(var t=this.cells.length,e=0;e<t;e++)this.cells[0].delete()},Row.prototype.wipe=function(){if(this.detatchModules(),this.deleteCells(),this.element){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.parentNode&&this.element.parentNode.removeChild(this.element)}this.element=!1,this.modules={}},Row.prototype.getGroup=function(){return this.modules.group||!1},Row.prototype.getComponent=function(){return this.component||(this.component=new RowComponent(this)),this.component};var CellComponent=function(t){this._cell=t};CellComponent.prototype.getValue=function(){return this._cell.getValue()},CellComponent.prototype.getOldValue=function(){return this._cell.getOldValue()},CellComponent.prototype.getInitialValue=function(){return this._cell.initialValue},CellComponent.prototype.getElement=function(){return this._cell.getElement()},CellComponent.prototype.getRow=function(){return this._cell.row.getComponent()},CellComponent.prototype.getData=function(){return this._cell.row.getData()},CellComponent.prototype.getField=function(){return this._cell.column.getField()},CellComponent.prototype.getColumn=function(){return this._cell.column.getComponent()},CellComponent.prototype.setValue=function(t,e){void 0===e&&(e=!0),this._cell.setValue(t,e)},CellComponent.prototype.restoreOldValue=function(){this._cell.setValueActual(this._cell.getOldValue())},CellComponent.prototype.restoreInitialValue=function(){this._cell.setValueActual(this._cell.initialValue)},CellComponent.prototype.edit=function(t){return this._cell.edit(t)},CellComponent.prototype.cancelEdit=function(){this._cell.cancelEdit()},CellComponent.prototype.isEdited=function(){return!!this._cell.modules.edit&&this._cell.modules.edit.edited},CellComponent.prototype.clearEdited=function(){self.table.modExists("edit",!0)&&this._cell.table.modules.edit.clearEdited(this._cell)},CellComponent.prototype.isValid=function(){return!this._cell.modules.validate||!this._cell.modules.validate.invalid},CellComponent.prototype.validate=function(){return this._cell.validate()},CellComponent.prototype.clearValidation=function(){this._cell.table.modExists("validate",!0)&&this._cell.table.modules.validate.clearValidation(this._cell)},CellComponent.prototype.nav=function(){return this._cell.nav()},CellComponent.prototype.checkHeight=function(){this._cell.checkHeight()},CellComponent.prototype.getTable=function(){return this._cell.table},CellComponent.prototype._getSelf=function(){return this._cell};var Cell=function(t,e){this.table=t.table,this.column=t,this.row=e,this.element=null,this.value=null,this.initialValue,this.oldValue=null,this.modules={},this.height=null,this.width=null,this.minWidth=null,this.component=null,this.loaded=!1,this.build()};Cell.prototype.build=function(){this.generateElement(),this.setWidth(),this._configureCell(),this.setValueActual(this.column.getFieldValue(this.row.data)),this.initialValue=this.value},Cell.prototype.generateElement=function(){this.element=document.createElement("div"),this.element.className="tabulator-cell",this.element.setAttribute("role","gridcell"),this.element=this.element},Cell.prototype._configureCell=function(){var t=this,e=t.column.cellEvents,o=t.element,i=this.column.getField(),n={top:"flex-start",bottom:"flex-end",middle:"center"},l={left:"flex-start",right:"flex-end",center:"center"};if(o.style.textAlign=t.column.hozAlign,t.column.vertAlign&&(o.style.display="inline-flex",o.style.alignItems=n[t.column.vertAlign]||"",t.column.hozAlign&&(o.style.justifyContent=l[t.column.hozAlign]||"")),i&&o.setAttribute("tabulator-field",i),t.column.definition.cssClass){t.column.definition.cssClass.split(" ").forEach(function(t){o.classList.add(t)})}"hover"===this.table.options.tooltipGenerationMode&&o.addEventListener("mouseenter",function(e){t._generateTooltip()}),t._bindClickEvents(e),t._bindTouchEvents(e),t._bindMouseEvents(e),t.column.modules.edit&&t.table.modules.edit.bindEditor(t),t.column.definition.rowHandle&&!1!==t.table.options.movableRows&&t.table.modExists("moveRow")&&t.table.modules.moveRow.initializeCell(t),t.column.visible||t.hide()},Cell.prototype._bindClickEvents=function(t){var e=this,o=e.element;(t.cellClick||e.table.options.cellClick)&&o.addEventListener("click",function(o){var i=e.getComponent();t.cellClick&&t.cellClick.call(e.table,o,i),e.table.options.cellClick&&e.table.options.cellClick.call(e.table,o,i)}),t.cellDblClick||this.table.options.cellDblClick?o.addEventListener("dblclick",function(o){var i=e.getComponent();t.cellDblClick&&t.cellDblClick.call(e.table,o,i),e.table.options.cellDblClick&&e.table.options.cellDblClick.call(e.table,o,i)}):o.addEventListener("dblclick",function(t){if(!e.table.modExists("edit")||e.table.modules.edit.currentCell!==e){t.preventDefault();try{if(document.selection){var o=document.body.createTextRange();o.moveToElementText(e.element),o.select()}else if(window.getSelection){var o=document.createRange();o.selectNode(e.element),window.getSelection().removeAllRanges(),window.getSelection().addRange(o)}}catch(t){}}}),(t.cellContext||this.table.options.cellContext)&&o.addEventListener("contextmenu",function(o){var i=e.getComponent();t.cellContext&&t.cellContext.call(e.table,o,i),e.table.options.cellContext&&e.table.options.cellContext.call(e.table,o,i)})},Cell.prototype._bindMouseEvents=function(t){var e=this,o=e.element;(t.cellMouseEnter||e.table.options.cellMouseEnter)&&o.addEventListener("mouseenter",function(o){var i=e.getComponent();t.cellMouseEnter&&t.cellMouseEnter.call(e.table,o,i),e.table.options.cellMouseEnter&&e.table.options.cellMouseEnter.call(e.table,o,i)}),(t.cellMouseLeave||e.table.options.cellMouseLeave)&&o.addEventListener("mouseleave",function(o){var i=e.getComponent();t.cellMouseLeave&&t.cellMouseLeave.call(e.table,o,i),e.table.options.cellMouseLeave&&e.table.options.cellMouseLeave.call(e.table,o,i)}),(t.cellMouseOver||e.table.options.cellMouseOver)&&o.addEventListener("mouseover",function(o){var i=e.getComponent();t.cellMouseOver&&t.cellMouseOver.call(e.table,o,i),e.table.options.cellMouseOver&&e.table.options.cellMouseOver.call(e.table,o,i)}),(t.cellMouseOut||e.table.options.cellMouseOut)&&o.addEventListener("mouseout",function(o){var i=e.getComponent();t.cellMouseOut&&t.cellMouseOut.call(e.table,o,i),e.table.options.cellMouseOut&&e.table.options.cellMouseOut.call(e.table,o,i)}),(t.cellMouseMove||e.table.options.cellMouseMove)&&o.addEventListener("mousemove",function(o){var i=e.getComponent();t.cellMouseMove&&t.cellMouseMove.call(e.table,o,i),e.table.options.cellMouseMove&&e.table.options.cellMouseMove.call(e.table,o,i)})},Cell.prototype._bindTouchEvents=function(t){var e,o,i,n=this,l=n.element;(t.cellTap||this.table.options.cellTap)&&(i=!1,l.addEventListener("touchstart",function(t){i=!0},{passive:!0}),l.addEventListener("touchend",function(e){if(i){var o=n.getComponent();t.cellTap&&t.cellTap.call(n.table,e,o),n.table.options.cellTap&&n.table.options.cellTap.call(n.table,e,o)}i=!1})),(t.cellDblTap||this.table.options.cellDblTap)&&(e=null,l.addEventListener("touchend",function(o){if(e){clearTimeout(e),e=null;var i=n.getComponent();t.cellDblTap&&t.cellDblTap.call(n.table,o,i),
+n.table.options.cellDblTap&&n.table.options.cellDblTap.call(n.table,o,i)}else e=setTimeout(function(){clearTimeout(e),e=null},300)})),(t.cellTapHold||this.table.options.cellTapHold)&&(o=null,l.addEventListener("touchstart",function(e){clearTimeout(o),o=setTimeout(function(){clearTimeout(o),o=null,i=!1;var l=n.getComponent();t.cellTapHold&&t.cellTapHold.call(n.table,e,l),n.table.options.cellTapHold&&n.table.options.cellTapHold.call(n.table,e,l)},1e3)},{passive:!0}),l.addEventListener("touchend",function(t){clearTimeout(o),o=null}))},Cell.prototype._generateContents=function(){var t;switch(t=this.table.modExists("format")?this.table.modules.format.formatValue(this):this.element.innerHTML=this.value,void 0===t?"undefined":_typeof(t)){case"object":if(t instanceof Node){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.appendChild(t)}else this.element.innerHTML="",null!=t&&console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",t);break;case"undefined":case"null":this.element.innerHTML="";break;default:this.element.innerHTML=t}},Cell.prototype.cellRendered=function(){this.table.modExists("format")&&this.table.modules.format.cellRendered&&this.table.modules.format.cellRendered(this)},Cell.prototype._generateTooltip=function(){var t=this.column.tooltip;t?(!0===t?t=this.value:"function"==typeof t&&!1===(t=t(this.getComponent()))&&(t=""),void 0===t&&(t=""),this.element.setAttribute("title",t)):this.element.setAttribute("title","")},Cell.prototype.getElement=function(t){return this.loaded||(this.loaded=!0,t||this.layoutElement()),this.element},Cell.prototype.getValue=function(){return this.value},Cell.prototype.getOldValue=function(){return this.oldValue},Cell.prototype.setValue=function(t,e){var o,i=this.setValueProcessData(t,e);i&&(this.table.options.history&&this.table.modExists("history")&&this.table.modules.history.action("cellEdit",this,{oldValue:this.oldValue,newValue:this.value}),o=this.getComponent(),this.column.cellEvents.cellEdited&&this.column.cellEvents.cellEdited.call(this.table,o),this.table.options.groupUpdateOnCellEdit&&this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.reassignRowToGroup(this.row),this.cellRendered(),this.table.options.cellEdited.call(this.table,o),this.table.options.dataChanged&&this.table.options.dataChanged.call(this.table,this.table.rowManager.getData()))},Cell.prototype.setValueProcessData=function(t,e){var o=!1;return this.value!=t&&(o=!0,e&&this.column.modules.mutate&&(t=this.table.modules.mutator.transformCell(this,t))),this.setValueActual(t),o&&this.table.modExists("columnCalcs")&&(this.column.definition.topCalc||this.column.definition.bottomCalc)&&(this.table.options.groupBy&&this.table.modExists("groupRows")?("table"!=this.table.options.columnCalcs&&"both"!=this.table.options.columnCalcs||this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows),"table"!=this.table.options.columnCalcs&&this.table.modules.columnCalcs.recalcRowGroup(this.row)):this.table.modules.columnCalcs.recalc(this.table.rowManager.activeRows)),o},Cell.prototype.setValueActual=function(t){this.oldValue=this.value,this.value=t,this.table.options.reactiveData&&this.table.modExists("reactiveData")&&this.table.modules.reactiveData.block(),this.column.setFieldValue(this.row.data,t),this.table.options.reactiveData&&this.table.modExists("reactiveData")&&this.table.modules.reactiveData.unblock(),this.loaded&&this.layoutElement()},Cell.prototype.layoutElement=function(){this._generateContents(),this._generateTooltip(),this.table.options.resizableColumns&&this.table.modExists("resizeColumns")&&"row"===this.row.type&&this.table.modules.resizeColumns.initializeColumn("cell",this.column,this.element),(this.column.definition.contextMenu||this.column.definition.clickMenu)&&this.table.modExists("menu")&&this.table.modules.menu.initializeCell(this),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layoutElement(this.element,this.column)},Cell.prototype.setWidth=function(){this.width=this.column.width,this.element.style.width=this.column.widthStyled},Cell.prototype.clearWidth=function(){this.width="",this.element.style.width=""},Cell.prototype.getWidth=function(){return this.width||this.element.offsetWidth},Cell.prototype.setMinWidth=function(){this.minWidth=this.column.minWidth,this.element.style.minWidth=this.column.minWidthStyled},Cell.prototype.setMaxWidth=function(){this.maxWidth=this.column.maxWidth,this.element.style.maxWidth=this.column.maxWidthStyled},Cell.prototype.checkHeight=function(){this.row.reinitializeHeight()},Cell.prototype.clearHeight=function(){this.element.style.height="",this.height=null},Cell.prototype.setHeight=function(){this.height=this.row.height,this.element.style.height=this.row.heightStyled},Cell.prototype.getHeight=function(){return this.height||this.element.offsetHeight},Cell.prototype.show=function(){this.element.style.display=this.column.vertAlign?"inline-flex":""},Cell.prototype.hide=function(){this.element.style.display="none"},Cell.prototype.edit=function(t){if(this.table.modExists("edit",!0))return this.table.modules.edit.editCell(this,t)},Cell.prototype.cancelEdit=function(){if(this.table.modExists("edit",!0)){var t=this.table.modules.edit.getCurrentCell();t&&t._getSelf()===this?this.table.modules.edit.cancelEdit():console.warn("Cancel Editor Error - This cell is not currently being edited ")}},Cell.prototype.validate=function(){if(this.column.modules.validate&&this.table.modExists("validate",!0)){return!0===this.table.modules.validate.validate(this.column.modules.validate,this,this.getValue())}return!0},Cell.prototype.delete=function(){!this.table.rowManager.redrawBlock&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.modules.validate&&this.modules.validate.invalid&&this.table.modules.validate.clearValidation(this),this.modules.edit&&this.modules.edit.edited&&this.table.modules.edit.clearEdited(this),this.table.options.history&&this.table.modules.history.clearComponentHistory(this),this.element=!1,this.column.deleteCell(this),this.row.deleteCell(this),this.calcs={}},Cell.prototype.nav=function(){var t=this,e=!1,o=this.row.getCellIndex(this);return{next:function(){var e,o=this.right();return!!o||!(!(e=t.table.rowManager.nextDisplayRow(t.row,!0))||!(o=e.findNextEditableCell(-1)))&&(o.edit(),!0)},prev:function(){var e,o=this.left();return!!o||!(!(e=t.table.rowManager.prevDisplayRow(t.row,!0))||!(o=e.findPrevEditableCell(e.cells.length)))&&(o.edit(),!0)},left:function(){return!!(e=t.row.findPrevEditableCell(o))&&(e.edit(),!0)},right:function(){return!!(e=t.row.findNextEditableCell(o))&&(e.edit(),!0)},up:function(){var e=t.table.rowManager.prevDisplayRow(t.row,!0);e&&e.cells[o].edit()},down:function(){var e=t.table.rowManager.nextDisplayRow(t.row,!0);e&&e.cells[o].edit()}}},Cell.prototype.getIndex=function(){this.row.getCellIndex(this)},Cell.prototype.getComponent=function(){return this.component||(this.component=new CellComponent(this)),this.component};var FooterManager=function(t){this.table=t,this.active=!1,this.element=this.createElement(),this.external=!1,this.links=[],this._initialize()};FooterManager.prototype.createElement=function(){var t=document.createElement("div");return t.classList.add("tabulator-footer"),t},FooterManager.prototype._initialize=function(t){if(this.table.options.footerElement)switch(_typeof(this.table.options.footerElement)){case"string":"<"===this.table.options.footerElement[0]?this.element.innerHTML=this.table.options.footerElement:(this.external=!0,this.element=document.querySelector(this.table.options.footerElement));break;default:this.element=this.table.options.footerElement}},FooterManager.prototype.getElement=function(){return this.element},FooterManager.prototype.append=function(t,e){this.activate(e),this.element.appendChild(t),this.table.rowManager.adjustTableSize()},FooterManager.prototype.prepend=function(t,e){this.activate(e),this.element.insertBefore(t,this.element.firstChild),this.table.rowManager.adjustTableSize()},FooterManager.prototype.remove=function(t){t.parentNode.removeChild(t),this.deactivate()},FooterManager.prototype.deactivate=function(t){this.element.firstChild&&!t||(this.external||this.element.parentNode.removeChild(this.element),this.active=!1)},FooterManager.prototype.activate=function(t){this.active||(this.active=!0,this.external||(this.table.element.appendChild(this.getElement()),this.table.element.style.display="")),t&&this.links.push(t)},FooterManager.prototype.redraw=function(){this.links.forEach(function(t){t.footerRedraw()})};var Tabulator=function t(e,o){this.options={},this.columnManager=null,this.rowManager=null,this.footerManager=null,this.vdomHoz=null,this.browser="",this.browserSlow=!1,this.browserMobile=!1,this.rtl=!1,this.modules={},this.initializeElement(e)&&(this.initializeOptions(o||{}),this._create()),t.prototype.comms.register(this)};Tabulator.prototype.defaultOptions={height:!1,minHeight:!1,maxHeight:!1,layout:"fitData",layoutColumnsOnNewData:!1,columnMinWidth:40,columnMaxWidth:!1,columnHeaderVertAlign:"top",columnVertAlign:!1,resizableColumns:!0,resizableRows:!1,autoResize:!0,columns:[],cellHozAlign:"",cellVertAlign:"",headerHozAlign:"",data:[],autoColumns:!1,autoColumnsDefinitions:!1,reactiveData:!1,nestedFieldSeparator:".",tooltips:!1,tooltipsHeader:!1,tooltipGenerationMode:"load",initialSort:!1,initialFilter:!1,initialHeaderFilter:!1,columnHeaderSortMulti:!0,sortOrderReverse:!1,headerSort:!0,headerSortTristate:!1,headerSortElement:"<div class='tabulator-arrow'></div>",footerElement:!1,index:"id",textDirection:"auto",keybindings:[],tabEndNewRow:!1,invalidOptionWarnings:!0,clipboard:!1,clipboardCopyStyled:!0,clipboardCopyConfig:!1,clipboardCopyFormatter:!1,clipboardCopyRowRange:"active",clipboardPasteParser:"table",clipboardPasteAction:"insert",clipboardCopied:function(){},clipboardPasted:function(){},clipboardPasteError:function(){},downloadDataFormatter:!1,downloadReady:function(t,e){return e},downloadComplete:!1,downloadConfig:{},downloadRowRange:"active",dataTree:!1,dataTreeFilter:!0,dataTreeSort:!0,dataTreeElementColumn:!1,dataTreeBranchElement:!0,dataTreeChildIndent:9,dataTreeChildField:"_children",dataTreeCollapseElement:!1,dataTreeExpandElement:!1,dataTreeStartExpanded:!1,dataTreeRowExpanded:function(){},dataTreeRowCollapsed:function(){},dataTreeChildColumnCalcs:!1,dataTreeSelectPropagate:!1,printAsHtml:!1,printFormatter:!1,printHeader:!1,printFooter:!1,printCopyStyle:!0,printStyled:!0,printVisibleRows:!0,printRowRange:"visible",printConfig:{},addRowPos:"bottom",selectable:"highlight",selectableRangeMode:"drag",selectableRollingSelection:!0,selectablePersistence:!0,selectableCheck:function(t,e){return!0},headerFilterLiveFilterDelay:300,headerFilterPlaceholder:!1,headerVisible:!0,history:!1,locale:!1,langs:{},virtualDom:!0,virtualDomBuffer:0,virtualDomHoz:!1,persistentLayout:!1,persistentSort:!1,persistentFilter:!1,persistenceID:"",persistenceMode:!0,persistenceReaderFunc:!1,persistenceWriterFunc:!1,persistence:!1,responsiveLayout:!1,responsiveLayoutCollapseStartOpen:!0,responsiveLayoutCollapseUseFormatters:!0,responsiveLayoutCollapseFormatter:!1,pagination:!1,paginationSize:!1,paginationInitialPage:1,paginationButtonCount:5,paginationSizeSelector:!1,paginationElement:!1,paginationDataSent:{},paginationDataReceived:{},paginationAddRow:"page",ajaxURL:!1,ajaxURLGenerator:!1,ajaxParams:{},ajaxConfig:"get",ajaxContentType:"form",ajaxRequestFunc:!1,ajaxLoader:!0,ajaxLoaderLoading:!1,ajaxLoaderError:!1,ajaxFiltering:!1,ajaxSorting:!1,ajaxProgressiveLoad:!1,ajaxProgressiveLoadDelay:0,ajaxProgressiveLoadScrollMargin:0,groupBy:!1,groupStartOpen:!0,groupValues:!1,groupUpdateOnCellEdit:!1,groupHeader:!1,groupHeaderPrint:null,groupHeaderClipboard:null,groupHeaderHtmlOutput:null,groupHeaderDownload:null,htmlOutputConfig:!1,movableColumns:!1,movableRows:!1,movableRowsConnectedTables:!1,movableRowsConnectedElements:!1,movableRowsSender:!1,movableRowsReceiver:"insert",movableRowsSendingStart:function(){},movableRowsSent:function(){},movableRowsSentFailed:function(){},movableRowsSendingStop:function(){},movableRowsReceivingStart:function(){},movableRowsReceived:function(){},movableRowsReceivedFailed:function(){},movableRowsReceivingStop:function(){},movableRowsElementDrop:function(){},scrollToRowPosition:"top",scrollToRowIfVisible:!0,scrollToColumnPosition:"left",scrollToColumnIfVisible:!0,rowFormatter:!1,rowFormatterPrint:null,rowFormatterClipboard:null,rowFormatterHtmlOutput:null,placeholder:!1,tableBuilding:function(){},tableBuilt:function(){},renderStarted:function(){},renderComplete:function(){},rowClick:!1,rowDblClick:!1,rowContext:!1,rowTap:!1,rowDblTap:!1,rowTapHold:!1,rowMouseEnter:!1,rowMouseLeave:!1,rowMouseOver:!1,rowMouseOut:!1,rowMouseMove:!1,rowContextMenu:!1,rowClickMenu:!1,rowAdded:function(){},rowDeleted:function(){},rowMoved:function(){},rowUpdated:function(){},rowSelectionChanged:function(){},rowSelected:function(){},rowDeselected:function(){},rowResized:function(){},cellClick:!1,cellDblClick:!1,cellContext:!1,cellTap:!1,cellDblTap:!1,cellTapHold:!1,cellMouseEnter:!1,cellMouseLeave:!1,cellMouseOver:!1,cellMouseOut:!1,cellMouseMove:!1,cellEditing:function(){},cellEdited:function(){},cellEditCancelled:function(){},columnMoved:!1,columnResized:function(){},columnTitleChanged:function(){},columnVisibilityChanged:function(){},htmlImporting:function(){},htmlImported:function(){},dataLoading:function(){},dataLoaded:function(){},dataEdited:!1,dataChanged:!1,ajaxRequesting:function(){},ajaxResponse:!1,ajaxError:function(){},dataFiltering:!1,dataFiltered:!1,dataSorting:function(){},dataSorted:function(){},groupToggleElement:"arrow",groupClosedShowCalcs:!1,dataGrouping:function(){},dataGrouped:!1,groupVisibilityChanged:function(){},groupClick:!1,groupDblClick:!1,groupContext:!1,groupContextMenu:!1,groupClickMenu:!1,groupTap:!1,groupDblTap:!1,groupTapHold:!1,columnCalcs:!0,pageLoaded:function(){},localized:function(){},validationMode:"blocking",validationFailed:function(){},historyUndo:function(){},historyRedo:function(){},scrollHorizontal:function(){},scrollVertical:function(){}},Tabulator.prototype.initializeOptions=function(t){if(!1!==t.invalidOptionWarnings)for(var e in t)void 0===this.defaultOptions[e]&&console.warn("Invalid table constructor option:",e);for(var e in this.defaultOptions)e in t?this.options[e]=t[e]:Array.isArray(this.defaultOptions[e])?this.options[e]=Object.assign([],this.defaultOptions[e]):"object"===_typeof(this.defaultOptions[e])&&null!==this.defaultOptions[e]?this.options[e]=Object.assign({},this.defaultOptions[e]):this.options[e]=this.defaultOptions[e]},Tabulator.prototype.initializeElement=function(t){return"undefined"!=typeof HTMLElement&&t instanceof HTMLElement?(this.element=t,!0):"string"==typeof t?(this.element=document.querySelector(t),!!this.element||(console.error("Tabulator Creation Error - no element found matching selector: ",t),!1)):(console.error("Tabulator Creation Error - Invalid element provided:",t),!1)},Tabulator.prototype.rtlCheck=function(){var t=window.getComputedStyle(this.element);switch(this.options.textDirection){case"auto":if("rtl"!==t.direction)break;case"rtl":this.element.classList.add("tabulator-rtl"),this.rtl=!0;break;case"ltr":this.element.classList.add("tabulator-ltr");default:this.rtl=!1}},Tabulator.prototype._mapDepricatedFunctionality=function(){(this.options.persistentLayout||this.options.persistentSort||this.options.persistentFilter)&&(this.options.persistence||(this.options.persistence={})),this.options.dataEdited&&(console.warn("DEPRECATION WARNING - dataEdited option has been deprecated, please use the dataChanged option instead"),this.options.dataChanged=this.options.dataEdited),this.options.downloadDataFormatter&&console.warn("DEPRECATION WARNING - downloadDataFormatter option has been deprecated"),void 0!==this.options.clipboardCopyHeader&&(this.options.columnHeaders=this.options.clipboardCopyHeader,console.warn("DEPRECATION WARNING - clipboardCopyHeader option has been deprecated, please use the columnHeaders property on the clipboardCopyConfig option")),!0!==this.options.printVisibleRows&&(console.warn("printVisibleRows option is deprecated, you should now use the printRowRange option"),this.options.persistence.printRowRange="active"),!0!==this.options.printCopyStyle&&(console.warn("printCopyStyle option is deprecated, you should now use the printStyled option"),this.options.persistence.printStyled=this.options.printCopyStyle),this.options.persistentLayout&&(console.warn("persistentLayout option is deprecated, you should now use the persistence option"),!0!==this.options.persistence&&void 0===this.options.persistence.columns&&(this.options.persistence.columns=!0)),this.options.persistentSort&&(console.warn("persistentSort option is deprecated, you should now use the persistence option"),!0!==this.options.persistence&&void 0===this.options.persistence.sort&&(this.options.persistence.sort=!0)),this.options.persistentFilter&&(console.warn("persistentFilter option is deprecated, you should now use the persistence option"),!0!==this.options.persistence&&void 0===this.options.persistence.filter&&(this.options.persistence.filter=!0)),this.options.columnVertAlign&&(console.warn("columnVertAlign option is deprecated, you should now use the columnHeaderVertAlign option"),this.options.columnHeaderVertAlign=this.options.columnVertAlign)},Tabulator.prototype._clearSelection=function(){this.element.classList.add("tabulator-block-select"),window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty(),this.element.classList.remove("tabulator-block-select")},Tabulator.prototype._create=function(){this._clearObjectPointers(),this._mapDepricatedFunctionality(),this.bindModules(),this.rtlCheck(),"TABLE"===this.element.tagName&&this.modExists("htmlTableImport",!0)&&this.modules.htmlTableImport.parseTable(),this.columnManager=new ColumnManager(this),this.rowManager=new RowManager(this),this.footerManager=new FooterManager(this),this.columnManager.setRowManager(this.rowManager),this.rowManager.setColumnManager(this.columnManager),this.options.virtualDomHoz&&(this.vdomHoz=new VDomHoz(this)),this._buildElement(),this._loadInitialData()},Tabulator.prototype._clearObjectPointers=function(){this.options.columns=this.options.columns.slice(0),this.options.reactiveData||(this.options.data=this.options.data.slice(0))},Tabulator.prototype._buildElement=function(){var t=this,e=this.element,o=this.modules,i=this.options;for(i.tableBuilding.call(this),e.classList.add("tabulator"),e.setAttribute("role","grid");e.firstChild;)e.removeChild(e.firstChild);i.height&&(i.height=isNaN(i.height)?i.height:i.height+"px",e.style.height=i.height),!1!==i.minHeight&&(i.minHeight=isNaN(i.minHeight)?i.minHeight:i.minHeight+"px",e.style.minHeight=i.minHeight),!1!==i.maxHeight&&(i.maxHeight=isNaN(i.maxHeight)?i.maxHeight:i.maxHeight+"px",e.style.maxHeight=i.maxHeight),this.columnManager.initialize(),this.rowManager.initialize(),this._detectBrowser(),this.modExists("layout",!0)&&o.layout.initialize(i.layout),o.localize.initialize(),!1!==i.headerFilterPlaceholder&&o.localize.setHeaderFilterPlaceholder(i.headerFilterPlaceholder);for(var n in i.langs)o.localize.installLang(n,i.langs[n]);if(o.localize.setLocale(i.locale),"string"==typeof i.placeholder){var l=document.createElement("div");l.classList.add("tabulator-placeholder");var s=document.createElement("span");s.innerHTML=i.placeholder,l.appendChild(s),i.placeholder=l}if(e.appendChild(this.columnManager.getElement()),e.appendChild(this.rowManager.getElement()),i.footerElement&&this.footerManager.activate(),i.persistence&&this.modExists("persistence",!0)&&o.persistence.initialize(),i.movableRows&&this.modExists("moveRow")&&o.moveRow.initialize(),i.autoColumns&&this.options.data&&this.columnManager.generateColumnsFromRowData(this.options.data),this.modExists("columnCalcs")&&o.columnCalcs.initialize(),this.columnManager.setColumns(i.columns),i.dataTree&&this.modExists("dataTree",!0)&&o.dataTree.initialize(),this.modExists("frozenRows")&&this.modules.frozenRows.initialize(),(i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.sort||i.initialSort)&&this.modExists("sort",!0)){var a=[];i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.sort?!1===(a=o.persistence.load("sort"))&&i.initialSort&&(a=i.initialSort):i.initialSort&&(a=i.initialSort),o.sort.setSort(a)}if((i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.filter||i.initialFilter)&&this.modExists("filter",!0)){var r=[];i.persistence&&this.modExists("persistence",!0)&&o.persistence.config.filter?!1===(r=o.persistence.load("filter"))&&i.initialFilter&&(r=i.initialFilter):i.initialFilter&&(r=i.initialFilter),o.filter.setFilter(r)}i.initialHeaderFilter&&this.modExists("filter",!0)&&i.initialHeaderFilter.forEach(function(e){var i=t.columnManager.findColumn(e.field);if(!i)return console.warn("Column Filter Error - No matching column found:",e.field),!1;o.filter.setHeaderFilterValue(i,e.value)}),this.modExists("ajax")&&o.ajax.initialize(),i.pagination&&this.modExists("page",!0)&&o.page.initialize(),i.groupBy&&this.modExists("groupRows",!0)&&o.groupRows.initialize(),this.modExists("keybindings")&&o.keybindings.initialize(),this.modExists("selectRow")&&o.selectRow.clearSelectionData(!0),i.autoResize&&this.modExists("resizeTable")&&o.resizeTable.initialize(),this.modExists("clipboard")&&o.clipboard.initialize(),i.printAsHtml&&this.modExists("print")&&o.print.initialize(),i.tableBuilt.call(this)},Tabulator.prototype._loadInitialData=function(){var t=this;if(t.options.pagination&&t.modExists("page"))if(t.modules.page.reset(!0,!0),"local"==t.options.pagination){if(t.options.data.length)t.rowManager.setData(t.options.data,!1,!0);else{if((t.options.ajaxURL||t.options.ajaxURLGenerator)&&t.modExists("ajax"))return void t.modules.ajax.loadData(!1,!0).then(function(){}).catch(function(){t.options.paginationInitialPage&&t.modules.page.setPage(t.options.paginationInitialPage)});t.rowManager.setData(t.options.data,!1,!0)}t.options.paginationInitialPage&&t.modules.page.setPage(t.options.paginationInitialPage)}else t.options.ajaxURL?t.modules.page.setPage(t.options.paginationInitialPage).then(function(){}).catch(function(){}):t.rowManager.setData([],!1,!0);else t.options.data.length?t.rowManager.setData(t.options.data):(t.options.ajaxURL||t.options.ajaxURLGenerator)&&t.modExists("ajax")?t.modules.ajax.loadData(!1,!0).then(function(){}).catch(function(){}):t.rowManager.setData(t.options.data,!1,!0)},Tabulator.prototype.destroy=function(){var t=this.element;for(Tabulator.prototype.comms.deregister(this),this.options.reactiveData&&this.modExists("reactiveData",!0)&&this.modules.reactiveData.unwatchData(),this.rowManager.rows.forEach(function(t){t.wipe()}),this.rowManager.rows=[],this.rowManager.activeRows=[],this.rowManager.displayRows=[],this.options.autoResize&&this.modExists("resizeTable")&&this.modules.resizeTable.clearBindings(),this.modExists("keybindings")&&this.modules.keybindings.clearBindings();t.firstChild;)t.removeChild(t.firstChild);t.classList.remove("tabulator")},Tabulator.prototype._detectBrowser=function(){var t=navigator.userAgent||navigator.vendor||window.opera;t.indexOf("Trident")>-1?(this.browser="ie",this.browserSlow=!0):t.indexOf("Edge")>-1?(this.browser="edge",this.browserSlow=!0):t.indexOf("Firefox")>-1?(this.browser="firefox",this.browserSlow=!1):(this.browser="other",this.browserSlow=!1),this.browserMobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4))},Tabulator.prototype.blockRedraw=function(){return this.rowManager.blockRedraw()},Tabulator.prototype.restoreRedraw=function(){return this.rowManager.restoreRedraw()},Tabulator.prototype.setDataFromLocalFile=function(t){var e=this;return new Promise(function(o,i){var n=document.createElement("input");n.type="file",n.accept=t||".json,application/json",n.addEventListener("change",function(t){var l,s=n.files[0],a=new FileReader;a.readAsText(s),a.onload=function(t){try{l=JSON.parse(a.result)}catch(t){return console.warn("File Load Error - File contents is invalid JSON",t),void i(t)}e.setData(l).then(function(t){o(t)}).catch(function(t){o(t)})},a.onerror=function(t){console.warn("File Load Error - Unable to read file"),i()}}),n.click()})},Tabulator.prototype.setData=function(t,e,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(t,e,o,!1,!0)},Tabulator.prototype._setData=function(t,e,o,i,n){var l=this;return"string"!=typeof t?t?l.rowManager.setData(t,i,n):l.modExists("ajax")&&(l.modules.ajax.getUrl||l.options.ajaxURLGenerator)?"remote"==l.options.pagination&&l.modExists("page",!0)?(l.modules.page.reset(!0,!0),l.modules.page.setPage(1)):l.modules.ajax.loadData(i,n):l.rowManager.setData([],i,n):0==t.indexOf("{")||0==t.indexOf("[")?l.rowManager.setData(JSON.parse(t),i,n):l.modExists("ajax",!0)?(e&&l.modules.ajax.setParams(e),o&&l.modules.ajax.setConfig(o),l.modules.ajax.setUrl(t),"remote"==l.options.pagination&&l.modExists("page",!0)?(l.modules.page.reset(!0,!0),l.modules.page.setPage(1)):l.modules.ajax.loadData(i,n)):void 0},Tabulator.prototype.clearData=function(){this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this.rowManager.clearData()},Tabulator.prototype.getData=function(t){return!0===t&&(console.warn("passing a boolean to the getData function is deprecated, you should now pass the string 'active'"),t="active"),this.rowManager.getData(t)},Tabulator.prototype.getDataCount=function(t){return!0===t&&(console.warn("passing a boolean to the getDataCount function is deprecated, you should now pass the string 'active'"),t="active"),this.rowManager.getDataCount(t)},Tabulator.prototype.searchRows=function(t,e,o){if(this.modExists("filter",!0))return this.modules.filter.search("rows",t,e,o)},Tabulator.prototype.searchData=function(t,e,o){if(this.modExists("filter",!0))return this.modules.filter.search("data",t,e,o)},Tabulator.prototype.getHtml=function(t,e,o){if(this.modExists("export",!0))return this.modules.export.getHtml(t,e,o)},Tabulator.prototype.print=function(t,e,o){if(this.modExists("print",!0))return this.modules.print.printFullscreen(t,e,o)},Tabulator.prototype.getAjaxUrl=function(){if(this.modExists("ajax",!0))return this.modules.ajax.getUrl()},Tabulator.prototype.replaceData=function(t,e,o){return this.modExists("ajax")&&this.modules.ajax.blockActiveRequest(),this._setData(t,e,o,!0)},Tabulator.prototype.updateData=function(t){var e=this,o=this,i=0;return new Promise(function(n,l){e.modExists("ajax")&&e.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?t.forEach(function(t){var e=o.rowManager.findRow(t[o.options.index]);e&&(i++,e.updateData(t).then(function(){--i||n()}))}):(console.warn("Update Error - No data provided"),l("Update Error - No data provided"))})},Tabulator.prototype.addData=function(t,e,o){var i=this;return new Promise(function(n,l){i.modExists("ajax")&&i.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?i.rowManager.addRows(t,e,o).then(function(t){var e=[];t.forEach(function(t){e.push(t.getComponent())}),n(e)}):(console.warn("Update Error - No data provided"),l("Update Error - No data provided"))})},Tabulator.prototype.updateOrAddData=function(t){var e=this,o=this,i=[],n=0;return new Promise(function(l,s){e.modExists("ajax")&&e.modules.ajax.blockActiveRequest(),"string"==typeof t&&(t=JSON.parse(t)),t?t.forEach(function(t){var e=o.rowManager.findRow(t[o.options.index]);n++,e?e.updateData(t).then(function(){n--,i.push(e.getComponent()),n||l(i)}):o.rowManager.addRows(t).then(function(t){n--,i.push(t[0].getComponent()),n||l(i)})}):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))})},Tabulator.prototype.getRow=function(t){var e=this.rowManager.findRow(t);return e?e.getComponent():(console.warn("Find Error - No matching row found:",t),!1)},Tabulator.prototype.getRowFromPosition=function(t,e){var o=this.rowManager.getRowFromPosition(t,e);return o?o.getComponent():(console.warn("Find Error - No matching row found:",t),!1)},Tabulator.prototype.deleteRow=function(t){var e=this;return new Promise(function(o,i){function n(){++s==t.length&&a&&(l.rowManager.reRenderInPosition(),o())}var l=e,s=0,a=0,r=[];Array.isArray(t)||(t=[t]),t.forEach(function(t){var o=e.rowManager.findRow(t,!0);o?r.push(o):(console.warn("Delete Error - No matching row found:",t),i("Delete Error - No matching row found"),n())}),r.sort(function(t,o){return e.rowManager.rows.indexOf(t)>e.rowManager.rows.indexOf(o)?1:-1}),r.forEach(function(t){t.delete().then(function(){a++,n()}).catch(function(t){n(),i(t)})})})},Tabulator.prototype.addRow=function(t,e,o){var i=this;return new Promise(function(n,l){"string"==typeof t&&(t=JSON.parse(t)),i.rowManager.addRows(t,e,o).then(function(t){i.modExists("columnCalcs")&&i.modules.columnCalcs.recalc(i.rowManager.activeRows),n(t[0].getComponent())})})},Tabulator.prototype.updateOrAddRow=function(t,e){var o=this;return new Promise(function(i,n){var l=o.rowManager.findRow(t);"string"==typeof e&&(e=JSON.parse(e)),l?l.updateData(e).then(function(){o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(o.rowManager.activeRows),i(l.getComponent())}).catch(function(t){n(t)}):l=o.rowManager.addRows(e).then(function(t){o.modExists("columnCalcs")&&o.modules.columnCalcs.recalc(o.rowManager.activeRows),i(t[0].getComponent())}).catch(function(t){n(t)})})},Tabulator.prototype.updateRow=function(t,e){var o=this;return new Promise(function(i,n){var l=o.rowManager.findRow(t);"string"==typeof e&&(e=JSON.parse(e)),l?l.updateData(e).then(function(){i(l.getComponent())}).catch(function(t){n(t)}):(console.warn("Update Error - No matching row found:",t),
+n("Update Error - No matching row found"))})},Tabulator.prototype.scrollToRow=function(t,e,o){var i=this;return new Promise(function(n,l){var s=i.rowManager.findRow(t);s?i.rowManager.scrollToRow(s,e,o).then(function(){n()}).catch(function(t){l(t)}):(console.warn("Scroll Error - No matching row found:",t),l("Scroll Error - No matching row found"))})},Tabulator.prototype.moveRow=function(t,e,o){var i=this.rowManager.findRow(t);i?i.moveToRow(e,o):console.warn("Move Error - No matching row found:",t)},Tabulator.prototype.getRows=function(t){return!0===t&&(console.warn("passing a boolean to the getRows function is deprecated, you should now pass the string 'active'"),t="active"),this.rowManager.getComponents(t)},Tabulator.prototype.getRowPosition=function(t,e){var o=this.rowManager.findRow(t);return o?this.rowManager.getRowPosition(o,e):(console.warn("Position Error - No matching row found:",t),!1)},Tabulator.prototype.copyToClipboard=function(t){this.modExists("clipboard",!0)&&this.modules.clipboard.copy(t)},Tabulator.prototype.setColumns=function(t){this.columnManager.setColumns(t)},Tabulator.prototype.getColumns=function(t){return this.columnManager.getComponents(t)},Tabulator.prototype.getColumn=function(t){var e=this.columnManager.findColumn(t);return e?e.getComponent():(console.warn("Find Error - No matching column found:",t),!1)},Tabulator.prototype.getColumnDefinitions=function(){return this.columnManager.getDefinitionTree()},Tabulator.prototype.getColumnLayout=function(){if(this.modExists("persistence",!0))return this.modules.persistence.parseColumns(this.columnManager.getColumns())},Tabulator.prototype.setColumnLayout=function(t){return!!this.modExists("persistence",!0)&&(this.columnManager.setColumns(this.modules.persistence.mergeDefinition(this.options.columns,t)),!0)},Tabulator.prototype.showColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Show Error - No matching column found:",t),!1;e.show(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},Tabulator.prototype.hideColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Hide Error - No matching column found:",t),!1;e.hide(),this.options.responsiveLayout&&this.modExists("responsiveLayout",!0)&&this.modules.responsiveLayout.update()},Tabulator.prototype.toggleColumn=function(t){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Visibility Toggle Error - No matching column found:",t),!1;e.visible?e.hide():e.show()},Tabulator.prototype.addColumn=function(t,e,o){var i=this;return new Promise(function(n,l){var s=i.columnManager.findColumn(o);i.columnManager.addColumn(t,e,s).then(function(t){n(t.getComponent())}).catch(function(t){l(t)})})},Tabulator.prototype.deleteColumn=function(t){var e=this;return new Promise(function(o,i){var n=e.columnManager.findColumn(t);n?n.delete().then(function(){o()}).catch(function(t){i(t)}):(console.warn("Column Delete Error - No matching column found:",t),i())})},Tabulator.prototype.updateColumnDefinition=function(t,e){var o=this;return new Promise(function(i,n){var l=o.columnManager.findColumn(t);l?l.updateDefinition(e).then(function(t){i(t)}).catch(function(t){n(t)}):(console.warn("Column Update Error - No matching column found:",t),n())})},Tabulator.prototype.moveColumn=function(t,e,o){var i=this.columnManager.findColumn(t),n=this.columnManager.findColumn(e);i?n?this.columnManager.moveColumn(i,n,o):console.warn("Move Error - No matching column found:",n):console.warn("Move Error - No matching column found:",t)},Tabulator.prototype.scrollToColumn=function(t,e,o){var i=this;return new Promise(function(n,l){var s=i.columnManager.findColumn(t);s?i.columnManager.scrollToColumn(s,e,o).then(function(){n()}).catch(function(t){l(t)}):(console.warn("Scroll Error - No matching column found:",t),l("Scroll Error - No matching column found"))})},Tabulator.prototype.setLocale=function(t){this.modules.localize.setLocale(t)},Tabulator.prototype.getLocale=function(){return this.modules.localize.getLocale()},Tabulator.prototype.getLang=function(t){return this.modules.localize.getLang(t)},Tabulator.prototype.redraw=function(t){this.columnManager.redraw(t),this.rowManager.redraw(t)},Tabulator.prototype.setHeight=function(t){"classic"!==this.rowManager.renderMode?(this.options.height=isNaN(t)?t:t+"px",this.element.style.height=this.options.height,this.rowManager.setRenderMode(),this.rowManager.redraw()):console.warn("setHeight function is not available in classic render mode")},Tabulator.prototype.setSort=function(t,e){this.modExists("sort",!0)&&(this.modules.sort.setSort(t,e),this.rowManager.sorterRefresh())},Tabulator.prototype.getSorters=function(){if(this.modExists("sort",!0))return this.modules.sort.getSort()},Tabulator.prototype.clearSort=function(){this.modExists("sort",!0)&&(this.modules.sort.clear(),this.rowManager.sorterRefresh())},Tabulator.prototype.setFilter=function(t,e,o,i){this.modExists("filter",!0)&&(this.modules.filter.setFilter(t,e,o,i),this.rowManager.filterRefresh())},Tabulator.prototype.refreshFilter=function(){this.modExists("filter",!0)&&this.rowManager.filterRefresh()},Tabulator.prototype.addFilter=function(t,e,o,i){this.modExists("filter",!0)&&(this.modules.filter.addFilter(t,e,o,i),this.rowManager.filterRefresh())},Tabulator.prototype.getFilters=function(t){if(this.modExists("filter",!0))return this.modules.filter.getFilters(t)},Tabulator.prototype.setHeaderFilterFocus=function(t){if(this.modExists("filter",!0)){var e=this.columnManager.findColumn(t);if(!e)return console.warn("Column Filter Focus Error - No matching column found:",t),!1;this.modules.filter.setHeaderFilterFocus(e)}},Tabulator.prototype.getHeaderFilterValue=function(t){if(this.modExists("filter",!0)){var e=this.columnManager.findColumn(t);if(e)return this.modules.filter.getHeaderFilterValue(e);console.warn("Column Filter Error - No matching column found:",t)}},Tabulator.prototype.setHeaderFilterValue=function(t,e){if(this.modExists("filter",!0)){var o=this.columnManager.findColumn(t);if(!o)return console.warn("Column Filter Error - No matching column found:",t),!1;this.modules.filter.setHeaderFilterValue(o,e)}},Tabulator.prototype.getHeaderFilters=function(){if(this.modExists("filter",!0))return this.modules.filter.getHeaderFilters()},Tabulator.prototype.removeFilter=function(t,e,o){this.modExists("filter",!0)&&(this.modules.filter.removeFilter(t,e,o),this.rowManager.filterRefresh())},Tabulator.prototype.clearFilter=function(t){this.modExists("filter",!0)&&(this.modules.filter.clearFilter(t),this.rowManager.filterRefresh())},Tabulator.prototype.clearHeaderFilter=function(){this.modExists("filter",!0)&&(this.modules.filter.clearHeaderFilter(),this.rowManager.filterRefresh())},Tabulator.prototype.selectRow=function(t){this.modExists("selectRow",!0)&&(!0===t&&(console.warn("passing a boolean to the selectRowselectRow function is deprecated, you should now pass the string 'active'"),t="active"),this.modules.selectRow.selectRows(t))},Tabulator.prototype.deselectRow=function(t){this.modExists("selectRow",!0)&&this.modules.selectRow.deselectRows(t)},Tabulator.prototype.toggleSelectRow=function(t){this.modExists("selectRow",!0)&&this.modules.selectRow.toggleRow(t)},Tabulator.prototype.getSelectedRows=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedRows()},Tabulator.prototype.getSelectedData=function(){if(this.modExists("selectRow",!0))return this.modules.selectRow.getSelectedData()},Tabulator.prototype.getInvalidCells=function(){if(this.modExists("validate",!0))return this.modules.validate.getInvalidCells()},Tabulator.prototype.clearCellValidation=function(t){var e=this;this.modExists("validate",!0)&&(t||(t=this.modules.validate.getInvalidCells()),Array.isArray(t)||(t=[t]),t.forEach(function(t){e.modules.validate.clearValidation(t._getSelf())}))},Tabulator.prototype.validate=function(t){var e=[];return this.rowManager.rows.forEach(function(t){var o=t.validate();!0!==o&&(e=e.concat(o))}),!e.length||e},Tabulator.prototype.setMaxPage=function(t){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setMaxPage(t)},Tabulator.prototype.setPage=function(t){return this.options.pagination&&this.modExists("page")?this.modules.page.setPage(t):new Promise(function(t,e){e()})},Tabulator.prototype.setPageToRow=function(t){var e=this;return new Promise(function(o,i){e.options.pagination&&e.modExists("page")?(t=e.rowManager.findRow(t),t?e.modules.page.setPageToRow(t).then(function(){o()}).catch(function(){i()}):i()):i()})},Tabulator.prototype.setPageSize=function(t){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.setPageSize(t),this.modules.page.setPage(1).then(function(){}).catch(function(){})},Tabulator.prototype.getPageSize=function(){if(this.options.pagination&&this.modExists("page",!0))return this.modules.page.getPageSize()},Tabulator.prototype.previousPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.previousPage()},Tabulator.prototype.nextPage=function(){if(!this.options.pagination||!this.modExists("page"))return!1;this.modules.page.nextPage()},Tabulator.prototype.getPage=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPage()},Tabulator.prototype.getPageMax=function(){return!(!this.options.pagination||!this.modExists("page"))&&this.modules.page.getPageMax()},Tabulator.prototype.setGroupBy=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupBy=t,this.modules.groupRows.initialize(),this.rowManager.refreshActiveData("display"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")},Tabulator.prototype.setGroupValues=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupValues=t,this.modules.groupRows.initialize(),this.rowManager.refreshActiveData("display"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")},Tabulator.prototype.setGroupStartOpen=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupStartOpen=t,this.modules.groupRows.initialize(),this.options.groupBy?(this.rowManager.refreshActiveData("group"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")):console.warn("Grouping Update - cant refresh view, no groups have been set")},Tabulator.prototype.setGroupHeader=function(t){if(!this.modExists("groupRows",!0))return!1;this.options.groupHeader=t,this.modules.groupRows.initialize(),this.options.groupBy?(this.rowManager.refreshActiveData("group"),this.options.persistence&&this.modExists("persistence",!0)&&this.modules.persistence.config.group&&this.modules.persistence.save("group")):console.warn("Grouping Update - cant refresh view, no groups have been set")},Tabulator.prototype.getGroups=function(t){return!!this.modExists("groupRows",!0)&&this.modules.groupRows.getGroups(!0)},Tabulator.prototype.getGroupedData=function(){if(this.modExists("groupRows",!0))return this.options.groupBy?this.modules.groupRows.getGroupedData():this.getData()},Tabulator.prototype.getEditedCells=function(){if(this.modExists("edit",!0))return this.modules.edit.getEditedCells()},Tabulator.prototype.clearCellEdited=function(t){var e=this;this.modExists("edit",!0)&&(t||(t=this.modules.edit.getEditedCells()),Array.isArray(t)||(t=[t]),t.forEach(function(t){e.modules.edit.clearEdited(t._getSelf())}))},Tabulator.prototype.getCalcResults=function(){return!!this.modExists("columnCalcs",!0)&&this.modules.columnCalcs.getResults()},Tabulator.prototype.recalc=function(){this.modExists("columnCalcs",!0)&&this.modules.columnCalcs.recalcAll(this.rowManager.activeRows)},Tabulator.prototype.navigatePrev=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&t.nav().prev()},Tabulator.prototype.navigateNext=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&t.nav().next()},Tabulator.prototype.navigateLeft=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().left())},Tabulator.prototype.navigateRight=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().right())},Tabulator.prototype.navigateUp=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().up())},Tabulator.prototype.navigateDown=function(){var t=!1;return!(!this.modExists("edit",!0)||!(t=this.modules.edit.currentCell))&&(e.preventDefault(),t.nav().down())},Tabulator.prototype.undo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.undo()},Tabulator.prototype.redo=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.redo()},Tabulator.prototype.getHistoryUndoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryUndoSize()},Tabulator.prototype.getHistoryRedoSize=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.getHistoryRedoSize()},Tabulator.prototype.clearHistory=function(){return!(!this.options.history||!this.modExists("history",!0))&&this.modules.history.clear()},Tabulator.prototype.download=function(t,e,o,i){this.modExists("download",!0)&&this.modules.download.download(t,e,o,i)},Tabulator.prototype.downloadToTab=function(t,e,o,i){this.modExists("download",!0)&&this.modules.download.download(t,e,o,i,!0)},Tabulator.prototype.tableComms=function(t,e,o,i){this.modules.comms.receive(t,e,o,i)},Tabulator.prototype.moduleBindings={},Tabulator.prototype.extendModule=function(t,e,o){if(Tabulator.prototype.moduleBindings[t]){var i=Tabulator.prototype.moduleBindings[t].prototype[e];if(i)if("object"==(void 0===o?"undefined":_typeof(o)))for(var n in o)i[n]=o[n];else console.warn("Module Error - Invalid value type, it must be an object");else console.warn("Module Error - property does not exist:",e)}else console.warn("Module Error - module does not exist:",t)},Tabulator.prototype.registerModule=function(t,e){Tabulator.prototype.moduleBindings[t]=e},Tabulator.prototype.bindModules=function(){this.modules={};for(var t in Tabulator.prototype.moduleBindings)this.modules[t]=new Tabulator.prototype.moduleBindings[t](this)},Tabulator.prototype.modExists=function(t,e){return!!this.modules[t]||(e&&console.error("Tabulator Module Not Installed: "+t),!1)},Tabulator.prototype.helpers={elVisible:function(t){return!(t.offsetWidth<=0&&t.offsetHeight<=0)},elOffset:function(t){var e=t.getBoundingClientRect();return{top:e.top+window.pageYOffset-document.documentElement.clientTop,left:e.left+window.pageXOffset-document.documentElement.clientLeft}},deepClone:function(t){var e=Object.assign(Array.isArray(t)?[]:{},t);for(var o in t)null!=t[o]&&"object"===_typeof(t[o])&&(t[o]instanceof Date?e[o]=new Date(t[o]):e[o]=this.deepClone(t[o]));return e}},Tabulator.prototype.comms={tables:[],register:function(t){Tabulator.prototype.comms.tables.push(t)},deregister:function(t){var e=Tabulator.prototype.comms.tables.indexOf(t);e>-1&&Tabulator.prototype.comms.tables.splice(e,1)},lookupTable:function(t,e){var o,i,n=[];if("string"==typeof t){if(o=document.querySelectorAll(t),o.length)for(var l=0;l<o.length;l++)(i=Tabulator.prototype.comms.matchElement(o[l]))&&n.push(i)}else"undefined"!=typeof HTMLElement&&t instanceof HTMLElement||t instanceof Tabulator?(i=Tabulator.prototype.comms.matchElement(t))&&n.push(i):Array.isArray(t)?t.forEach(function(t){n=n.concat(Tabulator.prototype.comms.lookupTable(t))}):e||console.warn("Table Connection Error - Invalid Selector",t);return n},matchElement:function(t){return Tabulator.prototype.comms.tables.find(function(e){return t instanceof Tabulator?e===t:e.element===t})}},Tabulator.prototype.findTable=function(t){var e=Tabulator.prototype.comms.lookupTable(t,!0);return!(Array.isArray(e)&&!e.length)&&e};var Layout=function(t){this.table=t,this.mode=null};Layout.prototype.initialize=function(t){this.modes[t]?this.mode=t:(console.warn("Layout Error - invalid mode set, defaulting to 'fitData' : "+t),this.mode="fitData"),this.table.element.setAttribute("tabulator-layout",this.mode)},Layout.prototype.getMode=function(){return this.mode},Layout.prototype.layout=function(){this.modes[this.mode].call(this,this.table.columnManager.columnsByIndex),0===this.mode.indexOf("fitData")&&this.table.options.persistence&&this.table.modExists("persistence",!0)&&this.table.modules.persistence.config.columns&&this.table.modules.persistence.save("columns")},Layout.prototype.modes={fitData:function(t){this.table.options.virtualDomHoz?this.table.vdomHoz.fitDataLayoutOverride():t.forEach(function(t){t.reinitializeWidth()}),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitDataFill:function(t){t.forEach(function(t){t.reinitializeWidth()}),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitDataTable:function(t){t.forEach(function(t){t.reinitializeWidth()}),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitDataStretch:function(t){var e=this,o=0,i=this.table.rowManager.element.clientWidth,n=0,l=!1;t.forEach(function(t,i){t.widthFixed||t.reinitializeWidth(),(e.table.options.responsiveLayout?t.modules.responsive.visible:t.visible)&&(l=t),t.visible&&(o+=t.getWidth())}),l?(n=i-o+l.getWidth(),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&(l.setWidth(0),this.table.modules.responsiveLayout.update()),n>0?l.setWidth(n):l.reinitializeWidth()):this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()},fitColumns:function(t){function e(t){return"string"==typeof t?t.indexOf("%")>-1?n/100*parseInt(t):parseInt(t):t}function o(t,i,n,l){function s(t){return n*(t.column.definition.widthGrow||1)}function r(t){return e(t.width)-n*(t.column.definition.widthShrink||0)}var u=[],h=0,c=0,d=0,p=a,m=0,f=0,g=[];return t.forEach(function(t,e){var o=l?r(t):s(t);t.column.minWidth>=o?u.push(t):t.column.maxWidth&&t.column.maxWidth<o?(t.width=t.column.maxWidth,i-=t.column.maxWidth,(p-=l?t.column.definition.widthShrink||1:t.column.definition.widthGrow||1)&&(n=Math.floor(i/p))):(g.push(t),f+=l?t.column.definition.widthShrink||1:t.column.definition.widthGrow||1)}),u.length?(u.forEach(function(t){h+=l?t.width-t.column.minWidth:t.column.minWidth,t.width=t.column.minWidth}),c=i-h,d=f?Math.floor(c/f):c,m=c-d*f,m+=o(g,c,d,l)):(m=f?i-Math.floor(i/f)*f:i,g.forEach(function(t){t.width=l?r(t):s(t)})),m}var i=this,n=i.table.element.clientWidth,l=0,s=0,a=0,r=0,u=[],h=[],c=0,d=0,p=0;this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight&&(n-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),t.forEach(function(t){var o,i,n;t.visible&&(o=t.definition.width,i=parseInt(t.minWidth),o?(n=e(o),l+=n>i?n:i,t.definition.widthShrink&&(h.push({column:t,width:n>i?n:i}),c+=t.definition.widthShrink)):(u.push({column:t,width:0}),a+=t.definition.widthGrow||1))}),s=n-l,r=Math.floor(s/a);var p=o(u,s,r,!1);u.length&&p>0&&(u[u.length-1].width+=+p),u.forEach(function(t){s-=t.width}),d=Math.abs(p)+s,d>0&&c&&(p=o(h,d,Math.floor(d/c),!0)),h.length&&(h[h.length-1].width-=p),u.forEach(function(t){t.column.setWidth(t.width)}),h.forEach(function(t){t.column.setWidth(t.width)})}},Tabulator.prototype.registerModule("layout",Layout);var Localize=function(t){this.table=t,this.locale="default",this.lang=!1,this.bindings={},this.langList={}};Localize.prototype.initialize=function(){this.langList=Tabulator.prototype.helpers.deepClone(this.langs)},Localize.prototype.setHeaderFilterPlaceholder=function(t){this.langList.default.headerFilters.default=t},Localize.prototype.setHeaderFilterColumnPlaceholder=function(t,e){this.langList.default.headerFilters.columns[t]=e,this.lang&&!this.lang.headerFilters.columns[t]&&(this.lang.headerFilters.columns[t]=e)},Localize.prototype.installLang=function(t,e){this.langList[t]?this._setLangProp(this.langList[t],e):this.langList[t]=e},Localize.prototype._setLangProp=function(t,e){for(var o in e)t[o]&&"object"==_typeof(t[o])?this._setLangProp(t[o],e[o]):t[o]=e[o]},Localize.prototype.setLocale=function(t){function e(t,o){for(var i in t)"object"==_typeof(t[i])?(o[i]||(o[i]={}),e(t[i],o[i])):o[i]=t[i]}var o=this;if(t=t||"default",!0===t&&navigator.language&&(t=navigator.language.toLowerCase()),t&&!o.langList[t]){var i=t.split("-")[0];o.langList[i]?(console.warn("Localization Error - Exact matching locale not found, using closest match: ",t,i),t=i):(console.warn("Localization Error - Matching locale not found, using default: ",t),t="default")}o.locale=t,o.lang=Tabulator.prototype.helpers.deepClone(o.langList.default||{}),"default"!=t&&e(o.langList[t],o.lang),o.table.options.localized.call(o.table,o.locale,o.lang),o._executeBindings()},Localize.prototype.getLocale=function(t){return self.locale},Localize.prototype.getLang=function(t){return t?this.langList[t]:this.lang},Localize.prototype.getText=function(t,e){var t=e?t+"|"+e:t,o=t.split("|");return this._getLangElement(o,this.locale)||""},Localize.prototype._getLangElement=function(t,e){var o=this,i=o.lang;return t.forEach(function(t){var e;i&&(e=i[t],i=void 0!==e&&e)}),i},Localize.prototype.bind=function(t,e){this.bindings[t]||(this.bindings[t]=[]),this.bindings[t].push(e),e(this.getText(t),this.lang)},Localize.prototype._executeBindings=function(){var t=this;for(var e in t.bindings)!function(e){t.bindings[e].forEach(function(o){o(t.getText(e),t.lang)})}(e)},Localize.prototype.langs={default:{groups:{item:"item",items:"items"},columns:{},ajax:{loading:"Loading",error:"Error"},pagination:{page_size:"Page Size",page_title:"Show Page",first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page",all:"All"},headerFilters:{default:"filter column...",columns:{}}}},Tabulator.prototype.registerModule("localize",Localize);var Comms=function(t){this.table=t};Comms.prototype.getConnections=function(t){var e,o=this,i=[];return e=Tabulator.prototype.comms.lookupTable(t),e.forEach(function(t){o.table!==t&&i.push(t)}),i},Comms.prototype.send=function(t,e,o,i){var n=this,l=this.getConnections(t);l.forEach(function(t){t.tableComms(n.table.element,e,o,i)}),!l.length&&t&&console.warn("Table Connection Error - No tables matching selector found",t)},Comms.prototype.receive=function(t,e,o,i){if(this.table.modExists(e))return this.table.modules[e].commsReceived(t,o,i);console.warn("Inter-table Comms Error - no such module:",e)},Tabulator.prototype.registerModule("comms",Comms);
\ No newline at end of file
use Data::Dumper;
my $dbfile = "C:/Users/ksaff/AppData/Roaming/invoicejournal/dks/dks.sqlite";
-my $outpath = "C:/Users/ksaff/AppData/Roaming/invoicejournal/dks/data/offers";
+my $outfile = "C:/Users/ksaff/AppData/Roaming/invoicejournal/dks/alldocs.json";
+my $alldocs = ();
my $dbh = DBI->connect('DBI:SQLite:dbname='.$dbfile,"","",{PrintError=>1,RaiseError=>1,AutoCommit=>1}) or print "dbquery Connection Error!".$!."\n";
-my $sql = "select * from offers;";
+my $sql = "select * from invoices;";
my $res = &dbquerysorted($sql);
+
#print Dumper($res);
foreach my $i (keys(%{$res})){
#print Dumper($res->{$i}->{id});
- my $sqls = "SELECT sum(bk.netamount) AS netamount,sum(bk.taxamount) AS vatamount,sum(bk.netamount + bk.taxamount) AS grossamount FROM offers inv JOIN offerdetails bk ON (inv.id = bk.id_offers) WHERE inv.id='".$res->{$i}->{id}."' GROUP BY inv.id;";
+ my $sqls = "SELECT sum(bk.netamount) AS netamount,sum(bk.taxamount) AS vatamount,sum(bk.netamount + bk.taxamount) AS grossamount FROM invoices inv JOIN bookings bk ON (inv.id = bk.id_invoices) WHERE inv.id='".$res->{$i}->{id}."' GROUP BY inv.id;";
my $sums = &dbquerysorted($sqls);
#print Dumper($sums);
foreach my $x (keys(%{$sums->{0}})){
- print Dumper($x);
+ #print Dumper($x);
$res->{$i}->{$x} = $sums->{0}->{$x};
}
- my $sqlx = "select * from offerdetails where id_offers='".$res->{$i}->{id}."';";
+
+ my $sqlx = "select * from bookings where id_invoices='".$res->{$i}->{id}."';";
#print $sqlx."\n";
- my $sqlr = "select reportname from newreports where id='".$res->{$i}->{id_template}."';";
- my $rep = &dbquerysorted($sqlr);
- $res->{report} = $rep->{0}->{reportname};
+ #my $sqlr = "select reportname from newreports where id='".$res->{$i}->{id_template}."';";
+ #my $rep = &dbquerysorted($sqlr);
+ #$res->{report} = $rep->{0}->{reportname};
#print $sqlx."\n";
my $res2 = &dbqueryarray($sqlx);
-
+ $res->{$i}->{type} = "invoice";
$res->{$i}->{bookings}= $res2;
- my $fileid = $res->{$i}->{reference};
- $fileid =~ s/^\s+//;
- $fileid =~ s/\s+$//;
- $fileid = $res->{$i}->{shortname}.'-'.$res->{$i}->{reference};
- &write_jsonfile($fileid,$res->{$i});
+
+ # my $fileid = $res->{$i}->{reference};
+ # $fileid =~ s/^\s+//;
+ # $fileid =~ s/\s+$//;
+ # $fileid = $res->{$i}->{shortname}.'-'.$res->{$i}->{reference};
+ #&write_jsonfile($fileid,$res->{$i});
+ push (@{$alldocs},$res->{$i});
+}
+
+$sql = "select * from addresses;";
+$res = &dbquerysorted($sql);
+foreach my $i (keys(%{$res})){
+ $res->{$i}->{type} = "address";
+ push (@{$alldocs},$res->{$i});
+}
+
+$sql = "select * from products;";
+$res = &dbquerysorted($sql);
+foreach my $i (keys(%{$res})){
+ $res->{$i}->{type} = "product";
+ push (@{$alldocs},$res->{$i});
}
+my $json = JSON::PP::encode_json($alldocs);
+ $json = decode("utf-8",$json);
+ print Dumper($json);
+ open(JS,">".$outfile);
+ print JS $json;
+ close(JS);
$dbh->disconnect();
my $id = shift;
my $jsondata = shift;
- if (! -d $outpath){
- mkdir($outpath);
- }
- my $json = JSON::PP::encode_json($jsondata);
- $json = decode("utf-8",$json);
- open(JS,">".$outpath.'/'.$id.'.json');
- print JS $json;
- close(JS);
+ # my $outpath = shift;
+ # if (! -d $outpath){
+ # mkdir($outpath);
+ # }
+
}
sub dbquerysorted(){
--- /dev/null
+#!/usr/bin/perl -w
+##############################################################################
+## sendEmail
+## Written by: Brandon Zehm <caspian@dotconf.net>
+##
+## License:
+## sendEmail (hereafter referred to as "program") is free software;
+## you can redistribute it and/or modify it under the terms of the GNU General
+## Public License as published by the Free Software Foundation; either version
+## 2 of the License, or (at your option) any later version.
+## When redistributing modified versions of this source code it is recommended
+## that that this disclaimer and the above coder's names are included in the
+## modified code.
+##
+## Disclaimer:
+## This program is provided with no warranty of any kind, either expressed or
+## implied. It is the responsibility of the user (you) to fully research and
+## comprehend the usage of this program. As with any tool, it can be misused,
+## either intentionally (you're a vandal) or unintentionally (you're a moron).
+## THE AUTHOR(S) IS(ARE) NOT RESPONSIBLE FOR ANYTHING YOU DO WITH THIS PROGRAM
+## or anything that happens because of your use (or misuse) of this program,
+## including but not limited to anything you, your lawyers, or anyone else
+## can dream up. And now, a relevant quote directly from the GPL:
+##
+## NO WARRANTY
+##
+## 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+## FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+## OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+## PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+## OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+## TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+## PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+## REPAIR OR CORRECTION.
+##
+##############################################################################
+use strict;
+use IO::Socket;
+
+
+########################
+## Global Variables ##
+########################
+
+my %conf = (
+ ## General
+ "programName" => $0, ## The name of this program
+ "version" => '1.56', ## The version of this program
+ "authorName" => 'Brandon Zehm', ## Author's Name
+ "authorEmail" => 'caspian@dotconf.net', ## Author's Email Address
+ "timezone" => '+0000', ## We always use +0000 for the time zone
+ "hostname" => 'changeme', ## Used in printmsg() for all output (is updated later in the script).
+ "debug" => 0, ## Default debug level
+ "error" => '', ## Error messages will often be stored here
+
+ ## Logging
+ "stdout" => 1,
+ "logging" => 0, ## If this is true the printmsg function prints to the log file
+ "logFile" => '', ## If this is specified (form the command line via -l) this file will be used for logging.
+
+ ## Network
+ "server" => 'localhost', ## Default SMTP server
+ "port" => 25, ## Default port
+ "bindaddr" => '', ## Default local bind address
+ "alarm" => '', ## Default timeout for connects and reads, this gets set from $opt{'timeout'}
+ "tls_client" => 0, ## If TLS is supported by the client (us)
+ "tls_server" => 0, ## If TLS is supported by the remote SMTP server
+
+ ## Email
+ "delimiter" => "----MIME delimiter for sendEmail-" ## MIME Delimiter
+ . rand(1000000), ## Add some randomness to the delimiter
+ "Message-ID" => rand(1000000) . "-sendEmail", ## Message-ID for email header
+
+);
+
+
+## This hash stores the options passed on the command line via the -o option.
+my %opt = (
+ ## Addressing
+ "reply-to" => '', ## Reply-To field
+
+ ## Message
+ "message-file" => '', ## File to read message body from
+ "message-header" => '', ## Additional email header line(s)
+ "message-format" => 'normal', ## If "raw" is specified the message is sent unmodified
+ "message-charset" => 'iso-8859-1', ## Message character-set
+ "message-content-type" => 'auto', ## auto, text, html or an actual string to put into the content-type header.
+
+ ## Network
+ "timeout" => 60, ## Default timeout for connects and reads, this is copied to $conf{'alarm'} later.
+ "fqdn" => 'changeme', ## FQDN of this machine, used during SMTP communication (is updated later in the script).
+
+ ## eSMTP
+ "username" => '', ## Username used in SMTP Auth
+ "password" => '', ## Password used in SMTP Auth
+ "tls" => 'auto', ## Enable or disable TLS support. Options: auto, yes, no
+
+);
+
+## More variables used later in the program
+my $SERVER;
+my $CRLF = "\015\012";
+my $subject = '';
+my $header = '';
+my $message = '';
+my $from = '';
+my @to = ();
+my @cc = ();
+my @bcc = ();
+my @attachments = ();
+my @attachments_names = ();
+
+## For printing colors to the console
+my ${colorRed} = "\033[31;1m";
+my ${colorGreen} = "\033[32;1m";
+my ${colorCyan} = "\033[36;1m";
+my ${colorWhite} = "\033[37;1m";
+my ${colorNormal} = "\033[m";
+my ${colorBold} = "\033[1m";
+my ${colorNoBold} = "\033[0m";
+
+## Don't use shell escape codes on Windows systems
+if ($^O =~ /win/i) {
+ ${colorRed} = ${colorGreen} = ${colorCyan} = ${colorWhite} = ${colorNormal} = ${colorBold} = ${colorNoBold} = "";
+}
+
+## Load IO::Socket::SSL if it's available
+eval { require IO::Socket::SSL; };
+if ($@) { $conf{'tls_client'} = 0; }
+else { $conf{'tls_client'} = 1; }
+
+
+
+
+
+
+#############################
+## ##
+## FUNCTIONS ##
+## ##
+#############################
+
+
+
+
+
+###############################################################################################
+## Function: initialize ()
+##
+## Does all the script startup jibberish.
+##
+###############################################################################################
+sub initialize {
+
+ ## Set STDOUT to flush immediatly after each print
+ $| = 1;
+
+ ## Intercept signals
+ $SIG{'QUIT'} = sub { quit("EXITING: Received SIG$_[0]", 1); };
+ $SIG{'INT'} = sub { quit("EXITING: Received SIG$_[0]", 1); };
+ $SIG{'KILL'} = sub { quit("EXITING: Received SIG$_[0]", 1); };
+ $SIG{'TERM'} = sub { quit("EXITING: Received SIG$_[0]", 1); };
+
+ ## ALARM and HUP signals are not supported in Win32
+ unless ($^O =~ /win/i) {
+ $SIG{'HUP'} = sub { quit("EXITING: Received SIG$_[0]", 1); };
+ $SIG{'ALRM'} = sub { quit("EXITING: Received SIG$_[0]", 1); };
+ }
+
+ ## Fixup $conf{'programName'}
+ $conf{'programName'} =~ s/(.)*[\/,\\]//;
+ $0 = $conf{'programName'} . " " . join(" ", @ARGV);
+
+ ## Fixup $conf{'hostname'} and $opt{'fqdn'}
+ if ($opt{'fqdn'} eq 'changeme') { $opt{'fqdn'} = get_hostname(1); }
+ if ($conf{'hostname'} eq 'changeme') { $conf{'hostname'} = $opt{'fqdn'}; $conf{'hostname'} =~ s/\..*//; }
+
+ return(1);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+###############################################################################################
+## Function: processCommandLine ()
+##
+## Processes command line storing important data in global vars (usually %conf)
+##
+###############################################################################################
+sub processCommandLine {
+
+
+ ############################
+ ## Process command line ##
+ ############################
+
+ my @ARGS = @ARGV; ## This is so later we can re-parse the command line args later if we need to
+ my $numargv = @ARGS;
+ help() unless ($numargv);
+ my $counter = 0;
+
+ for ($counter = 0; $counter < $numargv; $counter++) {
+
+ if ($ARGS[$counter] =~ /^-h$/i) { ## Help ##
+ help();
+ }
+
+ elsif ($ARGS[$counter] eq "") { ## Ignore null arguments
+ ## Do nothing
+ }
+
+ elsif ($ARGS[$counter] =~ /^--help/) { ## Topical Help ##
+ $counter++;
+ if ($ARGS[$counter] && $ARGS[$counter] !~ /^-/) {
+ helpTopic($ARGS[$counter]);
+ }
+ else {
+ help();
+ }
+ }
+
+ elsif ($ARGS[$counter] =~ /^-o$/i) { ## Options specified with -o ##
+ $counter++;
+ ## Loop through each option passed after the -o
+ while ($ARGS[$counter] && $ARGS[$counter] !~ /^-/) {
+
+ if ($ARGS[$counter] !~ /(\S+)=(\S.*)/) {
+ printmsg("WARNING => Name/Value pair [$ARGS[$counter]] is not properly formatted", 0);
+ printmsg("WARNING => Arguments proceeding -o should be in the form of \"name=value\"", 0);
+ }
+ else {
+ if (exists($opt{$1})) {
+ if ($1 eq 'message-header') {
+ $opt{$1} .= $2 . $CRLF;
+ }
+ else {
+ $opt{$1} = $2;
+ }
+ printmsg("DEBUG => Assigned \$opt{} key/value: $1 => $2", 3);
+ }
+ else {
+ printmsg("WARNING => Name/Value pair [$ARGS[$counter]] will be ignored: unknown key [$1]", 0);
+ printmsg("HINT => Try the --help option to find valid command line arguments", 1);
+ }
+ }
+ $counter++;
+ } $counter--;
+ }
+
+ elsif ($ARGS[$counter] =~ /^-f$/) { ## From ##
+ $counter++;
+ if ($ARGS[$counter] && $ARGS[$counter] !~ /^-/) { $from = $ARGS[$counter]; }
+ else { printmsg("WARNING => The argument after -f was not an email address!", 0); $counter--; }
+ }
+
+ elsif ($ARGS[$counter] =~ /^-t$/) { ## To ##
+ $counter++;
+ while ($ARGS[$counter] && ($ARGS[$counter] !~ /^-/)) {
+ if ($ARGS[$counter] =~ /[;,]/) {
+ push (@to, split(/[;,]/, $ARGS[$counter]));
+ }
+ else {
+ push (@to,$ARGS[$counter]);
+ }
+ $counter++;
+ } $counter--;
+ }
+
+ elsif ($ARGS[$counter] =~ /^-cc$/) { ## Cc ##
+ $counter++;
+ while ($ARGS[$counter] && ($ARGS[$counter] !~ /^-/)) {
+ if ($ARGS[$counter] =~ /[;,]/) {
+ push (@cc, split(/[;,]/, $ARGS[$counter]));
+ }
+ else {
+ push (@cc,$ARGS[$counter]);
+ }
+ $counter++;
+ } $counter--;
+ }
+
+ elsif ($ARGS[$counter] =~ /^-bcc$/) { ## Bcc ##
+ $counter++;
+ while ($ARGS[$counter] && ($ARGS[$counter] !~ /^-/)) {
+ if ($ARGS[$counter] =~ /[;,]/) {
+ push (@bcc, split(/[;,]/, $ARGS[$counter]));
+ }
+ else {
+ push (@bcc,$ARGS[$counter]);
+ }
+ $counter++;
+ } $counter--;
+ }
+
+ elsif ($ARGS[$counter] =~ /^-m$/) { ## Message ##
+ $counter++;
+ $message = "";
+ while ($ARGS[$counter] && $ARGS[$counter] !~ /^-/) {
+ if ($message) { $message .= " "; }
+ $message .= $ARGS[$counter];
+ $counter++;
+ } $counter--;
+
+ ## Replace '\n' with $CRLF.
+ ## This allows newlines with messages sent on the command line
+ $message =~ s/\\n/$CRLF/g;
+ }
+
+ elsif ($ARGS[$counter] =~ /^-u$/) { ## Subject ##
+ $counter++;
+ $subject = "";
+ while ($ARGS[$counter] && $ARGS[$counter] !~ /^-/) {
+ if ($subject) { $subject .= " "; }
+ $subject .= $ARGS[$counter];
+ $counter++;
+ } $counter--;
+ }
+
+ elsif ($ARGS[$counter] =~ /^-s$/) { ## Server ##
+ $counter++;
+ if ($ARGS[$counter] && $ARGS[$counter] !~ /^-/) {
+ $conf{'server'} = $ARGS[$counter];
+ if ($conf{'server'} =~ /:/) { ## Port ##
+ ($conf{'server'},$conf{'port'}) = split(":",$conf{'server'});
+ }
+ }
+ else { printmsg("WARNING - The argument after -s was not the server!", 0); $counter--; }
+ }
+
+ elsif ($ARGS[$counter] =~ /^-b$/) { ## Bind Address ##
+ $counter++;
+ if ($ARGS[$counter] && $ARGS[$counter] !~ /^-/) {
+ $conf{'bindaddr'} = $ARGS[$counter];
+ }
+ else { printmsg("WARNING - The argument after -b was not the bindaddr!", 0); $counter--; }
+ }
+
+ elsif ($ARGS[$counter] =~ /^-a$/) { ## Attachments ##
+ $counter++;
+ while ($ARGS[$counter] && ($ARGS[$counter] !~ /^-/)) {
+ push (@attachments,$ARGS[$counter]);
+ $counter++;
+ } $counter--;
+ }
+
+ elsif ($ARGS[$counter] =~ /^-xu$/) { ## AuthSMTP Username ##
+ $counter++;
+ if ($ARGS[$counter] && $ARGS[$counter] !~ /^-/) {
+ $opt{'username'} = $ARGS[$counter];
+ }
+ else {
+ printmsg("WARNING => The argument after -xu was not valid username!", 0);
+ $counter--;
+ }
+ }
+
+ elsif ($ARGS[$counter] =~ /^-xp$/) { ## AuthSMTP Password ##
+ $counter++;
+ if ($ARGS[$counter] && $ARGS[$counter] !~ /^-/) {
+ $opt{'password'} = $ARGS[$counter];
+ }
+ else {
+ printmsg("WARNING => The argument after -xp was not valid password!", 0);
+ $counter--;
+ }
+ }
+
+ elsif ($ARGS[$counter] =~ /^-l$/) { ## Logging ##
+ $counter++;
+ $conf{'logging'} = 1;
+ if ($ARGS[$counter] && $ARGS[$counter] !~ /^-/) { $conf{'logFile'} = $ARGS[$counter]; }
+ else { printmsg("WARNING - The argument after -l was not the log file!", 0); $counter--; }
+ }
+
+ elsif ($ARGS[$counter] =~ s/^-v+//i) { ## Verbosity ##
+ my $tmp = (length($&) - 1);
+ $conf{'debug'} += $tmp;
+ }
+
+ elsif ($ARGS[$counter] =~ /^-q$/) { ## Quiet ##
+ $conf{'stdout'} = 0;
+ }
+
+ else {
+ printmsg("Error: \"$ARGS[$counter]\" is not a recognized option!", 0);
+ help();
+ }
+
+ }
+
+
+
+
+
+
+
+
+ ###################################################
+ ## Verify required variables are set correctly ##
+ ###################################################
+
+ ## Make sure we have something in $conf{hostname} and $opt{fqdn}
+ if ($opt{'fqdn'} =~ /\./) {
+ $conf{'hostname'} = $opt{'fqdn'};
+ $conf{'hostname'} =~ s/\..*//;
+ }
+
+ if (!$conf{'server'}) { $conf{'server'} = 'localhost'; }
+ if (!$conf{'port'}) { $conf{'port'} = 25; }
+ if (!$from) {
+ quit("ERROR => You must specify a 'from' field! Try --help.", 1);
+ }
+ if ( ((scalar(@to)) + (scalar(@cc)) + (scalar(@bcc))) <= 0) {
+ quit("ERROR => You must specify at least one recipient via -t, -cc, or -bcc", 1);
+ }
+
+ ## Make sure email addresses look OK.
+ foreach my $addr (@to, @cc, @bcc, $from, $opt{'reply-to'}) {
+ if ($addr) {
+ if (!returnAddressParts($addr)) {
+ printmsg("ERROR => Can't use improperly formatted email address: $addr", 0);
+ printmsg("HINT => Try viewing the extended help on addressing with \"--help addressing\"", 1);
+ quit("", 1);
+ }
+ }
+ }
+
+ ## Make sure all attachments exist.
+ foreach my $file (@attachments) {
+ if ( (! -f $file) or (! -r $file) ) {
+ printmsg("ERROR => The attachment [$file] doesn't exist!", 0);
+ printmsg("HINT => Try specifying the full path to the file or reading extended help with \"--help message\"", 1);
+ quit("", 1);
+ }
+ }
+
+ if ($conf{'logging'} and (!$conf{'logFile'})) {
+ quit("ERROR => You used -l to enable logging but didn't specify a log file!", 1);
+ }
+
+ if ( $opt{'username'} ) {
+ if (!$opt{'password'}) {
+ ## Prompt for a password since one wasn't specified with the -xp option.
+ $SIG{'ALRM'} = sub { quit("ERROR => Timeout waiting for password inpupt", 1); };
+ alarm(60) if ($^O !~ /win/i); ## alarm() doesn't work in win32
+ print "Password: ";
+ $opt{'password'} = <STDIN>; chomp $opt{'password'};
+ if (!$opt{'password'}) {
+ quit("ERROR => A username for SMTP authentication was specified, but no password!", 1);
+ }
+ }
+ }
+
+ ## Validate the TLS setting
+ $opt{'tls'} = lc($opt{'tls'});
+ if ($opt{'tls'} !~ /^(auto|yes|no)$/) {
+ quit("ERROR => Invalid TLS setting ($opt{'tls'}). Must be one of auto, yes, or no.", 1);
+ }
+
+ ## If TLS is set to "yes", make sure sendEmail loaded the libraries needed.
+ if ($opt{'tls'} eq 'yes' and $conf{'tls_client'} == 0) {
+ quit("ERROR => No TLS support! SendEmail can't load required libraries. (try installing Net::SSLeay and IO::Socket::SSL)", 1);
+ }
+
+ ## Return 0 errors
+ return(0);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## getline($socketRef)
+sub getline {
+ my ($socketRef) = @_;
+ local ($/) = "\r\n";
+ return $$socketRef->getline;
+}
+
+
+
+
+## Receive a (multiline?) SMTP response from ($socketRef)
+sub getResponse {
+ my ($socketRef) = @_;
+ my ($tmp, $reply);
+ local ($/) = "\r\n";
+ return undef unless defined($tmp = getline($socketRef));
+ return("getResponse() socket is not open") unless ($$socketRef->opened);
+ ## Keep reading lines if it's a multi-line response
+ while ($tmp =~ /^\d{3}-/o) {
+ $reply .= $tmp;
+ return undef unless defined($tmp = getline($socketRef));
+ }
+ $reply .= $tmp;
+ $reply =~ s/\r?\n$//o;
+ return $reply;
+}
+
+
+
+
+###############################################################################################
+## Function: SMTPchat ( [string $command] )
+##
+## Description: Sends $command to the SMTP server (on SERVER) and awaits a successful
+## reply form the server. If the server returns an error, or does not reply
+## within $conf{'alarm'} seconds an error is generated.
+## NOTE: $command is optional, if no command is specified then nothing will
+## be sent to the server, but a valid response is still required from the server.
+##
+## Input: [$command] A (optional) valid SMTP command (ex. "HELO")
+##
+##
+## Output: Returns zero on success, or non-zero on error.
+## Error messages will be stored in $conf{'error'}
+## A copy of the last SMTP response is stored in the global variable
+## $conf{'SMTPchat_response'}
+##
+##
+## Example: SMTPchat ("HELO mail.isp.net");
+###############################################################################################
+sub SMTPchat {
+ my ($command) = @_;
+
+ printmsg("INFO => Sending: \t$command", 1) if ($command);
+
+ ## Send our command
+ print $SERVER "$command$CRLF" if ($command);
+
+ ## Read a response from the server
+ $SIG{'ALRM'} = sub { $conf{'error'} = "alarm"; $SERVER->close(); };
+ alarm($conf{'alarm'}) if ($^O !~ /win/i); ## alarm() doesn't work in win32;
+ my $result = $conf{'SMTPchat_response'} = getResponse(\$SERVER);
+ alarm(0) if ($^O !~ /win/i); ## alarm() doesn't work in win32;
+
+ ## Generate an alert if we timed out
+ if ($conf{'error'} eq "alarm") {
+ $conf{'error'} = "ERROR => Timeout while reading from $conf{'server'}:$conf{'port'} There was no response after $conf{'alarm'} seconds.";
+ return(1);
+ }
+
+ ## Make sure the server actually responded
+ if (!$result) {
+ $conf{'error'} = "ERROR => $conf{'server'}:$conf{'port'} returned a zero byte response to our query.";
+ return(2);
+ }
+
+ ## Validate the response
+ if (evalSMTPresponse($result)) {
+ ## conf{'error'} will already be set here
+ return(2);
+ }
+
+ ## Print the success messsage
+ printmsg($conf{'error'}, 1);
+
+ ## Return Success
+ return(0);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+###############################################################################################
+## Function: evalSMTPresponse (string $message )
+##
+## Description: Searches $message for either an SMTP success or error code, and returns
+## 0 on success, and the actual error code on error.
+##
+##
+## Input: $message Data received from a SMTP server (ex. "220
+##
+##
+## Output: Returns zero on success, or non-zero on error.
+## Error messages will be stored in $conf{'error'}
+##
+##
+## Example: SMTPchat ("HELO mail.isp.net");
+###############################################################################################
+sub evalSMTPresponse {
+ my ($message) = @_;
+
+ ## Validate input
+ if (!$message) {
+ $conf{'error'} = "ERROR => No message was passed to evalSMTPresponse(). What happened?";
+ return(1)
+ }
+
+ printmsg("DEBUG => evalSMTPresponse() - Checking for SMTP success or error status in the message: $message ", 3);
+
+ ## Look for a SMTP success code
+ if ($message =~ /^([23]\d\d)/) {
+ printmsg("DEBUG => evalSMTPresponse() - Found SMTP success code: $1", 2);
+ $conf{'error'} = "SUCCESS => Received: \t$message";
+ return(0);
+ }
+
+ ## Look for a SMTP error code
+ if ($message =~ /^([45]\d\d)/) {
+ printmsg("DEBUG => evalSMTPresponse() - Found SMTP error code: $1", 2);
+ $conf{'error'} = "ERROR => Received: \t$message";
+ return($1);
+ }
+
+ ## If no SMTP codes were found return an error of 1
+ $conf{'error'} = "ERROR => Received a message with no success or error code. The message received was: $message";
+ return(2);
+
+}
+
+
+
+
+
+
+
+
+
+
+#########################################################
+# SUB: &return_month(0,1,etc)
+# returns the name of the month that corrosponds
+# with the number. returns 0 on error.
+#########################################################
+sub return_month {
+ my $x = $_[0];
+ if ($x == 0) { return 'Jan'; }
+ if ($x == 1) { return 'Feb'; }
+ if ($x == 2) { return 'Mar'; }
+ if ($x == 3) { return 'Apr'; }
+ if ($x == 4) { return 'May'; }
+ if ($x == 5) { return 'Jun'; }
+ if ($x == 6) { return 'Jul'; }
+ if ($x == 7) { return 'Aug'; }
+ if ($x == 8) { return 'Sep'; }
+ if ($x == 9) { return 'Oct'; }
+ if ($x == 10) { return 'Nov'; }
+ if ($x == 11) { return 'Dec'; }
+ return (0);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#########################################################
+# SUB: &return_day(0,1,etc)
+# returns the name of the day that corrosponds
+# with the number. returns 0 on error.
+#########################################################
+sub return_day {
+ my $x = $_[0];
+ if ($x == 0) { return 'Sun'; }
+ if ($x == 1) { return 'Mon'; }
+ if ($x == 2) { return 'Tue'; }
+ if ($x == 3) { return 'Wed'; }
+ if ($x == 4) { return 'Thu'; }
+ if ($x == 5) { return 'Fri'; }
+ if ($x == 6) { return 'Sat'; }
+ return (0);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+###############################################################################################
+## Function: returnAddressParts(string $address)
+##
+## Description: Returns a two element array containing the "Name" and "Address" parts of
+## an email address.
+##
+## Example: "Brandon Zehm <caspian@dotconf.net>"
+## would return: ("Brandon Zehm", "caspian@dotconf.net");
+##
+## "caspian@dotconf.net"
+## would return: ("caspian@dotconf.net", "caspian@dotconf.net")
+###############################################################################################
+sub returnAddressParts {
+ my $input = $_[0];
+ my $name = "";
+ my $address = "";
+
+ ## Make sure to fail if it looks totally invalid
+ if ($input !~ /(\S+\@\S+)/) {
+ $conf{'error'} = "ERROR => The address [$input] doesn't look like a valid email address, ignoring it";
+ return(undef());
+ }
+
+ ## Check 1, should find addresses like: "Brandon Zehm <caspian@dotconf.net>"
+ elsif ($input =~ /^\s*(\S(.*\S)?)\s*<(\S+\@\S+)>/o) {
+ ($name, $address) = ($1, $3);
+ }
+
+ ## Otherwise if that failed, just get the address: <caspian@dotconf.net>
+ elsif ($input =~ /<(\S+\@\S+)>/o) {
+ $name = $address = $1;
+ }
+
+ ## Or maybe it was formatted this way: caspian@dotconf.net
+ elsif ($input =~ /(\S+\@\S+)/o) {
+ $name = $address = $1;
+ }
+
+ ## Something stupid happened, just return an error.
+ unless ($name and $address) {
+ printmsg("ERROR => Couldn't parse the address: $input", 0);
+ printmsg("HINT => If you think this should work, consider reporting this as a bug to $conf{'authorEmail'}", 1);
+ return(undef());
+ }
+
+ ## Make sure there aren't invalid characters in the address, and return it.
+ my $ctrl = '\000-\037';
+ my $nonASCII = '\x80-\xff';
+ if ($address =~ /[<> ,;:"'\[\]\\$ctrl$nonASCII]/) {
+ printmsg("WARNING => The address [$address] seems to contain invalid characters: continuing anyway", 0);
+ }
+ return($name, $address);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+###############################################################################################
+## Function: base64_encode(string $data, bool $chunk)
+##
+## Description: Returns $data as a base64 encoded string.
+## If $chunk is true, the encoded data is returned in 76 character long lines
+## with the final \CR\LF removed.
+##
+## Note: This is only used from the smtp auth section of code.
+## At some point it would be nice to merge the code that encodes attachments and this.
+###############################################################################################
+sub base64_encode {
+ my $data = $_[0];
+ my $chunk = $_[1];
+ my $tmp = '';
+ my $base64 = '';
+ my $CRLF = "\r\n";
+
+ ###################################
+ ## Convert binary data to base64 ##
+ ###################################
+ while ($data =~ s/(.{45})//s) { ## Get 45 bytes from the binary string
+ $tmp = substr(pack('u', $&), 1); ## Convert the binary to uuencoded text
+ chop($tmp);
+ $tmp =~ tr|` -_|AA-Za-z0-9+/|; ## Translate from uuencode to base64
+ $base64 .= $tmp;
+ }
+
+ ##########################
+ ## Encode the leftovers ##
+ ##########################
+ my $padding = "";
+ if ( ($data) and (length($data) > 0) ) {
+ $padding = (3 - length($data) % 3) % 3; ## Set flag if binary data isn't divisible by 3
+ $tmp = substr(pack('u', $data), 1); ## Convert the binary to uuencoded text
+ chop($tmp);
+ $tmp =~ tr|` -_|AA-Za-z0-9+/|; ## Translate from uuencode to base64
+ $base64 .= $tmp;
+ }
+
+ ############################
+ ## Fix padding at the end ##
+ ############################
+ $data = '';
+ $base64 =~ s/.{$padding}$/'=' x $padding/e if $padding; ## Fix the end padding if flag (from above) is set
+ if ($chunk) {
+ while ($base64 =~ s/(.{1,76})//s) { ## Put $CRLF after each 76 characters
+ $data .= "$1$CRLF";
+ }
+ }
+ else {
+ $data = $base64;
+ }
+
+ ## Remove any trailing CRLF's
+ $data =~ s/(\r|\n)*$//s;
+ return($data);
+}
+
+
+
+
+
+
+
+
+
+#########################################################
+# SUB: send_attachment("/path/filename")
+# Sends the mime headers and base64 encoded file
+# to the email server.
+#########################################################
+sub send_attachment {
+ my ($filename) = @_; ## Get filename passed
+ my (@fields, $y, $filename_name, $encoding, ## Local variables
+ @attachlines, $content_type);
+ my $bin = 1;
+
+ @fields = split(/\/|\\/, $filename); ## Get the actual filename without the path
+ $filename_name = pop(@fields);
+ push @attachments_names, $filename_name; ## FIXME: This is only used later for putting in the log file
+
+ ##########################
+ ## Autodetect Mime Type ##
+ ##########################
+
+ @fields = split(/\./, $filename_name);
+ $encoding = $fields[$#fields];
+
+ if ($encoding =~ /txt|text|log|conf|^c$|cpp|^h$|inc|m3u/i) { $content_type = 'text/plain'; }
+ elsif ($encoding =~ /html|htm|shtml|shtm|asp|php|cfm/i) { $content_type = 'text/html'; }
+ elsif ($encoding =~ /sh$/i) { $content_type = 'application/x-sh'; }
+ elsif ($encoding =~ /tcl/i) { $content_type = 'application/x-tcl'; }
+ elsif ($encoding =~ /pl$/i) { $content_type = 'application/x-perl'; }
+ elsif ($encoding =~ /js$/i) { $content_type = 'application/x-javascript'; }
+ elsif ($encoding =~ /man/i) { $content_type = 'application/x-troff-man'; }
+ elsif ($encoding =~ /gif/i) { $content_type = 'image/gif'; }
+ elsif ($encoding =~ /jpg|jpeg|jpe|jfif|pjpeg|pjp/i) { $content_type = 'image/jpeg'; }
+ elsif ($encoding =~ /tif|tiff/i) { $content_type = 'image/tiff'; }
+ elsif ($encoding =~ /xpm/i) { $content_type = 'image/x-xpixmap'; }
+ elsif ($encoding =~ /bmp/i) { $content_type = 'image/x-MS-bmp'; }
+ elsif ($encoding =~ /pcd/i) { $content_type = 'image/x-photo-cd'; }
+ elsif ($encoding =~ /png/i) { $content_type = 'image/png'; }
+ elsif ($encoding =~ /aif|aiff/i) { $content_type = 'audio/x-aiff'; }
+ elsif ($encoding =~ /wav/i) { $content_type = 'audio/x-wav'; }
+ elsif ($encoding =~ /mp2|mp3|mpa/i) { $content_type = 'audio/x-mpeg'; }
+ elsif ($encoding =~ /ra$|ram/i) { $content_type = 'audio/x-pn-realaudio'; }
+ elsif ($encoding =~ /mpeg|mpg/i) { $content_type = 'video/mpeg'; }
+ elsif ($encoding =~ /mov|qt$/i) { $content_type = 'video/quicktime'; }
+ elsif ($encoding =~ /avi/i) { $content_type = 'video/x-msvideo'; }
+ elsif ($encoding =~ /zip/i) { $content_type = 'application/x-zip-compressed'; }
+ elsif ($encoding =~ /tar/i) { $content_type = 'application/x-tar'; }
+ elsif ($encoding =~ /jar/i) { $content_type = 'application/java-archive'; }
+ elsif ($encoding =~ /exe|bin/i) { $content_type = 'application/octet-stream'; }
+ elsif ($encoding =~ /ppt|pot|ppa|pps|pwz/i) { $content_type = 'application/vnd.ms-powerpoint'; }
+ elsif ($encoding =~ /mdb|mda|mde/i) { $content_type = 'application/vnd.ms-access'; }
+ elsif ($encoding =~ /xls|xlt|xlm|xld|xla|xlc|xlw|xll/i) { $content_type = 'application/vnd.ms-excel'; }
+ elsif ($encoding =~ /doc|dot/i) { $content_type = 'application/msword'; }
+ elsif ($encoding =~ /rtf/i) { $content_type = 'application/rtf'; }
+ elsif ($encoding =~ /pdf/i) { $content_type = 'application/pdf'; }
+ elsif ($encoding =~ /tex/i) { $content_type = 'application/x-tex'; }
+ elsif ($encoding =~ /latex/i) { $content_type = 'application/x-latex'; }
+ elsif ($encoding =~ /vcf/i) { $content_type = 'application/x-vcard'; }
+ else { $content_type = 'application/octet-stream'; }
+
+
+ ############################
+ ## Process the attachment ##
+ ############################
+
+ #####################################
+ ## Generate and print MIME headers ##
+ #####################################
+
+ $y = "$CRLF--$conf{'delimiter'}$CRLF";
+ $y .= "Content-Type: $content_type;$CRLF";
+ $y .= " name=\"$filename_name\"$CRLF";
+ $y .= "Content-Transfer-Encoding: base64$CRLF";
+ $y .= "Content-Disposition: attachment; filename=\"$filename_name\"$CRLF";
+ $y .= "$CRLF";
+ print $SERVER $y;
+
+
+ ###########################################################
+ ## Convert the file to base64 and print it to the server ##
+ ###########################################################
+
+ open (FILETOATTACH, $filename) || do {
+ printmsg("ERROR => Opening the file [$filename] for attachment failed with the error: $!", 0);
+ return(1);
+ };
+ binmode(FILETOATTACH); ## Hack to make Win32 work
+
+ my $res = "";
+ my $tmp = "";
+ my $base64 = "";
+ while (<FILETOATTACH>) { ## Read a line from the (binary) file
+ $res .= $_;
+
+ ###################################
+ ## Convert binary data to base64 ##
+ ###################################
+ while ($res =~ s/(.{45})//s) { ## Get 45 bytes from the binary string
+ $tmp = substr(pack('u', $&), 1); ## Convert the binary to uuencoded text
+ chop($tmp);
+ $tmp =~ tr|` -_|AA-Za-z0-9+/|; ## Translate from uuencode to base64
+ $base64 .= $tmp;
+ }
+
+ ################################
+ ## Print chunks to the server ##
+ ################################
+ while ($base64 =~ s/(.{76})//s) {
+ print $SERVER "$1$CRLF";
+ }
+
+ }
+
+ ###################################
+ ## Encode and send the leftovers ##
+ ###################################
+ my $padding = "";
+ if ( ($res) and (length($res) >= 1) ) {
+ $padding = (3 - length($res) % 3) % 3; ## Set flag if binary data isn't divisible by 3
+ $res = substr(pack('u', $res), 1); ## Convert the binary to uuencoded text
+ chop($res);
+ $res =~ tr|` -_|AA-Za-z0-9+/|; ## Translate from uuencode to base64
+ }
+
+ ############################
+ ## Fix padding at the end ##
+ ############################
+ $res = $base64 . $res; ## Get left overs from above
+ $res =~ s/.{$padding}$/'=' x $padding/e if $padding; ## Fix the end padding if flag (from above) is set
+ if ($res) {
+ while ($res =~ s/(.{1,76})//s) { ## Send it to the email server.
+ print $SERVER "$1$CRLF";
+ }
+ }
+
+ close (FILETOATTACH) || do {
+ printmsg("ERROR - Closing the filehandle for file [$filename] failed with the error: $!", 0);
+ return(2);
+ };
+
+ ## Return 0 errors
+ return(0);
+
+}
+
+
+
+
+
+
+
+
+
+###############################################################################################
+## Function: $string = get_hostname (boot $fqdn)
+##
+## Description: Tries really hard to returns the short (or FQDN) hostname of the current
+## system. Uses techniques and code from the Sys-Hostname module.
+##
+## Input: $fqdn A true value (1) will cause this function to return a FQDN hostname
+## rather than a short hostname.
+##
+## Output: Returns a string
+###############################################################################################
+sub get_hostname {
+ ## Assign incoming parameters to variables
+ my ( $fqdn ) = @_;
+ my $hostname = "";
+
+ ## STEP 1: Get short hostname
+
+ ## Load Sys::Hostname if it's available
+ eval { require Sys::Hostname; };
+ unless ($@) {
+ $hostname = Sys::Hostname::hostname();
+ }
+
+ ## If that didn't get us a hostname, try a few other things
+ else {
+ ## Windows systems
+ if ($^O !~ /win/i) {
+ if ($ENV{'COMPUTERNAME'}) { $hostname = $ENV{'COMPUTERNAME'}; }
+ if (!$hostname) { $hostname = gethostbyname('localhost'); }
+ if (!$hostname) { chomp($hostname = `hostname 2> NUL`) };
+ }
+
+ ## Unix systems
+ else {
+ local $ENV{PATH} = '/usr/bin:/bin:/usr/sbin:/sbin'; ## Paranoia
+
+ ## Try the environment first (Help! What other variables could/should I be checking here?)
+ if ($ENV{'HOSTNAME'}) { $hostname = $ENV{'HOSTNAME'}; }
+
+ ## Try the hostname command
+ eval { local $SIG{__DIE__}; local $SIG{CHLD}; $hostname = `hostname 2>/dev/null`; chomp($hostname); } ||
+
+ ## Try POSIX::uname(), which strictly can't be expected to be correct
+ eval { local $SIG{__DIE__}; require POSIX; $hostname = (POSIX::uname())[1]; } ||
+
+ ## Try the uname command
+ eval { local $SIG{__DIE__}; $hostname = `uname -n 2>/dev/null`; chomp($hostname); };
+
+ }
+
+ ## If we can't find anything else, return ""
+ if (!$hostname) {
+ print "WARNING => No hostname could be determined, please specify one with -o fqdn=FQDN option!\n";
+ return("unknown");
+ }
+ }
+
+ ## Return the short hostname
+ unless ($fqdn) {
+ $hostname =~ s/\..*//;
+ return(lc($hostname));
+ }
+
+ ## STEP 2: Determine the FQDN
+
+ ## First, if we already have one return it.
+ if ($hostname =~ /\w\.\w/) { return(lc($hostname)); }
+
+ ## Next try using
+ eval { $fqdn = (gethostbyname($hostname))[0]; };
+ if ($fqdn) { return(lc($fqdn)); }
+ return(lc($hostname));
+}
+
+
+
+
+
+
+
+
+###############################################################################################
+## Function: printmsg (string $message, int $level)
+##
+## Description: Handles all messages - printing them to the screen only if the messages
+## $level is >= the global debug level. If $conf{'logFile'} is defined it
+## will also log the message to that file.
+##
+## Input: $message A message to be printed, logged, etc.
+## $level The debug level of the message. If
+## not defined 0 will be assumed. 0 is
+## considered a normal message, 1 and
+## higher is considered a debug message.
+##
+## Output: Prints to STDOUT
+##
+## Assumptions: $conf{'hostname'} should be the name of the computer we're running on.
+## $conf{'stdout'} should be set to 1 if you want to print to stdout
+## $conf{'logFile'} should be a full path to a log file if you want that
+## $conf{'debug'} should be an integer between 0 and 10.
+##
+## Example: printmsg("WARNING: We believe in generic error messages... NOT!", 0);
+###############################################################################################
+sub printmsg {
+ ## Assign incoming parameters to variables
+ my ( $message, $level ) = @_;
+
+ ## Make sure input is sane
+ $level = 0 if (!defined($level));
+ $message =~ s/\s+$//sgo;
+ $message =~ s/\r?\n/, /sgo;
+
+ ## Continue only if the debug level of the program is >= message debug level.
+ if ($conf{'debug'} >= $level) {
+
+ ## Get the date in the format: Dec 3 11:14:04
+ my ($sec, $min, $hour, $mday, $mon) = localtime();
+ $mon = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec')[$mon];
+ my $date = sprintf("%s %02d %02d:%02d:%02d", $mon, $mday, $hour, $min, $sec);
+
+ ## Print to STDOUT always if debugging is enabled, or if conf{stdout} is true.
+ if ( ($conf{'debug'} >= 1) or ($conf{'stdout'} == 1) ) {
+ print "$date $conf{'hostname'} $conf{'programName'}\[$$\]: $message\n";
+ }
+
+ ## Print to the log file if $conf{'logging'} is true
+ if ($conf{'logFile'}) {
+ if (openLogFile($conf{'logFile'})) { $conf{'logFile'} = ""; printmsg("ERROR => Opening the file [$conf{'logFile'}] for appending returned the error: $!", 1); }
+ print LOGFILE "$date $conf{'hostname'} $conf{'programName'}\[$$\]: $message\n";
+ }
+
+ }
+
+ ## Return 0 errors
+ return(0);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+###############################################################################################
+## FUNCTION:
+## openLogFile ( $filename )
+##
+##
+## DESCRIPTION:
+## Opens the file $filename and attaches it to the filehandle "LOGFILE". Returns 0 on success
+## and non-zero on failure. Error codes are listed below, and the error message gets set in
+## global variable $!.
+##
+##
+## Example:
+## openFile ("/var/log/sendEmail.log");
+##
+###############################################################################################
+sub openLogFile {
+ ## Get the incoming filename
+ my $filename = $_[0];
+
+ ## Make sure our file exists, and if the file doesn't exist then create it
+ if ( ! -f $filename ) {
+ print STDERR "NOTICE: The log file [$filename] does not exist. Creating it now with mode [0600].\n" if ($conf{'stdout'});
+ open (LOGFILE, ">>$filename");
+ close LOGFILE;
+ chmod (0600, $filename);
+ }
+
+ ## Now open the file and attach it to a filehandle
+ open (LOGFILE,">>$filename") or return (1);
+
+ ## Put the file into non-buffering mode
+ select LOGFILE;
+ $| = 1;
+ select STDOUT;
+
+ ## Return success
+ return(0);
+}
+
+
+
+
+
+
+
+
+###############################################################################################
+## Function: read_file (string $filename)
+##
+## Description: Reads the contents of a file and returns a two part array:
+## ($status, $file-contents)
+## $status is 0 on success, non-zero on error.
+##
+## Example: ($status, $file) = read_file("/etc/passwd");
+###############################################################################################
+sub read_file {
+ my ( $filename ) = @_;
+
+ ## If the value specified is a file, load the file's contents
+ if ( (-e $filename and -r $filename) ) {
+ my $FILE;
+ if(!open($FILE, ' ' . $filename)) {
+ return((1, ""));
+ }
+ my $file = '';
+ while (<$FILE>) {
+ $file .= $_;
+ }
+ ## Strip an ending \r\n
+ $file =~ s/\r?\n$//os;
+ }
+ return((1, ""));
+}
+
+
+
+
+
+
+
+
+
+###############################################################################################
+## Function: quit (string $message, int $errorLevel)
+##
+## Description: Exits the program, optionally printing $message. It
+## returns an exit error level of $errorLevel to the
+## system (0 means no errors, and is assumed if empty.)
+##
+## Example: quit("Exiting program normally", 0);
+###############################################################################################
+sub quit {
+ my ( $message, $errorLevel ) = @_;
+ $errorLevel = 0 if (!defined($errorLevel));
+
+ ## Print exit message
+ if ($message) {
+ printmsg($message, 0);
+ }
+
+ ## Exit
+ exit($errorLevel);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+###############################################################################################
+## Function: help ()
+##
+## Description: For all those newbies ;)
+## Prints a help message and exits the program.
+##
+###############################################################################################
+sub help {
+exit(1) if (!$conf{'stdout'});
+print <<EOM;
+
+${colorBold}$conf{'programName'}-$conf{'version'} by $conf{'authorName'} <$conf{'authorEmail'}>${colorNoBold}
+
+Synopsis: $conf{'programName'} -f ADDRESS [options]
+
+ ${colorRed}Required:${colorNormal}
+ -f ADDRESS from (sender) email address
+ * At least one recipient required via -t, -cc, or -bcc
+ * Message body required via -m, STDIN, or -o message-file=FILE
+
+ ${colorGreen}Common:${colorNormal}
+ -t ADDRESS [ADDR ...] to email address(es)
+ -u SUBJECT message subject
+ -m MESSAGE message body
+ -s SERVER[:PORT] smtp mail relay, default is $conf{'server'}:$conf{'port'}
+
+ ${colorGreen}Optional:${colorNormal}
+ -a FILE [FILE ...] file attachment(s)
+ -cc ADDRESS [ADDR ...] cc email address(es)
+ -bcc ADDRESS [ADDR ...] bcc email address(es)
+ -xu USERNAME username for SMTP authentication
+ -xp PASSWORD password for SMTP authentication
+
+ ${colorGreen}Paranormal:${colorNormal}
+ -b BINDADDR[:PORT] local host bind address
+ -l LOGFILE log to the specified file
+ -v verbosity, use multiple times for greater effect
+ -q be quiet (i.e. no STDOUT output)
+ -o NAME=VALUE advanced options, for details try: --help misc
+ -o message-content-type=<auto|text|html>
+ -o message-file=FILE -o message-format=raw
+ -o message-header=HEADER -o message-charset=CHARSET
+ -o reply-to=ADDRESS -o timeout=SECONDS
+ -o username=USERNAME -o password=PASSWORD
+ -o tls=<auto|yes|no> -o fqdn=FQDN
+
+
+ ${colorGreen}Help:${colorNormal}
+ --help the helpful overview you're reading now
+ --help addressing explain addressing and related options
+ --help message explain message body input and related options
+ --help networking explain -s, -b, etc
+ --help output explain logging and other output options
+ --help misc explain -o options, TLS, SMTP auth, and more
+
+EOM
+exit(1);
+}
+
+
+
+
+
+
+
+
+
+###############################################################################################
+## Function: helpTopic ($topic)
+##
+## Description: For all those newbies ;)
+## Prints a help message and exits the program.
+##
+###############################################################################################
+sub helpTopic {
+ exit(1) if (!$conf{'stdout'});
+ my ($topic) = @_;
+
+ CASE: {
+
+
+
+
+## ADDRESSING
+ ($topic eq 'addressing') && do {
+ print <<EOM;
+
+${colorBold}ADDRESSING DOCUMENTATION${colorNormal}
+
+${colorGreen}Addressing Options${colorNormal}
+Options related to addressing:
+ -f ADDRESS
+ -t ADDRESS [ADDRESS ...]
+ -cc ADDRESS [ADDRESS ...]
+ -bcc ADDRESS [ADDRESS ...]
+ -o reply-to=ADDRESS
+
+-f ADDRESS
+ This required option specifies who the email is from, I.E. the sender's
+ email address.
+
+-t ADDRESS [ADDRESS ...]
+ This option specifies the primary recipient(s). At least one recipient
+ address must be specified via the -t, -cc. or -bcc options.
+
+-cc ADDRESS [ADDRESS ...]
+ This option specifies the "carbon copy" recipient(s). At least one
+ recipient address must be specified via the -t, -cc. or -bcc options.
+
+-bcc ADDRESS [ADDRESS ...]
+ This option specifies the "blind carbon copy" recipient(s). At least
+ one recipient address must be specified via the -t, -cc. or -bcc options.
+
+-o reply-to=ADDRESS
+ This option specifies that an optional "Reply-To" address should be
+ written in the email's headers.
+
+
+${colorGreen}Email Address Syntax${colorNormal}
+Email addresses may be specified in one of two ways:
+ Full Name: "John Doe <john.doe\@gmail.com>"
+ Just Address: "john.doe\@gmail.com"
+
+The "Full Name" method is useful if you want a name, rather than a plain
+email address, to be displayed in the recipient's From, To, or Cc fields
+when they view the message.
+
+
+${colorGreen}Multiple Recipients${colorNormal}
+The -t, -cc, and -bcc options each accept multiple addresses. They may be
+specified by separating them by either a white space, comma, or semi-colon
+separated list. You may also specify the -t, -cc, and -bcc options multiple
+times, each occurance will append the new recipients to the respective list.
+
+Examples:
+(I used "-t" in these examples, but it can be "-cc" or "-bcc" as well)
+
+ * Space separated list:
+ -t jane.doe\@yahoo.com "John Doe <john.doe\@gmail.com>"
+
+ * Semi-colon separated list:
+ -t "jane.doe\@yahoo.com; John Doe <john.doe\@gmail.com>"
+
+ * Comma separated list:
+ -t "jane.doe\@yahoo.com, John Doe <john.doe\@gmail.com>"
+
+ * Multiple -t, -cc, or -bcc options:
+ -t "jane.doe\@yahoo.com" -t "John Doe <john.doe\@gmail.com>"
+
+
+EOM
+ last CASE;
+ };
+
+
+
+
+
+
+## MESSAGE
+ ($topic eq 'message') && do {
+ print <<EOM;
+
+${colorBold}MESSAGE DOCUMENTATION${colorNormal}
+
+${colorGreen}Message Options${colorNormal}
+Options related to the email message body:
+ -u SUBJECT
+ -m MESSAGE
+ -o message-file=FILE
+ -o message-content-type=<auto|text|html>
+ -o message-header=EMAIL HEADER
+ -o message-charset=CHARSET
+ -o message-format=raw
+
+-u SUBJECT
+ This option allows you to specify the subject for your email message.
+ It is not required (anymore) that the subject be quoted, although it
+ is recommended. The subject will be read until an argument starting
+ with a hyphen (-) is found.
+ Examples:
+ -u "Contact information while on vacation"
+ -u New Microsoft vulnerability discovered
+
+-m MESSAGE
+ This option is one of three methods that allow you to specify the message
+ body for your email. The message may be specified on the command line
+ with this -m option, read from a file with the -o message-file=FILE
+ option, or read from STDIN if neither of these options are present.
+
+ It is not required (anymore) that the message be quoted, although it is
+ recommended. The message will be read until an argument starting with a
+ hyphen (-) is found.
+ Examples:
+ -m "See you in South Beach, Hawaii. -Todd"
+ -m Please ensure that you upgrade your systems right away
+
+ Multi-line message bodies may be specified with the -m option by putting
+ a "\\n" into the message. Example:
+ -m "This is line 1.\\nAnd this is line 2."
+
+ HTML messages are supported, simply begin your message with "<html>" and
+ sendEmail will properly label the mime header so MUAs properly render
+ the message. It is currently not possible without "-o message-format=raw"
+ to send a message with both text and html parts with sendEmail.
+
+-o message-file=FILE
+ This option is one of three methods that allow you to specify the message
+ body for your email. To use this option simply specify a text file
+ containing the body of your email message. Examples:
+ -o message-file=/root/message.txt
+ -o message-file="C:\\Program Files\\output.txt"
+
+-o message-content-type=<auto|text|html>
+ This option allows you to specify the content-type of the email. If your
+ email message is an html message but is being displayed as a text message
+ just add "-o message-content-type=html" to the command line to force it
+ to display as an html message. This actually just changes the Content-Type:
+ header. Advanced users will be happy to know that if you specify anything
+ other than the three options listed above it will use that as the vaule
+ for the Content-Type header.
+
+-o message-header=EMAIL HEADER
+ This option allows you to specify additional email headers to be included.
+ To add more than one message header simply use this option on the command
+ line more than once. If you specify a message header that sendEmail would
+ normally generate the one you specified will be used in it's place.
+ Do not use this unless you know what you are doing!
+ Example:
+ To scare a Microsoft Outlook user you may want to try this:
+ -o message-header="X-Message-Flag: Message contains illegal content"
+ Example:
+ To request a read-receipt try this:
+ -o message-header="Disposition-Notification-To: <user\@domain.com>"
+ Example:
+ To set the message priority try this:
+ -o message-header="X-Priority: 1"
+ Priority reference: 1=highest, 2=high, 3=normal, 4=low, 5=lowest
+
+-o message-charset=CHARSET
+ This option allows you to specify the character-set for the message body.
+ The default is iso-8859-1.
+
+-o message-format=raw
+ This option instructs sendEmail to assume the message (specified with -m,
+ read from STDIN, or read from the file specified in -o message-file=FILE)
+ is already a *complete* email message. SendEmail will not generate any
+ headers and will transmit the message as-is to the remote SMTP server.
+ Due to the nature of this option the following command line options will
+ be ignored when this one is used:
+ -u SUBJECT
+ -o message-header=EMAIL HEADER
+ -o message-charset=CHARSET
+ -a ATTACHMENT
+
+
+${colorGreen}The Message Body${colorNormal}
+The email message body may be specified in one of three ways:
+ 1) Via the -m MESSAGE command line option.
+ Example:
+ -m "This is the message body"
+
+ 2) By putting the message body in a file and using the -o message-file=FILE
+ command line option.
+ Example:
+ -o message-file=/root/message.txt
+
+ 3) By piping the message body to sendEmail when nither of the above command
+ line options were specified.
+ Example:
+ grep "ERROR" /var/log/messages | sendEmail -t you\@domain.com ...
+
+If the message body begins with "<html>" then the message will be treated as
+an HTML message and the MIME headers will be written so that a HTML capable
+email client will display the message in it's HTML form.
+Any of the above methods may be used with the -o message-format=raw option
+to deliver an already complete email message.
+
+
+EOM
+ last CASE;
+ };
+
+
+
+
+
+
+## MISC
+ ($topic eq 'misc') && do {
+ print <<EOM;
+
+${colorBold}MISC DOCUMENTATION${colorNormal}
+
+${colorGreen}Misc Options${colorNormal}
+Options that don't fit anywhere else:
+ -a ATTACHMENT [ATTACHMENT ...]
+ -xu USERNAME
+ -xp PASSWORD
+ -o username=USERNAME
+ -o password=PASSWORD
+ -o tls=<auto|yes|no>
+ -o timeout=SECONDS
+ -o fqdn=FQDN
+
+-a ATTACHMENT [ATTACHMENT ...]
+ This option allows you to attach any number of files to your email message.
+ To specify more than one attachment, simply separate each filename with a
+ space. Example: -a file1.txt file2.txt file3.txt
+
+-xu USERNAME
+ Alias for -o username=USERNAME
+
+-xp PASSWORD
+ Alias for -o password=PASSWORD
+
+-o username=USERNAME (synonym for -xu)
+ These options allow specification of a username to be used with SMTP
+ servers that require authentication. If a username is specified but a
+ password is not, you will be prompted to enter one at runtime.
+
+-o password=PASSWORD (synonym for -xp)
+ These options allow specification of a password to be used with SMTP
+ servers that require authentication. If a username is specified but a
+ password is not, you will be prompted to enter one at runtime.
+
+-o tls=<auto|yes|no>
+ This option allows you to specify if TLS (SSL for SMTP) should be enabled
+ or disabled. The default, auto, will use TLS automatically if your perl
+ installation has the IO::Socket::SSL and Net::SSLeay modules available,
+ and if the remote SMTP server supports TLS. To require TLS for message
+ delivery set this to yes. To disable TLS support set this to no. A debug
+ level of one or higher will reveal details about the status of TLS.
+
+-o timeout=SECONDS
+ This option sets the timeout value in seconds used for all network reads,
+ writes, and a few other things.
+
+-o fqdn=FQDN
+ This option sets the Fully Qualified Domain Name used during the initial
+ SMTP greeting. Normally this is automatically detected, but in case you
+ need to manually set it for some reason or get a warning about detection
+ failing, you can use this to override the default.
+
+
+EOM
+ last CASE;
+ };
+
+
+
+
+
+
+## NETWORKING
+ ($topic eq 'networking') && do {
+ print <<EOM;
+
+${colorBold}NETWORKING DOCUMENTATION${colorNormal}
+
+${colorGreen}Networking Options${colorNormal}
+Options related to networking:
+ -s SERVER[:PORT]
+ -b BINDADDR[:PORT]
+ -o tls=<auto|yes|no>
+ -o timeout=SECONDS
+
+-s SERVER[:PORT]
+ This option allows you to specify the SMTP server sendEmail should
+ connect to to deliver your email message to. If this option is not
+ specified sendEmail will try to connect to localhost:25 to deliver
+ the message. THIS IS MOST LIKELY NOT WHAT YOU WANT, AND WILL LIKELY
+ FAIL unless you have a email server (commonly known as an MTA) running
+ on your computer!
+ Typically you will need to specify your company or ISP's email server.
+ For example, if you use CableOne you will need to specify:
+ -s mail.cableone.net
+ If you have your own email server running on port 300 you would
+ probably use an option like this:
+ -s myserver.mydomain.com:300
+ If you're a GMail user try:
+ -s smtp.gmail.com:587 -xu me\@gmail.com -xp PASSWD
+
+-b BINDADDR[:PORT]
+ This option allows you to specify the local IP address (and optional
+ tcp port number) for sendEmail to bind to when connecting to the remote
+ SMTP server. This useful for people who need to send an email from a
+ specific network interface or source address and are running sendEmail on
+ a firewall or other host with several network interfaces.
+
+-o tls=<auto|yes|no>
+ This option allows you to specify if TLS (SSL for SMTP) should be enabled
+ or disabled. The default, auto, will use TLS automatically if your perl
+ installation has the IO::Socket::SSL and Net::SSLeay modules available,
+ and if the remote SMTP server supports TLS. To require TLS for message
+ delivery set this to yes. To disable TLS support set this to no. A debug
+ level of one or higher will reveal details about the status of TLS.
+
+-o timeout=SECONDS
+ This option sets the timeout value in seconds used for all network reads,
+ writes, and a few other things.
+
+
+EOM
+ last CASE;
+ };
+
+
+
+
+
+
+## OUTPUT
+ ($topic eq 'output') && do {
+ print <<EOM;
+
+${colorBold}OUTPUT DOCUMENTATION${colorNormal}
+
+${colorGreen}Output Options${colorNormal}
+Options related to output:
+ -l LOGFILE
+ -v
+ -q
+
+-l LOGFILE
+ This option allows you to specify a log file to append to. Every message
+ that is displayed to STDOUT is also written to the log file. This may be
+ used in conjunction with -q and -v.
+
+-q
+ This option tells sendEmail to disable printing to STDOUT. In other
+ words nothing will be printed to the console. This does not affect the
+ behavior of the -l or -v options.
+
+-v
+ This option allows you to increase the debug level of sendEmail. You may
+ either use this option more than once, or specify more than one v at a
+ time to obtain a debug level higher than one. Examples:
+ Specifies a debug level of 1: -v
+ Specifies a debug level of 2: -vv
+ Specifies a debug level of 2: -v -v
+ A debug level of one is recommended when doing any sort of debugging.
+ At that level you will see the entire SMTP transaction (except the
+ body of the email message), and hints will be displayed for most
+ warnings and errors. The highest debug level is three.
+
+
+EOM
+ last CASE;
+ };
+
+ ## Unknown option selected!
+ quit("ERROR => The help topic specified is not valid!", 1);
+ };
+
+exit(1);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#############################
+## ##
+## MAIN PROGRAM ##
+## ##
+#############################
+
+
+## Initialize
+initialize();
+
+## Process Command Line
+processCommandLine();
+$conf{'alarm'} = $opt{'timeout'};
+
+## Abort program after $conf{'alarm'} seconds to avoid infinite hangs
+alarm($conf{'alarm'}) if ($^O !~ /win/i); ## alarm() doesn't work in win32
+
+
+
+
+###################################################
+## Read $message from STDIN if -m was not used ##
+###################################################
+
+if (!($message)) {
+ ## Read message body from a file specified with -o message-file=
+ if ($opt{'message-file'}) {
+ if (! -e $opt{'message-file'}) {
+ printmsg("ERROR => Message body file specified [$opt{'message-file'}] does not exist!", 0);
+ printmsg("HINT => 1) check spelling of your file; 2) fully qualify the path; 3) doubble quote it", 1);
+ quit("", 1);
+ }
+ if (! -r $opt{'message-file'}) {
+ printmsg("ERROR => Message body file specified can not be read due to restricted permissions!", 0);
+ printmsg("HINT => Check permissions on file specified to ensure it can be read", 1);
+ quit("", 1);
+ }
+ if (!open(MFILE, "< " . $opt{'message-file'})) {
+ printmsg("ERROR => Error opening message body file [$opt{'message-file'}]: $!", 0);
+ quit("", 1);
+ }
+ while (<MFILE>) {
+ $message .= $_;
+ }
+ close(MFILE);
+ }
+
+ ## Read message body from STDIN
+ else {
+ alarm($conf{'alarm'}) if ($^O !~ /win/i); ## alarm() doesn't work in win32
+ if ($conf{'stdout'}) {
+ print "Reading message body from STDIN because the '-m' option was not used.\n";
+ print "If you are manually typing in a message:\n";
+ print " - First line must be received within $conf{'alarm'} seconds.\n" if ($^O !~ /win/i);
+ print " - End manual input with a CTRL-D on its own line.\n\n" if ($^O !~ /win/i);
+ print " - End manual input with a CTRL-Z on its own line.\n\n" if ($^O =~ /win/i);
+ }
+ while (<STDIN>) { ## Read STDIN into $message
+ $message .= $_;
+ alarm(0) if ($^O !~ /win/i); ## Disable the alarm since at least one line was received
+ }
+ printmsg("Message input complete.", 0);
+ }
+}
+
+## Replace bare LF's with CRLF's (\012 should always have \015 with it)
+$message =~ s/(\015)?(\012|$)/\015\012/g;
+
+## Replace bare CR's with CRLF's (\015 should always have \012 with it)
+$message =~ s/(\015)(\012|$)?/\015\012/g;
+
+## Check message for bare periods and encode them
+$message =~ s/(^|$CRLF)(\.{1})($CRLF|$)/$1.$2$3/g;
+
+## Get the current date for the email header
+my ($sec,$min,$hour,$mday,$mon,$year,$day) = gmtime();
+$year += 1900; $mon = return_month($mon); $day = return_day($day);
+my $date = sprintf("%s, %s %s %d %.2d:%.2d:%.2d %s",$day, $mday, $mon, $year, $hour, $min, $sec, $conf{'timezone'});
+
+
+
+
+##################################
+## Connect to the SMTP server ##
+##################################
+printmsg("DEBUG => Connecting to $conf{'server'}:$conf{'port'}", 1);
+$SIG{'ALRM'} = sub {
+ printmsg("ERROR => Timeout while connecting to $conf{'server'}:$conf{'port'} There was no response after $conf{'alarm'} seconds.", 0);
+ printmsg("HINT => Try specifying a different mail relay with the -s option.", 1);
+ quit("", 1);
+};
+alarm($conf{'alarm'}) if ($^O !~ /win/i); ## alarm() doesn't work in win32;
+$SERVER = IO::Socket::INET->new( PeerAddr => $conf{'server'},
+ PeerPort => $conf{'port'},
+ LocalAddr => $conf{'bindaddr'},
+ Proto => 'tcp',
+ Autoflush => 1,
+ timeout => $conf{'alarm'},
+);
+alarm(0) if ($^O !~ /win/i); ## alarm() doesn't work in win32;
+
+## Make sure we got connected
+if ( (!$SERVER) or (!$SERVER->opened()) ) {
+ printmsg("ERROR => Connection attempt to $conf{'server'}:$conf{'port'} failed: $@", 0);
+ printmsg("HINT => Try specifying a different mail relay with the -s option.", 1);
+ quit("", 1);
+}
+
+## Save our IP address for later
+$conf{'ip'} = $SERVER->sockhost();
+printmsg("DEBUG => My IP address is: $conf{'ip'}", 1);
+
+
+
+
+
+
+
+#########################
+## Do the SMTP Dance ##
+#########################
+
+## Read initial greeting to make sure we're talking to a live SMTP server
+if (SMTPchat()) { quit($conf{'error'}, 1); }
+
+## We're about to use $opt{'fqdn'}, make sure it isn't empty
+if (!$opt{'fqdn'}) {
+ ## Ok, that means we couldn't get a hostname, how about using the IP address for the HELO instead
+ $opt{'fqdn'} = "[" . $conf{'ip'} . "]";
+}
+
+## EHLO
+if (SMTPchat('EHLO ' . $opt{'fqdn'})) {
+ printmsg($conf{'error'}, 0);
+ printmsg("NOTICE => EHLO command failed, attempting HELO instead");
+ if (SMTPchat('HELO ' . $opt{'fqdn'})) { quit($conf{'error'}, 1); }
+ if ( $opt{'username'} and $opt{'password'} ) {
+ printmsg("WARNING => The mail server does not support SMTP authentication!", 0);
+ }
+}
+else {
+
+ ## Determin if the server supports TLS
+ if ($conf{'SMTPchat_response'} =~ /STARTTLS/) {
+ $conf{'tls_server'} = 1;
+ printmsg("DEBUG => The remote SMTP server supports TLS :)", 2);
+ }
+ else {
+ $conf{'tls_server'} = 0;
+ printmsg("DEBUG => The remote SMTP server does NOT support TLS :(", 2);
+ }
+
+ ## Start TLS if possible
+ if ($conf{'tls_server'} == 1 and $conf{'tls_client'} == 1 and $opt{'tls'} =~ /^(yes|auto)$/) {
+ printmsg("DEBUG => Starting TLS", 2);
+ if (SMTPchat('STARTTLS')) { quit($conf{'error'}, 1); }
+ if (! IO::Socket::SSL->start_SSL($SERVER, SSL_version => 'SSLv23:!SSLv3:!SSLv2', , SSL_verify_mode => 0)) {
+ quit("ERROR => TLS setup failed: " . IO::Socket::SSL::errstr(), 1);
+ }
+ printmsg("DEBUG => TLS: Using cipher: ". $SERVER->get_cipher(), 3);
+ printmsg("DEBUG => TLS session initialized :)", 1);
+
+ ## Restart our SMTP session
+ if (SMTPchat('EHLO ' . $opt{'fqdn'})) { quit($conf{'error'}, 1); }
+ }
+ elsif ($opt{'tls'} eq 'yes' and $conf{'tls_server'} == 0) {
+ quit("ERROR => TLS not possible! Remote SMTP server, $conf{'server'}, does not support it.", 1);
+ }
+
+
+ ## Do SMTP Auth if required
+ if ( $opt{'username'} and $opt{'password'} ) {
+ if ($conf{'SMTPchat_response'} !~ /AUTH\s/) {
+ printmsg("NOTICE => Authentication not supported by the remote SMTP server!", 0);
+ }
+ else {
+ my $auth_succeeded = 0;
+ my $mutual_method = 0;
+
+ # ## SASL CRAM-MD5 authentication method
+ # if ($conf{'SMTPchat_response'} =~ /\bCRAM-MD5\b/i) {
+ # printmsg("DEBUG => SMTP-AUTH: Using CRAM-MD5 authentication method", 1);
+ # if (SMTPchat('AUTH CRAM-MD5')) { quit($conf{'error'}, 1); }
+ #
+ # ## FIXME!!
+ #
+ # printmsg("DEBUG => User authentication was successful", 1);
+ # }
+
+ ## SASL LOGIN authentication method
+ if ($auth_succeeded == 0 and $conf{'SMTPchat_response'} =~ /\bLOGIN\b/i) {
+ $mutual_method = 1;
+ printmsg("DEBUG => SMTP-AUTH: Using LOGIN authentication method", 1);
+ if (!SMTPchat('AUTH LOGIN')) {
+ if (!SMTPchat(base64_encode($opt{'username'}))) {
+ if (!SMTPchat(base64_encode($opt{'password'}))) {
+ $auth_succeeded = 1;
+ printmsg("DEBUG => User authentication was successful (Method: LOGIN)", 1);
+ }
+ }
+ }
+ if ($auth_succeeded == 0) {
+ printmsg("DEBUG => SMTP-AUTH: LOGIN authenticaion failed.", 1);
+ }
+ }
+
+ ## SASL PLAIN authentication method
+ if ($auth_succeeded == 0 and $conf{'SMTPchat_response'} =~ /\bPLAIN\b/i) {
+ $mutual_method = 1;
+ printmsg("DEBUG => SMTP-AUTH: Using PLAIN authentication method", 1);
+ if (SMTPchat('AUTH PLAIN ' . base64_encode("$opt{'username'}\0$opt{'username'}\0$opt{'password'}"))) {
+ printmsg("DEBUG => SMTP-AUTH: PLAIN authenticaion failed.", 1);
+ }
+ else {
+ $auth_succeeded = 1;
+ printmsg("DEBUG => User authentication was successful (Method: PLAIN)", 1);
+ }
+ }
+
+ ## If none of the authentication methods supported by sendEmail were supported by the server, let the user know
+ if ($mutual_method == 0) {
+ printmsg("WARNING => SMTP-AUTH: No mutually supported authentication methods available", 0);
+ }
+
+ ## If we didn't get authenticated, log an error message and exit
+ if ($auth_succeeded == 0) {
+ quit("ERROR => ERROR => SMTP-AUTH: Authentication to $conf{'server'}:$conf{'port'} failed.", 1);
+ }
+ }
+ }
+}
+
+## MAIL FROM
+if (SMTPchat('MAIL FROM:<' .(returnAddressParts($from))[1]. '>')) { quit($conf{'error'}, 1); }
+
+## RCPT TO
+my $oneRcptAccepted = 0;
+foreach my $rcpt (@to, @cc, @bcc) {
+ my ($name, $address) = returnAddressParts($rcpt);
+ if (SMTPchat('RCPT TO:<' . $address . '>')) {
+ printmsg("WARNING => The recipient <$address> was rejected by the mail server, error follows:", 0);
+ $conf{'error'} =~ s/^ERROR/WARNING/o;
+ printmsg($conf{'error'}, 0);
+ }
+ elsif ($oneRcptAccepted == 0) {
+ $oneRcptAccepted = 1;
+ }
+}
+## If no recipients were accepted we need to exit with an error.
+if ($oneRcptAccepted == 0) {
+ quit("ERROR => Exiting. No recipients were accepted for delivery by the mail server.", 1);
+}
+
+## DATA
+if (SMTPchat('DATA')) { quit($conf{'error'}, 1); }
+
+
+###############################
+## Build and send the body ##
+###############################
+printmsg("INFO => Sending message body",1);
+
+## If the message-format is raw just send the message as-is.
+if ($opt{'message-format'} =~ /^raw$/i) {
+ print $SERVER $message;
+}
+
+## If the message-format isn't raw, then build and send the message,
+else {
+
+ ## Message-ID: <MessageID>
+ if ($opt{'message-header'} !~ /^Message-ID:/iom) {
+ $header .= 'Message-ID: <' . $conf{'Message-ID'} . '@' . $conf{'hostname'} . '>' . $CRLF;
+ }
+
+ ## From: "Name" <address@domain.com> (the pointless test below is just to keep scoping correct)
+ if ($from and $opt{'message-header'} !~ /^From:/iom) {
+ my ($name, $address) = returnAddressParts($from);
+ $header .= 'From: "' . $name . '" <' . $address . '>' . $CRLF;
+ }
+
+ ## Reply-To:
+ if ($opt{'reply-to'} and $opt{'message-header'} !~ /^Reply-To:/iom) {
+ my ($name, $address) = returnAddressParts($opt{'reply-to'});
+ $header .= 'Reply-To: "' . $name . '" <' . $address . '>' . $CRLF;
+ }
+
+ ## To: "Name" <address@domain.com>
+ if ($opt{'message-header'} =~ /^To:/iom) {
+ ## The user put the To: header in via -o message-header - dont do anything
+ }
+ elsif (scalar(@to) > 0) {
+ $header .= "To:";
+ for (my $a = 0; $a < scalar(@to); $a++) {
+ my $msg = "";
+
+ my ($name, $address) = returnAddressParts($to[$a]);
+ $msg = " \"$name\" <$address>";
+
+ ## If we're not on the last address add a comma to the end of the line.
+ if (($a + 1) != scalar(@to)) {
+ $msg .= ",";
+ }
+
+ $header .= $msg . $CRLF;
+ }
+ }
+ ## We always want a To: line so if the only recipients were bcc'd they don't see who it was sent to
+ else {
+ $header .= "To: \"Undisclosed Recipients\" <>$CRLF";
+ }
+
+ if (scalar(@cc) > 0 and $opt{'message-header'} !~ /^Cc:/iom) {
+ $header .= "Cc:";
+ for (my $a = 0; $a < scalar(@cc); $a++) {
+ my $msg = "";
+
+ my ($name, $address) = returnAddressParts($cc[$a]);
+ $msg = " \"$name\" <$address>";
+
+ ## If we're not on the last address add a comma to the end of the line.
+ if (($a + 1) != scalar(@cc)) {
+ $msg .= ",";
+ }
+
+ $header .= $msg . $CRLF;
+ }
+ }
+
+ if ($opt{'message-header'} !~ /^Subject:/iom) {
+ $header .= 'Subject: ' . $subject . $CRLF; ## Subject
+ }
+ if ($opt{'message-header'} !~ /^Date:/iom) {
+ $header .= 'Date: ' . $date . $CRLF; ## Date
+ }
+ if ($opt{'message-header'} !~ /^X-Mailer:/iom) {
+ $header .= 'X-Mailer: sendEmail-'.$conf{'version'}.$CRLF; ## X-Mailer
+ }
+ ## I wonder if I should put this in by default?
+ # if ($opt{'message-header'} !~ /^X-Originating-IP:/iom) {
+ # $header .= 'X-Originating-IP: ['.$conf{'ip'}.']'.$CRLF; ## X-Originating-IP
+ # }
+
+ ## Encode all messages with MIME.
+ if ($opt{'message-header'} !~ /^MIME-Version:/iom) {
+ $header .= "MIME-Version: 1.0$CRLF";
+ }
+ if ($opt{'message-header'} !~ /^Content-Type:/iom) {
+ my $content_type = 'multipart/mixed';
+ if (scalar(@attachments) == 0) { $content_type = 'multipart/related'; }
+ $header .= "Content-Type: $content_type; boundary=\"$conf{'delimiter'}\"$CRLF";
+ }
+
+ ## Send additional message header line(s) if specified
+ if ($opt{'message-header'}) {
+ $header .= $opt{'message-header'};
+ }
+
+ ## Send the message header to the server
+ print $SERVER $header . $CRLF;
+
+ ## Start sending the message body to the server
+ print $SERVER "This is a multi-part message in MIME format. To properly display this message you need a MIME-Version 1.0 compliant Email program.$CRLF";
+ print $SERVER "$CRLF";
+
+
+ ## Send message body
+ print $SERVER "--$conf{'delimiter'}$CRLF";
+ ## Send a message content-type header:
+ ## If the message contains HTML...
+ if ($opt{'message-content-type'} eq 'html' or ($opt{'message-content-type'} eq 'auto' and $message =~ /^\s*(<HTML|<!DOCTYPE)/i) ) {
+ printmsg("Setting content-type: text/html", 1);
+ print $SERVER "Content-Type: text/html;$CRLF";
+ }
+ ## Otherwise assume it's plain text...
+ elsif ($opt{'message-content-type'} eq 'text' or $opt{'message-content-type'} eq 'auto') {
+ printmsg("Setting content-type: text/plain", 1);
+ print $SERVER "Content-Type: text/plain;$CRLF";
+ }
+ ## If they've specified their own content-type string...
+ else {
+ printmsg("Setting custom content-type: ".$opt{'message-content-type'}, 1);
+ print $SERVER "Content-Type: ".$opt{'message-content-type'}.";$CRLF";
+ }
+ print $SERVER " charset=\"" . $opt{'message-charset'} . "\"$CRLF";
+ print $SERVER "Content-Transfer-Encoding: 7bit$CRLF";
+ print $SERVER $CRLF . $message;
+
+
+
+ ## Send Attachemnts
+ if (scalar(@attachments) > 0) {
+ ## Disable the alarm so people on modems can send big attachments
+ alarm(0) if ($^O !~ /win/i); ## alarm() doesn't work in win32
+
+ ## Send the attachments
+ foreach my $filename (@attachments) {
+ ## This is check 2, we already checked this above, but just in case...
+ if ( ! -f $filename ) {
+ printmsg("ERROR => The file [$filename] doesn't exist! Email will be sent, but without that attachment.", 0);
+ }
+ elsif ( ! -r $filename ) {
+ printmsg("ERROR => Couldn't open the file [$filename] for reading: $! Email will be sent, but without that attachment.", 0);
+ }
+ else {
+ printmsg("DEBUG => Sending the attachment [$filename]", 1);
+ send_attachment($filename);
+ }
+ }
+ }
+
+
+ ## End the mime encoded message
+ print $SERVER "$CRLF--$conf{'delimiter'}--$CRLF";
+}
+
+
+## Tell the server we are done sending the email
+print $SERVER "$CRLF.$CRLF";
+if (SMTPchat()) { quit($conf{'error'}, 1); }
+
+
+
+####################
+# We are done!!! #
+####################
+
+## Disconnect from the server (don't SMTPchat(), it breaks when using TLS)
+print $SERVER "QUIT$CRLF";
+close $SERVER;
+
+
+
+
+
+
+#######################################
+## Generate exit message/log entry ##
+#######################################
+
+if ($conf{'debug'} or $conf{'logging'}) {
+ printmsg("Generating a detailed exit message", 3);
+
+ ## Put the message together
+ my $output = "Email was sent successfully! From: <" . (returnAddressParts($from))[1] . "> ";
+
+ if (scalar(@to) > 0) {
+ $output .= "To: ";
+ for ($a = 0; $a < scalar(@to); $a++) {
+ $output .= "<" . (returnAddressParts($to[$a]))[1] . "> ";
+ }
+ }
+ if (scalar(@cc) > 0) {
+ $output .= "Cc: ";
+ for ($a = 0; $a < scalar(@cc); $a++) {
+ $output .= "<" . (returnAddressParts($cc[$a]))[1] . "> ";
+ }
+ }
+ if (scalar(@bcc) > 0) {
+ $output .= "Bcc: ";
+ for ($a = 0; $a < scalar(@bcc); $a++) {
+ $output .= "<" . (returnAddressParts($bcc[$a]))[1] . "> ";
+ }
+ }
+ $output .= "Subject: [$subject] " if ($subject);
+ if (scalar(@attachments_names) > 0) {
+ $output .= "Attachment(s): ";
+ foreach(@attachments_names) {
+ $output .= "[$_] ";
+ }
+ }
+ $output .= "Server: [$conf{'server'}:$conf{'port'}]";
+
+
+######################
+# Exit the program #
+######################
+
+ ## Print / Log the detailed message
+ quit($output, 0);
+}
+else {
+ ## Or the standard message
+ quit("Email was sent successfully!", 0);
+}
+