2021-08-28 16:55:52 +02:00
< ? php
/* =======================================================================
* Improved File Manager
* ---------------------
* License : This project is provided under the terms of the MIT LICENSE
* http :// github . com / misterunknown / ifm / blob / master / LICENSE
* =======================================================================
*
* main
*/
2022-12-17 22:20:11 +01:00
error_reporting ( E_ALL );
ini_set ( 'display_errors' , 0 );
class IFMException extends Exception {
public $forUser = true ;
public function __construct ( $message , $forUser = true , $code = 0 , Exception $previous = null ) {
$this -> forUser = $forUser ;
parent :: __construct ( $message , $code , $previous );
}
}
2021-08-28 16:55:52 +02:00
class IFM {
2022-12-17 22:20:11 +01:00
private $defaultconfig = [
2021-08-28 16:55:52 +02:00
// general config
" auth " => 0 ,
" auth_source " => 'inline;admin:$2y$10$0Bnm5L4wKFHRxJgNq.oZv.v7yXhkJZQvinJYR2p6X1zPvzyDRUVRC' ,
2022-12-17 22:20:11 +01:00
" auth_ignore_basic " => 0 ,
2021-08-28 16:55:52 +02:00
" root_dir " => " " ,
" root_public_url " => " " ,
" tmp_dir " => " " ,
" timezone " => " " ,
2022-12-17 22:20:11 +01:00
" forbiddenChars " => [],
2021-08-28 16:55:52 +02:00
" dateLocale " => " en-US " ,
" language " => " en " ,
" selfoverwrite " => 0 ,
2022-12-17 22:20:11 +01:00
" session_name " => false ,
2021-08-28 16:55:52 +02:00
// api controls
" ajaxrequest " => 1 ,
" chmod " => 1 ,
" copymove " => 1 ,
" createdir " => 1 ,
" createfile " => 1 ,
" edit " => 1 ,
" delete " => 1 ,
" download " => 1 ,
" extract " => 1 ,
" upload " => 1 ,
" remoteupload " => 1 ,
" rename " => 1 ,
" zipnload " => 1 ,
" createarchive " => 1 ,
" search " => 1 ,
2022-12-17 22:20:11 +01:00
" paging " => 0 ,
" pageLength " => 50 ,
2021-08-28 16:55:52 +02:00
// gui controls
" showlastmodified " => 0 ,
" showfilesize " => 1 ,
" showowner " => 1 ,
" showgroup " => 1 ,
" showpermissions " => 2 ,
" showhtdocs " => 0 ,
" showhiddenfiles " => 1 ,
" showpath " => 0 ,
" contextmenu " => 1 ,
" disable_mime_detection " => 0 ,
" showrefresh " => 1 ,
" forceproxy " => 0 ,
" confirmoverwrite " => 1
2022-12-17 22:20:11 +01:00
];
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
private $config = [];
private $templates = [];
private $i18n = [];
2021-08-28 16:55:52 +02:00
public $mode = " standalone " ;
2022-12-17 22:20:11 +01:00
public function __construct ( $config = []) {
// store initial working directory
$this -> initialWD = getcwd ();
2021-08-28 16:55:52 +02:00
// load the default config
$this -> config = $this -> defaultconfig ;
// load config from environment variables
2022-12-17 22:20:11 +01:00
foreach ( array_keys ( $this -> config ) as $key ) {
if (( $value = getenv ( 'IFM_' . strtoupper ( $key ))) !== false ) {
if ( is_numeric ( $value ))
$value = intval ( $value );
$this -> config [ $key ] = $value ;
}
}
2021-08-28 16:55:52 +02:00
// load config from passed array
2022-12-17 22:20:11 +01:00
$this -> config = array_merge ( $this -> config , $config );
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
$i18n = [];
$i18n [ " en " ] = <<< 'f00bar'
{
" ajax_request " : " AJAX request " ,
" archive_create_error " : " Could not create archive. " ,
" archive_create_success " : " Archive created. " ,
" archive_invalid_format " : " Invalid archive format given. " ,
" archivename " : " Name of the archive " ,
" cancel " : " Cancel " ,
" close " : " Close " ,
" copy " : " Copy " ,
" copy_error " : " The following files could not be copied: " ,
" copy_success " : " Files copied. " ,
" copylink " : " Copy link " ,
" create " : " Create " ,
" create_archive " : " Create archive " ,
" create_wo_close " : " Create w/o close " ,
" data " : " Data " ,
" delete " : " Delete " ,
" directoryname " : " Directory Name " ,
" download " : " Download " ,
" edit " : " Edit " ,
" editor_options " : " Editor Options " ,
" error " : " Error: " ,
" extract " : " Extract " ,
" extract_error " : " Could not extract archive. " ,
" extract_filename " : " Extract file: " ,
" extract_success " : " Archive extracted. " ,
" file_copy_to " : " to " ,
" file_delete_confirm " : " Do you really want to delete the following file: " ,
" file_delete_error " : " Could not delete files. " ,
" file_delete_success " : " Files deleted. " ,
" file_display_error " : " This file cannot be displayed or edited. " ,
" file_load_error " : " Could not load content. " ,
" file_new " : " New file " ,
" file_no_permission " : " No permission to edit/create file. " ,
" file_not_found " : " Could either not find or open file. " ,
" file_open_error " : " Could not open the file. " ,
" file_rename " : " Rename File " ,
" file_rename_error " : " File could not be renamed " ,
" file_rename_success " : " File renamed. " ,
" file_save_confirm " : " Do you want to save the following file: " ,
" file_save_error " : " Could not save file. " ,
" file_save_success " : " File saved. " ,
" file_upload_error " : " Could not upload file. " ,
" file_upload_success " : " File uploaded. " ,
" filename " : " Filename " ,
" filename_new " : " New Filename " ,
" filename_slashes " : " Remove all slashes from the filename. " ,
" filter " : " Filter " ,
" folder_create_error " : " Could not create directory: " ,
" folder_create_success " : " Directory created. " ,
" folder_new " : " New Folder " ,
" folder_not_found " : " Could not find the directory. " ,
" folder_tree_load_error " : " Could not fetch folder tree. " ,
" footer " : " IFM - improved file manager | ifm.php hidden | " ,
" general_error " : " General error: No or broken response. " ,
" github " : " Visit the project on GitHub " ,
" group " : " Group " ,
" invalid_action " : " Invalid action given. " ,
" invalid_archive_format " : " Invalid archive format given. Possible formats are ZIP, TAR, tar.gz or tar.bz2. " ,
" invalid_data " : " Invalid data from server. " ,
" invalid_dir " : " Invalid directory given. " ,
" invalid_filename " : " Invalid filename given. " ,
" invalid_params " : " Invalid parameter given. " ,
" invalid_url " : " Invalid URL given. " ,
" json_encode_error " : " Could not format the response as JSON: " ,
" last_modified " : " Last Modified " ,
" load_config_error " : " Could not load configuration. " ,
" load_template_error " : " Could not load templates. " ,
" load_text_error " : " Could not load texts. " ,
" login " : " Login " ,
" login_failed " : " Login failed. " ,
" logout " : " Log Off " ,
" method " : " Method " ,
" move " : " Move " ,
" move_error " : " The following files could not be moved: " ,
" move_success " : " Files moved. " ,
" nopermissions " : " You lack the permissions to do that. " ,
" options " : " Options " ,
" owner " : " Owner " ,
" password " : " Password " ,
" path_content " : " Current directory " ,
" pattern_error_slashes " : " Pattern cannot contain slashes. " ,
" permission_change_error " : " Could not change permissions: " ,
" permission_change_success " : " Permissions changed. " ,
" permission_parse_error " : " Could not parse permissions. " ,
" permissions " : " Permissions " ,
" refresh " : " Refresh " ,
" remaining_tasks " : " There are remaining tasks. Do you really want to reload? " ,
" rename " : " Rename " ,
" rename_filename " : " Rename file: " ,
" request " : " Request " ,
" response " : " Response " ,
" save " : " Save " ,
" save_wo_close " : " Save without Closing " ,
" search " : " Search " ,
" search_pattern " : " Pattern " ,
" select_destination " : " Select Destination " ,
" size " : " Size " ,
" soft_tabs " : " Soft Tabs " ,
" tab_size " : " Tab Size " ,
" tasks " : " Tasks " ,
" toggle_nav " : " Toggle navigation " ,
" upload " : " Upload " ,
" upload_drop " : " Drop files to upload " ,
" upload_file " : " Upload File " ,
" upload_overwrite_confirm " : " Upload anyway? " ,
" upload_overwrite_hint " : " The following files will be overwritten: " ,
" upload_remote " : " Remote Upload " ,
" upload_remote_url " : " Remote Upload URL " ,
" username " : " Username " ,
" word_wrap " : " Word Wrap "
}
2021-08-28 16:55:52 +02:00
f00bar ;
2022-12-17 22:20:11 +01:00
$i18n [ " en " ] = json_decode ( $i18n [ " en " ], true );
$i18n [ " en " ] = <<< 'f00bar'
{
" ajax_request " : " AJAX request " ,
" archive_create_error " : " Could not create archive. " ,
" archive_create_success " : " Archive created. " ,
" archive_invalid_format " : " Invalid archive format given. " ,
" archivename " : " Name of the archive " ,
" cancel " : " Cancel " ,
" close " : " Close " ,
" copy " : " Copy " ,
" copy_error " : " The following files could not be copied: " ,
" copy_success " : " Files copied. " ,
" copylink " : " Copy link " ,
" create " : " Create " ,
" create_archive " : " Create archive " ,
" create_wo_close " : " Create w/o close " ,
" data " : " Data " ,
" delete " : " Delete " ,
" directoryname " : " Directory Name " ,
" download " : " Download " ,
" edit " : " Edit " ,
" editor_options " : " Editor Options " ,
" error " : " Error: " ,
" extract " : " Extract " ,
" extract_error " : " Could not extract archive. " ,
" extract_filename " : " Extract file: " ,
" extract_success " : " Archive extracted. " ,
" file_copy_to " : " to " ,
" file_delete_confirm " : " Do you really want to delete the following file: " ,
" file_delete_error " : " Could not delete files. " ,
" file_delete_success " : " Files deleted. " ,
" file_display_error " : " This file cannot be displayed or edited. " ,
" file_load_error " : " Could not load content. " ,
" file_new " : " New file " ,
" file_no_permission " : " No permission to edit/create file. " ,
" file_not_found " : " Could either not find or open file. " ,
" file_open_error " : " Could not open the file. " ,
" file_rename " : " Rename File " ,
" file_rename_error " : " File could not be renamed " ,
" file_rename_success " : " File renamed. " ,
" file_save_confirm " : " Do you want to save the following file: " ,
" file_save_error " : " Could not save file. " ,
" file_save_success " : " File saved. " ,
" file_upload_error " : " Could not upload file. " ,
" file_upload_success " : " File uploaded. " ,
" filename " : " Filename " ,
" filename_new " : " New Filename " ,
" filename_slashes " : " Remove all slashes from the filename. " ,
" filter " : " Filter " ,
" folder_create_error " : " Could not create directory: " ,
" folder_create_success " : " Directory created. " ,
" folder_new " : " New Folder " ,
" folder_not_found " : " Could not find the directory. " ,
" folder_tree_load_error " : " Could not fetch folder tree. " ,
" footer " : " IFM - improved file manager | ifm.php hidden | " ,
" general_error " : " General error: No or broken response. " ,
" github " : " Visit the project on GitHub " ,
" group " : " Group " ,
" invalid_action " : " Invalid action given. " ,
" invalid_archive_format " : " Invalid archive format given. Possible formats are ZIP, TAR, tar.gz or tar.bz2. " ,
" invalid_data " : " Invalid data from server. " ,
" invalid_dir " : " Invalid directory given. " ,
" invalid_filename " : " Invalid filename given. " ,
" invalid_params " : " Invalid parameter given. " ,
" invalid_url " : " Invalid URL given. " ,
" json_encode_error " : " Could not format the response as JSON: " ,
" last_modified " : " Last Modified " ,
" load_config_error " : " Could not load configuration. " ,
" load_template_error " : " Could not load templates. " ,
" load_text_error " : " Could not load texts. " ,
" login " : " Login " ,
" login_failed " : " Login failed. " ,
" logout " : " Log Off " ,
" method " : " Method " ,
" move " : " Move " ,
" move_error " : " The following files could not be moved: " ,
" move_success " : " Files moved. " ,
" nopermissions " : " You lack the permissions to do that. " ,
" options " : " Options " ,
" owner " : " Owner " ,
" password " : " Password " ,
" path_content " : " Current directory " ,
" pattern_error_slashes " : " Pattern cannot contain slashes. " ,
" permission_change_error " : " Could not change permissions: " ,
" permission_change_success " : " Permissions changed. " ,
" permission_parse_error " : " Could not parse permissions. " ,
" permissions " : " Permissions " ,
" refresh " : " Refresh " ,
" remaining_tasks " : " There are remaining tasks. Do you really want to reload? " ,
" rename " : " Rename " ,
" rename_filename " : " Rename file: " ,
" request " : " Request " ,
" response " : " Response " ,
" save " : " Save " ,
" save_wo_close " : " Save without Closing " ,
" search " : " Search " ,
" search_pattern " : " Pattern " ,
" select_destination " : " Select Destination " ,
" size " : " Size " ,
" soft_tabs " : " Soft Tabs " ,
" tab_size " : " Tab Size " ,
" tasks " : " Tasks " ,
" toggle_nav " : " Toggle navigation " ,
" upload " : " Upload " ,
" upload_drop " : " Drop files to upload " ,
" upload_file " : " Upload File " ,
" upload_overwrite_confirm " : " Upload anyway? " ,
" upload_overwrite_hint " : " The following files will be overwritten: " ,
" upload_remote " : " Remote Upload " ,
" upload_remote_url " : " Remote Upload URL " ,
" username " : " Username " ,
" word_wrap " : " Word Wrap "
}
2021-08-28 16:55:52 +02:00
f00bar ;
2022-12-17 22:20:11 +01:00
$i18n [ " en " ] = json_decode ( $i18n [ " en " ], true );
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
$this -> i18n = $i18n ;
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
if ( $this -> config [ 'timezone' ])
date_default_timezone_set ( $this -> config [ 'timezone' ]);
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
if ( $this -> config [ 'session_name' ])
session_name ( $this -> config [ 'session_name' ]);
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
// set cookie_path for SESSION to REQUEST_URI without QUERY_STRING
$cookie_path = substr ( $_SERVER [ 'REQUEST_URI' ], 0 , strpos ( $_SERVER [ 'REQUEST_URI' ], '?' ) ? : strlen ( $_SERVER [ 'REQUEST_URI' ]));
session_set_cookie_params ( 0 , $cookie_path );
}
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
/**
* This function contains the client - side application
*/
public function getApplication () {
$this -> getHTMLHeader ();
print '<div id="ifm"></div>' ;
$this -> getJS ();
print '<script>var ifm = new IFM(); ifm.init("ifm");</script>' ;
$this -> getHTMLFooter ();
}
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
public function getInlineApplication () {
$this -> getCSS ();
print '<div id="ifm"></div>' ;
$this -> getJS ();
}
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
public function getCSS () {
echo <<< 'f00bar'
< style type = " text/css " >
/*!
* Bootstrap v4 . 6.1 ( https :// getbootstrap . com / )
* Copyright 2011 - 2021 The Bootstrap Authors
* Copyright 2011 - 2021 Twitter , Inc .
* Licensed under MIT ( https :// github . com / twbs / bootstrap / blob / main / LICENSE )
*/: root { -- blue : #007bff;--indigo:#6610f2;--purple:#6f42c1;--pink:#e83e8c;--red:#dc3545;--orange:#fd7e14;--yellow:#ffc107;--green:#28a745;--teal:#20c997;--cyan:#17a2b8;--white:#fff;--gray:#6c757d;--gray-dark:#343a40;--primary:#007bff;--secondary:#6c757d;--success:#28a745;--info:#17a2b8;--warning:#ffc107;--danger:#dc3545;--light:#f8f9fa;--dark:#343a40;--breakpoint-xs:0;--breakpoint-sm:576px;--breakpoint-md:768px;--breakpoint-lg:992px;--breakpoint-xl:1200px;--font-family-sans-serif:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([class]){color:inherit;text-decoration:none}a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit;text-align:-webkit-match-parent}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decor
/*# sourceMappingURL=bootstrap.min.css.map */
. treeview . list - group - item { cursor : pointer } . treeview span . indent { margin - left : 10 px ; margin - right : 10 px } . treeview span . icon , . treeview span . image { width : 12 px ; margin - right : 5 px } . treeview . node - disabled { color : silver ; cursor : not - allowed } . treeview . node - hidden { display : none } . treeview span . image { display : inline - block ; height : 1.19 em ; vertical - align : middle ; background - size : contain ; background - repeat : no - repeat ; line - height : 1 em }
/*
* This combined file was created by the DataTables downloader builder :
* https :// datatables . net / download
*
* To rebuild or modify this file with the latest versions of the included
* software please visit :
* https :// datatables . net / download / #bs4/dt-1.11.3/r-2.2.9
*
* Included libraries :
* DataTables 1.11 . 3 , Responsive 2.2 . 9
*/
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
td . dt - control { background : url ( " https://www.datatables.net/examples/resources/details_open.png " ) no - repeat center center ; cursor : pointer } tr . dt - hasChild td . dt - control { background : url ( " https://www.datatables.net/examples/resources/details_close.png " ) no - repeat center center } 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 { clear : both ; margin - top : 6 px ! important ; margin - bottom : 6 px ! important ; max - width : none ! important ; border - collapse : separate ! important ; border - spacing : 0 } table . dataTable td , table . dataTable th { - webkit - box - sizing : content - box ; box - sizing : content - box } table . dataTable td . dataTables_empty , table . dataTable th . dataTables_empty { text - align : center } table . dataTable . nowrap th , table . dataTable . nowrap td { white - space : nowrap } div . dataTables_wrapper div . dataTables_length label { font - weight : normal ; text - align : left ; white - space : nowrap } div . dataTables_wrapper div . dataTables_length select { width : auto ; display : inline - block } div . dataTables_wrapper div . dataTables_filter { text - align : right } div . dataTables_wrapper div . dataTables_filter label { font - weight : normal ; white - space : nowrap ; text - align : left } div . dataTables_wrapper div . dataTables_filter input { margin - left :. 5 em ; display : inline - block ; width : auto } div . dataTables_wrapper div . dataTables_info { padding - top :. 85 em } div . dataTables_wrapper div . dataTables_paginate { margin : 0 ; white - space : nowrap ; text - align : right } div . dataTables_wrapper div . dataTables_paginate ul . pagination { margin : 2 px 0 ; white - space : nowrap ; justify - content : flex - end } div . dataTables_wrapper div . dataTables_processing { position : absolute ; top : 50 % ; left : 50 % ; width : 200 px ; margin - left :- 100 px ; margin - top :- 26 px ; text - align : center ; padding : 1 em 0 } table . dataTable > thead > tr > th : active , table . dataTable > thead > tr > td : active { outline : none } table . dataTable > thead > tr > th : not ( . sorting_disabled ), table . dataTable > thead > tr > td : not ( . sorting_disabled ){ padding - right : 30 px } 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 ; position : relative } table . dataTable > thead . sorting : before , table . dataTable > thead . sorting : after , table . dataTable > thead . sorting_asc : before , table . dataTable > thead . sorting_asc : after , table . dataTable > thead . sorting_desc : before , table . dataTable > thead . sorting_desc : after , table . dataTable > thead . sorting_asc_disabled : before , table . dataTable > thead
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
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 . dtr - control , table . dataTable . dtr - inline . collapsed > tbody > tr > th . dtr - control { position : relative ; padding - left : 30 px ; cursor : pointer } table . dataTable . dtr - inline . collapsed > tbody > tr > td . dtr - control : before , table . dataTable . dtr - inline . collapsed > tbody > tr > th . dtr - control : before { top : 50 % ; left : 5 px ; height : 1 em ; width : 1 em ; margin - top :- 9 px ; display : block ; position : absolute ; color : white ; border :. 15 em solid white ; border - radius : 1 em ; box - shadow : 0 0 . 2 em #444;box-sizing:content-box;text-align:center;text-indent:0 !important;font-family:"Courier New",Courier,monospace;line-height:1em;content:"+";background-color:#0275d8}table.dataTable.dtr-inline.collapsed>tbody>tr.parent>td.dtr-control:before,table.dataTable.dtr-inline.collapsed>tbody>tr.parent>th.dtr-control:before{content:"-";background-color:#d33333}table.dataTable.dtr-inline.collapsed.compact>tbody>tr>td.dtr-control,table.dataTable.dtr-inline.collapsed.compact>tbody>tr>th.dtr-control{padding-left:27px}table.dataTable.dtr-inline.collapsed.compact>tbody>tr>td.dtr-control:before,table.dataTable.dtr-inline.collapsed.compact>tbody>tr>th.dtr-control:before{left:4px;height:14px;width:14px;border-radius:14px;line-height:14px;text-indent:3px}table.dataTable.dtr-column>tbody>tr>td.dtr-control,table.dataTable.dtr-column>tbody>tr>th.dtr-control,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.dtr-control:before,table.dataTable.dtr-column>tbody>tr>th.dtr-control:before,table.dataTable.dtr-column>tbody>tr>td.control:before,table.dataTable.dtr-column>tbody>tr>th.control:before{top:50%;left:50%;height:.8em;width:.8em;margin-top:-0.5em;margin-left:-0.5em;display:block;position:absolute;color:white;border:.15em solid white;border-radius:1em;box-shadow:0 0 .2em #444;box-sizing:content-box;text-align:center;text-indent:0 !important;font-family:"Courier New",Courier,monospace;line-height:1em;content:"+";background-color:#0275d8}table.dataTable.dtr-column>tbody>tr.parent td.dtr-control:before,table.dataTable.dtr-column>tbody>tr.parent th.dtr-control:before,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:.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:.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:.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;r
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
@ font - face {
font - family : 'fontello' ;
src : url ( ' data : application / octet - stream ; base64 , d09GRgABAAAAAEEYAA8AAAAAeBQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABWAAAADsAAABUIIslek9TLzIAAAGUAAAAQwAAAFY + L1L9Y21hcAAAAdgAAAJPAAAF5oRYnGZjdnQgAAAEKAAAABMAAAAgBtX + 5 mZwZ20AAAQ8AAAFkAAAC3CKkZBZZ2FzcAAACcwAAAAIAAAACAAAABBnbHlmAAAJ1AAAMd0AAFv8cFA8X2hlYWQAADu0AAAAMwAAADYPx60EaGhlYQAAO + gAAAAgAAAAJAd1A9ZobXR4AAA8CAAAAHMAAAEc9cH / zWxvY2EAADx8AAAAkAAAAJDjAPw + bWF4cAAAPQwAAAAgAAAAIAG + DbBuYW1lAAA9LAAAAXcAAALNzJ0dH3Bvc3QAAD6kAAAB9QAAA29YoVQHcHJlcAAAQJwAAAB6AAAAhuVBK7x4nGNgZGBg4GIwYLBjYHJx8wlh4MtJLMljkGJgYYAAkDwymzEnMz2RgQPGA8qxgGkOIGaDiAIAJjsFSAB4nGNgZC5jnMDAysDAVMW0h4GBoQdCMz5gMGRkAooysDIzYAUBaa4pDA4vGD7 + YA76n8UQxRzEsBQozAiSAwD5CwyzAHic3dRJTlRRFMbxf1FY2KCigmKPfd8hKthhWwxgASYgQUiMMcY4cuQCHJgasglWgVoqe8AKzM4Ecs + EMAK / 987 dAFPr5keol7rJe + 9 + 3 wG2AVW5Ku3Q1qCi / 6 h81dVKeb3KzvJ6e2VC32 / Sp991Wa / 124 ANpUZqplZaTWtpwzu8x / t8xMd80md81ud8wVu + 7 Oubm2CUOwbLHYtppdxR827tqPuoj / tUuWNeO5Zix5Y + Fd3ZVLmmy / WWd + V6zwetj3ziM1 / K9U2rUe5o07O16w3U6GA7O / Scu + hkN3vYSxf72M8BuunhIIfo5TBHOMoxjnOCk3oLpzjNGc5yjvNc4CKXuMwVva9rXOeG7uYW / dxmgDvc5R6DDHGfBzzkEY8Z5glPecZzXvCSum6mtsXn / R8 / ncWf6qv8rV5kJhRJtEynhmVFci0r0mtZkWrLdLpYpnPGMp04lunssaxIu2XKA5YVd2eZMoJlSguWKTdYpgRhmbKEZUoVlilfWKakYZkyh2VKH5Yph1imRGKZsql2BaUUGwjKKzYYlFxsKCjDpEZQmknNoFyTFoMSTvoblHVSKyj1pJWg / JNWg5pAWgvqBGkjqB14LagneEdQY / DuoO7gPUEtwvuC + oTXQzGhfCSoY / hoUNvwsaDe4eNBDcQngrqIvw5qJT4Z1E98Kqip + JugzuLTQe3FZ4J6jM8GNRqfC + o2Ph / Ucvx7UN / xH0HNx38GzQC8GTQN8F9BcwH / HTQh8D9BswJfCJoaeCtofuBLQZMEXw6aKfh6oP4PrfUdagB4nGNgQAMSEMgc9D8ahAESEgO / AHicrVZpd9NGFB15SZyELCULLWphxMRpsEYmbMGACUGyYyBdnK2VoIsUO + m + 8 Ynf4F / zZNpz6Dd + Wu8bLySQtOdwmpOjd + fN1czbZRJaktgL65GUmy / F1NYmjew8CemGTctRfCg7eyFlisnfBVEQrZbatx2HREQiULWusEQQ + x5ZmmR86FFGy7akV03KLT3pLlvjQb1V334aOsqxO6GkZjN0aD2yJVUYVaJIpj1S0qZlqPorSSu8v8LMV81QwohOImm8GcbQSN4bZ7TKaDW24yiKbLLcKFIkmuFBFHmU1RLn5IoJDMoHzZDyyqcR5cP8iKzYo5xWsEu20 / y + L3mndzk / sV9vUbbkQB / Ijuzg7HQlX4RbW2HctJPtKFQRdtd3QmzZ7FT / Zo / ymkYDtysyvdCMYKl8hRArP6HM / iFZLZxP + ZJHo1qykRNB62VO7Es + gdbjiClxzRhZ0N3RCRHU / ZIzDPaYPh788d4plgsTAngcy3pHJZwIEylhczRJ2jByYCVliyqp9a6YOOV1WsRbwn7t2tGXzmjjUHdiPFsPHVs5UcnxaFKnmUyd2knNoykNopR0JnjMrwMoP6JJXm1jNYmVR9M4ZsaERCICLdxLU0EsO7GkKQTNoxm9uRumuXYtWqTJA / Xco / f05la4udNT2g70s0Z / VqdiOtgL0 + lp5C / xadrlIkXp + ukZfkziQdYCMpEtNsOUgwdv / Q7Sy9eWHIXXBtju7fMrqH3WRPCkAfsb0B5P1SkJTIWYVYhWQGKta1mWydWsFqnI1HdDmla + rNMEinIcF8e + jHH9XzMzlpgSvt + J07MjLj1z7UsI0xx8m3U9mtepxXIBcWZ5TqdZlu / rNMfyA53mWZ7X6QhLW6ejLD / UaYHlRzodY3lBC5p038GQizDkAg6QMISlA0NYXoIhLBUMYbkIQ1gWYQjLJRjC8mMYwnIZhrC8rGXV1FNJ49qZWAZsQmBijh65zEXlaiq5VEK7aFRqQ54SbpVUFM + qf2WgXjzyhjmwFkiXyJpfMc6Vj0bl + NYVLW8aO1fAsepvH472OfFS1ouFPwX / 1 dZUJb1izcOTq / Abhp5sJ6o2qXh0TZfPVT26 / l9UVFgL9BtIhVgoyrJscGcihI86nYZqoJVDzGzMPLTrdcuan8P9NzFCFlD9 + DcUGgvcg05ZSVnt4KzV19uy3DuDcjgTLEkxN / P6VvgiI7PSfpFZyp6PfB5wBYxKZdhqA60VvNknMQ + Z3iTPBHFbUTZI2tjOBIkNHPOAefOdBCZh6qoN5E7hhg34BWFuwXknXKJ6oyyH7kXs8yik / Fun4kT2qGiMwLPZG2Gv70LKb3EMJDT5pX4MVBWhqRg1FdA0Um6oBl / G2bptQsYO9CMqdsOyrOLDxxb3lZJtGYR8pIjVo6Of1l6iTqrcfmYUl ++ dvgXBIDUxf3vfdHGQyrtayTJHbQNTtxqVU9eaQ + NVh + rmUfW94 + wTOWuabronHnpf06rbwcVcLLD2bQ7SUiYX1PVhhQ2iy8WlUOplNEnvuAcYFhjQ71CKjf + r + th8nitVhdFxJN9O1LfR52AM / A / Yf0f1A9D3Y + hyDS7P95oTn2704WyZrqIX66foNzBrrblZugbc0HQD4iFHrY64yg18pwZxeqS5HOkh4GPdFeIBwCaAxeAT3bWM5lMAo / mMOT7A58xh0GQOgy3mMNhmzhrADnMY7DKHwR5zGHzBnHWAL5nDIGQOg4g5DJ4wJwB4yhwGXzGHwdfMYfANc + 4 DfMscBjFzGCTMYbCv6dYwzC1e0F2gtkFVoANTT1jcw + JQU2XI / o4Xhv29Qcz + wSCm / qjp9pD6Ey8M9WeDmPqLQUz9VdOdIfU3Xhjq7wYx9Q + DmPpMvxjLZQa / jHyXCgeUXWw + 5 ++ J9w / bxUC5AAEAAf //AA94nMV8CXQcx3Vg/eru6nPunh4AAwyOwcyAIAiAc5IECAwBEAAJUALBQwAJQrBEUjRBiLJiSY512CtubMmHqMiK1qcs+pC8G3utw7a8jq9NZDu2XmzJSeT7vcT2JlTy1okTOXEUcbT/d8/gICmRcry75KCnu6bqd9X/v/5Vv4pxxl5+TDoomaydjbFD5QPDKS70HlBEDCSuAUjyGNM1oeliScVSLhS+JAOXBJcWGUhMArbENCYUTSzQg7SXSRKbYUxik6Pb06lUMZUu2O2G0rQe7Kgfkm3pjCra0lshX+yDrCMCkIBStljC//QcidpiPbSli4OQTrYJFf/TY6kwALmsEysVs4400f7z9+1+b/+42eg4/hf9Dtd3dRwu7bwzI+pka1Ez/HbQK52+YQILY4p1UrWg/W/et/v91KgOFAke+MLA5nHTbe40mrvaO2HngLHJZ8HnqyW7vGchV2vSiNjLx6VZaZpFWANLsrnP2sBlGJt4tHVqppxgnEkKlxaYLMMMA7DGBSgKoYL52I54OV6rgMWMKWxuuaK8Y7bsj8fjyXgykrYLRVWpX49YiYZsobYivkL5YqkVB69Gc+keSEdChMRCa0jKBZ1E7Fw4loAWB15wioGd31XUT4uvn8WSyh5+RzBfd+4O91fpNvxygunvhsSn1Zce5f0t0edfepgx+eWXXv629H
url ( ' data : application / octet - stream ; base64 , AAEAAAAPAIAAAwBwR1NVQiCLJXoAAAD8AAAAVE9TLzI + L1L9AAABUAAAAFZjbWFwhFicZgAAAagAAAXmY3Z0IAbV / uYAAGv8AAAAIGZwZ22KkZBZAABsHAAAC3BnYXNwAAAAEAAAa / QAAAAIZ2x5ZnBQPF8AAAeQAABb / GhlYWQPx60EAABjjAAAADZoaGVhB3UD1gAAY8QAAAAkaG10ePXB / 80 AAGPoAAABHGxvY2HjAPw + AABlBAAAAJBtYXhwAb4NsAAAZZQAAAAgbmFtZcydHR8AAGW0AAACzXBvc3RYoVQHAABohAAAA29wcmVw5UErvAAAd4wAAACGAAEAAAAKADAAPgACREZMVAAObGF0bgAaAAQAAAAAAAAAAQAAAAQAAAAAAAAAAQAAAAFsaWdhAAgAAAABAAAAAQAEAAQAAAABAAgAAQAGAAAAAQAAAAEDdgGQAAUAAAJ6ArwAAACMAnoCvAAAAeAAMQECAAACAAUDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFBmRWQAQOgA8fgDUv9qAFoDUgClAAAAAQAAAAAAAAAAAAUAAAADAAAALAAAAAQAAAKOAAEAAAAAAYgAAwABAAAALAADAAoAAAKOAAQBXAAAADAAIAAEABDoGOgy6DToOfCO8MXw3vDu8Pbw / vEH8RXxIPFH8UzxXvFj8Zbxq / HJ8d7x4fH4 //8AAOgA6DLoNOg48I7wxfDc8O3w9vD+8QbxFPEg8UbxS/Fb8WDxlvGr8cHx3vHg8fj//wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAwAGAAYABgAGIAYgBiAGYAaABoAGgAagBsAGwAbgBwAHYAfAB8AHwAjACMAI4AAAABAAIAAwAEAAUABgAHAAgACQAKAAsADAANAA4ADwAQABEAEgATABQAFQAWABcAGAAZABoAGwAcAB0AHgAfACAAIQAiACMAJAAlACYAJwAoACkAKgArACwALQAuAC8AMAAxADIAMwA0ADUANgA3ADgAOQA6ADsAPAA9AD4APwBAAEEAQgBDAEQARQBGAAABBgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAANYAAAAAAAAAEYAAOgAAADoAAAAAAEAAOgBAADoAQAAAAIAAOgCAADoAgAAAAMAAOgDAADoAwAAAAQAAOgEAADoBAAAAAUAAOgFAADoBQAAAAYAAOgGAADoBgAAAAcAAOgHAADoBwAAAAgAAOgIAADoCAAAAAkAAOgJAADoCQAAAAoAAOgKAADoCgAAAAsAAOgLAADoCwAAAAwAAOgMAADoDAAAAA0AAOgNAADoDQAAAA4AAOgOAADoDgAAAA8AAOgPAADoDwAAABAAAOgQAADoEAAAABEAAOgRAADoEQAAABIAAOgSAADoEgAAABMAAOgTAADoEwAAABQAAOgUAADoFAAAABUAAOgVAADoFQAAABYAAOgWAADoFgAAABcAAOgXAADoFwAAABgAAOgYAADoGAAAABkAAOgyAADoMgAAABoAAOg0AADoNAAAABsAAOg4AADoOAAAABwAAOg5AADoOQAAAB0AAPCOAADwjgAAAB4AAPDFAADwxQAAAB8AAPDcAADw3AAAACAAAPDdAADw3QAAACEAAPDeAADw3gAAACIAAPDtAADw7QAAACMAAPDuAADw7gAAACQAAPD2AADw9gAAACUAAPD+AADw/gAAACYAAPEGAADxBgAAACcAAPEHAADxBwAAACgAAPEUAADxFAAAACkAAPEVAADxFQAAACoAAPEgAADxIAAAACsAAPFGAADxRgAAACwAAPFHAADxRwAAAC0AAPFLAADxSwAAAC4AAPFMAADxTAAAAC8AAPFbAADxWwAAADAAAPFcAADxXAAAADEAAPFdAADxXQAAADIAAPFeAADxXgAAADMAAPFgAADxYAAAADQAAPFhAADxYQAAADUAAPFiAADxYgAAADYAAPFjAADxYwAAADcAAPGWAADxlgAAADgAAPGrAADxqwAAADkAAPHBAADxwQAAADoAAPHCAADxwgAAADsAAPHDAADxwwAAADwAAPHEAADxxAAAAD0AAPHFAADxxQAAAD4AAPHGAADxxgAAAD8AAPHHAADxxwAAAEAAAPHIAADxyAAAAEEAAPHJAADxyQAAAEIAAPHeAADx3gAAAEMAAPHgAADx4AAAAEQAAPHhAADx4QAAAEUAAPH4AADx+AAAAEYAAAACAAD/sQNbAwsAJABHAF1AWkMlAgYJLwEFBhcBAwIIAQEDBEcACQgGCAkGbQcBBQYCBgUCbQQBAgMGAgNrAAEDAAMBAG0ACAAGBQgGYAADAQADVAADAwBYAAADAExGRSYlJTYlJjUUJAoFHSsBFBUOASMiJicHBiImPQE0NjsBMhYGDwEeATcyNjc2NzY7ATIWExUUBisBIiY2PwEmIyIGBwYHBisBIiY3NT4BMzIWFzc2MhYDSyTkmVGYPEgLHBYWDvoOFgIJTShkN0qCJwYYBAxrCAoOFBD6DhYCCU1ScEuCJwYXBQxvBwwBJOaZUZo8SAscGAEFAwGWuj45SAsWDvoOFhYcC00kKgFKPgo4DQwBuPoOFhYcC01NSj4KOA0MBgSWuj45SAsWAAADAAD/agNZA1IAEwAaACMAXLUUAQIEAUdLsCFQWEAeAAIAAwUCA2AABAQBWAABAQxIBgEFBQBYAAAADQBJG0AbAAIAAwUCA2AGAQUAAAUAXAAEBAFYAAEBDARJWUAOGxsbIxsjEyYUNTYHBRkrAR4BFREUBgchIiYnETQ2NyEyFhcHFTMmLwEmExEjIiYnNSERAzMQFh4X/RIXHgEgFgH0FjYPStIFB68GxugXHgH+UwJ+EDQY/X4XHgEgFgN8Fx4BFhAm0hEGrwf8sAI8IBXp/KYAAAT//P/OA9gC7gAKABMAKgA4AJ1ADConAgABOCsCCQcCR0uwEFBYQDQABwYJBgdlAAkEBgkEawAEBG4KAQMAAgEDAl4AAQAABQEAXgAFBgYFUgAFBQZWCAEGBQZKG0A1AAcGCQYHCW0ACQQGCQRrAAQEbgoBAwACAQMCXgABAAAFAQBeAAUGBgVSAAUFBlYIAQYFBkpZQBgLCzYzMTAvLi0sKSgeHAsTCxMYFBELBRcrARUhNTQ2NyEyHgEnMh4BFSE0NjcFFhcWBwMOAQchIicmAicmPgE/ARUhNQM1IxUhNSMVFDMhMjY1A0j9SBoMAmAGEByUBhAc/g4aDAKSIgQGBkwEIAz9OjQIBkIGCg4GEigDRNpG/vxEMAEsFhoCWDIyFhoCAhqAAhoWFhoCyCAOEiT+PhYaAjIaAYoeFiwIEChQUP7UZFBQZDIYDAAAAAQAAP/5A6EDUgAIABEAJwA/AERAQTwBBwgJAAICAAJHCQEHCAMIBwNtAAYDBAMGBG0FAQMBAQACAwBgAAQAAgQCXAAICAwIST89JCUWIhIlORgSCgUdKyU0LgEOARY+ATc0LgEOARY+ATcVFAYHISImJzU0NjMhFxYyPwEhMhYDFg8BBiIvASY3NjsBNTQ2NzMyFgcVMzICyhQeFAIYGhiNFCASAhYcGEYgFvzLFx4BIBYBA0shViFMAQMWILYKEvoKHgr6EQkKF48WDo8OFgGPGGQPFAIYGhgCFA8PFAIYGhgCFIyzFh4BIBWzFiBMICBMIAEoFxD6Cw
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */
/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */
/*
@ media screen and ( - webkit - min - device - pixel - ratio : 0 ) {
@ font - face {
font - family : 'fontello' ;
src : url ( '../font/fontello.svg?80353264#fontello' ) format ( 'svg' );
2021-08-28 16:55:52 +02:00
}
}
2022-12-17 22:20:11 +01:00
*/
[ class ^= " icon- " ] : before , [ class *= " icon- " ] : before {
font - family : " fontello " ;
font - style : normal ;
font - weight : normal ;
speak : none ;
display : inline - block ;
text - decoration : inherit ;
width : 1 em ;
margin - right : . 2 em ;
text - align : center ;
/* opacity: .8; */
/* For safety - reset parent styles, that can break glyph codes*/
font - variant : normal ;
text - transform : none ;
/* fix buttons height, for twitter bootstrap */
line - height : 1 em ;
/* Animation center compensation - margins should be symmetric */
/* remove if not needed */
margin - left : . 2 em ;
/* you can be more comfortable with increased icons size */
/* font-size: 120%; */
/* Uncomment for 3D effect */
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
}
. icon - arrows - cw : before { content : '\e800' ; } /* '' */
. icon - doc : before { content : '\e801' ; } /* '' */
. icon - archive : before { content : '\e802' ; } /* '' */
. icon - download : before { content : '\e803' ; } /* '' */
. icon - upload : before { content : '\e804' ; } /* '' */
. icon - edit : before { content : '\e805' ; } /* '' */
. icon - pencil : before { content : '\e806' ; } /* '' */
. icon - folder : before { content : '\e807' ; } /* '' */
. icon - folder - open : before { content : '\e808' ; } /* '' */
. icon - trash - empty : before { content : '\e809' ; } /* '' */
. icon - plus : before { content : '\e80a' ; } /* '' */
. icon - plus - circled : before { content : '\e80b' ; } /* '' */
. icon - minus : before { content : '\e80c' ; } /* '' */
. icon - minus - circled : before { content : '\e80d' ; } /* '' */
. icon - down - open : before { content : '\e80e' ; } /* '' */
. icon - up - open : before { content : '\e80f' ; } /* '' */
. icon - wrench : before { content : '\e810' ; } /* '' */
. icon - cog - alt : before { content : '\e811' ; } /* '' */
. icon - cog : before { content : '\e812' ; } /* '' */
. icon - block : before { content : '\e813' ; } /* '' */
. icon - attention : before { content : '\e814' ; } /* '' */
. icon - squares : before { content : '\e815' ; } /* '' */
. icon - logout : before { content : '\e816' ; } /* '' */
. icon - globe : before { content : '\e817' ; } /* '' */
. icon - search : before { content : '\e818' ; } /* '' */
. icon - spin3 : before { content : '\e832' ; } /* '' */
. icon - spin4 : before { content : '\e834' ; } /* '' */
. icon - spin5 : before { content : '\e838' ; } /* '' */
. icon - spin6 : before { content : '\e839' ; } /* '' */
. icon - link - ext : before { content : '\f08e' ; } /* '' */
. icon - docs : before { content : '\f0c5' ; } /* '' */
. icon - sort : before { content : '\f0dc' ; } /* '' */
. icon - sort - down : before { content : '\f0dd' ; } /* '' */
. icon - sort - up : before { content : '\f0de' ; } /* '' */
. icon - download - cloud : before { content : '\f0ed' ; } /* '' */
. icon - upload - cloud : before { content : '\f0ee' ; } /* '' */
. icon - doc - text : before { content : '\f0f6' ; } /* '' */
. icon - plus - squared : before { content : '\f0fe' ; } /* '' */
. icon - angle - up : before { content : '\f106' ; } /* '' */
. icon - angle - down : before { content : '\f107' ; } /* '' */
. icon - folder - empty : before { content : '\f114' ; } /* '' */
. icon - folder - open - empty : before { content : '\f115' ; } /* '' */
. icon - terminal : before { content : '\f120' ; } /* '' */
. icon - minus - squared : before { content : '\f146' ; } /* '' */
. icon - minus - squared - alt : before { content : '\f147' ; } /* '' */
. icon - pencil - squared : before { content : '\f14b' ; } /* '' */
. icon - link - ext - alt : before { content : '\f14c' ; } /* '' */
. icon - doc - inv : before { content : '\f15b' ; } /* '' */
. icon - doc - text - inv : before { content : '\f15c' ; } /* '' */
. icon - sort - name - up : before { content : '\f15d' ; } /* '' */
. icon - sort - name - down : before { content : '\f15e' ; } /* '' */
. icon - sort - alt - up : before { content : '\f160' ; } /* '' */
. icon - sort - alt - down : before { content : '\f161' ; } /* '' */
. icon - sort - number - up : before { content : '\f162' ; } /* '' */
. icon - sort - number - down : before { content : '\f163' ; } /* '' */
. icon - plus - squared - alt : before { content : '\f196' ; } /* '' */
. icon - language : before { content : '\f1ab' ; } /* '' */
. icon - file - pdf : before { content : '\f1c1' ; } /* '' */
. icon - file - word : before { content : '\f1c2' ; } /* '' */
. icon - file - excel : before { content : '\f1c3' ; } /* '' */
. icon - file - powerpoint : before { content : '\f1c4' ; } /* '' */
. icon - file - image : before { content : '\f1c5' ; } /* '' */
. icon - file - archive : before { content : '\f1c6' ; } /* '' */
. icon - file - audio : before { content : '\f1c7' ; } /* '' */
. icon - file - video : before { content : '\f1c8' ; } /* '' */
. icon - file - code : before { content : '\f1c9' ; } /* '' */
. icon - sliders : before { content : '\f1de' ; } /* '' */
. icon - share : before { content : '\f1e0' ; } /* '' */
. icon - share - squared : before { content : '\f1e1' ; } /* '' */
. icon - trash : before { content : '\f1f8' ; } /* '' */
/*
Animation example , for spinners
*/
. animate - spin {
- moz - animation : spin 2 s infinite linear ;
- o - animation : spin 2 s infinite linear ;
- webkit - animation : spin 2 s infinite linear ;
animation : spin 2 s infinite linear ;
display : inline - block ;
}
@- moz - keyframes spin {
0 % {
- moz - transform : rotate ( 0 deg );
- o - transform : rotate ( 0 deg );
- webkit - transform : rotate ( 0 deg );
transform : rotate ( 0 deg );
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
100 % {
- moz - transform : rotate ( 359 deg );
- o - transform : rotate ( 359 deg );
- webkit - transform : rotate ( 359 deg );
transform : rotate ( 359 deg );
2021-08-28 16:55:52 +02:00
}
}
2022-12-17 22:20:11 +01:00
@- webkit - keyframes spin {
0 % {
- moz - transform : rotate ( 0 deg );
- o - transform : rotate ( 0 deg );
- webkit - transform : rotate ( 0 deg );
transform : rotate ( 0 deg );
}
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
100 % {
- moz - transform : rotate ( 359 deg );
- o - transform : rotate ( 359 deg );
- webkit - transform : rotate ( 359 deg );
transform : rotate ( 359 deg );
}
}
@- o - keyframes spin {
0 % {
- moz - transform : rotate ( 0 deg );
- o - transform : rotate ( 0 deg );
- webkit - transform : rotate ( 0 deg );
transform : rotate ( 0 deg );
}
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
100 % {
- moz - transform : rotate ( 359 deg );
- o - transform : rotate ( 359 deg );
- webkit - transform : rotate ( 359 deg );
transform : rotate ( 359 deg );
}
}
@- ms - keyframes spin {
0 % {
- moz - transform : rotate ( 0 deg );
- o - transform : rotate ( 0 deg );
- webkit - transform : rotate ( 0 deg );
transform : rotate ( 0 deg );
}
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
100 % {
- moz - transform : rotate ( 359 deg );
- o - transform : rotate ( 359 deg );
- webkit - transform : rotate ( 359 deg );
transform : rotate ( 359 deg );
}
}
@ keyframes spin {
0 % {
- moz - transform : rotate ( 0 deg );
- o - transform : rotate ( 0 deg );
- webkit - transform : rotate ( 0 deg );
transform : rotate ( 0 deg );
}
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
100 % {
- moz - transform : rotate ( 359 deg );
- o - transform : rotate ( 359 deg );
- webkit - transform : rotate ( 359 deg );
transform : rotate ( 359 deg );
}
}
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
body {
padding - top : 70 px ;
overflow - y : scroll ! important ;
padding - right : 0 px ! important ;
}
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
main {
margin - bottom : 1 rem ;
}
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
a {
cursor : pointer ! important ;
}
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
a . ifmitem : focus {
outline : 0
}
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
img . imgpreview {
max - width : 100 % ;
background - repeat : repeat repeat ;
background - image : url ( " data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAAAAACoWZBhAAABI2lDQ1BJQ0MgcHJvZmlsZQAAKJGdkLFKw1AUhr9UsaXYSXEQhwyuBRHM5FIVgqAQYwWrU5qkWExiSFKKb+Cb6MN0EASfwCdQcPa/0cHBLF44/B+Hc/7/3gstOwnTcnkH0qwqXH8wuhxd2e032nTosksvCMt84HknNJ7PVyyjL33j1Tz351mJ4jKULlRZmBcVWPtiZ17lhlWs3w79Q/GD2I7SLBI/ibejNDJsdv00mYU/nuY2q3F2cW76qi1cjjnFw2bMjCkJFX1pps4RDntSl4KAe0pCaUKs3lwzFTeiUk4uB6KhSLdpyNus8zyljOUxlZdJuCOVp8nD/O/32sdZvWltLPKgCOrWkqo1mcD7I/RGsPYM3euGrM7vtzXMOPXMP9/4BdaxUFxWskm6AAAAAmJLR0QAy6Y7OAoAAAAJcEhZcwAALiMAAC4jAXilP3YAAAAiSURBVAjXY/zPwMDAcIaBgYGBiQEOCDJZzjAwMDCYkKoNAPmXAuEuYku0AAAAAElFTkSuQmCC " );
}
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
div #content { /* is for the ACE editor */
width : 100 % ;
height : 350 px ;
}
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
/* Make tables more compact (overwrites bootstrap default of 0.75rem) */
. table td , . table th {
padding : 0.25 rem ;
}
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
/* narrow navbar */
. navbar {
padding : 0.3 rem ! important ;
}
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
/*
* Icon size
*/
. icon {
font - size : 14 pt ;
}
@ media ( max - width : 768 px ) {
. icon { font - size : 12 pt ; }
#filetable tr th.buttons { min-width: 85px !important; }
}
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
/*
* Filetable related settings
*/
#filetable th {
border - top : 0 ;
}
#filetable td:nth-child(5), #filetable th:nth-child(5) {
text - align : center ;
}
#filetable td:nth-child(6), #filetable th:nth-child(6) {
text - align : center ;
}
#filetable tr td:last-child {
text - align : right ;
}
#filetable td:last-child a:hover {
text - decoration : none ;
}
. td - permissions { width : 1 px ; }
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
input [ name = newpermissions ] {
padding : 6 px 8 px ;
width : 6.5 rem ;
}
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
#filetable tr th.buttons { min-width: 95px; }
#filetable tbody tr.highlightedItem { box-shadow: 0px 0px 10px 2px #337ab7; }
#filetable tbody tr.highlightedItem td:first-child a { outline: none; }
#filetable tbody tr.selectedItem { background-color: #337ab7; color: #FFF; }
#filetable tbody tr.selectedItem * a { color: #FFF; }
#filetable tbody tr td { vertical-align: inherit; }
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
div . ifminfo { color : #adadad; font-size: 10pt; }
div . ifminfo div . panel div . panel - body { padding : 0 px ! important ; text - align : center ; }
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
/*
* Footer / Task - Queue settings
*/
footer {
position : fixed ;
padding - top : 1 em ;
border - top : 1 px ;
background - color : #EEE;
bottom : 0 ;
width : 100 % ;
overflow : hidden ;
}
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
#waitqueue {
max - height : 6 rem ;
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
#waitqueue .progress {
position : relative ;
margin - bottom : 0 ;
}
#waitqueue .progbarlabel {
position : absolute ;
top : 0 ;
left : 10 px ;
font - weight : bold ;
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
/*
* File drop overlay
*/
#filedropoverlay {
display : none ;
position : fixed ;
top : 0 ;
left : 0 ;
width : 100 % ;
height : 100 % ;
text - align : center ;
color : #FFF;
background - color : lightblue ;
filter : alpha ( opacity = 70 );
- moz - opacity : 0.7 ;
opacity : 0.7 ;
z - index : 1000 ;
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
#filedropoverlay h1 {
border - radius : 5 px ;
color : #000;
position : relative ;
top : 50 % ;
font - size : 6 em ;
pointer - events : none ;
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
/*
* Datatables related settings
*/
table . dataTable thead th {
position : relative ;
background - image : none ! important ;
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
/* remove original sort icons */
table . dataTable thead . sorting : before ,
table . dataTable thead . sorting_asc : before ,
table . dataTable thead . sorting_desc : before ,
table . dataTable thead . sorting_asc_disabled : before ,
table . dataTable thead . sorting_desc_disabled : before {
right : 0 ! important ;
content : " " ! important ;
}
/* custom sort icons */
table . dataTable thead th . sorting : after ,
table . dataTable thead th . sorting_asc : after ,
table . dataTable thead th . sorting_desc : after {
position : absolute ;
top : 6 px ;
right : 8 px ;
display : block ;
font - family : fontello ;
font - size : 0.8 em ;
opacity : 1 ;
color : #000;
}
table . dataTable thead th . sorting : after {
content : " \ F0DC " ;
color : #ddd;
}
table . dataTable thead th . sorting_asc : after {
content : " \ f0de " ;
}
table . dataTable thead th . sorting_desc : after {
content : " \ f0dd " ;
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
/*
* Modal related settings
*/
#copyMoveTree {
max - height : 80 vh ;
overflow : auto ;
}
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
@ media ( min - width : 576 px ) {
. modal - dialog {
max - width : 600 px ;
margin : 1.75 rem auto ;
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
}
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
@ media ( min - width : 992 px ) {
. modal - lg , . modal - xl {
max - width : 800 px ;
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
}
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
</ style >
f00bar ;
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
public function getJS () {
echo <<< 'f00bar'
< script >
/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */
! function ( e , t ){ " use strict " ; " object " == typeof module && " object " == typeof module . exports ? module . exports = e . document ? t ( e , ! 0 ) : function ( e ){ if ( ! e . document ) throw new Error ( " jQuery requires a window with a document " ); return t ( e )} : t ( e )}( " undefined " != typeof window ? window : this , function ( C , e ){ " use strict " ; var t = [], r = Object . getPrototypeOf , s = t . slice , g = t . flat ? function ( e ){ return t . flat . call ( e )} : function ( e ){ return t . concat . apply ([], e )}, u = t . push , i = t . indexOf , n = {}, o = n . toString , v = n . hasOwnProperty , a = v . toString , l = a . call ( Object ), y = {}, m = function ( e ){ return " function " == typeof e && " number " != typeof e . nodeType && " function " != typeof e . item }, x = function ( e ){ return null != e && e === e . window }, E = C . document , c = { type :! 0 , src :! 0 , nonce :! 0 , noModule :! 0 }; function b ( e , t , n ){ var r , i , o = ( n = n || E ) . createElement ( " script " ); if ( o . text = e , t ) for ( r in c )( i = t [ r ] || t . getAttribute && t . getAttribute ( r )) && o . setAttribute ( r , i ); n . head . appendChild ( o ) . parentNode . removeChild ( o )} function w ( e ){ return null == e ? e + " " : " object " == typeof e || " function " == typeof e ? n [ o . call ( e )] || " object " : typeof e } var f = " 3.6.0 " , S = function ( e , t ){ return new S . fn . init ( e , t )}; function p ( e ){ var t =!! e && " length " in e && e . length , n = w ( e ); return ! m ( e ) &&! x ( e ) && ( " array " === n || 0 === t || " number " == typeof t && 0 < t && t - 1 in e )} S . fn = S . prototype = { jquery : f , constructor : S , length : 0 , toArray : function (){ return s . call ( this )}, get : function ( e ){ return null == e ? s . call ( this ) : e < 0 ? this [ e + this . length ] : this [ e ]}, pushStack : function ( e ){ var t = S . merge ( this . constructor (), e ); return t . prevObject = this , t }, each : function ( e ){ return S . each ( this , e )}, map : function ( n ){ return this . pushStack ( S . map ( this , function ( e , t ){ return n . call ( e , t , e )}))}, slice : function (){ return this . pushStack ( s . apply ( this , arguments ))}, first : function (){ return this . eq ( 0 )}, last : function (){ return this . eq ( - 1 )}, even : function (){ return this . pushStack ( S . grep ( this , function ( e , t ){ return ( t + 1 ) % 2 }))}, odd : function (){ return this . pushStack ( S . grep ( this , function ( e , t ){ return t % 2 }))}, eq : function ( e ){ var t = this . length , n =+ e + ( e < 0 ? t : 0 ); return this . pushStack ( 0 <= n && n < t ? [ this [ n ]] : [])}, end : function (){ return this . prevObject || this . constructor ()}, push : u , sort : t . sort , splice : t . splice }, S . extend = S . fn . extend = function (){ var e , t , n , r , i , o , a = arguments [ 0 ] || {}, s = 1 , u = arguments . length , l =! 1 ; for ( " boolean " == typeof a && ( l = a , a = arguments [ s ] || {}, s ++ ), " object " == typeof a || m ( a ) || ( a = {}), s === u && ( a = this , s -- ); s < u ; s ++ ) if ( null != ( e = arguments [ s ])) for ( t in e ) r = e [ t ], " __proto__ " !== t && a !== r && ( l && r && ( S . isPlainObject ( r ) || ( i = Array . isArray ( r ))) ? ( n = a [ t ], o = i &&! Array . isArray ( n ) ? [] : i || S . isPlainObject ( n ) ? n : {}, i =! 1 , a [ t ] = S . extend ( l , o , r )) : void 0 !== r && ( a [ t ] = r )); return a }, S . extend ({ expando : " jQuery " + ( f + Math . random ()) . replace ( / \D / g , " " ), isReady :! 0 , error : function ( e ){ throw new Error ( e )}, noop : function (){}, isPlainObject : function ( e ){ var t , n ; return ! ( ! e || " [object Object] " !== o . call ( e )) && ( ! ( t = r ( e )) || " function " == typeof ( n = v . call ( t , " constructor " ) && t . constructor ) && a . call ( n ) === l )}, isEmptyObject : function ( e ){ var t ; for ( t in e ) return ! 1 ; return ! 0 }, globalEval : function ( e , t , n ){ b ( e ,{ nonce : t && t . nonce }, n )}, each : function ( e , t ){ var n , r = 0 ; if ( p ( e )){ for ( n = e . length ; r < n ; r ++ ) if ( ! 1 === t . call ( e [ r ], r , e [ r ])) break } else for ( r in e ) if ( ! 1 === t . call ( e [ r ], r , e [ r ])) break ; return e }, makeArray : function ( e , t ){ var n = t || []; return null != e && ( p ( Object ( e )) ? S . merge ( n , " string " == typeof e ? [ e ] : e ) : u . call ( n , e )), n }, inArray : function ( e , t , n ){ return null == t ? - 1 : i . call ( t , e , n )}, merge : function ( e , t ){ for ( var n =+ t . length , r = 0 , i = e . length ; r < n ; r ++ ) e [ i ++ ] = t [ r ]; return e . length = i , e }, grep : function ( e , t , n ){ for ( var r = [], i = 0 , o = e . length , a =! n ; i < o ; i ++ ) ! t ( e [ i ], i ) !== a && r . push ( e [ i ]); return r }, map : function ( e , t , n ){ var r , i , o = 0 , a = []; if ( p ( e )) for ( r = e . length ; o < r ; o ++ ) null != ( i = t ( e [ o ], o , n )) && a . push ( i ); else for ( o in e ) null != ( i = t ( e [ o ], o , n )) && a . push ( i ); return g ( a )}, guid : 1 , support : y }), " function " == typeof Symbol && ( S . fn [ Symbol . iterator ] = t [ Symbol . iterator ]), S . each ( " Boolean Number String Function Array Date RegExp Object Error Symbol " . split ( " " ), function ( e , t ){ n [ " [object " + t + " ] " ] = t . toLowerCase ()}); var d = function ( n ){ var e , d , b , o , i , h , f , g , w , u , l , T , C , a , E , v , s , c , y , S = " sizzle " + 1 * new Date , p = n . document , k = 0 , r = 0 , m = ue (), x = ue (), A = ue (), N = ue (), j = function ( e , t ){ return e === t && ( l =! 0 ), 0 }, D = {} . hasOwnProperty , t = [], q = t . pop , L = t . push , H = t . push , O = t . slice , P = function ( e
/*! jQuery UI - v1 . 12.1 - 2016 - 09 - 14
* http :// jqueryui . com
* Includes : widget . js , position . js , data . js , disable - selection . js , effect . js , effects / effect - blind . js , effects / effect - bounce . js , effects / effect - clip . js , effects / effect - drop . js , effects / effect - explode . js , effects / effect - fade . js , effects / effect - fold . js , effects / effect - highlight . js , effects / effect - puff . js , effects / effect - pulsate . js , effects / effect - scale . js , effects / effect - shake . js , effects / effect - size . js , effects / effect - slide . js , effects / effect - transfer . js , focusable . js , form - reset - mixin . js , jquery - 1 - 7. js , keycode . js , labels . js , scroll - parent . js , tabbable . js , unique - id . js , widgets / accordion . js , widgets / autocomplete . js , widgets / button . js , widgets / checkboxradio . js , widgets / controlgroup . js , widgets / datepicker . js , widgets / dialog . js , widgets / draggable . js , widgets / droppable . js , widgets / menu . js , widgets / mouse . js , widgets / progressbar . js , widgets / resizable . js , widgets / selectable . js , widgets / selectmenu . js , widgets / slider . js , widgets / sortable . js , widgets / spinner . js , widgets / tabs . js , widgets / tooltip . js
* Copyright jQuery Foundation and other contributors ; Licensed MIT */
( function ( t ){ " function " == typeof define && define . amd ? define ([ " jquery " ], t ) : t ( jQuery )})( function ( t ){ function e ( t ){ for ( var e = t . css ( " visibility " ); " inherit " === e ;) t = t . parent (), e = t . css ( " visibility " ); return " hidden " !== e } function i ( t ){ for ( var e , i ; t . length && t [ 0 ] !== document ;){ if ( e = t . css ( " position " ),( " absolute " === e || " relative " === e || " fixed " === e ) && ( i = parseInt ( t . css ( " zIndex " ), 10 ), ! isNaN ( i ) && 0 !== i )) return i ; t = t . parent ()} return 0 } function s (){ this . _curInst = null , this . _keyEvent =! 1 , this . _disabledInputs = [], this . _datepickerShowing =! 1 , this . _inDialog =! 1 , this . _mainDivId = " ui-datepicker-div " , this . _inlineClass = " ui-datepicker-inline " , this . _appendClass = " ui-datepicker-append " , this . _triggerClass = " ui-datepicker-trigger " , this . _dialogClass = " ui-datepicker-dialog " , this . _disableClass = " ui-datepicker-disabled " , this . _unselectableClass = " ui-datepicker-unselectable " , this . _currentClass = " ui-datepicker-current-day " , this . _dayOverClass = " ui-datepicker-days-cell-over " , this . regional = [], this . regional [ " " ] = { closeText : " Done " , prevText : " Prev " , nextText : " Next " , currentText : " Today " , monthNames : [ " January " , " February " , " March " , " April " , " May " , " June " , " July " , " August " , " September " , " October " , " November " , " December " ], monthNamesShort : [ " Jan " , " Feb " , " Mar " , " Apr " , " May " , " Jun " , " Jul " , " Aug " , " Sep " , " Oct " , " Nov " , " Dec " ], dayNames : [ " Sunday " , " Monday " , " Tuesday " , " Wednesday " , " Thursday " , " Friday " , " Saturday " ], dayNamesShort : [ " Sun " , " Mon " , " Tue " , " Wed " , " Thu " , " Fri " , " Sat " ], dayNamesMin : [ " Su " , " Mo " , " Tu " , " We " , " Th " , " Fr " , " Sa " ], weekHeader : " Wk " , dateFormat : " mm/dd/yy " , firstDay : 0 , isRTL :! 1 , showMonthAfterYear :! 1 , yearSuffix : " " }, this . _defaults = { showOn : " focus " , showAnim : " fadeIn " , showOptions : {}, defaultDate : null , appendText : " " , buttonText : " ... " , buttonImage : " " , buttonImageOnly :! 1 , hideIfNoPrevNext :! 1 , navigationAsDateFormat :! 1 , gotoCurrent :! 1 , changeMonth :! 1 , changeYear :! 1 , yearRange : " c-10:c+10 " , showOtherMonths :! 1 , selectOtherMonths :! 1 , showWeek :! 1 , calculateWeek : this . iso8601Week , shortYearCutoff : " +10 " , minDate : null , maxDate : null , duration : " fast " , beforeShowDay : null , beforeShow : null , onSelect : null , onChangeMonthYear : null , onClose : null , numberOfMonths : 1 , showCurrentAtPos : 0 , stepMonths : 1 , stepBigMonths : 12 , altField : " " , altFormat : " " , constrainInput :! 0 , showButtonPanel :! 1 , autoSize :! 1 , disabled :! 1 }, t . extend ( this . _defaults , this . regional [ " " ]), this . regional . en = t . extend ( ! 0 ,{}, this . regional [ " " ]), this . regional [ " en-US " ] = t . extend ( ! 0 ,{}, this . regional . en ), this . dpDiv = n ( t ( " <div id=' " + this . _mainDivId + " ' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div> " ))} function n ( e ){ var i = " button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a " ; return e . on ( " mouseout " , i , function (){ t ( this ) . removeClass ( " ui-state-hover " ), - 1 !== this . className . indexOf ( " ui-datepicker-prev " ) && t ( this ) . removeClass ( " ui-datepicker-prev-hover " ), - 1 !== this . className . indexOf ( " ui-datepicker-next " ) && t ( this ) . removeClass ( " ui-datepicker-next-hover " )}) . on ( " mouseover " , i , o )} function o (){ t . datepicker . _isDisabledDatepicker ( m . inline ? m . dpDiv . parent ()[ 0 ] : m . input [ 0 ]) || ( t ( this ) . parents ( " .ui-datepicker-calendar " ) . find ( " a " ) . removeClass ( " ui-state-hover " ), t ( this ) . addClass ( " ui-state-hover " ), - 1 !== this . className . indexOf ( " ui-datepicker-prev " ) && t ( this ) . addClass ( " ui-datepicker-prev-hover " ), - 1 !== this . className . indexOf ( " ui-datepicker-next " ) && t ( this ) . addClass ( " ui-datepicker-next-hover " ))} function a ( e , i ){ t . extend ( e , i ); for ( var s in i ) null == i [ s ] && ( e [ s ] = i [ s ]); return e } function r ( t ){ return function (){ var e = this . element . val (); t . apply ( this , arguments ), this . _refresh (), e !== this . element . val () && this . _trigger ( " change " )}} t . ui = t . ui || {}, t . ui . version = " 1.12.1 " ; var h = 0 , l = Array . prototype . slice ; t . cleanData = function ( e ){ return function ( i ){ var s , n , o ; for ( o = 0 ; null != ( n = i [ o ]); o ++ ) try { s = t . _data ( n , " events " ), s && s . remove && t ( n ) . triggerHandler ( " remove " )} catch ( a ){} e ( i )}}( t . cleanData ), t . widget = function ( e , i , s ){ var n , o , a , r = {}, h = e . split ( " . " )[ 0 ]; e = e . split ( " . " )[ 1 ]; var l = h + " - " + e ; return s || ( s = i , i = t . Widget ), t . isArray ( s ) && ( s = t . extend . apply ( null ,[{}] . concat ( s ))), t . expr [ " : " ][ l . toLowerCase ()] = function ( e ){ return !! t . data ( e , l )}, t [ h ] = t [ h ] || {}, n = t [ h ][ e ], o = t [ h ][ e ] = function ( t , e ){ return this . _createWidget ? ( arguments . length && this . _createWidget ( t , e ), void 0 ) : new o (
}}( t . fn . show ), hide : function ( t ){ return function ( s ){ if ( i ( s )) return t . apply ( this , arguments ); var n = e . apply ( this , arguments ); return n . mode = " hide " , this . effect . call ( this , n )}}( t . fn . hide ), toggle : function ( t ){ return function ( s ){ if ( i ( s ) || " boolean " == typeof s ) return t . apply ( this , arguments ); var n = e . apply ( this , arguments ); return n . mode = " toggle " , this . effect . call ( this , n )}}( t . fn . toggle ), cssUnit : function ( e ){ var i = this . css ( e ), s = []; return t . each ([ " em " , " px " , " % " , " pt " ], function ( t , e ){ i . indexOf ( e ) > 0 && ( s = [ parseFloat ( i ), e ])}), s }, cssClip : function ( t ){ return t ? this . css ( " clip " , " rect( " + t . top + " px " + t . right + " px " + t . bottom + " px " + t . left + " px) " ) : s ( this . css ( " clip " ), this )}, transfer : function ( e , i ){ var s = t ( this ), n = t ( e . to ), o = " fixed " === n . css ( " position " ), a = t ( " body " ), r = o ? a . scrollTop () : 0 , h = o ? a . scrollLeft () : 0 , l = n . offset (), c = { top : l . top - r , left : l . left - h , height : n . innerHeight (), width : n . innerWidth ()}, u = s . offset (), d = t ( " <div class='ui-effects-transfer'></div> " ) . appendTo ( " body " ) . addClass ( e . className ) . css ({ top : u . top - r , left : u . left - h , height : s . innerHeight (), width : s . innerWidth (), position : o ? " fixed " : " absolute " }) . animate ( c , e . duration , e . easing , function (){ d . remove (), t . isFunction ( i ) && i ()})}}), t . fx . step . clip = function ( e ){ e . clipInit || ( e . start = t ( e . elem ) . cssClip (), " string " == typeof e . end && ( e . end = s ( e . end , e . elem )), e . clipInit =! 0 ), t ( e . elem ) . cssClip ({ top : e . pos * ( e . end . top - e . start . top ) + e . start . top , right : e . pos * ( e . end . right - e . start . right ) + e . start . right , bottom : e . pos * ( e . end . bottom - e . start . bottom ) + e . start . bottom , left : e . pos * ( e . end . left - e . start . left ) + e . start . left })}}(), function (){ var e = {}; t . each ([ " Quad " , " Cubic " , " Quart " , " Quint " , " Expo " ], function ( t , i ){ e [ i ] = function ( e ){ return Math . pow ( e , t + 2 )}}), t . extend ( e ,{ Sine : function ( t ){ return 1 - Math . cos ( t * Math . PI / 2 )}, Circ : function ( t ){ return 1 - Math . sqrt ( 1 - t * t )}, Elastic : function ( t ){ return 0 === t || 1 === t ? t :- Math . pow ( 2 , 8 * ( t - 1 )) * Math . sin (( 80 * ( t - 1 ) - 7.5 ) * Math . PI / 15 )}, Back : function ( t ){ return t * t * ( 3 * t - 2 )}, Bounce : function ( t ){ for ( var e , i = 4 ;(( e = Math . pow ( 2 , -- i )) - 1 ) / 11 > t ;); return 1 / Math . pow ( 4 , 3 - i ) - 7.5625 * Math . pow (( 3 * e - 2 ) / 22 - t , 2 )}}), t . each ( e , function ( e , i ){ t . easing [ " easeIn " + e ] = i , t . easing [ " easeOut " + e ] = function ( t ){ return 1 - i ( 1 - t )}, t . easing [ " easeInOut " + e ] = function ( t ){ return . 5 > t ? i ( 2 * t ) / 2 : 1 - i ( - 2 * t + 2 ) / 2 }})}(); var f = t . effects ; t . effects . define ( " blind " , " hide " , function ( e , i ){ var s = { up : [ " bottom " , " top " ], vertical : [ " bottom " , " top " ], down : [ " top " , " bottom " ], left : [ " right " , " left " ], horizontal : [ " right " , " left " ], right : [ " left " , " right " ]}, n = t ( this ), o = e . direction || " up " , a = n . cssClip (), r = { clip : t . extend ({}, a )}, h = t . effects . createPlaceholder ( n ); r . clip [ s [ o ][ 0 ]] = r . clip [ s [ o ][ 1 ]], " show " === e . mode && ( n . cssClip ( r . clip ), h && h . css ( t . effects . clipToBox ( r )), r . clip = a ), h && h . animate ( t . effects . clipToBox ( r ), e . duration , e . easing ), n . animate ( r ,{ queue :! 1 , duration : e . duration , easing : e . easing , complete : i })}), t . effects . define ( " bounce " , function ( e , i ){ var s , n , o , a = t ( this ), r = e . mode , h = " hide " === r , l = " show " === r , c = e . direction || " up " , u = e . distance , d = e . times || 5 , p = 2 * d + ( l || h ? 1 : 0 ), f = e . duration / p , g = e . easing , m = " up " === c || " down " === c ? " top " : " left " , _ = " up " === c || " left " === c , v = 0 , b = a . queue () . length ; for ( t . effects . createPlaceholder ( a ), o = a . css ( m ), u || ( u = a [ " top " === m ? " outerHeight " : " outerWidth " ]() / 3 ), l && ( n = { opacity : 1 }, n [ m ] = o , a . css ( " opacity " , 0 ) . css ( m , _ ? 2 *- u : 2 * u ) . animate ( n , f , g )), h && ( u /= Math . pow ( 2 , d - 1 )), n = {}, n [ m ] = o ; d > v ; v ++ ) s = {}, s [ m ] = ( _ ? " -= " : " += " ) + u , a . animate ( s , f , g ) . animate ( n , f , g ), u = h ? 2 * u : u / 2 ; h && ( s = { opacity : 0 }, s [ m ] = ( _ ? " -= " : " += " ) + u , a . animate ( s , f , g )), a . queue ( i ), t . effects . unshift ( a , b , p + 1 )}), t . effects . define ( " clip " , " hide " , function ( e , i ){ var s , n = {}, o = t ( this ), a = e . direction || " vertical " , r = " both " === a , h = r || " horizontal " === a , l = r || " vertical " === a ; s = o . cssClip (), n . clip = { top : l ? ( s . bottom - s . top ) / 2 : s . top , right : h ? ( s . right - s . left ) / 2 : s . right , bottom : l ? ( s . bottom - s . top ) / 2 : s . bottom , left : h ? ( s . right - s . left ) / 2 : s . left }, t . effects . createPlaceholder ( o ), " show " === e . mode && ( o . cssClip ( n . clip ), n . clip = s ), o . animate ( n ,{ queue :! 1 , duration : e . duration , easing : e . easing , complete : i })}), t . effects . define ( " drop " , " hide " , function ( e , i ){ var s , n = t ( this ), o = e . mode , a = " show " === o , r = e . direction || " left " , h = " up " === r || " down " === r ? " top " : " left " , l = " up " === r || " left " === r ? " -= " : " += " , c = " += " === l ? " -= " : " += " , u = { opacity : 0 }; t . effects . createPlaceholder ( n ), s = e . distance || n [ " top " === h ? " o
this . isMultiLine = o ||! a && this . _isContentEditable ( this . element ), this . valueMethod = this . element [ o || a ? " val " : " text " ], this . isNewMenu =! 0 , this . _addClass ( " ui-autocomplete-input " ), this . element . attr ( " autocomplete " , " off " ), this . _on ( this . element ,{ keydown : function ( n ){ if ( this . element . prop ( " readOnly " )) return e =! 0 , s =! 0 , i =! 0 , void 0 ; e =! 1 , s =! 1 , i =! 1 ; var o = t . ui . keyCode ; switch ( n . keyCode ){ case o . PAGE_UP : e =! 0 , this . _move ( " previousPage " , n ); break ; case o . PAGE_DOWN : e =! 0 , this . _move ( " nextPage " , n ); break ; case o . UP : e =! 0 , this . _keyEvent ( " previous " , n ); break ; case o . DOWN : e =! 0 , this . _keyEvent ( " next " , n ); break ; case o . ENTER : this . menu . active && ( e =! 0 , n . preventDefault (), this . menu . select ( n )); break ; case o . TAB : this . menu . active && this . menu . select ( n ); break ; case o . ESCAPE : this . menu . element . is ( " :visible " ) && ( this . isMultiLine || this . _value ( this . term ), this . close ( n ), n . preventDefault ()); break ; default : i =! 0 , this . _searchTimeout ( n )}}, keypress : function ( s ){ if ( e ) return e =! 1 ,( ! this . isMultiLine || this . menu . element . is ( " :visible " )) && s . preventDefault (), void 0 ; if ( ! i ){ var n = t . ui . keyCode ; switch ( s . keyCode ){ case n . PAGE_UP : this . _move ( " previousPage " , s ); break ; case n . PAGE_DOWN : this . _move ( " nextPage " , s ); break ; case n . UP : this . _keyEvent ( " previous " , s ); break ; case n . DOWN : this . _keyEvent ( " next " , s )}}}, input : function ( t ){ return s ? ( s =! 1 , t . preventDefault (), void 0 ) : ( this . _searchTimeout ( t ), void 0 )}, focus : function (){ this . selectedItem = null , this . previous = this . _value ()}, blur : function ( t ){ return this . cancelBlur ? ( delete this . cancelBlur , void 0 ) : ( clearTimeout ( this . searching ), this . close ( t ), this . _change ( t ), void 0 )}}), this . _initSource (), this . menu = t ( " <ul> " ) . appendTo ( this . _appendTo ()) . menu ({ role : null }) . hide () . menu ( " instance " ), this . _addClass ( this . menu . element , " ui-autocomplete " , " ui-front " ), this . _on ( this . menu . element ,{ mousedown : function ( e ){ e . preventDefault (), this . cancelBlur =! 0 , this . _delay ( function (){ delete this . cancelBlur , this . element [ 0 ] !== t . ui . safeActiveElement ( this . document [ 0 ]) && this . element . trigger ( " focus " )})}, menufocus : function ( e , i ){ var s , n ; return this . isNewMenu && ( this . isNewMenu =! 1 , e . originalEvent &&/^ mouse /. test ( e . originalEvent . type )) ? ( this . menu . blur (), this . document . one ( " mousemove " , function (){ t ( e . target ) . trigger ( e . originalEvent )}), void 0 ) : ( n = i . item . data ( " ui-autocomplete-item " ), ! 1 !== this . _trigger ( " focus " , e ,{ item : n }) && e . originalEvent &&/^ key /. test ( e . originalEvent . type ) && this . _value ( n . value ), s = i . item . attr ( " aria-label " ) || n . value , s && t . trim ( s ) . length && ( this . liveRegion . children () . hide (), t ( " <div> " ) . text ( s ) . appendTo ( this . liveRegion )), void 0 )}, menuselect : function ( e , i ){ var s = i . item . data ( " ui-autocomplete-item " ), n = this . previous ; this . element [ 0 ] !== t . ui . safeActiveElement ( this . document [ 0 ]) && ( this . element . trigger ( " focus " ), this . previous = n , this . _delay ( function (){ this . previous = n , this . selectedItem = s })), ! 1 !== this . _trigger ( " select " , e ,{ item : s }) && this . _value ( s . value ), this . term = this . _value (), this . close ( e ), this . selectedItem = s }}), this . liveRegion = t ( " <div> " ,{ role : " status " , " aria-live " : " assertive " , " aria-relevant " : " additions " }) . appendTo ( this . document [ 0 ] . body ), this . _addClass ( this . liveRegion , null , " ui-helper-hidden-accessible " ), this . _on ( this . window ,{ beforeunload : function (){ this . element . removeAttr ( " autocomplete " )}})}, _destroy : function (){ clearTimeout ( this . searching ), this . element . removeAttr ( " autocomplete " ), this . menu . element . remove (), this . liveRegion . remove ()}, _setOption : function ( t , e ){ this . _super ( t , e ), " source " === t && this . _initSource (), " appendTo " === t && this . menu . element . appendTo ( this . _appendTo ()), " disabled " === t && e && this . xhr && this . xhr . abort ()}, _isEventTargetInWidget : function ( e ){ var i = this . menu . element [ 0 ]; return e . target === this . element [ 0 ] || e . target === i || t . contains ( i , e . target )}, _closeOnClickOutside : function ( t ){ this . _isEventTargetInWidget ( t ) || this . close ()}, _appendTo : function (){ var e = this . options . appendTo ; return e && ( e = e . jquery || e . nodeType ? t ( e ) : this . document . find ( e ) . eq ( 0 )), e && e [ 0 ] || ( e = this . element . closest ( " .ui-front, dialog " )), e . length || ( e = this . document [ 0 ] . body ), e }, _initSource : function (){ var e , i , s = this ; t . isArray ( this . options . source ) ? ( e = this . options . source , this . source = function ( i , s ){ s ( t . ui . autocomplete . filter ( e , i . term ))}) : " string " == typeof this . options . source ? ( i = this . options . source , this . so
}}, _updateDatepicker : function ( e ){ this . maxRows = 4 , m = e , e . dpDiv . empty () . append ( this . _generateHTML ( e )), this . _attachHandlers ( e ); var i , s = this . _getNumberOfMonths ( e ), n = s [ 1 ], a = 17 , r = e . dpDiv . find ( " . " + this . _dayOverClass + " a " ); r . length > 0 && o . apply ( r . get ( 0 )), e . dpDiv . removeClass ( " ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4 " ) . width ( " " ), n > 1 && e . dpDiv . addClass ( " ui-datepicker-multi- " + n ) . css ( " width " , a * n + " em " ), e . dpDiv [( 1 !== s [ 0 ] || 1 !== s [ 1 ] ? " add " : " remove " ) + " Class " ]( " ui-datepicker-multi " ), e . dpDiv [( this . _get ( e , " isRTL " ) ? " add " : " remove " ) + " Class " ]( " ui-datepicker-rtl " ), e === t . datepicker . _curInst && t . datepicker . _datepickerShowing && t . datepicker . _shouldFocusInput ( e ) && e . input . trigger ( " focus " ), e . yearshtml && ( i = e . yearshtml , setTimeout ( function (){ i === e . yearshtml && e . yearshtml && e . dpDiv . find ( " select.ui-datepicker-year:first " ) . replaceWith ( e . yearshtml ), i = e . yearshtml = null }, 0 ))}, _shouldFocusInput : function ( t ){ return t . input && t . input . is ( " :visible " ) &&! t . input . is ( " :disabled " ) &&! t . input . is ( " :focus " )}, _checkOffset : function ( e , i , s ){ var n = e . dpDiv . outerWidth (), o = e . dpDiv . outerHeight (), a = e . input ? e . input . outerWidth () : 0 , r = e . input ? e . input . outerHeight () : 0 , h = document . documentElement . clientWidth + ( s ? 0 : t ( document ) . scrollLeft ()), l = document . documentElement . clientHeight + ( s ? 0 : t ( document ) . scrollTop ()); return i . left -= this . _get ( e , " isRTL " ) ? n - a : 0 , i . left -= s && i . left === e . input . offset () . left ? t ( document ) . scrollLeft () : 0 , i . top -= s && i . top === e . input . offset () . top + r ? t ( document ) . scrollTop () : 0 , i . left -= Math . min ( i . left , i . left + n > h && h > n ? Math . abs ( i . left + n - h ) : 0 ), i . top -= Math . min ( i . top , i . top + o > l && l > o ? Math . abs ( o + r ) : 0 ), i }, _findPos : function ( e ){ for ( var i , s = this . _getInst ( e ), n = this . _get ( s , " isRTL " ); e && ( " hidden " === e . type || 1 !== e . nodeType || t . expr . filters . hidden ( e ));) e = e [ n ? " previousSibling " : " nextSibling " ]; return i = t ( e ) . offset (),[ i . left , i . top ]}, _hideDatepicker : function ( e ){ var i , s , n , o , a = this . _curInst ; ! a || e && a !== t . data ( e , " datepicker " ) || this . _datepickerShowing && ( i = this . _get ( a , " showAnim " ), s = this . _get ( a , " duration " ), n = function (){ t . datepicker . _tidyDialog ( a )}, t . effects && ( t . effects . effect [ i ] || t . effects [ i ]) ? a . dpDiv . hide ( i , t . datepicker . _get ( a , " showOptions " ), s , n ) : a . dpDiv [ " slideDown " === i ? " slideUp " : " fadeIn " === i ? " fadeOut " : " hide " ]( i ? s : null , n ), i || n (), this . _datepickerShowing =! 1 , o = this . _get ( a , " onClose " ), o && o . apply ( a . input ? a . input [ 0 ] : null ,[ a . input ? a . input . val () : " " , a ]), this . _lastInput = null , this . _inDialog && ( this . _dialogInput . css ({ position : " absolute " , left : " 0 " , top : " -100px " }), t . blockUI && ( t . unblockUI (), t ( " body " ) . append ( this . dpDiv ))), this . _inDialog =! 1 )}, _tidyDialog : function ( t ){ t . dpDiv . removeClass ( this . _dialogClass ) . off ( " .ui-datepicker-calendar " )}, _checkExternalClick : function ( e ){ if ( t . datepicker . _curInst ){ var i = t ( e . target ), s = t . datepicker . _getInst ( i [ 0 ]);( i [ 0 ] . id !== t . datepicker . _mainDivId && 0 === i . parents ( " # " + t . datepicker . _mainDivId ) . length &&! i . hasClass ( t . datepicker . markerClassName ) &&! i . closest ( " . " + t . datepicker . _triggerClass ) . length && t . datepicker . _datepickerShowing && ( ! t . datepicker . _inDialog ||! t . blockUI ) || i . hasClass ( t . datepicker . markerClassName ) && t . datepicker . _curInst !== s ) && t . datepicker . _hideDatepicker ()}}, _adjustDate : function ( e , i , s ){ var n = t ( e ), o = this . _getInst ( n [ 0 ]); this . _isDisabledDatepicker ( n [ 0 ]) || ( this . _adjustInstDate ( o , i + ( " M " === s ? this . _get ( o , " showCurrentAtPos " ) : 0 ), s ), this . _updateDatepicker ( o ))}, _gotoToday : function ( e ){ var i , s = t ( e ), n = this . _getInst ( s [ 0 ]); this . _get ( n , " gotoCurrent " ) && n . currentDay ? ( n . selectedDay = n . currentDay , n . drawMonth = n . selectedMonth = n . currentMonth , n . drawYear = n . selectedYear = n . currentYear ) : ( i = new Date , n . selectedDay = i . getDate (), n . drawMonth = n . selectedMonth = i . getMonth (), n . drawYear = n . selectedYear = i . getFullYear ()), this . _notifyChange ( n ), this . _adjustDate ( s )}, _selectMonthYear : function ( e , i , s ){ var n = t ( e ), o = this . _getInst ( n [ 0 ]); o [ " selected " + ( " M " === s ? " Month " : " Year " )] = o [ " draw " + ( " M " === s ? " Month " : " Year " )] = parseInt ( i . options [ i . selectedIndex ] . value , 10 ), this . _notifyChange ( o ), this . _adjustDate ( n )}, _selectDay : function ( e , i , s , n ){ var o , a = t ( e ); t ( n ) . hasClass ( this . _unselectableClass ) || this . _isDisabledDatepicker ( a [ 0 ]) || ( o = this . _getInst ( a [ 0 ]), o . selectedDay = o . currentDay = t ( " a " , n ) . html (), o . selectedMonth = o . currentMonth = i , o . selectedYear = o . currentYear = s , this . _selec
}, _cacheMargins : function (){ this . margins = { left : parseInt ( this . element . css ( " marginLeft " ), 10 ) || 0 , top : parseInt ( this . element . css ( " marginTop " ), 10 ) || 0 , right : parseInt ( this . element . css ( " marginRight " ), 10 ) || 0 , bottom : parseInt ( this . element . css ( " marginBottom " ), 10 ) || 0 }}, _cacheHelperProportions : function (){ this . helperProportions = { width : this . helper . outerWidth (), height : this . helper . outerHeight ()}}, _setContainment : function (){ var e , i , s , n = this . options , o = this . document [ 0 ]; return this . relativeContainer = null , n . containment ? " window " === n . containment ? ( this . containment = [ t ( window ) . scrollLeft () - this . offset . relative . left - this . offset . parent . left , t ( window ) . scrollTop () - this . offset . relative . top - this . offset . parent . top , t ( window ) . scrollLeft () + t ( window ) . width () - this . helperProportions . width - this . margins . left , t ( window ) . scrollTop () + ( t ( window ) . height () || o . body . parentNode . scrollHeight ) - this . helperProportions . height - this . margins . top ], void 0 ) : " document " === n . containment ? ( this . containment = [ 0 , 0 , t ( o ) . width () - this . helperProportions . width - this . margins . left ,( t ( o ) . height () || o . body . parentNode . scrollHeight ) - this . helperProportions . height - this . margins . top ], void 0 ) : n . containment . constructor === Array ? ( this . containment = n . containment , void 0 ) : ( " parent " === n . containment && ( n . containment = this . helper [ 0 ] . parentNode ), i = t ( n . containment ), s = i [ 0 ], s && ( e =/ ( scroll | auto ) /. test ( i . css ( " overflow " )), this . containment = [( parseInt ( i . css ( " borderLeftWidth " ), 10 ) || 0 ) + ( parseInt ( i . css ( " paddingLeft " ), 10 ) || 0 ),( parseInt ( i . css ( " borderTopWidth " ), 10 ) || 0 ) + ( parseInt ( i . css ( " paddingTop " ), 10 ) || 0 ),( e ? Math . max ( s . scrollWidth , s . offsetWidth ) : s . offsetWidth ) - ( parseInt ( i . css ( " borderRightWidth " ), 10 ) || 0 ) - ( parseInt ( i . css ( " paddingRight " ), 10 ) || 0 ) - this . helperProportions . width - this . margins . left - this . margins . right ,( e ? Math . max ( s . scrollHeight , s . offsetHeight ) : s . offsetHeight ) - ( parseInt ( i . css ( " borderBottomWidth " ), 10 ) || 0 ) - ( parseInt ( i . css ( " paddingBottom " ), 10 ) || 0 ) - this . helperProportions . height - this . margins . top - this . margins . bottom ], this . relativeContainer = i ), void 0 ) : ( this . containment = null , void 0 )}, _convertPositionTo : function ( t , e ){ e || ( e = this . position ); var i = " absolute " === t ? 1 :- 1 , s = this . _isRootNode ( this . scrollParent [ 0 ]); return { top : e . top + this . offset . relative . top * i + this . offset . parent . top * i - ( " fixed " === this . cssPosition ? - this . offset . scroll . top : s ? 0 : this . offset . scroll . top ) * i , left : e . left + this . offset . relative . left * i + this . offset . parent . left * i - ( " fixed " === this . cssPosition ? - this . offset . scroll . left : s ? 0 : this . offset . scroll . left ) * i }}, _generatePosition : function ( t , e ){ var i , s , n , o , a = this . options , r = this . _isRootNode ( this . scrollParent [ 0 ]), h = t . pageX , l = t . pageY ; return r && this . offset . scroll || ( this . offset . scroll = { top : this . scrollParent . scrollTop (), left : this . scrollParent . scrollLeft ()}), e && ( this . containment && ( this . relativeContainer ? ( s = this . relativeContainer . offset (), i = [ this . containment [ 0 ] + s . left , this . containment [ 1 ] + s . top , this . containment [ 2 ] + s . left , this . containment [ 3 ] + s . top ]) : i = this . containment , t . pageX - this . offset . click . left < i [ 0 ] && ( h = i [ 0 ] + this . offset . click . left ), t . pageY - this . offset . click . top < i [ 1 ] && ( l = i [ 1 ] + this . offset . click . top ), t . pageX - this . offset . click . left > i [ 2 ] && ( h = i [ 2 ] + this . offset . click . left ), t . pageY - this . offset . click . top > i [ 3 ] && ( l = i [ 3 ] + this . offset . click . top )), a . grid && ( n = a . grid [ 1 ] ? this . originalPageY + Math . round (( l - this . originalPageY ) / a . grid [ 1 ]) * a . grid [ 1 ] : this . originalPageY , l = i ? n - this . offset . click . top >= i [ 1 ] || n - this . offset . click . top > i [ 3 ] ? n : n - this . offset . click . top >= i [ 1 ] ? n - a . grid [ 1 ] : n + a . grid [ 1 ] : n , o = a . grid [ 0 ] ? this . originalPageX + Math . round (( h - this . originalPageX ) / a . grid [ 0 ]) * a . grid [ 0 ] : this . originalPageX , h = i ? o - this . offset . click . left >= i [ 0 ] || o - this . offset . click . left > i [ 2 ] ? o : o - this . offset . click . left >= i [ 0 ] ? o - a . grid [ 0 ] : o + a . grid [ 0 ] : o ), " y " === a . axis && ( h = this . originalPageX ), " x " === a . axis && ( l = this . originalPageY )),{ top : l - this . offset . click . top - this . offset . relative . top - this . offset . parent . top + ( " fixed " === this . cssPosition ? - this . offset . scroll . top : r ? 0 : this . offset . scroll . top ), left : h - this . offset . click . left - this . offset . relative . left - this . offset . parent . left + ( " fixed " === this . cssPosition ? - this . offset . scroll . left : r ? 0 : this . offset . scroll . left )}}, _clear : function (){ this . _removeClass ( this . helper , " ui-draggable-dragging " ), this . hel
}, disable : t . noop , enable : t . noop , close : function ( e ){ var i = this ; this . _isOpen && this . _trigger ( " beforeClose " , e ) !==! 1 && ( this . _isOpen =! 1 , this . _focusedElement = null , this . _destroyOverlay (), this . _untrackInstance (), this . opener . filter ( " :focusable " ) . trigger ( " focus " ) . length || t . ui . safeBlur ( t . ui . safeActiveElement ( this . document [ 0 ])), this . _hide ( this . uiDialog , this . options . hide , function (){ i . _trigger ( " close " , e )}))}, isOpen : function (){ return this . _isOpen }, moveToTop : function (){ this . _moveToTop ()}, _moveToTop : function ( e , i ){ var s =! 1 , n = this . uiDialog . siblings ( " .ui-front:visible " ) . map ( function (){ return + t ( this ) . css ( " z-index " )}) . get (), o = Math . max . apply ( null , n ); return o >=+ this . uiDialog . css ( " z-index " ) && ( this . uiDialog . css ( " z-index " , o + 1 ), s =! 0 ), s &&! i && this . _trigger ( " focus " , e ), s }, open : function (){ var e = this ; return this . _isOpen ? ( this . _moveToTop () && this . _focusTabbable (), void 0 ) : ( this . _isOpen =! 0 , this . opener = t ( t . ui . safeActiveElement ( this . document [ 0 ])), this . _size (), this . _position (), this . _createOverlay (), this . _moveToTop ( null , ! 0 ), this . overlay && this . overlay . css ( " z-index " , this . uiDialog . css ( " z-index " ) - 1 ), this . _show ( this . uiDialog , this . options . show , function (){ e . _focusTabbable (), e . _trigger ( " focus " )}), this . _makeFocusTarget (), this . _trigger ( " open " ), void 0 )}, _focusTabbable : function (){ var t = this . _focusedElement ; t || ( t = this . element . find ( " [autofocus] " )), t . length || ( t = this . element . find ( " :tabbable " )), t . length || ( t = this . uiDialogButtonPane . find ( " :tabbable " )), t . length || ( t = this . uiDialogTitlebarClose . filter ( " :tabbable " )), t . length || ( t = this . uiDialog ), t . eq ( 0 ) . trigger ( " focus " )}, _keepFocus : function ( e ){ function i (){ var e = t . ui . safeActiveElement ( this . document [ 0 ]), i = this . uiDialog [ 0 ] === e || t . contains ( this . uiDialog [ 0 ], e ); i || this . _focusTabbable ()} e . preventDefault (), i . call ( this ), this . _delay ( i )}, _createWrapper : function (){ this . uiDialog = t ( " <div> " ) . hide () . attr ({ tabIndex :- 1 , role : " dialog " }) . appendTo ( this . _appendTo ()), this . _addClass ( this . uiDialog , " ui-dialog " , " ui-widget ui-widget-content ui-front " ), this . _on ( this . uiDialog ,{ keydown : function ( e ){ if ( this . options . closeOnEscape &&! e . isDefaultPrevented () && e . keyCode && e . keyCode === t . ui . keyCode . ESCAPE ) return e . preventDefault (), this . close ( e ), void 0 ; if ( e . keyCode === t . ui . keyCode . TAB &&! e . isDefaultPrevented ()){ var i = this . uiDialog . find ( " :tabbable " ), s = i . filter ( " :first " ), n = i . filter ( " :last " ); e . target !== n [ 0 ] && e . target !== this . uiDialog [ 0 ] || e . shiftKey ? e . target !== s [ 0 ] && e . target !== this . uiDialog [ 0 ] ||! e . shiftKey || ( this . _delay ( function (){ n . trigger ( " focus " )}), e . preventDefault ()) : ( this . _delay ( function (){ s . trigger ( " focus " )}), e . preventDefault ())}}, mousedown : function ( t ){ this . _moveToTop ( t ) && this . _focusTabbable ()}}), this . element . find ( " [aria-describedby] " ) . length || this . uiDialog . attr ({ " aria-describedby " : this . element . uniqueId () . attr ( " id " )})}, _createTitlebar : function (){ var e ; this . uiDialogTitlebar = t ( " <div> " ), this . _addClass ( this . uiDialogTitlebar , " ui-dialog-titlebar " , " ui-widget-header ui-helper-clearfix " ), this . _on ( this . uiDialogTitlebar ,{ mousedown : function ( e ){ t ( e . target ) . closest ( " .ui-dialog-titlebar-close " ) || this . uiDialog . trigger ( " focus " )}}), this . uiDialogTitlebarClose = t ( " <button type='button'></button> " ) . button ({ label : t ( " <a> " ) . text ( this . options . closeText ) . html (), icon : " ui-icon-closethick " , showLabel :! 1 }) . appendTo ( this . uiDialogTitlebar ), this . _addClass ( this . uiDialogTitlebarClose , " ui-dialog-titlebar-close " ), this . _on ( this . uiDialogTitlebarClose ,{ click : function ( t ){ t . preventDefault (), this . close ( t )}}), e = t ( " <span> " ) . uniqueId () . prependTo ( this . uiDialogTitlebar ), this . _addClass ( e , " ui-dialog-title " ), this . _title ( e ), this . uiDialogTitlebar . prependTo ( this . uiDialog ), this . uiDialog . attr ({ " aria-labelledby " : e . attr ( " id " )})}, _title : function ( t ){ this . options . title ? t . text ( this . options . title ) : t . html ( "   " )}, _createButtonPane : function (){ this . uiDialogButtonPane = t ( " <div> " ), this . _addClass ( this . uiDialogButtonPane , " ui-dialog-buttonpane " , " ui-widget-content ui-helper-clearfix " ), this . uiButtonSet = t ( " <div> " ) . appendTo ( this . uiDialogButtonPane ), this . _addClass ( this . uiButtonSet , " ui-dialog-buttonset " ), this . _createButtons ()}, _createButtons : function (){ var e = this , i = this . options . buttons ; return this . uiDialogButtonPane . remove (), this . uiButtonSet . empty (), t . isEmpt
}, _refresh : function (){ this . _createRange (), this . _createHandles (), this . _setupEvents (), this . _refreshValue ()}, _createHandles : function (){ var e , i , s = this . options , n = this . element . find ( " .ui-slider-handle " ), o = " <span tabindex='0'></span> " , a = []; for ( i = s . values && s . values . length || 1 , n . length > i && ( n . slice ( i ) . remove (), n = n . slice ( 0 , i )), e = n . length ; i > e ; e ++ ) a . push ( o ); this . handles = n . add ( t ( a . join ( " " )) . appendTo ( this . element )), this . _addClass ( this . handles , " ui-slider-handle " , " ui-state-default " ), this . handle = this . handles . eq ( 0 ), this . handles . each ( function ( e ){ t ( this ) . data ( " ui-slider-handle-index " , e ) . attr ( " tabIndex " , 0 )})}, _createRange : function (){ var e = this . options ; e . range ? ( e . range ===! 0 && ( e . values ? e . values . length && 2 !== e . values . length ? e . values = [ e . values [ 0 ], e . values [ 0 ]] : t . isArray ( e . values ) && ( e . values = e . values . slice ( 0 )) : e . values = [ this . _valueMin (), this . _valueMin ()]), this . range && this . range . length ? ( this . _removeClass ( this . range , " ui-slider-range-min ui-slider-range-max " ), this . range . css ({ left : " " , bottom : " " })) : ( this . range = t ( " <div> " ) . appendTo ( this . element ), this . _addClass ( this . range , " ui-slider-range " )),( " min " === e . range || " max " === e . range ) && this . _addClass ( this . range , " ui-slider-range- " + e . range )) : ( this . range && this . range . remove (), this . range = null )}, _setupEvents : function (){ this . _off ( this . handles ), this . _on ( this . handles , this . _handleEvents ), this . _hoverable ( this . handles ), this . _focusable ( this . handles )}, _destroy : function (){ this . handles . remove (), this . range && this . range . remove (), this . _mouseDestroy ()}, _mouseCapture : function ( e ){ var i , s , n , o , a , r , h , l , c = this , u = this . options ; return u . disabled ? ! 1 : ( this . elementSize = { width : this . element . outerWidth (), height : this . element . outerHeight ()}, this . elementOffset = this . element . offset (), i = { x : e . pageX , y : e . pageY }, s = this . _normValueFromMouse ( i ), n = this . _valueMax () - this . _valueMin () + 1 , this . handles . each ( function ( e ){ var i = Math . abs ( s - c . values ( e ));( n > i || n === i && ( e === c . _lastChangedValue || c . values ( e ) === u . min )) && ( n = i , o = t ( this ), a = e )}), r = this . _start ( e , a ), r ===! 1 ? ! 1 : ( this . _mouseSliding =! 0 , this . _handleIndex = a , this . _addClass ( o , null , " ui-state-active " ), o . trigger ( " focus " ), h = o . offset (), l =! t ( e . target ) . parents () . addBack () . is ( " .ui-slider-handle " ), this . _clickOffset = l ? { left : 0 , top : 0 } : { left : e . pageX - h . left - o . width () / 2 , top : e . pageY - h . top - o . height () / 2 - ( parseInt ( o . css ( " borderTopWidth " ), 10 ) || 0 ) - ( parseInt ( o . css ( " borderBottomWidth " ), 10 ) || 0 ) + ( parseInt ( o . css ( " marginTop " ), 10 ) || 0 )}, this . handles . hasClass ( " ui-state-hover " ) || this . _slide ( e , a , s ), this . _animateOff =! 0 , ! 0 ))}, _mouseStart : function (){ return ! 0 }, _mouseDrag : function ( t ){ var e = { x : t . pageX , y : t . pageY }, i = this . _normValueFromMouse ( e ); return this . _slide ( t , this . _handleIndex , i ), ! 1 }, _mouseStop : function ( t ){ return this . _removeClass ( this . handles , null , " ui-state-active " ), this . _mouseSliding =! 1 , this . _stop ( t , this . _handleIndex ), this . _change ( t , this . _handleIndex ), this . _handleIndex = null , this . _clickOffset = null , this . _animateOff =! 1 , ! 1 }, _detectOrientation : function (){ this . orientation = " vertical " === this . options . orientation ? " vertical " : " horizontal " }, _normValueFromMouse : function ( t ){ var e , i , s , n , o ; return " horizontal " === this . orientation ? ( e = this . elementSize . width , i = t . x - this . elementOffset . left - ( this . _clickOffset ? this . _clickOffset . left : 0 )) : ( e = this . elementSize . height , i = t . y - this . elementOffset . top - ( this . _clickOffset ? this . _clickOffset . top : 0 )), s = i / e , s > 1 && ( s = 1 ), 0 > s && ( s = 0 ), " vertical " === this . orientation && ( s = 1 - s ), n = this . _valueMax () - this . _valueMin (), o = this . _valueMin () + s * n , this . _trimAlignValue ( o )}, _uiHash : function ( t , e , i ){ var s = { handle : this . handles [ t ], handleIndex : t , value : void 0 !== e ? e : this . value ()}; return this . _hasMultipleValues () && ( s . value = void 0 !== e ? e : this . values ( t ), s . values = i || this . values ()), s }, _hasMultipleValues : function (){ return this . options . values && this . options . values . length }, _start : function ( t , e ){ return this . _trigger ( " start " , t , this . _uiHash ( e ))}, _slide : function ( t , e , i ){ var s , n , o = this . value (), a = this . values (); this . _hasMultipleValues () && ( n = this . values ( e ? 0 : 1 ), o = this . values ( e ), 2 === this . options . values . length && this . options . range ===! 0 && ( i = 0 === e ? Math . min ( n , i ) : Math . max ( n , i )), a [ e ] = i ), i !== o && ( s = this . _trigger ( " slide " , t , this . _uiHash ( e , i , a )), s !==! 1 && ( this . _hasMultipleValues () ? this . values ( e , i ) : this . value ( i )))}, _stop : f
this . _delay ( function (){ n === this . counter && this . refreshPositions ( ! s )})}, _clear : function ( t , e ){ function i ( t , e , i ){ return function ( s ){ i . _trigger ( t , s , e . _uiHash ( e ))}} this . reverting =! 1 ; var s , n = []; if ( ! this . _noFinalSort && this . currentItem . parent () . length && this . placeholder . before ( this . currentItem ), this . _noFinalSort = null , this . helper [ 0 ] === this . currentItem [ 0 ]){ for ( s in this . _storedCSS )( " auto " === this . _storedCSS [ s ] || " static " === this . _storedCSS [ s ]) && ( this . _storedCSS [ s ] = " " ); this . currentItem . css ( this . _storedCSS ), this . _removeClass ( this . currentItem , " ui-sortable-helper " )} else this . currentItem . show (); for ( this . fromOutside &&! e && n . push ( function ( t ){ this . _trigger ( " receive " , t , this . _uiHash ( this . fromOutside ))}), ! this . fromOutside && this . domPosition . prev === this . currentItem . prev () . not ( " .ui-sortable-helper " )[ 0 ] && this . domPosition . parent === this . currentItem . parent ()[ 0 ] || e || n . push ( function ( t ){ this . _trigger ( " update " , t , this . _uiHash ())}), this !== this . currentContainer && ( e || ( n . push ( function ( t ){ this . _trigger ( " remove " , t , this . _uiHash ())}), n . push ( function ( t ){ return function ( e ){ t . _trigger ( " receive " , e , this . _uiHash ( this ))}} . call ( this , this . currentContainer )), n . push ( function ( t ){ return function ( e ){ t . _trigger ( " update " , e , this . _uiHash ( this ))}} . call ( this , this . currentContainer )))), s = this . containers . length - 1 ; s >= 0 ; s -- ) e || n . push ( i ( " deactivate " , this , this . containers [ s ])), this . containers [ s ] . containerCache . over && ( n . push ( i ( " out " , this , this . containers [ s ])), this . containers [ s ] . containerCache . over = 0 ); if ( this . storedCursor && ( this . document . find ( " body " ) . css ( " cursor " , this . storedCursor ), this . storedStylesheet . remove ()), this . _storedOpacity && this . helper . css ( " opacity " , this . _storedOpacity ), this . _storedZIndex && this . helper . css ( " zIndex " , " auto " === this . _storedZIndex ? " " : this . _storedZIndex ), this . dragging =! 1 , e || this . _trigger ( " beforeStop " , t , this . _uiHash ()), this . placeholder [ 0 ] . parentNode . removeChild ( this . placeholder [ 0 ]), this . cancelHelperRemoval || ( this . helper [ 0 ] !== this . currentItem [ 0 ] && this . helper . remove (), this . helper = null ), ! e ){ for ( s = 0 ; n . length > s ; s ++ ) n [ s ] . call ( this , t ); this . _trigger ( " stop " , t , this . _uiHash ())} return this . fromOutside =! 1 , ! this . cancelHelperRemoval }, _trigger : function (){ t . Widget . prototype . _trigger . apply ( this , arguments ) ===! 1 && this . cancel ()}, _uiHash : function ( e ){ var i = e || this ; return { helper : i . helper , placeholder : i . placeholder || t ([]), position : i . position , originalPosition : i . originalPosition , offset : i . positionAbs , item : i . currentItem , sender : e ? e . element : null }}}), t . widget ( " ui.spinner " ,{ version : " 1.12.1 " , defaultElement : " <input> " , widgetEventPrefix : " spin " , options : { classes : { " ui-spinner " : " ui-corner-all " , " ui-spinner-down " : " ui-corner-br " , " ui-spinner-up " : " ui-corner-tr " }, culture : null , icons : { down : " ui-icon-triangle-1-s " , up : " ui-icon-triangle-1-n " }, incremental :! 0 , max : null , min : null , numberFormat : null , page : 10 , step : 1 , change : null , spin : null , start : null , stop : null }, _create : function (){ this . _setOption ( " max " , this . options . max ), this . _setOption ( " min " , this . options . min ), this . _setOption ( " step " , this . options . step ), " " !== this . value () && this . _value ( this . element . val (), ! 0 ), this . _draw (), this . _on ( this . _events ), this . _refresh (), this . _on ( this . window ,{ beforeunload : function (){ this . element . removeAttr ( " autocomplete " )}})}, _getCreateOptions : function (){ var e = this . _super (), i = this . element ; return t . each ([ " min " , " max " , " step " ], function ( t , s ){ var n = i . attr ( s ); null != n && n . length && ( e [ s ] = n )}), e }, _events : { keydown : function ( t ){ this . _start ( t ) && this . _keydown ( t ) && t . preventDefault ()}, keyup : " _stop " , focus : function (){ this . previous = this . element . val ()}, blur : function ( t ){ return this . cancelBlur ? ( delete this . cancelBlur , void 0 ) : ( this . _stop (), this . _refresh (), this . previous !== this . element . val () && this . _trigger ( " change " , t ), void 0 )}, mousewheel : function ( t , e ){ if ( e ){ if ( ! this . spinning &&! this . _start ( t )) return ! 1 ; this . _spin (( e > 0 ? 1 :- 1 ) * this . options . step , t ), clearTimeout ( this . mousewheelTimer ), this . mousewheelTimer = this . _delay ( function (){ this . spinning && this . _stop ( t )}, 100 ), t . preventDefault ()}}, " mousedown .ui-spinner-button " : function ( e ){ function i (){ var e = this . element [ 0 ] === t . ui . safeActiveElement ( this . document [ 0 ]); e || ( this . element . trigger ( " focus " ), this . previous = s , this . _delay ( function (){ this . previous = s }))} var s ; s = this . elemen
/*
Copyright ( C ) Federico Zivolo 2020
Distributed under the MIT License ( license terms are at http :// opensource . org / licenses / MIT ) .
*/ ( function ( e , t ){ 'object' == typeof exports && 'undefined' != typeof module ? module . exports = t () : 'function' == typeof define && define . amd ? define ( t ) : e . Popper = t ()})( this , function (){ 'use strict' ; function e ( e ){ return e && '[object Function]' === {} . toString . call ( e )} function t ( e , t ){ if ( 1 !== e . nodeType ) return []; var o = e . ownerDocument . defaultView , n = o . getComputedStyle ( e , null ); return t ? n [ t ] : n } function o ( e ){ return 'HTML' === e . nodeName ? e : e . parentNode || e . host } function n ( e ){ if ( ! e ) return document . body ; switch ( e . nodeName ){ case 'HTML' : case 'BODY' : return e . ownerDocument . body ; case '#document' : return e . body ;} var i = t ( e ), r = i . overflow , p = i . overflowX , s = i . overflowY ; return / ( auto | scroll | overlay ) /. test ( r + s + p ) ? e : n ( o ( e ))} function i ( e ){ return e && e . referenceNode ? e . referenceNode : e } function r ( e ){ return 11 === e ? re : 10 === e ? pe : re || pe } function p ( e ){ if ( ! e ) return document . documentElement ; for ( var o = r ( 10 ) ? document . body : null , n = e . offsetParent || null ; n === o && e . nextElementSibling ;) n = ( e = e . nextElementSibling ) . offsetParent ; var i = n && n . nodeName ; return i && 'BODY' !== i && 'HTML' !== i ? - 1 !== [ 'TH' , 'TD' , 'TABLE' ] . indexOf ( n . nodeName ) && 'static' === t ( n , 'position' ) ? p ( n ) : n : e ? e . ownerDocument . documentElement : document . documentElement } function s ( e ){ var t = e . nodeName ; return 'BODY' !== t && ( 'HTML' === t || p ( e . firstElementChild ) === e )} function d ( e ){ return null === e . parentNode ? e : d ( e . parentNode )} function a ( e , t ){ if ( ! e ||! e . nodeType ||! t ||! t . nodeType ) return document . documentElement ; var o = e . compareDocumentPosition ( t ) & Node . DOCUMENT_POSITION_FOLLOWING , n = o ? e : t , i = o ? t : e , r = document . createRange (); r . setStart ( n , 0 ), r . setEnd ( i , 0 ); var l = r . commonAncestorContainer ; if ( e !== l && t !== l || n . contains ( i )) return s ( l ) ? l : p ( l ); var f = d ( e ); return f . host ? a ( f . host , t ) : a ( e , d ( t ) . host )} function l ( e ){ var t = 1 < arguments . length && void 0 !== arguments [ 1 ] ? arguments [ 1 ] : 'top' , o = 'top' === t ? 'scrollTop' : 'scrollLeft' , n = e . nodeName ; if ( 'BODY' === n || 'HTML' === n ){ var i = e . ownerDocument . documentElement , r = e . ownerDocument . scrollingElement || i ; return r [ o ]} return e [ o ]} function f ( e , t ){ var o = 2 < arguments . length && void 0 !== arguments [ 2 ] && arguments [ 2 ], n = l ( t , 'top' ), i = l ( t , 'left' ), r = o ? - 1 : 1 ; return e . top += n * r , e . bottom += n * r , e . left += i * r , e . right += i * r , e } function m ( e , t ){ var o = 'x' === t ? 'Left' : 'Top' , n = 'Left' == o ? 'Right' : 'Bottom' ; return parseFloat ( e [ 'border' + o + 'Width' ]) + parseFloat ( e [ 'border' + n + 'Width' ])} function h ( e , t , o , n ){ return ee ( t [ 'offset' + e ], t [ 'scroll' + e ], o [ 'client' + e ], o [ 'offset' + e ], o [ 'scroll' + e ], r ( 10 ) ? parseInt ( o [ 'offset' + e ]) + parseInt ( n [ 'margin' + ( 'Height' === e ? 'Top' : 'Left' )]) + parseInt ( n [ 'margin' + ( 'Height' === e ? 'Bottom' : 'Right' )]) : 0 )} function c ( e ){ var t = e . body , o = e . documentElement , n = r ( 10 ) && getComputedStyle ( o ); return { height : h ( 'Height' , t , o , n ), width : h ( 'Width' , t , o , n )}} function g ( e ){ return le ({}, e ,{ right : e . left + e . width , bottom : e . top + e . height })} function u ( e ){ var o = {}; try { if ( r ( 10 )){ o = e . getBoundingClientRect (); var n = l ( e , 'top' ), i = l ( e , 'left' ); o . top += n , o . left += i , o . bottom += n , o . right += i } else o = e . getBoundingClientRect ()} catch ( t ){} var p = { left : o . left , top : o . top , width : o . right - o . left , height : o . bottom - o . top }, s = 'HTML' === e . nodeName ? c ( e . ownerDocument ) : {}, d = s . width || e . clientWidth || p . width , a = s . height || e . clientHeight || p . height , f = e . offsetWidth - d , h = e . offsetHeight - a ; if ( f || h ){ var u = t ( e ); f -= m ( u , 'x' ), h -= m ( u , 'y' ), p . width -= f , p . height -= h } return g ( p )} function b ( e , o ){ var i = 2 < arguments . length && void 0 !== arguments [ 2 ] && arguments [ 2 ], p = r ( 10 ), s = 'HTML' === o . nodeName , d = u ( e ), a = u ( o ), l = n ( e ), m = t ( o ), h = parseFloat ( m . borderTopWidth ), c = parseFloat ( m . borderLeftWidth ); i && s && ( a . top = ee ( a . top , 0 ), a . left = ee ( a . left , 0 )); var b = g ({ top : d . top - a . top - h , left : d . left - a . left - c , width : d . width , height : d . height }); if ( b . marginTop = 0 , b . marginLeft = 0 , ! p && s ){ var w = parseFloat ( m . marginTop ), y = parseFloat ( m . marginLeft ); b . top -= h - w , b . bottom -= h - w , b . left -= c - y , b . right -= c - y , b . marginTop = w , b . marginLeft = y } return ( p &&! i ? o . contains ( l ) : o === l && 'BODY' !== l . nodeName ) && ( b = f ( b , o )), b } function w ( e ){ var t = 1 < arguments . length && void 0 !== arguments [ 1 ] && arguments [ 1 ], o = e . ownerDocument . documentElement , n = b ( e , o ), i = ee ( o . clientWidth , window . innerWidth || 0 ), r = ee ( o . clientHeight , window . innerHeight || 0 ), p = t ? 0 : l ( o ), s = t ? 0 : l ( o , 'left' ), d = { top : p - n . top + n . marginTop , left : s - n . left + n . marginLeft , width : i , height : r }; return g ( d )} function y ( e ){ var n = e . nodeName ; if ( 'BODY' =
//# sourceMappingURL=popper.min.js.map
/*!
* Bootstrap v4 . 6.1 ( https :// getbootstrap . com / )
* Copyright 2011 - 2021 The Bootstrap Authors ( https :// github . com / twbs / bootstrap / graphs / contributors )
* Licensed under MIT ( https :// github . com / twbs / bootstrap / blob / main / LICENSE )
*/
! function ( t , e ){ " object " == typeof exports && " undefined " != typeof module ? e ( exports , require ( " jquery " ), require ( " popper.js " )) : " function " == typeof define && define . amd ? define ([ " exports " , " jquery " , " popper.js " ], e ) : e (( t = " undefined " != typeof globalThis ? globalThis : t || self ) . bootstrap = {}, t . jQuery , t . Popper )}( this ,( function ( t , e , n ){ " use strict " ; function i ( t ){ return t && " object " == typeof t && " default " in t ? t : { default : t }} var o = i ( e ), a = i ( n ); function s ( t , e ){ for ( var n = 0 ; n < e . length ; n ++ ){ var i = e [ n ]; i . enumerable = i . enumerable ||! 1 , i . configurable =! 0 , " value " in i && ( i . writable =! 0 ), Object . defineProperty ( t , i . key , i )}} function l ( t , e , n ){ return e && s ( t . prototype , e ), n && s ( t , n ), t } function r (){ return r = Object . assign || function ( t ){ for ( var e = 1 ; e < arguments . length ; e ++ ){ var n = arguments [ e ]; for ( var i in n ) Object . prototype . hasOwnProperty . call ( n , i ) && ( t [ i ] = n [ i ])} return t }, r . apply ( this , arguments )} function u ( t , e ){ return u = Object . setPrototypeOf || function ( t , e ){ return t . __proto__ = e , t }, u ( t , e )} var f = " transitionend " ; var d = { TRANSITION_END : " bsTransitionEnd " , getUID : function ( t ){ do { t +=~~ ( 1e6 * Math . random ())} while ( document . getElementById ( t )); return t }, getSelectorFromElement : function ( t ){ var e = t . getAttribute ( " data-target " ); if ( ! e || " # " === e ){ var n = t . getAttribute ( " href " ); e = n && " # " !== n ? n . trim () : " " } try { return document . querySelector ( e ) ? e : null } catch ( t ){ return null }}, getTransitionDurationFromElement : function ( t ){ if ( ! t ) return 0 ; var e = o . default ( t ) . css ( " transition-duration " ), n = o . default ( t ) . css ( " transition-delay " ), i = parseFloat ( e ), a = parseFloat ( n ); return i || a ? ( e = e . split ( " , " )[ 0 ], n = n . split ( " , " )[ 0 ], 1e3 * ( parseFloat ( e ) + parseFloat ( n ))) : 0 }, reflow : function ( t ){ return t . offsetHeight }, triggerTransitionEnd : function ( t ){ o . default ( t ) . trigger ( f )}, supportsTransitionEnd : function (){ return Boolean ( f )}, isElement : function ( t ){ return ( t [ 0 ] || t ) . nodeType }, typeCheckConfig : function ( t , e , n ){ for ( var i in n ) if ( Object . prototype . hasOwnProperty . call ( n , i )){ var o = n [ i ], a = e [ i ], s = a && d . isElement ( a ) ? " element " : null === ( l = a ) || " undefined " == typeof l ? " " + l : {} . toString . call ( l ) . match ( / \s ([ a - z ] + ) / i )[ 1 ] . toLowerCase (); if ( ! new RegExp ( o ) . test ( s )) throw new Error ( t . toUpperCase () + ': Option "' + i + '" provided type "' + s + '" but expected type "' + o + '".' )} var l }, findShadowRoot : function ( t ){ if ( ! document . documentElement . attachShadow ) return null ; if ( " function " == typeof t . getRootNode ){ var e = t . getRootNode (); return e instanceof ShadowRoot ? e : null } return t instanceof ShadowRoot ? t : t . parentNode ? d . findShadowRoot ( t . parentNode ) : null }, jQueryDetection : function (){ if ( " undefined " == typeof o . default ) throw new TypeError ( " Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript. " ); var t = o . default . fn . jquery . split ( " " )[ 0 ] . split ( " . " ); if ( t [ 0 ] < 2 && t [ 1 ] < 9 || 1 === t [ 0 ] && 9 === t [ 1 ] && t [ 2 ] < 1 || t [ 0 ] >= 4 ) throw new Error ( " Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0 " )}}; d . jQueryDetection (), o . default . fn . emulateTransitionEnd = function ( t ){ var e = this , n =! 1 ; return o . default ( this ) . one ( d . TRANSITION_END ,( function (){ n =! 0 })), setTimeout (( function (){ n || d . triggerTransitionEnd ( e )}), t ), this }, o . default . event . special [ d . TRANSITION_END ] = { bindType : f , delegateType : f , handle : function ( t ){ if ( o . default ( t . target ) . is ( this )) return t . handleObj . handler . apply ( this , arguments )}}; var c = " bs.alert " , h = o . default . fn . alert , g = function (){ function t ( t ){ this . _element = t } var e = t . prototype ; return e . close = function ( t ){ var e = this . _element ; t && ( e = this . _getRootElement ( t )), this . _triggerCloseEvent ( e ) . isDefaultPrevented () || this . _removeElement ( e )}, e . dispose = function (){ o . default . removeData ( this . _element , c ), this . _element = null }, e . _getRootElement = function ( t ){ var e = d . getSelectorFromElement ( t ), n =! 1 ; return e && ( n = document . querySelector ( e )), n || ( n = o . default ( t ) . closest ( " .alert " )[ 0 ]), n }, e . _triggerCloseEvent = function ( t ){ var e = o . default . Event ( " close.bs.alert " ); return o . default ( t ) . trigger ( e ), e }, e . _removeElement = function ( t ){ var e = this ; if ( o . default ( t ) . removeClass ( " show " ), o . default ( t ) . hasClass ( " fade " )){ var n = d . getTransitionDurationFromElement ( t ); o . default ( t ) . one ( d . TRANSITION_END ,( function ( n ){ return e . _destroyElement ( t , n )})) . emulateTransitionEnd ( n )} else this . _destroyElement ( t )}, e . _destroyElement = function ( t ){ o . default ( t ) . detach () . trigger ( " cl
//# sourceMappingURL=bootstrap.min.js.map
! function ( t ){ " function " == typeof define && define . amd ? define ([ " jquery " ], t ) : t ( " object " == typeof exports ? require ( " jquery " ) : jQuery )}( function ( t ){ function s ( s ){ var e =! 1 ; return t ( '[data-notify="container"]' ) . each ( function ( i , n ){ var a = t ( n ), o = a . find ( '[data-notify="title"]' ) . text () . trim (), r = a . find ( '[data-notify="message"]' ) . html () . trim (), l = o === t ( " <div> " + s . settings . content . title + " </div> " ) . html () . trim (), d = r === t ( " <div> " + s . settings . content . message + " </div> " ) . html () . trim (), g = a . hasClass ( " alert- " + s . settings . type ); return l && d && g && ( e =! 0 ), ! e }), e } function e ( e , n , a ){ var o = { content : { message : " object " == typeof n ? n . message : n , title : n . title ? n . title : " " , icon : n . icon ? n . icon : " " , url : n . url ? n . url : " # " , target : n . target ? n . target : " - " }}; a = t . extend ( ! 0 ,{}, o , a ), this . settings = t . extend ( ! 0 ,{}, i , a ), this . _defaults = i , " - " === this . settings . content . target && ( this . settings . content . target = this . settings . url_target ), this . animations = { start : " webkitAnimationStart oanimationstart MSAnimationStart animationstart " , end : " webkitAnimationEnd oanimationend MSAnimationEnd animationend " }, " number " == typeof this . settings . offset && ( this . settings . offset = { x : this . settings . offset , y : this . settings . offset }),( this . settings . allow_duplicates ||! this . settings . allow_duplicates &&! s ( this )) && this . init ()} var i = { element : " body " , position : null , type : " info " , allow_dismiss :! 0 , allow_duplicates :! 0 , newest_on_top :! 1 , showProgressbar :! 1 , placement : { from : " top " , align : " right " }, offset : 20 , spacing : 10 , z_index : 1031 , delay : 5e3 , timer : 1e3 , url_target : " _blank " , mouse_over : null , animate : { enter : " animated fadeInDown " , exit : " animated fadeOutUp " }, onShow : null , onShown : null , onClose : null , onClosed : null , icon_type : " class " , template : '<div data-notify="container" class="col-xs-11 col-sm-4 alert alert-{0}" role="alert"><button type="button" aria-hidden="true" class="close" data-notify="dismiss">×</button><span data-notify="icon"></span> <span data-notify="title">{1}</span> <span data-notify="message">{2}</span><div class="progress" data-notify="progressbar"><div class="progress-bar progress-bar-{0}" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div></div><a href="{3}" target="{4}" data-notify="url"></a></div>' }; String . format = function (){ for ( var t = arguments [ 0 ], s = 1 ; s < arguments . length ; s ++ ) t = t . replace ( RegExp ( " \\ { " + ( s - 1 ) + " \\ } " , " gm " ), arguments [ s ]); return t }, t . extend ( e . prototype ,{ init : function (){ var t = this ; this . buildNotify (), this . settings . content . icon && this . setIcon (), " # " != this . settings . content . url && this . styleURL (), this . styleDismiss (), this . placement (), this . bind (), this . notify = { $ele : this . $ele , update : function ( s , e ){ var i = {}; " string " == typeof s ? i [ s ] = e : i = s ; for ( var n in i ) switch ( n ){ case " type " : this . $ele . removeClass ( " alert- " + t . settings . type ), this . $ele . find ( '[data-notify="progressbar"] > .progress-bar' ) . removeClass ( " progress-bar- " + t . settings . type ), t . settings . type = i [ n ], this . $ele . addClass ( " alert- " + i [ n ]) . find ( '[data-notify="progressbar"] > .progress-bar' ) . addClass ( " progress-bar- " + i [ n ]); break ; case " icon " : var a = this . $ele . find ( '[data-notify="icon"]' ); " class " === t . settings . icon_type . toLowerCase () ? a . removeClass ( t . settings . content . icon ) . addClass ( i [ n ]) : ( a . is ( " img " ) || a . find ( " img " ), a . attr ( " src " , i [ n ])); break ; case " progress " : var o = t . settings . delay - t . settings . delay * ( i [ n ] / 100 ); this . $ele . data ( " notify-delay " , o ), this . $ele . find ( '[data-notify="progressbar"] > div' ) . attr ( " aria-valuenow " , i [ n ]) . css ( " width " , i [ n ] + " % " ); break ; case " url " : this . $ele . find ( '[data-notify="url"]' ) . attr ( " href " , i [ n ]); break ; case " target " : this . $ele . find ( '[data-notify="url"]' ) . attr ( " target " , i [ n ]); break ; default : this . $ele . find ( '[data-notify="' + n + '"]' ) . html ( i [ n ])} var r = this . $ele . outerHeight () + parseInt ( t . settings . spacing ) + parseInt ( t . settings . offset . y ); t . reposition ( r )}, close : function (){ t . close ()}}}, buildNotify : function (){ var s = this . settings . content ; this . $ele = t ( String . format ( this . settings . template , this . settings . type , s . title , s . message , s . url , s . target )), this . $ele . attr ( " data-notify-position " , this . settings . placement . from + " - " + this . settings . placement . align ), this . settings . allow_dismiss || this . $ele . find ( '[data-notify="dismiss"]' ) . css ( " display " , " none " ),( this . settings . delay <= 0 &&! this . settings . showProgressbar |
! function ( a , b , c , d ){ " use strict " ; var e = " treeview " , f = {}; f . settings = { injectStyle :! 0 , levels : 2 , expandIcon : " glyphicon glyphicon-plus " , collapseIcon : " glyphicon glyphicon-minus " , loadingIcon : " glyphicon glyphicon-hourglass " , emptyIcon : " glyphicon " , nodeIcon : " " , selectedIcon : " " , checkedIcon : " glyphicon glyphicon-check " , partiallyCheckedIcon : " glyphicon glyphicon-expand " , uncheckedIcon : " glyphicon glyphicon-unchecked " , tagsClass : " badge " , color : d , backColor : d , borderColor : d , changedNodeColor : " #39A5DC " , onhoverColor : " #F5F5F5 " , selectedColor : " #FFFFFF " , selectedBackColor : " #428bca " , searchResultColor : " #D9534F " , searchResultBackColor : d , highlightSelected :! 0 , highlightSearchResults :! 0 , showBorder :! 0 , showIcon :! 0 , showImage :! 1 , showCheckbox :! 1 , checkboxFirst :! 1 , highlightChanges :! 1 , showTags :! 1 , multiSelect :! 1 , preventUnselect :! 1 , allowReselect :! 1 , hierarchicalCheck :! 1 , propagateCheckEvent :! 1 , wrapNodeText :! 1 , onLoading : d , onLoadingFailed : d , onInitialized : d , onNodeRendered : d , onRendered : d , onDestroyed : d , onNodeChecked : d , onNodeCollapsed : d , onNodeDisabled : d , onNodeEnabled : d , onNodeExpanded : d , onNodeSelected : d , onNodeUnchecked : d , onNodeUnselected : d , onSearchComplete : d , onSearchCleared : d }, f . options = { silent :! 1 , ignoreChildren :! 1 }, f . searchOptions = { ignoreCase :! 0 , exactMatch :! 1 , revealResults :! 0 }, f . dataUrl = { method : " GET " , dataType : " json " , cache :! 1 }; var g = function ( b , c ){ return this . $element = a ( b ), this . _elementId = b . id , this . _styleId = this . _elementId + " -style " , this . _init ( c ),{ options : this . _options , init : a . proxy ( this . _init , this ), remove : a . proxy ( this . _remove , this ), findNodes : a . proxy ( this . findNodes , this ), getNodes : a . proxy ( this . getNodes , this ), getParents : a . proxy ( this . getParents , this ), getSiblings : a . proxy ( this . getSiblings , this ), getSelected : a . proxy ( this . getSelected , this ), getUnselected : a . proxy ( this . getUnselected , this ), getExpanded : a . proxy ( this . getExpanded , this ), getCollapsed : a . proxy ( this . getCollapsed , this ), getChecked : a . proxy ( this . getChecked , this ), getUnchecked : a . proxy ( this . getUnchecked , this ), getDisabled : a . proxy ( this . getDisabled , this ), getEnabled : a . proxy ( this . getEnabled , this ), addNode : a . proxy ( this . addNode , this ), addNodeAfter : a . proxy ( this . addNodeAfter , this ), addNodeBefore : a . proxy ( this . addNodeBefore , this ), removeNode : a . proxy ( this . removeNode , this ), updateNode : a . proxy ( this . updateNode , this ), selectNode : a . proxy ( this . selectNode , this ), unselectNode : a . proxy ( this . unselectNode , this ), toggleNodeSelected : a . proxy ( this . toggleNodeSelected , this ), collapseAll : a . proxy ( this . collapseAll , this ), collapseNode : a . proxy ( this . collapseNode , this ), expandAll : a . proxy ( this . expandAll , this ), expandNode : a . proxy ( this . expandNode , this ), toggleNodeExpanded : a . proxy ( this . toggleNodeExpanded , this ), revealNode : a . proxy ( this . revealNode , this ), checkAll : a . proxy ( this . checkAll , this ), checkNode : a . proxy ( this . checkNode , this ), uncheckAll : a . proxy ( this . uncheckAll , this ), uncheckNode : a . proxy ( this . uncheckNode , this ), toggleNodeChecked : a . proxy ( this . toggleNodeChecked , this ), unmarkCheckboxChanges : a . proxy ( this . unmarkCheckboxChanges , this ), disableAll : a . proxy ( this . disableAll , this ), disableNode : a . proxy ( this . disableNode , this ), enableAll : a . proxy ( this . enableAll , this ), enableNode : a . proxy ( this . enableNode , this ), toggleNodeDisabled : a . proxy ( this . toggleNodeDisabled , this ), search : a . proxy ( this . search , this ), clearSearch : a . proxy ( this . clearSearch , this )}}; g . prototype . _init = function ( b ){ this . _tree = [], this . _initialized =! 1 , this . _options = a . extend ({}, f . settings , b ), this . _template . icon . empty . addClass ( this . _options . emptyIcon ), this . _destroy (), this . _subscribeEvents (), this . _triggerEvent ( " loading " , null , f . options ), this . _load ( b ) . then ( a . proxy ( function ( b ){ return this . _tree = a . extend ( ! 0 ,[], b )}, this ), a . proxy ( function ( a ){ this . _triggerEvent ( " loadingFailed " , a , f . options )}, this )) . then ( a . proxy ( function ( a ){ return this . _setInitialStates ({ nodes : a }, 0 )}, this )) . then ( a . proxy ( function (){ this . _render ()}, this ))}, g . prototype . _load = function ( b ){ var c = new a . Deferred ; return b . data ? this . _loadLocalData ( b , c ) : b . dataUrl && this . _loadRemoteData ( b , c ), c . promise ()}, g . prototype . _loadRemoteData = function ( b , c ){ a . ajax ( a . extend ( ! 0 ,{}, f . dataUrl , b . dataUrl )) . done ( function ( a ){ c . resolve ( a )}) . fail ( function ( a , b , d ){ c . reject ( d )})}, g . prototype . _loadLocalData = function ( b , c ){ c . resolve ( " string " == typeof b . dat
/*
2021-08-28 16:55:52 +02:00
* This combined file was created by the DataTables downloader builder :
* https :// datatables . net / download
*
* To rebuild or modify this file with the latest versions of the included
* software please visit :
2022-12-17 22:20:11 +01:00
* https :// datatables . net / download / #bs4/dt-1.11.3/r-2.2.9
2021-08-28 16:55:52 +02:00
*
* Included libraries :
2022-12-17 22:20:11 +01:00
* DataTables 1.11 . 3 , Responsive 2.2 . 9
2021-08-28 16:55:52 +02:00
*/
2022-12-17 22:20:11 +01:00
/*!
Copyright 2008 - 2021 SpryMedia Ltd .
This source file is free software , available under the following license :
MIT license - http :// datatables . net / license
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
This source file is distributed in the hope that it will be useful , but
WITHOUT ANY WARRANTY ; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE . See the license files for details .
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
For details please refer to : http :// www . datatables . net
DataTables 1.11 . 3
©2008 - 2021 SpryMedia Ltd - datatables . net / license
2021-08-28 16:55:52 +02:00
*/
2022-12-17 22:20:11 +01:00
var $jscomp = $jscomp || {}; $jscomp . scope = {}; $jscomp . findInternal = function ( l , z , A ){ l instanceof String && ( l = String ( l )); for ( var q = l . length , E = 0 ; E < q ; E ++ ){ var P = l [ E ]; if ( z . call ( A , P , E , l )) return { i : E , v : P }} return { i :- 1 , v : void 0 }}; $jscomp . ASSUME_ES5 =! 1 ; $jscomp . ASSUME_NO_NATIVE_MAP =! 1 ; $jscomp . ASSUME_NO_NATIVE_SET =! 1 ; $jscomp . SIMPLE_FROUND_POLYFILL =! 1 ; $jscomp . ISOLATE_POLYFILLS =! 1 ;
$jscomp . defineProperty = $jscomp . ASSUME_ES5 || " function " == typeof Object . defineProperties ? Object . defineProperty : function ( l , z , A ){ if ( l == Array . prototype || l == Object . prototype ) return l ; l [ z ] = A . value ; return l }; $jscomp . getGlobal = function ( l ){ l = [ " object " == typeof globalThis && globalThis , l , " object " == typeof window && window , " object " == typeof self && self , " object " == typeof global && global ]; for ( var z = 0 ; z < l . length ; ++ z ){ var A = l [ z ]; if ( A && A . Math == Math ) return A } throw Error ( " Cannot find global object " );}; $jscomp . global = $jscomp . getGlobal ( this );
$jscomp . IS_SYMBOL_NATIVE = " function " === typeof Symbol && " symbol " === typeof Symbol ( " x " ); $jscomp . TRUST_ES6_POLYFILLS =! $jscomp . ISOLATE_POLYFILLS || $jscomp . IS_SYMBOL_NATIVE ; $jscomp . polyfills = {}; $jscomp . propertyToPolyfillSymbol = {}; $jscomp . POLYFILL_PREFIX = " $jscp $ " ; var $jscomp $lookupPolyfilledValue = function ( l , z ){ var A = $jscomp . propertyToPolyfillSymbol [ z ]; if ( null == A ) return l [ z ]; A = l [ A ]; return void 0 !== A ? A : l [ z ]};
$jscomp . polyfill = function ( l , z , A , q ){ z && ( $jscomp . ISOLATE_POLYFILLS ? $jscomp . polyfillIsolated ( l , z , A , q ) : $jscomp . polyfillUnisolated ( l , z , A , q ))}; $jscomp . polyfillUnisolated = function ( l , z , A , q ){ A = $jscomp . global ; l = l . split ( " . " ); for ( q = 0 ; q < l . length - 1 ; q ++ ){ var E = l [ q ]; if ( ! ( E in A )) return ; A = A [ E ]} l = l [ l . length - 1 ]; q = A [ l ]; z = z ( q ); z != q && null != z && $jscomp . defineProperty ( A , l ,{ configurable :! 0 , writable :! 0 , value : z })};
$jscomp . polyfillIsolated = function ( l , z , A , q ){ var E = l . split ( " . " ); l = 1 === E . length ; q = E [ 0 ]; q =! l && q in $jscomp . polyfills ? $jscomp . polyfills : $jscomp . global ; for ( var P = 0 ; P < E . length - 1 ; P ++ ){ var ma = E [ P ]; if ( ! ( ma in q )) return ; q = q [ ma ]} E = E [ E . length - 1 ]; A = $jscomp . IS_SYMBOL_NATIVE && " es6 " === A ? q [ E ] : null ; z = z ( A ); null != z && ( l ? $jscomp . defineProperty ( $jscomp . polyfills , E ,{ configurable :! 0 , writable :! 0 , value : z }) : z !== A && ( $jscomp . propertyToPolyfillSymbol [ E ] = $jscomp . IS_SYMBOL_NATIVE ? $jscomp . global . Symbol ( E ) : $jscomp . POLYFILL_PREFIX + E ,
E = $jscomp . propertyToPolyfillSymbol [ E ], $jscomp . defineProperty ( q , E ,{ configurable :! 0 , writable :! 0 , value : z })))}; $jscomp . polyfill ( " Array.prototype.find " , function ( l ){ return l ? l : function ( z , A ){ return $jscomp . findInternal ( this , z , A ) . v }}, " es6 " , " es3 " );
( function ( l ){ " function " === typeof define && define . amd ? define ([ " jquery " ], function ( z ){ return l ( z , window , document )}) : " object " === typeof exports ? module . exports = function ( z , A ){ z || ( z = window ); A || ( A = " undefined " !== typeof window ? require ( " jquery " ) : require ( " jquery " )( z )); return l ( A , z , z . document )} : window . DataTable = l ( jQuery , window , document )})( function ( l , z , A , q ){ function E ( a ){ var b , c , d = {}; l . each ( a , function ( e , h ){( 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 ] && E ( a [ e ]))}); a . _hungarianMap = d } function P ( a , b , c ){ a . _hungarianMap || E ( a ); var d ; l . each ( b , function ( e , h ){ d = a . _hungarianMap [ e ]; d === q ||! c && b [ d ] !== q || ( " o " === d . charAt ( 0 ) ? ( b [ d ] || ( b [ d ] = {}), l . extend ( ! 0 , b [ d ], b [ e ]), P ( a [ d ], b [ d ], c )) : b [ d ] = b [ e ])})} function ma ( a ){ var b = u . defaults . oLanguage , c = b . sDecimal ; c && Wa ( c ); if ( a ){ var d = a . sZeroRecords ; ! a . sEmptyTable && d && " No data available in table " === b . sEmptyTable && X ( a , a , " sZeroRecords " , " sEmptyTable " ); ! a . sLoadingRecords && d && " Loading... " === b . sLoadingRecords &&
X ( a , a , " sZeroRecords " , " sLoadingRecords " ); a . sInfoThousands && ( a . sThousands = a . sInfoThousands );( a = a . sDecimal ) && c !== a && Wa ( a )}} function zb ( a ){ S ( a , " ordering " , " bSort " ); S ( a , " orderMulti " , " bSortMulti " ); S ( a , " orderClasses " , " bSortClasses " ); S ( a , " orderCellsTop " , " bSortCellsTop " ); S ( a , " order " , " aaSorting " ); S ( a , " orderFixed " , " aaSortingFixed " ); S ( a , " paging " , " bPaginate " ); S ( a , " pagingType " , " sPaginationType " ); S ( a , " pageLength " , " iDisplayLength " ); S ( 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 ] && P ( u . models . oSearch , a [ b ])} function Ab ( a ){ S ( a , " orderable " , " bSortable " ); S ( a , " orderData " , " aDataSort " ); S ( a , " orderSequence " , " asSorting " ); S ( a , " orderDataType " , " sortDataType " ); var b = a . aDataSort ; " number " !== typeof b || Array . isArray ( b ) || ( a . aDataSort = [ b ])} function Bb ( a ){ if ( ! u . __browser ){ var b = {}; u . __browser = b ; var c = l ( " <div/> " ) . css ({ position : " fixed " , top : 0 , left :- 1 * l ( z ) . scrollLeft (), height : 1 ,
width : 1 , overflow : " hidden " }) . append ( l ( " <div/> " ) . css ({ position : " absolute " , top : 1 , left : 1 , width : 100 , overflow : " scroll " }) . append ( l ( " <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 ()} l . extend ( a . oBrowser , u . __browser ); a . oScroll . iBarWidth = u . __browser . barWidth }
function Cb ( a , b , c , d , e , h ){ var f =! 1 ; if ( c !== q ){ var g = c ; f =! 0 } for (; d !== e ;) a . hasOwnProperty ( d ) && ( g = f ? b ( g , a [ d ], d , a ) : a [ d ], f =! 0 , d += h ); return g } function Xa ( a , b ){ var c = u . defaults . column , d = a . aoColumns . length ; c = l . extend ({}, u . models . oColumn , c ,{ nTh : b ? b : A . 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 ] = l . extend ({}, u . models . oSearch , c [ d ]); Ga ( a , d , l ( b ) . data ())} function Ga ( a , b , c ){ b = a . aoColumns [ b ];
var d = a . oClasses , e = l ( b . nTh ); if ( ! b . sWidthOrig ){ b . sWidthOrig = e . attr ( " width " ) || null ; var h = ( e . attr ( " style " ) || " " ) . match ( / width : \s * ( \d + [ pxem % ] + ) / ); h && ( b . sWidthOrig = h [ 1 ])} c !== q && null !== c && ( Ab ( c ), P ( u . defaults . column , c , ! 0 ), c . mDataProp === q || 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 ), l . extend ( b , c ), X ( b , c , " sWidth " , " sWidthOrig " ), c . iDataSort !== q && ( b . aDataSort = [ c . iDataSort ]), X ( b , c , " aDataSort " )); var f = b . mData , g = na ( f ),
k = b . mRender ? na ( b . mRender ) : null ; c = function ( m ){ return " string " === typeof m &&- 1 !== m . indexOf ( " @ " )}; b . _bAttrSrc = l . isPlainObject ( f ) && ( c ( f . sort ) || c ( f . type ) || c ( f . filter )); b . _setter = null ; b . fnGetData = function ( m , n , p ){ var t = g ( m , n , q , p ); return k && n ? k ( t , n , m , p ) : t }; b . fnSetData = function ( m , n , p ){ return ha ( f )( m , n , p )}; " number " !== typeof f && ( a . _rowReadObject =! 0 ); a . oFeatures . bSort || ( b . bSortable =! 1 , e . addClass ( d . sSortableNone )); a =- 1 !== l . inArray ( " asc " , b . asSorting ); c =- 1 !== l . inArray ( " desc " , b . asSorting ); b . bSortable && ( a || c ) ? 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 ) : ( b . sSortingClass = d . sSortableNone , b . sSortingClassJUI = " " )} function ta ( a ){ if ( ! 1 !== a . oFeatures . bAutoWidth ){ var b = a . aoColumns ; Ya ( 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 || Ha ( a ); F ( a , null , " column-sizing " ,[ a ])} function ua ( a , b ){ a = Ia ( a , " bVisible " );
return " number " === typeof a [ b ] ? a [ b ] : null } function va ( a , b ){ a = Ia ( a , " bVisible " ); b = l . inArray ( b , a ); return - 1 !== b ? b : null } function oa ( a ){ var b = 0 ; l . each ( a . aoColumns , function ( c , d ){ d . bVisible && " none " !== l ( d . nTh ) . css ( " display " ) && b ++ }); return b } function Ia ( a , b ){ var c = []; l . map ( a . aoColumns , function ( d , e ){ d [ b ] && c . push ( e )}); return c } function Za ( a ){ var b = a . aoColumns , c = a . aoData , d = u . ext . type . detect , e , h , f ; var g = 0 ; for ( e = b . length ; g < e ; g ++ ){ var k = b [ g ]; var m = []; if ( ! k . sType && k . _sManualType ) k . sType = k . _sManualType ; else if ( ! k . sType ){ var n =
0 ; for ( h = d . length ; n < h ; n ++ ){ var p = 0 ; for ( f = c . length ; p < f ; p ++ ){ m [ p ] === q && ( m [ p ] = T ( a , p , g , " type " )); var t = d [ n ]( m [ p ], a ); if ( ! t && n !== d . length - 1 ) break ; if ( " html " === t &&! Z ( m [ p ])) break } if ( t ){ k . sType = t ; break }} k . sType || ( k . sType = " string " )}}} function Db ( a , b , c , d ){ var e , h , f , g = a . aoColumns ; if ( b ) for ( e = b . length - 1 ; 0 <= e ; e -- ){ var k = b [ e ]; var m = k . targets !== q ? k . targets : k . aTargets ; Array . isArray ( m ) || ( m = [ m ]); var n = 0 ; for ( h = m . length ; n < h ; n ++ ) if ( " number " === typeof m [ n ] && 0 <= m [ n ]){ for (; g . length <= m [ n ];) Xa ( a ); d ( m [ n ], k )} else if ( " number " === typeof m [ n ] &&
0 > m [ n ]) d ( g . length + m [ n ], k ); else if ( " string " === typeof m [ n ]){ var p = 0 ; for ( f = g . length ; p < f ; p ++ )( " _all " == m [ n ] || l ( g [ p ] . nTh ) . hasClass ( m [ n ])) && d ( p , k )}} if ( c ) for ( e = 0 , a = c . length ; e < a ; e ++ ) d ( e , c [ e ])} function ia ( a , b , c , d ){ var e = a . aoData . length , h = l . extend ( ! 0 ,{}, u . models . oRow ,{ src : c ? " dom " : " data " , idx : e }); h . _aData = b ; a . aoData . push ( h ); for ( var f = a . aoColumns , g = 0 , k = f . length ; g < k ; g ++ ) f [ g ] . sType = null ; a . aiDisplayMaster . push ( e ); b = a . rowIdFn ( b ); b !== q && ( a . aIds [ b ] = h ); ! c && a . oFeatures . bDeferRender || $a ( a , e , c , d ); return e } function Ja ( a ,
b ){ var c ; b instanceof l || ( b = l ( b )); return b . map ( function ( d , e ){ c = ab ( a , e ); return ia ( a , c . data , e , c . cells )})} function T ( a , b , c , d ){ " search " === d ? d = " filter " : " order " === d && ( d = " sort " ); var e = a . iDraw , h = a . aoColumns [ c ], f = a . aoData [ b ] . _aData , g = h . sDefaultContent , k = h . fnGetData ( f , d ,{ settings : a , row : b , col : c }); if ( k === q ) return a . iDrawError != e && null === g && ( da ( a , 0 , " Requested unknown parameter " + ( " function " == typeof h . mData ? " { function} " : " ' " + h . mData + " ' " ) + " for row " + b + " , column " + c , 4 ), a . iDrawError = e ), g ; if (( k === f || null === k ) && null !==
g && d !== q ) k = g ; else if ( " function " === typeof k ) return k . call ( f ); if ( null === k && " display " === d ) return " " ; " filter " === d && ( a = u . ext . type . search , a [ h . sType ] && ( k = a [ h . sType ]( k ))); return k } function Eb ( a , b , c , d ){ a . aoColumns [ c ] . fnSetData ( a . aoData [ b ] . _aData , d ,{ settings : a , row : b , col : c })} function bb ( a ){ return l . map ( a . match ( / ( \\ .| [ ^ \ . ]) +/ g ) || [ " " ], function ( b ){ return b . replace ( / \\\ ./ g , " . " )})} function cb ( a ){ return U ( a . aoData , " _aData " )} function Ka ( a ){ a . aoData . length = 0 ; a . aiDisplayMaster . length = 0 ; a . aiDisplay . length = 0 ; a . aIds = {}}
function La ( a , b , c ){ for ( var d =- 1 , e = 0 , h = a . length ; e < h ; e ++ ) a [ e ] == b ? d = e : a [ e ] > b && a [ e ] -- ; - 1 != d && c === q && a . splice ( d , 1 )} function wa ( a , b , c , d ){ var e = a . aoData [ b ], h , f = function ( k , m ){ for (; k . childNodes . length ;) k . removeChild ( k . firstChild ); k . innerHTML = T ( a , b , m , " display " )}; if ( " dom " !== c && ( c && " auto " !== c || " dom " !== e . src )){ var g = e . anCells ; if ( g ) if ( d !== q ) f ( g [ d ], d ); else for ( c = 0 , h = g . length ; c < h ; c ++ ) f ( g [ c ], c )} else e . _aData = ab ( a , e , d , d === q ? q : e . _aData ) . data ; e . _aSortData = null ; e . _aFilterData = null ; f = a . aoColumns ; if ( d !== q ) f [ d ] . sType = null ;
else { c = 0 ; for ( h = f . length ; c < h ; c ++ ) f [ c ] . sType = null ; db ( a , e )}} function ab ( a , b , c , d ){ var e = [], h = b . firstChild , f , g = 0 , k , m = a . aoColumns , n = a . _rowReadObject ; d = d !== q ? d : n ? {} : []; var p = function ( x , w ){ if ( " string " === typeof x ){ var r = x . indexOf ( " @ " ); - 1 !== r && ( r = x . substring ( r + 1 ), ha ( x )( d , w . getAttribute ( r )))}}, t = function ( x ){ if ( c === q || c === g ) f = m [ g ], k = x . innerHTML . trim (), f && f . _bAttrSrc ? ( ha ( f . mData . _ )( d , k ), p ( f . mData . sort , x ), p ( f . mData . type , x ), p ( f . mData . filter , x )) : n ? ( f . _setter || ( f . _setter = ha ( f . mData )), f . _setter ( d , k )) : d [ g ] = k ; g ++ }; if ( h ) for (; h ;){ var v =
h . nodeName . toUpperCase (); if ( " TD " == v || " TH " == v ) t ( h ), e . push ( h ); h = h . nextSibling } else for ( e = b . anCells , h = 0 , v = e . length ; h < v ; h ++ ) t ( e [ h ]);( b = b . firstChild ? b : b . nTr ) && ( b = b . getAttribute ( " id " )) && ha ( a . rowId )( d , b ); return { data : d , cells : e }} function $a ( a , b , c , d ){ var e = a . aoData [ b ], h = e . _aData , f = [], g , k ; if ( null === e . nTr ){ var m = c || A . createElement ( " tr " ); e . nTr = m ; e . anCells = f ; m . _DT_RowIndex = b ; db ( a , e ); var n = 0 ; for ( g = a . aoColumns . length ; n < g ; n ++ ){ var p = a . aoColumns [ n ]; e = ( k = c ? ! 1 :! 0 ) ? A . createElement ( p . sCellType ) : d [ n ]; e . _DT_CellIndex = { row : b ,
column : n }; f . push ( e ); if ( k ||! ( ! p . mRender && p . mData === n || l . isPlainObject ( p . mData ) && p . mData . _ === n + " .display " )) e . innerHTML = T ( a , b , n , " display " ); p . sClass && ( e . className += " " + p . sClass ); p . bVisible &&! c ? m . appendChild ( e ) :! p . bVisible && c && e . parentNode . removeChild ( e ); p . fnCreatedCell && p . fnCreatedCell . call ( a . oInstance , e , T ( a , b , n ), h , b , n )} F ( a , " aoRowCreatedCallback " , null ,[ m , h , b , f ])}} function db ( a , b ){ var c = b . nTr , d = b . _aData ; if ( c ){ if ( a = a . rowIdFn ( d )) c . id = a ; d . DT_RowClass && ( a = d . DT_RowClass . split ( " " ), b . __rowc = b . __rowc ? Ma ( b . __rowc . concat ( a )) :
a , l ( c ) . removeClass ( b . __rowc . join ( " " )) . addClass ( d . DT_RowClass )); d . DT_RowAttr && l ( c ) . attr ( d . DT_RowAttr ); d . DT_RowData && l ( c ) . data ( d . DT_RowData )}} function Fb ( a ){ var b , c , d = a . nTHead , e = a . nTFoot , h = 0 === l ( " th, td " , d ) . length , f = a . oClasses , g = a . aoColumns ; h && ( c = l ( " <tr/> " ) . appendTo ( d )); var k = 0 ; for ( b = g . length ; k < b ; k ++ ){ var m = g [ k ]; var n = l ( m . nTh ) . addClass ( m . sClass ); h && n . appendTo ( c ); a . oFeatures . bSort && ( n . addClass ( m . sSortingClass ), ! 1 !== m . bSortable && ( n . attr ( " tabindex " , a . iTabIndex ) . attr ( " aria-controls " , a . sTableId ), eb ( a , m . nTh ,
k ))); m . sTitle != n [ 0 ] . innerHTML && n . html ( m . sTitle ); fb ( a , " header " )( a , n , m , f )} h && xa ( a . aoHeader , d ); l ( d ) . children ( " tr " ) . children ( " th, td " ) . addClass ( f . sHeaderTH ); l ( e ) . children ( " tr " ) . children ( " th, td " ) . addClass ( f . sFooterTH ); if ( null !== e ) for ( a = a . aoFooter [ 0 ], k = 0 , b = a . length ; k < b ; k ++ ) m = g [ k ], m . nTf = a [ k ] . cell , m . sClass && l ( m . nTf ) . addClass ( m . sClass )} function ya ( a , b , c ){ var d , e , h = [], f = [], g = a . aoColumns . length ; if ( b ){ c === q && ( c =! 1 ); var k = 0 ; for ( d = b . length ; k < d ; k ++ ){ h [ k ] = b [ k ] . slice (); h [ k ] . nTr = b [ k ] . nTr ; for ( e = g - 1 ; 0 <= e ; e -- ) a . aoColumns [ e ] . bVisible ||
c || h [ k ] . splice ( e , 1 ); f . push ([])} k = 0 ; for ( d = h . length ; k < d ; k ++ ){ if ( a = h [ k ] . nTr ) for (; e = a . firstChild ;) a . removeChild ( e ); e = 0 ; for ( b = h [ k ] . length ; e < b ; e ++ ){ var m = g = 1 ; if ( f [ k ][ e ] === q ){ a . appendChild ( h [ k ][ e ] . cell ); for ( f [ k ][ e ] = 1 ; h [ k + g ] !== q && h [ k ][ e ] . cell == h [ k + g ][ e ] . cell ;) f [ k + g ][ e ] = 1 , g ++ ; for (; h [ k ][ e + m ] !== q && h [ k ][ e ] . cell == h [ k ][ e + m ] . cell ;){ for ( c = 0 ; c < g ; c ++ ) f [ k + c ][ e + m ] = 1 ; m ++ } l ( h [ k ][ e ] . cell ) . attr ( " rowspan " , g ) . attr ( " colspan " , m )}}}}} function ja ( a , b ){ var c = F ( a , " aoPreDrawCallback " , " preDraw " ,[ a ]); if ( - 1 !== l . inArray ( ! 1 , c )) V ( a , ! 1 );
else { c = []; var d = 0 , e = a . asStripeClasses , h = e . length , f = a . oLanguage , g = a . iInitDisplayStart , k = " ssp " == Q ( a ), m = a . aiDisplay ; a . bDrawing =! 0 ; g !== q &&- 1 !== g && ( a . _iDisplayStart = k ? g : g >= a . fnRecordsDisplay () ? 0 : g , a . iInitDisplayStart =- 1 ); g = a . _iDisplayStart ; var n = a . fnDisplayEnd (); if ( a . bDeferLoading ) a . bDeferLoading =! 1 , a . iDraw ++ , V ( a , ! 1 ); else if ( ! k ) a . iDraw ++ ; else if ( ! a . bDestroying &&! b ){ Gb ( a ); return } if ( 0 !== m . length ) for ( b = k ? a . aoData . length : n , f = k ? 0 : g ; f < b ; f ++ ){ k = m [ f ]; var p = a . aoData [ k ]; null === p . nTr && $a ( a , k ); var t = p . nTr ; if ( 0 !==
h ){ var v = e [ d % h ]; p . _sRowStripe != v && ( l ( t ) . removeClass ( p . _sRowStripe ) . addClass ( v ), p . _sRowStripe = v )} F ( a , " aoRowCallback " , null ,[ t , p . _aData , d , f , k ]); c . push ( t ); d ++ } else d = f . sZeroRecords , 1 == a . iDraw && " ajax " == Q ( a ) ? d = f . sLoadingRecords : f . sEmptyTable && 0 === a . fnRecordsTotal () && ( d = f . sEmptyTable ), c [ 0 ] = l ( " <tr/> " ,{ " class " : h ? e [ 0 ] : " " }) . append ( l ( " <td /> " ,{ valign : " top " , colSpan : oa ( a ), " class " : a . oClasses . sRowEmpty }) . html ( d ))[ 0 ]; F ( a , " aoHeaderCallback " , " header " ,[ l ( a . nTHead ) . children ( " tr " )[ 0 ], cb ( a ), g , n , m ]); F ( a , " aoFooterCallback " ,
" footer " ,[ l ( a . nTFoot ) . children ( " tr " )[ 0 ], cb ( a ), g , n , m ]); e = l ( a . nTBody ); e . children () . detach (); e . append ( l ( c )); F ( a , " aoDrawCallback " , " draw " ,[ a ]); a . bSorted =! 1 ; a . bFiltered =! 1 ; a . bDrawing =! 1 }} function ka ( a , b ){ var c = a . oFeatures , d = c . bFilter ; c . bSort && Hb ( a ); d ? za ( a , a . oPreviousSearch ) : a . aiDisplay = a . aiDisplayMaster . slice (); ! 0 !== b && ( a . _iDisplayStart = 0 ); a . _drawHold = b ; ja ( a ); a . _drawHold =! 1 } function Ib ( a ){ var b = a . oClasses , c = l ( a . nTable ); c = l ( " <div/> " ) . insertBefore ( c ); var d = a . oFeatures , e = l ( " <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 h = a . sDom . split ( " " ), f , g , k , m , n , p , t = 0 ; t < h . length ; t ++ ){ f = null ; g = h [ t ]; if ( " < " == g ){ k = l ( " <div/> " )[ 0 ]; m = h [ t + 1 ]; if ( " ' " == m || '"' == m ){ n = " " ; for ( p = 2 ; h [ t + p ] != m ;) n += h [ t + p ], p ++ ; " H " == n ? n = b . sJUIHeader : " F " == n && ( n = b . sJUIFooter ); - 1 != n . indexOf ( " . " ) ? ( m = n . split ( " . " ), k . id = m [ 0 ] . substr ( 1 , m [ 0 ] . length - 1 ), k . className = m [ 1 ]) : " # " == n . charAt ( 0 ) ? k . id = n . substr ( 1 , n . length - 1 ) : k . className = n ; t += p } e . append ( k );
e = l ( k )} else if ( " > " == g ) e = e . parent (); else if ( " l " == g && d . bPaginate && d . bLengthChange ) f = Jb ( a ); else if ( " f " == g && d . bFilter ) f = Kb ( a ); else if ( " r " == g && d . bProcessing ) f = Lb ( a ); else if ( " t " == g ) f = Mb ( a ); else if ( " i " == g && d . bInfo ) f = Nb ( a ); else if ( " p " == g && d . bPaginate ) f = Ob ( a ); else if ( 0 !== u . ext . feature . length ) for ( k = u . ext . feature , p = 0 , m = k . length ; p < m ; p ++ ) if ( g == k [ p ] . cFeature ){ f = k [ p ] . fnInit ( a ); break } f && ( k = a . aanFeatures , k [ g ] || ( k [ g ] = []), k [ g ] . push ( f ), e . append ( f ))} c . replaceWith ( e ); a . nHolding = null } function xa ( a , b ){ b = l ( b ) . children ( " tr " );
var c , d , e ; a . splice ( 0 , a . length ); var h = 0 ; for ( e = b . length ; h < e ; h ++ ) a . push ([]); h = 0 ; for ( e = b . length ; h < e ; h ++ ){ var f = b [ h ]; for ( c = f . firstChild ; c ;){ if ( " TD " == c . nodeName . toUpperCase () || " TH " == c . nodeName . toUpperCase ()){ var g = 1 * c . getAttribute ( " colspan " ); var k = 1 * c . getAttribute ( " rowspan " ); g = g && 0 !== g && 1 !== g ? g : 1 ; k = k && 0 !== k && 1 !== k ? k : 1 ; var m = 0 ; for ( d = a [ h ]; d [ m ];) m ++ ; var n = m ; var p = 1 === g ? ! 0 :! 1 ; for ( d = 0 ; d < g ; d ++ ) for ( m = 0 ; m < k ; m ++ ) a [ h + m ][ n + d ] = { cell : c , unique : p }, a [ h + m ] . nTr = f } c = c . nextSibling }}} function Na ( a , b , c ){ var d = []; c || ( c = a . aoHeader ,
b && ( c = [], xa ( c , b ))); b = 0 ; for ( var e = c . length ; b < e ; b ++ ) for ( var h = 0 , f = c [ b ] . length ; h < f ; h ++ ) ! c [ b ][ h ] . unique || d [ h ] && a . bSortCellsTop || ( d [ h ] = c [ b ][ h ] . cell ); return d } function Oa ( a , b , c ){ F ( a , " aoServerParams " , " serverParams " ,[ b ]); if ( b && Array . isArray ( b )){ var d = {}, e =/ ( .* ? ) \ [ \ ] $ / ; l . each ( b , function ( n , p ){( n = p . name . match ( e )) ? ( n = n [ 0 ], d [ n ] || ( d [ n ] = []), d [ n ] . push ( p . value )) : d [ p . name ] = p . value }); b = d } var h = a . ajax , f = a . oInstance , g = function ( n ){ var p = a . jqXhr ? a . jqXhr . status : null ; if ( null === n || " number " === typeof p && 204 == p ) n = {}, Aa ( a , n ,[]);
( p = n . error || n . sError ) && da ( a , 0 , p ); a . json = n ; F ( a , null , " xhr " ,[ a , n , a . jqXHR ]); c ( n )}; if ( l . isPlainObject ( h ) && h . data ){ var k = h . data ; var m = " function " === typeof k ? k ( b , a ) : k ; b = " function " === typeof k && m ? m : l . extend ( ! 0 , b , m ); delete h . data } m = { data : b , success : g , dataType : " json " , cache :! 1 , type : a . sServerMethod , error : function ( n , p , t ){ t = F ( a , null , " xhr " ,[ a , null , a . jqXHR ]); - 1 === l . inArray ( ! 0 , t ) && ( " parsererror " == p ? da ( a , 0 , " Invalid JSON response " , 1 ) : 4 === n . readyState && da ( a , 0 , " Ajax error " , 7 )); V ( a , ! 1 )}}; a . oAjaxData = b ; F ( a , null , " preXhr " ,[ a ,
b ]); a . fnServerData ? a . fnServerData . call ( f , a . sAjaxSource , l . map ( b , function ( n , p ){ return { name : p , value : n }}), g , a ) : a . sAjaxSource || " string " === typeof h ? a . jqXHR = l . ajax ( l . extend ( m ,{ url : h || a . sAjaxSource })) : " function " === typeof h ? a . jqXHR = h . call ( f , b , g , a ) : ( a . jqXHR = l . ajax ( l . extend ( m , h )), h . data = k )} function Gb ( a ){ a . iDraw ++ ; V ( a , ! 0 ); Oa ( a , Pb ( a ), function ( b ){ Qb ( a , b )})} function Pb ( a ){ var b = a . aoColumns , c = b . length , d = a . oFeatures , e = a . oPreviousSearch , h = a . aoPreSearchCols , f = [], g = pa ( a ); var k = a . _iDisplayStart ; var m =! 1 !== d . bPaginate ?
a . _iDisplayLength :- 1 ; var n = function ( x , w ){ f . push ({ name : x , value : w })}; n ( " sEcho " , a . iDraw ); n ( " iColumns " , c ); n ( " sColumns " , U ( b , " sName " ) . join ( " , " )); n ( " iDisplayStart " , k ); n ( " iDisplayLength " , m ); var p = { draw : a . iDraw , columns : [], order : [], start : k , length : m , search : { value : e . sSearch , regex : e . bRegex }}; for ( k = 0 ; k < c ; k ++ ){ var t = b [ k ]; var v = h [ k ]; m = " function " == typeof t . mData ? " function " : t . mData ; p . columns . push ({ data : m , name : t . sName , searchable : t . bSearchable , orderable : t . bSortable , search : { value : v . sSearch , regex : v . bRegex }}); n ( " mDataProp_ " +
k , m ); d . bFilter && ( n ( " sSearch_ " + k , v . sSearch ), n ( " bRegex_ " + k , v . bRegex ), n ( " bSearchable_ " + k , t . bSearchable )); d . bSort && n ( " bSortable_ " + k , t . bSortable )} d . bFilter && ( n ( " sSearch " , e . sSearch ), n ( " bRegex " , e . bRegex )); d . bSort && ( l . each ( g , function ( x , w ){ p . order . push ({ column : w . col , dir : w . dir }); n ( " iSortCol_ " + x , w . col ); n ( " sSortDir_ " + x , w . dir )}), n ( " iSortingCols " , g . length )); b = u . ext . legacy . ajax ; return null === b ? a . sAjaxSource ? f : p : b ? f : p } function Qb ( a , b ){ var c = function ( f , g ){ return b [ f ] !== q ? b [ f ] : b [ g ]}, d = Aa ( a , b ), e = c ( " sEcho " , " draw " ), h =
c ( " iTotalRecords " , " recordsTotal " ); c = c ( " iTotalDisplayRecords " , " recordsFiltered " ); if ( e !== q ){ if ( 1 * e < a . iDraw ) return ; a . iDraw = 1 * e } d || ( d = []); Ka ( a ); a . _iRecordsTotal = parseInt ( h , 10 ); a . _iRecordsDisplay = parseInt ( c , 10 ); e = 0 ; for ( h = d . length ; e < h ; e ++ ) ia ( a , d [ e ]); a . aiDisplay = a . aiDisplayMaster . slice (); ja ( a , ! 0 ); a . _bInitComplete || Pa ( a , b ); V ( a , ! 1 )} function Aa ( a , b , c ){ a = l . isPlainObject ( a . ajax ) && a . ajax . dataSrc !== q ? a . ajax . dataSrc : a . sAjaxDataProp ; if ( ! c ) return " data " === a ? b . aaData || b [ a ] : " " !== a ? na ( a )( b ) : b ; ha ( a )( b , c )} function Kb ( a ){ var b =
a . oClasses , c = a . sTableId , d = a . oLanguage , e = a . oPreviousSearch , h = a . aanFeatures , f = '<input type="search" class="' + b . sFilterInput + '"/>' , g = d . sSearch ; g = g . match ( / _INPUT_ / ) ? g . replace ( " _INPUT_ " , f ) : g + f ; b = l ( " <div/> " ,{ id : h . f ? null : c + " _filter " , " class " : b . sFilter }) . append ( l ( " <label/> " ) . append ( g )); var k = function ( n ){ var p = this . value ? this . value : " " ; e . return && " Enter " !== n . key || p == e . sSearch || ( za ( a ,{ sSearch : p , bRegex : e . bRegex , bSmart : e . bSmart , bCaseInsensitive : e . bCaseInsensitive , " return " : e . return }), a . _iDisplayStart = 0 , ja ( a ))}; h =
null !== a . searchDelay ? a . searchDelay : " ssp " === Q ( a ) ? 400 : 0 ; var m = l ( " input " , b ) . val ( e . sSearch ) . attr ( " placeholder " , d . sSearchPlaceholder ) . on ( " keyup.DT search.DT input.DT paste.DT cut.DT " , h ? gb ( k , h ) : k ) . on ( " mouseup " , function ( n ){ setTimeout ( function (){ k . call ( m [ 0 ], n )}, 10 )}) . on ( " keypress.DT " , function ( n ){ if ( 13 == n . keyCode ) return ! 1 }) . attr ( " aria-controls " , c ); l ( a . nTable ) . on ( " search.dt.DT " , function ( n , p ){ if ( a === p ) try { m [ 0 ] !== A . activeElement && m . val ( e . sSearch )} catch ( t ){}}); return b [ 0 ]} function za ( a , b , c ){ var d = a . oPreviousSearch ,
e = a . aoPreSearchCols , h = function ( g ){ d . sSearch = g . sSearch ; d . bRegex = g . bRegex ; d . bSmart = g . bSmart ; d . bCaseInsensitive = g . bCaseInsensitive ; d . return = g . return }, f = function ( g ){ return g . bEscapeRegex !== q ? ! g . bEscapeRegex : g . bRegex }; Za ( a ); if ( " ssp " != Q ( a )){ Rb ( a , b . sSearch , c , f ( b ), b . bSmart , b . bCaseInsensitive , b . return ); h ( b ); for ( b = 0 ; b < e . length ; b ++ ) Sb ( a , e [ b ] . sSearch , b , f ( e [ b ]), e [ b ] . bSmart , e [ b ] . bCaseInsensitive ); Tb ( a )} else h ( b ); a . bFiltered =! 0 ; F ( a , null , " search " ,[ a ])} function Tb ( a ){ for ( var b = u . ext . search , c = a . aiDisplay , d , e , h = 0 , f =
b . length ; h < f ; h ++ ){ for ( var g = [], k = 0 , m = c . length ; k < m ; k ++ ) e = c [ k ], d = a . aoData [ e ], b [ h ]( a , d . _aFilterData , e , d . _aData , k ) && g . push ( e ); c . length = 0 ; l . merge ( c , g )}} function Sb ( a , b , c , d , e , h ){ if ( " " !== b ){ var f = [], g = a . aiDisplay ; d = hb ( b , d , e , h ); for ( e = 0 ; e < g . length ; e ++ ) b = a . aoData [ g [ e ]] . _aFilterData [ c ], d . test ( b ) && f . push ( g [ e ]); a . aiDisplay = f }} function Rb ( a , b , c , d , e , h ){ e = hb ( b , d , e , h ); var f = a . oPreviousSearch . sSearch , g = a . aiDisplayMaster ; h = []; 0 !== u . ext . search . length && ( c =! 0 ); var k = Ub ( a ); if ( 0 >= b . length ) a . aiDisplay = g . slice (); else { if ( k ||
c || d || f . length > b . length || 0 !== b . indexOf ( f ) || a . bSorted ) a . aiDisplay = g . slice (); b = a . aiDisplay ; for ( c = 0 ; c < b . length ; c ++ ) e . test ( a . aoData [ b [ c ]] . _sFilterRow ) && h . push ( b [ c ]); a . aiDisplay = h }} function hb ( a , b , c , d ){ a = b ? a : ib ( a ); c && ( a = " ^(?=.*? " + l . map ( a . match ( / " [^ " ] + " |[^ ]+/g)||[ " " ],function(e) { if(' " '===e.charAt(0)){var h=e.match(/^"(.*)"$/);e=h?h[1]:e}return e.replace(' " ', " " )}).join( " )( ? =.* ? " )+ " ) .* $ " );return new RegExp(a,d? " i " : " " )}function Ub(a) { var b=a.aoColumns,c,d;var e=!1;var h=0;for(c=a.aoData.length;h<c;h++) { var f=
a . aoData [ h ]; if ( ! f . _aFilterData ){ var g = []; e = 0 ; for ( d = b . length ; e < d ; e ++ ){ var k = b [ e ]; k . bSearchable ? ( k = T ( a , h , e , " filter " ), null === k && ( k = " " ), " string " !== typeof k && k . toString && ( k = k . toString ())) : k = " " ; k . indexOf &&- 1 !== k . indexOf ( " & " ) && ( Qa . innerHTML = k , k = sc ? Qa . textContent : Qa . innerText ); k . replace && ( k = k . replace ( / [ \r\n\u2028 ] / g , " " )); g . push ( k )} f . _aFilterData = g ; f . _sFilterRow = g . join ( " " ); e =! 0 }} return e } function Vb ( a ){ return { search : a . sSearch , smart : a . bSmart , regex : a . bRegex , caseInsensitive : a . bCaseInsensitive }} function Wb ( a ){ return { sSearch : a . search ,
bSmart : a . smart , bRegex : a . regex , bCaseInsensitive : a . caseInsensitive }} function Nb ( a ){ var b = a . sTableId , c = a . aanFeatures . i , d = l ( " <div/> " ,{ " class " : a . oClasses . sInfo , id : c ? null : b + " _info " }); c || ( a . aoDrawCallback . push ({ fn : Xb , sName : " information " }), d . attr ( " role " , " status " ) . attr ( " aria-live " , " polite " ), l ( a . nTable ) . attr ( " aria-describedby " , b + " _info " )); return d [ 0 ]} function Xb ( a ){ var b = a . aanFeatures . i ; if ( 0 !== b . length ){ var c = a . oLanguage , d = a . _iDisplayStart + 1 , e = a . fnDisplayEnd (), h = a . fnRecordsTotal (), f = a . fnRecordsDisplay (), g =
f ? c . sInfo : c . sInfoEmpty ; f !== h && ( g += " " + c . sInfoFiltered ); g += c . sInfoPostFix ; g = Yb ( a , g ); c = c . fnInfoCallback ; null !== c && ( g = c . call ( a . oInstance , a , d , e , h , f , g )); l ( b ) . html ( g )}} function Yb ( a , b ){ var c = a . fnFormatNumber , d = a . _iDisplayStart + 1 , e = a . _iDisplayLength , h = a . fnRecordsDisplay (), f =- 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 , h )) . replace ( / _PAGE_ / g , c . call ( a , f ? 1 : Math . ceil ( d / e ))) . replace ( / _PAGES_ / g ,
c . call ( a , f ? 1 : Math . ceil ( h / e )))} function Ba ( a ){ var b = a . iInitDisplayStart , c = a . aoColumns ; var d = a . oFeatures ; var e = a . bDeferLoading ; if ( a . bInitialised ){ Ib ( a ); Fb ( a ); ya ( a , a . aoHeader ); ya ( a , a . aoFooter ); V ( a , ! 0 ); d . bAutoWidth && Ya ( a ); var h = 0 ; for ( d = c . length ; h < d ; h ++ ){ var f = c [ h ]; f . sWidth && ( f . nTh . style . width = K ( f . sWidth ))} F ( a , null , " preInit " ,[ a ]); ka ( a ); c = Q ( a ); if ( " ssp " != c || e ) " ajax " == c ? Oa ( a ,[], function ( g ){ var k = Aa ( a , g ); for ( h = 0 ; h < k . length ; h ++ ) ia ( a , k [ h ]); a . iInitDisplayStart = b ; ka ( a ); V ( a , ! 1 ); Pa ( a , g )}, a ) : ( V ( a , ! 1 ), Pa ( a ))} else setTimeout ( function (){ Ba ( a )},
200 )} function Pa ( a , b ){ a . _bInitComplete =! 0 ;( b || a . oInit . aaData ) && ta ( a ); F ( a , null , " plugin-init " ,[ a , b ]); F ( a , " aoInitComplete " , " init " ,[ a , b ])} function jb ( a , b ){ b = parseInt ( b , 10 ); a . _iDisplayLength = b ; kb ( a ); F ( a , null , " length " ,[ a , b ])} function Jb ( a ){ var b = a . oClasses , c = a . sTableId , d = a . aLengthMenu , e = Array . isArray ( d [ 0 ]), h = e ? d [ 0 ] : d ; d = e ? d [ 1 ] : d ; e = l ( " <select/> " ,{ name : c + " _length " , " aria-controls " : c , " class " : b . sLengthSelect }); for ( var f = 0 , g = h . length ; f < g ; f ++ ) e [ 0 ][ f ] = new Option ( " number " === typeof d [ f ] ? a . fnFormatNumber ( d [ f ]) : d [ f ],
h [ f ]); var k = l ( " <div><label/></div> " ) . addClass ( b . sLength ); a . aanFeatures . l || ( k [ 0 ] . id = c + " _length " ); k . children () . append ( a . oLanguage . sLengthMenu . replace ( " _MENU_ " , e [ 0 ] . outerHTML )); l ( " select " , k ) . val ( a . _iDisplayLength ) . on ( " change.DT " , function ( m ){ jb ( a , l ( this ) . val ()); ja ( a )}); l ( a . nTable ) . on ( " length.dt.DT " , function ( m , n , p ){ a === n && l ( " select " , k ) . val ( p )}); return k [ 0 ]} function Ob ( a ){ var b = a . sPaginationType , c = u . ext . pager [ b ], d = " function " === typeof c , e = function ( f ){ ja ( f )}; b = l ( " <div/> " ) . addClass ( a . oClasses . sPaging + b )[ 0 ];
var h = a . aanFeatures ; d || c . fnInit ( a , b , e ); h . p || ( b . id = a . sTableId + " _paginate " , a . aoDrawCallback . push ({ fn : function ( f ){ if ( d ){ var g = f . _iDisplayStart , k = f . _iDisplayLength , m = f . fnRecordsDisplay (), n =- 1 === k ; g = n ? 0 : Math . ceil ( g / k ); k = n ? 1 : Math . ceil ( m / k ); m = c ( g , k ); var p ; n = 0 ; for ( p = h . p . length ; n < p ; n ++ ) fb ( f , " pageButton " )( f , h . p [ n ], n , m , g , k )} else c . fnUpdate ( f , e )}, sName : " pagination " })); return b } function lb ( a , b , c ){ var d = a . _iDisplayStart , e = a . _iDisplayLength , h = a . fnRecordsDisplay (); 0 === h ||- 1 === e ? d = 0 : " number " === typeof b ? ( d = b * e , d > h &&
( d = 0 )) : " first " == b ? d = 0 : " previous " == b ? ( d = 0 <= e ? d - e : 0 , 0 > d && ( d = 0 )) : " next " == b ? d + e < h && ( d += e ) : " last " == b ? d = Math . floor (( h - 1 ) / e ) * e : da ( a , 0 , " Unknown paging action: " + b , 5 ); b = a . _iDisplayStart !== d ; a . _iDisplayStart = d ; b && ( F ( a , null , " page " ,[ a ]), c && ja ( a )); return b } function Lb ( a ){ return l ( " <div/> " ,{ id : a . aanFeatures . r ? null : a . sTableId + " _processing " , " class " : a . oClasses . sProcessing }) . html ( a . oLanguage . sProcessing ) . insertBefore ( a . nTable )[ 0 ]} function V ( a , b ){ a . oFeatures . bProcessing && l ( a . aanFeatures . r ) . css ( " display " , b ? " block " : " none " );
F ( a , null , " processing " ,[ a , b ])} function Mb ( a ){ var b = l ( a . nTable ), c = a . oScroll ; if ( " " === c . sX && " " === c . sY ) return a . nTable ; var d = c . sX , e = c . sY , h = a . oClasses , f = b . children ( " caption " ), g = f . length ? f [ 0 ] . _captionSide : null , k = l ( b [ 0 ] . cloneNode ( ! 1 )), m = l ( b [ 0 ] . cloneNode ( ! 1 )), n = b . children ( " tfoot " ); n . length || ( n = null ); k = l ( " <div/> " ,{ " class " : h . sScrollWrapper }) . append ( l ( " <div/> " ,{ " class " : h . sScrollHead }) . css ({ overflow : " hidden " , position : " relative " , border : 0 , width : d ? d ? K ( d ) : null : " 100% " }) . append ( l ( " <div/> " ,{ " class " : h . sScrollHeadInner }) . css ({ " box-sizing " : " content-box " ,
width : c . sXInner || " 100% " }) . append ( k . removeAttr ( " id " ) . css ( " margin-left " , 0 ) . append ( " top " === g ? f : null ) . append ( b . children ( " thead " ))))) . append ( l ( " <div/> " ,{ " class " : h . sScrollBody }) . css ({ position : " relative " , overflow : " auto " , width : d ? K ( d ) : null }) . append ( b )); n && k . append ( l ( " <div/> " ,{ " class " : h . sScrollFoot }) . css ({ overflow : " hidden " , border : 0 , width : d ? d ? K ( d ) : null : " 100% " }) . append ( l ( " <div/> " ,{ " class " : h . sScrollFootInner }) . append ( m . removeAttr ( " id " ) . css ( " margin-left " , 0 ) . append ( " bottom " === g ? f : null ) . append ( b . children ( " tfoot " )))));
b = k . children (); var p = b [ 0 ]; h = b [ 1 ]; var t = n ? b [ 2 ] : null ; if ( d ) l ( h ) . on ( " scroll.DT " , function ( v ){ v = this . scrollLeft ; p . scrollLeft = v ; n && ( t . scrollLeft = v )}); l ( h ) . css ( " max-height " , e ); c . bCollapse || l ( h ) . css ( " height " , e ); a . nScrollHead = p ; a . nScrollBody = h ; a . nScrollFoot = t ; a . aoDrawCallback . push ({ fn : Ha , sName : " scrolling " }); return k [ 0 ]} function Ha ( a ){ var b = a . oScroll , c = b . sX , d = b . sXInner , e = b . sY ; b = b . iBarWidth ; var h = l ( a . nScrollHead ), f = h [ 0 ] . style , g = h . children ( " div " ), k = g [ 0 ] . style , m = g . children ( " table " ); g = a . nScrollBody ; var n = l ( g ), p =
g . style , t = l ( a . nScrollFoot ) . children ( " div " ), v = t . children ( " table " ), x = l ( a . nTHead ), w = l ( a . nTable ), r = w [ 0 ], C = r . style , G = a . nTFoot ? l ( a . nTFoot ) : null , aa = a . oBrowser , L = aa . bScrollOversize ; U ( a . aoColumns , " nTh " ); var O = [], I = [], H = [], ea = [], Y , Ca = function ( D ){ D = D . style ; D . paddingTop = " 0 " ; D . paddingBottom = " 0 " ; D . borderTopWidth = " 0 " ; D . borderBottomWidth = " 0 " ; D . height = 0 }; var fa = g . scrollHeight > g . clientHeight ; if ( a . scrollBarVis !== fa && a . scrollBarVis !== q ) a . scrollBarVis = fa , ta ( a ); else { a . scrollBarVis = fa ; w . children ( " thead, tfoot " ) . remove ();
if ( G ){ var ba = G . clone () . prependTo ( w ); var la = G . find ( " tr " ); ba = ba . find ( " tr " )} var mb = x . clone () . prependTo ( w ); x = x . find ( " tr " ); fa = mb . find ( " tr " ); mb . find ( " th, td " ) . removeAttr ( " tabindex " ); c || ( p . width = " 100% " , h [ 0 ] . style . width = " 100% " ); l . each ( Na ( a , mb ), function ( D , W ){ Y = ua ( a , D ); W . style . width = a . aoColumns [ Y ] . sWidth }); G && ca ( function ( D ){ D . style . width = " " }, ba ); h = w . outerWidth (); " " === c ? ( C . width = " 100% " , L && ( w . find ( " tbody " ) . height () > g . offsetHeight || " scroll " == n . css ( " overflow-y " )) && ( C . width = K ( w . outerWidth () - b )), h = w . outerWidth ()) :
" " !== d && ( C . width = K ( d ), h = w . outerWidth ()); ca ( Ca , fa ); ca ( function ( D ){ var W = z . getComputedStyle ? z . getComputedStyle ( D ) . width : K ( l ( D ) . width ()); H . push ( D . innerHTML ); O . push ( W )}, fa ); ca ( function ( D , W ){ D . style . width = O [ W ]}, x ); l ( fa ) . height ( 0 ); G && ( ca ( Ca , ba ), ca ( function ( D ){ ea . push ( D . innerHTML ); I . push ( K ( l ( D ) . css ( " width " )))}, ba ), ca ( function ( D , W ){ D . style . width = I [ W ]}, la ), l ( ba ) . height ( 0 )); ca ( function ( D , W ){ D . innerHTML = '<div class="dataTables_sizing">' + H [ W ] + " </div> " ; D . childNodes [ 0 ] . style . height = " 0 " ; D . childNodes [ 0 ] . style . overflow =
" hidden " ; D . style . width = O [ W ]}, fa ); G && ca ( function ( D , W ){ D . innerHTML = '<div class="dataTables_sizing">' + ea [ W ] + " </div> " ; D . childNodes [ 0 ] . style . height = " 0 " ; D . childNodes [ 0 ] . style . overflow = " hidden " ; D . style . width = I [ W ]}, ba ); w . outerWidth () < h ? ( la = g . scrollHeight > g . offsetHeight || " scroll " == n . css ( " overflow-y " ) ? h + b : h , L && ( g . scrollHeight > g . offsetHeight || " scroll " == n . css ( " overflow-y " )) && ( C . width = K ( la - b )), " " !== c && " " === d || da ( a , 1 , " Possible column misalignment " , 6 )) : la = " 100% " ; p . width = K ( la ); f . width = K ( la ); G && ( a . nScrollFoot . style . width =
K ( la )); ! e && L && ( p . height = K ( r . offsetHeight + b )); c = w . outerWidth (); m [ 0 ] . style . width = K ( c ); k . width = K ( c ); d = w . height () > g . clientHeight || " scroll " == n . css ( " overflow-y " ); e = " padding " + ( aa . bScrollbarLeft ? " Left " : " Right " ); k [ e ] = d ? b + " px " : " 0px " ; G && ( v [ 0 ] . style . width = K ( c ), t [ 0 ] . style . width = K ( c ), t [ 0 ] . style [ e ] = d ? b + " px " : " 0px " ); w . children ( " colgroup " ) . insertBefore ( w . children ( " thead " )); n . trigger ( " scroll " ); ! a . bSorted &&! a . bFiltered || a . _drawHold || ( g . scrollTop = 0 )}} function ca ( a , b , c ){ for ( var d = 0 , e = 0 , h = b . length , f , g ; e < h ;){ f = b [ e ] . firstChild ;
for ( g = c ? c [ e ] . firstChild : null ; f ;) 1 === f . nodeType && ( c ? a ( f , g , d ) : a ( f , d ), d ++ ), f = f . nextSibling , g = c ? g . nextSibling : null ; e ++ }} function Ya ( a ){ var b = a . nTable , c = a . aoColumns , d = a . oScroll , e = d . sY , h = d . sX , f = d . sXInner , g = c . length , k = Ia ( a , " bVisible " ), m = l ( " th " , a . nTHead ), n = b . getAttribute ( " width " ), p = b . parentNode , t =! 1 , v , x = a . oBrowser ; d = x . bScrollOversize ;( v = b . style . width ) &&- 1 !== v . indexOf ( " % " ) && ( n = v ); for ( v = 0 ; v < k . length ; v ++ ){ var w = c [ k [ v ]]; null !== w . sWidth && ( w . sWidth = Zb ( w . sWidthOrig , p ), t =! 0 )} if ( d ||! t &&! h &&! e && g == oa ( a ) && g == m . length ) for ( v =
0 ; v < g ; v ++ ) k = ua ( a , v ), null !== k && ( c [ k ] . sWidth = K ( m . eq ( v ) . width ())); else { g = l ( b ) . clone () . css ( " visibility " , " hidden " ) . removeAttr ( " id " ); g . find ( " tbody tr " ) . remove (); var r = l ( " <tr/> " ) . appendTo ( g . find ( " tbody " )); g . find ( " thead, tfoot " ) . remove (); g . append ( l ( a . nTHead ) . clone ()) . append ( l ( a . nTFoot ) . clone ()); g . find ( " tfoot th, tfoot td " ) . css ( " width " , " " ); m = Na ( a , g . find ( " thead " )[ 0 ]); for ( v = 0 ; v < k . length ; v ++ ) w = c [ k [ v ]], m [ v ] . style . width = null !== w . sWidthOrig && " " !== w . sWidthOrig ? K ( w . sWidthOrig ) : " " , w . sWidthOrig && h && l ( m [ v ]) . append ( l ( " <div/> " ) . css ({ width : w . sWidthOrig ,
margin : 0 , padding : 0 , border : 0 , height : 1 })); if ( a . aoData . length ) for ( v = 0 ; v < k . length ; v ++ ) t = k [ v ], w = c [ t ], l ( $b ( a , t )) . clone ( ! 1 ) . append ( w . sContentPadding ) . appendTo ( r ); l ( " [name] " , g ) . removeAttr ( " name " ); w = l ( " <div/> " ) . css ( h || e ? { position : " absolute " , top : 0 , left : 0 , height : 1 , right : 0 , overflow : " hidden " } : {}) . append ( g ) . appendTo ( p ); h && f ? g . width ( f ) : h ? ( g . css ( " width " , " auto " ), g . removeAttr ( " width " ), g . width () < p . clientWidth && n && g . width ( p . clientWidth )) : e ? g . width ( p . clientWidth ) : n && g . width ( n ); for ( v = e = 0 ; v < k . length ; v ++ ) p = l ( m [ v ]), f = p . outerWidth () -
p . width (), p = x . bBounding ? Math . ceil ( m [ v ] . getBoundingClientRect () . width ) : p . outerWidth (), e += p , c [ k [ v ]] . sWidth = K ( p - f ); b . style . width = K ( e ); w . remove ()} n && ( b . style . width = K ( n )); ! n &&! h || a . _reszEvt || ( b = function (){ l ( z ) . on ( " resize.DT- " + a . sInstance , gb ( function (){ ta ( a )}))}, d ? setTimeout ( b , 1E3 ) : b (), a . _reszEvt =! 0 )} function Zb ( a , b ){ if ( ! a ) return 0 ; a = l ( " <div/> " ) . css ( " width " , K ( a )) . appendTo ( b || A . body ); b = a [ 0 ] . offsetWidth ; a . remove (); return b } function $b ( a , b ){ var c = ac ( a , b ); if ( 0 > c ) return null ; var d = a . aoData [ c ]; return d . nTr ? d . anCells [ b ] :
l ( " <td/> " ) . html ( T ( a , c , b , " display " ))[ 0 ]} function ac ( a , b ){ for ( var c , d =- 1 , e =- 1 , h = 0 , f = a . aoData . length ; h < f ; h ++ ) c = T ( a , h , b , " display " ) + " " , c = c . replace ( tc , " " ), c = c . replace ( /& nbsp ; / g , " " ), c . length > d && ( d = c . length , e = h ); return e } function K ( a ){ return null === a ? " 0px " : " number " == typeof a ? 0 > a ? " 0px " : a + " px " : a . match ( / \d $ / ) ? a + " px " : a } function pa ( a ){ var b = [], c = a . aoColumns ; var d = a . aaSortingFixed ; var e = l . isPlainObject ( d ); var h = []; var f = function ( n ){ n . length &&! Array . isArray ( n [ 0 ]) ? h . push ( n ) : l . merge ( h , n )}; Array . isArray ( d ) && f ( d );
e && d . pre && f ( d . pre ); f ( a . aaSorting ); e && d . post && f ( d . post ); for ( a = 0 ; a < h . length ; a ++ ){ var g = h [ a ][ 0 ]; f = c [ g ] . aDataSort ; d = 0 ; for ( e = f . length ; d < e ; d ++ ){ var k = f [ d ]; var m = c [ k ] . sType || " string " ; h [ a ] . _idx === q && ( h [ a ] . _idx = l . inArray ( h [ a ][ 1 ], c [ k ] . asSorting )); b . push ({ src : g , col : k , dir : h [ a ][ 1 ], index : h [ a ] . _idx , type : m , formatter : u . ext . type . order [ m + " -pre " ]})}} return b } function Hb ( a ){ var b , c = [], d = u . ext . type . order , e = a . aoData , h = 0 , f = a . aiDisplayMaster ; Za ( a ); var g = pa ( a ); var k = 0 ; for ( b = g . length ; k < b ; k ++ ){ var m = g [ k ]; m . formatter && h ++ ; bc ( a ,
m . col )} if ( " ssp " != Q ( a ) && 0 !== g . length ){ k = 0 ; for ( b = f . length ; k < b ; k ++ ) c [ f [ k ]] = k ; h === g . length ? f . sort ( function ( n , p ){ var t , v = g . length , x = e [ n ] . _aSortData , w = e [ p ] . _aSortData ; for ( t = 0 ; t < v ; t ++ ){ var r = g [ t ]; var C = x [ r . col ]; var G = w [ r . col ]; C = C < G ? - 1 : C > G ? 1 : 0 ; if ( 0 !== C ) return " asc " === r . dir ? C :- C } C = c [ n ]; G = c [ p ]; return C < G ? - 1 : C > G ? 1 : 0 }) : f . sort ( function ( n , p ){ var t , v = g . length , x = e [ n ] . _aSortData , w = e [ p ] . _aSortData ; for ( t = 0 ; t < v ; t ++ ){ var r = g [ t ]; var C = x [ r . col ]; var G = w [ r . col ]; r = d [ r . type + " - " + r . dir ] || d [ " string- " + r . dir ]; C = r ( C , G ); if ( 0 !== C ) return C } C =
c [ n ]; G = c [ p ]; return C < G ? - 1 : C > G ? 1 : 0 })} a . bSorted =! 0 } function cc ( a ){ var b = a . aoColumns , c = pa ( a ); a = a . oLanguage . oAria ; for ( var d = 0 , e = b . length ; d < e ; d ++ ){ var h = b [ d ]; var f = h . asSorting ; var g = h . ariaTitle || h . sTitle . replace ( /<.* ?> /g,"");var k=h.nTh;k.removeAttribute("aria-sort");h.bSortable&&(0<c.length&&c[0].col==d?(k.setAttribute("aria-sort","asc"==c[0].dir?"ascending":"descending"),h=f[c[0].index+1]||f[0]):h=f[0],g+="asc"===h?a.sSortAscending:a.sSortDescending);k.setAttribute("aria-label",g)}}function nb(a,b,c,
d ){ var e = a . aaSorting , h = a . aoColumns [ b ] . asSorting , f = function ( g , k ){ var m = g . _idx ; m === q && ( m = l . inArray ( g [ 1 ], h )); return m + 1 < h . length ? m + 1 : k ? null : 0 }; " number " === typeof e [ 0 ] && ( e = a . aaSorting = [ e ]); c && a . oFeatures . bSortMulti ? ( c = l . inArray ( b , U ( e , " 0 " )), - 1 !== c ? ( b = f ( e [ c ], ! 0 ), null === b && 1 === e . length && ( b = 0 ), null === b ? e . splice ( c , 1 ) : ( e [ c ][ 1 ] = h [ b ], e [ c ] . _idx = b )) : ( e . push ([ b , h [ 0 ], 0 ]), e [ e . length - 1 ] . _idx = 0 )) : e . length && e [ 0 ][ 0 ] == b ? ( b = f ( e [ 0 ]), e . length = 1 , e [ 0 ][ 1 ] = h [ b ], e [ 0 ] . _idx = b ) : ( e . length = 0 , e . push ([ b , h [ 0 ]]), e [ 0 ] . _idx = 0 ); ka ( a ); " function " ==
typeof d && d ( a )} function eb ( a , b , c , d ){ var e = a . aoColumns [ c ]; ob ( b ,{}, function ( h ){ ! 1 !== e . bSortable && ( a . oFeatures . bProcessing ? ( V ( a , ! 0 ), setTimeout ( function (){ nb ( a , c , h . shiftKey , d ); " ssp " !== Q ( a ) && V ( a , ! 1 )}, 0 )) : nb ( a , c , h . shiftKey , d ))})} function Ra ( a ){ var b = a . aLastSort , c = a . oClasses . sSortColumn , d = pa ( a ), e = a . oFeatures , h ; if ( e . bSort && e . bSortClasses ){ e = 0 ; for ( h = b . length ; e < h ; e ++ ){ var f = b [ e ] . src ; l ( U ( a . aoData , " anCells " , f )) . removeClass ( c + ( 2 > e ? e + 1 : 3 ))} e = 0 ; for ( h = d . length ; e < h ; e ++ ) f = d [ e ] . src , l ( U ( a . aoData , " anCells " , f )) . addClass ( c +
( 2 > e ? e + 1 : 3 ))} a . aLastSort = d } function bc ( a , b ){ var c = a . aoColumns [ b ], d = u . ext . order [ c . sSortDataType ], e ; d && ( e = d . call ( a . oInstance , a , b , va ( a , b ))); for ( var h , f = u . ext . type . order [ c . sType + " -pre " ], g = 0 , k = a . aoData . length ; g < k ; g ++ ) if ( c = a . aoData [ g ], c . _aSortData || ( c . _aSortData = []), ! c . _aSortData [ b ] || d ) h = d ? e [ g ] : T ( a , g , b , " sort " ), c . _aSortData [ b ] = f ? f ( h ) : h } function qa ( a ){ if ( ! a . _bLoadingState ){ var b = { time :+ new Date , start : a . _iDisplayStart , length : a . _iDisplayLength , order : l . extend ( ! 0 ,[], a . aaSorting ), search : Vb ( a . oPreviousSearch ),
columns : l . map ( a . aoColumns , function ( c , d ){ return { visible : c . bVisible , search : Vb ( a . aoPreSearchCols [ d ])}})}; a . oSavedState = b ; F ( a , " aoStateSaveParams " , " stateSaveParams " ,[ a , b ]); a . oFeatures . bStateSave &&! a . bDestroying && a . fnStateSaveCallback . call ( a . oInstance , a , b )}} function dc ( a , b , c ){ if ( a . oFeatures . bStateSave ) return b = a . fnStateLoadCallback . call ( a . oInstance , a , function ( d ){ pb ( a , d , c )}), b !== q && pb ( a , b , c ), ! 0 ; c ()} function pb ( a , b , c ){ var d , e = a . aoColumns ; a . _bLoadingState =! 0 ; var h = a . _bInitComplete ? new u . Api ( a ) : null ; if ( b &&
b . time ){ var f = F ( a , " aoStateLoadParams " , " stateLoadParams " ,[ a , b ]); if ( - 1 !== l . inArray ( ! 1 , f )) a . _bLoadingState =! 1 ; else if ( f = a . iStateDuration , 0 < f && b . time <+ new Date - 1E3 * f ) a . _bLoadingState =! 1 ; else if ( b . columns && e . length !== b . columns . length ) a . _bLoadingState =! 1 ; else { a . oLoadedState = l . extend ( ! 0 ,{}, b ); b . start !== q && ( a . _iDisplayStart = b . start , null === h && ( a . iInitDisplayStart = b . start )); b . length !== q && ( a . _iDisplayLength = b . length ); b . order !== q && ( a . aaSorting = [], l . each ( b . order , function ( k , m ){ a . aaSorting . push ( m [ 0 ] >= e . length ? [ 0 ,
m [ 1 ]] : m )})); b . search !== q && l . extend ( a . oPreviousSearch , Wb ( b . search )); if ( b . columns ){ f = 0 ; for ( d = b . columns . length ; f < d ; f ++ ){ var g = b . columns [ f ]; g . visible !== q && ( h ? h . column ( f ) . visible ( g . visible , ! 1 ) : e [ f ] . bVisible = g . visible ); g . search !== q && l . extend ( a . aoPreSearchCols [ f ], Wb ( g . search ))} h && h . columns . adjust ()} a . _bLoadingState =! 1 ; F ( a , " aoStateLoaded " , " stateLoaded " ,[ a , b ])}} else a . _bLoadingState =! 1 ; c ()} function Sa ( a ){ var b = u . settings ; a = l . inArray ( a , U ( b , " nTable " )); return - 1 !== a ? b [ a ] : null } function da ( a , b , c , d ){ c = " DataTables warning: " +
( a ? " table id= " + a . sTableId + " - " : " " ) + c ; d && ( c += " . For more information about this error, please see http://datatables.net/tn/ " + d ); if ( b ) z . console && console . log && console . log ( c ); else if ( b = u . ext , b = b . sErrMode || b . errMode , a && F ( 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 X ( a , b , c , d ){ Array . isArray ( c ) ? l . each ( c , function ( e , h ){ Array . isArray ( h ) ? X ( a , b , h [ 0 ], h [ 1 ]) : X ( a , b , h )}) : ( d === q && ( d = c ), b [ c ] !== q && ( a [ d ] = b [ c ]))} function qb ( a , b , c ){ var d ; for ( d in b ) if ( b . hasOwnProperty ( d )){ var e =
b [ d ]; l . isPlainObject ( e ) ? ( l . isPlainObject ( a [ d ]) || ( a [ d ] = {}), l . extend ( ! 0 , a [ d ], e )) : c && " data " !== d && " aaData " !== d && Array . isArray ( e ) ? a [ d ] = e . slice () : a [ d ] = e } return a } function ob ( a , b , c ){ l ( a ) . on ( " click.DT " , b , function ( d ){ l ( a ) . trigger ( " blur " ); c ( d )}) . on ( " keypress.DT " , b , function ( d ){ 13 === d . which && ( d . preventDefault (), c ( d ))}) . on ( " selectstart.DT " , function (){ return ! 1 })} function R ( a , b , c , d ){ c && a [ b ] . push ({ fn : c , sName : d })} function F ( a , b , c , d ){ var e = []; b && ( e = l . map ( a [ b ] . slice () . reverse (), function ( h , f ){ return h . fn . apply ( a . oInstance ,
d )})); null !== c && ( b = l . Event ( c + " .dt " ), l ( a . nTable ) . trigger ( b , d ), e . push ( b . result )); return e } function kb ( 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 fb ( a , b ){ a = a . renderer ; var c = u . ext . renderer [ b ]; return l . isPlainObject ( a ) && a [ b ] ? c [ a [ b ]] || c . _ : " string " === typeof a ? c [ a ] || c . _ : c . _ } function Q ( a ){ return a . oFeatures . bServerSide ? " ssp " : a . ajax || a . sAjaxSource ? " ajax " : " dom " } function Da ( a , b ){ var c = ec . numbers_length , d = Math . floor ( c / 2 );
b <= c ? a = ra ( 0 , b ) : a <= d ? ( a = ra ( 0 , c - 2 ), a . push ( " ellipsis " ), a . push ( b - 1 )) : ( a >= b - 1 - d ? a = ra ( b - ( c - 2 ), b ) : ( a = ra ( a - d + 2 , a + d - 1 ), a . push ( " ellipsis " ), a . push ( b - 1 )), a . splice ( 0 , 0 , " ellipsis " ), a . splice ( 0 , 0 , 0 )); a . DT_el = " span " ; return a } function Wa ( a ){ l . each ({ num : function ( b ){ return Ta ( b , a )}, " num-fmt " : function ( b ){ return Ta ( b , a , rb )}, " html-num " : function ( b ){ return Ta ( b , a , Ua )}, " html-num-fmt " : function ( b ){ return Ta ( b , a , Ua , rb )}}, function ( b , c ){ M . type . order [ b + a + " -pre " ] = c ; b . match ( /^ html\ -/ ) && ( M . type . search [ b + a ] = M . type . search . html )})} function fc ( a ){ return function (){ var b =
[ Sa ( this [ u . ext . iApiIndex ])] . concat ( Array . prototype . slice . call ( arguments )); return u . ext . internal [ a ] . apply ( this , b )}} var u = function ( a , b ){ if ( this instanceof u ) return l ( a ) . DataTable ( b ); b = a ; this . $ = function ( f , g ){ return this . api ( ! 0 ) . $ ( f , g )}; this . _ = function ( f , g ){ return this . api ( ! 0 ) . rows ( f , g ) . data ()}; this . api = function ( f ){ return f ? new B ( Sa ( this [ M . iApiIndex ])) : new B ( this )}; this . fnAddData = function ( f , g ){ var k = this . api ( ! 0 ); f = Array . isArray ( f ) && ( Array . isArray ( f [ 0 ]) || l . isPlainObject ( f [ 0 ])) ? k . rows . add ( f ) : k . row . add ( f );
( g === q || g ) && k . draw (); return f . flatten () . toArray ()}; this . fnAdjustColumnSizing = function ( f ){ var g = this . api ( ! 0 ) . columns . adjust (), k = g . settings ()[ 0 ], m = k . oScroll ; f === q || f ? g . draw ( ! 1 ) : ( " " !== m . sX || " " !== m . sY ) && Ha ( k )}; this . fnClearTable = function ( f ){ var g = this . api ( ! 0 ) . clear ();( f === q || f ) && g . draw ()}; this . fnClose = function ( f ){ this . api ( ! 0 ) . row ( f ) . child . hide ()}; this . fnDeleteRow = function ( f , g , k ){ var m = this . api ( ! 0 ); f = m . rows ( f ); var n = f . settings ()[ 0 ], p = n . aoData [ f [ 0 ][ 0 ]]; f . remove (); g && g . call ( this , n , p );( k === q || k ) && m . draw ();
return p }; this . fnDestroy = function ( f ){ this . api ( ! 0 ) . destroy ( f )}; this . fnDraw = function ( f ){ this . api ( ! 0 ) . draw ( f )}; this . fnFilter = function ( f , g , k , m , n , p ){ n = this . api ( ! 0 ); null === g || g === q ? n . search ( f , k , m , p ) : n . column ( g ) . search ( f , k , m , p ); n . draw ()}; this . fnGetData = function ( f , g ){ var k = this . api ( ! 0 ); if ( f !== q ){ var m = f . nodeName ? f . nodeName . toLowerCase () : " " ; return g !== q || " td " == m || " th " == m ? k . cell ( f , g ) . data () : k . row ( f ) . data () || null } return k . data () . toArray ()}; this . fnGetNodes = function ( f ){ var g = this . api ( ! 0 ); return f !== q ? g . row ( f ) . node () :
g . rows () . nodes () . flatten () . toArray ()}; this . fnGetPosition = function ( f ){ var g = this . api ( ! 0 ), k = f . nodeName . toUpperCase (); return " TR " == k ? g . row ( f ) . index () : " TD " == k || " TH " == k ? ( f = g . cell ( f ) . index (),[ f . row , f . columnVisible , f . column ]) : null }; this . fnIsOpen = function ( f ){ return this . api ( ! 0 ) . row ( f ) . child . isShown ()}; this . fnOpen = function ( f , g , k ){ return this . api ( ! 0 ) . row ( f ) . child ( g , k ) . show () . child ()[ 0 ]}; this . fnPageChange = function ( f , g ){ f = this . api ( ! 0 ) . page ( f );( g === q || g ) && f . draw ( ! 1 )}; this . fnSetColumnVis = function ( f , g , k ){ f = this . api ( ! 0 ) . column ( f ) . visible ( g );
( k === q || k ) && f . columns . adjust () . draw ()}; this . fnSettings = function (){ return Sa ( this [ M . iApiIndex ])}; this . fnSort = function ( f ){ this . api ( ! 0 ) . order ( f ) . draw ()}; this . fnSortListener = function ( f , g , k ){ this . api ( ! 0 ) . order . listener ( f , g , k )}; this . fnUpdate = function ( f , g , k , m , n ){ var p = this . api ( ! 0 ); k === q || null === k ? p . row ( g ) . data ( f ) : p . cell ( g , k ) . data ( f );( n === q || n ) && p . columns . adjust ();( m === q || m ) && p . draw (); return 0 }; this . fnVersionCheck = M . fnVersionCheck ; var c = this , d = b === q , e = this . length ; d && ( b = {}); this . oApi = this . internal = M . internal ;
for ( var h in u . ext . internal ) h && ( this [ h ] = fc ( h )); this . each ( function (){ var f = {}, g = 1 < e ? qb ( f , b , ! 0 ) : b , k = 0 , m ; f = this . getAttribute ( " id " ); var n =! 1 , p = u . defaults , t = l ( this ); if ( " table " != this . nodeName . toLowerCase ()) da ( null , 0 , " Non-table node initialisation ( " + this . nodeName + " ) " , 2 ); else { zb ( p ); Ab ( p . column ); P ( p , p , ! 0 ); P ( p . column , p . column , ! 0 ); P ( p , l . extend ( g , t . data ()), ! 0 ); var v = u . settings ; k = 0 ; for ( m = v . length ; k < m ; k ++ ){ var x = v [ k ]; if ( x . nTable == this || x . nTHead && x . nTHead . parentNode == this || x . nTFoot && x . nTFoot . parentNode == this ){ var w =
g . bRetrieve !== q ? g . bRetrieve : p . bRetrieve ; if ( d || w ) return x . oInstance ; if ( g . bDestroy !== q ? g . bDestroy : p . bDestroy ){ x . oInstance . fnDestroy (); break } else { da ( x , 0 , " Cannot reinitialise DataTable " , 3 ); return }} if ( x . sTableId == this . id ){ v . splice ( k , 1 ); break }} if ( null === f || " " === f ) this . id = f = " DataTables_Table_ " + u . ext . _unique ++ ; var r = l . extend ( ! 0 ,{}, u . models . oSettings ,{ sDestroyWidth : t [ 0 ] . style . width , sInstance : f , sTableId : f }); r . nTable = this ; r . oApi = c . internal ; r . oInit = g ; v . push ( r ); r . oInstance = 1 === c . length ? c : t . dataTable (); zb ( g ); ma ( g . oLanguage );
g . aLengthMenu &&! g . iDisplayLength && ( g . iDisplayLength = Array . isArray ( g . aLengthMenu [ 0 ]) ? g . aLengthMenu [ 0 ][ 0 ] : g . aLengthMenu [ 0 ]); g = qb ( l . extend ( ! 0 ,{}, p ), g ); X ( r . oFeatures , g , " bPaginate bLengthChange bFilter bSort bSortMulti bInfo bProcessing bAutoWidth bSortClasses bServerSide bDeferRender " . split ( " " )); X ( r , 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 " ]]); X ( r . oScroll , g ,[[ " sScrollX " , " sX " ],[ " sScrollXInner " , " sXInner " ],[ " sScrollY " , " sY " ],[ " bScrollCollapse " , " bCollapse " ]]); X ( r . oLanguage , g , " fnInfoCallback " ); R ( r , " aoDrawCallback " , g . fnDrawCallback , " user " ); R ( r , " aoServerParams " , g . fnServerParams , " user " ); R ( r , " aoStateSaveParams " , g . fnStateSaveParams ,
" user " ); R ( r , " aoStateLoadParams " , g . fnStateLoadParams , " user " ); R ( r , " aoStateLoaded " , g . fnStateLoaded , " user " ); R ( r , " aoRowCallback " , g . fnRowCallback , " user " ); R ( r , " aoRowCreatedCallback " , g . fnCreatedRow , " user " ); R ( r , " aoHeaderCallback " , g . fnHeaderCallback , " user " ); R ( r , " aoFooterCallback " , g . fnFooterCallback , " user " ); R ( r , " aoInitComplete " , g . fnInitComplete , " user " ); R ( r , " aoPreDrawCallback " , g . fnPreDrawCallback , " user " ); r . rowIdFn = na ( g . rowId ); Bb ( r ); var C = r . oClasses ; l . extend ( C , u . ext . classes , g . oClasses ); t . addClass ( C . sTable ); r . iInitDisplayStart ===
q && ( r . iInitDisplayStart = g . iDisplayStart , r . _iDisplayStart = g . iDisplayStart ); null !== g . iDeferLoading && ( r . bDeferLoading =! 0 , f = Array . isArray ( g . iDeferLoading ), r . _iRecordsDisplay = f ? g . iDeferLoading [ 0 ] : g . iDeferLoading , r . _iRecordsTotal = f ? g . iDeferLoading [ 1 ] : g . iDeferLoading ); var G = r . oLanguage ; l . extend ( ! 0 , G , g . oLanguage ); G . sUrl ? ( l . ajax ({ dataType : " json " , url : G . sUrl , success : function ( I ){ P ( p . oLanguage , I ); ma ( I ); l . extend ( ! 0 , G , I ); F ( r , null , " i18n " ,[ r ]); Ba ( r )}, error : function (){ Ba ( r )}}), n =! 0 ) : F ( r , null , " i18n " ,[ r ]); null === g . asStripeClasses &&
( r . asStripeClasses = [ C . sStripeOdd , C . sStripeEven ]); f = r . asStripeClasses ; var aa = t . children ( " tbody " ) . find ( " tr " ) . eq ( 0 ); - 1 !== l . inArray ( ! 0 , l . map ( f , function ( I , H ){ return aa . hasClass ( I )})) && ( l ( " tbody tr " , this ) . removeClass ( f . join ( " " )), r . asDestroyStripes = f . slice ()); f = []; v = this . getElementsByTagName ( " thead " ); 0 !== v . length && ( xa ( r . aoHeader , v [ 0 ]), f = Na ( r )); if ( null === g . aoColumns ) for ( v = [], k = 0 , m = f . length ; k < m ; k ++ ) v . push ( null ); else v = g . aoColumns ; k = 0 ; for ( m = v . length ; k < m ; k ++ ) Xa ( r , f ? f [ k ] : null ); Db ( r , g . aoColumnDefs , v , function ( I ,
H ){ Ga ( r , I , H )}); if ( aa . length ){ var L = function ( I , H ){ return null !== I . getAttribute ( " data- " + H ) ? H : null }; l ( aa [ 0 ]) . children ( " th, td " ) . each ( function ( I , H ){ var ea = r . aoColumns [ I ]; if ( ea . mData === I ){ var Y = L ( H , " sort " ) || L ( H , " order " ); H = L ( H , " filter " ) || L ( H , " search " ); if ( null !== Y || null !== H ) ea . mData = { _ : I + " .display " , sort : null !== Y ? I + " .@data- " + Y : q , type : null !== Y ? I + " .@data- " + Y : q , filter : null !== H ? I + " .@data- " + H : q }, Ga ( r , I )}})} var O = r . oFeatures ; f = function (){ if ( g . aaSorting === q ){ var I = r . aaSorting ; k = 0 ; for ( m = I . length ; k < m ; k ++ ) I [ k ][ 1 ] =
r . aoColumns [ k ] . asSorting [ 0 ]} Ra ( r ); O . bSort && R ( r , " aoDrawCallback " , function (){ if ( r . bSorted ){ var Y = pa ( r ), Ca = {}; l . each ( Y , function ( fa , ba ){ Ca [ ba . src ] = ba . dir }); F ( r , null , " order " ,[ r , Y , Ca ]); cc ( r )}}); R ( r , " aoDrawCallback " , function (){( r . bSorted || " ssp " === Q ( r ) || O . bDeferRender ) && Ra ( r )}, " sc " ); I = t . children ( " caption " ) . each ( function (){ this . _captionSide = l ( this ) . css ( " caption-side " )}); var H = t . children ( " thead " ); 0 === H . length && ( H = l ( " <thead/> " ) . appendTo ( t )); r . nTHead = H [ 0 ]; var ea = t . children ( " tbody " ); 0 === ea . length && ( ea = l ( " <tbody/> " ) . insertAfter ( H ));
r . nTBody = ea [ 0 ]; H = t . children ( " tfoot " ); 0 === H . length && 0 < I . length && ( " " !== r . oScroll . sX || " " !== r . oScroll . sY ) && ( H = l ( " <tfoot/> " ) . appendTo ( t )); 0 === H . length || 0 === H . children () . length ? t . addClass ( C . sNoFooter ) : 0 < H . length && ( r . nTFoot = H [ 0 ], xa ( r . aoFooter , r . nTFoot )); if ( g . aaData ) for ( k = 0 ; k < g . aaData . length ; k ++ ) ia ( r , g . aaData [ k ]); else ( r . bDeferLoading || " dom " == Q ( r )) && Ja ( r , l ( r . nTBody ) . children ( " tr " )); r . aiDisplay = r . aiDisplayMaster . slice (); r . bInitialised =! 0 ; ! 1 === n && Ba ( r )}; R ( r , " aoDrawCallback " , qa , " state_save " ); g . bStateSave ? ( O . bStateSave =
! 0 , dc ( r , g , f )) : f ()}}); c = null ; return this }, M , y , J , sb = {}, gc =/ [ \r\n\u2028 ] / g , Ua =/<.* ?> /g,uc=/^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/,vc=/(\/|\.|\*|\+|\?|\||\(|\)|\[|\]|\{|\}|\\|\$|\^|\-)/g,rb=/['\u00A0,$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi,Z=function(a){return a&&!0!==a&&"-"!==a?!1:!0},hc=function(a){var b=parseInt(a,10);return!isNaN(b)&&isFinite(a)?b:null},ic=function(a,b){sb[b]||(sb[b]=new RegExp(ib(b),"g"));return"string"===typeof a&&"."!==b?a.replace(/\./g,
" " ) . replace ( sb [ b ], " . " ) : a }, tb = function ( a , b , c ){ var d = " string " === typeof a ; if ( Z ( a )) return ! 0 ; b && d && ( a = ic ( a , b )); c && d && ( a = a . replace ( rb , " " )); return ! isNaN ( parseFloat ( a )) && isFinite ( a )}, jc = function ( a , b , c ){ return Z ( a ) ? ! 0 : Z ( a ) || " string " === typeof a ? tb ( a . replace ( Ua , " " ), b , c ) ? ! 0 : null : null }, U = function ( a , b , c ){ var d = [], e = 0 , h = a . length ; if ( c !== q ) for (; e < h ; e ++ ) a [ e ] && a [ e ][ b ] && d . push ( a [ e ][ b ][ c ]); else for (; e < h ; e ++ ) a [ e ] && d . push ( a [ e ][ b ]); return d }, Ea = function ( a , b , c , d ){ var e = [], h = 0 , f = b . length ; if ( d !== q ) for (; h < f ; h ++ ) a [ b [ h ]][ c ] &&
e . push ( a [ b [ h ]][ c ][ d ]); else for (; h < f ; h ++ ) e . push ( a [ b [ h ]][ c ]); return e }, ra = function ( a , b ){ var c = []; if ( b === q ){ b = 0 ; var d = a } else d = b , b = a ; for ( a = b ; a < d ; a ++ ) c . push ( a ); return c }, kc = function ( a ){ for ( var b = [], c = 0 , d = a . length ; c < d ; c ++ ) a [ c ] && b . push ( a [ c ]); return b }, Ma = function ( a ){ a : { if ( ! ( 2 > a . length )){ var 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 = []; e = a . length ; var h , f = 0 ; d = 0 ; a : for (; d < e ; d ++ ){ c = a [ d ]; for ( h = 0 ; h < f ; h ++ ) if ( b [ h ] === c ) continue a ; b . push ( c );
f ++ } return b }, lc = function ( a , b ){ if ( Array . isArray ( b )) for ( var c = 0 ; c < b . length ; c ++ ) lc ( a , b [ c ]); else a . push ( b ); return a }, mc = function ( a , b ){ b === q && ( b = 0 ); return - 1 !== this . indexOf ( a , b )}; Array . isArray || ( Array . isArray = function ( a ){ return " [object Array] " === Object . prototype . toString . call ( a )}); Array . prototype . includes || ( Array . prototype . includes = mc ); String . prototype . trim || ( String . prototype . trim = function (){ return this . replace ( /^ [ \s\uFEFF\xA0 ] +| [ \s\uFEFF\xA0 ] + $ / g , " " )}); String . prototype . includes || ( String . prototype . includes =
mc ); u . util = { throttle : function ( a , b ){ var c = b !== q ? b : 200 , d , e ; return function (){ var h = this , f =+ new Date , g = arguments ; d && f < d + c ? ( clearTimeout ( e ), e = setTimeout ( function (){ d = q ; a . apply ( h , g )}, c )) : ( d = f , a . apply ( h , g ))}}, escapeRegex : function ( a ){ return a . replace ( vc , " \\ $ 1 " )}, set : function ( a ){ if ( l . isPlainObject ( a )) return u . util . set ( a . _ ); if ( null === a ) return function (){}; if ( " function " === typeof a ) return function ( c , d , e ){ a ( c , " set " , d , e )}; if ( " string " !== typeof a ||- 1 === a . indexOf ( " . " ) &&- 1 === a . indexOf ( " [ " ) &&- 1 === a . indexOf ( " ( " )) return function ( c ,
d ){ c [ a ] = d }; var b = function ( c , d , e ){ e = bb ( e ); var h = e [ e . length - 1 ]; for ( var f , g , k = 0 , m = e . length - 1 ; k < m ; k ++ ){ if ( " __proto__ " === e [ k ] || " constructor " === e [ k ]) throw Error ( " Cannot set prototype values " ); f = e [ k ] . match ( Fa ); g = e [ k ] . match ( sa ); if ( f ){ e [ k ] = e [ k ] . replace ( Fa , " " ); c [ e [ k ]] = []; h = e . slice (); h . splice ( 0 , k + 1 ); f = h . join ( " . " ); if ( Array . isArray ( d )) for ( g = 0 , m = d . length ; g < m ; g ++ ) h = {}, b ( h , d [ g ], f ), c [ e [ k ]] . push ( h ); else c [ e [ k ]] = d ; return } g && ( e [ k ] = e [ k ] . replace ( sa , " " ), c = c [ e [ k ]]( d )); if ( null === c [ e [ k ]] || c [ e [ k ]] === q ) c [ e [ k ]] = {}; c = c [ e [ k ]]} if ( h . match ( sa )) c [ h . replace ( sa ,
" " )]( d ); else c [ h . replace ( Fa , " " )] = d }; return function ( c , d ){ return b ( c , d , a )}}, get : function ( a ){ if ( l . isPlainObject ( a )){ var b = {}; l . each ( a , function ( d , e ){ e && ( b [ d ] = u . util . get ( e ))}); return function ( d , e , h , f ){ var g = b [ e ] || b . _ ; return g !== q ? g ( d , e , h , f ) : d }} if ( null === a ) return function ( d ){ return d }; if ( " function " === typeof a ) return function ( d , e , h , f ){ return a ( d , e , h , f )}; if ( " string " !== typeof a ||- 1 === a . indexOf ( " . " ) &&- 1 === a . indexOf ( " [ " ) &&- 1 === a . indexOf ( " ( " )) return function ( d , e ){ return d [ a ]}; var c = function ( d , e , h ){ if ( " " !== h ){ var f =
bb ( h ); for ( var g = 0 , k = f . length ; g < k ; g ++ ){ h = f [ g ] . match ( Fa ); var m = f [ g ] . match ( sa ); if ( h ){ f [ g ] = f [ g ] . replace ( Fa , " " ); " " !== f [ g ] && ( d = d [ f [ g ]]); m = []; f . splice ( 0 , g + 1 ); f = f . join ( " . " ); if ( Array . isArray ( d )) for ( g = 0 , k = d . length ; g < k ; g ++ ) m . push ( c ( d [ g ], e , f )); d = h [ 0 ] . substring ( 1 , h [ 0 ] . length - 1 ); d = " " === d ? m : m . join ( d ); break } else if ( m ){ f [ g ] = f [ g ] . replace ( sa , " " ); d = d [ f [ g ]](); continue } if ( null === d || d [ f [ g ]] === q ) return q ; d = d [ f [ g ]]}} return d }; return function ( d , e ){ return c ( d , e , a )}}}; var S = function ( a , b , c ){ a [ b ] !== q && ( a [ c ] = a [ b ])}, Fa =/ \ [ .* ? \ ] $ / ,
sa =/ \ ( \ ) $ / , na = u . util . get , ha = u . util . set , ib = u . util . escapeRegex , Qa = l ( " <div> " )[ 0 ], sc = Qa . textContent !== q , tc =/<.* ?> /g,gb=u.util.throttle,nc=[],N=Array.prototype,wc=function(a){var b,c=u.settings,d=l.map(c,function(h,f){return h.nTable});if(a){if(a.nTable&&a.oApi)return[a];if(a.nodeName&&"table"===a.nodeName.toLowerCase()){var e=l.inArray(a,d);return-1!==e?[c[e]]:null}if(a&&"function"===typeof a.settings)return a.settings().toArray();"string"===typeof a?b=l(a):a instanceof l&&(b=a)}else return[];if(b)return b.map(function(h){e=
l . inArray ( this , d ); return - 1 !== e ? c [ e ] : null }) . toArray ()}; var B = function ( a , b ){ if ( ! ( this instanceof B )) return new B ( a , b ); var c = [], d = function ( f ){( f = wc ( f )) && c . push . apply ( c , f )}; if ( Array . isArray ( a )) for ( var e = 0 , h = a . length ; e < h ; e ++ ) d ( a [ e ]); else d ( a ); this . context = Ma ( c ); b && l . merge ( this , b ); this . selector = { rows : null , cols : null , opts : null }; B . extend ( this , this , nc )}; u . Api = B ; l . extend ( B . prototype ,{ any : function (){ return 0 !== this . count ()}, concat : N . 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 B ( b [ a ], this [ a ]) : null }, filter : function ( a ){ var b = []; if ( N . filter ) b = N . 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 B ( this . context , b )}, flatten : function (){ var a = []; return new B ( this . context , a . concat . apply ( a , this . toArray ()))}, join : N . join , indexOf : N . indexOf || function ( a , b ){ b = b || 0 ; for ( var c = this . length ; b < c ; b ++ ) if ( this [ b ] ===
a ) return b ; return - 1 }, iterator : function ( a , b , c , d ){ var e = [], h , f , g = this . context , k , m = this . selector ; " string " === typeof a && ( d = c , c = b , b = a , a =! 1 ); var n = 0 ; for ( h = g . length ; n < h ; n ++ ){ var p = new B ( g [ n ]); if ( " table " === b ){ var t = c . call ( p , g [ n ], n ); t !== q && e . push ( t )} else if ( " columns " === b || " rows " === b ) t = c . call ( p , g [ n ], this [ n ], n ), t !== q && e . push ( t ); else if ( " column " === b || " column-rows " === b || " row " === b || " cell " === b ){ var v = this [ n ]; " column-rows " === b && ( k = Va ( g [ n ], m . opts )); var x = 0 ; for ( f = v . length ; x < f ; x ++ ) t = v [ x ], t = " cell " === b ? c . call ( p , g [ n ], t . row ,
t . column , n , x ) : c . call ( p , g [ n ], t , n , x , k ), t !== q && e . push ( t )}} return e . length || d ? ( a = new B ( g , a ? e . concat . apply ([], e ) : e ), b = a . selector , b . rows = m . rows , b . cols = m . cols , b . opts = m . opts , a ) : this }, lastIndexOf : N . lastIndexOf || function ( a , b ){ return this . indexOf . apply ( this . toArray . reverse (), arguments )}, length : 0 , map : function ( a ){ var b = []; if ( N . map ) b = N . 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 B ( this . context , b )}, pluck : function ( a ){ return this . map ( function ( b ){ return b [ a ]})},
pop : N . pop , push : N . push , reduce : N . reduce || function ( a , b ){ return Cb ( this , a , b , 0 , this . length , 1 )}, reduceRight : N . reduceRight || function ( a , b ){ return Cb ( this , a , b , this . length - 1 , - 1 , - 1 )}, reverse : N . reverse , selector : null , shift : N . shift , slice : function (){ return new B ( this . context , this )}, sort : N . sort , splice : N . splice , toArray : function (){ return N . slice . call ( this )}, to $ : function (){ return l ( this )}, toJQuery : function (){ return l ( this )}, unique : function (){ return new B ( this . context , Ma ( this ))}, unshift : N . unshift }); B . extend = function ( a ,
b , c ){ if ( c . length && b && ( b instanceof B || b . __dt_wrapper )){ var d , e = function ( g , k , m ){ return function (){ var n = k . apply ( g , arguments ); B . extend ( n , n , m . methodExt ); return n }}; var h = 0 ; for ( d = c . length ; h < d ; h ++ ){ var f = c [ h ]; b [ f . name ] = " function " === f . type ? e ( a , f . val , f ) : " object " === f . type ? {} : f . val ; b [ f . name ] . __dt_wrapper =! 0 ; B . extend ( a , b [ f . name ], f . propExt )}}}; B . register = y = function ( a , b ){ if ( Array . isArray ( a )) for ( var c = 0 , d = a . length ; c < d ; c ++ ) B . register ( a [ c ], b ); else { d = a . split ( " . " ); var e = nc , h ; a = 0 ; for ( c = d . length ; a < c ; a ++ ){ var f = ( h =- 1 !==
d [ a ] . indexOf ( " () " )) ? d [ a ] . replace ( " () " , " " ) : d [ a ]; a : { var g = 0 ; for ( var k = e . length ; g < k ; g ++ ) if ( e [ g ] . name === f ){ g = e [ g ]; break a } g = null } g || ( g = { name : f , val : {}, methodExt : [], propExt : [], type : " object " }, e . push ( g )); a === c - 1 ? ( g . val = b , g . type = " function " === typeof b ? " function " : l . isPlainObject ( b ) ? " object " : " other " ) : e = h ? g . methodExt : g . propExt }}}; B . registerPlural = J = function ( a , b , c ){ B . register ( a , c ); B . register ( b , function (){ var d = c . apply ( this , arguments ); return d === this ? this : d instanceof B ? d . length ? Array . isArray ( d [ 0 ]) ? new B ( d . context ,
d [ 0 ]) : d [ 0 ] : q : d })}; var oc = function ( a , b ){ if ( Array . isArray ( a )) return l . map ( a , function ( d ){ return oc ( d , b )}); if ( " number " === typeof a ) return [ b [ a ]]; var c = l . map ( b , function ( d , e ){ return d . nTable }); return l ( c ) . filter ( a ) . map ( function ( d ){ d = l . inArray ( this , c ); return b [ d ]}) . toArray ()}; y ( " tables() " , function ( a ){ return a !== q && null !== a ? new B ( oc ( a , this . context )) : this }); y ( " table() " , function ( a ){ a = this . tables ( a ); var b = a . context ; return b . length ? new B ( b [ 0 ]) : a }); J ( " tables().nodes() " , " table().node() " , function (){ return this . iterator ( " table " ,
function ( a ){ return a . nTable }, 1 )}); J ( " tables().body() " , " table().body() " , function (){ return this . iterator ( " table " , function ( a ){ return a . nTBody }, 1 )}); J ( " tables().header() " , " table().header() " , function (){ return this . iterator ( " table " , function ( a ){ return a . nTHead }, 1 )}); J ( " tables().footer() " , " table().footer() " , function (){ return this . iterator ( " table " , function ( a ){ return a . nTFoot }, 1 )}); J ( " tables().containers() " , " table().container() " , function (){ return this . iterator ( " table " , function ( a ){ return a . nTableWrapper }, 1 )});
y ( " draw() " , function ( a ){ return this . iterator ( " table " , function ( b ){ " page " === a ? ja ( b ) : ( " string " === typeof a && ( a = " full-hold " === a ? ! 1 :! 0 ), ka ( b , ! 1 === a ))})}); y ( " page() " , function ( a ){ return a === q ? this . page . info () . page : this . iterator ( " table " , function ( b ){ lb ( b , a )})}); y ( " page.info() " , function ( a ){ if ( 0 === this . context . length ) return q ; a = this . context [ 0 ]; var 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 " === Q ( a )}}); y ( " page.len() " , function ( a ){ return a === q ? 0 !== this . context . length ? this . context [ 0 ] . _iDisplayLength : q : this . iterator ( " table " , function ( b ){ jb ( b , a )})}); var pc = function ( a , b , c ){ if ( c ){ var d = new B ( a ); d . one ( " draw " , function (){ c ( d . ajax . json ())})} if ( " ssp " == Q ( a )) ka ( a , b ); else { V ( a , ! 0 ); var e = a . jqXHR ; e && 4 !== e . readyState && e . abort (); Oa ( a ,[], function ( h ){ Ka ( a ); h = Aa ( a , h ); for ( var f = 0 , g = h . length ; f < g ; f ++ ) ia ( a , h [ f ]); ka ( a , b ); V ( a , ! 1 )})}}; y ( " ajax.json() " ,
function (){ var a = this . context ; if ( 0 < a . length ) return a [ 0 ] . json }); y ( " ajax.params() " , function (){ var a = this . context ; if ( 0 < a . length ) return a [ 0 ] . oAjaxData }); y ( " ajax.reload() " , function ( a , b ){ return this . iterator ( " table " , function ( c ){ pc ( c , ! 1 === b , a )})}); y ( " ajax.url() " , function ( a ){ var b = this . context ; if ( a === q ){ if ( 0 === b . length ) return q ; b = b [ 0 ]; return b . ajax ? l . isPlainObject ( b . ajax ) ? b . ajax . url : b . ajax : b . sAjaxSource } return this . iterator ( " table " , function ( c ){ l . isPlainObject ( c . ajax ) ? c . ajax . url = a : c . ajax = a })}); y ( " ajax.url().load() " ,
function ( a , b ){ return this . iterator ( " table " , function ( c ){ pc ( c , ! 1 === b , a )})}); var ub = function ( a , b , c , d , e ){ var h = [], f , g , k ; var m = typeof b ; b && " string " !== m && " function " !== m && b . length !== q || ( b = [ b ]); m = 0 ; for ( g = b . length ; m < g ; m ++ ){ var n = b [ m ] && b [ m ] . split &&! b [ m ] . match ( / [ \ [ \ ( : ] / ) ? b [ m ] . split ( " , " ) : [ b [ m ]]; var p = 0 ; for ( k = n . length ; p < k ; p ++ )( f = c ( " string " === typeof n [ p ] ? n [ p ] . trim () : n [ p ])) && f . length && ( h = h . concat ( f ))} a = M . selector [ a ]; if ( a . length ) for ( m = 0 , g = a . length ; m < g ; m ++ ) h = a [ m ]( d , e , h ); return Ma ( h )}, vb = function ( a ){ a || ( a = {}); a . filter &&
a . search === q && ( a . search = a . filter ); return l . extend ({ search : " none " , order : " current " , page : " all " }, a )}, wb = 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 }, Va = function ( a , b ){ var c = [], d = a . aiDisplay ; var e = a . aiDisplayMaster ; var h = b . search ; var f = b . order ; b = b . page ; if ( " ssp " == Q ( a )) return " removed " === h ? [] : ra ( 0 , e . length ); if ( " current " == b ) for ( f = a . _iDisplayStart , a = a . fnDisplayEnd (); f < a ; f ++ ) c . push ( d [ f ]); else if ( " current " ==
f || " applied " == f ) if ( " none " == h ) c = e . slice (); else if ( " applied " == h ) c = d . slice (); else { if ( " removed " == h ){ var g = {}; f = 0 ; for ( a = d . length ; f < a ; f ++ ) g [ d [ f ]] = null ; c = l . map ( e , function ( k ){ return g . hasOwnProperty ( k ) ? null : k })}} else if ( " index " == f || " original " == f ) for ( f = 0 , a = a . aoData . length ; f < a ; f ++ ) " none " == h ? c . push ( f ) : ( e = l . inArray ( f , d ),( - 1 === e && " removed " == h || 0 <= e && " applied " == h ) && c . push ( f )); return c }, xc = function ( a , b , c ){ var d ; return ub ( " row " , b , function ( e ){ var h = hc ( e ), f = a . aoData ; if ( null !== h &&! c ) return [ h ]; d || ( d = Va ( a , c )); if ( null !==
h &&- 1 !== l . inArray ( h , d )) return [ h ]; if ( null === e || e === q || " " === e ) return d ; if ( " function " === typeof e ) return l . map ( d , function ( k ){ var m = f [ k ]; return e ( k , m . _aData , m . nTr ) ? k : null }); if ( e . nodeName ){ h = e . _DT_RowIndex ; var g = e . _DT_CellIndex ; if ( h !== q ) return f [ h ] && f [ h ] . nTr === e ? [ h ] : []; if ( g ) return f [ g . row ] && f [ g . row ] . nTr === e . parentNode ? [ g . row ] : []; h = l ( e ) . closest ( " *[data-dt-row] " ); return h . length ? [ h . data ( " dt-row " )] : []} if ( " string " === typeof e && " # " === e . charAt ( 0 ) && ( h = a . aIds [ e . replace ( /^ #/,"")],h!==q))return[h.idx];h=kc(Ea(a.aoData,
d , " nTr " )); return l ( h ) . filter ( e ) . map ( function (){ return this . _DT_RowIndex }) . toArray ()}, a , c )}; y ( " rows() " , function ( a , b ){ a === q ? a = " " : l . isPlainObject ( a ) && ( b = a , a = " " ); b = vb ( b ); var c = this . iterator ( " table " , function ( d ){ return xc ( d , a , b )}, 1 ); c . selector . rows = a ; c . selector . opts = b ; return c }); y ( " rows().nodes() " , function (){ return this . iterator ( " row " , function ( a , b ){ return a . aoData [ b ] . nTr || q }, 1 )}); y ( " rows().data() " , function (){ return this . iterator ( ! 0 , " rows " , function ( a , b ){ return Ea ( a . aoData , b , " _aData " )}, 1 )}); J ( " rows().cache() " ,
" row().cache() " , function ( a ){ return this . iterator ( " row " , function ( b , c ){ b = b . aoData [ c ]; return " search " === a ? b . _aFilterData : b . _aSortData }, 1 )}); J ( " rows().invalidate() " , " row().invalidate() " , function ( a ){ return this . iterator ( " row " , function ( b , c ){ wa ( b , c , a )})}); J ( " rows().indexes() " , " row().index() " , function (){ return this . iterator ( " row " , function ( a , b ){ return b }, 1 )}); J ( " rows().ids() " , " row().id() " , function ( a ){ for ( var b = [], c = this . context , d = 0 , e = c . length ; d < e ; d ++ ) for ( var h = 0 , f = this [ d ] . length ; h < f ; h ++ ){ var g = c [ d ] . rowIdFn ( c [ d ] . aoData [ this [ d ][ h ]] . _aData );
b . push (( ! 0 === a ? " # " : " " ) + g )} return new B ( c , b )}); J ( " rows().remove() " , " row().remove() " , function (){ var a = this ; this . iterator ( " row " , function ( b , c , d ){ var e = b . aoData , h = e [ c ], f , g ; e . splice ( c , 1 ); var k = 0 ; for ( f = e . length ; k < f ; k ++ ){ var m = e [ k ]; var n = m . anCells ; null !== m . nTr && ( m . nTr . _DT_RowIndex = k ); if ( null !== n ) for ( m = 0 , g = n . length ; m < g ; m ++ ) n [ m ] . _DT_CellIndex . row = k } La ( b . aiDisplayMaster , c ); La ( b . aiDisplay , c ); La ( a [ d ], c , ! 1 ); 0 < b . _iRecordsDisplay && b . _iRecordsDisplay -- ; kb ( b ); c = b . rowIdFn ( h . _aData ); c !== q && delete b . aIds [ c ]}); this . iterator ( " table " ,
function ( b ){ for ( var c = 0 , d = b . aoData . length ; c < d ; c ++ ) b . aoData [ c ] . idx = c }); return this }); y ( " rows.add() " , function ( a ){ var b = this . iterator ( " table " , function ( d ){ var e , h = []; var f = 0 ; for ( e = a . length ; f < e ; f ++ ){ var g = a [ f ]; g . nodeName && " TR " === g . nodeName . toUpperCase () ? h . push ( Ja ( d , g )[ 0 ]) : h . push ( ia ( d , g ))} return h }, 1 ), c = this . rows ( - 1 ); c . pop (); l . merge ( c , b ); return c }); y ( " row() " , function ( a , b ){ return wb ( this . rows ( a , b ))}); y ( " row().data() " , function ( a ){ var b = this . context ; if ( a === q ) return b . length && this . length ? b [ 0 ] . aoData [ this [ 0 ]] . _aData :
q ; var c = b [ 0 ] . aoData [ this [ 0 ]]; c . _aData = a ; Array . isArray ( a ) && c . nTr && c . nTr . id && ha ( b [ 0 ] . rowId )( a , c . nTr . id ); wa ( b [ 0 ], this [ 0 ], " data " ); return this }); y ( " row().node() " , function (){ var a = this . context ; return a . length && this . length ? a [ 0 ] . aoData [ this [ 0 ]] . nTr || null : null }); y ( " row.add() " , function ( a ){ a instanceof l && a . length && ( a = a [ 0 ]); var b = this . iterator ( " table " , function ( c ){ return a . nodeName && " TR " === a . nodeName . toUpperCase () ? Ja ( c , a )[ 0 ] : ia ( c , a )}); return this . row ( b [ 0 ])}); l ( A ) . on ( " plugin-init.dt " , function ( a , b ){ var c = new B ( b );
c . on ( " stateSaveParams " , function ( d , e , h ){ d = c . rows () . iterator ( " row " , function ( f , g ){ return f . aoData [ g ] . _detailsShow ? g : q }); h . childRows = c . rows ( d ) . ids ( ! 0 ) . toArray ()});( a = c . state . loaded ()) && a . childRows && c . rows ( a . childRows ) . every ( function (){ F ( b , null , " requestChild " ,[ this ])})}); var yc = function ( a , b , c , d ){ var e = [], h = function ( f , g ){ if ( Array . isArray ( f ) || f instanceof l ) for ( var k = 0 , m = f . length ; k < m ; k ++ ) h ( f [ k ], g ); else f . nodeName && " tr " === f . nodeName . toLowerCase () ? e . push ( f ) : ( k = l ( " <tr><td></td></tr> " ) . addClass ( g ), l ( " td " , k ) . addClass ( g ) . html ( f )[ 0 ] . colSpan =
oa ( a ), e . push ( k [ 0 ]))}; h ( c , d ); b . _details && b . _details . detach (); b . _details = l ( e ); b . _detailsShow && b . _details . insertAfter ( b . nTr )}, xb = function ( a , b ){ var c = a . context ; c . length && ( a = c [ 0 ] . aoData [ b !== q ? b : a [ 0 ]]) && a . _details && ( a . _details . remove (), a . _detailsShow = q , a . _details = q , l ( a . nTr ) . removeClass ( " dt-hasChild " ), qa ( c [ 0 ]))}, qc = function ( a , b ){ var c = a . context ; if ( c . length && a . length ){ var d = c [ 0 ] . aoData [ a [ 0 ]]; d . _details && (( d . _detailsShow = b ) ? ( d . _details . insertAfter ( d . nTr ), l ( d . nTr ) . addClass ( " dt-hasChild " )) : ( d . _details . detach (),
l ( d . nTr ) . removeClass ( " dt-hasChild " )), F ( c [ 0 ], null , " childRow " ,[ b , a . row ( a [ 0 ])]), zc ( c [ 0 ]), qa ( c [ 0 ]))}}, zc = function ( a ){ var b = new B ( a ), c = a . aoData ; b . off ( " draw.dt.DT_details column-visibility.dt.DT_details destroy.dt.DT_details " ); 0 < U ( c , " _details " ) . length && ( b . on ( " draw.dt.DT_details " , function ( d , e ){ a === e && b . rows ({ page : " current " }) . eq ( 0 ) . each ( function ( h ){ h = c [ h ]; h . _detailsShow && h . _details . insertAfter ( h . nTr )})}), b . on ( " column-visibility.dt.DT_details " , function ( d , e , h , f ){ if ( a === e ) for ( e = oa ( e ), h = 0 , f = c . length ; h < f ; h ++ ) d =
c [ h ], d . _details && d . _details . children ( " td[colspan] " ) . attr ( " colspan " , e )}), b . on ( " destroy.dt.DT_details " , function ( d , e ){ if ( a === e ) for ( d = 0 , e = c . length ; d < e ; d ++ ) c [ d ] . _details && xb ( b , d )}))}; y ( " row().child() " , function ( a , b ){ var c = this . context ; if ( a === q ) return c . length && this . length ? c [ 0 ] . aoData [ this [ 0 ]] . _details : q ; ! 0 === a ? this . child . show () :! 1 === a ? xb ( this ) : c . length && this . length && yc ( c [ 0 ], c [ 0 ] . aoData [ this [ 0 ]], a , b ); return this }); y ([ " row().child.show() " , " row().child().show() " ], function ( a ){ qc ( this , ! 0 ); return this }); y ([ " row().child.hide() " ,
" row().child().hide() " ], function (){ qc ( this , ! 1 ); return this }); y ([ " row().child.remove() " , " row().child().remove() " ], function (){ xb ( this ); return this }); y ( " row().child.isShown() " , function (){ var a = this . context ; return a . length && this . length ? a [ 0 ] . aoData [ this [ 0 ]] . _detailsShow ||! 1 :! 1 }); var Ac =/^ ([ ^: ] + ) : ( name | visIdx | visible ) $ / , rc = function ( a , b , c , d , e ){ c = []; d = 0 ; for ( var h = e . length ; d < h ; d ++ ) c . push ( T ( a , e [ d ], b )); return c }, Bc = function ( a , b , c ){ var d = a . aoColumns , e = U ( d , " sName " ), h = U ( d , " nTh " ); return ub ( " column " , b , function ( f ){ var g =
hc ( f ); if ( " " === f ) return ra ( d . length ); if ( null !== g ) return [ 0 <= g ? g : d . length + g ]; if ( " function " === typeof f ){ var k = Va ( a , c ); return l . map ( d , function ( p , t ){ return f ( t , rc ( a , t , 0 , 0 , k ), h [ t ]) ? t : null })} var m = " string " === typeof f ? f . match ( Ac ) : " " ; if ( m ) switch ( m [ 2 ]){ case " visIdx " : case " visible " : g = parseInt ( m [ 1 ], 10 ); if ( 0 > g ){ var n = l . map ( d , function ( p , t ){ return p . bVisible ? t : null }); return [ n [ n . length + g ]]} return [ ua ( a , g )]; case " name " : return l . map ( e , function ( p , t ){ return p === m [ 1 ] ? t : null }); default : return []} if ( f . nodeName && f . _DT_CellIndex ) return [ f . _DT_CellIndex . column ];
g = l ( h ) . filter ( f ) . map ( function (){ return l . inArray ( this , h )}) . toArray (); if ( g . length ||! f . nodeName ) return g ; g = l ( f ) . closest ( " *[data-dt-column] " ); return g . length ? [ g . data ( " dt-column " )] : []}, a , c )}; y ( " columns() " , function ( a , b ){ a === q ? a = " " : l . isPlainObject ( a ) && ( b = a , a = " " ); b = vb ( b ); var c = this . iterator ( " table " , function ( d ){ return Bc ( d , a , b )}, 1 ); c . selector . cols = a ; c . selector . opts = b ; return c }); J ( " columns().header() " , " column().header() " , function ( a , b ){ return this . iterator ( " column " , function ( c , d ){ return c . aoColumns [ d ] . nTh },
1 )}); J ( " columns().footer() " , " column().footer() " , function ( a , b ){ return this . iterator ( " column " , function ( c , d ){ return c . aoColumns [ d ] . nTf }, 1 )}); J ( " columns().data() " , " column().data() " , function (){ return this . iterator ( " column-rows " , rc , 1 )}); J ( " columns().dataSrc() " , " column().dataSrc() " , function (){ return this . iterator ( " column " , function ( a , b ){ return a . aoColumns [ b ] . mData }, 1 )}); J ( " columns().cache() " , " column().cache() " , function ( a ){ return this . iterator ( " column-rows " , function ( b , c , d , e , h ){ return Ea ( b . aoData , h , " search " ===
a ? " _aFilterData " : " _aSortData " , c )}, 1 )}); J ( " columns().nodes() " , " column().nodes() " , function (){ return this . iterator ( " column-rows " , function ( a , b , c , d , e ){ return Ea ( a . aoData , e , " anCells " , b )}, 1 )}); J ( " columns().visible() " , " column().visible() " , function ( a , b ){ var c = this , d = this . iterator ( " column " , function ( e , h ){ if ( a === q ) return e . aoColumns [ h ] . bVisible ; var f = e . aoColumns , g = f [ h ], k = e . aoData , m ; if ( a !== q && g . bVisible !== a ){ if ( a ){ var n = l . inArray ( ! 0 , U ( f , " bVisible " ), h + 1 ); f = 0 ; for ( m = k . length ; f < m ; f ++ ){ var p = k [ f ] . nTr ; e = k [ f ] . anCells ;
p && p . insertBefore ( e [ h ], e [ n ] || null )}} else l ( U ( e . aoData , " anCells " , h )) . detach (); g . bVisible = a }}); a !== q && this . iterator ( " table " , function ( e ){ ya ( e , e . aoHeader ); ya ( e , e . aoFooter ); e . aiDisplay . length || l ( e . nTBody ) . find ( " td[colspan] " ) . attr ( " colspan " , oa ( e )); qa ( e ); c . iterator ( " column " , function ( h , f ){ F ( h , null , " column-visibility " ,[ h , f , a , b ])});( b === q || b ) && c . columns . adjust ()}); return d }); J ( " columns().indexes() " , " column().index() " , function ( a ){ return this . iterator ( " column " , function ( b , c ){ return " visible " === a ? va ( b , c ) : c }, 1 )});
y ( " columns.adjust() " , function (){ return this . iterator ( " table " , function ( a ){ ta ( a )}, 1 )}); y ( " column.index() " , function ( a , b ){ if ( 0 !== this . context . length ){ var c = this . context [ 0 ]; if ( " fromVisible " === a || " toData " === a ) return ua ( c , b ); if ( " fromData " === a || " toVisible " === a ) return va ( c , b )}}); y ( " column() " , function ( a , b ){ return wb ( this . columns ( a , b ))}); var Cc = function ( a , b , c ){ var d = a . aoData , e = Va ( a , c ), h = kc ( Ea ( d , e , " anCells " )), f = l ( lc ([], h )), g , k = a . aoColumns . length , m , n , p , t , v , x ; return ub ( " cell " , b , function ( w ){ var r = " function " === typeof w ;
if ( null === w || w === q || r ){ m = []; n = 0 ; for ( p = e . length ; n < p ; n ++ ) for ( g = e [ n ], t = 0 ; t < k ; t ++ ) v = { row : g , column : t }, r ? ( x = d [ g ], w ( v , T ( a , g , t ), x . anCells ? x . anCells [ t ] : null ) && m . push ( v )) : m . push ( v ); return m } if ( l . isPlainObject ( w )) return w . column !== q && w . row !== q &&- 1 !== l . inArray ( w . row , e ) ? [ w ] : []; r = f . filter ( w ) . map ( function ( C , G ){ return { row : G . _DT_CellIndex . row , column : G . _DT_CellIndex . column }}) . toArray (); if ( r . length ||! w . nodeName ) return r ; x = l ( w ) . closest ( " *[data-dt-row] " ); return x . length ? [{ row : x . data ( " dt-row " ), column : x . data ( " dt-column " )}] :
[]}, a , c )}; y ( " cells() " , function ( a , b , c ){ l . isPlainObject ( a ) && ( a . row === q ? ( c = a , a = null ) : ( c = b , b = null )); l . isPlainObject ( b ) && ( c = b , b = null ); if ( null === b || b === q ) return this . iterator ( " table " , function ( n ){ return Cc ( n , a , vb ( c ))}); var d = c ? { page : c . page , order : c . order , search : c . search } : {}, e = this . columns ( b , d ), h = this . rows ( a , d ), f , g , k , m ; d = this . iterator ( " table " , function ( n , p ){ n = []; f = 0 ; for ( g = h [ p ] . length ; f < g ; f ++ ) for ( k = 0 , m = e [ p ] . length ; k < m ; k ++ ) n . push ({ row : h [ p ][ f ], column : e [ p ][ k ]}); return n }, 1 ); d = c && c . selected ? this . cells ( d , c ) : d ; l . extend ( d . selector ,
{ cols : b , rows : a , opts : c }); return d }); J ( " cells().nodes() " , " cell().node() " , function (){ return this . iterator ( " cell " , function ( a , b , c ){ return ( a = a . aoData [ b ]) && a . anCells ? a . anCells [ c ] : q }, 1 )}); y ( " cells().data() " , function (){ return this . iterator ( " cell " , function ( a , b , c ){ return T ( a , b , c )}, 1 )}); J ( " 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 )}); J ( " cells().render() " , " cell().render() " , function ( a ){ return this . iterator ( " cell " ,
function ( b , c , d ){ return T ( b , c , d , a )}, 1 )}); J ( " cells().indexes() " , " cell().index() " , function (){ return this . iterator ( " cell " , function ( a , b , c ){ return { row : b , column : c , columnVisible : va ( a , c )}}, 1 )}); J ( " cells().invalidate() " , " cell().invalidate() " , function ( a ){ return this . iterator ( " cell " , function ( b , c , d ){ wa ( b , c , a , d )})}); y ( " cell() " , function ( a , b , c ){ return wb ( this . cells ( a , b , c ))}); y ( " cell().data() " , function ( a ){ var b = this . context , c = this [ 0 ]; if ( a === q ) return b . length && c . length ? T ( b [ 0 ], c [ 0 ] . row , c [ 0 ] . column ) : q ; Eb ( b [ 0 ], c [ 0 ] . row ,
c [ 0 ] . column , a ); wa ( b [ 0 ], c [ 0 ] . row , " data " , c [ 0 ] . column ); return this }); y ( " order() " , function ( a , b ){ var c = this . context ; if ( a === q ) return 0 !== c . length ? c [ 0 ] . aaSorting : q ; " number " === typeof a ? a = [[ a , b ]] : a . length &&! Array . isArray ( a [ 0 ]) && ( a = Array . prototype . slice . call ( arguments )); return this . iterator ( " table " , function ( d ){ d . aaSorting = a . slice ()})}); y ( " order.listener() " , function ( a , b , c ){ return this . iterator ( " table " , function ( d ){ eb ( d , a , b , c )})}); y ( " order.fixed() " , function ( a ){ if ( ! a ){ var b = this . context ; b = b . length ? b [ 0 ] . aaSortingFixed :
q ; return Array . isArray ( b ) ? { pre : b } : b } return this . iterator ( " table " , function ( c ){ c . aaSortingFixed = l . extend ( ! 0 ,{}, a )})}); y ([ " columns().order() " , " column().order() " ], function ( a ){ var b = this ; return this . iterator ( " table " , function ( c , d ){ var e = []; l . each ( b [ d ], function ( h , f ){ e . push ([ f , a ])}); c . aaSorting = e })}); y ( " search() " , function ( a , b , c , d ){ var e = this . context ; return a === q ? 0 !== e . length ? e [ 0 ] . oPreviousSearch . sSearch : q : this . iterator ( " table " , function ( h ){ h . oFeatures . bFilter && za ( h , l . extend ({}, h . oPreviousSearch ,{ sSearch : a +
" " , bRegex : null === b ? ! 1 : b , bSmart : null === c ? ! 0 : c , bCaseInsensitive : null === d ? ! 0 : d }), 1 )})}); J ( " columns().search() " , " column().search() " , function ( a , b , c , d ){ return this . iterator ( " column " , function ( e , h ){ var f = e . aoPreSearchCols ; if ( a === q ) return f [ h ] . sSearch ; e . oFeatures . bFilter && ( l . extend ( f [ h ],{ sSearch : a + " " , bRegex : null === b ? ! 1 : b , bSmart : null === c ? ! 0 : c , bCaseInsensitive : null === d ? ! 0 : d }), za ( e , e . oPreviousSearch , 1 ))})}); y ( " state() " , function (){ return this . context . length ? this . context [ 0 ] . oSavedState : null }); y ( " state.clear() " ,
function (){ return this . iterator ( " table " , function ( a ){ a . fnStateSaveCallback . call ( a . oInstance , a ,{})})}); y ( " state.loaded() " , function (){ return this . context . length ? this . context [ 0 ] . oLoadedState : null }); y ( " state.save() " , function (){ return this . iterator ( " table " , function ( a ){ qa ( a )})}); u . versionCheck = u . fnVersionCheck = function ( a ){ var b = u . version . split ( " . " ); a = a . split ( " . " ); for ( var c , d , e = 0 , h = a . length ; e < h ; e ++ ) if ( c = parseInt ( b [ e ], 10 ) || 0 , d = parseInt ( a [ e ], 10 ) || 0 , c !== d ) return c > d ; return ! 0 }; u . isDataTable = u . fnIsDataTable = function ( a ){ var b =
l ( a ) . get ( 0 ), c =! 1 ; if ( a instanceof u . Api ) return ! 0 ; l . each ( u . settings , function ( d , e ){ d = e . nScrollHead ? l ( " table " , e . nScrollHead )[ 0 ] : null ; var h = e . nScrollFoot ? l ( " table " , e . nScrollFoot )[ 0 ] : null ; if ( e . nTable === b || d === b || h === b ) c =! 0 }); return c }; u . tables = u . fnTables = function ( a ){ var b =! 1 ; l . isPlainObject ( a ) && ( b = a . api , a = a . visible ); var c = l . map ( u . settings , function ( d ){ if ( ! a || a && l ( d . nTable ) . is ( " :visible " )) return d . nTable }); return b ? new B ( c ) : c }; u . camelToHungarian = P ; y ( " $ () " , function ( a , b ){ b = this . rows ( b ) . nodes (); b = l ( b ); return l ([] . concat ( b . filter ( a ) . toArray (),
b . find ( a ) . toArray ()))}); l . each ([ " on " , " one " , " off " ], function ( a , b ){ y ( b + " () " , function (){ var c = Array . prototype . slice . call ( arguments ); c [ 0 ] = l . map ( c [ 0 ] . split ( / \s / ), function ( e ){ return e . match ( / \ . dt\b / ) ? e : e + " .dt " }) . join ( " " ); var d = l ( this . tables () . nodes ()); d [ b ] . apply ( d , c ); return this })}); y ( " clear() " , function (){ return this . iterator ( " table " , function ( a ){ Ka ( a )})}); y ( " settings() " , function (){ return new B ( this . context , this . context )}); y ( " init() " , function (){ var a = this . context ; return a . length ? a [ 0 ] . oInit : null }); y ( " data() " ,
function (){ return this . iterator ( " table " , function ( a ){ return U ( a . aoData , " _aData " )}) . flatten ()}); y ( " destroy() " , function ( a ){ a = a ||! 1 ; return this . iterator ( " table " , function ( b ){ var c = b . nTableWrapper . parentNode , d = b . oClasses , e = b . nTable , h = b . nTBody , f = b . nTHead , g = b . nTFoot , k = l ( e ); h = l ( h ); var m = l ( b . nTableWrapper ), n = l . map ( b . aoData , function ( t ){ return t . nTr }), p ; b . bDestroying =! 0 ; F ( b , " aoDestroyCallback " , " destroy " ,[ b ]); a || ( new B ( b )) . columns () . visible ( ! 0 ); m . off ( " .DT " ) . find ( " :not(tbody *) " ) . off ( " .DT " ); l ( z ) . off ( " .DT- " + b . sInstance );
e != f . parentNode && ( k . children ( " thead " ) . detach (), k . append ( f )); g && e != g . parentNode && ( k . children ( " tfoot " ) . detach (), k . append ( g )); b . aaSorting = []; b . aaSortingFixed = []; Ra ( b ); l ( n ) . removeClass ( b . asStripeClasses . join ( " " )); l ( " th, td " , f ) . removeClass ( d . sSortable + " " + d . sSortableAsc + " " + d . sSortableDesc + " " + d . sSortableNone ); h . children () . detach (); h . append ( n ); f = a ? " remove " : " detach " ; k [ f ](); m [ f ](); ! a && c && ( c . insertBefore ( e , b . nTableReinsertBefore ), k . css ( " width " , b . sDestroyWidth ) . removeClass ( d . sTable ),( p = b . asDestroyStripes . length ) &&
h . children () . each ( function ( t ){ l ( this ) . addClass ( b . asDestroyStripes [ t % p ])})); c = l . inArray ( b , u . settings ); - 1 !== c && u . settings . splice ( c , 1 )})}); l . each ([ " column " , " row " , " cell " ], function ( a , b ){ y ( b + " s().every() " , function ( c ){ var d = this . selector . opts , e = this ; return this . iterator ( b , function ( h , f , g , k , m ){ c . call ( e [ b ]( f , " cell " === b ? g : d , " cell " === b ? d : q ), f , g , k , m )})})}); y ( " i18n() " , function ( a , b , c ){ var d = this . context [ 0 ]; a = na ( a )( d . oLanguage ); a === q && ( a = b ); c !== q && l . isPlainObject ( a ) && ( a = a [ c ] !== q ? a [ c ] : a . _ ); return a . replace ( " %d " , c )});
u . version = " 1.11.3 " ; u . settings = []; u . models = {}; u . models . oSearch = { bCaseInsensitive :! 0 , sSearch : " " , bRegex :! 1 , bSmart :! 0 , " return " :! 1 }; u . models . oRow = { nTr : null , anCells : null , _aData : [], _aSortData : null , _aFilterData : null , _sFilterRow : null , _sRowStripe : " " , src : null , idx :- 1 }; u . 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 }; u . 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 ){ return {}}},
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 : l . extend ({}, u . models . oSearch ), sAjaxDataProp : " data " ,
sAjaxSource : null , sDom : " lfrtip " , searchDelay : null , sPaginationType : " simple_numbers " , sScrollX : " " , sScrollXInner : " " , sScrollY : " " , sServerMethod : " GET " , renderer : null , rowId : " DT_RowId " }; E ( u . defaults ); u . 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 }; E ( u . defaults . column ); u . 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 , jqXHR : null , json : q , oAjaxData : q , 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 " == Q ( this ) ? 1 * this . _iRecordsTotal : this . aiDisplayMaster . length },
fnRecordsDisplay : function (){ return " ssp " == Q ( 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 , h = e . bPaginate ; return e . bServerSide ? ! 1 === h ||- 1 === a ? b + d : Math . min ( b + a , this . _iRecordsDisplay ) :! h || c > d ||- 1 === a ? d : c }, oInstance : null , sInstance : null , iTabIndex : 0 , nScrollHead : null , nScrollFoot : null , aLastSort : [], oPlugins : {}, rowIdFn : null , rowId : null }; u . ext = M = { buttons : {}, classes : {}, builder : " bs4/dt-1.11.3/r-2.2.9 " ,
errMode : " alert " , feature : [], search : [], selector : { cell : [], column : [], row : []}, internal : {}, legacy : { ajax : null }, pager : {}, renderer : { pageButton : {}, header : {}}, order : {}, type : { detect : [], search : {}, order : {}}, _unique : 0 , fnVersionCheck : u . fnVersionCheck , iApiIndex : 0 , oJUIClasses : {}, sVersion : u . version }; l . extend ( M ,{ afnFiltering : M . search , aTypes : M . type . detect , ofnSearch : M . type . search , oSort : M . type . order , afnSortData : M . order , aoFeatures : M . feature , oApi : M . internal , oStdClasses : M . classes , oPagination : M . pager }); l . extend ( u . 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_desc_disabled " , sSortableDesc : " sorting_asc_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 ec =
u . ext . pager ; l . extend ( ec ,{ simple : function ( a , b ){ return [ " previous " , " next " ]}, full : function ( a , b ){ return [ " first " , " previous " , " next " , " last " ]}, numbers : function ( a , b ){ return [ Da ( a , b )]}, simple_numbers : function ( a , b ){ return [ " previous " , Da ( a , b ), " next " ]}, full_numbers : function ( a , b ){ return [ " first " , " previous " , Da ( a , b ), " next " , " last " ]}, first_last_numbers : function ( a , b ){ return [ " first " , Da ( a , b ), " last " ]}, _numbers : Da , numbers_length : 7 }); l . extend ( ! 0 , u . ext . renderer ,{ pageButton : { _ : function ( a , b , c , d , e , h ){ var f = a . oClasses , g = a . oLanguage . oPaginate ,
k = a . oLanguage . oAria . paginate || {}, m , n , p = 0 , t = function ( x , w ){ var r , C = f . sPageButtonDisabled , G = function ( I ){ lb ( a , I . data . action , ! 0 )}; var aa = 0 ; for ( r = w . length ; aa < r ; aa ++ ){ var L = w [ aa ]; if ( Array . isArray ( L )){ var O = l ( " < " + ( L . DT_el || " div " ) + " /> " ) . appendTo ( x ); t ( O , L )} else { m = null ; n = L ; O = a . iTabIndex ; switch ( L ){ case " ellipsis " : x . append ( '<span class="ellipsis">…</span>' ); break ; case " first " : m = g . sFirst ; 0 === e && ( O =- 1 , n += " " + C ); break ; case " previous " : m = g . sPrevious ; 0 === e && ( O =- 1 , n += " " + C ); break ; case " next " : m = g . sNext ; if ( 0 ===
h || e === h - 1 ) O =- 1 , n += " " + C ; break ; case " last " : m = g . sLast ; if ( 0 === h || e === h - 1 ) O =- 1 , n += " " + C ; break ; default : m = a . fnFormatNumber ( L + 1 ), n = e === L ? f . sPageButtonActive : " " } null !== m && ( O = l ( " <a> " ,{ " class " : f . sPageButton + " " + n , " aria-controls " : a . sTableId , " aria-label " : k [ L ], " data-dt-idx " : p , tabindex : O , id : 0 === c && " string " === typeof L ? a . sTableId + " _ " + L : null }) . html ( m ) . appendTo ( x ), ob ( O ,{ action : L }, G ), p ++ )}}}; try { var v = l ( b ) . find ( A . activeElement ) . data ( " dt-idx " )} catch ( x ){} t ( l ( b ) . empty (), d ); v !== q && l ( b ) . find ( " [data-dt-idx= " + v + " ] " ) . trigger ( " focus " )}}});
l . extend ( u . ext . type . detect ,[ function ( a , b ){ b = b . oLanguage . sDecimal ; return tb ( a , b ) ? " num " + b : null }, function ( a , b ){ if ( a &&! ( a instanceof Date ) &&! uc . test ( a )) return null ; b = Date . parse ( a ); return null !== b &&! isNaN ( b ) || Z ( a ) ? " date " : null }, function ( a , b ){ b = b . oLanguage . sDecimal ; return tb ( a , b , ! 0 ) ? " num-fmt " + b : null }, function ( a , b ){ b = b . oLanguage . sDecimal ; return jc ( a , b ) ? " html-num " + b : null }, function ( a , b ){ b = b . oLanguage . sDecimal ; return jc ( a , b , ! 0 ) ? " html-num-fmt " + b : null }, function ( a , b ){ return Z ( a ) || " string " === typeof a &&- 1 !== a . indexOf ( " < " ) ?
" html " : null }]); l . extend ( u . ext . type . search ,{ html : function ( a ){ return Z ( a ) ? a : " string " === typeof a ? a . replace ( gc , " " ) . replace ( Ua , " " ) : " " }, string : function ( a ){ return Z ( a ) ? a : " string " === typeof a ? a . replace ( gc , " " ) : a }}); var Ta = function ( a , b , c , d ){ if ( 0 !== a && ( ! a || " - " === a )) return - Infinity ; b && ( a = ic ( a , b )); a . replace && ( c && ( a = a . replace ( c , " " )), d && ( a = a . replace ( d , " " ))); return 1 * a }; l . extend ( M . type . order ,{ " date-pre " : function ( a ){ a = Date . parse ( a ); return isNaN ( a ) ? - Infinity : a }, " html-pre " : function ( a ){ return Z ( a ) ? " " : a . replace ? a . replace ( /<.* ?> /g,
" " ) . toLowerCase () : a + " " }, " string-pre " : function ( a ){ return Z ( 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 }}); Wa ( " " ); l . extend ( ! 0 , u . ext . renderer ,{ header : { _ : function ( a , b , c , d ){ l ( a . nTable ) . on ( " order.dt.DT " , function ( e , h , f , g ){ a === h && ( e = c . idx , b . removeClass ( d . sSortAsc + " " + d . sSortDesc ) . addClass ( " asc " == g [ e ] ? d . sSortAsc : " desc " == g [ e ] ? d . sSortDesc : c . sSortingClass ))})}, jqueryui : function ( a , b , c ,
d ){ l ( " <div/> " ) . addClass ( d . sSortJUIWrapper ) . append ( b . contents ()) . append ( l ( " <span/> " ) . addClass ( d . sSortIcon + " " + c . sSortingClassJUI )) . appendTo ( b ); l ( a . nTable ) . on ( " order.dt.DT " , function ( e , h , f , g ){ a === h && ( e = c . idx , b . removeClass ( d . sSortAsc + " " + d . sSortDesc ) . addClass ( " asc " == g [ e ] ? d . sSortAsc : " desc " == g [ e ] ? d . sSortDesc : c . sSortingClass ), b . find ( " span. " + d . sSortIcon ) . removeClass ( d . sSortJUIAsc + " " + d . sSortJUIDesc + " " + d . sSortJUI + " " + d . sSortJUIAscAllowed + " " + d . sSortJUIDescAllowed ) . addClass ( " asc " == g [ e ] ? d . sSortJUIAsc : " desc " ==
g [ e ] ? d . sSortJUIDesc : c . sSortingClassJUI ))})}}}); var yb = function ( a ){ Array . isArray ( a ) && ( a = a . join ( " , " )); return " string " === typeof a ? a . replace ( /&/ g , " & " ) . replace ( /</ g , " < " ) . replace ( />/ g , " > " ) . replace ( / " /g, " & quot ; " ):a};u.render= { number:function(a,b,c,d,e) { return { display:function(h) { if( " number " !==typeof h&& " string " !==typeof h)return h;var f=0>h? " - " : " " ,g=parseFloat(h);if(isNaN(g))return yb(h);g=g.toFixed(c);h=Math.abs(g);g=parseInt(h,10);h=c?b+(h-g).toFixed(c).substring(2): " " ;0===g&&0===parseFloat(h)&&
( f = " " ); return f + ( d || " " ) + g . toString () . replace ( / \B ( ? = ( \d { 3 }) + ( ? ! \d )) / g , a ) + h + ( e || " " )}}}, text : function (){ return { display : yb , filter : yb }}}; l . extend ( u . ext . internal ,{ _fnExternApiFunc : fc , _fnBuildAjax : Oa , _fnAjaxUpdate : Gb , _fnAjaxParameters : Pb , _fnAjaxUpdateDraw : Qb , _fnAjaxDataSrc : Aa , _fnAddColumn : Xa , _fnColumnOptions : Ga , _fnAdjustColumnSizing : ta , _fnVisibleToColumnIndex : ua , _fnColumnIndexToVisible : va , _fnVisbleColumns : oa , _fnGetColumns : Ia , _fnColumnTypes : Za , _fnApplyColumnDefs : Db , _fnHungarianMap : E , _fnCamelToHungarian : P ,
_fnLanguageCompat : ma , _fnBrowserDetect : Bb , _fnAddData : ia , _fnAddTr : Ja , _fnNodeToDataIndex : function ( a , b ){ return b . _DT_RowIndex !== q ? b . _DT_RowIndex : null }, _fnNodeToColumnIndex : function ( a , b , c ){ return l . inArray ( c , a . aoData [ b ] . anCells )}, _fnGetCellData : T , _fnSetCellData : Eb , _fnSplitObjNotation : bb , _fnGetObjectDataFn : na , _fnSetObjectDataFn : ha , _fnGetDataMaster : cb , _fnClearTable : Ka , _fnDeleteIndex : La , _fnInvalidate : wa , _fnGetRowElements : ab , _fnCreateTr : $a , _fnBuildHead : Fb , _fnDrawHead : ya , _fnDraw : ja , _fnReDraw : ka , _fnAddOptionsHtml : Ib ,
_fnDetectHeader : xa , _fnGetUniqueThs : Na , _fnFeatureHtmlFilter : Kb , _fnFilterComplete : za , _fnFilterCustom : Tb , _fnFilterColumn : Sb , _fnFilter : Rb , _fnFilterCreateSearch : hb , _fnEscapeRegex : ib , _fnFilterData : Ub , _fnFeatureHtmlInfo : Nb , _fnUpdateInfo : Xb , _fnInfoMacros : Yb , _fnInitialise : Ba , _fnInitComplete : Pa , _fnLengthChange : jb , _fnFeatureHtmlLength : Jb , _fnFeatureHtmlPaginate : Ob , _fnPageChange : lb , _fnFeatureHtmlProcessing : Lb , _fnProcessingDisplay : V , _fnFeatureHtmlTable : Mb , _fnScrollDraw : Ha , _fnApplyToChildren : ca , _fnCalculateColumnWidths : Ya ,
_fnThrottle : gb , _fnConvertToWidth : Zb , _fnGetWidestNode : $b , _fnGetMaxLenString : ac , _fnStringToCss : K , _fnSortFlatten : pa , _fnSort : Hb , _fnSortAria : cc , _fnSortListener : nb , _fnSortAttachListener : eb , _fnSortingClasses : Ra , _fnSortData : bc , _fnSaveState : qa , _fnLoadState : dc , _fnImplementState : pb , _fnSettingsFromNode : Sa , _fnLog : da , _fnMap : X , _fnBindAction : ob , _fnCallbackReg : R , _fnCallbackFire : F , _fnLengthOverflow : kb , _fnRenderer : fb , _fnDataSource : Q , _fnRowAttributes : db , _fnExtend : qb , _fnCalculateEnd : function (){}}); l . fn . dataTable = u ; u . $ =
l ; l . fn . dataTableSettings = u . settings ; l . fn . dataTableExt = u . ext ; l . fn . DataTable = function ( a ){ return l ( this ) . dataTable ( a ) . api ()}; l . each ( u , function ( a , b ){ l . fn . DataTable [ a ] = b }); return u });
/*!
DataTables Bootstrap 4 integration
©2011 - 2017 SpryMedia Ltd - datatables . net / license
2021-08-28 16:55:52 +02:00
*/
2022-12-17 22:20:11 +01:00
var $jscomp = $jscomp || {}; $jscomp . scope = {}; $jscomp . findInternal = function ( a , b , c ){ a instanceof String && ( a = String ( a )); for ( var e = a . length , d = 0 ; d < e ; d ++ ){ var f = a [ d ]; if ( b . call ( c , f , d , a )) return { i : d , v : f }} return { i :- 1 , v : void 0 }}; $jscomp . ASSUME_ES5 =! 1 ; $jscomp . ASSUME_NO_NATIVE_MAP =! 1 ; $jscomp . ASSUME_NO_NATIVE_SET =! 1 ; $jscomp . SIMPLE_FROUND_POLYFILL =! 1 ; $jscomp . ISOLATE_POLYFILLS =! 1 ;
$jscomp . defineProperty = $jscomp . ASSUME_ES5 || " function " == typeof Object . defineProperties ? Object . defineProperty : function ( a , b , c ){ if ( a == Array . prototype || a == Object . prototype ) return a ; a [ b ] = c . value ; return a }; $jscomp . getGlobal = function ( a ){ a = [ " object " == typeof globalThis && globalThis , a , " object " == typeof window && window , " object " == typeof self && self , " object " == typeof global && global ]; for ( var b = 0 ; b < a . length ; ++ b ){ var c = a [ b ]; if ( c && c . Math == Math ) return c } throw Error ( " Cannot find global object " );}; $jscomp . global = $jscomp . getGlobal ( this );
$jscomp . IS_SYMBOL_NATIVE = " function " === typeof Symbol && " symbol " === typeof Symbol ( " x " ); $jscomp . TRUST_ES6_POLYFILLS =! $jscomp . ISOLATE_POLYFILLS || $jscomp . IS_SYMBOL_NATIVE ; $jscomp . polyfills = {}; $jscomp . propertyToPolyfillSymbol = {}; $jscomp . POLYFILL_PREFIX = " $jscp $ " ; var $jscomp $lookupPolyfilledValue = function ( a , b ){ var c = $jscomp . propertyToPolyfillSymbol [ b ]; if ( null == c ) return a [ b ]; c = a [ c ]; return void 0 !== c ? c : a [ b ]};
$jscomp . polyfill = function ( a , b , c , e ){ b && ( $jscomp . ISOLATE_POLYFILLS ? $jscomp . polyfillIsolated ( a , b , c , e ) : $jscomp . polyfillUnisolated ( a , b , c , e ))}; $jscomp . polyfillUnisolated = function ( a , b , c , e ){ c = $jscomp . global ; a = a . split ( " . " ); for ( e = 0 ; e < a . length - 1 ; e ++ ){ var d = a [ e ]; if ( ! ( d in c )) return ; c = c [ d ]} a = a [ a . length - 1 ]; e = c [ a ]; b = b ( e ); b != e && null != b && $jscomp . defineProperty ( c , a ,{ configurable :! 0 , writable :! 0 , value : b })};
$jscomp . polyfillIsolated = function ( a , b , c , e ){ var d = a . split ( " . " ); a = 1 === d . length ; e = d [ 0 ]; e =! a && e in $jscomp . polyfills ? $jscomp . polyfills : $jscomp . global ; for ( var f = 0 ; f < d . length - 1 ; f ++ ){ var l = d [ f ]; if ( ! ( l in e )) return ; e = e [ l ]} d = d [ d . length - 1 ]; c = $jscomp . IS_SYMBOL_NATIVE && " es6 " === c ? e [ d ] : null ; b = b ( c ); null != b && ( a ? $jscomp . defineProperty ( $jscomp . polyfills , d ,{ configurable :! 0 , writable :! 0 , value : b }) : b !== c && ( $jscomp . propertyToPolyfillSymbol [ d ] = $jscomp . IS_SYMBOL_NATIVE ? $jscomp . global . Symbol ( d ) : $jscomp . POLYFILL_PREFIX + d , d =
$jscomp . propertyToPolyfillSymbol [ d ], $jscomp . defineProperty ( e , d ,{ configurable :! 0 , writable :! 0 , value : b })))}; $jscomp . polyfill ( " Array.prototype.find " , function ( a ){ return a ? a : function ( b , c ){ return $jscomp . findInternal ( this , b , c ) . v }}, " es6 " , " es3 " );
( function ( a ){ " function " === typeof define && define . amd ? define ([ " jquery " , " datatables.net " ], function ( b ){ return a ( b , window , document )}) : " object " === typeof exports ? module . exports = function ( b , c ){ b || ( b = window ); c && c . fn . dataTable || ( c = require ( " datatables.net " )( b , c ) . $ ); return a ( c , b , b . document )} : a ( jQuery , window , document )})( function ( a , b , c , e ){ var d = a . fn . dataTable ; a . extend ( ! 0 , d . defaults ,{ dom : " <'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>> " ,
renderer : " bootstrap " }); a . extend ( d . ext . classes ,{ sWrapper : " dataTables_wrapper dt-bootstrap4 " , sFilterInput : " form-control form-control-sm " , sLengthSelect : " custom-select custom-select-sm form-control form-control-sm " , sProcessing : " dataTables_processing card " , sPageButton : " paginate_button page-item " }); d . ext . renderer . pageButton . bootstrap = function ( f , l , A , B , m , t ){ var u = new d . Api ( f ), C = f . oClasses , n = f . oLanguage . oPaginate , D = f . oLanguage . oAria . paginate || {}, h , k , v = 0 , y = function ( q , w ){ var x , E = function ( p ){ p . preventDefault ();
a ( p . currentTarget ) . hasClass ( " disabled " ) || u . page () == p . data . action || u . page ( p . data . action ) . draw ( " page " )}; var r = 0 ; for ( x = w . length ; r < x ; r ++ ){ var g = w [ r ]; if ( Array . isArray ( g )) y ( q , g ); else { k = h = " " ; switch ( g ){ case " ellipsis " : h = " … " ; k = " disabled " ; break ; case " first " : h = n . sFirst ; k = g + ( 0 < m ? " " : " disabled " ); break ; case " previous " : h = n . sPrevious ; k = g + ( 0 < m ? " " : " disabled " ); break ; case " next " : h = n . sNext ; k = g + ( m < t - 1 ? " " : " disabled " ); break ; case " last " : h = n . sLast ; k = g + ( m < t - 1 ? " " : " disabled " ); break ; default : h = g + 1 , k = m === g ? " active " : " " } if ( h ){ var F =
a ( " <li> " ,{ " class " : C . sPageButton + " " + k , id : 0 === A && " string " === typeof g ? f . sTableId + " _ " + g : null }) . append ( a ( " <a> " ,{ href : " # " , " aria-controls " : f . sTableId , " aria-label " : D [ g ], " data-dt-idx " : v , tabindex : f . iTabIndex , " class " : " page-link " }) . html ( h )) . appendTo ( q ); f . oApi . _fnBindAction ( F ,{ action : g }, E ); v ++ }}}}; try { var z = a ( l ) . find ( c . activeElement ) . data ( " dt-idx " )} catch ( q ){} y ( a ( l ) . empty () . html ( '<ul class="pagination"/>' ) . children ( " ul " ), B ); z !== e && a ( l ) . find ( " [data-dt-idx= " + z + " ] " ) . trigger ( " focus " )}; return d });
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
/*!
Copyright 2014 - 2021 SpryMedia Ltd .
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
This source file is free software , available under the following license :
MIT license - http :// datatables . net / license / mit
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
This source file is distributed in the hope that it will be useful , but
WITHOUT ANY WARRANTY ; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE . See the license files for details .
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
For details please refer to : http :// www . datatables . net
Responsive 2.2 . 9
2014 - 2021 SpryMedia Ltd - datatables . net / license
*/
var $jscomp = $jscomp || {}; $jscomp . scope = {}; $jscomp . findInternal = function ( b , k , m ){ b instanceof String && ( b = String ( b )); for ( var n = b . length , p = 0 ; p < n ; p ++ ){ var y = b [ p ]; if ( k . call ( m , y , p , b )) return { i : p , v : y }} return { i :- 1 , v : void 0 }}; $jscomp . ASSUME_ES5 =! 1 ; $jscomp . ASSUME_NO_NATIVE_MAP =! 1 ; $jscomp . ASSUME_NO_NATIVE_SET =! 1 ; $jscomp . SIMPLE_FROUND_POLYFILL =! 1 ; $jscomp . ISOLATE_POLYFILLS =! 1 ;
$jscomp . defineProperty = $jscomp . ASSUME_ES5 || " function " == typeof Object . defineProperties ? Object . defineProperty : function ( b , k , m ){ if ( b == Array . prototype || b == Object . prototype ) return b ; b [ k ] = m . value ; return b }; $jscomp . getGlobal = function ( b ){ b = [ " object " == typeof globalThis && globalThis , b , " object " == typeof window && window , " object " == typeof self && self , " object " == typeof global && global ]; for ( var k = 0 ; k < b . length ; ++ k ){ var m = b [ k ]; if ( m && m . Math == Math ) return m } throw Error ( " Cannot find global object " );}; $jscomp . global = $jscomp . getGlobal ( this );
$jscomp . IS_SYMBOL_NATIVE = " function " === typeof Symbol && " symbol " === typeof Symbol ( " x " ); $jscomp . TRUST_ES6_POLYFILLS =! $jscomp . ISOLATE_POLYFILLS || $jscomp . IS_SYMBOL_NATIVE ; $jscomp . polyfills = {}; $jscomp . propertyToPolyfillSymbol = {}; $jscomp . POLYFILL_PREFIX = " $jscp $ " ; var $jscomp $lookupPolyfilledValue = function ( b , k ){ var m = $jscomp . propertyToPolyfillSymbol [ k ]; if ( null == m ) return b [ k ]; m = b [ m ]; return void 0 !== m ? m : b [ k ]};
$jscomp . polyfill = function ( b , k , m , n ){ k && ( $jscomp . ISOLATE_POLYFILLS ? $jscomp . polyfillIsolated ( b , k , m , n ) : $jscomp . polyfillUnisolated ( b , k , m , n ))}; $jscomp . polyfillUnisolated = function ( b , k , m , n ){ m = $jscomp . global ; b = b . split ( " . " ); for ( n = 0 ; n < b . length - 1 ; n ++ ){ var p = b [ n ]; if ( ! ( p in m )) return ; m = m [ p ]} b = b [ b . length - 1 ]; n = m [ b ]; k = k ( n ); k != n && null != k && $jscomp . defineProperty ( m , b ,{ configurable :! 0 , writable :! 0 , value : k })};
$jscomp . polyfillIsolated = function ( b , k , m , n ){ var p = b . split ( " . " ); b = 1 === p . length ; n = p [ 0 ]; n =! b && n in $jscomp . polyfills ? $jscomp . polyfills : $jscomp . global ; for ( var y = 0 ; y < p . length - 1 ; y ++ ){ var z = p [ y ]; if ( ! ( z in n )) return ; n = n [ z ]} p = p [ p . length - 1 ]; m = $jscomp . IS_SYMBOL_NATIVE && " es6 " === m ? n [ p ] : null ; k = k ( m ); null != k && ( b ? $jscomp . defineProperty ( $jscomp . polyfills , p ,{ configurable :! 0 , writable :! 0 , value : k }) : k !== m && ( $jscomp . propertyToPolyfillSymbol [ p ] = $jscomp . IS_SYMBOL_NATIVE ? $jscomp . global . Symbol ( p ) : $jscomp . POLYFILL_PREFIX + p , p =
$jscomp . propertyToPolyfillSymbol [ p ], $jscomp . defineProperty ( n , p ,{ configurable :! 0 , writable :! 0 , value : k })))}; $jscomp . polyfill ( " Array.prototype.find " , function ( b ){ return b ? b : function ( k , m ){ return $jscomp . findInternal ( this , k , m ) . v }}, " es6 " , " es3 " );
( function ( b ){ " function " === typeof define && define . amd ? define ([ " jquery " , " datatables.net " ], function ( k ){ return b ( k , window , document )}) : " object " === typeof exports ? module . exports = function ( k , m ){ k || ( k = window ); m && m . fn . dataTable || ( m = require ( " datatables.net " )( k , m ) . $ ); return b ( m , k , k . document )} : b ( jQuery , window , document )})( function ( b , k , m , n ){ function p ( a , c , d ){ var f = c + " - " + d ; if ( A [ f ]) return A [ f ]; var g = []; a = a . cell ( c , d ) . node () . childNodes ; c = 0 ; for ( d = a . length ; c < d ; c ++ ) g . push ( a [ c ]); return A [ f ] = g } function y ( a , c , d ){ var f = c + " - " +
d ; if ( A [ f ]){ a = a . cell ( c , d ) . node (); d = A [ f ][ 0 ] . parentNode . childNodes ; c = []; for ( var g = 0 , l = d . length ; g < l ; g ++ ) c . push ( d [ g ]); d = 0 ; for ( g = c . length ; d < g ; d ++ ) a . appendChild ( c [ d ]); A [ f ] = n }} var z = b . fn . dataTable , u = function ( a , c ){ if ( ! z . versionCheck ||! z . versionCheck ( " 1.10.10 " )) throw " DataTables Responsive requires DataTables 1.10.10 or newer " ; this . s = { dt : new z . Api ( a ), columns : [], current : []}; this . s . dt . settings ()[ 0 ] . responsive || ( c && " string " === typeof c . details ? c . details = { type : c . details } : c &&! 1 === c . details ? c . details = { type :! 1 } : c &&
! 0 === c . details && ( c . details = { type : " inline " }), this . c = b . extend ( ! 0 ,{}, u . defaults , z . defaults . responsive , c ), a . responsive = this , this . _constructor ())}; b . extend ( u . prototype ,{ _constructor : function (){ var a = this , c = this . s . dt , d = c . settings ()[ 0 ], f = b ( k ) . innerWidth (); c . settings ()[ 0 ] . _responsive = this ; b ( k ) . on ( " resize.dtr orientationchange.dtr " , z . util . throttle ( function (){ var g = b ( k ) . innerWidth (); g !== f && ( a . _resize (), f = g )})); d . oApi . _fnCallbackReg ( d , " aoRowCreatedCallback " , function ( g , l , h ){ - 1 !== b . inArray ( ! 1 , a . s . current ) && b ( " >td, >th " ,
g ) . each ( function ( e ){ e = c . column . index ( " toData " , e ); ! 1 === a . s . current [ e ] && b ( this ) . css ( " display " , " none " )})}); c . on ( " destroy.dtr " , function (){ c . off ( " .dtr " ); b ( c . table () . body ()) . off ( " .dtr " ); b ( k ) . off ( " resize.dtr orientationchange.dtr " ); c . cells ( " .dtr-control " ) . nodes () . to $ () . removeClass ( " dtr-control " ); b . each ( a . s . current , function ( g , l ){ ! 1 === l && a . _setColumnVis ( g , ! 0 )})}); this . c . breakpoints . sort ( function ( g , l ){ return g . width < l . width ? 1 : g . width > l . width ? - 1 : 0 }); this . _classLogic (); this . _resizeAuto (); d = this . c . details ; ! 1 !==
d . type && ( a . _detailsInit (), c . on ( " column-visibility.dtr " , function (){ a . _timer && clearTimeout ( a . _timer ); a . _timer = setTimeout ( function (){ a . _timer = null ; a . _classLogic (); a . _resizeAuto (); a . _resize ( ! 0 ); a . _redrawChildren ()}, 100 )}), c . on ( " draw.dtr " , function (){ a . _redrawChildren ()}), b ( c . table () . node ()) . addClass ( " dtr- " + d . type )); c . on ( " column-reorder.dtr " , function ( g , l , h ){ a . _classLogic (); a . _resizeAuto (); a . _resize ( ! 0 )}); c . on ( " column-sizing.dtr " , function (){ a . _resizeAuto (); a . _resize ()}); c . on ( " preXhr.dtr " , function (){ var g =
[]; c . rows () . every ( function (){ this . child . isShown () && g . push ( this . id ( ! 0 ))}); c . one ( " draw.dtr " , function (){ a . _resizeAuto (); a . _resize (); c . rows ( g ) . every ( function (){ a . _detailsDisplay ( this , ! 1 )})})}); c . on ( " draw.dtr " , function (){ a . _controlClass ()}) . on ( " init.dtr " , function ( g , l , h ){ " dt " === g . namespace && ( a . _resizeAuto (), a . _resize (), b . inArray ( ! 1 , a . s . current ) && c . columns . adjust ())}); this . _resize ()}, _columnsVisiblity : function ( a ){ var c = this . s . dt , d = this . s . columns , f , g = d . map ( function ( t , v ){ return { columnIdx : v , priority : t . priority }}) . sort ( function ( t ,
v ){ return t . priority !== v . priority ? t . priority - v . priority : t . columnIdx - v . columnIdx }), l = b . map ( d , function ( t , v ){ return ! 1 === c . column ( v ) . visible () ? " not-visible " : t . auto && null === t . minWidth ? ! 1 :! 0 === t . auto ? " - " :- 1 !== b . inArray ( a , t . includeIn )}), h = 0 ; var e = 0 ; for ( f = l . length ; e < f ; e ++ ) ! 0 === l [ e ] && ( h += d [ e ] . minWidth ); e = c . settings ()[ 0 ] . oScroll ; e = e . sY || e . sX ? e . iBarWidth : 0 ; h = c . table () . container () . offsetWidth - e - h ; e = 0 ; for ( f = l . length ; e < f ; e ++ ) d [ e ] . control && ( h -= d [ e ] . minWidth ); var r =! 1 ; e = 0 ; for ( f = g . length ; e < f ; e ++ ){ var q = g [ e ] . columnIdx ;
" - " === l [ q ] &&! d [ q ] . control && d [ q ] . minWidth && ( r || 0 > h - d [ q ] . minWidth ? ( r =! 0 , l [ q ] =! 1 ) : l [ q ] =! 0 , h -= d [ q ] . minWidth )} g =! 1 ; e = 0 ; for ( f = d . length ; e < f ; e ++ ) if ( ! d [ e ] . control &&! d [ e ] . never &&! 1 === l [ e ]){ g =! 0 ; break } e = 0 ; for ( f = d . length ; e < f ; e ++ ) d [ e ] . control && ( l [ e ] = g ), " not-visible " === l [ e ] && ( l [ e ] =! 1 ); - 1 === b . inArray ( ! 0 , l ) && ( l [ 0 ] =! 0 ); return l }, _classLogic : function (){ var a = this , c = this . c . breakpoints , d = this . s . dt , f = d . columns () . eq ( 0 ) . map ( function ( h ){ var e = this . column ( h ), r = e . header () . className ; h = d . settings ()[ 0 ] . aoColumns [ h ] . responsivePriority ;
e = e . header () . getAttribute ( " data-priority " ); h === n && ( h = e === n || null === e ? 1E4 : 1 * e ); return { className : r , includeIn : [], auto :! 1 , control :! 1 , never : r . match ( / \bnever\b / ) ? ! 0 :! 1 , priority : h }}), g = function ( h , e ){ h = f [ h ] . includeIn ; - 1 === b . inArray ( e , h ) && h . push ( e )}, l = function ( h , e , r , q ){ if ( ! r ) f [ h ] . includeIn . push ( e ); else if ( " max- " === r ) for ( q = a . _find ( e ) . width , e = 0 , r = c . length ; e < r ; e ++ ) c [ e ] . width <= q && g ( h , c [ e ] . name ); else if ( " min- " === r ) for ( q = a . _find ( e ) . width , e = 0 , r = c . length ; e < r ; e ++ ) c [ e ] . width >= q && g ( h , c [ e ] . name ); else if ( " not- " === r ) for ( e =
0 , r = c . length ; e < r ; e ++ ) - 1 === c [ e ] . name . indexOf ( q ) && g ( h , c [ e ] . name )}; f . each ( function ( h , e ){ for ( var r = h . className . split ( " " ), q =! 1 , t = 0 , v = r . length ; t < v ; t ++ ){ var B = r [ t ] . trim (); if ( " all " === B ){ q =! 0 ; h . includeIn = b . map ( c , function ( w ){ return w . name }); return } if ( " none " === B || h . never ){ q =! 0 ; return } if ( " control " === B || " dtr-control " === B ){ q =! 0 ; h . control =! 0 ; return } b . each ( c , function ( w , D ){ w = D . name . split ( " - " ); var x = B . match ( new RegExp ( " (min \\ -|max \\ -|not \\ -)?( " + w [ 0 ] + " )( \\ -[_a-zA-Z0-9])? " )); x && ( q =! 0 , x [ 2 ] === w [ 0 ] && x [ 3 ] === " - " + w [ 1 ] ? l ( e ,
D . name , x [ 1 ], x [ 2 ] + x [ 3 ]) : x [ 2 ] !== w [ 0 ] || x [ 3 ] || l ( e , D . name , x [ 1 ], x [ 2 ]))})} q || ( h . auto =! 0 )}); this . s . columns = f }, _controlClass : function (){ if ( " inline " === this . c . details . type ){ var a = this . s . dt , c = b . inArray ( ! 0 , this . s . current ); a . cells ( null , function ( d ){ return d !== c },{ page : " current " }) . nodes () . to $ () . filter ( " .dtr-control " ) . removeClass ( " dtr-control " ); a . cells ( null , c ,{ page : " current " }) . nodes () . to $ () . addClass ( " dtr-control " )}}, _detailsDisplay : function ( a , c ){ var d = this , f = this . s . dt , g = this . c . details ; if ( g &&! 1 !== g . type ){ var l = g . display ( a ,
c , function (){ return g . renderer ( f , a [ 0 ], d . _detailsObj ( a [ 0 ]))}); ! 0 !== l &&! 1 !== l || b ( f . table () . node ()) . triggerHandler ( " responsive-display.dt " ,[ f , a , l , c ])}}, _detailsInit : function (){ var a = this , c = this . s . dt , d = this . c . details ; " inline " === d . type && ( d . target = " td.dtr-control, th.dtr-control " ); c . on ( " draw.dtr " , function (){ a . _tabIndexes ()}); a . _tabIndexes (); b ( c . table () . body ()) . on ( " keyup.dtr " , " td, th " , function ( g ){ 13 === g . keyCode && b ( this ) . data ( " dtr-keyboard " ) && b ( this ) . click ()}); var f = d . target ; d = " string " === typeof f ? f : " td, th " ;
if ( f !== n || null !== f ) b ( c . table () . body ()) . on ( " click.dtr mousedown.dtr mouseup.dtr " , d , function ( g ){ if ( b ( c . table () . node ()) . hasClass ( " collapsed " ) &&- 1 !== b . inArray ( b ( this ) . closest ( " tr " ) . get ( 0 ), c . rows () . nodes () . toArray ())){ if ( " number " === typeof f ){ var l = 0 > f ? c . columns () . eq ( 0 ) . length + f : f ; if ( c . cell ( this ) . index () . column !== l ) return } l = c . row ( b ( this ) . closest ( " tr " )); " click " === g . type ? a . _detailsDisplay ( l , ! 1 ) : " mousedown " === g . type ? b ( this ) . css ( " outline " , " none " ) : " mouseup " === g . type && b ( this ) . trigger ( " blur " ) . css ( " outline " , " " )}})},
_detailsObj : function ( a ){ var c = this , d = this . s . dt ; return b . map ( this . s . columns , function ( f , g ){ if ( ! f . never &&! f . control ) return f = d . settings ()[ 0 ] . aoColumns [ g ],{ className : f . sClass , columnIndex : g , data : d . cell ( a , g ) . render ( c . c . orthogonal ), hidden : d . column ( g ) . visible () &&! c . s . current [ g ], rowIndex : a , title : null !== f . sTitle ? f . sTitle : b ( d . column ( g ) . header ()) . text ()}})}, _find : function ( a ){ for ( var c = this . c . breakpoints , d = 0 , f = c . length ; d < f ; d ++ ) if ( c [ d ] . name === a ) return c [ d ]}, _redrawChildren : function (){ var a = this , c = this . s . dt ; c . rows ({ page : " current " }) . iterator ( " row " ,
function ( d , f ){ c . row ( f ); a . _detailsDisplay ( c . row ( f ), ! 0 )})}, _resize : function ( a ){ var c = this , d = this . s . dt , f = b ( k ) . innerWidth (), g = this . c . breakpoints , l = g [ 0 ] . name , h = this . s . columns , e , r = this . s . current . slice (); for ( e = g . length - 1 ; 0 <= e ; e -- ) if ( f <= g [ e ] . width ){ l = g [ e ] . name ; break } var q = this . _columnsVisiblity ( l ); this . s . current = q ; g =! 1 ; e = 0 ; for ( f = h . length ; e < f ; e ++ ) if ( ! 1 === q [ e ] &&! h [ e ] . never &&! h [ e ] . control &&! 1 ===! d . column ( e ) . visible ()){ g =! 0 ; break } b ( d . table () . node ()) . toggleClass ( " collapsed " , g ); var t =! 1 , v = 0 ; d . columns () . eq ( 0 ) . each ( function ( B ,
w ){ ! 0 === q [ w ] && v ++ ; if ( a || q [ w ] !== r [ w ]) t =! 0 , c . _setColumnVis ( B , q [ w ])}); t && ( this . _redrawChildren (), b ( d . table () . node ()) . trigger ( " responsive-resize.dt " ,[ d , this . s . current ]), 0 === d . page . info () . recordsDisplay && b ( " td " , d . table () . body ()) . eq ( 0 ) . attr ( " colspan " , v )); c . _controlClass ()}, _resizeAuto : function (){ var a = this . s . dt , c = this . s . columns ; if ( this . c . auto &&- 1 !== b . inArray ( ! 0 , b . map ( c , function ( e ){ return e . auto }))){ b . isEmptyObject ( A ) || b . each ( A , function ( e ){ e = e . split ( " - " ); y ( a , 1 * e [ 0 ], 1 * e [ 1 ])}); a . table () . node (); var d = a . table () . node () . cloneNode ( ! 1 ),
f = b ( a . table () . header () . cloneNode ( ! 1 )) . appendTo ( d ), g = b ( a . table () . body ()) . clone ( ! 1 , ! 1 ) . empty () . appendTo ( d ); d . style . width = " auto " ; var l = a . columns () . header () . filter ( function ( e ){ return a . column ( e ) . visible ()}) . to $ () . clone ( ! 1 ) . css ( " display " , " table-cell " ) . css ( " width " , " auto " ) . css ( " min-width " , 0 ); b ( g ) . append ( b ( a . rows ({ page : " current " }) . nodes ()) . clone ( ! 1 )) . find ( " th, td " ) . css ( " display " , " " ); if ( g = a . table () . footer ()){ g = b ( g . cloneNode ( ! 1 )) . appendTo ( d ); var h = a . columns () . footer () . filter ( function ( e ){ return a . column ( e ) . visible ()}) . to $ () . clone ( ! 1 ) . css ( " display " ,
" table-cell " ); b ( " <tr/> " ) . append ( h ) . appendTo ( g )} b ( " <tr/> " ) . append ( l ) . appendTo ( f ); " inline " === this . c . details . type && b ( d ) . addClass ( " dtr-inline collapsed " ); b ( d ) . find ( " [name] " ) . removeAttr ( " name " ); b ( d ) . css ( " position " , " relative " ); d = b ( " <div/> " ) . css ({ width : 1 , height : 1 , overflow : " hidden " , clear : " both " }) . append ( d ); d . insertBefore ( a . table () . node ()); l . each ( function ( e ){ e = a . column . index ( " fromVisible " , e ); c [ e ] . minWidth = this . offsetWidth || 0 }); d . remove ()}}, _responsiveOnlyHidden : function (){ var a = this . s . dt ; return b . map ( this . s . current ,
function ( c , d ){ return ! 1 === a . column ( d ) . visible () ? ! 0 : c })}, _setColumnVis : function ( a , c ){ var d = this . s . dt ; c = c ? " " : " none " ; b ( d . column ( a ) . header ()) . css ( " display " , c ); b ( d . column ( a ) . footer ()) . css ( " display " , c ); d . column ( a ) . nodes () . to $ () . css ( " display " , c ); b . isEmptyObject ( A ) || d . cells ( null , a ) . indexes () . each ( function ( f ){ y ( d , f . row , f . column )})}, _tabIndexes : function (){ var a = this . s . dt , c = a . cells ({ page : " current " }) . nodes () . to $ (), d = a . settings ()[ 0 ], f = this . c . details . target ; c . filter ( " [data-dtr-keyboard] " ) . removeData ( " [data-dtr-keyboard] " );
" number " === typeof f ? a . cells ( null , f ,{ page : " current " }) . nodes () . to $ () . attr ( " tabIndex " , d . iTabIndex ) . data ( " dtr-keyboard " , 1 ) : ( " td:first-child, th:first-child " === f && ( f = " >td:first-child, >th:first-child " ), b ( f , a . rows ({ page : " current " }) . nodes ()) . attr ( " tabIndex " , d . iTabIndex ) . data ( " dtr-keyboard " , 1 ))}}); u . 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 }]; u . display = { childRow : function ( a , c , d ){ if ( c ){ if ( b ( a . node ()) . hasClass ( " parent " )) return a . child ( d (),
" child " ) . show (), ! 0 } else { if ( a . child . isShown ()) return a . child ( ! 1 ), b ( a . node ()) . removeClass ( " parent " ), ! 1 ; a . child ( d (), " child " ) . show (); b ( a . node ()) . addClass ( " parent " ); return ! 0 }}, childRowImmediate : function ( a , c , d ){ if ( ! c && a . child . isShown () ||! a . responsive . hasHidden ()) return a . child ( ! 1 ), b ( a . node ()) . removeClass ( " parent " ), ! 1 ; a . child ( d (), " child " ) . show (); b ( a . node ()) . addClass ( " parent " ); return ! 0 }, modal : function ( a ){ return function ( c , d , f ){ if ( d ) b ( " div.dtr-modal-content " ) . empty () . append ( f ()); else { var g = function (){ l . remove ();
b ( m ) . off ( " keypress.dtr " )}, l = b ( '<div class="dtr-modal"/>' ) . append ( b ( '<div class="dtr-modal-display"/>' ) . append ( b ( '<div class="dtr-modal-content"/>' ) . append ( f ())) . append ( b ( '<div class="dtr-modal-close">×</div>' ) . click ( function (){ g ()}))) . append ( b ( '<div class="dtr-modal-background"/>' ) . click ( function (){ g ()})) . appendTo ( " body " ); b ( m ) . on ( " keyup.dtr " , function ( h ){ 27 === h . keyCode && ( h . stopPropagation (), g ())})} a && a . header && b ( " div.dtr-modal-content " ) . prepend ( " <h2> " + a . header ( c ) + " </h2> " )}}}; var A = {}; u . renderer =
{ listHiddenNodes : function (){ return function ( a , c , d ){ var f = b ( '<ul data-dtr-index="' + c + '" class="dtr-details"/>' ), g =! 1 ; b . each ( d , function ( l , h ){ h . hidden && ( b ( " <li " + ( h . className ? 'class="' + h . className + '"' : " " ) + ' data-dtr-index="' + h . columnIndex + '" data-dt-row="' + h . rowIndex + '" data-dt-column="' + h . columnIndex + '"><span class="dtr-title">' + h . title + " </span> </li> " ) . append ( b ( '<span class="dtr-data"/>' ) . append ( p ( a , h . rowIndex , h . columnIndex ))) . appendTo ( f ), g =! 0 )}); return g ? f :! 1 }}, listHidden : function (){ return function ( a ,
c , d ){ return ( a = b . map ( d , function ( f ){ var g = f . className ? 'class="' + f . className + '"' : " " ; return f . hidden ? " <li " + g + ' data-dtr-index="' + f . columnIndex + '" data-dt-row="' + f . rowIndex + '" data-dt-column="' + f . columnIndex + '"><span class="dtr-title">' + f . title + '</span> <span class="dtr-data">' + f . data + " </span></li> " : " " }) . join ( " " )) ? b ( '<ul data-dtr-index="' + c + '" class="dtr-details"/>' ) . append ( a ) :! 1 }}, tableAll : function ( a ){ a = b . extend ({ tableClass : " " }, a ); return function ( c , d , f ){ c = b . map ( f , function ( g ){ return " <tr " + ( g . className ?
'class="' + g . className + '"' : " " ) + ' data-dt-row="' + g . rowIndex + '" data-dt-column="' + g . columnIndex + '"><td>' + g . title + " :</td> <td> " + g . data + " </td></tr> " }) . join ( " " ); return b ( '<table class="' + a . tableClass + ' dtr-details" width="100%"/>' ) . append ( c )}}}; u . defaults = { breakpoints : u . breakpoints , auto :! 0 , details : { display : u . display . childRow , renderer : u . renderer . listHidden (), target : 0 , type : " inline " }, orthogonal : " display " }; var C = b . fn . dataTable . Api ; C . register ( " responsive() " , function (){ return this }); C . register ( " responsive.index() " ,
function ( a ){ a = b ( a ); return { column : a . data ( " dtr-index " ), row : a . parent () . data ( " dtr-index " )}}); C . register ( " responsive.rebuild() " , function (){ return this . iterator ( " table " , function ( a ){ a . _responsive && a . _responsive . _classLogic ()})}); C . register ( " responsive.recalc() " , function (){ return this . iterator ( " table " , function ( a ){ a . _responsive && ( a . _responsive . _resizeAuto (), a . _responsive . _resize ())})}); C . register ( " responsive.hasHidden() " , function (){ var a = this . context [ 0 ]; return a . _responsive ? - 1 !== b . inArray ( ! 1 , a . _responsive . _responsiveOnlyHidden ()) :
! 1 }); C . registerPlural ( " columns().responsiveHidden() " , " column().responsiveHidden() " , function (){ return this . iterator ( " column " , function ( a , c ){ return a . _responsive ? a . _responsive . _responsiveOnlyHidden ()[ c ] :! 1 }, 1 )}); u . version = " 2.2.9 " ; b . fn . dataTable . Responsive = u ; b . fn . DataTable . Responsive = u ; b ( m ) . on ( " preInit.dt.dtr " , function ( a , c , d ){ " dt " === a . namespace && ( b ( c . nTable ) . hasClass ( " responsive " ) || b ( c . nTable ) . hasClass ( " dt-responsive " ) || c . oInit . responsive || z . defaults . responsive ) && ( a = c . oInit . responsive , ! 1 !== a && new u ( c ,
b . isPlainObject ( a ) ? a : {}))}); return u });
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
/*!
Bootstrap 4 integration for DataTables ' Responsive
©2016 SpryMedia Ltd - datatables . net / license
*/
var $jscomp = $jscomp || {}; $jscomp . scope = {}; $jscomp . findInternal = function ( a , b , c ){ a instanceof String && ( a = String ( a )); for ( var e = a . length , d = 0 ; d < e ; d ++ ){ var f = a [ d ]; if ( b . call ( c , f , d , a )) return { i : d , v : f }} return { i :- 1 , v : void 0 }}; $jscomp . ASSUME_ES5 =! 1 ; $jscomp . ASSUME_NO_NATIVE_MAP =! 1 ; $jscomp . ASSUME_NO_NATIVE_SET =! 1 ; $jscomp . SIMPLE_FROUND_POLYFILL =! 1 ; $jscomp . ISOLATE_POLYFILLS =! 1 ;
$jscomp . defineProperty = $jscomp . ASSUME_ES5 || " function " == typeof Object . defineProperties ? Object . defineProperty : function ( a , b , c ){ if ( a == Array . prototype || a == Object . prototype ) return a ; a [ b ] = c . value ; return a }; $jscomp . getGlobal = function ( a ){ a = [ " object " == typeof globalThis && globalThis , a , " object " == typeof window && window , " object " == typeof self && self , " object " == typeof global && global ]; for ( var b = 0 ; b < a . length ; ++ b ){ var c = a [ b ]; if ( c && c . Math == Math ) return c } throw Error ( " Cannot find global object " );}; $jscomp . global = $jscomp . getGlobal ( this );
$jscomp . IS_SYMBOL_NATIVE = " function " === typeof Symbol && " symbol " === typeof Symbol ( " x " ); $jscomp . TRUST_ES6_POLYFILLS =! $jscomp . ISOLATE_POLYFILLS || $jscomp . IS_SYMBOL_NATIVE ; $jscomp . polyfills = {}; $jscomp . propertyToPolyfillSymbol = {}; $jscomp . POLYFILL_PREFIX = " $jscp $ " ; var $jscomp $lookupPolyfilledValue = function ( a , b ){ var c = $jscomp . propertyToPolyfillSymbol [ b ]; if ( null == c ) return a [ b ]; c = a [ c ]; return void 0 !== c ? c : a [ b ]};
$jscomp . polyfill = function ( a , b , c , e ){ b && ( $jscomp . ISOLATE_POLYFILLS ? $jscomp . polyfillIsolated ( a , b , c , e ) : $jscomp . polyfillUnisolated ( a , b , c , e ))}; $jscomp . polyfillUnisolated = function ( a , b , c , e ){ c = $jscomp . global ; a = a . split ( " . " ); for ( e = 0 ; e < a . length - 1 ; e ++ ){ var d = a [ e ]; if ( ! ( d in c )) return ; c = c [ d ]} a = a [ a . length - 1 ]; e = c [ a ]; b = b ( e ); b != e && null != b && $jscomp . defineProperty ( c , a ,{ configurable :! 0 , writable :! 0 , value : b })};
$jscomp . polyfillIsolated = function ( a , b , c , e ){ var d = a . split ( " . " ); a = 1 === d . length ; e = d [ 0 ]; e =! a && e in $jscomp . polyfills ? $jscomp . polyfills : $jscomp . global ; for ( var f = 0 ; f < d . length - 1 ; f ++ ){ var g = d [ f ]; if ( ! ( g in e )) return ; e = e [ g ]} d = d [ d . length - 1 ]; c = $jscomp . IS_SYMBOL_NATIVE && " es6 " === c ? e [ d ] : null ; b = b ( c ); null != b && ( a ? $jscomp . defineProperty ( $jscomp . polyfills , d ,{ configurable :! 0 , writable :! 0 , value : b }) : b !== c && ( $jscomp . propertyToPolyfillSymbol [ d ] = $jscomp . IS_SYMBOL_NATIVE ? $jscomp . global . Symbol ( d ) : $jscomp . POLYFILL_PREFIX + d , d =
$jscomp . propertyToPolyfillSymbol [ d ], $jscomp . defineProperty ( e , d ,{ configurable :! 0 , writable :! 0 , value : b })))}; $jscomp . polyfill ( " Array.prototype.find " , function ( a ){ return a ? a : function ( b , c ){ return $jscomp . findInternal ( this , b , c ) . v }}, " es6 " , " es3 " );
( function ( a ){ " function " === typeof define && define . amd ? define ([ " jquery " , " datatables.net-bs4 " , " datatables.net-responsive " ], function ( b ){ return a ( b , window , document )}) : " object " === typeof exports ? module . exports = function ( b , c ){ b || ( b = window ); c && c . fn . dataTable || ( c = require ( " datatables.net-bs4 " )( b , c ) . $ ); c . fn . dataTable . Responsive || require ( " datatables.net-responsive " )( b , c ); return a ( c , b , b . document )} : a ( jQuery , window , document )})( function ( a , b , c , e ){ b = a . fn . dataTable ; c = b . Responsive . display ; var d = c . modal , f = a ( '<div class="modal fade dtr-bs-modal" role="dialog"><div class="modal-dialog" role="document"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button></div><div class="modal-body"/></div></div></div>' );
c . modal = function ( g ){ return function ( k , h , l ){ if ( ! a . fn . modal ) d ( k , h , l ); else if ( ! h ){ if ( g && g . header ){ h = f . find ( " div.modal-header " ); var m = h . find ( " button " ) . detach (); h . empty () . append ( '<h4 class="modal-title">' + g . header ( k ) + " </h4> " ) . append ( m )} f . find ( " div.modal-body " ) . empty () . append ( l ()); f . appendTo ( " body " ) . modal ()}}}; return b . Responsive });
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
/**
* @ license
* Lodash < https :// lodash . com />
* Copyright OpenJS Foundation and other contributors < https :// openjsf . org />
* Released under MIT license < https :// lodash . com / license >
* Based on Underscore . js 1.8 . 3 < http :// underscorejs . org / LICENSE >
* Copyright Jeremy Ashkenas , DocumentCloud and Investigative Reporters & Editors
*/
( function (){ function n ( n , t , r ){ switch ( r . length ){ case 0 : return n . call ( t ); case 1 : return n . call ( t , r [ 0 ]); case 2 : return n . call ( t , r [ 0 ], r [ 1 ]); case 3 : return n . call ( t , r [ 0 ], r [ 1 ], r [ 2 ])} return n . apply ( t , r )} function t ( n , t , r , e ){ for ( var u =- 1 , i = null == n ? 0 : n . length ; ++ u < i ;){ var o = n [ u ]; t ( e , o , r ( o ), n )} return e } function r ( n , t ){ for ( var r =- 1 , e = null == n ? 0 : n . length ; ++ r < e && t ( n [ r ], r , n ) !==! 1 ;); return n } function e ( n , t ){ for ( var r = null == n ? 0 : n . length ; r --&& t ( n [ r ], r , n ) !==! 1 ;); return n } function u ( n , t ){ for ( var r =- 1 , e = null == n ? 0 : n . length ; ++ r < e ;) if ( ! t ( n [ r ], r , n )) return ! 1 ;
return ! 0 } function i ( n , t ){ for ( var r =- 1 , e = null == n ? 0 : n . length , u = 0 , i = []; ++ r < e ;){ var o = n [ r ]; t ( o , r , n ) && ( i [ u ++ ] = o )} return i } function o ( n , t ){ return !! ( null == n ? 0 : n . length ) && y ( n , t , 0 ) >- 1 } function f ( n , t , r ){ for ( var e =- 1 , u = null == n ? 0 : n . length ; ++ e < u ;) if ( r ( t , n [ e ])) return ! 0 ; return ! 1 } function c ( n , t ){ for ( var r =- 1 , e = null == n ? 0 : n . length , u = Array ( e ); ++ r < e ;) u [ r ] = t ( n [ r ], r , n ); return u } function a ( n , t ){ for ( var r =- 1 , e = t . length , u = n . length ; ++ r < e ;) n [ u + r ] = t [ r ]; return n } function l ( n , t , r , e ){ var u =- 1 , i = null == n ? 0 : n . length ; for ( e && i && ( r = n [ ++ u ]); ++ u < i ;) r = t ( r , n [ u ], u , n );
return r } function s ( n , t , r , e ){ var u = null == n ? 0 : n . length ; for ( e && u && ( r = n [ -- u ]); u -- ;) r = t ( r , n [ u ], u , n ); return r } function h ( n , t ){ for ( var r =- 1 , e = null == n ? 0 : n . length ; ++ r < e ;) if ( t ( n [ r ], r , n )) return ! 0 ; return ! 1 } function p ( n ){ return n . split ( " " )} function _ ( n ){ return n . match ( $t ) || []} function v ( n , t , r ){ var e ; return r ( n , function ( n , r , u ){ if ( t ( n , r , u )) return e = r , ! 1 }), e } function g ( n , t , r , e ){ for ( var u = n . length , i = r + ( e ? 1 :- 1 ); e ? i --:++ i < u ;) if ( t ( n [ i ], i , n )) return i ; return - 1 } function y ( n , t , r ){ return t === t ? Z ( n , t , r ) : g ( n , b , r )} function d ( n , t , r , e ){
for ( var u = r - 1 , i = n . length ; ++ u < i ;) if ( e ( n [ u ], t )) return u ; return - 1 } function b ( n ){ return n !== n } function w ( n , t ){ var r = null == n ? 0 : n . length ; return r ? k ( n , t ) / r : Cn } function m ( n ){ return function ( t ){ return null == t ? X : t [ n ]}} function x ( n ){ return function ( t ){ return null == n ? X : n [ t ]}} function j ( n , t , r , e , u ){ return u ( n , function ( n , u , i ){ r = e ? ( e =! 1 , n ) : t ( r , n , u , i )}), r } function A ( n , t ){ var r = n . length ; for ( n . sort ( t ); r -- ;) n [ r ] = n [ r ] . value ; return n } function k ( n , t ){ for ( var r , e =- 1 , u = n . length ; ++ e < u ;){ var i = t ( n [ e ]); i !== X && ( r = r === X ? i : r + i );
} return r } function O ( n , t ){ for ( var r =- 1 , e = Array ( n ); ++ r < n ;) e [ r ] = t ( r ); return e } function I ( n , t ){ return c ( t , function ( t ){ return [ t , n [ t ]]})} function R ( n ){ return n ? n . slice ( 0 , H ( n ) + 1 ) . replace ( Lt , " " ) : n } function z ( n ){ return function ( t ){ return n ( t )}} function E ( n , t ){ return c ( t , function ( t ){ return n [ t ]})} function S ( n , t ){ return n . has ( t )} function W ( n , t ){ for ( var r =- 1 , e = n . length ; ++ r < e && y ( t , n [ r ], 0 ) >- 1 ;); return r } function L ( n , t ){ for ( var r = n . length ; r --&& y ( t , n [ r ], 0 ) >- 1 ;); return r } function C ( n , t ){ for ( var r = n . length , e = 0 ; r -- ;) n [ r ] === t &&++ e ;
return e } function U ( n ){ return " \\ " + Yr [ n ]} function B ( n , t ){ return null == n ? X : n [ t ]} function T ( n ){ return Nr . test ( n )} function $ ( n ){ return Pr . test ( n )} function D ( n ){ for ( var t , r = []; ! ( t = n . next ()) . done ;) r . push ( t . value ); return r } function M ( n ){ var t =- 1 , r = Array ( n . size ); return n . forEach ( function ( n , e ){ r [ ++ t ] = [ e , n ]}), r } function F ( n , t ){ return function ( r ){ return n ( t ( r ))}} function N ( n , t ){ for ( var r =- 1 , e = n . length , u = 0 , i = []; ++ r < e ;){ var o = n [ r ]; o !== t && o !== cn || ( n [ r ] = cn , i [ u ++ ] = r )} return i } function P ( n ){ var t =- 1 , r = Array ( n . size );
return n . forEach ( function ( n ){ r [ ++ t ] = n }), r } function q ( n ){ var t =- 1 , r = Array ( n . size ); return n . forEach ( function ( n ){ r [ ++ t ] = [ n , n ]}), r } function Z ( n , t , r ){ for ( var e = r - 1 , u = n . length ; ++ e < u ;) if ( n [ e ] === t ) return e ; return - 1 } function K ( n , t , r ){ for ( var e = r + 1 ; e -- ;) if ( n [ e ] === t ) return e ; return e } function V ( n ){ return T ( n ) ? J ( n ) : _e ( n )} function G ( n ){ return T ( n ) ? Y ( n ) : p ( n )} function H ( n ){ for ( var t = n . length ; t --&& Ct . test ( n . charAt ( t ));); return t } function J ( n ){ for ( var t = Mr . lastIndex = 0 ; Mr . test ( n );) ++ t ; return t } function Y ( n ){ return n . match ( Mr ) || [];
} function Q ( n ){ return n . match ( Fr ) || []} var X , nn = " 4.17.21 " , tn = 200 , rn = " Unsupported core-js use. Try https://npms.io/search?q=ponyfill. " , en = " Expected a function " , un = " Invalid `variable` option passed into `_.template` " , on = " __lodash_hash_undefined__ " , fn = 500 , cn = " __lodash_placeholder__ " , an = 1 , ln = 2 , sn = 4 , hn = 1 , pn = 2 , _n = 1 , vn = 2 , gn = 4 , yn = 8 , dn = 16 , bn = 32 , wn = 64 , mn = 128 , xn = 256 , jn = 512 , An = 30 , kn = " ... " , On = 800 , In = 16 , Rn = 1 , zn = 2 , En = 3 , Sn = 1 / 0 , Wn = 9007199254740991 , Ln = 1.7976931348623157e308 , Cn = NaN , Un = 4294967295 , Bn = Un - 1 , Tn = Un >>> 1 , $n = [[ " ary " , mn ],[ " bind " , _n ],[ " bindKey " , vn ],[ " curry " , yn ],[ " curryRight " , dn ],[ " flip " , jn ],[ " partial " , bn ],[ " partialRight " , wn ],[ " rearg " , xn ]], Dn = " [object Arguments] " , Mn = " [object Array] " , Fn = " [object AsyncFunction] " , Nn = " [object Boolean] " , Pn = " [object Date] " , qn = " [object DOMException] " , Zn = " [object Error] " , Kn = " [object Function] " , Vn = " [object GeneratorFunction] " , Gn = " [object Map] " , Hn = " [object Number] " , Jn = " [object Null] " , Yn = " [object Object] " , Qn = " [object Promise] " , Xn = " [object Proxy] " , nt = " [object RegExp] " , tt = " [object Set] " , rt = " [object String] " , et = " [object Symbol] " , ut = " [object Undefined] " , it = " [object WeakMap] " , ot = " [object WeakSet] " , ft = " [object ArrayBuffer] " , ct = " [object DataView] " , at = " [object Float32Array] " , lt = " [object Float64Array] " , st = " [object Int8Array] " , ht = " [object Int16Array] " , pt = " [object Int32Array] " , _t = " [object Uint8Array] " , vt = " [object Uint8ClampedArray] " , gt = " [object Uint16Array] " , yt = " [object Uint32Array] " , dt =/ \b__p \ += '' ; / g , bt =/ \b ( __p \ += ) '' \ +/ g , wt =/ ( __e\ ( .* ? \ ) | \b__t\ )) \ + \n '' ; / g , mt =/& ( ? : amp | lt | gt | quot | #39);/g,xt=/[&<>"']/g,jt=RegExp(mt.source),At=RegExp(xt.source),kt=/<%-([\s\S]+?)%>/g,Ot=/<%([\s\S]+?)%>/g,It=/<%=([\s\S]+?)%>/g,Rt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,zt=/^\w*$/,Et=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,St=/[\\^$.*+?()[\]{}|]/g,Wt=RegExp(St.source),Lt=/^\s+/,Ct=/\s/,Ut=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Bt=/\{\n\/\* \[wrapped with (.+)\] \*/,Tt=/,? & /,$t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Dt=/[()=,{}\[\]\/\s]/,Mt=/\\(\\)?/g,Ft=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Nt=/\w*$/,Pt=/^[-+]0x[0-9a-f]+$/i,qt=/^0b[01]+$/i,Zt=/^\[object .+?Constructor\]$/,Kt=/^0o[0-7]+$/i,Vt=/^(?:0|[1-9]\d*)$/,Gt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ht=/($^)/,Jt=/['\n\r\u2028\u2029\\]/g,Yt="\\ud800-\\udfff",Qt="\\u0300-\\u036f",Xt="\\ufe20-\\ufe2f",nr="\\u20d0-\\u20ff",tr=Qt+Xt+nr,rr="\\u2700-\\u27bf",er="a-z\\xdf-\\xf6\\xf8-\\xff",ur="\\xac\\xb1\\xd7\\xf7",ir="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",or="\\u2000-\\u206f",fr=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",cr="A-Z\\xc0-\\xd6\\xd8-\\xde",ar="\\ufe0e\\ufe0f",lr=ur+ir+or+fr,sr="['\u2019]",hr="["+Yt+"]",pr="["+lr+"]",_r="["+tr+"]",vr="\\d+",gr="["+rr+"]",yr="["+er+"]",dr="[^"+Yt+lr+vr+rr+er+cr+"]",br="\\ud83c[\\udffb-\\udfff]",wr="(?:"+_r+"|"+br+")",mr="[^"+Yt+"]",xr="(?:\\ud83c[\\udde6-\\uddff]){2}",jr="[\\ud800-\\udbff][\\udc00-\\udfff]",Ar="["+cr+"]",kr="\\u200d",Or="(?:"+yr+"|"+dr+")",Ir="(?:"+Ar+"|"+dr+")",Rr="(?:"+sr+"(?:d|ll|m|re|s|t|ve))?",zr="(?:"+sr+"(?:D|LL|M|RE|S|T|VE))?",Er=wr+"?",Sr="["+ar+"]?",Wr="(?:"+kr+"(?:"+[mr,xr,jr].join("|")+")"+Sr+Er+")*",Lr="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Cr="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ur=Sr+Er+Wr,Br="(?:"+[gr,xr,jr].join("|")+")"+Ur,Tr="(?:"+[mr+_r+"?",_r,xr,jr,hr].join("|")+")",$r=RegExp(sr,"g"),Dr=RegExp(_r,"g"),Mr=RegExp(br+"(?="+br+")|"+Tr+Ur,"g"),Fr=RegExp([Ar+"?"+yr+"+"+Rr+"(?="+[pr,Ar,"$"].join("|")+")",Ir+"+"+zr+"(?="+[pr,Ar+Or,"$"].join("|")+")",Ar+"?"+Or+"+"+Rr,Ar+"+"+zr,Cr,Lr,vr,Br].join("|"),"g"),Nr=RegExp("["+kr+Yt+tr+ar+"]"),Pr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,qr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout",
Kr [ at ] = Kr [ lt ] = Kr [ st ] = Kr [ ht ] = Kr [ pt ] = Kr [ _t ] = Kr [ vt ] = Kr [ gt ] = Kr [ yt ] =! 0 , Kr [ Dn ] = Kr [ Mn ] = Kr [ ft ] = Kr [ Nn ] = Kr [ ct ] = Kr [ Pn ] = Kr [ Zn ] = Kr [ Kn ] = Kr [ Gn ] = Kr [ Hn ] = Kr [ Yn ] = Kr [ nt ] = Kr [ tt ] = Kr [ rt ] = Kr [ it ] =! 1 ; var Vr = {}; Vr [ Dn ] = Vr [ Mn ] = Vr [ ft ] = Vr [ ct ] = Vr [ Nn ] = Vr [ Pn ] = Vr [ at ] = Vr [ lt ] = Vr [ st ] = Vr [ ht ] = Vr [ pt ] = Vr [ Gn ] = Vr [ Hn ] = Vr [ Yn ] = Vr [ nt ] = Vr [ tt ] = Vr [ rt ] = Vr [ et ] = Vr [ _t ] = Vr [ vt ] = Vr [ gt ] = Vr [ yt ] =! 0 , Vr [ Zn ] = Vr [ Kn ] = Vr [ it ] =! 1 ; var Gr = { " \xc0 " : " A " , " \xc1 " : " A " , " \xc2 " : " A " , " \xc3 " : " A " , " \xc4 " : " A " , " \xc5 " : " A " , " \xe0 " : " a " , " \xe1 " : " a " , " \xe2 " : " a " , " \xe3 " : " a " , " \xe4 " : " a " , " \xe5 " : " a " ,
" \xc7 " : " C " , " \xe7 " : " c " , " \xd0 " : " D " , " \xf0 " : " d " , " \xc8 " : " E " , " \xc9 " : " E " , " \xca " : " E " , " \xcb " : " E " , " \xe8 " : " e " , " \xe9 " : " e " , " \xea " : " e " , " \xeb " : " e " , " \xcc " : " I " , " \xcd " : " I " , " \xce " : " I " , " \xcf " : " I " , " \xec " : " i " , " \xed " : " i " , " \xee " : " i " , " \xef " : " i " , " \xd1 " : " N " , " \xf1 " : " n " , " \xd2 " : " O " , " \xd3 " : " O " , " \xd4 " : " O " , " \xd5 " : " O " , " \xd6 " : " O " , " \xd8 " : " O " , " \xf2 " : " o " , " \xf3 " : " o " , " \xf4 " : " o " , " \xf5 " : " o " , " \xf6 " : " o " , " \xf8 " : " o " , " \xd9 " : " U " , " \xda " : " U " , " \xdb " : " U " , " \xdc " : " U " , " \xf9 " : " u " , " \xfa " : " u " , " \xfb " : " u " , " \xfc " : " u " , " \xdd " : " Y " , " \xfd " : " y " , " \xff " : " y " , " \xc6 " : " Ae " ,
" \xe6 " : " ae " , " \xde " : " Th " , " \xfe " : " th " , " \xdf " : " ss " , " \ u0100 " : " A " , " \ u0102 " : " A " , " \ u0104 " : " A " , " \ u0101 " : " a " , " \ u0103 " : " a " , " \ u0105 " : " a " , " \ u0106 " : " C " , " \ u0108 " : " C " , " \ u010a " : " C " , " \ u010c " : " C " , " \ u0107 " : " c " , " \ u0109 " : " c " , " \ u010b " : " c " , " \ u010d " : " c " , " \ u010e " : " D " , " \ u0110 " : " D " , " \ u010f " : " d " , " \ u0111 " : " d " , " \ u0112 " : " E " , " \ u0114 " : " E " , " \ u0116 " : " E " , " \ u0118 " : " E " , " \ u011a " : " E " , " \ u0113 " : " e " , " \ u0115 " : " e " , " \ u0117 " : " e " , " \ u0119 " : " e " , " \ u011b " : " e " , " \ u011c " : " G " , " \ u011e " : " G " , " \ u0120 " : " G " , " \ u0122 " : " G " , " \ u011d " : " g " , " \ u011f " : " g " , " \ u0121 " : " g " ,
" \ u0123 " : " g " , " \ u0124 " : " H " , " \ u0126 " : " H " , " \ u0125 " : " h " , " \ u0127 " : " h " , " \ u0128 " : " I " , " \ u012a " : " I " , " \ u012c " : " I " , " \ u012e " : " I " , " \ u0130 " : " I " , " \ u0129 " : " i " , " \ u012b " : " i " , " \ u012d " : " i " , " \ u012f " : " i " , " \ u0131 " : " i " , " \ u0134 " : " J " , " \ u0135 " : " j " , " \ u0136 " : " K " , " \ u0137 " : " k " , " \ u0138 " : " k " , " \ u0139 " : " L " , " \ u013b " : " L " , " \ u013d " : " L " , " \ u013f " : " L " , " \ u0141 " : " L " , " \ u013a " : " l " , " \ u013c " : " l " , " \ u013e " : " l " , " \ u0140 " : " l " , " \ u0142 " : " l " , " \ u0143 " : " N " , " \ u0145 " : " N " , " \ u0147 " : " N " , " \ u014a " : " N " , " \ u0144 " : " n " , " \ u0146 " : " n " , " \ u0148 " : " n " , " \ u014b " : " n " , " \ u014c " : " O " ,
" \ u014e " : " O " , " \ u0150 " : " O " , " \ u014d " : " o " , " \ u014f " : " o " , " \ u0151 " : " o " , " \ u0154 " : " R " , " \ u0156 " : " R " , " \ u0158 " : " R " , " \ u0155 " : " r " , " \ u0157 " : " r " , " \ u0159 " : " r " , " \ u015a " : " S " , " \ u015c " : " S " , " \ u015e " : " S " , " \ u0160 " : " S " , " \ u015b " : " s " , " \ u015d " : " s " , " \ u015f " : " s " , " \ u0161 " : " s " , " \ u0162 " : " T " , " \ u0164 " : " T " , " \ u0166 " : " T " , " \ u0163 " : " t " , " \ u0165 " : " t " , " \ u0167 " : " t " , " \ u0168 " : " U " , " \ u016a " : " U " , " \ u016c " : " U " , " \ u016e " : " U " , " \ u0170 " : " U " , " \ u0172 " : " U " , " \ u0169 " : " u " , " \ u016b " : " u " , " \ u016d " : " u " , " \ u016f " : " u " , " \ u0171 " : " u " , " \ u0173 " : " u " , " \ u0174 " : " W " , " \ u0175 " : " w " ,
" \ u0176 " : " Y " , " \ u0177 " : " y " , " \ u0178 " : " Y " , " \ u0179 " : " Z " , " \ u017b " : " Z " , " \ u017d " : " Z " , " \ u017a " : " z " , " \ u017c " : " z " , " \ u017e " : " z " , " \ u0132 " : " IJ " , " \ u0133 " : " ij " , " \ u0152 " : " Oe " , " \ u0153 " : " oe " , " \ u0149 " : " 'n " , " \ u017f " : " s " }, Hr = { " & " : " & " , " < " : " < " , " > " : " > " , '"' : " " " , " ' " : " ' " }, Jr = { " & " : " & " , " < " : " < " , " > " : " > " , " " " : '"' , " ' " : " ' " }, Yr = { " \\ " : " \\ " , " ' " : " ' " , " \n " : " n " , " \r " : " r " , " \ u2028 " : " u2028 " , " \ u2029 " : " u2029 " }, Qr = parseFloat , Xr = parseInt , ne = " object " == typeof global && global && global . Object === Object && global , te = " object " == typeof self && self && self . Object === Object && self , re = ne || te || Function ( " return this " )(), ee = " object " == typeof exports && exports &&! exports . nodeType && exports , ue = ee && " object " == typeof module && module &&! module . nodeType && module , ie = ue && ue . exports === ee , oe = ie && ne . process , fe = function (){
try { var n = ue && ue . require && ue . require ( " util " ) . types ; return n ? n : oe && oe . binding && oe . binding ( " util " )} catch ( n ){}}(), ce = fe && fe . isArrayBuffer , ae = fe && fe . isDate , le = fe && fe . isMap , se = fe && fe . isRegExp , he = fe && fe . isSet , pe = fe && fe . isTypedArray , _e = m ( " length " ), ve = x ( Gr ), ge = x ( Hr ), ye = x ( Jr ), de = function p ( x ){ function Z ( n ){ if ( cc ( n ) &&! bh ( n ) &&! ( n instanceof Ct )){ if ( n instanceof Y ) return n ; if ( bl . call ( n , " __wrapped__ " )) return eo ( n )} return new Y ( n )} function J (){} function Y ( n , t ){ this . __wrapped__ = n , this . __actions__ = [], this . __chain__ =!! t ,
this . __index__ = 0 , this . __values__ = X } function Ct ( n ){ this . __wrapped__ = n , this . __actions__ = [], this . __dir__ = 1 , this . __filtered__ =! 1 , this . __iteratees__ = [], this . __takeCount__ = Un , this . __views__ = []} function $t (){ var n = new Ct ( this . __wrapped__ ); return n . __actions__ = Tu ( this . __actions__ ), n . __dir__ = this . __dir__ , n . __filtered__ = this . __filtered__ , n . __iteratees__ = Tu ( this . __iteratees__ ), n . __takeCount__ = this . __takeCount__ , n . __views__ = Tu ( this . __views__ ), n } function Yt (){ if ( this . __filtered__ ){ var n = new Ct ( this ); n . __dir__ =- 1 ,
n . __filtered__ =! 0 } else n = this . clone (), n . __dir__ *=- 1 ; return n } function Qt (){ var n = this . __wrapped__ . value (), t = this . __dir__ , r = bh ( n ), e = t < 0 , u = r ? n . length : 0 , i = Oi ( 0 , u , this . __views__ ), o = i . start , f = i . end , c = f - o , a = e ? f : o - 1 , l = this . __iteratees__ , s = l . length , h = 0 , p = Hl ( c , this . __takeCount__ ); if ( ! r ||! e && u == c && p == c ) return wu ( n , this . __actions__ ); var _ = []; n : for (; c --&& h < p ;){ a += t ; for ( var v =- 1 , g = n [ a ]; ++ v < s ;){ var y = l [ v ], d = y . iteratee , b = y . type , w = d ( g ); if ( b == zn ) g = w ; else if ( ! w ){ if ( b == Rn ) continue n ; break n }} _ [ h ++ ] = g } return _ } function Xt ( n ){
var t =- 1 , r = null == n ? 0 : n . length ; for ( this . clear (); ++ t < r ;){ var e = n [ t ]; this . set ( e [ 0 ], e [ 1 ])}} function nr (){ this . __data__ = is ? is ( null ) : {}, this . size = 0 } function tr ( n ){ var t = this . has ( n ) && delete this . __data__ [ n ]; return this . size -= t ? 1 : 0 , t } function rr ( n ){ var t = this . __data__ ; if ( is ){ var r = t [ n ]; return r === on ? X : r } return bl . call ( t , n ) ? t [ n ] : X } function er ( n ){ var t = this . __data__ ; return is ? t [ n ] !== X : bl . call ( t , n )} function ur ( n , t ){ var r = this . __data__ ; return this . size += this . has ( n ) ? 0 : 1 , r [ n ] = is && t === X ? on : t , this } function ir ( n ){
var t =- 1 , r = null == n ? 0 : n . length ; for ( this . clear (); ++ t < r ;){ var e = n [ t ]; this . set ( e [ 0 ], e [ 1 ])}} function or (){ this . __data__ = [], this . size = 0 } function fr ( n ){ var t = this . __data__ , r = Wr ( t , n ); return ! ( r < 0 ) && ( r == t . length - 1 ? t . pop () : Ll . call ( t , r , 1 ), -- this . size , ! 0 )} function cr ( n ){ var t = this . __data__ , r = Wr ( t , n ); return r < 0 ? X : t [ r ][ 1 ]} function ar ( n ){ return Wr ( this . __data__ , n ) >- 1 } function lr ( n , t ){ var r = this . __data__ , e = Wr ( r , n ); return e < 0 ? ( ++ this . size , r . push ([ n , t ])) : r [ e ][ 1 ] = t , this } function sr ( n ){ var t =- 1 , r = null == n ? 0 : n . length ; for ( this . clear (); ++ t < r ;){
var e = n [ t ]; this . set ( e [ 0 ], e [ 1 ])}} function hr (){ this . size = 0 , this . __data__ = { hash : new Xt , map : new ( ts || ir ), string : new Xt }} function pr ( n ){ var t = xi ( this , n ) . delete ( n ); return this . size -= t ? 1 : 0 , t } function _r ( n ){ return xi ( this , n ) . get ( n )} function vr ( n ){ return xi ( this , n ) . has ( n )} function gr ( n , t ){ var r = xi ( this , n ), e = r . size ; return r . set ( n , t ), this . size += r . size == e ? 0 : 1 , this } function yr ( n ){ var t =- 1 , r = null == n ? 0 : n . length ; for ( this . __data__ = new sr ; ++ t < r ;) this . add ( n [ t ])} function dr ( n ){ return this . __data__ . set ( n , on ), this } function br ( n ){
return this . __data__ . has ( n )} function wr ( n ){ this . size = ( this . __data__ = new ir ( n )) . size } function mr (){ this . __data__ = new ir , this . size = 0 } function xr ( n ){ var t = this . __data__ , r = t . delete ( n ); return this . size = t . size , r } function jr ( n ){ return this . __data__ . get ( n )} function Ar ( n ){ return this . __data__ . has ( n )} function kr ( n , t ){ var r = this . __data__ ; if ( r instanceof ir ){ var e = r . __data__ ; if ( ! ts || e . length < tn - 1 ) return e . push ([ n , t ]), this . size =++ r . size , this ; r = this . __data__ = new sr ( e )} return r . set ( n , t ), this . size = r . size , this } function Or ( n , t ){
var r = bh ( n ), e =! r && dh ( n ), u =! r &&! e && mh ( n ), i =! r &&! e &&! u && Oh ( n ), o = r || e || u || i , f = o ? O ( n . length , hl ) : [], c = f . length ; for ( var a in n ) ! t &&! bl . call ( n , a ) || o && ( " length " == a || u && ( " offset " == a || " parent " == a ) || i && ( " buffer " == a || " byteLength " == a || " byteOffset " == a ) || Ci ( a , c )) || f . push ( a ); return f } function Ir ( n ){ var t = n . length ; return t ? n [ tu ( 0 , t - 1 )] : X } function Rr ( n , t ){ return Xi ( Tu ( n ), Mr ( t , 0 , n . length ))} function zr ( n ){ return Xi ( Tu ( n ))} function Er ( n , t , r ){( r === X || Gf ( n [ t ], r )) && ( r !== X || t in n ) || Br ( n , t , r )} function Sr ( n , t , r ){ var e = n [ t ];
bl . call ( n , t ) && Gf ( e , r ) && ( r !== X || t in n ) || Br ( n , t , r )} function Wr ( n , t ){ for ( var r = n . length ; r -- ;) if ( Gf ( n [ r ][ 0 ], t )) return r ; return - 1 } function Lr ( n , t , r , e ){ return ys ( n , function ( n , u , i ){ t ( e , n , r ( n ), i )}), e } function Cr ( n , t ){ return n && $u ( t , Pc ( t ), n )} function Ur ( n , t ){ return n && $u ( t , qc ( t ), n )} function Br ( n , t , r ){ " __proto__ " == t && Tl ? Tl ( n , t ,{ configurable :! 0 , enumerable :! 0 , value : r , writable :! 0 }) : n [ t ] = r } function Tr ( n , t ){ for ( var r =- 1 , e = t . length , u = il ( e ), i = null == n ; ++ r < e ;) u [ r ] = i ? X : Mc ( n , t [ r ]); return u } function Mr ( n , t , r ){ return n === n && ( r !== X && ( n = n <= r ? n : r ),
t !== X && ( n = n >= t ? n : t )), n } function Fr ( n , t , e , u , i , o ){ var f , c = t & an , a = t & ln , l = t & sn ; if ( e && ( f = i ? e ( n , u , i , o ) : e ( n )), f !== X ) return f ; if ( ! fc ( n )) return n ; var s = bh ( n ); if ( s ){ if ( f = zi ( n ), ! c ) return Tu ( n , f )} else { var h = zs ( n ), p = h == Kn || h == Vn ; if ( mh ( n )) return Iu ( n , c ); if ( h == Yn || h == Dn || p &&! i ){ if ( f = a || p ? {} : Ei ( n ), ! c ) return a ? Mu ( n , Ur ( f , n )) : Du ( n , Cr ( f , n ))} else { if ( ! Vr [ h ]) return i ? n : {}; f = Si ( n , h , c )}} o || ( o = new wr ); var _ = o . get ( n ); if ( _ ) return _ ; o . set ( n , f ), kh ( n ) ? n . forEach ( function ( r ){ f . add ( Fr ( r , t , e , r , n , o ))}) : jh ( n ) && n . forEach ( function ( r , u ){
f . set ( u , Fr ( r , t , e , u , n , o ))}); var v = l ? a ? di : yi : a ? qc : Pc , g = s ? X : v ( n ); return r ( g || n , function ( r , u ){ g && ( u = r , r = n [ u ]), Sr ( f , u , Fr ( r , t , e , u , n , o ))}), f } function Nr ( n ){ var t = Pc ( n ); return function ( r ){ return Pr ( r , n , t )}} function Pr ( n , t , r ){ var e = r . length ; if ( null == n ) return ! e ; for ( n = ll ( n ); e -- ;){ var u = r [ e ], i = t [ u ], o = n [ u ]; if ( o === X &&! ( u in n ) ||! i ( o )) return ! 1 } return ! 0 } function Gr ( n , t , r ){ if ( " function " != typeof n ) throw new pl ( en ); return Ws ( function (){ n . apply ( X , r )}, t )} function Hr ( n , t , r , e ){ var u =- 1 , i = o , a =! 0 , l = n . length , s = [], h = t . length ;
if ( ! l ) return s ; r && ( t = c ( t , z ( r ))), e ? ( i = f , a =! 1 ) : t . length >= tn && ( i = S , a =! 1 , t = new yr ( t )); n : for (; ++ u < l ;){ var p = n [ u ], _ = null == r ? p : r ( p ); if ( p = e || 0 !== p ? p : 0 , a && _ === _ ){ for ( var v = h ; v -- ;) if ( t [ v ] === _ ) continue n ; s . push ( p )} else i ( t , _ , e ) || s . push ( p )} return s } function Jr ( n , t ){ var r =! 0 ; return ys ( n , function ( n , e , u ){ return r =!! t ( n , e , u )}), r } function Yr ( n , t , r ){ for ( var e =- 1 , u = n . length ; ++ e < u ;){ var i = n [ e ], o = t ( i ); if ( null != o && ( f === X ? o === o &&! bc ( o ) : r ( o , f ))) var f = o , c = i } return c } function ne ( n , t , r , e ){ var u = n . length ; for ( r = kc ( r ), r < 0 && ( r =- r > u ? 0 : u + r ),
e = e === X || e > u ? u : kc ( e ), e < 0 && ( e += u ), e = r > e ? 0 : Oc ( e ); r < e ;) n [ r ++ ] = t ; return n } function te ( n , t ){ var r = []; return ys ( n , function ( n , e , u ){ t ( n , e , u ) && r . push ( n )}), r } function ee ( n , t , r , e , u ){ var i =- 1 , o = n . length ; for ( r || ( r = Li ), u || ( u = []); ++ i < o ;){ var f = n [ i ]; t > 0 && r ( f ) ? t > 1 ? ee ( f , t - 1 , r , e , u ) : a ( u , f ) : e || ( u [ u . length ] = f )} return u } function ue ( n , t ){ return n && bs ( n , t , Pc )} function oe ( n , t ){ return n && ws ( n , t , Pc )} function fe ( n , t ){ return i ( t , function ( t ){ return uc ( n [ t ])})} function _e ( n , t ){ t = ku ( t , n ); for ( var r = 0 , e = t . length ; null != n && r < e ;) n = n [ no ( t [ r ++ ])];
return r && r == e ? n : X } function de ( n , t , r ){ var e = t ( n ); return bh ( n ) ? e : a ( e , r ( n ))} function we ( n ){ return null == n ? n === X ? ut : Jn : Bl && Bl in ll ( n ) ? ki ( n ) : Ki ( n )} function me ( n , t ){ return n > t } function xe ( n , t ){ return null != n && bl . call ( n , t )} function je ( n , t ){ return null != n && t in ll ( n )} function Ae ( n , t , r ){ return n >= Hl ( t , r ) && n < Gl ( t , r )} function ke ( n , t , r ){ for ( var e = r ? f : o , u = n [ 0 ] . length , i = n . length , a = i , l = il ( i ), s = 1 / 0 , h = []; a -- ;){ var p = n [ a ]; a && t && ( p = c ( p , z ( t ))), s = Hl ( p . length , s ), l [ a ] =! r && ( t || u >= 120 && p . length >= 120 ) ? new yr ( a && p ) : X } p = n [ 0 ];
var _ =- 1 , v = l [ 0 ]; n : for (; ++ _ < u && h . length < s ;){ var g = p [ _ ], y = t ? t ( g ) : g ; if ( g = r || 0 !== g ? g : 0 , ! ( v ? S ( v , y ) : e ( h , y , r ))){ for ( a = i ; -- a ;){ var d = l [ a ]; if ( ! ( d ? S ( d , y ) : e ( n [ a ], y , r ))) continue n } v && v . push ( y ), h . push ( g )}} return h } function Oe ( n , t , r , e ){ return ue ( n , function ( n , u , i ){ t ( e , r ( n ), u , i )}), e } function Ie ( t , r , e ){ r = ku ( r , t ), t = Gi ( t , r ); var u = null == t ? t : t [ no ( jo ( r ))]; return null == u ? X : n ( u , t , e )} function Re ( n ){ return cc ( n ) && we ( n ) == Dn } function ze ( n ){ return cc ( n ) && we ( n ) == ft } function Ee ( n ){ return cc ( n ) && we ( n ) == Pn } function Se ( n , t , r , e , u ){
return n === t || ( null == n || null == t ||! cc ( n ) &&! cc ( t ) ? n !== n && t !== t : We ( n , t , r , e , Se , u ))} function We ( n , t , r , e , u , i ){ var o = bh ( n ), f = bh ( t ), c = o ? Mn : zs ( n ), a = f ? Mn : zs ( t ); c = c == Dn ? Yn : c , a = a == Dn ? Yn : a ; var l = c == Yn , s = a == Yn , h = c == a ; if ( h && mh ( n )){ if ( ! mh ( t )) return ! 1 ; o =! 0 , l =! 1 } if ( h &&! l ) return i || ( i = new wr ), o || Oh ( n ) ? pi ( n , t , r , e , u , i ) : _i ( n , t , c , r , e , u , i ); if ( ! ( r & hn )){ var p = l && bl . call ( n , " __wrapped__ " ), _ = s && bl . call ( t , " __wrapped__ " ); if ( p || _ ){ var v = p ? n . value () : n , g = _ ? t . value () : t ; return i || ( i = new wr ), u ( v , g , r , e , i )}} return !! h && ( i || ( i = new wr ), vi ( n , t , r , e , u , i ));
} function Le ( n ){ return cc ( n ) && zs ( n ) == Gn } function Ce ( n , t , r , e ){ var u = r . length , i = u , o =! e ; if ( null == n ) return ! i ; for ( n = ll ( n ); u -- ;){ var f = r [ u ]; if ( o && f [ 2 ] ? f [ 1 ] !== n [ f [ 0 ]] :! ( f [ 0 ] in n )) return ! 1 } for (; ++ u < i ;){ f = r [ u ]; var c = f [ 0 ], a = n [ c ], l = f [ 1 ]; if ( o && f [ 2 ]){ if ( a === X &&! ( c in n )) return ! 1 } else { var s = new wr ; if ( e ) var h = e ( a , l , c , n , t , s ); if ( ! ( h === X ? Se ( l , a , hn | pn , e , s ) : h )) return ! 1 }} return ! 0 } function Ue ( n ){ return ! ( ! fc ( n ) || Di ( n )) && ( uc ( n ) ? kl : Zt ) . test ( to ( n ))} function Be ( n ){ return cc ( n ) && we ( n ) == nt } function Te ( n ){ return cc ( n ) && zs ( n ) == tt ;
} function $e ( n ){ return cc ( n ) && oc ( n . length ) &&!! Kr [ we ( n )]} function De ( n ){ return " function " == typeof n ? n : null == n ? La : " object " == typeof n ? bh ( n ) ? Ze ( n [ 0 ], n [ 1 ]) : qe ( n ) : Fa ( n )} function Me ( n ){ if ( ! Mi ( n )) return Vl ( n ); var t = []; for ( var r in ll ( n )) bl . call ( n , r ) && " constructor " != r && t . push ( r ); return t } function Fe ( n ){ if ( ! fc ( n )) return Zi ( n ); var t = Mi ( n ), r = []; for ( var e in n )( " constructor " != e ||! t && bl . call ( n , e )) && r . push ( e ); return r } function Ne ( n , t ){ return n < t } function Pe ( n , t ){ var r =- 1 , e = Hf ( n ) ? il ( n . length ) : []; return ys ( n , function ( n , u , i ){
e [ ++ r ] = t ( n , u , i )}), e } function qe ( n ){ var t = ji ( n ); return 1 == t . length && t [ 0 ][ 2 ] ? Ni ( t [ 0 ][ 0 ], t [ 0 ][ 1 ]) : function ( r ){ return r === n || Ce ( r , n , t )}} function Ze ( n , t ){ return Bi ( n ) && Fi ( t ) ? Ni ( no ( n ), t ) : function ( r ){ var e = Mc ( r , n ); return e === X && e === t ? Nc ( r , n ) : Se ( t , e , hn | pn )}} function Ke ( n , t , r , e , u ){ n !== t && bs ( t , function ( i , o ){ if ( u || ( u = new wr ), fc ( i )) Ve ( n , t , o , r , Ke , e , u ); else { var f = e ? e ( Ji ( n , o ), i , o + " " , n , t , u ) : X ; f === X && ( f = i ), Er ( n , o , f )}}, qc )} function Ve ( n , t , r , e , u , i , o ){ var f = Ji ( n , r ), c = Ji ( t , r ), a = o . get ( c ); if ( a ) return Er ( n , r , a ), X ; var l = i ? i ( f , c , r + " " , n , t , o ) : X , s = l === X ;
if ( s ){ var h = bh ( c ), p =! h && mh ( c ), _ =! h &&! p && Oh ( c ); l = c , h || p || _ ? bh ( f ) ? l = f : Jf ( f ) ? l = Tu ( f ) : p ? ( s =! 1 , l = Iu ( c , ! 0 )) : _ ? ( s =! 1 , l = Wu ( c , ! 0 )) : l = [] : gc ( c ) || dh ( c ) ? ( l = f , dh ( f ) ? l = Rc ( f ) : fc ( f ) &&! uc ( f ) || ( l = Ei ( c ))) : s =! 1 } s && ( o . set ( c , l ), u ( l , c , e , i , o ), o . delete ( c )), Er ( n , r , l )} function Ge ( n , t ){ var r = n . length ; if ( r ) return t += t < 0 ? r : 0 , Ci ( t , r ) ? n [ t ] : X } function He ( n , t , r ){ t = t . length ? c ( t , function ( n ){ return bh ( n ) ? function ( t ){ return _e ( t , 1 === n . length ? n [ 0 ] : n )} : n }) : [ La ]; var e =- 1 ; return t = c ( t , z ( mi ())), A ( Pe ( n , function ( n , r , u ){ return { criteria : c ( t , function ( t ){
return t ( n )}), index :++ e , value : n }}), function ( n , t ){ return Cu ( n , t , r )})} function Je ( n , t ){ return Ye ( n , t , function ( t , r ){ return Nc ( n , r )})} function Ye ( n , t , r ){ for ( var e =- 1 , u = t . length , i = {}; ++ e < u ;){ var o = t [ e ], f = _e ( n , o ); r ( f , o ) && fu ( i , ku ( o , n ), f )} return i } function Qe ( n ){ return function ( t ){ return _e ( t , n )}} function Xe ( n , t , r , e ){ var u = e ? d : y , i =- 1 , o = t . length , f = n ; for ( n === t && ( t = Tu ( t )), r && ( f = c ( n , z ( r ))); ++ i < o ;) for ( var a = 0 , l = t [ i ], s = r ? r ( l ) : l ;( a = u ( f , s , a , e )) >- 1 ;) f !== n && Ll . call ( f , a , 1 ), Ll . call ( n , a , 1 ); return n } function nu ( n , t ){ for ( var r = n ? t . length : 0 , e = r - 1 ; r -- ;){
var u = t [ r ]; if ( r == e || u !== i ){ var i = u ; Ci ( u ) ? Ll . call ( n , u , 1 ) : yu ( n , u )}} return n } function tu ( n , t ){ return n + Nl ( Ql () * ( t - n + 1 ))} function ru ( n , t , r , e ){ for ( var u =- 1 , i = Gl ( Fl (( t - n ) / ( r || 1 )), 0 ), o = il ( i ); i -- ;) o [ e ? i :++ u ] = n , n += r ; return o } function eu ( n , t ){ var r = " " ; if ( ! n || t < 1 || t > Wn ) return r ; do t % 2 && ( r += n ), t = Nl ( t / 2 ), t && ( n += n ); while ( t ); return r } function uu ( n , t ){ return Ls ( Vi ( n , t , La ), n + " " )} function iu ( n ){ return Ir ( ra ( n ))} function ou ( n , t ){ var r = ra ( n ); return Xi ( r , Mr ( t , 0 , r . length ))} function fu ( n , t , r , e ){ if ( ! fc ( n )) return n ; t = ku ( t , n );
for ( var u =- 1 , i = t . length , o = i - 1 , f = n ; null != f &&++ u < i ;){ var c = no ( t [ u ]), a = r ; if ( " __proto__ " === c || " constructor " === c || " prototype " === c ) return n ; if ( u != o ){ var l = f [ c ]; a = e ? e ( l , c , f ) : X , a === X && ( a = fc ( l ) ? l : Ci ( t [ u + 1 ]) ? [] : {})} Sr ( f , c , a ), f = f [ c ]} return n } function cu ( n ){ return Xi ( ra ( n ))} function au ( n , t , r ){ var e =- 1 , u = n . length ; t < 0 && ( t =- t > u ? 0 : u + t ), r = r > u ? u : r , r < 0 && ( r += u ), u = t > r ? 0 : r - t >>> 0 , t >>>= 0 ; for ( var i = il ( u ); ++ e < u ;) i [ e ] = n [ e + t ]; return i } function lu ( n , t ){ var r ; return ys ( n , function ( n , e , u ){ return r = t ( n , e , u ), ! r }), !! r } function su ( n , t , r ){
var e = 0 , u = null == n ? e : n . length ; if ( " number " == typeof t && t === t && u <= Tn ){ for (; e < u ;){ var i = e + u >>> 1 , o = n [ i ]; null !== o &&! bc ( o ) && ( r ? o <= t : o < t ) ? e = i + 1 : u = i } return u } return hu ( n , t , La , r )} function hu ( n , t , r , e ){ var u = 0 , i = null == n ? 0 : n . length ; if ( 0 === i ) return 0 ; t = r ( t ); for ( var o = t !== t , f = null === t , c = bc ( t ), a = t === X ; u < i ;){ var l = Nl (( u + i ) / 2 ), s = r ( n [ l ]), h = s !== X , p = null === s , _ = s === s , v = bc ( s ); if ( o ) var g = e || _ ; else g = a ? _ && ( e || h ) : f ? _ && h && ( e ||! p ) : c ? _ && h &&! p && ( e ||! v ) :! p &&! v && ( e ? s <= t : s < t ); g ? u = l + 1 : i = l } return Hl ( i , Bn )} function pu ( n , t ){ for ( var r =- 1 , e = n . length , u = 0 , i = []; ++ r < e ;){
var o = n [ r ], f = t ? t ( o ) : o ; if ( ! r ||! Gf ( f , c )){ var c = f ; i [ u ++ ] = 0 === o ? 0 : o }} return i } function _u ( n ){ return " number " == typeof n ? n : bc ( n ) ? Cn :+ n } function vu ( n ){ if ( " string " == typeof n ) return n ; if ( bh ( n )) return c ( n , vu ) + " " ; if ( bc ( n )) return vs ? vs . call ( n ) : " " ; var t = n + " " ; return " 0 " == t && 1 / n ==- Sn ? " -0 " : t } function gu ( n , t , r ){ var e =- 1 , u = o , i = n . length , c =! 0 , a = [], l = a ; if ( r ) c =! 1 , u = f ; else if ( i >= tn ){ var s = t ? null : ks ( n ); if ( s ) return P ( s ); c =! 1 , u = S , l = new yr } else l = t ? [] : a ; n : for (; ++ e < i ;){ var h = n [ e ], p = t ? t ( h ) : h ; if ( h = r || 0 !== h ? h : 0 , c && p === p ){ for ( var _ = l . length ; _ -- ;) if ( l [ _ ] === p ) continue n ;
t && l . push ( p ), a . push ( h )} else u ( l , p , r ) || ( l !== a && l . push ( p ), a . push ( h ))} return a } function yu ( n , t ){ return t = ku ( t , n ), n = Gi ( n , t ), null == n || delete n [ no ( jo ( t ))]} function du ( n , t , r , e ){ return fu ( n , t , r ( _e ( n , t )), e )} function bu ( n , t , r , e ){ for ( var u = n . length , i = e ? u :- 1 ;( e ? i --:++ i < u ) && t ( n [ i ], i , n );); return r ? au ( n , e ? 0 : i , e ? i + 1 : u ) : au ( n , e ? i + 1 : 0 , e ? u : i )} function wu ( n , t ){ var r = n ; return r instanceof Ct && ( r = r . value ()), l ( t , function ( n , t ){ return t . func . apply ( t . thisArg , a ([ n ], t . args ))}, r )} function mu ( n , t , r ){ var e = n . length ; if ( e < 2 ) return e ? gu ( n [ 0 ]) : [];
for ( var u =- 1 , i = il ( e ); ++ u < e ;) for ( var o = n [ u ], f =- 1 ; ++ f < e ;) f != u && ( i [ u ] = Hr ( i [ u ] || o , n [ f ], t , r )); return gu ( ee ( i , 1 ), t , r )} function xu ( n , t , r ){ for ( var e =- 1 , u = n . length , i = t . length , o = {}; ++ e < u ;){ r ( o , n [ e ], e < i ? t [ e ] : X )} return o } function ju ( n ){ return Jf ( n ) ? n : []} function Au ( n ){ return " function " == typeof n ? n : La } function ku ( n , t ){ return bh ( n ) ? n : Bi ( n , t ) ? [ n ] : Cs ( Ec ( n ))} function Ou ( n , t , r ){ var e = n . length ; return r = r === X ? e : r , ! t && r >= e ? n : au ( n , t , r )} function Iu ( n , t ){ if ( t ) return n . slice (); var r = n . length , e = zl ? zl ( r ) : new n . constructor ( r );
return n . copy ( e ), e } function Ru ( n ){ var t = new n . constructor ( n . byteLength ); return new Rl ( t ) . set ( new Rl ( n )), t } function zu ( n , t ){ return new n . constructor ( t ? Ru ( n . buffer ) : n . buffer , n . byteOffset , n . byteLength )} function Eu ( n ){ var t = new n . constructor ( n . source , Nt . exec ( n )); return t . lastIndex = n . lastIndex , t } function Su ( n ){ return _s ? ll ( _s . call ( n )) : {}} function Wu ( n , t ){ return new n . constructor ( t ? Ru ( n . buffer ) : n . buffer , n . byteOffset , n . length )} function Lu ( n , t ){ if ( n !== t ){ var r = n !== X , e = null === n , u = n === n , i = bc ( n ), o = t !== X , f = null === t , c = t === t , a = bc ( t );
if ( ! f &&! a &&! i && n > t || i && o && c &&! f &&! a || e && o && c ||! r && c ||! u ) return 1 ; if ( ! e &&! i &&! a && n < t || a && r && u &&! e &&! i || f && r && u ||! o && u ||! c ) return - 1 } return 0 } function Cu ( n , t , r ){ for ( var e =- 1 , u = n . criteria , i = t . criteria , o = u . length , f = r . length ; ++ e < o ;){ var c = Lu ( u [ e ], i [ e ]); if ( c ){ if ( e >= f ) return c ; return c * ( " desc " == r [ e ] ? - 1 : 1 )}} return n . index - t . index } function Uu ( n , t , r , e ){ for ( var u =- 1 , i = n . length , o = r . length , f =- 1 , c = t . length , a = Gl ( i - o , 0 ), l = il ( c + a ), s =! e ; ++ f < c ;) l [ f ] = t [ f ]; for (; ++ u < o ;)( s || u < i ) && ( l [ r [ u ]] = n [ u ]); for (; a -- ;) l [ f ++ ] = n [ u ++ ]; return l ;
} function Bu ( n , t , r , e ){ for ( var u =- 1 , i = n . length , o =- 1 , f = r . length , c =- 1 , a = t . length , l = Gl ( i - f , 0 ), s = il ( l + a ), h =! e ; ++ u < l ;) s [ u ] = n [ u ]; for ( var p = u ; ++ c < a ;) s [ p + c ] = t [ c ]; for (; ++ o < f ;)( h || u < i ) && ( s [ p + r [ o ]] = n [ u ++ ]); return s } function Tu ( n , t ){ var r =- 1 , e = n . length ; for ( t || ( t = il ( e )); ++ r < e ;) t [ r ] = n [ r ]; return t } function $u ( n , t , r , e ){ var u =! r ; r || ( r = {}); for ( var i =- 1 , o = t . length ; ++ i < o ;){ var f = t [ i ], c = e ? e ( r [ f ], n [ f ], f , r , n ) : X ; c === X && ( c = n [ f ]), u ? Br ( r , f , c ) : Sr ( r , f , c )} return r } function Du ( n , t ){ return $u ( n , Is ( n ), t )} function Mu ( n , t ){ return $u ( n , Rs ( n ), t );
} function Fu ( n , r ){ return function ( e , u ){ var i = bh ( e ) ? t : Lr , o = r ? r () : {}; return i ( e , n , mi ( u , 2 ), o )}} function Nu ( n ){ return uu ( function ( t , r ){ var e =- 1 , u = r . length , i = u > 1 ? r [ u - 1 ] : X , o = u > 2 ? r [ 2 ] : X ; for ( i = n . length > 3 && " function " == typeof i ? ( u -- , i ) : X , o && Ui ( r [ 0 ], r [ 1 ], o ) && ( i = u < 3 ? X : i , u = 1 ), t = ll ( t ); ++ e < u ;){ var f = r [ e ]; f && n ( t , f , e , i )} return t })} function Pu ( n , t ){ return function ( r , e ){ if ( null == r ) return r ; if ( ! Hf ( r )) return n ( r , e ); for ( var u = r . length , i = t ? u :- 1 , o = ll ( r );( t ? i --:++ i < u ) && e ( o [ i ], i , o ) !==! 1 ;); return r }} function qu ( n ){ return function ( t , r , e ){
for ( var u =- 1 , i = ll ( t ), o = e ( t ), f = o . length ; f -- ;){ var c = o [ n ? f :++ u ]; if ( r ( i [ c ], c , i ) ===! 1 ) break } return t }} function Zu ( n , t , r ){ function e (){ return ( this && this !== re && this instanceof e ? i : n ) . apply ( u ? r : this , arguments )} var u = t & _n , i = Gu ( n ); return e } function Ku ( n ){ return function ( t ){ t = Ec ( t ); var r = T ( t ) ? G ( t ) : X , e = r ? r [ 0 ] : t . charAt ( 0 ), u = r ? Ou ( r , 1 ) . join ( " " ) : t . slice ( 1 ); return e [ n ]() + u }} function Vu ( n ){ return function ( t ){ return l ( Ra ( ca ( t ) . replace ( $r , " " )), n , " " )}} function Gu ( n ){ return function (){ var t = arguments ; switch ( t . length ){
case 0 : return new n ; case 1 : return new n ( t [ 0 ]); case 2 : return new n ( t [ 0 ], t [ 1 ]); case 3 : return new n ( t [ 0 ], t [ 1 ], t [ 2 ]); case 4 : return new n ( t [ 0 ], t [ 1 ], t [ 2 ], t [ 3 ]); case 5 : return new n ( t [ 0 ], t [ 1 ], t [ 2 ], t [ 3 ], t [ 4 ]); case 6 : return new n ( t [ 0 ], t [ 1 ], t [ 2 ], t [ 3 ], t [ 4 ], t [ 5 ]); case 7 : return new n ( t [ 0 ], t [ 1 ], t [ 2 ], t [ 3 ], t [ 4 ], t [ 5 ], t [ 6 ])} var r = gs ( n . prototype ), e = n . apply ( r , t ); return fc ( e ) ? e : r }} function Hu ( t , r , e ){ function u (){ for ( var o = arguments . length , f = il ( o ), c = o , a = wi ( u ); c -- ;) f [ c ] = arguments [ c ]; var l = o < 3 && f [ 0 ] !== a && f [ o - 1 ] !== a ? [] : N ( f , a );
return o -= l . length , o < e ? oi ( t , r , Qu , u . placeholder , X , f , l , X , X , e - o ) : n ( this && this !== re && this instanceof u ? i : t , this , f )} var i = Gu ( t ); return u } function Ju ( n ){ return function ( t , r , e ){ var u = ll ( t ); if ( ! Hf ( t )){ var i = mi ( r , 3 ); t = Pc ( t ), r = function ( n ){ return i ( u [ n ], n , u )}} var o = n ( t , r , e ); return o >- 1 ? u [ i ? t [ o ] : o ] : X }} function Yu ( n ){ return gi ( function ( t ){ var r = t . length , e = r , u = Y . prototype . thru ; for ( n && t . reverse (); e -- ;){ var i = t [ e ]; if ( " function " != typeof i ) throw new pl ( en ); if ( u &&! o && " wrapper " == bi ( i )) var o = new Y ([], ! 0 )} for ( e = o ? e : r ; ++ e < r ;){
i = t [ e ]; var f = bi ( i ), c = " wrapper " == f ? Os ( i ) : X ; o = c && $i ( c [ 0 ]) && c [ 1 ] == ( mn | yn | bn | xn ) &&! c [ 4 ] . length && 1 == c [ 9 ] ? o [ bi ( c [ 0 ])] . apply ( o , c [ 3 ]) : 1 == i . length && $i ( i ) ? o [ f ]() : o . thru ( i )} return function (){ var n = arguments , e = n [ 0 ]; if ( o && 1 == n . length && bh ( e )) return o . plant ( e ) . value (); for ( var u = 0 , i = r ? t [ u ] . apply ( this , n ) : e ; ++ u < r ;) i = t [ u ] . call ( this , i ); return i }})} function Qu ( n , t , r , e , u , i , o , f , c , a ){ function l (){ for ( var y = arguments . length , d = il ( y ), b = y ; b -- ;) d [ b ] = arguments [ b ]; if ( _ ) var w = wi ( l ), m = C ( d , w ); if ( e && ( d = Uu ( d , e , u , _ )), i && ( d = Bu ( d , i , o , _ )),
y -= m , _ && y < a ){ return oi ( n , t , Qu , l . placeholder , r , d , N ( d , w ), f , c , a - y )} var x = h ? r : this , j = p ? x [ n ] : n ; return y = d . length , f ? d = Hi ( d , f ) : v && y > 1 && d . reverse (), s && c < y && ( d . length = c ), this && this !== re && this instanceof l && ( j = g || Gu ( j )), j . apply ( x , d )} var s = t & mn , h = t & _n , p = t & vn , _ = t & ( yn | dn ), v = t & jn , g = p ? X : Gu ( n ); return l } function Xu ( n , t ){ return function ( r , e ){ return Oe ( r , n , t ( e ),{})}} function ni ( n , t ){ return function ( r , e ){ var u ; if ( r === X && e === X ) return t ; if ( r !== X && ( u = r ), e !== X ){ if ( u === X ) return e ; " string " == typeof r || " string " == typeof e ? ( r = vu ( r ),
e = vu ( e )) : ( r = _u ( r ), e = _u ( e )), u = n ( r , e )} return u }} function ti ( t ){ return gi ( function ( r ){ return r = c ( r , z ( mi ())), uu ( function ( e ){ var u = this ; return t ( r , function ( t ){ return n ( t , u , e )})})})} function ri ( n , t ){ t = t === X ? " " : vu ( t ); var r = t . length ; if ( r < 2 ) return r ? eu ( t , n ) : t ; var e = eu ( t , Fl ( n / V ( t ))); return T ( t ) ? Ou ( G ( e ), 0 , n ) . join ( " " ) : e . slice ( 0 , n )} function ei ( t , r , e , u ){ function i (){ for ( var r =- 1 , c = arguments . length , a =- 1 , l = u . length , s = il ( l + c ), h = this && this !== re && this instanceof i ? f : t ; ++ a < l ;) s [ a ] = u [ a ]; for (; c -- ;) s [ a ++ ] = arguments [ ++ r ];
return n ( h , o ? e : this , s )} var o = r & _n , f = Gu ( t ); return i } function ui ( n ){ return function ( t , r , e ){ return e && " number " != typeof e && Ui ( t , r , e ) && ( r = e = X ), t = Ac ( t ), r === X ? ( r = t , t = 0 ) : r = Ac ( r ), e = e === X ? t < r ? 1 :- 1 : Ac ( e ), ru ( t , r , e , n )}} function ii ( n ){ return function ( t , r ){ return " string " == typeof t && " string " == typeof r || ( t = Ic ( t ), r = Ic ( r )), n ( t , r )}} function oi ( n , t , r , e , u , i , o , f , c , a ){ var l = t & yn , s = l ? o : X , h = l ? X : o , p = l ? i : X , _ = l ? X : i ; t |= l ? bn : wn , t &=~ ( l ? wn : bn ), t & gn || ( t &=~ ( _n | vn )); var v = [ n , t , u , p , s , _ , h , f , c , a ], g = r . apply ( X , v ); return $i ( n ) && Ss ( g , v ), g . placeholder = e ,
Yi ( g , n , t )} function fi ( n ){ var t = al [ n ]; return function ( n , r ){ if ( n = Ic ( n ), r = null == r ? 0 : Hl ( kc ( r ), 292 ), r && Zl ( n )){ var e = ( Ec ( n ) + " e " ) . split ( " e " ); return e = ( Ec ( t ( e [ 0 ] + " e " + ( + e [ 1 ] + r ))) + " e " ) . split ( " e " ), + ( e [ 0 ] + " e " + ( + e [ 1 ] - r ))} return t ( n )}} function ci ( n ){ return function ( t ){ var r = zs ( t ); return r == Gn ? M ( t ) : r == tt ? q ( t ) : I ( t , n ( t ))}} function ai ( n , t , r , e , u , i , o , f ){ var c = t & vn ; if ( ! c && " function " != typeof n ) throw new pl ( en ); var a = e ? e . length : 0 ; if ( a || ( t &=~ ( bn | wn ), e = u = X ), o = o === X ? o : Gl ( kc ( o ), 0 ), f = f === X ? f : kc ( f ), a -= u ? u . length : 0 , t & wn ){ var l = e , s = u ;
e = u = X } var h = c ? X : Os ( n ), p = [ n , t , r , e , u , l , s , i , o , f ]; if ( h && qi ( p , h ), n = p [ 0 ], t = p [ 1 ], r = p [ 2 ], e = p [ 3 ], u = p [ 4 ], f = p [ 9 ] = p [ 9 ] === X ? c ? 0 : n . length : Gl ( p [ 9 ] - a , 0 ), ! f && t & ( yn | dn ) && ( t &=~ ( yn | dn )), t && t != _n ) _ = t == yn || t == dn ? Hu ( n , t , f ) : t != bn && t != ( _n | bn ) || u . length ? Qu . apply ( X , p ) : ei ( n , t , r , e ); else var _ = Zu ( n , t , r ); return Yi (( h ? ms : Ss )( _ , p ), n , t )} function li ( n , t , r , e ){ return n === X || Gf ( n , gl [ r ]) &&! bl . call ( e , r ) ? t : n } function si ( n , t , r , e , u , i ){ return fc ( n ) && fc ( t ) && ( i . set ( t , n ), Ke ( n , t , X , si , i ), i . delete ( t )), n } function hi ( n ){ return gc ( n ) ? X : n } function pi ( n , t , r , e , u , i ){
var o = r & hn , f = n . length , c = t . length ; if ( f != c &&! ( o && c > f )) return ! 1 ; var a = i . get ( n ), l = i . get ( t ); if ( a && l ) return a == t && l == n ; var s =- 1 , p =! 0 , _ = r & pn ? new yr : X ; for ( i . set ( n , t ), i . set ( t , n ); ++ s < f ;){ var v = n [ s ], g = t [ s ]; if ( e ) var y = o ? e ( g , v , s , t , n , i ) : e ( v , g , s , n , t , i ); if ( y !== X ){ if ( y ) continue ; p =! 1 ; break } if ( _ ){ if ( ! h ( t , function ( n , t ){ if ( ! S ( _ , t ) && ( v === n || u ( v , n , r , e , i ))) return _ . push ( t )})){ p =! 1 ; break }} else if ( v !== g &&! u ( v , g , r , e , i )){ p =! 1 ; break }} return i . delete ( n ), i . delete ( t ), p } function _i ( n , t , r , e , u , i , o ){ switch ( r ){ case ct : if ( n . byteLength != t . byteLength || n . byteOffset != t . byteOffset ) return ! 1 ;
n = n . buffer , t = t . buffer ; case ft : return ! ( n . byteLength != t . byteLength ||! i ( new Rl ( n ), new Rl ( t ))); case Nn : case Pn : case Hn : return Gf ( + n , + t ); case Zn : return n . name == t . name && n . message == t . message ; case nt : case rt : return n == t + " " ; case Gn : var f = M ; case tt : var c = e & hn ; if ( f || ( f = P ), n . size != t . size &&! c ) return ! 1 ; var a = o . get ( n ); if ( a ) return a == t ; e |= pn , o . set ( n , t ); var l = pi ( f ( n ), f ( t ), e , u , i , o ); return o . delete ( n ), l ; case et : if ( _s ) return _s . call ( n ) == _s . call ( t )} return ! 1 } function vi ( n , t , r , e , u , i ){ var o = r & hn , f = yi ( n ), c = f . length ; if ( c != yi ( t ) . length &&! o ) return ! 1 ;
for ( var a = c ; a -- ;){ var l = f [ a ]; if ( ! ( o ? l in t : bl . call ( t , l ))) return ! 1 } var s = i . get ( n ), h = i . get ( t ); if ( s && h ) return s == t && h == n ; var p =! 0 ; i . set ( n , t ), i . set ( t , n ); for ( var _ = o ; ++ a < c ;){ l = f [ a ]; var v = n [ l ], g = t [ l ]; if ( e ) var y = o ? e ( g , v , l , t , n , i ) : e ( v , g , l , n , t , i ); if ( ! ( y === X ? v === g || u ( v , g , r , e , i ) : y )){ p =! 1 ; break } _ || ( _ = " constructor " == l )} if ( p &&! _ ){ var d = n . constructor , b = t . constructor ; d != b && " constructor " in n && " constructor " in t &&! ( " function " == typeof d && d instanceof d && " function " == typeof b && b instanceof b ) && ( p =! 1 )} return i . delete ( n ),
i . delete ( t ), p } function gi ( n ){ return Ls ( Vi ( n , X , _o ), n + " " )} function yi ( n ){ return de ( n , Pc , Is )} function di ( n ){ return de ( n , qc , Rs )} function bi ( n ){ for ( var t = n . name + " " , r = fs [ t ], e = bl . call ( fs , t ) ? r . length : 0 ; e -- ;){ var u = r [ e ], i = u . func ; if ( null == i || i == n ) return u . name } return t } function wi ( n ){ return ( bl . call ( Z , " placeholder " ) ? Z : n ) . placeholder } function mi (){ var n = Z . iteratee || Ca ; return n = n === Ca ? De : n , arguments . length ? n ( arguments [ 0 ], arguments [ 1 ]) : n } function xi ( n , t ){ var r = n . __data__ ; return Ti ( t ) ? r [ " string " == typeof t ? " string " : " hash " ] : r . map ;
} function ji ( n ){ for ( var t = Pc ( n ), r = t . length ; r -- ;){ var e = t [ r ], u = n [ e ]; t [ r ] = [ e , u , Fi ( u )]} return t } function Ai ( n , t ){ var r = B ( n , t ); return Ue ( r ) ? r : X } function ki ( n ){ var t = bl . call ( n , Bl ), r = n [ Bl ]; try { n [ Bl ] = X ; var e =! 0 } catch ( n ){} var u = xl . call ( n ); return e && ( t ? n [ Bl ] = r : delete n [ Bl ]), u } function Oi ( n , t , r ){ for ( var e =- 1 , u = r . length ; ++ e < u ;){ var i = r [ e ], o = i . size ; switch ( i . type ){ case " drop " : n += o ; break ; case " dropRight " : t -= o ; break ; case " take " : t = Hl ( t , n + o ); break ; case " takeRight " : n = Gl ( n , t - o )}} return { start : n , end : t }} function Ii ( n ){ var t = n . match ( Bt );
return t ? t [ 1 ] . split ( Tt ) : []} function Ri ( n , t , r ){ t = ku ( t , n ); for ( var e =- 1 , u = t . length , i =! 1 ; ++ e < u ;){ var o = no ( t [ e ]); if ( ! ( i = null != n && r ( n , o ))) break ; n = n [ o ]} return i ||++ e != u ? i : ( u = null == n ? 0 : n . length , !! u && oc ( u ) && Ci ( o , u ) && ( bh ( n ) || dh ( n )))} function zi ( n ){ var t = n . length , r = new n . constructor ( t ); return t && " string " == typeof n [ 0 ] && bl . call ( n , " index " ) && ( r . index = n . index , r . input = n . input ), r } function Ei ( n ){ return " function " != typeof n . constructor || Mi ( n ) ? {} : gs ( El ( n ))} function Si ( n , t , r ){ var e = n . constructor ; switch ( t ){ case ft : return Ru ( n );
case Nn : case Pn : return new e ( + n ); case ct : return zu ( n , r ); case at : case lt : case st : case ht : case pt : case _t : case vt : case gt : case yt : return Wu ( n , r ); case Gn : return new e ; case Hn : case rt : return new e ( n ); case nt : return Eu ( n ); case tt : return new e ; case et : return Su ( n )}} function Wi ( n , t ){ var r = t . length ; if ( ! r ) return n ; var e = r - 1 ; return t [ e ] = ( r > 1 ? " & " : " " ) + t [ e ], t = t . join ( r > 2 ? " , " : " " ), n . replace ( Ut , " { \n /* [wrapped with " + t + " ] */ \n " )} function Li ( n ){ return bh ( n ) || dh ( n ) ||!! ( Cl && n && n [ Cl ])} function Ci ( n , t ){ var r = typeof n ;
return t = null == t ? Wn : t , !! t && ( " number " == r || " symbol " != r && Vt . test ( n )) && n >- 1 && n % 1 == 0 && n < t } function Ui ( n , t , r ){ if ( ! fc ( r )) return ! 1 ; var e = typeof t ; return !! ( " number " == e ? Hf ( r ) && Ci ( t , r . length ) : " string " == e && t in r ) && Gf ( r [ t ], n )} function Bi ( n , t ){ if ( bh ( n )) return ! 1 ; var r = typeof n ; return ! ( " number " != r && " symbol " != r && " boolean " != r && null != n &&! bc ( n )) || ( zt . test ( n ) ||! Rt . test ( n ) || null != t && n in ll ( t ))} function Ti ( n ){ var t = typeof n ; return " string " == t || " number " == t || " symbol " == t || " boolean " == t ? " __proto__ " !== n : null === n } function $i ( n ){
var t = bi ( n ), r = Z [ t ]; if ( " function " != typeof r ||! ( t in Ct . prototype )) return ! 1 ; if ( n === r ) return ! 0 ; var e = Os ( r ); return !! e && n === e [ 0 ]} function Di ( n ){ return !! ml && ml in n } function Mi ( n ){ var t = n && n . constructor ; return n === ( " function " == typeof t && t . prototype || gl )} function Fi ( n ){ return n === n &&! fc ( n )} function Ni ( n , t ){ return function ( r ){ return null != r && ( r [ n ] === t && ( t !== X || n in ll ( r )))}} function Pi ( n ){ var t = Cf ( n , function ( n ){ return r . size === fn && r . clear (), n }), r = t . cache ; return t } function qi ( n , t ){ var r = n [ 1 ], e = t [ 1 ], u = r | e , i = u < ( _n | vn | mn ), o = e == mn && r == yn || e == mn && r == xn && n [ 7 ] . length <= t [ 8 ] || e == ( mn | xn ) && t [ 7 ] . length <= t [ 8 ] && r == yn ;
if ( ! i &&! o ) return n ; e & _n && ( n [ 2 ] = t [ 2 ], u |= r & _n ? 0 : gn ); var f = t [ 3 ]; if ( f ){ var c = n [ 3 ]; n [ 3 ] = c ? Uu ( c , f , t [ 4 ]) : f , n [ 4 ] = c ? N ( n [ 3 ], cn ) : t [ 4 ]} return f = t [ 5 ], f && ( c = n [ 5 ], n [ 5 ] = c ? Bu ( c , f , t [ 6 ]) : f , n [ 6 ] = c ? N ( n [ 5 ], cn ) : t [ 6 ]), f = t [ 7 ], f && ( n [ 7 ] = f ), e & mn && ( n [ 8 ] = null == n [ 8 ] ? t [ 8 ] : Hl ( n [ 8 ], t [ 8 ])), null == n [ 9 ] && ( n [ 9 ] = t [ 9 ]), n [ 0 ] = t [ 0 ], n [ 1 ] = u , n } function Zi ( n ){ var t = []; if ( null != n ) for ( var r in ll ( n )) t . push ( r ); return t } function Ki ( n ){ return xl . call ( n )} function Vi ( t , r , e ){ return r = Gl ( r === X ? t . length - 1 : r , 0 ), function (){ for ( var u = arguments , i =- 1 , o = Gl ( u . length - r , 0 ), f = il ( o ); ++ i < o ;) f [ i ] = u [ r + i ];
i =- 1 ; for ( var c = il ( r + 1 ); ++ i < r ;) c [ i ] = u [ i ]; return c [ r ] = e ( f ), n ( t , this , c )}} function Gi ( n , t ){ return t . length < 2 ? n : _e ( n , au ( t , 0 , - 1 ))} function Hi ( n , t ){ for ( var r = n . length , e = Hl ( t . length , r ), u = Tu ( n ); e -- ;){ var i = t [ e ]; n [ e ] = Ci ( i , r ) ? u [ i ] : X } return n } function Ji ( n , t ){ if (( " constructor " !== t || " function " != typeof n [ t ]) && " __proto__ " != t ) return n [ t ]} function Yi ( n , t , r ){ var e = t + " " ; return Ls ( n , Wi ( e , ro ( Ii ( e ), r )))} function Qi ( n ){ var t = 0 , r = 0 ; return function (){ var e = Jl (), u = In - ( e - r ); if ( r = e , u > 0 ){ if ( ++ t >= On ) return arguments [ 0 ]} else t = 0 ;
return n . apply ( X , arguments )}} function Xi ( n , t ){ var r =- 1 , e = n . length , u = e - 1 ; for ( t = t === X ? e : t ; ++ r < t ;){ var i = tu ( r , u ), o = n [ i ]; n [ i ] = n [ r ], n [ r ] = o } return n . length = t , n } function no ( n ){ if ( " string " == typeof n || bc ( n )) return n ; var t = n + " " ; return " 0 " == t && 1 / n ==- Sn ? " -0 " : t } function to ( n ){ if ( null != n ){ try { return dl . call ( n )} catch ( n ){} try { return n + " " } catch ( n ){}} return " " } function ro ( n , t ){ return r ( $n , function ( r ){ var e = " _. " + r [ 0 ]; t & r [ 1 ] &&! o ( n , e ) && n . push ( e )}), n . sort ()} function eo ( n ){ if ( n instanceof Ct ) return n . clone (); var t = new Y ( n . __wrapped__ , n . __chain__ );
return t . __actions__ = Tu ( n . __actions__ ), t . __index__ = n . __index__ , t . __values__ = n . __values__ , t } function uo ( n , t , r ){ t = ( r ? Ui ( n , t , r ) : t === X ) ? 1 : Gl ( kc ( t ), 0 ); var e = null == n ? 0 : n . length ; if ( ! e || t < 1 ) return []; for ( var u = 0 , i = 0 , o = il ( Fl ( e / t )); u < e ;) o [ i ++ ] = au ( n , u , u += t ); return o } function io ( n ){ for ( var t =- 1 , r = null == n ? 0 : n . length , e = 0 , u = []; ++ t < r ;){ var i = n [ t ]; i && ( u [ e ++ ] = i )} return u } function oo (){ var n = arguments . length ; if ( ! n ) return []; for ( var t = il ( n - 1 ), r = arguments [ 0 ], e = n ; e -- ;) t [ e - 1 ] = arguments [ e ]; return a ( bh ( r ) ? Tu ( r ) : [ r ], ee ( t , 1 ));
} function fo ( n , t , r ){ var e = null == n ? 0 : n . length ; return e ? ( t = r || t === X ? 1 : kc ( t ), au ( n , t < 0 ? 0 : t , e )) : []} function co ( n , t , r ){ var e = null == n ? 0 : n . length ; return e ? ( t = r || t === X ? 1 : kc ( t ), t = e - t , au ( n , 0 , t < 0 ? 0 : t )) : []} function ao ( n , t ){ return n && n . length ? bu ( n , mi ( t , 3 ), ! 0 , ! 0 ) : []} function lo ( n , t ){ return n && n . length ? bu ( n , mi ( t , 3 ), ! 0 ) : []} function so ( n , t , r , e ){ var u = null == n ? 0 : n . length ; return u ? ( r && " number " != typeof r && Ui ( n , t , r ) && ( r = 0 , e = u ), ne ( n , t , r , e )) : []} function ho ( n , t , r ){ var e = null == n ? 0 : n . length ; if ( ! e ) return - 1 ; var u = null == r ? 0 : kc ( r );
return u < 0 && ( u = Gl ( e + u , 0 )), g ( n , mi ( t , 3 ), u )} function po ( n , t , r ){ var e = null == n ? 0 : n . length ; if ( ! e ) return - 1 ; var u = e - 1 ; return r !== X && ( u = kc ( r ), u = r < 0 ? Gl ( e + u , 0 ) : Hl ( u , e - 1 )), g ( n , mi ( t , 3 ), u , ! 0 )} function _o ( n ){ return ( null == n ? 0 : n . length ) ? ee ( n , 1 ) : []} function vo ( n ){ return ( null == n ? 0 : n . length ) ? ee ( n , Sn ) : []} function go ( n , t ){ return ( null == n ? 0 : n . length ) ? ( t = t === X ? 1 : kc ( t ), ee ( n , t )) : []} function yo ( n ){ for ( var t =- 1 , r = null == n ? 0 : n . length , e = {}; ++ t < r ;){ var u = n [ t ]; e [ u [ 0 ]] = u [ 1 ]} return e } function bo ( n ){ return n && n . length ? n [ 0 ] : X } function wo ( n , t , r ){
var e = null == n ? 0 : n . length ; if ( ! e ) return - 1 ; var u = null == r ? 0 : kc ( r ); return u < 0 && ( u = Gl ( e + u , 0 )), y ( n , t , u )} function mo ( n ){ return ( null == n ? 0 : n . length ) ? au ( n , 0 , - 1 ) : []} function xo ( n , t ){ return null == n ? " " : Kl . call ( n , t )} function jo ( n ){ var t = null == n ? 0 : n . length ; return t ? n [ t - 1 ] : X } function Ao ( n , t , r ){ var e = null == n ? 0 : n . length ; if ( ! e ) return - 1 ; var u = e ; return r !== X && ( u = kc ( r ), u = u < 0 ? Gl ( e + u , 0 ) : Hl ( u , e - 1 )), t === t ? K ( n , t , u ) : g ( n , b , u , ! 0 )} function ko ( n , t ){ return n && n . length ? Ge ( n , kc ( t )) : X } function Oo ( n , t ){ return n && n . length && t && t . length ? Xe ( n , t ) : n ;
} function Io ( n , t , r ){ return n && n . length && t && t . length ? Xe ( n , t , mi ( r , 2 )) : n } function Ro ( n , t , r ){ return n && n . length && t && t . length ? Xe ( n , t , X , r ) : n } function zo ( n , t ){ var r = []; if ( ! n ||! n . length ) return r ; var e =- 1 , u = [], i = n . length ; for ( t = mi ( t , 3 ); ++ e < i ;){ var o = n [ e ]; t ( o , e , n ) && ( r . push ( o ), u . push ( e ))} return nu ( n , u ), r } function Eo ( n ){ return null == n ? n : Xl . call ( n )} function So ( n , t , r ){ var e = null == n ? 0 : n . length ; return e ? ( r && " number " != typeof r && Ui ( n , t , r ) ? ( t = 0 , r = e ) : ( t = null == t ? 0 : kc ( t ), r = r === X ? e : kc ( r )), au ( n , t , r )) : []} function Wo ( n , t ){
return su ( n , t )} function Lo ( n , t , r ){ return hu ( n , t , mi ( r , 2 ))} function Co ( n , t ){ var r = null == n ? 0 : n . length ; if ( r ){ var e = su ( n , t ); if ( e < r && Gf ( n [ e ], t )) return e } return - 1 } function Uo ( n , t ){ return su ( n , t , ! 0 )} function Bo ( n , t , r ){ return hu ( n , t , mi ( r , 2 ), ! 0 )} function To ( n , t ){ if ( null == n ? 0 : n . length ){ var r = su ( n , t , ! 0 ) - 1 ; if ( Gf ( n [ r ], t )) return r } return - 1 } function $o ( n ){ return n && n . length ? pu ( n ) : []} function Do ( n , t ){ return n && n . length ? pu ( n , mi ( t , 2 )) : []} function Mo ( n ){ var t = null == n ? 0 : n . length ; return t ? au ( n , 1 , t ) : []} function Fo ( n , t , r ){
return n && n . length ? ( t = r || t === X ? 1 : kc ( t ), au ( n , 0 , t < 0 ? 0 : t )) : []} function No ( n , t , r ){ var e = null == n ? 0 : n . length ; return e ? ( t = r || t === X ? 1 : kc ( t ), t = e - t , au ( n , t < 0 ? 0 : t , e )) : []} function Po ( n , t ){ return n && n . length ? bu ( n , mi ( t , 3 ), ! 1 , ! 0 ) : []} function qo ( n , t ){ return n && n . length ? bu ( n , mi ( t , 3 )) : []} function Zo ( n ){ return n && n . length ? gu ( n ) : []} function Ko ( n , t ){ return n && n . length ? gu ( n , mi ( t , 2 )) : []} function Vo ( n , t ){ return t = " function " == typeof t ? t : X , n && n . length ? gu ( n , X , t ) : []} function Go ( n ){ if ( ! n ||! n . length ) return []; var t = 0 ; return n = i ( n , function ( n ){
if ( Jf ( n )) return t = Gl ( n . length , t ), ! 0 }), O ( t , function ( t ){ return c ( n , m ( t ))})} function Ho ( t , r ){ if ( ! t ||! t . length ) return []; var e = Go ( t ); return null == r ? e : c ( e , function ( t ){ return n ( r , X , t )})} function Jo ( n , t ){ return xu ( n || [], t || [], Sr )} function Yo ( n , t ){ return xu ( n || [], t || [], fu )} function Qo ( n ){ var t = Z ( n ); return t . __chain__ =! 0 , t } function Xo ( n , t ){ return t ( n ), n } function nf ( n , t ){ return t ( n )} function tf (){ return Qo ( this )} function rf (){ return new Y ( this . value (), this . __chain__ )} function ef (){ this . __values__ === X && ( this . __values__ = jc ( this . value ()));
var n = this . __index__ >= this . __values__ . length ; return { done : n , value : n ? X : this . __values__ [ this . __index__ ++ ]}} function uf (){ return this } function of ( n ){ for ( var t , r = this ; r instanceof J ;){ var e = eo ( r ); e . __index__ = 0 , e . __values__ = X , t ? u . __wrapped__ = e : t = e ; var u = e ; r = r . __wrapped__ } return u . __wrapped__ = n , t } function ff (){ var n = this . __wrapped__ ; if ( n instanceof Ct ){ var t = n ; return this . __actions__ . length && ( t = new Ct ( this )), t = t . reverse (), t . __actions__ . push ({ func : nf , args : [ Eo ], thisArg : X }), new Y ( t , this . __chain__ )} return this . thru ( Eo );
} function cf (){ return wu ( this . __wrapped__ , this . __actions__ )} function af ( n , t , r ){ var e = bh ( n ) ? u : Jr ; return r && Ui ( n , t , r ) && ( t = X ), e ( n , mi ( t , 3 ))} function lf ( n , t ){ return ( bh ( n ) ? i : te )( n , mi ( t , 3 ))} function sf ( n , t ){ return ee ( yf ( n , t ), 1 )} function hf ( n , t ){ return ee ( yf ( n , t ), Sn )} function pf ( n , t , r ){ return r = r === X ? 1 : kc ( r ), ee ( yf ( n , t ), r )} function _f ( n , t ){ return ( bh ( n ) ? r : ys )( n , mi ( t , 3 ))} function vf ( n , t ){ return ( bh ( n ) ? e : ds )( n , mi ( t , 3 ))} function gf ( n , t , r , e ){ n = Hf ( n ) ? n : ra ( n ), r = r &&! e ? kc ( r ) : 0 ; var u = n . length ; return r < 0 && ( r = Gl ( u + r , 0 )),
dc ( n ) ? r <= u && n . indexOf ( t , r ) >- 1 :!! u && y ( n , t , r ) >- 1 } function yf ( n , t ){ return ( bh ( n ) ? c : Pe )( n , mi ( t , 3 ))} function df ( n , t , r , e ){ return null == n ? [] : ( bh ( t ) || ( t = null == t ? [] : [ t ]), r = e ? X : r , bh ( r ) || ( r = null == r ? [] : [ r ]), He ( n , t , r ))} function bf ( n , t , r ){ var e = bh ( n ) ? l : j , u = arguments . length < 3 ; return e ( n , mi ( t , 4 ), r , u , ys )} function wf ( n , t , r ){ var e = bh ( n ) ? s : j , u = arguments . length < 3 ; return e ( n , mi ( t , 4 ), r , u , ds )} function mf ( n , t ){ return ( bh ( n ) ? i : te )( n , Uf ( mi ( t , 3 )))} function xf ( n ){ return ( bh ( n ) ? Ir : iu )( n )} function jf ( n , t , r ){ return t = ( r ? Ui ( n , t , r ) : t === X ) ? 1 : kc ( t ),
( bh ( n ) ? Rr : ou )( n , t )} function Af ( n ){ return ( bh ( n ) ? zr : cu )( n )} function kf ( n ){ if ( null == n ) return 0 ; if ( Hf ( n )) return dc ( n ) ? V ( n ) : n . length ; var t = zs ( n ); return t == Gn || t == tt ? n . size : Me ( n ) . length } function Of ( n , t , r ){ var e = bh ( n ) ? h : lu ; return r && Ui ( n , t , r ) && ( t = X ), e ( n , mi ( t , 3 ))} function If ( n , t ){ if ( " function " != typeof t ) throw new pl ( en ); return n = kc ( n ), function (){ if ( -- n < 1 ) return t . apply ( this , arguments )}} function Rf ( n , t , r ){ return t = r ? X : t , t = n && null == t ? n . length : t , ai ( n , mn , X , X , X , X , t )} function zf ( n , t ){ var r ; if ( " function " != typeof t ) throw new pl ( en );
return n = kc ( n ), function (){ return -- n > 0 && ( r = t . apply ( this , arguments )), n <= 1 && ( t = X ), r }} function Ef ( n , t , r ){ t = r ? X : t ; var e = ai ( n , yn , X , X , X , X , X , t ); return e . placeholder = Ef . placeholder , e } function Sf ( n , t , r ){ t = r ? X : t ; var e = ai ( n , dn , X , X , X , X , X , t ); return e . placeholder = Sf . placeholder , e } function Wf ( n , t , r ){ function e ( t ){ var r = h , e = p ; return h = p = X , d = t , v = n . apply ( e , r )} function u ( n ){ return d = n , g = Ws ( f , t ), b ? e ( n ) : v } function i ( n ){ var r = n - y , e = n - d , u = t - r ; return w ? Hl ( u , _ - e ) : u } function o ( n ){ var r = n - y , e = n - d ; return y === X || r >= t || r < 0 || w && e >= _ ;
} function f (){ var n = fh (); return o ( n ) ? c ( n ) : ( g = Ws ( f , i ( n )), X )} function c ( n ){ return g = X , m && h ? e ( n ) : ( h = p = X , v )} function a (){ g !== X && As ( g ), d = 0 , h = y = p = g = X } function l (){ return g === X ? v : c ( fh ())} function s (){ var n = fh (), r = o ( n ); if ( h = arguments , p = this , y = n , r ){ if ( g === X ) return u ( y ); if ( w ) return As ( g ), g = Ws ( f , t ), e ( y )} return g === X && ( g = Ws ( f , t )), v } var h , p , _ , v , g , y , d = 0 , b =! 1 , w =! 1 , m =! 0 ; if ( " function " != typeof n ) throw new pl ( en ); return t = Ic ( t ) || 0 , fc ( r ) && ( b =!! r . leading , w = " maxWait " in r , _ = w ? Gl ( Ic ( r . maxWait ) || 0 , t ) : _ , m = " trailing " in r ? !! r . trailing : m ),
s . cancel = a , s . flush = l , s } function Lf ( n ){ return ai ( n , jn )} function Cf ( n , t ){ if ( " function " != typeof n || null != t && " function " != typeof t ) throw new pl ( en ); var r = function (){ var e = arguments , u = t ? t . apply ( this , e ) : e [ 0 ], i = r . cache ; if ( i . has ( u )) return i . get ( u ); var o = n . apply ( this , e ); return r . cache = i . set ( u , o ) || i , o }; return r . cache = new ( Cf . Cache || sr ), r } function Uf ( n ){ if ( " function " != typeof n ) throw new pl ( en ); return function (){ var t = arguments ; switch ( t . length ){ case 0 : return ! n . call ( this ); case 1 : return ! n . call ( this , t [ 0 ]); case 2 :
return ! n . call ( this , t [ 0 ], t [ 1 ]); case 3 : return ! n . call ( this , t [ 0 ], t [ 1 ], t [ 2 ])} return ! n . apply ( this , t )}} function Bf ( n ){ return zf ( 2 , n )} function Tf ( n , t ){ if ( " function " != typeof n ) throw new pl ( en ); return t = t === X ? t : kc ( t ), uu ( n , t )} function $f ( t , r ){ if ( " function " != typeof t ) throw new pl ( en ); return r = null == r ? 0 : Gl ( kc ( r ), 0 ), uu ( function ( e ){ var u = e [ r ], i = Ou ( e , 0 , r ); return u && a ( i , u ), n ( t , this , i )})} function Df ( n , t , r ){ var e =! 0 , u =! 0 ; if ( " function " != typeof n ) throw new pl ( en ); return fc ( r ) && ( e = " leading " in r ? !! r . leading : e , u = " trailing " in r ? !! r . trailing : u ),
Wf ( n , t ,{ leading : e , maxWait : t , trailing : u })} function Mf ( n ){ return Rf ( n , 1 )} function Ff ( n , t ){ return ph ( Au ( t ), n )} function Nf (){ if ( ! arguments . length ) return []; var n = arguments [ 0 ]; return bh ( n ) ? n : [ n ]} function Pf ( n ){ return Fr ( n , sn )} function qf ( n , t ){ return t = " function " == typeof t ? t : X , Fr ( n , sn , t )} function Zf ( n ){ return Fr ( n , an | sn )} function Kf ( n , t ){ return t = " function " == typeof t ? t : X , Fr ( n , an | sn , t )} function Vf ( n , t ){ return null == t || Pr ( n , t , Pc ( t ))} function Gf ( n , t ){ return n === t || n !== n && t !== t } function Hf ( n ){ return null != n && oc ( n . length ) &&! uc ( n );
} function Jf ( n ){ return cc ( n ) && Hf ( n )} function Yf ( n ){ return n ===! 0 || n ===! 1 || cc ( n ) && we ( n ) == Nn } function Qf ( n ){ return cc ( n ) && 1 === n . nodeType &&! gc ( n )} function Xf ( n ){ if ( null == n ) return ! 0 ; if ( Hf ( n ) && ( bh ( n ) || " string " == typeof n || " function " == typeof n . splice || mh ( n ) || Oh ( n ) || dh ( n ))) return ! n . length ; var t = zs ( n ); if ( t == Gn || t == tt ) return ! n . size ; if ( Mi ( n )) return ! Me ( n ) . length ; for ( var r in n ) if ( bl . call ( n , r )) return ! 1 ; return ! 0 } function nc ( n , t ){ return Se ( n , t )} function tc ( n , t , r ){ r = " function " == typeof r ? r : X ; var e = r ? r ( n , t ) : X ; return e === X ? Se ( n , t , X , r ) :!! e ;
} function rc ( n ){ if ( ! cc ( n )) return ! 1 ; var t = we ( n ); return t == Zn || t == qn || " string " == typeof n . message && " string " == typeof n . name &&! gc ( n )} function ec ( n ){ return " number " == typeof n && Zl ( n )} function uc ( n ){ if ( ! fc ( n )) return ! 1 ; var t = we ( n ); return t == Kn || t == Vn || t == Fn || t == Xn } function ic ( n ){ return " number " == typeof n && n == kc ( n )} function oc ( n ){ return " number " == typeof n && n >- 1 && n % 1 == 0 && n <= Wn } function fc ( n ){ var t = typeof n ; return null != n && ( " object " == t || " function " == t )} function cc ( n ){ return null != n && " object " == typeof n } function ac ( n , t ){
return n === t || Ce ( n , t , ji ( t ))} function lc ( n , t , r ){ return r = " function " == typeof r ? r : X , Ce ( n , t , ji ( t ), r )} function sc ( n ){ return vc ( n ) && n !=+ n } function hc ( n ){ if ( Es ( n )) throw new fl ( rn ); return Ue ( n )} function pc ( n ){ return null === n } function _c ( n ){ return null == n } function vc ( n ){ return " number " == typeof n || cc ( n ) && we ( n ) == Hn } function gc ( n ){ if ( ! cc ( n ) || we ( n ) != Yn ) return ! 1 ; var t = El ( n ); if ( null === t ) return ! 0 ; var r = bl . call ( t , " constructor " ) && t . constructor ; return " function " == typeof r && r instanceof r && dl . call ( r ) == jl } function yc ( n ){
return ic ( n ) && n >=- Wn && n <= Wn } function dc ( n ){ return " string " == typeof n ||! bh ( n ) && cc ( n ) && we ( n ) == rt } function bc ( n ){ return " symbol " == typeof n || cc ( n ) && we ( n ) == et } function wc ( n ){ return n === X } function mc ( n ){ return cc ( n ) && zs ( n ) == it } function xc ( n ){ return cc ( n ) && we ( n ) == ot } function jc ( n ){ if ( ! n ) return []; if ( Hf ( n )) return dc ( n ) ? G ( n ) : Tu ( n ); if ( Ul && n [ Ul ]) return D ( n [ Ul ]()); var t = zs ( n ); return ( t == Gn ? M : t == tt ? P : ra )( n )} function Ac ( n ){ if ( ! n ) return 0 === n ? n : 0 ; if ( n = Ic ( n ), n === Sn || n ===- Sn ){ return ( n < 0 ? - 1 : 1 ) * Ln } return n === n ? n : 0 } function kc ( n ){
var t = Ac ( n ), r = t % 1 ; return t === t ? r ? t - r : t : 0 } function Oc ( n ){ return n ? Mr ( kc ( n ), 0 , Un ) : 0 } function Ic ( n ){ if ( " number " == typeof n ) return n ; if ( bc ( n )) return Cn ; if ( fc ( n )){ var t = " function " == typeof n . valueOf ? n . valueOf () : n ; n = fc ( t ) ? t + " " : t } if ( " string " != typeof n ) return 0 === n ? n :+ n ; n = R ( n ); var r = qt . test ( n ); return r || Kt . test ( n ) ? Xr ( n . slice ( 2 ), r ? 2 : 8 ) : Pt . test ( n ) ? Cn :+ n } function Rc ( n ){ return $u ( n , qc ( n ))} function zc ( n ){ return n ? Mr ( kc ( n ), - Wn , Wn ) : 0 === n ? n : 0 } function Ec ( n ){ return null == n ? " " : vu ( n )} function Sc ( n , t ){ var r = gs ( n ); return null == t ? r : Cr ( r , t );
} function Wc ( n , t ){ return v ( n , mi ( t , 3 ), ue )} function Lc ( n , t ){ return v ( n , mi ( t , 3 ), oe )} function Cc ( n , t ){ return null == n ? n : bs ( n , mi ( t , 3 ), qc )} function Uc ( n , t ){ return null == n ? n : ws ( n , mi ( t , 3 ), qc )} function Bc ( n , t ){ return n && ue ( n , mi ( t , 3 ))} function Tc ( n , t ){ return n && oe ( n , mi ( t , 3 ))} function $c ( n ){ return null == n ? [] : fe ( n , Pc ( n ))} function Dc ( n ){ return null == n ? [] : fe ( n , qc ( n ))} function Mc ( n , t , r ){ var e = null == n ? X : _e ( n , t ); return e === X ? r : e } function Fc ( n , t ){ return null != n && Ri ( n , t , xe )} function Nc ( n , t ){ return null != n && Ri ( n , t , je );
} function Pc ( n ){ return Hf ( n ) ? Or ( n ) : Me ( n )} function qc ( n ){ return Hf ( n ) ? Or ( n , ! 0 ) : Fe ( n )} function Zc ( n , t ){ var r = {}; return t = mi ( t , 3 ), ue ( n , function ( n , e , u ){ Br ( r , t ( n , e , u ), n )}), r } function Kc ( n , t ){ var r = {}; return t = mi ( t , 3 ), ue ( n , function ( n , e , u ){ Br ( r , e , t ( n , e , u ))}), r } function Vc ( n , t ){ return Gc ( n , Uf ( mi ( t )))} function Gc ( n , t ){ if ( null == n ) return {}; var r = c ( di ( n ), function ( n ){ return [ n ]}); return t = mi ( t ), Ye ( n , r , function ( n , r ){ return t ( n , r [ 0 ])})} function Hc ( n , t , r ){ t = ku ( t , n ); var e =- 1 , u = t . length ; for ( u || ( u = 1 , n = X ); ++ e < u ;){ var i = null == n ? X : n [ no ( t [ e ])];
i === X && ( e = u , i = r ), n = uc ( i ) ? i . call ( n ) : i } return n } function Jc ( n , t , r ){ return null == n ? n : fu ( n , t , r )} function Yc ( n , t , r , e ){ return e = " function " == typeof e ? e : X , null == n ? n : fu ( n , t , r , e )} function Qc ( n , t , e ){ var u = bh ( n ), i = u || mh ( n ) || Oh ( n ); if ( t = mi ( t , 4 ), null == e ){ var o = n && n . constructor ; e = i ? u ? new o : [] : fc ( n ) && uc ( o ) ? gs ( El ( n )) : {}} return ( i ? r : ue )( n , function ( n , r , u ){ return t ( e , n , r , u )}), e } function Xc ( n , t ){ return null == n || yu ( n , t )} function na ( n , t , r ){ return null == n ? n : du ( n , t , Au ( r ))} function ta ( n , t , r , e ){ return e = " function " == typeof e ? e : X ,
null == n ? n : du ( n , t , Au ( r ), e )} function ra ( n ){ return null == n ? [] : E ( n , Pc ( n ))} function ea ( n ){ return null == n ? [] : E ( n , qc ( n ))} function ua ( n , t , r ){ return r === X && ( r = t , t = X ), r !== X && ( r = Ic ( r ), r = r === r ? r : 0 ), t !== X && ( t = Ic ( t ), t = t === t ? t : 0 ), Mr ( Ic ( n ), t , r )} function ia ( n , t , r ){ return t = Ac ( t ), r === X ? ( r = t , t = 0 ) : r = Ac ( r ), n = Ic ( n ), Ae ( n , t , r )} function oa ( n , t , r ){ if ( r && " boolean " != typeof r && Ui ( n , t , r ) && ( t = r = X ), r === X && ( " boolean " == typeof t ? ( r = t , t = X ) : " boolean " == typeof n && ( r = n , n = X )), n === X && t === X ? ( n = 0 , t = 1 ) : ( n = Ac ( n ), t === X ? ( t = n , n = 0 ) : t = Ac ( t )), n > t ){
var e = n ; n = t , t = e } if ( r || n % 1 || t % 1 ){ var u = Ql (); return Hl ( n + u * ( t - n + Qr ( " 1e- " + (( u + " " ) . length - 1 ))), t )} return tu ( n , t )} function fa ( n ){ return Qh ( Ec ( n ) . toLowerCase ())} function ca ( n ){ return n = Ec ( n ), n && n . replace ( Gt , ve ) . replace ( Dr , " " )} function aa ( n , t , r ){ n = Ec ( n ), t = vu ( t ); var e = n . length ; r = r === X ? e : Mr ( kc ( r ), 0 , e ); var u = r ; return r -= t . length , r >= 0 && n . slice ( r , u ) == t } function la ( n ){ return n = Ec ( n ), n && At . test ( n ) ? n . replace ( xt , ge ) : n } function sa ( n ){ return n = Ec ( n ), n && Wt . test ( n ) ? n . replace ( St , " \\ $ & " ) : n } function ha ( n , t , r ){ n = Ec ( n ), t = kc ( t );
var e = t ? V ( n ) : 0 ; if ( ! t || e >= t ) return n ; var u = ( t - e ) / 2 ; return ri ( Nl ( u ), r ) + n + ri ( Fl ( u ), r )} function pa ( n , t , r ){ n = Ec ( n ), t = kc ( t ); var e = t ? V ( n ) : 0 ; return t && e < t ? n + ri ( t - e , r ) : n } function _a ( n , t , r ){ n = Ec ( n ), t = kc ( t ); var e = t ? V ( n ) : 0 ; return t && e < t ? ri ( t - e , r ) + n : n } function va ( n , t , r ){ return r || null == t ? t = 0 : t && ( t =+ t ), Yl ( Ec ( n ) . replace ( Lt , " " ), t || 0 )} function ga ( n , t , r ){ return t = ( r ? Ui ( n , t , r ) : t === X ) ? 1 : kc ( t ), eu ( Ec ( n ), t )} function ya (){ var n = arguments , t = Ec ( n [ 0 ]); return n . length < 3 ? t : t . replace ( n [ 1 ], n [ 2 ])} function da ( n , t , r ){ return r && " number " != typeof r && Ui ( n , t , r ) && ( t = r = X ),
( r = r === X ? Un : r >>> 0 ) ? ( n = Ec ( n ), n && ( " string " == typeof t || null != t &&! Ah ( t )) && ( t = vu ( t ), ! t && T ( n )) ? Ou ( G ( n ), 0 , r ) : n . split ( t , r )) : []} function ba ( n , t , r ){ return n = Ec ( n ), r = null == r ? 0 : Mr ( kc ( r ), 0 , n . length ), t = vu ( t ), n . slice ( r , r + t . length ) == t } function wa ( n , t , r ){ var e = Z . templateSettings ; r && Ui ( n , t , r ) && ( t = X ), n = Ec ( n ), t = Sh ({}, t , e , li ); var u , i , o = Sh ({}, t . imports , e . imports , li ), f = Pc ( o ), c = E ( o , f ), a = 0 , l = t . interpolate || Ht , s = " __p += ' " , h = sl (( t . escape || Ht ) . source + " | " + l . source + " | " + ( l === It ? Ft : Ht ) . source + " | " + ( t . evaluate || Ht ) . source + " | $ " , " g " ), p = " //# sourceURL= " + ( bl . call ( t , " sourceURL " ) ? ( t . sourceURL + " " ) . replace ( / \s / g , " " ) : " lodash.templateSources[ " + ++ Zr + " ] " ) + " \n " ;
n . replace ( h , function ( t , r , e , o , f , c ){ return e || ( e = o ), s += n . slice ( a , c ) . replace ( Jt , U ), r && ( u =! 0 , s += " ' + \n __e( " + r + " ) + \n ' " ), f && ( i =! 0 , s += " '; \n " + f + " ; \n __p += ' " ), e && ( s += " ' + \n ((__t = ( " + e + " )) == null ? '' : __t) + \n ' " ), a = c + t . length , t }), s += " '; \n " ; var _ = bl . call ( t , " variable " ) && t . variable ; if ( _ ){ if ( Dt . test ( _ )) throw new fl ( un )} else s = " with (obj) { \n " + s + " \n } \n " ; s = ( i ? s . replace ( dt , " " ) : s ) . replace ( bt , " $ 1 " ) . replace ( wt , " $ 1; " ), s = " function( " + ( _ || " obj " ) + " ) { \n " + ( _ ? " " : " obj || (obj = { }); \n " ) + " var __t, __p = '' " + ( u ? " , __e = _.escape " : " " ) + ( i ? " , __j = Array.prototype.join; \n function print() { __p += __j.call(arguments, '') } \n " : " ; \n " ) + s + " return __p \n } " ;
var v = Xh ( function (){ return cl ( f , p + " return " + s ) . apply ( X , c )}); if ( v . source = s , rc ( v )) throw v ; return v } function ma ( n ){ return Ec ( n ) . toLowerCase ()} function xa ( n ){ return Ec ( n ) . toUpperCase ()} function ja ( n , t , r ){ if ( n = Ec ( n ), n && ( r || t === X )) return R ( n ); if ( ! n ||! ( t = vu ( t ))) return n ; var e = G ( n ), u = G ( t ); return Ou ( e , W ( e , u ), L ( e , u ) + 1 ) . join ( " " )} function Aa ( n , t , r ){ if ( n = Ec ( n ), n && ( r || t === X )) return n . slice ( 0 , H ( n ) + 1 ); if ( ! n ||! ( t = vu ( t ))) return n ; var e = G ( n ); return Ou ( e , 0 , L ( e , G ( t )) + 1 ) . join ( " " )} function ka ( n , t , r ){ if ( n = Ec ( n ), n && ( r || t === X )) return n . replace ( Lt , " " );
if ( ! n ||! ( t = vu ( t ))) return n ; var e = G ( n ); return Ou ( e , W ( e , G ( t ))) . join ( " " )} function Oa ( n , t ){ var r = An , e = kn ; if ( fc ( t )){ var u = " separator " in t ? t . separator : u ; r = " length " in t ? kc ( t . length ) : r , e = " omission " in t ? vu ( t . omission ) : e } n = Ec ( n ); var i = n . length ; if ( T ( n )){ var o = G ( n ); i = o . length } if ( r >= i ) return n ; var f = r - V ( e ); if ( f < 1 ) return e ; var c = o ? Ou ( o , 0 , f ) . join ( " " ) : n . slice ( 0 , f ); if ( u === X ) return c + e ; if ( o && ( f += c . length - f ), Ah ( u )){ if ( n . slice ( f ) . search ( u )){ var a , l = c ; for ( u . global || ( u = sl ( u . source , Ec ( Nt . exec ( u )) + " g " )), u . lastIndex = 0 ; a = u . exec ( l );) var s = a . index ;
c = c . slice ( 0 , s === X ? f : s )}} else if ( n . indexOf ( vu ( u ), f ) != f ){ var h = c . lastIndexOf ( u ); h >- 1 && ( c = c . slice ( 0 , h ))} return c + e } function Ia ( n ){ return n = Ec ( n ), n && jt . test ( n ) ? n . replace ( mt , ye ) : n } function Ra ( n , t , r ){ return n = Ec ( n ), t = r ? X : t , t === X ? $ ( n ) ? Q ( n ) : _ ( n ) : n . match ( t ) || []} function za ( t ){ var r = null == t ? 0 : t . length , e = mi (); return t = r ? c ( t , function ( n ){ if ( " function " != typeof n [ 1 ]) throw new pl ( en ); return [ e ( n [ 0 ]), n [ 1 ]]}) : [], uu ( function ( e ){ for ( var u =- 1 ; ++ u < r ;){ var i = t [ u ]; if ( n ( i [ 0 ], this , e )) return n ( i [ 1 ], this , e )}})} function Ea ( n ){
return Nr ( Fr ( n , an ))} function Sa ( n ){ return function (){ return n }} function Wa ( n , t ){ return null == n || n !== n ? t : n } function La ( n ){ return n } function Ca ( n ){ return De ( " function " == typeof n ? n : Fr ( n , an ))} function Ua ( n ){ return qe ( Fr ( n , an ))} function Ba ( n , t ){ return Ze ( n , Fr ( t , an ))} function Ta ( n , t , e ){ var u = Pc ( t ), i = fe ( t , u ); null != e || fc ( t ) && ( i . length ||! u . length ) || ( e = t , t = n , n = this , i = fe ( t , Pc ( t ))); var o =! ( fc ( e ) && " chain " in e &&! e . chain ), f = uc ( n ); return r ( i , function ( r ){ var e = t [ r ]; n [ r ] = e , f && ( n . prototype [ r ] = function (){ var t = this . __chain__ ;
if ( o || t ){ var r = n ( this . __wrapped__ ); return ( r . __actions__ = Tu ( this . __actions__ )) . push ({ func : e , args : arguments , thisArg : n }), r . __chain__ = t , r } return e . apply ( n , a ([ this . value ()], arguments ))})}), n } function $a (){ return re . _ === this && ( re . _ = Al ), this } function Da (){} function Ma ( n ){ return n = kc ( n ), uu ( function ( t ){ return Ge ( t , n )})} function Fa ( n ){ return Bi ( n ) ? m ( no ( n )) : Qe ( n )} function Na ( n ){ return function ( t ){ return null == n ? X : _e ( n , t )}} function Pa (){ return []} function qa (){ return ! 1 } function Za (){ return {}} function Ka (){ return " " ;
} function Va (){ return ! 0 } function Ga ( n , t ){ if ( n = kc ( n ), n < 1 || n > Wn ) return []; var r = Un , e = Hl ( n , Un ); t = mi ( t ), n -= Un ; for ( var u = O ( e , t ); ++ r < n ;) t ( r ); return u } function Ha ( n ){ return bh ( n ) ? c ( n , no ) : bc ( n ) ? [ n ] : Tu ( Cs ( Ec ( n )))} function Ja ( n ){ var t =++ wl ; return Ec ( n ) + t } function Ya ( n ){ return n && n . length ? Yr ( n , La , me ) : X } function Qa ( n , t ){ return n && n . length ? Yr ( n , mi ( t , 2 ), me ) : X } function Xa ( n ){ return w ( n , La )} function nl ( n , t ){ return w ( n , mi ( t , 2 ))} function tl ( n ){ return n && n . length ? Yr ( n , La , Ne ) : X } function rl ( n , t ){ return n && n . length ? Yr ( n , mi ( t , 2 ), Ne ) : X ;
} function el ( n ){ return n && n . length ? k ( n , La ) : 0 } function ul ( n , t ){ return n && n . length ? k ( n , mi ( t , 2 )) : 0 } x = null == x ? re : be . defaults ( re . Object (), x , be . pick ( re , qr )); var il = x . Array , ol = x . Date , fl = x . Error , cl = x . Function , al = x . Math , ll = x . Object , sl = x . RegExp , hl = x . String , pl = x . TypeError , _l = il . prototype , vl = cl . prototype , gl = ll . prototype , yl = x [ " __core-js_shared__ " ], dl = vl . toString , bl = gl . hasOwnProperty , wl = 0 , ml = function (){ var n =/ [ ^. ] + $ /. exec ( yl && yl . keys && yl . keys . IE_PROTO || " " ); return n ? " Symbol(src)_1. " + n : " " }(), xl = gl . toString , jl = dl . call ( ll ), Al = re . _ , kl = sl ( " ^ " + dl . call ( bl ) . replace ( St , " \\ $ & " ) . replace ( / hasOwnProperty | ( function ) .* ? ( ? = \\\ () | for .+ ? ( ? = \\\ ]) / g , " $ 1.*? " ) + " $ " ), Ol = ie ? x . Buffer : X , Il = x . Symbol , Rl = x . Uint8Array , zl = Ol ? Ol . allocUnsafe : X , El = F ( ll . getPrototypeOf , ll ), Sl = ll . create , Wl = gl . propertyIsEnumerable , Ll = _l . splice , Cl = Il ? Il . isConcatSpreadable : X , Ul = Il ? Il . iterator : X , Bl = Il ? Il . toStringTag : X , Tl = function (){
try { var n = Ai ( ll , " defineProperty " ); return n ({}, " " ,{}), n } catch ( n ){}}(), $l = x . clearTimeout !== re . clearTimeout && x . clearTimeout , Dl = ol && ol . now !== re . Date . now && ol . now , Ml = x . setTimeout !== re . setTimeout && x . setTimeout , Fl = al . ceil , Nl = al . floor , Pl = ll . getOwnPropertySymbols , ql = Ol ? Ol . isBuffer : X , Zl = x . isFinite , Kl = _l . join , Vl = F ( ll . keys , ll ), Gl = al . max , Hl = al . min , Jl = ol . now , Yl = x . parseInt , Ql = al . random , Xl = _l . reverse , ns = Ai ( x , " DataView " ), ts = Ai ( x , " Map " ), rs = Ai ( x , " Promise " ), es = Ai ( x , " Set " ), us = Ai ( x , " WeakMap " ), is = Ai ( ll , " create " ), os = us && new us , fs = {}, cs = to ( ns ), as = to ( ts ), ls = to ( rs ), ss = to ( es ), hs = to ( us ), ps = Il ? Il . prototype : X , _s = ps ? ps . valueOf : X , vs = ps ? ps . toString : X , gs = function (){
function n (){} return function ( t ){ if ( ! fc ( t )) return {}; if ( Sl ) return Sl ( t ); n . prototype = t ; var r = new n ; return n . prototype = X , r }}(); Z . templateSettings = { escape : kt , evaluate : Ot , interpolate : It , variable : " " , imports : { _ : Z }}, Z . prototype = J . prototype , Z . prototype . constructor = Z , Y . prototype = gs ( J . prototype ), Y . prototype . constructor = Y , Ct . prototype = gs ( J . prototype ), Ct . prototype . constructor = Ct , Xt . prototype . clear = nr , Xt . prototype . delete = tr , Xt . prototype . get = rr , Xt . prototype . has = er , Xt . prototype . set = ur , ir . prototype . clear = or , ir . prototype . delete = fr ,
ir . prototype . get = cr , ir . prototype . has = ar , ir . prototype . set = lr , sr . prototype . clear = hr , sr . prototype . delete = pr , sr . prototype . get = _r , sr . prototype . has = vr , sr . prototype . set = gr , yr . prototype . add = yr . prototype . push = dr , yr . prototype . has = br , wr . prototype . clear = mr , wr . prototype . delete = xr , wr . prototype . get = jr , wr . prototype . has = Ar , wr . prototype . set = kr ; var ys = Pu ( ue ), ds = Pu ( oe , ! 0 ), bs = qu (), ws = qu ( ! 0 ), ms = os ? function ( n , t ){ return os . set ( n , t ), n } : La , xs = Tl ? function ( n , t ){ return Tl ( n , " toString " ,{ configurable :! 0 , enumerable :! 1 , value : Sa ( t ),
writable :! 0 })} : La , js = uu , As = $l || function ( n ){ return re . clearTimeout ( n )}, ks = es && 1 / P ( new es ([, - 0 ]))[ 1 ] == Sn ? function ( n ){ return new es ( n )} : Da , Os = os ? function ( n ){ return os . get ( n )} : Da , Is = Pl ? function ( n ){ return null == n ? [] : ( n = ll ( n ), i ( Pl ( n ), function ( t ){ return Wl . call ( n , t )}))} : Pa , Rs = Pl ? function ( n ){ for ( var t = []; n ;) a ( t , Is ( n )), n = El ( n ); return t } : Pa , zs = we ;( ns && zs ( new ns ( new ArrayBuffer ( 1 ))) != ct || ts && zs ( new ts ) != Gn || rs && zs ( rs . resolve ()) != Qn || es && zs ( new es ) != tt || us && zs ( new us ) != it ) && ( zs = function ( n ){ var t = we ( n ), r = t == Yn ? n . constructor : X , e = r ? to ( r ) : " " ;
if ( e ) switch ( e ){ case cs : return ct ; case as : return Gn ; case ls : return Qn ; case ss : return tt ; case hs : return it } return t }); var Es = yl ? uc : qa , Ss = Qi ( ms ), Ws = Ml || function ( n , t ){ return re . setTimeout ( n , t )}, Ls = Qi ( xs ), Cs = Pi ( function ( n ){ var t = []; return 46 === n . charCodeAt ( 0 ) && t . push ( " " ), n . replace ( Et , function ( n , r , e , u ){ t . push ( e ? u . replace ( Mt , " $ 1 " ) : r || n )}), t }), Us = uu ( function ( n , t ){ return Jf ( n ) ? Hr ( n , ee ( t , 1 , Jf , ! 0 )) : []}), Bs = uu ( function ( n , t ){ var r = jo ( t ); return Jf ( r ) && ( r = X ), Jf ( n ) ? Hr ( n , ee ( t , 1 , Jf , ! 0 ), mi ( r , 2 )) : []}), Ts = uu ( function ( n , t ){
var r = jo ( t ); return Jf ( r ) && ( r = X ), Jf ( n ) ? Hr ( n , ee ( t , 1 , Jf , ! 0 ), X , r ) : []}), $s = uu ( function ( n ){ var t = c ( n , ju ); return t . length && t [ 0 ] === n [ 0 ] ? ke ( t ) : []}), Ds = uu ( function ( n ){ var t = jo ( n ), r = c ( n , ju ); return t === jo ( r ) ? t = X : r . pop (), r . length && r [ 0 ] === n [ 0 ] ? ke ( r , mi ( t , 2 )) : []}), Ms = uu ( function ( n ){ var t = jo ( n ), r = c ( n , ju ); return t = " function " == typeof t ? t : X , t && r . pop (), r . length && r [ 0 ] === n [ 0 ] ? ke ( r , X , t ) : []}), Fs = uu ( Oo ), Ns = gi ( function ( n , t ){ var r = null == n ? 0 : n . length , e = Tr ( n , t ); return nu ( n , c ( t , function ( n ){ return Ci ( n , r ) ? + n : n }) . sort ( Lu )), e }), Ps = uu ( function ( n ){
return gu ( ee ( n , 1 , Jf , ! 0 ))}), qs = uu ( function ( n ){ var t = jo ( n ); return Jf ( t ) && ( t = X ), gu ( ee ( n , 1 , Jf , ! 0 ), mi ( t , 2 ))}), Zs = uu ( function ( n ){ var t = jo ( n ); return t = " function " == typeof t ? t : X , gu ( ee ( n , 1 , Jf , ! 0 ), X , t )}), Ks = uu ( function ( n , t ){ return Jf ( n ) ? Hr ( n , t ) : []}), Vs = uu ( function ( n ){ return mu ( i ( n , Jf ))}), Gs = uu ( function ( n ){ var t = jo ( n ); return Jf ( t ) && ( t = X ), mu ( i ( n , Jf ), mi ( t , 2 ))}), Hs = uu ( function ( n ){ var t = jo ( n ); return t = " function " == typeof t ? t : X , mu ( i ( n , Jf ), X , t )}), Js = uu ( Go ), Ys = uu ( function ( n ){ var t = n . length , r = t > 1 ? n [ t - 1 ] : X ; return r = " function " == typeof r ? ( n . pop (),
r ) : X , Ho ( n , r )}), Qs = gi ( function ( n ){ var t = n . length , r = t ? n [ 0 ] : 0 , e = this . __wrapped__ , u = function ( t ){ return Tr ( t , n )}; return ! ( t > 1 || this . __actions__ . length ) && e instanceof Ct && Ci ( r ) ? ( e = e . slice ( r , + r + ( t ? 1 : 0 )), e . __actions__ . push ({ func : nf , args : [ u ], thisArg : X }), new Y ( e , this . __chain__ ) . thru ( function ( n ){ return t &&! n . length && n . push ( X ), n })) : this . thru ( u )}), Xs = Fu ( function ( n , t , r ){ bl . call ( n , r ) ? ++ n [ r ] : Br ( n , r , 1 )}), nh = Ju ( ho ), th = Ju ( po ), rh = Fu ( function ( n , t , r ){ bl . call ( n , r ) ? n [ r ] . push ( t ) : Br ( n , r ,[ t ])}), eh = uu ( function ( t , r , e ){ var u =- 1 , i = " function " == typeof r , o = Hf ( t ) ? il ( t . length ) : [];
return ys ( t , function ( t ){ o [ ++ u ] = i ? n ( r , t , e ) : Ie ( t , r , e )}), o }), uh = Fu ( function ( n , t , r ){ Br ( n , r , t )}), ih = Fu ( function ( n , t , r ){ n [ r ? 0 : 1 ] . push ( t )}, function (){ return [[],[]]}), oh = uu ( function ( n , t ){ if ( null == n ) return []; var r = t . length ; return r > 1 && Ui ( n , t [ 0 ], t [ 1 ]) ? t = [] : r > 2 && Ui ( t [ 0 ], t [ 1 ], t [ 2 ]) && ( t = [ t [ 0 ]]), He ( n , ee ( t , 1 ),[])}), fh = Dl || function (){ return re . Date . now ()}, ch = uu ( function ( n , t , r ){ var e = _n ; if ( r . length ){ var u = N ( r , wi ( ch )); e |= bn } return ai ( n , e , t , r , u )}), ah = uu ( function ( n , t , r ){ var e = _n | vn ; if ( r . length ){ var u = N ( r , wi ( ah )); e |= bn ;
} return ai ( t , e , n , r , u )}), lh = uu ( function ( n , t ){ return Gr ( n , 1 , t )}), sh = uu ( function ( n , t , r ){ return Gr ( n , Ic ( t ) || 0 , r )}); Cf . Cache = sr ; var hh = js ( function ( t , r ){ r = 1 == r . length && bh ( r [ 0 ]) ? c ( r [ 0 ], z ( mi ())) : c ( ee ( r , 1 ), z ( mi ())); var e = r . length ; return uu ( function ( u ){ for ( var i =- 1 , o = Hl ( u . length , e ); ++ i < o ;) u [ i ] = r [ i ] . call ( this , u [ i ]); return n ( t , this , u )})}), ph = uu ( function ( n , t ){ return ai ( n , bn , X , t , N ( t , wi ( ph )))}), _h = uu ( function ( n , t ){ return ai ( n , wn , X , t , N ( t , wi ( _h )))}), vh = gi ( function ( n , t ){ return ai ( n , xn , X , X , X , t )}), gh = ii ( me ), yh = ii ( function ( n , t ){
return n >= t }), dh = Re ( function (){ return arguments }()) ? Re : function ( n ){ return cc ( n ) && bl . call ( n , " callee " ) &&! Wl . call ( n , " callee " )}, bh = il . isArray , wh = ce ? z ( ce ) : ze , mh = ql || qa , xh = ae ? z ( ae ) : Ee , jh = le ? z ( le ) : Le , Ah = se ? z ( se ) : Be , kh = he ? z ( he ) : Te , Oh = pe ? z ( pe ) : $e , Ih = ii ( Ne ), Rh = ii ( function ( n , t ){ return n <= t }), zh = Nu ( function ( n , t ){ if ( Mi ( t ) || Hf ( t )) return $u ( t , Pc ( t ), n ), X ; for ( var r in t ) bl . call ( t , r ) && Sr ( n , r , t [ r ])}), Eh = Nu ( function ( n , t ){ $u ( t , qc ( t ), n )}), Sh = Nu ( function ( n , t , r , e ){ $u ( t , qc ( t ), n , e )}), Wh = Nu ( function ( n , t , r , e ){ $u ( t , Pc ( t ), n , e );
}), Lh = gi ( Tr ), Ch = uu ( function ( n , t ){ n = ll ( n ); var r =- 1 , e = t . length , u = e > 2 ? t [ 2 ] : X ; for ( u && Ui ( t [ 0 ], t [ 1 ], u ) && ( e = 1 ); ++ r < e ;) for ( var i = t [ r ], o = qc ( i ), f =- 1 , c = o . length ; ++ f < c ;){ var a = o [ f ], l = n [ a ];( l === X || Gf ( l , gl [ a ]) &&! bl . call ( n , a )) && ( n [ a ] = i [ a ])} return n }), Uh = uu ( function ( t ){ return t . push ( X , si ), n ( Mh , X , t )}), Bh = Xu ( function ( n , t , r ){ null != t && " function " != typeof t . toString && ( t = xl . call ( t )), n [ t ] = r }, Sa ( La )), Th = Xu ( function ( n , t , r ){ null != t && " function " != typeof t . toString && ( t = xl . call ( t )), bl . call ( n , t ) ? n [ t ] . push ( r ) : n [ t ] = [ r ]}, mi ), $h = uu ( Ie ), Dh = Nu ( function ( n , t , r ){
Ke ( n , t , r )}), Mh = Nu ( function ( n , t , r , e ){ Ke ( n , t , r , e )}), Fh = gi ( function ( n , t ){ var r = {}; if ( null == n ) return r ; var e =! 1 ; t = c ( t , function ( t ){ return t = ku ( t , n ), e || ( e = t . length > 1 ), t }), $u ( n , di ( n ), r ), e && ( r = Fr ( r , an | ln | sn , hi )); for ( var u = t . length ; u -- ;) yu ( r , t [ u ]); return r }), Nh = gi ( function ( n , t ){ return null == n ? {} : Je ( n , t )}), Ph = ci ( Pc ), qh = ci ( qc ), Zh = Vu ( function ( n , t , r ){ return t = t . toLowerCase (), n + ( r ? fa ( t ) : t )}), Kh = Vu ( function ( n , t , r ){ return n + ( r ? " - " : " " ) + t . toLowerCase ()}), Vh = Vu ( function ( n , t , r ){ return n + ( r ? " " : " " ) + t . toLowerCase ()}), Gh = Ku ( " toLowerCase " ), Hh = Vu ( function ( n , t , r ){
return n + ( r ? " _ " : " " ) + t . toLowerCase ()}), Jh = Vu ( function ( n , t , r ){ return n + ( r ? " " : " " ) + Qh ( t )}), Yh = Vu ( function ( n , t , r ){ return n + ( r ? " " : " " ) + t . toUpperCase ()}), Qh = Ku ( " toUpperCase " ), Xh = uu ( function ( t , r ){ try { return n ( t , X , r )} catch ( n ){ return rc ( n ) ? n : new fl ( n )}}), np = gi ( function ( n , t ){ return r ( t , function ( t ){ t = no ( t ), Br ( n , t , ch ( n [ t ], n ))}), n }), tp = Yu (), rp = Yu ( ! 0 ), ep = uu ( function ( n , t ){ return function ( r ){ return Ie ( r , n , t )}}), up = uu ( function ( n , t ){ return function ( r ){ return Ie ( n , r , t )}}), ip = ti ( c ), op = ti ( u ), fp = ti ( h ), cp = ui (), ap = ui ( ! 0 ), lp = ni ( function ( n , t ){
return n + t }, 0 ), sp = fi ( " ceil " ), hp = ni ( function ( n , t ){ return n / t }, 1 ), pp = fi ( " floor " ), _p = ni ( function ( n , t ){ return n * t }, 1 ), vp = fi ( " round " ), gp = ni ( function ( n , t ){ return n - t }, 0 ); return Z . after = If , Z . ary = Rf , Z . assign = zh , Z . assignIn = Eh , Z . assignInWith = Sh , Z . assignWith = Wh , Z . at = Lh , Z . before = zf , Z . bind = ch , Z . bindAll = np , Z . bindKey = ah , Z . castArray = Nf , Z . chain = Qo , Z . chunk = uo , Z . compact = io , Z . concat = oo , Z . cond = za , Z . conforms = Ea , Z . constant = Sa , Z . countBy = Xs , Z . create = Sc , Z . curry = Ef , Z . curryRight = Sf , Z . debounce = Wf , Z . defaults = Ch , Z . defaultsDeep = Uh ,
Z . defer = lh , Z . delay = sh , Z . difference = Us , Z . differenceBy = Bs , Z . differenceWith = Ts , Z . drop = fo , Z . dropRight = co , Z . dropRightWhile = ao , Z . dropWhile = lo , Z . fill = so , Z . filter = lf , Z . flatMap = sf , Z . flatMapDeep = hf , Z . flatMapDepth = pf , Z . flatten = _o , Z . flattenDeep = vo , Z . flattenDepth = go , Z . flip = Lf , Z . flow = tp , Z . flowRight = rp , Z . fromPairs = yo , Z . functions = $c , Z . functionsIn = Dc , Z . groupBy = rh , Z . initial = mo , Z . intersection = $s , Z . intersectionBy = Ds , Z . intersectionWith = Ms , Z . invert = Bh , Z . invertBy = Th , Z . invokeMap = eh , Z . iteratee = Ca , Z . keyBy = uh , Z . keys = Pc , Z . keysIn = qc ,
Z . map = yf , Z . mapKeys = Zc , Z . mapValues = Kc , Z . matches = Ua , Z . matchesProperty = Ba , Z . memoize = Cf , Z . merge = Dh , Z . mergeWith = Mh , Z . method = ep , Z . methodOf = up , Z . mixin = Ta , Z . negate = Uf , Z . nthArg = Ma , Z . omit = Fh , Z . omitBy = Vc , Z . once = Bf , Z . orderBy = df , Z . over = ip , Z . overArgs = hh , Z . overEvery = op , Z . overSome = fp , Z . partial = ph , Z . partialRight = _h , Z . partition = ih , Z . pick = Nh , Z . pickBy = Gc , Z . property = Fa , Z . propertyOf = Na , Z . pull = Fs , Z . pullAll = Oo , Z . pullAllBy = Io , Z . pullAllWith = Ro , Z . pullAt = Ns , Z . range = cp , Z . rangeRight = ap , Z . rearg = vh , Z . reject = mf , Z . remove = zo , Z . rest = Tf ,
Z . reverse = Eo , Z . sampleSize = jf , Z . set = Jc , Z . setWith = Yc , Z . shuffle = Af , Z . slice = So , Z . sortBy = oh , Z . sortedUniq = $o , Z . sortedUniqBy = Do , Z . split = da , Z . spread = $f , Z . tail = Mo , Z . take = Fo , Z . takeRight = No , Z . takeRightWhile = Po , Z . takeWhile = qo , Z . tap = Xo , Z . throttle = Df , Z . thru = nf , Z . toArray = jc , Z . toPairs = Ph , Z . toPairsIn = qh , Z . toPath = Ha , Z . toPlainObject = Rc , Z . transform = Qc , Z . unary = Mf , Z . union = Ps , Z . unionBy = qs , Z . unionWith = Zs , Z . uniq = Zo , Z . uniqBy = Ko , Z . uniqWith = Vo , Z . unset = Xc , Z . unzip = Go , Z . unzipWith = Ho , Z . update = na , Z . updateWith = ta , Z . values = ra , Z . valuesIn = ea ,
Z . without = Ks , Z . words = Ra , Z . wrap = Ff , Z . xor = Vs , Z . xorBy = Gs , Z . xorWith = Hs , Z . zip = Js , Z . zipObject = Jo , Z . zipObjectDeep = Yo , Z . zipWith = Ys , Z . entries = Ph , Z . entriesIn = qh , Z . extend = Eh , Z . extendWith = Sh , Ta ( Z , Z ), Z . add = lp , Z . attempt = Xh , Z . camelCase = Zh , Z . capitalize = fa , Z . ceil = sp , Z . clamp = ua , Z . clone = Pf , Z . cloneDeep = Zf , Z . cloneDeepWith = Kf , Z . cloneWith = qf , Z . conformsTo = Vf , Z . deburr = ca , Z . defaultTo = Wa , Z . divide = hp , Z . endsWith = aa , Z . eq = Gf , Z . escape = la , Z . escapeRegExp = sa , Z . every = af , Z . find = nh , Z . findIndex = ho , Z . findKey = Wc , Z . findLast = th , Z . findLastIndex = po ,
Z . findLastKey = Lc , Z . floor = pp , Z . forEach = _f , Z . forEachRight = vf , Z . forIn = Cc , Z . forInRight = Uc , Z . forOwn = Bc , Z . forOwnRight = Tc , Z . get = Mc , Z . gt = gh , Z . gte = yh , Z . has = Fc , Z . hasIn = Nc , Z . head = bo , Z . identity = La , Z . includes = gf , Z . indexOf = wo , Z . inRange = ia , Z . invoke = $h , Z . isArguments = dh , Z . isArray = bh , Z . isArrayBuffer = wh , Z . isArrayLike = Hf , Z . isArrayLikeObject = Jf , Z . isBoolean = Yf , Z . isBuffer = mh , Z . isDate = xh , Z . isElement = Qf , Z . isEmpty = Xf , Z . isEqual = nc , Z . isEqualWith = tc , Z . isError = rc , Z . isFinite = ec , Z . isFunction = uc , Z . isInteger = ic , Z . isLength = oc , Z . isMap = jh ,
Z . isMatch = ac , Z . isMatchWith = lc , Z . isNaN = sc , Z . isNative = hc , Z . isNil = _c , Z . isNull = pc , Z . isNumber = vc , Z . isObject = fc , Z . isObjectLike = cc , Z . isPlainObject = gc , Z . isRegExp = Ah , Z . isSafeInteger = yc , Z . isSet = kh , Z . isString = dc , Z . isSymbol = bc , Z . isTypedArray = Oh , Z . isUndefined = wc , Z . isWeakMap = mc , Z . isWeakSet = xc , Z . join = xo , Z . kebabCase = Kh , Z . last = jo , Z . lastIndexOf = Ao , Z . lowerCase = Vh , Z . lowerFirst = Gh , Z . lt = Ih , Z . lte = Rh , Z . max = Ya , Z . maxBy = Qa , Z . mean = Xa , Z . meanBy = nl , Z . min = tl , Z . minBy = rl , Z . stubArray = Pa , Z . stubFalse = qa , Z . stubObject = Za , Z . stubString = Ka ,
Z . stubTrue = Va , Z . multiply = _p , Z . nth = ko , Z . noConflict = $a , Z . noop = Da , Z . now = fh , Z . pad = ha , Z . padEnd = pa , Z . padStart = _a , Z . parseInt = va , Z . random = oa , Z . reduce = bf , Z . reduceRight = wf , Z . repeat = ga , Z . replace = ya , Z . result = Hc , Z . round = vp , Z . runInContext = p , Z . sample = xf , Z . size = kf , Z . snakeCase = Hh , Z . some = Of , Z . sortedIndex = Wo , Z . sortedIndexBy = Lo , Z . sortedIndexOf = Co , Z . sortedLastIndex = Uo , Z . sortedLastIndexBy = Bo , Z . sortedLastIndexOf = To , Z . startCase = Jh , Z . startsWith = ba , Z . subtract = gp , Z . sum = el , Z . sumBy = ul , Z . template = wa , Z . times = Ga , Z . toFinite = Ac , Z . toInteger = kc ,
Z . toLength = Oc , Z . toLower = ma , Z . toNumber = Ic , Z . toSafeInteger = zc , Z . toString = Ec , Z . toUpper = xa , Z . trim = ja , Z . trimEnd = Aa , Z . trimStart = ka , Z . truncate = Oa , Z . unescape = Ia , Z . uniqueId = Ja , Z . upperCase = Yh , Z . upperFirst = Qh , Z . each = _f , Z . eachRight = vf , Z . first = bo , Ta ( Z , function (){ var n = {}; return ue ( Z , function ( t , r ){ bl . call ( Z . prototype , r ) || ( n [ r ] = t )}), n }(),{ chain :! 1 }), Z . VERSION = nn , r ([ " bind " , " bindKey " , " curry " , " curryRight " , " partial " , " partialRight " ], function ( n ){ Z [ n ] . placeholder = Z }), r ([ " drop " , " take " ], function ( n , t ){ Ct . prototype [ n ] = function ( r ){
r = r === X ? 1 : Gl ( kc ( r ), 0 ); var e = this . __filtered__ &&! t ? new Ct ( this ) : this . clone (); return e . __filtered__ ? e . __takeCount__ = Hl ( r , e . __takeCount__ ) : e . __views__ . push ({ size : Hl ( r , Un ), type : n + ( e . __dir__ < 0 ? " Right " : " " )}), e }, Ct . prototype [ n + " Right " ] = function ( t ){ return this . reverse ()[ n ]( t ) . reverse ()}}), r ([ " filter " , " map " , " takeWhile " ], function ( n , t ){ var r = t + 1 , e = r == Rn || r == En ; Ct . prototype [ n ] = function ( n ){ var t = this . clone (); return t . __iteratees__ . push ({ iteratee : mi ( n , 3 ), type : r }), t . __filtered__ = t . __filtered__ || e , t }}), r ([ " head " , " last " ], function ( n , t ){
var r = " take " + ( t ? " Right " : " " ); Ct . prototype [ n ] = function (){ return this [ r ]( 1 ) . value ()[ 0 ]}}), r ([ " initial " , " tail " ], function ( n , t ){ var r = " drop " + ( t ? " " : " Right " ); Ct . prototype [ n ] = function (){ return this . __filtered__ ? new Ct ( this ) : this [ r ]( 1 )}}), Ct . prototype . compact = function (){ return this . filter ( La )}, Ct . prototype . find = function ( n ){ return this . filter ( n ) . head ()}, Ct . prototype . findLast = function ( n ){ return this . reverse () . find ( n )}, Ct . prototype . invokeMap = uu ( function ( n , t ){ return " function " == typeof n ? new Ct ( this ) : this . map ( function ( r ){
return Ie ( r , n , t )})}), Ct . prototype . reject = function ( n ){ return this . filter ( Uf ( mi ( n )))}, Ct . prototype . slice = function ( n , t ){ n = kc ( n ); var r = this ; return r . __filtered__ && ( n > 0 || t < 0 ) ? new Ct ( r ) : ( n < 0 ? r = r . takeRight ( - n ) : n && ( r = r . drop ( n )), t !== X && ( t = kc ( t ), r = t < 0 ? r . dropRight ( - t ) : r . take ( t - n )), r )}, Ct . prototype . takeRightWhile = function ( n ){ return this . reverse () . takeWhile ( n ) . reverse ()}, Ct . prototype . toArray = function (){ return this . take ( Un )}, ue ( Ct . prototype , function ( n , t ){ var r =/^ ( ? : filter | find | map | reject ) | While $ /. test ( t ), e =/^ ( ? : head | last ) $ /. test ( t ), u = Z [ e ? " take " + ( " last " == t ? " Right " : " " ) : t ], i = e ||/^ find /. test ( t );
u && ( Z . prototype [ t ] = function (){ var t = this . __wrapped__ , o = e ? [ 1 ] : arguments , f = t instanceof Ct , c = o [ 0 ], l = f || bh ( t ), s = function ( n ){ var t = u . apply ( Z , a ([ n ], o )); return e && h ? t [ 0 ] : t }; l && r && " function " == typeof c && 1 != c . length && ( f = l =! 1 ); var h = this . __chain__ , p =!! this . __actions__ . length , _ = i &&! h , v = f &&! p ; if ( ! i && l ){ t = v ? t : new Ct ( this ); var g = n . apply ( t , o ); return g . __actions__ . push ({ func : nf , args : [ s ], thisArg : X }), new Y ( g , h )} return _ && v ? n . apply ( this , o ) : ( g = this . thru ( s ), _ ? e ? g . value ()[ 0 ] : g . value () : g )})}), r ([ " pop " , " push " , " shift " , " sort " , " splice " , " unshift " ], function ( n ){
var t = _l [ n ], r =/^ ( ? : push | sort | unshift ) $ /. test ( n ) ? " tap " : " thru " , e =/^ ( ? : pop | shift ) $ /. test ( n ); Z . prototype [ n ] = function (){ var n = arguments ; if ( e &&! this . __chain__ ){ var u = this . value (); return t . apply ( bh ( u ) ? u : [], n )} return this [ r ]( function ( r ){ return t . apply ( bh ( r ) ? r : [], n )})}}), ue ( Ct . prototype , function ( n , t ){ var r = Z [ t ]; if ( r ){ var e = r . name + " " ; bl . call ( fs , e ) || ( fs [ e ] = []), fs [ e ] . push ({ name : t , func : r })}}), fs [ Qu ( X , vn ) . name ] = [{ name : " wrapper " , func : X }], Ct . prototype . clone = $t , Ct . prototype . reverse = Yt , Ct . prototype . value = Qt , Z . prototype . at = Qs ,
Z . prototype . chain = tf , Z . prototype . commit = rf , Z . prototype . next = ef , Z . prototype . plant = of , Z . prototype . reverse = ff , Z . prototype . toJSON = Z . prototype . valueOf = Z . prototype . value = cf , Z . prototype . first = Z . prototype . head , Ul && ( Z . prototype [ Ul ] = uf ), Z }, be = de (); " function " == typeof define && " object " == typeof define . amd && define . amd ? ( re . _ = be , define ( function (){ return be })) : ue ? (( ue . exports = be ) . _ = be , ee . _ = be ) : re . _ = be }) . call ( this );
! function (){ " use strict " ; var f = {} . hasOwnProperty ; function s (){ for ( var e = [], t = 0 ; t < arguments . length ; t ++ ){ var n = arguments [ t ]; if ( n ){ var r , o = typeof n ; if ( " string " == o || " number " == o ) e . push ( n ); else if ( Array . isArray ( n )) ! n . length || ( r = s . apply ( null , n )) && e . push ( r ); else if ( " object " == o ) if ( n . toString === Object . prototype . toString ) for ( var i in n ) f . call ( n , i ) && n [ i ] && e . push ( i ); else e . push ( n . toString ())}} return e . join ( " " )} " undefined " != typeof module && module . exports ? ( s . default = s , module . exports = s ) : " function " == typeof define && " object " == typeof define . amd && define . amd ? define ( " classnames " ,[], function (){ return s }) : window . classNames = s }();
( function (){ function l ( b ){ var a = $ ( '<div class="dropdown bootstrapMenu" style="z-index:10000;position:absolute;" />' ), c = $ ( '<ul class="dropdown-menu" style="position:static;display:block;font-size:0.9em;" />' ), e = [[]]; _ . each ( b . options . actionsGroups , function ( b , a ){ e [ a + 1 ] = []}); var d =! 1 ; _ . each ( b . options . actions , function ( a , c ){ var h =! 1 ; _ . each ( b . options . actionsGroups , function ( b , a ){ _ . includes ( b , c ) && ( e [ a + 1 ] . push ( c ), h =! 0 )}); ! 1 === h && e [ 0 ] . push ( c ); " undefined " !== typeof a . iconClass && ( d =! 0 )}); var f =! 0 ; _ . each ( e , function ( a ){ 0 !=
a . length && ( ! 1 === f && c . append ( '<li class="dropdown-divider"></li>' ), f =! 1 , _ . each ( a , function ( a ){ var h = b . options . actions [ a ]; ! 0 === d ? c . append ( '<li role="presentation" data-action="' + a + '"><a href="#" role="menuitem" class="dropdown-item"><i class="fa fa-fw fa-lg ' + ( h . iconClass || " " ) + '"></i> <span class="actionName"></span></a></li>' ) : c . append ( '<li role="presentation" data-action="' + a + '"><a href="#" role="menuitem" class="dropdown-item"><span class="actionName"></span></a></li>' )}), c . append ( '<li role="presentation" class="noActionsMessage disabled"><a href="#" role="menuitem" class="dropdown-item"><span>' +
b . options . noActionsMessage + " </span></a></li> " ))}); return a . append ( c )} function m ( b ){ var a = null ; switch ( b . options . menuEvent ){ case " click " : a = " click " ; break ; case " right-click " : a = " contextmenu " ; break ; case " hover " : a = " mouseenter " ; break ; default : throw Error ( " Unknown BootstrapMenu 'menuEvent' option " );} b . $container . on ( a + b . namespace , b . selector , function ( a ){ var c = $ ( this ); b . open ( c , a ); return ! 1 })} function n ( b ){ b . $menu . on ( b . options . _actionSelectEvent + b . namespace , function ( a ){ a . preventDefault (); a . stopPropagation (); if (( a =
$ ( a . target ) . closest ( " [data-action] " )) && a . length &&! a . is ( " .disabled " )){ a = a . data ( " action " ); var c = b . options . fetchElementData ( b . $openTarget ); b . options . actions [ a ] . onClick ( c ); b . close ()}})} function p ( b ){ switch ( b . options . menuEvent ){ case " click " : break ; case " right-click " : break ; case " hover " : var a = b . $openTarget . add ( b . $menu ); a . on ( " mouseleave " + b . closeNamespace , function ( c ){ c = c . toElement || c . relatedTarget ; b . $openTarget . is ( c ) || b . $menu . is ( c ) || ( a . off ( b . closeNamespace ), b . close ())}); break ; default : throw Error ( " Unknown BootstrapMenu 'menuEvent' option " );
} b . $container . on ( " click " + b . closeNamespace , function (){ b . close ()})} var q = { container : " body " , fetchElementData : _ . noop , menuSource : " mouse " , menuPosition : " belowLeft " , menuEvent : " right-click " , actionsGroups : [], noActionsMessage : " No available actions " , _actionSelectEvent : " click " }, d = function ( b , a ){ this . selector = b ; this . options = _ . extend ({}, q , a ); this . namespace = _ . uniqueId ( " .BootstrapMenu_ " ); this . closeNamespace = _ . uniqueId ( " .BootstrapMenuClose_ " ); this . init ()}, g = []; d . prototype . init = function (){ this . $container = $ ( this . options . container );
this . $menu = l ( this ); this . $menuList = this . $menu . children (); this . $menu . hide () . appendTo ( this . $container ); this . openEvent = this . $openTarget = null ; m ( this ); n ( this ); g . push ( this )}; d . prototype . updatePosition = function (){ switch ( this . options . menuSource ){ case " element " : var b = this . $openTarget ; break ; case " mouse " : b = this . openEvent ; break ; default : throw Error ( " Unknown BootstrapMenu 'menuSource' option " );} switch ( this . options . menuPosition ){ case " belowRight " : var a = " right top " ; var c = " right bottom " ; break ; case " belowLeft " : a = " left top " ;
c = " left bottom " ; break ; case " aboveRight " : a = " right bottom " ; c = " right top " ; break ; case " aboveLeft " : a = " left bottom " ; c = " left top " ; break ; default : throw Error ( " Unknown BootstrapMenu 'menuPosition' option " );} this . $menu . css ({ display : " block " }); this . $menu . css ({ height : this . $menuList . height (), width : this . $menuList . width ()}); this . $menu . position ({ my : a , at : c , of : b })}; d . prototype . open = function ( b , a ){ var c = this ; d . closeAll (); this . $openTarget = b ; this . openEvent = a ; var e = c . options . fetchElementData ( c . $openTarget ), g = this . $menu . find ( " [data-action] " ),
f = this . $menu . find ( " .noActionsMessage " ); g . show (); f . hide (); var k = 0 ; g . each ( function (){ var b = $ ( this ), a = b . data ( " action " ); a = c . options . actions [ a ]; var d = a . classNames || null ; d && _ . isFunction ( d ) && ( d = d ( e )); b . attr ( " class " , classNames ( d || " " )); a . isShown &&! 1 === a . isShown ( e ) ? b . hide () : ( k ++ , b . find ( " .actionName " ) . html ( _ . isFunction ( a . name ) && a . name ( e ) || a . name ), a . isEnabled &&! 1 === a . isEnabled ( e ) && b . addClass ( " disabled " ))}); 0 === k && f . show (); this . updatePosition (); this . $menu . show (); p ( this )}; d . prototype . close = function (){ this . $menu . hide ();
this . $container . off ( this . closeNamespace )}; d . prototype . destroy = function (){ this . close (); this . $container . off ( this . namespace ); this . $menu . off ( this . namespace )}; d . closeAll = function (){ _ . each ( g , function ( b ){ b . close ()})}; window . BootstrapMenu = d })( jQuery );
( function ( global , factory ){ typeof exports === " object " && typeof module !== " undefined " ? module . exports = factory () : typeof define === " function " && define . amd ? define ( factory ) : ( global = global || self , global . Mustache = factory ())})( this , function (){ " use strict " ; var objectToString = Object . prototype . toString ; var isArray = Array . isArray || function isArrayPolyfill ( object ){ return objectToString . call ( object ) === " [object Array] " }; function isFunction ( object ){ return typeof object === " function " } function typeStr ( obj ){ return isArray ( obj ) ? " array " : typeof obj } function escapeRegExp ( string ){ return string . replace ( / [ \ - \ [ \ ]{}() *+ ? . , \\\ ^ $ | #\s]/g,"\\$&")}function hasProperty(obj,propName){return obj!=null&&typeof obj==="object"&&propName in obj}function primitiveHasOwnProperty(primitive,propName){return primitive!=null&&typeof primitive!=="object"&&primitive.hasOwnProperty&&primitive.hasOwnProperty(propName)}var regExpTest=RegExp.prototype.test;function testRegExp(re,string){return regExpTest.call(re,string)}var nonSpaceRe=/\S/;function isWhitespace(string){return!testRegExp(nonSpaceRe,string)}var entityMap={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function escapeHtml(string){return String(string).replace(/[&<>"'`=\/]/g,function fromEntityMap(s){return entityMap[s]})}var whiteRe=/\s*/;var spaceRe=/\s+/;var equalsRe=/\s*=/;var curlyRe=/\s*\}/;var tagRe=/#|\^|\/|>|\{|&|=|!/;function parseTemplate(template,tags){if(!template)return[];var lineHasNonSpace=false;var sections=[];var tokens=[];var spaces=[];var hasTag=false;var nonSpace=false;var indentation="";var tagIndex=0;function stripSpace(){if(hasTag&&!nonSpace){while(spaces.length)delete tokens[spaces.pop()]}else{spaces=[]}hasTag=false;nonSpace=false}var openingTagRe,closingTagRe,closingCurlyRe;function compileTags(tagsToCompile){if(typeof tagsToCompile==="string")tagsToCompile=tagsToCompile.split(spaceRe,2);if(!isArray(tagsToCompile)||tagsToCompile.length!==2)throw new Error("Invalid tags: "+tagsToCompile);openingTagRe=new RegExp(escapeRegExp(tagsToCompile[0])+"\\s*");closingTagRe=new RegExp("\\s*"+escapeRegExp(tagsToCompile[1]));closingCurlyRe=new RegExp("\\s*"+escapeRegExp("}"+tagsToCompile[1]))}compileTags(tags||mustache.tags);var scanner=new Scanner(template);var start,type,value,chr,token,openSection;while(!scanner.eos()){start=scanner.pos;value=scanner.scanUntil(openingTagRe);if(value){for(var i=0,valueLength=value.length;i<valueLength;++i){chr=value.charAt(i);if(isWhitespace(chr)){spaces.push(tokens.length);indentation+=chr}else{nonSpace=true;lineHasNonSpace=true;indentation+=" "}tokens.push(["text",chr,start,start+1]);start+=1;if(chr==="\n"){stripSpace();indentation="";tagIndex=0;lineHasNonSpace=false}}}if(!scanner.scan(openingTagRe))break;hasTag=true;type=scanner.scan(tagRe)||"name";scanner.scan(whiteRe);if(type==="="){value=scanner.scanUntil(equalsRe);scanner.scan(equalsRe);scanner.scanUntil(closingTagRe)}else if(type==="{"){value=scanner.scanUntil(closingCurlyRe);scanner.scan(curlyRe);scanner.scanUntil(closingTagRe);type="&"}else{value=scanner.scanUntil(closingTagRe)}if(!scanner.scan(closingTagRe))throw new Error("Unclosed tag at "+scanner.pos);if(type==">"){token=[type,value,start,scanner.pos,indentation,tagIndex,lineHasNonSpace]}else{token=[type,value,start,scanner.pos]}tagIndex++;tokens.push(token);if(type==="#"||type==="^"){sections.push(token)}else if(type==="/"){openSection=sections.pop();if(!openSection)throw new Error('Unopened section "'+value+'" at '+start);if(openSection[1]!==value)throw new Error('Unclosed section "'+openSection[1]+'" at '+start)}else if(type==="name"||type==="{"||type==="&"){nonSpace=true}else if(type==="="){compileTags(value)}}stripSpace();openSection=sections.pop();if(openSection)throw new Error('Unclosed section "'+openSection[1]+'" at '+scanner.pos);return nestTokens(squashTokens(tokens))}function squashTokens(tokens){var squashedTokens=[];var token,lastToken;for(var i=0,numTokens=tokens.length;i<numTokens;++i){token=tokens[i];if(token){if(token[0]==="text"&&lastToken&&lastToken[0]==="text"){lastToken[1]+=token[1];la
( function (){ var s , o , l , r , h , e , t , i = function (){ return this }(); i || " undefined " == typeof window || ( i = window ), " undefined " == typeof requirejs && (( s = function ( e , t , i ){ " string " == typeof e ? ( 2 == arguments . length && ( i = t ), s . modules [ e ] || ( s . payloads [ e ] = i , s . modules [ e ] = null )) : s . original ? s . original . apply ( this , arguments ) : ( console . error ( " dropping module because define wasn't a string. " ), console . trace ())}) . modules = {}, s . payloads = {}, o = function ( e , t , i ){ if ( " string " == typeof t ){ var n = h ( e , t ); if ( null != n ) return i && i (), n } else if ( " [object Array] " === Object . prototype . toString . call ( t )){ for ( var s = [], o = 0 , r = t . length ; o < r ; ++ o ){ var a = h ( e , t [ o ]); if ( null == a && l . original ) return ; s . push ( a )} return i && i . apply ( null , s ) ||! 0 }}, l = function ( e , t ){ var i = o ( " " , e , t ); return null == i && l . original ? l . original . apply ( this , arguments ) : i }, r = function ( e , t ){ if ( - 1 !== t . indexOf ( " ! " )){ var i = t . split ( " ! " ); return r ( e , i [ 0 ]) + " ! " + r ( e , i [ 1 ])} if ( " . " == t . charAt ( 0 )) for ( t = e . split ( " / " ) . slice ( 0 , - 1 ) . join ( " / " ) + " / " + t ; - 1 !== t . indexOf ( " . " ) && n != t ;){ var n = t ; t = t . replace ( / \ / \ . \ //,"/").replace(/[^\/]+\/\.\.\//,"")}return t},h=function(e,i){i=r(e,i);var t,n=s.modules[i];return n||("function"==typeof(n=s.payloads[i])&&(e={id:i,uri:"",exports:t={},packaged:!0},t=n(function(e,t){return o(i,e,t)},t,e)||e.exports,s.modules[i]=t,delete s.payloads[i]),n=s.modules[i]=t||n),n},t=i,(e="")&&(i[e]||(i[e]={}),t=i[e]),t.define&&t.define.packaged||(s.original=t.define,t.define=s,t.define.packaged=!0),t.require&&t.require.packaged||(l.original=t.require,t.require=l,t.require.packaged=!0))})(),define("ace/lib/fixoldbrowsers",["require","exports","module"],function(e,t,i){"use strict";"undefined"==typeof Element||Element.prototype.remove||Object.defineProperty(Element.prototype,"remove",{enumerable:!1,writable:!0,configurable:!0,value:function(){this.parentNode&&this.parentNode.removeChild(this)}})}),define("ace/lib/useragent",["require","exports","module"],function(e,t,i){"use strict";t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};var n="object"==typeof navigator?navigator:{},s=(/mac|win|linux/i.exec(n.platform)||["other"])[0].toLowerCase(),o=n.userAgent||"",n=n.appName||"";t.isWin="win"==s,t.isMac="mac"==s,t.isLinux="linux"==s,t.isIE="Microsoft Internet Explorer"==n||0<=n.indexOf("MSAppHost")?parseFloat((o.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((o.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=o.match(/ Gecko\/\d+/),t.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(o.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(o.split(" Chrome/")[1])||void 0,t.isEdge=parseFloat(o.split(" Edge/")[1])||void 0,t.isAIR=0<=o.indexOf("AdobeAIR"),t.isAndroid=0<=o.indexOf("Android"),t.isChromeOS=0<=o.indexOf(" CrOS "),t.isIOS=/iPad|iPhone|iPod/.test(o)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid}),define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(e,o,t){"use strict";function r(){var e=l;l=null,e&&e.forEach(function(e){i(e[0],e[1])})}function i(e,t,i){if("undefined"!=typeof document){if(l)if(i)r();else if(!1===i)return l.push([e,t]);if(!a){var n=i,s=(n=!(i&&i.getRootNode&&(n=i.getRootNode())&&n!=i)?document:n).ownerDocument||n;if(t&&o.hasCssString(t,n))return null;t&&(e+="\n/*# sourceURL=ace/css/"+t+" */");i=o.createElement("style");i.appendChild(s.createTextNode(e)),t&&(i.id=t),(n=n==s?o.getDocumentHead(s):n).insertBefore(i,n.firstChild)}}}var n=e("./useragent");o.buildDom=function e(t,i,n){if("string"==typeof t&&t){var s=document.createTextNode(t);return i&&i.appendChild(s),s}if(!Array.isArray(t))return t&&t.appendChild&&i&&i.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var o=[],r=0;r<t.length;r++){var a=e(t[r],i,n);a&&o.push(a)}return o}for(var l=document.createElement(t[0]),h=t[1],s=1,r=s=h&&"object"==typeof h&&!Array.isArray(h)?2:s;r<t.length;r++)e(t[r],l,n);return 2==s&&Object.keys(h).forEach(function(e){var t=h[e];"class"===e?l.className
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
/**
* IFM constructor
*
* @ param object params - object with some configuration values , currently you only can set the api url
*/
function IFM ( params ) {
// reference to ourself, because "this" does not work within callbacks
var self = this ;
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
params = params || {};
// set the backend for the application
self . api = params . api || window . location . href . replace ( / #.*/, "");
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
// desktop browser not support window.orientation
const ISMOBILE = typeof window . orientation !== 'undefined' ;
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
this . editor = null ; // global ace editor
this . fileChanged = false ; // flag for check if file was changed already
this . currentDir = " " ; // this is the global variable for the current directory; it is used for AJAX requests
this . rootElement = " " ; // global root element, currently not used
this . fileCache = []; // holds the current set of files
this . search = {}; // holds the last search query, as well as the search results
2021-08-28 16:55:52 +02:00
// This indicates if the modal was closed by a button or not, to prevent the user
// from accidentially close it while editing a file.
this . isModalClosedByButton = false ;
this . datatable = null ; // Reference for the data table
/**
* Shows a bootstrap modal
*
* @ param { string } content - HTML content of the modal
* @ param { object } options - options for the modal ({ large : false })
*/
2022-12-17 22:20:11 +01:00
this . showModal = function ( content , options , modal_options ) {
2021-08-28 16:55:52 +02:00
options = options || {};
2022-12-17 22:20:11 +01:00
let modal = document . createElement ( 'div' );
2021-08-28 16:55:52 +02:00
modal . classList . add ( 'modal' );
modal . id = 'ifmmodal' ;
modal . attributes . role = 'dialog' ;
2022-12-17 22:20:11 +01:00
let modalDialog = document . createElement ( 'div' );
2021-08-28 16:55:52 +02:00
modalDialog . classList . add ( 'modal-dialog' );
modalDialog . attributes . role = 'document' ;
if ( options . large == true ) modalDialog . classList . add ( 'modal-lg' );
2022-12-17 22:20:11 +01:00
let modalContent = document . createElement ( 'div' );
2021-08-28 16:55:52 +02:00
modalContent . classList . add ( 'modal-content' );
modalContent . innerHTML = content ;
modalDialog . appendChild ( modalContent );
modal . appendChild ( modalDialog );
document . body . appendChild ( modal );
// For this we have to use jquery, because bootstrap modals depend on them. Also the bs.modal
// events require jquery, as they cannot be handled by addEventListener()
$ ( modal )
. on ( 'hide.bs.modal' , function ( e ) {
if ( document . forms . formFile && self . fileChanged && ! self . isModalClosedByButton ) {
self . log ( " Prevented closing modal because the file was changed and no button was clicked. " );
e . preventDefault ();
} else
$ ( this ) . remove ();
})
. on ( 'shown.bs.modal' , function ( e ) {
2022-12-17 22:20:11 +01:00
let formElements = $ ( this ) . find ( 'input, button' );
2021-08-28 16:55:52 +02:00
if ( formElements . length > 0 ) {
formElements . first () . focus ();
}
})
2022-12-17 22:20:11 +01:00
. modal ( modal_options )
2021-08-28 16:55:52 +02:00
. modal ( 'show' );
};
/**
* Hides a the current bootstrap modal
*/
this . hideModal = function () {
// Hide the modal via jquery to get the hide.bs.modal event triggered
$ ( '#ifmmodal' ) . modal ( 'hide' );
self . isModalClosedByButton = false ;
};
/**
* Refreshes the file table
*/
this . refreshFileTable = function () {
2022-12-17 22:20:11 +01:00
let taskid = self . generateGuid ();
2021-08-28 16:55:52 +02:00
self . task_add ( { id : taskid , name : self . i18n . refresh } );
$ . ajax ({
url : self . api ,
type : " POST " ,
data : {
api : " getFiles " ,
dir : self . currentDir
},
dataType : " json " ,
success : self . rebuildFileTable ,
error : function () { self . showMessage ( self . i18n . general_error , " e " ); },
complete : function () { self . task_done ( taskid ); }
});
};
/**
* Rebuilds the file table with fetched items
*
* @ param object data - object with items
*/
this . rebuildFileTable = function ( data ) {
if ( data . status == " ERROR " ) {
2022-12-17 22:20:11 +01:00
self . showMessage ( data . message , " e " );
2021-08-28 16:55:52 +02:00
return ;
} else if ( ! Array . isArray ( data ) ) {
2022-12-17 22:20:11 +01:00
self . showMessage ( self . i18n . invalid_data , " e " );
2021-08-28 16:55:52 +02:00
return ;
}
data . forEach ( function ( item ) {
item . guid = self . generateGuid ();
item . linkname = ( item . name == " .. " ) ? " [ up ] " : item . name ;
if ( item . name == " .. " )
item . fixtop = 100 ;
item . download = {};
item . download . name = ( item . name == " .. " ) ? " . " : item . name ;
item . lastmodified_hr = self . formatDate ( item . lastmodified );
if ( ! self . config . chmod )
item . readonly = " readonly " ;
if ( self . config . edit || self . config . rename || self . config . delete || self . config . extract || self . config . copymove ) {
item . ftbuttons = true ;
item . button = [];
}
if ( item . type == " dir " ) {
if ( self . config . download && self . config . zipnload ) {
item . download . action = " zipnload " ;
item . download . icon = " icon icon-download-cloud " ;
}
item . rowclasses = " isDir " ;
} else {
if ( self . config . download ) {
item . download . action = " download " ;
item . download . icon = " icon icon-download " ;
}
2022-12-17 22:20:11 +01:00
if (( item . icon . indexOf ( 'file-image' ) !== - 1 ) && ( ISMOBILE == false )) {
2021-08-28 16:55:52 +02:00
item . popover = 'data-toggle="popover"' ;
}
if ( self . config . extract && self . inArray ( item . ext , [ " zip " , " tar " , " tgz " , " tar.gz " , " tar.xz " , " tar.bz2 " ] ) ) {
item . eaction = " extract " ;
item . button . push ({
action : " extract " ,
icon : " icon icon-archive " ,
title : " extract "
});
} else if (
self . config . edit &&
(
self . config . disable_mime_detection ||
(
typeof item . mime_type === " string " && (
item . mime_type . substr ( 0 , 4 ) == " text "
|| item . mime_type . indexOf ( " x-empty " ) != - 1
|| item . mime_type . indexOf ( " xml " ) != - 1
|| item . mime_type . indexOf ( " json " ) != - 1
)
)
)
) {
item . eaction = " edit " ;
item . button . push ({
action : " edit " ,
icon : " icon icon-pencil " ,
title : " edit "
});
}
}
item . download . link = self . api + " ?api= " + item . download . action + " &dir= " + self . hrefEncode ( self . currentDir ) + " &filename= " + self . hrefEncode ( item . download . name );
if ( self . config . isDocroot && ! self . config . forceproxy )
item . link = self . hrefEncode ( self . pathCombine ( window . location . path , self . currentDir , item . name ) );
else if ( self . config . download && self . config . zipnload ) {
if ( self . config . root_public_url ) {
if ( self . config . root_public_url . charAt ( 0 ) == " / " )
item . link = self . pathCombine ( window . location . origin , self . config . root_public_url , self . hrefEncode ( self . currentDir ), self . hrefEncode ( item . name ) );
else
item . link = self . pathCombine ( self . config . root_public_url , self . hrefEncode ( self . currentDir ), self . hrefEncode ( item . name ) );
} else
item . link = self . api + " ?api= " + ( item . download . action == " zipnload " ? " zipnload " : " proxy " ) + " &dir= " + self . hrefEncode ( self . currentDir ) + " &filename= " + self . hrefEncode ( item . download . name );
} else
item . link = '#' ;
if ( ! self . inArray ( item . name , [ " . " , " .. " ] ) ) {
item . dragdrop = 'draggable="true"' ;
if ( self . config . copymove )
item . button . push ({
action : " copymove " ,
icon : " icon icon-folder-open-empty " ,
title : " copy/move "
});
if ( self . config . rename )
item . button . push ({
action : " rename " ,
icon : " icon icon-terminal " ,
title : " rename "
});
if ( self . config . delete )
item . button . push ({
action : " delete " ,
icon : " icon icon-trash " ,
title : " delete "
});
}
});
// save items to file cache
self . fileCache = data ;
// build new tbody and replace the old one with the new
2022-12-17 22:20:11 +01:00
let newTBody = Mustache . render ( self . templates . filetable , { items : data , config : self . config , i18n : self . i18n , api : self . api } );
let filetable = document . getElementById ( 'filetable' );
2021-08-28 16:55:52 +02:00
filetable . tBodies [ 0 ] . remove ();
filetable . append ( document . createElement ( 'tbody' ) );
filetable . tBodies [ 0 ] . innerHTML = newTBody ;
if ( self . datatable ) self . datatable . destroy ();
self . datatable = $ ( '#filetable' ) . DataTable ({
2022-12-17 22:20:11 +01:00
paging : !! self . config . paging ,
pageLength : self . config . pageLength || 50 ,
2021-08-28 16:55:52 +02:00
info : false ,
autoWidth : false ,
columnDefs : [
{ " orderable " : false , " targets " : [ " th-download " , " th-permissions " , " th-buttons " ] }
],
orderFixed : [ 0 , 'desc' ],
language : {
" search " : self . i18n . filter
},
2022-12-17 22:20:11 +01:00
stateSave : true ,
responsive : true
2021-08-28 16:55:52 +02:00
});
// add event listeners
filetable . tBodies [ 0 ] . addEventListener ( 'keypress' , function ( e ) {
if ( e . target . name == 'newpermissions' && !! self . config . chmod && e . key == 'Enter' )
self . changePermissions ( e . target . dataset . filename , e . target . value );
});
filetable . tBodies [ 0 ] . addEventListener ( 'click' , function ( e ) {
if ( e . target . tagName == " TD " && e . target . parentElement . classList . contains ( 'clickable-row' ) && e . target . parentElement . dataset . filename !== " .. " && e . ctrlKey )
e . target . parentElement . classList . toggle ( 'selectedItem' );
else if ( e . target . classList . contains ( 'ifmitem' ) || e . target . parentElement . classList . contains ( 'ifmitem' ) ) {
ifmitem = ( e . target . classList . contains ( 'ifmitem' ) ? e . target : e . target . parentElement );
if ( ifmitem . dataset . type == " dir " ) {
e . stopPropagation ();
e . preventDefault ();
self . changeDirectory ( ifmitem . parentElement . parentElement . dataset . filename );
}
} else if ( e . target . parentElement . name == 'start_download' ) {
e . stopPropagation ();
e . preventDefault ();
document . forms [ " d_ " + e . target . parentElement . dataset . guid ] . submit ();
} else if ( e . target . parentElement . name && e . target . parentElement . name . substring ( 0 , 3 ) == " do- " ) {
e . stopPropagation ();
e . preventDefault ();
2022-12-17 22:20:11 +01:00
let item = self . fileCache . find ( function ( x ) { if ( x . guid === e . target . parentElement . dataset . id ) return x ; } );
2021-08-28 16:55:52 +02:00
switch ( e . target . parentElement . name . substr ( 3 ) ) {
case " rename " :
self . showRenameFileDialog ( item . name );
break ;
case " extract " :
self . showExtractFileDialog ( item . name );
break ;
case " edit " :
self . editFile ( item . name );
break ;
case " delete " :
self . showDeleteDialog ( item );
break ;
case " copymove " :
self . showCopyMoveDialog ( item );
break ;
}
}
});
2022-12-17 22:20:11 +01:00
// as we cannot specify the rows for datatable responsive plugin, and it intercepts all the clicks, we ignore all browser actions and change directory manually
$ ( '#filetable tbody tr.isDir td a.ifmitem' ) . on ( 'click' , function ( e ){
e . stopPropagation ();
e . preventDefault ();
self . changeDirectory ( e . target . parentElement . parentElement . dataset . filename );
});
2021-08-28 16:55:52 +02:00
// has to be jquery, since this is a bootstrap feature
$ ( 'a[data-toggle="popover"]' ) . popover ({
content : function () {
2022-12-17 22:20:11 +01:00
let item = self . fileCache . find ( x => x . guid == $ ( this ) . attr ( 'id' ) );
let popover = document . createElement ( 'img' );
2021-08-28 16:55:52 +02:00
if ( self . config . isDocroot )
2022-12-17 22:20:11 +01:00
popover . src = encodeURI ( self . pathCombine ( self . currentDir , item . name ) ) . replace ( / #/g, '%23' ).replace( /\?/g, '%3F' );
2021-08-28 16:55:52 +02:00
else
popover . src = self . api + " ?api=proxy&dir= " + encodeURIComponent ( self . currentDir ) + " &filename= " + encodeURIComponent ( item . name );
popover . classList . add ( 'imgpreview' );
return popover ;
},
animated : 'fade' ,
placement : 'bottom' ,
trigger : 'hover' ,
html : true
});
if ( self . config . contextmenu && !! ( self . config . edit || self . config . extract || self . config . rename || self . config . copymove || self . config . download || self . config . delete ) ) {
// create the context menu, this also uses jquery, AFAIK
2022-12-17 22:20:11 +01:00
let contextMenu = new BootstrapMenu ( '.clickable-row' , {
2021-08-28 16:55:52 +02:00
fetchElementData : function ( row ) {
2022-12-17 22:20:11 +01:00
let data = {};
2021-08-28 16:55:52 +02:00
data . selected =
Array . prototype . slice . call ( document . getElementsByClassName ( 'selectedItem' ) )
. map ( function ( e ){ return self . fileCache . find ( x => x . guid == e . children [ 0 ] . children [ 0 ] . id ); } );
data . clicked = self . fileCache . find ( x => x . guid == row [ 0 ] . children [ 0 ] . children [ 0 ] . id );
return data ;
},
actionsGroups : [
[ 'edit' , 'extract' , 'rename' , 'copylink' ],
[ 'copymove' , 'download' , 'createarchive' , 'delete' ]
],
actions : {
edit : {
name : self . i18n . edit ,
onClick : function ( data ) {
self . editFile ( data . clicked . name );
},
iconClass : " icon icon-pencil " ,
isShown : function ( data ) {
return !! ( self . config . edit && data . clicked . eaction == " edit " && ! data . selected . length );
}
},
extract : {
name : self . i18n . extract ,
onClick : function ( data ) {
self . showExtractFileDialog ( data . clicked . name );
},
iconClass : " icon icon-archive " ,
isShown : function ( data ) {
return !! ( self . config . extract && data . clicked . eaction == " extract " && ! data . selected . length );
}
},
rename : {
name : self . i18n . rename ,
onClick : function ( data ) {
self . showRenameFileDialog ( data . clicked . name );
},
iconClass : " icon icon-terminal " ,
isShown : function ( data ) { return !! ( self . config . rename && ! data . selected . length && data . clicked . name != " .. " ); }
},
copylink : {
name : self . i18n . copylink ,
onClick : function ( data ) {
if ( data . clicked . link . toLowerCase () . substr ( 0 , 4 ) == " http " )
self . copyToClipboard ( data . clicked . link );
else {
2022-12-17 22:20:11 +01:00
let pathname = window . location . pathname . replace ( /^ \ /*/ g , '' ) . split ( '/' );
2021-08-28 16:55:52 +02:00
pathname . pop ();
2022-12-17 22:20:11 +01:00
let link = self . pathCombine ( window . location . origin , data . clicked . link )
2021-08-28 16:55:52 +02:00
if ( pathname . length > 0 )
link = self . pathCombine ( window . location . origin , pathname . join ( '/' ), data . clicked . link )
self . copyToClipboard ( link );
}
},
},
2022-12-17 22:20:11 +01:00
extract : {
name : self . i18n . extract ,
2021-08-28 16:55:52 +02:00
onClick : function ( data ) {
2022-12-17 22:20:11 +01:00
self . showExtractFileDialog ( data . clicked . name );
},
iconClass : " icon icon-archive " ,
isShown : function ( data ) {
return !! ( self . config . extract && data . clicked . eaction == " extract " && ! data . selected . length );
}
},
rename : {
name : self . i18n . rename ,
onClick : function ( data ) {
self . showRenameFileDialog ( data . clicked . name );
},
iconClass : " icon icon-terminal " ,
isShown : function ( data ) { return !! ( self . config . rename && ! data . selected . length && data . clicked . name != " .. " ); }
},
copylink : {
name : self . i18n . copylink ,
onClick : function ( data ) {
if ( data . clicked . link . toLowerCase () . substr ( 0 , 4 ) == " http " )
self . copyToClipboard ( data . clicked . link );
else {
var pathname = window . location . pathname . replace ( /^ \ /*/ g , '' ) . split ( '/' );
pathname . pop ();
var link = self . pathCombine ( window . location . origin , data . clicked . link )
if ( pathname . length > 0 )
link = self . pathCombine ( window . location . origin , pathname . join ( '/' ), data . clicked . link )
self . copyToClipboard ( link );
}
},
iconClass : " icon icon-link-ext " ,
isShown : function ( data ) { return !! ( ! data . selected . length && data . clicked . name != " .. " ); }
},
copymove : {
name : function ( data ) {
if ( data . selected . length > 0 )
return self . i18n . copy + '/' + self . i18n . move + ' <span class="badge">' + data . selected . length + '</span>' ;
else
return self . i18n . copy + '/' + self . i18n . move ;
},
onClick : function ( data ) {
if ( data . selected . length > 0 )
2021-08-28 16:55:52 +02:00
self . showCopyMoveDialog ( data . selected );
else
self . showCopyMoveDialog ( data . clicked );
},
iconClass : " icon icon-folder-empty " ,
isShown : function ( data ) { return !! ( self . config . copymove && data . clicked . name != " .. " ); }
},
download : {
name : function ( data ) {
if ( data . selected . length > 0 )
return self . i18n . download + ' <span class="badge">' + data . selected . length + '</span>' ;
else
return self . i18n . download ;
},
onClick : function ( data ) {
if ( data . selected . length > 0 )
self . showMessage ( " At the moment it is not possible to download a set of files. " );
else
window . location = data . clicked . download . link ;
},
iconClass : " icon icon-download " ,
isShown : function () { return !! self . config . download ; }
},
createarchive : {
name : function ( data ) {
if ( data . selected . length > 0 )
return self . i18n . create_archive + ' <span class="badge">' + data . selected . length + '</span>' ;
else
return self . i18n . create_archive ;
},
onClick : function ( data ) {
if ( data . selected . length > 0 )
self . showCreateArchiveDialog ( data . selected );
else
self . showCreateArchiveDialog ( data . clicked );
},
iconClass : " icon icon-archive " ,
isShown : function ( data ) { return !! ( self . config . createarchive && data . clicked . name != " .. " ); }
},
'delete' : {
name : function ( data ) {
if ( data . selected . length > 0 )
return self . i18n . delete + ' <span class="badge">' + data . selected . length + '</span>' ;
else
return self . i18n . delete ;
},
onClick : function ( data ) {
if ( data . selected . length > 0 )
self . showDeleteDialog ( data . selected );
else
self . showDeleteDialog ( data . clicked );
},
iconClass : " icon icon-trash " ,
isShown : function ( data ) { return !! ( self . config . delete && data . clicked . name != " .. " ); }
}
}
});
}
};
/**
* Changes the current directory
*
* @ param string newdir - target directory
* @ param object options - options for changing the directory
*/
this . changeDirectory = function ( newdir , options ) {
options = options || {};
config = { absolute : false , pushState : true };
jQuery . extend ( config , options );
if ( ! config . absolute ) newdir = self . pathCombine ( self . currentDir , newdir );
$ . ajax ({
url : self . api ,
type : " POST " ,
data : ({
api : " getRealpath " ,
dir : newdir
}),
dataType : " json " ,
success : function ( data ) {
self . currentDir = data . realpath ;
self . refreshFileTable ();
$ ( " #currentDir " ) . val ( self . currentDir );
if ( config . pushState ) history . pushState ( { dir : self . currentDir }, self . currentDir , " # " + encodeURIComponent ( self . currentDir ) );
},
error : function () { self . showMessage ( self . i18n . general_error , " e " ); }
});
};
/**
* Shows a file , either a new file or an existing
*/
this . showFileDialog = function () {
2022-12-17 22:20:11 +01:00
let filename = arguments . length > 0 ? arguments [ 0 ] : " newfile.txt " ;
let content = arguments . length > 1 ? arguments [ 1 ] : " " ;
2021-08-28 16:55:52 +02:00
self . showModal ( Mustache . render ( self . templates . file , { filename : filename , i18n : self . i18n } ), { large : true } );
2022-12-17 22:20:11 +01:00
let form = document . getElementById ( 'formFile' );
2021-08-28 16:55:52 +02:00
form . addEventListener ( 'keypress' , function ( e ) {
if ( e . target . name == 'filename' && e . key == 'Enter' )
e . preventDefault ();
});
form . addEventListener ( 'click' , function ( e ) {
if ( e . target . id == " buttonSave " ) {
e . preventDefault ();
self . saveFile ( document . querySelector ( '#formFile input[name=filename]' ) . value , self . editor . getValue () );
self . isModalClosedByButton = true ;
self . hideModal ();
} else if ( e . target . id == " buttonSaveNotClose " ) {
e . preventDefault ();
self . saveFile ( document . querySelector ( '#formFile input[name=filename]' ) . value , self . editor . getValue () );
} else if ( e . target . id == " buttonClose " ) {
e . preventDefault ();
self . isModalClosedByButton = true ;
self . hideModal ();
}
});
$ ( '#editoroptions' ) . popover ({
html : true ,
title : self . i18n . options ,
content : function () {
// see https://github.com/twbs/bootstrap/issues/12571
// var ihatethisfuckingpopoverworkaround = $('#editoroptions').data('bs.popover');
// $(ihatethisfuckingpopoverworkaround.tip).find( '.popover-body' ).empty();
2022-12-17 22:20:11 +01:00
let aceSession = self . editor . getSession ();
let content = self . getNodeFromString (
2021-08-28 16:55:52 +02:00
Mustache . render (
self . templates . file_editoroptions ,
{
wordwrap : ( aceSession . getOption ( 'wrap' ) == 'off' ? false : true ),
softtabs : aceSession . getOption ( 'useSoftTabs' ),
tabsize : aceSession . getOption ( 'tabSize' ),
ace_includes : self . ace ,
ace_mode_selected : function () {
return ( aceSession . $modeId == " ace/mode/ " + this ) ? 'selected="selected"' : '' ;
},
i18n : self . i18n
}
)
);
if ( el = content . querySelector ( " #editor-wordwrap " )) {
el . addEventListener ( 'change' , function ( e ) {
aceSession . setOption ( 'wrap' , e . srcElement . checked );
});
}
if ( el = content . querySelector ( " #editor-softtabs " ))
el . addEventListener ( 'change' , function ( e ) {
aceSession . setOption ( 'useSoftTabs' , e . srcElement . checked );
});
if ( el = content . querySelector ( " #editor-tabsize " )) {
el . addEventListener ( 'keydown' , function ( e ) {
if ( e . key == 'Enter' ) {
e . preventDefault ();
aceSession . setOption ( 'tabSize' , e . srcElement . value );
}
});
}
if ( el = content . querySelector ( " #editor-syntax " ))
el . addEventListener ( 'change' , function ( e ) {
aceSession . getSession () . setMode ( e . target . value );
});
return content ;
}
});
// Start ACE
self . editor = ace . edit ( " content " );
self . editor . $blockScrolling = 'Infinity' ;
self . editor . getSession () . setValue ( content );
self . editor . focus ();
self . editor . on ( " change " , function () { self . fileChanged = true ; });
if ( self . ace && self . inArray ( " ext-modelist " , self . ace . files ) ) {
2022-12-17 22:20:11 +01:00
let mode = ace . require ( " ace/ext/modelist " ) . getModeForPath ( filename ) . mode ;
2021-08-28 16:55:52 +02:00
if ( self . inArray ( mode , self . ace . modes . map ( x => " ace/mode/ " + x ) ) )
self . editor . getSession () . setMode ( mode );
}
self . editor . commands . addCommand ({
name : " toggleFullscreen " ,
bindKey : " Ctrl-Shift-F " ,
exec : function ( e ) {
2022-12-17 22:20:11 +01:00
let el = e . container ;
2021-08-28 16:55:52 +02:00
if ( el . parentElement . tagName == " BODY " ) {
el . remove ();
2022-12-17 22:20:11 +01:00
let fieldset = document . getElementsByClassName ( 'modal-body' )[ 0 ] . firstElementChild ;
2021-08-28 16:55:52 +02:00
fieldset . insertBefore ( el , fieldset . getElementsByTagName ( 'button' )[ 0 ] . previousElementSibling );
el . style = Object . assign ({}, ifm . tmpEditorStyles );
ifm . tmpEditorStyles = undefined ;
} else {
ifm . tmpEditorStyles = Object . assign ({}, el . style );
el . remove ();
document . body . appendChild ( el );
el . style . position = " absolute " ;
el . style . top = 0 ;
el . style . left = 0 ;
el . style . zIndex = 10000 ;
el . style . width = " 100% " ;
el . style . height = " 100% " ;
}
e . resize ();
e . focus ();
}
});
};
/**
* Saves a file
*/
this . saveFile = function ( filename , content ) {
$ . ajax ({
url : self . api ,
type : " POST " ,
data : ({
api : " saveFile " ,
dir : self . currentDir ,
filename : filename ,
content : content
}),
dataType : " json " ,
success : function ( data ) {
if ( data . status == " OK " ) {
self . showMessage ( self . i18n . file_save_success , " s " );
self . refreshFileTable ();
2022-12-17 22:20:11 +01:00
} else self . showMessage ( data . message , " e " );
2021-08-28 16:55:52 +02:00
},
error : function () { self . showMessage ( self . i18n . general_error , " e " ); }
});
self . fileChanged = false ;
};
/**
* Edit a file
*
* @ params string name - name of the file
*/
this . editFile = function ( filename ) {
$ . ajax ({
url : self . api ,
type : " POST " ,
dataType : " json " ,
data : ({
api : " getContent " ,
dir : self . currentDir ,
filename : filename
}),
success : function ( data ) {
if ( data . status == " OK " && data . data . content != null ) {
self . showFileDialog ( data . data . filename , data . data . content );
}
else if ( data . status == " OK " && data . data . content == null ) {
self . showMessage ( self . i18n . file_load_error , " e " );
}
2022-12-17 22:20:11 +01:00
else self . showMessage ( data . message , " e " );
2021-08-28 16:55:52 +02:00
},
error : function () { self . showMessage ( self . i18n . file_display_error , " e " ); }
});
};
/**
* Shows the create directory dialog
*/
this . showCreateDirDialog = function () {
self . showModal ( Mustache . render ( self . templates . createdir , { i18n : self . i18n } ) );
2022-12-17 22:20:11 +01:00
let form = document . forms . formCreateDir ;
2021-08-28 16:55:52 +02:00
form . elements . dirname . addEventListener ( 'keypress' , function ( e ) {
if ( e . key == 'Enter' ) {
e . preventDefault ();
self . createDir ( e . target . value );
self . hideModal ();
}
});
form . addEventListener ( 'click' , function ( e ) {
if ( e . target . id == 'buttonSave' ) {
e . preventDefault ();
self . createDir ( form . elements . dirname . value );
self . hideModal ();
} else if ( e . target . id == 'buttonCancel' ) {
e . preventDefault ();
self . hideModal ();
}
}, false );
};
/**
* Create a directory
*/
this . createDir = function ( dirname ) {
$ . ajax ({
url : self . api ,
type : " POST " ,
data : ({
api : " createDir " ,
dir : self . currentDir ,
dirname : dirname
}),
dataType : " json " ,
success : function ( data ){
if ( data . status == " OK " ) {
self . showMessage ( self . i18n . folder_create_success , " s " );
self . refreshFileTable ();
}
else {
2022-12-17 22:20:11 +01:00
self . showMessage ( data . message , " e " );
2021-08-28 16:55:52 +02:00
}
},
error : function () { self . showMessage ( self . i18n . general_error , " e " ); }
});
};
/**
* Shows the delete dialog
*/
this . showDeleteDialog = function ( items ) {
self . showModal ( Mustache . render ( self . templates . deletefile , {
multiple : ( items . length > 1 ),
count : items . length ,
filename : ( Array . isArray ( items ) ? items [ 0 ] . name : items . name ),
i18n : self . i18n
}));
2022-12-17 22:20:11 +01:00
let form = document . forms . formDeleteFiles ;
2021-08-28 16:55:52 +02:00
form . addEventListener ( 'click' , function ( e ) {
if ( e . target . id == 'buttonYes' ) {
e . preventDefault ();
self . deleteFiles ( items );
self . hideModal ();
} else if ( e . target . id == 'buttonNo' ) {
e . preventDefault ();
self . hideModal ();
}
});
};
/**
* Deletes files
*
* @ params { array } items - array with objects from the fileCache
*/
this . deleteFiles = function ( items ) {
if ( ! Array . isArray ( items ) )
items = [ items ];
$ . ajax ({
url : self . api ,
type : " POST " ,
data : ({
api : " delete " ,
dir : self . currentDir ,
filenames : items . map ( function ( e ){ return e . name ; } )
}),
dataType : " json " ,
success : function ( data ) {
if ( data . status == " OK " ) {
self . showMessage ( self . i18n . file_delete_success , " s " );
self . refreshFileTable ();
} else self . showMessage ( self . i18n . file_delete_error , " e " );
},
error : function () { self . showMessage ( self . i18n . general_error , " e " ); }
});
};
/**
* Show the rename file dialog
*
* @ params string name - name of the file
*/
this . showRenameFileDialog = function ( filename ) {
self . showModal ( Mustache . render ( self . templates . renamefile , { filename : filename , i18n : self . i18n } ) );
2022-12-17 22:20:11 +01:00
let form = document . forms . formRenameFile ;
2021-08-28 16:55:52 +02:00
form . elements . newname . addEventListener ( 'keypress' , function ( e ) {
if ( e . key == 'Enter' ) {
e . preventDefault ();
self . renameFile ( filename , e . target . value );
self . hideModal ();
}
});
form . addEventListener ( 'click' , function ( e ) {
if ( e . target . id == 'buttonRename' ) {
e . preventDefault ();
self . renameFile ( filename , form . elements . newname . value );
self . hideModal ();
} else if ( e . target . id == 'buttonCancel' ) {
e . preventDefault ();
self . hideModal ();
}
});
};
/**
* Renames a file
*
* @ params string name - name of the file
*/
this . renameFile = function ( filename , newname ) {
$ . ajax ({
url : ifm . api ,
type : " POST " ,
data : ({
api : " rename " ,
dir : ifm . currentDir ,
filename : filename ,
newname : newname
}),
dataType : " json " ,
success : function ( data ) {
if ( data . status == " OK " ) {
ifm . showMessage ( self . i18n . file_rename_success , " s " );
ifm . refreshFileTable ();
2022-12-17 22:20:11 +01:00
} else ifm . showMessage ( data . message , " e " );
2021-08-28 16:55:52 +02:00
},
error : function () { ifm . showMessage ( self . i18n . general_error , " e " ); }
});
};
/**
* Show the copy / move dialog
*
* @ params string name - name of the file
*/
this . showCopyMoveDialog = function ( items ) {
self . showModal ( Mustache . render ( self . templates . copymove , { i18n : self . i18n } ) );
$ . ajax ({
url : self . api ,
type : " POST " ,
data : ({
api : " getFolders "
}),
dataType : " json " ,
success : function ( data ) {
$ ( '#copyMoveTree' ) . treeview ({
data : data ,
levels : 1 ,
2022-12-17 22:20:11 +01:00
expandIcon : " icon icon-plus-squared " ,
collapseIcon : " icon icon-minus-squared-alt " ,
2021-08-28 16:55:52 +02:00
loadingIcon : " icon icon-spin5 " ,
lazyLoad : function ( n , cb ) {
$ . ajax ({
url : self . api ,
type : " POST " ,
data : {
api : " getFolders " ,
dir : n . dataAttr . path
},
dataType : " json " ,
success : cb
});
}
});
},
error : function () { self . hideModal (); self . showMessage ( self . i18n . folder_tree_load_error , " e " ) }
});
2022-12-17 22:20:11 +01:00
let form = document . forms . formCopyMove ;
2021-08-28 16:55:52 +02:00
form . addEventListener ( 'click' , function ( e ) {
if ( e . target . id == 'copyButton' ) {
e . preventDefault ();
self . copyMove ( items , form . getElementsByClassName ( 'node-selected' )[ 0 ] . dataset . path , 'copy' );
self . hideModal ();
} else if ( e . target . id == 'moveButton' ) {
e . preventDefault ();
self . copyMove ( items , form . getElementsByClassName ( 'node-selected' )[ 0 ] . dataset . path , 'move' );
self . hideModal ();
} else if ( e . target . id == 'cancelButton' ) {
e . preventDefault ();
self . hideModal ();
}
});
};
/**
* Copy or moves a file
*
* @ params { string } sources - array of fileCache items
* @ params { string } destination - target directory
* @ params { string } action - action ( copy | move )
*/
this . copyMove = function ( sources , destination , action ) {
if ( ! Array . isArray ( sources ) )
sources = [ sources ];
2022-12-17 22:20:11 +01:00
let id = self . generateGuid ();
2021-08-28 16:55:52 +02:00
self . task_add ( { id : id , name : self . i18n [ action ] + " " + ( sources . length > 1 ? sources . length : sources [ 0 ] . name ) + " " + self . i18n . file_copy_to + " " + destination } );
$ . ajax ({
url : self . api ,
type : " POST " ,
data : {
dir : self . currentDir ,
api : " copyMove " ,
action : action ,
filenames : sources . map ( function ( e ) { return e . name } ),
destination : destination
},
dataType : " json " ,
success : function ( data ) {
if ( data . status == " OK " ) {
self . showMessage ( data . message , " s " );
} else {
self . showMessage ( data . message , " e " );
}
self . refreshFileTable ();
},
error : function () {
self . showMessage ( self . i18n . general_error , " e " );
},
complete : function () {
self . task_done ( id );
}
});
};
/**
* Shows the extract file dialog
*
* @ param { string } filename - name of the file
*/
this . showExtractFileDialog = function ( filename ) {
2022-12-17 22:20:11 +01:00
let targetDirSuggestion = ( filename . lastIndexOf ( '.' ) > 1 ) ? filename . substr ( 0 , filename . lastIndexOf ( '.' ) ) : filename ;
2021-08-28 16:55:52 +02:00
self . showModal ( Mustache . render ( self . templates . extractfile , { filename : filename , destination : targetDirSuggestion , i18n : self . i18n } ) );
2022-12-17 22:20:11 +01:00
let form = document . forms . formExtractFile ;
2021-08-28 16:55:52 +02:00
form . addEventListener ( 'click' , function ( e ) {
if ( e . target . id == 'buttonExtract' ) {
e . preventDefault ();
2022-12-17 22:20:11 +01:00
let loc = form . elements . extractTargetLocation . value ;
2021-08-28 16:55:52 +02:00
self . extractFile ( filename , ( loc == " custom " ? form . elements . extractCustomLocation . value : loc ) );
self . hideModal ();
} else if ( e . target . id == 'buttonCancel' ) {
e . preventDefault ();
self . hideModal ();
}
});
form . elements . extractCustomLocation . addEventListener ( 'keypress' , function ( e ) {
2022-12-17 22:20:11 +01:00
let loc = form . elements . extractTargetLocation . value ;
2021-08-28 16:55:52 +02:00
if ( e . key == 'Enter' ) {
e . preventDefault ();
self . extractFile ( filename , ( loc == " custom " ? form . elements . extractCustomLocation . value : loc ) );
self . hideModal ();
}
});
form . elements . extractCustomLocation . addEventListener ( 'focus' , function ( e ) {
form . elements . extractTargetLocation . value = 'custom' ;
});
};
/**
* Extracts a file
*
* @ param string filename - name of the file
* @ param string destination - name of the target directory
*/
this . extractFile = function ( filename , destination ) {
2022-12-17 22:20:11 +01:00
let id = self . generateGuid ();
2021-08-28 16:55:52 +02:00
self . task_add ( { id : id , name : " extract " + filename } );
$ . ajax ({
url : self . api ,
type : " POST " ,
data : {
api : " extract " ,
dir : self . currentDir ,
filename : filename ,
targetdir : destination
},
dataType : " json " ,
success : function ( data ) {
if ( data . status == " OK " ) {
self . showMessage ( data . message , " s " );
self . refreshFileTable ();
} else self . showMessage ( data . message , " e " );
},
error : function () { self . showMessage ( self . i18n . general_error , " e " ); },
complete : function () { self . task_done ( id ); }
});
};
/**
* Shows the upload file dialog
*/
this . showUploadFileDialog = function () {
self . showModal ( Mustache . render ( self . templates . uploadfile , { i18n : self . i18n } ) );
2022-12-17 22:20:11 +01:00
let form = document . forms . formUploadFile ;
2021-08-28 16:55:52 +02:00
form . elements . files . addEventListener ( 'change' , function ( e ) {
if ( e . target . files . length > 1 )
form . elements . newfilename . readOnly = true ;
else
form . elements . newfilename . readOnly = false ;
});
form . addEventListener ( 'click' , function ( e ) {
if ( e . target . id == 'buttonUpload' ) {
e . preventDefault ();
2022-12-17 22:20:11 +01:00
let newfilename = form . elements . newfilename . value ;
let files = Array . prototype . slice . call ( form . elements . files . files );
let existing_files ;
2021-08-28 16:55:52 +02:00
if ( files . length > 1 )
existing_files = files . map ( x => x . name ) . filter ( item => self . fileCache . map ( x => x . name ) . includes ( item ));
2022-12-17 22:20:11 +01:00
else if ( newfilename )
existing_files = self . fileCache . map ( x => x . name ) . indexOf ( newfilename ) !== - 1 ? [ newfilename ] : [];
else
existing_files = self . fileCache . map ( x => x . name ) . indexOf ( files [ 0 ] . name ) !== - 1 ? [ files [ 0 ] . name ] : [];
2021-08-28 16:55:52 +02:00
if ( existing_files . length > 0 && self . config . confirmoverwrite )
self . showUploadConfirmOverwrite ( files , existing_files , newfilename );
else {
if ( files . length == 1 )
self . uploadFile ( files [ 0 ], newfilename );
else
files . forEach ( function ( file ) {
self . uploadFile ( file );
});
}
self . hideModal ();
} else if ( e . target . id == 'buttonCancel' ) {
e . preventDefault ();
self . hideModal ();
}
});
};
this . showUploadConfirmOverwrite = function ( files , existing_files , newfilename = undefined ) {
self . showModal ( Mustache . render ( self . templates . uploadconfirmoverwrite , { files : existing_files , i18n : self . i18n }));
2022-12-17 22:20:11 +01:00
let form = document . forms . formUploadConfirmOverwrite ;
2021-08-28 16:55:52 +02:00
form . addEventListener ( 'click' , function ( e ) {
if ( e . target . id == " buttonConfirm " ) {
e . preventDefault ();
if ( files . length == 1 && newfilename )
self . uploadFile ( files [ 0 ], newfilename );
else
files . forEach ( function ( file ) {
self . uploadFile ( file );
});
self . hideModal ();
} else if ( e . target . id == 'buttonCancel' ) {
e . preventDefault ();
self . hideModal ();
}
});
};
/**
* Uploads a file
*/
this . uploadFile = function ( file , newfilename ) {
2022-12-17 22:20:11 +01:00
let data = new FormData ();
2021-08-28 16:55:52 +02:00
data . append ( 'api' , 'upload' );
data . append ( 'dir' , self . currentDir );
data . append ( 'file' , file );
if ( newfilename )
data . append ( 'newfilename' , newfilename );
2022-12-17 22:20:11 +01:00
let id = self . generateGuid ();
2021-08-28 16:55:52 +02:00
$ . ajax ({
url : self . api ,
type : " POST " ,
data : data ,
processData : false ,
contentType : false ,
dataType : " json " ,
xhr : function (){
2022-12-17 22:20:11 +01:00
let xhr = $ . ajaxSettings . xhr () ;
2021-08-28 16:55:52 +02:00
xhr . upload . onprogress = function ( evt ){ self . task_update ( evt . loaded / evt . total * 100 , id ); } ;
xhr . upload . onload = function (){ self . log ( 'Uploading ' + file . name + ' done.' ) } ;
return xhr ;
},
success : function ( data ) {
if ( data . status == " OK " ) {
self . showMessage ( self . i18n . file_upload_success , " s " );
if ( data . cd == self . currentDir ) self . refreshFileTable ();
} else self . showMessage ( data . message , " e " );
},
error : function () { self . showMessage ( self . i18n . general_error , " e " ); },
complete : function () { self . task_done ( id ); }
});
self . task_add ( { id : id , name : " Upload " + file . name } );
};
/**
* Change the permissions of a file
*
* @ params object e - event object
* @ params string name - name of the file
*/
this . changePermissions = function ( filename , newperms ) {
$ . ajax ({
url : self . api ,
type : " POST " ,
data : ({
api : " changePermissions " ,
dir : self . currentDir ,
filename : filename ,
chmod : newperms
}),
dataType : " json " ,
success : function ( data ){
if ( data . status == " OK " ) {
self . showMessage ( self . i18n . permission_change_success , " s " );
self . refreshFileTable ();
}
else {
self . showMessage ( data . message , " e " );
}
},
error : function () { self . showMessage ( self . i18n . general_error , " e " ); }
});
};
/**
* Show the remote upload dialog
*/
this . showRemoteUploadDialog = function () {
self . showModal ( Mustache . render ( self . templates . remoteupload , { i18n : self . i18n } ) );
2022-12-17 22:20:11 +01:00
let form = document . forms . formRemoteUpload ;
let urlChangeHandler = function ( e ) {
2021-08-28 16:55:52 +02:00
form . elements . filename . value = e . target . value . substr ( e . target . value . lastIndexOf ( '/' ) + 1 );
};
form . elements . url . addEventListener ( 'keypress' , self . preventEnter );
form . elements . url . addEventListener ( 'change' , urlChangeHandler );
form . elements . url . addEventListener ( 'keyup' , urlChangeHandler );
form . elements . filename . addEventListener ( 'keypress' , self . preventEnter );
form . elements . filename . addEventListener ( 'keyup' , function ( e ) {
form . elements . url . removeEventListener ( 'change' , urlChangeHandler );
form . elements . url . removeEventListener ( 'keyup' , urlChangeHandler );
});
form . addEventListener ( 'click' , function ( e ) {
if ( e . target . id == 'buttonUpload' ) {
e . preventDefault ();
self . remoteUpload ( form . elements . url . value , form . elements . filename . value , form . elements . method . value );
self . hideModal ();
} else if ( e . target . id == 'buttonCancel' ) {
e . preventDefault ();
self . hideModal ();
}
});
};
/**
* Remote uploads a file
*/
this . remoteUpload = function ( url , filename , method ) {
2022-12-17 22:20:11 +01:00
let id = ifm . generateGuid ();
2021-08-28 16:55:52 +02:00
$ . ajax ({
url : ifm . api ,
type : " POST " ,
data : ({
api : " remoteUpload " ,
dir : ifm . currentDir ,
filename : filename ,
method : method ,
url : url
}),
dataType : " json " ,
success : function ( data ) {
if ( data . status == " OK " ) {
self . showMessage ( self . i18n . file_upload_success , " s " );
self . refreshFileTable ();
} else
2022-12-17 22:20:11 +01:00
self . showMessage ( data . message , " e " );
2021-08-28 16:55:52 +02:00
},
error : function () { self . showMessage ( self . i18n . general_error , " e " ); },
complete : function () { self . task_done ( id ); }
});
self . task_add ( { id : id , name : self . i18n . upload_remote + " " + filename } );
};
/**
* Shows the ajax request dialog
*/
this . showAjaxRequestDialog = function () {
self . showModal ( Mustache . render ( self . templates . ajaxrequest , { i18n : self . i18n } ) );
2022-12-17 22:20:11 +01:00
let form = document . forms . formAjaxRequest ;
2021-08-28 16:55:52 +02:00
form . elements . ajaxurl . addEventListener ( 'keypress' , self . preventEnter );
form . addEventListener ( 'click' , function ( e ) {
if ( e . target . id == 'buttonRequest' ) {
e . preventDefault ();
self . ajaxRequest ( form . elements . ajaxurl . value , form . elements . ajaxdata . value . replace ( / \n / g , '&' ), form . elements . arMethod . value );
} else if ( e . target . id == 'buttonClose' ) {
e . preventDefault ();
self . hideModal ();
}
});
};
/**
* Performs an ajax request
*/
this . ajaxRequest = function ( url , data , method ) {
$ . ajax ({
url : url ,
cache : false ,
data : data ,
type : method ,
success : function ( response ) { document . getElementById ( 'ajaxresponse' ) . innerText = response ; },
error : function ( e ) { self . showMessage ( " Error: " + e , " e " ); self . log ( e ); }
});
};
/**
* Shows the search dialog
*/
this . showSearchDialog = function () {
self . showModal ( Mustache . render ( self . templates . search , { lastSearch : self . search . lastSearch , i18n : self . i18n } ) );
2022-12-17 22:20:11 +01:00
let updateResults = function ( data ) {
2021-08-28 16:55:52 +02:00
self . log ( 'updated search results' );
2022-12-17 22:20:11 +01:00
let searchresults = document . getElementById ( 'searchResults' );
2021-08-28 16:55:52 +02:00
if ( searchresults . tBodies [ 0 ] ) searchresults . tBodies [ 0 ] . remove ();
searchresults . appendChild ( document . createElement ( 'tbody' ) );
searchresults . tBodies [ 0 ] . innerHTML = Mustache . render ( self . templates . searchresults , { items : self . search . data } );
searchresults . tBodies [ 0 ] . addEventListener ( 'click' , function ( e ) {
if ( e . target . classList . contains ( 'searchitem' ) || e . target . parentElement . classList . contains ( 'searchitem' ) ) {
e . preventDefault ();
self . changeDirectory ( self . pathCombine ( self . search . data . currentDir , e . target . dataset . folder || e . target . parentElement . dataset . folder ), { absolute : true });
self . hideModal ();
}
});
searchresults . tBodies [ 0 ] . addEventListener ( 'keypress' , function ( e ) {
if ( e . target . classList . contains ( 'searchitem' ) || e . target . parentElement . classList . contains ( 'searchitem' ) ) {
e . preventDefault ();
e . target . click ();
}
});
};
updateResults ( self . search . data );
document . getElementById ( 'searchPattern' ) . addEventListener ( 'keypress' , function ( e ) {
if ( e . key == 'Enter' ) {
e . preventDefault ();
if ( e . target . value . trim () === '' ) return ;
document . getElementById ( 'searchResults' ) . tBodies [ 0 ] . innerHTML = '<tr><td style="text-align:center;"><span class="icon icon-spin5 animate-spin"></span></td></tr>' ;
self . search . lastSearch = e . target . value ;
$ . ajax ({
url : self . api ,
type : " POST " ,
data : {
api : " searchItems " ,
dir : self . currentDir ,
pattern : e . target . value
},
dataType : " json " ,
success : function ( data ) {
if ( data . status == 'ERROR' ) {
self . hideModal ();
self . showMessage ( data . message , " e " );
} else {
data . forEach ( function ( e ) {
2022-12-17 22:20:11 +01:00
e . folder = ( e . name . substr ( 0 , e . name . lastIndexOf ( '/' ) ) ) ? e . name . substr ( 0 , e . name . lastIndexOf ( '/' ) ) : '/' ;
2021-08-28 16:55:52 +02:00
e . linkname = e . name . substr ( e . name . lastIndexOf ( '/' ) + 1 );
});
self . search . data = data ;
if ( self . search . data ) self . search . data . currentDir = self . currentDir ;
updateResults ( data );
}
}
});
}
});
};
/**
* Shows the create archive dialog
*/
this . showCreateArchiveDialog = function ( items ) {
self . showModal ( Mustache . render ( self . templates . createarchive , { i18n : self . i18n } ) );
2022-12-17 22:20:11 +01:00
let form = document . forms . formCreateArchive ;
2021-08-28 16:55:52 +02:00
form . elements . archivename . addEventListener ( 'keypress' , function ( e ) {
if ( e . key == 'Enter' ) {
e . preventDefault ();
self . createArchive ( items , e . target . value );
self . hideModal ();
}
});
form . addEventListener ( 'click' , function ( e ) {
if ( e . target . id == 'buttonSave' ) {
e . preventDefault ();
self . createArchive ( items , form . elements . archivename . value );
self . hideModal ();
} else if ( e . target . id == 'buttonCancel' ) {
e . preventDefault ();
self . hideModal ();
}
}, false );
};
this . createArchive = function ( items , archivename ) {
2022-12-17 22:20:11 +01:00
let type = " " ;
2021-08-28 16:55:52 +02:00
if ( archivename . substr ( - 3 ) . toLowerCase () == " zip " )
type = " zip " ;
else if ( archivename . substr ( - 3 ) . toLowerCase () == " tar " )
type = " tar " ;
else if ( archivename . substr ( - 6 ) . toLowerCase () == " tar.gz " )
type = " tar.gz " ;
else if ( archivename . substr ( - 7 ) . toLowerCase () == " tar.bz2 " )
type = " tar.bz2 " ;
else {
self . showMessage ( self . i18n . invalid_archive_format , " e " );
return ;
}
2022-12-17 22:20:11 +01:00
let id = self . generateGuid ();
2021-08-28 16:55:52 +02:00
self . task_add ( { id : id , name : self . i18n . create_archive + " " + archivename } );
if ( ! Array . isArray ( items ) )
items = [ items ];
$ . ajax ({
url : self . api ,
type : " POST " ,
data : {
api : " createArchive " ,
dir : self . currentDir ,
archivename : archivename ,
filenames : items . map ( function ( e ) { return e . name ; } ),
format : type
},
dataType : " json " ,
success : function ( data ) {
self . log ( data );
if ( data . status == " OK " ) {
self . showMessage ( data . message , " s " );
self . refreshFileTable ();
} else
self . showMessage ( data . message , " e " );
},
error : function () { self . showMessage ( self . i18n . general_error , " e " ); },
complete : function () { self . task_done ( id ); }
});
};
// --------------------
// helper functions
// --------------------
/**
* Shows a notification
*
* @ param string m - message text
* @ param string t - message type ( e : error , s : success )
*/
this . showMessage = function ( m , t ) {
2022-12-17 22:20:11 +01:00
let msgType = ( t == " e " ) ? " danger " : ( t == " s " ) ? " success " : " info " ;
let offsetY = ( document . activeElement . tagName == " BODY " ) ? 15 : 70 ;
2021-08-28 16:55:52 +02:00
$ . notify (
{ message : m },
2022-12-17 22:20:11 +01:00
{ type : msgType , delay : 3000 , mouse_over : 'pause' ,
offset : { x : 0 , y : offsetY },
placement : {
from : " bottom " ,
align : " right "
},
element : document . activeElement }
2021-08-28 16:55:52 +02:00
);
};
/**
* Combines two path components
*
* @ param { string } a - component 1
* @ param { string } b - component 2
* @ returns { string } - combined path
*/
this . pathCombine = function () {
if ( ! arguments . length )
return " " ;
2022-12-17 22:20:11 +01:00
let args = Array . prototype . slice . call ( arguments );
2021-08-28 16:55:52 +02:00
args = args . filter ( x => typeof x === 'string' && x != '' );
if ( args . length == 0 )
return " " ;
first = " " ;
while ( first . length < 1 )
first = args . shift ();
first = first . replace ( / \ /+ $ / g , '' );
if ( ! args . length )
return first ;
args . forEach ( ( v , i ) => args [ i ] = v . replace ( /^ \ /*|\/*$/g, '' ) ); // */
args . unshift ( first );
return args . join ( '/' );
};
/**
* Prevents a user to submit a form via clicking enter
*
* @ param object e - click event
*/
this . preventEnter = function ( e ) {
if ( e . key == 'Enter' )
e . preventDefault ();
};
/**
* Checks if an element is part of an array
*
* @ param { object } needle - search item
* @ param { array } haystack - array to search
* @ returns { boolean }
*/
this . inArray = function ( needle , haystack ) {
2022-12-17 22:20:11 +01:00
for ( let i = 0 ; i < haystack . length ; i ++ )
2021-08-28 16:55:52 +02:00
if ( haystack [ i ] == needle )
return true ;
return false ;
};
/**
* Formats a date from an unix timestamp
*
* @ param { integer } timestamp - UNIX timestamp
*/
this . formatDate = function ( timestamp ) {
2022-12-17 22:20:11 +01:00
let d = new Date ( timestamp * 1000 );
2021-08-28 16:55:52 +02:00
return d . toLocaleString ( self . config . dateLocale );
};
this . getClipboardLink = function ( relpath ) {
2022-12-17 22:20:11 +01:00
let link = window . location . origin ;
2021-08-28 16:55:52 +02:00
link += window . location . pathname . substr ( 0 , window . location . pathname . lastIndexOf ( " / " ) );
link = self . pathCombine ( link , relpath );
return link ;
}
this . getNodeFromString = function ( s ) {
2022-12-17 22:20:11 +01:00
let template = document . createElement ( 'template' );
2021-08-28 16:55:52 +02:00
template . innerHTML = s ;
return template . content . childNodes [ 0 ];
};
this . getNodesFromString = function ( s ) {
2022-12-17 22:20:11 +01:00
let template = document . createElement ( 'template' );
2021-08-28 16:55:52 +02:00
template . innerHTML = s ;
return template . content . childNodes ;
};
// copypasted from https://hackernoon.com/copying-text-to-clipboard-with-javascript-df4d4988697f
this . copyToClipboard = function ( str ) {
const el = document . createElement ( 'textarea' );
el . value = str ;
el . setAttribute ( 'readonly' , '' );
el . style . position = 'absolute' ;
el . style . left = '-9999px' ;
document . body . appendChild ( el );
const selected =
document . getSelection () . rangeCount > 0
? document . getSelection () . getRangeAt ( 0 )
: false ;
el . select ();
document . execCommand ( 'copy' );
document . body . removeChild ( el );
if ( selected ) {
document . getSelection () . removeAllRanges ();
document . getSelection () . addRange ( selected );
}
};
/**
* Adds a task to the taskbar .
*
* @ param object task - description of the task : { id : " guid " , name : " Task Name " , type : " (info|warning|danger|success) " }
*/
this . task_add = function ( task ) {
if ( ! task . id ) {
self . log ( " Error: No task id given. " );
return false ;
}
if ( ! document . querySelector ( " footer " ) ) {
2022-12-17 22:20:11 +01:00
let newFooter = self . getNodeFromString ( Mustache . render ( self . templates . footer , { i18n : self . i18n } ) );
2021-08-28 16:55:52 +02:00
newFooter . addEventListener ( 'click' , function ( e ) {
if ( e . target . name == 'showAll' || e . target . parentElement . name == " showAll " ) {
wq = newFooter . children . wq_container . children [ 0 ] . children . waitqueue ;
if ( wq . style . maxHeight == '70vh' ) {
wq . style . maxHeight = '6rem' ;
wq . style . overflow = 'hidden' ;
} else {
wq . style . maxHeight = '70vh' ;
wq . style . overflow = 'auto' ;
}
}
});
document . body . appendChild ( newFooter );
document . body . style . paddingBottom = '9rem' ;
}
task . id = " wq- " + task . id ;
task . type = task . type || " info " ;
2022-12-17 22:20:11 +01:00
let wq = document . getElementById ( 'waitqueue' );
2021-08-28 16:55:52 +02:00
wq . prepend ( self . getNodeFromString ( Mustache . render ( self . templates . task , task ) ) );
document . getElementsByName ( 'taskCount' )[ 0 ] . innerText = wq . children . length ;
};
/**
* Removes a task from the taskbar
*
* @ param string id - task identifier
*/
this . task_done = function ( id ) {
document . getElementById ( 'wq-' + id ) . remove ();
2022-12-17 22:20:11 +01:00
let wq = document . getElementById ( 'waitqueue' );
2021-08-28 16:55:52 +02:00
if ( wq . children . length == 0 ) {
document . getElementsByTagName ( 'footer' )[ 0 ] . remove ();
document . body . style . paddingBottom = 0 ;
} else {
document . getElementsByName ( 'taskCount' )[ 0 ] . innerText = wq . children . length ;
}
};
/**
* Updates a task
*
* @ param integer progress - percentage of status
* @ param string id - task identifier
*/
this . task_update = function ( progress , id ) {
2022-12-17 22:20:11 +01:00
let progbar = document . getElementById ( 'wq-' + id ) . getElementsByClassName ( 'progress-bar' )[ 0 ];
2021-08-28 16:55:52 +02:00
progbar . style . width = progress + '%' ;
progbar . setAttribute ( 'aria-valuenow' , progress );
};
/**
* Highlights an item in the file table
*
* @ param object param - either an element id or a jQuery object
*/
this . highlightItem = function ( direction ) {
2022-12-17 22:20:11 +01:00
let highlight = function ( el ) {
2021-08-28 16:55:52 +02:00
[] . slice . call ( el . parentElement . children ) . forEach ( function ( e ) {
e . classList . remove ( 'highlightedItem' );
});
el . classList . add ( 'highlightedItem' );
el . firstElementChild . firstElementChild . focus ();
if ( ! self . isElementInViewport ( el ) ) {
2022-12-17 22:20:11 +01:00
let scrollOffset = 0 ;
2021-08-28 16:55:52 +02:00
if ( direction == " prev " )
scrollOffset = el . offset () . top - ( window . innerHeight || document . documentElement . clientHeight ) + el . height () + 15 ;
else
scrollOffset = el . offset () . top - 55 ;
$ ( 'html, body' ) . animate ( { scrollTop : scrollOffset }, 200 );
}
};
2022-12-17 22:20:11 +01:00
let highlightedItem = document . getElementsByClassName ( 'highlightedItem' )[ 0 ];
2021-08-28 16:55:52 +02:00
if ( ! highlightedItem ) {
if ( document . activeElement . classList . contains ( 'ifmitem' ) )
highlight ( document . activeElement . parentElement . parentElement );
else
highlight ( document . getElementById ( 'filetable' ) . tBodies [ 0 ] . firstElementChild );
} else {
2022-12-17 22:20:11 +01:00
let newItem = ( direction == " next " ? highlightedItem . nextElementSibling : highlightedItem . previousElementSibling );
2021-08-28 16:55:52 +02:00
if ( newItem != null )
highlight ( newItem );
}
};
/**
* Checks if an element is within the viewport
*
* @ param object el - element object
*/
this . isElementInViewport = function ( el ) {
2022-12-17 22:20:11 +01:00
let rect = el . getBoundingClientRect ();
2021-08-28 16:55:52 +02:00
return (
rect . top >= 80 &&
rect . left >= 0 &&
rect . bottom <= ( ( window . innerHeight || document . documentElement . clientHeight ) ) &&
rect . right <= ( window . innerWidth || document . documentElement . clientWidth )
);
};
/**
* Generates a GUID
*/
this . generateGuid = function () {
2022-12-17 22:20:11 +01:00
let result , i , j ;
2021-08-28 16:55:52 +02:00
result = '' ;
for ( j = 0 ; j < 20 ; j ++ ) {
i = Math . floor ( Math . random () * 16 ) . toString ( 16 ) . toUpperCase ();
result = result + i ;
}
return result ;
};
/**
* Logs a message if debug mode is active
*
* @ param string m - message text
*/
2022-12-17 22:20:11 +01:00
this . log = function ( m ) {
if ( self . config . debug ) {
console . log ( " IFM (debug): " + m );
2021-08-28 16:55:52 +02:00
}
};
/**
* Encodes a string for use in the href attribute of an anchor .
*
* @ param string s - decoded string
*/
this . hrefEncode = function ( s ) {
return s
. replace ( /%/ g , '%25' )
. replace ( / ; / g , '%3B' )
. replace ( / \ ? / g , '%3F' )
. replace ( /:/ g , '%3A' )
. replace ( /@/ g , '%40' )
. replace ( /&/ g , '%26' )
. replace ( /=/ g , '%3D' )
. replace ( / \ +/ g , '%2B' )
. replace ( / \ $ / g , '%24' )
. replace ( / , / g , '%2C' )
. replace ( /</ g , '%3C' )
. replace ( />/ g , '%3E' )
. replace ( / #/g, '%23' )
. replace ( / " /g, '%22' )
. replace ( / { / g , '%7B' )
. replace ( / } / g , '%7D' )
. replace ( / \ |/ g , '%7C' )
. replace ( / \ ^/ g , '%5E' )
. replace ( / \ [ / g , '%5B' )
. replace ( / \ ] / g , '%5D' )
. replace ( / \\ / g , '%5C' )
. replace ( / ` / g , '%60' )
;
// ` <- this comment prevents the vim syntax highlighting from breaking -.-
};
/**
* Handles the javascript onbeforeunload event
*
* @ param object event - event object
*/
this . onbeforeunloadHandler = function ( e ) {
if ( document . getElementById ( 'waitqueue' ) ) {
return self . i18n . remaining_tasks ;
}
};
/**
* Handles the javascript pop states
*
* @ param object event - event object
*/
this . historyPopstateHandler = function ( e ) {
2022-12-17 22:20:11 +01:00
let dir = " " ;
2021-08-28 16:55:52 +02:00
if ( e . state && e . state . dir )
dir = e . state . dir ;
self . changeDirectory ( dir , { pushState : false , absolute : true } );
};
/**
* Handles keystrokes
*
* @ param object e - event object
*/
this . handleKeystrokes = function ( e ) {
2022-12-17 22:20:11 +01:00
let isFormElement = function ( el ) {
2021-08-28 16:55:52 +02:00
do {
if ( self . inArray ( el . tagName , [ 'INPUT' , 'TEXTAREA' ] ) ) {
return true ;
}
} while ( ( el == el . parentElement ) !== false );
return false ;
}
if ( isFormElement ( e . target ) ) return ;
// global key events
switch ( e . key ) {
case '/' :
if ( self . config . search ) {
e . preventDefault ();
self . showSearchDialog ();
}
break ;
case 'g' :
e . preventDefault ();
$ ( '#currentDir' ) . focus ();
return ;
break ;
case 'r' :
if ( self . config . showrefresh ) {
e . preventDefault ();
self . refreshFileTable ();
}
break ;
case 'u' :
if ( self . config . upload ) {
e . preventDefault ();
self . showUploadFileDialog ();
}
return ;
break ;
case 'o' :
if ( self . config . remoteupload ) {
e . preventDefault ();
self . showRemoteUploadDialog ();
}
return ;
break ;
case 'a' :
if ( self . config . ajaxrequest ) {
e . preventDefault ();
self . showAjaxRequestDialog ();
}
return ;
break ;
case 'F' :
if ( self . config . createfile ) {
e . preventDefault ();
self . showFileDialog ();
}
return ;
break ;
case 'D' :
if ( self . config . createdir ) {
e . preventDefault ();
self . showCreateDirDialog ();
}
return ;
break ;
case 'h' :
case 'ArrowLeft' :
case 'Backspace' :
e . preventDefault ();
self . changeDirectory ( '..' );
return ;
break ;
case 'j' :
case 'ArrowDown' :
e . preventDefault ();
self . highlightItem ( 'next' );
return ;
break ;
case 'k' :
case 'ArrowUp' :
e . preventDefault ();
self . highlightItem ( 'prev' );
return ;
break ;
}
// key events which need a highlighted item
2022-12-17 22:20:11 +01:00
let element = document . getElementsByClassName ( 'highlightedItem' )[ 0 ];
2021-08-28 16:55:52 +02:00
if ( element )
item = self . fileCache . find ( x => x . guid == element . children [ 0 ] . children [ 0 ] . id );
else
item = false ;
// Some operations do not work if the highlighted item is the parent
// directory. In these cases the keybindings are ignored.
2022-12-17 22:20:11 +01:00
let selectedItems = Array . prototype . slice . call ( document . getElementsByClassName ( 'selectedItem' ) )
2021-08-28 16:55:52 +02:00
. map ( function ( e ) { return self . fileCache . find ( x => x . guid === e . children [ 0 ] . children [ 0 ] . id ) } );
switch ( e . key ) {
case 'Delete' :
if ( self . config . delete )
if ( selectedItems . length > 0 ) {
e . preventDefault ();
self . showDeleteDialog ( selectedItems );
} else if ( item && item . name !== '..' )
self . showDeleteDialog ( item );
return ;
break ;
case 'c' :
case 'm' :
if ( self . config . copymove ) {
if ( selectedItems . length > 0 ) {
e . preventDefault ();
self . showCopyMoveDialog ( selectedItems );
} else if ( item && item . name !== '..' )
self . showCopyMoveDialog ( item );
}
return ;
break ;
}
if ( item )
switch ( e . key ) {
case 'l' :
case 'ArrowRight' :
e . preventDefault ();
if ( item . type == " dir " )
self . changeDirectory ( item . name );
return ;
break ;
case 'Escape' :
if ( element . children [ 0 ] . children [ 0 ] == document . activeElement ) {
e . preventDefault ();
element . classList . toggle ( 'highlightedItem' );
}
return ;
break ;
case ' ' :
case 'Enter' :
if ( element . children [ 0 ] . children [ 0 ] == document . activeElement ) {
if ( e . key == 'Enter' && element . classList . contains ( 'isDir' ) ) {
e . preventDefault ();
e . stopPropagation ();
self . changeDirectory ( item . name );
} else if ( e . key == ' ' && item . name != " .. " ) {
e . preventDefault ();
e . stopPropagation ();
element . classList . toggle ( 'selectedItem' );
}
}
return ;
break ;
case 'e' :
if ( self . config . edit && item . eaction == " edit " ) {
e . preventDefault ();
self . editFile ( item . name );
} else if ( self . config . extract && item . eaction == " extract " ) {
e . preventDefault ();
self . showExtractFileDialog ( item . name );
}
return ;
break ;
case 'n' :
e . preventDefault ();
if ( self . config . rename ) {
self . showRenameFileDialog ( item . name );
}
return ;
break ;
}
};
/**
* Initializes the application
*/
this . initLoadConfig = function () {
$ . ajax ({
url : self . api ,
type : " POST " ,
data : {
api : " getConfig "
},
dataType : " json " ,
success : function ( d ) {
self . config = d ;
if ( self . config . ace_includes ) {
self . ace = {};
self . ace . files = self . config . ace_includes . split ( '|' ) . filter ( x => x != " " );
self . ace . modes = self . ace . files
. filter ( function ( f ){ if ( f . substr ( 0 , 5 ) == " mode- " ) return f ; } )
. map ( function ( f ){ return f . substr ( 5 ); } )
self . ace . modes . unshift ( " text " );
}
self . log ( " configuration loaded " );
self . initLoadTemplates ();
},
error : function () {
throw new Error ( self . i18n . load_config_error );
}
});
};
this . initLoadTemplates = function () {
// load the templates from the backend
$ . ajax ({
url : self . api ,
type : " POST " ,
data : {
api : " getTemplates "
},
dataType : " json " ,
success : function ( d ) {
self . templates = d ;
self . log ( " templates loaded " );
self . initLoadI18N ();
},
error : function () {
throw new Error ( self . i18n . load_template_error );
}
});
};
this . initLoadI18N = function () {
// load I18N from the backend
$ . ajax ({
url : self . api ,
type : " POST " ,
data : {
api : " getI18N "
},
dataType : " json " ,
success : function ( d ) {
self . i18n = d ;
2022-12-17 22:20:11 +01:00
self . log ( " I18N loaded " );
self . initCheckAuth ();
2021-08-28 16:55:52 +02:00
},
error : function () {
throw new Error ( self . i18n . load_text_error );
}
});
};
2022-12-17 22:20:11 +01:00
this . initCheckAuth = function () {
$ . ajax ({
url : self . api ,
type : " POST " ,
data : {
api : " checkAuth "
},
dataType : " json " ,
success : function ( d ) {
if ( d . status == " ERROR " ) {
self . showModal ( Mustache . render ( self . templates . login , { i18n : self . i18n }), { large : true }, {
backdrop : 'static' ,
keyboard : false
});
var form = document . forms . loginForm ;
form . addEventListener ( 'click' , function ( e ) {
e . preventDefault ();
if ( e . target . id == " buttonLogin " ) {
$ . ajax ({
url : self . api ,
type : " POST " ,
data : {
api : " checkAuth " ,
inputLogin : form . elements [ 0 ] . value ,
inputPassword : form . elements [ 1 ] . value
},
dataType : " json " ,
success : function ( e ) {
if ( e . status != " ERROR " ) {
self . hideModal ();
self . initApplication ();
} else {
var errorlogin = document . getElementsByClassName ( 'alert' )[ 0 ];
errorlogin . classList . remove ( " d-none " );
errorlogin . innerHTML = e . message ;
}
},
error : function ( e ) {
var errorlogin = document . getElementsByClassName ( 'alert' )[ 0 ];
errorlogin . classList . remove ( " d-none " );
errorlogin . innerHTML = " Authentication failed " ;
}
});
}
});
} else {
self . initApplication ();
}
}
});
};
2021-08-28 16:55:52 +02:00
this . initApplication = function () {
self . rootElement . innerHTML = Mustache . render (
self . templates . app ,
{
showpath : " / " ,
config : self . config ,
i18n : self . i18n ,
generic : {
hasdropdown : ( !! self . config . ajaxrequest ||!! self . config . remoteupload ||!! self . config . auth )
},
ftbuttons : function (){
return ( self . config . edit || self . config . rename || self . config . delete || self . config . zipnload || self . config . extract );
}
});
// bind static buttons
if ( el_r = document . getElementById ( 'refresh' ))
el_r . onclick = function () { self . refreshFileTable (); };
if ( el_s = document . getElementById ( 'search' ))
el_s . onclick = function () { self . showSearchDialog (); };
//document.getElementById( 'refresh' ).onclick = function() { self.refreshFileTable(); };
//document.getElementById( 'search' ).onclick = function() { self.showSearchDialog(); };
if ( self . config . createfile )
document . getElementById ( 'createFile' ) . onclick = function () { self . showFileDialog (); };
if ( self . config . createdir )
document . getElementById ( 'createDir' ) . onclick = function () { self . showCreateDirDialog (); };
if ( self . config . upload )
document . getElementById ( 'upload' ) . onclick = function () { self . showUploadFileDialog (); };
document . getElementById ( 'currentDir' ) . onkeypress = function ( e ) {
if ( e . keyCode == 13 ) {
e . preventDefault ();
self . changeDirectory ( e . target . value , { absolute : true } );
e . target . blur ();
}
};
if ( self . config . remoteupload )
document . getElementById ( 'buttonRemoteUpload' ) . onclick = function () { self . showRemoteUploadDialog (); };
if ( self . config . ajaxrequest )
document . getElementById ( 'buttonAjaxRequest' ) . onclick = function () { self . showAjaxRequestDialog (); };
if ( self . config . upload )
document . addEventListener ( 'dragover' , function ( e ) {
if ( Array . prototype . indexOf . call ( e . dataTransfer . types , " Files " ) != - 1 ) {
e . preventDefault ();
e . stopPropagation ();
2022-12-17 22:20:11 +01:00
let div = document . getElementById ( 'filedropoverlay' );
2021-08-28 16:55:52 +02:00
div . style . display = 'block' ;
div . ondrop = function ( e ) {
e . preventDefault ();
e . stopPropagation ();
2022-12-17 22:20:11 +01:00
let files = Array . from ( e . dataTransfer . files );
let existing_files = files . map ( x => x . name ) . filter ( item => self . fileCache . map ( x => x . name ) . includes ( item ));
2021-08-28 16:55:52 +02:00
if ( existing_files . length > 0 && self . config . confirmoverwrite )
self . showUploadConfirmOverwrite ( files , existing_files );
else
files . forEach ( function ( file ) {
self . uploadFile ( file );
});
if ( e . target . id == 'filedropoverlay' )
e . target . style . display = 'none' ;
else if ( e . target . parentElement . id == 'filedropoverlay' ) {
e . target . parentElement . style . display = 'none' ;
}
};
div . ondragleave = function ( e ) {
e . preventDefault ();
e . stopPropagation ();
if ( e . target . id == 'filedropoverlay' )
e . target . style . display = 'none' ;
};
} else {
2022-12-17 22:20:11 +01:00
let div = document . getElementById ( 'filedropoverlay' );
2021-08-28 16:55:52 +02:00
if ( div . style . display == 'block' )
div . stye . display == 'none' ;
}
});
// drag and drop of filetable items
if ( self . config . copymove ) {
2022-12-17 22:20:11 +01:00
let isFile = function ( e ) { return Array . prototype . indexOf . call ( e . dataTransfer . types , " Files " ) != - 1 };
2021-08-28 16:55:52 +02:00
document . addEventListener ( 'dragstart' , function ( e ) {
2022-12-17 22:20:11 +01:00
let selectedItems = document . getElementsByClassName ( 'selectedItem' );
let data ;
2021-08-28 16:55:52 +02:00
if ( selectedItems . length > 0 )
data = self . fileCache . filter (
x => self . inArray (
x . guid ,
[] . slice . call ( selectedItems ) . map ( function ( e ) { return e . dataset . id ; } )
)
);
else
data = self . fileCache . find ( x => x . guid === e . target . dataset . id );
e . dataTransfer . setData ( 'text/plain' , JSON . stringify ( data ) );
2022-12-17 22:20:11 +01:00
let dragImage = document . createElement ( 'div' );
2021-08-28 16:55:52 +02:00
dragImage . style . display = 'inline' ;
dragImage . style . padding = '10px' ;
dragImage . innerHTML = '<span class="icon icon-folder-open-empty"></span> ' + self . i18n . move + ' ' + ( data . length || data . name );
document . body . appendChild ( dragImage );
setTimeout ( function () {
dragImage . remove ();
});
e . dataTransfer . setDragImage ( dragImage , 0 , 0 );
});
document . addEventListener ( 'dragover' , function ( e ) { if ( ! isFile ( e ) && e . target . parentElement . classList . contains ( 'isDir' ) ) e . preventDefault (); } );
document . addEventListener ( 'dragenter' , function ( e ) {
if ( ! isFile ( e ) && e . target . tagName == " TD " && e . target . parentElement . classList . contains ( 'isDir' ) )
e . target . parentElement . classList . add ( 'highlightedItem' );
});
document . addEventListener ( 'dragleave' , function ( e ) {
if ( ! isFile ( e ) && e . target . tagName == " TD " && e . target . parentElement . classList . contains ( 'isDir' ) )
e . target . parentElement . classList . remove ( 'highlightedItem' );
});
document . addEventListener ( 'drop' , function ( e ) {
if ( ! isFile ( e ) && e . target . tagName == " TD " && e . target . parentElement . classList . contains ( 'isDir' ) ) {
e . preventDefault ();
e . stopPropagation ();
try {
2022-12-17 22:20:11 +01:00
let source = JSON . parse ( e . dataTransfer . getData ( 'text' ) );
2021-08-28 16:55:52 +02:00
self . log ( " source: " );
self . log ( source );
2022-12-17 22:20:11 +01:00
let destination = self . fileCache . find ( x => x . guid === e . target . firstElementChild . id );
2021-08-28 16:55:52 +02:00
if ( ! Array . isArray ( source ) )
source = [ source ];
if ( source . find ( x => x . name === destination . name ) )
self . showMessage ( " Source and destination are equal. " );
else
self . copyMove ( source , destination . name , " move " );
} catch ( e ) {
self . log ( e );
} finally {
[] . slice . call ( document . getElementsByClassName ( 'highlightedItem' ) ) . forEach ( function ( e ) {
e . classList . remove ( 'highlightedItem' );
});
}
}
});
}
// handle keystrokes
document . onkeydown = self . handleKeystrokes ;
// handle history manipulation
window . onpopstate = self . historyPopstateHandler ;
// handle window.onbeforeunload
window . onbeforeunload = self . onbeforeunloadHandler ;
// load initial file table
if ( window . location . hash ) {
self . changeDirectory ( decodeURIComponent ( window . location . hash . substring ( 1 ) ) );
} else {
this . refreshFileTable ();
}
};
2022-12-17 22:20:11 +01:00
this . init = function ( id ) {
self . rootElement = document . getElementById ( id );
2021-08-28 16:55:52 +02:00
this . initLoadConfig ();
};
}
2022-12-17 22:20:11 +01:00
</ script >
f00bar ;
}
public function getHTMLHeader () {
print ' <! DOCTYPE HTML >
< html >
< head >
< title > IFM - improved file manager </ title >
< meta charset = " utf-8 " >
< meta http - equiv = " X-UA-Compatible " content = " IE=edge " >
< meta name = " viewport " content = " user-scalable=no, width=device-width, initial-scale=1.0, shrink-to-fit=no " > ' ;
$this -> getCSS ();
print '</head><body>' ;
}
public function getHTMLFooter () {
print '</body></html>' ;
}
/**
* main functions
*/
public function run ( $mode = " standalone " ) {
try {
if ( ! is_dir ( realpath ( $this -> config [ 'root_dir' ])) || ! is_readable ( realpath ( $this -> config [ 'root_dir' ])))
throw new IFMException ( " Cannot access root_dir. " , false );
chdir ( realpath ( $this -> config [ 'root_dir' ]));
$this -> mode = $mode ;
if ( isset ( $_REQUEST [ 'api' ]) || $mode == " api " )
$this -> jsonResponse ( $this -> dispatch ());
elseif ( $mode == " standalone " )
$this -> getApplication ();
else
$this -> getInlineApplication ();
} catch ( IFMException $e ) {
$this -> jsonResponse ([ " status " => " ERROR " , " message " => $e -> getMessage ()]);
} catch ( Exception $e ) {
$this -> jsonResponse ([ " status " => " ERROR " , " message " => $e -> getMessage ()]);
}
}
private function dispatch () {
// APIs which do not need authentication
switch ( $_REQUEST [ 'api' ]) {
case " checkAuth " :
if ( $this -> checkAuth ())
return [ " status " => " OK " , " message " => " Authenticated " ];
else
return [ " status " => " ERROR " , " message " => " Not authenticated " ];
case " getConfig " :
return $this -> getConfig ();
case " getTemplates " :
return $this -> getTemplates ();
case " getI18N " :
return $this -> getI18N ( $_REQUEST );
case " logout " :
session_start ();
session_unset ();
header ( " Location: " . strtok ( $_SERVER [ " REQUEST_URI " ], '?' ));
exit ;
}
// check authentication
if ( ! $this -> checkAuth ())
throw new IFMException ( " Not authenticated " );
// api requests which work without a valid working directory
switch ( $_REQUEST [ 'api' ]) {
case " getRealpath " :
if ( isset ( $_REQUEST [ " dir " ]) && $_REQUEST [ " dir " ] != " " )
return [ " realpath " => $this -> getValidDir ( $_REQUEST [ " dir " ])];
else
return [ " realpath " => " " ];
case " getFiles " :
if ( isset ( $_REQUEST [ " dir " ]) && $this -> isPathValid ( $_REQUEST [ " dir " ]))
return $this -> getFiles ( $_REQUEST [ " dir " ]);
else
return $this -> getFiles ( " " );
case " getFolders " :
return $this -> getFolders ( $_REQUEST );
}
// checking working directory
if ( ! isset ( $_REQUEST [ " dir " ]) || ! $this -> isPathValid ( $_REQUEST [ " dir " ]))
throw new IFMException ( $this -> l ( " invalid_dir " ));
$this -> chDirIfNecessary ( $_REQUEST [ 'dir' ]);
switch ( $_REQUEST [ " api " ]) {
case " createDir " : return $this -> createDir ( $_REQUEST );
case " saveFile " : return $this -> saveFile ( $_REQUEST );
case " getContent " : return $this -> getContent ( $_REQUEST );
case " delete " : return $this -> deleteFiles ( $_REQUEST );
case " rename " : return $this -> renameFile ( $_REQUEST );
case " download " : return $this -> downloadFile ( $_REQUEST );
case " extract " : return $this -> extractFile ( $_REQUEST );
case " upload " : return $this -> uploadFile ( $_REQUEST );
case " copyMove " : return $this -> copyMove ( $_REQUEST );
case " changePermissions " : return $this -> changePermissions ( $_REQUEST );
case " zipnload " : return $this -> zipnload ( $_REQUEST );
case " remoteUpload " : return $this -> remoteUpload ( $_REQUEST );
case " searchItems " : return $this -> searchItems ( $_REQUEST );
case " getFolderTree " : return $this -> getFolderTree ( $_REQUEST );
case " createArchive " : return $this -> createArchive ( $_REQUEST );
case " proxy " : return $this -> downloadFile ( $_REQUEST , false );
default :
throw new IFMException ( $this -> l ( " invalid_action " ));
}
}
/**
* api functions
*/
private function getI18N ( $lang = " en " ) {
if ( in_array ( $lang , array_keys ( $this -> i18n )))
return array_merge ( $this -> i18n [ 'en' ], $this -> i18n [ $lang ]);
else
return $this -> i18n [ 'en' ];
}
private function getTemplates () {
// templates
$templates = [];
$templates [ 'app' ] = <<< 'f00bar'
< nav class = " navbar navbar-expand-lg navbar-dark
{{ ^ config . inline }}
fixed - top
{{ / config . inline }} bg - dark " >
< div class = " container " >
< a class = " navbar-brand " href = " # " > IFM </ a >
< button class = " navbar-toggler " type = " button " data - toggle = " collapse " data - target = " #navbarCollapse " aria - controls = " navbarCollapse " aria - expanded = " true " aria - label = " { { i18n.toggle_nav}} " >
< span class = " navbar-toggler-icon " ></ span >
</ button >
< div class = " collapse navbar-collapse " id = " navbarCollapse " >
< div class = " navbar-nav mr-auto " >
< form class = " form-inline mt-2 mt-md-0 " >
< div class = " input-group " >
< div class = " input-group-prepend " >
< span class = " input-group-text " id = " currentDirLabel " > {{ i18n . path_content }} {{ showpath }} </ span >
</ div >
< input class = " form-control " id = " currentDir " aria - describedby = " currentDirLabel " type = " text " >
</ div >
</ form >
</ div >
< ul class = " navbar-nav " >
{{ #config.showrefresh}}
< li class = " nav-item " >
< a id = " refresh " class = " nav-link " >< span title = " { { i18n.refresh}} " class = " icon icon-arrows-cw " ></ span > < span class = " d-inline d-lg-none " > {{ i18n . refresh }} </ span ></ a >
</ li >
{{ / config . showrefresh }}
{{ #config.search}}
< li class = " nav-item " >
< a id = " search " class = " nav-link " >< span title = " { { i18n.search}} " class = " icon icon-search " ></ span > < span class = " d-inline d-lg-none " > {{ i18n . search }} </ span ></ a >
</ li >
{{ / config . search }}
{{ #config.upload}}
< li class = " nav-item " >
< a id = " upload " class = " nav-link " >< span title = " { { i18n.upload}} " class = " icon icon-upload " ></ span > < span class = " d-inline d-lg-none " > {{ i18n . upload }} </ span ></ a >
</ li >
{{ / config . upload }}
{{ #config.createfile}}
< li class = " nav-item " >
< a id = " createFile " class = " nav-link " >< span title = " { { i18n.file_new}} " class = " icon icon-doc-inv " ></ span > < span class = " d-inline d-lg-none " > {{ i18n . file_new }} </ span ></ a >
</ li >
{{ / config . createfile }}
{{ #config.createdir}}
< li class = " nav-item " >
< a id = " createDir " class = " nav-link " >< span title = " { { i18n.folder_new}} " class = " icon icon-folder " ></ span > < span class = " d-inline d-lg-none " > {{ i18n . folder_new }} </ span ></ a >
</ li >
{{ / config . createdir }}
{{ #generic.hasdropdown}}
< li class = " nav-item dropdown " >
< a class = " nav-link dropdown-toggle " href = " # " id = " menu " data - toggle = " dropdown " aria - haspopup = " true " aria - expanded = " false " ></ a >
< div class = " dropdown-menu dropdown-menu-right " aria - labelledby = " menu " >
{{ #config.remoteupload}}
< a class = " dropdown-item " id = " buttonRemoteUpload " >< span class = " icon icon-upload-cloud " ></ span > {{ i18n . upload_remote }} </ a >
{{ / config . remoteupload }}
{{ #config.ajaxrequest}}
< a class = " dropdown-item " id = " buttonAjaxRequest " >< span class = " icon icon-link-ext " ></ span > {{ i18n . ajax_request }} </ a >
{{ / config . ajaxrequest }}
{{ #config.auth}}
< a class = " dropdown-item " href = " ?api=logout " id = " buttonLogout " >< span class = " icon icon-logout " ></ span > {{ i18n . logout }} </ a >
{{ / config . auth }}
</ div >
</ li >
{{ / generic . hasdropdown }}
</ ul >
</ div >
</ div >
</ nav >
< div id = " filedropoverlay " >
< h1 > {{ i18n . upload_drop }} </ h1 >
</ div >
< main role = " main " >
< div class = " container " >
< table id = " filetable " class = " table " >
< thead >
< tr >
< th class = " th-meta hidden never " data - visible = " false " ></ th >
< th class = " th-filename all " > {{ i18n . filename }} </ th >
{{ #config.download}}
< th class = " th-download all " ></ th >
{{ / config . download }}
{{ #config.showlastmodified}}
< th class = " th-lastmod tablet-l desktop " > {{ i18n . last_modified }} </ th >
{{ / config . showlastmodified }}
{{ #config.showfilesize}}
< th class = " th-size tablet-p tablet-l desktop " > {{ i18n . size }} </ th >
{{ / config . showfilesize }}
{{ #config.showpermissions}}
< th class = " th-permissions d-none d-md-table-cell tablet-p tablet-l desktop " > {{ i18n . permissions }} </ th >
{{ / config . showpermissions }}
{{ #config.showowner}}
< th class = " th-owner d-none d-lg-table-cell tablet-l desktop " > {{ i18n . owner }} </ th >
{{ / config . showowner }}
{{ #config.showgroup}}
< th class = " th-group d-none d-xl-table-cell desktop " > {{ i18n . group }} </ th >
{{ / config . showgroup }}
< th class = " th-buttons buttons all " ></ th >
</ tr >
</ thead >
< tbody >
</ tbody >
</ table >
</ div >
< div class = " container " >
< div class = " card ifminfo " >
< div class = " card-body p-2 " >
< div style = " float:left; padding-left: 10px; " > {{ i18n . footer }} < a href = 'https://github.com/misterunknown/ifm/tree/v4.0' target = _blank > v4 . 0 </ a ></ div >
< a style = " float:right; padding-right: 10px; " href = " http://github.com/misterunknown/ifm " target = " _blank " > {{ i18n . github }} </ a >
</ div >
</ div >
</ div >
</ main >
f00bar ;
$templates [ 'login' ] = <<< 'f00bar'
< style type = " text/css " >
html ,
body {
height : 100 % ;
}
body {
display : - ms - flexbox ;
display : flex ;
- ms - flex - align : center ;
align - items : center ;
padding - top : 40 px ;
padding - bottom : 40 px ;
background - color : #f5f5f5;
}
. form - signin {
width : 100 % ;
max - width : 420 px ;
padding : 15 px ;
margin : auto ;
}
. form - label - group {
position : relative ;
margin - bottom : 1 rem ;
}
. form - label - group > input ,
. form - label - group > label {
height : 3.125 rem ;
padding : . 75 rem ;
}
. form - label - group > label {
position : absolute ;
top : 0 ;
left : 0 ;
display : block ;
width : 100 % ;
margin - bottom : 0 ; /* Override default `<label>` margin */
line - height : 1.5 ;
color : #495057;
pointer - events : none ;
cursor : text ; /* Match the input under the label */
border : 1 px solid transparent ;
border - radius : . 25 rem ;
transition : all . 1 s ease - in - out ;
}
. form - label - group input ::- webkit - input - placeholder {
color : transparent ;
}
. form - label - group input :- ms - input - placeholder {
color : transparent ;
}
. form - label - group input ::- ms - input - placeholder {
color : transparent ;
}
. form - label - group input ::- moz - placeholder {
color : transparent ;
}
. form - label - group input :: placeholder {
color : transparent ;
}
. form - label - group input : not ( : placeholder - shown ) {
padding - top : 1.25 rem ;
padding - bottom : . 25 rem ;
}
. form - label - group input : not ( : placeholder - shown ) ~ label {
padding - top : . 25 rem ;
padding - bottom : . 25 rem ;
font - size : 12 px ;
color : #777;
}
/* Fallback for Edge
-------------------------------------------------- */
@ supports ( - ms - ime - align : auto ) {
. form - label - group > label {
display : none ;
}
. form - label - group input ::- ms - input - placeholder {
color : #777;
}
}
/* Fallback for IE
-------------------------------------------------- */
@ media all and ( - ms - high - contrast : none ), ( - ms - high - contrast : active ) {
. form - label - group > label {
display : none ;
}
. form - label - group input :- ms - input - placeholder {
color : #777;
}
}
</ style >
< div class = " modal-header " >
< h3 class = " modal-title text-center w-100 " > IFM {{ i18n . login }} </ h3 >
</ div >
< div class = " modal-body " >
< form id = " loginForm " class = " form-signin " method = " post " >
{{ error }}
< div class = " form-label-group " >
< input type = " text " name = " inputLogin " id = " inputLogin " class = " form-control " placeholder = " { { i18n.username}} " required = " " autofocus = " " >
< label for = " inputLogin " > {{ i18n . username }} </ label >
</ div >
< div class = " form-label-group " >
< input type = " password " name = " inputPassword " id = " inputPassword " class = " form-control " placeholder = " { { i18n.password}} " required = " " >
< label for = " inputPassword " > {{ i18n . password }} </ label >
</ div >
< div class = " alert alert-danger d-none " role = " alert " ></ div >
< button id = " buttonLogin " class = " btn btn-lg btn-primary btn-block " type = " submit " > {{ i18n . login }} </ button >
</ form >
</ div >
f00bar ;
$templates [ 'filetable' ] = <<< 'f00bar'
{{ #items}}
< tr class = " clickable-row { { rowclasses}} " {{{ dragdrop }}} data - id = " { { guid}} " data - filename = " { { name}} " data - eaction = " { { eaction}} " >
{{ #fixtop}}
< td data - order = " { { fixtop}} " ></ td >
{{ / fixtop }}
{{ ^ fixtop }}
< td data - order = " 0 " ></ td >
{{ / fixtop }}
< td >
< a href = " { { { link}}} " tabindex = " 0 " id = " { { guid}} " class = " ifmitem " {{{ popover }}} data - type = " { { type}} " >
< span class = " { { icon}} " ></ span >
{{ linkname }}
</ a >
</ td >
{{ #config.download}}
< td >
< a href = " { { download.link}} " >< span class = " { { download.icon}} " ></ span ></ a >
</ td >
{{ / config . download }}
{{ #config.showlastmodified}}
< td data - order = " { { lastmodified}} " > {{ lastmodified_hr }} </ td >
{{ / config . showlastmodified }}
{{ #config.showfilesize}}
< td data - order = " { { size_raw}} " > {{ size }} </ td >
{{ / config . showfilesize }}
{{ #config.showpermissions}}
< td class = " d-none d-md-table-cell " >
< input type = " text " size = " 11 " name = " newpermissions " class = " form-control { { filepermmode}} " value = " { { fileperms}} " data - filename = " { { name}} " {{ readonly }} >
</ td >
{{ / config . showpermissions }}
{{ #config.showowner}}
< td class = " d-none d-lg-table-cell " >
{{ owner }}
</ td >
{{ / config . showowner }}
{{ #config.showgroup}}
< td class = " d-none d-xl-table-cell " >
{{ group }}
</ td >
{{ / config . showgroup }}
< td >
{{ #button}}
< a tabindex = " 0 " name = " do- { { action}} " data - id = " { { guid}} " >
< span class = " { { icon}} " title = " { { title}} " </ span >
</ a >
{{ / button }}
</ td >
</ tr >
{{ / items }}
f00bar ;
$templates [ 'footer' ] = <<< 'f00bar'
< footer class = " footer mt-auto py-3 " >
< div id = " wq_container " class = " container " >
< div class = " row " >
< div class = " col-md-2 mb-1 " >
< a type = " button " class = " btn btn-light btn-block " name = " showAll " > {{ i18n . tasks }} < span class = " badge badge-secondary " name = " taskCount " > 1 </ span ></ a >
</ div >
< div id = " waitqueue " class = " col-md-10 " >
</ div >
</ div >
</ div >
</ footer >
f00bar ;
$templates [ 'task' ] = <<< 'f00bar'
< div id = " { { id}} " class = " card mb-1 " >
< div class = " card-body " >
< div class = " progress " >
< div class = " progress-bar bg- { { type}} progress-bar-striped active " role = " progressbar " aria - valuenow = " 100 " aria - valuemax = " 100 " style = " width:100% " >
{{ name }}
</ div >
</ div >
</ div >
</ div >
f00bar ;
$templates [ 'ajaxrequest' ] = <<< 'f00bar'
< form id = " formAjaxRequest " >
< div class = " modal-body " >
< fieldset >
< div class = " form-group " >
< label for = " ajaxurl " > URL </ label >
< input class = " form-control " type = " url " id = " ajaxurl " required >
</ div >
< div class = " form-group " >
< label for = " ajaxdata " > {{ i18n . data }} </ label >
< textarea class = " form-control " id = " ajaxdata " ></ textarea >
</ div >
< div class = " form-group " >
< legend > {{ i18n . method }} </ legend >
< div class = " form-check form-check-inline " >
< input class = " form-check-input " type = " radio " id = " radioget " name = " arMethod " value = " GET " >
< label class = " form-check-label " for = " radioget " > GET </ label >
</ div >
< div class = " form-check form-check-inline " >
< input class = " form-check-input " type = " radio " id = " radiopost " name = " arMethod " value = " POST " checked = " checked " >
< label class = " form-check-label " for = " radiopost " > POST </ label >
</ div >
</ div >
< button type = " button " class = " btn btn-success " id = " buttonRequest " > {{ i18n . request }} </ button >
< button type = " button " class = " btn btn-danger " id = " buttonClose " > {{ i18n . cancel }} </ button >
< div class = " form-group " >
< label for = " ajaxresponse " > {{ i18n . response }} </ label >
< textarea class = " form-control " id = " ajaxresponse " ></ textarea >
</ div >
</ fieldset >
</ div >
</ form >
f00bar ;
$templates [ 'copymove' ] = <<< 'f00bar'
< form id = " formCopyMove " >
< fieldset >
< div class = " modal-body " >
< div class = " form-group " >
< label for = " copyMoveTree " > {{ i18n . select_destination }} :</ label >
< div id = " copyMoveTree " >< div class = " text-center " >< span class = " icon icon-spin5 animate-spin " ></ span ></ div ></ div >
</ div >
</ div >
< div class = " modal-footer " >
< button type = " button " class = " btn btn-secondary " id = " copyButton " > {{ i18n . copy }} </ button >
< button type = " button " class = " btn btn-secondary " id = " moveButton " > {{ i18n . move }} </ button >
< button type = " button " class = " btn btn-danger " id = " cancelButton " > {{ i18n . cancel }} </ button >
</ div >
</ fieldset >
</ form >
f00bar ;
$templates [ 'createdir' ] = <<< 'f00bar'
< form id = " formCreateDir " >
< div class = " modal-body " >
< fieldset >
< div class = " form-group " >
< label for = " dirname " > {{ i18n . directoryname }} :</ label >
< input class = " form-control " id = " dirname " type = " text " name = " dirname " value = " " />
</ div >
</ fieldset >
</ div >
< div class = " modal-footer " >
< button type = " button " class = " btn btn-success " id = " buttonSave " > {{ i18n . create }} </ button >
< button type = " button " class = " btn btn-danger " id = " buttonCancel " > {{ i18n . cancel }} </ button >
</ div >
</ form >
2021-08-28 16:55:52 +02:00
f00bar ;
2022-12-17 22:20:11 +01:00
$templates [ 'createarchive' ] = <<< 'f00bar'
< form id = " formCreateArchive " >
< div class = " modal-body " >
< fieldset >
< div class = " form-group " >
< label for = " archivename " > {{ i18n . archivename }} :</ label >
< input id = " archivename " class = " form-control " type = " text " name = " archivename " value = " " />
</ div >
</ fieldset >
</ div >
< div class = " modal-footer " >
< button type = " button " class = " btn btn-success " id = " buttonSave " > {{ i18n . save }} </ button >
< button type = " button " class = " btn btn-danger " id = " buttonCancel " > {{ i18n . cancel }} </ button >
</ div >
</ form >
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
f00bar ;
$templates [ 'deletefile' ] = <<< 'f00bar'
< form id = " formDeleteFiles " >
< div class = " modal-body " >
{{ #multiple}}
< label > {{ i18n . file_delete_confirm }} < code > {{ count }} </ code > ? </ label >
{{ / multiple }}
{{ ^ multiple }}
< label > {{ i18n . file_delete_confirm }} < code > {{ filename }} </ code > ? </ label >
{{ / multiple }}
</ div >
< div class = " modal-footer " >
< button type = " button " class = " btn btn-danger " id = " buttonYes " > {{ i18n . delete }} </ button >
< button type = " button " class = " btn btn-secondary " id = " buttonNo " > {{ i18n . cancel }} </ button >
</ div >
</ form >
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
f00bar ;
$templates [ 'extractfile' ] = <<< 'f00bar'
< form id = " formExtractFile " >
< div class = " modal-body " >
< fieldset >
< div class = " form-group " >
< label > {{ i18n . extract_filename }} {{ filename }} :</ label >
< div class = " input-group " >
< div class = " input-group-prepend " >
< div class = " input-group-text " >
< input type = " radio " name = " extractTargetLocation " value = " ./ " checked = " checked " >
</ div >
</ div >
< input class = " form-control " type = " text " placeholder = " Current directory " readonly >
</ div >
< div class = " input-group " >
< div class = " input-group-prepend " >
< div class = " input-group-text " >
< input type = " radio " name = " extractTargetLocation " value = " ./ { { destination}} " >
</ div >
</ div >
< input class = " form-control " type = " text " placeholder = " { { destination}} " readonly >
</ div >
< div class = " input-group " >
< div class = " input-group-prepend " >
< div class = " input-group-text " >
< input type = " radio " name = " extractTargetLocation " value = " custom " >
</ div >
</ div >
< input id = " extractCustomLocation " type = " text " class = " form-control " placeholder = " Custom location " value = " " >
</ div >
</ div >
</ fieldset >
</ div >
< div class = " modal-footer " >
< button type = " button " class = " btn btn-primary " id = " buttonExtract " > {{ i18n . extract }} </ button >
< button type = " button " class = " btn btn-danger " id = " buttonCancel " > {{ i18n . cancel }} </ button >
</ div >
</ form >
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
f00bar ;
$templates [ 'file' ] = <<< 'f00bar'
< form id = " formFile " >
< div class = " modal-body " >
< fieldset >
< div class = " form-group " >
< label for = " filename " > {{ i18n . filename }} :</ label >
< input type = " text " class = " form-control " name = " filename " id = " filename " value = " { { filename}} " >
</ div >
< div class = " form-group " id = " content " name = " content " ></ div >
< button type = " button " class = " btn btn-secondary " id = " editoroptions " > {{ i18n . editor_options }} </ button >
</ fieldset >
</ div >
< div class = " modal-footer " >
< button type = " button " id = " buttonSaveNotClose " class = " btn btn-success " > {{ i18n . save }} </ button >
< button type = " button " id = " buttonClose " class = " btn btn-danger " > {{ i18n . close }} </ button >
</ div >
</ form >
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
f00bar ;
$templates [ 'file_editoroptions' ] = <<< 'f00bar'
< form >
< div class = " form-group " >
< div class = " form-check " >
< input class = " form-check-input " type = " checkbox " id = " editor-wordwrap "
{{ #wordwrap}}
checked = " checked "
{{ / wordwrap }}
>
< label class = " form-check-label " for = " editor-wordwrap " > {{ i18n . word_wrap }} </ label >
</ div >
< div class = " form-check " >
< input class = " form-check-input " type = " checkbox " id = " editor-softtabs "
{{ #softtabs}}
checked = " checked "
{{ / softtabs }}
>
< label class = " form-check-label " for = " editor-softtabs " > {{ i18n . soft_tabs }} </ label >
</ div >
</ div >
< div class = " input-group " >
< div class = " input-group-prepend " >
< span class = " input-group-text " id = " editor-tabsize-label " > {{ i18n . tab_size }} </ span >
</ div >
< input class = " form-control " type = " number " min = " 1 " max = " 9 " maxlength = " 1 " id = " editor-tabsize " title = " { { i18n.tab_size}} " value = " { { tabsize}} " aria - describedby = " editor-tabsize-label " >
</ div >
{{ #ace_includes}}
< select class = " form-control selectpicker " data - toggle = " dropdown " data - live - search = " true " data - size = " 15 " id = " editor-syntax " >
{{ #modes}}
< option value = " ace/mode/ { { .}} " {{{ ace_mode_selected }}} > {{ . }} </ option >
{{ / modes }}
</ select >
{{ / ace_includes }}
</ form >
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
f00bar ;
$templates [ 'remoteupload' ] = <<< 'f00bar'
< form id = " formRemoteUpload " >
< div class = " modal-body " >
< fieldset >
< div class = " form-group " >
< label for = " url " > {{ i18n . upload_remote_url }} </ label >
< input class = " form-control " type = " url " id = " url " name = " url " required >
</ div >
< div class = " form-group " >
< label for = " filename " > {{ i18n . filename }} </ label >
< input class = " form-control " type = " text " id = " filename " name = " filename " required >
</ div >
< div class = " form-group " >
< legend > {{ i18n . method }} </ legend >
< div class = " form-check form-check-inline " >
< input class = " form-check-input " type = " radio " id = " radiocurl " name = " method " value = " curl " checked = " checked " >
< label class = " form-check-label " for = " radiocurl " > cURL </ label >
</ div >
< div class = " form-check form-check-inline " >
< input class = " form-check-input " type = " radio " id = " radiofile " name = " method " value = " file " >
< label class = " form-check-label " for = " radiofile " > file </ label >
</ div >
</ div >
</ fieldset >
</ div >
< div class = " modal-footer " >
< button type = " button " class = " btn btn-primary " id = " buttonUpload " > {{ i18n . upload }} </ button >
< button type = " button " class = " btn btn-danger " id = " buttonCancel " > {{ i18n . cancel }} </ button >
</ div >
</ form >
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
f00bar ;
$templates [ 'renamefile' ] = <<< 'f00bar'
< form id = " formRenameFile " >
< div class = " modal-body " >
< fieldset >
< div class = " form-group " >
< label for = " newname " > {{ i18n . rename_filename }} {{ filename }} :</ label >
< input id = " newname " class = " form-control " type = " text " name = " newname " value = " { { filename}} " />
</ div >
</ fieldset >
</ div >
< div class = " modal-footer " >
< button type = " button " class = " btn btn-secondary " id = " buttonRename " > {{ i18n . file_rename }} </ button >
< button type = " button " class = " btn btn-danger " id = " buttonCancel " > {{ i18n . cancel }} </ button >
</ div >
</ form >
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
f00bar ;
$templates [ 'search' ] = <<< 'f00bar'
< form id = " searchForm " >
< div class = " modal-body " >
< fieldset >
< div class = " form-group " >
< label for = " searchPattern " > {{ i18n . search }} </ label >
< input type = " search " class = " form-control " id = " searchPattern " name = " pattern " autocomplete = " off " value = " { { lastSearch}} " >
</ div >
< table id = " searchResults " class = " table " >
</ table >
</ fieldset >
</ div >
</ form >
f00bar ;
$templates [ 'searchresults' ] = <<< 'f00bar'
{{ #items}}
< tr class = " { { rowclasses}} " data - filename = " { { name}} " >
< td >
< a tabindex = " 0 " id = " { { guid}} " class = " searchitem " {{{ popover }}} data - type = " { { type}} " data - folder = " { { folder}} " >
< span class = " { { icon}} " ></ span > {{ linkname }} < span style = " color:#999 " > ({{ folder }}) </ span >
</ a >
</ td >
</ tr >
{{ / items }}
{{ ^ items }}
< tr >
< td >
No results found .
</ td >
</ tr >
{{ / items }}
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
f00bar ;
$templates [ 'uploadfile' ] = <<< 'f00bar'
< form id = " formUploadFile " >
< div class = " modal-body " >
< fieldset >
< div class = " form-group " >
< div class = " custom-file " >
< label class = " custom-file-label " for = " fileselect " > {{ i18n . upload_file }} </ label >
< input class = " custom-file-input " type = " file " name = " files " id = " fileselect " multiple >
</ div >
</ div >
< div class = " form-group " >
< label for = " filename " > {{ i18n . filename_new }} </ label >
< input class = " form-control " type = " text " name = " newfilename " id = " filename " >
</ div >
</ fieldset >
</ div >
< div class = " modal-footer " >
< button class = " btn btn-primary " id = " buttonUpload " > {{ i18n . upload }} </ button >
< button class = " btn btn-danger " id = " buttonCancel " > {{ i18n . cancel }} </ button >
</ div >
</ form >
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
f00bar ;
$templates [ 'uploadconfirmoverwrite' ] = <<< 'f00bar'
< form id = " formUploadConfirmOverwrite " >
< div class = " modal-body " >
{{ i18n . upload_overwrite_hint }}
< ul >
{{ #files}}
< li > {{ . }} </ li >
{{ / files }}
</ ul >
{{ i18n . upload_overwrite_confirm }}
</ div >
< div class = " modal-footer " >
< button class = " btn btn-primary " id = " buttonConfirm " > {{ i18n . upload }} </ button >
< button class = " btn btn-danger " id = " buttonCancel " > {{ i18n . cancel }} </ button >
</ div >
</ form >
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
f00bar ;
return $templates ;
}
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
private function getFiles ( $dir ) {
$this -> chDirIfNecessary ( $dir );
unset ( $files ); unset ( $dirs ); $files = []; $dirs = [];
if ( $handle = opendir ( " . " )) {
while ( false !== ( $result = readdir ( $handle ))) {
if ( $result == basename ( $_SERVER [ 'SCRIPT_NAME' ]) && getcwd () == $this -> initialWD )
continue ;
elseif (( $result == " .htaccess " || $result == " .htpasswd " ) && $this -> config [ 'showhtdocs' ] != 1 )
continue ;
elseif ( $result == " . " )
continue ;
elseif ( $result != " .. " && substr ( $result , 0 , 1 ) == " . " && $this -> config [ 'showhiddenfiles' ] != 1 )
continue ;
2021-08-28 16:55:52 +02:00
else {
2022-12-17 22:20:11 +01:00
$item = $this -> getItemInformation ( $result );
if ( $item [ 'type' ] == " dir " )
$dirs [] = $item ;
else
$files [] = $item ;
2021-08-28 16:55:52 +02:00
}
}
2022-12-17 22:20:11 +01:00
closedir ( $handle );
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
array_multisort ( array_column ( $dirs , 'name' ), SORT_ASC , SORT_NATURAL | SORT_FLAG_CASE , $dirs );
array_multisort ( array_column ( $files , 'name' ), SORT_ASC , SORT_NATURAL | SORT_FLAG_CASE , $files );
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
return array_merge ( $dirs , $files );
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
private function getItemInformation ( $name ) {
$item = [];
2021-08-28 16:55:52 +02:00
$item [ " name " ] = $name ;
2022-12-17 22:20:11 +01:00
if ( is_dir ( $name )) {
2021-08-28 16:55:52 +02:00
$item [ " type " ] = " dir " ;
2022-12-17 22:20:11 +01:00
if ( $name == " .. " )
2021-08-28 16:55:52 +02:00
$item [ " icon " ] = " icon icon-up-open " ;
2022-12-17 22:20:11 +01:00
else
2021-08-28 16:55:52 +02:00
$item [ " icon " ] = " icon icon-folder-empty " ;
} else {
$item [ " type " ] = " file " ;
2022-12-17 22:20:11 +01:00
if ( in_array ( substr ( $name , - 7 ), [ " .tar.gz " , " .tar.xz " ]))
$type = substr ( $name , - 6 );
elseif ( substr ( $name , - 8 ) == " .tar.bz2 " )
2021-08-28 16:55:52 +02:00
$type = " tar.bz2 " ;
else
2022-12-17 22:20:11 +01:00
$type = substr ( strrchr ( $name , " . " ), 1 );
$item [ " icon " ] = $this -> getTypeIcon ( $type );
2021-08-28 16:55:52 +02:00
$item [ " ext " ] = strtolower ( $type );
2022-12-17 22:20:11 +01:00
if ( ! $this -> config [ 'disable_mime_detection' ])
$item [ " mime_type " ] = mime_content_type ( $name );
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
if ( $this -> config [ 'showlastmodified' ] == 1 )
$item [ " lastmodified " ] = filemtime ( $name );
if ( $this -> config [ 'showfilesize' ] == 1 ) {
if ( $item [ 'type' ] == " dir " ) {
2021-08-28 16:55:52 +02:00
$item [ 'size_raw' ] = 0 ;
$item [ 'size' ] = " " ;
} else {
2022-12-17 22:20:11 +01:00
$item [ " size_raw " ] = filesize ( $name );
if ( $item [ " size_raw " ] > 1073741824 ) $item [ " size " ] = round (( $item [ " size_raw " ] / 1073741824 ), 2 ) . " GB " ;
elseif ( $item [ " size_raw " ] > 1048576 ) $item [ " size " ] = round (( $item [ " size_raw " ] / 1048576 ), 2 ) . " MB " ;
elseif ( $item [ " size_raw " ] > 1024 ) $item [ " size " ] = round (( $item [ " size_raw " ] / 1024 ), 2 ) . " KB " ;
2021-08-28 16:55:52 +02:00
else $item [ " size " ] = $item [ " size_raw " ] . " Byte " ;
}
}
2022-12-17 22:20:11 +01:00
if ( $this -> config [ 'showpermissions' ] > 0 ) {
if ( $this -> config [ 'showpermissions' ] == 1 )
$item [ " fileperms " ] = substr ( decoct ( fileperms ( $name )), - 3 );
elseif ( $this -> config [ 'showpermissions' ] == 2 )
$item [ " fileperms " ] = $this -> filePermsDecode ( fileperms ( $name ));
if ( $item [ " fileperms " ] == " " )
$item [ " fileperms " ] = " " ;
$item [ " filepermmode " ] = ( $this -> config [ 'showpermissions' ] == 1 ) ? " short " : " long " ;
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
if ( $this -> config [ 'showowner' ] == 1 ) {
if ( function_exists ( " posix_getpwuid " ) && fileowner ( $name ) !== false ) {
$ownerarr = posix_getpwuid ( fileowner ( $name ));
2021-08-28 16:55:52 +02:00
$item [ " owner " ] = $ownerarr [ 'name' ];
} else $item [ " owner " ] = false ;
}
2022-12-17 22:20:11 +01:00
if ( $this -> config [ 'showgroup' ] == 1 ) {
if ( function_exists ( " posix_getgrgid " ) && filegroup ( $name ) !== false ) {
$grouparr = posix_getgrgid ( filegroup ( $name ));
2021-08-28 16:55:52 +02:00
$item [ " group " ] = $grouparr [ 'name' ];
} else $item [ " group " ] = false ;
}
return $item ;
}
private function getConfig () {
$ret = $this -> config ;
2022-12-17 22:20:11 +01:00
$ret [ 'inline' ] = ( $this -> mode == " inline " ) ? true : false ;
$ret [ 'isDocroot' ] = ( $this -> getRootDir () == $this -> initialWD );
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
foreach ([ " auth_source " , " root_dir " ] as $field )
2021-08-28 16:55:52 +02:00
unset ( $ret [ $field ]);
2022-12-17 22:20:11 +01:00
return $ret ;
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
private function getFolders ( $d ) {
if ( ! isset ( $d [ 'dir' ]))
2021-08-28 16:55:52 +02:00
$d [ 'dir' ] = $this -> getRootDir ();
2022-12-17 22:20:11 +01:00
if ( ! $this -> isPathValid ( $d [ 'dir' ]))
return [];
2021-08-28 16:55:52 +02:00
else {
2022-12-17 22:20:11 +01:00
$ret = [];
foreach ( glob ( $this -> pathCombine ( $d [ 'dir' ], " * " ), GLOB_ONLYDIR ) as $dir ) {
array_push ( $ret , [
" text " => htmlspecialchars ( basename ( $dir )),
2021-08-28 16:55:52 +02:00
" lazyLoad " => true ,
2022-12-17 22:20:11 +01:00
" dataAttr " => [ " path " => $dir ]
]);
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
sort ( $ret );
if ( realpath ( $d [ 'dir' ]) == $this -> initialWD )
2021-08-28 16:55:52 +02:00
$ret = array_merge (
2022-12-17 22:20:11 +01:00
[
0 => [
2021-08-28 16:55:52 +02:00
" text " => " / [root] " ,
2022-12-17 22:20:11 +01:00
" dataAttr " => [ " path " => $this -> getRootDir ()]
]
],
2021-08-28 16:55:52 +02:00
$ret
);
2022-12-17 22:20:11 +01:00
return $ret ;
2021-08-28 16:55:52 +02:00
}
}
2022-12-17 22:20:11 +01:00
private function searchItems ( $d ) {
if ( $this -> config [ 'search' ] != 1 )
throw new IFMException ( $this -> l ( 'nopermissions' ));
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
if ( strpos ( $d [ 'pattern' ], '/' ) !== false )
throw new IFMException ( $this -> l ( 'pattern_error_slashes' ));
$results = $this -> searchItemsRecursive ( $d [ 'pattern' ]);
return $results ;
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
private function searchItemsRecursive ( $pattern , $dir = " " ) {
$items = [];
$dir = $dir ? ? '.' ;
foreach ( glob ( $this -> pathCombine ( $dir , $pattern )) as $result )
array_push ( $items , $this -> getItemInformation ( $result ));
foreach ( glob ( $this -> pathCombine ( $dir , '*' ), GLOB_ONLYDIR ) as $subdir )
$items = array_merge ( $items , $this -> searchItemsRecursive ( $pattern , $subdir ));
2021-08-28 16:55:52 +02:00
return $items ;
}
2022-12-17 22:20:11 +01:00
private function getFolderTree ( $d ) {
return array_merge (
[
0 => [
" text " => " / [root] " ,
" nodes " => [],
" dataAttributes " => [ " path " => $this -> getRootDir ()]
]
],
$this -> getFolderTreeRecursive ( $d [ 'dir' ])
2021-08-28 16:55:52 +02:00
);
}
2022-12-17 22:20:11 +01:00
private function getFolderTreeRecursive ( $start_dir ) {
$ret = [];
$start_dir = realpath ( $start_dir );
if ( $handle = opendir ( $start_dir )) {
while ( false !== ( $result = readdir ( $handle ))) {
if ( is_dir ( $this -> pathCombine ( $start_dir , $result )) && $result != " . " && $result != " .. " ) {
array_push ( $ret , [
" text " => htmlspecialchars ( $result ),
" dataAttributes " => [ " path " => $this -> pathCombine ( $start_dir , $result )],
" nodes " => $this -> getFolderTreeRecursive ( $this -> pathCombine ( $start_dir , $result ))
]);
2021-08-28 16:55:52 +02:00
}
}
}
2022-12-17 22:20:11 +01:00
sort ( $ret );
2021-08-28 16:55:52 +02:00
return $ret ;
}
2022-12-17 22:20:11 +01:00
private function copyMove ( $d ) {
if ( $this -> config [ 'copymove' ] != 1 )
throw new IFMException ( $this -> l ( 'nopermissions' ));
if ( ! isset ( $d [ 'destination' ]) || ! $this -> isPathValid ( realpath ( $d [ 'destination' ])))
throw new IFMException ( $this -> l ( 'invalid_dir' ));
if ( ! is_array ( $d [ 'filenames' ]))
throw new IFMException ( $this -> l ( 'invalid_params' ));
if ( ! in_array ( $d [ 'action' ], [ 'copy' , 'move' ]))
throw new IFMException ( $this -> l ( 'invalid_action' ));
$err = []; $errFlag = - 1 ; // -1 -> all errors; 0 -> at least some errors; 1 -> no errors
foreach ( $d [ 'filenames' ] as $file ) {
if ( ! file_exists ( $file ) || $file == " .. " || ! $this -> isFilenameValid ( $file )) {
array_push ( $err , $file );
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
if ( $d [ 'action' ] == " copy " ) {
if ( $this -> xcopy ( $file , $d [ 'destination' ]))
2021-08-28 16:55:52 +02:00
$errFlag = 0 ;
else
2022-12-17 22:20:11 +01:00
array_push ( $err , $file );
} elseif ( $d [ 'action' ] == " move " ) {
if ( rename ( $file , $this -> pathCombine ( $d [ 'destination' ], basename ( $file ))))
2021-08-28 16:55:52 +02:00
$errFlag = 0 ;
else
2022-12-17 22:20:11 +01:00
array_push ( $err , $file );
2021-08-28 16:55:52 +02:00
}
}
2022-12-17 22:20:11 +01:00
$action = ( $d [ 'action' ] == " copy " ) ? " copied " : " moved " ;
if ( empty ( $err )) {
return [
" status " => " OK " ,
" message " => ( $d [ 'action' ] == " copy " ? $this -> l ( 'copy_success' ) : $this -> l ( 'move_success' )),
" errflag " => " 1 "
];
} else {
$errmsg = ( $d [ 'action' ] == " copy " ? $this -> l ( 'copy_error' ) : $this -> l ( 'move_error' )) . " <ul> " ;
foreach ( $err as $item )
2021-08-28 16:55:52 +02:00
$errmsg .= " <li> " . $item . " </li> " ;
$errmsg .= " </ul> " ;
2022-12-17 22:20:11 +01:00
throw new IFMException ( $errmsg );
2021-08-28 16:55:52 +02:00
}
}
// creates a directory
2022-12-17 22:20:11 +01:00
private function createDir ( $d ) {
if ( $this -> config [ 'createdir' ] != 1 )
throw new IFMException ( $this -> l ( 'nopermissions' ));
if ( $d [ 'dirname' ] == " " || ! $this -> isFilenameValid ( $d [ 'dirname' ]))
throw new IFMException ( $this -> l ( 'invalid_dir' ));
if ( @ mkdir ( $d [ 'dirname' ]))
return [ " status " => " OK " , " message " => $this -> l ( 'folder_create_success' )];
else
throw new IFMException ( $this -> l ( 'folder_create_error' ) . " . " . error_get_last ()[ 'message' ]);
2021-08-28 16:55:52 +02:00
}
// save a file
2022-12-17 22:20:11 +01:00
private function saveFile ( $d ) {
if (
( file_exists ( $this -> pathCombine ( $d [ 'dir' ], $d [ 'filename' ])) && $this -> config [ 'edit' ] != 1 )
|| ( ! file_exists ( $this -> pathCombine ( $d [ 'dir' ], $d [ 'filename' ])) && $this -> config [ 'createfile' ] != 1 )
)
throw new IFMException ( $this -> l ( 'nopermissions' ));
if ( isset ( $d [ 'filename' ]) && $this -> isFilenameValid ( $d [ 'filename' ])) {
if ( isset ( $d [ 'content' ])) {
2021-08-28 16:55:52 +02:00
// work around magic quotes
2022-12-17 22:20:11 +01:00
if (( function_exists ( " get_magic_quotes_gpc " ) && get_magic_quotes_gpc ())
|| ( ini_get ( 'magic_quotes_sybase' ) && ( strtolower ( ini_get ( 'magic_quotes_sybase' )) != " off " )) ) {
$content = stripslashes ( $d [ 'content' ]);
} else {
$content = $d [ 'content' ];
}
if ( @ file_put_contents ( $d [ 'filename' ], $content ) !== false )
return [ " status " => " OK " , " message " => $this -> l ( 'file_save_success' )];
else
throw new Exception ( $this -> l ( 'file_save_error' ));
2021-08-28 16:55:52 +02:00
} else
2022-12-17 22:20:11 +01:00
throw new IFMException ( $this -> l ( 'file_save_error' ));
2021-08-28 16:55:52 +02:00
} else
2022-12-17 22:20:11 +01:00
throw new IFMException ( $this -> l ( 'invalid_filename' ));
2021-08-28 16:55:52 +02:00
}
// gets the content of a file
// notice: if the content is not JSON encodable it returns an error
2022-12-17 22:20:11 +01:00
private function getContent ( $d ) {
if ( $this -> config [ 'edit' ] != 1 )
throw new IFMException ( $this -> l ( 'nopermissions' ));
if ( isset ( $d [ 'filename' ]) && $this -> isFilenameAllowed ( $d [ 'filename' ]) && file_exists ( $d [ 'filename' ]) && is_readable ( $d [ 'filename' ])) {
$content = @ file_get_contents ( $d [ 'filename' ]);
if ( function_exists ( " mb_check_encoding " ) && ! mb_check_encoding ( $content , " UTF-8 " ))
$content = utf8_encode ( $content );
return [ " status " => " OK " , " data " => [ " filename " => $d [ 'filename' ], " content " => $content ]];
} else
throw new IFMException ( $this -> l ( 'file_not_found' ));
2021-08-28 16:55:52 +02:00
}
// deletes a bunch of files or directories
2022-12-17 22:20:11 +01:00
private function deleteFiles ( $d ) {
if ( $this -> config [ 'delete' ] != 1 )
throw new IFMException ( $this -> l ( 'nopermissions' ));
$err = []; $errFLAG = - 1 ; // -1 -> no files deleted; 0 -> at least some files deleted; 1 -> all files deleted
foreach ( $d [ 'filenames' ] as $file ) {
if ( $this -> isFilenameAllowed ( $file )) {
if ( is_dir ( $file )) {
$res = $this -> rec_rmdir ( $file );
if ( $res != 0 )
array_push ( $err , $file );
else
$errFLAG = 0 ;
2021-08-28 16:55:52 +02:00
} else {
2022-12-17 22:20:11 +01:00
if ( @ unlink ( $file ))
$errFLAG = 0 ;
else
array_push ( $err , $file );
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
} else {
array_push ( $err , $file );
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
}
if ( empty ( $err ))
return [ " status " => " OK " , " message " => $this -> l ( 'file_delete_success' ), " errflag " => " 1 " ];
else {
$errmsg = $this -> l ( 'file_delete_error' ) . " <ul> " ;
foreach ( $err as $item )
$errmsg .= " <li> " . $item . " </li> " ;
$errmsg .= " </ul> " ;
throw new IFMException ( $errmsg );
2021-08-28 16:55:52 +02:00
}
}
// renames a file
2022-12-17 22:20:11 +01:00
private function renameFile ( array $d ) {
if ( $this -> config [ 'rename' ] != 1 )
throw new IFMException ( $this -> l ( 'nopermissions' ));
elseif ( ! $this -> isFilenameValid ( $d [ 'filename' ]) || ! $this -> isFilenameValid ( $d [ 'newname' ]))
throw new IFMException ( $this -> l ( 'invalid_filename' ));
if ( @ rename ( $d [ 'filename' ], $d [ 'newname' ]))
return [ " status " => " OK " , " message " => $this -> l ( 'file_rename_success' )];
else
throw new IFMException ( $this -> l ( 'file_rename_error' ));
2021-08-28 16:55:52 +02:00
}
// provides a file for downloading
2022-12-17 22:20:11 +01:00
private function downloadFile ( array $d , $forceDL = true ) {
if ( $this -> config [ 'download' ] != 1 )
throw new IFMException ( $this -> l ( 'nopermissions' ));
if ( ! $this -> isFilenameValid ( $d [ 'filename' ]))
throw new IFMException ( $this -> l ( 'invalid_filename' ));
if ( ! is_file ( $d [ 'filename' ]))
http_response_code ( 404 );
else
$this -> fileDownload ([ " file " => $d [ 'filename' ], " forceDL " => $forceDL ]);
2021-08-28 16:55:52 +02:00
}
// extracts a zip-archive
2022-12-17 22:20:11 +01:00
private function extractFile ( array $d ) {
2021-08-28 16:55:52 +02:00
$restoreIFM = false ;
$tmpSelfContent = null ;
$tmpSelfChecksum = null ;
2022-12-17 22:20:11 +01:00
if ( $this -> config [ 'extract' ] != 1 )
throw new IFMException ( $this -> l ( 'nopermissions' ));
if ( ! file_exists ( $d [ 'filename' ]))
throw new IFMException ( $this -> l ( 'invalid_filename' ));
if ( ! isset ( $d [ 'targetdir' ]) || trim ( $d [ 'targetdir' ]) == " " )
$d [ 'targetdir' ] = " ./ " ;
if ( ! $this -> isPathValid ( $d [ 'targetdir' ]))
throw new IFMException ( $this -> l ( 'invalid_dir' ));
if ( ! is_dir ( $d [ 'targetdir' ]) && ! mkdir ( $d [ 'targetdir' ], 0777 , true ))
throw new IFMException ( $this -> l ( 'folder_create_error' ));
if ( realpath ( $d [ 'targetdir' ]) == substr ( $this -> initialWD , 0 , strlen ( realpath ( $d [ 'targetdir' ])))) {
$tmpSelfContent = tmpfile ();
fwrite ( $tmpSelfContent , file_get_contents ( __FILE__ ));
$tmpSelfChecksum = hash_file ( " sha256 " , __FILE__ );
$restoreIFM = true ;
}
if ( strtolower ( pathinfo ( $d [ 'filename' ], PATHINFO_EXTENSION ) == " zip " )) {
if ( ! IFMArchive :: extractZip ( $d [ 'filename' ], $d [ 'targetdir' ]))
throw new IFMException ( $this -> l ( 'extract_error' ));
else
return [ " status " => " OK " , " message " => $this -> l ( 'extract_success' )];
} elseif (
( strtolower ( pathinfo ( $d [ 'filename' ], PATHINFO_EXTENSION )) == " tar " )
|| ( strtolower ( pathinfo ( pathinfo ( $d [ 'filename' ], PATHINFO_FILENAME ), PATHINFO_EXTENSION )) == " tar " )
) {
if ( ! IFMArchive :: extractTar ( $d [ 'filename' ], $d [ 'targetdir' ]))
throw new IFMException ( $this -> l ( 'extract_error' ));
else
return [ " status " => " OK " , " message " => $this -> l ( 'extract_success' )];
} else {
throw new IFMException ( $this -> l ( 'archive_invalid_format' ));
}
if ( $restoreIFM ) {
if ( $tmpSelfChecksum != hash_file ( " sha256 " , __FILE__ )) {
rewind ( $tmpSelfContent );
$fh = fopen ( __FILE__ , " w " );
while ( ! feof ( $tmpSelfContent ))
fwrite ( $fh , fread ( $tmpSelfContent , 8196 ));
fclose ( $fh );
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
fclose ( $tmpSelfContent );
2021-08-28 16:55:52 +02:00
}
}
// uploads a file
2022-12-17 22:20:11 +01:00
private function uploadFile ( array $d ) {
if ( $this -> config [ 'upload' ] != 1 )
throw new IFMException ( $this -> l ( 'nopermissions' ));
if ( ! isset ( $_FILES [ 'file' ]))
throw new IFMException ( $this -> l ( 'file_upload_error' ));
$newfilename = ( isset ( $d [ " newfilename " ]) && $d [ " newfilename " ] != " " ) ? $d [ " newfilename " ] : $_FILES [ 'file' ][ 'name' ];
if ( ! $this -> isFilenameValid ( $newfilename ))
throw new IFMException ( $this -> l ( 'invalid_filename' ));
if ( $_FILES [ 'file' ][ 'tmp_name' ]) {
if ( is_writable ( getcwd ())) {
if ( move_uploaded_file ( $_FILES [ 'file' ][ 'tmp_name' ], $newfilename ))
return [ " status " => " OK " , " message " => $this -> l ( 'file_upload_success' ), " cd " => $d [ 'dir' ]];
else
throw new IFMException ( $this -> l ( 'file_upload_error' ));
} else
throw new IFMException ( $this -> l ( 'file_upload_error' ));
} else
throw new IFMException ( $this -> l ( 'file_not_found' ));
2021-08-28 16:55:52 +02:00
}
// change permissions of a file
2022-12-17 22:20:11 +01:00
private function changePermissions ( array $d ) {
if ( $this -> config [ 'chmod' ] != 1 )
throw new IFMException ( $this -> l ( 'nopermissions' ));
if ( ! isset ( $d [ " chmod " ]) || $d [ 'chmod' ] == " " )
throw new IFMException ( $this -> l ( 'permission_parse_error' ));
if ( ! $this -> isPathValid ( $this -> pathCombine ( $d [ 'dir' ], $d [ 'filename' ])))
throw new IFMException ( $this -> l ( 'nopermissions' ));
$chmod = $d [ " chmod " ]; $cmi = true ;
if ( ! is_numeric ( $chmod )) {
$cmi = false ;
$chmod = str_replace ( " " , " " , $chmod );
if ( strlen ( $chmod ) == 9 ) {
$cmi = true ;
$arr = [ substr ( $chmod , 0 , 3 ), substr ( $chmod , 3 , 3 ), substr ( $chmod , 6 , 3 )];
$chtmp = " 0 " ;
foreach ( $arr as $right ) {
$rtmp = 0 ;
if ( substr ( $right , 0 , 1 ) == " r " ) $rtmp = $rtmp + 4 ; elseif ( substr ( $right , 0 , 1 ) <> " - " ) $cmi = false ;
if ( substr ( $right , 1 , 1 ) == " w " ) $rtmp = $rtmp + 2 ; elseif ( substr ( $right , 1 , 1 ) <> " - " ) $cmi = false ;
if ( substr ( $right , 2 , 1 ) == " x " ) $rtmp = $rtmp + 1 ; elseif ( substr ( $right , 2 , 1 ) <> " - " ) $cmi = false ;
$chtmp = $chtmp . $rtmp ;
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
$chmod = intval ( $chtmp );
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
} else
$chmod = " 0 " . $chmod ;
if ( $cmi ) {
try {
chmod ( $d [ " filename " ], ( int ) octdec ( $chmod ));
return [ " status " => " OK " , " message " => $this -> l ( 'permission_change_success' )];
} catch ( Exception $e ) {
throw new IFMException ( $this -> l ( 'permission_change_error' ));
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
} else
throw new IFMException ( $this -> l ( 'permission_parse_error' ));
2021-08-28 16:55:52 +02:00
}
// zips a directory and provides it for downloading
// it creates a temporary zip file in the current directory, so it has to be as much space free as the file size is
2022-12-17 22:20:11 +01:00
private function zipnload ( array $d ) {
if ( $this -> config [ 'zipnload' ] != 1 )
throw new IFMException ( $this -> l ( 'nopermission' ));
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
if ( ! file_exists ( $d [ 'filename' ]))
throw new IFMException ( $this -> l ( 'folder_not_found' ));
if ( ! $this -> isPathValid ( $d [ 'filename' ]))
throw new IFMException ( $this -> l ( 'invalid_dir' ));
if ( $d [ 'filename' ] != " . " && ! $this -> isFilenameValid ( $d [ 'filename' ]))
throw new IFMException ( $this -> l ( 'invalid_filename' ));
unset ( $zip );
if ( $this -> isAbsolutePath ( $this -> config [ 'tmp_dir' ]))
$dfile = $this -> pathCombine ( $this -> config [ 'tmp_dir' ], uniqid ( " ifm-tmp- " ) . " .zip " ); // temporary filename
else
$dfile = $this -> pathCombine ( $this -> initialWD , $this -> config [ 'tmp_dir' ], uniqid ( " ifm-tmp- " ) . " .zip " ); // temporary filename
try {
IFMArchive :: createZip ( realpath ( $d [ 'filename' ]), $dfile , [ $this , 'isFilenameValid' ]);
if ( $d [ 'filename' ] == " . " ) {
if ( getcwd () == $this -> getRootDir ())
$d [ 'filename' ] = " root " ;
else
$d [ 'filename' ] = basename ( getcwd ());
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
$this -> fileDownload ([ " file " => $dfile , " name " => $d [ 'filename' ] . " .zip " , " forceDL " => true ]);
} catch ( Exception $e ) {
throw new IFMException ( $this -> l ( 'error' ) . " " . $e -> getMessage ());
} finally {
if ( file_exists ( $dfile ))
@ unlink ( $dfile );
2021-08-28 16:55:52 +02:00
}
}
// uploads a file from an other server using the curl extention
2022-12-17 22:20:11 +01:00
private function remoteUpload ( array $d ) {
if ( $this -> config [ 'remoteupload' ] != 1 )
throw new IFMException ( $this -> l ( 'nopermissions' ));
if ( ! isset ( $d [ 'method' ]) || ! in_array ( $d [ 'method' ], [ " curl " , " file " ]))
throw new IFMException ( $this -> l ( 'invalid_params' ));
if ( $d [ 'method' ] == " curl " && $this -> checkCurl () == false )
throw new IFMException ( $this -> l ( 'error' ) . " cURL extention not installed. " );
if ( $d [ 'method' ] == " curl " && $this -> checkCurl () == true ) {
$filename = ( isset ( $d [ 'filename' ]) && $d [ 'filename' ] != " " ) ? $d [ 'filename' ] : " curl_ " . uniqid ();
$ch = curl_init ();
if ( $ch ) {
if ( $this -> isFilenameValid ( $filename ) == false )
throw new IFMException ( $this -> l ( 'invalid_filename' ));
elseif ( filter_var ( $d [ 'url' ], FILTER_VALIDATE_URL ) === false )
throw new IFMException ( $this -> l ( 'invalid_url' ));
2021-08-28 16:55:52 +02:00
else {
2022-12-17 22:20:11 +01:00
$fp = fopen ( $filename , " w " );
if ( $fp ) {
if (
! curl_setopt ( $ch , CURLOPT_URL , urldecode ( $d [ 'url' ]))
|| ! curl_setopt ( $ch , CURLOPT_FILE , $fp )
|| ! curl_setopt ( $ch , CURLOPT_HEADER , 0 )
|| ! curl_exec ( $ch )
)
throw new IFMException ( $this -> l ( 'error' ) . " " . curl_error ( $ch ));
else
return [ " status " => " OK " , " message " => $this -> l ( 'file_upload_success' )];
curl_close ( $ch );
fclose ( $fp );
} else
throw new IFMException ( $this -> l ( 'file_open_error' ));
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
} else
throw new IFMException ( $this -> l ( 'error' ) . " curl init " );
} elseif ( $d [ 'method' ] == 'file' ) {
$filename = ( isset ( $d [ 'filename' ]) && $d [ 'filename' ] != " " ) ? $d [ 'filename' ] : " curl_ " . uniqid ();
if ( $this -> isFilenameValid ( $filename ) == false )
throw new IFMException ( $this -> l ( 'invalid_filename' ));
2021-08-28 16:55:52 +02:00
else {
try {
2022-12-17 22:20:11 +01:00
file_put_contents ( $filename , file_get_contents ( $d [ 'url' ]));
return [ " status " => " OK " , " message " => $this -> l ( 'file_upload_success' )];
} catch ( Exception $e ) {
throw new IFMException ( $this -> l ( 'error' ) . " " . $e -> getMessage ());
2021-08-28 16:55:52 +02:00
}
}
2022-12-17 22:20:11 +01:00
} else
throw new IFMException ( $this -> l ( 'invalid_params' ));
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
private function createArchive ( $d ) {
if ( $this -> config [ 'createarchive' ] != 1 )
throw new IFMException ( $this -> l ( 'nopermissions' ));
if ( ! $this -> isFilenameValid ( $d [ 'archivename' ]))
throw new IFMException ( $this -> l ( 'invalid_filename' ));
$filenames = [];
foreach ( $d [ 'filenames' ] as $file )
if ( ! $this -> isFilenameValid ( $file ))
throw new IFMException ( $this -> l ( 'invalid_filename' ));
else
array_push ( $filenames , realpath ( $file ));
switch ( $d [ 'format' ]) {
2021-08-28 16:55:52 +02:00
case " zip " :
2022-12-17 22:20:11 +01:00
if ( IFMArchive :: createZip ( $filenames , $d [ 'archivename' ]))
return [ " status " => " OK " , " message " => $this -> l ( 'archive_create_success' )];
2021-08-28 16:55:52 +02:00
else
2022-12-17 22:20:11 +01:00
throw new IFMException ( $this -> l ( 'archive_create_error' ));
2021-08-28 16:55:52 +02:00
break ;
case " tar " :
2022-12-17 22:20:11 +01:00
$d [ 'archivename' ] = pathinfo ( $d [ 'archivename' ], PATHINFO_FILENAME );
if ( IFMArchive :: createTar ( $filenames , $d [ 'archivename' ], $d [ 'format' ]))
return [ " status " => " OK " , " message " => $this -> l ( 'archive_create_success' )];
else
throw new IFMException ( $this -> l ( 'archive_create_error' ));
break ;
2021-08-28 16:55:52 +02:00
case " tar.gz " :
case " tar.bz2 " :
2022-12-17 22:20:11 +01:00
$d [ 'archivename' ] = pathinfo ( pathinfo ( $d [ 'archivename' ], PATHINFO_FILENAME ), PATHINFO_FILENAME );
if ( IFMArchive :: createTar ( $filenames , $d [ 'archivename' ], $d [ 'format' ]))
return [ " status " => " OK " , " message " => $this -> l ( 'archive_create_success' )];
2021-08-28 16:55:52 +02:00
else
2022-12-17 22:20:11 +01:00
throw new IFMException ( $this -> l ( 'archive_create_error' ));
2021-08-28 16:55:52 +02:00
break ;
default :
2022-12-17 22:20:11 +01:00
throw new IFMException ( $this -> l ( 'archive_invalid_format' ));
2021-08-28 16:55:52 +02:00
break ;
}
}
/*
help functions
*/
2022-12-17 22:20:11 +01:00
private function l ( $str ) {
if ( isset ( $_REQUEST [ 'lang' ])
&& in_array ( $_REQUEST [ 'lang' ], array_keys ( $this -> i18n ))
&& isset ( $this -> i18n [ $_REQUEST [ 'lang' ]][ $str ]))
return $this -> i18n [ $_REQUEST [ 'lang' ]][ $str ];
else
return $this -> i18n [ 'en' ][ $str ];
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
private function log ( $d ) {
file_put_contents ( $this -> pathCombine ( $this -> getRootDir (), " debug.ifm.log " ), ( is_array ( $d ) ? print_r ( $d , true ) . " \n " : $d . " \n " ), FILE_APPEND );
}
private function jsonResponse ( $array ) {
$this -> convertToUTF8 ( $array );
$json = json_encode ( $array );
if ( $json === false ) {
switch ( json_last_error ()) {
case JSON_ERROR_NONE :
echo ' - No errors' ;
break ;
case JSON_ERROR_DEPTH :
echo ' - Maximum stack depth exceeded' ;
break ;
case JSON_ERROR_STATE_MISMATCH :
echo ' - Underflow or the modes mismatch' ;
break ;
case JSON_ERROR_CTRL_CHAR :
echo ' - Unexpected control character found' ;
break ;
case JSON_ERROR_SYNTAX :
echo ' - Syntax error, malformed JSON' ;
break ;
case JSON_ERROR_UTF8 :
echo ' - Malformed UTF-8 characters, possibly incorrectly encoded' ;
break ;
default :
echo ' - Unknown error' ;
break ;
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
throw new IFMException ( $this -> l ( 'json_encode_error' ) . " " . $err );
} else
2021-08-28 16:55:52 +02:00
echo $json ;
}
2022-12-17 22:20:11 +01:00
private function convertToUTF8 ( & $item ) {
if ( is_array ( $item ))
array_walk ( $item , [ $this , 'convertToUTF8' ]);
2021-08-28 16:55:52 +02:00
else
2022-12-17 22:20:11 +01:00
if ( function_exists ( " mb_check_encoding " ) && ! mb_check_encoding ( $item , " UTF-8 " ))
$item = utf8_encode ( $item );
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
private function checkAuth () {
if ( $this -> config [ 'auth' ] == 0 )
2021-08-28 16:55:52 +02:00
return true ;
2022-12-17 22:20:11 +01:00
$credentials_header = $_SERVER [ 'HTTP_X_IFM_AUTH' ] ? ? $_SERVER [ 'HTTP_AUTHORIZATION' ] ? ? false ;
if ( $credentials_header && ! $this -> config [ 'auth_ignore_basic' ]) {
$cred = explode ( " : " , base64_decode ( str_replace ( " Basic " , " " , $credentials_header )), 2 );
if ( count ( $cred ) == 2 && $this -> checkCredentials ( $cred [ 0 ], $cred [ 1 ]))
2021-08-28 16:55:52 +02:00
return true ;
}
2022-12-17 22:20:11 +01:00
if ( session_status () !== PHP_SESSION_ACTIVE ) {
2021-08-28 16:55:52 +02:00
session_start ();
}
2022-12-17 22:20:11 +01:00
if ( isset ( $_SESSION [ 'ifmauth' ]) && $_SESSION [ 'ifmauth' ] == true )
return true ;
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
$login_failed = false ;
if ( isset ( $_POST [ " inputLogin " ]) && isset ( $_POST [ " inputPassword " ])) {
if ( $this -> checkCredentials ( $_POST [ " inputLogin " ], $_POST [ " inputPassword " ])) {
$_SESSION [ 'ifmauth' ] = true ;
2021-08-28 16:55:52 +02:00
} else {
2022-12-17 22:20:11 +01:00
$_SESSION [ 'ifmauth' ] = false ;
$login_failed = true ;
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
}
if ( isset ( $_SESSION [ 'ifmauth' ]) && $_SESSION [ 'ifmauth' ] === true )
2021-08-28 16:55:52 +02:00
return true ;
2022-12-17 22:20:11 +01:00
else {
if ( $login_failed === true )
throw new IFMException ( " Authentication failed: Wrong credentials " , true );
else
throw new IFMException ( " Not authenticated " , true );
2021-08-28 16:55:52 +02:00
}
}
2022-12-17 22:20:11 +01:00
private function checkCredentials ( $user , $pass ) {
list ( $src , $srcopt ) = explode ( " ; " , $this -> config [ 'auth_source' ], 2 );
switch ( $src ) {
2021-08-28 16:55:52 +02:00
case " inline " :
2022-12-17 22:20:11 +01:00
list ( $uname , $hash ) = explode ( " : " , $srcopt );
2021-08-28 16:55:52 +02:00
$htpasswd = new Htpasswd ();
2022-12-17 22:20:11 +01:00
return $htpasswd -> verifyPassword ( $pass , $hash ) ? ( $uname == $user ) : false ;
2021-08-28 16:55:52 +02:00
break ;
case " file " :
2022-12-17 22:20:11 +01:00
if ( @ file_exists ( $srcopt ) && @ is_readable ( $srcopt )) {
$htpasswd = new Htpasswd ( $srcopt );
return $htpasswd -> verify ( $user , $pass );
2021-08-28 16:55:52 +02:00
} else {
2022-12-17 22:20:11 +01:00
trigger_error ( " IFM: Fatal: Credential file does not exist or is not readable " );
2021-08-28 16:55:52 +02:00
return false ;
}
break ;
case " ldap " :
$authenticated = false ;
2022-12-17 22:20:11 +01:00
$ldapopts = explode ( " ; " , $srcopt );
if ( count ( $ldapopts ) === 4 ) {
list ( $ldap_server , $basedn , $uuid , $ufilter ) = explode ( " ; " , $srcopt );
2021-08-28 16:55:52 +02:00
} else {
2022-12-17 22:20:11 +01:00
list ( $ldap_server , $basedn ) = explode ( " ; " , $srcopt );
2021-08-28 16:55:52 +02:00
$ufilter = false ;
2022-12-17 22:20:11 +01:00
$uuid = " uid " ;
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
$u = $uuid . " = " . $user . " , " . $basedn ;
if ( ! $ds = ldap_connect ( $ldap_server )) {
throw new IFMException ( " Could not reach the ldap server. " , true );
//trigger_error("Could not reach the ldap server.", E_USER_ERROR);
2021-08-28 16:55:52 +02:00
return false ;
}
2022-12-17 22:20:11 +01:00
ldap_set_option ( $ds , LDAP_OPT_PROTOCOL_VERSION , 3 );
if ( $ds ) {
$ldbind = @ ldap_bind ( $ds , $u , $pass );
if ( $ldbind ) {
if ( $ufilter ) {
if ( ldap_count_entries ( $ds , ldap_search ( $ds , $u , $ufilter )) == 1 ) {
2021-08-28 16:55:52 +02:00
$authenticated = true ;
} else {
2022-12-17 22:20:11 +01:00
throw new IFMException ( " User not allowed. " , true );
//trigger_error("User not allowed.", E_USER_ERROR);
2021-08-28 16:55:52 +02:00
$authenticated = false ;
}
2022-12-17 22:20:11 +01:00
} else
2021-08-28 16:55:52 +02:00
$authenticated = true ;
} else {
2022-12-17 22:20:11 +01:00
throw new IFMException ( ldap_error ( $ds ) , true );
//trigger_error(ldap_error($ds), E_USER_ERROR);
2021-08-28 16:55:52 +02:00
$authenticated = false ;
}
2022-12-17 22:20:11 +01:00
ldap_unbind ( $ds );
2021-08-28 16:55:52 +02:00
} else
$authenticated = false ;
return $authenticated ;
break ;
}
return false ;
}
2022-12-17 22:20:11 +01:00
private function filePermsDecode ( $perms ) {
$oct = str_split ( strrev ( decoct ( $perms )), 1 );
$masks = [ '---' , '--x' , '-w-' , '-wx' , 'r--' , 'r-x' , 'rw-' , 'rwx' ];
2021-08-28 16:55:52 +02:00
return (
sprintf (
'%s %s %s' ,
2022-12-17 22:20:11 +01:00
array_key_exists ( $oct [ 2 ], $masks ) ? $masks [ $oct [ 2 ]] : '###' ,
array_key_exists ( $oct [ 1 ], $masks ) ? $masks [ $oct [ 1 ]] : '###' ,
array_key_exists ( $oct [ 0 ], $masks ) ? $masks [ $oct [ 0 ]] : '###' )
2021-08-28 16:55:52 +02:00
);
}
2022-12-17 22:20:11 +01:00
private function isAbsolutePath ( $path ) {
if ( $path === null || $path === '' )
2021-08-28 16:55:52 +02:00
return false ;
2022-12-17 22:20:11 +01:00
return $path [ 0 ] === DIRECTORY_SEPARATOR || preg_match ( '~^[A-Z]:(?![^/\\\\])~i' , $path ) > 0 ;
2021-08-28 16:55:52 +02:00
}
private function getRootDir () {
2022-12-17 22:20:11 +01:00
if ( $this -> config [ 'root_dir' ] == " " )
return $this -> initialWD ;
elseif ( $this -> isAbsolutePath ( $this -> config [ 'root_dir' ]))
return realpath ( $this -> config [ 'root_dir' ]);
2021-08-28 16:55:52 +02:00
else
2022-12-17 22:20:11 +01:00
return realpath ( $this -> pathCombine ( $this -> initialWD , $this -> config [ 'root_dir' ]));
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
private function getValidDir ( $dir ) {
if ( ! $this -> isPathValid ( $dir ) || ! is_dir ( $dir ))
2021-08-28 16:55:52 +02:00
return " " ;
else {
2022-12-17 22:20:11 +01:00
$rpDir = realpath ( $dir );
2021-08-28 16:55:52 +02:00
$rpConfig = $this -> getRootDir ();
2022-12-17 22:20:11 +01:00
if ( $rpConfig == " / " )
2021-08-28 16:55:52 +02:00
return $rpDir ;
2022-12-17 22:20:11 +01:00
elseif ( $rpDir == $rpConfig )
2021-08-28 16:55:52 +02:00
return " " ;
else {
2022-12-17 22:20:11 +01:00
$part = substr ( $rpDir , strlen ( $rpConfig ));
$part = ( in_array ( substr ( $part , 0 , 1 ), [ " / " , " \\ " ])) ? substr ( $part , 1 ) : $part ;
2021-08-28 16:55:52 +02:00
return $part ;
}
}
}
2022-12-17 22:20:11 +01:00
private function isPathValid ( $dir ) {
2021-08-28 16:55:52 +02:00
/**
* This function is also used to check non - existent paths , but the PHP realpath function returns false for
* nonexistent paths . Hence we need to check the path manually in the following lines .
*/
$tmp_d = $dir ;
2022-12-17 22:20:11 +01:00
$tmp_missing_parts = [];
while ( realpath ( $tmp_d ) === false ) {
$tmp_i = pathinfo ( $tmp_d , PATHINFO_FILENAME );
array_push ( $tmp_missing_parts , $tmp_i );
$tmp_d = dirname ( $tmp_d );
if ( $tmp_d == dirname ( $tmp_d ))
break ;
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
$rpDir = $this -> pathCombine ( realpath ( $tmp_d ), implode ( " / " , array_reverse ( $tmp_missing_parts )));
2021-08-28 16:55:52 +02:00
$rpConfig = $this -> getRootDir ();
2022-12-17 22:20:11 +01:00
if ( ! is_string ( $rpDir ) || ! is_string ( $rpConfig )) // can happen if open_basedir is in effect
2021-08-28 16:55:52 +02:00
return false ;
2022-12-17 22:20:11 +01:00
elseif ( $rpDir == $rpConfig )
2021-08-28 16:55:52 +02:00
return true ;
2022-12-17 22:20:11 +01:00
elseif ( ! file_exists ( $rpDir ))
return false ;
elseif ( 0 === strpos ( $rpDir , $rpConfig ))
2021-08-28 16:55:52 +02:00
return true ;
else
return false ;
}
private function chDirIfNecessary ( $d ) {
2022-12-17 22:20:11 +01:00
if ( substr ( getcwd (), strlen ( $this -> getRootDir ())) != $this -> getValidDir ( $d ) && ! empty ( $d ))
chdir ( $d );
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
private function getTypeIcon ( $type ) {
2021-08-28 16:55:52 +02:00
$type = strtolower ( $type );
2022-12-17 22:20:11 +01:00
switch ( $type ) {
2021-08-28 16:55:52 +02:00
case " aac " : case " aiff " : case " mid " : case " mp3 " : case " wav " : return 'icon icon-file-audio' ; break ;
2022-12-17 22:20:11 +01:00
case " ai " : case " bmp " : case " eps " : case " tiff " : case " gif " : case " jpg " : case " jpeg " : case " png " : case " psd " : case " svg " : case " webp " : return 'icon icon-file-image' ; break ;
2021-08-28 16:55:52 +02:00
case " avi " : case " flv " : case " mp4 " : case " mpg " : case " mkv " : case " mpeg " : case " webm " : case " wmv " : case " mov " : return 'icon icon-file-video' ; break ;
case " c " : case " cpp " : case " css " : case " dat " : case " h " : case " html " : case " java " : case " js " : case " php " : case " py " : case " sql " : case " xml " : case " yml " : case " json " : return 'icon icon-file-code' ; break ;
case " doc " : case " docx " : case " odf " : case " odt " : case " rtf " : return 'icon icon-file-word' ; break ;
case " txt " : case " log " : return 'icon icon-doc-text' ; break ;
case " ods " : case " xls " : case " xlsx " : return 'icon icon-file-excel' ; break ;
case " odp " : case " ppt " : case " pptx " : return 'icon icon-file-powerpoint' ; break ;
case " pdf " : return 'icon icon-file-pdf' ; break ;
case " tgz " : case " zip " : case " tar " : case " tgz " : case " tar.gz " : case " tar.xz " : case " tar.bz2 " : case " 7z " : case " rar " : return 'icon icon-file-archive' ;
default : return 'icon icon-doc' ;
}
}
2022-12-17 22:20:11 +01:00
private function rec_rmdir ( $path ) {
if ( ! is_dir ( $path ))
2021-08-28 16:55:52 +02:00
return - 1 ;
2022-12-17 22:20:11 +01:00
$dir = @ opendir ( $path );
if ( ! $dir )
2021-08-28 16:55:52 +02:00
return - 2 ;
2022-12-17 22:20:11 +01:00
while (( $entry = @ readdir ( $dir )) !== false ) {
if ( $entry == '.' || $entry == '..' ) continue ;
if ( is_dir ( $path . '/' . $entry )) {
$res = $this -> rec_rmdir ( $path . '/' . $entry );
if ( $res == - 1 ) {
@ closedir ( $dir );
return - 2 ;
} else if ( $res == - 2 ) {
@ closedir ( $dir );
return - 2 ;
} else if ( $res == - 3 ) {
@ closedir ( $dir );
return - 3 ;
} else if ( $res != 0 ) {
@ closedir ( $dir );
return - 2 ;
}
} else if ( is_file ( $path . '/' . $entry ) || is_link ( $path . '/' . $entry )) {
$res = @ unlink ( $path . '/' . $entry );
if ( ! $res ) {
@ closedir ( $dir );
return - 2 ;
}
} else {
@ closedir ( $dir );
return - 3 ;
}
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
@ closedir ( $dir );
$res = @ rmdir ( $path );
if ( ! $res )
return - 2 ;
2021-08-28 16:55:52 +02:00
return 0 ;
}
2022-12-17 22:20:11 +01:00
private function xcopy ( $source , $dest ) {
$isDir = is_dir ( $source );
if ( $isDir )
$dest = $this -> pathCombine ( $dest , basename ( $source ));
if ( ! is_dir ( $dest ))
2021-08-28 16:55:52 +02:00
mkdir ( $dest , 0777 , true );
2022-12-17 22:20:11 +01:00
if ( is_file ( $source ))
return copy ( $source , $this -> pathCombine ( $dest , basename ( $source )));
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
chdir ( $source );
foreach ( glob ( '*' ) as $item )
$this -> xcopy ( $item , $dest );
chdir ( '..' );
2021-08-28 16:55:52 +02:00
return true ;
}
// combines two parts to a valid path
private function pathCombine ( ... $parts ) {
$ret = " " ;
2022-12-17 22:20:11 +01:00
foreach ( $parts as $part )
2021-08-28 16:55:52 +02:00
if ( trim ( $part ) != " " )
2022-12-17 22:20:11 +01:00
$ret .= ( empty ( $ret ) ? rtrim ( $part , " / " ) : trim ( $part , '/' )) . " / " ;
2021-08-28 16:55:52 +02:00
return rtrim ( $ret , " / " );
}
// check if filename is allowed
2022-12-17 22:20:11 +01:00
public function isFilenameValid ( $f ) {
if ( ! $this -> isFilenameAllowed ( $f ))
2021-08-28 16:55:52 +02:00
return false ;
2022-12-17 22:20:11 +01:00
if ( strtoupper ( substr ( PHP_OS , 0 , 3 )) == " WIN " ) {
2021-08-28 16:55:52 +02:00
// windows-specific limitations
2022-12-17 22:20:11 +01:00
foreach ([ '\\' , '/' , ':' , '*' , '?' , '"' , '<' , '>' , '|' ] as $char )
if ( strpos ( $f , $char ) !== false )
2021-08-28 16:55:52 +02:00
return false ;
} else {
// *nix-specific limitations
2022-12-17 22:20:11 +01:00
foreach ([ '/' , '\0' ] as $char )
if ( strpos ( $f , $char ) !== false )
2021-08-28 16:55:52 +02:00
return false ;
}
2022-12-17 22:20:11 +01:00
2021-08-28 16:55:52 +02:00
// custom limitations
2022-12-17 22:20:11 +01:00
foreach ( $this -> config [ 'forbiddenChars' ] as $char )
if ( strpos ( $f , $char ) !== false )
2021-08-28 16:55:52 +02:00
return false ;
return true ;
}
2022-12-17 22:20:11 +01:00
private function isFilenameAllowed ( $f ) {
if ( $this -> config [ 'showhtdocs' ] != 1 && substr ( $f , 0 , 3 ) == " .ht " )
2021-08-28 16:55:52 +02:00
return false ;
2022-12-17 22:20:11 +01:00
elseif ( $this -> config [ 'showhiddenfiles' ] != 1 && substr ( $f , 0 , 1 ) == " . " )
2021-08-28 16:55:52 +02:00
return false ;
2022-12-17 22:20:11 +01:00
elseif ( $this -> config [ 'selfoverwrite' ] != 1 && getcwd () == $this -> initialWD && $f == basename ( __FILE__ ))
2021-08-28 16:55:52 +02:00
return false ;
else
return true ;
}
// is cURL extention avaliable?
private function checkCurl () {
2022-12-17 22:20:11 +01:00
if ( ! function_exists ( " curl_init " )
|| ! function_exists ( " curl_setopt " )
|| ! function_exists ( " curl_exec " )
|| ! function_exists ( " curl_close " )
)
return false ;
else
return true ;
2021-08-28 16:55:52 +02:00
}
2022-12-17 22:20:11 +01:00
private function fileDownload ( array $options ) {
if ( ! isset ( $options [ 'name' ]) || trim ( $options [ 'name' ]) == " " )
$options [ 'name' ] = basename ( $options [ 'file' ]);
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
if ( isset ( $options [ 'forceDL' ]) && $options [ 'forceDL' ]) {
2021-08-28 16:55:52 +02:00
$content_type = " application/octet-stream " ;
2022-12-17 22:20:11 +01:00
header ( 'Content-Disposition: attachment; filename="' . $options [ 'name' ] . '"' );
} else
$content_type = mime_content_type ( $options [ 'file' ]);
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
header ( 'Content-Type: ' . $content_type );
header ( 'Expires: 0' );
header ( 'Cache-Control: must-revalidate' );
header ( 'Pragma: public' );
header ( 'Content-Length: ' . filesize ( $options [ 'file' ]));
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
$file_stream = fopen ( $options [ 'file' ], 'rb' );
2021-08-28 16:55:52 +02:00
$stdout_stream = fopen ( 'php://output' , 'wb' );
stream_copy_to_stream ( $file_stream , $stdout_stream );
fclose ( $file_stream );
fclose ( $stdout_stream );
}
}
/**
* =======================================================================
* Improved File Manager
* ---------------------
* License : This project is provided under the terms of the MIT LICENSE
* http :// github . com / misterunknown / ifm / blob / master / LICENSE
* =======================================================================
*
* archive class
*
* This class provides support for various archive types for the IFM . It can
* create and extract the following formats :
* * zip
* * tar
* * tar . gz
* * tar . bz2
*/
class IFMArchive {
/**
* Add a folder to an archive
*/
private static function addFolder ( & $archive , $folder , $offset = 0 , $exclude_callback = null ) {
if ( $offset == 0 )
$offset = strlen ( dirname ( $folder )) + 1 ;
$archive -> addEmptyDir ( substr ( $folder , $offset ));
$handle = opendir ( $folder );
while ( false !== $f = readdir ( $handle )) {
if ( $f != '.' && $f != '..' ) {
$filePath = $folder . '/' . $f ;
if ( file_exists ( $filePath ) && is_readable ( $filePath )) {
if ( is_file ( $filePath )) {
if ( ! is_callable ( $exclude_callback ) || $exclude_callback ( $f ))
$archive -> addFile ( $filePath , substr ( $filePath , $offset ) );
} elseif ( is_dir ( $filePath )) {
if ( is_callable ( $exclude_callback ))
self :: addFolder ( $archive , $filePath , $offset , $exclude_callback );
else
self :: addFolder ( $archive , $filePath , $offset );
}
}
}
}
closedir ( $handle );
}
/**
* Create a zip file
*/
2022-12-17 22:20:11 +01:00
public static function createZip ( $filenames , $archivename , $exclude_callback = null ) {
2021-08-28 16:55:52 +02:00
$a = new ZipArchive ();
2022-12-17 22:20:11 +01:00
$a -> open ( $archivename , ZIPARCHIVE :: CREATE );
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
if ( ! is_array ( $filenames ))
$filenames = array ( $filenames );
2021-08-28 16:55:52 +02:00
2022-12-17 22:20:11 +01:00
foreach ( $filenames as $f )
if ( is_dir ( $f ))
2021-08-28 16:55:52 +02:00
if ( is_callable ( $exclude_callback ))
2022-12-17 22:20:11 +01:00
self :: addFolder ( $a , $f , null , $exclude_callback );
2021-08-28 16:55:52 +02:00
else
2022-12-17 22:20:11 +01:00
self :: addFolder ( $a , $f );
elseif ( is_file ( $f ))
if ( ! is_callable ( $exclude_callback ) || $exclude_callback ( $f ))
$a -> addFile ( $f , pathinfo ( $f , PATHINFO_BASENAME ));
2021-08-28 16:55:52 +02:00
try {
return $a -> close ();
} catch ( Exception $e ) {
return false ;
}
}
/**
* Unzip a zip file
*/
public static function extractZip ( $file , $destination = " ./ " ) {
if ( ! file_exists ( $file ))
return false ;
$zip = new ZipArchive ;
$res = $zip -> open ( $file );
if ( $res === true ) {
$zip -> extractTo ( $destination );
$zip -> close ();
return true ;
} else
return false ;
}
/**
* Creates a tar archive
*/
2022-12-17 22:20:11 +01:00
public static function createTar ( $filenames , $archivename , $format ) {
$tmpf = $archivename . " .tar " ;
2021-08-28 16:55:52 +02:00
$a = new PharData ( $tmpf );
2022-12-17 22:20:11 +01:00
try {
if ( ! is_array ( $filenames ))
$filenames = array ( $filenames );
foreach ( $filenames as $f )
if ( is_dir ( $f ))
self :: addFolder ( $a , $f );
elseif ( is_file ( $f ))
$a -> addFile ( $f , pathinfo ( $f , PATHINFO_BASENAME ));
switch ( $format ) {
case " tar.gz " :
$a -> compress ( Phar :: GZ );
@ unlink ( $tmpf );
break ;
case " tar.bz2 " :
$a -> compress ( Phar :: BZ2 );
@ unlink ( $tmpf );
break ;
2021-08-28 16:55:52 +02:00
}
return true ;
} catch ( Exception $e ) {
@ unlink ( $tmpf );
return false ;
}
}
/**
* Extracts a tar archive
*/
public static function extractTar ( $file , $destination = " ./ " ) {
if ( ! file_exists ( $file ))
return false ;
$tar = new PharData ( $file );
try {
$tar -> extractTo ( $destination , null , true );
return true ;
} catch ( Exception $e ) {
return false ;
}
}
}
/**
* htpasswd parser
*/
class Htpasswd {
public $users = [];
public function __construct ( $filename = " " ) {
if ( $filename )
$this -> load ( $filename );
}
/**
* Load a new htpasswd file
*/
public function load ( $filename ) {
unset ( $this -> users );
if ( file_exists ( $filename ) && is_readable ( $filename ) ) {
$lines = file ( $filename );
foreach ( $lines as $line ) {
list ( $user , $pass ) = explode ( " : " , $line );
$this -> users [ $user ] = trim ( $pass );
}
return true ;
} else
return false ;
}
public function getUsers () {
return array_keys ( $this -> users );
}
public function userExist ( $user ) {
return isset ( $this -> users [ $user ] );
}
public function verify ( $user , $pass ) {
if ( isset ( $this -> users [ $user ] ) ) {
return $this -> verifyPassword ( $pass , $this -> users [ $user ] );
} else {
return false ;
}
}
public function verifyPassword ( $pass , $hash ) {
if ( substr ( $hash , 0 , 4 ) == '$2y$' ) {
return password_verify ( $pass , $hash );
} elseif ( substr ( $hash , 0 , 6 ) == '$apr1$' ) {
$apr1 = new APR1_MD5 ();
return $apr1 -> check ( $pass , $hash );
} elseif ( substr ( $hash , 0 , 5 ) == '{SHA}' ) {
return base64_encode ( sha1 ( $pass , TRUE ) ) == substr ( $hash , 5 );
} else { // assume CRYPT
return crypt ( $pass , $hash ) == $hash ;
}
}
}
/**
* APR1_MD5 class
*
* Source : https :// github . com / whitehat101 / apr1 - md5 / blob / master / src / APR1_MD5 . php
*/
class APR1_MD5 {
const BASE64_ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' ;
const APRMD5_ALPHABET = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' ;
// Source/References for core algorithm:
// http://www.cryptologie.net/article/126/bruteforce-apr1-hashes/
// http://svn.apache.org/viewvc/apr/apr-util/branches/1.3.x/crypto/apr_md5.c?view=co
// http://www.php.net/manual/en/function.crypt.php#73619
// http://httpd.apache.org/docs/2.2/misc/password_encryptions.html
// Wikipedia
public static function hash ( $mdp , $salt = null ) {
if ( is_null ( $salt ))
$salt = self :: salt ();
$salt = substr ( $salt , 0 , 8 );
$max = strlen ( $mdp );
$context = $mdp . '$apr1$' . $salt ;
$binary = pack ( 'H32' , md5 ( $mdp . $salt . $mdp ));
for ( $i = $max ; $i > 0 ; $i -= 16 )
$context .= substr ( $binary , 0 , min ( 16 , $i ));
for ( $i = $max ; $i > 0 ; $i >>= 1 )
$context .= ( $i & 1 ) ? chr ( 0 ) : $mdp [ 0 ];
$binary = pack ( 'H32' , md5 ( $context ));
for ( $i = 0 ; $i < 1000 ; $i ++ ) {
$new = ( $i & 1 ) ? $mdp : $binary ;
if ( $i % 3 ) $new .= $salt ;
if ( $i % 7 ) $new .= $mdp ;
$new .= ( $i & 1 ) ? $binary : $mdp ;
$binary = pack ( 'H32' , md5 ( $new ));
}
$hash = '' ;
for ( $i = 0 ; $i < 5 ; $i ++ ) {
$k = $i + 6 ;
$j = $i + 12 ;
if ( $j == 16 ) $j = 5 ;
$hash = $binary [ $i ] . $binary [ $k ] . $binary [ $j ] . $hash ;
}
$hash = chr ( 0 ) . chr ( 0 ) . $binary [ 11 ] . $hash ;
$hash = strtr (
strrev ( substr ( base64_encode ( $hash ), 2 )),
self :: BASE64_ALPHABET ,
self :: APRMD5_ALPHABET
);
return '$apr1$' . $salt . '$' . $hash ;
}
// 8 character salts are the best. Don't encourage anything but the best.
public static function salt () {
$alphabet = self :: APRMD5_ALPHABET ;
$salt = '' ;
for ( $i = 0 ; $i < 8 ; $i ++ ) {
$offset = hexdec ( bin2hex ( openssl_random_pseudo_bytes ( 1 ))) % 64 ;
$salt .= $alphabet [ $offset ];
}
return $salt ;
}
public static function check ( $plain , $hash ) {
$parts = explode ( '$' , $hash );
return self :: hash ( $plain , $parts [ 2 ]) === $hash ;
}
}
/**
* start IFM
*/
$ifm = new IFM ();
$ifm -> run ();