File Manager - Version 5.2.6

Version Description

  • No special requirements.

=

Download this release

Release Info

Developer aihimel
Plugin Icon 128x128 File Manager
Version 5.2.6
Comparing to
See all releases

Code changes from version 5.2.4 to 5.2.6

BootStart/BootStart.php CHANGED
@@ -115,10 +115,10 @@ abstract class FM_BootStart{
115
  // Setting php.ini variables
116
  $this->php_ini_settings();
117
 
118
- // Loading Options
119
  // Options
120
- $this->options = get_option($this->prefix);
121
- if(empty($this->options)) $this->options = array( // Setting up default values
 
122
  'file_manager_settings' => array(
123
  'show_url_path' => 'show',
124
  'language' => array(
@@ -130,11 +130,19 @@ abstract class FM_BootStart{
130
  'width' => 'auto',
131
  'height' => 600
132
  ),
 
 
133
  ),
134
- );
135
- register_shutdown_function(array(&$this, 'save_options'));
 
 
 
 
 
 
136
 
137
- //auto:: $this->options = new FM_OptionsManager($this->name);
138
 
139
  // Creating upload folder.
140
  $this->upload_folder();
@@ -221,8 +229,9 @@ abstract class FM_BootStart{
221
  // Jquery UI CSS
222
  wp_register_style( 'fmp-jquery-ui-css', $jquery_ui_url);
223
 
 
224
  // elFinder CSS
225
- wp_register_style( 'fmp-elfinder-css', $this->url('elFinder/css/elfinder.full.css'), array('fmp-jquery-ui-css') );
226
 
227
  // elFinder theme CSS
228
  if($this->url('jquery-ui-1.11.4/jquery-ui.min.css') == $jquery_ui_url ) wp_register_style( 'fmp-elfinder-theme-css', $this->url('elFinder/css/theme.css'), array('fmp-elfinder-css') );
@@ -252,7 +261,7 @@ abstract class FM_BootStart{
252
  if(WP_DEBUG) {
253
  return [
254
  'handle' => $handle_name,
255
- 'file_type' => ('fmp-elfinder-script' === $handle_name ) ? '.full.': '.'
256
  ];
257
  }
258
 
@@ -279,7 +288,6 @@ abstract class FM_BootStart{
279
 
280
  // Main Menu
281
  add_menu_page( $this->name, $this->name, $capabilities, $this->prefix, array(&$this, 'admin_panel'), $this->url('img/icon-24x24.png'), 7 );
282
-
283
  // Settings Page
284
  add_submenu_page( $this->prefix, 'Library File Manager Settings', 'Settings', 'manage_options', $this->zip( 'Library File Manager Settings' ), array( &$this, 'settings' ) );
285
 
115
  // Setting php.ini variables
116
  $this->php_ini_settings();
117
 
 
118
  // Options
119
+
120
+ // Default options
121
+ $default_options = [
122
  'file_manager_settings' => array(
123
  'show_url_path' => 'show',
124
  'language' => array(
130
  'width' => 'auto',
131
  'height' => 600
132
  ),
133
+ 'fm_default_view_type' => 'icons',
134
+ 'fm_display_ui_options' => ['toolbar', 'places', 'tree', 'path', 'stat']
135
  ),
136
+ ];
137
+
138
+ $this->options = get_option($this->prefix);
139
+ if(empty($this->options)){
140
+ $this->options = $default_options;
141
+ } else {
142
+ $this->options = array_merge($default_options, $this->options);
143
+ }
144
 
145
+ register_shutdown_function(array(&$this, 'save_options'));
146
 
147
  // Creating upload folder.
148
  $this->upload_folder();
229
  // Jquery UI CSS
230
  wp_register_style( 'fmp-jquery-ui-css', $jquery_ui_url);
231
 
232
+ $elfinder_style = $this->is_minified_file_load('fmp-elfinder-css');
233
  // elFinder CSS
234
+ wp_register_style( $elfinder_style['handle'], $this->url('elFinder/css/elfinder'.$elfinder_style['file_type'].'css'), array('fmp-jquery-ui-css') );
235
 
236
  // elFinder theme CSS
237
  if($this->url('jquery-ui-1.11.4/jquery-ui.min.css') == $jquery_ui_url ) wp_register_style( 'fmp-elfinder-theme-css', $this->url('elFinder/css/theme.css'), array('fmp-elfinder-css') );
261
  if(WP_DEBUG) {
262
  return [
263
  'handle' => $handle_name,
264
+ 'file_type' => ('fmp-elfinder-script' === $handle_name || 'fmp-elfinder-css' === $handle_name) ? '.full.': '.'
265
  ];
266
  }
267
 
288
 
289
  // Main Menu
290
  add_menu_page( $this->name, $this->name, $capabilities, $this->prefix, array(&$this, 'admin_panel'), $this->url('img/icon-24x24.png'), 7 );
 
291
  // Settings Page
292
  add_submenu_page( $this->prefix, 'Library File Manager Settings', 'Settings', 'manage_options', $this->zip( 'Library File Manager Settings' ), array( &$this, 'settings' ) );
293
 
BootStart/Constants.php ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ * Constant Definition
5
+ *
6
+ * @since v5.2.0
7
+ *
8
+ * */
9
+ // Directory Separator
10
+ if( !defined( 'DS' ) ) define("DS", DIRECTORY_SEPARATOR);
11
+
12
+
13
+ // file manger path
14
+ if( !defined( 'FILE_MANAGER_PATH' ) ) define("FILE_MANAGER_PATH", plugin_dir_path( __FILE__ ));
15
+
16
+ // file manger url
17
+ if( !defined( 'FILE_MANAGER_URL' ) ) define("FILE_MANAGER_URL", plugin_dir_url( __FILE__ ));
18
+
19
+ // Elfinder path
20
+ if( !defined( 'ELFINDER_PATH' ) ) define("ELFINDER_PATH", plugin_dir_path( __FILE__ ) . 'elFinder');
21
+
22
+ // Elfinder url
23
+ if( !defined( 'ELFINDER_URL' ) ) define("ELFINDER_URL", plugin_dir_url( __FILE__ ) . 'elFinder/');
24
+
25
+ // FM_WP_UPLOAD_DIR = wp_upload_dir();
26
+
27
+ // Upload dir path
28
+ if( !defined( 'FM_WP_UPLOAD_DIR' ) ) define("FM_WP_UPLOAD_DIR", wp_upload_dir());
29
+
30
+ // Upload dir path
31
+ if( !defined( 'FM_UPLOAD_DIR_PATH' ) ) define("FM_UPLOAD_DIR_PATH", FM_WP_UPLOAD_DIR['path']);
32
+
33
+ // Upload dir url
34
+ if( !defined( 'FM_UPLOAD_DIR_URL' ) ) define("FM_UPLOAD_DIR_URL", FM_WP_UPLOAD_DIR['url']);
35
+
36
+ // Media basedir
37
+ if( !defined( 'FM_MEDIA_BASE_DIR_PATH' ) ) define("FM_MEDIA_BASE_DIR_PATH", FM_WP_UPLOAD_DIR['basedir']);
38
+
39
+ // Media baseurl
40
+ if( !defined( 'FM_MEDIA_BASE_DIR_URL' ) ) define("FM_MEDIA_BASE_DIR_URL", FM_WP_UPLOAD_DIR['baseurl']);
41
+
42
+ // File manager upload dir basedir
43
+ defined( 'FM_UPLOAD_BASE_DIR' ) || define( 'FM_UPLOAD_BASE_DIR', FM_WP_UPLOAD_DIR['basedir'] . DS . 'file-manager' . DS );
44
+
45
+ // File manager upload dir baseurl
46
+ defined( 'FM_UPLOAD_BASE_URL' ) || define( 'FM_UPLOAD_BASE_URL', FM_WP_UPLOAD_DIR['baseurl'] . DS . 'file-manager' . DS );
47
+
48
+ // File manager trash dir path
49
+ if ( ! defined( 'FM_TRASH_DIR_PATH' )) {
50
+ /**
51
+ * Custom Trash Directory.
52
+ */
53
+ $fm_trash_dir = FM_WP_UPLOAD_DIR['basedir'] .'/file-manager/trash/';
54
+ define( 'FM_TRASH_DIR_PATH', $fm_trash_dir );
55
+ if ( ! file_exists( $fm_trash_dir ) && is_writable( FM_WP_UPLOAD_DIR['basedir'] ) ) {
56
+ mkdir( $fm_trash_dir, 0777, true );
57
+ // Protect files from public access.
58
+ touch( FM_TRASH_DIR_PATH . '.htaccess' );
59
+ $content = 'deny from all';
60
+ $fp = fopen( FM_TRASH_DIR_PATH . '.htaccess', 'wb' );
61
+ fwrite( $fp, $content );
62
+ fclose( $fp );
63
+ }elseif ( ! file_exists( $fm_trash_dir ) && ! is_writable($fm_trash_dir) && ! is_writable( FM_WP_UPLOAD_DIR['basedir'] ) ) {
64
+ add_action('admin_notices', function(){ ?>
65
+ <div class="notice notice-error is-dismissible">
66
+ <p>
67
+ <?php
68
+ _e('<h1>File Manager</h1> <b>Your uploads folder is not writable. Please make <code style="color: red;">wp-content/uploads</code> folder writable to create trash folder.</b>', 'file-manager');
69
+ ?>
70
+ </p>
71
+ </div> <?php
72
+ });
73
+ }
74
+ }
75
+
76
+ // File manager trash tmb dir url
77
+ defined( 'FM_TRASH_TMB_DIR_URL' ) || define( 'FM_TRASH_TMB_DIR_URL', FM_WP_UPLOAD_DIR['baseurl'] . '/file-manager/trash/.tmb/');
78
+
79
+
css/style.css CHANGED
@@ -332,6 +332,45 @@ input[type=radio] {
332
  display: none !important;
333
  }
334
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
335
  .sudo-permission-system .col-main {
336
  width: 100%;
337
  }
332
  display: none !important;
333
  }
334
 
335
+ .elfinder-quicklook-titlebar-icon .ui-icon.ui-icon-closethick {
336
+ left: 20px;
337
+ top: 8px;
338
+ }
339
+
340
+ .ui-helper-clearfix.ui-dialog-buttonpane.ui-widget-content {
341
+ font-size: 12px;
342
+ }
343
+
344
+ .ui-helper-clearfix.ui-dialog-buttonpane.ui-widget-content .ui-dialog-buttonset.elfinder-edit-extras .ui-corner-all {
345
+ margin-top: 0px;
346
+ }
347
+
348
+ .ui-helper-clearfix .ui-button-icon-only {
349
+ min-width: 125px;
350
+ }
351
+
352
+ .ui-helper-clearfix .ui-button-icon-only .ui-button-icon.ui-icon.ui-icon-gear {
353
+ left: 12px;
354
+ }
355
+
356
+ .ui-helper-clearfix .ui-corner-all {
357
+ margin-top: 0px;
358
+ }
359
+
360
+ #ace_settingsmenu {
361
+ top: 32px;
362
+ }
363
+
364
+ .elfinder-maximized {
365
+ top: 32px !important;
366
+ left: 30px !important;
367
+ width: 96% !important;
368
+ }
369
+
370
+ .elfinder-maximized .ui-dialog-content.ui-widget-content.elfinder-edit-editor {
371
+ height: 81% !important;
372
+ }
373
+
374
  .sudo-permission-system .col-main {
375
  width: 100%;
376
  }
css/style.css.map CHANGED
@@ -13,5 +13,5 @@
13
  "../sass/parts/review.sass"
14
  ],
15
  "names": [],
16
- "mappings": "AAEA,AAAA,KAAK,CAAA,AAAA,IAAC,CAAD,QAAC,AAAA,EAAe;EACjB,kBAAkB,EAAC,QAAQ,CAAC,UAAU;CAAK;;AAE/C,AAAA,KAAK,CAAA,AAAA,IAAC,CAAD,KAAC,AAAA,EAAY;EACd,kBAAkB,EAAC,KAAK,CAAC,UAAU;CAAK;;AAE5C,AAAA,UAAU,CAAC;EACP,UAAU,EAAE,WAAW;EACvB,YAAY,EAAE,IAAI;EAClB,KAAK,EAAE,GAAG;CAmBQ;;AAtBtB,AAII,UAJM,GAIL,EAAE,CAAC;EACA,KAAK,EAAE,OAAO;EACd,OAAO,EAAE,YAAY;CAAG;;AANhC,AAOI,UAPM,GAOL,EAAE,CAAC;EACA,OAAO,EAAE,YAAY;EACrB,KAAK,EAAE,KAAK;CAIS;;AAb7B,AAUQ,UAVE,GAOL,EAAE,GAGE,EAAE,CAAC;EACA,OAAO,EAAE,YAAY;EACrB,MAAM,EAAE,GAAG;EACX,OAAO,EAAE,GAAG;CAAG;;AAb3B,AAcI,UAdM,CAcN,QAAQ,CAAC;EACL,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,IAAI;EACT,IAAI,EAAE,KAAK;CAAG;;AAnBtB,AAoBI,UApBM,CAoBN,eAAe,CAAC;EACZ,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,IAAI;CAAG;;AAEpB,AAEQ,aAFK,CACT,SAAS,CACL,QAAQ,CAAC;EACL,WAAW,EAAE,iBAAiB;EAC9B,OAAO,EAAE,iBAAiB;CAMO;;AAV7C,AAKY,aALC,CACT,SAAS,CACL,QAAQ,GAGH,KAAK,CAAC;EACH,WAAW,EAAE,IAAI;EACjB,YAAY,EAAE,IAAI;CAGS;;AAV3C,AASoB,aATP,CACT,SAAS,CACL,QAAQ,GAGH,KAAK,GAGD,EAAE,GACE,EAAE,CAAC;EACA,OAAO,EAAE,GAAG;CAAG;;AAVvC,AAWI,aAXS,CAWT,YAAY,CAAC;EACT,KAAK,EAAE,GAAG;CAMuB;;AAlBzC,AAaQ,aAbK,CAWT,YAAY,CAER,cAAc,CAAC;EACX,MAAM,EAAE,IAAI;CAIe;;AAlBvC,AAeY,aAfC,CAWT,YAAY,CAER,cAAc,GAET,EAAE,CAAC;EACA,KAAK,EAAE,OAAO;EACd,WAAW,EAAE,IAAI;EACjB,UAAU,EAAE,MAAM;CAAG;;AAErC,AAAA,aAAa,CAAC;EACV,KAAK,EAAE,GAAG;EACV,UAAU,EAAE,KAAK;EACjB,UAAU,EAAE,IAAI;CAcY;;AAjBhC,AAII,aAJS,CAIT,SAAS,CAAC;EACN,KAAK,EAAE,KAAK;EACZ,UAAU,EAAE,KAAK;EACjB,KAAK,EAAE,IAAI;CAAG;;AAPtB,AAQI,aARS,CAQT,YAAY,CAAC;EACT,SAAS,EAAE,IAAI;EACf,UAAU,EAAE,KAAK;EACjB,KAAK,EAAE,KAAK;CAAG;;AAXvB,AAYI,aAZS,CAYT,UAAU,CAAC;EACP,KAAK,EAAE,GAAG;EACV,gBAAgB,EAAE,KAAK;EACvB,UAAU,EAAE,KAAK;EACjB,MAAM,EAAE,GAAG;EACX,aAAa,EAAE,IAAI;CAAG;;AAE9B,AACI,aADS,CACT,CAAC,CAAC;EACE,KAAK,EAAE,KAAK;EACZ,eAAe,EAAE,IAAI;EACrB,SAAS,EAAE,IAAI;EACf,OAAO,EAAE,GAAG;EACZ,YAAY,EAAE,IAAI;EAClB,aAAa,EAAE,IAAI;EACnB,gBAAgB,EAAE,OAAO;CAAG;;AAEpC,AAAA,iBAAiB,CAAC;EACd,KAAK,EAAE,KAAK;EACZ,gBAAgB,EAAE,OAAO;EACzB,SAAS,EAAE,IAAI;EACf,OAAO,EAAE,IAAI;EACb,MAAM,EAAE,IAAI;CAES;;AAPzB,AAMI,iBANa,AAMZ,MAAM,CAAC;EACJ,KAAK,EAAE,KAAK;CAAG;;AAEvB,AAAA,UAAU,CAAC;EACP,KAAK,EAAE,GAAG;EACV,KAAK,EAAE,IAAI;EACX,gBAAgB,EAAE,OAAO;EACzB,UAAU,EAAE,MAAM;CAIc;;AARpC,AAMQ,UANE,CAKN,EAAE,CACE,EAAE,CAAC;EACC,OAAO,EAAE,YAAY;EACrB,WAAW,EAAE,IAAI;CAAG;;AClGhC,AACI,aADS,CACT,EAAE,CAAC;EACC,UAAU,EAAE,MAAM;EAClB,WAAW,EAAE,IAAI;EACjB,cAAc,EAAE,IAAI;EACpB,WAAW,EAAE,IAAI;CAAG;;AAL5B,AAOQ,aAPK,GAMR,IAAI,GACA,EAAE,CAAC;EACA,OAAO,EAAE,YAAY;EACrB,WAAW,EAAE,IAAI;CAAG;;AAThC,AAUI,aAVS,CAUT,KAAK,CAAC;EACF,OAAO,EAAE,IAAI;EACb,YAAY,EAAE,IAAI;CAGU;;AAfpC,AAcY,aAdC,CAUT,KAAK,CAGD,EAAE,CACE,EAAE,CAAC;EACC,OAAO,EAAE,IAAI;CAAG;;AAfhC,AAgBI,aAhBS,CAgBT,KAAK,CAAA,AAAA,IAAC,CAAD,MAAC,AAAA,EAAa;EACf,OAAO,EAAE,mBAAmB;EAC5B,KAAK,EAAE,KAAK;EACZ,SAAS,EAAE,IAAI;EACf,aAAa,EAAE,GAAG;EAClB,WAAW,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,kBAAkB;EACzC,UAAU,EAAE,OAAgB;EAC5B,MAAM,EAAE,OAAO;CAAG;;ACvB1B,AAAA,mBAAmB,CAAC;EAChB,OAAO,EAAE,YAAY;EACrB,KAAK,EAAE,GAAG;CAAG;;AAEjB,AAAA,sBAAsB,CAAC;EACnB,SAAS,EAAE,KAAK;CAAG;;ACJvB,AAAA,6BAA6B,CAAC;EAC1B,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;CAGQ;;AALzB,AAGI,6BAHyB,CAGzB,EAAE,CAAC;EACC,MAAM,EAAE,GAAG;EACX,OAAO,EAAE,GAAG;CAAG;;AAEvB,AAAA,uCAAuC,CAAC;EACpC,WAAW,EAAE,IAAI;EACjB,SAAS,EAAE,IAAI;CAAG;;AAEtB,AAAA,WAAW,CAAC;EACR,gBAAgB,EAAE,OAAO;EACzB,KAAK,EAAE,KAAK;CAES;;AAJzB,AAGI,WAHO,CAGP,CAAC,CAAC;EACE,KAAK,EAAE,KAAK;CAAG;;AAEvB,AACI,4BADwB,CACxB,GAAG,CAAC;EACA,KAAK,EAAE,GAAG;EACV,MAAM,EAAE,cAAc;EACtB,OAAO,EAAE,YAAY;EACrB,MAAM,EAAE,GAAG;EACX,OAAO,EAAE,GAAG;EACZ,aAAa,EAAE,GAAG;EAClB,OAAO,EAAE,KAAK;EACd,WAAW,EAAE,IAAI;EACjB,YAAY,EAAE,IAAI;CAAG;;AAV7B,AAWI,4BAXwB,CAWxB,IAAI,CAAC;EACD,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,YAAY;EACrB,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,MAAM;CAAG;;AAE7B,AAAA,qBAAqB,CAAC;EAClB,UAAU,EAAE,IAAI;EAChB,MAAM,EAAE,GAAG;EACX,QAAQ,EAAE,KAAK;EACf,MAAM,EAAE,GAAG;EACX,KAAK,EAAE,GAAG;EACV,OAAO,EAAE,GAAG;EACZ,gBAAgB,EAAE,OAAO;EACzB,OAAO,EAAE,IAAI;EACb,aAAa,EAAE,GAAG;CAIO;;AAb7B,AAUI,qBAViB,CAUjB,CAAC,CAAC;EACE,eAAe,EAAE,IAAI;EACrB,KAAK,EAAE,KAAK;EACZ,SAAS,EAAE,KAAK;CAAG;;ACjD3B,AAAA,UAAU,CAAC;EACP,QAAQ,EAAE,QAAQ;CAAG;;AAEzB,AACI,UADM,CAAA,AAAA,UAAC,AAAA,CACN,MAAM,CAAC;EACJ,OAAO,EAAE,gBAAgB;EACzB,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,KAAK;EACV,KAAK,EAAE,KAAK;EACZ,SAAS,EAAE,GAAG;EACd,UAAU,EAAE,OAAO;EACnB,KAAK,EAAE,KAAK;EACZ,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,UAAU,EAAE,MAAM;EAClB,WAAW,EAAE,IAAI;EACjB,aAAa,EAAE,GAAG;EAClB,UAAU,EAAE,YAAY;CAAG;;AAEnC,AAAA,WAAW,CAAC;EACR,QAAQ,EAAE,QAAQ;CAAG;;AAEzB,AACI,WADO,CAAA,AAAA,UAAC,AAAA,CACP,MAAM,CAAC;EACJ,OAAO,EAAE,gBAAgB;EACzB,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,KAAK;EACV,KAAK,EAAE,KAAK;EACZ,SAAS,EAAE,GAAG;EACd,UAAU,EAAE,KAAK;EACjB,KAAK,EAAE,KAAK;EACZ,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,UAAU,EAAE,MAAM;EAClB,WAAW,EAAE,IAAI;EACjB,aAAa,EAAE,GAAG;EAClB,UAAU,EAAE,YAAY;CAAG;;AAEnC,AAAA,SAAS,CAAC;EACN,WAAW,EAAE,aAAa;EAC1B,OAAO,EAAE,KAAK;CAAG;;ACvCrB,AAAA,YAAY,CAAC;EACT,UAAU,EAAE,MAAM;EAClB,MAAM,EAAE,IAAI;CAOc;;AAT9B,AAGI,YAHQ,GAGP,IAAI,CAAC;EACF,cAAc,EAAE,IAAI;CAAG;;AAJ/B,AAKI,YALQ,GAKP,CAAC,CAAC;EACC,UAAU,EAAE,OAAO;CAAG;;AAN9B,AAOI,YAPQ,GAOP,EAAE,CAAC;EACA,KAAK,EAAE,OAAO;EACd,WAAW,EAAE,IAAI;CAAG;;ACT5B,AACI,UADM,CACN,QAAQ,CAAC;EACL,WAAW,EAAE,4CAA4C;EACzD,SAAS,EAAE,KAAK;EAChB,gBAAgB,EAAE,OAAO;EACzB,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,IAAI;CAAG;;AAE3B,AACI,UADM,AACL,UAAW,CAAA,CAAC,EAAE;EACX,KAAK,EAAE,gBAAgB;EACvB,GAAG,EAAE,eAAe;EACpB,IAAI,EAAE,eAAe;CAAG;;AAEhC,AAAA,mBAAmB,CAAC;EAChB,MAAM,EAAE,KAAK;CAAG;;AAEpB,AACI,gBADY,AACX,UAAW,CAAA,CAAC,EAAE;EACX,QAAQ,EAAE,mBAAmB;EAC7B,KAAK,EAAE,gBAAgB;EACvB,MAAM,EAAE,eAAe;EACvB,GAAG,EAAE,gBAAgB;EACrB,IAAI,EAAE,gBAAgB;CAAG;;AAEjC,AAAA,2BAA2B,CAAC;EACxB,MAAM,EAAE,KAAK;CAAG;;AAEpB,AACI,+BAD2B,AAC1B,UAAW,CAAA,CAAC,EAAE;EACX,OAAO,EAAE,IAAI;CAAG;;AAExB,AACI,QADI,AACH,UAAW,CAAA,CAAC,EAAE;EACX,OAAO,EAAE,eAAe;CAAG;;ACnCnC,AACI,uBADmB,CACnB,SAAS,CAAC;EACN,KAAK,EAAE,IAAI;CAsByB;;AAxB5C,AAIY,uBAJW,CACnB,SAAS,CAEL,UAAU,CACN,GAAG,CAAC;EACA,KAAK,EAAE,IAAI;CAAG;;AAL9B,AAMQ,uBANe,CACnB,SAAS,CAKL,gBAAgB,CAAC;EACb,KAAK,EAAE,GAAG;EACV,YAAY,EAAE,GAAG;EACjB,UAAU,EAAE,MAAM;EAClB,WAAW,EAAE,IAAI;EACjB,cAAc,EAAE,IAAI;CAaU;;AAxB1C,AAYY,uBAZW,CACnB,SAAS,CAKL,gBAAgB,CAMZ,MAAM,CAAC;EACH,OAAO,EAAE,IAAI;EACb,aAAa,EAAE,GAAG;EAClB,KAAK,EAAE,KAAK;EACZ,gBAAgB,EAAE,OAAO;EACzB,WAAW,EAAE,IAAI;EACjB,MAAM,EAAE,GAAG;CAMa;;AAxBxC,AAmBgB,uBAnBO,CACnB,SAAS,CAKL,gBAAgB,CAMZ,MAAM,AAOD,MAAM,CAAC;EACJ,KAAK,EAAE,OAAO;EACd,OAAO,EAAE,IAAI;EACb,gBAAgB,EAAE,OAAO;EACzB,MAAM,EAAE,iBAAiB;EACzB,MAAM,EAAE,OAAO;CAAG;;ACxBtC,AAAA,aAAa,CAAC;EACV,WAAW,EAAE,IAAI;EACjB,cAAc,EAAE,IAAI;EACpB,UAAU,EAAE,MAAM;EAClB,SAAS,EAAE,KAAK;EAChB,MAAM,EAAE,kBAAkB;EAC1B,aAAa,EAAE,IAAI;CA4BU;;AAlCjC,AAOI,aAPS,CAOT,QAAQ,CAAC;EACL,MAAM,EAAE,IAAI;EACZ,UAAU,EAAE,GAAG;CACrB;;AAVF,AAWI,aAXS,CAWT,QAAQ,CAAC;EACL,UAAU,EAAE,IAAI;CAsBO;;AAlC/B,AAaQ,aAbK,CAWT,QAAQ,CAEJ,CAAC,CAAC;EACE,OAAO,EAAE,iBAAiB;EAC1B,eAAe,EAAE,IAAI;EACrB,MAAM,EAAE,iBAAiB;CAAG;;AAhBxC,AAiBQ,aAjBK,CAWT,QAAQ,CAMJ,IAAI,CAAC;EACD,aAAa,EAAE,GAAG;CAAG;;AAlBjC,AAmBQ,aAnBK,CAWT,QAAQ,CAQJ,WAAW,CAAC;EACR,gBAAgB,EAAE,OAAO;EACzB,KAAK,EAAE,KAAK;EACZ,WAAW,EAAE,GAAG;EAChB,aAAa,EAAE,GAAG;EAClB,mBAAmB,EAAE,IAAI;CAKS;;AA7B9C,AAyBY,aAzBC,CAWT,QAAQ,CAQJ,WAAW,AAMN,MAAM,CAAC;EACJ,mBAAmB,EAAE,IAAI;EACzB,KAAK,EAAE,OAAO;EACd,gBAAgB,EAAE,KAAK;EACvB,MAAM,EAAE,iBAAiB;CAAG;;AA7B5C,AA8BQ,aA9BK,CAWT,QAAQ,CAmBJ,mBAAmB,CAAC;EAChB,KAAK,EAAE,IAAI;EACX,WAAW,EAAE,GAAG;EAChB,MAAM,EAAE,GAAG;EACX,SAAS,EAAE,GAAG;CAAG"
17
  }
13
  "../sass/parts/review.sass"
14
  ],
15
  "names": [],
16
+ "mappings": "AAEA,AAAA,KAAK,CAAA,AAAA,IAAC,CAAD,QAAC,AAAA,EAAe;EACjB,kBAAkB,EAAC,QAAQ,CAAC,UAAU;CAAK;;AAE/C,AAAA,KAAK,CAAA,AAAA,IAAC,CAAD,KAAC,AAAA,EAAY;EACd,kBAAkB,EAAC,KAAK,CAAC,UAAU;CAAK;;AAE5C,AAAA,UAAU,CAAC;EACP,UAAU,EAAE,WAAW;EACvB,YAAY,EAAE,IAAI;EAClB,KAAK,EAAE,GAAG;CAmBQ;;AAtBtB,AAII,UAJM,GAIL,EAAE,CAAC;EACA,KAAK,EAAE,OAAO;EACd,OAAO,EAAE,YAAY;CAAG;;AANhC,AAOI,UAPM,GAOL,EAAE,CAAC;EACA,OAAO,EAAE,YAAY;EACrB,KAAK,EAAE,KAAK;CAIS;;AAb7B,AAUQ,UAVE,GAOL,EAAE,GAGE,EAAE,CAAC;EACA,OAAO,EAAE,YAAY;EACrB,MAAM,EAAE,GAAG;EACX,OAAO,EAAE,GAAG;CAAG;;AAb3B,AAcI,UAdM,CAcN,QAAQ,CAAC;EACL,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,IAAI;EACT,IAAI,EAAE,KAAK;CAAG;;AAnBtB,AAoBI,UApBM,CAoBN,eAAe,CAAC;EACZ,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,IAAI;CAAG;;AAEpB,AAEQ,aAFK,CACT,SAAS,CACL,QAAQ,CAAC;EACL,WAAW,EAAE,iBAAiB;EAC9B,OAAO,EAAE,iBAAiB;CAMO;;AAV7C,AAKY,aALC,CACT,SAAS,CACL,QAAQ,GAGH,KAAK,CAAC;EACH,WAAW,EAAE,IAAI;EACjB,YAAY,EAAE,IAAI;CAGS;;AAV3C,AASoB,aATP,CACT,SAAS,CACL,QAAQ,GAGH,KAAK,GAGD,EAAE,GACE,EAAE,CAAC;EACA,OAAO,EAAE,GAAG;CAAG;;AAVvC,AAWI,aAXS,CAWT,YAAY,CAAC;EACT,KAAK,EAAE,GAAG;CAMuB;;AAlBzC,AAaQ,aAbK,CAWT,YAAY,CAER,cAAc,CAAC;EACX,MAAM,EAAE,IAAI;CAIe;;AAlBvC,AAeY,aAfC,CAWT,YAAY,CAER,cAAc,GAET,EAAE,CAAC;EACA,KAAK,EAAE,OAAO;EACd,WAAW,EAAE,IAAI;EACjB,UAAU,EAAE,MAAM;CAAG;;AAErC,AAAA,aAAa,CAAC;EACV,KAAK,EAAE,GAAG;EACV,UAAU,EAAE,KAAK;EACjB,UAAU,EAAE,IAAI;CAcY;;AAjBhC,AAII,aAJS,CAIT,SAAS,CAAC;EACN,KAAK,EAAE,KAAK;EACZ,UAAU,EAAE,KAAK;EACjB,KAAK,EAAE,IAAI;CAAG;;AAPtB,AAQI,aARS,CAQT,YAAY,CAAC;EACT,SAAS,EAAE,IAAI;EACf,UAAU,EAAE,KAAK;EACjB,KAAK,EAAE,KAAK;CAAG;;AAXvB,AAYI,aAZS,CAYT,UAAU,CAAC;EACP,KAAK,EAAE,GAAG;EACV,gBAAgB,EAAE,KAAK;EACvB,UAAU,EAAE,KAAK;EACjB,MAAM,EAAE,GAAG;EACX,aAAa,EAAE,IAAI;CAAG;;AAE9B,AACI,aADS,CACT,CAAC,CAAC;EACE,KAAK,EAAE,KAAK;EACZ,eAAe,EAAE,IAAI;EACrB,SAAS,EAAE,IAAI;EACf,OAAO,EAAE,GAAG;EACZ,YAAY,EAAE,IAAI;EAClB,aAAa,EAAE,IAAI;EACnB,gBAAgB,EAAE,OAAO;CAAG;;AAEpC,AAAA,iBAAiB,CAAC;EACd,KAAK,EAAE,KAAK;EACZ,gBAAgB,EAAE,OAAO;EACzB,SAAS,EAAE,IAAI;EACf,OAAO,EAAE,IAAI;EACb,MAAM,EAAE,IAAI;CAES;;AAPzB,AAMI,iBANa,AAMZ,MAAM,CAAC;EACJ,KAAK,EAAE,KAAK;CAAG;;AAEvB,AAAA,UAAU,CAAC;EACP,KAAK,EAAE,GAAG;EACV,KAAK,EAAE,IAAI;EACX,gBAAgB,EAAE,OAAO;EACzB,UAAU,EAAE,MAAM;CAIc;;AARpC,AAMQ,UANE,CAKN,EAAE,CACE,EAAE,CAAC;EACC,OAAO,EAAE,YAAY;EACrB,WAAW,EAAE,IAAI;CAAG;;AClGhC,AACI,aADS,CACT,EAAE,CAAC;EACC,UAAU,EAAE,MAAM;EAClB,WAAW,EAAE,IAAI;EACjB,cAAc,EAAE,IAAI;EACpB,WAAW,EAAE,IAAI;CAAG;;AAL5B,AAOQ,aAPK,GAMR,IAAI,GACA,EAAE,CAAC;EACA,OAAO,EAAE,YAAY;EACrB,WAAW,EAAE,IAAI;CAAG;;AAThC,AAUI,aAVS,CAUT,KAAK,CAAC;EACF,OAAO,EAAE,IAAI;EACb,YAAY,EAAE,IAAI;CAGU;;AAfpC,AAcY,aAdC,CAUT,KAAK,CAGD,EAAE,CACE,EAAE,CAAC;EACC,OAAO,EAAE,IAAI;CAAG;;AAfhC,AAgBI,aAhBS,CAgBT,KAAK,CAAA,AAAA,IAAC,CAAD,MAAC,AAAA,EAAa;EACf,OAAO,EAAE,mBAAmB;EAC5B,KAAK,EAAE,KAAK;EACZ,SAAS,EAAE,IAAI;EACf,aAAa,EAAE,GAAG;EAClB,WAAW,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,kBAAkB;EACzC,UAAU,EAAE,OAAgB;EAC5B,MAAM,EAAE,OAAO;CAAG;;ACvB1B,AAAA,mBAAmB,CAAC;EAChB,OAAO,EAAE,YAAY;EACrB,KAAK,EAAE,GAAG;CAAG;;AAEjB,AAAA,sBAAsB,CAAC;EACnB,SAAS,EAAE,KAAK;CAAG;;ACJvB,AAAA,6BAA6B,CAAC;EAC1B,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;CAGQ;;AALzB,AAGI,6BAHyB,CAGzB,EAAE,CAAC;EACC,MAAM,EAAE,GAAG;EACX,OAAO,EAAE,GAAG;CAAG;;AAEvB,AAAA,uCAAuC,CAAC;EACpC,WAAW,EAAE,IAAI;EACjB,SAAS,EAAE,IAAI;CAAG;;AAEtB,AAAA,WAAW,CAAC;EACR,gBAAgB,EAAE,OAAO;EACzB,KAAK,EAAE,KAAK;CAES;;AAJzB,AAGI,WAHO,CAGP,CAAC,CAAC;EACE,KAAK,EAAE,KAAK;CAAG;;AAEvB,AACI,4BADwB,CACxB,GAAG,CAAC;EACA,KAAK,EAAE,GAAG;EACV,MAAM,EAAE,cAAc;EACtB,OAAO,EAAE,YAAY;EACrB,MAAM,EAAE,GAAG;EACX,OAAO,EAAE,GAAG;EACZ,aAAa,EAAE,GAAG;EAClB,OAAO,EAAE,KAAK;EACd,WAAW,EAAE,IAAI;EACjB,YAAY,EAAE,IAAI;CAAG;;AAV7B,AAWI,4BAXwB,CAWxB,IAAI,CAAC;EACD,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,YAAY;EACrB,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,MAAM;CAAG;;AAE7B,AAAA,qBAAqB,CAAC;EAClB,UAAU,EAAE,IAAI;EAChB,MAAM,EAAE,GAAG;EACX,QAAQ,EAAE,KAAK;EACf,MAAM,EAAE,GAAG;EACX,KAAK,EAAE,GAAG;EACV,OAAO,EAAE,GAAG;EACZ,gBAAgB,EAAE,OAAO;EACzB,OAAO,EAAE,IAAI;EACb,aAAa,EAAE,GAAG;CAIO;;AAb7B,AAUI,qBAViB,CAUjB,CAAC,CAAC;EACE,eAAe,EAAE,IAAI;EACrB,KAAK,EAAE,KAAK;EACZ,SAAS,EAAE,KAAK;CAAG;;ACjD3B,AAAA,UAAU,CAAC;EACP,QAAQ,EAAE,QAAQ;CAAG;;AAEzB,AACI,UADM,CAAA,AAAA,UAAC,AAAA,CACN,MAAM,CAAC;EACJ,OAAO,EAAE,gBAAgB;EACzB,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,KAAK;EACV,KAAK,EAAE,KAAK;EACZ,SAAS,EAAE,GAAG;EACd,UAAU,EAAE,OAAO;EACnB,KAAK,EAAE,KAAK;EACZ,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,UAAU,EAAE,MAAM;EAClB,WAAW,EAAE,IAAI;EACjB,aAAa,EAAE,GAAG;EAClB,UAAU,EAAE,YAAY;CAAG;;AAEnC,AAAA,WAAW,CAAC;EACR,QAAQ,EAAE,QAAQ;CAAG;;AAEzB,AACI,WADO,CAAA,AAAA,UAAC,AAAA,CACP,MAAM,CAAC;EACJ,OAAO,EAAE,gBAAgB;EACzB,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,KAAK;EACV,KAAK,EAAE,KAAK;EACZ,SAAS,EAAE,GAAG;EACd,UAAU,EAAE,KAAK;EACjB,KAAK,EAAE,KAAK;EACZ,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,UAAU,EAAE,MAAM;EAClB,WAAW,EAAE,IAAI;EACjB,aAAa,EAAE,GAAG;EAClB,UAAU,EAAE,YAAY;CAAG;;AAEnC,AAAA,SAAS,CAAC;EACN,WAAW,EAAE,aAAa;EAC1B,OAAO,EAAE,KAAK;CAAG;;ACvCrB,AAAA,YAAY,CAAC;EACT,UAAU,EAAE,MAAM;EAClB,MAAM,EAAE,IAAI;CAOc;;AAT9B,AAGI,YAHQ,GAGP,IAAI,CAAC;EACF,cAAc,EAAE,IAAI;CAAG;;AAJ/B,AAKI,YALQ,GAKP,CAAC,CAAC;EACC,UAAU,EAAE,OAAO;CAAG;;AAN9B,AAOI,YAPQ,GAOP,EAAE,CAAC;EACA,KAAK,EAAE,OAAO;EACd,WAAW,EAAE,IAAI;CAAG;;ACT5B,AACI,UADM,CACN,QAAQ,CAAC;EACL,WAAW,EAAE,4CAA4C;EACzD,SAAS,EAAE,KAAK;EAChB,gBAAgB,EAAE,OAAO;EACzB,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,IAAI;CAAG;;AAE3B,AACI,UADM,AACL,UAAW,CAAA,CAAC,EAAE;EACX,KAAK,EAAE,gBAAgB;EACvB,GAAG,EAAE,eAAe;EACpB,IAAI,EAAE,eAAe;CAAG;;AAEhC,AAAA,mBAAmB,CAAC;EAChB,MAAM,EAAE,KAAK;CAAG;;AAEpB,AACI,gBADY,AACX,UAAW,CAAA,CAAC,EAAE;EACX,QAAQ,EAAE,mBAAmB;EAC7B,KAAK,EAAE,gBAAgB;EACvB,MAAM,EAAE,eAAe;EACvB,GAAG,EAAE,gBAAgB;EACrB,IAAI,EAAE,gBAAgB;CAAG;;AAEjC,AAAA,2BAA2B,CAAC;EACxB,MAAM,EAAE,KAAK;CAAG;;AAEpB,AACI,+BAD2B,AAC1B,UAAW,CAAA,CAAC,EAAE;EACX,OAAO,EAAE,IAAI;CAAG;;AAExB,AACI,QADI,AACH,UAAW,CAAA,CAAC,EAAE;EACX,OAAO,EAAE,eAAe;CAAG;;AAEnC,AAEQ,iCAFyB,CAC7B,QAAQ,AACH,mBAAmB,CAAC;EACjB,IAAI,EAAE,IAAI;EACV,GAAG,EAAE,GAAG;CAAG;;AAEvB,AAEQ,mBAFW,AACd,qBAAqB,AACjB,kBAAkB,CAAC;EAChB,SAAS,EAAE,IAAI;CAIqB;;AAPhD,AAMoB,mBAND,AACd,qBAAqB,AACjB,kBAAkB,CAEf,oBAAoB,AACf,qBAAqB,CAClB,cAAc,CAAC;EACX,UAAU,EAAE,GAAG;CAAG;;AAP1C,AAQI,mBARe,CAQf,oBAAoB,CAAC;EACjB,SAAS,EAAE,KAAK;CAIe;;AAbvC,AAYgB,mBAZG,CAQf,oBAAoB,CAEhB,eAAe,AACV,QAAQ,AACJ,aAAa,CAAC;EACX,IAAI,EAAE,IAAI;CAAG;;AAbjC,AAcI,mBAde,CAcf,cAAc,CAAC;EACX,UAAU,EAAE,GAAG;CAAG;;AAE1B,AAAA,iBAAiB,CAAC;EACd,GAAG,EAAE,IAAI;CAAG;;AAIhB,AAAA,mBAAmB,CAAC;EAChB,GAAG,EAAE,eAAe;EACpB,IAAI,EAAE,eAAe;EACrB,KAAK,EAAE,cAAc;CAIsB;;AAP/C,AAMY,mBANO,CAIf,kBAAkB,AACb,kBAAkB,AACd,qBAAqB,CAAC;EACnB,MAAM,EAAE,cAAc;CAAG;;ACxEzC,AACI,uBADmB,CACnB,SAAS,CAAC;EACN,KAAK,EAAE,IAAI;CAsByB;;AAxB5C,AAIY,uBAJW,CACnB,SAAS,CAEL,UAAU,CACN,GAAG,CAAC;EACA,KAAK,EAAE,IAAI;CAAG;;AAL9B,AAMQ,uBANe,CACnB,SAAS,CAKL,gBAAgB,CAAC;EACb,KAAK,EAAE,GAAG;EACV,YAAY,EAAE,GAAG;EACjB,UAAU,EAAE,MAAM;EAClB,WAAW,EAAE,IAAI;EACjB,cAAc,EAAE,IAAI;CAaU;;AAxB1C,AAYY,uBAZW,CACnB,SAAS,CAKL,gBAAgB,CAMZ,MAAM,CAAC;EACH,OAAO,EAAE,IAAI;EACb,aAAa,EAAE,GAAG;EAClB,KAAK,EAAE,KAAK;EACZ,gBAAgB,EAAE,OAAO;EACzB,WAAW,EAAE,IAAI;EACjB,MAAM,EAAE,GAAG;CAMa;;AAxBxC,AAmBgB,uBAnBO,CACnB,SAAS,CAKL,gBAAgB,CAMZ,MAAM,AAOD,MAAM,CAAC;EACJ,KAAK,EAAE,OAAO;EACd,OAAO,EAAE,IAAI;EACb,gBAAgB,EAAE,OAAO;EACzB,MAAM,EAAE,iBAAiB;EACzB,MAAM,EAAE,OAAO;CAAG;;ACxBtC,AAAA,aAAa,CAAC;EACV,WAAW,EAAE,IAAI;EACjB,cAAc,EAAE,IAAI;EACpB,UAAU,EAAE,MAAM;EAClB,SAAS,EAAE,KAAK;EAChB,MAAM,EAAE,kBAAkB;EAC1B,aAAa,EAAE,IAAI;CA4BU;;AAlCjC,AAOI,aAPS,CAOT,QAAQ,CAAC;EACL,MAAM,EAAE,IAAI;EACZ,UAAU,EAAE,GAAG;CACrB;;AAVF,AAWI,aAXS,CAWT,QAAQ,CAAC;EACL,UAAU,EAAE,IAAI;CAsBO;;AAlC/B,AAaQ,aAbK,CAWT,QAAQ,CAEJ,CAAC,CAAC;EACE,OAAO,EAAE,iBAAiB;EAC1B,eAAe,EAAE,IAAI;EACrB,MAAM,EAAE,iBAAiB;CAAG;;AAhBxC,AAiBQ,aAjBK,CAWT,QAAQ,CAMJ,IAAI,CAAC;EACD,aAAa,EAAE,GAAG;CAAG;;AAlBjC,AAmBQ,aAnBK,CAWT,QAAQ,CAQJ,WAAW,CAAC;EACR,gBAAgB,EAAE,OAAO;EACzB,KAAK,EAAE,KAAK;EACZ,WAAW,EAAE,GAAG;EAChB,aAAa,EAAE,GAAG;EAClB,mBAAmB,EAAE,IAAI;CAKS;;AA7B9C,AAyBY,aAzBC,CAWT,QAAQ,CAQJ,WAAW,AAMN,MAAM,CAAC;EACJ,mBAAmB,EAAE,IAAI;EACzB,KAAK,EAAE,OAAO;EACd,gBAAgB,EAAE,KAAK;EACvB,MAAM,EAAE,iBAAiB;CAAG;;AA7B5C,AA8BQ,aA9BK,CAWT,QAAQ,CAmBJ,mBAAmB,CAAC;EAChB,KAAK,EAAE,IAAI;EACX,WAAW,EAAE,GAAG;EAChB,MAAM,EAAE,GAAG;EACX,SAAS,EAAE,GAAG;CAAG"
17
  }
css/style.min.css CHANGED
@@ -1,2 +1,2 @@
1
- input[type=checkbox]{-webkit-appearance:checkbox!important}input[type=radio]{-webkit-appearance:radio!important}.fm-header{box-shadow:0 1px 0;padding-left:50px;width:94%}.fm-header>h1{color:#0073aa;display:inline-block}.fm-header>ul{display:inline-block;float:right}.fm-header>ul>li{display:inline-block;margin:5px;padding:5px}.fm-header .fm-logo{width:50px;height:auto;position:relative;top:15px;left:-15px}.fm-header .top-right-menu{position:relative;top:25px}.fm-container .col-main .fm-data{border-left:5px solid #0073aa;padding:24px 0 24px 0}.fm-container .col-main .fm-data>table{margin-left:auto;margin-right:auto}.fm-container .col-main .fm-data>table>tr>tr{padding:5px}.fm-container .col-sidebar{width:30%}.fm-container .col-sidebar .fm-extensions{margin:10px}.fm-container .col-sidebar .fm-extensions>h2{color:#0073aa;padding-top:20px;text-align:center}.fm-container{width:98%;min-height:500px;margin-top:20px}.fm-container .col-main{width:69.6%;min-height:200px;float:left}.fm-container .col-sidebar{min-width:29.6;min-height:200px;float:right}.fm-container .gb-fm-row{width:98%;background-color:#fff;min-height:100px;margin:5px;margin-bottom:20px}.fm-marketing a{color:#fff;text-decoration:none;font-size:120%;padding:5px;padding-left:10px;padding-right:10px;background-color:#d92519}.fm-call-toaction{color:#fff;background-color:#d92519;font-size:120%;padding:10px;margin:20px}.fm-call-toaction:hover{color:#fff}.fm-footer{width:98%;float:left;background-color:#ddd;text-align:center}.fm-footer ul li{display:inline-block;margin-left:10px}.fmp-settings h2{text-align:center;padding-top:20px;padding-bottom:20px;font-weight:700}.fmp-settings>form>h4{display:inline-block;margin-left:20px}.fmp-settings table{padding:10px;padding-left:20px}.fmp-settings table tr td{padding:10px}.fmp-settings input[type=submit]{padding:10px 20px 10px 20px;color:#fff;font-size:120%;border-radius:4px;text-shadow:0 1px 1px rgba(0,0,0,.2);background:#1cb841;cursor:pointer}.fmtp_theme_wrapper{display:inline-block;width:19%}.fmtp_theme_screenshot{max-width:100px}.file-manager-shortcode-table{margin:10px;padding:10px}.file-manager-shortcode-table td{margin:5px;padding:5px}.file-manager-shortcode-table-shortcode{font-weight:700;font-size:120%}.fmp_extend{background-color:#31a6cb;color:#fff}.fmp_extend a{color:#fff}.fm_permission_system_advert img{width:25%;border:2px solid #0ff;display:inline-block;margin:5px;padding:5px;margin-bottom:5px;display:block;margin-left:auto;margin-right:auto}.fm_permission_system_advert span{width:100%;display:inline-block;margin:10px;padding:10px;text-align:center}.footer-sticky-button{background:0 0;margin:0;position:fixed;bottom:0;right:0;z-index:100;background-color:#b10c0c;padding:10px;border-radius:5px}.footer-sticky-button a{text-decoration:none;color:#fff;font-size:1.1em}.badge-pro{position:relative}.badge-pro[data-badge]:after{content:attr(data-badge);position:absolute;top:-10px;right:-10px;font-size:1em;background:#b10c0c;color:#fff;width:24px;height:24px;text-align:center;line-height:24px;border-radius:50%;box-shadow:0 0 1px #333}.badge-free{position:relative}.badge-free[data-badge]:after{content:attr(data-badge);position:absolute;top:-10px;right:-10px;font-size:1em;background:#fff;color:#000;width:24px;height:24px;text-align:center;line-height:24px;border-radius:50%;box-shadow:0 0 1px #333}.fm-error{border-left:4px solid red;display:block}.fm-donation{text-align:center;margin:10px}.fm-donation>form{padding-bottom:20px}.fm-donation>p{text-align:justify}.fm-donation>h2{color:#0073aa;padding-top:20px}.ui-widget textarea{font-family:Verdana,Arial,sans-serif,Trebuchet MS,Tahoma;font-size:1.3em;background-color:#f0f0f0;padding:10px;text-align:left}.ui-dialog:nth-child(7){width:760px!important;top:10px!important;left:10px!important}.elfinder-file-edit{height:475px}.ui-helper-reset:nth-child(9){position:absolute!important;width:760px!important;height:auto!important;top:150px!important;left:190px!important}.elfinder-quicklook-preview{height:510px}.elfinder-quicklook-navbar-icon:nth-child(2){display:none}.ui-icon:nth-child(4){display:none!important}.sudo-permission-system .col-main{width:100%}.sudo-permission-system .col-main .gb-fm-row img{width:100%}.sudo-permission-system .col-main .fmp-demo-notice{width:98%;padding-left:5px;text-align:center;padding-top:20px;padding-bottom:20px}.sudo-permission-system .col-main .fmp-demo-notice button{padding:15px;border-radius:0;color:#fff;background-color:#1cb841;font-weight:700;border:0}.sudo-permission-system .col-main .fmp-demo-notice button:hover{color:#1cb841;padding:14px;background-color:#f1f1f1;border:1px solid #1cb841;cursor:pointer}.review-block{padding-top:24px;padding-bottom:24px;text-align:center;font-size:1.2em;border:1px dashed #0d5ed9;border-radius:10px}.review-block .message{margin:16px;margin-top:8px}.review-block .actions{margin-top:24px}.review-block .actions a{padding:5px 10px 5px 10px;text-decoration:none;border:1px solid #0d5ed9}.review-block .actions .btn{border-radius:5px}.review-block .actions .btn-review{background-color:#0d5ed9;color:#fff;font-weight:700;border-radius:5px;transition-duration:.6s}.review-block .actions .btn-review:hover{transition-duration:.6s;color:#0d5ed9;background-color:#fff;border:2px solid #0d5ed9}.review-block .actions .btn-not-interested{color:gray;font-weight:400;border:0;font-size:1em}
2
  /*# sourceMappingURL=style.min.css.map */
1
+ input[type=checkbox]{-webkit-appearance:checkbox!important}input[type=radio]{-webkit-appearance:radio!important}.fm-header{box-shadow:0 1px 0;padding-left:50px;width:94%}.fm-header>h1{color:#0073aa;display:inline-block}.fm-header>ul{display:inline-block;float:right}.fm-header>ul>li{display:inline-block;margin:5px;padding:5px}.fm-header .fm-logo{width:50px;height:auto;position:relative;top:15px;left:-15px}.fm-header .top-right-menu{position:relative;top:25px}.fm-container .col-main .fm-data{border-left:5px solid #0073aa;padding:24px 0 24px 0}.fm-container .col-main .fm-data>table{margin-left:auto;margin-right:auto}.fm-container .col-main .fm-data>table>tr>tr{padding:5px}.fm-container .col-sidebar{width:30%}.fm-container .col-sidebar .fm-extensions{margin:10px}.fm-container .col-sidebar .fm-extensions>h2{color:#0073aa;padding-top:20px;text-align:center}.fm-container{width:98%;min-height:500px;margin-top:20px}.fm-container .col-main{width:69.6%;min-height:200px;float:left}.fm-container .col-sidebar{min-width:29.6;min-height:200px;float:right}.fm-container .gb-fm-row{width:98%;background-color:#fff;min-height:100px;margin:5px;margin-bottom:20px}.fm-marketing a{color:#fff;text-decoration:none;font-size:120%;padding:5px;padding-left:10px;padding-right:10px;background-color:#d92519}.fm-call-toaction{color:#fff;background-color:#d92519;font-size:120%;padding:10px;margin:20px}.fm-call-toaction:hover{color:#fff}.fm-footer{width:98%;float:left;background-color:#ddd;text-align:center}.fm-footer ul li{display:inline-block;margin-left:10px}.fmp-settings h2{text-align:center;padding-top:20px;padding-bottom:20px;font-weight:700}.fmp-settings>form>h4{display:inline-block;margin-left:20px}.fmp-settings table{padding:10px;padding-left:20px}.fmp-settings table tr td{padding:10px}.fmp-settings input[type=submit]{padding:10px 20px 10px 20px;color:#fff;font-size:120%;border-radius:4px;text-shadow:0 1px 1px rgba(0,0,0,.2);background:#1cb841;cursor:pointer}.fmtp_theme_wrapper{display:inline-block;width:19%}.fmtp_theme_screenshot{max-width:100px}.file-manager-shortcode-table{margin:10px;padding:10px}.file-manager-shortcode-table td{margin:5px;padding:5px}.file-manager-shortcode-table-shortcode{font-weight:700;font-size:120%}.fmp_extend{background-color:#31a6cb;color:#fff}.fmp_extend a{color:#fff}.fm_permission_system_advert img{width:25%;border:2px solid #0ff;display:inline-block;margin:5px;padding:5px;margin-bottom:5px;display:block;margin-left:auto;margin-right:auto}.fm_permission_system_advert span{width:100%;display:inline-block;margin:10px;padding:10px;text-align:center}.footer-sticky-button{background:0 0;margin:0;position:fixed;bottom:0;right:0;z-index:100;background-color:#b10c0c;padding:10px;border-radius:5px}.footer-sticky-button a{text-decoration:none;color:#fff;font-size:1.1em}.badge-pro{position:relative}.badge-pro[data-badge]:after{content:attr(data-badge);position:absolute;top:-10px;right:-10px;font-size:1em;background:#b10c0c;color:#fff;width:24px;height:24px;text-align:center;line-height:24px;border-radius:50%;box-shadow:0 0 1px #333}.badge-free{position:relative}.badge-free[data-badge]:after{content:attr(data-badge);position:absolute;top:-10px;right:-10px;font-size:1em;background:#fff;color:#000;width:24px;height:24px;text-align:center;line-height:24px;border-radius:50%;box-shadow:0 0 1px #333}.fm-error{border-left:4px solid red;display:block}.fm-donation{text-align:center;margin:10px}.fm-donation>form{padding-bottom:20px}.fm-donation>p{text-align:justify}.fm-donation>h2{color:#0073aa;padding-top:20px}.ui-widget textarea{font-family:Verdana,Arial,sans-serif,Trebuchet MS,Tahoma;font-size:1.3em;background-color:#f0f0f0;padding:10px;text-align:left}.ui-dialog:nth-child(7){width:760px!important;top:10px!important;left:10px!important}.elfinder-file-edit{height:475px}.ui-helper-reset:nth-child(9){position:absolute!important;width:760px!important;height:auto!important;top:150px!important;left:190px!important}.elfinder-quicklook-preview{height:510px}.elfinder-quicklook-navbar-icon:nth-child(2){display:none}.ui-icon:nth-child(4){display:none!important}.elfinder-quicklook-titlebar-icon .ui-icon.ui-icon-closethick{left:20px;top:8px}.ui-helper-clearfix.ui-dialog-buttonpane.ui-widget-content{font-size:12px}.ui-helper-clearfix.ui-dialog-buttonpane.ui-widget-content .ui-dialog-buttonset.elfinder-edit-extras .ui-corner-all{margin-top:0}.ui-helper-clearfix .ui-button-icon-only{min-width:125px}.ui-helper-clearfix .ui-button-icon-only .ui-button-icon.ui-icon.ui-icon-gear{left:12px}.ui-helper-clearfix .ui-corner-all{margin-top:0}#ace_settingsmenu{top:32px}.elfinder-maximized{top:32px!important;left:30px!important;width:96%!important}.elfinder-maximized .ui-dialog-content.ui-widget-content.elfinder-edit-editor{height:81%!important}.sudo-permission-system .col-main{width:100%}.sudo-permission-system .col-main .gb-fm-row img{width:100%}.sudo-permission-system .col-main .fmp-demo-notice{width:98%;padding-left:5px;text-align:center;padding-top:20px;padding-bottom:20px}.sudo-permission-system .col-main .fmp-demo-notice button{padding:15px;border-radius:0;color:#fff;background-color:#1cb841;font-weight:700;border:0}.sudo-permission-system .col-main .fmp-demo-notice button:hover{color:#1cb841;padding:14px;background-color:#f1f1f1;border:1px solid #1cb841;cursor:pointer}.review-block{padding-top:24px;padding-bottom:24px;text-align:center;font-size:1.2em;border:1px dashed #0d5ed9;border-radius:10px}.review-block .message{margin:16px;margin-top:8px}.review-block .actions{margin-top:24px}.review-block .actions a{padding:5px 10px 5px 10px;text-decoration:none;border:1px solid #0d5ed9}.review-block .actions .btn{border-radius:5px}.review-block .actions .btn-review{background-color:#0d5ed9;color:#fff;font-weight:700;border-radius:5px;transition-duration:.6s}.review-block .actions .btn-review:hover{transition-duration:.6s;color:#0d5ed9;background-color:#fff;border:2px solid #0d5ed9}.review-block .actions .btn-not-interested{color:gray;font-weight:400;border:0;font-size:1em}
2
  /*# sourceMappingURL=style.min.css.map */
css/style.min.css.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["css/style.css"],"names":[],"mappings":"AAAA,qBACE,mBAAoB,mBAGtB,kBACE,mBAAoB,gBAGtB,WACE,WAAY,EAAI,IAAI,EACpB,aAAc,KACd,MAAO,IAGT,cACE,MAAO,QACP,QAAS,aAGX,cACE,QAAS,aACT,MAAO,MAGT,iBACE,QAAS,aACT,OAAQ,IACR,QAAS,IAGX,oBACE,MAAO,KACP,OAAQ,KACR,SAAU,SACV,IAAK,KACL,KAAM,MAGR,2BACE,SAAU,SACV,IAAK,KAGP,iCACE,YAAa,IAAI,MAAM,QACvB,QAAS,KAAK,EAAI,KAAK,EAGzB,uCACE,YAAa,KACb,aAAc,KAGhB,6CACE,QAAS,IAGX,2BACE,MAAO,IAGT,0CACE,OAAQ,KAGV,6CACE,MAAO,QACP,YAAa,KACb,WAAY,OAGd,cACE,MAAO,IACP,WAAY,MACZ,WAAY,KAGd,wBACE,MAAO,MACP,WAAY,MACZ,MAAO,KAGT,2BACE,UAAW,KACX,WAAY,MACZ,MAAO,MAGT,yBACE,MAAO,IACP,iBAAkB,KAClB,WAAY,MACZ,OAAQ,IACR,cAAe,KAGjB,gBACE,MAAO,KACP,gBAAiB,KACjB,UAAW,KACX,QAAS,IACT,aAAc,KACd,cAAe,KACf,iBAAkB,QAGpB,kBACE,MAAO,KACP,iBAAkB,QAClB,UAAW,KACX,QAAS,KACT,OAAQ,KAGV,wBACE,MAAO,KAGT,WACE,MAAO,IACP,MAAO,KACP,iBAAkB,KAClB,WAAY,OAGd,iBACE,QAAS,aACT,YAAa,KAGf,iBACE,WAAY,OACZ,YAAa,KACb,eAAgB,KAChB,YAAa,IAGf,sBACE,QAAS,aACT,YAAa,KAGf,oBACE,QAAS,KACT,aAAc,KAGhB,0BACE,QAAS,KAGX,iCACE,QAAS,KAAK,KAAK,KAAK,KACxB,MAAO,KACP,UAAW,KACX,cAAe,IACf,YAAa,EAAE,IAAI,IAAI,eACvB,WAAY,QACZ,OAAQ,QAGV,oBACE,QAAS,aACT,MAAO,IAGT,uBACE,UAAW,MAGb,8BACE,OAAQ,KACR,QAAS,KAGX,iCACE,OAAQ,IACR,QAAS,IAGX,wCACE,YAAa,IACb,UAAW,KAGb,YACE,iBAAkB,QAClB,MAAO,KAGT,cACE,MAAO,KAGT,iCACE,MAAO,IACP,OAAQ,IAAI,MAAM,KAClB,QAAS,aACT,OAAQ,IACR,QAAS,IACT,cAAe,IACf,QAAS,MACT,YAAa,KACb,aAAc,KAGhB,kCACE,MAAO,KACP,QAAS,aACT,OAAQ,KACR,QAAS,KACT,WAAY,OAGd,sBACE,WAAY,IACZ,OAAQ,EACR,SAAU,MACV,OAAQ,EACR,MAAO,EACP,QAAS,IACT,iBAAkB,QAClB,QAAS,KACT,cAAe,IAGjB,wBACE,gBAAiB,KACjB,MAAO,KACP,UAAW,MAGb,WACE,SAAU,SAGZ,6BACE,QAAS,iBACT,SAAU,SACV,IAAK,MACL,MAAO,MACP,UAAW,IACX,WAAY,QACZ,MAAO,KACP,MAAO,KACP,OAAQ,KACR,WAAY,OACZ,YAAa,KACb,cAAe,IACf,WAAY,EAAE,EAAE,IAAI,KAGtB,YACE,SAAU,SAGZ,8BACE,QAAS,iBACT,SAAU,SACV,IAAK,MACL,MAAO,MACP,UAAW,IACX,WAAY,KACZ,MAAO,KACP,MAAO,KACP,OAAQ,KACR,WAAY,OACZ,YAAa,KACb,cAAe,IACf,WAAY,EAAE,EAAE,IAAI,KAGtB,UACE,YAAa,IAAI,MAAM,IACvB,QAAS,MAGX,aACE,WAAY,OACZ,OAAQ,KAGV,kBACE,eAAgB,KAGlB,eACE,WAAY,QAGd,gBACE,MAAO,QACP,YAAa,KAGf,oBACE,YAAa,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,UAAU,EAAE,CAAC,OACnD,UAAW,MACX,iBAAkB,QAClB,QAAS,KACT,WAAY,KAGd,wBACE,MAAO,gBACP,IAAK,eACL,KAAM,eAGR,oBACE,OAAQ,MAGV,8BACE,SAAU,mBACV,MAAO,gBACP,OAAQ,eACR,IAAK,gBACL,KAAM,gBAGR,4BACE,OAAQ,MAGV,6CACE,QAAS,KAGX,sBACE,QAAS,eAGX,kCACE,MAAO,KAGT,iDACE,MAAO,KAGT,mDACE,MAAO,IACP,aAAc,IACd,WAAY,OACZ,YAAa,KACb,eAAgB,KAGlB,0DACE,QAAS,KACT,cAAe,EACf,MAAO,KACP,iBAAkB,QAClB,YAAa,IACb,OAAQ,EAGV,gEACE,MAAO,QACP,QAAS,KACT,iBAAkB,QAClB,OAAQ,IAAI,MAAM,QAClB,OAAQ,QAGV,cACE,YAAa,KACb,eAAgB,KAChB,WAAY,OACZ,UAAW,MACX,OAAQ,IAAI,OAAO,QACnB,cAAe,KAGjB,uBACE,OAAQ,KACR,WAAY,IAGd,uBACE,WAAY,KAGd,yBACE,QAAS,IAAI,KAAK,IAAI,KACtB,gBAAiB,KACjB,OAAQ,IAAI,MAAM,QAGpB,4BACE,cAAe,IAGjB,mCACE,iBAAkB,QAClB,MAAO,KACP,YAAa,IACb,cAAe,IACf,oBAAqB,IAGvB,yCACE,oBAAqB,IACrB,MAAO,QACP,iBAAkB,KAClB,OAAQ,IAAI,MAAM,QAGpB,2CACE,MAAO,KACP,YAAa,IACb,OAAQ,EACR,UAAW","sourcesContent":["input[type=checkbox] {\n -webkit-appearance: checkbox !important;\n}\n\ninput[type=radio] {\n -webkit-appearance: radio !important;\n}\n\n.fm-header {\n box-shadow: 0px 1px 0px;\n padding-left: 50px;\n width: 94%;\n}\n\n.fm-header > h1 {\n color: #0073AA;\n display: inline-block;\n}\n\n.fm-header > ul {\n display: inline-block;\n float: right;\n}\n\n.fm-header > ul > li {\n display: inline-block;\n margin: 5px;\n padding: 5px;\n}\n\n.fm-header .fm-logo {\n width: 50px;\n height: auto;\n position: relative;\n top: 15px;\n left: -15px;\n}\n\n.fm-header .top-right-menu {\n position: relative;\n top: 25px;\n}\n\n.fm-container .col-main .fm-data {\n border-left: 5px solid #0073AA;\n padding: 24px 0px 24px 0px;\n}\n\n.fm-container .col-main .fm-data > table {\n margin-left: auto;\n margin-right: auto;\n}\n\n.fm-container .col-main .fm-data > table > tr > tr {\n padding: 5px;\n}\n\n.fm-container .col-sidebar {\n width: 30%;\n}\n\n.fm-container .col-sidebar .fm-extensions {\n margin: 10px;\n}\n\n.fm-container .col-sidebar .fm-extensions > h2 {\n color: #0073AA;\n padding-top: 20px;\n text-align: center;\n}\n\n.fm-container {\n width: 98%;\n min-height: 500px;\n margin-top: 20px;\n}\n\n.fm-container .col-main {\n width: 69.6%;\n min-height: 200px;\n float: left;\n}\n\n.fm-container .col-sidebar {\n min-width: 29.6;\n min-height: 200px;\n float: right;\n}\n\n.fm-container .gb-fm-row {\n width: 98%;\n background-color: white;\n min-height: 100px;\n margin: 5px;\n margin-bottom: 20px;\n}\n\n.fm-marketing a {\n color: white;\n text-decoration: none;\n font-size: 120%;\n padding: 5px;\n padding-left: 10px;\n padding-right: 10px;\n background-color: #D92519;\n}\n\n.fm-call-toaction {\n color: white;\n background-color: #D92519;\n font-size: 120%;\n padding: 10px;\n margin: 20px;\n}\n\n.fm-call-toaction:hover {\n color: white;\n}\n\n.fm-footer {\n width: 98%;\n float: left;\n background-color: #DDDDDD;\n text-align: center;\n}\n\n.fm-footer ul li {\n display: inline-block;\n margin-left: 10px;\n}\n\n.fmp-settings h2 {\n text-align: center;\n padding-top: 20px;\n padding-bottom: 20px;\n font-weight: bold;\n}\n\n.fmp-settings > form > h4 {\n display: inline-block;\n margin-left: 20px;\n}\n\n.fmp-settings table {\n padding: 10px;\n padding-left: 20px;\n}\n\n.fmp-settings table tr td {\n padding: 10px;\n}\n\n.fmp-settings input[type=submit] {\n padding: 10px 20px 10px 20px;\n color: white;\n font-size: 120%;\n border-radius: 4px;\n text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);\n background: #1cb841;\n cursor: pointer;\n}\n\n.fmtp_theme_wrapper {\n display: inline-block;\n width: 19%;\n}\n\n.fmtp_theme_screenshot {\n max-width: 100px;\n}\n\n.file-manager-shortcode-table {\n margin: 10px;\n padding: 10px;\n}\n\n.file-manager-shortcode-table td {\n margin: 5px;\n padding: 5px;\n}\n\n.file-manager-shortcode-table-shortcode {\n font-weight: bold;\n font-size: 120%;\n}\n\n.fmp_extend {\n background-color: #31A6CB;\n color: white;\n}\n\n.fmp_extend a {\n color: white;\n}\n\n.fm_permission_system_advert img {\n width: 25%;\n border: 2px solid cyan;\n display: inline-block;\n margin: 5px;\n padding: 5px;\n margin-bottom: 5px;\n display: block;\n margin-left: auto;\n margin-right: auto;\n}\n\n.fm_permission_system_advert span {\n width: 100%;\n display: inline-block;\n margin: 10px;\n padding: 10px;\n text-align: center;\n}\n\n.footer-sticky-button {\n background: none;\n margin: 0px;\n position: fixed;\n bottom: 0px;\n right: 0px;\n z-index: 100;\n background-color: #B10C0C;\n padding: 10px;\n border-radius: 5px;\n}\n\n.footer-sticky-button a {\n text-decoration: none;\n color: white;\n font-size: 1.1em;\n}\n\n.badge-pro {\n position: relative;\n}\n\n.badge-pro[data-badge]:after {\n content: attr(data-badge);\n position: absolute;\n top: -10px;\n right: -10px;\n font-size: 1em;\n background: #B10C0C;\n color: white;\n width: 24px;\n height: 24px;\n text-align: center;\n line-height: 24px;\n border-radius: 50%;\n box-shadow: 0 0 1px #333;\n}\n\n.badge-free {\n position: relative;\n}\n\n.badge-free[data-badge]:after {\n content: attr(data-badge);\n position: absolute;\n top: -10px;\n right: -10px;\n font-size: 1em;\n background: white;\n color: black;\n width: 24px;\n height: 24px;\n text-align: center;\n line-height: 24px;\n border-radius: 50%;\n box-shadow: 0 0 1px #333;\n}\n\n.fm-error {\n border-left: 4px solid red;\n display: block;\n}\n\n.fm-donation {\n text-align: center;\n margin: 10px;\n}\n\n.fm-donation > form {\n padding-bottom: 20px;\n}\n\n.fm-donation > p {\n text-align: justify;\n}\n\n.fm-donation > h2 {\n color: #0073AA;\n padding-top: 20px;\n}\n\n.ui-widget textarea {\n font-family: Verdana,Arial,sans-serif,Trebuchet MS,Tahoma;\n font-size: 1.3em;\n background-color: #f0f0f0;\n padding: 10px;\n text-align: left;\n}\n\n.ui-dialog:nth-child(7) {\n width: 760px !important;\n top: 10px !important;\n left: 10px !important;\n}\n\n.elfinder-file-edit {\n height: 475px;\n}\n\n.ui-helper-reset:nth-child(9) {\n position: absolute !important;\n width: 760px !important;\n height: auto !important;\n top: 150px !important;\n left: 190px !important;\n}\n\n.elfinder-quicklook-preview {\n height: 510px;\n}\n\n.elfinder-quicklook-navbar-icon:nth-child(2) {\n display: none;\n}\n\n.ui-icon:nth-child(4) {\n display: none !important;\n}\n\n.sudo-permission-system .col-main {\n width: 100%;\n}\n\n.sudo-permission-system .col-main .gb-fm-row img {\n width: 100%;\n}\n\n.sudo-permission-system .col-main .fmp-demo-notice {\n width: 98%;\n padding-left: 5px;\n text-align: center;\n padding-top: 20px;\n padding-bottom: 20px;\n}\n\n.sudo-permission-system .col-main .fmp-demo-notice button {\n padding: 15px;\n border-radius: 0px;\n color: white;\n background-color: #1CB841;\n font-weight: bold;\n border: 0px;\n}\n\n.sudo-permission-system .col-main .fmp-demo-notice button:hover {\n color: #1CB841;\n padding: 14px;\n background-color: #F1F1F1;\n border: 1px solid #1CB841;\n cursor: pointer;\n}\n\n.review-block {\n padding-top: 24px;\n padding-bottom: 24px;\n text-align: center;\n font-size: 1.2em;\n border: 1px dashed #0d5ed9;\n border-radius: 10px;\n}\n\n.review-block .message {\n margin: 16px;\n margin-top: 8px;\n}\n\n.review-block .actions {\n margin-top: 24px;\n}\n\n.review-block .actions a {\n padding: 5px 10px 5px 10px;\n text-decoration: none;\n border: 1px solid #0d5ed9;\n}\n\n.review-block .actions .btn {\n border-radius: 5px;\n}\n\n.review-block .actions .btn-review {\n background-color: #0d5ed9;\n color: white;\n font-weight: 700;\n border-radius: 5px;\n transition-duration: 0.6s;\n}\n\n.review-block .actions .btn-review:hover {\n transition-duration: 0.6s;\n color: #0d5ed9;\n background-color: white;\n border: 2px solid #0d5ed9;\n}\n\n.review-block .actions .btn-not-interested {\n color: gray;\n font-weight: 400;\n border: 0px;\n font-size: 1em;\n}\n\n/*# sourceMappingURL=style.css.map */"]}
1
+ {"version":3,"sources":["css/style.css"],"names":[],"mappings":"AAAA,qBACE,mBAAoB,mBAGtB,kBACE,mBAAoB,gBAGtB,WACE,WAAY,EAAI,IAAI,EACpB,aAAc,KACd,MAAO,IAGT,cACE,MAAO,QACP,QAAS,aAGX,cACE,QAAS,aACT,MAAO,MAGT,iBACE,QAAS,aACT,OAAQ,IACR,QAAS,IAGX,oBACE,MAAO,KACP,OAAQ,KACR,SAAU,SACV,IAAK,KACL,KAAM,MAGR,2BACE,SAAU,SACV,IAAK,KAGP,iCACE,YAAa,IAAI,MAAM,QACvB,QAAS,KAAK,EAAI,KAAK,EAGzB,uCACE,YAAa,KACb,aAAc,KAGhB,6CACE,QAAS,IAGX,2BACE,MAAO,IAGT,0CACE,OAAQ,KAGV,6CACE,MAAO,QACP,YAAa,KACb,WAAY,OAGd,cACE,MAAO,IACP,WAAY,MACZ,WAAY,KAGd,wBACE,MAAO,MACP,WAAY,MACZ,MAAO,KAGT,2BACE,UAAW,KACX,WAAY,MACZ,MAAO,MAGT,yBACE,MAAO,IACP,iBAAkB,KAClB,WAAY,MACZ,OAAQ,IACR,cAAe,KAGjB,gBACE,MAAO,KACP,gBAAiB,KACjB,UAAW,KACX,QAAS,IACT,aAAc,KACd,cAAe,KACf,iBAAkB,QAGpB,kBACE,MAAO,KACP,iBAAkB,QAClB,UAAW,KACX,QAAS,KACT,OAAQ,KAGV,wBACE,MAAO,KAGT,WACE,MAAO,IACP,MAAO,KACP,iBAAkB,KAClB,WAAY,OAGd,iBACE,QAAS,aACT,YAAa,KAGf,iBACE,WAAY,OACZ,YAAa,KACb,eAAgB,KAChB,YAAa,IAGf,sBACE,QAAS,aACT,YAAa,KAGf,oBACE,QAAS,KACT,aAAc,KAGhB,0BACE,QAAS,KAGX,iCACE,QAAS,KAAK,KAAK,KAAK,KACxB,MAAO,KACP,UAAW,KACX,cAAe,IACf,YAAa,EAAE,IAAI,IAAI,eACvB,WAAY,QACZ,OAAQ,QAGV,oBACE,QAAS,aACT,MAAO,IAGT,uBACE,UAAW,MAGb,8BACE,OAAQ,KACR,QAAS,KAGX,iCACE,OAAQ,IACR,QAAS,IAGX,wCACE,YAAa,IACb,UAAW,KAGb,YACE,iBAAkB,QAClB,MAAO,KAGT,cACE,MAAO,KAGT,iCACE,MAAO,IACP,OAAQ,IAAI,MAAM,KAClB,QAAS,aACT,OAAQ,IACR,QAAS,IACT,cAAe,IACf,QAAS,MACT,YAAa,KACb,aAAc,KAGhB,kCACE,MAAO,KACP,QAAS,aACT,OAAQ,KACR,QAAS,KACT,WAAY,OAGd,sBACE,WAAY,IACZ,OAAQ,EACR,SAAU,MACV,OAAQ,EACR,MAAO,EACP,QAAS,IACT,iBAAkB,QAClB,QAAS,KACT,cAAe,IAGjB,wBACE,gBAAiB,KACjB,MAAO,KACP,UAAW,MAGb,WACE,SAAU,SAGZ,6BACE,QAAS,iBACT,SAAU,SACV,IAAK,MACL,MAAO,MACP,UAAW,IACX,WAAY,QACZ,MAAO,KACP,MAAO,KACP,OAAQ,KACR,WAAY,OACZ,YAAa,KACb,cAAe,IACf,WAAY,EAAE,EAAE,IAAI,KAGtB,YACE,SAAU,SAGZ,8BACE,QAAS,iBACT,SAAU,SACV,IAAK,MACL,MAAO,MACP,UAAW,IACX,WAAY,KACZ,MAAO,KACP,MAAO,KACP,OAAQ,KACR,WAAY,OACZ,YAAa,KACb,cAAe,IACf,WAAY,EAAE,EAAE,IAAI,KAGtB,UACE,YAAa,IAAI,MAAM,IACvB,QAAS,MAGX,aACE,WAAY,OACZ,OAAQ,KAGV,kBACE,eAAgB,KAGlB,eACE,WAAY,QAGd,gBACE,MAAO,QACP,YAAa,KAGf,oBACE,YAAa,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,UAAU,EAAE,CAAC,OACnD,UAAW,MACX,iBAAkB,QAClB,QAAS,KACT,WAAY,KAGd,wBACE,MAAO,gBACP,IAAK,eACL,KAAM,eAGR,oBACE,OAAQ,MAGV,8BACE,SAAU,mBACV,MAAO,gBACP,OAAQ,eACR,IAAK,gBACL,KAAM,gBAGR,4BACE,OAAQ,MAGV,6CACE,QAAS,KAGX,sBACE,QAAS,eAGX,8DACE,KAAM,KACN,IAAK,IAGP,2DACE,UAAW,KAGb,oHACE,WAAY,EAGd,yCACE,UAAW,MAGb,8EACE,KAAM,KAGR,mCACE,WAAY,EAGd,kBACE,IAAK,KAGP,oBACE,IAAK,eACL,KAAM,eACN,MAAO,cAGT,8EACE,OAAQ,cAGV,kCACE,MAAO,KAGT,iDACE,MAAO,KAGT,mDACE,MAAO,IACP,aAAc,IACd,WAAY,OACZ,YAAa,KACb,eAAgB,KAGlB,0DACE,QAAS,KACT,cAAe,EACf,MAAO,KACP,iBAAkB,QAClB,YAAa,IACb,OAAQ,EAGV,gEACE,MAAO,QACP,QAAS,KACT,iBAAkB,QAClB,OAAQ,IAAI,MAAM,QAClB,OAAQ,QAGV,cACE,YAAa,KACb,eAAgB,KAChB,WAAY,OACZ,UAAW,MACX,OAAQ,IAAI,OAAO,QACnB,cAAe,KAGjB,uBACE,OAAQ,KACR,WAAY,IAGd,uBACE,WAAY,KAGd,yBACE,QAAS,IAAI,KAAK,IAAI,KACtB,gBAAiB,KACjB,OAAQ,IAAI,MAAM,QAGpB,4BACE,cAAe,IAGjB,mCACE,iBAAkB,QAClB,MAAO,KACP,YAAa,IACb,cAAe,IACf,oBAAqB,IAGvB,yCACE,oBAAqB,IACrB,MAAO,QACP,iBAAkB,KAClB,OAAQ,IAAI,MAAM,QAGpB,2CACE,MAAO,KACP,YAAa,IACb,OAAQ,EACR,UAAW","sourcesContent":["input[type=checkbox] {\n -webkit-appearance: checkbox !important;\n}\n\ninput[type=radio] {\n -webkit-appearance: radio !important;\n}\n\n.fm-header {\n box-shadow: 0px 1px 0px;\n padding-left: 50px;\n width: 94%;\n}\n\n.fm-header > h1 {\n color: #0073AA;\n display: inline-block;\n}\n\n.fm-header > ul {\n display: inline-block;\n float: right;\n}\n\n.fm-header > ul > li {\n display: inline-block;\n margin: 5px;\n padding: 5px;\n}\n\n.fm-header .fm-logo {\n width: 50px;\n height: auto;\n position: relative;\n top: 15px;\n left: -15px;\n}\n\n.fm-header .top-right-menu {\n position: relative;\n top: 25px;\n}\n\n.fm-container .col-main .fm-data {\n border-left: 5px solid #0073AA;\n padding: 24px 0px 24px 0px;\n}\n\n.fm-container .col-main .fm-data > table {\n margin-left: auto;\n margin-right: auto;\n}\n\n.fm-container .col-main .fm-data > table > tr > tr {\n padding: 5px;\n}\n\n.fm-container .col-sidebar {\n width: 30%;\n}\n\n.fm-container .col-sidebar .fm-extensions {\n margin: 10px;\n}\n\n.fm-container .col-sidebar .fm-extensions > h2 {\n color: #0073AA;\n padding-top: 20px;\n text-align: center;\n}\n\n.fm-container {\n width: 98%;\n min-height: 500px;\n margin-top: 20px;\n}\n\n.fm-container .col-main {\n width: 69.6%;\n min-height: 200px;\n float: left;\n}\n\n.fm-container .col-sidebar {\n min-width: 29.6;\n min-height: 200px;\n float: right;\n}\n\n.fm-container .gb-fm-row {\n width: 98%;\n background-color: white;\n min-height: 100px;\n margin: 5px;\n margin-bottom: 20px;\n}\n\n.fm-marketing a {\n color: white;\n text-decoration: none;\n font-size: 120%;\n padding: 5px;\n padding-left: 10px;\n padding-right: 10px;\n background-color: #D92519;\n}\n\n.fm-call-toaction {\n color: white;\n background-color: #D92519;\n font-size: 120%;\n padding: 10px;\n margin: 20px;\n}\n\n.fm-call-toaction:hover {\n color: white;\n}\n\n.fm-footer {\n width: 98%;\n float: left;\n background-color: #DDDDDD;\n text-align: center;\n}\n\n.fm-footer ul li {\n display: inline-block;\n margin-left: 10px;\n}\n\n.fmp-settings h2 {\n text-align: center;\n padding-top: 20px;\n padding-bottom: 20px;\n font-weight: bold;\n}\n\n.fmp-settings > form > h4 {\n display: inline-block;\n margin-left: 20px;\n}\n\n.fmp-settings table {\n padding: 10px;\n padding-left: 20px;\n}\n\n.fmp-settings table tr td {\n padding: 10px;\n}\n\n.fmp-settings input[type=submit] {\n padding: 10px 20px 10px 20px;\n color: white;\n font-size: 120%;\n border-radius: 4px;\n text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);\n background: #1cb841;\n cursor: pointer;\n}\n\n.fmtp_theme_wrapper {\n display: inline-block;\n width: 19%;\n}\n\n.fmtp_theme_screenshot {\n max-width: 100px;\n}\n\n.file-manager-shortcode-table {\n margin: 10px;\n padding: 10px;\n}\n\n.file-manager-shortcode-table td {\n margin: 5px;\n padding: 5px;\n}\n\n.file-manager-shortcode-table-shortcode {\n font-weight: bold;\n font-size: 120%;\n}\n\n.fmp_extend {\n background-color: #31A6CB;\n color: white;\n}\n\n.fmp_extend a {\n color: white;\n}\n\n.fm_permission_system_advert img {\n width: 25%;\n border: 2px solid cyan;\n display: inline-block;\n margin: 5px;\n padding: 5px;\n margin-bottom: 5px;\n display: block;\n margin-left: auto;\n margin-right: auto;\n}\n\n.fm_permission_system_advert span {\n width: 100%;\n display: inline-block;\n margin: 10px;\n padding: 10px;\n text-align: center;\n}\n\n.footer-sticky-button {\n background: none;\n margin: 0px;\n position: fixed;\n bottom: 0px;\n right: 0px;\n z-index: 100;\n background-color: #B10C0C;\n padding: 10px;\n border-radius: 5px;\n}\n\n.footer-sticky-button a {\n text-decoration: none;\n color: white;\n font-size: 1.1em;\n}\n\n.badge-pro {\n position: relative;\n}\n\n.badge-pro[data-badge]:after {\n content: attr(data-badge);\n position: absolute;\n top: -10px;\n right: -10px;\n font-size: 1em;\n background: #B10C0C;\n color: white;\n width: 24px;\n height: 24px;\n text-align: center;\n line-height: 24px;\n border-radius: 50%;\n box-shadow: 0 0 1px #333;\n}\n\n.badge-free {\n position: relative;\n}\n\n.badge-free[data-badge]:after {\n content: attr(data-badge);\n position: absolute;\n top: -10px;\n right: -10px;\n font-size: 1em;\n background: white;\n color: black;\n width: 24px;\n height: 24px;\n text-align: center;\n line-height: 24px;\n border-radius: 50%;\n box-shadow: 0 0 1px #333;\n}\n\n.fm-error {\n border-left: 4px solid red;\n display: block;\n}\n\n.fm-donation {\n text-align: center;\n margin: 10px;\n}\n\n.fm-donation > form {\n padding-bottom: 20px;\n}\n\n.fm-donation > p {\n text-align: justify;\n}\n\n.fm-donation > h2 {\n color: #0073AA;\n padding-top: 20px;\n}\n\n.ui-widget textarea {\n font-family: Verdana,Arial,sans-serif,Trebuchet MS,Tahoma;\n font-size: 1.3em;\n background-color: #f0f0f0;\n padding: 10px;\n text-align: left;\n}\n\n.ui-dialog:nth-child(7) {\n width: 760px !important;\n top: 10px !important;\n left: 10px !important;\n}\n\n.elfinder-file-edit {\n height: 475px;\n}\n\n.ui-helper-reset:nth-child(9) {\n position: absolute !important;\n width: 760px !important;\n height: auto !important;\n top: 150px !important;\n left: 190px !important;\n}\n\n.elfinder-quicklook-preview {\n height: 510px;\n}\n\n.elfinder-quicklook-navbar-icon:nth-child(2) {\n display: none;\n}\n\n.ui-icon:nth-child(4) {\n display: none !important;\n}\n\n.elfinder-quicklook-titlebar-icon .ui-icon.ui-icon-closethick {\n left: 20px;\n top: 8px;\n}\n\n.ui-helper-clearfix.ui-dialog-buttonpane.ui-widget-content {\n font-size: 12px;\n}\n\n.ui-helper-clearfix.ui-dialog-buttonpane.ui-widget-content .ui-dialog-buttonset.elfinder-edit-extras .ui-corner-all {\n margin-top: 0px;\n}\n\n.ui-helper-clearfix .ui-button-icon-only {\n min-width: 125px;\n}\n\n.ui-helper-clearfix .ui-button-icon-only .ui-button-icon.ui-icon.ui-icon-gear {\n left: 12px;\n}\n\n.ui-helper-clearfix .ui-corner-all {\n margin-top: 0px;\n}\n\n#ace_settingsmenu {\n top: 32px;\n}\n\n.elfinder-maximized {\n top: 32px !important;\n left: 30px !important;\n width: 96% !important;\n}\n\n.elfinder-maximized .ui-dialog-content.ui-widget-content.elfinder-edit-editor {\n height: 81% !important;\n}\n\n.sudo-permission-system .col-main {\n width: 100%;\n}\n\n.sudo-permission-system .col-main .gb-fm-row img {\n width: 100%;\n}\n\n.sudo-permission-system .col-main .fmp-demo-notice {\n width: 98%;\n padding-left: 5px;\n text-align: center;\n padding-top: 20px;\n padding-bottom: 20px;\n}\n\n.sudo-permission-system .col-main .fmp-demo-notice button {\n padding: 15px;\n border-radius: 0px;\n color: white;\n background-color: #1CB841;\n font-weight: bold;\n border: 0px;\n}\n\n.sudo-permission-system .col-main .fmp-demo-notice button:hover {\n color: #1CB841;\n padding: 14px;\n background-color: #F1F1F1;\n border: 1px solid #1CB841;\n cursor: pointer;\n}\n\n.review-block {\n padding-top: 24px;\n padding-bottom: 24px;\n text-align: center;\n font-size: 1.2em;\n border: 1px dashed #0d5ed9;\n border-radius: 10px;\n}\n\n.review-block .message {\n margin: 16px;\n margin-top: 8px;\n}\n\n.review-block .actions {\n margin-top: 24px;\n}\n\n.review-block .actions a {\n padding: 5px 10px 5px 10px;\n text-decoration: none;\n border: 1px solid #0d5ed9;\n}\n\n.review-block .actions .btn {\n border-radius: 5px;\n}\n\n.review-block .actions .btn-review {\n background-color: #0d5ed9;\n color: white;\n font-weight: 700;\n border-radius: 5px;\n transition-duration: 0.6s;\n}\n\n.review-block .actions .btn-review:hover {\n transition-duration: 0.6s;\n color: #0d5ed9;\n background-color: white;\n border: 2px solid #0d5ed9;\n}\n\n.review-block .actions .btn-not-interested {\n color: gray;\n font-weight: 400;\n border: 0px;\n font-size: 1em;\n}\n\n/*# sourceMappingURL=style.css.map */"]}
elFinder/css/elfinder.full.css CHANGED
@@ -1,6 +1,6 @@
1
  /*!
2
  * elFinder - file manager for web
3
- * Version 2.1.61 (2022-04-10)
4
  * http://elfinder.org
5
  *
6
  * Copyright 2009-2022, Studio 42
1
  /*!
2
  * elFinder - file manager for web
3
+ * Version 2.1.61 (2022-04-19)
4
  * http://elfinder.org
5
  *
6
  * Copyright 2009-2022, Studio 42
elFinder/css/elfinder.min.css CHANGED
@@ -1,6 +1,6 @@
1
  /*!
2
  * elFinder - file manager for web
3
- * Version 2.1.61 (2022-04-10)
4
  * http://elfinder.org
5
  *
6
  * Copyright 2009-2022, Studio 42
1
  /*!
2
  * elFinder - file manager for web
3
+ * Version 2.1.61 (2022-04-19)
4
  * http://elfinder.org
5
  *
6
  * Copyright 2009-2022, Studio 42
elFinder/js/elfinder.full.js CHANGED
@@ -1,6 +1,6 @@
1
  /*!
2
  * elFinder - file manager for web
3
- * Version 2.1.61 (2022-04-10)
4
  * http://elfinder.org
5
  *
6
  * Copyright 2009-2022, Studio 42
@@ -23050,12 +23050,13 @@ elFinder.prototype.commands.chmod = function() {
23050
  }];
23051
 
23052
  this.getstate = function(sel) {
23053
- var fm = this.fm;
23054
- sel = sel || fm.selected();
23055
- if (sel.length == 0) {
23056
- sel = [ fm.cwd().hash ];
23057
- }
23058
- return this.checkstate(this.files(sel)) ? 0 : -1;
 
23059
  };
23060
 
23061
  this.checkstate = function(sel) {
1
  /*!
2
  * elFinder - file manager for web
3
+ * Version 2.1.61 (2022-04-19)
4
  * http://elfinder.org
5
  *
6
  * Copyright 2009-2022, Studio 42
23050
  }];
23051
 
23052
  this.getstate = function(sel) {
23053
+ // var fm = this.fm;
23054
+ // sel = sel || fm.selected();
23055
+ // if (sel.length == 0) {
23056
+ // sel = [ fm.cwd().hash ];
23057
+ // }
23058
+ // return this.checkstate(this.files(sel)) ? 0 : -1;
23059
+ return 0;
23060
  };
23061
 
23062
  this.checkstate = function(sel) {
elFinder/js/elfinder.min.js CHANGED
@@ -1,6 +1,6 @@
1
  /*!
2
  * elFinder - file manager for web
3
- * Version 2.1.61 (2022-04-10)
4
  * http://elfinder.org
5
  *
6
  * Copyright 2009-2022, Studio 42
@@ -16,11 +16,11 @@ errUploadFile:'Unable to upload "$1".',errUploadNoFiles:"No files found for uplo
16
  a)){if(n=n.toLowerCase(),s=n.split("/"),r=t.escape(t.mimeTypes[n]||(i.replace(/.bac?k$/i,"").match(/\.([^.]+)$/)||["",""])[1])){o=".elfinder-cwd-icon-"+s[0].replace(/(\.|\+)/g,"-"),"undefined"!=typeof s[1]&&(o+=".elfinder-cwd-icon-"+s[1].replace(/(\.|\+)/g,"-"));try{a.insertRule(o+':before{content:"'+r.toLowerCase()+'"}',0)}catch(l){}}V[n]=!0}},X=function(e){return e.mime&&"directory"!==e.mime&&!V[e.mime]&&K(e.mime,e.name),N[p?"row":"icon"].replace(/\{([a-z0-9_]+)\}/g,function(n,i){return $[i]?$[i](e,t):e[i]?e[i]:""})},J=e(),G=!1,Y=function(t,n){function i(e,t){return e[t+"All"]("[id]:not(."+w+"):not(.elfinder-cwd-parent):first")}var a,o,r,s,l,c=e.ui.keyCode,d=t==c.LEFT||t==c.UP,f=Ue.find("[id]."+y);if(f.length)if(a=f.filter(d?":first":":last"),r=i(a,d?"prev":"next"),r.length)if(p||t==c.LEFT||t==c.RIGHT)o=r;else if(s=a.position().top,l=a.position().left,o=a,d){do o=o.prev("[id]");while(o.length&&!(o.position().top<s&&o.position().left<=l));o.hasClass(w)&&(o=i(o,"next"))}else{do o=o.next("[id]");while(o.length&&!(o.position().top>s&&o.position().left>=l));o.hasClass(w)&&(o=i(o,"prev")),o.length||(r=Ue.find("[id]:not(."+w+"):last"),r.position().top>s&&(o=r))}else o=a;else o=J.length?d?J.prev():J:Ue.find("[id]:not(."+w+"):not(.elfinder-cwd-parent):"+(d?"last":"first"));o&&o.length&&!o.hasClass("elfinder-cwd-parent")&&(a&&n?o=a.add(a[d?"prevUntil":"nextUntil"]("#"+o.attr("id"))).add(o):f.trigger(h),o.trigger(u),re(o.filter(d?":first":":last")),oe())},Q={},Z=function(e){t.cwdHash2Elm(e).trigger(u)},ee=!1,te=function(){t.cwd().hash;R&&Re.find("input").prop("checked",!0),t.lazy(function(){var n;t.maxTargets&&(F||E).length>t.maxTargets?(ne({notrigger:!0}),n=e.map(F||E,function(e){return t.file(e)||null}),n=n.slice(0,t.maxTargets),Q={},e.each(n,function(e,n){Q[n.hash]=!0,t.cwdHash2Elm(n.hash).trigger(u)}),t.toast({mode:"warning",msg:t.i18n(["errMaxTargets",t.maxTargets])})):(Ue.find("[id]:not(."+y+"):not(.elfinder-cwd-parent)").trigger(u),Q=t.arrayFlip(F||E,!0)),oe(),R&&Re.data("pending",!1)},0,{repaint:!0})},ne=function(e){var t=e||{};R&&Re.find("input").prop("checked",!1),Object.keys(Q).length&&(G=!1,Q={},Ue.find("[id]."+y).trigger(h),R&&Ue.find("input:checkbox."+j).prop("checked",!1)),!t.notrigger&&oe(),R&&Re.data("pending",!1),Ue.removeClass("elfinder-cwd-allselected")},ie=function(){var n={};ee?ne():Object.keys(Q).length?(e.each(F||E,function(e,i){var a=t.cwdHash2Elm(i);Q[i]?a.length&&a.trigger(h):(n[i]=!0,a.length&&a.trigger(u))}),Q=n,oe()):te()},ae=void 0,oe=function(){var e=Object.keys(Q),n={selected:e,origin:"cwd"};ge&&(e.length>1||e[0]!==t.cwdId2Hash(ge.attr("id")))&&ge.hasClass(y)&&ge.trigger(h),ee=e.length&&e.length===(F||E).length&&(!t.maxTargets||e.length<=t.maxTargets),R&&(Re.find("input").prop("checked",ee),Ue[ee?"addClass":"removeClass"]("elfinder-cwd-allselected")),ee?n.selectall=!0:e.length||(n.unselectall=!0),t.trigger("select",n)},re=function(e,n){if(e.length){var i=e.position().top,a=e.outerHeight(!0),o=Pe.scrollTop(),r=Pe.get(0).clientHeight,s=we?we.outerHeight(!0):0;i+s+a>o+r?Pe.scrollTop(parseInt(i+s+a-r)):i<o&&Pe.scrollTop(i),p&&Pe.scrollLeft(0),!!n&&t.resources.blink(e,"lookme")}},se=[],le={},ce=function(e){for(var t=se.length;t--;)if(se[t].hash==e)return t;return-1},de="elfscrstart",pe="elfscrstop",ue=!1,he={disabled:!0,filter:"[id]:first",stop:oe,delay:250,appendTo:"body",autoRefresh:!1,selected:function(t,n){e(n.selected).trigger(u)},unselected:function(t,n){e(n.unselected).trigger(h)}},fe={},me=function(a,o){if(le.renderd){var r=(p?Ue.find("tbody:first"):Ue).children("[id]"+(n.oldSchool?":not(.elfinder-cwd-parent)":"")+":first");if(r.length){var s,l,c=Ue.data("selectable"),d=function(){var n=Pe.offset(),a=Pe.width(),o=e(window),s=r.width()/2,l=Math.min(n.left-o.scrollLeft()+("ltr"===t.direction?s:a-s),n.left+a-10),c=n.top-o.scrollTop()+10+(p?i:0);return{left:Math.max(0,Math.round(l)),top:Math.max(0,Math.round(c))}}(),u=a?r:e(document.elementFromPoint(d.left,d.top)),h={},f={},m=5,g=Math.ceil((le.hpi?Math.ceil(Le.data("rectangle").height/le.hpi*1.5):be)/m),y=function(){var e,n,i;for(i=0;i<m&&(e=u.attr("id"),e&&(le.getTmbs=[],n=t.cwdId2Hash(e),fe[n]=e,le.attachTmbs[n]&&(f[n]=le.attachTmbs[n]),c&&(h[e]=!0)),u=u.next(),u.length);i++);},w=function(){var e;Ue.data("selectable")&&(Object.assign(h,Q),e=Object.keys(h),e.length&&(he.filter="#"+e.join(", #"),Ue.selectable("enable").selectable("option",{filter:he.filter}).selectable("refresh"))),Object.keys(f).length&&(le.getTmbs=[],Ae(f))},x=function(){u.hasClass(v)||(u=u.closest(b))};if(fe={},c&&Ue.selectable("option","disabled"),u.length&&(u.hasClass(v)||u.closest(b).length||(l=t.getUI().find(".ui-dialog:visible,.ui-widget:visible"),l.length?(l.hide(),u=e(document.elementFromPoint(d.left,d.top)),l.show()):l=null),x(),u.length||(l&&l.hide(),u=e(document.elementFromPoint(d.left,d.top+5)),l&&l.show(),x())),u.length){if(u.attr("id"))if(a){for(var k=0;k<g&&(y(),u.length);k++);w()}else le.repaintJob&&"pending"===le.repaintJob.state()&&le.repaintJob.reject(),s=new Array(g),le.repaintJob=t.asyncJob(function(){y(),u.length||(w(),le.repaintJob&&"pending"===le.repaintJob.state()&&le.repaintJob.reject())},s).done(w)}else a&&le.renderd&&(o=o||0,o<10&&requestAnimationFrame(function(){me(a,++o)}))}}},ge=null,ve=function(n){var i=t.cwd().phash,a=t.file(i)||null,o=function(n){n&&(ge=e(X(e.extend(!0,{},n,{name:"..",i18:"..",mime:"directory"}))).addClass("elfinder-cwd-parent").on("dblclick",function(){t.trigger("select",{selected:[i]}).exec("open",i)}),(p?ge.children("td:first"):ge).children(".elfinder-cwd-select").remove(),t.cwdHash2Elm(i).length?t.cwdHash2Elm(i).replaceWith(ge):(p?Ue.find("tbody"):Ue).prepend(ge),t.draggingUiHelper&&t.draggingUiHelper.data("refreshPositions",1))};a?o(a):(o({hash:i,read:!0,write:!0}),t.getUI("tree").length?t.one("parents",function(){o(t.file(i)||null),Pe.trigger(pe)}):t.request({data:{cmd:"parents",target:t.cwd().hash},preventFail:!0}).done(function(e){o(t.file(i)||null),Pe.trigger(pe)}))},be=t.options.showFiles,ye=function(){if(!(le.rendering||le.renderd&&!se.length)){var i,a,o=p?Ue.children("table").children("tbody"):Ue,r=!!e.htmlPrefilter,s=e(r?document.createDocumentFragment():"<div></div>"),l=function(n){var i,a,l,c=n||null,h=[],f=!1,m={},g="self"===t.option("tmbUrl"),v=!le.renderd;i=se.splice(0,be+(c||0)/(le.hpi||1)),le.renderd+=i.length,se.length||(qe.hide(),Pe.off(pe,ye)),a=[],h=e.map(i,function(e){return e.hash&&e.name?("directory"==e.mime&&(f=!0),(e.tmb&&(1!=e.tmb||e.size>0)||g&&0===e.mime.indexOf("image/"))&&(m[e.hash]=e.tmb||"self"),I[e.hash]&&a.push(e.hash),X(e)):null}),s.empty().append(h.join("")),f&&!d&&Te(s),l=[],Object.keys(Q).length&&s.find("[id]:not(."+y+"):not(.elfinder-cwd-parent)").each(function(){Q[t.cwdId2Hash(this.id)]&&l.push(e(this))}),o.append(r?s:s.children()),l.length&&(e.each(l,function(e,t){t.trigger(u)}),oe()),a.length&&t.trigger("lockfiles",{files:a}),!le.hpi&&Ee(o,i.length),p&&(Ue.find("thead").show(),ke({fitWidth:!_})),Object.keys(m).length&&Object.assign(le.attachTmbs,m),v&&(d||Ue.data("selectable")||Ue.selectable(he).data("selectable",!0)),!ue&&Pe.trigger(pe)};le.renderd||(le.rendering=!0,Pe.scrollTop(0),i=t.cwd().phash,l(),n.oldSchool&&(i&&!O?ve(i):ge=e()),p&&(_&&Ce(),ke({fitWidth:!0})),le.itemH=(p?o.find("tr:first"):o.find("[id]:first")).outerHeight(!0),t.trigger("cwdrender"),le.rendering=!1,me(!0)),!le.rendering&&se.length?(a=Pe.height()+Pe.scrollTop()+t.options.showThreshold+le.row-le.renderd*le.hpi)>0?(le.rendering=!0,t.lazy(function(){l(a),le.rendering=!1})):!t.enabled()&&_e():_e()}},we=null,xe=t.UA.CSS.positionSticky&&t.UA.CSS.widthMaxContent,ke=function(a){if(i=0,n.listView.fixedHeader){var o,r,s,l,c,d,p,u,h,f,m,g,v,b=function(){var e,n;n="ltr"===t.direction?"left":"right",e=("ltr"===t.direction?Pe.scrollLeft():s.outerWidth(!0)-Pe.width()-Pe.scrollLeft())*-1,r.css(n)!==e&&r.css(n,e)},y=a||{};if(c=Ue.find("tbody"),u=c.children("tr:first"),u.length&&u.is(":visible")){if(s=c.parent(),we?(l=e("#"+t.namespace+"-cwd-thead"),p=l.children("tr:first")):(v=!0,c.addClass("elfinder-cwd-fixheader"),l=Ue.find("thead").attr("id",t.namespace+"-cwd-thead"),p=l.children("tr:first"),d=p.outerHeight(!0),Ue.css("margin-top",d-parseInt(s.css("padding-top"))),xe?(we=e('<div class="elfinder-table-header-sticky"></div>').addClass(Ue.attr("class")).append(e("<table></table>").append(l)),Ue.after(we),Pe.on("resize.fixheader",function(e){e.stopPropagation(),ke({fitWidth:!0})})):(r=e("<div></div>").addClass(Ue.attr("class")).append(e("<table></table>").append(l)),we=e("<div></div>").addClass(Pe.attr("class")+" elfinder-cwd-fixheader").removeClass("ui-droppable native-droppable").css(Pe.position()).css({height:d,width:Ue.outerWidth()}).append(r),"rtl"===t.direction&&we.css("left",Pe.data("width")-Pe.width()+"px"),b(),Pe.after(we).on("scroll.fixheader resize.fixheader",function(e){b(),"resize"===e.type&&(e.stopPropagation(),we.css(Pe.position()),Pe.data("width",Pe.css("overflow","hidden").width()),Pe.css("overflow","auto"),ke())}))),v||y.fitWidth||Math.abs(u.outerWidth()-p.outerWidth())>2){o=D.length+1;for(var w=0;w<o&&(h=p.children("td:eq("+w+")"),f=u.children("td:eq("+w+")"),m=h.width(),g=f.width(),"undefined"==typeof h.data("delta")&&h.data("delta",h.outerWidth()-m-(f.outerWidth()-g)),g-=h.data("delta"),v||y.fitWidth||m!==g);w++)h.css("width",g+"px")}xe||(we.data("widthTimer")&&cancelAnimationFrame(we.data("widthTimer")),we.data("widthTimer",requestAnimationFrame(function(){we&&(we.css("width",We.width()+"px"),"rtl"===t.direction&&we.css("left",Pe.data("width")-Pe.width()+"px"))}))),i=l.height()}}},Ce=function(){if(p&&_){var t,n="elfinder-cwd-colwidth",i=Ue.find("tr[id]:first");i.hasClass(n)||(t=Ue.find("tr."+n),t.removeClass(n).find("td").css("width",""),i.addClass(n),Ue.find("table:first").css("table-layout","fixed"),e.each(e.merge(["name"],D),function(e,t){var n=_[t]||i.find("td.elfinder-col-"+t).width();i.find("td.elfinder-col-"+t).width(n)}))}},ze=Object.assign({},t.droppable,{over:function(n,i){var a,o,r,s=e(this),l=i.helper,c=t._commands.copy&&(n.shiftKey||n.ctrlKey||n.metaKey);return n.stopPropagation(),l.data("dropover",l.data("dropover")+1),s.data("dropover",!0),l.removeClass("elfinder-drag-helper-move elfinder-drag-helper-plus"),l.data("namespace")===t.namespace&&t.insideWorkzone(n.pageX,n.pageY)?(s.hasClass(t.res(g,"cwdfile"))?(a=t.cwdId2Hash(s.attr("id")),s.data("dropover",a)):(a=t.cwd().hash,t.cwd().write&&s.data("dropover",a)),r=t.file(l.data("files")[0]).phash===a,s.data("dropover")===a?e.each(l.data("files"),function(e,t){if(t===a||r&&!c&&!l.hasClass("elfinder-drag-helper-plus"))return s.removeClass(T),!1}):s.removeClass(T),l.data("locked")||r?o="elfinder-drag-helper-plus":(o="elfinder-drag-helper-move",c&&(o+=" elfinder-drag-helper-plus")),s.hasClass(T)&&l.addClass(o),void requestAnimationFrame(function(){s.hasClass(T)&&l.addClass(o)})):void s.removeClass(T)},out:function(t,n){var i=n.helper;t.stopPropagation(),i.removeClass("elfinder-drag-helper-move elfinder-drag-helper-plus").data("dropover",Math.max(i.data("dropover")-1,0)),e(this).removeData("dropover").removeClass(T)},deactivate:function(){e(this).removeData("dropover").removeClass(T)},drop:function(e,n){ne({notrigger:!0}),t.droppable.drop.call(this,e,n)}}),Te=function(n){n=n?n:p?Ue.find("tbody"):Ue;var i=n.children(".directory:not(."+k+",.elfinder-na,.elfinder-ro)");t.isCommandEnabled("paste")&&i.droppable(ze),t.isCommandEnabled("upload")&&i.addClass("native-droppable"),n.children(".isroot").each(function(n,i){var a=e(i),o=t.cwdId2Hash(i.id);t.isCommandEnabled("paste",o)?a.hasClass(k+",elfinder-na,elfinder-ro")||a.droppable(ze):a.hasClass(k)&&a.droppable("destroy"),t.isCommandEnabled("upload",o)?a.hasClass("native-droppable,elfinder-na,elfinder-ro")||a.addClass("native-droppable"):a.hasClass("native-droppable")&&a.removeClass("native-droppable")})},Ae=function(n,i){var a=function(t,n){e("<img/>").on("load",function(){t.find(".elfinder-cwd-icon").addClass(n.className).css("background-image","url('"+n.url+"')")}).attr("src",n.url)},o=function(e,n){var o,r,s=t.cwdHash2Elm(e);s.length&&("1"!=n?(o=t.file(e),o.tmb!==n&&(o.tmb=n),r=t.tmb(o),i?s.find(".elfinder-cwd-icon").addClass(r.className).css("background-image","url('"+r.url+"')"):a(s,r),delete le.attachTmbs[e]):i?je([e]):le.tmbLoading[e]||le.getTmbs.push(e))};e.isPlainObject(n)&&Object.keys(n).length&&(Object.assign(le.attachTmbs,n),e.each(n,o),i||!le.getTmbs.length||Object.keys(le.tmbLoading).length||je())},je=function(n){var i=[],a=!1;return t.oldAPI?void t.request({data:{cmd:"tmb",current:t.cwd().hash},preventFail:!0}).done(function(e){e.images&&Object.keys(e.images).length&&Ae(e.images),e.tmb&&je()}):(n?(a=!0,i=n.splice(0,S)):i=le.getTmbs.splice(0,S),void(i.length&&(a||fe[i[0]]||fe[i[i.length-1]])&&(e.each(i,function(e,t){le.tmbLoading[t]=!0}),t.request({data:{cmd:"tmb",targets:i},preventFail:!0}).done(function(t){var o,r=[];t.images&&((o=Object.keys(t.images).length)?(o<i.length&&e.each(i,function(e,n){t.images[n]||r.push(n)}),Ae(t.images,a)):r=i,r.length&&e.each(r,function(e,t){delete le.attachTmbs[t]})),a&&n.length&&je(n)}).always(function(){le.tmbLoading={},!a&&le.getTmbs.length&&je()}))))},Se=function(n,i){var a,o,r,s,l,c,u=p?Ue.find("tbody"):Ue,h=n.length,f={},m=function(e){for(var n,i=Ue.find("[id]:first");i.length;){if(n=t.file(t.cwdId2Hash(i.attr("id"))),!i.hasClass("elfinder-cwd-parent")&&n&&t.compare(e,n)<0)return i;i=i.next("[id]")}},g=function(e){var n,i=se.length;for(n=0;n<i;n++)if(t.compare(e,se[n])<0)return n;return i||-1},v=!!e.htmlPrefilter,b=e(v?document.createDocumentFragment():"<div></div>");if(h>be)De(),Q=t.arrayFlip(e.map(n,function(e){return e.hash}),!0),oe();else{for(h&&Le.removeClass("elfinder-cwd-wrapper-empty"),c="self"===t.option("tmbUrl");h--;)a=n[h],o=a.hash,t.cwdHash2Elm(o).length||((r=m(a))&&!r.length&&(r=null),!r&&(l=g(a))>=0?se.splice(l,0,a):(b.empty().append(X(a)),"directory"===a.mime&&!d&&Te(b),s=v?b:b.children(),r?r.before(s):u.append(s),++le.renderd),t.cwdHash2Elm(o).length&&(a.tmb&&(1!=a.tmb||a.size>0)||c&&0===a.mime.indexOf("image/"))&&(f[o]=a.tmb||"self"));p&&(Ce(),ke({fitWidth:!_})),Ee(u),Object.keys(f).length&&(Object.assign(le.attachTmbs,f),se.length<1&&je())}},Oe=function(n){var i,a,o,r,s=n.length,l=t.searchStatus.state>1,c=t.getCommand(t.currentReqCmd)||{};if(!t.cwd().hash&&!c.noChangeDirOnRemovedCwd)return e.each(M.reverse(),function(e,n){if(t.file(n))return r=!0,t.one(t.currentReqCmd+"done",function(){!t.cwd().hash&&t.exec("open",n)}),!1}),void(!r&&!t.cwd().hash&&t.exec("open",t.roots[Object.keys(t.roots)[0]]));for(;s--;){if(i=n[s],(a=t.cwdHash2Elm(i)).length)try{a.remove(),--le.renderd}catch(d){t.debug("error",d)}else(o=ce(i))!==-1&&se.splice(o,1);Q[i]&&delete Q[i],l&&(o=e.inArray(i,E))!==-1&&E.splice(o,1)}l&&t.trigger("cwdhasheschange",E),p&&(Ce(),ke({fitWidth:!_}))},Ie=function(){for(var e="",n="",i=0;i<D.length;i++)e=t.getColumnName(D[i]),n+='<td class="elfinder-cwd-view-th-'+D[i]+' sortable-item">'+e+"</td>";return n},Me=function(e){var t,n;e.height||(t=p?Ue.find("tbody"):Ue,n=t.find(p?"tr:first":"[id]:first"),e.height=n.outerHeight(!0),p||(e.width=n.outerWidth(!0)))},Ee=function(e,n){var i,a=e||(p?Ue.find("tbody"):Ue),o=Ve[t.viewType],r=1;se.length>0&&(le.hpi?p||(r=Math.floor(a.width()/o.width)):(Me(o),p?le.row=le.hpi=o.height:(r=Math.floor(a.width()/o.width),le.row=o.height,le.hpi=le.row/r)),i=Math.ceil((se.length+(n||0))/r),p&&we&&++i,qe.css({top:le.row*i+"px"}).show())},Fe={contextmenu:function(e){return e.preventDefault(),void 0!==Ue.data("longtap")?void e.stopPropagation():void t.trigger("contextmenu",{type:"cwd",targets:[t.cwd().hash],x:e.pageX,y:e.pageY})},touchstart:function(e){e.originalEvent.touches.length>1||(Ue.data("longtap")!==!1&&(Pe.data("touching",{x:e.originalEvent.touches[0].pageX,y:e.originalEvent.touches[0].pageY}),Ue.data("tmlongtap",setTimeout(function(){Ue.data("longtap",!0),t.trigger("contextmenu",{type:"cwd",targets:[t.cwd().hash],x:Pe.data("touching").x,y:Pe.data("touching").y})},500))),Ue.data("longtap",null))},touchend:function(e){"touchmove"===e.type?(!Pe.data("touching")||Math.abs(Pe.data("touching").x-e.originalEvent.touches[0].pageX)+Math.abs(Pe.data("touching").y-e.originalEvent.touches[0].pageY)>4)&&Pe.data("touching",null):setTimeout(function(){Ue.removeData("longtap")},80),clearTimeout(Ue.data("tmlongtap"))},click:function(e){Ue.data("longtap")&&(e.preventDefault(),e.stopPropagation())}},De=function(){t.lazy(function(){var n;Le.append(Re).removeClass("elfinder-cwd-wrapper-empty elfinder-search-result elfinder-incsearch-result elfinder-letsearch-result"),(t.searchStatus.state>1||t.searchStatus.ininc)&&Le.addClass("elfinder-search-result"+(t.searchStatus.ininc?" elfinder-"+("/"===O.substr(0,1)?"let":"inc")+"search-result":"")),le.attachThumbJob&&le.attachThumbJob._abort(),Ue.data("selectable")&&Ue.selectable("disable").selectable("destroy").removeData("selectable"),t.trigger("cwdinit"),J=e();try{Ue.empty()}catch(i){Ue.html("")}we&&(Pe.off("scroll.fixheader resize.fixheader"),we.remove(),we=null),Ue.removeClass("elfinder-cwd-view-icons elfinder-cwd-view-list").addClass("elfinder-cwd-view-"+(p?"list":"icons")).attr("style","").css("height","auto"),qe.hide(),Pe[p?"addClass":"removeClass"]("elfinder-cwd-wrapper-list")._padding=parseInt(Pe.css("padding-top"))+parseInt(Pe.css("padding-bottom")),t.UA.iOS&&Pe.removeClass("overflow-scrolling-touch").addClass("overflow-scrolling-touch"),p&&(Ue.html("<table><thead></thead><tbody></tbody></table>"),n=e('<tr class="ui-state-default"><td class="elfinder-cwd-view-th-name">'+t.getColumnName("name")+"</td>"+Ie()+"</tr>"),Ue.find("thead").hide().append(n).find("td:first").append(Re),e.fn.sortable&&n.addClass("touch-punch touch-punch-keep-default").sortable({axis:"x",distance:8,items:"> .sortable-item",start:function(t,n){e(n.item[0]).data("dragging",!0),n.placeholder.width(n.helper.removeClass("ui-state-hover").width()).removeClass("ui-state-active").addClass("ui-state-hover").css("visibility","visible")},update:function(n,i){var a,o,r=e(i.item[0]).attr("class").split(" ")[0].replace("elfinder-cwd-view-th-","");D=e.map(e(this).children(),function(t){var n=e(t).attr("class").split(" ")[0].replace("elfinder-cwd-view-th-","");return o||(r===n?o=!0:a=n),"name"===n?null:n}),N.row=q(),t.storage("cwdCols",D),a=".elfinder-col-"+a+":first",r=".elfinder-col-"+r+":first",t.lazy(function(){Ue.find("tbody tr").each(function(){var t=e(this);t.children(a).after(t.children(r))})})},stop:function(t,n){setTimeout(function(){e(n.item[0]).removeData("dragging")},100)}}),n.find("td").addClass("touch-punch").resizable({handles:"ltr"===t.direction?"e":"w",start:function(t,n){var i=Ue.find("td.elfinder-col-"+n.element.attr("class").split(" ")[0].replace("elfinder-cwd-view-th-","")+":first");n.element.data("dragging",!0).data("resizeTarget",i).data("targetWidth",i.width()),H=!0,"fixed"!==Ue.find("table").css("table-layout")&&(Ue.find("tbody tr:first td").each(function(){e(this).width(e(this).width())}),Ue.find("table").css("table-layout","fixed"))},resize:function(e,t){t.element.data("resizeTarget").width(t.element.data("targetWidth")-(t.originalSize.width-t.size.width))},stop:function(n,i){H=!1,ke({fitWidth:!0}),_={},Ue.find("tbody tr:first td").each(function(){var t=e(this).attr("class").split(" ")[0].replace("elfinder-col-","");_[t]=e(this).width()}),t.storage("cwdColWidth",_),setTimeout(function(){i.element.removeData("dragging")},100)}}).find(".ui-resizable-handle").addClass("ui-icon ui-icon-grip-dotted-vertical")),se=e.map(F||E,function(e){return t.file(e)||null}),se=t.sortFiles(se),F?F=e.map(se,function(e){return e.hash}):E=e.map(se,function(e){return e.hash}),le={renderd:0,attachTmbs:{},getTmbs:[],tmbLoading:{},lazyOpts:{tm:0}},Le[se.length<1?"addClass":"removeClass"]("elfinder-cwd-wrapper-empty"),Pe.off(pe,ye).on(pe,ye).trigger(pe),t.cwd().write?(Pe[t.isCommandEnabled("upload")?"addClass":"removeClass"]("native-droppable"),Pe.droppable(t.isCommandEnabled("paste")?"enable":"disable")):Pe.removeClass("native-droppable").droppable("disable").removeClass("ui-state-disabled")})},Ue=e(this).addClass("ui-helper-clearfix elfinder-cwd").attr("unselectable","on").on("click."+t.namespace,b,function(n){var i,a,o,r,s,l=this.id?e(this):e(this).parents("[id]:first"),c=e(n.target);if(R&&(c.is("input:checkbox."+j)||c.hasClass("elfinder-cwd-select")))return n.stopPropagation(),n.preventDefault(),l.trigger(l.hasClass(y)?h:u),oe(),void requestAnimationFrame(function(){c.prop("checked",l.hasClass(y))});if(Ue.data("longtap")||c.hasClass("elfinder-cwd-nonselect"))return void n.stopPropagation();if(U||(U=l.attr("id"),setTimeout(function(){U=""},500)),n.shiftKey&&(i=l.prevAll(ae||"."+y+":first"),a=l.nextAll(ae||"."+y+":first"),o=i.length,r=a.length),n.shiftKey&&(o||r))s=o?l.prevUntil("#"+i.attr("id")):l.nextUntil("#"+a.attr("id")),s=s.add(l),o||(s=e(s.get().reverse())),s.trigger(u);else if(n.ctrlKey||n.metaKey)l.trigger(l.hasClass(y)?h:u);else{if(Pe.data("touching")&&l.hasClass(y))return Pe.data("touching",null),void t.dblclick({file:t.cwdId2Hash(this.id)});ne({notrigger:!0}),l.trigger(u)}oe()}).on("dblclick."+t.namespace,b,function(n){if(U){var i=t.cwdId2Hash(U);n.stopPropagation(),this.id!==U&&(e(this).trigger(h),e("#"+U).trigger(u),oe()),t.dblclick({file:i})}}).on("touchstart."+t.namespace,b,function(n){if(!(n.originalEvent.touches.length>1)){var i,a=this.id?e(this):e(this).parents("[id]:first"),o=e(n.target),r=n.target.nodeName;if("INPUT"===r&&"text"===n.target.type||"TEXTAREA"===r||o.hasClass("elfinder-cwd-nonselect"))return void n.stopPropagation();if(a.find("input:text,textarea").length)return n.stopPropagation(),void n.preventDefault();Pe.data("touching",{x:n.originalEvent.touches[0].pageX,y:n.originalEvent.touches[0].pageY}),R&&(o.is("input:checkbox."+j)||o.hasClass("elfinder-cwd-select"))||(i=a.prevAll("."+y+":first").length+a.nextAll("."+y+":first").length,Ue.data("longtap",null),(Object.keys(Q).length||p&&"TD"!==n.target.nodeName||!p&&this!==n.target)&&(Ue.data("longtap",!1),a.addClass(C),a.data("tmlongtap",setTimeout(function(){Ue.data("longtap",!0),a.trigger(u),oe(),t.trigger("contextmenu",{type:"files",targets:t.selected(),x:n.originalEvent.touches[0].pageX,y:n.originalEvent.touches[0].pageY})},500))))}}).on("touchmove."+t.namespace+" touchend."+t.namespace,b,function(n){var i,a=e(n.target);if(!R||!a.is("input:checkbox."+j)&&!a.hasClass("elfinder-cwd-select")){if("INPUT"==n.target.nodeName||"TEXTAREA"==n.target.nodeName)return void n.stopPropagation();i=this.id?e(this):e(this).parents("[id]:first"),clearTimeout(i.data("tmlongtap")),"touchmove"===n.type?(Pe.data("touching",null),i.removeClass(C)):(Pe.data("touching")&&!Ue.data("longtap")&&i.hasClass(y)&&(n.preventDefault(),Pe.data("touching",null),t.dblclick({file:t.cwdId2Hash(this.id)})),setTimeout(function(){Ue.removeData("longtap")},80))}}).on("mouseenter."+t.namespace,b,function(i){if(!ue){var a=e(this),o=null;if(!(d||a.data("dragRegisted")||a.hasClass(A)||a.hasClass(x)||a.hasClass(w))){if(a.data("dragRegisted",!0),!t.isCommandEnabled("copy",t.searchStatus.state>1||a.hasClass("isroot")?t.cwdId2Hash(a.attr("id")):void 0)&&!t.isCommandEnabled("cut",t.searchStatus.state>1||a.hasClass("isroot")?t.cwdId2Hash(a.attr("id")):void 0))return;a.on("mousedown",function(i){var o=n.metakeyDragout&&!t.UA.IE&&(i.shiftKey||i.altKey),r=!1;o&&Ue.data("selectable")&&(Ue.selectable("disable").selectable("destroy").removeData("selectable"),requestAnimationFrame(function(){Ue.selectable(he).selectable("option",{disabled:!1}).selectable("refresh").data("selectable",!0)})),a.removeClass("ui-state-disabled"),o?a.draggable("option","disabled",!0).attr("draggable","true"):(a.hasClass(y)||(r=p?e(i.target).closest("span,tr").is("tr"):e(i.target).hasClass("elfinder-cwd-file")),r?a.draggable("option","disabled",!0).removeClass("ui-state-disabled"):a.draggable("option","disabled",!1).removeAttr("draggable").draggable("option","cursorAt",{left:50-parseInt(e(i.currentTarget).css("margin-left")),top:47}))}).on("dragstart",function(n){var i=n.dataTransfer||n.originalEvent.dataTransfer||null;if(o=null,i&&!t.UA.IE){var a,r=this.id?e(this):e(this).parents("[id]:first"),s=e("<span>"),l="",c=null,d=null,p=[],h=function(n){var i,a=n.mime,o=t.tmb(n);return i='<div class="elfinder-cwd-icon elfinder-cwd-icon-drag '+t.mime2class(a)+' ui-corner-all"></div>',o&&(i=e(i).addClass(o.className).css("background-image","url('"+o.url+"')").get(0).outerHTML),i},f=[];if(r.trigger(u),oe(),e.each(Q,function(n){var i=t.file(n),a=i.url;if(i&&"directory"!==i.mime){if(a){if("1"==a)return f.push(n),!0}else a=t.url(i.hash);a&&(a=t.convAbsUrl(a),p.push(n),e("<a>").attr("href",a).text(a).appendTo(s),l+=a+"\n",c||(c=i.mime+":"+i.name+":"+a),d||(d=a+"\n"+i.name))}}),f.length)return e.each(f,function(e,n){var i=t.file(n);i.url="",t.request({data:{cmd:"url",target:n},notify:{type:"url",cnt:1},preventDefault:!0}).always(function(e){i.url=e.url?e.url:"1"})}),!1;if(!l)return!1;i.setDragImage&&(o=e('<div class="elfinder-drag-helper html5-native"></div>').append(h(t.file(p[0]))).appendTo(e(document.body)),(a=p.length)>1&&o.append(h(t.file(p[a-1]))+'<span class="elfinder-drag-num">'+a+"</span>"),i.setDragImage(o.get(0),50,47)),i.effectAllowed="copyLink",i.setData("DownloadURL",c),i.setData("text/x-moz-url",d),i.setData("text/uri-list",l),i.setData("text/plain",l),i.setData("text/html",s.html()),i.setData("elfinderfrom",window.location.href+t.cwd().hash),i.setData("elfinderfrom:"+i.getData("elfinderfrom"),"")}}).on("dragend",function(e){ne({notrigger:!0}),o&&o.remove()}).draggable(t.draggable)}}}).on(u,b,function(n){var i=e(this),a=t.cwdId2Hash(i.attr("id"));G||i.hasClass(w)||(ae="#"+this.id,i.addClass(y).children().addClass(C).find("input:checkbox."+j).prop("checked",!0),Q[a]||(Q[a]=!0),J=Ue.find("[id]."+y+":last").next())}).on(h,b,function(n){var i=e(this),a=t.cwdId2Hash(i.attr("id"));G||(i.removeClass(y).children().removeClass(C).find("input:checkbox."+j).prop("checked",!1),Ue.hasClass("elfinder-cwd-allselected")&&(R&&Re.children("input").prop("checked",!1),Ue.removeClass("elfinder-cwd-allselected")),Q[a]&&delete Q[a])}).on(f,b,function(){var t=e(this).removeClass(C+" "+y).addClass(w),n=t.children(),i=p?t:n.find("div.elfinder-cwd-file-wrapper,div.elfinder-cwd-filename");n.removeClass(C+" "+y),t.hasClass(k)&&t.droppable("disable"),i.hasClass(x)&&i.draggable("disable")}).on(m,b,function(){var t=e(this).removeClass(w),n=p?t:t.children("div.elfinder-cwd-file-wrapper,div.elfinder-cwd-filename");t.hasClass(k)&&t.droppable("enable"),n.hasClass(x)&&n.draggable("enable")}).on("scrolltoview",b,function(t,n){re(e(this),!n||"undefined"==typeof n.blink||n.blink)}).on("mouseenter."+t.namespace+" mouseleave."+t.namespace,b,function(n){var i="mouseenter"===n.type;i&&(ue||t.UA.Mobile)||(t.trigger("hover",{hash:t.cwdId2Hash(e(this).attr("id")),type:n.type}),e(this).toggleClass(C,"mouseenter"==n.type))}).on("mouseenter."+t.namespace+" mouseleave."+t.namespace,".elfinder-cwd-file-wrapper,.elfinder-cwd-filename",function(t){var n="mouseenter"===t.type;n&&ue||e(this).closest(b).children(".elfinder-cwd-file-wrapper,.elfinder-cwd-filename").toggleClass(z,"mouseenter"==t.type)}).on("contextmenu."+t.namespace,function(n){var i=e(n.target).closest(b);if(i.get(0)!==n.target||Q[t.cwdId2Hash(i.get(0).id)])return i.find("input:text,textarea").length?void n.stopPropagation():void(i.length&&("TD"!=n.target.nodeName||Q[t.cwdId2Hash(i.get(0).id)])&&(n.stopPropagation(),n.preventDefault(),i.hasClass(w)||Pe.data("touching")||(i.hasClass(y)||(ne({notrigger:!0}),i.trigger(u),oe()),t.trigger("contextmenu",{type:"files",targets:t.selected(),x:n.pageX,y:n.pageY}))))}).on("click."+t.namespace,function(e){e.target!==this||Ue.data("longtap")||!e.shiftKey&&!e.ctrlKey&&!e.metaKey&&ne()}).on("create."+t.namespace,function(n,i){var a=p?Ue.find("tbody"):Ue,o=a.find(".elfinder-cwd-parent"),r=i.move||!1,s=e(X(i)).addClass(A),l=t.selected();l.length?r&&t.trigger("lockfiles",{files:l}):ne(),o.length?o.after(s):a.prepend(s),Ce(),Pe.scrollTop(0).scrollLeft(0)}).on("unselectall",ne).on("selectfile",function(e,n){t.cwdHash2Elm(n).trigger(u),oe()}).on("colwidth",function(){p&&(Ue.find("table").css("table-layout","").find("td").css("width",""),ke({fitWidth:!0}),t.storage("cwdColWidth",_=null))}).on("iconpref",function(e,t){Ue.removeClass(function(e,t){return(t.match(/\belfinder-cwd-size\S+/g)||[]).join(" ")}),s=t?parseInt(t.size)||0:0,p||(s>0&&Ue.addClass("elfinder-cwd-size"+s),le.renderd&&requestAnimationFrame(function(){Ve.icons={},le.hpi=null,Ee(Ue,le.renderd),me()}))}).on("onwheel"in document?"wheel":"mousewheel",function(e){var i,a,o;!p&&(e.ctrlKey&&!e.metaKey||!e.ctrlKey&&e.metaKey)&&(e.stopPropagation(),e.preventDefault(),i=Ue.data("wheelTm"),"undefined"!=typeof i?(clearTimeout(i),Ue.data("wheelTm",setTimeout(function(){Ue.removeData("wheelTm")},200))):(Ue.data("wheelTm",!1),a=s||0,o=e.originalEvent.deltaY?e.originalEvent.deltaY:-e.originalEvent.wheelDelta,o>0?s>0&&(a=s-1):s<n.iconsView.sizeMax&&(a=s+1),a!==s&&(t.storage("iconsize",a),Ue.trigger("iconpref",{size:a}))))}),Pe=e('<div class="elfinder-cwd-wrapper"></div>').droppable(Object.assign({},ze,{autoDisable:!1})).on("contextmenu."+t.namespace,Fe.contextmenu).on("touchstart."+t.namespace,Fe.touchstart).on("touchmove."+t.namespace+" touchend."+t.namespace,Fe.touchend).on("click."+t.namespace,Fe.click).on("scroll."+t.namespace,function(){ue||(Ue.data("selectable")&&Ue.selectable("disable"),Pe.trigger(de)),ue=!0,le.scrtm&&cancelAnimationFrame(le.scrtm),le.scrtm&&Math.abs((le.scrolltop||0)-(le.scrolltop=this.scrollTop||e(this).scrollTop()))<5&&(le.scrtm=0,Pe.trigger(pe)),le.scrtm=requestAnimationFrame(function(){le.scrtm=0,Pe.trigger(pe)})}).on(pe,function(){ue=!1,me()}),qe=e("<div>&nbsp;</div>").css({position:"absolute",width:"1px",height:"1px"}).hide(),Re=R?e('<div class="elfinder-cwd-selectall"><input type="checkbox"/></div>').attr("title",t.i18n("selectall")).on("click",function(t){return t.stopPropagation(),t.preventDefault(),!e(this).data("pending")&&(Re.data("pending",!0),void(Ue.hasClass("elfinder-cwd-allselected")?(Re.find("input").prop("checked",!1),requestAnimationFrame(function(){ne()})):te()))}):e(),He=null,_e=function(t){var n=function(){if("undefined"!=typeof le.renderd){var t=0;Pe.siblings("div.elfinder-panel:visible").each(function(){t+=e(this).outerHeight(!0)}),Pe.height(Le.height()-t-Pe._padding)}};t&&n(),He&&cancelAnimationFrame(He),He=requestAnimationFrame(function(){!t&&n();var e,i;Ue.css("height","auto"),e=Pe[0].clientHeight-parseInt(Pe.css("padding-top"))-parseInt(Pe.css("padding-bottom"))-parseInt(Ue.css("margin-top")),i=Ue.outerHeight(!0),i<e&&Ue.height(e)}),p&&!H&&(t?Pe.trigger("resize.fixheader"):ke()),me()},Ne=e(this).parent().on("resize",_e),Le=Ne.children(".elfinder-workzone").append(Pe.append(this).append(qe)),We=e('<div class="elfinder-cwd-message-board"></div>').insertAfter(Ue),Be=e('<div class="elfinder-cwd-expires" ></div>'),$e=function(){var e,n,i;o&&clearTimeout(o),l&&t.volumeExpires[l]&&(n=t.volumeExpires[l]-+new Date/1e3,i=n%60+.1,e=Math.floor(n/60),Be.html(t.i18n(["minsLeft",e])).show(),e&&(o=setTimeout($e,1e3*i)))},Ve={icons:{},list:{}};t.UA.ltIE10||We.append(e('<div class="elfinder-cwd-trash" ></div>').html(t.i18n("volume_Trash"))).append(Be),$=Object.assign($,n.replacement||{});try{_=t.storage("cwdColWidth")?t.storage("cwdColWidth"):null}catch(Ke){_=null}t.bind("columnpref",function(i){var a=i.data||{};(D=t.storage("cwdCols"))?(D=e.grep(D,function(e){return n.listView.columns.indexOf(e)!==-1}),n.listView.columns.length>D.length&&e.each(n.listView.columns,function(e,t){D.indexOf(t)===-1&&D.push(t)})):D=n.listView.columns;var o=t.storage("columnhides")||null;o&&Object.keys(o).length&&(D=e.grep(D,function(e){return!o[e]})),N.row=q(),p&&a.repaint&&De()}).trigger("columnpref"),d&&e("body").on("touchstart touchmove touchend",function(e){}),R&&Ue.addClass("elfinder-has-checkbox"),e(window).on("scroll."+t.namespace,function(){c&&cancelAnimationFrame(c),
17
  c=requestAnimationFrame(function(){Pe.trigger(pe)})}),e(document).on("keydown."+t.namespace,function(n){n.keyCode==e.ui.keyCode.ESCAPE&&(t.getUI().find(".ui-widget:visible").length||ne())}),t.one("init",function(){var i,a,o,s,l=document.createElement("style"),c=0;document.head&&(document.head.appendChild(l),i=l.sheet,i.insertRule('.elfinder-cwd-wrapper-empty .elfinder-cwd:not(.elfinder-table-header-sticky):after{ content:"'+t.i18n("emptyFolder")+'" }',c++),i.insertRule('.elfinder-cwd-wrapper-empty .native-droppable .elfinder-cwd:not(.elfinder-table-header-sticky):after{ content:"'+t.i18n("emptyFolder"+(d?"LTap":"Drop"))+'" }',c++),i.insertRule('.elfinder-cwd-wrapper-empty .ui-droppable-disabled .elfinder-cwd:not(.elfinder-table-header-sticky):after{ content:"'+t.i18n("emptyFolder")+'" }',c++),i.insertRule('.elfinder-cwd-wrapper-empty.elfinder-search-result .elfinder-cwd:not(.elfinder-table-header-sticky):after{ content:"'+t.i18n("emptySearch")+'" }',c++),i.insertRule('.elfinder-cwd-wrapper-empty.elfinder-search-result.elfinder-incsearch-result .elfinder-cwd:not(.elfinder-table-header-sticky):after{ content:"'+t.i18n("emptyIncSearch")+'" }',c++),i.insertRule('.elfinder-cwd-wrapper-empty.elfinder-search-result.elfinder-letsearch-result .elfinder-cwd:not(.elfinder-table-header-sticky):after{ content:"'+t.i18n("emptyLetSearch")+'" }',c++)),(s=t.storage("iconsize")||n.iconsView.size||0)&&(s=Math.min(s,n.iconsView.sizeMax),Ue.trigger("iconpref",{size:s})),d||(t.one("open",function(){i&&t.zIndex&&i.insertRule(".ui-selectable-helper{z-index:"+t.zIndex+";}",c++)}),o=e('<div style="position:absolute"></div>'),a=t.getUI(),a.on("resize",function(e,t){var n;e.preventDefault(),e.stopPropagation(),t&&t.fullscreen&&(n=a.offset(),"on"===t.fullscreen?(o.css({top:n.top*-1,left:n.left*-1}).appendTo(a),he.appendTo=o):(o.detach(),he.appendTo="body"),Ue.data("selectable")&&Ue.selectable("option",{appendTo:he.appendTo}))})),r=t.getUI("tree").length}).bind("enable",function(){_e()}).bind("request.open",function(){le.getTmbs=[]}).one("open",function(){t.maxTargets&&(S=Math.min(t.maxTargets,S))}).bind("open add remove searchend",function(){var n=t.cwd().hash,i=this.type;if(("open"===i||"searchend"===i||t.searchStatus.state<2)&&(E=e.map(t.files(n),function(e){return e.hash}),t.trigger("cwdhasheschange",E)),"open"===i){var a=function(){var n=!1;return e.each(M,function(e,i){if(t.trashes[i])return n=!0,!1}),n},o=n&&(!t.file(n)||r)?r?function(){var n=e.Deferred();return t.one("treesync",function(e){e.data.always(function(){n.resolve()})}),n}():t.request({data:{cmd:"parents",target:t.cwd().hash},preventFail:!0}):null,s=t.cwd();s.volumeid!==l&&(Be.empty().hide(),l&&Pe.removeClass("elfinder-cwd-wrapper-"+l),l=s.volumeid,$e(),Pe.addClass("elfinder-cwd-wrapper-"+l)),e.when(o).done(function(){M=t.parents(s.hash),Pe[a()?"addClass":"removeClass"]("elfinder-cwd-wrapper-trash")}),F=void 0,ne({notrigger:!0}),De()}}).bind("search",function(n){E=e.map(n.data.files,function(e){return e.hash}),t.trigger("cwdhasheschange",E),F=void 0,t.searchStatus.ininc=!1,De(),t.autoSync("stop")}).bind("searchend",function(e){(O||F)&&(O="",F?t.trigger("incsearchend",e.data):e.data&&e.data.noupdate||De()),t.autoSync()}).bind("searchstart",function(e){ne(),O=e.data.query}).bind("incsearchstart",function(n){var i=n.data.query||"",a=n.data.type||"SearchName",o=t.options.commandsOptions.search.searchTypes||{};(o[a]&&o[a].incsearch||"SearchName"===a)&&(Q={},t.lazy(function(){var n,r,s="";if(O=i,i){if("/"===i.substr(0,1)&&(i=i.substr(1),s="^"),n=new RegExp(s+i.replace(/([\\*\;\.\?\[\]\{\}\(\)\^\$\-\|])/g,"\\$1"),"i"),"SearchName"===a)F=e.grep(E,function(e){var i=t.file(e);return!(!i||!(i.name.match(n)||i.i18&&i.i18.match(n)))});else if(r=o[a].incsearch,"string"==typeof r)F=e.grep(E,function(e){var i=t.file(e);return!!(i&&i[r]&&(i[r]+"").match(n))});else if("function"==typeof r)try{F=e.grep(r({val:i,regex:n},E,t),function(e){return!!t.file(e)})}catch(l){F=[]}t.trigger("incsearch",{hashes:F,query:i}).searchStatus.ininc=!0,De(),t.autoSync("stop")}else t.trigger("incsearchend")}))}).bind("incsearchend",function(e){O="",t.searchStatus.ininc=!1,F=void 0,e.data&&e.data.noupdate||De(),t.autoSync()}).bind("sortchange",function(){var e=Pe.scrollLeft(),n=Ue.hasClass("elfinder-cwd-allselected");De(),t.one("cwdrender",function(){Pe.scrollLeft(e),n&&(Q=t.arrayFlip(F||E,!0)),(n||Object.keys(Q).length)&&oe()})}).bind("viewchange",function(){var e="list"!=t.viewType,n=Ue.hasClass("elfinder-cwd-allselected");e!=p&&(p=e,t.viewType=p?"list":"icons",s&&t.one("cwdinit",function(){Ue.trigger("iconpref",{size:s})}),De(),_e(),n&&(Ue.addClass("elfinder-cwd-allselected"),Re.find("input").prop("checked",!0)),Object.keys(Q).length&&oe())}).bind("wzresize",function(){var e,n=p?Ue.find("tbody"):Ue;_e(!0),le.hpi&&Ee(n,n.find("[id]").length),e=Ue.offset(),Le.data("rectangle",Object.assign({width:Le.width(),height:Le.height(),cwdEdge:"ltr"===t.direction?e.left:e.left+Ue.width()},Le.offset())),le.itemH=(p?n.find("tr:first"):n.find("[id]:first")).outerHeight(!0)}).bind("changeclipboard",function(t){I={},t.data&&t.data.clipboard&&t.data.clipboard.length&&e.each(t.data.clipboard,function(e,t){t.cut&&(I[t.hash]=!0)})}).bind("resMixinMake",function(){Ce()}).bind("tmbreload",function(t){var n={},i=t.data&&t.data.files?t.data.files:null;e.each(i,function(e,t){t.tmb&&"1"!=t.tmb&&(n[t.hash]=t.tmb)}),Object.keys(n).length&&Ae(n,!0)}).add(function(n){var i=O?new RegExp(O.replace(/([\\*\;\.\?\[\]\{\}\(\)\^\$\-\|])/g,"\\$1"),"i"):null,a=t.searchStatus.mime,o=t.searchStatus.state>1,r=o&&t.searchStatus.target?t.searchStatus.target:t.cwd().hash,s=t.path(r),l=function(n){var l,c;return l=n.phash===r,!l&&o&&(c=n.path||t.path(n.hash),l=s&&0===c.indexOf(s),!l&&t.searchStatus.mixed&&(l=!!e.grep(t.searchStatus.mixed,function(e){return 0===n.hash.indexOf(e)}).length)),l&&o&&(l=a?0===n.mime.indexOf(a):!!(n.name.match(i)||n.i18&&n.i18.match(i))),l},c=e.grep(n.data.added||[],function(e){return!!l(e)});Se(c),2===t.searchStatus.state&&(e.each(c,function(t,n){e.inArray(n.hash,E)===-1&&E.push(n.hash)}),t.trigger("cwdhasheschange",E)),p&&_e(),Pe.trigger(pe)}).change(function(n){var i,a=t.cwd().hash,o=t.selected();O?e.each(n.data.changed||[],function(n,a){t.cwdHash2Elm(a.hash).length&&(Oe([a.hash]),Se([a],"change"),e.inArray(a.hash,o)!==-1&&Z(a.hash),i=!0)}):e.each(e.grep(n.data.changed||[],function(e){return e.phash==a}),function(n,a){t.cwdHash2Elm(a.hash).length&&(Oe([a.hash]),Se([a],"change"),e.inArray(a.hash,o)!==-1&&Z(a.hash),i=!0)}),i&&(t.trigger("cwdhasheschange",E),p&&_e(),Pe.trigger(pe)),oe()}).remove(function(e){var t=p?Ue.find("tbody"):Ue;Oe(e.data.removed||[]),oe(),se.length<1&&t.children(b+(n.oldSchool?":not(.elfinder-cwd-parent)":"")).length<1?(Le.addClass("elfinder-cwd-wrapper-empty"),R&&Re.find("input").prop("checked",!1),qe.hide(),Pe.off(pe,ye),_e()):(Ee(t),Pe.trigger(pe))}).dragstart(function(t){var n=e(t.data.target),i=t.data.originalEvent;n.hasClass(v)&&(n.hasClass(y)||(!(i.ctrlKey||i.metaKey||i.shiftKey)&&ne({notrigger:!0}),n.trigger(u),oe())),Ue.removeClass(w).data("selectable")&&Ue.selectable("disable"),G=!0}).dragstop(function(){Ue.data("selectable")&&Ue.selectable("enable"),G=!1}).bind("lockfiles unlockfiles selectfiles unselectfiles",function(n){var i,a,o,r={lockfiles:f,unlockfiles:m,selectfiles:u,unselectfiles:h},s=r[n.type],l=n.data.files||[],c=l.length,d=n.data.helper||e();if(c>0&&(i=t.parents(l[0])),s!==u&&s!==h||(o=s===u,e.each(l,function(e,t){var n=Ue.hasClass("elfinder-cwd-allselected");Q[t]?(n&&(R&&Re.children("input").prop("checked",!1),Ue.removeClass("elfinder-cwd-allselected"),n=!1),!o&&delete Q[t]):o&&(Q[t]=!0)})),!d.data("locked")){for(;c--;)try{t.cwdHash2Elm(l[c]).trigger(s)}catch(n){}!n.data.inselect&&oe()}Pe.data("dropover")&&i.indexOf(Pe.data("dropover"))!==-1&&(a="lockfiles"!==n.type,d.toggleClass("elfinder-drag-helper-plus",a),Pe.toggleClass(T,a))}).bind("mkdir mkfile duplicate upload rename archive extract paste multiupload",function(n){if("upload"!=n.type||!n.data._multiupload){var i=t.cwd().hash;ne({notrigger:!0}),e.each((n.data.added||[]).concat(n.data.changed||[]),function(e,t){t&&t.phash==i&&Z(t.hash)}),oe()}}).shortcut({pattern:"ctrl+a",description:"selectall",callback:te}).shortcut({pattern:"ctrl+shift+i",description:"selectinvert",callback:ie}).shortcut({pattern:"left right up down shift+left shift+right shift+up shift+down",description:"selectfiles",type:"keydown",callback:function(e){Y(e.keyCode,e.shiftKey)}}).shortcut({pattern:"home",description:"selectffile",callback:function(e){ne({notrigger:!0}),re(Ue.find("[id]:first").trigger(u)),oe()}}).shortcut({pattern:"end",description:"selectlfile",callback:function(e){ne({notrigger:!0}),re(Ue.find("[id]:last").trigger(u)),oe()}}).shortcut({pattern:"page_up",description:"pageTurning",callback:function(e){le.itemH&&Pe.scrollTop(Math.round(Pe.scrollTop()-Math.floor((Pe.height()+(p?le.itemH*-1:16))/le.itemH)*le.itemH))}}).shortcut({pattern:"page_down",description:"pageTurning",callback:function(e){le.itemH&&Pe.scrollTop(Math.round(Pe.scrollTop()+Math.floor((Pe.height()+(p?le.itemH*-1:16))/le.itemH)*le.itemH))}})}),this},e.fn.elfinderdialog=function(t,n){var i,a,o,r,s=window.navigator.platform.indexOf("Win")!=-1,l={},c={enabled:!1,width:!1,height:!1,defaultSize:null},d=function(t){var i,a;c.enabled&&(a=n.options.dialogContained?o:e(window),i={maxWidth:c.width?a.width()-l.width:null,maxHeight:c.height?a.height()-l.height:null},Object.assign(r,i),t.css(i).trigger("resize"),t.data("hasResizable")&&(t.resizable("option","maxWidth")<i.maxWidth||t.resizable("option","maxHeight")<i.maxHeight)&&t.resizable("option",i))},p=function(e){var t=e.data;i&&cancelAnimationFrame(i),i=requestAnimationFrame(function(){c.enabled&&d(t)})},u=function(){var e="elfinder-dialog",t=o.children("."+e+"."+n.res("class","editing")+":visible");n[t.length?"disable":"enable"]()},h={};return n&&n.ui?o=n.getUI():(o=this.closest(".elfinder"),n||(n=o.elfinder("instance"))),"string"==typeof t?((a=this.closest(".ui-dialog")).length&&("open"===t?"none"===a.css("display")&&(a.trigger("posinit").show().trigger("open").hide(),a.fadeIn(120,function(){n.trigger("dialogopened",{dialog:a})})):"close"===t||"destroy"===t?(a.stop(!0),(a.is(":visible")||o.is(":hidden"))&&(a.trigger("close"),n.trigger("dialogclosed",{dialog:a})),"destroy"===t?(a.remove(),n.trigger("dialogremoved",{dialog:a})):a.data("minimized")&&a.data("minimized").close()):"toTop"===t?(a.trigger("totop"),n.trigger("dialogtotoped",{dialog:a})):"posInit"===t?(a.trigger("posinit"),n.trigger("dialogposinited",{dialog:a})):"tabstopsInit"===t?(a.trigger("tabstopsInit"),n.trigger("dialogtabstopsinited",{dialog:a})):"checkEditing"===t&&u()),this):(t=Object.assign({},e.fn.elfinderdialog.defaults,t),t.allowMinimize&&"auto"===t.allowMinimize&&(t.allowMinimize=!!this.find("textarea,input").length),t.openMaximized=t.allowMinimize&&t.openMaximized,t.headerBtnPos&&"auto"===t.headerBtnPos&&(t.headerBtnPos=s?"right":"left"),t.headerBtnOrder&&"auto"===t.headerBtnOrder&&(t.headerBtnOrder=s?"close:maximize:minimize":"close:minimize:maximize"),t.modal&&t.allowMinimize&&(t.allowMinimize=!1),n.options.dialogContained?c.width=c.height=c.enabled=!0:(c.width="window"===t.maxWidth,c.height="window"===t.maxHeight,(c.width||c.height)&&(c.enabled=!0)),h=n.arrayFlip(t.propagationEvents,!0),this.filter(":not(.ui-dialog-content)").each(function(){var i,a,f=e(this).addClass("ui-dialog-content ui-widget-content"),m="elfinder-dialog-active",g="elfinder-dialog",v="elfinder-dialog-notify",b="ui-state-hover",y="elfinder-tabstop",w="elfinder-focus",x="elfinder-dialog-modal",k=parseInt(1e6*Math.random()),C=e('<div class="ui-dialog-titlebar ui-widget-header ui-corner-top ui-helper-clearfix"><span class="elfinder-dialog-title">'+t.title+"</span></div>"),z=e('<div class="ui-dialog-buttonset"></div>'),T=e('<div class=" ui-helper-clearfix ui-dialog-buttonpane ui-widget-content"></div>').append(z),A=0,j=0,S=e(),O=e('<div style="width:100%;height:100%;position:absolute;top:0px;left:0px;"></div>').hide(),I=function(){t.optimizeNumber&&P.find("input[type=number]").each(function(){e(this).attr("inputmode","numeric"),e(this).attr("pattern","[0-9]*")})},M=function(){S=P.find("."+y),S.length&&(S.attr("tabindex","-1"),S.filter("."+w).length||z.children("."+y+":"+(s?"first":"last")).addClass(w))},E=function(t){var n=S.filter(":visible:enabled"),i=t?null:n.filter("."+w+":first");return i&&i.length||(i=n.first()),t&&e.each(n,function(e,a){if(a===t&&n[e+1])return i=n.eq(e+1),!1}),i},F=function(t){var n=S.filter(":visible:enabled"),i=n.last();return e.each(n,function(e,a){if(a===t&&n[e-1])return i=n.eq(e-1),!1}),i},D=function(){e.each(t.headerBtnOrder.split(":").reverse(),function(e,t){U[t]&&U[t]()}),s&&C.children(".elfinder-titlebar-button").addClass("elfinder-titlebar-button-right")},U={close:function(){C.prepend(e('<span class="ui-widget-header ui-dialog-titlebar-close ui-corner-all elfinder-titlebar-button"><span class="ui-icon ui-icon-closethick"></span></span>').on("mousedown touchstart",function(e){e.preventDefault(),e.stopPropagation(),f.elfinderdialog("close")}))},maximize:function(){t.allowMaximize&&(P.on("resize",function(e,t){var n,i;if(e.preventDefault(),e.stopPropagation(),t&&t.maximize){if(i=C.find(".elfinder-titlebar-full"),n="on"===t.maximize,i.children("span.ui-icon").toggleClass("ui-icon-plusthick",!n).toggleClass("ui-icon-arrowreturnthick-1-s",n),n){try{P.hasClass("ui-draggable")&&P.draggable("disable"),P.hasClass("ui-resizable")&&P.resizable("disable")}catch(e){}f.css("width","100%").css("height",P.height()-P.children(".ui-dialog-titlebar").outerHeight(!0)-T.outerHeight(!0))}else{f.attr("style",i.data("style")),i.removeData("style"),q();try{P.hasClass("ui-draggable")&&P.draggable("enable"),P.hasClass("ui-resizable")&&P.resizable("enable")}catch(e){}}P.trigger("resize",{init:!0})}}),C.prepend(e('<span class="ui-widget-header ui-corner-all elfinder-titlebar-button elfinder-titlebar-full"><span class="ui-icon ui-icon-plusthick"></span></span>').on("mousedown touchstart",function(i){var a=e(this);i.preventDefault(),i.stopPropagation(),P.hasClass("elfinder-maximized")||"undefined"!=typeof a.data("style")||(f.height(f.height()),a.data("style",f.attr("style")||"")),n.toggleMaximize(P),"function"==typeof t.maximize&&t.maximize.call(f[0])})))},minimize:function(){var i,a,o;t.allowMinimize&&(i=e('<span class="ui-widget-header ui-corner-all elfinder-titlebar-button elfinder-titlebar-minimize"><span class="ui-icon ui-icon-minusthick"></span></span>').on("mousedown touchstart",function(i){var r=e(this),s=n.getUI("bottomtray"),l={width:70,height:24},c=e("<div></div>").css(l).addClass(P.get(0).className+" elfinder-dialog-minimized"),d=function(){a.remove(),P.removeData("minimized").show(),f.elfinderdialog("close")},p={};i.preventDefault(),i.stopPropagation(),P.data("minimized")?(P.removeData("minimized").before(a.css(Object.assign({position:"absolute"},a.offset()))),n.toFront(a),a.animate(Object.assign({width:P.width(),height:P.height()},o),function(){P.show(),n.toFront(P),a.remove(),q(),u(),P.trigger("resize",{init:!0}),"function"==typeof t.minimize&&t.minimize.call(f[0])})):(o=P.data("minimized",{dialog:function(){return a},show:function(){a.show()},hide:function(){a.hide()},close:d,title:function(e){a.children(".ui-dialog-titlebar").children(".elfinder-dialog-title").text(e)}}).position(),a=P.clone().on("mousedown",function(){r.trigger("mousedown")}).removeClass("ui-draggable ui-resizable elfinder-frontmost"),s.append(c),Object.assign(p,c.offset(),l),c.remove(),a.height(P.height()).children(".ui-dialog-content:first").empty(),n.toHide(P.before(a)),a.children(".ui-dialog-content:first,.ui-dialog-buttonpane,.ui-resizable-handle").remove(),a.find(".elfinder-titlebar-minimize,.elfinder-titlebar-full").remove(),a.find(".ui-dialog-titlebar-close").on("mousedown",function(e){e.stopPropagation(),e.preventDefault(),d()}),a.animate(p,function(){a.attr("style","").css({maxWidth:P.width()}).addClass("elfinder-dialog-minimized").appendTo(s),u(),"function"==typeof t.minimize&&t.minimize.call(f[0])}))}),C.on("dblclick",function(t){e(this).children(".elfinder-titlebar-minimize").trigger("mousedown")}).prepend(i),P.on("togleminimize",function(){i.trigger("mousedown")}))}},P=e('<div class="ui-front ui-dialog ui-widget ui-widget-content ui-corner-all ui-draggable std42-dialog touch-punch '+g+" "+t.cssClass+'"></div>').hide().append(f).appendTo(o).draggable({containment:n.options.dialogContained?o:null,handle:".ui-dialog-titlebar",start:function(){O.show()},drag:function(e,t){var i=t.offset.top,a=t.offset.left;i<0&&(t.position.top=t.position.top-i),a<0&&(t.position.left=t.position.left-a),n.options.dialogContained&&(t.position.top<0&&(t.position.top=0),t.position.left<0&&(t.position.left=0))},stop:function(e,n){O.hide(),P.css({height:t.height}),f.data("draged",!0)}}).css({width:t.width,height:t.height,minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight}).on("touchstart touchmove touchend click dblclick mouseup mouseenter mouseleave mouseout mouseover mousemove",function(e){!h[e.type]&&e.stopPropagation()}).on("mousedown",function(t){!h[t.type]&&t.stopPropagation(),requestAnimationFrame(function(){P.is(":visible")&&!P.hasClass("elfinder-frontmost")&&(a=e(":focus"),a.length||(a=void 0),P.trigger("totop"))})}).on("open",function(){P.data("margin-y",f.outerHeight(!0)-f.height()),c.enabled&&(t.height&&"auto"!==t.height&&P.trigger("resize",{init:!0}),c.defaultSize||(c.defaultSize={width:f.width(),height:f.height()}),d(P),P.trigger("resize").trigger("posinit"),o.on("resize."+n.namespace,P,p)),P.hasClass(v)||o.children("."+g+":visible:not(."+v+")").each(function(){var t=e(this),n=parseInt(t.css("top")),i=parseInt(t.css("left")),a=parseInt(P.css("top")),o=parseInt(P.css("left")),r=Math.abs(n-a)<10,s=Math.abs(i-o)<10;t[0]!=P[0]&&(r||s)&&P.css({top:r?n+10:a,left:s?i+10:o})}),P.data("modal")&&(P.addClass(x),n.getUI("overlay").elfinderoverlay("show")),P.trigger("totop"),t.openMaximized&&n.toggleMaximize(P),n.trigger("dialogopen",{dialog:P}),"function"==typeof t.open&&e.proxy(t.open,f[0])(),t.closeOnEscape&&e(document).on("keydown."+k,function(t){t.keyCode==e.ui.keyCode.ESCAPE&&P.hasClass("elfinder-frontmost")&&f.elfinderdialog("close")}),P.hasClass(n.res("class","editing"))&&u()}).on("close",function(i){var a,r;t.beforeclose&&"function"==typeof t.beforeclose?(r=t.beforeclose(),r&&r.promise||(r=r?e.Deferred().resolve():e.Deferred().reject())):r=e.Deferred().resolve(),r.done(function(){c.enabled&&o.off("resize."+n.namespace,p),t.closeOnEscape&&e(document).off("keyup."+k),t.allowMaximize&&n.toggleMaximize(P,!1),n.toHide(P),P.data("modal")&&n.getUI("overlay").elfinderoverlay("hide"),"function"==typeof t.close&&e.proxy(t.close,f[0])(),t.destroyOnClose&&P.parent().length&&P.hide().remove(),a=o.children("."+g+":visible"),P.hasClass(n.res("class","editing"))&&u()})}).on("totop frontmost",function(){var e=n.storage("autoFocusDialog");P.data("focusOnMouseOver",e?e>0:n.options.uiOptions.dialog.focusOnMouseOver),P.data("minimized")&&C.children(".elfinder-titlebar-minimize").trigger("mousedown"),!P.data("modal")&&n.getUI("overlay").is(":visible")?n.getUI("overlay").before(P):n.toFront(P),o.children("."+g+":not(."+x+")").removeClass(m),P.addClass(m),!n.UA.Mobile&&(a||E()).trigger("focus"),a=void 0}).on("posinit",function(){var i,a,s,l,c,d,p,u=t.position;if(!P.hasClass("elfinder-maximized")){if(!u&&!P.data("resizing")){if(p=o.hasClass("elfinder-fullscreen")||n.options.enableAlways,P.css(p?{maxWidth:"100%",maxHeight:"100%",overflow:"auto"}:r),n.UA.Mobile&&!p&&P.data("rotated")===n.UA.Rotated)return;P.data("rotated",n.UA.Rotated),c=e(window),i=o.offset(),l={width:P.outerWidth(!0),height:P.outerHeight(!0)},l.right=i.left+l.width,l.bottom=i.top+l.height,d={scrLeft:c.scrollLeft(),scrTop:c.scrollTop(),width:c.width(),height:c.height()},d.right=d.scrLeft+d.width,d.bottom=d.scrTop+d.height,n.options.dialogContained||p?(a=0,s=0):(a=i.top*-1+d.scrTop,s=i.left*-1+d.scrLeft),u={top:l.height>=d.height?a:Math.max(a,parseInt((o.height()-l.height)/2-42)),left:l.width>=d.width?s:Math.max(s,parseInt((o.width()-l.width)/2))},l.right+u.left>d.right&&(u.left=Math.max(s,d.right-l.right)),l.bottom+u.top>d.bottom&&(u.top=Math.max(a,d.bottom-l.bottom))}t.absolute&&(u.position="absolute"),u&&P.css(u)}}).on("resize",function(n,i){var a,o,r,s,l=0,d=i&&i.init;i&&(i.minimize||i.maxmize)||P.data("minimized")||(n.stopPropagation(),n.preventDefault(),P.children(".ui-widget-header,.ui-dialog-buttonpane").each(function(){l+=e(this).outerHeight(!0)}),s="auto"===t.height,s&&f.css({"max-height":"",height:"auto"}),d||!c.enabled||n.originalEvent||P.hasClass("elfinder-maximized")?a=P.height()-l-P.data("margin-y"):(a=P.height(),o=P.css("min-height")||a,r=P.css("max-height")||a,o=o.match(/%/)?Math.floor(parseInt(o)/100*P.parent().height()):parseInt(o),r=r.match(/%/)?Math.floor(parseInt(r)/100*P.parent().height()):parseInt(r),a=Math.min(s?P.height():c.defaultSize.height,Math.max(r,o)-l-P.data("margin-y"))),f.css(s?"max-height":"height",a),d||(q(),o=f.height(),o=a<o?o+l+P.data("margin-y"):t.minHeight,P.css("min-height",o),P.data("hasResizable")&&P.resizable("option",{minHeight:o}),"function"==typeof t.resize&&e.proxy(t.resize,f[0])(n,i)))}).on("tabstopsInit",M).on("focus","."+y,function(){e(this).addClass(b).parent("label").addClass(b),this.id&&e(this).parent().find("label[for="+this.id+"]").addClass(b)}).on("click","select."+y,function(){var t=e(this);t.data("keepFocus")?t.removeData("keepFocus"):t.data("keepFocus",!0)}).on("blur","."+y,function(){e(this).removeClass(b).removeData("keepFocus").parent("label").removeClass(b),this.id&&e(this).parent().find("label[for="+this.id+"]").removeClass(b)}).on("mouseenter mouseleave","."+y+",label",function(n){var i,a=e(this);("LABEL"!==this.nodeName||a.children("."+y).length||(i=a.attr("for"))&&e("#"+i).hasClass(y))&&(t.btnHoverFocus&&P.data("focusOnMouseOver")?"mouseenter"!==n.type||e(":focus").data("keepFocus")||a.trigger("focus"):a.toggleClass(b,"mouseenter"==n.type))}).on("keydown","."+y,function(t){var n,i,a=e(this);if(a.is(":focus")){if(n=t.keyCode===e.ui.keyCode.ESCAPE,t.keyCode===e.ui.keyCode.ENTER?(t.preventDefault(),a.trigger("click")):t.keyCode===e.ui.keyCode.TAB&&t.shiftKey||t.keyCode===e.ui.keyCode.LEFT||t.keyCode==e.ui.keyCode.UP?i="prev":t.keyCode!==e.ui.keyCode.TAB&&t.keyCode!=e.ui.keyCode.RIGHT&&t.keyCode!=e.ui.keyCode.DOWN||(i="next"),i&&(a.is("textarea")&&!t.ctrlKey&&!t.metaKey||a.is("select,span.ui-slider-handle")&&t.keyCode!==e.ui.keyCode.TAB||a.is("input:not(:checkbox,:radio)")&&!t.ctrlKey&&!t.metaKey&&t.keyCode===e.ui.keyCode["prev"===i?"LEFT":"RIGHT"]))return void t.stopPropagation();n?a.is("input:not(:checkbox,:radio),textarea")&&""!==a.val()&&(a.val(""),t.stopPropagation()):t.stopPropagation(),i&&(t.preventDefault(),("prev"===i?F:E)(this).trigger("focus"))}}).data({modal:t.modal}),q=function(){var e,t=n.getUI();t.hasClass("elfinder-fullscreen")&&(e=P.position(),P.css("top",Math.max(Math.min(Math.max(e.top,0),t.height()-100),0)),P.css("left",Math.max(Math.min(Math.max(e.left,0),t.width()-200),0)))};P.prepend(C),D(),e.each(t.buttons,function(t,n){var i=e('<button type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only elfinder-btncnt-'+j++ +" "+y+'"><span class="ui-button-text">'+t+"</span></button>").on("click",e.proxy(n,f[0]));n._cssClass&&i.addClass(n._cssClass),s?z.append(i):z.prepend(i)}),z.children().length&&(P.append(T),P.show(),T.find("button").each(function(t,n){A+=e(n).outerWidth(!0)}),P.hide(),A+=20,P.width()<A&&P.width(A)),P.append(O),c.enabled&&(l.width=P.outerWidth(!0)-P.width()+(P.outerWidth()-P.width())/2,l.height=P.outerHeight(!0)-P.height()+(P.outerHeight()-P.height())/2),n.options.dialogContained&&(i={maxWidth:o.width()-l.width,maxHeight:o.height()-l.height},t.maxWidth=t.maxWidth?Math.min(i.maxWidth,t.maxWidth):i.maxWidth,t.maxHeight=t.maxHeight?Math.min(i.maxHeight,t.maxHeight):i.maxHeight,P.css(i)),r={maxWidth:P.css("max-width"),maxHeight:P.css("max-height"),overflow:P.css("overflow")},t.resizable&&P.resizable({minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight,start:function(){O.show(),P.data("resizing")!==!0&&P.data("resizing")&&clearTimeout(P.data("resizing")),P.data("resizing",!0)},stop:function(e,t){O.hide(),P.data("resizing",setTimeout(function(){P.data("resizing",!1)},200)),c.enabled&&(c.defaultSize={width:f.width(),height:f.height()})}}).data("hasResizable",!0),I(),M(),"function"==typeof t.create&&e.proxy(t.create,this)(),t.autoOpen&&(t.open?requestAnimationFrame(function(){f.elfinderdialog("open")}):f.elfinderdialog("open")),t.resize&&n.bind("themechange",function(){setTimeout(function(){P.data("margin-y",f.outerHeight(!0)-f.height()),P.trigger("resize",{init:!0})},300)})}),this)},e.fn.elfinderdialog.defaults={cssClass:"",title:"",modal:!1,resizable:!0,autoOpen:!0,closeOnEscape:!0,destroyOnClose:!1,buttons:{},btnHoverFocus:!0,position:null,absolute:!1,width:320,height:"auto",minWidth:200,minHeight:70,maxWidth:null,maxHeight:null,allowMinimize:"auto",allowMaximize:!1,openMaximized:!1,headerBtnPos:"auto",headerBtnOrder:"auto",optimizeNumber:!0,propagationEvents:["mousemove","mouseup"]},e.fn.elfinderfullscreenbutton=function(t){return this.each(function(){var n,i=e(this).elfinderbutton(t),a=i.children(".elfinder-button-icon");t.change(function(){n&&cancelAnimationFrame(n),n=requestAnimationFrame(function(){var e=t.value;a.addClass("elfinder-button-icon-fullscreen").toggleClass("elfinder-button-icon-unfullscreen",e),t.className=e?"unfullscreen":""})})})},e.fn.elfindernavbar=function(t,n){return this.not(".elfinder-navbar").each(function(){var i,a,o,r,s,l,c,d=e(this).hide().addClass("ui-state-default elfinder-navbar"),p=d.css("overflow","hidden").parent(),u=p.children(".elfinder-workzone").append(d),h="ltr"==t.direction,f=function(){var e=t.getUI("cwd"),n=t.getUI("workzone"),i=n.data("rectangle"),a=e.offset();n.data("rectangle",Object.assign(i,{cwdEdge:"ltr"===t.direction?a.left:a.left+e.width()}))},m=function(){d.css("overflow","hidden"),i=Math.round(d.outerHeight()-d.height()),a=Math.round(c.outerWidth()-c.innerWidth()),d.css("overflow","auto")};t.one("init",function(){c=t.getUI("navdock");var e=function(){m(),t.bind("wzresize",function(){var e=0;c.width(d.outerWidth()-a),c.children().length>1&&(e=c.outerHeight(!0)),d.height(u.height()-e-i)}).trigger("wzresize")};t.cssloaded?e():t.one("cssloaded",e)}).one("opendone",function(){o&&o.trigger("resize"),d.css("overflow","auto")}).bind("themechange",m),t.UA.Touch&&(s=t.storage("autoHide")||{},"undefined"==typeof s.navbar&&(s.navbar=n.autoHideUA&&n.autoHideUA.length>0&&e.grep(n.autoHideUA,function(e){return!!t.UA[e]}).length,t.storage("autoHide",s)),s.navbar&&t.one("init",function(){d.children().length&&t.uiAutoHide.push(function(){d.stop(!0,!0).trigger("navhide",{duration:"slow",init:!0})})}),t.bind("load",function(){d.children().length&&(r=e('<div class="elfinder-navbar-swipe-handle"></div>').hide().appendTo(u),"none"!==r.css("pointer-events")&&(r.remove(),r=null))}),d.on("navshow navhide",function(e,n){var i="navshow"===e.type?"show":"hide",a=n&&n.duration?n.duration:"fast",o=n&&n.handleW?n.handleW:Math.max(50,t.getUI().width()/10);d.stop(!0,!0)[i]({duration:a,step:function(){t.trigger("wzresize")},complete:function(){r&&("show"===i?r.stop(!0,!0).hide():(r.width(o?o:""),t.resources.blink(r,"slowonce"))),t.trigger("navbar"+i),n.init&&t.trigger("uiautohide"),f()}}),s.navbar="show"!==i,t.storage("autoHide",Object.assign(t.storage("autoHide"),{navbar:s.navbar}))}).on("touchstart",function(n){e(this)["scroll"+("ltr"===t.direction?"Right":"Left")]()>5&&(n.originalEvent._preventSwipeX=!0)})),t.UA.Mobile||(o=d.resizable({handles:h?"e":"w",minWidth:n.minWidth||150,maxWidth:n.maxWidth||500,resize:function(){t.trigger("wzresize")},stop:function(e,n){t.storage("navbarWidth",n.size.width),f()}}).on("resize scroll",function(n){var i=e(this),a=i.data("posinit");n.preventDefault(),n.stopPropagation(),h||"resize"!==n.type||d.css("left",0),a&&cancelAnimationFrame(a),i.data("posinit",requestAnimationFrame(function(){var e=t.UA.Opera&&d.scrollLeft()?20:2;o.css("top",0).css({top:parseInt(d.scrollTop())+"px",left:h?"auto":parseInt(d.scrollRight()-e)*-1,right:h?parseInt(d.scrollLeft()-e)*-1:"auto"}),"resize"===n.type&&t.getUI("cwd").trigger("resize")}))}).children(".ui-resizable-handle").addClass("ui-front")),(l=t.storage("navbarWidth"))?d.width(l):t.UA.Mobile&&t.one(t.cssloaded?"init":"cssloaded",function(){var n=function(){l=d.parent().width()/2,d.data("defWidth")>l?d.width(l):d.width(d.data("defWidth")),d.data("width",d.width()),t.trigger("wzresize")};d.data("defWidth",d.width()),e(window).on("resize."+t.namespace,n),n()})}),this},e.fn.elfindernavdock=function(t,n){return this.not(".elfinder-navdock").each(function(){var i,a,o=e(this).hide().addClass("ui-state-default elfinder-navdock touch-punch"),r=o.parent(),s=(r.children(".elfinder-workzone").append(o),function(n,i){var a,r=i||o.height(),s=n-r,l=Object.keys(c).length,d=l?s/l:0;s&&(a=o.css("overflow"),o.css("overflow","hidden"),o.height(n),e.each(c,function(e,n){n.height(n.height()+d).trigger("resize."+t.namespace)}),t.trigger("wzresize"),o.css("overflow",a))}),l=e('<div class="ui-front ui-resizable-handle ui-resizable-n"></div>').appendTo(o),c={},d=(parseInt(n.initMaxHeight)||50)/100,p=(parseInt(n.maxHeight)||90)/100;o.data("addNode",function(e,n){var r,u,h,f=t.getUI("workzone").height(),m=f*d;return n=Object.assign({first:!1,sizeSync:!0,init:!1},n),e.attr("id")||e.attr("id",t.namespace+"-navdock-"+ +new Date),n.sizeSync&&(c[e.attr("id")]=e),r=o.height(),u=r+e.outerHeight(!0),n.first?l.after(e):o.append(e),a=!0,o.resizable("enable").height(u).show(),t.trigger("wzresize"),n.init&&(h=t.storage("navdockHeight"),u=h?h:u>m?m:u,i=u),s(Math.min(u,f*p)),o}).data("removeNode",function(n,i){var r=e("#"+n);return delete c[n],o.height(o.height()-e("#"+n).outerHeight(!0)),i?"detach"===i?r=r.detach():i.append(r):r.remove(),o.children().length<=1&&(a=!1,o.resizable("disable").height(0).hide()),t.trigger("wzresize"),r}),n.disabled||t.one("init",function(){var e;t.getUI("navbar").children().not(".ui-resizable-handle").length&&(o.data("dockEnabled",!0),o.resizable({maxHeight:t.getUI("workzone").height()*p,handles:{n:l},start:function(n,i){e=o.css("overflow"),o.css("overflow","hidden"),t.trigger("navdockresizestart",{event:n,ui:i},!0)},resize:function(e,n){o.css("top",""),t.trigger("wzresize",{inNavdockResize:!0})},stop:function(n,a){t.trigger("navdockresizestop",{event:n,ui:a},!0),o.css("top",""),i=a.size.height,t.storage("navdockHeight",i),s(i,a.originalSize.height),o.css("overflow",e)}}),t.bind("wzresize",function(e){var n,a;o.is(":visible")&&(n=t.getUI("workzone").height()*p,e.data&&e.data.inNavdockResize||(a=o.height(),n<i?Math.abs(a-n)>1&&s(n):Math.abs(a-i)>1&&s(i)),o.resizable("option","maxHeight",n))}).bind("themechange",function(){var e=Math.round(o.height());requestAnimationFrame(function(){var t=Math.round(o.height()),n=e-t;0!==n&&s(o.height(),t-n)})})),t.bind("navbarshow navbarhide",function(e){o[a&&"navbarshow"===e.type?"show":"hide"]()})})}),this},e.fn.elfinderoverlay=function(t){var n,i,a,o,r=this.parent().elfinder("instance");return this.filter(":not(.elfinder-overlay)").each(function(){t=Object.assign({},t),e(this).addClass("ui-front ui-widget-overlay elfinder-overlay").hide().on("mousedown",function(e){e.preventDefault(),e.stopPropagation()}).data({cnt:0,show:"function"==typeof t.show?t.show:function(){},hide:"function"==typeof t.hide?t.hide:function(){}})}),"show"==t&&(n=this.eq(0),i=n.data("cnt")+1,a=n.data("show"),r.toFront(n),n.data("cnt",i),n.is(":hidden")&&(n.show(),a())),"hide"==t&&(n=this.eq(0),i=n.data("cnt")-1,o=n.data("hide"),n.data("cnt",i),i<=0&&(n.hide(),o())),this},e.fn.elfinderpanel=function(t){return this.each(function(){var n=e(this).addClass("elfinder-panel ui-state-default ui-corner-all"),i="margin-"+("ltr"==t.direction?"left":"right");
18
  t.one("load",function(e){var a=t.getUI("navbar");n.css(i,parseInt(a.outerWidth(!0))),a.on("resize",function(e){e.preventDefault(),e.stopPropagation(),n.is(":visible")&&n.css(i,parseInt(a.outerWidth(!0)))})})})},e.fn.elfinderpath=function(t,n){return this.each(function(){var a,o,r="",s="",l=[],c="statusbar",d=t.res("class","hover"),p="path"+(i.prototype.uniqueid?i.prototype.uniqueid:"")+"-",u=e('<div class="ui-widget-header ui-helper-clearfix elfinder-workzone-path"></div>'),h=e(this).addClass("elfinder-path").html("&nbsp;").on("mousedown","span.elfinder-path-dir",function(n){var i=e(this).attr("id").substr(p.length);n.preventDefault(),i!=t.cwd().hash&&(e(this).addClass(d),r?t.exec("search",r,{target:i,mime:l.join(" ")}):t.trigger("select",{selected:[i]}).exec("open",i))}).prependTo(t.getUI("statusbar").show()),f=e('<div class="elfinder-path-roots"></div>').on("click",function(n){n.stopPropagation(),n.preventDefault();var i=e.map(t.roots,function(e){return t.file(e)}),a=[];e.each(i,function(e,n){n.phash||t.root(t.cwd().hash,!0)===n.hash||a.push({label:t.escape(n.i18||n.name),icon:"home",callback:function(){t.exec("open",n.hash)},options:{iconClass:n.csscls||"",iconImg:n.icon||""}})}),t.trigger("contextmenu",{raw:a,x:n.pageX,y:n.pageY})}).append('<span class="elfinder-button-icon elfinder-button-icon-menu" ></span>').appendTo(u),m=function(n){var i=[],a=[];return e.each(t.parents(n),function(e,o){var r=n===o?"elfinder-path-dir elfinder-path-cwd":"elfinder-path-dir",s=t.file(o),l=t.escape(s.i18||s.name);a.push(l),i.push('<span id="'+p+o+'" class="'+r+'" title="'+a.join(t.option("separator"))+'">'+l+"</span>")}),i.join('<span class="elfinder-path-other">'+t.option("separator")+"</span>")},g=function(){var n;h.children("span.elfinder-path-dir").attr("style",""),n="ltr"===t.direction?e("#"+p+t.cwd().hash).prevAll("span.elfinder-path-dir:first"):e(),h.scrollLeft(n.length?n.position().left:0)},v=function(){if(!t.UA.CSS.flex){var n,i,a=h.children("span.elfinder-path-dir"),o=a.length;if("workzone"===c||o<2)return void a.attr("style","");h.width(h.css("max-width")),a.css({maxWidth:100/o+"%",display:"inline-block"}),n=h.width()-9,h.children("span.elfinder-path-other").each(function(){n-=e(this).width()}),i=[],a.each(function(t){var a=e(this),o=a.width();n-=o,o<this.scrollWidth&&i.push(t)}),h.width(""),i.length?(n>0&&(n/=i.length,e.each(i,function(t,i){var o=e(a[i]);o.css("max-width",o.width()+n)})),a.last().attr("style","")):a.attr("style","")}};t.one("init",function(){a=t.getUI("tree").length,o=t.getUI("stat").length,!a&&n.toWorkzoneWithoutNavbar&&(u.append(h).insertBefore(t.getUI("workzone")),c="workzone",t.bind("open",g).one("opendone",function(){t.getUI().trigger("resize")}))}).bind("open searchend parents",function(){r="",s="",l=[],h.html(m(t.cwd().hash)),Object.keys(t.roots).length>1?(h.css("margin",""),f.show()):(h.css("margin",0),f.hide()),!o&&v()}).bind("searchstart",function(e){e.data&&(r=e.data.query||"",s=e.data.target||"",l=e.data.mimes||[])}).bind("search",function(e){var n="";n=s?m(s):t.i18n("btnAll"),h.html('<span class="elfinder-path-other">'+t.i18n("searcresult")+": </span>"+n),v()}).bind("navbarshow navbarhide",function(){var e=t.getUI("workzone");"navbarshow"===this.type?(t.unbind("open",g),h.prependTo(t.getUI("statusbar")),u.detach(),c="statusbar"):(u.append(h).insertBefore(e),c="workzone",g(),t.bind("open",g)),t.trigger("uiresize")}).bind("resize uistatchange",v)})},e.fn.elfinderplaces=function(t,n){return this.each(function(){var i={},a="class",o=t.res(a,"navdir"),r=t.res(a,"navcollapse"),s=t.res(a,"navexpand"),l=t.res(a,"hover"),c=t.res(a,"treeroot"),d=t.res(a,"adroppable"),p=t.res("tpl","placedir"),u=t.res("tpl","perms"),h=e(t.res("tpl","navspinner")),f=n.suffix?n.suffix:"",m="places"+f,g=null,v=function(e){return e.substr(6)},b=function(e){return"place-"+e},y=function(t){return e(document.getElementById(b(t)))},w=function(){var n=[],a={};n=e.map(E.children().find("[id]"),function(e){return v(e.id)}),n.length?e.each(n.reverse(),function(e,t){a[t]=i[t]}):a=null,t.storage(m,a)},x=function(){var a,o;m="places"+(n.suffix?n.suffix:""),i={},a=t.storage(m),"string"==typeof a?(a=e.grep(a.split(","),function(e){return!!e}),e.each(a,function(e,t){var n=t.split("#");i[n[0]]=n[1]?n[1]:n[0]})):e.isPlainObject(a)&&(i=a),t.trigger("placesload",{dirs:i,storageKey:m},!0),o=Object.keys(i),o.length&&(M.prepend(h),t.request({data:{cmd:"info",targets:o},preventDefault:!0}).done(function(n){var a={};n.files&&n.files.length&&t.cache(n.files),e.each(n.files,function(e,t){var n=t.hash;a[n]=t}),e.each(i,function(e,t){C(a[e]||Object.assign({notfound:!0},t))}),t.storage("placesState")>0&&M.trigger("click")}).always(function(){h.remove()}))},k=function(n,i){return e(p.replace(/\{id\}/,b(n?n.hash:i)).replace(/\{name\}/,t.escape(n?n.i18||n.name:i)).replace(/\{cssclass\}/,n?t.perms2class(n)+(n.notfound?" elfinder-na":"")+(n.csscls?" "+n.csscls:""):"").replace(/\{permissions\}/,!n||n.read&&n.write&&!n.notfound?"":u).replace(/\{title\}/,n?' title="'+t.escape(t.path(n.hash,!0)||n.i18||n.name)+'"':"").replace(/\{symlink\}/,"").replace(/\{style\}/,n&&n.icon?t.getIconStyle(n):""))},C=function(e){var n,a;return"directory"===e.mime&&(a=e.hash,t.files().hasOwnProperty(a)||t.trigger("tree",{tree:[e]}),n=k(e,a),i[a]=e,E.prepend(n),M.addClass(r),O.toggle(E.children().length>1),!0)},z=function(e){var t,n,a=null;return i[e]&&(delete i[e],t=y(e),t.length&&(a=t.text(),t.parent().remove(),n=E.children().length,O.toggle(n>1),n||(M.removeClass(r),F.removeClass(s),E.slideToggle(!1)))),a},T=function(e){var n=y(e),i=n.parent(),a=i.prev("div"),o="ui-state-hover",r=t.getUI("contextmenu");g&&clearTimeout(g),a.length&&(r.find(":first").data("placesHash",e),n.addClass(o),i.insertBefore(a),a=i.prev("div"),g=setTimeout(function(){n.removeClass(o),r.find(":first").data("placesHash")===e&&r.hide().empty()},1500)),a.length||(n.removeClass(o),r.hide().empty())},A=function(e,t){var n=e.hash,a=y(t||n),o=k(e,n);return a.length>0&&(a.parent().replaceWith(o),i[n]=e,!0)},j=function(){E.empty(),M.removeClass(r),F.removeClass(s),E.slideToggle(!1)},S=function(){e.each(i,function(n,i){var a=t.file(n)||i,r=k(a,n),s=null;return a||r.hide(),!(!E.children().length||(e.each(E.children(),function(){var t=e(this);if((a.i18||a.name).localeCompare(t.children("."+o).text())<0)return s=!r.insertBefore(t)}),null===s))||void(!y(n).length&&E.append(r))}),w()},O=e('<span class="elfinder-button-icon elfinder-button-icon-sort elfinder-places-root-icon" title="'+t.i18n("cmdsort")+'"></span>').hide().on("click",function(e){e.stopPropagation(),E.empty(),S()}),I=k({hash:"root-"+t.namespace,name:t.i18n(n.name,"places"),read:!0,write:!0}),M=I.children("."+o).addClass(c).on("click",function(e){e.stopPropagation(),M.hasClass(r)&&(F.toggleClass(s),E.slideToggle(),t.storage("placesState",F.hasClass(s)?1:0))}).append(O),E=I.children("."+t.res(a,"navsubtree")),F=e(this).addClass(t.res(a,"tree")+" elfinder-places ui-corner-all").hide().append(I).appendTo(t.getUI("navbar")).on("mouseenter mouseleave","."+o,function(t){e(this).toggleClass("ui-state-hover","mouseenter"==t.type)}).on("click","."+o,function(n){var i=e(this);return i.data("longtap")?void n.stopPropagation():void(!i.hasClass("elfinder-na")&&t.exec("open",i.attr("id").substr(6)))}).on("contextmenu","."+o+":not(."+c+")",function(n){var i=e(this),a=i.attr("id").substr(6);n.preventDefault(),t.trigger("contextmenu",{raw:[{label:t.i18n("moveUp"),icon:"up",remain:!0,callback:function(){T(a),w()}},"|",{label:t.i18n("rmFromPlaces"),icon:"rm",callback:function(){z(a),w()}}],x:n.pageX,y:n.pageY}),i.addClass("ui-state-hover"),t.getUI("contextmenu").children().on("mouseenter",function(){i.addClass("ui-state-hover")}),t.bind("closecontextmenu",function(){i.removeClass("ui-state-hover")})}).droppable({tolerance:"pointer",accept:".elfinder-cwd-file-wrapper,.elfinder-tree-dir,.elfinder-cwd-file",hoverClass:t.res("class","adroppable"),classes:{"ui-droppable-hover":t.res("class","adroppable")},over:function(n,a){var o=a.helper,r=e.grep(o.data("files"),function(e){return"directory"===t.file(e).mime&&!i[e]});n.stopPropagation(),o.data("dropover",o.data("dropover")+1),t.insideWorkzone(n.pageX,n.pageY)&&(r.length>0?(o.addClass("elfinder-drag-helper-plus"),t.trigger("unlockfiles",{files:o.data("files"),helper:o})):e(this).removeClass(d))},out:function(t,n){var i=n.helper;t.stopPropagation(),i.removeClass("elfinder-drag-helper-move elfinder-drag-helper-plus").data("dropover",Math.max(i.data("dropover")-1,0)),e(this).removeData("dropover").removeClass(d)},drop:function(n,a){var o=a.helper,r=!0;e.each(o.data("files"),function(e,n){var a=t.file(n);a&&"directory"==a.mime&&!i[a.hash]?C(a):r=!1}),w(),r&&o.hide()}}).on("touchstart","."+o+":not(."+c+")",function(n){if(!(n.originalEvent.touches.length>1))var i=e(this).attr("id").substr(6),a=e(this).addClass(l).data("longtap",null).data("tmlongtap",setTimeout(function(){a.data("longtap",!0),t.trigger("contextmenu",{raw:[{label:t.i18n("rmFromPlaces"),icon:"rm",callback:function(){z(i),w()}}],x:n.originalEvent.touches[0].pageX,y:n.originalEvent.touches[0].pageY})},500))}).on("touchmove touchend","."+o+":not(."+c+")",function(t){clearTimeout(e(this).data("tmlongtap")),"touchmove"==t.type&&e(this).removeClass(l)});e.fn.sortable&&E.addClass("touch-punch").sortable({appendTo:t.getUI(),revert:!1,helper:function(n){var i=e(n.target).parent();return i.children().removeClass("ui-state-hover"),e('<div class="ui-widget elfinder-place-drag elfinder-'+t.direction+'"></div>').append(e('<div class="elfinder-navbar"></div>').show().append(i.clone()))},stop:function(t,n){var i=e(n.item[0]),a=F.offset().top,o=F.offset().left,r=F.width(),s=F.height(),l=t.pageX,c=t.pageY;l>o&&l<o+r&&c>a&&c<c+s||(z(v(i.children(":first").attr("id"))),w())},update:function(e,t){w()}}),e(this).on("regist",function(t,n){var a=!1;e.each(n,function(e,t){t&&"directory"==t.mime&&!i[t.hash]&&C(t)&&(a=!0)}),a&&w()}),t.one("load",function(){t.oldAPI||(F.show().parent().show(),x(),t.change(function(t){var n=!1;e.each(t.data.changed,function(e,t){i[t.hash]&&("directory"!==t.mime?z(t.hash)&&(n=!0):A(t)&&(n=!0))}),n&&w()}).bind("rename",function(t){var n=!1;t.data.removed&&e.each(t.data.removed,function(e,i){t.data.added[e]&&A(t.data.added[e],i)&&(n=!0)}),n&&w()}).bind("rm paste",function(t){var n=[],i=!1;t.data.removed&&e.each(t.data.removed,function(e,t){var i=z(t);i&&n.push(i)}),n.length&&(i=!0),t.data.added&&n.length&&e.each(t.data.added,function(t,i){1!==e.inArray(i.name,n)&&"directory"==i.mime&&C(i)}),i&&w()}).bind("sync netmount",function(){var a,o=this,r=n.suffix?n.suffix:"";return"sync"===o.type&&f!==r?(f=r,j(),void x()):(a=Object.keys(i),void(a.length&&(M.prepend(h),t.request({data:{cmd:"info",targets:a},preventDefault:!0}).done(function(n){var a={},r=!1,s=t.cwd().hash;e.each(n.files||[],function(e,n){var i=n.hash;a[i]=n,t.files().hasOwnProperty(n.hash)||t.updateCache({tree:[n]})}),e.each(i,function(e,t){Boolean(t.notfound)===Boolean(a[e])?t.phash===s&&"netmount"!==o.type||a[e]&&"directory"!==a[e].mime?z(e)&&(r=!0):A(a[e]||Object.assign({notfound:!0},t))&&(r=!0):a[e]&&a[e].phash!=s&&A(a[e])}),r&&w()}).always(function(){h.remove()}))))}))})})},e.fn.elfindersearchbutton=function(t){return this.each(function(){var n,i,a,o,r=!1,s=t.fm,l=(s.res("class","disabled"),t.options.incsearch||{enable:!1}),c=t.options.searchTypes,d=function(e){return s.namespace+s.escape(e)},p=s.getUI("toolbar"),u=s.res("class","searchbtn"),h=e(this).hide().addClass("ui-widget-content elfinder-button "+u).on("click",function(e){e.stopPropagation()}),f=function(){var e=s.getUI(),t=e.offset(),n=h.offset();return{top:n.top-t.top,maxHeight:e.height()-40}},m=function(){b.data("inctm")&&clearTimeout(b.data("inctm"));var n=e.trim(b.val()),a=!e("#"+d("SearchFromAll")).prop("checked"),o=e("#"+d("SearchMime")).prop("checked"),l="";a&&(a=e("#"+d("SearchFromVol")).prop("checked")?s.root(s.cwd().hash):s.cwd().hash),o&&(o=n,n="."),i&&(l=i.children("input:checked").val()),n?(b.trigger("focus"),t.exec(n,a,o,l).done(function(){r=!0}).fail(function(){g()})):s.trigger("searchend")},g=function(){b.data("inctm")&&clearTimeout(b.data("inctm")),b.val("").trigger("blur"),(r||v)&&(r=!1,v="",s.lazy(function(){s.trigger("searchend")}))},v="",b=e('<input type="text" size="42"/>').on("focus",function(){!h.hasClass("ui-state-active")&&s.getUI().click(),o=!0,v="",h.addClass("ui-state-active"),s.trigger("uiresize"),n&&n.css(f()).slideDown(function(){h.addClass("ui-state-active"),s.toFront(n)})}).on("blur",function(){o=!1,n?n.data("infocus")?n.data("infocus",!1):n.slideUp(function(){h.removeClass("ui-state-active"),s.trigger("uiresize"),s.toHide(n)}):h.removeClass("ui-state-active")}).appendTo(h).on("keypress",function(e){e.stopPropagation()}).on("keydown",function(t){t.stopPropagation(),t.keyCode===e.ui.keyCode.ENTER?m():t.keyCode===e.ui.keyCode.ESCAPE&&(t.preventDefault(),g())});l.enable&&(l.minlen=l.minlen||2,l.wait=l.wait||500,b.attr("title",s.i18n("incSearchOnly")).on("compositionstart",function(){b.data("composing",!0)}).on("compositionend",function(){b.removeData("composing"),b.trigger("input")}).on("input",function(){b.data("composing")||(b.data("inctm")&&clearTimeout(b.data("inctm")),b.data("inctm",setTimeout(function(){var e=b.val();(0===e.length||e.length>=l.minlen)&&(v!==e&&s.trigger("incsearchstart",{query:e,type:i?i.children("input:checked").val():"searchName"}),v=e,""===e&&s.searchStatus.state>1&&s.searchStatus.query&&b.val(s.searchStatus.query).trigger("select"))},l.wait)))}),s.UA.ltIE8&&b.on("keydown",function(e){229===e.keyCode&&(b.data("imetm")&&clearTimeout(b.data("imetm")),b.data("composing",!0),b.data("imetm",setTimeout(function(){b.removeData("composing")},100)))}).on("keyup",function(t){b.data("imetm")&&clearTimeout(b.data("imetm")),b.data("composing")?t.keyCode===e.ui.keyCode.ENTER&&b.trigger("compositionend"):b.trigger("input")})),e('<span class="ui-icon ui-icon-search" title="'+t.title+'"></span>').appendTo(h).on("mousedown",function(e){e.stopPropagation(),e.preventDefault(),h.hasClass("ui-state-active")?m():b.trigger("focus")}),e('<span class="ui-icon ui-icon-close"></span>').appendTo(h).on("mousedown",function(e){e.stopPropagation(),e.preventDefault(),""!==b.val()||h.hasClass("ui-state-active")?g():b.trigger("focus")}),s.bind("toolbarload",function(){var e=h.parent();if(e.length&&(p.prepend(h.show()),e.remove(),s.UA.ltIE7)){var t=h.children("ltr"==s.direction?".ui-icon-close":".ui-icon-search");t.css({right:"",left:parseInt(h.width())-t.outerWidth(!0)})}}),s.one("init",function(){s.getUI("cwd").on("touchstart click",function(){o&&b.trigger("blur")})}).one("open",function(){n=s.api<2.1?null:e('<div class="ui-front ui-widget ui-widget-content elfinder-button-menu elfinder-button-search-menu ui-corner-all"></div>').append(e('<div class="buttonset"></div>').append(e('<input id="'+d("SearchFromCwd")+'" name="serchfrom" type="radio" checked="checked"/><label for="'+d("SearchFromCwd")+'">'+s.i18n("btnCwd")+"</label>"),e('<input id="'+d("SearchFromVol")+'" name="serchfrom" type="radio"/><label for="'+d("SearchFromVol")+'">'+s.i18n("btnVolume")+"</label>"),e('<input id="'+d("SearchFromAll")+'" name="serchfrom" type="radio"/><label for="'+d("SearchFromAll")+'">'+s.i18n("btnAll")+"</label>")),e('<div class="buttonset elfinder-search-type"></div>').append(e('<input id="'+d("SearchName")+'" name="serchcol" type="radio" checked="checked" value="SearchName"/><label for="'+d("SearchName")+'">'+s.i18n("btnFileName")+"</label>"))).hide().appendTo(s.getUI()),n&&(c&&(i=n.find(".elfinder-search-type"),e.each(t.options.searchTypes,function(t,n){i.append(e('<input id="'+d(t)+'" name="serchcol" type="radio" value="'+s.escape(t)+'"/><label for="'+d(t)+'">'+s.i18n(n.name)+"</label>"))})),n.find("div.buttonset").buttonset(),e("#"+d("SearchFromAll")).next("label").attr("title",s.i18n("searchTarget",s.i18n("btnAll"))),c&&e.each(c,function(t,n){n.title&&e("#"+d(t)).next("label").attr("title",s.i18n(n.title))}),n.on("mousedown","div.buttonset",function(e){e.stopPropagation(),n.data("infocus",!0)}).on("click","input",function(t){t.stopPropagation(),e.trim(b.val())?m():b.trigger("focus")}).on("close",function(){b.trigger("blur")}))}).bind("searchend",function(){b.val("")}).bind("open parents",function(){var t=[],n=s.file(s.root(s.cwd().hash));n&&(e.each(s.parents(s.cwd().hash),function(e,n){t.push(s.file(n).name)}),e("#"+d("SearchFromCwd")).next("label").attr("title",s.i18n("searchTarget",t.join(s.option("separator")))),e("#"+d("SearchFromVol")).next("label").attr("title",s.i18n("searchTarget",n.name)))}).bind("open",function(){v&&g()}).bind("cwdinit",function(){a=!1}).bind("cwdrender",function(){a=!0}).bind("keydownEsc",function(){v&&"/"===v.substr(0,1)&&(v="",b.val(""),s.trigger("searchend"))}).shortcut({pattern:"ctrl+f f3",description:t.title,callback:function(){b.trigger("select").trigger("focus")}}).shortcut({pattern:"a b c d e f g h i j k l m n o p q r s t u v w x y z dig0 dig1 dig2 dig3 dig4 dig5 dig6 dig7 dig8 dig9 num0 num1 num2 num3 num4 num5 num6 num7 num8 num9",description:s.i18n("firstLetterSearch"),callback:function(t){if(a){var n,i=t.originalEvent.keyCode,o=function(){var t=s.selected(),n=e.ui.keyCode[!t.length||s.cwdHash2Elm(t[0]).next("[id]").length?"RIGHT":"HOME"];e(document).trigger(e.Event("keydown",{keyCode:n,ctrlKey:!1,shiftKey:!1,altKey:!1,metaKey:!1}))};i>=96&&i<=105&&(i-=48),n="/"+String.fromCharCode(i),v!==n?(b.val(n),v=n,s.trigger("incsearchstart",{query:n}).one("cwdrender",o)):o()}}})})},e.fn.elfindersortbutton=function(t){return this.each(function(){var n,i=t.fm,a=t.name,o="class",r=i.res(o,"disabled"),s=i.res(o,"hover"),l="elfinder-button-menu-item",c=l+"-selected",d=c+"-asc",p=c+"-desc",u=e('<span class="elfinder-button-text">'+t.title+"</span>"),h=e(this).addClass("ui-state-default elfinder-button elfinder-menubutton elfiner-button-"+a).attr("title",t.title).append('<span class="elfinder-button-icon elfinder-button-icon-'+a+'"></span>',u).on("mouseenter mouseleave",function(e){!h.hasClass(r)&&h.toggleClass(s,"mouseenter"===e.type)}).on("click",function(e){h.hasClass(r)||(e.stopPropagation(),m.is(":hidden")&&i.getUI().click(),m.css(v()).slideToggle({duration:100,done:function(e){i[m.is(":visible")?"toFront":"toHide"](m)}}))}),f=function(){i.toHide(m)},m=e('<div class="ui-front ui-widget ui-widget-content elfinder-button-menu elfinder-button-sort-menu ui-corner-all"></div>').hide().appendTo(i.getUI()).on("mouseenter mouseleave","."+l,function(t){e(this).toggleClass(s,"mouseenter"===t.type)}).on("click",function(e){e.preventDefault(),e.stopPropagation()}).on("close",f),g=function(){m.children("[rel]").removeClass(c+" "+d+" "+p).filter('[rel="'+i.sortType+'"]').addClass(c+" "+("asc"==i.sortOrder?d:p)),m.children(".elfinder-sort-stick").toggleClass(c,i.sortStickFolders),m.children(".elfinder-sort-tree").toggleClass(c,i.sortAlsoTreeview)},v=function(){var e=i.getUI().offset(),t=h.offset();return{top:t.top-e.top,left:t.left-e.left}};u.hide(),e.each(i.sortRules,function(t,n){m.append(e('<div class="'+l+'" rel="'+t+'"><span class="ui-icon ui-icon-arrowthick-1-n"></span><span class="ui-icon ui-icon-arrowthick-1-s"></span>'+i.i18n("sort"+t)+"</div>").data("type",t))}),m.children().on("click",function(n){t.exec([],e(this).removeClass(s).attr("rel"))}),e('<div class="'+l+" "+l+'-separated elfinder-sort-ext elfinder-sort-stick"><span class="ui-icon ui-icon-check"></span>'+i.i18n("sortFoldersFirst")+"</div>").appendTo(m).on("click",function(){t.exec([],"stick")}),i.one("init",function(){i.ui.tree&&null!==i.options.sortAlsoTreeview&&e('<div class="'+l+" "+l+'-separated elfinder-sort-ext elfinder-sort-tree"><span class="ui-icon ui-icon-check"></span>'+i.i18n("sortAlsoTreeview")+"</div>").appendTo(m).on("click",function(){t.exec([],"tree")})}).bind("disable select",f).bind("sortchange",g).getUI().on("click",f),m.children().length>1?t.change(function(){n&&cancelAnimationFrame(n),n=requestAnimationFrame(function(){h.toggleClass(r,t.disabled()),g()})}).change():h.addClass(r)})},e.fn.elfinderstat=function(t){return this.each(function(){var n=e(this).addClass("elfinder-stat-size"),i=e('<div class="elfinder-stat-selected"></div>').on("click","a",function(n){var i=e(this).data("hash");n.preventDefault(),t.exec("opendir",[i])}),a=t.i18n("items"),o=t.i18n("selected"),r=t.i18n("size"),s=function(i){var o=0,r=0,s=t.cwd(),l=!0,c=!0;(s.sizeInfo||s.size)&&(r=s.size,l=!1),e.each(i,function(e,t){o++,l&&(r+=parseInt(t.size)||0,c!==!0||"directory"!==t.mime||t.sizeInfo||(c=!1))}),n.html(a+': <span class="elfinder-stat-incsearch"></span>'+o+',&nbsp;<span class="elfinder-stat-size'+(c?" elfinder-stat-size-recursive":"")+'">'+t.i18n(c?"sum":"size")+": "+t.formatSize(r)+"</span>").attr("title",n.text()),t.trigger("uistatchange")},l=function(e){n.find("span.elfinder-stat-incsearch").html(e?e.hashes.length+" / ":""),n.attr("title",n.text()),t.trigger("uistatchange")},c=function(n){var a,s,l=0,c=0,d=[];1===n.length?(s=n[0],l=s.size,2===t.searchStatus.state&&(a=t.escape(s.path?s.path.replace(/\/[^\/]*$/,""):".."),d.push('<a href="#elf_'+s.phash+'" data-hash="'+s.hash+'" title="'+a+'">'+a+"</a>")),d.push(t.escape(s.i18||s.name)),i.html(d.join("/")+(l>0?", "+t.formatSize(l):""))):n.length?(e.each(n,function(e,t){c++,l+=parseInt(t.size)||0}),i.html(c?o+": "+c+", "+r+": "+t.formatSize(l):"&nbsp;")):i.html(""),i.attr("title",i.text()),t.trigger("uistatchange")};t.getUI("statusbar").prepend(n).append(i).show(),t.UA.Mobile&&e.fn.tooltip&&t.getUI("statusbar").tooltip({classes:{"ui-tooltip":"elfinder-ui-tooltip ui-widget-shadow"},tooltipClass:"elfinder-ui-tooltip ui-widget-shadow",track:!0}),t.bind("cwdhasheschange",function(n){s(e.map(n.data,function(e){return t.file(e)}))}).change(function(i){var a=i.data.changed||[],o=t.cwd().hash;e.each(a,function(){if(this.hash===o)return this.size&&(n.children(".elfinder-stat-size").addClass("elfinder-stat-size-recursive").html(t.i18n("sum")+": "+t.formatSize(this.size)),n.attr("title",n.text())),!1})}).select(function(){c(t.selectedFiles())}).bind("open",function(){c([])}).bind("incsearch",function(e){l(e.data)}).bind("incsearchend",function(){l()})})},e.fn.elfindertoast=function(t,n){var i=Object.assign({mode:"success",msg:"",showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1500,hideEasing:"swing",onHidden:void 0,timeOut:3e3,extNode:void 0,button:void 0,width:void 0},e.isPlainObject(n.options.uiOptions.toast.defaults)?n.options.uiOptions.toast.defaults:{});return this.each(function(){t=Object.assign({},i,t||{});var a,o=e(this),r=function(e){o.stop(),n.toFront(o),o[t.showMethod]({duration:t.showDuration,easing:t.showEasing,complete:function(){t.onShown&&t.onShown(),!e&&t.timeOut&&(a=setTimeout(s,t.timeOut))}})},s=function(){o[t.hideMethod]({duration:t.hideDuration,easing:t.hideEasing,complete:function(){t.onHidden&&t.onHidden(),o.remove()}})};o.on("click",function(e){e.stopPropagation(),e.preventDefault(),a&&clearTimeout(a),t.onHidden&&t.onHidden(),o.stop().remove()}).on("mouseenter mouseleave",function(e){t.timeOut&&(a&&clearTimeout(a),a=null,"mouseenter"===e.type?r(!0):a=setTimeout(s,t.timeOut))}).hide().addClass("toast-"+t.mode).append(e('<div class="elfinder-toast-msg"></div>').html(t.msg.replace(/%([a-zA-Z0-9]+)%/g,function(e,t){return n.i18n(t)}))),t.extNode&&o.append(t.extNode),t.button&&o.append(e('<button class="ui-button ui-widget ui-state-default ui-corner-all elfinder-tabstop"></button>').append(e('<span class="ui-button-text"></span>').text(n.i18n(t.button.text))).on("mouseenter mouseleave",function(t){e(this).toggleClass("ui-state-hover","mouseenter"==t.type)}).on("click",t.button.click||function(){})),t.width&&o.css("max-width",t.width),r()})},e.fn.elfindertoolbar=function(t,n){return this.not(".elfinder-toolbar").each(function(){var i,a,o,r,s,l,c,d,p,u=t._commands,h=e(this).addClass("ui-helper-clearfix ui-widget-header elfinder-toolbar"),f={displayTextLabel:!1,labelExcludeUA:["Mobile"],autoHideUA:["Mobile"],showPreferenceButton:"none"},m=function(t){return e.grep(t,function(t){return!e.isPlainObject(t)||(f=Object.assign(f,t),!1)})},g=function(n){var l,c;for(e.each(v,function(e,t){t.detach()}),h.empty(),i=b.length;i--;)if(b[i]){for(r=e('<div class="ui-widget-content ui-corner-all elfinder-buttonset"></div>'),a=b[i].length;a--;)l=b[i][a],n&&n[l]||!(o=u[l])||(s="elfinder"+o.options.ui,!v[l]&&e.fn[s]&&(v[l]=e("<div></div>")[s](o)),v[l]&&(v[l].children(".elfinder-button-text")[d?"show":"hide"](),r.prepend(v[l])));r.children().length&&h.prepend(r),r.children(":gt(0)").before('<span class="ui-widget-content elfinder-toolbar-button-separator"></span>')}(c=u.preference)&&("always"===f.showPreferenceButton||!h.children().length&&"auto"===f.showPreferenceButton)&&(r=e('<div class="ui-widget-content ui-corner-all elfinder-buttonset"></div>'),l="preference",s="elfinder"+o.options.ui,v[l]=e("<div></div>")[s](c),v[l].children(".elfinder-button-text")[d?"show":"hide"](),r.prepend(v[l]),h.append(r)),!h.data("swipeClose")&&h.children().length?h.show():h.hide(),x=h[0].clientHeight,t.trigger("toolbarload").trigger("uiresize")},v={},b=m(n||[]),y=null,w="",x=0,k=[];f.showPreferenceButton=f.showPreferenceButton.toLowerCase(),"none"!==f.displayTextLabel&&(d=t.storage("toolbarTextLabel"),d=null===d?f.displayTextLabel&&(!f.labelExcludeUA||!f.labelExcludeUA.length||!e.grep(f.labelExcludeUA,function(e){return!!t.UA[e]}).length):1==d,k.push({label:t.i18n("textLabel"),icon:"text",callback:function(){d=!d,h.css("height","").find(".elfinder-button-text")[d?"show":"hide"](),t.trigger("uiresize").storage("toolbarTextLabel",d?"1":"0")}})),f.preferenceInContextmenu&&u.preference&&k.push({label:t.i18n("toolbarPref"),icon:"preference",callback:function(){t.exec("preference",void 0,{tab:"toolbar"})}}),k.length&&h.on("contextmenu",function(e){e.stopPropagation(),e.preventDefault(),t.trigger("contextmenu",{raw:k,x:e.pageX,y:e.pageY})}).on("touchstart",function(e){e.originalEvent.touches.length>1||(h.data("tmlongtap")&&clearTimeout(h.data("tmlongtap")),h.removeData("longtap").data("longtap",{x:e.originalEvent.touches[0].pageX,y:e.originalEvent.touches[0].pageY}).data("tmlongtap",setTimeout(function(){h.removeData("longtapTm").trigger({type:"contextmenu",pageX:h.data("longtap").x,pageY:h.data("longtap").y}).data("longtap",{longtap:!0})},500)))}).on("touchmove touchend",function(e){h.data("tmlongtap")&&(("touchend"===e.type||Math.abs(h.data("longtap").x-e.originalEvent.touches[0].pageX)+Math.abs(h.data("longtap").y-e.originalEvent.touches[0].pageY)>4)&&clearTimeout(h.data("tmlongtap")),h.removeData("longtapTm"))}).on("click",function(e){h.data("longtap")&&h.data("longtap").longtap&&(e.stopImmediatePropagation(),e.preventDefault())}).on("touchend click",".elfinder-button",function(e){h.data("longtap")&&h.data("longtap").longtap&&(e.stopImmediatePropagation(),e.preventDefault())}),h.prev().length&&h.parent().prepend(this),g(),t.bind("open sync select toolbarpref",function(){var n,i,a,o=Object.assign({},t.option("disabledFlip")),r=t.storage("toolbarhides");if(!r&&Array.isArray(f.defaultHides)&&(r={},e.each(f.defaultHides,function(){r[this]=!0}),t.storage("toolbarhides",r)),"select"===this.type){if(t.searchStatus.state<2)return;i=t.selected(),i.length&&(o=t.getDisabledCmds(i,!0))}e.each(r,function(e){o[e]||(o[e]=!0)}),Object.keys(t.commandMap).length&&e.each(t.commandMap,function(e,t){"hidden"===t&&(o[e]=!0)}),a=Object.keys(o),y&&y.toString()===a.sort().toString()||(g(a.length?o:null),n=!0),y=a.sort(),(n||w!==JSON.stringify(t.commandMap))&&(w=JSON.stringify(t.commandMap),n||e.each(e("div.elfinder-button"),function(){var t=e(this).data("origin");t&&e(this).after(t).detach()}),Object.keys(t.commandMap).length&&e.each(t.commandMap,function(n,i){var a,o=t._commands[i],r=o?"elfinder"+o.options.ui:null;r&&e.fn[r]&&(a=v[n],a&&(!v[i]&&e.fn[r]&&(v[i]=e("<div></div>")[r](o),v[i]&&(v[i].children(".elfinder-button-text")[d?"show":"hide"](),o.extendsCmd&&v[i].children("span.elfinder-button-icon").addClass("elfinder-button-icon-"+o.extendsCmd))),v[i]&&(a.after(v[i]),v[i].data("origin",a.detach()))))}))}).bind("resize",function(e){p&&cancelAnimationFrame(p),p=requestAnimationFrame(function(){var e=h[0].clientHeight;x!==e&&(x=e,t.trigger("uiresize"))})}),t.UA.Touch&&(c=t.storage("autoHide")||{},"undefined"==typeof c.toolbar&&(c.toolbar=f.autoHideUA&&f.autoHideUA.length>0&&e.grep(f.autoHideUA,function(e){return!!t.UA[e]}).length,t.storage("autoHide",c)),c.toolbar&&t.one("init",function(){t.uiAutoHide.push(function(){h.stop(!0,!0).trigger("toggle",{duration:500,init:!0})})}),t.bind("load",function(){l=e('<div class="elfinder-toolbar-swipe-handle"></div>').hide().appendTo(t.getUI()),"none"!==l.css("pointer-events")&&(l.remove(),l=null)}),h.on("toggle",function(e,n){var i=t.getUI("workzone"),a=h.is(":hidden"),o=i.height(),r=h.height(),s=h.outerHeight(!0),d=s-r,p=Object.assign({step:function(e){i.height(o+(a?(e+d)*-1:r-e)),t.trigger("resize")},always:function(){requestAnimationFrame(function(){h.css("height",""),t.trigger("uiresize"),l&&(a?l.stop(!0,!0).hide():(l.height(n.handleH?n.handleH:""),t.resources.blink(l,"slowonce"))),a&&h.scrollTop("0px"),n.init&&t.trigger("uiautohide")})}},n);h.data("swipeClose",!a).stop(!0,!0).animate({height:"toggle"},p),c.toolbar=!a,t.storage("autoHide",Object.assign(t.storage("autoHide"),{toolbar:c.toolbar}))}).on("touchstart",function(e){h.scrollBottom()>5&&(e.originalEvent._preventSwipeY=!0)}))}),this},e.fn.elfindertree=function(t,n){var i=t.res("class","tree");return this.not("."+i).each(function(){var a,o,r,s,l="class",c=t.UA.Mobile,d=t.res(l,"treeroot"),p=n.openRootOnLoad,u=n.openCwdOnOpen,h=u||n.syncTree,f=t.res(l,"navsubtree"),m=t.res(l,"treedir"),g="span."+m,v=t.res(l,"navcollapse"),b=t.res(l,"navexpand"),y="elfinder-subtree-loaded",w="elfinder-subtree-chksubdir",x=t.res(l,"navarrow"),k=t.res(l,"active"),C=t.res(l,"adroppable"),z=t.res(l,"hover"),T=t.res(l,"disabled"),A=t.res(l,"draggable"),j=t.res(l,"droppable"),S="elfinder-navbar-wrapper-root",O="elfinder-navbar-wrapper-pastable",I="elfinder-navbar-wrapper-uploadable",M=function(e){var t=se.offset().left;return t<=e&&e<=t+se.width()},E={},F=[],D=function(n){var i=[];if(e.each(n,function(e,n){E[n]&&i.push(t.navId2Hash(n)),delete E[n]}),i.length)return t.request({data:{cmd:"subdirs",targets:i,preventDefault:!0}}).done(function(n){n&&n.subdirs&&e.each(n.subdirs,function(e,n){var i=t.navHash2Elm(e);i.removeClass(w),i[n?"addClass":"removeClass"](v)})})},U=null,P=function(){var n=Object.keys(E);n.length&&(U&&U._abort(),a&&clearTimeout(a),F=[],U=t.asyncJob(function(n){return t.isInWindow(e("#"+n))?n:null},n,{numPerOnce:200}).done(function(e){e.length&&(F=e,R())}))},q=0,R=function(){var e,i=n.subdirsMaxConn-q,o=t.maxTargets?Math.min(t.maxTargets,n.subdirsAtOnce):n.subdirsAtOnce;if(a&&cancelAnimationFrame(a),F.length)if(i>0)for(e=0;e<i;e++)F.length&&(q++,D(F.splice(0,o)).always(function(){q--,R()}));else a=requestAnimationFrame(function(){F.length&&R()})},H=t.droppable.drop,_=e.extend(!0,{},t.droppable,{over:function(n,i){var a,o,r=e(this),s=i.helper,l=z+" "+C;return n.stopPropagation(),s.data("dropover",s.data("dropover")+1),r.data("dropover",!0),i.helper.data("namespace")===t.namespace&&t.insideWorkzone(n.pageX,n.pageY)?M(n.clientX)?(s.removeClass("elfinder-drag-helper-move elfinder-drag-helper-plus"),r.addClass(z),r.is("."+v+":not(."+b+")")&&r.data("expandTimer",setTimeout(function(){r.is("."+v+"."+z)&&r.children("."+x).trigger("click")},500)),r.is(".elfinder-ro,.elfinder-na")?void r.removeClass(C):(a=t.navId2Hash(r.attr("id")),r.data("dropover",a),e.each(i.helper.data("files"),function(e,n){if(n===a||t.file(n).phash===a&&!i.helper.hasClass("elfinder-drag-helper-plus"))return r.removeClass(l),!1}),s.data("locked")?o="elfinder-drag-helper-plus":(o="elfinder-drag-helper-move",t._commands.copy&&(n.shiftKey||n.ctrlKey||n.metaKey)&&(o+=" elfinder-drag-helper-plus")),r.hasClass(C)&&s.addClass(o),void requestAnimationFrame(function(){
19
- r.hasClass(C)&&s.addClass(o)}))):void r.removeClass(l):(r.removeClass(l),void s.removeClass("elfinder-drag-helper-move elfinder-drag-helper-plus"))},out:function(t,n){var i=e(this),a=n.helper;t.stopPropagation(),M(t.clientX)&&a.removeClass("elfinder-drag-helper-move elfinder-drag-helper-plus"),a.data("dropover",Math.max(a.data("dropover")-1,0)),i.data("expandTimer")&&clearTimeout(i.data("expandTimer")),i.removeData("dropover").removeClass(z+" "+C)},deactivate:function(){e(this).removeData("dropover").removeClass(z+" "+C)},drop:function(e,t){M(e.clientX)&&H.call(this,e,t)}}),N=e(t.res("tpl","navspinner")),L=t.res("tpl","navdir"),W=t.res("tpl","perms"),B=(t.res("tpl","lock"),t.res("tpl","symlink")),$={},V={id:function(e){return t.navHash2Id(e.hash)},name:function(e){return t.escape(e.i18||e.name)},cssclass:function(e){var i=(e.phash&&!e.isroot?"":d)+" "+m+" "+t.perms2class(e);return e.dirs&&!e.link&&(i+=" "+v)&&e.dirs==-1&&(i+=" "+w),n.getClass&&(i+=" "+n.getClass(e)),e.csscls&&(i+=" "+t.escape(e.csscls)),i},title:function(e){return n.attrTitle?' title="'+t.escape(t.path(e.hash,!0)||e.i18||e.name)+'"':""},root:function(t){var n="";return!t.phash||t.isroot?(n+=" "+S,!t.disabled||t.disabled.length<1?n+=" "+O+" "+I:(e.inArray("paste",t.disabled)===-1&&(n+=" "+O),e.inArray("upload",t.disabled)===-1&&(n+=" "+I)),n):""},permissions:function(e){return e.read&&e.write?"":W},symlink:function(e){return e.alias?B:""},style:function(e){return e.icon?t.getIconStyle(e):""}},K=function(e){return L.replace(/(?:\{([a-z]+)\})/gi,function(t,n){var i=V[n]?V[n](e):e[n]||"";return"id"===n&&e.dirs==-1&&(E[i]=i),i})},X=function(n,i){return e.map(n||[],function(e){return"directory"!==e.mime||i&&!t.navHash2Elm(e.hash).length?null:e})},J=function(e){return e?t.navHash2Elm(e).next("."+f):oe},G=function(e,n){for(var i,a=e.children(":first");a.length;){if(i=t.file(t.navId2Hash(a.children("[id]").attr("id"))),(i=t.file(t.navId2Hash(a.children("[id]").attr("id"))))&&Q(n,i)<0)return a;a=a.next()}return e.children("button.elfinder-navbar-pager-next")},Y=function(i){for(var a,o,r,s,l,d,p,u=i.length,h=[],f=u,m=e(),g={},v=t.cwd(),b=function(i,a,o,r){var s={},l=0,d=t.newAPI?Math.min(1e4,Math.max(10,n.subTreeMax)):1e4,p=function(){s={},e.each(a,function(e,t){s[t.hash]=e})},u=function(t){"prepare"===t?e.each(a,function(e,t){t.node&&i.append(t.node.hide())}):"done"===t&&e.each(a,function(e,t){t.node&&t.node.detach().show()})},h=function(t,n){var i;return t.stopPropagation(),n.select?void g(f(n.select)):n.change?void u(n.change):(n.removed&&n.removed.length&&(a=e.grep(a,function(e){return n.removed.indexOf(e.hash)===-1||(!i&&(i=!0),!1)})),n.added&&n.added.length&&(a=a.concat(e.grep(n.added,function(e){return void 0===s[e.hash]&&(!i&&(i=!0),!0)}))),void(i&&(a.sort(Q),p(),g(l))))},f=function(e){if(void 0!==s[e])return Math.floor(s[e]/d)*d},m=t.navId2Hash(i.prev("[id]").attr("id")),g=function(n,o){var r,s,u,y,w,x,k,C,z=[],T={};delete $[m],l=n,i.off("update."+t.namespace,h),a.length>d&&(i.on("update."+t.namespace,h),void 0===n&&(u=0,p(),n=f(v.hash),void 0===n&&(n=0)),y=a.slice(n,n+d),$[m]=i,w=n?Math.max(-1,n-d):-1,x=n+d>=a.length?0:n+d,r=Math.ceil(a.length/d),s=Math.ceil(n/d)),e.each(y||a,function(e,t){z.push(K(t)),t.node&&(T[t.hash]=t.node)}),k=w>-1?e('<button class="elfinder-navbar-pager elfinder-navbar-pager-prev"></button>').text(t.i18n("btnPrevious",s,r)).button({icons:{primary:"ui-icon-caret-1-n"}}).on("click",function(e){e.preventDefault(),e.stopPropagation(),g(w,"up")}):e(),C=x?e('<button class="elfinder-navbar-pager elfinder-navbar-pager-next"></button>').text(t.i18n("btnNext",s+2,r)).button({icons:{primary:"ui-icon-caret-1-s"}}).on("click",function(e){e.preventDefault(),e.stopPropagation(),g(x,"down")}):e(),b(),i.empty()[y?"addClass":"removeClass"]("elfinder-navbar-hasmore").append(k,z.join(""),C),e.each(T,function(e,n){t.navHash2Elm(e).parent().replaceWith(n)}),o&&Z(t.navHash2Id(y["up"===o?y.length-1:0].hash)),!c&&t.lazy(function(){ie(null,i)})},b=function(){e.each(i.children(".elfinder-navbar-wrapper"),function(n,i){var o,r,l=e(i),c=l.children("[id]:first");c.hasClass(y)&&(o=t.navId2Hash(c.attr("id")),o&&void 0!==(r=s[o])&&(a[r].node=l.detach()))})};g()},w={},x=[],k={};f--;)a=i[f],g[a.hash]||t.navHash2Elm(a.hash).length||(g[a.hash]=!0,(o=J(a.phash)).length?(p=a.phash||"treeroot","undefined"==typeof k[p]&&(k[p]=o.children(":last")),s=!k[p].length,a.phash&&(s||o.hasClass("elfinder-navbar-hasmore")||(r=G(o,a)).length)?s?(w[a.phash]||(w[a.phash]=[]),w[a.phash].push(a)):r?(d=K(a),r.before(d),!c&&(m=m.add(d))):x.push(a):(d=K(a),s?o.prepend(d):k[p].after(d),a.phash&&!a.isroot||(l=t.navHash2Elm(a.hash).parent()),!c&&ie(null,l))):h.push(a));return Object.keys(w).length&&e.each(w,function(e,t){var n=J(e);t.sort(Q),b(n,t)}),x.length&&o.trigger("update."+t.namespace,{added:x}),h.length&&h.length<u?void Y(h):void(!c&&m.length&&t.lazy(function(){ie(m)}))},Q=function(e,n){if(t.sortAlsoTreeview){var i,a="asc"==t.sortOrder,o=t.sortType,r=t.sortRules;return i=a?r[t.sortType](e,n):r[t.sortType](n,e),"name"!==o&&0===i?i=a?r.name(e,n):r.name(n,e):i}return t.sortRules.name(e,n)},Z=function(i){var a,r,s,l,c,d,p=e.Deferred();return o&&clearTimeout(o),o=setTimeout(function(){a=e(document.getElementById(i||t.navHash2Id(t.cwd().hash))),a.length?((u?a:a.parent()).parents(".elfinder-navbar-wrapper").children("."+y).addClass(b).next("."+f).show(),r=oe.parent().stop(!1,!0),s=r.offset().top,l=r.height(),c=s+l-a.outerHeight(),d=a.offset().top,d<s||d>c?r.animate({scrollTop:r.scrollTop()+d-s-l/3},{duration:n.durations.autoScroll,complete:function(){p.resolve()}}):p.resolve()):p.reject()},100),p},ee=function(e){var n,i,a,o=e||t.cwd(),r=o.hash?[o.hash]:[];for(i=t.root(o.hash),a=t.file(i);a&&(n=a.phash)&&(r.unshift(n),i=t.root(n),a=t.file(i),!t.navHash2Elm(a.hash).hasClass(y)););return r},te=function(e){var n=e||t.cwd(),i=n.hash,a=t.navHash2Elm(i);if(!a.length){for(;n&&n.phash;)$[n.phash]&&!t.navHash2Elm(n.hash).length&&$[n.phash].trigger("update."+t.namespace,{select:n.hash}),n=t.file(n.phash);a=t.navHash2Elm(i)}return a},ne=function(n,i){var a,o,s=t.cwd(),l=s.hash,c=void 0===i?h:i,d=function(n){var i,r,s=e.Deferred(),l=[],d=ee(n),p=function(e,n,i){var a={cmd:e,target:n};return i&&(a.until=i),t.request({data:a,preventFail:!0})};return l=e.map(d,function(e){var n,a,o=t.file(e),r=!!o&&t.isRoot(o),s=t.navHash2Elm(e),l=function(e,n){var i,a,o=n||1;return a=!!(i=t.file(e))&&i.phash,a&&o>1?l(a,--o):a},c=function(){var i=l(e);for(n=i;i&&!t.navHash2Elm(i).hasClass(y);)n=i,i=l(i);return i||(n=void 0,i=t.root(e)),i}();return s.hasClass(y)||!r&&o&&t.navHash2Elm(o.phash).hasClass(y)?null:(r||c===l(e)||c===l(e,2)?(n=void 0,a="tree",r||(e=l(e))):a="parents",i||(i="tree"===a?e:c),p(a,e,n))}),l.length?(te(t.file(i)),r=t.navHash2Id(i),c&&Z(r),a=e("#"+r),o=e(t.res("tpl","navspinner")).insertBefore(a.children("."+x)),a.removeClass(v),e.when.apply(e,l).done(function(){var e,t,n,i={};if(t=arguments.length,t>0)for(n=0;n<t;n++)e=arguments[n].tree||[],i[d[n]]=Object.assign([],X(e));s.resolve(i)}).fail(function(){s.reject()}),s):s.resolve()},u=function(i,o){var r,l=function(){p&&a&&(J(a.hash).show().prev(g).addClass(b),p=!1),c?Z().done(P):P()};i&&e.each(i,function(e,n){n&&Y(n),te(t.file(e)),n&&ae(n,y)}),n&&(t.api<2.1&&n.push(s),Y(n)),r=te(),r.hasClass(k)||(oe.find(g+"."+k).removeClass(k),r.addClass(k)),r.parents(".elfinder-navbar-wrapper").children("."+m).addClass(y),i?t.lazy(l).done(function(){o.resolve()}):(l(),o.resolve())},f=function(e){a&&(o.remove(),a.addClass(v+(e?"":" "+y)))},w=e.Deferred();return t.navHash2Elm(l).length?u(void 0,w):(r=!0,d().done(function(e){u(e,w),f()}).fail(function(){f(!0),w.reject()}).always(function(){r=!1})),t.trigger("treesync",w),w},ie=function(n,i){n||(i&&!i.closest("div."+S).hasClass(I)||(i||oe.find("div."+I)).find(g+":not(.elfinder-ro,.elfinder-na)").addClass("native-droppable"),n=!i||i.closest("div."+S).hasClass(O)?(i||oe.find("div."+O)).find(g+":not(."+j+")"):e(),i&&i.children("div."+S).each(function(){ie(null,e(this))})),n.length&&t.asyncJob(function(t){e(t).droppable(_)},e.makeArray(n),{interval:20,numPerOnce:100})},ae=function(n,i){var a=i==y?"."+v+":not(."+y+")":":not(."+v+")";e.each(n,function(n,o){t.navHash2Elm(o.phash).filter(a).filter(function(){return e.grep(e(this).next("."+f).children(),function(t){return!e(t).children().hasClass(d)}).length>0}).addClass(i)})},oe=e(this).addClass(i).on("mouseenter mouseleave",g,function(i){var a="mouseenter"===i.type;if(!a||!re){var o,r,s=e(this);s.hasClass(C+" "+T)||(c||!a||s.data("dragRegisted")||s.hasClass(d+" "+A+" elfinder-na elfinder-wo")||(s.data("dragRegisted",!0),t.isCommandEnabled("copy",o=t.navId2Hash(s.attr("id")))&&s.draggable(t.draggable)),s.toggleClass(z,a)),a&&n.attrTitle&&(r=t.file(o||t.navId2Hash(s.attr("id"))),r.isroot||s.attr("title")!==(r.i18||r.name)||s.attr("title",t.path(o,!0)))}}).on("dragenter",g,function(t){if(t.originalEvent.dataTransfer){var n=e(this);n.addClass(z),n.is("."+v+":not(."+b+")")&&n.data("expandTimer",setTimeout(function(){n.is("."+v+"."+z)&&n.children("."+x).trigger("click")},500))}}).on("dragleave",g,function(t){if(t.originalEvent.dataTransfer){var n=e(this);n.data("expandTimer")&&clearTimeout(n.data("expandTimer")),n.removeClass(z)}}).on("click",g,function(n){var i=e(this),a=t.navId2Hash(i.attr("id"));t.file(a);return i.data("longtap")?(i.removeData("longtap"),void n.stopPropagation()):(i.hasClass(k)||(oe.find(g+"."+k).removeClass(k),i.addClass(k)),void(a==t.cwd().hash||i.hasClass(T)?(i.hasClass(v)&&i.children("."+x).trigger("click"),t.select({selected:[a],origin:"navbar"})):t.exec("open",a).done(function(){t.one("opendone",function(){t.select({selected:[a],origin:"navbar"})})})))}).on("touchstart",g,function(n){if(!(n.originalEvent.touches.length>1)){var i,a=n.originalEvent;return"INPUT"===n.target.nodeName?void n.stopPropagation():void(i=e(this).addClass(z).removeData("longtap").data("tmlongtap",setTimeout(function(e){i.data("longtap",!0),t.trigger("contextmenu",{type:"navbar",targets:[t.navId2Hash(i.attr("id"))],x:a.touches[0].pageX,y:a.touches[0].pageY})},500)))}}).on("touchmove touchend",g,function(t){return"INPUT"===t.target.nodeName?void t.stopPropagation():(clearTimeout(e(this).data("tmlongtap")),e(this).removeData("tmlongtap"),void("touchmove"==t.type&&e(this).removeClass(z)))}).on("click",g+"."+v+" ."+x,function(i){var a,o=e(this),r=o.parent(g),s=r.next("."+f),l=e.Deferred(),c=30;i.stopPropagation(),r.hasClass(y)?(r.toggleClass(b),t.lazy(function(){a=r.hasClass(b)?s.children().length+s.find("div.elfinder-navbar-subtree[style*=block]").children().length:s.find("div:visible").length,a>c?(s.toggle(),t.draggingUiHelper&&t.draggingUiHelper.data("refreshPositions",1),P()):s.stop(!0,!0)[r.hasClass(b)?"slideDown":"slideUp"](n.durations.slideUpDown,function(){t.draggingUiHelper&&t.draggingUiHelper.data("refreshPositions",1),P()})}).always(function(){l.resolve()})):(N.insertBefore(o),r.removeClass(v),t.request({cmd:"tree",target:t.navId2Hash(r.attr("id"))}).done(function(e){Y(Object.assign([],X(e.tree))),s.children().length&&(r.addClass(v+" "+b),s.children().length>c?(s.show(),t.draggingUiHelper&&t.draggingUiHelper.data("refreshPositions",1),P()):s.stop(!0,!0).slideDown(n.durations.slideUpDown,function(){t.draggingUiHelper&&t.draggingUiHelper.data("refreshPositions",1),P()}))}).always(function(e){N.remove(),r.addClass(y),t.one("treedone",function(){l.resolve()})})),o.data("dfrd",l)}).on("contextmenu",g,function(n){n.stopPropagation();var i=e(this);i.find("input:text").length||(n.preventDefault(),i.data("tmlongtap")||t.trigger("contextmenu",{type:"navbar",targets:[t.navId2Hash(e(this).attr("id"))],x:n.pageX,y:n.pageY}),i.addClass("ui-state-hover"),t.getUI("contextmenu").children().on("mouseenter",function(){i.addClass("ui-state-hover")}),t.bind("closecontextmenu",function(){i.removeClass("ui-state-hover")}))}).on("scrolltoview",g,function(n,i){var a=e(this);Z(a.attr("id")).done(function(){i&&"undefined"!==i.blink&&!i.blink||t.resources.blink(a,"lookme")})}).on("create."+t.namespace,function(n,i){var a=J(i.phash),o=i.move||!1,r=e(K(i)).addClass("elfinder-navbar-wrapper-tmp"),s=t.selected();o&&s.length&&t.trigger("lockfiles",{files:s}),a.prepend(r)}),re=!1,se=t.getUI("navbar").append(oe).show().on("scroll",function(){re=!0,s&&cancelAnimationFrame(s),s=requestAnimationFrame(function(){re=!1,P()})}),le=t.sortAlsoTreeview;t.open(function(e){var n=e.data,i=X(n.files),a=t.getUI("contextmenu");n.init&&oe.empty(),t.UA.iOS&&se.removeClass("overflow-scrolling-touch").addClass("overflow-scrolling-touch"),i.length?t.lazy(function(){a.data("cmdMaps")||a.data("cmdMaps",{}),Y(i),ae(i,y),ne(i)}):ne()}).add(function(e){var t=X(e.data.added);t.length&&(Y(t),ae(t,v))}).change(function(n){if(!r){var i,a,o,s,l,d,p,u,h,m,v,w,x=X(n.data.changed,!0),k=x.length,C=k;e();for(e.each($,function(e,n){n.trigger("update."+t.namespace,{change:"prepare"})});C--;)if(i=x[C],a=i.phash,(o=t.navHash2Elm(i.hash)).length){if(v=o.parent(),a){if(l=o.closest("."+f),d=J(a),p=o.parent().next(),u=G(d,i),!d.length)continue;d[0]===l[0]&&p.get(0)===u.get(0)||(u.length?u.before(v):d.append(v))}h=o.hasClass(b),m=o.hasClass(y),s=e(K(i)),o.replaceWith(s.children(g)),!c&&ie(null,v),i.dirs&&(h||m)&&(o=t.navHash2Elm(i.hash))&&o.next("."+f).children().length&&(h&&o.addClass(b),m&&o.addClass(y)),w|=i.dirs==-1}w&&P(),e.each($,function(e,n){n.trigger("update."+t.namespace,{change:"done"})}),k&&ne(void 0,!1)}}).remove(function(n){var i,a,o,r=n.data.removed,s=r.length;for(e.each($,function(e,n){n.trigger("update."+t.namespace,{removed:r}),n.trigger("update."+t.namespace,{change:"prepare"})});s--;)(i=t.navHash2Elm(r[s])).length&&(o=!0,a=i.closest("."+f),i.parent().detach(),a.children().length||a.hide().prev(g).removeClass(v+" "+b+" "+y));o&&t.getUI("navbar").children(".ui-resizable-handle").trigger("resize"),e.each($,function(e,n){n.trigger("update."+t.namespace,{change:"done"})})}).bind("lockfiles unlockfiles",function(n){var i="lockfiles"==n.type,a=!!n.data.helper&&n.data.helper.data("locked"),o=i&&!a?"disable":"enable",r=e.grep(n.data.files||[],function(e){var n=t.file(e);return!(!n||"directory"!=n.mime)});e.each(r,function(e,n){var r=t.navHash2Elm(n);r.length&&!a&&(r.hasClass(A)&&r.draggable(o),r.hasClass(j)&&r.droppable(o),r[i?"addClass":"removeClass"](T))})}).bind("sortchange",function(){if(t.sortAlsoTreeview||le!==t.sortAlsoTreeview){var n,i,a=[],o={},r={},s="",l=!1;t.lazy(function(){n=X(t.files()),le=t.sortAlsoTreeview,oe.empty(),Y(e.map(t.roots,function(e){var n=t.file(e);return n&&!n.phash?n:null})),Object.keys($).length?(a=ee(),a.length>1?(e.each(a,function(e,n){var i=t.file(t.root(n)).volumeid;0===e&&(s=i),r[i]=n,o[n]=[]}),e.each(n,function(e,t){return t.volumeid?void o[r[t.volumeid]||r[s]].push(t):(l=!0,!1)})):l=!0,l?e.each(a,function(e,a){Y(n),i=te(t.file(a)),ae(n,y)}):e.each(o,function(e,n){Y(n),i=te(t.file(e)),ae(n,y)})):(Y(n),i=te(),ae(n,y)),ne()},100)}})}),this},e.fn.elfinderuploadbutton=function(t){return this.each(function(){var n,i=t.fm,a=e(this).elfinderbutton(t).off("click"),o=e("<form></form>").appendTo(a),r=e('<input type="file" multiple="true" title="'+t.fm.i18n("selectForUpload")+'"/>').on("change",function(){var t=e(this);t.val()&&(i.exec("upload",{input:t.remove()[0]},void 0,i.cwd().hash),r.clone(!0).appendTo(o))}).on("dragover",function(e){e.originalEvent.dataTransfer.dropEffect="copy"});o.append(r.clone(!0)),t.change(function(){n&&cancelAnimationFrame(n),n=requestAnimationFrame(function(){var e=t.disabled();o.is("visible")?!e&&o.hide():e&&o.show()})}).change()})},e.fn.elfinderviewbutton=function(t){return this.each(function(){var n,i=e(this).elfinderbutton(t),a=i.children(".elfinder-button-icon"),o=i.children(".elfinder-button-text");t.change(function(){n&&cancelAnimationFrame(n),n=requestAnimationFrame(function(){var e="icons"==t.value;a.toggleClass("elfinder-button-icon-view-list",e),t.className=e?"view-list":"",t.title=t.fm.i18n(e?"viewlist":"viewicons"),i.attr("title",t.title),o.html(t.title)})})})},e.fn.elfinderworkzone=function(t){var n="elfinder-workzone";return this.not("."+n).each(function(){var i,a=e(this).addClass(n),o=Math.round(a.height()),r=a.parent(),s=function(){i=a.outerHeight(!0)-a.height()},l=function(s){var l=r.height()-i,c=r.attr("style"),d=Math.round(a.height());s&&(s.preventDefault(),s.stopPropagation()),r.css("overflow","hidden").children(":visible:not(."+n+")").each(function(){var t=e(this);"absolute"!=t.css("position")&&"fixed"!=t.css("position")&&(l-=t.outerHeight(!0))}),r.attr("style",c||""),l=Math.max(0,Math.round(l)),o===l&&d===l||(o=Math.round(a.height()),a.height(l),t.trigger("wzresize"))},c=function(){i=a.outerHeight(!0)-a.height(),l()};s(),r.on("resize."+t.namespace,l),t.one("cssloaded",c).bind("uiresize",l).bind("themechange",s)}),this},i.prototype.commands.archive=function(){var t,n=this,i=n.fm,a=[];this.variants=[],this.disableOnSearch=!1,this.nextAction={},i.bind("open reload",function(){n.variants=[],e.each(a=i.option("archivers").create||[],function(e,t){n.variants.push([t,i.mime2kind(t)])}),n.change()}),this.getstate=function(n){var o,r=this.files(n),s=r.length,l=s&&!i.isRoot(r[0])&&(i.file(r[0].phash)||{}).write,c=function(t){var n=!0;return e.grep(t,function(e){return n=!(!n||!e.read||0!==e.hash.indexOf(o))})};return l&&i.searchStatus.state>1&&(l=s===c(r).length)&&(o=i.cwd().volumeid),l&&!this._disabled&&a.length&&(s||t&&"pending"==t.state())?0:-1},this.exec=function(o,r){var s,l,c=this.files(o),d=c.length,p=r||a[0],u=i.file(c[0].phash)||null,h=["errArchive","errPerm","errCreatingTempDir","errFtpDownloadFile","errFtpUploadFile","errFtpMkdir","errArchiveExec","errExtractExec","errRm"];if(t=e.Deferred().fail(function(e){e&&i.error(e)}),!d||!a.length||e.inArray(p,a)===-1)return t.reject();if(!u.write)return t.reject(h);for(s=0;s<d;s++)if(!c[s].read)return t.reject(h);return n.mime=p,n.prefix=(d>1?"Archive":c[0].name)+(i.option("archivers").createext?"."+i.option("archivers").createext[p]:""),n.data={targets:n.hashes(o),type:p},i.cwd().hash!==u.hash?l=i.exec("open",u.hash).done(function(){i.one("cwdrender",function(){i.selectfiles({files:o}),t=e.proxy(i.res("mixin","make"),n)()})}):(i.selectfiles({files:o}),t=e.proxy(i.res("mixin","make"),n)()),t}},(i.prototype.commands.back=function(){this.alwaysEnabled=!0,this.updateOnSelect=!1,this.shortcuts=[{pattern:"ctrl+left backspace"}],this.getstate=function(){return this.fm.history.canBack()?0:-1},this.exec=function(){return this.fm.history.back()}}).prototype={forceLoad:!0},i.prototype.commands.chmod=function(){this.updateOnSelect=!1;var t=this.fm,n={0:"owner",1:"group",2:"other"},i={read:t.i18n("read"),write:t.i18n("write"),execute:t.i18n("execute"),perm:t.i18n("perm"),kind:t.i18n("kind"),files:t.i18n("files")},a=function(e){return!isNaN(parseInt(e,8))&&parseInt(e,8)<=511||e.match(/^([r-][w-][x-]){3}$/i)};this.tpl={main:'<div class="ui-helper-clearfix elfinder-info-title"><span class="elfinder-cwd-icon {class} ui-corner-all"></span>{title}</div>{dataTable}',itemTitle:'<strong>{name}</strong><span id="elfinder-info-kind">{kind}</span>',groupTitle:"<strong>{items}: {num}</strong>",dataTable:'<table id="{id}-table-perm"><tr><td>{0}</td><td>{1}</td><td>{2}</td></tr></table><div class="">'+i.perm+': <input class="elfinder-tabstop elfinder-focus" id="{id}-perm" type="text" size="4" maxlength="3" value="{value}"></div>',fieldset:'<fieldset id="{id}-fieldset-{level}"><legend>{f_title}{name}</legend><input type="checkbox" value="4" class="elfinder-tabstop" id="{id}-read-{level}-perm"{checked-r}> <label for="{id}-read-{level}-perm">'+i.read+'</label><br><input type="checkbox" value="6" class="elfinder-tabstop" id="{id}-write-{level}-perm"{checked-w}> <label for="{id}-write-{level}-perm">'+i.write+'</label><br><input type="checkbox" value="5" class="elfinder-tabstop" id="{id}-execute-{level}-perm"{checked-x}> <label for="{id}-execute-{level}-perm">'+i.execute+"</label><br>"},this.shortcuts=[{}],this.getstate=function(e){var t=this.fm;return e=e||t.selected(),0==e.length&&(e=[t.cwd().hash]),this.checkstate(this.files(e))?0:-1},this.checkstate=function(t){var n=t.length,i=function(i){var o=!0;return e.grep(t,function(e){return o=!(!(o&&e.isowner&&e.perm&&a(e.perm))||1!=n&&"directory"==e.mime)})};return!(!n||n!==i(t).length)},this.exec=function(t){var o=this.hashes(t),r=this.files(o);r.length||(o=[this.fm.cwd().hash],r=this.files(o));var s,l,c=this.fm,d=e.Deferred().always(function(){c.enable()}),p=this.tpl,u=r.length,h=r[0],f=c.namespace+"-perm-"+h.hash,m=p.main,g=' checked="checked"',v=function(){var e={};return e[c.i18n("btnApply")]=b,e[c.i18n("btnCancel")]=function(){A.elfinderdialog("close")},e},b=function(){var t,n=e.trim(e("#"+f+"-perm").val());return!!a(n)&&(A.elfinderdialog("close"),t={cmd:"chmod",targets:o,mode:n},void c.request({data:t,notify:{type:"chmod",cnt:u}}).fail(function(e){d.reject(e)}).done(function(n){n.changed&&n.changed.length&&(n.undo={cmd:"chmod",callback:function(){var t=[];return e.each(j,function(e,n){t.push(c.request({data:{cmd:"chmod",targets:n,mode:e},notify:{type:"undo",cnt:n.length}}))}),e.when.apply(null,t)}},n.redo={cmd:"chmod",callback:function(){return c.request({data:t,notify:{type:"redo",cnt:o.length}})}}),d.resolve(n)}))},y=function(){for(var t,i="",a=0;a<3;a++)t=0,e("#"+f+"-read-"+n[a]+"-perm").is(":checked")&&(t=4|t),e("#"+f+"-write-"+n[a]+"-perm").is(":checked")&&(t=2|t),e("#"+f+"-execute-"+n[a]+"-perm").is(":checked")&&(t=1|t),i+=t.toString(8);e("#"+f+"-perm").val(i)},w=function(t){for(var i,a=0;a<3;a++)i=parseInt(t.slice(a,a+1),8),e("#"+f+"-read-"+n[a]+"-perm").prop("checked",!1),e("#"+f+"-write-"+n[a]+"-perm").prop("checked",!1),e("#"+f+"-execute-"+n[a]+"-perm").prop("checked",!1),4==(4&i)&&e("#"+f+"-read-"+n[a]+"-perm").prop("checked",!0),2==(2&i)&&e("#"+f+"-write-"+n[a]+"-perm").prop("checked",!0),1==(1&i)&&e("#"+f+"-execute-"+n[a]+"-perm").prop("checked",!0);y()},x=function(e){for(var t,n,i,a="777",o="",r=e.length,s=0;s<r;s++){t=z(e[s].perm),j[t]||(j[t]=[]),j[t].push(e[s].hash),o="";for(var l=0;l<3;l++)n=parseInt(t.slice(l,l+1),8),i=parseInt(a.slice(l,l+1),8),4!=(4&n)&&4==(4&i)&&(i-=4),2!=(2&n)&&2==(2&i)&&(i-=2),1!=(1&n)&&1==(1&i)&&(i-=1),o+=i.toString(8);a=o}return a},k=function(e){return e?":"+e:""},C=function(e,t){for(var a,o,r="",s=p.dataTable,l=0;l<3;l++)a=parseInt(e.slice(l,l+1),8),r+=a.toString(8),o=p.fieldset.replace("{f_title}",c.i18n(n[l])).replace("{name}",k(t[n[l]])).replace(/\{level\}/g,n[l]),s=s.replace("{"+l+"}",o).replace("{checked-r}",4==(4&a)?g:"").replace("{checked-w}",2==(2&a)?g:"").replace("{checked-x}",1==(1&a)?g:"");return s=s.replace("{value}",r).replace("{valueCaption}",i.perm)},z=function(e){if(isNaN(parseInt(e,8))){for(var t=e.split(""),n=[],i=0,a=t.length;i<a;i++)0===i||3===i||6===i?t[i].match(/[r]/i)?n.push(1):t[i].match(/[-]/)&&n.push(0):1===i||4===i||7===i?t[i].match(/[w]/i)?n.push(1):t[i].match(/[-]/)&&n.push(0):t[i].match(/[x]/i)?n.push(1):t[i].match(/[-]/)&&n.push(0);n.splice(3,0,","),n.splice(7,0,",");for(var o=n.join(""),r=o.split(","),s=[],l=0,c=r.length;l<c;l++){var d=parseInt(r[l],2).toString(8);s.push(d)}e=s.join("")}else e=parseInt(e,8).toString(8);return e},T={title:this.title,width:"auto",buttons:v(),close:function(){e(this).elfinderdialog("destroy")}},A=c.getUI().find("#"+f),j={},S="";return A.length?(A.elfinderdialog("toTop"),e.Deferred().resolve()):(m=m.replace("{class}",u>1?"elfinder-cwd-icon-group":c.mime2class(h.mime)),u>1?s=p.groupTitle.replace("{items}",c.i18n("items")).replace("{num}",u):(s=p.itemTitle.replace("{name}",h.name).replace("{kind}",c.mime2kind(h)),S=c.tmb(h)),l=C(x(r),1==r.length?r[0]:{}),m=m.replace("{title}",s).replace("{dataTable}",l).replace(/{id}/g,f),A=this.fmDialog(m,T),A.attr("id",f),S&&e("<img/>").on("load",function(){A.find(".elfinder-cwd-icon").addClass(S.className).css("background-image","url('"+S.url+"')")}).attr("src",S.url),e("#"+f+"-table-perm :checkbox").on("click",function(){y("perm")}),e("#"+f+"-perm").on("keydown",function(t){var n=t.keyCode;if(n==e.ui.keyCode.ENTER)return t.stopPropagation(),void b()}).on("focus",function(t){e(this).trigger("select")}).on("keyup",function(t){3==e(this).val().length&&(e(this).trigger("select"),w(e(this).val()))}),d)}},i.prototype.commands.colwidth=function(){this.alwaysEnabled=!0,this.updateOnSelect=!1,this.getstate=function(){return"fixed"===this.fm.getUI("cwd").find("table").css("table-layout")?0:-1},this.exec=function(){return this.fm.getUI("cwd").trigger("colwidth"),e.Deferred().resolve()}},i.prototype.commands.copy=function(){this.shortcuts=[{pattern:"ctrl+c ctrl+insert"}],this.getstate=function(t){var n=this.files(t),i=n.length,a=function(t){var n=!0;return e.grep(t,function(e){return n=!(!n||!e.read)})};return i&&a(n).length==i?0:-1},this.exec=function(t){var n=this.fm,i=e.Deferred().fail(function(e){n.error(e)});return e.each(this.files(t),function(e,t){if(!t.read)return!i.reject(["errCopy",t.name,"errPerm"])}),"rejected"==i.state()?i:i.resolve(n.clipboard(this.hashes(t)))}},i.prototype.commands.cut=function(){var t=this.fm;this.shortcuts=[{pattern:"ctrl+x shift+insert"}],this.getstate=function(n){var i=this.files(n),a=i.length,o=function(n){var i=!0;return e.grep(n,function(e){return i=!(!i||!e.read||e.locked||t.isRoot(e))})};return a&&o(i).length==a?0:-1},this.exec=function(n){var i=e.Deferred().fail(function(e){t.error(e)});return e.each(this.files(n),function(e,n){return!n.read||n.locked||t.isRoot(n)?!i.reject(["errCopy",n.name,"errPerm"]):n.locked?!i.reject(["errLocked",n.name]):void 0}),"rejected"==i.state()?i:i.resolve(t.clipboard(this.hashes(n),!0))}},i.prototype.commands.zipdl=function(){},i.prototype.commands.download=function(){var t=this,n=this.fm,i=null,a=!1,o=!1,r=!1,s=window.location.pathname||"/",l=function(r,s){var l,c;if(null!==i&&(n.searchStatus.state>1?o=n.searchStatus.mixed:n.leafRoots[n.cwd().hash]&&(l=n.cwd().volumeid,e.each(r,function(e,t){if(0!==t.indexOf(l))return o=!0,!1})),a=n.isCommandEnabled("zipdl",r[0])),o){if(c=i?"zipdl":"download",r=e.grep(r,function(e){var t=n.file(e),a=!(!t||!i&&"directory"===t.mime||!n.isCommandEnabled(c,e));return t&&s&&!a&&n.cwdHash2Elm(t.hash).trigger("unselect"),a}),!r.length)return[]}else if(!n.isCommandEnabled("download",r[0]))return[];return e.grep(t.files(r),function(e){var t=!(!e.read||!a&&"directory"==e.mime);return s&&!t&&n.cwdHash2Elm(e.hash).trigger("unselect"),t})};this.linkedCmds=["zipdl"],this.shortcuts=[{pattern:"shift+enter"}],this.getstate=function(e){var t=this.hashes(e),i=t.length,o=this.options.maxRequests||10;return i<1?-1:(i=l(t).length,i&&(a||i<=o&&(!n.UA.IE&&!n.UA.Mobile||1==i))?0:-1)},n.bind("contextmenu",function(n){var i,a,o=t.fm,r=null,s=function(t){var n=t.url||o.url(t.hash);return{icon:"link",node:e("<a></a>").attr({href:n,target:"_blank",title:o.i18n("link")}).text(t.name).on("mousedown click touchstart touchmove touchend contextmenu",function(e){e.stopPropagation()}).on("dragstart",function(n){var i=n.dataTransfer||n.originalEvent.dataTransfer||null;if(r=null,i){var a=function(t){var n,i=t.mime,a=o.tmb(t);return n='<div class="elfinder-cwd-icon '+o.mime2class(i)+' ui-corner-all"></div>',a&&(n=e(n).addClass(a.className).css("background-image","url('"+a.url+"')").get(0).outerHTML),n};i.effectAllowed="copyLink",i.setDragImage&&(r=e('<div class="elfinder-drag-helper html5-native">').append(a(t)).appendTo(e(document.body)),i.setDragImage(r.get(0),50,47)),o.UA.IE||(i.setData("elfinderfrom",window.location.href+t.phash),i.setData("elfinderfrom:"+i.getData("elfinderfrom"),""))}}).on("dragend",function(e){r&&r.remove()})}};if(t.extra=null,n.data&&(i=n.data.targets||[],1===i.length&&(a=o.file(i[0]))&&"directory"!==a.mime))if("1"!=a.url)t.extra=s(a);else{var l;t.extra={icon:"link",node:e("<a></a>").attr({href:"#",title:o.i18n("getLink"),draggable:"false"}).text(a.name).on("click touchstart",function(e){if(!("touchstart"===e.type&&e.originalEvent.touches.length>1)){var t=l.parent();e.stopPropagation(),e.preventDefault(),t.removeClass("ui-state-disabled").addClass("elfinder-button-icon-spinner"),o.request({data:{cmd:"url",target:a.hash},preventDefault:!0}).always(function(e){if(t.removeClass("elfinder-button-icon-spinner"),e.url){var n=o.file(a.hash);n.url=e.url,l.replaceWith(s(a).node)}else t.addClass("ui-state-disabled")})}})},l=t.extra.node,l.ready(function(){requestAnimationFrame(function(){l.parent().addClass("ui-state-disabled").css("pointer-events","auto")})})}}).one("open",function(){n.api>=2.1012&&(i=n.getCommand("zipdl")),r=n.cookieEnabled&&n.api>2.1038&&!n.isCORS}),this.exec=function(n){var i,c,d,p,u,h,f,m,g,v=this.hashes(n),b=this.fm,y=(b.options.url,l(v,!0)),w=e.Deferred(),x="",k={},C=!1,z=function(n){return function(){var i,a,o,r=e.Deferred(),s=b.file(b.root(n[0])),l=1===n.length,d=s?s.i18||s.name:null;return l?(i=b.file(n[0]))&&(a=i.i18||i.name):(e.each(n,function(){var e=b.file(this);return!e||o&&o!==e.phash?(o=null,!1):void(o=e.phash)}),o&&(i=b.file(o))&&(a=(i.i18||i.name)+"-"+n.length)),a&&(d=a),d&&(d=" ("+d+")"),b.request({data:{cmd:"zipdl",targets:n},notify:{type:"zipdl",cnt:1,hideCnt:!0,msg:b.i18n("ntfzipdl")+d},cancel:!0,eachCancel:!0,preventDefault:!0}).done(function(i){var o,s,l,d,u,h,f={},m="dlw"+ +new Date,g=function(n){l=e("<a></a>").attr("href",n).attr("download",b.escape(a)).on("click",function(){r.resolve(),s&&s.elfinderdialog("destroy")}),C?(l.attr("target","_blank").append('<span class="elfinder-button-icon elfinder-button-icon-download"></span>'+b.escape(a)),f[b.i18n("btnCancel")]=function(){s.elfinderdialog("destroy")},s=t.fmDialog(l,{title:b.i18n("link"),buttons:f,width:"200px",destroyOnClose:!0,close:function(){"resolved"!==r.state()&&r.resolve()}})):(T(l.hide().appendTo("body").get(0)),l.remove())};i.error?(b.error(i.error),r.resolve()):i.zipdl&&(o=i.zipdl,a?(h=b.splitFileExtention(o.name||""),a+=h[1]?"."+h[1]:".zip"):a=o.name,p||C?(c=b.options.url+(b.options.url.indexOf("?")===-1?"?":"&")+"cmd=zipdl&download=1",e.each([n[0],o.file,a,o.mime],function(e,t){c+="&targets%5B%5D="+encodeURIComponent(t)}),e.each(b.customData,function(e,t){c+="&"+encodeURIComponent(e)+"="+encodeURIComponent(t)}),c+="&"+encodeURIComponent(a),b.hasParrotHeaders()?b.getBinaryByUrl({url:c},function(e){e instanceof Blob?(c=(window.URL||window.webkitURL).createObjectURL(e),g(c)):b.error(["errUploadTransfer",b.i18n("kindZIP")])}):g(c)):(d=e('<form action="'+b.options.url+'" method="post" target="'+m+'" style="display:none"></form>').append('<input type="hidden" name="cmd" value="zipdl"/>').append('<input type="hidden" name="download" value="1"/>'),e.each([n[0],o.file,a,o.mime],function(e,t){d.append('<input type="hidden" name="targets[]" value="'+b.escape(t)+'"/>')}),e.each(b.customData,function(e,t){d.append('<input type="hidden" name="'+e+'" value="'+b.escape(t)+'"/>')}),d.attr("target",m).appendTo("body"),u=e('<iframe style="display:none" name="'+m+'">').appendTo("body").ready(function(){d.submit().remove(),r.resolve(),setTimeout(function(){u.remove()},2e4)})))}).fail(function(e){e&&b.error(e),r.resolve()}),r.promise()}},T=function(e){var t;"function"==typeof MouseEvent?t=new MouseEvent("click"):(t=document.createEvent("MouseEvents"),t.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null)),b.pauseUnloadCheck(!0),e.dispatchEvent(t)},A=function(e){var t,n="elfdl"+e;t=document.cookie.split(n+"="),2===t.length?(h&&clearTimeout(h),document.cookie=n+"=; path="+s+"; max-age=0",j()):setTimeout(function(){A(e)},200)},j=function(){b.ui.notify.children(".elfinder-notify-download").length&&b.notify({type:"download",cnt:-1})},S=[];if(!y.length)return w.reject();if(u=e.grep(y,function(e){return"directory"!==e.mime}).length,d=e("<a>").hide().appendTo("body"),p="string"==typeof d.get(0).download,a&&(u!==y.length||u>=(this.options.minFilesZipdl||1)))return d.remove(),C=!p&&b.UA.Mobile,o?(k={},e.each(y,function(e,t){var n=t.hash.split("_",2);k[n[0]]?k[n[0]].push(t.hash):k[n[0]]=[t.hash]}),!C&&b.UA.Mobile&&Object.keys(k).length>1&&(C=!0)):k=[e.map(y,function(e){return e.hash;
20
- })],w=b.sequence(e.map(k,function(e){return z(e)})).always(function(){b.trigger("download",{files:y})});for(S=[],m=e.Deferred().done(function(t){for(i=0;i<t.length;i++)c=t[i],r&&c.substr(0,b.options.url.length)===b.options.url&&(f=b.getRequestId(),S.push(f),c+="&cpath="+s+"&reqid="+f,h=setTimeout(function(){b.notify({type:"download",cnt:1,cancel:b.UA.IE||b.UA.Edge?void 0:function(){S.length&&e.each(S,function(){b.request({data:{cmd:"abort",id:this},preventDefault:!0})}),S=[]}})},b.notifyDelay),A(f)),p?T(d.attr("href",c).attr("download",b.escape(y[i].name)).get(0)):b.UA.Mobile?setTimeout(function(){window.open(c)||(b.error("errPopup"),h&&cleaerTimeout(h),j())},100):x+='<iframe class="downloader" id="downloader-'+y[i].hash+'" style="display:none" src="'+c+'"></iframe>';d.remove(),e(x).appendTo("body").ready(function(){setTimeout(function(){e(x).each(function(){e("#"+e(this).attr("id")).remove()})},2e4+1e4*i)}),b.trigger("download",{files:y}),w.resolve()}),u=y.length,g=[],i=0;i<y.length;i++)b.openUrl(y[i].hash,!0,function(e){e&&g.push(e),--u<1&&m.resolve(g)});return w}},i.prototype.commands.duplicate=function(){var t=this.fm;this.getstate=function(n){var i=this.files(n),a=i.length,o=function(n){var i=!0;return e.grep(n,function(e){return i=!(!i||!e.read||e.phash!==t.cwd().hash||t.isRoot(e))})};return a&&t.cwd().write&&o(i).length==a?0:-1},this.exec=function(t){var n=this.fm,i=this.files(t),a=i.length,o=e.Deferred().fail(function(e){e&&n.error(e)});return a?(e.each(i,function(e,t){if(!t.read||!n.file(t.phash).write)return!o.reject(["errCopy",t.name,"errPerm"])}),"rejected"==o.state()?o:n.request({data:{cmd:"duplicate",targets:this.hashes(t)},notify:{type:"copy",cnt:a},navigate:{toast:{inbuffer:{msg:n.i18n(["complete",n.i18n("cmdduplicate")])}}}})):o.reject()}},i.prototype.commands.edit=function(){var t,n=this,i=this.fm,a=i.res("class","editing"),o=[],r=[],s=!1,l=function(e){return e.replace(/\s+$/,"")},c=function(t){var a,o=e('<select class="ui-corner-all"></select>');return t&&e.each(t,function(e,t){a=i.escape(t.value),o.append('<option value="'+a+'">'+(t.caption?i.escape(t.caption):a)+"</option>")}),e.each(n.options.encodings,function(e,t){o.append('<option value="'+t+'">'+t+"</option>")}),o},d=function(){var t,a,o=i.options.dialogContained?i.getUI():e(window);return a="string"==typeof n.options.dialogWidth&&(t=n.options.dialogWidth.match(/(\d+)%/))?parseInt(o.width()*(t[1]/100)):parseInt(n.options.dialogWidth||650),Math.min(a,o.width())},p=function(){if(n.options.dialogHeight){var t,a,o=i.options.dialogContained?i.getUI():e(window);return a="string"==typeof n.options.dialogHeight&&(t=n.options.dialogHeight.match(/(\d+)%/))?parseInt(o.height()*(t[1]/100)):parseInt(n.options.dialogHeight||o.height()),Math.min(a,o.height())}},u=function(t){var a,l,c,d=t.length;return d>1&&(a=t[0].mime,l=t[0].name.replace(/^.*(\.[^.]+)$/,"$1")),e.grep(t,function(t){var p;return!c&&"directory"!==t.mime&&(p=t.read&&(s||i.mimeIsText(t.mime)||e.inArray(t.mime,1===d?o:r)!==-1)&&(!n.onlyMimes.length||e.inArray(t.mime,n.onlyMimes)!==-1)&&(1===d||t.mime===a&&t.name.substr(l.length*-1)===l)&&!!i.uploadMimeCheck(t.mime,t.phash)&&b(t,d)&&Object.keys(g).length,p||(c=!0),p)})},h=function(e){var t,n=i.file(e);i.request({cmd:"info",targets:[e],preventDefault:!0}).done(function(e){var a;e&&e.files&&e.files.length&&(t=e.files[0],n.ts==t.ts&&n.size==t.size||(a={changed:[t]},i.updateCache(a),i.change(a)))})},f=function(t,o,r,s,u,f){var g,v,b,y,w,k,C=e.Deferred(),z=!1,T=function(){return!!z||(i.toast({mode:"warning",msg:i.i18n("nowLoading")}),!1)},A=function(){f&&Array.isArray(f)&&e.each(f,function(){this.msg&&i.toast(this)})},j=function(){var t,n,a,o=y?y.val():void 0,r=e.Deferred().fail(function(e){b.show().find("button.elfinder-btncnt-0,button.elfinder-btncnt-1").hide()});return T()?(g.editor&&(g.editor.save(g[0],g.editor.instance),t=g.editor.confObj,t.info&&(t.info.schemeContent||t.info.arrayBufferContent)&&(o="scheme")),n=D(),U(n),n.promise?(a=setTimeout(function(){i.notify({type:"chkcontent",cnt:1,hideCnt:!0,cancel:function(){n.reject()}})},100),n.always(function(){a&&clearTimeout(a),i.notify({type:"chkcontent",cnt:-1})}).done(function(e){C.notifyWith(g,[o,g.data("hash"),v,r])}).fail(function(e){r.reject(e)})):C.notifyWith(g,[o,g.data("hash"),v,r]),r):r.resolve()},S=function(){T()&&j().fail(function(e){e&&i.error(e)})},O=function(){g.elfinderdialog("close")},I=function(){T()&&(b.hide(),j().done(function(){z=!1,b.show(),O()}).fail(function(e){b.show(),e&&i.error(e)}))},M=function(){if(T()){var t=v,r=o.phash,s=function(e){p.addClass(a).fadeIn(function(){e&&i.error(e)}),v=t,i.disable()},l=function(){n.mime=R.mime||o.mime,n.prefix=(R.name||o.name).replace(/ \d+(\.[^.]+)?$/,"$1"),n.requestCmd="mkfile",n.nextAction={},n.data={target:r},e.proxy(i.res("mixin","make"),n)().done(function(e){var t;e.added&&e.added.length?(t=g.data("hash"),g.data("hash",e.added[0].hash),j().done(function(){z=!1,b.show(),O(),p.fadeIn()}).fail(function(){i.exec("rm",[e.added[0].hash],{forceRm:!0,quiet:!0}),g.data("hash",t),b.find("button.elfinder-btncnt-2").hide(),s()})):s()}).progress(function(e){e&&"errUploadMime"===e&&g.trigger("saveAsFail")}).fail(s).always(function(){delete n.mime,delete n.prefix,delete n.nextAction,delete n.data}),i.trigger("unselectfiles",{files:[o.hash]})},c=null,d=null,p=i.getUI().children("."+n.dialogClass+":visible");b.is(":hidden")&&(p=p.add(b)),p.removeClass(a).fadeOut(),i.enable(),i.searchStatus.state<2&&r!==i.cwd().hash?c=i.exec("open",[r],{thash:r}):i.file(r)||(d=i.request({cmd:"info",targets:[r]})),e.when([c,d]).done(function(){d?i.one("infodone",function(){i.file(r)?l():s("errFolderNotFound")}):c?i.one("cwdrender",l):l()}).fail(s)}},E=function(){var t,n,a=e.Deferred();return z?(g.editor&&g.editor.save(g[0],g.editor.instance),t=D(),t&&t.promise?(n=setTimeout(function(){i.notify({type:"chkcontent",cnt:1,hideCnt:!0,cancel:function(){t.reject()}})},100),t.always(function(){n&&clearTimeout(n),i.notify({type:"chkcontent",cnt:-1})}).done(function(e){a.resolve(v!==e)}).fail(function(e){a.resolve(e||void 0!==v)})):a.resolve(v!==t),a):a.resolve(!1)},F={title:i.escape(o.name),width:d(),height:p(),buttons:{},cssClass:a,maxWidth:"window",maxHeight:"window",allowMinimize:!0,allowMaximize:!0,openMaximized:x()||u&&u.info&&u.info.openMaximized,btnHoverFocus:!1,closeOnEscape:!1,propagationEvents:["mousemove","mouseup","click"],minimize:function(){var e;g.editor&&b.closest(".ui-dialog").is(":hidden")&&(e=g.editor.confObj,e.info&&e.info.syncInterval&&h(o.hash))},close:function(){var e=function(){var e;C.resolve(),g.editor&&(g.editor.close(g[0],g.editor.instance),e=g.editor.confObj,e.info&&e.info.syncInterval&&h(o.hash)),g.elfinderdialog("destroy")},t="undefined"!=typeof R.name,a=t?{label:"btnSaveAs",callback:function(){requestAnimationFrame(M)}}:{label:"btnSaveClose",callback:function(){j().done(function(){e()})}};E().done(function(o){var r=["confirmNotSave"];o?("string"==typeof o&&r.unshift(o),i.confirm({title:n.title,text:r,accept:a,cancel:{label:"btnClose",callback:e},buttons:t?null:[{label:"btnSaveAs",callback:function(){requestAnimationFrame(M)}}]})):e()})},open:function(){var e,n,a;if(g.initEditArea.call(g,t,o,r,i),g.editor){if(e=g.editor.load(g[0])||null,e&&e.done)e.always(function(){z=!0}).done(function(e){g.editor.instance=e,g.editor.focus(g[0],g.editor.instance),U(D()),requestAnimationFrame(function(){b.trigger("resize")})}).fail(function(e){e&&i.error(e),g.elfinderdialog("destroy")}).always(A);else{if(z=!0,e&&("string"==typeof e||Array.isArray(e)))return i.error(e),void g.elfinderdialog("destroy");g.editor.instance=e,g.editor.focus(g[0],g.editor.instance),U(D()),requestAnimationFrame(function(){b.trigger("resize")}),A()}n=g.editor.confObj,n.info&&n.info.syncInterval&&(a=parseInt(n.info.syncInterval))&&setTimeout(function(){P(a)},a)}else z=!0,U(D())},resize:function(e,t){g.editor&&g.editor.resize(g[0],g.editor.instance,e,t||{})}},D=function(){var t=g.getContent.call(g,g[0]);return void 0!==t&&t!==!1&&null!==t||(t=e.Deferred().reject()),t},U=function(e){e&&e.promise?e.done(function(e){v=e}):v=e},P=function(e){b.is(":visible")&&(h(o.hash),setTimeout(function(){P(e)},e))},q=function(){y&&E().done(function(e){e?y.attr("title",i.i18n("saveAsEncoding")).addClass("elfinder-edit-changed"):y.attr("title",i.i18n("openAsEncoding")).removeClass("elfinder-edit-changed")})},R={};if(u&&(u.html&&(g=e(u.html)),w={init:u.init||null,load:u.load,getContent:u.getContent||null,save:u.save,beforeclose:"function"==typeof u.beforeclose?u.beforeclose:void 0,close:"function"==typeof u.close?u.close:function(){},focus:"function"==typeof u.focus?u.focus:function(){},resize:"function"==typeof u.resize?u.resize:function(){},instance:null,doSave:S,doCancel:O,doClose:I,file:o,fm:i,confObj:u,trigger:function(e,t){i.trigger("editEditor"+e,Object.assign({},u.info||{},t))}}),!g){if(!i.mimeIsText(o.mime))return C.reject("errEditorNotFound");!function(){g=e('<textarea class="elfinder-file-edit" rows="20" id="'+t+'-ta"></textarea>').on("input propertychange",q),u&&u.info&&!u.info.useTextAreaEvent||g.on("keydown",function(t){var n,i,a=t.keyCode;t.stopPropagation(),a==e.ui.keyCode.TAB&&(t.preventDefault(),this.setSelectionRange&&(n=this.value,i=this.selectionStart,this.value=n.substr(0,i)+"\t"+n.substr(this.selectionEnd),i+=1,this.setSelectionRange(i,i))),(t.ctrlKey||t.metaKey)&&(a!="Q".charCodeAt(0)&&a!="W".charCodeAt(0)||(t.preventDefault(),O()),a=="S".charCodeAt(0)&&(t.preventDefault(),S()))}).on("mouseenter",function(){this.focus()}),g.initEditArea=function(e,t,n){g.hide().val(n),this._setupSelEncoding(n)}}()}return g._setupSelEncoding=function(t){var n=s&&"unknown"!==s?[{value:s}]:[],a=e("<select></select>").hide(),r=function(t){t&&a.appendTo(y.parent()),a.empty().append(e("<option></option>").text(y.val())),y.width(a.width())};""!==t&&s&&"UTF-8"===s||n.push({value:"UTF-8"}),y=c(n).on("touchstart",function(e){e.stopPropagation()}).on("change",function(){E().done(function(e){e||""===D()||(O(),m(o,y.val(),u).fail(function(e){e&&i.error(e)}))}),r()}).on("mouseover",q),g.parent().next().prepend(e('<div class="ui-dialog-buttonset elfinder-edit-extras"></div>').append(y)),r(!0)},g.data("hash",o.hash),w&&(g.editor=w,"function"==typeof w.beforeclose&&(F.beforeclose=function(){return w.beforeclose(g[0],w.instance)}),"function"==typeof w.init&&(g.initEditArea=w.init),"function"==typeof w.getContent&&(g.getContent=w.getContent)),g.initEditArea||(g.initEditArea=function(){}),g.getContent||(g.getContent=function(){return l(g.val())}),u&&u.info&&u.info.preventGet||(F.buttons[i.i18n("btnSave")]=S,F.buttons[i.i18n("btnSaveClose")]=I,F.buttons[i.i18n("btnSaveAs")]=M,F.buttons[i.i18n("btnCancel")]=O),u&&"function"==typeof u.prepare&&u.prepare(g,F,o),b=n.fmDialog(g,F).attr("id",t).on("keydown keyup keypress",function(e){e.stopPropagation()}).css({overflow:"hidden",minHeight:"7em"}).addClass("elfinder-edit-editor").closest(".ui-dialog").on("changeType",function(t,n){if(n.extention&&n.mime){var a=(n.extention,n.mime,e(this).children(".ui-dialog-buttonpane").children(".ui-dialog-buttonset"));a.children(".elfinder-btncnt-0,.elfinder-btncnt-1").hide(),R.name=i.splitFileExtention(o.name)[0]+"."+n.extention,R.mime=n.mime,n.keepEditor||a.children(".elfinder-btncnt-2").trigger("click")}}),k=(i.options.dialogContained?i.getUI():e(window)).width(),b.width()>k&&b.width(k),C.promise()},m=function(t,a,o){var r,s,l,d=t.hash,p=(i.options,e.Deferred()),u="edit-"+i.namespace+"-"+t.hash,h=i.getUI().find("#"+u),g=a?a:0,v=!1;if(h.length)return h.elfinderdialog("toTop"),p.resolve();if(!(t.read&&(t.write||o.info&&o.info.converter)))return s=["errOpen",t.name,"errPerm"],p.reject(s);if(o&&o.info){if("function"==typeof o.info.edit)return l=o.info.edit.call(i,t,o),l.promise?l.done(function(){p.resolve()}).fail(function(e){p.reject(e)}):l?p.resolve():p.reject(),p;v=o.info.preventGet||o.info.noContent,o.info.urlAsContent||v?(r=e.Deferred(),o.info.urlAsContent?i.url(d,{async:!0,onetime:!0,temporary:!0}).done(function(e){r.resolve({content:e})}):r.resolve({})):(g&&(t.encoding=g,i.cache(t,"change")),r=i.request({data:{cmd:"get",target:d,conv:g,_t:t.ts},options:{type:"get",cache:!0},notify:{type:"file",cnt:1},preventDefault:!0})),r.done(function(a){var r,s,l;a.doconv?i.confirm({title:n.title,text:"unknown"===a.doconv?"confirmNonUTF8":"confirmConvUTF8",accept:{label:"btnConv",callback:function(){p=m(t,r.val(),o)}},cancel:{label:"btnCancel",callback:function(){p.reject()}},optionsCallback:function(t){t.create=function(){var t=e('<div class="elfinder-dialog-confirm-encoding"></div>'),n={value:a.doconv};"unknown"===a.doconv&&(n.caption="-"),r=c([n]),e(this).next().find(".ui-dialog-buttonset").prepend(t.append(e("<label>"+i.i18n("encoding")+" </label>").append(r)))}}}):(!v&&i.mimeIsText(t.mime)&&(s=new RegExp("^(data:"+t.mime.replace(/([.+])/g,"\\$1")+";base64,)","i"),o.info.dataScheme?window.btoa&&!a.content.match(s)&&(a.content="data:"+t.mime+";base64,"+btoa(a.content)):window.atob&&(l=a.content.match(s))&&(a.content=atob(a.content.substr(l[1].length)))),f(u,t,a.content,a.encoding,o,a.toasts).done(function(e){p.resolve(e)}).progress(function(e,t,n,a){var o=this;t&&(d=t),i.request({options:{type:"post"},data:{cmd:"put",target:d,encoding:e||n.encoding,content:n},notify:{type:"save",cnt:1},syncOnFail:!0,preventFail:!0,navigate:{target:"changed",toast:{inbuffer:{msg:i.i18n(["complete",i.i18n("btnSave")])}}}}).fail(function(e){p.reject(e),a.reject()}).done(function(e){requestAnimationFrame(function(){o.trigger("focus"),o.editor&&o.editor.focus(o[0],o.editor.instance)}),a.resolve()})}).fail(function(e){p.reject(e)}))}).fail(function(e){var n=i.parseError(e);n=Array.isArray(n)?n[0]:n,t.encoding&&(t.encoding="",i.cache(t,"change")),"errConvUTF8"!==n&&i.sync(),p.reject(e)})}return p.promise()},g={},v={info:{id:"textarea",name:"TextArea",useTextAreaEvent:!0},load:function(t){this.trigger("Prepare",{node:t,editorObj:void 0,instance:void 0,opts:{}}),t.setSelectionRange&&t.setSelectionRange(0,0),e(t).trigger("focus").show()},save:function(){}},b=function(a,o){var r=function(t,n){if(n){if("*"===n[0]||e.inArray(t,n)!==-1)return!0;var a,o;for(o=n.length,a=0;a<o;a++)if(0===t.indexOf(n[a]))return!0;return!1}return i.mimeIsText(t)},s=function(e,t){if(!t||!t.length)return!0;var n,i,a=e.replace(/^.+\.([^.]+)|(.+)$/,"$1$2").toLowerCase();for(i=t.length,n=0;n<i;n++)if(a===t[n].toLowerCase())return!0;return!1},l=n.options.editors||[],c=i.cwd().write;return t=i.storage("storedEditors")||{},g={},l.length||(l=[v]),e.each(l,function(e,t){var n;(1===o||!t.info.single)&&(t.info&&t.info.converter?c:a.write)&&(a.size>0||!t.info.converter&&t.info.canMakeEmpty!==!1&&i.mimesCanMakeEmpty[a.mime])&&(!t.info.maxSize||a.size<=t.info.maxSize)&&r(a.mime,t.mimes||null)&&s(a.name,t.exts||null)&&"function"==typeof t.load&&"function"==typeof t.save&&(n=t.info.name?t.info.name:"Editor "+e,t.id=t.info.id?t.info.id:"editor"+e,t.name=n,t.i18n=i.i18n(n),g[t.id]=t)}),!!Object.keys(g).length},y=function(n,a){n&&a&&(e.isPlainObject(t)||(t={}),t[n]=a.id,i.storage("storedEditors",t),i.trigger("selectfiles",{files:i.selected()}))},w=function(){var e=i.storage("useStoredEditor");return e?e>0:n.options.useStoredEditor},x=function(){var e=i.storage("editorMaximized");return e?e>0:n.options.editorMaximized},k=function(t,n){var a=[];return e.each(g,function(e,o){a.push({label:i.escape(o.i18n),icon:o.info&&o.info.icon?o.info.icon:"edit",options:{iconImg:o.info&&o.info.iconImg?i.baseUrl+o.info.iconImg:void 0},callback:function(){y(t[0].mime,o),n&&n.call(o)}})}),a},C=function(e){return e.toLowerCase().replace(/ +/g,"")},z=function(e){var n=t[e];return n&&Object.keys(g).length?g[C(n)]:void 0};this.getEncSelect=c,this.shortcuts=[{pattern:"ctrl+e"}],this.init=function(){var t,n,i=this,a=this.fm,l=this.options,c=[];this.onlyMimes=this.options.mimes||[],a.one("open",function(){l.editors&&Array.isArray(l.editors)&&(a.trigger("canMakeEmptyFile",{mimes:Object.keys(a.storage("mkfileTextMimes")||{}).concat(l.makeTextMimes||["text/plain"])}),e.each(l.editors,function(e,t){t.info&&t.info.cmdCheck&&c.push(t.info.cmdCheck)}),c.length?a.api>=2.103?n=a.request({data:{cmd:"editor",name:c,method:"enabled"},preventDefault:!0}).done(function(e){t=e}).fail(function(){t={}}):(t={},n=e.Deferred().resolve()):n=e.Deferred().resolve(),n.always(function(){t&&(l.editors=e.grep(l.editors,function(e){return!e.info||!e.info.cmdCheck||!!t[e.info.cmdCheck]})),e.each(l.editors,function(e,t){t.setup&&"function"==typeof t.setup&&t.setup.call(t,l,a),t.disabled||(t.mimes&&Array.isArray(t.mimes)&&(o=o.concat(t.mimes),t.info&&t.info.single||(r=r.concat(t.mimes))),!s&&t.mimes&&"*"===t.mimes[0]&&(s=!0),t.info||(t.info={}),t.info.integrate&&a.trigger("helpIntegration",Object.assign({cmd:"edit"},t.info.integrate)),t.info.canMakeEmpty&&a.trigger("canMakeEmptyFile",{mimes:Array.isArray(t.info.canMakeEmpty)?t.info.canMakeEmpty:t.mimes}))}),o=(e.uniqueSort||e.unique)(o),r=(e.uniqueSort||e.unique)(r),l.editors=e.grep(l.editors,function(e){return!e.disabled})}))}).bind("select",function(){g=null}).bind("contextmenucreate",function(t){var n,o,r=function(e){var t=i.title;a.one("contextmenucreatedone",function(){i.title=t}),i.title=a.escape(e.i18n),e.info&&e.info.iconImg&&(i.contextmenuOpts={iconImg:a.baseUrl+e.info.iconImg}),delete i.variants};i.contextmenuOpts=void 0,"files"===t.data.type&&i.enabled()&&(n=a.file(t.data.targets[0]),b(n,t.data.targets.length)&&(Object.keys(g).length>1?w()&&(o=z(n.mime))?(r(o),i.extra={icon:"menu",node:e("<span></span>").attr({title:a.i18n("select")}).on("click touchstart",function(t){if(!("touchstart"===t.type&&t.originalEvent.touches.length>1)){var n=e(this);t.stopPropagation(),t.preventDefault(),a.trigger("contextmenu",{raw:k(a.selectedFiles(),function(){var e=a.selected();a.exec("edit",e,{editor:this}),a.trigger("selectfiles",{files:e})}),x:n.offset().left,y:n.offset().top})}})}):(delete i.extra,i.variants=[],e.each(g,function(e,t){i.variants.push([{editor:t},t.i18n,t.info&&t.info.iconImg?a.baseUrl+t.info.iconImg:"edit"])})):(r(g[Object.keys(g)[0]]),delete i.extra)))}).bind("canMakeEmptyFile",function(t){if(t.data&&t.data.resetTexts){var n=a.arrayFlip(i.options.makeTextMimes||["text/plain"]),o=i.getMkfileHides();e.each(a.storage("mkfileTextMimes")||{},function(e,t){n[e]||(delete a.mimesCanMakeEmpty[e],delete o[e])}),a.storage("mkfileTextMimes",null),Object.keys(o).length?a.storage("mkfileHides",o):a.storage("mkfileHides",null)}})},this.getstate=function(e){var t=this.files(e),n=t.length;return n&&u(t).length==n?0:-1},this.exec=function(t,n){var i,a=this.fm,o=u(this.files(t)),r=e.map(o,function(e){return e.hash}),s=[],l=n&&n.editor?n.editor:null,c=e(n&&n._currentNode?n._currentNode:a.cwdHash2Elm(r[0])),d=function(){var t=e.Deferred();return!l&&Object.keys(g).length>1?w()&&(l=z(o[0].mime))?t.resolve(l):(a.trigger("contextmenu",{raw:k(o,function(){t.resolve(this)}),x:c.offset().left,y:c.offset().top+22,opened:function(){a.one("closecontextmenu",function(){requestAnimationFrame(function(){"pending"===t.state()&&t.reject()})})}}),a.trigger("selectfiles",{files:r}),t):(Object.keys(g).length>1&&l&&y(o[0].mime,l),t.resolve(l?l:Object.keys(g).length?g[Object.keys(g)[0]]:null))},p=e.Deferred();return null===g&&b(o[0],r.length),c.length||(c=a.getUI("cwd")),d().done(function(t){for(;i=o.shift();)s.push(m(i,i.encoding||void 0,t).fail(function(e){e&&a.error(e)}));s.length?e.when.apply(null,s).done(function(){p.resolve()}).fail(function(){p.reject()}):p.reject()}).fail(function(){p.reject()}),p},this.getMkfileHides=function(){return i.storage("mkfileHides")||i.arrayFlip(n.options.mkfileHideMimes||[])}},i.prototype.commands.emailto=function(){var t=this,n=t.fm,i=function(t){var n,i,a,o=t.length;return o>1&&(n=t[0].mime,i=t[0].name.replace(/^.*(\.[^.]+)$/,"$1")),e.grep(t,function(e){return!a&&"directory"!==e.mime})};this.exec=function(e){var t=n.url(e[0],0),i=t.split("/").pop(),a="";if(a=prompt("Please enter mail address"),null!=a){var o=a.match(/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i);return null==o?void alert("Please enter a valid email address"):void window.open("mailto:"+a+"?subject="+i+"&body="+t)}},this.getstate=function(e){var t=this.files(e),n=t.length;return n&&i(t).length==n?0:-1}},i.prototype.commands.empty=function(){var t,n,i=function(e){var i=t.files(e);return i.length||(i=[n.cwd()]),i};this.linkedCmds=["rm"],this.init=function(){t=this,n=this.fm},this.getstate=function(t){var n,a=i(t),o=function(t){var n=!0;return e.grep(t,function(e){return n=!!(n&&e.read&&e.write&&"directory"===e.mime)})};return n=a.length,o(a).length==n?0:-1},this.exec=function(t){var a=i(t),o=a.length,r=e.Deferred().done(function(){var t={changed:{}};n.toast({msg:n.i18n(['"'+s.join('", ')+'"',"complete",n.i18n("cmdempty")])}),e.each(a,function(e,n){t.changed[n.hash]=n}),n.change(t)}).always(function(){var t=n.cwd().hash;n.trigger("selectfiles",{files:e.map(a,function(e){return t===e.phash?e.hash:null})})}),s=[],l=function(e){"number"==typeof e?(s.push(a[e].name),delete a[e].dirs):e&&n.error(e),--o<1&&r[s.length?"resolve":"reject"]()};return e.each(a,function(t,i){var a;return i.write&&"directory"===i.mime?n.isCommandEnabled("rm",i.hash)?(a=setTimeout(function(){n.notify({type:"search",cnt:1,hideCnt:!(o>1)})},n.notifyDelay),void n.request({data:{cmd:"open",target:i.hash},preventDefault:!0,asNotOpen:!0}).done(function(r){var s=[];a&&clearTimeout(a),n.ui.notify.children(".elfinder-notify-search").length&&n.notify({type:"search",cnt:-1,hideCnt:!(o>1)}),r&&r.files&&r.files.length?r.files.length>n.maxTargets?l(["errEmpty",i.name,"errMaxTargets",n.maxTargets]):(n.updateCache(r),e.each(r.files,function(e,t){return!t.write||t.locked?(l(["errEmpty",i.name,"errRm",t.name,"errPerm"]),s=[],!1):void s.push(t.hash)}),s.length&&n.exec("rm",s,{_userAction:!0,addTexts:[n.i18n("folderToEmpty",i.name)]}).fail(function(e){n.trigger("unselectfiles",{files:n.selected()}),l(n.parseError(e)||"")}).done(function(){l(t)})):(n.toast({mode:"warning",msg:n.i18n("filderIsEmpty",i.name)}),l(""))}).fail(function(e){l(n.parseError(e)||"")})):(l(["errCmdNoSupport",'"rm"']),null):(l(["errEmpty",i.name,"errPerm"]),null)}),r}},i.prototype.commands.extract=function(){var t=this,n=t.fm,i=[],a=function(t){var n=!0;return e.grep(t,function(t){return n=!(!n||!t.read||e.inArray(t.mime,i)===-1)})};this.variants=[],this.disableOnSearch=!0,n.bind("open reload",function(){i=n.option("archivers").extract||[],n.api>2?t.variants=[[{makedir:!0},n.i18n("cmdmkdir")],[{},n.i18n("btnCwd")]]:t.variants=[[{},n.i18n("btnCwd")]],t.change()}),this.getstate=function(t){var i,o,r=this.files(t),s=r.length;return s&&a(r).length==s?n.searchStatus.state>0?(i=this.fm.cwd().hash,e.each(r,function(e,t){return o=t.phash===i}),o?0:-1):this.fm.cwd().write?0:-1:-1},this.exec=function(t,a){var o,r,s,l=this.files(t),c=e.Deferred(),d=l.length,p=a&&a.makedir?1:0,u=!1,h=!1,f=0,m=n.files(l[0].phash),g=[],v={};e.each(m,function(e,t){v[t.name]=t,g.push(t.name)});var b=function(e){switch(e){case"overwrite_all":u=!0;break;case"omit_all":h=!0}},y=function(t){t.read&&n.file(t.phash).write?e.inArray(t.mime,i)===-1?(r=["errExtract",t.name,"errNoArchive"],n.error(r),c.reject(r)):n.request({data:{cmd:"extract",target:t.hash,makedir:p},notify:{type:"extract",cnt:1},syncOnFail:!0,navigate:{toast:p?{incwd:{msg:n.i18n(["complete",n.i18n("cmdextract")]),action:{cmd:"open",msg:"cmdopen"}},inbuffer:{msg:n.i18n(["complete",n.i18n("cmdextract")]),action:{cmd:"open",msg:"cmdopen"}}}:{inbuffer:{msg:n.i18n(["complete",n.i18n("cmdextract")])}}}}).fail(function(e){"rejected"!=c.state()&&c.reject(e)}).done(function(){}):(r=["errExtract",t.name,"errPerm"],n.error(r),c.reject(r))},w=function(t,i){var a=t[i],r=n.splitFileExtention(a.name)[0],l=e.inArray(r,g)>=0,m=function(){i+1<d?w(t,i+1):c.resolve()};!p&&l&&"directory"!=v[r].mime?n.confirm({title:n.i18n("ntfextract"),text:["errExists",r,"confirmRepl"],accept:{label:"btnYes",callback:function(e){if(s=e?"overwrite_all":"overwrite",b(s),u||h){if(u){for(o=i;o<d;o++)y(t[o]);c.resolve()}}else"overwrite"==s&&y(a),i+1<d?w(t,i+1):c.resolve()}},reject:{label:"btnNo",callback:function(e){s=e?"omit_all":"omit",b(s),!u&&!h&&i+1<d?w(t,i+1):h&&c.resolve()}},cancel:{label:"btnCancel",callback:function(){c.resolve()}},all:i+1<d}):p?(y(a),m()):0==f?n.confirm({title:n.i18n("cmdextract"),text:[n.i18n("cmdextract")+' "'+a.name+'"',"confirmRepl"],accept:{label:"btnYes",callback:function(e){e&&(f=1),y(a),m()}},reject:{label:"btnNo",callback:function(e){e&&(f=-1),m()}},cancel:{label:"btnCancel",callback:function(){c.resolve()}},all:i+1<d}):(f>0&&y(a),m())};return this.enabled()&&d&&i.length?(d>0&&w(l,0),c):c.reject()}},(i.prototype.commands.forward=function(){this.alwaysEnabled=!0,this.updateOnSelect=!0,this.shortcuts=[{pattern:"ctrl+right"}],this.getstate=function(){return this.fm.history.canForward()?0:-1},this.exec=function(){return this.fm.history.forward()}}).prototype={forceLoad:!0},i.prototype.commands.fullscreen=function(){var t=this,n=this.fm,i=function(e,i){var a;e.preventDefault(),e.stopPropagation(),i&&i.fullscreen&&(a="on"===i.fullscreen,t.update(void 0,a),t.title=n.i18n(a?"reinstate":"cmdfullscreen"))};this.alwaysEnabled=!0,this.updateOnSelect=!1,this.syncTitleOnChange=!0,this.value=!1,this.options={ui:"fullscreenbutton"},this.getstate=function(){return 0},this.exec=function(){var i=n.getUI().get(0),a=i===n.toggleFullscreen(i);return t.title=n.i18n(a?"reinstate":"cmdfullscreen"),t.update(void 0,a),e.Deferred().resolve()},n.bind("init",function(){n.getUI().off("resize."+n.namespace,i).on("resize."+n.namespace,i)})},(i.prototype.commands.getfile=function(){var t=this,n=this.fm,i=function(n){var i=t.options,a=!0;return n=e.grep(n,function(e){return a=!(!a||"directory"==e.mime&&!i.folders||!e.read)}),i.multiple||1==n.length?n:[]};this.alwaysEnabled=!0,this.callback=n.options.getFileCallback,this._disabled="function"==typeof this.callback,this.getstate=function(e){var t=this.files(e),n=t.length;return this.callback&&n&&i(t).length==n?0:-1},this.exec=function(n){var i,a,o,r=this.fm,s=this.options,l=this.files(n),c=l.length,d=r.option("url"),p=r.option("tmbUrl"),u=e.Deferred().done(function(e){var n,i=function(){"close"==s.oncomplete?r.hide():"destroy"==s.oncomplete&&r.destroy()},a=function(e){"close"==s.onerror?r.hide():"destroy"==s.onerror?r.destroy():e&&r.error(e)};r.trigger("getfile",{files:e});try{n=t.callback(e,r)}catch(o){return void a(["Error in `getFileCallback`.",o.message])}"object"==typeof n&&"function"==typeof n.done?n.done(i).fail(a):i()}),h=function(t){return s.onlyURL?s.multiple?e.map(l,function(e){return e.url}):l[0].url:s.multiple?l:l[0]},f=[];for(i=0;i<c;i++){if(a=l[i],"directory"==a.mime&&!s.folders)return u.reject();a.baseUrl=d,"1"==a.url?f.push(r.request({data:{cmd:"url",target:a.hash},notify:{type:"url",cnt:1,hideCnt:!0},preventDefault:!0}).done(function(e){if(e.url){var t=r.file(this.hash);t.url=this.url=e.url}}.bind(a))):a.url=r.url(a.hash),s.onlyURL||(s.getPath&&(a.path=r.path(a.hash),""===a.path&&a.phash&&!function(){var t=e.Deferred();f.push(t),r.path(a.hash,!1,{}).done(function(e){a.path=e}).fail(function(){a.path=""}).always(function(){t.resolve()})}()),a.tmb&&1!=a.tmb&&(a.tmb=p+a.tmb),a.width||a.height||(a.dim?(o=a.dim.split("x"),a.width=o[0],a.height=o[1]):s.getImgSize&&a.mime.indexOf("image")!==-1&&f.push(r.request({data:{cmd:"dim",target:a.hash},notify:{type:"dim",cnt:1,hideCnt:!0},preventDefault:!0}).done(function(e){if(e.dim){var t=e.dim.split("x"),n=r.file(this.hash);n.width=this.width=t[0],n.height=this.height=t[1]}}.bind(a)))))}return f.length?(e.when.apply(null,f).always(function(){u.resolve(h(l))}),u):u.resolve(h(l))}}).prototype={forceLoad:!0},(i.prototype.commands.help=function(){var t,n,i,a,o,r,s=this.fm,l=this,c='<div class="elfinder-help-link"> <a href="{url}" target="_blank">{link}</a></div>',d='<div class="elfinder-help-team"><div>{author}</div>{work}</div>',p=/\{url\}/,u=/\{link\}/,h=/\{author\}/,f=/\{work\}/,m="replace",g="ui-priority-primary",v="ui-priority-secondary",b="elfinder-help-license",y='<li class="'+s.res("class","tabstab")+' elfinder-help-tab-{id}"><a href="#'+s.namespace+'-help-{id}" class="ui-tabs-anchor">{title}</a></li>',w=['<div class="ui-tabs ui-widget ui-widget-content ui-corner-all elfinder-help">','<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-top">'],x='<div class="elfinder-help-shortcut"><div class="elfinder-help-shortcut-pattern">{pattern}</div> {descrip}</div>',k='<div class="elfinder-help-separator"></div>',C=e("base").length?s.escape(document.location.href.replace(/#.*$/,"")):"",z=s.res("class","tabsactive"),T=function(){var e;return e=s.theme&&s.theme.author?d[m]("elfinder-help-team","elfinder-help-team elfinder-help-term-theme")[m](h,s.i18n(s.theme.author)+(s.theme.email?" &lt;"+s.theme.email+"&gt;":""))[m](f,s.i18n("theme")+" ("+s.i18n(s.theme.name)+")"):'<div class="elfinder-help-team elfinder-help-term-theme" style="display:none"></div>'},A=function(){w.push('<div id="'+s.namespace+'-help-about" class="ui-tabs-panel ui-widget-content ui-corner-bottom"><div class="elfinder-help-logo"></div>'),w.push("<h3>elFinder</h3>"),w.push('<div class="'+g+'">'+s.i18n("webfm")+"</div>"),w.push('<div class="'+v+'">'+s.i18n("ver")+": "+s.version+"</div>"),w.push('<div class="'+v+'">'+s.i18n("protocolver")+': <span class="apiver"></span></div>'),w.push('<div class="'+v+'">jQuery/jQuery UI: '+e().jquery+"/"+e.ui.version+"</div>"),w.push(k),w.push(c[m](p,"https://studio-42.github.io/elFinder/")[m](u,s.i18n("homepage"))),w.push(c[m](p,"https://github.com/Studio-42/elFinder/wiki")[m](u,s.i18n("docs"))),w.push(c[m](p,"https://github.com/Studio-42/elFinder")[m](u,s.i18n("github"))),w.push(k),w.push('<div class="'+g+'">'+s.i18n("team")+"</div>"),w.push(d[m](h,'Dmitry "dio" Levashov &lt;dio@std42.ru&gt;')[m](f,s.i18n("chiefdev"))),w.push(d[m](h,"Naoki Sawada (nao-pon)&lt;hypweb+elfinder@gmail.com&gt;")[m](f,s.i18n("developer"))),w.push(d[m](h,"Troex Nevelin &lt;troex@fury.scancode.ru&gt;")[m](f,s.i18n("maintainer"))),w.push(d[m](h,"Alexey Sukhotin &lt;strogg@yandex.ru&gt;")[m](f,s.i18n("contributor"))),s.i18[s.lang].translator&&e.each(s.i18[s.lang].translator.split(", "),function(){w.push(d[m](h,e.trim(this))[m](f,s.i18n("translator")+" ("+s.i18[s.lang].language+")"))}),w.push(T()),w.push(k),w.push('<div class="'+b+'">'+s.i18n("icons")+': Pixelmixer, <a href="http://p.yusukekamiyamane.com" target="_blank">Fugue</a>, <a href="https://icons8.com" target="_blank">Icons8</a></div>'),w.push(k),w.push('<div class="'+b+'">Licence: 3-clauses BSD Licence</div>'),w.push('<div class="'+b+'">Copyright © 2009-2022, Studio 42 / nao-pon</div>'),w.push('<div class="'+b+'">„ …'+s.i18n("dontforget")+" ”</div>"),w.push("</div>")},j=function(){var t=s.shortcuts();w.push('<div id="'+s.namespace+'-help-shortcuts" class="ui-tabs-panel ui-widget-content ui-corner-bottom">'),t.length?(w.push('<div class="ui-widget-content elfinder-help-shortcuts">'),e.each(t,function(e,t){w.push(x.replace(/\{pattern\}/,t[0]).replace(/\{descrip\}/,t[1]))}),w.push("</div>")):w.push('<div class="elfinder-help-disabled">'+s.i18n("shortcutsof")+"</div>"),w.push("</div>")},S=function(){w.push('<div id="'+s.namespace+'-help-help" class="ui-tabs-panel ui-widget-content ui-corner-bottom">'),w.push('<a href="https://github.com/Studio-42/elFinder/wiki" target="_blank" class="elfinder-dont-panic"><span>DON\'T PANIC</span></a>'),w.push("</div>")},O=!1,I=function(){O=!0,w.push('<div id="'+s.namespace+'-help-integrations" class="ui-tabs-panel ui-widget-content ui-corner-bottom"></div>')},M=!1,E=function(){M=!0,w.push('<div id="'+s.namespace+'-help-debug" class="ui-tabs-panel ui-widget-content ui-corner-bottom">'),w.push('<div class="ui-widget-content elfinder-help-debug"><ul></ul></div>'),w.push("</div>")},F=function(){var n,i,a,c,d,p,u=function(t,n){return e.each(n,function(n,i){
21
- t.append(e("<dt></dt>").text(n)),"undefined"==typeof i?t.append(e("<dd></dd>").append(e("<span></span>").text("undfined"))):"object"!=typeof i||i?"object"==typeof i&&(e.isPlainObject(i)||i.length)?t.append(e("<dd></dd>").append(u(e("<dl></dl>"),i))):t.append(e("<dd></dd>").append(e("<span></span>").text(i&&"object"==typeof i?"[]":i?i:'""'))):t.append(e("<dd></dd>").append(e("<span></span>").text("null")))}),t},h=r.children("li").length;(l.debug.options||l.debug.debug)&&(h>=5&&(d=r.children("li:last"),p=o.children("div:last"),p.is(":hidden")?(d.remove(),p.remove()):(d.prev().remove(),p.prev().remove())),a=s.namespace+"-help-debug-"+ +new Date,n=e("<li></li>").html('<a href="'+C+"#"+a+'">'+l.debug.debug.cmd+"</a>").prependTo(r),i=e('<div id="'+a+'"></div>').data("debug",l.debug),n.on("click.debugrender",function(){var t=i.data("debug");i.removeData("debug"),t&&(i.hide(),t.debug&&(c=e("<fieldset>").append(e("<legend></legend>").text("debug"),u(e("<dl></dl>"),t.debug)),i.append(c)),t.options&&(c=e("<fieldset>").append(e("<legend></legend>").text("options"),u(e("<dl></dl>"),t.options)),i.append(c)),i.show()),n.off("click.debugrender")}),r.after(i),t&&o.tabs("refresh"))},D="";this.alwaysEnabled=!0,this.updateOnSelect=!1,this.state=-1,this.shortcuts=[{pattern:"f1",description:this.title}],s.bind("load",function(){var c,d,p,u,h,f,g=l.options.view||["about","shortcuts","help","integrations","debug"];(c=e.inArray("preference",g))!==-1&&g.splice(c,1),e.fn.tabs||(c=e.inArray(g,"debug"))!==-1&&g.splice(c,1),e.each(g,function(e,t){w.push(y[m](/\{id\}/g,t)[m](/\{title\}/,s.i18n(t)))}),w.push("</ul>"),e.inArray("about",g)!==-1&&A(),e.inArray("shortcuts",g)!==-1&&j(),e.inArray("help",g)!==-1&&(d=s.i18nBaseUrl+"help/%s.html.js",S()),e.inArray("integrations",g)!==-1&&I(),e.inArray("debug",g)!==-1&&E(),w.push("</div>"),D=e(w.join("")),D.find(".ui-tabs-nav li").on("mouseenter mouseleave",function(t){e(this).toggleClass("ui-state-hover","mouseenter"===t.type)}).on("focus blur","a",function(t){e(t.delegateTarget).toggleClass("ui-state-focus","focusin"===t.type)}).children().on("click",function(t){var n=e(this);t.preventDefault(),t.stopPropagation(),n.parent().addClass(z).siblings().removeClass(z),D.children(".ui-tabs-panel").hide().filter(n.attr("href")).show()}).filter(":first").trigger("click"),O&&(n=D.find(".elfinder-help-tab-integrations").hide(),i=D.find("#"+s.namespace+"-help-integrations").hide().append(e('<div class="elfinder-help-integrations-desc"></div>').html(s.i18n("integrationWith"))),s.bind("helpIntegration",function(t){var a,o,r,l,c=i.children("ul:first");t.data&&(e.isPlainObject(t.data)?(a=Object.assign({link:"",title:"",banner:""},t.data),(a.title||a.link)&&(a.title||(a.title=a.link),o=a.link?e("<a></a>").attr("href",a.link).attr("target","_blank").text(a.title):e("<span></span>").text(a.title),a.banner&&(o=e("<span></span>").append(e("<img/>").attr(a.banner),o)))):(o=e(t.data),o.filter("a").each(function(){var t=e(this);t.attr("target")||t.attr("target","_blank")})),o&&(n.show(),c.length||(c=e('<ul class="elfinder-help-integrations"></ul>').appendTo(i)),a&&a.cmd?(l="elfinder-help-integration-"+a.cmd,r=c.find("ul."+l),r.length||(r=e('<ul class="'+l+'"></ul>'),c.append(e("<li></li>").append(e("<span></span>").html(s.i18n("cmd"+a.cmd))).append(r))),o=r.append(e("<li></li>").append(o))):c.append(e("<li></li>").append(o))))}).bind("themechange",function(){D.find("div.elfinder-help-term-theme").replaceWith(T())})),M&&(a=D.find(".elfinder-help-tab-debug").hide(),o=D.find("#"+s.namespace+"-help-debug").children("div:first"),r=o.children("ul:first").on("click",function(e){e.preventDefault(),e.stopPropagation()}),l.debug={},s.bind("backenddebug",function(e){M&&e.data&&e.data.debug&&(l.debug={options:e.data.options,debug:Object.assign({cmd:s.currentReqCmd},e.data.debug)},l.dialog&&F())})),D.find("#"+s.namespace+"-help-about").find(".apiver").text(s.api),l.dialog=l.fmDialog(D,{title:l.title,width:530,maxWidth:"window",maxHeight:"window",autoOpen:!1,destroyOnClose:!1,close:function(){M&&(a.hide(),o.tabs("destroy")),t=!1}}).on("click",function(e){e.stopPropagation()}).css({overflow:"hidden"}),p=l.dialog.children(".ui-tabs"),u=p.children(".ui-tabs-nav:first"),h=p.children(".ui-tabs-panel"),f=l.dialog.outerHeight(!0)-l.dialog.height(),l.dialog.closest(".ui-dialog").on("resize",function(){h.height(l.dialog.height()-f-u.outerHeight(!0)-20)}),d&&l.dialog.one("initContents",function(){e.ajax({url:l.options.helpSource?l.options.helpSource:d.replace("%s",s.lang),dataType:"html"}).done(function(t){e("#"+s.namespace+"-help-help").html(t)}).fail(function(){e.ajax({url:d.replace("%s","en"),dataType:"html"}).done(function(t){e("#"+s.namespace+"-help-help").html(t)})})}),l.state=0,s.trigger("helpBuilded",l.dialog)}).one("open",function(){var e=!1;s.one("backenddebug",function(){e=!0}).one("opendone",function(){requestAnimationFrame(function(){!e&&M&&(M=!1,a.hide(),o.hide(),r.hide())})})}),this.getstate=function(){return 0},this.exec=function(n,i){var s=i?i.tab:void 0,l=function(){M&&(o.tabs(),r.find("a:first").trigger("click"),a.show(),t=!0)};return l(),this.dialog.trigger("initContents").elfinderdialog("open").find((s?".elfinder-help-tab-"+s:".ui-tabs-nav li")+" a:first").trigger("click"),e.Deferred().resolve()}}).prototype={forceLoad:!0},i.prototype.commands.hidden=function(){this.hidden=!0,this.updateOnSelect=!1,this.getstate=function(){return-1}},i.prototype.commands.hide=function(){var t,n,i,a,o=this,r={};this.syncTitleOnChange=!0,this.shortcuts=[{pattern:"ctrl+shift+dot",description:this.fm.i18n("toggleHidden")}],this.init=function(){var e=this.fm;t=e.storage("hide")||{items:{}},n=Object.keys(t.items).length,this.title=e.i18n(t.show?"hideHidden":"showHidden"),o.update(void 0,o.title)},this.fm.bind("select contextmenucreate closecontextmenu",function(e,r){var s=(e.data?e.data.selected||e.data.targets:null)||r.selected();"select"===e.type&&e.data?a=e.data.origin:"contextmenucreate"===e.type&&(i=e.data.type),!s.length||("contextmenucreate"!==e.type&&"navbar"!==a||"cwd"===i)&&s[0]===r.cwd().hash?o.title=r.i18n(t.show?"hideHidden":"showHidden"):o.title=r.i18n("cmdhide"),"closecontextmenu"!==e.type?o.update("cwd"===i?n?0:-1:void 0,o.title):(i="",requestAnimationFrame(function(){o.update(void 0,o.title)}))}),this.getstate=function(e){return this.fm.cookieEnabled&&"cwd"!==i&&(e||this.fm.selected()).length||n?0:-1},this.exec=function(i,s){var l,c,d=this.fm,p=e.Deferred().done(function(){d.trigger("hide",{items:h,opts:s})}).fail(function(e){d.error(e)}),u=s||{},h=u.targets?u.targets:i||d.selected(),f=[];if(t=d.storage("hide")||{},e.isPlainObject(t)||(t={}),e.isPlainObject(t.items)||(t.items={}),("shortcut"===s._currentType||!h.length||"navbar"!==s._currentType&&"navbar"!==a&&h[0]===d.cwd().hash)&&(t.show?u.hide=!0:Object.keys(t.items).length&&(u.show=!0)),u.reset&&(u.show=!0,n=0),u.show||u.hide){if(u.show?t.show=!0:delete t.show,u.show)return d.storage("hide",u.reset?null:t),o.title=d.i18n("hideHidden"),o.update(u.reset?-1:void 0,o.title),e.each(t.items,function(e){var t=d.file(e,!0);t&&(d.searchStatus.state||!t.phash||d.file(t.phash))&&f.push(t)}),f.length&&(d.updateCache({added:f}),d.add({added:f})),u.reset&&(t={items:{}}),p.resolve();h=Object.keys(t.items)}return h.length&&(e.each(h,function(e,n){var i;t.items[n]||(i=d.file(n),i&&(r[n]=i.i18||i.name),t.items[n]=r[n]?r[n]:n)}),n=Object.keys(t.items).length,l=this.files(h),d.storage("hide",t),d.remove({removed:h}),t.show&&this.exec(void 0,{hide:!0}),u.hide||(c={},c.undo={cmd:"hide",callback:function(){var t=d.storage("hide");t&&(e.each(h,function(e,n){delete t.items[n]}),n=Object.keys(t.items).length,d.storage("hide",t),d.trigger("hide",{items:h,opts:{}}),o.update(n?0:-1)),d.updateCache({added:l}),d.add({added:l})}},c.redo={cmd:"hide",callback:function(){return d.exec("hide",void 0,{targets:h})}})),"rejected"==p.state()?p:p.resolve(c)}},(i.prototype.commands.home=function(){this.title="Home",this.alwaysEnabled=!0,this.updateOnSelect=!1,this.shortcuts=[{pattern:"ctrl+home ctrl+shift+up",description:"Home"}],this.getstate=function(){var e=this.fm.root(),t=this.fm.cwd().hash;return e&&t&&e!=t?0:-1},this.exec=function(){return this.fm.exec("open",this.fm.root())}}).prototype={forceLoad:!0},(i.prototype.commands.info=function(){var t=this.fm,n="elfinder-spinner",i="elfinder-info-button",a={calc:t.i18n("calc"),size:t.i18n("size"),unknown:t.i18n("unknown"),path:t.i18n("path"),aliasfor:t.i18n("aliasfor"),modify:t.i18n("modify"),perms:t.i18n("perms"),locked:t.i18n("locked"),dim:t.i18n("dim"),kind:t.i18n("kind"),files:t.i18n("files"),folders:t.i18n("folders"),roots:t.i18n("volumeRoots"),items:t.i18n("items"),yes:t.i18n("yes"),no:t.i18n("no"),link:t.i18n("link"),owner:t.i18n("owner"),group:t.i18n("group"),perm:t.i18n("perm"),getlink:t.i18n("getLink")},o=function(e,t){return t?e.replace(/\u200B/g,""):e.replace(/(\/|\\)/g,"$1​")};this.items=["size","aliasfor","path","link","dim","modify","perms","locked","owner","group","perm"],this.options.custom&&Object.keys(this.options.custom).length&&e.each(this.options.custom,function(e,t){t.label&&this.items.push(t.label)}),this.tpl={main:'<div class="ui-helper-clearfix elfinder-info-title {dirclass}"><span class="elfinder-cwd-icon {class} ui-corner-all"{style}></span>{title}</div><table class="elfinder-info-tb">{content}</table>',itemTitle:'<strong>{name}</strong><span class="elfinder-info-kind">{kind}</span>',groupTitle:"<strong>{items}: {num}</strong>",row:'<tr><td class="elfinder-info-label">{label} : </td><td class="{class}">{value}</td></tr>',spinner:'<span>{text}</span> <span class="'+n+" "+n+'-{name}"></span>'},this.alwaysEnabled=!0,this.updateOnSelect=!1,this.shortcuts=[{pattern:"ctrl+i"}],this.init=function(){e.each(a,function(e,n){a[e]=t.i18n(n)})},this.getstate=function(){return 0},this.exec=function(t){var r=this.files(t);r.length||(r=this.files([this.fm.cwd().hash]));var s,l,c,d,p,u,h,f,m,g=this,v=this.fm,b=this.options,y=this.tpl,w=y.row,x=r.length,k=[],C=y.main,z="{label}",T="{value}",A=[],j=null,S={title:v.i18n("selectionInfo"),width:"auto",close:function(){e(this).elfinderdialog("destroy"),j&&"pending"===j.state()&&j.reject(),e.grep(A,function(e){e&&"pending"===e.state()&&e.reject()})}},O=[],I=function(e,t,i){E.find("."+n+"-"+t).parent().html(e).addClass(i||"")},M=v.namespace+"-info-"+e.map(r,function(e){return e.hash}).join("-"),E=v.getUI().find("#"+M),F=[],D="",U="elfinder-font-mono elfinder-info-hash",P=[],q=v.ui.notify;if(q.is(":hidden")&&q.children(".elfinder-notify").length&&q.elfinderdialog("open").height("auto"),!x)return e.Deferred().reject();if(E.length)return E.elfinderdialog("toTop"),e.Deferred().resolve();if(f=v.storage("infohides")||v.arrayFlip(b.hideItems,!0),1===x){if(c=r[0],c.icon&&(D=" "+v.getIconStyle(c)),C=C.replace("{dirclass}",c.csscls?v.escape(c.csscls):"").replace("{class}",v.mime2class(c.mime)).replace("{style}",D),d=y.itemTitle.replace("{name}",v.escape(c.i18||c.name)).replace("{kind}",'<span title="'+v.escape(c.mime)+'">'+v.mime2kind(c)+"</span>"),l=v.tmb(c),c.read?"directory"!=c.mime||c.alias?s=v.formatSize(c.size):(s=y.spinner.replace("{text}",a.calc).replace("{name}","size"),O.push(c.hash)):s=a.unknown,!f.size&&k.push(w.replace(z,a.size).replace(T,s)),!f.aleasfor&&c.alias&&k.push(w.replace(z,a.aliasfor).replace(T,c.alias)),f.path||((h=v.path(c.hash,!0))?k.push(w.replace(z,a.path).replace(T,o(v.escape(h))).replace("{class}","elfinder-info-path")):(k.push(w.replace(z,a.path).replace(T,y.spinner.replace("{text}",a.calc).replace("{name}","path")).replace("{class}","elfinder-info-path")),A.push(v.path(c.hash,!0,{notify:null}).fail(function(){I(a.unknown,"path")}).done(function(e){I(o(e),"path")})))),!f.link&&c.read){var R,H=v.escape(c.name);if("1"==c.url)k.push(w.replace(z,a.link).replace(T,'<button class="'+i+" "+n+'-url">'+a.getlink+"</button>"));else{if(c.url)R=c.url;else if("directory"===c.mime)if(b.nullUrlDirLinkSelf&&null===c.url){var _=window.location;R=_.pathname+_.search+"#elf_"+c.hash}else""!==c.url&&v.option("url",!v.isRoot(c)&&c.phash||c.hash)&&(R=v.url(c.hash));else R=v.url(c.hash);R&&k.push(w.replace(z,a.link).replace(T,'<a href="'+R+'" target="_blank">'+H+"</a>"))}}f.dim||(c.dim?k.push(w.replace(z,a.dim).replace(T,c.dim)):c.mime.indexOf("image")!==-1&&(c.width&&c.height?k.push(w.replace(z,a.dim).replace(T,c.width+"x"+c.height)):c.size&&"0"!==c.size&&(k.push(w.replace(z,a.dim).replace(T,y.spinner.replace("{text}",a.calc).replace("{name}","dim"))),A.push(v.request({data:{cmd:"dim",target:c.hash},preventDefault:!0}).fail(function(){I(a.unknown,"dim")}).done(function(e){if(I(e.dim||a.unknown,"dim"),e.dim){var t=e.dim.split("x"),n=v.file(c.hash);n.width=t[0],n.height=t[1]}}))))),!f.modify&&k.push(w.replace(z,a.modify).replace(T,v.formatDate(c))),!f.perms&&k.push(w.replace(z,a.perms).replace(T,v.formatPermissions(c))),!f.locked&&k.push(w.replace(z,a.locked).replace(T,c.locked?a.yes:a.no)),!f.owner&&c.owner&&k.push(w.replace(z,a.owner).replace(T,c.owner)),!f.group&&c.group&&k.push(w.replace(z,a.group).replace(T,c.group)),!f.perm&&c.perm&&k.push(w.replace(z,a.perm).replace(T,v.formatFileMode(c.perm))),window.ArrayBuffer&&(v.options.cdns.sparkmd5||v.options.cdns.jssha)&&"directory"!==c.mime&&c.size>0&&(!b.showHashMaxsize||c.size<=b.showHashMaxsize)&&(P=[],e.each(v.storage("hashchekcer")||b.showHashAlgorisms,function(e,t){c[t]?k.push(w.replace(z,v.i18n(t)).replace(T,c[t]).replace("{class}",U)):(k.push(w.replace(z,v.i18n(t)).replace(T,y.spinner.replace("{text}",a.calc).replace("{name}",t))),P.push(t))}),P.length&&(m=e('<div class="elfinder-quicklook-info-progress"></div>'),A.push(v.getContentsHashes(c.hash,P,b.showHashOpts,{progressBar:m}).progress(function(t){e.each(P,function(e,n){t[n]&&I(t[n],n,U)})}).always(function(){e.each(P,function(e,t){I(a.unknown,t)})})))),b.custom&&e.each(b.custom,function(t,n){f[n.label]||n.mimes&&!e.grep(n.mimes,function(e){return c.mime===e||0===c.mime.indexOf(e+"/")}).length||n.hashRegex&&!c.hash.match(n.hashRegex)||(k.push(w.replace(z,v.i18n(n.label)).replace(T,n.tpl.replace("{id}",M))),n.action&&"function"==typeof n.action&&F.push(n.action))})}else C=C.replace("{class}","elfinder-cwd-icon-group"),d=y.groupTitle.replace("{items}",a.items).replace("{num}",x),p=e.grep(r,function(e){return"directory"==e.mime}).length,p?(u=e.grep(r,function(e){return!("directory"!==e.mime||e.phash&&!e.isroot)}).length,p-=u,k.push(w.replace(z,a.kind).replace(T,u===x||p===x?a[u?"roots":"folders"]:e.map({roots:u,folders:p,files:x-u-p},function(e,t){return e?a[t]+" "+e:null}).join(", "))),!f.size&&k.push(w.replace(z,a.size).replace(T,y.spinner.replace("{text}",a.calc).replace("{name}","size"))),O=e.map(r,function(e){return e.hash})):(s=0,e.each(r,function(e,t){var n=parseInt(t.size);n>=0&&s>=0?s+=n:s="unknown"}),k.push(w.replace(z,a.kind).replace(T,a.files)),!f.size&&k.push(w.replace(z,a.size).replace(T,v.formatSize(s))));return C=C.replace("{title}",d).replace("{content}",k.join("").replace(/{class}/g,"")),E=g.fmDialog(C,S),E.attr("id",M).one("mousedown",".elfinder-info-path",function(){e(this).html(o(e(this).html(),!0))}),P.length&&m.appendTo(E.find("."+n+"-"+P[0]).parent()),v.UA.Mobile&&e.fn.tooltip&&E.children(".ui-dialog-content .elfinder-info-title").tooltip({classes:{"ui-tooltip":"elfinder-ui-tooltip ui-widget-shadow"},tooltipClass:"elfinder-ui-tooltip ui-widget-shadow",track:!0}),c&&"1"==c.url&&E.on("click","."+n+"-url",function(){e(this).parent().html(y.spinner.replace("{text}",v.i18n("ntfurl")).replace("{name}","url")),v.request({data:{cmd:"url",target:c.hash},preventDefault:!0}).fail(function(){I(H,"url")}).done(function(e){if(e.url){I('<a href="'+e.url+'" target="_blank">'+H+"</a>"||H,"url");var t=v.file(c.hash);t.url=e.url}else I(H,"url")})}),l&&e("<img/>").on("load",function(){E.find(".elfinder-cwd-icon").addClass(l.className).css("background-image","url('"+l.url+"')")}).attr("src",l.url),O.length&&(j=v.getSize(O).done(function(e){I(e.formated,"size")}).fail(function(){I(a.unknown,"size")})),F.length&&e.each(F,function(e,t){try{t(c,v,E)}catch(n){v.debug("error",n)}}),e.Deferred().resolve()}}).prototype={forceLoad:!0},i.prototype.commands.mkdir=function(){var t,n=this.fm,i=this;this.value="",this.disableOnSearch=!0,this.updateOnSelect=!1,this.syncTitleOnChange=!0,this.mime="directory",this.prefix="untitled folder",this.exec=function(a,o){var r;return a&&a.length&&o&&o._currentType&&"navbar"===o._currentType?(this.origin=o._currentType,this.data={target:a[0]}):(r=n.cwd().hash===a[0],this.origin=t&&!r?t:"cwd",delete this.data),a||this.options.intoNewFolderToolbtn||n.getUI("cwd").trigger("unselectall"),this.move=this.value===n.i18n("cmdmkdirin"),e.proxy(n.res("mixin","make"),i)()},this.shortcuts=[{pattern:"ctrl+shift+n"}],this.init=function(){this.options.intoNewFolderToolbtn&&(this.syncTitleOnChange=!0)},n.bind("select contextmenucreate closecontextmenu",function(e){var a=(e.data?e.data.selected||e.data.targets:null)||n.selected();i.className="mkdir",t=e.data&&a.length?e.data.origin||e.data.type||"":"",i.options.intoNewFolderToolbtn||""!==t||(t="cwd"),a.length&&"navbar"!==t&&"cwd"!==t&&n.cwd().hash!==a[0]?(i.title=n.i18n("cmdmkdirin"),i.className+=" elfinder-button-icon-mkdirin"):i.title=n.i18n("cmdmkdir"),"closecontextmenu"!==e.type?i.update(void 0,i.title):requestAnimationFrame(function(){i.update(void 0,i.title)})}),this.getstate=function(i){var a=n.cwd(),o="navbar"===t||i&&i[0]!==a.hash?this.files(i||n.selected()):[],r=o.length,s=function(t){var n=!0;return e.grep(t,function(e){return n=!(!n||!e.read||e.locked)})};return"navbar"===t?r&&o[0].write&&o[0].read?0:-1:!a.write||r&&s(o).length!=r?-1:0}},i.prototype.commands.mkfile=function(){var t=this;this.disableOnSearch=!0,this.updateOnSelect=!1,this.mime="text/plain",this.prefix="untitled file.txt",this.variants=[],this.getTypeName=function(e,n){var i,a=t.fm;return i=(i=a.messages["kind"+a.kinds[e]])?a.i18n(["extentiontype",n.toUpperCase(),i]):a.i18n(["extentionfile",n.toUpperCase()])},this.fm.bind("open reload canMakeEmptyFile",function(){var n=t.fm,i=n.getCommand("edit").getMkfileHides();t.variants=[],n.mimesCanMakeEmpty&&e.each(n.mimesCanMakeEmpty,function(e,a){a&&!i[e]&&n.uploadMimeCheck(e)&&t.variants.push([e,t.getTypeName(e,a)])}),t.change()}),this.getstate=function(){return this.fm.cwd().write?0:-1},this.exec=function(n,i){var a,o,r=t.fm;if(a=r.mimesCanMakeEmpty[i]){if(r.uploadMimeCheck(i))return this.mime=i,this.prefix=r.i18n(["untitled file",a]),e.proxy(r.res("mixin","make"),t)();o=["errMkfile",t.getTypeName(i,a)]}return e.Deferred().reject(o)}},i.prototype.commands.netmount=function(){var t,n=this,i=!1;this.alwaysEnabled=!0,this.updateOnSelect=!1,this.drivers=[],this.handlers={load:function(){var t=n.fm;t.cookieEnabled&&t.one("open",function(){n.drivers=t.netDrivers,n.drivers.length&&e.each(n.drivers,function(){var e=n.options[this];e&&(i=!0,e.integrateInfo&&t.trigger("helpIntegration",Object.assign({cmd:"netmount"},e.integrateInfo)))})})}},this.getstate=function(){return i?0:-1},this.exec=function(){var i,a=n.fm,o=e.Deferred(),r=n.options,s=function(){var s,l=function(){c.protocol.trigger("change","winfocus")},c={protocol:e("<select></select>").on("change",function(e,n){var o=this.value;t.find(".elfinder-netmount-tr").hide(),t.find(".elfinder-netmount-tr-"+o).show(),i&&i.children(".ui-dialog-buttonpane:first").find("button").show(),"function"==typeof r[o].select&&r[o].select(a,e,n)}).addClass("ui-corner-all")},d={title:a.i18n("netMountDialogTitle"),resizable:!0,modal:!0,destroyOnClose:!1,open:function(){e(window).on("focus."+a.namespace,l),c.protocol.trigger("change")},close:function(){"pending"==o.state()&&o.reject(),e(window).off("focus."+a.namespace,l)},buttons:{}},p=function(){var i,s=c.protocol.val(),l={cmd:"netmount",protocol:s},d=r[s];return e.each(t.find("input.elfinder-netmount-inputs-"+s),function(t,n){var i,a;a=e(n),a.is(":radio,:checkbox")?a.is(":checked")&&(i=e.trim(a.val())):i=e.trim(a.val()),i&&(l[n.name]=i)}),l.host?(l.mnt2res&&(i=!0),a.request({data:l,notify:{type:"netmount",cnt:1,hideCnt:!0}}).done(function(e){var t;e.added&&e.added.length&&(i&&c.protocol.trigger("change","reset"),e.added[0].phash&&(t=a.file(e.added[0].phash))&&(t.dirs||(t.dirs=1,a.change({changed:[t]}))),a.one("netmountdone",function(){a.exec("open",e.added[0].hash)})),o.resolve()}).fail(function(e){d.fail&&"function"==typeof d.fail&&d.fail(a,a.parseError(e)),o.reject(e)}),void n.dialog.elfinderdialog("close")):a.trigger("error",{error:"errNetMountHostReq",opts:{modal:!0}})},u=e('<form autocomplete="off"></form>').on("keydown","input",function(t){var n,i=!0;t.keyCode===e.ui.keyCode.ENTER&&(e.each(u.find("input:visible:not(.elfinder-input-optional)"),function(){if(""===e(this).val())return i=!1,n=e(this),!1}),i?p():n.trigger("focus"))}),h=e("<div></div>");return t=e('<table class="elfinder-info-tb elfinder-netmount-tb"></table>').append(e("<tr></tr>").append(e("<td>"+a.i18n("protocol")+"</td>")).append(e("<td></td>").append(c.protocol))),e.each(n.drivers,function(n,i){r[i]&&(c.protocol.append('<option value="'+i+'">'+a.i18n(r[i].name||i)+"</option>"),e.each(r[i].inputs,function(n,o){o.attr("name",n),"hidden"!=o.attr("type")?(o.addClass("ui-corner-all elfinder-netmount-inputs-"+i),t.append(e("<tr></tr>").addClass("elfinder-netmount-tr elfinder-netmount-tr-"+i).append(e("<td>"+a.i18n(n)+"</td>")).append(e("<td></td>").append(o)))):(o.addClass("elfinder-netmount-inputs-"+i),h.append(o))}),r[i].protocol=c.protocol)}),t.append(h),t.find(".elfinder-netmount-tr").hide(),t.find(".elfinder-netmount-tr-"+n.drivers[0]).show(),d.buttons[a.i18n("btnMount")]=p,d.buttons[a.i18n("btnCancel")]=function(){n.dialog.elfinderdialog("close")},t.find("select,input").addClass("elfinder-tabstop"),s=n.fmDialog(u.append(t),d).ready(function(){c.protocol.trigger("change"),s.elfinderdialog("posInit")}),i=s.closest(".ui-dialog"),s};return n.dialog?n.dialog.elfinderdialog("open"):n.dialog=s(),o.promise()},n.fm.bind("netmount",function(e){var i=e.data||null,a=n.options,o=function(){a[i.protocol]&&"function"==typeof a[i.protocol].done&&(a[i.protocol].done(n.fm,i),t.find("select,input").addClass("elfinder-tabstop"),n.dialog.elfinderdialog("tabstopsInit"))};i&&i.protocol&&(i.mode&&"redirect"===i.mode?n.fm.request({data:{cmd:"netmount",protocol:i.protocol,host:i.host,user:"init",pass:"return",options:i.options},preventDefault:!0}).done(function(e){i=JSON.parse(e.body),o()}):o())})},i.prototype.commands.netunmount=function(){this.alwaysEnabled=!0,this.updateOnSelect=!1,this.drivers=[],this.handlers={load:function(){this.drivers=this.fm.netDrivers}},this.getstate=function(e){var t,n=this.fm;return e&&this.drivers.length&&!this._disabled&&(t=n.file(e[0]))&&t.netkey?0:-1},this.exec=function(t){var n=this,i=this.fm,a=e.Deferred().fail(function(e){e&&i.error(e)}),o=i.file(t[0]),r=function(t){var n,a=[];return i.leafRoots&&(n=[],e.each(i.leafRoots,function(a,o){var r,s=i.parents(a);(r=e.inArray(t,s))!==-1&&(r=s.length-r,e.each(o,function(e,t){n.push({i:r,hash:t})}))}),n.length&&(n.sort(function(e,t){return e.i<t.i}),e.each(n,function(e,t){a.push(t.hash)}))),a};return this._disabled?a.reject():("pending"==a.state()&&i.confirm({title:n.title,text:i.i18n("confirmUnmount",o.name),accept:{label:"btnUnmount",callback:function(){var t=o.hash,s=r(t),l=[],c=[],d=function(){e.when(l).done(function(){i.request({data:{cmd:"netmount",protocol:"netunmount",host:o.netkey,user:t,pass:"dum"},notify:{type:"netunmount",cnt:1,hideCnt:!0},preventFail:!0}).fail(function(e){a.reject(e)}).done(function(e){o.volumeid&&delete i.volumeExpires[o.volumeid],a.resolve()})}).fail(function(e){c.length&&i.remove({removed:c}),a.reject(e)})};s.length?i.confirm({title:n.title,text:function(){var t=["unmountChildren"];return e.each(s,function(e,n){t.push([i.file(n).name])}),t}(),accept:{label:"btnUnmount",callback:function(){e.each(s,function(e,t){var n=i.file(t);n.netkey&&l.push(i.request({data:{cmd:"netmount",protocol:"netunmount",host:n.netkey,user:n.hash,pass:"dum"},notify:{type:"netunmount",cnt:1,hideCnt:!0},preventDefault:!0}).done(function(e){e.removed&&(n.volumeid&&delete i.volumeExpires[n.volumeid],c=c.concat(e.removed))}))}),d()}},cancel:{label:"btnCancel",callback:function(){a.reject()}}}):(l=null,d())}},cancel:{label:"btnCancel",callback:function(){a.reject()}}}),a)}},(i.prototype.commands.open=function(){var t=this.fm,n=this;this.alwaysEnabled=!0,this.noChangeDirOnRemovedCwd=!0,this._handlers={dblclick:function(e){var i=e.data&&e.data.file?[e.data.file]:void 0;0===n.getstate(i)&&(e.preventDefault(),t.exec("open",i))},"select enable disable reload":function(e){this.update("disable"==e.type?-1:void 0)}},this.shortcuts=[{pattern:"ctrl+down numpad_enter"+("mac"!=t.OS&&" enter")}],this.getstate=function(n){var i=this.files(n),a=i.length;return 1==a?i[0].read?0:-1:a&&!t.UA.Mobile&&e.grep(i,function(e){return!("directory"==e.mime||!e.read)}).length==a?0:-1},this.exec=function(n,i){var a,o,r,s,l,c,d,p,u,h,f,m,g=e.Deferred().fail(function(e){e&&t.error(e)}),v=this.files(n),b=v.length,y="object"==typeof i&&i.thash,w=this.options,x=w.into||"window";if(!b&&!y)return g.reject();if(y||1==b&&(a=v[0])&&"directory"==a.mime)return y||!a||a.read?t.keyState.ctrlKey&&(t.keyState.shiftKey||"function"!=typeof t.options.getFileCallback)&&t.getCommand("opennew")?t.exec("opennew",[y?y:a.hash]):t.request({data:{cmd:"open",target:y||a.hash},notify:{type:"open",cnt:1,hideCnt:!0},syncOnFail:!0,lazy:!1}):g.reject(["errOpen",a.name,"errPerm"]);if(v=e.grep(v,function(e){return"directory"!=e.mime}),b!=v.length)return g.reject();var k=function(){var i,f,m,y=function(n){var p=e('<a rel="noopener">').hide().appendTo(e("body"));if(t.UA.Mobile||!h){if(u)h?p.attr("target","_blank"):p.attr("download",a.name),p.attr("href",n).get(0).click();else if(i=window.open(n),!i)return g.reject("errPopup")}else{if(m="string"==typeof w.method&&"get"===w.method.toLowerCase(),!m&&0===n.indexOf(t.options.url)&&t.customData&&Object.keys(t.customData).length&&!a.mime.match(/^(?:video|audio)/)&&(n=""),"window"===x?(s=c=Math.round(2*screen.availWidth/3),l=d=Math.round(2*screen.availHeight/3),parseInt(a.width)&&parseInt(a.height)?(s=parseInt(a.width),l=parseInt(a.height)):a.dim&&(o=a.dim.split("x"),s=parseInt(o[0]),l=parseInt(o[1])),c>=s&&d>=l?(c=s,d=l):s-c>l-d?d=Math.round(l*(c/s)):c=Math.round(s*(d/l)),r="width="+c+",height="+d,i=window.open(n,f,r+",top=50,left=50,scrollbars=yes,resizable=yes,titlebar=no")):("tabs"===x&&(f=a.hash),i=window.open("about:blank",f)),!i)return g.reject("errPopup");if(""===n){var v=document.createElement("form");v.action=t.options.url,v.method="POST",v.target=f,v.style.display="none";var b=Object.assign({},t.customData,{cmd:"file",target:a.hash,_t:a.ts||parseInt(+new Date/1e3)});e.each(b,function(e,t){var n=document.createElement("input");n.name=e,n.value=t,v.appendChild(n)}),document.body.appendChild(v),v.submit()}else"window"!==x&&(i.location=n);e(i).trigger("focus")}p.remove()};try{p=new RegExp(t.option("dispInlineRegex"),"i")}catch(k){p=!1}for(u="string"==typeof e("<a>").get(0).download,b=v.length;b--;){if(f="elf_open_window",a=v[b],!a.read)return g.reject(["errOpen",a.name,"errPerm"]);h=p&&a.mime.match(p),t.openUrl(a.hash,!h,y)}return g.resolve(n)};if(b>1)t.confirm({title:"openMulti",text:["openMultiConfirm",b+""],accept:{label:"cmdopen",callback:function(){k()}},cancel:{label:"btnCancel",callback:function(){g.reject()}},buttons:t.getCommand("zipdl")&&t.isCommandEnabled("zipdl",t.cwd().hash)?[{label:"cmddownload",callback:function(){t.exec("download",n),g.reject()}}]:[]});else{if(f=t.storage("selectAction")||w.selectAction,f&&(e.each(f.split("/"),function(){var e=this.valueOf();return("open"===e||!(m=t.getCommand(e))||!m.enabled())&&void(m=null)}),m))return t.exec(m.name);k()}return g}}).prototype={forceLoad:!0},i.prototype.commands.opendir=function(){this.alwaysEnabled=!0,this.getstate=function(){var e,t=this.fm.selected(),n=t.length;return 1!==n?-1:(e=this.fm.getUI("workzone"),e.hasClass("elfinder-search-result")?0:-1)},this.exec=function(t){var n,i=this.fm,a=e.Deferred(),o=this.files(t),r=o.length;return r&&o[0].phash?(n=o[0].phash,i.trigger("searchend",{noupdate:!0}),i.request({data:{cmd:"open",target:n},notify:{type:"open",cnt:1,hideCnt:!0},syncOnFail:!1}),a):a.reject()}},i.prototype.commands.opennew=function(){var t=this.fm;this.shortcuts=[{pattern:("function"==typeof t.options.getFileCallback?"shift+":"")+"ctrl+enter"}],this.getstate=function(e){var t=this.files(e),n=t.length;return 1===n&&"directory"===t[0].mime&&t[0].read?0:-1},this.exec=function(t){var n,i,a,o,r=e.Deferred(),s=this.files(t),l=s.length,c=this.options;return 1===l&&(n=s[0])&&"directory"===n.mime?(i=window.location,a=c.url?c.url:i.pathname,c.useOriginQuery&&(a.match(/\?/)?i.search&&(a+="&"+i.search.substr(1)):a+=i.search),a+="#elf_"+n.hash,o=window.open(a,"_blank"),setTimeout(function(){o.focus()},1e3),r.resolve()):r.reject()}},i.prototype.commands.paste=function(){this.updateOnSelect=!1,this.handlers={changeclipboard:function(){this.update()}},this.shortcuts=[{pattern:"ctrl+v shift+insert"}],this.getstate=function(e){if(this._disabled)return-1;if(e){if(Array.isArray(e)){if(1!=e.length)return-1;e=this.fm.file(e[0])}}else e=this.fm.cwd();return this.fm.clipboard().length&&"directory"==e.mime&&e.write?0:-1},this.exec=function(t,n){var i,a,o,r=this,s=r.fm,l=n||{},c=t?this.files(t)[0]:s.cwd(),d=s.clipboard(),p=d.length,u=!!p&&d[0].cut,h=l._cmd?l._cmd:u?"move":"copy",f="err"+h.charAt(0).toUpperCase()+h.substr(1),m=[],g=[],v=e.Deferred().fail(function(e){e&&s.error(e)}).always(function(){s.unlockfiles({files:e.map(d,function(e){return e.hash})})}),b=function(t){return t.length&&s._commands.duplicate?s.exec("duplicate",t):e.Deferred().resolve()},y=function(t){var n,i=e.Deferred(),a=[],o={},d=function(t,n){for(var i=[],a=t.length;a--;)e.inArray(t[a].name,n)!==-1&&i.unshift(a);return i},p=function(e){var n=a[e],o=t[n],r=e==a.length-1;o&&s.confirm({title:s.i18n(h+"Files"),text:["errExists",o.name,"restore"===h?"confirmRest":"confirmRepl"],all:!r,accept:{label:"btnYes",callback:function(n){r||n?m(t):p(++e)}},reject:{label:"btnNo",callback:function(n){var i;if(n)for(i=a.length;e<i--;)t[a[i]].remove=!0;else t[a[e]].remove=!0;r||n?m(t):p(++e)}},cancel:{label:"btnCancel",callback:function(){i.resolve()}},buttons:[{label:"btnBackup",callback:function(n){var i;if(n)for(i=a.length;e<i--;)t[a[i]].rename=!0;else t[a[e]].rename=!0;r||n?m(t):p(++e)}}]})},f=function(n){var i,r={};n&&(Array.isArray(n)?n.length&&("string"==typeof n[0]?a=d(t,n):(e.each(n,function(e,t){r[t.name]=t.hash}),a=d(t,e.map(r,function(e,t){return t})),e.each(t,function(e,t){r[t.name]&&(o[r[t.name]]=t.name)}))):(i=[],a=e.map(n,function(e){return"string"==typeof e?e:(i=i.concat(e),!1)}),i.length&&(a=a.concat(i)),a=d(t,a),o=n)),a.length?p(0):m(t)},m=function(t){var n,a,r=[],d=e.grep(t,function(e){return e.rename&&r.push(e.name),!e.remove}),p=d.length;return p?(n=e.map(d,function(e){return e.hash}),a={cmd:"paste",dst:c.hash,targets:n,cut:u?1:0,renames:r,hashes:o,suffix:s.options.backupSuffix},s.api<2.1&&(a.src=d[0].phash),void s.request({data:a,notify:{type:h,cnt:p},cancel:!0,navigate:{toast:l.noToast?{}:{inbuffer:{msg:s.i18n(["complete",s.i18n("cmd"+h)]),action:{cmd:"open",msg:"cmdopendir",data:[c.hash],done:"select",cwdNot:c.hash}}}}}).done(function(t){var n={},o=t.added&&t.added.length?t.added:null;u&&o&&(e.each(d,function(t,i){var a=i.phash,r=function(t){var n;return e.each(o,function(e,i){if(i.name===t)return n=i.hash,!1}),n},s=r(i.name);s&&(n[a]?n[a].push(s):n[a]=[s])}),Object.keys(n).length&&(t.undo={cmd:"move",callback:function(){var t=[];return e.each(n,function(e,n){t.push(s.request({data:{cmd:"paste",dst:e,targets:n,cut:1},notify:{type:"undo",cnt:n.length}}))}),e.when.apply(null,t)}},t.redo={cmd:"move",callback:function(){return s.request({data:a,notify:{type:"redo",cnt:p}})}})),i.resolve(t)}).fail(function(e){i.reject(),0===e&&s.sync()}).always(function(){s.unlockfiles({files:d})})):i.resolve();
22
- };return s.isCommandEnabled(r.name,c.hash)&&t.length?(s.oldAPI?m(t):s.option("copyOverwrite",c.hash)?(n=e.map(t,function(e){return e.name}),c.hash==s.cwd().hash?f(e.map(s.files(),function(e){return e.phash==c.hash?{hash:e.hash,name:e.name}:null})):s.request({data:{cmd:"ls",target:c.hash,intersect:n},notify:{type:"prepare",cnt:1,hideCnt:!0},preventFail:!0}).always(function(e){f(e.list)})):m(t),i):i.resolve()};return p&&c&&"directory"==c.mime?c.write?(i=s.parents(c.hash),e.each(d,function(t,n){return n.read?u&&n.locked?!v.reject(["errLocked",n.name]):e.inArray(n.hash,i)!==-1?!v.reject(["errCopyInItself",n.name]):n.mime&&"directory"!==n.mime&&!s.uploadMimeCheck(n.mime,c.hash)?!v.reject([f,n.name,"errUploadMime"]):(a=s.parents(n.hash),a.pop(),e.inArray(c.hash,a)!==-1&&e.grep(a,function(e){var t=s.file(e);return t.phash==c.hash&&t.name==n.name}).length?!v.reject(["errReplByChild",n.name]):void(n.phash==c.hash?g.push(n.hash):m.push({hash:n.hash,phash:n.phash,name:n.name}))):!v.reject([f,n.name,"errPerm"])}),"rejected"===v.state()?v:(o=e.Deferred(),u&&r.options.moveConfirm?s.confirm({title:"moveFiles",text:s.i18n("confirmMove",c.i18||c.name),accept:{label:"btnYes",callback:function(){o.resolve()}},cancel:{label:"btnCancel",callback:function(){o.reject()}}}):o.resolve(),o.done(function(){e.when(b(g),y(m)).done(function(e,t){v.resolve(t&&t.undo?t:void 0)}).fail(function(){v.reject()}).always(function(){u&&s.clipboard([])})}).fail(function(){v.reject()}),v)):v.reject([f,d[0].name,"errPerm"]):v.reject()}},i.prototype.commands.places=function(){var t=this,n=this.fm,i=function(n){var i=!0;return e.grep(t.files(n),function(e){return i=!(!i||"directory"!=e.mime)})},a=null;this.getstate=function(e){var t=this.hashes(e),n=t.length;return a&&n&&n==i(t).length?0:-1},this.exec=function(t){var n=this.files(t);return a.trigger("regist",[n]),e.Deferred().resolve()},n.one("load",function(){a=n.ui.places})},i.prototype.commands.preference=function(){var t,n,i=this,a=this.fm,o="replace",r='<li class="'+a.res("class","tabstab")+' elfinder-preference-tab-{id}"><a href="#'+a.namespace+'-preference-{id}" id="'+a.namespace+'-preference-tab-{id}" class="ui-tabs-anchor {class}">{title}</a></li>',s=e('<div class="ui-tabs ui-widget ui-widget-content ui-corner-all elfinder-preference">'),l=e('<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-top">'),c=e('<div class="elfinder-preference-tabs ui-tabs-panel ui-widget-content ui-corner-bottom"></div>'),d=(e("base").length?document.location.href.replace(/#.*$/,""):"",function(t){e("#"+a.namespace+"-preference-tab-"+t).trigger("mouseover").trigger("click"),n=t}),p=a.res("class","tabsactive"),u=function(){var u=i.options.categories||{language:["language"],theme:["theme"],toolbar:["toolbarPref"],workspace:["iconSize","columnPref","selectAction","makefileTypes","useStoredEditor","editorMaximized","useFullscreen","showHidden"],dialog:["autoFocusDialog"],selectionInfo:["infoItems","hashChecker"],reset:["clearBrowserData"],all:!0},h=i.options.prefs||["language","theme","toolbarPref","iconSize","columnPref","selectAction","makefileTypes","useStoredEditor","editorMaximized","useFullscreen","showHidden","infoItems","hashChecker","autoFocusDialog","clearBrowserData"];a.cookieEnabled||delete u.language,h=a.arrayFlip(h,!0),a.options.getFileCallback&&delete h.selectAction,a.UA.Fullscreen||delete h.useFullscreen,h.language&&(h.language=function(){var t=e("<select></select>").on("change",function(){var t=e(this).val();a.storage("lang",t),e("#"+a.id).elfinder("reload")}),n=[],o=i.options.langs||{ar:"العربية",bg:"Български",ca:"Català",cs:"Čeština",da:"Dansk",de:"Deutsch",el:"Ελληνικά",en:"English",es:"Español",fa:"فارسی",fo:"Føroyskt",fr:"Français",fr_CA:"Français (Canada)",he:"עברית",hr:"Hrvatski",hu:"Magyar",id:"Bahasa Indonesia",it:"Italiano",ja:"日本語",ko:"한국어",nl:"Nederlands",no:"Norsk",pl:"Polski",pt_BR:"Português",ro:"Română",ru:"Pусский",si:"සිංහල",sk:"Slovenčina",sl:"Slovenščina",sr:"Srpski",sv:"Svenska",tr:"Türkçe",ug_CN:"ئۇيغۇرچە",uk:"Український",vi:"Tiếng Việt",zh_CN:"简体中文",zh_TW:"正體中文"};return a.cookieEnabled?(e.each(o,function(e,t){n.push('<option value="'+e+'">'+t+"</option>")}),t.append(n.join("")).val(a.lang)):e()}()),h.theme&&(h.theme=function(){var t=a.options.themes?Object.keys(a.options.themes).length:0;if(0===t||1===t&&a.options.themes["default"])return null;var n=e("<select></select>").on("change",function(){var t=e(this).val();a.changeTheme(t).storage("theme",t)}),i={image:'<img class="elfinder-preference-theme elfinder-preference-theme-image" src="$2" />',link:'<a href="$1" target="_blank" title="$3">$2</a>',data:'<dt>$1</dt><dd><span class="elfinder-preference-theme elfinder-preference-theme-$0">$2</span></dd>'},o=["image","description","author","email","license"],r=e('<button class="ui-button ui-corner-all ui-widget elfinder-preference-theme-default"></button>').text(a.i18n("default")).on("click",function(e){n.val("default").trigger("change")}),s=e('<div class="elfinder-reference-hide-taball"></div>').on("click","button",function(){var t=e(this).data("themeid");n.val(t).trigger("change")});return a.options.themes["default"]||n.append('<option value="default">'+a.i18n("default")+"</option>"),e.each(a.options.themes,function(t,r){var l,c=e('<option class="elfinder-theme-option-'+t+'" value="'+t+'">'+a.i18n(t)+"</option>"),d=e('<fieldset class="ui-widget ui-widget-content ui-corner-all elfinder-theme-list-'+t+'"><legend>'+a.i18n(t)+'</legend><div><span class="elfinder-spinner"></span></div></fieldset>');n.append(c),s.append(d),l=setTimeout(function(){d.find("span.elfinder-spinner").replaceWith(a.i18n(["errRead",t]))},1e4),a.getTheme(t).always(function(){l&&clearTimeout(l)}).done(function(r){var s,l=e(),p=e("<dl></dl>");s=r.link?i.link.replace(/\$1/g,r.link).replace(/\$3/g,a.i18n("website")):"$2",r.name&&c.html(a.i18n(r.name)),d.children("legend").html(s.replace(/\$2/g,a.i18n(r.name)||t)),e.each(o,function(o,s){var l,c=i[s]||i.data;r[s]&&(l=c.replace(/\$0/g,a.escape(s)).replace(/\$1/g,a.i18n(s)).replace(/\$2/g,a.i18n(r[s])),"image"===s&&r.link&&(l=e(l).on("click",function(){n.val(t).trigger("change")}).attr("title",a.i18n("select"))),p.append(l))}),l=l.add(p),l=l.add(e('<div class="elfinder-preference-theme-btn"></div>').append(e('<button class="ui-button ui-corner-all ui-widget"></button>').data("themeid",t).html(a.i18n("select")))),d.find("span.elfinder-spinner").replaceWith(l)}).fail(function(){d.find("span.elfinder-spinner").replaceWith(a.i18n(["errRead",t]))})}),e("<div></div>").append(n.val(a.theme&&a.theme.id?a.theme.id:"default"),r,s)}()),h.toolbarPref&&(h.toolbarPref=function(){var t=e.map(a.options.uiOptions.toolbar,function(t){return e.isArray(t)?t:null}),n=[],i=a.storage("toolbarhides")||{};return e.each(t,function(){var e=this,t=a.i18n("cmd"+e);t==="cmd"+e&&(t=a.i18n(e)),n.push('<span class="elfinder-preference-toolbar-item"><label><input type="checkbox" value="'+e+'" '+(i[e]?"":"checked")+"/>"+t+"</label></span>")}),e(n.join(" ")).on("change","input",function(){var t=e(this).val(),n=e(this).is(":checked");n||i[t]?n&&i[t]&&delete i[t]:i[t]=!0,a.storage("toolbarhides",i),a.trigger("toolbarpref")})}()),h.iconSize&&(h.iconSize=function(){var t=a.options.uiOptions.cwd.iconsView.sizeMax||3,n=a.storage("iconsize")||a.options.uiOptions.cwd.iconsView.size||0,i=e('<div class="touch-punch"></div>').slider({classes:{"ui-slider-handle":"elfinder-tabstop"},value:n,max:t,slide:function(e,t){a.getUI("cwd").trigger("iconpref",{size:t.value})},change:function(e,t){a.storage("iconsize",t.value)}});return a.getUI("cwd").on("iconpref",function(e,t){i.slider("option","value",t.size)}),i}()),h.columnPref&&(h.columnPref=function(){var t=a.options.uiOptions.cwd.listView.columns,n=[],i=a.storage("columnhides")||{};return e.each(t,function(){var e=this,t=a.getColumnName(e);n.push('<span class="elfinder-preference-column-item"><label><input type="checkbox" value="'+e+'" '+(i[e]?"":"checked")+"/>"+t+"</label></span>")}),e(n.join(" ")).on("change","input",function(){var t=e(this).val(),n=e(this).is(":checked");n||i[t]?n&&i[t]&&delete i[t]:i[t]=!0,a.storage("columnhides",i),a.trigger("columnpref",{repaint:!0})})}()),h.selectAction&&(h.selectAction=function(){var t=e("<select></select>").on("change",function(){var t=e(this).val();a.storage("selectAction","default"===t?null:t)}),n=[],o=i.options.selectActions,r=a.getCommand("open").options.selectAction||"open";return e.inArray(r,o)===-1&&o.unshift(r),e.each(o,function(t,i){var o=e.map(i.split("/"),function(e){var t=a.i18n("cmd"+e);return t==="cmd"+e&&(t=a.i18n(e)),t});n.push('<option value="'+i+'">'+o.join("/")+"</option>")}),t.append(n.join("")).val(a.storage("selectAction")||r)}()),h.makefileTypes&&(h.makefileTypes=function(){var t=a.getCommand("edit").getMkfileHides(),n=function(){var n=[];return t=a.getCommand("edit").getMkfileHides(),e.each(a.mimesCanMakeEmpty,function(e,i){var o=a.getCommand("mkfile").getTypeName(e,i);n.push('<span class="elfinder-preference-column-item" title="'+a.escape(o)+'"><label><input type="checkbox" value="'+e+'" '+(t[e]?"":"checked")+"/>"+i+"</label></span>")}),n.join(" ")},i=e("<div></div>").on("change","input",function(){var n=e(this).val(),i=e(this).is(":checked");i||t[n]?i&&t[n]&&delete t[n]:t[n]=!0,a.storage("mkfileHides",t),a.trigger("canMakeEmptyFile")}).append(n()),o=e("<div></div>").append(e('<input type="text" placeholder="'+a.i18n("typeOfTextfile")+'"/>').on("keydown",function(t){t.keyCode===e.ui.keyCode.ENTER&&e(this).next().trigger("click")}),e('<button class="ui-button"></button>').html(a.i18n("add")).on("click",function(){var t,n=e(this).prev(),i=n.val(),o=a.getUI("toast"),r=function(){return o.appendTo(n.closest(".ui-dialog")),a.toast({msg:a.i18n("errUsupportType"),mode:"warning",onHidden:function(){1===o.children().length&&o.appendTo(a.getUI())}}),n.trigger("focus"),!1};if(!i.match(/\//)){if(i=a.arrayFlip(a.mimeTypes)[i],!i)return r();n.val(i)}return a.mimeIsText(i)&&a.mimeTypes[i]?(a.trigger("canMakeEmptyFile",{mimes:[i],unshift:!0}),t={},t[i]=a.mimeTypes[i],a.storage("mkfileTextMimes",Object.assign(t,a.storage("mkfileTextMimes")||{})),n.val(""),o.appendTo(n.closest(".ui-dialog")),void a.toast({msg:a.i18n(["complete",i+" ("+t[i]+")"]),onHidden:function(){1===o.children().length&&o.appendTo(a.getUI())}})):r()}),e('<button class="ui-button"></button>').html(a.i18n("reset")).on("click",function(){a.one("canMakeEmptyFile",{done:function(){i.empty().append(n())}}),a.trigger("canMakeEmptyFile",{resetTexts:!0})}));return a.bind("canMakeEmptyFile",{done:function(e){e.data&&e.data.mimes&&e.data.mimes.length&&i.empty().append(n())}}),e("<div></div>").append(i,o)}()),h.useStoredEditor&&(h.useStoredEditor=e('<input type="checkbox"/>').prop("checked",function(){var e=a.storage("useStoredEditor");return e?e>0:a.options.commandsOptions.edit.useStoredEditor}()).on("change",function(t){a.storage("useStoredEditor",e(this).is(":checked")?1:-1)})),h.editorMaximized&&(h.editorMaximized=e('<input type="checkbox"/>').prop("checked",function(){var e=a.storage("editorMaximized");return e?e>0:a.options.commandsOptions.edit.editorMaximized}()).on("change",function(t){a.storage("editorMaximized",e(this).is(":checked")?1:-1)})),h.useFullscreen&&(h.useFullscreen=e('<input type="checkbox"/>').prop("checked",function(){var e=a.storage("useFullscreen");return e?e>0:"screen"===a.options.commandsOptions.fullscreen.mode}()).on("change",function(t){a.storage("useFullscreen",e(this).is(":checked")?1:-1)})),h.showHidden&&!function(){var t,n=function(){var n,i=a.storage("hide"),o=[];i&&i.items&&e.each(i.items,function(e,t){o.push(a.escape(t))}),r.prop("disabled",!o.length)[o.length?"removeClass":"addClass"]("ui-state-disabled"),n=o.length?o.join("\n"):"",h.showHidden.attr("title",n),t&&h.showHidden.tooltip("option","content",n.replace(/\n/g,"<br>")).tooltip("close")},i=e('<input type="checkbox"/>').prop("checked",function(){var e=a.storage("hide");return e&&e.show}()).on("change",function(t){var n={};n[e(this).is(":checked")?"show":"hide"]=!0,a.exec("hide",void 0,n)}),o=e('<button class="ui-button ui-corner-all ui-widget"></button>').append(a.i18n("reset")).on("click",function(){a.exec("hide",void 0,{reset:!0}),e(this).parent().find("input:first").prop("checked",!1),n()}),r=e().add(i).add(o);h.showHidden=e("<div></div>").append(i,o),a.bind("hide",function(e){var t=e.data;t.opts&&(t.opts.show||t.opts.hide)||n()}),a.UA.Mobile&&e.fn.tooltip&&(t=!0,h.showHidden.tooltip({classes:{"ui-tooltip":"elfinder-ui-tooltip ui-widget-shadow"},tooltipClass:"elfinder-ui-tooltip ui-widget-shadow",track:!0}).css("user-select","none"),o.css("user-select","none")),n()}(),h.infoItems&&(h.infoItems=function(){var t=a.getCommand("info").items,n=[],i=a.storage("infohides")||a.arrayFlip(a.options.commandsOptions.info.hideItems,!0);return e.each(t,function(){var e=this,t=a.i18n(e);n.push('<span class="elfinder-preference-info-item"><label><input type="checkbox" value="'+e+'" '+(i[e]?"":"checked")+"/>"+t+"</label></span>")}),e(n.join(" ")).on("change","input",function(){var t=e(this).val(),n=e(this).is(":checked");n||i[t]?n&&i[t]&&delete i[t]:i[t]=!0,a.storage("infohides",i),a.trigger("infopref",{repaint:!0})})}()),h.hashChecker&&a.hashCheckers.length&&(h.hashChecker=function(){var t=[],n=a.arrayFlip(a.storage("hashchekcer")||a.options.commandsOptions.info.showHashAlgorisms,!0);return e.each(a.hashCheckers,function(){var e=this,i=a.i18n(e);t.push('<span class="elfinder-preference-hashchecker-item"><label><input type="checkbox" value="'+e+'" '+(n[e]?"checked":"")+"/>"+i+"</label></span>")}),e(t.join(" ")).on("change","input",function(){var t=e(this).val(),i=e(this).is(":checked");i?n[t]=!0:n[t]&&delete n[t],a.storage("hashchekcer",e.grep(a.hashCheckers,function(e){return n[e]}))})}()),h.autoFocusDialog&&(h.autoFocusDialog=e('<input type="checkbox"/>').prop("checked",function(){var e=a.storage("autoFocusDialog");return e?e>0:a.options.uiOptions.dialog.focusOnMouseOver}()).on("change",function(t){a.storage("autoFocusDialog",e(this).is(":checked")?1:-1)})),h.clearBrowserData&&(h.clearBrowserData=e("<button></button>").text(a.i18n("reset")).button().on("click",function(t){t.preventDefault(),a.storage(),e("#"+a.id).elfinder("reload")})),e.each(u,function(t,i){var s,d;i===!0?d=1:i&&(s=e(),e.each(i,function(t,n){var i,o,r,l="";(i=h[n])&&(d=2,o=a.i18n(n),r=e(i).filter('input[type="checkbox"]'),r.length||(r=e(i).find('input[type="checkbox"]')),1===r.length?(r.attr("id")||r.attr("id","elfinder-preference-"+n+"-checkbox"),o='<label for="'+r.attr("id")+'">'+o+"</label>"):r.length>1&&(l=" elfinder-preference-checkboxes"),s=s.add(e('<dt class="elfinder-preference-'+n+l+'">'+o+"</dt>")).add(e('<dd class="elfinder-preference-'+n+l+'"></dd>').append(i)))})),d&&(l.append(r[o](/\{id\}/g,t)[o](/\{title\}/,a.i18n(t))[o](/\{class\}/,n===t?"elfinder-focus":"")),2===d&&c.append(e('<div id="'+a.namespace+"-preference-"+t+'" class="elfinder-preference-content"></div>').hide().append(e("<dl></dl>").append(s))))}),l.on("click","a",function(t){var n=e(t.target),i=n.attr("href");t.preventDefault(),t.stopPropagation(),l.children().removeClass(p),n.removeClass("ui-state-hover").parent().addClass(p),i.match(/all$/)?c.addClass("elfinder-preference-taball").children().show():(c.removeClass("elfinder-preference-taball").children().hide(),e(i).show())}).on("focus blur","a",function(t){e(this).parent().toggleClass("ui-state-focus","focusin"===t.type)}).on("mouseenter mouseleave","li",function(t){e(this).toggleClass("ui-state-hover","mouseenter"===t.type)}),c.find("a,input,select,button").addClass("elfinder-tabstop"),s.append(l,c),t=i.fmDialog(s,{title:i.title,width:i.options.width||600,height:i.options.height||400,maxWidth:"window",maxHeight:"window",autoOpen:!1,destroyOnClose:!1,allowMinimize:!1,open:function(){n&&d(n),n=null},resize:function(){c.height(t.height()-l.outerHeight(!0)-(c.outerHeight(!0)-c.height())-5)}}).on("click",function(e){e.stopPropagation()}).css({overflow:"hidden"}),t.closest(".ui-dialog").css({overflow:"hidden"}).addClass("elfinder-bg-translucent"),n="all"};this.shortcuts=[{pattern:"ctrl+comma",description:this.title}],this.alwaysEnabled=!0,this.getstate=function(){return 0},this.exec=function(n,i){return!t&&u(),i&&(i.tab?d(i.tab):"cwd"===i._currentType&&d("workspace")),t.elfinderdialog("open"),e.Deferred().resolve()}},(i.prototype.commands.quicklook=function(){var t,n,i,a,o,r,s,l,c,d,p=this,u=p.fm,h=0,f=1,m=2,g=3,v=4,b=h,y=Element.update?"quicklookupdate":"update",w="elfinder-quicklook-navbar-icon",x="elfinder-quicklook-fullscreen",k="elfinder-quicklook-info-wrapper",C=function(t){e(document).trigger(e.Event("keydown",{keyCode:t,ctrlKey:!1,shiftKey:!1,altKey:!1,metaKey:!1}))},z=function(e){var t=u.getUI().offset(),n=function(){var t=e.find(".elfinder-cwd-file-wrapper");return t.length?t:e}(),i=n.offset()||{top:0,left:0};return{opacity:0,width:n.width(),height:n.height()-30,top:i.top-t.top,left:i.left-t.left}},T=function(){var i=p.options.contain||u.options.dialogContained,a=i?u.getUI():e(window),o=u.getUI().offset(),r=Math.min(t,a.width()-10),s=Math.min(n,a.height()-80);return{opacity:1,width:r,height:s,top:parseInt((a.height()-s-60)/2+(i?0:a.scrollTop()-o.top)),left:parseInt((a.width()-r)/2+(i?0:a.scrollLeft()-o.left))}},A={},j=function(e,t){var n=t||e.substr(0,e.indexOf("/")),i=A[n]?A[n]:A[n]=document.createElement(n),a=!1;try{a=i.canPlayType&&i.canPlayType(e)}catch(o){}return!(!a||""===a||"no"==a)},S=window.navigator.platform.indexOf("Win")!=-1,O=!1,I=!1,M=!1,E=null,F=e.ui.keyCode.LEFT,D=e.ui.keyCode.RIGHT,U="mousemove touchstart "+("onwheel"in document?"wheel":"onmousewheel"in document?"mousewheel":"DOMMouseScroll"),P=e('<span class="elfinder-dialog-title elfinder-quicklook-title"></span>'),q=e("<div></div>"),R=e('<div class="elfinder-quicklook-info"></div>'),H=e('<div class="ui-front elfinder-quicklook-cover"></div>'),_=e('<div class="'+w+" "+w+'-fullscreen"></div>').on("click touchstart",function(t){if(!M){var n=p.window,i=n.hasClass(x),o=e(window),r=function(){p.preview.trigger("changesize")};t.stopPropagation(),t.preventDefault(),i?(G="",L(),n.toggleClass(x).css(n.data("position")),o.trigger(p.resize).off(p.resize,r),V.off("mouseenter mouseleave"),H.off(U)):(n.toggleClass(x).data("position",{left:n.css("left"),top:n.css("top"),width:n.width(),height:n.height(),display:"block"}).removeAttr("style"),e(window).on(p.resize,r).trigger(p.resize),H.on(U,function(e){I||("mousemove"!==e.type&&"touchstart"!==e.type||(L(),E=setTimeout(function(){(u.UA.Mobile||V.parent().find(".elfinder-quicklook-navbar:hover").length<1)&&V.fadeOut("slow",function(){H.show()})},3e3)),H.is(":visible")&&(W(),H.data("tm",setTimeout(function(){H.show()},3e3))))}).show().trigger("mousemove"),V.on("mouseenter mouseleave",function(e){I||("mouseenter"===e.type?L():H.trigger("mousemove"))})),u.zIndex&&n.css("z-index",u.zIndex+1),u.UA.Mobile?V.attr("style",G):V.attr("style",G).draggable(i?"destroy":{start:function(){I=!0,M=!0,H.show(),L()},stop:function(){I=!1,G=p.navbar.attr("style"),requestAnimationFrame(function(){M=!1})}}),e(this).toggleClass(w+"-fullscreen-off");var s=n;a.is(".ui-resizable")&&(s=s.add(a)),s.resizable(i?"enable":"disable").removeClass("ui-state-disabled"),n.trigger("viewchange")}}),N=function(){p.update(void 0,function(){var t=p.fm,n=t.selectedFiles(),i=n.length,a=(p.docked(),function(){var a=0;return e.each(n,function(e,t){var n=parseInt(t.ts);a>=0?n>a&&(a=n):a="unknown"}),{hash:n[0].hash+"/"+ +new Date,name:t.i18n("items")+": "+i,mime:"group",size:J,ts:a,files:e.map(n,function(e){return e.hash}),getSize:!0}});return i||(i=1,n=[t.cwd()]),1===i?n[0]:a()}())},L=function(){p.window.hasClass(x)&&(E&&clearTimeout(E),E=null,V.stop(!0,!0).css("display","block"),W())},W=function(){H.data("tm")&&clearTimeout(H.data("tm")),H.removeData("tm"),H.hide()},B=e('<div class="'+w+" "+w+'-prev"></div>').on("click touchstart",function(e){return!M&&C(F),!1}),$=e('<div class="'+w+" "+w+'-next"></div>').on("click touchstart",function(e){return!M&&C(D),!1}),V=e('<div class="elfinder-quicklook-navbar"></div>').append(B).append(_).append($).append('<div class="elfinder-quicklook-navbar-separator"></div>').append(e('<div class="'+w+" "+w+'-close"></div>').on("click touchstart",function(e){return!M&&p.window.trigger("close"),!1})),K=e('<span class="ui-front ui-icon elfinder-icon-close ui-icon-closethick"></span>').on("mousedown",function(e){e.stopPropagation(),p.window.trigger("close")}),X=e('<span class="ui-front ui-icon elfinder-icon-minimize ui-icon-minusthick"></span>').on("mousedown",function(e){e.stopPropagation(),p.docked()?p.window.trigger("navdockout"):p.window.trigger("navdockin")}),J='<span class="elfinder-spinner-text">'+u.i18n("calc")+'</span><span class="elfinder-spinner"></span>',G="",Y=!0;this.flags={},this.cover=H,this.evUpdate=y,(this.navbar=V)._show=L,this.resize="resize."+u.namespace,this.info=e("<div></div>").addClass(k).append(q).append(R),this.autoPlay=function(){return!!p.opened()&&!!p.options[p.docked()?"dockAutoplay":"autoplay"]},this.preview=e('<div class="elfinder-quicklook-preview ui-helper-clearfix"></div>').on("change",function(){L(),V.attr("style",G),p.docked()&&V.hide(),p.preview.attr("style","").removeClass("elfinder-overflow-auto"),p.info.attr("style","").hide(),p.cover.removeClass("elfinder-quicklook-coverbg"),q.removeAttr("class").attr("style",""),R.html("")}).on(y,function(t){var n,i,a=(p.preview,t.file),r='<div class="elfinder-quicklook-info-data">{value}</div>',s=function(){var s=p.window.css("overflow","hidden");i=u.escape(a.i18||a.name),!a.read&&t.stopImmediatePropagation(),p.window.data("hash",a.hash),p.preview.off("changesize").trigger("change").children().remove(),P.html(i),B.css("visibility",""),$.css("visibility",""),a.hash===u.cwdId2Hash(o.find("[id]:not(.elfinder-cwd-parent):first").attr("id"))&&B.css("visibility","hidden"),a.hash===u.cwdId2Hash(o.find("[id]:last").attr("id"))&&$.css("visibility","hidden"),"directory"===a.mime?c=[a.hash]:"group"===a.mime&&a.getSize&&(c=a.files),R.html(r.replace(/\{value\}/,i)+r.replace(/\{value\}/,u.mime2kind(a))+r.replace(/\{value\}/,c.length?J:u.formatSize(a.size))+r.replace(/\{value\}/,u.i18n("modify")+": "+u.formatDate(a))),c.length&&(l=u.getSize(c).done(function(e){R.find("span.elfinder-spinner").parent().html(e.formated)}).fail(function(){R.find("span.elfinder-spinner").parent().html(u.i18n("unknown"))}).always(function(){l=null}),l._hash=a.hash),q.addClass("elfinder-cwd-icon ui-corner-all "+u.mime2class(a.mime)),a.icon&&q.css(u.getIconStyle(a,!0)),p.info.attr("class",k),a.csscls&&p.info.addClass(a.csscls),a.read&&(n=u.tmb(a))&&e("<img/>").hide().appendTo(p.preview).on("load",function(){q.addClass(n.className).css("background-image","url('"+n.url+"')"),e(this).remove()}).attr("src",n.url),p.info.delay(100).fadeIn(10),p.window.hasClass(x)&&H.trigger("mousemove"),s.css("overflow","")},c=[];a&&!Object.keys(a).length&&(a=u.cwd()),a&&l&&"pending"===l.state()&&l._hash!==a.hash&&l.reject(),a&&(t.forceUpdate||p.window.data("hash")!==a.hash)?s():t.stopImmediatePropagation()}),this.window=e('<div class="ui-front ui-helper-reset ui-widget elfinder-quicklook touch-punch" style="position:absolute"></div>').hide().addClass(u.UA.Touch?"elfinder-touch":"").on("click",function(e){var t=this;e.stopPropagation(),b===m&&requestAnimationFrame(function(){b===m&&u.toFront(t)})}).append(e('<div class="ui-dialog-titlebar ui-widget-header ui-corner-top ui-helper-clearfix elfinder-quicklook-titlebar"></div>').append(e('<span class="ui-widget-header ui-dialog-titlebar-close ui-corner-all elfinder-titlebar-button elfinder-quicklook-titlebar-icon'+(S?" elfinder-titlebar-button-right":"")+'"></span>').append(K,X),P),this.preview,p.info.hide(),H.hide(),V).draggable({handle:"div.elfinder-quicklook-titlebar"}).on("open",function(e,t){var n=p.window,i=p.value,a=u.getUI("cwd"),o=function(e){b=e,p.update(1,p.value),p.change(),n.trigger("resize."+u.namespace)};Y||b!==h?b===v&&(u.getUI("navdock").data("addNode")(c),o(g),p.preview.trigger("changesize"),u.storage("previewDocked","1"),0===u.getUI("navdock").width()&&n.trigger("navdockout")):(i&&i.hash!==r&&(a=u.cwdHash2Elm(i.hash.split("/",2)[0])),G="",V.attr("style",""),b=f,a.trigger("scrolltoview"),W(),n.css(t||z(a)).show().animate(T(),550,function(){o(m),L()}),u.toFront(n))}).on("close",function(e,t){var n,i=p.window,a=p.preview.trigger("change"),r=(p.value,(i.data("hash")||"").split("/",2)[0]),s=function(e,n){b=e,n&&u.toHide(i),a.children().remove(),p.update(0,p.value),i.data("hash",""),t&&t.resolve()};p.opened()&&(l&&"pending"===l.state()&&l.reject(),p.docked()?(c=u.getUI("navdock").data("removeNode")(p.window.attr("id"),"detach"),s(v),u.storage("previewDocked","2")):(b=f,i.hasClass(x)&&_.click(),r&&(n=o.find("#"+r)).length?i.animate(z(n),500,function(){a.off("changesize"),s(h,!0)}):s(h,!0)))}).on("navdockin",function(e,t){var n=p.window,a=u.getUI("navdock"),o=s||a.width(),r=t||{};Y&&(r.init=!0),b=g,i=n.attr("style"),n.toggleClass("ui-front").removeClass("ui-widget").draggable("disable").resizable("disable").removeAttr("style").css({width:"100%",height:o,boxSizing:"border-box",paddingBottom:0,zIndex:"unset"}),V.hide(),X.toggleClass("ui-icon-plusthick ui-icon-minusthick elfinder-icon-full elfinder-icon-minimize"),u.toHide(n,!0),a.data("addNode")(n,r),p.preview.trigger("changesize"),u.storage("previewDocked","1")}).on("navdockout",function(t){var n=p.window,a=u.getUI("navdock"),o=(e.Deferred(),z(p.preview));s=n.outerHeight(),a.data("removeNode")(n.attr("id"),u.getUI()),n.toggleClass("ui-front").addClass("ui-widget").draggable("enable").resizable("enable").attr("style",i),X.toggleClass("ui-icon-plusthick ui-icon-minusthick elfinder-icon-full elfinder-icon-minimize"),b=h,n.trigger("open",o),u.storage("previewDocked","0")}).on("resize."+u.namespace,function(){p.preview.trigger("changesize")}),this.alwaysEnabled=!0,this.value=null,this.handlers={select:function(e,t){d&&cancelAnimationFrame(d),e.data&&e.data.selected&&e.data.selected.length?p.opened()&&N():d=requestAnimationFrame(function(){p.opened()&&N()})},error:function(){p.window.is(":visible")&&p.window.trigger("close")},"searchshow searchhide":function(){this.opened()&&this.window.trigger("close")},navbarshow:function(){requestAnimationFrame(function(){p.docked()&&p.preview.trigger("changesize")})},destroy:function(){p.window.remove()}},this.shortcuts=[{pattern:"space"}],this.support={audio:{ogg:j("audio/ogg;"),webm:j("audio/webm;"),mp3:j("audio/mpeg;"),wav:j("audio/wav;"),m4a:j("audio/mp4;")||j("audio/x-m4a;")||j("audio/aac;"),flac:j("audio/flac;"),amr:j("audio/amr;")},video:{ogg:j("video/ogg;"),webm:j("video/webm;"),mp4:j("video/mp4;"),mkv:j("video/x-matroska;")||j("video/webm;"),"3gp":j("video/3gpp;")||j("video/mp4;"),m3u8:j("application/x-mpegURL","video")||j("application/vnd.apple.mpegURL","video"),mpd:j("application/dash+xml","video")}},A={},this.closed=function(){return b==h||b==v},this.opened=function(){return b==m||b==g},this.docked=function(){return b==g},this.addIntegration=function(e){requestAnimationFrame(function(){u.trigger("helpIntegration",Object.assign({cmd:"quicklook"},e))})},this.init=function(){var i,l=this.options,c=this.window,d=this.preview;t=l.width>0?parseInt(l.width):450,n=l.height>0?parseInt(l.height):300,"auto"!==l.dockHeight&&(s=parseInt(l.dockHeight),s||(s=void 0)),u.one("load",function(){O=u.getUI("navdock").data("dockEnabled"),!O&&X.hide(),a=u.getUI(),o=u.getUI("cwd"),u.zIndex&&c.css("z-index",u.zIndex+1),c.appendTo(a),e(document).on("keydown."+u.namespace,function(t){t.keyCode==e.ui.keyCode.ESCAPE&&p.opened()&&!p.docked()&&c.hasClass("elfinder-frontmost")&&c.trigger("close")}),c.resizable({handles:"se",minWidth:350,minHeight:120,resize:function(){d.trigger("changesize")}}),p.change(function(){p.opened()&&p.value&&(p.value.tmb&&1==p.value.tmb&&(p.value=Object.assign({},u.file(p.value.hash))),d.trigger(e.Event(y,{file:p.value})))}),d.on(y,function(e){var t,n,a;if(t=e.file){if(n=t.hash,a=u.searchStatus.mixed&&u.searchStatus.state>1,"directory"!==t.mime)if(parseInt(t.size)||t.mime.match(l.mimeRegexNotEmptyCheck)){if(p.dispInlineRegex=i,a||u.optionsByHashes[n])try{p.dispInlineRegex=new RegExp(u.option("dispInlineRegex",n),"i")}catch(e){try{p.dispInlineRegex=new RegExp(u.isRoot(t)?u.options.dispInlineRegex:u.option("dispInlineRegex",t.phash),"i")}catch(e){p.dispInlineRegex=/^$/}}}else e.stopImmediatePropagation();else p.dispInlineRegex=/^$/;p.info.show()}else e.stopImmediatePropagation()}),e.each(u.commands.quicklook.plugins||[],function(e,t){"function"==typeof t&&new t(p)})}).one("open",function(){var e,t=Number(u.storage("previewDocked")||l.docked);O&&t>=1&&(e=p.window,p.exec(),e.trigger("navdockin",{init:!0}),2===t?e.trigger("close"):(p.update(void 0,u.cwd()),p.change())),Y=!1}).bind("open",function(){r=u.cwd().hash,p.value=u.cwd();try{i=new RegExp(u.option("dispInlineRegex"),"i")}catch(e){i=/^$/}}).bind("change",function(t){t.data&&t.data.changed&&p.opened()&&e.each(t.data.changed,function(){if(p.window.data("hash")===this.hash)return p.window.data("hash",null),p.preview.trigger(y),!1})}).bind("navdockresizestart navdockresizestop",function(e){H["navdockresizestart"===e.type?"show":"hide"]()})},this.getstate=function(){return p.opened()?1:0},this.exec=function(){return p.closed()&&N(),p.enabled()&&p.window.trigger(p.opened()?"close":"open"),e.Deferred().resolve()},this.hideinfo=function(){this.info.stop(!0,!0).hide()}}).prototype={forceLoad:!0},i.prototype.commands.quicklook.plugins=[function(t){var n,i,a=["image/jpeg","image/png","image/gif","image/svg+xml","image/x-ms-bmp"],o=t.fm.returnBytes(t.options.getDimThreshold||0),r=t.preview;n=new Image,n.onload=n.onerror=function(){2==n.height&&a.push("image/webp")},n.src="data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA",e.each(navigator.mimeTypes,function(t,n){var i=n.type;0===i.indexOf("image/")&&e.inArray(i,a)&&a.push(i)}),r.on(t.evUpdate,function(n){var s,l,c,d,p=t.fm,u=n.file,h=!1,f=null,m=function(e){var t=p.file(u.hash);t.width=e[0],t.height=e[1]},g=function(){var e,t,n,i,a;f&&f.state&&"pending"===f.state()&&f.reject(),h||(h=!0,e=s.get(0),t=u.width&&u.height?{w:u.width,h:u.height}:e.naturalWidth?null:{w:s.width(),h:s.height()},t&&s.removeAttr("width").removeAttr("height"),n=u.width||e.naturalWidth||e.width||s.width(),i=u.height||e.naturalHeight||e.height||s.height(),u.width&&u.height||m([n,i]),t&&s.width(t.w).height(t.h),a=(n/i).toFixed(2),r.on("changesize",function(){var e,t,n=parseInt(r.width()),i=parseInt(r.height());a<(n/i).toFixed(2)?(t=i,e=Math.floor(t*a)):(e=n,t=Math.floor(e/a)),s.width(e).height(t).css("margin-top",t<i?Math.floor((i-t)/2):0)}).trigger("changesize"),s.fadeIn(100))},v=function(){l.remove(),t.hideinfo()};i||(i=p.arrayFlip(a)),i[u.mime]&&t.dispInlineRegex.test(u.mime)&&(n.stopImmediatePropagation(),l=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+p.i18n("nowLoading")+'</span><span class="elfinder-spinner"></span></div>').appendTo(t.info.find(".elfinder-quicklook-info")),c=e('<div class="elfinder-quicklook-info-progress"></div>').appendTo(l),s=e("<img/>").hide().appendTo(r).on("load",function(){v(),g()}).on("error",function(){l.remove()}),d=p.openUrl(u.hash,!1,function(e){s.attr("src",e)},{progressBar:c}),r.one("change",function(){d&&d.state&&"pending"===d.state()&&d.reject()}),u.width&&u.height?g():u.size>o&&(f=p.request({data:{cmd:"dim",target:u.hash},preventDefault:!0}).done(function(e){if(e.dim){var t=e.dim.split("x");u.width=t[0],u.height=t[1],m(t),g()}})))})},function(t){var n=t.fm,i="image/tiff",a=t.preview;window.Worker&&window.Uint8Array&&a.on(t.evUpdate,function(o){var r,s,l,c,d,p=o.file,u=function(e){c&&c.terminate(),r.remove(),n.debug("error",e)},h=function(e){var t=n.file(p.hash);t.width=e[0],t.height=e[1]};p.mime===i&&(o.stopImmediatePropagation(),r=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+n.i18n("nowLoading")+'</span><span class="elfinder-spinner"></span></div>').appendTo(t.info.find(".elfinder-quicklook-info")),
23
- s=e('<div class="elfinder-quicklook-info-progress"></div>').appendTo(r),a.one("change",function(){c&&c.terminate(),r.remove()}),d=n.getContents(p.hash,"arraybuffer",{progressBar:s}).done(function(i){if(i){l=e("<div></div>").css({width:"100%",height:"100%"}).hide().appendTo(a);try{c=n.getWorker(),c.onmessage=function(n){var i,o,s,d,u=n.data;c&&c.terminate(),i=document.createElement("canvas"),o=i.getContext("2d"),i.width=u.width,i.height=u.height,s=o.createImageData(u.width,u.height),s.data.set(new Uint8Array(u.image)),o.putImageData(s,0,0),l.append(i).show(),r.remove(),d=(u.width/u.height).toFixed(2),a.on("changesize",function(){var t,n,o=parseInt(a.width()),r=parseInt(a.height());d<(o/r).toFixed(2)?(n=r,t=Math.floor(n*d)):(t=o,n=Math.floor(t/d)),e(i).width(t).height(n).css("margin-top",n<r?Math.floor((r-n)/2):0)}).trigger("changesize"),p.width&&p.height||h([u.width,u.height]),t.hideinfo()},c.onerror=u,c.postMessage({scripts:[n.options.cdns.tiff,n.getWorkerUrl("quicklook.tiff.js")],data:{data:i}})}catch(o){u(o)}}else u()}),a.one("change",function(){d&&d.state&&"pending"===d.state()&&d.reject()}))})},function(t){var n,i=t.fm,a=i.arrayFlip(["image/vnd.adobe.photoshop","image/x-photoshop"]),o=t.preview,r=function(e,a,r){try{i.replaceXhrSend(),n.fromURL(e).then(function(e){var n;a.attr("src",e.image.toBase64()),requestAnimationFrame(function(){n=(a.width()/a.height()).toFixed(2),o.on("changesize",function(){var e,t,i=parseInt(o.width()),r=parseInt(o.height());n<(i/r).toFixed(2)?(t=r,e=Math.floor(t*n)):(e=i,t=Math.floor(e/n)),a.width(e).height(t).css("margin-top",t<r?Math.floor((r-t)/2):0)}).trigger("changesize"),r.remove(),t.hideinfo(),a.fadeIn(100)})},function(){r.remove(),a.remove()}),i.restoreXhrSend()}catch(s){i.restoreXhrSend(),r.remove(),a.remove()}};o.on(t.evUpdate,function(s){var l,c,d,p,u,h,f=s.file;a[f.mime]&&i.options.cdns.psd&&!i.UA.ltIE10&&t.dispInlineRegex.test(f.mime)&&(s.stopImmediatePropagation(),c=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+i.i18n("nowLoading")+'</span><span class="elfinder-spinner"></span></div>').appendTo(t.info.find(".elfinder-quicklook-info")),d=e('<div class="elfinder-quicklook-info-progress"></div>').appendTo(c),h=i.openUrl(f.hash,"sameorigin",function(t){t&&(l=e("<img/>").hide().appendTo(o),n?r(t,l,c):(p=window.define,u=window.require,window.require=null,window.define=null,i.loadScript([i.options.cdns.psd],function(){n=require("psd"),p?window.define=p:delete window.define,u?window.require=u:delete window.require,r(t,l,c)})))},{progressBar:d}),o.one("change",function(){h&&h.state&&"pending"===h.state()&&h.reject()}))})},function(t){var n=t.fm,i=n.arrayFlip(["text/html","application/xhtml+xml"]),a=t.preview;a.on(t.evUpdate,function(o){var r,s,l,c=o.file;i[c.mime]&&t.dispInlineRegex.test(c.mime)&&(!t.options.getSizeMax||c.size<=t.options.getSizeMax)&&(o.stopImmediatePropagation(),s=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+n.i18n("nowLoading")+'</span><span class="elfinder-spinner"></span></div>').appendTo(t.info.find(".elfinder-quicklook-info")),l=e('<div class="elfinder-quicklook-info-progress"></div>').appendTo(s),a.one("change",function(){"pending"==r.state()&&r.reject()}).addClass("elfinder-overflow-auto"),r=n.request({data:{cmd:"get",target:c.hash,conv:1,_t:c.ts},options:{type:"get",cache:!0},preventDefault:!0,progressBar:l}).done(function(n){t.hideinfo();var i=e('<iframe class="elfinder-quicklook-preview-html"></iframe>').appendTo(a)[0].contentWindow.document;i.open(),i.write(n.content),i.close()}).always(function(){s.remove()}))})},function(t){var n=t.fm,i=n.arrayFlip(["text/x-markdown"]),a=t.preview,o=null,r=function(n,i){t.hideinfo();var r=e('<iframe class="elfinder-quicklook-preview-html"></iframe>').appendTo(a)[0].contentWindow.document;r.open(),r.write((o.parse||o)(n.content)),r.close(),i.remove()},s=function(e){o=!1,e.remove()};a.on(t.evUpdate,function(l){var c,d,p,u=l.file;i[u.mime]&&n.options.cdns.marked&&o!==!1&&t.dispInlineRegex.test(u.mime)&&(!t.options.getSizeMax||u.size<=t.options.getSizeMax)&&(l.stopImmediatePropagation(),d=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+n.i18n("nowLoading")+'</span><span class="elfinder-spinner"></span></div>').appendTo(t.info.find(".elfinder-quicklook-info")),p=e('<div class="elfinder-quicklook-info-progress"></div>').appendTo(d),a.one("change",function(){"pending"==c.state()&&c.reject()}).addClass("elfinder-overflow-auto"),c=n.request({data:{cmd:"get",target:u.hash,conv:1,_t:u.ts},options:{type:"get",cache:!0},preventDefault:!0,progressBar:p}).done(function(e){o||window.marked?(o||(o=window.marked),r(e,d)):n.loadScript([n.options.cdns.marked],function(t){o=t||window.marked||!1,delete window.marked,o?r(e,d):s(d)},{tryRequire:!0,error:function(){s(d)}})}).fail(function(){s(d)}))})},function(t){if(t.options.viewerjs){var n=t.fm,i=t.preview,a=t.options.viewerjs,o=a.url?n.arrayFlip(a.mimes||[]):[],r=t.window,s=t.navbar,l=function(){s.css("bottom",r.hasClass("elfinder-quicklook-fullscreen")?"30px":"")};a.url&&i.on("update",function(s){var c,d,p,u,h=s.file;!o[h.mime]||"application/pdf"===h.mime&&a.pdfNative&&t.flags.pdfNative||(s.stopImmediatePropagation(),d=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+n.i18n("nowLoading")+'</span><span class="elfinder-spinner"></span></div>').appendTo(t.info.find(".elfinder-quicklook-info")),p=e('<div class="elfinder-quicklook-info-progress"></div>').appendTo(d),u=n.openUrl(h.hash,"sameorigin",function(n){n&&(c=e('<iframe class="elfinder-quicklook-preview-iframe"></iframe>').css("background-color","transparent").on("load",function(){t.hideinfo(),d.remove(),c.css("background-color","#fff")}).on("error",function(){d.remove(),c.remove()}).appendTo(i).attr("src",a.url+"#"+n),r.on("viewchange.viewerjs",l),l(),i.one("change",function(){r.off("viewchange.viewerjs"),d.remove(),c.off("load").remove()}))},{progressBar:p}),i.one("change",function(){u&&u.state&&"pending"===u.state()&&u.reject()}))})}},function(t){var n=t.fm,i="application/pdf",a=t.preview,o=!1,r="";n.UA.Safari&&"mac"===n.OS&&!n.UA.iOS||n.UA.IE||n.UA.Firefox?o=!0:e.each(navigator.plugins,function(t,n){e.each(n,function(e,t){if(t.type===i)return!(o=!0)})}),t.flags.pdfNative=o,o&&("undefined"==typeof t.options.pdfToolbar||t.options.pdfToolbar||(r="#toolbar=0"),a.on(t.evUpdate,function(s){var l,c=s.file;o&&c.mime===i&&t.dispInlineRegex.test(c.mime)&&(s.stopImmediatePropagation(),l=n.openUrl(c.hash,!1,function(i){i&&(t.hideinfo(),t.cover.addClass("elfinder-quicklook-coverbg"),e('<object class="elfinder-quicklook-preview-pdf" data="'+i+r+'" type="application/pdf" ></object>').on("error",function(e){o=!1,t.update(void 0,n.cwd()),t.update(void 0,c)}).appendTo(a))}),a.one("change",function(){l&&l.state&&"pending"===l.state()&&l.reject()}))}))},function(t){var n=t.fm,i="application/x-shockwave-flash",a=t.preview,o=!1;e.each(navigator.plugins,function(t,n){e.each(n,function(e,t){if(t.type===i)return!(o=!0)})}),o&&a.on(t.evUpdate,function(o){var r,s,l=o.file;l.mime===i&&t.dispInlineRegex.test(l.mime)&&(o.stopImmediatePropagation(),s=n.openUrl(l.hash,!1,function(n){n&&(t.hideinfo(),r=e('<embed class="elfinder-quicklook-preview-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="'+n+'" quality="high" type="application/x-shockwave-flash" wmode="transparent" />').appendTo(a))}),a.one("change",function(){s&&s.state&&"pending"===s.state()&&s.reject()}))})},function(t){var n,i,a,o,r,s,l=t.fm,c=t.preview,d={"audio/mpeg":"mp3","audio/mpeg3":"mp3","audio/mp3":"mp3","audio/x-mpeg3":"mp3","audio/x-mp3":"mp3","audio/x-wav":"wav","audio/wav":"wav","audio/x-m4a":"m4a","audio/aac":"m4a","audio/mp4":"m4a","audio/x-mp4":"m4a","audio/ogg":"ogg","audio/webm":"webm","audio/flac":"flac","audio/x-flac":"flac","audio/amr":"amr"},p=t.window,u=t.navbar,h="string"==typeof t.options.mediaControlsList&&t.options.mediaControlsList?' controlsList="'+l.escape(t.options.mediaControlsList)+'"':"",f=function(){u.css("bottom",p.hasClass("elfinder-quicklook-fullscreen")?"50px":"")},m=function(t,i){return e('<audio class="elfinder-quicklook-preview-audio ui-front" controls'+h+' preload="auto" autobuffer><source src="'+t+'" ></source></audio>').on("change",function(e){e.stopPropagation()}).on("error",function(e){n&&n.data("hash")===i&&b()}).data("hash",i).appendTo(c)},g=function(t){var n,i=e.Deferred(),o=e.Deferred().done(function(){var e;e=l.getContents(t,"arraybuffer",{progressBar:s}).done(function(e){try{var t=a.toWAV(new Uint8Array(e));t?i.resolve(URL.createObjectURL(new Blob([t],{type:"audio/x-wav"}))):i.reject()}catch(n){i.reject()}}).fail(function(){i.reject()}),c.one("change",function(){e&&e.state&&"pending"===e.state()&&e.reject()})}).fail(function(){a=!1,i.reject()});return window.TextEncoder&&window.URL&&URL.createObjectURL&&"undefined"==typeof a?(n=window.AMR,delete window.AMR,l.loadScript([l.options.cdns.amr],function(){a=!!window.AMR&&window.AMR,window.AMR=n,o[a?"resolve":"reject"]()},{error:function(){o.reject()}})):o[a?"resolve":"reject"](),i},v=function(e){var t,i=n.data("hash");o&&(t=e.play()),t&&t["catch"]&&t["catch"](function(t){e.paused||n&&n.data("hash")===i&&b()})},b=function(){if(n&&n.parent().length){var e=n[0],t=n.children("source").attr("src");p.off("viewchange.audio");try{e.pause(),n.empty(),t.match(/^blob:/)&&URL.revokeObjectURL(t),e.src="",e.load()}catch(i){}n.remove(),n=null}};c.on(t.evUpdate,function(u){var h,b,y=u.file,w=d[y.mime];d[y.mime]&&t.dispInlineRegex.test(y.mime)&&((h=t.support.audio[w])||"amr"===w)&&(o=t.autoPlay(),i=y.hash,h?(u.stopImmediatePropagation(),r=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+l.i18n("nowLoading")+'</span><span class="elfinder-spinner"></span></div>').appendTo(t.info.find(".elfinder-quicklook-info")),s=e('<div class="elfinder-quicklook-info-progress"></div>').appendTo(r),b=l.openUrl(i,!1,function(e){r.remove(),e?(n=m(e,i),v(n[0]),p.on("viewchange.audio",f),f()):n.remove()},{progressBar:s}),c.one("change",function(){b&&b.state&&"pending"===b.state()&&b.reject()})):l.options.cdns.amr&&"amr"===w&&a!==!1&&(u.stopImmediatePropagation(),r=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+l.i18n("nowLoading")+'</span><span class="elfinder-spinner"></span></div>').appendTo(t.info.find(".elfinder-quicklook-info")),s=e('<div class="elfinder-quicklook-info-progress"></div>').appendTo(r),n=m("",i),g(y.hash).done(function(e){if(r.remove(),i===y.hash){var t=n[0];try{n.children("source").attr("src",e),t.pause(),t.load(),v(t),p.on("viewchange.audio",f),f()}catch(a){URL.revokeObjectURL(e),n.remove()}}else URL.revokeObjectURL(e)}).fail(function(){n.remove()})))}).one("change",b)},function(t){var n,i,a,o,r,s,l,c,d,p,u=t.fm,h=t.preview,f={"video/mp4":"mp4","video/x-m4v":"mp4","video/quicktime":"mp4","video/mpeg":"mpeg","video/ogg":"ogg","application/ogg":"ogg","video/webm":"webm","video/x-matroska":"mkv","video/3gpp":"3gp","application/vnd.apple.mpegurl":"m3u8","application/x-mpegurl":"m3u8","application/dash+xml":"mpd","video/x-flv":"flv","video/x-msvideo":"avi"},m=t.window,g=t.navbar,v="string"==typeof t.options.mediaControlsList&&t.options.mediaControlsList?' controlsList="'+u.escape(t.options.mediaControlsList)+'"':"",b=function(){u.UA.iOS?m.hasClass("elfinder-quicklook-fullscreen")?(h.css("height","-webkit-calc(100% - 50px)"),g._show()):h.css("height",""):g.css("bottom",m.hasClass("elfinder-quicklook-fullscreen")?"50px":"")},y=function(i,a){var r,s=function(e){l>1&&(c&&clearTimeout(c),c=setTimeout(function(){!r&&T(!0)},800))},l=0;o=null,a=a||{},t.hideinfo(),n=e('<video class="elfinder-quicklook-preview-video" controls'+v+' preload="auto" autobuffer playsinline></video>').on("change",function(e){e.stopPropagation()}).on("timeupdate progress",s).on("canplay",function(){r=!0}).data("hash",i.hash),n[0].addEventListener("error",function(e){a.src&&u.convAbsUrl(a.src)===u.convAbsUrl(e.target.src)&&(++l,s())},!0),a.src&&n.append('<source src="'+a.src+'" type="'+i.mime+'"></source><source src="'+a.src+'"></source>'),n.appendTo(h),m.on("viewchange.video",b),b()},w=function(e){var t,a;a=u.openUrl(e.hash,!1,function(a){d.remove(),a&&(y(e),t=new i,t.loadSource(a),t.attachMedia(n[0]),l&&t.on(i.Events.MANIFEST_PARSED,function(){z(n[0])}))},{progressBar:p}),h.one("change",function(){a&&a.state&&"pending"===a.state()&&a.reject()})},x=function(e){var t;t=u.openUrl(e.hash,!1,function(t){var i;d.remove(),t&&(y(e),o=window.dashjs.MediaPlayer().create(),i=o.getDebug(),i.setLogLevel?i.setLogLevel(dashjs.Debug.LOG_LEVEL_FATAL):i.setLogToBrowserConsole&&i.setLogToBrowserConsole(!1),o.initialize(n[0],t,l),o.on("error",function(e){T(!0)}))},{progressBar:p}),h.one("change",function(){t&&t.state&&"pending"===t.state()&&t.reject()})},k=function(e){var t;return r.isSupported()?(t=u.openUrl(e.hash,!1,function(t){if(d.remove(),t){var i=r.createPlayer({type:"flv",url:t});y(e),i.on(r.Events.ERROR,function(){i.destroy(),T(!0)}),i.attachMediaElement(n[0]),i.load(),z(i)}},{progressBar:p}),void h.one("change",function(){t&&t.state&&"pending"===t.state()&&t.reject()})):void(r=!1)},C=function(e){var t;t=u.openUrl(e.hash,!1,function(t){d.remove(),t&&(y(e),n[0].src=t,s(n[0],{src:t}))},{progressBar:p}),h.one("change",function(){t&&t.state&&"pending"===t.state()&&t.reject()})},z=function(e){var t,i=n.data("hash");l&&(t=e.play()),t&&t["catch"]&&t["catch"](function(t){e.paused||n&&n.data("hash")===i&&T(!0)})},T=function(e){if(c&&clearTimeout(c),n&&n.parent().length){var i=n[0];m.off("viewchange.video"),o&&o.reset();try{i.pause(),n.empty(),i.src="",i.load()}catch(a){}n.remove(),n=null}e&&t.info.show()};h.on(t.evUpdate,function(o){var c,m,g=o.file,v=g.mime.toLowerCase(),b=f[v];f[v]&&t.dispInlineRegex.test(g.mime)&&(l=t.autoPlay(),d=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+u.i18n("nowLoading")+'</span><span class="elfinder-spinner"></span></div>'),p=e('<div class="elfinder-quicklook-info-progress"></div>').appendTo(d),t.support.video[b]&&("m3u8"!==b||u.UA.Safari)?(o.stopImmediatePropagation(),d.appendTo(t.info.find(".elfinder-quicklook-info")),m=u.openUrl(g.hash,!1,function(e){d.remove(),e&&(y(g,{src:e}),z(n[0]))},{progressBar:p}),h.one("change",function(){m&&m.state&&"pending"===m.state()&&m.reject()})):i!==!1&&u.options.cdns.hls&&"m3u8"===b?(o.stopImmediatePropagation(),d.appendTo(t.info.find(".elfinder-quicklook-info")),i?w(g):(c=window.Hls,delete window.Hls,u.loadScript([u.options.cdns.hls],function(e){i=e||window.Hls||!1,window.Hls=c,i&&w(g)},{tryRequire:!0,error:function(){i=!1}}))):a!==!1&&u.options.cdns.dash&&"mpd"===b?(o.stopImmediatePropagation(),d.appendTo(t.info.find(".elfinder-quicklook-info")),a?x(g):u.loadScript([u.options.cdns.dash],function(){a=!!window.dashjs,a&&x(g)},{tryRequire:!0,error:function(){a=!1}})):r!==!1&&u.options.cdns.flv&&"flv"===b?(o.stopImmediatePropagation(),d.appendTo(t.info.find(".elfinder-quicklook-info")),r?k(g):(c=window.flvjs,delete window.flvjs,u.loadScript([u.options.cdns.flv],function(e){r=e||window.flvjs||!1,window.flvjs=c,r&&k(g)},{tryRequire:!0,error:function(){r=!1}}))):u.options.cdns.videojs&&(o.stopImmediatePropagation(),d.appendTo(t.info.find(".elfinder-quicklook-info")),s?C(g):u.loadScript([u.options.cdns.videojs+"/video.min.js"],function(e){s=e||window.videojs||!1,s&&C(g)},{tryRequire:!0,error:function(){s=!1}}).loadCss([u.options.cdns.videojs+"/video-js.min.css"])))}).one("change",T)},function(t){var n,i=t.preview,a=[],o=t.window,r=t.navbar;e.each(navigator.plugins,function(t,n){e.each(n,function(e,t){(0===t.type.indexOf("audio/")||0===t.type.indexOf("video/"))&&a.push(t.type)})}),a=t.fm.arrayFlip(a),i.on(t.evUpdate,function(s){var l,c,d,p,u=s.file,h=u.mime,f=function(){r.css("bottom",o.hasClass("elfinder-quicklook-fullscreen")?"50px":"")};a[u.mime]&&t.dispInlineRegex.test(u.mime)&&(s.stopImmediatePropagation(),d=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+fm.i18n("nowLoading")+'</span><span class="elfinder-spinner"></span></div>').appendTo(t.info.find(".elfinder-quicklook-info")),p=e('<div class="elfinder-quicklook-info-progress"></div>').appendTo(d),c=t.fm.openUrl(u.hash,!1,function(a){d.remove(),a&&((l=0===h.indexOf("video/"))&&t.hideinfo(),n=e('<embed src="'+a+'" type="'+h+'" class="elfinder-quicklook-preview-'+(l?"video":"audio")+'"/>').appendTo(i),o.on("viewchange.embed",f),f())},{progressBar:p}),i.one("change",function(){c&&c.state&&"pending"===c.state()&&c.reject()}))}).one("change",function(){n&&n.parent().length&&(o.off("viewchange.embed"),n.remove(),n=null)})},function(t){var n=t.fm,i=n.arrayFlip(["application/zip","application/x-gzip","application/x-tar","application/x-bzip2"]),a=t.preview,o=n.returnBytes(t.options.unzipMaxSize||0),r=!(!n.options.cdns.zlibUnzip||!n.options.cdns.zlibGunzip),s=!!n.options.cdns.bzip2;window.Worker&&window.Uint8Array&&window.DataView&&a.on(t.evUpdate,function(l){var c=l.file,d="application/x-tar"===c.mime,p="application/x-bzip2"===c.mime,u="application/zip"===c.mime||"application/x-gzip"===c.mime;if(i[c.mime]&&(!o||c.size<=o)&&(d||p&&s||u&&r)){var h,f,m,g,v=function(){h=n.getContents(c.hash,"arraybuffer",{progressBar:g}).fail(function(){m.remove()}).done(function(e){var t=function(e){f&&f.terminate(),m.remove(),u?r=!1:p&&(s=!1),n.debug("error",e)};try{f=n.getWorker(),f.onmessage=function(e){f&&f.terminate(),m.remove(),!e.data||e.data.error?new Error(e.data&&e.data.error?e.data.error:""):b(e.data.files)},f.onerror=t,"application/x-tar"===c.mime?f.postMessage({scripts:[n.getWorkerUrl("quicklook.unzip.js")],data:{type:"tar",bin:e}}):"application/zip"===c.mime?f.postMessage({scripts:[n.options.cdns.zlibUnzip,n.getWorkerUrl("quicklook.unzip.js")],data:{type:"zip",bin:e}}):"application/x-gzip"===c.mime?f.postMessage({scripts:[n.options.cdns.zlibGunzip,n.getWorkerUrl("quicklook.unzip.js")],data:{type:"gzip",bin:e}}):"application/x-bzip2"===c.mime&&f.postMessage({scripts:[n.options.cdns.bzip2,n.getWorkerUrl("quicklook.unzip.js")],data:{type:"bzip2",bin:e}})}catch(i){t(i)}})},b=function(i){var o,r,s,l=0;i&&i.length&&(i=e.map(i,function(e){return n.decodeRawString(e)}),i.sort(),r=n.escape(i.join("\n").replace(/\{formatSize\((\d+)\)\}/g,function(e,t){return l+=parseInt(t),n.formatSize(t)})),o="<strong>"+n.escape(c.mime)+"</strong> ("+n.formatSize(c.size)+" / "+n.formatSize(l)+")<hr/>",s=e('<div class="elfinder-quicklook-preview-archive-wrapper">'+o+'<pre class="elfinder-quicklook-preview-text">'+r+"</pre></div>").on("touchstart",function(t){e(this)["scroll"+("ltr"===n.direction?"Right":"Left")]()>5&&(t.originalEvent._preventSwipeX=!0)}).appendTo(a),t.hideinfo()),m.remove()};l.stopImmediatePropagation(),m=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+n.i18n("nowLoading")+'</span><span class="elfinder-spinner"></span></div>').appendTo(t.info.find(".elfinder-quicklook-info")),g=e('<div class="elfinder-quicklook-info-progress"></div>').appendTo(m),a.one("change",function(){"pending"===h.state()&&h.reject(),f&&f.terminate(),m.remove()}),v()}})},function(t){var n,i=t.fm,a=i.arrayFlip(["application/x-rar"]),o=t.preview;window.DataView&&o.on(t.evUpdate,function(r){var s=r.file;if(a[s.mime]&&i.options.cdns.rar&&n!==!1){var l,c,d,p,u,h,f=function(a){if(p)return void l.remove();try{d=n({file:a,type:2,xhrHeaders:i.customHeaders,xhrFields:i.xhrFields},function(n){l.remove();var a,r,c=[];return p||n?void(n&&i.debug("error",n)):(e.each(d.entries,function(){c.push(this.path+(this.size?" ("+i.formatSize(this.size)+")":""))}),void(c.length&&(c=e.map(c,function(e){return i.decodeRawString(e)}),c.sort(),a="<strong>"+i.escape(s.mime)+"</strong> ("+i.formatSize(s.size)+")<hr/>",r=e('<div class="elfinder-quicklook-preview-archive-wrapper">'+a+'<pre class="elfinder-quicklook-preview-text">'+i.escape(c.join("\n"))+"</pre></div>").on("touchstart",function(t){e(this)["scroll"+("ltr"===i.direction?"Right":"Left")]()>5&&(t.originalEvent._preventSwipeX=!0)}).appendTo(o),t.hideinfo())))})}catch(r){l.remove()}},m=function(){n=!1,l.remove()};r.stopImmediatePropagation(),l=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+i.i18n("nowLoading")+'</span><span class="elfinder-spinner"></span></div>').appendTo(t.info.find(".elfinder-quicklook-info")),c=e('<div class="elfinder-quicklook-info-progress"></div>').appendTo(l),o.one("change",function(){d&&(d.abort=!0),l.remove(),p=!0}),h=i.openUrl(s.hash,"sameorigin",function(e){e&&(n?f(e):(window.RarArchive&&(u=window.RarArchive,delete window.RarArchive),i.loadScript([i.options.cdns.rar],function(){i.hasRequire?require(["rar"],function(t){n=t,f(e)},m):(n=window.RarArchive)?(u?window.RarArchive=u:delete window.RarArchive,f(e)):m()},{tryRequire:!0,error:m})))},{progressBar:c,temporary:!0}),o.one("change",function(){h&&h.state&&"pending"===h.state()&&h.reject()})}})},function(t){var n,i=t.fm,a=i.arrayFlip(t.options.sharecadMimes||[]),o=t.preview;t.window;t.options.sharecadMimes.length&&t.addIntegration({title:"ShareCAD.org CAD and 3D-Models viewer",link:"https://sharecad.org/DWGOnlinePlugin"}),o.on(t.evUpdate,function(r){var s=r.file;if(a[s.mime.toLowerCase()]&&i.option("onetimeUrl",s.hash)){var l,c,d;t.window;r.stopImmediatePropagation(),"1"==s.url&&(o.hide(),e('<div class="elfinder-quicklook-info-data"><button class="elfinder-info-button">'+i.i18n("getLink")+"</button></div>").appendTo(t.info.find(".elfinder-quicklook-info")).on("click",function(){var n=e(this);n.html('<span class="elfinder-spinner">'),i.request({data:{cmd:"url",target:s.hash},preventDefault:!0,progressBar:c}).always(function(){n.html("")}).done(function(e){var n=i.file(s.hash);s.url=n.url=e.url||"",s.url&&o.trigger({type:t.evUpdate,file:s,forceUpdate:!0})})})),""!==s.url&&"1"!=s.url&&(o.one("change",function(){l.remove(),n.off("load").remove(),n=null}).addClass("elfinder-overflow-auto"),l=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+i.i18n("nowLoading")+'</span><span class="elfinder-spinner"></span></div>').appendTo(t.info.find(".elfinder-quicklook-info")),c=e('<div class="elfinder-quicklook-info-progress"></div>').appendTo(l),d=i.convAbsUrl(i.url(s.hash)),n=e('<iframe class="elfinder-quicklook-preview-iframe" scrolling="no"></iframe>').css("background-color","transparent").appendTo(o).on("load",function(){t.hideinfo(),l.remove(),t.preview.after(t.info),e(this).css("background-color","#fff").show()}).on("error",function(){l.remove(),t.preview.after(t.info)}).attr("src","//sharecad.org/cadframe/load?url="+encodeURIComponent(d)),t.info.after(t.preview))}})},function(t){var n,i,a,o,r,s=t.fm,l={"application/vnd.google-earth.kml+xml":!0,"application/vnd.google-earth.kmz":!0},c=t.preview;t.options.googleMapsApiKey&&(t.addIntegration({title:"Google Maps",link:"https://www.google.com/intl/"+s.lang.replace("_","-")+"/help/terms_maps.html"}),n=window.google&&google.maps,i=function(e,i,a){var r=t.options.googleMapsOpts.maps;s.forExternalUrl(e.hash,{progressBar:a}).done(function(e){if(e)try{new n.KmlLayer(e,Object.assign({map:new n.Map(i.get(0),r)},t.options.googleMapsOpts.kml)),t.hideinfo()}catch(a){o()}else o()})},a=window.gm_authFailure,o=function(){r=null},r="https://maps.googleapis.com/maps/api/js?key="+t.options.googleMapsApiKey,window.gm_authFailure=function(){o(),a&&a()},c.on(t.evUpdate,function(a){var o=a.file;if(r&&l[o.mime.toLowerCase()]){var d,p,u,h=(t.window,"1"==o.url&&!s.option("onetimeUrl",o.hash));a.stopImmediatePropagation(),d=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+s.i18n("nowLoading")+'</span><span class="elfinder-spinner"></span></div>').appendTo(t.info.find(".elfinder-quicklook-info")),p=e('<div class="elfinder-quicklook-info-progress"></div>').appendTo(d),h&&(c.hide(),e('<div class="elfinder-quicklook-info-data"><button class="elfinder-info-button">'+s.i18n("getLink")+"</button></div>").appendTo(t.info.find(".elfinder-quicklook-info")).on("click",function(){var n=e(this);n.html('<span class="elfinder-spinner">'),s.request({data:{cmd:"url",target:o.hash},preventDefault:!0,progressBar:p}).always(function(){d.remove(),n.html("")}).done(function(e){var n=s.file(o.hash);o.url=n.url=e.url||"",o.url&&c.trigger({type:t.evUpdate,file:o,forceUpdate:!0})})})),""===o.url||h||(u=e('<div style="width:100%;height:100%;"></div>').appendTo(c),c.one("change",function(){u.remove(),u=null}),n?i(o,u,p):s.loadScript([r],function(){n=window.google&&google.maps,n&&i(o,u,p)}))}}))},function(t){var n,i,a=t.fm,o=Object.assign(a.arrayFlip(t.options.googleDocsMimes||[],"g"),a.arrayFlip(t.options.officeOnlineMimes||[],"m")),r=t.preview,s=(t.window,t.navbar),l={g:"docs.google.com/gview?embedded=true&url=",m:"view.officeapps.live.com/op/embed.aspx?wdStartOn=0&src="},c={g:"56px",m:"24px"},d={xls:5242880,xlsb:5242880,xlsx:5242880,xlsm:5242880,other:10485760};t.options.googleDocsMimes.length&&(i=!0,t.addIntegration({title:"Google Docs Viewer",link:"https://docs.google.com/"})),t.options.officeOnlineMimes.length&&(i=!0,t.addIntegration({title:"MS Online Doc Viewer",link:"https://products.office.com/office-online/view-office-documents-online"})),i&&r.on(t.evUpdate,function(i){var p,u,h=i.file;if(h.size<=26214400&&(p=o[h.mime])){var f,m,g,v=t.window,b=function(){s.css("bottom",v.hasClass("elfinder-quicklook-fullscreen")?c[p]:"")},y=a.mimeTypes[h.mime],w="1"==h.url&&!a.option("onetimeUrl",h.hash);"m"===p&&(d[y]&&h.size>d[y]||h.size>d.other)&&(p="g"),w&&(r.hide(),e('<div class="elfinder-quicklook-info-data"><button class="elfinder-info-button">'+a.i18n("getLink")+"</button></div>").appendTo(t.info.find(".elfinder-quicklook-info")).on("click",function(){var n=e(this);n.html('<span class="elfinder-spinner">'),a.request({data:{cmd:"url",target:h.hash},preventDefault:!0}).always(function(){n.html("")}).done(function(e){var n=a.file(h.hash);h.url=n.url=e.url||"",h.url&&r.trigger({type:t.evUpdate,file:h,forceUpdate:!0})})})),""===h.url||w||(i.stopImmediatePropagation(),r.one("change",function(){u&&u.status&&"pending"===u.status()&&u.reject(),v.off("viewchange.googledocs"),f.remove(),n.off("load").remove(),n=null}).addClass("elfinder-overflow-auto"),f=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+a.i18n("nowLoading")+'</span><span class="elfinder-spinner"></span></div>').appendTo(t.info.find(".elfinder-quicklook-info")),m=e('<div class="elfinder-quicklook-info-progress"></div>').appendTo(f),n=e('<iframe class="elfinder-quicklook-preview-iframe"></iframe>').css("background-color","transparent").appendTo(r),u=a.forExternalUrl(h.hash,{progressBar:m}).done(function(i){var a=function(){try{!n||n.attr("src")&&!n.get(0).contentWindow.document||(n.attr("src","https://"+l[p]+encodeURIComponent(i)),g=setTimeout(a,2e3))}catch(e){}};i?(h.ts&&(i+=(i.match(/\?/)?"&":"?")+"_t="+h.ts),n.on("load",function(){g&&clearTimeout(g),t.hideinfo(),f.remove(),t.preview.after(t.info),e(this).css("background-color","#fff").show()}).on("error",function(){g&&clearTimeout(g),f.remove(),t.preview.after(t.info)}),a()):(f.remove(),n.remove())}),v.on("viewchange.googledocs",b),b(),t.info.after(t.preview))}})},function(t){"use strict";var n,i,a=t.fm,o=t.preview,r=parseInt(t.options.textInitialLines)||150,s=parseInt(t.options.prettifyMaxLines)||500,l=function(){c=function(){return!1},i&&(window.PR=i),n=!1},c=function(e){a.options.cdns.prettify?(c=function(e){return setTimeout(function(){p(e)},100),"pending"},window.PR&&(i=window.PR),a.loadScript([a.options.cdns.prettify+(a.options.cdns.prettify.match(/\?/)?"&":"?")+"autorun=false"],function(t){n=t||window.PR,"object"==typeof n?(c=function(){return!0},i?window.PR=i:delete window.PR,d(e)):l()},{tryRequire:!0,error:l})):l()},d=function(e){e&&!e.hasClass("prettyprinted")&&(e.css("cursor","wait"),requestAnimationFrame(function(){n.prettyPrint&&n.prettyPrint(null,e.get(0)),e.css("cursor","")}))},p=function(e){var t=c(e);t===!0&&d(e)};o.on(t.evUpdate,function(i){var l,c,d,u,h=i.file;h.mime;a.mimeIsText(h.mime)&&(!t.options.getSizeMax||h.size<=t.options.getSizeMax)&&n!==!1&&(i.stopImmediatePropagation(),c=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+a.i18n("nowLoading")+'</span><span class="elfinder-spinner"></span></div>').appendTo(t.info.find(".elfinder-quicklook-info")),d=e('<div class="elfinder-quicklook-info-progress"></div>').appendTo(c),o.one("change",function(){"pending"==l.state()&&l.reject(),u&&u.remove()}),l=a.request({data:{cmd:"get",target:h.hash,conv:h.encoding||1,_t:h.ts},options:{type:"get",cache:!0},preventDefault:!0,progressBar:d}).done(function(n){var i,l,c,d,u,f=new RegExp("^(data:"+h.mime.replace(/([.+])/g,"\\$1")+";base64,)","i"),m=n.content;"string"==typeof m&&(t.hideinfo(),window.atob&&(u=m.match(f))&&(m=atob(m.substr(u[1].length))),d=m.match(/([^\r\n]{1,100}[\r\n]*)/g),l=d.length-r,l>10?i=d.splice(0,r).join(""):l=0,c=e('<div class="elfinder-quicklook-preview-text-wrapper"><pre class="elfinder-quicklook-preview-text prettyprint"></pre></div>'),l&&c.append(e('<div class="elfinder-quicklook-preview-charsleft"><hr/><span>'+a.i18n("linesLeft",a.toLocaleString(l))+"</span></div>").on("click",function(){var t=c.scrollTop();e(this).remove(),c.children("pre").removeClass("prettyprinted").text(m).scrollTop(t),d.length<=s&&p(c)})),c.children("pre").text(i||m),c.on("touchstart",function(t){e(this)["scroll"+("ltr"===a.direction?"Right":"Left")]()>5&&(t.originalEvent._preventSwipeX=!0)}).appendTo(o),n.toasts&&Array.isArray(n.toasts)&&e.each(n.toasts,function(){this.msg&&a.toast(this)}),p(c))}).always(function(n){var i,r,s;(i=a.getCommand("edit"))&&(s=[],n&&n.encoding&&s.push({value:n.encoding}),s.push({value:"UTF-8"}),r=i.getEncSelect(s),r.on("change",function(){h.encoding=r.val(),a.cache(h,"change"),o.trigger({type:t.evUpdate,file:h,forceUpdate:!0})}),u=e('<div class="elfinder-quicklook-encoding"></div>').append(r),t.window.append(u)),c.remove()}))})}],(i.prototype.commands.reload=function(){"use strict";var t=this,n=!1;this.alwaysEnabled=!0,this.updateOnSelect=!0,this.shortcuts=[{pattern:"ctrl+shift+r f5"}],this.getstate=function(){return 0},this.init=function(){this.fm.bind("search searchend",function(){n="search"==this.type})},this.fm.bind("contextmenu",function(){var n=t.fm;n.options.sync>=1e3&&(t.extra={icon:"accept",node:e("<span></span>").attr({title:n.i18n("autoSync")}).on("click touchstart",function(t){"touchstart"===t.type&&t.originalEvent.touches.length>1||(t.stopPropagation(),t.preventDefault(),e(this).parent().toggleClass("ui-state-disabled",n.options.syncStart).parent().removeClass("ui-state-hover"),n.options.syncStart=!n.options.syncStart,n.autoSync(n.options.syncStart?null:"stop"))}).on("ready",function(){e(this).parent().toggleClass("ui-state-disabled",!n.options.syncStart).css("pointer-events","auto")})})}),this.exec=function(){var t=this.fm;if(!n){var i=t.sync(),a=setTimeout(function(){t.notify({type:"reload",cnt:1,hideCnt:!0}),i.always(function(){t.notify({type:"reload",cnt:-1})})},t.notifyDelay);return i.always(function(){clearTimeout(a),t.trigger("reload")})}e("div.elfinder-toolbar > div."+t.res("class","searchbtn")+" > span.ui-icon-search").click()}}).prototype={forceLoad:!0},i.prototype.commands.rename=function(){"use strict";this.alwaysEnabled=!0,this.syncTitleOnChange=!0;var t=this,n=t.fm,i=function(t,i,a,o){var r,s=i?[a.hash].concat(i):[a.hash],l=s.length,c={};if(n.lockfiles({files:s}),n.isRoot(a)&&!a.netkey){if((r=n.storage("rootNames"))||(r={}),""===o){if(!r[a.hash])return t&&t.reject(),void n.unlockfiles({files:s}).trigger("selectfiles",{files:s});a.name=a._name,a.i18=a._i18,delete r[a.hash],delete a._name,delete a._i18}else"undefined"==typeof a._name&&(a._name=a.name,a._i18=a.i18),a.name=r[a.hash]=o,delete a.i18;return n.storage("rootNames",r),c={changed:[a]},n.updateCache(c),n.change(c),t&&t.resolve(c),void n.unlockfiles({files:s}).trigger("selectfiles",{
24
- files:s})}c={cmd:"rename",name:o,target:a.hash},l>1&&(c.targets=i,o.match(/\*/)&&(c.q=o)),n.request({data:c,notify:{type:"rename",cnt:l},navigate:{}}).fail(function(e){var i=n.parseError(e);t&&t.reject(),i&&Array.isArray(i)&&"errRename"===i[0]||n.sync()}).done(function(i){var r;i.added&&i.added.length&&1===l&&(i.undo={cmd:"rename",callback:function(){return n.request({data:{cmd:"rename",target:i.added[0].hash,name:a.name},notify:{type:"undo",cnt:1}})}},i.redo={cmd:"rename",callback:function(){return n.request({data:{cmd:"rename",target:a.hash,name:o},notify:{type:"rename",cnt:1}})}}),t&&t.resolve(i),(r=n.cwd().hash)&&r!==a.hash||n.exec("open",e.map(i.added,function(e){return"directory"===e.mime?e.hash:null})[0])}).always(function(){n.unlockfiles({files:s}).trigger("selectfiles",{files:s})})},a=function(e,t){var i,a,o,r=t||n.selected(),s=n.splitFileExtention(e),l=n.file(r[0]),c=n.file(r[1]);return i=s[1]?"."+s[1]:"",s[1]&&"*"===s[0]?(a='"'+n.splitFileExtention(l.name)[0]+i+'", ',a+='"'+n.splitFileExtention(c.name)[0]+i+'"'):s[0].length>1&&("*"===s[0].substr(-1)?(o=s[0].substr(0,s[0].length-1),a='"'+o+l.name+'", ',a+='"'+o+c.name+'"'):"*"===s[0].substr(0,1)&&(o=s[0].substr(1),a='"'+n.splitFileExtention(l.name)[0]+o+i+'", ',a+='"'+n.splitFileExtention(c.name)[0]+o+i+'"')),a||(a='"'+s[0]+"1"+i+'", "'+s[0]+"2"+i+'"'),r.length>2&&(a+=" ..."),a},o=function(){var o,r=n.selected(),s='<input name="type" type="radio" class="elfinder-tabstop">',l=function(t,i){return e('<label class="elfinder-rename-batch-checks">'+n.i18n(i)+"</label>").prepend(t)},c=e('<input type="text" class="ui-corner-all elfinder-tabstop">'),d=e(s),p=e(s),u=e(s),h=e(s),f=e("<div></div>").append(l(d,"plusNumber"),l(p,"asPrefix"),l(u,"asSuffix"),l(h,"changeExtention")),m=e('<div class="elfinder-rename-batch-preview"></div>'),g=e('<div class="elfinder-rename-batch"></div>').append(e('<div class="elfinder-rename-batch-name"></div>').append(c),e('<div class="elfinder-rename-batch-type"></div>').append(f),m),v={title:n.i18n("batchRename"),modal:!0,destroyOnClose:!0,width:Math.min(380,n.getUI().width()-20),buttons:{},open:function(){c.on("input",y).trigger("focus")}},b=function(){var e=c.val(),t=n.splitFileExtention(n.file(r[0]).name)[1];return(""!==e||d.is(":checked"))&&(p.is(":checked")?e+="*":u.is(":checked")?e="*"+e+"."+t:h.is(":checked")?e="*."+e:t&&(e+="."+t)),e},y=function(){var e=b();""!==e?m.html(n.i18n(["renameMultiple",r.length,a(e)])):m.empty()},w=f.find("input:radio").on("change",y);v.buttons[n.i18n("btnApply")]=function(){var e,t,a=b();""!==a&&(o.elfinderdialog("close"),t=r,e=n.file(t.shift()),i(void 0,t,e,a))},v.buttons[n.i18n("btnCancel")]=function(){o.elfinderdialog("close")},e.fn.checkboxradio?w.checkboxradio({create:function(e,t){this===d.get(0)&&d.prop("checked",!0).change()}}):f.buttonset({create:function(e,t){d.prop("checked",!0).change()}}),o=t.fmDialog(g,v)};this.noChangeDirOnRemovedCwd=!0,this.shortcuts=[{pattern:"f2"+("mac"==n.OS?" enter":"")},{pattern:"shift+f2",description:"batchRename",callback:function(){n.selected().length>1&&o()}}],this.getstate=function(i){var a,r,s,l,c,d,p=this.files(i),u=p.length;return u?(u>1&&p[0].phash&&(a=p[0].phash,r=n.splitFileExtention(p[0].name)[1].toLowerCase(),s=p[0].mime),1===u&&(d=n.isRoot(p[0])),c=1===u&&(n.cookieEnabled&&d||!p[0].locked)||n.api>2.103&&u===e.grep(p,function(e){return!(l||e.locked||e.phash!==a||n.isRoot(e)||s!==e.mime&&r!==n.splitFileExtention(e.name)[1].toLowerCase())||(l&&(l=!0),!1)}).length?0:-1,!d&&0===c&&n.option("disabledFlip",p[0].hash).rename&&(c=-1),c!==-1&&u>1?t.extra={icon:"preference",node:e("<span></span>").attr({title:n.i18n("batchRename")}).on("click touchstart",function(e){"touchstart"===e.type&&e.originalEvent.touches.length>1||(e.stopPropagation(),e.preventDefault(),n.getUI().trigger("click"),o())})}:delete t.extra,c):-1},this.exec=function(t,o){var r,s=(n.getUI("cwd"),t||!!n.selected().length&&n.selected()||[n.cwd().hash]),l=s.length,c=n.file(s.shift()),d=".elfinder-cwd-filename",p=o||{},u=n.cwd().hash==c.hash,h="navbar"===p._currentType||"files"===p._currentType?p._currentType:u?"navbar":"files",f="files"!==h,m=n[f?"navHash2Elm":"cwdHash2Elm"](c.hash),g=!f&&"list"!=n.storage("view"),v=function(){requestAnimationFrame(function(){x&&x.trigger("blur")})},b=function(){T.is(":hidden")||T.elfinderoverlay("hide").off("click close",A),z.removeClass("ui-front").css("position","").off("unselect."+n.namespace,v),g?C&&C.css("max-height",""):f||z.css("width","").parent("td").css("overflow","")},y=e.Deferred().fail(function(e){var t=x.parent(),i=n.escape(c.i18||c.name);x.off(),g&&(i=i.replace(/([_.])/g,"&#8203;$1")),requestAnimationFrame(function(){f?x.replaceWith(i):t.length?(x.remove(),t.html(i)):m.find(d).html(i)}),e&&n.error(e)}).always(function(){b(),n.unbind("resize",j),n.enable()}),w=function(t){var o=e.trim(x.val()),r=(n.splitFileExtention(o),!0),d=function(){x.off(),b(),f?x.replaceWith(n.escape(o)):C.html(n.escape(o)),i(y,s,c,o)};if(T.is(":hidden")||z.css("z-index",""),""===o){if(!n.isRoot(c))return A();f?x.replaceWith(n.escape(c.name)):C.html(n.escape(c.name))}if(!S&&z.length){if(x.off("blur"),1===l&&o===c.name)return y.reject();if(n.options.validName&&n.options.validName.test)try{r=n.options.validName.test(o)}catch(t){r=!1}if("."===o||".."===o||!r)return S=!0,n.error("directory"===c.mime?"errInvDirname":"errInvName",{modal:!0,close:function(){setTimeout(k,120)}}),!1;if(1===l&&n.fileByName(o,c.phash))return S=!0,n.error(["errExists",o],{modal:!0,close:function(){setTimeout(k,120)}}),!1;1===l?d():(n.confirm({title:"cmdrename",text:["renameMultiple",l,a(o,[c.hash].concat(s))],accept:{label:"btnYes",callback:d},cancel:{label:"btnCancel",callback:function(){setTimeout(function(){S=!0,k()},120)}}}),setTimeout(function(){n.trigger("unselectfiles",{files:n.selected()}).trigger("selectfiles",{files:[c.hash].concat(s)})},120))}},x=e(g?"<textarea></textarea>":'<input type="text"/>').on("keyup text",function(){g?(this.style.height="1px",this.style.height=this.scrollHeight+"px"):r&&(this.style.width=r+"px",this.scrollWidth>r&&(this.style.width=this.scrollWidth+10+"px"))}).on("keydown",function(t){t.stopImmediatePropagation(),t.keyCode==e.ui.keyCode.ESCAPE?y.reject():t.keyCode==e.ui.keyCode.ENTER&&(t.preventDefault(),x.trigger("blur"))}).on("mousedown click dblclick",function(e){e.stopPropagation(),"dblclick"===e.type&&e.preventDefault()}).on("blur",w).on("dragenter dragleave dragover drop",function(e){e.stopPropagation()}),k=function(){var e=n.splitFileExtention(x.val())[0];S||!n.UA.Mobile||n.UA.iOS||(T.on("click close",A).elfinderoverlay("show"),z.css("z-index",T.css("z-index")+1)),!n.enabled()&&n.enable(),S&&(S=!1,x.on("blur",w)),x.trigger("focus").trigger("select"),x[0].setSelectionRange&&x[0].setSelectionRange(0,e.length)},C=f?m.contents().filter(function(){return 3==this.nodeType&&e(this).parent().attr("id")===n.navHash2Id(c.hash)}):m.find(d),z=C.parent(),T=n.getUI("overlay"),A=function(e){T.is(":hidden")||z.css("z-index",""),S||(y.reject(),e&&(e.stopPropagation(),e.preventDefault()))},j=function(){m.trigger("scrolltoview",{blink:!1})},S=!1;return z.addClass("ui-front").css("position","relative").on("unselect."+n.namespace,v),n.bind("resize",j),f?C.replaceWith(x.val(c.name)):(g?C.css("max-height","none"):f||(r=z.width(),z.width(r-15).parent("td").css("overflow","visible")),C.empty().append(x.val(c.name))),l>1&&n.api<=2.103?y.reject():c&&C.length?c.locked&&!n.isRoot(c)?y.reject(["errLocked",c.name]):(n.one("select",function(){x.parent().length&&c&&e.inArray(c.hash,n.selected())===-1&&x.trigger("blur")}),x.trigger("keyup"),k(),y):y.reject("errCmdParams",this.title)},n.bind("select contextmenucreate closecontextmenu",function(e){var i,a=(e.data?e.data.selected||e.data.targets:null)||n.selected();a&&1===a.length&&(i=n.file(a[0]))&&n.isRoot(i)?t.title=n.i18n("kindAlias")+" ("+n.i18n("preference")+")":t.title=n.i18n("cmdrename"),"closecontextmenu"!==e.type?t.update(void 0,t.title):requestAnimationFrame(function(){t.update(void 0,t.title)})}).remove(function(t){var i;t.data&&t.data.removed&&(i=n.storage("rootNames"))&&(e.each(t.data.removed,function(e,t){i[t]&&delete i[t]}),n.storage("rootNames",i))})},i.prototype.commands.resize=function(){"use strict";var t=this.fm,n=0,i=function(t,n,i){var a=[{x:t/2,y:n/2},{x:-t/2,y:n/2},{x:-t/2,y:-n/2},{x:t/2,y:-n/2}],o=[],r={x:Number.MAX_VALUE,y:Number.MAX_VALUE},s={x:Number.MIN_VALUE,y:Number.MIN_VALUE};return e.each(a,function(e,t){o.push({x:t.x*Math.cos(i)-t.y*Math.sin(i),y:t.x*Math.sin(i)+t.y*Math.cos(i)})}),e.each(o,function(e,t){r.x=Math.min(r.x,t.x),r.y=Math.min(r.y,t.y),s.x=Math.max(s.x,t.x),s.y=Math.max(s.y,t.y)}),{width:s.x-r.x,height:s.y-r.y}};this.updateOnSelect=!1,this.getstate=function(){var e=t.selectedFiles();return 1==e.length&&e[0].read&&e[0].write&&e[0].mime.indexOf("image/")!==-1?0:-1},this.resizeRequest=function(n,i,a){var o=i||t.file(n.target),r=(o?o.tmb:null,t.isCommandEnabled("resize",n.target));if(r&&(!o||o&&o.read&&o.write&&o.mime.indexOf("image/")!==-1))return t.request({data:Object.assign(n,{cmd:"resize"}),notify:{type:"resize",cnt:1}}).fail(function(e){a&&a.reject(e)}).done(function(){n.quality&&t.storage("jpgQuality",n.quality===t.option("jpgQuality")?null:n.quality),a&&a.resolve()});var s;return s=o?o.mime.indexOf("image/")===-1?["errResize",o.name,"errUsupportType"]:["errResize",o.name,"errPerm"]:["errResize",n.target,"errPerm"],a?a.reject(s):t.error(s),e.Deferred().reject(s)},this.exec=function(a){var o,r,s,l,c=this,d=this.files(a),p=e.Deferred(),u=t.api>1,h=this.options,f=650,m=t.getUI(),g=e().controlgroup?"controlgroup":"buttonset",v="undefined"==typeof h.grid8px||"disable"!==h.grid8px,b=Array.isArray(h.presetSize)?h.presetSize:[],y="elfinder-dialog-active",w=t.res("class","editing"),x=function(a,o,r){var d,x,k,C,z,T="image/jpeg"===a.mime,A=e('<div class="elfinder-resize-container"></div>'),j='<input type="number" class="ui-corner-all"/>',S='<div class="elfinder-resize-row"></div>',O='<div class="elfinder-resize-label"></div>',I=null,M=!1,E=function(){M=!0},F=function(){M&&(M=!1,D.trigger("change"))},D=e('<div class="elfinder-resize-control"></div>').on("focus","input[type=text],input[type=number]",function(){e(this).trigger("select")}).on("change",function(){I&&cancelAnimationFrame(I),I=requestAnimationFrame(function(){var e,n,a,o,r,s,c,d,p,u,h,f;at&&!M&&(a=at.data("canvas"))&&(e=D.children("div.elfinder-resize-control-panel:visible"),n=e.find("input.elfinder-resize-quality"),n.is(":visible")&&(o=at.data("ctx"),r=at.get(0),e.hasClass("elfinder-resize-uiresize")?(d=a.width=X.val(),p=a.height=J.val(),o.drawImage(r,0,0,d,p)):e.hasClass("elfinder-resize-uicrop")?(s=G.val(),c=Y.val(),d=Q.val(),p=Z.val(),a.width=d,a.height=p,o.drawImage(r,s,c,d,p,0,0,d,p)):(u=te.val(),h=te.val()*Math.PI/180,f=i(fe,me,h),d=a.width=f.width,p=a.height=f.height,o.save(),u%90!==0&&(o.fillStyle=de.val()||"#FFF",o.fillRect(0,0,d,p)),o.translate(d/2,p/2),o.rotate(h),o.drawImage(r,-r.width/2,-r.height/2,fe,me),o.restore()),a.toBlob(function(e){e&&(l=e.size,n.next("span").text(" ("+t.formatSize(e.size)+")"))},"image/jpeg",Math.max(Math.min(n.val(),100),1)/100)))})}).on("mouseup","input",function(t){e(t.target).trigger("change")}),U=e('<div class="elfinder-resize-preview"></div>').on("touchmove",function(t){e(t.target).hasClass("touch-punch")&&(t.stopPropagation(),t.preventDefault())}),P=e('<div class="elfinder-resize-loading">'+t.i18n("ntfloadimg")+"</div>"),q=e('<div class="elfinder-resize-handle touch-punch"></div>'),R=e('<div class="elfinder-resize-handle touch-punch"></div>'),H=e('<div class="elfinder-resize-uiresize elfinder-resize-control-panel"></div>'),_=e('<div class="elfinder-resize-uicrop elfinder-resize-control-panel"></div>'),N=e('<div class="elfinder-resize-rotate elfinder-resize-control-panel"></div>'),L=e("<button></button>").attr("title",t.i18n("rotate-cw")).append(e('<span class="elfinder-button-icon elfinder-button-icon-rotate-l"></span>')),W=e("<button></button>").attr("title",t.i18n("rotate-ccw")).append(e('<span class="elfinder-button-icon elfinder-button-icon-rotate-r"></span>')),B=e("<span ></span>"),$=e('<button class="elfinder-resize-reset">').text(t.i18n("reset")).on("click",function(){We()}).button({icons:{primary:"ui-icon-arrowrefresh-1-n"},text:!1}),V=e('<div class="elfinder-resize-type"></div>').append('<input type="radio" name="type" id="'+o+'-resize" value="resize" checked="checked" /><label for="'+o+'-resize">'+t.i18n("resize")+"</label>",'<input class="api2" type="radio" name="type" id="'+o+'-crop" value="crop" /><label class="api2" for="'+o+'-crop">'+t.i18n("crop")+"</label>",'<input class="api2" type="radio" name="type" id="'+o+'-rotate" value="rotate" /><label class="api2" for="'+o+'-rotate">'+t.i18n("rotate")+"</label>"),K="resize",X=(V[g]()[g]("disable").find("input").on("change",function(){K=e(this).val(),We(),Ke(!0),Xe(!0),Je(!0),"resize"==K?(H.show(),N.hide(),_.hide(),Ke(),T&&Ae.insertAfter(H.find(".elfinder-resize-grid8"))):"crop"==K?(N.hide(),H.hide(),_.show(),Xe(),T&&Ae.insertAfter(_.find(".elfinder-resize-grid8"))):"rotate"==K&&(H.hide(),_.hide(),N.show(),Je())}),e(j).on("change",function(){var e=Le(parseInt(X.val())),t=Le(ge?e/ue:parseInt(J.val()));e>0&&t>0&&(Be.updateView(e,t),X.val(e),J.val(t))}).addClass("elfinder-focus")),J=e(j).on("change",function(){var e=Le(parseInt(J.val())),t=Le(ge?e*ue:parseInt(X.val()));t>0&&e>0&&(Be.updateView(t,e),X.val(t),J.val(e))}),G=e(j).on("change",function(){$e.updateView()}),Y=e(j).on("change",function(){$e.updateView()}),Q=e(j).on("change",function(){$e.updateView("w")}),Z=e(j).on("change",function(){$e.updateView("h")}),ee=T&&u?e(j).val(t.storage("jpgQuality")>0?t.storage("jpgQuality"):t.option("jpgQuality")).addClass("elfinder-resize-quality").attr("min","1").attr("max","100").attr("title","1 - 100").on("blur",function(){var e=Math.min(100,Math.max(1,parseInt(this.value)));D.find("input.elfinder-resize-quality").val(e)}):null,te=e('<input type="number" class="ui-corner-all" maxlength="3" value="0" />').on("change",function(){Ve.update()}),ne=e('<div class="elfinder-resize-rotate-slider touch-punch"></div>').slider({min:0,max:360,value:te.val(),animate:!0,start:E,stop:F,change:function(e,t){t.value!=ne.slider("value")&&Ve.update(t.value)},slide:function(e,t){Ve.update(t.value,!1)}}).find(".ui-slider-handle").addClass("elfinder-tabstop").off("keydown").on("keydown",function(t){t.keyCode!=e.ui.keyCode.LEFT&&t.keyCode!=e.ui.keyCode.RIGHT||(t.stopPropagation(),t.preventDefault(),Ve.update(Number(te.val())+(t.keyCode==e.ui.keyCode.RIGHT?1:-1),!1))}).end(),ie={},ae=function(e){var t,n,i,a,o,r,s;try{t=ie[Math.round(e.offsetX)][Math.round(e.offsetY)]}catch(e){}t&&(n=t[0],i=t[1],a=t[2],o=t[3],r=t[4],s=t[5],re(n,i,a,"click"===e.type))},oe=function(t){re(e(this).css("backgroundColor"),"","","click"===t.type)},re=function(t,n,i,a){var o,r,s;"string"==typeof t&&(n="",t&&(o=e("<span>").css("backgroundColor",t).css("backgroundColor"))&&(r=o.match(/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i))&&(t=Number(r[1]),n=Number(r[2]),i=Number(r[3]))),s=""===n?t:"#"+se(t,n,i),de.val(s).css({backgroundColor:s,backgroundImage:"none",color:t+n+i<384?"#fff":"#000"}),U.css("backgroundColor",s),a&&(Ne.off(".picker").removeClass("elfinder-resize-picking"),pe.off(".picker").removeClass("elfinder-resize-picking"))},se=function(t,n,i){return e.map([t,n,i],function(e){return("0"+parseInt(e).toString(16)).slice(-2)}).join("")},le=e("<button>").text(t.i18n("colorPicker")).on("click",function(){Ne.on("mousemove.picker click.picker",ae).addClass("elfinder-resize-picking"),pe.on("mousemove.picker click.picker","span",oe).addClass("elfinder-resize-picking")}).button({icons:{primary:"ui-icon-pin-s"},text:!1}),ce=e("<button>").text(t.i18n("reset")).on("click",function(){re("","","",!0)}).button({icons:{primary:"ui-icon-arrowrefresh-1-n"},text:!1}),de=e('<input class="ui-corner-all elfinder-resize-bg" type="text">').on("focus",function(){e(this).attr("style","")}).on("blur",function(){re(e(this).val())}),pe=e('<div class="elfinder-resize-pallet">').on("click","span",function(){re(e(this).css("backgroundColor"))}),ue=1,he=1,fe=0,me=0,ge=!0,ve=!1,be=0,ye=0,we=0,xe=0,ke=0,Ce=!!T&&v,ze=e("<button>").html(t.i18n("aspectRatio")).on("click",function(){ge=!ge,ze.button("option",{icons:{primary:ge?"ui-icon-locked":"ui-icon-unlocked"}}),Be.fixHeight(),q.resizable("option","aspectRatio",ge).data("uiResizable")._aspectRatio=ge}).button({icons:{primary:ge?"ui-icon-locked":"ui-icon-unlocked"},text:!1}),Te=e("<button>").html(t.i18n("aspectRatio")).on("click",function(){ve=!ve,Te.button("option",{icons:{primary:ve?"ui-icon-locked":"ui-icon-unlocked"}}),R.resizable("option","aspectRatio",ve).data("uiResizable")._aspectRatio=ve}).button({icons:{primary:ve?"ui-icon-locked":"ui-icon-unlocked"},text:!1}),Ae=e("<button>").html(t.i18n(Ce?"enabled":"disabled")).toggleClass("ui-state-active",Ce).on("click",function(){Ce=!Ce,Ae.html(t.i18n(Ce?"enabled":"disabled")).toggleClass("ui-state-active",Ce),je()}).button(),je=function(){var t=Ce?8:1;e.each([X,J,Q,Z,G,Y],function(){this.attr("step",t)}),Ce&&(X.val(Le(X.val())),J.val(Le(J.val())),Q.val(Le(Q.val())),Z.val(Le(Z.val())),G.val(Le(G.val())),Y.val(Le(Y.val())),H.is(":visible")?Be.updateView(X.val(),J.val()):_.is(":visible")&&$e.updateView())},Se=function(){var n,i=function(){de.parent().hide(),pe.hide()};n=Math.min(be,ye)/Math.sqrt(Math.pow(fe,2)+Math.pow(me,2)),we=Math.ceil(fe*n),xe=Math.ceil(me*n),Ne.width(we).height(xe).css("margin-top",(ye-xe)/2+"px").css("margin-left",(be-we)/2+"px"),Ne.is(":visible")&&de.is(":visible")&&("image/png"!==a.mime?(U.css("backgroundColor",de.val()),d=e("<img>"),t.isCORS&&d.attr("crossorigin","use-credentials"),d.on("load",function(){x&&x.width!==we&&Ie()}).on("error",i).attr("src",it)):i())},Oe=function(){Be.updateView(fe,me),Se(),Re.width(qe.width()).height(qe.height()),He.width(qe.width()).height(qe.height()),$e.updateView(),ot()},Ie=function(){if(k){var t,n,i,a,o,r,s,l,c,p,u,h,f,m,g,v,b,y,w,C={},z=[],T=function(e,t,n){var i,a,o,r=Math.max(Math.max(e,t),n),s=Math.min(Math.min(e,t),n);return r===s?i=0:e===r?i=((t-n)/(r-s)*60+360)%360:t===r?i=(n-e)/(r-s)*60+120:n===r&&(i=(e-t)/(r-s)*60+240),a=(r-s)/r,o=(.3*e+.59*t+.11*n)/255,[i,a,o,"hsl"]},A=function(e){return 8*Math.round(e/8)};e:try{n=x.width=Ne.width(),i=x.height=Ne.height(),f=n/fe,k.scale(f,f),k.drawImage(d.get(0),0,0),h=k.getImageData(0,0,n,i).data,m=.1*n,g=.9*n,v=.1*i,b=.9*i;for(var j=0;j<i-1;j++)for(var S=0;S<n-1;S++){if(t=4*S+j*n*4,a=h[t],o=h[t+1],r=h[t+2],s=h[t+3],255!==s){de.parent().hide(),pe.hide();break e}p=T(a,o,r),u=Math.round(p[0]),l=Math.round(100*p[1]),c=Math.round(100*p[2]),ie[S]||(ie[S]={}),ie[S][j]=[a,o,r,u,l,c],(S<m||S>g)&&(j<v||j>b)&&(y=A(a)+","+A(o)+","+A(r),C[y]?++C[y]:C[y]=1)}pe.children(":first").length||(w=1,e.each(C,function(e,t){z.push({c:e,v:t})}),e.each(z.sort(function(e,t){return e.v>t.v?-1:1}),function(){return!(this.v<2||w>10)&&(pe.append(e('<span style="width:20px;height:20px;display:inline-block;background-color:rgb('+this.c+');">')),void++w)}))}catch(O){le.hide(),pe.hide()}}},Me=function(){try{x=document.createElement("canvas"),k=x.getContext("2d")}catch(e){le.hide(),pe.hide()}},Ee=function(){st.on("click","span.elfinder-resize-preset",function(){var t=e(this),n=t.data("s")[0],i=t.data("s")[1],a=fe/me;t.data("s",[i,n]).text(i+"x"+n),fe>n||me>i?fe<=n?n=Le(i*a):me<=i?i=Le(n/a):fe-n>me-i?i=Le(n/a):n=Le(i*a):(n=fe,i=me),X.val(n),J.val(i),Be.updateView(n,i),ot()}),lt.on("click","span.elfinder-resize-preset",function(){var t=e(this),n=t.data("s")[0],i=t.data("s")[1],a=G.val(),o=Y.val();t.data("s",[i,n]).text(i+"x"+n),fe>=n&&me>=i&&(fe-n-a<0&&(a=fe-n),me-i-o<0&&(o=me-i),G.val(a),Y.val(o),Q.val(n),Z.val(i),$e.updateView(),ot())}),lt.children("span.elfinder-resize-preset").each(function(){var t=e(this),n=t.data("s")[0],i=t.data("s")[1];t[fe>=n&&me>=i?"show":"hide"]()})},Fe=null,De=!1,Ue=function(e){var n=t.file(a.hash);n.width=e[0],n.height=e[1]},Pe=function(){var i,o,r;De||(De=!0,Fe&&Fe.state&&"pending"===Fe.state()&&Fe.reject(),t.api>=2.103?0===n&&t.request({data:{cmd:"resize",target:a.hash,degree:0,mode:"rotate"},preventDefault:!0}).done(function(e){n=e.losslessRotate?1:-1,1===n&&te.val()%90===0&&N.children("div.elfinder-resize-quality").hide()}).fail(function(){n=-1}):n=-1,i=qe.get(0),o=a.width&&a.height?{w:a.width,h:a.height}:i.naturalWidth?null:{w:qe.width(),h:qe.height()},o&&qe.removeAttr("width").removeAttr("height"),fe=a.width||i.naturalWidth||i.width||qe.width(),me=a.height||i.naturalHeight||i.height||qe.height(),a.width&&a.height||Ue([fe,me]),o&&qe.width(o.w).height(o.h),C.show(),r=me/fe,r<1&&U.height()>U.width()*r&&U.height(U.width()*r),U.height()>qe.height()+20&&U.height(qe.height()+20),ye=U.height()-(q.outerHeight()-q.height()),P.remove(),ue=fe/me,q.append(qe.show()).show(),X.val(fe),J.val(me),Me(),Ee(),Oe(),V[g]("enable"),D.find("input,select").prop("disabled",!1).filter(":text").on("keydown",function(n){var i;if(n.keyCode==e.ui.keyCode.ENTER)return n.stopPropagation(),n.preventDefault(),i={title:e("input:checked",V).val(),text:"confirmReq",accept:{label:"btnApply",callback:function(){Ye()}},cancel:{label:"btnCancel",callback:function(){e(this).trigger("focus")}}},ct&&(i.buttons=[{label:"btnSaveAs",callback:function(){requestAnimationFrame(Qe)}}]),void t.confirm(i)}).on("keyup",function(){var t=e(this);t.hasClass("elfinder-resize-bg")||requestAnimationFrame(function(){t.val(t.val().replace(/[^0-9]/g,""))})}).filter(":first"),je(),!t.UA.Mobile&&X.trigger("focus"),Ke())},qe=e("<img/>").on("load",Pe).on("error",function(){P.html(t.i18n("ntfsmth")).css("background","transparent")}),Re=e("<div></div>"),He=e("<img/>"),_e=e("<div></div>"),Ne=e('<img class="elfinder-resize-imgrotate" />'),Le=function(e,t){return e=Ce?8*Math.round(e/8):Math.round(e),e=Math.max(0,e),t&&e>t&&(e=Ce?8*Math.floor(t/8):t),e},We=function(){X.val(fe),J.val(me),Be.updateView(fe,me),G.val(0),Y.val(0),Q.val(fe),Z.val(me),$e.updateView(),ot()},Be={update:function(){X.val(Le(qe.width()/he)),J.val(Le(qe.height()/he)),ot()},updateView:function(e,t){e>be||t>ye?e/be>t/ye?(he=be/e,qe.width(be).height(Le(t*he))):(he=ye/t,qe.height(ye).width(Le(e*he))):qe.width(Le(e)).height(Le(t)),he=qe.width()/e,B.text("1 : "+(1/he).toFixed(2)),Be.updateHandle()},updateHandle:function(){q.width(qe.width()).height(qe.height())},fixHeight:function(){var e,t;ge&&(e=X.val(),t=Le(e/ue),Be.updateView(e,t),J.val(t))}},$e={update:function(e){G.val(Le((R.data("x")||R.position().left)/he,fe)),Y.val(Le((R.data("y")||R.position().top)/he,me)),"xy"!==e&&(Q.val(Le((R.data("w")||R.width())/he,fe-G.val())),Z.val(Le((R.data("h")||R.height())/he,me-Y.val()))),ot()},updateView:function(e){var t,n,i,a,o;G.val(Le(G.val(),fe-(Ce?8:1))),Y.val(Le(Y.val(),me-(Ce?8:1))),Q.val(Le(Q.val(),fe-G.val())),Z.val(Le(Z.val(),me-Y.val())),ve&&(t=_e.width()/_e.height(),"w"===e?Z.val(Le(parseInt(Q.val())/t)):"h"===e&&Q.val(Le(parseInt(Z.val())*t))),n=Math.round(parseInt(G.val())*he),i=Math.round(parseInt(Y.val())*he),"xy"!==e?(a=Math.round(parseInt(Q.val())*he),o=Math.round(parseInt(Z.val())*he)):(a=R.data("w"),o=R.data("h")),R.data({x:n,y:i,w:a,h:o}).width(a).height(o).css({left:n,top:i}),_e.width(a).height(o)},resize_update:function(e,t){R.data({x:t.position.left,y:t.position.top,w:t.size.width,h:t.size.height}),$e.update(),$e.updateView()},drag_update:function(e,t){R.data({x:t.position.left,y:t.position.top}),$e.update("xy")}},Ve={mouseStartAngle:0,imageStartAngle:0,imageBeingRotated:!1,setQuality:function(){N.children("div.elfinder-resize-quality")[n>0&&te.val()%90===0?"hide":"show"]()},update:function(e,n){"undefined"==typeof e&&(ke=e=parseInt(te.val())),"undefined"==typeof n&&(n=!0),!n||t.UA.Opera||t.UA.ltIE8?Ne.rotate(e):Ne.animate({rotate:e+"deg"}),e%=360,e<0&&(e+=360),te.val(parseInt(e)),ne.slider("value",te.val()),Ve.setQuality()},execute:function(e){if(Ve.imageBeingRotated){var t=Ve.getCenter(Ne),n=e.originalEvent.touches?e.originalEvent.touches[0]:e,i=n.pageX-t[0],a=n.pageY-t[1],o=Math.atan2(a,i),r=o-Ve.mouseStartAngle+Ve.imageStartAngle;return r=Math.round(180*parseFloat(r)/Math.PI),e.shiftKey&&(r=15*Math.round((r+6)/15)),Ne.rotate(r),r%=360,r<0&&(r+=360),te.val(r),ne.slider("value",te.val()),Ve.setQuality(),!1}},start:function(t){if(!Ne.hasClass("elfinder-resize-picking")){E(),Ve.imageBeingRotated=!0;var n=Ve.getCenter(Ne),i=t.originalEvent.touches?t.originalEvent.touches[0]:t,a=i.pageX-n[0],o=i.pageY-n[1];return Ve.mouseStartAngle=Math.atan2(o,a),Ve.imageStartAngle=parseFloat(Ne.rotate())*Math.PI/180,e(document).on("mousemove",Ve.execute),Ne.on("touchmove",Ve.execute),!1}},stop:function(t){if(Ve.imageBeingRotated)return e(document).off("mousemove",Ve.execute),Ne.off("touchmove",Ve.execute),requestAnimationFrame(function(){Ve.imageBeingRotated=!1}),F(),!1},getCenter:function(e){var t=Ne.rotate();Ne.rotate(0);var n=Ne.offset(),i=n.left+Ne.width()/2,a=n.top+Ne.height()/2;return Ne.rotate(t),Array(i,a)}},Ke=function(e){e?(q.filter(":ui-resizable").resizable("destroy"),q.hide()):(q.show(),q.resizable({alsoResize:qe,aspectRatio:ge,resize:Be.update,start:E,stop:function(e){Be.fixHeight,Be.updateView(X.val(),J.val()),F()}}),rt())},Xe=function(e){e?(R.filter(":ui-resizable").resizable("destroy").filter(":ui-draggable").draggable("destroy"),Re.hide()):(Re.show(),R.resizable({containment:Re,aspectRatio:ve,resize:$e.resize_update,start:E,stop:F,handles:"all"}).draggable({handle:_e,containment:He,drag:$e.drag_update,start:E,stop:function(){$e.updateView("xy"),F()}}),rt(),$e.update())},Je=function(e){e?Ne.hide():(Ne.show(),rt())},Ge=function(){var e,n,i,a,o,r,c="";if("resize"==K)e=parseInt(X.val())||0,n=parseInt(J.val())||0;else if("crop"==K)e=parseInt(Q.val())||0,n=parseInt(Z.val())||0,i=parseInt(G.val())||0,a=parseInt(Y.val())||0;else if("rotate"==K){if(e=fe,n=me,o=parseInt(te.val())||0,o<0||o>360)return t.error("Invalid rotate degree"),!1;if(0==o||360==o)return t.error("errResizeNoChange"),!1;c=de.val()}if(r=ee?parseInt(ee.val()):0,"rotate"!=K){if(e<=0||n<=0)return t.error("Invalid image size"),!1;if(e==fe&&n==me&&parseInt(s/1e3)===parseInt(l/1e3))return t.error("errResizeNoChange"),!1}return{w:e,h:n,x:i,y:a,d:o,q:r,b:c}},Ye=function(){var e;(e=Ge())&&(A.elfinderdialog("close"),c.resizeRequest({target:a.hash,width:e.w,height:e.h,x:e.x,y:e.y,degree:e.d,quality:e.q,bg:e.b,mode:K},a,p))},Qe=function(){var n,i=function(){n.addClass(w).fadeIn(function(){z.addClass(y)}),t.disable()},o=function(){c.mime=a.mime,c.prefix=a.name.replace(/ \d+(\.[^.]+)?$/,"$1"),c.requestCmd="mkfile",c.nextAction={},c.data={target:a.phash},e.proxy(t.res("mixin","make"),c)().done(function(o){var r,s;o.added&&o.added.length?(r=o.added[0].hash,s=t.api<2.1032?t.url(a.hash,{async:!0,temporary:!0}):null,e.when(s).done(function(e){t.request({options:{type:"post"},data:{cmd:"put",target:r,encoding:s?"scheme":"hash",content:s?t.convAbsUrl(e):a.hash},notify:{type:"copy",cnt:1},syncOnFail:!0}).fail(i).done(function(e){e=t.normalize(e),t.updateCache(e),a=t.file(r),e.changed&&e.changed.length&&t.change(e),z.show().find(".elfinder-dialog-title").html(t.escape(a.name)),Ye(),n.fadeIn()})}).fail(i)):i()}).fail(i).always(function(){delete c.mime,delete c.prefix,delete c.nextAction,delete c.data}),t.trigger("unselectfiles",{files:[a.hash]})},r=null;Ge()&&(n=m.children("."+c.dialogClass+":visible").removeClass(w).fadeOut(),z.removeClass(y),t.enable(),t.searchStatus.state<2&&a.phash!==t.cwd().hash&&(r=t.exec("open",[a.phash],{thash:a.phash})),e.when([r]).done(function(){r?t.one("cwdrender",o):o()}).fail(i))},Ze={},et="elfinder-resize-handle-hline",tt="elfinder-resize-handle-vline",nt="elfinder-resize-handle-point",it=r,at=ee?e("<img>").attr("crossorigin",t.isCORS?"use-credentials":"").attr("src",it).on("load",function(){try{var e=document.createElement("canvas");at.data("canvas",e).data("ctx",e.getContext("2d")),ot()}catch(t){at.removeData("canvas").removeData("ctx")}}):null,ot=function(){D.find("input.elfinder-resize-quality:visible").trigger("change")},rt=function(n){if(!z.hasClass("elfinder-dialog-minimized")&&!z.is(":hidden")){st.hide(),lt.hide();var i,a,o,r=t.options.dialogContained?m:e(window),s=r.height(),l=r.width(),c="auto",d=!0;z.width(Math.min(f,l-30)),U.attr("style",""),fe&&me&&(be=U.width()-(q.outerWidth()-q.width()),ye=U.height()-(q.outerHeight()-q.height()),Be.updateView(fe,me)),a=A.find("div.elfinder-resize-control").width(),o=U.width(),i=A.width()-20,o>i?(U.width(i),d=!1):i-o<a&&(l>s?U.width(i-a-20):(U.css({"float":"none",marginLeft:"auto",marginRight:"auto"}),d=!1)),d&&(c=a),be=U.width()-(q.outerWidth()-q.width()),m.hasClass("elfinder-fullscreen")?z.height()>s&&(s-=2,U.height(s-z.height()+U.height()),z.css("top",0-m.offset().top)):(s-=30,U.height()>s&&U.height(s)),ye=U.height()-(q.outerHeight()-q.height()),fe&&me&&Oe(),qe.height()&&U.height()>qe.height()+20&&(U.height(qe.height()+20),ye=U.height()-(q.outerHeight()-q.height()),Se()),st.css("width",c).show(),lt.css("width",c).show(),lt.children("span.elfinder-resize-preset:visible").length||lt.hide(),A.elfinderdialog("posInit")}},st=function(){var n,i=e('<fieldset class="elfinder-resize-preset-container">').append(e("<legend>").html(t.i18n("presets"))).css("box-sizing","border-box").hide();return e.each(b,function(t,a){2===a.length&&(n=!0,i.append(e('<span class="elfinder-resize-preset"></span>').data("s",a).text(a[0]+"x"+a[1]).button()))}),n?i:e()}(),lt=st.clone(!0),ct=t.uploadMimeCheck(a.mime,a.phash);s=l=a.size,H.append(e(S).append(e(O).text(t.i18n("width")),X),e(S).append(e(O).text(t.i18n("height")),J,e('<div class="elfinder-resize-whctrls">').append(ze,$)),ee?e(S).append(e(O).text(t.i18n("quality")),ee,e("<span></span>")):e(),T?e(S).append(e(O).text(t.i18n("8pxgrid")).addClass("elfinder-resize-grid8"),Ae):e(),e(S).append(e(O).text(t.i18n("scale")),B),e(S).append(st)),u&&(_.append(e(S).append(e(O).text("X"),G),e(S).append(e(O).text("Y")).append(Y),e(S).append(e(O).text(t.i18n("width")),Q),e(S).append(e(O).text(t.i18n("height")),Z,e('<div class="elfinder-resize-whctrls">').append(Te,$.clone(!0))),ee?e(S).append(e(O).text(t.i18n("quality")),ee.clone(!0),e("<span></span>")):e(),T?e(S).append(e(O).text(t.i18n("8pxgrid")).addClass("elfinder-resize-grid8")):e(),e(S).append(lt)),N.append(e(S).addClass("elfinder-resize-degree").append(e(O).text(t.i18n("rotate")),te,e("<span></span>").text(t.i18n("degree")),e("<div></div>").append(L,W)[g]()),e(S).css("height","20px").append(ne),ee?e(S)[n<1?"show":"hide"]().addClass("elfinder-resize-quality").append(e(O).text(t.i18n("quality")),ee.clone(!0),e("<span></span>")):e(),e(S).append(e(O).text(t.i18n("bgcolor")),de,le,ce),e(S).css("height","20px").append(pe)),L.on("click",function(){ke-=90,Ve.update(ke)}),W.on("click",function(){ke+=90,Ve.update(ke)})),A.append(V).on("resize",function(e){e.stopPropagation()}),u?D.append(H,_.hide(),N.hide()):D.append(H),q.append('<div class="'+et+" "+et+'-top"></div>','<div class="'+et+" "+et+'-bottom"></div>','<div class="'+tt+" "+tt+'-left"></div>','<div class="'+tt+" "+tt+'-right"></div>','<div class="'+nt+" "+nt+'-e"></div>','<div class="'+nt+" "+nt+'-se"></div>','<div class="'+nt+" "+nt+'-s"></div>'),U.append(P).append(q.hide()).append(qe.hide()),u&&(R.css("position","absolute").append('<div class="'+et+" "+et+'-top"></div>','<div class="'+et+" "+et+'-bottom"></div>','<div class="'+tt+" "+tt+'-left"></div>','<div class="'+tt+" "+tt+'-right"></div>','<div class="'+nt+" "+nt+'-n"></div>','<div class="'+nt+" "+nt+'-e"></div>','<div class="'+nt+" "+nt+'-s"></div>','<div class="'+nt+" "+nt+'-w"></div>','<div class="'+nt+" "+nt+'-ne"></div>','<div class="'+nt+" "+nt+'-se"></div>','<div class="'+nt+" "+nt+'-sw"></div>','<div class="'+nt+" "+nt+'-nw"></div>'),U.append(Re.css("position","absolute").hide().append(He,R.append(_e))),U.append(Ne.hide())),U.css("overflow","hidden"),A.append(U,D),Ze[t.i18n("btnApply")]=Ye,ct&&(Ze[t.i18n("btnSaveAs")]=function(){requestAnimationFrame(Qe)}),Ze[t.i18n("btnCancel")]=function(){A.elfinderdialog("close");
25
- },A.find("input,button").addClass("elfinder-tabstop"),z=c.fmDialog(A,{title:t.escape(a.name),width:f,resizable:!1,buttons:Ze,open:function(){var e=function(e){Fe=t.request({data:{cmd:"dim",target:a.hash,substitute:i?400:""},preventDefault:!0}).done(function(e){if(!e.url&&n)A.elfinderdialog("close"),t.error(["errOpen",a.name]);else if(e.dim){var i=e.dim.split("x");return a.width=i[0],a.height=i[1],Ue(i),e.url&&(qe.attr("src",e.url),He.attr("src",e.url),Ne.attr("src",e.url)),Pe()}})},n=!{"image/jpeg":!0,"image/png":!0,"image/gif":!0}[a.mime],i=!(!t.option("substituteImg",a.hash)||!(n||a.size>h.dimSubImgSize)),o=!(!a.width||!a.height);if(C=z.find(".ui-dialog-titlebar .elfinder-titlebar-minimize").hide(),t.bind("resize",rt),qe.attr("src",r).one("error.dimreq",function(){e(!0)}),He.attr("src",r),Ne.attr("src",r),u&&(Ne.on("mousedown touchstart",Ve.start).on("touchend",Ve.stop),z.on("mouseup",Ve.stop)),o&&!i)return Pe();if(a.size>(h.getDimThreshold||0))qe.off("error.dimreq"),e();else if(o)return Pe()},close:function(){u&&(Ne.off("mousedown touchstart",Ve.start).off("touchend",Ve.stop),e(document).off("mouseup",Ve.stop)),t.unbind("resize",rt),e(this).elfinderdialog("destroy")},resize:function(e,t){t&&"off"===t.minimize&&rt()}}).attr("id",o).closest(".ui-dialog").addClass(w),t.UA.ltIE8&&e(".elfinder-dialog").css("filter",""),_e.css({opacity:.2,"background-color":"#fff",position:"absolute"}),R.css("cursor","move"),R.find(".elfinder-resize-handle-point").css({"background-color":"#fff",opacity:.5,"border-color":"#000"}),u||V.find(".api2").remove(),D.find("input,select").prop("disabled",!0),D.find("input.elfinder-resize-quality").next("span").addClass("elfinder-resize-jpgsize").attr("title",t.i18n("roughFileSize"))};return d.length&&d[0].mime.indexOf("image/")!==-1?(o="resize-"+t.namespace+"-"+d[0].hash,r=m.find("#"+o),r.length?(r.elfinderdialog("toTop"),p.resolve()):(t.openUrl(d[0].hash,"sameorigin",function(e){x(d[0],o,e)}),p)):p.reject()}},function(e){var t=function(e,t){var n=0;for(n in t)if("undefined"!=typeof e[t[n]])return t[n];return e[t[n]]="",t[n]};if(e.cssHooks.rotate={get:function(t,n,i){return e(t).rotate()},set:function(t,n){return e(t).rotate(n),n}},e.cssHooks.transform={get:function(e,n,i){var a=t(e.style,["WebkitTransform","MozTransform","OTransform","msTransform","transform"]);return e.style[a]},set:function(e,n){var i=t(e.style,["WebkitTransform","MozTransform","OTransform","msTransform","transform"]);return e.style[i]=n,n}},e.fn.rotate=function(e){var t;return"undefined"==typeof e?window.opera?(t=this.css("transform").match(/rotate\((.*?)\)/),t&&t[1]?Math.round(180*parseFloat(t[1])/Math.PI):0):(t=this.css("transform").match(/rotate\((.*?)\)/),t&&t[1]?parseInt(t[1]):0):(this.css("transform",this.css("transform").replace(/none|rotate\(.*?\)/,"")+"rotate("+parseInt(e)+"deg)"),this)},e.fx.step.rotate=function(t){0==t.state&&(t.start=e(t.elem).rotate(),t.now=t.start),e(t.elem).rotate(t.now)},"undefined"==typeof window.addEventListener&&"undefined"==typeof document.getElementsByClassName){var n=function(e){for(var t=e,n=t.offsetLeft,i=t.offsetTop;t.offsetParent&&(t=t.offsetParent,t==document.body||"static"==t.currentStyle.position);)t!=document.body&&t!=document.documentElement&&(n-=t.scrollLeft,i-=t.scrollTop),n+=t.offsetLeft,i+=t.offsetTop;return{x:n,y:i}},i=function(e){if("static"==e.currentStyle.position){var t=n(e);e.style.position="absolute",e.style.left=t.x+"px",e.style.top=t.y+"px"}},a=function(e,t){var n,a=1,o=1,r=1,s=1;if("undefined"!=typeof e.style.msTransform)return!0;i(e),n=t.match(/rotate\((.*?)\)/);var l=n&&n[1]?parseInt(n[1]):0;l%=360,l<0&&(l=360+l);var c=l*Math.PI/180,d=Math.cos(c),p=Math.sin(c);a*=d,o*=-p,r*=p,s*=d,e.style.filter=(e.style.filter||"").replace(/progid:DXImageTransform\.Microsoft\.Matrix\([^)]*\)/,"")+("progid:DXImageTransform.Microsoft.Matrix(M11="+a+",M12="+o+",M21="+r+",M22="+s+",FilterType='bilinear',sizingMethod='auto expand')");var u=parseInt(e.style.width||e.width||0),h=parseInt(e.style.height||e.height||0);c=l*Math.PI/180;var f=Math.abs(Math.cos(c)),m=Math.abs(Math.sin(c)),g=(u-(u*f+h*m))/2,v=(h-(u*m+h*f))/2;return e.style.marginLeft=Math.floor(g)+"px",e.style.marginTop=Math.floor(v)+"px",!0},o=e.cssHooks.transform.set;e.cssHooks.transform.set=function(e,t){return o.apply(this,[e,t]),a(e,t),t}}}(jQuery),(i.prototype.commands.restore=function(){"use strict";var t=this,n=this.fm,i=0,a=function(t){var o,r=e.Deferred(),s=[],l=[],c=[],d=[];return r._xhrReject=function(){e.each(c,function(){this&&this.reject&&this.reject()}),o&&o._xhrReject()},e.each(t,function(e,t){"directory"===t.mime?s.push(t):l.push(t)}),s.length?(e.each(s,function(e,t){c.push(n.request({data:{cmd:"open",target:t.hash},preventDefault:!0,asNotOpen:!0})),d[e]=t.hash}),e.when.apply(e,c).fail(function(){r.reject()}).done(function(){var t=[];e.each(arguments,function(e,n){n.files&&(n.files.length?t=t.concat(n.files):t.push({hash:"fakefile_"+i++,phash:d[e],mime:"fakefile",name:"fakefile",ts:0}))}),n.cache(t),o=a(t).done(function(e){l=l.concat(e),r.resolve(l)})})):r.resolve(l),r},o=function(t,o,r,s){var l,c,d={},p=[],u=!1,h=[],f=s||{},m=+new Date;n.lockfiles({files:r}),h=e.map(o,function(e){return"directory"===e.mime?e.hash:null}),t.done(function(){h&&n.exec("rm",h,{forceRm:!0,quiet:!0})}).always(function(){n.unlockfiles({files:r})}),l=setTimeout(function(){n.notify({type:"search",id:m,cnt:1,hideCnt:!0,cancel:function(){c&&c._xhrReject(),t.reject()}})},n.notifyDelay),i=0,c=a(o).always(function(){l&&clearTimeout(l),n.notify({type:"search",id:m,cnt:-1,hideCnt:!0})}).fail(function(){t.reject("errRestore","errFileNotFound")}).done(function(i){var a=["errRestore","errFolderNotFound"],o="";i.length?(e.each(i,function(t,i){for(var a,r,s,l=i.phash;l;){if(r=n.trashes[l]){if(!d[r]){if(u)return p.push(i.hash),null;d[r]={},u=!0}s=n.path(i.hash).substr(n.path(l).length).replace(/\\/g,"/"),s=s.replace(/\/[^\/]+?$/,""),""===s&&(s="/"),d[r][s]||(d[r][s]=[]),"fakefile"===i.mime?n.updateCache({removed:[i.hash]}):d[r][s].push(i.hash),(!o||o.length>s.length)&&(o=s);break}a=n.file(l),a?l=a.phash:(l=!1,e.each(n.trashes,function(e){var t=n.file(e),a=n.path(e);if((!t.volumeid||0===i.hash.indexOf(t.volumeid))&&0===n.path(i.hash).indexOf(a))return l=e,!1}))}}),u?e.each(d,function(i,s){var l=Object.keys(s),c=l.length;n.request({data:{cmd:"mkdir",target:i,dirs:l},notify:{type:"chkdir",cnt:c},preventFail:!0}).fail(function(e){t.reject(e),n.unlockfiles({files:r})}).done(function(i){var r,l;(l=i.hashes)?(r=n.getCommand("paste"),r?n.one("mkdirdone",function(){var i=!1;e.each(s,function(e,r){l[e]&&(r.length?n.file(l[e])?(n.clipboard(r,!0),n.exec("paste",[l[e]],{_cmd:"restore",noToast:f.noToast||e!==o}).done(function(e){e&&(e.error||e.warning)&&(i=!0)}).fail(function(){i=!0}).always(function(){--c<1&&(t[i?"reject":"resolve"](),p.length&&n.exec("restore",p))})):t.reject(a):--c<1&&(t.resolve(),p.length&&n.exec("restore",p)))})}):t.reject(["errRestore","errCmdNoSupport","(paste)"])):t.reject(a)})}):t.reject(a)):(t.reject("errFileNotFound"),h&&n.exec("rm",h,{forceRm:!0,quiet:!0}))})};this.restore=o,this.linkedCmds=["copy","paste","mkdir","rm"],this.updateOnSelect=!1,this.init=function(){t=this,n=this.fm},this.getstate=function(t,i){return t=t||n.selected(),t.length&&e.grep(t,function(e){var t=n.file(e);return!(!t||t.locked||n.isRoot(t))}).length==t.length?0:-1},this.exec=function(i,a){var o=e.Deferred().fail(function(e){e&&n.error(e)}),r=t.files(i);return r.length?(e.each(r,function(e,t){return n.isRoot(t)?!o.reject(["errRestore",t.name]):t.locked?!o.reject(["errLocked",t.name]):void 0}),"pending"===o.state()&&this.restore(o,r,i,a),o):o.reject()}}).prototype={forceLoad:!0},i.prototype.commands.rm=function(){"use strict";var t=this,n=this.fm,i='<div class="ui-helper-clearfix elfinder-rm-title"><span class="elfinder-cwd-icon {class} ui-corner-all"></span>{title}<div class="elfinder-rm-desc">{desc}</div></div>',a=function(a,o,s,c,d){var p,u,h,f,m,g,v=o.length,b=n.cwd().hash,y=[],w=n.i18n("calc")+'<span class="elfinder-spinner"></span>';v>1?(f=0,e.each(s,function(e,t){if(!t.size||"unknown"==t.size||"directory"===t.mime)return f="unknown",!1;var n=parseInt(t.size);n>=0&&f>=0&&(f+=n)}),l="unknown"===f,y.push(n.i18n("size")+": "+(l?w:n.formatSize(f))),u=[e(i.replace("{class}","elfinder-cwd-icon-group").replace("{title}","<strong>"+n.i18n("items")+": "+v+"</strong>").replace("{desc}",y.join("<br>")))]):(m=s[0],h=n.tmb(m),l="directory"===m.mime,y.push(n.i18n("size")+": "+(l?w:n.formatSize(m.size))),y.push(n.i18n("modify")+": "+n.formatDate(m)),g=n.escape(m.i18||m.name).replace(/([_.])/g,"&#8203;$1"),u=[e(i.replace("{class}",n.mime2class(m.mime)).replace("{title}","<strong>"+g+"</strong>").replace("{desc}",y.join("<br>")))]),d&&(u=u.concat(d)),u.push(c?"confirmTrash":"confirmRm"),p=n.confirm({title:t.title,text:u,accept:{label:"btnRm",callback:function(){c?t.toTrash(a,o,c):r(a,o)}},cancel:{label:"btnCancel",callback:function(){n.unlockfiles({files:o}),1===o.length&&n.file(o[0]).phash!==b?n.select({selected:o}):n.selectfiles({files:o}),a.reject()}}}),h&&e("<img/>").on("load",function(){p.find(".elfinder-cwd-icon").addClass(h.className).css("background-image","url('"+h.url+"')")}).attr("src",h.url),l&&(l=n.getSize(e.map(s,function(e){return"directory"===e.mime?e.hash:null})).done(function(e){p.find("span.elfinder-spinner").parent().html(n.i18n("size")+": "+e.formated)}).fail(function(){p.find("span.elfinder-spinner").parent().html(n.i18n("size")+": "+n.i18n("unknown"))}).always(function(){l=!1}))},o=function(i,a,o){var r,s,l,c={},d=a.length,p=t.options.toTrashMaxItems,u=[],h=e.Deferred();return d>p?void t.confirm(i,a,t.files(a),null,[n.i18n("tooManyToTrash")]):(e.each(a,function(e,t){var i=n.file(t),a=n.path(t).replace(/\\/g,"/"),o=a.match(/^[^\/]+?(\/(?:[^\/]+?\/)*)[^\/]+?$/);i&&(o&&(o[1]=o[1].replace(/(^\/.*?)\/?$/,"$1"),c[o[1]]||(c[o[1]]=[]),c[o[1]].push(t)),"directory"===i.mime&&u.push(t))}),u.length?(r=n.request({data:{cmd:"size",targets:u},notify:{type:"readdir",cnt:1,hideCnt:!0},preventDefault:!0}).done(function(e){var t=0;e.fileCnt&&(t+=parseInt(e.fileCnt)),e.dirCnt&&(t+=parseInt(e.dirCnt)),h[t>p?"reject":"resolve"]()}).fail(function(){h.reject()}),setTimeout(function(){var e=r&&r.xhr?r.xhr:null;e&&"pending"==e.state()&&(r.syncOnFail(!1),r.reject(),h.reject())},1e3*t.options.infoCheckWait)):h.resolve(),void h.done(function(){s=Object.keys(c),l=s.length,l?n.request({data:{cmd:"mkdir",target:o,dirs:s},notify:{type:"chkdir",cnt:l},preventFail:!0}).fail(function(e){i.reject(e),n.unlockfiles({files:a})}).done(function(t){var o,r,s,d,p=function(t,i,o){var r,s,l,c;e.each(t,function(e,t){Array.isArray(t)&&(h[e]?h[e]=h[e].concat(t):h[e]=t)}),t.sync&&(h.sync=1),t.added&&t.added.length&&(r=function(){var i=[],a=e.map(t.added,function(e){return"directory"===e.mime?e.hash:null});return e.each(t.added,function(t,n){e.inArray(n.phash,a)===-1&&i.push(n.hash)}),n.exec("restore",i,{noToast:!0})},l=function(){return n.request({data:o,notify:{type:"redo",cnt:a.length}})},h.undo?(s=h.undo,h.undo=function(){r(),s()}):h.undo=r,h.redo?(c=h.redo,h.redo=function(){l(),c()}):h.redo=l)},u=["errTrash"],h={},f=function(){return n.ui.notify.children(".elfinder-notify-trash").length};(o=t.hashes)?(s=1/l*100,d=1===l?100:5,r=setTimeout(function(){n.notify({type:"trash",cnt:1,hideCnt:!0,progress:d})},n.notifyDelay),e.each(c,function(t,c){var m,g=n.file(c[0]).phash;o[t]&&(m={cmd:"paste",dst:o[t],targets:c,cut:1},n.request({data:m,preventDefault:!0}).fail(function(e){e&&(u=u.concat(e))}).done(function(e){e=n.normalize(e),n.updateCache(e),p(e,g,m),e.warning&&(u=u.concat(e.warning),delete e.warning),e.removed&&e.removed.length&&n.remove(e),e.added&&e.added.length&&n.add(e),e.changed&&e.changed.length&&n.change(e),n.trigger("paste",e),n.trigger("pastedone"),e.sync&&n.sync()}).always(function(){var t=[],o=2;f()?n.notify({type:"trash",cnt:0,hideCnt:!0,progress:s}):d+=s,--l<1&&(r&&clearTimeout(r),f()&&n.notify({type:"trash",cnt:-1}),n.unlockfiles({files:a}),Object.keys(h).length?(u.length>1&&((h.removed||h.removed.length)&&(t=e.grep(a,function(t){return e.inArray(t,h.removed)===-1})),t.length?(u.length>o&&(o=(n.messages[u[o-1]]||"").indexOf("$")===-1?o:o+1),i.reject(),n.exec("rm",t,{addTexts:u.slice(0,o),forceRm:!0})):n.error(u)),h._noSound=!0,h.undo&&h.redo&&(h.undo={cmd:"trash",callback:h.undo},h.redo={cmd:"trash",callback:h.redo}),i.resolve(h)):i.reject(u))}))})):(i.reject("errFolderNotFound"),n.unlockfiles({files:a}))}):(i.reject(["error","The folder hierarchy to be deleting can not be determined."]),n.unlockfiles({files:a}))}).fail(function(){t.confirm(i,a,t.files(a),null,[n.i18n("tooManyToTrash")])}))},r=function(e,t,i){var a=i?{}:{type:"rm",cnt:t.length};n.request({data:{cmd:"rm",targets:t},notify:a,preventFail:!0}).fail(function(t){e.reject(t)}).done(function(t){(t.error||t.warning)&&(t.sync=!0),e.resolve(t)}).always(function(){n.unlockfiles({files:t})})},s=function(t){var i,a=null;return t&&t.length&&(t.length>1&&2===n.searchStatus.state?(i=n.file(n.root(t[0])).volumeid,e.grep(t,function(e){return 0!==e.indexOf(i)}).length||(a=n.option("trashHash",t[0]))):a=n.option("trashHash",t[0])),a},l=!1;this.confirm=a,this.toTrash=o,this.remove=r,this.syncTitleOnChange=!0,this.updateOnSelect=!1,this.shortcuts=[{pattern:"delete ctrl+backspace shift+delete"}],this.value="rm",this.init=function(){var i=function(i){var a;delete t.extra,t.title=n.i18n("cmd"+t.value),t.className=t.value,t.button&&t.button.children("span.elfinder-button-icon")["trash"===t.value?"addClass":"removeClass"]("elfinder-button-icon-trash"),i&&"cwd"!==i&&(t.state>-1||"navbar"===i)&&"trash"===t.value&&(t.extra={icon:"rm",node:e("<span></span>").attr({title:n.i18n("cmdrm")}).on("ready",function(e,t){a=t.targets}).on("click touchstart",function(e){"touchstart"===e.type&&e.originalEvent.touches.length>1||(e.stopPropagation(),e.preventDefault(),n.getUI().trigger("click"),n.exec("rm",a,{_userAction:!0,forceRm:!0}))})})};t=this,n=this.fm,t.change(function(){i()}),n.bind("contextmenucreate",function(e){i(e.data.type)})},this.getstate=function(t){var i=this.hashes(t),a=function(t){var i=!0;return e.grep(t,function(e){var t;return i=!(!i||!(t=n.file(e))||t.locked||n.isRoot(t))})};return i.length&&a(i).length==i.length?0:-1},this.exec=function(i,a){var o,c=a||{},d=e.Deferred().always(function(){l&&l.state&&"pending"===l.state()&&l.reject()}).fail(function(e){e&&n.error(e)}).done(function(e){!c.quiet&&!e._noSound&&e.removed&&e.removed.length&&n.trigger("playsound",{soundFile:"rm.wav"})}),p=t.files(i),u=p.length,h=null,f=c.addTexts?c.addTexts:null,m=c.forceRm,g=c.quiet;return u?(e.each(p,function(e,t){return n.isRoot(t)?!d.reject(["errRm",t.name,"errPerm"]):t.locked?!d.reject(["errLocked",t.name]):void 0}),"pending"===d.state()&&(o=t.hashes(i),u=p.length,(m||t.event&&t.event.originalEvent&&t.event.originalEvent.shiftKey)&&(h="",t.title=n.i18n("cmdrm")),null===h&&(h=s(o)),n.lockfiles({files:o}),h&&t.options.quickTrash?t.toTrash(d,o,h):g?r(d,o,g):t.confirm(d,o,p,h,f)),d):d.reject()},n.bind("select contextmenucreate closecontextmenu",function(e){var i=(e.data?e.data.selected||e.data.targets:null)||n.selected();i&&i.length&&t.update(void 0,(i?s(i):n.option("trashHash"))?"trash":"rm")})},i.prototype.commands.search=function(){"use strict";this.title="Find files",this.options={ui:"searchbutton"},this.alwaysEnabled=!0,this.updateOnSelect=!1,this.getstate=function(){return 0},this.exec=function(t,n,i,a){var o,r,s=this.fm,l=[],c=a||"",d=s.options.onlyMimes,p=[],u=function(e){return c&&"SearchName"!==c&&"SearchMime"!==c&&(e.type=c),e};return"string"==typeof t&&t?("object"==typeof n&&(i=n.mime||"",n=n.target||""),n=n?n:"",i?(i=e.trim(i).replace(","," ").split(" "),d.length&&(i=e.map(i,function(t){return t=e.trim(t),t&&(e.inArray(t,d)!==-1||e.grep(d,function(e){return 0===t.indexOf(e)}).length)?t:null}))):i=[].concat(d),s.trigger("searchstart",u({query:t,target:n,mimes:i})),!d.length||i.length?""===n&&s.api>=2.1?(r=Object.keys(s.roots).length,e.each(s.roots,function(e,n){l.push(s.request({data:u({cmd:"search",q:t,target:n,mimes:i}),notify:{type:"search",cnt:1,hideCnt:!(r>1)},cancel:!0,preventDone:!0}))})):(l.push(s.request({data:u({cmd:"search",q:t,target:n,mimes:i}),notify:{type:"search",cnt:1,hideCnt:!0},cancel:!0,preventDone:!0})),""!==n&&s.api>=2.1&&Object.keys(s.leafRoots).length&&e.each(s.leafRoots,function(a,r){for(o=a;o;)n===o&&e.each(r,function(){var e=s.file(this);e&&e.volumeid&&p.push(e.volumeid),l.push(s.request({data:u({cmd:"search",q:t,target:this,mimes:i}),notify:{type:"search",cnt:1,hideCnt:!1},cancel:!0,preventDone:!0}))}),o=(s.file(o)||{}).phash})):l=[e.Deferred().resolve({files:[]})],s.searchStatus.mixed=l.length>1&&p,e.when.apply(e,l).done(function(e){var t,n=arguments.length;if(e.warning&&s.error(e.warning),n>1)for(e.files=e.files||[],t=1;t<n;t++)arguments[t].warning&&s.error(arguments[t].warning),arguments[t].files&&e.files.push.apply(e.files,arguments[t].files);e.files&&e.files.length&&s.cache(e.files),s.lazy(function(){s.trigger("search",e)}).then(function(){return s.lazy(function(){s.trigger("searchdone")})}).then(function(){e.sync&&s.sync()})})):(s.getUI("toolbar").find("."+s.res("class","searchbtn")+" :text").trigger("focus"),e.Deferred().reject())}},i.prototype.commands.selectall=function(){"use strict";var t=0;this.fm.bind("select",function(e){t=e.data&&e.data.selectall?-1:0}),this.state=0,this.updateOnSelect=!1,this.getstate=function(){return t},this.exec=function(){return e(document).trigger(e.Event("keydown",{keyCode:65,ctrlKey:!0,shiftKey:!1,altKey:!1,metaKey:!1})),e.Deferred().resolve()}},i.prototype.commands.selectinvert=function(){"use strict";this.updateOnSelect=!1,this.getstate=function(){return 0},this.exec=function(){return e(document).trigger(e.Event("keydown",{keyCode:73,ctrlKey:!0,shiftKey:!0,altKey:!1,metaKey:!1})),e.Deferred().resolve()}},i.prototype.commands.selectnone=function(){"use strict";var t=this.fm,n=-1;t.bind("select",function(e){n=e.data&&e.data.unselectall?-1:0}),this.state=-1,this.updateOnSelect=!1,this.getstate=function(){return n},this.exec=function(){return t.getUI("cwd").trigger("unselectall"),e.Deferred().resolve()}},i.prototype.commands.sort=function(){"use strict";var t=this,n=t.fm,i=function(){t.variants=[],e.each(n.sortRules,function(e,i){if(n.sorters[e]){var a=e===n.sortType?"asc"===n.sortOrder?"n":"s":"";t.variants.push([e,(a?'<span class="ui-icon ui-icon-arrowthick-1-'+a+'"></span>':"")+"&nbsp;"+n.i18n("sort"+e)])}}),t.variants.push("|"),t.variants.push(["stick",(n.sortStickFolders?'<span class="ui-icon ui-icon-check"></span>':"")+"&nbsp;"+n.i18n("sortFoldersFirst")]),n.ui.tree&&null!==n.options.sortAlsoTreeview&&(t.variants.push("|"),t.variants.push(["tree",(n.sortAlsoTreeview?'<span class="ui-icon ui-icon-check"></span>':"")+"&nbsp;"+n.i18n("sortAlsoTreeview")])),a()},a=function(){var t,i,a=n.getUI("contextmenu");a.is(":visible")&&(t=a.find("span.elfinder-button-icon-sort"),i=t.siblings("div.elfinder-contextmenu-sub"),i.find("span.ui-icon").remove(),i.children("div.elfinder-contextsubmenu-item").each(function(){var t,i=e(this).children("span"),a=i.text().trim();a===(o.stick||(o.stick=n.i18n("sortFoldersFirst")))?n.sortStickFolders&&i.prepend('<span class="ui-icon ui-icon-check"></span>'):a===(o.tree||(o.tree=n.i18n("sortAlsoTreeview")))?n.sortAlsoTreeview&&i.prepend('<span class="ui-icon ui-icon-check"></span>'):a===(o[n.sortType]||(o[n.sortType]=n.i18n("sort"+n.sortType)))&&(t="asc"===n.sortOrder?"n":"s",i.prepend('<span class="ui-icon ui-icon-arrowthick-1-'+t+'"></span>'))}))},o={};this.options={ui:"sortbutton"},this.keepContextmenu=!0,n.bind("sortchange",i).bind("sorterupdate",function(){i(),n.getUI().children(".elfinder-button-sort-menu").children(".elfinder-button-menu-item").each(function(){var t=e(this),i=t.attr("rel");t.toggle(!(i&&!n.sorters[i]))})}).bind("cwdrender",function(){var t=e(n.cwd).find("div.elfinder-cwd-wrapper-list table");t.length&&e.each(n.sortRules,function(i,a){var o=t.find("thead tr td.elfinder-cwd-view-th-"+i);if(o.length){var r,s=i==n.sortType,l={type:i,order:s?"asc"==n.sortOrder?"desc":"asc":n.sortOrder};s&&(o.addClass("ui-state-active"),r="asc"==n.sortOrder?"n":"s",e('<span class="ui-icon ui-icon-triangle-1-'+r+'"></span>').appendTo(o)),e(o).on("click",function(t){e(this).data("dragging")||(t.stopPropagation(),n.getUI("cwd").data("longtap")||n.exec("sort",[],l))}).on("mouseenter mouseleave",function(t){e(this).toggleClass("ui-state-hover","mouseenter"===t.type)})}})}),this.getstate=function(){return 0},this.exec=function(t,n){var i=this.fm,a=e.isPlainObject(n)?n:function(){n+="";var e={};return"stick"===n?e.stick=!i.sortStickFolders:"tree"===n?e.tree=!i.sortAlsoTreeview:i.sorters[n]&&(i.sortType===n?e.order="asc"===i.sortOrder?"desc":"asc":e.type=n),e}(),o=Object.assign({type:i.sortType,order:i.sortOrder,stick:i.sortStickFolders,tree:i.sortAlsoTreeview},a);return i.lazy(function(){i.setSort(o.type,o.order,o.stick,o.tree),this.resolve()})}},i.prototype.commands.undo=function(){"use strict";var t=this,n=this.fm,i=function(e){e?(t.title=n.i18n("cmdundo")+" "+n.i18n("cmd"+e.cmd),t.state=0):(t.title=n.i18n("cmdundo"),t.state=-1),t.change()},a=[];this.alwaysEnabled=!0,this.updateOnSelect=!1,this.shortcuts=[{pattern:"ctrl+z"}],this.syncTitleOnChange=!0,this.getstate=function(){return a.length?0:-1},this.setUndo=function(t,o){var r={};t&&e.isPlainObject(t)&&t.cmd&&t.callback&&(Object.assign(r,t),o?(delete o.undo,r.redo=o):n.getCommand("redo").setRedo(null),a.push(r),i(r))},this.exec=function(){var t,o,r=n.getCommand("redo"),s=e.Deferred(),l={};return a.length?(t=a.pop(),t.redo?(Object.assign(l,t.redo),delete t.redo):l=null,s.done(function(){l&&r.setRedo(l,t)}),i(a.length?a[a.length-1]:void 0),o=t.callback(),o&&o.done?o.done(function(){s.resolve()}).fail(function(){s.reject()}):s.resolve(),a.length?this.update(0,a[a.length-1].name):this.update(-1,"")):s.reject(),s},n.bind("exec",function(e){var n=e.data||{};n.opts&&n.opts._userAction&&n.dfrd&&n.dfrd.done&&n.dfrd.done(function(e){e&&e.undo&&e.redo&&(e.undo.redo=e.redo,t.setUndo(e.undo))})})},i.prototype.commands.redo=function(){"use strict";var t=this,n=this.fm,i=function(e){e&&e.callback?(t.title=n.i18n("cmdredo")+" "+n.i18n("cmd"+e.cmd),t.state=0):(t.title=n.i18n("cmdredo"),t.state=-1),t.change()},a=[];this.alwaysEnabled=!0,this.updateOnSelect=!1,this.shortcuts=[{pattern:"shift+ctrl+z ctrl+y"}],this.syncTitleOnChange=!0,this.getstate=function(){return a.length?0:-1},this.setRedo=function(e,t){null===e?(a=[],i()):e&&e.cmd&&e.callback&&(t&&(e.undo=t),a.push(e),i(e))},this.exec=function(){var t,o,r=n.getCommand("undo"),s=e.Deferred(),l={},c={};return a.length?(t=a.pop(),t.undo&&(Object.assign(l,t.undo),Object.assign(c,t),delete c.undo,s.done(function(){r.setUndo(l,c)})),i(a.length?a[a.length-1]:void 0),o=t.callback(),o&&o.done?o.done(function(){s.resolve()}).fail(function(){s.reject()}):s.resolve(),s):s.reject()}},(i.prototype.commands.up=function(){"use strict";this.alwaysEnabled=!0,this.updateOnSelect=!1,this.shortcuts=[{pattern:"ctrl+up"}],this.getstate=function(){return this.fm.cwd().phash?0:-1},this.exec=function(){var t=this.fm,n=t.cwd().hash;return this.fm.cwd().phash?this.fm.exec("open",this.fm.cwd().phash).done(function(){t.one("opendone",function(){t.selectfiles({files:[n]})})}):e.Deferred().reject()}}).prototype={forceLoad:!0},i.prototype.commands.upload=function(){"use strict";var t=this.fm.res("class","hover");this.disableOnSearch=!0,this.updateOnSelect=!1,this.shortcuts=[{pattern:"ctrl+u"}],this.getstate=function(e){var t,n=this.fm,i=e||[n.cwd().hash];return this._disabled||1!=i.length||(t=n.file(i[0])),t&&"directory"==t.mime&&t.write?0:-1},this.exec=function(n){var i,a,o,r,s,l,c,d=this.fm,p=d.cwd().hash,u=function(){var e,t=n&&n instanceof Array?n:null;return(!n||n instanceof Array)&&(t||1!==(e=d.selected()).length||"directory"!==d.file(e[0]).mime?t&&1===t.length&&"directory"===d.file(t[0]).mime||(t=[p]):t=e),t},h=u(),f=h?h[0]:n&&n.target?n.target:null,m=f?d.file(f):d.cwd(),g=function(t){d.upload(t).fail(function(e){w.reject(e)}).done(function(t){var n;d.getUI("cwd");if(w.resolve(t),t&&t.added&&t.added[0]&&!d.ui.notify.children(".elfinder-notify-upload").length){var i=d.findCwdNodes(t.added);i.length?i.trigger("scrolltoview"):(m.hash!==p?n=e("<div></div>").append(e('<button type="button" class="ui-button ui-widget ui-state-default ui-corner-all elfinder-tabstop"><span class="ui-button-text">'+d.i18n("cmdopendir")+"</span></button>").on("mouseenter mouseleave",function(t){e(this).toggleClass("ui-state-hover","mouseenter"==t.type)}).on("click",function(){d.exec("open",f).done(function(){d.one("opendone",function(){d.trigger("selectfiles",{files:e.map(t.added,function(e){return e.hash})})})})})):d.trigger("selectfiles",{files:e.map(t.added,function(e){return e.hash})}),d.toast({msg:d.i18n(["complete",d.i18n("cmdupload")]),extNode:n}))}}).progress(function(){w.notifyWith(this,Array.from(arguments))})},v=function(e){i.elfinderdialog("close"),h&&(e.target=h[0]),g(e)},b=function(){var t=m.hash,n=e.map(d.files(t),function(e){return"directory"===e.mime&&e.write?e:null});return n.length?e('<div class="elfinder-upload-dirselect elfinder-tabstop" title="'+d.i18n("folders")+'"></div>').on("click",function(t){t.stopPropagation(),t.preventDefault(),n=d.sortFiles(n);var a=e(this),o=(d.cwd(),i.closest("div.ui-dialog")),r=function(e,t){return{label:d.escape(e.i18||e.name),icon:t,remain:!1,callback:function(){var t=o.children(".ui-dialog-titlebar:first").find("span.elfinder-upload-target");h=[e.hash],t.html(" - "+d.escape(e.i18||e.name)),a.trigger("focus")},options:{className:h&&h.length&&e.hash===h[0]?"ui-state-active":"",iconClass:e.csscls||"",iconImg:e.icon||""}}},s=[r(m,"opendir"),"|"];e.each(n,function(e,t){s.push(r(t,"dir"))}),a.trigger("blur"),d.trigger("contextmenu",{raw:s,x:t.pageX||e(this).offset().left,y:t.pageY||e(this).offset().top,prevNode:o,fitHeight:!0})}).append('<span class="elfinder-button-icon elfinder-button-icon-dir" ></span>'):e()},y=function(n,i){var a=e('<input type="file" '+n+"/>").on("click",function(){d.UA.IE&&setTimeout(function(){o.css("display","none").css("position","relative"),requestAnimationFrame(function(){o.css("display","").css("position","")})},100)}).on("change",function(){v({input:a.get(0),type:"files"})}).on("dragover",function(e){e.originalEvent.dataTransfer.dropEffect="copy"}),o=e("<form></form>").append(a).on("click",function(e){e.stopPropagation()});return e('<div class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only elfinder-tabstop elfinder-focus"><span class="ui-button-text">'+d.i18n(i)+"</span></div>").append(o).on("click",function(e){e.stopPropagation(),e.preventDefault(),a.trigger("click")}).on("mouseenter mouseleave",function(n){e(this).toggleClass(t,"mouseenter"===n.type)})},w=e.Deferred();return r=function(t){t.stopPropagation(),t.preventDefault();var n,i=!1,a="",o=null,r="",s=null,l=t._target||null,c=t.dataTransfer||null,p="";if(c){c.types&&c.types.length&&e.inArray("Files",c.types)!==-1?p="file":c.items&&c.items.length&&c.items[0].kind&&(p=c.items[0].kind);try{if(o=c.getData("elfinderfrom"),o&&(r=window.location.href+d.cwd().hash,!l&&o===r||l===r))return void w.reject()}catch(t){}if("file"===p&&(c.items[0].getAsEntry||c.items[0].webkitGetAsEntry))i=c,a="data";else if("string"!==p&&c.files&&c.files.length&&e.inArray("Text",c.types)===-1)i=c.files,a="files";else{try{(s=c.getData("text/html"))&&s.match(/<(?:img|a)/i)&&(i=[s],a="html")}catch(t){}i||((s=c.getData("text"))?(i=[s],a="text"):c&&c.files&&(p="file"))}}i?g({files:i,type:a,target:l,dropEvt:t}):(n=["errUploadNoFiles"],"file"===p&&n.push("errFolderUpload"),d.error(n),w.reject())},!h&&n?(n.input||n.files?(n.type="files",g(n)):n.dropEvt&&r(n.dropEvt),w):(s=function(t){var n,i=t.originalEvent||t,a=[],o=[];if(i.clipboardData){if(i.clipboardData.items&&i.clipboardData.items.length){o=i.clipboardData.items;for(var r=0;r<o.length;r++)"file"==i.clipboardData.items[r].kind&&(n=i.clipboardData.items[r].getAsFile(),a.push(n))}else i.clipboardData.files&&i.clipboardData.files.length&&(a=i.clipboardData.files);if(a.length)return void v({files:a,type:"files",clipdata:!0})}var s=i.target||i.srcElement;requestAnimationFrame(function(){var t,n="text";s.innerHTML&&(e(s).find("img").each(function(t,n){n.src.match(/^webkit-fake-url:\/\//)&&e(n).remove()}),e(s).find("a,img").length&&(n="html"),t=s.innerHTML,s.innerHTML="",v({files:[t],type:n}))})},i=e('<div class="elfinder-upload-dialog-wrapper"></div>').append(y("multiple","selectForUpload")),!d.UA.Mobile&&function(e){return"undefined"!=typeof e.webkitdirectory||"undefined"!=typeof e.directory}(document.createElement("input"))&&i.append(y("multiple webkitdirectory directory","selectFolder")),m.dirs&&(m.hash===p||d.navHash2Elm(m.hash).hasClass("elfinder-subtree-loaded")?b().appendTo(i):(l=e('<div class="elfinder-upload-dirselect" title="'+d.i18n("nowLoading")+'"></div>').append('<span class="elfinder-button-icon elfinder-button-icon-spinner" ></span>').appendTo(i),d.request({cmd:"tree",target:m.hash}).done(function(){d.one("treedone",function(){l.replaceWith(b()),c.elfinderdialog("tabstopsInit")})}).fail(function(){l.remove()}))),d.dragUpload?a=e('<div class="ui-corner-all elfinder-upload-dropbox elfinder-tabstop" contenteditable="true" data-ph="'+d.i18n("dropPasteFiles")+'"></div>').on("paste",function(e){s(e)}).on("mousedown click",function(){e(this).trigger("focus")}).on("focus",function(){this.innerHTML=""}).on("mouseover",function(){e(this).addClass(t)}).on("mouseout",function(){e(this).removeClass(t)}).on("dragenter",function(n){n.stopPropagation(),n.preventDefault(),e(this).addClass(t)}).on("dragleave",function(n){n.stopPropagation(),n.preventDefault(),e(this).removeClass(t)}).on("dragover",function(n){n.stopPropagation(),n.preventDefault(),n.originalEvent.dataTransfer.dropEffect="copy",e(this).addClass(t)}).on("drop",function(e){i.elfinderdialog("close"),h&&(e.originalEvent._target=h[0]),r(e.originalEvent)}).prependTo(i).after('<div class="elfinder-upload-dialog-or">'+d.i18n("or")+"</div>")[0]:o=e('<div class="ui-corner-all elfinder-upload-dropbox" contenteditable="true">'+d.i18n("dropFilesBrowser")+"</div>").on("paste drop",function(e){s(e)}).on("mousedown click",function(){e(this).trigger("focus")}).on("focus",function(){this.innerHTML=""}).on("dragenter mouseover",function(){e(this).addClass(t)}).on("dragleave mouseout",function(){e(this).removeClass(t)}).prependTo(i).after('<div class="elfinder-upload-dialog-or">'+d.i18n("or")+"</div>")[0],c=this.fmDialog(i,{title:this.title+'<span class="elfinder-upload-target">'+(m?" - "+d.escape(m.i18||m.name):"")+"</span>",modal:!0,resizable:!1,destroyOnClose:!0,propagationEvents:["mousemove","mouseup","click"],close:function(){var e=d.getUI("contextmenu");e.is(":visible")&&e.click()}}),w)}},i.prototype.commands.view=function(){"use strict";var t,n=this,i=this.fm;this.value=i.viewType,this.alwaysEnabled=!0,this.updateOnSelect=!1,this.options={ui:"viewbutton"},this.getstate=function(){return 0},this.extra={icon:"menu",node:e("<span></span>").attr({title:i.i18n("viewtype")}).on("click touchstart",function(t){if(!("touchstart"===t.type&&t.originalEvent.touches.length>1)){var n=e(this);t.stopPropagation(),t.preventDefault(),i.trigger("contextmenu",{raw:getSubMenuRaw(),x:n.offset().left,y:n.offset().top})}})},this.exec=function(){var e=this,t="list"==this.value?"icons":"list";return i.storage("view",t),i.lazy(function(){i.viewchange(),e.update(void 0,t),this.resolve()})},i.bind("init",function(){t=function(){var e,t=i.getUI("cwd"),a=[],o=i.options.uiOptions.cwd.iconsView.sizeNames,r=i.options.uiOptions.cwd.iconsView.sizeMax;for(e=0;e<=r;e++)a.push({label:i.i18n(o[e]||"Size-"+e+" icons"),icon:"view",callback:function(e){return function(){t.trigger("iconpref",{size:e}),i.storage("iconsize",e),"list"===n.value&&n.exec()}}(e)});return a.push("|"),a.push({label:i.i18n("viewlist"),icon:"view-list",
26
- callback:function(){"list"!==n.value&&n.exec()}}),a}()}).bind("contextmenucreate",function(){n.extra={icon:"menu",node:e("<span></span>").attr({title:i.i18n("cmdview")}).on("click touchstart",function(a){if(!("touchstart"===a.type&&a.originalEvent.touches.length>1)){var o,r,s=e(this);t.concat();for(o="list"===n.value?t.length-1:parseInt(i.storage("iconsize")||0),r=0;r<t.length;r++)"|"!==t[r]&&(t[r].options=r===o?{className:"ui-state-active"}:void 0);a.stopPropagation(),a.preventDefault(),i.trigger("contextmenu",{raw:t,x:s.offset().left,y:s.offset().top})}})}})},i});
1
  /*!
2
  * elFinder - file manager for web
3
+ * Version 2.1.61 (2022-04-19)
4
  * http://elfinder.org
5
  *
6
  * Copyright 2009-2022, Studio 42
16
  a)){if(n=n.toLowerCase(),s=n.split("/"),r=t.escape(t.mimeTypes[n]||(i.replace(/.bac?k$/i,"").match(/\.([^.]+)$/)||["",""])[1])){o=".elfinder-cwd-icon-"+s[0].replace(/(\.|\+)/g,"-"),"undefined"!=typeof s[1]&&(o+=".elfinder-cwd-icon-"+s[1].replace(/(\.|\+)/g,"-"));try{a.insertRule(o+':before{content:"'+r.toLowerCase()+'"}',0)}catch(l){}}V[n]=!0}},X=function(e){return e.mime&&"directory"!==e.mime&&!V[e.mime]&&K(e.mime,e.name),N[p?"row":"icon"].replace(/\{([a-z0-9_]+)\}/g,function(n,i){return $[i]?$[i](e,t):e[i]?e[i]:""})},J=e(),G=!1,Y=function(t,n){function i(e,t){return e[t+"All"]("[id]:not(."+w+"):not(.elfinder-cwd-parent):first")}var a,o,r,s,l,c=e.ui.keyCode,d=t==c.LEFT||t==c.UP,f=Ue.find("[id]."+y);if(f.length)if(a=f.filter(d?":first":":last"),r=i(a,d?"prev":"next"),r.length)if(p||t==c.LEFT||t==c.RIGHT)o=r;else if(s=a.position().top,l=a.position().left,o=a,d){do o=o.prev("[id]");while(o.length&&!(o.position().top<s&&o.position().left<=l));o.hasClass(w)&&(o=i(o,"next"))}else{do o=o.next("[id]");while(o.length&&!(o.position().top>s&&o.position().left>=l));o.hasClass(w)&&(o=i(o,"prev")),o.length||(r=Ue.find("[id]:not(."+w+"):last"),r.position().top>s&&(o=r))}else o=a;else o=J.length?d?J.prev():J:Ue.find("[id]:not(."+w+"):not(.elfinder-cwd-parent):"+(d?"last":"first"));o&&o.length&&!o.hasClass("elfinder-cwd-parent")&&(a&&n?o=a.add(a[d?"prevUntil":"nextUntil"]("#"+o.attr("id"))).add(o):f.trigger(h),o.trigger(u),re(o.filter(d?":first":":last")),oe())},Q={},Z=function(e){t.cwdHash2Elm(e).trigger(u)},ee=!1,te=function(){t.cwd().hash;R&&Re.find("input").prop("checked",!0),t.lazy(function(){var n;t.maxTargets&&(F||E).length>t.maxTargets?(ne({notrigger:!0}),n=e.map(F||E,function(e){return t.file(e)||null}),n=n.slice(0,t.maxTargets),Q={},e.each(n,function(e,n){Q[n.hash]=!0,t.cwdHash2Elm(n.hash).trigger(u)}),t.toast({mode:"warning",msg:t.i18n(["errMaxTargets",t.maxTargets])})):(Ue.find("[id]:not(."+y+"):not(.elfinder-cwd-parent)").trigger(u),Q=t.arrayFlip(F||E,!0)),oe(),R&&Re.data("pending",!1)},0,{repaint:!0})},ne=function(e){var t=e||{};R&&Re.find("input").prop("checked",!1),Object.keys(Q).length&&(G=!1,Q={},Ue.find("[id]."+y).trigger(h),R&&Ue.find("input:checkbox."+j).prop("checked",!1)),!t.notrigger&&oe(),R&&Re.data("pending",!1),Ue.removeClass("elfinder-cwd-allselected")},ie=function(){var n={};ee?ne():Object.keys(Q).length?(e.each(F||E,function(e,i){var a=t.cwdHash2Elm(i);Q[i]?a.length&&a.trigger(h):(n[i]=!0,a.length&&a.trigger(u))}),Q=n,oe()):te()},ae=void 0,oe=function(){var e=Object.keys(Q),n={selected:e,origin:"cwd"};ge&&(e.length>1||e[0]!==t.cwdId2Hash(ge.attr("id")))&&ge.hasClass(y)&&ge.trigger(h),ee=e.length&&e.length===(F||E).length&&(!t.maxTargets||e.length<=t.maxTargets),R&&(Re.find("input").prop("checked",ee),Ue[ee?"addClass":"removeClass"]("elfinder-cwd-allselected")),ee?n.selectall=!0:e.length||(n.unselectall=!0),t.trigger("select",n)},re=function(e,n){if(e.length){var i=e.position().top,a=e.outerHeight(!0),o=Pe.scrollTop(),r=Pe.get(0).clientHeight,s=we?we.outerHeight(!0):0;i+s+a>o+r?Pe.scrollTop(parseInt(i+s+a-r)):i<o&&Pe.scrollTop(i),p&&Pe.scrollLeft(0),!!n&&t.resources.blink(e,"lookme")}},se=[],le={},ce=function(e){for(var t=se.length;t--;)if(se[t].hash==e)return t;return-1},de="elfscrstart",pe="elfscrstop",ue=!1,he={disabled:!0,filter:"[id]:first",stop:oe,delay:250,appendTo:"body",autoRefresh:!1,selected:function(t,n){e(n.selected).trigger(u)},unselected:function(t,n){e(n.unselected).trigger(h)}},fe={},me=function(a,o){if(le.renderd){var r=(p?Ue.find("tbody:first"):Ue).children("[id]"+(n.oldSchool?":not(.elfinder-cwd-parent)":"")+":first");if(r.length){var s,l,c=Ue.data("selectable"),d=function(){var n=Pe.offset(),a=Pe.width(),o=e(window),s=r.width()/2,l=Math.min(n.left-o.scrollLeft()+("ltr"===t.direction?s:a-s),n.left+a-10),c=n.top-o.scrollTop()+10+(p?i:0);return{left:Math.max(0,Math.round(l)),top:Math.max(0,Math.round(c))}}(),u=a?r:e(document.elementFromPoint(d.left,d.top)),h={},f={},m=5,g=Math.ceil((le.hpi?Math.ceil(Le.data("rectangle").height/le.hpi*1.5):be)/m),y=function(){var e,n,i;for(i=0;i<m&&(e=u.attr("id"),e&&(le.getTmbs=[],n=t.cwdId2Hash(e),fe[n]=e,le.attachTmbs[n]&&(f[n]=le.attachTmbs[n]),c&&(h[e]=!0)),u=u.next(),u.length);i++);},w=function(){var e;Ue.data("selectable")&&(Object.assign(h,Q),e=Object.keys(h),e.length&&(he.filter="#"+e.join(", #"),Ue.selectable("enable").selectable("option",{filter:he.filter}).selectable("refresh"))),Object.keys(f).length&&(le.getTmbs=[],Ae(f))},x=function(){u.hasClass(v)||(u=u.closest(b))};if(fe={},c&&Ue.selectable("option","disabled"),u.length&&(u.hasClass(v)||u.closest(b).length||(l=t.getUI().find(".ui-dialog:visible,.ui-widget:visible"),l.length?(l.hide(),u=e(document.elementFromPoint(d.left,d.top)),l.show()):l=null),x(),u.length||(l&&l.hide(),u=e(document.elementFromPoint(d.left,d.top+5)),l&&l.show(),x())),u.length){if(u.attr("id"))if(a){for(var k=0;k<g&&(y(),u.length);k++);w()}else le.repaintJob&&"pending"===le.repaintJob.state()&&le.repaintJob.reject(),s=new Array(g),le.repaintJob=t.asyncJob(function(){y(),u.length||(w(),le.repaintJob&&"pending"===le.repaintJob.state()&&le.repaintJob.reject())},s).done(w)}else a&&le.renderd&&(o=o||0,o<10&&requestAnimationFrame(function(){me(a,++o)}))}}},ge=null,ve=function(n){var i=t.cwd().phash,a=t.file(i)||null,o=function(n){n&&(ge=e(X(e.extend(!0,{},n,{name:"..",i18:"..",mime:"directory"}))).addClass("elfinder-cwd-parent").on("dblclick",function(){t.trigger("select",{selected:[i]}).exec("open",i)}),(p?ge.children("td:first"):ge).children(".elfinder-cwd-select").remove(),t.cwdHash2Elm(i).length?t.cwdHash2Elm(i).replaceWith(ge):(p?Ue.find("tbody"):Ue).prepend(ge),t.draggingUiHelper&&t.draggingUiHelper.data("refreshPositions",1))};a?o(a):(o({hash:i,read:!0,write:!0}),t.getUI("tree").length?t.one("parents",function(){o(t.file(i)||null),Pe.trigger(pe)}):t.request({data:{cmd:"parents",target:t.cwd().hash},preventFail:!0}).done(function(e){o(t.file(i)||null),Pe.trigger(pe)}))},be=t.options.showFiles,ye=function(){if(!(le.rendering||le.renderd&&!se.length)){var i,a,o=p?Ue.children("table").children("tbody"):Ue,r=!!e.htmlPrefilter,s=e(r?document.createDocumentFragment():"<div></div>"),l=function(n){var i,a,l,c=n||null,h=[],f=!1,m={},g="self"===t.option("tmbUrl"),v=!le.renderd;i=se.splice(0,be+(c||0)/(le.hpi||1)),le.renderd+=i.length,se.length||(qe.hide(),Pe.off(pe,ye)),a=[],h=e.map(i,function(e){return e.hash&&e.name?("directory"==e.mime&&(f=!0),(e.tmb&&(1!=e.tmb||e.size>0)||g&&0===e.mime.indexOf("image/"))&&(m[e.hash]=e.tmb||"self"),I[e.hash]&&a.push(e.hash),X(e)):null}),s.empty().append(h.join("")),f&&!d&&Te(s),l=[],Object.keys(Q).length&&s.find("[id]:not(."+y+"):not(.elfinder-cwd-parent)").each(function(){Q[t.cwdId2Hash(this.id)]&&l.push(e(this))}),o.append(r?s:s.children()),l.length&&(e.each(l,function(e,t){t.trigger(u)}),oe()),a.length&&t.trigger("lockfiles",{files:a}),!le.hpi&&Ee(o,i.length),p&&(Ue.find("thead").show(),ke({fitWidth:!_})),Object.keys(m).length&&Object.assign(le.attachTmbs,m),v&&(d||Ue.data("selectable")||Ue.selectable(he).data("selectable",!0)),!ue&&Pe.trigger(pe)};le.renderd||(le.rendering=!0,Pe.scrollTop(0),i=t.cwd().phash,l(),n.oldSchool&&(i&&!O?ve(i):ge=e()),p&&(_&&Ce(),ke({fitWidth:!0})),le.itemH=(p?o.find("tr:first"):o.find("[id]:first")).outerHeight(!0),t.trigger("cwdrender"),le.rendering=!1,me(!0)),!le.rendering&&se.length?(a=Pe.height()+Pe.scrollTop()+t.options.showThreshold+le.row-le.renderd*le.hpi)>0?(le.rendering=!0,t.lazy(function(){l(a),le.rendering=!1})):!t.enabled()&&_e():_e()}},we=null,xe=t.UA.CSS.positionSticky&&t.UA.CSS.widthMaxContent,ke=function(a){if(i=0,n.listView.fixedHeader){var o,r,s,l,c,d,p,u,h,f,m,g,v,b=function(){var e,n;n="ltr"===t.direction?"left":"right",e=("ltr"===t.direction?Pe.scrollLeft():s.outerWidth(!0)-Pe.width()-Pe.scrollLeft())*-1,r.css(n)!==e&&r.css(n,e)},y=a||{};if(c=Ue.find("tbody"),u=c.children("tr:first"),u.length&&u.is(":visible")){if(s=c.parent(),we?(l=e("#"+t.namespace+"-cwd-thead"),p=l.children("tr:first")):(v=!0,c.addClass("elfinder-cwd-fixheader"),l=Ue.find("thead").attr("id",t.namespace+"-cwd-thead"),p=l.children("tr:first"),d=p.outerHeight(!0),Ue.css("margin-top",d-parseInt(s.css("padding-top"))),xe?(we=e('<div class="elfinder-table-header-sticky"></div>').addClass(Ue.attr("class")).append(e("<table></table>").append(l)),Ue.after(we),Pe.on("resize.fixheader",function(e){e.stopPropagation(),ke({fitWidth:!0})})):(r=e("<div></div>").addClass(Ue.attr("class")).append(e("<table></table>").append(l)),we=e("<div></div>").addClass(Pe.attr("class")+" elfinder-cwd-fixheader").removeClass("ui-droppable native-droppable").css(Pe.position()).css({height:d,width:Ue.outerWidth()}).append(r),"rtl"===t.direction&&we.css("left",Pe.data("width")-Pe.width()+"px"),b(),Pe.after(we).on("scroll.fixheader resize.fixheader",function(e){b(),"resize"===e.type&&(e.stopPropagation(),we.css(Pe.position()),Pe.data("width",Pe.css("overflow","hidden").width()),Pe.css("overflow","auto"),ke())}))),v||y.fitWidth||Math.abs(u.outerWidth()-p.outerWidth())>2){o=D.length+1;for(var w=0;w<o&&(h=p.children("td:eq("+w+")"),f=u.children("td:eq("+w+")"),m=h.width(),g=f.width(),"undefined"==typeof h.data("delta")&&h.data("delta",h.outerWidth()-m-(f.outerWidth()-g)),g-=h.data("delta"),v||y.fitWidth||m!==g);w++)h.css("width",g+"px")}xe||(we.data("widthTimer")&&cancelAnimationFrame(we.data("widthTimer")),we.data("widthTimer",requestAnimationFrame(function(){we&&(we.css("width",We.width()+"px"),"rtl"===t.direction&&we.css("left",Pe.data("width")-Pe.width()+"px"))}))),i=l.height()}}},Ce=function(){if(p&&_){var t,n="elfinder-cwd-colwidth",i=Ue.find("tr[id]:first");i.hasClass(n)||(t=Ue.find("tr."+n),t.removeClass(n).find("td").css("width",""),i.addClass(n),Ue.find("table:first").css("table-layout","fixed"),e.each(e.merge(["name"],D),function(e,t){var n=_[t]||i.find("td.elfinder-col-"+t).width();i.find("td.elfinder-col-"+t).width(n)}))}},ze=Object.assign({},t.droppable,{over:function(n,i){var a,o,r,s=e(this),l=i.helper,c=t._commands.copy&&(n.shiftKey||n.ctrlKey||n.metaKey);return n.stopPropagation(),l.data("dropover",l.data("dropover")+1),s.data("dropover",!0),l.removeClass("elfinder-drag-helper-move elfinder-drag-helper-plus"),l.data("namespace")===t.namespace&&t.insideWorkzone(n.pageX,n.pageY)?(s.hasClass(t.res(g,"cwdfile"))?(a=t.cwdId2Hash(s.attr("id")),s.data("dropover",a)):(a=t.cwd().hash,t.cwd().write&&s.data("dropover",a)),r=t.file(l.data("files")[0]).phash===a,s.data("dropover")===a?e.each(l.data("files"),function(e,t){if(t===a||r&&!c&&!l.hasClass("elfinder-drag-helper-plus"))return s.removeClass(T),!1}):s.removeClass(T),l.data("locked")||r?o="elfinder-drag-helper-plus":(o="elfinder-drag-helper-move",c&&(o+=" elfinder-drag-helper-plus")),s.hasClass(T)&&l.addClass(o),void requestAnimationFrame(function(){s.hasClass(T)&&l.addClass(o)})):void s.removeClass(T)},out:function(t,n){var i=n.helper;t.stopPropagation(),i.removeClass("elfinder-drag-helper-move elfinder-drag-helper-plus").data("dropover",Math.max(i.data("dropover")-1,0)),e(this).removeData("dropover").removeClass(T)},deactivate:function(){e(this).removeData("dropover").removeClass(T)},drop:function(e,n){ne({notrigger:!0}),t.droppable.drop.call(this,e,n)}}),Te=function(n){n=n?n:p?Ue.find("tbody"):Ue;var i=n.children(".directory:not(."+k+",.elfinder-na,.elfinder-ro)");t.isCommandEnabled("paste")&&i.droppable(ze),t.isCommandEnabled("upload")&&i.addClass("native-droppable"),n.children(".isroot").each(function(n,i){var a=e(i),o=t.cwdId2Hash(i.id);t.isCommandEnabled("paste",o)?a.hasClass(k+",elfinder-na,elfinder-ro")||a.droppable(ze):a.hasClass(k)&&a.droppable("destroy"),t.isCommandEnabled("upload",o)?a.hasClass("native-droppable,elfinder-na,elfinder-ro")||a.addClass("native-droppable"):a.hasClass("native-droppable")&&a.removeClass("native-droppable")})},Ae=function(n,i){var a=function(t,n){e("<img/>").on("load",function(){t.find(".elfinder-cwd-icon").addClass(n.className).css("background-image","url('"+n.url+"')")}).attr("src",n.url)},o=function(e,n){var o,r,s=t.cwdHash2Elm(e);s.length&&("1"!=n?(o=t.file(e),o.tmb!==n&&(o.tmb=n),r=t.tmb(o),i?s.find(".elfinder-cwd-icon").addClass(r.className).css("background-image","url('"+r.url+"')"):a(s,r),delete le.attachTmbs[e]):i?je([e]):le.tmbLoading[e]||le.getTmbs.push(e))};e.isPlainObject(n)&&Object.keys(n).length&&(Object.assign(le.attachTmbs,n),e.each(n,o),i||!le.getTmbs.length||Object.keys(le.tmbLoading).length||je())},je=function(n){var i=[],a=!1;return t.oldAPI?void t.request({data:{cmd:"tmb",current:t.cwd().hash},preventFail:!0}).done(function(e){e.images&&Object.keys(e.images).length&&Ae(e.images),e.tmb&&je()}):(n?(a=!0,i=n.splice(0,S)):i=le.getTmbs.splice(0,S),void(i.length&&(a||fe[i[0]]||fe[i[i.length-1]])&&(e.each(i,function(e,t){le.tmbLoading[t]=!0}),t.request({data:{cmd:"tmb",targets:i},preventFail:!0}).done(function(t){var o,r=[];t.images&&((o=Object.keys(t.images).length)?(o<i.length&&e.each(i,function(e,n){t.images[n]||r.push(n)}),Ae(t.images,a)):r=i,r.length&&e.each(r,function(e,t){delete le.attachTmbs[t]})),a&&n.length&&je(n)}).always(function(){le.tmbLoading={},!a&&le.getTmbs.length&&je()}))))},Se=function(n,i){var a,o,r,s,l,c,u=p?Ue.find("tbody"):Ue,h=n.length,f={},m=function(e){for(var n,i=Ue.find("[id]:first");i.length;){if(n=t.file(t.cwdId2Hash(i.attr("id"))),!i.hasClass("elfinder-cwd-parent")&&n&&t.compare(e,n)<0)return i;i=i.next("[id]")}},g=function(e){var n,i=se.length;for(n=0;n<i;n++)if(t.compare(e,se[n])<0)return n;return i||-1},v=!!e.htmlPrefilter,b=e(v?document.createDocumentFragment():"<div></div>");if(h>be)De(),Q=t.arrayFlip(e.map(n,function(e){return e.hash}),!0),oe();else{for(h&&Le.removeClass("elfinder-cwd-wrapper-empty"),c="self"===t.option("tmbUrl");h--;)a=n[h],o=a.hash,t.cwdHash2Elm(o).length||((r=m(a))&&!r.length&&(r=null),!r&&(l=g(a))>=0?se.splice(l,0,a):(b.empty().append(X(a)),"directory"===a.mime&&!d&&Te(b),s=v?b:b.children(),r?r.before(s):u.append(s),++le.renderd),t.cwdHash2Elm(o).length&&(a.tmb&&(1!=a.tmb||a.size>0)||c&&0===a.mime.indexOf("image/"))&&(f[o]=a.tmb||"self"));p&&(Ce(),ke({fitWidth:!_})),Ee(u),Object.keys(f).length&&(Object.assign(le.attachTmbs,f),se.length<1&&je())}},Oe=function(n){var i,a,o,r,s=n.length,l=t.searchStatus.state>1,c=t.getCommand(t.currentReqCmd)||{};if(!t.cwd().hash&&!c.noChangeDirOnRemovedCwd)return e.each(M.reverse(),function(e,n){if(t.file(n))return r=!0,t.one(t.currentReqCmd+"done",function(){!t.cwd().hash&&t.exec("open",n)}),!1}),void(!r&&!t.cwd().hash&&t.exec("open",t.roots[Object.keys(t.roots)[0]]));for(;s--;){if(i=n[s],(a=t.cwdHash2Elm(i)).length)try{a.remove(),--le.renderd}catch(d){t.debug("error",d)}else(o=ce(i))!==-1&&se.splice(o,1);Q[i]&&delete Q[i],l&&(o=e.inArray(i,E))!==-1&&E.splice(o,1)}l&&t.trigger("cwdhasheschange",E),p&&(Ce(),ke({fitWidth:!_}))},Ie=function(){for(var e="",n="",i=0;i<D.length;i++)e=t.getColumnName(D[i]),n+='<td class="elfinder-cwd-view-th-'+D[i]+' sortable-item">'+e+"</td>";return n},Me=function(e){var t,n;e.height||(t=p?Ue.find("tbody"):Ue,n=t.find(p?"tr:first":"[id]:first"),e.height=n.outerHeight(!0),p||(e.width=n.outerWidth(!0)))},Ee=function(e,n){var i,a=e||(p?Ue.find("tbody"):Ue),o=Ve[t.viewType],r=1;se.length>0&&(le.hpi?p||(r=Math.floor(a.width()/o.width)):(Me(o),p?le.row=le.hpi=o.height:(r=Math.floor(a.width()/o.width),le.row=o.height,le.hpi=le.row/r)),i=Math.ceil((se.length+(n||0))/r),p&&we&&++i,qe.css({top:le.row*i+"px"}).show())},Fe={contextmenu:function(e){return e.preventDefault(),void 0!==Ue.data("longtap")?void e.stopPropagation():void t.trigger("contextmenu",{type:"cwd",targets:[t.cwd().hash],x:e.pageX,y:e.pageY})},touchstart:function(e){e.originalEvent.touches.length>1||(Ue.data("longtap")!==!1&&(Pe.data("touching",{x:e.originalEvent.touches[0].pageX,y:e.originalEvent.touches[0].pageY}),Ue.data("tmlongtap",setTimeout(function(){Ue.data("longtap",!0),t.trigger("contextmenu",{type:"cwd",targets:[t.cwd().hash],x:Pe.data("touching").x,y:Pe.data("touching").y})},500))),Ue.data("longtap",null))},touchend:function(e){"touchmove"===e.type?(!Pe.data("touching")||Math.abs(Pe.data("touching").x-e.originalEvent.touches[0].pageX)+Math.abs(Pe.data("touching").y-e.originalEvent.touches[0].pageY)>4)&&Pe.data("touching",null):setTimeout(function(){Ue.removeData("longtap")},80),clearTimeout(Ue.data("tmlongtap"))},click:function(e){Ue.data("longtap")&&(e.preventDefault(),e.stopPropagation())}},De=function(){t.lazy(function(){var n;Le.append(Re).removeClass("elfinder-cwd-wrapper-empty elfinder-search-result elfinder-incsearch-result elfinder-letsearch-result"),(t.searchStatus.state>1||t.searchStatus.ininc)&&Le.addClass("elfinder-search-result"+(t.searchStatus.ininc?" elfinder-"+("/"===O.substr(0,1)?"let":"inc")+"search-result":"")),le.attachThumbJob&&le.attachThumbJob._abort(),Ue.data("selectable")&&Ue.selectable("disable").selectable("destroy").removeData("selectable"),t.trigger("cwdinit"),J=e();try{Ue.empty()}catch(i){Ue.html("")}we&&(Pe.off("scroll.fixheader resize.fixheader"),we.remove(),we=null),Ue.removeClass("elfinder-cwd-view-icons elfinder-cwd-view-list").addClass("elfinder-cwd-view-"+(p?"list":"icons")).attr("style","").css("height","auto"),qe.hide(),Pe[p?"addClass":"removeClass"]("elfinder-cwd-wrapper-list")._padding=parseInt(Pe.css("padding-top"))+parseInt(Pe.css("padding-bottom")),t.UA.iOS&&Pe.removeClass("overflow-scrolling-touch").addClass("overflow-scrolling-touch"),p&&(Ue.html("<table><thead></thead><tbody></tbody></table>"),n=e('<tr class="ui-state-default"><td class="elfinder-cwd-view-th-name">'+t.getColumnName("name")+"</td>"+Ie()+"</tr>"),Ue.find("thead").hide().append(n).find("td:first").append(Re),e.fn.sortable&&n.addClass("touch-punch touch-punch-keep-default").sortable({axis:"x",distance:8,items:"> .sortable-item",start:function(t,n){e(n.item[0]).data("dragging",!0),n.placeholder.width(n.helper.removeClass("ui-state-hover").width()).removeClass("ui-state-active").addClass("ui-state-hover").css("visibility","visible")},update:function(n,i){var a,o,r=e(i.item[0]).attr("class").split(" ")[0].replace("elfinder-cwd-view-th-","");D=e.map(e(this).children(),function(t){var n=e(t).attr("class").split(" ")[0].replace("elfinder-cwd-view-th-","");return o||(r===n?o=!0:a=n),"name"===n?null:n}),N.row=q(),t.storage("cwdCols",D),a=".elfinder-col-"+a+":first",r=".elfinder-col-"+r+":first",t.lazy(function(){Ue.find("tbody tr").each(function(){var t=e(this);t.children(a).after(t.children(r))})})},stop:function(t,n){setTimeout(function(){e(n.item[0]).removeData("dragging")},100)}}),n.find("td").addClass("touch-punch").resizable({handles:"ltr"===t.direction?"e":"w",start:function(t,n){var i=Ue.find("td.elfinder-col-"+n.element.attr("class").split(" ")[0].replace("elfinder-cwd-view-th-","")+":first");n.element.data("dragging",!0).data("resizeTarget",i).data("targetWidth",i.width()),H=!0,"fixed"!==Ue.find("table").css("table-layout")&&(Ue.find("tbody tr:first td").each(function(){e(this).width(e(this).width())}),Ue.find("table").css("table-layout","fixed"))},resize:function(e,t){t.element.data("resizeTarget").width(t.element.data("targetWidth")-(t.originalSize.width-t.size.width))},stop:function(n,i){H=!1,ke({fitWidth:!0}),_={},Ue.find("tbody tr:first td").each(function(){var t=e(this).attr("class").split(" ")[0].replace("elfinder-col-","");_[t]=e(this).width()}),t.storage("cwdColWidth",_),setTimeout(function(){i.element.removeData("dragging")},100)}}).find(".ui-resizable-handle").addClass("ui-icon ui-icon-grip-dotted-vertical")),se=e.map(F||E,function(e){return t.file(e)||null}),se=t.sortFiles(se),F?F=e.map(se,function(e){return e.hash}):E=e.map(se,function(e){return e.hash}),le={renderd:0,attachTmbs:{},getTmbs:[],tmbLoading:{},lazyOpts:{tm:0}},Le[se.length<1?"addClass":"removeClass"]("elfinder-cwd-wrapper-empty"),Pe.off(pe,ye).on(pe,ye).trigger(pe),t.cwd().write?(Pe[t.isCommandEnabled("upload")?"addClass":"removeClass"]("native-droppable"),Pe.droppable(t.isCommandEnabled("paste")?"enable":"disable")):Pe.removeClass("native-droppable").droppable("disable").removeClass("ui-state-disabled")})},Ue=e(this).addClass("ui-helper-clearfix elfinder-cwd").attr("unselectable","on").on("click."+t.namespace,b,function(n){var i,a,o,r,s,l=this.id?e(this):e(this).parents("[id]:first"),c=e(n.target);if(R&&(c.is("input:checkbox."+j)||c.hasClass("elfinder-cwd-select")))return n.stopPropagation(),n.preventDefault(),l.trigger(l.hasClass(y)?h:u),oe(),void requestAnimationFrame(function(){c.prop("checked",l.hasClass(y))});if(Ue.data("longtap")||c.hasClass("elfinder-cwd-nonselect"))return void n.stopPropagation();if(U||(U=l.attr("id"),setTimeout(function(){U=""},500)),n.shiftKey&&(i=l.prevAll(ae||"."+y+":first"),a=l.nextAll(ae||"."+y+":first"),o=i.length,r=a.length),n.shiftKey&&(o||r))s=o?l.prevUntil("#"+i.attr("id")):l.nextUntil("#"+a.attr("id")),s=s.add(l),o||(s=e(s.get().reverse())),s.trigger(u);else if(n.ctrlKey||n.metaKey)l.trigger(l.hasClass(y)?h:u);else{if(Pe.data("touching")&&l.hasClass(y))return Pe.data("touching",null),void t.dblclick({file:t.cwdId2Hash(this.id)});ne({notrigger:!0}),l.trigger(u)}oe()}).on("dblclick."+t.namespace,b,function(n){if(U){var i=t.cwdId2Hash(U);n.stopPropagation(),this.id!==U&&(e(this).trigger(h),e("#"+U).trigger(u),oe()),t.dblclick({file:i})}}).on("touchstart."+t.namespace,b,function(n){if(!(n.originalEvent.touches.length>1)){var i,a=this.id?e(this):e(this).parents("[id]:first"),o=e(n.target),r=n.target.nodeName;if("INPUT"===r&&"text"===n.target.type||"TEXTAREA"===r||o.hasClass("elfinder-cwd-nonselect"))return void n.stopPropagation();if(a.find("input:text,textarea").length)return n.stopPropagation(),void n.preventDefault();Pe.data("touching",{x:n.originalEvent.touches[0].pageX,y:n.originalEvent.touches[0].pageY}),R&&(o.is("input:checkbox."+j)||o.hasClass("elfinder-cwd-select"))||(i=a.prevAll("."+y+":first").length+a.nextAll("."+y+":first").length,Ue.data("longtap",null),(Object.keys(Q).length||p&&"TD"!==n.target.nodeName||!p&&this!==n.target)&&(Ue.data("longtap",!1),a.addClass(C),a.data("tmlongtap",setTimeout(function(){Ue.data("longtap",!0),a.trigger(u),oe(),t.trigger("contextmenu",{type:"files",targets:t.selected(),x:n.originalEvent.touches[0].pageX,y:n.originalEvent.touches[0].pageY})},500))))}}).on("touchmove."+t.namespace+" touchend."+t.namespace,b,function(n){var i,a=e(n.target);if(!R||!a.is("input:checkbox."+j)&&!a.hasClass("elfinder-cwd-select")){if("INPUT"==n.target.nodeName||"TEXTAREA"==n.target.nodeName)return void n.stopPropagation();i=this.id?e(this):e(this).parents("[id]:first"),clearTimeout(i.data("tmlongtap")),"touchmove"===n.type?(Pe.data("touching",null),i.removeClass(C)):(Pe.data("touching")&&!Ue.data("longtap")&&i.hasClass(y)&&(n.preventDefault(),Pe.data("touching",null),t.dblclick({file:t.cwdId2Hash(this.id)})),setTimeout(function(){Ue.removeData("longtap")},80))}}).on("mouseenter."+t.namespace,b,function(i){if(!ue){var a=e(this),o=null;if(!(d||a.data("dragRegisted")||a.hasClass(A)||a.hasClass(x)||a.hasClass(w))){if(a.data("dragRegisted",!0),!t.isCommandEnabled("copy",t.searchStatus.state>1||a.hasClass("isroot")?t.cwdId2Hash(a.attr("id")):void 0)&&!t.isCommandEnabled("cut",t.searchStatus.state>1||a.hasClass("isroot")?t.cwdId2Hash(a.attr("id")):void 0))return;a.on("mousedown",function(i){var o=n.metakeyDragout&&!t.UA.IE&&(i.shiftKey||i.altKey),r=!1;o&&Ue.data("selectable")&&(Ue.selectable("disable").selectable("destroy").removeData("selectable"),requestAnimationFrame(function(){Ue.selectable(he).selectable("option",{disabled:!1}).selectable("refresh").data("selectable",!0)})),a.removeClass("ui-state-disabled"),o?a.draggable("option","disabled",!0).attr("draggable","true"):(a.hasClass(y)||(r=p?e(i.target).closest("span,tr").is("tr"):e(i.target).hasClass("elfinder-cwd-file")),r?a.draggable("option","disabled",!0).removeClass("ui-state-disabled"):a.draggable("option","disabled",!1).removeAttr("draggable").draggable("option","cursorAt",{left:50-parseInt(e(i.currentTarget).css("margin-left")),top:47}))}).on("dragstart",function(n){var i=n.dataTransfer||n.originalEvent.dataTransfer||null;if(o=null,i&&!t.UA.IE){var a,r=this.id?e(this):e(this).parents("[id]:first"),s=e("<span>"),l="",c=null,d=null,p=[],h=function(n){var i,a=n.mime,o=t.tmb(n);return i='<div class="elfinder-cwd-icon elfinder-cwd-icon-drag '+t.mime2class(a)+' ui-corner-all"></div>',o&&(i=e(i).addClass(o.className).css("background-image","url('"+o.url+"')").get(0).outerHTML),i},f=[];if(r.trigger(u),oe(),e.each(Q,function(n){var i=t.file(n),a=i.url;if(i&&"directory"!==i.mime){if(a){if("1"==a)return f.push(n),!0}else a=t.url(i.hash);a&&(a=t.convAbsUrl(a),p.push(n),e("<a>").attr("href",a).text(a).appendTo(s),l+=a+"\n",c||(c=i.mime+":"+i.name+":"+a),d||(d=a+"\n"+i.name))}}),f.length)return e.each(f,function(e,n){var i=t.file(n);i.url="",t.request({data:{cmd:"url",target:n},notify:{type:"url",cnt:1},preventDefault:!0}).always(function(e){i.url=e.url?e.url:"1"})}),!1;if(!l)return!1;i.setDragImage&&(o=e('<div class="elfinder-drag-helper html5-native"></div>').append(h(t.file(p[0]))).appendTo(e(document.body)),(a=p.length)>1&&o.append(h(t.file(p[a-1]))+'<span class="elfinder-drag-num">'+a+"</span>"),i.setDragImage(o.get(0),50,47)),i.effectAllowed="copyLink",i.setData("DownloadURL",c),i.setData("text/x-moz-url",d),i.setData("text/uri-list",l),i.setData("text/plain",l),i.setData("text/html",s.html()),i.setData("elfinderfrom",window.location.href+t.cwd().hash),i.setData("elfinderfrom:"+i.getData("elfinderfrom"),"")}}).on("dragend",function(e){ne({notrigger:!0}),o&&o.remove()}).draggable(t.draggable)}}}).on(u,b,function(n){var i=e(this),a=t.cwdId2Hash(i.attr("id"));G||i.hasClass(w)||(ae="#"+this.id,i.addClass(y).children().addClass(C).find("input:checkbox."+j).prop("checked",!0),Q[a]||(Q[a]=!0),J=Ue.find("[id]."+y+":last").next())}).on(h,b,function(n){var i=e(this),a=t.cwdId2Hash(i.attr("id"));G||(i.removeClass(y).children().removeClass(C).find("input:checkbox."+j).prop("checked",!1),Ue.hasClass("elfinder-cwd-allselected")&&(R&&Re.children("input").prop("checked",!1),Ue.removeClass("elfinder-cwd-allselected")),Q[a]&&delete Q[a])}).on(f,b,function(){var t=e(this).removeClass(C+" "+y).addClass(w),n=t.children(),i=p?t:n.find("div.elfinder-cwd-file-wrapper,div.elfinder-cwd-filename");n.removeClass(C+" "+y),t.hasClass(k)&&t.droppable("disable"),i.hasClass(x)&&i.draggable("disable")}).on(m,b,function(){var t=e(this).removeClass(w),n=p?t:t.children("div.elfinder-cwd-file-wrapper,div.elfinder-cwd-filename");t.hasClass(k)&&t.droppable("enable"),n.hasClass(x)&&n.draggable("enable")}).on("scrolltoview",b,function(t,n){re(e(this),!n||"undefined"==typeof n.blink||n.blink)}).on("mouseenter."+t.namespace+" mouseleave."+t.namespace,b,function(n){var i="mouseenter"===n.type;i&&(ue||t.UA.Mobile)||(t.trigger("hover",{hash:t.cwdId2Hash(e(this).attr("id")),type:n.type}),e(this).toggleClass(C,"mouseenter"==n.type))}).on("mouseenter."+t.namespace+" mouseleave."+t.namespace,".elfinder-cwd-file-wrapper,.elfinder-cwd-filename",function(t){var n="mouseenter"===t.type;n&&ue||e(this).closest(b).children(".elfinder-cwd-file-wrapper,.elfinder-cwd-filename").toggleClass(z,"mouseenter"==t.type)}).on("contextmenu."+t.namespace,function(n){var i=e(n.target).closest(b);if(i.get(0)!==n.target||Q[t.cwdId2Hash(i.get(0).id)])return i.find("input:text,textarea").length?void n.stopPropagation():void(i.length&&("TD"!=n.target.nodeName||Q[t.cwdId2Hash(i.get(0).id)])&&(n.stopPropagation(),n.preventDefault(),i.hasClass(w)||Pe.data("touching")||(i.hasClass(y)||(ne({notrigger:!0}),i.trigger(u),oe()),t.trigger("contextmenu",{type:"files",targets:t.selected(),x:n.pageX,y:n.pageY}))))}).on("click."+t.namespace,function(e){e.target!==this||Ue.data("longtap")||!e.shiftKey&&!e.ctrlKey&&!e.metaKey&&ne()}).on("create."+t.namespace,function(n,i){var a=p?Ue.find("tbody"):Ue,o=a.find(".elfinder-cwd-parent"),r=i.move||!1,s=e(X(i)).addClass(A),l=t.selected();l.length?r&&t.trigger("lockfiles",{files:l}):ne(),o.length?o.after(s):a.prepend(s),Ce(),Pe.scrollTop(0).scrollLeft(0)}).on("unselectall",ne).on("selectfile",function(e,n){t.cwdHash2Elm(n).trigger(u),oe()}).on("colwidth",function(){p&&(Ue.find("table").css("table-layout","").find("td").css("width",""),ke({fitWidth:!0}),t.storage("cwdColWidth",_=null))}).on("iconpref",function(e,t){Ue.removeClass(function(e,t){return(t.match(/\belfinder-cwd-size\S+/g)||[]).join(" ")}),s=t?parseInt(t.size)||0:0,p||(s>0&&Ue.addClass("elfinder-cwd-size"+s),le.renderd&&requestAnimationFrame(function(){Ve.icons={},le.hpi=null,Ee(Ue,le.renderd),me()}))}).on("onwheel"in document?"wheel":"mousewheel",function(e){var i,a,o;!p&&(e.ctrlKey&&!e.metaKey||!e.ctrlKey&&e.metaKey)&&(e.stopPropagation(),e.preventDefault(),i=Ue.data("wheelTm"),"undefined"!=typeof i?(clearTimeout(i),Ue.data("wheelTm",setTimeout(function(){Ue.removeData("wheelTm")},200))):(Ue.data("wheelTm",!1),a=s||0,o=e.originalEvent.deltaY?e.originalEvent.deltaY:-e.originalEvent.wheelDelta,o>0?s>0&&(a=s-1):s<n.iconsView.sizeMax&&(a=s+1),a!==s&&(t.storage("iconsize",a),Ue.trigger("iconpref",{size:a}))))}),Pe=e('<div class="elfinder-cwd-wrapper"></div>').droppable(Object.assign({},ze,{autoDisable:!1})).on("contextmenu."+t.namespace,Fe.contextmenu).on("touchstart."+t.namespace,Fe.touchstart).on("touchmove."+t.namespace+" touchend."+t.namespace,Fe.touchend).on("click."+t.namespace,Fe.click).on("scroll."+t.namespace,function(){ue||(Ue.data("selectable")&&Ue.selectable("disable"),Pe.trigger(de)),ue=!0,le.scrtm&&cancelAnimationFrame(le.scrtm),le.scrtm&&Math.abs((le.scrolltop||0)-(le.scrolltop=this.scrollTop||e(this).scrollTop()))<5&&(le.scrtm=0,Pe.trigger(pe)),le.scrtm=requestAnimationFrame(function(){le.scrtm=0,Pe.trigger(pe)})}).on(pe,function(){ue=!1,me()}),qe=e("<div>&nbsp;</div>").css({position:"absolute",width:"1px",height:"1px"}).hide(),Re=R?e('<div class="elfinder-cwd-selectall"><input type="checkbox"/></div>').attr("title",t.i18n("selectall")).on("click",function(t){return t.stopPropagation(),t.preventDefault(),!e(this).data("pending")&&(Re.data("pending",!0),void(Ue.hasClass("elfinder-cwd-allselected")?(Re.find("input").prop("checked",!1),requestAnimationFrame(function(){ne()})):te()))}):e(),He=null,_e=function(t){var n=function(){if("undefined"!=typeof le.renderd){var t=0;Pe.siblings("div.elfinder-panel:visible").each(function(){t+=e(this).outerHeight(!0)}),Pe.height(Le.height()-t-Pe._padding)}};t&&n(),He&&cancelAnimationFrame(He),He=requestAnimationFrame(function(){!t&&n();var e,i;Ue.css("height","auto"),e=Pe[0].clientHeight-parseInt(Pe.css("padding-top"))-parseInt(Pe.css("padding-bottom"))-parseInt(Ue.css("margin-top")),i=Ue.outerHeight(!0),i<e&&Ue.height(e)}),p&&!H&&(t?Pe.trigger("resize.fixheader"):ke()),me()},Ne=e(this).parent().on("resize",_e),Le=Ne.children(".elfinder-workzone").append(Pe.append(this).append(qe)),We=e('<div class="elfinder-cwd-message-board"></div>').insertAfter(Ue),Be=e('<div class="elfinder-cwd-expires" ></div>'),$e=function(){var e,n,i;o&&clearTimeout(o),l&&t.volumeExpires[l]&&(n=t.volumeExpires[l]-+new Date/1e3,i=n%60+.1,e=Math.floor(n/60),Be.html(t.i18n(["minsLeft",e])).show(),e&&(o=setTimeout($e,1e3*i)))},Ve={icons:{},list:{}};t.UA.ltIE10||We.append(e('<div class="elfinder-cwd-trash" ></div>').html(t.i18n("volume_Trash"))).append(Be),$=Object.assign($,n.replacement||{});try{_=t.storage("cwdColWidth")?t.storage("cwdColWidth"):null}catch(Ke){_=null}t.bind("columnpref",function(i){var a=i.data||{};(D=t.storage("cwdCols"))?(D=e.grep(D,function(e){return n.listView.columns.indexOf(e)!==-1}),n.listView.columns.length>D.length&&e.each(n.listView.columns,function(e,t){D.indexOf(t)===-1&&D.push(t)})):D=n.listView.columns;var o=t.storage("columnhides")||null;o&&Object.keys(o).length&&(D=e.grep(D,function(e){return!o[e]})),N.row=q(),p&&a.repaint&&De()}).trigger("columnpref"),d&&e("body").on("touchstart touchmove touchend",function(e){}),R&&Ue.addClass("elfinder-has-checkbox"),e(window).on("scroll."+t.namespace,function(){c&&cancelAnimationFrame(c),
17
  c=requestAnimationFrame(function(){Pe.trigger(pe)})}),e(document).on("keydown."+t.namespace,function(n){n.keyCode==e.ui.keyCode.ESCAPE&&(t.getUI().find(".ui-widget:visible").length||ne())}),t.one("init",function(){var i,a,o,s,l=document.createElement("style"),c=0;document.head&&(document.head.appendChild(l),i=l.sheet,i.insertRule('.elfinder-cwd-wrapper-empty .elfinder-cwd:not(.elfinder-table-header-sticky):after{ content:"'+t.i18n("emptyFolder")+'" }',c++),i.insertRule('.elfinder-cwd-wrapper-empty .native-droppable .elfinder-cwd:not(.elfinder-table-header-sticky):after{ content:"'+t.i18n("emptyFolder"+(d?"LTap":"Drop"))+'" }',c++),i.insertRule('.elfinder-cwd-wrapper-empty .ui-droppable-disabled .elfinder-cwd:not(.elfinder-table-header-sticky):after{ content:"'+t.i18n("emptyFolder")+'" }',c++),i.insertRule('.elfinder-cwd-wrapper-empty.elfinder-search-result .elfinder-cwd:not(.elfinder-table-header-sticky):after{ content:"'+t.i18n("emptySearch")+'" }',c++),i.insertRule('.elfinder-cwd-wrapper-empty.elfinder-search-result.elfinder-incsearch-result .elfinder-cwd:not(.elfinder-table-header-sticky):after{ content:"'+t.i18n("emptyIncSearch")+'" }',c++),i.insertRule('.elfinder-cwd-wrapper-empty.elfinder-search-result.elfinder-letsearch-result .elfinder-cwd:not(.elfinder-table-header-sticky):after{ content:"'+t.i18n("emptyLetSearch")+'" }',c++)),(s=t.storage("iconsize")||n.iconsView.size||0)&&(s=Math.min(s,n.iconsView.sizeMax),Ue.trigger("iconpref",{size:s})),d||(t.one("open",function(){i&&t.zIndex&&i.insertRule(".ui-selectable-helper{z-index:"+t.zIndex+";}",c++)}),o=e('<div style="position:absolute"></div>'),a=t.getUI(),a.on("resize",function(e,t){var n;e.preventDefault(),e.stopPropagation(),t&&t.fullscreen&&(n=a.offset(),"on"===t.fullscreen?(o.css({top:n.top*-1,left:n.left*-1}).appendTo(a),he.appendTo=o):(o.detach(),he.appendTo="body"),Ue.data("selectable")&&Ue.selectable("option",{appendTo:he.appendTo}))})),r=t.getUI("tree").length}).bind("enable",function(){_e()}).bind("request.open",function(){le.getTmbs=[]}).one("open",function(){t.maxTargets&&(S=Math.min(t.maxTargets,S))}).bind("open add remove searchend",function(){var n=t.cwd().hash,i=this.type;if(("open"===i||"searchend"===i||t.searchStatus.state<2)&&(E=e.map(t.files(n),function(e){return e.hash}),t.trigger("cwdhasheschange",E)),"open"===i){var a=function(){var n=!1;return e.each(M,function(e,i){if(t.trashes[i])return n=!0,!1}),n},o=n&&(!t.file(n)||r)?r?function(){var n=e.Deferred();return t.one("treesync",function(e){e.data.always(function(){n.resolve()})}),n}():t.request({data:{cmd:"parents",target:t.cwd().hash},preventFail:!0}):null,s=t.cwd();s.volumeid!==l&&(Be.empty().hide(),l&&Pe.removeClass("elfinder-cwd-wrapper-"+l),l=s.volumeid,$e(),Pe.addClass("elfinder-cwd-wrapper-"+l)),e.when(o).done(function(){M=t.parents(s.hash),Pe[a()?"addClass":"removeClass"]("elfinder-cwd-wrapper-trash")}),F=void 0,ne({notrigger:!0}),De()}}).bind("search",function(n){E=e.map(n.data.files,function(e){return e.hash}),t.trigger("cwdhasheschange",E),F=void 0,t.searchStatus.ininc=!1,De(),t.autoSync("stop")}).bind("searchend",function(e){(O||F)&&(O="",F?t.trigger("incsearchend",e.data):e.data&&e.data.noupdate||De()),t.autoSync()}).bind("searchstart",function(e){ne(),O=e.data.query}).bind("incsearchstart",function(n){var i=n.data.query||"",a=n.data.type||"SearchName",o=t.options.commandsOptions.search.searchTypes||{};(o[a]&&o[a].incsearch||"SearchName"===a)&&(Q={},t.lazy(function(){var n,r,s="";if(O=i,i){if("/"===i.substr(0,1)&&(i=i.substr(1),s="^"),n=new RegExp(s+i.replace(/([\\*\;\.\?\[\]\{\}\(\)\^\$\-\|])/g,"\\$1"),"i"),"SearchName"===a)F=e.grep(E,function(e){var i=t.file(e);return!(!i||!(i.name.match(n)||i.i18&&i.i18.match(n)))});else if(r=o[a].incsearch,"string"==typeof r)F=e.grep(E,function(e){var i=t.file(e);return!!(i&&i[r]&&(i[r]+"").match(n))});else if("function"==typeof r)try{F=e.grep(r({val:i,regex:n},E,t),function(e){return!!t.file(e)})}catch(l){F=[]}t.trigger("incsearch",{hashes:F,query:i}).searchStatus.ininc=!0,De(),t.autoSync("stop")}else t.trigger("incsearchend")}))}).bind("incsearchend",function(e){O="",t.searchStatus.ininc=!1,F=void 0,e.data&&e.data.noupdate||De(),t.autoSync()}).bind("sortchange",function(){var e=Pe.scrollLeft(),n=Ue.hasClass("elfinder-cwd-allselected");De(),t.one("cwdrender",function(){Pe.scrollLeft(e),n&&(Q=t.arrayFlip(F||E,!0)),(n||Object.keys(Q).length)&&oe()})}).bind("viewchange",function(){var e="list"!=t.viewType,n=Ue.hasClass("elfinder-cwd-allselected");e!=p&&(p=e,t.viewType=p?"list":"icons",s&&t.one("cwdinit",function(){Ue.trigger("iconpref",{size:s})}),De(),_e(),n&&(Ue.addClass("elfinder-cwd-allselected"),Re.find("input").prop("checked",!0)),Object.keys(Q).length&&oe())}).bind("wzresize",function(){var e,n=p?Ue.find("tbody"):Ue;_e(!0),le.hpi&&Ee(n,n.find("[id]").length),e=Ue.offset(),Le.data("rectangle",Object.assign({width:Le.width(),height:Le.height(),cwdEdge:"ltr"===t.direction?e.left:e.left+Ue.width()},Le.offset())),le.itemH=(p?n.find("tr:first"):n.find("[id]:first")).outerHeight(!0)}).bind("changeclipboard",function(t){I={},t.data&&t.data.clipboard&&t.data.clipboard.length&&e.each(t.data.clipboard,function(e,t){t.cut&&(I[t.hash]=!0)})}).bind("resMixinMake",function(){Ce()}).bind("tmbreload",function(t){var n={},i=t.data&&t.data.files?t.data.files:null;e.each(i,function(e,t){t.tmb&&"1"!=t.tmb&&(n[t.hash]=t.tmb)}),Object.keys(n).length&&Ae(n,!0)}).add(function(n){var i=O?new RegExp(O.replace(/([\\*\;\.\?\[\]\{\}\(\)\^\$\-\|])/g,"\\$1"),"i"):null,a=t.searchStatus.mime,o=t.searchStatus.state>1,r=o&&t.searchStatus.target?t.searchStatus.target:t.cwd().hash,s=t.path(r),l=function(n){var l,c;return l=n.phash===r,!l&&o&&(c=n.path||t.path(n.hash),l=s&&0===c.indexOf(s),!l&&t.searchStatus.mixed&&(l=!!e.grep(t.searchStatus.mixed,function(e){return 0===n.hash.indexOf(e)}).length)),l&&o&&(l=a?0===n.mime.indexOf(a):!!(n.name.match(i)||n.i18&&n.i18.match(i))),l},c=e.grep(n.data.added||[],function(e){return!!l(e)});Se(c),2===t.searchStatus.state&&(e.each(c,function(t,n){e.inArray(n.hash,E)===-1&&E.push(n.hash)}),t.trigger("cwdhasheschange",E)),p&&_e(),Pe.trigger(pe)}).change(function(n){var i,a=t.cwd().hash,o=t.selected();O?e.each(n.data.changed||[],function(n,a){t.cwdHash2Elm(a.hash).length&&(Oe([a.hash]),Se([a],"change"),e.inArray(a.hash,o)!==-1&&Z(a.hash),i=!0)}):e.each(e.grep(n.data.changed||[],function(e){return e.phash==a}),function(n,a){t.cwdHash2Elm(a.hash).length&&(Oe([a.hash]),Se([a],"change"),e.inArray(a.hash,o)!==-1&&Z(a.hash),i=!0)}),i&&(t.trigger("cwdhasheschange",E),p&&_e(),Pe.trigger(pe)),oe()}).remove(function(e){var t=p?Ue.find("tbody"):Ue;Oe(e.data.removed||[]),oe(),se.length<1&&t.children(b+(n.oldSchool?":not(.elfinder-cwd-parent)":"")).length<1?(Le.addClass("elfinder-cwd-wrapper-empty"),R&&Re.find("input").prop("checked",!1),qe.hide(),Pe.off(pe,ye),_e()):(Ee(t),Pe.trigger(pe))}).dragstart(function(t){var n=e(t.data.target),i=t.data.originalEvent;n.hasClass(v)&&(n.hasClass(y)||(!(i.ctrlKey||i.metaKey||i.shiftKey)&&ne({notrigger:!0}),n.trigger(u),oe())),Ue.removeClass(w).data("selectable")&&Ue.selectable("disable"),G=!0}).dragstop(function(){Ue.data("selectable")&&Ue.selectable("enable"),G=!1}).bind("lockfiles unlockfiles selectfiles unselectfiles",function(n){var i,a,o,r={lockfiles:f,unlockfiles:m,selectfiles:u,unselectfiles:h},s=r[n.type],l=n.data.files||[],c=l.length,d=n.data.helper||e();if(c>0&&(i=t.parents(l[0])),s!==u&&s!==h||(o=s===u,e.each(l,function(e,t){var n=Ue.hasClass("elfinder-cwd-allselected");Q[t]?(n&&(R&&Re.children("input").prop("checked",!1),Ue.removeClass("elfinder-cwd-allselected"),n=!1),!o&&delete Q[t]):o&&(Q[t]=!0)})),!d.data("locked")){for(;c--;)try{t.cwdHash2Elm(l[c]).trigger(s)}catch(n){}!n.data.inselect&&oe()}Pe.data("dropover")&&i.indexOf(Pe.data("dropover"))!==-1&&(a="lockfiles"!==n.type,d.toggleClass("elfinder-drag-helper-plus",a),Pe.toggleClass(T,a))}).bind("mkdir mkfile duplicate upload rename archive extract paste multiupload",function(n){if("upload"!=n.type||!n.data._multiupload){var i=t.cwd().hash;ne({notrigger:!0}),e.each((n.data.added||[]).concat(n.data.changed||[]),function(e,t){t&&t.phash==i&&Z(t.hash)}),oe()}}).shortcut({pattern:"ctrl+a",description:"selectall",callback:te}).shortcut({pattern:"ctrl+shift+i",description:"selectinvert",callback:ie}).shortcut({pattern:"left right up down shift+left shift+right shift+up shift+down",description:"selectfiles",type:"keydown",callback:function(e){Y(e.keyCode,e.shiftKey)}}).shortcut({pattern:"home",description:"selectffile",callback:function(e){ne({notrigger:!0}),re(Ue.find("[id]:first").trigger(u)),oe()}}).shortcut({pattern:"end",description:"selectlfile",callback:function(e){ne({notrigger:!0}),re(Ue.find("[id]:last").trigger(u)),oe()}}).shortcut({pattern:"page_up",description:"pageTurning",callback:function(e){le.itemH&&Pe.scrollTop(Math.round(Pe.scrollTop()-Math.floor((Pe.height()+(p?le.itemH*-1:16))/le.itemH)*le.itemH))}}).shortcut({pattern:"page_down",description:"pageTurning",callback:function(e){le.itemH&&Pe.scrollTop(Math.round(Pe.scrollTop()+Math.floor((Pe.height()+(p?le.itemH*-1:16))/le.itemH)*le.itemH))}})}),this},e.fn.elfinderdialog=function(t,n){var i,a,o,r,s=window.navigator.platform.indexOf("Win")!=-1,l={},c={enabled:!1,width:!1,height:!1,defaultSize:null},d=function(t){var i,a;c.enabled&&(a=n.options.dialogContained?o:e(window),i={maxWidth:c.width?a.width()-l.width:null,maxHeight:c.height?a.height()-l.height:null},Object.assign(r,i),t.css(i).trigger("resize"),t.data("hasResizable")&&(t.resizable("option","maxWidth")<i.maxWidth||t.resizable("option","maxHeight")<i.maxHeight)&&t.resizable("option",i))},p=function(e){var t=e.data;i&&cancelAnimationFrame(i),i=requestAnimationFrame(function(){c.enabled&&d(t)})},u=function(){var e="elfinder-dialog",t=o.children("."+e+"."+n.res("class","editing")+":visible");n[t.length?"disable":"enable"]()},h={};return n&&n.ui?o=n.getUI():(o=this.closest(".elfinder"),n||(n=o.elfinder("instance"))),"string"==typeof t?((a=this.closest(".ui-dialog")).length&&("open"===t?"none"===a.css("display")&&(a.trigger("posinit").show().trigger("open").hide(),a.fadeIn(120,function(){n.trigger("dialogopened",{dialog:a})})):"close"===t||"destroy"===t?(a.stop(!0),(a.is(":visible")||o.is(":hidden"))&&(a.trigger("close"),n.trigger("dialogclosed",{dialog:a})),"destroy"===t?(a.remove(),n.trigger("dialogremoved",{dialog:a})):a.data("minimized")&&a.data("minimized").close()):"toTop"===t?(a.trigger("totop"),n.trigger("dialogtotoped",{dialog:a})):"posInit"===t?(a.trigger("posinit"),n.trigger("dialogposinited",{dialog:a})):"tabstopsInit"===t?(a.trigger("tabstopsInit"),n.trigger("dialogtabstopsinited",{dialog:a})):"checkEditing"===t&&u()),this):(t=Object.assign({},e.fn.elfinderdialog.defaults,t),t.allowMinimize&&"auto"===t.allowMinimize&&(t.allowMinimize=!!this.find("textarea,input").length),t.openMaximized=t.allowMinimize&&t.openMaximized,t.headerBtnPos&&"auto"===t.headerBtnPos&&(t.headerBtnPos=s?"right":"left"),t.headerBtnOrder&&"auto"===t.headerBtnOrder&&(t.headerBtnOrder=s?"close:maximize:minimize":"close:minimize:maximize"),t.modal&&t.allowMinimize&&(t.allowMinimize=!1),n.options.dialogContained?c.width=c.height=c.enabled=!0:(c.width="window"===t.maxWidth,c.height="window"===t.maxHeight,(c.width||c.height)&&(c.enabled=!0)),h=n.arrayFlip(t.propagationEvents,!0),this.filter(":not(.ui-dialog-content)").each(function(){var i,a,f=e(this).addClass("ui-dialog-content ui-widget-content"),m="elfinder-dialog-active",g="elfinder-dialog",v="elfinder-dialog-notify",b="ui-state-hover",y="elfinder-tabstop",w="elfinder-focus",x="elfinder-dialog-modal",k=parseInt(1e6*Math.random()),C=e('<div class="ui-dialog-titlebar ui-widget-header ui-corner-top ui-helper-clearfix"><span class="elfinder-dialog-title">'+t.title+"</span></div>"),z=e('<div class="ui-dialog-buttonset"></div>'),T=e('<div class=" ui-helper-clearfix ui-dialog-buttonpane ui-widget-content"></div>').append(z),A=0,j=0,S=e(),O=e('<div style="width:100%;height:100%;position:absolute;top:0px;left:0px;"></div>').hide(),I=function(){t.optimizeNumber&&P.find("input[type=number]").each(function(){e(this).attr("inputmode","numeric"),e(this).attr("pattern","[0-9]*")})},M=function(){S=P.find("."+y),S.length&&(S.attr("tabindex","-1"),S.filter("."+w).length||z.children("."+y+":"+(s?"first":"last")).addClass(w))},E=function(t){var n=S.filter(":visible:enabled"),i=t?null:n.filter("."+w+":first");return i&&i.length||(i=n.first()),t&&e.each(n,function(e,a){if(a===t&&n[e+1])return i=n.eq(e+1),!1}),i},F=function(t){var n=S.filter(":visible:enabled"),i=n.last();return e.each(n,function(e,a){if(a===t&&n[e-1])return i=n.eq(e-1),!1}),i},D=function(){e.each(t.headerBtnOrder.split(":").reverse(),function(e,t){U[t]&&U[t]()}),s&&C.children(".elfinder-titlebar-button").addClass("elfinder-titlebar-button-right")},U={close:function(){C.prepend(e('<span class="ui-widget-header ui-dialog-titlebar-close ui-corner-all elfinder-titlebar-button"><span class="ui-icon ui-icon-closethick"></span></span>').on("mousedown touchstart",function(e){e.preventDefault(),e.stopPropagation(),f.elfinderdialog("close")}))},maximize:function(){t.allowMaximize&&(P.on("resize",function(e,t){var n,i;if(e.preventDefault(),e.stopPropagation(),t&&t.maximize){if(i=C.find(".elfinder-titlebar-full"),n="on"===t.maximize,i.children("span.ui-icon").toggleClass("ui-icon-plusthick",!n).toggleClass("ui-icon-arrowreturnthick-1-s",n),n){try{P.hasClass("ui-draggable")&&P.draggable("disable"),P.hasClass("ui-resizable")&&P.resizable("disable")}catch(e){}f.css("width","100%").css("height",P.height()-P.children(".ui-dialog-titlebar").outerHeight(!0)-T.outerHeight(!0))}else{f.attr("style",i.data("style")),i.removeData("style"),q();try{P.hasClass("ui-draggable")&&P.draggable("enable"),P.hasClass("ui-resizable")&&P.resizable("enable")}catch(e){}}P.trigger("resize",{init:!0})}}),C.prepend(e('<span class="ui-widget-header ui-corner-all elfinder-titlebar-button elfinder-titlebar-full"><span class="ui-icon ui-icon-plusthick"></span></span>').on("mousedown touchstart",function(i){var a=e(this);i.preventDefault(),i.stopPropagation(),P.hasClass("elfinder-maximized")||"undefined"!=typeof a.data("style")||(f.height(f.height()),a.data("style",f.attr("style")||"")),n.toggleMaximize(P),"function"==typeof t.maximize&&t.maximize.call(f[0])})))},minimize:function(){var i,a,o;t.allowMinimize&&(i=e('<span class="ui-widget-header ui-corner-all elfinder-titlebar-button elfinder-titlebar-minimize"><span class="ui-icon ui-icon-minusthick"></span></span>').on("mousedown touchstart",function(i){var r=e(this),s=n.getUI("bottomtray"),l={width:70,height:24},c=e("<div></div>").css(l).addClass(P.get(0).className+" elfinder-dialog-minimized"),d=function(){a.remove(),P.removeData("minimized").show(),f.elfinderdialog("close")},p={};i.preventDefault(),i.stopPropagation(),P.data("minimized")?(P.removeData("minimized").before(a.css(Object.assign({position:"absolute"},a.offset()))),n.toFront(a),a.animate(Object.assign({width:P.width(),height:P.height()},o),function(){P.show(),n.toFront(P),a.remove(),q(),u(),P.trigger("resize",{init:!0}),"function"==typeof t.minimize&&t.minimize.call(f[0])})):(o=P.data("minimized",{dialog:function(){return a},show:function(){a.show()},hide:function(){a.hide()},close:d,title:function(e){a.children(".ui-dialog-titlebar").children(".elfinder-dialog-title").text(e)}}).position(),a=P.clone().on("mousedown",function(){r.trigger("mousedown")}).removeClass("ui-draggable ui-resizable elfinder-frontmost"),s.append(c),Object.assign(p,c.offset(),l),c.remove(),a.height(P.height()).children(".ui-dialog-content:first").empty(),n.toHide(P.before(a)),a.children(".ui-dialog-content:first,.ui-dialog-buttonpane,.ui-resizable-handle").remove(),a.find(".elfinder-titlebar-minimize,.elfinder-titlebar-full").remove(),a.find(".ui-dialog-titlebar-close").on("mousedown",function(e){e.stopPropagation(),e.preventDefault(),d()}),a.animate(p,function(){a.attr("style","").css({maxWidth:P.width()}).addClass("elfinder-dialog-minimized").appendTo(s),u(),"function"==typeof t.minimize&&t.minimize.call(f[0])}))}),C.on("dblclick",function(t){e(this).children(".elfinder-titlebar-minimize").trigger("mousedown")}).prepend(i),P.on("togleminimize",function(){i.trigger("mousedown")}))}},P=e('<div class="ui-front ui-dialog ui-widget ui-widget-content ui-corner-all ui-draggable std42-dialog touch-punch '+g+" "+t.cssClass+'"></div>').hide().append(f).appendTo(o).draggable({containment:n.options.dialogContained?o:null,handle:".ui-dialog-titlebar",start:function(){O.show()},drag:function(e,t){var i=t.offset.top,a=t.offset.left;i<0&&(t.position.top=t.position.top-i),a<0&&(t.position.left=t.position.left-a),n.options.dialogContained&&(t.position.top<0&&(t.position.top=0),t.position.left<0&&(t.position.left=0))},stop:function(e,n){O.hide(),P.css({height:t.height}),f.data("draged",!0)}}).css({width:t.width,height:t.height,minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight}).on("touchstart touchmove touchend click dblclick mouseup mouseenter mouseleave mouseout mouseover mousemove",function(e){!h[e.type]&&e.stopPropagation()}).on("mousedown",function(t){!h[t.type]&&t.stopPropagation(),requestAnimationFrame(function(){P.is(":visible")&&!P.hasClass("elfinder-frontmost")&&(a=e(":focus"),a.length||(a=void 0),P.trigger("totop"))})}).on("open",function(){P.data("margin-y",f.outerHeight(!0)-f.height()),c.enabled&&(t.height&&"auto"!==t.height&&P.trigger("resize",{init:!0}),c.defaultSize||(c.defaultSize={width:f.width(),height:f.height()}),d(P),P.trigger("resize").trigger("posinit"),o.on("resize."+n.namespace,P,p)),P.hasClass(v)||o.children("."+g+":visible:not(."+v+")").each(function(){var t=e(this),n=parseInt(t.css("top")),i=parseInt(t.css("left")),a=parseInt(P.css("top")),o=parseInt(P.css("left")),r=Math.abs(n-a)<10,s=Math.abs(i-o)<10;t[0]!=P[0]&&(r||s)&&P.css({top:r?n+10:a,left:s?i+10:o})}),P.data("modal")&&(P.addClass(x),n.getUI("overlay").elfinderoverlay("show")),P.trigger("totop"),t.openMaximized&&n.toggleMaximize(P),n.trigger("dialogopen",{dialog:P}),"function"==typeof t.open&&e.proxy(t.open,f[0])(),t.closeOnEscape&&e(document).on("keydown."+k,function(t){t.keyCode==e.ui.keyCode.ESCAPE&&P.hasClass("elfinder-frontmost")&&f.elfinderdialog("close")}),P.hasClass(n.res("class","editing"))&&u()}).on("close",function(i){var a,r;t.beforeclose&&"function"==typeof t.beforeclose?(r=t.beforeclose(),r&&r.promise||(r=r?e.Deferred().resolve():e.Deferred().reject())):r=e.Deferred().resolve(),r.done(function(){c.enabled&&o.off("resize."+n.namespace,p),t.closeOnEscape&&e(document).off("keyup."+k),t.allowMaximize&&n.toggleMaximize(P,!1),n.toHide(P),P.data("modal")&&n.getUI("overlay").elfinderoverlay("hide"),"function"==typeof t.close&&e.proxy(t.close,f[0])(),t.destroyOnClose&&P.parent().length&&P.hide().remove(),a=o.children("."+g+":visible"),P.hasClass(n.res("class","editing"))&&u()})}).on("totop frontmost",function(){var e=n.storage("autoFocusDialog");P.data("focusOnMouseOver",e?e>0:n.options.uiOptions.dialog.focusOnMouseOver),P.data("minimized")&&C.children(".elfinder-titlebar-minimize").trigger("mousedown"),!P.data("modal")&&n.getUI("overlay").is(":visible")?n.getUI("overlay").before(P):n.toFront(P),o.children("."+g+":not(."+x+")").removeClass(m),P.addClass(m),!n.UA.Mobile&&(a||E()).trigger("focus"),a=void 0}).on("posinit",function(){var i,a,s,l,c,d,p,u=t.position;if(!P.hasClass("elfinder-maximized")){if(!u&&!P.data("resizing")){if(p=o.hasClass("elfinder-fullscreen")||n.options.enableAlways,P.css(p?{maxWidth:"100%",maxHeight:"100%",overflow:"auto"}:r),n.UA.Mobile&&!p&&P.data("rotated")===n.UA.Rotated)return;P.data("rotated",n.UA.Rotated),c=e(window),i=o.offset(),l={width:P.outerWidth(!0),height:P.outerHeight(!0)},l.right=i.left+l.width,l.bottom=i.top+l.height,d={scrLeft:c.scrollLeft(),scrTop:c.scrollTop(),width:c.width(),height:c.height()},d.right=d.scrLeft+d.width,d.bottom=d.scrTop+d.height,n.options.dialogContained||p?(a=0,s=0):(a=i.top*-1+d.scrTop,s=i.left*-1+d.scrLeft),u={top:l.height>=d.height?a:Math.max(a,parseInt((o.height()-l.height)/2-42)),left:l.width>=d.width?s:Math.max(s,parseInt((o.width()-l.width)/2))},l.right+u.left>d.right&&(u.left=Math.max(s,d.right-l.right)),l.bottom+u.top>d.bottom&&(u.top=Math.max(a,d.bottom-l.bottom))}t.absolute&&(u.position="absolute"),u&&P.css(u)}}).on("resize",function(n,i){var a,o,r,s,l=0,d=i&&i.init;i&&(i.minimize||i.maxmize)||P.data("minimized")||(n.stopPropagation(),n.preventDefault(),P.children(".ui-widget-header,.ui-dialog-buttonpane").each(function(){l+=e(this).outerHeight(!0)}),s="auto"===t.height,s&&f.css({"max-height":"",height:"auto"}),d||!c.enabled||n.originalEvent||P.hasClass("elfinder-maximized")?a=P.height()-l-P.data("margin-y"):(a=P.height(),o=P.css("min-height")||a,r=P.css("max-height")||a,o=o.match(/%/)?Math.floor(parseInt(o)/100*P.parent().height()):parseInt(o),r=r.match(/%/)?Math.floor(parseInt(r)/100*P.parent().height()):parseInt(r),a=Math.min(s?P.height():c.defaultSize.height,Math.max(r,o)-l-P.data("margin-y"))),f.css(s?"max-height":"height",a),d||(q(),o=f.height(),o=a<o?o+l+P.data("margin-y"):t.minHeight,P.css("min-height",o),P.data("hasResizable")&&P.resizable("option",{minHeight:o}),"function"==typeof t.resize&&e.proxy(t.resize,f[0])(n,i)))}).on("tabstopsInit",M).on("focus","."+y,function(){e(this).addClass(b).parent("label").addClass(b),this.id&&e(this).parent().find("label[for="+this.id+"]").addClass(b)}).on("click","select."+y,function(){var t=e(this);t.data("keepFocus")?t.removeData("keepFocus"):t.data("keepFocus",!0)}).on("blur","."+y,function(){e(this).removeClass(b).removeData("keepFocus").parent("label").removeClass(b),this.id&&e(this).parent().find("label[for="+this.id+"]").removeClass(b)}).on("mouseenter mouseleave","."+y+",label",function(n){var i,a=e(this);("LABEL"!==this.nodeName||a.children("."+y).length||(i=a.attr("for"))&&e("#"+i).hasClass(y))&&(t.btnHoverFocus&&P.data("focusOnMouseOver")?"mouseenter"!==n.type||e(":focus").data("keepFocus")||a.trigger("focus"):a.toggleClass(b,"mouseenter"==n.type))}).on("keydown","."+y,function(t){var n,i,a=e(this);if(a.is(":focus")){if(n=t.keyCode===e.ui.keyCode.ESCAPE,t.keyCode===e.ui.keyCode.ENTER?(t.preventDefault(),a.trigger("click")):t.keyCode===e.ui.keyCode.TAB&&t.shiftKey||t.keyCode===e.ui.keyCode.LEFT||t.keyCode==e.ui.keyCode.UP?i="prev":t.keyCode!==e.ui.keyCode.TAB&&t.keyCode!=e.ui.keyCode.RIGHT&&t.keyCode!=e.ui.keyCode.DOWN||(i="next"),i&&(a.is("textarea")&&!t.ctrlKey&&!t.metaKey||a.is("select,span.ui-slider-handle")&&t.keyCode!==e.ui.keyCode.TAB||a.is("input:not(:checkbox,:radio)")&&!t.ctrlKey&&!t.metaKey&&t.keyCode===e.ui.keyCode["prev"===i?"LEFT":"RIGHT"]))return void t.stopPropagation();n?a.is("input:not(:checkbox,:radio),textarea")&&""!==a.val()&&(a.val(""),t.stopPropagation()):t.stopPropagation(),i&&(t.preventDefault(),("prev"===i?F:E)(this).trigger("focus"))}}).data({modal:t.modal}),q=function(){var e,t=n.getUI();t.hasClass("elfinder-fullscreen")&&(e=P.position(),P.css("top",Math.max(Math.min(Math.max(e.top,0),t.height()-100),0)),P.css("left",Math.max(Math.min(Math.max(e.left,0),t.width()-200),0)))};P.prepend(C),D(),e.each(t.buttons,function(t,n){var i=e('<button type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only elfinder-btncnt-'+j++ +" "+y+'"><span class="ui-button-text">'+t+"</span></button>").on("click",e.proxy(n,f[0]));n._cssClass&&i.addClass(n._cssClass),s?z.append(i):z.prepend(i)}),z.children().length&&(P.append(T),P.show(),T.find("button").each(function(t,n){A+=e(n).outerWidth(!0)}),P.hide(),A+=20,P.width()<A&&P.width(A)),P.append(O),c.enabled&&(l.width=P.outerWidth(!0)-P.width()+(P.outerWidth()-P.width())/2,l.height=P.outerHeight(!0)-P.height()+(P.outerHeight()-P.height())/2),n.options.dialogContained&&(i={maxWidth:o.width()-l.width,maxHeight:o.height()-l.height},t.maxWidth=t.maxWidth?Math.min(i.maxWidth,t.maxWidth):i.maxWidth,t.maxHeight=t.maxHeight?Math.min(i.maxHeight,t.maxHeight):i.maxHeight,P.css(i)),r={maxWidth:P.css("max-width"),maxHeight:P.css("max-height"),overflow:P.css("overflow")},t.resizable&&P.resizable({minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight,start:function(){O.show(),P.data("resizing")!==!0&&P.data("resizing")&&clearTimeout(P.data("resizing")),P.data("resizing",!0)},stop:function(e,t){O.hide(),P.data("resizing",setTimeout(function(){P.data("resizing",!1)},200)),c.enabled&&(c.defaultSize={width:f.width(),height:f.height()})}}).data("hasResizable",!0),I(),M(),"function"==typeof t.create&&e.proxy(t.create,this)(),t.autoOpen&&(t.open?requestAnimationFrame(function(){f.elfinderdialog("open")}):f.elfinderdialog("open")),t.resize&&n.bind("themechange",function(){setTimeout(function(){P.data("margin-y",f.outerHeight(!0)-f.height()),P.trigger("resize",{init:!0})},300)})}),this)},e.fn.elfinderdialog.defaults={cssClass:"",title:"",modal:!1,resizable:!0,autoOpen:!0,closeOnEscape:!0,destroyOnClose:!1,buttons:{},btnHoverFocus:!0,position:null,absolute:!1,width:320,height:"auto",minWidth:200,minHeight:70,maxWidth:null,maxHeight:null,allowMinimize:"auto",allowMaximize:!1,openMaximized:!1,headerBtnPos:"auto",headerBtnOrder:"auto",optimizeNumber:!0,propagationEvents:["mousemove","mouseup"]},e.fn.elfinderfullscreenbutton=function(t){return this.each(function(){var n,i=e(this).elfinderbutton(t),a=i.children(".elfinder-button-icon");t.change(function(){n&&cancelAnimationFrame(n),n=requestAnimationFrame(function(){var e=t.value;a.addClass("elfinder-button-icon-fullscreen").toggleClass("elfinder-button-icon-unfullscreen",e),t.className=e?"unfullscreen":""})})})},e.fn.elfindernavbar=function(t,n){return this.not(".elfinder-navbar").each(function(){var i,a,o,r,s,l,c,d=e(this).hide().addClass("ui-state-default elfinder-navbar"),p=d.css("overflow","hidden").parent(),u=p.children(".elfinder-workzone").append(d),h="ltr"==t.direction,f=function(){var e=t.getUI("cwd"),n=t.getUI("workzone"),i=n.data("rectangle"),a=e.offset();n.data("rectangle",Object.assign(i,{cwdEdge:"ltr"===t.direction?a.left:a.left+e.width()}))},m=function(){d.css("overflow","hidden"),i=Math.round(d.outerHeight()-d.height()),a=Math.round(c.outerWidth()-c.innerWidth()),d.css("overflow","auto")};t.one("init",function(){c=t.getUI("navdock");var e=function(){m(),t.bind("wzresize",function(){var e=0;c.width(d.outerWidth()-a),c.children().length>1&&(e=c.outerHeight(!0)),d.height(u.height()-e-i)}).trigger("wzresize")};t.cssloaded?e():t.one("cssloaded",e)}).one("opendone",function(){o&&o.trigger("resize"),d.css("overflow","auto")}).bind("themechange",m),t.UA.Touch&&(s=t.storage("autoHide")||{},"undefined"==typeof s.navbar&&(s.navbar=n.autoHideUA&&n.autoHideUA.length>0&&e.grep(n.autoHideUA,function(e){return!!t.UA[e]}).length,t.storage("autoHide",s)),s.navbar&&t.one("init",function(){d.children().length&&t.uiAutoHide.push(function(){d.stop(!0,!0).trigger("navhide",{duration:"slow",init:!0})})}),t.bind("load",function(){d.children().length&&(r=e('<div class="elfinder-navbar-swipe-handle"></div>').hide().appendTo(u),"none"!==r.css("pointer-events")&&(r.remove(),r=null))}),d.on("navshow navhide",function(e,n){var i="navshow"===e.type?"show":"hide",a=n&&n.duration?n.duration:"fast",o=n&&n.handleW?n.handleW:Math.max(50,t.getUI().width()/10);d.stop(!0,!0)[i]({duration:a,step:function(){t.trigger("wzresize")},complete:function(){r&&("show"===i?r.stop(!0,!0).hide():(r.width(o?o:""),t.resources.blink(r,"slowonce"))),t.trigger("navbar"+i),n.init&&t.trigger("uiautohide"),f()}}),s.navbar="show"!==i,t.storage("autoHide",Object.assign(t.storage("autoHide"),{navbar:s.navbar}))}).on("touchstart",function(n){e(this)["scroll"+("ltr"===t.direction?"Right":"Left")]()>5&&(n.originalEvent._preventSwipeX=!0)})),t.UA.Mobile||(o=d.resizable({handles:h?"e":"w",minWidth:n.minWidth||150,maxWidth:n.maxWidth||500,resize:function(){t.trigger("wzresize")},stop:function(e,n){t.storage("navbarWidth",n.size.width),f()}}).on("resize scroll",function(n){var i=e(this),a=i.data("posinit");n.preventDefault(),n.stopPropagation(),h||"resize"!==n.type||d.css("left",0),a&&cancelAnimationFrame(a),i.data("posinit",requestAnimationFrame(function(){var e=t.UA.Opera&&d.scrollLeft()?20:2;o.css("top",0).css({top:parseInt(d.scrollTop())+"px",left:h?"auto":parseInt(d.scrollRight()-e)*-1,right:h?parseInt(d.scrollLeft()-e)*-1:"auto"}),"resize"===n.type&&t.getUI("cwd").trigger("resize")}))}).children(".ui-resizable-handle").addClass("ui-front")),(l=t.storage("navbarWidth"))?d.width(l):t.UA.Mobile&&t.one(t.cssloaded?"init":"cssloaded",function(){var n=function(){l=d.parent().width()/2,d.data("defWidth")>l?d.width(l):d.width(d.data("defWidth")),d.data("width",d.width()),t.trigger("wzresize")};d.data("defWidth",d.width()),e(window).on("resize."+t.namespace,n),n()})}),this},e.fn.elfindernavdock=function(t,n){return this.not(".elfinder-navdock").each(function(){var i,a,o=e(this).hide().addClass("ui-state-default elfinder-navdock touch-punch"),r=o.parent(),s=(r.children(".elfinder-workzone").append(o),function(n,i){var a,r=i||o.height(),s=n-r,l=Object.keys(c).length,d=l?s/l:0;s&&(a=o.css("overflow"),o.css("overflow","hidden"),o.height(n),e.each(c,function(e,n){n.height(n.height()+d).trigger("resize."+t.namespace)}),t.trigger("wzresize"),o.css("overflow",a))}),l=e('<div class="ui-front ui-resizable-handle ui-resizable-n"></div>').appendTo(o),c={},d=(parseInt(n.initMaxHeight)||50)/100,p=(parseInt(n.maxHeight)||90)/100;o.data("addNode",function(e,n){var r,u,h,f=t.getUI("workzone").height(),m=f*d;return n=Object.assign({first:!1,sizeSync:!0,init:!1},n),e.attr("id")||e.attr("id",t.namespace+"-navdock-"+ +new Date),n.sizeSync&&(c[e.attr("id")]=e),r=o.height(),u=r+e.outerHeight(!0),n.first?l.after(e):o.append(e),a=!0,o.resizable("enable").height(u).show(),t.trigger("wzresize"),n.init&&(h=t.storage("navdockHeight"),u=h?h:u>m?m:u,i=u),s(Math.min(u,f*p)),o}).data("removeNode",function(n,i){var r=e("#"+n);return delete c[n],o.height(o.height()-e("#"+n).outerHeight(!0)),i?"detach"===i?r=r.detach():i.append(r):r.remove(),o.children().length<=1&&(a=!1,o.resizable("disable").height(0).hide()),t.trigger("wzresize"),r}),n.disabled||t.one("init",function(){var e;t.getUI("navbar").children().not(".ui-resizable-handle").length&&(o.data("dockEnabled",!0),o.resizable({maxHeight:t.getUI("workzone").height()*p,handles:{n:l},start:function(n,i){e=o.css("overflow"),o.css("overflow","hidden"),t.trigger("navdockresizestart",{event:n,ui:i},!0)},resize:function(e,n){o.css("top",""),t.trigger("wzresize",{inNavdockResize:!0})},stop:function(n,a){t.trigger("navdockresizestop",{event:n,ui:a},!0),o.css("top",""),i=a.size.height,t.storage("navdockHeight",i),s(i,a.originalSize.height),o.css("overflow",e)}}),t.bind("wzresize",function(e){var n,a;o.is(":visible")&&(n=t.getUI("workzone").height()*p,e.data&&e.data.inNavdockResize||(a=o.height(),n<i?Math.abs(a-n)>1&&s(n):Math.abs(a-i)>1&&s(i)),o.resizable("option","maxHeight",n))}).bind("themechange",function(){var e=Math.round(o.height());requestAnimationFrame(function(){var t=Math.round(o.height()),n=e-t;0!==n&&s(o.height(),t-n)})})),t.bind("navbarshow navbarhide",function(e){o[a&&"navbarshow"===e.type?"show":"hide"]()})})}),this},e.fn.elfinderoverlay=function(t){var n,i,a,o,r=this.parent().elfinder("instance");return this.filter(":not(.elfinder-overlay)").each(function(){t=Object.assign({},t),e(this).addClass("ui-front ui-widget-overlay elfinder-overlay").hide().on("mousedown",function(e){e.preventDefault(),e.stopPropagation()}).data({cnt:0,show:"function"==typeof t.show?t.show:function(){},hide:"function"==typeof t.hide?t.hide:function(){}})}),"show"==t&&(n=this.eq(0),i=n.data("cnt")+1,a=n.data("show"),r.toFront(n),n.data("cnt",i),n.is(":hidden")&&(n.show(),a())),"hide"==t&&(n=this.eq(0),i=n.data("cnt")-1,o=n.data("hide"),n.data("cnt",i),i<=0&&(n.hide(),o())),this},e.fn.elfinderpanel=function(t){return this.each(function(){var n=e(this).addClass("elfinder-panel ui-state-default ui-corner-all"),i="margin-"+("ltr"==t.direction?"left":"right");
18
  t.one("load",function(e){var a=t.getUI("navbar");n.css(i,parseInt(a.outerWidth(!0))),a.on("resize",function(e){e.preventDefault(),e.stopPropagation(),n.is(":visible")&&n.css(i,parseInt(a.outerWidth(!0)))})})})},e.fn.elfinderpath=function(t,n){return this.each(function(){var a,o,r="",s="",l=[],c="statusbar",d=t.res("class","hover"),p="path"+(i.prototype.uniqueid?i.prototype.uniqueid:"")+"-",u=e('<div class="ui-widget-header ui-helper-clearfix elfinder-workzone-path"></div>'),h=e(this).addClass("elfinder-path").html("&nbsp;").on("mousedown","span.elfinder-path-dir",function(n){var i=e(this).attr("id").substr(p.length);n.preventDefault(),i!=t.cwd().hash&&(e(this).addClass(d),r?t.exec("search",r,{target:i,mime:l.join(" ")}):t.trigger("select",{selected:[i]}).exec("open",i))}).prependTo(t.getUI("statusbar").show()),f=e('<div class="elfinder-path-roots"></div>').on("click",function(n){n.stopPropagation(),n.preventDefault();var i=e.map(t.roots,function(e){return t.file(e)}),a=[];e.each(i,function(e,n){n.phash||t.root(t.cwd().hash,!0)===n.hash||a.push({label:t.escape(n.i18||n.name),icon:"home",callback:function(){t.exec("open",n.hash)},options:{iconClass:n.csscls||"",iconImg:n.icon||""}})}),t.trigger("contextmenu",{raw:a,x:n.pageX,y:n.pageY})}).append('<span class="elfinder-button-icon elfinder-button-icon-menu" ></span>').appendTo(u),m=function(n){var i=[],a=[];return e.each(t.parents(n),function(e,o){var r=n===o?"elfinder-path-dir elfinder-path-cwd":"elfinder-path-dir",s=t.file(o),l=t.escape(s.i18||s.name);a.push(l),i.push('<span id="'+p+o+'" class="'+r+'" title="'+a.join(t.option("separator"))+'">'+l+"</span>")}),i.join('<span class="elfinder-path-other">'+t.option("separator")+"</span>")},g=function(){var n;h.children("span.elfinder-path-dir").attr("style",""),n="ltr"===t.direction?e("#"+p+t.cwd().hash).prevAll("span.elfinder-path-dir:first"):e(),h.scrollLeft(n.length?n.position().left:0)},v=function(){if(!t.UA.CSS.flex){var n,i,a=h.children("span.elfinder-path-dir"),o=a.length;if("workzone"===c||o<2)return void a.attr("style","");h.width(h.css("max-width")),a.css({maxWidth:100/o+"%",display:"inline-block"}),n=h.width()-9,h.children("span.elfinder-path-other").each(function(){n-=e(this).width()}),i=[],a.each(function(t){var a=e(this),o=a.width();n-=o,o<this.scrollWidth&&i.push(t)}),h.width(""),i.length?(n>0&&(n/=i.length,e.each(i,function(t,i){var o=e(a[i]);o.css("max-width",o.width()+n)})),a.last().attr("style","")):a.attr("style","")}};t.one("init",function(){a=t.getUI("tree").length,o=t.getUI("stat").length,!a&&n.toWorkzoneWithoutNavbar&&(u.append(h).insertBefore(t.getUI("workzone")),c="workzone",t.bind("open",g).one("opendone",function(){t.getUI().trigger("resize")}))}).bind("open searchend parents",function(){r="",s="",l=[],h.html(m(t.cwd().hash)),Object.keys(t.roots).length>1?(h.css("margin",""),f.show()):(h.css("margin",0),f.hide()),!o&&v()}).bind("searchstart",function(e){e.data&&(r=e.data.query||"",s=e.data.target||"",l=e.data.mimes||[])}).bind("search",function(e){var n="";n=s?m(s):t.i18n("btnAll"),h.html('<span class="elfinder-path-other">'+t.i18n("searcresult")+": </span>"+n),v()}).bind("navbarshow navbarhide",function(){var e=t.getUI("workzone");"navbarshow"===this.type?(t.unbind("open",g),h.prependTo(t.getUI("statusbar")),u.detach(),c="statusbar"):(u.append(h).insertBefore(e),c="workzone",g(),t.bind("open",g)),t.trigger("uiresize")}).bind("resize uistatchange",v)})},e.fn.elfinderplaces=function(t,n){return this.each(function(){var i={},a="class",o=t.res(a,"navdir"),r=t.res(a,"navcollapse"),s=t.res(a,"navexpand"),l=t.res(a,"hover"),c=t.res(a,"treeroot"),d=t.res(a,"adroppable"),p=t.res("tpl","placedir"),u=t.res("tpl","perms"),h=e(t.res("tpl","navspinner")),f=n.suffix?n.suffix:"",m="places"+f,g=null,v=function(e){return e.substr(6)},b=function(e){return"place-"+e},y=function(t){return e(document.getElementById(b(t)))},w=function(){var n=[],a={};n=e.map(E.children().find("[id]"),function(e){return v(e.id)}),n.length?e.each(n.reverse(),function(e,t){a[t]=i[t]}):a=null,t.storage(m,a)},x=function(){var a,o;m="places"+(n.suffix?n.suffix:""),i={},a=t.storage(m),"string"==typeof a?(a=e.grep(a.split(","),function(e){return!!e}),e.each(a,function(e,t){var n=t.split("#");i[n[0]]=n[1]?n[1]:n[0]})):e.isPlainObject(a)&&(i=a),t.trigger("placesload",{dirs:i,storageKey:m},!0),o=Object.keys(i),o.length&&(M.prepend(h),t.request({data:{cmd:"info",targets:o},preventDefault:!0}).done(function(n){var a={};n.files&&n.files.length&&t.cache(n.files),e.each(n.files,function(e,t){var n=t.hash;a[n]=t}),e.each(i,function(e,t){C(a[e]||Object.assign({notfound:!0},t))}),t.storage("placesState")>0&&M.trigger("click")}).always(function(){h.remove()}))},k=function(n,i){return e(p.replace(/\{id\}/,b(n?n.hash:i)).replace(/\{name\}/,t.escape(n?n.i18||n.name:i)).replace(/\{cssclass\}/,n?t.perms2class(n)+(n.notfound?" elfinder-na":"")+(n.csscls?" "+n.csscls:""):"").replace(/\{permissions\}/,!n||n.read&&n.write&&!n.notfound?"":u).replace(/\{title\}/,n?' title="'+t.escape(t.path(n.hash,!0)||n.i18||n.name)+'"':"").replace(/\{symlink\}/,"").replace(/\{style\}/,n&&n.icon?t.getIconStyle(n):""))},C=function(e){var n,a;return"directory"===e.mime&&(a=e.hash,t.files().hasOwnProperty(a)||t.trigger("tree",{tree:[e]}),n=k(e,a),i[a]=e,E.prepend(n),M.addClass(r),O.toggle(E.children().length>1),!0)},z=function(e){var t,n,a=null;return i[e]&&(delete i[e],t=y(e),t.length&&(a=t.text(),t.parent().remove(),n=E.children().length,O.toggle(n>1),n||(M.removeClass(r),F.removeClass(s),E.slideToggle(!1)))),a},T=function(e){var n=y(e),i=n.parent(),a=i.prev("div"),o="ui-state-hover",r=t.getUI("contextmenu");g&&clearTimeout(g),a.length&&(r.find(":first").data("placesHash",e),n.addClass(o),i.insertBefore(a),a=i.prev("div"),g=setTimeout(function(){n.removeClass(o),r.find(":first").data("placesHash")===e&&r.hide().empty()},1500)),a.length||(n.removeClass(o),r.hide().empty())},A=function(e,t){var n=e.hash,a=y(t||n),o=k(e,n);return a.length>0&&(a.parent().replaceWith(o),i[n]=e,!0)},j=function(){E.empty(),M.removeClass(r),F.removeClass(s),E.slideToggle(!1)},S=function(){e.each(i,function(n,i){var a=t.file(n)||i,r=k(a,n),s=null;return a||r.hide(),!(!E.children().length||(e.each(E.children(),function(){var t=e(this);if((a.i18||a.name).localeCompare(t.children("."+o).text())<0)return s=!r.insertBefore(t)}),null===s))||void(!y(n).length&&E.append(r))}),w()},O=e('<span class="elfinder-button-icon elfinder-button-icon-sort elfinder-places-root-icon" title="'+t.i18n("cmdsort")+'"></span>').hide().on("click",function(e){e.stopPropagation(),E.empty(),S()}),I=k({hash:"root-"+t.namespace,name:t.i18n(n.name,"places"),read:!0,write:!0}),M=I.children("."+o).addClass(c).on("click",function(e){e.stopPropagation(),M.hasClass(r)&&(F.toggleClass(s),E.slideToggle(),t.storage("placesState",F.hasClass(s)?1:0))}).append(O),E=I.children("."+t.res(a,"navsubtree")),F=e(this).addClass(t.res(a,"tree")+" elfinder-places ui-corner-all").hide().append(I).appendTo(t.getUI("navbar")).on("mouseenter mouseleave","."+o,function(t){e(this).toggleClass("ui-state-hover","mouseenter"==t.type)}).on("click","."+o,function(n){var i=e(this);return i.data("longtap")?void n.stopPropagation():void(!i.hasClass("elfinder-na")&&t.exec("open",i.attr("id").substr(6)))}).on("contextmenu","."+o+":not(."+c+")",function(n){var i=e(this),a=i.attr("id").substr(6);n.preventDefault(),t.trigger("contextmenu",{raw:[{label:t.i18n("moveUp"),icon:"up",remain:!0,callback:function(){T(a),w()}},"|",{label:t.i18n("rmFromPlaces"),icon:"rm",callback:function(){z(a),w()}}],x:n.pageX,y:n.pageY}),i.addClass("ui-state-hover"),t.getUI("contextmenu").children().on("mouseenter",function(){i.addClass("ui-state-hover")}),t.bind("closecontextmenu",function(){i.removeClass("ui-state-hover")})}).droppable({tolerance:"pointer",accept:".elfinder-cwd-file-wrapper,.elfinder-tree-dir,.elfinder-cwd-file",hoverClass:t.res("class","adroppable"),classes:{"ui-droppable-hover":t.res("class","adroppable")},over:function(n,a){var o=a.helper,r=e.grep(o.data("files"),function(e){return"directory"===t.file(e).mime&&!i[e]});n.stopPropagation(),o.data("dropover",o.data("dropover")+1),t.insideWorkzone(n.pageX,n.pageY)&&(r.length>0?(o.addClass("elfinder-drag-helper-plus"),t.trigger("unlockfiles",{files:o.data("files"),helper:o})):e(this).removeClass(d))},out:function(t,n){var i=n.helper;t.stopPropagation(),i.removeClass("elfinder-drag-helper-move elfinder-drag-helper-plus").data("dropover",Math.max(i.data("dropover")-1,0)),e(this).removeData("dropover").removeClass(d)},drop:function(n,a){var o=a.helper,r=!0;e.each(o.data("files"),function(e,n){var a=t.file(n);a&&"directory"==a.mime&&!i[a.hash]?C(a):r=!1}),w(),r&&o.hide()}}).on("touchstart","."+o+":not(."+c+")",function(n){if(!(n.originalEvent.touches.length>1))var i=e(this).attr("id").substr(6),a=e(this).addClass(l).data("longtap",null).data("tmlongtap",setTimeout(function(){a.data("longtap",!0),t.trigger("contextmenu",{raw:[{label:t.i18n("rmFromPlaces"),icon:"rm",callback:function(){z(i),w()}}],x:n.originalEvent.touches[0].pageX,y:n.originalEvent.touches[0].pageY})},500))}).on("touchmove touchend","."+o+":not(."+c+")",function(t){clearTimeout(e(this).data("tmlongtap")),"touchmove"==t.type&&e(this).removeClass(l)});e.fn.sortable&&E.addClass("touch-punch").sortable({appendTo:t.getUI(),revert:!1,helper:function(n){var i=e(n.target).parent();return i.children().removeClass("ui-state-hover"),e('<div class="ui-widget elfinder-place-drag elfinder-'+t.direction+'"></div>').append(e('<div class="elfinder-navbar"></div>').show().append(i.clone()))},stop:function(t,n){var i=e(n.item[0]),a=F.offset().top,o=F.offset().left,r=F.width(),s=F.height(),l=t.pageX,c=t.pageY;l>o&&l<o+r&&c>a&&c<c+s||(z(v(i.children(":first").attr("id"))),w())},update:function(e,t){w()}}),e(this).on("regist",function(t,n){var a=!1;e.each(n,function(e,t){t&&"directory"==t.mime&&!i[t.hash]&&C(t)&&(a=!0)}),a&&w()}),t.one("load",function(){t.oldAPI||(F.show().parent().show(),x(),t.change(function(t){var n=!1;e.each(t.data.changed,function(e,t){i[t.hash]&&("directory"!==t.mime?z(t.hash)&&(n=!0):A(t)&&(n=!0))}),n&&w()}).bind("rename",function(t){var n=!1;t.data.removed&&e.each(t.data.removed,function(e,i){t.data.added[e]&&A(t.data.added[e],i)&&(n=!0)}),n&&w()}).bind("rm paste",function(t){var n=[],i=!1;t.data.removed&&e.each(t.data.removed,function(e,t){var i=z(t);i&&n.push(i)}),n.length&&(i=!0),t.data.added&&n.length&&e.each(t.data.added,function(t,i){1!==e.inArray(i.name,n)&&"directory"==i.mime&&C(i)}),i&&w()}).bind("sync netmount",function(){var a,o=this,r=n.suffix?n.suffix:"";return"sync"===o.type&&f!==r?(f=r,j(),void x()):(a=Object.keys(i),void(a.length&&(M.prepend(h),t.request({data:{cmd:"info",targets:a},preventDefault:!0}).done(function(n){var a={},r=!1,s=t.cwd().hash;e.each(n.files||[],function(e,n){var i=n.hash;a[i]=n,t.files().hasOwnProperty(n.hash)||t.updateCache({tree:[n]})}),e.each(i,function(e,t){Boolean(t.notfound)===Boolean(a[e])?t.phash===s&&"netmount"!==o.type||a[e]&&"directory"!==a[e].mime?z(e)&&(r=!0):A(a[e]||Object.assign({notfound:!0},t))&&(r=!0):a[e]&&a[e].phash!=s&&A(a[e])}),r&&w()}).always(function(){h.remove()}))))}))})})},e.fn.elfindersearchbutton=function(t){return this.each(function(){var n,i,a,o,r=!1,s=t.fm,l=(s.res("class","disabled"),t.options.incsearch||{enable:!1}),c=t.options.searchTypes,d=function(e){return s.namespace+s.escape(e)},p=s.getUI("toolbar"),u=s.res("class","searchbtn"),h=e(this).hide().addClass("ui-widget-content elfinder-button "+u).on("click",function(e){e.stopPropagation()}),f=function(){var e=s.getUI(),t=e.offset(),n=h.offset();return{top:n.top-t.top,maxHeight:e.height()-40}},m=function(){b.data("inctm")&&clearTimeout(b.data("inctm"));var n=e.trim(b.val()),a=!e("#"+d("SearchFromAll")).prop("checked"),o=e("#"+d("SearchMime")).prop("checked"),l="";a&&(a=e("#"+d("SearchFromVol")).prop("checked")?s.root(s.cwd().hash):s.cwd().hash),o&&(o=n,n="."),i&&(l=i.children("input:checked").val()),n?(b.trigger("focus"),t.exec(n,a,o,l).done(function(){r=!0}).fail(function(){g()})):s.trigger("searchend")},g=function(){b.data("inctm")&&clearTimeout(b.data("inctm")),b.val("").trigger("blur"),(r||v)&&(r=!1,v="",s.lazy(function(){s.trigger("searchend")}))},v="",b=e('<input type="text" size="42"/>').on("focus",function(){!h.hasClass("ui-state-active")&&s.getUI().click(),o=!0,v="",h.addClass("ui-state-active"),s.trigger("uiresize"),n&&n.css(f()).slideDown(function(){h.addClass("ui-state-active"),s.toFront(n)})}).on("blur",function(){o=!1,n?n.data("infocus")?n.data("infocus",!1):n.slideUp(function(){h.removeClass("ui-state-active"),s.trigger("uiresize"),s.toHide(n)}):h.removeClass("ui-state-active")}).appendTo(h).on("keypress",function(e){e.stopPropagation()}).on("keydown",function(t){t.stopPropagation(),t.keyCode===e.ui.keyCode.ENTER?m():t.keyCode===e.ui.keyCode.ESCAPE&&(t.preventDefault(),g())});l.enable&&(l.minlen=l.minlen||2,l.wait=l.wait||500,b.attr("title",s.i18n("incSearchOnly")).on("compositionstart",function(){b.data("composing",!0)}).on("compositionend",function(){b.removeData("composing"),b.trigger("input")}).on("input",function(){b.data("composing")||(b.data("inctm")&&clearTimeout(b.data("inctm")),b.data("inctm",setTimeout(function(){var e=b.val();(0===e.length||e.length>=l.minlen)&&(v!==e&&s.trigger("incsearchstart",{query:e,type:i?i.children("input:checked").val():"searchName"}),v=e,""===e&&s.searchStatus.state>1&&s.searchStatus.query&&b.val(s.searchStatus.query).trigger("select"))},l.wait)))}),s.UA.ltIE8&&b.on("keydown",function(e){229===e.keyCode&&(b.data("imetm")&&clearTimeout(b.data("imetm")),b.data("composing",!0),b.data("imetm",setTimeout(function(){b.removeData("composing")},100)))}).on("keyup",function(t){b.data("imetm")&&clearTimeout(b.data("imetm")),b.data("composing")?t.keyCode===e.ui.keyCode.ENTER&&b.trigger("compositionend"):b.trigger("input")})),e('<span class="ui-icon ui-icon-search" title="'+t.title+'"></span>').appendTo(h).on("mousedown",function(e){e.stopPropagation(),e.preventDefault(),h.hasClass("ui-state-active")?m():b.trigger("focus")}),e('<span class="ui-icon ui-icon-close"></span>').appendTo(h).on("mousedown",function(e){e.stopPropagation(),e.preventDefault(),""!==b.val()||h.hasClass("ui-state-active")?g():b.trigger("focus")}),s.bind("toolbarload",function(){var e=h.parent();if(e.length&&(p.prepend(h.show()),e.remove(),s.UA.ltIE7)){var t=h.children("ltr"==s.direction?".ui-icon-close":".ui-icon-search");t.css({right:"",left:parseInt(h.width())-t.outerWidth(!0)})}}),s.one("init",function(){s.getUI("cwd").on("touchstart click",function(){o&&b.trigger("blur")})}).one("open",function(){n=s.api<2.1?null:e('<div class="ui-front ui-widget ui-widget-content elfinder-button-menu elfinder-button-search-menu ui-corner-all"></div>').append(e('<div class="buttonset"></div>').append(e('<input id="'+d("SearchFromCwd")+'" name="serchfrom" type="radio" checked="checked"/><label for="'+d("SearchFromCwd")+'">'+s.i18n("btnCwd")+"</label>"),e('<input id="'+d("SearchFromVol")+'" name="serchfrom" type="radio"/><label for="'+d("SearchFromVol")+'">'+s.i18n("btnVolume")+"</label>"),e('<input id="'+d("SearchFromAll")+'" name="serchfrom" type="radio"/><label for="'+d("SearchFromAll")+'">'+s.i18n("btnAll")+"</label>")),e('<div class="buttonset elfinder-search-type"></div>').append(e('<input id="'+d("SearchName")+'" name="serchcol" type="radio" checked="checked" value="SearchName"/><label for="'+d("SearchName")+'">'+s.i18n("btnFileName")+"</label>"))).hide().appendTo(s.getUI()),n&&(c&&(i=n.find(".elfinder-search-type"),e.each(t.options.searchTypes,function(t,n){i.append(e('<input id="'+d(t)+'" name="serchcol" type="radio" value="'+s.escape(t)+'"/><label for="'+d(t)+'">'+s.i18n(n.name)+"</label>"))})),n.find("div.buttonset").buttonset(),e("#"+d("SearchFromAll")).next("label").attr("title",s.i18n("searchTarget",s.i18n("btnAll"))),c&&e.each(c,function(t,n){n.title&&e("#"+d(t)).next("label").attr("title",s.i18n(n.title))}),n.on("mousedown","div.buttonset",function(e){e.stopPropagation(),n.data("infocus",!0)}).on("click","input",function(t){t.stopPropagation(),e.trim(b.val())?m():b.trigger("focus")}).on("close",function(){b.trigger("blur")}))}).bind("searchend",function(){b.val("")}).bind("open parents",function(){var t=[],n=s.file(s.root(s.cwd().hash));n&&(e.each(s.parents(s.cwd().hash),function(e,n){t.push(s.file(n).name)}),e("#"+d("SearchFromCwd")).next("label").attr("title",s.i18n("searchTarget",t.join(s.option("separator")))),e("#"+d("SearchFromVol")).next("label").attr("title",s.i18n("searchTarget",n.name)))}).bind("open",function(){v&&g()}).bind("cwdinit",function(){a=!1}).bind("cwdrender",function(){a=!0}).bind("keydownEsc",function(){v&&"/"===v.substr(0,1)&&(v="",b.val(""),s.trigger("searchend"))}).shortcut({pattern:"ctrl+f f3",description:t.title,callback:function(){b.trigger("select").trigger("focus")}}).shortcut({pattern:"a b c d e f g h i j k l m n o p q r s t u v w x y z dig0 dig1 dig2 dig3 dig4 dig5 dig6 dig7 dig8 dig9 num0 num1 num2 num3 num4 num5 num6 num7 num8 num9",description:s.i18n("firstLetterSearch"),callback:function(t){if(a){var n,i=t.originalEvent.keyCode,o=function(){var t=s.selected(),n=e.ui.keyCode[!t.length||s.cwdHash2Elm(t[0]).next("[id]").length?"RIGHT":"HOME"];e(document).trigger(e.Event("keydown",{keyCode:n,ctrlKey:!1,shiftKey:!1,altKey:!1,metaKey:!1}))};i>=96&&i<=105&&(i-=48),n="/"+String.fromCharCode(i),v!==n?(b.val(n),v=n,s.trigger("incsearchstart",{query:n}).one("cwdrender",o)):o()}}})})},e.fn.elfindersortbutton=function(t){return this.each(function(){var n,i=t.fm,a=t.name,o="class",r=i.res(o,"disabled"),s=i.res(o,"hover"),l="elfinder-button-menu-item",c=l+"-selected",d=c+"-asc",p=c+"-desc",u=e('<span class="elfinder-button-text">'+t.title+"</span>"),h=e(this).addClass("ui-state-default elfinder-button elfinder-menubutton elfiner-button-"+a).attr("title",t.title).append('<span class="elfinder-button-icon elfinder-button-icon-'+a+'"></span>',u).on("mouseenter mouseleave",function(e){!h.hasClass(r)&&h.toggleClass(s,"mouseenter"===e.type)}).on("click",function(e){h.hasClass(r)||(e.stopPropagation(),m.is(":hidden")&&i.getUI().click(),m.css(v()).slideToggle({duration:100,done:function(e){i[m.is(":visible")?"toFront":"toHide"](m)}}))}),f=function(){i.toHide(m)},m=e('<div class="ui-front ui-widget ui-widget-content elfinder-button-menu elfinder-button-sort-menu ui-corner-all"></div>').hide().appendTo(i.getUI()).on("mouseenter mouseleave","."+l,function(t){e(this).toggleClass(s,"mouseenter"===t.type)}).on("click",function(e){e.preventDefault(),e.stopPropagation()}).on("close",f),g=function(){m.children("[rel]").removeClass(c+" "+d+" "+p).filter('[rel="'+i.sortType+'"]').addClass(c+" "+("asc"==i.sortOrder?d:p)),m.children(".elfinder-sort-stick").toggleClass(c,i.sortStickFolders),m.children(".elfinder-sort-tree").toggleClass(c,i.sortAlsoTreeview)},v=function(){var e=i.getUI().offset(),t=h.offset();return{top:t.top-e.top,left:t.left-e.left}};u.hide(),e.each(i.sortRules,function(t,n){m.append(e('<div class="'+l+'" rel="'+t+'"><span class="ui-icon ui-icon-arrowthick-1-n"></span><span class="ui-icon ui-icon-arrowthick-1-s"></span>'+i.i18n("sort"+t)+"</div>").data("type",t))}),m.children().on("click",function(n){t.exec([],e(this).removeClass(s).attr("rel"))}),e('<div class="'+l+" "+l+'-separated elfinder-sort-ext elfinder-sort-stick"><span class="ui-icon ui-icon-check"></span>'+i.i18n("sortFoldersFirst")+"</div>").appendTo(m).on("click",function(){t.exec([],"stick")}),i.one("init",function(){i.ui.tree&&null!==i.options.sortAlsoTreeview&&e('<div class="'+l+" "+l+'-separated elfinder-sort-ext elfinder-sort-tree"><span class="ui-icon ui-icon-check"></span>'+i.i18n("sortAlsoTreeview")+"</div>").appendTo(m).on("click",function(){t.exec([],"tree")})}).bind("disable select",f).bind("sortchange",g).getUI().on("click",f),m.children().length>1?t.change(function(){n&&cancelAnimationFrame(n),n=requestAnimationFrame(function(){h.toggleClass(r,t.disabled()),g()})}).change():h.addClass(r)})},e.fn.elfinderstat=function(t){return this.each(function(){var n=e(this).addClass("elfinder-stat-size"),i=e('<div class="elfinder-stat-selected"></div>').on("click","a",function(n){var i=e(this).data("hash");n.preventDefault(),t.exec("opendir",[i])}),a=t.i18n("items"),o=t.i18n("selected"),r=t.i18n("size"),s=function(i){var o=0,r=0,s=t.cwd(),l=!0,c=!0;(s.sizeInfo||s.size)&&(r=s.size,l=!1),e.each(i,function(e,t){o++,l&&(r+=parseInt(t.size)||0,c!==!0||"directory"!==t.mime||t.sizeInfo||(c=!1))}),n.html(a+': <span class="elfinder-stat-incsearch"></span>'+o+',&nbsp;<span class="elfinder-stat-size'+(c?" elfinder-stat-size-recursive":"")+'">'+t.i18n(c?"sum":"size")+": "+t.formatSize(r)+"</span>").attr("title",n.text()),t.trigger("uistatchange")},l=function(e){n.find("span.elfinder-stat-incsearch").html(e?e.hashes.length+" / ":""),n.attr("title",n.text()),t.trigger("uistatchange")},c=function(n){var a,s,l=0,c=0,d=[];1===n.length?(s=n[0],l=s.size,2===t.searchStatus.state&&(a=t.escape(s.path?s.path.replace(/\/[^\/]*$/,""):".."),d.push('<a href="#elf_'+s.phash+'" data-hash="'+s.hash+'" title="'+a+'">'+a+"</a>")),d.push(t.escape(s.i18||s.name)),i.html(d.join("/")+(l>0?", "+t.formatSize(l):""))):n.length?(e.each(n,function(e,t){c++,l+=parseInt(t.size)||0}),i.html(c?o+": "+c+", "+r+": "+t.formatSize(l):"&nbsp;")):i.html(""),i.attr("title",i.text()),t.trigger("uistatchange")};t.getUI("statusbar").prepend(n).append(i).show(),t.UA.Mobile&&e.fn.tooltip&&t.getUI("statusbar").tooltip({classes:{"ui-tooltip":"elfinder-ui-tooltip ui-widget-shadow"},tooltipClass:"elfinder-ui-tooltip ui-widget-shadow",track:!0}),t.bind("cwdhasheschange",function(n){s(e.map(n.data,function(e){return t.file(e)}))}).change(function(i){var a=i.data.changed||[],o=t.cwd().hash;e.each(a,function(){if(this.hash===o)return this.size&&(n.children(".elfinder-stat-size").addClass("elfinder-stat-size-recursive").html(t.i18n("sum")+": "+t.formatSize(this.size)),n.attr("title",n.text())),!1})}).select(function(){c(t.selectedFiles())}).bind("open",function(){c([])}).bind("incsearch",function(e){l(e.data)}).bind("incsearchend",function(){l()})})},e.fn.elfindertoast=function(t,n){var i=Object.assign({mode:"success",msg:"",showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1500,hideEasing:"swing",onHidden:void 0,timeOut:3e3,extNode:void 0,button:void 0,width:void 0},e.isPlainObject(n.options.uiOptions.toast.defaults)?n.options.uiOptions.toast.defaults:{});return this.each(function(){t=Object.assign({},i,t||{});var a,o=e(this),r=function(e){o.stop(),n.toFront(o),o[t.showMethod]({duration:t.showDuration,easing:t.showEasing,complete:function(){t.onShown&&t.onShown(),!e&&t.timeOut&&(a=setTimeout(s,t.timeOut))}})},s=function(){o[t.hideMethod]({duration:t.hideDuration,easing:t.hideEasing,complete:function(){t.onHidden&&t.onHidden(),o.remove()}})};o.on("click",function(e){e.stopPropagation(),e.preventDefault(),a&&clearTimeout(a),t.onHidden&&t.onHidden(),o.stop().remove()}).on("mouseenter mouseleave",function(e){t.timeOut&&(a&&clearTimeout(a),a=null,"mouseenter"===e.type?r(!0):a=setTimeout(s,t.timeOut))}).hide().addClass("toast-"+t.mode).append(e('<div class="elfinder-toast-msg"></div>').html(t.msg.replace(/%([a-zA-Z0-9]+)%/g,function(e,t){return n.i18n(t)}))),t.extNode&&o.append(t.extNode),t.button&&o.append(e('<button class="ui-button ui-widget ui-state-default ui-corner-all elfinder-tabstop"></button>').append(e('<span class="ui-button-text"></span>').text(n.i18n(t.button.text))).on("mouseenter mouseleave",function(t){e(this).toggleClass("ui-state-hover","mouseenter"==t.type)}).on("click",t.button.click||function(){})),t.width&&o.css("max-width",t.width),r()})},e.fn.elfindertoolbar=function(t,n){return this.not(".elfinder-toolbar").each(function(){var i,a,o,r,s,l,c,d,p,u=t._commands,h=e(this).addClass("ui-helper-clearfix ui-widget-header elfinder-toolbar"),f={displayTextLabel:!1,labelExcludeUA:["Mobile"],autoHideUA:["Mobile"],showPreferenceButton:"none"},m=function(t){return e.grep(t,function(t){return!e.isPlainObject(t)||(f=Object.assign(f,t),!1)})},g=function(n){var l,c;for(e.each(v,function(e,t){t.detach()}),h.empty(),i=b.length;i--;)if(b[i]){for(r=e('<div class="ui-widget-content ui-corner-all elfinder-buttonset"></div>'),a=b[i].length;a--;)l=b[i][a],n&&n[l]||!(o=u[l])||(s="elfinder"+o.options.ui,!v[l]&&e.fn[s]&&(v[l]=e("<div></div>")[s](o)),v[l]&&(v[l].children(".elfinder-button-text")[d?"show":"hide"](),r.prepend(v[l])));r.children().length&&h.prepend(r),r.children(":gt(0)").before('<span class="ui-widget-content elfinder-toolbar-button-separator"></span>')}(c=u.preference)&&("always"===f.showPreferenceButton||!h.children().length&&"auto"===f.showPreferenceButton)&&(r=e('<div class="ui-widget-content ui-corner-all elfinder-buttonset"></div>'),l="preference",s="elfinder"+o.options.ui,v[l]=e("<div></div>")[s](c),v[l].children(".elfinder-button-text")[d?"show":"hide"](),r.prepend(v[l]),h.append(r)),!h.data("swipeClose")&&h.children().length?h.show():h.hide(),x=h[0].clientHeight,t.trigger("toolbarload").trigger("uiresize")},v={},b=m(n||[]),y=null,w="",x=0,k=[];f.showPreferenceButton=f.showPreferenceButton.toLowerCase(),"none"!==f.displayTextLabel&&(d=t.storage("toolbarTextLabel"),d=null===d?f.displayTextLabel&&(!f.labelExcludeUA||!f.labelExcludeUA.length||!e.grep(f.labelExcludeUA,function(e){return!!t.UA[e]}).length):1==d,k.push({label:t.i18n("textLabel"),icon:"text",callback:function(){d=!d,h.css("height","").find(".elfinder-button-text")[d?"show":"hide"](),t.trigger("uiresize").storage("toolbarTextLabel",d?"1":"0")}})),f.preferenceInContextmenu&&u.preference&&k.push({label:t.i18n("toolbarPref"),icon:"preference",callback:function(){t.exec("preference",void 0,{tab:"toolbar"})}}),k.length&&h.on("contextmenu",function(e){e.stopPropagation(),e.preventDefault(),t.trigger("contextmenu",{raw:k,x:e.pageX,y:e.pageY})}).on("touchstart",function(e){e.originalEvent.touches.length>1||(h.data("tmlongtap")&&clearTimeout(h.data("tmlongtap")),h.removeData("longtap").data("longtap",{x:e.originalEvent.touches[0].pageX,y:e.originalEvent.touches[0].pageY}).data("tmlongtap",setTimeout(function(){h.removeData("longtapTm").trigger({type:"contextmenu",pageX:h.data("longtap").x,pageY:h.data("longtap").y}).data("longtap",{longtap:!0})},500)))}).on("touchmove touchend",function(e){h.data("tmlongtap")&&(("touchend"===e.type||Math.abs(h.data("longtap").x-e.originalEvent.touches[0].pageX)+Math.abs(h.data("longtap").y-e.originalEvent.touches[0].pageY)>4)&&clearTimeout(h.data("tmlongtap")),h.removeData("longtapTm"))}).on("click",function(e){h.data("longtap")&&h.data("longtap").longtap&&(e.stopImmediatePropagation(),e.preventDefault())}).on("touchend click",".elfinder-button",function(e){h.data("longtap")&&h.data("longtap").longtap&&(e.stopImmediatePropagation(),e.preventDefault())}),h.prev().length&&h.parent().prepend(this),g(),t.bind("open sync select toolbarpref",function(){var n,i,a,o=Object.assign({},t.option("disabledFlip")),r=t.storage("toolbarhides");if(!r&&Array.isArray(f.defaultHides)&&(r={},e.each(f.defaultHides,function(){r[this]=!0}),t.storage("toolbarhides",r)),"select"===this.type){if(t.searchStatus.state<2)return;i=t.selected(),i.length&&(o=t.getDisabledCmds(i,!0))}e.each(r,function(e){o[e]||(o[e]=!0)}),Object.keys(t.commandMap).length&&e.each(t.commandMap,function(e,t){"hidden"===t&&(o[e]=!0)}),a=Object.keys(o),y&&y.toString()===a.sort().toString()||(g(a.length?o:null),n=!0),y=a.sort(),(n||w!==JSON.stringify(t.commandMap))&&(w=JSON.stringify(t.commandMap),n||e.each(e("div.elfinder-button"),function(){var t=e(this).data("origin");t&&e(this).after(t).detach()}),Object.keys(t.commandMap).length&&e.each(t.commandMap,function(n,i){var a,o=t._commands[i],r=o?"elfinder"+o.options.ui:null;r&&e.fn[r]&&(a=v[n],a&&(!v[i]&&e.fn[r]&&(v[i]=e("<div></div>")[r](o),v[i]&&(v[i].children(".elfinder-button-text")[d?"show":"hide"](),o.extendsCmd&&v[i].children("span.elfinder-button-icon").addClass("elfinder-button-icon-"+o.extendsCmd))),v[i]&&(a.after(v[i]),v[i].data("origin",a.detach()))))}))}).bind("resize",function(e){p&&cancelAnimationFrame(p),p=requestAnimationFrame(function(){var e=h[0].clientHeight;x!==e&&(x=e,t.trigger("uiresize"))})}),t.UA.Touch&&(c=t.storage("autoHide")||{},"undefined"==typeof c.toolbar&&(c.toolbar=f.autoHideUA&&f.autoHideUA.length>0&&e.grep(f.autoHideUA,function(e){return!!t.UA[e]}).length,t.storage("autoHide",c)),c.toolbar&&t.one("init",function(){t.uiAutoHide.push(function(){h.stop(!0,!0).trigger("toggle",{duration:500,init:!0})})}),t.bind("load",function(){l=e('<div class="elfinder-toolbar-swipe-handle"></div>').hide().appendTo(t.getUI()),"none"!==l.css("pointer-events")&&(l.remove(),l=null)}),h.on("toggle",function(e,n){var i=t.getUI("workzone"),a=h.is(":hidden"),o=i.height(),r=h.height(),s=h.outerHeight(!0),d=s-r,p=Object.assign({step:function(e){i.height(o+(a?(e+d)*-1:r-e)),t.trigger("resize")},always:function(){requestAnimationFrame(function(){h.css("height",""),t.trigger("uiresize"),l&&(a?l.stop(!0,!0).hide():(l.height(n.handleH?n.handleH:""),t.resources.blink(l,"slowonce"))),a&&h.scrollTop("0px"),n.init&&t.trigger("uiautohide")})}},n);h.data("swipeClose",!a).stop(!0,!0).animate({height:"toggle"},p),c.toolbar=!a,t.storage("autoHide",Object.assign(t.storage("autoHide"),{toolbar:c.toolbar}))}).on("touchstart",function(e){h.scrollBottom()>5&&(e.originalEvent._preventSwipeY=!0)}))}),this},e.fn.elfindertree=function(t,n){var i=t.res("class","tree");return this.not("."+i).each(function(){var a,o,r,s,l="class",c=t.UA.Mobile,d=t.res(l,"treeroot"),p=n.openRootOnLoad,u=n.openCwdOnOpen,h=u||n.syncTree,f=t.res(l,"navsubtree"),m=t.res(l,"treedir"),g="span."+m,v=t.res(l,"navcollapse"),b=t.res(l,"navexpand"),y="elfinder-subtree-loaded",w="elfinder-subtree-chksubdir",x=t.res(l,"navarrow"),k=t.res(l,"active"),C=t.res(l,"adroppable"),z=t.res(l,"hover"),T=t.res(l,"disabled"),A=t.res(l,"draggable"),j=t.res(l,"droppable"),S="elfinder-navbar-wrapper-root",O="elfinder-navbar-wrapper-pastable",I="elfinder-navbar-wrapper-uploadable",M=function(e){var t=se.offset().left;return t<=e&&e<=t+se.width()},E={},F=[],D=function(n){var i=[];if(e.each(n,function(e,n){E[n]&&i.push(t.navId2Hash(n)),delete E[n]}),i.length)return t.request({data:{cmd:"subdirs",targets:i,preventDefault:!0}}).done(function(n){n&&n.subdirs&&e.each(n.subdirs,function(e,n){var i=t.navHash2Elm(e);i.removeClass(w),i[n?"addClass":"removeClass"](v)})})},U=null,P=function(){var n=Object.keys(E);n.length&&(U&&U._abort(),a&&clearTimeout(a),F=[],U=t.asyncJob(function(n){return t.isInWindow(e("#"+n))?n:null},n,{numPerOnce:200}).done(function(e){e.length&&(F=e,R())}))},q=0,R=function(){var e,i=n.subdirsMaxConn-q,o=t.maxTargets?Math.min(t.maxTargets,n.subdirsAtOnce):n.subdirsAtOnce;if(a&&cancelAnimationFrame(a),F.length)if(i>0)for(e=0;e<i;e++)F.length&&(q++,D(F.splice(0,o)).always(function(){q--,R()}));else a=requestAnimationFrame(function(){F.length&&R()})},H=t.droppable.drop,_=e.extend(!0,{},t.droppable,{over:function(n,i){var a,o,r=e(this),s=i.helper,l=z+" "+C;return n.stopPropagation(),s.data("dropover",s.data("dropover")+1),r.data("dropover",!0),i.helper.data("namespace")===t.namespace&&t.insideWorkzone(n.pageX,n.pageY)?M(n.clientX)?(s.removeClass("elfinder-drag-helper-move elfinder-drag-helper-plus"),r.addClass(z),r.is("."+v+":not(."+b+")")&&r.data("expandTimer",setTimeout(function(){r.is("."+v+"."+z)&&r.children("."+x).trigger("click")},500)),r.is(".elfinder-ro,.elfinder-na")?void r.removeClass(C):(a=t.navId2Hash(r.attr("id")),r.data("dropover",a),e.each(i.helper.data("files"),function(e,n){if(n===a||t.file(n).phash===a&&!i.helper.hasClass("elfinder-drag-helper-plus"))return r.removeClass(l),!1}),s.data("locked")?o="elfinder-drag-helper-plus":(o="elfinder-drag-helper-move",t._commands.copy&&(n.shiftKey||n.ctrlKey||n.metaKey)&&(o+=" elfinder-drag-helper-plus")),r.hasClass(C)&&s.addClass(o),void requestAnimationFrame(function(){
19
+ r.hasClass(C)&&s.addClass(o)}))):void r.removeClass(l):(r.removeClass(l),void s.removeClass("elfinder-drag-helper-move elfinder-drag-helper-plus"))},out:function(t,n){var i=e(this),a=n.helper;t.stopPropagation(),M(t.clientX)&&a.removeClass("elfinder-drag-helper-move elfinder-drag-helper-plus"),a.data("dropover",Math.max(a.data("dropover")-1,0)),i.data("expandTimer")&&clearTimeout(i.data("expandTimer")),i.removeData("dropover").removeClass(z+" "+C)},deactivate:function(){e(this).removeData("dropover").removeClass(z+" "+C)},drop:function(e,t){M(e.clientX)&&H.call(this,e,t)}}),N=e(t.res("tpl","navspinner")),L=t.res("tpl","navdir"),W=t.res("tpl","perms"),B=(t.res("tpl","lock"),t.res("tpl","symlink")),$={},V={id:function(e){return t.navHash2Id(e.hash)},name:function(e){return t.escape(e.i18||e.name)},cssclass:function(e){var i=(e.phash&&!e.isroot?"":d)+" "+m+" "+t.perms2class(e);return e.dirs&&!e.link&&(i+=" "+v)&&e.dirs==-1&&(i+=" "+w),n.getClass&&(i+=" "+n.getClass(e)),e.csscls&&(i+=" "+t.escape(e.csscls)),i},title:function(e){return n.attrTitle?' title="'+t.escape(t.path(e.hash,!0)||e.i18||e.name)+'"':""},root:function(t){var n="";return!t.phash||t.isroot?(n+=" "+S,!t.disabled||t.disabled.length<1?n+=" "+O+" "+I:(e.inArray("paste",t.disabled)===-1&&(n+=" "+O),e.inArray("upload",t.disabled)===-1&&(n+=" "+I)),n):""},permissions:function(e){return e.read&&e.write?"":W},symlink:function(e){return e.alias?B:""},style:function(e){return e.icon?t.getIconStyle(e):""}},K=function(e){return L.replace(/(?:\{([a-z]+)\})/gi,function(t,n){var i=V[n]?V[n](e):e[n]||"";return"id"===n&&e.dirs==-1&&(E[i]=i),i})},X=function(n,i){return e.map(n||[],function(e){return"directory"!==e.mime||i&&!t.navHash2Elm(e.hash).length?null:e})},J=function(e){return e?t.navHash2Elm(e).next("."+f):oe},G=function(e,n){for(var i,a=e.children(":first");a.length;){if(i=t.file(t.navId2Hash(a.children("[id]").attr("id"))),(i=t.file(t.navId2Hash(a.children("[id]").attr("id"))))&&Q(n,i)<0)return a;a=a.next()}return e.children("button.elfinder-navbar-pager-next")},Y=function(i){for(var a,o,r,s,l,d,p,u=i.length,h=[],f=u,m=e(),g={},v=t.cwd(),b=function(i,a,o,r){var s={},l=0,d=t.newAPI?Math.min(1e4,Math.max(10,n.subTreeMax)):1e4,p=function(){s={},e.each(a,function(e,t){s[t.hash]=e})},u=function(t){"prepare"===t?e.each(a,function(e,t){t.node&&i.append(t.node.hide())}):"done"===t&&e.each(a,function(e,t){t.node&&t.node.detach().show()})},h=function(t,n){var i;return t.stopPropagation(),n.select?void g(f(n.select)):n.change?void u(n.change):(n.removed&&n.removed.length&&(a=e.grep(a,function(e){return n.removed.indexOf(e.hash)===-1||(!i&&(i=!0),!1)})),n.added&&n.added.length&&(a=a.concat(e.grep(n.added,function(e){return void 0===s[e.hash]&&(!i&&(i=!0),!0)}))),void(i&&(a.sort(Q),p(),g(l))))},f=function(e){if(void 0!==s[e])return Math.floor(s[e]/d)*d},m=t.navId2Hash(i.prev("[id]").attr("id")),g=function(n,o){var r,s,u,y,w,x,k,C,z=[],T={};delete $[m],l=n,i.off("update."+t.namespace,h),a.length>d&&(i.on("update."+t.namespace,h),void 0===n&&(u=0,p(),n=f(v.hash),void 0===n&&(n=0)),y=a.slice(n,n+d),$[m]=i,w=n?Math.max(-1,n-d):-1,x=n+d>=a.length?0:n+d,r=Math.ceil(a.length/d),s=Math.ceil(n/d)),e.each(y||a,function(e,t){z.push(K(t)),t.node&&(T[t.hash]=t.node)}),k=w>-1?e('<button class="elfinder-navbar-pager elfinder-navbar-pager-prev"></button>').text(t.i18n("btnPrevious",s,r)).button({icons:{primary:"ui-icon-caret-1-n"}}).on("click",function(e){e.preventDefault(),e.stopPropagation(),g(w,"up")}):e(),C=x?e('<button class="elfinder-navbar-pager elfinder-navbar-pager-next"></button>').text(t.i18n("btnNext",s+2,r)).button({icons:{primary:"ui-icon-caret-1-s"}}).on("click",function(e){e.preventDefault(),e.stopPropagation(),g(x,"down")}):e(),b(),i.empty()[y?"addClass":"removeClass"]("elfinder-navbar-hasmore").append(k,z.join(""),C),e.each(T,function(e,n){t.navHash2Elm(e).parent().replaceWith(n)}),o&&Z(t.navHash2Id(y["up"===o?y.length-1:0].hash)),!c&&t.lazy(function(){ie(null,i)})},b=function(){e.each(i.children(".elfinder-navbar-wrapper"),function(n,i){var o,r,l=e(i),c=l.children("[id]:first");c.hasClass(y)&&(o=t.navId2Hash(c.attr("id")),o&&void 0!==(r=s[o])&&(a[r].node=l.detach()))})};g()},w={},x=[],k={};f--;)a=i[f],g[a.hash]||t.navHash2Elm(a.hash).length||(g[a.hash]=!0,(o=J(a.phash)).length?(p=a.phash||"treeroot","undefined"==typeof k[p]&&(k[p]=o.children(":last")),s=!k[p].length,a.phash&&(s||o.hasClass("elfinder-navbar-hasmore")||(r=G(o,a)).length)?s?(w[a.phash]||(w[a.phash]=[]),w[a.phash].push(a)):r?(d=K(a),r.before(d),!c&&(m=m.add(d))):x.push(a):(d=K(a),s?o.prepend(d):k[p].after(d),a.phash&&!a.isroot||(l=t.navHash2Elm(a.hash).parent()),!c&&ie(null,l))):h.push(a));return Object.keys(w).length&&e.each(w,function(e,t){var n=J(e);t.sort(Q),b(n,t)}),x.length&&o.trigger("update."+t.namespace,{added:x}),h.length&&h.length<u?void Y(h):void(!c&&m.length&&t.lazy(function(){ie(m)}))},Q=function(e,n){if(t.sortAlsoTreeview){var i,a="asc"==t.sortOrder,o=t.sortType,r=t.sortRules;return i=a?r[t.sortType](e,n):r[t.sortType](n,e),"name"!==o&&0===i?i=a?r.name(e,n):r.name(n,e):i}return t.sortRules.name(e,n)},Z=function(i){var a,r,s,l,c,d,p=e.Deferred();return o&&clearTimeout(o),o=setTimeout(function(){a=e(document.getElementById(i||t.navHash2Id(t.cwd().hash))),a.length?((u?a:a.parent()).parents(".elfinder-navbar-wrapper").children("."+y).addClass(b).next("."+f).show(),r=oe.parent().stop(!1,!0),s=r.offset().top,l=r.height(),c=s+l-a.outerHeight(),d=a.offset().top,d<s||d>c?r.animate({scrollTop:r.scrollTop()+d-s-l/3},{duration:n.durations.autoScroll,complete:function(){p.resolve()}}):p.resolve()):p.reject()},100),p},ee=function(e){var n,i,a,o=e||t.cwd(),r=o.hash?[o.hash]:[];for(i=t.root(o.hash),a=t.file(i);a&&(n=a.phash)&&(r.unshift(n),i=t.root(n),a=t.file(i),!t.navHash2Elm(a.hash).hasClass(y)););return r},te=function(e){var n=e||t.cwd(),i=n.hash,a=t.navHash2Elm(i);if(!a.length){for(;n&&n.phash;)$[n.phash]&&!t.navHash2Elm(n.hash).length&&$[n.phash].trigger("update."+t.namespace,{select:n.hash}),n=t.file(n.phash);a=t.navHash2Elm(i)}return a},ne=function(n,i){var a,o,s=t.cwd(),l=s.hash,c=void 0===i?h:i,d=function(n){var i,r,s=e.Deferred(),l=[],d=ee(n),p=function(e,n,i){var a={cmd:e,target:n};return i&&(a.until=i),t.request({data:a,preventFail:!0})};return l=e.map(d,function(e){var n,a,o=t.file(e),r=!!o&&t.isRoot(o),s=t.navHash2Elm(e),l=function(e,n){var i,a,o=n||1;return a=!!(i=t.file(e))&&i.phash,a&&o>1?l(a,--o):a},c=function(){var i=l(e);for(n=i;i&&!t.navHash2Elm(i).hasClass(y);)n=i,i=l(i);return i||(n=void 0,i=t.root(e)),i}();return s.hasClass(y)||!r&&o&&t.navHash2Elm(o.phash).hasClass(y)?null:(r||c===l(e)||c===l(e,2)?(n=void 0,a="tree",r||(e=l(e))):a="parents",i||(i="tree"===a?e:c),p(a,e,n))}),l.length?(te(t.file(i)),r=t.navHash2Id(i),c&&Z(r),a=e("#"+r),o=e(t.res("tpl","navspinner")).insertBefore(a.children("."+x)),a.removeClass(v),e.when.apply(e,l).done(function(){var e,t,n,i={};if(t=arguments.length,t>0)for(n=0;n<t;n++)e=arguments[n].tree||[],i[d[n]]=Object.assign([],X(e));s.resolve(i)}).fail(function(){s.reject()}),s):s.resolve()},u=function(i,o){var r,l=function(){p&&a&&(J(a.hash).show().prev(g).addClass(b),p=!1),c?Z().done(P):P()};i&&e.each(i,function(e,n){n&&Y(n),te(t.file(e)),n&&ae(n,y)}),n&&(t.api<2.1&&n.push(s),Y(n)),r=te(),r.hasClass(k)||(oe.find(g+"."+k).removeClass(k),r.addClass(k)),r.parents(".elfinder-navbar-wrapper").children("."+m).addClass(y),i?t.lazy(l).done(function(){o.resolve()}):(l(),o.resolve())},f=function(e){a&&(o.remove(),a.addClass(v+(e?"":" "+y)))},w=e.Deferred();return t.navHash2Elm(l).length?u(void 0,w):(r=!0,d().done(function(e){u(e,w),f()}).fail(function(){f(!0),w.reject()}).always(function(){r=!1})),t.trigger("treesync",w),w},ie=function(n,i){n||(i&&!i.closest("div."+S).hasClass(I)||(i||oe.find("div."+I)).find(g+":not(.elfinder-ro,.elfinder-na)").addClass("native-droppable"),n=!i||i.closest("div."+S).hasClass(O)?(i||oe.find("div."+O)).find(g+":not(."+j+")"):e(),i&&i.children("div."+S).each(function(){ie(null,e(this))})),n.length&&t.asyncJob(function(t){e(t).droppable(_)},e.makeArray(n),{interval:20,numPerOnce:100})},ae=function(n,i){var a=i==y?"."+v+":not(."+y+")":":not(."+v+")";e.each(n,function(n,o){t.navHash2Elm(o.phash).filter(a).filter(function(){return e.grep(e(this).next("."+f).children(),function(t){return!e(t).children().hasClass(d)}).length>0}).addClass(i)})},oe=e(this).addClass(i).on("mouseenter mouseleave",g,function(i){var a="mouseenter"===i.type;if(!a||!re){var o,r,s=e(this);s.hasClass(C+" "+T)||(c||!a||s.data("dragRegisted")||s.hasClass(d+" "+A+" elfinder-na elfinder-wo")||(s.data("dragRegisted",!0),t.isCommandEnabled("copy",o=t.navId2Hash(s.attr("id")))&&s.draggable(t.draggable)),s.toggleClass(z,a)),a&&n.attrTitle&&(r=t.file(o||t.navId2Hash(s.attr("id"))),r.isroot||s.attr("title")!==(r.i18||r.name)||s.attr("title",t.path(o,!0)))}}).on("dragenter",g,function(t){if(t.originalEvent.dataTransfer){var n=e(this);n.addClass(z),n.is("."+v+":not(."+b+")")&&n.data("expandTimer",setTimeout(function(){n.is("."+v+"."+z)&&n.children("."+x).trigger("click")},500))}}).on("dragleave",g,function(t){if(t.originalEvent.dataTransfer){var n=e(this);n.data("expandTimer")&&clearTimeout(n.data("expandTimer")),n.removeClass(z)}}).on("click",g,function(n){var i=e(this),a=t.navId2Hash(i.attr("id"));t.file(a);return i.data("longtap")?(i.removeData("longtap"),void n.stopPropagation()):(i.hasClass(k)||(oe.find(g+"."+k).removeClass(k),i.addClass(k)),void(a==t.cwd().hash||i.hasClass(T)?(i.hasClass(v)&&i.children("."+x).trigger("click"),t.select({selected:[a],origin:"navbar"})):t.exec("open",a).done(function(){t.one("opendone",function(){t.select({selected:[a],origin:"navbar"})})})))}).on("touchstart",g,function(n){if(!(n.originalEvent.touches.length>1)){var i,a=n.originalEvent;return"INPUT"===n.target.nodeName?void n.stopPropagation():void(i=e(this).addClass(z).removeData("longtap").data("tmlongtap",setTimeout(function(e){i.data("longtap",!0),t.trigger("contextmenu",{type:"navbar",targets:[t.navId2Hash(i.attr("id"))],x:a.touches[0].pageX,y:a.touches[0].pageY})},500)))}}).on("touchmove touchend",g,function(t){return"INPUT"===t.target.nodeName?void t.stopPropagation():(clearTimeout(e(this).data("tmlongtap")),e(this).removeData("tmlongtap"),void("touchmove"==t.type&&e(this).removeClass(z)))}).on("click",g+"."+v+" ."+x,function(i){var a,o=e(this),r=o.parent(g),s=r.next("."+f),l=e.Deferred(),c=30;i.stopPropagation(),r.hasClass(y)?(r.toggleClass(b),t.lazy(function(){a=r.hasClass(b)?s.children().length+s.find("div.elfinder-navbar-subtree[style*=block]").children().length:s.find("div:visible").length,a>c?(s.toggle(),t.draggingUiHelper&&t.draggingUiHelper.data("refreshPositions",1),P()):s.stop(!0,!0)[r.hasClass(b)?"slideDown":"slideUp"](n.durations.slideUpDown,function(){t.draggingUiHelper&&t.draggingUiHelper.data("refreshPositions",1),P()})}).always(function(){l.resolve()})):(N.insertBefore(o),r.removeClass(v),t.request({cmd:"tree",target:t.navId2Hash(r.attr("id"))}).done(function(e){Y(Object.assign([],X(e.tree))),s.children().length&&(r.addClass(v+" "+b),s.children().length>c?(s.show(),t.draggingUiHelper&&t.draggingUiHelper.data("refreshPositions",1),P()):s.stop(!0,!0).slideDown(n.durations.slideUpDown,function(){t.draggingUiHelper&&t.draggingUiHelper.data("refreshPositions",1),P()}))}).always(function(e){N.remove(),r.addClass(y),t.one("treedone",function(){l.resolve()})})),o.data("dfrd",l)}).on("contextmenu",g,function(n){n.stopPropagation();var i=e(this);i.find("input:text").length||(n.preventDefault(),i.data("tmlongtap")||t.trigger("contextmenu",{type:"navbar",targets:[t.navId2Hash(e(this).attr("id"))],x:n.pageX,y:n.pageY}),i.addClass("ui-state-hover"),t.getUI("contextmenu").children().on("mouseenter",function(){i.addClass("ui-state-hover")}),t.bind("closecontextmenu",function(){i.removeClass("ui-state-hover")}))}).on("scrolltoview",g,function(n,i){var a=e(this);Z(a.attr("id")).done(function(){i&&"undefined"!==i.blink&&!i.blink||t.resources.blink(a,"lookme")})}).on("create."+t.namespace,function(n,i){var a=J(i.phash),o=i.move||!1,r=e(K(i)).addClass("elfinder-navbar-wrapper-tmp"),s=t.selected();o&&s.length&&t.trigger("lockfiles",{files:s}),a.prepend(r)}),re=!1,se=t.getUI("navbar").append(oe).show().on("scroll",function(){re=!0,s&&cancelAnimationFrame(s),s=requestAnimationFrame(function(){re=!1,P()})}),le=t.sortAlsoTreeview;t.open(function(e){var n=e.data,i=X(n.files),a=t.getUI("contextmenu");n.init&&oe.empty(),t.UA.iOS&&se.removeClass("overflow-scrolling-touch").addClass("overflow-scrolling-touch"),i.length?t.lazy(function(){a.data("cmdMaps")||a.data("cmdMaps",{}),Y(i),ae(i,y),ne(i)}):ne()}).add(function(e){var t=X(e.data.added);t.length&&(Y(t),ae(t,v))}).change(function(n){if(!r){var i,a,o,s,l,d,p,u,h,m,v,w,x=X(n.data.changed,!0),k=x.length,C=k;e();for(e.each($,function(e,n){n.trigger("update."+t.namespace,{change:"prepare"})});C--;)if(i=x[C],a=i.phash,(o=t.navHash2Elm(i.hash)).length){if(v=o.parent(),a){if(l=o.closest("."+f),d=J(a),p=o.parent().next(),u=G(d,i),!d.length)continue;d[0]===l[0]&&p.get(0)===u.get(0)||(u.length?u.before(v):d.append(v))}h=o.hasClass(b),m=o.hasClass(y),s=e(K(i)),o.replaceWith(s.children(g)),!c&&ie(null,v),i.dirs&&(h||m)&&(o=t.navHash2Elm(i.hash))&&o.next("."+f).children().length&&(h&&o.addClass(b),m&&o.addClass(y)),w|=i.dirs==-1}w&&P(),e.each($,function(e,n){n.trigger("update."+t.namespace,{change:"done"})}),k&&ne(void 0,!1)}}).remove(function(n){var i,a,o,r=n.data.removed,s=r.length;for(e.each($,function(e,n){n.trigger("update."+t.namespace,{removed:r}),n.trigger("update."+t.namespace,{change:"prepare"})});s--;)(i=t.navHash2Elm(r[s])).length&&(o=!0,a=i.closest("."+f),i.parent().detach(),a.children().length||a.hide().prev(g).removeClass(v+" "+b+" "+y));o&&t.getUI("navbar").children(".ui-resizable-handle").trigger("resize"),e.each($,function(e,n){n.trigger("update."+t.namespace,{change:"done"})})}).bind("lockfiles unlockfiles",function(n){var i="lockfiles"==n.type,a=!!n.data.helper&&n.data.helper.data("locked"),o=i&&!a?"disable":"enable",r=e.grep(n.data.files||[],function(e){var n=t.file(e);return!(!n||"directory"!=n.mime)});e.each(r,function(e,n){var r=t.navHash2Elm(n);r.length&&!a&&(r.hasClass(A)&&r.draggable(o),r.hasClass(j)&&r.droppable(o),r[i?"addClass":"removeClass"](T))})}).bind("sortchange",function(){if(t.sortAlsoTreeview||le!==t.sortAlsoTreeview){var n,i,a=[],o={},r={},s="",l=!1;t.lazy(function(){n=X(t.files()),le=t.sortAlsoTreeview,oe.empty(),Y(e.map(t.roots,function(e){var n=t.file(e);return n&&!n.phash?n:null})),Object.keys($).length?(a=ee(),a.length>1?(e.each(a,function(e,n){var i=t.file(t.root(n)).volumeid;0===e&&(s=i),r[i]=n,o[n]=[]}),e.each(n,function(e,t){return t.volumeid?void o[r[t.volumeid]||r[s]].push(t):(l=!0,!1)})):l=!0,l?e.each(a,function(e,a){Y(n),i=te(t.file(a)),ae(n,y)}):e.each(o,function(e,n){Y(n),i=te(t.file(e)),ae(n,y)})):(Y(n),i=te(),ae(n,y)),ne()},100)}})}),this},e.fn.elfinderuploadbutton=function(t){return this.each(function(){var n,i=t.fm,a=e(this).elfinderbutton(t).off("click"),o=e("<form></form>").appendTo(a),r=e('<input type="file" multiple="true" title="'+t.fm.i18n("selectForUpload")+'"/>').on("change",function(){var t=e(this);t.val()&&(i.exec("upload",{input:t.remove()[0]},void 0,i.cwd().hash),r.clone(!0).appendTo(o))}).on("dragover",function(e){e.originalEvent.dataTransfer.dropEffect="copy"});o.append(r.clone(!0)),t.change(function(){n&&cancelAnimationFrame(n),n=requestAnimationFrame(function(){var e=t.disabled();o.is("visible")?!e&&o.hide():e&&o.show()})}).change()})},e.fn.elfinderviewbutton=function(t){return this.each(function(){var n,i=e(this).elfinderbutton(t),a=i.children(".elfinder-button-icon"),o=i.children(".elfinder-button-text");t.change(function(){n&&cancelAnimationFrame(n),n=requestAnimationFrame(function(){var e="icons"==t.value;a.toggleClass("elfinder-button-icon-view-list",e),t.className=e?"view-list":"",t.title=t.fm.i18n(e?"viewlist":"viewicons"),i.attr("title",t.title),o.html(t.title)})})})},e.fn.elfinderworkzone=function(t){var n="elfinder-workzone";return this.not("."+n).each(function(){var i,a=e(this).addClass(n),o=Math.round(a.height()),r=a.parent(),s=function(){i=a.outerHeight(!0)-a.height()},l=function(s){var l=r.height()-i,c=r.attr("style"),d=Math.round(a.height());s&&(s.preventDefault(),s.stopPropagation()),r.css("overflow","hidden").children(":visible:not(."+n+")").each(function(){var t=e(this);"absolute"!=t.css("position")&&"fixed"!=t.css("position")&&(l-=t.outerHeight(!0))}),r.attr("style",c||""),l=Math.max(0,Math.round(l)),o===l&&d===l||(o=Math.round(a.height()),a.height(l),t.trigger("wzresize"))},c=function(){i=a.outerHeight(!0)-a.height(),l()};s(),r.on("resize."+t.namespace,l),t.one("cssloaded",c).bind("uiresize",l).bind("themechange",s)}),this},i.prototype.commands.archive=function(){var t,n=this,i=n.fm,a=[];this.variants=[],this.disableOnSearch=!1,this.nextAction={},i.bind("open reload",function(){n.variants=[],e.each(a=i.option("archivers").create||[],function(e,t){n.variants.push([t,i.mime2kind(t)])}),n.change()}),this.getstate=function(n){var o,r=this.files(n),s=r.length,l=s&&!i.isRoot(r[0])&&(i.file(r[0].phash)||{}).write,c=function(t){var n=!0;return e.grep(t,function(e){return n=!(!n||!e.read||0!==e.hash.indexOf(o))})};return l&&i.searchStatus.state>1&&(l=s===c(r).length)&&(o=i.cwd().volumeid),l&&!this._disabled&&a.length&&(s||t&&"pending"==t.state())?0:-1},this.exec=function(o,r){var s,l,c=this.files(o),d=c.length,p=r||a[0],u=i.file(c[0].phash)||null,h=["errArchive","errPerm","errCreatingTempDir","errFtpDownloadFile","errFtpUploadFile","errFtpMkdir","errArchiveExec","errExtractExec","errRm"];if(t=e.Deferred().fail(function(e){e&&i.error(e)}),!d||!a.length||e.inArray(p,a)===-1)return t.reject();if(!u.write)return t.reject(h);for(s=0;s<d;s++)if(!c[s].read)return t.reject(h);return n.mime=p,n.prefix=(d>1?"Archive":c[0].name)+(i.option("archivers").createext?"."+i.option("archivers").createext[p]:""),n.data={targets:n.hashes(o),type:p},i.cwd().hash!==u.hash?l=i.exec("open",u.hash).done(function(){i.one("cwdrender",function(){i.selectfiles({files:o}),t=e.proxy(i.res("mixin","make"),n)()})}):(i.selectfiles({files:o}),t=e.proxy(i.res("mixin","make"),n)()),t}},(i.prototype.commands.back=function(){this.alwaysEnabled=!0,this.updateOnSelect=!1,this.shortcuts=[{pattern:"ctrl+left backspace"}],this.getstate=function(){return this.fm.history.canBack()?0:-1},this.exec=function(){return this.fm.history.back()}}).prototype={forceLoad:!0},i.prototype.commands.chmod=function(){this.updateOnSelect=!1;var t=this.fm,n={0:"owner",1:"group",2:"other"},i={read:t.i18n("read"),write:t.i18n("write"),execute:t.i18n("execute"),perm:t.i18n("perm"),kind:t.i18n("kind"),files:t.i18n("files")},a=function(e){return!isNaN(parseInt(e,8))&&parseInt(e,8)<=511||e.match(/^([r-][w-][x-]){3}$/i)};this.tpl={main:'<div class="ui-helper-clearfix elfinder-info-title"><span class="elfinder-cwd-icon {class} ui-corner-all"></span>{title}</div>{dataTable}',itemTitle:'<strong>{name}</strong><span id="elfinder-info-kind">{kind}</span>',groupTitle:"<strong>{items}: {num}</strong>",dataTable:'<table id="{id}-table-perm"><tr><td>{0}</td><td>{1}</td><td>{2}</td></tr></table><div class="">'+i.perm+': <input class="elfinder-tabstop elfinder-focus" id="{id}-perm" type="text" size="4" maxlength="3" value="{value}"></div>',fieldset:'<fieldset id="{id}-fieldset-{level}"><legend>{f_title}{name}</legend><input type="checkbox" value="4" class="elfinder-tabstop" id="{id}-read-{level}-perm"{checked-r}> <label for="{id}-read-{level}-perm">'+i.read+'</label><br><input type="checkbox" value="6" class="elfinder-tabstop" id="{id}-write-{level}-perm"{checked-w}> <label for="{id}-write-{level}-perm">'+i.write+'</label><br><input type="checkbox" value="5" class="elfinder-tabstop" id="{id}-execute-{level}-perm"{checked-x}> <label for="{id}-execute-{level}-perm">'+i.execute+"</label><br>"},this.shortcuts=[{}],this.getstate=function(e){return 0},this.checkstate=function(t){var n=t.length,i=function(i){var o=!0;return e.grep(t,function(e){return o=!(!(o&&e.isowner&&e.perm&&a(e.perm))||1!=n&&"directory"==e.mime)})};return!(!n||n!==i(t).length)},this.exec=function(t){var o=this.hashes(t),r=this.files(o);r.length||(o=[this.fm.cwd().hash],r=this.files(o));var s,l,c=this.fm,d=e.Deferred().always(function(){c.enable()}),p=this.tpl,u=r.length,h=r[0],f=c.namespace+"-perm-"+h.hash,m=p.main,g=' checked="checked"',v=function(){var e={};return e[c.i18n("btnApply")]=b,e[c.i18n("btnCancel")]=function(){A.elfinderdialog("close")},e},b=function(){var t,n=e.trim(e("#"+f+"-perm").val());return!!a(n)&&(A.elfinderdialog("close"),t={cmd:"chmod",targets:o,mode:n},void c.request({data:t,notify:{type:"chmod",cnt:u}}).fail(function(e){d.reject(e)}).done(function(n){n.changed&&n.changed.length&&(n.undo={cmd:"chmod",callback:function(){var t=[];return e.each(j,function(e,n){t.push(c.request({data:{cmd:"chmod",targets:n,mode:e},notify:{type:"undo",cnt:n.length}}))}),e.when.apply(null,t)}},n.redo={cmd:"chmod",callback:function(){return c.request({data:t,notify:{type:"redo",cnt:o.length}})}}),d.resolve(n)}))},y=function(){for(var t,i="",a=0;a<3;a++)t=0,e("#"+f+"-read-"+n[a]+"-perm").is(":checked")&&(t=4|t),e("#"+f+"-write-"+n[a]+"-perm").is(":checked")&&(t=2|t),e("#"+f+"-execute-"+n[a]+"-perm").is(":checked")&&(t=1|t),i+=t.toString(8);e("#"+f+"-perm").val(i)},w=function(t){for(var i,a=0;a<3;a++)i=parseInt(t.slice(a,a+1),8),e("#"+f+"-read-"+n[a]+"-perm").prop("checked",!1),e("#"+f+"-write-"+n[a]+"-perm").prop("checked",!1),e("#"+f+"-execute-"+n[a]+"-perm").prop("checked",!1),4==(4&i)&&e("#"+f+"-read-"+n[a]+"-perm").prop("checked",!0),2==(2&i)&&e("#"+f+"-write-"+n[a]+"-perm").prop("checked",!0),1==(1&i)&&e("#"+f+"-execute-"+n[a]+"-perm").prop("checked",!0);y()},x=function(e){for(var t,n,i,a="777",o="",r=e.length,s=0;s<r;s++){t=z(e[s].perm),j[t]||(j[t]=[]),j[t].push(e[s].hash),o="";for(var l=0;l<3;l++)n=parseInt(t.slice(l,l+1),8),i=parseInt(a.slice(l,l+1),8),4!=(4&n)&&4==(4&i)&&(i-=4),2!=(2&n)&&2==(2&i)&&(i-=2),1!=(1&n)&&1==(1&i)&&(i-=1),o+=i.toString(8);a=o}return a},k=function(e){return e?":"+e:""},C=function(e,t){for(var a,o,r="",s=p.dataTable,l=0;l<3;l++)a=parseInt(e.slice(l,l+1),8),r+=a.toString(8),o=p.fieldset.replace("{f_title}",c.i18n(n[l])).replace("{name}",k(t[n[l]])).replace(/\{level\}/g,n[l]),s=s.replace("{"+l+"}",o).replace("{checked-r}",4==(4&a)?g:"").replace("{checked-w}",2==(2&a)?g:"").replace("{checked-x}",1==(1&a)?g:"");return s=s.replace("{value}",r).replace("{valueCaption}",i.perm)},z=function(e){if(isNaN(parseInt(e,8))){for(var t=e.split(""),n=[],i=0,a=t.length;i<a;i++)0===i||3===i||6===i?t[i].match(/[r]/i)?n.push(1):t[i].match(/[-]/)&&n.push(0):1===i||4===i||7===i?t[i].match(/[w]/i)?n.push(1):t[i].match(/[-]/)&&n.push(0):t[i].match(/[x]/i)?n.push(1):t[i].match(/[-]/)&&n.push(0);n.splice(3,0,","),n.splice(7,0,",");for(var o=n.join(""),r=o.split(","),s=[],l=0,c=r.length;l<c;l++){var d=parseInt(r[l],2).toString(8);s.push(d)}e=s.join("")}else e=parseInt(e,8).toString(8);return e},T={title:this.title,width:"auto",buttons:v(),close:function(){e(this).elfinderdialog("destroy")}},A=c.getUI().find("#"+f),j={},S="";return A.length?(A.elfinderdialog("toTop"),e.Deferred().resolve()):(m=m.replace("{class}",u>1?"elfinder-cwd-icon-group":c.mime2class(h.mime)),u>1?s=p.groupTitle.replace("{items}",c.i18n("items")).replace("{num}",u):(s=p.itemTitle.replace("{name}",h.name).replace("{kind}",c.mime2kind(h)),S=c.tmb(h)),l=C(x(r),1==r.length?r[0]:{}),m=m.replace("{title}",s).replace("{dataTable}",l).replace(/{id}/g,f),A=this.fmDialog(m,T),A.attr("id",f),S&&e("<img/>").on("load",function(){A.find(".elfinder-cwd-icon").addClass(S.className).css("background-image","url('"+S.url+"')")}).attr("src",S.url),e("#"+f+"-table-perm :checkbox").on("click",function(){y("perm")}),e("#"+f+"-perm").on("keydown",function(t){var n=t.keyCode;if(n==e.ui.keyCode.ENTER)return t.stopPropagation(),void b()}).on("focus",function(t){e(this).trigger("select")}).on("keyup",function(t){3==e(this).val().length&&(e(this).trigger("select"),w(e(this).val()))}),d)}},i.prototype.commands.colwidth=function(){this.alwaysEnabled=!0,this.updateOnSelect=!1,this.getstate=function(){return"fixed"===this.fm.getUI("cwd").find("table").css("table-layout")?0:-1},this.exec=function(){return this.fm.getUI("cwd").trigger("colwidth"),e.Deferred().resolve()}},i.prototype.commands.copy=function(){this.shortcuts=[{pattern:"ctrl+c ctrl+insert"}],this.getstate=function(t){var n=this.files(t),i=n.length,a=function(t){var n=!0;return e.grep(t,function(e){return n=!(!n||!e.read)})};return i&&a(n).length==i?0:-1},this.exec=function(t){var n=this.fm,i=e.Deferred().fail(function(e){n.error(e)});return e.each(this.files(t),function(e,t){if(!t.read)return!i.reject(["errCopy",t.name,"errPerm"])}),"rejected"==i.state()?i:i.resolve(n.clipboard(this.hashes(t)))}},i.prototype.commands.cut=function(){var t=this.fm;this.shortcuts=[{pattern:"ctrl+x shift+insert"}],this.getstate=function(n){var i=this.files(n),a=i.length,o=function(n){var i=!0;return e.grep(n,function(e){return i=!(!i||!e.read||e.locked||t.isRoot(e))})};return a&&o(i).length==a?0:-1},this.exec=function(n){var i=e.Deferred().fail(function(e){t.error(e)});return e.each(this.files(n),function(e,n){return!n.read||n.locked||t.isRoot(n)?!i.reject(["errCopy",n.name,"errPerm"]):n.locked?!i.reject(["errLocked",n.name]):void 0}),"rejected"==i.state()?i:i.resolve(t.clipboard(this.hashes(n),!0))}},i.prototype.commands.zipdl=function(){},i.prototype.commands.download=function(){var t=this,n=this.fm,i=null,a=!1,o=!1,r=!1,s=window.location.pathname||"/",l=function(r,s){var l,c;if(null!==i&&(n.searchStatus.state>1?o=n.searchStatus.mixed:n.leafRoots[n.cwd().hash]&&(l=n.cwd().volumeid,e.each(r,function(e,t){if(0!==t.indexOf(l))return o=!0,!1})),a=n.isCommandEnabled("zipdl",r[0])),o){if(c=i?"zipdl":"download",r=e.grep(r,function(e){var t=n.file(e),a=!(!t||!i&&"directory"===t.mime||!n.isCommandEnabled(c,e));return t&&s&&!a&&n.cwdHash2Elm(t.hash).trigger("unselect"),a}),!r.length)return[]}else if(!n.isCommandEnabled("download",r[0]))return[];return e.grep(t.files(r),function(e){var t=!(!e.read||!a&&"directory"==e.mime);return s&&!t&&n.cwdHash2Elm(e.hash).trigger("unselect"),t})};this.linkedCmds=["zipdl"],this.shortcuts=[{pattern:"shift+enter"}],this.getstate=function(e){var t=this.hashes(e),i=t.length,o=this.options.maxRequests||10;return i<1?-1:(i=l(t).length,i&&(a||i<=o&&(!n.UA.IE&&!n.UA.Mobile||1==i))?0:-1)},n.bind("contextmenu",function(n){var i,a,o=t.fm,r=null,s=function(t){var n=t.url||o.url(t.hash);return{icon:"link",node:e("<a></a>").attr({href:n,target:"_blank",title:o.i18n("link")}).text(t.name).on("mousedown click touchstart touchmove touchend contextmenu",function(e){e.stopPropagation()}).on("dragstart",function(n){var i=n.dataTransfer||n.originalEvent.dataTransfer||null;if(r=null,i){var a=function(t){var n,i=t.mime,a=o.tmb(t);return n='<div class="elfinder-cwd-icon '+o.mime2class(i)+' ui-corner-all"></div>',a&&(n=e(n).addClass(a.className).css("background-image","url('"+a.url+"')").get(0).outerHTML),n};i.effectAllowed="copyLink",i.setDragImage&&(r=e('<div class="elfinder-drag-helper html5-native">').append(a(t)).appendTo(e(document.body)),i.setDragImage(r.get(0),50,47)),o.UA.IE||(i.setData("elfinderfrom",window.location.href+t.phash),i.setData("elfinderfrom:"+i.getData("elfinderfrom"),""))}}).on("dragend",function(e){r&&r.remove()})}};if(t.extra=null,n.data&&(i=n.data.targets||[],1===i.length&&(a=o.file(i[0]))&&"directory"!==a.mime))if("1"!=a.url)t.extra=s(a);else{var l;t.extra={icon:"link",node:e("<a></a>").attr({href:"#",title:o.i18n("getLink"),draggable:"false"}).text(a.name).on("click touchstart",function(e){if(!("touchstart"===e.type&&e.originalEvent.touches.length>1)){var t=l.parent();e.stopPropagation(),e.preventDefault(),t.removeClass("ui-state-disabled").addClass("elfinder-button-icon-spinner"),o.request({data:{cmd:"url",target:a.hash},preventDefault:!0}).always(function(e){if(t.removeClass("elfinder-button-icon-spinner"),e.url){var n=o.file(a.hash);n.url=e.url,l.replaceWith(s(a).node)}else t.addClass("ui-state-disabled")})}})},l=t.extra.node,l.ready(function(){requestAnimationFrame(function(){l.parent().addClass("ui-state-disabled").css("pointer-events","auto")})})}}).one("open",function(){n.api>=2.1012&&(i=n.getCommand("zipdl")),r=n.cookieEnabled&&n.api>2.1038&&!n.isCORS}),this.exec=function(n){var i,c,d,p,u,h,f,m,g,v=this.hashes(n),b=this.fm,y=(b.options.url,l(v,!0)),w=e.Deferred(),x="",k={},C=!1,z=function(n){return function(){var i,a,o,r=e.Deferred(),s=b.file(b.root(n[0])),l=1===n.length,d=s?s.i18||s.name:null;return l?(i=b.file(n[0]))&&(a=i.i18||i.name):(e.each(n,function(){var e=b.file(this);return!e||o&&o!==e.phash?(o=null,!1):void(o=e.phash)}),o&&(i=b.file(o))&&(a=(i.i18||i.name)+"-"+n.length)),a&&(d=a),d&&(d=" ("+d+")"),b.request({data:{cmd:"zipdl",targets:n},notify:{type:"zipdl",cnt:1,hideCnt:!0,msg:b.i18n("ntfzipdl")+d},cancel:!0,eachCancel:!0,preventDefault:!0}).done(function(i){var o,s,l,d,u,h,f={},m="dlw"+ +new Date,g=function(n){l=e("<a></a>").attr("href",n).attr("download",b.escape(a)).on("click",function(){r.resolve(),s&&s.elfinderdialog("destroy")}),C?(l.attr("target","_blank").append('<span class="elfinder-button-icon elfinder-button-icon-download"></span>'+b.escape(a)),f[b.i18n("btnCancel")]=function(){s.elfinderdialog("destroy")},s=t.fmDialog(l,{title:b.i18n("link"),buttons:f,width:"200px",destroyOnClose:!0,close:function(){"resolved"!==r.state()&&r.resolve()}})):(T(l.hide().appendTo("body").get(0)),l.remove())};i.error?(b.error(i.error),r.resolve()):i.zipdl&&(o=i.zipdl,a?(h=b.splitFileExtention(o.name||""),a+=h[1]?"."+h[1]:".zip"):a=o.name,p||C?(c=b.options.url+(b.options.url.indexOf("?")===-1?"?":"&")+"cmd=zipdl&download=1",e.each([n[0],o.file,a,o.mime],function(e,t){c+="&targets%5B%5D="+encodeURIComponent(t)}),e.each(b.customData,function(e,t){c+="&"+encodeURIComponent(e)+"="+encodeURIComponent(t)}),c+="&"+encodeURIComponent(a),b.hasParrotHeaders()?b.getBinaryByUrl({url:c},function(e){e instanceof Blob?(c=(window.URL||window.webkitURL).createObjectURL(e),g(c)):b.error(["errUploadTransfer",b.i18n("kindZIP")])}):g(c)):(d=e('<form action="'+b.options.url+'" method="post" target="'+m+'" style="display:none"></form>').append('<input type="hidden" name="cmd" value="zipdl"/>').append('<input type="hidden" name="download" value="1"/>'),e.each([n[0],o.file,a,o.mime],function(e,t){d.append('<input type="hidden" name="targets[]" value="'+b.escape(t)+'"/>')}),e.each(b.customData,function(e,t){d.append('<input type="hidden" name="'+e+'" value="'+b.escape(t)+'"/>')}),d.attr("target",m).appendTo("body"),u=e('<iframe style="display:none" name="'+m+'">').appendTo("body").ready(function(){d.submit().remove(),r.resolve(),setTimeout(function(){u.remove()},2e4)})))}).fail(function(e){e&&b.error(e),r.resolve()}),r.promise()}},T=function(e){var t;"function"==typeof MouseEvent?t=new MouseEvent("click"):(t=document.createEvent("MouseEvents"),t.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null)),b.pauseUnloadCheck(!0),e.dispatchEvent(t)},A=function(e){var t,n="elfdl"+e;t=document.cookie.split(n+"="),2===t.length?(h&&clearTimeout(h),document.cookie=n+"=; path="+s+"; max-age=0",j()):setTimeout(function(){A(e)},200)},j=function(){b.ui.notify.children(".elfinder-notify-download").length&&b.notify({type:"download",cnt:-1})},S=[];if(!y.length)return w.reject();if(u=e.grep(y,function(e){return"directory"!==e.mime}).length,d=e("<a>").hide().appendTo("body"),p="string"==typeof d.get(0).download,a&&(u!==y.length||u>=(this.options.minFilesZipdl||1)))return d.remove(),C=!p&&b.UA.Mobile,o?(k={},e.each(y,function(e,t){var n=t.hash.split("_",2);k[n[0]]?k[n[0]].push(t.hash):k[n[0]]=[t.hash]}),!C&&b.UA.Mobile&&Object.keys(k).length>1&&(C=!0)):k=[e.map(y,function(e){return e.hash})],w=b.sequence(e.map(k,function(e){return z(e)})).always(function(){b.trigger("download",{
20
+ files:y})});for(S=[],m=e.Deferred().done(function(t){for(i=0;i<t.length;i++)c=t[i],r&&c.substr(0,b.options.url.length)===b.options.url&&(f=b.getRequestId(),S.push(f),c+="&cpath="+s+"&reqid="+f,h=setTimeout(function(){b.notify({type:"download",cnt:1,cancel:b.UA.IE||b.UA.Edge?void 0:function(){S.length&&e.each(S,function(){b.request({data:{cmd:"abort",id:this},preventDefault:!0})}),S=[]}})},b.notifyDelay),A(f)),p?T(d.attr("href",c).attr("download",b.escape(y[i].name)).get(0)):b.UA.Mobile?setTimeout(function(){window.open(c)||(b.error("errPopup"),h&&cleaerTimeout(h),j())},100):x+='<iframe class="downloader" id="downloader-'+y[i].hash+'" style="display:none" src="'+c+'"></iframe>';d.remove(),e(x).appendTo("body").ready(function(){setTimeout(function(){e(x).each(function(){e("#"+e(this).attr("id")).remove()})},2e4+1e4*i)}),b.trigger("download",{files:y}),w.resolve()}),u=y.length,g=[],i=0;i<y.length;i++)b.openUrl(y[i].hash,!0,function(e){e&&g.push(e),--u<1&&m.resolve(g)});return w}},i.prototype.commands.duplicate=function(){var t=this.fm;this.getstate=function(n){var i=this.files(n),a=i.length,o=function(n){var i=!0;return e.grep(n,function(e){return i=!(!i||!e.read||e.phash!==t.cwd().hash||t.isRoot(e))})};return a&&t.cwd().write&&o(i).length==a?0:-1},this.exec=function(t){var n=this.fm,i=this.files(t),a=i.length,o=e.Deferred().fail(function(e){e&&n.error(e)});return a?(e.each(i,function(e,t){if(!t.read||!n.file(t.phash).write)return!o.reject(["errCopy",t.name,"errPerm"])}),"rejected"==o.state()?o:n.request({data:{cmd:"duplicate",targets:this.hashes(t)},notify:{type:"copy",cnt:a},navigate:{toast:{inbuffer:{msg:n.i18n(["complete",n.i18n("cmdduplicate")])}}}})):o.reject()}},i.prototype.commands.edit=function(){var t,n=this,i=this.fm,a=i.res("class","editing"),o=[],r=[],s=!1,l=function(e){return e.replace(/\s+$/,"")},c=function(t){var a,o=e('<select class="ui-corner-all"></select>');return t&&e.each(t,function(e,t){a=i.escape(t.value),o.append('<option value="'+a+'">'+(t.caption?i.escape(t.caption):a)+"</option>")}),e.each(n.options.encodings,function(e,t){o.append('<option value="'+t+'">'+t+"</option>")}),o},d=function(){var t,a,o=i.options.dialogContained?i.getUI():e(window);return a="string"==typeof n.options.dialogWidth&&(t=n.options.dialogWidth.match(/(\d+)%/))?parseInt(o.width()*(t[1]/100)):parseInt(n.options.dialogWidth||650),Math.min(a,o.width())},p=function(){if(n.options.dialogHeight){var t,a,o=i.options.dialogContained?i.getUI():e(window);return a="string"==typeof n.options.dialogHeight&&(t=n.options.dialogHeight.match(/(\d+)%/))?parseInt(o.height()*(t[1]/100)):parseInt(n.options.dialogHeight||o.height()),Math.min(a,o.height())}},u=function(t){var a,l,c,d=t.length;return d>1&&(a=t[0].mime,l=t[0].name.replace(/^.*(\.[^.]+)$/,"$1")),e.grep(t,function(t){var p;return!c&&"directory"!==t.mime&&(p=t.read&&(s||i.mimeIsText(t.mime)||e.inArray(t.mime,1===d?o:r)!==-1)&&(!n.onlyMimes.length||e.inArray(t.mime,n.onlyMimes)!==-1)&&(1===d||t.mime===a&&t.name.substr(l.length*-1)===l)&&!!i.uploadMimeCheck(t.mime,t.phash)&&b(t,d)&&Object.keys(g).length,p||(c=!0),p)})},h=function(e){var t,n=i.file(e);i.request({cmd:"info",targets:[e],preventDefault:!0}).done(function(e){var a;e&&e.files&&e.files.length&&(t=e.files[0],n.ts==t.ts&&n.size==t.size||(a={changed:[t]},i.updateCache(a),i.change(a)))})},f=function(t,o,r,s,u,f){var g,v,b,y,w,k,C=e.Deferred(),z=!1,T=function(){return!!z||(i.toast({mode:"warning",msg:i.i18n("nowLoading")}),!1)},A=function(){f&&Array.isArray(f)&&e.each(f,function(){this.msg&&i.toast(this)})},j=function(){var t,n,a,o=y?y.val():void 0,r=e.Deferred().fail(function(e){b.show().find("button.elfinder-btncnt-0,button.elfinder-btncnt-1").hide()});return T()?(g.editor&&(g.editor.save(g[0],g.editor.instance),t=g.editor.confObj,t.info&&(t.info.schemeContent||t.info.arrayBufferContent)&&(o="scheme")),n=D(),U(n),n.promise?(a=setTimeout(function(){i.notify({type:"chkcontent",cnt:1,hideCnt:!0,cancel:function(){n.reject()}})},100),n.always(function(){a&&clearTimeout(a),i.notify({type:"chkcontent",cnt:-1})}).done(function(e){C.notifyWith(g,[o,g.data("hash"),v,r])}).fail(function(e){r.reject(e)})):C.notifyWith(g,[o,g.data("hash"),v,r]),r):r.resolve()},S=function(){T()&&j().fail(function(e){e&&i.error(e)})},O=function(){g.elfinderdialog("close")},I=function(){T()&&(b.hide(),j().done(function(){z=!1,b.show(),O()}).fail(function(e){b.show(),e&&i.error(e)}))},M=function(){if(T()){var t=v,r=o.phash,s=function(e){p.addClass(a).fadeIn(function(){e&&i.error(e)}),v=t,i.disable()},l=function(){n.mime=R.mime||o.mime,n.prefix=(R.name||o.name).replace(/ \d+(\.[^.]+)?$/,"$1"),n.requestCmd="mkfile",n.nextAction={},n.data={target:r},e.proxy(i.res("mixin","make"),n)().done(function(e){var t;e.added&&e.added.length?(t=g.data("hash"),g.data("hash",e.added[0].hash),j().done(function(){z=!1,b.show(),O(),p.fadeIn()}).fail(function(){i.exec("rm",[e.added[0].hash],{forceRm:!0,quiet:!0}),g.data("hash",t),b.find("button.elfinder-btncnt-2").hide(),s()})):s()}).progress(function(e){e&&"errUploadMime"===e&&g.trigger("saveAsFail")}).fail(s).always(function(){delete n.mime,delete n.prefix,delete n.nextAction,delete n.data}),i.trigger("unselectfiles",{files:[o.hash]})},c=null,d=null,p=i.getUI().children("."+n.dialogClass+":visible");b.is(":hidden")&&(p=p.add(b)),p.removeClass(a).fadeOut(),i.enable(),i.searchStatus.state<2&&r!==i.cwd().hash?c=i.exec("open",[r],{thash:r}):i.file(r)||(d=i.request({cmd:"info",targets:[r]})),e.when([c,d]).done(function(){d?i.one("infodone",function(){i.file(r)?l():s("errFolderNotFound")}):c?i.one("cwdrender",l):l()}).fail(s)}},E=function(){var t,n,a=e.Deferred();return z?(g.editor&&g.editor.save(g[0],g.editor.instance),t=D(),t&&t.promise?(n=setTimeout(function(){i.notify({type:"chkcontent",cnt:1,hideCnt:!0,cancel:function(){t.reject()}})},100),t.always(function(){n&&clearTimeout(n),i.notify({type:"chkcontent",cnt:-1})}).done(function(e){a.resolve(v!==e)}).fail(function(e){a.resolve(e||void 0!==v)})):a.resolve(v!==t),a):a.resolve(!1)},F={title:i.escape(o.name),width:d(),height:p(),buttons:{},cssClass:a,maxWidth:"window",maxHeight:"window",allowMinimize:!0,allowMaximize:!0,openMaximized:x()||u&&u.info&&u.info.openMaximized,btnHoverFocus:!1,closeOnEscape:!1,propagationEvents:["mousemove","mouseup","click"],minimize:function(){var e;g.editor&&b.closest(".ui-dialog").is(":hidden")&&(e=g.editor.confObj,e.info&&e.info.syncInterval&&h(o.hash))},close:function(){var e=function(){var e;C.resolve(),g.editor&&(g.editor.close(g[0],g.editor.instance),e=g.editor.confObj,e.info&&e.info.syncInterval&&h(o.hash)),g.elfinderdialog("destroy")},t="undefined"!=typeof R.name,a=t?{label:"btnSaveAs",callback:function(){requestAnimationFrame(M)}}:{label:"btnSaveClose",callback:function(){j().done(function(){e()})}};E().done(function(o){var r=["confirmNotSave"];o?("string"==typeof o&&r.unshift(o),i.confirm({title:n.title,text:r,accept:a,cancel:{label:"btnClose",callback:e},buttons:t?null:[{label:"btnSaveAs",callback:function(){requestAnimationFrame(M)}}]})):e()})},open:function(){var e,n,a;if(g.initEditArea.call(g,t,o,r,i),g.editor){if(e=g.editor.load(g[0])||null,e&&e.done)e.always(function(){z=!0}).done(function(e){g.editor.instance=e,g.editor.focus(g[0],g.editor.instance),U(D()),requestAnimationFrame(function(){b.trigger("resize")})}).fail(function(e){e&&i.error(e),g.elfinderdialog("destroy")}).always(A);else{if(z=!0,e&&("string"==typeof e||Array.isArray(e)))return i.error(e),void g.elfinderdialog("destroy");g.editor.instance=e,g.editor.focus(g[0],g.editor.instance),U(D()),requestAnimationFrame(function(){b.trigger("resize")}),A()}n=g.editor.confObj,n.info&&n.info.syncInterval&&(a=parseInt(n.info.syncInterval))&&setTimeout(function(){P(a)},a)}else z=!0,U(D())},resize:function(e,t){g.editor&&g.editor.resize(g[0],g.editor.instance,e,t||{})}},D=function(){var t=g.getContent.call(g,g[0]);return void 0!==t&&t!==!1&&null!==t||(t=e.Deferred().reject()),t},U=function(e){e&&e.promise?e.done(function(e){v=e}):v=e},P=function(e){b.is(":visible")&&(h(o.hash),setTimeout(function(){P(e)},e))},q=function(){y&&E().done(function(e){e?y.attr("title",i.i18n("saveAsEncoding")).addClass("elfinder-edit-changed"):y.attr("title",i.i18n("openAsEncoding")).removeClass("elfinder-edit-changed")})},R={};if(u&&(u.html&&(g=e(u.html)),w={init:u.init||null,load:u.load,getContent:u.getContent||null,save:u.save,beforeclose:"function"==typeof u.beforeclose?u.beforeclose:void 0,close:"function"==typeof u.close?u.close:function(){},focus:"function"==typeof u.focus?u.focus:function(){},resize:"function"==typeof u.resize?u.resize:function(){},instance:null,doSave:S,doCancel:O,doClose:I,file:o,fm:i,confObj:u,trigger:function(e,t){i.trigger("editEditor"+e,Object.assign({},u.info||{},t))}}),!g){if(!i.mimeIsText(o.mime))return C.reject("errEditorNotFound");!function(){g=e('<textarea class="elfinder-file-edit" rows="20" id="'+t+'-ta"></textarea>').on("input propertychange",q),u&&u.info&&!u.info.useTextAreaEvent||g.on("keydown",function(t){var n,i,a=t.keyCode;t.stopPropagation(),a==e.ui.keyCode.TAB&&(t.preventDefault(),this.setSelectionRange&&(n=this.value,i=this.selectionStart,this.value=n.substr(0,i)+"\t"+n.substr(this.selectionEnd),i+=1,this.setSelectionRange(i,i))),(t.ctrlKey||t.metaKey)&&(a!="Q".charCodeAt(0)&&a!="W".charCodeAt(0)||(t.preventDefault(),O()),a=="S".charCodeAt(0)&&(t.preventDefault(),S()))}).on("mouseenter",function(){this.focus()}),g.initEditArea=function(e,t,n){g.hide().val(n),this._setupSelEncoding(n)}}()}return g._setupSelEncoding=function(t){var n=s&&"unknown"!==s?[{value:s}]:[],a=e("<select></select>").hide(),r=function(t){t&&a.appendTo(y.parent()),a.empty().append(e("<option></option>").text(y.val())),y.width(a.width())};""!==t&&s&&"UTF-8"===s||n.push({value:"UTF-8"}),y=c(n).on("touchstart",function(e){e.stopPropagation()}).on("change",function(){E().done(function(e){e||""===D()||(O(),m(o,y.val(),u).fail(function(e){e&&i.error(e)}))}),r()}).on("mouseover",q),g.parent().next().prepend(e('<div class="ui-dialog-buttonset elfinder-edit-extras"></div>').append(y)),r(!0)},g.data("hash",o.hash),w&&(g.editor=w,"function"==typeof w.beforeclose&&(F.beforeclose=function(){return w.beforeclose(g[0],w.instance)}),"function"==typeof w.init&&(g.initEditArea=w.init),"function"==typeof w.getContent&&(g.getContent=w.getContent)),g.initEditArea||(g.initEditArea=function(){}),g.getContent||(g.getContent=function(){return l(g.val())}),u&&u.info&&u.info.preventGet||(F.buttons[i.i18n("btnSave")]=S,F.buttons[i.i18n("btnSaveClose")]=I,F.buttons[i.i18n("btnSaveAs")]=M,F.buttons[i.i18n("btnCancel")]=O),u&&"function"==typeof u.prepare&&u.prepare(g,F,o),b=n.fmDialog(g,F).attr("id",t).on("keydown keyup keypress",function(e){e.stopPropagation()}).css({overflow:"hidden",minHeight:"7em"}).addClass("elfinder-edit-editor").closest(".ui-dialog").on("changeType",function(t,n){if(n.extention&&n.mime){var a=(n.extention,n.mime,e(this).children(".ui-dialog-buttonpane").children(".ui-dialog-buttonset"));a.children(".elfinder-btncnt-0,.elfinder-btncnt-1").hide(),R.name=i.splitFileExtention(o.name)[0]+"."+n.extention,R.mime=n.mime,n.keepEditor||a.children(".elfinder-btncnt-2").trigger("click")}}),k=(i.options.dialogContained?i.getUI():e(window)).width(),b.width()>k&&b.width(k),C.promise()},m=function(t,a,o){var r,s,l,d=t.hash,p=(i.options,e.Deferred()),u="edit-"+i.namespace+"-"+t.hash,h=i.getUI().find("#"+u),g=a?a:0,v=!1;if(h.length)return h.elfinderdialog("toTop"),p.resolve();if(!(t.read&&(t.write||o.info&&o.info.converter)))return s=["errOpen",t.name,"errPerm"],p.reject(s);if(o&&o.info){if("function"==typeof o.info.edit)return l=o.info.edit.call(i,t,o),l.promise?l.done(function(){p.resolve()}).fail(function(e){p.reject(e)}):l?p.resolve():p.reject(),p;v=o.info.preventGet||o.info.noContent,o.info.urlAsContent||v?(r=e.Deferred(),o.info.urlAsContent?i.url(d,{async:!0,onetime:!0,temporary:!0}).done(function(e){r.resolve({content:e})}):r.resolve({})):(g&&(t.encoding=g,i.cache(t,"change")),r=i.request({data:{cmd:"get",target:d,conv:g,_t:t.ts},options:{type:"get",cache:!0},notify:{type:"file",cnt:1},preventDefault:!0})),r.done(function(a){var r,s,l;a.doconv?i.confirm({title:n.title,text:"unknown"===a.doconv?"confirmNonUTF8":"confirmConvUTF8",accept:{label:"btnConv",callback:function(){p=m(t,r.val(),o)}},cancel:{label:"btnCancel",callback:function(){p.reject()}},optionsCallback:function(t){t.create=function(){var t=e('<div class="elfinder-dialog-confirm-encoding"></div>'),n={value:a.doconv};"unknown"===a.doconv&&(n.caption="-"),r=c([n]),e(this).next().find(".ui-dialog-buttonset").prepend(t.append(e("<label>"+i.i18n("encoding")+" </label>").append(r)))}}}):(!v&&i.mimeIsText(t.mime)&&(s=new RegExp("^(data:"+t.mime.replace(/([.+])/g,"\\$1")+";base64,)","i"),o.info.dataScheme?window.btoa&&!a.content.match(s)&&(a.content="data:"+t.mime+";base64,"+btoa(a.content)):window.atob&&(l=a.content.match(s))&&(a.content=atob(a.content.substr(l[1].length)))),f(u,t,a.content,a.encoding,o,a.toasts).done(function(e){p.resolve(e)}).progress(function(e,t,n,a){var o=this;t&&(d=t),i.request({options:{type:"post"},data:{cmd:"put",target:d,encoding:e||n.encoding,content:n},notify:{type:"save",cnt:1},syncOnFail:!0,preventFail:!0,navigate:{target:"changed",toast:{inbuffer:{msg:i.i18n(["complete",i.i18n("btnSave")])}}}}).fail(function(e){p.reject(e),a.reject()}).done(function(e){requestAnimationFrame(function(){o.trigger("focus"),o.editor&&o.editor.focus(o[0],o.editor.instance)}),a.resolve()})}).fail(function(e){p.reject(e)}))}).fail(function(e){var n=i.parseError(e);n=Array.isArray(n)?n[0]:n,t.encoding&&(t.encoding="",i.cache(t,"change")),"errConvUTF8"!==n&&i.sync(),p.reject(e)})}return p.promise()},g={},v={info:{id:"textarea",name:"TextArea",useTextAreaEvent:!0},load:function(t){this.trigger("Prepare",{node:t,editorObj:void 0,instance:void 0,opts:{}}),t.setSelectionRange&&t.setSelectionRange(0,0),e(t).trigger("focus").show()},save:function(){}},b=function(a,o){var r=function(t,n){if(n){if("*"===n[0]||e.inArray(t,n)!==-1)return!0;var a,o;for(o=n.length,a=0;a<o;a++)if(0===t.indexOf(n[a]))return!0;return!1}return i.mimeIsText(t)},s=function(e,t){if(!t||!t.length)return!0;var n,i,a=e.replace(/^.+\.([^.]+)|(.+)$/,"$1$2").toLowerCase();for(i=t.length,n=0;n<i;n++)if(a===t[n].toLowerCase())return!0;return!1},l=n.options.editors||[],c=i.cwd().write;return t=i.storage("storedEditors")||{},g={},l.length||(l=[v]),e.each(l,function(e,t){var n;(1===o||!t.info.single)&&(t.info&&t.info.converter?c:a.write)&&(a.size>0||!t.info.converter&&t.info.canMakeEmpty!==!1&&i.mimesCanMakeEmpty[a.mime])&&(!t.info.maxSize||a.size<=t.info.maxSize)&&r(a.mime,t.mimes||null)&&s(a.name,t.exts||null)&&"function"==typeof t.load&&"function"==typeof t.save&&(n=t.info.name?t.info.name:"Editor "+e,t.id=t.info.id?t.info.id:"editor"+e,t.name=n,t.i18n=i.i18n(n),g[t.id]=t)}),!!Object.keys(g).length},y=function(n,a){n&&a&&(e.isPlainObject(t)||(t={}),t[n]=a.id,i.storage("storedEditors",t),i.trigger("selectfiles",{files:i.selected()}))},w=function(){var e=i.storage("useStoredEditor");return e?e>0:n.options.useStoredEditor},x=function(){var e=i.storage("editorMaximized");return e?e>0:n.options.editorMaximized},k=function(t,n){var a=[];return e.each(g,function(e,o){a.push({label:i.escape(o.i18n),icon:o.info&&o.info.icon?o.info.icon:"edit",options:{iconImg:o.info&&o.info.iconImg?i.baseUrl+o.info.iconImg:void 0},callback:function(){y(t[0].mime,o),n&&n.call(o)}})}),a},C=function(e){return e.toLowerCase().replace(/ +/g,"")},z=function(e){var n=t[e];return n&&Object.keys(g).length?g[C(n)]:void 0};this.getEncSelect=c,this.shortcuts=[{pattern:"ctrl+e"}],this.init=function(){var t,n,i=this,a=this.fm,l=this.options,c=[];this.onlyMimes=this.options.mimes||[],a.one("open",function(){l.editors&&Array.isArray(l.editors)&&(a.trigger("canMakeEmptyFile",{mimes:Object.keys(a.storage("mkfileTextMimes")||{}).concat(l.makeTextMimes||["text/plain"])}),e.each(l.editors,function(e,t){t.info&&t.info.cmdCheck&&c.push(t.info.cmdCheck)}),c.length?a.api>=2.103?n=a.request({data:{cmd:"editor",name:c,method:"enabled"},preventDefault:!0}).done(function(e){t=e}).fail(function(){t={}}):(t={},n=e.Deferred().resolve()):n=e.Deferred().resolve(),n.always(function(){t&&(l.editors=e.grep(l.editors,function(e){return!e.info||!e.info.cmdCheck||!!t[e.info.cmdCheck]})),e.each(l.editors,function(e,t){t.setup&&"function"==typeof t.setup&&t.setup.call(t,l,a),t.disabled||(t.mimes&&Array.isArray(t.mimes)&&(o=o.concat(t.mimes),t.info&&t.info.single||(r=r.concat(t.mimes))),!s&&t.mimes&&"*"===t.mimes[0]&&(s=!0),t.info||(t.info={}),t.info.integrate&&a.trigger("helpIntegration",Object.assign({cmd:"edit"},t.info.integrate)),t.info.canMakeEmpty&&a.trigger("canMakeEmptyFile",{mimes:Array.isArray(t.info.canMakeEmpty)?t.info.canMakeEmpty:t.mimes}))}),o=(e.uniqueSort||e.unique)(o),r=(e.uniqueSort||e.unique)(r),l.editors=e.grep(l.editors,function(e){return!e.disabled})}))}).bind("select",function(){g=null}).bind("contextmenucreate",function(t){var n,o,r=function(e){var t=i.title;a.one("contextmenucreatedone",function(){i.title=t}),i.title=a.escape(e.i18n),e.info&&e.info.iconImg&&(i.contextmenuOpts={iconImg:a.baseUrl+e.info.iconImg}),delete i.variants};i.contextmenuOpts=void 0,"files"===t.data.type&&i.enabled()&&(n=a.file(t.data.targets[0]),b(n,t.data.targets.length)&&(Object.keys(g).length>1?w()&&(o=z(n.mime))?(r(o),i.extra={icon:"menu",node:e("<span></span>").attr({title:a.i18n("select")}).on("click touchstart",function(t){if(!("touchstart"===t.type&&t.originalEvent.touches.length>1)){var n=e(this);t.stopPropagation(),t.preventDefault(),a.trigger("contextmenu",{raw:k(a.selectedFiles(),function(){var e=a.selected();a.exec("edit",e,{editor:this}),a.trigger("selectfiles",{files:e})}),x:n.offset().left,y:n.offset().top})}})}):(delete i.extra,i.variants=[],e.each(g,function(e,t){i.variants.push([{editor:t},t.i18n,t.info&&t.info.iconImg?a.baseUrl+t.info.iconImg:"edit"])})):(r(g[Object.keys(g)[0]]),delete i.extra)))}).bind("canMakeEmptyFile",function(t){if(t.data&&t.data.resetTexts){var n=a.arrayFlip(i.options.makeTextMimes||["text/plain"]),o=i.getMkfileHides();e.each(a.storage("mkfileTextMimes")||{},function(e,t){n[e]||(delete a.mimesCanMakeEmpty[e],delete o[e])}),a.storage("mkfileTextMimes",null),Object.keys(o).length?a.storage("mkfileHides",o):a.storage("mkfileHides",null)}})},this.getstate=function(e){var t=this.files(e),n=t.length;return n&&u(t).length==n?0:-1},this.exec=function(t,n){var i,a=this.fm,o=u(this.files(t)),r=e.map(o,function(e){return e.hash}),s=[],l=n&&n.editor?n.editor:null,c=e(n&&n._currentNode?n._currentNode:a.cwdHash2Elm(r[0])),d=function(){var t=e.Deferred();return!l&&Object.keys(g).length>1?w()&&(l=z(o[0].mime))?t.resolve(l):(a.trigger("contextmenu",{raw:k(o,function(){t.resolve(this)}),x:c.offset().left,y:c.offset().top+22,opened:function(){a.one("closecontextmenu",function(){requestAnimationFrame(function(){"pending"===t.state()&&t.reject()})})}}),a.trigger("selectfiles",{files:r}),t):(Object.keys(g).length>1&&l&&y(o[0].mime,l),t.resolve(l?l:Object.keys(g).length?g[Object.keys(g)[0]]:null))},p=e.Deferred();return null===g&&b(o[0],r.length),c.length||(c=a.getUI("cwd")),d().done(function(t){for(;i=o.shift();)s.push(m(i,i.encoding||void 0,t).fail(function(e){e&&a.error(e)}));s.length?e.when.apply(null,s).done(function(){p.resolve()}).fail(function(){p.reject()}):p.reject()}).fail(function(){p.reject()}),p},this.getMkfileHides=function(){return i.storage("mkfileHides")||i.arrayFlip(n.options.mkfileHideMimes||[])}},i.prototype.commands.emailto=function(){var t=this,n=t.fm,i=function(t){var n,i,a,o=t.length;return o>1&&(n=t[0].mime,i=t[0].name.replace(/^.*(\.[^.]+)$/,"$1")),e.grep(t,function(e){return!a&&"directory"!==e.mime})};this.exec=function(e){var t=n.url(e[0],0),i=t.split("/").pop(),a="";if(a=prompt("Please enter mail address"),null!=a){var o=a.match(/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i);return null==o?void alert("Please enter a valid email address"):void window.open("mailto:"+a+"?subject="+i+"&body="+t)}},this.getstate=function(e){var t=this.files(e),n=t.length;return n&&i(t).length==n?0:-1}},i.prototype.commands.empty=function(){var t,n,i=function(e){var i=t.files(e);return i.length||(i=[n.cwd()]),i};this.linkedCmds=["rm"],this.init=function(){t=this,n=this.fm},this.getstate=function(t){var n,a=i(t),o=function(t){var n=!0;return e.grep(t,function(e){return n=!!(n&&e.read&&e.write&&"directory"===e.mime)})};return n=a.length,o(a).length==n?0:-1},this.exec=function(t){var a=i(t),o=a.length,r=e.Deferred().done(function(){var t={changed:{}};n.toast({msg:n.i18n(['"'+s.join('", ')+'"',"complete",n.i18n("cmdempty")])}),e.each(a,function(e,n){t.changed[n.hash]=n}),n.change(t)}).always(function(){var t=n.cwd().hash;n.trigger("selectfiles",{files:e.map(a,function(e){return t===e.phash?e.hash:null})})}),s=[],l=function(e){"number"==typeof e?(s.push(a[e].name),delete a[e].dirs):e&&n.error(e),--o<1&&r[s.length?"resolve":"reject"]()};return e.each(a,function(t,i){var a;return i.write&&"directory"===i.mime?n.isCommandEnabled("rm",i.hash)?(a=setTimeout(function(){n.notify({type:"search",cnt:1,hideCnt:!(o>1)})},n.notifyDelay),void n.request({data:{cmd:"open",target:i.hash},preventDefault:!0,asNotOpen:!0}).done(function(r){var s=[];a&&clearTimeout(a),n.ui.notify.children(".elfinder-notify-search").length&&n.notify({type:"search",cnt:-1,hideCnt:!(o>1)}),r&&r.files&&r.files.length?r.files.length>n.maxTargets?l(["errEmpty",i.name,"errMaxTargets",n.maxTargets]):(n.updateCache(r),e.each(r.files,function(e,t){return!t.write||t.locked?(l(["errEmpty",i.name,"errRm",t.name,"errPerm"]),s=[],!1):void s.push(t.hash)}),s.length&&n.exec("rm",s,{_userAction:!0,addTexts:[n.i18n("folderToEmpty",i.name)]}).fail(function(e){n.trigger("unselectfiles",{files:n.selected()}),l(n.parseError(e)||"")}).done(function(){l(t)})):(n.toast({mode:"warning",msg:n.i18n("filderIsEmpty",i.name)}),l(""))}).fail(function(e){l(n.parseError(e)||"")})):(l(["errCmdNoSupport",'"rm"']),null):(l(["errEmpty",i.name,"errPerm"]),null)}),r}},i.prototype.commands.extract=function(){var t=this,n=t.fm,i=[],a=function(t){var n=!0;return e.grep(t,function(t){return n=!(!n||!t.read||e.inArray(t.mime,i)===-1)})};this.variants=[],this.disableOnSearch=!0,n.bind("open reload",function(){i=n.option("archivers").extract||[],n.api>2?t.variants=[[{makedir:!0},n.i18n("cmdmkdir")],[{},n.i18n("btnCwd")]]:t.variants=[[{},n.i18n("btnCwd")]],t.change()}),this.getstate=function(t){var i,o,r=this.files(t),s=r.length;return s&&a(r).length==s?n.searchStatus.state>0?(i=this.fm.cwd().hash,e.each(r,function(e,t){return o=t.phash===i}),o?0:-1):this.fm.cwd().write?0:-1:-1},this.exec=function(t,a){var o,r,s,l=this.files(t),c=e.Deferred(),d=l.length,p=a&&a.makedir?1:0,u=!1,h=!1,f=0,m=n.files(l[0].phash),g=[],v={};e.each(m,function(e,t){v[t.name]=t,g.push(t.name)});var b=function(e){switch(e){case"overwrite_all":u=!0;break;case"omit_all":h=!0}},y=function(t){t.read&&n.file(t.phash).write?e.inArray(t.mime,i)===-1?(r=["errExtract",t.name,"errNoArchive"],n.error(r),c.reject(r)):n.request({data:{cmd:"extract",target:t.hash,makedir:p},notify:{type:"extract",cnt:1},syncOnFail:!0,navigate:{toast:p?{incwd:{msg:n.i18n(["complete",n.i18n("cmdextract")]),action:{cmd:"open",msg:"cmdopen"}},inbuffer:{msg:n.i18n(["complete",n.i18n("cmdextract")]),action:{cmd:"open",msg:"cmdopen"}}}:{inbuffer:{msg:n.i18n(["complete",n.i18n("cmdextract")])}}}}).fail(function(e){"rejected"!=c.state()&&c.reject(e)}).done(function(){}):(r=["errExtract",t.name,"errPerm"],n.error(r),c.reject(r))},w=function(t,i){var a=t[i],r=n.splitFileExtention(a.name)[0],l=e.inArray(r,g)>=0,m=function(){i+1<d?w(t,i+1):c.resolve()};!p&&l&&"directory"!=v[r].mime?n.confirm({title:n.i18n("ntfextract"),text:["errExists",r,"confirmRepl"],accept:{label:"btnYes",callback:function(e){if(s=e?"overwrite_all":"overwrite",b(s),u||h){if(u){for(o=i;o<d;o++)y(t[o]);c.resolve()}}else"overwrite"==s&&y(a),i+1<d?w(t,i+1):c.resolve()}},reject:{label:"btnNo",callback:function(e){s=e?"omit_all":"omit",b(s),!u&&!h&&i+1<d?w(t,i+1):h&&c.resolve()}},cancel:{label:"btnCancel",callback:function(){c.resolve()}},all:i+1<d}):p?(y(a),m()):0==f?n.confirm({title:n.i18n("cmdextract"),text:[n.i18n("cmdextract")+' "'+a.name+'"',"confirmRepl"],accept:{label:"btnYes",callback:function(e){e&&(f=1),y(a),m()}},reject:{label:"btnNo",callback:function(e){e&&(f=-1),m()}},cancel:{label:"btnCancel",callback:function(){c.resolve()}},all:i+1<d}):(f>0&&y(a),m())};return this.enabled()&&d&&i.length?(d>0&&w(l,0),c):c.reject()}},(i.prototype.commands.forward=function(){this.alwaysEnabled=!0,this.updateOnSelect=!0,this.shortcuts=[{pattern:"ctrl+right"}],this.getstate=function(){return this.fm.history.canForward()?0:-1},this.exec=function(){return this.fm.history.forward()}}).prototype={forceLoad:!0},i.prototype.commands.fullscreen=function(){var t=this,n=this.fm,i=function(e,i){var a;e.preventDefault(),e.stopPropagation(),i&&i.fullscreen&&(a="on"===i.fullscreen,t.update(void 0,a),t.title=n.i18n(a?"reinstate":"cmdfullscreen"))};this.alwaysEnabled=!0,this.updateOnSelect=!1,this.syncTitleOnChange=!0,this.value=!1,this.options={ui:"fullscreenbutton"},this.getstate=function(){return 0},this.exec=function(){var i=n.getUI().get(0),a=i===n.toggleFullscreen(i);return t.title=n.i18n(a?"reinstate":"cmdfullscreen"),t.update(void 0,a),e.Deferred().resolve()},n.bind("init",function(){n.getUI().off("resize."+n.namespace,i).on("resize."+n.namespace,i)})},(i.prototype.commands.getfile=function(){var t=this,n=this.fm,i=function(n){var i=t.options,a=!0;return n=e.grep(n,function(e){return a=!(!a||"directory"==e.mime&&!i.folders||!e.read)}),i.multiple||1==n.length?n:[]};this.alwaysEnabled=!0,this.callback=n.options.getFileCallback,this._disabled="function"==typeof this.callback,this.getstate=function(e){var t=this.files(e),n=t.length;return this.callback&&n&&i(t).length==n?0:-1},this.exec=function(n){var i,a,o,r=this.fm,s=this.options,l=this.files(n),c=l.length,d=r.option("url"),p=r.option("tmbUrl"),u=e.Deferred().done(function(e){var n,i=function(){"close"==s.oncomplete?r.hide():"destroy"==s.oncomplete&&r.destroy()},a=function(e){"close"==s.onerror?r.hide():"destroy"==s.onerror?r.destroy():e&&r.error(e)};r.trigger("getfile",{files:e});try{n=t.callback(e,r)}catch(o){return void a(["Error in `getFileCallback`.",o.message])}"object"==typeof n&&"function"==typeof n.done?n.done(i).fail(a):i()}),h=function(t){return s.onlyURL?s.multiple?e.map(l,function(e){return e.url}):l[0].url:s.multiple?l:l[0]},f=[];for(i=0;i<c;i++){if(a=l[i],"directory"==a.mime&&!s.folders)return u.reject();a.baseUrl=d,"1"==a.url?f.push(r.request({data:{cmd:"url",target:a.hash},notify:{type:"url",cnt:1,hideCnt:!0},preventDefault:!0}).done(function(e){if(e.url){var t=r.file(this.hash);t.url=this.url=e.url}}.bind(a))):a.url=r.url(a.hash),s.onlyURL||(s.getPath&&(a.path=r.path(a.hash),""===a.path&&a.phash&&!function(){var t=e.Deferred();f.push(t),r.path(a.hash,!1,{}).done(function(e){a.path=e}).fail(function(){a.path=""}).always(function(){t.resolve()})}()),a.tmb&&1!=a.tmb&&(a.tmb=p+a.tmb),a.width||a.height||(a.dim?(o=a.dim.split("x"),a.width=o[0],a.height=o[1]):s.getImgSize&&a.mime.indexOf("image")!==-1&&f.push(r.request({data:{cmd:"dim",target:a.hash},notify:{type:"dim",cnt:1,hideCnt:!0},preventDefault:!0}).done(function(e){if(e.dim){var t=e.dim.split("x"),n=r.file(this.hash);n.width=this.width=t[0],n.height=this.height=t[1]}}.bind(a)))))}return f.length?(e.when.apply(null,f).always(function(){u.resolve(h(l))}),u):u.resolve(h(l))}}).prototype={forceLoad:!0},(i.prototype.commands.help=function(){var t,n,i,a,o,r,s=this.fm,l=this,c='<div class="elfinder-help-link"> <a href="{url}" target="_blank">{link}</a></div>',d='<div class="elfinder-help-team"><div>{author}</div>{work}</div>',p=/\{url\}/,u=/\{link\}/,h=/\{author\}/,f=/\{work\}/,m="replace",g="ui-priority-primary",v="ui-priority-secondary",b="elfinder-help-license",y='<li class="'+s.res("class","tabstab")+' elfinder-help-tab-{id}"><a href="#'+s.namespace+'-help-{id}" class="ui-tabs-anchor">{title}</a></li>',w=['<div class="ui-tabs ui-widget ui-widget-content ui-corner-all elfinder-help">','<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-top">'],x='<div class="elfinder-help-shortcut"><div class="elfinder-help-shortcut-pattern">{pattern}</div> {descrip}</div>',k='<div class="elfinder-help-separator"></div>',C=e("base").length?s.escape(document.location.href.replace(/#.*$/,"")):"",z=s.res("class","tabsactive"),T=function(){var e;return e=s.theme&&s.theme.author?d[m]("elfinder-help-team","elfinder-help-team elfinder-help-term-theme")[m](h,s.i18n(s.theme.author)+(s.theme.email?" &lt;"+s.theme.email+"&gt;":""))[m](f,s.i18n("theme")+" ("+s.i18n(s.theme.name)+")"):'<div class="elfinder-help-team elfinder-help-term-theme" style="display:none"></div>'},A=function(){w.push('<div id="'+s.namespace+'-help-about" class="ui-tabs-panel ui-widget-content ui-corner-bottom"><div class="elfinder-help-logo"></div>'),w.push("<h3>elFinder</h3>"),w.push('<div class="'+g+'">'+s.i18n("webfm")+"</div>"),w.push('<div class="'+v+'">'+s.i18n("ver")+": "+s.version+"</div>"),w.push('<div class="'+v+'">'+s.i18n("protocolver")+': <span class="apiver"></span></div>'),w.push('<div class="'+v+'">jQuery/jQuery UI: '+e().jquery+"/"+e.ui.version+"</div>"),w.push(k),w.push(c[m](p,"https://studio-42.github.io/elFinder/")[m](u,s.i18n("homepage"))),w.push(c[m](p,"https://github.com/Studio-42/elFinder/wiki")[m](u,s.i18n("docs"))),w.push(c[m](p,"https://github.com/Studio-42/elFinder")[m](u,s.i18n("github"))),w.push(k),w.push('<div class="'+g+'">'+s.i18n("team")+"</div>"),w.push(d[m](h,'Dmitry "dio" Levashov &lt;dio@std42.ru&gt;')[m](f,s.i18n("chiefdev"))),w.push(d[m](h,"Naoki Sawada (nao-pon)&lt;hypweb+elfinder@gmail.com&gt;")[m](f,s.i18n("developer"))),w.push(d[m](h,"Troex Nevelin &lt;troex@fury.scancode.ru&gt;")[m](f,s.i18n("maintainer"))),w.push(d[m](h,"Alexey Sukhotin &lt;strogg@yandex.ru&gt;")[m](f,s.i18n("contributor"))),s.i18[s.lang].translator&&e.each(s.i18[s.lang].translator.split(", "),function(){w.push(d[m](h,e.trim(this))[m](f,s.i18n("translator")+" ("+s.i18[s.lang].language+")"))}),w.push(T()),w.push(k),w.push('<div class="'+b+'">'+s.i18n("icons")+': Pixelmixer, <a href="http://p.yusukekamiyamane.com" target="_blank">Fugue</a>, <a href="https://icons8.com" target="_blank">Icons8</a></div>'),w.push(k),w.push('<div class="'+b+'">Licence: 3-clauses BSD Licence</div>'),w.push('<div class="'+b+'">Copyright © 2009-2022, Studio 42 / nao-pon</div>'),w.push('<div class="'+b+'">„ …'+s.i18n("dontforget")+" ”</div>"),w.push("</div>")},j=function(){var t=s.shortcuts();w.push('<div id="'+s.namespace+'-help-shortcuts" class="ui-tabs-panel ui-widget-content ui-corner-bottom">'),t.length?(w.push('<div class="ui-widget-content elfinder-help-shortcuts">'),e.each(t,function(e,t){w.push(x.replace(/\{pattern\}/,t[0]).replace(/\{descrip\}/,t[1]))}),w.push("</div>")):w.push('<div class="elfinder-help-disabled">'+s.i18n("shortcutsof")+"</div>"),w.push("</div>")},S=function(){w.push('<div id="'+s.namespace+'-help-help" class="ui-tabs-panel ui-widget-content ui-corner-bottom">'),w.push('<a href="https://github.com/Studio-42/elFinder/wiki" target="_blank" class="elfinder-dont-panic"><span>DON\'T PANIC</span></a>'),w.push("</div>")},O=!1,I=function(){O=!0,w.push('<div id="'+s.namespace+'-help-integrations" class="ui-tabs-panel ui-widget-content ui-corner-bottom"></div>')},M=!1,E=function(){M=!0,w.push('<div id="'+s.namespace+'-help-debug" class="ui-tabs-panel ui-widget-content ui-corner-bottom">'),w.push('<div class="ui-widget-content elfinder-help-debug"><ul></ul></div>'),w.push("</div>")},F=function(){var n,i,a,c,d,p,u=function(t,n){return e.each(n,function(n,i){t.append(e("<dt></dt>").text(n)),"undefined"==typeof i?t.append(e("<dd></dd>").append(e("<span></span>").text("undfined"))):"object"!=typeof i||i?"object"==typeof i&&(e.isPlainObject(i)||i.length)?t.append(e("<dd></dd>").append(u(e("<dl></dl>"),i))):t.append(e("<dd></dd>").append(e("<span></span>").text(i&&"object"==typeof i?"[]":i?i:'""'))):t.append(e("<dd></dd>").append(e("<span></span>").text("null")));
21
+ }),t},h=r.children("li").length;(l.debug.options||l.debug.debug)&&(h>=5&&(d=r.children("li:last"),p=o.children("div:last"),p.is(":hidden")?(d.remove(),p.remove()):(d.prev().remove(),p.prev().remove())),a=s.namespace+"-help-debug-"+ +new Date,n=e("<li></li>").html('<a href="'+C+"#"+a+'">'+l.debug.debug.cmd+"</a>").prependTo(r),i=e('<div id="'+a+'"></div>').data("debug",l.debug),n.on("click.debugrender",function(){var t=i.data("debug");i.removeData("debug"),t&&(i.hide(),t.debug&&(c=e("<fieldset>").append(e("<legend></legend>").text("debug"),u(e("<dl></dl>"),t.debug)),i.append(c)),t.options&&(c=e("<fieldset>").append(e("<legend></legend>").text("options"),u(e("<dl></dl>"),t.options)),i.append(c)),i.show()),n.off("click.debugrender")}),r.after(i),t&&o.tabs("refresh"))},D="";this.alwaysEnabled=!0,this.updateOnSelect=!1,this.state=-1,this.shortcuts=[{pattern:"f1",description:this.title}],s.bind("load",function(){var c,d,p,u,h,f,g=l.options.view||["about","shortcuts","help","integrations","debug"];(c=e.inArray("preference",g))!==-1&&g.splice(c,1),e.fn.tabs||(c=e.inArray(g,"debug"))!==-1&&g.splice(c,1),e.each(g,function(e,t){w.push(y[m](/\{id\}/g,t)[m](/\{title\}/,s.i18n(t)))}),w.push("</ul>"),e.inArray("about",g)!==-1&&A(),e.inArray("shortcuts",g)!==-1&&j(),e.inArray("help",g)!==-1&&(d=s.i18nBaseUrl+"help/%s.html.js",S()),e.inArray("integrations",g)!==-1&&I(),e.inArray("debug",g)!==-1&&E(),w.push("</div>"),D=e(w.join("")),D.find(".ui-tabs-nav li").on("mouseenter mouseleave",function(t){e(this).toggleClass("ui-state-hover","mouseenter"===t.type)}).on("focus blur","a",function(t){e(t.delegateTarget).toggleClass("ui-state-focus","focusin"===t.type)}).children().on("click",function(t){var n=e(this);t.preventDefault(),t.stopPropagation(),n.parent().addClass(z).siblings().removeClass(z),D.children(".ui-tabs-panel").hide().filter(n.attr("href")).show()}).filter(":first").trigger("click"),O&&(n=D.find(".elfinder-help-tab-integrations").hide(),i=D.find("#"+s.namespace+"-help-integrations").hide().append(e('<div class="elfinder-help-integrations-desc"></div>').html(s.i18n("integrationWith"))),s.bind("helpIntegration",function(t){var a,o,r,l,c=i.children("ul:first");t.data&&(e.isPlainObject(t.data)?(a=Object.assign({link:"",title:"",banner:""},t.data),(a.title||a.link)&&(a.title||(a.title=a.link),o=a.link?e("<a></a>").attr("href",a.link).attr("target","_blank").text(a.title):e("<span></span>").text(a.title),a.banner&&(o=e("<span></span>").append(e("<img/>").attr(a.banner),o)))):(o=e(t.data),o.filter("a").each(function(){var t=e(this);t.attr("target")||t.attr("target","_blank")})),o&&(n.show(),c.length||(c=e('<ul class="elfinder-help-integrations"></ul>').appendTo(i)),a&&a.cmd?(l="elfinder-help-integration-"+a.cmd,r=c.find("ul."+l),r.length||(r=e('<ul class="'+l+'"></ul>'),c.append(e("<li></li>").append(e("<span></span>").html(s.i18n("cmd"+a.cmd))).append(r))),o=r.append(e("<li></li>").append(o))):c.append(e("<li></li>").append(o))))}).bind("themechange",function(){D.find("div.elfinder-help-term-theme").replaceWith(T())})),M&&(a=D.find(".elfinder-help-tab-debug").hide(),o=D.find("#"+s.namespace+"-help-debug").children("div:first"),r=o.children("ul:first").on("click",function(e){e.preventDefault(),e.stopPropagation()}),l.debug={},s.bind("backenddebug",function(e){M&&e.data&&e.data.debug&&(l.debug={options:e.data.options,debug:Object.assign({cmd:s.currentReqCmd},e.data.debug)},l.dialog&&F())})),D.find("#"+s.namespace+"-help-about").find(".apiver").text(s.api),l.dialog=l.fmDialog(D,{title:l.title,width:530,maxWidth:"window",maxHeight:"window",autoOpen:!1,destroyOnClose:!1,close:function(){M&&(a.hide(),o.tabs("destroy")),t=!1}}).on("click",function(e){e.stopPropagation()}).css({overflow:"hidden"}),p=l.dialog.children(".ui-tabs"),u=p.children(".ui-tabs-nav:first"),h=p.children(".ui-tabs-panel"),f=l.dialog.outerHeight(!0)-l.dialog.height(),l.dialog.closest(".ui-dialog").on("resize",function(){h.height(l.dialog.height()-f-u.outerHeight(!0)-20)}),d&&l.dialog.one("initContents",function(){e.ajax({url:l.options.helpSource?l.options.helpSource:d.replace("%s",s.lang),dataType:"html"}).done(function(t){e("#"+s.namespace+"-help-help").html(t)}).fail(function(){e.ajax({url:d.replace("%s","en"),dataType:"html"}).done(function(t){e("#"+s.namespace+"-help-help").html(t)})})}),l.state=0,s.trigger("helpBuilded",l.dialog)}).one("open",function(){var e=!1;s.one("backenddebug",function(){e=!0}).one("opendone",function(){requestAnimationFrame(function(){!e&&M&&(M=!1,a.hide(),o.hide(),r.hide())})})}),this.getstate=function(){return 0},this.exec=function(n,i){var s=i?i.tab:void 0,l=function(){M&&(o.tabs(),r.find("a:first").trigger("click"),a.show(),t=!0)};return l(),this.dialog.trigger("initContents").elfinderdialog("open").find((s?".elfinder-help-tab-"+s:".ui-tabs-nav li")+" a:first").trigger("click"),e.Deferred().resolve()}}).prototype={forceLoad:!0},i.prototype.commands.hidden=function(){this.hidden=!0,this.updateOnSelect=!1,this.getstate=function(){return-1}},i.prototype.commands.hide=function(){var t,n,i,a,o=this,r={};this.syncTitleOnChange=!0,this.shortcuts=[{pattern:"ctrl+shift+dot",description:this.fm.i18n("toggleHidden")}],this.init=function(){var e=this.fm;t=e.storage("hide")||{items:{}},n=Object.keys(t.items).length,this.title=e.i18n(t.show?"hideHidden":"showHidden"),o.update(void 0,o.title)},this.fm.bind("select contextmenucreate closecontextmenu",function(e,r){var s=(e.data?e.data.selected||e.data.targets:null)||r.selected();"select"===e.type&&e.data?a=e.data.origin:"contextmenucreate"===e.type&&(i=e.data.type),!s.length||("contextmenucreate"!==e.type&&"navbar"!==a||"cwd"===i)&&s[0]===r.cwd().hash?o.title=r.i18n(t.show?"hideHidden":"showHidden"):o.title=r.i18n("cmdhide"),"closecontextmenu"!==e.type?o.update("cwd"===i?n?0:-1:void 0,o.title):(i="",requestAnimationFrame(function(){o.update(void 0,o.title)}))}),this.getstate=function(e){return this.fm.cookieEnabled&&"cwd"!==i&&(e||this.fm.selected()).length||n?0:-1},this.exec=function(i,s){var l,c,d=this.fm,p=e.Deferred().done(function(){d.trigger("hide",{items:h,opts:s})}).fail(function(e){d.error(e)}),u=s||{},h=u.targets?u.targets:i||d.selected(),f=[];if(t=d.storage("hide")||{},e.isPlainObject(t)||(t={}),e.isPlainObject(t.items)||(t.items={}),("shortcut"===s._currentType||!h.length||"navbar"!==s._currentType&&"navbar"!==a&&h[0]===d.cwd().hash)&&(t.show?u.hide=!0:Object.keys(t.items).length&&(u.show=!0)),u.reset&&(u.show=!0,n=0),u.show||u.hide){if(u.show?t.show=!0:delete t.show,u.show)return d.storage("hide",u.reset?null:t),o.title=d.i18n("hideHidden"),o.update(u.reset?-1:void 0,o.title),e.each(t.items,function(e){var t=d.file(e,!0);t&&(d.searchStatus.state||!t.phash||d.file(t.phash))&&f.push(t)}),f.length&&(d.updateCache({added:f}),d.add({added:f})),u.reset&&(t={items:{}}),p.resolve();h=Object.keys(t.items)}return h.length&&(e.each(h,function(e,n){var i;t.items[n]||(i=d.file(n),i&&(r[n]=i.i18||i.name),t.items[n]=r[n]?r[n]:n)}),n=Object.keys(t.items).length,l=this.files(h),d.storage("hide",t),d.remove({removed:h}),t.show&&this.exec(void 0,{hide:!0}),u.hide||(c={},c.undo={cmd:"hide",callback:function(){var t=d.storage("hide");t&&(e.each(h,function(e,n){delete t.items[n]}),n=Object.keys(t.items).length,d.storage("hide",t),d.trigger("hide",{items:h,opts:{}}),o.update(n?0:-1)),d.updateCache({added:l}),d.add({added:l})}},c.redo={cmd:"hide",callback:function(){return d.exec("hide",void 0,{targets:h})}})),"rejected"==p.state()?p:p.resolve(c)}},(i.prototype.commands.home=function(){this.title="Home",this.alwaysEnabled=!0,this.updateOnSelect=!1,this.shortcuts=[{pattern:"ctrl+home ctrl+shift+up",description:"Home"}],this.getstate=function(){var e=this.fm.root(),t=this.fm.cwd().hash;return e&&t&&e!=t?0:-1},this.exec=function(){return this.fm.exec("open",this.fm.root())}}).prototype={forceLoad:!0},(i.prototype.commands.info=function(){var t=this.fm,n="elfinder-spinner",i="elfinder-info-button",a={calc:t.i18n("calc"),size:t.i18n("size"),unknown:t.i18n("unknown"),path:t.i18n("path"),aliasfor:t.i18n("aliasfor"),modify:t.i18n("modify"),perms:t.i18n("perms"),locked:t.i18n("locked"),dim:t.i18n("dim"),kind:t.i18n("kind"),files:t.i18n("files"),folders:t.i18n("folders"),roots:t.i18n("volumeRoots"),items:t.i18n("items"),yes:t.i18n("yes"),no:t.i18n("no"),link:t.i18n("link"),owner:t.i18n("owner"),group:t.i18n("group"),perm:t.i18n("perm"),getlink:t.i18n("getLink")},o=function(e,t){return t?e.replace(/\u200B/g,""):e.replace(/(\/|\\)/g,"$1​")};this.items=["size","aliasfor","path","link","dim","modify","perms","locked","owner","group","perm"],this.options.custom&&Object.keys(this.options.custom).length&&e.each(this.options.custom,function(e,t){t.label&&this.items.push(t.label)}),this.tpl={main:'<div class="ui-helper-clearfix elfinder-info-title {dirclass}"><span class="elfinder-cwd-icon {class} ui-corner-all"{style}></span>{title}</div><table class="elfinder-info-tb">{content}</table>',itemTitle:'<strong>{name}</strong><span class="elfinder-info-kind">{kind}</span>',groupTitle:"<strong>{items}: {num}</strong>",row:'<tr><td class="elfinder-info-label">{label} : </td><td class="{class}">{value}</td></tr>',spinner:'<span>{text}</span> <span class="'+n+" "+n+'-{name}"></span>'},this.alwaysEnabled=!0,this.updateOnSelect=!1,this.shortcuts=[{pattern:"ctrl+i"}],this.init=function(){e.each(a,function(e,n){a[e]=t.i18n(n)})},this.getstate=function(){return 0},this.exec=function(t){var r=this.files(t);r.length||(r=this.files([this.fm.cwd().hash]));var s,l,c,d,p,u,h,f,m,g=this,v=this.fm,b=this.options,y=this.tpl,w=y.row,x=r.length,k=[],C=y.main,z="{label}",T="{value}",A=[],j=null,S={title:v.i18n("selectionInfo"),width:"auto",close:function(){e(this).elfinderdialog("destroy"),j&&"pending"===j.state()&&j.reject(),e.grep(A,function(e){e&&"pending"===e.state()&&e.reject()})}},O=[],I=function(e,t,i){E.find("."+n+"-"+t).parent().html(e).addClass(i||"")},M=v.namespace+"-info-"+e.map(r,function(e){return e.hash}).join("-"),E=v.getUI().find("#"+M),F=[],D="",U="elfinder-font-mono elfinder-info-hash",P=[],q=v.ui.notify;if(q.is(":hidden")&&q.children(".elfinder-notify").length&&q.elfinderdialog("open").height("auto"),!x)return e.Deferred().reject();if(E.length)return E.elfinderdialog("toTop"),e.Deferred().resolve();if(f=v.storage("infohides")||v.arrayFlip(b.hideItems,!0),1===x){if(c=r[0],c.icon&&(D=" "+v.getIconStyle(c)),C=C.replace("{dirclass}",c.csscls?v.escape(c.csscls):"").replace("{class}",v.mime2class(c.mime)).replace("{style}",D),d=y.itemTitle.replace("{name}",v.escape(c.i18||c.name)).replace("{kind}",'<span title="'+v.escape(c.mime)+'">'+v.mime2kind(c)+"</span>"),l=v.tmb(c),c.read?"directory"!=c.mime||c.alias?s=v.formatSize(c.size):(s=y.spinner.replace("{text}",a.calc).replace("{name}","size"),O.push(c.hash)):s=a.unknown,!f.size&&k.push(w.replace(z,a.size).replace(T,s)),!f.aleasfor&&c.alias&&k.push(w.replace(z,a.aliasfor).replace(T,c.alias)),f.path||((h=v.path(c.hash,!0))?k.push(w.replace(z,a.path).replace(T,o(v.escape(h))).replace("{class}","elfinder-info-path")):(k.push(w.replace(z,a.path).replace(T,y.spinner.replace("{text}",a.calc).replace("{name}","path")).replace("{class}","elfinder-info-path")),A.push(v.path(c.hash,!0,{notify:null}).fail(function(){I(a.unknown,"path")}).done(function(e){I(o(e),"path")})))),!f.link&&c.read){var R,H=v.escape(c.name);if("1"==c.url)k.push(w.replace(z,a.link).replace(T,'<button class="'+i+" "+n+'-url">'+a.getlink+"</button>"));else{if(c.url)R=c.url;else if("directory"===c.mime)if(b.nullUrlDirLinkSelf&&null===c.url){var _=window.location;R=_.pathname+_.search+"#elf_"+c.hash}else""!==c.url&&v.option("url",!v.isRoot(c)&&c.phash||c.hash)&&(R=v.url(c.hash));else R=v.url(c.hash);R&&k.push(w.replace(z,a.link).replace(T,'<a href="'+R+'" target="_blank">'+H+"</a>"))}}f.dim||(c.dim?k.push(w.replace(z,a.dim).replace(T,c.dim)):c.mime.indexOf("image")!==-1&&(c.width&&c.height?k.push(w.replace(z,a.dim).replace(T,c.width+"x"+c.height)):c.size&&"0"!==c.size&&(k.push(w.replace(z,a.dim).replace(T,y.spinner.replace("{text}",a.calc).replace("{name}","dim"))),A.push(v.request({data:{cmd:"dim",target:c.hash},preventDefault:!0}).fail(function(){I(a.unknown,"dim")}).done(function(e){if(I(e.dim||a.unknown,"dim"),e.dim){var t=e.dim.split("x"),n=v.file(c.hash);n.width=t[0],n.height=t[1]}}))))),!f.modify&&k.push(w.replace(z,a.modify).replace(T,v.formatDate(c))),!f.perms&&k.push(w.replace(z,a.perms).replace(T,v.formatPermissions(c))),!f.locked&&k.push(w.replace(z,a.locked).replace(T,c.locked?a.yes:a.no)),!f.owner&&c.owner&&k.push(w.replace(z,a.owner).replace(T,c.owner)),!f.group&&c.group&&k.push(w.replace(z,a.group).replace(T,c.group)),!f.perm&&c.perm&&k.push(w.replace(z,a.perm).replace(T,v.formatFileMode(c.perm))),window.ArrayBuffer&&(v.options.cdns.sparkmd5||v.options.cdns.jssha)&&"directory"!==c.mime&&c.size>0&&(!b.showHashMaxsize||c.size<=b.showHashMaxsize)&&(P=[],e.each(v.storage("hashchekcer")||b.showHashAlgorisms,function(e,t){c[t]?k.push(w.replace(z,v.i18n(t)).replace(T,c[t]).replace("{class}",U)):(k.push(w.replace(z,v.i18n(t)).replace(T,y.spinner.replace("{text}",a.calc).replace("{name}",t))),P.push(t))}),P.length&&(m=e('<div class="elfinder-quicklook-info-progress"></div>'),A.push(v.getContentsHashes(c.hash,P,b.showHashOpts,{progressBar:m}).progress(function(t){e.each(P,function(e,n){t[n]&&I(t[n],n,U)})}).always(function(){e.each(P,function(e,t){I(a.unknown,t)})})))),b.custom&&e.each(b.custom,function(t,n){f[n.label]||n.mimes&&!e.grep(n.mimes,function(e){return c.mime===e||0===c.mime.indexOf(e+"/")}).length||n.hashRegex&&!c.hash.match(n.hashRegex)||(k.push(w.replace(z,v.i18n(n.label)).replace(T,n.tpl.replace("{id}",M))),n.action&&"function"==typeof n.action&&F.push(n.action))})}else C=C.replace("{class}","elfinder-cwd-icon-group"),d=y.groupTitle.replace("{items}",a.items).replace("{num}",x),p=e.grep(r,function(e){return"directory"==e.mime}).length,p?(u=e.grep(r,function(e){return!("directory"!==e.mime||e.phash&&!e.isroot)}).length,p-=u,k.push(w.replace(z,a.kind).replace(T,u===x||p===x?a[u?"roots":"folders"]:e.map({roots:u,folders:p,files:x-u-p},function(e,t){return e?a[t]+" "+e:null}).join(", "))),!f.size&&k.push(w.replace(z,a.size).replace(T,y.spinner.replace("{text}",a.calc).replace("{name}","size"))),O=e.map(r,function(e){return e.hash})):(s=0,e.each(r,function(e,t){var n=parseInt(t.size);n>=0&&s>=0?s+=n:s="unknown"}),k.push(w.replace(z,a.kind).replace(T,a.files)),!f.size&&k.push(w.replace(z,a.size).replace(T,v.formatSize(s))));return C=C.replace("{title}",d).replace("{content}",k.join("").replace(/{class}/g,"")),E=g.fmDialog(C,S),E.attr("id",M).one("mousedown",".elfinder-info-path",function(){e(this).html(o(e(this).html(),!0))}),P.length&&m.appendTo(E.find("."+n+"-"+P[0]).parent()),v.UA.Mobile&&e.fn.tooltip&&E.children(".ui-dialog-content .elfinder-info-title").tooltip({classes:{"ui-tooltip":"elfinder-ui-tooltip ui-widget-shadow"},tooltipClass:"elfinder-ui-tooltip ui-widget-shadow",track:!0}),c&&"1"==c.url&&E.on("click","."+n+"-url",function(){e(this).parent().html(y.spinner.replace("{text}",v.i18n("ntfurl")).replace("{name}","url")),v.request({data:{cmd:"url",target:c.hash},preventDefault:!0}).fail(function(){I(H,"url")}).done(function(e){if(e.url){I('<a href="'+e.url+'" target="_blank">'+H+"</a>"||H,"url");var t=v.file(c.hash);t.url=e.url}else I(H,"url")})}),l&&e("<img/>").on("load",function(){E.find(".elfinder-cwd-icon").addClass(l.className).css("background-image","url('"+l.url+"')")}).attr("src",l.url),O.length&&(j=v.getSize(O).done(function(e){I(e.formated,"size")}).fail(function(){I(a.unknown,"size")})),F.length&&e.each(F,function(e,t){try{t(c,v,E)}catch(n){v.debug("error",n)}}),e.Deferred().resolve()}}).prototype={forceLoad:!0},i.prototype.commands.mkdir=function(){var t,n=this.fm,i=this;this.value="",this.disableOnSearch=!0,this.updateOnSelect=!1,this.syncTitleOnChange=!0,this.mime="directory",this.prefix="untitled folder",this.exec=function(a,o){var r;return a&&a.length&&o&&o._currentType&&"navbar"===o._currentType?(this.origin=o._currentType,this.data={target:a[0]}):(r=n.cwd().hash===a[0],this.origin=t&&!r?t:"cwd",delete this.data),a||this.options.intoNewFolderToolbtn||n.getUI("cwd").trigger("unselectall"),this.move=this.value===n.i18n("cmdmkdirin"),e.proxy(n.res("mixin","make"),i)()},this.shortcuts=[{pattern:"ctrl+shift+n"}],this.init=function(){this.options.intoNewFolderToolbtn&&(this.syncTitleOnChange=!0)},n.bind("select contextmenucreate closecontextmenu",function(e){var a=(e.data?e.data.selected||e.data.targets:null)||n.selected();i.className="mkdir",t=e.data&&a.length?e.data.origin||e.data.type||"":"",i.options.intoNewFolderToolbtn||""!==t||(t="cwd"),a.length&&"navbar"!==t&&"cwd"!==t&&n.cwd().hash!==a[0]?(i.title=n.i18n("cmdmkdirin"),i.className+=" elfinder-button-icon-mkdirin"):i.title=n.i18n("cmdmkdir"),"closecontextmenu"!==e.type?i.update(void 0,i.title):requestAnimationFrame(function(){i.update(void 0,i.title)})}),this.getstate=function(i){var a=n.cwd(),o="navbar"===t||i&&i[0]!==a.hash?this.files(i||n.selected()):[],r=o.length,s=function(t){var n=!0;return e.grep(t,function(e){return n=!(!n||!e.read||e.locked)})};return"navbar"===t?r&&o[0].write&&o[0].read?0:-1:!a.write||r&&s(o).length!=r?-1:0}},i.prototype.commands.mkfile=function(){var t=this;this.disableOnSearch=!0,this.updateOnSelect=!1,this.mime="text/plain",this.prefix="untitled file.txt",this.variants=[],this.getTypeName=function(e,n){var i,a=t.fm;return i=(i=a.messages["kind"+a.kinds[e]])?a.i18n(["extentiontype",n.toUpperCase(),i]):a.i18n(["extentionfile",n.toUpperCase()])},this.fm.bind("open reload canMakeEmptyFile",function(){var n=t.fm,i=n.getCommand("edit").getMkfileHides();t.variants=[],n.mimesCanMakeEmpty&&e.each(n.mimesCanMakeEmpty,function(e,a){a&&!i[e]&&n.uploadMimeCheck(e)&&t.variants.push([e,t.getTypeName(e,a)])}),t.change()}),this.getstate=function(){return this.fm.cwd().write?0:-1},this.exec=function(n,i){var a,o,r=t.fm;if(a=r.mimesCanMakeEmpty[i]){if(r.uploadMimeCheck(i))return this.mime=i,this.prefix=r.i18n(["untitled file",a]),e.proxy(r.res("mixin","make"),t)();o=["errMkfile",t.getTypeName(i,a)]}return e.Deferred().reject(o)}},i.prototype.commands.netmount=function(){var t,n=this,i=!1;this.alwaysEnabled=!0,this.updateOnSelect=!1,this.drivers=[],this.handlers={load:function(){var t=n.fm;t.cookieEnabled&&t.one("open",function(){n.drivers=t.netDrivers,n.drivers.length&&e.each(n.drivers,function(){var e=n.options[this];e&&(i=!0,e.integrateInfo&&t.trigger("helpIntegration",Object.assign({cmd:"netmount"},e.integrateInfo)))})})}},this.getstate=function(){return i?0:-1},this.exec=function(){var i,a=n.fm,o=e.Deferred(),r=n.options,s=function(){var s,l=function(){c.protocol.trigger("change","winfocus")},c={protocol:e("<select></select>").on("change",function(e,n){var o=this.value;t.find(".elfinder-netmount-tr").hide(),t.find(".elfinder-netmount-tr-"+o).show(),i&&i.children(".ui-dialog-buttonpane:first").find("button").show(),"function"==typeof r[o].select&&r[o].select(a,e,n)}).addClass("ui-corner-all")},d={title:a.i18n("netMountDialogTitle"),resizable:!0,modal:!0,destroyOnClose:!1,open:function(){e(window).on("focus."+a.namespace,l),c.protocol.trigger("change")},close:function(){"pending"==o.state()&&o.reject(),e(window).off("focus."+a.namespace,l)},buttons:{}},p=function(){var i,s=c.protocol.val(),l={cmd:"netmount",protocol:s},d=r[s];return e.each(t.find("input.elfinder-netmount-inputs-"+s),function(t,n){var i,a;a=e(n),a.is(":radio,:checkbox")?a.is(":checked")&&(i=e.trim(a.val())):i=e.trim(a.val()),i&&(l[n.name]=i)}),l.host?(l.mnt2res&&(i=!0),a.request({data:l,notify:{type:"netmount",cnt:1,hideCnt:!0}}).done(function(e){var t;e.added&&e.added.length&&(i&&c.protocol.trigger("change","reset"),e.added[0].phash&&(t=a.file(e.added[0].phash))&&(t.dirs||(t.dirs=1,a.change({changed:[t]}))),a.one("netmountdone",function(){a.exec("open",e.added[0].hash)})),o.resolve()}).fail(function(e){d.fail&&"function"==typeof d.fail&&d.fail(a,a.parseError(e)),o.reject(e)}),void n.dialog.elfinderdialog("close")):a.trigger("error",{error:"errNetMountHostReq",opts:{modal:!0}})},u=e('<form autocomplete="off"></form>').on("keydown","input",function(t){var n,i=!0;t.keyCode===e.ui.keyCode.ENTER&&(e.each(u.find("input:visible:not(.elfinder-input-optional)"),function(){if(""===e(this).val())return i=!1,n=e(this),!1}),i?p():n.trigger("focus"))}),h=e("<div></div>");return t=e('<table class="elfinder-info-tb elfinder-netmount-tb"></table>').append(e("<tr></tr>").append(e("<td>"+a.i18n("protocol")+"</td>")).append(e("<td></td>").append(c.protocol))),e.each(n.drivers,function(n,i){r[i]&&(c.protocol.append('<option value="'+i+'">'+a.i18n(r[i].name||i)+"</option>"),e.each(r[i].inputs,function(n,o){o.attr("name",n),"hidden"!=o.attr("type")?(o.addClass("ui-corner-all elfinder-netmount-inputs-"+i),t.append(e("<tr></tr>").addClass("elfinder-netmount-tr elfinder-netmount-tr-"+i).append(e("<td>"+a.i18n(n)+"</td>")).append(e("<td></td>").append(o)))):(o.addClass("elfinder-netmount-inputs-"+i),h.append(o))}),r[i].protocol=c.protocol)}),t.append(h),t.find(".elfinder-netmount-tr").hide(),t.find(".elfinder-netmount-tr-"+n.drivers[0]).show(),d.buttons[a.i18n("btnMount")]=p,d.buttons[a.i18n("btnCancel")]=function(){n.dialog.elfinderdialog("close")},t.find("select,input").addClass("elfinder-tabstop"),s=n.fmDialog(u.append(t),d).ready(function(){c.protocol.trigger("change"),s.elfinderdialog("posInit")}),i=s.closest(".ui-dialog"),s};return n.dialog?n.dialog.elfinderdialog("open"):n.dialog=s(),o.promise()},n.fm.bind("netmount",function(e){var i=e.data||null,a=n.options,o=function(){a[i.protocol]&&"function"==typeof a[i.protocol].done&&(a[i.protocol].done(n.fm,i),t.find("select,input").addClass("elfinder-tabstop"),n.dialog.elfinderdialog("tabstopsInit"))};i&&i.protocol&&(i.mode&&"redirect"===i.mode?n.fm.request({data:{cmd:"netmount",protocol:i.protocol,host:i.host,user:"init",pass:"return",options:i.options},preventDefault:!0}).done(function(e){i=JSON.parse(e.body),o()}):o())})},i.prototype.commands.netunmount=function(){this.alwaysEnabled=!0,this.updateOnSelect=!1,this.drivers=[],this.handlers={load:function(){this.drivers=this.fm.netDrivers}},this.getstate=function(e){var t,n=this.fm;return e&&this.drivers.length&&!this._disabled&&(t=n.file(e[0]))&&t.netkey?0:-1},this.exec=function(t){var n=this,i=this.fm,a=e.Deferred().fail(function(e){e&&i.error(e)}),o=i.file(t[0]),r=function(t){var n,a=[];return i.leafRoots&&(n=[],e.each(i.leafRoots,function(a,o){var r,s=i.parents(a);(r=e.inArray(t,s))!==-1&&(r=s.length-r,e.each(o,function(e,t){n.push({i:r,hash:t})}))}),n.length&&(n.sort(function(e,t){return e.i<t.i}),e.each(n,function(e,t){a.push(t.hash)}))),a};return this._disabled?a.reject():("pending"==a.state()&&i.confirm({title:n.title,text:i.i18n("confirmUnmount",o.name),accept:{label:"btnUnmount",callback:function(){var t=o.hash,s=r(t),l=[],c=[],d=function(){e.when(l).done(function(){i.request({data:{cmd:"netmount",protocol:"netunmount",host:o.netkey,user:t,pass:"dum"},notify:{type:"netunmount",cnt:1,hideCnt:!0},preventFail:!0}).fail(function(e){a.reject(e)}).done(function(e){o.volumeid&&delete i.volumeExpires[o.volumeid],a.resolve()})}).fail(function(e){c.length&&i.remove({removed:c}),a.reject(e)})};s.length?i.confirm({title:n.title,text:function(){var t=["unmountChildren"];return e.each(s,function(e,n){t.push([i.file(n).name])}),t}(),accept:{label:"btnUnmount",callback:function(){e.each(s,function(e,t){var n=i.file(t);n.netkey&&l.push(i.request({data:{cmd:"netmount",protocol:"netunmount",host:n.netkey,user:n.hash,pass:"dum"},notify:{type:"netunmount",cnt:1,hideCnt:!0},preventDefault:!0}).done(function(e){e.removed&&(n.volumeid&&delete i.volumeExpires[n.volumeid],c=c.concat(e.removed))}))}),d()}},cancel:{label:"btnCancel",callback:function(){a.reject()}}}):(l=null,d())}},cancel:{label:"btnCancel",callback:function(){a.reject()}}}),a)}},(i.prototype.commands.open=function(){var t=this.fm,n=this;this.alwaysEnabled=!0,this.noChangeDirOnRemovedCwd=!0,this._handlers={dblclick:function(e){var i=e.data&&e.data.file?[e.data.file]:void 0;0===n.getstate(i)&&(e.preventDefault(),t.exec("open",i))},"select enable disable reload":function(e){this.update("disable"==e.type?-1:void 0)}},this.shortcuts=[{pattern:"ctrl+down numpad_enter"+("mac"!=t.OS&&" enter")}],this.getstate=function(n){var i=this.files(n),a=i.length;return 1==a?i[0].read?0:-1:a&&!t.UA.Mobile&&e.grep(i,function(e){return!("directory"==e.mime||!e.read)}).length==a?0:-1},this.exec=function(n,i){var a,o,r,s,l,c,d,p,u,h,f,m,g=e.Deferred().fail(function(e){e&&t.error(e)}),v=this.files(n),b=v.length,y="object"==typeof i&&i.thash,w=this.options,x=w.into||"window";if(!b&&!y)return g.reject();if(y||1==b&&(a=v[0])&&"directory"==a.mime)return y||!a||a.read?t.keyState.ctrlKey&&(t.keyState.shiftKey||"function"!=typeof t.options.getFileCallback)&&t.getCommand("opennew")?t.exec("opennew",[y?y:a.hash]):t.request({data:{cmd:"open",target:y||a.hash},notify:{type:"open",cnt:1,hideCnt:!0},syncOnFail:!0,lazy:!1}):g.reject(["errOpen",a.name,"errPerm"]);if(v=e.grep(v,function(e){return"directory"!=e.mime}),b!=v.length)return g.reject();var k=function(){var i,f,m,y=function(n){var p=e('<a rel="noopener">').hide().appendTo(e("body"));if(t.UA.Mobile||!h){if(u)h?p.attr("target","_blank"):p.attr("download",a.name),p.attr("href",n).get(0).click();else if(i=window.open(n),!i)return g.reject("errPopup")}else{if(m="string"==typeof w.method&&"get"===w.method.toLowerCase(),!m&&0===n.indexOf(t.options.url)&&t.customData&&Object.keys(t.customData).length&&!a.mime.match(/^(?:video|audio)/)&&(n=""),"window"===x?(s=c=Math.round(2*screen.availWidth/3),l=d=Math.round(2*screen.availHeight/3),parseInt(a.width)&&parseInt(a.height)?(s=parseInt(a.width),l=parseInt(a.height)):a.dim&&(o=a.dim.split("x"),s=parseInt(o[0]),l=parseInt(o[1])),c>=s&&d>=l?(c=s,d=l):s-c>l-d?d=Math.round(l*(c/s)):c=Math.round(s*(d/l)),r="width="+c+",height="+d,i=window.open(n,f,r+",top=50,left=50,scrollbars=yes,resizable=yes,titlebar=no")):("tabs"===x&&(f=a.hash),i=window.open("about:blank",f)),!i)return g.reject("errPopup");if(""===n){var v=document.createElement("form");v.action=t.options.url,v.method="POST",v.target=f,v.style.display="none";var b=Object.assign({},t.customData,{cmd:"file",target:a.hash,_t:a.ts||parseInt(+new Date/1e3)});e.each(b,function(e,t){var n=document.createElement("input");n.name=e,n.value=t,v.appendChild(n)}),document.body.appendChild(v),v.submit()}else"window"!==x&&(i.location=n);e(i).trigger("focus")}p.remove()};try{p=new RegExp(t.option("dispInlineRegex"),"i")}catch(k){p=!1}for(u="string"==typeof e("<a>").get(0).download,b=v.length;b--;){if(f="elf_open_window",a=v[b],!a.read)return g.reject(["errOpen",a.name,"errPerm"]);h=p&&a.mime.match(p),t.openUrl(a.hash,!h,y)}return g.resolve(n)};if(b>1)t.confirm({title:"openMulti",text:["openMultiConfirm",b+""],accept:{label:"cmdopen",callback:function(){k()}},cancel:{label:"btnCancel",callback:function(){g.reject()}},buttons:t.getCommand("zipdl")&&t.isCommandEnabled("zipdl",t.cwd().hash)?[{label:"cmddownload",callback:function(){t.exec("download",n),g.reject()}}]:[]});else{if(f=t.storage("selectAction")||w.selectAction,f&&(e.each(f.split("/"),function(){var e=this.valueOf();return("open"===e||!(m=t.getCommand(e))||!m.enabled())&&void(m=null)}),m))return t.exec(m.name);k()}return g}}).prototype={forceLoad:!0},i.prototype.commands.opendir=function(){this.alwaysEnabled=!0,this.getstate=function(){var e,t=this.fm.selected(),n=t.length;return 1!==n?-1:(e=this.fm.getUI("workzone"),e.hasClass("elfinder-search-result")?0:-1)},this.exec=function(t){var n,i=this.fm,a=e.Deferred(),o=this.files(t),r=o.length;return r&&o[0].phash?(n=o[0].phash,i.trigger("searchend",{noupdate:!0}),i.request({data:{cmd:"open",target:n},notify:{type:"open",cnt:1,hideCnt:!0},syncOnFail:!1}),a):a.reject()}},i.prototype.commands.opennew=function(){var t=this.fm;this.shortcuts=[{pattern:("function"==typeof t.options.getFileCallback?"shift+":"")+"ctrl+enter"}],this.getstate=function(e){var t=this.files(e),n=t.length;return 1===n&&"directory"===t[0].mime&&t[0].read?0:-1},this.exec=function(t){var n,i,a,o,r=e.Deferred(),s=this.files(t),l=s.length,c=this.options;return 1===l&&(n=s[0])&&"directory"===n.mime?(i=window.location,a=c.url?c.url:i.pathname,c.useOriginQuery&&(a.match(/\?/)?i.search&&(a+="&"+i.search.substr(1)):a+=i.search),a+="#elf_"+n.hash,o=window.open(a,"_blank"),setTimeout(function(){o.focus()},1e3),r.resolve()):r.reject()}},i.prototype.commands.paste=function(){this.updateOnSelect=!1,this.handlers={changeclipboard:function(){this.update()}},this.shortcuts=[{pattern:"ctrl+v shift+insert"}],this.getstate=function(e){if(this._disabled)return-1;if(e){if(Array.isArray(e)){if(1!=e.length)return-1;e=this.fm.file(e[0])}}else e=this.fm.cwd();return this.fm.clipboard().length&&"directory"==e.mime&&e.write?0:-1},this.exec=function(t,n){var i,a,o,r=this,s=r.fm,l=n||{},c=t?this.files(t)[0]:s.cwd(),d=s.clipboard(),p=d.length,u=!!p&&d[0].cut,h=l._cmd?l._cmd:u?"move":"copy",f="err"+h.charAt(0).toUpperCase()+h.substr(1),m=[],g=[],v=e.Deferred().fail(function(e){e&&s.error(e)}).always(function(){s.unlockfiles({files:e.map(d,function(e){return e.hash})})}),b=function(t){return t.length&&s._commands.duplicate?s.exec("duplicate",t):e.Deferred().resolve()},y=function(t){var n,i=e.Deferred(),a=[],o={},d=function(t,n){for(var i=[],a=t.length;a--;)e.inArray(t[a].name,n)!==-1&&i.unshift(a);return i},p=function(e){var n=a[e],o=t[n],r=e==a.length-1;o&&s.confirm({title:s.i18n(h+"Files"),text:["errExists",o.name,"restore"===h?"confirmRest":"confirmRepl"],all:!r,accept:{label:"btnYes",callback:function(n){r||n?m(t):p(++e)}},reject:{label:"btnNo",callback:function(n){var i;if(n)for(i=a.length;e<i--;)t[a[i]].remove=!0;else t[a[e]].remove=!0;r||n?m(t):p(++e)}},cancel:{label:"btnCancel",callback:function(){i.resolve()}},buttons:[{label:"btnBackup",callback:function(n){var i;if(n)for(i=a.length;e<i--;)t[a[i]].rename=!0;else t[a[e]].rename=!0;r||n?m(t):p(++e)}}]})},f=function(n){var i,r={};n&&(Array.isArray(n)?n.length&&("string"==typeof n[0]?a=d(t,n):(e.each(n,function(e,t){r[t.name]=t.hash}),a=d(t,e.map(r,function(e,t){return t})),e.each(t,function(e,t){r[t.name]&&(o[r[t.name]]=t.name)}))):(i=[],a=e.map(n,function(e){return"string"==typeof e?e:(i=i.concat(e),!1)}),i.length&&(a=a.concat(i)),a=d(t,a),o=n)),a.length?p(0):m(t)},m=function(t){var n,a,r=[],d=e.grep(t,function(e){return e.rename&&r.push(e.name),!e.remove}),p=d.length;return p?(n=e.map(d,function(e){return e.hash}),a={cmd:"paste",dst:c.hash,targets:n,cut:u?1:0,renames:r,hashes:o,suffix:s.options.backupSuffix},s.api<2.1&&(a.src=d[0].phash),void s.request({data:a,notify:{type:h,cnt:p},cancel:!0,navigate:{toast:l.noToast?{}:{inbuffer:{msg:s.i18n(["complete",s.i18n("cmd"+h)]),action:{cmd:"open",msg:"cmdopendir",data:[c.hash],done:"select",cwdNot:c.hash}}}}}).done(function(t){var n={},o=t.added&&t.added.length?t.added:null;u&&o&&(e.each(d,function(t,i){var a=i.phash,r=function(t){var n;return e.each(o,function(e,i){if(i.name===t)return n=i.hash,!1}),n},s=r(i.name);s&&(n[a]?n[a].push(s):n[a]=[s])}),Object.keys(n).length&&(t.undo={cmd:"move",callback:function(){var t=[];return e.each(n,function(e,n){t.push(s.request({data:{cmd:"paste",dst:e,targets:n,cut:1},notify:{type:"undo",cnt:n.length}}))}),e.when.apply(null,t)}},t.redo={cmd:"move",callback:function(){return s.request({data:a,notify:{type:"redo",cnt:p}})}})),i.resolve(t)}).fail(function(e){i.reject(),0===e&&s.sync()}).always(function(){s.unlockfiles({files:d})})):i.resolve()};return s.isCommandEnabled(r.name,c.hash)&&t.length?(s.oldAPI?m(t):s.option("copyOverwrite",c.hash)?(n=e.map(t,function(e){return e.name}),c.hash==s.cwd().hash?f(e.map(s.files(),function(e){return e.phash==c.hash?{hash:e.hash,name:e.name}:null})):s.request({data:{cmd:"ls",target:c.hash,intersect:n},notify:{type:"prepare",cnt:1,hideCnt:!0},preventFail:!0}).always(function(e){f(e.list)})):m(t),i):i.resolve();
22
+ };return p&&c&&"directory"==c.mime?c.write?(i=s.parents(c.hash),e.each(d,function(t,n){return n.read?u&&n.locked?!v.reject(["errLocked",n.name]):e.inArray(n.hash,i)!==-1?!v.reject(["errCopyInItself",n.name]):n.mime&&"directory"!==n.mime&&!s.uploadMimeCheck(n.mime,c.hash)?!v.reject([f,n.name,"errUploadMime"]):(a=s.parents(n.hash),a.pop(),e.inArray(c.hash,a)!==-1&&e.grep(a,function(e){var t=s.file(e);return t.phash==c.hash&&t.name==n.name}).length?!v.reject(["errReplByChild",n.name]):void(n.phash==c.hash?g.push(n.hash):m.push({hash:n.hash,phash:n.phash,name:n.name}))):!v.reject([f,n.name,"errPerm"])}),"rejected"===v.state()?v:(o=e.Deferred(),u&&r.options.moveConfirm?s.confirm({title:"moveFiles",text:s.i18n("confirmMove",c.i18||c.name),accept:{label:"btnYes",callback:function(){o.resolve()}},cancel:{label:"btnCancel",callback:function(){o.reject()}}}):o.resolve(),o.done(function(){e.when(b(g),y(m)).done(function(e,t){v.resolve(t&&t.undo?t:void 0)}).fail(function(){v.reject()}).always(function(){u&&s.clipboard([])})}).fail(function(){v.reject()}),v)):v.reject([f,d[0].name,"errPerm"]):v.reject()}},i.prototype.commands.places=function(){var t=this,n=this.fm,i=function(n){var i=!0;return e.grep(t.files(n),function(e){return i=!(!i||"directory"!=e.mime)})},a=null;this.getstate=function(e){var t=this.hashes(e),n=t.length;return a&&n&&n==i(t).length?0:-1},this.exec=function(t){var n=this.files(t);return a.trigger("regist",[n]),e.Deferred().resolve()},n.one("load",function(){a=n.ui.places})},i.prototype.commands.preference=function(){var t,n,i=this,a=this.fm,o="replace",r='<li class="'+a.res("class","tabstab")+' elfinder-preference-tab-{id}"><a href="#'+a.namespace+'-preference-{id}" id="'+a.namespace+'-preference-tab-{id}" class="ui-tabs-anchor {class}">{title}</a></li>',s=e('<div class="ui-tabs ui-widget ui-widget-content ui-corner-all elfinder-preference">'),l=e('<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-top">'),c=e('<div class="elfinder-preference-tabs ui-tabs-panel ui-widget-content ui-corner-bottom"></div>'),d=(e("base").length?document.location.href.replace(/#.*$/,""):"",function(t){e("#"+a.namespace+"-preference-tab-"+t).trigger("mouseover").trigger("click"),n=t}),p=a.res("class","tabsactive"),u=function(){var u=i.options.categories||{language:["language"],theme:["theme"],toolbar:["toolbarPref"],workspace:["iconSize","columnPref","selectAction","makefileTypes","useStoredEditor","editorMaximized","useFullscreen","showHidden"],dialog:["autoFocusDialog"],selectionInfo:["infoItems","hashChecker"],reset:["clearBrowserData"],all:!0},h=i.options.prefs||["language","theme","toolbarPref","iconSize","columnPref","selectAction","makefileTypes","useStoredEditor","editorMaximized","useFullscreen","showHidden","infoItems","hashChecker","autoFocusDialog","clearBrowserData"];a.cookieEnabled||delete u.language,h=a.arrayFlip(h,!0),a.options.getFileCallback&&delete h.selectAction,a.UA.Fullscreen||delete h.useFullscreen,h.language&&(h.language=function(){var t=e("<select></select>").on("change",function(){var t=e(this).val();a.storage("lang",t),e("#"+a.id).elfinder("reload")}),n=[],o=i.options.langs||{ar:"العربية",bg:"Български",ca:"Català",cs:"Čeština",da:"Dansk",de:"Deutsch",el:"Ελληνικά",en:"English",es:"Español",fa:"فارسی",fo:"Føroyskt",fr:"Français",fr_CA:"Français (Canada)",he:"עברית",hr:"Hrvatski",hu:"Magyar",id:"Bahasa Indonesia",it:"Italiano",ja:"日本語",ko:"한국어",nl:"Nederlands",no:"Norsk",pl:"Polski",pt_BR:"Português",ro:"Română",ru:"Pусский",si:"සිංහල",sk:"Slovenčina",sl:"Slovenščina",sr:"Srpski",sv:"Svenska",tr:"Türkçe",ug_CN:"ئۇيغۇرچە",uk:"Український",vi:"Tiếng Việt",zh_CN:"简体中文",zh_TW:"正體中文"};return a.cookieEnabled?(e.each(o,function(e,t){n.push('<option value="'+e+'">'+t+"</option>")}),t.append(n.join("")).val(a.lang)):e()}()),h.theme&&(h.theme=function(){var t=a.options.themes?Object.keys(a.options.themes).length:0;if(0===t||1===t&&a.options.themes["default"])return null;var n=e("<select></select>").on("change",function(){var t=e(this).val();a.changeTheme(t).storage("theme",t)}),i={image:'<img class="elfinder-preference-theme elfinder-preference-theme-image" src="$2" />',link:'<a href="$1" target="_blank" title="$3">$2</a>',data:'<dt>$1</dt><dd><span class="elfinder-preference-theme elfinder-preference-theme-$0">$2</span></dd>'},o=["image","description","author","email","license"],r=e('<button class="ui-button ui-corner-all ui-widget elfinder-preference-theme-default"></button>').text(a.i18n("default")).on("click",function(e){n.val("default").trigger("change")}),s=e('<div class="elfinder-reference-hide-taball"></div>').on("click","button",function(){var t=e(this).data("themeid");n.val(t).trigger("change")});return a.options.themes["default"]||n.append('<option value="default">'+a.i18n("default")+"</option>"),e.each(a.options.themes,function(t,r){var l,c=e('<option class="elfinder-theme-option-'+t+'" value="'+t+'">'+a.i18n(t)+"</option>"),d=e('<fieldset class="ui-widget ui-widget-content ui-corner-all elfinder-theme-list-'+t+'"><legend>'+a.i18n(t)+'</legend><div><span class="elfinder-spinner"></span></div></fieldset>');n.append(c),s.append(d),l=setTimeout(function(){d.find("span.elfinder-spinner").replaceWith(a.i18n(["errRead",t]))},1e4),a.getTheme(t).always(function(){l&&clearTimeout(l)}).done(function(r){var s,l=e(),p=e("<dl></dl>");s=r.link?i.link.replace(/\$1/g,r.link).replace(/\$3/g,a.i18n("website")):"$2",r.name&&c.html(a.i18n(r.name)),d.children("legend").html(s.replace(/\$2/g,a.i18n(r.name)||t)),e.each(o,function(o,s){var l,c=i[s]||i.data;r[s]&&(l=c.replace(/\$0/g,a.escape(s)).replace(/\$1/g,a.i18n(s)).replace(/\$2/g,a.i18n(r[s])),"image"===s&&r.link&&(l=e(l).on("click",function(){n.val(t).trigger("change")}).attr("title",a.i18n("select"))),p.append(l))}),l=l.add(p),l=l.add(e('<div class="elfinder-preference-theme-btn"></div>').append(e('<button class="ui-button ui-corner-all ui-widget"></button>').data("themeid",t).html(a.i18n("select")))),d.find("span.elfinder-spinner").replaceWith(l)}).fail(function(){d.find("span.elfinder-spinner").replaceWith(a.i18n(["errRead",t]))})}),e("<div></div>").append(n.val(a.theme&&a.theme.id?a.theme.id:"default"),r,s)}()),h.toolbarPref&&(h.toolbarPref=function(){var t=e.map(a.options.uiOptions.toolbar,function(t){return e.isArray(t)?t:null}),n=[],i=a.storage("toolbarhides")||{};return e.each(t,function(){var e=this,t=a.i18n("cmd"+e);t==="cmd"+e&&(t=a.i18n(e)),n.push('<span class="elfinder-preference-toolbar-item"><label><input type="checkbox" value="'+e+'" '+(i[e]?"":"checked")+"/>"+t+"</label></span>")}),e(n.join(" ")).on("change","input",function(){var t=e(this).val(),n=e(this).is(":checked");n||i[t]?n&&i[t]&&delete i[t]:i[t]=!0,a.storage("toolbarhides",i),a.trigger("toolbarpref")})}()),h.iconSize&&(h.iconSize=function(){var t=a.options.uiOptions.cwd.iconsView.sizeMax||3,n=a.storage("iconsize")||a.options.uiOptions.cwd.iconsView.size||0,i=e('<div class="touch-punch"></div>').slider({classes:{"ui-slider-handle":"elfinder-tabstop"},value:n,max:t,slide:function(e,t){a.getUI("cwd").trigger("iconpref",{size:t.value})},change:function(e,t){a.storage("iconsize",t.value)}});return a.getUI("cwd").on("iconpref",function(e,t){i.slider("option","value",t.size)}),i}()),h.columnPref&&(h.columnPref=function(){var t=a.options.uiOptions.cwd.listView.columns,n=[],i=a.storage("columnhides")||{};return e.each(t,function(){var e=this,t=a.getColumnName(e);n.push('<span class="elfinder-preference-column-item"><label><input type="checkbox" value="'+e+'" '+(i[e]?"":"checked")+"/>"+t+"</label></span>")}),e(n.join(" ")).on("change","input",function(){var t=e(this).val(),n=e(this).is(":checked");n||i[t]?n&&i[t]&&delete i[t]:i[t]=!0,a.storage("columnhides",i),a.trigger("columnpref",{repaint:!0})})}()),h.selectAction&&(h.selectAction=function(){var t=e("<select></select>").on("change",function(){var t=e(this).val();a.storage("selectAction","default"===t?null:t)}),n=[],o=i.options.selectActions,r=a.getCommand("open").options.selectAction||"open";return e.inArray(r,o)===-1&&o.unshift(r),e.each(o,function(t,i){var o=e.map(i.split("/"),function(e){var t=a.i18n("cmd"+e);return t==="cmd"+e&&(t=a.i18n(e)),t});n.push('<option value="'+i+'">'+o.join("/")+"</option>")}),t.append(n.join("")).val(a.storage("selectAction")||r)}()),h.makefileTypes&&(h.makefileTypes=function(){var t=a.getCommand("edit").getMkfileHides(),n=function(){var n=[];return t=a.getCommand("edit").getMkfileHides(),e.each(a.mimesCanMakeEmpty,function(e,i){var o=a.getCommand("mkfile").getTypeName(e,i);n.push('<span class="elfinder-preference-column-item" title="'+a.escape(o)+'"><label><input type="checkbox" value="'+e+'" '+(t[e]?"":"checked")+"/>"+i+"</label></span>")}),n.join(" ")},i=e("<div></div>").on("change","input",function(){var n=e(this).val(),i=e(this).is(":checked");i||t[n]?i&&t[n]&&delete t[n]:t[n]=!0,a.storage("mkfileHides",t),a.trigger("canMakeEmptyFile")}).append(n()),o=e("<div></div>").append(e('<input type="text" placeholder="'+a.i18n("typeOfTextfile")+'"/>').on("keydown",function(t){t.keyCode===e.ui.keyCode.ENTER&&e(this).next().trigger("click")}),e('<button class="ui-button"></button>').html(a.i18n("add")).on("click",function(){var t,n=e(this).prev(),i=n.val(),o=a.getUI("toast"),r=function(){return o.appendTo(n.closest(".ui-dialog")),a.toast({msg:a.i18n("errUsupportType"),mode:"warning",onHidden:function(){1===o.children().length&&o.appendTo(a.getUI())}}),n.trigger("focus"),!1};if(!i.match(/\//)){if(i=a.arrayFlip(a.mimeTypes)[i],!i)return r();n.val(i)}return a.mimeIsText(i)&&a.mimeTypes[i]?(a.trigger("canMakeEmptyFile",{mimes:[i],unshift:!0}),t={},t[i]=a.mimeTypes[i],a.storage("mkfileTextMimes",Object.assign(t,a.storage("mkfileTextMimes")||{})),n.val(""),o.appendTo(n.closest(".ui-dialog")),void a.toast({msg:a.i18n(["complete",i+" ("+t[i]+")"]),onHidden:function(){1===o.children().length&&o.appendTo(a.getUI())}})):r()}),e('<button class="ui-button"></button>').html(a.i18n("reset")).on("click",function(){a.one("canMakeEmptyFile",{done:function(){i.empty().append(n())}}),a.trigger("canMakeEmptyFile",{resetTexts:!0})}));return a.bind("canMakeEmptyFile",{done:function(e){e.data&&e.data.mimes&&e.data.mimes.length&&i.empty().append(n())}}),e("<div></div>").append(i,o)}()),h.useStoredEditor&&(h.useStoredEditor=e('<input type="checkbox"/>').prop("checked",function(){var e=a.storage("useStoredEditor");return e?e>0:a.options.commandsOptions.edit.useStoredEditor}()).on("change",function(t){a.storage("useStoredEditor",e(this).is(":checked")?1:-1)})),h.editorMaximized&&(h.editorMaximized=e('<input type="checkbox"/>').prop("checked",function(){var e=a.storage("editorMaximized");return e?e>0:a.options.commandsOptions.edit.editorMaximized}()).on("change",function(t){a.storage("editorMaximized",e(this).is(":checked")?1:-1)})),h.useFullscreen&&(h.useFullscreen=e('<input type="checkbox"/>').prop("checked",function(){var e=a.storage("useFullscreen");return e?e>0:"screen"===a.options.commandsOptions.fullscreen.mode}()).on("change",function(t){a.storage("useFullscreen",e(this).is(":checked")?1:-1)})),h.showHidden&&!function(){var t,n=function(){var n,i=a.storage("hide"),o=[];i&&i.items&&e.each(i.items,function(e,t){o.push(a.escape(t))}),r.prop("disabled",!o.length)[o.length?"removeClass":"addClass"]("ui-state-disabled"),n=o.length?o.join("\n"):"",h.showHidden.attr("title",n),t&&h.showHidden.tooltip("option","content",n.replace(/\n/g,"<br>")).tooltip("close")},i=e('<input type="checkbox"/>').prop("checked",function(){var e=a.storage("hide");return e&&e.show}()).on("change",function(t){var n={};n[e(this).is(":checked")?"show":"hide"]=!0,a.exec("hide",void 0,n)}),o=e('<button class="ui-button ui-corner-all ui-widget"></button>').append(a.i18n("reset")).on("click",function(){a.exec("hide",void 0,{reset:!0}),e(this).parent().find("input:first").prop("checked",!1),n()}),r=e().add(i).add(o);h.showHidden=e("<div></div>").append(i,o),a.bind("hide",function(e){var t=e.data;t.opts&&(t.opts.show||t.opts.hide)||n()}),a.UA.Mobile&&e.fn.tooltip&&(t=!0,h.showHidden.tooltip({classes:{"ui-tooltip":"elfinder-ui-tooltip ui-widget-shadow"},tooltipClass:"elfinder-ui-tooltip ui-widget-shadow",track:!0}).css("user-select","none"),o.css("user-select","none")),n()}(),h.infoItems&&(h.infoItems=function(){var t=a.getCommand("info").items,n=[],i=a.storage("infohides")||a.arrayFlip(a.options.commandsOptions.info.hideItems,!0);return e.each(t,function(){var e=this,t=a.i18n(e);n.push('<span class="elfinder-preference-info-item"><label><input type="checkbox" value="'+e+'" '+(i[e]?"":"checked")+"/>"+t+"</label></span>")}),e(n.join(" ")).on("change","input",function(){var t=e(this).val(),n=e(this).is(":checked");n||i[t]?n&&i[t]&&delete i[t]:i[t]=!0,a.storage("infohides",i),a.trigger("infopref",{repaint:!0})})}()),h.hashChecker&&a.hashCheckers.length&&(h.hashChecker=function(){var t=[],n=a.arrayFlip(a.storage("hashchekcer")||a.options.commandsOptions.info.showHashAlgorisms,!0);return e.each(a.hashCheckers,function(){var e=this,i=a.i18n(e);t.push('<span class="elfinder-preference-hashchecker-item"><label><input type="checkbox" value="'+e+'" '+(n[e]?"checked":"")+"/>"+i+"</label></span>")}),e(t.join(" ")).on("change","input",function(){var t=e(this).val(),i=e(this).is(":checked");i?n[t]=!0:n[t]&&delete n[t],a.storage("hashchekcer",e.grep(a.hashCheckers,function(e){return n[e]}))})}()),h.autoFocusDialog&&(h.autoFocusDialog=e('<input type="checkbox"/>').prop("checked",function(){var e=a.storage("autoFocusDialog");return e?e>0:a.options.uiOptions.dialog.focusOnMouseOver}()).on("change",function(t){a.storage("autoFocusDialog",e(this).is(":checked")?1:-1)})),h.clearBrowserData&&(h.clearBrowserData=e("<button></button>").text(a.i18n("reset")).button().on("click",function(t){t.preventDefault(),a.storage(),e("#"+a.id).elfinder("reload")})),e.each(u,function(t,i){var s,d;i===!0?d=1:i&&(s=e(),e.each(i,function(t,n){var i,o,r,l="";(i=h[n])&&(d=2,o=a.i18n(n),r=e(i).filter('input[type="checkbox"]'),r.length||(r=e(i).find('input[type="checkbox"]')),1===r.length?(r.attr("id")||r.attr("id","elfinder-preference-"+n+"-checkbox"),o='<label for="'+r.attr("id")+'">'+o+"</label>"):r.length>1&&(l=" elfinder-preference-checkboxes"),s=s.add(e('<dt class="elfinder-preference-'+n+l+'">'+o+"</dt>")).add(e('<dd class="elfinder-preference-'+n+l+'"></dd>').append(i)))})),d&&(l.append(r[o](/\{id\}/g,t)[o](/\{title\}/,a.i18n(t))[o](/\{class\}/,n===t?"elfinder-focus":"")),2===d&&c.append(e('<div id="'+a.namespace+"-preference-"+t+'" class="elfinder-preference-content"></div>').hide().append(e("<dl></dl>").append(s))))}),l.on("click","a",function(t){var n=e(t.target),i=n.attr("href");t.preventDefault(),t.stopPropagation(),l.children().removeClass(p),n.removeClass("ui-state-hover").parent().addClass(p),i.match(/all$/)?c.addClass("elfinder-preference-taball").children().show():(c.removeClass("elfinder-preference-taball").children().hide(),e(i).show())}).on("focus blur","a",function(t){e(this).parent().toggleClass("ui-state-focus","focusin"===t.type)}).on("mouseenter mouseleave","li",function(t){e(this).toggleClass("ui-state-hover","mouseenter"===t.type)}),c.find("a,input,select,button").addClass("elfinder-tabstop"),s.append(l,c),t=i.fmDialog(s,{title:i.title,width:i.options.width||600,height:i.options.height||400,maxWidth:"window",maxHeight:"window",autoOpen:!1,destroyOnClose:!1,allowMinimize:!1,open:function(){n&&d(n),n=null},resize:function(){c.height(t.height()-l.outerHeight(!0)-(c.outerHeight(!0)-c.height())-5)}}).on("click",function(e){e.stopPropagation()}).css({overflow:"hidden"}),t.closest(".ui-dialog").css({overflow:"hidden"}).addClass("elfinder-bg-translucent"),n="all"};this.shortcuts=[{pattern:"ctrl+comma",description:this.title}],this.alwaysEnabled=!0,this.getstate=function(){return 0},this.exec=function(n,i){return!t&&u(),i&&(i.tab?d(i.tab):"cwd"===i._currentType&&d("workspace")),t.elfinderdialog("open"),e.Deferred().resolve()}},(i.prototype.commands.quicklook=function(){var t,n,i,a,o,r,s,l,c,d,p=this,u=p.fm,h=0,f=1,m=2,g=3,v=4,b=h,y=Element.update?"quicklookupdate":"update",w="elfinder-quicklook-navbar-icon",x="elfinder-quicklook-fullscreen",k="elfinder-quicklook-info-wrapper",C=function(t){e(document).trigger(e.Event("keydown",{keyCode:t,ctrlKey:!1,shiftKey:!1,altKey:!1,metaKey:!1}))},z=function(e){var t=u.getUI().offset(),n=function(){var t=e.find(".elfinder-cwd-file-wrapper");return t.length?t:e}(),i=n.offset()||{top:0,left:0};return{opacity:0,width:n.width(),height:n.height()-30,top:i.top-t.top,left:i.left-t.left}},T=function(){var i=p.options.contain||u.options.dialogContained,a=i?u.getUI():e(window),o=u.getUI().offset(),r=Math.min(t,a.width()-10),s=Math.min(n,a.height()-80);return{opacity:1,width:r,height:s,top:parseInt((a.height()-s-60)/2+(i?0:a.scrollTop()-o.top)),left:parseInt((a.width()-r)/2+(i?0:a.scrollLeft()-o.left))}},A={},j=function(e,t){var n=t||e.substr(0,e.indexOf("/")),i=A[n]?A[n]:A[n]=document.createElement(n),a=!1;try{a=i.canPlayType&&i.canPlayType(e)}catch(o){}return!(!a||""===a||"no"==a)},S=window.navigator.platform.indexOf("Win")!=-1,O=!1,I=!1,M=!1,E=null,F=e.ui.keyCode.LEFT,D=e.ui.keyCode.RIGHT,U="mousemove touchstart "+("onwheel"in document?"wheel":"onmousewheel"in document?"mousewheel":"DOMMouseScroll"),P=e('<span class="elfinder-dialog-title elfinder-quicklook-title"></span>'),q=e("<div></div>"),R=e('<div class="elfinder-quicklook-info"></div>'),H=e('<div class="ui-front elfinder-quicklook-cover"></div>'),_=e('<div class="'+w+" "+w+'-fullscreen"></div>').on("click touchstart",function(t){if(!M){var n=p.window,i=n.hasClass(x),o=e(window),r=function(){p.preview.trigger("changesize")};t.stopPropagation(),t.preventDefault(),i?(G="",L(),n.toggleClass(x).css(n.data("position")),o.trigger(p.resize).off(p.resize,r),V.off("mouseenter mouseleave"),H.off(U)):(n.toggleClass(x).data("position",{left:n.css("left"),top:n.css("top"),width:n.width(),height:n.height(),display:"block"}).removeAttr("style"),e(window).on(p.resize,r).trigger(p.resize),H.on(U,function(e){I||("mousemove"!==e.type&&"touchstart"!==e.type||(L(),E=setTimeout(function(){(u.UA.Mobile||V.parent().find(".elfinder-quicklook-navbar:hover").length<1)&&V.fadeOut("slow",function(){H.show()})},3e3)),H.is(":visible")&&(W(),H.data("tm",setTimeout(function(){H.show()},3e3))))}).show().trigger("mousemove"),V.on("mouseenter mouseleave",function(e){I||("mouseenter"===e.type?L():H.trigger("mousemove"))})),u.zIndex&&n.css("z-index",u.zIndex+1),u.UA.Mobile?V.attr("style",G):V.attr("style",G).draggable(i?"destroy":{start:function(){I=!0,M=!0,H.show(),L()},stop:function(){I=!1,G=p.navbar.attr("style"),requestAnimationFrame(function(){M=!1})}}),e(this).toggleClass(w+"-fullscreen-off");var s=n;a.is(".ui-resizable")&&(s=s.add(a)),s.resizable(i?"enable":"disable").removeClass("ui-state-disabled"),n.trigger("viewchange")}}),N=function(){p.update(void 0,function(){var t=p.fm,n=t.selectedFiles(),i=n.length,a=(p.docked(),function(){var a=0;return e.each(n,function(e,t){var n=parseInt(t.ts);a>=0?n>a&&(a=n):a="unknown"}),{hash:n[0].hash+"/"+ +new Date,name:t.i18n("items")+": "+i,mime:"group",size:J,ts:a,files:e.map(n,function(e){return e.hash}),getSize:!0}});return i||(i=1,n=[t.cwd()]),1===i?n[0]:a()}())},L=function(){p.window.hasClass(x)&&(E&&clearTimeout(E),E=null,V.stop(!0,!0).css("display","block"),W())},W=function(){H.data("tm")&&clearTimeout(H.data("tm")),H.removeData("tm"),H.hide()},B=e('<div class="'+w+" "+w+'-prev"></div>').on("click touchstart",function(e){return!M&&C(F),!1}),$=e('<div class="'+w+" "+w+'-next"></div>').on("click touchstart",function(e){return!M&&C(D),!1}),V=e('<div class="elfinder-quicklook-navbar"></div>').append(B).append(_).append($).append('<div class="elfinder-quicklook-navbar-separator"></div>').append(e('<div class="'+w+" "+w+'-close"></div>').on("click touchstart",function(e){return!M&&p.window.trigger("close"),!1})),K=e('<span class="ui-front ui-icon elfinder-icon-close ui-icon-closethick"></span>').on("mousedown",function(e){e.stopPropagation(),p.window.trigger("close")}),X=e('<span class="ui-front ui-icon elfinder-icon-minimize ui-icon-minusthick"></span>').on("mousedown",function(e){e.stopPropagation(),p.docked()?p.window.trigger("navdockout"):p.window.trigger("navdockin")}),J='<span class="elfinder-spinner-text">'+u.i18n("calc")+'</span><span class="elfinder-spinner"></span>',G="",Y=!0;this.flags={},this.cover=H,this.evUpdate=y,(this.navbar=V)._show=L,this.resize="resize."+u.namespace,this.info=e("<div></div>").addClass(k).append(q).append(R),this.autoPlay=function(){return!!p.opened()&&!!p.options[p.docked()?"dockAutoplay":"autoplay"]},this.preview=e('<div class="elfinder-quicklook-preview ui-helper-clearfix"></div>').on("change",function(){L(),V.attr("style",G),p.docked()&&V.hide(),p.preview.attr("style","").removeClass("elfinder-overflow-auto"),p.info.attr("style","").hide(),p.cover.removeClass("elfinder-quicklook-coverbg"),q.removeAttr("class").attr("style",""),R.html("")}).on(y,function(t){var n,i,a=(p.preview,t.file),r='<div class="elfinder-quicklook-info-data">{value}</div>',s=function(){var s=p.window.css("overflow","hidden");i=u.escape(a.i18||a.name),!a.read&&t.stopImmediatePropagation(),p.window.data("hash",a.hash),p.preview.off("changesize").trigger("change").children().remove(),P.html(i),B.css("visibility",""),$.css("visibility",""),a.hash===u.cwdId2Hash(o.find("[id]:not(.elfinder-cwd-parent):first").attr("id"))&&B.css("visibility","hidden"),a.hash===u.cwdId2Hash(o.find("[id]:last").attr("id"))&&$.css("visibility","hidden"),"directory"===a.mime?c=[a.hash]:"group"===a.mime&&a.getSize&&(c=a.files),R.html(r.replace(/\{value\}/,i)+r.replace(/\{value\}/,u.mime2kind(a))+r.replace(/\{value\}/,c.length?J:u.formatSize(a.size))+r.replace(/\{value\}/,u.i18n("modify")+": "+u.formatDate(a))),c.length&&(l=u.getSize(c).done(function(e){R.find("span.elfinder-spinner").parent().html(e.formated)}).fail(function(){R.find("span.elfinder-spinner").parent().html(u.i18n("unknown"))}).always(function(){l=null}),l._hash=a.hash),q.addClass("elfinder-cwd-icon ui-corner-all "+u.mime2class(a.mime)),a.icon&&q.css(u.getIconStyle(a,!0)),p.info.attr("class",k),a.csscls&&p.info.addClass(a.csscls),a.read&&(n=u.tmb(a))&&e("<img/>").hide().appendTo(p.preview).on("load",function(){q.addClass(n.className).css("background-image","url('"+n.url+"')"),e(this).remove()}).attr("src",n.url),p.info.delay(100).fadeIn(10),p.window.hasClass(x)&&H.trigger("mousemove"),s.css("overflow","")},c=[];a&&!Object.keys(a).length&&(a=u.cwd()),a&&l&&"pending"===l.state()&&l._hash!==a.hash&&l.reject(),a&&(t.forceUpdate||p.window.data("hash")!==a.hash)?s():t.stopImmediatePropagation()}),this.window=e('<div class="ui-front ui-helper-reset ui-widget elfinder-quicklook touch-punch" style="position:absolute"></div>').hide().addClass(u.UA.Touch?"elfinder-touch":"").on("click",function(e){var t=this;e.stopPropagation(),b===m&&requestAnimationFrame(function(){b===m&&u.toFront(t)})}).append(e('<div class="ui-dialog-titlebar ui-widget-header ui-corner-top ui-helper-clearfix elfinder-quicklook-titlebar"></div>').append(e('<span class="ui-widget-header ui-dialog-titlebar-close ui-corner-all elfinder-titlebar-button elfinder-quicklook-titlebar-icon'+(S?" elfinder-titlebar-button-right":"")+'"></span>').append(K,X),P),this.preview,p.info.hide(),H.hide(),V).draggable({handle:"div.elfinder-quicklook-titlebar"}).on("open",function(e,t){var n=p.window,i=p.value,a=u.getUI("cwd"),o=function(e){b=e,p.update(1,p.value),p.change(),n.trigger("resize."+u.namespace)};Y||b!==h?b===v&&(u.getUI("navdock").data("addNode")(c),o(g),p.preview.trigger("changesize"),u.storage("previewDocked","1"),0===u.getUI("navdock").width()&&n.trigger("navdockout")):(i&&i.hash!==r&&(a=u.cwdHash2Elm(i.hash.split("/",2)[0])),G="",V.attr("style",""),b=f,a.trigger("scrolltoview"),W(),n.css(t||z(a)).show().animate(T(),550,function(){o(m),L()}),u.toFront(n))}).on("close",function(e,t){var n,i=p.window,a=p.preview.trigger("change"),r=(p.value,(i.data("hash")||"").split("/",2)[0]),s=function(e,n){b=e,n&&u.toHide(i),a.children().remove(),p.update(0,p.value),i.data("hash",""),t&&t.resolve()};p.opened()&&(l&&"pending"===l.state()&&l.reject(),p.docked()?(c=u.getUI("navdock").data("removeNode")(p.window.attr("id"),"detach"),s(v),u.storage("previewDocked","2")):(b=f,i.hasClass(x)&&_.click(),r&&(n=o.find("#"+r)).length?i.animate(z(n),500,function(){a.off("changesize"),s(h,!0)}):s(h,!0)))}).on("navdockin",function(e,t){var n=p.window,a=u.getUI("navdock"),o=s||a.width(),r=t||{};Y&&(r.init=!0),b=g,i=n.attr("style"),n.toggleClass("ui-front").removeClass("ui-widget").draggable("disable").resizable("disable").removeAttr("style").css({width:"100%",height:o,boxSizing:"border-box",paddingBottom:0,zIndex:"unset"}),V.hide(),X.toggleClass("ui-icon-plusthick ui-icon-minusthick elfinder-icon-full elfinder-icon-minimize"),u.toHide(n,!0),a.data("addNode")(n,r),p.preview.trigger("changesize"),u.storage("previewDocked","1")}).on("navdockout",function(t){var n=p.window,a=u.getUI("navdock"),o=(e.Deferred(),z(p.preview));s=n.outerHeight(),a.data("removeNode")(n.attr("id"),u.getUI()),n.toggleClass("ui-front").addClass("ui-widget").draggable("enable").resizable("enable").attr("style",i),X.toggleClass("ui-icon-plusthick ui-icon-minusthick elfinder-icon-full elfinder-icon-minimize"),b=h,n.trigger("open",o),u.storage("previewDocked","0")}).on("resize."+u.namespace,function(){p.preview.trigger("changesize")}),this.alwaysEnabled=!0,this.value=null,this.handlers={select:function(e,t){d&&cancelAnimationFrame(d),e.data&&e.data.selected&&e.data.selected.length?p.opened()&&N():d=requestAnimationFrame(function(){p.opened()&&N()})},error:function(){p.window.is(":visible")&&p.window.trigger("close")},"searchshow searchhide":function(){this.opened()&&this.window.trigger("close")},navbarshow:function(){requestAnimationFrame(function(){p.docked()&&p.preview.trigger("changesize")})},destroy:function(){p.window.remove()}},this.shortcuts=[{pattern:"space"}],this.support={audio:{ogg:j("audio/ogg;"),webm:j("audio/webm;"),mp3:j("audio/mpeg;"),wav:j("audio/wav;"),m4a:j("audio/mp4;")||j("audio/x-m4a;")||j("audio/aac;"),flac:j("audio/flac;"),amr:j("audio/amr;")},video:{ogg:j("video/ogg;"),webm:j("video/webm;"),mp4:j("video/mp4;"),mkv:j("video/x-matroska;")||j("video/webm;"),"3gp":j("video/3gpp;")||j("video/mp4;"),m3u8:j("application/x-mpegURL","video")||j("application/vnd.apple.mpegURL","video"),mpd:j("application/dash+xml","video")}},A={},this.closed=function(){return b==h||b==v},this.opened=function(){return b==m||b==g},this.docked=function(){return b==g},this.addIntegration=function(e){requestAnimationFrame(function(){u.trigger("helpIntegration",Object.assign({cmd:"quicklook"},e))})},this.init=function(){var i,l=this.options,c=this.window,d=this.preview;t=l.width>0?parseInt(l.width):450,n=l.height>0?parseInt(l.height):300,"auto"!==l.dockHeight&&(s=parseInt(l.dockHeight),s||(s=void 0)),u.one("load",function(){O=u.getUI("navdock").data("dockEnabled"),!O&&X.hide(),a=u.getUI(),o=u.getUI("cwd"),u.zIndex&&c.css("z-index",u.zIndex+1),c.appendTo(a),e(document).on("keydown."+u.namespace,function(t){t.keyCode==e.ui.keyCode.ESCAPE&&p.opened()&&!p.docked()&&c.hasClass("elfinder-frontmost")&&c.trigger("close")}),c.resizable({handles:"se",minWidth:350,minHeight:120,resize:function(){d.trigger("changesize")}}),p.change(function(){p.opened()&&p.value&&(p.value.tmb&&1==p.value.tmb&&(p.value=Object.assign({},u.file(p.value.hash))),d.trigger(e.Event(y,{file:p.value})))}),d.on(y,function(e){var t,n,a;if(t=e.file){if(n=t.hash,a=u.searchStatus.mixed&&u.searchStatus.state>1,"directory"!==t.mime)if(parseInt(t.size)||t.mime.match(l.mimeRegexNotEmptyCheck)){if(p.dispInlineRegex=i,a||u.optionsByHashes[n])try{p.dispInlineRegex=new RegExp(u.option("dispInlineRegex",n),"i")}catch(e){try{p.dispInlineRegex=new RegExp(u.isRoot(t)?u.options.dispInlineRegex:u.option("dispInlineRegex",t.phash),"i")}catch(e){p.dispInlineRegex=/^$/}}}else e.stopImmediatePropagation();else p.dispInlineRegex=/^$/;p.info.show()}else e.stopImmediatePropagation()}),e.each(u.commands.quicklook.plugins||[],function(e,t){"function"==typeof t&&new t(p)})}).one("open",function(){var e,t=Number(u.storage("previewDocked")||l.docked);O&&t>=1&&(e=p.window,p.exec(),e.trigger("navdockin",{init:!0}),2===t?e.trigger("close"):(p.update(void 0,u.cwd()),p.change())),Y=!1}).bind("open",function(){r=u.cwd().hash,p.value=u.cwd();try{i=new RegExp(u.option("dispInlineRegex"),"i")}catch(e){i=/^$/}}).bind("change",function(t){t.data&&t.data.changed&&p.opened()&&e.each(t.data.changed,function(){if(p.window.data("hash")===this.hash)return p.window.data("hash",null),p.preview.trigger(y),!1})}).bind("navdockresizestart navdockresizestop",function(e){H["navdockresizestart"===e.type?"show":"hide"]()})},this.getstate=function(){return p.opened()?1:0},this.exec=function(){return p.closed()&&N(),p.enabled()&&p.window.trigger(p.opened()?"close":"open"),e.Deferred().resolve()},this.hideinfo=function(){this.info.stop(!0,!0).hide()}}).prototype={forceLoad:!0},i.prototype.commands.quicklook.plugins=[function(t){var n,i,a=["image/jpeg","image/png","image/gif","image/svg+xml","image/x-ms-bmp"],o=t.fm.returnBytes(t.options.getDimThreshold||0),r=t.preview;n=new Image,n.onload=n.onerror=function(){2==n.height&&a.push("image/webp")},n.src="data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA",e.each(navigator.mimeTypes,function(t,n){var i=n.type;0===i.indexOf("image/")&&e.inArray(i,a)&&a.push(i)}),r.on(t.evUpdate,function(n){var s,l,c,d,p=t.fm,u=n.file,h=!1,f=null,m=function(e){var t=p.file(u.hash);t.width=e[0],t.height=e[1]},g=function(){var e,t,n,i,a;f&&f.state&&"pending"===f.state()&&f.reject(),h||(h=!0,e=s.get(0),t=u.width&&u.height?{w:u.width,h:u.height}:e.naturalWidth?null:{w:s.width(),h:s.height()},t&&s.removeAttr("width").removeAttr("height"),n=u.width||e.naturalWidth||e.width||s.width(),i=u.height||e.naturalHeight||e.height||s.height(),u.width&&u.height||m([n,i]),t&&s.width(t.w).height(t.h),a=(n/i).toFixed(2),r.on("changesize",function(){var e,t,n=parseInt(r.width()),i=parseInt(r.height());a<(n/i).toFixed(2)?(t=i,e=Math.floor(t*a)):(e=n,t=Math.floor(e/a)),s.width(e).height(t).css("margin-top",t<i?Math.floor((i-t)/2):0)}).trigger("changesize"),s.fadeIn(100))},v=function(){l.remove(),t.hideinfo()};i||(i=p.arrayFlip(a)),i[u.mime]&&t.dispInlineRegex.test(u.mime)&&(n.stopImmediatePropagation(),l=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+p.i18n("nowLoading")+'</span><span class="elfinder-spinner"></span></div>').appendTo(t.info.find(".elfinder-quicklook-info")),c=e('<div class="elfinder-quicklook-info-progress"></div>').appendTo(l),s=e("<img/>").hide().appendTo(r).on("load",function(){v(),g()}).on("error",function(){l.remove()}),d=p.openUrl(u.hash,!1,function(e){s.attr("src",e)},{progressBar:c}),r.one("change",function(){d&&d.state&&"pending"===d.state()&&d.reject()}),u.width&&u.height?g():u.size>o&&(f=p.request({data:{cmd:"dim",target:u.hash},preventDefault:!0}).done(function(e){if(e.dim){var t=e.dim.split("x");u.width=t[0],u.height=t[1],m(t),g()}})))})},function(t){var n=t.fm,i="image/tiff",a=t.preview;window.Worker&&window.Uint8Array&&a.on(t.evUpdate,function(o){var r,s,l,c,d,p=o.file,u=function(e){c&&c.terminate(),r.remove(),n.debug("error",e)},h=function(e){var t=n.file(p.hash);t.width=e[0],t.height=e[1]};p.mime===i&&(o.stopImmediatePropagation(),r=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+n.i18n("nowLoading")+'</span><span class="elfinder-spinner"></span></div>').appendTo(t.info.find(".elfinder-quicklook-info")),s=e('<div class="elfinder-quicklook-info-progress"></div>').appendTo(r),a.one("change",function(){c&&c.terminate(),r.remove()}),d=n.getContents(p.hash,"arraybuffer",{progressBar:s}).done(function(i){if(i){l=e("<div></div>").css({width:"100%",height:"100%"
23
+ }).hide().appendTo(a);try{c=n.getWorker(),c.onmessage=function(n){var i,o,s,d,u=n.data;c&&c.terminate(),i=document.createElement("canvas"),o=i.getContext("2d"),i.width=u.width,i.height=u.height,s=o.createImageData(u.width,u.height),s.data.set(new Uint8Array(u.image)),o.putImageData(s,0,0),l.append(i).show(),r.remove(),d=(u.width/u.height).toFixed(2),a.on("changesize",function(){var t,n,o=parseInt(a.width()),r=parseInt(a.height());d<(o/r).toFixed(2)?(n=r,t=Math.floor(n*d)):(t=o,n=Math.floor(t/d)),e(i).width(t).height(n).css("margin-top",n<r?Math.floor((r-n)/2):0)}).trigger("changesize"),p.width&&p.height||h([u.width,u.height]),t.hideinfo()},c.onerror=u,c.postMessage({scripts:[n.options.cdns.tiff,n.getWorkerUrl("quicklook.tiff.js")],data:{data:i}})}catch(o){u(o)}}else u()}),a.one("change",function(){d&&d.state&&"pending"===d.state()&&d.reject()}))})},function(t){var n,i=t.fm,a=i.arrayFlip(["image/vnd.adobe.photoshop","image/x-photoshop"]),o=t.preview,r=function(e,a,r){try{i.replaceXhrSend(),n.fromURL(e).then(function(e){var n;a.attr("src",e.image.toBase64()),requestAnimationFrame(function(){n=(a.width()/a.height()).toFixed(2),o.on("changesize",function(){var e,t,i=parseInt(o.width()),r=parseInt(o.height());n<(i/r).toFixed(2)?(t=r,e=Math.floor(t*n)):(e=i,t=Math.floor(e/n)),a.width(e).height(t).css("margin-top",t<r?Math.floor((r-t)/2):0)}).trigger("changesize"),r.remove(),t.hideinfo(),a.fadeIn(100)})},function(){r.remove(),a.remove()}),i.restoreXhrSend()}catch(s){i.restoreXhrSend(),r.remove(),a.remove()}};o.on(t.evUpdate,function(s){var l,c,d,p,u,h,f=s.file;a[f.mime]&&i.options.cdns.psd&&!i.UA.ltIE10&&t.dispInlineRegex.test(f.mime)&&(s.stopImmediatePropagation(),c=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+i.i18n("nowLoading")+'</span><span class="elfinder-spinner"></span></div>').appendTo(t.info.find(".elfinder-quicklook-info")),d=e('<div class="elfinder-quicklook-info-progress"></div>').appendTo(c),h=i.openUrl(f.hash,"sameorigin",function(t){t&&(l=e("<img/>").hide().appendTo(o),n?r(t,l,c):(p=window.define,u=window.require,window.require=null,window.define=null,i.loadScript([i.options.cdns.psd],function(){n=require("psd"),p?window.define=p:delete window.define,u?window.require=u:delete window.require,r(t,l,c)})))},{progressBar:d}),o.one("change",function(){h&&h.state&&"pending"===h.state()&&h.reject()}))})},function(t){var n=t.fm,i=n.arrayFlip(["text/html","application/xhtml+xml"]),a=t.preview;a.on(t.evUpdate,function(o){var r,s,l,c=o.file;i[c.mime]&&t.dispInlineRegex.test(c.mime)&&(!t.options.getSizeMax||c.size<=t.options.getSizeMax)&&(o.stopImmediatePropagation(),s=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+n.i18n("nowLoading")+'</span><span class="elfinder-spinner"></span></div>').appendTo(t.info.find(".elfinder-quicklook-info")),l=e('<div class="elfinder-quicklook-info-progress"></div>').appendTo(s),a.one("change",function(){"pending"==r.state()&&r.reject()}).addClass("elfinder-overflow-auto"),r=n.request({data:{cmd:"get",target:c.hash,conv:1,_t:c.ts},options:{type:"get",cache:!0},preventDefault:!0,progressBar:l}).done(function(n){t.hideinfo();var i=e('<iframe class="elfinder-quicklook-preview-html"></iframe>').appendTo(a)[0].contentWindow.document;i.open(),i.write(n.content),i.close()}).always(function(){s.remove()}))})},function(t){var n=t.fm,i=n.arrayFlip(["text/x-markdown"]),a=t.preview,o=null,r=function(n,i){t.hideinfo();var r=e('<iframe class="elfinder-quicklook-preview-html"></iframe>').appendTo(a)[0].contentWindow.document;r.open(),r.write((o.parse||o)(n.content)),r.close(),i.remove()},s=function(e){o=!1,e.remove()};a.on(t.evUpdate,function(l){var c,d,p,u=l.file;i[u.mime]&&n.options.cdns.marked&&o!==!1&&t.dispInlineRegex.test(u.mime)&&(!t.options.getSizeMax||u.size<=t.options.getSizeMax)&&(l.stopImmediatePropagation(),d=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+n.i18n("nowLoading")+'</span><span class="elfinder-spinner"></span></div>').appendTo(t.info.find(".elfinder-quicklook-info")),p=e('<div class="elfinder-quicklook-info-progress"></div>').appendTo(d),a.one("change",function(){"pending"==c.state()&&c.reject()}).addClass("elfinder-overflow-auto"),c=n.request({data:{cmd:"get",target:u.hash,conv:1,_t:u.ts},options:{type:"get",cache:!0},preventDefault:!0,progressBar:p}).done(function(e){o||window.marked?(o||(o=window.marked),r(e,d)):n.loadScript([n.options.cdns.marked],function(t){o=t||window.marked||!1,delete window.marked,o?r(e,d):s(d)},{tryRequire:!0,error:function(){s(d)}})}).fail(function(){s(d)}))})},function(t){if(t.options.viewerjs){var n=t.fm,i=t.preview,a=t.options.viewerjs,o=a.url?n.arrayFlip(a.mimes||[]):[],r=t.window,s=t.navbar,l=function(){s.css("bottom",r.hasClass("elfinder-quicklook-fullscreen")?"30px":"")};a.url&&i.on("update",function(s){var c,d,p,u,h=s.file;!o[h.mime]||"application/pdf"===h.mime&&a.pdfNative&&t.flags.pdfNative||(s.stopImmediatePropagation(),d=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+n.i18n("nowLoading")+'</span><span class="elfinder-spinner"></span></div>').appendTo(t.info.find(".elfinder-quicklook-info")),p=e('<div class="elfinder-quicklook-info-progress"></div>').appendTo(d),u=n.openUrl(h.hash,"sameorigin",function(n){n&&(c=e('<iframe class="elfinder-quicklook-preview-iframe"></iframe>').css("background-color","transparent").on("load",function(){t.hideinfo(),d.remove(),c.css("background-color","#fff")}).on("error",function(){d.remove(),c.remove()}).appendTo(i).attr("src",a.url+"#"+n),r.on("viewchange.viewerjs",l),l(),i.one("change",function(){r.off("viewchange.viewerjs"),d.remove(),c.off("load").remove()}))},{progressBar:p}),i.one("change",function(){u&&u.state&&"pending"===u.state()&&u.reject()}))})}},function(t){var n=t.fm,i="application/pdf",a=t.preview,o=!1,r="";n.UA.Safari&&"mac"===n.OS&&!n.UA.iOS||n.UA.IE||n.UA.Firefox?o=!0:e.each(navigator.plugins,function(t,n){e.each(n,function(e,t){if(t.type===i)return!(o=!0)})}),t.flags.pdfNative=o,o&&("undefined"==typeof t.options.pdfToolbar||t.options.pdfToolbar||(r="#toolbar=0"),a.on(t.evUpdate,function(s){var l,c=s.file;o&&c.mime===i&&t.dispInlineRegex.test(c.mime)&&(s.stopImmediatePropagation(),l=n.openUrl(c.hash,!1,function(i){i&&(t.hideinfo(),t.cover.addClass("elfinder-quicklook-coverbg"),e('<object class="elfinder-quicklook-preview-pdf" data="'+i+r+'" type="application/pdf" ></object>').on("error",function(e){o=!1,t.update(void 0,n.cwd()),t.update(void 0,c)}).appendTo(a))}),a.one("change",function(){l&&l.state&&"pending"===l.state()&&l.reject()}))}))},function(t){var n=t.fm,i="application/x-shockwave-flash",a=t.preview,o=!1;e.each(navigator.plugins,function(t,n){e.each(n,function(e,t){if(t.type===i)return!(o=!0)})}),o&&a.on(t.evUpdate,function(o){var r,s,l=o.file;l.mime===i&&t.dispInlineRegex.test(l.mime)&&(o.stopImmediatePropagation(),s=n.openUrl(l.hash,!1,function(n){n&&(t.hideinfo(),r=e('<embed class="elfinder-quicklook-preview-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="'+n+'" quality="high" type="application/x-shockwave-flash" wmode="transparent" />').appendTo(a))}),a.one("change",function(){s&&s.state&&"pending"===s.state()&&s.reject()}))})},function(t){var n,i,a,o,r,s,l=t.fm,c=t.preview,d={"audio/mpeg":"mp3","audio/mpeg3":"mp3","audio/mp3":"mp3","audio/x-mpeg3":"mp3","audio/x-mp3":"mp3","audio/x-wav":"wav","audio/wav":"wav","audio/x-m4a":"m4a","audio/aac":"m4a","audio/mp4":"m4a","audio/x-mp4":"m4a","audio/ogg":"ogg","audio/webm":"webm","audio/flac":"flac","audio/x-flac":"flac","audio/amr":"amr"},p=t.window,u=t.navbar,h="string"==typeof t.options.mediaControlsList&&t.options.mediaControlsList?' controlsList="'+l.escape(t.options.mediaControlsList)+'"':"",f=function(){u.css("bottom",p.hasClass("elfinder-quicklook-fullscreen")?"50px":"")},m=function(t,i){return e('<audio class="elfinder-quicklook-preview-audio ui-front" controls'+h+' preload="auto" autobuffer><source src="'+t+'" ></source></audio>').on("change",function(e){e.stopPropagation()}).on("error",function(e){n&&n.data("hash")===i&&b()}).data("hash",i).appendTo(c)},g=function(t){var n,i=e.Deferred(),o=e.Deferred().done(function(){var e;e=l.getContents(t,"arraybuffer",{progressBar:s}).done(function(e){try{var t=a.toWAV(new Uint8Array(e));t?i.resolve(URL.createObjectURL(new Blob([t],{type:"audio/x-wav"}))):i.reject()}catch(n){i.reject()}}).fail(function(){i.reject()}),c.one("change",function(){e&&e.state&&"pending"===e.state()&&e.reject()})}).fail(function(){a=!1,i.reject()});return window.TextEncoder&&window.URL&&URL.createObjectURL&&"undefined"==typeof a?(n=window.AMR,delete window.AMR,l.loadScript([l.options.cdns.amr],function(){a=!!window.AMR&&window.AMR,window.AMR=n,o[a?"resolve":"reject"]()},{error:function(){o.reject()}})):o[a?"resolve":"reject"](),i},v=function(e){var t,i=n.data("hash");o&&(t=e.play()),t&&t["catch"]&&t["catch"](function(t){e.paused||n&&n.data("hash")===i&&b()})},b=function(){if(n&&n.parent().length){var e=n[0],t=n.children("source").attr("src");p.off("viewchange.audio");try{e.pause(),n.empty(),t.match(/^blob:/)&&URL.revokeObjectURL(t),e.src="",e.load()}catch(i){}n.remove(),n=null}};c.on(t.evUpdate,function(u){var h,b,y=u.file,w=d[y.mime];d[y.mime]&&t.dispInlineRegex.test(y.mime)&&((h=t.support.audio[w])||"amr"===w)&&(o=t.autoPlay(),i=y.hash,h?(u.stopImmediatePropagation(),r=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+l.i18n("nowLoading")+'</span><span class="elfinder-spinner"></span></div>').appendTo(t.info.find(".elfinder-quicklook-info")),s=e('<div class="elfinder-quicklook-info-progress"></div>').appendTo(r),b=l.openUrl(i,!1,function(e){r.remove(),e?(n=m(e,i),v(n[0]),p.on("viewchange.audio",f),f()):n.remove()},{progressBar:s}),c.one("change",function(){b&&b.state&&"pending"===b.state()&&b.reject()})):l.options.cdns.amr&&"amr"===w&&a!==!1&&(u.stopImmediatePropagation(),r=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+l.i18n("nowLoading")+'</span><span class="elfinder-spinner"></span></div>').appendTo(t.info.find(".elfinder-quicklook-info")),s=e('<div class="elfinder-quicklook-info-progress"></div>').appendTo(r),n=m("",i),g(y.hash).done(function(e){if(r.remove(),i===y.hash){var t=n[0];try{n.children("source").attr("src",e),t.pause(),t.load(),v(t),p.on("viewchange.audio",f),f()}catch(a){URL.revokeObjectURL(e),n.remove()}}else URL.revokeObjectURL(e)}).fail(function(){n.remove()})))}).one("change",b)},function(t){var n,i,a,o,r,s,l,c,d,p,u=t.fm,h=t.preview,f={"video/mp4":"mp4","video/x-m4v":"mp4","video/quicktime":"mp4","video/mpeg":"mpeg","video/ogg":"ogg","application/ogg":"ogg","video/webm":"webm","video/x-matroska":"mkv","video/3gpp":"3gp","application/vnd.apple.mpegurl":"m3u8","application/x-mpegurl":"m3u8","application/dash+xml":"mpd","video/x-flv":"flv","video/x-msvideo":"avi"},m=t.window,g=t.navbar,v="string"==typeof t.options.mediaControlsList&&t.options.mediaControlsList?' controlsList="'+u.escape(t.options.mediaControlsList)+'"':"",b=function(){u.UA.iOS?m.hasClass("elfinder-quicklook-fullscreen")?(h.css("height","-webkit-calc(100% - 50px)"),g._show()):h.css("height",""):g.css("bottom",m.hasClass("elfinder-quicklook-fullscreen")?"50px":"")},y=function(i,a){var r,s=function(e){l>1&&(c&&clearTimeout(c),c=setTimeout(function(){!r&&T(!0)},800))},l=0;o=null,a=a||{},t.hideinfo(),n=e('<video class="elfinder-quicklook-preview-video" controls'+v+' preload="auto" autobuffer playsinline></video>').on("change",function(e){e.stopPropagation()}).on("timeupdate progress",s).on("canplay",function(){r=!0}).data("hash",i.hash),n[0].addEventListener("error",function(e){a.src&&u.convAbsUrl(a.src)===u.convAbsUrl(e.target.src)&&(++l,s())},!0),a.src&&n.append('<source src="'+a.src+'" type="'+i.mime+'"></source><source src="'+a.src+'"></source>'),n.appendTo(h),m.on("viewchange.video",b),b()},w=function(e){var t,a;a=u.openUrl(e.hash,!1,function(a){d.remove(),a&&(y(e),t=new i,t.loadSource(a),t.attachMedia(n[0]),l&&t.on(i.Events.MANIFEST_PARSED,function(){z(n[0])}))},{progressBar:p}),h.one("change",function(){a&&a.state&&"pending"===a.state()&&a.reject()})},x=function(e){var t;t=u.openUrl(e.hash,!1,function(t){var i;d.remove(),t&&(y(e),o=window.dashjs.MediaPlayer().create(),i=o.getDebug(),i.setLogLevel?i.setLogLevel(dashjs.Debug.LOG_LEVEL_FATAL):i.setLogToBrowserConsole&&i.setLogToBrowserConsole(!1),o.initialize(n[0],t,l),o.on("error",function(e){T(!0)}))},{progressBar:p}),h.one("change",function(){t&&t.state&&"pending"===t.state()&&t.reject()})},k=function(e){var t;return r.isSupported()?(t=u.openUrl(e.hash,!1,function(t){if(d.remove(),t){var i=r.createPlayer({type:"flv",url:t});y(e),i.on(r.Events.ERROR,function(){i.destroy(),T(!0)}),i.attachMediaElement(n[0]),i.load(),z(i)}},{progressBar:p}),void h.one("change",function(){t&&t.state&&"pending"===t.state()&&t.reject()})):void(r=!1)},C=function(e){var t;t=u.openUrl(e.hash,!1,function(t){d.remove(),t&&(y(e),n[0].src=t,s(n[0],{src:t}))},{progressBar:p}),h.one("change",function(){t&&t.state&&"pending"===t.state()&&t.reject()})},z=function(e){var t,i=n.data("hash");l&&(t=e.play()),t&&t["catch"]&&t["catch"](function(t){e.paused||n&&n.data("hash")===i&&T(!0)})},T=function(e){if(c&&clearTimeout(c),n&&n.parent().length){var i=n[0];m.off("viewchange.video"),o&&o.reset();try{i.pause(),n.empty(),i.src="",i.load()}catch(a){}n.remove(),n=null}e&&t.info.show()};h.on(t.evUpdate,function(o){var c,m,g=o.file,v=g.mime.toLowerCase(),b=f[v];f[v]&&t.dispInlineRegex.test(g.mime)&&(l=t.autoPlay(),d=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+u.i18n("nowLoading")+'</span><span class="elfinder-spinner"></span></div>'),p=e('<div class="elfinder-quicklook-info-progress"></div>').appendTo(d),t.support.video[b]&&("m3u8"!==b||u.UA.Safari)?(o.stopImmediatePropagation(),d.appendTo(t.info.find(".elfinder-quicklook-info")),m=u.openUrl(g.hash,!1,function(e){d.remove(),e&&(y(g,{src:e}),z(n[0]))},{progressBar:p}),h.one("change",function(){m&&m.state&&"pending"===m.state()&&m.reject()})):i!==!1&&u.options.cdns.hls&&"m3u8"===b?(o.stopImmediatePropagation(),d.appendTo(t.info.find(".elfinder-quicklook-info")),i?w(g):(c=window.Hls,delete window.Hls,u.loadScript([u.options.cdns.hls],function(e){i=e||window.Hls||!1,window.Hls=c,i&&w(g)},{tryRequire:!0,error:function(){i=!1}}))):a!==!1&&u.options.cdns.dash&&"mpd"===b?(o.stopImmediatePropagation(),d.appendTo(t.info.find(".elfinder-quicklook-info")),a?x(g):u.loadScript([u.options.cdns.dash],function(){a=!!window.dashjs,a&&x(g)},{tryRequire:!0,error:function(){a=!1}})):r!==!1&&u.options.cdns.flv&&"flv"===b?(o.stopImmediatePropagation(),d.appendTo(t.info.find(".elfinder-quicklook-info")),r?k(g):(c=window.flvjs,delete window.flvjs,u.loadScript([u.options.cdns.flv],function(e){r=e||window.flvjs||!1,window.flvjs=c,r&&k(g)},{tryRequire:!0,error:function(){r=!1}}))):u.options.cdns.videojs&&(o.stopImmediatePropagation(),d.appendTo(t.info.find(".elfinder-quicklook-info")),s?C(g):u.loadScript([u.options.cdns.videojs+"/video.min.js"],function(e){s=e||window.videojs||!1,s&&C(g)},{tryRequire:!0,error:function(){s=!1}}).loadCss([u.options.cdns.videojs+"/video-js.min.css"])))}).one("change",T)},function(t){var n,i=t.preview,a=[],o=t.window,r=t.navbar;e.each(navigator.plugins,function(t,n){e.each(n,function(e,t){(0===t.type.indexOf("audio/")||0===t.type.indexOf("video/"))&&a.push(t.type)})}),a=t.fm.arrayFlip(a),i.on(t.evUpdate,function(s){var l,c,d,p,u=s.file,h=u.mime,f=function(){r.css("bottom",o.hasClass("elfinder-quicklook-fullscreen")?"50px":"")};a[u.mime]&&t.dispInlineRegex.test(u.mime)&&(s.stopImmediatePropagation(),d=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+fm.i18n("nowLoading")+'</span><span class="elfinder-spinner"></span></div>').appendTo(t.info.find(".elfinder-quicklook-info")),p=e('<div class="elfinder-quicklook-info-progress"></div>').appendTo(d),c=t.fm.openUrl(u.hash,!1,function(a){d.remove(),a&&((l=0===h.indexOf("video/"))&&t.hideinfo(),n=e('<embed src="'+a+'" type="'+h+'" class="elfinder-quicklook-preview-'+(l?"video":"audio")+'"/>').appendTo(i),o.on("viewchange.embed",f),f())},{progressBar:p}),i.one("change",function(){c&&c.state&&"pending"===c.state()&&c.reject()}))}).one("change",function(){n&&n.parent().length&&(o.off("viewchange.embed"),n.remove(),n=null)})},function(t){var n=t.fm,i=n.arrayFlip(["application/zip","application/x-gzip","application/x-tar","application/x-bzip2"]),a=t.preview,o=n.returnBytes(t.options.unzipMaxSize||0),r=!(!n.options.cdns.zlibUnzip||!n.options.cdns.zlibGunzip),s=!!n.options.cdns.bzip2;window.Worker&&window.Uint8Array&&window.DataView&&a.on(t.evUpdate,function(l){var c=l.file,d="application/x-tar"===c.mime,p="application/x-bzip2"===c.mime,u="application/zip"===c.mime||"application/x-gzip"===c.mime;if(i[c.mime]&&(!o||c.size<=o)&&(d||p&&s||u&&r)){var h,f,m,g,v=function(){h=n.getContents(c.hash,"arraybuffer",{progressBar:g}).fail(function(){m.remove()}).done(function(e){var t=function(e){f&&f.terminate(),m.remove(),u?r=!1:p&&(s=!1),n.debug("error",e)};try{f=n.getWorker(),f.onmessage=function(e){f&&f.terminate(),m.remove(),!e.data||e.data.error?new Error(e.data&&e.data.error?e.data.error:""):b(e.data.files)},f.onerror=t,"application/x-tar"===c.mime?f.postMessage({scripts:[n.getWorkerUrl("quicklook.unzip.js")],data:{type:"tar",bin:e}}):"application/zip"===c.mime?f.postMessage({scripts:[n.options.cdns.zlibUnzip,n.getWorkerUrl("quicklook.unzip.js")],data:{type:"zip",bin:e}}):"application/x-gzip"===c.mime?f.postMessage({scripts:[n.options.cdns.zlibGunzip,n.getWorkerUrl("quicklook.unzip.js")],data:{type:"gzip",bin:e}}):"application/x-bzip2"===c.mime&&f.postMessage({scripts:[n.options.cdns.bzip2,n.getWorkerUrl("quicklook.unzip.js")],data:{type:"bzip2",bin:e}})}catch(i){t(i)}})},b=function(i){var o,r,s,l=0;i&&i.length&&(i=e.map(i,function(e){return n.decodeRawString(e)}),i.sort(),r=n.escape(i.join("\n").replace(/\{formatSize\((\d+)\)\}/g,function(e,t){return l+=parseInt(t),n.formatSize(t)})),o="<strong>"+n.escape(c.mime)+"</strong> ("+n.formatSize(c.size)+" / "+n.formatSize(l)+")<hr/>",s=e('<div class="elfinder-quicklook-preview-archive-wrapper">'+o+'<pre class="elfinder-quicklook-preview-text">'+r+"</pre></div>").on("touchstart",function(t){e(this)["scroll"+("ltr"===n.direction?"Right":"Left")]()>5&&(t.originalEvent._preventSwipeX=!0)}).appendTo(a),t.hideinfo()),m.remove()};l.stopImmediatePropagation(),m=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+n.i18n("nowLoading")+'</span><span class="elfinder-spinner"></span></div>').appendTo(t.info.find(".elfinder-quicklook-info")),g=e('<div class="elfinder-quicklook-info-progress"></div>').appendTo(m),a.one("change",function(){"pending"===h.state()&&h.reject(),f&&f.terminate(),m.remove()}),v()}})},function(t){var n,i=t.fm,a=i.arrayFlip(["application/x-rar"]),o=t.preview;window.DataView&&o.on(t.evUpdate,function(r){var s=r.file;if(a[s.mime]&&i.options.cdns.rar&&n!==!1){var l,c,d,p,u,h,f=function(a){if(p)return void l.remove();try{d=n({file:a,type:2,xhrHeaders:i.customHeaders,xhrFields:i.xhrFields},function(n){l.remove();var a,r,c=[];return p||n?void(n&&i.debug("error",n)):(e.each(d.entries,function(){c.push(this.path+(this.size?" ("+i.formatSize(this.size)+")":""))}),void(c.length&&(c=e.map(c,function(e){return i.decodeRawString(e)}),c.sort(),a="<strong>"+i.escape(s.mime)+"</strong> ("+i.formatSize(s.size)+")<hr/>",r=e('<div class="elfinder-quicklook-preview-archive-wrapper">'+a+'<pre class="elfinder-quicklook-preview-text">'+i.escape(c.join("\n"))+"</pre></div>").on("touchstart",function(t){e(this)["scroll"+("ltr"===i.direction?"Right":"Left")]()>5&&(t.originalEvent._preventSwipeX=!0)}).appendTo(o),t.hideinfo())))})}catch(r){l.remove()}},m=function(){n=!1,l.remove()};r.stopImmediatePropagation(),l=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+i.i18n("nowLoading")+'</span><span class="elfinder-spinner"></span></div>').appendTo(t.info.find(".elfinder-quicklook-info")),c=e('<div class="elfinder-quicklook-info-progress"></div>').appendTo(l),o.one("change",function(){d&&(d.abort=!0),l.remove(),p=!0}),h=i.openUrl(s.hash,"sameorigin",function(e){e&&(n?f(e):(window.RarArchive&&(u=window.RarArchive,delete window.RarArchive),i.loadScript([i.options.cdns.rar],function(){i.hasRequire?require(["rar"],function(t){n=t,f(e)},m):(n=window.RarArchive)?(u?window.RarArchive=u:delete window.RarArchive,f(e)):m()},{tryRequire:!0,error:m})))},{progressBar:c,temporary:!0}),o.one("change",function(){h&&h.state&&"pending"===h.state()&&h.reject()})}})},function(t){var n,i=t.fm,a=i.arrayFlip(t.options.sharecadMimes||[]),o=t.preview;t.window;t.options.sharecadMimes.length&&t.addIntegration({title:"ShareCAD.org CAD and 3D-Models viewer",link:"https://sharecad.org/DWGOnlinePlugin"}),o.on(t.evUpdate,function(r){var s=r.file;if(a[s.mime.toLowerCase()]&&i.option("onetimeUrl",s.hash)){var l,c,d;t.window;r.stopImmediatePropagation(),"1"==s.url&&(o.hide(),e('<div class="elfinder-quicklook-info-data"><button class="elfinder-info-button">'+i.i18n("getLink")+"</button></div>").appendTo(t.info.find(".elfinder-quicklook-info")).on("click",function(){var n=e(this);n.html('<span class="elfinder-spinner">'),i.request({data:{cmd:"url",target:s.hash},preventDefault:!0,progressBar:c}).always(function(){n.html("")}).done(function(e){var n=i.file(s.hash);s.url=n.url=e.url||"",s.url&&o.trigger({type:t.evUpdate,file:s,forceUpdate:!0})})})),""!==s.url&&"1"!=s.url&&(o.one("change",function(){l.remove(),n.off("load").remove(),n=null}).addClass("elfinder-overflow-auto"),l=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+i.i18n("nowLoading")+'</span><span class="elfinder-spinner"></span></div>').appendTo(t.info.find(".elfinder-quicklook-info")),c=e('<div class="elfinder-quicklook-info-progress"></div>').appendTo(l),d=i.convAbsUrl(i.url(s.hash)),n=e('<iframe class="elfinder-quicklook-preview-iframe" scrolling="no"></iframe>').css("background-color","transparent").appendTo(o).on("load",function(){t.hideinfo(),l.remove(),t.preview.after(t.info),e(this).css("background-color","#fff").show()}).on("error",function(){l.remove(),t.preview.after(t.info)}).attr("src","//sharecad.org/cadframe/load?url="+encodeURIComponent(d)),t.info.after(t.preview))}})},function(t){var n,i,a,o,r,s=t.fm,l={"application/vnd.google-earth.kml+xml":!0,"application/vnd.google-earth.kmz":!0},c=t.preview;t.options.googleMapsApiKey&&(t.addIntegration({title:"Google Maps",link:"https://www.google.com/intl/"+s.lang.replace("_","-")+"/help/terms_maps.html"}),n=window.google&&google.maps,i=function(e,i,a){var r=t.options.googleMapsOpts.maps;s.forExternalUrl(e.hash,{progressBar:a}).done(function(e){if(e)try{new n.KmlLayer(e,Object.assign({map:new n.Map(i.get(0),r)},t.options.googleMapsOpts.kml)),t.hideinfo()}catch(a){o()}else o()})},a=window.gm_authFailure,o=function(){r=null},r="https://maps.googleapis.com/maps/api/js?key="+t.options.googleMapsApiKey,window.gm_authFailure=function(){o(),a&&a()},c.on(t.evUpdate,function(a){var o=a.file;if(r&&l[o.mime.toLowerCase()]){var d,p,u,h=(t.window,"1"==o.url&&!s.option("onetimeUrl",o.hash));a.stopImmediatePropagation(),d=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+s.i18n("nowLoading")+'</span><span class="elfinder-spinner"></span></div>').appendTo(t.info.find(".elfinder-quicklook-info")),p=e('<div class="elfinder-quicklook-info-progress"></div>').appendTo(d),h&&(c.hide(),e('<div class="elfinder-quicklook-info-data"><button class="elfinder-info-button">'+s.i18n("getLink")+"</button></div>").appendTo(t.info.find(".elfinder-quicklook-info")).on("click",function(){var n=e(this);n.html('<span class="elfinder-spinner">'),s.request({data:{cmd:"url",target:o.hash},preventDefault:!0,progressBar:p}).always(function(){d.remove(),n.html("")}).done(function(e){var n=s.file(o.hash);o.url=n.url=e.url||"",o.url&&c.trigger({type:t.evUpdate,file:o,forceUpdate:!0})})})),""===o.url||h||(u=e('<div style="width:100%;height:100%;"></div>').appendTo(c),c.one("change",function(){u.remove(),u=null}),n?i(o,u,p):s.loadScript([r],function(){n=window.google&&google.maps,n&&i(o,u,p)}))}}))},function(t){var n,i,a=t.fm,o=Object.assign(a.arrayFlip(t.options.googleDocsMimes||[],"g"),a.arrayFlip(t.options.officeOnlineMimes||[],"m")),r=t.preview,s=(t.window,t.navbar),l={g:"docs.google.com/gview?embedded=true&url=",m:"view.officeapps.live.com/op/embed.aspx?wdStartOn=0&src="},c={g:"56px",m:"24px"},d={xls:5242880,xlsb:5242880,xlsx:5242880,xlsm:5242880,other:10485760};t.options.googleDocsMimes.length&&(i=!0,t.addIntegration({title:"Google Docs Viewer",link:"https://docs.google.com/"})),t.options.officeOnlineMimes.length&&(i=!0,t.addIntegration({title:"MS Online Doc Viewer",link:"https://products.office.com/office-online/view-office-documents-online"})),i&&r.on(t.evUpdate,function(i){var p,u,h=i.file;if(h.size<=26214400&&(p=o[h.mime])){var f,m,g,v=t.window,b=function(){s.css("bottom",v.hasClass("elfinder-quicklook-fullscreen")?c[p]:"")},y=a.mimeTypes[h.mime],w="1"==h.url&&!a.option("onetimeUrl",h.hash);"m"===p&&(d[y]&&h.size>d[y]||h.size>d.other)&&(p="g"),w&&(r.hide(),e('<div class="elfinder-quicklook-info-data"><button class="elfinder-info-button">'+a.i18n("getLink")+"</button></div>").appendTo(t.info.find(".elfinder-quicklook-info")).on("click",function(){var n=e(this);n.html('<span class="elfinder-spinner">'),a.request({data:{cmd:"url",target:h.hash},preventDefault:!0}).always(function(){n.html("")}).done(function(e){var n=a.file(h.hash);h.url=n.url=e.url||"",h.url&&r.trigger({type:t.evUpdate,file:h,forceUpdate:!0})})})),""===h.url||w||(i.stopImmediatePropagation(),r.one("change",function(){u&&u.status&&"pending"===u.status()&&u.reject(),v.off("viewchange.googledocs"),f.remove(),n.off("load").remove(),n=null}).addClass("elfinder-overflow-auto"),f=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+a.i18n("nowLoading")+'</span><span class="elfinder-spinner"></span></div>').appendTo(t.info.find(".elfinder-quicklook-info")),m=e('<div class="elfinder-quicklook-info-progress"></div>').appendTo(f),n=e('<iframe class="elfinder-quicklook-preview-iframe"></iframe>').css("background-color","transparent").appendTo(r),u=a.forExternalUrl(h.hash,{progressBar:m}).done(function(i){var a=function(){try{!n||n.attr("src")&&!n.get(0).contentWindow.document||(n.attr("src","https://"+l[p]+encodeURIComponent(i)),g=setTimeout(a,2e3))}catch(e){}};i?(h.ts&&(i+=(i.match(/\?/)?"&":"?")+"_t="+h.ts),n.on("load",function(){g&&clearTimeout(g),t.hideinfo(),f.remove(),t.preview.after(t.info),e(this).css("background-color","#fff").show()}).on("error",function(){g&&clearTimeout(g),f.remove(),t.preview.after(t.info)}),a()):(f.remove(),n.remove())}),v.on("viewchange.googledocs",b),b(),t.info.after(t.preview))}})},function(t){"use strict";var n,i,a=t.fm,o=t.preview,r=parseInt(t.options.textInitialLines)||150,s=parseInt(t.options.prettifyMaxLines)||500,l=function(){c=function(){return!1},i&&(window.PR=i),n=!1},c=function(e){a.options.cdns.prettify?(c=function(e){return setTimeout(function(){p(e)},100),"pending"},window.PR&&(i=window.PR),a.loadScript([a.options.cdns.prettify+(a.options.cdns.prettify.match(/\?/)?"&":"?")+"autorun=false"],function(t){n=t||window.PR,"object"==typeof n?(c=function(){return!0},i?window.PR=i:delete window.PR,d(e)):l()},{tryRequire:!0,error:l})):l()},d=function(e){e&&!e.hasClass("prettyprinted")&&(e.css("cursor","wait"),requestAnimationFrame(function(){n.prettyPrint&&n.prettyPrint(null,e.get(0)),e.css("cursor","")}))},p=function(e){var t=c(e);t===!0&&d(e)};o.on(t.evUpdate,function(i){var l,c,d,u,h=i.file;h.mime;a.mimeIsText(h.mime)&&(!t.options.getSizeMax||h.size<=t.options.getSizeMax)&&n!==!1&&(i.stopImmediatePropagation(),c=e('<div class="elfinder-quicklook-info-data"><span class="elfinder-spinner-text">'+a.i18n("nowLoading")+'</span><span class="elfinder-spinner"></span></div>').appendTo(t.info.find(".elfinder-quicklook-info")),d=e('<div class="elfinder-quicklook-info-progress"></div>').appendTo(c),o.one("change",function(){"pending"==l.state()&&l.reject(),u&&u.remove()}),l=a.request({data:{cmd:"get",target:h.hash,conv:h.encoding||1,_t:h.ts},options:{type:"get",cache:!0},preventDefault:!0,progressBar:d}).done(function(n){var i,l,c,d,u,f=new RegExp("^(data:"+h.mime.replace(/([.+])/g,"\\$1")+";base64,)","i"),m=n.content;"string"==typeof m&&(t.hideinfo(),window.atob&&(u=m.match(f))&&(m=atob(m.substr(u[1].length))),d=m.match(/([^\r\n]{1,100}[\r\n]*)/g),l=d.length-r,l>10?i=d.splice(0,r).join(""):l=0,c=e('<div class="elfinder-quicklook-preview-text-wrapper"><pre class="elfinder-quicklook-preview-text prettyprint"></pre></div>'),l&&c.append(e('<div class="elfinder-quicklook-preview-charsleft"><hr/><span>'+a.i18n("linesLeft",a.toLocaleString(l))+"</span></div>").on("click",function(){var t=c.scrollTop();e(this).remove(),c.children("pre").removeClass("prettyprinted").text(m).scrollTop(t),d.length<=s&&p(c)})),c.children("pre").text(i||m),c.on("touchstart",function(t){e(this)["scroll"+("ltr"===a.direction?"Right":"Left")]()>5&&(t.originalEvent._preventSwipeX=!0)}).appendTo(o),n.toasts&&Array.isArray(n.toasts)&&e.each(n.toasts,function(){this.msg&&a.toast(this)}),p(c))}).always(function(n){var i,r,s;(i=a.getCommand("edit"))&&(s=[],n&&n.encoding&&s.push({value:n.encoding}),s.push({value:"UTF-8"}),r=i.getEncSelect(s),r.on("change",function(){h.encoding=r.val(),a.cache(h,"change"),o.trigger({type:t.evUpdate,file:h,forceUpdate:!0})}),u=e('<div class="elfinder-quicklook-encoding"></div>').append(r),t.window.append(u)),c.remove()}))})}],(i.prototype.commands.reload=function(){"use strict";var t=this,n=!1;this.alwaysEnabled=!0,this.updateOnSelect=!0,this.shortcuts=[{pattern:"ctrl+shift+r f5"}],this.getstate=function(){return 0},this.init=function(){this.fm.bind("search searchend",function(){n="search"==this.type})},this.fm.bind("contextmenu",function(){var n=t.fm;n.options.sync>=1e3&&(t.extra={icon:"accept",node:e("<span></span>").attr({title:n.i18n("autoSync")}).on("click touchstart",function(t){"touchstart"===t.type&&t.originalEvent.touches.length>1||(t.stopPropagation(),t.preventDefault(),e(this).parent().toggleClass("ui-state-disabled",n.options.syncStart).parent().removeClass("ui-state-hover"),n.options.syncStart=!n.options.syncStart,n.autoSync(n.options.syncStart?null:"stop"))}).on("ready",function(){e(this).parent().toggleClass("ui-state-disabled",!n.options.syncStart).css("pointer-events","auto")})})}),this.exec=function(){var t=this.fm;if(!n){var i=t.sync(),a=setTimeout(function(){t.notify({type:"reload",cnt:1,hideCnt:!0}),i.always(function(){t.notify({type:"reload",cnt:-1})})},t.notifyDelay);return i.always(function(){clearTimeout(a),t.trigger("reload")})}e("div.elfinder-toolbar > div."+t.res("class","searchbtn")+" > span.ui-icon-search").click()}}).prototype={forceLoad:!0},i.prototype.commands.rename=function(){"use strict";this.alwaysEnabled=!0,this.syncTitleOnChange=!0;var t=this,n=t.fm,i=function(t,i,a,o){var r,s=i?[a.hash].concat(i):[a.hash],l=s.length,c={};if(n.lockfiles({files:s}),n.isRoot(a)&&!a.netkey){if((r=n.storage("rootNames"))||(r={}),""===o){if(!r[a.hash])return t&&t.reject(),void n.unlockfiles({files:s}).trigger("selectfiles",{files:s});a.name=a._name,a.i18=a._i18,delete r[a.hash],delete a._name,delete a._i18}else"undefined"==typeof a._name&&(a._name=a.name,a._i18=a.i18),a.name=r[a.hash]=o,delete a.i18;return n.storage("rootNames",r),c={changed:[a]},n.updateCache(c),n.change(c),t&&t.resolve(c),void n.unlockfiles({files:s}).trigger("selectfiles",{files:s})}c={cmd:"rename",name:o,target:a.hash},l>1&&(c.targets=i,o.match(/\*/)&&(c.q=o)),n.request({data:c,notify:{type:"rename",cnt:l},navigate:{}}).fail(function(e){var i=n.parseError(e);t&&t.reject(),i&&Array.isArray(i)&&"errRename"===i[0]||n.sync();
24
+ }).done(function(i){var r;i.added&&i.added.length&&1===l&&(i.undo={cmd:"rename",callback:function(){return n.request({data:{cmd:"rename",target:i.added[0].hash,name:a.name},notify:{type:"undo",cnt:1}})}},i.redo={cmd:"rename",callback:function(){return n.request({data:{cmd:"rename",target:a.hash,name:o},notify:{type:"rename",cnt:1}})}}),t&&t.resolve(i),(r=n.cwd().hash)&&r!==a.hash||n.exec("open",e.map(i.added,function(e){return"directory"===e.mime?e.hash:null})[0])}).always(function(){n.unlockfiles({files:s}).trigger("selectfiles",{files:s})})},a=function(e,t){var i,a,o,r=t||n.selected(),s=n.splitFileExtention(e),l=n.file(r[0]),c=n.file(r[1]);return i=s[1]?"."+s[1]:"",s[1]&&"*"===s[0]?(a='"'+n.splitFileExtention(l.name)[0]+i+'", ',a+='"'+n.splitFileExtention(c.name)[0]+i+'"'):s[0].length>1&&("*"===s[0].substr(-1)?(o=s[0].substr(0,s[0].length-1),a='"'+o+l.name+'", ',a+='"'+o+c.name+'"'):"*"===s[0].substr(0,1)&&(o=s[0].substr(1),a='"'+n.splitFileExtention(l.name)[0]+o+i+'", ',a+='"'+n.splitFileExtention(c.name)[0]+o+i+'"')),a||(a='"'+s[0]+"1"+i+'", "'+s[0]+"2"+i+'"'),r.length>2&&(a+=" ..."),a},o=function(){var o,r=n.selected(),s='<input name="type" type="radio" class="elfinder-tabstop">',l=function(t,i){return e('<label class="elfinder-rename-batch-checks">'+n.i18n(i)+"</label>").prepend(t)},c=e('<input type="text" class="ui-corner-all elfinder-tabstop">'),d=e(s),p=e(s),u=e(s),h=e(s),f=e("<div></div>").append(l(d,"plusNumber"),l(p,"asPrefix"),l(u,"asSuffix"),l(h,"changeExtention")),m=e('<div class="elfinder-rename-batch-preview"></div>'),g=e('<div class="elfinder-rename-batch"></div>').append(e('<div class="elfinder-rename-batch-name"></div>').append(c),e('<div class="elfinder-rename-batch-type"></div>').append(f),m),v={title:n.i18n("batchRename"),modal:!0,destroyOnClose:!0,width:Math.min(380,n.getUI().width()-20),buttons:{},open:function(){c.on("input",y).trigger("focus")}},b=function(){var e=c.val(),t=n.splitFileExtention(n.file(r[0]).name)[1];return(""!==e||d.is(":checked"))&&(p.is(":checked")?e+="*":u.is(":checked")?e="*"+e+"."+t:h.is(":checked")?e="*."+e:t&&(e+="."+t)),e},y=function(){var e=b();""!==e?m.html(n.i18n(["renameMultiple",r.length,a(e)])):m.empty()},w=f.find("input:radio").on("change",y);v.buttons[n.i18n("btnApply")]=function(){var e,t,a=b();""!==a&&(o.elfinderdialog("close"),t=r,e=n.file(t.shift()),i(void 0,t,e,a))},v.buttons[n.i18n("btnCancel")]=function(){o.elfinderdialog("close")},e.fn.checkboxradio?w.checkboxradio({create:function(e,t){this===d.get(0)&&d.prop("checked",!0).change()}}):f.buttonset({create:function(e,t){d.prop("checked",!0).change()}}),o=t.fmDialog(g,v)};this.noChangeDirOnRemovedCwd=!0,this.shortcuts=[{pattern:"f2"+("mac"==n.OS?" enter":"")},{pattern:"shift+f2",description:"batchRename",callback:function(){n.selected().length>1&&o()}}],this.getstate=function(i){var a,r,s,l,c,d,p=this.files(i),u=p.length;return u?(u>1&&p[0].phash&&(a=p[0].phash,r=n.splitFileExtention(p[0].name)[1].toLowerCase(),s=p[0].mime),1===u&&(d=n.isRoot(p[0])),c=1===u&&(n.cookieEnabled&&d||!p[0].locked)||n.api>2.103&&u===e.grep(p,function(e){return!(l||e.locked||e.phash!==a||n.isRoot(e)||s!==e.mime&&r!==n.splitFileExtention(e.name)[1].toLowerCase())||(l&&(l=!0),!1)}).length?0:-1,!d&&0===c&&n.option("disabledFlip",p[0].hash).rename&&(c=-1),c!==-1&&u>1?t.extra={icon:"preference",node:e("<span></span>").attr({title:n.i18n("batchRename")}).on("click touchstart",function(e){"touchstart"===e.type&&e.originalEvent.touches.length>1||(e.stopPropagation(),e.preventDefault(),n.getUI().trigger("click"),o())})}:delete t.extra,c):-1},this.exec=function(t,o){var r,s=(n.getUI("cwd"),t||!!n.selected().length&&n.selected()||[n.cwd().hash]),l=s.length,c=n.file(s.shift()),d=".elfinder-cwd-filename",p=o||{},u=n.cwd().hash==c.hash,h="navbar"===p._currentType||"files"===p._currentType?p._currentType:u?"navbar":"files",f="files"!==h,m=n[f?"navHash2Elm":"cwdHash2Elm"](c.hash),g=!f&&"list"!=n.storage("view"),v=function(){requestAnimationFrame(function(){x&&x.trigger("blur")})},b=function(){T.is(":hidden")||T.elfinderoverlay("hide").off("click close",A),z.removeClass("ui-front").css("position","").off("unselect."+n.namespace,v),g?C&&C.css("max-height",""):f||z.css("width","").parent("td").css("overflow","")},y=e.Deferred().fail(function(e){var t=x.parent(),i=n.escape(c.i18||c.name);x.off(),g&&(i=i.replace(/([_.])/g,"&#8203;$1")),requestAnimationFrame(function(){f?x.replaceWith(i):t.length?(x.remove(),t.html(i)):m.find(d).html(i)}),e&&n.error(e)}).always(function(){b(),n.unbind("resize",j),n.enable()}),w=function(t){var o=e.trim(x.val()),r=(n.splitFileExtention(o),!0),d=function(){x.off(),b(),f?x.replaceWith(n.escape(o)):C.html(n.escape(o)),i(y,s,c,o)};if(T.is(":hidden")||z.css("z-index",""),""===o){if(!n.isRoot(c))return A();f?x.replaceWith(n.escape(c.name)):C.html(n.escape(c.name))}if(!S&&z.length){if(x.off("blur"),1===l&&o===c.name)return y.reject();if(n.options.validName&&n.options.validName.test)try{r=n.options.validName.test(o)}catch(t){r=!1}if("."===o||".."===o||!r)return S=!0,n.error("directory"===c.mime?"errInvDirname":"errInvName",{modal:!0,close:function(){setTimeout(k,120)}}),!1;if(1===l&&n.fileByName(o,c.phash))return S=!0,n.error(["errExists",o],{modal:!0,close:function(){setTimeout(k,120)}}),!1;1===l?d():(n.confirm({title:"cmdrename",text:["renameMultiple",l,a(o,[c.hash].concat(s))],accept:{label:"btnYes",callback:d},cancel:{label:"btnCancel",callback:function(){setTimeout(function(){S=!0,k()},120)}}}),setTimeout(function(){n.trigger("unselectfiles",{files:n.selected()}).trigger("selectfiles",{files:[c.hash].concat(s)})},120))}},x=e(g?"<textarea></textarea>":'<input type="text"/>').on("keyup text",function(){g?(this.style.height="1px",this.style.height=this.scrollHeight+"px"):r&&(this.style.width=r+"px",this.scrollWidth>r&&(this.style.width=this.scrollWidth+10+"px"))}).on("keydown",function(t){t.stopImmediatePropagation(),t.keyCode==e.ui.keyCode.ESCAPE?y.reject():t.keyCode==e.ui.keyCode.ENTER&&(t.preventDefault(),x.trigger("blur"))}).on("mousedown click dblclick",function(e){e.stopPropagation(),"dblclick"===e.type&&e.preventDefault()}).on("blur",w).on("dragenter dragleave dragover drop",function(e){e.stopPropagation()}),k=function(){var e=n.splitFileExtention(x.val())[0];S||!n.UA.Mobile||n.UA.iOS||(T.on("click close",A).elfinderoverlay("show"),z.css("z-index",T.css("z-index")+1)),!n.enabled()&&n.enable(),S&&(S=!1,x.on("blur",w)),x.trigger("focus").trigger("select"),x[0].setSelectionRange&&x[0].setSelectionRange(0,e.length)},C=f?m.contents().filter(function(){return 3==this.nodeType&&e(this).parent().attr("id")===n.navHash2Id(c.hash)}):m.find(d),z=C.parent(),T=n.getUI("overlay"),A=function(e){T.is(":hidden")||z.css("z-index",""),S||(y.reject(),e&&(e.stopPropagation(),e.preventDefault()))},j=function(){m.trigger("scrolltoview",{blink:!1})},S=!1;return z.addClass("ui-front").css("position","relative").on("unselect."+n.namespace,v),n.bind("resize",j),f?C.replaceWith(x.val(c.name)):(g?C.css("max-height","none"):f||(r=z.width(),z.width(r-15).parent("td").css("overflow","visible")),C.empty().append(x.val(c.name))),l>1&&n.api<=2.103?y.reject():c&&C.length?c.locked&&!n.isRoot(c)?y.reject(["errLocked",c.name]):(n.one("select",function(){x.parent().length&&c&&e.inArray(c.hash,n.selected())===-1&&x.trigger("blur")}),x.trigger("keyup"),k(),y):y.reject("errCmdParams",this.title)},n.bind("select contextmenucreate closecontextmenu",function(e){var i,a=(e.data?e.data.selected||e.data.targets:null)||n.selected();a&&1===a.length&&(i=n.file(a[0]))&&n.isRoot(i)?t.title=n.i18n("kindAlias")+" ("+n.i18n("preference")+")":t.title=n.i18n("cmdrename"),"closecontextmenu"!==e.type?t.update(void 0,t.title):requestAnimationFrame(function(){t.update(void 0,t.title)})}).remove(function(t){var i;t.data&&t.data.removed&&(i=n.storage("rootNames"))&&(e.each(t.data.removed,function(e,t){i[t]&&delete i[t]}),n.storage("rootNames",i))})},i.prototype.commands.resize=function(){"use strict";var t=this.fm,n=0,i=function(t,n,i){var a=[{x:t/2,y:n/2},{x:-t/2,y:n/2},{x:-t/2,y:-n/2},{x:t/2,y:-n/2}],o=[],r={x:Number.MAX_VALUE,y:Number.MAX_VALUE},s={x:Number.MIN_VALUE,y:Number.MIN_VALUE};return e.each(a,function(e,t){o.push({x:t.x*Math.cos(i)-t.y*Math.sin(i),y:t.x*Math.sin(i)+t.y*Math.cos(i)})}),e.each(o,function(e,t){r.x=Math.min(r.x,t.x),r.y=Math.min(r.y,t.y),s.x=Math.max(s.x,t.x),s.y=Math.max(s.y,t.y)}),{width:s.x-r.x,height:s.y-r.y}};this.updateOnSelect=!1,this.getstate=function(){var e=t.selectedFiles();return 1==e.length&&e[0].read&&e[0].write&&e[0].mime.indexOf("image/")!==-1?0:-1},this.resizeRequest=function(n,i,a){var o=i||t.file(n.target),r=(o?o.tmb:null,t.isCommandEnabled("resize",n.target));if(r&&(!o||o&&o.read&&o.write&&o.mime.indexOf("image/")!==-1))return t.request({data:Object.assign(n,{cmd:"resize"}),notify:{type:"resize",cnt:1}}).fail(function(e){a&&a.reject(e)}).done(function(){n.quality&&t.storage("jpgQuality",n.quality===t.option("jpgQuality")?null:n.quality),a&&a.resolve()});var s;return s=o?o.mime.indexOf("image/")===-1?["errResize",o.name,"errUsupportType"]:["errResize",o.name,"errPerm"]:["errResize",n.target,"errPerm"],a?a.reject(s):t.error(s),e.Deferred().reject(s)},this.exec=function(a){var o,r,s,l,c=this,d=this.files(a),p=e.Deferred(),u=t.api>1,h=this.options,f=650,m=t.getUI(),g=e().controlgroup?"controlgroup":"buttonset",v="undefined"==typeof h.grid8px||"disable"!==h.grid8px,b=Array.isArray(h.presetSize)?h.presetSize:[],y="elfinder-dialog-active",w=t.res("class","editing"),x=function(a,o,r){var d,x,k,C,z,T="image/jpeg"===a.mime,A=e('<div class="elfinder-resize-container"></div>'),j='<input type="number" class="ui-corner-all"/>',S='<div class="elfinder-resize-row"></div>',O='<div class="elfinder-resize-label"></div>',I=null,M=!1,E=function(){M=!0},F=function(){M&&(M=!1,D.trigger("change"))},D=e('<div class="elfinder-resize-control"></div>').on("focus","input[type=text],input[type=number]",function(){e(this).trigger("select")}).on("change",function(){I&&cancelAnimationFrame(I),I=requestAnimationFrame(function(){var e,n,a,o,r,s,c,d,p,u,h,f;at&&!M&&(a=at.data("canvas"))&&(e=D.children("div.elfinder-resize-control-panel:visible"),n=e.find("input.elfinder-resize-quality"),n.is(":visible")&&(o=at.data("ctx"),r=at.get(0),e.hasClass("elfinder-resize-uiresize")?(d=a.width=X.val(),p=a.height=J.val(),o.drawImage(r,0,0,d,p)):e.hasClass("elfinder-resize-uicrop")?(s=G.val(),c=Y.val(),d=Q.val(),p=Z.val(),a.width=d,a.height=p,o.drawImage(r,s,c,d,p,0,0,d,p)):(u=te.val(),h=te.val()*Math.PI/180,f=i(fe,me,h),d=a.width=f.width,p=a.height=f.height,o.save(),u%90!==0&&(o.fillStyle=de.val()||"#FFF",o.fillRect(0,0,d,p)),o.translate(d/2,p/2),o.rotate(h),o.drawImage(r,-r.width/2,-r.height/2,fe,me),o.restore()),a.toBlob(function(e){e&&(l=e.size,n.next("span").text(" ("+t.formatSize(e.size)+")"))},"image/jpeg",Math.max(Math.min(n.val(),100),1)/100)))})}).on("mouseup","input",function(t){e(t.target).trigger("change")}),U=e('<div class="elfinder-resize-preview"></div>').on("touchmove",function(t){e(t.target).hasClass("touch-punch")&&(t.stopPropagation(),t.preventDefault())}),P=e('<div class="elfinder-resize-loading">'+t.i18n("ntfloadimg")+"</div>"),q=e('<div class="elfinder-resize-handle touch-punch"></div>'),R=e('<div class="elfinder-resize-handle touch-punch"></div>'),H=e('<div class="elfinder-resize-uiresize elfinder-resize-control-panel"></div>'),_=e('<div class="elfinder-resize-uicrop elfinder-resize-control-panel"></div>'),N=e('<div class="elfinder-resize-rotate elfinder-resize-control-panel"></div>'),L=e("<button></button>").attr("title",t.i18n("rotate-cw")).append(e('<span class="elfinder-button-icon elfinder-button-icon-rotate-l"></span>')),W=e("<button></button>").attr("title",t.i18n("rotate-ccw")).append(e('<span class="elfinder-button-icon elfinder-button-icon-rotate-r"></span>')),B=e("<span ></span>"),$=e('<button class="elfinder-resize-reset">').text(t.i18n("reset")).on("click",function(){We()}).button({icons:{primary:"ui-icon-arrowrefresh-1-n"},text:!1}),V=e('<div class="elfinder-resize-type"></div>').append('<input type="radio" name="type" id="'+o+'-resize" value="resize" checked="checked" /><label for="'+o+'-resize">'+t.i18n("resize")+"</label>",'<input class="api2" type="radio" name="type" id="'+o+'-crop" value="crop" /><label class="api2" for="'+o+'-crop">'+t.i18n("crop")+"</label>",'<input class="api2" type="radio" name="type" id="'+o+'-rotate" value="rotate" /><label class="api2" for="'+o+'-rotate">'+t.i18n("rotate")+"</label>"),K="resize",X=(V[g]()[g]("disable").find("input").on("change",function(){K=e(this).val(),We(),Ke(!0),Xe(!0),Je(!0),"resize"==K?(H.show(),N.hide(),_.hide(),Ke(),T&&Ae.insertAfter(H.find(".elfinder-resize-grid8"))):"crop"==K?(N.hide(),H.hide(),_.show(),Xe(),T&&Ae.insertAfter(_.find(".elfinder-resize-grid8"))):"rotate"==K&&(H.hide(),_.hide(),N.show(),Je())}),e(j).on("change",function(){var e=Le(parseInt(X.val())),t=Le(ge?e/ue:parseInt(J.val()));e>0&&t>0&&(Be.updateView(e,t),X.val(e),J.val(t))}).addClass("elfinder-focus")),J=e(j).on("change",function(){var e=Le(parseInt(J.val())),t=Le(ge?e*ue:parseInt(X.val()));t>0&&e>0&&(Be.updateView(t,e),X.val(t),J.val(e))}),G=e(j).on("change",function(){$e.updateView()}),Y=e(j).on("change",function(){$e.updateView()}),Q=e(j).on("change",function(){$e.updateView("w")}),Z=e(j).on("change",function(){$e.updateView("h")}),ee=T&&u?e(j).val(t.storage("jpgQuality")>0?t.storage("jpgQuality"):t.option("jpgQuality")).addClass("elfinder-resize-quality").attr("min","1").attr("max","100").attr("title","1 - 100").on("blur",function(){var e=Math.min(100,Math.max(1,parseInt(this.value)));D.find("input.elfinder-resize-quality").val(e)}):null,te=e('<input type="number" class="ui-corner-all" maxlength="3" value="0" />').on("change",function(){Ve.update()}),ne=e('<div class="elfinder-resize-rotate-slider touch-punch"></div>').slider({min:0,max:360,value:te.val(),animate:!0,start:E,stop:F,change:function(e,t){t.value!=ne.slider("value")&&Ve.update(t.value)},slide:function(e,t){Ve.update(t.value,!1)}}).find(".ui-slider-handle").addClass("elfinder-tabstop").off("keydown").on("keydown",function(t){t.keyCode!=e.ui.keyCode.LEFT&&t.keyCode!=e.ui.keyCode.RIGHT||(t.stopPropagation(),t.preventDefault(),Ve.update(Number(te.val())+(t.keyCode==e.ui.keyCode.RIGHT?1:-1),!1))}).end(),ie={},ae=function(e){var t,n,i,a,o,r,s;try{t=ie[Math.round(e.offsetX)][Math.round(e.offsetY)]}catch(e){}t&&(n=t[0],i=t[1],a=t[2],o=t[3],r=t[4],s=t[5],re(n,i,a,"click"===e.type))},oe=function(t){re(e(this).css("backgroundColor"),"","","click"===t.type)},re=function(t,n,i,a){var o,r,s;"string"==typeof t&&(n="",t&&(o=e("<span>").css("backgroundColor",t).css("backgroundColor"))&&(r=o.match(/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i))&&(t=Number(r[1]),n=Number(r[2]),i=Number(r[3]))),s=""===n?t:"#"+se(t,n,i),de.val(s).css({backgroundColor:s,backgroundImage:"none",color:t+n+i<384?"#fff":"#000"}),U.css("backgroundColor",s),a&&(Ne.off(".picker").removeClass("elfinder-resize-picking"),pe.off(".picker").removeClass("elfinder-resize-picking"))},se=function(t,n,i){return e.map([t,n,i],function(e){return("0"+parseInt(e).toString(16)).slice(-2)}).join("")},le=e("<button>").text(t.i18n("colorPicker")).on("click",function(){Ne.on("mousemove.picker click.picker",ae).addClass("elfinder-resize-picking"),pe.on("mousemove.picker click.picker","span",oe).addClass("elfinder-resize-picking")}).button({icons:{primary:"ui-icon-pin-s"},text:!1}),ce=e("<button>").text(t.i18n("reset")).on("click",function(){re("","","",!0)}).button({icons:{primary:"ui-icon-arrowrefresh-1-n"},text:!1}),de=e('<input class="ui-corner-all elfinder-resize-bg" type="text">').on("focus",function(){e(this).attr("style","")}).on("blur",function(){re(e(this).val())}),pe=e('<div class="elfinder-resize-pallet">').on("click","span",function(){re(e(this).css("backgroundColor"))}),ue=1,he=1,fe=0,me=0,ge=!0,ve=!1,be=0,ye=0,we=0,xe=0,ke=0,Ce=!!T&&v,ze=e("<button>").html(t.i18n("aspectRatio")).on("click",function(){ge=!ge,ze.button("option",{icons:{primary:ge?"ui-icon-locked":"ui-icon-unlocked"}}),Be.fixHeight(),q.resizable("option","aspectRatio",ge).data("uiResizable")._aspectRatio=ge}).button({icons:{primary:ge?"ui-icon-locked":"ui-icon-unlocked"},text:!1}),Te=e("<button>").html(t.i18n("aspectRatio")).on("click",function(){ve=!ve,Te.button("option",{icons:{primary:ve?"ui-icon-locked":"ui-icon-unlocked"}}),R.resizable("option","aspectRatio",ve).data("uiResizable")._aspectRatio=ve}).button({icons:{primary:ve?"ui-icon-locked":"ui-icon-unlocked"},text:!1}),Ae=e("<button>").html(t.i18n(Ce?"enabled":"disabled")).toggleClass("ui-state-active",Ce).on("click",function(){Ce=!Ce,Ae.html(t.i18n(Ce?"enabled":"disabled")).toggleClass("ui-state-active",Ce),je()}).button(),je=function(){var t=Ce?8:1;e.each([X,J,Q,Z,G,Y],function(){this.attr("step",t)}),Ce&&(X.val(Le(X.val())),J.val(Le(J.val())),Q.val(Le(Q.val())),Z.val(Le(Z.val())),G.val(Le(G.val())),Y.val(Le(Y.val())),H.is(":visible")?Be.updateView(X.val(),J.val()):_.is(":visible")&&$e.updateView())},Se=function(){var n,i=function(){de.parent().hide(),pe.hide()};n=Math.min(be,ye)/Math.sqrt(Math.pow(fe,2)+Math.pow(me,2)),we=Math.ceil(fe*n),xe=Math.ceil(me*n),Ne.width(we).height(xe).css("margin-top",(ye-xe)/2+"px").css("margin-left",(be-we)/2+"px"),Ne.is(":visible")&&de.is(":visible")&&("image/png"!==a.mime?(U.css("backgroundColor",de.val()),d=e("<img>"),t.isCORS&&d.attr("crossorigin","use-credentials"),d.on("load",function(){x&&x.width!==we&&Ie()}).on("error",i).attr("src",it)):i())},Oe=function(){Be.updateView(fe,me),Se(),Re.width(qe.width()).height(qe.height()),He.width(qe.width()).height(qe.height()),$e.updateView(),ot()},Ie=function(){if(k){var t,n,i,a,o,r,s,l,c,p,u,h,f,m,g,v,b,y,w,C={},z=[],T=function(e,t,n){var i,a,o,r=Math.max(Math.max(e,t),n),s=Math.min(Math.min(e,t),n);return r===s?i=0:e===r?i=((t-n)/(r-s)*60+360)%360:t===r?i=(n-e)/(r-s)*60+120:n===r&&(i=(e-t)/(r-s)*60+240),a=(r-s)/r,o=(.3*e+.59*t+.11*n)/255,[i,a,o,"hsl"]},A=function(e){return 8*Math.round(e/8)};e:try{n=x.width=Ne.width(),i=x.height=Ne.height(),f=n/fe,k.scale(f,f),k.drawImage(d.get(0),0,0),h=k.getImageData(0,0,n,i).data,m=.1*n,g=.9*n,v=.1*i,b=.9*i;for(var j=0;j<i-1;j++)for(var S=0;S<n-1;S++){if(t=4*S+j*n*4,a=h[t],o=h[t+1],r=h[t+2],s=h[t+3],255!==s){de.parent().hide(),pe.hide();break e}p=T(a,o,r),u=Math.round(p[0]),l=Math.round(100*p[1]),c=Math.round(100*p[2]),ie[S]||(ie[S]={}),ie[S][j]=[a,o,r,u,l,c],(S<m||S>g)&&(j<v||j>b)&&(y=A(a)+","+A(o)+","+A(r),C[y]?++C[y]:C[y]=1)}pe.children(":first").length||(w=1,e.each(C,function(e,t){z.push({c:e,v:t})}),e.each(z.sort(function(e,t){return e.v>t.v?-1:1}),function(){return!(this.v<2||w>10)&&(pe.append(e('<span style="width:20px;height:20px;display:inline-block;background-color:rgb('+this.c+');">')),void++w)}))}catch(O){le.hide(),pe.hide()}}},Me=function(){try{x=document.createElement("canvas"),k=x.getContext("2d")}catch(e){le.hide(),pe.hide()}},Ee=function(){st.on("click","span.elfinder-resize-preset",function(){var t=e(this),n=t.data("s")[0],i=t.data("s")[1],a=fe/me;t.data("s",[i,n]).text(i+"x"+n),fe>n||me>i?fe<=n?n=Le(i*a):me<=i?i=Le(n/a):fe-n>me-i?i=Le(n/a):n=Le(i*a):(n=fe,i=me),X.val(n),J.val(i),Be.updateView(n,i),ot()}),lt.on("click","span.elfinder-resize-preset",function(){var t=e(this),n=t.data("s")[0],i=t.data("s")[1],a=G.val(),o=Y.val();t.data("s",[i,n]).text(i+"x"+n),fe>=n&&me>=i&&(fe-n-a<0&&(a=fe-n),me-i-o<0&&(o=me-i),G.val(a),Y.val(o),Q.val(n),Z.val(i),$e.updateView(),ot())}),lt.children("span.elfinder-resize-preset").each(function(){var t=e(this),n=t.data("s")[0],i=t.data("s")[1];t[fe>=n&&me>=i?"show":"hide"]()})},Fe=null,De=!1,Ue=function(e){var n=t.file(a.hash);n.width=e[0],n.height=e[1]},Pe=function(){var i,o,r;De||(De=!0,Fe&&Fe.state&&"pending"===Fe.state()&&Fe.reject(),t.api>=2.103?0===n&&t.request({data:{cmd:"resize",target:a.hash,degree:0,mode:"rotate"},preventDefault:!0}).done(function(e){n=e.losslessRotate?1:-1,1===n&&te.val()%90===0&&N.children("div.elfinder-resize-quality").hide()}).fail(function(){n=-1}):n=-1,i=qe.get(0),o=a.width&&a.height?{w:a.width,h:a.height}:i.naturalWidth?null:{w:qe.width(),h:qe.height()},o&&qe.removeAttr("width").removeAttr("height"),fe=a.width||i.naturalWidth||i.width||qe.width(),me=a.height||i.naturalHeight||i.height||qe.height(),a.width&&a.height||Ue([fe,me]),o&&qe.width(o.w).height(o.h),C.show(),r=me/fe,r<1&&U.height()>U.width()*r&&U.height(U.width()*r),U.height()>qe.height()+20&&U.height(qe.height()+20),ye=U.height()-(q.outerHeight()-q.height()),P.remove(),ue=fe/me,q.append(qe.show()).show(),X.val(fe),J.val(me),Me(),Ee(),Oe(),V[g]("enable"),D.find("input,select").prop("disabled",!1).filter(":text").on("keydown",function(n){var i;if(n.keyCode==e.ui.keyCode.ENTER)return n.stopPropagation(),n.preventDefault(),i={title:e("input:checked",V).val(),text:"confirmReq",accept:{label:"btnApply",callback:function(){Ye()}},cancel:{label:"btnCancel",callback:function(){e(this).trigger("focus")}}},ct&&(i.buttons=[{label:"btnSaveAs",callback:function(){requestAnimationFrame(Qe)}}]),void t.confirm(i)}).on("keyup",function(){var t=e(this);t.hasClass("elfinder-resize-bg")||requestAnimationFrame(function(){t.val(t.val().replace(/[^0-9]/g,""))})}).filter(":first"),je(),!t.UA.Mobile&&X.trigger("focus"),Ke())},qe=e("<img/>").on("load",Pe).on("error",function(){P.html(t.i18n("ntfsmth")).css("background","transparent")}),Re=e("<div></div>"),He=e("<img/>"),_e=e("<div></div>"),Ne=e('<img class="elfinder-resize-imgrotate" />'),Le=function(e,t){return e=Ce?8*Math.round(e/8):Math.round(e),e=Math.max(0,e),t&&e>t&&(e=Ce?8*Math.floor(t/8):t),e},We=function(){X.val(fe),J.val(me),Be.updateView(fe,me),G.val(0),Y.val(0),Q.val(fe),Z.val(me),$e.updateView(),ot()},Be={update:function(){X.val(Le(qe.width()/he)),J.val(Le(qe.height()/he)),ot()},updateView:function(e,t){e>be||t>ye?e/be>t/ye?(he=be/e,qe.width(be).height(Le(t*he))):(he=ye/t,qe.height(ye).width(Le(e*he))):qe.width(Le(e)).height(Le(t)),he=qe.width()/e,B.text("1 : "+(1/he).toFixed(2)),Be.updateHandle()},updateHandle:function(){q.width(qe.width()).height(qe.height())},fixHeight:function(){var e,t;ge&&(e=X.val(),t=Le(e/ue),Be.updateView(e,t),J.val(t))}},$e={update:function(e){G.val(Le((R.data("x")||R.position().left)/he,fe)),Y.val(Le((R.data("y")||R.position().top)/he,me)),"xy"!==e&&(Q.val(Le((R.data("w")||R.width())/he,fe-G.val())),Z.val(Le((R.data("h")||R.height())/he,me-Y.val()))),ot()},updateView:function(e){var t,n,i,a,o;G.val(Le(G.val(),fe-(Ce?8:1))),Y.val(Le(Y.val(),me-(Ce?8:1))),Q.val(Le(Q.val(),fe-G.val())),Z.val(Le(Z.val(),me-Y.val())),ve&&(t=_e.width()/_e.height(),"w"===e?Z.val(Le(parseInt(Q.val())/t)):"h"===e&&Q.val(Le(parseInt(Z.val())*t))),n=Math.round(parseInt(G.val())*he),i=Math.round(parseInt(Y.val())*he),"xy"!==e?(a=Math.round(parseInt(Q.val())*he),o=Math.round(parseInt(Z.val())*he)):(a=R.data("w"),o=R.data("h")),R.data({x:n,y:i,w:a,h:o}).width(a).height(o).css({left:n,top:i}),_e.width(a).height(o)},resize_update:function(e,t){R.data({x:t.position.left,y:t.position.top,w:t.size.width,h:t.size.height}),$e.update(),$e.updateView()},drag_update:function(e,t){R.data({x:t.position.left,y:t.position.top}),$e.update("xy")}},Ve={mouseStartAngle:0,imageStartAngle:0,imageBeingRotated:!1,setQuality:function(){N.children("div.elfinder-resize-quality")[n>0&&te.val()%90===0?"hide":"show"]()},update:function(e,n){"undefined"==typeof e&&(ke=e=parseInt(te.val())),"undefined"==typeof n&&(n=!0),!n||t.UA.Opera||t.UA.ltIE8?Ne.rotate(e):Ne.animate({rotate:e+"deg"}),e%=360,e<0&&(e+=360),te.val(parseInt(e)),ne.slider("value",te.val()),Ve.setQuality()},execute:function(e){if(Ve.imageBeingRotated){var t=Ve.getCenter(Ne),n=e.originalEvent.touches?e.originalEvent.touches[0]:e,i=n.pageX-t[0],a=n.pageY-t[1],o=Math.atan2(a,i),r=o-Ve.mouseStartAngle+Ve.imageStartAngle;return r=Math.round(180*parseFloat(r)/Math.PI),e.shiftKey&&(r=15*Math.round((r+6)/15)),Ne.rotate(r),r%=360,r<0&&(r+=360),te.val(r),ne.slider("value",te.val()),Ve.setQuality(),!1}},start:function(t){if(!Ne.hasClass("elfinder-resize-picking")){E(),Ve.imageBeingRotated=!0;var n=Ve.getCenter(Ne),i=t.originalEvent.touches?t.originalEvent.touches[0]:t,a=i.pageX-n[0],o=i.pageY-n[1];return Ve.mouseStartAngle=Math.atan2(o,a),Ve.imageStartAngle=parseFloat(Ne.rotate())*Math.PI/180,e(document).on("mousemove",Ve.execute),Ne.on("touchmove",Ve.execute),!1}},stop:function(t){if(Ve.imageBeingRotated)return e(document).off("mousemove",Ve.execute),Ne.off("touchmove",Ve.execute),requestAnimationFrame(function(){Ve.imageBeingRotated=!1}),F(),!1},getCenter:function(e){var t=Ne.rotate();Ne.rotate(0);var n=Ne.offset(),i=n.left+Ne.width()/2,a=n.top+Ne.height()/2;return Ne.rotate(t),Array(i,a)}},Ke=function(e){e?(q.filter(":ui-resizable").resizable("destroy"),q.hide()):(q.show(),q.resizable({alsoResize:qe,aspectRatio:ge,resize:Be.update,start:E,stop:function(e){Be.fixHeight,Be.updateView(X.val(),J.val()),F()}}),rt())},Xe=function(e){e?(R.filter(":ui-resizable").resizable("destroy").filter(":ui-draggable").draggable("destroy"),Re.hide()):(Re.show(),R.resizable({containment:Re,aspectRatio:ve,resize:$e.resize_update,start:E,stop:F,handles:"all"}).draggable({handle:_e,containment:He,drag:$e.drag_update,start:E,stop:function(){$e.updateView("xy"),F()}}),rt(),$e.update())},Je=function(e){e?Ne.hide():(Ne.show(),rt())},Ge=function(){var e,n,i,a,o,r,c="";if("resize"==K)e=parseInt(X.val())||0,n=parseInt(J.val())||0;else if("crop"==K)e=parseInt(Q.val())||0,n=parseInt(Z.val())||0,i=parseInt(G.val())||0,a=parseInt(Y.val())||0;else if("rotate"==K){if(e=fe,n=me,o=parseInt(te.val())||0,o<0||o>360)return t.error("Invalid rotate degree"),!1;if(0==o||360==o)return t.error("errResizeNoChange"),!1;c=de.val()}if(r=ee?parseInt(ee.val()):0,"rotate"!=K){if(e<=0||n<=0)return t.error("Invalid image size"),!1;if(e==fe&&n==me&&parseInt(s/1e3)===parseInt(l/1e3))return t.error("errResizeNoChange"),!1}return{w:e,h:n,x:i,y:a,d:o,q:r,b:c}},Ye=function(){var e;(e=Ge())&&(A.elfinderdialog("close"),c.resizeRequest({target:a.hash,width:e.w,height:e.h,x:e.x,y:e.y,degree:e.d,quality:e.q,bg:e.b,mode:K},a,p))},Qe=function(){var n,i=function(){n.addClass(w).fadeIn(function(){z.addClass(y)}),t.disable()},o=function(){c.mime=a.mime,c.prefix=a.name.replace(/ \d+(\.[^.]+)?$/,"$1"),c.requestCmd="mkfile",c.nextAction={},c.data={target:a.phash},e.proxy(t.res("mixin","make"),c)().done(function(o){var r,s;o.added&&o.added.length?(r=o.added[0].hash,s=t.api<2.1032?t.url(a.hash,{async:!0,temporary:!0}):null,e.when(s).done(function(e){t.request({options:{type:"post"},data:{cmd:"put",target:r,encoding:s?"scheme":"hash",content:s?t.convAbsUrl(e):a.hash},notify:{type:"copy",cnt:1},syncOnFail:!0}).fail(i).done(function(e){e=t.normalize(e),t.updateCache(e),a=t.file(r),e.changed&&e.changed.length&&t.change(e),z.show().find(".elfinder-dialog-title").html(t.escape(a.name)),Ye(),n.fadeIn()})}).fail(i)):i()}).fail(i).always(function(){delete c.mime,delete c.prefix,delete c.nextAction,delete c.data}),t.trigger("unselectfiles",{files:[a.hash]})},r=null;Ge()&&(n=m.children("."+c.dialogClass+":visible").removeClass(w).fadeOut(),z.removeClass(y),t.enable(),t.searchStatus.state<2&&a.phash!==t.cwd().hash&&(r=t.exec("open",[a.phash],{thash:a.phash})),e.when([r]).done(function(){r?t.one("cwdrender",o):o()}).fail(i))},Ze={},et="elfinder-resize-handle-hline",tt="elfinder-resize-handle-vline",nt="elfinder-resize-handle-point",it=r,at=ee?e("<img>").attr("crossorigin",t.isCORS?"use-credentials":"").attr("src",it).on("load",function(){try{var e=document.createElement("canvas");at.data("canvas",e).data("ctx",e.getContext("2d")),ot()}catch(t){at.removeData("canvas").removeData("ctx")}}):null,ot=function(){D.find("input.elfinder-resize-quality:visible").trigger("change")},rt=function(n){if(!z.hasClass("elfinder-dialog-minimized")&&!z.is(":hidden")){st.hide(),lt.hide();var i,a,o,r=t.options.dialogContained?m:e(window),s=r.height(),l=r.width(),c="auto",d=!0;z.width(Math.min(f,l-30)),U.attr("style",""),fe&&me&&(be=U.width()-(q.outerWidth()-q.width()),ye=U.height()-(q.outerHeight()-q.height()),Be.updateView(fe,me)),a=A.find("div.elfinder-resize-control").width(),o=U.width(),i=A.width()-20,o>i?(U.width(i),d=!1):i-o<a&&(l>s?U.width(i-a-20):(U.css({"float":"none",marginLeft:"auto",marginRight:"auto"}),d=!1)),d&&(c=a),be=U.width()-(q.outerWidth()-q.width()),m.hasClass("elfinder-fullscreen")?z.height()>s&&(s-=2,U.height(s-z.height()+U.height()),z.css("top",0-m.offset().top)):(s-=30,U.height()>s&&U.height(s)),ye=U.height()-(q.outerHeight()-q.height()),fe&&me&&Oe(),qe.height()&&U.height()>qe.height()+20&&(U.height(qe.height()+20),ye=U.height()-(q.outerHeight()-q.height()),Se()),st.css("width",c).show(),lt.css("width",c).show(),lt.children("span.elfinder-resize-preset:visible").length||lt.hide(),A.elfinderdialog("posInit")}},st=function(){var n,i=e('<fieldset class="elfinder-resize-preset-container">').append(e("<legend>").html(t.i18n("presets"))).css("box-sizing","border-box").hide();return e.each(b,function(t,a){2===a.length&&(n=!0,i.append(e('<span class="elfinder-resize-preset"></span>').data("s",a).text(a[0]+"x"+a[1]).button()))}),n?i:e()}(),lt=st.clone(!0),ct=t.uploadMimeCheck(a.mime,a.phash);s=l=a.size,H.append(e(S).append(e(O).text(t.i18n("width")),X),e(S).append(e(O).text(t.i18n("height")),J,e('<div class="elfinder-resize-whctrls">').append(ze,$)),ee?e(S).append(e(O).text(t.i18n("quality")),ee,e("<span></span>")):e(),T?e(S).append(e(O).text(t.i18n("8pxgrid")).addClass("elfinder-resize-grid8"),Ae):e(),e(S).append(e(O).text(t.i18n("scale")),B),e(S).append(st)),u&&(_.append(e(S).append(e(O).text("X"),G),e(S).append(e(O).text("Y")).append(Y),e(S).append(e(O).text(t.i18n("width")),Q),e(S).append(e(O).text(t.i18n("height")),Z,e('<div class="elfinder-resize-whctrls">').append(Te,$.clone(!0))),ee?e(S).append(e(O).text(t.i18n("quality")),ee.clone(!0),e("<span></span>")):e(),T?e(S).append(e(O).text(t.i18n("8pxgrid")).addClass("elfinder-resize-grid8")):e(),e(S).append(lt)),N.append(e(S).addClass("elfinder-resize-degree").append(e(O).text(t.i18n("rotate")),te,e("<span></span>").text(t.i18n("degree")),e("<div></div>").append(L,W)[g]()),e(S).css("height","20px").append(ne),ee?e(S)[n<1?"show":"hide"]().addClass("elfinder-resize-quality").append(e(O).text(t.i18n("quality")),ee.clone(!0),e("<span></span>")):e(),e(S).append(e(O).text(t.i18n("bgcolor")),de,le,ce),e(S).css("height","20px").append(pe)),L.on("click",function(){ke-=90,Ve.update(ke)}),W.on("click",function(){ke+=90,Ve.update(ke)})),A.append(V).on("resize",function(e){e.stopPropagation()}),u?D.append(H,_.hide(),N.hide()):D.append(H),q.append('<div class="'+et+" "+et+'-top"></div>','<div class="'+et+" "+et+'-bottom"></div>','<div class="'+tt+" "+tt+'-left"></div>','<div class="'+tt+" "+tt+'-right"></div>','<div class="'+nt+" "+nt+'-e"></div>','<div class="'+nt+" "+nt+'-se"></div>','<div class="'+nt+" "+nt+'-s"></div>'),U.append(P).append(q.hide()).append(qe.hide()),u&&(R.css("position","absolute").append('<div class="'+et+" "+et+'-top"></div>','<div class="'+et+" "+et+'-bottom"></div>','<div class="'+tt+" "+tt+'-left"></div>','<div class="'+tt+" "+tt+'-right"></div>','<div class="'+nt+" "+nt+'-n"></div>','<div class="'+nt+" "+nt+'-e"></div>','<div class="'+nt+" "+nt+'-s"></div>','<div class="'+nt+" "+nt+'-w"></div>','<div class="'+nt+" "+nt+'-ne"></div>','<div class="'+nt+" "+nt+'-se"></div>','<div class="'+nt+" "+nt+'-sw"></div>','<div class="'+nt+" "+nt+'-nw"></div>'),U.append(Re.css("position","absolute").hide().append(He,R.append(_e))),U.append(Ne.hide())),U.css("overflow","hidden"),A.append(U,D),Ze[t.i18n("btnApply")]=Ye,ct&&(Ze[t.i18n("btnSaveAs")]=function(){requestAnimationFrame(Qe)}),Ze[t.i18n("btnCancel")]=function(){A.elfinderdialog("close")},A.find("input,button").addClass("elfinder-tabstop"),z=c.fmDialog(A,{title:t.escape(a.name),width:f,resizable:!1,buttons:Ze,open:function(){var e=function(e){Fe=t.request({data:{cmd:"dim",target:a.hash,substitute:i?400:""},preventDefault:!0
25
+ }).done(function(e){if(!e.url&&n)A.elfinderdialog("close"),t.error(["errOpen",a.name]);else if(e.dim){var i=e.dim.split("x");return a.width=i[0],a.height=i[1],Ue(i),e.url&&(qe.attr("src",e.url),He.attr("src",e.url),Ne.attr("src",e.url)),Pe()}})},n=!{"image/jpeg":!0,"image/png":!0,"image/gif":!0}[a.mime],i=!(!t.option("substituteImg",a.hash)||!(n||a.size>h.dimSubImgSize)),o=!(!a.width||!a.height);if(C=z.find(".ui-dialog-titlebar .elfinder-titlebar-minimize").hide(),t.bind("resize",rt),qe.attr("src",r).one("error.dimreq",function(){e(!0)}),He.attr("src",r),Ne.attr("src",r),u&&(Ne.on("mousedown touchstart",Ve.start).on("touchend",Ve.stop),z.on("mouseup",Ve.stop)),o&&!i)return Pe();if(a.size>(h.getDimThreshold||0))qe.off("error.dimreq"),e();else if(o)return Pe()},close:function(){u&&(Ne.off("mousedown touchstart",Ve.start).off("touchend",Ve.stop),e(document).off("mouseup",Ve.stop)),t.unbind("resize",rt),e(this).elfinderdialog("destroy")},resize:function(e,t){t&&"off"===t.minimize&&rt()}}).attr("id",o).closest(".ui-dialog").addClass(w),t.UA.ltIE8&&e(".elfinder-dialog").css("filter",""),_e.css({opacity:.2,"background-color":"#fff",position:"absolute"}),R.css("cursor","move"),R.find(".elfinder-resize-handle-point").css({"background-color":"#fff",opacity:.5,"border-color":"#000"}),u||V.find(".api2").remove(),D.find("input,select").prop("disabled",!0),D.find("input.elfinder-resize-quality").next("span").addClass("elfinder-resize-jpgsize").attr("title",t.i18n("roughFileSize"))};return d.length&&d[0].mime.indexOf("image/")!==-1?(o="resize-"+t.namespace+"-"+d[0].hash,r=m.find("#"+o),r.length?(r.elfinderdialog("toTop"),p.resolve()):(t.openUrl(d[0].hash,"sameorigin",function(e){x(d[0],o,e)}),p)):p.reject()}},function(e){var t=function(e,t){var n=0;for(n in t)if("undefined"!=typeof e[t[n]])return t[n];return e[t[n]]="",t[n]};if(e.cssHooks.rotate={get:function(t,n,i){return e(t).rotate()},set:function(t,n){return e(t).rotate(n),n}},e.cssHooks.transform={get:function(e,n,i){var a=t(e.style,["WebkitTransform","MozTransform","OTransform","msTransform","transform"]);return e.style[a]},set:function(e,n){var i=t(e.style,["WebkitTransform","MozTransform","OTransform","msTransform","transform"]);return e.style[i]=n,n}},e.fn.rotate=function(e){var t;return"undefined"==typeof e?window.opera?(t=this.css("transform").match(/rotate\((.*?)\)/),t&&t[1]?Math.round(180*parseFloat(t[1])/Math.PI):0):(t=this.css("transform").match(/rotate\((.*?)\)/),t&&t[1]?parseInt(t[1]):0):(this.css("transform",this.css("transform").replace(/none|rotate\(.*?\)/,"")+"rotate("+parseInt(e)+"deg)"),this)},e.fx.step.rotate=function(t){0==t.state&&(t.start=e(t.elem).rotate(),t.now=t.start),e(t.elem).rotate(t.now)},"undefined"==typeof window.addEventListener&&"undefined"==typeof document.getElementsByClassName){var n=function(e){for(var t=e,n=t.offsetLeft,i=t.offsetTop;t.offsetParent&&(t=t.offsetParent,t==document.body||"static"==t.currentStyle.position);)t!=document.body&&t!=document.documentElement&&(n-=t.scrollLeft,i-=t.scrollTop),n+=t.offsetLeft,i+=t.offsetTop;return{x:n,y:i}},i=function(e){if("static"==e.currentStyle.position){var t=n(e);e.style.position="absolute",e.style.left=t.x+"px",e.style.top=t.y+"px"}},a=function(e,t){var n,a=1,o=1,r=1,s=1;if("undefined"!=typeof e.style.msTransform)return!0;i(e),n=t.match(/rotate\((.*?)\)/);var l=n&&n[1]?parseInt(n[1]):0;l%=360,l<0&&(l=360+l);var c=l*Math.PI/180,d=Math.cos(c),p=Math.sin(c);a*=d,o*=-p,r*=p,s*=d,e.style.filter=(e.style.filter||"").replace(/progid:DXImageTransform\.Microsoft\.Matrix\([^)]*\)/,"")+("progid:DXImageTransform.Microsoft.Matrix(M11="+a+",M12="+o+",M21="+r+",M22="+s+",FilterType='bilinear',sizingMethod='auto expand')");var u=parseInt(e.style.width||e.width||0),h=parseInt(e.style.height||e.height||0);c=l*Math.PI/180;var f=Math.abs(Math.cos(c)),m=Math.abs(Math.sin(c)),g=(u-(u*f+h*m))/2,v=(h-(u*m+h*f))/2;return e.style.marginLeft=Math.floor(g)+"px",e.style.marginTop=Math.floor(v)+"px",!0},o=e.cssHooks.transform.set;e.cssHooks.transform.set=function(e,t){return o.apply(this,[e,t]),a(e,t),t}}}(jQuery),(i.prototype.commands.restore=function(){"use strict";var t=this,n=this.fm,i=0,a=function(t){var o,r=e.Deferred(),s=[],l=[],c=[],d=[];return r._xhrReject=function(){e.each(c,function(){this&&this.reject&&this.reject()}),o&&o._xhrReject()},e.each(t,function(e,t){"directory"===t.mime?s.push(t):l.push(t)}),s.length?(e.each(s,function(e,t){c.push(n.request({data:{cmd:"open",target:t.hash},preventDefault:!0,asNotOpen:!0})),d[e]=t.hash}),e.when.apply(e,c).fail(function(){r.reject()}).done(function(){var t=[];e.each(arguments,function(e,n){n.files&&(n.files.length?t=t.concat(n.files):t.push({hash:"fakefile_"+i++,phash:d[e],mime:"fakefile",name:"fakefile",ts:0}))}),n.cache(t),o=a(t).done(function(e){l=l.concat(e),r.resolve(l)})})):r.resolve(l),r},o=function(t,o,r,s){var l,c,d={},p=[],u=!1,h=[],f=s||{},m=+new Date;n.lockfiles({files:r}),h=e.map(o,function(e){return"directory"===e.mime?e.hash:null}),t.done(function(){h&&n.exec("rm",h,{forceRm:!0,quiet:!0})}).always(function(){n.unlockfiles({files:r})}),l=setTimeout(function(){n.notify({type:"search",id:m,cnt:1,hideCnt:!0,cancel:function(){c&&c._xhrReject(),t.reject()}})},n.notifyDelay),i=0,c=a(o).always(function(){l&&clearTimeout(l),n.notify({type:"search",id:m,cnt:-1,hideCnt:!0})}).fail(function(){t.reject("errRestore","errFileNotFound")}).done(function(i){var a=["errRestore","errFolderNotFound"],o="";i.length?(e.each(i,function(t,i){for(var a,r,s,l=i.phash;l;){if(r=n.trashes[l]){if(!d[r]){if(u)return p.push(i.hash),null;d[r]={},u=!0}s=n.path(i.hash).substr(n.path(l).length).replace(/\\/g,"/"),s=s.replace(/\/[^\/]+?$/,""),""===s&&(s="/"),d[r][s]||(d[r][s]=[]),"fakefile"===i.mime?n.updateCache({removed:[i.hash]}):d[r][s].push(i.hash),(!o||o.length>s.length)&&(o=s);break}a=n.file(l),a?l=a.phash:(l=!1,e.each(n.trashes,function(e){var t=n.file(e),a=n.path(e);if((!t.volumeid||0===i.hash.indexOf(t.volumeid))&&0===n.path(i.hash).indexOf(a))return l=e,!1}))}}),u?e.each(d,function(i,s){var l=Object.keys(s),c=l.length;n.request({data:{cmd:"mkdir",target:i,dirs:l},notify:{type:"chkdir",cnt:c},preventFail:!0}).fail(function(e){t.reject(e),n.unlockfiles({files:r})}).done(function(i){var r,l;(l=i.hashes)?(r=n.getCommand("paste"),r?n.one("mkdirdone",function(){var i=!1;e.each(s,function(e,r){l[e]&&(r.length?n.file(l[e])?(n.clipboard(r,!0),n.exec("paste",[l[e]],{_cmd:"restore",noToast:f.noToast||e!==o}).done(function(e){e&&(e.error||e.warning)&&(i=!0)}).fail(function(){i=!0}).always(function(){--c<1&&(t[i?"reject":"resolve"](),p.length&&n.exec("restore",p))})):t.reject(a):--c<1&&(t.resolve(),p.length&&n.exec("restore",p)))})}):t.reject(["errRestore","errCmdNoSupport","(paste)"])):t.reject(a)})}):t.reject(a)):(t.reject("errFileNotFound"),h&&n.exec("rm",h,{forceRm:!0,quiet:!0}))})};this.restore=o,this.linkedCmds=["copy","paste","mkdir","rm"],this.updateOnSelect=!1,this.init=function(){t=this,n=this.fm},this.getstate=function(t,i){return t=t||n.selected(),t.length&&e.grep(t,function(e){var t=n.file(e);return!(!t||t.locked||n.isRoot(t))}).length==t.length?0:-1},this.exec=function(i,a){var o=e.Deferred().fail(function(e){e&&n.error(e)}),r=t.files(i);return r.length?(e.each(r,function(e,t){return n.isRoot(t)?!o.reject(["errRestore",t.name]):t.locked?!o.reject(["errLocked",t.name]):void 0}),"pending"===o.state()&&this.restore(o,r,i,a),o):o.reject()}}).prototype={forceLoad:!0},i.prototype.commands.rm=function(){"use strict";var t=this,n=this.fm,i='<div class="ui-helper-clearfix elfinder-rm-title"><span class="elfinder-cwd-icon {class} ui-corner-all"></span>{title}<div class="elfinder-rm-desc">{desc}</div></div>',a=function(a,o,s,c,d){var p,u,h,f,m,g,v=o.length,b=n.cwd().hash,y=[],w=n.i18n("calc")+'<span class="elfinder-spinner"></span>';v>1?(f=0,e.each(s,function(e,t){if(!t.size||"unknown"==t.size||"directory"===t.mime)return f="unknown",!1;var n=parseInt(t.size);n>=0&&f>=0&&(f+=n)}),l="unknown"===f,y.push(n.i18n("size")+": "+(l?w:n.formatSize(f))),u=[e(i.replace("{class}","elfinder-cwd-icon-group").replace("{title}","<strong>"+n.i18n("items")+": "+v+"</strong>").replace("{desc}",y.join("<br>")))]):(m=s[0],h=n.tmb(m),l="directory"===m.mime,y.push(n.i18n("size")+": "+(l?w:n.formatSize(m.size))),y.push(n.i18n("modify")+": "+n.formatDate(m)),g=n.escape(m.i18||m.name).replace(/([_.])/g,"&#8203;$1"),u=[e(i.replace("{class}",n.mime2class(m.mime)).replace("{title}","<strong>"+g+"</strong>").replace("{desc}",y.join("<br>")))]),d&&(u=u.concat(d)),u.push(c?"confirmTrash":"confirmRm"),p=n.confirm({title:t.title,text:u,accept:{label:"btnRm",callback:function(){c?t.toTrash(a,o,c):r(a,o)}},cancel:{label:"btnCancel",callback:function(){n.unlockfiles({files:o}),1===o.length&&n.file(o[0]).phash!==b?n.select({selected:o}):n.selectfiles({files:o}),a.reject()}}}),h&&e("<img/>").on("load",function(){p.find(".elfinder-cwd-icon").addClass(h.className).css("background-image","url('"+h.url+"')")}).attr("src",h.url),l&&(l=n.getSize(e.map(s,function(e){return"directory"===e.mime?e.hash:null})).done(function(e){p.find("span.elfinder-spinner").parent().html(n.i18n("size")+": "+e.formated)}).fail(function(){p.find("span.elfinder-spinner").parent().html(n.i18n("size")+": "+n.i18n("unknown"))}).always(function(){l=!1}))},o=function(i,a,o){var r,s,l,c={},d=a.length,p=t.options.toTrashMaxItems,u=[],h=e.Deferred();return d>p?void t.confirm(i,a,t.files(a),null,[n.i18n("tooManyToTrash")]):(e.each(a,function(e,t){var i=n.file(t),a=n.path(t).replace(/\\/g,"/"),o=a.match(/^[^\/]+?(\/(?:[^\/]+?\/)*)[^\/]+?$/);i&&(o&&(o[1]=o[1].replace(/(^\/.*?)\/?$/,"$1"),c[o[1]]||(c[o[1]]=[]),c[o[1]].push(t)),"directory"===i.mime&&u.push(t))}),u.length?(r=n.request({data:{cmd:"size",targets:u},notify:{type:"readdir",cnt:1,hideCnt:!0},preventDefault:!0}).done(function(e){var t=0;e.fileCnt&&(t+=parseInt(e.fileCnt)),e.dirCnt&&(t+=parseInt(e.dirCnt)),h[t>p?"reject":"resolve"]()}).fail(function(){h.reject()}),setTimeout(function(){var e=r&&r.xhr?r.xhr:null;e&&"pending"==e.state()&&(r.syncOnFail(!1),r.reject(),h.reject())},1e3*t.options.infoCheckWait)):h.resolve(),void h.done(function(){s=Object.keys(c),l=s.length,l?n.request({data:{cmd:"mkdir",target:o,dirs:s},notify:{type:"chkdir",cnt:l},preventFail:!0}).fail(function(e){i.reject(e),n.unlockfiles({files:a})}).done(function(t){var o,r,s,d,p=function(t,i,o){var r,s,l,c;e.each(t,function(e,t){Array.isArray(t)&&(h[e]?h[e]=h[e].concat(t):h[e]=t)}),t.sync&&(h.sync=1),t.added&&t.added.length&&(r=function(){var i=[],a=e.map(t.added,function(e){return"directory"===e.mime?e.hash:null});return e.each(t.added,function(t,n){e.inArray(n.phash,a)===-1&&i.push(n.hash)}),n.exec("restore",i,{noToast:!0})},l=function(){return n.request({data:o,notify:{type:"redo",cnt:a.length}})},h.undo?(s=h.undo,h.undo=function(){r(),s()}):h.undo=r,h.redo?(c=h.redo,h.redo=function(){l(),c()}):h.redo=l)},u=["errTrash"],h={},f=function(){return n.ui.notify.children(".elfinder-notify-trash").length};(o=t.hashes)?(s=1/l*100,d=1===l?100:5,r=setTimeout(function(){n.notify({type:"trash",cnt:1,hideCnt:!0,progress:d})},n.notifyDelay),e.each(c,function(t,c){var m,g=n.file(c[0]).phash;o[t]&&(m={cmd:"paste",dst:o[t],targets:c,cut:1},n.request({data:m,preventDefault:!0}).fail(function(e){e&&(u=u.concat(e))}).done(function(e){e=n.normalize(e),n.updateCache(e),p(e,g,m),e.warning&&(u=u.concat(e.warning),delete e.warning),e.removed&&e.removed.length&&n.remove(e),e.added&&e.added.length&&n.add(e),e.changed&&e.changed.length&&n.change(e),n.trigger("paste",e),n.trigger("pastedone"),e.sync&&n.sync()}).always(function(){var t=[],o=2;f()?n.notify({type:"trash",cnt:0,hideCnt:!0,progress:s}):d+=s,--l<1&&(r&&clearTimeout(r),f()&&n.notify({type:"trash",cnt:-1}),n.unlockfiles({files:a}),Object.keys(h).length?(u.length>1&&((h.removed||h.removed.length)&&(t=e.grep(a,function(t){return e.inArray(t,h.removed)===-1})),t.length?(u.length>o&&(o=(n.messages[u[o-1]]||"").indexOf("$")===-1?o:o+1),i.reject(),n.exec("rm",t,{addTexts:u.slice(0,o),forceRm:!0})):n.error(u)),h._noSound=!0,h.undo&&h.redo&&(h.undo={cmd:"trash",callback:h.undo},h.redo={cmd:"trash",callback:h.redo}),i.resolve(h)):i.reject(u))}))})):(i.reject("errFolderNotFound"),n.unlockfiles({files:a}))}):(i.reject(["error","The folder hierarchy to be deleting can not be determined."]),n.unlockfiles({files:a}))}).fail(function(){t.confirm(i,a,t.files(a),null,[n.i18n("tooManyToTrash")])}))},r=function(e,t,i){var a=i?{}:{type:"rm",cnt:t.length};n.request({data:{cmd:"rm",targets:t},notify:a,preventFail:!0}).fail(function(t){e.reject(t)}).done(function(t){(t.error||t.warning)&&(t.sync=!0),e.resolve(t)}).always(function(){n.unlockfiles({files:t})})},s=function(t){var i,a=null;return t&&t.length&&(t.length>1&&2===n.searchStatus.state?(i=n.file(n.root(t[0])).volumeid,e.grep(t,function(e){return 0!==e.indexOf(i)}).length||(a=n.option("trashHash",t[0]))):a=n.option("trashHash",t[0])),a},l=!1;this.confirm=a,this.toTrash=o,this.remove=r,this.syncTitleOnChange=!0,this.updateOnSelect=!1,this.shortcuts=[{pattern:"delete ctrl+backspace shift+delete"}],this.value="rm",this.init=function(){var i=function(i){var a;delete t.extra,t.title=n.i18n("cmd"+t.value),t.className=t.value,t.button&&t.button.children("span.elfinder-button-icon")["trash"===t.value?"addClass":"removeClass"]("elfinder-button-icon-trash"),i&&"cwd"!==i&&(t.state>-1||"navbar"===i)&&"trash"===t.value&&(t.extra={icon:"rm",node:e("<span></span>").attr({title:n.i18n("cmdrm")}).on("ready",function(e,t){a=t.targets}).on("click touchstart",function(e){"touchstart"===e.type&&e.originalEvent.touches.length>1||(e.stopPropagation(),e.preventDefault(),n.getUI().trigger("click"),n.exec("rm",a,{_userAction:!0,forceRm:!0}))})})};t=this,n=this.fm,t.change(function(){i()}),n.bind("contextmenucreate",function(e){i(e.data.type)})},this.getstate=function(t){var i=this.hashes(t),a=function(t){var i=!0;return e.grep(t,function(e){var t;return i=!(!i||!(t=n.file(e))||t.locked||n.isRoot(t))})};return i.length&&a(i).length==i.length?0:-1},this.exec=function(i,a){var o,c=a||{},d=e.Deferred().always(function(){l&&l.state&&"pending"===l.state()&&l.reject()}).fail(function(e){e&&n.error(e)}).done(function(e){!c.quiet&&!e._noSound&&e.removed&&e.removed.length&&n.trigger("playsound",{soundFile:"rm.wav"})}),p=t.files(i),u=p.length,h=null,f=c.addTexts?c.addTexts:null,m=c.forceRm,g=c.quiet;return u?(e.each(p,function(e,t){return n.isRoot(t)?!d.reject(["errRm",t.name,"errPerm"]):t.locked?!d.reject(["errLocked",t.name]):void 0}),"pending"===d.state()&&(o=t.hashes(i),u=p.length,(m||t.event&&t.event.originalEvent&&t.event.originalEvent.shiftKey)&&(h="",t.title=n.i18n("cmdrm")),null===h&&(h=s(o)),n.lockfiles({files:o}),h&&t.options.quickTrash?t.toTrash(d,o,h):g?r(d,o,g):t.confirm(d,o,p,h,f)),d):d.reject()},n.bind("select contextmenucreate closecontextmenu",function(e){var i=(e.data?e.data.selected||e.data.targets:null)||n.selected();i&&i.length&&t.update(void 0,(i?s(i):n.option("trashHash"))?"trash":"rm")})},i.prototype.commands.search=function(){"use strict";this.title="Find files",this.options={ui:"searchbutton"},this.alwaysEnabled=!0,this.updateOnSelect=!1,this.getstate=function(){return 0},this.exec=function(t,n,i,a){var o,r,s=this.fm,l=[],c=a||"",d=s.options.onlyMimes,p=[],u=function(e){return c&&"SearchName"!==c&&"SearchMime"!==c&&(e.type=c),e};return"string"==typeof t&&t?("object"==typeof n&&(i=n.mime||"",n=n.target||""),n=n?n:"",i?(i=e.trim(i).replace(","," ").split(" "),d.length&&(i=e.map(i,function(t){return t=e.trim(t),t&&(e.inArray(t,d)!==-1||e.grep(d,function(e){return 0===t.indexOf(e)}).length)?t:null}))):i=[].concat(d),s.trigger("searchstart",u({query:t,target:n,mimes:i})),!d.length||i.length?""===n&&s.api>=2.1?(r=Object.keys(s.roots).length,e.each(s.roots,function(e,n){l.push(s.request({data:u({cmd:"search",q:t,target:n,mimes:i}),notify:{type:"search",cnt:1,hideCnt:!(r>1)},cancel:!0,preventDone:!0}))})):(l.push(s.request({data:u({cmd:"search",q:t,target:n,mimes:i}),notify:{type:"search",cnt:1,hideCnt:!0},cancel:!0,preventDone:!0})),""!==n&&s.api>=2.1&&Object.keys(s.leafRoots).length&&e.each(s.leafRoots,function(a,r){for(o=a;o;)n===o&&e.each(r,function(){var e=s.file(this);e&&e.volumeid&&p.push(e.volumeid),l.push(s.request({data:u({cmd:"search",q:t,target:this,mimes:i}),notify:{type:"search",cnt:1,hideCnt:!1},cancel:!0,preventDone:!0}))}),o=(s.file(o)||{}).phash})):l=[e.Deferred().resolve({files:[]})],s.searchStatus.mixed=l.length>1&&p,e.when.apply(e,l).done(function(e){var t,n=arguments.length;if(e.warning&&s.error(e.warning),n>1)for(e.files=e.files||[],t=1;t<n;t++)arguments[t].warning&&s.error(arguments[t].warning),arguments[t].files&&e.files.push.apply(e.files,arguments[t].files);e.files&&e.files.length&&s.cache(e.files),s.lazy(function(){s.trigger("search",e)}).then(function(){return s.lazy(function(){s.trigger("searchdone")})}).then(function(){e.sync&&s.sync()})})):(s.getUI("toolbar").find("."+s.res("class","searchbtn")+" :text").trigger("focus"),e.Deferred().reject())}},i.prototype.commands.selectall=function(){"use strict";var t=0;this.fm.bind("select",function(e){t=e.data&&e.data.selectall?-1:0}),this.state=0,this.updateOnSelect=!1,this.getstate=function(){return t},this.exec=function(){return e(document).trigger(e.Event("keydown",{keyCode:65,ctrlKey:!0,shiftKey:!1,altKey:!1,metaKey:!1})),e.Deferred().resolve()}},i.prototype.commands.selectinvert=function(){"use strict";this.updateOnSelect=!1,this.getstate=function(){return 0},this.exec=function(){return e(document).trigger(e.Event("keydown",{keyCode:73,ctrlKey:!0,shiftKey:!0,altKey:!1,metaKey:!1})),e.Deferred().resolve()}},i.prototype.commands.selectnone=function(){"use strict";var t=this.fm,n=-1;t.bind("select",function(e){n=e.data&&e.data.unselectall?-1:0}),this.state=-1,this.updateOnSelect=!1,this.getstate=function(){return n},this.exec=function(){return t.getUI("cwd").trigger("unselectall"),e.Deferred().resolve()}},i.prototype.commands.sort=function(){"use strict";var t=this,n=t.fm,i=function(){t.variants=[],e.each(n.sortRules,function(e,i){if(n.sorters[e]){var a=e===n.sortType?"asc"===n.sortOrder?"n":"s":"";t.variants.push([e,(a?'<span class="ui-icon ui-icon-arrowthick-1-'+a+'"></span>':"")+"&nbsp;"+n.i18n("sort"+e)])}}),t.variants.push("|"),t.variants.push(["stick",(n.sortStickFolders?'<span class="ui-icon ui-icon-check"></span>':"")+"&nbsp;"+n.i18n("sortFoldersFirst")]),n.ui.tree&&null!==n.options.sortAlsoTreeview&&(t.variants.push("|"),t.variants.push(["tree",(n.sortAlsoTreeview?'<span class="ui-icon ui-icon-check"></span>':"")+"&nbsp;"+n.i18n("sortAlsoTreeview")])),a()},a=function(){var t,i,a=n.getUI("contextmenu");a.is(":visible")&&(t=a.find("span.elfinder-button-icon-sort"),i=t.siblings("div.elfinder-contextmenu-sub"),i.find("span.ui-icon").remove(),i.children("div.elfinder-contextsubmenu-item").each(function(){var t,i=e(this).children("span"),a=i.text().trim();a===(o.stick||(o.stick=n.i18n("sortFoldersFirst")))?n.sortStickFolders&&i.prepend('<span class="ui-icon ui-icon-check"></span>'):a===(o.tree||(o.tree=n.i18n("sortAlsoTreeview")))?n.sortAlsoTreeview&&i.prepend('<span class="ui-icon ui-icon-check"></span>'):a===(o[n.sortType]||(o[n.sortType]=n.i18n("sort"+n.sortType)))&&(t="asc"===n.sortOrder?"n":"s",i.prepend('<span class="ui-icon ui-icon-arrowthick-1-'+t+'"></span>'))}))},o={};this.options={ui:"sortbutton"},this.keepContextmenu=!0,n.bind("sortchange",i).bind("sorterupdate",function(){i(),n.getUI().children(".elfinder-button-sort-menu").children(".elfinder-button-menu-item").each(function(){var t=e(this),i=t.attr("rel");t.toggle(!(i&&!n.sorters[i]))})}).bind("cwdrender",function(){var t=e(n.cwd).find("div.elfinder-cwd-wrapper-list table");t.length&&e.each(n.sortRules,function(i,a){var o=t.find("thead tr td.elfinder-cwd-view-th-"+i);if(o.length){var r,s=i==n.sortType,l={type:i,order:s?"asc"==n.sortOrder?"desc":"asc":n.sortOrder};s&&(o.addClass("ui-state-active"),r="asc"==n.sortOrder?"n":"s",e('<span class="ui-icon ui-icon-triangle-1-'+r+'"></span>').appendTo(o)),e(o).on("click",function(t){e(this).data("dragging")||(t.stopPropagation(),n.getUI("cwd").data("longtap")||n.exec("sort",[],l))}).on("mouseenter mouseleave",function(t){e(this).toggleClass("ui-state-hover","mouseenter"===t.type)})}})}),this.getstate=function(){return 0},this.exec=function(t,n){var i=this.fm,a=e.isPlainObject(n)?n:function(){n+="";var e={};return"stick"===n?e.stick=!i.sortStickFolders:"tree"===n?e.tree=!i.sortAlsoTreeview:i.sorters[n]&&(i.sortType===n?e.order="asc"===i.sortOrder?"desc":"asc":e.type=n),e}(),o=Object.assign({type:i.sortType,order:i.sortOrder,stick:i.sortStickFolders,tree:i.sortAlsoTreeview},a);return i.lazy(function(){i.setSort(o.type,o.order,o.stick,o.tree),this.resolve()})}},i.prototype.commands.undo=function(){"use strict";var t=this,n=this.fm,i=function(e){e?(t.title=n.i18n("cmdundo")+" "+n.i18n("cmd"+e.cmd),t.state=0):(t.title=n.i18n("cmdundo"),t.state=-1),t.change()},a=[];this.alwaysEnabled=!0,this.updateOnSelect=!1,this.shortcuts=[{pattern:"ctrl+z"}],this.syncTitleOnChange=!0,this.getstate=function(){return a.length?0:-1},this.setUndo=function(t,o){var r={};t&&e.isPlainObject(t)&&t.cmd&&t.callback&&(Object.assign(r,t),o?(delete o.undo,r.redo=o):n.getCommand("redo").setRedo(null),a.push(r),i(r))},this.exec=function(){var t,o,r=n.getCommand("redo"),s=e.Deferred(),l={};return a.length?(t=a.pop(),t.redo?(Object.assign(l,t.redo),delete t.redo):l=null,s.done(function(){l&&r.setRedo(l,t)}),i(a.length?a[a.length-1]:void 0),o=t.callback(),o&&o.done?o.done(function(){s.resolve()}).fail(function(){s.reject()}):s.resolve(),a.length?this.update(0,a[a.length-1].name):this.update(-1,"")):s.reject(),s},n.bind("exec",function(e){var n=e.data||{};n.opts&&n.opts._userAction&&n.dfrd&&n.dfrd.done&&n.dfrd.done(function(e){e&&e.undo&&e.redo&&(e.undo.redo=e.redo,t.setUndo(e.undo))})})},i.prototype.commands.redo=function(){"use strict";var t=this,n=this.fm,i=function(e){e&&e.callback?(t.title=n.i18n("cmdredo")+" "+n.i18n("cmd"+e.cmd),t.state=0):(t.title=n.i18n("cmdredo"),t.state=-1),t.change()},a=[];this.alwaysEnabled=!0,this.updateOnSelect=!1,this.shortcuts=[{pattern:"shift+ctrl+z ctrl+y"}],this.syncTitleOnChange=!0,this.getstate=function(){return a.length?0:-1},this.setRedo=function(e,t){null===e?(a=[],i()):e&&e.cmd&&e.callback&&(t&&(e.undo=t),a.push(e),i(e))},this.exec=function(){var t,o,r=n.getCommand("undo"),s=e.Deferred(),l={},c={};return a.length?(t=a.pop(),t.undo&&(Object.assign(l,t.undo),Object.assign(c,t),delete c.undo,s.done(function(){r.setUndo(l,c)})),i(a.length?a[a.length-1]:void 0),o=t.callback(),o&&o.done?o.done(function(){s.resolve()}).fail(function(){s.reject()}):s.resolve(),s):s.reject()}},(i.prototype.commands.up=function(){"use strict";this.alwaysEnabled=!0,this.updateOnSelect=!1,this.shortcuts=[{pattern:"ctrl+up"}],this.getstate=function(){return this.fm.cwd().phash?0:-1},this.exec=function(){var t=this.fm,n=t.cwd().hash;return this.fm.cwd().phash?this.fm.exec("open",this.fm.cwd().phash).done(function(){t.one("opendone",function(){t.selectfiles({files:[n]})})}):e.Deferred().reject()}}).prototype={forceLoad:!0},i.prototype.commands.upload=function(){"use strict";var t=this.fm.res("class","hover");this.disableOnSearch=!0,this.updateOnSelect=!1,this.shortcuts=[{pattern:"ctrl+u"}],this.getstate=function(e){var t,n=this.fm,i=e||[n.cwd().hash];return this._disabled||1!=i.length||(t=n.file(i[0])),t&&"directory"==t.mime&&t.write?0:-1},this.exec=function(n){var i,a,o,r,s,l,c,d=this.fm,p=d.cwd().hash,u=function(){var e,t=n&&n instanceof Array?n:null;return(!n||n instanceof Array)&&(t||1!==(e=d.selected()).length||"directory"!==d.file(e[0]).mime?t&&1===t.length&&"directory"===d.file(t[0]).mime||(t=[p]):t=e),t},h=u(),f=h?h[0]:n&&n.target?n.target:null,m=f?d.file(f):d.cwd(),g=function(t){d.upload(t).fail(function(e){w.reject(e)}).done(function(t){var n;d.getUI("cwd");if(w.resolve(t),t&&t.added&&t.added[0]&&!d.ui.notify.children(".elfinder-notify-upload").length){var i=d.findCwdNodes(t.added);i.length?i.trigger("scrolltoview"):(m.hash!==p?n=e("<div></div>").append(e('<button type="button" class="ui-button ui-widget ui-state-default ui-corner-all elfinder-tabstop"><span class="ui-button-text">'+d.i18n("cmdopendir")+"</span></button>").on("mouseenter mouseleave",function(t){e(this).toggleClass("ui-state-hover","mouseenter"==t.type)}).on("click",function(){d.exec("open",f).done(function(){d.one("opendone",function(){d.trigger("selectfiles",{files:e.map(t.added,function(e){return e.hash})})})})})):d.trigger("selectfiles",{files:e.map(t.added,function(e){return e.hash})}),d.toast({msg:d.i18n(["complete",d.i18n("cmdupload")]),extNode:n}))}}).progress(function(){w.notifyWith(this,Array.from(arguments))})},v=function(e){i.elfinderdialog("close"),h&&(e.target=h[0]),g(e)},b=function(){var t=m.hash,n=e.map(d.files(t),function(e){return"directory"===e.mime&&e.write?e:null});return n.length?e('<div class="elfinder-upload-dirselect elfinder-tabstop" title="'+d.i18n("folders")+'"></div>').on("click",function(t){t.stopPropagation(),t.preventDefault(),n=d.sortFiles(n);var a=e(this),o=(d.cwd(),i.closest("div.ui-dialog")),r=function(e,t){return{label:d.escape(e.i18||e.name),icon:t,remain:!1,callback:function(){var t=o.children(".ui-dialog-titlebar:first").find("span.elfinder-upload-target");h=[e.hash],t.html(" - "+d.escape(e.i18||e.name)),a.trigger("focus")},options:{className:h&&h.length&&e.hash===h[0]?"ui-state-active":"",iconClass:e.csscls||"",iconImg:e.icon||""}}},s=[r(m,"opendir"),"|"];e.each(n,function(e,t){s.push(r(t,"dir"))}),a.trigger("blur"),d.trigger("contextmenu",{raw:s,x:t.pageX||e(this).offset().left,y:t.pageY||e(this).offset().top,prevNode:o,fitHeight:!0})}).append('<span class="elfinder-button-icon elfinder-button-icon-dir" ></span>'):e()},y=function(n,i){var a=e('<input type="file" '+n+"/>").on("click",function(){d.UA.IE&&setTimeout(function(){o.css("display","none").css("position","relative"),requestAnimationFrame(function(){o.css("display","").css("position","")})},100)}).on("change",function(){v({input:a.get(0),type:"files"})}).on("dragover",function(e){e.originalEvent.dataTransfer.dropEffect="copy"}),o=e("<form></form>").append(a).on("click",function(e){e.stopPropagation()});return e('<div class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only elfinder-tabstop elfinder-focus"><span class="ui-button-text">'+d.i18n(i)+"</span></div>").append(o).on("click",function(e){e.stopPropagation(),e.preventDefault(),a.trigger("click")}).on("mouseenter mouseleave",function(n){e(this).toggleClass(t,"mouseenter"===n.type)})},w=e.Deferred();return r=function(t){t.stopPropagation(),t.preventDefault();var n,i=!1,a="",o=null,r="",s=null,l=t._target||null,c=t.dataTransfer||null,p="";if(c){c.types&&c.types.length&&e.inArray("Files",c.types)!==-1?p="file":c.items&&c.items.length&&c.items[0].kind&&(p=c.items[0].kind);try{if(o=c.getData("elfinderfrom"),o&&(r=window.location.href+d.cwd().hash,!l&&o===r||l===r))return void w.reject()}catch(t){}if("file"===p&&(c.items[0].getAsEntry||c.items[0].webkitGetAsEntry))i=c,a="data";else if("string"!==p&&c.files&&c.files.length&&e.inArray("Text",c.types)===-1)i=c.files,a="files";else{try{(s=c.getData("text/html"))&&s.match(/<(?:img|a)/i)&&(i=[s],a="html")}catch(t){}i||((s=c.getData("text"))?(i=[s],a="text"):c&&c.files&&(p="file"))}}i?g({files:i,type:a,target:l,dropEvt:t}):(n=["errUploadNoFiles"],"file"===p&&n.push("errFolderUpload"),d.error(n),w.reject())},!h&&n?(n.input||n.files?(n.type="files",g(n)):n.dropEvt&&r(n.dropEvt),w):(s=function(t){var n,i=t.originalEvent||t,a=[],o=[];if(i.clipboardData){if(i.clipboardData.items&&i.clipboardData.items.length){o=i.clipboardData.items;for(var r=0;r<o.length;r++)"file"==i.clipboardData.items[r].kind&&(n=i.clipboardData.items[r].getAsFile(),a.push(n))}else i.clipboardData.files&&i.clipboardData.files.length&&(a=i.clipboardData.files);if(a.length)return void v({files:a,type:"files",clipdata:!0})}var s=i.target||i.srcElement;requestAnimationFrame(function(){var t,n="text";s.innerHTML&&(e(s).find("img").each(function(t,n){n.src.match(/^webkit-fake-url:\/\//)&&e(n).remove()}),e(s).find("a,img").length&&(n="html"),t=s.innerHTML,s.innerHTML="",v({files:[t],type:n}))})},i=e('<div class="elfinder-upload-dialog-wrapper"></div>').append(y("multiple","selectForUpload")),!d.UA.Mobile&&function(e){return"undefined"!=typeof e.webkitdirectory||"undefined"!=typeof e.directory}(document.createElement("input"))&&i.append(y("multiple webkitdirectory directory","selectFolder")),m.dirs&&(m.hash===p||d.navHash2Elm(m.hash).hasClass("elfinder-subtree-loaded")?b().appendTo(i):(l=e('<div class="elfinder-upload-dirselect" title="'+d.i18n("nowLoading")+'"></div>').append('<span class="elfinder-button-icon elfinder-button-icon-spinner" ></span>').appendTo(i),d.request({cmd:"tree",target:m.hash}).done(function(){d.one("treedone",function(){l.replaceWith(b()),c.elfinderdialog("tabstopsInit")})}).fail(function(){l.remove()}))),d.dragUpload?a=e('<div class="ui-corner-all elfinder-upload-dropbox elfinder-tabstop" contenteditable="true" data-ph="'+d.i18n("dropPasteFiles")+'"></div>').on("paste",function(e){s(e)}).on("mousedown click",function(){e(this).trigger("focus")}).on("focus",function(){this.innerHTML=""}).on("mouseover",function(){e(this).addClass(t)}).on("mouseout",function(){e(this).removeClass(t)}).on("dragenter",function(n){n.stopPropagation(),n.preventDefault(),e(this).addClass(t)}).on("dragleave",function(n){n.stopPropagation(),n.preventDefault(),e(this).removeClass(t)}).on("dragover",function(n){n.stopPropagation(),n.preventDefault(),n.originalEvent.dataTransfer.dropEffect="copy",e(this).addClass(t)}).on("drop",function(e){i.elfinderdialog("close"),h&&(e.originalEvent._target=h[0]),r(e.originalEvent)}).prependTo(i).after('<div class="elfinder-upload-dialog-or">'+d.i18n("or")+"</div>")[0]:o=e('<div class="ui-corner-all elfinder-upload-dropbox" contenteditable="true">'+d.i18n("dropFilesBrowser")+"</div>").on("paste drop",function(e){s(e)}).on("mousedown click",function(){e(this).trigger("focus")}).on("focus",function(){this.innerHTML=""}).on("dragenter mouseover",function(){e(this).addClass(t)}).on("dragleave mouseout",function(){e(this).removeClass(t)}).prependTo(i).after('<div class="elfinder-upload-dialog-or">'+d.i18n("or")+"</div>")[0],c=this.fmDialog(i,{title:this.title+'<span class="elfinder-upload-target">'+(m?" - "+d.escape(m.i18||m.name):"")+"</span>",modal:!0,resizable:!1,destroyOnClose:!0,propagationEvents:["mousemove","mouseup","click"],close:function(){var e=d.getUI("contextmenu");e.is(":visible")&&e.click()}}),w)}},i.prototype.commands.view=function(){"use strict";var t,n=this,i=this.fm;this.value=i.viewType,this.alwaysEnabled=!0,this.updateOnSelect=!1,this.options={ui:"viewbutton"},this.getstate=function(){return 0},this.extra={icon:"menu",node:e("<span></span>").attr({title:i.i18n("viewtype")}).on("click touchstart",function(t){if(!("touchstart"===t.type&&t.originalEvent.touches.length>1)){var n=e(this);t.stopPropagation(),t.preventDefault(),i.trigger("contextmenu",{raw:getSubMenuRaw(),x:n.offset().left,y:n.offset().top})}})},this.exec=function(){var e=this,t="list"==this.value?"icons":"list";return i.storage("view",t),i.lazy(function(){i.viewchange(),e.update(void 0,t),this.resolve()})},i.bind("init",function(){t=function(){var e,t=i.getUI("cwd"),a=[],o=i.options.uiOptions.cwd.iconsView.sizeNames,r=i.options.uiOptions.cwd.iconsView.sizeMax;for(e=0;e<=r;e++)a.push({label:i.i18n(o[e]||"Size-"+e+" icons"),icon:"view",callback:function(e){return function(){t.trigger("iconpref",{size:e}),i.storage("iconsize",e),"list"===n.value&&n.exec()}}(e)});return a.push("|"),a.push({label:i.i18n("viewlist"),icon:"view-list",callback:function(){"list"!==n.value&&n.exec()}}),a}()}).bind("contextmenucreate",function(){n.extra={icon:"menu",node:e("<span></span>").attr({title:i.i18n("cmdview")}).on("click touchstart",function(a){if(!("touchstart"===a.type&&a.originalEvent.touches.length>1)){
26
+ var o,r,s=e(this);t.concat();for(o="list"===n.value?t.length-1:parseInt(i.storage("iconsize")||0),r=0;r<t.length;r++)"|"!==t[r]&&(t[r].options=r===o?{className:"ui-state-active"}:void 0);a.stopPropagation(),a.preventDefault(),i.trigger("contextmenu",{raw:t,x:s.offset().left,y:s.offset().top})}})}})},i});
file-manager.php CHANGED
@@ -2,9 +2,10 @@
2
  /**
3
  *
4
  * Plugin Name: Library File Manager
 
5
  * Author: Aftabul Islam
6
  * Author URI: https://wpjos.com
7
- * Version: 5.2.4
8
  * Author Email: toaihimel@gmail.com
9
  * PHP version: 5.6
10
  * Text domain: file-manager
@@ -13,80 +14,8 @@
13
  *
14
  * */
15
 
16
- /**
17
- *
18
- * Constant Definition
19
- *
20
- * @since v5.2.0
21
- *
22
- * */
23
- // Directory Separator
24
- if( !defined( 'DS' ) ) define("DS", DIRECTORY_SEPARATOR);
25
-
26
-
27
- // file manger path
28
- if( !defined( 'FILE_MANAGER_PATH' ) ) define("FILE_MANAGER_PATH", plugin_dir_path( __FILE__ ));
29
-
30
- // file manger url
31
- if( !defined( 'FILE_MANAGER_URL' ) ) define("FILE_MANAGER_URL", plugin_dir_url( __FILE__ ));
32
-
33
- // Elfinder path
34
- if( !defined( 'ELFINDER_PATH' ) ) define("ELFINDER_PATH", plugin_dir_path( __FILE__ ) . 'elFinder');
35
-
36
- // Elfinder url
37
- if( !defined( 'ELFINDER_URL' ) ) define("ELFINDER_URL", plugin_dir_url( __FILE__ ) . 'elFinder/');
38
-
39
- $upload_dir = wp_upload_dir();
40
- // Upload dir path
41
- if( !defined( 'FM_UPLOAD_DIR_PATH' ) ) define("FM_UPLOAD_DIR_PATH", $upload_dir['path']);
42
-
43
- // Upload dir url
44
- if( !defined( 'FM_UPLOAD_DIR_URL' ) ) define("FM_UPLOAD_DIR_URL", $upload_dir['url']);
45
-
46
- // Media basedir
47
- if( !defined( 'FM_MEDIA_BASE_DIR_PATH' ) ) define("FM_MEDIA_BASE_DIR_PATH", $upload_dir['basedir']);
48
-
49
- // Media baseurl
50
- if( !defined( 'FM_MEDIA_BASE_DIR_URL' ) ) define("FM_MEDIA_BASE_DIR_URL", $upload_dir['baseurl']);
51
-
52
- // File manager upload dir basedir
53
- defined( 'FM_UPLOAD_BASE_DIR' ) || define( 'FM_UPLOAD_BASE_DIR', $upload_dir['basedir'] . DS . 'file-manager' . DS );
54
-
55
- // File manager upload dir baseurl
56
- defined( 'FM_UPLOAD_BASE_URL' ) || define( 'FM_UPLOAD_BASE_URL', $upload_dir['baseurl'] . DS . 'file-manager' . DS );
57
-
58
- // File manager trash dir path
59
- if ( ! defined( 'FM_TRASH_DIR_PATH' )) {
60
- /**
61
- * Custom Trash Directory.
62
- */
63
- $fm_trash_dir = $upload_dir['basedir'] .'/file-manager/trash/';
64
- define( 'FM_TRASH_DIR_PATH', $fm_trash_dir );
65
- if ( ! file_exists( $fm_trash_dir ) && is_writable( $upload_dir['basedir'] ) ) {
66
- mkdir( $fm_trash_dir, 0777, true );
67
- // Protect files from public access.
68
- touch( FM_TRASH_DIR_PATH . '.htaccess' );
69
- $content = 'deny from all';
70
- $fp = fopen( FM_TRASH_DIR_PATH . '.htaccess', 'wb' );
71
- fwrite( $fp, $content );
72
- fclose( $fp );
73
- }elseif ( ! file_exists( $fm_trash_dir ) && ! is_writable($fm_trash_dir) && ! is_writable( $upload_dir['basedir'] ) ) {
74
- add_action('admin_notices', function(){ ?>
75
- <div class="notice notice-error is-dismissible">
76
- <p>
77
- <?php
78
- _e('<h1>File Manager</h1> <b>Your uploads folder is not writable. Please make <code style="color: red;">wp-content/uploads</code> folder writable to create trash folder.</b>', 'file-manager');
79
- ?>
80
- </p>
81
- </div> <?php
82
- });
83
- }
84
- }
85
-
86
- // File manager trash tmb dir url
87
- defined( 'FM_TRASH_TMB_DIR_URL' ) || define( 'FM_TRASH_TMB_DIR_URL', $upload_dir['baseurl'] . '/file-manager/trash/.tmb/');
88
-
89
-
90
 
91
  // Including elFinder class
92
  require_once('elFinder' . DS . 'php' . DS . 'autoload.php');
@@ -148,8 +77,8 @@ class FM extends FM_BootStart {
148
 
149
  public function __construct($name){
150
 
151
- $this->version = '5.2.4';
152
- $this->version_no = 524;
153
  $this->site = 'https://wpjos.com';
154
  $this->giribaz_landing_page = 'https://wpjos.com/library-file-manager-plugin';
155
  $this->support_page = 'https://wpjos.com/support/';
@@ -199,9 +128,8 @@ class FM extends FM_BootStart {
199
  'upload' => array(new FMMediaSync(), 'onFileUpload'),
200
  '*' => 'fm_logger',
201
  ),
202
- 'debug' => true,
203
  'roots' => array(
204
-
205
  array(
206
  'alias' => isset($this->options['file_manager_settings']['fm_root_folder_name']) && !empty($this->options['file_manager_settings']['fm_root_folder_name']) ? $this->options['file_manager_settings']['fm_root_folder_name'] : "WP Root",
207
  'driver' => 'LocalFileSystem', // driver for accessing file system (REQUIRED)
@@ -217,6 +145,8 @@ class FM extends FM_BootStart {
217
  'trashHash' => isset($this->options['file_manager_settings']['fm-create-trash-files-folders']) && !empty($this->options['file_manager_settings']['fm-create-trash-files-folders']) ? 't1_Lw' :'', // elFinder's hash of trash folder
218
  'winHashFix' => DIRECTORY_SEPARATOR !== '/', // to make hash same to Linux one on windows too
219
  // 'defaults' => array('read' => true, 'write' => true,'locked'=>true),
 
 
220
 
221
  'attributes' => array( // https://github.com/Studio-42/elFinder/wiki/Connector-configuration-options-2.1#attributes
222
  array(// hide specipic folder.
@@ -240,7 +170,7 @@ class FM extends FM_BootStart {
240
  // 'write' => true,
241
  // 'locked' => false,
242
  // ),
243
- // array( // hide specipic file type.
244
  // 'pattern' => '/^.+/',
245
  // 'hidden' => false,
246
  // 'read' => true,
@@ -249,8 +179,13 @@ class FM extends FM_BootStart {
249
  // ),
250
 
251
  ),
252
-
253
- ),
 
 
 
 
 
254
  array(
255
  'alias' => 'Media',
256
  'driver' => 'LocalFileSystem', // driver for accessing file system (REQUIRED)
@@ -262,13 +197,12 @@ class FM extends FM_BootStart {
262
  'accessControl' => array(new FMAccessControl(), 'control'),
263
  'disabled' => array(), // List of disabled operations
264
  ),
265
-
266
-
267
  )
268
  );
269
-
270
- $upload_dir = wp_upload_dir( );
271
- if( $this->options['file_manager_settings']['fm-create-trash-files-folders'] && is_writable( $upload_dir['basedir'] )){
 
272
  $opts['roots'][] = array(
273
  'id' => '1',
274
  'driver' => 'Trash',
@@ -278,7 +212,9 @@ class FM extends FM_BootStart {
278
  'uploadDeny' => array(), // Recomend the same settings as the original volume that uses the trash
279
  'uploadAllow' => $mime->get_types(),// Same as above
280
  'uploadOrder' => array('deny', 'allow'), // Same as above
281
- 'accessControl' => array(new FMAccessControl(), 'control'), // Same as above
 
 
282
  );
283
  }
284
 
2
  /**
3
  *
4
  * Plugin Name: Library File Manager
5
+ * Plugin URI: https://wpjos.com/library-file-manager-plugin/
6
  * Author: Aftabul Islam
7
  * Author URI: https://wpjos.com
8
+ * Version: 5.2.6
9
  * Author Email: toaihimel@gmail.com
10
  * PHP version: 5.6
11
  * Text domain: file-manager
14
  *
15
  * */
16
 
17
+ // Including elFinder class
18
+ require_once('BootStart' . DIRECTORY_SEPARATOR . 'Constants.php');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
 
20
  // Including elFinder class
21
  require_once('elFinder' . DS . 'php' . DS . 'autoload.php');
77
 
78
  public function __construct($name){
79
 
80
+ $this->version = '5.2.6';
81
+ $this->version_no = 526;
82
  $this->site = 'https://wpjos.com';
83
  $this->giribaz_landing_page = 'https://wpjos.com/library-file-manager-plugin';
84
  $this->support_page = 'https://wpjos.com/support/';
128
  'upload' => array(new FMMediaSync(), 'onFileUpload'),
129
  '*' => 'fm_logger',
130
  ),
131
+ 'debug' => WP_DEBUG,
132
  'roots' => array(
 
133
  array(
134
  'alias' => isset($this->options['file_manager_settings']['fm_root_folder_name']) && !empty($this->options['file_manager_settings']['fm_root_folder_name']) ? $this->options['file_manager_settings']['fm_root_folder_name'] : "WP Root",
135
  'driver' => 'LocalFileSystem', // driver for accessing file system (REQUIRED)
145
  'trashHash' => isset($this->options['file_manager_settings']['fm-create-trash-files-folders']) && !empty($this->options['file_manager_settings']['fm-create-trash-files-folders']) ? 't1_Lw' :'', // elFinder's hash of trash folder
146
  'winHashFix' => DIRECTORY_SEPARATOR !== '/', // to make hash same to Linux one on windows too
147
  // 'defaults' => array('read' => true, 'write' => true,'locked'=>true),
148
+ 'allowChmodReadOnly'=> true, // https://github.com/Studio-42/elFinder/wiki/Connector-configuration-options-2.1#allowChmodReadOnly
149
+ 'statOwner' => true, // https://github.com/Studio-42/elFinder/wiki/Connector-configuration-options-2.1#statOwner
150
 
151
  'attributes' => array( // https://github.com/Studio-42/elFinder/wiki/Connector-configuration-options-2.1#attributes
152
  array(// hide specipic folder.
170
  // 'write' => true,
171
  // 'locked' => false,
172
  // ),
173
+ // array( // hide all files type.
174
  // 'pattern' => '/^.+/',
175
  // 'hidden' => false,
176
  // 'read' => true,
179
  // ),
180
 
181
  ),
182
+ 'copyTo'=> true, //https://github.com/Studio-42/elFinder/wiki/Connector-configuration-options-2.1#copyTo
183
+ 'uploadMaxSize'=> 0, // https://github.com/Studio-42/elFinder/wiki/Connector-configuration-options-2.1#uploadMaxSize
184
+ 'archiveMimes' => array() ,// https://github.com/Studio-42/elFinder/wiki/Connector-configuration-options-2.1#archiveMimes
185
+ //'dirMode' => 0755, // new dirs mode (default 0755)
186
+ //'fileMode' => 0644, // new files mode (default 0644)
187
+ // 'maxTargets'=> 0,
188
+ ),
189
  array(
190
  'alias' => 'Media',
191
  'driver' => 'LocalFileSystem', // driver for accessing file system (REQUIRED)
197
  'accessControl' => array(new FMAccessControl(), 'control'),
198
  'disabled' => array(), // List of disabled operations
199
  ),
 
 
200
  )
201
  );
202
+ /**
203
+ * Enable/Disable trash directory.
204
+ */
205
+ if( isset($this->options['file_manager_settings']['fm-create-trash-files-folders']) && $this->options['file_manager_settings']['fm-create-trash-files-folders'] && is_writable( FM_WP_UPLOAD_DIR['basedir'] )){
206
  $opts['roots'][] = array(
207
  'id' => '1',
208
  'driver' => 'Trash',
212
  'uploadDeny' => array(), // Recomend the same settings as the original volume that uses the trash
213
  'uploadAllow' => $mime->get_types(),// Same as above
214
  'uploadOrder' => array('deny', 'allow'), // Same as above
215
+ 'accessControl' => array(new FMAccessControl(), 'control'),
216
+ 'acceptedName' => array($fmAccessControll, 'accepted__name'), // Same as above
217
+
218
  );
219
  }
220
 
img/icon-24x24.png CHANGED
Binary file
img/icon-256x256.png ADDED
Binary file
inc/class.access-control.php CHANGED
@@ -19,7 +19,7 @@ class FMAccessControl{
19
  function control($attr, $path, $data, $volume) {
20
  if(!isset($this->settings['fm-show-hidden-files']) || empty($this->settings['fm-show-hidden-files']))
21
  return strpos(basename($path), '.') === 0
22
- ? ( '' == $this->settings['fm-create-hidden-files-folders']) ? !($attr == 'read' || $attr == 'write') : ($attr == 'read' || $attr == 'write')
23
  : null;
24
  }
25
 
19
  function control($attr, $path, $data, $volume) {
20
  if(!isset($this->settings['fm-show-hidden-files']) || empty($this->settings['fm-show-hidden-files']))
21
  return strpos(basename($path), '.') === 0
22
+ ? ( isset($this->settings['fm-create-hidden-files-folders']) && '' == $this->settings['fm-create-hidden-files-folders']) ? !($attr == 'read' || $attr == 'write') : ($attr == 'read' || $attr == 'write')
23
  : null;
24
  }
25
 
jquery-ui-1.11.4/jquery-ui.css DELETED
@@ -1,1225 +0,0 @@
1
- /*! jQuery UI - v1.11.4 - 2016-11-13
2
- * http://jqueryui.com
3
- * Includes: core.css, draggable.css, resizable.css, selectable.css, sortable.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, menu.css, progressbar.css, selectmenu.css, slider.css, spinner.css, tabs.css, tooltip.css, theme.css
4
- * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=-apple-system%2CBlinkMacSystemFont%2C%22Segoe%20UI%22%2CRoboto%2COxygen-Sans%2CUbuntu%2CCantarell%2C%22Helvetica%20Neue%22%2Csans-serif&fsDefault=1.1em&fwDefault=normal&cornerRadius=0px&bgColorHeader=%23f5f5f5&bgTextureHeader=flat&borderColorHeader=%23e5e5e5&fcHeader=%23444444&iconColorHeader=%23444444&bgColorContent=%23ffffff&bgTextureContent=flat&borderColorContent=%23cccccc&fcContent=%23444444&iconColorContent=%23444444&bgColorDefault=%23e5e5e5&bgTextureDefault=flat&borderColorDefault=%23d5d5d5&fcDefault=%23444444&iconColorDefault=%23777777&bgColorHover=%23ededed&bgTextureHover=flat&borderColorHover=%23cccccc&fcHover=%23444444&iconColorHover=%23555555&bgColorActive=%23f5f5f5&bgTextureActive=flat&borderColorActive=%23e5e5e5&fcActive=%23333333&iconColorActive=%23ffffff&bgColorHighlight=%23ffffff&bgTextureHighlight=flat&borderColorHighlight=%23cccccc&fcHighlight=%23333333&iconColorHighlight=%23777777&bgColorError=%23fddfdf&bgTextureError=flat&borderColorError=%23f1a899&fcError=%235f3f3f&iconColorError=%23cc0000&bgColorOverlay=%23aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=%23666666&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=5px&offsetTopShadow=0px&offsetLeftShadow=0px&cornerRadiusShadow=0px&bgImgOpacityHeader=50&bgImgOpacityContent=&bgImgOpacityDefault=&bgImgOpacityHover=&bgImgOpacityActive=&bgImgOpacityHighlight=&bgImgOpacityError=
5
- * Copyright jQuery Foundation and other contributors; Licensed MIT */
6
-
7
- /* Layout helpers
8
- ----------------------------------*/
9
- .ui-helper-hidden {
10
- display: none;
11
- }
12
- .ui-helper-hidden-accessible {
13
- border: 0;
14
- clip: rect(0 0 0 0);
15
- height: 1px;
16
- margin: -1px;
17
- overflow: hidden;
18
- padding: 0;
19
- position: absolute;
20
- width: 1px;
21
- }
22
- .ui-helper-reset {
23
- margin: 0;
24
- padding: 0;
25
- border: 0;
26
- outline: 0;
27
- line-height: 1.3;
28
- text-decoration: none;
29
- font-size: 100%;
30
- list-style: none;
31
- }
32
- .ui-helper-clearfix:before,
33
- .ui-helper-clearfix:after {
34
- content: "";
35
- display: table;
36
- border-collapse: collapse;
37
- }
38
- .ui-helper-clearfix:after {
39
- clear: both;
40
- }
41
- .ui-helper-clearfix {
42
- min-height: 0; /* support: IE7 */
43
- }
44
- .ui-helper-zfix {
45
- width: 100%;
46
- height: 100%;
47
- top: 0;
48
- left: 0;
49
- position: absolute;
50
- opacity: 0;
51
- filter:Alpha(Opacity=0); /* support: IE8 */
52
- }
53
-
54
- .ui-front {
55
- z-index: 100;
56
- }
57
-
58
-
59
- /* Interaction Cues
60
- ----------------------------------*/
61
- .ui-state-disabled {
62
- cursor: default !important;
63
- }
64
-
65
-
66
- /* Icons
67
- ----------------------------------*/
68
-
69
- /* states and images */
70
- .ui-icon {
71
- display: block;
72
- text-indent: -99999px;
73
- overflow: hidden;
74
- background-repeat: no-repeat;
75
- }
76
-
77
-
78
- /* Misc visuals
79
- ----------------------------------*/
80
-
81
- /* Overlays */
82
- .ui-widget-overlay {
83
- position: fixed;
84
- top: 0;
85
- left: 0;
86
- width: 100%;
87
- height: 100%;
88
- }
89
- .ui-draggable-handle {
90
- -ms-touch-action: none;
91
- touch-action: none;
92
- }
93
- .ui-resizable {
94
- position: relative;
95
- }
96
- .ui-resizable-handle {
97
- position: absolute;
98
- font-size: 0.1px;
99
- display: block;
100
- -ms-touch-action: none;
101
- touch-action: none;
102
- }
103
- .ui-resizable-disabled .ui-resizable-handle,
104
- .ui-resizable-autohide .ui-resizable-handle {
105
- display: none;
106
- }
107
- .ui-resizable-n {
108
- cursor: n-resize;
109
- height: 7px;
110
- width: 100%;
111
- top: -5px;
112
- left: 0;
113
- }
114
- .ui-resizable-s {
115
- cursor: s-resize;
116
- height: 7px;
117
- width: 100%;
118
- bottom: -5px;
119
- left: 0;
120
- }
121
- .ui-resizable-e {
122
- cursor: e-resize;
123
- width: 7px;
124
- right: -5px;
125
- top: 0;
126
- height: 100%;
127
- }
128
- .ui-resizable-w {
129
- cursor: w-resize;
130
- width: 7px;
131
- left: -5px;
132
- top: 0;
133
- height: 100%;
134
- }
135
- .ui-resizable-se {
136
- cursor: se-resize;
137
- width: 12px;
138
- height: 12px;
139
- right: 1px;
140
- bottom: 1px;
141
- }
142
- .ui-resizable-sw {
143
- cursor: sw-resize;
144
- width: 9px;
145
- height: 9px;
146
- left: -5px;
147
- bottom: -5px;
148
- }
149
- .ui-resizable-nw {
150
- cursor: nw-resize;
151
- width: 9px;
152
- height: 9px;
153
- left: -5px;
154
- top: -5px;
155
- }
156
- .ui-resizable-ne {
157
- cursor: ne-resize;
158
- width: 9px;
159
- height: 9px;
160
- right: -5px;
161
- top: -5px;
162
- }
163
- .ui-selectable {
164
- -ms-touch-action: none;
165
- touch-action: none;
166
- }
167
- .ui-selectable-helper {
168
- position: absolute;
169
- z-index: 100;
170
- border: 1px dotted black;
171
- }
172
- .ui-sortable-handle {
173
- -ms-touch-action: none;
174
- touch-action: none;
175
- }
176
- .ui-accordion .ui-accordion-header {
177
- display: block;
178
- cursor: pointer;
179
- position: relative;
180
- margin: 2px 0 0 0;
181
- padding: .5em .5em .5em .7em;
182
- min-height: 0; /* support: IE7 */
183
- font-size: 100%;
184
- }
185
- .ui-accordion .ui-accordion-icons {
186
- padding-left: 2.2em;
187
- }
188
- .ui-accordion .ui-accordion-icons .ui-accordion-icons {
189
- padding-left: 2.2em;
190
- }
191
- .ui-accordion .ui-accordion-header .ui-accordion-header-icon {
192
- position: absolute;
193
- left: .5em;
194
- top: 50%;
195
- margin-top: -8px;
196
- }
197
- .ui-accordion .ui-accordion-content {
198
- padding: 1em 2.2em;
199
- border-top: 0;
200
- overflow: auto;
201
- }
202
- .ui-autocomplete {
203
- position: absolute;
204
- top: 0;
205
- left: 0;
206
- cursor: default;
207
- }
208
- .ui-button {
209
- display: inline-block;
210
- position: relative;
211
- padding: 0;
212
- line-height: normal;
213
- margin-right: .1em;
214
- cursor: pointer;
215
- vertical-align: middle;
216
- text-align: center;
217
- overflow: visible; /* removes extra width in IE */
218
- }
219
- .ui-button,
220
- .ui-button:link,
221
- .ui-button:visited,
222
- .ui-button:hover,
223
- .ui-button:active {
224
- text-decoration: none;
225
- }
226
- /* to make room for the icon, a width needs to be set here */
227
- .ui-button-icon-only {
228
- width: 2.2em;
229
- }
230
- /* button elements seem to need a little more width */
231
- button.ui-button-icon-only {
232
- width: 2.4em;
233
- }
234
- .ui-button-icons-only {
235
- width: 3.4em;
236
- }
237
- button.ui-button-icons-only {
238
- width: 3.7em;
239
- }
240
-
241
- /* button text element */
242
- .ui-button .ui-button-text {
243
- display: block;
244
- line-height: normal;
245
- }
246
- .ui-button-text-only .ui-button-text {
247
- padding: .4em 1em;
248
- }
249
- .ui-button-icon-only .ui-button-text,
250
- .ui-button-icons-only .ui-button-text {
251
- padding: .4em;
252
- text-indent: -9999999px;
253
- }
254
- .ui-button-text-icon-primary .ui-button-text,
255
- .ui-button-text-icons .ui-button-text {
256
- padding: .4em 1em .4em 2.1em;
257
- }
258
- .ui-button-text-icon-secondary .ui-button-text,
259
- .ui-button-text-icons .ui-button-text {
260
- padding: .4em 2.1em .4em 1em;
261
- }
262
- .ui-button-text-icons .ui-button-text {
263
- padding-left: 2.1em;
264
- padding-right: 2.1em;
265
- }
266
- /* no icon support for input elements, provide padding by default */
267
- input.ui-button {
268
- padding: .4em 1em;
269
- }
270
-
271
- /* button icon element(s) */
272
- .ui-button-icon-only .ui-icon,
273
- .ui-button-text-icon-primary .ui-icon,
274
- .ui-button-text-icon-secondary .ui-icon,
275
- .ui-button-text-icons .ui-icon,
276
- .ui-button-icons-only .ui-icon {
277
- position: absolute;
278
- top: 50%;
279
- margin-top: -8px;
280
- }
281
- .ui-button-icon-only .ui-icon {
282
- left: 50%;
283
- margin-left: -8px;
284
- }
285
- .ui-button-text-icon-primary .ui-button-icon-primary,
286
- .ui-button-text-icons .ui-button-icon-primary,
287
- .ui-button-icons-only .ui-button-icon-primary {
288
- left: .5em;
289
- }
290
- .ui-button-text-icon-secondary .ui-button-icon-secondary,
291
- .ui-button-text-icons .ui-button-icon-secondary,
292
- .ui-button-icons-only .ui-button-icon-secondary {
293
- right: .5em;
294
- }
295
-
296
- /* button sets */
297
- .ui-buttonset {
298
- margin-right: 7px;
299
- }
300
- .ui-buttonset .ui-button {
301
- margin-left: 0;
302
- margin-right: -.3em;
303
- }
304
-
305
- /* workarounds */
306
- /* reset extra padding in Firefox, see h5bp.com/l */
307
- input.ui-button::-moz-focus-inner,
308
- button.ui-button::-moz-focus-inner {
309
- border: 0;
310
- padding: 0;
311
- }
312
- .ui-datepicker {
313
- width: 17em;
314
- padding: .2em .2em 0;
315
- display: none;
316
- }
317
- .ui-datepicker .ui-datepicker-header {
318
- position: relative;
319
- padding: .2em 0;
320
- }
321
- .ui-datepicker .ui-datepicker-prev,
322
- .ui-datepicker .ui-datepicker-next {
323
- position: absolute;
324
- top: 2px;
325
- width: 1.8em;
326
- height: 1.8em;
327
- }
328
- .ui-datepicker .ui-datepicker-prev-hover,
329
- .ui-datepicker .ui-datepicker-next-hover {
330
- top: 1px;
331
- }
332
- .ui-datepicker .ui-datepicker-prev {
333
- left: 2px;
334
- }
335
- .ui-datepicker .ui-datepicker-next {
336
- right: 2px;
337
- }
338
- .ui-datepicker .ui-datepicker-prev-hover {
339
- left: 1px;
340
- }
341
- .ui-datepicker .ui-datepicker-next-hover {
342
- right: 1px;
343
- }
344
- .ui-datepicker .ui-datepicker-prev span,
345
- .ui-datepicker .ui-datepicker-next span {
346
- display: block;
347
- position: absolute;
348
- left: 50%;
349
- margin-left: -8px;
350
- top: 50%;
351
- margin-top: -8px;
352
- }
353
- .ui-datepicker .ui-datepicker-title {
354
- margin: 0 2.3em;
355
- line-height: 1.8em;
356
- text-align: center;
357
- }
358
- .ui-datepicker .ui-datepicker-title select {
359
- font-size: 1em;
360
- margin: 1px 0;
361
- }
362
- .ui-datepicker select.ui-datepicker-month,
363
- .ui-datepicker select.ui-datepicker-year {
364
- width: 45%;
365
- }
366
- .ui-datepicker table {
367
- width: 100%;
368
- font-size: .9em;
369
- border-collapse: collapse;
370
- margin: 0 0 .4em;
371
- }
372
- .ui-datepicker th {
373
- padding: .7em .3em;
374
- text-align: center;
375
- font-weight: bold;
376
- border: 0;
377
- }
378
- .ui-datepicker td {
379
- border: 0;
380
- padding: 1px;
381
- }
382
- .ui-datepicker td span,
383
- .ui-datepicker td a {
384
- display: block;
385
- padding: .2em;
386
- text-align: right;
387
- text-decoration: none;
388
- }
389
- .ui-datepicker .ui-datepicker-buttonpane {
390
- background-image: none;
391
- margin: .7em 0 0 0;
392
- padding: 0 .2em;
393
- border-left: 0;
394
- border-right: 0;
395
- border-bottom: 0;
396
- }
397
- .ui-datepicker .ui-datepicker-buttonpane button {
398
- float: right;
399
- margin: .5em .2em .4em;
400
- cursor: pointer;
401
- padding: .2em .6em .3em .6em;
402
- width: auto;
403
- overflow: visible;
404
- }
405
- .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
406
- float: left;
407
- }
408
-
409
- /* with multiple calendars */
410
- .ui-datepicker.ui-datepicker-multi {
411
- width: auto;
412
- }
413
- .ui-datepicker-multi .ui-datepicker-group {
414
- float: left;
415
- }
416
- .ui-datepicker-multi .ui-datepicker-group table {
417
- width: 95%;
418
- margin: 0 auto .4em;
419
- }
420
- .ui-datepicker-multi-2 .ui-datepicker-group {
421
- width: 50%;
422
- }
423
- .ui-datepicker-multi-3 .ui-datepicker-group {
424
- width: 33.3%;
425
- }
426
- .ui-datepicker-multi-4 .ui-datepicker-group {
427
- width: 25%;
428
- }
429
- .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,
430
- .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
431
- border-left-width: 0;
432
- }
433
- .ui-datepicker-multi .ui-datepicker-buttonpane {
434
- clear: left;
435
- }
436
- .ui-datepicker-row-break {
437
- clear: both;
438
- width: 100%;
439
- font-size: 0;
440
- }
441
-
442
- /* RTL support */
443
- .ui-datepicker-rtl {
444
- direction: rtl;
445
- }
446
- .ui-datepicker-rtl .ui-datepicker-prev {
447
- right: 2px;
448
- left: auto;
449
- }
450
- .ui-datepicker-rtl .ui-datepicker-next {
451
- left: 2px;
452
- right: auto;
453
- }
454
- .ui-datepicker-rtl .ui-datepicker-prev:hover {
455
- right: 1px;
456
- left: auto;
457
- }
458
- .ui-datepicker-rtl .ui-datepicker-next:hover {
459
- left: 1px;
460
- right: auto;
461
- }
462
- .ui-datepicker-rtl .ui-datepicker-buttonpane {
463
- clear: right;
464
- }
465
- .ui-datepicker-rtl .ui-datepicker-buttonpane button {
466
- float: left;
467
- }
468
- .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,
469
- .ui-datepicker-rtl .ui-datepicker-group {
470
- float: right;
471
- }
472
- .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,
473
- .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
474
- border-right-width: 0;
475
- border-left-width: 1px;
476
- }
477
- .ui-dialog {
478
- overflow: hidden;
479
- position: absolute;
480
- top: 0;
481
- left: 0;
482
- padding: .2em;
483
- outline: 0;
484
- }
485
- .ui-dialog .ui-dialog-titlebar {
486
- padding: .4em 1em;
487
- position: relative;
488
- }
489
- .ui-dialog .ui-dialog-title {
490
- float: left;
491
- margin: .1em 0;
492
- white-space: nowrap;
493
- width: 90%;
494
- overflow: hidden;
495
- text-overflow: ellipsis;
496
- }
497
- .ui-dialog .ui-dialog-titlebar-close {
498
- position: absolute;
499
- right: .3em;
500
- top: 50%;
501
- width: 20px;
502
- margin: -10px 0 0 0;
503
- padding: 1px;
504
- height: 20px;
505
- }
506
- .ui-dialog .ui-dialog-content {
507
- position: relative;
508
- border: 0;
509
- padding: .5em 1em;
510
- background: none;
511
- overflow: auto;
512
- }
513
- .ui-dialog .ui-dialog-buttonpane {
514
- text-align: left;
515
- border-width: 1px 0 0 0;
516
- background-image: none;
517
- margin-top: .5em;
518
- padding: .3em 1em .5em .4em;
519
- }
520
- .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
521
- float: right;
522
- }
523
- .ui-dialog .ui-dialog-buttonpane button {
524
- margin: .5em .4em .5em 0;
525
- cursor: pointer;
526
- }
527
- .ui-dialog .ui-resizable-se {
528
- width: 12px;
529
- height: 12px;
530
- right: -5px;
531
- bottom: -5px;
532
- background-position: 16px 16px;
533
- }
534
- .ui-draggable .ui-dialog-titlebar {
535
- cursor: move;
536
- }
537
- .ui-menu {
538
- list-style: none;
539
- padding: 0;
540
- margin: 0;
541
- display: block;
542
- outline: none;
543
- }
544
- .ui-menu .ui-menu {
545
- position: absolute;
546
- }
547
- .ui-menu .ui-menu-item {
548
- position: relative;
549
- margin: 0;
550
- padding: 3px 1em 3px .4em;
551
- cursor: pointer;
552
- min-height: 0; /* support: IE7 */
553
- /* support: IE10, see #8844 */
554
- list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
555
- }
556
- .ui-menu .ui-menu-divider {
557
- margin: 5px 0;
558
- height: 0;
559
- font-size: 0;
560
- line-height: 0;
561
- border-width: 1px 0 0 0;
562
- }
563
- .ui-menu .ui-state-focus,
564
- .ui-menu .ui-state-active {
565
- margin: -1px;
566
- }
567
-
568
- /* icon support */
569
- .ui-menu-icons {
570
- position: relative;
571
- }
572
- .ui-menu-icons .ui-menu-item {
573
- padding-left: 2em;
574
- }
575
-
576
- /* left-aligned */
577
- .ui-menu .ui-icon {
578
- position: absolute;
579
- top: 0;
580
- bottom: 0;
581
- left: .2em;
582
- margin: auto 0;
583
- }
584
-
585
- /* right-aligned */
586
- .ui-menu .ui-menu-icon {
587
- left: auto;
588
- right: 0;
589
- }
590
- .ui-progressbar {
591
- height: 2em;
592
- text-align: left;
593
- overflow: hidden;
594
- }
595
- .ui-progressbar .ui-progressbar-value {
596
- margin: -1px;
597
- height: 100%;
598
- }
599
- .ui-progressbar .ui-progressbar-overlay {
600
- background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");
601
- height: 100%;
602
- filter: alpha(opacity=25); /* support: IE8 */
603
- opacity: 0.25;
604
- }
605
- .ui-progressbar-indeterminate .ui-progressbar-value {
606
- background-image: none;
607
- }
608
- .ui-selectmenu-menu {
609
- padding: 0;
610
- margin: 0;
611
- position: absolute;
612
- top: 0;
613
- left: 0;
614
- display: none;
615
- }
616
- .ui-selectmenu-menu .ui-menu {
617
- overflow: auto;
618
- /* Support: IE7 */
619
- overflow-x: hidden;
620
- padding-bottom: 1px;
621
- }
622
- .ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup {
623
- font-size: 1em;
624
- font-weight: bold;
625
- line-height: 1.5;
626
- padding: 2px 0.4em;
627
- margin: 0.5em 0 0 0;
628
- height: auto;
629
- border: 0;
630
- }
631
- .ui-selectmenu-open {
632
- display: block;
633
- }
634
- .ui-selectmenu-button {
635
- display: inline-block;
636
- overflow: hidden;
637
- position: relative;
638
- text-decoration: none;
639
- cursor: pointer;
640
- }
641
- .ui-selectmenu-button span.ui-icon {
642
- right: 0.5em;
643
- left: auto;
644
- margin-top: -8px;
645
- position: absolute;
646
- top: 50%;
647
- }
648
- .ui-selectmenu-button span.ui-selectmenu-text {
649
- text-align: left;
650
- padding: 0.4em 2.1em 0.4em 1em;
651
- display: block;
652
- line-height: 1.4;
653
- overflow: hidden;
654
- text-overflow: ellipsis;
655
- white-space: nowrap;
656
- }
657
- .ui-slider {
658
- position: relative;
659
- text-align: left;
660
- }
661
- .ui-slider .ui-slider-handle {
662
- position: absolute;
663
- z-index: 2;
664
- width: 1.2em;
665
- height: 1.2em;
666
- cursor: default;
667
- -ms-touch-action: none;
668
- touch-action: none;
669
- }
670
- .ui-slider .ui-slider-range {
671
- position: absolute;
672
- z-index: 1;
673
- font-size: .7em;
674
- display: block;
675
- border: 0;
676
- background-position: 0 0;
677
- }
678
-
679
- /* support: IE8 - See #6727 */
680
- .ui-slider.ui-state-disabled .ui-slider-handle,
681
- .ui-slider.ui-state-disabled .ui-slider-range {
682
- filter: inherit;
683
- }
684
-
685
- .ui-slider-horizontal {
686
- height: .8em;
687
- }
688
- .ui-slider-horizontal .ui-slider-handle {
689
- top: -.3em;
690
- margin-left: -.6em;
691
- }
692
- .ui-slider-horizontal .ui-slider-range {
693
- top: 0;
694
- height: 100%;
695
- }
696
- .ui-slider-horizontal .ui-slider-range-min {
697
- left: 0;
698
- }
699
- .ui-slider-horizontal .ui-slider-range-max {
700
- right: 0;
701
- }
702
-
703
- .ui-slider-vertical {
704
- width: .8em;
705
- height: 100px;
706
- }
707
- .ui-slider-vertical .ui-slider-handle {
708
- left: -.3em;
709
- margin-left: 0;
710
- margin-bottom: -.6em;
711
- }
712
- .ui-slider-vertical .ui-slider-range {
713
- left: 0;
714
- width: 100%;
715
- }
716
- .ui-slider-vertical .ui-slider-range-min {
717
- bottom: 0;
718
- }
719
- .ui-slider-vertical .ui-slider-range-max {
720
- top: 0;
721
- }
722
- .ui-spinner {
723
- position: relative;
724
- display: inline-block;
725
- overflow: hidden;
726
- padding: 0;
727
- vertical-align: middle;
728
- }
729
- .ui-spinner-input {
730
- border: none;
731
- background: none;
732
- color: inherit;
733
- padding: 0;
734
- margin: .2em 0;
735
- vertical-align: middle;
736
- margin-left: .4em;
737
- margin-right: 22px;
738
- }
739
- .ui-spinner-button {
740
- width: 16px;
741
- height: 50%;
742
- font-size: .5em;
743
- padding: 0;
744
- margin: 0;
745
- text-align: center;
746
- position: absolute;
747
- cursor: default;
748
- display: block;
749
- overflow: hidden;
750
- right: 0;
751
- }
752
- /* more specificity required here to override default borders */
753
- .ui-spinner a.ui-spinner-button {
754
- border-top: none;
755
- border-bottom: none;
756
- border-right: none;
757
- }
758
- /* vertically center icon */
759
- .ui-spinner .ui-icon {
760
- position: absolute;
761
- margin-top: -8px;
762
- top: 50%;
763
- left: 0;
764
- }
765
- .ui-spinner-up {
766
- top: 0;
767
- }
768
- .ui-spinner-down {
769
- bottom: 0;
770
- }
771
-
772
- /* TR overrides */
773
- .ui-spinner .ui-icon-triangle-1-s {
774
- /* need to fix icons sprite */
775
- background-position: -65px -16px;
776
- }
777
- .ui-tabs {
778
- position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
779
- padding: .2em;
780
- }
781
- .ui-tabs .ui-tabs-nav {
782
- margin: 0;
783
- padding: .2em .2em 0;
784
- }
785
- .ui-tabs .ui-tabs-nav li {
786
- list-style: none;
787
- float: left;
788
- position: relative;
789
- top: 0;
790
- margin: 1px .2em 0 0;
791
- border-bottom-width: 0;
792
- padding: 0;
793
- white-space: nowrap;
794
- }
795
- .ui-tabs .ui-tabs-nav .ui-tabs-anchor {
796
- float: left;
797
- padding: .5em 1em;
798
- text-decoration: none;
799
- }
800
- .ui-tabs .ui-tabs-nav li.ui-tabs-active {
801
- margin-bottom: -1px;
802
- padding-bottom: 1px;
803
- }
804
- .ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,
805
- .ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,
806
- .ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor {
807
- cursor: text;
808
- }
809
- .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor {
810
- cursor: pointer;
811
- }
812
- .ui-tabs .ui-tabs-panel {
813
- display: block;
814
- border-width: 0;
815
- padding: 1em 1.4em;
816
- background: none;
817
- }
818
- .ui-tooltip {
819
- padding: 8px;
820
- position: absolute;
821
- z-index: 9999;
822
- max-width: 300px;
823
- -webkit-box-shadow: 0 0 5px #aaa;
824
- box-shadow: 0 0 5px #aaa;
825
- }
826
- body .ui-tooltip {
827
- border-width: 2px;
828
- }
829
-
830
- /* Component containers
831
- ----------------------------------*/
832
- .ui-widget {
833
- font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
834
- font-size: 1.1em;
835
- }
836
- .ui-widget .ui-widget {
837
- font-size: 1em;
838
- }
839
- .ui-widget input,
840
- .ui-widget select,
841
- .ui-widget textarea,
842
- .ui-widget button {
843
- font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
844
- font-size: 1em;
845
- }
846
- .ui-widget-content {
847
- border: 1px solid #cccccc;
848
- background: #ffffff;
849
- color: #444444;
850
- }
851
- .ui-widget-content a {
852
- color: #444444;
853
- }
854
- .ui-widget-header {
855
- border: 1px solid #e5e5e5;
856
- background: #f5f5f5;
857
- color: #444444;
858
- font-weight: bold;
859
- }
860
- .ui-widget-header a {
861
- color: #444444;
862
- }
863
-
864
- /* Interaction states
865
- ----------------------------------*/
866
- .ui-state-default,
867
- .ui-widget-content .ui-state-default,
868
- .ui-widget-header .ui-state-default {
869
- border: 1px solid #d5d5d5;
870
- background: #e5e5e5;
871
- font-weight: normal;
872
- color: #444444;
873
- }
874
- .ui-state-default a,
875
- .ui-state-default a:link,
876
- .ui-state-default a:visited {
877
- color: #444444;
878
- text-decoration: none;
879
- }
880
- .ui-state-hover,
881
- .ui-widget-content .ui-state-hover,
882
- .ui-widget-header .ui-state-hover,
883
- .ui-state-focus,
884
- .ui-widget-content .ui-state-focus,
885
- .ui-widget-header .ui-state-focus {
886
- border: 1px solid #cccccc;
887
- background: #ededed;
888
- font-weight: normal;
889
- color: #444444;
890
- }
891
- .ui-state-hover a,
892
- .ui-state-hover a:hover,
893
- .ui-state-hover a:link,
894
- .ui-state-hover a:visited,
895
- .ui-state-focus a,
896
- .ui-state-focus a:hover,
897
- .ui-state-focus a:link,
898
- .ui-state-focus a:visited {
899
- color: #444444;
900
- text-decoration: none;
901
- }
902
- .ui-state-active,
903
- .ui-widget-content .ui-state-active,
904
- .ui-widget-header .ui-state-active {
905
- border: 1px solid #e5e5e5;
906
- background: #f5f5f5;
907
- font-weight: normal;
908
- color: #333333;
909
- }
910
- .ui-state-active a,
911
- .ui-state-active a:link,
912
- .ui-state-active a:visited {
913
- color: #333333;
914
- text-decoration: none;
915
- }
916
-
917
- /* Interaction Cues
918
- ----------------------------------*/
919
- .ui-state-highlight,
920
- .ui-widget-content .ui-state-highlight,
921
- .ui-widget-header .ui-state-highlight {
922
- border: 1px solid #cccccc;
923
- background: #ffffff;
924
- color: #333333;
925
- }
926
- .ui-state-highlight a,
927
- .ui-widget-content .ui-state-highlight a,
928
- .ui-widget-header .ui-state-highlight a {
929
- color: #333333;
930
- }
931
- .ui-state-error,
932
- .ui-widget-content .ui-state-error,
933
- .ui-widget-header .ui-state-error {
934
- border: 1px solid #f1a899;
935
- background: #fddfdf;
936
- color: #5f3f3f;
937
- }
938
- .ui-state-error a,
939
- .ui-widget-content .ui-state-error a,
940
- .ui-widget-header .ui-state-error a {
941
- color: #5f3f3f;
942
- }
943
- .ui-state-error-text,
944
- .ui-widget-content .ui-state-error-text,
945
- .ui-widget-header .ui-state-error-text {
946
- color: #5f3f3f;
947
- }
948
- .ui-priority-primary,
949
- .ui-widget-content .ui-priority-primary,
950
- .ui-widget-header .ui-priority-primary {
951
- font-weight: bold;
952
- }
953
- .ui-priority-secondary,
954
- .ui-widget-content .ui-priority-secondary,
955
- .ui-widget-header .ui-priority-secondary {
956
- opacity: .7;
957
- filter:Alpha(Opacity=70); /* support: IE8 */
958
- font-weight: normal;
959
- }
960
- .ui-state-disabled,
961
- .ui-widget-content .ui-state-disabled,
962
- .ui-widget-header .ui-state-disabled {
963
- opacity: .35;
964
- filter:Alpha(Opacity=35); /* support: IE8 */
965
- background-image: none;
966
- }
967
- .ui-state-disabled .ui-icon {
968
- filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */
969
- }
970
-
971
- /* Icons
972
- ----------------------------------*/
973
-
974
- /* states and images */
975
- .ui-icon {
976
- width: 16px;
977
- height: 16px;
978
- }
979
- .ui-icon,
980
- .ui-widget-content .ui-icon {
981
- background-image: url("images/ui-icons_444444_256x240.png");
982
- }
983
- .ui-widget-header .ui-icon {
984
- background-image: url("images/ui-icons_444444_256x240.png");
985
- }
986
- .ui-state-default .ui-icon {
987
- background-image: url("images/ui-icons_777777_256x240.png");
988
- }
989
- .ui-state-hover .ui-icon,
990
- .ui-state-focus .ui-icon {
991
- background-image: url("images/ui-icons_555555_256x240.png");
992
- }
993
- .ui-state-active .ui-icon {
994
- background-image: url("images/ui-icons_ffffff_256x240.png");
995
- }
996
- .ui-state-highlight .ui-icon {
997
- background-image: url("images/ui-icons_777777_256x240.png");
998
- }
999
- .ui-state-error .ui-icon,
1000
- .ui-state-error-text .ui-icon {
1001
- background-image: url("images/ui-icons_cc0000_256x240.png");
1002
- }
1003
-
1004
- /* positioning */
1005
- .ui-icon-blank { background-position: 16px 16px; }
1006
- .ui-icon-carat-1-n { background-position: 0 0; }
1007
- .ui-icon-carat-1-ne { background-position: -16px 0; }
1008
- .ui-icon-carat-1-e { background-position: -32px 0; }
1009
- .ui-icon-carat-1-se { background-position: -48px 0; }
1010
- .ui-icon-carat-1-s { background-position: -64px 0; }
1011
- .ui-icon-carat-1-sw { background-position: -80px 0; }
1012
- .ui-icon-carat-1-w { background-position: -96px 0; }
1013
- .ui-icon-carat-1-nw { background-position: -112px 0; }
1014
- .ui-icon-carat-2-n-s { background-position: -128px 0; }
1015
- .ui-icon-carat-2-e-w { background-position: -144px 0; }
1016
- .ui-icon-triangle-1-n { background-position: 0 -16px; }
1017
- .ui-icon-triangle-1-ne { background-position: -16px -16px; }
1018
- .ui-icon-triangle-1-e { background-position: -32px -16px; }
1019
- .ui-icon-triangle-1-se { background-position: -48px -16px; }
1020
- .ui-icon-triangle-1-s { background-position: -64px -16px; }
1021
- .ui-icon-triangle-1-sw { background-position: -80px -16px; }
1022
- .ui-icon-triangle-1-w { background-position: -96px -16px; }
1023
- .ui-icon-triangle-1-nw { background-position: -112px -16px; }
1024
- .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
1025
- .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
1026
- .ui-icon-arrow-1-n { background-position: 0 -32px; }
1027
- .ui-icon-arrow-1-ne { background-position: -16px -32px; }
1028
- .ui-icon-arrow-1-e { background-position: -32px -32px; }
1029
- .ui-icon-arrow-1-se { background-position: -48px -32px; }
1030
- .ui-icon-arrow-1-s { background-position: -64px -32px; }
1031
- .ui-icon-arrow-1-sw { background-position: -80px -32px; }
1032
- .ui-icon-arrow-1-w { background-position: -96px -32px; }
1033
- .ui-icon-arrow-1-nw { background-position: -112px -32px; }
1034
- .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
1035
- .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
1036
- .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
1037
- .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
1038
- .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
1039
- .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
1040
- .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
1041
- .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
1042
- .ui-icon-arrowthick-1-n { background-position: 0 -48px; }
1043
- .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
1044
- .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
1045
- .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
1046
- .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
1047
- .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
1048
- .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
1049
- .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
1050
- .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
1051
- .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
1052
- .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
1053
- .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
1054
- .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
1055
- .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
1056
- .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
1057
- .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
1058
- .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
1059
- .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
1060
- .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
1061
- .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
1062
- .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
1063
- .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
1064
- .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
1065
- .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
1066
- .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
1067
- .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
1068
- .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
1069
- .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
1070
- .ui-icon-arrow-4 { background-position: 0 -80px; }
1071
- .ui-icon-arrow-4-diag { background-position: -16px -80px; }
1072
- .ui-icon-extlink { background-position: -32px -80px; }
1073
- .ui-icon-newwin { background-position: -48px -80px; }
1074
- .ui-icon-refresh { background-position: -64px -80px; }
1075
- .ui-icon-shuffle { background-position: -80px -80px; }
1076
- .ui-icon-transfer-e-w { background-position: -96px -80px; }
1077
- .ui-icon-transferthick-e-w { background-position: -112px -80px; }
1078
- .ui-icon-folder-collapsed { background-position: 0 -96px; }
1079
- .ui-icon-folder-open { background-position: -16px -96px; }
1080
- .ui-icon-document { background-position: -32px -96px; }
1081
- .ui-icon-document-b { background-position: -48px -96px; }
1082
- .ui-icon-note { background-position: -64px -96px; }
1083
- .ui-icon-mail-closed { background-position: -80px -96px; }
1084
- .ui-icon-mail-open { background-position: -96px -96px; }
1085
- .ui-icon-suitcase { background-position: -112px -96px; }
1086
- .ui-icon-comment { background-position: -128px -96px; }
1087
- .ui-icon-person { background-position: -144px -96px; }
1088
- .ui-icon-print { background-position: -160px -96px; }
1089
- .ui-icon-trash { background-position: -176px -96px; }
1090
- .ui-icon-locked { background-position: -192px -96px; }
1091
- .ui-icon-unlocked { background-position: -208px -96px; }
1092
- .ui-icon-bookmark { background-position: -224px -96px; }
1093
- .ui-icon-tag { background-position: -240px -96px; }
1094
- .ui-icon-home { background-position: 0 -112px; }
1095
- .ui-icon-flag { background-position: -16px -112px; }
1096
- .ui-icon-calendar { background-position: -32px -112px; }
1097
- .ui-icon-cart { background-position: -48px -112px; }
1098
- .ui-icon-pencil { background-position: -64px -112px; }
1099
- .ui-icon-clock { background-position: -80px -112px; }
1100
- .ui-icon-disk { background-position: -96px -112px; }
1101
- .ui-icon-calculator { background-position: -112px -112px; }
1102
- .ui-icon-zoomin { background-position: -128px -112px; }
1103
- .ui-icon-zoomout { background-position: -144px -112px; }
1104
- .ui-icon-search { background-position: -160px -112px; }
1105
- .ui-icon-wrench { background-position: -176px -112px; }
1106
- .ui-icon-gear { background-position: -192px -112px; }
1107
- .ui-icon-heart { background-position: -208px -112px; }
1108
- .ui-icon-star { background-position: -224px -112px; }
1109
- .ui-icon-link { background-position: -240px -112px; }
1110
- .ui-icon-cancel { background-position: 0 -128px; }
1111
- .ui-icon-plus { background-position: -16px -128px; }
1112
- .ui-icon-plusthick { background-position: -32px -128px; }
1113
- .ui-icon-minus { background-position: -48px -128px; }
1114
- .ui-icon-minusthick { background-position: -64px -128px; }
1115
- .ui-icon-close { background-position: -80px -128px; }
1116
- .ui-icon-closethick { background-position: -96px -128px; }
1117
- .ui-icon-key { background-position: -112px -128px; }
1118
- .ui-icon-lightbulb { background-position: -128px -128px; }
1119
- .ui-icon-scissors { background-position: -144px -128px; }
1120
- .ui-icon-clipboard { background-position: -160px -128px; }
1121
- .ui-icon-copy { background-position: -176px -128px; }
1122
- .ui-icon-contact { background-position: -192px -128px; }
1123
- .ui-icon-image { background-position: -208px -128px; }
1124
- .ui-icon-video { background-position: -224px -128px; }
1125
- .ui-icon-script { background-position: -240px -128px; }
1126
- .ui-icon-alert { background-position: 0 -144px; }
1127
- .ui-icon-info { background-position: -16px -144px; }
1128
- .ui-icon-notice { background-position: -32px -144px; }
1129
- .ui-icon-help { background-position: -48px -144px; }
1130
- .ui-icon-check { background-position: -64px -144px; }
1131
- .ui-icon-bullet { background-position: -80px -144px; }
1132
- .ui-icon-radio-on { background-position: -96px -144px; }
1133
- .ui-icon-radio-off { background-position: -112px -144px; }
1134
- .ui-icon-pin-w { background-position: -128px -144px; }
1135
- .ui-icon-pin-s { background-position: -144px -144px; }
1136
- .ui-icon-play { background-position: 0 -160px; }
1137
- .ui-icon-pause { background-position: -16px -160px; }
1138
- .ui-icon-seek-next { background-position: -32px -160px; }
1139
- .ui-icon-seek-prev { background-position: -48px -160px; }
1140
- .ui-icon-seek-end { background-position: -64px -160px; }
1141
- .ui-icon-seek-start { background-position: -80px -160px; }
1142
- /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
1143
- .ui-icon-seek-first { background-position: -80px -160px; }
1144
- .ui-icon-stop { background-position: -96px -160px; }
1145
- .ui-icon-eject { background-position: -112px -160px; }
1146
- .ui-icon-volume-off { background-position: -128px -160px; }
1147
- .ui-icon-volume-on { background-position: -144px -160px; }
1148
- .ui-icon-power { background-position: 0 -176px; }
1149
- .ui-icon-signal-diag { background-position: -16px -176px; }
1150
- .ui-icon-signal { background-position: -32px -176px; }
1151
- .ui-icon-battery-0 { background-position: -48px -176px; }
1152
- .ui-icon-battery-1 { background-position: -64px -176px; }
1153
- .ui-icon-battery-2 { background-position: -80px -176px; }
1154
- .ui-icon-battery-3 { background-position: -96px -176px; }
1155
- .ui-icon-circle-plus { background-position: 0 -192px; }
1156
- .ui-icon-circle-minus { background-position: -16px -192px; }
1157
- .ui-icon-circle-close { background-position: -32px -192px; }
1158
- .ui-icon-circle-triangle-e { background-position: -48px -192px; }
1159
- .ui-icon-circle-triangle-s { background-position: -64px -192px; }
1160
- .ui-icon-circle-triangle-w { background-position: -80px -192px; }
1161
- .ui-icon-circle-triangle-n { background-position: -96px -192px; }
1162
- .ui-icon-circle-arrow-e { background-position: -112px -192px; }
1163
- .ui-icon-circle-arrow-s { background-position: -128px -192px; }
1164
- .ui-icon-circle-arrow-w { background-position: -144px -192px; }
1165
- .ui-icon-circle-arrow-n { background-position: -160px -192px; }
1166
- .ui-icon-circle-zoomin { background-position: -176px -192px; }
1167
- .ui-icon-circle-zoomout { background-position: -192px -192px; }
1168
- .ui-icon-circle-check { background-position: -208px -192px; }
1169
- .ui-icon-circlesmall-plus { background-position: 0 -208px; }
1170
- .ui-icon-circlesmall-minus { background-position: -16px -208px; }
1171
- .ui-icon-circlesmall-close { background-position: -32px -208px; }
1172
- .ui-icon-squaresmall-plus { background-position: -48px -208px; }
1173
- .ui-icon-squaresmall-minus { background-position: -64px -208px; }
1174
- .ui-icon-squaresmall-close { background-position: -80px -208px; }
1175
- .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
1176
- .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
1177
- .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
1178
- .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
1179
- .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
1180
- .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
1181
-
1182
-
1183
- /* Misc visuals
1184
- ----------------------------------*/
1185
-
1186
- /* Corner radius */
1187
- .ui-corner-all,
1188
- .ui-corner-top,
1189
- .ui-corner-left,
1190
- .ui-corner-tl {
1191
- border-top-left-radius: 0px;
1192
- }
1193
- .ui-corner-all,
1194
- .ui-corner-top,
1195
- .ui-corner-right,
1196
- .ui-corner-tr {
1197
- border-top-right-radius: 0px;
1198
- }
1199
- .ui-corner-all,
1200
- .ui-corner-bottom,
1201
- .ui-corner-left,
1202
- .ui-corner-bl {
1203
- border-bottom-left-radius: 0px;
1204
- }
1205
- .ui-corner-all,
1206
- .ui-corner-bottom,
1207
- .ui-corner-right,
1208
- .ui-corner-br {
1209
- border-bottom-right-radius: 0px;
1210
- }
1211
-
1212
- /* Overlays */
1213
- .ui-widget-overlay {
1214
- background: #aaaaaa;
1215
- opacity: .3;
1216
- filter: Alpha(Opacity=30); /* support: IE8 */
1217
- }
1218
- .ui-widget-shadow {
1219
- margin: 0px 0 0 0px;
1220
- padding: 5px;
1221
- background: #666666;
1222
- opacity: .3;
1223
- filter: Alpha(Opacity=30); /* support: IE8 */
1224
- border-radius: 0px;
1225
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
jquery-ui-1.11.4/jquery-ui.structure.css DELETED
@@ -1,833 +0,0 @@
1
- /*!
2
- * jQuery UI CSS Framework 1.11.4
3
- * http://jqueryui.com
4
- *
5
- * Copyright jQuery Foundation and other contributors
6
- * Released under the MIT license.
7
- * http://jquery.org/license
8
- *
9
- * http://api.jqueryui.com/category/theming/
10
- */
11
-
12
- /* Layout helpers
13
- ----------------------------------*/
14
- .ui-helper-hidden {
15
- display: none;
16
- }
17
- .ui-helper-hidden-accessible {
18
- border: 0;
19
- clip: rect(0 0 0 0);
20
- height: 1px;
21
- margin: -1px;
22
- overflow: hidden;
23
- padding: 0;
24
- position: absolute;
25
- width: 1px;
26
- }
27
- .ui-helper-reset {
28
- margin: 0;
29
- padding: 0;
30
- border: 0;
31
- outline: 0;
32
- line-height: 1.3;
33
- text-decoration: none;
34
- font-size: 100%;
35
- list-style: none;
36
- }
37
- .ui-helper-clearfix:before,
38
- .ui-helper-clearfix:after {
39
- content: "";
40
- display: table;
41
- border-collapse: collapse;
42
- }
43
- .ui-helper-clearfix:after {
44
- clear: both;
45
- }
46
- .ui-helper-clearfix {
47
- min-height: 0; /* support: IE7 */
48
- }
49
- .ui-helper-zfix {
50
- width: 100%;
51
- height: 100%;
52
- top: 0;
53
- left: 0;
54
- position: absolute;
55
- opacity: 0;
56
- filter:Alpha(Opacity=0); /* support: IE8 */
57
- }
58
-
59
- .ui-front {
60
- z-index: 100;
61
- }
62
-
63
-
64
- /* Interaction Cues
65
- ----------------------------------*/
66
- .ui-state-disabled {
67
- cursor: default !important;
68
- }
69
-
70
-
71
- /* Icons
72
- ----------------------------------*/
73
-
74
- /* states and images */
75
- .ui-icon {
76
- display: block;
77
- text-indent: -99999px;
78
- overflow: hidden;
79
- background-repeat: no-repeat;
80
- }
81
-
82
-
83
- /* Misc visuals
84
- ----------------------------------*/
85
-
86
- /* Overlays */
87
- .ui-widget-overlay {
88
- position: fixed;
89
- top: 0;
90
- left: 0;
91
- width: 100%;
92
- height: 100%;
93
- }
94
- .ui-draggable-handle {
95
- -ms-touch-action: none;
96
- touch-action: none;
97
- }
98
- .ui-resizable {
99
- position: relative;
100
- }
101
- .ui-resizable-handle {
102
- position: absolute;
103
- font-size: 0.1px;
104
- display: block;
105
- -ms-touch-action: none;
106
- touch-action: none;
107
- }
108
- .ui-resizable-disabled .ui-resizable-handle,
109
- .ui-resizable-autohide .ui-resizable-handle {
110
- display: none;
111
- }
112
- .ui-resizable-n {
113
- cursor: n-resize;
114
- height: 7px;
115
- width: 100%;
116
- top: -5px;
117
- left: 0;
118
- }
119
- .ui-resizable-s {
120
- cursor: s-resize;
121
- height: 7px;
122
- width: 100%;
123
- bottom: -5px;
124
- left: 0;
125
- }
126
- .ui-resizable-e {
127
- cursor: e-resize;
128
- width: 7px;
129
- right: -5px;
130
- top: 0;
131
- height: 100%;
132
- }
133
- .ui-resizable-w {
134
- cursor: w-resize;
135
- width: 7px;
136
- left: -5px;
137
- top: 0;
138
- height: 100%;
139
- }
140
- .ui-resizable-se {
141
- cursor: se-resize;
142
- width: 12px;
143
- height: 12px;
144
- right: 1px;
145
- bottom: 1px;
146
- }
147
- .ui-resizable-sw {
148
- cursor: sw-resize;
149
- width: 9px;
150
- height: 9px;
151
- left: -5px;
152
- bottom: -5px;
153
- }
154
- .ui-resizable-nw {
155
- cursor: nw-resize;
156
- width: 9px;
157
- height: 9px;
158
- left: -5px;
159
- top: -5px;
160
- }
161
- .ui-resizable-ne {
162
- cursor: ne-resize;
163
- width: 9px;
164
- height: 9px;
165
- right: -5px;
166
- top: -5px;
167
- }
168
- .ui-selectable {
169
- -ms-touch-action: none;
170
- touch-action: none;
171
- }
172
- .ui-selectable-helper {
173
- position: absolute;
174
- z-index: 100;
175
- border: 1px dotted black;
176
- }
177
- .ui-sortable-handle {
178
- -ms-touch-action: none;
179
- touch-action: none;
180
- }
181
- .ui-accordion .ui-accordion-header {
182
- display: block;
183
- cursor: pointer;
184
- position: relative;
185
- margin: 2px 0 0 0;
186
- padding: .5em .5em .5em .7em;
187
- min-height: 0; /* support: IE7 */
188
- font-size: 100%;
189
- }
190
- .ui-accordion .ui-accordion-icons {
191
- padding-left: 2.2em;
192
- }
193
- .ui-accordion .ui-accordion-icons .ui-accordion-icons {
194
- padding-left: 2.2em;
195
- }
196
- .ui-accordion .ui-accordion-header .ui-accordion-header-icon {
197
- position: absolute;
198
- left: .5em;
199
- top: 50%;
200
- margin-top: -8px;
201
- }
202
- .ui-accordion .ui-accordion-content {
203
- padding: 1em 2.2em;
204
- border-top: 0;
205
- overflow: auto;
206
- }
207
- .ui-autocomplete {
208
- position: absolute;
209
- top: 0;
210
- left: 0;
211
- cursor: default;
212
- }
213
- .ui-button {
214
- display: inline-block;
215
- position: relative;
216
- padding: 0;
217
- line-height: normal;
218
- margin-right: .1em;
219
- cursor: pointer;
220
- vertical-align: middle;
221
- text-align: center;
222
- overflow: visible; /* removes extra width in IE */
223
- }
224
- .ui-button,
225
- .ui-button:link,
226
- .ui-button:visited,
227
- .ui-button:hover,
228
- .ui-button:active {
229
- text-decoration: none;
230
- }
231
- /* to make room for the icon, a width needs to be set here */
232
- .ui-button-icon-only {
233
- width: 2.2em;
234
- }
235
- /* button elements seem to need a little more width */
236
- button.ui-button-icon-only {
237
- width: 2.4em;
238
- }
239
- .ui-button-icons-only {
240
- width: 3.4em;
241
- }
242
- button.ui-button-icons-only {
243
- width: 3.7em;
244
- }
245
-
246
- /* button text element */
247
- .ui-button .ui-button-text {
248
- display: block;
249
- line-height: normal;
250
- }
251
- .ui-button-text-only .ui-button-text {
252
- padding: .4em 1em;
253
- }
254
- .ui-button-icon-only .ui-button-text,
255
- .ui-button-icons-only .ui-button-text {
256
- padding: .4em;
257
- text-indent: -9999999px;
258
- }
259
- .ui-button-text-icon-primary .ui-button-text,
260
- .ui-button-text-icons .ui-button-text {
261
- padding: .4em 1em .4em 2.1em;
262
- }
263
- .ui-button-text-icon-secondary .ui-button-text,
264
- .ui-button-text-icons .ui-button-text {
265
- padding: .4em 2.1em .4em 1em;
266
- }
267
- .ui-button-text-icons .ui-button-text {
268
- padding-left: 2.1em;
269
- padding-right: 2.1em;
270
- }
271
- /* no icon support for input elements, provide padding by default */
272
- input.ui-button {
273
- padding: .4em 1em;
274
- }
275
-
276
- /* button icon element(s) */
277
- .ui-button-icon-only .ui-icon,
278
- .ui-button-text-icon-primary .ui-icon,
279
- .ui-button-text-icon-secondary .ui-icon,
280
- .ui-button-text-icons .ui-icon,
281
- .ui-button-icons-only .ui-icon {
282
- position: absolute;
283
- top: 50%;
284
- margin-top: -8px;
285
- }
286
- .ui-button-icon-only .ui-icon {
287
- left: 50%;
288
- margin-left: -8px;
289
- }
290
- .ui-button-text-icon-primary .ui-button-icon-primary,
291
- .ui-button-text-icons .ui-button-icon-primary,
292
- .ui-button-icons-only .ui-button-icon-primary {
293
- left: .5em;
294
- }
295
- .ui-button-text-icon-secondary .ui-button-icon-secondary,
296
- .ui-button-text-icons .ui-button-icon-secondary,
297
- .ui-button-icons-only .ui-button-icon-secondary {
298
- right: .5em;
299
- }
300
-
301
- /* button sets */
302
- .ui-buttonset {
303
- margin-right: 7px;
304
- }
305
- .ui-buttonset .ui-button {
306
- margin-left: 0;
307
- margin-right: -.3em;
308
- }
309
-
310
- /* workarounds */
311
- /* reset extra padding in Firefox, see h5bp.com/l */
312
- input.ui-button::-moz-focus-inner,
313
- button.ui-button::-moz-focus-inner {
314
- border: 0;
315
- padding: 0;
316
- }
317
- .ui-datepicker {
318
- width: 17em;
319
- padding: .2em .2em 0;
320
- display: none;
321
- }
322
- .ui-datepicker .ui-datepicker-header {
323
- position: relative;
324
- padding: .2em 0;
325
- }
326
- .ui-datepicker .ui-datepicker-prev,
327
- .ui-datepicker .ui-datepicker-next {
328
- position: absolute;
329
- top: 2px;
330
- width: 1.8em;
331
- height: 1.8em;
332
- }
333
- .ui-datepicker .ui-datepicker-prev-hover,
334
- .ui-datepicker .ui-datepicker-next-hover {
335
- top: 1px;
336
- }
337
- .ui-datepicker .ui-datepicker-prev {
338
- left: 2px;
339
- }
340
- .ui-datepicker .ui-datepicker-next {
341
- right: 2px;
342
- }
343
- .ui-datepicker .ui-datepicker-prev-hover {
344
- left: 1px;
345
- }
346
- .ui-datepicker .ui-datepicker-next-hover {
347
- right: 1px;
348
- }
349
- .ui-datepicker .ui-datepicker-prev span,
350
- .ui-datepicker .ui-datepicker-next span {
351
- display: block;
352
- position: absolute;
353
- left: 50%;
354
- margin-left: -8px;
355
- top: 50%;
356
- margin-top: -8px;
357
- }
358
- .ui-datepicker .ui-datepicker-title {
359
- margin: 0 2.3em;
360
- line-height: 1.8em;
361
- text-align: center;
362
- }
363
- .ui-datepicker .ui-datepicker-title select {
364
- font-size: 1em;
365
- margin: 1px 0;
366
- }
367
- .ui-datepicker select.ui-datepicker-month,
368
- .ui-datepicker select.ui-datepicker-year {
369
- width: 45%;
370
- }
371
- .ui-datepicker table {
372
- width: 100%;
373
- font-size: .9em;
374
- border-collapse: collapse;
375
- margin: 0 0 .4em;
376
- }
377
- .ui-datepicker th {
378
- padding: .7em .3em;
379
- text-align: center;
380
- font-weight: bold;
381
- border: 0;
382
- }
383
- .ui-datepicker td {
384
- border: 0;
385
- padding: 1px;
386
- }
387
- .ui-datepicker td span,
388
- .ui-datepicker td a {
389
- display: block;
390
- padding: .2em;
391
- text-align: right;
392
- text-decoration: none;
393
- }
394
- .ui-datepicker .ui-datepicker-buttonpane {
395
- background-image: none;
396
- margin: .7em 0 0 0;
397
- padding: 0 .2em;
398
- border-left: 0;
399
- border-right: 0;
400
- border-bottom: 0;
401
- }
402
- .ui-datepicker .ui-datepicker-buttonpane button {
403
- float: right;
404
- margin: .5em .2em .4em;
405
- cursor: pointer;
406
- padding: .2em .6em .3em .6em;
407
- width: auto;
408
- overflow: visible;
409
- }
410
- .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
411
- float: left;
412
- }
413
-
414
- /* with multiple calendars */
415
- .ui-datepicker.ui-datepicker-multi {
416
- width: auto;
417
- }
418
- .ui-datepicker-multi .ui-datepicker-group {
419
- float: left;
420
- }
421
- .ui-datepicker-multi .ui-datepicker-group table {
422
- width: 95%;
423
- margin: 0 auto .4em;
424
- }
425
- .ui-datepicker-multi-2 .ui-datepicker-group {
426
- width: 50%;
427
- }
428
- .ui-datepicker-multi-3 .ui-datepicker-group {
429
- width: 33.3%;
430
- }
431
- .ui-datepicker-multi-4 .ui-datepicker-group {
432
- width: 25%;
433
- }
434
- .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,
435
- .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
436
- border-left-width: 0;
437
- }
438
- .ui-datepicker-multi .ui-datepicker-buttonpane {
439
- clear: left;
440
- }
441
- .ui-datepicker-row-break {
442
- clear: both;
443
- width: 100%;
444
- font-size: 0;
445
- }
446
-
447
- /* RTL support */
448
- .ui-datepicker-rtl {
449
- direction: rtl;
450
- }
451
- .ui-datepicker-rtl .ui-datepicker-prev {
452
- right: 2px;
453
- left: auto;
454
- }
455
- .ui-datepicker-rtl .ui-datepicker-next {
456
- left: 2px;
457
- right: auto;
458
- }
459
- .ui-datepicker-rtl .ui-datepicker-prev:hover {
460
- right: 1px;
461
- left: auto;
462
- }
463
- .ui-datepicker-rtl .ui-datepicker-next:hover {
464
- left: 1px;
465
- right: auto;
466
- }
467
- .ui-datepicker-rtl .ui-datepicker-buttonpane {
468
- clear: right;
469
- }
470
- .ui-datepicker-rtl .ui-datepicker-buttonpane button {
471
- float: left;
472
- }
473
- .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,
474
- .ui-datepicker-rtl .ui-datepicker-group {
475
- float: right;
476
- }
477
- .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,
478
- .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
479
- border-right-width: 0;
480
- border-left-width: 1px;
481
- }
482
- .ui-dialog {
483
- overflow: hidden;
484
- position: absolute;
485
- top: 0;
486
- left: 0;
487
- padding: .2em;
488
- outline: 0;
489
- }
490
- .ui-dialog .ui-dialog-titlebar {
491
- padding: .4em 1em;
492
- position: relative;
493
- }
494
- .ui-dialog .ui-dialog-title {
495
- float: left;
496
- margin: .1em 0;
497
- white-space: nowrap;
498
- width: 90%;
499
- overflow: hidden;
500
- text-overflow: ellipsis;
501
- }
502
- .ui-dialog .ui-dialog-titlebar-close {
503
- position: absolute;
504
- right: .3em;
505
- top: 50%;
506
- width: 20px;
507
- margin: -10px 0 0 0;
508
- padding: 1px;
509
- height: 20px;
510
- }
511
- .ui-dialog .ui-dialog-content {
512
- position: relative;
513
- border: 0;
514
- padding: .5em 1em;
515
- background: none;
516
- overflow: auto;
517
- }
518
- .ui-dialog .ui-dialog-buttonpane {
519
- text-align: left;
520
- border-width: 1px 0 0 0;
521
- background-image: none;
522
- margin-top: .5em;
523
- padding: .3em 1em .5em .4em;
524
- }
525
- .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
526
- float: right;
527
- }
528
- .ui-dialog .ui-dialog-buttonpane button {
529
- margin: .5em .4em .5em 0;
530
- cursor: pointer;
531
- }
532
- .ui-dialog .ui-resizable-se {
533
- width: 12px;
534
- height: 12px;
535
- right: -5px;
536
- bottom: -5px;
537
- background-position: 16px 16px;
538
- }
539
- .ui-draggable .ui-dialog-titlebar {
540
- cursor: move;
541
- }
542
- .ui-menu {
543
- list-style: none;
544
- padding: 0;
545
- margin: 0;
546
- display: block;
547
- outline: none;
548
- }
549
- .ui-menu .ui-menu {
550
- position: absolute;
551
- }
552
- .ui-menu .ui-menu-item {
553
- position: relative;
554
- margin: 0;
555
- padding: 3px 1em 3px .4em;
556
- cursor: pointer;
557
- min-height: 0; /* support: IE7 */
558
- /* support: IE10, see #8844 */
559
- list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
560
- }
561
- .ui-menu .ui-menu-divider {
562
- margin: 5px 0;
563
- height: 0;
564
- font-size: 0;
565
- line-height: 0;
566
- border-width: 1px 0 0 0;
567
- }
568
- .ui-menu .ui-state-focus,
569
- .ui-menu .ui-state-active {
570
- margin: -1px;
571
- }
572
-
573
- /* icon support */
574
- .ui-menu-icons {
575
- position: relative;
576
- }
577
- .ui-menu-icons .ui-menu-item {
578
- padding-left: 2em;
579
- }
580
-
581
- /* left-aligned */
582
- .ui-menu .ui-icon {
583
- position: absolute;
584
- top: 0;
585
- bottom: 0;
586
- left: .2em;
587
- margin: auto 0;
588
- }
589
-
590
- /* right-aligned */
591
- .ui-menu .ui-menu-icon {
592
- left: auto;
593
- right: 0;
594
- }
595
- .ui-progressbar {
596
- height: 2em;
597
- text-align: left;
598
- overflow: hidden;
599
- }
600
- .ui-progressbar .ui-progressbar-value {
601
- margin: -1px;
602
- height: 100%;
603
- }
604
- .ui-progressbar .ui-progressbar-overlay {
605
- background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");
606
- height: 100%;
607
- filter: alpha(opacity=25); /* support: IE8 */
608
- opacity: 0.25;
609
- }
610
- .ui-progressbar-indeterminate .ui-progressbar-value {
611
- background-image: none;
612
- }
613
- .ui-selectmenu-menu {
614
- padding: 0;
615
- margin: 0;
616
- position: absolute;
617
- top: 0;
618
- left: 0;
619
- display: none;
620
- }
621
- .ui-selectmenu-menu .ui-menu {
622
- overflow: auto;
623
- /* Support: IE7 */
624
- overflow-x: hidden;
625
- padding-bottom: 1px;
626
- }
627
- .ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup {
628
- font-size: 1em;
629
- font-weight: bold;
630
- line-height: 1.5;
631
- padding: 2px 0.4em;
632
- margin: 0.5em 0 0 0;
633
- height: auto;
634
- border: 0;
635
- }
636
- .ui-selectmenu-open {
637
- display: block;
638
- }
639
- .ui-selectmenu-button {
640
- display: inline-block;
641
- overflow: hidden;
642
- position: relative;
643
- text-decoration: none;
644
- cursor: pointer;
645
- }
646
- .ui-selectmenu-button span.ui-icon {
647
- right: 0.5em;
648
- left: auto;
649
- margin-top: -8px;
650
- position: absolute;
651
- top: 50%;
652
- }
653
- .ui-selectmenu-button span.ui-selectmenu-text {
654
- text-align: left;
655
- padding: 0.4em 2.1em 0.4em 1em;
656
- display: block;
657
- line-height: 1.4;
658
- overflow: hidden;
659
- text-overflow: ellipsis;
660
- white-space: nowrap;
661
- }
662
- .ui-slider {
663
- position: relative;
664
- text-align: left;
665
- }
666
- .ui-slider .ui-slider-handle {
667
- position: absolute;
668
- z-index: 2;
669
- width: 1.2em;
670
- height: 1.2em;
671
- cursor: default;
672
- -ms-touch-action: none;
673
- touch-action: none;
674
- }
675
- .ui-slider .ui-slider-range {
676
- position: absolute;
677
- z-index: 1;
678
- font-size: .7em;
679
- display: block;
680
- border: 0;
681
- background-position: 0 0;
682
- }
683
-
684
- /* support: IE8 - See #6727 */
685
- .ui-slider.ui-state-disabled .ui-slider-handle,
686
- .ui-slider.ui-state-disabled .ui-slider-range {
687
- filter: inherit;
688
- }
689
-
690
- .ui-slider-horizontal {
691
- height: .8em;
692
- }
693
- .ui-slider-horizontal .ui-slider-handle {
694
- top: -.3em;
695
- margin-left: -.6em;
696
- }
697
- .ui-slider-horizontal .ui-slider-range {
698
- top: 0;
699
- height: 100%;
700
- }
701
- .ui-slider-horizontal .ui-slider-range-min {
702
- left: 0;
703
- }
704
- .ui-slider-horizontal .ui-slider-range-max {
705
- right: 0;
706
- }
707
-
708
- .ui-slider-vertical {
709
- width: .8em;
710
- height: 100px;
711
- }
712
- .ui-slider-vertical .ui-slider-handle {
713
- left: -.3em;
714
- margin-left: 0;
715
- margin-bottom: -.6em;
716
- }
717
- .ui-slider-vertical .ui-slider-range {
718
- left: 0;
719
- width: 100%;
720
- }
721
- .ui-slider-vertical .ui-slider-range-min {
722
- bottom: 0;
723
- }
724
- .ui-slider-vertical .ui-slider-range-max {
725
- top: 0;
726
- }
727
- .ui-spinner {
728
- position: relative;
729
- display: inline-block;
730
- overflow: hidden;
731
- padding: 0;
732
- vertical-align: middle;
733
- }
734
- .ui-spinner-input {
735
- border: none;
736
- background: none;
737
- color: inherit;
738
- padding: 0;
739
- margin: .2em 0;
740
- vertical-align: middle;
741
- margin-left: .4em;
742
- margin-right: 22px;
743
- }
744
- .ui-spinner-button {
745
- width: 16px;
746
- height: 50%;
747
- font-size: .5em;
748
- padding: 0;
749
- margin: 0;
750
- text-align: center;
751
- position: absolute;
752
- cursor: default;
753
- display: block;
754
- overflow: hidden;
755
- right: 0;
756
- }
757
- /* more specificity required here to override default borders */
758
- .ui-spinner a.ui-spinner-button {
759
- border-top: none;
760
- border-bottom: none;
761
- border-right: none;
762
- }
763
- /* vertically center icon */
764
- .ui-spinner .ui-icon {
765
- position: absolute;
766
- margin-top: -8px;
767
- top: 50%;
768
- left: 0;
769
- }
770
- .ui-spinner-up {
771
- top: 0;
772
- }
773
- .ui-spinner-down {
774
- bottom: 0;
775
- }
776
-
777
- /* TR overrides */
778
- .ui-spinner .ui-icon-triangle-1-s {
779
- /* need to fix icons sprite */
780
- background-position: -65px -16px;
781
- }
782
- .ui-tabs {
783
- position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
784
- padding: .2em;
785
- }
786
- .ui-tabs .ui-tabs-nav {
787
- margin: 0;
788
- padding: .2em .2em 0;
789
- }
790
- .ui-tabs .ui-tabs-nav li {
791
- list-style: none;
792
- float: left;
793
- position: relative;
794
- top: 0;
795
- margin: 1px .2em 0 0;
796
- border-bottom-width: 0;
797
- padding: 0;
798
- white-space: nowrap;
799
- }
800
- .ui-tabs .ui-tabs-nav .ui-tabs-anchor {
801
- float: left;
802
- padding: .5em 1em;
803
- text-decoration: none;
804
- }
805
- .ui-tabs .ui-tabs-nav li.ui-tabs-active {
806
- margin-bottom: -1px;
807
- padding-bottom: 1px;
808
- }
809
- .ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,
810
- .ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,
811
- .ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor {
812
- cursor: text;
813
- }
814
- .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor {
815
- cursor: pointer;
816
- }
817
- .ui-tabs .ui-tabs-panel {
818
- display: block;
819
- border-width: 0;
820
- padding: 1em 1.4em;
821
- background: none;
822
- }
823
- .ui-tooltip {
824
- padding: 8px;
825
- position: absolute;
826
- z-index: 9999;
827
- max-width: 300px;
828
- -webkit-box-shadow: 0 0 5px #aaa;
829
- box-shadow: 0 0 5px #aaa;
830
- }
831
- body .ui-tooltip {
832
- border-width: 2px;
833
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
jquery-ui-1.11.4/jquery-ui.structure.min.css DELETED
@@ -1,5 +0,0 @@
1
- /*! jQuery UI - v1.11.4 - 2016-11-13
2
- * http://jqueryui.com
3
- * Copyright jQuery Foundation and other contributors; Licensed MIT */
4
-
5
- .ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block;-ms-touch-action:none;touch-action:none}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable{-ms-touch-action:none;touch-action:none}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0 0;padding:.5em .5em .5em .7em;min-height:0;font-size:100%}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:45%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-dialog{overflow:hidden;position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:none}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{position:relative;margin:0;padding:3px 1em 3px .4em;cursor:pointer;min-height:0;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");height:100%;filter:alpha(opacity=25);opacity:0.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-selectmenu-menu{padding:0;margin:0;position:absolute;top:0;left:0;display:none}.ui-selectmenu-menu .ui-menu{overflow:auto;overflow-x:hidden;padding-bottom:1px}.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup{font-size:1em;font-weight:bold;line-height:1.5;padding:2px 0.4em;margin:0.5em 0 0 0;height:auto;border:0}.ui-selectmenu-open{display:block}.ui-selectmenu-button{display:inline-block;overflow:hidden;position:relative;text-decoration:none;cursor:pointer}.ui-selectmenu-button span.ui-icon{right:0.5em;left:auto;margin-top:-8px;position:absolute;top:50%}.ui-selectmenu-button span.ui-selectmenu-text{text-align:left;padding:0.4em 2.1em 0.4em 1em;display:block;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px}
 
 
 
 
 
jquery-ui-1.11.4/jquery-ui.theme.css DELETED
@@ -1,410 +0,0 @@
1
- /*!
2
- * jQuery UI CSS Framework 1.11.4
3
- * http://jqueryui.com
4
- *
5
- * Copyright jQuery Foundation and other contributors
6
- * Released under the MIT license.
7
- * http://jquery.org/license
8
- *
9
- * http://api.jqueryui.com/category/theming/
10
- *
11
- * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=-apple-system%2CBlinkMacSystemFont%2C%22Segoe%20UI%22%2CRoboto%2COxygen-Sans%2CUbuntu%2CCantarell%2C%22Helvetica%20Neue%22%2Csans-serif&fsDefault=1.1em&fwDefault=normal&cornerRadius=0px&bgColorHeader=%23f5f5f5&bgTextureHeader=flat&borderColorHeader=%23e5e5e5&fcHeader=%23444444&iconColorHeader=%23444444&bgColorContent=%23ffffff&bgTextureContent=flat&borderColorContent=%23cccccc&fcContent=%23444444&iconColorContent=%23444444&bgColorDefault=%23e5e5e5&bgTextureDefault=flat&borderColorDefault=%23d5d5d5&fcDefault=%23444444&iconColorDefault=%23777777&bgColorHover=%23ededed&bgTextureHover=flat&borderColorHover=%23cccccc&fcHover=%23444444&iconColorHover=%23555555&bgColorActive=%23f5f5f5&bgTextureActive=flat&borderColorActive=%23e5e5e5&fcActive=%23333333&iconColorActive=%23ffffff&bgColorHighlight=%23ffffff&bgTextureHighlight=flat&borderColorHighlight=%23cccccc&fcHighlight=%23333333&iconColorHighlight=%23777777&bgColorError=%23fddfdf&bgTextureError=flat&borderColorError=%23f1a899&fcError=%235f3f3f&iconColorError=%23cc0000&bgColorOverlay=%23aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=%23666666&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=5px&offsetTopShadow=0px&offsetLeftShadow=0px&cornerRadiusShadow=0px&bgImgOpacityHeader=50&bgImgOpacityContent=&bgImgOpacityDefault=&bgImgOpacityHover=&bgImgOpacityActive=&bgImgOpacityHighlight=&bgImgOpacityError=
12
- */
13
-
14
-
15
- /* Component containers
16
- ----------------------------------*/
17
- .ui-widget {
18
- font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
19
- font-size: 1.1em;
20
- }
21
- .ui-widget .ui-widget {
22
- font-size: 1em;
23
- }
24
- .ui-widget input,
25
- .ui-widget select,
26
- .ui-widget textarea,
27
- .ui-widget button {
28
- font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
29
- font-size: 1em;
30
- }
31
- .ui-widget-content {
32
- border: 1px solid #cccccc;
33
- background: #ffffff;
34
- color: #444444;
35
- }
36
- .ui-widget-content a {
37
- color: #444444;
38
- }
39
- .ui-widget-header {
40
- border: 1px solid #e5e5e5;
41
- background: #f5f5f5;
42
- color: #444444;
43
- font-weight: bold;
44
- }
45
- .ui-widget-header a {
46
- color: #444444;
47
- }
48
-
49
- /* Interaction states
50
- ----------------------------------*/
51
- .ui-state-default,
52
- .ui-widget-content .ui-state-default,
53
- .ui-widget-header .ui-state-default {
54
- border: 1px solid #d5d5d5;
55
- background: #e5e5e5;
56
- font-weight: normal;
57
- color: #444444;
58
- }
59
- .ui-state-default a,
60
- .ui-state-default a:link,
61
- .ui-state-default a:visited {
62
- color: #444444;
63
- text-decoration: none;
64
- }
65
- .ui-state-hover,
66
- .ui-widget-content .ui-state-hover,
67
- .ui-widget-header .ui-state-hover,
68
- .ui-state-focus,
69
- .ui-widget-content .ui-state-focus,
70
- .ui-widget-header .ui-state-focus {
71
- border: 1px solid #cccccc;
72
- background: #ededed;
73
- font-weight: normal;
74
- color: #444444;
75
- }
76
- .ui-state-hover a,
77
- .ui-state-hover a:hover,
78
- .ui-state-hover a:link,
79
- .ui-state-hover a:visited,
80
- .ui-state-focus a,
81
- .ui-state-focus a:hover,
82
- .ui-state-focus a:link,
83
- .ui-state-focus a:visited {
84
- color: #444444;
85
- text-decoration: none;
86
- }
87
- .ui-state-active,
88
- .ui-widget-content .ui-state-active,
89
- .ui-widget-header .ui-state-active {
90
- border: 1px solid #e5e5e5;
91
- background: #f5f5f5;
92
- font-weight: normal;
93
- color: #333333;
94
- }
95
- .ui-state-active a,
96
- .ui-state-active a:link,
97
- .ui-state-active a:visited {
98
- color: #333333;
99
- text-decoration: none;
100
- }
101
-
102
- /* Interaction Cues
103
- ----------------------------------*/
104
- .ui-state-highlight,
105
- .ui-widget-content .ui-state-highlight,
106
- .ui-widget-header .ui-state-highlight {
107
- border: 1px solid #cccccc;
108
- background: #ffffff;
109
- color: #333333;
110
- }
111
- .ui-state-highlight a,
112
- .ui-widget-content .ui-state-highlight a,
113
- .ui-widget-header .ui-state-highlight a {
114
- color: #333333;
115
- }
116
- .ui-state-error,
117
- .ui-widget-content .ui-state-error,
118
- .ui-widget-header .ui-state-error {
119
- border: 1px solid #f1a899;
120
- background: #fddfdf;
121
- color: #5f3f3f;
122
- }
123
- .ui-state-error a,
124
- .ui-widget-content .ui-state-error a,
125
- .ui-widget-header .ui-state-error a {
126
- color: #5f3f3f;
127
- }
128
- .ui-state-error-text,
129
- .ui-widget-content .ui-state-error-text,
130
- .ui-widget-header .ui-state-error-text {
131
- color: #5f3f3f;
132
- }
133
- .ui-priority-primary,
134
- .ui-widget-content .ui-priority-primary,
135
- .ui-widget-header .ui-priority-primary {
136
- font-weight: bold;
137
- }
138
- .ui-priority-secondary,
139
- .ui-widget-content .ui-priority-secondary,
140
- .ui-widget-header .ui-priority-secondary {
141
- opacity: .7;
142
- filter:Alpha(Opacity=70); /* support: IE8 */
143
- font-weight: normal;
144
- }
145
- .ui-state-disabled,
146
- .ui-widget-content .ui-state-disabled,
147
- .ui-widget-header .ui-state-disabled {
148
- opacity: .35;
149
- filter:Alpha(Opacity=35); /* support: IE8 */
150
- background-image: none;
151
- }
152
- .ui-state-disabled .ui-icon {
153
- filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */
154
- }
155
-
156
- /* Icons
157
- ----------------------------------*/
158
-
159
- /* states and images */
160
- .ui-icon {
161
- width: 16px;
162
- height: 16px;
163
- }
164
- .ui-icon,
165
- .ui-widget-content .ui-icon {
166
- background-image: url("images/ui-icons_444444_256x240.png");
167
- }
168
- .ui-widget-header .ui-icon {
169
- background-image: url("images/ui-icons_444444_256x240.png");
170
- }
171
- .ui-state-default .ui-icon {
172
- background-image: url("images/ui-icons_777777_256x240.png");
173
- }
174
- .ui-state-hover .ui-icon,
175
- .ui-state-focus .ui-icon {
176
- background-image: url("images/ui-icons_555555_256x240.png");
177
- }
178
- .ui-state-active .ui-icon {
179
- background-image: url("images/ui-icons_ffffff_256x240.png");
180
- }
181
- .ui-state-highlight .ui-icon {
182
- background-image: url("images/ui-icons_777777_256x240.png");
183
- }
184
- .ui-state-error .ui-icon,
185
- .ui-state-error-text .ui-icon {
186
- background-image: url("images/ui-icons_cc0000_256x240.png");
187
- }
188
-
189
- /* positioning */
190
- .ui-icon-blank { background-position: 16px 16px; }
191
- .ui-icon-carat-1-n { background-position: 0 0; }
192
- .ui-icon-carat-1-ne { background-position: -16px 0; }
193
- .ui-icon-carat-1-e { background-position: -32px 0; }
194
- .ui-icon-carat-1-se { background-position: -48px 0; }
195
- .ui-icon-carat-1-s { background-position: -64px 0; }
196
- .ui-icon-carat-1-sw { background-position: -80px 0; }
197
- .ui-icon-carat-1-w { background-position: -96px 0; }
198
- .ui-icon-carat-1-nw { background-position: -112px 0; }
199
- .ui-icon-carat-2-n-s { background-position: -128px 0; }
200
- .ui-icon-carat-2-e-w { background-position: -144px 0; }
201
- .ui-icon-triangle-1-n { background-position: 0 -16px; }
202
- .ui-icon-triangle-1-ne { background-position: -16px -16px; }
203
- .ui-icon-triangle-1-e { background-position: -32px -16px; }
204
- .ui-icon-triangle-1-se { background-position: -48px -16px; }
205
- .ui-icon-triangle-1-s { background-position: -64px -16px; }
206
- .ui-icon-triangle-1-sw { background-position: -80px -16px; }
207
- .ui-icon-triangle-1-w { background-position: -96px -16px; }
208
- .ui-icon-triangle-1-nw { background-position: -112px -16px; }
209
- .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
210
- .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
211
- .ui-icon-arrow-1-n { background-position: 0 -32px; }
212
- .ui-icon-arrow-1-ne { background-position: -16px -32px; }
213
- .ui-icon-arrow-1-e { background-position: -32px -32px; }
214
- .ui-icon-arrow-1-se { background-position: -48px -32px; }
215
- .ui-icon-arrow-1-s { background-position: -64px -32px; }
216
- .ui-icon-arrow-1-sw { background-position: -80px -32px; }
217
- .ui-icon-arrow-1-w { background-position: -96px -32px; }
218
- .ui-icon-arrow-1-nw { background-position: -112px -32px; }
219
- .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
220
- .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
221
- .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
222
- .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
223
- .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
224
- .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
225
- .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
226
- .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
227
- .ui-icon-arrowthick-1-n { background-position: 0 -48px; }
228
- .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
229
- .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
230
- .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
231
- .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
232
- .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
233
- .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
234
- .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
235
- .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
236
- .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
237
- .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
238
- .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
239
- .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
240
- .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
241
- .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
242
- .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
243
- .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
244
- .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
245
- .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
246
- .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
247
- .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
248
- .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
249
- .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
250
- .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
251
- .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
252
- .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
253
- .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
254
- .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
255
- .ui-icon-arrow-4 { background-position: 0 -80px; }
256
- .ui-icon-arrow-4-diag { background-position: -16px -80px; }
257
- .ui-icon-extlink { background-position: -32px -80px; }
258
- .ui-icon-newwin { background-position: -48px -80px; }
259
- .ui-icon-refresh { background-position: -64px -80px; }
260
- .ui-icon-shuffle { background-position: -80px -80px; }
261
- .ui-icon-transfer-e-w { background-position: -96px -80px; }
262
- .ui-icon-transferthick-e-w { background-position: -112px -80px; }
263
- .ui-icon-folder-collapsed { background-position: 0 -96px; }
264
- .ui-icon-folder-open { background-position: -16px -96px; }
265
- .ui-icon-document { background-position: -32px -96px; }
266
- .ui-icon-document-b { background-position: -48px -96px; }
267
- .ui-icon-note { background-position: -64px -96px; }
268
- .ui-icon-mail-closed { background-position: -80px -96px; }
269
- .ui-icon-mail-open { background-position: -96px -96px; }
270
- .ui-icon-suitcase { background-position: -112px -96px; }
271
- .ui-icon-comment { background-position: -128px -96px; }
272
- .ui-icon-person { background-position: -144px -96px; }
273
- .ui-icon-print { background-position: -160px -96px; }
274
- .ui-icon-trash { background-position: -176px -96px; }
275
- .ui-icon-locked { background-position: -192px -96px; }
276
- .ui-icon-unlocked { background-position: -208px -96px; }
277
- .ui-icon-bookmark { background-position: -224px -96px; }
278
- .ui-icon-tag { background-position: -240px -96px; }
279
- .ui-icon-home { background-position: 0 -112px; }
280
- .ui-icon-flag { background-position: -16px -112px; }
281
- .ui-icon-calendar { background-position: -32px -112px; }
282
- .ui-icon-cart { background-position: -48px -112px; }
283
- .ui-icon-pencil { background-position: -64px -112px; }
284
- .ui-icon-clock { background-position: -80px -112px; }
285
- .ui-icon-disk { background-position: -96px -112px; }
286
- .ui-icon-calculator { background-position: -112px -112px; }
287
- .ui-icon-zoomin { background-position: -128px -112px; }
288
- .ui-icon-zoomout { background-position: -144px -112px; }
289
- .ui-icon-search { background-position: -160px -112px; }
290
- .ui-icon-wrench { background-position: -176px -112px; }
291
- .ui-icon-gear { background-position: -192px -112px; }
292
- .ui-icon-heart { background-position: -208px -112px; }
293
- .ui-icon-star { background-position: -224px -112px; }
294
- .ui-icon-link { background-position: -240px -112px; }
295
- .ui-icon-cancel { background-position: 0 -128px; }
296
- .ui-icon-plus { background-position: -16px -128px; }
297
- .ui-icon-plusthick { background-position: -32px -128px; }
298
- .ui-icon-minus { background-position: -48px -128px; }
299
- .ui-icon-minusthick { background-position: -64px -128px; }
300
- .ui-icon-close { background-position: -80px -128px; }
301
- .ui-icon-closethick { background-position: -96px -128px; }
302
- .ui-icon-key { background-position: -112px -128px; }
303
- .ui-icon-lightbulb { background-position: -128px -128px; }
304
- .ui-icon-scissors { background-position: -144px -128px; }
305
- .ui-icon-clipboard { background-position: -160px -128px; }
306
- .ui-icon-copy { background-position: -176px -128px; }
307
- .ui-icon-contact { background-position: -192px -128px; }
308
- .ui-icon-image { background-position: -208px -128px; }
309
- .ui-icon-video { background-position: -224px -128px; }
310
- .ui-icon-script { background-position: -240px -128px; }
311
- .ui-icon-alert { background-position: 0 -144px; }
312
- .ui-icon-info { background-position: -16px -144px; }
313
- .ui-icon-notice { background-position: -32px -144px; }
314
- .ui-icon-help { background-position: -48px -144px; }
315
- .ui-icon-check { background-position: -64px -144px; }
316
- .ui-icon-bullet { background-position: -80px -144px; }
317
- .ui-icon-radio-on { background-position: -96px -144px; }
318
- .ui-icon-radio-off { background-position: -112px -144px; }
319
- .ui-icon-pin-w { background-position: -128px -144px; }
320
- .ui-icon-pin-s { background-position: -144px -144px; }
321
- .ui-icon-play { background-position: 0 -160px; }
322
- .ui-icon-pause { background-position: -16px -160px; }
323
- .ui-icon-seek-next { background-position: -32px -160px; }
324
- .ui-icon-seek-prev { background-position: -48px -160px; }
325
- .ui-icon-seek-end { background-position: -64px -160px; }
326
- .ui-icon-seek-start { background-position: -80px -160px; }
327
- /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
328
- .ui-icon-seek-first { background-position: -80px -160px; }
329
- .ui-icon-stop { background-position: -96px -160px; }
330
- .ui-icon-eject { background-position: -112px -160px; }
331
- .ui-icon-volume-off { background-position: -128px -160px; }
332
- .ui-icon-volume-on { background-position: -144px -160px; }
333
- .ui-icon-power { background-position: 0 -176px; }
334
- .ui-icon-signal-diag { background-position: -16px -176px; }
335
- .ui-icon-signal { background-position: -32px -176px; }
336
- .ui-icon-battery-0 { background-position: -48px -176px; }
337
- .ui-icon-battery-1 { background-position: -64px -176px; }
338
- .ui-icon-battery-2 { background-position: -80px -176px; }
339
- .ui-icon-battery-3 { background-position: -96px -176px; }
340
- .ui-icon-circle-plus { background-position: 0 -192px; }
341
- .ui-icon-circle-minus { background-position: -16px -192px; }
342
- .ui-icon-circle-close { background-position: -32px -192px; }
343
- .ui-icon-circle-triangle-e { background-position: -48px -192px; }
344
- .ui-icon-circle-triangle-s { background-position: -64px -192px; }
345
- .ui-icon-circle-triangle-w { background-position: -80px -192px; }
346
- .ui-icon-circle-triangle-n { background-position: -96px -192px; }
347
- .ui-icon-circle-arrow-e { background-position: -112px -192px; }
348
- .ui-icon-circle-arrow-s { background-position: -128px -192px; }
349
- .ui-icon-circle-arrow-w { background-position: -144px -192px; }
350
- .ui-icon-circle-arrow-n { background-position: -160px -192px; }
351
- .ui-icon-circle-zoomin { background-position: -176px -192px; }
352
- .ui-icon-circle-zoomout { background-position: -192px -192px; }
353
- .ui-icon-circle-check { background-position: -208px -192px; }
354
- .ui-icon-circlesmall-plus { background-position: 0 -208px; }
355
- .ui-icon-circlesmall-minus { background-position: -16px -208px; }
356
- .ui-icon-circlesmall-close { background-position: -32px -208px; }
357
- .ui-icon-squaresmall-plus { background-position: -48px -208px; }
358
- .ui-icon-squaresmall-minus { background-position: -64px -208px; }
359
- .ui-icon-squaresmall-close { background-position: -80px -208px; }
360
- .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
361
- .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
362
- .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
363
- .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
364
- .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
365
- .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
366
-
367
-
368
- /* Misc visuals
369
- ----------------------------------*/
370
-
371
- /* Corner radius */
372
- .ui-corner-all,
373
- .ui-corner-top,
374
- .ui-corner-left,
375
- .ui-corner-tl {
376
- border-top-left-radius: 0px;
377
- }
378
- .ui-corner-all,
379
- .ui-corner-top,
380
- .ui-corner-right,
381
- .ui-corner-tr {
382
- border-top-right-radius: 0px;
383
- }
384
- .ui-corner-all,
385
- .ui-corner-bottom,
386
- .ui-corner-left,
387
- .ui-corner-bl {
388
- border-bottom-left-radius: 0px;
389
- }
390
- .ui-corner-all,
391
- .ui-corner-bottom,
392
- .ui-corner-right,
393
- .ui-corner-br {
394
- border-bottom-right-radius: 0px;
395
- }
396
-
397
- /* Overlays */
398
- .ui-widget-overlay {
399
- background: #aaaaaa;
400
- opacity: .3;
401
- filter: Alpha(Opacity=30); /* support: IE8 */
402
- }
403
- .ui-widget-shadow {
404
- margin: 0px 0 0 0px;
405
- padding: 5px;
406
- background: #666666;
407
- opacity: .3;
408
- filter: Alpha(Opacity=30); /* support: IE8 */
409
- border-radius: 0px;
410
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
jquery-ui-1.11.4/jquery-ui.theme.min.css DELETED
@@ -1,5 +0,0 @@
1
- /*! jQuery UI - v1.11.4 - 2016-11-13
2
- * http://jqueryui.com
3
- * Copyright jQuery Foundation and other contributors; Licensed MIT */
4
-
5
- .ui-widget{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:1em}.ui-widget-content{border:1px solid #ccc;background:#fff;color:#444}.ui-widget-content a{color:#444}.ui-widget-header{border:1px solid #e5e5e5;background:#f5f5f5;color:#444;font-weight:bold}.ui-widget-header a{color:#444}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #d5d5d5;background:#e5e5e5;font-weight:normal;color:#444}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#444;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #ccc;background:#ededed;font-weight:normal;color:#444}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited{color:#444;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #e5e5e5;background:#f5f5f5;font-weight:normal;color:#333}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#333;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #ccc;background:#fff;color:#333}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#333}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #f1a899;background:#fddfdf;color:#5f3f3f}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#5f3f3f}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#5f3f3f}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_444444_256x240.png")}.ui-widget-header .ui-icon{background-image:url("images/ui-icons_444444_256x240.png")}.ui-state-default .ui-icon{background-image:url("images/ui-icons_777777_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url("images/ui-icons_555555_256x240.png")}.ui-state-active .ui-icon{background-image:url("images/ui-icons_ffffff_256x240.png")}.ui-state-highlight .ui-icon{background-image:url("images/ui-icons_777777_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_cc0000_256x240.png")}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:0}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:0}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:0}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:0}.ui-widget-overlay{background:#aaa;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{margin:0 0 0 0;padding:5px;background:#666;opacity:.3;filter:Alpha(Opacity=30);border-radius:0}
 
 
 
 
 
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Library File Manager ===
2
  Contributors: aihimel
3
  Tags: file manager, wp file manager, FTP, elfinder, file Browser, manage files, upload, delete, rename, copy, move, online file browser, remote file manager, drag and drop, folder upload
4
- Requires at least: 4.0.0
5
  Tested up to: 5.9.3
6
  Requires PHP: 5.6
7
- Stable tag: 5.2.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -18,7 +18,6 @@ Just install the plugin by following the standard WordPress plugin install proce
18
 
19
  = Key Features =
20
 
21
- + Automatic media sync
22
  + Upload, Download and Delete operations
23
  + All operations with files and folders (copy, move, upload, create folder/file, rename, archive, extract, edit, etc.)
24
  + Download, upload, cut, copy, duplicate, paste, delete, create directory, create file, edit file, rename, archive, extract
@@ -32,6 +31,8 @@ Just install the plugin by following the standard WordPress plugin install proce
32
  + Calculate directory sizes
33
  + Video and audio preview/play
34
  + File manager supports file search and sort
 
 
35
 
36
  = Extended Features =
37
 
@@ -75,8 +76,48 @@ Just install the plugin by following the standard WordPress plugin install proce
75
  We try to make our plugin compatible with as many plugin/theme as possible. If you find any compatability issue with any 3rd party plugin/theme, kindly report it to us via our plugin support forum or on our website.
76
 
77
  **Plugins**
 
78
  + WPML -- Best WP plugin to translate and display your website in any languages
79
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  == Installation ==
81
 
82
  = Requirements =
@@ -102,19 +143,19 @@ We try to make our plugin compatible with as many plugin/theme as possible. If y
102
 
103
  = Invalid backend configuration. Readable volumes not available. =
104
 
105
- Please check your file permission from your hosting panel. The permission must be 0755 for file/folder. If you are using a vps(virtual private server) then you must ensure that the owner of your installation is PHP aka www-data
106
 
107
  = I can not upload larger files then *MB =
108
 
109
- You can upload any size of file.
110
 
111
  = Can I preview .psd and document files? =
112
 
113
- Yes you can.
114
 
115
- = Will I support the plugin? =
116
 
117
- Yes, I will support the plugin.
118
 
119
 
120
  == Screenshots ==
@@ -129,17 +170,37 @@ Yes, I will support the plugin.
129
  8. Edit file
130
  9. Right Click Menu
131
  10. Library File manager settings page
132
- 11. Server details.
 
 
133
 
134
 
135
  == Upgrade Notice ==
136
 
137
- = 5.2.4 =
138
  + No special requirements.
139
 
140
 
141
  == Changelog ==
142
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
  = 5.2.4 (10 April, 2022) =
144
  * Tested compatability for WordPress 5.9.3
145
  * Unicode character support for file/folder
@@ -197,13 +258,13 @@ Yes, I will support the plugin.
197
  * PDF preview added
198
  * PSD preview added
199
 
200
- = 5.1.1 (22 February 2019)=
201
  * Minor Bug fixed.
202
  * Code & Image editor added.
203
  * WYSIWYG Editor added.
204
  * Chunked file upload added. Upload large file regardless your php.ini settings.
205
 
206
- = 5.1.0 (21 February 2019)=
207
  * Updated to elFinder 2.1.46
208
  * Code Editor added for easy editing [Ace, Codemirror, TinyMCE & others].
209
  * Supported file format extended.
1
  === Library File Manager ===
2
  Contributors: aihimel
3
  Tags: file manager, wp file manager, FTP, elfinder, file Browser, manage files, upload, delete, rename, copy, move, online file browser, remote file manager, drag and drop, folder upload
4
+ Requires at least: 4.0
5
  Tested up to: 5.9.3
6
  Requires PHP: 5.6
7
+ Stable tag: 5.2.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
18
 
19
  = Key Features =
20
 
 
21
  + Upload, Download and Delete operations
22
  + All operations with files and folders (copy, move, upload, create folder/file, rename, archive, extract, edit, etc.)
23
  + Download, upload, cut, copy, duplicate, paste, delete, create directory, create file, edit file, rename, archive, extract
31
  + Calculate directory sizes
32
  + Video and audio preview/play
33
  + File manager supports file search and sort
34
+ + Automatic media sync
35
+ + Trash folder
36
 
37
  = Extended Features =
38
 
76
  We try to make our plugin compatible with as many plugin/theme as possible. If you find any compatability issue with any 3rd party plugin/theme, kindly report it to us via our plugin support forum or on our website.
77
 
78
  **Plugins**
79
+
80
  + WPML -- Best WP plugin to translate and display your website in any languages
81
 
82
+ == Supported Languages(36) ==
83
+
84
+ + Arabic
85
+ + Bulgarian
86
+ + Catalan
87
+ + Czech
88
+ + Danish
89
+ + German
90
+ + Greek
91
+ + English
92
+ + Español
93
+ + Persian/Farsi
94
+ + Faroese
95
+ + Française/French
96
+ + Canadienne française/French Canadian
97
+ + Hebrew/hébreu
98
+ + Croatian
99
+ + Hungarian
100
+ + Indonesian
101
+ + Italiano/Italian
102
+ + Japanese
103
+ + Korean
104
+ + Dutch
105
+ + Norwegian
106
+ + Polskie/Polish
107
+ + Português/Porguese
108
+ + Română/Romanian/Moldavian/Moldovan
109
+ + Russian
110
+ + Sinhala
111
+ + Slovak
112
+ + Slovenian
113
+ + Serbian
114
+ + Swedish
115
+ + Türkçe/Turkish
116
+ + Uyghur
117
+ + Ukrainian
118
+ + Vietnamese
119
+ + Chinese
120
+
121
  == Installation ==
122
 
123
  = Requirements =
143
 
144
  = Invalid backend configuration. Readable volumes not available. =
145
 
146
+ Please check your file permission from your hosting panel. The permission must be 0755 for file/folder. If you are using a vps(virtual private server) then you must ensure that the owner of your installation is PHP aka www-data. Another reason could be wrong root folder path/url. Inserting a correct root folder path/URL should fix the issue.
147
 
148
  = I can not upload larger files then *MB =
149
 
150
+ You can upload any size of file. Library file manager plugin uploads files in chunks. So a very large file can be easily uploaded & downloaded.
151
 
152
  = Can I preview .psd and document files? =
153
 
154
+ Yes, documents like PSD, DOCX can be previewd via file manager preview.
155
 
156
+ = Can I change file permission like cPanel? =
157
 
158
+ Yes, file/folder permission can be changed like cPanel and other hosting management interfaces. It is very easy. Just right click on the file and you will see a menu named **Change Mode **. Clicking will open a dialogue box, where you can update the file permission, just like cPanel.
159
 
160
 
161
  == Screenshots ==
170
  8. Edit file
171
  9. Right Click Menu
172
  10. Library File manager settings page
173
+ 11. Server details
174
+ 12. Emailing File
175
+ 13. Changing file permission
176
 
177
 
178
  == Upgrade Notice ==
179
 
180
+ = 5.2.6 =
181
  + No special requirements.
182
 
183
 
184
  == Changelog ==
185
 
186
+ = 5.2.6 (19 Aprin, 2022) =
187
+ * File permission change added
188
+ * Logo updated
189
+ * FAQ updated
190
+ * New screenshot added
191
+ * Minor bug fixes
192
+
193
+ = 5.2.5 (14 April, 2022) =
194
+ * File preview design issue fixed.
195
+ * Code editor design issue fixed.
196
+ * Full screen design issue fixed.
197
+ * Trash folder feature added.
198
+ * Plugin debug is synchronized with WP_DEBUG
199
+ * Setttings configuration issue fixed
200
+ * Codemirror issue fixed
201
+ * Code quality improvement
202
+ * Other minor bug fixes
203
+
204
  = 5.2.4 (10 April, 2022) =
205
  * Tested compatability for WordPress 5.9.3
206
  * Unicode character support for file/folder
258
  * PDF preview added
259
  * PSD preview added
260
 
261
+ = 5.1.1 (22 February 2019) =
262
  * Minor Bug fixed.
263
  * Code & Image editor added.
264
  * WYSIWYG Editor added.
265
  * Chunked file upload added. Upload large file regardless your php.ini settings.
266
 
267
+ = 5.1.0 (21 February 2019) =
268
  * Updated to elFinder 2.1.46
269
  * Code Editor added for easy editing [Ace, Codemirror, TinyMCE & others].
270
  * Supported file format extended.
views/admin/files.php CHANGED
@@ -47,7 +47,7 @@ if($FileManager->options['file_manager_settings']['show_url_path'] && $FileManag
47
  $commandOptions['info']['hideItems'][] = 'path';
48
  }
49
  wp_enqueue_style( 'fmp-jquery-ui-css' );
50
- wp_enqueue_style( 'fmp-elfinder-css' );
51
  wp_enqueue_style( 'fmp-elfinder-theme-css' );
52
 
53
 
@@ -86,7 +86,20 @@ jQuery(document).ready(function(){
86
  width: '<?php if(isset($FileManager->options['file_manager_settings']['size']['width'])) echo esc_js($FileManager->options['file_manager_settings']['size']['width']); ?>',
87
  height: '<?php if(isset($FileManager->options['file_manager_settings']['size']['height'])) echo esc_js($FileManager->options['file_manager_settings']['size']['height']); ?>',
88
  commandsOptions : <?php echo json_encode($commandOptions); ?>,
 
 
 
 
 
 
89
 
 
 
 
 
 
 
 
90
  });
91
  });
92
 
47
  $commandOptions['info']['hideItems'][] = 'path';
48
  }
49
  wp_enqueue_style( 'fmp-jquery-ui-css' );
50
+ wp_enqueue_style( $FileManager->is_minified_file_load('fmp-elfinder-css')['handle'] );
51
  wp_enqueue_style( 'fmp-elfinder-theme-css' );
52
 
53
 
86
  width: '<?php if(isset($FileManager->options['file_manager_settings']['size']['width'])) echo esc_js($FileManager->options['file_manager_settings']['size']['width']); ?>',
87
  height: '<?php if(isset($FileManager->options['file_manager_settings']['size']['height'])) echo esc_js($FileManager->options['file_manager_settings']['size']['height']); ?>',
88
  commandsOptions : <?php echo json_encode($commandOptions); ?>,
89
+ rememberLastDir: '<?php if(isset($FileManager->options['file_manager_settings']['fm-remember-last-dir'])) echo esc_js($FileManager->options['file_manager_settings']['fm-remember-last-dir']); ?>',
90
+ reloadClearHistory:'<?php if(isset($FileManager->options['file_manager_settings']['fm-clear-history-on-reload'])) echo esc_js($FileManager->options['file_manager_settings']['fm-clear-history-on-reload']); ?>',
91
+ defaultView: '<?php if(isset($FileManager->options['file_manager_settings']['fm_default_view_type'])) echo esc_js($FileManager->options['file_manager_settings']['fm_default_view_type']); ?>', // 'list' @ref:https://github.com/Studio-42/elFinder/wiki/Client-configuration-options-2.1#defaultView
92
+ ui: <?php if(isset($FileManager->options['file_manager_settings']['fm_display_ui_options'])) echo json_encode($FileManager->options['file_manager_settings']['fm_display_ui_options']); else echo json_encode(['toolbar', 'places', 'tree', 'path', 'stat']) ?> ,
93
+
94
+
95
 
96
+ sortOrder: 'asc', //'desc'
97
+ sortStickFolders: true, // https://github.com/Studio-42/elFinder/wiki/Client-configuration-options-2.1#sortStickFolders
98
+ dragUploadAllow : 'auto',
99
+ fileModeStyle: "both",
100
+ resizable: true
101
+
102
+
103
  });
104
  });
105
 
views/admin/header.php CHANGED
@@ -13,7 +13,7 @@ wp_enqueue_script( 'fmp-admin-script' );
13
  ?>
14
  <div class='fm-header'>
15
 
16
- <h1><img class='fm-logo' src='<?php echo plugin_dir_url(__FILE__) . '../../img/icon-128x128.png';?>'><?php _e('Library File Manager', 'file-manager'); ?></h1>
17
 
18
  <ul class='top-right-menu'>
19
  <li><a href='<?php echo esc_url($FileManager->support_page); ?>'><?php _e("Need help?", 'file-manager'); ?></a></li>
13
  ?>
14
  <div class='fm-header'>
15
 
16
+ <h1><img class='fm-logo' src='<?php echo plugin_dir_url(__FILE__) . '../../img/icon-256x256.png';?>'><?php _e('Library File Manager', 'file-manager'); ?></h1>
17
 
18
  <ul class='top-right-menu'>
19
  <li><a href='<?php echo esc_url($FileManager->support_page); ?>'><?php _e("Need help?", 'file-manager'); ?></a></li>
views/admin/settings.php CHANGED
@@ -16,7 +16,6 @@ if (isset($_POST) && !empty($_POST)) {
16
  if (isset($_POST['show_url_path']) && ($_POST['show_url_path'] == 'show' || $_POST['show_url_path'] == 'hide')) {
17
  $FileManager->options['file_manager_settings']['show_url_path'] = $_POST['show_url_path'];
18
  }
19
-
20
  $FileManager->options['file_manager_settings']['root_folder_path'] = sanitize_text_field($_POST['root_folder_path']) ? sanitize_text_field(truepath($_POST['root_folder_path'])) : '';
21
  $FileManager->options['file_manager_settings']['root_folder_url'] = esc_url_raw($_POST['root_folder_url']) ? esc_url_raw($_POST['root_folder_url']) : '';
22
 
@@ -24,10 +23,14 @@ if (isset($_POST) && !empty($_POST)) {
24
 
25
  $FileManager->options['file_manager_settings']['size']['width'] = filter_var($_POST['width'], FILTER_VALIDATE_INT) ? $_POST['width'] : 'auto';
26
  $FileManager->options['file_manager_settings']['size']['height'] = filter_var($_POST['height'], FILTER_VALIDATE_INT) ? $_POST['height'] : 600;
27
- $FileManager->options['file_manager_settings']['fm-show-hidden-files'] = isset($_POST['fm-show-hidden-files']) && !empty($_POST['fm-show-hidden-files']) ? filter_var($_POST['fm-show-hidden-files'], FILTER_SANITIZE_STRING) : '';
28
  $FileManager->options['file_manager_settings']['fm-create-hidden-files-folders'] = isset($_POST['fm-create-hidden-files-folders']) && !empty($_POST['fm-create-hidden-files-folders']) ? filter_var($_POST['fm-create-hidden-files-folders'], FILTER_SANITIZE_STRING) : '';
29
  $FileManager->options['file_manager_settings']['fm-create-trash-files-folders'] = isset($_POST['fm-create-trash-files-folders']) && !empty($_POST['fm-create-trash-files-folders']) ? filter_var($_POST['fm-create-trash-files-folders'], FILTER_SANITIZE_STRING) : '';
30
  $FileManager->options['file_manager_settings']['fm_root_folder_name'] = isset($_POST['fm_root_folder_name']) && !empty($_POST['fm_root_folder_name']) ? filter_var($_POST['fm_root_folder_name'], FILTER_SANITIZE_STRING) : 'WP Root';
 
 
 
 
31
 
32
  }
33
 
@@ -112,7 +115,7 @@ global $fm_languages;
112
 
113
  <td>
114
  <label for='root_folder_path_id'> <?php _e("Root Folder Path", 'file-manager');?> </label>
115
- <input type='text' name='root_folder_path' onchange="pathVlidation()" id='root_folder_path_id' value='<?php if (isset($FileManager->options['file_manager_settings']['root_folder_path']) && !empty($FileManager->options['file_manager_settings']['root_folder_path'])) {
116
  echo esc_attr($FileManager->options['file_manager_settings']['root_folder_path']);
117
  }
118
  ?>' /></br>
@@ -136,7 +139,7 @@ global $fm_languages;
136
  <br><br>
137
  <label for='root_folder_url_id'> <?php _e("Root Folder URL", 'file-manager');?> </label>
138
  &nbsp;
139
- <input type='text' name='root_folder_url' onchange="validURL()" id='root_folder_url_id' value='<?php if (isset($FileManager->options['file_manager_settings']['root_folder_url']) && !empty($FileManager->options['file_manager_settings']['root_folder_url'])) {
140
  echo esc_attr($FileManager->options['file_manager_settings']['root_folder_url']);
141
  }
142
  ?>' /><br/>
@@ -202,13 +205,16 @@ $language_code = $language_settings['code'];
202
  <tr>
203
  <td><h4><?php _e("Size", 'file-manager');?></h4></td>
204
  <td>
205
- <label for='fm-width-id'><?php _e("Width", 'file-manager');?></label><input id='fm-width-id' type='text' name='width' value='<?php if (isset($FileManager->options['file_manager_settings']['size']['width']) && !empty($FileManager->options['file_manager_settings']['size']['width'])) {
 
206
  echo esc_attr($FileManager->options['file_manager_settings']['size']['width']);
207
  } else {
208
  echo 'auto';
209
  }
210
  ?>'>
211
- <label for='fm-height-id'><?php _e("Height", 'file-manager');?></label><input id='fm-height-id' type='text' name='height' value='<?php if (isset($FileManager->options['file_manager_settings']['size']['height']) && !empty($FileManager->options['file_manager_settings']['size']['height'])) {
 
 
212
  echo esc_attr($FileManager->options['file_manager_settings']['size']['height']);
213
  } else {
214
  echo 400;
@@ -260,6 +266,49 @@ $language_code = $language_settings['code'];
260
  ?>'>
261
  </td>
262
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
263
  <tr>
264
  <td></td>
265
  <td>
16
  if (isset($_POST['show_url_path']) && ($_POST['show_url_path'] == 'show' || $_POST['show_url_path'] == 'hide')) {
17
  $FileManager->options['file_manager_settings']['show_url_path'] = $_POST['show_url_path'];
18
  }
 
19
  $FileManager->options['file_manager_settings']['root_folder_path'] = sanitize_text_field($_POST['root_folder_path']) ? sanitize_text_field(truepath($_POST['root_folder_path'])) : '';
20
  $FileManager->options['file_manager_settings']['root_folder_url'] = esc_url_raw($_POST['root_folder_url']) ? esc_url_raw($_POST['root_folder_url']) : '';
21
 
23
 
24
  $FileManager->options['file_manager_settings']['size']['width'] = filter_var($_POST['width'], FILTER_VALIDATE_INT) ? $_POST['width'] : 'auto';
25
  $FileManager->options['file_manager_settings']['size']['height'] = filter_var($_POST['height'], FILTER_VALIDATE_INT) ? $_POST['height'] : 600;
26
+ $FileManager->options['file_manager_settings']['fm-show-hidden-files'] = isset($_POST['fm-show-hidden-files']) && !empty($_POST['fm-show-hidden-files']) ? filter_var($_POST['fm-show-hidden-files'], FILTER_SANITIZE_STRING ) : '';
27
  $FileManager->options['file_manager_settings']['fm-create-hidden-files-folders'] = isset($_POST['fm-create-hidden-files-folders']) && !empty($_POST['fm-create-hidden-files-folders']) ? filter_var($_POST['fm-create-hidden-files-folders'], FILTER_SANITIZE_STRING) : '';
28
  $FileManager->options['file_manager_settings']['fm-create-trash-files-folders'] = isset($_POST['fm-create-trash-files-folders']) && !empty($_POST['fm-create-trash-files-folders']) ? filter_var($_POST['fm-create-trash-files-folders'], FILTER_SANITIZE_STRING) : '';
29
  $FileManager->options['file_manager_settings']['fm_root_folder_name'] = isset($_POST['fm_root_folder_name']) && !empty($_POST['fm_root_folder_name']) ? filter_var($_POST['fm_root_folder_name'], FILTER_SANITIZE_STRING) : 'WP Root';
30
+ $FileManager->options['file_manager_settings']['fm_default_view_type'] = isset($_POST['fm_default_view_type']) && !empty($_POST['fm_default_view_type']) ? filter_var($_POST['fm_default_view_type'], FILTER_SANITIZE_STRING) : 'icons';
31
+ $FileManager->options['file_manager_settings']['fm-remember-last-dir'] = isset($_POST['fm-remember-last-dir']) && !empty($_POST['fm-remember-last-dir']) ? filter_var($_POST['fm-remember-last-dir'], FILTER_SANITIZE_STRING ) : 'checked';
32
+ $FileManager->options['file_manager_settings']['fm-clear-history-on-reload'] = isset($_POST['fm-clear-history-on-reload']) && !empty($_POST['fm-clear-history-on-reload']) ? filter_var($_POST['fm-clear-history-on-reload'], FILTER_SANITIZE_STRING ) : 'checked';
33
+ $FileManager->options['file_manager_settings']['fm_display_ui_options'] = isset($_POST['fm_display_ui_options']) && !empty($_POST['fm_display_ui_options']) ? filter_var_array($_POST['fm_display_ui_options']) : ['toolbar', 'places', 'tree', 'path', 'stat'];
34
 
35
  }
36
 
115
 
116
  <td>
117
  <label for='root_folder_path_id'> <?php _e("Root Folder Path", 'file-manager');?> </label>
118
+ <input type='text' name='root_folder_path' onkeyup="pathVlidation()" id='root_folder_path_id' value='<?php if (isset($FileManager->options['file_manager_settings']['root_folder_path']) && !empty($FileManager->options['file_manager_settings']['root_folder_path'])) {
119
  echo esc_attr($FileManager->options['file_manager_settings']['root_folder_path']);
120
  }
121
  ?>' /></br>
139
  <br><br>
140
  <label for='root_folder_url_id'> <?php _e("Root Folder URL", 'file-manager');?> </label>
141
  &nbsp;
142
+ <input type='text' name='root_folder_url' onkeyup="validURL()" id='root_folder_url_id' value='<?php if (isset($FileManager->options['file_manager_settings']['root_folder_url']) && !empty($FileManager->options['file_manager_settings']['root_folder_url'])) {
143
  echo esc_attr($FileManager->options['file_manager_settings']['root_folder_url']);
144
  }
145
  ?>' /><br/>
205
  <tr>
206
  <td><h4><?php _e("Size", 'file-manager');?></h4></td>
207
  <td>
208
+ <label for='fm-width-id'><?php _e("Width", 'file-manager');?></label>
209
+ &nbsp;&nbsp;&nbsp;<input id='fm-width-id' type='text' name='width' value='<?php if (isset($FileManager->options['file_manager_settings']['size']['width']) && !empty($FileManager->options['file_manager_settings']['size']['width'])) {
210
  echo esc_attr($FileManager->options['file_manager_settings']['size']['width']);
211
  } else {
212
  echo 'auto';
213
  }
214
  ?>'>
215
+ <br/>
216
+ <label for='fm-height-id'><?php _e("Height", 'file-manager');?></label>
217
+ &nbsp;&nbsp;<input id='fm-height-id' type='text' name='height' value='<?php if (isset($FileManager->options['file_manager_settings']['size']['height']) && !empty($FileManager->options['file_manager_settings']['size']['height'])) {
218
  echo esc_attr($FileManager->options['file_manager_settings']['size']['height']);
219
  } else {
220
  echo 400;
266
  ?>'>
267
  </td>
268
  </tr>
269
+ <tr>
270
+ <td><h4><?php _e("Default View Type", 'file-manager');?></h4></td>
271
+ <td>
272
+ <?php
273
+ $default_view_type = isset($FileManager->options['file_manager_settings']['fm_default_view_type']) ? $FileManager->options['file_manager_settings']['fm_default_view_type'] : 'icon';
274
+ ?>
275
+ <label for='fm-root-folder-name-id'></label>
276
+ <select id="fm_default_view_type" name="fm_default_view_type" >
277
+ <option disabled>Select Defualt View Type</option>
278
+ <option <?php selected('icons', $default_view_type);?> value='icons'>Icons</option>
279
+ <option <?php selected('list', $default_view_type);?> value='list'>List</option>
280
+ </select>
281
+ </td>
282
+ </tr>
283
+ <tr>
284
+ <td><h4><label for='fm-remember-last-dir'><?php _e("Remember Last Directory", 'file-manager');?></label></h4></td>
285
+ <td>
286
+ <input id='fm-remember-last-dir' type='checkbox' name='fm-remember-last-dir' <?php if (isset($FileManager->options['file_manager_settings']['fm-remember-last-dir']) && !empty($FileManager->options['file_manager_settings']['fm-remember-last-dir'])) echo "checked"?> value="fm-remember-last-dir">
287
+ <small><?php _e("Remeber last opened dir to open it after reload.", 'file-manager');?></small>
288
+ </td>
289
+ </tr>
290
+ <tr>
291
+ <td><h4><label for='fm-clear-history-on-reload'><?php _e("Clrear History On Reload", 'file-manager');?></label></h4></td>
292
+ <td>
293
+ <input id='fm-clear-history-on-reload' type='checkbox' name='fm-clear-history-on-reload' <?php if (isset($FileManager->options['file_manager_settings']['fm-clear-history-on-reload']) && !empty($FileManager->options['file_manager_settings']['fm-clear-history-on-reload'])) echo "checked"?> value="fm-clear-history-on-reload">
294
+ <small><?php _e("Clear historys(elFinder) on reload(not browser).", 'file-manager');?></small>
295
+ </td>
296
+ </tr>
297
+ <tr>
298
+ <td><h4><?php _e("Default View Type", 'file-manager');?></h4></td>
299
+ <td>
300
+ <label for='fm-root-folder-name-id'></label>
301
+ <select id="fm_display_ui_options" name="fm_display_ui_options[]" multiple>
302
+ <option disabled>Select Defualt View Type</option>
303
+ <?php
304
+ $uioptions = ['toolbar', 'places', 'tree', 'path', 'stat'];
305
+ foreach($uioptions as $place){ ?>
306
+ <option <?php if(in_array($place, isset($FileManager->options['file_manager_settings']['fm_display_ui_options'])? $FileManager->options['file_manager_settings']['fm_display_ui_options']: $uioptions)) echo 'selected' ?> value='<?php echo $place; ?>' ><?php echo $place; ?></option>
307
+
308
+ <?php } ?>
309
+ </select>
310
+ </td>
311
+ </tr>
312
  <tr>
313
  <td></td>
314
  <td>