Merged in feature/280-dev-dev01 (pull request #21)

auto-patch  280-dev-dev01-2024-01-19T16_41_58

* auto-patch  280-dev-dev01-2024-01-19T16_41_58
This commit is contained in:
Tony Volpe
2024-01-19 16:44:43 +00:00
parent 2699b5437a
commit be83910651
2125 changed files with 179300 additions and 35639 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,79 @@
/*! IP Geo Block admin icons
* This package includes the following icon font.
* IcoMoon - Free / Designer: Keyamoon / License: GPL / CC BY 4.0
* Zondicons / Designer: Steve Schoger / License: CC BY 4.0
* Material Icons / Designer: Google / License: Apache License 2.0
*/
@font-face {
font-family: 'icomoon';
src: url('fonts/icomoon.eot?jihakz');
src: url('fonts/icomoon.eot?jihakz#iefix') format('embedded-opentype'),
url('fonts/icomoon.ttf?jihakz') format('truetype'),
url('fonts/icomoon.woff?jihakz') format('woff'),
url('fonts/icomoon.svg?jihakz#icomoon') format('svg');
font-weight: normal;
font-style: normal;
}
[class^="ip-geo-block-icon-"], [class*=" ip-geo-block-icon-"] {
/* use !important to prevent issues with browser extensions that change fonts */
font-family: 'icomoon' !important;
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.ip-geo-block-icon-calc {
margin-top: 0.2em !important;
}
.ip-geo-block-icon-calc:before {
content: "\e901";
}
.ip-geo-block-icon-vpn_lock:before {
content: "\e62f";
}
.ip-geo-block-icon-play:before {
content: "\ea1c";
}
.ip-geo-block-icon-pause:before {
content: "\ea1d";
}
.ip-geo-block-icon-stop:before {
content: "\ea1e";
}
.ip-geo-block-icon-warning:before {
content: "\e900";
}
.ip-geo-block-icon-happy:before {
content: "\e9df";
}
.ip-geo-block-icon-grin2:before {
content: "\e9ea";
}
.ip-geo-block-icon-cool:before {
content: "\e9eb";
}
.ip-geo-block-icon-confused:before {
content: "\e9f5";
}
.ip-geo-block-icon-confused2:before {
content: "\e9f6";
}
.ip-geo-block-icon-crying:before {
content: "\ea01";
}
/* Dashicons is the official icon font of the WordPress admin as of 3.8+. */
#toplevel_page_ip-geo-block .dashicons-admin-generic:before {
font-family: 'icomoon';
content: "\e62f";
font-size: 18px;
margin-left: 2px;
}

View File

@@ -0,0 +1,7 @@
/*! IP Geo Block admin icons
* This package includes the following icon font.
* IcoMoon - Free / Designer: Keyamoon / License: GPL / CC BY 4.0
* Zondicons / Designer: Steve Schoger / License: CC BY 4.0
* Material Icons / Designer: Google / License: Apache License 2.0
*/
@font-face{font-family:icomoon;src:url(fonts/icomoon.eot?jihakz);src:url(fonts/icomoon.eot?jihakz#iefix) format('embedded-opentype'),url(fonts/icomoon.ttf?jihakz) format('truetype'),url(fonts/icomoon.woff?jihakz) format('woff'),url(fonts/icomoon.svg?jihakz#icomoon) format('svg');font-weight:400;font-style:normal}[class*=" ip-geo-block-icon-"],[class^=ip-geo-block-icon-]{font-family:icomoon!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ip-geo-block-icon-calc{margin-top:.2em!important}.ip-geo-block-icon-calc:before{content:"\e901"}.ip-geo-block-icon-vpn_lock:before{content:"\e62f"}.ip-geo-block-icon-play:before{content:"\ea1c"}.ip-geo-block-icon-pause:before{content:"\ea1d"}.ip-geo-block-icon-stop:before{content:"\ea1e"}.ip-geo-block-icon-warning:before{content:"\e900"}.ip-geo-block-icon-happy:before{content:"\e9df"}.ip-geo-block-icon-grin2:before{content:"\e9ea"}.ip-geo-block-icon-cool:before{content:"\e9eb"}.ip-geo-block-icon-confused:before{content:"\e9f5"}.ip-geo-block-icon-confused2:before{content:"\e9f6"}.ip-geo-block-icon-crying:before{content:"\ea01"}#toplevel_page_ip-geo-block .dashicons-admin-generic:before{font-family:icomoon;content:"\e62f";font-size:18px;margin-left:2px}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}body{margin:8xp;font-size:14px;line-height:1.4}.container{margin:0;padding:0}.clr:after,.col:after,.container:after,.row:after{content:"";display:table;clear:both}.row{padding-bottom:0}.col{display:block;float:left;width:100%}.span_2{width:8.33333333333%}.span_11{width:45.8333333333%}.span_24{width:100%}fieldset{border:none;margin:0;padding:.5rem}textarea{width:100%;height:4.5rem;resize:horizontal;border:1px solid #ccc;font-size:12px;font-family:Consolas,Monaco,monospace}legend input[type=button]{margin-left:.5rem;vertical-align:middle}#j,#i{display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;justify-content:center;align-items:center}#j{padding:0 .5rem}ul#h{padding:1.5rem 0 0;list-style:none}ul#h li{width:100%;margin:.1rem 0;display:inline-block}ul#h li input{padding:0}#g{height:3em;text-align:center;border:1px solid #ccc;padding:.5rem;font-size:12px;font-family:Consolas,Monaco,monospace}

View File

@@ -0,0 +1,22 @@
<?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="icomoon" horiz-adv-x="1024">
<font-face units-per-em="1024" ascent="960" descent="-64" />
<missing-glyph horiz-adv-x="1024" />
<glyph unicode="&#x20;" horiz-adv-x="512" d="" />
<glyph unicode="&#xe62f;" glyph-name="vpn_lock" d="M426 44.667v84c-46 0-84 38-84 84v44l-206 204c-6-24-8-50-8-76 0-174 130-320 298-340zM808 426.667h86c2-14 2-28 2-42 0-236-190-428-426-428s-428 192-428 428 192 426 428 426c44 0 88-8 128-20v-108c0-46-40-86-86-86h-86v-84c0-24-18-44-42-44h-86v-84h256c24 0 44-20 44-44v-128h42c38 0 70-24 82-58 56 60 88 142 88 230 0 14 0 28-2 42zM904 768.667v20c0 40-32 74-72 74s-72-34-72-74v-20h144zM938 768.667c24 0 44-20 44-44v-170c0-24-20-42-44-42h-212c-24 0-44 18-44 42v170c0 24 20 44 44 44v20c0 58 48 108 106 108s106-50 106-108v-20z" />
<glyph unicode="&#xe900;" glyph-name="warning" d="M1010.432 121.248l-383.968 768c-21.664 43.36-65.952 70.752-114.464 70.752s-92.8-27.392-114.464-70.752l-383.968-768c-19.84-39.68-17.728-86.816 5.6-124.576 23.328-37.696 64.512-60.672 108.864-60.672h767.904c44.384 0 85.568 22.976 108.864 60.672 23.328 37.76 25.44 84.896 5.632 124.576zM575.936 96c0-17.696-14.304-32-32-32h-64c-17.696 0-32 14.304-32 32v64c0 17.696 14.304 32 32 32h64c17.696 0 32-14.304 32-32v-64zM575.936 352c0-17.696-14.304-32-32-32h-64c-17.696 0-32 14.304-32 32v320c0 17.664 14.304 32 32 32h64c17.696 0 32-14.336 32-32v-320z" />
<glyph unicode="&#xe901;" glyph-name="calculator" d="M102.4 870.4c0 56.32 46.080 102.4 102.4 102.4h614.4c56.554 0 102.4-45.846 102.4-102.4v0-819.2c0-56.554-45.846-102.4-102.4-102.4v0h-614.4c-56.554 0-102.4 45.846-102.4 102.4v0 819.2zM256 819.2v-102.4h512v102.4h-512zM256 614.4v-102.4h102.4v102.4h-102.4zM460.8 614.4v-102.4h102.4v102.4h-102.4zM665.6 614.4v-102.4h102.4v102.4h-102.4zM256 409.6v-102.4h102.4v102.4h-102.4zM460.8 409.6v-102.4h102.4v102.4h-102.4zM665.6 409.6v-307.2h102.4v307.2h-102.4zM256 204.8v-102.4h102.4v102.4h-102.4zM460.8 204.8v-102.4h102.4v102.4h-102.4z" />
<glyph unicode="&#xe9df;" glyph-name="happy" d="M512-64c282.77 0 512 229.23 512 512s-229.23 512-512 512-512-229.23-512-512 229.23-512 512-512zM512 864c229.75 0 416-186.25 416-416s-186.25-416-416-416-416 186.25-416 416 186.25 416 416 416zM512 361.24c115.95 0 226.23 30.806 320 84.92-14.574-178.438-153.128-318.16-320-318.16-166.868 0-305.422 139.872-320 318.304 93.77-54.112 204.050-85.064 320-85.064zM256 608c0 53.019 28.654 96 64 96s64-42.981 64-96c0-53.019-28.654-96-64-96s-64 42.981-64 96zM640 608c0 53.019 28.654 96 64 96s64-42.981 64-96c0-53.019-28.654-96-64-96s-64 42.981-64 96z" />
<glyph unicode="&#xe9ea;" glyph-name="grin2" d="M512 960c-282.77 0-512-229.23-512-512s229.226-512 512-512c282.77 0 512 229.23 512 512s-229.23 512-512 512zM704 724c63.962 0 116-52.038 116-116 0-6.378-0.546-12.876-1.628-19.312-1.618-9.632-9.958-16.688-19.724-16.688s-18.108 7.056-19.722 16.69c-6.16 36.684-37.67 53.31-74.926 53.31s-68.766-16.626-74.924-53.31c-1.616-9.632-9.956-16.69-19.722-16.69-0.002 0 0 0-0.002 0-9.766 0-18.106 7.056-19.722 16.688-1.084 6.436-1.63 12.934-1.63 19.312 0 63.962 52.038 116 116 116zM320 724c63.962 0 116-52.038 116-116 0-6.378-0.548-12.876-1.628-19.312-1.618-9.632-9.956-16.688-19.724-16.688s-18.106 7.056-19.722 16.69c-6.16 36.684-37.67 53.31-74.926 53.31s-68.766-16.626-74.924-53.31c-1.616-9.632-9.956-16.69-19.722-16.69 0 0 0 0 0 0-9.766 0-18.106 7.056-19.724 16.688-1.082 6.436-1.63 12.934-1.63 19.312 0 63.962 52.038 116 116 116zM192 384h192v-247.846c-110.094 28.606-192 129.124-192 247.846zM448 128v256h128v-256h-128zM640 136.154v247.846h192c0-118.722-81.904-219.24-192-247.846z" />
<glyph unicode="&#xe9eb;" glyph-name="cool" d="M512-64c282.77 0 512 229.23 512 512s-229.23 512-512 512-512-229.23-512-512 229.23-512 512-512zM512 864c229.75 0 416-186.25 416-416s-186.25-416-416-416-416 186.25-416 416 186.25 416 416 416zM800 704c17.6 0 32-14.4 32-32v-96c0-35.2-28.8-64-64-64h-128c-35.2 0-64 28.8-64 64h-128c0-35.2-28.8-64-64-64h-128c-35.2 0-64 28.8-64 64v96c0 17.6 14.4 32 32 32h192c17.6 0 32-14.4 32-32v-32h128v32c0 17.6 14.4 32 32 32h192zM512 192c93.208 0 174.772 49.818 219.546 124.278l54.88-32.934c-55.966-93.070-157.916-155.344-274.426-155.344-48.458 0-94.384 10.796-135.54 30.082l33.162 55.278c31.354-13.714 65.964-21.36 102.378-21.36z" />
<glyph unicode="&#xe9f5;" glyph-name="confused" d="M512-64c282.77 0 512 229.23 512 512s-229.23 512-512 512-512-229.23-512-512 229.23-512 512-512zM512 864c229.75 0 416-186.25 416-416s-186.25-416-416-416-416 186.25-416 416 186.25 416 416 416zM256 640c0 35.346 28.654 64 64 64s64-28.654 64-64c0-35.346-28.654-64-64-64s-64 28.654-64 64zM640 640c0 35.346 28.654 64 64 64s64-28.654 64-64c0-35.346-28.654-64-64-64s-64 28.654-64 64zM726.106 320h64.864c9.246-72.506-32.452-144.53-103.958-170.56-82.904-30.176-174.9 12.716-205.080 95.616-18.108 49.744-73.306 75.482-123.048 57.372-45.562-16.588-70.956-64.298-60.988-110.424h-64.86c-9.242 72.508 32.45 144.528 103.956 170.56 82.904 30.178 174.902-12.716 205.082-95.614 18.104-49.748 73.306-75.482 123.044-57.372 45.562 16.584 70.956 64.298 60.988 110.422z" />
<glyph unicode="&#xe9f6;" glyph-name="confused2" d="M512 960c-282.77 0-512-229.23-512-512s229.226-512 512-512c282.77 0 512 229.23 512 512s-229.23 512-512 512zM704 704c35.346 0 64-28.654 64-64s-28.654-64-64-64-64 28.654-64 64c0 35.346 28.654 64 64 64zM320 704c35.346 0 64-28.654 64-64s-28.654-64-64-64-64 28.654-64 64c0 35.346 28.654 64 64 64zM687.010 149.44c-82.902-30.18-174.9 12.712-205.080 95.614-18.108 49.742-73.306 75.478-123.048 57.372-45.562-16.588-70.958-64.296-60.988-110.424h-64.86c-9.244 72.508 32.45 144.532 103.956 170.56 82.904 30.18 174.902-12.712 205.082-95.614 18.108-49.742 73.306-75.476 123.046-57.37 45.562 16.584 70.958 64.294 60.988 110.422h64.864c9.24-72.506-32.454-144.532-103.96-170.56z" />
<glyph unicode="&#xea01;" glyph-name="crying" d="M512-64c282.77 0 512 229.23 512 512s-229.23 512-512 512-512-229.23-512-512 229.23-512 512-512zM512 864c229.75 0 416-186.25 416-416s-186.25-416-416-416-416 186.25-416 416 186.25 416 416 416zM800 576h-128c-17.674 0-32 14.328-32 32s14.326 32 32 32h128c17.674 0 32-14.328 32-32s-14.326-32-32-32zM352 576h-128c-17.672 0-32 14.328-32 32s14.328 32 32 32h128c17.672 0 32-14.328 32-32s-14.328-32-32-32zM608 104c-8.19 0-16.378 3.124-22.626 9.374-4.582 4.582-29.42 14.626-73.374 14.626s-68.79-10.044-73.374-14.626c-12.496-12.496-32.758-12.496-45.254 0-12.498 12.496-12.498 32.758 0 45.254 30.122 30.12 92.994 33.372 118.628 33.372 25.632 0 88.506-3.252 118.626-33.374 12.498-12.496 12.498-32.758 0-45.254-6.248-6.248-14.436-9.372-22.626-9.372zM736 384c-17.674 0-32 14.326-32 32v64c0 17.672 14.326 32 32 32s32-14.328 32-32v-64c0-17.674-14.326-32-32-32zM736 192c-17.674 0-32 14.326-32 32v64c0 17.674 14.326 32 32 32s32-14.326 32-32v-64c0-17.674-14.326-32-32-32zM288 384c-17.672 0-32 14.326-32 32v64c0 17.672 14.328 32 32 32s32-14.328 32-32v-64c0-17.674-14.328-32-32-32zM288 192c-17.672 0-32 14.326-32 32v64c0 17.674 14.328 32 32 32s32-14.326 32-32v-64c0-17.674-14.328-32-32-32z" />
<glyph unicode="&#xea1c;" glyph-name="play3" d="M192 832l640-384-640-384z" />
<glyph unicode="&#xea1d;" glyph-name="pause2" d="M128 832h320v-768h-320zM576 832h320v-768h-320z" />
<glyph unicode="&#xea1e;" glyph-name="stop2" d="M128 832h768v-768h-768z" />
</font></defs></svg>

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

@@ -0,0 +1,679 @@
/*! DataTables 1.10.16
* 2008-2017 SpryMedia Ltd - datatables.net/license
*/
table.ip-geo-block-dataTable {
width: 100%;
margin: 0 auto;
clear: both;
border-collapse: separate;
border-spacing: 0;
/*
* Header and footer styles
*/
/*
* Body styles
*/
}
table.ip-geo-block-dataTable thead th,
table.ip-geo-block-dataTable tfoot th {
font-weight: bold;
}
table.ip-geo-block-dataTable thead th,
table.ip-geo-block-dataTable thead td {
padding: 10px 18px;
border-bottom: 1px solid #111;
}
table.ip-geo-block-dataTable thead th:active,
table.ip-geo-block-dataTable thead td:active {
outline: none;
}
table.ip-geo-block-dataTable tfoot th,
table.ip-geo-block-dataTable tfoot td {
padding: 10px 18px 6px 18px;
border-top: 1px solid #111;
}
table.ip-geo-block-dataTable thead .sorting,
table.ip-geo-block-dataTable thead .sorting_asc,
table.ip-geo-block-dataTable thead .sorting_desc,
table.ip-geo-block-dataTable thead .sorting_asc_disabled,
table.ip-geo-block-dataTable thead .sorting_desc_disabled {
cursor: pointer;
*cursor: hand;
background-repeat: no-repeat;
background-position: center right;
}
table.ip-geo-block-dataTable thead .sorting {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAATCAYAAACZZ43PAAAAN0lEQVR4AWO4c+cORZhmBvyH4QEx4D86pqsB/3Fjwgb8J4RpaQBhPES8gE/z0ElI9M9MA1+gAAD5jWGc4eZ87AAAAABJRU5ErkJggg==); /*url("../images/sort_both.png");*/
}
table.ip-geo-block-dataTable thead .sorting_asc {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAATCAIAAAAWBRqYAAAABnRSTlMA3ADcANwpVcdiAAAAdUlEQVR4AWO4QyKgWMONG3eWrrh76xbRGtZvulPTdHfzVuI0nDl7p7XrblXD3Y7eu+fPE6FhwWKgaihasuIuAQ2Hj95pbENoqG+9e/QYbg3Xr9+ZPB2iFIGmzrp78yYODdt3gvxa24yCgCK79pAcD8NEw6gGAPv5+lejjyPQAAAAAElFTkSuQmCC); /*url("../images/sort_asc.png");*/
}
table.ip-geo-block-dataTable thead .sorting_desc {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAATCAIAAAAWBRqYAAAABnRSTlMA3ADcANwpVcdiAAAAcklEQVR4AWO4QyIY2hpGNezac6em6W5tMwoCimzfiUPDzZt3ps66W9WAgiZPv3v9Om4nHT12p74Vobqx7e7ho4T8sGQFQsOCxXcJe/r8+TsdvSDVrV13z5wlLpQ2bwX5fv0mooP11q07S1fcvXFjACMOAM7v+leNDkNAAAAAAElFTkSuQmCC); /*url("../images/sort_desc.png");*/
}
table.ip-geo-block-dataTable thead .sorting_asc_disabled {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAATCAYAAACZZ43PAAAALklEQVR4AWO4c+cORZhmBvyH4QEx4D86pqsB/3Fjwgb8J4RpZsDAJ6RRA0YNAAAd2DjFaOCLnQAAAABJRU5ErkJggg==); /*url("../images/sort_asc_disabled.png");*/
}
table.ip-geo-block-dataTable thead .sorting_desc_disabled {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAATCAYAAACZZ43PAAAALUlEQVR4AWO4c+cORZjqBowaMGrAf0KYlgYQNoToMMClma4GMKBrpqsB9E9IAFTzOMWpD7f6AAAAAElFTkSuQmCC); /*url("../images/sort_desc_disabled.png");*/
}
table.ip-geo-block-dataTable tbody tr {
background-color: #ffffff;
}
table.ip-geo-block-dataTable tbody tr.selected {
background-color: #B0BED9;
}
table.ip-geo-block-dataTable tbody th,
table.ip-geo-block-dataTable tbody td {
padding: 8px 10px;
}
table.ip-geo-block-dataTable.row-border tbody th,
table.ip-geo-block-dataTable.row-border tbody td,
table.ip-geo-block-dataTable.display tbody th,
table.ip-geo-block-dataTable.display tbody td {
border-top: 1px solid #ddd;
}
table.ip-geo-block-dataTable.row-border tbody tr:first-child th,
table.ip-geo-block-dataTable.row-border tbody tr:first-child td,
table.ip-geo-block-dataTable.display tbody tr:first-child th,
table.ip-geo-block-dataTable.display tbody tr:first-child td {
border-top: none;
}
table.ip-geo-block-dataTable.cell-border tbody th,
table.ip-geo-block-dataTable.cell-border tbody td {
border-top: 1px solid #ddd;
border-right: 1px solid #ddd;
}
table.ip-geo-block-dataTable.cell-border tbody tr th:first-child,
table.ip-geo-block-dataTable.cell-border tbody tr td:first-child {
border-left: 1px solid #ddd;
}
table.ip-geo-block-dataTable.cell-border tbody tr:first-child th,
table.ip-geo-block-dataTable.cell-border tbody tr:first-child td {
border-top: none;
}
table.ip-geo-block-dataTable.stripe tbody tr.odd,
table.ip-geo-block-dataTable.display tbody tr.odd {
background-color: #f9f9f9;
}
table.ip-geo-block-dataTable.stripe tbody tr.odd.selected,
table.ip-geo-block-dataTable.display tbody tr.odd.selected {
background-color: #acbad4;
}
table.ip-geo-block-dataTable.hover tbody tr:hover,
table.ip-geo-block-dataTable.display tbody tr:hover {
background-color: #f6f6f6;
}
table.ip-geo-block-dataTable.hover tbody tr:hover.selected,
table.ip-geo-block-dataTable.display tbody tr:hover.selected {
background-color: #aab7d1;
}
table.ip-geo-block-dataTable.order-column tbody tr > .sorting_1,
table.ip-geo-block-dataTable.order-column tbody tr > .sorting_2,
table.ip-geo-block-dataTable.order-column tbody tr > .sorting_3,
table.ip-geo-block-dataTable.display tbody tr > .sorting_1,
table.ip-geo-block-dataTable.display tbody tr > .sorting_2,
table.ip-geo-block-dataTable.display tbody tr > .sorting_3 {
background-color: #fafafa;
}
table.ip-geo-block-dataTable.order-column tbody tr.selected > .sorting_1,
table.ip-geo-block-dataTable.order-column tbody tr.selected > .sorting_2,
table.ip-geo-block-dataTable.order-column tbody tr.selected > .sorting_3,
table.ip-geo-block-dataTable.display tbody tr.selected > .sorting_1,
table.ip-geo-block-dataTable.display tbody tr.selected > .sorting_2,
table.ip-geo-block-dataTable.display tbody tr.selected > .sorting_3 {
background-color: #acbad5;
}
table.ip-geo-block-dataTable.display tbody tr.odd > .sorting_1,
table.ip-geo-block-dataTable.order-column.stripe tbody tr.odd > .sorting_1 {
background-color: #f1f1f1;
}
table.ip-geo-block-dataTable.display tbody tr.odd > .sorting_2,
table.ip-geo-block-dataTable.order-column.stripe tbody tr.odd > .sorting_2 {
background-color: #f3f3f3;
}
table.ip-geo-block-dataTable.display tbody tr.odd > .sorting_3,
table.ip-geo-block-dataTable.order-column.stripe tbody tr.odd > .sorting_3 {
background-color: whitesmoke;
}
table.ip-geo-block-dataTable.display tbody tr.odd.selected > .sorting_1,
table.ip-geo-block-dataTable.order-column.stripe tbody tr.odd.selected > .sorting_1 {
background-color: #a6b4cd;
}
table.ip-geo-block-dataTable.display tbody tr.odd.selected > .sorting_2,
table.ip-geo-block-dataTable.order-column.stripe tbody tr.odd.selected > .sorting_2 {
background-color: #a8b5cf;
}
table.ip-geo-block-dataTable.display tbody tr.odd.selected > .sorting_3,
table.ip-geo-block-dataTable.order-column.stripe tbody tr.odd.selected > .sorting_3 {
background-color: #a9b7d1;
}
table.ip-geo-block-dataTable.display tbody tr.even > .sorting_1,
table.ip-geo-block-dataTable.order-column.stripe tbody tr.even > .sorting_1 {
background-color: #fafafa;
}
table.ip-geo-block-dataTable.display tbody tr.even > .sorting_2,
table.ip-geo-block-dataTable.order-column.stripe tbody tr.even > .sorting_2 {
background-color: #fcfcfc;
}
table.ip-geo-block-dataTable.display tbody tr.even > .sorting_3,
table.ip-geo-block-dataTable.order-column.stripe tbody tr.even > .sorting_3 {
background-color: #fefefe;
}
table.ip-geo-block-dataTable.display tbody tr.even.selected > .sorting_1,
table.ip-geo-block-dataTable.order-column.stripe tbody tr.even.selected > .sorting_1 {
background-color: #acbad5;
}
table.ip-geo-block-dataTable.display tbody tr.even.selected > .sorting_2,
table.ip-geo-block-dataTable.order-column.stripe tbody tr.even.selected > .sorting_2 {
background-color: #aebcd6;
}
table.ip-geo-block-dataTable.display tbody tr.even.selected > .sorting_3,
table.ip-geo-block-dataTable.order-column.stripe tbody tr.even.selected > .sorting_3 {
background-color: #afbdd8;
}
table.ip-geo-block-dataTable.display tbody tr:hover > .sorting_1,
table.ip-geo-block-dataTable.order-column.hover tbody tr:hover > .sorting_1 {
background-color: #eaeaea;
}
table.ip-geo-block-dataTable.display tbody tr:hover > .sorting_2,
table.ip-geo-block-dataTable.order-column.hover tbody tr:hover > .sorting_2 {
background-color: #ececec;
}
table.ip-geo-block-dataTable.display tbody tr:hover > .sorting_3,
table.ip-geo-block-dataTable.order-column.hover tbody tr:hover > .sorting_3 {
background-color: #efefef;
}
table.ip-geo-block-dataTable.display tbody tr:hover.selected > .sorting_1,
table.ip-geo-block-dataTable.order-column.hover tbody tr:hover.selected > .sorting_1 {
background-color: #a2aec7;
}
table.ip-geo-block-dataTable.display tbody tr:hover.selected > .sorting_2,
table.ip-geo-block-dataTable.order-column.hover tbody tr:hover.selected > .sorting_2 {
background-color: #a3b0c9;
}
table.ip-geo-block-dataTable.display tbody tr:hover.selected > .sorting_3,
table.ip-geo-block-dataTable.order-column.hover tbody tr:hover.selected > .sorting_3 {
background-color: #a5b2cb;
}
table.ip-geo-block-dataTable.no-footer {
border-bottom: 1px solid #111;
}
table.ip-geo-block-dataTable.nowrap th,
table.ip-geo-block-dataTable.nowrap td {
white-space: nowrap;
}
table.ip-geo-block-dataTable.compact thead th,
table.ip-geo-block-dataTable.compact thead td {
padding: 4px 17px 4px 4px;
}
table.ip-geo-block-dataTable.compact tfoot th,
table.ip-geo-block-dataTable.compact tfoot td {
padding: 4px;
}
table.ip-geo-block-dataTable.compact tbody th,
table.ip-geo-block-dataTable.compact tbody td {
padding: 4px;
}
table.ip-geo-block-dataTable th.dt-left,
table.ip-geo-block-dataTable td.dt-left {
text-align: left;
}
table.ip-geo-block-dataTable th.dt-center,
table.ip-geo-block-dataTable td.dt-center,
table.ip-geo-block-dataTable td.dataTables_empty {
text-align: center;
}
table.ip-geo-block-dataTable th.dt-right,
table.ip-geo-block-dataTable td.dt-right {
text-align: right;
}
table.ip-geo-block-dataTable th.dt-justify,
table.ip-geo-block-dataTable td.dt-justify {
text-align: justify;
}
table.ip-geo-block-dataTable th.dt-nowrap,
table.ip-geo-block-dataTable td.dt-nowrap {
white-space: nowrap;
}
table.ip-geo-block-dataTable thead th.dt-head-left,
table.ip-geo-block-dataTable thead td.dt-head-left,
table.ip-geo-block-dataTable tfoot th.dt-head-left,
table.ip-geo-block-dataTable tfoot td.dt-head-left {
text-align: left;
}
table.ip-geo-block-dataTable thead th.dt-head-center,
table.ip-geo-block-dataTable thead td.dt-head-center,
table.ip-geo-block-dataTable tfoot th.dt-head-center,
table.ip-geo-block-dataTable tfoot td.dt-head-center {
text-align: center;
}
table.ip-geo-block-dataTable thead th.dt-head-right,
table.ip-geo-block-dataTable thead td.dt-head-right,
table.ip-geo-block-dataTable tfoot th.dt-head-right,
table.ip-geo-block-dataTable tfoot td.dt-head-right {
text-align: right;
}
table.ip-geo-block-dataTable thead th.dt-head-justify,
table.ip-geo-block-dataTable thead td.dt-head-justify,
table.ip-geo-block-dataTable tfoot th.dt-head-justify,
table.ip-geo-block-dataTable tfoot td.dt-head-justify {
text-align: justify;
}
table.ip-geo-block-dataTable thead th.dt-head-nowrap,
table.ip-geo-block-dataTable thead td.dt-head-nowrap,
table.ip-geo-block-dataTable tfoot th.dt-head-nowrap,
table.ip-geo-block-dataTable tfoot td.dt-head-nowrap {
white-space: nowrap;
}
table.ip-geo-block-dataTable tbody th.dt-body-left,
table.ip-geo-block-dataTable tbody td.dt-body-left {
text-align: left;
}
table.ip-geo-block-dataTable tbody th.dt-body-center,
table.ip-geo-block-dataTable tbody td.dt-body-center {
text-align: center;
}
table.ip-geo-block-dataTable tbody th.dt-body-right,
table.ip-geo-block-dataTable tbody td.dt-body-right {
text-align: right;
}
table.ip-geo-block-dataTable tbody th.dt-body-justify,
table.ip-geo-block-dataTable tbody td.dt-body-justify {
text-align: justify;
}
table.ip-geo-block-dataTable tbody th.dt-body-nowrap,
table.ip-geo-block-dataTable tbody td.dt-body-nowrap {
white-space: nowrap;
}
table.ip-geo-block-dataTable,
table.ip-geo-block-dataTable th,
table.ip-geo-block-dataTable td {
box-sizing: content-box;
}
/*
* Control feature layout
*/
div[class*="ip-geo-block"] .dataTables_wrapper {
position: relative;
clear: both;
*zoom: 1;
zoom: 1;
}
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_length {
float: left;
}
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_filter {
float: right;
text-align: right;
}
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_filter input {
margin-left: 0.5em;
}
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_info {
clear: both;
float: left;
padding-top: 0.755em;
}
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate {
float: right;
text-align: right;
padding-top: 0.25em;
}
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate .paginate_button {
box-sizing: border-box;
display: inline-block;
min-width: 1.5em;
padding: 0.5em 1em;
margin-left: 2px;
text-align: center;
text-decoration: none !important;
cursor: pointer;
*cursor: hand;
color: #333 !important;
border: 1px solid transparent;
border-radius: 2px;
}
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate .paginate_button.current,
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
color: #333 !important;
border: 1px solid #979797;
background-color: white;
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, white), color-stop(100%, #dcdcdc));
/* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, white 0%, #dcdcdc 100%);
/* Chrome10+,Safari5.1+ */
background: -moz-linear-gradient(top, white 0%, #dcdcdc 100%);
/* FF3.6+ */
background: -ms-linear-gradient(top, white 0%, #dcdcdc 100%);
/* IE10+ */
background: -o-linear-gradient(top, white 0%, #dcdcdc 100%);
/* Opera 11.10+ */
background: linear-gradient(to bottom, white 0%, #dcdcdc 100%);
/* W3C */
}
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {
cursor: default;
color: #666 !important;
border: 1px solid transparent;
background: transparent;
box-shadow: none;
}
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
color: white !important;
border: 1px solid #111;
background-color: #585858;
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #585858), color-stop(100%, #111));
/* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #585858 0%, #111 100%);
/* Chrome10+,Safari5.1+ */
background: -moz-linear-gradient(top, #585858 0%, #111 100%);
/* FF3.6+ */
background: -ms-linear-gradient(top, #585858 0%, #111 100%);
/* IE10+ */
background: -o-linear-gradient(top, #585858 0%, #111 100%);
/* Opera 11.10+ */
background: linear-gradient(to bottom, #585858 0%, #111 100%);
/* W3C */
}
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate .paginate_button:active {
outline: none;
background-color: #2b2b2b;
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c));
/* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);
/* Chrome10+,Safari5.1+ */
background: -moz-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);
/* FF3.6+ */
background: -ms-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);
/* IE10+ */
background: -o-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);
/* Opera 11.10+ */
background: linear-gradient(to bottom, #2b2b2b 0%, #0c0c0c 100%);
/* W3C */
box-shadow: inset 0 0 3px #111;
}
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate .ellipsis {
padding: 0 1em;
}
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_processing {
position: absolute;
top: 50%;
left: 50%;
width: 100%;
height: 40px;
margin-left: -50%;
margin-top: -25px;
padding-top: 20px;
text-align: center;
font-size: 1.2em;
background-color: white;
background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(25%, rgba(255, 255, 255, 0.9)), color-stop(75%, rgba(255, 255, 255, 0.9)), color-stop(100%, rgba(255, 255, 255, 0)));
background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
background: -moz-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
background: -ms-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
background: -o-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
}
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_length,
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_filter,
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_info,
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_processing,
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate {
color: #333;
}
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_scroll {
clear: both;
}
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody {
*margin-top: -1px;
-webkit-overflow-scrolling: touch;
}
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > th,
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > td,
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > th,
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > td {
vertical-align: middle;
}
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > th > div.dataTables_sizing,
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > td > div.dataTables_sizing,
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > th > div.dataTables_sizing,
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > td > div.dataTables_sizing {
height: 0;
overflow: hidden;
margin: 0 !important;
padding: 0 !important;
}
div[class*="ip-geo-block"] .dataTables_wrapper.no-footer .dataTables_scrollBody {
border-bottom: 1px solid #111;
}
div[class*="ip-geo-block"] .dataTables_wrapper.no-footer div.dataTables_scrollHead table.ip-geo-block-dataTable,
div[class*="ip-geo-block"] .dataTables_wrapper.no-footer div.dataTables_scrollBody > table {
border-bottom: none;
}
div[class*="ip-geo-block"] .dataTables_wrapper:after {
visibility: hidden;
display: block;
content: "";
clear: both;
height: 0;
}
@media screen and (max-width: 767px) {
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_info,
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate {
float: none;
text-align: center;
}
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_paginate {
margin-top: 0.5em;
}
}
@media screen and (max-width: 640px) {
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_length,
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_filter {
float: none;
text-align: center;
}
div[class*="ip-geo-block"] .dataTables_wrapper .dataTables_filter {
margin-top: 0.5em;
}
}
/*! Responsive 2.1.1
* 2014-2016 SpryMedia Ltd - datatables.net/license
*/
table.ip-geo-block-dataTable.dtr-inline.collapsed > tbody > tr > td.child,
table.ip-geo-block-dataTable.dtr-inline.collapsed > tbody > tr > th.child,
table.ip-geo-block-dataTable.dtr-inline.collapsed > tbody > tr > td.dataTables_empty {
cursor: default !important;
}
table.ip-geo-block-dataTable.dtr-inline.collapsed > tbody > tr > td.child:before,
table.ip-geo-block-dataTable.dtr-inline.collapsed > tbody > tr > th.child:before,
table.ip-geo-block-dataTable.dtr-inline.collapsed > tbody > tr > td.dataTables_empty:before {
display: none !important;
}
table.ip-geo-block-dataTable.dtr-inline.collapsed > tbody > tr > td:first-child,
table.ip-geo-block-dataTable.dtr-inline.collapsed > tbody > tr > th:first-child {
position: relative;
padding-left: 30px;
cursor: pointer;
}
table.ip-geo-block-dataTable.dtr-inline.collapsed > tbody > tr > td:first-child:before,
table.ip-geo-block-dataTable.dtr-inline.collapsed > tbody > tr > th:first-child:before {
top: 9px;
left: 4px;
height: 14px;
width: 14px;
display: block;
position: absolute;
color: white;
border: 2px solid white;
border-radius: 14px;
box-shadow: 0 0 3px #444;
box-sizing: content-box;
text-align: center;
font-family: 'Courier New', Courier, monospace;
line-height: 14px;
content: '+';
background-color: #31b131;
}
table.ip-geo-block-dataTable.dtr-inline.collapsed > tbody > tr.parent > td:first-child:before,
table.ip-geo-block-dataTable.dtr-inline.collapsed > tbody > tr.parent > th:first-child:before {
content: '-';
background-color: #d33333;
}
table.ip-geo-block-dataTable.dtr-inline.collapsed > tbody > tr.child td:before {
display: none;
}
table.ip-geo-block-dataTable.dtr-inline.collapsed.compact > tbody > tr > td:first-child,
table.ip-geo-block-dataTable.dtr-inline.collapsed.compact > tbody > tr > th:first-child {
padding-left: 27px;
}
table.ip-geo-block-dataTable.dtr-inline.collapsed.compact > tbody > tr > td:first-child:before,
table.ip-geo-block-dataTable.dtr-inline.collapsed.compact > tbody > tr > th:first-child:before {
top: 5px;
left: 4px;
height: 14px;
width: 14px;
border-radius: 14px;
line-height: 14px;
text-indent: 3px;
}
table.ip-geo-block-dataTable.dtr-column > tbody > tr > td.control,
table.ip-geo-block-dataTable.dtr-column > tbody > tr > th.control {
position: relative;
cursor: pointer;
}
table.ip-geo-block-dataTable.dtr-column > tbody > tr > td.control:before,
table.ip-geo-block-dataTable.dtr-column > tbody > tr > th.control:before {
top: 50%;
left: 50%;
height: 16px;
width: 16px;
margin-top: -10px;
margin-left: -10px;
display: block;
position: absolute;
color: white;
border: 2px solid white;
border-radius: 14px;
box-shadow: 0 0 3px #444;
box-sizing: content-box;
text-align: center;
font-family: 'Courier New', Courier, monospace;
line-height: 14px;
content: '+';
background-color: #31b131;
}
table.ip-geo-block-dataTable.dtr-column > tbody > tr.parent td.control:before,
table.ip-geo-block-dataTable.dtr-column > tbody > tr.parent th.control:before {
content: '-';
background-color: #d33333;
}
table.ip-geo-block-dataTable > tbody > tr.child {
padding: 0.5em 1em;
}
table.ip-geo-block-dataTable > tbody > tr.child:hover {
background: transparent !important;
}
table.ip-geo-block-dataTable > tbody > tr.child ul.dtr-details {
display: inline-block;
list-style-type: none;
margin: 0;
padding: 0;
}
table.ip-geo-block-dataTable > tbody > tr.child ul.dtr-details li {
border-bottom: 1px solid #efefef;
padding: 0.5em 0;
}
table.ip-geo-block-dataTable > tbody > tr.child ul.dtr-details li:first-child {
padding-top: 0;
}
table.ip-geo-block-dataTable > tbody > tr.child ul.dtr-details li:last-child {
border-bottom: none;
}
table.ip-geo-block-dataTable > tbody > tr.child span.dtr-title {
display: inline-block;
min-width: 75px;
font-weight: bold;
}
div.dtr-modal {
position: fixed;
box-sizing: border-box;
top: 0;
left: 0;
height: 100%;
width: 100%;
z-index: 100;
padding: 10em 1em;
}
div.dtr-modal div.dtr-modal-display {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
width: 50%;
height: 50%;
overflow: auto;
margin: auto;
z-index: 102;
overflow: auto;
background-color: #f5f5f7;
border: 1px solid black;
border-radius: 0.5em;
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}
div.dtr-modal div.dtr-modal-content {
position: relative;
padding: 1em;
}
div.dtr-modal div.dtr-modal-close {
position: absolute;
top: 6px;
right: 6px;
width: 22px;
height: 22px;
border: 1px solid #eaeaea;
background-color: #f9f9f9;
text-align: center;
border-radius: 3px;
cursor: pointer;
z-index: 12;
}
div.dtr-modal div.dtr-modal-close:hover {
background-color: #eaeaea;
}
div.dtr-modal div.dtr-modal-background {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 101;
background: rgba(0, 0, 0, 0.6);
}
@media screen and (max-width: 767px) {
div.dtr-modal div.dtr-modal-display {
width: 95%;
}
}
/*! datatables.mark.js v2.0.1
* Copyright (c) 2016-2017 Julian Motz
* https://github.com/julmot/datatables.mark.js/blob/master/LICENSE
*/
mark {
background: orange;
color: black;
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,9 @@
/*! datatables.mark.js v2.0.1
* Copyright (c) 20162017 Julian Motz
* https://github.com/julmot/datatables.mark.js/blob/master/LICENSE
*/
mark {
background: orange;
color: black;
}

View File

@@ -0,0 +1 @@
mark{background:orange;color:black;}

View File

@@ -0,0 +1,449 @@
/*! DataTables 1.10.16
* 2008-2017 SpryMedia Ltd - datatables.net/license
*/
table.dataTable {
width: 100%;
margin: 0 auto;
clear: both;
border-collapse: separate;
border-spacing: 0;
/*
* Header and footer styles
*/
/*
* Body styles
*/
}
table.dataTable thead th,
table.dataTable tfoot th {
font-weight: bold;
}
table.dataTable thead th,
table.dataTable thead td {
padding: 10px 18px;
border-bottom: 1px solid #111;
}
table.dataTable thead th:active,
table.dataTable thead td:active {
outline: none;
}
table.dataTable tfoot th,
table.dataTable tfoot td {
padding: 10px 18px 6px 18px;
border-top: 1px solid #111;
}
table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc,
table.dataTable thead .sorting_asc_disabled,
table.dataTable thead .sorting_desc_disabled {
cursor: pointer;
*cursor: hand;
background-repeat: no-repeat;
background-position: center right;
}
table.dataTable thead .sorting {
background-image: url("../images/sort_both.png");
}
table.dataTable thead .sorting_asc {
background-image: url("../images/sort_asc.png");
}
table.dataTable thead .sorting_desc {
background-image: url("../images/sort_desc.png");
}
table.dataTable thead .sorting_asc_disabled {
background-image: url("../images/sort_asc_disabled.png");
}
table.dataTable thead .sorting_desc_disabled {
background-image: url("../images/sort_desc_disabled.png");
}
table.dataTable tbody tr {
background-color: #ffffff;
}
table.dataTable tbody tr.selected {
background-color: #B0BED9;
}
table.dataTable tbody th,
table.dataTable tbody td {
padding: 8px 10px;
}
table.dataTable.row-border tbody th, table.dataTable.row-border tbody td, table.dataTable.display tbody th, table.dataTable.display tbody td {
border-top: 1px solid #ddd;
}
table.dataTable.row-border tbody tr:first-child th,
table.dataTable.row-border tbody tr:first-child td, table.dataTable.display tbody tr:first-child th,
table.dataTable.display tbody tr:first-child td {
border-top: none;
}
table.dataTable.cell-border tbody th, table.dataTable.cell-border tbody td {
border-top: 1px solid #ddd;
border-right: 1px solid #ddd;
}
table.dataTable.cell-border tbody tr th:first-child,
table.dataTable.cell-border tbody tr td:first-child {
border-left: 1px solid #ddd;
}
table.dataTable.cell-border tbody tr:first-child th,
table.dataTable.cell-border tbody tr:first-child td {
border-top: none;
}
table.dataTable.stripe tbody tr.odd, table.dataTable.display tbody tr.odd {
background-color: #f9f9f9;
}
table.dataTable.stripe tbody tr.odd.selected, table.dataTable.display tbody tr.odd.selected {
background-color: #acbad4;
}
table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover {
background-color: #f6f6f6;
}
table.dataTable.hover tbody tr:hover.selected, table.dataTable.display tbody tr:hover.selected {
background-color: #aab7d1;
}
table.dataTable.order-column tbody tr > .sorting_1,
table.dataTable.order-column tbody tr > .sorting_2,
table.dataTable.order-column tbody tr > .sorting_3, table.dataTable.display tbody tr > .sorting_1,
table.dataTable.display tbody tr > .sorting_2,
table.dataTable.display tbody tr > .sorting_3 {
background-color: #fafafa;
}
table.dataTable.order-column tbody tr.selected > .sorting_1,
table.dataTable.order-column tbody tr.selected > .sorting_2,
table.dataTable.order-column tbody tr.selected > .sorting_3, table.dataTable.display tbody tr.selected > .sorting_1,
table.dataTable.display tbody tr.selected > .sorting_2,
table.dataTable.display tbody tr.selected > .sorting_3 {
background-color: #acbad5;
}
table.dataTable.display tbody tr.odd > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd > .sorting_1 {
background-color: #f1f1f1;
}
table.dataTable.display tbody tr.odd > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd > .sorting_2 {
background-color: #f3f3f3;
}
table.dataTable.display tbody tr.odd > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd > .sorting_3 {
background-color: whitesmoke;
}
table.dataTable.display tbody tr.odd.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_1 {
background-color: #a6b4cd;
}
table.dataTable.display tbody tr.odd.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_2 {
background-color: #a8b5cf;
}
table.dataTable.display tbody tr.odd.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_3 {
background-color: #a9b7d1;
}
table.dataTable.display tbody tr.even > .sorting_1, table.dataTable.order-column.stripe tbody tr.even > .sorting_1 {
background-color: #fafafa;
}
table.dataTable.display tbody tr.even > .sorting_2, table.dataTable.order-column.stripe tbody tr.even > .sorting_2 {
background-color: #fcfcfc;
}
table.dataTable.display tbody tr.even > .sorting_3, table.dataTable.order-column.stripe tbody tr.even > .sorting_3 {
background-color: #fefefe;
}
table.dataTable.display tbody tr.even.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_1 {
background-color: #acbad5;
}
table.dataTable.display tbody tr.even.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_2 {
background-color: #aebcd6;
}
table.dataTable.display tbody tr.even.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_3 {
background-color: #afbdd8;
}
table.dataTable.display tbody tr:hover > .sorting_1, table.dataTable.order-column.hover tbody tr:hover > .sorting_1 {
background-color: #eaeaea;
}
table.dataTable.display tbody tr:hover > .sorting_2, table.dataTable.order-column.hover tbody tr:hover > .sorting_2 {
background-color: #ececec;
}
table.dataTable.display tbody tr:hover > .sorting_3, table.dataTable.order-column.hover tbody tr:hover > .sorting_3 {
background-color: #efefef;
}
table.dataTable.display tbody tr:hover.selected > .sorting_1, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_1 {
background-color: #a2aec7;
}
table.dataTable.display tbody tr:hover.selected > .sorting_2, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_2 {
background-color: #a3b0c9;
}
table.dataTable.display tbody tr:hover.selected > .sorting_3, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_3 {
background-color: #a5b2cb;
}
table.dataTable.no-footer {
border-bottom: 1px solid #111;
}
table.dataTable.nowrap th, table.dataTable.nowrap td {
white-space: nowrap;
}
table.dataTable.compact thead th,
table.dataTable.compact thead td {
padding: 4px 17px 4px 4px;
}
table.dataTable.compact tfoot th,
table.dataTable.compact tfoot td {
padding: 4px;
}
table.dataTable.compact tbody th,
table.dataTable.compact tbody td {
padding: 4px;
}
table.dataTable th.dt-left,
table.dataTable td.dt-left {
text-align: left;
}
table.dataTable th.dt-center,
table.dataTable td.dt-center,
table.dataTable td.dataTables_empty {
text-align: center;
}
table.dataTable th.dt-right,
table.dataTable td.dt-right {
text-align: right;
}
table.dataTable th.dt-justify,
table.dataTable td.dt-justify {
text-align: justify;
}
table.dataTable th.dt-nowrap,
table.dataTable td.dt-nowrap {
white-space: nowrap;
}
table.dataTable thead th.dt-head-left,
table.dataTable thead td.dt-head-left,
table.dataTable tfoot th.dt-head-left,
table.dataTable tfoot td.dt-head-left {
text-align: left;
}
table.dataTable thead th.dt-head-center,
table.dataTable thead td.dt-head-center,
table.dataTable tfoot th.dt-head-center,
table.dataTable tfoot td.dt-head-center {
text-align: center;
}
table.dataTable thead th.dt-head-right,
table.dataTable thead td.dt-head-right,
table.dataTable tfoot th.dt-head-right,
table.dataTable tfoot td.dt-head-right {
text-align: right;
}
table.dataTable thead th.dt-head-justify,
table.dataTable thead td.dt-head-justify,
table.dataTable tfoot th.dt-head-justify,
table.dataTable tfoot td.dt-head-justify {
text-align: justify;
}
table.dataTable thead th.dt-head-nowrap,
table.dataTable thead td.dt-head-nowrap,
table.dataTable tfoot th.dt-head-nowrap,
table.dataTable tfoot td.dt-head-nowrap {
white-space: nowrap;
}
table.dataTable tbody th.dt-body-left,
table.dataTable tbody td.dt-body-left {
text-align: left;
}
table.dataTable tbody th.dt-body-center,
table.dataTable tbody td.dt-body-center {
text-align: center;
}
table.dataTable tbody th.dt-body-right,
table.dataTable tbody td.dt-body-right {
text-align: right;
}
table.dataTable tbody th.dt-body-justify,
table.dataTable tbody td.dt-body-justify {
text-align: justify;
}
table.dataTable tbody th.dt-body-nowrap,
table.dataTable tbody td.dt-body-nowrap {
white-space: nowrap;
}
table.dataTable,
table.dataTable th,
table.dataTable td {
box-sizing: content-box;
}
/*
* Control feature layout
*/
.dataTables_wrapper {
position: relative;
clear: both;
*zoom: 1;
zoom: 1;
}
.dataTables_wrapper .dataTables_length {
float: left;
}
.dataTables_wrapper .dataTables_filter {
float: right;
text-align: right;
}
.dataTables_wrapper .dataTables_filter input {
margin-left: 0.5em;
}
.dataTables_wrapper .dataTables_info {
clear: both;
float: left;
padding-top: 0.755em;
}
.dataTables_wrapper .dataTables_paginate {
float: right;
text-align: right;
padding-top: 0.25em;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
box-sizing: border-box;
display: inline-block;
min-width: 1.5em;
padding: 0.5em 1em;
margin-left: 2px;
text-align: center;
text-decoration: none !important;
cursor: pointer;
*cursor: hand;
color: #333 !important;
border: 1px solid transparent;
border-radius: 2px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
color: #333 !important;
border: 1px solid #979797;
background-color: white;
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, white), color-stop(100%, #dcdcdc));
/* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, white 0%, #dcdcdc 100%);
/* Chrome10+,Safari5.1+ */
background: -moz-linear-gradient(top, white 0%, #dcdcdc 100%);
/* FF3.6+ */
background: -ms-linear-gradient(top, white 0%, #dcdcdc 100%);
/* IE10+ */
background: -o-linear-gradient(top, white 0%, #dcdcdc 100%);
/* Opera 11.10+ */
background: linear-gradient(to bottom, white 0%, #dcdcdc 100%);
/* W3C */
}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {
cursor: default;
color: #666 !important;
border: 1px solid transparent;
background: transparent;
box-shadow: none;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
color: white !important;
border: 1px solid #111;
background-color: #585858;
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #585858), color-stop(100%, #111));
/* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #585858 0%, #111 100%);
/* Chrome10+,Safari5.1+ */
background: -moz-linear-gradient(top, #585858 0%, #111 100%);
/* FF3.6+ */
background: -ms-linear-gradient(top, #585858 0%, #111 100%);
/* IE10+ */
background: -o-linear-gradient(top, #585858 0%, #111 100%);
/* Opera 11.10+ */
background: linear-gradient(to bottom, #585858 0%, #111 100%);
/* W3C */
}
.dataTables_wrapper .dataTables_paginate .paginate_button:active {
outline: none;
background-color: #2b2b2b;
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c));
/* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);
/* Chrome10+,Safari5.1+ */
background: -moz-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);
/* FF3.6+ */
background: -ms-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);
/* IE10+ */
background: -o-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);
/* Opera 11.10+ */
background: linear-gradient(to bottom, #2b2b2b 0%, #0c0c0c 100%);
/* W3C */
box-shadow: inset 0 0 3px #111;
}
.dataTables_wrapper .dataTables_paginate .ellipsis {
padding: 0 1em;
}
.dataTables_wrapper .dataTables_processing {
position: absolute;
top: 50%;
left: 50%;
width: 100%;
height: 40px;
margin-left: -50%;
margin-top: -25px;
padding-top: 20px;
text-align: center;
font-size: 1.2em;
background-color: white;
background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(25%, rgba(255, 255, 255, 0.9)), color-stop(75%, rgba(255, 255, 255, 0.9)), color-stop(100%, rgba(255, 255, 255, 0)));
background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
background: -moz-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
background: -ms-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
background: -o-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
}
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_processing,
.dataTables_wrapper .dataTables_paginate {
color: #333;
}
.dataTables_wrapper .dataTables_scroll {
clear: both;
}
.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody {
*margin-top: -1px;
-webkit-overflow-scrolling: touch;
}
.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > th, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > td, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > th, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > td {
vertical-align: middle;
}
.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > th > div.dataTables_sizing,
.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > td > div.dataTables_sizing, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > th > div.dataTables_sizing,
.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > td > div.dataTables_sizing {
height: 0;
overflow: hidden;
margin: 0 !important;
padding: 0 !important;
}
.dataTables_wrapper.no-footer .dataTables_scrollBody {
border-bottom: 1px solid #111;
}
.dataTables_wrapper.no-footer div.dataTables_scrollHead table.dataTable,
.dataTables_wrapper.no-footer div.dataTables_scrollBody > table {
border-bottom: none;
}
.dataTables_wrapper:after {
visibility: hidden;
display: block;
content: "";
clear: both;
height: 0;
}
@media screen and (max-width: 767px) {
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
float: none;
text-align: center;
}
.dataTables_wrapper .dataTables_paginate {
margin-top: 0.5em;
}
}
@media screen and (max-width: 640px) {
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
float: none;
text-align: center;
}
.dataTables_wrapper .dataTables_filter {
margin-top: 0.5em;
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,182 @@
/*! Responsive 2.1.1
* 2014-2016 SpryMedia Ltd - datatables.net/license
*/
table.dataTable.dtr-inline.collapsed > tbody > tr > td.child,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.child,
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dataTables_empty {
cursor: default !important;
}
table.dataTable.dtr-inline.collapsed > tbody > tr > td.child:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.child:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dataTables_empty:before {
display: none !important;
}
table.dataTable.dtr-inline.collapsed > tbody > tr > td:first-child,
table.dataTable.dtr-inline.collapsed > tbody > tr > th:first-child {
position: relative;
padding-left: 30px;
cursor: pointer;
}
table.dataTable.dtr-inline.collapsed > tbody > tr > td:first-child:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th:first-child:before {
top: 9px;
left: 4px;
height: 14px;
width: 14px;
display: block;
position: absolute;
color: white;
border: 2px solid white;
border-radius: 14px;
box-shadow: 0 0 3px #444;
box-sizing: content-box;
text-align: center;
font-family: 'Courier New', Courier, monospace;
line-height: 14px;
content: '+';
background-color: #31b131;
}
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td:first-child:before,
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th:first-child:before {
content: '-';
background-color: #d33333;
}
table.dataTable.dtr-inline.collapsed > tbody > tr.child td:before {
display: none;
}
table.dataTable.dtr-inline.collapsed.compact > tbody > tr > td:first-child,
table.dataTable.dtr-inline.collapsed.compact > tbody > tr > th:first-child {
padding-left: 27px;
}
table.dataTable.dtr-inline.collapsed.compact > tbody > tr > td:first-child:before,
table.dataTable.dtr-inline.collapsed.compact > tbody > tr > th:first-child:before {
top: 5px;
left: 4px;
height: 14px;
width: 14px;
border-radius: 14px;
line-height: 14px;
text-indent: 3px;
}
table.dataTable.dtr-column > tbody > tr > td.control,
table.dataTable.dtr-column > tbody > tr > th.control {
position: relative;
cursor: pointer;
}
table.dataTable.dtr-column > tbody > tr > td.control:before,
table.dataTable.dtr-column > tbody > tr > th.control:before {
top: 50%;
left: 50%;
height: 16px;
width: 16px;
margin-top: -10px;
margin-left: -10px;
display: block;
position: absolute;
color: white;
border: 2px solid white;
border-radius: 14px;
box-shadow: 0 0 3px #444;
box-sizing: content-box;
text-align: center;
font-family: 'Courier New', Courier, monospace;
line-height: 14px;
content: '+';
background-color: #31b131;
}
table.dataTable.dtr-column > tbody > tr.parent td.control:before,
table.dataTable.dtr-column > tbody > tr.parent th.control:before {
content: '-';
background-color: #d33333;
}
table.dataTable > tbody > tr.child {
padding: 0.5em 1em;
}
table.dataTable > tbody > tr.child:hover {
background: transparent !important;
}
table.dataTable > tbody > tr.child ul.dtr-details {
display: inline-block;
list-style-type: none;
margin: 0;
padding: 0;
}
table.dataTable > tbody > tr.child ul.dtr-details li {
border-bottom: 1px solid #efefef;
padding: 0.5em 0;
}
table.dataTable > tbody > tr.child ul.dtr-details li:first-child {
padding-top: 0;
}
table.dataTable > tbody > tr.child ul.dtr-details li:last-child {
border-bottom: none;
}
table.dataTable > tbody > tr.child span.dtr-title {
display: inline-block;
min-width: 75px;
font-weight: bold;
}
div.dtr-modal {
position: fixed;
box-sizing: border-box;
top: 0;
left: 0;
height: 100%;
width: 100%;
z-index: 100;
padding: 10em 1em;
}
div.dtr-modal div.dtr-modal-display {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
width: 50%;
height: 50%;
overflow: auto;
margin: auto;
z-index: 102;
overflow: auto;
background-color: #f5f5f7;
border: 1px solid black;
border-radius: 0.5em;
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}
div.dtr-modal div.dtr-modal-content {
position: relative;
padding: 1em;
}
div.dtr-modal div.dtr-modal-close {
position: absolute;
top: 6px;
right: 6px;
width: 22px;
height: 22px;
border: 1px solid #eaeaea;
background-color: #f9f9f9;
text-align: center;
border-radius: 3px;
cursor: pointer;
z-index: 12;
}
div.dtr-modal div.dtr-modal-close:hover {
background-color: #eaeaea;
}
div.dtr-modal div.dtr-modal-background {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 101;
background: rgba(0, 0, 0, 0.6);
}
@media screen and (max-width: 767px) {
div.dtr-modal div.dtr-modal-display {
width: 95%;
}
}

View File

@@ -0,0 +1 @@
table.dataTable.dtr-inline.collapsed>tbody>tr>td.child,table.dataTable.dtr-inline.collapsed>tbody>tr>th.child,table.dataTable.dtr-inline.collapsed>tbody>tr>td.dataTables_empty{cursor:default !important}table.dataTable.dtr-inline.collapsed>tbody>tr>td.child:before,table.dataTable.dtr-inline.collapsed>tbody>tr>th.child:before,table.dataTable.dtr-inline.collapsed>tbody>tr>td.dataTables_empty:before{display:none !important}table.dataTable.dtr-inline.collapsed>tbody>tr>td:first-child,table.dataTable.dtr-inline.collapsed>tbody>tr>th:first-child{position:relative;padding-left:30px;cursor:pointer}table.dataTable.dtr-inline.collapsed>tbody>tr>td:first-child:before,table.dataTable.dtr-inline.collapsed>tbody>tr>th:first-child:before{top:9px;left:4px;height:14px;width:14px;display:block;position:absolute;color:white;border:2px solid white;border-radius:14px;box-shadow:0 0 3px #444;box-sizing:content-box;text-align:center;font-family:'Courier New', Courier, monospace;line-height:14px;content:'+';background-color:#31b131}table.dataTable.dtr-inline.collapsed>tbody>tr.parent>td:first-child:before,table.dataTable.dtr-inline.collapsed>tbody>tr.parent>th:first-child:before{content:'-';background-color:#d33333}table.dataTable.dtr-inline.collapsed>tbody>tr.child td:before{display:none}table.dataTable.dtr-inline.collapsed.compact>tbody>tr>td:first-child,table.dataTable.dtr-inline.collapsed.compact>tbody>tr>th:first-child{padding-left:27px}table.dataTable.dtr-inline.collapsed.compact>tbody>tr>td:first-child:before,table.dataTable.dtr-inline.collapsed.compact>tbody>tr>th:first-child:before{top:5px;left:4px;height:14px;width:14px;border-radius:14px;line-height:14px;text-indent:3px}table.dataTable.dtr-column>tbody>tr>td.control,table.dataTable.dtr-column>tbody>tr>th.control{position:relative;cursor:pointer}table.dataTable.dtr-column>tbody>tr>td.control:before,table.dataTable.dtr-column>tbody>tr>th.control:before{top:50%;left:50%;height:16px;width:16px;margin-top:-10px;margin-left:-10px;display:block;position:absolute;color:white;border:2px solid white;border-radius:14px;box-shadow:0 0 3px #444;box-sizing:content-box;text-align:center;font-family:'Courier New', Courier, monospace;line-height:14px;content:'+';background-color:#31b131}table.dataTable.dtr-column>tbody>tr.parent td.control:before,table.dataTable.dtr-column>tbody>tr.parent th.control:before{content:'-';background-color:#d33333}table.dataTable>tbody>tr.child{padding:0.5em 1em}table.dataTable>tbody>tr.child:hover{background:transparent !important}table.dataTable>tbody>tr.child ul.dtr-details{display:inline-block;list-style-type:none;margin:0;padding:0}table.dataTable>tbody>tr.child ul.dtr-details li{border-bottom:1px solid #efefef;padding:0.5em 0}table.dataTable>tbody>tr.child ul.dtr-details li:first-child{padding-top:0}table.dataTable>tbody>tr.child ul.dtr-details li:last-child{border-bottom:none}table.dataTable>tbody>tr.child span.dtr-title{display:inline-block;min-width:75px;font-weight:bold}div.dtr-modal{position:fixed;box-sizing:border-box;top:0;left:0;height:100%;width:100%;z-index:100;padding:10em 1em}div.dtr-modal div.dtr-modal-display{position:absolute;top:0;left:0;bottom:0;right:0;width:50%;height:50%;overflow:auto;margin:auto;z-index:102;overflow:auto;background-color:#f5f5f7;border:1px solid black;border-radius:0.5em;box-shadow:0 12px 30px rgba(0,0,0,0.6)}div.dtr-modal div.dtr-modal-content{position:relative;padding:1em}div.dtr-modal div.dtr-modal-close{position:absolute;top:6px;right:6px;width:22px;height:22px;border:1px solid #eaeaea;background-color:#f9f9f9;text-align:center;border-radius:3px;cursor:pointer;z-index:12}div.dtr-modal div.dtr-modal-close:hover{background-color:#eaeaea}div.dtr-modal div.dtr-modal-background{position:fixed;top:0;left:0;right:0;bottom:0;z-index:101;background:rgba(0,0,0,0.6)}@media screen and (max-width: 767px){div.dtr-modal div.dtr-modal-display{width:95%}}

Binary file not shown.

After

Width:  |  Height:  |  Size: 894 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 B

View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 20162017 Julian Motz
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,26 @@
/*!
Responsive 2.1.1
2014-2016 SpryMedia Ltd - datatables.net/license
*/
(function(c){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(l){return c(l,window,document)}):"object"===typeof exports?module.exports=function(l,k){l||(l=window);if(!k||!k.fn.dataTable)k=require("datatables.net")(l,k).$;return c(k,l,l.document)}:c(jQuery,window,document)})(function(c,l,k,p){var m=c.fn.dataTable,j=function(b,a){if(!m.versionCheck||!m.versionCheck("1.10.3"))throw"DataTables Responsive requires DataTables 1.10.3 or newer";this.s={dt:new m.Api(b),columns:[],
current:[]};this.s.dt.settings()[0].responsive||(a&&"string"===typeof a.details?a.details={type:a.details}:a&&!1===a.details?a.details={type:!1}:a&&!0===a.details&&(a.details={type:"inline"}),this.c=c.extend(!0,{},j.defaults,m.defaults.responsive,a),b.responsive=this,this._constructor())};c.extend(j.prototype,{_constructor:function(){var b=this,a=this.s.dt,d=a.settings()[0],e=c(l).width();a.settings()[0]._responsive=this;c(l).on("resize.dtr orientationchange.dtr",m.util.throttle(function(){var a=
c(l).width();a!==e&&(b._resize(),e=a)}));d.oApi._fnCallbackReg(d,"aoRowCreatedCallback",function(e){-1!==c.inArray(!1,b.s.current)&&c(">td, >th",e).each(function(e){e=a.column.index("toData",e);!1===b.s.current[e]&&c(this).css("display","none")})});a.on("destroy.dtr",function(){a.off(".dtr");c(a.table().body()).off(".dtr");c(l).off("resize.dtr orientationchange.dtr");c.each(b.s.current,function(a,e){!1===e&&b._setColumnVis(a,!0)})});this.c.breakpoints.sort(function(a,b){return a.width<b.width?1:a.width>
b.width?-1:0});this._classLogic();this._resizeAuto();d=this.c.details;!1!==d.type&&(b._detailsInit(),a.on("column-visibility.dtr",function(){b._classLogic();b._resizeAuto();b._resize()}),a.on("draw.dtr",function(){b._redrawChildren()}),c(a.table().node()).addClass("dtr-"+d.type));a.on("column-reorder.dtr",function(){b._classLogic();b._resizeAuto();b._resize()});a.on("column-sizing.dtr",function(){b._resizeAuto();b._resize()});a.on("preXhr.dtr",function(){var e=[];a.rows().every(function(){this.child.isShown()&&
e.push(this.id(true))});a.one("draw.dtr",function(){a.rows(e).every(function(){b._detailsDisplay(this,false)})})});a.on("init.dtr",function(){b._resizeAuto();b._resize();c.inArray(false,b.s.current)&&a.columns.adjust()});this._resize()},_columnsVisiblity:function(b){var a=this.s.dt,d=this.s.columns,e,f,g=d.map(function(a,b){return{columnIdx:b,priority:a.priority}}).sort(function(a,b){return a.priority!==b.priority?a.priority-b.priority:a.columnIdx-b.columnIdx}),h=c.map(d,function(a){return a.auto&&
null===a.minWidth?!1:!0===a.auto?"-":-1!==c.inArray(b,a.includeIn)}),n=0;e=0;for(f=h.length;e<f;e++)!0===h[e]&&(n+=d[e].minWidth);e=a.settings()[0].oScroll;e=e.sY||e.sX?e.iBarWidth:0;a=a.table().container().offsetWidth-e-n;e=0;for(f=h.length;e<f;e++)d[e].control&&(a-=d[e].minWidth);n=!1;e=0;for(f=g.length;e<f;e++){var i=g[e].columnIdx;"-"===h[i]&&(!d[i].control&&d[i].minWidth)&&(n||0>a-d[i].minWidth?(n=!0,h[i]=!1):h[i]=!0,a-=d[i].minWidth)}g=!1;e=0;for(f=d.length;e<f;e++)if(!d[e].control&&!d[e].never&&
!h[e]){g=!0;break}e=0;for(f=d.length;e<f;e++)d[e].control&&(h[e]=g);-1===c.inArray(!0,h)&&(h[0]=!0);return h},_classLogic:function(){var b=this,a=this.c.breakpoints,d=this.s.dt,e=d.columns().eq(0).map(function(a){var b=this.column(a),e=b.header().className,a=d.settings()[0].aoColumns[a].responsivePriority;a===p&&(b=c(b.header()).data("priority"),a=b!==p?1*b:1E4);return{className:e,includeIn:[],auto:!1,control:!1,never:e.match(/\bnever\b/)?!0:!1,priority:a}}),f=function(a,b){var d=e[a].includeIn;-1===
c.inArray(b,d)&&d.push(b)},g=function(c,d,i,g){if(i)if("max-"===i){g=b._find(d).width;d=0;for(i=a.length;d<i;d++)a[d].width<=g&&f(c,a[d].name)}else if("min-"===i){g=b._find(d).width;d=0;for(i=a.length;d<i;d++)a[d].width>=g&&f(c,a[d].name)}else{if("not-"===i){d=0;for(i=a.length;d<i;d++)-1===a[d].name.indexOf(g)&&f(c,a[d].name)}}else e[c].includeIn.push(d)};e.each(function(b,e){for(var d=b.className.split(" "),f=!1,j=0,l=d.length;j<l;j++){var k=c.trim(d[j]);if("all"===k){f=!0;b.includeIn=c.map(a,function(a){return a.name});
return}if("none"===k||b.never){f=!0;return}if("control"===k){f=!0;b.control=!0;return}c.each(a,function(a,b){var d=b.name.split("-"),c=k.match(RegExp("(min\\-|max\\-|not\\-)?("+d[0]+")(\\-[_a-zA-Z0-9])?"));c&&(f=!0,c[2]===d[0]&&c[3]==="-"+d[1]?g(e,b.name,c[1],c[2]+c[3]):c[2]===d[0]&&!c[3]&&g(e,b.name,c[1],c[2]))})}f||(b.auto=!0)});this.s.columns=e},_detailsDisplay:function(b,a){var d=this,e=this.s.dt,f=this.c.details;if(f&&!1!==f.type){var g=f.display(b,a,function(){return f.renderer(e,b[0],d._detailsObj(b[0]))});
(!0===g||!1===g)&&c(e.table().node()).triggerHandler("responsive-display.dt",[e,b,g,a])}},_detailsInit:function(){var b=this,a=this.s.dt,d=this.c.details;"inline"===d.type&&(d.target="td:first-child, th:first-child");a.on("draw.dtr",function(){b._tabIndexes()});b._tabIndexes();c(a.table().body()).on("keyup.dtr","td, th",function(b){b.keyCode===13&&c(this).data("dtr-keyboard")&&c(this).click()});var e=d.target;c(a.table().body()).on("click.dtr mousedown.dtr mouseup.dtr","string"===typeof e?e:"td, th",
function(d){if(c(a.table().node()).hasClass("collapsed")&&c.inArray(c(this).closest("tr").get(0),a.rows().nodes().toArray())!==-1){if(typeof e==="number"){var g=e<0?a.columns().eq(0).length+e:e;if(a.cell(this).index().column!==g)return}g=a.row(c(this).closest("tr"));d.type==="click"?b._detailsDisplay(g,false):d.type==="mousedown"?c(this).css("outline","none"):d.type==="mouseup"&&c(this).blur().css("outline","")}})},_detailsObj:function(b){var a=this,d=this.s.dt;return c.map(this.s.columns,function(e,
c){if(!e.never&&!e.control)return{title:d.settings()[0].aoColumns[c].sTitle,data:d.cell(b,c).render(a.c.orthogonal),hidden:d.column(c).visible()&&!a.s.current[c],columnIndex:c,rowIndex:b}})},_find:function(b){for(var a=this.c.breakpoints,d=0,c=a.length;d<c;d++)if(a[d].name===b)return a[d]},_redrawChildren:function(){var b=this,a=this.s.dt;a.rows({page:"current"}).iterator("row",function(c,e){a.row(e);b._detailsDisplay(a.row(e),!0)})},_resize:function(){var b=this,a=this.s.dt,d=c(l).width(),e=this.c.breakpoints,
f=e[0].name,g=this.s.columns,h,j=this.s.current.slice();for(h=e.length-1;0<=h;h--)if(d<=e[h].width){f=e[h].name;break}var i=this._columnsVisiblity(f);this.s.current=i;e=!1;h=0;for(d=g.length;h<d;h++)if(!1===i[h]&&!g[h].never&&!g[h].control){e=!0;break}c(a.table().node()).toggleClass("collapsed",e);var k=!1;a.columns().eq(0).each(function(a,c){i[c]!==j[c]&&(k=!0,b._setColumnVis(a,i[c]))});k&&(this._redrawChildren(),c(a.table().node()).trigger("responsive-resize.dt",[a,this.s.current]))},_resizeAuto:function(){var b=
this.s.dt,a=this.s.columns;if(this.c.auto&&-1!==c.inArray(!0,c.map(a,function(b){return b.auto}))){b.table().node();var d=b.table().node().cloneNode(!1),e=c(b.table().header().cloneNode(!1)).appendTo(d),f=c(b.table().body()).clone(!1,!1).empty().appendTo(d),g=b.columns().header().filter(function(a){return b.column(a).visible()}).to$().clone(!1).css("display","table-cell");c(f).append(c(b.rows({page:"current"}).nodes()).clone(!1)).find("th, td").css("display","");if(f=b.table().footer()){var f=c(f.cloneNode(!1)).appendTo(d),
h=b.columns().footer().filter(function(a){return b.column(a).visible()}).to$().clone(!1).css("display","table-cell");c("<tr/>").append(h).appendTo(f)}c("<tr/>").append(g).appendTo(e);"inline"===this.c.details.type&&c(d).addClass("dtr-inline collapsed");c(d).find("[name]").removeAttr("name");d=c("<div/>").css({width:1,height:1,overflow:"hidden"}).append(d);d.insertBefore(b.table().node());g.each(function(c){c=b.column.index("fromVisible",c);a[c].minWidth=this.offsetWidth||0});d.remove()}},_setColumnVis:function(b,
a){var d=this.s.dt,e=a?"":"none";c(d.column(b).header()).css("display",e);c(d.column(b).footer()).css("display",e);d.column(b).nodes().to$().css("display",e)},_tabIndexes:function(){var b=this.s.dt,a=b.cells({page:"current"}).nodes().to$(),d=b.settings()[0],e=this.c.details.target;a.filter("[data-dtr-keyboard]").removeData("[data-dtr-keyboard]");a="number"===typeof e?":eq("+e+")":e;"td:first-child, th:first-child"===a&&(a=">td:first-child, >th:first-child");c(a,b.rows({page:"current"}).nodes()).attr("tabIndex",
d.iTabIndex).data("dtr-keyboard",1)}});j.breakpoints=[{name:"desktop",width:Infinity},{name:"tablet-l",width:1024},{name:"tablet-p",width:768},{name:"mobile-l",width:480},{name:"mobile-p",width:320}];j.display={childRow:function(b,a,d){if(a){if(c(b.node()).hasClass("parent"))return b.child(d(),"child").show(),!0}else{if(b.child.isShown())return b.child(!1),c(b.node()).removeClass("parent"),!1;b.child(d(),"child").show();c(b.node()).addClass("parent");return!0}},childRowImmediate:function(b,a,d){if(!a&&
b.child.isShown()||!b.responsive.hasHidden())return b.child(!1),c(b.node()).removeClass("parent"),!1;b.child(d(),"child").show();c(b.node()).addClass("parent");return!0},modal:function(b){return function(a,d,e){if(d)c("div.dtr-modal-content").empty().append(e());else{var f=function(){g.remove();c(k).off("keypress.dtr")},g=c('<div class="dtr-modal"/>').append(c('<div class="dtr-modal-display"/>').append(c('<div class="dtr-modal-content"/>').append(e())).append(c('<div class="dtr-modal-close">&times;</div>').click(function(){f()}))).append(c('<div class="dtr-modal-background"/>').click(function(){f()})).appendTo("body");
c(k).on("keyup.dtr",function(a){27===a.keyCode&&(a.stopPropagation(),f())})}b&&b.header&&c("div.dtr-modal-content").prepend("<h2>"+b.header(a)+"</h2>")}}};j.renderer={listHidden:function(){return function(b,a,d){return(b=c.map(d,function(a){return a.hidden?'<li data-dtr-index="'+a.columnIndex+'" data-dt-row="'+a.rowIndex+'" data-dt-column="'+a.columnIndex+'"><span class="dtr-title">'+a.title+'</span> <span class="dtr-data">'+a.data+"</span></li>":""}).join(""))?c('<ul data-dtr-index="'+a+'" class="dtr-details"/>').append(b):
!1}},tableAll:function(b){b=c.extend({tableClass:""},b);return function(a,d,e){a=c.map(e,function(a){return'<tr data-dt-row="'+a.rowIndex+'" data-dt-column="'+a.columnIndex+'"><td>'+a.title+":</td> <td>"+a.data+"</td></tr>"}).join("");return c('<table class="'+b.tableClass+' dtr-details" width="100%"/>').append(a)}}};j.defaults={breakpoints:j.breakpoints,auto:!0,details:{display:j.display.childRow,renderer:j.renderer.listHidden(),target:0,type:"inline"},orthogonal:"display"};var o=c.fn.dataTable.Api;
o.register("responsive()",function(){return this});o.register("responsive.index()",function(b){b=c(b);return{column:b.data("dtr-index"),row:b.parent().data("dtr-index")}});o.register("responsive.rebuild()",function(){return this.iterator("table",function(b){b._responsive&&b._responsive._classLogic()})});o.register("responsive.recalc()",function(){return this.iterator("table",function(b){b._responsive&&(b._responsive._resizeAuto(),b._responsive._resize())})});o.register("responsive.hasHidden()",function(){var b=
this.context[0];return b._responsive?-1!==c.inArray(!1,b._responsive.s.current):!1});j.version="2.1.1";c.fn.dataTable.Responsive=j;c.fn.DataTable.Responsive=j;c(k).on("preInit.dt.dtr",function(b,a){if("dt"===b.namespace&&(c(a.nTable).hasClass("responsive")||c(a.nTable).hasClass("dt-responsive")||a.oInit.responsive||m.defaults.responsive)){var d=a.oInit.responsive;!1!==d&&new j(a,c.isPlainObject(d)?d:{})}});return j});

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,114 @@
/*!***************************************************
* datatables.mark.js v2.0.1
* https://github.com/julmot/datatables.mark.js
* Copyright (c) 20162017, Julian Motz
* Released under the MIT license https://git.io/voRZ7
*****************************************************/
'use strict';
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
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; };
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
(function (factory, window, document) {
if ((typeof exports === 'undefined' ? 'undefined' : _typeof(exports)) === 'object') {
var jquery = require('jquery');
require('datatables.net');
require('mark.js/dist/jquery.mark.js');
module.exports = factory(window, document, jquery);
} else if (typeof define === 'function' && define.amd) {
define(['jquery', 'datatables.net', 'markjs'], function (jQuery) {
return factory(window, document, jQuery);
});
} else {
factory(window, document, jQuery);
}
})(function (window, document, $) {
var MarkDataTables = function () {
function MarkDataTables(dtInstance, options) {
_classCallCheck(this, MarkDataTables);
if (!$.fn.mark || !$.fn.unmark) {
throw new Error('jquery.mark.js is necessary for datatables.mark.js');
}
this.instance = dtInstance;
this.options = (typeof options === 'undefined' ? 'undefined' : _typeof(options)) === 'object' ? options : {};
this.intervalThreshold = 49;
this.intervalMs = 300;
this.initMarkListener();
}
_createClass(MarkDataTables, [{
key: 'initMarkListener',
value: function initMarkListener() {
var _this = this;
var ev = 'draw.dt.dth column-visibility.dt.dth column-reorder.dt.dth';
var intvl = null;
this.instance.on(ev, function () {
var rows = _this.instance.rows({
filter: 'applied',
page: 'current'
}).nodes().length;
if (rows > _this.intervalThreshold) {
clearTimeout(intvl);
intvl = setTimeout(function () {
_this.mark();
}, _this.intervalMs);
} else {
_this.mark();
}
});
this.instance.on('destroy', function () {
_this.instance.off(ev);
});
this.mark();
}
}, {
key: 'mark',
value: function mark() {
var _this2 = this;
var globalSearch = this.instance.search();
$(this.instance.table().body()).unmark(this.options);
this.instance.columns({
search: 'applied',
page: 'current'
}).nodes().each(function (nodes, colIndex) {
var columnSearch = _this2.instance.column(colIndex).search(),
searchVal = columnSearch || globalSearch;
if (searchVal) {
nodes.forEach(function (node) {
$(node).mark(searchVal, _this2.options);
});
}
});
}
}]);
return MarkDataTables;
}();
$(document).on('init.dt.dth', function (event, settings) {
if (event.namespace !== 'dt') {
return;
}
var dtInstance = $.fn.dataTable.Api(settings);
var options = null;
if (dtInstance.init().mark) {
options = dtInstance.init().mark;
} else if ($.fn.dataTable.defaults.mark) {
options = $.fn.dataTable.defaults.mark;
}
if (options === null) {
return;
}
new MarkDataTables(dtInstance, options);
});
}, window, document);

View File

@@ -0,0 +1,7 @@
/*!***************************************************
* datatables.mark.js v2.0.1
* https://github.com/julmot/datatables.mark.js
* Copyright (c) 20162017, Julian Motz
* Released under the MIT license https://git.io/voRZ7
*****************************************************/
"use strict";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),_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,n){if("object"===("undefined"==typeof exports?"undefined":_typeof(exports))){var r=require("jquery");require("datatables.net"),require("mark.js/dist/jquery.mark.js"),module.exports=e(t,n,r)}else"function"==typeof define&&define.amd?define(["jquery","datatables.net","markjs"],function(r){return e(t,n,r)}):e(t,n,jQuery)}(function(e,t,n){var r=function(){function e(t,r){if(_classCallCheck(this,e),!n.fn.mark||!n.fn.unmark)throw new Error("jquery.mark.js is necessary for datatables.mark.js");this.instance=t,this.options="object"===(void 0===r?"undefined":_typeof(r))?r:{},this.intervalThreshold=49,this.intervalMs=300,this.initMarkListener()}return _createClass(e,[{key:"initMarkListener",value:function(){var e=this,t="draw.dt.dth column-visibility.dt.dth column-reorder.dt.dth",n=null;this.instance.on(t,function(){e.instance.rows({filter:"applied",page:"current"}).nodes().length>e.intervalThreshold?(clearTimeout(n),n=setTimeout(function(){e.mark()},e.intervalMs)):e.mark()}),this.instance.on("destroy",function(){e.instance.off(t)}),this.mark()}},{key:"mark",value:function(){var e=this,t=this.instance.search();n(this.instance.table().body()).unmark(this.options),this.instance.columns({search:"applied",page:"current"}).nodes().each(function(r,a){var i=e.instance.column(a).search()||t;i&&r.forEach(function(t){n(t).mark(i,e.options)})})}}]),e}();n(t).on("init.dt.dth",function(e,t){if("dt"===e.namespace){var a=n.fn.dataTable.Api(t),i=null;a.init().mark?i=a.init().mark:n.fn.dataTable.defaults.mark&&(i=n.fn.dataTable.defaults.mark),null!==i&&new r(a,i)}})},window,document);

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,164 @@
/*!
DataTables 1.10.16
2008-2017 SpryMedia Ltd - datatables.net/license
*/
(function(h){"function"===typeof define&&define.amd?define(["jquery"],function(E){return h(E,window,document)}):"object"===typeof exports?module.exports=function(E,G){E||(E=window);G||(G="undefined"!==typeof window?require("jquery"):require("jquery")(E));return h(G,E,E.document)}:h(jQuery,window,document)})(function(h,E,G,k){function X(a){var b,c,d={};h.each(a,function(e){if((b=e.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(b[1]+" "))c=e.replace(b[0],b[2].toLowerCase()),
d[c]=e,"o"===b[1]&&X(a[e])});a._hungarianMap=d}function I(a,b,c){a._hungarianMap||X(a);var d;h.each(b,function(e){d=a._hungarianMap[e];if(d!==k&&(c||b[d]===k))"o"===d.charAt(0)?(b[d]||(b[d]={}),h.extend(!0,b[d],b[e]),I(a[d],b[d],c)):b[d]=b[e]})}function Ca(a){var b=m.defaults.oLanguage,c=a.sZeroRecords;!a.sEmptyTable&&(c&&"No data available in table"===b.sEmptyTable)&&F(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&(c&&"Loading..."===b.sLoadingRecords)&&F(a,a,"sZeroRecords","sLoadingRecords");
a.sInfoThousands&&(a.sThousands=a.sInfoThousands);(a=a.sDecimal)&&cb(a)}function db(a){A(a,"ordering","bSort");A(a,"orderMulti","bSortMulti");A(a,"orderClasses","bSortClasses");A(a,"orderCellsTop","bSortCellsTop");A(a,"order","aaSorting");A(a,"orderFixed","aaSortingFixed");A(a,"paging","bPaginate");A(a,"pagingType","sPaginationType");A(a,"pageLength","iDisplayLength");A(a,"searching","bFilter");"boolean"===typeof a.sScrollX&&(a.sScrollX=a.sScrollX?"100%":"");"boolean"===typeof a.scrollX&&(a.scrollX=
a.scrollX?"100%":"");if(a=a.aoSearchCols)for(var b=0,c=a.length;b<c;b++)a[b]&&I(m.models.oSearch,a[b])}function eb(a){A(a,"orderable","bSortable");A(a,"orderData","aDataSort");A(a,"orderSequence","asSorting");A(a,"orderDataType","sortDataType");var b=a.aDataSort;"number"===typeof b&&!h.isArray(b)&&(a.aDataSort=[b])}function fb(a){if(!m.__browser){var b={};m.__browser=b;var c=h("<div/>").css({position:"fixed",top:0,left:-1*h(E).scrollLeft(),height:1,width:1,overflow:"hidden"}).append(h("<div/>").css({position:"absolute",
top:1,left:1,width:100,overflow:"scroll"}).append(h("<div/>").css({width:"100%",height:10}))).appendTo("body"),d=c.children(),e=d.children();b.barWidth=d[0].offsetWidth-d[0].clientWidth;b.bScrollOversize=100===e[0].offsetWidth&&100!==d[0].clientWidth;b.bScrollbarLeft=1!==Math.round(e.offset().left);b.bBounding=c[0].getBoundingClientRect().width?!0:!1;c.remove()}h.extend(a.oBrowser,m.__browser);a.oScroll.iBarWidth=m.__browser.barWidth}function gb(a,b,c,d,e,f){var g,j=!1;c!==k&&(g=c,j=!0);for(;d!==
e;)a.hasOwnProperty(d)&&(g=j?b(g,a[d],d,a):a[d],j=!0,d+=f);return g}function Da(a,b){var c=m.defaults.column,d=a.aoColumns.length,c=h.extend({},m.models.oColumn,c,{nTh:b?b:G.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mData:c.mData?c.mData:d,idx:d});a.aoColumns.push(c);c=a.aoPreSearchCols;c[d]=h.extend({},m.models.oSearch,c[d]);ja(a,d,h(b).data())}function ja(a,b,c){var b=a.aoColumns[b],d=a.oClasses,e=h(b.nTh);if(!b.sWidthOrig){b.sWidthOrig=
e.attr("width")||null;var f=(e.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);f&&(b.sWidthOrig=f[1])}c!==k&&null!==c&&(eb(c),I(m.defaults.column,c),c.mDataProp!==k&&!c.mData&&(c.mData=c.mDataProp),c.sType&&(b._sManualType=c.sType),c.className&&!c.sClass&&(c.sClass=c.className),c.sClass&&e.addClass(c.sClass),h.extend(b,c),F(b,c,"sWidth","sWidthOrig"),c.iDataSort!==k&&(b.aDataSort=[c.iDataSort]),F(b,c,"aDataSort"));var g=b.mData,j=Q(g),i=b.mRender?Q(b.mRender):null,c=function(a){return"string"===
typeof a&&-1!==a.indexOf("@")};b._bAttrSrc=h.isPlainObject(g)&&(c(g.sort)||c(g.type)||c(g.filter));b._setter=null;b.fnGetData=function(a,b,c){var d=j(a,b,k,c);return i&&b?i(d,b,a,c):d};b.fnSetData=function(a,b,c){return R(g)(a,b,c)};"number"!==typeof g&&(a._rowReadObject=!0);a.oFeatures.bSort||(b.bSortable=!1,e.addClass(d.sSortableNone));a=-1!==h.inArray("asc",b.asSorting);c=-1!==h.inArray("desc",b.asSorting);!b.bSortable||!a&&!c?(b.sSortingClass=d.sSortableNone,b.sSortingClassJUI=""):a&&!c?(b.sSortingClass=
d.sSortableAsc,b.sSortingClassJUI=d.sSortJUIAscAllowed):!a&&c?(b.sSortingClass=d.sSortableDesc,b.sSortingClassJUI=d.sSortJUIDescAllowed):(b.sSortingClass=d.sSortable,b.sSortingClassJUI=d.sSortJUI)}function Y(a){if(!1!==a.oFeatures.bAutoWidth){var b=a.aoColumns;Ea(a);for(var c=0,d=b.length;c<d;c++)b[c].nTh.style.width=b[c].sWidth}b=a.oScroll;(""!==b.sY||""!==b.sX)&&ka(a);r(a,null,"column-sizing",[a])}function Z(a,b){var c=la(a,"bVisible");return"number"===typeof c[b]?c[b]:null}function $(a,b){var c=
la(a,"bVisible"),c=h.inArray(b,c);return-1!==c?c:null}function aa(a){var b=0;h.each(a.aoColumns,function(a,d){d.bVisible&&"none"!==h(d.nTh).css("display")&&b++});return b}function la(a,b){var c=[];h.map(a.aoColumns,function(a,e){a[b]&&c.push(e)});return c}function Fa(a){var b=a.aoColumns,c=a.aoData,d=m.ext.type.detect,e,f,g,j,i,h,l,q,t;e=0;for(f=b.length;e<f;e++)if(l=b[e],t=[],!l.sType&&l._sManualType)l.sType=l._sManualType;else if(!l.sType){g=0;for(j=d.length;g<j;g++){i=0;for(h=c.length;i<h;i++){t[i]===
k&&(t[i]=B(a,i,e,"type"));q=d[g](t[i],a);if(!q&&g!==d.length-1)break;if("html"===q)break}if(q){l.sType=q;break}}l.sType||(l.sType="string")}}function hb(a,b,c,d){var e,f,g,j,i,n,l=a.aoColumns;if(b)for(e=b.length-1;0<=e;e--){n=b[e];var q=n.targets!==k?n.targets:n.aTargets;h.isArray(q)||(q=[q]);f=0;for(g=q.length;f<g;f++)if("number"===typeof q[f]&&0<=q[f]){for(;l.length<=q[f];)Da(a);d(q[f],n)}else if("number"===typeof q[f]&&0>q[f])d(l.length+q[f],n);else if("string"===typeof q[f]){j=0;for(i=l.length;j<
i;j++)("_all"==q[f]||h(l[j].nTh).hasClass(q[f]))&&d(j,n)}}if(c){e=0;for(a=c.length;e<a;e++)d(e,c[e])}}function M(a,b,c,d){var e=a.aoData.length,f=h.extend(!0,{},m.models.oRow,{src:c?"dom":"data",idx:e});f._aData=b;a.aoData.push(f);for(var g=a.aoColumns,j=0,i=g.length;j<i;j++)g[j].sType=null;a.aiDisplayMaster.push(e);b=a.rowIdFn(b);b!==k&&(a.aIds[b]=f);(c||!a.oFeatures.bDeferRender)&&Ga(a,e,c,d);return e}function ma(a,b){var c;b instanceof h||(b=h(b));return b.map(function(b,e){c=Ha(a,e);return M(a,
c.data,e,c.cells)})}function B(a,b,c,d){var e=a.iDraw,f=a.aoColumns[c],g=a.aoData[b]._aData,j=f.sDefaultContent,i=f.fnGetData(g,d,{settings:a,row:b,col:c});if(i===k)return a.iDrawError!=e&&null===j&&(J(a,0,"Requested unknown parameter "+("function"==typeof f.mData?"{function}":"'"+f.mData+"'")+" for row "+b+", column "+c,4),a.iDrawError=e),j;if((i===g||null===i)&&null!==j&&d!==k)i=j;else if("function"===typeof i)return i.call(g);return null===i&&"display"==d?"":i}function ib(a,b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,
d,{settings:a,row:b,col:c})}function Ia(a){return h.map(a.match(/(\\.|[^\.])+/g)||[""],function(a){return a.replace(/\\\./g,".")})}function Q(a){if(h.isPlainObject(a)){var b={};h.each(a,function(a,c){c&&(b[a]=Q(c))});return function(a,c,f,g){var j=b[c]||b._;return j!==k?j(a,c,f,g):a}}if(null===a)return function(a){return a};if("function"===typeof a)return function(b,c,f,g){return a(b,c,f,g)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("[")||-1!==a.indexOf("("))){var c=function(a,
b,f){var g,j;if(""!==f){j=Ia(f);for(var i=0,n=j.length;i<n;i++){f=j[i].match(ba);g=j[i].match(U);if(f){j[i]=j[i].replace(ba,"");""!==j[i]&&(a=a[j[i]]);g=[];j.splice(0,i+1);j=j.join(".");if(h.isArray(a)){i=0;for(n=a.length;i<n;i++)g.push(c(a[i],b,j))}a=f[0].substring(1,f[0].length-1);a=""===a?g:g.join(a);break}else if(g){j[i]=j[i].replace(U,"");a=a[j[i]]();continue}if(null===a||a[j[i]]===k)return k;a=a[j[i]]}}return a};return function(b,e){return c(b,e,a)}}return function(b){return b[a]}}function R(a){if(h.isPlainObject(a))return R(a._);
if(null===a)return function(){};if("function"===typeof a)return function(b,d,e){a(b,"set",d,e)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("[")||-1!==a.indexOf("("))){var b=function(a,d,e){var e=Ia(e),f;f=e[e.length-1];for(var g,j,i=0,n=e.length-1;i<n;i++){g=e[i].match(ba);j=e[i].match(U);if(g){e[i]=e[i].replace(ba,"");a[e[i]]=[];f=e.slice();f.splice(0,i+1);g=f.join(".");if(h.isArray(d)){j=0;for(n=d.length;j<n;j++)f={},b(f,d[j],g),a[e[i]].push(f)}else a[e[i]]=d;return}j&&(e[i]=e[i].replace(U,
""),a=a[e[i]](d));if(null===a[e[i]]||a[e[i]]===k)a[e[i]]={};a=a[e[i]]}if(f.match(U))a[f.replace(U,"")](d);else a[f.replace(ba,"")]=d};return function(c,d){return b(c,d,a)}}return function(b,d){b[a]=d}}function Ja(a){return D(a.aoData,"_aData")}function na(a){a.aoData.length=0;a.aiDisplayMaster.length=0;a.aiDisplay.length=0;a.aIds={}}function oa(a,b,c){for(var d=-1,e=0,f=a.length;e<f;e++)a[e]==b?d=e:a[e]>b&&a[e]--; -1!=d&&c===k&&a.splice(d,1)}function ca(a,b,c,d){var e=a.aoData[b],f,g=function(c,d){for(;c.childNodes.length;)c.removeChild(c.firstChild);
c.innerHTML=B(a,b,d,"display")};if("dom"===c||(!c||"auto"===c)&&"dom"===e.src)e._aData=Ha(a,e,d,d===k?k:e._aData).data;else{var j=e.anCells;if(j)if(d!==k)g(j[d],d);else{c=0;for(f=j.length;c<f;c++)g(j[c],c)}}e._aSortData=null;e._aFilterData=null;g=a.aoColumns;if(d!==k)g[d].sType=null;else{c=0;for(f=g.length;c<f;c++)g[c].sType=null;Ka(a,e)}}function Ha(a,b,c,d){var e=[],f=b.firstChild,g,j,i=0,n,l=a.aoColumns,q=a._rowReadObject,d=d!==k?d:q?{}:[],t=function(a,b){if("string"===typeof a){var c=a.indexOf("@");
-1!==c&&(c=a.substring(c+1),R(a)(d,b.getAttribute(c)))}},m=function(a){if(c===k||c===i)j=l[i],n=h.trim(a.innerHTML),j&&j._bAttrSrc?(R(j.mData._)(d,n),t(j.mData.sort,a),t(j.mData.type,a),t(j.mData.filter,a)):q?(j._setter||(j._setter=R(j.mData)),j._setter(d,n)):d[i]=n;i++};if(f)for(;f;){g=f.nodeName.toUpperCase();if("TD"==g||"TH"==g)m(f),e.push(f);f=f.nextSibling}else{e=b.anCells;f=0;for(g=e.length;f<g;f++)m(e[f])}if(b=b.firstChild?b:b.nTr)(b=b.getAttribute("id"))&&R(a.rowId)(d,b);return{data:d,cells:e}}
function Ga(a,b,c,d){var e=a.aoData[b],f=e._aData,g=[],j,i,n,l,q;if(null===e.nTr){j=c||G.createElement("tr");e.nTr=j;e.anCells=g;j._DT_RowIndex=b;Ka(a,e);l=0;for(q=a.aoColumns.length;l<q;l++){n=a.aoColumns[l];i=c?d[l]:G.createElement(n.sCellType);i._DT_CellIndex={row:b,column:l};g.push(i);if((!c||n.mRender||n.mData!==l)&&(!h.isPlainObject(n.mData)||n.mData._!==l+".display"))i.innerHTML=B(a,b,l,"display");n.sClass&&(i.className+=" "+n.sClass);n.bVisible&&!c?j.appendChild(i):!n.bVisible&&c&&i.parentNode.removeChild(i);
n.fnCreatedCell&&n.fnCreatedCell.call(a.oInstance,i,B(a,b,l),f,b,l)}r(a,"aoRowCreatedCallback",null,[j,f,b])}e.nTr.setAttribute("role","row")}function Ka(a,b){var c=b.nTr,d=b._aData;if(c){var e=a.rowIdFn(d);e&&(c.id=e);d.DT_RowClass&&(e=d.DT_RowClass.split(" "),b.__rowc=b.__rowc?qa(b.__rowc.concat(e)):e,h(c).removeClass(b.__rowc.join(" ")).addClass(d.DT_RowClass));d.DT_RowAttr&&h(c).attr(d.DT_RowAttr);d.DT_RowData&&h(c).data(d.DT_RowData)}}function jb(a){var b,c,d,e,f,g=a.nTHead,j=a.nTFoot,i=0===
h("th, td",g).length,n=a.oClasses,l=a.aoColumns;i&&(e=h("<tr/>").appendTo(g));b=0;for(c=l.length;b<c;b++)f=l[b],d=h(f.nTh).addClass(f.sClass),i&&d.appendTo(e),a.oFeatures.bSort&&(d.addClass(f.sSortingClass),!1!==f.bSortable&&(d.attr("tabindex",a.iTabIndex).attr("aria-controls",a.sTableId),La(a,f.nTh,b))),f.sTitle!=d[0].innerHTML&&d.html(f.sTitle),Ma(a,"header")(a,d,f,n);i&&da(a.aoHeader,g);h(g).find(">tr").attr("role","row");h(g).find(">tr>th, >tr>td").addClass(n.sHeaderTH);h(j).find(">tr>th, >tr>td").addClass(n.sFooterTH);
if(null!==j){a=a.aoFooter[0];b=0;for(c=a.length;b<c;b++)f=l[b],f.nTf=a[b].cell,f.sClass&&h(f.nTf).addClass(f.sClass)}}function ea(a,b,c){var d,e,f,g=[],j=[],i=a.aoColumns.length,n;if(b){c===k&&(c=!1);d=0;for(e=b.length;d<e;d++){g[d]=b[d].slice();g[d].nTr=b[d].nTr;for(f=i-1;0<=f;f--)!a.aoColumns[f].bVisible&&!c&&g[d].splice(f,1);j.push([])}d=0;for(e=g.length;d<e;d++){if(a=g[d].nTr)for(;f=a.firstChild;)a.removeChild(f);f=0;for(b=g[d].length;f<b;f++)if(n=i=1,j[d][f]===k){a.appendChild(g[d][f].cell);
for(j[d][f]=1;g[d+i]!==k&&g[d][f].cell==g[d+i][f].cell;)j[d+i][f]=1,i++;for(;g[d][f+n]!==k&&g[d][f].cell==g[d][f+n].cell;){for(c=0;c<i;c++)j[d+c][f+n]=1;n++}h(g[d][f].cell).attr("rowspan",i).attr("colspan",n)}}}}function N(a){var b=r(a,"aoPreDrawCallback","preDraw",[a]);if(-1!==h.inArray(!1,b))C(a,!1);else{var b=[],c=0,d=a.asStripeClasses,e=d.length,f=a.oLanguage,g=a.iInitDisplayStart,j="ssp"==y(a),i=a.aiDisplay;a.bDrawing=!0;g!==k&&-1!==g&&(a._iDisplayStart=j?g:g>=a.fnRecordsDisplay()?0:g,a.iInitDisplayStart=
-1);var g=a._iDisplayStart,n=a.fnDisplayEnd();if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++,C(a,!1);else if(j){if(!a.bDestroying&&!kb(a))return}else a.iDraw++;if(0!==i.length){f=j?a.aoData.length:n;for(j=j?0:g;j<f;j++){var l=i[j],q=a.aoData[l];null===q.nTr&&Ga(a,l);l=q.nTr;if(0!==e){var t=d[c%e];q._sRowStripe!=t&&(h(l).removeClass(q._sRowStripe).addClass(t),q._sRowStripe=t)}r(a,"aoRowCallback",null,[l,q._aData,c,j]);b.push(l);c++}}else c=f.sZeroRecords,1==a.iDraw&&"ajax"==y(a)?c=f.sLoadingRecords:
f.sEmptyTable&&0===a.fnRecordsTotal()&&(c=f.sEmptyTable),b[0]=h("<tr/>",{"class":e?d[0]:""}).append(h("<td />",{valign:"top",colSpan:aa(a),"class":a.oClasses.sRowEmpty}).html(c))[0];r(a,"aoHeaderCallback","header",[h(a.nTHead).children("tr")[0],Ja(a),g,n,i]);r(a,"aoFooterCallback","footer",[h(a.nTFoot).children("tr")[0],Ja(a),g,n,i]);d=h(a.nTBody);d.children().detach();d.append(h(b));r(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1}}function S(a,b){var c=a.oFeatures,d=c.bFilter;
c.bSort&&lb(a);d?fa(a,a.oPreviousSearch):a.aiDisplay=a.aiDisplayMaster.slice();!0!==b&&(a._iDisplayStart=0);a._drawHold=b;N(a);a._drawHold=!1}function mb(a){var b=a.oClasses,c=h(a.nTable),c=h("<div/>").insertBefore(c),d=a.oFeatures,e=h("<div/>",{id:a.sTableId+"_wrapper","class":b.sWrapper+(a.nTFoot?"":" "+b.sNoFooter)});a.nHolding=c[0];a.nTableWrapper=e[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var f=a.sDom.split(""),g,j,i,n,l,q,k=0;k<f.length;k++){g=null;j=f[k];if("<"==j){i=h("<div/>")[0];
n=f[k+1];if("'"==n||'"'==n){l="";for(q=2;f[k+q]!=n;)l+=f[k+q],q++;"H"==l?l=b.sJUIHeader:"F"==l&&(l=b.sJUIFooter);-1!=l.indexOf(".")?(n=l.split("."),i.id=n[0].substr(1,n[0].length-1),i.className=n[1]):"#"==l.charAt(0)?i.id=l.substr(1,l.length-1):i.className=l;k+=q}e.append(i);e=h(i)}else if(">"==j)e=e.parent();else if("l"==j&&d.bPaginate&&d.bLengthChange)g=nb(a);else if("f"==j&&d.bFilter)g=ob(a);else if("r"==j&&d.bProcessing)g=pb(a);else if("t"==j)g=qb(a);else if("i"==j&&d.bInfo)g=rb(a);else if("p"==
j&&d.bPaginate)g=sb(a);else if(0!==m.ext.feature.length){i=m.ext.feature;q=0;for(n=i.length;q<n;q++)if(j==i[q].cFeature){g=i[q].fnInit(a);break}}g&&(i=a.aanFeatures,i[j]||(i[j]=[]),i[j].push(g),e.append(g))}c.replaceWith(e);a.nHolding=null}function da(a,b){var c=h(b).children("tr"),d,e,f,g,j,i,n,l,q,k;a.splice(0,a.length);f=0;for(i=c.length;f<i;f++)a.push([]);f=0;for(i=c.length;f<i;f++){d=c[f];for(e=d.firstChild;e;){if("TD"==e.nodeName.toUpperCase()||"TH"==e.nodeName.toUpperCase()){l=1*e.getAttribute("colspan");
q=1*e.getAttribute("rowspan");l=!l||0===l||1===l?1:l;q=!q||0===q||1===q?1:q;g=0;for(j=a[f];j[g];)g++;n=g;k=1===l?!0:!1;for(j=0;j<l;j++)for(g=0;g<q;g++)a[f+g][n+j]={cell:e,unique:k},a[f+g].nTr=d}e=e.nextSibling}}}function ra(a,b,c){var d=[];c||(c=a.aoHeader,b&&(c=[],da(c,b)));for(var b=0,e=c.length;b<e;b++)for(var f=0,g=c[b].length;f<g;f++)if(c[b][f].unique&&(!d[f]||!a.bSortCellsTop))d[f]=c[b][f].cell;return d}function sa(a,b,c){r(a,"aoServerParams","serverParams",[b]);if(b&&h.isArray(b)){var d={},
e=/(.*?)\[\]$/;h.each(b,function(a,b){var c=b.name.match(e);c?(c=c[0],d[c]||(d[c]=[]),d[c].push(b.value)):d[b.name]=b.value});b=d}var f,g=a.ajax,j=a.oInstance,i=function(b){r(a,null,"xhr",[a,b,a.jqXHR]);c(b)};if(h.isPlainObject(g)&&g.data){f=g.data;var n=h.isFunction(f)?f(b,a):f,b=h.isFunction(f)&&n?n:h.extend(!0,b,n);delete g.data}n={data:b,success:function(b){var c=b.error||b.sError;c&&J(a,0,c);a.json=b;i(b)},dataType:"json",cache:!1,type:a.sServerMethod,error:function(b,c){var d=r(a,null,"xhr",
[a,null,a.jqXHR]);-1===h.inArray(!0,d)&&("parsererror"==c?J(a,0,"Invalid JSON response",1):4===b.readyState&&J(a,0,"Ajax error",7));C(a,!1)}};a.oAjaxData=b;r(a,null,"preXhr",[a,b]);a.fnServerData?a.fnServerData.call(j,a.sAjaxSource,h.map(b,function(a,b){return{name:b,value:a}}),i,a):a.sAjaxSource||"string"===typeof g?a.jqXHR=h.ajax(h.extend(n,{url:g||a.sAjaxSource})):h.isFunction(g)?a.jqXHR=g.call(j,b,i,a):(a.jqXHR=h.ajax(h.extend(n,g)),g.data=f)}function kb(a){return a.bAjaxDataGet?(a.iDraw++,C(a,
!0),sa(a,tb(a),function(b){ub(a,b)}),!1):!0}function tb(a){var b=a.aoColumns,c=b.length,d=a.oFeatures,e=a.oPreviousSearch,f=a.aoPreSearchCols,g,j=[],i,n,l,k=V(a);g=a._iDisplayStart;i=!1!==d.bPaginate?a._iDisplayLength:-1;var t=function(a,b){j.push({name:a,value:b})};t("sEcho",a.iDraw);t("iColumns",c);t("sColumns",D(b,"sName").join(","));t("iDisplayStart",g);t("iDisplayLength",i);var pa={draw:a.iDraw,columns:[],order:[],start:g,length:i,search:{value:e.sSearch,regex:e.bRegex}};for(g=0;g<c;g++)n=b[g],
l=f[g],i="function"==typeof n.mData?"function":n.mData,pa.columns.push({data:i,name:n.sName,searchable:n.bSearchable,orderable:n.bSortable,search:{value:l.sSearch,regex:l.bRegex}}),t("mDataProp_"+g,i),d.bFilter&&(t("sSearch_"+g,l.sSearch),t("bRegex_"+g,l.bRegex),t("bSearchable_"+g,n.bSearchable)),d.bSort&&t("bSortable_"+g,n.bSortable);d.bFilter&&(t("sSearch",e.sSearch),t("bRegex",e.bRegex));d.bSort&&(h.each(k,function(a,b){pa.order.push({column:b.col,dir:b.dir});t("iSortCol_"+a,b.col);t("sSortDir_"+
a,b.dir)}),t("iSortingCols",k.length));b=m.ext.legacy.ajax;return null===b?a.sAjaxSource?j:pa:b?j:pa}function ub(a,b){var c=ta(a,b),d=b.sEcho!==k?b.sEcho:b.draw,e=b.iTotalRecords!==k?b.iTotalRecords:b.recordsTotal,f=b.iTotalDisplayRecords!==k?b.iTotalDisplayRecords:b.recordsFiltered;if(d){if(1*d<a.iDraw)return;a.iDraw=1*d}na(a);a._iRecordsTotal=parseInt(e,10);a._iRecordsDisplay=parseInt(f,10);d=0;for(e=c.length;d<e;d++)M(a,c[d]);a.aiDisplay=a.aiDisplayMaster.slice();a.bAjaxDataGet=!1;N(a);a._bInitComplete||
ua(a,b);a.bAjaxDataGet=!0;C(a,!1)}function ta(a,b){var c=h.isPlainObject(a.ajax)&&a.ajax.dataSrc!==k?a.ajax.dataSrc:a.sAjaxDataProp;return"data"===c?b.aaData||b[c]:""!==c?Q(c)(b):b}function ob(a){var b=a.oClasses,c=a.sTableId,d=a.oLanguage,e=a.oPreviousSearch,f=a.aanFeatures,g='<input type="search" class="'+b.sFilterInput+'"/>',j=d.sSearch,j=j.match(/_INPUT_/)?j.replace("_INPUT_",g):j+g,b=h("<div/>",{id:!f.f?c+"_filter":null,"class":b.sFilter}).append(h("<label/>").append(j)),f=function(){var b=!this.value?
"":this.value;b!=e.sSearch&&(fa(a,{sSearch:b,bRegex:e.bRegex,bSmart:e.bSmart,bCaseInsensitive:e.bCaseInsensitive}),a._iDisplayStart=0,N(a))},g=null!==a.searchDelay?a.searchDelay:"ssp"===y(a)?400:0,i=h("input",b).val(e.sSearch).attr("placeholder",d.sSearchPlaceholder).on("keyup.DT search.DT input.DT paste.DT cut.DT",g?Na(f,g):f).on("keypress.DT",function(a){if(13==a.keyCode)return!1}).attr("aria-controls",c);h(a.nTable).on("search.dt.DT",function(b,c){if(a===c)try{i[0]!==G.activeElement&&i.val(e.sSearch)}catch(d){}});
return b[0]}function fa(a,b,c){var d=a.oPreviousSearch,e=a.aoPreSearchCols,f=function(a){d.sSearch=a.sSearch;d.bRegex=a.bRegex;d.bSmart=a.bSmart;d.bCaseInsensitive=a.bCaseInsensitive};Fa(a);if("ssp"!=y(a)){vb(a,b.sSearch,c,b.bEscapeRegex!==k?!b.bEscapeRegex:b.bRegex,b.bSmart,b.bCaseInsensitive);f(b);for(b=0;b<e.length;b++)wb(a,e[b].sSearch,b,e[b].bEscapeRegex!==k?!e[b].bEscapeRegex:e[b].bRegex,e[b].bSmart,e[b].bCaseInsensitive);xb(a)}else f(b);a.bFiltered=!0;r(a,null,"search",[a])}function xb(a){for(var b=
m.ext.search,c=a.aiDisplay,d,e,f=0,g=b.length;f<g;f++){for(var j=[],i=0,n=c.length;i<n;i++)e=c[i],d=a.aoData[e],b[f](a,d._aFilterData,e,d._aData,i)&&j.push(e);c.length=0;h.merge(c,j)}}function wb(a,b,c,d,e,f){if(""!==b){for(var g=[],j=a.aiDisplay,d=Oa(b,d,e,f),e=0;e<j.length;e++)b=a.aoData[j[e]]._aFilterData[c],d.test(b)&&g.push(j[e]);a.aiDisplay=g}}function vb(a,b,c,d,e,f){var d=Oa(b,d,e,f),f=a.oPreviousSearch.sSearch,g=a.aiDisplayMaster,j,e=[];0!==m.ext.search.length&&(c=!0);j=yb(a);if(0>=b.length)a.aiDisplay=
g.slice();else{if(j||c||f.length>b.length||0!==b.indexOf(f)||a.bSorted)a.aiDisplay=g.slice();b=a.aiDisplay;for(c=0;c<b.length;c++)d.test(a.aoData[b[c]]._sFilterRow)&&e.push(b[c]);a.aiDisplay=e}}function Oa(a,b,c,d){a=b?a:Pa(a);c&&(a="^(?=.*?"+h.map(a.match(/"[^"]+"|[^ ]+/g)||[""],function(a){if('"'===a.charAt(0))var b=a.match(/^"(.*)"$/),a=b?b[1]:a;return a.replace('"',"")}).join(")(?=.*?")+").*$");return RegExp(a,d?"i":"")}function yb(a){var b=a.aoColumns,c,d,e,f,g,j,i,h,l=m.ext.type.search;c=!1;
d=0;for(f=a.aoData.length;d<f;d++)if(h=a.aoData[d],!h._aFilterData){j=[];e=0;for(g=b.length;e<g;e++)c=b[e],c.bSearchable?(i=B(a,d,e,"filter"),l[c.sType]&&(i=l[c.sType](i)),null===i&&(i=""),"string"!==typeof i&&i.toString&&(i=i.toString())):i="",i.indexOf&&-1!==i.indexOf("&")&&(va.innerHTML=i,i=Wb?va.textContent:va.innerText),i.replace&&(i=i.replace(/[\r\n]/g,"")),j.push(i);h._aFilterData=j;h._sFilterRow=j.join(" ");c=!0}return c}function zb(a){return{search:a.sSearch,smart:a.bSmart,regex:a.bRegex,
caseInsensitive:a.bCaseInsensitive}}function Ab(a){return{sSearch:a.search,bSmart:a.smart,bRegex:a.regex,bCaseInsensitive:a.caseInsensitive}}function rb(a){var b=a.sTableId,c=a.aanFeatures.i,d=h("<div/>",{"class":a.oClasses.sInfo,id:!c?b+"_info":null});c||(a.aoDrawCallback.push({fn:Bb,sName:"information"}),d.attr("role","status").attr("aria-live","polite"),h(a.nTable).attr("aria-describedby",b+"_info"));return d[0]}function Bb(a){var b=a.aanFeatures.i;if(0!==b.length){var c=a.oLanguage,d=a._iDisplayStart+
1,e=a.fnDisplayEnd(),f=a.fnRecordsTotal(),g=a.fnRecordsDisplay(),j=g?c.sInfo:c.sInfoEmpty;g!==f&&(j+=" "+c.sInfoFiltered);j+=c.sInfoPostFix;j=Cb(a,j);c=c.fnInfoCallback;null!==c&&(j=c.call(a.oInstance,a,d,e,f,g,j));h(b).html(j)}}function Cb(a,b){var c=a.fnFormatNumber,d=a._iDisplayStart+1,e=a._iDisplayLength,f=a.fnRecordsDisplay(),g=-1===e;return b.replace(/_START_/g,c.call(a,d)).replace(/_END_/g,c.call(a,a.fnDisplayEnd())).replace(/_MAX_/g,c.call(a,a.fnRecordsTotal())).replace(/_TOTAL_/g,c.call(a,
f)).replace(/_PAGE_/g,c.call(a,g?1:Math.ceil(d/e))).replace(/_PAGES_/g,c.call(a,g?1:Math.ceil(f/e)))}function ga(a){var b,c,d=a.iInitDisplayStart,e=a.aoColumns,f;c=a.oFeatures;var g=a.bDeferLoading;if(a.bInitialised){mb(a);jb(a);ea(a,a.aoHeader);ea(a,a.aoFooter);C(a,!0);c.bAutoWidth&&Ea(a);b=0;for(c=e.length;b<c;b++)f=e[b],f.sWidth&&(f.nTh.style.width=v(f.sWidth));r(a,null,"preInit",[a]);S(a);e=y(a);if("ssp"!=e||g)"ajax"==e?sa(a,[],function(c){var f=ta(a,c);for(b=0;b<f.length;b++)M(a,f[b]);a.iInitDisplayStart=
d;S(a);C(a,!1);ua(a,c)},a):(C(a,!1),ua(a))}else setTimeout(function(){ga(a)},200)}function ua(a,b){a._bInitComplete=!0;(b||a.oInit.aaData)&&Y(a);r(a,null,"plugin-init",[a,b]);r(a,"aoInitComplete","init",[a,b])}function Qa(a,b){var c=parseInt(b,10);a._iDisplayLength=c;Ra(a);r(a,null,"length",[a,c])}function nb(a){for(var b=a.oClasses,c=a.sTableId,d=a.aLengthMenu,e=h.isArray(d[0]),f=e?d[0]:d,d=e?d[1]:d,e=h("<select/>",{name:c+"_length","aria-controls":c,"class":b.sLengthSelect}),g=0,j=f.length;g<j;g++)e[0][g]=
new Option("number"===typeof d[g]?a.fnFormatNumber(d[g]):d[g],f[g]);var i=h("<div><label/></div>").addClass(b.sLength);a.aanFeatures.l||(i[0].id=c+"_length");i.children().append(a.oLanguage.sLengthMenu.replace("_MENU_",e[0].outerHTML));h("select",i).val(a._iDisplayLength).on("change.DT",function(){Qa(a,h(this).val());N(a)});h(a.nTable).on("length.dt.DT",function(b,c,d){a===c&&h("select",i).val(d)});return i[0]}function sb(a){var b=a.sPaginationType,c=m.ext.pager[b],d="function"===typeof c,e=function(a){N(a)},
b=h("<div/>").addClass(a.oClasses.sPaging+b)[0],f=a.aanFeatures;d||c.fnInit(a,b,e);f.p||(b.id=a.sTableId+"_paginate",a.aoDrawCallback.push({fn:function(a){if(d){var b=a._iDisplayStart,i=a._iDisplayLength,h=a.fnRecordsDisplay(),l=-1===i,b=l?0:Math.ceil(b/i),i=l?1:Math.ceil(h/i),h=c(b,i),k,l=0;for(k=f.p.length;l<k;l++)Ma(a,"pageButton")(a,f.p[l],l,h,b,i)}else c.fnUpdate(a,e)},sName:"pagination"}));return b}function Sa(a,b,c){var d=a._iDisplayStart,e=a._iDisplayLength,f=a.fnRecordsDisplay();0===f||-1===
e?d=0:"number"===typeof b?(d=b*e,d>f&&(d=0)):"first"==b?d=0:"previous"==b?(d=0<=e?d-e:0,0>d&&(d=0)):"next"==b?d+e<f&&(d+=e):"last"==b?d=Math.floor((f-1)/e)*e:J(a,0,"Unknown paging action: "+b,5);b=a._iDisplayStart!==d;a._iDisplayStart=d;b&&(r(a,null,"page",[a]),c&&N(a));return b}function pb(a){return h("<div/>",{id:!a.aanFeatures.r?a.sTableId+"_processing":null,"class":a.oClasses.sProcessing}).html(a.oLanguage.sProcessing).insertBefore(a.nTable)[0]}function C(a,b){a.oFeatures.bProcessing&&h(a.aanFeatures.r).css("display",
b?"block":"none");r(a,null,"processing",[a,b])}function qb(a){var b=h(a.nTable);b.attr("role","grid");var c=a.oScroll;if(""===c.sX&&""===c.sY)return a.nTable;var d=c.sX,e=c.sY,f=a.oClasses,g=b.children("caption"),j=g.length?g[0]._captionSide:null,i=h(b[0].cloneNode(!1)),n=h(b[0].cloneNode(!1)),l=b.children("tfoot");l.length||(l=null);i=h("<div/>",{"class":f.sScrollWrapper}).append(h("<div/>",{"class":f.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:d?!d?null:v(d):"100%"}).append(h("<div/>",
{"class":f.sScrollHeadInner}).css({"box-sizing":"content-box",width:c.sXInner||"100%"}).append(i.removeAttr("id").css("margin-left",0).append("top"===j?g:null).append(b.children("thead"))))).append(h("<div/>",{"class":f.sScrollBody}).css({position:"relative",overflow:"auto",width:!d?null:v(d)}).append(b));l&&i.append(h("<div/>",{"class":f.sScrollFoot}).css({overflow:"hidden",border:0,width:d?!d?null:v(d):"100%"}).append(h("<div/>",{"class":f.sScrollFootInner}).append(n.removeAttr("id").css("margin-left",
0).append("bottom"===j?g:null).append(b.children("tfoot")))));var b=i.children(),k=b[0],f=b[1],t=l?b[2]:null;if(d)h(f).on("scroll.DT",function(){var a=this.scrollLeft;k.scrollLeft=a;l&&(t.scrollLeft=a)});h(f).css(e&&c.bCollapse?"max-height":"height",e);a.nScrollHead=k;a.nScrollBody=f;a.nScrollFoot=t;a.aoDrawCallback.push({fn:ka,sName:"scrolling"});return i[0]}function ka(a){var b=a.oScroll,c=b.sX,d=b.sXInner,e=b.sY,b=b.iBarWidth,f=h(a.nScrollHead),g=f[0].style,j=f.children("div"),i=j[0].style,n=j.children("table"),
j=a.nScrollBody,l=h(j),q=j.style,t=h(a.nScrollFoot).children("div"),m=t.children("table"),o=h(a.nTHead),p=h(a.nTable),s=p[0],r=s.style,u=a.nTFoot?h(a.nTFoot):null,x=a.oBrowser,T=x.bScrollOversize,Xb=D(a.aoColumns,"nTh"),O,K,P,w,Ta=[],y=[],z=[],A=[],B,C=function(a){a=a.style;a.paddingTop="0";a.paddingBottom="0";a.borderTopWidth="0";a.borderBottomWidth="0";a.height=0};K=j.scrollHeight>j.clientHeight;if(a.scrollBarVis!==K&&a.scrollBarVis!==k)a.scrollBarVis=K,Y(a);else{a.scrollBarVis=K;p.children("thead, tfoot").remove();
u&&(P=u.clone().prependTo(p),O=u.find("tr"),P=P.find("tr"));w=o.clone().prependTo(p);o=o.find("tr");K=w.find("tr");w.find("th, td").removeAttr("tabindex");c||(q.width="100%",f[0].style.width="100%");h.each(ra(a,w),function(b,c){B=Z(a,b);c.style.width=a.aoColumns[B].sWidth});u&&H(function(a){a.style.width=""},P);f=p.outerWidth();if(""===c){r.width="100%";if(T&&(p.find("tbody").height()>j.offsetHeight||"scroll"==l.css("overflow-y")))r.width=v(p.outerWidth()-b);f=p.outerWidth()}else""!==d&&(r.width=
v(d),f=p.outerWidth());H(C,K);H(function(a){z.push(a.innerHTML);Ta.push(v(h(a).css("width")))},K);H(function(a,b){if(h.inArray(a,Xb)!==-1)a.style.width=Ta[b]},o);h(K).height(0);u&&(H(C,P),H(function(a){A.push(a.innerHTML);y.push(v(h(a).css("width")))},P),H(function(a,b){a.style.width=y[b]},O),h(P).height(0));H(function(a,b){a.innerHTML='<div class="dataTables_sizing" style="height:0;overflow:hidden;">'+z[b]+"</div>";a.style.width=Ta[b]},K);u&&H(function(a,b){a.innerHTML='<div class="dataTables_sizing" style="height:0;overflow:hidden;">'+
A[b]+"</div>";a.style.width=y[b]},P);if(p.outerWidth()<f){O=j.scrollHeight>j.offsetHeight||"scroll"==l.css("overflow-y")?f+b:f;if(T&&(j.scrollHeight>j.offsetHeight||"scroll"==l.css("overflow-y")))r.width=v(O-b);(""===c||""!==d)&&J(a,1,"Possible column misalignment",6)}else O="100%";q.width=v(O);g.width=v(O);u&&(a.nScrollFoot.style.width=v(O));!e&&T&&(q.height=v(s.offsetHeight+b));c=p.outerWidth();n[0].style.width=v(c);i.width=v(c);d=p.height()>j.clientHeight||"scroll"==l.css("overflow-y");e="padding"+
(x.bScrollbarLeft?"Left":"Right");i[e]=d?b+"px":"0px";u&&(m[0].style.width=v(c),t[0].style.width=v(c),t[0].style[e]=d?b+"px":"0px");p.children("colgroup").insertBefore(p.children("thead"));l.scroll();if((a.bSorted||a.bFiltered)&&!a._drawHold)j.scrollTop=0}}function H(a,b,c){for(var d=0,e=0,f=b.length,g,j;e<f;){g=b[e].firstChild;for(j=c?c[e].firstChild:null;g;)1===g.nodeType&&(c?a(g,j,d):a(g,d),d++),g=g.nextSibling,j=c?j.nextSibling:null;e++}}function Ea(a){var b=a.nTable,c=a.aoColumns,d=a.oScroll,
e=d.sY,f=d.sX,g=d.sXInner,j=c.length,i=la(a,"bVisible"),n=h("th",a.nTHead),l=b.getAttribute("width"),k=b.parentNode,t=!1,m,o,p=a.oBrowser,d=p.bScrollOversize;(m=b.style.width)&&-1!==m.indexOf("%")&&(l=m);for(m=0;m<i.length;m++)o=c[i[m]],null!==o.sWidth&&(o.sWidth=Db(o.sWidthOrig,k),t=!0);if(d||!t&&!f&&!e&&j==aa(a)&&j==n.length)for(m=0;m<j;m++)i=Z(a,m),null!==i&&(c[i].sWidth=v(n.eq(m).width()));else{j=h(b).clone().css("visibility","hidden").removeAttr("id");j.find("tbody tr").remove();var s=h("<tr/>").appendTo(j.find("tbody"));
j.find("thead, tfoot").remove();j.append(h(a.nTHead).clone()).append(h(a.nTFoot).clone());j.find("tfoot th, tfoot td").css("width","");n=ra(a,j.find("thead")[0]);for(m=0;m<i.length;m++)o=c[i[m]],n[m].style.width=null!==o.sWidthOrig&&""!==o.sWidthOrig?v(o.sWidthOrig):"",o.sWidthOrig&&f&&h(n[m]).append(h("<div/>").css({width:o.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(a.aoData.length)for(m=0;m<i.length;m++)t=i[m],o=c[t],h(Eb(a,t)).clone(!1).append(o.sContentPadding).appendTo(s);h("[name]",
j).removeAttr("name");o=h("<div/>").css(f||e?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(j).appendTo(k);f&&g?j.width(g):f?(j.css("width","auto"),j.removeAttr("width"),j.width()<k.clientWidth&&l&&j.width(k.clientWidth)):e?j.width(k.clientWidth):l&&j.width(l);for(m=e=0;m<i.length;m++)k=h(n[m]),g=k.outerWidth()-k.width(),k=p.bBounding?Math.ceil(n[m].getBoundingClientRect().width):k.outerWidth(),e+=k,c[i[m]].sWidth=v(k-g);b.style.width=v(e);o.remove()}l&&(b.style.width=
v(l));if((l||f)&&!a._reszEvt)b=function(){h(E).on("resize.DT-"+a.sInstance,Na(function(){Y(a)}))},d?setTimeout(b,1E3):b(),a._reszEvt=!0}function Db(a,b){if(!a)return 0;var c=h("<div/>").css("width",v(a)).appendTo(b||G.body),d=c[0].offsetWidth;c.remove();return d}function Eb(a,b){var c=Fb(a,b);if(0>c)return null;var d=a.aoData[c];return!d.nTr?h("<td/>").html(B(a,c,b,"display"))[0]:d.anCells[b]}function Fb(a,b){for(var c,d=-1,e=-1,f=0,g=a.aoData.length;f<g;f++)c=B(a,f,b,"display")+"",c=c.replace(Yb,
""),c=c.replace(/&nbsp;/g," "),c.length>d&&(d=c.length,e=f);return e}function v(a){return null===a?"0px":"number"==typeof a?0>a?"0px":a+"px":a.match(/\d$/)?a+"px":a}function V(a){var b,c,d=[],e=a.aoColumns,f,g,j,i;b=a.aaSortingFixed;c=h.isPlainObject(b);var n=[];f=function(a){a.length&&!h.isArray(a[0])?n.push(a):h.merge(n,a)};h.isArray(b)&&f(b);c&&b.pre&&f(b.pre);f(a.aaSorting);c&&b.post&&f(b.post);for(a=0;a<n.length;a++){i=n[a][0];f=e[i].aDataSort;b=0;for(c=f.length;b<c;b++)g=f[b],j=e[g].sType||
"string",n[a]._idx===k&&(n[a]._idx=h.inArray(n[a][1],e[g].asSorting)),d.push({src:i,col:g,dir:n[a][1],index:n[a]._idx,type:j,formatter:m.ext.type.order[j+"-pre"]})}return d}function lb(a){var b,c,d=[],e=m.ext.type.order,f=a.aoData,g=0,j,i=a.aiDisplayMaster,h;Fa(a);h=V(a);b=0;for(c=h.length;b<c;b++)j=h[b],j.formatter&&g++,Gb(a,j.col);if("ssp"!=y(a)&&0!==h.length){b=0;for(c=i.length;b<c;b++)d[i[b]]=b;g===h.length?i.sort(function(a,b){var c,e,g,j,i=h.length,k=f[a]._aSortData,m=f[b]._aSortData;for(g=
0;g<i;g++)if(j=h[g],c=k[j.col],e=m[j.col],c=c<e?-1:c>e?1:0,0!==c)return"asc"===j.dir?c:-c;c=d[a];e=d[b];return c<e?-1:c>e?1:0}):i.sort(function(a,b){var c,g,j,i,k=h.length,m=f[a]._aSortData,o=f[b]._aSortData;for(j=0;j<k;j++)if(i=h[j],c=m[i.col],g=o[i.col],i=e[i.type+"-"+i.dir]||e["string-"+i.dir],c=i(c,g),0!==c)return c;c=d[a];g=d[b];return c<g?-1:c>g?1:0})}a.bSorted=!0}function Hb(a){for(var b,c,d=a.aoColumns,e=V(a),a=a.oLanguage.oAria,f=0,g=d.length;f<g;f++){c=d[f];var j=c.asSorting;b=c.sTitle.replace(/<.*?>/g,
"");var i=c.nTh;i.removeAttribute("aria-sort");c.bSortable&&(0<e.length&&e[0].col==f?(i.setAttribute("aria-sort","asc"==e[0].dir?"ascending":"descending"),c=j[e[0].index+1]||j[0]):c=j[0],b+="asc"===c?a.sSortAscending:a.sSortDescending);i.setAttribute("aria-label",b)}}function Ua(a,b,c,d){var e=a.aaSorting,f=a.aoColumns[b].asSorting,g=function(a,b){var c=a._idx;c===k&&(c=h.inArray(a[1],f));return c+1<f.length?c+1:b?null:0};"number"===typeof e[0]&&(e=a.aaSorting=[e]);c&&a.oFeatures.bSortMulti?(c=h.inArray(b,
D(e,"0")),-1!==c?(b=g(e[c],!0),null===b&&1===e.length&&(b=0),null===b?e.splice(c,1):(e[c][1]=f[b],e[c]._idx=b)):(e.push([b,f[0],0]),e[e.length-1]._idx=0)):e.length&&e[0][0]==b?(b=g(e[0]),e.length=1,e[0][1]=f[b],e[0]._idx=b):(e.length=0,e.push([b,f[0]]),e[0]._idx=0);S(a);"function"==typeof d&&d(a)}function La(a,b,c,d){var e=a.aoColumns[c];Va(b,{},function(b){!1!==e.bSortable&&(a.oFeatures.bProcessing?(C(a,!0),setTimeout(function(){Ua(a,c,b.shiftKey,d);"ssp"!==y(a)&&C(a,!1)},0)):Ua(a,c,b.shiftKey,d))})}
function wa(a){var b=a.aLastSort,c=a.oClasses.sSortColumn,d=V(a),e=a.oFeatures,f,g;if(e.bSort&&e.bSortClasses){e=0;for(f=b.length;e<f;e++)g=b[e].src,h(D(a.aoData,"anCells",g)).removeClass(c+(2>e?e+1:3));e=0;for(f=d.length;e<f;e++)g=d[e].src,h(D(a.aoData,"anCells",g)).addClass(c+(2>e?e+1:3))}a.aLastSort=d}function Gb(a,b){var c=a.aoColumns[b],d=m.ext.order[c.sSortDataType],e;d&&(e=d.call(a.oInstance,a,b,$(a,b)));for(var f,g=m.ext.type.order[c.sType+"-pre"],j=0,i=a.aoData.length;j<i;j++)if(c=a.aoData[j],
c._aSortData||(c._aSortData=[]),!c._aSortData[b]||d)f=d?e[j]:B(a,j,b,"sort"),c._aSortData[b]=g?g(f):f}function xa(a){if(a.oFeatures.bStateSave&&!a.bDestroying){var b={time:+new Date,start:a._iDisplayStart,length:a._iDisplayLength,order:h.extend(!0,[],a.aaSorting),search:zb(a.oPreviousSearch),columns:h.map(a.aoColumns,function(b,d){return{visible:b.bVisible,search:zb(a.aoPreSearchCols[d])}})};r(a,"aoStateSaveParams","stateSaveParams",[a,b]);a.oSavedState=b;a.fnStateSaveCallback.call(a.oInstance,a,
b)}}function Ib(a,b,c){var d,e,f=a.aoColumns,b=function(b){if(b&&b.time){var g=r(a,"aoStateLoadParams","stateLoadParams",[a,b]);if(-1===h.inArray(!1,g)&&(g=a.iStateDuration,!(0<g&&b.time<+new Date-1E3*g)&&!(b.columns&&f.length!==b.columns.length))){a.oLoadedState=h.extend(!0,{},b);b.start!==k&&(a._iDisplayStart=b.start,a.iInitDisplayStart=b.start);b.length!==k&&(a._iDisplayLength=b.length);b.order!==k&&(a.aaSorting=[],h.each(b.order,function(b,c){a.aaSorting.push(c[0]>=f.length?[0,c[1]]:c)}));b.search!==
k&&h.extend(a.oPreviousSearch,Ab(b.search));if(b.columns){d=0;for(e=b.columns.length;d<e;d++)g=b.columns[d],g.visible!==k&&(f[d].bVisible=g.visible),g.search!==k&&h.extend(a.aoPreSearchCols[d],Ab(g.search))}r(a,"aoStateLoaded","stateLoaded",[a,b])}}c()};if(a.oFeatures.bStateSave){var g=a.fnStateLoadCallback.call(a.oInstance,a,b);g!==k&&b(g)}else c()}function ya(a){var b=m.settings,a=h.inArray(a,D(b,"nTable"));return-1!==a?b[a]:null}function J(a,b,c,d){c="DataTables warning: "+(a?"table id="+a.sTableId+
" - ":"")+c;d&&(c+=". For more information about this error, please see https://datatables.net/tn/"+d);if(b)E.console&&console.log&&console.log(c);else if(b=m.ext,b=b.sErrMode||b.errMode,a&&r(a,null,"error",[a,d,c]),"alert"==b)alert(c);else{if("throw"==b)throw Error(c);"function"==typeof b&&b(a,d,c)}}function F(a,b,c,d){h.isArray(c)?h.each(c,function(c,d){h.isArray(d)?F(a,b,d[0],d[1]):F(a,b,d)}):(d===k&&(d=c),b[c]!==k&&(a[d]=b[c]))}function Jb(a,b,c){var d,e;for(e in b)b.hasOwnProperty(e)&&(d=b[e],
h.isPlainObject(d)?(h.isPlainObject(a[e])||(a[e]={}),h.extend(!0,a[e],d)):a[e]=c&&"data"!==e&&"aaData"!==e&&h.isArray(d)?d.slice():d);return a}function Va(a,b,c){h(a).on("click.DT",b,function(b){a.blur();c(b)}).on("keypress.DT",b,function(a){13===a.which&&(a.preventDefault(),c(a))}).on("selectstart.DT",function(){return!1})}function z(a,b,c,d){c&&a[b].push({fn:c,sName:d})}function r(a,b,c,d){var e=[];b&&(e=h.map(a[b].slice().reverse(),function(b){return b.fn.apply(a.oInstance,d)}));null!==c&&(b=h.Event(c+
".dt"),h(a.nTable).trigger(b,d),e.push(b.result));return e}function Ra(a){var b=a._iDisplayStart,c=a.fnDisplayEnd(),d=a._iDisplayLength;b>=c&&(b=c-d);b-=b%d;if(-1===d||0>b)b=0;a._iDisplayStart=b}function Ma(a,b){var c=a.renderer,d=m.ext.renderer[b];return h.isPlainObject(c)&&c[b]?d[c[b]]||d._:"string"===typeof c?d[c]||d._:d._}function y(a){return a.oFeatures.bServerSide?"ssp":a.ajax||a.sAjaxSource?"ajax":"dom"}function ha(a,b){var c=[],c=Kb.numbers_length,d=Math.floor(c/2);b<=c?c=W(0,b):a<=d?(c=W(0,
c-2),c.push("ellipsis"),c.push(b-1)):(a>=b-1-d?c=W(b-(c-2),b):(c=W(a-d+2,a+d-1),c.push("ellipsis"),c.push(b-1)),c.splice(0,0,"ellipsis"),c.splice(0,0,0));c.DT_el="span";return c}function cb(a){h.each({num:function(b){return za(b,a)},"num-fmt":function(b){return za(b,a,Wa)},"html-num":function(b){return za(b,a,Aa)},"html-num-fmt":function(b){return za(b,a,Aa,Wa)}},function(b,c){x.type.order[b+a+"-pre"]=c;b.match(/^html\-/)&&(x.type.search[b+a]=x.type.search.html)})}function Lb(a){return function(){var b=
[ya(this[m.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return m.ext.internal[a].apply(this,b)}}var m=function(a){this.$=function(a,b){return this.api(!0).$(a,b)};this._=function(a,b){return this.api(!0).rows(a,b).data()};this.api=function(a){return a?new s(ya(this[x.iApiIndex])):new s(this)};this.fnAddData=function(a,b){var c=this.api(!0),d=h.isArray(a)&&(h.isArray(a[0])||h.isPlainObject(a[0]))?c.rows.add(a):c.row.add(a);(b===k||b)&&c.draw();return d.flatten().toArray()};this.fnAdjustColumnSizing=
function(a){var b=this.api(!0).columns.adjust(),c=b.settings()[0],d=c.oScroll;a===k||a?b.draw(!1):(""!==d.sX||""!==d.sY)&&ka(c)};this.fnClearTable=function(a){var b=this.api(!0).clear();(a===k||a)&&b.draw()};this.fnClose=function(a){this.api(!0).row(a).child.hide()};this.fnDeleteRow=function(a,b,c){var d=this.api(!0),a=d.rows(a),e=a.settings()[0],h=e.aoData[a[0][0]];a.remove();b&&b.call(this,e,h);(c===k||c)&&d.draw();return h};this.fnDestroy=function(a){this.api(!0).destroy(a)};this.fnDraw=function(a){this.api(!0).draw(a)};
this.fnFilter=function(a,b,c,d,e,h){e=this.api(!0);null===b||b===k?e.search(a,c,d,h):e.column(b).search(a,c,d,h);e.draw()};this.fnGetData=function(a,b){var c=this.api(!0);if(a!==k){var d=a.nodeName?a.nodeName.toLowerCase():"";return b!==k||"td"==d||"th"==d?c.cell(a,b).data():c.row(a).data()||null}return c.data().toArray()};this.fnGetNodes=function(a){var b=this.api(!0);return a!==k?b.row(a).node():b.rows().nodes().flatten().toArray()};this.fnGetPosition=function(a){var b=this.api(!0),c=a.nodeName.toUpperCase();
return"TR"==c?b.row(a).index():"TD"==c||"TH"==c?(a=b.cell(a).index(),[a.row,a.columnVisible,a.column]):null};this.fnIsOpen=function(a){return this.api(!0).row(a).child.isShown()};this.fnOpen=function(a,b,c){return this.api(!0).row(a).child(b,c).show().child()[0]};this.fnPageChange=function(a,b){var c=this.api(!0).page(a);(b===k||b)&&c.draw(!1)};this.fnSetColumnVis=function(a,b,c){a=this.api(!0).column(a).visible(b);(c===k||c)&&a.columns.adjust().draw()};this.fnSettings=function(){return ya(this[x.iApiIndex])};
this.fnSort=function(a){this.api(!0).order(a).draw()};this.fnSortListener=function(a,b,c){this.api(!0).order.listener(a,b,c)};this.fnUpdate=function(a,b,c,d,e){var h=this.api(!0);c===k||null===c?h.row(b).data(a):h.cell(b,c).data(a);(e===k||e)&&h.columns.adjust();(d===k||d)&&h.draw();return 0};this.fnVersionCheck=x.fnVersionCheck;var b=this,c=a===k,d=this.length;c&&(a={});this.oApi=this.internal=x.internal;for(var e in m.ext.internal)e&&(this[e]=Lb(e));this.each(function(){var e={},g=1<d?Jb(e,a,!0):
a,j=0,i,e=this.getAttribute("id"),n=!1,l=m.defaults,q=h(this);if("table"!=this.nodeName.toLowerCase())J(null,0,"Non-table node initialisation ("+this.nodeName+")",2);else{db(l);eb(l.column);I(l,l,!0);I(l.column,l.column,!0);I(l,h.extend(g,q.data()));var t=m.settings,j=0;for(i=t.length;j<i;j++){var o=t[j];if(o.nTable==this||o.nTHead.parentNode==this||o.nTFoot&&o.nTFoot.parentNode==this){var s=g.bRetrieve!==k?g.bRetrieve:l.bRetrieve;if(c||s)return o.oInstance;if(g.bDestroy!==k?g.bDestroy:l.bDestroy){o.oInstance.fnDestroy();
break}else{J(o,0,"Cannot reinitialise DataTable",3);return}}if(o.sTableId==this.id){t.splice(j,1);break}}if(null===e||""===e)this.id=e="DataTables_Table_"+m.ext._unique++;var p=h.extend(!0,{},m.models.oSettings,{sDestroyWidth:q[0].style.width,sInstance:e,sTableId:e});p.nTable=this;p.oApi=b.internal;p.oInit=g;t.push(p);p.oInstance=1===b.length?b:q.dataTable();db(g);g.oLanguage&&Ca(g.oLanguage);g.aLengthMenu&&!g.iDisplayLength&&(g.iDisplayLength=h.isArray(g.aLengthMenu[0])?g.aLengthMenu[0][0]:g.aLengthMenu[0]);
g=Jb(h.extend(!0,{},l),g);F(p.oFeatures,g,"bPaginate bLengthChange bFilter bSort bSortMulti bInfo bProcessing bAutoWidth bSortClasses bServerSide bDeferRender".split(" "));F(p,g,["asStripeClasses","ajax","fnServerData","fnFormatNumber","sServerMethod","aaSorting","aaSortingFixed","aLengthMenu","sPaginationType","sAjaxSource","sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback","renderer","searchDelay","rowId",["iCookieDuration","iStateDuration"],
["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"]]);F(p.oScroll,g,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]);F(p.oLanguage,g,"fnInfoCallback");z(p,"aoDrawCallback",g.fnDrawCallback,"user");z(p,"aoServerParams",g.fnServerParams,"user");z(p,"aoStateSaveParams",g.fnStateSaveParams,"user");z(p,"aoStateLoadParams",g.fnStateLoadParams,"user");z(p,"aoStateLoaded",g.fnStateLoaded,"user");z(p,"aoRowCallback",
g.fnRowCallback,"user");z(p,"aoRowCreatedCallback",g.fnCreatedRow,"user");z(p,"aoHeaderCallback",g.fnHeaderCallback,"user");z(p,"aoFooterCallback",g.fnFooterCallback,"user");z(p,"aoInitComplete",g.fnInitComplete,"user");z(p,"aoPreDrawCallback",g.fnPreDrawCallback,"user");p.rowIdFn=Q(g.rowId);fb(p);var u=p.oClasses;h.extend(u,m.ext.classes,g.oClasses);q.addClass(u.sTable);p.iInitDisplayStart===k&&(p.iInitDisplayStart=g.iDisplayStart,p._iDisplayStart=g.iDisplayStart);null!==g.iDeferLoading&&(p.bDeferLoading=
!0,e=h.isArray(g.iDeferLoading),p._iRecordsDisplay=e?g.iDeferLoading[0]:g.iDeferLoading,p._iRecordsTotal=e?g.iDeferLoading[1]:g.iDeferLoading);var v=p.oLanguage;h.extend(!0,v,g.oLanguage);v.sUrl&&(h.ajax({dataType:"json",url:v.sUrl,success:function(a){Ca(a);I(l.oLanguage,a);h.extend(true,v,a);ga(p)},error:function(){ga(p)}}),n=!0);null===g.asStripeClasses&&(p.asStripeClasses=[u.sStripeOdd,u.sStripeEven]);var e=p.asStripeClasses,x=q.children("tbody").find("tr").eq(0);-1!==h.inArray(!0,h.map(e,function(a){return x.hasClass(a)}))&&
(h("tbody tr",this).removeClass(e.join(" ")),p.asDestroyStripes=e.slice());e=[];t=this.getElementsByTagName("thead");0!==t.length&&(da(p.aoHeader,t[0]),e=ra(p));if(null===g.aoColumns){t=[];j=0;for(i=e.length;j<i;j++)t.push(null)}else t=g.aoColumns;j=0;for(i=t.length;j<i;j++)Da(p,e?e[j]:null);hb(p,g.aoColumnDefs,t,function(a,b){ja(p,a,b)});if(x.length){var w=function(a,b){return a.getAttribute("data-"+b)!==null?b:null};h(x[0]).children("th, td").each(function(a,b){var c=p.aoColumns[a];if(c.mData===
a){var d=w(b,"sort")||w(b,"order"),e=w(b,"filter")||w(b,"search");if(d!==null||e!==null){c.mData={_:a+".display",sort:d!==null?a+".@data-"+d:k,type:d!==null?a+".@data-"+d:k,filter:e!==null?a+".@data-"+e:k};ja(p,a)}}})}var T=p.oFeatures,e=function(){if(g.aaSorting===k){var a=p.aaSorting;j=0;for(i=a.length;j<i;j++)a[j][1]=p.aoColumns[j].asSorting[0]}wa(p);T.bSort&&z(p,"aoDrawCallback",function(){if(p.bSorted){var a=V(p),b={};h.each(a,function(a,c){b[c.src]=c.dir});r(p,null,"order",[p,a,b]);Hb(p)}});
z(p,"aoDrawCallback",function(){(p.bSorted||y(p)==="ssp"||T.bDeferRender)&&wa(p)},"sc");var a=q.children("caption").each(function(){this._captionSide=h(this).css("caption-side")}),b=q.children("thead");b.length===0&&(b=h("<thead/>").appendTo(q));p.nTHead=b[0];b=q.children("tbody");b.length===0&&(b=h("<tbody/>").appendTo(q));p.nTBody=b[0];b=q.children("tfoot");if(b.length===0&&a.length>0&&(p.oScroll.sX!==""||p.oScroll.sY!==""))b=h("<tfoot/>").appendTo(q);if(b.length===0||b.children().length===0)q.addClass(u.sNoFooter);
else if(b.length>0){p.nTFoot=b[0];da(p.aoFooter,p.nTFoot)}if(g.aaData)for(j=0;j<g.aaData.length;j++)M(p,g.aaData[j]);else(p.bDeferLoading||y(p)=="dom")&&ma(p,h(p.nTBody).children("tr"));p.aiDisplay=p.aiDisplayMaster.slice();p.bInitialised=true;n===false&&ga(p)};g.bStateSave?(T.bStateSave=!0,z(p,"aoDrawCallback",xa,"state_save"),Ib(p,g,e)):e()}});b=null;return this},x,s,o,u,Xa={},Mb=/[\r\n]/g,Aa=/<.*?>/g,Zb=/^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/,$b=RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^|\\-)",
"g"),Wa=/[',$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfk]/gi,L=function(a){return!a||!0===a||"-"===a?!0:!1},Nb=function(a){var b=parseInt(a,10);return!isNaN(b)&&isFinite(a)?b:null},Ob=function(a,b){Xa[b]||(Xa[b]=RegExp(Pa(b),"g"));return"string"===typeof a&&"."!==b?a.replace(/\./g,"").replace(Xa[b],"."):a},Ya=function(a,b,c){var d="string"===typeof a;if(L(a))return!0;b&&d&&(a=Ob(a,b));c&&d&&(a=a.replace(Wa,""));return!isNaN(parseFloat(a))&&isFinite(a)},Pb=function(a,b,c){return L(a)?!0:!(L(a)||"string"===
typeof a)?null:Ya(a.replace(Aa,""),b,c)?!0:null},D=function(a,b,c){var d=[],e=0,f=a.length;if(c!==k)for(;e<f;e++)a[e]&&a[e][b]&&d.push(a[e][b][c]);else for(;e<f;e++)a[e]&&d.push(a[e][b]);return d},ia=function(a,b,c,d){var e=[],f=0,g=b.length;if(d!==k)for(;f<g;f++)a[b[f]][c]&&e.push(a[b[f]][c][d]);else for(;f<g;f++)e.push(a[b[f]][c]);return e},W=function(a,b){var c=[],d;b===k?(b=0,d=a):(d=b,b=a);for(var e=b;e<d;e++)c.push(e);return c},Qb=function(a){for(var b=[],c=0,d=a.length;c<d;c++)a[c]&&b.push(a[c]);
return b},qa=function(a){var b;a:{if(!(2>a.length)){b=a.slice().sort();for(var c=b[0],d=1,e=b.length;d<e;d++){if(b[d]===c){b=!1;break a}c=b[d]}}b=!0}if(b)return a.slice();b=[];var e=a.length,f,g=0,d=0;a:for(;d<e;d++){c=a[d];for(f=0;f<g;f++)if(b[f]===c)continue a;b.push(c);g++}return b};m.util={throttle:function(a,b){var c=b!==k?b:200,d,e;return function(){var b=this,g=+new Date,j=arguments;d&&g<d+c?(clearTimeout(e),e=setTimeout(function(){d=k;a.apply(b,j)},c)):(d=g,a.apply(b,j))}},escapeRegex:function(a){return a.replace($b,
"\\$1")}};var A=function(a,b,c){a[b]!==k&&(a[c]=a[b])},ba=/\[.*?\]$/,U=/\(\)$/,Pa=m.util.escapeRegex,va=h("<div>")[0],Wb=va.textContent!==k,Yb=/<.*?>/g,Na=m.util.throttle,Rb=[],w=Array.prototype,ac=function(a){var b,c,d=m.settings,e=h.map(d,function(a){return a.nTable});if(a){if(a.nTable&&a.oApi)return[a];if(a.nodeName&&"table"===a.nodeName.toLowerCase())return b=h.inArray(a,e),-1!==b?[d[b]]:null;if(a&&"function"===typeof a.settings)return a.settings().toArray();"string"===typeof a?c=h(a):a instanceof
h&&(c=a)}else return[];if(c)return c.map(function(){b=h.inArray(this,e);return-1!==b?d[b]:null}).toArray()};s=function(a,b){if(!(this instanceof s))return new s(a,b);var c=[],d=function(a){(a=ac(a))&&(c=c.concat(a))};if(h.isArray(a))for(var e=0,f=a.length;e<f;e++)d(a[e]);else d(a);this.context=qa(c);b&&h.merge(this,b);this.selector={rows:null,cols:null,opts:null};s.extend(this,this,Rb)};m.Api=s;h.extend(s.prototype,{any:function(){return 0!==this.count()},concat:w.concat,context:[],count:function(){return this.flatten().length},
each:function(a){for(var b=0,c=this.length;b<c;b++)a.call(this,this[b],b,this);return this},eq:function(a){var b=this.context;return b.length>a?new s(b[a],this[a]):null},filter:function(a){var b=[];if(w.filter)b=w.filter.call(this,a,this);else for(var c=0,d=this.length;c<d;c++)a.call(this,this[c],c,this)&&b.push(this[c]);return new s(this.context,b)},flatten:function(){var a=[];return new s(this.context,a.concat.apply(a,this.toArray()))},join:w.join,indexOf:w.indexOf||function(a,b){for(var c=b||0,
d=this.length;c<d;c++)if(this[c]===a)return c;return-1},iterator:function(a,b,c,d){var e=[],f,g,j,h,n,l=this.context,m,o,u=this.selector;"string"===typeof a&&(d=c,c=b,b=a,a=!1);g=0;for(j=l.length;g<j;g++){var r=new s(l[g]);if("table"===b)f=c.call(r,l[g],g),f!==k&&e.push(f);else if("columns"===b||"rows"===b)f=c.call(r,l[g],this[g],g),f!==k&&e.push(f);else if("column"===b||"column-rows"===b||"row"===b||"cell"===b){o=this[g];"column-rows"===b&&(m=Ba(l[g],u.opts));h=0;for(n=o.length;h<n;h++)f=o[h],f=
"cell"===b?c.call(r,l[g],f.row,f.column,g,h):c.call(r,l[g],f,g,h,m),f!==k&&e.push(f)}}return e.length||d?(a=new s(l,a?e.concat.apply([],e):e),b=a.selector,b.rows=u.rows,b.cols=u.cols,b.opts=u.opts,a):this},lastIndexOf:w.lastIndexOf||function(a,b){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,map:function(a){var b=[];if(w.map)b=w.map.call(this,a,this);else for(var c=0,d=this.length;c<d;c++)b.push(a.call(this,this[c],c));return new s(this.context,b)},pluck:function(a){return this.map(function(b){return b[a]})},
pop:w.pop,push:w.push,reduce:w.reduce||function(a,b){return gb(this,a,b,0,this.length,1)},reduceRight:w.reduceRight||function(a,b){return gb(this,a,b,this.length-1,-1,-1)},reverse:w.reverse,selector:null,shift:w.shift,slice:function(){return new s(this.context,this)},sort:w.sort,splice:w.splice,toArray:function(){return w.slice.call(this)},to$:function(){return h(this)},toJQuery:function(){return h(this)},unique:function(){return new s(this.context,qa(this))},unshift:w.unshift});s.extend=function(a,
b,c){if(c.length&&b&&(b instanceof s||b.__dt_wrapper)){var d,e,f,g=function(a,b,c){return function(){var d=b.apply(a,arguments);s.extend(d,d,c.methodExt);return d}};d=0;for(e=c.length;d<e;d++)f=c[d],b[f.name]="function"===typeof f.val?g(a,f.val,f):h.isPlainObject(f.val)?{}:f.val,b[f.name].__dt_wrapper=!0,s.extend(a,b[f.name],f.propExt)}};s.register=o=function(a,b){if(h.isArray(a))for(var c=0,d=a.length;c<d;c++)s.register(a[c],b);else for(var e=a.split("."),f=Rb,g,j,c=0,d=e.length;c<d;c++){g=(j=-1!==
e[c].indexOf("()"))?e[c].replace("()",""):e[c];var i;a:{i=0;for(var n=f.length;i<n;i++)if(f[i].name===g){i=f[i];break a}i=null}i||(i={name:g,val:{},methodExt:[],propExt:[]},f.push(i));c===d-1?i.val=b:f=j?i.methodExt:i.propExt}};s.registerPlural=u=function(a,b,c){s.register(a,c);s.register(b,function(){var a=c.apply(this,arguments);return a===this?this:a instanceof s?a.length?h.isArray(a[0])?new s(a.context,a[0]):a[0]:k:a})};o("tables()",function(a){var b;if(a){b=s;var c=this.context;if("number"===
typeof a)a=[c[a]];else var d=h.map(c,function(a){return a.nTable}),a=h(d).filter(a).map(function(){var a=h.inArray(this,d);return c[a]}).toArray();b=new b(a)}else b=this;return b});o("table()",function(a){var a=this.tables(a),b=a.context;return b.length?new s(b[0]):a});u("tables().nodes()","table().node()",function(){return this.iterator("table",function(a){return a.nTable},1)});u("tables().body()","table().body()",function(){return this.iterator("table",function(a){return a.nTBody},1)});u("tables().header()",
"table().header()",function(){return this.iterator("table",function(a){return a.nTHead},1)});u("tables().footer()","table().footer()",function(){return this.iterator("table",function(a){return a.nTFoot},1)});u("tables().containers()","table().container()",function(){return this.iterator("table",function(a){return a.nTableWrapper},1)});o("draw()",function(a){return this.iterator("table",function(b){"page"===a?N(b):("string"===typeof a&&(a="full-hold"===a?!1:!0),S(b,!1===a))})});o("page()",function(a){return a===
k?this.page.info().page:this.iterator("table",function(b){Sa(b,a)})});o("page.info()",function(){if(0===this.context.length)return k;var a=this.context[0],b=a._iDisplayStart,c=a.oFeatures.bPaginate?a._iDisplayLength:-1,d=a.fnRecordsDisplay(),e=-1===c;return{page:e?0:Math.floor(b/c),pages:e?1:Math.ceil(d/c),start:b,end:a.fnDisplayEnd(),length:c,recordsTotal:a.fnRecordsTotal(),recordsDisplay:d,serverSide:"ssp"===y(a)}});o("page.len()",function(a){return a===k?0!==this.context.length?this.context[0]._iDisplayLength:
k:this.iterator("table",function(b){Qa(b,a)})});var Sb=function(a,b,c){if(c){var d=new s(a);d.one("draw",function(){c(d.ajax.json())})}if("ssp"==y(a))S(a,b);else{C(a,!0);var e=a.jqXHR;e&&4!==e.readyState&&e.abort();sa(a,[],function(c){na(a);for(var c=ta(a,c),d=0,e=c.length;d<e;d++)M(a,c[d]);S(a,b);C(a,!1)})}};o("ajax.json()",function(){var a=this.context;if(0<a.length)return a[0].json});o("ajax.params()",function(){var a=this.context;if(0<a.length)return a[0].oAjaxData});o("ajax.reload()",function(a,
b){return this.iterator("table",function(c){Sb(c,!1===b,a)})});o("ajax.url()",function(a){var b=this.context;if(a===k){if(0===b.length)return k;b=b[0];return b.ajax?h.isPlainObject(b.ajax)?b.ajax.url:b.ajax:b.sAjaxSource}return this.iterator("table",function(b){h.isPlainObject(b.ajax)?b.ajax.url=a:b.ajax=a})});o("ajax.url().load()",function(a,b){return this.iterator("table",function(c){Sb(c,!1===b,a)})});var Za=function(a,b,c,d,e){var f=[],g,j,i,n,l,m;i=typeof b;if(!b||"string"===i||"function"===
i||b.length===k)b=[b];i=0;for(n=b.length;i<n;i++){j=b[i]&&b[i].split&&!b[i].match(/[\[\(:]/)?b[i].split(","):[b[i]];l=0;for(m=j.length;l<m;l++)(g=c("string"===typeof j[l]?h.trim(j[l]):j[l]))&&g.length&&(f=f.concat(g))}a=x.selector[a];if(a.length){i=0;for(n=a.length;i<n;i++)f=a[i](d,e,f)}return qa(f)},$a=function(a){a||(a={});a.filter&&a.search===k&&(a.search=a.filter);return h.extend({search:"none",order:"current",page:"all"},a)},ab=function(a){for(var b=0,c=a.length;b<c;b++)if(0<a[b].length)return a[0]=
a[b],a[0].length=1,a.length=1,a.context=[a.context[b]],a;a.length=0;return a},Ba=function(a,b){var c,d,e,f=[],g=a.aiDisplay;c=a.aiDisplayMaster;var j=b.search;d=b.order;e=b.page;if("ssp"==y(a))return"removed"===j?[]:W(0,c.length);if("current"==e){c=a._iDisplayStart;for(d=a.fnDisplayEnd();c<d;c++)f.push(g[c])}else if("current"==d||"applied"==d)f="none"==j?c.slice():"applied"==j?g.slice():h.map(c,function(a){return-1===h.inArray(a,g)?a:null});else if("index"==d||"original"==d){c=0;for(d=a.aoData.length;c<
d;c++)"none"==j?f.push(c):(e=h.inArray(c,g),(-1===e&&"removed"==j||0<=e&&"applied"==j)&&f.push(c))}return f};o("rows()",function(a,b){a===k?a="":h.isPlainObject(a)&&(b=a,a="");var b=$a(b),c=this.iterator("table",function(c){var e=b,f;return Za("row",a,function(a){var b=Nb(a);if(b!==null&&!e)return[b];f||(f=Ba(c,e));if(b!==null&&h.inArray(b,f)!==-1)return[b];if(a===null||a===k||a==="")return f;if(typeof a==="function")return h.map(f,function(b){var e=c.aoData[b];return a(b,e._aData,e.nTr)?b:null});
b=Qb(ia(c.aoData,f,"nTr"));if(a.nodeName){if(a._DT_RowIndex!==k)return[a._DT_RowIndex];if(a._DT_CellIndex)return[a._DT_CellIndex.row];b=h(a).closest("*[data-dt-row]");return b.length?[b.data("dt-row")]:[]}if(typeof a==="string"&&a.charAt(0)==="#"){var i=c.aIds[a.replace(/^#/,"")];if(i!==k)return[i.idx]}return h(b).filter(a).map(function(){return this._DT_RowIndex}).toArray()},c,e)},1);c.selector.rows=a;c.selector.opts=b;return c});o("rows().nodes()",function(){return this.iterator("row",function(a,
b){return a.aoData[b].nTr||k},1)});o("rows().data()",function(){return this.iterator(!0,"rows",function(a,b){return ia(a.aoData,b,"_aData")},1)});u("rows().cache()","row().cache()",function(a){return this.iterator("row",function(b,c){var d=b.aoData[c];return"search"===a?d._aFilterData:d._aSortData},1)});u("rows().invalidate()","row().invalidate()",function(a){return this.iterator("row",function(b,c){ca(b,c,a)})});u("rows().indexes()","row().index()",function(){return this.iterator("row",function(a,
b){return b},1)});u("rows().ids()","row().id()",function(a){for(var b=[],c=this.context,d=0,e=c.length;d<e;d++)for(var f=0,g=this[d].length;f<g;f++){var h=c[d].rowIdFn(c[d].aoData[this[d][f]]._aData);b.push((!0===a?"#":"")+h)}return new s(c,b)});u("rows().remove()","row().remove()",function(){var a=this;this.iterator("row",function(b,c,d){var e=b.aoData,f=e[c],g,h,i,n,l;e.splice(c,1);g=0;for(h=e.length;g<h;g++)if(i=e[g],l=i.anCells,null!==i.nTr&&(i.nTr._DT_RowIndex=g),null!==l){i=0;for(n=l.length;i<
n;i++)l[i]._DT_CellIndex.row=g}oa(b.aiDisplayMaster,c);oa(b.aiDisplay,c);oa(a[d],c,!1);0<b._iRecordsDisplay&&b._iRecordsDisplay--;Ra(b);c=b.rowIdFn(f._aData);c!==k&&delete b.aIds[c]});this.iterator("table",function(a){for(var c=0,d=a.aoData.length;c<d;c++)a.aoData[c].idx=c});return this});o("rows.add()",function(a){var b=this.iterator("table",function(b){var c,f,g,h=[];f=0;for(g=a.length;f<g;f++)c=a[f],c.nodeName&&"TR"===c.nodeName.toUpperCase()?h.push(ma(b,c)[0]):h.push(M(b,c));return h},1),c=this.rows(-1);
c.pop();h.merge(c,b);return c});o("row()",function(a,b){return ab(this.rows(a,b))});o("row().data()",function(a){var b=this.context;if(a===k)return b.length&&this.length?b[0].aoData[this[0]]._aData:k;b[0].aoData[this[0]]._aData=a;ca(b[0],this[0],"data");return this});o("row().node()",function(){var a=this.context;return a.length&&this.length?a[0].aoData[this[0]].nTr||null:null});o("row.add()",function(a){a instanceof h&&a.length&&(a=a[0]);var b=this.iterator("table",function(b){return a.nodeName&&
"TR"===a.nodeName.toUpperCase()?ma(b,a)[0]:M(b,a)});return this.row(b[0])});var bb=function(a,b){var c=a.context;if(c.length&&(c=c[0].aoData[b!==k?b:a[0]])&&c._details)c._details.remove(),c._detailsShow=k,c._details=k},Tb=function(a,b){var c=a.context;if(c.length&&a.length){var d=c[0].aoData[a[0]];if(d._details){(d._detailsShow=b)?d._details.insertAfter(d.nTr):d._details.detach();var e=c[0],f=new s(e),g=e.aoData;f.off("draw.dt.DT_details column-visibility.dt.DT_details destroy.dt.DT_details");0<D(g,
"_details").length&&(f.on("draw.dt.DT_details",function(a,b){e===b&&f.rows({page:"current"}).eq(0).each(function(a){a=g[a];a._detailsShow&&a._details.insertAfter(a.nTr)})}),f.on("column-visibility.dt.DT_details",function(a,b){if(e===b)for(var c,d=aa(b),f=0,h=g.length;f<h;f++)c=g[f],c._details&&c._details.children("td[colspan]").attr("colspan",d)}),f.on("destroy.dt.DT_details",function(a,b){if(e===b)for(var c=0,d=g.length;c<d;c++)g[c]._details&&bb(f,c)}))}}};o("row().child()",function(a,b){var c=this.context;
if(a===k)return c.length&&this.length?c[0].aoData[this[0]]._details:k;if(!0===a)this.child.show();else if(!1===a)bb(this);else if(c.length&&this.length){var d=c[0],c=c[0].aoData[this[0]],e=[],f=function(a,b){if(h.isArray(a)||a instanceof h)for(var c=0,k=a.length;c<k;c++)f(a[c],b);else a.nodeName&&"tr"===a.nodeName.toLowerCase()?e.push(a):(c=h("<tr><td/></tr>").addClass(b),h("td",c).addClass(b).html(a)[0].colSpan=aa(d),e.push(c[0]))};f(a,b);c._details&&c._details.detach();c._details=h(e);c._detailsShow&&
c._details.insertAfter(c.nTr)}return this});o(["row().child.show()","row().child().show()"],function(){Tb(this,!0);return this});o(["row().child.hide()","row().child().hide()"],function(){Tb(this,!1);return this});o(["row().child.remove()","row().child().remove()"],function(){bb(this);return this});o("row().child.isShown()",function(){var a=this.context;return a.length&&this.length?a[0].aoData[this[0]]._detailsShow||!1:!1});var bc=/^([^:]+):(name|visIdx|visible)$/,Ub=function(a,b,c,d,e){for(var c=
[],d=0,f=e.length;d<f;d++)c.push(B(a,e[d],b));return c};o("columns()",function(a,b){a===k?a="":h.isPlainObject(a)&&(b=a,a="");var b=$a(b),c=this.iterator("table",function(c){var e=a,f=b,g=c.aoColumns,j=D(g,"sName"),i=D(g,"nTh");return Za("column",e,function(a){var b=Nb(a);if(a==="")return W(g.length);if(b!==null)return[b>=0?b:g.length+b];if(typeof a==="function"){var e=Ba(c,f);return h.map(g,function(b,f){return a(f,Ub(c,f,0,0,e),i[f])?f:null})}var k=typeof a==="string"?a.match(bc):"";if(k)switch(k[2]){case "visIdx":case "visible":b=
parseInt(k[1],10);if(b<0){var m=h.map(g,function(a,b){return a.bVisible?b:null});return[m[m.length+b]]}return[Z(c,b)];case "name":return h.map(j,function(a,b){return a===k[1]?b:null});default:return[]}if(a.nodeName&&a._DT_CellIndex)return[a._DT_CellIndex.column];b=h(i).filter(a).map(function(){return h.inArray(this,i)}).toArray();if(b.length||!a.nodeName)return b;b=h(a).closest("*[data-dt-column]");return b.length?[b.data("dt-column")]:[]},c,f)},1);c.selector.cols=a;c.selector.opts=b;return c});u("columns().header()",
"column().header()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].nTh},1)});u("columns().footer()","column().footer()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].nTf},1)});u("columns().data()","column().data()",function(){return this.iterator("column-rows",Ub,1)});u("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(a,b){return a.aoColumns[b].mData},1)});u("columns().cache()","column().cache()",
function(a){return this.iterator("column-rows",function(b,c,d,e,f){return ia(b.aoData,f,"search"===a?"_aFilterData":"_aSortData",c)},1)});u("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows",function(a,b,c,d,e){return ia(a.aoData,e,"anCells",b)},1)});u("columns().visible()","column().visible()",function(a,b){var c=this.iterator("column",function(b,c){if(a===k)return b.aoColumns[c].bVisible;var f=b.aoColumns,g=f[c],j=b.aoData,i,n,l;if(a!==k&&g.bVisible!==a){if(a){var m=
h.inArray(!0,D(f,"bVisible"),c+1);i=0;for(n=j.length;i<n;i++)l=j[i].nTr,f=j[i].anCells,l&&l.insertBefore(f[c],f[m]||null)}else h(D(b.aoData,"anCells",c)).detach();g.bVisible=a;ea(b,b.aoHeader);ea(b,b.aoFooter);xa(b)}});a!==k&&(this.iterator("column",function(c,e){r(c,null,"column-visibility",[c,e,a,b])}),(b===k||b)&&this.columns.adjust());return c});u("columns().indexes()","column().index()",function(a){return this.iterator("column",function(b,c){return"visible"===a?$(b,c):c},1)});o("columns.adjust()",
function(){return this.iterator("table",function(a){Y(a)},1)});o("column.index()",function(a,b){if(0!==this.context.length){var c=this.context[0];if("fromVisible"===a||"toData"===a)return Z(c,b);if("fromData"===a||"toVisible"===a)return $(c,b)}});o("column()",function(a,b){return ab(this.columns(a,b))});o("cells()",function(a,b,c){h.isPlainObject(a)&&(a.row===k?(c=a,a=null):(c=b,b=null));h.isPlainObject(b)&&(c=b,b=null);if(null===b||b===k)return this.iterator("table",function(b){var d=a,e=$a(c),f=
b.aoData,g=Ba(b,e),j=Qb(ia(f,g,"anCells")),i=h([].concat.apply([],j)),l,n=b.aoColumns.length,m,o,u,s,r,v;return Za("cell",d,function(a){var c=typeof a==="function";if(a===null||a===k||c){m=[];o=0;for(u=g.length;o<u;o++){l=g[o];for(s=0;s<n;s++){r={row:l,column:s};if(c){v=f[l];a(r,B(b,l,s),v.anCells?v.anCells[s]:null)&&m.push(r)}else m.push(r)}}return m}if(h.isPlainObject(a))return[a];c=i.filter(a).map(function(a,b){return{row:b._DT_CellIndex.row,column:b._DT_CellIndex.column}}).toArray();if(c.length||
!a.nodeName)return c;v=h(a).closest("*[data-dt-row]");return v.length?[{row:v.data("dt-row"),column:v.data("dt-column")}]:[]},b,e)});var d=this.columns(b,c),e=this.rows(a,c),f,g,j,i,n,l=this.iterator("table",function(a,b){f=[];g=0;for(j=e[b].length;g<j;g++){i=0;for(n=d[b].length;i<n;i++)f.push({row:e[b][g],column:d[b][i]})}return f},1);h.extend(l.selector,{cols:b,rows:a,opts:c});return l});u("cells().nodes()","cell().node()",function(){return this.iterator("cell",function(a,b,c){return(a=a.aoData[b])&&
a.anCells?a.anCells[c]:k},1)});o("cells().data()",function(){return this.iterator("cell",function(a,b,c){return B(a,b,c)},1)});u("cells().cache()","cell().cache()",function(a){a="search"===a?"_aFilterData":"_aSortData";return this.iterator("cell",function(b,c,d){return b.aoData[c][a][d]},1)});u("cells().render()","cell().render()",function(a){return this.iterator("cell",function(b,c,d){return B(b,c,d,a)},1)});u("cells().indexes()","cell().index()",function(){return this.iterator("cell",function(a,
b,c){return{row:b,column:c,columnVisible:$(a,c)}},1)});u("cells().invalidate()","cell().invalidate()",function(a){return this.iterator("cell",function(b,c,d){ca(b,c,a,d)})});o("cell()",function(a,b,c){return ab(this.cells(a,b,c))});o("cell().data()",function(a){var b=this.context,c=this[0];if(a===k)return b.length&&c.length?B(b[0],c[0].row,c[0].column):k;ib(b[0],c[0].row,c[0].column,a);ca(b[0],c[0].row,"data",c[0].column);return this});o("order()",function(a,b){var c=this.context;if(a===k)return 0!==
c.length?c[0].aaSorting:k;"number"===typeof a?a=[[a,b]]:a.length&&!h.isArray(a[0])&&(a=Array.prototype.slice.call(arguments));return this.iterator("table",function(b){b.aaSorting=a.slice()})});o("order.listener()",function(a,b,c){return this.iterator("table",function(d){La(d,a,b,c)})});o("order.fixed()",function(a){if(!a){var b=this.context,b=b.length?b[0].aaSortingFixed:k;return h.isArray(b)?{pre:b}:b}return this.iterator("table",function(b){b.aaSortingFixed=h.extend(!0,{},a)})});o(["columns().order()",
"column().order()"],function(a){var b=this;return this.iterator("table",function(c,d){var e=[];h.each(b[d],function(b,c){e.push([c,a])});c.aaSorting=e})});o("search()",function(a,b,c,d){var e=this.context;return a===k?0!==e.length?e[0].oPreviousSearch.sSearch:k:this.iterator("table",function(e){e.oFeatures.bFilter&&fa(e,h.extend({},e.oPreviousSearch,{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===c?!0:c,bCaseInsensitive:null===d?!0:d}),1)})});u("columns().search()","column().search()",function(a,
b,c,d){return this.iterator("column",function(e,f){var g=e.aoPreSearchCols;if(a===k)return g[f].sSearch;e.oFeatures.bFilter&&(h.extend(g[f],{sSearch:a+"",bRegex:null===b?!1:b,bSmart:null===c?!0:c,bCaseInsensitive:null===d?!0:d}),fa(e,e.oPreviousSearch,1))})});o("state()",function(){return this.context.length?this.context[0].oSavedState:null});o("state.clear()",function(){return this.iterator("table",function(a){a.fnStateSaveCallback.call(a.oInstance,a,{})})});o("state.loaded()",function(){return this.context.length?
this.context[0].oLoadedState:null});o("state.save()",function(){return this.iterator("table",function(a){xa(a)})});m.versionCheck=m.fnVersionCheck=function(a){for(var b=m.version.split("."),a=a.split("."),c,d,e=0,f=a.length;e<f;e++)if(c=parseInt(b[e],10)||0,d=parseInt(a[e],10)||0,c!==d)return c>d;return!0};m.isDataTable=m.fnIsDataTable=function(a){var b=h(a).get(0),c=!1;if(a instanceof m.Api)return!0;h.each(m.settings,function(a,e){var f=e.nScrollHead?h("table",e.nScrollHead)[0]:null,g=e.nScrollFoot?
h("table",e.nScrollFoot)[0]:null;if(e.nTable===b||f===b||g===b)c=!0});return c};m.tables=m.fnTables=function(a){var b=!1;h.isPlainObject(a)&&(b=a.api,a=a.visible);var c=h.map(m.settings,function(b){if(!a||a&&h(b.nTable).is(":visible"))return b.nTable});return b?new s(c):c};m.camelToHungarian=I;o("$()",function(a,b){var c=this.rows(b).nodes(),c=h(c);return h([].concat(c.filter(a).toArray(),c.find(a).toArray()))});h.each(["on","one","off"],function(a,b){o(b+"()",function(){var a=Array.prototype.slice.call(arguments);
a[0]=h.map(a[0].split(/\s/),function(a){return!a.match(/\.dt\b/)?a+".dt":a}).join(" ");var d=h(this.tables().nodes());d[b].apply(d,a);return this})});o("clear()",function(){return this.iterator("table",function(a){na(a)})});o("settings()",function(){return new s(this.context,this.context)});o("init()",function(){var a=this.context;return a.length?a[0].oInit:null});o("data()",function(){return this.iterator("table",function(a){return D(a.aoData,"_aData")}).flatten()});o("destroy()",function(a){a=a||
!1;return this.iterator("table",function(b){var c=b.nTableWrapper.parentNode,d=b.oClasses,e=b.nTable,f=b.nTBody,g=b.nTHead,j=b.nTFoot,i=h(e),f=h(f),k=h(b.nTableWrapper),l=h.map(b.aoData,function(a){return a.nTr}),o;b.bDestroying=!0;r(b,"aoDestroyCallback","destroy",[b]);a||(new s(b)).columns().visible(!0);k.off(".DT").find(":not(tbody *)").off(".DT");h(E).off(".DT-"+b.sInstance);e!=g.parentNode&&(i.children("thead").detach(),i.append(g));j&&e!=j.parentNode&&(i.children("tfoot").detach(),i.append(j));
b.aaSorting=[];b.aaSortingFixed=[];wa(b);h(l).removeClass(b.asStripeClasses.join(" "));h("th, td",g).removeClass(d.sSortable+" "+d.sSortableAsc+" "+d.sSortableDesc+" "+d.sSortableNone);f.children().detach();f.append(l);g=a?"remove":"detach";i[g]();k[g]();!a&&c&&(c.insertBefore(e,b.nTableReinsertBefore),i.css("width",b.sDestroyWidth).removeClass(d.sTable),(o=b.asDestroyStripes.length)&&f.children().each(function(a){h(this).addClass(b.asDestroyStripes[a%o])}));c=h.inArray(b,m.settings);-1!==c&&m.settings.splice(c,
1)})});h.each(["column","row","cell"],function(a,b){o(b+"s().every()",function(a){var d=this.selector.opts,e=this;return this.iterator(b,function(f,g,h,i,n){a.call(e[b](g,"cell"===b?h:d,"cell"===b?d:k),g,h,i,n)})})});o("i18n()",function(a,b,c){var d=this.context[0],a=Q(a)(d.oLanguage);a===k&&(a=b);c!==k&&h.isPlainObject(a)&&(a=a[c]!==k?a[c]:a._);return a.replace("%d",c)});m.version="1.10.16";m.settings=[];m.models={};m.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0};m.models.oRow=
{nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1};m.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,
sWidthOrig:null};m.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(a){return a.toString().replace(/\B(?=(\d{3})+(?!\d))/g,
this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(a){try{return JSON.parse((-1===a.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+a.sInstance+"_"+location.pathname))}catch(b){}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(a,b){try{(-1===a.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+a.sInstance+
"_"+location.pathname,JSON.stringify(b))}catch(c){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",
sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:h.extend({},m.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"};
X(m.defaults);m.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};X(m.defaults.column);m.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,
bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],
aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:k,oAjaxData:k,fnServerData:null,
aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==y(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==y(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var a=this._iDisplayLength,
b=this._iDisplayStart,c=b+a,d=this.aiDisplay.length,e=this.oFeatures,f=e.bPaginate;return e.bServerSide?!1===f||-1===a?b+d:Math.min(b+a,this._iRecordsDisplay):!f||c>d||-1===a?d:c},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null};m.ext=x={buttons:{},classes:{},builder:"-source-",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},
order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:m.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:m.version};h.extend(x,{afnFiltering:x.search,aTypes:x.type.detect,ofnSearch:x.type.search,oSort:x.type.order,afnSortData:x.order,aoFeatures:x.feature,oApi:x.internal,oStdClasses:x.classes,oPagination:x.pager});h.extend(m.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",
sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",
sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""});var Kb=m.ext.pager;h.extend(Kb,{simple:function(){return["previous","next"]},full:function(){return["first","previous","next","last"]},numbers:function(a,b){return[ha(a,
b)]},simple_numbers:function(a,b){return["previous",ha(a,b),"next"]},full_numbers:function(a,b){return["first","previous",ha(a,b),"next","last"]},first_last_numbers:function(a,b){return["first",ha(a,b),"last"]},_numbers:ha,numbers_length:7});h.extend(!0,m.ext.renderer,{pageButton:{_:function(a,b,c,d,e,f){var g=a.oClasses,j=a.oLanguage.oPaginate,i=a.oLanguage.oAria.paginate||{},n,l,m=0,o=function(b,d){var k,s,u,r,v=function(b){Sa(a,b.data.action,true)};k=0;for(s=d.length;k<s;k++){r=d[k];if(h.isArray(r)){u=
h("<"+(r.DT_el||"div")+"/>").appendTo(b);o(u,r)}else{n=null;l="";switch(r){case "ellipsis":b.append('<span class="ellipsis">&#x2026;</span>');break;case "first":n=j.sFirst;l=r+(e>0?"":" "+g.sPageButtonDisabled);break;case "previous":n=j.sPrevious;l=r+(e>0?"":" "+g.sPageButtonDisabled);break;case "next":n=j.sNext;l=r+(e<f-1?"":" "+g.sPageButtonDisabled);break;case "last":n=j.sLast;l=r+(e<f-1?"":" "+g.sPageButtonDisabled);break;default:n=r+1;l=e===r?g.sPageButtonActive:""}if(n!==null){u=h("<a>",{"class":g.sPageButton+
" "+l,"aria-controls":a.sTableId,"aria-label":i[r],"data-dt-idx":m,tabindex:a.iTabIndex,id:c===0&&typeof r==="string"?a.sTableId+"_"+r:null}).html(n).appendTo(b);Va(u,{action:r},v);m++}}}},s;try{s=h(b).find(G.activeElement).data("dt-idx")}catch(u){}o(h(b).empty(),d);s!==k&&h(b).find("[data-dt-idx="+s+"]").focus()}}});h.extend(m.ext.type.detect,[function(a,b){var c=b.oLanguage.sDecimal;return Ya(a,c)?"num"+c:null},function(a){if(a&&!(a instanceof Date)&&!Zb.test(a))return null;var b=Date.parse(a);
return null!==b&&!isNaN(b)||L(a)?"date":null},function(a,b){var c=b.oLanguage.sDecimal;return Ya(a,c,!0)?"num-fmt"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Pb(a,c)?"html-num"+c:null},function(a,b){var c=b.oLanguage.sDecimal;return Pb(a,c,!0)?"html-num-fmt"+c:null},function(a){return L(a)||"string"===typeof a&&-1!==a.indexOf("<")?"html":null}]);h.extend(m.ext.type.search,{html:function(a){return L(a)?a:"string"===typeof a?a.replace(Mb," ").replace(Aa,""):""},string:function(a){return L(a)?
a:"string"===typeof a?a.replace(Mb," "):a}});var za=function(a,b,c,d){if(0!==a&&(!a||"-"===a))return-Infinity;b&&(a=Ob(a,b));a.replace&&(c&&(a=a.replace(c,"")),d&&(a=a.replace(d,"")));return 1*a};h.extend(x.type.order,{"date-pre":function(a){return Date.parse(a)||-Infinity},"html-pre":function(a){return L(a)?"":a.replace?a.replace(/<.*?>/g,"").toLowerCase():a+""},"string-pre":function(a){return L(a)?"":"string"===typeof a?a.toLowerCase():!a.toString?"":a.toString()},"string-asc":function(a,b){return a<
b?-1:a>b?1:0},"string-desc":function(a,b){return a<b?1:a>b?-1:0}});cb("");h.extend(!0,m.ext.renderer,{header:{_:function(a,b,c,d){h(a.nTable).on("order.dt.DT",function(e,f,g,h){if(a===f){e=c.idx;b.removeClass(c.sSortingClass+" "+d.sSortAsc+" "+d.sSortDesc).addClass(h[e]=="asc"?d.sSortAsc:h[e]=="desc"?d.sSortDesc:c.sSortingClass)}})},jqueryui:function(a,b,c,d){h("<div/>").addClass(d.sSortJUIWrapper).append(b.contents()).append(h("<span/>").addClass(d.sSortIcon+" "+c.sSortingClassJUI)).appendTo(b);
h(a.nTable).on("order.dt.DT",function(e,f,g,h){if(a===f){e=c.idx;b.removeClass(d.sSortAsc+" "+d.sSortDesc).addClass(h[e]=="asc"?d.sSortAsc:h[e]=="desc"?d.sSortDesc:c.sSortingClass);b.find("span."+d.sSortIcon).removeClass(d.sSortJUIAsc+" "+d.sSortJUIDesc+" "+d.sSortJUI+" "+d.sSortJUIAscAllowed+" "+d.sSortJUIDescAllowed).addClass(h[e]=="asc"?d.sSortJUIAsc:h[e]=="desc"?d.sSortJUIDesc:c.sSortingClassJUI)}})}}});var Vb=function(a){return"string"===typeof a?a.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,
"&quot;"):a};m.render={number:function(a,b,c,d,e){return{display:function(f){if("number"!==typeof f&&"string"!==typeof f)return f;var g=0>f?"-":"",h=parseFloat(f);if(isNaN(h))return Vb(f);h=h.toFixed(c);f=Math.abs(h);h=parseInt(f,10);f=c?b+(f-h).toFixed(c).substring(2):"";return g+(d||"")+h.toString().replace(/\B(?=(\d{3})+(?!\d))/g,a)+f+(e||"")}}},text:function(){return{display:Vb}}};h.extend(m.ext.internal,{_fnExternApiFunc:Lb,_fnBuildAjax:sa,_fnAjaxUpdate:kb,_fnAjaxParameters:tb,_fnAjaxUpdateDraw:ub,
_fnAjaxDataSrc:ta,_fnAddColumn:Da,_fnColumnOptions:ja,_fnAdjustColumnSizing:Y,_fnVisibleToColumnIndex:Z,_fnColumnIndexToVisible:$,_fnVisbleColumns:aa,_fnGetColumns:la,_fnColumnTypes:Fa,_fnApplyColumnDefs:hb,_fnHungarianMap:X,_fnCamelToHungarian:I,_fnLanguageCompat:Ca,_fnBrowserDetect:fb,_fnAddData:M,_fnAddTr:ma,_fnNodeToDataIndex:function(a,b){return b._DT_RowIndex!==k?b._DT_RowIndex:null},_fnNodeToColumnIndex:function(a,b,c){return h.inArray(c,a.aoData[b].anCells)},_fnGetCellData:B,_fnSetCellData:ib,
_fnSplitObjNotation:Ia,_fnGetObjectDataFn:Q,_fnSetObjectDataFn:R,_fnGetDataMaster:Ja,_fnClearTable:na,_fnDeleteIndex:oa,_fnInvalidate:ca,_fnGetRowElements:Ha,_fnCreateTr:Ga,_fnBuildHead:jb,_fnDrawHead:ea,_fnDraw:N,_fnReDraw:S,_fnAddOptionsHtml:mb,_fnDetectHeader:da,_fnGetUniqueThs:ra,_fnFeatureHtmlFilter:ob,_fnFilterComplete:fa,_fnFilterCustom:xb,_fnFilterColumn:wb,_fnFilter:vb,_fnFilterCreateSearch:Oa,_fnEscapeRegex:Pa,_fnFilterData:yb,_fnFeatureHtmlInfo:rb,_fnUpdateInfo:Bb,_fnInfoMacros:Cb,_fnInitialise:ga,
_fnInitComplete:ua,_fnLengthChange:Qa,_fnFeatureHtmlLength:nb,_fnFeatureHtmlPaginate:sb,_fnPageChange:Sa,_fnFeatureHtmlProcessing:pb,_fnProcessingDisplay:C,_fnFeatureHtmlTable:qb,_fnScrollDraw:ka,_fnApplyToChildren:H,_fnCalculateColumnWidths:Ea,_fnThrottle:Na,_fnConvertToWidth:Db,_fnGetWidestNode:Eb,_fnGetMaxLenString:Fb,_fnStringToCss:v,_fnSortFlatten:V,_fnSort:lb,_fnSortAria:Hb,_fnSortListener:Ua,_fnSortAttachListener:La,_fnSortingClasses:wa,_fnSortData:Gb,_fnSaveState:xa,_fnLoadState:Ib,_fnSettingsFromNode:ya,
_fnLog:J,_fnMap:F,_fnBindAction:Va,_fnCallbackReg:z,_fnCallbackFire:r,_fnLengthOverflow:Ra,_fnRenderer:Ma,_fnDataSource:y,_fnRowAttributes:Ka,_fnCalculateEnd:function(){}});h.fn.dataTable=m;m.$=h;h.fn.dataTableSettings=m.settings;h.fn.dataTableExt=m.ext;h.fn.DataTable=function(a){return h(this).dataTable(a).api()};h.each(m,function(a,b){h.fn.DataTable[a]=b});return h.fn.dataTable});

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,20 @@
Copyright (c) 2008-2015 SpryMedia Limited
https://datatables.net
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 471 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 455 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 405 B

View File

@@ -0,0 +1,920 @@
<?php
// Test for restore_network()
define( 'TEST_RESTORE_NETWORK', FALSE );
define( 'TEST_NETWORK_BLOG_COUNT', 30 );
class IP_Geo_Block_Admin_Ajax {
/**
* Admin ajax sub functions
*
* @param string $which name of the geolocation api provider (should be validated by whitelist)
*/
public static function search_ip( $which ) {
require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-lkup.php';
// check format
if ( filter_var( $ip = trim( $_POST['ip'] ), FILTER_VALIDATE_IP ) ) {
// get option settings and compose request headers
$options = IP_Geo_Block::get_option();
$tmp = IP_Geo_Block::get_request_headers( $options );
// create object for provider and get location
if ( $geo = IP_Geo_Block_API::get_instance( $which, $options ) )
$res = $geo->get_location( $ip, $tmp );
else
$res = array( 'errorMessage' => 'Unknown service.' );
} else {
$res = array( 'errorMessage' => 'Invalid IP address.' );
}
if ( empty( $res['errorMessage'] ) ) {
if ( $geo = IP_Geo_Block_API::get_instance( 'Maxmind', $options ) ) {
$tmp = microtime( TRUE );
$geo = $geo->get_location( $ip, array( 'ASN' => TRUE ) );
$tmp = microtime( TRUE ) - $tmp;
$res['AS number'] = isset( $geo['ASN'] ) ? esc_html( $geo['ASN'] ) : '';
$res['AS number'] .= sprintf( ' (%.1f [msec])', $tmp * 1000.0 );
}
$tmp = microtime( TRUE );
$res['host (DNS)'] = esc_html( IP_Geo_Block_Lkup::gethostbyaddr( $ip ) );
$tmp = microtime( TRUE ) - $tmp;
$res['host (DNS)'] .= sprintf( ' (%.1f [msec])', $tmp * 1000.0 );
}
return $res;
}
/**
* Get country code from providers
*
* @param string $which 'ip_client' or 'ip_server' (not in use)
*/
public static function scan_country( $which ) {
// scan all the country code using selected APIs
$options = IP_Geo_Block::get_option();
$ip = IP_Geo_Block::get_ip_address();
$args = IP_Geo_Block::get_request_headers( $options );
$type = IP_Geo_Block_Provider::get_providers( 'type', FALSE, FALSE );
$providers = IP_Geo_Block_Provider::get_valid_providers( $options, FALSE, FALSE );
$res['IP address'] = esc_html( $ip );
foreach ( $providers as $provider ) {
if ( $geo = IP_Geo_Block_API::get_instance( $provider, $options ) ) {
$ret = $geo->get_location( $ip, $args );
$res[ $provider ] = array(
'type' => $type[ $provider ],
'code' => esc_html(
FALSE === $ret ? __( 'n/a', 'ip-geo-block' ) : (
! empty( $ret['errorMessage'] ) ? $ret['errorMessage'] : (
! empty( $ret['countryCode' ] ) ? $ret['countryCode' ] :
__( 'n/a', 'ip-geo-block' ) ) )
),
);
}
}
return $res;
}
/**
* Insert array
*
*/
private static function array_insert( &$base_array, $insert_value, $position = null ) {
if ( ! is_array( $insert_value ) )
$insert_value = array( $insert_value );
$position = is_null( $position ) ? count( $base_array ) : intval( $position );
$base_array = array_merge( array_splice( $base_array, 0, $position ), $insert_value, $base_array );
}
/**
* Export logs from MySQL DB
*
* @param string $which 'comment', 'xmlrpc', 'login', 'admin' or 'public'
*/
public static function export_logs( $which ) {
$csv = '#';
$time = $_SERVER['REQUEST_TIME'];
$csv .= implode( ',', array(
__( 'Time', 'ip-geo-block' ),
__( 'IP address', 'ip-geo-block' ),
__( 'Code', 'ip-geo-block' ),
__( 'ASN', 'ip-geo-block' ),
__( 'Target', 'ip-geo-block' ),
__( 'Result', 'ip-geo-block' ),
__( 'Request', 'ip-geo-block' ),
__( 'User agent', 'ip-geo-block' ),
__( 'HTTP headers', 'ip-geo-block' ),
__( '$_POST data', 'ip-geo-block' ),
) ) . PHP_EOL;
foreach ( IP_Geo_Block_Logs::restore_logs( $which ) as $data ) {
$hook = array_shift( $data ); // remove `No`
$hook = array_shift( $data ); // extract `hook`
self::array_insert( $data, $hook, 3 );
$data[0] = IP_Geo_Block_Util::localdate( $data[0], 'Y-m-d H:i:s' );
$data[7] = str_replace( ',', '', $data[7] ); // &#044; --> &#130;
$data[8] = str_replace( ',', '', $data[8] ); // &#044; --> &#130;
$data[9] = str_replace( ',', '', $data[9] ); // &#044; --> &#130;
$csv .= implode( ',', $data ) . PHP_EOL;
}
// Send as file
header( 'Content-Description: File Transfer' );
header( 'Content-Type: application/octet-stream' );
header( 'Content-Disposition: attachment; filename="' . IP_Geo_Block::PLUGIN_NAME . '_' . IP_Geo_Block_Util::localdate( $time, 'Y-m-d_H-i-s' ) . '.csv"' );
header( 'Pragma: public' );
header( 'Expires: 0' );
header( 'Cache-Control: no-store, no-cache, must-revalidate' );
header( 'Content-Length: ' . strlen( $csv ) );
echo $csv;
}
/**
* Format logs from rows array
*
*/
private static function format_logs( $rows ) {
$options = IP_Geo_Block::get_option();
$res = array();
foreach ( $rows as $row ) {
array_shift( $row ); // remove `No`
$row = array_map( 'esc_html', $row );
if ( $options['anonymize'] && FALSE === strpos( $row[2], '***' ) ) {
$row[2] = IP_Geo_Block_Util::anonymize_ip( $row[2], TRUE );
$row[8] = IP_Geo_Block_Util::anonymize_ip( $row[8], FALSE );
}
$res[] = array(
/* 0 Checkbox */ '',
/* 1 Time (raw) */ $row[1],
/* 2 Date */ '&rsquo;' . IP_Geo_Block_Util::localdate( $row[1], 'y-m-d H:i:s' ),
/* 3 IP address */ '<span><a href="#!">' . $row[2] . '</a></span>',
/* 4 Country code */ '<span>' . $row[3] . '</span>',
/* 5 AS number */ '<span>' . $row[5] . '</span>',
/* 6 Target */ '<span>' . $row[0] . '</span>',
/* 7 Status */ '<span>' . $row[4] . '</span>',
/* 8 Request */ '<span>' . $row[6] . '</span>',
/* 9 User agent */ '<span>' . $row[7] . '</span>',
/* 10 HTTP headers */ '<span>' . $row[8] . '</span>',
/* 11 $_POST data */ '<span>' . $row[9] . '</span>',
);
}
return $res;
}
/**
* Restore logs from MySQL DB
*
* @param string $which 'comment', 'xmlrpc', 'login', 'admin' or 'public'
*/
public static function restore_logs( $which ) {
return array( 'data' => self::format_logs(
apply_filters( IP_Geo_Block::PLUGIN_NAME . '-logs', IP_Geo_Block_Logs::restore_logs( $which ) )
) ); // DataTables requires `data`
}
/**
* Catch and release the authority for live log
*
* @return TRUE or WP_Error
*/
public static function catch_live_log() {
$user = IP_Geo_Block_Util::get_current_user_id();
$auth = IP_Geo_Block::get_live_log();
if ( $auth === FALSE || $user === (int)$auth ) {
set_transient( IP_Geo_Block::PLUGIN_NAME . '-live-log', $user, IP_Geo_Block_Admin::TIMEOUT_LIVE_UPDATE );
return TRUE;
} else {
$info = get_userdata( $auth );
return new WP_Error( 'Warn', sprintf( __( 'The user %s (user ID: %d) is in use.', 'ip-geo-block' ), $info->user_login, $auth ) );
}
}
public static function release_live_log() {
if ( is_wp_error( $result = self::catch_live_log() ) )
return $result;
delete_transient( IP_Geo_Block::PLUGIN_NAME . '-live-log' );
return TRUE;
}
/**
* Restore and reset live log in SQLite
*
*/
public static function reset_live_log() {
return IP_Geo_Block_Logs::reset_sqlite_db();
}
public static function restore_live_log( $hook, $settings ) {
if ( is_wp_error( $ret = self::catch_live_log() ) )
return $ret;
if ( ! is_wp_error( $res = IP_Geo_Block_Logs::restore_live_log( $hook, $settings ) ) )
return array( 'data' => self::format_logs( apply_filters( IP_Geo_Block::PLUGIN_NAME . '-logs', $res ) ) );
else
return array( 'error' => $res->get_error_message() );
}
/**
* Export IP address in cache from MySQL DB
*
*/
public static function export_cache( $anonymize = TRUE ) {
$csv = '#';
$time = $_SERVER['REQUEST_TIME'];
$csv .= implode( ',', array(
__( 'IP address', 'ip-geo-block' ),
__( 'Code', 'ip-geo-block' ),
__( 'ASN', 'ip-geo-block' ),
__( 'Host name', 'ip-geo-block' ),
__( 'Target', 'ip-geo-block' ),
__( 'Failure / Total', 'ip-geo-block' ),
__( 'Elapsed[sec]', 'ip-geo-block' ),
) ) . PHP_EOL;
foreach ( IP_Geo_Block_Logs::restore_cache() as $key => $val ) {
if ( $anonymize ) {
$key = IP_Geo_Block_Util::anonymize_ip( $key, TRUE );
$val['host'] = IP_Geo_Block_Util::anonymize_ip( $val['host'], FALSE );
}
$csv .= implode( ',', array(
/* IP address */ $key,
/* Country code */ $val['code'],
/* AS number */ $val['asn' ],
/* Host name */ $val['host'],
/* Target */ $val['hook'],
/* Failure / Total */ sprintf( '%d / %d', (int)$val['fail'], (int)$val['reqs'] ),
/* Elapsed[sec] */ $time - (int)$val['time'],
) ) . PHP_EOL;
}
// Send as file
header( 'Content-Description: File Transfer' );
header( 'Content-Type: application/octet-stream' );
header( 'Content-Disposition: attachment; filename="' . IP_Geo_Block::PLUGIN_NAME . '_' . IP_Geo_Block_Util::localdate( $time, 'Y-m-d_H-i-s' ) . '.csv"' );
header( 'Pragma: public' );
header( 'Expires: 0' );
header( 'Cache-Control: no-store, no-cache, must-revalidate' );
header( 'Content-Length: ' . strlen( $csv ) );
echo $csv;
}
/**
* Restore cache from MySQL DB
*
*/
public static function restore_cache( $anonymize = TRUE ) {
$res = array();
$time = $_SERVER['REQUEST_TIME'];
foreach ( IP_Geo_Block_Logs::restore_cache() as $key => $val ) {
if ( $anonymize ) {
$key = IP_Geo_Block_Util::anonymize_ip( $key, TRUE );
$val['host'] = IP_Geo_Block_Util::anonymize_ip( $val['host'], FALSE );
}
$res[] = array(
/* Checkbox */ '',
/* IP address */ '<span><a href="#!" data-hash="' . esc_attr( $val['hash'] ). '">' . esc_html( $key ) . '</a></span>',
/* Country code */ '<span>' . esc_html( $val['code'] ) . '</span>',
/* AS number */ '<span>' . esc_html( $val['asn' ] ) . '</span>',
/* Host name */ '<span>' . esc_html( $val['host'] ) . '</span>',
/* Target */ '<span>' . esc_html( $val['hook'] ) . '</span>',
/* Fails/Calls */ '<span>' . sprintf( '%d / %d', (int)$val['fail'], (int)$val['reqs'] ) . '</span>',
/* Elapsed[sec] */ '<span>' . ( $time - (int)$val['time'] ) . '</span>',
);
}
return array( 'data' => $res ); // DataTables requires `data`
}
/**
* Get the number of active sites on your installation
*/
public static function get_network_count() {
if ( ! defined( 'TEST_RESTORE_NETWORK' ) or ! TEST_RESTORE_NETWORK ):
if ( is_plugin_active_for_network( IP_GEO_BLOCK_BASE ) ) {
return get_blog_count(); // get_sites( array( 'count' => TRUE ) ) @since 4.6
} else {
$count = 0;
global $wpdb;
foreach ( $wpdb->get_col( "SELECT `blog_id` FROM `$wpdb->blogs`" ) as $id ) {
switch_to_blog( $id );
is_plugin_active( IP_GEO_BLOCK_BASE ) and ++$count;
restore_current_blog();
}
return $count;
}
else:
return TEST_NETWORK_BLOG_COUNT;
endif;
}
/**
* Restore blocked per target in logs
*
* @param string $duration the number of selected duration
* @param int $offset the start of blog to restore logs
* @param int $length the number of blogs to restore logs from $offset
* @param int $literal JavaScript literal notation
*/
public static function restore_network( $duration, $offset = 0, $length = 100, $literal = FALSE ) {
$zero = array(
'comment' => 0,
'xmlrpc' => 0,
'login' => 0,
'admin' => 0,
'public' => 0,
);
$time = array(
YEAR_IN_SECONDS, // All
HOUR_IN_SECONDS, // Latest 1 hour
DAY_IN_SECONDS, // Latest 24 hours
WEEK_IN_SECONDS, // Latest 1 week
30 * DAY_IN_SECONDS // Latest 1 month (MONTH_IN_SECONDS is since WP 4.4+)
);
$i = 0;
$length += $offset;
$json = $count = array();
$duration = isset( $time[ $duration ] ) ? $time[ $duration ] : $time[0];
if ( ! defined( 'TEST_RESTORE_NETWORK' ) or ! TEST_RESTORE_NETWORK ):
global $wpdb;
foreach ( $wpdb->get_col( "SELECT `blog_id` FROM `$wpdb->blogs`" ) as $id ) {
switch_to_blog( $id );
if ( is_plugin_active( IP_GEO_BLOCK_BASE ) && $offset <= $i && $i < $length ) {
// array of ( `time`, `ip`, `hook`, `code`, `method`, `data` )
$name = get_bloginfo( 'name' );
$logs = IP_Geo_Block_Logs::get_recent_logs( $duration );
$count[ $name ] = $zero;
// Blocked hooks by time
foreach( $logs as $val ) {
++$count[ $name ][ $val['hook'] ];
}
// link over network
$count[ $name ]['link'] = esc_url( add_query_arg(
array( 'page' => IP_Geo_Block::PLUGIN_NAME ),
admin_url( 'options-general.php' )
) );
}
restore_current_blog();
}
else:
for ( $i = 0; $i < TEST_NETWORK_BLOG_COUNT; ++$i ) {
if ( $offset <= $i && $i < $length ) {
$count[ 'site-' . $i ] = array(
$i, $i, $i, $i, $i,
esc_url( add_query_arg(
array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => 1 ),
admin_url( 'options-general.php' )
) )
);
}
}
endif; // TEST_RESTORE_NETWORK
if ( $literal ) {
// https://stackoverflow.com/questions/17327022/create-line-chart-using-google-chart-api-and-json-for-datatable
foreach ( $count as $key => $val ) {
$json['rows'][]['c'] = array(
array( 'v' => $key ),
array( 'v' => $val['comment'] ),
array( 'v' => $val['xmlrpc' ] ),
array( 'v' => $val['login' ] ),
array( 'v' => $val['admin' ] ),
array( 'v' => $val['public' ] ),
array( 'v' => $val['link' ] ),
);
}
}
else {
// https://developers.google.com/chart/interactive/docs/datatables_dataviews#arraytodatatable
foreach ( $count as $key => $val ) {
array_push( $json, array_merge( array( $key ), array_values( $val ) ) );
}
}
return $json;
}
/**
* Validate json from the client and respond safe data
*
*/
public static function validate_settings( $parent ) {
// restore escaped characters (see wp_magic_quotes() in wp-includes/load.php)
$json = json_decode(
str_replace(
array( '\\"', '\\\\', "\'" ),
array( '"', '\\', "'" ),
isset( $_POST['data'] ) ? $_POST['data'] : ''
), TRUE
);
if ( NULL === $json )
wp_die( 'Illegal JSON format.', '', array( 'response' => 500, 'back_link' => TRUE ) ); // @Since 2.0.4
// Convert json to setting data
$input = self::json_to_settings( $json );
// Integrate posted data into current settings because if can be a part of hole data
$input = $parent->array_replace_recursive(
$parent->preprocess_options( IP_Geo_Block::get_option(), IP_Geo_Block::get_default() ), $input
);
// Validate options and convert to json
$output = $parent->sanitize_options( $input );
$json = self::json_unsafe_encode( self::settings_to_json( $output ) );
mbstring_binary_safe_encoding(); // @since 3.7.0
$length = strlen( $json );
reset_mbstring_encoding(); // @since 3.7.0
// Send json as file
header( 'Content-Description: File Transfer' );
header( 'Content-Type: application/octet-stream' );
header( 'Content-Disposition: attachment; filename="' . IP_Geo_Block::PLUGIN_NAME . '-settings.json"' );
header( 'Pragma: public' );
header( 'Expires: 0' );
header( 'Cache-Control: no-store, no-cache, must-revalidate' );
header( 'Content-Length: ' . $length );
echo $json;
}
/**
* Convert json associative array to settings array
*
*/
private static function json_to_settings( $input ) {
$settings = $m = array();
$prfx = IP_Geo_Block::OPTION_NAME;
try {
foreach ( $input as $key => $val ) {
if ( preg_match( "/${prfx}\[(.+?)\](?:\[(.+?)\](?:\[(.+?)\])?)?/", $key, $m ) ) {
switch ( count( $m ) ) {
case 2:
$settings[ $m[1] ] = $val;
break;
case 3:
$settings[ $m[1] ][ $m[2] ] = $val;
break;
case 4:
if ( is_numeric( $m[3] ) ) {
if ( empty( $settings[ $m[1] ][ $m[2] ] ) )
$settings[ $m[1] ][ $m[2] ] = 0;
$settings[ $m[1] ][ $m[2] ] |= $val;
} else { // [*]:checkbox
$settings[ $m[1] ][ $m[2] ][ $m[3] ] = $val;
}
break;
default:
throw new Exception();
}
}
}
}
catch ( Exception $e ) { // should be returned as ajax response
wp_die( sprintf( __( 'illegal format at %s. Please delete the corresponding line and try again.', 'ip-geo-block' ), print_r( @$m[0], TRUE ) ) );
}
return $settings;
}
/**
* Convert settings array to json associative array
*
*/
public static function settings_to_json( $input, $overwrite = TRUE ) {
// [*]:list of checkboxes, [$]:comma separated text to array, [%]:associative array
$keys = array(
'[version]',
'[matching_rule]',
'[white_list]',
'[black_list]',
'[extra_ips][white_list]',
'[extra_ips][black_list]',
'[anonymize]',
'[restrict_api]', // 3.0.13
'[simulate]', // 3.0.14
'[signature]',
'[login_fails]',
'[response_code]',
'[response_msg]', // 3.0.0
'[redirect_uri]', // 3.0.0
'[validation][timing]', // 2.2.9
'[validation][proxy]',
'[validation][comment]',
'[validation][xmlrpc]',
'[validation][login]',
'[login_action][login]', // 2.2.8
'[login_action][register]', // 2.2.8
'[login_action][resetpass]', // 2.2.8
'[login_action][lostpassword]', // 2.2.8
'[login_action][postpass]', // 2.2.8
'[validation][admin][1]',
'[validation][admin][2]',
'[validation][ajax][1]',
'[validation][ajax][2]',
'[validation][plugins]',
'[validation][themes]',
'[validation][includes]', // 3.0.0
'[validation][uploads]', // 3.0.0
'[validation][languages]', // 3.0.0
'[validation][public]', // 3.0.0
'[validation][restapi]', // 3.0.3
'[validation][mimetype]', // 3.0.3
'[rewrite][plugins]',
'[rewrite][themes]',
'[rewrite][includes]', // 3.0.0
'[rewrite][uploads]', // 3.0.0
'[rewrite][languages]', // 3.0.0
'[exception][plugins][*]', // 2.2.5
'[exception][themes][*]', // 2.2.5
'[exception][admin][$]', // 3.0.0
'[exception][public][$]', // 3.0.0
'[exception][includes][$]', // 3.0.0
'[exception][uploads][$]', // 3.0.0
'[exception][languages][$]', // 3.0.0
'[exception][restapi][$]', // 3.0.3
'[public][matching_rule]', // 3.0.0
'[public][white_list]', // 3.0.0
'[public][black_list]', // 3.0.0
'[public][target_rule]', // 3.0.0
'[public][target_pages][$]', // 3.0.0
'[public][target_posts][$]', // 3.0.0
'[public][target_cates][$]', // 3.0.0
'[public][target_tags][$]', // 3.0.0
'[public][ua_list]', // 3.0.0
'[public][dnslkup]', // 3.0.3
'[public][response_code]', // 3.0.3
'[public][response_msg]', // 3.0.3
'[public][redirect_uri]', // 3.0.3
'[public][behavior]', // 3.0.10
'[behavior][time]', // 3.0.10
'[behavior][view]', // 3.0.10
'[save_statistics]',
'[validation][recdays]', // 2.2.9
'[validation][reclogs]',
'[validation][maxlogs]',
'[validation][explogs]', // 3.0.12
'[validation][postkey]',
'[update][auto]',
'[cache_time_gc]', // 3.0.0
'[cache_hold]',
'[cache_time]',
'[comment][pos]',
'[comment][msg]',
'[clean_uninstall]',
'[api_key][GoogleMap]', // 2.2.7
'[network_wide]', // 3.0.0
'[mimetype][white_list][%]', // 3.0.3
'[mimetype][black_list]', // 3.0.3
'[mimetype][capability][$]', // 3.0.4
'[Maxmind][use_asn]', // 3.0.4
'[live_update][in_memory]', // 3.0.5
'[monitor][updated_option]', // 3.0.18
'[monitor][update_site_option]', // 3.0.18
'[metadata][pre_update_option][$]', // 3.0.17
'[metadata][pre_update_site_option][$]', // 3.0.17
);
$json = array();
$prfx = IP_Geo_Block::OPTION_NAME;
// add providers
foreach ( array_keys( IP_Geo_Block_Provider::get_providers( 'key' ) ) as $key ) {
$keys[] = '[providers][' . $key . ']';
}
foreach ( $keys as $key ) {
if ( preg_match( "/\[(.+?)\](?:\[(.+?)\](?:\[(.+?)\])?)?/", $key, $m ) ) {
switch ( count( $m ) ) {
case 2:
if ( isset( $input[ $m[1] ] ) ) {
$json[ $prfx.'['.$m[1].']' ] = strval( $input[ $m[1] ] );
}
break;
case 3:
if ( '%' === $m[2] ) { // [%]:associative array
foreach ( isset( $input[ $m[1] ] ) ? $input[ $m[1] ] : array() as $key => $val ) {
$json[ $prfx.'['.$m[1].']['.$key.']' ] = $val;
}
break;
}
if ( isset( $input[ $m[1] ][ $m[2] ] ) || $overwrite ) {
$json[ $prfx.'['.$m[1].']['.$m[2].']' ] = (
isset( $input[ $m[1] ][ $m[2] ] ) &&
'@' !== $input[ $m[1] ][ $m[2] ] ?
strval( $input[ $m[1] ][ $m[2] ] ) : ''
);
}
break;
case 4:
if ( is_numeric( $m[3] ) ) {
if ( isset( $input[ $m[1] ][ $m[2] ] ) )
$json[ $prfx.'['.$m[1].']['.$m[2].']'.'['.$m[3].']' ] =
strval( $input[ $m[1] ][ $m[2] ] ) & (int)$m[3];
}
elseif ( isset( $input[ $m[1] ][ $m[2] ] ) ) {
if ( '*' === $m[3] ) { // [*]:checkbox
foreach ( $input[ $m[1] ][ $m[2] ] as $val ) {
$json[ $prfx.'['.$m[1].']['.$m[2].']'.'['.$val.']' ] = '1';
}
} elseif ( '%' === $m[3] ) { // [%]:associative array
foreach ( $input[ $m[1] ][ $m[2] ] as $key => $val ) {
$json[ $prfx.'['.$m[1].']['.$m[2].']'.'['.$key.']' ] = $val;
}
} elseif ( is_array( $input[ $m[1] ][ $m[2] ] ) ) { // [$]:comma separated text to array
$json[ $prfx.'['.$m[1].']['.$m[2].']' ] = implode( ',', $input[ $m[1] ][ $m[2] ] );
}
}
break;
}
}
}
return $json;
}
/**
* Make preferred settings with formatted json
*
*/
public static function preferred_to_json() {
return self::settings_to_json(
array(
'login_fails' => 10, // Limited number of login attempts
'validation' => array( // Action hook for validation
'comment' => TRUE, // Validate on comment post
'login' => 1, // Validate on login
'admin' => 3, // Validate on admin (1:country 2:ZEP)
'ajax' => 3, // Validate on ajax/post (1:country 2:ZEP)
'xmlrpc' => 1, // Validate on xmlrpc (1:country 2:close)
'postkey' => 'action,comment,log,pwd,FILES', // Keys in $_POST and $_FILES
'plugins' => 2, // Validate on wp-content/plugins
'themes' => 2, // Validate on wp-content/themes
'timing' => 1, // 0:init, 1:mu-plugins, 2:drop-in
'mimetype' => 1, // 0:disable, 1:white_list, 2:black_list
),
'signature' => "../,/wp-config.php,/passwd\ncurl,wget,eval,base64\nselect:.5,where:.5,union:.5\nload_file:.5,create:.6,password:.4",
'rewrite' => array( // Apply rewrite rule
'plugins' => TRUE, // for wp-content/plugins
'themes' => TRUE, // for wp-content/themes
),
),
FALSE // should not overwrite the existing parameters
);
}
// Encode json without JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT
// Note: It should not be rendered via jQuery .html() at client side
private static function json_unsafe_encode( $data ) {
if ( version_compare( PHP_VERSION, '5.4', '>=' ) ) {
$opts = JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE;
if ( function_exists( 'wp_json_encode' ) ) // @since 4.1.0
$json = wp_json_encode( $data, $opts );
else
$json = json_encode( $data, $opts );
}
else { // JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES are not supported in PHP 5.3 and under
$json = self::json_unescaped_unicode( $data );
$json = preg_replace(
array( '!{"!', '!":!', '!("?),"!', '!"}!', '!\\\\/!' ),
array( '{'.PHP_EOL.' "', '": ', '$1,'.PHP_EOL.' "', '"'.PHP_EOL.'}', '/' ),
$json
);
}
return $json;
}
// Fallback function for PHP 5.3 and under
// @link https://qiita.com/keromichan16/items/5ff45a77fb0d48e046cc
// @link https://stackoverflow.com/questions/16498286/why-does-the-php-json-encode-function-convert-utf-8-strings-to-hexadecimal-entit/
private static function json_unescaped_unicode( $input ) {
return preg_replace_callback(
'/(?:\\\\u[0-9a-zA-Z]{4})++/',
array( __CLASS__, 'convert_encoding' ),
json_encode( $input )
);
}
// Fallback function for PHP 5.3 and under
private static function convert_encoding( $matches ) {
return mb_convert_encoding(
pack( 'H*', str_replace( '\\u', '', $matches[0] ) ), 'UTF-8', 'UTF-16'
);
}
/**
* Get blocked action and pages
*
* @param string $which 'page', 'action', 'plugin', 'theme'
* @return array of the name of action/page, plugin or theme
*/
private static function get_blocked_queries( $which ) {
$result = array();
switch ( $which ) {
case 'page':
case 'action':
$dir = IP_Geo_Block_Util::slashit( str_replace( site_url(), '', admin_url() ) ); /* `/wp-admin/` */
foreach ( IP_Geo_Block_Logs::search_blocked_logs( 'method', $dir ) as $log ) {
foreach ( array( 'method', 'data' ) as $key ) {
if ( preg_match( '!' . $which . '=([\-\w]+)!', $log[ $key ], $matches ) ) {
$result += array( $matches[1] => $which );
}
}
}
break;
case 'plugins':
case 'themes':
// make a list of installed plugins/themes
if ( 'plugins' === $which ) {
$key = array();
foreach ( get_plugins() as $pat => $log ) {
$pat = explode( '/', $pat, 2 );
$key[] = $pat[0];
}
} else {
$key = wp_get_themes();
}
$dir = 'plugins' === $which ? plugins_url() : get_theme_root_uri();
$dir = IP_Geo_Block_Util::slashit( str_replace( site_url(), '', $dir ) );
$pat = preg_quote( $dir, '!' ); /* `/wp-content/(plugins|themes)/` */
foreach ( IP_Geo_Block_Logs::search_blocked_logs( 'method', $dir ) as $log ) {
if ( preg_match( '!' . $pat . '(.+?)/!', $log['method'], $matches ) && in_array( $matches[1], $key, TRUE ) ) {
$result += array( $matches[1] => $which );
}
}
break;
}
return $result;
}
/**
* Get slug in blocked requests for exceptions
*
*/
public static function find_exceptions( $target ) {
switch ( $target ) {
case 'find-admin':
$res = array();
foreach ( array( 'action', 'page' ) as $which ) {
$res += self::get_blocked_queries( $which );
}
return $res;
case 'find-plugins':
return self::get_blocked_queries( 'plugins' );
case 'find-themes':
return self::get_blocked_queries( 'themes' );
}
return array();
}
/**
* Get debug information related to WordPress
*
*/
public static function get_wp_info() {
require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-lkup.php';
require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-file.php';
$fs = IP_Geo_Block_FS::init( __FUNCTION__ );
// DNS reverse lookup
$key = microtime( TRUE );
$val = IP_Geo_Block_Lkup::gethostbyaddr( '8.8.8.8' );
$key = microtime( TRUE ) - $key;
// MySQL (supress WordPress error: Unknown system variable 'block_encryption_mode')
$buf = @ini_set( 'output_buffering', 0 );
$dsp = @ini_set( 'display_errors', 0 );
$log = @ini_set( 'error_log', '/' . 'dev' . '/' . 'null' );
$err = @error_reporting( 0 );
$ver = $GLOBALS['wpdb']->get_var( 'SELECT @@GLOBAL.version' );
$bem = $GLOBALS['wpdb']->get_var( 'SELECT @@GLOBAL.block_encryption_mode' ); // `aes-128-ecb` @since MySQL 5.6.17
@ini_set( 'output_buffering', $buf );
@ini_set( 'display_errors', $dsp );
@ini_set( 'error_log', $log );
@error_reporting( $err );
// Human readable size, Proces owner
// https://gist.github.com/mehdichaouch/341a151dd5f469002a021c9396aa2615
// https://secure.php.net/manual/function.get-current-user.php#57624
// https://secure.php.net/manual/function.posix-getpwuid.php#82387
$siz = array( 'B', 'K', 'M', 'G', 'T', 'P' );
$usr = function_exists( 'posix_getpwuid' ) ? posix_getpwuid( posix_geteuid() ) : array( 'name' => getenv( 'USERNAME' ) );
// Server, PHP, WordPress
$res = array_map( 'esc_html', array(
'Server:' => $_SERVER['SERVER_SOFTWARE'],
'MySQL:' => $ver . ( defined( 'IP_GEO_BLOCK_DEBUG' ) && IP_GEO_BLOCK_DEBUG && $bem ? ' (' . $bem . ')' : '' ),
'PHP:' => PHP_VERSION,
'PHP SAPI:' => php_sapi_name(),
'Memory limit:' => ini_get( 'memory_limit' ),
'Peak usage:' => @round( ( $m = memory_get_peak_usage() ) / pow( 1024, ( $i = floor( log( $m, 1024 ) ) ) ), 2 ) . $siz[ $i ],
'WordPress:' => $GLOBALS['wp_version'],
'Multisite:' => is_multisite() ? 'yes' : 'no',
'File system:' => $fs->get_method(),
'Temp folder:' => get_temp_dir(),
'Process owner:' => $usr['name'],
'File owner:' => get_current_user(), // Gets the name of the owner of the current PHP script
'Umask:' => sprintf( '%o', umask() ^ 511 /* 0777 */ ),
'Zlib:' => function_exists( 'gzopen' ) ? 'yes' : 'no',
'ZipArchive:' => class_exists( 'ZipArchive', FALSE ) ? 'yes' : 'no',
'PECL phar:' => class_exists( 'PharData', FALSE ) ? 'yes' : 'no',
'BC Math:' => (extension_loaded('gmp') ? 'gmp ' : '') . (function_exists('bcadd') ? 'yes' : 'no'),
'mb_strcut:' => function_exists( 'mb_strcut' ) ? 'yes' : 'no', // @since PHP 4.0.6
'OpenSSL:' => defined( 'OPENSSL_RAW_DATA' ) ? 'yes' : 'no', // @since PHP 5.3.3
'SQLite(PDO):' => extension_loaded( 'pdo_sqlite' ) ? 'yes' : 'no',
'DNS lookup:' => ('8.8.8.8' !== $val ? 'available' : 'n/a') . sprintf( ' [%.1f msec]', $key * 1000.0 ),
'User agent:' => $_SERVER['HTTP_USER_AGENT'],
) );
// Child and parent themes
$activated = wp_get_theme(); // @since 3.4.0
$res += array( esc_html( $activated->get( 'Name' ) ) => esc_html( $activated->get( 'Version' ) ) );
if ( $installed = $activated->get( 'Template' ) ) {
$activated = wp_get_theme( $installed );
$res += array( esc_html( $activated->get( 'Name' ) ) => esc_html( $activated->get( 'Version' ) ) );
}
// Plugins
$installed = get_plugins(); // @since 1.5.0
$activated = get_site_option( 'active_sitewide_plugins' ); // @since 2.8.0
! is_array( $activated ) and $activated = array();
$activated = array_merge( $activated, array_fill_keys( get_option( 'active_plugins' ), TRUE ) );
foreach ( $installed as $key => $val ) {
if ( isset( $activated[ $key ] ) ) {
$res += array( esc_html( $val['Name'] ) => esc_html( $val['Version'] ) );
}
}
// Blocked self requests
$installed = array_reverse( IP_Geo_Block_Logs::search_logs( IP_Geo_Block::get_ip_address(), IP_Geo_Block::get_option() ) );
foreach ( $installed as $val ) {
if ( IP_Geo_Block::is_blocked( $val['result'] ) ) {
// hide port and nonce
$method = preg_replace( '/\[\d+\]/', '', $val['method'] );
$method = preg_replace( '/(' . IP_Geo_Block::get_auth_key() . ')(?:=|%3D)([\w]+)/', '$1=...', $method );
// add post data
$query = array();
foreach ( explode( ',', $val['data'] ) as $str ) {
FALSE !== strpos( $str, '=' ) and $query[] = $str;
}
if ( ! empty( $query ) )
$method .= '(' . implode( ',', $query ) . ')';
$res += array(
esc_html( IP_Geo_Block_Util::localdate( $val['time'], 'Y-m-d H:i:s' ) ) =>
esc_html( str_pad( $val['result'], 8 ) . $method )
);
}
}
return $res;
}
}

View File

@@ -0,0 +1,470 @@
<?php
class IP_Geo_Block_Admin_Rewrite {
/**
* Instance of this class.
*/
private static $instance = NULL;
// private values
private $doc_root = NULL; // document root
private $base_uri = NULL; // plugins base uri
private $config_file = NULL; // `.htaccess` or `.user.ini`
private $wp_dirs = array(); // path to `plugins` and `themes` from document root
// template of rewrite rule in wp-content/(plugins|themes)/
private $rewrite_rule = array(
'.htaccess' => array(
'plugins' => array(
'# BEGIN IP Geo Block',
'<IfModule mod_rewrite.c>',
'RewriteEngine on',
'RewriteBase %REWRITE_BASE%',
'RewriteCond %{REQUEST_URI} !ip-geo-block/rewrite.php$',
'RewriteRule ^.*\.php$ rewrite.php [L]',
'</IfModule>',
'# END IP Geo Block',
),
'themes' => array(
'# BEGIN IP Geo Block',
'<IfModule mod_rewrite.c>',
'RewriteEngine on',
'RewriteBase %REWRITE_BASE%',
'RewriteRule ^.*\.php$ rewrite.php [L]',
'</IfModule>',
'# END IP Geo Block',
),
),
'.user.ini' => array(
'plugins' => array(
'; BEGIN IP Geo Block%ADDITIONAL%',
'auto_prepend_file = "%IP_GEO_BLOCK_PATH%rewrite-ini.php"',
'; END IP Geo Block',
),
'themes' => array(
'; BEGIN IP Geo Block%ADDITIONAL%',
'auto_prepend_file = "%IP_GEO_BLOCK_PATH%rewrite-ini.php"',
'; END IP Geo Block',
),
),
// https://www.wordfence.com/blog/2014/05/nginx-wordfence-falcon-engine-php-fpm-fastcgi-fast-cgi/
// 'nginx' => array(
// 'plugins' => array(
// '# BEGIN IP Geo Block',
// 'location ~ %REWRITE_BASE%rewrite.php$ {}',
// 'location %WP_CONTENT_DIR%/plugins/ {',
// ' rewrite ^%WP_CONTENT_DIR%/plugins/.*\.php$ %REWRITE_BASE%rewrite.php break;',
// '}',
// '# END IP Geo Block',
// 'themes' => array(
// '# BEGIN IP Geo Block',
// 'location %WP_CONTENT_DIR%/themes/ {',
// ' rewrite ^%WP_CONTENT_DIR%/themes/.*\.php$ %REWRITE_BASE%rewrite.php break;',
// '}',
// '# END IP Geo Block',
// ),
// ),
);
private function __construct() {
// https://stackoverflow.com/questions/25017381/setting-php-document-root-on-webserver
$this->doc_root = str_replace( DIRECTORY_SEPARATOR, '/', str_replace( $_SERVER['SCRIPT_NAME'], '', $_SERVER['SCRIPT_FILENAME'] ) );
$this->base_uri = str_replace( $this->doc_root, '', str_replace( DIRECTORY_SEPARATOR, '/', IP_GEO_BLOCK_PATH ) );
// target directories (WP_CONTENT_DIR can be defined in wp-config.php as an aliased or symbolic linked path)
$path = str_replace( $this->doc_root, '', str_replace( DIRECTORY_SEPARATOR, '/', realpath( WP_CONTENT_DIR ) ) );
$this->wp_dirs = array(
'plugins' => $path . '/plugins/',
'themes' => $path . '/themes/',
);
// Apache in wp-includes/vars.php
global $is_apache;
if ( ! empty( $is_apache ) )
$this->config_file = '.htaccess';
// CGI/FastCGI SAPI (cgi, cgi-fcgi, fpm-fcgi)
elseif ( version_compare( PHP_VERSION, '5.3' ) >= 0 && FALSE !== strpos( php_sapi_name(), 'cgi' ) )
$this->config_file = ini_get( 'user_ini.filename' );
}
/**
* Return an instance of this class.
*
*/
private static function get_instance() {
return self::$instance ? self::$instance : ( self::$instance = new self );
}
/**
* Remove empty element from the array
*
* @param array contents of configuration file
* @return array updated array of contents
*/
private function remove_empty( $content ) {
while ( FALSE !== ( $tmp = reset( $content ) ) ) {
if ( strlen( trim( $tmp ) ) ) {
break;
} else {
array_shift( $content );
}
}
while ( FALSE !== ( $tmp = end( $content ) ) ) {
if ( strlen( trim( $tmp ) ) ) {
break;
} else {
array_pop( $content );
}
}
return $content;
}
/**
* Extract the block of rewrite rule
*
* @param array contents of configuration file
* @return array list of begin and end
*/
private function find_rewrite_block( $content ) {
return preg_grep(
'/^\s*?[#;]\s*?(?:BEGIN|END)\s*?IP Geo Block\s*?$/i', (array)$content
);
}
/**
* Get the path of .htaccess in wp-content/plugins/themes/
*
* @param string 'plugins' or 'themes'
* @return string absolute path to the .htaccess or NULL
*/
private function get_rewrite_file( $which ) {
if ( $this->config_file )
return $this->doc_root . $this->wp_dirs[ $which ] . $this->config_file;
else
return NULL; /* NOT SUPPORTED */
}
/**
* Get contents in .htaccess in wp-content/(plugins|themes)/
*
* @param string 'plugins' or 'themes'
* @return array contents of configuration file or WP_Error
*/
private function get_rewrite_rule( $which ) {
require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-file.php';
$fs = IP_Geo_Block_FS::init( __FUNCTION__ );
// check the existence of configuration file
$file = $this->get_rewrite_file( $which );
$exist = $file ? $fs->exists( $file ) : FALSE;
// check permission
if ( $exist ) {
if ( ! $fs->is_readable( $file ) ) {
return new WP_Error( 'Error',
sprintf( __( 'Unable to read <code>%s</code>. Please check the permission.', 'ip-geo-block' ), $file ) . ' ' .
sprintf( __( 'Or please refer to %s to set it manually.', 'ip-geo-block' ), '<a href="https://www.ipgeoblock.com/codex/how-to-fix-permission-troubles.html" title="How to fix permission troubles? | IP Geo Block">How to fix permission troubles?</a>' )
);
}
}
// get file contents as an array
$exist = $fs->get_contents_array( $file );
return FALSE !== $exist ? $exist : array();
}
/**
* Put contents to .htaccess in wp-content/(plugins|themes)/
*
* @param string $which 'plugins' or 'themes'
* @param array contents of configuration file
* @return bool TRUE (success) or FALSE (failure)
*/
private function put_rewrite_rule( $which, $content ) {
require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-file.php';
$fs = IP_Geo_Block_FS::init( __FUNCTION__ );
$file = $this->get_rewrite_file( $which );
if ( ! $file || FALSE === $fs->put_contents( $file, implode( PHP_EOL, $content ) ) ) {
$this->show_message(
sprintf( __( 'Unable to write <code>%s</code>. Please check the permission.', 'ip-geo-block' ), $file ) . ' ' .
sprintf( __( 'Or please refer to %s to set it manually.', 'ip-geo-block' ), '<a href="https://www.ipgeoblock.com/codex/how-to-fix-permission-troubles.html" title="How to fix permission troubles? | IP Geo Block">How to fix permission troubles?</a>' )
);
return FALSE;
}
// if content is empty then remove file
$content = $this->remove_empty( $content );
return empty( $content ) ? $fs->delete( $file ) : TRUE;
}
/**
* Check if the block of rewrite rule exists
*
* @param string 'plugins' or 'themes'
* @return bool TRUE (found), FALSE (not found or unavailable) or WP_Error
*/
private function get_rewrite_stat( $which ) {
if ( $this->config_file ) {
$content = $this->get_rewrite_rule( $which );
if ( is_wp_error( $content ) )
return $content;
$block = $this->find_rewrite_block( $content );
if ( '.htaccess' === $this->config_file ) {
return empty( $block ) ? FALSE : TRUE;
}
else {
if ( empty( $block ) ) {
$block = preg_grep( '/auto_prepend_file/i', $content );
if ( empty( $block ) ) {
return FALSE; // rewrite rule is not found in configuration file
}
else {
return new WP_Error( 'Error', sprintf(
__( '&#8220;auto_prepend_file&#8221; already defined in %s.', 'ip-geo-block' ),
$this->get_rewrite_file( $which )
) );
}
}
else {
return TRUE; // rewrite rule already exists in configuration file
}
}
}
return -1; /* NOT SUPPORTED */
}
/**
* Remove the block of rewrite rule
*
* @param array contents of configuration file
* @param array contents to be removed
* @return array array of contents without rewrite rule
*/
private function remove_rewrite_block( $content, $block ) {
$block = array_reverse( $block, TRUE );
reset( $block );
while( FALSE !== current( $block ) ) {
$key_end = key( $block ); $val_end = current( $block ); next( $block );
$key_begin = key( $block ); $val_begin = current( $block ); next( $block );
if ( NULL !== $key_end && NULL !== $key_begin ) {
array_splice( $content, $key_begin, $key_end - $key_begin + 1 );
}
}
return $content;
}
/**
* Append the block of rewrite rule
*
* @param string 'plugins' or 'themes'
* @param array contents of configuration file
* @return array array of contents with the block of rewrite rule
*/
private function append_rewrite_block( $which, $content ) {
if ( $type = $this->config_file ) {
// in case that `.user.ini` is configured differently
if ( '.htaccess' !== $type && '.user.ini' !== $type )
$type = '.user.ini';
// in case that another `.user.ini` in ascendant directory
$additional = '';
if ( '.user.ini' === $type ) {
require_once IP_GEO_BLOCK_PATH . 'classes/class-ip-geo-block-file.php';
$fs = IP_Geo_Block_FS::init( __FUNCTION__ );
$dir = dirname( IP_GEO_BLOCK_PATH ); // `/wp-content/plugins`
$ini = $this->config_file;
$doc = $this->doc_root;
do {
// avoid loop just in case
if ( ( $next = dirname( $dir ) ) !== $dir )
$dir = $next;
else
break;
if ( $fs->exists( "$dir/$ini" ) ) {
$tmp = $fs->get_contents_array( "$dir/$ini" );
$tmp = preg_replace( '/^\s*(auto_prepend_file.*)$/', '; $1', $tmp );
$tmp = $this->remove_empty( $tmp );
if ( ! empty( $tmp ) )
$additional = PHP_EOL . PHP_EOL . implode( PHP_EOL, $tmp ) . PHP_EOL;
break;
}
} while ( $dir !== $doc );
}
return array_merge(
$content,
str_replace(
array( '%REWRITE_BASE%', '%WP_CONTENT_DIR%', '%IP_GEO_BLOCK_PATH%', '%ADDITIONAL%' ),
array( $this->base_uri, WP_CONTENT_DIR, IP_GEO_BLOCK_PATH, $additional ),
$this->rewrite_rule[ $type ][ $which ]
)
);
}
return array();
}
/**
* Add rewrite rule to server configration
*
* @param string 'plugins' or 'themes'
* @return bool TRUE (found), FALSE (not found or unavailable)
*/
private function add_rewrite_rule( $which ) {
$stat = $this->get_rewrite_stat( $which );
if ( is_wp_error( $stat ) ) {
$this->show_message( $stat->get_error_message() );
return FALSE;
}
elseif ( TRUE === $stat ) {
return TRUE;
}
elseif ( FALSE === $stat ) {
$content = $this->get_rewrite_rule( $which );
if ( is_wp_error( $content ) ) {
$this->show_message( $content->get_error_message() );
return FALSE;
}
$content = $this->append_rewrite_block( $which, $content );
return $this->put_rewrite_rule( $which, $content );
}
return -1; /* NOT SUPPORTED */
}
/**
* Delete rewrite rule to server configration
*
* @param string 'plugins' or 'themes'
* @return bool TRUE (found), FALSE (not found or unavailable)
*/
private function del_rewrite_rule( $which ) {
$stat = $this->get_rewrite_stat( $which );
if ( is_wp_error( $stat ) ) {
$this->show_message( $stat->get_error_message() );
return FALSE;
}
elseif ( FALSE === $stat ) {
return TRUE;
}
elseif ( TRUE === $stat ) {
$content = $this->get_rewrite_rule( $which );
if ( is_wp_error( $content ) ) {
$this->show_message( $content->get_error_message() );
return FALSE;
}
$block = $this->find_rewrite_block( $content );
$content = $this->remove_rewrite_block( $content, $block );
return $this->put_rewrite_rule( $which, $content );
}
return -1; /* NOT SUPPORTED */
}
/**
* Show notice message
*
*/
private function show_message( $msg ) {
if ( class_exists( 'IP_Geo_Block_Admin', FALSE ) )
IP_Geo_Block_Admin::add_admin_notice( 'error', $msg );
}
/**
* Check rewrite rules
*
*/
public static function check_rewrite_all() {
$rewrite = self::get_instance();
$status = array();
foreach ( array_keys( $rewrite->rewrite_rule['.htaccess'] ) as $key ) {
$stat = $rewrite->get_rewrite_stat( $key );
$status[ $key ] = is_wp_error( $stat ) ? FALSE : $stat;
}
return $status;
}
/**
* Activate all rewrite rules according to the settings
*
*/
public static function activate_rewrite_all( $options ) {
$rewrite = self::get_instance();
foreach ( array_keys( $rewrite->rewrite_rule['.htaccess'] ) as $key ) {
if ( $options[ $key ] )
// if it fails to write, then return FALSE
$options[ $key ] = $rewrite->add_rewrite_rule( $key ) ? TRUE : FALSE;
else
// regardless of the result, return FALSE
$options[ $key ] = $rewrite->del_rewrite_rule( $key ) ? FALSE : FALSE;
}
return $options;
}
/**
* Deactivate all rewrite rules
*
*/
public static function deactivate_rewrite_all() {
$rewrite = self::get_instance();
foreach ( array_keys( $rewrite->rewrite_rule['.htaccess'] ) as $key ) {
$rewrite->del_rewrite_rule( $key );
}
return TRUE;
}
/**
* Return list of target directories.
*
*/
public static function get_dirs() {
$rewrite = self::get_instance();
return str_replace( $rewrite->doc_root, '', $rewrite->wp_dirs );
}
/**
* Return configuration file type.
*
*/
public static function get_config_file() {
$rewrite = self::get_instance();
return $rewrite->config_file;
}
}

View File

@@ -0,0 +1,210 @@
<?php
class IP_Geo_Block_Admin_Tab {
public static function tab_setup( $context, $tab ) {
$cookie = $context->get_cookie();
$options = IP_Geo_Block::get_option();
$plugin_slug = IP_Geo_Block::PLUGIN_NAME;
register_setting(
$option_slug = IP_Geo_Block::PLUGIN_NAME,
$option_name = IP_Geo_Block::OPTION_NAME
);
/*----------------------------------------*
* Validation logs
*----------------------------------------*/
add_settings_section(
$section = $plugin_slug . '-logs',
array( __( 'Validation logs', 'ip-geo-block' ), '<a href="https://www.ipgeoblock.com/codex/record-settings-and-logs.html" title="Validation logs | IP Geo Block">' . __( 'Help', 'ip-geo-block' ) . '</a>' ),
( $options['validation']['reclogs'] ?
array( __CLASS__, 'validation_logs' ) :
array( __CLASS__, 'warn_accesslog' )
),
$option_slug
);
if ( $options['validation']['reclogs'] ):
if ( extension_loaded( 'pdo_sqlite' ) ):
$html = '<ul id="ip-geo-block-live-log">';
$html .= '<li><input type="radio" name="ip-geo-block-live-log" id="ip-geo-block-live-log-start" value="start"><label for="ip-geo-block-live-log-start" title="Start"><span class="ip-geo-block-icon-play"></span></label></li>';
$html .= '<li><input type="radio" name="ip-geo-block-live-log" id="ip-geo-block-live-log-pause" value="pause"><label for="ip-geo-block-live-log-pause" title="Pause"><span class="ip-geo-block-icon-pause"></span></label></li>';
$html .= '<li><input type="radio" name="ip-geo-block-live-log" id="ip-geo-block-live-log-stop" value="stop" checked><label for="ip-geo-block-live-log-stop" title="Stop"><span class="ip-geo-block-icon-stop"></span></label></li>';
$html .= '</ul>';
// Live update
add_settings_field(
$option_name.'_live-log',
__( 'Live update', 'ip-geo-block' ) . '<div id="ip-geo-block-live-loading"><div></div><div></div></div>',
array( $context, 'callback_field' ),
$option_slug,
$section,
array(
'type' => 'html',
'option' => $option_name,
'field' => 'live-log',
'value' => $html,
'class' => isset( $cookie[ $tab ][1] ) && $cookie[ $tab ][1] === 'o' ? '' : 'ip-geo-block-hide',
)
);
endif; // extension_loaded( 'pdo_sqlite' )
// make a list of target (same as in tab-accesslog.php)
$target = array(
'comment' => __( 'Comment post', 'ip-geo-block' ),
'xmlrpc' => __( 'XML-RPC', 'ip-geo-block' ),
'login' => __( 'Login form', 'ip-geo-block' ),
'admin' => __( 'Admin area', 'ip-geo-block' ),
'public' => __( 'Public facing pages', 'ip-geo-block' ),
);
$html = "\n".'<li><label><input type="radio" name="' . $plugin_slug . '-target" value="all" checked="checked" />' . __( 'All', 'ip-geo-block' ) . '</label></li>' . "\n";
foreach ( $target as $key => $val ) {
$html .= '<li><label><input type="radio" name="' . $plugin_slug . '-target" value="' . $key . '" />';
$html .= '<dfn title="' . $val . '">' . $key . '</dfn>' . '</label></li>' . "\n";
}
// Select target
add_settings_field(
$option_name.'_select_target',
__( 'Select target', 'ip-geo-block' ),
array( $context, 'callback_field' ),
$option_slug,
$section,
array(
'type' => 'html',
'option' => $option_name,
'field' => 'select_target',
'value' => '<ul id="' . $plugin_slug . '-select-target">' . $html . '</ul>',
)
);
// Search in logs
add_settings_field(
$option_name.'_search_filter',
__( 'Search in logs', 'ip-geo-block' ),
array( $context, 'callback_field' ),
$option_slug,
$section,
array(
'type' => 'text',
'option' => $option_name,
'field' => 'search_filter',
'value' => isset( $_GET['s'] ) ? esc_html( $_GET['s'] ) : '', // preset filter
'after' => '<a class="button button-secondary" id="ip-geo-block-reset-filter" title="' . __( 'Reset', 'ip-geo-block' ) . '" href="#!">'. __( 'Reset', 'ip-geo-block' ) . '</a>',
)
);
// Preset filters
$filters = has_filter( $plugin_slug . '-logs-preset' ) ? apply_filters( $plugin_slug . '-logs-preset', array() ) : $context->preset_filters();
if ( ! empty( $filters ) ) {
// allowed tags and attributes
$allow_tags = array(
'span' => array(
'class' => 1,
'title' => 1,
)
);
$html = '<ul id="ip-geo-block-logs-preset">';
foreach ( $filters as $filter ) {
$html .= '<li><a href="#!" data-value="' . esc_attr( $filter['value'] ) . '">' . IP_Geo_Block_Util::kses( $filter['title'], $allow_tags ) . '</a></li>';
}
add_settings_field(
$option_name.'_logs_preset',
'<div class="ip-geo-block-subitem">' . __( 'Preset filters', 'ip-geo-block' ) . '</div>',
array( $context, 'callback_field' ),
$option_slug,
$section,
array(
'type' => 'html',
'option' => $option_name,
'field' => 'logs_preset',
'value' => $html,
)
);
}
// Bulk action
add_settings_field(
$option_name.'_bulk_action',
__( 'Bulk action', 'ip-geo-block' ),
array( $context, 'callback_field' ),
$option_slug,
$section,
array(
'type' => 'select',
'option' => $option_name,
'field' => 'bulk_action',
'value' => 0,
'list' => array(
0 => NULL,
'bulk-action-ip-erase' => __( 'Remove entries by IP address', 'ip-geo-block' ),
'bulk-action-ip-white' => __( 'Add IP address to &#8220;Whitelist&#8221;', 'ip-geo-block' ),
'bulk-action-ip-black' => __( 'Add IP address to &#8220;Blacklist&#8221;', 'ip-geo-block' ), ) + ( $options['Maxmind']['use_asn'] <= 0 ? array() : array(
'bulk-action-as-white' => __( 'Add AS number to &#8220;Whitelist&#8221;', 'ip-geo-block' ),
'bulk-action-as-black' => __( 'Add AS number to &#8220;Blacklist&#8221;', 'ip-geo-block' ),
) ),
'after' => '<a class="button button-secondary" id="ip-geo-block-bulk-action" title="' . __( 'Apply', 'ip-geo-block' ) . '" href="#!">'. __( 'Apply', 'ip-geo-block' ) . '</a>' . '<div id="'.$plugin_slug.'-loading"></div>',
)
);
// Clear logs
add_settings_field(
$option_name.'_clear_all',
__( 'Clear logs', 'ip-geo-block' ),
array( $context, 'callback_field' ),
$option_slug,
$section,
array(
'type' => 'button',
'option' => $option_name,
'field' => 'clear_all',
'value' => __( 'Clear all', 'ip-geo-block' ),
'after' => '<div id="'.$plugin_slug.'-logs"></div>',
'class' => empty( $cookie[ $tab ][1] ) || $cookie[ $tab ][1] !== 'o' ? '' : 'ip-geo-block-hide',
)
);
// Export logs
add_settings_field(
$option_name.'_export_logs',
__( 'Export logs', 'ip-geo-block' ),
array( $context, 'callback_field' ),
$option_slug,
$section,
array(
'type' => 'none',
'before' => '<a class="button button-secondary" id="ip-geo-block-export-logs" title="' . __( 'Export to the local file', 'ip-geo-block' ) . '" href="#!">'. __( 'Export csv', 'ip-geo-block' ) . '</a>',
'after' => '<div id="'.$plugin_slug.'-export"></div>',
'class' => empty( $cookie[ $tab ][1] ) || $cookie[ $tab ][1] !== 'o' ? '' : 'ip-geo-block-hide',
)
);
endif; // $options['validation']['reclogs']
}
/**
* Function that fills the section with the desired content.
*
*/
private static function dashboard_url() {
$options = IP_Geo_Block::get_option();
$context = IP_Geo_Block_Admin::get_instance();
return $context->dashboard_url( $options['network_wide'] );
}
public static function validation_logs() {
echo '<table id="', IP_Geo_Block::PLUGIN_NAME, '-validation-logs" class="', IP_Geo_Block::PLUGIN_NAME, '-dataTable display" cellspacing="0" width="100%">', "\n", '<thead></thead><tbody></tbody></table>', "\n";
}
public static function warn_accesslog() {
$url = esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => '0', 'sec' => 3 ), self::dashboard_url() ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-3' );
echo '<p style="padding:0 1em">', sprintf( __( '[ %sRecord &#8220;Validation logs&#8221;%s ] is disabled.', 'ip-geo-block' ), '<a href="' . $url . '">', '</a>' ), '</p>', "\n";
echo '<p style="padding:0 1em">', __( 'Please set the proper condition to record and analyze the validation logs.', 'ip-geo-block' ), '</p>', "\n";
}
}

View File

@@ -0,0 +1,35 @@
<?php
class IP_Geo_Block_Admin_Tab {
public static function tab_setup( $context, $tab ) {
register_setting(
$option_slug = IP_Geo_Block::PLUGIN_NAME,
$option_name = IP_Geo_Block::OPTION_NAME
);
add_settings_section(
$section = IP_Geo_Block::PLUGIN_NAME . '-attribution',
__( 'Attribution links', 'ip-geo-block' ),
NULL,
$option_slug
);
foreach ( IP_Geo_Block_Provider::get_providers( 'link' ) as $provider => $key ) {
add_settings_field(
$option_name.'_attribution_'.$provider,
$provider,
array( $context, 'callback_field' ),
$option_slug,
$section,
array(
'type' => 'html',
'option' => $option_name,
'field' => 'attribution',
'value' => $key,
)
);
}
}
}

View File

@@ -0,0 +1,118 @@
<?php
class IP_Geo_Block_Admin_Tab {
public static function tab_setup( $context, $tab ) {
$options = IP_Geo_Block::get_option();
register_setting(
$option_slug = IP_Geo_Block::PLUGIN_NAME,
$option_name = IP_Geo_Block::OPTION_NAME
);
/*----------------------------------------*
* Geolocation
*----------------------------------------*/
add_settings_section(
$section = IP_Geo_Block::PLUGIN_NAME . '-search',
__( 'Search IP address geolocation', 'ip-geo-block' ),
NULL,
$option_slug
);
// make providers list
$list = array();
$providers = IP_Geo_Block_Provider::get_providers( 'key' );
foreach ( $providers as $provider => $key ) {
if ( ! is_string( $key ) || // provider that does not need api key
! empty( $options['providers'][ $provider ] ) ) { // provider that has api key
$list += array( $provider => $provider );
}
}
// get selected item
$provider = array();
$providers = array_keys( $providers );
$cookie = $context->get_cookie();
if ( isset( $cookie[ $tab ] ) ) {
foreach ( array_slice( (array)$cookie[ $tab ], 3 ) as $key => $val ) {
if ( 'o' === $val ) {
$provider[] = $providers[ $key ];
}
}
}
add_settings_field(
$option_name.'_service',
__( 'Geolocation API', 'ip-geo-block' ),
array( $context, 'callback_field' ),
$option_slug,
$section,
array(
'type' => 'select',
'attr' => 'multiple="multiple"',
'option' => $option_name,
'field' => 'service',
'value' => ! empty( $provider ) ? $provider : $providers[0],
'list' => $list,
)
);
// preset IP address
if ( isset( $_GET['s'] ) ) {
$list = preg_replace(
array( '/\.\*+$/', '/:\w*\*+$/', '/(::.*)::$/' ),
array( '.0', '::', '$1' ),
trim( $_GET['s'] )
); // de-anonymize if `***` exists
$list = filter_var( $list, FILTER_VALIDATE_IP ) ? $list : '';
} else {
$list = '';
}
add_settings_field(
$option_name.'_ip_address',
__( 'IP address', 'ip-geo-block' ),
array( $context, 'callback_field' ),
$option_slug,
$section,
array(
'type' => 'text',
'option' => $option_name,
'field' => 'ip_address',
'value' => $list,
)
);
// Anonymize IP address
add_settings_field(
$option_name.'_anonymize',
__( '<dfn title="IP address is always encrypted on recording in Cache and Logs. Moreover, this option replaces the end of IP address with &#8220;***&#8221; to make it anonymous.">Anonymize IP address</dfn>', 'ip-geo-block' ),
array( $context, 'callback_field' ),
$option_slug,
$section,
array(
'type' => 'checkbox',
'option' => $option_name,
'field' => 'anonymize',
'value' => ( ! empty( $options['anonymize'] ) || ! empty( $options['restrict_api'] ) ) ? TRUE : FALSE,
)
);
// Search geolocation
add_settings_field(
$option_name.'_get_location',
__( 'Search geolocation', 'ip-geo-block' ),
array( $context, 'callback_field' ),
$option_slug,
$section,
array(
'type' => 'button',
'option' => $option_name,
'field' => 'get_location',
'value' => __( 'Search now', 'ip-geo-block' ),
'after' => '<div id="ip-geo-block-loading"></div>',
)
);
}
}

View File

@@ -0,0 +1,168 @@
<?php
class IP_Geo_Block_Admin_Tab {
// UI control parameters
static $controls = array(
'time' => 0, // Duration to retrieve
'rows' => 2, // Rows
'cols' => 1, // Columns
'warn' => FALSE,
);
public static function tab_setup( $context, $tab ) {
/*----------------------------------------*
* Control parameters in cookie
*----------------------------------------*/
$options = IP_Geo_Block::get_option();
$cookie = $context->get_cookie(); // [0]:Section, [1]:Open a new window, [2]:Duration to retrieve, [3]:Row, [4]:Column
self::$controls['time'] = empty( $cookie[ $tab ][2] ) ? self::$controls['time'] : min( 3, max( 0, (int)$cookie[ $tab ][2] ) );
self::$controls['rows'] = empty( $cookie[ $tab ][3] ) ? self::$controls['rows'] : min( 4, max( 1, (int)$cookie[ $tab ][3] ) );
self::$controls['cols'] = empty( $cookie[ $tab ][4] ) ? self::$controls['cols'] : min( 5, max( 1, (int)$cookie[ $tab ][4] ) );
self::$controls['warn'] = ! $options['validation']['reclogs'];
/*----------------------------------------*
* Blocked by target in logs section
*----------------------------------------*/
register_setting(
$option_slug = IP_Geo_Block::PLUGIN_NAME,
$option_name = IP_Geo_Block::OPTION_NAME
);
add_settings_section(
$section = IP_Geo_Block::PLUGIN_NAME . '-network',
__( 'Blocked by target in logs', 'ip-geo-block' ),
array( __CLASS__, 'render_network' ),
$option_slug
);
/*----------------------------------------*
* Chart display layout
*----------------------------------------*/
$html = '<ul id="ip-geo-block-select-layout">';
$html .= '<li>' . __( 'Rows', 'ip-geo-block' ) . ' : <select name="rows">';
$html .= '<option value="1"' . selected( 1, self::$controls['rows'], FALSE ) . '> 5</option>';
$html .= '<option value="2"' . selected( 2, self::$controls['rows'], FALSE ) . '>10</option>';
$html .= '<option value="4"' . selected( 4, self::$controls['rows'], FALSE ) . '>20</option>';
$html .= '</select></li>';
$html .= '<li>' .__( 'Columns', 'ip-geo-block' ) . ' : <select name="cols">';
$html .= '<option value="1"' . selected( 1, self::$controls['cols'], FALSE ) . '>1</option>';
$html .= '<option value="2"' . selected( 2, self::$controls['cols'], FALSE ) . '>2</option>';
$html .= '<option value="3"' . selected( 3, self::$controls['cols'], FALSE ) . '>3</option>';
$html .= '<option value="4"' . selected( 4, self::$controls['cols'], FALSE ) . '>4</option>';
$html .= '<option value="5"' . selected( 5, self::$controls['cols'], FALSE ) . '>5</option>';
$html .= '</select></li>';
$html .= '<li><a id="ip-geo-block-apply-layout" class="button button-secondary" href="';
$html .= esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => 5 ), network_admin_url( 'admin.php' ) ) );
$html .= '">' . __( 'Apply', 'ip-geo-block' ) . '</a></li>';
$html .= '</ul>';
add_settings_field(
$option_name.'_chart-size',
__( 'Chart display layout', 'ip-geo-block' ),
array( $context, 'callback_field' ),
$option_slug,
$section,
array(
'type' => 'html',
'value' => $html,
)
);
/*----------------------------------------*
* Duration to retrieve
*----------------------------------------*/
$time = array(
__( 'All', 'ip-geo-block' ),
__( 'Latest 1 hour', 'ip-geo-block' ),
__( 'Latest 24 hours', 'ip-geo-block' ),
__( 'Latest 1 week', 'ip-geo-block' ),
);
// make a list of duration
$html = "\n";
foreach ( $time as $key => $val ) {
$html .= '<li><label><input type="radio" name="' . $option_slug . '-duration" value="' . $key . '"'
. ($key == self::$controls['time'] ? ' checked="checked"' : '') . ' />' . $val . '</label></li>' . "\n";
}
add_settings_field(
$option_name.'_select_duration',
__( 'Duration to retrieve', 'ip-geo-block' ),
array( $context, 'callback_field' ),
$option_slug,
$section,
array(
'type' => 'html',
'value' => '<ul id="' . $option_slug . '-select-duration">' . $html . '</ul>',
)
);
}
/**
* Render log data
*
* @param array $args associative array of `id`, `title`, `callback`.
*/
public static function render_network( $args ) {
require_once IP_GEO_BLOCK_PATH . 'admin/includes/class-admin-ajax.php';
if ( self::$controls['warn'] ) {
$context = IP_Geo_Block_Admin::get_instance();
$url = esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => '0', 'sec' => 5 ), $context->dashboard_url() ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-5' );
echo '<p style="padding:0 1em">', sprintf( __( '[ %sRecord &#8220;Validation logs&#8221;%s ] is disabled.', 'ip-geo-block' ), '<a href="' . $url . '"><strong>', '</strong></a>' ), '</p>', "\n";
echo '<p style="padding:0 1em">', __( 'Please set the proper condition to record and analyze the validation logs.', 'ip-geo-block' ), '</p>', "\n";
}
$row = self::$controls['rows'] * 5;
$col = self::$controls['cols'];
$page = empty( $_REQUEST['p']) ? 0 : (int)$_REQUEST['p'];
$start = $page * ( $row * $col );
$count = min( $total = IP_Geo_Block_Admin_Ajax::get_network_count(), $row * $col );
// [0]:site, [1]:comment, [2]:xmlrpc, [3]:login, [4]:admin, [5]:public, [6]:link
$json = IP_Geo_Block_Admin_Ajax::restore_network( self::$controls['time'], $start, $count, FALSE );
// Max value on hAxis
$max = 0;
$num = count( $json );
for ( $i = 0; $i < $num; ++$i ) {
$max = max( $max, array_sum( array_slice( $json[ $i ], 1, 5 ) ) );
}
// Split the array into chunks
$arr = array_chunk( $json, $row );
$num = (int)floor( count( $arr ) / $col );
// Embed array into data attribute as json
echo '<div class="ip-geo-block-row ip-geo-block-range" data-ip-geo-block-range="[0,', $max, ']">', "\n";
for ( $i = 0; $i < $col; ++$i ) {
if ( isset( $arr[ $i ] ) ) {
echo '<div class="ip-geo-block-network ip-geo-block-column" ',
'id="', $args['id'], '-', $i, '" ',
'data-', $args['id'], '-', $i, '=\'', json_encode( $arr[ $i ] ), '\'>',
'</div>', "\n";
} else {
echo '<div class="ip-geo-block-column"></div>';
}
}
echo '</div>', "\n";
// pagination
$url = esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => 5 ), network_admin_url( 'admin.php' ) ) );
echo '<div class="dataTables_wrapper"><div class="dataTables_paginate">', "\n",
'<a class="paginate_button first', ($page === 0 ? ' disabled' : ''), '" href="', $url, '&p=', (0 ), '">&laquo;</a>',
'<a class="paginate_button previous', ($page === 0 ? ' disabled' : ''), '" href="', $url, '&p=', (0 < $page ? $page-1 : 0), '">&lsaquo;</a><span>';
$num = (int)ceil( $total / ( $row * $col ) );
for ( $i = 0; $i < $num; ++$i ) {
echo '<a class="paginate_button', ($i === $page ? ' current' : ''), '" href="', $url, '&p=', $i, '">', $i+1, '</a>';
}
$num -= 1;
echo '</span>',
'<a class="paginate_button next', ($page === $num ? ' disabled' : ''), '" href="', $url, '&p=', ($num > $page ? $page+1 : $page), '">&rsaquo;</a>',
'<a class="paginate_button last', ($page === $num ? ' disabled' : ''), '" href="', $url, '&p=', ($num ), '">&raquo;</a>',
'</div></div>', "\n"; // paginate wrapper
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,420 @@
<?php
class IP_Geo_Block_Admin_Tab {
public static function tab_setup( $context, $tab ) {
$options = IP_Geo_Block::get_option();
$plugin_slug = IP_Geo_Block::PLUGIN_NAME;
register_setting(
$option_slug = IP_Geo_Block::PLUGIN_NAME,
$option_name = IP_Geo_Block::OPTION_NAME
);
/*----------------------------------------*
* Statistics of validation
*----------------------------------------*/
add_settings_section(
$section = $plugin_slug . '-statistics',
__( 'Statistics of validation', 'ip-geo-block' ),
( $options['save_statistics'] ?
NULL :
array( __CLASS__, 'warn_statistics' )
),
$option_slug
);
if ( $options['save_statistics'] ) :
$statistics = IP_Geo_Block_Logs::restore_stat();
// Number of blocked access
add_settings_field(
$option_name.'_blocked',
__( 'Blocked', 'ip-geo-block' ),
array( $context, 'callback_field' ),
$option_slug,
$section,
array(
'type' => 'html',
'option' => $option_name,
'field' => 'blocked',
'value' => (int)$statistics['blocked'],
)
);
// Blocked by countries
$count = array();
arsort( $statistics['countries'] );
foreach ( $statistics['countries'] as $key => $val ) {
$count[] = array( esc_html( $key ), (int)$val );
}
$html = '<div id="' . $plugin_slug . '-chart-countries" data-' . $plugin_slug . '-chart-countries=\'' . json_encode( $count ) . '\'></div>';
add_settings_field(
$option_name.'_countries',
__( 'Blocked by countries', 'ip-geo-block' ),
array( $context, 'callback_field' ),
$option_slug,
$section,
array(
'type' => 'html',
'option' => $option_name,
'field' => 'countries',
'value' => $html,
)
);
// Blocked hooks by date
$zero = array(
'comment' => 0,
'xmlrpc' => 0,
'login' => 0,
'admin' => 0,
'public' => 0,
);
$prev = 0;
$count = array();
// make array( `time`, `comment`, `xlmrpc`, `login`, `admin`, `public` )
foreach ( $statistics['daystats'] as $key => $val ) {
while ( $prev && $key - $prev > DAY_IN_SECONDS ) {
$count[] = array( $prev += DAY_IN_SECONDS, 0, 0, 0, 0, 0 );
}
$count[] = array_merge(
array( $prev = $key ),
array_values( array_merge( $zero, $val ) )
);
}
// embed array into data attribute as json
$html = '<div id="' . $plugin_slug . '-chart-daily" data-' . $plugin_slug . '-chart-daily=\'' . json_encode( $count ) . '\'></div>';
add_settings_field(
$option_name.'_daily',
__( 'Blocked per day', 'ip-geo-block' ),
array( $context, 'callback_field' ),
$option_slug,
$section,
array(
'type' => 'html',
'option' => $option_name,
'field' => 'daily',
'value' => $html,
)
);
// Blocked by type of IP address
add_settings_field(
$option_name.'_type',
__( 'Blocked by type of IP address', 'ip-geo-block' ),
array( $context, 'callback_field' ),
$option_slug,
$section,
array(
'type' => 'html',
'option' => $option_name,
'field' => 'type',
'value' => '<table class="'.$option_slug.'-statistics-table">' .
'<thead><tr><th>IPv4</th><th>IPv6</th></tr></thead><tbody><tr>' .
'<td>' . esc_html( $statistics['IPv4'] ) . '</td>' .
'<td>' . esc_html( $statistics['IPv6'] ) . '</td>' .
'</tr></tbody></table>',
)
);
$html = '<table class="'.$option_slug.'-statistics-table"><thead><tr>';
$html .= '<th>' . __( 'Name of API', 'ip-geo-block' ) . '</th>';
$html .= '<th>' . __( 'Call', 'ip-geo-block' ) . '</th>';
$html .= '<th>' . __( 'Response [msec]', 'ip-geo-block' ) . '</th>';
$html .= '</tr></thead><tbody>';
foreach ( $statistics['providers'] as $key => $val ) {
$html .= '<tr><td>' . esc_html( $key ) . '</td>';
$html .= '<td>' . sprintf( '%5d', (int)$val['count'] ) . '</td><td>';
$html .= sprintf( '%4.1f', (float)(1000.0 * $val['time'] / $val['count']) );
$html .= '</td></tr>';
}
$html .= "</tbody></table>";
// Average response time of each API
add_settings_field(
$option_name.'_service',
__( 'Average response time of each API', 'ip-geo-block' ),
array( $context, 'callback_field' ),
$option_slug,
$section,
array(
'type' => 'html',
'option' => $option_name,
'field' => 'service',
'value' => $html,
)
);
// Clear statistics
add_settings_field(
$option_name.'_clear_statistics',
__( 'Clear statistics', 'ip-geo-block' ),
array( $context, 'callback_field' ),
$option_slug,
$section,
array(
'type' => 'button',
'option' => $option_name,
'field' => 'clear_statistics',
'value' => __( 'Clear all', 'ip-geo-block' ),
'after' => '<div id="'.$plugin_slug.'-statistics"></div>',
)
);
endif;
/*----------------------------------------*
* Statistics in Validation logs
*----------------------------------------*/
add_settings_section(
$section = $plugin_slug . '-stat-logs',
__( 'Statistics in validation logs', 'ip-geo-block' ),
( $options['validation']['reclogs'] ?
array( __CLASS__, 'statistics_logs' ) :
array( __CLASS__, 'warn_validation' )
),
$option_slug
);
if ( $options['validation']['reclogs'] ) :
add_settings_field(
$option_name.'_clear_logs',
__( 'Clear logs', 'ip-geo-block' ),
array( $context, 'callback_field' ),
$option_slug,
$section,
array(
'type' => 'button',
'option' => $option_name,
'field' => 'clear_logs',
'value' => __( 'Clear all', 'ip-geo-block' ),
)
);
endif;
/*----------------------------------------*
* Statistics in IP address cache
*----------------------------------------*/
add_settings_section(
$section = $plugin_slug . '-cache',
__( 'Statistics in IP address cache', 'ip-geo-block' ),
( $options['cache_hold'] ?
array( __CLASS__, 'statistics_cache' ) :
array( __CLASS__, 'warn_ipadr_cache' )
),
$option_slug
);
if ( $options['cache_hold'] ) :
add_settings_field(
$option_name.'_search_filter',
__( 'Search in cache', 'ip-geo-block' ),
array( $context, 'callback_field' ),
$option_slug,
$section,
array(
'type' => 'text',
'option' => $option_name,
'field' => 'search_filter',
'value' => '',
'after' => '<a class="button button-secondary" id="ip-geo-block-reset-filter" title="'
. __( 'Reset', 'ip-geo-block' ) . '" href="#!">'. __( 'Reset', 'ip-geo-block' ) . '</a>',
)
);
add_settings_field(
$option_name.'_bulk_action',
__( 'Bulk action', 'ip-geo-block' ),
array( $context, 'callback_field' ),
$option_slug,
$section,
array(
'type' => 'select',
'option' => $option_name,
'field' => 'bulk_action',
'value' => 0,
'list' => array(
0 => NULL,
'bulk-action-remove' => __( 'Remove entries by IP address', 'ip-geo-block' ),
'bulk-action-ip-white' => __( 'Add IP address to &#8220;Whitelist&#8221;', 'ip-geo-block' ),
'bulk-action-ip-black' => __( 'Add IP address to &#8220;Blacklist&#8221;', 'ip-geo-block' ), ) + ( $options['Maxmind']['use_asn'] <= 0 ? array() : array(
'bulk-action-as-white' => __( 'Add AS number to &#8220;Whitelist&#8221;', 'ip-geo-block' ),
'bulk-action-as-black' => __( 'Add AS number to &#8220;Blacklist&#8221;', 'ip-geo-block' ),
) ),
'after' => '<a class="button button-secondary" id="ip-geo-block-bulk-action" title="' . __( 'Apply', 'ip-geo-block' ) . '" href="#!">' . __( 'Apply', 'ip-geo-block' ) . '</a>' . '<div id="'.$plugin_slug.'-loading"></div>',
)
);
add_settings_field(
$option_name.'_clear_all',
__( 'Clear cache', 'ip-geo-block' ),
array( $context, 'callback_field' ),
$option_slug,
$section,
array(
'type' => 'button',
'option' => $option_name,
'field' => 'clear_all',
'value' => __( 'Clear all', 'ip-geo-block' ),
'after' => '<div id="'.$plugin_slug.'-cache"></div>',
)
);
// Export cache
add_settings_field(
$option_name.'_export_cache',
__( 'Export cache', 'ip-geo-block' ),
array( $context, 'callback_field' ),
$option_slug,
$section,
array(
'type' => 'none',
'before' => '<a class="button button-secondary" id="ip-geo-block-export-cache" title="' . __( 'Export to the local file', 'ip-geo-block' ) . '" href="#!">'. __( 'Export csv', 'ip-geo-block' ) . '</a>',
'after' => '<div id="'.$plugin_slug.'-export"></div>',
)
);
endif;
}
/**
* Render top list in logs
*
*/
public static function statistics_logs() {
// Count by key
$count = array();
$keys = array(
'code' => __( 'Country (Top 10)', 'ip-geo-block' ),
'asn' => __( 'AS number (Top 10)', 'ip-geo-block' ),
'ip' => __( 'IP address (Top 10)', 'ip-geo-block' ),
'slug' => __( 'Slug in back-end', 'ip-geo-block' ),
);
// Count by keys ($log: `time`, `ip`, `hook`, `code`, `method`, `data`)
foreach( IP_Geo_Block_Logs::get_recent_logs( YEAR_IN_SECONDS ) as $log ) {
$log['ip'] = '[' . $log['code'] . '] ' . $log['ip'];
$key = $log['method'] . ' ' . $log['data'];
// <methodName>...</methodName>
if ( preg_match( '#<methodName>(.*?)</methodName>#', $key, $matches ) )
$log['slug'] = '/xmlrpc.php ' . $matches[1];
// /wp-content/(plugins|themes)/...
elseif ( preg_match( '#(/wp-content/(?:plugins|themes)/.*?/)#', $key, $matches ) )
$log['slug'] = $matches[1];
// /wp-admin/admin*.php?action=...
elseif ( preg_match( '#(/wp-admin/admin.*?\.php).*((?:page|action)=[-\w]+)#', $key, $matches ) )
$log['slug'] = $matches[1] . ' ' . $matches[2];
// /wp-admin/*.php
elseif ( preg_match( '#(/wp-admin/(?!admin).*?\.php)#', $key, $matches ) )
$log['slug'] = $matches[1];
// file uploading *.(zip|tar|rar|gz|php|...)
elseif ( preg_match( '#(\[name\]\s*?=>\s*?[^\s]+)#', $key, $matches ) )
$log['slug'] = $matches[1];
// other *.php file with or without query string
elseif ( preg_match( '#(/[^/]*\.php)[^/\w]#', $key, $matches ) && FALSE === strpos( $key, '/wp-admin/' ) )
$log['slug'] = $matches[1];
foreach ( array_keys( $keys ) as $key ) {
if ( ! empty( $log[ $key ] ) )
$count[ $key ][] = $log[ $key ];
}
}
$options = IP_Geo_Block::get_option();
// Statistics by keys
foreach ( $keys as $slug => $log ) {
if ( 'slug' !== $slug )
echo '<ol class="ip-geo-block-top-list"><h4>', esc_html( $log ), '</h4>';
else
echo '<ol class="ip-geo-block-top-list"><h4>', esc_html( $log ), ' <a class="ip-geo-block-icon ip-geo-block-icon-cycle" id="ip-geo-block-sort-slug" title="', __( 'Toggle sorting order', 'ip-geo-block' ) ,'"><span></span></a></h4>';
if ( isset( $count[ $slug ] ) ) {
$logs = array_count_values( $count[ $slug ] );
arsort( $logs );
if ( 'slug' !== $slug )
$logs = array_slice( $logs, 0, 10 ); // Make list of top 10
foreach ( $logs as $key => $log ) {
$link = explode( ' ', $key );
$link = esc_html( end( $link ) );
$key = esc_html( $key );
if ( 'ip' === $slug && $options['anonymize'] )
$link = $key = IP_Geo_Block_Util::anonymize_ip( $link );
echo '<li><code>';
echo str_replace(
$link,
'<a href="' .
esc_url( add_query_arg(
array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => 4, 's' => $link ),
admin_url( 'options-general.php' )
) ) .
'" target=_blank>' . $link . '</a>',
$key
);
echo '</code> (', (int)$log, ')</li>', "\n";
}
}
echo '</ol>', "\n";
}
}
/**
* Render IP address cache
*
*/
public static function statistics_cache() {
echo '<table id="', IP_Geo_Block::PLUGIN_NAME, '-statistics-cache" class="', IP_Geo_Block::PLUGIN_NAME, '-dataTable display" cellspacing="0" width="100%">', "\n", '<thead></thead><tbody></tbody></table>', "\n";
}
/**
* Function that fills the section with the desired content.
*
*/
private static function dashboard_url() {
$options = IP_Geo_Block::get_option();
$context = IP_Geo_Block_Admin::get_instance();
return $context->dashboard_url( $options['network_wide'] );
}
public static function warn_statistics() {
$url = esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => '0', 'sec' => 3 ), self::dashboard_url() ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-3' );
echo '<p>', sprintf( __( '[ %sRecord &#8220;Statistics of validation&#8221;%s ] is disabled.', 'ip-geo-block' ), '<a href="' . $url . '">', '</a>' ), '</p>', "\n";
echo '<p>', __( 'Please set the proper condition to record and analyze the validation statistics.', 'ip-geo-block' ), '</p>', "\n";
}
public static function warn_validation() {
$url = esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => '0', 'sec' => 3 ), self::dashboard_url() ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-3' );
echo '<p>', sprintf( __( '[ %sRecord &#8220;Validation logs&#8221;%s ] is disabled.', 'ip-geo-block' ), '<a href="' . $url . '">', '</a>' ), '</p>', "\n";
echo '<p>', __( 'Please set the proper condition to record and analyze the validation logs.', 'ip-geo-block' ), '</p>', "\n";
}
public static function warn_ipadr_cache() {
$url = esc_url( add_query_arg( array( 'page' => IP_Geo_Block::PLUGIN_NAME, 'tab' => '0', 'sec' => 3 ), self::dashboard_url() ) . '#' . IP_Geo_Block::PLUGIN_NAME . '-section-3' );
echo '<p style="padding:0 1em">', sprintf( __( '[ %sRecord &#8220;IP address cache&#8221;%s ] is disabled.', 'ip-geo-block' ), '<a href="' . $url . '">', '</a>' ), '</p>', "\n";
echo '<p style="padding:0 1em">', __( 'Please set the proper condition to record IP address in cache.', 'ip-geo-block' ), '</p>', "\n";
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,520 @@
/*jslint white: true */
/*!
* Project: WP-ZEP - Zero-day exploit Prevention for wp-admin
* Copyright (c) 2013-2019 tokkonopapa (tokkonopapa@yahoo.com)
* This software is released under the MIT License.
*/
(function ($, window, document) {
// https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#Description
var auth = IP_GEO_BLOCK_AUTH, wpzep = {
init: false,
regexp: new RegExp(auth.key + '(?:=|%3D)\\w+')
},
// regular expression to find target for is_admin()
regexp = new RegExp(
'^(?:' + (auth.home || '') + auth.admin
+ '|' + (auth.home || '') + auth.plugins
+ '|' + (auth.home || '') + auth.themes
+ '|' + (auth.admin ) // when site url is different from home url
+ ')(?:.*\\.php|.*\\/)?$'
),
// `theme-install.php` eats the query and set it to `request[browse]` as a parameter
theme_featured = function (data) {
var i = data.length, q = 'request%5Bbrowse%5D=' + auth.key;
while (i-- > 0) {
if (data[i].indexOf(q) !== -1) {
data[i] = 'request%5Bbrowse%5D=featured'; // correct the parameter
break;
}
}
return data;
},
// `upload.php` eats the query and set it to `query[ip-geo-block-auth-nonce]` as a parameter
media_library = function (data) {
var i = data.length, q = 'query%5B' + auth.key + '%5D=';
while (i-- > 0) {
if (data[i].indexOf(q) !== -1) {
delete data[i];
break;
}
}
return data;
},
// list of excluded links
ajax_links = {
'upload.php': media_library,
'theme-install.php': theme_featured,
'network/theme-install.php': theme_featured
};
// Check path that should be excluded
function check_ajax(path) {
path = path.replace(auth.home + auth.admin, '');
return ajax_links.hasOwnProperty(path) ? ajax_links[path] : null;
}
// Escape string for use in HTML.
function escapeHTML(html) {
var elem = document.createElement('div');
elem.appendChild(document.createTextNode(html));
html = elem.innerHTML.replace(/["']/g, function (match) {
return {
'"': '&quot;',
"'": '&#39;' //"
}[match];
});
elem = '';
return html;
}
// Parse a URL and return its components
function parse_uri(uri) {
// avoid malformed URI error when uri includes '%'
uri = /*decodeURIComponent*/(uri ? uri.toString() : '');
var m = uri.match(
// https://tools.ietf.org/html/rfc3986#appendix-B
/^(?:([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/
);
// scheme :// authority path ? query # fragment
return {
scheme: m[1] || '',
relative: m[2] || '',
authority: m[3] || '',
path: m[4] || '',
query: m[5] || '',
fragment: m[6] || ''
};
}
// Compose a URL from components
function compose_uri(uri) {
return (uri.scheme ? uri.scheme + ':' : '') +
(uri.relative + uri.path) +
(uri.query ? '?' + uri.query : '') +
(uri.fragment ? '#' + uri.fragment : '');
}
/**
* Convert relative url to absolute url using browser feature
*
* @param string target url
* @param string base of absolute url (default window.locatoin.href)
* @return component of url
*/
var absolute_uri = (function () {
var doc = null;
try {
new URL('/', 'http://example.com/'); // test if URL object is abailable
} catch (e) {
try {
doc = (new DOMParser()).parseFromString('<html><head></head><body></body></html>', 'text/html'); // IE11
} catch (f) {
doc = document.implementation.createHTMLDocument(''); // IE10
}
}
return function (url, base) {
var d = document, baseElm, aElm, result;
url = typeof url !== 'undefined' ? url : window.location.href;
if (null === doc) {
if (typeof base === 'undefined') {
base = window.location.href; // based on current url
}
try {
result = new URL(url, base); // base must be valid
} catch (e) {
result = new URL(url, window.location.href);
}
} else {
// use anchor element to resolve url
if (typeof base !== 'undefined') {
// assign base element to anchor to be independent of the current document
d = doc;
while (d.head.firstChild) {
d.head.removeChild(d.head.firstChild);
}
baseElm = d.createElement('base');
baseElm.setAttribute('href', base);
d.head.appendChild(baseElm);
}
aElm = d.createElement('a');
aElm.setAttribute('href', url);
aElm.setAttribute('href', aElm.href);
//d.appendChild(aElm);
result = {
protocol: aElm.protocol,
host: aElm.host,
hostname: aElm.hostname,
port: aElm.port,
pathname: aElm.pathname,
search: aElm.search,
hash: aElm.hash,
href: aElm.href,
username: '',
password: '',
origin : aElm.origin || null
};
if ('http:' === result.protocol && '80' === result.port) {
// remove port number `80` in case of `http` and defalut port
result.port = '';
result.host = result.host.replace(/:80$/, '');
} else if ('https:' === result.protocol && '443' === result.port) {
// remove port number `443` in case of `https` and defalut port
result.port = '';
result.host = result.host.replace(/:443$/, '');
}
if ('http:' === result.protocol || 'https:' === result.protocol) {
if (result.pathname && result.pathname.charAt(0) !== '/') {
// in case no `/` at the top
result.pathname = '/' + result.pathname;
}
if (!result.origin) {
result.origin = result.protocol + '//' + result.hostname + (result.port ? ':' + result.port : '');
}
}
}
if (result.username || result.password) {
// throw an error if basic basic authentication is targeted
throw new URIError(result.username + ':' + result.password);
}
return result;
};
}());
/*
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent
function encodeURIComponentRFC3986(str) {
return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {
return '%' + c.charCodeAt(0).toString(16);
});
}
*/
// Append the nonce as query strings to the uri
function add_query_nonce(uri, nonce) {
if (typeof uri !== 'object') { // `string` or `undefined`
uri = parse_uri(uri || window.location.href);
}
var data = uri.query ? uri.query.split('&') : [],
i = data.length,
q = auth.key + '=';
// remove an old nonce
while (i-- > 0) {
if (data[i].indexOf(q) === 0) { // or `wpzep.regexp.test(data[i])`
data.splice(i, 1);
break;
}
}
data.push(auth.key + '=' + encodeURIComponent(nonce)); //RFC3986
uri.query = data.join('&');
return compose_uri(uri);
}
// Check uri component if it is not empty or only fragment (`#...`)
function check_uri(uri) {
return (!uri.scheme || /^https?$/.test(uri.scheme)) && (uri.path || uri.query);
}
// Check uri where the nonce is needed
// Note: in case of url in the admin area of different site, it returns 0
function is_admin(url) {
// parse uri and get real path
try {
url = url || window.location.pathname || ''; // in case of empty `action` on the form tag
} catch (e) {
url = '';
}
var uri = parse_uri(url.toLowerCase());
// possibly scheme is `javascript` and path is `void(0);`
if (check_uri(uri)) {
// get absolute path with flattening `./`, `../`, `//`
uri = absolute_uri(url);
// external domain (`http://example` or `www.example`)
// https://tools.ietf.org/html/rfc6454#section-4
if (uri.origin !== window.location.origin) {
return -1; // external
}
// check if uri includes the target path of zep
url = regexp.exec(uri.pathname);
if (url) {
if ((0 <= url[0].indexOf(auth.admin + 'admin-')) ||
(0 <= url[0].indexOf(auth.admin )) ||
(0 <= url[0].indexOf(auth.plugins )) ||
(0 <= url[0].indexOf(auth.themes ))) {
return 1; // internal for admin
}
}
}
return 0; // internal not admin
}
// Check if current page is admin area and the target of wp-zep
function is_backend() {
return (is_admin(window.location.pathname) === 1 || wpzep.regexp(window.location.search));
}
// Check if url belongs to multisite
function is_multisite(url) {
var i, j, n = auth.sites.length;
for (i = 0; i < n; ++i) {
j = url.indexOf(auth.sites[i] + '/');
if (0 <= j && j <= 6) { // from `//` to `https://`
return true;
}
}
return false;
}
// check if the uri does not need a nonce
function is_neutral(uri) {
// return !uri.query; // without queries
// return !uri.query || !$('body').hasClass('wp-core-ui'); // without queries or outside dashboard
return /\/$/.test(uri.path); // `/wp-admin/`
}
// check if the link has nofollow
function has_nofollow($elem) {
return -1 !== ($elem.attr('rel') || '').indexOf('nofollow');
}
/*
$.ajaxSetup({
beforeSend: function (xhr, settings) {
// settings: {
// url: '/wp-admin/admin-ajax.php'
// method: 'POST' or 'GET'
// contentType: 'application/x-www-form-urlencoded; charset=UTF-8'
// data: 'action=...'
// }
}
});
// plupload
$(window).on('BeforeUpload', function (uploader, file) {
console.log(uploader);
});
*/
// Embed a nonce before an Ajax request is sent
// $(document).ajaxSend(function (event, jqxhr, settings) {
$.ajaxPrefilter(function (settings /*, original, jqxhr*/) {
// POST to async-upload.php causes an error in https://wordpress.org/plugins/mammoth-docx-converter/
if (is_admin(settings.url) === 1 && !settings.url.match(/async-upload\.php$/)) {
// multipart/form-data (XMLHttpRequest Level 2)
// IE10+, Firefox 4+, Safari 5+, Android 3+
if (typeof window.FormData !== 'undefined' && settings.data instanceof FormData) {
settings.data.append(auth.key, auth.nonce);
}
// application/x-www-form-urlencoded
else {
// Behavior of jQuery Ajax
// method url url+data data
// GET query query data
// POST query query data
var data, callback, uri = parse_uri(settings.url);
if (typeof settings.data === 'undefined' || uri.query) {
settings.url = add_query_nonce(uri, auth.nonce);
} else {
data = settings.data ? settings.data.split('&') : [];
callback = check_ajax(window.location.pathname);
if (callback) {
data = callback(data);
}
data.push(auth.key + '=' + encodeURIComponent(auth.nonce)); //RFC3986
settings.data = data.join('&');
}
}
}
});
/*
* jQuery.bind-first library v0.2.3 (jquery >= 1.7)
* Copyright (c) 2013 Vladimir Zhuravlev
*
* Released under MIT License
* @license https://github.com/private-face/jquery.bind-first
*
* Date: Thu Feb 6 10:13:59 ICT 2014
*/
function moveHandlerToTop($el, eventName, isDelegated) {
var data = $._data($el[0]).events,
events = data[eventName],
handler = isDelegated ? events.splice(events.delegateCount - 1, 1)[0] : events.pop();
events.splice(isDelegated ? 0 : (events.delegateCount || 0), 0, handler);
}
function moveEventHandlers($elems, eventsString, isDelegate) {
var events = eventsString.split(/\s+/);
$elems.each(function(i) {
for (i = 0; i < events.length; ++i) {
var pureEventName = $.trim(events[i]).match(/[^\.]+/i)[0];
moveHandlerToTop($(this), pureEventName, isDelegate);
}
});
}
if (typeof $.fn.onFirst === 'undefined') {
$.fn.onFirst = function(types, selector) {
var type, $el = $(this), isDelegated = (typeof selector === 'string');
$.fn.on.apply($el, arguments);
// events map
if (typeof types === 'object') {
for (type in types) {
if (types.hasOwnProperty(type)) {
moveEventHandlers($el, type, isDelegated);
}
}
} else if (typeof types === 'string') {
moveEventHandlers($el, types, isDelegated);
}
return $el;
};
}
/*--------------------------------
* Attach event to the document
*--------------------------------*/
function attach_event() {
// https://www.sitepoint.com/jquery-body-on-document-on/
var elem = $(document); // `html` or `body` doesn't work with some browsers
elem.onFirst('click contextmenu', 'a', function (event) {
var admin = 0, // default: do nothing if href is empty
$this = $(this),
href = $this.attr('href') || '', // returns 'string' or 'undefined'
uri = parse_uri(href);
// check href has right scheme and path
if (check_uri(uri)) {
admin = is_admin(href);
}
// console.log('href:' + href, uri, 'admin:' + admin, 'is_backend:' + is_backend(), 'is_multisite:' + is_multisite(href));
// if context menu then continue and should be checked in check_nonce()
if ('click' !== event.type) {
return;
}
// if admin area (except a link with nofollow in the comment thread) then add a nonce
else if (admin === 1) {
$this.attr('href', is_neutral(uri) ? href :
add_query_nonce( href, has_nofollow($this) ? 'nofollow' : auth.nonce )
);
}
// if external then redirect with no referrer not to leak out the nonce
else if (admin === -1 && is_backend()) {
// open within the same window
if ('_self' === $this.attr('target') || is_multisite(href)) {
$this.attr('href', is_neutral(uri) ? href :
add_query_nonce( href, has_nofollow($this) ? 'nofollow' : auth.nonce )
);
}
// open a new window
else if (!this.hasAttribute('onClick')) {
// avoid `url=...;url=javascript:...`
href = href.split(';', 2).shift();
href = escapeHTML(decodeURIComponent(this.href)); // & => &amp;
admin = window.open();
admin.document.write(
'<!DOCTYPE html><html><head>' +
'<meta name="referrer" content="never" />' +
'<meta name="referrer" content="no-referrer" />' +
'<meta http-equiv="refresh" content="0; url=' + href + '" />' +
($('body').hasClass('webview') ? '<script>window.location.replace("' + href + '")</script>' : '') +
'</head></html>'
);
admin.document.close();
// stop event propagation and location transition
event.stopImmediatePropagation();
return false; // same as event.stopPropagation() and event.preventDefault()
}
}
});
elem.onFirst('submit', 'form', function (/*event*/) {
var $this = $(this), action = $this.attr('action'); // possibly 'undefined'
// if admin area then add the nonce
if (is_admin(action) === 1) {
if ('post' === ($this.attr('method') || '').toLowerCase()) {
$this.attr('action', add_query_nonce(action, auth.nonce));
} else {
// https://www.w3.org/TR/1999/REC-html401-19991224/types.html#type-name
$this.append('<input type="hidden" name="' + auth.key + '" value="' + auth.nonce + '">');
}
}
});
}
/*--------------------------------
* Something after document ready
*--------------------------------*/
function attach_ready(/*stat*/) {
if (!wpzep.init) {
wpzep.init = true;
$('img').each(function (/*index*/) {
var src = $(this).attr('src');
// if admin area
if (is_admin(src) === 1) {
$(this).attr('src', add_query_nonce(src, auth.nonce));
}
});
// Restore post revisions (wp-admin/revisions.php @since 2.6.0)
if ('undefined' !== typeof window._wpRevisionsSettings) {
var i, data = window._wpRevisionsSettings.revisionData, n = data.length;
for (i = 0; i < n; ++i) {
if (!wpzep.regexp.test(data[i].restoreUrl)) {
window._wpRevisionsSettings.revisionData[i].restoreUrl = add_query_nonce(data[i].restoreUrl, auth.nonce);
}
}
}
// Hide the title of sub-menu.
$('#toplevel_page_ip-geo-block li.wp-first-item').each(function (/*i, obj*/) {
var $this = $(this);
$this.css('display', 'IP Geo Block' === $this.children('a').text() ? 'none' : 'block');
});
}
}
$(window).on('error', function (/*event*/) { // event.originalEvent.message
attach_ready(); // fallback on error
});
$(function () {
attach_ready();
});
// Attach event to add nonce
attach_event();
}(jQuery, window, document));

View File

@@ -0,0 +1,16 @@
/*!
* Project: WP-ZEP - Zero-day exploit Prevention for wp-admin
* Copyright (c) 2013-2019 tokkonopapa (tokkonopapa@yahoo.com)
* This software is released under the MIT License.
*/
!function(e,t,n){var r=IP_GEO_BLOCK_AUTH,o={init:!1,regexp:new RegExp(r.key+"(?:=|%3D)\\w+")},a=new RegExp("^(?:"+(r.home||"")+r.admin+"|"+(r.home||"")+r.plugins+"|"+(r.home||"")+r.themes+"|"+r.admin+")(?:.*\\.php|.*\\/)?$"),i=function(e){for(var t=e.length,n="request%5Bbrowse%5D="+r.key;t-- >0;)if(-1!==e[t].indexOf(n)){e[t]="request%5Bbrowse%5D=featured";break}return e},h={"upload.php":function(e){for(var t=e.length,n="query%5B"+r.key+"%5D=";t-- >0;)if(-1!==e[t].indexOf(n)){delete e[t];break}return e},"theme-install.php":i,"network/theme-install.php":i};function s(e){var t=(e=e?e.toString():"").match(/^(?:([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/);return{scheme:t[1]||"",relative:t[2]||"",authority:t[3]||"",path:t[4]||"",query:t[5]||"",fragment:t[6]||""}}var c,p=function(){var e=null;try{new URL("/","http://example.com/")}catch(t){try{e=(new DOMParser).parseFromString("<html><head></head><body></body></html>","text/html")}catch(t){e=n.implementation.createHTMLDocument("")}}return function(r,o){var a,i,h,s=n;if(r=void 0!==r?r:t.location.href,null===e){void 0===o&&(o=t.location.href);try{h=new URL(r,o)}catch(e){h=new URL(r,t.location.href)}}else{if(void 0!==o){for(s=e;s.head.firstChild;)s.head.removeChild(s.head.firstChild);(a=s.createElement("base")).setAttribute("href",o),s.head.appendChild(a)}(i=s.createElement("a")).setAttribute("href",r),i.setAttribute("href",i.href),"http:"===(h={protocol:i.protocol,host:i.host,hostname:i.hostname,port:i.port,pathname:i.pathname,search:i.search,hash:i.hash,href:i.href,username:"",password:"",origin:i.origin||null}).protocol&&"80"===h.port?(h.port="",h.host=h.host.replace(/:80$/,"")):"https:"===h.protocol&&"443"===h.port&&(h.port="",h.host=h.host.replace(/:443$/,"")),"http:"!==h.protocol&&"https:"!==h.protocol||(h.pathname&&"/"!==h.pathname.charAt(0)&&(h.pathname="/"+h.pathname),h.origin||(h.origin=h.protocol+"//"+h.hostname+(h.port?":"+h.port:"")))}if(h.username||h.password)throw new URIError(h.username+":"+h.password);return h}}();function l(e,n){"object"!=typeof e&&(e=s(e||t.location.href));for(var o=e.query?e.query.split("&"):[],a=o.length,i=r.key+"=";a-- >0;)if(0===o[a].indexOf(i)){o.splice(a,1);break}return o.push(r.key+"="+encodeURIComponent(n)),e.query=o.join("&"),function(e){return(e.scheme?e.scheme+":":"")+(e.relative+e.path)+(e.query?"?"+e.query:"")+(e.fragment?"#"+e.fragment:"")}(e)}function f(e){return(!e.scheme||/^https?$/.test(e.scheme))&&(e.path||e.query)}function u(e){try{e=e||t.location.pathname||""}catch(t){e=""}var n=s(e.toLowerCase());if(f(n)){if((n=p(e)).origin!==t.location.origin)return-1;if((e=a.exec(n.pathname))&&(0<=e[0].indexOf(r.admin+"admin-")||0<=e[0].indexOf(r.admin)||0<=e[0].indexOf(r.plugins)||0<=e[0].indexOf(r.themes)))return 1}return 0}function m(e){return/\/$/.test(e.path)}function d(e){return-1!==(e.attr("rel")||"").indexOf("nofollow")}
/*
* jQuery.bind-first library v0.2.3 (jquery >= 1.7)
* Copyright (c) 2013 Vladimir Zhuravlev
*
* Released under MIT License
* @license https://github.com/private-face/jquery.bind-first
*
* Date: Thu Feb 6 10:13:59 ICT 2014
*/
function v(t,n,r){var o=e._data(t[0]).events[n],a=r?o.splice(o.delegateCount-1,1)[0]:o.pop();o.splice(r?0:o.delegateCount||0,0,a)}function g(t,n,r){var o=n.split(/\s+/);t.each(function(t){for(t=0;t<o.length;++t){var n=e.trim(o[t]).match(/[^\.]+/i)[0];v(e(this),n,r)}})}function y(){if(!o.init){if(o.init=!0,e("img").each(function(){var t=e(this).attr("src");1===u(t)&&e(this).attr("src",l(t,r.nonce))}),void 0!==t._wpRevisionsSettings){var n,a=t._wpRevisionsSettings.revisionData,i=a.length;for(n=0;n<i;++n)o.regexp.test(a[n].restoreUrl)||(t._wpRevisionsSettings.revisionData[n].restoreUrl=l(a[n].restoreUrl,r.nonce))}e("#toplevel_page_ip-geo-block li.wp-first-item").each(function(){var t=e(this);t.css("display","IP Geo Block"===t.children("a").text()?"none":"block")})}}e.ajaxPrefilter(function(e){if(1===u(e.url)&&!e.url.match(/async-upload\.php$/))if(void 0!==t.FormData&&e.data instanceof FormData)e.data.append(r.key,r.nonce);else{var n,o,a=s(e.url);void 0===e.data||a.query?e.url=l(a,r.nonce):(n=e.data?e.data.split("&"):[],i=(i=t.location.pathname).replace(r.home+r.admin,""),(o=h.hasOwnProperty(i)?h[i]:null)&&(n=o(n)),n.push(r.key+"="+encodeURIComponent(r.nonce)),e.data=n.join("&"))}var i}),void 0===e.fn.onFirst&&(e.fn.onFirst=function(t,n){var r,o=e(this),a="string"==typeof n;if(e.fn.on.apply(o,arguments),"object"==typeof t)for(r in t)t.hasOwnProperty(r)&&g(o,r,a);else"string"==typeof t&&g(o,t,a);return o}),e(t).on("error",function(){y()}),e(function(){y()}),(c=e(n)).onFirst("click contextmenu","a",function(a){var i,h,c=0,p=e(this),v=p.attr("href")||"",g=s(v);if(f(g)&&(c=u(v)),"click"===a.type)if(1===c)p.attr("href",m(g)?v:l(v,d(p)?"nofollow":r.nonce));else if(-1===c&&(1===u(t.location.pathname)||o.regexp(t.location.search)))if("_self"===p.attr("target")||function(e){var t,n,o=r.sites.length;for(t=0;t<o;++t)if(0<=(n=e.indexOf(r.sites[t]+"/"))&&n<=6)return!0;return!1}(v))p.attr("href",m(g)?v:l(v,d(p)?"nofollow":r.nonce));else if(!this.hasAttribute("onClick"))return v=v.split(";",2).shift(),i=decodeURIComponent(this.href),(h=n.createElement("div")).appendChild(n.createTextNode(i)),i=h.innerHTML.replace(/["']/g,function(e){return{'"':"&quot;","'":"&#39;"}[e]}),h="",v=i,(c=t.open()).document.write('<!DOCTYPE html><html><head><meta name="referrer" content="never" /><meta name="referrer" content="no-referrer" /><meta http-equiv="refresh" content="0; url='+v+'" />'+(e("body").hasClass("webview")?'<script>window.location.replace("'+v+'")<\/script>':"")+"</head></html>"),c.document.close(),a.stopImmediatePropagation(),!1}),c.onFirst("submit","form",function(){var t=e(this),n=t.attr("action");1===u(n)&&("post"===(t.attr("method")||"").toLowerCase()?t.attr("action",l(n,r.nonce)):t.append('<input type="hidden" name="'+r.key+'" value="'+r.nonce+'">'))})}(jQuery,window,document);

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,127 @@
/*!
* Project: GmapRS - google map for WordPress IP Geo Block
* Description: A really simple google map plugin based on jQuery-boilerplate.
* Version: 0.2.4
* Copyright (c) 2013-2019 tokkonopapa (tokkonopapa@yahoo.com)
* This software is released under the MIT License.
*/
// https://developers.google.com/maps/documentation/javascript/events?hl=en#auth-errors
function gm_authFailure() {
jQuery(window).trigger('ip-geo-block-gmap-error');
}
(function ($) {
$(function ($) {
if ('undefined' === typeof google) {
return;
}
var e = "GmapRS",
d = "plugin_" + e,
b = {
zoom: 2,
latitude: 0,
longitude: 0
},
i = google.maps,
h = function (j) {
this.o = $.extend({}, b);
this.q = [];
};
h.prototype = {
init: function (j) {
$.extend(this.o, j);
this.c = new i.LatLng(this.o.latitude, this.o.longitude);
this.m = new i.Map(this.e.get(0), {
zoom: this.o.zoom,
center: this.c,
mapTypeId: i.MapTypeId.ROADMAP
});
},
destroy: function () {
this.deleteMarkers();
this.e.data(d, null);
},
setCenter: function () {
if (arguments.length >= 2) {
var j = new i.LatLng((this.o.latitude = arguments[0]), (this.o.longitude = arguments[1]));
delete this.c;
this.c = j;
}
this.m.setCenter(this.c);
return this.e;
},
setZoom: function (j) {
this.m.setZoom(j || this.o.zoom);
return this.e;
},
getZoom: function () {
return this.m.getZoom();
},
showMarker: function (l, k) {
var j = this.q[l];
if (j && j.w) {
(false === k) ? j.w.close() : j.w.open(this.m, j.m);
}
},
addMarker: function (l) {
var m, j, k;
m = new i.LatLng(l.latitude || this.o.latitude, l.longitude || this.o.longitude);
j = new i.Marker({
position: m,
map: this.m,
title: l.title || ""
});
if (l.content) {
k = new i.InfoWindow({
content: l.content
});
i.event.addListener(j, "click", function () {
k.open(j.getMap(), j);
});
}
this.q.push({
p: m,
w: k,
m: j
});
this.m.setCenter(m);
this.m.setZoom(l.zoom);
if (l.show) {
this.showMarker(this.q.length - 1);
}
return this.e;
},
deleteMarkers: function () {
var j, k;
for (j in this.q) {
if (this.q.hasOwnProperty(j)) {
k = this.q[j];
k.m.setMap(null);
}
}
this.q.length = 0;
return this.e;
}
};
$.fn[e] = function (k) {
var l, j;
if (!(this.data(d) instanceof h)) {
this.data(d, new h(this));
}
j = this.data(d);
j.e = this;
if (typeof k === "undefined" || typeof k === "object") {
if (typeof j.init === "function") {
j.init(k);
}
} else {
if (typeof k === "string" && typeof j[k] === "function") {
l = Array.prototype.slice.call(arguments, 1);
return j[k].apply(j, l);
} else {
$.error("Method " + k + " does not exist." + e);
}
}
};
});
}(jQuery));

View File

@@ -0,0 +1,8 @@
/*!
* Project: GmapRS - google map for WordPress IP Geo Block
* Description: A really simple google map plugin based on jQuery-boilerplate.
* Version: 0.2.4
* Copyright (c) 2013-2019 tokkonopapa (tokkonopapa@yahoo.com)
* This software is released under the MIT License.
*/
function gm_authFailure(){jQuery(window).trigger("ip-geo-block-gmap-error")}jQuery(function(t){if("undefined"!=typeof google){var e="GmapRS",i="plugin_"+e,o={zoom:2,latitude:0,longitude:0},n=google.maps,s=function(e){this.o=t.extend({},o),this.q=[]};s.prototype={init:function(e){t.extend(this.o,e),this.c=new n.LatLng(this.o.latitude,this.o.longitude),this.m=new n.Map(this.e.get(0),{zoom:this.o.zoom,center:this.c,mapTypeId:n.MapTypeId.ROADMAP})},destroy:function(){this.deleteMarkers(),this.e.data(i,null)},setCenter:function(){if(arguments.length>=2){var t=new n.LatLng(this.o.latitude=arguments[0],this.o.longitude=arguments[1]);delete this.c,this.c=t}return this.m.setCenter(this.c),this.e},setZoom:function(t){return this.m.setZoom(t||this.o.zoom),this.e},getZoom:function(){return this.m.getZoom()},showMarker:function(t,e){var i=this.q[t];i&&i.w&&(!1===e?i.w.close():i.w.open(this.m,i.m))},addMarker:function(t){var e,i,o;return e=new n.LatLng(t.latitude||this.o.latitude,t.longitude||this.o.longitude),i=new n.Marker({position:e,map:this.m,title:t.title||""}),t.content&&(o=new n.InfoWindow({content:t.content}),n.event.addListener(i,"click",function(){o.open(i.getMap(),i)})),this.q.push({p:e,w:o,m:i}),this.m.setCenter(e),this.m.setZoom(t.zoom),t.show&&this.showMarker(this.q.length-1),this.e},deleteMarkers:function(){var t;for(t in this.q)this.q.hasOwnProperty(t)&&this.q[t].m.setMap(null);return this.q.length=0,this.e}},t.fn[e]=function(o){var n,r;if(this.data(i)instanceof s||this.data(i,new s(this)),(r=this.data(i)).e=this,void 0===o||"object"==typeof o)"function"==typeof r.init&&r.init(o);else{if("string"==typeof o&&"function"==typeof r[o])return n=Array.prototype.slice.call(arguments,1),r[o].apply(r,n);t.error("Method "+o+" does not exist."+e)}}}});

View File

@@ -0,0 +1,80 @@
/*jslint white: true */
/*!
* Project: whois.js - get whois infomation from RIPE Network Coordination Center
* Description: A jQuery plugin to get whois infomation from RIPE NCC database.
* Version: 0.2
* Copyright (c) 2019 tokkonopapa (tokkonopapa@yahoo.com)
* This software is released under the MIT License.
*
* RIPE NCC
* @link https://stat.ripe.net/docs/data_api#Whois
*/
(function ($) {
$.extend({
whois: function (query, callback) {
var results = [],
url = 'https://stat.ripe.net/data/whois/data.json?resource=';
function escapeHTML(str) {
return str ? str.toString().replace(/[&<>"']/g, function (match) { //'"
return {
'&': '&amp;',
'<': '&lt;',
'>': '&gt;',
'"': '&quot;',
"'": '&#39;'
}[match];
}) : '';
}
return $.ajax({
url: url + query,
method: 'GET',
dataType: 'json'
})
.done(function (data, textStatus, jqXHR) {
// https://stackoverflow.com/questions/722668/traverse-all-the-nodes-of-a-json-object-tree-with-javascript#answer-722676
function process(key, value) {
if (value && typeof value === 'object') {
if (value.key) {
value.key = escapeHTML(value.key);
value.value = escapeHTML(value.value);
if (value.details_link) {
value.value = '<a href="' + escapeHTML(value.details_link) + '">' + value.value + '</a>';
}
results.push({
name : value.key,
value: value.value
});
}
}
}
function traverse(obj, func) {
for (var i in obj) {
func.apply(this, [i, obj[i]]);
if (obj[i] !== null && typeof(obj[i]) === 'object') {
traverse(obj[i], func); //going one step down in the object tree!!
}
}
}
traverse(data.data, process);
})
.fail(function (jqXHR, textStatus, errorThrown) {
results.push({
name : escapeHTML(textStatus),
value: escapeHTML(errorThrown)
});
})
.always(function () {
if (callback) {
callback(results);
}
});
}
});
}(jQuery));

View File

@@ -0,0 +1,8 @@
/*!
* Project: whois.js - get whois infomation from RIPE Network Coordination Center
* Description: A jQuery plugin to get whois infomation from RIPE NCC database.
* Version: 0.2
* Copyright (c) 2019 tokkonopapa (tokkonopapa@yahoo.com)
* This software is released under the MIT License.
*/
!function(e){e.extend({whois:function(t,n){var a=[];function u(e){return e?e.toString().replace(/[&<>"']/g,function(e){return{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}[e]}):""}return e.ajax({url:"https://stat.ripe.net/data/whois/data.json?resource="+t,method:"GET",dataType:"json"}).done(function(e,t,n){!function e(t,n){for(var a in t)n.apply(this,[a,t[a]]),null!==t[a]&&"object"==typeof t[a]&&e(t[a],n)}(e.data,function(e,t){t&&"object"==typeof t&&t.key&&(t.key=u(t.key),t.value=u(t.value),t.details_link&&(t.value='<a href="'+u(t.details_link)+'">'+t.value+"</a>"),a.push({name:t.key,value:t.value}))})}).fail(function(e,t,n){a.push({name:u(t),value:u(n)})}).always(function(){n&&n(a)})}})}(jQuery);