All-in-One Event Calendar - Version 2.2.0

Version Description

Download this release

Release Info

Developer jbutkus
Plugin Icon 128x128 All-in-One Event Calendar
Version 2.2.0
Comparing to
See all releases

Code changes from version 2.1.9 to 2.2.0

Files changed (138) hide show
  1. all-in-one-event-calendar.php +1 -1
  2. app/config/constants.php +13 -6
  3. app/controller/extension-license.php +2 -1
  4. app/controller/extension.php +1 -1
  5. app/controller/front.php +69 -45
  6. app/controller/javascript-widget.php +23 -16
  7. app/controller/javascript.php +21 -10
  8. app/model/event.php +62 -21
  9. app/model/event/creating.php +42 -13
  10. app/model/event/instance.php +131 -102
  11. app/model/event/taxonomy.php +26 -13
  12. app/model/option.php +4 -1
  13. app/model/search.php +28 -3
  14. app/model/settings.php +64 -3
  15. app/view/admin/abstract.php +4 -4
  16. app/view/admin/event-category.php +22 -32
  17. app/view/admin/get-repeat-box.php +29 -5
  18. app/view/admin/nav.php +1 -1
  19. app/view/admin/organize.php +105 -0
  20. app/view/admin/settings.php +19 -18
  21. app/view/admin/widget-creator.php +15 -8
  22. app/view/calendar/page.php +49 -26
  23. app/view/calendar/shortcode.php +5 -5
  24. app/view/calendar/subscribe-button.php +1 -2
  25. app/view/calendar/view/abstract.php +27 -4
  26. app/view/calendar/view/agenda.php +21 -10
  27. app/view/calendar/view/month.php +12 -7
  28. app/view/calendar/view/oneday.php +17 -24
  29. app/view/calendar/view/week.php +14 -10
  30. app/view/calendar/widget.php +12 -2
  31. app/view/embeddable.php +10 -1
  32. app/view/event/post.php +4 -0
  33. app/view/event/single.php +23 -6
  34. app/view/event/taxonomy.php +104 -111
  35. app/view/event/time.php +15 -5
  36. language/all-in-one-event-calendar.mo +0 -0
  37. language/all-in-one-event-calendar.po +528 -376
  38. language/all-in-one-event-calendar.pot +465 -341
  39. lib/bootstrap/loader-map.php +340 -48
  40. lib/bootstrap/registry/object.php +1 -1
  41. lib/cache/strategy/apc.php +2 -2
  42. lib/cache/strategy/file.php +25 -7
  43. lib/calendar-feed/ics.php +28 -11
  44. lib/calendar/state.php +66 -0
  45. lib/captcha/provider.php +102 -0
  46. lib/captcha/provider/nocaptcha.php +132 -0
  47. lib/captcha/provider/recaptcha.php +124 -0
  48. lib/captcha/providers.php +68 -0
  49. lib/captcha/validator.php +0 -42
  50. lib/clone/renderer-helper.php +7 -4
  51. lib/command/change-theme.php +2 -2
  52. lib/command/clone.php +17 -10
  53. lib/command/compile-core-css.php +60 -11
  54. lib/command/disable-gzip.php +1 -1
  55. lib/command/render-calendar.php +1 -0
  56. lib/command/render-event.php +26 -29
  57. lib/command/save-settings.php +1 -2
  58. lib/command/save-theme-options.php +5 -3
  59. lib/compatibility/check.php +89 -0
  60. lib/cookie/utility.php +1 -1
  61. lib/css/admin.php +2 -1
  62. lib/css/frontend.php +20 -6
  63. lib/database/helper.php +0 -1
  64. lib/date/system.php +11 -1
  65. lib/date/timezone.php +5 -5
  66. lib/edd/updater.php +91 -0
  67. lib/environment/check.php +16 -17
  68. lib/environment/exception/addon.php +14 -0
  69. lib/exception/ai1ec.php +18 -0
  70. lib/exception/handler.php +62 -29
  71. lib/factory/event.php +9 -3
  72. lib/filesystem/misc.php +182 -0
  73. lib/global-functions.php +68 -0
  74. lib/html/element/setting-renderer.php +41 -0
  75. lib/html/element/setting/abstract.php +20 -1
  76. lib/html/element/setting/select.php +54 -11
  77. lib/http/encoder.php +25 -0
  78. lib/http/request.php +12 -4
  79. lib/http/response/render/strategy/html.php +43 -49
  80. lib/import-export/ics.php +102 -34
  81. lib/less/lessphp.php +154 -75
  82. lib/notification/admin.php +4 -3
  83. lib/parser/date.php +13 -3
  84. lib/parser/frequency.php +40 -8
  85. lib/post/custom-type.php +10 -8
  86. lib/recurrence/rule.php +23 -4
  87. lib/robots/helper.php +2 -2
  88. lib/routing/router.php +31 -3
  89. lib/template/link/helper.php +0 -17
  90. lib/theme/compiler.php +20 -15
  91. lib/theme/list.php +8 -11
  92. lib/theme/loader.php +90 -3
  93. lib/twig/ai1ec-extension.php +13 -4
  94. lib/twig/cache.php +12 -0
  95. lib/twig/environment.php +73 -11
  96. lib/twig/loader.php +3 -4
  97. public/admin/box_event_location.php +81 -83
  98. public/admin/box_profile_timezone.php +1 -1
  99. public/admin/box_repeat.php +13 -4
  100. public/admin/box_time_and_date.php +1 -22
  101. public/admin/css/add_new_event.css +27 -67
  102. public/admin/css/bootstrap.min.css +47 -12
  103. public/admin/css/colorpicker.css +46 -87
  104. public/admin/css/datepicker.css +0 -204
  105. public/admin/css/settings.css +4 -6
  106. public/admin/css/super-widget.css +1 -1
  107. public/admin/css/taxonomies.css +0 -0
  108. public/admin/feed_row.php +13 -1
  109. public/admin/img/color-picker-default.png +0 -0
  110. public/admin/less/plugins/select2.less +1 -0
  111. public/admin/less/timely-admin.less +31 -0
  112. public/admin/less/timely-bootstrap.less +1 -0
  113. public/admin/less/timely-font-awesome.less +20 -11
  114. public/admin/less/timely-variables.less +1 -0
  115. public/admin/plugins/ics/display_feeds.php +10 -1
  116. public/admin/row_custom.php +15 -0
  117. public/admin/themes-install.php +4 -6
  118. public/admin/twig/notification/admin.twig +9 -16
  119. public/admin/twig/organize/header.twig +27 -0
  120. public/admin/twig/organize/tab.twig +20 -0
  121. public/admin/twig/setting/select-fieldsets.twig +4 -0
  122. public/admin/twig/setting/select.twig +5 -0
  123. public/admin/twig/widget-creator/super-widget-contents.twig +45 -41
  124. public/js/agenda.js +1 -1
  125. public/js/external_libs/ai1ec_datepicker.js +0 -1
  126. public/js/external_libs/moment.js +1 -5
  127. public/js/external_libs/twig.js +1 -19
  128. public/js/libs/captcha.js +1 -0
  129. public/js/libs/captcha/nocaptcha.js +1 -0
  130. public/js/libs/captcha/recaptcha.js +1 -0
  131. public/js/libs/captcha/void.js +1 -0
  132. public/js/libs/recaptcha.js +0 -1
  133. public/js/libs/twig.js +1 -0
  134. public/js/libs/utils.js +1 -1
  135. public/js/month.js +1 -1
  136. public/js/oneday.js +1 -1
  137. public/js/pages/add_new_event.js +23 -1
  138. public/js/pages/admin_settings.js +1 -20
all-in-one-event-calendar.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: A calendar system with month, week, day, agenda views, upcoming events widget, color-coded categories, recurrence, and import/export of .ics feeds.
6
  * Author: Time.ly Network Inc.
7
  * Author URI: http://time.ly/
8
- * Version: 2.1.9
9
  * Text Domain: all-in-one-event-calendar
10
  * Domain Path: /language
11
  */
5
  * Description: A calendar system with month, week, day, agenda views, upcoming events widget, color-coded categories, recurrence, and import/export of .ics feeds.
6
  * Author: Time.ly Network Inc.
7
  * Author URI: http://time.ly/
8
+ * Version: 2.2.0
9
  * Text Domain: all-in-one-event-calendar
10
  * Domain Path: /language
11
  */
app/config/constants.php CHANGED
@@ -50,7 +50,7 @@ function ai1ec_initiate_constants( $ai1ec_base_dir, $ai1ec_base_url ) {
50
  // = Plugin Version =
51
  // ==================
52
  if ( ! defined( 'AI1EC_VERSION' ) ) {
53
- define( 'AI1EC_VERSION', '2.1.9' );
54
  }
55
 
56
  // ================
@@ -359,11 +359,6 @@ function ai1ec_initiate_constants( $ai1ec_base_dir, $ai1ec_base_url ) {
359
  define( 'AI1EC_EVENT_PLATFORM', false );
360
  }
361
 
362
- // Use frontend rendering.
363
- if ( ! defined( 'AI1EC_USE_FRONTEND_RENDERING' ) ) {
364
- define( 'AI1EC_USE_FRONTEND_RENDERING', false );
365
- }
366
-
367
  // If i choose to use the calendar url as the base for events permalinks,
368
  // i must specify another name for the events archive.
369
  if ( ! defined( 'AI1EC_ALTERNATIVE_ARCHIVE_URL' ) ) {
@@ -492,4 +487,16 @@ function ai1ec_initiate_constants( $ai1ec_base_dir, $ai1ec_base_url ) {
492
  define( 'AI1EC_LESS_MIN_AVAIL_MEMORY', '24M' );
493
  }
494
 
 
 
 
 
 
 
 
 
 
 
 
 
495
  }
50
  // = Plugin Version =
51
  // ==================
52
  if ( ! defined( 'AI1EC_VERSION' ) ) {
53
+ define( 'AI1EC_VERSION', '2.2.0' );
54
  }
55
 
56
  // ================
359
  define( 'AI1EC_EVENT_PLATFORM', false );
360
  }
361
 
 
 
 
 
 
362
  // If i choose to use the calendar url as the base for events permalinks,
363
  // i must specify another name for the events archive.
364
  if ( ! defined( 'AI1EC_ALTERNATIVE_ARCHIVE_URL' ) ) {
487
  define( 'AI1EC_LESS_MIN_AVAIL_MEMORY', '24M' );
488
  }
489
 
490
+ // Defines if LESS files are parsed at every request
491
+ if ( ! defined( 'AI1EC_PARSE_LESS_FILES_AT_EVERY_REQUEST' ) ) {
492
+ define( 'AI1EC_PARSE_LESS_FILES_AT_EVERY_REQUEST', false );
493
+ }
494
+
495
+ // Defines a list of FER-enabled templates.
496
+ if ( ! defined( 'AI1EC_FER_ENABLED_TEMPLATES_LIST' ) ) {
497
+ define(
498
+ 'AI1EC_FER_ENABLED_TEMPLATES_LIST',
499
+ 'agenda,oneday,week,month,posterboard,stream'
500
+ );
501
+ }
502
  }
app/controller/extension-license.php CHANGED
@@ -128,7 +128,8 @@ abstract class Ai1ec_Base_License_Controller extends Ai1ec_Base_Extension_Contro
128
  $license_key = $this->_registry->get( 'model.settings' )
129
  ->get( $this->_licence );
130
  // setup the updater
131
- $edd_updater = new EDD_SL_Plugin_Updater(
 
132
  $this->_store,
133
  $this->get_file(),
134
  array(
128
  $license_key = $this->_registry->get( 'model.settings' )
129
  ->get( $this->_licence );
130
  // setup the updater
131
+ $edd_updater = $this->_registry->get(
132
+ 'edd.updater',
133
  $this->_store,
134
  $this->get_file(),
135
  array(
app/controller/extension.php CHANGED
@@ -125,7 +125,7 @@ abstract class Ai1ec_Base_Extension_Controller {
125
  * initialize the extension.
126
  */
127
  public function init( Ai1ec_Registry_Object $registry ) {
128
- $this->_registry = $registry;
129
  // static properties are needed as uninstall hook must be static
130
  // http://wpseek.com/register_uninstall_hook/
131
  self::$_registry_static = $registry;
125
  * initialize the extension.
126
  */
127
  public function init( Ai1ec_Registry_Object $registry ) {
128
+ $this->_registry = $registry;
129
  // static properties are needed as uninstall hook must be static
130
  // http://wpseek.com/register_uninstall_hook/
131
  self::$_registry_static = $registry;
app/controller/front.php CHANGED
@@ -79,6 +79,16 @@ class Ai1ec_Front_Controller {
79
  return $this->_default_theme;
80
  }
81
 
 
 
 
 
 
 
 
 
 
 
82
  /**
83
  * Notify extensions and pass them instance of objects registry.
84
  *
@@ -108,6 +118,28 @@ class Ai1ec_Front_Controller {
108
  return $this->_registry;
109
  }
110
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
111
  /**
112
  * Execute commands if our plugin must handle the request.
113
  *
@@ -143,14 +175,17 @@ class Ai1ec_Front_Controller {
143
  * @return void
144
  */
145
  public function initialize_router() {
146
- $settings = $this->_registry->get( 'model.settings' );
147
-
148
- $cal_page = $settings->get( 'calendar_page_id' );
 
 
149
 
150
  if (
151
  ! $cal_page ||
152
  $cal_page < 1
153
  ) { // Routing may not be affected in any way if no calendar page exists.
 
154
  return null;
155
  }
156
  $router = $this->_registry->get( 'routing.router' );
@@ -172,6 +207,7 @@ class Ai1ec_Front_Controller {
172
  $template_link_helper = $this->_registry->get( 'template.link.helper' );
173
 
174
  if ( ! get_post( $cal_page ) ) {
 
175
  return null;
176
  }
177
 
@@ -195,16 +231,18 @@ class Ai1ec_Front_Controller {
195
  // If the calendar is set as the front page, disable permalinks.
196
  // They would not be legal under a Windows server. See:
197
  // https://issues.apache.org/bugzilla/show_bug.cgi?id=41441
 
198
  if (
199
  $option->get( 'permalink_structure' ) &&
200
  ( int ) get_option( 'page_on_front' ) !==
201
- ( int ) $settings->get( 'calendar_page_id' )
202
  ) {
203
  $application->set( 'permalinks_enabled', true );
204
  }
205
 
206
  $router->asset_base( $page_base )
207
  ->register_rewrite( $page_link );
 
208
  }
209
 
210
  /**
@@ -241,10 +279,6 @@ class Ai1ec_Front_Controller {
241
  $this->_initialize_schema();
242
  // set the default theme if not set
243
  $this->_add_default_theme_if_not_set();
244
- // check if custom theme is set
245
- if ( is_admin() ) {
246
- $this->_check_old_theme();
247
- }
248
  } catch ( Ai1ec_Constants_Not_Set_Exception $e ) {
249
  // This is blocking, throw it and disable the plugin
250
  $exception = $e;
@@ -309,7 +343,7 @@ class Ai1ec_Front_Controller {
309
  Ai1ec_I18n::__(
310
  'Your active calendar theme could not be properly initialized. The default theme has been activated instead. Please visit %s and try reactivating your theme manually.'
311
  ),
312
- '<a href="' . admin_url( AI1EC_THEME_SELECTION_BASE_URL ) . '">' .
313
  Ai1ec_I18n::__( 'Calendar Themes' ) . '</a>'
314
  ),
315
  'error',
@@ -359,17 +393,23 @@ class Ai1ec_Front_Controller {
359
  'widgets_init',
360
  array( 'Ai1ec_View_Admin_Widget', 'register_widget' )
361
  );
362
- if ( isset( $_GET[Ai1ec_Controller_Javascript_Widget::WIDGET_PARAMETER] ) ) {
 
 
 
 
363
  $this->_registry->get( 'event.dispatcher' )->register_action(
364
  'init',
365
  array( 'controller.javascript-widget', 'render_js_widget' ),
366
  PHP_INT_MAX
367
  );
368
  }
 
369
  // Route the request.
370
  $action = 'template_redirect';
371
  if ( is_admin() ) {
372
  $action = 'init';
 
373
  }
374
  add_action( $action, array( $this, 'route_request' ) );
375
  add_filter( 'ai1ec_registry', array( $this, 'return_registry' ) );
@@ -419,6 +459,12 @@ class Ai1ec_Front_Controller {
419
  10,
420
  2
421
  );
 
 
 
 
 
 
422
  $dispatcher->register_action(
423
  'plugins_loaded',
424
  array( 'theme.loader', 'clean_cache_on_upgrade' ),
@@ -501,6 +547,19 @@ class Ai1ec_Front_Controller {
501
  'ai1ec',
502
  array( 'view.calendar.shortcode', 'shortcode' )
503
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
504
 
505
  if ( is_admin() ) {
506
  // get the repeat box
@@ -1019,39 +1078,4 @@ class Ai1ec_Front_Controller {
1019
 
1020
  return $sql;
1021
  }
1022
-
1023
- /**
1024
- * Performs run-once check if calendar is using theme outside core directory
1025
- * what may mean that it is old format theme.
1026
- *
1027
- * @return void Method does not return.
1028
- */
1029
- protected function _check_old_theme() {
1030
- $option = $this->_registry->get( 'model.option' );
1031
- if ( AI1EC_VERSION === $option->get( 'ai1ec_fer_checked', false ) ) {
1032
- return;
1033
- }
1034
- $cur_theme = $option->get( 'ai1ec_current_theme', array() );
1035
- $theme_root = dirname( AI1EC_DEFAULT_THEME_ROOT );
1036
- if (
1037
- ! isset( $cur_theme['theme_root'] ) ||
1038
- $theme_root === dirname( $cur_theme['theme_root'] )
1039
- ) {
1040
- $option->set( 'ai1ec_fer_checked', AI1EC_VERSION );
1041
- $cur_theme['legacy'] = false;
1042
- $option->set( 'ai1ec_current_theme', $cur_theme );
1043
- return;
1044
- }
1045
- $this->_registry->get( 'notification.admin' )->store(
1046
- Ai1ec_I18n::__(
1047
- 'You may be using a legacy custom calendar theme. If you have problems viewing the calendar, please read <a href="https://time.ly/">this article</a>.'
1048
- ),
1049
- 'error',
1050
- 0,
1051
- array( Ai1ec_Notification_Admin::RCPT_ADMIN ),
1052
- true
1053
- );
1054
- $option->set( 'ai1ec_fer_checked', AI1EC_VERSION );
1055
- }
1056
-
1057
  }
79
  return $this->_default_theme;
80
  }
81
 
82
+ /**
83
+ * Remove unwanted menus
84
+ */
85
+ public function admin_menu() {
86
+ remove_submenu_page(
87
+ 'edit.php?post_type=ai1ec_event',
88
+ 'edit-tags.php?taxonomy=events_tags&amp;post_type=ai1ec_event'
89
+ );
90
+ }
91
+
92
  /**
93
  * Notify extensions and pass them instance of objects registry.
94
  *
118
  return $this->_registry;
119
  }
120
 
121
+ /**
122
+ * If WIDGET_PARAMETER is set.
123
+ *
124
+ * @return boolean
125
+ */
126
+ protected function is_widget() {
127
+ return isset(
128
+ $_GET[Ai1ec_Controller_Javascript_Widget::WIDGET_PARAMETER]
129
+ );
130
+ }
131
+
132
+ /**
133
+ * If LEGACY_WIDGET_PARAMETER is set.
134
+ *
135
+ * @return boolean
136
+ */
137
+ protected function is_legacy_widget() {
138
+ return isset(
139
+ $_GET[Ai1ec_Controller_Javascript_Widget::LEGACY_WIDGET_PARAMETER]
140
+ );
141
+ }
142
+
143
  /**
144
  * Execute commands if our plugin must handle the request.
145
  *
175
  * @return void
176
  */
177
  public function initialize_router() {
178
+ /* @var $cal_state Ai1ec_Calendar_State */
179
+ $cal_state = $this->_registry->get( 'calendar.state' );
180
+ $cal_state->set_routing_initialization( true );
181
+ $settings = $this->_registry->get( 'model.settings' );
182
+ $cal_page = $settings->get( 'calendar_page_id' );
183
 
184
  if (
185
  ! $cal_page ||
186
  $cal_page < 1
187
  ) { // Routing may not be affected in any way if no calendar page exists.
188
+ $cal_state->set_routing_initialization( false );
189
  return null;
190
  }
191
  $router = $this->_registry->get( 'routing.router' );
207
  $template_link_helper = $this->_registry->get( 'template.link.helper' );
208
 
209
  if ( ! get_post( $cal_page ) ) {
210
+ $cal_state->set_routing_initialization( false );
211
  return null;
212
  }
213
 
231
  // If the calendar is set as the front page, disable permalinks.
232
  // They would not be legal under a Windows server. See:
233
  // https://issues.apache.org/bugzilla/show_bug.cgi?id=41441
234
+
235
  if (
236
  $option->get( 'permalink_structure' ) &&
237
  ( int ) get_option( 'page_on_front' ) !==
238
+ ( int ) $cal_page
239
  ) {
240
  $application->set( 'permalinks_enabled', true );
241
  }
242
 
243
  $router->asset_base( $page_base )
244
  ->register_rewrite( $page_link );
245
+ $cal_state->set_routing_initialization( false );
246
  }
247
 
248
  /**
279
  $this->_initialize_schema();
280
  // set the default theme if not set
281
  $this->_add_default_theme_if_not_set();
 
 
 
 
282
  } catch ( Ai1ec_Constants_Not_Set_Exception $e ) {
283
  // This is blocking, throw it and disable the plugin
284
  $exception = $e;
343
  Ai1ec_I18n::__(
344
  'Your active calendar theme could not be properly initialized. The default theme has been activated instead. Please visit %s and try reactivating your theme manually.'
345
  ),
346
+ '<a href="' . ai1ec_admin_url( AI1EC_THEME_SELECTION_BASE_URL ) . '">' .
347
  Ai1ec_I18n::__( 'Calendar Themes' ) . '</a>'
348
  ),
349
  'error',
393
  'widgets_init',
394
  array( 'Ai1ec_View_Admin_Widget', 'register_widget' )
395
  );
396
+
397
+ if (
398
+ $this->is_widget() ||
399
+ $this->is_legacy_widget()
400
+ ) {
401
  $this->_registry->get( 'event.dispatcher' )->register_action(
402
  'init',
403
  array( 'controller.javascript-widget', 'render_js_widget' ),
404
  PHP_INT_MAX
405
  );
406
  }
407
+
408
  // Route the request.
409
  $action = 'template_redirect';
410
  if ( is_admin() ) {
411
  $action = 'init';
412
+ add_action( 'admin_menu', array( $this, 'admin_menu' ) );
413
  }
414
  add_action( $action, array( $this, 'route_request' ) );
415
  add_filter( 'ai1ec_registry', array( $this, 'return_registry' ) );
459
  10,
460
  2
461
  );
462
+ // add the filter to let the organize page work
463
+ $dispatcher->register_action(
464
+ 'init',
465
+ array( 'view.admin.organize', 'add_taxonomy_actions' ),
466
+ 10000
467
+ );
468
  $dispatcher->register_action(
469
  'plugins_loaded',
470
  array( 'theme.loader', 'clean_cache_on_upgrade' ),
547
  'ai1ec',
548
  array( 'view.calendar.shortcode', 'shortcode' )
549
  );
550
+ $dispatcher->register_action(
551
+ 'updated_option',
552
+ array( 'model.settings', 'wp_options_observer' ),
553
+ PHP_INT_MAX - 1,
554
+ 3
555
+ );
556
+
557
+ $dispatcher->register_action(
558
+ 'ai1ec_settings_updated',
559
+ array( 'compatibility.check', 'ai1ec_settings_observer' ),
560
+ PHP_INT_MAX - 1,
561
+ 2
562
+ );
563
 
564
  if ( is_admin() ) {
565
  // get the repeat box
1078
 
1079
  return $sql;
1080
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1081
  }
app/controller/javascript-widget.php CHANGED
@@ -10,12 +10,13 @@
10
  * @subpackage AI1EC.Javascript
11
  */
12
  class Ai1ec_Controller_Javascript_Widget extends Ai1ec_Base {
13
-
14
  const WIDGET_PARAMETER = 'ai1ec_js_widget';
 
15
 
16
  protected $_widgets = array();
17
-
18
-
19
  public function add_widget( $widget_id, $widget_class ) {
20
  $this->_widgets[$widget_id] = $widget_class;
21
  }
@@ -44,7 +45,7 @@ class Ai1ec_Controller_Javascript_Widget extends Ai1ec_Base {
44
  * @return array
45
  */
46
  public function add_js_translation( array $data ) {
47
- $data['set_calendar_page'] = __(
48
  'You must choose the Calendar page before using the Super Widget',
49
  AI1EC_PLUGIN_NAME
50
  );
@@ -56,7 +57,11 @@ class Ai1ec_Controller_Javascript_Widget extends Ai1ec_Base {
56
  */
57
  public function render_js_widget() {
58
  if ( isset( $_GET['render'] ) && 'true' === $_GET['render'] ) {
59
- $widget = $_GET[self::WIDGET_PARAMETER];
 
 
 
 
60
  $widget_class = null;
61
  if ( isset( $this->_widgets[$widget] ) ) {
62
  $widget_class = $this->_widgets[$widget];
@@ -69,15 +74,15 @@ class Ai1ec_Controller_Javascript_Widget extends Ai1ec_Base {
69
  }
70
  $this->render_javascript();
71
  }
72
-
73
  public function render_javascript() {
74
  header( 'Content-Type: application/javascript' );
75
  header(
76
  'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + 31536000 ) . ' GMT'
77
  );
78
  header( 'Cache-Control: public, max-age=31536000' );
79
-
80
-
81
  $jscontroller = $this->_registry->get( 'controller.javascript' );
82
  $css_controller = $this->_registry->get( 'css.frontend' );
83
  $require_main = AI1EC_ADMIN_THEME_JS_PATH . DIRECTORY_SEPARATOR . 'require.js';
@@ -99,7 +104,7 @@ class Ai1ec_Controller_Javascript_Widget extends Ai1ec_Base {
99
  $extension_urls,
100
  'ai1ec_widget.js'
101
  );
102
-
103
  $translation['extension_urls'] = $extension_urls;
104
  // the single event page js is loaded dinamically.
105
  $translation['event_page'] = array(
@@ -120,23 +125,25 @@ class Ai1ec_Controller_Javascript_Widget extends Ai1ec_Base {
120
  );
121
  // get jquery
122
  $jquery = $jscontroller->get_jquery_version_based_on_browser(
123
- $_SERVER['HTTP_USER_AGENT']
 
 
124
  );
125
-
126
  $domready = $jscontroller->get_module(
127
  'domReady.js'
128
  );
129
  $frontend = $jscontroller->get_module(
130
  'scripts/common_scripts/frontend/common_frontend.js'
131
  );
132
-
133
  // compress data if possible
134
  $compatibility_ob = $this->_registry->get( 'compatibility.ob' );
135
  $js = <<<JS
136
  /******** Called once Require.js has loaded ******/
137
-
138
  (function() {
139
-
140
  var timely_css = document.createElement( 'style' );
141
  timely_css.innerHTML = '$css_rules';
142
  ( document.getElementsByTagName( "head" )[0] || document.documentElement ).appendChild( timely_css );
@@ -156,10 +163,10 @@ class Ai1ec_Controller_Javascript_Widget extends Ai1ec_Base {
156
  })(); // We call our anonymous function immediately
157
  JS;
158
  $compatibility_ob->gzip_if_possible( $js );
159
-
160
  exit( 0 );
161
  }
162
-
163
  public function render_content( Ai1ec_Embeddable $widget_instance ) {
164
  $args = array();
165
  $defaults = $widget_instance->get_js_widget_configurable_defaults();
10
  * @subpackage AI1EC.Javascript
11
  */
12
  class Ai1ec_Controller_Javascript_Widget extends Ai1ec_Base {
13
+
14
  const WIDGET_PARAMETER = 'ai1ec_js_widget';
15
+ const LEGACY_WIDGET_PARAMETER = 'ai1ec_super_widget';
16
 
17
  protected $_widgets = array();
18
+
19
+
20
  public function add_widget( $widget_id, $widget_class ) {
21
  $this->_widgets[$widget_id] = $widget_class;
22
  }
45
  * @return array
46
  */
47
  public function add_js_translation( array $data ) {
48
+ $data['set_calendar_page'] = __(
49
  'You must choose the Calendar page before using the Super Widget',
50
  AI1EC_PLUGIN_NAME
51
  );
57
  */
58
  public function render_js_widget() {
59
  if ( isset( $_GET['render'] ) && 'true' === $_GET['render'] ) {
60
+ if ( isset( $_GET[self::WIDGET_PARAMETER] ) ){
61
+ $widget = $_GET[self::WIDGET_PARAMETER];
62
+ } else if ( isset( $_GET[self::LEGACY_WIDGET_PARAMETER] ) ) {
63
+ $widget = $_GET[self::LEGACY_WIDGET_PARAMETER];
64
+ }
65
  $widget_class = null;
66
  if ( isset( $this->_widgets[$widget] ) ) {
67
  $widget_class = $this->_widgets[$widget];
74
  }
75
  $this->render_javascript();
76
  }
77
+
78
  public function render_javascript() {
79
  header( 'Content-Type: application/javascript' );
80
  header(
81
  'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + 31536000 ) . ' GMT'
82
  );
83
  header( 'Cache-Control: public, max-age=31536000' );
84
+
85
+
86
  $jscontroller = $this->_registry->get( 'controller.javascript' );
87
  $css_controller = $this->_registry->get( 'css.frontend' );
88
  $require_main = AI1EC_ADMIN_THEME_JS_PATH . DIRECTORY_SEPARATOR . 'require.js';
104
  $extension_urls,
105
  'ai1ec_widget.js'
106
  );
107
+
108
  $translation['extension_urls'] = $extension_urls;
109
  // the single event page js is loaded dinamically.
110
  $translation['event_page'] = array(
125
  );
126
  // get jquery
127
  $jquery = $jscontroller->get_jquery_version_based_on_browser(
128
+ isset( $_SERVER['HTTP_USER_AGENT'] )
129
+ ? $_SERVER['HTTP_USER_AGENT']
130
+ : ''
131
  );
132
+
133
  $domready = $jscontroller->get_module(
134
  'domReady.js'
135
  );
136
  $frontend = $jscontroller->get_module(
137
  'scripts/common_scripts/frontend/common_frontend.js'
138
  );
139
+
140
  // compress data if possible
141
  $compatibility_ob = $this->_registry->get( 'compatibility.ob' );
142
  $js = <<<JS
143
  /******** Called once Require.js has loaded ******/
144
+
145
  (function() {
146
+
147
  var timely_css = document.createElement( 'style' );
148
  timely_css.innerHTML = '$css_rules';
149
  ( document.getElementsByTagName( "head" )[0] || document.documentElement ).appendChild( timely_css );
163
  })(); // We call our anonymous function immediately
164
  JS;
165
  $compatibility_ob->gzip_if_possible( $js );
166
+
167
  exit( 0 );
168
  }
169
+
170
  public function render_content( Ai1ec_Embeddable $widget_instance ) {
171
  $args = array();
172
  $defaults = $widget_instance->get_js_widget_configurable_defaults();
app/controller/javascript.php CHANGED
@@ -203,7 +203,9 @@ class Ai1ec_Javascript_Controller {
203
 
204
  // Load appropriate jQuery script based on browser.
205
  $jquery = $this->get_jquery_version_based_on_browser(
206
- $_SERVER['HTTP_USER_AGENT']
 
 
207
  );
208
 
209
  // Load the main script for the page.
@@ -324,6 +326,8 @@ class Ai1ec_Javascript_Controller {
324
 
325
  /**
326
  * Loads version 1.9 or 2.0 of jQuery based on user agent.
 
 
327
  *
328
  * @param string $user_agent
329
  *
@@ -331,7 +335,8 @@ class Ai1ec_Javascript_Controller {
331
  */
332
  public function get_jquery_version_based_on_browser( $user_agent ) {
333
  $js_path = AI1EC_ADMIN_THEME_JS_PATH . DIRECTORY_SEPARATOR;
334
- $jquery = 'jquery_timely20.js';
 
335
  preg_match( '/MSIE (.*?);/', $user_agent, $matches );
336
  if ( count( $matches ) > 1 ) {
337
  //Then we're using IE
@@ -376,7 +381,7 @@ class Ai1ec_Javascript_Controller {
376
  if ( $force_ssl_admin && ! is_ssl() ) {
377
  force_ssl_admin( false );
378
  }
379
- $ajax_url = admin_url( 'admin-ajax.php' );
380
  force_ssl_admin( $force_ssl_admin );
381
  $settings = $this->_registry->get( 'model.settings' );
382
  $locale = $this->_registry->get( 'p28n.wpml' );
@@ -425,7 +430,7 @@ class Ai1ec_Javascript_Controller {
425
  'general_url_not_valid' => Ai1ec_I18n::__(
426
  'Please remember that URLs must start with either "http://" or "https://".'
427
  ),
428
- 'calendar_loading_event' => Ai1ec_I18n::__(
429
  'Loading&hellip;'
430
  ),
431
  'language' => $this->_registry->get( 'p28n.wpml' )->get_lang(),
@@ -452,7 +457,9 @@ class Ai1ec_Javascript_Controller {
452
  'affix_vertical_offset_xs' => $settings->get( 'affix_vertical_offset_xs' ),
453
  'calendar_page_id' => $settings->get( 'calendar_page_id' ),
454
  'region' => ( $settings->get( 'geo_region_biasing' ) ) ? $locale->get_region() : '',
455
- 'site_url' => trailingslashit( get_site_url() ),
 
 
456
  'javascript_widgets' => array(),
457
  'widget_creator' => array(
458
  'preview' => Ai1ec_I18n::__( 'Preview:' ),
@@ -467,6 +474,8 @@ class Ai1ec_Javascript_Controller {
467
  'cookie.utility'
468
  )->get_path_for_cookie(),
469
  'disable_autocompletion' => $settings->get( 'disable_autocompletion' ),
 
 
470
  );
471
  return apply_filters( 'ai1ec_js_translations', $data );
472
  }
@@ -522,10 +531,12 @@ class Ai1ec_Javascript_Controller {
522
  );
523
  $conditional_get->sendHeaders();
524
  if ( ! $conditional_get->cacheIsValid ) {
525
- $http_encoder = new HTTP_Encoder( array(
526
- 'content' => $javascript,
527
- 'type' => 'text/javascript'
528
- )
 
 
529
  );
530
  $compression_level = null;
531
  if ( $this->_registry->get( 'model.settings' )->get( 'disable_gzip_compression' ) ) {
@@ -602,7 +613,7 @@ JSC;
602
  // If we are on the calendar page we must load the correct option
603
  self::IS_CALENDAR_PAGE => $is_calendar_page,
604
  ),
605
- trailingslashit( $this->_template_link_helper->get_site_url() )
606
  );
607
  if ( true === $backend ) {
608
  $this->_scripts_helper->enqueue_script(
203
 
204
  // Load appropriate jQuery script based on browser.
205
  $jquery = $this->get_jquery_version_based_on_browser(
206
+ isset( $_SERVER['HTTP_USER_AGENT'] )
207
+ ? $_SERVER['HTTP_USER_AGENT']
208
+ : ''
209
  );
210
 
211
  // Load the main script for the page.
326
 
327
  /**
328
  * Loads version 1.9 or 2.0 of jQuery based on user agent.
329
+ * If $user_agent is null (due to lack of HTTP header) we always serve
330
+ * jQuery 2.0.
331
  *
332
  * @param string $user_agent
333
  *
335
  */
336
  public function get_jquery_version_based_on_browser( $user_agent ) {
337
  $js_path = AI1EC_ADMIN_THEME_JS_PATH . DIRECTORY_SEPARATOR;
338
+ $jquery = 'jquery_timely20.js';
339
+
340
  preg_match( '/MSIE (.*?);/', $user_agent, $matches );
341
  if ( count( $matches ) > 1 ) {
342
  //Then we're using IE
381
  if ( $force_ssl_admin && ! is_ssl() ) {
382
  force_ssl_admin( false );
383
  }
384
+ $ajax_url = ai1ec_admin_url( 'admin-ajax.php' );
385
  force_ssl_admin( $force_ssl_admin );
386
  $settings = $this->_registry->get( 'model.settings' );
387
  $locale = $this->_registry->get( 'p28n.wpml' );
430
  'general_url_not_valid' => Ai1ec_I18n::__(
431
  'Please remember that URLs must start with either "http://" or "https://".'
432
  ),
433
+ 'calendar_loading' => Ai1ec_I18n::__(
434
  'Loading&hellip;'
435
  ),
436
  'language' => $this->_registry->get( 'p28n.wpml' )->get_lang(),
457
  'affix_vertical_offset_xs' => $settings->get( 'affix_vertical_offset_xs' ),
458
  'calendar_page_id' => $settings->get( 'calendar_page_id' ),
459
  'region' => ( $settings->get( 'geo_region_biasing' ) ) ? $locale->get_region() : '',
460
+ 'site_url' => trailingslashit(
461
+ ai1ec_get_site_url()
462
+ ),
463
  'javascript_widgets' => array(),
464
  'widget_creator' => array(
465
  'preview' => Ai1ec_I18n::__( 'Preview:' ),
474
  'cookie.utility'
475
  )->get_path_for_cookie(),
476
  'disable_autocompletion' => $settings->get( 'disable_autocompletion' ),
477
+ 'end_must_be_after_start' => __( 'The end date can\'t be earlier than the start date.', AI1EC_PLUGIN_NAME ),
478
+ 'show_at_least_six_hours' => __( 'For week and day view, you must select an interval of at least 6 hours.', AI1EC_PLUGIN_NAME ),
479
  );
480
  return apply_filters( 'ai1ec_js_translations', $data );
481
  }
531
  );
532
  $conditional_get->sendHeaders();
533
  if ( ! $conditional_get->cacheIsValid ) {
534
+ $http_encoder = $this->_registry->get(
535
+ 'http.encoder',
536
+ array(
537
+ 'content' => $javascript,
538
+ 'type' => 'text/javascript'
539
+ )
540
  );
541
  $compression_level = null;
542
  if ( $this->_registry->get( 'model.settings' )->get( 'disable_gzip_compression' ) ) {
613
  // If we are on the calendar page we must load the correct option
614
  self::IS_CALENDAR_PAGE => $is_calendar_page,
615
  ),
616
+ trailingslashit( ai1ec_get_site_url() )
617
  );
618
  if ( true === $backend ) {
619
  $this->_scripts_helper->enqueue_script(
app/model/event.php CHANGED
@@ -24,12 +24,14 @@ class Ai1ec_Event extends Ai1ec_Base {
24
  * [-1] - only `get` (for storage) operations require care.
25
  */
26
  protected $_swizzable = array(
27
- 'contact_url' => -1, // strip on save/import
28
- 'cost' => 0,
29
- 'ticket_url' => -1, // strip on save/import
30
- 'start' => -1,
31
- 'end' => -1,
32
- 'timezone_name' => -1,
 
 
33
  );
34
 
35
  /**
@@ -160,6 +162,15 @@ class Ai1ec_Event extends Ai1ec_Base {
160
  return $this;
161
  }
162
 
 
 
 
 
 
 
 
 
 
163
  /**
164
  * Initialize object from ID.
165
  *
@@ -379,6 +390,20 @@ class Ai1ec_Event extends Ai1ec_Base {
379
  );
380
  }
381
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
382
  /**
383
  * Handle `cost` value reading from permanent storage.
384
  *
@@ -417,9 +442,13 @@ class Ai1ec_Event extends Ai1ec_Base {
417
  * @staticvar string $format Cached format.
418
  */
419
  public function get_uid() {
 
 
 
 
420
  static $format = null;
421
  if ( null === $format ) {
422
- $site_url = parse_url( get_site_url() );
423
  $format = 'ai1ec-%d@' . $site_url['host'];
424
  if ( isset( $site_url['path'] ) ) {
425
  $format .= $site_url['path'];
@@ -554,20 +583,6 @@ class Ai1ec_Event extends Ai1ec_Base {
554
  $this->set( 'post_id', $post_id );
555
  $columns['post_id'] = $post_id;
556
 
557
- $taxonomy = $this->_registry->get(
558
- 'model.event.taxonomy',
559
- $post_id
560
- );
561
- $taxonomy->set_categories( $this->get( 'categories' ) );
562
- $taxonomy->set_tags( $this->get( 'tags' ) );
563
-
564
- if (
565
- $feed = $this->get( 'feed' ) &&
566
- isset( $feed->feed_id )
567
- ) {
568
- $taxonomy->set_feed( $feed );
569
- }
570
-
571
  // =========================
572
  // = Insert new event data =
573
  // =========================
@@ -576,6 +591,32 @@ class Ai1ec_Event extends Ai1ec_Base {
576
  }
577
  }
578
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
579
  // give other plugins / extensions the ability to do things
580
  // when saving, like fetching authors which i removed as it's not core.
581
  do_action( 'ai1ec_save_event' );
24
  * [-1] - only `get` (for storage) operations require care.
25
  */
26
  protected $_swizzable = array(
27
+ 'contact_url' => -1, // strip on save/import
28
+ 'cost' => 0,
29
+ 'ticket_url' => -1, // strip on save/import
30
+ 'start' => -1,
31
+ 'end' => -1,
32
+ 'timezone_name' => -1,
33
+ 'recurrence_dates' => 1,
34
+ 'exception_dates' => 1,
35
  );
36
 
37
  /**
162
  return $this;
163
  }
164
 
165
+ /**
166
+ * Delete the events from all tables
167
+ */
168
+ public function delete() {
169
+ // delete post (this will trigger deletion of cached events, and
170
+ // remove the event from events table)
171
+ wp_delete_post( $this->get( 'post_id' ), true );
172
+ }
173
+
174
  /**
175
  * Initialize object from ID.
176
  *
390
  );
391
  }
392
 
393
+ protected function _handle_property_construct_recurrence_dates( $value ) {
394
+ if ( $value ) {
395
+ $this->_entity->set( 'recurrence_rules', 'RDATE=' . $value );
396
+ }
397
+ return $value;
398
+ }
399
+
400
+ protected function _handle_property_construct_exception_dates( $value ) {
401
+ if ( $value ) {
402
+ $this->_entity->set( 'exception_rules', 'EXDATE=' . $value );
403
+ }
404
+ return $value;
405
+ }
406
+
407
  /**
408
  * Handle `cost` value reading from permanent storage.
409
  *
442
  * @staticvar string $format Cached format.
443
  */
444
  public function get_uid() {
445
+ $ical_uid = $this->get( 'ical_uid' );
446
+ if ( ! empty( $ical_uid ) ) {
447
+ return $ical_uid;
448
+ }
449
  static $format = null;
450
  if ( null === $format ) {
451
+ $site_url = parse_url( ai1ec_get_site_url() );
452
  $format = 'ai1ec-%d@' . $site_url['host'];
453
  if ( isset( $site_url['path'] ) ) {
454
  $format .= $site_url['path'];
583
  $this->set( 'post_id', $post_id );
584
  $columns['post_id'] = $post_id;
585
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
586
  // =========================
587
  // = Insert new event data =
588
  // =========================
591
  }
592
  }
593
 
594
+ $taxonomy = $this->_registry->get(
595
+ 'model.event.taxonomy',
596
+ $post_id
597
+ );
598
+ $cats = $this->get( 'categories' );
599
+ if (
600
+ is_array( $cats ) &&
601
+ ! empty( $cats )
602
+ ) {
603
+ $taxonomy->set_categories( $cats );
604
+ }
605
+ $tags = $this->get( 'tags' );
606
+ if (
607
+ is_array( $tags ) &&
608
+ ! empty( $tags )
609
+ ) {
610
+ $taxonomy->set_tags( $tags );
611
+ }
612
+
613
+ if (
614
+ $feed = $this->get( 'feed' ) &&
615
+ isset( $feed->feed_id )
616
+ ) {
617
+ $taxonomy->set_feed( $feed );
618
+ }
619
+
620
  // give other plugins / extensions the ability to do things
621
  // when saving, like fetching authors which i removed as it's not core.
622
  do_action( 'ai1ec_save_event' );
app/model/event/creating.php CHANGED
@@ -90,10 +90,12 @@ class Ai1ec_Event_Creating extends Ai1ec_Base {
90
  $latitude = isset( $_POST['ai1ec_latitude'] ) ? $_POST['ai1ec_latitude'] : '';
91
  $banner_image = isset( $_POST['ai1ec_banner_image'] ) ? $_POST['ai1ec_banner_image'] : '';
92
 
93
- $rrule = NULL;
94
- $exrule = NULL;
95
- $exdate = NULL;
 
96
 
 
97
  // if rrule is set, convert it from local to UTC time
98
  if (
99
  isset( $_POST['ai1ec_repeat'] ) &&
@@ -102,24 +104,31 @@ class Ai1ec_Event_Creating extends Ai1ec_Base {
102
  $rrule = $_POST['ai1ec_rrule'];
103
  }
104
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
105
  // if exrule is set, convert it from local to UTC time
106
  if (
107
  isset( $_POST['ai1ec_exclude'] ) &&
108
  ! empty( $_POST['ai1ec_exclude'] ) &&
109
- NULL !== $rrule // no point for exclusion, if repetition is not set
110
  ) {
111
  $exrule = $this->_registry->get( 'recurrence.rule' )->merge_exrule(
112
  $_POST['ai1ec_exrule'],
113
- $_POST['ai1ec_rrule']
114
  );
115
  }
116
- // if exdate is set, convert it from local to UTC time
117
- if (
118
- isset( $_POST['ai1ec_exdate'] ) &&
119
- ! empty( $_POST['ai1ec_exdate'] )
120
- ) {
121
- $exdate = $_POST['ai1ec_exdate'];
122
- }
123
 
124
  $is_new = false;
125
  $event = null;
@@ -156,7 +165,8 @@ class Ai1ec_Event_Creating extends Ai1ec_Base {
156
  if ( $instant_event ) {
157
  $event->set_no_end_time();
158
  } else {
159
- $event->set( 'end', $end_time_entry );
 
160
  }
161
  $event->set( 'timezone_name', $timezone_name );
162
  $event->set( 'allday', $all_day );
@@ -177,6 +187,7 @@ class Ai1ec_Event_Creating extends Ai1ec_Base {
177
  $event->set( 'recurrence_rules', $rrule );
178
  $event->set( 'exception_rules', $exrule );
179
  $event->set( 'exception_dates', $exdate );
 
180
  $event->set( 'show_coordinates', $show_coordinates );
181
  $event->set( 'longitude', trim( $longitude ) );
182
  $event->set( 'latitude', trim( $latitude ) );
@@ -291,4 +302,22 @@ class Ai1ec_Event_Creating extends Ai1ec_Base {
291
  }
292
  return $tag[5];
293
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
294
  }
90
  $latitude = isset( $_POST['ai1ec_latitude'] ) ? $_POST['ai1ec_latitude'] : '';
91
  $banner_image = isset( $_POST['ai1ec_banner_image'] ) ? $_POST['ai1ec_banner_image'] : '';
92
 
93
+ $rrule = null;
94
+ $exrule = null;
95
+ $exdate = null;
96
+ $rdate = null;
97
 
98
+ $this->_remap_recurrence_dates();
99
  // if rrule is set, convert it from local to UTC time
100
  if (
101
  isset( $_POST['ai1ec_repeat'] ) &&
104
  $rrule = $_POST['ai1ec_rrule'];
105
  }
106
 
107
+ // add manual dates
108
+ if (
109
+ isset( $_POST['ai1ec_exdate'] ) &&
110
+ ! empty( $_POST['ai1ec_exdate'] )
111
+ ) {
112
+ $exdate = $_POST['ai1ec_exdate'];
113
+ }
114
+ if (
115
+ isset( $_POST['ai1ec_rdate'] ) &&
116
+ ! empty( $_POST['ai1ec_rdate'] )
117
+ ) {
118
+ $rdate = $_POST['ai1ec_rdate'];
119
+ }
120
+
121
  // if exrule is set, convert it from local to UTC time
122
  if (
123
  isset( $_POST['ai1ec_exclude'] ) &&
124
  ! empty( $_POST['ai1ec_exclude'] ) &&
125
+ ( null !== $rrule || null !== $rdate ) // no point for exclusion, if repetition is not set
126
  ) {
127
  $exrule = $this->_registry->get( 'recurrence.rule' )->merge_exrule(
128
  $_POST['ai1ec_exrule'],
129
+ $rrule
130
  );
131
  }
 
 
 
 
 
 
 
132
 
133
  $is_new = false;
134
  $event = null;
165
  if ( $instant_event ) {
166
  $event->set_no_end_time();
167
  } else {
168
+ $event->set( 'end', $end_time_entry );
169
+ $event->set( 'instant_event', false );
170
  }
171
  $event->set( 'timezone_name', $timezone_name );
172
  $event->set( 'allday', $all_day );
187
  $event->set( 'recurrence_rules', $rrule );
188
  $event->set( 'exception_rules', $exrule );
189
  $event->set( 'exception_dates', $exdate );
190
+ $event->set( 'recurrence_dates', $rdate );
191
  $event->set( 'show_coordinates', $show_coordinates );
192
  $event->set( 'longitude', trim( $longitude ) );
193
  $event->set( 'latitude', trim( $latitude ) );
302
  }
303
  return $tag[5];
304
  }
305
+
306
+ protected function _remap_recurrence_dates() {
307
+ if (
308
+ isset( $_POST['ai1ec_exclude'] ) &&
309
+ 'EXDATE' === substr( $_POST['ai1ec_exrule'], 0, 6 )
310
+ ) {
311
+ $_POST['ai1ec_exdate'] = substr( $_POST['ai1ec_exrule'], 7 );
312
+ unset( $_POST['ai1ec_exclude'], $_POST['ai1ec_exrule'] );
313
+ }
314
+ if (
315
+ isset( $_POST['ai1ec_repeat'] ) &&
316
+ 'RDATE' === substr( $_POST['ai1ec_rrule'], 0, 5 )
317
+ ) {
318
+ $_POST['ai1ec_rdate'] = substr( $_POST['ai1ec_rrule'], 6 );
319
+ unset( $_POST['ai1ec_repeat'], $_POST['ai1ec_rrule'] );
320
+ }
321
+ }
322
+
323
  }
app/model/event/instance.php CHANGED
@@ -76,37 +76,53 @@ class Ai1ec_Event_Instance extends Ai1ec_Base {
76
  $duration,
77
  $timezone
78
  ) {
 
79
  $recurrence_parser = $this->_registry->get( 'recurrence.rule' );
80
- $evs = array();
81
 
82
- $startdate = array(
83
- 'timestamp' => $_start,
84
- 'tz' => $timezone,
85
- );
86
- $start = $event_instance['start'];
87
  $wdate = $startdate = $enddate
88
- = iCalUtilityFunctions::_timestamp2date( $startdate, 6 );
89
  $enddate['year'] = $enddate['year'] + 3;
90
  $exclude_dates = array();
91
  $recurrence_dates = array();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  if ( $event->get( 'exception_rules' ) ) {
93
  // creat an array for the rules
94
  $exception_rules = $recurrence_parser
95
  ->build_recurrence_rules_array(
96
  $event->get( 'exception_rules' )
97
  );
98
- $exception_rules = iCalUtilityFunctions::_setRexrule(
99
- $exception_rules
100
- );
101
- $result = array();
102
- // The first array is the result and it is passed by reference
103
- iCalUtilityFunctions::_recur2date(
104
- $exclude_dates,
105
- $exception_rules,
106
- $wdate,
107
- $startdate,
108
- $enddate
109
- );
 
 
 
 
 
110
  }
111
  $recurrence_rules = $recurrence_parser
112
  ->build_recurrence_rules_array(
@@ -114,46 +130,33 @@ class Ai1ec_Event_Instance extends Ai1ec_Base {
114
  );
115
 
116
  $recurrence_rules = iCalUtilityFunctions::_setRexrule( $recurrence_rules );
117
- iCalUtilityFunctions::_recur2date(
118
- $recurrence_dates,
119
- $recurrence_rules,
120
- $wdate,
121
- $startdate,
122
- $enddate
123
- );
 
 
 
 
124
 
125
-
 
 
126
  $recurrence_dates = array_keys( $recurrence_dates );
127
  // Add the instances
128
- foreach ( $recurrence_dates as $date ) {
129
-
130
  // The arrays are in the form timestamp => true so an isset call is what we need
131
- if ( isset( $exclude_dates[$date] ) ) {
132
- continue;
133
- }
134
- $event_instance['start'] = $date;
135
- $event_instance['end'] = $date + $duration;
136
- $excluded = false;
137
-
138
- // Check if exception dates match this occurence
139
- if ( $exception_dates = $event->get( 'exception_dates' ) ) {
140
- $match_exdates = $this->date_match_exdates(
141
- $date,
142
- $exception_dates,
143
- $timezone
144
- );
145
- if ( $match_exdates ) {
146
- $excluded = true;
147
- }
148
- }
149
-
150
- // Add event only if it is not excluded
151
- if ( false === $excluded ) {
152
- $evs[] = $event_instance;
153
  }
154
  }
155
 
156
- return $evs;
157
  }
158
 
159
  /**
@@ -164,51 +167,46 @@ class Ai1ec_Event_Instance extends Ai1ec_Base {
164
  * @return bool Success.
165
  */
166
  public function create( Ai1ec_Event $event ) {
167
- $evs = array();
168
- $e = array(
169
- 'post_id' => $event->get( 'post_id' ),
170
- 'start' => $event->get( 'start' )->format_to_gmt(),
171
- 'end' => $event->get( 'end' )->format_to_gmt(),
172
- );
173
- $duration = $event->get( 'end' )->diff_sec( $event->get( 'start' ) );
174
 
175
- // Always cache initial instance
176
- $evs[] = $e;
177
 
178
- $_start = $event->get( 'start' )->format_to_gmt();
179
- $_end = $event->get( 'end' )->format_to_gmt();
180
 
181
- if ( $event->get( 'recurrence_rules' ) ) {
182
- $_restore_default_tz = date_default_timezone_get();
183
- $start_timezone = $event->get( 'start' )->get_timezone();
184
- date_default_timezone_set( $start_timezone );
185
- $evs = array_merge(
186
- $evs,
187
- $this->create_instances_by_recurrence(
188
- $event,
189
- $e,
190
- $_start,
191
- $duration,
192
- $start_timezone
193
- )
 
 
 
194
  );
195
- date_default_timezone_set( $_restore_default_tz );
196
- unset( $_restore_default_tz );
197
- }
198
-
199
- // Make entries unique (sometimes recurrence generator creates duplicates?)
200
- $evs_unique = array();
201
- foreach ( $evs as $ev ) {
202
- $evs_unique[md5( serialize( $ev ) )] = $ev;
203
- }
204
 
205
  $search_helper = $this->_registry->get( 'model.search' );
206
- foreach ( $evs_unique as $e ) {
207
- // Find out if this event instance is already accounted for by an
208
- // overriding 'RECURRENCE-ID' of the same iCalendar feed (by comparing the
209
- // UID, start date, recurrence). If so, then do not create duplicate
210
- // instance of event.
211
- $start = $e['start'];
212
  $matching_event_id = null;
213
  if ( $event->get( 'ical_uid' ) ) {
214
  $matching_event_id = $search_helper->get_matching_event_id(
@@ -220,17 +218,17 @@ class Ai1ec_Event_Instance extends Ai1ec_Base {
220
  );
221
  }
222
 
223
- // If no other instance was found
224
- if ( null === $matching_event_id ) {
225
  $this->_dbi->insert(
226
  'ai1ec_event_instances',
227
- $e,
228
  array( '%d', '%d', '%d' )
229
  );
230
- }
231
- }
232
 
233
- return true;
234
  }
235
 
236
  /**
@@ -242,18 +240,18 @@ class Ai1ec_Event_Instance extends Ai1ec_Base {
242
  *
243
  * @return bool True if given date is in rule.
244
  */
245
- public function date_match_exdates( $date, $ics_rule, $timezone ) {
246
  $ranges = $this->_get_date_ranges( $ics_rule, $timezone );
247
- foreach ( $ranges as $interval ) {
248
  if ( $date >= $interval[0] && $date <= $interval[1] ) {
249
  return true;
250
  }
251
  if ( $date <= $interval[0] ) {
252
  break;
253
  }
254
- }
255
- return false;
256
- }
257
 
258
  /**
259
  * Prepare date range list for fast exdate search.
@@ -288,4 +286,35 @@ class Ai1ec_Event_Instance extends Ai1ec_Base {
288
  return $ranges[$date_list];
289
  }
290
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
291
  }
76
  $duration,
77
  $timezone
78
  ) {
79
+ $restore_timezone = date_default_timezone_get();
80
  $recurrence_parser = $this->_registry->get( 'recurrence.rule' );
81
+ $events = array();
82
 
83
+ $start = $event_instance['start'];
 
 
 
 
84
  $wdate = $startdate = $enddate
85
+ = $this->_parsed_date_array( $_start, $timezone );
86
  $enddate['year'] = $enddate['year'] + 3;
87
  $exclude_dates = array();
88
  $recurrence_dates = array();
89
+ if ( $recurrence_dates = $event->get( 'recurrence_dates' ) ) {
90
+ $recurrence_dates = $this->_populate_recurring_dates(
91
+ $recurrence_dates,
92
+ $startdate,
93
+ $timezone
94
+ );
95
+ }
96
+ if ( $exception_dates = $event->get( 'exception_dates' ) ) {
97
+ $exclude_dates = $this->_populate_recurring_dates(
98
+ $exception_dates,
99
+ $startdate,
100
+ $timezone
101
+ );
102
+ }
103
  if ( $event->get( 'exception_rules' ) ) {
104
  // creat an array for the rules
105
  $exception_rules = $recurrence_parser
106
  ->build_recurrence_rules_array(
107
  $event->get( 'exception_rules' )
108
  );
109
+ unset($exception_rules['EXDATE']);
110
+ if ( ! empty( $exception_rules ) ) {
111
+ $exception_rules = iCalUtilityFunctions::_setRexrule(
112
+ $exception_rules
113
+ );
114
+ $result = array();
115
+ date_default_timezone_set( $timezone );
116
+ // The first array is the result and it is passed by reference
117
+ iCalUtilityFunctions::_recur2date(
118
+ $exclude_dates,
119
+ $exception_rules,
120
+ $wdate,
121
+ $startdate,
122
+ $enddate
123
+ );
124
+ date_default_timezone_set( $restore_timezone );
125
+ }
126
  }
127
  $recurrence_rules = $recurrence_parser
128
  ->build_recurrence_rules_array(
130
  );
131
 
132
  $recurrence_rules = iCalUtilityFunctions::_setRexrule( $recurrence_rules );
133
+ if ( $recurrence_rules ) {
134
+ date_default_timezone_set( $timezone );
135
+ iCalUtilityFunctions::_recur2date(
136
+ $recurrence_dates,
137
+ $recurrence_rules,
138
+ $wdate,
139
+ $startdate,
140
+ $enddate
141
+ );
142
+ date_default_timezone_set( $restore_timezone );
143
+ }
144
 
145
+ if ( ! is_array( $recurrence_dates ) ) {
146
+ $recurrence_dates = array();
147
+ }
148
  $recurrence_dates = array_keys( $recurrence_dates );
149
  // Add the instances
150
+ foreach ( $recurrence_dates as $timestamp ) {
 
151
  // The arrays are in the form timestamp => true so an isset call is what we need
152
+ if ( ! isset( $exclude_dates[$timestamp] ) ) {
153
+ $event_instance['start'] = $timestamp;
154
+ $event_instance['end'] = $timestamp + $duration;
155
+ $events[$timestamp] = $event_instance;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
156
  }
157
  }
158
 
159
+ return $events;
160
  }
161
 
162
  /**
167
  * @return bool Success.
168
  */
169
  public function create( Ai1ec_Event $event ) {
170
+ $events = array();
171
+ $event_item = array(
172
+ 'post_id' => $event->get( 'post_id' ),
173
+ 'start' => $event->get( 'start' )->format_to_gmt(),
174
+ 'end' => $event->get( 'end' )->format_to_gmt(),
175
+ );
176
+ $duration = $event->get( 'end' )->diff_sec( $event->get( 'start' ) );
177
 
178
+ $_start = $event->get( 'start' )->format_to_gmt();
179
+ $_end = $event->get( 'end' )->format_to_gmt();
180
 
181
+ // Always cache initial instance
182
+ $events[$_start] = $event_item;
183
 
184
+ if ( $event->get( 'recurrence_rules' ) || $event->get( 'recurrence_dates' ) ) {
185
+ /**
186
+ * NOTE: this timezone switch is intentional, because underlying
187
+ * library doesn't allow us to pass it as an argument. Though no
188
+ * lesser importance shall be given to the restore call bellow.
189
+ */
190
+ $start_datetime = $event->get( 'start' );
191
+ $start_datetime->assert_utc_timezone();
192
+ $start_timezone = $this->_registry->get( 'date.timezone' )
193
+ ->get_name( $start_datetime->get_timezone() );
194
+ $events += $this->create_instances_by_recurrence(
195
+ $event,
196
+ $event_item,
197
+ $_start,
198
+ $duration,
199
+ $start_timezone
200
  );
201
+ }
 
 
 
 
 
 
 
 
202
 
203
  $search_helper = $this->_registry->get( 'model.search' );
204
+ foreach ( $events as $event_item ) {
205
+ // Find out if this event instance is already accounted for by an
206
+ // overriding 'RECURRENCE-ID' of the same iCalendar feed (by comparing the
207
+ // UID, start date, recurrence). If so, then do not create duplicate
208
+ // instance of event.
209
+ $start = $event_item['start'];
210
  $matching_event_id = null;
211
  if ( $event->get( 'ical_uid' ) ) {
212
  $matching_event_id = $search_helper->get_matching_event_id(
218
  );
219
  }
220
 
221
+ // If no other instance was found
222
+ if ( null === $matching_event_id ) {
223
  $this->_dbi->insert(
224
  'ai1ec_event_instances',
225
+ $event_item,
226
  array( '%d', '%d', '%d' )
227
  );
228
+ }
229
+ }
230
 
231
+ return true;
232
  }
233
 
234
  /**
240
  *
241
  * @return bool True if given date is in rule.
242
  */
243
+ public function date_match_exdates( $date, $ics_rule, $timezone ) {
244
  $ranges = $this->_get_date_ranges( $ics_rule, $timezone );
245
+ foreach ( $ranges as $interval ) {
246
  if ( $date >= $interval[0] && $date <= $interval[1] ) {
247
  return true;
248
  }
249
  if ( $date <= $interval[0] ) {
250
  break;
251
  }
252
+ }
253
+ return false;
254
+ }
255
 
256
  /**
257
  * Prepare date range list for fast exdate search.
286
  return $ranges[$date_list];
287
  }
288
 
289
+ protected function _populate_recurring_dates( $rule, array $start_struct, $timezone ) {
290
+ $start = clone $start_struct['_dt'];
291
+ $dates = array();
292
+ foreach ( explode( ',', $rule ) as $date ) {
293
+ $i_date = clone $start;
294
+ $spec = sscanf( $date, '%04d%02d%02d' );
295
+ $i_date->set_date(
296
+ $spec[0],
297
+ $spec[1],
298
+ $spec[2]
299
+ );
300
+ $dates[$i_date->format_to_gmt()] = $i_date;
301
+ }
302
+ return $dates;
303
+ }
304
+
305
+ protected function _parsed_date_array( $startdate, $timezone ) {
306
+ $datetime = $this->_registry->get( 'date.time', $startdate, $timezone );
307
+ $parsed = array(
308
+ 'year' => intval( $datetime->format( 'Y' ) ),
309
+ 'month' => intval( $datetime->format( 'm' ) ),
310
+ 'day' => intval( $datetime->format( 'd' ) ),
311
+ 'hour' => intval( $datetime->format( 'H' ) ),
312
+ 'min' => intval( $datetime->format( 'i' ) ),
313
+ 'sec' => intval( $datetime->format( 's' ) ),
314
+ 'tz' => $datetime->get_timezone(),
315
+ '_dt' => $datetime,
316
+ );
317
+ return $parsed;
318
+ }
319
+
320
  }
app/model/event/taxonomy.php CHANGED
@@ -52,7 +52,7 @@ class Ai1ec_Event_Taxonomy extends Ai1ec_Base {
52
  * @param bool $is_id Set to true if $term is ID.
53
  * @param array $attrs Attributes to creatable entity.
54
  *
55
- * @return array|bool Associative array with term_id
56
  * and taxonomy keys or false on error
57
  */
58
  public function initiate_term(
@@ -63,25 +63,38 @@ class Ai1ec_Event_Taxonomy extends Ai1ec_Base {
63
  ) {
64
  // cast to int to have it working with term_exists
65
  $term = ( $is_id ) ? (int) $term : $term;
66
- $term_to_check = term_exists( $term );
67
  $to_return = array(
68
  'taxonomy' => $taxonomy
69
  );
70
  // if term doesn't exist, create it.
71
  if ( 0 === $term_to_check || null === $term_to_check ) {
72
- $term_to_check = wp_insert_term( $term, $taxonomy, $attrs );
73
- if ( is_wp_error( $term_to_check ) ) {
74
- return false;
 
 
 
 
 
 
 
 
 
 
 
 
75
  }
76
- $term_to_check = (object)$term_to_check;
77
- $to_return['term_id'] = (int)$term_to_check->term_id;
78
  } else {
79
- $to_return['term_id'] = (int)$term_to_check;
 
 
 
80
  // when importing categories, use the mapping of the current site
81
  // so place the term in the current taxonomy
82
  if ( self::CATEGORIES === $taxonomy ) {
83
  // check that the term matches the taxonomy
84
- $tax = $this->_get_taxonomy_for_term_id( $term_to_check );
85
  $to_return['taxonomy'] = $tax->taxonomy;
86
  }
87
 
@@ -164,12 +177,12 @@ class Ai1ec_Event_Taxonomy extends Ai1ec_Base {
164
 
165
  /**
166
  * Get the taxonomy name from term id
167
- *
168
  * @param int $term
169
- *
170
  * @return stdClass The taxonomy nane
171
  */
172
- protected function _get_taxonomy_for_term_id( $term ) {
173
  $db = $this->_registry->get( 'dbi.dbi' );
174
  return $db->get_row(
175
  $db->prepare(
@@ -177,7 +190,7 @@ class Ai1ec_Event_Taxonomy extends Ai1ec_Base {
177
  ' AS terms INNER JOIN ' .
178
  $db->get_table_name( 'term_taxonomy' ) .
179
  ' AS terms_taxonomy USING(term_id) '.
180
- 'WHERE terms.term_id = %d LIMIT 1', $term )
181
  );
182
  }
183
  }
52
  * @param bool $is_id Set to true if $term is ID.
53
  * @param array $attrs Attributes to creatable entity.
54
  *
55
+ * @return array|bool Associative array with term_id
56
  * and taxonomy keys or false on error
57
  */
58
  public function initiate_term(
63
  ) {
64
  // cast to int to have it working with term_exists
65
  $term = ( $is_id ) ? (int) $term : $term;
66
+ $term_to_check = term_exists( $term, $taxonomy );
67
  $to_return = array(
68
  'taxonomy' => $taxonomy
69
  );
70
  // if term doesn't exist, create it.
71
  if ( 0 === $term_to_check || null === $term_to_check ) {
72
+ $alias_to_use = apply_filters( 'ai1ec_ics_import_alias', $term );
73
+ // the filter will either return null, the term_id to use or the original $term
74
+ // if the filter is not run. Thus in need to check that $term !== $alias_to_use
75
+ if ( $alias_to_use && $alias_to_use !== $term ) {
76
+ $to_return['term_id'] = (int) $alias_to_use;
77
+ // check that the term matches the taxonomy
78
+ $tax = $this->get_taxonomy_for_term_id( term_exists( (int) $alias_to_use ) );
79
+ $to_return['taxonomy'] = $tax->taxonomy;
80
+ } else {
81
+ $term_to_check = wp_insert_term( $term, $taxonomy, $attrs );
82
+ if ( is_wp_error( $term_to_check ) ) {
83
+ return false;
84
+ }
85
+ $term_to_check = (object)$term_to_check;
86
+ $to_return['term_id'] = (int)$term_to_check->term_id;
87
  }
 
 
88
  } else {
89
+ $term_id = is_array( $term_to_check )
90
+ ? $term_to_check['term_id']
91
+ : $term_to_check;
92
+ $to_return['term_id'] = (int)$term_id;
93
  // when importing categories, use the mapping of the current site
94
  // so place the term in the current taxonomy
95
  if ( self::CATEGORIES === $taxonomy ) {
96
  // check that the term matches the taxonomy
97
+ $tax = $this->get_taxonomy_for_term_id( $term_id );
98
  $to_return['taxonomy'] = $tax->taxonomy;
99
  }
100
 
177
 
178
  /**
179
  * Get the taxonomy name from term id
180
+ *
181
  * @param int $term
182
+ *
183
  * @return stdClass The taxonomy nane
184
  */
185
+ public function get_taxonomy_for_term_id( $term_id ) {
186
  $db = $this->_registry->get( 'dbi.dbi' );
187
  return $db->get_row(
188
  $db->prepare(
190
  ' AS terms INNER JOIN ' .
191
  $db->get_table_name( 'term_taxonomy' ) .
192
  ' AS terms_taxonomy USING(term_id) '.
193
+ 'WHERE terms.term_id = %d LIMIT 1', $term_id )
194
  );
195
  }
196
  }
app/model/option.php CHANGED
@@ -23,7 +23,9 @@ class Ai1ec_Option extends Ai1ec_App {
23
  /**
24
  * Add cache instance to object scope.
25
  *
26
- * @return void
 
 
27
  */
28
  public function __construct( Ai1ec_Registry_Object $registry ) {
29
  $this->_registry = $registry;
@@ -103,6 +105,7 @@ class Ai1ec_Option extends Ai1ec_App {
103
  return delete_option( $name );
104
  }
105
 
 
106
  /**
107
  * Convert autoload flag input to value recognized by WordPress.
108
  *
23
  /**
24
  * Add cache instance to object scope.
25
  *
26
+ * @param Ai1ec_Registry_Object $registry Registry object.
27
+ *
28
+ * @return Ai1ec_Option
29
  */
30
  public function __construct( Ai1ec_Registry_Object $registry ) {
31
  $this->_registry = $registry;
105
  return delete_option( $name );
106
  }
107
 
108
+
109
  /**
110
  * Convert autoload flag input to value recognized by WordPress.
111
  *
app/model/search.php CHANGED
@@ -92,7 +92,7 @@ class Ai1ec_Event_Search extends Ai1ec_Base {
92
  ->get_wpml_table_where();
93
 
94
  if ( $spanning ) {
95
- $spanning_string = 'i.end > %d AND i.start < %d ';
96
  } else {
97
  $spanning_string = 'i.start BETWEEN %d AND %d ';
98
  }
@@ -205,7 +205,7 @@ class Ai1ec_Event_Search extends Ai1ec_Base {
205
  * ['date_first'] UNIX timestamp (date part) of first event
206
  * ['date_last'] UNIX timestamp (date part) of last event
207
  */
208
- function get_events_relative_to(
209
  $time,
210
  $limit = 0,
211
  $page_offset = 0,
@@ -229,7 +229,7 @@ class Ai1ec_Event_Search extends Ai1ec_Base {
229
  // Convert timestamp to GMT time
230
  $time = $this->_registry->get(
231
  'date.system'
232
- )->current_time() >> 11 << 11;
233
  // Get post status Where snippet and associated SQL arguments
234
  $where_parameters = $this->_get_post_status_sql();
235
  $post_status_where = $where_parameters['post_status_where'];
@@ -341,6 +341,31 @@ class Ai1ec_Event_Search extends Ai1ec_Base {
341
  );
342
  }
343
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
344
  /**
345
  * Get ID of event in database, matching imported one.
346
  *
92
  ->get_wpml_table_where();
93
 
94
  if ( $spanning ) {
95
+ $spanning_string = 'i.end >= %d AND i.start <= %d ';
96
  } else {
97
  $spanning_string = 'i.start BETWEEN %d AND %d ';
98
  }
205
  * ['date_first'] UNIX timestamp (date part) of first event
206
  * ['date_last'] UNIX timestamp (date part) of last event
207
  */
208
+ public function get_events_relative_to(
209
  $time,
210
  $limit = 0,
211
  $page_offset = 0,
229
  // Convert timestamp to GMT time
230
  $time = $this->_registry->get(
231
  'date.system'
232
+ )->get_current_rounded_time();
233
  // Get post status Where snippet and associated SQL arguments
234
  $where_parameters = $this->_get_post_status_sql();
235
  $post_status_where = $where_parameters['post_status_where'];
341
  );
342
  }
343
 
344
+ /**
345
+ * Returns events for given day. Event must start before end of day and must
346
+ * ends after beginning of day.
347
+ *
348
+ * @param Ai1ec_Date_Time $day Date object.
349
+ * @param array $filter Search filters;
350
+ *
351
+ * @return array List of events.
352
+ */
353
+ public function get_events_for_day(
354
+ Ai1ec_Date_Time $day,
355
+ array $filter = array()
356
+ ) {
357
+ $end_of_day = $this->_registry->get( 'date.time', $day )
358
+ ->set_time( 23, 59, 59 );
359
+ $start_of_day = $this->_registry->get( 'date.time', $day )
360
+ ->set_time( 0, 0, 0 );
361
+ return $this->get_events_between(
362
+ $start_of_day,
363
+ $end_of_day,
364
+ $filter,
365
+ true
366
+ );
367
+ }
368
+
369
  /**
370
  * Get ID of event in database, matching imported one.
371
  *
app/model/settings.php CHANGED
@@ -47,12 +47,17 @@ class Ai1ec_Settings extends Ai1ec_App {
47
  $renderer,
48
  $version = '2.0.0'
49
  ) {
 
50
  if ( 'deprecated' === $type ) {
51
  unset( $this->_options[$option] );
52
  } else if (
53
  ! isset( $this->_options[$option] ) ||
54
  ! isset( $this->_options[$option]['version'] ) ||
55
- (string)$this->_options[$option]['version'] !== (string)$version
 
 
 
 
56
  ) {
57
  $this->_options[$option] = array(
58
  'value' => ( isset( $this->_options[$option] ) )
@@ -260,6 +265,34 @@ class Ai1ec_Settings extends Ai1ec_App {
260
  }
261
  }
262
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
263
  /**
264
  * Initiate options map from storage.
265
  *
@@ -278,6 +311,8 @@ class Ai1ec_Settings extends Ai1ec_App {
278
  }
279
  }
280
  $upgrade = false;
 
 
281
  if ( // process meta updates changes
282
  empty( $values ) || (
283
  false !== $test_version &&
@@ -289,7 +324,6 @@ class Ai1ec_Settings extends Ai1ec_App {
289
  $this->_change_update_status( true );
290
  $upgrade = true;
291
  } else if ( $values instanceof Ai1ec_Settings ) { // process legacy
292
- $this->_register_standard_values();
293
  $this->_parse_legacy( $values );
294
  $this->_change_update_status( true );
295
  $upgrade = true;
@@ -584,6 +618,18 @@ class Ai1ec_Settings extends Ai1ec_App {
584
  ),
585
  'default' => false,
586
  ),
 
 
 
 
 
 
 
 
 
 
 
 
587
  'hide_maps_until_clicked' => array(
588
  'type' => 'bool',
589
  'renderer' => array(
@@ -837,6 +883,21 @@ class Ai1ec_Settings extends Ai1ec_App {
837
  ),
838
  'default' => true,
839
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
840
  'render_css_as_link' => array(
841
  'type' => 'bool',
842
  'renderer' => array(
@@ -963,4 +1024,4 @@ class Ai1ec_Settings extends Ai1ec_App {
963
  return $previous;
964
  }
965
 
966
- }
47
  $renderer,
48
  $version = '2.0.0'
49
  ) {
50
+
51
  if ( 'deprecated' === $type ) {
52
  unset( $this->_options[$option] );
53
  } else if (
54
  ! isset( $this->_options[$option] ) ||
55
  ! isset( $this->_options[$option]['version'] ) ||
56
+ (string)$this->_options[$option]['version'] !== (string)$version ||
57
+ ( isset( $renderer['label'] ) &&
58
+ (string)$this->_options[$option]['renderer']['label'] !== (string)$renderer['label'] ) ||
59
+ ( isset( $renderer['help'] ) &&
60
+ (string)$this->_options[$option]['renderer']['help'] !== (string)$renderer['help'] )
61
  ) {
62
  $this->_options[$option] = array(
63
  'value' => ( isset( $this->_options[$option] ) )
265
  }
266
  }
267
 
268
+ /**
269
+ * Observes wp_options changes. If any matches related setting then
270
+ * updates that setting.
271
+ *
272
+ * @param string $option Name of the updated option.
273
+ * @param mixed $old_value The old option value.
274
+ * @param mixed $value The new option value.
275
+ *
276
+ * @return void Method does not return.
277
+ */
278
+ public function wp_options_observer( $option, $old_value, $value ) {
279
+ $options = $this->get_options();
280
+ if (
281
+ self::WP_OPTION_KEY === $option ||
282
+ empty( $options )
283
+ ) {
284
+ return;
285
+ }
286
+
287
+ if (
288
+ isset( $options[$option] ) &&
289
+ 'wp_option' === $options[$option]['type'] &&
290
+ $this->get( $option ) !== $value
291
+ ) {
292
+ $this->set( $option, $value );
293
+ }
294
+ }
295
+
296
  /**
297
  * Initiate options map from storage.
298
  *
311
  }
312
  }
313
  $upgrade = false;
314
+ // check for updated translations
315
+ $this->_register_standard_values();
316
  if ( // process meta updates changes
317
  empty( $values ) || (
318
  false !== $test_version &&
324
  $this->_change_update_status( true );
325
  $upgrade = true;
326
  } else if ( $values instanceof Ai1ec_Settings ) { // process legacy
 
327
  $this->_parse_legacy( $values );
328
  $this->_change_update_status( true );
329
  $upgrade = true;
618
  ),
619
  'default' => false,
620
  ),
621
+ 'disable_get_calendar_button' => array(
622
+ 'type' => 'bool',
623
+ 'renderer' => array(
624
+ 'class' => 'checkbox',
625
+ 'tab' => 'viewing-events',
626
+ 'item' => 'viewing-events',
627
+ 'label' => Ai1ec_I18n::__(
628
+ 'Hide <strong>Get a Timely Calendar</strong> button'
629
+ )
630
+ ),
631
+ 'default' => true,
632
+ ),
633
  'hide_maps_until_clicked' => array(
634
  'type' => 'bool',
635
  'renderer' => array(
883
  ),
884
  'default' => true,
885
  ),
886
+ 'ai1ec_use_frontend_rendering' => array(
887
+ 'type' => 'bool',
888
+ 'renderer' => array(
889
+ 'class' => 'checkbox',
890
+ 'tab' => 'advanced',
891
+ 'item' => 'advanced',
892
+ 'label' => Ai1ec_I18n::__(
893
+ 'Use frontend rendering.'
894
+ ),
895
+ 'help' => Ai1ec_I18n::__(
896
+ 'Renders calendar views on the client rather than the server; can improve performance.'
897
+ ),
898
+ ),
899
+ 'default' => false,
900
+ ),
901
  'render_css_as_link' => array(
902
  'type' => 'bool',
903
  'renderer' => array(
1024
  return $previous;
1025
  }
1026
 
1027
+ }
app/view/admin/abstract.php CHANGED
@@ -23,7 +23,7 @@ abstract class Ai1ec_View_Admin_Abstract extends Ai1ec_Base {
23
 
24
  /**
25
  * Standard constructor
26
- *
27
  * @param Ai1ec_Registry_Object $registry
28
  */
29
  public function __construct( Ai1ec_Registry_Object $registry ) {
@@ -34,7 +34,7 @@ abstract class Ai1ec_View_Admin_Abstract extends Ai1ec_Base {
34
 
35
  /**
36
  * Get the url of the page
37
- *
38
  * @return string
39
  */
40
  public function get_url() {
@@ -43,7 +43,7 @@ abstract class Ai1ec_View_Admin_Abstract extends Ai1ec_Base {
43
  'post_type' => AI1EC_POST_TYPE,
44
  'page' => AI1EC_PLUGIN_NAME . '-' . $this->_page_suffix,
45
  ),
46
- get_admin_url() . 'edit.php'
47
  );
48
  }
49
 
@@ -56,7 +56,7 @@ abstract class Ai1ec_View_Admin_Abstract extends Ai1ec_Base {
56
  * Adds the page to the correct menu.
57
  */
58
  abstract public function add_meta_box();
59
-
60
  /**
61
  * Display the page html
62
  */
23
 
24
  /**
25
  * Standard constructor
26
+ *
27
  * @param Ai1ec_Registry_Object $registry
28
  */
29
  public function __construct( Ai1ec_Registry_Object $registry ) {
34
 
35
  /**
36
  * Get the url of the page
37
+ *
38
  * @return string
39
  */
40
  public function get_url() {
43
  'post_type' => AI1EC_POST_TYPE,
44
  'page' => AI1EC_PLUGIN_NAME . '-' . $this->_page_suffix,
45
  ),
46
+ ai1ec_admin_url( 'edit.php' )
47
  );
48
  }
49
 
56
  * Adds the page to the correct menu.
57
  */
58
  abstract public function add_meta_box();
59
+
60
  /**
61
  * Display the page html
62
  */
app/view/admin/event-category.php CHANGED
@@ -133,23 +133,18 @@ class Ai1ec_View_Admin_EventCategory extends Ai1ec_Base {
133
  }
134
  }
135
 
136
- /**
137
- * Edit category form
138
- *
139
- * @param $term
140
- *
141
- * @return void
142
- */
143
- public function events_categories_edit_form_fields( $term ) {
144
 
145
  $taxonomy = $this->_registry->get( 'model.taxonomy' );
146
- $color = $taxonomy->get_category_color( $term->term_id );
147
- $image = $taxonomy->get_category_image( $term->term_id );
 
 
148
 
149
  $style = '';
150
  $clr = '';
151
 
152
- if ( null !== $color ) {
153
  $style = 'style="background-color: ' . $color . '"';
154
  $clr = $color;
155
  }
@@ -170,6 +165,20 @@ class Ai1ec_View_Admin_EventCategory extends Ai1ec_Base {
170
  $args,
171
  true
172
  )->render();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
173
 
174
  $style = 'style="display:none"';
175
 
@@ -205,28 +214,9 @@ class Ai1ec_View_Admin_EventCategory extends Ai1ec_Base {
205
  */
206
  public function events_categories_add_form_fields() {
207
 
208
- $loader = $this->_registry->get( 'theme.loader' );
209
 
210
- // Category color
211
- $args = array(
212
- 'color' => '',
213
- 'style' => '',
214
- 'label' => __( 'Category Color', AI1EC_PLUGIN_NAME ),
215
- 'remove_label' => __( 'Remove Image', AI1EC_PLUGIN_NAME ),
216
- 'description' => __(
217
- 'Events in this category will be identified by this color',
218
- AI1EC_PLUGIN_NAME
219
- ),
220
- 'edit' => false
221
- );
222
-
223
- $file = $loader->get_file(
224
- 'setting/categories-color-picker.twig',
225
- $args,
226
- true
227
- );
228
-
229
- $file->render();
230
 
231
  // Category image
232
  $args = array(
133
  }
134
  }
135
 
136
+ public function show_color( $term = null ) {
 
 
 
 
 
 
 
137
 
138
  $taxonomy = $this->_registry->get( 'model.taxonomy' );
139
+ $color = '';
140
+ if ( null !== $term ) {
141
+ $color = $taxonomy->get_category_color( $term->term_id );
142
+ }
143
 
144
  $style = '';
145
  $clr = '';
146
 
147
+ if ( $color ) {
148
  $style = 'style="background-color: ' . $color . '"';
149
  $clr = $color;
150
  }
165
  $args,
166
  true
167
  )->render();
168
+ }
169
+
170
+ /**
171
+ * Edit category form
172
+ *
173
+ * @param $term
174
+ *
175
+ * @return void
176
+ */
177
+ public function events_categories_edit_form_fields( $term ) {
178
+ $this->show_color( $term );
179
+ $taxonomy = $this->_registry->get( 'model.taxonomy' );
180
+ $loader = $this->_registry->get( 'theme.loader' );
181
+ $image = $taxonomy->get_category_image( $term->term_id );
182
 
183
  $style = 'style="display:none"';
184
 
214
  */
215
  public function events_categories_add_form_fields() {
216
 
217
+ $this->show_color();
218
 
219
+ $loader = $this->_registry->get( 'theme.loader' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
220
 
221
  // Category image
222
  $args = array(
app/view/admin/get-repeat-box.php CHANGED
@@ -58,6 +58,7 @@ class Ai1ec_View_Admin_Get_repeat_Box extends Ai1ec_Base {
58
  'row_weekly' => $this->row_weekly(),
59
  'row_monthly' => $this->row_monthly(),
60
  'row_yearly' => $this->row_yearly(),
 
61
  'count' => $this->create_count_input(
62
  'ai1ec_count',
63
  $count
@@ -131,11 +132,17 @@ class Ai1ec_View_Admin_Get_repeat_Box extends Ai1ec_Base {
131
  'Recurrence rule cannot be empty.'
132
  );
133
  } else {
134
- $rrule = $this->_registry->get( 'recurrence.rule' );
135
- // convert rrule to text
136
- $message = ucfirst(
137
- $rrule->rrule_to_text( $_REQUEST['rrule'] )
138
- );
 
 
 
 
 
 
139
  }
140
  } else {
141
  $error = true;
@@ -210,6 +217,23 @@ class Ai1ec_View_Admin_Get_repeat_Box extends Ai1ec_Base {
210
  ->get_content();
211
  }
212
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
213
  /**
214
  * Generates and returns "End after X times" input
215
  *
58
  'row_weekly' => $this->row_weekly(),
59
  'row_monthly' => $this->row_monthly(),
60
  'row_yearly' => $this->row_yearly(),
61
+ 'row_custom' => $this->row_custom(),
62
  'count' => $this->create_count_input(
63
  'ai1ec_count',
64
  $count
132
  'Recurrence rule cannot be empty.'
133
  );
134
  } else {
135
+ //list( $rule, $value ) = explode( '=', $_REQUEST['rrule'], 2 );
136
+ //if ( in_array( array(), $rule ) ) {
137
+ // $message = $this->_registry->get( 'recurrence.date' );
138
+ //
139
+ //} else {
140
+ $rrule = $this->_registry->get( 'recurrence.rule' );
141
+ // convert rrule to text
142
+ $message = ucfirst(
143
+ $rrule->rrule_to_text( $_REQUEST['rrule'] )
144
+ );
145
+ //}
146
  }
147
  } else {
148
  $error = true;
217
  ->get_content();
218
  }
219
 
220
+ /**
221
+ * row_custom function
222
+ *
223
+ * Returns custom dates selector
224
+ *
225
+ * @return void
226
+ **/
227
+ protected function row_custom( $visible = false, $selected = 1 ) {
228
+ $loader = $this->_registry->get( 'theme.loader' );
229
+
230
+ $args = array(
231
+ 'visible' => $visible
232
+ );
233
+ return $loader->get_file( 'row_custom.php', $args, true )
234
+ ->get_content();
235
+ }
236
+
237
  /**
238
  * Generates and returns "End after X times" input
239
  *
app/view/admin/nav.php CHANGED
@@ -20,7 +20,7 @@ class Ai1ec_View_Admin_Navigation extends Ai1ec_Base {
20
  public function plugin_action_links( $links ) {
21
  $settings_link = sprintf(
22
  Ai1ec_I18n::__( '<a href="%s">Settings</a>' ),
23
- admin_url( AI1EC_SETTINGS_BASE_URL )
24
  );
25
  array_unshift( $links, $settings_link );
26
  return $links;
20
  public function plugin_action_links( $links ) {
21
  $settings_link = sprintf(
22
  Ai1ec_I18n::__( '<a href="%s">Settings</a>' ),
23
+ ai1ec_admin_url( AI1EC_SETTINGS_BASE_URL )
24
  );
25
  array_unshift( $links, $settings_link );
26
  return $links;
app/view/admin/organize.php ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * The page to manage taxonomies.
5
+ *
6
+ * @author Time.ly Network Inc.
7
+ * @since 2.0
8
+ *
9
+ * @package AI1EC
10
+ * @subpackage AI1EC.View
11
+ */
12
+ class Ai1ec_View_Organize extends Ai1ec_Base {
13
+
14
+ /**
15
+ * @var array The taxonomies for events
16
+ */
17
+ protected $_taxonomies = array();
18
+
19
+ /**
20
+ * Register actions to draw the headers
21
+ */
22
+ public function add_taxonomy_actions() {
23
+ $taxonomies = get_object_taxonomies( AI1EC_POST_TYPE, 'object' );
24
+ $dispatcher = $this->_registry->get( 'event.dispatcher' );
25
+ $taxonomy_metadata = array(
26
+ 'events_categories' => array(
27
+ 'icon' => 'ai1ec-fa ai1ec-fa-folder-open'
28
+ ),
29
+ 'events_tags' => array(
30
+ 'icon' => 'ai1ec-fa ai1ec-fa-tags'
31
+ )
32
+ );
33
+ $taxonomy_metadata = apply_filters(
34
+ 'ai1ec_add_custom_groups',
35
+ $taxonomy_metadata
36
+ );
37
+ do_action( 'ai1ec_taxonomy_management_css' );
38
+ foreach ( $taxonomies as $taxonomy => $data ) {
39
+ if ( true === $data->public ) {
40
+ $active_taxonomy =
41
+ isset( $_GET['taxonomy'] ) &&
42
+ $taxonomy === $_GET['taxonomy'];
43
+ $edit_url = $edit_label = '';
44
+ if ( isset( $taxonomy_metadata[$taxonomy]['url'] ) ) {
45
+ $edit_url = $taxonomy_metadata[$taxonomy]['url'];
46
+ $edit_label = $taxonomy_metadata[$taxonomy]['edit_label'];
47
+ }
48
+ $this->_taxonomies[] = array(
49
+ 'taxonomy_name' => $taxonomy,
50
+ 'url' => add_query_arg(
51
+ array(
52
+ 'post_type' => AI1EC_POST_TYPE,
53
+ 'taxonomy' => $taxonomy
54
+ ),
55
+ admin_url( 'edit-tags.php' )
56
+ ),
57
+ 'name' => $data->labels->name,
58
+ 'active' => $active_taxonomy,
59
+ 'icon' => isset( $taxonomy_metadata[$taxonomy] ) ?
60
+ $taxonomy_metadata[$taxonomy]['icon'] :
61
+ '',
62
+ 'edit_url' => $edit_url,
63
+ 'edit_label' => $edit_label,
64
+ );
65
+
66
+ if ( $active_taxonomy ) {
67
+ $dispatcher->register_action(
68
+ $taxonomy . '_pre_add_form',
69
+ array( 'view.admin.organize', 'render_header' )
70
+ );
71
+ $dispatcher->register_action(
72
+ $taxonomy . '_pre_edit_form',
73
+ array( 'view.admin.organize', 'render_header' )
74
+ );
75
+ }
76
+ }
77
+ }
78
+ }
79
+
80
+ /**
81
+ * Render tabbed header to manage taxonomies.
82
+ */
83
+ public function render_header() {
84
+ echo $this->get_header();
85
+ }
86
+
87
+ /**
88
+ * Generate and return tabbed header to manage taxonomies.
89
+ *
90
+ * @return string HTML markup for tabbed header
91
+ */
92
+ public function get_header() {
93
+ return $this->_registry->get( 'theme.loader' )->get_file(
94
+ 'organize/header.twig',
95
+ array(
96
+ 'taxonomies' => apply_filters(
97
+ 'ai1ec_custom_taxonomies',
98
+ $this->_taxonomies
99
+ ),
100
+ 'text_title' => Ai1ec_I18n::__( 'Organize Events' ),
101
+ ),
102
+ true
103
+ )->get_content();
104
+ }
105
+ }
app/view/admin/settings.php CHANGED
@@ -46,7 +46,10 @@ class Ai1ec_View_Admin_Settings extends Ai1ec_View_Admin_Abstract {
46
  'object' => null
47
  ),
48
  'action' =>
49
- admin_url( '?controller=front&action=ai1ec_save_settings&plugin=' . AI1EC_PLUGIN_NAME ),
 
 
 
50
  );
51
  $loader = $this->_registry->get( 'theme.loader' );
52
  $file = $loader->get_file( 'setting/page.twig', $args, true );
@@ -198,6 +201,7 @@ class Ai1ec_View_Admin_Settings extends Ai1ec_View_Admin_Abstract {
198
  */
199
  protected function _get_tabs_to_show( array $plugin_settings, array $tabs ) {
200
  $index = 0;
 
201
  foreach ( $plugin_settings as $id => $setting ) {
202
  // if the setting is shown
203
  if ( isset ( $setting['renderer'] ) ) {
@@ -210,21 +214,7 @@ class Ai1ec_View_Admin_Settings extends Ai1ec_View_Admin_Abstract {
210
  ) {
211
  $tabs[$tab_to_use]['elements'] = array();
212
  }
213
- // get the renderer
214
- $renderer_name = $setting['renderer']['class'];
215
  $setting['id'] = $id;
216
- $renderer = null;
217
- try {
218
- $renderer = $this->_registry->get(
219
- 'html.element.setting.' . $renderer_name,
220
- $setting
221
- );
222
- } catch ( Ai1ec_Bootstrap_Exception $exception ) {
223
- $renderer = $this->_registry->get(
224
- 'html.element.setting.input',
225
- $setting
226
- );
227
- }
228
  // render the settings
229
  $weight = 10;
230
  if ( isset( $setting['renderer']['weight'] ) ) {
@@ -235,7 +225,7 @@ class Ai1ec_View_Admin_Settings extends Ai1ec_View_Admin_Abstract {
235
  $tabs[$tab_to_use]['elements'][] = array(
236
  'weight' => $weight,
237
  'index' => ++$index,
238
- 'html' => $renderer->render(),
239
  );
240
  // if the settings has an item tab, set the item as active.
241
  if ( isset( $setting['renderer']['item'] ) ) {
@@ -271,11 +261,22 @@ class Ai1ec_View_Admin_Settings extends Ai1ec_View_Admin_Abstract {
271
  }
272
  }
273
  }
274
- $tabs_to_display[$name] = $tab;
 
 
 
 
 
 
275
  } else {
276
  // no items, just check for any element to display.
277
  if ( isset( $tab['elements'] ) ) {
278
- $tabs_to_display[$name] = $tab;
 
 
 
 
 
279
  }
280
  }
281
  }
46
  'object' => null
47
  ),
48
  'action' =>
49
+ ai1ec_admin_url(
50
+ '?controller=front&action=ai1ec_save_settings&plugin=' .
51
+ AI1EC_PLUGIN_NAME
52
+ ),
53
  );
54
  $loader = $this->_registry->get( 'theme.loader' );
55
  $file = $loader->get_file( 'setting/page.twig', $args, true );
201
  */
202
  protected function _get_tabs_to_show( array $plugin_settings, array $tabs ) {
203
  $index = 0;
204
+ $renderer = $this->_registry->get( 'html.element.setting-renderer' );
205
  foreach ( $plugin_settings as $id => $setting ) {
206
  // if the setting is shown
207
  if ( isset ( $setting['renderer'] ) ) {
214
  ) {
215
  $tabs[$tab_to_use]['elements'] = array();
216
  }
 
 
217
  $setting['id'] = $id;
 
 
 
 
 
 
 
 
 
 
 
 
218
  // render the settings
219
  $weight = 10;
220
  if ( isset( $setting['renderer']['weight'] ) ) {
225
  $tabs[$tab_to_use]['elements'][] = array(
226
  'weight' => $weight,
227
  'index' => ++$index,
228
+ 'html' => $renderer->render( $setting ),
229
  );
230
  // if the settings has an item tab, set the item as active.
231
  if ( isset( $setting['renderer']['item'] ) ) {
261
  }
262
  }
263
  }
264
+ // lets make a check to avoid overriding tabs
265
+ if ( ! isset( $tabs_to_display[$name] ) ) {
266
+ $tabs_to_display[$name] = $tab;
267
+ } else {
268
+ $tabs_to_display[$name]['elements'] = $tab['elements'];
269
+ }
270
+
271
  } else {
272
  // no items, just check for any element to display.
273
  if ( isset( $tab['elements'] ) ) {
274
+ // lets make a check to avoid overriding tabs
275
+ if ( ! isset( $tabs_to_display[$name] ) ) {
276
+ $tabs_to_display[$name] = $tab;
277
+ } else {
278
+ $tabs_to_display[$name]['elements'] = $tab['elements'];
279
+ }
280
  }
281
  }
282
  }
app/view/admin/widget-creator.php CHANGED
@@ -114,6 +114,7 @@ class Ai1ec_View_Widget_Creator extends Ai1ec_View_Admin_Abstract {
114
  $widget = $this->_registry->get( $widget_class );
115
  $tabs[$widget_id] = array(
116
  'name' => $widget->get_name(),
 
117
  'requirements' => $widget->check_requirements(),
118
  'elements' => $this->get_html_from_settings(
119
  $widget->get_configurable_for_widget_creation()
@@ -125,13 +126,19 @@ class Ai1ec_View_Widget_Creator extends Ai1ec_View_Admin_Abstract {
125
  $file = $loader->get_file(
126
  'widget-creator/super-widget-contents.twig',
127
  array(
128
- 'tabs' => $tabs,
129
- 'siteurl' => trailingslashit( get_site_url() ),
130
- 'common_info' => __( 'Use this tool to generate code snippets you can place on your site to embed new calendars and widgets.', AI1EC_PLUGIN_NAME ),
131
- 'preview' => __( 'Preview:', AI1EC_PLUGIN_NAME ),
132
- 'full_calendar_title' => __( 'Full Calendar', AI1EC_PLUGIN_NAME ),
133
- 'paste_text' => __( 'Paste this code onto your site:', AI1EC_PLUGIN_NAME ),
134
- 'updated_code_text' => __( 'This code will update to reflect changes made to the settings. Changing settings will not affect previously embedded widgets.', AI1EC_PLUGIN_NAME )
 
 
 
 
 
 
135
  ),
136
  true
137
  );
@@ -139,4 +146,4 @@ class Ai1ec_View_Widget_Creator extends Ai1ec_View_Admin_Abstract {
139
  }
140
 
141
 
142
- }
114
  $widget = $this->_registry->get( $widget_class );
115
  $tabs[$widget_id] = array(
116
  'name' => $widget->get_name(),
117
+ 'icon' => $widget->get_icon(),
118
  'requirements' => $widget->check_requirements(),
119
  'elements' => $this->get_html_from_settings(
120
  $widget->get_configurable_for_widget_creation()
126
  $file = $loader->get_file(
127
  'widget-creator/super-widget-contents.twig',
128
  array(
129
+ 'tabs' => $tabs,
130
+ 'siteurl' => trailingslashit( ai1ec_get_site_url() ),
131
+ 'text_common_info' => Ai1ec_I18n::__( 'Use this tool to generate code snippets you can add to <strong>an external website</strong> to embed new calendars and widgets.' ),
132
+ 'text_alert' => Ai1ec_I18n::__( '<h4>Attention!</h4><p>These widgets are designed to be embedded in <strong>external sites only</strong> and may cause conflicts if used within the same WordPress site.</p>' ),
133
+ 'text_alternatives' => sprintf(
134
+ Ai1ec_I18n::__( '<p>Use <a href="%s"><strong>Appearance</strong> &gt; <strong>Widgets</strong></a> to add event widgets to your WordPress site as you would any other widget, or use <a href="%s" target="_blank">shortcodes</a> to embed the full calendar.</strong></p>' ),
135
+ admin_url( 'widgets.php' ),
136
+ 'http://time.ly/document/user-guide/using-calendar/display-multiple-calendars-site/'
137
+ ),
138
+ 'display_alert' => apply_filters( 'ai1ec_display_widget_creator_warning', true ),
139
+ 'text_preview' => Ai1ec_I18n::__( 'Preview:' ),
140
+ 'text_paste' => Ai1ec_I18n::__( 'Paste this code onto your site:' ),
141
+ 'text_updated_code' => Ai1ec_I18n::__( 'This code will update to reflect changes made to the settings. Changing settings will not affect previously embedded widgets.' ),
142
  ),
143
  true
144
  );
146
  }
147
 
148
 
149
+ }
app/view/calendar/page.php CHANGED
@@ -16,7 +16,6 @@ class Ai1ec_Calendar_Page extends Ai1ec_Base {
16
  */
17
  protected $_exact_dates = NULL;
18
 
19
-
20
  /**
21
  * Public constructor
22
  *
@@ -30,11 +29,17 @@ class Ai1ec_Calendar_Page extends Ai1ec_Base {
30
  /**
31
  * Get the content if the calendar page
32
  *
33
- * @param Ai1ec_Request_Parser $request
 
 
 
 
 
34
  */
35
- public function get_content( Ai1ec_Request_Parser $request ) {
36
-
37
-
 
38
  // Get args for the current view; required to generate HTML for views
39
  // dropdown list, categories, tags, subscribe buttons, and of course the
40
  // view itself.
@@ -53,6 +58,10 @@ class Ai1ec_Calendar_Page extends Ai1ec_Base {
53
  }
54
  $type = $request->get( 'request_type' );
55
 
 
 
 
 
56
  // Add view-specific args to the current view args.
57
  $exact_date = $this->get_exact_date( $request );
58
  try {
@@ -79,7 +88,7 @@ class Ai1ec_Calendar_Page extends Ai1ec_Base {
79
  $request
80
  );
81
  }
82
- $view_args = $view_obj->get_extra_arguments( $view_args, $exact_date );
83
 
84
  // Get HTML for views dropdown list.
85
  $dropdown_args = $view_args;
@@ -95,29 +104,30 @@ class Ai1ec_Calendar_Page extends Ai1ec_Base {
95
  $view_args['views_dropdown'] = $views_dropdown;
96
 
97
  // Get HTML for categories and for tags
98
- $taxonomy = $this->_registry->get( 'view.calendar.taxonomy' );
99
- $categories = $taxonomy->get_html_for_categories(
100
  $view_args
101
  );
102
- $tags = $taxonomy->get_html_for_tags(
103
  $view_args,
104
  true
105
  );
106
 
107
  // Get HTML for subscribe buttons.
108
- $subscribe_buttons =
109
- $this->get_html_for_subscribe_buttons( $view_args );
110
  // Get HTML for view itself.
111
- $view = $view_obj->get_content( $view_args );
112
 
113
- $router = $this->_registry->get( 'routing.router' );
114
- $are_filters_set = $router->is_at_least_one_filter_set_in_request(
115
  $view_args
116
  );
117
 
118
  if (
119
  ( $view_args['no_navigation'] || $type !== 'html' ) &&
120
- 'jsonp' !== $type
 
121
  ) {
122
 
123
  // send data both for json and jsonp as shortcodes are jsonp
@@ -128,6 +138,7 @@ class Ai1ec_Calendar_Page extends Ai1ec_Base {
128
  'views_dropdown' => $views_dropdown,
129
  'subscribe_buttons' => $subscribe_buttons,
130
  'are_filters_set' => $are_filters_set,
 
131
  'custom_filters' => apply_filters(
132
  'ai1ec_custom_filters_html',
133
  '',
@@ -149,7 +160,8 @@ class Ai1ec_Calendar_Page extends Ai1ec_Base {
149
  'contribution_buttons' => apply_filters(
150
  'ai1ec_contribution_buttons',
151
  '',
152
- $type
 
153
  ),
154
  'show_dropdowns' => apply_filters(
155
  'ai1ec_show_dropdowns',
@@ -209,6 +221,13 @@ class Ai1ec_Calendar_Page extends Ai1ec_Base {
209
  'views_dropdown' => $views_dropdown,
210
  'subscribe_buttons' => $subscribe_buttons,
211
  'are_filters_set' => $are_filters_set,
 
 
 
 
 
 
 
212
  );
213
  }
214
  }
@@ -221,21 +240,25 @@ class Ai1ec_Calendar_Page extends Ai1ec_Base {
221
  * @return string Rendered HTML to include in output.
222
  */
223
  public function get_html_for_subscribe_buttons( array $view_args ) {
224
- $turn_off_subscribe = $this->_registry->get( 'model.settings' )
225
- ->get( 'turn_off_subscription_buttons' );
226
  if ( $turn_off_subscribe ) {
227
  return '';
228
  }
 
229
  $args = array(
230
- 'url_args' => '',
231
- 'is_filtered' => false,
232
- 'export_url' => AI1EC_EXPORT_URL,
233
- 'export_url_no_html' => AI1EC_EXPORT_URL . '&no_html=true',
234
- 'text_filtered' => __( 'Subscribe to filtered calendar', AI1EC_PLUGIN_NAME ),
235
- 'text_subscribe' => __( 'Subscribe', AI1EC_PLUGIN_NAME ),
236
- 'text' => $this->_registry
 
 
237
  ->get( 'view.calendar.subscribe-button' )
238
  ->get_labels(),
 
239
  );
240
  if ( ! empty( $view_args['cat_ids'] ) ) {
241
  $args['url_args'] .= '&ai1ec_cat_ids=' .
@@ -315,7 +338,7 @@ class Ai1ec_Calendar_Page extends Ai1ec_Base {
315
  $val['longname'],
316
  1
317
  );
318
- if ( AI1EC_USE_FRONTEND_RENDERING ) {
319
  $options['request_format'] = 'json';
320
  }
321
  $href = $this->_registry->get( 'html.element.href', $options );
16
  */
17
  protected $_exact_dates = NULL;
18
 
 
19
  /**
20
  * Public constructor
21
  *
29
  /**
30
  * Get the content if the calendar page
31
  *
32
+ * @param Ai1ec_Request_Parser $request Request object.
33
+ * @param string $caller Method caller, expected one of
34
+ * ['shortcode', 'render-command']
35
+ * Defaults to 'render-command'.
36
+ *
37
+ * @return string Content.
38
  */
39
+ public function get_content(
40
+ Ai1ec_Request_Parser $request,
41
+ $caller = 'render-command'
42
+ ) {
43
  // Get args for the current view; required to generate HTML for views
44
  // dropdown list, categories, tags, subscribe buttons, and of course the
45
  // view itself.
58
  }
59
  $type = $request->get( 'request_type' );
60
 
61
+ $is_json = $this->_registry->get( 'http.request' )->is_json_required(
62
+ $view_args['request_format'], $action
63
+ );
64
+
65
  // Add view-specific args to the current view args.
66
  $exact_date = $this->get_exact_date( $request );
67
  try {
88
  $request
89
  );
90
  }
91
+ $view_args = $view_obj->get_extra_arguments( $view_args, $exact_date );
92
 
93
  // Get HTML for views dropdown list.
94
  $dropdown_args = $view_args;
104
  $view_args['views_dropdown'] = $views_dropdown;
105
 
106
  // Get HTML for categories and for tags
107
+ $taxonomy = $this->_registry->get( 'view.calendar.taxonomy' );
108
+ $categories = $taxonomy->get_html_for_categories(
109
  $view_args
110
  );
111
+ $tags = $taxonomy->get_html_for_tags(
112
  $view_args,
113
  true
114
  );
115
 
116
  // Get HTML for subscribe buttons.
117
+ $subscribe_buttons = $this->get_html_for_subscribe_buttons( $view_args );
118
+
119
  // Get HTML for view itself.
120
+ $view = $view_obj->get_content( $view_args );
121
 
122
+ $router = $this->_registry->get( 'routing.router' );
123
+ $are_filters_set = $router->is_at_least_one_filter_set_in_request(
124
  $view_args
125
  );
126
 
127
  if (
128
  ( $view_args['no_navigation'] || $type !== 'html' ) &&
129
+ 'jsonp' !== $type &&
130
+ $is_json
131
  ) {
132
 
133
  // send data both for json and jsonp as shortcodes are jsonp
138
  'views_dropdown' => $views_dropdown,
139
  'subscribe_buttons' => $subscribe_buttons,
140
  'are_filters_set' => $are_filters_set,
141
+ 'is_json' => $is_json,
142
  'custom_filters' => apply_filters(
143
  'ai1ec_custom_filters_html',
144
  '',
160
  'contribution_buttons' => apply_filters(
161
  'ai1ec_contribution_buttons',
162
  '',
163
+ $type,
164
+ $caller
165
  ),
166
  'show_dropdowns' => apply_filters(
167
  'ai1ec_show_dropdowns',
221
  'views_dropdown' => $views_dropdown,
222
  'subscribe_buttons' => $subscribe_buttons,
223
  'are_filters_set' => $are_filters_set,
224
+ 'is_json' => $is_json,
225
+ 'custom_filters' => apply_filters(
226
+ 'ai1ec_custom_filters_html',
227
+ '',
228
+ $view_args,
229
+ $request
230
+ ),
231
  );
232
  }
233
  }
240
  * @return string Rendered HTML to include in output.
241
  */
242
  public function get_html_for_subscribe_buttons( array $view_args ) {
243
+ $settings = $this->_registry->get( 'model.settings' );
244
+ $turn_off_subscribe = $settings->get( 'turn_off_subscription_buttons' );
245
  if ( $turn_off_subscribe ) {
246
  return '';
247
  }
248
+
249
  $args = array(
250
+ 'url_args' => '',
251
+ 'is_filtered' => false,
252
+ 'export_url' => AI1EC_EXPORT_URL,
253
+ 'export_url_no_html' => AI1EC_EXPORT_URL . '&no_html=true',
254
+ 'text_filtered' => Ai1ec_I18n::__( 'Subscribe to filtered calendar' ),
255
+ 'text_subscribe' => Ai1ec_I18n::__( 'Subscribe' ),
256
+ 'text_get_calendar' => Ai1ec_I18n::__( 'Get a Timely Calendar' ),
257
+ 'show_get_calendar' => ! $settings->get( 'disable_get_calendar_button' ),
258
+ 'text' => $this->_registry
259
  ->get( 'view.calendar.subscribe-button' )
260
  ->get_labels(),
261
+ 'placement' => 'up',
262
  );
263
  if ( ! empty( $view_args['cat_ids'] ) ) {
264
  $args['url_args'] .= '&ai1ec_cat_ids=' .
338
  $val['longname'],
339
  1
340
  );
341
+ if ( $settings->get( 'ai1ec_use_frontend_rendering' ) ) {
342
  $options['request_format'] = 'json';
343
  }
344
  $href = $this->_registry->get( 'html.element.href', $options );
app/view/calendar/shortcode.php CHANGED
@@ -113,13 +113,15 @@ class Ai1ec_View_Calendar_Shortcode extends Ai1ec_Base {
113
  }
114
  }
115
  }
116
-
 
 
117
  $query = array(
118
  'ai1ec_cat_ids' => implode( ',', $_events_categories ),
119
  'ai1ec_tag_ids' => implode( ',', $_events_tags ),
120
  'ai1ec_post_ids' => implode( ',', $post_ids ),
121
  'action' => $view,
122
- 'request_type' => 'jsonp',
123
  'events_limit' => isset( $atts['events_limit'] )
124
  // definition above casts values as array, so we take first element,
125
  // as there won't be others
@@ -146,13 +148,11 @@ class Ai1ec_View_Calendar_Shortcode extends Ai1ec_Base {
146
  );
147
  $request->parse();
148
  $page_content = $this->_registry->get( 'view.calendar.page' )
149
- ->get_content( $request );
150
  $this->_registry->get( 'css.frontend' )
151
  ->add_link_to_html_for_frontend();
152
  $this->_registry->get( 'controller.javascript' )
153
  ->load_frontend_js( true );
154
-
155
  return $page_content['html'];
156
  }
157
-
158
  }
113
  }
114
  }
115
  }
116
+ $request_type = $this->_registry->get(
117
+ 'model.settings'
118
+ )->get( 'ai1ec_use_frontend_rendering' ) ? 'json' : 'jsonp';
119
  $query = array(
120
  'ai1ec_cat_ids' => implode( ',', $_events_categories ),
121
  'ai1ec_tag_ids' => implode( ',', $_events_tags ),
122
  'ai1ec_post_ids' => implode( ',', $post_ids ),
123
  'action' => $view,
124
+ 'request_type' => $request_type,
125
  'events_limit' => isset( $atts['events_limit'] )
126
  // definition above casts values as array, so we take first element,
127
  // as there won't be others
148
  );
149
  $request->parse();
150
  $page_content = $this->_registry->get( 'view.calendar.page' )
151
+ ->get_content( $request, 'shortcode' );
152
  $this->_registry->get( 'css.frontend' )
153
  ->add_link_to_html_for_frontend();
154
  $this->_registry->get( 'controller.javascript' )
155
  ->load_frontend_js( true );
 
156
  return $page_content['html'];
157
  }
 
158
  }
app/view/calendar/subscribe-button.php CHANGED
@@ -18,7 +18,6 @@ class Ai1ec_View_Calendar_SubscribeButton {
18
  */
19
  public function get_labels() {
20
  return array(
21
- 'tooltip' => Ai1ec_I18n::__( 'Subscribe in your personal calendar' ),
22
  'label' => array(
23
  'timely' => Ai1ec_I18n::__( 'Add to Timely Calendar' ),
24
  'google' => Ai1ec_I18n::__( 'Add to Google' ),
@@ -36,4 +35,4 @@ class Ai1ec_View_Calendar_SubscribeButton {
36
  );
37
  }
38
 
39
- }
18
  */
19
  public function get_labels() {
20
  return array(
 
21
  'label' => array(
22
  'timely' => Ai1ec_I18n::__( 'Add to Timely Calendar' ),
23
  'google' => Ai1ec_I18n::__( 'Add to Google' ),
35
  );
36
  }
37
 
38
+ }
app/view/calendar/view/abstract.php CHANGED
@@ -16,6 +16,11 @@ abstract class Ai1ec_Calendar_View_Abstract extends Ai1ec_Base {
16
  */
17
  protected $_request;
18
 
 
 
 
 
 
19
  /**
20
  * Public constructor
21
  *
@@ -24,7 +29,8 @@ abstract class Ai1ec_Calendar_View_Abstract extends Ai1ec_Base {
24
  */
25
  public function __construct( Ai1ec_Registry_Object $registry, Ai1ec_Request_Parser $request ) {
26
  parent::__construct( $registry );
27
- $this->_request = $request;
 
28
  }
29
 
30
  /**
@@ -105,6 +111,17 @@ abstract class Ai1ec_Calendar_View_Abstract extends Ai1ec_Base {
105
  );
106
  }
107
 
 
 
 
 
 
 
 
 
 
 
 
108
  /**
109
  * Prepare week specific event start/end timestamps.
110
  *
@@ -198,6 +215,9 @@ abstract class Ai1ec_Calendar_View_Abstract extends Ai1ec_Base {
198
  * @param Ai1ec_Event $event
199
  */
200
  protected function _add_runtime_properties( Ai1ec_Event $event ) {
 
 
 
201
  $instance_permalink = get_permalink(
202
  $event->get( 'post_id' )
203
  );
@@ -217,7 +237,8 @@ abstract class Ai1ec_Calendar_View_Abstract extends Ai1ec_Base {
217
  true
218
  )
219
  );
220
-
 
221
  $event->set_runtime(
222
  'filtered_content',
223
  apply_filters(
@@ -228,6 +249,7 @@ abstract class Ai1ec_Calendar_View_Abstract extends Ai1ec_Base {
228
  )
229
  )
230
  );
 
231
 
232
  $taxonomy = $this->_registry->get( 'view.event.taxonomy' );
233
  $ticket = $this->_registry->get( 'view.event.ticket' );
@@ -238,8 +260,8 @@ abstract class Ai1ec_Calendar_View_Abstract extends Ai1ec_Base {
238
  $event->set_runtime( 'category_colors', $taxonomy->get_category_colors( $event ) );
239
  $event->set_runtime( 'ticket_url_label', $ticket->get_tickets_url_label( $event, false ) );
240
  $event->set_runtime( 'edit_post_link', get_edit_post_link( $event->get( 'post_id' ) ) );
241
- $post = $this->_registry->get( 'view.event.post' );
242
- $event->set_runtime( 'post_excerpt', $post->trim_excerpt( $event ) );
243
  $color = $this->_registry->get( 'view.event.color' );
244
  $event->set_runtime( 'faded_color', $color->get_faded_color( $event ) );
245
  $event->set_runtime( 'rgba_color', $color->get_rgba_color( $event ) );
@@ -249,6 +271,7 @@ abstract class Ai1ec_Calendar_View_Abstract extends Ai1ec_Base {
249
  ->get_short_time( $event->get( 'start' ) )
250
  );
251
  $this->_add_view_specific_runtime_properties( $event );
 
252
  }
253
 
254
  /**
16
  */
17
  protected $_request;
18
 
19
+ /**
20
+ * @var Ai1ec_Compatibility_Check Theme compatibility check object.
21
+ */
22
+ protected $_compatibility;
23
+
24
  /**
25
  * Public constructor
26
  *
29
  */
30
  public function __construct( Ai1ec_Registry_Object $registry, Ai1ec_Request_Parser $request ) {
31
  parent::__construct( $registry );
32
+ $this->_request = $request;
33
+ $this->_compatibility = $registry->get( 'compatibility.check' );
34
  }
35
 
36
  /**
111
  );
112
  }
113
 
114
+ /**
115
+ * Applies filters to view args for front end rendering
116
+ *
117
+ * @param array $args
118
+ */
119
+ protected function _apply_filters_to_args( array $args ) {
120
+ $loader = $this->_registry->get( 'theme.loader' );
121
+ $view = $this->get_name();
122
+ return $loader->apply_filters_to_args( $args, $view . '.twig', false );
123
+ }
124
+
125
  /**
126
  * Prepare week specific event start/end timestamps.
127
  *
215
  * @param Ai1ec_Event $event
216
  */
217
  protected function _add_runtime_properties( Ai1ec_Event $event ) {
218
+ global $post;
219
+ $original_post = $post;
220
+ $post = $event->get( 'post' );
221
  $instance_permalink = get_permalink(
222
  $event->get( 'post_id' )
223
  );
237
  true
238
  )
239
  );
240
+ $calendar_state = $this->_registry->get( 'calendar.state' );
241
+ $calendar_state->set_append_content( false );
242
  $event->set_runtime(
243
  'filtered_content',
244
  apply_filters(
249
  )
250
  )
251
  );
252
+ $calendar_state->set_append_content( true );
253
 
254
  $taxonomy = $this->_registry->get( 'view.event.taxonomy' );
255
  $ticket = $this->_registry->get( 'view.event.ticket' );
260
  $event->set_runtime( 'category_colors', $taxonomy->get_category_colors( $event ) );
261
  $event->set_runtime( 'ticket_url_label', $ticket->get_tickets_url_label( $event, false ) );
262
  $event->set_runtime( 'edit_post_link', get_edit_post_link( $event->get( 'post_id' ) ) );
263
+ $event_post = $this->_registry->get( 'view.event.post' );
264
+ $event->set_runtime( 'post_excerpt', $event_post->trim_excerpt( $event ) );
265
  $color = $this->_registry->get( 'view.event.color' );
266
  $event->set_runtime( 'faded_color', $color->get_faded_color( $event ) );
267
  $event->set_runtime( 'rgba_color', $color->get_rgba_color( $event ) );
271
  ->get_short_time( $event->get( 'start' ) )
272
  );
273
  $this->_add_view_specific_runtime_properties( $event );
274
+ $post = $original_post;
275
  }
276
 
277
  /**
app/view/calendar/view/agenda.php CHANGED
@@ -106,6 +106,12 @@ class Ai1ec_Calendar_View_Agenda extends Ai1ec_Calendar_View_Abstract {
106
  'no_navigation' => $view_args['no_navigation'],
107
  'pagination_links' => $pagination_links,
108
  'views_dropdown' => $view_args['views_dropdown'],
 
 
 
 
 
 
109
  );
110
  // Add extra buttons to Agenda view's nav bar if events were returned.
111
  if ( $type === 'agenda' && $dates ) {
@@ -130,9 +136,9 @@ class Ai1ec_Calendar_View_Agenda extends Ai1ec_Calendar_View_Abstract {
130
  'show_location_in_title' => $settings->get( 'show_location_in_title' ),
131
  'page_offset' => $view_args['page_offset'],
132
  'navigation' => $navigation,
 
133
  'post_ids' => join( ',', $view_args['post_ids'] ),
134
  'data_type' => $view_args['data_type'],
135
- 'data_type_events' => '',
136
  'is_ticket_button_enabled' => $is_ticket_button_enabled,
137
  'text_upcoming_events' => __( 'There are no upcoming events to display at this time.', AI1EC_PLUGIN_NAME ),
138
  'text_edit' => __( 'Edit', AI1EC_PLUGIN_NAME ),
@@ -141,20 +147,15 @@ class Ai1ec_Calendar_View_Agenda extends Ai1ec_Calendar_View_Abstract {
141
  'text_tags' => __( 'Tags:', AI1EC_PLUGIN_NAME ),
142
  'text_venue_separator' => __( '@ %s', AI1EC_PLUGIN_NAME ),
143
  );
144
- if ( $settings->get( 'ajaxify_events_in_web_widget' ) ) {
145
- $args['data_type_events'] = $view_args['data_type'];
146
- }
147
 
148
  // Allow child views to modify arguments passed to template.
149
  $args = $this->get_extra_template_arguments( $args );
150
 
151
- $file = $loader->get_file( $type . '.twig', $args, false );
152
-
153
  return
154
  $this->_registry->get( 'http.request' )->is_json_required(
155
- $view_args['request_format']
156
  )
157
- ? json_encode( $args )
158
  : $this->_get_view( $args );
159
  }
160
 
@@ -250,7 +251,9 @@ class Ai1ec_Calendar_View_Agenda extends Ai1ec_Calendar_View_Abstract {
250
  $event_props['avatar'] = $event->getavatar();
251
  $event_props['avatar_not_wrapped'] = $event->getavatar( false );
252
  $event_object = $event_props;
253
- if ( AI1EC_THEME_COMPATIBILITY_FER ) {
 
 
254
  $event_object = $event;
255
  }
256
  $dates[$timestamp]['events'][$category][] = $event_object;
@@ -261,6 +264,10 @@ class Ai1ec_Calendar_View_Agenda extends Ai1ec_Calendar_View_Abstract {
261
  get( 'date.time', $timestamp )->format_i18n( 'D' );
262
  $dates[$timestamp]['month'] = $this->_registry->
263
  get( 'date.time', $timestamp )->format_i18n( 'M' );
 
 
 
 
264
  $dates[$timestamp]['year'] = $this->_registry->
265
  get( 'date.time', $timestamp )->format_i18n( 'Y' );
266
  }
@@ -310,7 +317,11 @@ class Ai1ec_Calendar_View_Agenda extends Ai1ec_Calendar_View_Abstract {
310
 
311
  $links = array();
312
 
313
- if ( AI1EC_USE_FRONTEND_RENDERING ) {
 
 
 
 
314
  $args['request_format'] = 'json';
315
  }
316
  $args['page_offset'] = -1;
106
  'no_navigation' => $view_args['no_navigation'],
107
  'pagination_links' => $pagination_links,
108
  'views_dropdown' => $view_args['views_dropdown'],
109
+ 'below_toolbar' => apply_filters(
110
+ 'ai1ec_below_toolbar',
111
+ '',
112
+ $type,
113
+ $view_args
114
+ ),
115
  );
116
  // Add extra buttons to Agenda view's nav bar if events were returned.
117
  if ( $type === 'agenda' && $dates ) {
136
  'show_location_in_title' => $settings->get( 'show_location_in_title' ),
137
  'page_offset' => $view_args['page_offset'],
138
  'navigation' => $navigation,
139
+ 'pagination_links' => $pagination_links,
140
  'post_ids' => join( ',', $view_args['post_ids'] ),
141
  'data_type' => $view_args['data_type'],
 
142
  'is_ticket_button_enabled' => $is_ticket_button_enabled,
143
  'text_upcoming_events' => __( 'There are no upcoming events to display at this time.', AI1EC_PLUGIN_NAME ),
144
  'text_edit' => __( 'Edit', AI1EC_PLUGIN_NAME ),
147
  'text_tags' => __( 'Tags:', AI1EC_PLUGIN_NAME ),
148
  'text_venue_separator' => __( '@ %s', AI1EC_PLUGIN_NAME ),
149
  );
 
 
 
150
 
151
  // Allow child views to modify arguments passed to template.
152
  $args = $this->get_extra_template_arguments( $args );
153
 
 
 
154
  return
155
  $this->_registry->get( 'http.request' )->is_json_required(
156
+ $view_args['request_format'], $type
157
  )
158
+ ? $loader->apply_filters_to_args( $args, $type . '.twig', false )
159
  : $this->_get_view( $args );
160
  }
161
 
251
  $event_props['avatar'] = $event->getavatar();
252
  $event_props['avatar_not_wrapped'] = $event->getavatar( false );
253
  $event_object = $event_props;
254
+ if (
255
+ $this->_compatibility->use_backward_compatibility()
256
+ ) {
257
  $event_object = $event;
258
  }
259
  $dates[$timestamp]['events'][$category][] = $event_object;
264
  get( 'date.time', $timestamp )->format_i18n( 'D' );
265
  $dates[$timestamp]['month'] = $this->_registry->
266
  get( 'date.time', $timestamp )->format_i18n( 'M' );
267
+ $dates[$timestamp]['full_month'] = $this->_registry->
268
+ get( 'date.time', $timestamp )->format_i18n( 'F' );
269
+ $dates[$timestamp]['full_weekday'] = $this->_registry->
270
+ get( 'date.time', $timestamp )->format_i18n( 'l' );
271
  $dates[$timestamp]['year'] = $this->_registry->
272
  get( 'date.time', $timestamp )->format_i18n( 'Y' );
273
  }
317
 
318
  $links = array();
319
 
320
+ if (
321
+ $this->_registry->get(
322
+ 'model.settings'
323
+ )->get( 'ai1ec_use_frontend_rendering' )
324
+ ) {
325
  $args['request_format'] = 'json';
326
  }
327
  $args['page_offset'] = -1;
app/view/calendar/view/month.php CHANGED
@@ -77,13 +77,10 @@ class Ai1ec_Calendar_View_Month extends Ai1ec_Calendar_View_Abstract {
77
  'month_word_wrap' => $settings->get( 'month_word_wrap' ),
78
  'post_ids' => join( ',', $args['post_ids'] ),
79
  'data_type' => $args['data_type'],
80
- 'data_type_events' => '',
81
  'is_ticket_button_enabled' => $is_ticket_button_enabled,
82
  'text_venue_separator' => __( '@ %s', AI1EC_PLUGIN_NAME ),
 
83
  );
84
- if ( $settings->get( 'ajaxify_events_in_web_widget' ) ) {
85
- $view_args['data_type_events'] = $args['data_type'];
86
- }
87
 
88
  // Add navigation if requested.
89
  $view_args['navigation'] = $this->_get_navigation(
@@ -91,14 +88,20 @@ class Ai1ec_Calendar_View_Month extends Ai1ec_Calendar_View_Abstract {
91
  'no_navigation' => $args['no_navigation'],
92
  'pagination_links' => $pagination_links,
93
  'views_dropdown' => $args['views_dropdown'],
 
 
 
 
 
 
94
  )
95
  );
96
 
97
  return
98
  $this->_registry->get( 'http.request' )->is_json_required(
99
- $args['request_format']
100
  )
101
- ? json_encode( $view_args )
102
  : $this->_get_view( $view_args );
103
  }
104
 
@@ -369,7 +372,9 @@ class Ai1ec_Calendar_View_Month extends Ai1ec_Calendar_View_Abstract {
369
  '',
370
  false ),
371
  );
372
- if ( AI1EC_THEME_COMPATIBILITY_FER ) {
 
 
373
  $event_data = $evt;
374
  }
375
  $events[] = $event_data;
77
  'month_word_wrap' => $settings->get( 'month_word_wrap' ),
78
  'post_ids' => join( ',', $args['post_ids'] ),
79
  'data_type' => $args['data_type'],
 
80
  'is_ticket_button_enabled' => $is_ticket_button_enabled,
81
  'text_venue_separator' => __( '@ %s', AI1EC_PLUGIN_NAME ),
82
+ 'pagination_links' => $pagination_links,
83
  );
 
 
 
84
 
85
  // Add navigation if requested.
86
  $view_args['navigation'] = $this->_get_navigation(
88
  'no_navigation' => $args['no_navigation'],
89
  'pagination_links' => $pagination_links,
90
  'views_dropdown' => $args['views_dropdown'],
91
+ 'below_toolbar' => apply_filters(
92
+ 'ai1ec_below_toolbar',
93
+ '',
94
+ $this->get_name(),
95
+ $args
96
+ ),
97
  )
98
  );
99
 
100
  return
101
  $this->_registry->get( 'http.request' )->is_json_required(
102
+ $args['request_format'], 'month'
103
  )
104
+ ? $this->_apply_filters_to_args( $view_args )
105
  : $this->_get_view( $view_args );
106
  }
107
 
372
  '',
373
  false ),
374
  );
375
+ if (
376
+ $this->_compatibility->use_backward_compatibility()
377
+ ) {
378
  $event_data = $evt;
379
  }
380
  $events[] = $event_data;
app/view/calendar/view/oneday.php CHANGED
@@ -60,13 +60,12 @@ class Ai1ec_Calendar_View_Oneday extends Ai1ec_Calendar_View_Abstract {
60
  $pagination_links = $this->_get_pagination( $args, $title );
61
 
62
  // Calculate today marker's position.
63
- $now = $date_system->current_time();
64
- $midnight = $this->_registry->get( 'date.time', $now )
65
  ->set_time( 0, 0, 0 );
66
- $now = $this->_registry->get( 'date.time', $now );
67
  $now_text = $this->_registry->get( 'view.event.time' )
68
  ->get_short_time( $now );
69
- $now = $now->diff_sec( $midnight );
70
 
71
  $is_ticket_button_enabled = apply_filters( 'ai1ec_oneday_ticket_button', false );
72
  $show_reveal_button = apply_filters( 'ai1ec_oneday_reveal_button', false );
@@ -93,7 +92,6 @@ class Ai1ec_Calendar_View_Oneday extends Ai1ec_Calendar_View_Abstract {
93
  'done_allday_label' => false,// legacy
94
  'done_grid' => false,// legacy
95
  'data_type' => $args['data_type'],
96
- 'data_type_events' => '',
97
  'is_ticket_button_enabled' => $is_ticket_button_enabled,
98
  'show_reveal_button' => $show_reveal_button,
99
  'text_full_day' => __( 'Reveal full day', AI1EC_PLUGIN_NAME ),
@@ -103,10 +101,8 @@ class Ai1ec_Calendar_View_Oneday extends Ai1ec_Calendar_View_Abstract {
103
  'hours' => $hours,
104
  'indent_multiplier' => 16,
105
  'indent_offset' => 54,
 
106
  );
107
- if ( $settings->get( 'ajaxify_events_in_web_widget' ) ) {
108
- $view_args['data_type_events'] = $args['data_type'];
109
- }
110
 
111
  // Add navigation if requested.
112
  $view_args['navigation'] = $this->_get_navigation(
@@ -114,14 +110,20 @@ class Ai1ec_Calendar_View_Oneday extends Ai1ec_Calendar_View_Abstract {
114
  'no_navigation' => $args['no_navigation'],
115
  'pagination_links' => $pagination_links,
116
  'views_dropdown' => $args['views_dropdown'],
 
 
 
 
 
 
117
  )
118
  );
119
 
120
  return
121
  $this->_registry->get( 'http.request' )->is_json_required(
122
- $args['request_format']
123
  )
124
- ? json_encode( $view_args )
125
  : $this->_get_view( $view_args );
126
 
127
  }
@@ -217,8 +219,7 @@ class Ai1ec_Calendar_View_Oneday extends Ai1ec_Calendar_View_Abstract {
217
  array $filter = array(),
218
  $legacy = false
219
  ) {
220
- $search = $this->_registry->get( 'model.search' );
221
- $date_system = $this->_registry->get( 'date.system' );
222
 
223
  $loc_start_time = $this->_registry
224
  ->get( 'date.time', $start_time, 'sys.default' )
@@ -228,17 +229,7 @@ class Ai1ec_Calendar_View_Oneday extends Ai1ec_Calendar_View_Abstract {
228
  ->adjust_day( +1 )
229
  ->set_time( 0, 0, 0 );
230
 
231
- // expand search range to include dates that actually render on this day
232
- $search_start = $this->_registry->get( 'date.time', $loc_start_time )
233
- ->adjust_day( -1 );
234
- $search_end = $this->_registry->get( 'date.time', $loc_end_time )
235
- ->adjust_day( 1 );
236
-
237
- $day_events = $search->get_events_between(
238
- $search_start,
239
- $search_end,
240
- $filter
241
- );
242
  $this->_update_meta( $day_events );
243
  // Split up events on a per-day basis
244
  $all_events = array();
@@ -332,7 +323,9 @@ class Ai1ec_Calendar_View_Oneday extends Ai1ec_Calendar_View_Abstract {
332
  '',
333
  false ),
334
  );
335
- if ( AI1EC_THEME_COMPATIBILITY_FER ) {
 
 
336
  $event = $evt;
337
  }
338
  if ( 'notallday' === $event_type) {
60
  $pagination_links = $this->_get_pagination( $args, $title );
61
 
62
  // Calculate today marker's position.
63
+ $midnight = $this->_registry->get( 'date.time', 'now', 'sys.default' )
 
64
  ->set_time( 0, 0, 0 );
65
+ $now = $this->_registry->get( 'date.time', 'now', 'sys.default' );
66
  $now_text = $this->_registry->get( 'view.event.time' )
67
  ->get_short_time( $now );
68
+ $now = (int) ( $now->diff_sec( $midnight ) / 60 );
69
 
70
  $is_ticket_button_enabled = apply_filters( 'ai1ec_oneday_ticket_button', false );
71
  $show_reveal_button = apply_filters( 'ai1ec_oneday_reveal_button', false );
92
  'done_allday_label' => false,// legacy
93
  'done_grid' => false,// legacy
94
  'data_type' => $args['data_type'],
 
95
  'is_ticket_button_enabled' => $is_ticket_button_enabled,
96
  'show_reveal_button' => $show_reveal_button,
97
  'text_full_day' => __( 'Reveal full day', AI1EC_PLUGIN_NAME ),
101
  'hours' => $hours,
102
  'indent_multiplier' => 16,
103
  'indent_offset' => 54,
104
+ 'pagination_links' => $pagination_links,
105
  );
 
 
 
106
 
107
  // Add navigation if requested.
108
  $view_args['navigation'] = $this->_get_navigation(
110
  'no_navigation' => $args['no_navigation'],
111
  'pagination_links' => $pagination_links,
112
  'views_dropdown' => $args['views_dropdown'],
113
+ 'below_toolbar' => apply_filters(
114
+ 'ai1ec_below_toolbar',
115
+ '',
116
+ $this->get_name(),
117
+ $args
118
+ ),
119
  )
120
  );
121
 
122
  return
123
  $this->_registry->get( 'http.request' )->is_json_required(
124
+ $args['request_format'], 'oneday'
125
  )
126
+ ? $this->_apply_filters_to_args( $view_args )
127
  : $this->_get_view( $view_args );
128
 
129
  }
219
  array $filter = array(),
220
  $legacy = false
221
  ) {
222
+ $search = $this->_registry->get( 'model.search' );
 
223
 
224
  $loc_start_time = $this->_registry
225
  ->get( 'date.time', $start_time, 'sys.default' )
229
  ->adjust_day( +1 )
230
  ->set_time( 0, 0, 0 );
231
 
232
+ $day_events = $search->get_events_for_day( $loc_start_time, $filter );
 
 
 
 
 
 
 
 
 
 
233
  $this->_update_meta( $day_events );
234
  // Split up events on a per-day basis
235
  $all_events = array();
323
  '',
324
  false ),
325
  );
326
+ if (
327
+ $this->_compatibility->use_backward_compatibility()
328
+ ) {
329
  $event = $evt;
330
  }
331
  if ( 'notallday' === $event_type) {
app/view/calendar/view/week.php CHANGED
@@ -67,8 +67,8 @@ class Ai1ec_Calendar_View_Week extends Ai1ec_Calendar_View_Abstract {
67
  ->get( 'time_format', Ai1ec_I18n::__( 'g a' ) );
68
 
69
  // Calculate today marker's position.
70
- $now = $this->_registry->get( 'date.time' );
71
- $now_text = $now->format_i18n( 'M j' );
72
  $now = $now->format( 'G' ) * 60 + $now->format( 'i' );
73
  // Find out if the current week view contains "now" and thus should display
74
  // the "now" marker.
@@ -104,7 +104,6 @@ class Ai1ec_Calendar_View_Week extends Ai1ec_Calendar_View_Abstract {
104
  'done_allday_label' => false,
105
  'done_grid' => false,
106
  'data_type' => $args['data_type'],
107
- 'data_type_events' => '',
108
  'is_ticket_button_enabled' => $is_ticket_button_enabled,
109
  'show_reveal_button' => $show_reveal_button,
110
  'text_full_day' => __( 'Reveal full day', AI1EC_PLUGIN_NAME ),
@@ -114,10 +113,8 @@ class Ai1ec_Calendar_View_Week extends Ai1ec_Calendar_View_Abstract {
114
  'hours' => $hours,
115
  'indent_multiplier' => 8,
116
  'indent_offset' => 0,
 
117
  );
118
- if ( $settings->get( 'ajaxify_events_in_web_widget' ) ) {
119
- $view_args['data_type_events'] = $args['data_type'];
120
- }
121
 
122
  // Add navigation if requested.
123
  $view_args['navigation'] = $this->_get_navigation(
@@ -125,14 +122,20 @@ class Ai1ec_Calendar_View_Week extends Ai1ec_Calendar_View_Abstract {
125
  'no_navigation' => $args['no_navigation'],
126
  'pagination_links' => $pagination_links,
127
  'views_dropdown' => $args['views_dropdown'],
 
 
 
 
 
 
128
  )
129
  );
130
 
131
  return
132
  $this->_registry->get( 'http.request' )->is_json_required(
133
- $args['request_format']
134
  )
135
- ? json_encode( $view_args )
136
  : $this->_get_view( $view_args );
137
  }
138
 
@@ -361,7 +364,9 @@ class Ai1ec_Calendar_View_Week extends Ai1ec_Calendar_View_Abstract {
361
  '',
362
  false ),
363
  );
364
- if ( AI1EC_THEME_COMPATIBILITY_FER ) {
 
 
365
  $event = $evt;
366
  }
367
  if ( 'notallday' === $event_type) {
@@ -390,7 +395,6 @@ class Ai1ec_Calendar_View_Week extends Ai1ec_Calendar_View_Abstract {
390
  }
391
  }
392
 
393
-
394
  $days[$day_date] = array(
395
  'today' =>
396
  $day_date_ob->format( 'Y' ) == $now->format( 'Y' ) &&
67
  ->get( 'time_format', Ai1ec_I18n::__( 'g a' ) );
68
 
69
  // Calculate today marker's position.
70
+ $now = $this->_registry->get( 'date.time', 'now', 'sys.default' );
71
+ $now_text = $now->format_i18n( 'M j h:i a' );
72
  $now = $now->format( 'G' ) * 60 + $now->format( 'i' );
73
  // Find out if the current week view contains "now" and thus should display
74
  // the "now" marker.
104
  'done_allday_label' => false,
105
  'done_grid' => false,
106
  'data_type' => $args['data_type'],
 
107
  'is_ticket_button_enabled' => $is_ticket_button_enabled,
108
  'show_reveal_button' => $show_reveal_button,
109
  'text_full_day' => __( 'Reveal full day', AI1EC_PLUGIN_NAME ),
113
  'hours' => $hours,
114
  'indent_multiplier' => 8,
115
  'indent_offset' => 0,
116
+ 'pagination_links' => $pagination_links,
117
  );
 
 
 
118
 
119
  // Add navigation if requested.
120
  $view_args['navigation'] = $this->_get_navigation(
122
  'no_navigation' => $args['no_navigation'],
123
  'pagination_links' => $pagination_links,
124
  'views_dropdown' => $args['views_dropdown'],
125
+ 'below_toolbar' => apply_filters(
126
+ 'ai1ec_below_toolbar',
127
+ '',
128
+ $this->get_name(),
129
+ $args
130
+ ),
131
  )
132
  );
133
 
134
  return
135
  $this->_registry->get( 'http.request' )->is_json_required(
136
+ $args['request_format'], 'week'
137
  )
138
+ ? $this->_apply_filters_to_args( $view_args )
139
  : $this->_get_view( $view_args );
140
  }
141
 
364
  '',
365
  false ),
366
  );
367
+ if (
368
+ $this->_compatibility->use_backward_compatibility()
369
+ ) {
370
  $event = $evt;
371
  }
372
  if ( 'notallday' === $event_type) {
395
  }
396
  }
397
 
 
398
  $days[$day_date] = array(
399
  'today' =>
400
  $day_date_ob->format( 'Y' ) == $now->format( 'Y' ) &&
app/view/calendar/widget.php CHANGED
@@ -152,6 +152,15 @@ class Ai1ec_View_Admin_Widget extends Ai1ec_Embeddable {
152
  return 'Upcoming Events';
153
  }
154
 
 
 
 
 
 
 
 
 
 
155
  /**
156
  * Form function.
157
  *
@@ -310,9 +319,10 @@ class Ai1ec_View_Admin_Widget extends Ai1ec_Embeddable {
310
 
311
  // Set $limit to the specified category/tag
312
  $limit = array(
313
- 'cat_ids' => $args_for_widget['cat_ids'],
314
- 'tag_ids' => $args_for_widget['tag_ids'],
315
  );
 
316
 
317
  // Get events, then classify into date array
318
  // JB: apply seek check here
152
  return 'Upcoming Events';
153
  }
154
 
155
+ /**
156
+ * The icon class associated with the widget.
157
+ *
158
+ * @return string
159
+ */
160
+ public function get_icon() {
161
+ return 'ai1ec-fa ai1ec-fa-clock-o';
162
+ }
163
+
164
  /**
165
  * Form function.
166
  *
319
 
320
  // Set $limit to the specified category/tag
321
  $limit = array(
322
+ 'cat_ids' => $args_for_widget['cat_ids'],
323
+ 'tag_ids' => $args_for_widget['tag_ids'],
324
  );
325
+ $limit = apply_filters( 'ai1ec_add_filters_upcoming_widget', $limit );
326
 
327
  // Get events, then classify into date array
328
  // JB: apply seek check here
app/view/embeddable.php CHANGED
@@ -66,6 +66,15 @@ abstract class Ai1ec_Embeddable extends WP_Widget {
66
  */
67
  abstract public function get_name();
68
 
 
 
 
 
 
 
 
 
 
69
  /**
70
  * Checks and returns widget requirements.
71
  *
@@ -177,4 +186,4 @@ abstract class Ai1ec_Embeddable extends WP_Widget {
177
  protected function _filter_widget_args( $args ) {
178
  return $args;
179
  }
180
- }
66
  */
67
  abstract public function get_name();
68
 
69
+ /**
70
+ * The icon class associated with the widget. Defaults to calendar.
71
+ *
72
+ * @return string
73
+ */
74
+ public function get_icon() {
75
+ return 'ai1ec-fa ai1ec-fa-calendar';
76
+ }
77
+
78
  /**
79
  * Checks and returns widget requirements.
80
  *
186
  protected function _filter_widget_args( $args ) {
187
  return $args;
188
  }
189
+ }
app/view/event/post.php CHANGED
@@ -74,6 +74,9 @@ class Ai1ec_View_Event_Post extends Ai1ec_Base {
74
  * @return string The excerpt.
75
  */
76
  public function trim_excerpt( Ai1ec_Event $event, $length = 35, $more = '[...]' ) {
 
 
 
77
  $raw_excerpt = $event->get( 'post' )->post_content;
78
  if ( ! isset( $raw_excerpt{0} ) ) {
79
  $raw_excerpt = '&nbsp;';
@@ -106,6 +109,7 @@ class Ai1ec_View_Event_Post extends Ai1ec_Base {
106
  } else {
107
  $text = implode( ' ', $words );
108
  }
 
109
  return apply_filters( 'wp_trim_excerpt', $text, $raw_excerpt );
110
  }
111
 
74
  * @return string The excerpt.
75
  */
76
  public function trim_excerpt( Ai1ec_Event $event, $length = 35, $more = '[...]' ) {
77
+ global $post;
78
+ $original_post = $post;
79
+ $post = $event->get( 'post' );
80
  $raw_excerpt = $event->get( 'post' )->post_content;
81
  if ( ! isset( $raw_excerpt{0} ) ) {
82
  $raw_excerpt = '&nbsp;';
109
  } else {
110
  $text = implode( ' ', $words );
111
  }
112
+ $post = $original_post;
113
  return apply_filters( 'wp_trim_excerpt', $text, $raw_excerpt );
114
  }
115
 
app/view/event/single.php CHANGED
@@ -94,10 +94,12 @@ class Ai1ec_View_Event_Single extends Ai1ec_Base {
94
  'show_subscribe_buttons' => ! $settings->get( 'turn_off_subscription_buttons' ),
95
  'hide_featured_image' => $settings->get( 'hide_featured_image' ),
96
  'extra_buttons' => $extra_buttons,
 
97
  'text_add_calendar' => __( 'Add to Calendar', AI1EC_PLUGIN_NAME ),
98
  'subscribe_buttons_text' => $this->_registry
99
  ->get( 'view.calendar.subscribe-button' )
100
  ->get_labels(),
 
101
  'text_when' => __( 'When:', AI1EC_PLUGIN_NAME ),
102
  'text_where' => __( 'Where:', AI1EC_PLUGIN_NAME ),
103
  'text_cost' => __( 'Cost:', AI1EC_PLUGIN_NAME ),
@@ -107,6 +109,13 @@ class Ai1ec_View_Event_Single extends Ai1ec_Base {
107
  'text_tags' => __( 'Tags', AI1EC_PLUGIN_NAME ),
108
  'timezone_info' => $timezone_info,
109
  'banner_image' => $banner_image,
 
 
 
 
 
 
 
110
  );
111
 
112
  if (
@@ -114,7 +123,7 @@ class Ai1ec_View_Event_Single extends Ai1ec_Base {
114
  $event->get( 'instance_id' ) &&
115
  current_user_can( 'edit_ai1ec_events' )
116
  ) {
117
- $args['edit_instance_url'] = admin_url(
118
  'post.php?post=' . $event->get( 'post_id' ) .
119
  '&action=edit&instance=' . $event->get( 'instance_id' )
120
  );
@@ -134,22 +143,30 @@ class Ai1ec_View_Event_Single extends Ai1ec_Base {
134
  * @return The html of the footer
135
  */
136
  public function get_footer( Ai1ec_Event $event ) {
 
 
 
137
  $loader = $this->_registry->get( 'theme.loader' );
 
 
 
 
138
  $args = array(
139
  'event' => $event,
140
- 'text_calendar_feed' => __( 'This post was replicated from another site\'s <a class="ai1ec-ics-icon" href="%s" title="iCalendar feed">calendar feed</a>.', AI1EC_PLUGIN_NAME ),
141
- 'text_view_post' => __( 'View original post', AI1EC_PLUGIN_NAME ),
142
  );
143
  return $loader->get_file( 'event-single-footer.twig', $args, false )
144
  ->get_content();
145
  }
146
 
147
  /**
148
- * Render the full article for the event
149
  *
150
  * @param Ai1ec_Event $event
 
151
  */
152
- public function get_full_article( Ai1ec_Event $event ) {
153
  $title = apply_filters(
154
  'the_title',
155
  $event->get( 'post' )->post_title,
@@ -165,7 +182,7 @@ class Ai1ec_View_Event_Single extends Ai1ec_Base {
165
  )
166
  )
167
  );
168
- $args = compact( 'title', 'event_details', 'content' );
169
  $loader = $this->_registry->get( 'theme.loader' );
170
  return $loader->get_file( 'event-single-full.twig', $args, false )
171
  ->get_content();
94
  'show_subscribe_buttons' => ! $settings->get( 'turn_off_subscription_buttons' ),
95
  'hide_featured_image' => $settings->get( 'hide_featured_image' ),
96
  'extra_buttons' => $extra_buttons,
97
+ 'show_get_calendar' => ! $settings->get( 'disable_get_calendar_button' ),
98
  'text_add_calendar' => __( 'Add to Calendar', AI1EC_PLUGIN_NAME ),
99
  'subscribe_buttons_text' => $this->_registry
100
  ->get( 'view.calendar.subscribe-button' )
101
  ->get_labels(),
102
+ 'text_get_calendar' => Ai1ec_I18n::__( 'Get a Timely Calendar' ),
103
  'text_when' => __( 'When:', AI1EC_PLUGIN_NAME ),
104
  'text_where' => __( 'Where:', AI1EC_PLUGIN_NAME ),
105
  'text_cost' => __( 'Cost:', AI1EC_PLUGIN_NAME ),
109
  'text_tags' => __( 'Tags', AI1EC_PLUGIN_NAME ),
110
  'timezone_info' => $timezone_info,
111
  'banner_image' => $banner_image,
112
+ 'content_img_url' => $event->get_runtime( 'content_img_url' ),
113
+ 'post_id' => $event->get( 'post_id' ),
114
+ 'ticket_url' => $event->get( 'ticket_url' ),
115
+ 'tickets_url_label' => $event->get_runtime( 'tickets_url_label' ),
116
+ 'start' => $event->get( 'start' ),
117
+ 'end' => $event->get( 'end' ),
118
+ 'cost' => $event->get( 'cost' ),
119
  );
120
 
121
  if (
123
  $event->get( 'instance_id' ) &&
124
  current_user_can( 'edit_ai1ec_events' )
125
  ) {
126
+ $args['edit_instance_url'] = ai1ec_admin_url(
127
  'post.php?post=' . $event->get( 'post_id' ) .
128
  '&action=edit&instance=' . $event->get( 'instance_id' )
129
  );
143
  * @return The html of the footer
144
  */
145
  public function get_footer( Ai1ec_Event $event ) {
146
+ $text_calendar_feed = Ai1ec_I18n::__(
147
+ 'This post was replicated from another site\'s <a href="%s" title="iCalendar feed"><i class="ai1ec-fa ai1ec-fa-calendar"></i> calendar feed</a>.'
148
+ );
149
  $loader = $this->_registry->get( 'theme.loader' );
150
+ $text_calendar_feed = sprintf(
151
+ $text_calendar_feed,
152
+ esc_attr( str_replace( 'http://', 'webcal://', $event->get( 'ical_feed_url' ) ) )
153
+ );
154
  $args = array(
155
  'event' => $event,
156
+ 'text_calendar_feed' => $text_calendar_feed,
157
+ 'text_view_post' => Ai1ec_I18n::__( 'View original' ),
158
  );
159
  return $loader->get_file( 'event-single-footer.twig', $args, false )
160
  ->get_content();
161
  }
162
 
163
  /**
164
+ * Render the full article for the event – title, content, and footer.
165
  *
166
  * @param Ai1ec_Event $event
167
+ * @param string $footer Footer HTML to append to event
168
  */
169
+ public function get_full_article( Ai1ec_Event $event, $footer = '' ) {
170
  $title = apply_filters(
171
  'the_title',
172
  $event->get( 'post' )->post_title,
182
  )
183
  )
184
  );
185
+ $args = compact( 'title', 'event_details', 'content', 'footer' );
186
  $loader = $this->_registry->get( 'theme.loader' );
187
  return $loader->get_file( 'event-single-full.twig', $args, false )
188
  ->get_content();
app/view/event/taxonomy.php CHANGED
@@ -17,70 +17,66 @@ class Ai1ec_View_Event_Taxonomy extends Ai1ec_Base {
17
  protected $_taxonomy_model = null;
18
 
19
  /**
20
- * Style attribute for event category
21
  */
22
- public function get_color_style( Ai1ec_Event $event ) {
23
- static $color_styles = array();
24
- $categories = $this->_taxonomy_model->get_post_categories(
25
- $event->get( 'post_id' )
26
- );
27
- // No specific styling for events not in categories.
28
- if ( ! $categories ) {
29
- return '';
30
- }
31
-
32
- $type = $event->is_allday() || $event->is_multiday();
33
- // If not yet cached, fetch and save style.
34
- if ( ! isset( $color_styles[$categories[0]->term_id][$type] ) ) {
35
- $color_styles[$categories[0]->term_id][$type] =
36
- $this->get_event_category_color_style(
37
- $categories[0]->term_id,
38
- $type
39
- );
40
- }
41
 
42
- return $color_styles[$categories[0]->term_id][$type];
43
- }
 
 
44
 
45
  /**
46
- * Returns the style attribute assigning the category color style to an event.
47
  *
48
- * @param int $term_id Term ID of event category
49
- * @param bool $allday Whether the event is all-day
50
  *
51
- * @return string
52
  */
53
- public function get_event_category_color_style(
54
- $term_id,
55
- $allday = false
56
- ) {
57
- $color = $this->_taxonomy_model->get_category_color( $term_id );
58
- if ( ! is_null( $color ) && ! empty( $color ) ) {
59
- if ( $allday )
60
- return 'background-color: ' . $color . ';';
61
- else
62
- return 'color: ' . $color . ' !important;';
63
  }
64
- return '';
 
65
  }
66
 
67
  /**
68
- * HTML of category color boxes for this event
 
 
 
 
69
  */
70
  public function get_category_colors( Ai1ec_Event $event ) {
71
- static $category_colors = array();
72
- $id = $event->get( 'post_id' );
73
- if ( ! isset( $category_colors[$id] ) ) {
74
- $categories = $this->_taxonomy_model
75
- ->get_post_categories( $id );
76
- $category_colors[$id] = '';
77
  if ( false !== $categories ) {
78
- $category_colors[$id] = $this->get_event_category_colors(
79
- $categories
80
- );
81
  }
 
 
 
 
 
 
 
 
 
82
  }
83
- return $category_colors[$id];
 
84
  }
85
 
86
  /**
@@ -91,10 +87,11 @@ class Ai1ec_View_Event_Taxonomy extends Ai1ec_Base {
91
  * @return string
92
  */
93
  public function get_category_color_square( $term_id ) {
94
- $taxonomy = $this->_registry->get( 'model.taxonomy' );
95
- $color = $taxonomy->get_category_color( $term_id );
96
  if ( null !== $color ) {
97
- $cat = get_term( $term_id, 'events_categories' );
 
98
  return '<span class="ai1ec-color-swatch ai1ec-tooltip-trigger" ' .
99
  'style="background:' . $color . '" title="' .
100
  esc_attr( $cat->name ) . '"></span>';
@@ -110,8 +107,7 @@ class Ai1ec_View_Event_Taxonomy extends Ai1ec_Base {
110
  * @return string HTML snippet to use for category image.
111
  */
112
  public function get_category_image_square( $term_id ) {
113
- $image = $this->_registry->get( 'model.taxonomy' )
114
- ->get_category_image( $term_id );
115
  if ( null !== $image ) {
116
  return '<img src="' . $image . '" alt="' .
117
  Ai1ec_I18n::__( 'Category image' ) .
@@ -139,79 +135,76 @@ class Ai1ec_View_Event_Taxonomy extends Ai1ec_Base {
139
  }
140
 
141
  /**
142
- * Style attribute for event bg color
 
 
 
 
143
  */
144
  public function get_category_bg_color( Ai1ec_Event $event ) {
145
- $category_bg_color = null;
146
- $categories = $this->_taxonomy_model->get_post_categories(
147
- $event->get( 'post_id' )
148
- );
149
- if ( ! empty( $categories ) ) {
150
- $category_bg_color = $this
151
- ->get_event_category_bg_color(
152
- $categories[0]->term_id,
153
- $event->is_allday() || $event->is_multiday()
154
- );
155
- }
156
- return $category_bg_color;
157
- }
158
 
159
- /**
160
- * Style attribute for event bg color
161
- */
162
- public function get_category_text_color( Ai1ec_Event $event ) {
163
- $category_text_color = null;
164
- $categories = $this->_taxonomy_model->get_post_categories(
165
- $event->get( 'post_id' )
166
- );
167
- if ( ! empty( $categories ) ) {
168
- $category_text_color = $this
169
- ->get_event_category_text_color(
170
- $categories[0]->term_id,
171
- $event->is_allday() || $event->is_multiday()
172
- );
173
  }
174
- return $category_text_color;
 
175
  }
176
 
177
  /**
178
- * get_event_text_color function
179
  *
180
- * Returns the style attribute assigning the category color style to an event.
181
  *
182
- * @param int $term_id The Event Category's term ID
183
- * @param bool $allday Whether the event is all-day
184
- * @return string
185
- **/
186
- public function get_event_category_text_color( $term_id ) {
187
- $taxonomy = $this->_registry->get( 'model.taxonomy' );
188
- $color = $taxonomy->get_category_color(
189
- $term_id
190
- );
191
- if ( ! empty( $color ) ) {
192
- return 'style="color: ' . $color . ';"';
193
  }
194
- return '';
 
195
  }
196
 
197
  /**
198
- * get_event_category_bg_color function
199
  *
200
- * Returns the style attribute assigning the category color style to an event.
201
- *
202
- * @param int $term_id The Event Category's term ID
203
- * @param bool $allday Whether the event is all-day
204
- * @return string
205
- **/
206
- public function get_event_category_bg_color( $term_id ) {
207
- $taxonomy = $this->_registry->get( 'model.taxonomy' );
208
- $color = $taxonomy->get_category_color(
209
- $term_id
210
- );
211
- if ( ! empty( $color ) ) {
212
- return 'style="background-color: ' . $color . ';"';
 
 
 
 
 
 
 
 
 
 
 
 
213
  }
214
- return '';
 
215
  }
216
 
217
  /**
17
  protected $_taxonomy_model = null;
18
 
19
  /**
20
+ * @var array Caches the color evaluated for each event.
21
  */
22
+ protected $_event_color_map = array();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
 
24
+ /**
25
+ * @var array Caches the color squares HTML evaluated for each event.
26
+ */
27
+ protected $_event_color_squares_map = array();
28
 
29
  /**
30
+ * Returns style attribute for events rendered in Month, Week, or Day view.
31
  *
32
+ * @param Ai1ec_Event $event Event object.
 
33
  *
34
+ * @return string Color style attribute.
35
  */
36
+ public function get_color_style( Ai1ec_Event $event ) {
37
+ $color = $this->get_color_for_event( $event );
38
+
39
+ // Convert to style attribute.
40
+ if ( $color ) {
41
+ $color = $event->is_allday() || $event->is_multiday()
42
+ ? 'background-color: ' . $color . ';'
43
+ : 'color: ' . $color . ' !important;';
44
+ } else {
45
+ $color = '';
46
  }
47
+
48
+ return $color;
49
  }
50
 
51
  /**
52
+ * Returns HTML of category color swatches for this event.
53
+ *
54
+ * @param Ai1ec_Event $event Event object.
55
+ *
56
+ * @return string HTML of the event's category color swatches.
57
  */
58
  public function get_category_colors( Ai1ec_Event $event ) {
59
+ $post_id = $event->get( 'post_id' );
60
+
61
+ if ( ! isset( $this->_event_color_squares_map[$post_id] ) ) {
62
+ $squares = '';
63
+ $categories = $this->_taxonomy_model->get_post_categories( $post_id );
64
+
65
  if ( false !== $categories ) {
66
+ $squares = $this->get_event_category_colors( $categories );
 
 
67
  }
68
+
69
+ // Allow add-ons to modify/add to category color swatch HTML.
70
+ $squares = apply_filters(
71
+ 'ai1ec_event_color_squares',
72
+ $squares,
73
+ $event
74
+ );
75
+
76
+ $this->_event_color_squares_map[$post_id] = $squares;
77
  }
78
+
79
+ return $this->_event_color_squares_map[$post_id];
80
  }
81
 
82
  /**
87
  * @return string
88
  */
89
  public function get_category_color_square( $term_id ) {
90
+ $color = $this->_taxonomy_model->get_category_color( $term_id );
91
+ $event_taxonomy = $this->_registry->get( 'model.event.taxonomy' );
92
  if ( null !== $color ) {
93
+ $taxonomy = $event_taxonomy->get_taxonomy_for_term_id( $term_id );
94
+ $cat = get_term( $term_id, $taxonomy->taxonomy );
95
  return '<span class="ai1ec-color-swatch ai1ec-tooltip-trigger" ' .
96
  'style="background:' . $color . '" title="' .
97
  esc_attr( $cat->name ) . '"></span>';
107
  * @return string HTML snippet to use for category image.
108
  */
109
  public function get_category_image_square( $term_id ) {
110
+ $image = $this->_taxonomy_model->get_category_image( $term_id );
 
111
  if ( null !== $image ) {
112
  return '<img src="' . $image . '" alt="' .
113
  Ai1ec_I18n::__( 'Category image' ) .
135
  }
136
 
137
  /**
138
+ * Style attribute for event background color.
139
+ *
140
+ * @param Ai1ec_Event $event Event object.
141
+ *
142
+ * @return string Color to assign to event background.
143
  */
144
  public function get_category_bg_color( Ai1ec_Event $event ) {
145
+ $color = $this->get_color_for_event( $event );
 
 
 
 
 
 
 
 
 
 
 
 
146
 
147
+ // Convert to HTML attribute.
148
+ if ( $color ) {
149
+ $color = 'style="background-color: ' . $color . ';"';
150
+ } else {
151
+ $color = '';
 
 
 
 
 
 
 
 
 
152
  }
153
+
154
+ return $color;
155
  }
156
 
157
  /**
158
+ * Style attribute for event text color.
159
  *
160
+ * @param Ai1ec_Event $event Event object.
161
  *
162
+ * @return string Color to assign to event text (foreground).
163
+ */
164
+ public function get_category_text_color( Ai1ec_Event $event ) {
165
+ $color = $this->get_color_for_event( $event );
166
+
167
+ // Convert to HTML attribute.
168
+ if ( $color ) {
169
+ $color = 'style="color: ' . $color . ';"';
170
+ } else {
171
+ $color = '';
 
172
  }
173
+
174
+ return $color;
175
  }
176
 
177
  /**
178
+ * Caches color for event having the given post ID.
179
  *
180
+ * @param int $post_id Event's post ID.
181
+ * @return string Color associated with event.
182
+ */
183
+ public function get_color_for_event( $event ) {
184
+ $post_id = $event->get( 'post_id' );
185
+
186
+ // If color for this event is uncached, populate cache.
187
+ if ( ! isset( $this->_event_color_map[$post_id] ) ) {
188
+ // Find out if an add-on has provided its own color for the event.
189
+ $color = apply_filters( 'ai1ec_event_color', '', $event );
190
+
191
+ // If none provided, fall back to event categories.
192
+ if ( empty( $color ) ) {
193
+ $categories = $this->_taxonomy_model->get_post_categories( $post_id );
194
+ // Find the first category of this post that defines a color.
195
+ foreach ( $categories as $category ) {
196
+ $color = $this->_taxonomy_model->get_category_color(
197
+ $category->term_id
198
+ );
199
+ if ( $color ) {
200
+ break;
201
+ }
202
+ }
203
+ }
204
+ $this->_event_color_map[$post_id] = $color;
205
  }
206
+
207
+ return $this->_event_color_map[$post_id];
208
  }
209
 
210
  /**
app/view/event/time.php CHANGED
@@ -60,6 +60,7 @@ class Ai1ec_View_Event_Time extends Ai1ec_Base {
60
  ->set_time( 0, 0, 0 )
61
  ->format();
62
 
 
63
  $output = '';
64
 
65
  // Display start date, depending on $start_date_display.
@@ -69,7 +70,7 @@ class Ai1ec_View_Event_Time extends Ai1ec_Base {
69
  case 'short':
70
  case 'long':
71
  $property = $start_date_display . '_date';
72
- $output .= $this->{'get_' . $property}( $start );
73
  break;
74
  default:
75
  $start_date_display = 'long';
@@ -103,7 +104,7 @@ class Ai1ec_View_Event_Time extends Ai1ec_Base {
103
  if ( $start_ts !== $end_ts ) {
104
  // for short date, use short display type
105
  if ( 'short' === $start_date_display ) {
106
- $output .= $this->get_short_date( $end );
107
  } else {
108
  $output .= $this->get_long_date( $end );
109
  }
@@ -132,7 +133,12 @@ class Ai1ec_View_Event_Time extends Ai1ec_Base {
132
  '</span>'
133
  );
134
  }
135
- return apply_filters( 'ai1ec_get_timespan_html', $output, $this );
 
 
 
 
 
136
  }
137
 
138
  /**
@@ -153,7 +159,7 @@ class Ai1ec_View_Event_Time extends Ai1ec_Base {
153
  $excludes[] =
154
  $rrule->rrule_to_text( $exception_rules );
155
  }
156
- if ( $exception_dates ) {
157
  $excludes[] =
158
  $rrule->exdate_to_text( $exception_dates );
159
  }
@@ -164,10 +170,14 @@ class Ai1ec_View_Event_Time extends Ai1ec_Base {
164
  * Get the short date
165
  *
166
  * @param Ai1ec_Date_Time $time
 
167
  *
168
  * @return string
169
  */
170
- public function get_short_date( Ai1ec_Date_Time $time ) {
 
 
 
171
  return $time->format_i18n( 'M j' );
172
  }
173
 
60
  ->set_time( 0, 0, 0 )
61
  ->format();
62
 
63
+ $break_years = $start->format( 'Y' ) !== $end->format( 'Y' );
64
  $output = '';
65
 
66
  // Display start date, depending on $start_date_display.
70
  case 'short':
71
  case 'long':
72
  $property = $start_date_display . '_date';
73
+ $output .= $this->{'get_' . $property}( $start, $break_years );
74
  break;
75
  default:
76
  $start_date_display = 'long';
104
  if ( $start_ts !== $end_ts ) {
105
  // for short date, use short display type
106
  if ( 'short' === $start_date_display ) {
107
+ $output .= $this->get_short_date( $end, $break_years );
108
  } else {
109
  $output .= $this->get_long_date( $end );
110
  }
133
  '</span>'
134
  );
135
  }
136
+ return apply_filters(
137
+ 'ai1ec_get_timespan_html',
138
+ $output,
139
+ $event,
140
+ $start_date_display
141
+ );
142
  }
143
 
144
  /**
159
  $excludes[] =
160
  $rrule->rrule_to_text( $exception_rules );
161
  }
162
+ if ( $exception_dates && 0 !== strpos( $exception_rules, 'EXDATE' ) ) {
163
  $excludes[] =
164
  $rrule->exdate_to_text( $exception_dates );
165
  }
170
  * Get the short date
171
  *
172
  * @param Ai1ec_Date_Time $time
173
+ * @param bool $add_year Whether to add year or not.
174
  *
175
  * @return string
176
  */
177
+ public function get_short_date( Ai1ec_Date_Time $time, $add_year = false ) {
178
+ if ( $add_year ) {
179
+ return $time->format_i18n( 'M j Y' );
180
+ }
181
  return $time->format_i18n( 'M j' );
182
  }
183
 
language/all-in-one-event-calendar.mo CHANGED
Binary file
language/all-in-one-event-calendar.po CHANGED
@@ -1,14 +1,14 @@
1
- # Copyright (C) 2014 All-in-One Event Calendar by Time.ly
2
  # This file is distributed under the same license as the All-in-One Event Calendar by Time.ly package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: All-in-One Event Calendar by Time.ly 2.1.9\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/all-in-one-event-calendar\n"
7
- "POT-Creation-Date: 2014-12-04 17:02:36+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
- "PO-Revision-Date: 2014-12-04 18:02+0100\n"
12
  "Last-Translator: Timely <support@time.ly>\n"
13
  "Language-Team:\n"
14
 
@@ -25,7 +25,7 @@ msgstr "Licenses"
25
  msgid "Licences"
26
  msgstr "Licences"
27
 
28
- #: app/controller/front.php:309
29
  msgid ""
30
  "Your active calendar theme could not be properly initialized. The default "
31
  "theme has been activated instead. Please visit %s and try reactivating your "
@@ -35,12 +35,12 @@ msgstr ""
35
  "theme has been activated instead. Please visit %s and try reactivating your "
36
  "theme manually."
37
 
38
- #: app/controller/front.php:313 app/view/admin/theme-switching.php:54
39
  #: app/view/admin/theme-switching.php:55
40
  msgid "Calendar Themes"
41
  msgstr "Calendar Themes"
42
 
43
- #: app/controller/front.php:890
44
  msgid ""
45
  "Your database is found to be corrupt. Likely previous update has failed. "
46
  "Please restore All-in-One Event Calendar tables from a backup and retry."
@@ -50,47 +50,37 @@ msgstr ""
50
  "Please restore All-in-One Event Calendar tables from a backup and retry."
51
  "<br>Following errors were found:<br>%s"
52
 
53
- #: app/controller/front.php:1046
54
- msgid ""
55
- "You may be using a legacy custom calendar theme. If you have problems "
56
- "viewing the calendar, please read <a href=\"https://time.ly/\">this article</"
57
- "a>."
58
- msgstr ""
59
- "You may be using a legacy custom calendar theme. If you have problems "
60
- "viewing the calendar, please read <a href=\"https://time.ly/\">this article</"
61
- "a>."
62
-
63
- #: app/controller/javascript-widget.php:47
64
  msgid "You must choose the Calendar page before using the Super Widget"
65
  msgstr "You must choose the Calendar page before using the Super Widget"
66
 
67
- #: app/controller/javascript.php:390
68
  msgid "This feed is already being imported."
69
  msgstr "This feed is already being imported."
70
 
71
- #: app/controller/javascript.php:393
72
  msgid "Please enter a valid iCalendar URL."
73
  msgstr "Please enter a valid iCalendar URL."
74
 
75
- #: app/controller/javascript.php:396
76
  msgid "Please enter a valid email address."
77
  msgstr "Please enter a valid email address."
78
 
79
- #: app/controller/javascript.php:398
80
  msgid "Choose Image"
81
  msgstr "Choose Image"
82
 
83
- #: app/controller/javascript.php:401
84
  msgid "The value you have entered is not a valid CSS length."
85
  msgstr "The value you have entered is not a valid CSS length."
86
 
87
- #: app/controller/javascript.php:404
88
  msgid ""
89
  "Are you sure you want to reset your theme options to their default values?"
90
  msgstr ""
91
  "Are you sure you want to reset your theme options to their default values?"
92
 
93
- #: app/controller/javascript.php:407
94
  msgid ""
95
  "Please enter a valid latitude. A valid latitude is comprised between +90 and "
96
  "-90."
@@ -98,7 +88,7 @@ msgstr ""
98
  "Please enter a valid latitude. A valid latitude is comprised between +90 and "
99
  "-90."
100
 
101
- #: app/controller/javascript.php:410
102
  msgid ""
103
  "Please enter a valid longitude. A valid longitude is comprised between +180 "
104
  "and -180."
@@ -106,7 +96,7 @@ msgstr ""
106
  "Please enter a valid longitude. A valid longitude is comprised between +180 "
107
  "and -180."
108
 
109
- #: app/controller/javascript.php:413
110
  msgid ""
111
  "When the \"Input coordinates\" checkbox is checked, \"Latitude\" is a "
112
  "required field."
@@ -114,7 +104,7 @@ msgstr ""
114
  "When the \"Input coordinates\" checkbox is checked, \"Latitude\" is a "
115
  "required field."
116
 
117
- #: app/controller/javascript.php:416
118
  msgid ""
119
  "When the \"Input coordinates\" checkbox is checked, \"Longitude\" is a "
120
  "required field."
@@ -122,7 +112,7 @@ msgstr ""
122
  "When the \"Input coordinates\" checkbox is checked, \"Longitude\" is a "
123
  "required field."
124
 
125
- #: app/controller/javascript.php:419
126
  msgid ""
127
  "The URL you have entered in the <b>Organizer Contact Info</b> &gt; "
128
  "<b>External URL</b> seems to be invalid."
@@ -130,7 +120,7 @@ msgstr ""
130
  "The URL you have entered in the <b>Organizer Contact Info</b> &gt; "
131
  "<b>External URL</b> seems to be invalid."
132
 
133
- #: app/controller/javascript.php:422
134
  msgid ""
135
  "The URL you have entered in the <b>Event Cost and Tickets</b> &gt; <b>Buy "
136
  "Tickets URL</b> seems to be invalid."
@@ -138,21 +128,21 @@ msgstr ""
138
  "The URL you have entered in the <b>Event Cost and Tickets</b> &gt; <b>Buy "
139
  "Tickets URL</b> seems to be invalid."
140
 
141
- #: app/controller/javascript.php:425
142
  msgid ""
143
  "Please remember that URLs must start with either \"http://\" or \"https://\"."
144
  msgstr ""
145
  "Please remember that URLs must start with either \"http://\" or \"https://\"."
146
 
147
- #: app/controller/javascript.php:428
148
  msgid "Loading&hellip;"
149
  msgstr "Loading&hellip;"
150
 
151
- #: app/controller/javascript.php:458 app/view/admin/widget-creator.php:131
152
  msgid "Preview:"
153
  msgstr "Preview:"
154
 
155
- #: app/controller/javascript.php:459
156
  msgid ""
157
  "Loading preview&nbsp;<i class=\"ai1ec-fa ai1ec-fa-spin ai1ec-fa-spinner\"></"
158
  "i>"
@@ -160,7 +150,7 @@ msgstr ""
160
  "Loading preview&nbsp;<i class=\"ai1ec-fa ai1ec-fa-spin ai1ec-fa-spinner\"></"
161
  "i>"
162
 
163
- #: app/controller/javascript.php:463
164
  msgid ""
165
  "Something went wrong while fetching events.<br>The request status is: %STATUS"
166
  "% <br>The error thrown was: %ERROR%"
@@ -168,6 +158,15 @@ msgstr ""
168
  "Something went wrong while fetching events.<br>The request status is: %STATUS"
169
  "% <br>The error thrown was: %ERROR%"
170
 
 
 
 
 
 
 
 
 
 
171
  #: app/model/event/parent.php:186
172
  msgid "Edit &#8220;%s&#8221;"
173
  msgstr "Edit &#8220;%s&#8221;"
@@ -176,52 +175,52 @@ msgstr "Edit &#8220;%s&#8221;"
176
  msgid "Base Event"
177
  msgstr "Base Event"
178
 
179
- #: app/model/settings.php:345
180
  #: lib/html/element/setting/calendar-page-selector.php:50
181
  msgid "Calendar page"
182
  msgstr "Calendar page"
183
 
184
- #: app/model/settings.php:355
185
  msgid "Week starts on"
186
  msgstr "Week starts on"
187
 
188
- #: app/model/settings.php:368
189
  msgid "Available views"
190
  msgstr "Available views"
191
 
192
- #: app/model/settings.php:376
193
  msgid "Agenda"
194
  msgid_plural "Agenda"
195
  msgstr[0] "Agenda"
196
  msgstr[1] "Agenda"
197
 
198
- #: app/model/settings.php:387
199
  msgid "Day"
200
  msgid_plural "Day"
201
  msgstr[0] "Day"
202
  msgstr[1] "Day"
203
 
204
- #: app/model/settings.php:398
205
  msgid "Month"
206
  msgid_plural "Month"
207
  msgstr[0] "Month"
208
  msgstr[1] "Month"
209
 
210
- #: app/model/settings.php:409
211
  msgid "Week"
212
  msgid_plural "Week"
213
  msgstr[0] "Week"
214
  msgstr[1] "Week"
215
 
216
- #: app/model/settings.php:423
217
  msgid "Timezone"
218
  msgstr "Timezone"
219
 
220
- #: app/model/settings.php:436
221
  msgid "Preselected calendar filters"
222
  msgstr "Preselected calendar filters"
223
 
224
- #: app/model/settings.php:437 app/view/calendar/widget.php:128
225
  msgid ""
226
  "To clear, hold &#8984;/<abbr class=\"initialism\">CTRL</abbr> and click "
227
  "selection."
@@ -229,31 +228,31 @@ msgstr ""
229
  "To clear, hold &#8984;/<abbr class=\"initialism\">CTRL</abbr> and click "
230
  "selection."
231
 
232
- #: app/model/settings.php:452
233
  msgid "Default calendar start date (optional)"
234
  msgstr "Default calendar start date (optional)"
235
 
236
- #: app/model/settings.php:463
237
  msgid "Agenda pages show at most"
238
  msgstr "Agenda pages show at most"
239
 
240
- #: app/model/settings.php:476
241
  msgid "Week/Day view starts at"
242
  msgstr "Week/Day view starts at"
243
 
244
- #: app/model/settings.php:489
245
  msgid "Week/Day view ends at"
246
  msgstr "Week/Day view ends at"
247
 
248
- #: app/model/settings.php:502
249
  msgid "<strong>Word-wrap event stubs</strong> in Month view"
250
  msgstr "<strong>Word-wrap event stubs</strong> in Month view"
251
 
252
- #: app/model/settings.php:505
253
  msgid "Only applies to events that span a single day."
254
  msgstr "Only applies to events that span a single day."
255
 
256
- #: app/model/settings.php:517
257
  msgid ""
258
  "In <span class=\"ai1ec-tooltip-toggle\"\n"
259
  "\t\t\t\t\t\tdata-original-title=\"These include Agenda view,\n"
@@ -267,23 +266,23 @@ msgstr ""
267
  "\t\t\t\t\t\tAgenda-like views</span>, <strong>include all events\n"
268
  "\t\t\t\t\t\tfrom last day shown</strong>"
269
 
270
- #: app/model/settings.php:533
271
  msgid "Keep all events <strong>expanded</strong> in Agenda view"
272
  msgstr "Keep all events <strong>expanded</strong> in Agenda view"
273
 
274
- #: app/model/settings.php:545
275
  msgid "<strong>Show year</strong> in calendar date labels"
276
  msgstr "<strong>Show year</strong> in calendar date labels"
277
 
278
- #: app/model/settings.php:557
279
  msgid "<strong>Show location in event titles</strong> in calendar views"
280
  msgstr "<strong>Show location in event titles</strong> in calendar views"
281
 
282
- #: app/model/settings.php:569
283
  msgid "<strong>Exclude</strong> events from search results"
284
  msgstr "<strong>Exclude</strong> events from search results"
285
 
286
- #: app/model/settings.php:581
287
  msgid ""
288
  "Hide <strong>Subscribe</strong>/<strong>Add to Calendar</strong> buttons in "
289
  "calendar and single event views "
@@ -291,11 +290,15 @@ msgstr ""
291
  "Hide <strong>Subscribe</strong>/<strong>Add to Calendar</strong> buttons in "
292
  "calendar and single event views "
293
 
294
- #: app/model/settings.php:593
 
 
 
 
295
  msgid " Hide <strong>Google Maps</strong> until clicked"
296
  msgstr " Hide <strong>Google Maps</strong> until clicked"
297
 
298
- #: app/model/settings.php:605
299
  msgid ""
300
  " <strong>Affix filter menu</strong> to top of window when it scrolls out of "
301
  "view"
@@ -303,69 +306,69 @@ msgstr ""
303
  " <strong>Affix filter menu</strong> to top of window when it scrolls out of "
304
  "view"
305
 
306
- #: app/model/settings.php:608
307
  msgid "Only applies to first visible calendar found on the page."
308
  msgstr "Only applies to first visible calendar found on the page."
309
 
310
- #: app/model/settings.php:620
311
  msgid "Offset affixed filter bar vertically by"
312
  msgstr "Offset affixed filter bar vertically by"
313
 
314
- #: app/model/settings.php:635
315
  msgid "Wide screens only (&#8805; 1200px)"
316
  msgstr "Wide screens only (&#8805; 1200px)"
317
 
318
- #: app/model/settings.php:650
319
  msgid "Tablets only (< 980px)"
320
  msgstr "Tablets only (< 980px)"
321
 
322
- #: app/model/settings.php:665
323
  msgid "Phones only (< 768px)"
324
  msgstr "Phones only (< 768px)"
325
 
326
- #: app/model/settings.php:678
327
  msgid "Strict compatibility content filtering"
328
  msgstr "Strict compatibility content filtering"
329
 
330
- #: app/model/settings.php:690
331
  msgid " <strong>Hide featured image</strong> from event details page"
332
  msgstr " <strong>Hide featured image</strong> from event details page"
333
 
334
- #: app/model/settings.php:693
335
  msgid ""
336
  "Select this option if your theme already displays each post's featured image."
337
  msgstr ""
338
  "Select this option if your theme already displays each post's featured image."
339
 
340
- #: app/model/settings.php:704
341
  msgid "Input dates in this format"
342
  msgstr "Input dates in this format"
343
 
344
- #: app/model/settings.php:709
345
  msgid "Default (d/m/yyyy)"
346
  msgstr "Default (d/m/yyyy)"
347
 
348
- #: app/model/settings.php:713
349
  msgid "US (m/d/yyyy)"
350
  msgstr "US (m/d/yyyy)"
351
 
352
- #: app/model/settings.php:717
353
  msgid "ISO 8601 (yyyy-m-d)"
354
  msgstr "ISO 8601 (yyyy-m-d)"
355
 
356
- #: app/model/settings.php:721
357
  msgid "Dotted (m.d.yyyy)"
358
  msgstr "Dotted (m.d.yyyy)"
359
 
360
- #: app/model/settings.php:733
361
  msgid " Use <strong>24h time</strong> in time pickers"
362
  msgstr " Use <strong>24h time</strong> in time pickers"
363
 
364
- #: app/model/settings.php:744
365
  msgid "<strong>Disable address autocomplete</strong> function"
366
  msgstr "<strong>Disable address autocomplete</strong> function"
367
 
368
- #: app/model/settings.php:755
369
  msgid ""
370
  "Use the configured <strong>region</strong> (WordPress locale) to bias the "
371
  "address autocomplete function "
@@ -373,7 +376,7 @@ msgstr ""
373
  "Use the configured <strong>region</strong> (WordPress locale) to bias the "
374
  "address autocomplete function "
375
 
376
- #: app/model/settings.php:771
377
  msgid ""
378
  " Show the old <strong>Post Your Event</strong> button above the calendar to "
379
  "privileged users"
@@ -381,7 +384,7 @@ msgstr ""
381
  " Show the old <strong>Post Your Event</strong> button above the calendar to "
382
  "privileged users"
383
 
384
- #: app/model/settings.php:774
385
  msgid ""
386
  "Install the <a target=\"_blank\" href=\"http://time.ly/\">Interactive "
387
  "Frontend Extension</a> for the <strong>frontend Post Your Event form</"
@@ -391,11 +394,11 @@ msgstr ""
391
  "Frontend Extension</a> for the <strong>frontend Post Your Event form</"
392
  "strong>."
393
 
394
- #: app/model/settings.php:795
395
  msgid "Move calendar into this DOM element"
396
  msgstr "Move calendar into this DOM element"
397
 
398
- #: app/model/settings.php:797
399
  msgid ""
400
  "Optional. Use this JavaScript-based shortcut to place the\n"
401
  "\t\t\t\t\t\tcalendar a DOM element other than the usual page content "
@@ -419,7 +422,7 @@ msgstr ""
419
  "\t\t\t\t\t\tAny existing markup found within the target will be replaced\n"
420
  "\t\t\t\t\t\tby the calendar."
421
 
422
- #: app/model/settings.php:816
423
  msgid ""
424
  "<strong>Skip <tt>in_the_loop()</tt> check </strong> that protects against "
425
  "multiple calendar output"
@@ -427,7 +430,7 @@ msgstr ""
427
  "<strong>Skip <tt>in_the_loop()</tt> check </strong> that protects against "
428
  "multiple calendar output"
429
 
430
- #: app/model/settings.php:819
431
  msgid ""
432
  "Try enabling this option if your calendar does not appear on the calendar "
433
  "page. It is needed for compatibility with a small number of themes that call "
@@ -437,11 +440,11 @@ msgstr ""
437
  "page. It is needed for compatibility with a small number of themes that call "
438
  "<tt>the_content()</tt> from outside of The Loop. Leave disabled otherwise."
439
 
440
- #: app/model/settings.php:831
441
  msgid "Disable <strong>gzip</strong> compression."
442
  msgstr "Disable <strong>gzip</strong> compression."
443
 
444
- #: app/model/settings.php:834
445
  msgid ""
446
  "Use this option if calendar is unresponsive. <a href=\"http://support.time."
447
  "ly/disable-gzip-compression/\">Read more</a> about the issue. (From version "
@@ -451,7 +454,19 @@ msgstr ""
451
  "ly/disable-gzip-compression/\">Read more</a> about the issue. (From version "
452
  "2.1 onwards, gzip is disabled by default for maximum compatibility.)"
453
 
454
- #: app/model/settings.php:846
 
 
 
 
 
 
 
 
 
 
 
 
455
  msgid ""
456
  "<strong>Link CSS</strong> in <code>&lt;head&gt;</code> section when file "
457
  "cache is unavailable."
@@ -459,7 +474,7 @@ msgstr ""
459
  "<strong>Link CSS</strong> in <code>&lt;head&gt;</code> section when file "
460
  "cache is unavailable."
461
 
462
- #: app/model/settings.php:849
463
  msgid ""
464
  "Use this option if file cache is unavailable and you would prefer to serve "
465
  "CSS as a link rather than have it output inline."
@@ -467,11 +482,11 @@ msgstr ""
467
  "Use this option if file cache is unavailable and you would prefer to serve "
468
  "CSS as a link rather than have it output inline."
469
 
470
- #: app/model/settings.php:861
471
  msgid "Current <strong>robots.txt</strong> on this site"
472
  msgstr "Current <strong>robots.txt</strong> on this site"
473
 
474
- #: app/model/settings.php:865
475
  msgid ""
476
  "The Robot Exclusion Standard, also known as the Robots Exclusion Protocol "
477
  "or\n"
@@ -495,7 +510,7 @@ msgstr ""
495
  "\t\t\t\t\t\tYou can change it manually by editing <code>robots.txt</code> in "
496
  "your root WordPress directory."
497
 
498
- #: app/model/settings.php:882
499
  msgid ""
500
  "<strong>Publicize, promote, and share my events</strong> marked as public on "
501
  "the Timely network. (<a href=\"%s\" target=\"_blank\">Learn more &#187;</a>)"
@@ -503,7 +518,7 @@ msgstr ""
503
  "<strong>Publicize, promote, and share my events</strong> marked as public on "
504
  "the Timely network. (<a href=\"%s\" target=\"_blank\">Learn more &#187;</a>)"
505
 
506
- #: app/model/settings.php:905
507
  msgid "Templates cache improves site performance"
508
  msgstr "Templates cache improves site performance"
509
 
@@ -582,27 +597,27 @@ msgstr "Color"
582
  msgid "Image"
583
  msgstr "Image"
584
 
585
- #: app/view/admin/event-category.php:160 app/view/admin/event-category.php:214
586
  msgid "Category Color"
587
  msgstr "Category Color"
588
 
589
- #: app/view/admin/event-category.php:161 app/view/admin/event-category.php:216
590
  msgid "Events in this category will be identified by this color"
591
  msgstr "Events in this category will be identified by this color"
592
 
593
- #: app/view/admin/event-category.php:184 app/view/admin/event-category.php:235
594
  msgid "Category Image"
595
  msgstr "Category Image"
596
 
597
- #: app/view/admin/event-category.php:185 app/view/admin/event-category.php:236
598
  msgid "Add Image"
599
  msgstr "Add Image"
600
 
601
- #: app/view/admin/event-category.php:186 app/view/admin/event-category.php:215
602
  msgid "Remove Image"
603
  msgstr "Remove Image"
604
 
605
- #: app/view/admin/event-category.php:187 app/view/admin/event-category.php:237
606
  msgid ""
607
  "Assign an optional image to the category. Recommended size: square, minimum "
608
  "400&times;400 pixels."
@@ -610,104 +625,104 @@ msgstr ""
610
  "Assign an optional image to the category. Recommended size: square, minimum "
611
  "400&times;400 pixels."
612
 
613
- #: app/view/admin/get-repeat-box.php:64
614
  msgid "times"
615
  msgstr "times"
616
 
617
- #: app/view/admin/get-repeat-box.php:130
618
  msgid "Recurrence rule cannot be empty."
619
  msgstr "Recurrence rule cannot be empty."
620
 
621
- #: app/view/admin/get-repeat-box.php:142
622
  msgid "Recurrence rule was not provided."
623
  msgstr "Recurrence rule was not provided."
624
 
625
- #: app/view/admin/get-repeat-box.php:169
626
  msgid "Never"
627
  msgstr "Never"
628
 
629
- #: app/view/admin/get-repeat-box.php:170
630
  msgid "After"
631
  msgstr "After"
632
 
633
- #: app/view/admin/get-repeat-box.php:171 public/admin/box_repeat.php:84
634
  msgid "On date"
635
  msgstr "On date"
636
 
637
- #: app/view/admin/get-repeat-box.php:207
638
  msgid "day(s)"
639
  msgstr "day(s)"
640
 
641
- #: app/view/admin/get-repeat-box.php:272
642
  msgid "week(s)"
643
  msgstr "week(s)"
644
 
645
- #: app/view/admin/get-repeat-box.php:357 app/view/admin/get-repeat-box.php:424
646
- #: lib/recurrence/rule.php:260
647
  msgid "last"
648
  msgstr "last"
649
 
650
- #: app/view/admin/get-repeat-box.php:365
651
  msgid "month(s)"
652
  msgstr "month(s)"
653
 
654
- #: app/view/admin/get-repeat-box.php:419
655
  msgid "first"
656
  msgstr "first"
657
 
658
- #: app/view/admin/get-repeat-box.php:420
659
  msgid "second"
660
  msgstr "second"
661
 
662
- #: app/view/admin/get-repeat-box.php:421
663
  msgid "third"
664
  msgstr "third"
665
 
666
- #: app/view/admin/get-repeat-box.php:422
667
  msgid "fourth"
668
  msgstr "fourth"
669
 
670
- #: app/view/admin/get-repeat-box.php:434
671
  msgid "Sunday"
672
  msgstr "Sunday"
673
 
674
- #: app/view/admin/get-repeat-box.php:435
675
  msgid "Monday"
676
  msgstr "Monday"
677
 
678
- #: app/view/admin/get-repeat-box.php:436
679
  msgid "Tuesday"
680
  msgstr "Tuesday"
681
 
682
- #: app/view/admin/get-repeat-box.php:437
683
  msgid "Wednesday"
684
  msgstr "Wednesday"
685
 
686
- #: app/view/admin/get-repeat-box.php:438
687
  msgid "Thursday"
688
  msgstr "Thursday"
689
 
690
- #: app/view/admin/get-repeat-box.php:439
691
  msgid "Friday"
692
  msgstr "Friday"
693
 
694
- #: app/view/admin/get-repeat-box.php:440
695
  msgid "Saturday"
696
  msgstr "Saturday"
697
 
698
- #: app/view/admin/get-repeat-box.php:442
699
  msgid "day"
700
  msgstr "day"
701
 
702
- #: app/view/admin/get-repeat-box.php:443
703
  msgid "weekday"
704
  msgstr "weekday"
705
 
706
- #: app/view/admin/get-repeat-box.php:444
707
  msgid "weekend day"
708
  msgstr "weekend day"
709
 
710
- #: app/view/admin/get-repeat-box.php:510
711
  msgid "year(s)"
712
  msgstr "year(s)"
713
 
@@ -715,63 +730,67 @@ msgstr "year(s)"
715
  msgid "<a href=\"%s\">Settings</a>"
716
  msgstr "<a href=\"%s\">Settings</a>"
717
 
 
 
 
 
718
  #: app/view/admin/settings.php:30
719
  msgid "All-in-One Event Calendar: Settings"
720
  msgstr "All-in-One Event Calendar: Settings"
721
 
722
- #: app/view/admin/settings.php:65 app/view/admin/settings.php:66
723
  #: lib/date/timezone.php:366
724
  msgid "Settings"
725
  msgstr "Settings"
726
 
727
- #: app/view/admin/settings.php:86
728
  msgctxt "meta box"
729
  msgid "General Settings"
730
  msgstr "General Settings"
731
 
732
- #: app/view/admin/settings.php:95
733
  msgctxt "meta box"
734
  msgid "Timely"
735
  msgstr "Timely"
736
 
737
- #: app/view/admin/settings.php:137
738
  msgid "Viewing Events"
739
  msgstr "Viewing Events"
740
 
741
- #: app/view/admin/settings.php:140
742
  msgid "Adding/Editing Events"
743
  msgstr "Adding/Editing Events"
744
 
745
- #: app/view/admin/settings.php:143
746
  msgid "Advanced"
747
  msgstr "Advanced"
748
 
749
- #: app/view/admin/settings.php:145
750
  msgid "Advanced Settings"
751
  msgstr "Advanced Settings"
752
 
753
- #: app/view/admin/settings.php:146
754
  msgid "Shortcodes"
755
  msgstr "Shortcodes"
756
 
757
- #: app/view/admin/settings.php:147
758
  msgid "Email Templates"
759
  msgstr "Email Templates"
760
 
761
- #: app/view/admin/settings.php:148
762
  msgid "External Services"
763
  msgstr "External Services"
764
 
765
- #: app/view/admin/settings.php:149
766
  msgid "Cache Report"
767
  msgstr "Cache Report"
768
 
769
- #: app/view/admin/settings.php:167
770
  #: public/admin/plugins/ics/display_feeds.php:24
771
  msgid "Save Settings"
772
  msgstr "Save Settings"
773
 
774
- #: app/view/admin/settings.php:174
775
  msgid ""
776
  "If the form below is not working please follow <a href=\"%s\">this link</a>."
777
  msgstr ""
@@ -840,23 +859,41 @@ msgctxt "meta box"
840
  msgid "Widget Creator"
841
  msgstr "Widget Creator"
842
 
843
- #: app/view/admin/widget-creator.php:130
844
  msgid ""
845
- "Use this tool to generate code snippets you can place on your site to embed "
846
- "new calendars and widgets."
847
  msgstr ""
848
- "Use this tool to generate code snippets you can place on your site to embed "
849
- "new calendars and widgets."
850
 
851
  #: app/view/admin/widget-creator.php:132
852
- msgid "Full Calendar"
853
- msgstr "Full Calendar"
 
 
 
 
 
 
854
 
855
- #: app/view/admin/widget-creator.php:133
 
 
 
 
 
 
 
 
 
 
 
 
856
  msgid "Paste this code onto your site:"
857
  msgstr "Paste this code onto your site:"
858
 
859
- #: app/view/admin/widget-creator.php:134
860
  msgid ""
861
  "This code will update to reflect changes made to the settings. Changing "
862
  "settings will not affect previously embedded widgets."
@@ -864,7 +901,7 @@ msgstr ""
864
  "This code will update to reflect changes made to the settings. Changing "
865
  "settings will not affect previously embedded widgets."
866
 
867
- #: app/view/calendar/page.php:49
868
  msgid ""
869
  "There was an error loading calendar. Please contact site administrator and "
870
  "inform him to configure calendar views."
@@ -872,7 +909,7 @@ msgstr ""
872
  "There was an error loading calendar. Please contact site administrator and "
873
  "inform him to configure calendar views."
874
 
875
- #: app/view/calendar/page.php:66
876
  msgid ""
877
  "Calendar was unable to initialize %s view and has reverted to Agenda view. "
878
  "Please check if you have installed the latest versions of calendar add-ons."
@@ -880,39 +917,39 @@ msgstr ""
880
  "Calendar was unable to initialize %s view and has reverted to Agenda view. "
881
  "Please check if you have installed the latest versions of calendar add-ons."
882
 
883
- #: app/view/calendar/page.php:234
884
  msgid "Subscribe to filtered calendar"
885
  msgstr "Subscribe to filtered calendar"
886
 
887
- #: app/view/calendar/page.php:235
888
  msgid "Subscribe"
889
  msgstr "Subscribe"
890
 
891
- #: app/view/calendar/subscribe-button.php:21
892
- msgid "Subscribe in your personal calendar"
893
- msgstr "Subscribe in your personal calendar"
894
 
895
- #: app/view/calendar/subscribe-button.php:23
896
  msgid "Add to Timely Calendar"
897
  msgstr "Add to Timely Calendar"
898
 
899
- #: app/view/calendar/subscribe-button.php:24
900
  msgid "Add to Google"
901
  msgstr "Add to Google"
902
 
903
- #: app/view/calendar/subscribe-button.php:25
904
  msgid "Add to Outlook"
905
  msgstr "Add to Outlook"
906
 
907
- #: app/view/calendar/subscribe-button.php:26
908
  msgid "Add to Apple Calendar"
909
  msgstr "Add to Apple Calendar"
910
 
911
- #: app/view/calendar/subscribe-button.php:27
912
  msgid "Add to other calendar"
913
  msgstr "Add to other calendar"
914
 
915
- #: app/view/calendar/subscribe-button.php:30
916
  msgid ""
917
  "Copy this URL for your own Timely calendar or click to add to your rich-text "
918
  "calendar"
@@ -920,19 +957,19 @@ msgstr ""
920
  "Copy this URL for your own Timely calendar or click to add to your rich-text "
921
  "calendar"
922
 
923
- #: app/view/calendar/subscribe-button.php:31
924
  msgid "Subscribe to this calendar in your Google Calendar"
925
  msgstr "Subscribe to this calendar in your Google Calendar"
926
 
927
- #: app/view/calendar/subscribe-button.php:32
928
  msgid "Subscribe to this calendar in MS Outlook"
929
  msgstr "Subscribe to this calendar in MS Outlook"
930
 
931
- #: app/view/calendar/subscribe-button.php:33
932
  msgid "Subscribe to this calendar in Apple Calendar/iCal"
933
  msgstr "Subscribe to this calendar in Apple Calendar/iCal"
934
 
935
- #: app/view/calendar/subscribe-button.php:34
936
  msgid "Subscribe to this calendar in another plain-text calendar"
937
  msgstr "Subscribe to this calendar in another plain-text calendar"
938
 
@@ -940,7 +977,7 @@ msgstr "Subscribe to this calendar in another plain-text calendar"
940
  msgid "Clear category filter"
941
  msgstr "Clear category filter"
942
 
943
- #: app/view/calendar/taxonomy.php:98 app/view/event/single.php:106
944
  #: lib/html/element/setting/tags-categories.php:47
945
  msgid "Categories"
946
  msgstr "Categories"
@@ -949,59 +986,59 @@ msgstr "Categories"
949
  msgid "Clear tag filter"
950
  msgstr "Clear tag filter"
951
 
952
- #: app/view/calendar/taxonomy.php:100 app/view/event/single.php:107
953
  #: lib/html/element/setting/tags-categories.php:39
954
  msgid "Tags"
955
  msgstr "Tags"
956
 
957
- #: app/view/calendar/view/agenda.php:113
958
  msgid "Collapse All"
959
  msgstr "Collapse All"
960
 
961
- #: app/view/calendar/view/agenda.php:114
962
  msgid "Expand All"
963
  msgstr "Expand All"
964
 
965
- #: app/view/calendar/view/agenda.php:137
966
  msgid "There are no upcoming events to display at this time."
967
  msgstr "There are no upcoming events to display at this time."
968
 
969
- #: app/view/calendar/view/agenda.php:138 app/view/calendar/widget.php:363
970
  msgid "Edit"
971
  msgstr "Edit"
972
 
973
- #: app/view/calendar/view/agenda.php:139
974
  msgid "Read more"
975
  msgstr "Read more"
976
 
977
- #: app/view/calendar/view/agenda.php:140
978
  msgid "Categories:"
979
  msgstr "Categories:"
980
 
981
- #: app/view/calendar/view/agenda.php:141 lib/theme/list.php:323
982
  #: public/admin/themes.php:29
983
  msgid "Tags:"
984
  msgstr "Tags:"
985
 
986
- #: app/view/calendar/view/agenda.php:142 app/view/calendar/view/month.php:82
987
- #: app/view/calendar/view/oneday.php:102 app/view/calendar/view/week.php:113
988
- #: app/view/calendar/widget.php:364
989
  msgid "@ %s"
990
  msgstr "@ %s"
991
 
992
- #: app/view/calendar/view/oneday.php:75 app/view/calendar/view/week.php:67
993
  msgid "g a"
994
  msgstr "g a"
995
 
996
- #: app/view/calendar/view/oneday.php:99 app/view/calendar/view/week.php:110
997
  msgid "Reveal full day"
998
  msgstr "Reveal full day"
999
 
1000
- #: app/view/calendar/view/oneday.php:100 app/view/calendar/view/week.php:111
1001
  msgid "All-day"
1002
  msgstr "All-day"
1003
 
1004
- #: app/view/calendar/view/oneday.php:101 app/view/calendar/view/week.php:112
1005
  msgid "Now:"
1006
  msgstr "Now:"
1007
 
@@ -1045,27 +1082,27 @@ msgstr "Show events filtered for the following tags/categories"
1045
  msgid "Show the subscribe button in the widget"
1046
  msgstr "Show the subscribe button in the widget"
1047
 
1048
- #: app/view/calendar/widget.php:360
1049
  msgid "There are no upcoming events."
1050
  msgstr "There are no upcoming events."
1051
 
1052
- #: app/view/calendar/widget.php:361 app/view/event/time.php:131
1053
  msgid "all-day"
1054
  msgstr "all-day"
1055
 
1056
- #: app/view/calendar/widget.php:362
1057
  msgid "View Calendar"
1058
  msgstr "View Calendar"
1059
 
1060
- #: app/view/calendar/widget.php:365
1061
  msgid "Add"
1062
  msgstr "Add"
1063
 
1064
- #: app/view/event/content.php:33 app/view/event/single.php:101
1065
  msgid "When:"
1066
  msgstr "When:"
1067
 
1068
- #: app/view/event/content.php:34 app/view/event/single.php:102
1069
  msgid "Where:"
1070
  msgstr "Where:"
1071
 
@@ -1140,40 +1177,41 @@ msgstr ""
1140
  msgid "Event was created in the %s time zone"
1141
  msgstr "Event was created in the %s time zone"
1142
 
1143
- #: app/view/event/single.php:97
1144
  msgid "Add to Calendar"
1145
  msgstr "Add to Calendar"
1146
 
1147
- #: app/view/event/single.php:103
1148
  msgid "Cost:"
1149
  msgstr "Cost:"
1150
 
1151
- #: app/view/event/single.php:104
1152
- #: cache/twig/f0/57/03afef869c4fea0061567a42872d377423a41be579565d0cdf32260df05f.php:94
1153
  msgid "Contact:"
1154
  msgstr "Contact:"
1155
 
1156
- #: app/view/event/single.php:105
1157
  msgid "Free"
1158
  msgstr "Free"
1159
 
1160
- #: app/view/event/single.php:122
1161
  msgid "Edit this occurrence (%s)"
1162
  msgstr "Edit this occurrence (%s)"
1163
 
1164
- #: app/view/event/single.php:140
1165
  msgid ""
1166
- "This post was replicated from another site's <a class=\"ai1ec-ics-icon\" "
1167
- "href=\"%s\" title=\"iCalendar feed\">calendar feed</a>."
 
1168
  msgstr ""
1169
- "This post was replicated from another site's <a class=\"ai1ec-ics-icon\" "
1170
- "href=\"%s\" title=\"iCalendar feed\">calendar feed</a>."
 
1171
 
1172
- #: app/view/event/single.php:141
1173
- msgid "View original post"
1174
- msgstr "View original post"
1175
 
1176
- #: app/view/event/taxonomy.php:117
1177
  msgid "Category image"
1178
  msgstr "Category image"
1179
 
@@ -1201,52 +1239,84 @@ msgstr "Email"
1201
  msgid "Event website"
1202
  msgstr "Event website"
1203
 
1204
- #: app/view/event/time.php:83 app/view/event/time.php:117
1205
  msgctxt "Event time separator"
1206
  msgid " @ "
1207
  msgstr " @ "
1208
 
1209
- #: app/view/event/time.php:99
1210
  msgctxt "Event start/end separator"
1211
  msgid " – "
1212
  msgstr " – "
1213
 
1214
- #: app/view/event/time.php:160
1215
  msgid ", and "
1216
  msgstr ", and "
1217
 
1218
- #: cache/twig/78/3e/57d2212e2837aee7813ecc844f345947f68d3edb57d31388f926a75264db.php:27
1219
- #: cache/twig/78/3e/57d2212e2837aee7813ecc844f345947f68d3edb57d31388f926a75264db.php:31
1220
- msgid "Products"
1221
- msgstr "Products"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1222
 
1223
- #: cache/twig/dc/78/b950182efb8f436b144938fb0dc48cf395d7daabe20293234dbcf2b26545.php:37
1224
- msgid "Excludes: "
1225
- msgstr "Excludes: "
 
 
 
 
 
 
 
 
 
 
1226
 
1227
- #: cache/twig/dc/78/b950182efb8f436b144938fb0dc48cf395d7daabe20293234dbcf2b26545.php:48
1228
- msgid "Repeats"
1229
- msgstr "Repeats"
1230
 
1231
- #: cache/twig/f0/57/03afef869c4fea0061567a42872d377423a41be579565d0cdf32260df05f.php:173
1232
  msgid "Seating capacity:"
1233
  msgstr "Seating capacity:"
1234
 
1235
- #: cache/twig/f0/57/03afef869c4fea0061567a42872d377423a41be579565d0cdf32260df05f.php:190
1236
- msgid "Handicap accessible"
1237
- msgstr "Handicap accessible"
1238
 
1239
- #: cache/twig/f0/57/03afef869c4fea0061567a42872d377423a41be579565d0cdf32260df05f.php:205
1240
  msgid "Parking:"
1241
  msgstr "Parking:"
1242
 
1243
- #: cache/twig/f0/57/03afef869c4fea0061567a42872d377423a41be579565d0cdf32260df05f.php:241
1244
- msgid "Email Venue"
1245
- msgstr "Email Venue"
 
 
 
 
 
1246
 
1247
- #: cache/twig/f0/57/03afef869c4fea0061567a42872d377423a41be579565d0cdf32260df05f.php:259
1248
- msgid "Visit Website"
1249
- msgstr "Visit Website"
 
1250
 
1251
  #: lib/calendar-feed/ics.php:38
1252
  msgid "ICS"
@@ -1286,49 +1356,74 @@ msgid_plural "Imported %s events"
1286
  msgstr[0] "Imported %s event"
1287
  msgstr[1] "Imported %s events"
1288
 
1289
- #: lib/calendar-feed/ics.php:205 lib/calendar-feed/ics.php:654
1290
  msgid "Invalid ICS feed ID"
1291
  msgstr "Invalid ICS feed ID"
1292
 
1293
- #: lib/calendar-feed/ics.php:348
1294
  msgid "Categories (optional)"
1295
  msgstr "Categories (optional)"
1296
 
1297
- #: lib/calendar-feed/ics.php:365
1298
  msgid ""
1299
  "Do you want to keep the events imported from the calendar or remove them?"
1300
  msgstr ""
1301
  "Do you want to keep the events imported from the calendar or remove them?"
1302
 
1303
- #: lib/calendar-feed/ics.php:371
1304
  msgid "Removing ICS Feed"
1305
  msgstr "Removing ICS Feed"
1306
 
1307
- #: lib/calendar-feed/ics.php:374
1308
  msgid "Keep Events"
1309
  msgstr "Keep Events"
1310
 
1311
- #: lib/calendar-feed/ics.php:377
1312
  msgid "Remove Events"
1313
  msgstr "Remove Events"
1314
 
1315
- #: lib/calendar-feed/ics.php:646
1316
  msgid "Deleted %d events"
1317
  msgstr "Deleted %d events"
1318
 
1319
- #: lib/calendar-feed/ics.php:681
1320
  msgid "Feed deleted"
1321
  msgstr "Feed deleted"
1322
 
1323
- #: lib/captcha/validator.php:24
 
 
 
 
 
 
 
 
 
 
 
 
 
1324
  msgid ""
1325
- "There was an error reading the word verification data. Please try again."
1326
  msgstr ""
1327
- "There was an error reading the word verification data. Please try again."
 
 
 
 
 
 
 
 
 
 
 
 
1328
 
1329
- #: lib/captcha/validator.php:37
1330
- msgid "Please try answering the word verification again."
1331
- msgstr "Please try answering the word verification again."
1332
 
1333
  #: lib/clone/renderer-helper.php:26 lib/clone/renderer-helper.php:27
1334
  #: lib/clone/renderer-helper.php:45
@@ -1347,7 +1442,7 @@ msgstr "Copy to a new draft"
1347
  msgid "Clone to Draft"
1348
  msgstr "Clone to Draft"
1349
 
1350
- #: lib/command/clone.php:166
1351
  msgid ""
1352
  "<p>The event <strong>%s</strong> was cloned succesfully. <a href=\"%s\">Edit "
1353
  "cloned event</a></p>"
@@ -1355,7 +1450,17 @@ msgstr ""
1355
  "<p>The event <strong>%s</strong> was cloned succesfully. <a href=\"%s\">Edit "
1356
  "cloned event</a></p>"
1357
 
1358
- #: lib/css/frontend.php:225
 
 
 
 
 
 
 
 
 
 
1359
  msgid ""
1360
  "CSS compilation failed because you don't have enough free memory (a minimum "
1361
  "of %s is needed). Your calendar will not render or function properly without "
@@ -1369,7 +1474,7 @@ msgstr ""
1369
  "started/pre-sale-questions/\">this article</a> to learn how to increase your "
1370
  "PHP memory limit."
1371
 
1372
- #: lib/css/frontend.php:252
1373
  msgid ""
1374
  "The LESS file compiled correctly but there was an error while saving the "
1375
  "generated CSS to persistence."
@@ -1377,7 +1482,7 @@ msgstr ""
1377
  "The LESS file compiled correctly but there was an error while saving the "
1378
  "generated CSS to persistence."
1379
 
1380
- #: lib/css/frontend.php:258
1381
  msgid ""
1382
  "<p><strong>There was an error while compiling CSS.</strong> The message "
1383
  "returned was: <em>%s</em></p>"
@@ -1385,7 +1490,7 @@ msgstr ""
1385
  "<p><strong>There was an error while compiling CSS.</strong> The message "
1386
  "returned was: <em>%s</em></p>"
1387
 
1388
- #: lib/css/frontend.php:286
1389
  msgid ""
1390
  "Theme options were successfully reset to their default values. <a "
1391
  "href='%s'>Visit site</a>"
@@ -1393,11 +1498,11 @@ msgstr ""
1393
  "Theme options were successfully reset to their default values. <a "
1394
  "href='%s'>Visit site</a>"
1395
 
1396
- #: lib/css/frontend.php:293
1397
  msgid "Theme options were updated successfully. <a href='%s'>Visit site</a>"
1398
  msgstr "Theme options were updated successfully. <a href='%s'>Visit site</a>"
1399
 
1400
- #: lib/css/frontend.php:329
1401
  msgid ""
1402
  "Your CSS is being compiled on every request, which causes your calendar to "
1403
  "perform slowly. The following error occurred: %s"
@@ -1423,7 +1528,7 @@ msgstr ""
1423
  msgid "Error encountered: %s"
1424
  msgstr "Error encountered: %s"
1425
 
1426
- #: lib/date/system.php:177
1427
  msgid "GMT%+d:%02d"
1428
  msgstr "GMT%+d:%02d"
1429
 
@@ -1451,11 +1556,11 @@ msgstr "Manual Offset"
1451
  msgid "Choose your timezone"
1452
  msgstr "Choose your timezone"
1453
 
1454
- #: lib/environment/check.php:53
1455
  msgid "Select an option in the <strong>Calendar page</strong> dropdown list."
1456
  msgstr "Select an option in the <strong>Calendar page</strong> dropdown list."
1457
 
1458
- #: lib/environment/check.php:66
1459
  msgid ""
1460
  "The plugin is installed, but has not been configured. <a href=\"%s\">Click "
1461
  "here to set it up now &raquo;</a>"
@@ -1463,7 +1568,7 @@ msgstr ""
1463
  "The plugin is installed, but has not been configured. <a href=\"%s\">Click "
1464
  "here to set it up now &raquo;</a>"
1465
 
1466
- #: lib/environment/check.php:76
1467
  msgid ""
1468
  "The plugin is installed, but has not been configured. Please log in as an "
1469
  "Administrator to set it up."
@@ -1471,25 +1576,53 @@ msgstr ""
1471
  "The plugin is installed, but has not been configured. Please log in as an "
1472
  "Administrator to set it up."
1473
 
1474
- #: lib/environment/check.php:192
1475
- msgid "Addon %s needs to be at least in version %s"
1476
- msgstr "Addon %s needs to be at least in version %s"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1477
 
1478
  #: lib/exception/handler.php:176
1479
- msgid "Disabled add-on \"%s\" due to an error"
1480
- msgstr "Disabled add-on \"%s\" due to an error"
1481
 
1482
- #: lib/exception/handler.php:397
1483
- msgid "All In One Event Calendar has been disabled due to an error:"
1484
- msgstr "All In One Event Calendar has been disabled due to an error:"
1485
 
1486
- #: lib/exception/handler.php:407
1487
- msgid ""
1488
- "<p>If you corrected the error and wish to try reactivating the plugin, <a "
1489
- "href=\"%s\">click here</a>.</p>"
1490
- msgstr ""
1491
- "<p>If you corrected the error and wish to try reactivating the plugin, <a "
1492
- "href=\"%s\">click here</a>.</p>"
 
 
 
 
1493
 
1494
  #: lib/factory/html.php:128
1495
  msgid "Choose a date using calendar"
@@ -1689,10 +1822,14 @@ msgstr "Enter custom font(s)"
1689
  msgid "Length"
1690
  msgstr "Length"
1691
 
1692
- #: lib/notification/admin.php:180
1693
  msgid "All-in-One Event Calendar"
1694
  msgstr "All-in-One Event Calendar"
1695
 
 
 
 
 
1696
  #: lib/post/custom-type.php:26
1697
  msgctxt "Custom post type name"
1698
  msgid "Events"
@@ -1745,35 +1882,40 @@ msgstr "event"
1745
 
1746
  #: lib/post/custom-type.php:85
1747
  msgctxt "Event categories taxonomy"
1748
- msgid "Event Categories"
1749
- msgstr "Event Categories"
1750
 
1751
  #: lib/post/custom-type.php:86
1752
  msgctxt "Event categories taxonomy (singular)"
1753
- msgid "Event Category"
1754
- msgstr "Event Category"
1755
 
1756
- #: lib/post/custom-type.php:93
1757
- msgctxt "Event tags taxonomy"
1758
- msgid "Event Tags"
1759
- msgstr "Event Tags"
1760
 
1761
  #: lib/post/custom-type.php:94
 
 
 
 
 
1762
  msgctxt "Event tags taxonomy (singular)"
1763
- msgid "Event Tag"
1764
- msgstr "Event Tag"
1765
 
1766
- #: lib/post/custom-type.php:101
1767
  msgctxt "Event feeds taxonomy"
1768
  msgid "Event Feeds"
1769
  msgstr "Event Feeds"
1770
 
1771
- #: lib/post/custom-type.php:102
1772
  msgctxt "Event feed taxonomy (singular)"
1773
  msgid "Event Feed"
1774
  msgstr "Event Feed"
1775
 
1776
- #: lib/post/custom-type.php:277
1777
  msgid ""
1778
  "All Events <span class=\"update-plugins count-%d\" title=\"%d Pending Events"
1779
  "\"><span class=\"update-count\">%d</span></span>"
@@ -1781,96 +1923,96 @@ msgstr ""
1781
  "All Events <span class=\"update-plugins count-%d\" title=\"%d Pending Events"
1782
  "\"><span class=\"update-count\">%d</span></span>"
1783
 
1784
- #: lib/post/custom-type.php:288
1785
  msgid "All Events"
1786
  msgstr "All Events"
1787
 
1788
- #: lib/recurrence/rule.php:206 lib/recurrence/rule.php:215
1789
- #: lib/recurrence/rule.php:223
1790
  msgctxt "Recurrence editor - weekly tab"
1791
  msgid "on"
1792
  msgstr "on"
1793
 
1794
- #: lib/recurrence/rule.php:211 lib/recurrence/rule.php:240
1795
- #: lib/recurrence/rule.php:288
1796
  msgid "and"
1797
  msgstr "and"
1798
 
1799
- #: lib/recurrence/rule.php:236 lib/recurrence/rule.php:243
1800
- #: lib/recurrence/rule.php:249 lib/recurrence/rule.php:270
1801
  msgctxt "Recurrence editor - monthly tab"
1802
  msgid "on"
1803
  msgstr "on"
1804
 
1805
- #: lib/recurrence/rule.php:236 lib/recurrence/rule.php:243
1806
- #: lib/recurrence/rule.php:249
1807
  msgid "of the month"
1808
  msgstr "of the month"
1809
 
1810
- #: lib/recurrence/rule.php:283 lib/recurrence/rule.php:291
1811
- #: lib/recurrence/rule.php:298
1812
  msgctxt "Recurrence editor - yearly tab"
1813
  msgid "on"
1814
  msgstr "on"
1815
 
1816
- #: lib/recurrence/rule.php:338 public/admin/box_repeat.php:16
1817
  #: public/admin/cron_freq.php:9
1818
  msgid "Daily"
1819
  msgstr "Daily"
1820
 
1821
- #: lib/recurrence/rule.php:341
1822
  msgid "Every other day"
1823
  msgstr "Every other day"
1824
 
1825
- #: lib/recurrence/rule.php:344
1826
  msgid "Every %d days"
1827
  msgstr "Every %d days"
1828
 
1829
- #: lib/recurrence/rule.php:353 public/admin/box_repeat.php:21
1830
  msgid "Weekly"
1831
  msgstr "Weekly"
1832
 
1833
- #: lib/recurrence/rule.php:356
1834
  msgid "Every other week"
1835
  msgstr "Every other week"
1836
 
1837
- #: lib/recurrence/rule.php:359
1838
  msgid "Every %d weeks"
1839
  msgstr "Every %d weeks"
1840
 
1841
- #: lib/recurrence/rule.php:368 public/admin/box_repeat.php:26
1842
  msgid "Monthly"
1843
  msgstr "Monthly"
1844
 
1845
- #: lib/recurrence/rule.php:371
1846
  msgid "Every other month"
1847
  msgstr "Every other month"
1848
 
1849
- #: lib/recurrence/rule.php:374
1850
  msgid "Every %d months"
1851
  msgstr "Every %d months"
1852
 
1853
- #: lib/recurrence/rule.php:383 public/admin/box_repeat.php:31
1854
  msgid "Yearly"
1855
  msgstr "Yearly"
1856
 
1857
- #: lib/recurrence/rule.php:386
1858
  msgid "Every other year"
1859
  msgstr "Every other year"
1860
 
1861
- #: lib/recurrence/rule.php:389
1862
  msgid "Every %d years"
1863
  msgstr "Every %d years"
1864
 
1865
- #: lib/recurrence/rule.php:427
1866
  msgid "until %s"
1867
  msgstr "until %s"
1868
 
1869
- #: lib/recurrence/rule.php:437
1870
  msgid "for %d occurrences"
1871
  msgstr "for %d occurrences"
1872
 
1873
- #: lib/recurrence/rule.php:441
1874
  msgid "forever"
1875
  msgstr "forever"
1876
 
@@ -1926,22 +2068,22 @@ msgstr ""
1926
  "Only the active theme is available to you. Contact the <em>%s</em> "
1927
  "administrator to add more themes."
1928
 
1929
- #: lib/theme/list.php:260
1930
  msgid "Activate &#8220;%s&#8221;"
1931
  msgstr "Activate &#8220;%s&#8221;"
1932
 
1933
- #: lib/theme/list.php:267
1934
  msgid "Activate"
1935
  msgstr "Activate"
1936
 
1937
  #. translators: 1: theme title, 2: theme version, 3: theme author
1938
- #: lib/theme/list.php:284 public/admin/themes.php:25
1939
  msgid "%1$s %2$s by %3$s"
1940
  msgstr "%1$s %2$s by %3$s"
1941
 
1942
  #. translators: 1: theme title, 2: template dir, 3: stylesheet_dir, 4: theme
1943
  #. title, 5: parent_theme
1944
- #: lib/theme/list.php:296
1945
  msgid ""
1946
  "The template files are located in <code>%2$s</code>. The stylesheet files "
1947
  "are located in <code>%3$s</code>. <strong>%4$s</strong> uses templates from "
@@ -1951,14 +2093,26 @@ msgstr ""
1951
  "are located in <code>%3$s</code>. <strong>%4$s</strong> uses templates from "
1952
  "<strong>%5$s</strong>. Changes made to the templates will affect both themes."
1953
 
1954
- #: lib/theme/list.php:311
1955
  msgid "All of this theme&#8217;s files are located in <code>%2$s</code>."
1956
  msgstr "All of this theme&#8217;s files are located in <code>%2$s</code>."
1957
 
1958
- #: lib/theme/loader.php:305
1959
  msgid "We couldn't find a suitable loader for filename with extension '%s'"
1960
  msgstr "We couldn't find a suitable loader for filename with extension '%s'"
1961
 
 
 
 
 
 
 
 
 
 
 
 
 
1962
  #: lib/theme/search.php:253
1963
  msgid ""
1964
  "Unable to move your old core themes from <code>wp-content/themes-ai1ec</"
@@ -1981,19 +2135,13 @@ msgstr ""
1981
  "code> to <code>wp-content/themes-ai1ec-obsolete/%s</code>. Please manually "
1982
  "remove your old core themes from <code>wp-content/themes-ai1ec/%s</code>."
1983
 
1984
- #: lib/twig/environment.php:31
1985
  msgid ""
1986
- "We detected that your cache directory (%s) is not writable. This will make "
1987
- "your calendar slow. Please contact your web host or server administrator to "
1988
- "make it writable by the web server."
1989
  msgstr ""
1990
- "We detected that your cache directory (%s) is not writable. This will make "
1991
- "your calendar slow. Please contact your web host or server administrator to "
1992
- "make it writable by the web server."
1993
-
1994
- #: public/admin/agenda-widget-form.php:2
1995
- msgid "Title:"
1996
- msgstr "Title:"
1997
 
1998
  #: public/admin/agenda-widget-form.php:12
1999
  msgid "Number of events to show:"
@@ -2059,14 +2207,6 @@ msgstr "Edit:"
2059
  msgid "Organizer contact info"
2060
  msgstr "Organizer contact info"
2061
 
2062
- #: public/admin/box_event_contact.php:17
2063
- msgid "Contact name:"
2064
- msgstr "Contact name:"
2065
-
2066
- #: public/admin/box_event_contact.php:30
2067
- msgid "Phone:"
2068
- msgstr "Phone:"
2069
-
2070
  #: public/admin/box_event_contact.php:43
2071
  msgid "E-mail:"
2072
  msgstr "E-mail:"
@@ -2099,29 +2239,25 @@ msgstr "Buy Tickets URL:"
2099
  msgid "Event location details"
2100
  msgstr "Event location details"
2101
 
2102
- #: public/admin/box_event_location.php:22
2103
  msgid "Venue name:"
2104
  msgstr "Venue name:"
2105
 
2106
- #: public/admin/box_event_location.php:34
2107
- msgid "Address:"
2108
- msgstr "Address:"
2109
-
2110
- #: public/admin/box_event_location.php:48
2111
- msgid "Show Google Map"
2112
- msgstr "Show Google Map"
2113
-
2114
- #: public/admin/box_event_location.php:57
2115
  msgid "Input Coordinates"
2116
  msgstr "Input Coordinates"
2117
 
 
 
 
 
2118
  #: public/admin/box_event_location.php:69
2119
  msgid "Longitude:"
2120
  msgstr "Longitude:"
2121
 
2122
- #: public/admin/box_event_location.php:82
2123
- msgid "Latitude:"
2124
- msgstr "Latitude:"
2125
 
2126
  #: public/admin/box_eventbrite.php:1
2127
  msgid "Eventbrite Ticketing"
@@ -2133,13 +2269,13 @@ msgstr "Register this event with Eventbrite.com?"
2133
 
2134
  #: public/admin/box_eventbrite.php:12 public/admin/feed_row.php:28
2135
  #: public/admin/feed_row.php:38 public/admin/feed_row.php:49
2136
- #: public/admin/feed_row.php:59
2137
  msgid "Yes"
2138
  msgstr "Yes"
2139
 
2140
  #: public/admin/box_eventbrite.php:14 public/admin/feed_row.php:30
2141
  #: public/admin/feed_row.php:40 public/admin/feed_row.php:51
2142
- #: public/admin/feed_row.php:61
2143
  msgid "No"
2144
  msgstr "No"
2145
 
@@ -2223,10 +2359,6 @@ msgstr "Cash"
2223
  msgid "Send an Invoice"
2224
  msgstr "Send an Invoice"
2225
 
2226
- #: public/admin/box_profile_timezone.php:2
2227
- msgid "All in One Event Calendar"
2228
- msgstr "All in One Event Calendar"
2229
-
2230
  #: public/admin/box_profile_timezone.php:9
2231
  msgid "Your preferred timezone"
2232
  msgstr "Your preferred timezone"
@@ -2235,24 +2367,28 @@ msgstr "Your preferred timezone"
2235
  msgid "Select recurrence pattern:"
2236
  msgstr "Select recurrence pattern:"
2237
 
2238
- #: public/admin/box_repeat.php:63
 
 
 
 
2239
  msgid "End"
2240
  msgstr "End"
2241
 
2242
- #: public/admin/box_repeat.php:73
2243
  msgid "Ending after"
2244
  msgstr "Ending after"
2245
 
2246
- #: public/admin/box_repeat.php:100
2247
- #: public/admin/plugins/ics/display_feeds.php:80
2248
  msgid "Please wait&#8230;"
2249
  msgstr "Please wait&#8230;"
2250
 
2251
- #: public/admin/box_repeat.php:102
2252
  msgid "Apply"
2253
  msgstr "Apply"
2254
 
2255
- #: public/admin/box_repeat.php:107
2256
  msgid "Cancel"
2257
  msgstr "Cancel"
2258
 
@@ -2332,18 +2468,6 @@ msgstr "Exclude"
2332
  msgid "Choose a rule for exclusion"
2333
  msgstr "Choose a rule for exclusion"
2334
 
2335
- #: public/admin/box_time_and_date.php:143
2336
- msgid "Exclude dates"
2337
- msgstr "Exclude dates"
2338
-
2339
- #: public/admin/box_time_and_date.php:149
2340
- msgid "Choose dates"
2341
- msgstr "Choose dates"
2342
-
2343
- #: public/admin/box_time_and_date.php:156
2344
- msgid "Choose specific dates to exclude"
2345
- msgstr "Choose specific dates to exclude"
2346
-
2347
  #: public/admin/calendar_tasks.php:3
2348
  msgid "Welcome"
2349
  msgstr "Welcome"
@@ -2437,22 +2561,38 @@ msgid "Keep original events categories and tags"
2437
  msgstr "Keep original events categories and tags"
2438
 
2439
  #: public/admin/feed_row.php:56 public/admin/plugins/ics/display_feeds.php:72
2440
- msgid "Keep old events"
2441
- msgstr "Keep old events"
 
 
 
 
 
 
 
 
 
 
 
 
2442
 
2443
- #: public/admin/feed_row.php:71
 
 
 
 
2444
  msgid "Refreshing&#8230;"
2445
  msgstr "Refreshing&#8230;"
2446
 
2447
- #: public/admin/feed_row.php:73
2448
  msgid "Refresh"
2449
  msgstr "Refresh"
2450
 
2451
- #: public/admin/feed_row.php:80
2452
  msgid "Removing&#8230;"
2453
  msgstr "Removing&#8230;"
2454
 
2455
- #: public/admin/feed_row.php:82
2456
  msgid "Remove"
2457
  msgstr "Remove"
2458
 
@@ -2490,10 +2630,14 @@ msgid ""
2490
  msgstr ""
2491
  "Import any tags/categories provided by feed, in addition those selected above"
2492
 
2493
- #: public/admin/plugins/ics/display_feeds.php:82
2494
  msgid "Add new subscription"
2495
  msgstr "Add new subscription"
2496
 
 
 
 
 
2497
  #: public/admin/row_daily.php:3 public/admin/row_monthly.php:3
2498
  #: public/admin/row_monthly.php:39 public/admin/row_weekly.php:3
2499
  #: public/admin/row_yearly.php:3
@@ -2526,19 +2670,27 @@ msgstr "Update Settings"
2526
  msgid "The active theme is broken. Reverting to the default theme."
2527
  msgstr "The active theme is broken. Reverting to the default theme."
2528
 
2529
- #: public/admin/themes-install.php:22 public/admin/themes.php:4
 
 
 
 
 
 
 
 
2530
  msgid "New theme activated. <a href=\"%s\">Visit site</a>"
2531
  msgstr "New theme activated. <a href=\"%s\">Visit site</a>"
2532
 
2533
- #: public/admin/themes-install.php:28 public/admin/themes.php:10
2534
  msgid "Theme deleted."
2535
  msgstr "Theme deleted."
2536
 
2537
- #: public/admin/themes-install.php:39 public/admin/themes-install.php:46
2538
  msgid "Manage Themes"
2539
  msgstr "Manage Themes"
2540
 
2541
- #: public/admin/themes-install.php:42
2542
  msgctxt "theme"
2543
  msgid "Install Themes"
2544
  msgstr "Install Themes"
@@ -2782,9 +2934,9 @@ msgstr "Today background"
2782
  msgid "All-in-One Event Calendar by Time.ly"
2783
  msgstr "All-in-One Event Calendar by Time.ly"
2784
 
2785
- #. #-#-#-#-# all-in-one-event-calendar.pot (All-in-One Event Calendar by Time.ly 2.1.9) #-#-#-#-#
2786
  #. Plugin URI of the plugin/theme
2787
- #. #-#-#-#-# all-in-one-event-calendar.pot (All-in-One Event Calendar by Time.ly 2.1.9) #-#-#-#-#
2788
  #. Author URI of the plugin/theme
2789
  msgid "http://time.ly/"
2790
  msgstr "http://time.ly/"
1
+ # Copyright (C) 2015 All-in-One Event Calendar by Time.ly
2
  # This file is distributed under the same license as the All-in-One Event Calendar by Time.ly package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: All-in-One Event Calendar by Time.ly 2.2.0\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/all-in-one-event-calendar\n"
7
+ "POT-Creation-Date: 2015-02-17 17:20:24+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2015-02-17 18:20+0100\n"
12
  "Last-Translator: Timely <support@time.ly>\n"
13
  "Language-Team:\n"
14
 
25
  msgid "Licences"
26
  msgstr "Licences"
27
 
28
+ #: app/controller/front.php:343
29
  msgid ""
30
  "Your active calendar theme could not be properly initialized. The default "
31
  "theme has been activated instead. Please visit %s and try reactivating your "
35
  "theme has been activated instead. Please visit %s and try reactivating your "
36
  "theme manually."
37
 
38
+ #: app/controller/front.php:347 app/view/admin/theme-switching.php:54
39
  #: app/view/admin/theme-switching.php:55
40
  msgid "Calendar Themes"
41
  msgstr "Calendar Themes"
42
 
43
+ #: app/controller/front.php:949
44
  msgid ""
45
  "Your database is found to be corrupt. Likely previous update has failed. "
46
  "Please restore All-in-One Event Calendar tables from a backup and retry."
50
  "Please restore All-in-One Event Calendar tables from a backup and retry."
51
  "<br>Following errors were found:<br>%s"
52
 
53
+ #: app/controller/javascript-widget.php:48
 
 
 
 
 
 
 
 
 
 
54
  msgid "You must choose the Calendar page before using the Super Widget"
55
  msgstr "You must choose the Calendar page before using the Super Widget"
56
 
57
+ #: app/controller/javascript.php:395
58
  msgid "This feed is already being imported."
59
  msgstr "This feed is already being imported."
60
 
61
+ #: app/controller/javascript.php:398
62
  msgid "Please enter a valid iCalendar URL."
63
  msgstr "Please enter a valid iCalendar URL."
64
 
65
+ #: app/controller/javascript.php:401
66
  msgid "Please enter a valid email address."
67
  msgstr "Please enter a valid email address."
68
 
69
+ #: app/controller/javascript.php:403
70
  msgid "Choose Image"
71
  msgstr "Choose Image"
72
 
73
+ #: app/controller/javascript.php:406
74
  msgid "The value you have entered is not a valid CSS length."
75
  msgstr "The value you have entered is not a valid CSS length."
76
 
77
+ #: app/controller/javascript.php:409
78
  msgid ""
79
  "Are you sure you want to reset your theme options to their default values?"
80
  msgstr ""
81
  "Are you sure you want to reset your theme options to their default values?"
82
 
83
+ #: app/controller/javascript.php:412
84
  msgid ""
85
  "Please enter a valid latitude. A valid latitude is comprised between +90 and "
86
  "-90."
88
  "Please enter a valid latitude. A valid latitude is comprised between +90 and "
89
  "-90."
90
 
91
+ #: app/controller/javascript.php:415
92
  msgid ""
93
  "Please enter a valid longitude. A valid longitude is comprised between +180 "
94
  "and -180."
96
  "Please enter a valid longitude. A valid longitude is comprised between +180 "
97
  "and -180."
98
 
99
+ #: app/controller/javascript.php:418
100
  msgid ""
101
  "When the \"Input coordinates\" checkbox is checked, \"Latitude\" is a "
102
  "required field."
104
  "When the \"Input coordinates\" checkbox is checked, \"Latitude\" is a "
105
  "required field."
106
 
107
+ #: app/controller/javascript.php:421
108
  msgid ""
109
  "When the \"Input coordinates\" checkbox is checked, \"Longitude\" is a "
110
  "required field."
112
  "When the \"Input coordinates\" checkbox is checked, \"Longitude\" is a "
113
  "required field."
114
 
115
+ #: app/controller/javascript.php:424
116
  msgid ""
117
  "The URL you have entered in the <b>Organizer Contact Info</b> &gt; "
118
  "<b>External URL</b> seems to be invalid."
120
  "The URL you have entered in the <b>Organizer Contact Info</b> &gt; "
121
  "<b>External URL</b> seems to be invalid."
122
 
123
+ #: app/controller/javascript.php:427
124
  msgid ""
125
  "The URL you have entered in the <b>Event Cost and Tickets</b> &gt; <b>Buy "
126
  "Tickets URL</b> seems to be invalid."
128
  "The URL you have entered in the <b>Event Cost and Tickets</b> &gt; <b>Buy "
129
  "Tickets URL</b> seems to be invalid."
130
 
131
+ #: app/controller/javascript.php:430
132
  msgid ""
133
  "Please remember that URLs must start with either \"http://\" or \"https://\"."
134
  msgstr ""
135
  "Please remember that URLs must start with either \"http://\" or \"https://\"."
136
 
137
+ #: app/controller/javascript.php:433
138
  msgid "Loading&hellip;"
139
  msgstr "Loading&hellip;"
140
 
141
+ #: app/controller/javascript.php:465 app/view/admin/widget-creator.php:139
142
  msgid "Preview:"
143
  msgstr "Preview:"
144
 
145
+ #: app/controller/javascript.php:466
146
  msgid ""
147
  "Loading preview&nbsp;<i class=\"ai1ec-fa ai1ec-fa-spin ai1ec-fa-spinner\"></"
148
  "i>"
150
  "Loading preview&nbsp;<i class=\"ai1ec-fa ai1ec-fa-spin ai1ec-fa-spinner\"></"
151
  "i>"
152
 
153
+ #: app/controller/javascript.php:470
154
  msgid ""
155
  "Something went wrong while fetching events.<br>The request status is: %STATUS"
156
  "% <br>The error thrown was: %ERROR%"
158
  "Something went wrong while fetching events.<br>The request status is: %STATUS"
159
  "% <br>The error thrown was: %ERROR%"
160
 
161
+ #: app/controller/javascript.php:477
162
+ msgid "The end date can't be earlier than the start date."
163
+ msgstr "The end date can't be earlier than the start date."
164
+
165
+ #: app/controller/javascript.php:478
166
+ msgid "For week and day view, you must select an interval of at least 6 hours."
167
+ msgstr ""
168
+ "For week and day view, you must select an interval of at least 6 hours."
169
+
170
  #: app/model/event/parent.php:186
171
  msgid "Edit &#8220;%s&#8221;"
172
  msgstr "Edit &#8220;%s&#8221;"
175
  msgid "Base Event"
176
  msgstr "Base Event"
177
 
178
+ #: app/model/settings.php:379
179
  #: lib/html/element/setting/calendar-page-selector.php:50
180
  msgid "Calendar page"
181
  msgstr "Calendar page"
182
 
183
+ #: app/model/settings.php:389
184
  msgid "Week starts on"
185
  msgstr "Week starts on"
186
 
187
+ #: app/model/settings.php:402
188
  msgid "Available views"
189
  msgstr "Available views"
190
 
191
+ #: app/model/settings.php:410
192
  msgid "Agenda"
193
  msgid_plural "Agenda"
194
  msgstr[0] "Agenda"
195
  msgstr[1] "Agenda"
196
 
197
+ #: app/model/settings.php:421
198
  msgid "Day"
199
  msgid_plural "Day"
200
  msgstr[0] "Day"
201
  msgstr[1] "Day"
202
 
203
+ #: app/model/settings.php:432
204
  msgid "Month"
205
  msgid_plural "Month"
206
  msgstr[0] "Month"
207
  msgstr[1] "Month"
208
 
209
+ #: app/model/settings.php:443
210
  msgid "Week"
211
  msgid_plural "Week"
212
  msgstr[0] "Week"
213
  msgstr[1] "Week"
214
 
215
+ #: app/model/settings.php:457
216
  msgid "Timezone"
217
  msgstr "Timezone"
218
 
219
+ #: app/model/settings.php:470
220
  msgid "Preselected calendar filters"
221
  msgstr "Preselected calendar filters"
222
 
223
+ #: app/model/settings.php:471 app/view/calendar/widget.php:128
224
  msgid ""
225
  "To clear, hold &#8984;/<abbr class=\"initialism\">CTRL</abbr> and click "
226
  "selection."
228
  "To clear, hold &#8984;/<abbr class=\"initialism\">CTRL</abbr> and click "
229
  "selection."
230
 
231
+ #: app/model/settings.php:486
232
  msgid "Default calendar start date (optional)"
233
  msgstr "Default calendar start date (optional)"
234
 
235
+ #: app/model/settings.php:497
236
  msgid "Agenda pages show at most"
237
  msgstr "Agenda pages show at most"
238
 
239
+ #: app/model/settings.php:510
240
  msgid "Week/Day view starts at"
241
  msgstr "Week/Day view starts at"
242
 
243
+ #: app/model/settings.php:523
244
  msgid "Week/Day view ends at"
245
  msgstr "Week/Day view ends at"
246
 
247
+ #: app/model/settings.php:536
248
  msgid "<strong>Word-wrap event stubs</strong> in Month view"
249
  msgstr "<strong>Word-wrap event stubs</strong> in Month view"
250
 
251
+ #: app/model/settings.php:539
252
  msgid "Only applies to events that span a single day."
253
  msgstr "Only applies to events that span a single day."
254
 
255
+ #: app/model/settings.php:551
256
  msgid ""
257
  "In <span class=\"ai1ec-tooltip-toggle\"\n"
258
  "\t\t\t\t\t\tdata-original-title=\"These include Agenda view,\n"
266
  "\t\t\t\t\t\tAgenda-like views</span>, <strong>include all events\n"
267
  "\t\t\t\t\t\tfrom last day shown</strong>"
268
 
269
+ #: app/model/settings.php:567
270
  msgid "Keep all events <strong>expanded</strong> in Agenda view"
271
  msgstr "Keep all events <strong>expanded</strong> in Agenda view"
272
 
273
+ #: app/model/settings.php:579
274
  msgid "<strong>Show year</strong> in calendar date labels"
275
  msgstr "<strong>Show year</strong> in calendar date labels"
276
 
277
+ #: app/model/settings.php:591
278
  msgid "<strong>Show location in event titles</strong> in calendar views"
279
  msgstr "<strong>Show location in event titles</strong> in calendar views"
280
 
281
+ #: app/model/settings.php:603
282
  msgid "<strong>Exclude</strong> events from search results"
283
  msgstr "<strong>Exclude</strong> events from search results"
284
 
285
+ #: app/model/settings.php:615
286
  msgid ""
287
  "Hide <strong>Subscribe</strong>/<strong>Add to Calendar</strong> buttons in "
288
  "calendar and single event views "
290
  "Hide <strong>Subscribe</strong>/<strong>Add to Calendar</strong> buttons in "
291
  "calendar and single event views "
292
 
293
+ #: app/model/settings.php:627
294
+ msgid "Hide <strong>Get a Timely Calendar</strong> button"
295
+ msgstr "Hide <strong>Get a Timely Calendar</strong> button"
296
+
297
+ #: app/model/settings.php:639
298
  msgid " Hide <strong>Google Maps</strong> until clicked"
299
  msgstr " Hide <strong>Google Maps</strong> until clicked"
300
 
301
+ #: app/model/settings.php:651
302
  msgid ""
303
  " <strong>Affix filter menu</strong> to top of window when it scrolls out of "
304
  "view"
306
  " <strong>Affix filter menu</strong> to top of window when it scrolls out of "
307
  "view"
308
 
309
+ #: app/model/settings.php:654
310
  msgid "Only applies to first visible calendar found on the page."
311
  msgstr "Only applies to first visible calendar found on the page."
312
 
313
+ #: app/model/settings.php:666
314
  msgid "Offset affixed filter bar vertically by"
315
  msgstr "Offset affixed filter bar vertically by"
316
 
317
+ #: app/model/settings.php:681
318
  msgid "Wide screens only (&#8805; 1200px)"
319
  msgstr "Wide screens only (&#8805; 1200px)"
320
 
321
+ #: app/model/settings.php:696
322
  msgid "Tablets only (< 980px)"
323
  msgstr "Tablets only (< 980px)"
324
 
325
+ #: app/model/settings.php:711
326
  msgid "Phones only (< 768px)"
327
  msgstr "Phones only (< 768px)"
328
 
329
+ #: app/model/settings.php:724
330
  msgid "Strict compatibility content filtering"
331
  msgstr "Strict compatibility content filtering"
332
 
333
+ #: app/model/settings.php:736
334
  msgid " <strong>Hide featured image</strong> from event details page"
335
  msgstr " <strong>Hide featured image</strong> from event details page"
336
 
337
+ #: app/model/settings.php:739
338
  msgid ""
339
  "Select this option if your theme already displays each post's featured image."
340
  msgstr ""
341
  "Select this option if your theme already displays each post's featured image."
342
 
343
+ #: app/model/settings.php:750
344
  msgid "Input dates in this format"
345
  msgstr "Input dates in this format"
346
 
347
+ #: app/model/settings.php:755
348
  msgid "Default (d/m/yyyy)"
349
  msgstr "Default (d/m/yyyy)"
350
 
351
+ #: app/model/settings.php:759
352
  msgid "US (m/d/yyyy)"
353
  msgstr "US (m/d/yyyy)"
354
 
355
+ #: app/model/settings.php:763
356
  msgid "ISO 8601 (yyyy-m-d)"
357
  msgstr "ISO 8601 (yyyy-m-d)"
358
 
359
+ #: app/model/settings.php:767
360
  msgid "Dotted (m.d.yyyy)"
361
  msgstr "Dotted (m.d.yyyy)"
362
 
363
+ #: app/model/settings.php:779
364
  msgid " Use <strong>24h time</strong> in time pickers"
365
  msgstr " Use <strong>24h time</strong> in time pickers"
366
 
367
+ #: app/model/settings.php:790
368
  msgid "<strong>Disable address autocomplete</strong> function"
369
  msgstr "<strong>Disable address autocomplete</strong> function"
370
 
371
+ #: app/model/settings.php:801
372
  msgid ""
373
  "Use the configured <strong>region</strong> (WordPress locale) to bias the "
374
  "address autocomplete function "
376
  "Use the configured <strong>region</strong> (WordPress locale) to bias the "
377
  "address autocomplete function "
378
 
379
+ #: app/model/settings.php:817
380
  msgid ""
381
  " Show the old <strong>Post Your Event</strong> button above the calendar to "
382
  "privileged users"
384
  " Show the old <strong>Post Your Event</strong> button above the calendar to "
385
  "privileged users"
386
 
387
+ #: app/model/settings.php:820
388
  msgid ""
389
  "Install the <a target=\"_blank\" href=\"http://time.ly/\">Interactive "
390
  "Frontend Extension</a> for the <strong>frontend Post Your Event form</"
394
  "Frontend Extension</a> for the <strong>frontend Post Your Event form</"
395
  "strong>."
396
 
397
+ #: app/model/settings.php:841
398
  msgid "Move calendar into this DOM element"
399
  msgstr "Move calendar into this DOM element"
400
 
401
+ #: app/model/settings.php:843
402
  msgid ""
403
  "Optional. Use this JavaScript-based shortcut to place the\n"
404
  "\t\t\t\t\t\tcalendar a DOM element other than the usual page content "
422
  "\t\t\t\t\t\tAny existing markup found within the target will be replaced\n"
423
  "\t\t\t\t\t\tby the calendar."
424
 
425
+ #: app/model/settings.php:862
426
  msgid ""
427
  "<strong>Skip <tt>in_the_loop()</tt> check </strong> that protects against "
428
  "multiple calendar output"
430
  "<strong>Skip <tt>in_the_loop()</tt> check </strong> that protects against "
431
  "multiple calendar output"
432
 
433
+ #: app/model/settings.php:865
434
  msgid ""
435
  "Try enabling this option if your calendar does not appear on the calendar "
436
  "page. It is needed for compatibility with a small number of themes that call "
440
  "page. It is needed for compatibility with a small number of themes that call "
441
  "<tt>the_content()</tt> from outside of The Loop. Leave disabled otherwise."
442
 
443
+ #: app/model/settings.php:877
444
  msgid "Disable <strong>gzip</strong> compression."
445
  msgstr "Disable <strong>gzip</strong> compression."
446
 
447
+ #: app/model/settings.php:880
448
  msgid ""
449
  "Use this option if calendar is unresponsive. <a href=\"http://support.time."
450
  "ly/disable-gzip-compression/\">Read more</a> about the issue. (From version "
454
  "ly/disable-gzip-compression/\">Read more</a> about the issue. (From version "
455
  "2.1 onwards, gzip is disabled by default for maximum compatibility.)"
456
 
457
+ #: app/model/settings.php:892
458
+ msgid "Use frontend rendering."
459
+ msgstr "Use frontend rendering."
460
+
461
+ #: app/model/settings.php:895
462
+ msgid ""
463
+ "Renders calendar views on the client rather than the server; can improve "
464
+ "performance."
465
+ msgstr ""
466
+ "Renders calendar views on the client rather than the server; can improve "
467
+ "performance."
468
+
469
+ #: app/model/settings.php:907
470
  msgid ""
471
  "<strong>Link CSS</strong> in <code>&lt;head&gt;</code> section when file "
472
  "cache is unavailable."
474
  "<strong>Link CSS</strong> in <code>&lt;head&gt;</code> section when file "
475
  "cache is unavailable."
476
 
477
+ #: app/model/settings.php:910
478
  msgid ""
479
  "Use this option if file cache is unavailable and you would prefer to serve "
480
  "CSS as a link rather than have it output inline."
482
  "Use this option if file cache is unavailable and you would prefer to serve "
483
  "CSS as a link rather than have it output inline."
484
 
485
+ #: app/model/settings.php:922
486
  msgid "Current <strong>robots.txt</strong> on this site"
487
  msgstr "Current <strong>robots.txt</strong> on this site"
488
 
489
+ #: app/model/settings.php:926
490
  msgid ""
491
  "The Robot Exclusion Standard, also known as the Robots Exclusion Protocol "
492
  "or\n"
510
  "\t\t\t\t\t\tYou can change it manually by editing <code>robots.txt</code> in "
511
  "your root WordPress directory."
512
 
513
+ #: app/model/settings.php:943
514
  msgid ""
515
  "<strong>Publicize, promote, and share my events</strong> marked as public on "
516
  "the Timely network. (<a href=\"%s\" target=\"_blank\">Learn more &#187;</a>)"
518
  "<strong>Publicize, promote, and share my events</strong> marked as public on "
519
  "the Timely network. (<a href=\"%s\" target=\"_blank\">Learn more &#187;</a>)"
520
 
521
+ #: app/model/settings.php:966
522
  msgid "Templates cache improves site performance"
523
  msgstr "Templates cache improves site performance"
524
 
597
  msgid "Image"
598
  msgstr "Image"
599
 
600
+ #: app/view/admin/event-category.php:155
601
  msgid "Category Color"
602
  msgstr "Category Color"
603
 
604
+ #: app/view/admin/event-category.php:156
605
  msgid "Events in this category will be identified by this color"
606
  msgstr "Events in this category will be identified by this color"
607
 
608
+ #: app/view/admin/event-category.php:193 app/view/admin/event-category.php:225
609
  msgid "Category Image"
610
  msgstr "Category Image"
611
 
612
+ #: app/view/admin/event-category.php:194 app/view/admin/event-category.php:226
613
  msgid "Add Image"
614
  msgstr "Add Image"
615
 
616
+ #: app/view/admin/event-category.php:195
617
  msgid "Remove Image"
618
  msgstr "Remove Image"
619
 
620
+ #: app/view/admin/event-category.php:196 app/view/admin/event-category.php:227
621
  msgid ""
622
  "Assign an optional image to the category. Recommended size: square, minimum "
623
  "400&times;400 pixels."
625
  "Assign an optional image to the category. Recommended size: square, minimum "
626
  "400&times;400 pixels."
627
 
628
+ #: app/view/admin/get-repeat-box.php:65
629
  msgid "times"
630
  msgstr "times"
631
 
632
+ #: app/view/admin/get-repeat-box.php:131
633
  msgid "Recurrence rule cannot be empty."
634
  msgstr "Recurrence rule cannot be empty."
635
 
636
+ #: app/view/admin/get-repeat-box.php:149
637
  msgid "Recurrence rule was not provided."
638
  msgstr "Recurrence rule was not provided."
639
 
640
+ #: app/view/admin/get-repeat-box.php:176
641
  msgid "Never"
642
  msgstr "Never"
643
 
644
+ #: app/view/admin/get-repeat-box.php:177
645
  msgid "After"
646
  msgstr "After"
647
 
648
+ #: app/view/admin/get-repeat-box.php:178 public/admin/box_repeat.php:93
649
  msgid "On date"
650
  msgstr "On date"
651
 
652
+ #: app/view/admin/get-repeat-box.php:214
653
  msgid "day(s)"
654
  msgstr "day(s)"
655
 
656
+ #: app/view/admin/get-repeat-box.php:296
657
  msgid "week(s)"
658
  msgstr "week(s)"
659
 
660
+ #: app/view/admin/get-repeat-box.php:381 app/view/admin/get-repeat-box.php:448
661
+ #: lib/recurrence/rule.php:279
662
  msgid "last"
663
  msgstr "last"
664
 
665
+ #: app/view/admin/get-repeat-box.php:389
666
  msgid "month(s)"
667
  msgstr "month(s)"
668
 
669
+ #: app/view/admin/get-repeat-box.php:443
670
  msgid "first"
671
  msgstr "first"
672
 
673
+ #: app/view/admin/get-repeat-box.php:444
674
  msgid "second"
675
  msgstr "second"
676
 
677
+ #: app/view/admin/get-repeat-box.php:445
678
  msgid "third"
679
  msgstr "third"
680
 
681
+ #: app/view/admin/get-repeat-box.php:446
682
  msgid "fourth"
683
  msgstr "fourth"
684
 
685
+ #: app/view/admin/get-repeat-box.php:458
686
  msgid "Sunday"
687
  msgstr "Sunday"
688
 
689
+ #: app/view/admin/get-repeat-box.php:459
690
  msgid "Monday"
691
  msgstr "Monday"
692
 
693
+ #: app/view/admin/get-repeat-box.php:460
694
  msgid "Tuesday"
695
  msgstr "Tuesday"
696
 
697
+ #: app/view/admin/get-repeat-box.php:461
698
  msgid "Wednesday"
699
  msgstr "Wednesday"
700
 
701
+ #: app/view/admin/get-repeat-box.php:462
702
  msgid "Thursday"
703
  msgstr "Thursday"
704
 
705
+ #: app/view/admin/get-repeat-box.php:463
706
  msgid "Friday"
707
  msgstr "Friday"
708
 
709
+ #: app/view/admin/get-repeat-box.php:464
710
  msgid "Saturday"
711
  msgstr "Saturday"
712
 
713
+ #: app/view/admin/get-repeat-box.php:466
714
  msgid "day"
715
  msgstr "day"
716
 
717
+ #: app/view/admin/get-repeat-box.php:467
718
  msgid "weekday"
719
  msgstr "weekday"
720
 
721
+ #: app/view/admin/get-repeat-box.php:468
722
  msgid "weekend day"
723
  msgstr "weekend day"
724
 
725
+ #: app/view/admin/get-repeat-box.php:534
726
  msgid "year(s)"
727
  msgstr "year(s)"
728
 
730
  msgid "<a href=\"%s\">Settings</a>"
731
  msgstr "<a href=\"%s\">Settings</a>"
732
 
733
+ #: app/view/admin/organize.php:100
734
+ msgid "Organize Events"
735
+ msgstr "Organize Events"
736
+
737
  #: app/view/admin/settings.php:30
738
  msgid "All-in-One Event Calendar: Settings"
739
  msgstr "All-in-One Event Calendar: Settings"
740
 
741
+ #: app/view/admin/settings.php:68 app/view/admin/settings.php:69
742
  #: lib/date/timezone.php:366
743
  msgid "Settings"
744
  msgstr "Settings"
745
 
746
+ #: app/view/admin/settings.php:89
747
  msgctxt "meta box"
748
  msgid "General Settings"
749
  msgstr "General Settings"
750
 
751
+ #: app/view/admin/settings.php:98
752
  msgctxt "meta box"
753
  msgid "Timely"
754
  msgstr "Timely"
755
 
756
+ #: app/view/admin/settings.php:140
757
  msgid "Viewing Events"
758
  msgstr "Viewing Events"
759
 
760
+ #: app/view/admin/settings.php:143
761
  msgid "Adding/Editing Events"
762
  msgstr "Adding/Editing Events"
763
 
764
+ #: app/view/admin/settings.php:146
765
  msgid "Advanced"
766
  msgstr "Advanced"
767
 
768
+ #: app/view/admin/settings.php:148
769
  msgid "Advanced Settings"
770
  msgstr "Advanced Settings"
771
 
772
+ #: app/view/admin/settings.php:149
773
  msgid "Shortcodes"
774
  msgstr "Shortcodes"
775
 
776
+ #: app/view/admin/settings.php:150
777
  msgid "Email Templates"
778
  msgstr "Email Templates"
779
 
780
+ #: app/view/admin/settings.php:151
781
  msgid "External Services"
782
  msgstr "External Services"
783
 
784
+ #: app/view/admin/settings.php:152
785
  msgid "Cache Report"
786
  msgstr "Cache Report"
787
 
788
+ #: app/view/admin/settings.php:170
789
  #: public/admin/plugins/ics/display_feeds.php:24
790
  msgid "Save Settings"
791
  msgstr "Save Settings"
792
 
793
+ #: app/view/admin/settings.php:177
794
  msgid ""
795
  "If the form below is not working please follow <a href=\"%s\">this link</a>."
796
  msgstr ""
859
  msgid "Widget Creator"
860
  msgstr "Widget Creator"
861
 
862
+ #: app/view/admin/widget-creator.php:131
863
  msgid ""
864
+ "Use this tool to generate code snippets you can add to <strong>an external "
865
+ "website</strong> to embed new calendars and widgets."
866
  msgstr ""
867
+ "Use this tool to generate code snippets you can add to <strong>an external "
868
+ "website</strong> to embed new calendars and widgets."
869
 
870
  #: app/view/admin/widget-creator.php:132
871
+ msgid ""
872
+ "<h4>Attention!</h4><p>These widgets are designed to be embedded in "
873
+ "<strong>external sites only</strong> and may cause conflicts if used within "
874
+ "the same WordPress site.</p>"
875
+ msgstr ""
876
+ "<h4>Attention!</h4><p>These widgets are designed to be embedded in "
877
+ "<strong>external sites only</strong> and may cause conflicts if used within "
878
+ "the same WordPress site.</p>"
879
 
880
+ #: app/view/admin/widget-creator.php:134
881
+ msgid ""
882
+ "<p>Use <a href=\"%s\"><strong>Appearance</strong> &gt; <strong>Widgets</"
883
+ "strong></a> to add event widgets to your WordPress site as you would any "
884
+ "other widget, or use <a href=\"%s\" target=\"_blank\">shortcodes</a> to "
885
+ "embed the full calendar.</strong></p>"
886
+ msgstr ""
887
+ "<p>Use <a href=\"%s\"><strong>Appearance</strong> &gt; <strong>Widgets</"
888
+ "strong></a> to add event widgets to your WordPress site as you would any "
889
+ "other widget, or use <a href=\"%s\" target=\"_blank\">shortcodes</a> to "
890
+ "embed the full calendar.</strong></p>"
891
+
892
+ #: app/view/admin/widget-creator.php:140
893
  msgid "Paste this code onto your site:"
894
  msgstr "Paste this code onto your site:"
895
 
896
+ #: app/view/admin/widget-creator.php:141
897
  msgid ""
898
  "This code will update to reflect changes made to the settings. Changing "
899
  "settings will not affect previously embedded widgets."
901
  "This code will update to reflect changes made to the settings. Changing "
902
  "settings will not affect previously embedded widgets."
903
 
904
+ #: app/view/calendar/page.php:54
905
  msgid ""
906
  "There was an error loading calendar. Please contact site administrator and "
907
  "inform him to configure calendar views."
909
  "There was an error loading calendar. Please contact site administrator and "
910
  "inform him to configure calendar views."
911
 
912
+ #: app/view/calendar/page.php:75
913
  msgid ""
914
  "Calendar was unable to initialize %s view and has reverted to Agenda view. "
915
  "Please check if you have installed the latest versions of calendar add-ons."
917
  "Calendar was unable to initialize %s view and has reverted to Agenda view. "
918
  "Please check if you have installed the latest versions of calendar add-ons."
919
 
920
+ #: app/view/calendar/page.php:254
921
  msgid "Subscribe to filtered calendar"
922
  msgstr "Subscribe to filtered calendar"
923
 
924
+ #: app/view/calendar/page.php:255
925
  msgid "Subscribe"
926
  msgstr "Subscribe"
927
 
928
+ #: app/view/calendar/page.php:256 app/view/event/single.php:102
929
+ msgid "Get a Timely Calendar"
930
+ msgstr "Get a Timely Calendar"
931
 
932
+ #: app/view/calendar/subscribe-button.php:22
933
  msgid "Add to Timely Calendar"
934
  msgstr "Add to Timely Calendar"
935
 
936
+ #: app/view/calendar/subscribe-button.php:23
937
  msgid "Add to Google"
938
  msgstr "Add to Google"
939
 
940
+ #: app/view/calendar/subscribe-button.php:24
941
  msgid "Add to Outlook"
942
  msgstr "Add to Outlook"
943
 
944
+ #: app/view/calendar/subscribe-button.php:25
945
  msgid "Add to Apple Calendar"
946
  msgstr "Add to Apple Calendar"
947
 
948
+ #: app/view/calendar/subscribe-button.php:26
949
  msgid "Add to other calendar"
950
  msgstr "Add to other calendar"
951
 
952
+ #: app/view/calendar/subscribe-button.php:29
953
  msgid ""
954
  "Copy this URL for your own Timely calendar or click to add to your rich-text "
955
  "calendar"
957
  "Copy this URL for your own Timely calendar or click to add to your rich-text "
958
  "calendar"
959
 
960
+ #: app/view/calendar/subscribe-button.php:30
961
  msgid "Subscribe to this calendar in your Google Calendar"
962
  msgstr "Subscribe to this calendar in your Google Calendar"
963
 
964
+ #: app/view/calendar/subscribe-button.php:31
965
  msgid "Subscribe to this calendar in MS Outlook"
966
  msgstr "Subscribe to this calendar in MS Outlook"
967
 
968
+ #: app/view/calendar/subscribe-button.php:32
969
  msgid "Subscribe to this calendar in Apple Calendar/iCal"
970
  msgstr "Subscribe to this calendar in Apple Calendar/iCal"
971
 
972
+ #: app/view/calendar/subscribe-button.php:33
973
  msgid "Subscribe to this calendar in another plain-text calendar"
974
  msgstr "Subscribe to this calendar in another plain-text calendar"
975
 
977
  msgid "Clear category filter"
978
  msgstr "Clear category filter"
979
 
980
+ #: app/view/calendar/taxonomy.php:98 app/view/event/single.php:108
981
  #: lib/html/element/setting/tags-categories.php:47
982
  msgid "Categories"
983
  msgstr "Categories"
986
  msgid "Clear tag filter"
987
  msgstr "Clear tag filter"
988
 
989
+ #: app/view/calendar/taxonomy.php:100 app/view/event/single.php:109
990
  #: lib/html/element/setting/tags-categories.php:39
991
  msgid "Tags"
992
  msgstr "Tags"
993
 
994
+ #: app/view/calendar/view/agenda.php:119
995
  msgid "Collapse All"
996
  msgstr "Collapse All"
997
 
998
+ #: app/view/calendar/view/agenda.php:120
999
  msgid "Expand All"
1000
  msgstr "Expand All"
1001
 
1002
+ #: app/view/calendar/view/agenda.php:143
1003
  msgid "There are no upcoming events to display at this time."
1004
  msgstr "There are no upcoming events to display at this time."
1005
 
1006
+ #: app/view/calendar/view/agenda.php:144 app/view/calendar/widget.php:373
1007
  msgid "Edit"
1008
  msgstr "Edit"
1009
 
1010
+ #: app/view/calendar/view/agenda.php:145
1011
  msgid "Read more"
1012
  msgstr "Read more"
1013
 
1014
+ #: app/view/calendar/view/agenda.php:146
1015
  msgid "Categories:"
1016
  msgstr "Categories:"
1017
 
1018
+ #: app/view/calendar/view/agenda.php:147 lib/theme/list.php:320
1019
  #: public/admin/themes.php:29
1020
  msgid "Tags:"
1021
  msgstr "Tags:"
1022
 
1023
+ #: app/view/calendar/view/agenda.php:148 app/view/calendar/view/month.php:81
1024
+ #: app/view/calendar/view/oneday.php:100 app/view/calendar/view/week.php:112
1025
+ #: app/view/calendar/widget.php:374
1026
  msgid "@ %s"
1027
  msgstr "@ %s"
1028
 
1029
+ #: app/view/calendar/view/oneday.php:74 app/view/calendar/view/week.php:67
1030
  msgid "g a"
1031
  msgstr "g a"
1032
 
1033
+ #: app/view/calendar/view/oneday.php:97 app/view/calendar/view/week.php:109
1034
  msgid "Reveal full day"
1035
  msgstr "Reveal full day"
1036
 
1037
+ #: app/view/calendar/view/oneday.php:98 app/view/calendar/view/week.php:110
1038
  msgid "All-day"
1039
  msgstr "All-day"
1040
 
1041
+ #: app/view/calendar/view/oneday.php:99 app/view/calendar/view/week.php:111
1042
  msgid "Now:"
1043
  msgstr "Now:"
1044
 
1082
  msgid "Show the subscribe button in the widget"
1083
  msgstr "Show the subscribe button in the widget"
1084
 
1085
+ #: app/view/calendar/widget.php:370
1086
  msgid "There are no upcoming events."
1087
  msgstr "There are no upcoming events."
1088
 
1089
+ #: app/view/calendar/widget.php:371 app/view/event/time.php:132
1090
  msgid "all-day"
1091
  msgstr "all-day"
1092
 
1093
+ #: app/view/calendar/widget.php:372
1094
  msgid "View Calendar"
1095
  msgstr "View Calendar"
1096
 
1097
+ #: app/view/calendar/widget.php:375
1098
  msgid "Add"
1099
  msgstr "Add"
1100
 
1101
+ #: app/view/event/content.php:33 app/view/event/single.php:103
1102
  msgid "When:"
1103
  msgstr "When:"
1104
 
1105
+ #: app/view/event/content.php:34 app/view/event/single.php:104
1106
  msgid "Where:"
1107
  msgstr "Where:"
1108
 
1177
  msgid "Event was created in the %s time zone"
1178
  msgstr "Event was created in the %s time zone"
1179
 
1180
+ #: app/view/event/single.php:98
1181
  msgid "Add to Calendar"
1182
  msgstr "Add to Calendar"
1183
 
1184
+ #: app/view/event/single.php:105
1185
  msgid "Cost:"
1186
  msgstr "Cost:"
1187
 
1188
+ #: app/view/event/single.php:106
 
1189
  msgid "Contact:"
1190
  msgstr "Contact:"
1191
 
1192
+ #: app/view/event/single.php:107
1193
  msgid "Free"
1194
  msgstr "Free"
1195
 
1196
+ #: app/view/event/single.php:131
1197
  msgid "Edit this occurrence (%s)"
1198
  msgstr "Edit this occurrence (%s)"
1199
 
1200
+ #: app/view/event/single.php:146
1201
  msgid ""
1202
+ "This post was replicated from another site's <a href=\"%s\" title="
1203
+ "\"iCalendar feed\"><i class=\"ai1ec-fa ai1ec-fa-calendar\"></i> calendar "
1204
+ "feed</a>."
1205
  msgstr ""
1206
+ "This post was replicated from another site's <a href=\"%s\" title="
1207
+ "\"iCalendar feed\"><i class=\"ai1ec-fa ai1ec-fa-calendar\"></i> calendar "
1208
+ "feed</a>."
1209
 
1210
+ #: app/view/event/single.php:157
1211
+ msgid "View original"
1212
+ msgstr "View original"
1213
 
1214
+ #: app/view/event/taxonomy.php:113
1215
  msgid "Category image"
1216
  msgstr "Category image"
1217
 
1239
  msgid "Event website"
1240
  msgstr "Event website"
1241
 
1242
+ #: app/view/event/time.php:84 app/view/event/time.php:118
1243
  msgctxt "Event time separator"
1244
  msgid " @ "
1245
  msgstr " @ "
1246
 
1247
+ #: app/view/event/time.php:100
1248
  msgctxt "Event start/end separator"
1249
  msgid " – "
1250
  msgstr " – "
1251
 
1252
+ #: app/view/event/time.php:166
1253
  msgid ", and "
1254
  msgstr ", and "
1255
 
1256
+ #: cache/twig/0a/29/c1dadb694d38bbd3df612d552f2b3f8c013559207293814d0b2b4fa0d366.php:53
1257
+ #: public/admin/box_event_location.php:31
1258
+ msgid "Address:"
1259
+ msgstr "Address:"
1260
+
1261
+ #: cache/twig/0a/29/c1dadb694d38bbd3df612d552f2b3f8c013559207293814d0b2b4fa0d366.php:92
1262
+ msgid "Show Google Map"
1263
+ msgstr "Show Google Map"
1264
+
1265
+ #: cache/twig/0a/29/c1dadb694d38bbd3df612d552f2b3f8c013559207293814d0b2b4fa0d366.php:123
1266
+ msgid "Longitude"
1267
+ msgstr "Longitude"
1268
+
1269
+ #: cache/twig/0a/29/c1dadb694d38bbd3df612d552f2b3f8c013559207293814d0b2b4fa0d366.php:158
1270
+ msgid "Latitude"
1271
+ msgstr "Latitude"
1272
+
1273
+ #: cache/twig/0a/29/c1dadb694d38bbd3df612d552f2b3f8c013559207293814d0b2b4fa0d366.php:220
1274
+ msgid "Description:"
1275
+ msgstr "Description:"
1276
 
1277
+ #: cache/twig/0a/29/c1dadb694d38bbd3df612d552f2b3f8c013559207293814d0b2b4fa0d366.php:253
1278
+ #: public/admin/box_event_contact.php:17
1279
+ msgid "Contact name:"
1280
+ msgstr "Contact name:"
1281
+
1282
+ #: cache/twig/0a/29/c1dadb694d38bbd3df612d552f2b3f8c013559207293814d0b2b4fa0d366.php:287
1283
+ #: public/admin/box_event_contact.php:30
1284
+ msgid "Phone:"
1285
+ msgstr "Phone:"
1286
+
1287
+ #: cache/twig/0a/29/c1dadb694d38bbd3df612d552f2b3f8c013559207293814d0b2b4fa0d366.php:321
1288
+ msgid "Email:"
1289
+ msgstr "Email:"
1290
 
1291
+ #: cache/twig/0a/29/c1dadb694d38bbd3df612d552f2b3f8c013559207293814d0b2b4fa0d366.php:355
1292
+ msgid "External url:"
1293
+ msgstr "External url:"
1294
 
1295
+ #: cache/twig/0a/29/c1dadb694d38bbd3df612d552f2b3f8c013559207293814d0b2b4fa0d366.php:389
1296
  msgid "Seating capacity:"
1297
  msgstr "Seating capacity:"
1298
 
1299
+ #: cache/twig/0a/29/c1dadb694d38bbd3df612d552f2b3f8c013559207293814d0b2b4fa0d366.php:422
1300
+ msgid "Handicap Accessible:"
1301
+ msgstr "Handicap Accessible:"
1302
 
1303
+ #: cache/twig/0a/29/c1dadb694d38bbd3df612d552f2b3f8c013559207293814d0b2b4fa0d366.php:458
1304
  msgid "Parking:"
1305
  msgstr "Parking:"
1306
 
1307
+ #: cache/twig/4b/54/8023eee8659ad1836d2185aae4bf5e8f0ebe217bd262863e58fa4cf1da34.php:37
1308
+ msgid "Your email here"
1309
+ msgstr "Your email here"
1310
+
1311
+ #: cache/twig/64/6d/6348de0c3ef39b5536ab38eae718b16c67b3cdfe8a998663cdb1ea4c2d6c.php:24
1312
+ #: public/admin/agenda-widget-form.php:2
1313
+ msgid "Title:"
1314
+ msgstr "Title:"
1315
 
1316
+ #: cache/twig/78/3e/57d2212e2837aee7813ecc844f345947f68d3edb57d31388f926a75264db.php:27
1317
+ #: cache/twig/78/3e/57d2212e2837aee7813ecc844f345947f68d3edb57d31388f926a75264db.php:31
1318
+ msgid "Products"
1319
+ msgstr "Products"
1320
 
1321
  #: lib/calendar-feed/ics.php:38
1322
  msgid "ICS"
1356
  msgstr[0] "Imported %s event"
1357
  msgstr[1] "Imported %s events"
1358
 
1359
+ #: lib/calendar-feed/ics.php:205 lib/calendar-feed/ics.php:672
1360
  msgid "Invalid ICS feed ID"
1361
  msgstr "Invalid ICS feed ID"
1362
 
1363
+ #: lib/calendar-feed/ics.php:351
1364
  msgid "Categories (optional)"
1365
  msgstr "Categories (optional)"
1366
 
1367
+ #: lib/calendar-feed/ics.php:368
1368
  msgid ""
1369
  "Do you want to keep the events imported from the calendar or remove them?"
1370
  msgstr ""
1371
  "Do you want to keep the events imported from the calendar or remove them?"
1372
 
1373
+ #: lib/calendar-feed/ics.php:374
1374
  msgid "Removing ICS Feed"
1375
  msgstr "Removing ICS Feed"
1376
 
1377
+ #: lib/calendar-feed/ics.php:377
1378
  msgid "Keep Events"
1379
  msgstr "Keep Events"
1380
 
1381
+ #: lib/calendar-feed/ics.php:380
1382
  msgid "Remove Events"
1383
  msgstr "Remove Events"
1384
 
1385
+ #: lib/calendar-feed/ics.php:664
1386
  msgid "Deleted %d events"
1387
  msgstr "Deleted %d events"
1388
 
1389
+ #: lib/calendar-feed/ics.php:699
1390
  msgid "Feed deleted"
1391
  msgstr "Feed deleted"
1392
 
1393
+ #: lib/captcha/provider/nocaptcha.php:31
1394
+ msgid "noCAPTCHA public key:"
1395
+ msgstr "noCAPTCHA public key:"
1396
+
1397
+ #: lib/captcha/provider/nocaptcha.php:47
1398
+ msgid "noCAPTCHA private key:"
1399
+ msgstr "noCAPTCHA private key:"
1400
+
1401
+ #: lib/captcha/provider/nocaptcha.php:86
1402
+ #: lib/captcha/provider/recaptcha.php:108
1403
+ msgid "Please try verifying you are human again."
1404
+ msgstr "Please try verifying you are human again."
1405
+
1406
+ #: lib/captcha/provider/nocaptcha.php:92 lib/captcha/provider/recaptcha.php:93
1407
  msgid ""
1408
+ "There was an error reading the human verification data. Please try again."
1409
  msgstr ""
1410
+ "There was an error reading the human verification data. Please try again."
1411
+
1412
+ #: lib/captcha/provider/recaptcha.php:32
1413
+ msgid "reCAPTCHA public key:"
1414
+ msgstr "reCAPTCHA public key:"
1415
+
1416
+ #: lib/captcha/provider/recaptcha.php:48
1417
+ msgid "reCAPTCHA private key:"
1418
+ msgstr "reCAPTCHA private key:"
1419
+
1420
+ #: lib/captcha/provider/recaptcha.php:66
1421
+ msgid "Human verification"
1422
+ msgstr "Human verification"
1423
 
1424
+ #: lib/captcha/provider/recaptcha.php:67
1425
+ msgid "Loading reCAPTCHA..."
1426
+ msgstr "Loading reCAPTCHA..."
1427
 
1428
  #: lib/clone/renderer-helper.php:26 lib/clone/renderer-helper.php:27
1429
  #: lib/clone/renderer-helper.php:45
1442
  msgid "Clone to Draft"
1443
  msgstr "Clone to Draft"
1444
 
1445
+ #: lib/command/clone.php:173
1446
  msgid ""
1447
  "<p>The event <strong>%s</strong> was cloned succesfully. <a href=\"%s\">Edit "
1448
  "cloned event</a></p>"
1450
  "<p>The event <strong>%s</strong> was cloned succesfully. <a href=\"%s\">Edit "
1451
  "cloned event</a></p>"
1452
 
1453
+ #: lib/compatibility/check.php:63
1454
+ msgid ""
1455
+ "You have turned on Frontend Rendering and you are using a custom calendar "
1456
+ "theme. If your theme does not support Frontend Rendering, your calendar may "
1457
+ "not work correctly."
1458
+ msgstr ""
1459
+ "You have turned on Frontend Rendering and you are using a custom calendar "
1460
+ "theme. If your theme does not support Frontend Rendering, your calendar may "
1461
+ "not work correctly."
1462
+
1463
+ #: lib/css/frontend.php:239
1464
  msgid ""
1465
  "CSS compilation failed because you don't have enough free memory (a minimum "
1466
  "of %s is needed). Your calendar will not render or function properly without "
1474
  "started/pre-sale-questions/\">this article</a> to learn how to increase your "
1475
  "PHP memory limit."
1476
 
1477
+ #: lib/css/frontend.php:266
1478
  msgid ""
1479
  "The LESS file compiled correctly but there was an error while saving the "
1480
  "generated CSS to persistence."
1482
  "The LESS file compiled correctly but there was an error while saving the "
1483
  "generated CSS to persistence."
1484
 
1485
+ #: lib/css/frontend.php:272
1486
  msgid ""
1487
  "<p><strong>There was an error while compiling CSS.</strong> The message "
1488
  "returned was: <em>%s</em></p>"
1490
  "<p><strong>There was an error while compiling CSS.</strong> The message "
1491
  "returned was: <em>%s</em></p>"
1492
 
1493
+ #: lib/css/frontend.php:300
1494
  msgid ""
1495
  "Theme options were successfully reset to their default values. <a "
1496
  "href='%s'>Visit site</a>"
1498
  "Theme options were successfully reset to their default values. <a "
1499
  "href='%s'>Visit site</a>"
1500
 
1501
+ #: lib/css/frontend.php:307
1502
  msgid "Theme options were updated successfully. <a href='%s'>Visit site</a>"
1503
  msgstr "Theme options were updated successfully. <a href='%s'>Visit site</a>"
1504
 
1505
+ #: lib/css/frontend.php:343
1506
  msgid ""
1507
  "Your CSS is being compiled on every request, which causes your calendar to "
1508
  "perform slowly. The following error occurred: %s"
1528
  msgid "Error encountered: %s"
1529
  msgstr "Error encountered: %s"
1530
 
1531
+ #: lib/date/system.php:176
1532
  msgid "GMT%+d:%02d"
1533
  msgstr "GMT%+d:%02d"
1534
 
1556
  msgid "Choose your timezone"
1557
  msgstr "Choose your timezone"
1558
 
1559
+ #: lib/environment/check.php:55
1560
  msgid "Select an option in the <strong>Calendar page</strong> dropdown list."
1561
  msgstr "Select an option in the <strong>Calendar page</strong> dropdown list."
1562
 
1563
+ #: lib/environment/check.php:68
1564
  msgid ""
1565
  "The plugin is installed, but has not been configured. <a href=\"%s\">Click "
1566
  "here to set it up now &raquo;</a>"
1568
  "The plugin is installed, but has not been configured. <a href=\"%s\">Click "
1569
  "here to set it up now &raquo;</a>"
1570
 
1571
+ #: lib/environment/check.php:78
1572
  msgid ""
1573
  "The plugin is installed, but has not been configured. Please log in as an "
1574
  "Administrator to set it up."
1576
  "The plugin is installed, but has not been configured. Please log in as an "
1577
  "Administrator to set it up."
1578
 
1579
+ #: lib/environment/check.php:196
1580
+ msgid ""
1581
+ "The add-on <strong>%s</strong> must be updated to at least version %s to "
1582
+ "maintain compatibility with the core calendar."
1583
+ msgstr ""
1584
+ "The add-on <strong>%s</strong> must be updated to at least version %s to "
1585
+ "maintain compatibility with the core calendar."
1586
+
1587
+ #: lib/environment/check.php:197
1588
+ msgid ""
1589
+ "If you do not see update notices below, ensure you have properly <a href="
1590
+ "\"https://time.ly/document/user-guide/getting-started/license-keys/\" target="
1591
+ "\"_blank\">entered your licence keys</a>. Alternatively, navigate to <a href="
1592
+ "\"https://time.ly/your-account/\">your account</a> to download the latest "
1593
+ "version of the add-on(s) and <a href=\"http://time.ly/document/user-guide/"
1594
+ "troubleshooting/perform-manual-upgrade/\">update manually</a>. Please <a "
1595
+ "href=\"https://time.ly/forums/\">post in the forum</a> if you have trouble. "
1596
+ "We are happy to help."
1597
+ msgstr ""
1598
+ "If you do not see update notices below, ensure you have properly <a href="
1599
+ "\"https://time.ly/document/user-guide/getting-started/license-keys/\" target="
1600
+ "\"_blank\">entered your licence keys</a>. Alternatively, navigate to <a href="
1601
+ "\"https://time.ly/your-account/\">your account</a> to download the latest "
1602
+ "version of the add-on(s) and <a href=\"http://time.ly/document/user-guide/"
1603
+ "troubleshooting/perform-manual-upgrade/\">update manually</a>. Please <a "
1604
+ "href=\"https://time.ly/forums/\">post in the forum</a> if you have trouble. "
1605
+ "We are happy to help."
1606
 
1607
  #: lib/exception/handler.php:176
1608
+ msgid "The add-on \"%s\" has been disabled due to an error:"
1609
+ msgstr "The add-on \"%s\" has been disabled due to an error:"
1610
 
1611
+ #: lib/exception/handler.php:395
1612
+ msgid "All-in-One Event Calendar has been disabled due to an error:"
1613
+ msgstr "All-in-One Event Calendar has been disabled due to an error:"
1614
 
1615
+ #: lib/exception/handler.php:404
1616
+ msgid "Try reactivating plugin"
1617
+ msgstr "Try reactivating plugin"
1618
+
1619
+ #: lib/exception/handler.php:576
1620
+ msgid "Toggle error details"
1621
+ msgstr "Toggle error details"
1622
+
1623
+ #: lib/exception/handler.php:577
1624
+ msgid "Error Details:"
1625
+ msgstr "Error Details:"
1626
 
1627
  #: lib/factory/html.php:128
1628
  msgid "Choose a date using calendar"
1822
  msgid "Length"
1823
  msgstr "Length"
1824
 
1825
+ #: lib/notification/admin.php:180 public/admin/box_profile_timezone.php:2
1826
  msgid "All-in-One Event Calendar"
1827
  msgstr "All-in-One Event Calendar"
1828
 
1829
+ #: lib/notification/admin.php:182
1830
+ msgid "Got it – dismiss this"
1831
+ msgstr "Got it – dismiss this"
1832
+
1833
  #: lib/post/custom-type.php:26
1834
  msgctxt "Custom post type name"
1835
  msgid "Events"
1882
 
1883
  #: lib/post/custom-type.php:85
1884
  msgctxt "Event categories taxonomy"
1885
+ msgid "Categories"
1886
+ msgstr "Categories"
1887
 
1888
  #: lib/post/custom-type.php:86
1889
  msgctxt "Event categories taxonomy (singular)"
1890
+ msgid "Category"
1891
+ msgstr "Category"
1892
 
1893
+ #: lib/post/custom-type.php:87
1894
+ msgctxt "Event categories menu item"
1895
+ msgid "Organize"
1896
+ msgstr "Organize"
1897
 
1898
  #: lib/post/custom-type.php:94
1899
+ msgctxt "Event tags taxonomy"
1900
+ msgid "Tags"
1901
+ msgstr "Tags"
1902
+
1903
+ #: lib/post/custom-type.php:95
1904
  msgctxt "Event tags taxonomy (singular)"
1905
+ msgid "Tag"
1906
+ msgstr "Tag"
1907
 
1908
+ #: lib/post/custom-type.php:102
1909
  msgctxt "Event feeds taxonomy"
1910
  msgid "Event Feeds"
1911
  msgstr "Event Feeds"
1912
 
1913
+ #: lib/post/custom-type.php:103
1914
  msgctxt "Event feed taxonomy (singular)"
1915
  msgid "Event Feed"
1916
  msgstr "Event Feed"
1917
 
1918
+ #: lib/post/custom-type.php:279
1919
  msgid ""
1920
  "All Events <span class=\"update-plugins count-%d\" title=\"%d Pending Events"
1921
  "\"><span class=\"update-count\">%d</span></span>"
1923
  "All Events <span class=\"update-plugins count-%d\" title=\"%d Pending Events"
1924
  "\"><span class=\"update-count\">%d</span></span>"
1925
 
1926
+ #: lib/post/custom-type.php:290
1927
  msgid "All Events"
1928
  msgstr "All Events"
1929
 
1930
+ #: lib/recurrence/rule.php:225 lib/recurrence/rule.php:234
1931
+ #: lib/recurrence/rule.php:242
1932
  msgctxt "Recurrence editor - weekly tab"
1933
  msgid "on"
1934
  msgstr "on"
1935
 
1936
+ #: lib/recurrence/rule.php:230 lib/recurrence/rule.php:259
1937
+ #: lib/recurrence/rule.php:307
1938
  msgid "and"
1939
  msgstr "and"
1940
 
1941
+ #: lib/recurrence/rule.php:255 lib/recurrence/rule.php:262
1942
+ #: lib/recurrence/rule.php:268 lib/recurrence/rule.php:289
1943
  msgctxt "Recurrence editor - monthly tab"
1944
  msgid "on"
1945
  msgstr "on"
1946
 
1947
+ #: lib/recurrence/rule.php:255 lib/recurrence/rule.php:262
1948
+ #: lib/recurrence/rule.php:268
1949
  msgid "of the month"
1950
  msgstr "of the month"
1951
 
1952
+ #: lib/recurrence/rule.php:302 lib/recurrence/rule.php:310
1953
+ #: lib/recurrence/rule.php:317
1954
  msgctxt "Recurrence editor - yearly tab"
1955
  msgid "on"
1956
  msgstr "on"
1957
 
1958
+ #: lib/recurrence/rule.php:357 public/admin/box_repeat.php:16
1959
  #: public/admin/cron_freq.php:9
1960
  msgid "Daily"
1961
  msgstr "Daily"
1962
 
1963
+ #: lib/recurrence/rule.php:360
1964
  msgid "Every other day"
1965
  msgstr "Every other day"
1966
 
1967
+ #: lib/recurrence/rule.php:363
1968
  msgid "Every %d days"
1969
  msgstr "Every %d days"
1970
 
1971
+ #: lib/recurrence/rule.php:372 public/admin/box_repeat.php:21
1972
  msgid "Weekly"
1973
  msgstr "Weekly"
1974
 
1975
+ #: lib/recurrence/rule.php:375
1976
  msgid "Every other week"
1977
  msgstr "Every other week"
1978
 
1979
+ #: lib/recurrence/rule.php:378
1980
  msgid "Every %d weeks"
1981
  msgstr "Every %d weeks"
1982
 
1983
+ #: lib/recurrence/rule.php:387 public/admin/box_repeat.php:26
1984
  msgid "Monthly"
1985
  msgstr "Monthly"
1986
 
1987
+ #: lib/recurrence/rule.php:390
1988
  msgid "Every other month"
1989
  msgstr "Every other month"
1990
 
1991
+ #: lib/recurrence/rule.php:393
1992
  msgid "Every %d months"
1993
  msgstr "Every %d months"
1994
 
1995
+ #: lib/recurrence/rule.php:402 public/admin/box_repeat.php:31
1996
  msgid "Yearly"
1997
  msgstr "Yearly"
1998
 
1999
+ #: lib/recurrence/rule.php:405
2000
  msgid "Every other year"
2001
  msgstr "Every other year"
2002
 
2003
+ #: lib/recurrence/rule.php:408
2004
  msgid "Every %d years"
2005
  msgstr "Every %d years"
2006
 
2007
+ #: lib/recurrence/rule.php:446
2008
  msgid "until %s"
2009
  msgstr "until %s"
2010
 
2011
+ #: lib/recurrence/rule.php:456
2012
  msgid "for %d occurrences"
2013
  msgstr "for %d occurrences"
2014
 
2015
+ #: lib/recurrence/rule.php:460
2016
  msgid "forever"
2017
  msgstr "forever"
2018
 
2068
  "Only the active theme is available to you. Contact the <em>%s</em> "
2069
  "administrator to add more themes."
2070
 
2071
+ #: lib/theme/list.php:257
2072
  msgid "Activate &#8220;%s&#8221;"
2073
  msgstr "Activate &#8220;%s&#8221;"
2074
 
2075
+ #: lib/theme/list.php:264
2076
  msgid "Activate"
2077
  msgstr "Activate"
2078
 
2079
  #. translators: 1: theme title, 2: theme version, 3: theme author
2080
+ #: lib/theme/list.php:281 public/admin/themes.php:25
2081
  msgid "%1$s %2$s by %3$s"
2082
  msgstr "%1$s %2$s by %3$s"
2083
 
2084
  #. translators: 1: theme title, 2: template dir, 3: stylesheet_dir, 4: theme
2085
  #. title, 5: parent_theme
2086
+ #: lib/theme/list.php:293
2087
  msgid ""
2088
  "The template files are located in <code>%2$s</code>. The stylesheet files "
2089
  "are located in <code>%3$s</code>. <strong>%4$s</strong> uses templates from "
2093
  "are located in <code>%3$s</code>. <strong>%4$s</strong> uses templates from "
2094
  "<strong>%5$s</strong>. Changes made to the templates will affect both themes."
2095
 
2096
+ #: lib/theme/list.php:308
2097
  msgid "All of this theme&#8217;s files are located in <code>%2$s</code>."
2098
  msgstr "All of this theme&#8217;s files are located in <code>%2$s</code>."
2099
 
2100
+ #: lib/theme/loader.php:323
2101
  msgid "We couldn't find a suitable loader for filename with extension '%s'"
2102
  msgstr "We couldn't find a suitable loader for filename with extension '%s'"
2103
 
2104
+ #: lib/theme/loader.php:629
2105
+ msgid ""
2106
+ "Your calendar theme has been switched to Vortex due to a rendering problem. "
2107
+ "For more information, please enable debug mode by adding this line to your "
2108
+ "WordPress <code>wp-config.php</code> file:<pre>define( 'AI1EC_DEBUG', true );"
2109
+ "</pre>"
2110
+ msgstr ""
2111
+ "Your calendar theme has been switched to Vortex due to a rendering problem. "
2112
+ "For more information, please enable debug mode by adding this line to your "
2113
+ "WordPress <code>wp-config.php</code> file:<pre>define( 'AI1EC_DEBUG', true );"
2114
+ "</pre>"
2115
+
2116
  #: lib/theme/search.php:253
2117
  msgid ""
2118
  "Unable to move your old core themes from <code>wp-content/themes-ai1ec</"
2135
  "code> to <code>wp-content/themes-ai1ec-obsolete/%s</code>. Please manually "
2136
  "remove your old core themes from <code>wp-content/themes-ai1ec/%s</code>."
2137
 
2138
+ #: lib/twig/environment.php:115
2139
  msgid ""
2140
+ "The calendar is temporarily disabled due to a rendering error. Please <a "
2141
+ "href=\"javascript:location.reload();\">reload the page</a>."
 
2142
  msgstr ""
2143
+ "The calendar is temporarily disabled due to a rendering error. Please <a "
2144
+ "href=\"javascript:location.reload();\">reload the page</a>."
 
 
 
 
 
2145
 
2146
  #: public/admin/agenda-widget-form.php:12
2147
  msgid "Number of events to show:"
2207
  msgid "Organizer contact info"
2208
  msgstr "Organizer contact info"
2209
 
 
 
 
 
 
 
 
 
2210
  #: public/admin/box_event_contact.php:43
2211
  msgid "E-mail:"
2212
  msgstr "E-mail:"
2239
  msgid "Event location details"
2240
  msgstr "Event location details"
2241
 
2242
+ #: public/admin/box_event_location.php:19
2243
  msgid "Venue name:"
2244
  msgstr "Venue name:"
2245
 
2246
+ #: public/admin/box_event_location.php:45
 
 
 
 
 
 
 
 
2247
  msgid "Input Coordinates"
2248
  msgstr "Input Coordinates"
2249
 
2250
+ #: public/admin/box_event_location.php:57
2251
+ msgid "Latitude:"
2252
+ msgstr "Latitude:"
2253
+
2254
  #: public/admin/box_event_location.php:69
2255
  msgid "Longitude:"
2256
  msgstr "Longitude:"
2257
 
2258
+ #: public/admin/box_event_location.php:85
2259
+ msgid "Show Map"
2260
+ msgstr "Show Map"
2261
 
2262
  #: public/admin/box_eventbrite.php:1
2263
  msgid "Eventbrite Ticketing"
2269
 
2270
  #: public/admin/box_eventbrite.php:12 public/admin/feed_row.php:28
2271
  #: public/admin/feed_row.php:38 public/admin/feed_row.php:49
2272
+ #: public/admin/feed_row.php:59 public/admin/feed_row.php:71
2273
  msgid "Yes"
2274
  msgstr "Yes"
2275
 
2276
  #: public/admin/box_eventbrite.php:14 public/admin/feed_row.php:30
2277
  #: public/admin/feed_row.php:40 public/admin/feed_row.php:51
2278
+ #: public/admin/feed_row.php:61 public/admin/feed_row.php:73
2279
  msgid "No"
2280
  msgstr "No"
2281
 
2359
  msgid "Send an Invoice"
2360
  msgstr "Send an Invoice"
2361
 
 
 
 
 
2362
  #: public/admin/box_profile_timezone.php:9
2363
  msgid "Your preferred timezone"
2364
  msgstr "Your preferred timezone"
2367
  msgid "Select recurrence pattern:"
2368
  msgstr "Select recurrence pattern:"
2369
 
2370
+ #: public/admin/box_repeat.php:36
2371
+ msgid "Custom"
2372
+ msgstr "Custom"
2373
+
2374
+ #: public/admin/box_repeat.php:72
2375
  msgid "End"
2376
  msgstr "End"
2377
 
2378
+ #: public/admin/box_repeat.php:82
2379
  msgid "Ending after"
2380
  msgstr "Ending after"
2381
 
2382
+ #: public/admin/box_repeat.php:109
2383
+ #: public/admin/plugins/ics/display_feeds.php:89
2384
  msgid "Please wait&#8230;"
2385
  msgstr "Please wait&#8230;"
2386
 
2387
+ #: public/admin/box_repeat.php:111
2388
  msgid "Apply"
2389
  msgstr "Apply"
2390
 
2391
+ #: public/admin/box_repeat.php:116
2392
  msgid "Cancel"
2393
  msgstr "Cancel"
2394
 
2468
  msgid "Choose a rule for exclusion"
2469
  msgstr "Choose a rule for exclusion"
2470
 
 
 
 
 
 
 
 
 
 
 
 
 
2471
  #: public/admin/calendar_tasks.php:3
2472
  msgid "Welcome"
2473
  msgstr "Welcome"
2561
  msgstr "Keep original events categories and tags"
2562
 
2563
  #: public/admin/feed_row.php:56 public/admin/plugins/ics/display_feeds.php:72
2564
+ msgid ""
2565
+ "On refresh, preserve previously imported events that are missing from the "
2566
+ "feed"
2567
+ msgstr ""
2568
+ "On refresh, preserve previously imported events that are missing from the "
2569
+ "feed"
2570
+
2571
+ #: public/admin/feed_row.php:66 public/admin/plugins/ics/display_feeds.php:79
2572
+ msgid ""
2573
+ "Guesses the time zone of events that have none specified; recommended for "
2574
+ "Google Calendar feeds"
2575
+ msgstr ""
2576
+ "Guesses the time zone of events that have none specified; recommended for "
2577
+ "Google Calendar feeds"
2578
 
2579
+ #: public/admin/feed_row.php:67 public/admin/plugins/ics/display_feeds.php:80
2580
+ msgid "Assign default time zone to events in UTC"
2581
+ msgstr "Assign default time zone to events in UTC"
2582
+
2583
+ #: public/admin/feed_row.php:83
2584
  msgid "Refreshing&#8230;"
2585
  msgstr "Refreshing&#8230;"
2586
 
2587
+ #: public/admin/feed_row.php:85
2588
  msgid "Refresh"
2589
  msgstr "Refresh"
2590
 
2591
+ #: public/admin/feed_row.php:92
2592
  msgid "Removing&#8230;"
2593
  msgstr "Removing&#8230;"
2594
 
2595
+ #: public/admin/feed_row.php:94
2596
  msgid "Remove"
2597
  msgstr "Remove"
2598
 
2630
  msgstr ""
2631
  "Import any tags/categories provided by feed, in addition those selected above"
2632
 
2633
+ #: public/admin/plugins/ics/display_feeds.php:91
2634
  msgid "Add new subscription"
2635
  msgstr "Add new subscription"
2636
 
2637
+ #: public/admin/row_custom.php:3
2638
+ msgid "Custom dates:"
2639
+ msgstr "Custom dates:"
2640
+
2641
  #: public/admin/row_daily.php:3 public/admin/row_monthly.php:3
2642
  #: public/admin/row_monthly.php:39 public/admin/row_weekly.php:3
2643
  #: public/admin/row_yearly.php:3
2670
  msgid "The active theme is broken. Reverting to the default theme."
2671
  msgstr "The active theme is broken. Reverting to the default theme."
2672
 
2673
+ #: public/admin/themes-install.php:13
2674
+ msgid ""
2675
+ "New theme activated. This theme supports widgets, please visit the <a href="
2676
+ "\"%s\">widgets settings</a> screen to configure them."
2677
+ msgstr ""
2678
+ "New theme activated. This theme supports widgets, please visit the <a href="
2679
+ "\"%s\">widgets settings</a> screen to configure them."
2680
+
2681
+ #: public/admin/themes-install.php:20 public/admin/themes.php:4
2682
  msgid "New theme activated. <a href=\"%s\">Visit site</a>"
2683
  msgstr "New theme activated. <a href=\"%s\">Visit site</a>"
2684
 
2685
+ #: public/admin/themes-install.php:26 public/admin/themes.php:10
2686
  msgid "Theme deleted."
2687
  msgstr "Theme deleted."
2688
 
2689
+ #: public/admin/themes-install.php:37 public/admin/themes-install.php:44
2690
  msgid "Manage Themes"
2691
  msgstr "Manage Themes"
2692
 
2693
+ #: public/admin/themes-install.php:40
2694
  msgctxt "theme"
2695
  msgid "Install Themes"
2696
  msgstr "Install Themes"
2934
  msgid "All-in-One Event Calendar by Time.ly"
2935
  msgstr "All-in-One Event Calendar by Time.ly"
2936
 
2937
+ #. #-#-#-#-# all-in-one-event-calendar.pot (All-in-One Event Calendar by Time.ly 2.2.0) #-#-#-#-#
2938
  #. Plugin URI of the plugin/theme
2939
+ #. #-#-#-#-# all-in-one-event-calendar.pot (All-in-One Event Calendar by Time.ly 2.2.0) #-#-#-#-#
2940
  #. Author URI of the plugin/theme
2941
  msgid "http://time.ly/"
2942
  msgstr "http://time.ly/"
language/all-in-one-event-calendar.pot CHANGED
@@ -1,14 +1,14 @@
1
- # Copyright (C) 2014 All-in-One Event Calendar by Time.ly
2
  # This file is distributed under the same license as the All-in-One Event Calendar by Time.ly package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: All-in-One Event Calendar by Time.ly 2.1.9\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/all-in-one-event-calendar\n"
7
- "POT-Creation-Date: 2014-12-04 17:02:36+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
- "PO-Revision-Date: 2014-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
@@ -25,122 +25,123 @@ msgstr ""
25
  msgid "Licences"
26
  msgstr ""
27
 
28
- #: app/controller/front.php:309
29
  msgid ""
30
  "Your active calendar theme could not be properly initialized. The default "
31
  "theme has been activated instead. Please visit %s and try reactivating your "
32
  "theme manually."
33
  msgstr ""
34
 
35
- #: app/controller/front.php:313 app/view/admin/theme-switching.php:54
36
  #: app/view/admin/theme-switching.php:55
37
  msgid "Calendar Themes"
38
  msgstr ""
39
 
40
- #: app/controller/front.php:890
41
  msgid ""
42
  "Your database is found to be corrupt. Likely previous update has failed. "
43
  "Please restore All-in-One Event Calendar tables from a backup and retry."
44
  "<br>Following errors were found:<br>%s"
45
  msgstr ""
46
 
47
- #: app/controller/front.php:1046
48
- msgid ""
49
- "You may be using a legacy custom calendar theme. If you have problems "
50
- "viewing the calendar, please read <a href=\"https://time.ly/\">this article</"
51
- "a>."
52
- msgstr ""
53
-
54
- #: app/controller/javascript-widget.php:47
55
  msgid "You must choose the Calendar page before using the Super Widget"
56
  msgstr ""
57
 
58
- #: app/controller/javascript.php:390
59
  msgid "This feed is already being imported."
60
  msgstr ""
61
 
62
- #: app/controller/javascript.php:393
63
  msgid "Please enter a valid iCalendar URL."
64
  msgstr ""
65
 
66
- #: app/controller/javascript.php:396
67
  msgid "Please enter a valid email address."
68
  msgstr ""
69
 
70
- #: app/controller/javascript.php:398
71
  msgid "Choose Image"
72
  msgstr ""
73
 
74
- #: app/controller/javascript.php:401
75
  msgid "The value you have entered is not a valid CSS length."
76
  msgstr ""
77
 
78
- #: app/controller/javascript.php:404
79
  msgid ""
80
  "Are you sure you want to reset your theme options to their default values?"
81
  msgstr ""
82
 
83
- #: app/controller/javascript.php:407
84
  msgid ""
85
  "Please enter a valid latitude. A valid latitude is comprised between +90 and "
86
  "-90."
87
  msgstr ""
88
 
89
- #: app/controller/javascript.php:410
90
  msgid ""
91
  "Please enter a valid longitude. A valid longitude is comprised between +180 "
92
  "and -180."
93
  msgstr ""
94
 
95
- #: app/controller/javascript.php:413
96
  msgid ""
97
  "When the \"Input coordinates\" checkbox is checked, \"Latitude\" is a "
98
  "required field."
99
  msgstr ""
100
 
101
- #: app/controller/javascript.php:416
102
  msgid ""
103
  "When the \"Input coordinates\" checkbox is checked, \"Longitude\" is a "
104
  "required field."
105
  msgstr ""
106
 
107
- #: app/controller/javascript.php:419
108
  msgid ""
109
  "The URL you have entered in the <b>Organizer Contact Info</b> &gt; "
110
  "<b>External URL</b> seems to be invalid."
111
  msgstr ""
112
 
113
- #: app/controller/javascript.php:422
114
  msgid ""
115
  "The URL you have entered in the <b>Event Cost and Tickets</b> &gt; <b>Buy "
116
  "Tickets URL</b> seems to be invalid."
117
  msgstr ""
118
 
119
- #: app/controller/javascript.php:425
120
  msgid ""
121
  "Please remember that URLs must start with either \"http://\" or \"https://\"."
122
  msgstr ""
123
 
124
- #: app/controller/javascript.php:428
125
  msgid "Loading&hellip;"
126
  msgstr ""
127
 
128
- #: app/controller/javascript.php:458 app/view/admin/widget-creator.php:131
129
  msgid "Preview:"
130
  msgstr ""
131
 
132
- #: app/controller/javascript.php:459
133
  msgid ""
134
  "Loading preview&nbsp;<i class=\"ai1ec-fa ai1ec-fa-spin ai1ec-fa-spinner\"></"
135
  "i>"
136
  msgstr ""
137
 
138
- #: app/controller/javascript.php:463
139
  msgid ""
140
  "Something went wrong while fetching events.<br>The request status is: %STATUS"
141
  "% <br>The error thrown was: %ERROR%"
142
  msgstr ""
143
 
 
 
 
 
 
 
 
 
144
  #: app/model/event/parent.php:186
145
  msgid "Edit &#8220;%s&#8221;"
146
  msgstr ""
@@ -149,82 +150,82 @@ msgstr ""
149
  msgid "Base Event"
150
  msgstr ""
151
 
152
- #: app/model/settings.php:345
153
  #: lib/html/element/setting/calendar-page-selector.php:50
154
  msgid "Calendar page"
155
  msgstr ""
156
 
157
- #: app/model/settings.php:355
158
  msgid "Week starts on"
159
  msgstr ""
160
 
161
- #: app/model/settings.php:368
162
  msgid "Available views"
163
  msgstr ""
164
 
165
- #: app/model/settings.php:376
166
  msgid "Agenda"
167
  msgid_plural "Agenda"
168
  msgstr[0] ""
169
  msgstr[1] ""
170
 
171
- #: app/model/settings.php:387
172
  msgid "Day"
173
  msgid_plural "Day"
174
  msgstr[0] ""
175
  msgstr[1] ""
176
 
177
- #: app/model/settings.php:398
178
  msgid "Month"
179
  msgid_plural "Month"
180
  msgstr[0] ""
181
  msgstr[1] ""
182
 
183
- #: app/model/settings.php:409
184
  msgid "Week"
185
  msgid_plural "Week"
186
  msgstr[0] ""
187
  msgstr[1] ""
188
 
189
- #: app/model/settings.php:423
190
  msgid "Timezone"
191
  msgstr ""
192
 
193
- #: app/model/settings.php:436
194
  msgid "Preselected calendar filters"
195
  msgstr ""
196
 
197
- #: app/model/settings.php:437 app/view/calendar/widget.php:128
198
  msgid ""
199
  "To clear, hold &#8984;/<abbr class=\"initialism\">CTRL</abbr> and click "
200
  "selection."
201
  msgstr ""
202
 
203
- #: app/model/settings.php:452
204
  msgid "Default calendar start date (optional)"
205
  msgstr ""
206
 
207
- #: app/model/settings.php:463
208
  msgid "Agenda pages show at most"
209
  msgstr ""
210
 
211
- #: app/model/settings.php:476
212
  msgid "Week/Day view starts at"
213
  msgstr ""
214
 
215
- #: app/model/settings.php:489
216
  msgid "Week/Day view ends at"
217
  msgstr ""
218
 
219
- #: app/model/settings.php:502
220
  msgid "<strong>Word-wrap event stubs</strong> in Month view"
221
  msgstr ""
222
 
223
- #: app/model/settings.php:505
224
  msgid "Only applies to events that span a single day."
225
  msgstr ""
226
 
227
- #: app/model/settings.php:517
228
  msgid ""
229
  "In <span class=\"ai1ec-tooltip-toggle\"\n"
230
  "\t\t\t\t\t\tdata-original-title=\"These include Agenda view,\n"
@@ -233,123 +234,127 @@ msgid ""
233
  "\t\t\t\t\t\tfrom last day shown</strong>"
234
  msgstr ""
235
 
236
- #: app/model/settings.php:533
237
  msgid "Keep all events <strong>expanded</strong> in Agenda view"
238
  msgstr ""
239
 
240
- #: app/model/settings.php:545
241
  msgid "<strong>Show year</strong> in calendar date labels"
242
  msgstr ""
243
 
244
- #: app/model/settings.php:557
245
  msgid "<strong>Show location in event titles</strong> in calendar views"
246
  msgstr ""
247
 
248
- #: app/model/settings.php:569
249
  msgid "<strong>Exclude</strong> events from search results"
250
  msgstr ""
251
 
252
- #: app/model/settings.php:581
253
  msgid ""
254
  "Hide <strong>Subscribe</strong>/<strong>Add to Calendar</strong> buttons in "
255
  "calendar and single event views "
256
  msgstr ""
257
 
258
- #: app/model/settings.php:593
 
 
 
 
259
  msgid " Hide <strong>Google Maps</strong> until clicked"
260
  msgstr ""
261
 
262
- #: app/model/settings.php:605
263
  msgid ""
264
  " <strong>Affix filter menu</strong> to top of window when it scrolls out of "
265
  "view"
266
  msgstr ""
267
 
268
- #: app/model/settings.php:608
269
  msgid "Only applies to first visible calendar found on the page."
270
  msgstr ""
271
 
272
- #: app/model/settings.php:620
273
  msgid "Offset affixed filter bar vertically by"
274
  msgstr ""
275
 
276
- #: app/model/settings.php:635
277
  msgid "Wide screens only (&#8805; 1200px)"
278
  msgstr ""
279
 
280
- #: app/model/settings.php:650
281
  msgid "Tablets only (< 980px)"
282
  msgstr ""
283
 
284
- #: app/model/settings.php:665
285
  msgid "Phones only (< 768px)"
286
  msgstr ""
287
 
288
- #: app/model/settings.php:678
289
  msgid "Strict compatibility content filtering"
290
  msgstr ""
291
 
292
- #: app/model/settings.php:690
293
  msgid " <strong>Hide featured image</strong> from event details page"
294
  msgstr ""
295
 
296
- #: app/model/settings.php:693
297
  msgid ""
298
  "Select this option if your theme already displays each post's featured image."
299
  msgstr ""
300
 
301
- #: app/model/settings.php:704
302
  msgid "Input dates in this format"
303
  msgstr ""
304
 
305
- #: app/model/settings.php:709
306
  msgid "Default (d/m/yyyy)"
307
  msgstr ""
308
 
309
- #: app/model/settings.php:713
310
  msgid "US (m/d/yyyy)"
311
  msgstr ""
312
 
313
- #: app/model/settings.php:717
314
  msgid "ISO 8601 (yyyy-m-d)"
315
  msgstr ""
316
 
317
- #: app/model/settings.php:721
318
  msgid "Dotted (m.d.yyyy)"
319
  msgstr ""
320
 
321
- #: app/model/settings.php:733
322
  msgid " Use <strong>24h time</strong> in time pickers"
323
  msgstr ""
324
 
325
- #: app/model/settings.php:744
326
  msgid "<strong>Disable address autocomplete</strong> function"
327
  msgstr ""
328
 
329
- #: app/model/settings.php:755
330
  msgid ""
331
  "Use the configured <strong>region</strong> (WordPress locale) to bias the "
332
  "address autocomplete function "
333
  msgstr ""
334
 
335
- #: app/model/settings.php:771
336
  msgid ""
337
  " Show the old <strong>Post Your Event</strong> button above the calendar to "
338
  "privileged users"
339
  msgstr ""
340
 
341
- #: app/model/settings.php:774
342
  msgid ""
343
  "Install the <a target=\"_blank\" href=\"http://time.ly/\">Interactive "
344
  "Frontend Extension</a> for the <strong>frontend Post Your Event form</"
345
  "strong>."
346
  msgstr ""
347
 
348
- #: app/model/settings.php:795
349
  msgid "Move calendar into this DOM element"
350
  msgstr ""
351
 
352
- #: app/model/settings.php:797
353
  msgid ""
354
  "Optional. Use this JavaScript-based shortcut to place the\n"
355
  "\t\t\t\t\t\tcalendar a DOM element other than the usual page content "
@@ -363,47 +368,57 @@ msgid ""
363
  "\t\t\t\t\t\tby the calendar."
364
  msgstr ""
365
 
366
- #: app/model/settings.php:816
367
  msgid ""
368
  "<strong>Skip <tt>in_the_loop()</tt> check </strong> that protects against "
369
  "multiple calendar output"
370
  msgstr ""
371
 
372
- #: app/model/settings.php:819
373
  msgid ""
374
  "Try enabling this option if your calendar does not appear on the calendar "
375
  "page. It is needed for compatibility with a small number of themes that call "
376
  "<tt>the_content()</tt> from outside of The Loop. Leave disabled otherwise."
377
  msgstr ""
378
 
379
- #: app/model/settings.php:831
380
  msgid "Disable <strong>gzip</strong> compression."
381
  msgstr ""
382
 
383
- #: app/model/settings.php:834
384
  msgid ""
385
  "Use this option if calendar is unresponsive. <a href=\"http://support.time."
386
  "ly/disable-gzip-compression/\">Read more</a> about the issue. (From version "
387
  "2.1 onwards, gzip is disabled by default for maximum compatibility.)"
388
  msgstr ""
389
 
390
- #: app/model/settings.php:846
 
 
 
 
 
 
 
 
 
 
391
  msgid ""
392
  "<strong>Link CSS</strong> in <code>&lt;head&gt;</code> section when file "
393
  "cache is unavailable."
394
  msgstr ""
395
 
396
- #: app/model/settings.php:849
397
  msgid ""
398
  "Use this option if file cache is unavailable and you would prefer to serve "
399
  "CSS as a link rather than have it output inline."
400
  msgstr ""
401
 
402
- #: app/model/settings.php:861
403
  msgid "Current <strong>robots.txt</strong> on this site"
404
  msgstr ""
405
 
406
- #: app/model/settings.php:865
407
  msgid ""
408
  "The Robot Exclusion Standard, also known as the Robots Exclusion Protocol "
409
  "or\n"
@@ -417,13 +432,13 @@ msgid ""
417
  "your root WordPress directory."
418
  msgstr ""
419
 
420
- #: app/model/settings.php:882
421
  msgid ""
422
  "<strong>Publicize, promote, and share my events</strong> marked as public on "
423
  "the Timely network. (<a href=\"%s\" target=\"_blank\">Learn more &#187;</a>)"
424
  msgstr ""
425
 
426
- #: app/model/settings.php:905
427
  msgid "Templates cache improves site performance"
428
  msgstr ""
429
 
@@ -499,130 +514,130 @@ msgstr ""
499
  msgid "Image"
500
  msgstr ""
501
 
502
- #: app/view/admin/event-category.php:160 app/view/admin/event-category.php:214
503
  msgid "Category Color"
504
  msgstr ""
505
 
506
- #: app/view/admin/event-category.php:161 app/view/admin/event-category.php:216
507
  msgid "Events in this category will be identified by this color"
508
  msgstr ""
509
 
510
- #: app/view/admin/event-category.php:184 app/view/admin/event-category.php:235
511
  msgid "Category Image"
512
  msgstr ""
513
 
514
- #: app/view/admin/event-category.php:185 app/view/admin/event-category.php:236
515
  msgid "Add Image"
516
  msgstr ""
517
 
518
- #: app/view/admin/event-category.php:186 app/view/admin/event-category.php:215
519
  msgid "Remove Image"
520
  msgstr ""
521
 
522
- #: app/view/admin/event-category.php:187 app/view/admin/event-category.php:237
523
  msgid ""
524
  "Assign an optional image to the category. Recommended size: square, minimum "
525
  "400&times;400 pixels."
526
  msgstr ""
527
 
528
- #: app/view/admin/get-repeat-box.php:64
529
  msgid "times"
530
  msgstr ""
531
 
532
- #: app/view/admin/get-repeat-box.php:130
533
  msgid "Recurrence rule cannot be empty."
534
  msgstr ""
535
 
536
- #: app/view/admin/get-repeat-box.php:142
537
  msgid "Recurrence rule was not provided."
538
  msgstr ""
539
 
540
- #: app/view/admin/get-repeat-box.php:169
541
  msgid "Never"
542
  msgstr ""
543
 
544
- #: app/view/admin/get-repeat-box.php:170
545
  msgid "After"
546
  msgstr ""
547
 
548
- #: app/view/admin/get-repeat-box.php:171 public/admin/box_repeat.php:84
549
  msgid "On date"
550
  msgstr ""
551
 
552
- #: app/view/admin/get-repeat-box.php:207
553
  msgid "day(s)"
554
  msgstr ""
555
 
556
- #: app/view/admin/get-repeat-box.php:272
557
  msgid "week(s)"
558
  msgstr ""
559
 
560
- #: app/view/admin/get-repeat-box.php:357 app/view/admin/get-repeat-box.php:424
561
- #: lib/recurrence/rule.php:260
562
  msgid "last"
563
  msgstr ""
564
 
565
- #: app/view/admin/get-repeat-box.php:365
566
  msgid "month(s)"
567
  msgstr ""
568
 
569
- #: app/view/admin/get-repeat-box.php:419
570
  msgid "first"
571
  msgstr ""
572
 
573
- #: app/view/admin/get-repeat-box.php:420
574
  msgid "second"
575
  msgstr ""
576
 
577
- #: app/view/admin/get-repeat-box.php:421
578
  msgid "third"
579
  msgstr ""
580
 
581
- #: app/view/admin/get-repeat-box.php:422
582
  msgid "fourth"
583
  msgstr ""
584
 
585
- #: app/view/admin/get-repeat-box.php:434
586
  msgid "Sunday"
587
  msgstr ""
588
 
589
- #: app/view/admin/get-repeat-box.php:435
590
  msgid "Monday"
591
  msgstr ""
592
 
593
- #: app/view/admin/get-repeat-box.php:436
594
  msgid "Tuesday"
595
  msgstr ""
596
 
597
- #: app/view/admin/get-repeat-box.php:437
598
  msgid "Wednesday"
599
  msgstr ""
600
 
601
- #: app/view/admin/get-repeat-box.php:438
602
  msgid "Thursday"
603
  msgstr ""
604
 
605
- #: app/view/admin/get-repeat-box.php:439
606
  msgid "Friday"
607
  msgstr ""
608
 
609
- #: app/view/admin/get-repeat-box.php:440
610
  msgid "Saturday"
611
  msgstr ""
612
 
613
- #: app/view/admin/get-repeat-box.php:442
614
  msgid "day"
615
  msgstr ""
616
 
617
- #: app/view/admin/get-repeat-box.php:443
618
  msgid "weekday"
619
  msgstr ""
620
 
621
- #: app/view/admin/get-repeat-box.php:444
622
  msgid "weekend day"
623
  msgstr ""
624
 
625
- #: app/view/admin/get-repeat-box.php:510
626
  msgid "year(s)"
627
  msgstr ""
628
 
@@ -630,63 +645,67 @@ msgstr ""
630
  msgid "<a href=\"%s\">Settings</a>"
631
  msgstr ""
632
 
 
 
 
 
633
  #: app/view/admin/settings.php:30
634
  msgid "All-in-One Event Calendar: Settings"
635
  msgstr ""
636
 
637
- #: app/view/admin/settings.php:65 app/view/admin/settings.php:66
638
  #: lib/date/timezone.php:366
639
  msgid "Settings"
640
  msgstr ""
641
 
642
- #: app/view/admin/settings.php:86
643
  msgctxt "meta box"
644
  msgid "General Settings"
645
  msgstr ""
646
 
647
- #: app/view/admin/settings.php:95
648
  msgctxt "meta box"
649
  msgid "Timely"
650
  msgstr ""
651
 
652
- #: app/view/admin/settings.php:137
653
  msgid "Viewing Events"
654
  msgstr ""
655
 
656
- #: app/view/admin/settings.php:140
657
  msgid "Adding/Editing Events"
658
  msgstr ""
659
 
660
- #: app/view/admin/settings.php:143
661
  msgid "Advanced"
662
  msgstr ""
663
 
664
- #: app/view/admin/settings.php:145
665
  msgid "Advanced Settings"
666
  msgstr ""
667
 
668
- #: app/view/admin/settings.php:146
669
  msgid "Shortcodes"
670
  msgstr ""
671
 
672
- #: app/view/admin/settings.php:147
673
  msgid "Email Templates"
674
  msgstr ""
675
 
676
- #: app/view/admin/settings.php:148
677
  msgid "External Services"
678
  msgstr ""
679
 
680
- #: app/view/admin/settings.php:149
681
  msgid "Cache Report"
682
  msgstr ""
683
 
684
- #: app/view/admin/settings.php:167
685
  #: public/admin/plugins/ics/display_feeds.php:24
686
  msgid "Save Settings"
687
  msgstr ""
688
 
689
- #: app/view/admin/settings.php:174
690
  msgid ""
691
  "If the form below is not working please follow <a href=\"%s\">this link</a>."
692
  msgstr ""
@@ -754,89 +773,100 @@ msgctxt "meta box"
754
  msgid "Widget Creator"
755
  msgstr ""
756
 
757
- #: app/view/admin/widget-creator.php:130
758
  msgid ""
759
- "Use this tool to generate code snippets you can place on your site to embed "
760
- "new calendars and widgets."
761
  msgstr ""
762
 
763
  #: app/view/admin/widget-creator.php:132
764
- msgid "Full Calendar"
 
 
 
 
 
 
 
 
 
 
 
765
  msgstr ""
766
 
767
- #: app/view/admin/widget-creator.php:133
768
  msgid "Paste this code onto your site:"
769
  msgstr ""
770
 
771
- #: app/view/admin/widget-creator.php:134
772
  msgid ""
773
  "This code will update to reflect changes made to the settings. Changing "
774
  "settings will not affect previously embedded widgets."
775
  msgstr ""
776
 
777
- #: app/view/calendar/page.php:49
778
  msgid ""
779
  "There was an error loading calendar. Please contact site administrator and "
780
  "inform him to configure calendar views."
781
  msgstr ""
782
 
783
- #: app/view/calendar/page.php:66
784
  msgid ""
785
  "Calendar was unable to initialize %s view and has reverted to Agenda view. "
786
  "Please check if you have installed the latest versions of calendar add-ons."
787
  msgstr ""
788
 
789
- #: app/view/calendar/page.php:234
790
  msgid "Subscribe to filtered calendar"
791
  msgstr ""
792
 
793
- #: app/view/calendar/page.php:235
794
  msgid "Subscribe"
795
  msgstr ""
796
 
797
- #: app/view/calendar/subscribe-button.php:21
798
- msgid "Subscribe in your personal calendar"
799
  msgstr ""
800
 
801
- #: app/view/calendar/subscribe-button.php:23
802
  msgid "Add to Timely Calendar"
803
  msgstr ""
804
 
805
- #: app/view/calendar/subscribe-button.php:24
806
  msgid "Add to Google"
807
  msgstr ""
808
 
809
- #: app/view/calendar/subscribe-button.php:25
810
  msgid "Add to Outlook"
811
  msgstr ""
812
 
813
- #: app/view/calendar/subscribe-button.php:26
814
  msgid "Add to Apple Calendar"
815
  msgstr ""
816
 
817
- #: app/view/calendar/subscribe-button.php:27
818
  msgid "Add to other calendar"
819
  msgstr ""
820
 
821
- #: app/view/calendar/subscribe-button.php:30
822
  msgid ""
823
  "Copy this URL for your own Timely calendar or click to add to your rich-text "
824
  "calendar"
825
  msgstr ""
826
 
827
- #: app/view/calendar/subscribe-button.php:31
828
  msgid "Subscribe to this calendar in your Google Calendar"
829
  msgstr ""
830
 
831
- #: app/view/calendar/subscribe-button.php:32
832
  msgid "Subscribe to this calendar in MS Outlook"
833
  msgstr ""
834
 
835
- #: app/view/calendar/subscribe-button.php:33
836
  msgid "Subscribe to this calendar in Apple Calendar/iCal"
837
  msgstr ""
838
 
839
- #: app/view/calendar/subscribe-button.php:34
840
  msgid "Subscribe to this calendar in another plain-text calendar"
841
  msgstr ""
842
 
@@ -844,7 +874,7 @@ msgstr ""
844
  msgid "Clear category filter"
845
  msgstr ""
846
 
847
- #: app/view/calendar/taxonomy.php:98 app/view/event/single.php:106
848
  #: lib/html/element/setting/tags-categories.php:47
849
  msgid "Categories"
850
  msgstr ""
@@ -853,59 +883,59 @@ msgstr ""
853
  msgid "Clear tag filter"
854
  msgstr ""
855
 
856
- #: app/view/calendar/taxonomy.php:100 app/view/event/single.php:107
857
  #: lib/html/element/setting/tags-categories.php:39
858
  msgid "Tags"
859
  msgstr ""
860
 
861
- #: app/view/calendar/view/agenda.php:113
862
  msgid "Collapse All"
863
  msgstr ""
864
 
865
- #: app/view/calendar/view/agenda.php:114
866
  msgid "Expand All"
867
  msgstr ""
868
 
869
- #: app/view/calendar/view/agenda.php:137
870
  msgid "There are no upcoming events to display at this time."
871
  msgstr ""
872
 
873
- #: app/view/calendar/view/agenda.php:138 app/view/calendar/widget.php:363
874
  msgid "Edit"
875
  msgstr ""
876
 
877
- #: app/view/calendar/view/agenda.php:139
878
  msgid "Read more"
879
  msgstr ""
880
 
881
- #: app/view/calendar/view/agenda.php:140
882
  msgid "Categories:"
883
  msgstr ""
884
 
885
- #: app/view/calendar/view/agenda.php:141 lib/theme/list.php:323
886
  #: public/admin/themes.php:29
887
  msgid "Tags:"
888
  msgstr ""
889
 
890
- #: app/view/calendar/view/agenda.php:142 app/view/calendar/view/month.php:82
891
- #: app/view/calendar/view/oneday.php:102 app/view/calendar/view/week.php:113
892
- #: app/view/calendar/widget.php:364
893
  msgid "@ %s"
894
  msgstr ""
895
 
896
- #: app/view/calendar/view/oneday.php:75 app/view/calendar/view/week.php:67
897
  msgid "g a"
898
  msgstr ""
899
 
900
- #: app/view/calendar/view/oneday.php:99 app/view/calendar/view/week.php:110
901
  msgid "Reveal full day"
902
  msgstr ""
903
 
904
- #: app/view/calendar/view/oneday.php:100 app/view/calendar/view/week.php:111
905
  msgid "All-day"
906
  msgstr ""
907
 
908
- #: app/view/calendar/view/oneday.php:101 app/view/calendar/view/week.php:112
909
  msgid "Now:"
910
  msgstr ""
911
 
@@ -949,27 +979,27 @@ msgstr ""
949
  msgid "Show the subscribe button in the widget"
950
  msgstr ""
951
 
952
- #: app/view/calendar/widget.php:360
953
  msgid "There are no upcoming events."
954
  msgstr ""
955
 
956
- #: app/view/calendar/widget.php:361 app/view/event/time.php:131
957
  msgid "all-day"
958
  msgstr ""
959
 
960
- #: app/view/calendar/widget.php:362
961
  msgid "View Calendar"
962
  msgstr ""
963
 
964
- #: app/view/calendar/widget.php:365
965
  msgid "Add"
966
  msgstr ""
967
 
968
- #: app/view/event/content.php:33 app/view/event/single.php:101
969
  msgid "When:"
970
  msgstr ""
971
 
972
- #: app/view/event/content.php:34 app/view/event/single.php:102
973
  msgid "Where:"
974
  msgstr ""
975
 
@@ -1041,38 +1071,38 @@ msgstr ""
1041
  msgid "Event was created in the %s time zone"
1042
  msgstr ""
1043
 
1044
- #: app/view/event/single.php:97
1045
  msgid "Add to Calendar"
1046
  msgstr ""
1047
 
1048
- #: app/view/event/single.php:103
1049
  msgid "Cost:"
1050
  msgstr ""
1051
 
1052
- #: app/view/event/single.php:104
1053
- #: cache/twig/f0/57/03afef869c4fea0061567a42872d377423a41be579565d0cdf32260df05f.php:94
1054
  msgid "Contact:"
1055
  msgstr ""
1056
 
1057
- #: app/view/event/single.php:105
1058
  msgid "Free"
1059
  msgstr ""
1060
 
1061
- #: app/view/event/single.php:122
1062
  msgid "Edit this occurrence (%s)"
1063
  msgstr ""
1064
 
1065
- #: app/view/event/single.php:140
1066
  msgid ""
1067
- "This post was replicated from another site's <a class=\"ai1ec-ics-icon\" "
1068
- "href=\"%s\" title=\"iCalendar feed\">calendar feed</a>."
 
1069
  msgstr ""
1070
 
1071
- #: app/view/event/single.php:141
1072
- msgid "View original post"
1073
  msgstr ""
1074
 
1075
- #: app/view/event/taxonomy.php:117
1076
  msgid "Category image"
1077
  msgstr ""
1078
 
@@ -1100,51 +1130,83 @@ msgstr ""
1100
  msgid "Event website"
1101
  msgstr ""
1102
 
1103
- #: app/view/event/time.php:83 app/view/event/time.php:117
1104
  msgctxt "Event time separator"
1105
  msgid " @ "
1106
  msgstr ""
1107
 
1108
- #: app/view/event/time.php:99
1109
  msgctxt "Event start/end separator"
1110
  msgid " – "
1111
  msgstr ""
1112
 
1113
- #: app/view/event/time.php:160
1114
  msgid ", and "
1115
  msgstr ""
1116
 
1117
- #: cache/twig/78/3e/57d2212e2837aee7813ecc844f345947f68d3edb57d31388f926a75264db.php:27
1118
- #: cache/twig/78/3e/57d2212e2837aee7813ecc844f345947f68d3edb57d31388f926a75264db.php:31
1119
- msgid "Products"
 
 
 
 
 
 
 
 
1120
  msgstr ""
1121
 
1122
- #: cache/twig/dc/78/b950182efb8f436b144938fb0dc48cf395d7daabe20293234dbcf2b26545.php:37
1123
- msgid "Excludes: "
1124
  msgstr ""
1125
 
1126
- #: cache/twig/dc/78/b950182efb8f436b144938fb0dc48cf395d7daabe20293234dbcf2b26545.php:48
1127
- msgid "Repeats"
1128
  msgstr ""
1129
 
1130
- #: cache/twig/f0/57/03afef869c4fea0061567a42872d377423a41be579565d0cdf32260df05f.php:173
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1131
  msgid "Seating capacity:"
1132
  msgstr ""
1133
 
1134
- #: cache/twig/f0/57/03afef869c4fea0061567a42872d377423a41be579565d0cdf32260df05f.php:190
1135
- msgid "Handicap accessible"
1136
  msgstr ""
1137
 
1138
- #: cache/twig/f0/57/03afef869c4fea0061567a42872d377423a41be579565d0cdf32260df05f.php:205
1139
  msgid "Parking:"
1140
  msgstr ""
1141
 
1142
- #: cache/twig/f0/57/03afef869c4fea0061567a42872d377423a41be579565d0cdf32260df05f.php:241
1143
- msgid "Email Venue"
 
 
 
 
 
1144
  msgstr ""
1145
 
1146
- #: cache/twig/f0/57/03afef869c4fea0061567a42872d377423a41be579565d0cdf32260df05f.php:259
1147
- msgid "Visit Website"
 
1148
  msgstr ""
1149
 
1150
  #: lib/calendar-feed/ics.php:38
@@ -1179,46 +1241,71 @@ msgid_plural "Imported %s events"
1179
  msgstr[0] ""
1180
  msgstr[1] ""
1181
 
1182
- #: lib/calendar-feed/ics.php:205 lib/calendar-feed/ics.php:654
1183
  msgid "Invalid ICS feed ID"
1184
  msgstr ""
1185
 
1186
- #: lib/calendar-feed/ics.php:348
1187
  msgid "Categories (optional)"
1188
  msgstr ""
1189
 
1190
- #: lib/calendar-feed/ics.php:365
1191
  msgid ""
1192
  "Do you want to keep the events imported from the calendar or remove them?"
1193
  msgstr ""
1194
 
1195
- #: lib/calendar-feed/ics.php:371
1196
  msgid "Removing ICS Feed"
1197
  msgstr ""
1198
 
1199
- #: lib/calendar-feed/ics.php:374
1200
  msgid "Keep Events"
1201
  msgstr ""
1202
 
1203
- #: lib/calendar-feed/ics.php:377
1204
  msgid "Remove Events"
1205
  msgstr ""
1206
 
1207
- #: lib/calendar-feed/ics.php:646
1208
  msgid "Deleted %d events"
1209
  msgstr ""
1210
 
1211
- #: lib/calendar-feed/ics.php:681
1212
  msgid "Feed deleted"
1213
  msgstr ""
1214
 
1215
- #: lib/captcha/validator.php:24
 
 
 
 
 
 
 
 
 
 
 
 
 
1216
  msgid ""
1217
- "There was an error reading the word verification data. Please try again."
1218
  msgstr ""
1219
 
1220
- #: lib/captcha/validator.php:37
1221
- msgid "Please try answering the word verification again."
 
 
 
 
 
 
 
 
 
 
 
 
1222
  msgstr ""
1223
 
1224
  #: lib/clone/renderer-helper.php:26 lib/clone/renderer-helper.php:27
@@ -1238,13 +1325,20 @@ msgstr ""
1238
  msgid "Clone to Draft"
1239
  msgstr ""
1240
 
1241
- #: lib/command/clone.php:166
1242
  msgid ""
1243
  "<p>The event <strong>%s</strong> was cloned succesfully. <a href=\"%s\">Edit "
1244
  "cloned event</a></p>"
1245
  msgstr ""
1246
 
1247
- #: lib/css/frontend.php:225
 
 
 
 
 
 
 
1248
  msgid ""
1249
  "CSS compilation failed because you don't have enough free memory (a minimum "
1250
  "of %s is needed). Your calendar will not render or function properly without "
@@ -1253,29 +1347,29 @@ msgid ""
1253
  "PHP memory limit."
1254
  msgstr ""
1255
 
1256
- #: lib/css/frontend.php:252
1257
  msgid ""
1258
  "The LESS file compiled correctly but there was an error while saving the "
1259
  "generated CSS to persistence."
1260
  msgstr ""
1261
 
1262
- #: lib/css/frontend.php:258
1263
  msgid ""
1264
  "<p><strong>There was an error while compiling CSS.</strong> The message "
1265
  "returned was: <em>%s</em></p>"
1266
  msgstr ""
1267
 
1268
- #: lib/css/frontend.php:286
1269
  msgid ""
1270
  "Theme options were successfully reset to their default values. <a "
1271
  "href='%s'>Visit site</a>"
1272
  msgstr ""
1273
 
1274
- #: lib/css/frontend.php:293
1275
  msgid "Theme options were updated successfully. <a href='%s'>Visit site</a>"
1276
  msgstr ""
1277
 
1278
- #: lib/css/frontend.php:329
1279
  msgid ""
1280
  "Your CSS is being compiled on every request, which causes your calendar to "
1281
  "perform slowly. The following error occurred: %s"
@@ -1296,7 +1390,7 @@ msgstr ""
1296
  msgid "Error encountered: %s"
1297
  msgstr ""
1298
 
1299
- #: lib/date/system.php:177
1300
  msgid "GMT%+d:%02d"
1301
  msgstr ""
1302
 
@@ -1322,38 +1416,58 @@ msgstr ""
1322
  msgid "Choose your timezone"
1323
  msgstr ""
1324
 
1325
- #: lib/environment/check.php:53
1326
  msgid "Select an option in the <strong>Calendar page</strong> dropdown list."
1327
  msgstr ""
1328
 
1329
- #: lib/environment/check.php:66
1330
  msgid ""
1331
  "The plugin is installed, but has not been configured. <a href=\"%s\">Click "
1332
  "here to set it up now &raquo;</a>"
1333
  msgstr ""
1334
 
1335
- #: lib/environment/check.php:76
1336
  msgid ""
1337
  "The plugin is installed, but has not been configured. Please log in as an "
1338
  "Administrator to set it up."
1339
  msgstr ""
1340
 
1341
- #: lib/environment/check.php:192
1342
- msgid "Addon %s needs to be at least in version %s"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1343
  msgstr ""
1344
 
1345
  #: lib/exception/handler.php:176
1346
- msgid "Disabled add-on \"%s\" due to an error"
1347
  msgstr ""
1348
 
1349
- #: lib/exception/handler.php:397
1350
- msgid "All In One Event Calendar has been disabled due to an error:"
1351
  msgstr ""
1352
 
1353
- #: lib/exception/handler.php:407
1354
- msgid ""
1355
- "<p>If you corrected the error and wish to try reactivating the plugin, <a "
1356
- "href=\"%s\">click here</a>.</p>"
 
 
 
 
 
 
1357
  msgstr ""
1358
 
1359
  #: lib/factory/html.php:128
@@ -1547,10 +1661,14 @@ msgstr ""
1547
  msgid "Length"
1548
  msgstr ""
1549
 
1550
- #: lib/notification/admin.php:180
1551
  msgid "All-in-One Event Calendar"
1552
  msgstr ""
1553
 
 
 
 
 
1554
  #: lib/post/custom-type.php:26
1555
  msgctxt "Custom post type name"
1556
  msgid "Events"
@@ -1603,130 +1721,135 @@ msgstr ""
1603
 
1604
  #: lib/post/custom-type.php:85
1605
  msgctxt "Event categories taxonomy"
1606
- msgid "Event Categories"
1607
  msgstr ""
1608
 
1609
  #: lib/post/custom-type.php:86
1610
  msgctxt "Event categories taxonomy (singular)"
1611
- msgid "Event Category"
1612
  msgstr ""
1613
 
1614
- #: lib/post/custom-type.php:93
1615
- msgctxt "Event tags taxonomy"
1616
- msgid "Event Tags"
1617
  msgstr ""
1618
 
1619
  #: lib/post/custom-type.php:94
 
 
 
 
 
1620
  msgctxt "Event tags taxonomy (singular)"
1621
- msgid "Event Tag"
1622
  msgstr ""
1623
 
1624
- #: lib/post/custom-type.php:101
1625
  msgctxt "Event feeds taxonomy"
1626
  msgid "Event Feeds"
1627
  msgstr ""
1628
 
1629
- #: lib/post/custom-type.php:102
1630
  msgctxt "Event feed taxonomy (singular)"
1631
  msgid "Event Feed"
1632
  msgstr ""
1633
 
1634
- #: lib/post/custom-type.php:277
1635
  msgid ""
1636
  "All Events <span class=\"update-plugins count-%d\" title=\"%d Pending Events"
1637
  "\"><span class=\"update-count\">%d</span></span>"
1638
  msgstr ""
1639
 
1640
- #: lib/post/custom-type.php:288
1641
  msgid "All Events"
1642
  msgstr ""
1643
 
1644
- #: lib/recurrence/rule.php:206 lib/recurrence/rule.php:215
1645
- #: lib/recurrence/rule.php:223
1646
  msgctxt "Recurrence editor - weekly tab"
1647
  msgid "on"
1648
  msgstr ""
1649
 
1650
- #: lib/recurrence/rule.php:211 lib/recurrence/rule.php:240
1651
- #: lib/recurrence/rule.php:288
1652
  msgid "and"
1653
  msgstr ""
1654
 
1655
- #: lib/recurrence/rule.php:236 lib/recurrence/rule.php:243
1656
- #: lib/recurrence/rule.php:249 lib/recurrence/rule.php:270
1657
  msgctxt "Recurrence editor - monthly tab"
1658
  msgid "on"
1659
  msgstr ""
1660
 
1661
- #: lib/recurrence/rule.php:236 lib/recurrence/rule.php:243
1662
- #: lib/recurrence/rule.php:249
1663
  msgid "of the month"
1664
  msgstr ""
1665
 
1666
- #: lib/recurrence/rule.php:283 lib/recurrence/rule.php:291
1667
- #: lib/recurrence/rule.php:298
1668
  msgctxt "Recurrence editor - yearly tab"
1669
  msgid "on"
1670
  msgstr ""
1671
 
1672
- #: lib/recurrence/rule.php:338 public/admin/box_repeat.php:16
1673
  #: public/admin/cron_freq.php:9
1674
  msgid "Daily"
1675
  msgstr ""
1676
 
1677
- #: lib/recurrence/rule.php:341
1678
  msgid "Every other day"
1679
  msgstr ""
1680
 
1681
- #: lib/recurrence/rule.php:344
1682
  msgid "Every %d days"
1683
  msgstr ""
1684
 
1685
- #: lib/recurrence/rule.php:353 public/admin/box_repeat.php:21
1686
  msgid "Weekly"
1687
  msgstr ""
1688
 
1689
- #: lib/recurrence/rule.php:356
1690
  msgid "Every other week"
1691
  msgstr ""
1692
 
1693
- #: lib/recurrence/rule.php:359
1694
  msgid "Every %d weeks"
1695
  msgstr ""
1696
 
1697
- #: lib/recurrence/rule.php:368 public/admin/box_repeat.php:26
1698
  msgid "Monthly"
1699
  msgstr ""
1700
 
1701
- #: lib/recurrence/rule.php:371
1702
  msgid "Every other month"
1703
  msgstr ""
1704
 
1705
- #: lib/recurrence/rule.php:374
1706
  msgid "Every %d months"
1707
  msgstr ""
1708
 
1709
- #: lib/recurrence/rule.php:383 public/admin/box_repeat.php:31
1710
  msgid "Yearly"
1711
  msgstr ""
1712
 
1713
- #: lib/recurrence/rule.php:386
1714
  msgid "Every other year"
1715
  msgstr ""
1716
 
1717
- #: lib/recurrence/rule.php:389
1718
  msgid "Every %d years"
1719
  msgstr ""
1720
 
1721
- #: lib/recurrence/rule.php:427
1722
  msgid "until %s"
1723
  msgstr ""
1724
 
1725
- #: lib/recurrence/rule.php:437
1726
  msgid "for %d occurrences"
1727
  msgstr ""
1728
 
1729
- #: lib/recurrence/rule.php:441
1730
  msgid "forever"
1731
  msgstr ""
1732
 
@@ -1768,36 +1891,44 @@ msgid ""
1768
  "administrator to add more themes."
1769
  msgstr ""
1770
 
1771
- #: lib/theme/list.php:260
1772
  msgid "Activate &#8220;%s&#8221;"
1773
  msgstr ""
1774
 
1775
- #: lib/theme/list.php:267
1776
  msgid "Activate"
1777
  msgstr ""
1778
 
1779
  #. translators: 1: theme title, 2: theme version, 3: theme author
1780
- #: lib/theme/list.php:284 public/admin/themes.php:25
1781
  msgid "%1$s %2$s by %3$s"
1782
  msgstr ""
1783
 
1784
  #. translators: 1: theme title, 2: template dir, 3: stylesheet_dir, 4: theme
1785
  #. title, 5: parent_theme
1786
- #: lib/theme/list.php:296
1787
  msgid ""
1788
  "The template files are located in <code>%2$s</code>. The stylesheet files "
1789
  "are located in <code>%3$s</code>. <strong>%4$s</strong> uses templates from "
1790
  "<strong>%5$s</strong>. Changes made to the templates will affect both themes."
1791
  msgstr ""
1792
 
1793
- #: lib/theme/list.php:311
1794
  msgid "All of this theme&#8217;s files are located in <code>%2$s</code>."
1795
  msgstr ""
1796
 
1797
- #: lib/theme/loader.php:305
1798
  msgid "We couldn't find a suitable loader for filename with extension '%s'"
1799
  msgstr ""
1800
 
 
 
 
 
 
 
 
 
1801
  #: lib/theme/search.php:253
1802
  msgid ""
1803
  "Unable to move your old core themes from <code>wp-content/themes-ai1ec</"
@@ -1813,15 +1944,10 @@ msgid ""
1813
  "remove your old core themes from <code>wp-content/themes-ai1ec/%s</code>."
1814
  msgstr ""
1815
 
1816
- #: lib/twig/environment.php:31
1817
  msgid ""
1818
- "We detected that your cache directory (%s) is not writable. This will make "
1819
- "your calendar slow. Please contact your web host or server administrator to "
1820
- "make it writable by the web server."
1821
- msgstr ""
1822
-
1823
- #: public/admin/agenda-widget-form.php:2
1824
- msgid "Title:"
1825
  msgstr ""
1826
 
1827
  #: public/admin/agenda-widget-form.php:12
@@ -1888,14 +2014,6 @@ msgstr ""
1888
  msgid "Organizer contact info"
1889
  msgstr ""
1890
 
1891
- #: public/admin/box_event_contact.php:17
1892
- msgid "Contact name:"
1893
- msgstr ""
1894
-
1895
- #: public/admin/box_event_contact.php:30
1896
- msgid "Phone:"
1897
- msgstr ""
1898
-
1899
  #: public/admin/box_event_contact.php:43
1900
  msgid "E-mail:"
1901
  msgstr ""
@@ -1928,28 +2046,24 @@ msgstr ""
1928
  msgid "Event location details"
1929
  msgstr ""
1930
 
1931
- #: public/admin/box_event_location.php:22
1932
  msgid "Venue name:"
1933
  msgstr ""
1934
 
1935
- #: public/admin/box_event_location.php:34
1936
- msgid "Address:"
1937
- msgstr ""
1938
-
1939
- #: public/admin/box_event_location.php:48
1940
- msgid "Show Google Map"
1941
  msgstr ""
1942
 
1943
  #: public/admin/box_event_location.php:57
1944
- msgid "Input Coordinates"
1945
  msgstr ""
1946
 
1947
  #: public/admin/box_event_location.php:69
1948
  msgid "Longitude:"
1949
  msgstr ""
1950
 
1951
- #: public/admin/box_event_location.php:82
1952
- msgid "Latitude:"
1953
  msgstr ""
1954
 
1955
  #: public/admin/box_eventbrite.php:1
@@ -1962,13 +2076,13 @@ msgstr ""
1962
 
1963
  #: public/admin/box_eventbrite.php:12 public/admin/feed_row.php:28
1964
  #: public/admin/feed_row.php:38 public/admin/feed_row.php:49
1965
- #: public/admin/feed_row.php:59
1966
  msgid "Yes"
1967
  msgstr ""
1968
 
1969
  #: public/admin/box_eventbrite.php:14 public/admin/feed_row.php:30
1970
  #: public/admin/feed_row.php:40 public/admin/feed_row.php:51
1971
- #: public/admin/feed_row.php:61
1972
  msgid "No"
1973
  msgstr ""
1974
 
@@ -2048,10 +2162,6 @@ msgstr ""
2048
  msgid "Send an Invoice"
2049
  msgstr ""
2050
 
2051
- #: public/admin/box_profile_timezone.php:2
2052
- msgid "All in One Event Calendar"
2053
- msgstr ""
2054
-
2055
  #: public/admin/box_profile_timezone.php:9
2056
  msgid "Your preferred timezone"
2057
  msgstr ""
@@ -2060,24 +2170,28 @@ msgstr ""
2060
  msgid "Select recurrence pattern:"
2061
  msgstr ""
2062
 
2063
- #: public/admin/box_repeat.php:63
 
 
 
 
2064
  msgid "End"
2065
  msgstr ""
2066
 
2067
- #: public/admin/box_repeat.php:73
2068
  msgid "Ending after"
2069
  msgstr ""
2070
 
2071
- #: public/admin/box_repeat.php:100
2072
- #: public/admin/plugins/ics/display_feeds.php:80
2073
  msgid "Please wait&#8230;"
2074
  msgstr ""
2075
 
2076
- #: public/admin/box_repeat.php:102
2077
  msgid "Apply"
2078
  msgstr ""
2079
 
2080
- #: public/admin/box_repeat.php:107
2081
  msgid "Cancel"
2082
  msgstr ""
2083
 
@@ -2155,18 +2269,6 @@ msgstr ""
2155
  msgid "Choose a rule for exclusion"
2156
  msgstr ""
2157
 
2158
- #: public/admin/box_time_and_date.php:143
2159
- msgid "Exclude dates"
2160
- msgstr ""
2161
-
2162
- #: public/admin/box_time_and_date.php:149
2163
- msgid "Choose dates"
2164
- msgstr ""
2165
-
2166
- #: public/admin/box_time_and_date.php:156
2167
- msgid "Choose specific dates to exclude"
2168
- msgstr ""
2169
-
2170
  #: public/admin/calendar_tasks.php:3
2171
  msgid "Welcome"
2172
  msgstr ""
@@ -2258,22 +2360,34 @@ msgid "Keep original events categories and tags"
2258
  msgstr ""
2259
 
2260
  #: public/admin/feed_row.php:56 public/admin/plugins/ics/display_feeds.php:72
2261
- msgid "Keep old events"
 
 
2262
  msgstr ""
2263
 
2264
- #: public/admin/feed_row.php:71
 
 
 
 
 
 
 
 
 
 
2265
  msgid "Refreshing&#8230;"
2266
  msgstr ""
2267
 
2268
- #: public/admin/feed_row.php:73
2269
  msgid "Refresh"
2270
  msgstr ""
2271
 
2272
- #: public/admin/feed_row.php:80
2273
  msgid "Removing&#8230;"
2274
  msgstr ""
2275
 
2276
- #: public/admin/feed_row.php:82
2277
  msgid "Remove"
2278
  msgstr ""
2279
 
@@ -2306,10 +2420,14 @@ msgid ""
2306
  "Import any tags/categories provided by feed, in addition those selected above"
2307
  msgstr ""
2308
 
2309
- #: public/admin/plugins/ics/display_feeds.php:82
2310
  msgid "Add new subscription"
2311
  msgstr ""
2312
 
 
 
 
 
2313
  #: public/admin/row_daily.php:3 public/admin/row_monthly.php:3
2314
  #: public/admin/row_monthly.php:39 public/admin/row_weekly.php:3
2315
  #: public/admin/row_yearly.php:3
@@ -2342,19 +2460,25 @@ msgstr ""
2342
  msgid "The active theme is broken. Reverting to the default theme."
2343
  msgstr ""
2344
 
2345
- #: public/admin/themes-install.php:22 public/admin/themes.php:4
 
 
 
 
 
 
2346
  msgid "New theme activated. <a href=\"%s\">Visit site</a>"
2347
  msgstr ""
2348
 
2349
- #: public/admin/themes-install.php:28 public/admin/themes.php:10
2350
  msgid "Theme deleted."
2351
  msgstr ""
2352
 
2353
- #: public/admin/themes-install.php:39 public/admin/themes-install.php:46
2354
  msgid "Manage Themes"
2355
  msgstr ""
2356
 
2357
- #: public/admin/themes-install.php:42
2358
  msgctxt "theme"
2359
  msgid "Install Themes"
2360
  msgstr ""
@@ -2598,9 +2722,9 @@ msgstr ""
2598
  msgid "All-in-One Event Calendar by Time.ly"
2599
  msgstr ""
2600
 
2601
- #. #-#-#-#-# all-in-one-event-calendar.pot (All-in-One Event Calendar by Time.ly 2.1.9) #-#-#-#-#
2602
  #. Plugin URI of the plugin/theme
2603
- #. #-#-#-#-# all-in-one-event-calendar.pot (All-in-One Event Calendar by Time.ly 2.1.9) #-#-#-#-#
2604
  #. Author URI of the plugin/theme
2605
  msgid "http://time.ly/"
2606
  msgstr ""
1
+ # Copyright (C) 2015 All-in-One Event Calendar by Time.ly
2
  # This file is distributed under the same license as the All-in-One Event Calendar by Time.ly package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: All-in-One Event Calendar by Time.ly 2.2.0\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/all-in-one-event-calendar\n"
7
+ "POT-Creation-Date: 2015-02-17 17:20:24+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2015-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
25
  msgid "Licences"
26
  msgstr ""
27
 
28
+ #: app/controller/front.php:343
29
  msgid ""
30
  "Your active calendar theme could not be properly initialized. The default "
31
  "theme has been activated instead. Please visit %s and try reactivating your "
32
  "theme manually."
33
  msgstr ""
34
 
35
+ #: app/controller/front.php:347 app/view/admin/theme-switching.php:54
36
  #: app/view/admin/theme-switching.php:55
37
  msgid "Calendar Themes"
38
  msgstr ""
39
 
40
+ #: app/controller/front.php:949
41
  msgid ""
42
  "Your database is found to be corrupt. Likely previous update has failed. "
43
  "Please restore All-in-One Event Calendar tables from a backup and retry."
44
  "<br>Following errors were found:<br>%s"
45
  msgstr ""
46
 
47
+ #: app/controller/javascript-widget.php:48
 
 
 
 
 
 
 
48
  msgid "You must choose the Calendar page before using the Super Widget"
49
  msgstr ""
50
 
51
+ #: app/controller/javascript.php:395
52
  msgid "This feed is already being imported."
53
  msgstr ""
54
 
55
+ #: app/controller/javascript.php:398
56
  msgid "Please enter a valid iCalendar URL."
57
  msgstr ""
58
 
59
+ #: app/controller/javascript.php:401
60
  msgid "Please enter a valid email address."
61
  msgstr ""
62
 
63
+ #: app/controller/javascript.php:403
64
  msgid "Choose Image"
65
  msgstr ""
66
 
67
+ #: app/controller/javascript.php:406
68
  msgid "The value you have entered is not a valid CSS length."
69
  msgstr ""
70
 
71
+ #: app/controller/javascript.php:409
72
  msgid ""
73
  "Are you sure you want to reset your theme options to their default values?"
74
  msgstr ""
75
 
76
+ #: app/controller/javascript.php:412
77
  msgid ""
78
  "Please enter a valid latitude. A valid latitude is comprised between +90 and "
79
  "-90."
80
  msgstr ""
81
 
82
+ #: app/controller/javascript.php:415
83
  msgid ""
84
  "Please enter a valid longitude. A valid longitude is comprised between +180 "
85
  "and -180."
86
  msgstr ""
87
 
88
+ #: app/controller/javascript.php:418
89
  msgid ""
90
  "When the \"Input coordinates\" checkbox is checked, \"Latitude\" is a "
91
  "required field."
92
  msgstr ""
93
 
94
+ #: app/controller/javascript.php:421
95
  msgid ""
96
  "When the \"Input coordinates\" checkbox is checked, \"Longitude\" is a "
97
  "required field."
98
  msgstr ""
99
 
100
+ #: app/controller/javascript.php:424
101
  msgid ""
102
  "The URL you have entered in the <b>Organizer Contact Info</b> &gt; "
103
  "<b>External URL</b> seems to be invalid."
104
  msgstr ""
105
 
106
+ #: app/controller/javascript.php:427
107
  msgid ""
108
  "The URL you have entered in the <b>Event Cost and Tickets</b> &gt; <b>Buy "
109
  "Tickets URL</b> seems to be invalid."
110
  msgstr ""
111
 
112
+ #: app/controller/javascript.php:430
113
  msgid ""
114
  "Please remember that URLs must start with either \"http://\" or \"https://\"."
115
  msgstr ""
116
 
117
+ #: app/controller/javascript.php:433
118
  msgid "Loading&hellip;"
119
  msgstr ""
120
 
121
+ #: app/controller/javascript.php:465 app/view/admin/widget-creator.php:139
122
  msgid "Preview:"
123
  msgstr ""
124
 
125
+ #: app/controller/javascript.php:466
126
  msgid ""
127
  "Loading preview&nbsp;<i class=\"ai1ec-fa ai1ec-fa-spin ai1ec-fa-spinner\"></"
128
  "i>"
129
  msgstr ""
130
 
131
+ #: app/controller/javascript.php:470
132
  msgid ""
133
  "Something went wrong while fetching events.<br>The request status is: %STATUS"
134
  "% <br>The error thrown was: %ERROR%"
135
  msgstr ""
136
 
137
+ #: app/controller/javascript.php:477
138
+ msgid "The end date can't be earlier than the start date."
139
+ msgstr ""
140
+
141
+ #: app/controller/javascript.php:478
142
+ msgid "For week and day view, you must select an interval of at least 6 hours."
143
+ msgstr ""
144
+
145
  #: app/model/event/parent.php:186
146
  msgid "Edit &#8220;%s&#8221;"
147
  msgstr ""
150
  msgid "Base Event"
151
  msgstr ""
152
 
153
+ #: app/model/settings.php:379
154
  #: lib/html/element/setting/calendar-page-selector.php:50
155
  msgid "Calendar page"
156
  msgstr ""
157
 
158
+ #: app/model/settings.php:389
159
  msgid "Week starts on"
160
  msgstr ""
161
 
162
+ #: app/model/settings.php:402
163
  msgid "Available views"
164
  msgstr ""
165
 
166
+ #: app/model/settings.php:410
167
  msgid "Agenda"
168
  msgid_plural "Agenda"
169
  msgstr[0] ""
170
  msgstr[1] ""
171
 
172
+ #: app/model/settings.php:421
173
  msgid "Day"
174
  msgid_plural "Day"
175
  msgstr[0] ""
176
  msgstr[1] ""
177
 
178
+ #: app/model/settings.php:432
179
  msgid "Month"
180
  msgid_plural "Month"
181
  msgstr[0] ""
182
  msgstr[1] ""
183
 
184
+ #: app/model/settings.php:443
185
  msgid "Week"
186
  msgid_plural "Week"
187
  msgstr[0] ""
188
  msgstr[1] ""
189
 
190
+ #: app/model/settings.php:457
191
  msgid "Timezone"
192
  msgstr ""
193
 
194
+ #: app/model/settings.php:470
195
  msgid "Preselected calendar filters"
196
  msgstr ""
197
 
198
+ #: app/model/settings.php:471 app/view/calendar/widget.php:128
199
  msgid ""
200
  "To clear, hold &#8984;/<abbr class=\"initialism\">CTRL</abbr> and click "
201
  "selection."
202
  msgstr ""
203
 
204
+ #: app/model/settings.php:486
205
  msgid "Default calendar start date (optional)"
206
  msgstr ""
207
 
208
+ #: app/model/settings.php:497
209
  msgid "Agenda pages show at most"
210
  msgstr ""
211
 
212
+ #: app/model/settings.php:510
213
  msgid "Week/Day view starts at"
214
  msgstr ""
215
 
216
+ #: app/model/settings.php:523
217
  msgid "Week/Day view ends at"
218
  msgstr ""
219
 
220
+ #: app/model/settings.php:536
221
  msgid "<strong>Word-wrap event stubs</strong> in Month view"
222
  msgstr ""
223
 
224
+ #: app/model/settings.php:539
225
  msgid "Only applies to events that span a single day."
226
  msgstr ""
227
 
228
+ #: app/model/settings.php:551
229
  msgid ""
230
  "In <span class=\"ai1ec-tooltip-toggle\"\n"
231
  "\t\t\t\t\t\tdata-original-title=\"These include Agenda view,\n"
234
  "\t\t\t\t\t\tfrom last day shown</strong>"
235
  msgstr ""
236
 
237
+ #: app/model/settings.php:567
238
  msgid "Keep all events <strong>expanded</strong> in Agenda view"
239
  msgstr ""
240
 
241
+ #: app/model/settings.php:579
242
  msgid "<strong>Show year</strong> in calendar date labels"
243
  msgstr ""
244
 
245
+ #: app/model/settings.php:591
246
  msgid "<strong>Show location in event titles</strong> in calendar views"
247
  msgstr ""
248
 
249
+ #: app/model/settings.php:603
250
  msgid "<strong>Exclude</strong> events from search results"
251
  msgstr ""
252
 
253
+ #: app/model/settings.php:615
254
  msgid ""
255
  "Hide <strong>Subscribe</strong>/<strong>Add to Calendar</strong> buttons in "
256
  "calendar and single event views "
257
  msgstr ""
258
 
259
+ #: app/model/settings.php:627
260
+ msgid "Hide <strong>Get a Timely Calendar</strong> button"
261
+ msgstr ""
262
+
263
+ #: app/model/settings.php:639
264
  msgid " Hide <strong>Google Maps</strong> until clicked"
265
  msgstr ""
266
 
267
+ #: app/model/settings.php:651
268
  msgid ""
269
  " <strong>Affix filter menu</strong> to top of window when it scrolls out of "
270
  "view"
271
  msgstr ""
272
 
273
+ #: app/model/settings.php:654
274
  msgid "Only applies to first visible calendar found on the page."
275
  msgstr ""
276
 
277
+ #: app/model/settings.php:666
278
  msgid "Offset affixed filter bar vertically by"
279
  msgstr ""
280
 
281
+ #: app/model/settings.php:681
282
  msgid "Wide screens only (&#8805; 1200px)"
283
  msgstr ""
284
 
285
+ #: app/model/settings.php:696
286
  msgid "Tablets only (< 980px)"
287
  msgstr ""
288
 
289
+ #: app/model/settings.php:711
290
  msgid "Phones only (< 768px)"
291
  msgstr ""
292
 
293
+ #: app/model/settings.php:724
294
  msgid "Strict compatibility content filtering"
295
  msgstr ""
296
 
297
+ #: app/model/settings.php:736
298
  msgid " <strong>Hide featured image</strong> from event details page"
299
  msgstr ""
300
 
301
+ #: app/model/settings.php:739
302
  msgid ""
303
  "Select this option if your theme already displays each post's featured image."
304
  msgstr ""
305
 
306
+ #: app/model/settings.php:750
307
  msgid "Input dates in this format"
308
  msgstr ""
309
 
310
+ #: app/model/settings.php:755
311
  msgid "Default (d/m/yyyy)"
312
  msgstr ""
313
 
314
+ #: app/model/settings.php:759
315
  msgid "US (m/d/yyyy)"
316
  msgstr ""
317
 
318
+ #: app/model/settings.php:763
319
  msgid "ISO 8601 (yyyy-m-d)"
320
  msgstr ""
321
 
322
+ #: app/model/settings.php:767
323
  msgid "Dotted (m.d.yyyy)"
324
  msgstr ""
325
 
326
+ #: app/model/settings.php:779
327
  msgid " Use <strong>24h time</strong> in time pickers"
328
  msgstr ""
329
 
330
+ #: app/model/settings.php:790
331
  msgid "<strong>Disable address autocomplete</strong> function"
332
  msgstr ""
333
 
334
+ #: app/model/settings.php:801
335
  msgid ""
336
  "Use the configured <strong>region</strong> (WordPress locale) to bias the "
337
  "address autocomplete function "
338
  msgstr ""
339
 
340
+ #: app/model/settings.php:817
341
  msgid ""
342
  " Show the old <strong>Post Your Event</strong> button above the calendar to "
343
  "privileged users"
344
  msgstr ""
345
 
346
+ #: app/model/settings.php:820
347
  msgid ""
348
  "Install the <a target=\"_blank\" href=\"http://time.ly/\">Interactive "
349
  "Frontend Extension</a> for the <strong>frontend Post Your Event form</"
350
  "strong>."
351
  msgstr ""
352
 
353
+ #: app/model/settings.php:841
354
  msgid "Move calendar into this DOM element"
355
  msgstr ""
356
 
357
+ #: app/model/settings.php:843
358
  msgid ""
359
  "Optional. Use this JavaScript-based shortcut to place the\n"
360
  "\t\t\t\t\t\tcalendar a DOM element other than the usual page content "
368
  "\t\t\t\t\t\tby the calendar."
369
  msgstr ""
370
 
371
+ #: app/model/settings.php:862
372
  msgid ""
373
  "<strong>Skip <tt>in_the_loop()</tt> check </strong> that protects against "
374
  "multiple calendar output"
375
  msgstr ""
376
 
377
+ #: app/model/settings.php:865
378
  msgid ""
379
  "Try enabling this option if your calendar does not appear on the calendar "
380
  "page. It is needed for compatibility with a small number of themes that call "
381
  "<tt>the_content()</tt> from outside of The Loop. Leave disabled otherwise."
382
  msgstr ""
383
 
384
+ #: app/model/settings.php:877
385
  msgid "Disable <strong>gzip</strong> compression."
386
  msgstr ""
387
 
388
+ #: app/model/settings.php:880
389
  msgid ""
390
  "Use this option if calendar is unresponsive. <a href=\"http://support.time."
391
  "ly/disable-gzip-compression/\">Read more</a> about the issue. (From version "
392
  "2.1 onwards, gzip is disabled by default for maximum compatibility.)"
393
  msgstr ""
394
 
395
+ #: app/model/settings.php:892
396
+ msgid "Use frontend rendering."
397
+ msgstr ""
398
+
399
+ #: app/model/settings.php:895
400
+ msgid ""
401
+ "Renders calendar views on the client rather than the server; can improve "
402
+ "performance."
403
+ msgstr ""
404
+
405
+ #: app/model/settings.php:907
406
  msgid ""
407
  "<strong>Link CSS</strong> in <code>&lt;head&gt;</code> section when file "
408
  "cache is unavailable."
409
  msgstr ""
410
 
411
+ #: app/model/settings.php:910
412
  msgid ""
413
  "Use this option if file cache is unavailable and you would prefer to serve "
414
  "CSS as a link rather than have it output inline."
415
  msgstr ""
416
 
417
+ #: app/model/settings.php:922
418
  msgid "Current <strong>robots.txt</strong> on this site"
419
  msgstr ""
420
 
421
+ #: app/model/settings.php:926
422
  msgid ""
423
  "The Robot Exclusion Standard, also known as the Robots Exclusion Protocol "
424
  "or\n"
432
  "your root WordPress directory."
433
  msgstr ""
434
 
435
+ #: app/model/settings.php:943
436
  msgid ""
437
  "<strong>Publicize, promote, and share my events</strong> marked as public on "
438
  "the Timely network. (<a href=\"%s\" target=\"_blank\">Learn more &#187;</a>)"
439
  msgstr ""
440
 
441
+ #: app/model/settings.php:966
442
  msgid "Templates cache improves site performance"
443
  msgstr ""
444
 
514
  msgid "Image"
515
  msgstr ""
516
 
517
+ #: app/view/admin/event-category.php:155
518
  msgid "Category Color"
519
  msgstr ""
520
 
521
+ #: app/view/admin/event-category.php:156
522
  msgid "Events in this category will be identified by this color"
523
  msgstr ""
524
 
525
+ #: app/view/admin/event-category.php:193 app/view/admin/event-category.php:225
526
  msgid "Category Image"
527
  msgstr ""
528
 
529
+ #: app/view/admin/event-category.php:194 app/view/admin/event-category.php:226
530
  msgid "Add Image"
531
  msgstr ""
532
 
533
+ #: app/view/admin/event-category.php:195
534
  msgid "Remove Image"
535
  msgstr ""
536
 
537
+ #: app/view/admin/event-category.php:196 app/view/admin/event-category.php:227
538
  msgid ""
539
  "Assign an optional image to the category. Recommended size: square, minimum "
540
  "400&times;400 pixels."
541
  msgstr ""
542
 
543
+ #: app/view/admin/get-repeat-box.php:65
544
  msgid "times"
545
  msgstr ""
546
 
547
+ #: app/view/admin/get-repeat-box.php:131
548
  msgid "Recurrence rule cannot be empty."
549
  msgstr ""
550
 
551
+ #: app/view/admin/get-repeat-box.php:149
552
  msgid "Recurrence rule was not provided."
553
  msgstr ""
554
 
555
+ #: app/view/admin/get-repeat-box.php:176
556
  msgid "Never"
557
  msgstr ""
558
 
559
+ #: app/view/admin/get-repeat-box.php:177
560
  msgid "After"
561
  msgstr ""
562
 
563
+ #: app/view/admin/get-repeat-box.php:178 public/admin/box_repeat.php:93
564
  msgid "On date"
565
  msgstr ""
566
 
567
+ #: app/view/admin/get-repeat-box.php:214
568
  msgid "day(s)"
569
  msgstr ""
570
 
571
+ #: app/view/admin/get-repeat-box.php:296
572
  msgid "week(s)"
573
  msgstr ""
574
 
575
+ #: app/view/admin/get-repeat-box.php:381 app/view/admin/get-repeat-box.php:448
576
+ #: lib/recurrence/rule.php:279
577
  msgid "last"
578
  msgstr ""
579
 
580
+ #: app/view/admin/get-repeat-box.php:389
581
  msgid "month(s)"
582
  msgstr ""
583
 
584
+ #: app/view/admin/get-repeat-box.php:443
585
  msgid "first"
586
  msgstr ""
587
 
588
+ #: app/view/admin/get-repeat-box.php:444
589
  msgid "second"
590
  msgstr ""
591
 
592
+ #: app/view/admin/get-repeat-box.php:445
593
  msgid "third"
594
  msgstr ""
595
 
596
+ #: app/view/admin/get-repeat-box.php:446
597
  msgid "fourth"
598
  msgstr ""
599
 
600
+ #: app/view/admin/get-repeat-box.php:458
601
  msgid "Sunday"
602
  msgstr ""
603
 
604
+ #: app/view/admin/get-repeat-box.php:459
605
  msgid "Monday"
606
  msgstr ""
607
 
608
+ #: app/view/admin/get-repeat-box.php:460
609
  msgid "Tuesday"
610
  msgstr ""
611
 
612
+ #: app/view/admin/get-repeat-box.php:461
613
  msgid "Wednesday"
614
  msgstr ""
615
 
616
+ #: app/view/admin/get-repeat-box.php:462
617
  msgid "Thursday"
618
  msgstr ""
619
 
620
+ #: app/view/admin/get-repeat-box.php:463
621
  msgid "Friday"
622
  msgstr ""
623
 
624
+ #: app/view/admin/get-repeat-box.php:464
625
  msgid "Saturday"
626
  msgstr ""
627
 
628
+ #: app/view/admin/get-repeat-box.php:466
629
  msgid "day"
630
  msgstr ""
631
 
632
+ #: app/view/admin/get-repeat-box.php:467
633
  msgid "weekday"
634
  msgstr ""
635
 
636
+ #: app/view/admin/get-repeat-box.php:468
637
  msgid "weekend day"
638
  msgstr ""
639
 
640
+ #: app/view/admin/get-repeat-box.php:534
641
  msgid "year(s)"
642
  msgstr ""
643
 
645
  msgid "<a href=\"%s\">Settings</a>"
646
  msgstr ""
647
 
648
+ #: app/view/admin/organize.php:100
649
+ msgid "Organize Events"
650
+ msgstr ""
651
+
652
  #: app/view/admin/settings.php:30
653
  msgid "All-in-One Event Calendar: Settings"
654
  msgstr ""
655
 
656
+ #: app/view/admin/settings.php:68 app/view/admin/settings.php:69
657
  #: lib/date/timezone.php:366
658
  msgid "Settings"
659
  msgstr ""
660
 
661
+ #: app/view/admin/settings.php:89
662
  msgctxt "meta box"
663
  msgid "General Settings"
664
  msgstr ""
665
 
666
+ #: app/view/admin/settings.php:98
667
  msgctxt "meta box"
668
  msgid "Timely"
669
  msgstr ""
670
 
671
+ #: app/view/admin/settings.php:140
672
  msgid "Viewing Events"
673
  msgstr ""
674
 
675
+ #: app/view/admin/settings.php:143
676
  msgid "Adding/Editing Events"
677
  msgstr ""
678
 
679
+ #: app/view/admin/settings.php:146
680
  msgid "Advanced"
681
  msgstr ""
682
 
683
+ #: app/view/admin/settings.php:148
684
  msgid "Advanced Settings"
685
  msgstr ""
686
 
687
+ #: app/view/admin/settings.php:149
688
  msgid "Shortcodes"
689
  msgstr ""
690
 
691
+ #: app/view/admin/settings.php:150
692
  msgid "Email Templates"
693
  msgstr ""
694
 
695
+ #: app/view/admin/settings.php:151
696
  msgid "External Services"
697
  msgstr ""
698
 
699
+ #: app/view/admin/settings.php:152
700
  msgid "Cache Report"
701
  msgstr ""
702
 
703
+ #: app/view/admin/settings.php:170
704
  #: public/admin/plugins/ics/display_feeds.php:24
705
  msgid "Save Settings"
706
  msgstr ""
707
 
708
+ #: app/view/admin/settings.php:177
709
  msgid ""
710
  "If the form below is not working please follow <a href=\"%s\">this link</a>."
711
  msgstr ""
773
  msgid "Widget Creator"
774
  msgstr ""
775
 
776
+ #: app/view/admin/widget-creator.php:131
777
  msgid ""
778
+ "Use this tool to generate code snippets you can add to <strong>an external "
779
+ "website</strong> to embed new calendars and widgets."
780
  msgstr ""
781
 
782
  #: app/view/admin/widget-creator.php:132
783
+ msgid ""
784
+ "<h4>Attention!</h4><p>These widgets are designed to be embedded in "
785
+ "<strong>external sites only</strong> and may cause conflicts if used within "
786
+ "the same WordPress site.</p>"
787
+ msgstr ""
788
+
789
+ #: app/view/admin/widget-creator.php:134
790
+ msgid ""
791
+ "<p>Use <a href=\"%s\"><strong>Appearance</strong> &gt; <strong>Widgets</"
792
+ "strong></a> to add event widgets to your WordPress site as you would any "
793
+ "other widget, or use <a href=\"%s\" target=\"_blank\">shortcodes</a> to "
794
+ "embed the full calendar.</strong></p>"
795
  msgstr ""
796
 
797
+ #: app/view/admin/widget-creator.php:140
798
  msgid "Paste this code onto your site:"
799
  msgstr ""
800
 
801
+ #: app/view/admin/widget-creator.php:141
802
  msgid ""
803
  "This code will update to reflect changes made to the settings. Changing "
804
  "settings will not affect previously embedded widgets."
805
  msgstr ""
806
 
807
+ #: app/view/calendar/page.php:54
808
  msgid ""
809
  "There was an error loading calendar. Please contact site administrator and "
810
  "inform him to configure calendar views."
811
  msgstr ""
812
 
813
+ #: app/view/calendar/page.php:75
814
  msgid ""
815
  "Calendar was unable to initialize %s view and has reverted to Agenda view. "
816
  "Please check if you have installed the latest versions of calendar add-ons."
817
  msgstr ""
818
 
819
+ #: app/view/calendar/page.php:254
820
  msgid "Subscribe to filtered calendar"
821
  msgstr ""
822
 
823
+ #: app/view/calendar/page.php:255
824
  msgid "Subscribe"
825
  msgstr ""
826
 
827
+ #: app/view/calendar/page.php:256 app/view/event/single.php:102
828
+ msgid "Get a Timely Calendar"
829
  msgstr ""
830
 
831
+ #: app/view/calendar/subscribe-button.php:22
832
  msgid "Add to Timely Calendar"
833
  msgstr ""
834
 
835
+ #: app/view/calendar/subscribe-button.php:23
836
  msgid "Add to Google"
837
  msgstr ""
838
 
839
+ #: app/view/calendar/subscribe-button.php:24
840
  msgid "Add to Outlook"
841
  msgstr ""
842
 
843
+ #: app/view/calendar/subscribe-button.php:25
844
  msgid "Add to Apple Calendar"
845
  msgstr ""
846
 
847
+ #: app/view/calendar/subscribe-button.php:26
848
  msgid "Add to other calendar"
849
  msgstr ""
850
 
851
+ #: app/view/calendar/subscribe-button.php:29
852
  msgid ""
853
  "Copy this URL for your own Timely calendar or click to add to your rich-text "
854
  "calendar"
855
  msgstr ""
856
 
857
+ #: app/view/calendar/subscribe-button.php:30
858
  msgid "Subscribe to this calendar in your Google Calendar"
859
  msgstr ""
860
 
861
+ #: app/view/calendar/subscribe-button.php:31
862
  msgid "Subscribe to this calendar in MS Outlook"
863
  msgstr ""
864
 
865
+ #: app/view/calendar/subscribe-button.php:32
866
  msgid "Subscribe to this calendar in Apple Calendar/iCal"
867
  msgstr ""
868
 
869
+ #: app/view/calendar/subscribe-button.php:33
870
  msgid "Subscribe to this calendar in another plain-text calendar"
871
  msgstr ""
872
 
874
  msgid "Clear category filter"
875
  msgstr ""
876
 
877
+ #: app/view/calendar/taxonomy.php:98 app/view/event/single.php:108
878
  #: lib/html/element/setting/tags-categories.php:47
879
  msgid "Categories"
880
  msgstr ""
883
  msgid "Clear tag filter"
884
  msgstr ""
885
 
886
+ #: app/view/calendar/taxonomy.php:100 app/view/event/single.php:109
887
  #: lib/html/element/setting/tags-categories.php:39
888
  msgid "Tags"
889
  msgstr ""
890
 
891
+ #: app/view/calendar/view/agenda.php:119
892
  msgid "Collapse All"
893
  msgstr ""
894
 
895
+ #: app/view/calendar/view/agenda.php:120
896
  msgid "Expand All"
897
  msgstr ""
898
 
899
+ #: app/view/calendar/view/agenda.php:143
900
  msgid "There are no upcoming events to display at this time."
901
  msgstr ""
902
 
903
+ #: app/view/calendar/view/agenda.php:144 app/view/calendar/widget.php:373
904
  msgid "Edit"
905
  msgstr ""
906
 
907
+ #: app/view/calendar/view/agenda.php:145
908
  msgid "Read more"
909
  msgstr ""
910
 
911
+ #: app/view/calendar/view/agenda.php:146
912
  msgid "Categories:"
913
  msgstr ""
914
 
915
+ #: app/view/calendar/view/agenda.php:147 lib/theme/list.php:320
916
  #: public/admin/themes.php:29
917
  msgid "Tags:"
918
  msgstr ""
919
 
920
+ #: app/view/calendar/view/agenda.php:148 app/view/calendar/view/month.php:81
921
+ #: app/view/calendar/view/oneday.php:100 app/view/calendar/view/week.php:112
922
+ #: app/view/calendar/widget.php:374
923
  msgid "@ %s"
924
  msgstr ""
925
 
926
+ #: app/view/calendar/view/oneday.php:74 app/view/calendar/view/week.php:67
927
  msgid "g a"
928
  msgstr ""
929
 
930
+ #: app/view/calendar/view/oneday.php:97 app/view/calendar/view/week.php:109
931
  msgid "Reveal full day"
932
  msgstr ""
933
 
934
+ #: app/view/calendar/view/oneday.php:98 app/view/calendar/view/week.php:110
935
  msgid "All-day"
936
  msgstr ""
937
 
938
+ #: app/view/calendar/view/oneday.php:99 app/view/calendar/view/week.php:111
939
  msgid "Now:"
940
  msgstr ""
941
 
979
  msgid "Show the subscribe button in the widget"
980
  msgstr ""
981
 
982
+ #: app/view/calendar/widget.php:370
983
  msgid "There are no upcoming events."
984
  msgstr ""
985
 
986
+ #: app/view/calendar/widget.php:371 app/view/event/time.php:132
987
  msgid "all-day"
988
  msgstr ""
989
 
990
+ #: app/view/calendar/widget.php:372
991
  msgid "View Calendar"
992
  msgstr ""
993
 
994
+ #: app/view/calendar/widget.php:375
995
  msgid "Add"
996
  msgstr ""
997
 
998
+ #: app/view/event/content.php:33 app/view/event/single.php:103
999
  msgid "When:"
1000
  msgstr ""
1001
 
1002
+ #: app/view/event/content.php:34 app/view/event/single.php:104
1003
  msgid "Where:"
1004
  msgstr ""
1005
 
1071
  msgid "Event was created in the %s time zone"
1072
  msgstr ""
1073
 
1074
+ #: app/view/event/single.php:98
1075
  msgid "Add to Calendar"
1076
  msgstr ""
1077
 
1078
+ #: app/view/event/single.php:105
1079
  msgid "Cost:"
1080
  msgstr ""
1081
 
1082
+ #: app/view/event/single.php:106
 
1083
  msgid "Contact:"
1084
  msgstr ""
1085
 
1086
+ #: app/view/event/single.php:107
1087
  msgid "Free"
1088
  msgstr ""
1089
 
1090
+ #: app/view/event/single.php:131
1091
  msgid "Edit this occurrence (%s)"
1092
  msgstr ""
1093
 
1094
+ #: app/view/event/single.php:146
1095
  msgid ""
1096
+ "This post was replicated from another site's <a href=\"%s\" title="
1097
+ "\"iCalendar feed\"><i class=\"ai1ec-fa ai1ec-fa-calendar\"></i> calendar "
1098
+ "feed</a>."
1099
  msgstr ""
1100
 
1101
+ #: app/view/event/single.php:157
1102
+ msgid "View original"
1103
  msgstr ""
1104
 
1105
+ #: app/view/event/taxonomy.php:113
1106
  msgid "Category image"
1107
  msgstr ""
1108
 
1130
  msgid "Event website"
1131
  msgstr ""
1132
 
1133
+ #: app/view/event/time.php:84 app/view/event/time.php:118
1134
  msgctxt "Event time separator"
1135
  msgid " @ "
1136
  msgstr ""
1137
 
1138
+ #: app/view/event/time.php:100
1139
  msgctxt "Event start/end separator"
1140
  msgid " – "
1141
  msgstr ""
1142
 
1143
+ #: app/view/event/time.php:166
1144
  msgid ", and "
1145
  msgstr ""
1146
 
1147
+ #: cache/twig/0a/29/c1dadb694d38bbd3df612d552f2b3f8c013559207293814d0b2b4fa0d366.php:53
1148
+ #: public/admin/box_event_location.php:31
1149
+ msgid "Address:"
1150
+ msgstr ""
1151
+
1152
+ #: cache/twig/0a/29/c1dadb694d38bbd3df612d552f2b3f8c013559207293814d0b2b4fa0d366.php:92
1153
+ msgid "Show Google Map"
1154
+ msgstr ""
1155
+
1156
+ #: cache/twig/0a/29/c1dadb694d38bbd3df612d552f2b3f8c013559207293814d0b2b4fa0d366.php:123
1157
+ msgid "Longitude"
1158
  msgstr ""
1159
 
1160
+ #: cache/twig/0a/29/c1dadb694d38bbd3df612d552f2b3f8c013559207293814d0b2b4fa0d366.php:158
1161
+ msgid "Latitude"
1162
  msgstr ""
1163
 
1164
+ #: cache/twig/0a/29/c1dadb694d38bbd3df612d552f2b3f8c013559207293814d0b2b4fa0d366.php:220
1165
+ msgid "Description:"
1166
  msgstr ""
1167
 
1168
+ #: cache/twig/0a/29/c1dadb694d38bbd3df612d552f2b3f8c013559207293814d0b2b4fa0d366.php:253
1169
+ #: public/admin/box_event_contact.php:17
1170
+ msgid "Contact name:"
1171
+ msgstr ""
1172
+
1173
+ #: cache/twig/0a/29/c1dadb694d38bbd3df612d552f2b3f8c013559207293814d0b2b4fa0d366.php:287
1174
+ #: public/admin/box_event_contact.php:30
1175
+ msgid "Phone:"
1176
+ msgstr ""
1177
+
1178
+ #: cache/twig/0a/29/c1dadb694d38bbd3df612d552f2b3f8c013559207293814d0b2b4fa0d366.php:321
1179
+ msgid "Email:"
1180
+ msgstr ""
1181
+
1182
+ #: cache/twig/0a/29/c1dadb694d38bbd3df612d552f2b3f8c013559207293814d0b2b4fa0d366.php:355
1183
+ msgid "External url:"
1184
+ msgstr ""
1185
+
1186
+ #: cache/twig/0a/29/c1dadb694d38bbd3df612d552f2b3f8c013559207293814d0b2b4fa0d366.php:389
1187
  msgid "Seating capacity:"
1188
  msgstr ""
1189
 
1190
+ #: cache/twig/0a/29/c1dadb694d38bbd3df612d552f2b3f8c013559207293814d0b2b4fa0d366.php:422
1191
+ msgid "Handicap Accessible:"
1192
  msgstr ""
1193
 
1194
+ #: cache/twig/0a/29/c1dadb694d38bbd3df612d552f2b3f8c013559207293814d0b2b4fa0d366.php:458
1195
  msgid "Parking:"
1196
  msgstr ""
1197
 
1198
+ #: cache/twig/4b/54/8023eee8659ad1836d2185aae4bf5e8f0ebe217bd262863e58fa4cf1da34.php:37
1199
+ msgid "Your email here"
1200
+ msgstr ""
1201
+
1202
+ #: cache/twig/64/6d/6348de0c3ef39b5536ab38eae718b16c67b3cdfe8a998663cdb1ea4c2d6c.php:24
1203
+ #: public/admin/agenda-widget-form.php:2
1204
+ msgid "Title:"
1205
  msgstr ""
1206
 
1207
+ #: cache/twig/78/3e/57d2212e2837aee7813ecc844f345947f68d3edb57d31388f926a75264db.php:27
1208
+ #: cache/twig/78/3e/57d2212e2837aee7813ecc844f345947f68d3edb57d31388f926a75264db.php:31
1209
+ msgid "Products"
1210
  msgstr ""
1211
 
1212
  #: lib/calendar-feed/ics.php:38
1241
  msgstr[0] ""
1242
  msgstr[1] ""
1243
 
1244
+ #: lib/calendar-feed/ics.php:205 lib/calendar-feed/ics.php:672
1245
  msgid "Invalid ICS feed ID"
1246
  msgstr ""
1247
 
1248
+ #: lib/calendar-feed/ics.php:351
1249
  msgid "Categories (optional)"
1250
  msgstr ""
1251
 
1252
+ #: lib/calendar-feed/ics.php:368
1253
  msgid ""
1254
  "Do you want to keep the events imported from the calendar or remove them?"
1255
  msgstr ""
1256
 
1257
+ #: lib/calendar-feed/ics.php:374
1258
  msgid "Removing ICS Feed"
1259
  msgstr ""
1260
 
1261
+ #: lib/calendar-feed/ics.php:377
1262
  msgid "Keep Events"
1263
  msgstr ""
1264
 
1265
+ #: lib/calendar-feed/ics.php:380
1266
  msgid "Remove Events"
1267
  msgstr ""
1268
 
1269
+ #: lib/calendar-feed/ics.php:664
1270
  msgid "Deleted %d events"
1271
  msgstr ""
1272
 
1273
+ #: lib/calendar-feed/ics.php:699
1274
  msgid "Feed deleted"
1275
  msgstr ""
1276
 
1277
+ #: lib/captcha/provider/nocaptcha.php:31
1278
+ msgid "noCAPTCHA public key:"
1279
+ msgstr ""
1280
+
1281
+ #: lib/captcha/provider/nocaptcha.php:47
1282
+ msgid "noCAPTCHA private key:"
1283
+ msgstr ""
1284
+
1285
+ #: lib/captcha/provider/nocaptcha.php:86
1286
+ #: lib/captcha/provider/recaptcha.php:108
1287
+ msgid "Please try verifying you are human again."
1288
+ msgstr ""
1289
+
1290
+ #: lib/captcha/provider/nocaptcha.php:92 lib/captcha/provider/recaptcha.php:93
1291
  msgid ""
1292
+ "There was an error reading the human verification data. Please try again."
1293
  msgstr ""
1294
 
1295
+ #: lib/captcha/provider/recaptcha.php:32
1296
+ msgid "reCAPTCHA public key:"
1297
+ msgstr ""
1298
+
1299
+ #: lib/captcha/provider/recaptcha.php:48
1300
+ msgid "reCAPTCHA private key:"
1301
+ msgstr ""
1302
+
1303
+ #: lib/captcha/provider/recaptcha.php:66
1304
+ msgid "Human verification"
1305
+ msgstr ""
1306
+
1307
+ #: lib/captcha/provider/recaptcha.php:67
1308
+ msgid "Loading reCAPTCHA..."
1309
  msgstr ""
1310
 
1311
  #: lib/clone/renderer-helper.php:26 lib/clone/renderer-helper.php:27
1325
  msgid "Clone to Draft"
1326
  msgstr ""
1327
 
1328
+ #: lib/command/clone.php:173
1329
  msgid ""
1330
  "<p>The event <strong>%s</strong> was cloned succesfully. <a href=\"%s\">Edit "
1331
  "cloned event</a></p>"
1332
  msgstr ""
1333
 
1334
+ #: lib/compatibility/check.php:63
1335
+ msgid ""
1336
+ "You have turned on Frontend Rendering and you are using a custom calendar "
1337
+ "theme. If your theme does not support Frontend Rendering, your calendar may "
1338
+ "not work correctly."
1339
+ msgstr ""
1340
+
1341
+ #: lib/css/frontend.php:239
1342
  msgid ""
1343
  "CSS compilation failed because you don't have enough free memory (a minimum "
1344
  "of %s is needed). Your calendar will not render or function properly without "
1347
  "PHP memory limit."
1348
  msgstr ""
1349
 
1350
+ #: lib/css/frontend.php:266
1351
  msgid ""
1352
  "The LESS file compiled correctly but there was an error while saving the "
1353
  "generated CSS to persistence."
1354
  msgstr ""
1355
 
1356
+ #: lib/css/frontend.php:272
1357
  msgid ""
1358
  "<p><strong>There was an error while compiling CSS.</strong> The message "
1359
  "returned was: <em>%s</em></p>"
1360
  msgstr ""
1361
 
1362
+ #: lib/css/frontend.php:300
1363
  msgid ""
1364
  "Theme options were successfully reset to their default values. <a "
1365
  "href='%s'>Visit site</a>"
1366
  msgstr ""
1367
 
1368
+ #: lib/css/frontend.php:307
1369
  msgid "Theme options were updated successfully. <a href='%s'>Visit site</a>"
1370
  msgstr ""
1371
 
1372
+ #: lib/css/frontend.php:343
1373
  msgid ""
1374
  "Your CSS is being compiled on every request, which causes your calendar to "
1375
  "perform slowly. The following error occurred: %s"
1390
  msgid "Error encountered: %s"
1391
  msgstr ""
1392
 
1393
+ #: lib/date/system.php:176
1394
  msgid "GMT%+d:%02d"
1395
  msgstr ""
1396
 
1416
  msgid "Choose your timezone"
1417
  msgstr ""
1418
 
1419
+ #: lib/environment/check.php:55
1420
  msgid "Select an option in the <strong>Calendar page</strong> dropdown list."
1421
  msgstr ""
1422
 
1423
+ #: lib/environment/check.php:68
1424
  msgid ""
1425
  "The plugin is installed, but has not been configured. <a href=\"%s\">Click "
1426
  "here to set it up now &raquo;</a>"
1427
  msgstr ""
1428
 
1429
+ #: lib/environment/check.php:78
1430
  msgid ""
1431
  "The plugin is installed, but has not been configured. Please log in as an "
1432
  "Administrator to set it up."
1433
  msgstr ""
1434
 
1435
+ #: lib/environment/check.php:196
1436
+ msgid ""
1437
+ "The add-on <strong>%s</strong> must be updated to at least version %s to "
1438
+ "maintain compatibility with the core calendar."
1439
+ msgstr ""
1440
+
1441
+ #: lib/environment/check.php:197
1442
+ msgid ""
1443
+ "If you do not see update notices below, ensure you have properly <a href="
1444
+ "\"https://time.ly/document/user-guide/getting-started/license-keys/\" target="
1445
+ "\"_blank\">entered your licence keys</a>. Alternatively, navigate to <a href="
1446
+ "\"https://time.ly/your-account/\">your account</a> to download the latest "
1447
+ "version of the add-on(s) and <a href=\"http://time.ly/document/user-guide/"
1448
+ "troubleshooting/perform-manual-upgrade/\">update manually</a>. Please <a "
1449
+ "href=\"https://time.ly/forums/\">post in the forum</a> if you have trouble. "
1450
+ "We are happy to help."
1451
  msgstr ""
1452
 
1453
  #: lib/exception/handler.php:176
1454
+ msgid "The add-on \"%s\" has been disabled due to an error:"
1455
  msgstr ""
1456
 
1457
+ #: lib/exception/handler.php:395
1458
+ msgid "All-in-One Event Calendar has been disabled due to an error:"
1459
  msgstr ""
1460
 
1461
+ #: lib/exception/handler.php:404
1462
+ msgid "Try reactivating plugin"
1463
+ msgstr ""
1464
+
1465
+ #: lib/exception/handler.php:576
1466
+ msgid "Toggle error details"
1467
+ msgstr ""
1468
+
1469
+ #: lib/exception/handler.php:577
1470
+ msgid "Error Details:"
1471
  msgstr ""
1472
 
1473
  #: lib/factory/html.php:128
1661
  msgid "Length"
1662
  msgstr ""
1663
 
1664
+ #: lib/notification/admin.php:180 public/admin/box_profile_timezone.php:2
1665
  msgid "All-in-One Event Calendar"
1666
  msgstr ""
1667
 
1668
+ #: lib/notification/admin.php:182
1669
+ msgid "Got it – dismiss this"
1670
+ msgstr ""
1671
+
1672
  #: lib/post/custom-type.php:26
1673
  msgctxt "Custom post type name"
1674
  msgid "Events"
1721
 
1722
  #: lib/post/custom-type.php:85
1723
  msgctxt "Event categories taxonomy"
1724
+ msgid "Categories"
1725
  msgstr ""
1726
 
1727
  #: lib/post/custom-type.php:86
1728
  msgctxt "Event categories taxonomy (singular)"
1729
+ msgid "Category"
1730
  msgstr ""
1731
 
1732
+ #: lib/post/custom-type.php:87
1733
+ msgctxt "Event categories menu item"
1734
+ msgid "Organize"
1735
  msgstr ""
1736
 
1737
  #: lib/post/custom-type.php:94
1738
+ msgctxt "Event tags taxonomy"
1739
+ msgid "Tags"
1740
+ msgstr ""
1741
+
1742
+ #: lib/post/custom-type.php:95
1743
  msgctxt "Event tags taxonomy (singular)"
1744
+ msgid "Tag"
1745
  msgstr ""
1746
 
1747
+ #: lib/post/custom-type.php:102
1748
  msgctxt "Event feeds taxonomy"
1749
  msgid "Event Feeds"
1750
  msgstr ""
1751
 
1752
+ #: lib/post/custom-type.php:103
1753
  msgctxt "Event feed taxonomy (singular)"
1754
  msgid "Event Feed"
1755
  msgstr ""
1756
 
1757
+ #: lib/post/custom-type.php:279
1758
  msgid ""
1759
  "All Events <span class=\"update-plugins count-%d\" title=\"%d Pending Events"
1760
  "\"><span class=\"update-count\">%d</span></span>"
1761
  msgstr ""
1762
 
1763
+ #: lib/post/custom-type.php:290
1764
  msgid "All Events"
1765
  msgstr ""
1766
 
1767
+ #: lib/recurrence/rule.php:225 lib/recurrence/rule.php:234
1768
+ #: lib/recurrence/rule.php:242
1769
  msgctxt "Recurrence editor - weekly tab"
1770
  msgid "on"
1771
  msgstr ""
1772
 
1773
+ #: lib/recurrence/rule.php:230 lib/recurrence/rule.php:259
1774
+ #: lib/recurrence/rule.php:307
1775
  msgid "and"
1776
  msgstr ""
1777
 
1778
+ #: lib/recurrence/rule.php:255 lib/recurrence/rule.php:262
1779
+ #: lib/recurrence/rule.php:268 lib/recurrence/rule.php:289
1780
  msgctxt "Recurrence editor - monthly tab"
1781
  msgid "on"
1782
  msgstr ""
1783
 
1784
+ #: lib/recurrence/rule.php:255 lib/recurrence/rule.php:262
1785
+ #: lib/recurrence/rule.php:268
1786
  msgid "of the month"
1787
  msgstr ""
1788
 
1789
+ #: lib/recurrence/rule.php:302 lib/recurrence/rule.php:310
1790
+ #: lib/recurrence/rule.php:317
1791
  msgctxt "Recurrence editor - yearly tab"
1792
  msgid "on"
1793
  msgstr ""
1794
 
1795
+ #: lib/recurrence/rule.php:357 public/admin/box_repeat.php:16
1796
  #: public/admin/cron_freq.php:9
1797
  msgid "Daily"
1798
  msgstr ""
1799
 
1800
+ #: lib/recurrence/rule.php:360
1801
  msgid "Every other day"
1802
  msgstr ""
1803
 
1804
+ #: lib/recurrence/rule.php:363
1805
  msgid "Every %d days"
1806
  msgstr ""
1807
 
1808
+ #: lib/recurrence/rule.php:372 public/admin/box_repeat.php:21
1809
  msgid "Weekly"
1810
  msgstr ""
1811
 
1812
+ #: lib/recurrence/rule.php:375
1813
  msgid "Every other week"
1814
  msgstr ""
1815
 
1816
+ #: lib/recurrence/rule.php:378
1817
  msgid "Every %d weeks"
1818
  msgstr ""
1819
 
1820
+ #: lib/recurrence/rule.php:387 public/admin/box_repeat.php:26
1821
  msgid "Monthly"
1822
  msgstr ""
1823
 
1824
+ #: lib/recurrence/rule.php:390
1825
  msgid "Every other month"
1826
  msgstr ""
1827
 
1828
+ #: lib/recurrence/rule.php:393
1829
  msgid "Every %d months"
1830
  msgstr ""
1831
 
1832
+ #: lib/recurrence/rule.php:402 public/admin/box_repeat.php:31
1833
  msgid "Yearly"
1834
  msgstr ""
1835
 
1836
+ #: lib/recurrence/rule.php:405
1837
  msgid "Every other year"
1838
  msgstr ""
1839
 
1840
+ #: lib/recurrence/rule.php:408
1841
  msgid "Every %d years"
1842
  msgstr ""
1843
 
1844
+ #: lib/recurrence/rule.php:446
1845
  msgid "until %s"
1846
  msgstr ""
1847
 
1848
+ #: lib/recurrence/rule.php:456
1849
  msgid "for %d occurrences"
1850
  msgstr ""
1851
 
1852
+ #: lib/recurrence/rule.php:460
1853
  msgid "forever"
1854
  msgstr ""
1855
 
1891
  "administrator to add more themes."
1892
  msgstr ""
1893
 
1894
+ #: lib/theme/list.php:257
1895
  msgid "Activate &#8220;%s&#8221;"
1896
  msgstr ""
1897
 
1898
+ #: lib/theme/list.php:264
1899
  msgid "Activate"
1900
  msgstr ""
1901
 
1902
  #. translators: 1: theme title, 2: theme version, 3: theme author
1903
+ #: lib/theme/list.php:281 public/admin/themes.php:25
1904
  msgid "%1$s %2$s by %3$s"
1905
  msgstr ""
1906
 
1907
  #. translators: 1: theme title, 2: template dir, 3: stylesheet_dir, 4: theme
1908
  #. title, 5: parent_theme
1909
+ #: lib/theme/list.php:293
1910
  msgid ""
1911
  "The template files are located in <code>%2$s</code>. The stylesheet files "
1912
  "are located in <code>%3$s</code>. <strong>%4$s</strong> uses templates from "
1913
  "<strong>%5$s</strong>. Changes made to the templates will affect both themes."
1914
  msgstr ""
1915
 
1916
+ #: lib/theme/list.php:308
1917
  msgid "All of this theme&#8217;s files are located in <code>%2$s</code>."
1918
  msgstr ""
1919
 
1920
+ #: lib/theme/loader.php:323
1921
  msgid "We couldn't find a suitable loader for filename with extension '%s'"
1922
  msgstr ""
1923
 
1924
+ #: lib/theme/loader.php:629
1925
+ msgid ""
1926
+ "Your calendar theme has been switched to Vortex due to a rendering problem. "
1927
+ "For more information, please enable debug mode by adding this line to your "
1928
+ "WordPress <code>wp-config.php</code> file:<pre>define( 'AI1EC_DEBUG', true );"
1929
+ "</pre>"
1930
+ msgstr ""
1931
+
1932
  #: lib/theme/search.php:253
1933
  msgid ""
1934
  "Unable to move your old core themes from <code>wp-content/themes-ai1ec</"
1944
  "remove your old core themes from <code>wp-content/themes-ai1ec/%s</code>."
1945
  msgstr ""
1946
 
1947
+ #: lib/twig/environment.php:115
1948
  msgid ""
1949
+ "The calendar is temporarily disabled due to a rendering error. Please <a "
1950
+ "href=\"javascript:location.reload();\">reload the page</a>."
 
 
 
 
 
1951
  msgstr ""
1952
 
1953
  #: public/admin/agenda-widget-form.php:12
2014
  msgid "Organizer contact info"
2015
  msgstr ""
2016
 
 
 
 
 
 
 
 
 
2017
  #: public/admin/box_event_contact.php:43
2018
  msgid "E-mail:"
2019
  msgstr ""
2046
  msgid "Event location details"
2047
  msgstr ""
2048
 
2049
+ #: public/admin/box_event_location.php:19
2050
  msgid "Venue name:"
2051
  msgstr ""
2052
 
2053
+ #: public/admin/box_event_location.php:45
2054
+ msgid "Input Coordinates"
 
 
 
 
2055
  msgstr ""
2056
 
2057
  #: public/admin/box_event_location.php:57
2058
+ msgid "Latitude:"
2059
  msgstr ""
2060
 
2061
  #: public/admin/box_event_location.php:69
2062
  msgid "Longitude:"
2063
  msgstr ""
2064
 
2065
+ #: public/admin/box_event_location.php:85
2066
+ msgid "Show Map"
2067
  msgstr ""
2068
 
2069
  #: public/admin/box_eventbrite.php:1
2076
 
2077
  #: public/admin/box_eventbrite.php:12 public/admin/feed_row.php:28
2078
  #: public/admin/feed_row.php:38 public/admin/feed_row.php:49
2079
+ #: public/admin/feed_row.php:59 public/admin/feed_row.php:71
2080
  msgid "Yes"
2081
  msgstr ""
2082
 
2083
  #: public/admin/box_eventbrite.php:14 public/admin/feed_row.php:30
2084
  #: public/admin/feed_row.php:40 public/admin/feed_row.php:51
2085
+ #: public/admin/feed_row.php:61 public/admin/feed_row.php:73
2086
  msgid "No"
2087
  msgstr ""
2088
 
2162
  msgid "Send an Invoice"
2163
  msgstr ""
2164
 
 
 
 
 
2165
  #: public/admin/box_profile_timezone.php:9
2166
  msgid "Your preferred timezone"
2167
  msgstr ""
2170
  msgid "Select recurrence pattern:"
2171
  msgstr ""
2172
 
2173
+ #: public/admin/box_repeat.php:36
2174
+ msgid "Custom"
2175
+ msgstr ""
2176
+
2177
+ #: public/admin/box_repeat.php:72
2178
  msgid "End"
2179
  msgstr ""
2180
 
2181
+ #: public/admin/box_repeat.php:82
2182
  msgid "Ending after"
2183
  msgstr ""
2184
 
2185
+ #: public/admin/box_repeat.php:109
2186
+ #: public/admin/plugins/ics/display_feeds.php:89
2187
  msgid "Please wait&#8230;"
2188
  msgstr ""
2189
 
2190
+ #: public/admin/box_repeat.php:111
2191
  msgid "Apply"
2192
  msgstr ""
2193
 
2194
+ #: public/admin/box_repeat.php:116
2195
  msgid "Cancel"
2196
  msgstr ""
2197
 
2269
  msgid "Choose a rule for exclusion"
2270
  msgstr ""
2271
 
 
 
 
 
 
 
 
 
 
 
 
 
2272
  #: public/admin/calendar_tasks.php:3
2273
  msgid "Welcome"
2274
  msgstr ""
2360
  msgstr ""
2361
 
2362
  #: public/admin/feed_row.php:56 public/admin/plugins/ics/display_feeds.php:72
2363
+ msgid ""
2364
+ "On refresh, preserve previously imported events that are missing from the "
2365
+ "feed"
2366
  msgstr ""
2367
 
2368
+ #: public/admin/feed_row.php:66 public/admin/plugins/ics/display_feeds.php:79
2369
+ msgid ""
2370
+ "Guesses the time zone of events that have none specified; recommended for "
2371
+ "Google Calendar feeds"
2372
+ msgstr ""
2373
+
2374
+ #: public/admin/feed_row.php:67 public/admin/plugins/ics/display_feeds.php:80
2375
+ msgid "Assign default time zone to events in UTC"
2376
+ msgstr ""
2377
+
2378
+ #: public/admin/feed_row.php:83
2379
  msgid "Refreshing&#8230;"
2380
  msgstr ""
2381
 
2382
+ #: public/admin/feed_row.php:85
2383
  msgid "Refresh"
2384
  msgstr ""
2385
 
2386
+ #: public/admin/feed_row.php:92
2387
  msgid "Removing&#8230;"
2388
  msgstr ""
2389
 
2390
+ #: public/admin/feed_row.php:94
2391
  msgid "Remove"
2392
  msgstr ""
2393
 
2420
  "Import any tags/categories provided by feed, in addition those selected above"
2421
  msgstr ""
2422
 
2423
+ #: public/admin/plugins/ics/display_feeds.php:91
2424
  msgid "Add new subscription"
2425
  msgstr ""
2426
 
2427
+ #: public/admin/row_custom.php:3
2428
+ msgid "Custom dates:"
2429
+ msgstr ""
2430
+
2431
  #: public/admin/row_daily.php:3 public/admin/row_monthly.php:3
2432
  #: public/admin/row_monthly.php:39 public/admin/row_weekly.php:3
2433
  #: public/admin/row_yearly.php:3
2460
  msgid "The active theme is broken. Reverting to the default theme."
2461
  msgstr ""
2462
 
2463
+ #: public/admin/themes-install.php:13
2464
+ msgid ""
2465
+ "New theme activated. This theme supports widgets, please visit the <a href="
2466
+ "\"%s\">widgets settings</a> screen to configure them."
2467
+ msgstr ""
2468
+
2469
+ #: public/admin/themes-install.php:20 public/admin/themes.php:4
2470
  msgid "New theme activated. <a href=\"%s\">Visit site</a>"
2471
  msgstr ""
2472
 
2473
+ #: public/admin/themes-install.php:26 public/admin/themes.php:10
2474
  msgid "Theme deleted."
2475
  msgstr ""
2476
 
2477
+ #: public/admin/themes-install.php:37 public/admin/themes-install.php:44
2478
  msgid "Manage Themes"
2479
  msgstr ""
2480
 
2481
+ #: public/admin/themes-install.php:40
2482
  msgctxt "theme"
2483
  msgid "Install Themes"
2484
  msgstr ""
2722
  msgid "All-in-One Event Calendar by Time.ly"
2723
  msgstr ""
2724
 
2725
+ #. #-#-#-#-# all-in-one-event-calendar.pot (All-in-One Event Calendar by Time.ly 2.2.0) #-#-#-#-#
2726
  #. Plugin URI of the plugin/theme
2727
+ #. #-#-#-#-# all-in-one-event-calendar.pot (All-in-One Event Calendar by Time.ly 2.2.0) #-#-#-#-#
2728
  #. Author URI of the plugin/theme
2729
  msgid "http://time.ly/"
2730
  msgstr ""
lib/bootstrap/loader-map.php CHANGED
@@ -149,6 +149,13 @@
149
  'i' => 'g',
150
  'r' => 'y',
151
  ),
 
 
 
 
 
 
 
152
  'Ai1ec_Calendar_View_Abstract' =>
153
  array (
154
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'view' . DIRECTORY_SEPARATOR . 'calendar' . DIRECTORY_SEPARATOR . 'view' . DIRECTORY_SEPARATOR . 'abstract.php',
@@ -184,10 +191,31 @@
184
  'i' => 'g',
185
  'r' => 'y',
186
  ),
187
- 'Ai1ec_Captcha_Validator' =>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
188
  array (
189
- 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'captcha' . DIRECTORY_SEPARATOR . 'validator.php',
190
- 'c' => 'Ai1ec_Captcha_Validator',
191
  'i' => 'g',
192
  'r' => 'y',
193
  ),
@@ -289,6 +317,13 @@
289
  'i' => 'g',
290
  'r' => 'y',
291
  ),
 
 
 
 
 
 
 
292
  'Ai1ec_Compatibility_Cli' =>
293
  array (
294
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'compatibility' . DIRECTORY_SEPARATOR . 'cli.php',
@@ -469,6 +504,12 @@
469
  'i' => 'g',
470
  'r' => 'y',
471
  ),
 
 
 
 
 
 
472
  'Ai1ec_Email_Notification' =>
473
  array (
474
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'notification' . DIRECTORY_SEPARATOR . 'email.php',
@@ -710,6 +751,13 @@
710
  'c' => 'Ai1ec_Filesystem_Checker',
711
  'i' => 'g',
712
  ),
 
 
 
 
 
 
 
713
  'Ai1ec_Filter_Authors' =>
714
  array (
715
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'model' . DIRECTORY_SEPARATOR . 'filter' . DIRECTORY_SEPARATOR . 'auth_ids.php',
@@ -770,6 +818,12 @@
770
  'c' => 'Ai1ec_Front_Controller',
771
  'i' => 'g',
772
  ),
 
 
 
 
 
 
773
  'Ai1ec_Html_Element' =>
774
  array (
775
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'html' . DIRECTORY_SEPARATOR . 'element' . DIRECTORY_SEPARATOR . 'legacy' . DIRECTORY_SEPARATOR . 'abstract' . DIRECTORY_SEPARATOR . 'html-element.php',
@@ -843,6 +897,13 @@
843
  'i' => 'n',
844
  'r' => 'y',
845
  ),
 
 
 
 
 
 
 
846
  'Ai1ec_Html_Setting_Select' =>
847
  array (
848
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'html' . DIRECTORY_SEPARATOR . 'element' . DIRECTORY_SEPARATOR . 'setting' . DIRECTORY_SEPARATOR . 'select.php',
@@ -1523,6 +1584,13 @@
1523
  'i' => 'g',
1524
  'r' => 'y',
1525
  ),
 
 
 
 
 
 
 
1526
  'Ai1ec_View_Theme_Options' =>
1527
  array (
1528
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'view' . DIRECTORY_SEPARATOR . 'admin' . DIRECTORY_SEPARATOR . 'theme-options.php',
@@ -2588,10 +2656,22 @@
2588
  'c' => 'Twig_TokenStream',
2589
  'i' => 'g',
2590
  ),
2591
- '__TwigTemplate_0684621a646f05b5a766c026906b771c4337fc405c1b3c1d69a8fbaeabcb6bed' =>
2592
  array (
2593
- 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '06' . DIRECTORY_SEPARATOR . '84' . DIRECTORY_SEPARATOR . '621a646f05b5a766c026906b771c4337fc405c1b3c1d69a8fbaeabcb6bed.php',
2594
- 'c' => '__TwigTemplate_0684621a646f05b5a766c026906b771c4337fc405c1b3c1d69a8fbaeabcb6bed',
 
 
 
 
 
 
 
 
 
 
 
 
2595
  'i' => 'g',
2596
  ),
2597
  '__TwigTemplate_1e5432b0e902b671ed3fcd14576f09d81b1191dde849883c977f7ecef7772569' =>
@@ -2600,40 +2680,106 @@
2600
  'c' => '__TwigTemplate_1e5432b0e902b671ed3fcd14576f09d81b1191dde849883c977f7ecef7772569',
2601
  'i' => 'g',
2602
  ),
2603
- '__TwigTemplate_32f865da636513022c2eb1915b5833b32931b813cf5a32802ae8914631d1f9eb' =>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2604
  array (
2605
- 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '32' . DIRECTORY_SEPARATOR . 'f8' . DIRECTORY_SEPARATOR . '65da636513022c2eb1915b5833b32931b813cf5a32802ae8914631d1f9eb.php',
2606
- 'c' => '__TwigTemplate_32f865da636513022c2eb1915b5833b32931b813cf5a32802ae8914631d1f9eb',
2607
  'i' => 'g',
2608
  ),
2609
- '__TwigTemplate_3edf0a48ad93b6410b5057f1a865487cb6829bbba056c1f3973021023575a51d' =>
2610
  array (
2611
- 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '3e' . DIRECTORY_SEPARATOR . 'df' . DIRECTORY_SEPARATOR . '0a48ad93b6410b5057f1a865487cb6829bbba056c1f3973021023575a51d.php',
2612
- 'c' => '__TwigTemplate_3edf0a48ad93b6410b5057f1a865487cb6829bbba056c1f3973021023575a51d',
2613
  'i' => 'g',
2614
  ),
2615
- '__TwigTemplate_75e6b2e32d6608bddecd99f899688d79207fd73582391d92a40780869bbbcb62' =>
2616
  array (
2617
- 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '75' . DIRECTORY_SEPARATOR . 'e6' . DIRECTORY_SEPARATOR . 'b2e32d6608bddecd99f899688d79207fd73582391d92a40780869bbbcb62.php',
2618
- 'c' => '__TwigTemplate_75e6b2e32d6608bddecd99f899688d79207fd73582391d92a40780869bbbcb62',
2619
  'i' => 'g',
2620
  ),
2621
- '__TwigTemplate_867e0c73bdac092c15333c3d2745fe9ab1cb9675c162eaad777c6845699dc00d' =>
2622
  array (
2623
- 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '86' . DIRECTORY_SEPARATOR . '7e' . DIRECTORY_SEPARATOR . '0c73bdac092c15333c3d2745fe9ab1cb9675c162eaad777c6845699dc00d.php',
2624
- 'c' => '__TwigTemplate_867e0c73bdac092c15333c3d2745fe9ab1cb9675c162eaad777c6845699dc00d',
2625
  'i' => 'g',
2626
  ),
2627
- '__TwigTemplate_a0df98501543df6214665ba1f6575d3f9529a17320029316094b4b775a4ef65e' =>
2628
  array (
2629
- 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'a0' . DIRECTORY_SEPARATOR . 'df' . DIRECTORY_SEPARATOR . '98501543df6214665ba1f6575d3f9529a17320029316094b4b775a4ef65e.php',
2630
- 'c' => '__TwigTemplate_a0df98501543df6214665ba1f6575d3f9529a17320029316094b4b775a4ef65e',
2631
  'i' => 'g',
2632
  ),
2633
- '__TwigTemplate_bf06321a21a78156137a8c2d863c68d2c2e62f1486bb557025d5f1403558e7c9' =>
2634
  array (
2635
- 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'bf' . DIRECTORY_SEPARATOR . '06' . DIRECTORY_SEPARATOR . '321a21a78156137a8c2d863c68d2c2e62f1486bb557025d5f1403558e7c9.php',
2636
- 'c' => '__TwigTemplate_bf06321a21a78156137a8c2d863c68d2c2e62f1486bb557025d5f1403558e7c9',
2637
  'i' => 'g',
2638
  ),
2639
  'acl.aco' =>
@@ -2759,16 +2905,44 @@
2759
  'i' => 'g',
2760
  'r' => 'y',
2761
  ),
 
 
 
 
 
 
 
2762
  'calendarComponent' =>
2763
  array (
2764
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'iCal' . DIRECTORY_SEPARATOR . 'iCalcreator-2.20' . DIRECTORY_SEPARATOR . 'iCalcreator.class.php',
2765
  'c' => 'calendarComponent',
2766
  'i' => 'g',
2767
  ),
2768
- 'captcha.validator' =>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2769
  array (
2770
- 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'captcha' . DIRECTORY_SEPARATOR . 'validator.php',
2771
- 'c' => 'Ai1ec_Captcha_Validator',
2772
  'i' => 'g',
2773
  'r' => 'y',
2774
  ),
@@ -2870,6 +3044,13 @@
2870
  'i' => 'g',
2871
  'r' => 'y',
2872
  ),
 
 
 
 
 
 
 
2873
  'compatibility.cli' =>
2874
  array (
2875
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'compatibility' . DIRECTORY_SEPARATOR . 'cli.php',
@@ -3132,6 +3313,12 @@
3132
  'c' => 'EDD_SL_Plugin_Updater',
3133
  'i' => 'g',
3134
  ),
 
 
 
 
 
 
3135
  'environment.check' =>
3136
  array (
3137
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'environment' . DIRECTORY_SEPARATOR . 'check.php',
@@ -3225,6 +3412,13 @@
3225
  'c' => 'Ai1ec_Filesystem_Checker',
3226
  'i' => 'g',
3227
  ),
 
 
 
 
 
 
 
3228
  'html.element.href' =>
3229
  array (
3230
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'html' . DIRECTORY_SEPARATOR . 'element' . DIRECTORY_SEPARATOR . 'href.php',
@@ -3257,6 +3451,13 @@
3257
  'i' => 'n',
3258
  'r' => 'y',
3259
  ),
 
 
 
 
 
 
 
3260
  'html.element.setting.abstract' =>
3261
  array (
3262
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'html' . DIRECTORY_SEPARATOR . 'element' . DIRECTORY_SEPARATOR . 'setting' . DIRECTORY_SEPARATOR . 'abstract.php',
@@ -3339,6 +3540,12 @@
3339
  'c' => 'Ai1ec_Html_Helper',
3340
  'i' => 'g',
3341
  ),
 
 
 
 
 
 
3342
  'http.request' =>
3343
  array (
3344
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'http' . DIRECTORY_SEPARATOR . 'request.php',
@@ -4065,10 +4272,22 @@
4065
  'i' => 'g',
4066
  'r' => 'y',
4067
  ),
4068
- 'twig.06.84.621a646f05b5a766c026906b771c4337fc405c1b3c1d69a8fbaeabcb6bed' =>
4069
  array (
4070
- 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '06' . DIRECTORY_SEPARATOR . '84' . DIRECTORY_SEPARATOR . '621a646f05b5a766c026906b771c4337fc405c1b3c1d69a8fbaeabcb6bed.php',
4071
- 'c' => '__TwigTemplate_0684621a646f05b5a766c026906b771c4337fc405c1b3c1d69a8fbaeabcb6bed',
 
 
 
 
 
 
 
 
 
 
 
 
4072
  'i' => 'g',
4073
  ),
4074
  'twig.1e.54.32b0e902b671ed3fcd14576f09d81b1191dde849883c977f7ecef7772569' =>
@@ -4077,28 +4296,70 @@
4077
  'c' => '__TwigTemplate_1e5432b0e902b671ed3fcd14576f09d81b1191dde849883c977f7ecef7772569',
4078
  'i' => 'g',
4079
  ),
4080
- 'twig.32.f8.65da636513022c2eb1915b5833b32931b813cf5a32802ae8914631d1f9eb' =>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4081
  array (
4082
- 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '32' . DIRECTORY_SEPARATOR . 'f8' . DIRECTORY_SEPARATOR . '65da636513022c2eb1915b5833b32931b813cf5a32802ae8914631d1f9eb.php',
4083
- 'c' => '__TwigTemplate_32f865da636513022c2eb1915b5833b32931b813cf5a32802ae8914631d1f9eb',
4084
  'i' => 'g',
4085
  ),
4086
- 'twig.3e.df.0a48ad93b6410b5057f1a865487cb6829bbba056c1f3973021023575a51d' =>
4087
  array (
4088
- 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '3e' . DIRECTORY_SEPARATOR . 'df' . DIRECTORY_SEPARATOR . '0a48ad93b6410b5057f1a865487cb6829bbba056c1f3973021023575a51d.php',
4089
- 'c' => '__TwigTemplate_3edf0a48ad93b6410b5057f1a865487cb6829bbba056c1f3973021023575a51d',
4090
  'i' => 'g',
4091
  ),
4092
- 'twig.75.e6.b2e32d6608bddecd99f899688d79207fd73582391d92a40780869bbbcb62' =>
4093
  array (
4094
- 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '75' . DIRECTORY_SEPARATOR . 'e6' . DIRECTORY_SEPARATOR . 'b2e32d6608bddecd99f899688d79207fd73582391d92a40780869bbbcb62.php',
4095
- 'c' => '__TwigTemplate_75e6b2e32d6608bddecd99f899688d79207fd73582391d92a40780869bbbcb62',
4096
  'i' => 'g',
4097
  ),
4098
- 'twig.86.7e.0c73bdac092c15333c3d2745fe9ab1cb9675c162eaad777c6845699dc00d' =>
4099
  array (
4100
- 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '86' . DIRECTORY_SEPARATOR . '7e' . DIRECTORY_SEPARATOR . '0c73bdac092c15333c3d2745fe9ab1cb9675c162eaad777c6845699dc00d.php',
4101
- 'c' => '__TwigTemplate_867e0c73bdac092c15333c3d2745fe9ab1cb9675c162eaad777c6845699dc00d',
 
 
 
 
 
 
4102
  'i' => 'g',
4103
  ),
4104
  'twig.Compiler' =>
@@ -5037,10 +5298,16 @@
5037
  'c' => 'Twig_TokenStream',
5038
  'i' => 'g',
5039
  ),
5040
- 'twig.a0.df.98501543df6214665ba1f6575d3f9529a17320029316094b4b775a4ef65e' =>
 
 
 
 
 
 
5041
  array (
5042
- 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'a0' . DIRECTORY_SEPARATOR . 'df' . DIRECTORY_SEPARATOR . '98501543df6214665ba1f6575d3f9529a17320029316094b4b775a4ef65e.php',
5043
- 'c' => '__TwigTemplate_a0df98501543df6214665ba1f6575d3f9529a17320029316094b4b775a4ef65e',
5044
  'i' => 'g',
5045
  ),
5046
  'twig.ai1ec-extension' =>
@@ -5049,10 +5316,10 @@
5049
  'c' => 'Ai1ec_Twig_Ai1ec_Extension',
5050
  'i' => 'g',
5051
  ),
5052
- 'twig.bf.06.321a21a78156137a8c2d863c68d2c2e62f1486bb557025d5f1403558e7c9' =>
5053
  array (
5054
- 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'bf' . DIRECTORY_SEPARATOR . '06' . DIRECTORY_SEPARATOR . '321a21a78156137a8c2d863c68d2c2e62f1486bb557025d5f1403558e7c9.php',
5055
- 'c' => '__TwigTemplate_bf06321a21a78156137a8c2d863c68d2c2e62f1486bb557025d5f1403558e7c9',
5056
  'i' => 'g',
5057
  ),
5058
  'twig.cache' =>
@@ -5062,12 +5329,30 @@
5062
  'i' => 'g',
5063
  'r' => 'y',
5064
  ),
 
 
 
 
 
 
5065
  'twig.environment' =>
5066
  array (
5067
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'environment.php',
5068
  'c' => 'Ai1ec_Twig_Environment',
5069
  'i' => 'g',
5070
  ),
 
 
 
 
 
 
 
 
 
 
 
 
5071
  'twig.loader' =>
5072
  array (
5073
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'loader.php',
@@ -5174,6 +5459,13 @@
5174
  'i' => 'g',
5175
  'r' => 'y',
5176
  ),
 
 
 
 
 
 
 
5177
  'view.admin.settings' =>
5178
  array (
5179
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'view' . DIRECTORY_SEPARATOR . 'admin' . DIRECTORY_SEPARATOR . 'settings.php',
149
  'i' => 'g',
150
  'r' => 'y',
151
  ),
152
+ 'Ai1ec_Calendar_State' =>
153
+ array (
154
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'calendar' . DIRECTORY_SEPARATOR . 'state.php',
155
+ 'c' => 'Ai1ec_Calendar_State',
156
+ 'i' => 'g',
157
+ 'r' => 'y',
158
+ ),
159
  'Ai1ec_Calendar_View_Abstract' =>
160
  array (
161
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'view' . DIRECTORY_SEPARATOR . 'calendar' . DIRECTORY_SEPARATOR . 'view' . DIRECTORY_SEPARATOR . 'abstract.php',
191
  'i' => 'g',
192
  'r' => 'y',
193
  ),
194
+ 'Ai1ec_Captcha_Nocaptcha_Provider' =>
195
+ array (
196
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'captcha' . DIRECTORY_SEPARATOR . 'provider' . DIRECTORY_SEPARATOR . 'nocaptcha.php',
197
+ 'c' => 'Ai1ec_Captcha_Nocaptcha_Provider',
198
+ 'i' => 'g',
199
+ 'r' => 'y',
200
+ ),
201
+ 'Ai1ec_Captcha_Provider' =>
202
+ array (
203
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'captcha' . DIRECTORY_SEPARATOR . 'provider.php',
204
+ 'c' => 'Ai1ec_Captcha_Provider',
205
+ 'i' => 'g',
206
+ 'r' => 'y',
207
+ ),
208
+ 'Ai1ec_Captcha_Providers' =>
209
+ array (
210
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'captcha' . DIRECTORY_SEPARATOR . 'providers.php',
211
+ 'c' => 'Ai1ec_Captcha_Providers',
212
+ 'i' => 'g',
213
+ 'r' => 'y',
214
+ ),
215
+ 'Ai1ec_Captcha_Recaptcha_Provider' =>
216
  array (
217
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'captcha' . DIRECTORY_SEPARATOR . 'provider' . DIRECTORY_SEPARATOR . 'recaptcha.php',
218
+ 'c' => 'Ai1ec_Captcha_Recaptcha_Provider',
219
  'i' => 'g',
220
  'r' => 'y',
221
  ),
317
  'i' => 'g',
318
  'r' => 'y',
319
  ),
320
+ 'Ai1ec_Compatibility_Check' =>
321
+ array (
322
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'compatibility' . DIRECTORY_SEPARATOR . 'check.php',
323
+ 'c' => 'Ai1ec_Compatibility_Check',
324
+ 'i' => 'g',
325
+ 'r' => 'y',
326
+ ),
327
  'Ai1ec_Compatibility_Cli' =>
328
  array (
329
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'compatibility' . DIRECTORY_SEPARATOR . 'cli.php',
504
  'i' => 'g',
505
  'r' => 'y',
506
  ),
507
+ 'Ai1ec_EDD_SL_Plugin_Updater' =>
508
+ array (
509
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'edd' . DIRECTORY_SEPARATOR . 'updater.php',
510
+ 'c' => 'Ai1ec_EDD_SL_Plugin_Updater',
511
+ 'i' => 'n',
512
+ ),
513
  'Ai1ec_Email_Notification' =>
514
  array (
515
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'notification' . DIRECTORY_SEPARATOR . 'email.php',
751
  'c' => 'Ai1ec_Filesystem_Checker',
752
  'i' => 'g',
753
  ),
754
+ 'Ai1ec_Filesystem_Misc' =>
755
+ array (
756
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'filesystem' . DIRECTORY_SEPARATOR . 'misc.php',
757
+ 'c' => 'Ai1ec_Filesystem_Misc',
758
+ 'i' => 'g',
759
+ 'r' => 'y',
760
+ ),
761
  'Ai1ec_Filter_Authors' =>
762
  array (
763
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'model' . DIRECTORY_SEPARATOR . 'filter' . DIRECTORY_SEPARATOR . 'auth_ids.php',
818
  'c' => 'Ai1ec_Front_Controller',
819
  'i' => 'g',
820
  ),
821
+ 'Ai1ec_HTTP_Encoder' =>
822
+ array (
823
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'http' . DIRECTORY_SEPARATOR . 'encoder.php',
824
+ 'c' => 'Ai1ec_HTTP_Encoder',
825
+ 'i' => 'g',
826
+ ),
827
  'Ai1ec_Html_Element' =>
828
  array (
829
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'html' . DIRECTORY_SEPARATOR . 'element' . DIRECTORY_SEPARATOR . 'legacy' . DIRECTORY_SEPARATOR . 'abstract' . DIRECTORY_SEPARATOR . 'html-element.php',
897
  'i' => 'n',
898
  'r' => 'y',
899
  ),
900
+ 'Ai1ec_Html_Setting_Renderer' =>
901
+ array (
902
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'html' . DIRECTORY_SEPARATOR . 'element' . DIRECTORY_SEPARATOR . 'setting-renderer.php',
903
+ 'c' => 'Ai1ec_Html_Setting_Renderer',
904
+ 'i' => 'g',
905
+ 'r' => 'y',
906
+ ),
907
  'Ai1ec_Html_Setting_Select' =>
908
  array (
909
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'html' . DIRECTORY_SEPARATOR . 'element' . DIRECTORY_SEPARATOR . 'setting' . DIRECTORY_SEPARATOR . 'select.php',
1584
  'i' => 'g',
1585
  'r' => 'y',
1586
  ),
1587
+ 'Ai1ec_View_Organize' =>
1588
+ array (
1589
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'view' . DIRECTORY_SEPARATOR . 'admin' . DIRECTORY_SEPARATOR . 'organize.php',
1590
+ 'c' => 'Ai1ec_View_Organize',
1591
+ 'i' => 'g',
1592
+ 'r' => 'y',
1593
+ ),
1594
  'Ai1ec_View_Theme_Options' =>
1595
  array (
1596
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'view' . DIRECTORY_SEPARATOR . 'admin' . DIRECTORY_SEPARATOR . 'theme-options.php',
2656
  'c' => 'Twig_TokenStream',
2657
  'i' => 'g',
2658
  ),
2659
+ '__TwigTemplate_04184c73b8c7ce7223d1dfe1e6f79fe17690e8b74969b07b58a06c2994a0d9e6' =>
2660
  array (
2661
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '04' . DIRECTORY_SEPARATOR . '18' . DIRECTORY_SEPARATOR . '4c73b8c7ce7223d1dfe1e6f79fe17690e8b74969b07b58a06c2994a0d9e6.php',
2662
+ 'c' => '__TwigTemplate_04184c73b8c7ce7223d1dfe1e6f79fe17690e8b74969b07b58a06c2994a0d9e6',
2663
+ 'i' => 'g',
2664
+ ),
2665
+ '__TwigTemplate_15c540b97f3b673d1c5b63d048cc19cdfa170289c32a08f3fd7e9922a5c3de8d' =>
2666
+ array (
2667
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '15' . DIRECTORY_SEPARATOR . 'c5' . DIRECTORY_SEPARATOR . '40b97f3b673d1c5b63d048cc19cdfa170289c32a08f3fd7e9922a5c3de8d.php',
2668
+ 'c' => '__TwigTemplate_15c540b97f3b673d1c5b63d048cc19cdfa170289c32a08f3fd7e9922a5c3de8d',
2669
+ 'i' => 'g',
2670
+ ),
2671
+ '__TwigTemplate_1db441d4c46644d462caf5fabce3486fec28bb3dee4455a13411a01b9c384550' =>
2672
+ array (
2673
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '1d' . DIRECTORY_SEPARATOR . 'b4' . DIRECTORY_SEPARATOR . '41d4c46644d462caf5fabce3486fec28bb3dee4455a13411a01b9c384550.php',
2674
+ 'c' => '__TwigTemplate_1db441d4c46644d462caf5fabce3486fec28bb3dee4455a13411a01b9c384550',
2675
  'i' => 'g',
2676
  ),
2677
  '__TwigTemplate_1e5432b0e902b671ed3fcd14576f09d81b1191dde849883c977f7ecef7772569' =>
2680
  'c' => '__TwigTemplate_1e5432b0e902b671ed3fcd14576f09d81b1191dde849883c977f7ecef7772569',
2681
  'i' => 'g',
2682
  ),
2683
+ '__TwigTemplate_1f30d67153b080a4e63b2f128884622fb7e74c4c2b739f15b0d517743a2f3aff' =>
2684
+ array (
2685
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '1f' . DIRECTORY_SEPARATOR . '30' . DIRECTORY_SEPARATOR . 'd67153b080a4e63b2f128884622fb7e74c4c2b739f15b0d517743a2f3aff.php',
2686
+ 'c' => '__TwigTemplate_1f30d67153b080a4e63b2f128884622fb7e74c4c2b739f15b0d517743a2f3aff',
2687
+ 'i' => 'g',
2688
+ ),
2689
+ '__TwigTemplate_1fc7b71ee92dc515fa667ee7831c98ab6c28baf9d40bd7616eb6cebd71888ce5' =>
2690
+ array (
2691
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '1f' . DIRECTORY_SEPARATOR . 'c7' . DIRECTORY_SEPARATOR . 'b71ee92dc515fa667ee7831c98ab6c28baf9d40bd7616eb6cebd71888ce5.php',
2692
+ 'c' => '__TwigTemplate_1fc7b71ee92dc515fa667ee7831c98ab6c28baf9d40bd7616eb6cebd71888ce5',
2693
+ 'i' => 'g',
2694
+ ),
2695
+ '__TwigTemplate_2cdb363f4e60054c695756ee213625301fda959841dc5aca736b041e0954bc43' =>
2696
+ array (
2697
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '2c' . DIRECTORY_SEPARATOR . 'db' . DIRECTORY_SEPARATOR . '363f4e60054c695756ee213625301fda959841dc5aca736b041e0954bc43.php',
2698
+ 'c' => '__TwigTemplate_2cdb363f4e60054c695756ee213625301fda959841dc5aca736b041e0954bc43',
2699
+ 'i' => 'g',
2700
+ ),
2701
+ '__TwigTemplate_2e4133d05bb6c6796937bc9a3340d448d39d5e6c81ad15c2e3e8d9fa2be2d09b' =>
2702
+ array (
2703
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '2e' . DIRECTORY_SEPARATOR . '41' . DIRECTORY_SEPARATOR . '33d05bb6c6796937bc9a3340d448d39d5e6c81ad15c2e3e8d9fa2be2d09b.php',
2704
+ 'c' => '__TwigTemplate_2e4133d05bb6c6796937bc9a3340d448d39d5e6c81ad15c2e3e8d9fa2be2d09b',
2705
+ 'i' => 'g',
2706
+ ),
2707
+ '__TwigTemplate_3bab47dfc4fbc3c5a406c1aa6b31c84f3f484fb540d2bac9f23124f34560b65d' =>
2708
+ array (
2709
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '3b' . DIRECTORY_SEPARATOR . 'ab' . DIRECTORY_SEPARATOR . '47dfc4fbc3c5a406c1aa6b31c84f3f484fb540d2bac9f23124f34560b65d.php',
2710
+ 'c' => '__TwigTemplate_3bab47dfc4fbc3c5a406c1aa6b31c84f3f484fb540d2bac9f23124f34560b65d',
2711
+ 'i' => 'g',
2712
+ ),
2713
+ '__TwigTemplate_43d9a3164d7fa60d25b4a46b810ae815835482309c33dfad5604c4ba6055e99c' =>
2714
+ array (
2715
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '43' . DIRECTORY_SEPARATOR . 'd9' . DIRECTORY_SEPARATOR . 'a3164d7fa60d25b4a46b810ae815835482309c33dfad5604c4ba6055e99c.php',
2716
+ 'c' => '__TwigTemplate_43d9a3164d7fa60d25b4a46b810ae815835482309c33dfad5604c4ba6055e99c',
2717
+ 'i' => 'g',
2718
+ ),
2719
+ '__TwigTemplate_57450188512a8737525f2a834d1b88782d9a19e5e6d3a9e57df3dbed47bab219' =>
2720
+ array (
2721
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '57' . DIRECTORY_SEPARATOR . '45' . DIRECTORY_SEPARATOR . '0188512a8737525f2a834d1b88782d9a19e5e6d3a9e57df3dbed47bab219.php',
2722
+ 'c' => '__TwigTemplate_57450188512a8737525f2a834d1b88782d9a19e5e6d3a9e57df3dbed47bab219',
2723
+ 'i' => 'g',
2724
+ ),
2725
+ '__TwigTemplate_6cb171aa729c805f35e7a349ef5c11984f7f8eb59474c0b463ce70cd8536e0e2' =>
2726
+ array (
2727
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '6c' . DIRECTORY_SEPARATOR . 'b1' . DIRECTORY_SEPARATOR . '71aa729c805f35e7a349ef5c11984f7f8eb59474c0b463ce70cd8536e0e2.php',
2728
+ 'c' => '__TwigTemplate_6cb171aa729c805f35e7a349ef5c11984f7f8eb59474c0b463ce70cd8536e0e2',
2729
+ 'i' => 'g',
2730
+ ),
2731
+ '__TwigTemplate_6ed17afc566bba82f63196085117e4f7492ff0fd119cd986c8f3be11f55efdb0' =>
2732
+ array (
2733
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '6e' . DIRECTORY_SEPARATOR . 'd1' . DIRECTORY_SEPARATOR . '7afc566bba82f63196085117e4f7492ff0fd119cd986c8f3be11f55efdb0.php',
2734
+ 'c' => '__TwigTemplate_6ed17afc566bba82f63196085117e4f7492ff0fd119cd986c8f3be11f55efdb0',
2735
+ 'i' => 'g',
2736
+ ),
2737
+ '__TwigTemplate_8738aa294570b2a85a442a17cdfa79373b77254570956b003b0309707c0a3aa4' =>
2738
+ array (
2739
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '87' . DIRECTORY_SEPARATOR . '38' . DIRECTORY_SEPARATOR . 'aa294570b2a85a442a17cdfa79373b77254570956b003b0309707c0a3aa4.php',
2740
+ 'c' => '__TwigTemplate_8738aa294570b2a85a442a17cdfa79373b77254570956b003b0309707c0a3aa4',
2741
+ 'i' => 'g',
2742
+ ),
2743
+ '__TwigTemplate_9c3c1820db174d7efba416743bbb9bf744e8454155f8129f69296092b49c45d3' =>
2744
+ array (
2745
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '9c' . DIRECTORY_SEPARATOR . '3c' . DIRECTORY_SEPARATOR . '1820db174d7efba416743bbb9bf744e8454155f8129f69296092b49c45d3.php',
2746
+ 'c' => '__TwigTemplate_9c3c1820db174d7efba416743bbb9bf744e8454155f8129f69296092b49c45d3',
2747
+ 'i' => 'g',
2748
+ ),
2749
+ '__TwigTemplate_aa616d3f918f480e4f6f0dabdeee1324d87d759ec18352a21a1cfcee8802f528' =>
2750
  array (
2751
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'aa' . DIRECTORY_SEPARATOR . '61' . DIRECTORY_SEPARATOR . '6d3f918f480e4f6f0dabdeee1324d87d759ec18352a21a1cfcee8802f528.php',
2752
+ 'c' => '__TwigTemplate_aa616d3f918f480e4f6f0dabdeee1324d87d759ec18352a21a1cfcee8802f528',
2753
  'i' => 'g',
2754
  ),
2755
+ '__TwigTemplate_af91c04e4ada13bcc6fc2d99142467f2d7aa2f7dc5b5e55b0cfab5398039de83' =>
2756
  array (
2757
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'af' . DIRECTORY_SEPARATOR . '91' . DIRECTORY_SEPARATOR . 'c04e4ada13bcc6fc2d99142467f2d7aa2f7dc5b5e55b0cfab5398039de83.php',
2758
+ 'c' => '__TwigTemplate_af91c04e4ada13bcc6fc2d99142467f2d7aa2f7dc5b5e55b0cfab5398039de83',
2759
  'i' => 'g',
2760
  ),
2761
+ '__TwigTemplate_b69bc1a2e974a2cc888cbb54b361d86981c0c2cc33fd8a93ba2368fb485deacb' =>
2762
  array (
2763
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'b6' . DIRECTORY_SEPARATOR . '9b' . DIRECTORY_SEPARATOR . 'c1a2e974a2cc888cbb54b361d86981c0c2cc33fd8a93ba2368fb485deacb.php',
2764
+ 'c' => '__TwigTemplate_b69bc1a2e974a2cc888cbb54b361d86981c0c2cc33fd8a93ba2368fb485deacb',
2765
  'i' => 'g',
2766
  ),
2767
+ '__TwigTemplate_dc78b950182efb8f436b144938fb0dc48cf395d7daabe20293234dbcf2b26545' =>
2768
  array (
2769
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'dc' . DIRECTORY_SEPARATOR . '78' . DIRECTORY_SEPARATOR . 'b950182efb8f436b144938fb0dc48cf395d7daabe20293234dbcf2b26545.php',
2770
+ 'c' => '__TwigTemplate_dc78b950182efb8f436b144938fb0dc48cf395d7daabe20293234dbcf2b26545',
2771
  'i' => 'g',
2772
  ),
2773
+ '__TwigTemplate_f05703afef869c4fea0061567a42872d377423a41be579565d0cdf32260df05f' =>
2774
  array (
2775
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'f0' . DIRECTORY_SEPARATOR . '57' . DIRECTORY_SEPARATOR . '03afef869c4fea0061567a42872d377423a41be579565d0cdf32260df05f.php',
2776
+ 'c' => '__TwigTemplate_f05703afef869c4fea0061567a42872d377423a41be579565d0cdf32260df05f',
2777
  'i' => 'g',
2778
  ),
2779
+ '__TwigTemplate_fc3cb152d1467d8b3ee69220d553a47cdb50cc64fa8c647cfa6a591c49aad589' =>
2780
  array (
2781
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'fc' . DIRECTORY_SEPARATOR . '3c' . DIRECTORY_SEPARATOR . 'b152d1467d8b3ee69220d553a47cdb50cc64fa8c647cfa6a591c49aad589.php',
2782
+ 'c' => '__TwigTemplate_fc3cb152d1467d8b3ee69220d553a47cdb50cc64fa8c647cfa6a591c49aad589',
2783
  'i' => 'g',
2784
  ),
2785
  'acl.aco' =>
2905
  'i' => 'g',
2906
  'r' => 'y',
2907
  ),
2908
+ 'calendar.state' =>
2909
+ array (
2910
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'calendar' . DIRECTORY_SEPARATOR . 'state.php',
2911
+ 'c' => 'Ai1ec_Calendar_State',
2912
+ 'i' => 'g',
2913
+ 'r' => 'y',
2914
+ ),
2915
  'calendarComponent' =>
2916
  array (
2917
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'iCal' . DIRECTORY_SEPARATOR . 'iCalcreator-2.20' . DIRECTORY_SEPARATOR . 'iCalcreator.class.php',
2918
  'c' => 'calendarComponent',
2919
  'i' => 'g',
2920
  ),
2921
+ 'captcha.provider' =>
2922
+ array (
2923
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'captcha' . DIRECTORY_SEPARATOR . 'provider.php',
2924
+ 'c' => 'Ai1ec_Captcha_Provider',
2925
+ 'i' => 'g',
2926
+ 'r' => 'y',
2927
+ ),
2928
+ 'captcha.provider.nocaptcha' =>
2929
+ array (
2930
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'captcha' . DIRECTORY_SEPARATOR . 'provider' . DIRECTORY_SEPARATOR . 'nocaptcha.php',
2931
+ 'c' => 'Ai1ec_Captcha_Nocaptcha_Provider',
2932
+ 'i' => 'g',
2933
+ 'r' => 'y',
2934
+ ),
2935
+ 'captcha.provider.recaptcha' =>
2936
+ array (
2937
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'captcha' . DIRECTORY_SEPARATOR . 'provider' . DIRECTORY_SEPARATOR . 'recaptcha.php',
2938
+ 'c' => 'Ai1ec_Captcha_Recaptcha_Provider',
2939
+ 'i' => 'g',
2940
+ 'r' => 'y',
2941
+ ),
2942
+ 'captcha.providers' =>
2943
  array (
2944
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'captcha' . DIRECTORY_SEPARATOR . 'providers.php',
2945
+ 'c' => 'Ai1ec_Captcha_Providers',
2946
  'i' => 'g',
2947
  'r' => 'y',
2948
  ),
3044
  'i' => 'g',
3045
  'r' => 'y',
3046
  ),
3047
+ 'compatibility.check' =>
3048
+ array (
3049
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'compatibility' . DIRECTORY_SEPARATOR . 'check.php',
3050
+ 'c' => 'Ai1ec_Compatibility_Check',
3051
+ 'i' => 'g',
3052
+ 'r' => 'y',
3053
+ ),
3054
  'compatibility.cli' =>
3055
  array (
3056
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'compatibility' . DIRECTORY_SEPARATOR . 'cli.php',
3313
  'c' => 'EDD_SL_Plugin_Updater',
3314
  'i' => 'g',
3315
  ),
3316
+ 'edd.updater' =>
3317
+ array (
3318
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'edd' . DIRECTORY_SEPARATOR . 'updater.php',
3319
+ 'c' => 'Ai1ec_EDD_SL_Plugin_Updater',
3320
+ 'i' => 'n',
3321
+ ),
3322
  'environment.check' =>
3323
  array (
3324
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'environment' . DIRECTORY_SEPARATOR . 'check.php',
3412
  'c' => 'Ai1ec_Filesystem_Checker',
3413
  'i' => 'g',
3414
  ),
3415
+ 'filesystem.misc' =>
3416
+ array (
3417
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'filesystem' . DIRECTORY_SEPARATOR . 'misc.php',
3418
+ 'c' => 'Ai1ec_Filesystem_Misc',
3419
+ 'i' => 'g',
3420
+ 'r' => 'y',
3421
+ ),
3422
  'html.element.href' =>
3423
  array (
3424
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'html' . DIRECTORY_SEPARATOR . 'element' . DIRECTORY_SEPARATOR . 'href.php',
3451
  'i' => 'n',
3452
  'r' => 'y',
3453
  ),
3454
+ 'html.element.setting-renderer' =>
3455
+ array (
3456
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'html' . DIRECTORY_SEPARATOR . 'element' . DIRECTORY_SEPARATOR . 'setting-renderer.php',
3457
+ 'c' => 'Ai1ec_Html_Setting_Renderer',
3458
+ 'i' => 'g',
3459
+ 'r' => 'y',
3460
+ ),
3461
  'html.element.setting.abstract' =>
3462
  array (
3463
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'html' . DIRECTORY_SEPARATOR . 'element' . DIRECTORY_SEPARATOR . 'setting' . DIRECTORY_SEPARATOR . 'abstract.php',
3540
  'c' => 'Ai1ec_Html_Helper',
3541
  'i' => 'g',
3542
  ),
3543
+ 'http.encoder' =>
3544
+ array (
3545
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'http' . DIRECTORY_SEPARATOR . 'encoder.php',
3546
+ 'c' => 'Ai1ec_HTTP_Encoder',
3547
+ 'i' => 'g',
3548
+ ),
3549
  'http.request' =>
3550
  array (
3551
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'http' . DIRECTORY_SEPARATOR . 'request.php',
4272
  'i' => 'g',
4273
  'r' => 'y',
4274
  ),
4275
+ 'twig.04.18.4c73b8c7ce7223d1dfe1e6f79fe17690e8b74969b07b58a06c2994a0d9e6' =>
4276
  array (
4277
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '04' . DIRECTORY_SEPARATOR . '18' . DIRECTORY_SEPARATOR . '4c73b8c7ce7223d1dfe1e6f79fe17690e8b74969b07b58a06c2994a0d9e6.php',
4278
+ 'c' => '__TwigTemplate_04184c73b8c7ce7223d1dfe1e6f79fe17690e8b74969b07b58a06c2994a0d9e6',
4279
+ 'i' => 'g',
4280
+ ),
4281
+ 'twig.15.c5.40b97f3b673d1c5b63d048cc19cdfa170289c32a08f3fd7e9922a5c3de8d' =>
4282
+ array (
4283
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '15' . DIRECTORY_SEPARATOR . 'c5' . DIRECTORY_SEPARATOR . '40b97f3b673d1c5b63d048cc19cdfa170289c32a08f3fd7e9922a5c3de8d.php',
4284
+ 'c' => '__TwigTemplate_15c540b97f3b673d1c5b63d048cc19cdfa170289c32a08f3fd7e9922a5c3de8d',
4285
+ 'i' => 'g',
4286
+ ),
4287
+ 'twig.1d.b4.41d4c46644d462caf5fabce3486fec28bb3dee4455a13411a01b9c384550' =>
4288
+ array (
4289
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '1d' . DIRECTORY_SEPARATOR . 'b4' . DIRECTORY_SEPARATOR . '41d4c46644d462caf5fabce3486fec28bb3dee4455a13411a01b9c384550.php',
4290
+ 'c' => '__TwigTemplate_1db441d4c46644d462caf5fabce3486fec28bb3dee4455a13411a01b9c384550',
4291
  'i' => 'g',
4292
  ),
4293
  'twig.1e.54.32b0e902b671ed3fcd14576f09d81b1191dde849883c977f7ecef7772569' =>
4296
  'c' => '__TwigTemplate_1e5432b0e902b671ed3fcd14576f09d81b1191dde849883c977f7ecef7772569',
4297
  'i' => 'g',
4298
  ),
4299
+ 'twig.1f.30.d67153b080a4e63b2f128884622fb7e74c4c2b739f15b0d517743a2f3aff' =>
4300
+ array (
4301
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '1f' . DIRECTORY_SEPARATOR . '30' . DIRECTORY_SEPARATOR . 'd67153b080a4e63b2f128884622fb7e74c4c2b739f15b0d517743a2f3aff.php',
4302
+ 'c' => '__TwigTemplate_1f30d67153b080a4e63b2f128884622fb7e74c4c2b739f15b0d517743a2f3aff',
4303
+ 'i' => 'g',
4304
+ ),
4305
+ 'twig.1f.c7.b71ee92dc515fa667ee7831c98ab6c28baf9d40bd7616eb6cebd71888ce5' =>
4306
+ array (
4307
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '1f' . DIRECTORY_SEPARATOR . 'c7' . DIRECTORY_SEPARATOR . 'b71ee92dc515fa667ee7831c98ab6c28baf9d40bd7616eb6cebd71888ce5.php',
4308
+ 'c' => '__TwigTemplate_1fc7b71ee92dc515fa667ee7831c98ab6c28baf9d40bd7616eb6cebd71888ce5',
4309
+ 'i' => 'g',
4310
+ ),
4311
+ 'twig.2c.db.363f4e60054c695756ee213625301fda959841dc5aca736b041e0954bc43' =>
4312
+ array (
4313
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '2c' . DIRECTORY_SEPARATOR . 'db' . DIRECTORY_SEPARATOR . '363f4e60054c695756ee213625301fda959841dc5aca736b041e0954bc43.php',
4314
+ 'c' => '__TwigTemplate_2cdb363f4e60054c695756ee213625301fda959841dc5aca736b041e0954bc43',
4315
+ 'i' => 'g',
4316
+ ),
4317
+ 'twig.2e.41.33d05bb6c6796937bc9a3340d448d39d5e6c81ad15c2e3e8d9fa2be2d09b' =>
4318
+ array (
4319
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '2e' . DIRECTORY_SEPARATOR . '41' . DIRECTORY_SEPARATOR . '33d05bb6c6796937bc9a3340d448d39d5e6c81ad15c2e3e8d9fa2be2d09b.php',
4320
+ 'c' => '__TwigTemplate_2e4133d05bb6c6796937bc9a3340d448d39d5e6c81ad15c2e3e8d9fa2be2d09b',
4321
+ 'i' => 'g',
4322
+ ),
4323
+ 'twig.3b.ab.47dfc4fbc3c5a406c1aa6b31c84f3f484fb540d2bac9f23124f34560b65d' =>
4324
+ array (
4325
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '3b' . DIRECTORY_SEPARATOR . 'ab' . DIRECTORY_SEPARATOR . '47dfc4fbc3c5a406c1aa6b31c84f3f484fb540d2bac9f23124f34560b65d.php',
4326
+ 'c' => '__TwigTemplate_3bab47dfc4fbc3c5a406c1aa6b31c84f3f484fb540d2bac9f23124f34560b65d',
4327
+ 'i' => 'g',
4328
+ ),
4329
+ 'twig.43.d9.a3164d7fa60d25b4a46b810ae815835482309c33dfad5604c4ba6055e99c' =>
4330
+ array (
4331
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '43' . DIRECTORY_SEPARATOR . 'd9' . DIRECTORY_SEPARATOR . 'a3164d7fa60d25b4a46b810ae815835482309c33dfad5604c4ba6055e99c.php',
4332
+ 'c' => '__TwigTemplate_43d9a3164d7fa60d25b4a46b810ae815835482309c33dfad5604c4ba6055e99c',
4333
+ 'i' => 'g',
4334
+ ),
4335
+ 'twig.57.45.0188512a8737525f2a834d1b88782d9a19e5e6d3a9e57df3dbed47bab219' =>
4336
  array (
4337
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '57' . DIRECTORY_SEPARATOR . '45' . DIRECTORY_SEPARATOR . '0188512a8737525f2a834d1b88782d9a19e5e6d3a9e57df3dbed47bab219.php',
4338
+ 'c' => '__TwigTemplate_57450188512a8737525f2a834d1b88782d9a19e5e6d3a9e57df3dbed47bab219',
4339
  'i' => 'g',
4340
  ),
4341
+ 'twig.6c.b1.71aa729c805f35e7a349ef5c11984f7f8eb59474c0b463ce70cd8536e0e2' =>
4342
  array (
4343
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '6c' . DIRECTORY_SEPARATOR . 'b1' . DIRECTORY_SEPARATOR . '71aa729c805f35e7a349ef5c11984f7f8eb59474c0b463ce70cd8536e0e2.php',
4344
+ 'c' => '__TwigTemplate_6cb171aa729c805f35e7a349ef5c11984f7f8eb59474c0b463ce70cd8536e0e2',
4345
  'i' => 'g',
4346
  ),
4347
+ 'twig.6e.d1.7afc566bba82f63196085117e4f7492ff0fd119cd986c8f3be11f55efdb0' =>
4348
  array (
4349
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '6e' . DIRECTORY_SEPARATOR . 'd1' . DIRECTORY_SEPARATOR . '7afc566bba82f63196085117e4f7492ff0fd119cd986c8f3be11f55efdb0.php',
4350
+ 'c' => '__TwigTemplate_6ed17afc566bba82f63196085117e4f7492ff0fd119cd986c8f3be11f55efdb0',
4351
  'i' => 'g',
4352
  ),
4353
+ 'twig.87.38.aa294570b2a85a442a17cdfa79373b77254570956b003b0309707c0a3aa4' =>
4354
  array (
4355
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '87' . DIRECTORY_SEPARATOR . '38' . DIRECTORY_SEPARATOR . 'aa294570b2a85a442a17cdfa79373b77254570956b003b0309707c0a3aa4.php',
4356
+ 'c' => '__TwigTemplate_8738aa294570b2a85a442a17cdfa79373b77254570956b003b0309707c0a3aa4',
4357
+ 'i' => 'g',
4358
+ ),
4359
+ 'twig.9c.3c.1820db174d7efba416743bbb9bf744e8454155f8129f69296092b49c45d3' =>
4360
+ array (
4361
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '9c' . DIRECTORY_SEPARATOR . '3c' . DIRECTORY_SEPARATOR . '1820db174d7efba416743bbb9bf744e8454155f8129f69296092b49c45d3.php',
4362
+ 'c' => '__TwigTemplate_9c3c1820db174d7efba416743bbb9bf744e8454155f8129f69296092b49c45d3',
4363
  'i' => 'g',
4364
  ),
4365
  'twig.Compiler' =>
5298
  'c' => 'Twig_TokenStream',
5299
  'i' => 'g',
5300
  ),
5301
+ 'twig.aa.61.6d3f918f480e4f6f0dabdeee1324d87d759ec18352a21a1cfcee8802f528' =>
5302
+ array (
5303
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'aa' . DIRECTORY_SEPARATOR . '61' . DIRECTORY_SEPARATOR . '6d3f918f480e4f6f0dabdeee1324d87d759ec18352a21a1cfcee8802f528.php',
5304
+ 'c' => '__TwigTemplate_aa616d3f918f480e4f6f0dabdeee1324d87d759ec18352a21a1cfcee8802f528',
5305
+ 'i' => 'g',
5306
+ ),
5307
+ 'twig.af.91.c04e4ada13bcc6fc2d99142467f2d7aa2f7dc5b5e55b0cfab5398039de83' =>
5308
  array (
5309
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'af' . DIRECTORY_SEPARATOR . '91' . DIRECTORY_SEPARATOR . 'c04e4ada13bcc6fc2d99142467f2d7aa2f7dc5b5e55b0cfab5398039de83.php',
5310
+ 'c' => '__TwigTemplate_af91c04e4ada13bcc6fc2d99142467f2d7aa2f7dc5b5e55b0cfab5398039de83',
5311
  'i' => 'g',
5312
  ),
5313
  'twig.ai1ec-extension' =>
5316
  'c' => 'Ai1ec_Twig_Ai1ec_Extension',
5317
  'i' => 'g',
5318
  ),
5319
+ 'twig.b6.9b.c1a2e974a2cc888cbb54b361d86981c0c2cc33fd8a93ba2368fb485deacb' =>
5320
  array (
5321
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'b6' . DIRECTORY_SEPARATOR . '9b' . DIRECTORY_SEPARATOR . 'c1a2e974a2cc888cbb54b361d86981c0c2cc33fd8a93ba2368fb485deacb.php',
5322
+ 'c' => '__TwigTemplate_b69bc1a2e974a2cc888cbb54b361d86981c0c2cc33fd8a93ba2368fb485deacb',
5323
  'i' => 'g',
5324
  ),
5325
  'twig.cache' =>
5329
  'i' => 'g',
5330
  'r' => 'y',
5331
  ),
5332
+ 'twig.dc.78.b950182efb8f436b144938fb0dc48cf395d7daabe20293234dbcf2b26545' =>
5333
+ array (
5334
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'dc' . DIRECTORY_SEPARATOR . '78' . DIRECTORY_SEPARATOR . 'b950182efb8f436b144938fb0dc48cf395d7daabe20293234dbcf2b26545.php',
5335
+ 'c' => '__TwigTemplate_dc78b950182efb8f436b144938fb0dc48cf395d7daabe20293234dbcf2b26545',
5336
+ 'i' => 'g',
5337
+ ),
5338
  'twig.environment' =>
5339
  array (
5340
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'environment.php',
5341
  'c' => 'Ai1ec_Twig_Environment',
5342
  'i' => 'g',
5343
  ),
5344
+ 'twig.f0.57.03afef869c4fea0061567a42872d377423a41be579565d0cdf32260df05f' =>
5345
+ array (
5346
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'f0' . DIRECTORY_SEPARATOR . '57' . DIRECTORY_SEPARATOR . '03afef869c4fea0061567a42872d377423a41be579565d0cdf32260df05f.php',
5347
+ 'c' => '__TwigTemplate_f05703afef869c4fea0061567a42872d377423a41be579565d0cdf32260df05f',
5348
+ 'i' => 'g',
5349
+ ),
5350
+ 'twig.fc.3c.b152d1467d8b3ee69220d553a47cdb50cc64fa8c647cfa6a591c49aad589' =>
5351
+ array (
5352
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'fc' . DIRECTORY_SEPARATOR . '3c' . DIRECTORY_SEPARATOR . 'b152d1467d8b3ee69220d553a47cdb50cc64fa8c647cfa6a591c49aad589.php',
5353
+ 'c' => '__TwigTemplate_fc3cb152d1467d8b3ee69220d553a47cdb50cc64fa8c647cfa6a591c49aad589',
5354
+ 'i' => 'g',
5355
+ ),
5356
  'twig.loader' =>
5357
  array (
5358
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'loader.php',
5459
  'i' => 'g',
5460
  'r' => 'y',
5461
  ),
5462
+ 'view.admin.organize' =>
5463
+ array (
5464
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'view' . DIRECTORY_SEPARATOR . 'admin' . DIRECTORY_SEPARATOR . 'organize.php',
5465
+ 'c' => 'Ai1ec_View_Organize',
5466
+ 'i' => 'g',
5467
+ 'r' => 'y',
5468
+ ),
5469
  'view.admin.settings' =>
5470
  array (
5471
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'view' . DIRECTORY_SEPARATOR . 'admin' . DIRECTORY_SEPARATOR . 'settings.php',
lib/bootstrap/registry/object.php CHANGED
@@ -83,7 +83,7 @@ class Ai1ec_Registry_Object implements Ai1ec_Registry {
83
  $class_name = $class_data['c'];
84
  if (
85
  'Ai1ec_Event' === $class_name &&
86
- AI1EC_THEME_COMPATIBILITY_FER
87
  ) {
88
  $class_name = 'Ai1ec_Event_Compatibility';
89
  }
83
  $class_name = $class_data['c'];
84
  if (
85
  'Ai1ec_Event' === $class_name &&
86
+ $this->get( 'compatibility.check' )->use_backward_compatibility()
87
  ) {
88
  $class_name = 'Ai1ec_Event_Compatibility';
89
  }
lib/cache/strategy/apc.php CHANGED
@@ -105,9 +105,9 @@ class Ai1ec_Cache_Strategy_Apc extends Ai1ec_Cache_Strategy {
105
  * @return string Key with prefix prepended
106
  */
107
  protected function _key( $key ) {
108
- static $prefix = NULL;
109
  if ( NULL === $prefix ) {
110
- $prefix = substr( md5( site_url() ), 0, 8 );
111
  }
112
  if ( 0 !== strncmp( $key, $prefix, 8 ) ) {
113
  $key = $prefix . $key;
105
  * @return string Key with prefix prepended
106
  */
107
  protected function _key( $key ) {
108
+ static $prefix = null;
109
  if ( NULL === $prefix ) {
110
+ $prefix = substr( md5( ai1ec_get_site_url() ), 0, 8 );
111
  }
112
  if ( 0 !== strncmp( $key, $prefix, 8 ) ) {
113
  $key = $prefix . $key;
lib/cache/strategy/file.php CHANGED
@@ -15,7 +15,7 @@ class Ai1ec_Cache_Strategy_File extends Ai1ec_Cache_Strategy {
15
  * @var string
16
  */
17
  private $_cache_dir;
18
-
19
  private $_cache_url;
20
 
21
  public function __construct( Ai1ec_Registry_Object $registry, array $cache_dir ) {
@@ -30,8 +30,8 @@ class Ai1ec_Cache_Strategy_File extends Ai1ec_Cache_Strategy {
30
  *
31
  */
32
  public function get_data( $file ) {
33
- $file = $this->_safe_file_name( $file );
34
- if ( ! file_exists( $this->_cache_dir . $file ) ) {
35
  throw new Ai1ec_Cache_Not_Set_Exception(
36
  'File \'' . $file . '\' does not exist'
37
  );
@@ -59,9 +59,10 @@ class Ai1ec_Cache_Strategy_File extends Ai1ec_Cache_Strategy {
59
  $this->_cache_dir . $filename . '\'';
60
  throw new Ai1ec_Cache_Write_Exception( $message );
61
  }
62
- return array(
63
  'path' => $this->_cache_dir . $filename,
64
  'url' => $this->_cache_url . $filename,
 
65
  );
66
  }
67
 
@@ -105,9 +106,9 @@ class Ai1ec_Cache_Strategy_File extends Ai1ec_Cache_Strategy {
105
 
106
  /**
107
  * Get the extension for the file if required
108
- *
109
  * @param string $file
110
- *
111
  * @return string
112
  */
113
  protected function _get_extension_for_file( $file ) {
@@ -119,6 +120,23 @@ class Ai1ec_Cache_Strategy_File extends Ai1ec_Cache_Strategy {
119
  }
120
  return '';
121
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
122
 
123
  /**
124
  * _safe_file_name method
@@ -134,7 +152,7 @@ class Ai1ec_Cache_Strategy_File extends Ai1ec_Cache_Strategy {
134
  $extension = $this->_get_extension_for_file( $file );
135
  if ( null === $prefix ) {
136
  // always include site_url when there is more than one
137
- $pref_string = site_url();
138
  if ( ! AI1EC_DEBUG ) {
139
  // address multiple re-saves for a single version
140
  // i.e. when theme settings are being edited
15
  * @var string
16
  */
17
  private $_cache_dir;
18
+
19
  private $_cache_url;
20
 
21
  public function __construct( Ai1ec_Registry_Object $registry, array $cache_dir ) {
30
  *
31
  */
32
  public function get_data( $file ) {
33
+ $file = $this->_get_file_name( $file );
34
+ if ( ! $file || ! file_exists( $this->_cache_dir . $file ) ) {
35
  throw new Ai1ec_Cache_Not_Set_Exception(
36
  'File \'' . $file . '\' does not exist'
37
  );
59
  $this->_cache_dir . $filename . '\'';
60
  throw new Ai1ec_Cache_Write_Exception( $message );
61
  }
62
+ return array(
63
  'path' => $this->_cache_dir . $filename,
64
  'url' => $this->_cache_url . $filename,
65
+ 'file' => $filename,
66
  );
67
  }
68
 
106
 
107
  /**
108
  * Get the extension for the file if required
109
+ *
110
  * @param string $file
111
+ *
112
  * @return string
113
  */
114
  protected function _get_extension_for_file( $file ) {
120
  }
121
  return '';
122
  }
123
+
124
+ /**
125
+ * Tries to get the stored filename
126
+ *
127
+ * @param string $file
128
+ *
129
+ * @return boolean | string
130
+ */
131
+ protected function _get_file_name( $file ) {
132
+ static $file_map = array(
133
+ 'ai1ec_parsed_css' => 'ai1ec_filename_css',
134
+ );
135
+ if ( isset ( $file_map[$file] ) ) {
136
+ return $this->_registry->get( 'model.option' )->get( $file_map[$file] );
137
+ }
138
+ return false;
139
+ }
140
 
141
  /**
142
  * _safe_file_name method
152
  $extension = $this->_get_extension_for_file( $file );
153
  if ( null === $prefix ) {
154
  // always include site_url when there is more than one
155
+ $pref_string = ai1ec_site_url();
156
  if ( ! AI1EC_DEBUG ) {
157
  // address multiple re-saves for a single version
158
  // i.e. when theme settings are being edited
lib/calendar-feed/ics.php CHANGED
@@ -18,7 +18,7 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
18
 
19
  const ICS_OPTION_DB_VERSION = 'ai1ec_ics_db_version';
20
 
21
- const ICS_DB_VERSION = 107;
22
 
23
  /**
24
  * @var array
@@ -222,11 +222,13 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
222
  }
223
  $translations = array(
224
  '[feed_url]' => $_POST['ai1ec_calendar_url'],
225
- '[categories]' => implode( ', ' , $categories ),
226
  '[user_email]' => $_POST['ai1ec_submitter_email'],
227
  '[site_title]' => get_bloginfo( 'name' ),
228
- '[site_url]' => site_url(),
229
- '[feeds_url]' => admin_url( AI1EC_FEED_SETTINGS_BASE_URL . '#ics' ),
 
 
230
  );
231
  return $translations;
232
  }
@@ -269,6 +271,7 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
269
  map_display_enabled tinyint(1) NOT NULL DEFAULT '0',
270
  keep_tags_categories tinyint(1) NOT NULL DEFAULT '0',
271
  keep_old_events tinyint(1) NOT NULL DEFAULT '0',
 
272
  PRIMARY KEY (feed_id),
273
  UNIQUE KEY feed (feed_url)
274
  ) CHARACTER SET utf8;";
@@ -383,6 +386,7 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
383
  array( 'cron_freq' => $settings->get( 'ics_cron_freq' ) ),
384
  true
385
  );
 
386
  $args = array(
387
  'cron_freq' => $cron_freq->get_content(),
388
  'event_categories' => $select2_cats,
@@ -420,6 +424,7 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
420
  'map_display_enabled',
421
  'keep_tags_categories',
422
  'keep_old_events',
 
423
  )
424
  );
425
 
@@ -460,6 +465,9 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
460
  'keep_old_events' => (bool) intval(
461
  $row->keep_old_events
462
  ),
 
 
 
463
  );
464
  $html .= $theme_loader->get_file( 'feed_row.php', $args, true )
465
  ->get_content();
@@ -513,13 +521,20 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
513
  'feed_category' => $feed_categories,
514
  'feed_tags' => $_REQUEST['feed_tags'],
515
  'comments_enabled' => Ai1ec_Primitive_Int::db_bool(
516
- $_REQUEST['comments_enabled'] ),
 
517
  'map_display_enabled' => Ai1ec_Primitive_Int::db_bool(
518
- $_REQUEST['map_display_enabled'] ),
 
519
  'keep_tags_categories' => Ai1ec_Primitive_Int::db_bool(
520
- $_REQUEST['keep_tags_categories'] ),
 
521
  'keep_old_events' => Ai1ec_Primitive_Int::db_bool(
522
- $_REQUEST['keep_old_events'] )
 
 
 
 
523
  );
524
  $entry = apply_filters( 'ai1ec_ics_feed_entry', $entry );
525
  if ( is_wp_error( $entry ) ) {
@@ -533,7 +548,7 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
533
  return $json_strategy->render( array( 'data' => $output ) );
534
  }
535
 
536
- $format = array( '%s', '%s', '%s', '%d', '%d', '%d', '%d' );
537
  $res = $db->insert( $table_name, $entry, $format );
538
  $feed_id = $db->get_insert_id();
539
  $categories = array();
@@ -566,7 +581,10 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
566
  ),
567
  'keep_old_events' => (bool) intval(
568
  $_REQUEST['keep_old_events']
569
- )
 
 
 
570
  );
571
  $loader = $this->_registry->get( 'theme.loader' );
572
  // display added feed row
@@ -699,5 +717,4 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
699
  protected function _import_lock_name( $feed_id ) {
700
  return 'ics_import_' . (int)$feed_id;
701
  }
702
-
703
  }
18
 
19
  const ICS_OPTION_DB_VERSION = 'ai1ec_ics_db_version';
20
 
21
+ const ICS_DB_VERSION = 220;
22
 
23
  /**
24
  * @var array
222
  }
223
  $translations = array(
224
  '[feed_url]' => $_POST['ai1ec_calendar_url'],
225
+ '[categories]' => implode( ', ', $categories ),
226
  '[user_email]' => $_POST['ai1ec_submitter_email'],
227
  '[site_title]' => get_bloginfo( 'name' ),
228
+ '[site_url]' => ai1ec_site_url(),
229
+ '[feeds_url]' => ai1ec_admin_url(
230
+ AI1EC_FEED_SETTINGS_BASE_URL . '#ics'
231
+ ),
232
  );
233
  return $translations;
234
  }
271
  map_display_enabled tinyint(1) NOT NULL DEFAULT '0',
272
  keep_tags_categories tinyint(1) NOT NULL DEFAULT '0',
273
  keep_old_events tinyint(1) NOT NULL DEFAULT '0',
274
+ import_timezone tinyint(1) NOT NULL DEFAULT '0',
275
  PRIMARY KEY (feed_id),
276
  UNIQUE KEY feed (feed_url)
277
  ) CHARACTER SET utf8;";
386
  array( 'cron_freq' => $settings->get( 'ics_cron_freq' ) ),
387
  true
388
  );
389
+
390
  $args = array(
391
  'cron_freq' => $cron_freq->get_content(),
392
  'event_categories' => $select2_cats,
424
  'map_display_enabled',
425
  'keep_tags_categories',
426
  'keep_old_events',
427
+ 'import_timezone',
428
  )
429
  );
430
 
465
  'keep_old_events' => (bool) intval(
466
  $row->keep_old_events
467
  ),
468
+ 'feed_import_timezone' => (bool) intval(
469
+ $row->import_timezone
470
+ ),
471
  );
472
  $html .= $theme_loader->get_file( 'feed_row.php', $args, true )
473
  ->get_content();
521
  'feed_category' => $feed_categories,
522
  'feed_tags' => $_REQUEST['feed_tags'],
523
  'comments_enabled' => Ai1ec_Primitive_Int::db_bool(
524
+ $_REQUEST['comments_enabled']
525
+ ),
526
  'map_display_enabled' => Ai1ec_Primitive_Int::db_bool(
527
+ $_REQUEST['map_display_enabled']
528
+ ),
529
  'keep_tags_categories' => Ai1ec_Primitive_Int::db_bool(
530
+ $_REQUEST['keep_tags_categories']
531
+ ),
532
  'keep_old_events' => Ai1ec_Primitive_Int::db_bool(
533
+ $_REQUEST['keep_old_events']
534
+ ),
535
+ 'import_timezone' => Ai1ec_Primitive_Int::db_bool(
536
+ $_REQUEST['feed_import_timezone']
537
+ ),
538
  );
539
  $entry = apply_filters( 'ai1ec_ics_feed_entry', $entry );
540
  if ( is_wp_error( $entry ) ) {
548
  return $json_strategy->render( array( 'data' => $output ) );
549
  }
550
 
551
+ $format = array( '%s', '%s', '%s', '%d', '%d', '%d', '%d', '%d' );
552
  $res = $db->insert( $table_name, $entry, $format );
553
  $feed_id = $db->get_insert_id();
554
  $categories = array();
581
  ),
582
  'keep_old_events' => (bool) intval(
583
  $_REQUEST['keep_old_events']
584
+ ),
585
+ 'feed_import_timezone' => (bool) intval(
586
+ $_REQUEST['feed_import_timezone']
587
+ ),
588
  );
589
  $loader = $this->_registry->get( 'theme.loader' );
590
  // display added feed row
717
  protected function _import_lock_name( $feed_id ) {
718
  return 'ics_import_' . (int)$feed_id;
719
  }
 
720
  }
lib/calendar/state.php ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Calendar state container.
5
+ *
6
+ * @author Time.ly Network Inc.
7
+ * @since 2.2
8
+ *
9
+ * @package AI1EC
10
+ * @subpackage AI1EC.Lib.Calendar
11
+ */
12
+ class Ai1ec_Calendar_State extends Ai1ec_Base {
13
+
14
+ /**
15
+ * Whether calendar is initializing router or not.
16
+ *
17
+ * @var bool
18
+ */
19
+ private $_is_routing_initializing = false;
20
+
21
+ /**
22
+ * Whether Html render strategy should append content in the_content
23
+ * filter hook.
24
+ *
25
+ * @var bool
26
+ */
27
+ private $_append_content = true;
28
+
29
+ /**
30
+ * Returns whether routing is during initialization phase or not.
31
+ *
32
+ * @return bool
33
+ */
34
+ public function is_routing_initializing() {
35
+ return $this->_is_routing_initializing;
36
+ }
37
+
38
+ /**
39
+ * Sets state for routing initialization phase.
40
+ *
41
+ * @param bool $status State for initializing phase.
42
+ */
43
+ public function set_routing_initialization( $status ) {
44
+ $this->_is_routing_initializing = $status;
45
+ }
46
+
47
+ /**
48
+ * Returns whether html render strategy should append content in the_content
49
+ * filter hook.
50
+ *
51
+ * @return bool
52
+ */
53
+ public function append_content() {
54
+ return $this->_append_content;
55
+ }
56
+
57
+ /**
58
+ * Sets state for content appending in html renderer the_content hook.
59
+ * See Ai1ec_Render_Strategy_Html::append_content()
60
+ *
61
+ * @param bool $status Whether to append content or not.
62
+ */
63
+ public function set_append_content( $status ) {
64
+ $this->_append_content = $status;
65
+ }
66
+ }
lib/captcha/provider.php ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Ai1ec_Captcha_Provider interface.
5
+ *
6
+ * @author Time.ly Network Inc.
7
+ * @since 2.2
8
+ *
9
+ * @package AI1EC
10
+ * @subpackage AI1EC.Captcha
11
+ */
12
+ abstract class Ai1ec_Captcha_Provider extends Ai1ec_Base {
13
+
14
+ /**
15
+ * Settings object.
16
+ *
17
+ * @var Ai1ec_Settings
18
+ */
19
+ protected $_settings = null;
20
+
21
+ /**
22
+ * Theme loader object.
23
+ *
24
+ * @var Ai1ec_Theme_Loader
25
+ */
26
+ protected $_theme_loader = null;
27
+
28
+ /**
29
+ * Whether provider is configured or not.
30
+ *
31
+ * @var bool
32
+ */
33
+ protected $_is_configured = null;
34
+
35
+ /**
36
+ * Constructor.
37
+ *
38
+ * @param Ai1ec_Registry_Object $registry
39
+ *
40
+ * @return Ai1ec_Captcha_Provider
41
+ *
42
+ * @throws Ai1ec_Bootstrap_Exception
43
+ */
44
+ public function __construct( Ai1ec_Registry_Object $registry ) {
45
+ parent::__construct( $registry );
46
+ $this->_settings = $registry->get( 'model.settings' );
47
+ $this->_theme_loader = $registry->get( 'theme.loader' );
48
+ }
49
+
50
+ /**
51
+ * Returns settings array.
52
+ *
53
+ * @param bool $enable_rendering Whether setting HTML will be rendered or not.
54
+ *
55
+ * @return array Array of settings.
56
+ */
57
+ abstract public function get_settings( $enable_rendering = true );
58
+
59
+ /**
60
+ * Returns captcha challenge.
61
+ *
62
+ * @return mixed
63
+ */
64
+ abstract public function get_challenge();
65
+
66
+ /**
67
+ * Validates challenge.
68
+ *
69
+ * @param array Challenge response data.
70
+ *
71
+ * @return mixed
72
+ */
73
+ abstract public function validate_challenge( array $data );
74
+
75
+ /**
76
+ * Returns provider name.
77
+ *
78
+ * @return string
79
+ */
80
+ abstract public function get_name();
81
+
82
+ /**
83
+ * Returns whether provider is properly configured or not.
84
+ *
85
+ * @return bool
86
+ */
87
+ public function is_configured() {
88
+ if ( null !== $this->_is_configured ) {
89
+ return $this->_is_configured;
90
+ }
91
+ $this->_is_configured = true;
92
+ foreach ( $this->get_settings() as $key => $setting ) {
93
+ $value = $this->_settings->get( $key );
94
+ if ( empty( $value ) ) {
95
+ $this->_is_configured = false;
96
+ break;
97
+ }
98
+ }
99
+
100
+ return $this->_is_configured;
101
+ }
102
+ }
lib/captcha/provider/nocaptcha.php ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Nocaptcha provider.
5
+ *
6
+ * @author Time.ly Network Inc.
7
+ * @since 2.2
8
+ *
9
+ * @package AI1EC
10
+ * @subpackage AI1EC.
11
+ */
12
+ class Ai1ec_Captcha_Nocaptcha_Provider extends Ai1ec_Captcha_Provider {
13
+
14
+ /**
15
+ * Returns settings array.
16
+ *
17
+ * @param bool $enable_rendering Whether setting HTML will be rendered or not.
18
+ *
19
+ * @return array Array of settings.
20
+ */
21
+ public function get_settings( $enable_rendering = true ) {
22
+ return array(
23
+ 'google_nocaptcha_public_key' => array(
24
+ 'type' => 'string',
25
+ 'version' => AI1ECFS_PLUGIN_NAME,
26
+ 'renderer' => array(
27
+ 'class' => 'input',
28
+ 'tab' => 'extensions',
29
+ 'item' => 'interactive',
30
+ 'type' => 'normal',
31
+ 'label' => __(
32
+ 'noCAPTCHA public key:',
33
+ AI1ECFS_PLUGIN_NAME
34
+ ),
35
+ 'condition' => $enable_rendering,
36
+ ),
37
+ 'value' => '',
38
+ ),
39
+ 'google_nocaptcha_private_key' => array(
40
+ 'type' => 'string',
41
+ 'version' => AI1ECFS_PLUGIN_NAME,
42
+ 'renderer' => array(
43
+ 'class' => 'input',
44
+ 'tab' => 'extensions',
45
+ 'item' => 'interactive',
46
+ 'type' => 'normal',
47
+ 'label' => __(
48
+ 'noCAPTCHA private key:',
49
+ AI1ECFS_PLUGIN_NAME
50
+ ),
51
+ 'condition' => $enable_rendering,
52
+ ),
53
+ 'value' => '',
54
+ ),
55
+ );
56
+ }
57
+
58
+ /**
59
+ * Returns captcha challenge.
60
+ *
61
+ * @return mixed
62
+ */
63
+ public function get_challenge() {
64
+ $args = array(
65
+ 'nocaptcha_key' => $this->_settings->get(
66
+ 'google_nocaptcha_public_key'
67
+ ),
68
+ );
69
+
70
+ return $this->_theme_loader->get_file(
71
+ 'captcha/nocaptcha/challenge.twig',
72
+ $args,
73
+ false
74
+ )->get_content();
75
+ }
76
+
77
+ /**
78
+ * Validates challenge.
79
+ *
80
+ * @param array Challenge response data.
81
+ *
82
+ * @return mixed
83
+ */
84
+ public function validate_challenge( array $data ) {
85
+
86
+ $response['message'] = Ai1ec_I18n::__(
87
+ 'Please try verifying you are human again.'
88
+ );
89
+ $response['success'] = false;
90
+
91
+ if ( empty( $data['g-recaptcha-response'] ) ) {
92
+ $response['message'] = Ai1ec_I18n::_(
93
+ 'There was an error reading the human verification data. Please try again.'
94
+ );
95
+ $response['success'] = false;
96
+ }
97
+ $url = add_query_arg(
98
+ array(
99
+ 'secret' => $this->_settings->get(
100
+ 'google_nocaptcha_private_key'
101
+ ),
102
+ 'response' => $data['g-recaptcha-response'],
103
+ ),
104
+ 'https://www.google.com/recaptcha/api/siteverify'
105
+ );
106
+ $json_resp = wp_remote_get( $url );
107
+ if ( is_wp_error( $json_resp ) ) {
108
+ return $response;
109
+ }
110
+ $resp = json_decode( $json_resp['body'], true );
111
+ if (
112
+ isset( $resp['success'] ) &&
113
+ $resp['success']
114
+ ) {
115
+ $response = array(
116
+ 'success' => true,
117
+ );
118
+ }
119
+
120
+ return $response;
121
+
122
+ }
123
+
124
+ /**
125
+ * Returns provider name.
126
+ *
127
+ * @return string
128
+ */
129
+ public function get_name() {
130
+ return 'Google No CAPTCHA';
131
+ }
132
+ }
lib/captcha/provider/recaptcha.php ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * ReCaptcha provider.
5
+ *
6
+ * @author Time.ly Network Inc.
7
+ * @since 2.2
8
+ *
9
+ * @package AI1EC
10
+ * @subpackage AI1EC.Captcha.Provider
11
+ */
12
+ class Ai1ec_Captcha_Recaptcha_Provider extends Ai1ec_Captcha_Provider {
13
+
14
+ /**
15
+ * Returns settings array.
16
+ *
17
+ * @param bool $enable_rendering Whether setting HTML will be rendered or not.
18
+ *
19
+ * @return array Array of settings.
20
+ */
21
+ public function get_settings( $enable_rendering = true ) {
22
+
23
+ return array(
24
+ 'google_recaptcha_public_key' => array(
25
+ 'type' => 'string',
26
+ 'version' => AI1ECFS_PLUGIN_NAME,
27
+ 'renderer' => array(
28
+ 'class' => 'input',
29
+ 'tab' => 'extensions',
30
+ 'item' => 'interactive',
31
+ 'type' => 'normal',
32
+ 'label' => __(
33
+ 'reCAPTCHA public key:',
34
+ AI1ECFS_PLUGIN_NAME
35
+ ),
36
+ 'condition' => $enable_rendering,
37
+ ),
38
+ 'value' => '',
39
+ ),
40
+ 'google_recaptcha_private_key' => array(
41
+ 'type' => 'string',
42
+ 'version' => AI1ECFS_PLUGIN_NAME,
43
+ 'renderer' => array(
44
+ 'class' => 'input',
45
+ 'tab' => 'extensions',
46
+ 'item' => 'interactive',
47
+ 'type' => 'normal',
48
+ 'label' => __(
49
+ 'reCAPTCHA private key:',
50
+ AI1ECFS_PLUGIN_NAME
51
+ ),
52
+ 'condition' => $enable_rendering,
53
+ ),
54
+ 'value' => '',
55
+ ),
56
+ );
57
+ }
58
+
59
+ /**
60
+ * Returns captcha challenge.
61
+ *
62
+ * @return mixed
63
+ */
64
+ public function get_challenge() {
65
+ $args = array(
66
+ 'verification_words' => Ai1ec_I18n::__( 'Human verification' ),
67
+ 'loading_recaptcha' => Ai1ec_I18n::__( 'Loading reCAPTCHA...' ),
68
+ 'recaptcha_key' => $this->_settings->get(
69
+ 'google_recaptcha_public_key'
70
+ ),
71
+ );
72
+
73
+ return $this->_theme_loader->get_file(
74
+ 'captcha/recaptcha/challenge.twig',
75
+ $args,
76
+ false
77
+ )->get_content();
78
+ }
79
+
80
+ /**
81
+ * Validates challenge.
82
+ *
83
+ * @param array Challenge response data.
84
+ *
85
+ * @return mixed
86
+ */
87
+ public function validate_challenge( array $data ) {
88
+ $response = array( 'success' => true );
89
+ if (
90
+ empty( $data['recaptcha_challenge_field'] ) ||
91
+ empty( $data['recaptcha_response_field'] )
92
+ ) {
93
+ $response['message'] = Ai1ec_I18n::_(
94
+ 'There was an error reading the human verification data. Please try again.'
95
+ );
96
+ $response['success'] = false;
97
+ }
98
+
99
+ require_once( AI1EC_VENDOR_PATH . 'recaptcha/recaptchalib.php' );
100
+ $resp = recaptcha_check_answer(
101
+ $this->_settings->get( 'google_recaptcha_private_key' ),
102
+ $_SERVER['REMOTE_ADDR'],
103
+ $data['recaptcha_challenge_field'],
104
+ $data['recaptcha_response_field']
105
+ );
106
+
107
+ if ( ! $resp->is_valid ) {
108
+ $response['message'] = Ai1ec_I18n::__(
109
+ 'Please try verifying you are human again.'
110
+ );
111
+ $response['success'] = false;
112
+ }
113
+ return $response;
114
+ }
115
+
116
+ /**
117
+ * Returns provider name.
118
+ *
119
+ * @return string
120
+ */
121
+ public function get_name() {
122
+ return 'Google reCAPTCHA';
123
+ }
124
+ }
lib/captcha/providers.php ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Captcha providers handler class.
5
+ *
6
+ * @author Time.ly Network Inc.
7
+ * @since 2.2
8
+ *
9
+ * @package AI1EC
10
+ * @subpackage AI1EC.Captcha
11
+ */
12
+ class Ai1ec_Captcha_Providers extends Ai1ec_Base {
13
+
14
+ /**
15
+ * List of available captcha providers.
16
+ *
17
+ * @var array
18
+ */
19
+ protected $_providers = null;
20
+
21
+ /**
22
+ * Returns list of available providers.
23
+ *
24
+ * @return array List of providers.
25
+ */
26
+ public function get_providers() {
27
+ if ( null !== $this->_providers ) {
28
+ return $this->_providers;
29
+ }
30
+ $built_in = array(
31
+ 'Ai1ec_Captcha_Recaptcha_Provider',
32
+ 'Ai1ec_Captcha_Nocaptcha_Provider',
33
+ );
34
+ $all_providers = apply_filters( 'ai1ec_captcha_providers', $built_in );
35
+ if ( empty( $all_providers ) ) {
36
+ return array();
37
+ }
38
+ $providers = array();
39
+ foreach ( $all_providers as $provider_class ) {
40
+ $provider = new $provider_class( $this->_registry );
41
+ if ( ! $provider instanceof Ai1ec_Captcha_Provider ) {
42
+ continue;
43
+ }
44
+ $providers[] = $provider;
45
+ }
46
+
47
+ return $providers;
48
+ }
49
+
50
+ /**
51
+ * Returns providers settings.
52
+ *
53
+ * @return array Providers settings.
54
+ */
55
+ public function get_providers_as_settings() {
56
+ $all_providers = $this->get_providers();
57
+ $settings = array();
58
+ foreach ( $all_providers as $provider ) {
59
+ $settings[] = array(
60
+ 'text' => $provider->get_name(),
61
+ 'value' => get_class( $provider ),
62
+ 'settings' => $provider->get_settings(),
63
+ );
64
+ }
65
+
66
+ return $settings;
67
+ }
68
+ }
lib/captcha/validator.php DELETED
@@ -1,42 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Captcha validator class.
5
- *
6
- * @author Time.ly Network Inc.
7
- * @since 2.0
8
- *
9
- * @package AI1EC
10
- * @subpackage AI1EC.Captcha
11
- */
12
- class Ai1ec_Captcha_Validator extends Ai1ec_Base {
13
-
14
- /**
15
- * Performs a captcha check
16
- *
17
- * @return array
18
- */
19
- public function validate() {
20
- $settings = $this->_registry->get( 'model.settings' );
21
- $response = array( 'success' => true );
22
- if ( empty( $_POST['recaptcha_challenge_field'] ) ||
23
- empty( $_POST['recaptcha_response_field'] ) ) {
24
- $response['message'] = __( 'There was an error reading the word verification data. Please try again.', AI1EC_PLUGIN_NAME );
25
- $response['success'] = false;
26
- }
27
-
28
- require_once( AI1EC_VENDOR_PATH . 'recaptcha/recaptchalib.php' );
29
- $resp = recaptcha_check_answer(
30
- $settings->get( 'recaptcha_private_key' ),
31
- $_SERVER['REMOTE_ADDR'],
32
- $_POST['recaptcha_challenge_field'],
33
- $_POST['recaptcha_response_field']
34
- );
35
-
36
- if ( ! $resp->is_valid ) {
37
- $response['message'] = __( 'Please try answering the word verification again.', AI1EC_PLUGIN_NAME );
38
- $response['success'] = false;
39
- }
40
- return $response;
41
- }
42
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/clone/renderer-helper.php CHANGED
@@ -40,12 +40,12 @@ class Ai1ec_Clone_Renderer_Helper extends Ai1ec_Base {
40
  */
41
  function duplicate_post_make_duplicate_link_row( $actions, $post ) {
42
  if ( $post->post_type == "ai1ec_event" ) {
43
- $actions['clone'] = '<a href="'.$this->duplicate_post_get_clone_post_link( $post->ID , 'display', false).'" title="'
44
  . esc_attr(__("Make new copy of event", AI1EC_PLUGIN_NAME))
45
  . '">' . __( 'Clone', AI1EC_PLUGIN_NAME ) . '</a>';
46
  $actions['edit_as_new_draft'] = '<a href="' . $this->duplicate_post_get_clone_post_link( $post->ID ) . '" title="'
47
- . esc_attr(__( 'Copy to a new draft' , AI1EC_PLUGIN_NAME ))
48
- . '">' . __( 'Clone to Draft' , AI1EC_PLUGIN_NAME ) . '</a>';
49
  }
50
  return $actions;
51
  }
@@ -85,7 +85,10 @@ class Ai1ec_Clone_Renderer_Helper extends Ai1ec_Base {
85
 
86
  return apply_filters(
87
  'duplicate_post_get_clone_post_link',
88
- wp_nonce_url( admin_url( "admin.php". $action ), 'ai1ec_clone_' . $post->ID ),
 
 
 
89
  $post->ID,
90
  $context
91
  );
40
  */
41
  function duplicate_post_make_duplicate_link_row( $actions, $post ) {
42
  if ( $post->post_type == "ai1ec_event" ) {
43
+ $actions['clone'] = '<a href="'.$this->duplicate_post_get_clone_post_link( $post->ID, 'display', false).'" title="'
44
  . esc_attr(__("Make new copy of event", AI1EC_PLUGIN_NAME))
45
  . '">' . __( 'Clone', AI1EC_PLUGIN_NAME ) . '</a>';
46
  $actions['edit_as_new_draft'] = '<a href="' . $this->duplicate_post_get_clone_post_link( $post->ID ) . '" title="'
47
+ . esc_attr(__( 'Copy to a new draft', AI1EC_PLUGIN_NAME ))
48
+ . '">' . __( 'Clone to Draft', AI1EC_PLUGIN_NAME ) . '</a>';
49
  }
50
  return $actions;
51
  }
85
 
86
  return apply_filters(
87
  'duplicate_post_get_clone_post_link',
88
+ wp_nonce_url(
89
+ ai1ec_admin_url( 'admin.php' . $action ),
90
+ 'ai1ec_clone_' . $post->ID
91
+ ),
92
  $post->ID,
93
  $context
94
  );
lib/command/change-theme.php CHANGED
@@ -29,12 +29,12 @@ class Ai1ec_Command_Change_Theme extends Ai1ec_Command {
29
  'theme_dir' => realpath( $_GET['ai1ec_theme_dir'] ),
30
  'theme_url' => $_GET['ai1ec_theme_url'],
31
  'stylesheet' => $stylesheet,
32
- 'legacy' => (bool)intval( $_GET['ai1ec_legacy'] )
33
  ) );
34
 
35
  // Return user to themes list page with success message.
36
  return array(
37
- 'url' => admin_url(
38
  'edit.php?post_type=ai1ec_event&page=all-in-one-event-calendar-themes'
39
  ),
40
  'query_args' => array(
29
  'theme_dir' => realpath( $_GET['ai1ec_theme_dir'] ),
30
  'theme_url' => $_GET['ai1ec_theme_url'],
31
  'stylesheet' => $stylesheet,
32
+ 'legacy' => false
33
  ) );
34
 
35
  // Return user to themes list page with success message.
36
  return array(
37
+ 'url' => ai1ec_admin_url(
38
  'edit.php?post_type=ai1ec_event&page=all-in-one-event-calendar-themes'
39
  ),
40
  'query_args' => array(
lib/command/clone.php CHANGED
@@ -39,12 +39,16 @@ class Ai1ec_Command_Clone extends Ai1ec_Command {
39
  if ( true === $this->_redirect ) {
40
  if ( '' === $post['status'] ) {
41
  return array(
42
- 'url' => admin_url( 'edit.php?post_type=' . AI1EC_POST_TYPE ),
 
 
43
  'query_args' => array()
44
  );
45
  } else {
46
  return array(
47
- 'url' => admin_url( 'post.php?action=edit&post=' . $id ),
 
 
48
  'query_args' => array()
49
  );
50
  }
@@ -69,8 +73,11 @@ class Ai1ec_Command_Clone extends Ai1ec_Command {
69
  )->get_current_action();
70
 
71
  if (
 
72
  'clone' === $current_action &&
73
- ! empty( $_REQUEST['post'] )
 
 
74
  ) {
75
  foreach ( $_REQUEST['post'] as $post_id ) {
76
  $this->_posts[] = array(
@@ -160,7 +167,7 @@ class Ai1ec_Command_Clone extends Ai1ec_Command {
160
 
161
  $new_post_id = wp_insert_post( $new_post );
162
  $edit_event_url = esc_attr(
163
- admin_url( "post.php?post={$new_post_id}&action=edit" )
164
  );
165
  $message = sprintf(
166
  __( '<p>The event <strong>%s</strong> was cloned succesfully. <a href="%s">Edit cloned event</a></p>', AI1EC_PLUGIN_NAME ),
@@ -232,7 +239,7 @@ class Ai1ec_Command_Clone extends Ai1ec_Command {
232
  $meta_values = get_post_custom_values( $meta_key, $post->ID );
233
  foreach ( $meta_values as $meta_value ) {
234
  $meta_value = maybe_unserialize( $meta_value );
235
- add_post_meta( $new_id , $meta_key , $meta_value );
236
  }
237
  }
238
  }
@@ -306,23 +313,23 @@ class Ai1ec_Command_Clone extends Ai1ec_Command {
306
  $db = $this->_registry->get( 'dbi.dbi' );
307
  if ( $db->are_terms_set() ) {
308
  // Clear default category (added by wp_insert_post)
309
- wp_set_object_terms( $new_id , NULL, 'category' );
310
 
311
  $post_taxonomies = get_object_taxonomies( $post->post_type );
312
 
313
  $taxonomies_blacklist = array();
314
- $taxonomies = array_diff( $post_taxonomies , $taxonomies_blacklist );
315
  foreach ( $taxonomies as $taxonomy ) {
316
  $post_terms = wp_get_object_terms(
317
- $post->ID ,
318
- $taxonomy ,
319
  array( 'orderby' => 'term_order' )
320
  );
321
  $terms = array();
322
  for ( $i = 0; $i < count( $post_terms ); $i++ ) {
323
  $terms[] = $post_terms[ $i ]->slug;
324
  }
325
- wp_set_object_terms( $new_id , $terms , $taxonomy );
326
  }
327
  }
328
  }
39
  if ( true === $this->_redirect ) {
40
  if ( '' === $post['status'] ) {
41
  return array(
42
+ 'url' => ai1ec_admin_url(
43
+ 'edit.php?post_type=' . AI1EC_POST_TYPE
44
+ ),
45
  'query_args' => array()
46
  );
47
  } else {
48
  return array(
49
+ 'url' => ai1ec_admin_url(
50
+ 'post.php?action=edit&post=' . $id
51
+ ),
52
  'query_args' => array()
53
  );
54
  }
73
  )->get_current_action();
74
 
75
  if (
76
+ current_user_can( 'edit_ai1ec_events' ) &&
77
  'clone' === $current_action &&
78
+ ! empty( $_REQUEST['post'] ) &&
79
+ ! empty( $_REQUEST['_wpnonce'] ) &&
80
+ wp_verify_nonce( $_REQUEST['_wpnonce'], 'bulk-posts' )
81
  ) {
82
  foreach ( $_REQUEST['post'] as $post_id ) {
83
  $this->_posts[] = array(
167
 
168
  $new_post_id = wp_insert_post( $new_post );
169
  $edit_event_url = esc_attr(
170
+ ai1ec_admin_url( "post.php?post={$new_post_id}&action=edit" )
171
  );
172
  $message = sprintf(
173
  __( '<p>The event <strong>%s</strong> was cloned succesfully. <a href="%s">Edit cloned event</a></p>', AI1EC_PLUGIN_NAME ),
239
  $meta_values = get_post_custom_values( $meta_key, $post->ID );
240
  foreach ( $meta_values as $meta_value ) {
241
  $meta_value = maybe_unserialize( $meta_value );
242
+ add_post_meta( $new_id, $meta_key, $meta_value );
243
  }
244
  }
245
  }
313
  $db = $this->_registry->get( 'dbi.dbi' );
314
  if ( $db->are_terms_set() ) {
315
  // Clear default category (added by wp_insert_post)
316
+ wp_set_object_terms( $new_id, NULL, 'category' );
317
 
318
  $post_taxonomies = get_object_taxonomies( $post->post_type );
319
 
320
  $taxonomies_blacklist = array();
321
+ $taxonomies = array_diff( $post_taxonomies, $taxonomies_blacklist );
322
  foreach ( $taxonomies as $taxonomy ) {
323
  $post_terms = wp_get_object_terms(
324
+ $post->ID,
325
+ $taxonomy,
326
  array( 'orderby' => 'term_order' )
327
  );
328
  $terms = array();
329
  for ( $i = 0; $i < count( $post_terms ); $i++ ) {
330
  $terms[] = $post_terms[ $i ]->slug;
331
  }
332
+ wp_set_object_terms( $new_id, $terms, $taxonomy );
333
  }
334
  }
335
  }
lib/command/compile-core-css.php CHANGED
@@ -36,17 +36,66 @@ class Ai1ec_Command_Compile_Core_Css extends Ai1ec_Command {
36
  * @see Ai1ec_Command::do_execute()
37
  */
38
  public function do_execute() {
39
- $less = $frontend = $this->_registry->get( 'less.lessphp' );
40
- $css = $less->parse_less_files( null, true );
41
-
42
- $filename = AI1EC_DEFAULT_THEME_PATH . DIRECTORY_SEPARATOR .
43
- 'css' . DIRECTORY_SEPARATOR . 'ai1ec_parsed_css.css';
44
- if ( false === @file_put_contents( $filename, $css ) ) {
45
- echo 'There has been an error writing core CSS';
46
- } else {
47
- echo 'Core CSS compiled succesfully and written in ' . $filename;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  }
49
- return array(
50
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  }
52
  }
36
  * @see Ai1ec_Command::do_execute()
37
  */
38
  public function do_execute() {
39
+ $message = $this->_process_files();
40
+ echo $message;
41
+ return Ai1ec_Http_Response_Helper::stop( 0 );
42
+ }
43
+
44
+ /**
45
+ * Returns calendar theme structure.
46
+ *
47
+ * @param string $stylesheet Calendar stylesheet. Expects one of
48
+ * ['vortex','plana','umbra','gamma'].
49
+ * @return array Calendar themes.
50
+ *
51
+ * @throws Ai1ec_Invalid_Argument_Exception
52
+ */
53
+ protected function _get_theme( $stylesheet ) {
54
+ return $this->_registry->get(
55
+ 'filesystem.misc'
56
+ )->build_theme_structure( $stylesheet );
57
+ }
58
+
59
+ /**
60
+ * Returns PHP code with hashmap array.
61
+ *
62
+ * @param $hashmap Array with compilation hashes.
63
+ *
64
+ * @return string PHP code.
65
+ */
66
+ protected function _get_hashmap_array( $hashmap ) {
67
+ return '<?php return ' . var_export( $hashmap, true ) . ';';
68
+ }
69
+
70
+ protected function _process_files() {
71
+ $less = $frontend = $this->_registry->get( 'less.lessphp' );
72
+ $option = $this->_registry->get( 'model.option' );
73
+ $theme = $this->_get_theme( $_GET['theme'] );
74
+
75
+ if ( isset( $_GET['switch'] ) ) {
76
+ $option->delete( 'ai1ec_less_variables' );
77
+ $option->set( 'ai1ec_current_theme', $theme );
78
+ return 'Theme switched to "' . $theme['stylesheet'] . '".';
79
  }
80
+
81
+ $css = $less->parse_less_files( null, true );
82
+ $hashmap = $less->get_less_hashmap();
83
+ $hashmap = $this->_get_hashmap_array( $hashmap );
84
+ $filename = $theme['theme_dir'] . DIRECTORY_SEPARATOR .
85
+ 'css' . DIRECTORY_SEPARATOR . 'ai1ec_parsed_css.css';
86
+ $hashmap_file = $theme['theme_dir'] . DIRECTORY_SEPARATOR .
87
+ 'less.sha1.map.php';
88
+
89
+ $css_written = file_put_contents( $filename, $css );
90
+ $hashmap_written = file_put_contents( $hashmap_file, $hashmap );
91
+ if (
92
+ false === $css_written ||
93
+ false === $hashmap_written
94
+ ) {
95
+ return 'There has been an error writing theme CSS';
96
+ }
97
+
98
+ return 'Theme CSS compiled succesfully and written in ' .
99
+ $filename . ' and classmap stored in ' . $hashmap_file;
100
  }
101
  }
lib/command/disable-gzip.php CHANGED
@@ -28,7 +28,7 @@ class Ai1ec_Command_Disable_Gzip extends Ai1ec_Command {
28
  $this->_registry->get( 'model.settings' )
29
  ->set( 'disable_gzip_compression', true );
30
  return array(
31
- 'url' => admin_url( 'edit.php' ),
32
  'query_args' => array(
33
  'post_type' => 'ai1ec_event',
34
  'page' => 'all-in-one-event-calendar-settings',
28
  $this->_registry->get( 'model.settings' )
29
  ->set( 'disable_gzip_compression', true );
30
  return array(
31
+ 'url' => ai1ec_admin_url( 'edit.php' ),
32
  'query_args' => array(
33
  'post_type' => 'ai1ec_event',
34
  'page' => 'all-in-one-event-calendar-settings',
lib/command/render-calendar.php CHANGED
@@ -76,6 +76,7 @@ class Ai1ec_Command_Render_Calendar extends Ai1ec_Command {
76
  'callback',
77
  null
78
  ),
 
79
  );
80
  }
81
 
76
  'callback',
77
  null
78
  ),
79
+ 'caller' => 'calendar',
80
  );
81
  }
82
 
lib/command/render-event.php CHANGED
@@ -31,12 +31,20 @@ class Ai1ec_Command_Render_Event extends Ai1ec_Command_Render_Calendar {
31
  * @see Ai1ec_Command::do_execute()
32
  */
33
  public function do_execute() {
34
- // get the event html
35
- $instance = false;
 
 
 
 
 
 
 
 
36
  if ( isset( $_REQUEST['instance_id'] ) ) {
37
- $instance = (int)$_REQUEST['instance_id'];
38
  }
39
- $event = $this->_registry->get(
40
  'model.event',
41
  get_the_ID(),
42
  $instance
@@ -44,38 +52,27 @@ class Ai1ec_Command_Render_Event extends Ai1ec_Command_Render_Calendar {
44
  $timezone_name = $event->get( 'timezone_name' );
45
  $event->get( 'start' )->set_preferred_timezone( $timezone_name );
46
  $event->get( 'end' )->set_preferred_timezone( $timezone_name );
47
- $event_page = null;
48
- $footer_html = '';
49
- if( is_single() ) {
50
- $event_page = $this->_registry->get( 'view.event.single' );
51
- $footer_html = $event_page->get_footer( $event );
52
- } else {
53
- // return nothing for now
54
- return array(
55
- 'data' => '',
56
- 'is_event' => true,
57
- );
58
- }
59
- $css = $this->_registry->get( 'css.frontend' )->add_link_to_html_for_frontend();
60
- $js = $this->_registry->get( 'controller.javascript' )->load_frontend_js( false );
61
  if ( 'html' !== $this->_request_type ) {
62
  return array(
63
  'data' => array(
64
- 'html' => $event_page->get_full_article( $event )
65
- ),
66
- 'callback' => Ai1ec_Request_Parser::get_param(
67
- 'callback',
68
- null
69
  ),
 
70
  );
71
  }
72
- $to_return = array(
 
73
  'data' => $event_page->get_content( $event ),
74
  'is_event' => true,
 
75
  );
76
- if ( ! empty( $footer_html ) ) {
77
- $to_return['footer'] = $event_page->get_footer( $event );
78
- }
79
- return $to_return;
80
  }
81
- }
31
  * @see Ai1ec_Command::do_execute()
32
  */
33
  public function do_execute() {
34
+ // If not on the single event page, return nothing.
35
+ if ( ! is_single() ) {
36
+ return array(
37
+ 'data' => '',
38
+ 'is_event' => true,
39
+ );
40
+ }
41
+
42
+ // Else proceed with rendering valid event. Fetch all relevant details.
43
+ $instance = false;
44
  if ( isset( $_REQUEST['instance_id'] ) ) {
45
+ $instance = (int)$_REQUEST['instance_id'];
46
  }
47
+ $event = $this->_registry->get(
48
  'model.event',
49
  get_the_ID(),
50
  $instance
52
  $timezone_name = $event->get( 'timezone_name' );
53
  $event->get( 'start' )->set_preferred_timezone( $timezone_name );
54
  $event->get( 'end' )->set_preferred_timezone( $timezone_name );
55
+ $event_page = $this->_registry->get( 'view.event.single' );
56
+ $footer_html = $event_page->get_footer( $event );
57
+ $css = $this->_registry->get( 'css.frontend' )
58
+ ->add_link_to_html_for_frontend();
59
+ $js = $this->_registry->get( 'controller.javascript' )
60
+ ->load_frontend_js( false );
61
+
62
+ // If requesting event by JSON (remotely), return fully rendered event.
 
 
 
 
 
 
63
  if ( 'html' !== $this->_request_type ) {
64
  return array(
65
  'data' => array(
66
+ 'html' => $event_page->get_full_article( $event, $footer_html )
 
 
 
 
67
  ),
68
+ 'callback' => Ai1ec_Request_Parser::get_param( 'callback', null ),
69
  );
70
  }
71
+ // Else return event details as components.
72
+ return array(
73
  'data' => $event_page->get_content( $event ),
74
  'is_event' => true,
75
+ 'footer' => $footer_html,
76
  );
 
 
 
 
77
  }
78
+ }
lib/command/save-settings.php CHANGED
@@ -25,7 +25,6 @@ class Ai1ec_Command_Save_Settings extends Ai1ec_Command_Save_Abstract {
25
  $_POST['enabled_views'] = true;
26
  // let other plugin modify the post
27
  $_POST = apply_filters( 'ai1ec_before_save_settings', $_POST );
28
-
29
  foreach ( $options as $name => $data ) {
30
  $value = null;
31
  if ( isset( $_POST[$name] ) ) {
@@ -97,7 +96,7 @@ class Ai1ec_Command_Save_Settings extends Ai1ec_Command_Save_Abstract {
97
  do_action( 'ai1ec_settings_updated', $options, $new_options );
98
 
99
  return array(
100
- 'url' => admin_url(
101
  'edit.php?post_type=ai1ec_event&page=all-in-one-event-calendar-settings'
102
  ),
103
  'query_args' => array(
25
  $_POST['enabled_views'] = true;
26
  // let other plugin modify the post
27
  $_POST = apply_filters( 'ai1ec_before_save_settings', $_POST );
 
28
  foreach ( $options as $name => $data ) {
29
  $value = null;
30
  if ( isset( $_POST[$name] ) ) {
96
  do_action( 'ai1ec_settings_updated', $options, $new_options );
97
 
98
  return array(
99
+ 'url' => ai1ec_admin_url(
100
  'edit.php?post_type=ai1ec_event&page=all-in-one-event-calendar-settings'
101
  ),
102
  'query_args' => array(
lib/command/save-theme-options.php CHANGED
@@ -40,11 +40,13 @@ class Ai1ec_Command_Save_Theme_Options extends Ai1ec_Command_Save_Abstract {
40
  }
41
  }
42
  $_POST = add_magic_quotes( $_POST );
 
43
  }
44
  // Handle reset of theme options.
45
  elseif ( isset( $_POST[Ai1ec_View_Theme_Options::RESET_ID] ) ) {
46
- $lessphp = $this->_registry->get( 'less.lessphp' );
47
- $variables = $lessphp->get_less_variable_data_from_config_file();
 
48
  do_action( 'ai1ec_reset_less_variables' );
49
  }
50
 
@@ -58,7 +60,7 @@ class Ai1ec_Command_Save_Theme_Options extends Ai1ec_Command_Save_Abstract {
58
  );
59
 
60
  return array(
61
- 'url' => admin_url(
62
  'edit.php?post_type=ai1ec_event&page=all-in-one-event-calendar-edit-css'
63
  ),
64
  'query_args' => array(),
40
  }
41
  }
42
  $_POST = add_magic_quotes( $_POST );
43
+
44
  }
45
  // Handle reset of theme options.
46
  elseif ( isset( $_POST[Ai1ec_View_Theme_Options::RESET_ID] ) ) {
47
+ $option = $this->_registry->get( 'model.option' );
48
+ $option->delete( 'ai1ec_less_variables' );
49
+ $option->delete( 'ai1ec_render_css' );
50
  do_action( 'ai1ec_reset_less_variables' );
51
  }
52
 
60
  );
61
 
62
  return array(
63
+ 'url' => ai1ec_admin_url(
64
  'edit.php?post_type=ai1ec_event&page=all-in-one-event-calendar-edit-css'
65
  ),
66
  'query_args' => array(),
lib/compatibility/check.php ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Theme backward compatibility check.
4
+ *
5
+ * @author Time.ly Network Inc.
6
+ * @since 2.2
7
+ *
8
+ * @package AI1EC
9
+ * @subpackage AI1EC.Lib.Compatibility
10
+ */
11
+ class Ai1ec_Compatibility_Check extends Ai1ec_Base {
12
+
13
+ /**
14
+ * @var null|bool Calculated response.
15
+ */
16
+ protected $_use_backward_compatibility = null;
17
+
18
+ /**
19
+ * Returns whether calendar is using backward compatibility or not.
20
+ *
21
+ * @return bool|null Result
22
+ *
23
+ * @throws Ai1ec_Bootstrap_Exception
24
+ */
25
+ public function use_backward_compatibility() {
26
+ if ( null === $this->_use_backward_compatibility ) {
27
+ $this->_use_backward_compatibility = (
28
+ AI1EC_THEME_COMPATIBILITY_FER &&
29
+ ! $this->_registry->get(
30
+ 'model.settings'
31
+ )->get( 'ai1ec_use_frontend_rendering', false )
32
+ );
33
+ }
34
+ return $this->_use_backward_compatibility;
35
+ }
36
+
37
+ /**
38
+ * Observes settings changes. If setting ai1ec_use_frontend_rendering
39
+ * is changed and set to true perfoms theme check.
40
+ *
41
+ * @param array $old_options Old options array.
42
+ * @param array $new_options New options array.
43
+ *
44
+ * @return void Method does not return.
45
+ *
46
+ * @throws Ai1ec_Bootstrap_Exception
47
+ */
48
+ public function ai1ec_settings_observer( $old_options, $new_options ) {
49
+ $old_value = isset( $old_options['ai1ec_use_frontend_rendering'] )
50
+ ? (bool)$old_options['ai1ec_use_frontend_rendering']['value']
51
+ : null;
52
+ $new_value = isset( $new_options['ai1ec_use_frontend_rendering'] )
53
+ ? (bool)$new_options['ai1ec_use_frontend_rendering']['value']
54
+ : null;
55
+ if (
56
+ $old_value === $new_value ||
57
+ ! $new_value
58
+ ) {
59
+ return;
60
+ }
61
+ if ( $this->is_current_theme_outside_core() ) {
62
+ $this->_registry->get( 'notification.admin' )->store(
63
+ Ai1ec_I18n::__( 'You have turned on Frontend Rendering and you are using a custom calendar theme. If your theme does not support Frontend Rendering, your calendar may not work correctly.' ),
64
+ 'error',
65
+ 0,
66
+ array( Ai1ec_Notification_Admin::RCPT_ADMIN ),
67
+ true
68
+ );
69
+ }
70
+ }
71
+
72
+ /**
73
+ * Returns whether current calendar theme is located under core directory
74
+ * or not.
75
+ *
76
+ * @return bool Result
77
+ *
78
+ * @throws Ai1ec_Bootstrap_Exception
79
+ */
80
+ public function is_current_theme_outside_core() {
81
+ $option = $this->_registry->get( 'model.option' );
82
+ $cur_theme = $option->get( 'ai1ec_current_theme', array() );
83
+ $theme_root = dirname( AI1EC_DEFAULT_THEME_ROOT );
84
+ return (
85
+ isset( $cur_theme['theme_root'] ) &&
86
+ $theme_root !== dirname( $cur_theme['theme_root'] )
87
+ );
88
+ }
89
+ }
lib/cookie/utility.php CHANGED
@@ -64,7 +64,7 @@ class Ai1ec_Cookie_Utility extends Ai1ec_Base {
64
  * @return string
65
  */
66
  public function get_path_for_cookie() {
67
- $parsed = parse_url( site_url() );
68
  return isset( $parsed['path'] ) ? $parsed['path'] : '/';
69
  }
70
  }
64
  * @return string
65
  */
66
  public function get_path_for_cookie() {
67
+ $parsed = parse_url( ai1ec_site_url() );
68
  return isset( $parsed['path'] ) ? $parsed['path'] : '/';
69
  }
70
  }
lib/css/admin.php CHANGED
@@ -25,6 +25,8 @@ class Ai1ec_Css_Admin extends Ai1ec_Base {
25
  ),
26
  'edit-tags.php' => array(
27
  array( 'style', 'colorpicker.css', ),
 
 
28
  ),
29
  $settings->get( 'settings_page' ) => array(
30
  array( 'script', 'common', ),
@@ -63,7 +65,6 @@ class Ai1ec_Css_Admin extends Ai1ec_Base {
63
  array(
64
  array( 'style', 'bootstrap.min.css', ),
65
  array( 'style', 'add_new_event.css', ),
66
- array( 'style', 'datepicker.css', ),
67
  )
68
  );
69
  }
25
  ),
26
  'edit-tags.php' => array(
27
  array( 'style', 'colorpicker.css', ),
28
+ array( 'style', 'bootstrap.min.css', ),
29
+ array( 'style', 'taxonomies.css', ),
30
  ),
31
  $settings->get( 'settings_page' ) => array(
32
  array( 'script', 'common', ),
65
  array(
66
  array( 'style', 'bootstrap.min.css', ),
67
  array( 'style', 'add_new_event.css', ),
 
68
  )
69
  );
70
  }
lib/css/frontend.php CHANGED
@@ -13,8 +13,8 @@ class Ai1ec_Css_Frontend extends Ai1ec_Base {
13
 
14
  const QUERY_STRING_PARAM = 'ai1ec_render_css';
15
 
16
- // This is for testing purpose, set it to AI1EC_DEBUG value.
17
- const PARSE_LESS_FILES_AT_EVERY_REQUEST = AI1EC_DEBUG;
18
 
19
  const KEY_FOR_PERSISTANCE = 'ai1ec_parsed_css';
20
  /**
@@ -141,6 +141,11 @@ class Ai1ec_Css_Frontend extends Ai1ec_Base {
141
  */
142
  public function update_persistence_layer( $css ) {
143
  $filename = $this->persistance_context->write_data_to_persistence( $css );
 
 
 
 
 
144
  $this->save_less_parse_time( $filename['url'] );
145
  }
146
 
@@ -157,10 +162,13 @@ class Ai1ec_Css_Frontend extends Ai1ec_Base {
157
  // if it's empty it's a new install probably. Return static css.
158
  // if it's numeric, just consider it a new install
159
  if ( empty( $saved_par ) ) {
 
 
 
160
  return Ai1ec_Http_Response_Helper::remove_protocols(
161
  apply_filters(
162
  'ai1ec_frontend_standard_css_url',
163
- AI1EC_URL . '/public/themes-ai1ec/vortex/css/ai1ec_parsed_css.css'
164
  )
165
  );
166
  }
@@ -171,7 +179,7 @@ class Ai1ec_Css_Frontend extends Ai1ec_Base {
171
  return Ai1ec_Http_Response_Helper::remove_protocols(
172
  add_query_arg(
173
  array( self::QUERY_STRING_PARAM => $time, ),
174
- trailingslashit( $template_helper->get_site_url() )
175
  )
176
  );
177
  } else {
@@ -215,6 +223,12 @@ class Ai1ec_Css_Frontend extends Ai1ec_Base {
215
  array $variables = null,
216
  $update_persistence = false
217
  ) {
 
 
 
 
 
 
218
  $notification = $this->_registry->get( 'notification.admin' );
219
  if (
220
  ! $this->_registry->get(
@@ -286,14 +300,14 @@ class Ai1ec_Css_Frontend extends Ai1ec_Base {
286
  '<p>' . Ai1ec_I18n::__(
287
  "Theme options were successfully reset to their default values. <a href='%s'>Visit site</a>"
288
  ) . '</p>',
289
- get_site_url()
290
  );
291
  } else {
292
  $message = sprintf(
293
  '<p>' .Ai1ec_I18n::__(
294
  "Theme options were updated successfully. <a href='%s'>Visit site</a>"
295
  ) . '</p>',
296
- get_site_url()
297
  );
298
  }
299
 
13
 
14
  const QUERY_STRING_PARAM = 'ai1ec_render_css';
15
 
16
+ // This is for testing purpose, set it to AI1EC_PARSE_LESS_FILES_AT_EVERY_REQUEST value.
17
+ const PARSE_LESS_FILES_AT_EVERY_REQUEST = AI1EC_PARSE_LESS_FILES_AT_EVERY_REQUEST;
18
 
19
  const KEY_FOR_PERSISTANCE = 'ai1ec_parsed_css';
20
  /**
141
  */
142
  public function update_persistence_layer( $css ) {
143
  $filename = $this->persistance_context->write_data_to_persistence( $css );
144
+ $this->db_adapter->set(
145
+ 'ai1ec_filename_css',
146
+ $filename['file'],
147
+ true
148
+ );
149
  $this->save_less_parse_time( $filename['url'] );
150
  }
151
 
162
  // if it's empty it's a new install probably. Return static css.
163
  // if it's numeric, just consider it a new install
164
  if ( empty( $saved_par ) ) {
165
+ $theme = $this->_registry->get(
166
+ 'model.option'
167
+ )->get( 'ai1ec_current_theme' );
168
  return Ai1ec_Http_Response_Helper::remove_protocols(
169
  apply_filters(
170
  'ai1ec_frontend_standard_css_url',
171
+ $theme['theme_url'] . '/css/ai1ec_parsed_css.css'
172
  )
173
  );
174
  }
179
  return Ai1ec_Http_Response_Helper::remove_protocols(
180
  add_query_arg(
181
  array( self::QUERY_STRING_PARAM => $time, ),
182
+ trailingslashit( ai1ec_get_site_url() )
183
  )
184
  );
185
  } else {
223
  array $variables = null,
224
  $update_persistence = false
225
  ) {
226
+ if ( ! $this->lessphp_controller->is_compilation_needed( $variables ) ) {
227
+ $this->_registry->get(
228
+ 'model.option'
229
+ )->delete( 'ai1ec_render_css' );
230
+ return true;
231
+ }
232
  $notification = $this->_registry->get( 'notification.admin' );
233
  if (
234
  ! $this->_registry->get(
300
  '<p>' . Ai1ec_I18n::__(
301
  "Theme options were successfully reset to their default values. <a href='%s'>Visit site</a>"
302
  ) . '</p>',
303
+ ai1ec_get_site_url()
304
  );
305
  } else {
306
  $message = sprintf(
307
  '<p>' .Ai1ec_I18n::__(
308
  "Theme options were updated successfully. <a href='%s'>Visit site</a>"
309
  ) . '</p>',
310
+ ai1ec_get_site_url()
311
  );
312
  }
313
 
lib/database/helper.php CHANGED
@@ -79,7 +79,6 @@ class Ai1ec_Database_Helper {
79
  $existing = $this->get_all_tables();
80
  $table = NULL;
81
  $candidate = NULL;
82
- $name = $name;
83
  foreach ( $this->_prefixes as $prefix ) {
84
  $candidate = $prefix . $name;
85
  $index = strtolower( $candidate );
79
  $existing = $this->get_all_tables();
80
  $table = NULL;
81
  $candidate = NULL;
 
82
  foreach ( $this->_prefixes as $prefix ) {
83
  $candidate = $prefix . $name;
84
  $index = strtolower( $candidate );
lib/date/system.php CHANGED
@@ -134,7 +134,6 @@ class Ai1ec_Date_System extends Ai1ec_Base {
134
  ) {
135
  $date = $datetime->format( $this->get_date_format_patter( $pattern ) );
136
  return str_replace( '/', '-', $date );
137
- return $date;
138
  }
139
 
140
  /**
@@ -239,4 +238,15 @@ class Ai1ec_Date_System extends Ai1ec_Base {
239
  }
240
  return $date;
241
  }
 
 
 
 
 
 
 
 
 
 
 
242
  }
134
  ) {
135
  $date = $datetime->format( $this->get_date_format_patter( $pattern ) );
136
  return str_replace( '/', '-', $date );
 
137
  }
138
 
139
  /**
238
  }
239
  return $date;
240
  }
241
+
242
+ /**
243
+ * Returns current rounded time as unix integer.
244
+ *
245
+ * @param int $shift Shift value.
246
+ *
247
+ * @return int Unix timestamp.
248
+ */
249
+ public function get_current_rounded_time( $shift = 11 ) {
250
+ return $this->current_time() >> $shift << $shift;
251
+ }
252
  }
lib/date/timezone.php CHANGED
@@ -362,7 +362,7 @@ class Ai1ec_Date_Timezone extends Ai1ec_Base {
362
  Ai1ec_I18n::__(
363
  'Please select site timezone in %s <em>Timezone</em> dropdown menu.'
364
  ),
365
- '<a href="' . admin_url( 'options-general.php' ) .
366
  '">' . Ai1ec_I18n::__( 'Settings' ) . '</a>'
367
  ),
368
  'error'
@@ -398,7 +398,7 @@ class Ai1ec_Date_Timezone extends Ai1ec_Base {
398
  'Timezone "UTC%+d" is not recognized. Please %suse valid%s timezone name, until then events will be created in UTC timezone.'
399
  ),
400
  $zone,
401
- '<a href="' . admin_url( 'options-general.php' ) . '">',
402
  '</a>'
403
  ),
404
  'error'
@@ -466,7 +466,7 @@ class Ai1ec_Date_Timezone extends Ai1ec_Base {
466
 
467
  /**
468
  * Check if timezone is set in wp_option
469
- *
470
  */
471
  public function is_timezone_not_set() {
472
  $timezone = $this->_registry->get( 'model.option' )
@@ -476,7 +476,7 @@ class Ai1ec_Date_Timezone extends Ai1ec_Base {
476
 
477
  /**
478
  * Render options for select in settings
479
- *
480
  * @return array
481
  */
482
  public function get_timezones( $only_zones = false ) {
@@ -510,7 +510,7 @@ class Ai1ec_Date_Timezone extends Ai1ec_Base {
510
  'value' => $zone,
511
  );
512
  }
513
-
514
  return $options;
515
  }
516
 
362
  Ai1ec_I18n::__(
363
  'Please select site timezone in %s <em>Timezone</em> dropdown menu.'
364
  ),
365
+ '<a href="' . ai1ec_admin_url( 'options-general.php' ) .
366
  '">' . Ai1ec_I18n::__( 'Settings' ) . '</a>'
367
  ),
368
  'error'
398
  'Timezone "UTC%+d" is not recognized. Please %suse valid%s timezone name, until then events will be created in UTC timezone.'
399
  ),
400
  $zone,
401
+ '<a href="' . ai1ec_admin_url( 'options-general.php' ) . '">',
402
  '</a>'
403
  ),
404
  'error'
466
 
467
  /**
468
  * Check if timezone is set in wp_option
469
+ *
470
  */
471
  public function is_timezone_not_set() {
472
  $timezone = $this->_registry->get( 'model.option' )
476
 
477
  /**
478
  * Render options for select in settings
479
+ *
480
  * @return array
481
  */
482
  public function get_timezones( $only_zones = false ) {
510
  'value' => $zone,
511
  );
512
  }
513
+
514
  return $options;
515
  }
516
 
lib/edd/updater.php ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * EDD_SL_Plugin_Updater wrapper.
4
+ *
5
+ * @instantiator new
6
+ *
7
+ * @author Time.ly Network Inc.
8
+ * @since 2.2
9
+ * @package AI1EC
10
+ * @subpackage AI1EC.Lib.Edd
11
+
12
+ */
13
+ class Ai1ec_EDD_SL_Plugin_Updater extends EDD_SL_Plugin_Updater {
14
+
15
+ /**
16
+ * @var string API URL.
17
+ */
18
+ protected $_timely_api_url;
19
+
20
+ /**
21
+ * @var array|null API data.
22
+ */
23
+ protected $_timely_api_data;
24
+
25
+ /**
26
+ * Class constructor.
27
+ *
28
+ * @param string $_api_url The URL pointing to the custom API endpoint.
29
+ * @param string $_plugin_file Path to the plugin file.
30
+ * @param array $_api_data Optional data to send with API calls.
31
+ *
32
+ * @return Ai1ec_EDD_SL_Plugin_Updater
33
+ */
34
+ public function __construct( $_api_url, $_plugin_file, $_api_data = null ) {
35
+ $this->_timely_api_data = $_api_data;
36
+ $_api_url = $this->_modify_api_url(
37
+ $_api_url,
38
+ $_plugin_file,
39
+ $_api_data
40
+ );
41
+ $this->_timely_api_url = $_api_url;
42
+ parent::__construct( $_api_url, $_plugin_file, $_api_data );
43
+ $this->_timely_api_url = trailingslashit( $this->_timely_api_url );
44
+ }
45
+
46
+ /**
47
+ * WP hook handler.
48
+ *
49
+ * @param array $args Request arguments.
50
+ * @param string $url URL.
51
+ *
52
+ * @return array Modified arguments.
53
+ */
54
+ public function http_request_args( $args, $url ) {
55
+ if (
56
+ $url !== $this->_timely_api_url ||
57
+ ! isset( $args['body']['edd_action'] ) ||
58
+ 'get_version' !== $args['body']['edd_action']
59
+ ) {
60
+ return $args;
61
+ }
62
+ $args['method'] = 'GET';
63
+ unset( $args['body'] );
64
+ return $args;
65
+ }
66
+
67
+ /**
68
+ * Modifies API URL.
69
+ *
70
+ * @param string $_api_url API URL.
71
+ * @param string $_plugin_file Plugin file.
72
+ * @param array $_api_data API data.
73
+ *
74
+ * @return string Modified URL.
75
+ */
76
+ protected function _modify_api_url( $_api_url, $_plugin_file, $_api_data ) {
77
+ $slug = basename( $_plugin_file, '.php' );
78
+ $api_params = array(
79
+ 'edd_action' => 'get_version',
80
+ 'license' => $_api_data['license'],
81
+ 'item_name' => urlencode( $_api_data['item_name'] ),
82
+ 'slug' => $slug,
83
+ 'author' => urlencode( $_api_data['author'] ),
84
+ 'url' => site_url(),
85
+ );
86
+ return add_query_arg(
87
+ $api_params,
88
+ trailingslashit( $_api_url )
89
+ );
90
+ }
91
+ }
lib/environment/check.php CHANGED
@@ -19,8 +19,10 @@ class Ai1ec_Environment_Checks extends Ai1ec_Base {
19
  * @var array
20
  */
21
  protected $_addons = array(
22
- 'all-in-one-event-calendar-extended-views/all-in-one-event-calendar-extended-views.php' => '1.1.1',
23
- 'all-in-one-event-calendar-super-widget/all-in-one-event-calendar-super-widget.php' => '1.0.8',
 
 
24
  );
25
 
26
  /**
@@ -64,7 +66,7 @@ class Ai1ec_Environment_Checks extends Ai1ec_Base {
64
  ) {
65
  $msg = sprintf(
66
  Ai1ec_I18n::__( 'The plugin is installed, but has not been configured. <a href="%s">Click here to set it up now &raquo;</a>' ),
67
- admin_url( AI1EC_SETTINGS_BASE_URL )
68
  );
69
  $notification->store(
70
  $msg,
@@ -173,6 +175,9 @@ class Ai1ec_Environment_Checks extends Ai1ec_Base {
173
  * or not.
174
  *
175
  * @return void Method does not return.
 
 
 
176
  */
177
  protected function _plugin_activation(
178
  $addon,
@@ -188,23 +193,17 @@ class Ai1ec_Environment_Checks extends Ai1ec_Base {
188
  }
189
  $version = $ev_data['Version'];
190
  if ( -1 === version_compare( $version, $min_version ) ) {
 
 
 
191
  $message = sprintf(
192
- Ai1ec_I18n::__( 'Addon %s needs to be at least in version %s' ),
 
193
  $ev_data['Name'],
194
  $min_version
195
  );
196
- if ( ! $core ) {
197
- throw new Ai1ec_Outdated_Addon_Exception( $message, $addon );
198
- } else {
199
- deactivate_plugins( $addon, $silent );
200
- $this->_registry->get( 'notification.admin' )->store(
201
- $message,
202
- 'error',
203
- 0,
204
- array( Ai1ec_Notification_Admin::RCPT_ADMIN ),
205
- true
206
- );
207
- }
208
  }
209
  }
210
- }
19
  * @var array
20
  */
21
  protected $_addons = array(
22
+ 'all-in-one-event-calendar-extended-views/all-in-one-event-calendar-extended-views.php' => '1.1.3',
23
+ 'all-in-one-event-calendar-super-widget/all-in-one-event-calendar-super-widget.php' => '1.1.0',
24
+ 'all-in-one-event-calendar-featured-events/all-in-one-event-calendar-featured-events.php' => '1.0.5',
25
+ 'all-in-one-event-calendar-frontend-submissions/all-in-one-event-calendar-frontend-submissions.php' => '1.1.3',
26
  );
27
 
28
  /**
66
  ) {
67
  $msg = sprintf(
68
  Ai1ec_I18n::__( 'The plugin is installed, but has not been configured. <a href="%s">Click here to set it up now &raquo;</a>' ),
69
+ ai1ec_admin_url( AI1EC_SETTINGS_BASE_URL )
70
  );
71
  $notification->store(
72
  $msg,
175
  * or not.
176
  *
177
  * @return void Method does not return.
178
+ *
179
+ * @throws Ai1ec_Bootstrap_Exception
180
+ * @throws Ai1ec_Outdated_Addon_Exception
181
  */
182
  protected function _plugin_activation(
183
  $addon,
193
  }
194
  $version = $ev_data['Version'];
195
  if ( -1 === version_compare( $version, $min_version ) ) {
196
+ $msg1 = Ai1ec_I18n::__( 'The add-on <strong>%s</strong> must be updated to at least version %s to maintain compatibility with the core calendar.' );
197
+ $msg2 = Ai1ec_I18n::__( 'If you do not see update notices below, ensure you have properly <a href="https://time.ly/document/user-guide/getting-started/license-keys/" target="_blank">entered your licence keys</a>. Alternatively, navigate to <a href="https://time.ly/your-account/">your account</a> to download the latest version of the add-on(s) and <a href="http://time.ly/document/user-guide/troubleshooting/perform-manual-upgrade/">update manually</a>. Please <a href="https://time.ly/forums/">post in the forum</a> if you have trouble. We are happy to help.' );
198
+
199
  $message = sprintf(
200
+ '<span class="highlight" style="margin: 0 -6px; padding: 4px 6px">' .
201
+ $msg1 . '</span></p><p>' . $msg2,
202
  $ev_data['Name'],
203
  $min_version
204
  );
205
+
206
+ throw new Ai1ec_Outdated_Addon_Exception( $message, $addon );
 
 
 
 
 
 
 
 
 
 
207
  }
208
  }
209
+ }
lib/environment/exception/addon.php CHANGED
@@ -43,4 +43,18 @@ class Ai1ec_Outdated_Addon_Exception extends Ai1ec_Exception {
43
  public function __toString() {
44
  return '';
45
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  }
43
  public function __toString() {
44
  return '';
45
  }
46
+
47
+ /**
48
+ * @see Ai1ec_Exception::get_redirect_url()
49
+ */
50
+ public function get_redirect_url() {
51
+ return ai1ec_admin_url( 'plugins.php' );
52
+ }
53
+
54
+ /**
55
+ * @see Ai1ec_Exception::display_backtrace()
56
+ */
57
+ public function display_backtrace(){
58
+ return false;
59
+ }
60
  }
lib/exception/ai1ec.php CHANGED
@@ -31,4 +31,22 @@ class Ai1ec_Exception extends Exception {
31
  public function plugin_to_disable() {
32
  return '';
33
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  }
31
  public function plugin_to_disable() {
32
  return '';
33
  }
34
+
35
+ /**
36
+ * Returns destination URL if exception handler redirects.
37
+ *
38
+ * @return string Result.
39
+ */
40
+ public function get_redirect_url() {
41
+ return ai1ec_get_admin_url();
42
+ }
43
+
44
+ /**
45
+ * Defined whether exception handler should attach backtrace or not.
46
+ *
47
+ * @return bool Value.
48
+ */
49
+ public function display_backtrace(){
50
+ return true;
51
+ }
52
  }
lib/exception/handler.php CHANGED
@@ -171,12 +171,12 @@ class Ai1ec_Exception_Handler {
171
  $matches
172
  )
173
  ) {
174
- $line = '<h4>' .
175
  sprintf(
176
- __( 'Disabled add-on "%s" due to an error' ),
177
  __( trim( $matches[1] ), dirname( $addon ) )
178
  ) .
179
- '</h4>';
180
  }
181
  return $line;
182
  }
@@ -196,19 +196,17 @@ class Ai1ec_Exception_Handler {
196
  die();
197
  }
198
  // if it's something we handle, handle it
199
- $backtrace = '';
200
- $trace = nl2br( $exception );
201
- if ( ! empty( $trace ) ) {
202
- $backtrace = '<br><br>' . $trace;
203
- }
204
  if ( $exception instanceof $this->_exception_class ) {
205
  // check if it's a plugin instead of core
206
  $disable_addon = $this->is_caused_by_addon( $exception );
207
  $message = method_exists( $exception, 'get_html_message' )
208
  ? $exception->get_html_message()
209
  : $exception->getMessage();
210
- $message .= $backtrace .
211
- '<br>Request Uri: ' . $_SERVER['REQUEST_URI'];
 
 
212
  if ( null !== $disable_addon ) {
213
  include_once ABSPATH . 'wp-admin/includes/plugin.php';
214
  // deactivate the plugin. Fire handlers to hide options.
@@ -222,7 +220,7 @@ class Ai1ec_Exception_Handler {
222
  array( Ai1ec_Notification_Admin::RCPT_ADMIN ),
223
  true
224
  );
225
- $this->redirect();
226
  } else {
227
  // check if it has a methof for deatiled html
228
  $this->soft_deactivate_plugin( $message );
@@ -392,25 +390,23 @@ class Ai1ec_Exception_Handler {
392
  $redirect_url = add_query_arg(
393
  self::DB_REACTIVATE_PLUGIN,
394
  'true',
395
- get_admin_url( $_SERVER['REQUEST_URI'] )
396
  );
397
  $label = __(
398
- 'All In One Event Calendar has been disabled due to an error:',
399
  AI1EC_PLUGIN_NAME
400
  );
401
- $message = '<div class="message error">'.
402
- '<strong>' . $label . '</strong>';
403
- if ( ! empty( $this->_message ) ) {
404
- $message .= '<p>' . $this->_message . '</p>';
405
- }
406
- $message .= sprintf(
407
  __(
408
- '<p>If you corrected the error and wish to try reactivating the plugin, <a href="%s">click here</a>.</p>',
409
  AI1EC_PLUGIN_NAME
410
- ),
411
- $redirect_url
412
- );
413
- $message .= '</div>';
414
  echo $message;
415
  }
416
 
@@ -419,12 +415,14 @@ class Ai1ec_Exception_Handler {
419
  *
420
  * @return void Method does not return
421
  */
422
- protected function redirect() {
 
423
  if ( is_admin() ) {
424
- Ai1ec_Http_Response_Helper::redirect( get_admin_url() );
425
- } else {
426
- Ai1ec_Http_Response_Helper::redirect( get_site_url() );
427
  }
 
428
  }
429
  /**
430
  * Had to add it as var_dump was locking my browser.
@@ -562,4 +560,39 @@ class Ai1ec_Exception_Handler {
562
  echo nl2br( str_replace( ' ', '&nbsp;', htmlentities( $string ) ) );
563
  }
564
 
565
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
171
  $matches
172
  )
173
  ) {
174
+ $line = '<p><strong>' .
175
  sprintf(
176
+ __( 'The add-on "%s" has been disabled due to an error:' ),
177
  __( trim( $matches[1] ), dirname( $addon ) )
178
  ) .
179
+ '</strong></p>';
180
  }
181
  return $line;
182
  }
196
  die();
197
  }
198
  // if it's something we handle, handle it
199
+ $backtrace = $this->_get_backtrace( $exception );
 
 
 
 
200
  if ( $exception instanceof $this->_exception_class ) {
201
  // check if it's a plugin instead of core
202
  $disable_addon = $this->is_caused_by_addon( $exception );
203
  $message = method_exists( $exception, 'get_html_message' )
204
  ? $exception->get_html_message()
205
  : $exception->getMessage();
206
+ $message = '<p>' . $message . '</p>';
207
+ if ( $exception->display_backtrace() ) {
208
+ $message .= $backtrace;
209
+ }
210
  if ( null !== $disable_addon ) {
211
  include_once ABSPATH . 'wp-admin/includes/plugin.php';
212
  // deactivate the plugin. Fire handlers to hide options.
220
  array( Ai1ec_Notification_Admin::RCPT_ADMIN ),
221
  true
222
  );
223
+ $this->redirect( $exception->get_redirect_url() );
224
  } else {
225
  // check if it has a methof for deatiled html
226
  $this->soft_deactivate_plugin( $message );
390
  $redirect_url = add_query_arg(
391
  self::DB_REACTIVATE_PLUGIN,
392
  'true',
393
+ get_admin_url()
394
  );
395
  $label = __(
396
+ 'All-in-One Event Calendar has been disabled due to an error:',
397
  AI1EC_PLUGIN_NAME
398
  );
399
+ $message = '<div class="message error">';
400
+ $message .= '<p><strong>' . $label . '</strong></p>';
401
+ $message .= $this->_message;
402
+ $message .= ' <a href="' . $redirect_url .
403
+ '" class="button button-primary ai1ec-dismissable">' .
 
404
  __(
405
+ 'Try reactivating plugin',
406
  AI1EC_PLUGIN_NAME
407
+ );
408
+ $message .= '</a>';
409
+ $message .= '<p></p></div>';
 
410
  echo $message;
411
  }
412
 
415
  *
416
  * @return void Method does not return
417
  */
418
+ protected function redirect( $suggested_url = null ) {
419
+ $url = ai1ec_get_site_url();
420
  if ( is_admin() ) {
421
+ $url = null !== $suggested_url
422
+ ? $suggested_url
423
+ : ai1ec_get_admin_url();
424
  }
425
+ Ai1ec_Http_Response_Helper::redirect( $url );
426
  }
427
  /**
428
  * Had to add it as var_dump was locking my browser.
560
  echo nl2br( str_replace( ' ', '&nbsp;', htmlentities( $string ) ) );
561
  }
562
 
563
+ /**
564
+ * Get HTML code with backtrace information for given exception.
565
+ *
566
+ * @param Exception $exception
567
+ *
568
+ * @return string HTML code.
569
+ */
570
+ protected function _get_backtrace( Exception $exception ) {
571
+ $backtrace = '';
572
+ $trace = nl2br( $exception->getTraceAsString() );
573
+ $ident = sha1( $trace );
574
+ if ( ! empty( $trace ) ) {
575
+ $request_uri = $_SERVER['REQUEST_URI'];
576
+ $button_label = __( 'Toggle error details', AI1EC_PLUGIN_NAME );
577
+ $title = __( 'Error Details:', AI1EC_PLUGIN_NAME );
578
+ $backtrace = <<<JAVASCRIPT
579
+ <script type="text/javascript">
580
+ jQuery( function($) {
581
+ $( "a[data-rel='$ident']" ).click( function() {
582
+ jQuery( "#ai1ec-error-$ident" ).slideToggle( "fast" );
583
+ return false;
584
+ });
585
+ });
586
+ </script>
587
+ <blockquote id="ai1ec-error-$ident" style="display: none;">
588
+ <strong>$title</strong>
589
+ <p>$trace</p>
590
+ <p>Request Uri: $request_uri</p>
591
+ </blockquote>
592
+ <a href="#" data-rel="$ident" class="button">$button_label</a>
593
+ JAVASCRIPT;
594
+ }
595
+ return $backtrace;
596
+ }
597
+
598
+ }
lib/factory/event.php CHANGED
@@ -38,7 +38,13 @@ class Ai1ec_Factory_Event extends Ai1ec_Base {
38
  $data = null,
39
  $instance = false
40
  ) {
41
- if ( true === $this->_legacy ) {
 
 
 
 
 
 
42
  return new Ai1ec_Event_Legacy(
43
  $registry,
44
  $data,
@@ -47,8 +53,8 @@ class Ai1ec_Factory_Event extends Ai1ec_Base {
47
  }
48
  $class_name = 'Ai1ec_Event';
49
  if (
50
- 'Ai1ec_Event' === $class_name &&
51
- AI1EC_THEME_COMPATIBILITY_FER
52
  ) {
53
  $class_name = 'Ai1ec_Event_Compatibility';
54
  }
38
  $data = null,
39
  $instance = false
40
  ) {
41
+ $use_backward_compatibility = $registry->get(
42
+ 'compatibility.check'
43
+ )->use_backward_compatibility();
44
+ if (
45
+ $use_backward_compatibility &&
46
+ true === $this->_legacy
47
+ ) {
48
  return new Ai1ec_Event_Legacy(
49
  $registry,
50
  $data,
53
  }
54
  $class_name = 'Ai1ec_Event';
55
  if (
56
+ $use_backward_compatibility &&
57
+ 'Ai1ec_Event' === $class_name
58
  ) {
59
  $class_name = 'Ai1ec_Event_Compatibility';
60
  }
lib/filesystem/misc.php ADDED
@@ -0,0 +1,182 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Miscellaneous file system related functions.
5
+ *
6
+ * @author Time.ly Network Inc.
7
+ * @since 2.2
8
+ *
9
+ * @package AI1EC
10
+ * @subpackage AI1EC.Lib.Filesystem
11
+ */
12
+ class Ai1ec_Filesystem_Misc extends Ai1ec_Base {
13
+
14
+ /**
15
+ * Builds directory hashmap.
16
+ *
17
+ * @param array|string $paths Paths for hashmap generation. It accepts
18
+ * string or array of paths. Elements in
19
+ * hashmaps are not overwritten.
20
+ * @param array $exclusions List of excluded file names.
21
+ *
22
+ * @return array Hashmap.
23
+ */
24
+ public function build_dirs_hashmap( $paths, $exclusions = array() ) {
25
+ if ( ! is_array( $paths ) ) {
26
+ $paths = array( $paths );
27
+ }
28
+ $hashmap = array();
29
+ foreach ( $paths as $path ) {
30
+ if ( file_exists( $path ) ) {
31
+ $hashmap += $this->build_dir_hashmap( $path, $exclusions );
32
+ }
33
+ }
34
+
35
+ ksort( $hashmap );
36
+
37
+ return $hashmap;
38
+ }
39
+
40
+ /**
41
+ * Builds hashmap for given directory.
42
+ *
43
+ * @param string $directory Directory for hashmap creation.
44
+ * @param array $exclusions List of excluded file names.
45
+ *
46
+ * @return array Hashmap.
47
+ */
48
+ public function build_dir_hashmap( $directory, $exclusions = array() ) {
49
+ $directory_iterator = new RecursiveDirectoryIterator(
50
+ $directory,
51
+ RecursiveDirectoryIterator::SKIP_DOTS
52
+ );
53
+ $recursive_iterator = new RecursiveIteratorIterator(
54
+ $directory_iterator
55
+ );
56
+ $files = new RegexIterator(
57
+ $recursive_iterator,
58
+ '/^.+\.(less|css|php)$/i',
59
+ RegexIterator::GET_MATCH
60
+ );
61
+ $hashmap = array();
62
+ foreach ( $files as $file ) {
63
+ $file_info = new SplFileInfo( $file[0] );
64
+ $file_path = $file_info->getPathname();
65
+ if ( in_array( $file_info->getFilename(), $exclusions ) ) {
66
+ continue;
67
+ }
68
+ $key = str_replace(
69
+ array( $directory, '/' ),
70
+ array( '', '\\' ),
71
+ $file_path
72
+ );
73
+
74
+ $hashmap[ $key ] = array(
75
+ 'size' => $file_info->getSize(),
76
+ 'sha1' => sha1_file( $file_path ),
77
+ );
78
+ }
79
+ ksort( $hashmap );
80
+
81
+ return $hashmap;
82
+ }
83
+
84
+ /**
85
+ * Returns hashmap for current theme.
86
+ *
87
+ * @return mixed|null Hashmap or null if none.
88
+ *
89
+ * @throws Ai1ec_Bootstrap_Exception
90
+ */
91
+ public function get_current_theme_hashmap() {
92
+ $cur_theme = $this->_registry->get( 'model.option' )->get(
93
+ 'ai1ec_current_theme'
94
+ );
95
+ $file_location = $cur_theme['theme_dir'] . DIRECTORY_SEPARATOR .
96
+ 'less.sha1.map.php';
97
+ if ( ! file_exists( $file_location ) ) {
98
+ return null;
99
+ }
100
+
101
+ return require $file_location;
102
+ }
103
+
104
+ /**
105
+ * Builds file hashmap for current theme.
106
+ *
107
+ * @return array Hashmap.
108
+ *
109
+ * @throws Ai1ec_Bootstrap_Exception
110
+ * @throws Ai1ec_Invalid_Argument_Exception
111
+ */
112
+ public function build_current_theme_hashmap() {
113
+ $paths = $this->_registry->get( 'theme.loader' )->get_paths();
114
+
115
+ return $this->build_dirs_hashmap(
116
+ array_keys(
117
+ $paths['theme']
118
+ ),
119
+ array(
120
+ 'ai1ec_parsed_css.css',
121
+ 'less.sha1.map.php',
122
+ 'index.php',
123
+ )
124
+ );
125
+ }
126
+
127
+ /**
128
+ * Returns theme structrure for one of core themes.
129
+ *
130
+ * @param string $stylesheet Theme stylesheet. Expected one of
131
+ * ['plana','vortex','umbra','gamma'].
132
+ *
133
+ * @return array Theme structure
134
+ *
135
+ * @throws Ai1ec_Invalid_Argument_Exception
136
+ */
137
+ public function build_theme_structure( $stylesheet ) {
138
+ $themes = array( 'plana', 'vortex', 'umbra', 'gamma' );
139
+ if ( ! in_array( $stylesheet, $themes ) ) {
140
+ throw new Ai1ec_Invalid_Argument_Exception(
141
+ 'Theme ' . $stylesheet . ' compilation is not supported.'
142
+ );
143
+ }
144
+ $root = AI1EC_PATH . DIRECTORY_SEPARATOR . 'public' .
145
+ DIRECTORY_SEPARATOR . AI1EC_THEME_FOLDER;
146
+
147
+ return array(
148
+ 'theme_root' => $root,
149
+ 'theme_dir' => $root . DIRECTORY_SEPARATOR . $stylesheet,
150
+ 'theme_url' => AI1EC_URL . '/public/' . AI1EC_THEME_FOLDER . '/' . $stylesheet,
151
+ 'stylesheet' => $stylesheet,
152
+ 'legacy' => false,
153
+ );
154
+ }
155
+
156
+ /**
157
+ * Compares files hashmaps. If $src key doesn't exist in $dst, it's just
158
+ * ommited. This is intended for LESS compilation check. Current theme
159
+ * may contain more LESS files than base one, what does not matter as
160
+ * other files should be changed accordingly.
161
+ *
162
+ * @param array $src Source hashmap. Should be computed from current
163
+ * theme contents.
164
+ * @param array $dst Base hashmap. Should be taken from less.sha1.map.php
165
+ * file.
166
+ *
167
+ * @return bool Comparision result. True if they are equal.
168
+ */
169
+ public function compare_hashmaps( array $src, array $dst ) {
170
+ foreach ( $src as $key => $value ) {
171
+ if ( ! isset( $dst[ $key ] ) ) {
172
+ continue;
173
+ }
174
+ $dst_value = $dst[ $key ];
175
+ if ( $dst_value !== $value ) {
176
+ return false;
177
+ }
178
+ }
179
+
180
+ return true;
181
+ }
182
+ }
lib/global-functions.php CHANGED
@@ -68,4 +68,72 @@ function ai1ec_deprecated( $function ) {
68
  'Function \'' . $function . '\' is deprecated.',
69
  E_USER_WARNING
70
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  }
68
  'Function \'' . $function . '\' is deprecated.',
69
  E_USER_WARNING
70
  );
71
+ }
72
+
73
+ /* (non-PHPdoc)
74
+ * @see admin_url()
75
+ */
76
+ function ai1ec_admin_url( $path = '', $scheme = 'admin' ) {
77
+ if ( ai1ec_is_ssl_forced() ) {
78
+ $scheme = 'https';
79
+ }
80
+ return admin_url( $path, $scheme );
81
+ }
82
+
83
+ /* (non-PHPdoc)
84
+ * @see get_admin_url()
85
+ */
86
+ function ai1ec_get_admin_url( $blog_id = null, $path = '', $scheme = 'admin' ) {
87
+ if ( ai1ec_is_ssl_forced() ) {
88
+ $scheme = 'https';
89
+ }
90
+ return get_admin_url( $blog_id, $path, $scheme );
91
+ }
92
+
93
+ /* (non-PHPdoc)
94
+ * @see get_site_url()
95
+ */
96
+ function ai1ec_get_site_url( $blog_id = null, $path = '', $scheme = null ) {
97
+ if ( ai1ec_is_ssl_forced() ) {
98
+ $scheme = 'https';
99
+ }
100
+ return get_site_url( $blog_id, $path, $scheme );
101
+ }
102
+
103
+ /* (non-PHPdoc)
104
+ * @see site_url()
105
+ */
106
+ function ai1ec_site_url( $path = '', $scheme = null ) {
107
+ if ( ai1ec_is_ssl_forced() ) {
108
+ $scheme = 'https';
109
+ }
110
+ return site_url( $path, $scheme );
111
+ }
112
+
113
+ /* (non-PHPdoc)
114
+ * @see network_admin_url()
115
+ */
116
+ function ai1ec_network_admin_url( $path = '', $scheme = 'admin' ) {
117
+ if ( ai1ec_is_ssl_forced() ) {
118
+ $scheme = 'https';
119
+ }
120
+ return network_admin_url( $path, $scheme );
121
+ }
122
+
123
+ /**
124
+ * Returns whether SSL URLs are forced or not.
125
+ *
126
+ * @return bool Result.
127
+ */
128
+ function ai1ec_is_ssl_forced() {
129
+ return (
130
+ is_admin() &&
131
+ (
132
+ class_exists( 'WordPressHTTPS' ) ||
133
+ (
134
+ defined( 'FORCE_SSL_ADMIN' ) &&
135
+ true === FORCE_SSL_ADMIN
136
+ )
137
+ )
138
+ );
139
  }
lib/html/element/setting-renderer.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Missing class setting-renderer description.
5
+ *
6
+ * @author Time.ly Network Inc.
7
+ * @since 2.2
8
+ *
9
+ * @package AI1EC
10
+ * @subpackage AI1EC.
11
+ */
12
+
13
+ class Ai1ec_Html_Setting_Renderer extends Ai1ec_Base {
14
+
15
+ /**
16
+ * Renders single setting.
17
+ *
18
+ * @param array $setting Setting structure.
19
+ *
20
+ * @return string Rendered content.
21
+ *
22
+ * @throws Ai1ec_Bootstrap_Exception
23
+ */
24
+ public function render( array $setting ) {
25
+ $renderer_name = $setting['renderer']['class'];
26
+ $renderer = null;
27
+ try {
28
+ $renderer = $this->_registry->get(
29
+ 'html.element.setting.' . $renderer_name,
30
+ $setting
31
+ );
32
+ } catch ( Ai1ec_Bootstrap_Exception $exception ) {
33
+ $renderer = $this->_registry->get(
34
+ 'html.element.setting.input',
35
+ $setting
36
+ );
37
+ }
38
+
39
+ return $renderer->render();
40
+ }
41
+ }
lib/html/element/setting/abstract.php CHANGED
@@ -64,10 +64,29 @@ abstract class Ai1ec_Html_Element_Settings extends Ai1ec_Base
64
  * Generate settings output line.
65
  *
66
  * @param string $output Generated output to finalize.
 
67
  *
68
  * @return string Finalized HTML snippet.
69
  */
70
- public function render( $output = '' ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  return '<div class="ai1ec-form-group">' . $output . '</div>';
72
  }
73
 
64
  * Generate settings output line.
65
  *
66
  * @param string $output Generated output to finalize.
67
+ * @param bool $wrap Whether content should be wrapped with div or not.
68
  *
69
  * @return string Finalized HTML snippet.
70
  */
71
+ public function render( $output = '', $wrap = true ) {
72
+ if ( isset( $this->_args['renderer']['condition'] ) ) {
73
+ $condition = $this->_args['renderer']['condition'];
74
+ if ( is_bool( $condition ) ) {
75
+ $render = $condition;
76
+ } else {
77
+ $callback = explode( ':', $this->_args['renderer']['condition'] );
78
+ $render = $this->_registry->dispatch(
79
+ $callback[0],
80
+ $callback[1]
81
+ );
82
+ }
83
+ if ( ! $render ) {
84
+ return '';
85
+ }
86
+ }
87
+ if ( ! $wrap ) {
88
+ return $output;
89
+ }
90
  return '<div class="ai1ec-form-group">' . $output . '</div>';
91
  }
92
 
lib/html/element/setting/select.php CHANGED
@@ -15,16 +15,6 @@ class Ai1ec_Html_Setting_Select extends Ai1ec_Html_Element_Settings {
15
  * @see Ai1ec_Html_Element_Settings::render()
16
  */
17
  public function render( $output = '' ) {
18
- if ( isset( $this->_args['renderer']['condition'] ) ) {
19
- $callback = explode( ':', $this->_args['renderer']['condition'] );
20
- $render = $this->_registry->dispatch(
21
- $callback[0],
22
- $callback[1]
23
- );
24
- if ( ! $render ) {
25
- return '';
26
- }
27
- }
28
  $options = $this->_args['renderer']['options'];
29
  if ( ! is_array( $options ) ) {
30
  $callback = explode( ':', $options );
@@ -41,7 +31,8 @@ class Ai1ec_Html_Setting_Select extends Ai1ec_Html_Element_Settings {
41
  );
42
  }
43
  }
44
- $options = apply_filters( 'ai1ec_settings_select_options' , $options, $this->_args['id'] );
 
45
  foreach ( $options as $key => &$option ) {
46
  // if the key is a string, it's an optgroup
47
  if ( is_string( $key ) ) {
@@ -50,6 +41,14 @@ class Ai1ec_Html_Setting_Select extends Ai1ec_Html_Element_Settings {
50
  }
51
  } else {
52
  $option = $this->_set_selected_value( $option );
 
 
 
 
 
 
 
 
53
  }
54
  }
55
  $select_args = array();
@@ -58,6 +57,7 @@ class Ai1ec_Html_Setting_Select extends Ai1ec_Html_Element_Settings {
58
  'label' => $this->_args['renderer']['label'],
59
  'attributes' => $select_args,
60
  'options' => $options,
 
61
  );
62
  $loader = $this->_registry->get( 'theme.loader' );
63
  $file = $loader->get_file( 'setting/select.twig', $args, true );
@@ -98,4 +98,47 @@ class Ai1ec_Html_Setting_Select extends Ai1ec_Html_Element_Settings {
98
  return $options;
99
  }
100
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
  }
15
  * @see Ai1ec_Html_Element_Settings::render()
16
  */
17
  public function render( $output = '' ) {
 
 
 
 
 
 
 
 
 
 
18
  $options = $this->_args['renderer']['options'];
19
  if ( ! is_array( $options ) ) {
20
  $callback = explode( ':', $options );
31
  );
32
  }
33
  }
34
+ $options = apply_filters( 'ai1ec_settings_select_options' , $options, $this->_args['id'] );
35
+ $fieldsets = array();
36
  foreach ( $options as $key => &$option ) {
37
  // if the key is a string, it's an optgroup
38
  if ( is_string( $key ) ) {
41
  }
42
  } else {
43
  $option = $this->_set_selected_value( $option );
44
+ if ( isset( $option['settings'] ) ) {
45
+ $fieldsets[] = $this->_render_fieldset(
46
+ $option['settings'],
47
+ $option['value'],
48
+ $this->_args['id'],
49
+ isset( $option['args']['selected'] )
50
+ );
51
+ }
52
  }
53
  }
54
  $select_args = array();
57
  'label' => $this->_args['renderer']['label'],
58
  'attributes' => $select_args,
59
  'options' => $options,
60
+ 'fieldsets' => $fieldsets,
61
  );
62
  $loader = $this->_registry->get( 'theme.loader' );
63
  $file = $loader->get_file( 'setting/select.twig', $args, true );
98
  return $options;
99
  }
100
 
101
+ /**
102
+ * Renders fieldset with options for selected item.
103
+ *
104
+ * @param array $settings Settings structure.
105
+ * @param string $parent_id Option value from parent Html select element.
106
+ * @param string $select_id Html Select element id.
107
+ * @param bool $visible Whether fieldset is visible or not.
108
+ *
109
+ * @return string Html content.
110
+ *
111
+ * @throws Ai1ec_Bootstrap_Exception
112
+ */
113
+ protected function _render_fieldset(
114
+ array $settings,
115
+ $parent_id,
116
+ $select_id,
117
+ $visible = false
118
+ ) {
119
+ $setting_renderer = $this->_registry->get(
120
+ 'html.element.setting-renderer'
121
+ );
122
+ $global_settings = $this->_registry->get(
123
+ 'model.settings'
124
+ );
125
+ $content = '';
126
+ foreach ( $settings as $id => $setting ) {
127
+ $setting['id'] = $id;
128
+ // fetch value from real setting as this one is some kind of
129
+ // mockup.
130
+ $setting['value'] = $global_settings->get( $id );
131
+ $content .= $setting_renderer->render( $setting );
132
+ }
133
+ $args = array(
134
+ 'parent_id' => $parent_id,
135
+ 'contents' => $content,
136
+ 'select_id' => $select_id,
137
+ 'visible' => $visible,
138
+ );
139
+ $loader = $this->_registry->get( 'theme.loader' );
140
+ $file = $loader->get_file( 'setting/select-fieldsets.twig', $args, true );
141
+ return parent::render( $file->get_content(), false );
142
+ }
143
+
144
  }
lib/http/encoder.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Calendar Http_Encoder wrapper.
5
+ *
6
+ * @author Time.ly Network Inc.
7
+ * @since 2.2
8
+ *
9
+ * @package AI1EC
10
+ * @subpackage AI1EC.Lib
11
+ */
12
+
13
+ class Ai1ec_HTTP_Encoder extends HTTP_Encoder {
14
+
15
+ /**
16
+ * Overrides parent function and removed Content-Length header to avoid
17
+ * some problems if our JavaScript is somehow prepended by 3rd party code.
18
+ *
19
+ * @return void Method does not return.
20
+ */
21
+ public function sendHeaders() {
22
+ unset( $this->_headers['Content-Length'] );
23
+ parent::sendHeaders();
24
+ }
25
+ }
lib/http/request.php CHANGED
@@ -62,6 +62,10 @@ class Ai1ec_Http_Request {
62
  if ( isset( $_GET['ai1ec_js_widget'] ) ) {
63
  return true;
64
  }
 
 
 
 
65
  if (
66
  isset( $_GET['ai1ec_render_js'] ) ||
67
  isset( $_GET['ai1ec_render_css'] )
@@ -173,11 +177,15 @@ class Ai1ec_Http_Request {
173
  *
174
  * @return bool True or false.
175
  */
176
- public function is_json_required( $request_format ) {
 
177
  return
178
- 'json' === $request_format
179
- && AI1EC_USE_FRONTEND_RENDERING
180
- && $this->is_ajax();
 
 
 
181
  }
182
 
183
  /**
62
  if ( isset( $_GET['ai1ec_js_widget'] ) ) {
63
  return true;
64
  }
65
+ // Legacy support.
66
+ if ( isset( $_GET['ai1ec_super_widget'] ) ) {
67
+ return true;
68
+ }
69
  if (
70
  isset( $_GET['ai1ec_render_js'] ) ||
71
  isset( $_GET['ai1ec_render_css'] )
177
  *
178
  * @return bool True or false.
179
  */
180
+ public function is_json_required( $request_format, $type ) {
181
+ $fer_list = explode( ',', AI1EC_FER_ENABLED_TEMPLATES_LIST );
182
  return
183
+ 'json' === $request_format &&
184
+ in_array( strtolower( $type ), $fer_list ) &&
185
+ $this->_registry->get(
186
+ 'model.settings'
187
+ )->get( 'ai1ec_use_frontend_rendering' ) &&
188
+ $this->is_ajax();
189
  }
190
 
191
  /**
lib/http/response/render/strategy/html.php CHANGED
@@ -10,6 +10,11 @@
10
  */
11
  class Ai1ec_Render_Strategy_Html extends Ai1ec_Http_Response_Render_Strategy {
12
 
 
 
 
 
 
13
  /**
14
  * @var string the event html.
15
  */
@@ -18,19 +23,37 @@ class Ai1ec_Render_Strategy_Html extends Ai1ec_Http_Response_Render_Strategy {
18
  /**
19
  * @var string The html for the footer of the event.
20
  */
21
- protected $_html_footer;
22
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  public function render( array $params ) {
24
  $this->_html = $params['data'];
 
 
 
 
 
 
25
  if ( isset( $params['is_event'] ) ) {
26
  // Filter event post content, in single- and multi-post views
27
  add_filter( 'the_content', array( $this, 'event_content' ), PHP_INT_MAX - 1 );
28
- add_filter( 'the_title', array( $this, 'event_title' ), PHP_INT_MAX - 1, 3 );
29
- add_filter( 'post_class', array( $this, 'post_class' ), PHP_INT_MAX - 1, 3 );
30
  return;
31
  }
32
  // Replace page content - make sure it happens at (almost) the very end of
33
- // page content filters (some themes are overly ambitious here)
34
  add_filter( 'the_content', array( $this, 'append_content' ), PHP_INT_MAX - 1 );
35
  }
36
 
@@ -38,21 +61,31 @@ class Ai1ec_Render_Strategy_Html extends Ai1ec_Http_Response_Render_Strategy {
38
  * Append locally generated content to normal page content. By default,
39
  * first checks if we are in The Loop before outputting to prevent multiple
40
  * calendar display - unless setting is turned on to skip this check.
 
 
 
41
  *
42
  * @param string $content Post/Page content
43
  * @return string Modified Post/Page content
44
  */
45
  public function append_content( $content ) {
 
 
 
 
 
 
46
  $settings = $this->_registry->get( 'model.settings' );
47
 
48
  // Include any admin-provided page content in the placeholder specified in
49
  // the calendar theme template.
50
  if ( $settings->get( 'skip_in_the_loop_check' ) || in_the_loop() ) {
51
  $content = str_replace(
52
- '<!-- AI1EC_PAGE_CONTENT_PLACEHOLDER -->',
53
  $content,
54
  $this->_html
55
  );
 
56
  }
57
  return $content;
58
  }
@@ -68,10 +101,10 @@ class Ai1ec_Render_Strategy_Html extends Ai1ec_Http_Response_Render_Strategy {
68
  * @return string Post/Page content
69
  **/
70
  public function event_content( $content ) {
71
-
72
- // if we have modified the content, we return the modified version.
73
- $to_return = $this->_html .
74
- '<div class="p-description">' . $content . '</div>';
75
  if ( isset( $this->_html_footer ) ) {
76
  $to_return .= $this->_html_footer;
77
  }
@@ -83,43 +116,4 @@ class Ai1ec_Render_Strategy_Html extends Ai1ec_Http_Response_Render_Strategy {
83
  );
84
  }
85
 
86
- /**
87
- * Add microformats class to title
88
- *
89
- * @param string $title
90
- * @param id $post_id
91
- * @param bool $is_view is the filter called from a calendar view?
92
- * In that case do not render the extra markup
93
- */
94
- public function event_title( $title, $post_id, $is_view = false ) {
95
- if (
96
- false === $is_view &&
97
- true === $this->_registry->get( 'acl.aco' )
98
- ->is_our_post_type( $post_id )
99
- ) {
100
- $title = '<span class="p-summary">' . $title . '</span>';
101
- }
102
- return $title;
103
- }
104
-
105
- /**
106
- * Add vevent class to post
107
- *
108
- * @param array $classes
109
- * @param string $class A comma-separated list of additional classes added
110
- * to the post.
111
- * @param int $post_id The post ID.
112
- *
113
- * @return array
114
- */
115
- public function post_class( $classes, $class, $post_id ) {
116
- if (
117
- true === $this->_registry->get( 'acl.aco' )
118
- ->is_our_post_type( $post_id )
119
- ) {
120
- $classes[] = 'h-event';
121
- }
122
- return $classes;
123
- }
124
-
125
- }
10
  */
11
  class Ai1ec_Render_Strategy_Html extends Ai1ec_Http_Response_Render_Strategy {
12
 
13
+ /**
14
+ * Twig page content placeholder.
15
+ */
16
+ const CALENDAR_PLACEHOLDER = '<!-- AI1EC_PAGE_CONTENT_PLACEHOLDER -->';
17
+
18
  /**
19
  * @var string the event html.
20
  */
23
  /**
24
  * @var string The html for the footer of the event.
25
  */
26
+ protected $_html_footer = '';
27
 
28
+ /**
29
+ * Caller identifier. Just for paranoid check in append_content method.
30
+ * Expected 'calendar' or none.
31
+ *
32
+ * @var string
33
+ */
34
+ protected $_caller = '';
35
+
36
+ /**
37
+ * Registers proper filters for content modifications.
38
+ *
39
+ * @param array $params Function params.
40
+ *
41
+ * @return void Method does not return.
42
+ */
43
  public function render( array $params ) {
44
  $this->_html = $params['data'];
45
+ if ( isset( $params['caller'] ) ) {
46
+ $this->_caller = $params['caller'];
47
+ }
48
+ if ( isset( $params['footer'] ) ) {
49
+ $this->_html_footer = $params['footer'];
50
+ }
51
  if ( isset( $params['is_event'] ) ) {
52
  // Filter event post content, in single- and multi-post views
53
  add_filter( 'the_content', array( $this, 'event_content' ), PHP_INT_MAX - 1 );
 
 
54
  return;
55
  }
56
  // Replace page content - make sure it happens at (almost) the very end of
 
57
  add_filter( 'the_content', array( $this, 'append_content' ), PHP_INT_MAX - 1 );
58
  }
59
 
61
  * Append locally generated content to normal page content. By default,
62
  * first checks if we are in The Loop before outputting to prevent multiple
63
  * calendar display - unless setting is turned on to skip this check.
64
+ * We should not append full calendar body to single event content as it
65
+ * leads to "calendar" nesting if default calendar page contains calendar
66
+ * shortcode.
67
  *
68
  * @param string $content Post/Page content
69
  * @return string Modified Post/Page content
70
  */
71
  public function append_content( $content ) {
72
+ if (
73
+ 'calendar' === $this->_caller &&
74
+ ! $this->_registry->get( 'calendar.state' )->append_content()
75
+ ) {
76
+ return $content;
77
+ }
78
  $settings = $this->_registry->get( 'model.settings' );
79
 
80
  // Include any admin-provided page content in the placeholder specified in
81
  // the calendar theme template.
82
  if ( $settings->get( 'skip_in_the_loop_check' ) || in_the_loop() ) {
83
  $content = str_replace(
84
+ self::CALENDAR_PLACEHOLDER,
85
  $content,
86
  $this->_html
87
  );
88
+ $content .= $this->_html_footer;
89
  }
90
  return $content;
91
  }
101
  * @return string Post/Page content
102
  **/
103
  public function event_content( $content ) {
104
+ if ( ! $this->_registry->get( 'calendar.state' )->append_content() ) {
105
+ $content = '';
106
+ }
107
+ $to_return = $this->_html . $content;
108
  if ( isset( $this->_html_footer ) ) {
109
  $to_return .= $this->_html_footer;
110
  }
116
  );
117
  }
118
 
119
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/import-export/ics.php CHANGED
@@ -124,11 +124,12 @@ class Ai1ec_Ics_Import_Export_Engine
124
  vcalendar $v,
125
  array $args
126
  ) {
127
- $feed = isset( $args['feed'] ) ? $args['feed'] : null;
128
- $comment_status = isset( $args['comment_status'] ) ? $args['comment_status'] : 'open';
129
- $do_show_map = isset( $args['do_show_map'] ) ? $args['do_show_map'] : 0;
130
- $count = 0;
131
- $events_in_db = isset( $args['events_in_db'] ) ? $args['events_in_db'] : 0;
 
132
  $v->sort();
133
  // Reverse the sort order, so that RECURRENCE-IDs are listed before the
134
  // defining recurrence events, and therefore take precedence during
@@ -141,16 +142,26 @@ class Ai1ec_Ics_Import_Export_Engine
141
  // Fetch default timezone in case individual properties don't define it
142
  $tz = $v->getComponent( 'vtimezone' );
143
  if ( ! empty( $tz ) ) {
144
- $timezone = $tz->getProperty( 'TZID' );
145
  }
146
- if ( empty( $timezone ) ) {
147
- $timezone = $v->getProperty( 'X-WR-TIMEZONE' );
148
- $timezone = (string)$timezone[1];
 
 
 
 
 
 
 
149
  }
150
 
151
- $messages = array();
152
- $local_timezone = $this->_registry->get( 'date.timezone' )
153
  ->get_default_timezone();
 
 
 
154
  $current_timestamp = $this->_registry->get( 'date.time' )->format_to_gmt();
155
  // initialize empty custom exclusions structure
156
  $exclusions = array();
@@ -200,7 +211,7 @@ class Ai1ec_Ics_Import_Export_Engine
200
  $imported_cat = array( Ai1ec_Event_Taxonomy::CATEGORIES => array() );
201
  // If the user chose to preserve taxonomies during import, add categories.
202
  if( $categories && $feed->keep_tags_categories ) {
203
- $imported_cat = $this->_add_categories_and_tags(
204
  $categories['value'],
205
  $imported_cat,
206
  false,
@@ -209,7 +220,7 @@ class Ai1ec_Ics_Import_Export_Engine
209
  }
210
  $feed_categories = $feed->feed_category;
211
  if( ! empty( $feed_categories ) ) {
212
- $imported_cat = $this->_add_categories_and_tags(
213
  $feed_categories,
214
  $imported_cat,
215
  false,
@@ -221,7 +232,7 @@ class Ai1ec_Ics_Import_Export_Engine
221
  $imported_tags = array( Ai1ec_Event_Taxonomy::TAGS => array() );
222
  // If the user chose to preserve taxonomies during import, add tags.
223
  if( $tags && $feed->keep_tags_categories ) {
224
- $imported_tags = $this->_add_categories_and_tags(
225
  $tags[1]['value'],
226
  $imported_tags,
227
  true,
@@ -230,7 +241,7 @@ class Ai1ec_Ics_Import_Export_Engine
230
  }
231
  $feed_tags = $feed->feed_tags;
232
  if( ! empty( $feed_tags ) ) {
233
- $imported_tags = $this->_add_categories_and_tags(
234
  $feed_tags,
235
  $imported_tags,
236
  true,
@@ -249,8 +260,16 @@ class Ai1ec_Ics_Import_Export_Engine
249
  if ( $allday ) {
250
  $event_timezone = $local_timezone;
251
  }
252
- $start = $this->_time_array_to_datetime( $start, $event_timezone );
253
- $end = $this->_time_array_to_datetime( $end, $event_timezone );
 
 
 
 
 
 
 
 
254
 
255
  if ( false === $start || false === $end ) {
256
  throw new Ai1ec_Parse_Exception(
@@ -380,6 +399,9 @@ class Ai1ec_Ics_Import_Export_Engine
380
  preg_match( '/\s*(.*\S)\s+[\-@]\s+(.*)\s*/', $location, $matches );
381
  // if there is no match, it's not a combined venue + address
382
  if ( empty( $matches ) ) {
 
 
 
383
  // if there is a comma, probably it's an address
384
  if ( false === strpos( $location, ',' ) ) {
385
  $venue = $location;
@@ -558,6 +580,11 @@ class Ai1ec_Ics_Import_Export_Engine
558
  wp_set_post_terms( $event->get( 'post_id' ), array_keys( $ids ), $tax_name );
559
  }
560
 
 
 
 
 
 
561
  // if the event is not finished, unset it otherwise it could be deleted afterwards.
562
  if ( $event->get( 'end' )->format_to_gmt() > $current_timestamp ) {
563
  unset( $events_in_db[$event->get( 'post_id' )] );
@@ -621,12 +648,19 @@ class Ai1ec_Ics_Import_Export_Engine
621
  * Passed array: Array( 'year', 'month', 'day', ['hour', 'min', 'sec', ['tz']] )
622
  * Return int: UNIX timestamp in GMT
623
  *
624
- * @param array $time iCalcreator time property array (*full* format expected)
625
- * @param string $def_timezone Default time zone in case not defined in $time
 
 
 
626
  *
627
  * @return int UNIX timestamp
628
  **/
629
- protected function _time_array_to_datetime( array $time, $def_timezone ) {
 
 
 
 
630
  $timezone = '';
631
  if ( isset( $time['params']['TZID'] ) ) {
632
  $timezone = $time['params']['TZID'];
@@ -665,7 +699,12 @@ class Ai1ec_Ics_Import_Export_Engine
665
  $time['value']['min'],
666
  $time['value']['sec']
667
  );
668
-
 
 
 
 
 
669
  return $date_time;
670
  }
671
 
@@ -828,14 +867,15 @@ class Ai1ec_Ics_Import_Export_Engine
828
  $dtstart
829
  );
830
 
831
-
832
- $e->setProperty(
833
- 'dtend',
834
- $this->_sanitize_value(
835
- $event->get( 'end' )->format( "Ymd\THis" )
836
- ),
837
- $dtend
838
- );
 
839
  }
840
 
841
  // ========================
@@ -1025,11 +1065,11 @@ class Ai1ec_Ics_Import_Export_Engine
1025
  }
1026
 
1027
  // add rrule to exported calendar
1028
- if ( ! empty( $rrule ) ) {
1029
  $e->setProperty( 'rrule', $this->_sanitize_value( $rrule ) );
1030
  }
1031
  // add exrule to exported calendar
1032
- if ( ! empty( $exrule ) ) {
1033
  $e->setProperty( 'exrule', $this->_sanitize_value( $exrule ) );
1034
  }
1035
 
@@ -1039,6 +1079,28 @@ class Ai1ec_Ics_Import_Export_Engine
1039
  // For all day events that use a date as DTSTART, date must be supplied
1040
  // For other other events which use DATETIME, we must use that as well
1041
  // We must also match the exact starting time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1042
  $exception_dates = $event->get( 'exception_dates' );
1043
  if ( ! empty( $exception_dates ) ) {
1044
  $params = array(
@@ -1106,7 +1168,7 @@ class Ai1ec_Ics_Import_Export_Engine
1106
  *
1107
  * @return array
1108
  */
1109
- protected function _add_categories_and_tags(
1110
  $terms,
1111
  array $imported_terms,
1112
  $is_tag,
@@ -1172,7 +1234,7 @@ class Ai1ec_Ics_Import_Export_Engine
1172
  $year = $month = $day = $hour = $min = $sec = null;
1173
  extract( $recurrence_id, EXTR_IF_EXISTS );
1174
  $timezone = '';
1175
- $exdate = $year . $month . $day;
1176
  if (
1177
  null === $hour ||
1178
  null === $min ||
@@ -1181,7 +1243,13 @@ class Ai1ec_Ics_Import_Export_Engine
1181
  $hour = $min = $sec = '00';
1182
  $timezone = 'Z';
1183
  }
1184
- $exdate .= 'T' . $hour . $min . $sec . $timezone;
 
 
 
 
 
 
1185
  $exclusions[$e->getProperty( 'uid' )][] = $exdate;
1186
  return $exclusions;
1187
  }
124
  vcalendar $v,
125
  array $args
126
  ) {
127
+ $forced_timezone = null;
128
+ $feed = isset( $args['feed'] ) ? $args['feed'] : null;
129
+ $comment_status = isset( $args['comment_status'] ) ? $args['comment_status'] : 'open';
130
+ $do_show_map = isset( $args['do_show_map'] ) ? $args['do_show_map'] : 0;
131
+ $count = 0;
132
+ $events_in_db = isset( $args['events_in_db'] ) ? $args['events_in_db'] : 0;
133
  $v->sort();
134
  // Reverse the sort order, so that RECURRENCE-IDs are listed before the
135
  // defining recurrence events, and therefore take precedence during
142
  // Fetch default timezone in case individual properties don't define it
143
  $tz = $v->getComponent( 'vtimezone' );
144
  if ( ! empty( $tz ) ) {
145
+ $timezone = $tz->getProperty( 'TZID' );
146
  }
147
+
148
+ $x_wr_timezone = $v->getProperty( 'X-WR-TIMEZONE' );
149
+ if (
150
+ isset( $x_wr_timezone[1] ) &&
151
+ is_array( $x_wr_timezone )
152
+ ) {
153
+ $forced_timezone = (string)$x_wr_timezone[1];
154
+ $timezone = empty( $timezone )
155
+ ? (string)$x_wr_timezone[1]
156
+ : $timezone;
157
  }
158
 
159
+ $messages = array();
160
+ $local_timezone = $this->_registry->get( 'date.timezone' )
161
  ->get_default_timezone();
162
+ if ( empty( $forced_timezone ) ) {
163
+ $forced_timezone = $local_timezone;
164
+ }
165
  $current_timestamp = $this->_registry->get( 'date.time' )->format_to_gmt();
166
  // initialize empty custom exclusions structure
167
  $exclusions = array();
211
  $imported_cat = array( Ai1ec_Event_Taxonomy::CATEGORIES => array() );
212
  // If the user chose to preserve taxonomies during import, add categories.
213
  if( $categories && $feed->keep_tags_categories ) {
214
+ $imported_cat = $this->add_categories_and_tags(
215
  $categories['value'],
216
  $imported_cat,
217
  false,
220
  }
221
  $feed_categories = $feed->feed_category;
222
  if( ! empty( $feed_categories ) ) {
223
+ $imported_cat = $this->add_categories_and_tags(
224
  $feed_categories,
225
  $imported_cat,
226
  false,
232
  $imported_tags = array( Ai1ec_Event_Taxonomy::TAGS => array() );
233
  // If the user chose to preserve taxonomies during import, add tags.
234
  if( $tags && $feed->keep_tags_categories ) {
235
+ $imported_tags = $this->add_categories_and_tags(
236
  $tags[1]['value'],
237
  $imported_tags,
238
  true,
241
  }
242
  $feed_tags = $feed->feed_tags;
243
  if( ! empty( $feed_tags ) ) {
244
+ $imported_tags = $this->add_categories_and_tags(
245
  $feed_tags,
246
  $imported_tags,
247
  true,
260
  if ( $allday ) {
261
  $event_timezone = $local_timezone;
262
  }
263
+ $start = $this->_time_array_to_datetime(
264
+ $start,
265
+ $event_timezone,
266
+ $feed->import_timezone ? $forced_timezone : null
267
+ );
268
+ $end = $this->_time_array_to_datetime(
269
+ $end,
270
+ $event_timezone,
271
+ $feed->import_timezone ? $forced_timezone : null
272
+ );
273
 
274
  if ( false === $start || false === $end ) {
275
  throw new Ai1ec_Parse_Exception(
399
  preg_match( '/\s*(.*\S)\s+[\-@]\s+(.*)\s*/', $location, $matches );
400
  // if there is no match, it's not a combined venue + address
401
  if ( empty( $matches ) ) {
402
+ // temporary fix for Mac ICS import. Se AIOEC-2187
403
+ // and https://github.com/iCalcreator/iCalcreator/issues/13
404
+ $location = str_replace( '\n', "\n", $location );
405
  // if there is a comma, probably it's an address
406
  if ( false === strpos( $location, ',' ) ) {
407
  $venue = $location;
580
  wp_set_post_terms( $event->get( 'post_id' ), array_keys( $ids ), $tax_name );
581
  }
582
 
583
+ unset( $imported_tags[Ai1ec_Event_Taxonomy::TAGS] );
584
+ foreach ( $imported_tags as $tax_name => $ids ) {
585
+ wp_set_post_terms( $event->get( 'post_id' ), array_keys( $ids ), $tax_name );
586
+ }
587
+
588
  // if the event is not finished, unset it otherwise it could be deleted afterwards.
589
  if ( $event->get( 'end' )->format_to_gmt() > $current_timestamp ) {
590
  unset( $events_in_db[$event->get( 'post_id' )] );
648
  * Passed array: Array( 'year', 'month', 'day', ['hour', 'min', 'sec', ['tz']] )
649
  * Return int: UNIX timestamp in GMT
650
  *
651
+ * @param array $time iCalcreator time property array
652
+ * (*full* format expected)
653
+ * @param string $def_timezone Default time zone in case not defined
654
+ * in $time
655
+ * @param null|string $forced_timezone Timezone to use instead of UTC.
656
  *
657
  * @return int UNIX timestamp
658
  **/
659
+ protected function _time_array_to_datetime(
660
+ array $time,
661
+ $def_timezone,
662
+ $forced_timezone = null
663
+ ) {
664
  $timezone = '';
665
  if ( isset( $time['params']['TZID'] ) ) {
666
  $timezone = $time['params']['TZID'];
699
  $time['value']['min'],
700
  $time['value']['sec']
701
  );
702
+ if (
703
+ 'UTC' === $timezone &&
704
+ null !== $forced_timezone
705
+ ) {
706
+ $date_time->set_timezone( $forced_timezone );
707
+ }
708
  return $date_time;
709
  }
710
 
867
  $dtstart
868
  );
869
 
870
+ if ( false === (bool)$event->get( 'instant_event' ) ) {
871
+ $e->setProperty(
872
+ 'dtend',
873
+ $this->_sanitize_value(
874
+ $event->get( 'end' )->format( "Ymd\THis" )
875
+ ),
876
+ $dtend
877
+ );
878
+ }
879
  }
880
 
881
  // ========================
1065
  }
1066
 
1067
  // add rrule to exported calendar
1068
+ if ( ! empty( $rrule ) && ! isset( $rrule['RDATE'] ) ) {
1069
  $e->setProperty( 'rrule', $this->_sanitize_value( $rrule ) );
1070
  }
1071
  // add exrule to exported calendar
1072
+ if ( ! empty( $exrule ) && ! isset( $exrule['EXDATE'] ) ) {
1073
  $e->setProperty( 'exrule', $this->_sanitize_value( $exrule ) );
1074
  }
1075
 
1079
  // For all day events that use a date as DTSTART, date must be supplied
1080
  // For other other events which use DATETIME, we must use that as well
1081
  // We must also match the exact starting time
1082
+ $recurrence_dates = $event->get( 'recurrence_dates' );
1083
+ if ( ! empty( $recurrence_dates ) ) {
1084
+ $params = array(
1085
+ 'VALUE' => 'DATE-TIME',
1086
+ 'TZID' => $tz,
1087
+ );
1088
+ $dt_suffix = $event->get( 'start' )->format( '\THis' );
1089
+ foreach (
1090
+ explode( ',', $recurrence_dates )
1091
+ as $exdate
1092
+ ) {
1093
+ // date-time string in EXDATES is formatted as 'Ymd\THis\Z', that
1094
+ // means - in UTC timezone, thus we use `format_to_gmt` here.
1095
+ $exdate = $this->_registry->get( 'date.time', $exdate )
1096
+ ->format_to_gmt( 'Ymd' );
1097
+ $e->setProperty(
1098
+ 'rdate',
1099
+ array( $exdate . $dt_suffix ),
1100
+ $params
1101
+ );
1102
+ }
1103
+ }
1104
  $exception_dates = $event->get( 'exception_dates' );
1105
  if ( ! empty( $exception_dates ) ) {
1106
  $params = array(
1168
  *
1169
  * @return array
1170
  */
1171
+ public function add_categories_and_tags(
1172
  $terms,
1173
  array $imported_terms,
1174
  $is_tag,
1234
  $year = $month = $day = $hour = $min = $sec = null;
1235
  extract( $recurrence_id, EXTR_IF_EXISTS );
1236
  $timezone = '';
1237
+ $exdate = sprintf( '%04d%02d%02d', $year, $month, $day );
1238
  if (
1239
  null === $hour ||
1240
  null === $min ||
1243
  $hour = $min = $sec = '00';
1244
  $timezone = 'Z';
1245
  }
1246
+ $exdate .= sprintf(
1247
+ 'T%02d%02d%02d%s',
1248
+ $hour,
1249
+ $min,
1250
+ $sec,
1251
+ $timezone
1252
+ );
1253
  $exclusions[$e->getProperty( 'uid' )][] = $exdate;
1254
  return $exclusions;
1255
  }
lib/less/lessphp.php CHANGED
@@ -53,6 +53,13 @@ class Ai1ec_Less_Lessphp extends Ai1ec_Base {
53
  */
54
  private $variable_file;
55
 
 
 
 
 
 
 
 
56
  public function __construct(
57
  Ai1ec_Registry_Object $registry,
58
  $default_theme_url = AI1EC_DEFAULT_THEME_URL
@@ -61,8 +68,9 @@ class Ai1ec_Less_Lessphp extends Ai1ec_Base {
61
  $this->lessc = $this->_registry->get( 'lessc' );
62
  $this->lessc->setFormatter( 'compressed' );
63
  $this->default_theme_url = $this->sanitize_default_theme_url( $default_theme_url );
64
- $this->parsed_css = '';
65
- $this->files = array(
 
66
  'style.less',
67
  'event.less',
68
  'calendar.less',
@@ -102,30 +110,22 @@ class Ai1ec_Less_Lessphp extends Ai1ec_Base {
102
  }
103
  // convert the variables to key / value
104
  $variables = $this->convert_less_variables_for_parsing( $variables );
105
- // Inject additional constants from extensions if not compiling core only.
106
- if ( false === $compile_core ) {
107
-
108
- $variables = apply_filters( 'ai1ec_less_constants', $variables );
109
- }
110
 
 
 
111
 
112
  // Load the static variables defined in the theme's variables.less file.
113
  $this->load_static_theme_variables();
114
  $loader = $this->_registry->get( 'theme.loader' );
115
- //Allow extensions to add their own LESS files if not compiling core.
116
- if ( false === $compile_core ) {
117
- $this->files = apply_filters( 'ai1ec_less_files', $this->files );
118
- $this->files[] = 'override.less';
119
- }
120
 
121
  // Find out the active theme URL.
122
  $option = $this->_registry->get( 'model.option' );
123
  $theme = $option->get( 'ai1ec_current_theme' );
124
- // Get default theme for core compilation
125
- if ( true === $compile_core ) {
126
- $theme = $this->_registry->get( 'controller.front' )
127
- ->get_default_theme();
128
- }
129
  $this->lessc->addImportDir(
130
  $theme['theme_dir'] . DIRECTORY_SEPARATOR . 'less'
131
  );
@@ -229,7 +229,10 @@ class Ai1ec_Less_Lessphp extends Ai1ec_Base {
229
  public function invalidate_css_cache_if_requested() {
230
  $option = $this->_registry->get( 'model.option' );
231
 
232
- if ( $option->get( 'ai1ec_invalidate_css_cache' ) ) {
 
 
 
233
  $css_controller = $this->_registry->get( 'css.frontend' );
234
  $css_controller->invalidate_cache( null, true );
235
  $option->delete( 'ai1ec_invalidate_css_cache' );
@@ -267,79 +270,83 @@ class Ai1ec_Less_Lessphp extends Ai1ec_Base {
267
  * @return array
268
  */
269
  public function get_less_variable_data_from_config_file() {
270
- static $variables = null;
271
-
272
- // Only fetch from file once per HTTP request.
273
- if ( ! $variables ) {
274
- // Load the file to parse using the theme loader to select the right file.
275
- $loader = $this->_registry->get( 'theme.loader' );
276
- $file = $loader->get_file( 'less/user_variables.php', array(), false );
277
-
278
- // This variables are returned by evaluating the PHP file.
279
- $variables = $file->get_content();
280
- // Inject extension variables into this array.
281
- $variables = apply_filters( 'ai1ec_less_variables', $variables );
282
- }
283
 
284
- return $variables;
 
 
 
285
  }
286
 
287
-
288
  /**
289
- * Drop extraneous attributes from variable array and convert to simple
290
- * key-value pairs required by the LESS parser.
291
  *
292
- * @param array $variables
293
- * @return array
294
  */
295
- private function convert_less_variables_for_parsing( array $variables ) {
296
- $converted_variables = array();
297
- foreach ( $variables as $variable_name => $variable_params ) {
298
- $converted_variables[$variable_name] = $variable_params['value'];
 
299
  }
300
- return $converted_variables;
301
- }
302
-
303
-
304
- /**
305
- * Different themes need different variables.less files. This uses the theme
306
- * loader (searches active theme first, then default) to load it unparsed.
307
- */
308
- private function load_static_theme_variables() {
309
- $loader = $this->_registry->get( 'theme.loader' );
310
- $file = $loader->get_file( 'variables.less', array(), false );
311
- $this->unparsed_variable_file = $file->get_content();
312
  }
313
 
314
  /**
315
- * Load font as base 64 encoded
316
  *
317
- * @param array $matches
318
- * @return string
 
 
 
319
  */
320
- private function load_font_base64( $matches ) {
321
- // Find out the active theme URL.
322
- $option = $this->_registry->get( 'model.option' );
323
- $theme = $option->get( 'ai1ec_current_theme' );
324
- $dirs = apply_filters(
325
- 'ai1ec_font_dirs',
326
- array(
327
- 'AI1EC' => array(
328
- $theme['theme_dir'] . DIRECTORY_SEPARATOR . 'font',
329
- AI1EC_DEFAULT_THEME_PATH . DIRECTORY_SEPARATOR . 'font',
330
- )
331
  )
332
- );
333
- $directories = $dirs[$matches[1]];
334
- foreach ( $directories as $dir ) {
335
- $font_file = $dir . DIRECTORY_SEPARATOR . $matches[2];
336
- if ( file_exists( $font_file ) ) {
337
- return base64_encode( file_get_contents( $font_file ) );
338
- }
339
  }
340
- return '';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
341
  }
342
 
 
343
  /**
344
  * Gets the saved variables from the database, and make sure all variables
345
  * are set correctly as required by config file and any extensions. Also
@@ -405,4 +412,76 @@ class Ai1ec_Less_Lessphp extends Ai1ec_Base {
405
  }
406
  return $url;
407
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
408
  }
53
  */
54
  private $variable_file;
55
 
56
+ /**
57
+ * Variables used for compilation.
58
+ *
59
+ * @var array
60
+ */
61
+ private $variables;
62
+
63
  public function __construct(
64
  Ai1ec_Registry_Object $registry,
65
  $default_theme_url = AI1EC_DEFAULT_THEME_URL
68
  $this->lessc = $this->_registry->get( 'lessc' );
69
  $this->lessc->setFormatter( 'compressed' );
70
  $this->default_theme_url = $this->sanitize_default_theme_url( $default_theme_url );
71
+ $this->parsed_css = '';
72
+ $this->variables = array();
73
+ $this->files = array(
74
  'style.less',
75
  'event.less',
76
  'calendar.less',
110
  }
111
  // convert the variables to key / value
112
  $variables = $this->convert_less_variables_for_parsing( $variables );
113
+ // Inject additional constants from extensions
114
+ $variables = apply_filters( 'ai1ec_less_constants', $variables );
 
 
 
115
 
116
+ // Use this variables for hashmap purposes.
117
+ $this->variables = $variables;
118
 
119
  // Load the static variables defined in the theme's variables.less file.
120
  $this->load_static_theme_variables();
121
  $loader = $this->_registry->get( 'theme.loader' );
122
+ //Allow extensions to add their own LESS files.
123
+ $this->files = apply_filters( 'ai1ec_less_files', $this->files );
124
+ $this->files[] = 'override.less';
 
 
125
 
126
  // Find out the active theme URL.
127
  $option = $this->_registry->get( 'model.option' );
128
  $theme = $option->get( 'ai1ec_current_theme' );
 
 
 
 
 
129
  $this->lessc->addImportDir(
130
  $theme['theme_dir'] . DIRECTORY_SEPARATOR . 'less'
131
  );
229
  public function invalidate_css_cache_if_requested() {
230
  $option = $this->_registry->get( 'model.option' );
231
 
232
+ if (
233
+ $option->get( 'ai1ec_invalidate_css_cache' ) ||
234
+ Ai1ec_Css_Frontend::PARSE_LESS_FILES_AT_EVERY_REQUEST
235
+ ) {
236
  $css_controller = $this->_registry->get( 'css.frontend' );
237
  $css_controller->invalidate_cache( null, true );
238
  $option->delete( 'ai1ec_invalidate_css_cache' );
270
  * @return array
271
  */
272
  public function get_less_variable_data_from_config_file() {
273
+ // Load the file to parse using the theme loader to select the right file.
274
+ $loader = $this->_registry->get( 'theme.loader' );
275
+ $file = $loader->get_file( 'less/user_variables.php', array(), false );
 
 
 
 
 
 
 
 
 
 
276
 
277
+ // This variables are returned by evaluating the PHP file.
278
+ $variables = $file->get_content();
279
+ // Inject extension variables into this array.
280
+ return apply_filters( 'ai1ec_less_variables', $variables );
281
  }
282
 
 
283
  /**
284
+ * Returns compilation specific hashmap.
 
285
  *
286
+ * @return array Hashmap.
 
287
  */
288
+ public function get_less_hashmap() {
289
+ foreach ( $this->variables as $key => $value ) {
290
+ if ( 'fontdir_' === substr( $key, 0, 8 ) ) {
291
+ unset( $this->variables[$key] );
292
+ }
293
  }
294
+ $hashmap = $this->_registry->get(
295
+ 'filesystem.misc'
296
+ )->build_current_theme_hashmap();
297
+ $variables = $this->variables;
298
+ ksort( $variables );
299
+ return array(
300
+ 'variables' => $variables,
301
+ 'files' => $hashmap,
302
+ );
 
 
 
303
  }
304
 
305
  /**
306
+ * Returns whether LESS compilation should be performed or not.
307
  *
308
+ * @param array|null $variables LESS variables.
309
+ *
310
+ * @return bool Result.
311
+ *
312
+ * @throws Ai1ec_Bootstrap_Exception
313
  */
314
+ public function is_compilation_needed( $variables = array() ) {
315
+ if (
316
+ apply_filters( 'ai1ec_always_recompile_less', false ) ||
317
+ (
318
+ defined( 'AI1EC_DEBUG' ) &&
319
+ AI1EC_DEBUG
 
 
 
 
 
320
  )
321
+ ) {
322
+ return true;
 
 
 
 
 
323
  }
324
+ if ( null === $variables ) {
325
+ $variables = array();
326
+ }
327
+ /* @var $misc Ai1ec_Filesystem_Misc */
328
+ $misc = $this->_registry->get( 'filesystem.misc' );
329
+ $cur_hashmap = $misc->get_current_theme_hashmap();
330
+ if ( empty( $variables ) ) {
331
+ $variables = $this->get_saved_variables( false );
332
+ }
333
+ $variables = $this->convert_less_variables_for_parsing( $variables );
334
+ $variables = apply_filters( 'ai1ec_less_constants', $variables );
335
+ $variables = $this->_compilation_check_clear_variables( $variables );
336
+ ksort( $variables );
337
+ if (
338
+ null === $cur_hashmap ||
339
+ $variables !== $cur_hashmap['variables']
340
+ ) {
341
+ return true;
342
+ }
343
+
344
+ $file_hashmap = $misc->build_current_theme_hashmap();
345
+
346
+ return ! $misc->compare_hashmaps( $file_hashmap, $cur_hashmap['files'] );
347
  }
348
 
349
+
350
  /**
351
  * Gets the saved variables from the database, and make sure all variables
352
  * are set correctly as required by config file and any extensions. Also
412
  }
413
  return $url;
414
  }
415
+
416
+ /**
417
+ * Drop extraneous attributes from variable array and convert to simple
418
+ * key-value pairs required by the LESS parser.
419
+ *
420
+ * @param array $variables
421
+ * @return array
422
+ */
423
+ private function convert_less_variables_for_parsing( array $variables ) {
424
+ $converted_variables = array();
425
+ foreach ( $variables as $variable_name => $variable_params ) {
426
+ $converted_variables[$variable_name] = $variable_params['value'];
427
+ }
428
+ return $converted_variables;
429
+ }
430
+
431
+
432
+ /**
433
+ * Different themes need different variables.less files. This uses the theme
434
+ * loader (searches active theme first, then default) to load it unparsed.
435
+ */
436
+ private function load_static_theme_variables() {
437
+ $loader = $this->_registry->get( 'theme.loader' );
438
+ $file = $loader->get_file( 'variables.less', array(), false );
439
+ $this->unparsed_variable_file = $file->get_content();
440
+ }
441
+
442
+ /**
443
+ * Load font as base 64 encoded
444
+ *
445
+ * @param array $matches
446
+ * @return string
447
+ */
448
+ private function load_font_base64( $matches ) {
449
+ // Find out the active theme URL.
450
+ $option = $this->_registry->get( 'model.option' );
451
+ $theme = $option->get( 'ai1ec_current_theme' );
452
+ $dirs = apply_filters(
453
+ 'ai1ec_font_dirs',
454
+ array(
455
+ 'AI1EC' => array(
456
+ $theme['theme_dir'] . DIRECTORY_SEPARATOR . 'font',
457
+ AI1EC_DEFAULT_THEME_PATH . DIRECTORY_SEPARATOR . 'font',
458
+ )
459
+ )
460
+ );
461
+ $directories = $dirs[$matches[1]];
462
+ foreach ( $directories as $dir ) {
463
+ $font_file = $dir . DIRECTORY_SEPARATOR . $matches[2];
464
+ if ( file_exists( $font_file ) ) {
465
+ return base64_encode( file_get_contents( $font_file ) );
466
+ }
467
+ }
468
+ return '';
469
+ }
470
+
471
+ /**
472
+ * Removes fontdir variables added by add-ons.
473
+ *
474
+ * @param array $variables Input variables array.
475
+ *
476
+ * @return array Modified variables.
477
+ */
478
+ protected function _compilation_check_clear_variables( array $variables ) {
479
+ foreach ( $variables as $key => $value ) {
480
+ if ( 'fontdir_' === substr( $key, 0, 8 ) ) {
481
+ unset( $variables[$key] );
482
+ }
483
+ }
484
+
485
+ return $variables;
486
+ }
487
  }
lib/notification/admin.php CHANGED
@@ -59,7 +59,7 @@ class Ai1ec_Notification_Admin extends Ai1ec_Notification {
59
  $persistent = false
60
  ) {
61
  $this->retrieve();
62
-
63
  $entity = compact( 'message', 'class', 'importance', 'persistent' );
64
  $msg_key = sha1( json_encode( $entity ) );
65
  $entity['msg_key'] = $msg_key;
@@ -153,7 +153,7 @@ class Ai1ec_Notification_Admin extends Ai1ec_Notification {
153
 
154
  /**
155
  * Delete a notice from ajax call.
156
- *
157
  */
158
  public function dismiss_notice() {
159
  $key = $_POST['key'];
@@ -177,8 +177,9 @@ class Ai1ec_Notification_Admin extends Ai1ec_Notification {
177
  }
178
  $entity['text_label'] = apply_filters(
179
  'ai1ec_notification_label',
180
- __( 'All-in-One Event Calendar', AI1EC_PLUGIN_NAME )
181
  );
 
182
  $file = $theme->get_file(
183
  'notification/admin.twig',
184
  $entity,
59
  $persistent = false
60
  ) {
61
  $this->retrieve();
62
+
63
  $entity = compact( 'message', 'class', 'importance', 'persistent' );
64
  $msg_key = sha1( json_encode( $entity ) );
65
  $entity['msg_key'] = $msg_key;
153
 
154
  /**
155
  * Delete a notice from ajax call.
156
+ *
157
  */
158
  public function dismiss_notice() {
159
  $key = $_POST['key'];
177
  }
178
  $entity['text_label'] = apply_filters(
179
  'ai1ec_notification_label',
180
+ Ai1ec_i18n::__( 'All-in-One Event Calendar' )
181
  );
182
+ $entity['text_dismiss_button'] = Ai1ec_i18n::__( 'Got it – dismiss this' );
183
  $file = $theme->get_file(
184
  'notification/admin.twig',
185
  $entity,
lib/parser/date.php CHANGED
@@ -13,12 +13,12 @@ class Ai1ec_Parser_Date {
13
  /**
14
  * @var string Character separating tokens.
15
  */
16
- protected $_token_separator = "\f";
17
 
18
  /**
19
  * @var string Character specifying need for localization.
20
  */
21
- protected $_localize_indicator = "\v";
22
 
23
  /**
24
  * @var array Map of input and parsed formats.
@@ -37,6 +37,16 @@ class Ai1ec_Parser_Date {
37
  'A' => array( 'A', 'get_meridiem' ),
38
  );
39
 
 
 
 
 
 
 
 
 
 
 
40
  /**
41
  * Get i18n-safe format string.
42
  *
@@ -58,7 +68,7 @@ class Ai1ec_Parser_Date {
58
  *
59
  * @param string $format Input format.
60
  *
61
- * @return string Format to use in `date`-like calls.
62
  */
63
  public function parse( $format ) {
64
  $parsed = '';
13
  /**
14
  * @var string Character separating tokens.
15
  */
16
+ protected $_token_separator;
17
 
18
  /**
19
  * @var string Character specifying need for localization.
20
  */
21
+ protected $_localize_indicator;
22
 
23
  /**
24
  * @var array Map of input and parsed formats.
37
  'A' => array( 'A', 'get_meridiem' ),
38
  );
39
 
40
+ /**
41
+ * Constructor.
42
+ *
43
+ * @return void Method does not return.
44
+ */
45
+ public function __construct() {
46
+ $this->_token_separator = chr( 12 );
47
+ $this->_localize_indicator = chr( 11 );
48
+ }
49
+
50
  /**
51
  * Get i18n-safe format string.
52
  *
68
  *
69
  * @param string $format Input format.
70
  *
71
+ * @return string Format to use in `date`-like calls.
72
  */
73
  public function parse( $format ) {
74
  $parsed = '';
lib/parser/frequency.php CHANGED
@@ -26,9 +26,18 @@ class Ai1ec_Frequency_Utility {
26
  * @var array Map of WordPress native multipliers
27
  */
28
  protected $_wp_names = array(
29
- 'hourly' => array( 'h' => 1 ),
30
- 'twicedaily' => array( 'd' => 0.5 ),
31
- 'daily' => array( 'd' => 1 ),
 
 
 
 
 
 
 
 
 
32
  );
33
 
34
  /**
@@ -79,13 +88,13 @@ class Ai1ec_Frequency_Utility {
79
  public function parse( $input ) {
80
  $input = strtolower(
81
  preg_replace(
82
- '|(\d+)\s+([a-z])|',
83
  '$1$2',
84
  trim( $input )
85
  )
86
  );
87
  if ( isset( $this->_wp_names[$input] ) ) {
88
- $this->_parsed = $this->_wp_names[$input];
89
  return true;
90
  }
91
  $match = $this->_match( $input );
@@ -116,9 +125,12 @@ class Ai1ec_Frequency_Utility {
116
  * @return string Unified output format
117
  */
118
  public function to_string() {
 
 
 
 
119
  $reverse_quant = array_flip( $this->_multipliers );
120
  krsort( $reverse_quant );
121
- $seconds = $this->to_seconds();
122
  $output = array();
123
  foreach ( $reverse_quant as $duration => $quant ) {
124
  if ( $duration > $seconds ) {
@@ -136,6 +148,27 @@ class Ai1ec_Frequency_Utility {
136
  return implode( ' ', $output );
137
  }
138
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
  /**
140
  * Extract time identifiers from input string
141
  *
@@ -148,7 +181,7 @@ class Ai1ec_Frequency_Utility {
148
  * @return array Extracted time identifiers
149
  */
150
  protected function _match( $input ) {
151
- $regexp = '/(\d+)([' .
152
  implode( '|', array_keys( $this->_multipliers ) ) .
153
  '])?/';
154
  $matches = NULL;
@@ -167,5 +200,4 @@ class Ai1ec_Frequency_Utility {
167
  }
168
  return $output;
169
  }
170
-
171
  }
26
  * @var array Map of WordPress native multipliers
27
  */
28
  protected $_wp_names = array(
29
+ 'hourly' => array(
30
+ 'item' => array( 'h' => 1 ),
31
+ 'seconds' => 3600
32
+ ),
33
+ 'twicedaily' => array(
34
+ 'item' => array( 'd' => 0.5 ),
35
+ 'seconds' => 43200
36
+ ),
37
+ 'daily' => array(
38
+ 'item' => array( 'd' => 1 ),
39
+ 'seconds' => 86400
40
+ ),
41
  );
42
 
43
  /**
88
  public function parse( $input ) {
89
  $input = strtolower(
90
  preg_replace(
91
+ '|(\d*\.?\d+)\s+([a-z])|',
92
  '$1$2',
93
  trim( $input )
94
  )
95
  );
96
  if ( isset( $this->_wp_names[$input] ) ) {
97
+ $this->_parsed = $this->_wp_names[$input]['item'];
98
  return true;
99
  }
100
  $match = $this->_match( $input );
125
  * @return string Unified output format
126
  */
127
  public function to_string() {
128
+ $seconds = $this->to_seconds();
129
+ if ( $wp_name = $this->match_wp_native_interval( $seconds ) ) {
130
+ return $wp_name;
131
+ }
132
  $reverse_quant = array_flip( $this->_multipliers );
133
  krsort( $reverse_quant );
 
134
  $output = array();
135
  foreach ( $reverse_quant as $duration => $quant ) {
136
  if ( $duration > $seconds ) {
148
  return implode( ' ', $output );
149
  }
150
 
151
+ /**
152
+ * Returns seconds interval to native wp name,
153
+ *
154
+ * @param int $seconds Value.
155
+ *
156
+ * @return bool|string False or name.
157
+ */
158
+ public function match_wp_native_interval( $seconds ) {
159
+ if ( empty( $this->_parsed ) ) {
160
+ return false;
161
+ }
162
+ $response = false;
163
+ foreach ( $this->_wp_names as $name => $interval ) {
164
+ if ( $interval['seconds'] === $seconds ) {
165
+ $response = $name;
166
+ break;
167
+ }
168
+ }
169
+ return $response;
170
+ }
171
+
172
  /**
173
  * Extract time identifiers from input string
174
  *
181
  * @return array Extracted time identifiers
182
  */
183
  protected function _match( $input ) {
184
+ $regexp = '/(\d*\.?\d+)([' .
185
  implode( '|', array_keys( $this->_multipliers ) ) .
186
  '])?/';
187
  $matches = NULL;
200
  }
201
  return $output;
202
  }
 
203
  }
lib/post/custom-type.php CHANGED
@@ -82,16 +82,17 @@ class Ai1ec_Post_Custom_Type extends Ai1ec_Base {
82
  // = labels for event categories taxonomy =
83
  // ========================================
84
  $events_categories_labels = array(
85
- 'name' => Ai1ec_I18n::_x( 'Event Categories', 'Event categories taxonomy' ),
86
- 'singular_name' => Ai1ec_I18n::_x( 'Event Category', 'Event categories taxonomy (singular)' )
 
87
  );
88
 
89
  // ==================================
90
  // = labels for event tags taxonomy =
91
  // ==================================
92
  $events_tags_labels = array(
93
- 'name' => Ai1ec_I18n::_x( 'Event Tags', 'Event tags taxonomy' ),
94
- 'singular_name' => Ai1ec_I18n::_x( 'Event Tag', 'Event tags taxonomy (singular)' )
95
  );
96
 
97
  // ==================================
@@ -114,7 +115,7 @@ class Ai1ec_Post_Custom_Type extends Ai1ec_Base {
114
  'edit_terms' => 'manage_events_categories',
115
  'delete_terms' => 'manage_events_categories',
116
  'assign_terms' => 'edit_ai1ec_events'
117
- )
118
  );
119
 
120
  // ================================
@@ -124,12 +125,13 @@ class Ai1ec_Post_Custom_Type extends Ai1ec_Base {
124
  'labels' => $events_tags_labels,
125
  'hierarchical' => false,
126
  'rewrite' => array( 'slug' => 'events_tags' ),
 
127
  'capabilities' => array(
128
  'manage_terms' => 'manage_events_categories',
129
  'edit_terms' => 'manage_events_categories',
130
  'delete_terms' => 'manage_events_categories',
131
  'assign_terms' => 'edit_ai1ec_events'
132
- )
133
  );
134
 
135
  // ================================
@@ -184,7 +186,7 @@ class Ai1ec_Post_Custom_Type extends Ai1ec_Base {
184
  $contributor = get_role( 'ai1ec_event_assistant' );
185
  // if it's present and has the wrong capability delete it.
186
  if (
187
- $contributor instanceOf WP_Role &&
188
  $contributor->has_cap( 'publish_ai1ec_events' )
189
  ) {
190
  remove_role( 'ai1ec_event_assistant' );
@@ -288,4 +290,4 @@ class Ai1ec_Post_Custom_Type extends Ai1ec_Base {
288
  return Ai1ec_I18n::__( 'All Events' );
289
  }
290
 
291
- }
82
  // = labels for event categories taxonomy =
83
  // ========================================
84
  $events_categories_labels = array(
85
+ 'name' => Ai1ec_I18n::_x( 'Categories', 'Event categories taxonomy' ),
86
+ 'singular_name' => Ai1ec_I18n::_x( 'Category', 'Event categories taxonomy (singular)' ),
87
+ 'menu_name' => Ai1ec_I18n::_x( 'Organize', 'Event categories menu item' ),
88
  );
89
 
90
  // ==================================
91
  // = labels for event tags taxonomy =
92
  // ==================================
93
  $events_tags_labels = array(
94
+ 'name' => Ai1ec_I18n::_x( 'Tags', 'Event tags taxonomy' ),
95
+ 'singular_name' => Ai1ec_I18n::_x( 'Tag', 'Event tags taxonomy (singular)' )
96
  );
97
 
98
  // ==================================
115
  'edit_terms' => 'manage_events_categories',
116
  'delete_terms' => 'manage_events_categories',
117
  'assign_terms' => 'edit_ai1ec_events'
118
+ ),
119
  );
120
 
121
  // ================================
125
  'labels' => $events_tags_labels,
126
  'hierarchical' => false,
127
  'rewrite' => array( 'slug' => 'events_tags' ),
128
+ 'show_ui' => true,
129
  'capabilities' => array(
130
  'manage_terms' => 'manage_events_categories',
131
  'edit_terms' => 'manage_events_categories',
132
  'delete_terms' => 'manage_events_categories',
133
  'assign_terms' => 'edit_ai1ec_events'
134
+ ),
135
  );
136
 
137
  // ================================
186
  $contributor = get_role( 'ai1ec_event_assistant' );
187
  // if it's present and has the wrong capability delete it.
188
  if (
189
+ $contributor instanceOf WP_Role &&
190
  $contributor->has_cap( 'publish_ai1ec_events' )
191
  ) {
192
  remove_role( 'ai1ec_event_assistant' );
290
  return Ai1ec_I18n::__( 'All Events' );
291
  }
292
 
293
+ }
lib/recurrence/rule.php CHANGED
@@ -42,7 +42,18 @@ class Ai1ec_Recurrence_Rule extends Ai1ec_Base {
42
  $this->_ending_sentence( $txt, $rc );
43
  break;
44
  default:
45
- $txt = $rrule;
 
 
 
 
 
 
 
 
 
 
 
46
  }
47
  return $txt;
48
  }
@@ -152,11 +163,19 @@ class Ai1ec_Recurrence_Rule extends Ai1ec_Base {
152
  public function exdate_to_text( $exception_dates ) {
153
  $dates_to_add = array();
154
  foreach ( explode( ',', $exception_dates ) as $_exdate ) {
155
- // convert to timestamp
156
- $_exdate = strtotime( $_exdate );
157
  $date_format = $this->_registry->get( 'model.option' )
158
  ->get( 'date_format', 'l, M j, Y' );
159
- $dates_to_add[] = $this->_registry->get( 'date.time', $_exdate )
 
 
 
 
 
 
 
 
 
 
160
  ->format_i18n( $date_format );
161
  }
162
  // append dates to the string and return it;
42
  $this->_ending_sentence( $txt, $rc );
43
  break;
44
  default:
45
+ $processed = explode( '=', $rrule );
46
+ if (
47
+ isset( $processed[1] ) &&
48
+ in_array(
49
+ strtoupper( $processed[0] ),
50
+ array( 'RDATE', 'EXDATE' )
51
+ )
52
+ ) {
53
+ $txt = $this->exdate_to_text( $processed[1] );
54
+ } else {
55
+ $txt = $rrule;
56
+ }
57
  }
58
  return $txt;
59
  }
163
  public function exdate_to_text( $exception_dates ) {
164
  $dates_to_add = array();
165
  foreach ( explode( ',', $exception_dates ) as $_exdate ) {
 
 
166
  $date_format = $this->_registry->get( 'model.option' )
167
  ->get( 'date_format', 'l, M j, Y' );
168
+ $dates_to_add[] = $this->_registry->get(
169
+ 'date.time',
170
+ vsprintf(
171
+ '%04d-%02d-%02d',
172
+ sscanf(
173
+ $_exdate,
174
+ '%04d%02d%02dT%dZ'
175
+ )
176
+ ),
177
+ 'sys.default'
178
+ )
179
  ->format_i18n( $date_format );
180
  }
181
  // append dates to the string and return it;
lib/robots/helper.php CHANGED
@@ -39,7 +39,7 @@ class Ai1ec_Robots_Helper extends Ai1ec_Base {
39
  'ai1ec-nonce'
40
  );
41
 
42
- $redirect_url = admin_url(
43
  'edit.php?post_type=ai1ec_event&page=all-in-one-event-calendar-settings&noredirect=1'
44
  );
45
 
@@ -95,7 +95,7 @@ class Ai1ec_Robots_Helper extends Ai1ec_Base {
95
 
96
  // Update robots.txt
97
  $custom_rules = $this->rules( $current_rules, false );
98
- }
99
  $robots_txt['is_installed'] = $wp_filesystem->put_contents(
100
  $robots_file,
101
  $custom_rules,
39
  'ai1ec-nonce'
40
  );
41
 
42
+ $redirect_url = ai1ec_admin_url(
43
  'edit.php?post_type=ai1ec_event&page=all-in-one-event-calendar-settings&noredirect=1'
44
  );
45
 
95
 
96
  // Update robots.txt
97
  $custom_rules = $this->rules( $current_rules, false );
98
+ }
99
  $robots_txt['is_installed'] = $wp_filesystem->put_contents(
100
  $robots_file,
101
  $custom_rules,
lib/routing/router.php CHANGED
@@ -37,6 +37,11 @@ class Ai1ec_Router extends Ai1ec_Base {
37
  */
38
  protected $cookie_set_dto;
39
 
 
 
 
 
 
40
  /**
41
  * Check if at least one filter is set in the request
42
  *
@@ -94,7 +99,7 @@ class Ai1ec_Router extends Ai1ec_Base {
94
  /**
95
  * Set base (AI1EC) URI
96
  *
97
- * @param string $uri Base URI (i.e. http://www.example.com/calendar)
98
  *
99
  * @return Ai1ec_Router Object itself
100
  */
@@ -109,8 +114,8 @@ class Ai1ec_Router extends Ai1ec_Base {
109
  * @return string URL where WP is installed
110
  */
111
  public function get_site_url() {
112
- if ( NULL === $this->_site_url ) {
113
- $this->_site_url = site_url();
114
  }
115
  return $this->_site_url;
116
  }
@@ -201,6 +206,14 @@ class Ai1ec_Router extends Ai1ec_Base {
201
  $regexp,
202
  $rewrite_to
203
  );
 
 
 
 
 
 
 
 
204
  return $this;
205
  }
206
 
@@ -212,4 +225,19 @@ class Ai1ec_Router extends Ai1ec_Base {
212
  $this->_query_manager = $registry->get( 'query.helper' );
213
  }
214
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
215
  }
37
  */
38
  protected $cookie_set_dto;
39
 
40
+ /**
41
+ * @var array Rewrite structure.
42
+ */
43
+ protected $_rewrite = null;
44
+
45
  /**
46
  * Check if at least one filter is set in the request
47
  *
99
  /**
100
  * Set base (AI1EC) URI
101
  *
102
+ * @param string $url Base URI (i.e. http://www.example.com/calendar)
103
  *
104
  * @return Ai1ec_Router Object itself
105
  */
114
  * @return string URL where WP is installed
115
  */
116
  public function get_site_url() {
117
+ if ( null === $this->_site_url ) {
118
+ $this->_site_url = ai1ec_site_url();
119
  }
120
  return $this->_site_url;
121
  }
206
  $regexp,
207
  $rewrite_to
208
  );
209
+ $this->_rewrite = array(
210
+ 'mask' => $regexp,
211
+ 'target' => $rewrite_to,
212
+ );
213
+ add_filter(
214
+ 'rewrite_rules_array',
215
+ array( $this, 'rewrite_rules_array' )
216
+ );
217
  return $this;
218
  }
219
 
225
  $this->_query_manager = $registry->get( 'query.helper' );
226
  }
227
 
228
+ /**
229
+ * Checks if calendar rewrite rule is registered.
230
+ *
231
+ * @param array $rules Rewrite rules.
232
+ *
233
+ * @return array Rewrite rules.
234
+ */
235
+ public function rewrite_rules_array( $rules ) {
236
+ if ( null !== $this->_rewrite ) {
237
+ $newrules[$this->_rewrite['mask']] = $this->_rewrite['target'];
238
+ $rules = array_merge( $newrules, $rules );
239
+ }
240
+ return $rules;
241
+ }
242
+
243
  }
lib/template/link/helper.php CHANGED
@@ -27,22 +27,6 @@ class Ai1ec_Template_Link_Helper {
27
  return get_page_link( $post, $leavename, $sample );
28
  }
29
 
30
- /**
31
- * Get the home url respecting FORCE_SSL_ADMIN
32
- *
33
- * @return string
34
- */
35
- public function get_site_url() {
36
- if (
37
- is_admin() &&
38
- defined( 'FORCE_SSL_ADMIN' ) &&
39
- true === FORCE_SSL_ADMIN
40
- ) {
41
- return get_site_url( null, '', 'https' );
42
- }
43
- return get_site_url();
44
- }
45
-
46
  /**
47
  * Retrieve full permalink for current post or post ID.
48
  *
@@ -55,5 +39,4 @@ class Ai1ec_Template_Link_Helper {
55
  public function get_permalink( $id = 0, $leavename = false ) {
56
  return get_permalink( $id, $leavename );
57
  }
58
-
59
  }
27
  return get_page_link( $post, $leavename, $sample );
28
  }
29
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  /**
31
  * Retrieve full permalink for current post or post ID.
32
  *
39
  public function get_permalink( $id = 0, $leavename = false ) {
40
  return get_permalink( $id, $leavename );
41
  }
 
42
  }
lib/theme/compiler.php CHANGED
@@ -39,6 +39,12 @@ class Ai1ec_Theme_Compiler extends Ai1ec_Base {
39
  $loader = $this->_registry->get( 'theme.loader' );
40
  header( 'Content-Type: text/plain; charset=utf-8' );
41
  $start = microtime( true );
 
 
 
 
 
 
42
  foreach ( array( true, false ) as $for_admin ) {
43
  $twig = $loader->get_twig_instance( $for_admin, true );
44
  $files = $this->get_files( $twig );
@@ -118,17 +124,12 @@ class Ai1ec_Theme_Compiler extends Ai1ec_Base {
118
  *
119
  * @param array $environment Initial environment arguments.
120
  *
121
- * @return
122
  */
123
  public function ai1ec_twig_environment( array $environment ) {
124
  $environment['debug'] = false;
125
  $environment['cache'] = AI1EC_TWIG_CACHE_PATH;
126
  $environment['auto_reload'] = true;
127
- if ( ! $this->clean_and_check_dir( $environment['cache'] ) ) {
128
- throw new Ai1ec_Bootstrap_Exception(
129
- 'Failed to create cache directory: ' . $environment['cache']
130
- );
131
- }
132
  return $environment;
133
  }
134
 
@@ -143,17 +144,21 @@ class Ai1ec_Theme_Compiler extends Ai1ec_Base {
143
  * @return bool Validity.
144
  */
145
  public function clean_and_check_dir( $cache_dir ) {
146
- $parent = realpath( $cache_dir );
147
- if ( ! $this->_prune_dir( $parent ) ) {
 
 
 
 
 
 
 
 
 
 
 
148
  return false;
149
  }
150
- if (
151
- is_dir( $cache_dir ) && chmod( $cache_dir, 0754 )
152
- || mkdir( $cache_dir, 0754, true )
153
- ) {
154
- return true;
155
- }
156
- return false;
157
  }
158
 
159
  /**
39
  $loader = $this->_registry->get( 'theme.loader' );
40
  header( 'Content-Type: text/plain; charset=utf-8' );
41
  $start = microtime( true );
42
+ if ( ! $this->clean_and_check_dir( AI1EC_TWIG_CACHE_PATH ) ) {
43
+
44
+ throw new Ai1ec_Bootstrap_Exception(
45
+ 'Failed to create cache directory: ' . AI1EC_TWIG_CACHE_PATH
46
+ );
47
+ }
48
  foreach ( array( true, false ) as $for_admin ) {
49
  $twig = $loader->get_twig_instance( $for_admin, true );
50
  $files = $this->get_files( $twig );
124
  *
125
  * @param array $environment Initial environment arguments.
126
  *
127
+ * @return
128
  */
129
  public function ai1ec_twig_environment( array $environment ) {
130
  $environment['debug'] = false;
131
  $environment['cache'] = AI1EC_TWIG_CACHE_PATH;
132
  $environment['auto_reload'] = true;
 
 
 
 
 
133
  return $environment;
134
  }
135
 
144
  * @return bool Validity.
145
  */
146
  public function clean_and_check_dir( $cache_dir ) {
147
+ try {
148
+ $parent = realpath( $cache_dir );
149
+ if ( ! $this->_prune_dir( $parent ) ) {
150
+ return false;
151
+ }
152
+ if (
153
+ is_dir( $cache_dir ) && chmod( $cache_dir, 0754 )
154
+ || mkdir( $cache_dir, 0754, true )
155
+ ) {
156
+ return true;
157
+ }
158
+ return false;
159
+ } catch ( Exception $exc ) {
160
  return false;
161
  }
 
 
 
 
 
 
 
162
  }
163
 
164
  /**
lib/theme/list.php CHANGED
@@ -118,7 +118,7 @@ class Ai1ec_Theme_List extends WP_List_Table {
118
  ?>
119
  <div class="tablenav themes <?php echo $which; ?>">
120
  <?php $this->pagination( $which ); ?>
121
- <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>"
122
  class="ajax-loading list-ajax-loading"
123
  alt="" />
124
  <br class="clear" />
@@ -152,10 +152,10 @@ class Ai1ec_Theme_List extends WP_List_Table {
152
  Ai1ec_I18n::__(
153
  'You only have one theme enabled for this site right now. Visit the Network Admin to <a href="%1$s">enable</a> or <a href="%2$s">install</a> more themes.'
154
  ),
155
- network_admin_url(
156
  'site-themes.php?id=' . $GLOBALS['blog_id']
157
  ),
158
- network_admin_url( 'theme-install.php' )
159
  );
160
 
161
  return;
@@ -164,7 +164,7 @@ class Ai1ec_Theme_List extends WP_List_Table {
164
  Ai1ec_I18n::__(
165
  'You only have one theme enabled for this site right now. Visit the Network Admin to <a href="%1$s">enable</a> more themes.'
166
  ),
167
- network_admin_url(
168
  'site-themes.php?id=' . $GLOBALS['blog_id']
169
  )
170
  );
@@ -179,7 +179,7 @@ class Ai1ec_Theme_List extends WP_List_Table {
179
  Ai1ec_I18n::__(
180
  'You only have one theme installed right now. You can choose from many free themes in the Timely Theme Directory at any time: just click on the <a href="%s">Install Themes</a> tab above.'
181
  ),
182
- admin_url( AI1EC_THEME_SELECTION_BASE_URL )
183
  );
184
 
185
  return;
@@ -190,7 +190,7 @@ class Ai1ec_Theme_List extends WP_List_Table {
190
  Ai1ec_I18n::__(
191
  'Only the active theme is available to you. Contact the <em>%s</em> administrator to add more themes.'
192
  ),
193
- get_site_option( 'site_name' )
194
  );
195
  }
196
 
@@ -231,19 +231,16 @@ class Ai1ec_Theme_List extends WP_List_Table {
231
  $parent_theme = $themes[$theme_name]['Parent Theme'];
232
  $theme_root = $themes[$theme_name]['Theme Root'];
233
  $theme_dir = $themes[$theme_name]->get_stylesheet_directory();
234
- $legacy = ! is_dir( $theme_dir . '/twig' );
235
  $theme_root_uri = esc_url( $themes[$theme_name]['Theme Root URI'] );
236
  $tags = $themes[$theme_name]['Tags'];
237
- $thickbox_class = 'thickbox thickbox-preview';
238
- $legacy = $legacy ? '1' : '0';
239
 
240
  // Generate theme activation link.
241
- $activate_link = admin_url( AI1EC_THEME_SELECTION_BASE_URL );
242
  $activate_link = add_query_arg(
243
  array(
244
  'ai1ec_action' => 'activate_theme',
245
  'ai1ec_theme_dir' => $theme_dir,
246
- 'ai1ec_legacy' => $legacy,
247
  'ai1ec_stylesheet' => $stylesheet,
248
  'ai1ec_theme_root' => $theme_root,
249
  'ai1ec_theme_url' => $theme_root_uri . '/' . $stylesheet,
118
  ?>
119
  <div class="tablenav themes <?php echo $which; ?>">
120
  <?php $this->pagination( $which ); ?>
121
+ <img src="<?php echo esc_url( ai1ec_admin_url( 'images/wpspin_light.gif' ) ); ?>"
122
  class="ajax-loading list-ajax-loading"
123
  alt="" />
124
  <br class="clear" />
152
  Ai1ec_I18n::__(
153
  'You only have one theme enabled for this site right now. Visit the Network Admin to <a href="%1$s">enable</a> or <a href="%2$s">install</a> more themes.'
154
  ),
155
+ ai1ec_network_admin_url(
156
  'site-themes.php?id=' . $GLOBALS['blog_id']
157
  ),
158
+ ai1ec_network_admin_url( 'theme-install.php' )
159
  );
160
 
161
  return;
164
  Ai1ec_I18n::__(
165
  'You only have one theme enabled for this site right now. Visit the Network Admin to <a href="%1$s">enable</a> more themes.'
166
  ),
167
+ ai1ec_network_admin_url(
168
  'site-themes.php?id=' . $GLOBALS['blog_id']
169
  )
170
  );
179
  Ai1ec_I18n::__(
180
  'You only have one theme installed right now. You can choose from many free themes in the Timely Theme Directory at any time: just click on the <a href="%s">Install Themes</a> tab above.'
181
  ),
182
+ ai1ec_admin_url( AI1EC_THEME_SELECTION_BASE_URL )
183
  );
184
 
185
  return;
190
  Ai1ec_I18n::__(
191
  'Only the active theme is available to you. Contact the <em>%s</em> administrator to add more themes.'
192
  ),
193
+ get_site_option( 'site_name' )
194
  );
195
  }
196
 
231
  $parent_theme = $themes[$theme_name]['Parent Theme'];
232
  $theme_root = $themes[$theme_name]['Theme Root'];
233
  $theme_dir = $themes[$theme_name]->get_stylesheet_directory();
 
234
  $theme_root_uri = esc_url( $themes[$theme_name]['Theme Root URI'] );
235
  $tags = $themes[$theme_name]['Tags'];
 
 
236
 
237
  // Generate theme activation link.
238
+ $activate_link = ai1ec_admin_url( AI1EC_THEME_SELECTION_BASE_URL );
239
  $activate_link = add_query_arg(
240
  array(
241
  'ai1ec_action' => 'activate_theme',
242
  'ai1ec_theme_dir' => $theme_dir,
243
+ 'ai1ec_legacy' => false, // hardcoded for 2.2
244
  'ai1ec_stylesheet' => $stylesheet,
245
  'ai1ec_theme_root' => $theme_root,
246
  'ai1ec_theme_url' => $theme_root_uri . '/' . $stylesheet,
lib/theme/loader.php CHANGED
@@ -95,6 +95,23 @@ class Ai1ec_Theme_Loader {
95
  }
96
  }
97
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
  /**
99
  * Adds file search path to list. If an extension is adding this path, and
100
  * this is a custom child theme, inserts its path at the second index of the
@@ -278,6 +295,7 @@ class Ai1ec_Theme_Loader {
278
  $args,
279
  $is_admin
280
  );
 
281
  if ( null === $paths ) {
282
  $paths = $is_admin ? $this->_paths['admin'] : $this->_paths['theme'];
283
  $paths = array_keys( $paths ); // Values (URLs) not used for Twig
@@ -318,6 +336,15 @@ class Ai1ec_Theme_Loader {
318
  return $file;
319
  }
320
 
 
 
 
 
 
 
 
 
 
321
  /**
322
  * Tries to load a PHP file from the theme. If not present, it falls back to
323
  * Twig.
@@ -425,9 +452,15 @@ class Ai1ec_Theme_Loader {
425
  if ( $model_option->get( self::OPTION_FORCE_CLEAN, false ) ) {
426
  $model_option->set( self::OPTION_FORCE_CLEAN, false );
427
  $cache = realpath( $this->get_cache_dir() );
428
- if ( 0 !== strcmp( $cache, realpath( AI1EC_TWIG_CACHE_PATH ) ) ) {
429
- $this->_registry->get( 'theme.compiler' )
430
- ->clean_and_check_dir( $cache );
 
 
 
 
 
 
431
  }
432
  }
433
  }
@@ -542,11 +575,13 @@ class Ai1ec_Theme_Loader {
542
  * Else replaces them with config file.
543
  */
544
  public function switch_theme( array $theme, $delete_variables = true ) {
 
545
  $option = $this->_registry->get( 'model.option' );
546
  $option->set(
547
  'ai1ec_current_theme',
548
  $theme
549
  );
 
550
  $lessphp = $this->_registry->get( 'less.lessphp' );
551
  // If requested, delete theme variables from DB.
552
  if ( $delete_variables ) {
@@ -564,4 +599,56 @@ class Ai1ec_Theme_Loader {
564
  $css_controller->invalidate_cache( null, false );
565
  }
566
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
567
  }
95
  }
96
  }
97
 
98
+ /**
99
+ * Runs the filter for the specified filename just once
100
+ *
101
+ * @param array $args
102
+ * @param string $filename
103
+ * @param boole $is_admin
104
+ *
105
+ * @return array
106
+ */
107
+ public function apply_filters_to_args( array $args, $filename, $is_admin ) {
108
+ return apply_filters(
109
+ self::ARGS_FILTER_PREFIX . $filename,
110
+ $args,
111
+ $is_admin
112
+ );
113
+ }
114
+
115
  /**
116
  * Adds file search path to list. If an extension is adding this path, and
117
  * this is a custom child theme, inserts its path at the second index of the
295
  $args,
296
  $is_admin
297
  );
298
+
299
  if ( null === $paths ) {
300
  $paths = $is_admin ? $this->_paths['admin'] : $this->_paths['theme'];
301
  $paths = array_keys( $paths ); // Values (URLs) not used for Twig
336
  return $file;
337
  }
338
 
339
+ /**
340
+ * Reuturns loader paths.
341
+ *
342
+ * @return array Loader paths.
343
+ */
344
+ public function get_paths() {
345
+ return $this->_paths;
346
+ }
347
+
348
  /**
349
  * Tries to load a PHP file from the theme. If not present, it falls back to
350
  * Twig.
452
  if ( $model_option->get( self::OPTION_FORCE_CLEAN, false ) ) {
453
  $model_option->set( self::OPTION_FORCE_CLEAN, false );
454
  $cache = realpath( $this->get_cache_dir() );
455
+ if ( 0 === strcmp( $cache, realpath( AI1EC_TWIG_CACHE_PATH ) ) ) {
456
+ return;
457
+ }
458
+ if (
459
+ ! $this->_registry->get(
460
+ 'theme.compiler'
461
+ )->clean_and_check_dir( $cache )
462
+ ) {
463
+ $this->_registry->get( 'twig.cache' )->set_unavailable( $cache );
464
  }
465
  }
466
  }
575
  * Else replaces them with config file.
576
  */
577
  public function switch_theme( array $theme, $delete_variables = true ) {
578
+ /* @var $option Ai1ec_Option */
579
  $option = $this->_registry->get( 'model.option' );
580
  $option->set(
581
  'ai1ec_current_theme',
582
  $theme
583
  );
584
+ $option->delete( 'ai1ec_fer_checked' );
585
  $lessphp = $this->_registry->get( 'less.lessphp' );
586
  // If requested, delete theme variables from DB.
587
  if ( $delete_variables ) {
599
  $css_controller->invalidate_cache( null, false );
600
  }
601
 
602
+ /**
603
+ * Switches to default Vortex theme.
604
+ *
605
+ * @param bool $silent Whether notify admin or not.
606
+ *
607
+ * @return void Method does not return.
608
+ */
609
+ public function switch_to_vortex( $silent = false ) {
610
+ $current_theme = $this->get_current_theme();
611
+ if (
612
+ isset( $current_theme['stylesheet'] ) &&
613
+ 'vortex' === $current_theme['stylesheet']
614
+ ) {
615
+ return $current_theme;
616
+ }
617
+ $root = AI1EC_PATH . DIRECTORY_SEPARATOR . 'public' .
618
+ DIRECTORY_SEPARATOR . AI1EC_THEME_FOLDER;
619
+ $theme = array(
620
+ 'theme_root' => $root,
621
+ 'theme_dir' => $root . DIRECTORY_SEPARATOR . 'vortex',
622
+ 'theme_url' => AI1EC_URL . '/public/' . AI1EC_THEME_FOLDER . '/vortex',
623
+ 'stylesheet' => 'vortex',
624
+ 'legacy' => false
625
+ );
626
+ $this->switch_theme( $theme );
627
+ if ( ! $silent ) {
628
+ $this->_registry->get( 'notification.admin' )->store(
629
+ Ai1ec_I18n::__(
630
+ "Your calendar theme has been switched to Vortex due to a rendering problem. For more information, please enable debug mode by adding this line to your WordPress <code>wp-config.php</code> file:<pre>define( 'AI1EC_DEBUG', true );</pre>"
631
+ ),
632
+ 'error',
633
+ 0,
634
+ array( Ai1ec_Notification_Admin::RCPT_ADMIN ),
635
+ true
636
+ );
637
+ }
638
+ return $theme;
639
+ }
640
+
641
+ /**
642
+ * Returns current calendar theme.
643
+ *
644
+ * @return mixed Theme array or null.
645
+ *
646
+ * @throws Ai1ec_Bootstrap_Exception
647
+ */
648
+ public function get_current_theme() {
649
+ return $this->_registry->get(
650
+ 'model.option'
651
+ )->get( 'ai1ec_current_theme' );
652
+ }
653
+
654
  }
lib/twig/ai1ec-extension.php CHANGED
@@ -30,10 +30,11 @@ class Ai1ec_Twig_Ai1ec_Extension extends Twig_Extension {
30
  */
31
  public function getFunctions() {
32
  return array(
33
- 'screen_icon' => new Twig_Function_Method( $this, 'screen_icon' ),
34
- 'wp_nonce_field' => new Twig_Function_Method( $this, 'wp_nonce_field' ),
35
- 'do_meta_boxes' => new Twig_Function_Method( $this, 'do_meta_boxes' ),
36
- 'fb' => new Twig_Function_Method( $this, 'fb' ),
 
37
  );
38
  }
39
 
@@ -356,4 +357,12 @@ class Ai1ec_Twig_Ai1ec_Extension extends Twig_Extension {
356
  return 'ai1ec';
357
  }
358
 
 
 
 
 
 
 
 
 
359
  }
30
  */
31
  public function getFunctions() {
32
  return array(
33
+ 'screen_icon' => new Twig_Function_Method( $this, 'screen_icon' ),
34
+ 'wp_nonce_field' => new Twig_Function_Method( $this, 'wp_nonce_field' ),
35
+ 'do_meta_boxes' => new Twig_Function_Method( $this, 'do_meta_boxes' ),
36
+ 'fb' => new Twig_Function_Method( $this, 'fb' ),
37
+ 'ai1ec_disable_content_output' => new Twig_Function_Method( $this, 'ai1ec_disable_content_output' )
38
  );
39
  }
40
 
357
  return 'ai1ec';
358
  }
359
 
360
+ /**
361
+ * Hooks into the_content filter to disable its output.
362
+ *
363
+ * @return void Method does not return.
364
+ */
365
+ public function ai1ec_disable_content_output() {
366
+ $this->_registry->get( 'calendar.state' )->set_append_content( false );
367
+ }
368
  }
lib/twig/cache.php CHANGED
@@ -28,4 +28,16 @@ class Ai1ec_Twig_Cache extends Ai1ec_Base {
28
  $render_json->render( $output );
29
  }
30
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  }
28
  $render_json->render( $output );
29
  }
30
 
31
+ /**
32
+ * Sets Twig cache as unavailable and notifies admin.
33
+ *
34
+ * @param string $cache_dir Cache dir.
35
+ *
36
+ * @throws Ai1ec_Bootstrap_Exception
37
+ */
38
+ public function set_unavailable( $cache_dir = AI1EC_TWIG_CACHE_PATH ) {
39
+ $this->_registry->get( 'model.settings' )
40
+ ->set( 'twig_cache', AI1EC_CACHE_UNAVAILABLE );
41
+ }
42
+
43
  }
lib/twig/environment.php CHANGED
@@ -28,18 +28,27 @@ class Ai1ec_Twig_Environment extends Twig_Environment {
28
  try {
29
  return parent::loadTemplate( $name, $index );
30
  } catch ( RuntimeException $excpt ) {
31
- $message = Ai1ec_I18n::__(
32
- 'We detected that your cache directory (%s) is not writable. This will make your calendar slow. Please contact your web host or server administrator to make it writable by the web server.'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  );
34
- $message = sprintf( $message, $this->cache );
35
- $this->_registry->get( 'notification.admin' )
36
- ->store( $message, 'error', 1 );
37
- $settings = $this->_registry->get( 'model.settings' );
38
- /* @var $settings Ai1ec_Settings */
39
- // used shutdown to store settings
40
- // after this line exception occurs
41
- $type = ( is_writable( parent::getCache() ) ) ? 'AI1EC_CACHE_UNAVAILABLE' : '';
42
- $settings->set( 'twig_cache', $type )->persist();
43
  }
44
  }
45
 
@@ -54,4 +63,57 @@ class Ai1ec_Twig_Environment extends Twig_Environment {
54
  $this->_registry = $registry;
55
  }
56
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  }
28
  try {
29
  return parent::loadTemplate( $name, $index );
30
  } catch ( RuntimeException $excpt ) {
31
+ /*
32
+ * We should not rely on is_writable - WP Engine case.
33
+ * I've made twig directory read-only and is_writable was returning
34
+ * true.
35
+ */
36
+ $this->_registry->get(
37
+ 'twig.cache'
38
+ )->set_unavailable( $this->cache );
39
+ /*
40
+ * Some copy paste from original Twig method. Just to avoid first
41
+ * error during rendering.
42
+ */
43
+ $cls = $this->getTemplateClass( $name, $index );
44
+ eval(
45
+ '?>' .
46
+ $this->compileSource(
47
+ $this->getLoader()->getSource( $name ),
48
+ $name
49
+ )
50
  );
51
+ return $this->loadedTemplates[$cls] = new $cls($this);
 
 
 
 
 
 
 
 
52
  }
53
  }
54
 
63
  $this->_registry = $registry;
64
  }
65
 
66
+ /**
67
+ * Renders a template.
68
+ *
69
+ * @param string $name The template name
70
+ * @param array $context An array of parameters to pass to the template
71
+ *
72
+ * @return string The rendered template
73
+ *
74
+ * @throws Twig_Error_Loader When the template cannot be found
75
+ * @throws Twig_Error_Syntax When an error occurred during compilation
76
+ * @throws Twig_Error_Runtime When an error occurred during rendering
77
+ */
78
+ public function render( $name, array $context = array() ) {
79
+ try {
80
+ return parent::render( $name, $context );
81
+ } catch ( Exception $excpt ) {
82
+ if (
83
+ ! defined( 'AI1EC_DEBUG' ) ||
84
+ ! AI1EC_DEBUG
85
+ ) {
86
+ return $this->_handle_render_exception( $name, $context );
87
+ }
88
+ throw $excpt;
89
+ }
90
+ }
91
+
92
+ /**
93
+ * Switches calendar theme to vortex.
94
+ *
95
+ * @return void Method does not return.
96
+ *
97
+ * @throws Ai1ec_Bootstrap_Exception
98
+ */
99
+ public function switch_to_vortex() {
100
+ $this->_registry->get( 'theme.loader' )->switch_to_vortex();
101
+ }
102
+
103
+ /**
104
+ * Handles rendering exception. Switches to Vortex theme and tries to
105
+ * re-render view. If it doesn't help it returns default warning.
106
+ *
107
+ * @param string $name Template name.
108
+ * @param array $context An array of parameters to pass to the template.
109
+ *
110
+ * @return string Rendered or default error string.
111
+ */
112
+ protected function _handle_render_exception( $name, array $context ) {
113
+ register_shutdown_function( array( $this, 'switch_to_vortex' ) );
114
+ return '<div class="ai1ec-alert ai1ec-alert-danger">' .
115
+ Ai1ec_I18n::__( 'The calendar is temporarily disabled due to a rendering error. Please <a href="javascript:location.reload();">reload the page</a>.' ) .
116
+ '</div>';
117
+ }
118
+
119
  }
lib/twig/loader.php CHANGED
@@ -21,15 +21,14 @@ class Ai1ec_Twig_Loader_Filesystem extends Twig_Loader_Filesystem {
21
  * @throws Twig_Error_Loader When $name is not found.
22
  */
23
  public function getCacheKey( $name ) {
24
- $cache_key = $this->findTemplate( $name );
 
25
  // make path relative
26
  $cache_key = str_replace(
27
- WP_PLUGIN_DIR . DIRECTORY_SEPARATOR,
28
  '',
29
  $cache_key
30
  );
31
- // namespace style separators avoid OS colisions.
32
- $cache_key = str_replace( '/', '\\', $cache_key );
33
  return $cache_key;
34
  }
35
 
21
  * @throws Twig_Error_Loader When $name is not found.
22
  */
23
  public function getCacheKey( $name ) {
24
+ // namespace style separators avoid OS colisions.
25
+ $cache_key = str_replace( '/', '\\', $this->findTemplate( $name ) );
26
  // make path relative
27
  $cache_key = str_replace(
28
+ str_replace( '/', '\\', WP_PLUGIN_DIR . DIRECTORY_SEPARATOR ) ,
29
  '',
30
  $cache_key
31
  );
 
 
32
  return $cache_key;
33
  }
34
 
public/admin/box_event_location.php CHANGED
@@ -8,89 +8,87 @@
8
  </div>
9
  <div id="ai1ec-event-location-box" class="ai1ec-panel-collapse ai1ec-collapse">
10
  <div class="ai1ec-panel-body">
11
- <div class="ai1ec_box_map
12
- <?php if( $show_map ) echo 'ai1ec_box_map_visible' ?>">
13
- <div id="ai1ec_map_canvas"></div>
14
- </div>
15
- <div id="ai1ec-inside-wrapper">
16
- <table class="ai1ec-form ai1ec-location-form">
17
- <tbody>
18
- <?php echo $select_venue; ?>
19
- <tr>
20
- <td class="ai1ec-first">
21
- <label for="ai1ec_venue">
22
- <?php _e( 'Venue name:', AI1EC_PLUGIN_NAME ); ?>
23
- </label>
24
- </td>
25
- <td>
26
- <input type="text" name="ai1ec_venue" id="ai1ec_venue"
27
- class="ai1ec-form-control"
28
- value="<?php echo esc_attr( $venue ); ?>">
29
- </td>
30
- </tr>
31
- <tr>
32
- <td>
33
- <label for="ai1ec_address">
34
- <?php _e( 'Address:', AI1EC_PLUGIN_NAME ); ?>
35
- </label>
36
- </td>
37
- <td>
38
- <input type="text" name="ai1ec_address" id="ai1ec_address"
39
- class="ai1ec-form-control"
40
- value="<?php echo esc_attr( $address ); ?>">
41
- </td>
42
- </tr>
43
- <tr>
44
- <td colspan="2">
45
- <label for="ai1ec_google_map">
46
- <input type="checkbox" value="1" name="ai1ec_google_map"
47
- id="ai1ec_google_map" <?php echo $google_map; ?>>
48
- <?php _e( 'Show Google Map', AI1EC_PLUGIN_NAME ); ?>
49
- </label>
50
- </td>
51
- </tr>
52
- <tr>
53
- <td colspan="2">
54
- <label for="ai1ec_input_coordinates">
55
- <input type="checkbox" value="1" name="ai1ec_input_coordinates"
56
- id="ai1ec_input_coordinates" <?php echo $coordinates; ?>>
57
- <?php _e( 'Input Coordinates', AI1EC_PLUGIN_NAME ); ?>
58
- </label>
59
- </td>
60
- </tr>
61
- <?php echo $save_venue; ?>
62
- </tbody>
63
- </table>
64
- <table id="ai1ec_table_coordinates" class="ai1ec-form ai1ec-location-form">
65
- <tbody>
66
- <tr>
67
- <td class="ai1ec-first">
68
- <label for="ai1ec_longitude">
69
- <?php _e( 'Longitude:', AI1EC_PLUGIN_NAME ); ?>
70
- </label>
71
- </td>
72
- <td>
73
- <input type="text" class="longitude coordinates"
74
- name="ai1ec_longitude" id="ai1ec_longitude"
75
- class="ai1ec-form-control"
76
- value="<?php echo $longitude; ?>">
77
- </td>
78
- </tr>
79
- <tr>
80
- <td>
81
- <label for="ai1ec_latitude">
82
- <?php _e( 'Latitude:', AI1EC_PLUGIN_NAME ); ?>
83
- </label>
84
- </td>
85
- <td>
86
- <input type="text" class="latitude coordinates"
87
- name="ai1ec_latitude" id="ai1ec_latitude"
88
- class="ai1ec-form-control"
89
- value="<?php echo $latitude; ?>">
90
- </td>
91
- </tr>
92
- </tbody>
93
- </table>
94
  </div>
95
  <input type="hidden" name="ai1ec_city" id="ai1ec_city" value="<?php echo esc_attr( $city ); ?>">
96
  <input type="hidden" name="ai1ec_province" id="ai1ec_province" value="<?php echo esc_attr( $province ); ?>">
8
  </div>
9
  <div id="ai1ec-event-location-box" class="ai1ec-panel-collapse ai1ec-collapse">
10
  <div class="ai1ec-panel-body">
11
+ <div class="ai1ec-row">
12
+ <div class="ai1ec-col-md-8 ai1ec-col-lg-6">
13
+ <table class="ai1ec-form ai1ec-location-form">
14
+ <tbody>
15
+ <?php echo $select_venue; ?>
16
+ <tr>
17
+ <td class="ai1ec-first">
18
+ <label for="ai1ec_venue">
19
+ <?php _e( 'Venue name:', AI1EC_PLUGIN_NAME ); ?>
20
+ </label>
21
+ </td>
22
+ <td>
23
+ <input type="text" name="ai1ec_venue" id="ai1ec_venue"
24
+ class="ai1ec-form-control"
25
+ value="<?php echo esc_attr( $venue ); ?>">
26
+ </td>
27
+ </tr>
28
+ <tr>
29
+ <td>
30
+ <label for="ai1ec_address">
31
+ <?php _e( 'Address:', AI1EC_PLUGIN_NAME ); ?>
32
+ </label>
33
+ </td>
34
+ <td>
35
+ <input type="text" name="ai1ec_address" id="ai1ec_address"
36
+ class="ai1ec-form-control"
37
+ value="<?php echo esc_attr( $address ); ?>">
38
+ </td>
39
+ </tr>
40
+ <tr>
41
+ <td colspan="2">
42
+ <label for="ai1ec_input_coordinates">
43
+ <input type="checkbox" value="1" name="ai1ec_input_coordinates"
44
+ id="ai1ec_input_coordinates" <?php echo $coordinates; ?>>
45
+ <?php _e( 'Input Coordinates', AI1EC_PLUGIN_NAME ); ?>
46
+ </label>
47
+ </td>
48
+ </tr>
49
+ <?php echo $save_venue; ?>
50
+ </tbody>
51
+ </table>
52
+ <table id="ai1ec_table_coordinates" class="ai1ec-form ai1ec-location-form">
53
+ <tbody>
54
+ <tr>
55
+ <td class="ai1ec-first">
56
+ <label for="ai1ec_latitude">
57
+ <?php _e( 'Latitude:', AI1EC_PLUGIN_NAME ); ?>
58
+ </label>
59
+ </td>
60
+ <td>
61
+ <input type="text" name="ai1ec_latitude" id="ai1ec_latitude"
62
+ class="ai1ec-coordinates ai1ec-form-control"
63
+ value="<?php echo $latitude; ?>">
64
+ </td>
65
+ </tr>
66
+ <tr>
67
+ <td>
68
+ <label for="ai1ec_longitude">
69
+ <?php _e( 'Longitude:', AI1EC_PLUGIN_NAME ); ?>
70
+ </label>
71
+ </td>
72
+ <td>
73
+ <input type="text" name="ai1ec_longitude" id="ai1ec_longitude"
74
+ class="ai1ec-coordinates ai1ec-form-control"
75
+ value="<?php echo $longitude; ?>">
76
+ </td>
77
+ </tr>
78
+ </tbody>
79
+ </table>
80
+ </div>
81
+ <div class="ai1ec-col-md-4 ai1ec-col-lg-6">
82
+ <label for="ai1ec_google_map">
83
+ <input type="checkbox" value="1" name="ai1ec_google_map"
84
+ id="ai1ec_google_map" <?php echo $google_map; ?>>
85
+ <?php _e( 'Show Map', AI1EC_PLUGIN_NAME ); ?>
86
+ </label>
87
+ <div class="ai1ec-map-preview
88
+ <?php echo $show_map ? 'ai1ec-map-visible' : ''; ?>">
89
+ <div id="ai1ec_map_canvas"></div>
90
+ </div>
91
+ </div>
 
 
92
  </div>
93
  <input type="hidden" name="ai1ec_city" id="ai1ec_city" value="<?php echo esc_attr( $city ); ?>">
94
  <input type="hidden" name="ai1ec_province" id="ai1ec_province" value="<?php echo esc_attr( $province ); ?>">
public/admin/box_profile_timezone.php CHANGED
@@ -1,5 +1,5 @@
1
  <h3><a name="ai1ec"><?php
2
- _e( 'All in One Event Calendar', AI1EC_PLUGIN_NAME );
3
  ?></a></h3>
4
  <table class="ai1ec-form">
5
  <tbody>
1
  <h3><a name="ai1ec"><?php
2
+ _e( 'All-in-One Event Calendar', AI1EC_PLUGIN_NAME );
3
  ?></a></h3>
4
  <table class="ai1ec-form">
5
  <tbody>
public/admin/box_repeat.php CHANGED
@@ -11,26 +11,31 @@
11
 
12
  <big>
13
  <ul class="ai1ec-nav ai1ec-nav-pills ai1ec-row">
14
- <li class="ai1ec-active ai1ec-col-xs-3 ai1ec-text-center">
15
  <a href="#ai1ec_daily_content" data-toggle="ai1ec-tab">
16
  <?php _e( 'Daily', AI1EC_PLUGIN_NAME ) ;?>
17
  </a>
18
  </li>
19
- <li class="ai1ec-col-xs-3 ai1ec-text-center">
20
  <a href="#ai1ec_weekly_content" data-toggle="ai1ec-tab">
21
  <?php _e( 'Weekly', AI1EC_PLUGIN_NAME ) ;?>
22
  </a>
23
  </li>
24
- <li class="ai1ec-col-xs-3 ai1ec-text-center">
25
  <a href="#ai1ec_monthly_content" data-toggle="ai1ec-tab">
26
  <?php _e( 'Monthly', AI1EC_PLUGIN_NAME ) ;?>
27
  </a>
28
  </li>
29
- <li class="ai1ec-col-xs-3 ai1ec-text-center">
30
  <a href="#ai1ec_yearly_content" data-toggle="ai1ec-tab">
31
  <?php _e( 'Yearly', AI1EC_PLUGIN_NAME ) ;?>
32
  </a>
33
  </li>
 
 
 
 
 
34
  </ul>
35
 
36
  <p></p>
@@ -53,6 +58,10 @@
53
  class="ai1ec-tab-pane">
54
  <?php echo $row_yearly; ?>
55
  </div>
 
 
 
 
56
  </div>
57
  </div>
58
 
11
 
12
  <big>
13
  <ul class="ai1ec-nav ai1ec-nav-pills ai1ec-row">
14
+ <li class="ai1ec-active ai1ec-col-xs-4 ai1ec-col-sm-2 ai1ec-text-center">
15
  <a href="#ai1ec_daily_content" data-toggle="ai1ec-tab">
16
  <?php _e( 'Daily', AI1EC_PLUGIN_NAME ) ;?>
17
  </a>
18
  </li>
19
+ <li class="ai1ec-col-xs-4 ai1ec-col-sm-2 ai1ec-text-center">
20
  <a href="#ai1ec_weekly_content" data-toggle="ai1ec-tab">
21
  <?php _e( 'Weekly', AI1EC_PLUGIN_NAME ) ;?>
22
  </a>
23
  </li>
24
+ <li class="ai1ec-col-xs-4 ai1ec-col-sm-2 ai1ec-text-center">
25
  <a href="#ai1ec_monthly_content" data-toggle="ai1ec-tab">
26
  <?php _e( 'Monthly', AI1EC_PLUGIN_NAME ) ;?>
27
  </a>
28
  </li>
29
+ <li class="ai1ec-col-xs-4 ai1ec-col-sm-2 ai1ec-text-center">
30
  <a href="#ai1ec_yearly_content" data-toggle="ai1ec-tab">
31
  <?php _e( 'Yearly', AI1EC_PLUGIN_NAME ) ;?>
32
  </a>
33
  </li>
34
+ <li class="ai1ec-col-xs-4 ai1ec-col-sm-2 ai1ec-text-center">
35
+ <a href="#ai1ec_custom_content" data-toggle="ai1ec-tab">
36
+ <?php _e( 'Custom', AI1EC_PLUGIN_NAME ) ;?>
37
+ </a>
38
+ </li>
39
  </ul>
40
 
41
  <p></p>
58
  class="ai1ec-tab-pane">
59
  <?php echo $row_yearly; ?>
60
  </div>
61
+ <div id="ai1ec_custom_content" data-freq="custom"
62
+ class="ai1ec-tab-pane">
63
+ <?php echo $row_custom; ?>
64
+ </div>
65
  </div>
66
  </div>
67
 
public/admin/box_time_and_date.php CHANGED
@@ -83,7 +83,7 @@
83
  <optgroup label="<?php echo $group;?>">
84
  <?php
85
  foreach ( $timezones as $timezone ) : ?>
86
- <option value="<?php echo $timezone['value'];?>"
87
  <?php echo $timezone['value'] == $timezone_string ? 'selected' : '';?>><?php echo $timezone['text'];?></option>
88
  <?php endforeach; ?>
89
  </optgroup>
@@ -137,27 +137,6 @@
137
  </span>
138
  </td>
139
  </tr>
140
- <tr<?php echo $recurrence_attr; ?>>
141
- <td>
142
- <label for="ai1ec_exdate_calendar_icon" id="ai1ec_exclude_date_label">
143
- <?php _e( 'Exclude dates', AI1EC_PLUGIN_NAME ); ?>:
144
- </label>
145
- </td>
146
- <td>
147
- <div id="datepicker-widget">
148
- <div id="widgetField">
149
- <a href="javascript:void(0)" id="ai1ec_exclude-dates-input" data-placeholder="<?php _e( 'Choose dates', AI1EC_PLUGIN_NAME ); ?>"></a>
150
- </div>
151
- <div id="widgetCalendar"></div>
152
- </div>
153
- <input type="hidden" name="ai1ec_exdate" id="ai1ec_exdate"
154
- value="<?php echo $exdate; ?>">
155
- <span class="ai1ec-info-text">
156
- (<?php _e( 'Choose specific dates to exclude', AI1EC_PLUGIN_NAME ); ?>)
157
- </span>
158
- </td>
159
- </tr>
160
-
161
  <?php // Recurrence modal skeleton ?>
162
  <div id="ai1ec_repeat_box" class="ai1ec-modal ai1ec-fade">
163
  <div class="ai1ec-modal-dialog">
83
  <optgroup label="<?php echo $group;?>">
84
  <?php
85
  foreach ( $timezones as $timezone ) : ?>
86
+ <option value="<?php echo $timezone['value'];?>"
87
  <?php echo $timezone['value'] == $timezone_string ? 'selected' : '';?>><?php echo $timezone['text'];?></option>
88
  <?php endforeach; ?>
89
  </optgroup>
137
  </span>
138
  </td>
139
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
  <?php // Recurrence modal skeleton ?>
141
  <div id="ai1ec_repeat_box" class="ai1ec-modal ai1ec-fade">
142
  <div class="ai1ec-modal-dialog">
public/admin/css/add_new_event.css CHANGED
@@ -63,7 +63,7 @@
63
  }
64
  .timely .ai1ec-time-input {
65
  display: inline-block;
66
- width: 5.5em;
67
  }
68
 
69
  .timely .ai1ec-input-warn {
@@ -96,34 +96,31 @@
96
  #ai1ec-event-location-box {
97
  overflow: hidden;
98
  }
99
- #ai1ec-event-location-box .ai1ec-panel-body {
100
- min-width: 625px;
101
- }
102
- .ai1ec-form.ai1ec-location-form {
103
- width: 360px;
104
- }
105
- #side-info-column .ai1ec-form.ai1ec-location-form {
106
- float: none;
107
- width: 100%;
108
- }
109
 
110
  /* Google map */
111
- .ai1ec_box_map {
112
- float: right;
113
- /* These two are needed for proper map initialization: */
114
- position: absolute;
115
- visibility: hidden;
116
  border: 1px solid #ddd;
 
 
 
117
  }
118
- .ai1ec_box_map.ai1ec_box_map_visible {
119
- position: static;
120
- visibility: visible;
121
  }
122
  #ai1ec_map_canvas {
123
- width: 250px;
124
  height: 155px;
125
  }
126
 
 
 
 
 
 
 
 
 
127
  /* Bottom publish button */
128
  .ai1ec_bottom_publish {
129
  min-width: 80px;
@@ -313,57 +310,10 @@
313
  width: 16.6%;
314
  }
315
 
316
- /**
317
- * Exclude dates multiselect widget
318
- */
319
-
320
- #datepicker-widget {
321
- position: relative;
322
- }
323
- #widgetCalendar {
324
- position: absolute;
325
- top: 26px;
326
- left: 0;
327
- height: 186px;
328
- overflow: hidden;
329
- width: 648px !important;
330
- background: #FFFFFF;
331
- z-index: 2;
332
- display: none;
333
- }
334
- #widgetCalendar .datepicker {
335
- position: absolute;
336
- bottom: 0;
337
- top: auto;
338
- }
339
- #widgetCalendar .datepickerContainer,
340
- #widgetCalendar .datepickerBorderT,
341
- #widgetCalendar .datepickerBorderB,
342
- #widgetCalendar .datepickerBorderL,
343
- #widgetCalendar .datepickerBorderR,
344
- #widgetCalendar .datepickerBorderTL,
345
- #widgetCalendar .datepickerBorderTR,
346
- #widgetCalendar .datepickerBorderBL,
347
- #widgetCalendar .datepickerBorderBR {
348
- background: transparent !important;
349
- }
350
- #widgetCalendar .ai1ec-datepicker-week,
351
- #widgetCalendar .ai1ec-datepicker-header-week {
352
- display: none;
353
- }
354
- #widgetField input {
355
- width: 320px;
356
- padding-right: 24px;
357
- background-position: 99% 40%;
358
- }
359
  .ai1ec-info-text {
360
  font-size: 10px;
361
  float: left;
362
  }
363
- /* input coordinates */
364
- #ai1ec-inside-wrapper{
365
- width: 33em;
366
- }
367
 
368
  .ai1ec-cost-label {
369
  vertical-align: top;
@@ -396,3 +346,13 @@
396
  .ai1ec-banner-image-frame .edit-attachment {
397
  display: none !important;
398
  }
 
 
 
 
 
 
 
 
 
 
63
  }
64
  .timely .ai1ec-time-input {
65
  display: inline-block;
66
+ width: 6em;
67
  }
68
 
69
  .timely .ai1ec-input-warn {
96
  #ai1ec-event-location-box {
97
  overflow: hidden;
98
  }
 
 
 
 
 
 
 
 
 
 
99
 
100
  /* Google map */
101
+ .ai1ec-map-preview {
 
 
 
 
102
  border: 1px solid #ddd;
103
+ opacity: 0.25;
104
+ pointer-events: none;
105
+ width: 100%;
106
  }
107
+ .ai1ec-map-preview.ai1ec-map-visible {
108
+ opacity: 1;
109
+ pointer-events: auto;
110
  }
111
  #ai1ec_map_canvas {
112
+ width: 100%;
113
  height: 155px;
114
  }
115
 
116
+ /* Coordinates */
117
+ #ai1ec_table_coordinates {
118
+ width: 100%;
119
+ }
120
+ #ai1ec_table_coordinates input {
121
+ max-width: 312px;
122
+ }
123
+
124
  /* Bottom publish button */
125
  .ai1ec_bottom_publish {
126
  min-width: 80px;
310
  width: 16.6%;
311
  }
312
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
313
  .ai1ec-info-text {
314
  font-size: 10px;
315
  float: left;
316
  }
 
 
 
 
317
 
318
  .ai1ec-cost-label {
319
  vertical-align: top;
346
  .ai1ec-banner-image-frame .edit-attachment {
347
  display: none !important;
348
  }
349
+
350
+ #ai1ec_rec_dates_list {
351
+ line-height: 1.7em;
352
+ }
353
+ #ai1ec_recurrence_calendar .ai1ec-datepicker-inline {
354
+ width: auto;
355
+ }
356
+ #ai1ec_recurrence_calendar .ai1ec-datepicker-inline table {
357
+ width: 100%;
358
+ }
public/admin/css/bootstrap.min.css CHANGED
@@ -1300,6 +1300,15 @@ ul.ai1ec-fa-ul {
1300
  a.ai1ec-fa.ai1ec-hide {
1301
  display: none;
1302
  }
 
 
 
 
 
 
 
 
 
1303
  .timely {
1304
  /*! normalize.ai1ec-css v2.1.3 | MIT License | git.ai1ec-io/normalize */
1305
  }
@@ -2681,21 +2690,21 @@ textarea.timely .ai1ec-input-lg {
2681
  .timely .ai1ec-has-warning .ai1ec-checkbox,
2682
  .timely .ai1ec-has-warning .ai1ec-radio-inline,
2683
  .timely .ai1ec-has-warning .ai1ec-checkbox-inline {
2684
- color: #8a6d3b;
2685
  }
2686
  .timely .ai1ec-has-warning .ai1ec-form-control {
2687
- border-color: #8a6d3b;
2688
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
2689
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
2690
  }
2691
  .timely .ai1ec-has-warning .ai1ec-form-control:focus {
2692
- border-color: #66512c;
2693
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;
2694
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;
2695
  }
2696
  .timely .ai1ec-has-warning .ai1ec-input-group-addon {
2697
- color: #8a6d3b;
2698
- border-color: #8a6d3b;
2699
  background-color: #fcf8e3;
2700
  }
2701
  .timely .ai1ec-has-error .ai1ec-help-block,
@@ -3305,10 +3314,10 @@ fieldset[disabled] .timely .ai1ec-btn-link:focus {
3305
  color: #518322;
3306
  }
3307
  .timely .ai1ec-text-warning {
3308
- color: #8a6d3b;
3309
  }
3310
  .timely .ai1ec-text-warning:hover {
3311
- color: #66512c;
3312
  }
3313
  .timely .ai1ec-text-danger {
3314
  color: #a94442;
@@ -4334,13 +4343,13 @@ textarea.ai1ec-input-group-sm > .ai1ec-input-group-btn > .ai1ec-btn {
4334
  .ai1ec-alert-warning {
4335
  background-color: #fcf8e3;
4336
  border-color: #faebcc;
4337
- color: #8a6d3b;
4338
  }
4339
  .ai1ec-alert-warning hr {
4340
  border-top-color: #f7e1b5;
4341
  }
4342
  .ai1ec-alert-warning .ai1ec-alert-link {
4343
- color: #66512c;
4344
  }
4345
  .ai1ec-alert-danger {
4346
  background-color: #f2dede;
@@ -4549,7 +4558,7 @@ textarea.ai1ec-input-group-sm > .ai1ec-input-group-btn > .ai1ec-btn {
4549
  border-color: #faebcc;
4550
  }
4551
  .ai1ec-panel-warning > .ai1ec-panel-heading {
4552
- color: #8a6d3b;
4553
  background-color: #fcf8e3;
4554
  border-color: #faebcc;
4555
  }
@@ -5281,6 +5290,7 @@ Version: 3.3.1 Timestamp: Wed Feb 20 09:57:22 PST 2013
5281
  }
5282
  .select2-results ul.select2-result-sub {
5283
  margin: 0;
 
5284
  }
5285
  .select2-results ul.select2-result-sub > li .select2-result-label {
5286
  padding-left: 20px;
@@ -6411,6 +6421,7 @@ ul.ai1ec-dropdown-menu li {
6411
  .select2-container-multi .select2-choices .select2-search-field input {
6412
  color: #333333;
6413
  margin: 0;
 
6414
  }
6415
  .select2-container-multi .select2-choices .select2-search-field input.select2-default {
6416
  color: #999999 !important;
@@ -6620,6 +6631,9 @@ ul.ai1ec-dropdown-menu li {
6620
  .ai1ec-allday-badge[href]:focus {
6621
  background-color: #808080;
6622
  }
 
 
 
6623
  .ai1ec-color-swatch,
6624
  .ai1ec-color-swatch-empty {
6625
  display: inline-block;
@@ -6634,6 +6648,27 @@ ul.ai1ec-dropdown-menu li {
6634
  filter: alpha(opacity=80);
6635
  border-color: rgba(0, 0, 0, 0.5);
6636
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6637
  .at-upload_image_button {
6638
  width: auto !important;
6639
  }
1300
  a.ai1ec-fa.ai1ec-hide {
1301
  display: none;
1302
  }
1303
+ .timely small.ai1ec-fa-stack {
1304
+ font-size: 90%;
1305
+ height: 1.6em;
1306
+ vertical-align: -11%;
1307
+ }
1308
+ .ai1ec-fa-stack .ai1ec-icon-timely {
1309
+ left: 0.05em;
1310
+ top: -0.05em;
1311
+ }
1312
  .timely {
1313
  /*! normalize.ai1ec-css v2.1.3 | MIT License | git.ai1ec-io/normalize */
1314
  }
2690
  .timely .ai1ec-has-warning .ai1ec-checkbox,
2691
  .timely .ai1ec-has-warning .ai1ec-radio-inline,
2692
  .timely .ai1ec-has-warning .ai1ec-checkbox-inline {
2693
+ color: #7e4d16;
2694
  }
2695
  .timely .ai1ec-has-warning .ai1ec-form-control {
2696
+ border-color: #7e4d16;
2697
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
2698
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
2699
  }
2700
  .timely .ai1ec-has-warning .ai1ec-form-control:focus {
2701
+ border-color: #53320e;
2702
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d58225;
2703
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d58225;
2704
  }
2705
  .timely .ai1ec-has-warning .ai1ec-input-group-addon {
2706
+ color: #7e4d16;
2707
+ border-color: #7e4d16;
2708
  background-color: #fcf8e3;
2709
  }
2710
  .timely .ai1ec-has-error .ai1ec-help-block,
3314
  color: #518322;
3315
  }
3316
  .timely .ai1ec-text-warning {
3317
+ color: #7e4d16;
3318
  }
3319
  .timely .ai1ec-text-warning:hover {
3320
+ color: #53320e;
3321
  }
3322
  .timely .ai1ec-text-danger {
3323
  color: #a94442;
4343
  .ai1ec-alert-warning {
4344
  background-color: #fcf8e3;
4345
  border-color: #faebcc;
4346
+ color: #7e4d16;
4347
  }
4348
  .ai1ec-alert-warning hr {
4349
  border-top-color: #f7e1b5;
4350
  }
4351
  .ai1ec-alert-warning .ai1ec-alert-link {
4352
+ color: #53320e;
4353
  }
4354
  .ai1ec-alert-danger {
4355
  background-color: #f2dede;
4558
  border-color: #faebcc;
4559
  }
4560
  .ai1ec-panel-warning > .ai1ec-panel-heading {
4561
+ color: #7e4d16;
4562
  background-color: #fcf8e3;
4563
  border-color: #faebcc;
4564
  }
5290
  }
5291
  .select2-results ul.select2-result-sub {
5292
  margin: 0;
5293
+ padding-left: 0;
5294
  }
5295
  .select2-results ul.select2-result-sub > li .select2-result-label {
5296
  padding-left: 20px;
6421
  .select2-container-multi .select2-choices .select2-search-field input {
6422
  color: #333333;
6423
  margin: 0;
6424
+ padding: 6px 12px 4px;
6425
  }
6426
  .select2-container-multi .select2-choices .select2-search-field input.select2-default {
6427
  color: #999999 !important;
6631
  .ai1ec-allday-badge[href]:focus {
6632
  background-color: #808080;
6633
  }
6634
+ .ai1ec-message .button {
6635
+ vertical-align: baseline !important;
6636
+ }
6637
  .ai1ec-color-swatch,
6638
  .ai1ec-color-swatch-empty {
6639
  display: inline-block;
6648
  filter: alpha(opacity=80);
6649
  border-color: rgba(0, 0, 0, 0.5);
6650
  }
6651
+ .ai1ec-taxonomy-header {
6652
+ padding: 0 2px 0;
6653
+ }
6654
+ .ai1ec-taxonomy-header i {
6655
+ font-size: 1.15em;
6656
+ line-height: 1em;
6657
+ }
6658
+ .ai1ec-taxonomy-header > h1 {
6659
+ margin: 18px 0 15px;
6660
+ }
6661
+ .ai1ec-taxonomy-header > .ai1ec-nav {
6662
+ margin-bottom: 9px !important;
6663
+ }
6664
+ .ai1ec_event_page_all-in-one-event-calendar-custom-filter-group-menu .wrap > h2,
6665
+ .edit-tags-php.post-type-ai1ec_event .wrap > h2 {
6666
+ margin-top: 118px;
6667
+ }
6668
+ .ai1ec_event_page_all-in-one-event-calendar-custom-filter-group-menu .wrap > .ai1ec-taxonomy-header + h2,
6669
+ .edit-tags-php.post-type-ai1ec_event .wrap > .ai1ec-taxonomy-header + h2 {
6670
+ margin-top: 0;
6671
+ }
6672
  .at-upload_image_button {
6673
  width: auto !important;
6674
  }
public/admin/css/colorpicker.css CHANGED
@@ -16,12 +16,17 @@
16
  background: transparent;
17
  }
18
  ul.colorpicker-list {
 
 
 
19
  padding: 0.1em;
 
 
20
  }
21
  .colorpicker-list li {
22
  float: left;
23
- width: 13px;
24
- height: 13px;
25
  margin: 1px;
26
  cursor: pointer;
27
  border-radius: 2px;
@@ -29,90 +34,44 @@ ul.colorpicker-list {
29
  -moz-border-radius: 2px;
30
  -webkit-border-radius: 2px;
31
  }
32
- .select-more-colors {
33
- width: 100% !important;
34
- line-height: 22px;
35
- height: 22px !important;
36
- border-color: #fff !important;
37
- margin: 2px 1px 2px 1px !important;
38
- text-align: center;
39
- font-family: Tahoma,Verdana,Arial,Helvetica;
40
- font-size: 11px;
41
- /*padding-left: 17px !important;*/
42
- }
43
- li.select-more-colors:hover {
44
- width:103px !important;
45
- border-color: #0A246A !important;
46
- background: #B6BDD2 !important;
47
- margin-right: 2px !important;
48
-
49
-
50
- }
51
- .color-1 {
52
- background: #60a !important;
53
- }
54
- .color-2 {
55
- background: #807 !important;
56
- }
57
- .color-3 {
58
- background: #920 !important;
59
- }
60
- .color-4 {
61
- background: #a60 !important;
62
- }
63
- .color-5 {
64
- background: #990 !important;
65
- }
66
- .color-6 {
67
- background: #080 !important;
68
- }
69
- .color-7 {
70
- background: #077 !important;
71
- }
72
- .color-8 {
73
- background: #00a !important;
74
- }
75
- .color-9 {
76
- background: #000 !important;
77
- }
78
- .color-10 {
79
- background: #444 !important;
80
- }
81
- .color-11 {
82
- background: #85e !important;
83
- }
84
- .color-12 {
85
- background: #d5d !important;
86
- }
87
- .color-13 {
88
- background: #d43 !important;
89
- }
90
- .color-14 {
91
- background: #d90 !important;
92
- }
93
- .color-15 {
94
- background: #bb0 !important;
95
- }
96
- .color-16 {
97
- background: #2b0 !important;
98
- }
99
- .color-17 {
100
- background: #0ba !important;
101
- }
102
- .color-18 {
103
- background: #26d !important;
104
- }
105
- .color-19 {
106
- background: #777 !important;
107
- }
108
- .color-20 {
109
- background: #aaa !important;
110
- }
111
- .color-21 {
112
- width: 13px;
113
- height: 13px;
114
- background: url( ../img/color-picker-default.png );
115
- }
116
  .colorpicker {
117
  width: 356px;
118
  height: 176px;
@@ -157,9 +116,9 @@ li.select-more-colors:hover {
157
  left: 171px;
158
  width: 35px;
159
  height: 150px;
160
- cursor: n-resize;
161
  }
162
  .colorpicker_hue div {
 
163
  position: absolute;
164
  width: 35px;
165
  height: 9px;
16
  background: transparent;
17
  }
18
  ul.colorpicker-list {
19
+ background: #fff;
20
+ border: 1px solid #ccc;
21
+ margin: 0;
22
  padding: 0.1em;
23
+ position: absolute;
24
+ width: 136px;
25
  }
26
  .colorpicker-list li {
27
  float: left;
28
+ width: 15px;
29
+ height: 15px;
30
  margin: 1px;
31
  cursor: pointer;
32
  border-radius: 2px;
34
  -moz-border-radius: 2px;
35
  -webkit-border-radius: 2px;
36
  }
37
+ .colorpicker-list li:hover {
38
+ opacity: 0.85;
39
+ }
40
+ .colorpicker-list li.ai1ec-btn {
41
+ height: auto;
42
+ }
43
+ .color-1 { background: #9fcb33; }
44
+ .color-2 { background: #2ecc71; }
45
+ .color-3 { background: #1abc9c; }
46
+ .color-4 { background: #3498db; }
47
+ .color-5 { background: #6879C9; }
48
+ .color-6 { background: #9b59b6; }
49
+ .color-7 { background: #b23f73; }
50
+ .color-8 { background: #e74c3c; }
51
+ .color-9 { background: #7ba633; }
52
+ .color-10 { background: #27ae60; }
53
+ .color-11 { background: #16a085; }
54
+ .color-12 { background: #2273A8; }
55
+ .color-13 { background: #5C62B3; }
56
+ .color-14 { background: #8e44ad; }
57
+ .color-15 { background: #832d51; }
58
+ .color-16 { background: #c0392b; }
59
+ .color-17 { background: #FFE84B; }
60
+ .color-18 { background: #f8c82d; }
61
+ .color-19 { background: #e67e22; }
62
+ .color-20 { background: #2D547B; }
63
+ .color-21 { background: #516B81; }
64
+ .color-22 { background: #95a5a6; }
65
+ .color-23 { background: #dae0e2; }
66
+ .color-24 { background: #ffffff; }
67
+ .color-25 { background: #e5ba5a; }
68
+ .color-26 { background: #E0933D; }
69
+ .color-27 { background: #BB5611; }
70
+ .color-28 { background: #000000; }
71
+ .color-29 { background: #3A4E62; }
72
+ .color-30 { background: #7f8c8d; }
73
+ .color-31 { background: #bdc3c7; }
74
+ .color-32 { background: url( ../img/color-picker-default.png ); }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  .colorpicker {
76
  width: 356px;
77
  height: 176px;
116
  left: 171px;
117
  width: 35px;
118
  height: 150px;
 
119
  }
120
  .colorpicker_hue div {
121
+ cursor: ns-resize;
122
  position: absolute;
123
  width: 35px;
124
  height: 9px;
public/admin/css/datepicker.css DELETED
@@ -1,204 +0,0 @@
1
- div.datepicker {
2
- position: relative;
3
- font-family: 'Open Sans', Arial, sans-serif;
4
- font-size: 13px;
5
- width: 648px !important;
6
- height: 186px !important;
7
- position: absolute;
8
- cursor: default;
9
- top: 0;
10
- left: 0;
11
- border: 1px solid #999999;
12
- display: none;
13
- }
14
- .datepickerContainer {
15
- position: absolute;
16
- top: 3px;
17
- left: 3px;
18
- }
19
- .datepickerBorderT {
20
- position: absolute;
21
- left: 10px;
22
- top: 0;
23
- right: 10px;
24
- height: 10px;
25
- background: url(../img/datepicker_t.png);
26
- }
27
- .datepickerBorderB {
28
- position: absolute;
29
- left: 10px;
30
- bottom: 0;
31
- right: 10px;
32
- height: 10px;
33
- background: url(../img/datepicker_b.png);
34
- }
35
- .datepickerBorderL {
36
- position: absolute;
37
- left: 0;
38
- bottom: 10px;
39
- top: 10px;
40
- width: 10px;
41
- background: url(../img/datepicker_l.png);
42
- }
43
- .datepickerBorderR {
44
- position: absolute;
45
- right: 0;
46
- bottom: 10px;
47
- top: 10px;
48
- width: 10px;
49
- background: url(../img/datepicker_r.png);
50
- }
51
- .datepickerBorderTL {
52
- position: absolute;
53
- top: 0;
54
- left: 0;
55
- width: 10px;
56
- height: 10px;
57
- background: url(../img/datepicker_tl.png);
58
- }
59
- .datepickerBorderTR {
60
- position: absolute;
61
- top: 0;
62
- right: 0;
63
- width: 10px;
64
- height: 10px;
65
- background: url(../img/datepicker_tr.png);
66
- }
67
- .datepickerBorderBL {
68
- position: absolute;
69
- bottom: 0;
70
- left: 0;
71
- width: 10px;
72
- height: 10px;
73
- background: url(../img/datepicker_bl.png);
74
- }
75
- .datepickerBorderBR {
76
- position: absolute;
77
- bottom: 0;
78
- right: 0;
79
- width: 10px;
80
- height: 10px;
81
- background: url(../img/datepicker_br.png);
82
- }
83
- .datepickerHidden {
84
- display: none;
85
- }
86
- div.datepicker table {
87
- border-collapse:collapse;
88
- width: 200px
89
- }
90
- div.datepicker a {
91
- text-decoration: none;
92
- outline: none;
93
- }
94
- div.datepicker table td {
95
- text-align: center;
96
- font-size: 12px;
97
- padding: 0;
98
- font-family: inherit;
99
- }
100
- div.datepicker th {
101
- text-align: center;
102
- padding: 2px 0;
103
- font-weight: normal;
104
- }
105
- div.datepicker tbody th {
106
- text-align: center;
107
- }
108
- div.datepicker tbody a {
109
- display: block;
110
- }
111
- .datepickerDays a {
112
- display: block;
113
- color: black;
114
- padding: 2px 2px;
115
- text-decoration: none !important;
116
- }
117
- .datepickerYears a,
118
- .datepickerMonths a{
119
- width: 44px;
120
- line-height: 36px;
121
- height: 36px;
122
- text-align: center;
123
- }
124
- td.datepickerNotInMonth a {
125
- color: #999;
126
- }
127
- tbody.datepickerDays td.datepickerSelected{
128
- background: #136A9F;
129
- }
130
- tbody.datepickerDays td.datepickerNotInMonth.datepickerSelected {
131
- background: #17384d;
132
- }
133
- tbody.datepickerYears td.datepickerSelected,
134
- tbody.datepickerMonths td.datepickerSelected{
135
- background: #17384d;
136
- }
137
- div.datepicker a:hover {
138
- color: #446e1d;
139
- }
140
- .datepickerDays a:hover {
141
- background: #ccccff;
142
- }
143
- div.datepicker tbody th {
144
- text-align: center;
145
- }
146
- .datepickerSpace div {
147
- width: 20px;
148
- }
149
- .datepickerGoNext,
150
- .datepickerGoPrev,
151
- .datepickerMonth {
152
- padding-bottom: 0;
153
- }
154
- .datepickerGoNext a,
155
- .datepickerGoPrev a,
156
- .datepickerMonth a {
157
- text-align: center;
158
- height: 20px;
159
- font-size: 13px;
160
- font-weight: bold;
161
- }
162
- .datepickerMonth a {
163
- display: block;
164
- float: left;
165
- width: 150px;
166
- }
167
- .datepickerGoNext a {
168
- float: right;
169
- width: 20px;
170
- }
171
- .datepickerGoPrev a {
172
- float: left;
173
- width: 20px;
174
- }
175
- .datepickerDoW th {
176
- width: 25px;
177
- }
178
- table.datepickerViewDays tbody.datepickerMonths,
179
- table.datepickerViewDays tbody.datepickerYears {
180
- display: none;
181
- }
182
- table.datepickerViewMonths tbody.datepickerDays,
183
- table.datepickerViewMonths tbody.datepickerYears,
184
- table.datepickerViewMonths tr.datepickerDoW {
185
- display: none;
186
- }
187
- table.datepickerViewYears tbody.datepickerDays,
188
- table.datepickerViewYears tbody.datepickerMonths,
189
- table.datepickerViewYears tr.datepickerDoW {
190
- display: none;
191
- }
192
- td.datepickerDisabled a,
193
- td.datepickerDisabled.datepickerNotInMonth a{
194
- color: #333;
195
- }
196
- td.datepickerDisabled a:hover {
197
- color: #333;
198
- }
199
- td.datepickerSpecial a {
200
- background: #700;
201
- }
202
- td.datepickerSelected a {
203
- background: #ccccff;
204
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
public/admin/css/settings.css CHANGED
@@ -148,12 +148,6 @@
148
  width: 110px;
149
  }
150
 
151
- #show_front_end_create_form,
152
- #allow_anonymous_submissions,
153
- #allow_anonymous_uploads,
154
- #publish_anonymous_submissions {
155
- margin-left: 17px;
156
- }
157
  .ai1ec-recaptcha-settings label {
158
  width: 180px;
159
  }
@@ -196,3 +190,7 @@
196
  .ai1ec_event_page_all-in-one-event-calendar-edit-css .metabox-holder {
197
  padding-top: 0;
198
  }
 
 
 
 
148
  width: 110px;
149
  }
150
 
 
 
 
 
 
 
151
  .ai1ec-recaptcha-settings label {
152
  width: 180px;
153
  }
190
  .ai1ec_event_page_all-in-one-event-calendar-edit-css .metabox-holder {
191
  padding-top: 0;
192
  }
193
+
194
+ div.ai1ec-form-group > .ai1ec-setting-fieldset {
195
+ margin: 40px 15px 0px 15px;
196
+ }
public/admin/css/super-widget.css CHANGED
@@ -6,6 +6,6 @@
6
  height: 140px;
7
  white-space: normal;
8
  }
9
- #ai1ec-super_widget .ai1ec-nav {
10
  margin-bottom: 8px;
11
  }
6
  height: 140px;
7
  white-space: normal;
8
  }
9
+ #ai1ec-widget-creator .ai1ec-nav {
10
  margin-bottom: 8px;
11
  }
public/admin/css/taxonomies.css ADDED
File without changes
public/admin/feed_row.php CHANGED
@@ -53,7 +53,7 @@
53
  ?></strong>
54
  </div>
55
  <div class="ai1ec-feed-keep-old-events">
56
- <?php _e( 'Keep old events', AI1EC_PLUGIN_NAME ); ?>:
57
  <strong><?php
58
  if ( $keep_old_events ) {
59
  _e( 'Yes', AI1EC_PLUGIN_NAME );
@@ -62,6 +62,18 @@
62
  }
63
  ?></strong>
64
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
65
  <div class="ai1ec-btn-group ai1ec-pull-right">
66
  <button type="button"
67
  class="ai1ec-btn ai1ec-btn-sm ai1ec-btn-default ai1ec-text-primary
53
  ?></strong>
54
  </div>
55
  <div class="ai1ec-feed-keep-old-events">
56
+ <?php _e( 'On refresh, preserve previously imported events that are missing from the feed', AI1EC_PLUGIN_NAME ); ?>:
57
  <strong><?php
58
  if ( $keep_old_events ) {
59
  _e( 'Yes', AI1EC_PLUGIN_NAME );
62
  }
63
  ?></strong>
64
  </div>
65
+ <div class="ai1ec-feed-import-timezone">
66
+ <span class="ai1ec-tooltip-toggle" title="<?php _e( 'Guesses the time zone of events that have none specified; recommended for Google Calendar feeds', AI1EC_PLUGIN_NAME ); ?>">
67
+ <?php _e( 'Assign default time zone to events in UTC', AI1EC_PLUGIN_NAME );
68
+ ?>:</span>
69
+ <strong><?php
70
+ if ( $feed_import_timezone ) {
71
+ _e( 'Yes', AI1EC_PLUGIN_NAME );
72
+ } else {
73
+ _e( 'No', AI1EC_PLUGIN_NAME );
74
+ } ?>
75
+ </strong>
76
+ </div>
77
  <div class="ai1ec-btn-group ai1ec-pull-right">
78
  <button type="button"
79
  class="ai1ec-btn ai1ec-btn-sm ai1ec-btn-default ai1ec-text-primary
public/admin/img/color-picker-default.png CHANGED
Binary file
public/admin/less/plugins/select2.less CHANGED
@@ -310,6 +310,7 @@ Version: 3.3.1 Timestamp: Wed Feb 20 09:57:22 PST 2013
310
 
311
  .select2-results ul.select2-result-sub {
312
  margin: 0;
 
313
  }
314
 
315
  .select2-results ul.select2-result-sub > li .select2-result-label { padding-left: 20px }
310
 
311
  .select2-results ul.select2-result-sub {
312
  margin: 0;
313
+ padding-left: 0;
314
  }
315
 
316
  .select2-results ul.select2-result-sub > li .select2-result-label { padding-left: 20px }
public/admin/less/timely-admin.less CHANGED
@@ -16,6 +16,11 @@
16
  .ai1ec-label-default;
17
  }
18
 
 
 
 
 
 
19
  // Category colors
20
  .ai1ec-color-swatch,
21
  .ai1ec-color-swatch-empty {
@@ -32,6 +37,32 @@
32
  border-color: rgba(0,0,0,0.5);
33
  }
34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  // Category image upload
36
  .at-upload_image_button {
37
  width: auto !important;
16
  .ai1ec-label-default;
17
  }
18
 
19
+ // Notices
20
+ .ai1ec-message .button {
21
+ vertical-align: baseline !important;
22
+ }
23
+
24
  // Category colors
25
  .ai1ec-color-swatch,
26
  .ai1ec-color-swatch-empty {
37
  border-color: rgba(0,0,0,0.5);
38
  }
39
 
40
+ // Taxonomies
41
+ .ai1ec-taxonomy-header {
42
+ padding: 0 2px 0;
43
+ i {
44
+ font-size: 1.15em;
45
+ line-height: 1em;
46
+ }
47
+ > h1 {
48
+ margin: 18px 0 15px;
49
+ }
50
+ > .ai1ec-nav {
51
+ margin-bottom: 9px !important;
52
+ }
53
+ }
54
+ .ai1ec_event_page_all-in-one-event-calendar-custom-filter-group-menu,
55
+ .edit-tags-php.post-type-ai1ec_event {
56
+ .wrap {
57
+ > h2 {
58
+ margin-top: 118px;
59
+ }
60
+ > .ai1ec-taxonomy-header + h2 {
61
+ margin-top: 0;
62
+ }
63
+ }
64
+ }
65
+
66
  // Category image upload
67
  .at-upload_image_button {
68
  width: auto !important;
public/admin/less/timely-bootstrap.less CHANGED
@@ -158,6 +158,7 @@ ul.ai1ec-dropdown-menu {
158
  .select2-search-field input {
159
  color: @text-color;
160
  margin: 0;
 
161
  &.select2-default {
162
  color: @input-color-placeholder !important;
163
  }
158
  .select2-search-field input {
159
  color: @text-color;
160
  margin: 0;
161
+ padding: 6px 12px 4px;
162
  &.select2-default {
163
  color: @input-color-placeholder !important;
164
  }
public/admin/less/timely-font-awesome.less CHANGED
@@ -13,15 +13,15 @@
13
 
14
  // Namespace the font name instead of importing path.less directly.
15
  @font-face {
16
- font-family: 'Timely_FontAwesome';
17
- src: url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}');
18
- src: url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype'),
19
- url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff'),
20
- url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype'),
21
- url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg');
22
  // src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts
23
- font-weight: normal;
24
- font-style: normal;
25
  }
26
 
27
  @import "font-awesome/core";
@@ -34,11 +34,20 @@
34
 
35
  // Other overrides
36
  .@{fa-css-prefix} {
37
- font-family: Timely_FontAwesome;
38
  }
39
  ul.ai1ec-fa-ul {
40
- list-style-type: none;
41
  }
42
  a.ai1ec-fa.ai1ec-hide {
43
- display: none;
 
 
 
 
 
 
 
 
 
44
  }
13
 
14
  // Namespace the font name instead of importing path.less directly.
15
  @font-face {
16
+ font-family: 'Timely_FontAwesome';
17
+ src: url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}');
18
+ src: url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype'),
19
+ url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff'),
20
+ url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype'),
21
+ url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg');
22
  // src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts
23
+ font-weight: normal;
24
+ font-style: normal;
25
  }
26
 
27
  @import "font-awesome/core";
34
 
35
  // Other overrides
36
  .@{fa-css-prefix} {
37
+ font-family: Timely_FontAwesome;
38
  }
39
  ul.ai1ec-fa-ul {
40
+ list-style-type: none;
41
  }
42
  a.ai1ec-fa.ai1ec-hide {
43
+ display: none;
44
+ }
45
+ .timely small.ai1ec-fa-stack {
46
+ font-size: 90%;
47
+ height: 1.6em;
48
+ vertical-align: -11%;
49
+ }
50
+ .ai1ec-fa-stack .ai1ec-icon-timely {
51
+ left: 0.05em;
52
+ top: -0.05em;
53
  }
public/admin/less/timely-variables.less CHANGED
@@ -9,3 +9,4 @@
9
  @headings-color: @gray-dark;
10
  @padding-base-horizontal: 9px;
11
  @table-cell-padding: 4px;
 
9
  @headings-color: @gray-dark;
10
  @padding-base-horizontal: 9px;
11
  @table-cell-padding: 4px;
12
+ @state-warning-text: #7E4D16;
public/admin/plugins/ics/display_feeds.php CHANGED
@@ -69,7 +69,16 @@
69
  <label for="ai1ec_keep_old_events">
70
  <input type="checkbox" name="ai1ec_keep_old_events"
71
  id="ai1ec_keep_old_events" value="1">
72
- <?php _e( 'Keep old events', AI1EC_PLUGIN_NAME ); ?>
 
 
 
 
 
 
 
 
 
73
  </label>
74
  </div>
75
  <div class="ai1ec-pull-right">
69
  <label for="ai1ec_keep_old_events">
70
  <input type="checkbox" name="ai1ec_keep_old_events"
71
  id="ai1ec_keep_old_events" value="1">
72
+ <?php _e( 'On refresh, preserve previously imported events that are missing from the feed', AI1EC_PLUGIN_NAME ); ?>
73
+ </label>
74
+ </div>
75
+ <div class="ai1ec-feed-import-timezone">
76
+ <label for="ai1ec_feed_import_timezone">
77
+ <input type="checkbox" name="ai1ec_feed_import_timezones"
78
+ id="ai1ec_feed_import_timezone" value="1">
79
+ <span class="ai1ec-tooltip-toggle" title="<?php _e( 'Guesses the time zone of events that have none specified; recommended for Google Calendar feeds', AI1EC_PLUGIN_NAME ); ?>">
80
+ <?php _e( 'Assign default time zone to events in UTC', AI1EC_PLUGIN_NAME ); ?>
81
+ </span>
82
  </label>
83
  </div>
84
  <div class="ai1ec-pull-right">
public/admin/row_custom.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="ai1ec-form-group">
2
+ <label class="ai1ec-control-label ai1ec-col-sm-3">
3
+ <?php _e( 'Custom dates:', AI1EC_PLUGIN_NAME ) ;?>
4
+ </label>
5
+ <div class="ai1ec-col-sm-8">
6
+ <div id="ai1ec_recurrence_calendar"></div>
7
+ </div>
8
+ </div>
9
+ <div class="ai1ec-form-group">
10
+ <div class="ai1ec-col-sm-9 ai1ec-col-sm-offset-3">
11
+ <div id="ai1ec_rec_dates_list"></div>
12
+ <input type="hidden" name="ai1ec_rec_custom_dates"
13
+ id="ai1ec_rec_custom_dates" value="">
14
+ </div>
15
+ </div>
public/admin/themes-install.php CHANGED
@@ -10,10 +10,8 @@
10
  current_user_can('edit_theme_options') ) { ?>
11
  <div id="message2" class="updated">
12
  <p>
13
- <?php printf( __( 'New theme activated. This theme supports widgets, ' .
14
- 'please visit the <a href="%s">widgets settings</a>' .
15
- ' screen to configure them.'),
16
- admin_url( 'widgets.php' ) ); ?>
17
  </p>
18
  </div>
19
  <?php } else { ?>
@@ -35,10 +33,10 @@
35
  screen_icon();
36
  if( ! is_multisite() && current_user_can( 'install_themes' ) ) : ?>
37
  <h2 class="nav-tab-wrapper">
38
- <a href="<?php echo admin_url( AI1EC_THEME_SELECTION_BASE_URL ) ?>" class="nav-tab nav-tab-active">
39
  <?php echo esc_html( __( 'Manage Themes' ) ); ?>
40
  </a>
41
- <a href="<?php echo admin_url( AI1EC_THEME_SELECTION_BASE_URL . '-install' ) ?>" class="nav-tab">
42
  <?php echo esc_html_x( 'Install Themes', 'theme' ); ?>
43
  </a>
44
  </h2>
10
  current_user_can('edit_theme_options') ) { ?>
11
  <div id="message2" class="updated">
12
  <p>
13
+ <?php printf( __( 'New theme activated. This theme supports widgets, please visit the <a href="%s">widgets settings</a> screen to configure them.', AI1EC_PLUGIN_NAME ),
14
+ ai1ec_admin_url( 'widgets.php' ) ); ?>
 
 
15
  </p>
16
  </div>
17
  <?php } else { ?>
33
  screen_icon();
34
  if( ! is_multisite() && current_user_can( 'install_themes' ) ) : ?>
35
  <h2 class="nav-tab-wrapper">
36
+ <a href="<?php echo ai1ec_admin_url( AI1EC_THEME_SELECTION_BASE_URL ) ?>" class="nav-tab nav-tab-active">
37
  <?php echo esc_html( __( 'Manage Themes' ) ); ?>
38
  </a>
39
+ <a href="<?php echo ai1ec_admin_url( AI1EC_THEME_SELECTION_BASE_URL . '-install' ) ?>" class="nav-tab">
40
  <?php echo esc_html_x( 'Install Themes', 'theme' ); ?>
41
  </a>
42
  </h2>
public/admin/twig/notification/admin.twig CHANGED
@@ -1,22 +1,15 @@
1
  <div class="message {{class}} ai1ec-message">
2
  {% if label is not defined %}
3
- {% set label = text_label %}
4
  {% endif %}
5
- <p><strong>{{ label }}:</strong> {{ message | raw }}</p>
 
6
 
7
- {% if persistent == true %}
8
- <div>
9
- <input type="button" class="button ai1ec-dismissable"
10
- data-key="{{ msg_key }}"
11
- value="{{ "I understand - hide this notice" | __ }}">
12
- </div>
13
- <p></p>
14
- {% endif %}
15
- {% if button %}
16
- <div>
17
- <input type="button" class="button {{ button.class }}"
18
- value="{{ button.value }}">
19
- </div>
20
- <p></p>
21
  {% endif %}
 
22
  </div>
1
  <div class="message {{class}} ai1ec-message">
2
  {% if label is not defined %}
3
+ {% set label = text_label %}
4
  {% endif %}
5
+ <p><strong>{{ label }}:</strong></p>
6
+ {{ message | raw }}
7
 
8
+ {% if persistent %}
9
+ <button class="button button-primary ai1ec-dismissable"
10
+ data-key="{{ msg_key }}">
11
+ {{ text_dismiss_button }}
12
+ </button>
 
 
 
 
 
 
 
 
 
13
  {% endif %}
14
+ <p></p>
15
  </div>
public/admin/twig/organize/header.twig ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="timely ai1ec-taxonomy-header ai1ec-hide">
2
+ <h1>{{ text_title }}</h1>
3
+ <ul class="ai1ec-nav ai1ec-nav-tabs">
4
+ {% for taxonomy in taxonomies %}
5
+ {% if taxonomy.children is not empty %}
6
+ <li class="{% if taxonomy.active %}ai1ec-active{% endif %}
7
+ ai1ec-taxonomy-{{ taxonomy.taxonomy_name }}
8
+ ai1ec-dropdown" role="presentation">
9
+ <a data-toggle="ai1ec-dropdown" href="#" class="ai1ec-dropdown-toggle"
10
+ role="button" aria-expanded="false">
11
+ {% if taxonomy.icon is not empty %}
12
+ <i class="{{ taxonomy.icon | e('html_attr') }} ai1ec-fa-fw"></i>
13
+ {% endif %}
14
+ {{ taxonomy.name }} <span class="ai1ec-caret"></span>
15
+ </a>
16
+ <ul class="ai1ec-dropdown-menu" role="menu">
17
+ {% for taxonomy2 in taxonomy.children %}
18
+ {% include 'organize/tab.twig' with { 'taxonomy': taxonomy2 } %}
19
+ {% endfor %}
20
+ </ul>
21
+ </li>
22
+ {% else %}
23
+ {% include 'organize/tab.twig' %}
24
+ {% endif %}
25
+ {% endfor %}
26
+ </ul>
27
+ </div>
public/admin/twig/organize/tab.twig ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {% if taxonomy.divider %}
2
+ <li role="presentation" class="ai1ec-divider"></li>
3
+ {% else %}
4
+ <li class="{% if taxonomy.active %}ai1ec-active{% endif %}
5
+ ai1ec-taxonomy-{{ taxonomy.taxonomy_name }}">
6
+ <a href="{{ taxonomy.url | e('html_attr') }}">
7
+ {% if taxonomy.icon is not empty %}
8
+ <i class="{{ taxonomy.icon | e('html_attr') }} ai1ec-fa-fw"></i>
9
+ {% endif %}
10
+ {{ taxonomy.name }}
11
+ </a>
12
+
13
+ {% if taxonomy.active and taxonomy.edit_url is not empty %}
14
+ <a class="ai1ec-taxonomy-edit-link ai1ec-hide button button-primary timely"
15
+ href="{{ taxonomy.edit_url | e('html_attr') }}">
16
+ <i class="ai1ec-fa ai1ec-fa-pencil"></i> {{ taxonomy.edit_label }}
17
+ </a>
18
+ {% endif %}
19
+ </li>
20
+ {% endif %}
public/admin/twig/setting/select-fieldsets.twig ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <fieldset id="ai1ec-fieldset-{{ parent_id }}" class="ai1ec-setting-fieldset ai1ec-{{ parent_id }} ai1ec-{{ select_id }}
2
+ {% if not visible %} ai1ec-hidden{% endif %}">
3
+ {{ contents | raw }}
4
+ </fieldset>
public/admin/twig/setting/select.twig CHANGED
@@ -6,3 +6,8 @@
6
  {% from 'form-elements/select.twig' import select %}
7
  {{ select( id, name, attributes, options ) }}
8
  </div>
 
 
 
 
 
6
  {% from 'form-elements/select.twig' import select %}
7
  {{ select( id, name, attributes, options ) }}
8
  </div>
9
+ {% if fieldsets is not empty %}
10
+ {% for fieldset in fieldsets %}
11
+ {{ fieldset | raw }}
12
+ {% endfor %}
13
+ {% endif %}
public/admin/twig/widget-creator/super-widget-contents.twig CHANGED
@@ -1,45 +1,49 @@
1
- <div id="ai1ec-super_widget" class="ai1ec-collapse ai1ec-in">
2
- <p>{{ common_info | raw }}</p>
3
- <div class="ai1ec-col-12">
4
- <ul class="ai1ec-nav ai1ec-nav-pills" role="tablist">
5
- {% for id, data in tabs %}
6
- <li >
7
- <a href="#{{ id | e('html_attr') }}" data-toggle="ai1ec-tab" >
8
- <i class="ai1ec-fa ai1ec-fa-calendar ai1ec-fa-lg ai1ec-fa-fw"></i>
9
- {{ data.name | raw }}
10
- </a>
11
- </li>
12
- {% endfor %}
13
- </ul>
14
  </div>
15
- <div class="ai1ec-col-md-6">
16
- <div class="ai1ec-tab-content">
17
- {% for id, data in tabs %}
18
- <div class="ai1ec-tab-pane" id="{{ id }}">
19
- {% if data.requirements is not empty %}
20
- <div class="ai1ec-alert ai1ec-alert-info">
21
- <i class="ai1ec-fa ai1ec-fa-info-circle ai1ec-fa-fw"></i>
22
- {{ data.requirements | raw }}
23
- </div>
24
- {% endif %}
25
- {% for element in data.elements %}
26
- {{ element | raw }}
27
- {% endfor %}
28
- </div>
29
- {% endfor %}
30
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
31
  </div>
32
- <div class="ai1ec-col-md-6">
33
- <p><strong>{{ paste_text | raw }}</strong></p>
34
- <pre id="ai1ec-superwidget-code" class="ai1ec-autoselect"
35
- data-url="{{ siteurl | e('html_attr') }}?ai1ec_super_widget" data-widget-url="{{ siteurl | e('html_attr') }}?ai1ec_js_widget"></pre>
36
- <div class="ai1ec-alert ai1ec-alert-info">
37
- <i class="ai1ec-fa ai1ec-fa-info-circle ai1ec-fa-fw"></i>
38
- {{ updated_code_text
39
- | format( 'http://time.ly/document/manage-add-ons/embed-calendar-sites-super-widget/' )
40
- | raw }}
41
- </div>
42
  </div>
43
- <h2 id="widget-preview-title">{{ preview }}</h2>
44
- <div id="ai1ec-superwidget-preview" class="ai1ec-well ai1ec-hidden"></div>
45
  </div>
 
 
1
+ <p>{{ text_common_info | raw }}</p>
2
+ {% if display_alert %}
3
+ <div class="ai1ec-alert ai1ec-alert-warning">
4
+ {{ text_alert | raw }}
5
+ {{ text_alternatives | raw }}
 
 
 
 
 
 
 
 
6
  </div>
7
+ {% endif %}
8
+ <div class="ai1ec-col-12">
9
+ <ul class="ai1ec-nav ai1ec-nav-pills" role="tablist">
10
+ {% for id, data in tabs %}
11
+ <li>
12
+ <a href="#{{ id | e('html_attr') }}" data-toggle="ai1ec-tab" >
13
+ <i class="{{ data.icon }} ai1ec-fa-lg ai1ec-fa-fw"></i>
14
+ {{ data.name | raw }}
15
+ </a>
16
+ </li>
17
+ {% endfor %}
18
+ </ul>
19
+ </div>
20
+ <div class="ai1ec-col-md-6">
21
+ <div class="ai1ec-tab-content">
22
+ {% for id, data in tabs %}
23
+ <div class="ai1ec-tab-pane" id="{{ id }}">
24
+ {% if data.requirements is not empty %}
25
+ <div class="ai1ec-alert ai1ec-alert-info">
26
+ <i class="ai1ec-fa ai1ec-fa-info-circle ai1ec-fa-fw"></i>
27
+ {{ data.requirements | raw }}
28
+ </div>
29
+ {% endif %}
30
+ {% for element in data.elements %}
31
+ {{ element | raw }}
32
+ {% endfor %}
33
+ </div>
34
+ {% endfor %}
35
  </div>
36
+ </div>
37
+ <div class="ai1ec-col-md-6">
38
+ <p><strong>{{ text_paste | raw }}</strong></p>
39
+ <pre id="ai1ec-superwidget-code" class="ai1ec-autoselect"
40
+ data-widget-url="{{ siteurl | e('html_attr') }}?ai1ec_js_widget"></pre>
41
+ <div class="ai1ec-alert ai1ec-alert-info">
42
+ <i class="ai1ec-fa ai1ec-fa-info-circle ai1ec-fa-fw"></i>
43
+ {{ text_updated_code
44
+ | format( 'http://time.ly/document/manage-add-ons/embed-calendar-sites-super-widget/' )
45
+ | raw }}
46
  </div>
 
 
47
  </div>
48
+ <h2 id="widget-preview-title">{{ text_preview }}</h2>
49
+ <div id="ai1ec-superwidget-preview" class="ai1ec-well ai1ec-hidden"></div>
public/js/agenda.js CHANGED
@@ -1 +1 @@
1
- timely.define(["external_libs/twig","agenda"],function(e){var t,n;return t=e.twig,n=t({id:"../js_src/agenda.twig",data:[{type:"output",stack:[{type:"Twig.expression.type.variable",value:"navigation",match:["navigation"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'\n\n<div class="ai1ec-agenda-view">\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"dates",match:["dates"]},{type:"Twig.expression.type.test",filter:"empty"}],output:[{type:"raw",value:' <p class="ai1ec-no-results">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_upcoming_events",match:["text_upcoming_events"]}]},{type:"raw",value:"\n </p>\n "}]}},{type:"logic",token:{type:"Twig.logic.type.else",match:["else"],output:[{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.for",key_var:"date",value_var:"date_info",expression:[{type:"Twig.expression.type.variable",value:"dates",match:["dates"]}],output:[{type:"raw",value:' <div class="ai1ec-date\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"date_info",match:["date_info"]},{type:"Twig.expression.type.key.period",key:"today"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:"ai1ec-today"}]}},{type:"raw",value:'">\n <a class="ai1ec-date-title ai1ec-load-view"\n href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"date_info",match:["date_info"]},{type:"Twig.expression.type.key.period",key:"href"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"data_type",match:["data_type"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'>\n <div class="ai1ec-month">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"date_info",match:["date_info"]},{type:"Twig.expression.type.key.period",key:"month"}]},{type:"raw",value:'</div>\n <div class="ai1ec-day">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"date_info",match:["date_info"]},{type:"Twig.expression.type.key.period",key:"day"}]},{type:"raw",value:'</div>\n <div class="ai1ec-weekday">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"date_info",match:["date_info"]},{type:"Twig.expression.type.key.period",key:"weekday"}]},{type:"raw",value:"</div>\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"show_year_in_agenda_dates",match:["show_year_in_agenda_dates"]}],output:[{type:"raw",value:' <div class="ai1ec-year">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"date_info",match:["date_info"]},{type:"Twig.expression.type.key.period",key:"year"}]},{type:"raw",value:"</div>\n "}]}},{type:"raw",value:' </a>\n <div class="ai1ec-date-events">\n '},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"category",expression:[{type:"Twig.expression.type.variable",value:"date_info",match:["date_info"]},{type:"Twig.expression.type.key.period",key:"events"}],output:[{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"event",expression:[{type:"Twig.expression.type.variable",value:"category",match:["category"]}],output:[{type:"raw",value:' <div class="ai1ec-event\n ai1ec-event-id-'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"post_id"}]},{type:"raw",value:"\n ai1ec-event-instance-id-"},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"instance_id"}]},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"is_allday"}],output:[{type:"raw",value:"ai1ec-allday"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"expanded",match:["expanded"]}],output:[{type:"raw",value:"ai1ec-expanded"}]}},{type:"raw",value:'">\n\n <div class="ai1ec-event-header">\n <div class="ai1ec-event-toggle">\n <i class="ai1ec-fa ai1ec-fa-minus-circle ai1ec-fa-lg"></i>\n <i class="ai1ec-fa ai1ec-fa-plus-circle ai1ec-fa-lg"></i>\n </div>\n <span class="ai1ec-event-title">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"filtered_title"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"show_location_in_title",match:["show_location_in_title"]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <span class="ai1ec-event-location"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_venue_separator",match:["text_venue_separator"]},{type:"Twig.expression.type.filter",value:"format",match:["| format","format"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:"</span>\n "}]}},{type:"raw",value:" </span>\n\n "},{type:"logic",token:{type:"Twig.logic.type.set",key:"edit_post_link",expression:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"edit_post_link"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"edit_post_link",match:["edit_post_link"]},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:' <a class="post-edit-link" href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"edit_post_link",match:["edit_post_link"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'">\n <i class="ai1ec-fa ai1ec-fa-pencil"></i> '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_edit",match:["text_edit"]}]},{type:"raw",value:"\n </a>\n "}]}},{type:"raw",value:'\n <div class="ai1ec-event-time">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"timespan_short"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n </div>\n </div>\n\n "},{type:"raw",value:'\n <div class="ai1ec-event-summary '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"expanded",match:["expanded"]}],output:[{type:"raw",value:"ai1ec-expanded"}]}},{type:"raw",value:'">\n\n <div class="ai1ec-event-description">\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"content_img_url"},{type:"Twig.expression.type.test",filter:"empty"}],output:[{type:"raw",value:" "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"avatar"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n "}]}},{type:"raw",value:" "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"filtered_content"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'\n </div>\n\n <div class="ai1ec-event-summary-footer">\n <div class="ai1ec-btn-group ai1ec-actions">\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"is_ticket_button_enabled",match:["is_ticket_button_enabled"]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <a class="ai1ec-pull-right ai1ec-btn ai1ec-btn-primary\n ai1ec-btn-xs ai1ec-buy-tickets"\n target="_blank"\n href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url_label"}]},{type:"raw",value:"</a>\n "}]}},{type:"raw",value:" <a "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"data_type_events",match:["data_type_events"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'\n class="ai1ec-read-more ai1ec-btn ai1ec-btn-default\n ai1ec-load-event"\n href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"instance_permalink"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_read_more",match:["text_read_more"]}]},{type:"raw",value:' <i class="ai1ec-fa ai1ec-fa-arrow-right"></i>\n </a>\n </div>\n '},{type:"logic",token:{type:"Twig.logic.type.set",key:"categories",expression:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"categories_html"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.set",key:"tags",expression:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"tags_html"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"categories",match:["categories"]},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:' <span class="ai1ec-categories">\n <span class="ai1ec-field-label">\n <i class="ai1ec-fa ai1ec-fa-folder-open"></i>\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_categories",match:["text_categories"]}]},{type:"raw",value:"\n </span>\n "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"categories",match:["categories"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n </span>\n "}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"tags",match:["tags"]},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:' <span class="ai1ec-tags">\n <span class="ai1ec-field-label">\n <i class="ai1ec-fa ai1ec-fa-tags"></i>\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_tags",match:["text_tags"]}]},{type:"raw",value:"\n </span>\n "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"tags",match:["tags"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n </span>\n "}]}},{type:"raw",value:" </div>\n </div>\n\n </div>\n "}]}},{type:"raw",value:" "},{type:"raw",value:"\n "}]}},{type:"raw",value:" "},{type:"raw",value:"\n </div>\n </div>\n "}]}},{type:"raw",value:" "},{type:"raw",value:"\n "}]}},{type:"raw",value:" "},{type:"raw",value:'\n</div>\n\n<div class="ai1ec-pull-left">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"pagination_links",match:["pagination_links"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"</div>\n"}],precompiled:!0}),n});
1
+ timely.define(["libs/twig","agenda"],function(e){var t,n;return t=e.twig,n=t({id:"../js_src/agenda.twig",data:[{type:"output",stack:[{type:"Twig.expression.type.variable",value:"navigation",match:["navigation"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'\n\n<div class="ai1ec-agenda-view">\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"dates",match:["dates"]},{type:"Twig.expression.type.test",filter:"empty"}],output:[{type:"raw",value:' <p class="ai1ec-no-results">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_upcoming_events",match:["text_upcoming_events"]}]},{type:"raw",value:"\n </p>\n "}]}},{type:"logic",token:{type:"Twig.logic.type.else",match:["else"],output:[{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.for",key_var:"date",value_var:"date_info",expression:[{type:"Twig.expression.type.variable",value:"dates",match:["dates"]}],output:[{type:"raw",value:' <div class="ai1ec-date\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"date_info",match:["date_info"]},{type:"Twig.expression.type.key.period",key:"today"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:"ai1ec-today"}]}},{type:"raw",value:'">\n <a class="ai1ec-date-title ai1ec-load-view"\n href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"date_info",match:["date_info"]},{type:"Twig.expression.type.key.period",key:"href"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"data_type",match:["data_type"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'>\n <div class="ai1ec-month">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"date_info",match:["date_info"]},{type:"Twig.expression.type.key.period",key:"month"}]},{type:"raw",value:'</div>\n <div class="ai1ec-day">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"date_info",match:["date_info"]},{type:"Twig.expression.type.key.period",key:"day"}]},{type:"raw",value:'</div>\n <div class="ai1ec-weekday">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"date_info",match:["date_info"]},{type:"Twig.expression.type.key.period",key:"weekday"}]},{type:"raw",value:"</div>\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"show_year_in_agenda_dates",match:["show_year_in_agenda_dates"]}],output:[{type:"raw",value:' <div class="ai1ec-year">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"date_info",match:["date_info"]},{type:"Twig.expression.type.key.period",key:"year"}]},{type:"raw",value:"</div>\n "}]}},{type:"raw",value:' </a>\n <div class="ai1ec-date-events">\n '},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"category",expression:[{type:"Twig.expression.type.variable",value:"date_info",match:["date_info"]},{type:"Twig.expression.type.key.period",key:"events"}],output:[{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"event",expression:[{type:"Twig.expression.type.variable",value:"category",match:["category"]}],output:[{type:"raw",value:' <div class="ai1ec-event\n ai1ec-event-id-'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"post_id"}]},{type:"raw",value:"\n ai1ec-event-instance-id-"},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"instance_id"}]},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"is_allday"}],output:[{type:"raw",value:"ai1ec-allday"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"expanded",match:["expanded"]}],output:[{type:"raw",value:"ai1ec-expanded"}]}},{type:"raw",value:'">\n\n <div class="ai1ec-event-header">\n <div class="ai1ec-event-toggle">\n <i class="ai1ec-fa ai1ec-fa-minus-circle ai1ec-fa-lg"></i>\n <i class="ai1ec-fa ai1ec-fa-plus-circle ai1ec-fa-lg"></i>\n </div>\n <span class="ai1ec-event-title">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"filtered_title"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"show_location_in_title",match:["show_location_in_title"]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <span class="ai1ec-event-location"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_venue_separator",match:["text_venue_separator"]},{type:"Twig.expression.type.filter",value:"format",match:["| format","format"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:"</span>\n "}]}},{type:"raw",value:" </span>\n\n "},{type:"logic",token:{type:"Twig.logic.type.set",key:"edit_post_link",expression:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"edit_post_link"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"edit_post_link",match:["edit_post_link"]},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:' <a class="post-edit-link" href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"edit_post_link",match:["edit_post_link"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'">\n <i class="ai1ec-fa ai1ec-fa-pencil"></i> '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_edit",match:["text_edit"]}]},{type:"raw",value:"\n </a>\n "}]}},{type:"raw",value:'\n <div class="ai1ec-event-time">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"timespan_short"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n </div>\n </div>\n\n "},{type:"raw",value:'\n <div class="ai1ec-event-summary '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"expanded",match:["expanded"]}],output:[{type:"raw",value:"ai1ec-expanded"}]}},{type:"raw",value:'">\n\n <div class="ai1ec-event-description">\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"content_img_url"},{type:"Twig.expression.type.test",filter:"empty"},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"avatar_not_wrapped"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <a class="ai1ec-load-event"\n href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"permalink"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"avatar_not_wrapped"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n </a>\n "}]}},{type:"raw",value:" "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"filtered_content"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'\n </div>\n\n <div class="ai1ec-event-summary-footer">\n <div class="ai1ec-btn-group ai1ec-actions">\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"is_ticket_button_enabled",match:["is_ticket_button_enabled"]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <a class="ai1ec-pull-right ai1ec-btn ai1ec-btn-primary\n ai1ec-btn-xs ai1ec-buy-tickets"\n target="_blank"\n href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url_label"}]},{type:"raw",value:"</a>\n "}]}},{type:"raw",value:' <a class="ai1ec-read-more ai1ec-btn ai1ec-btn-default\n ai1ec-load-event"\n href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"permalink"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_read_more",match:["text_read_more"]}]},{type:"raw",value:' <i class="ai1ec-fa ai1ec-fa-arrow-right"></i>\n </a>\n </div>\n '},{type:"logic",token:{type:"Twig.logic.type.set",key:"categories",expression:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"categories_html"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.set",key:"tags",expression:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"tags_html"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"categories",match:["categories"]},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:' <span class="ai1ec-categories">\n <span class="ai1ec-field-label">\n <i class="ai1ec-fa ai1ec-fa-folder-open"></i>\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_categories",match:["text_categories"]}]},{type:"raw",value:"\n </span>\n "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"categories",match:["categories"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n </span>\n "}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"tags",match:["tags"]},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:' <span class="ai1ec-tags">\n <span class="ai1ec-field-label">\n <i class="ai1ec-fa ai1ec-fa-tags"></i>\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_tags",match:["text_tags"]}]},{type:"raw",value:"\n </span>\n "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"tags",match:["tags"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n </span>\n "}]}},{type:"raw",value:" </div>\n </div>\n\n </div>\n "}]}},{type:"raw",value:" "},{type:"raw",value:"\n "}]}},{type:"raw",value:" "},{type:"raw",value:"\n </div>\n </div>\n "}]}},{type:"raw",value:" "},{type:"raw",value:"\n "}]}},{type:"raw",value:" "},{type:"raw",value:'\n</div>\n\n<div class="ai1ec-pull-left">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"pagination_links",match:["pagination_links"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"</div>\n"}],precompiled:!0}),n});
public/js/external_libs/ai1ec_datepicker.js DELETED
@@ -1 +0,0 @@
1
- timely.define(["jquery_timely"],function(e){var t=function(){var t={},n={years:"datepickerViewYears",moths:"datepickerViewMonths",days:"datepickerViewDays"},i={wrapper:'<div class="datepicker"><div class="datepickerBorderT" /><div class="datepickerBorderB" /><div class="datepickerBorderL" /><div class="datepickerBorderR" /><div class="datepickerBorderTL" /><div class="datepickerBorderTR" /><div class="datepickerBorderBL" /><div class="datepickerBorderBR" /><div class="datepickerContainer"><table cellspacing="0" cellpadding="0"><tbody><tr></tr></tbody></table></div></div>',head:["<td>",'<table cellspacing="0" cellpadding="0">',"<thead>","<tr>",'<th class="datepickerGoPrev"><a href="#"><span><%=prev%></span></a></th>','<th colspan="5" class="datepickerMonth"><a href="#"><span></span></a></th>','<th class="datepickerGoNext"><a href="#"><span><%=next%></span></a></th>',"</tr>",'<tr class="datepickerDoW">','<th class="ai1ec-datepicker-header-week"><span><%=week%></span></th>',"<th><span><%=day1%></span></th>","<th><span><%=day2%></span></th>","<th><span><%=day3%></span></th>","<th><span><%=day4%></span></th>","<th><span><%=day5%></span></th>","<th><span><%=day6%></span></th>","<th><span><%=day7%></span></th>","</tr>","</thead>","</table></td>"],space:'<td class="datepickerSpace"><div></div></td>',days:['<tbody class="datepickerDays">',"<tr>",'<th class="datepickerWeek ai1ec-datepicker-week"><a href="#"><span><%=weeks[0].week%></span></a></th>','<td class="<%=weeks[0].days[0].classname%>"><a href="#"><span><%=weeks[0].days[0].text%></span></a></td>','<td class="<%=weeks[0].days[1].classname%>"><a href="#"><span><%=weeks[0].days[1].text%></span></a></td>','<td class="<%=weeks[0].days[2].classname%>"><a href="#"><span><%=weeks[0].days[2].text%></span></a></td>','<td class="<%=weeks[0].days[3].classname%>"><a href="#"><span><%=weeks[0].days[3].text%></span></a></td>','<td class="<%=weeks[0].days[4].classname%>"><a href="#"><span><%=weeks[0].days[4].text%></span></a></td>','<td class="<%=weeks[0].days[5].classname%>"><a href="#"><span><%=weeks[0].days[5].text%></span></a></td>','<td class="<%=weeks[0].days[6].classname%>"><a href="#"><span><%=weeks[0].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek ai1ec-datepicker-week"><a href="#"><span><%=weeks[1].week%></span></a></th>','<td class="<%=weeks[1].days[0].classname%>"><a href="#"><span><%=weeks[1].days[0].text%></span></a></td>','<td class="<%=weeks[1].days[1].classname%>"><a href="#"><span><%=weeks[1].days[1].text%></span></a></td>','<td class="<%=weeks[1].days[2].classname%>"><a href="#"><span><%=weeks[1].days[2].text%></span></a></td>','<td class="<%=weeks[1].days[3].classname%>"><a href="#"><span><%=weeks[1].days[3].text%></span></a></td>','<td class="<%=weeks[1].days[4].classname%>"><a href="#"><span><%=weeks[1].days[4].text%></span></a></td>','<td class="<%=weeks[1].days[5].classname%>"><a href="#"><span><%=weeks[1].days[5].text%></span></a></td>','<td class="<%=weeks[1].days[6].classname%>"><a href="#"><span><%=weeks[1].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek ai1ec-datepicker-week"><a href="#"><span><%=weeks[2].week%></span></a></th>','<td class="<%=weeks[2].days[0].classname%>"><a href="#"><span><%=weeks[2].days[0].text%></span></a></td>','<td class="<%=weeks[2].days[1].classname%>"><a href="#"><span><%=weeks[2].days[1].text%></span></a></td>','<td class="<%=weeks[2].days[2].classname%>"><a href="#"><span><%=weeks[2].days[2].text%></span></a></td>','<td class="<%=weeks[2].days[3].classname%>"><a href="#"><span><%=weeks[2].days[3].text%></span></a></td>','<td class="<%=weeks[2].days[4].classname%>"><a href="#"><span><%=weeks[2].days[4].text%></span></a></td>','<td class="<%=weeks[2].days[5].classname%>"><a href="#"><span><%=weeks[2].days[5].text%></span></a></td>','<td class="<%=weeks[2].days[6].classname%>"><a href="#"><span><%=weeks[2].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek ai1ec-datepicker-week"><a href="#"><span><%=weeks[3].week%></span></a></th>','<td class="<%=weeks[3].days[0].classname%>"><a href="#"><span><%=weeks[3].days[0].text%></span></a></td>','<td class="<%=weeks[3].days[1].classname%>"><a href="#"><span><%=weeks[3].days[1].text%></span></a></td>','<td class="<%=weeks[3].days[2].classname%>"><a href="#"><span><%=weeks[3].days[2].text%></span></a></td>','<td class="<%=weeks[3].days[3].classname%>"><a href="#"><span><%=weeks[3].days[3].text%></span></a></td>','<td class="<%=weeks[3].days[4].classname%>"><a href="#"><span><%=weeks[3].days[4].text%></span></a></td>','<td class="<%=weeks[3].days[5].classname%>"><a href="#"><span><%=weeks[3].days[5].text%></span></a></td>','<td class="<%=weeks[3].days[6].classname%>"><a href="#"><span><%=weeks[3].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek ai1ec-datepicker-week"><a href="#"><span><%=weeks[4].week%></span></a></th>','<td class="<%=weeks[4].days[0].classname%>"><a href="#"><span><%=weeks[4].days[0].text%></span></a></td>','<td class="<%=weeks[4].days[1].classname%>"><a href="#"><span><%=weeks[4].days[1].text%></span></a></td>','<td class="<%=weeks[4].days[2].classname%>"><a href="#"><span><%=weeks[4].days[2].text%></span></a></td>','<td class="<%=weeks[4].days[3].classname%>"><a href="#"><span><%=weeks[4].days[3].text%></span></a></td>','<td class="<%=weeks[4].days[4].classname%>"><a href="#"><span><%=weeks[4].days[4].text%></span></a></td>','<td class="<%=weeks[4].days[5].classname%>"><a href="#"><span><%=weeks[4].days[5].text%></span></a></td>','<td class="<%=weeks[4].days[6].classname%>"><a href="#"><span><%=weeks[4].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek ai1ec-datepicker-week"><a href="#"><span><%=weeks[5].week%></span></a></th>','<td class="<%=weeks[5].days[0].classname%>"><a href="#"><span><%=weeks[5].days[0].text%></span></a></td>','<td class="<%=weeks[5].days[1].classname%>"><a href="#"><span><%=weeks[5].days[1].text%></span></a></td>','<td class="<%=weeks[5].days[2].classname%>"><a href="#"><span><%=weeks[5].days[2].text%></span></a></td>','<td class="<%=weeks[5].days[3].classname%>"><a href="#"><span><%=weeks[5].days[3].text%></span></a></td>','<td class="<%=weeks[5].days[4].classname%>"><a href="#"><span><%=weeks[5].days[4].text%></span></a></td>','<td class="<%=weeks[5].days[5].classname%>"><a href="#"><span><%=weeks[5].days[5].text%></span></a></td>','<td class="<%=weeks[5].days[6].classname%>"><a href="#"><span><%=weeks[5].days[6].text%></span></a></td>',"</tr>","</tbody>"],months:['<tbody class="<%=className%>">',"<tr>",'<td colspan="2"><a href="#"><span><%=data[0]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[1]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[2]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[3]%></span></a></td>',"</tr>","<tr>",'<td colspan="2"><a href="#"><span><%=data[4]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[5]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[6]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[7]%></span></a></td>',"</tr>","<tr>",'<td colspan="2"><a href="#"><span><%=data[8]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[9]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[10]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[11]%></span></a></td>',"</tr>","</tbody>"]},s={flat:!1,starts:1,prev:"&#9664;",next:"&#9654;",lastSel:!1,mode:"single",view:"days",calendars:1,format:"Y-m-d",position:"bottom",eventName:"click",onRender:function(){return{}},onChange:function(){return!0},onShow:function(){return!0},onBeforeShow:function(){return!0},onHide:function(){return!0},locale:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekMin:"wk"}},o=function(t){var n=e(t).data("datepicker"),s=e(t),o=Math.floor(n.calendars/2),u,f,l,c,h=0,p,d,v,m,g,y;s.find("td>table tbody").remove();for(var b=0;b<n.calendars;b++){u=new Date(n.current),u.addMonths(-o+b),y=s.find("table").eq(b+1);switch(y[0].className){case"datepickerViewDays":l=a(u,"B Y");break;case"datepickerViewMonths":l=u.getFullYear();break;case"datepickerViewYears":l=u.getFullYear()-6+" - "+(u.getFullYear()+5)}y.find("thead tr:first th:eq(1) span").text(l),l=u.getFullYear()-6,f={data:[],className:"datepickerYears"};for(var w=0;w<12;w++)f.data.push(l+w);g=r(i.months.join(""),f),u.setDate(1),f={weeks:[],test:10},c=u.getMonth();var l=(u.getDay()-n.starts)%7;u.addDays(-(l+(l<0?7:0))),p=-1,h=0;while(h<42){v=parseInt(h/7,10),m=h%7,f.weeks[v]||(p=u.getWeekNumber(),f.weeks[v]={week:p,days:[]}),f.weeks[v].days[m]={text:u.getDate(),classname:[]},c!=u.getMonth()&&f.weeks[v].days[m].classname.push("datepickerNotInMonth"),u.getDay()==0&&f.weeks[v].days[m].classname.push("datepickerSunday"),u.getDay()==6&&f.weeks[v].days[m].classname.push("datepickerSaturday");var E=n.onRender(u),S=u.valueOf();(E.selected||n.date==S||e.inArray(S,n.date)>-1||n.mode=="range"&&S>=n.date[0]&&S<=n.date[1])&&f.weeks[v].days[m].classname.push("datepickerSelected"),E.disabled&&f.weeks[v].days[m].classname.push("datepickerDisabled"),E.className&&f.weeks[v].days[m].classname.push(E.className),f.weeks[v].days[m].classname=f.weeks[v].days[m].classname.join(" "),h++,u.addDays(1)}g=r(i.days.join(""),f)+g,f={data:n.locale.monthsShort,className:"datepickerMonths"},g=r(i.months.join(""),f)+g,y.append(g)}},u=function(e,t){if(e.constructor==Date)return new Date(e);var n=e.split(/\W+/),r=t.split(/\W+/),i,s,o,u,a,f=new Date;for(var l=0;l<n.length;l++)switch(r[l]){case"d":case"e":i=parseInt(n[l],10);break;case"m":s=parseInt(n[l],10)-1;break;case"Y":case"y":o=parseInt(n[l],10),o+=o>100?0:o<29?2e3:1900;break;case"H":case"I":case"k":case"l":u=parseInt(n[l],10);break;case"P":case"p":/pm/i.test(n[l])&&u<12?u+=12:/am/i.test(n[l])&&u>=12&&(u-=12);break;case"M":a=parseInt(n[l],10)}return new Date(o===undefined?f.getFullYear():o,s===undefined?f.getMonth():s,i===undefined?f.getDate():i,u===undefined?f.getHours():u,a===undefined?f.getMinutes():a,0)},a=function(e,t){var n=e.getMonth(),r=e.getDate(),i=e.getFullYear(),s=e.getWeekNumber(),o=e.getDay(),u={},a=e.getHours(),f=a>=12,l=f?a-12:a,c=e.getDayOfYear();l==0&&(l=12);var h=e.getMinutes(),p=e.getSeconds(),d=t.split(""),v;for(var m=0;m<d.length;m++){v=d[m];switch(d[m]){case"a":v=e.getDayName();break;case"A":v=e.getDayName(!0);break;case"b":v=e.getMonthName();break;case"B":v=e.getMonthName(!0);break;case"C":v=1+Math.floor(i/100);break;case"d":v=r<10?"0"+r:r;break;case"e":v=r;break;case"H":v=a<10?"0"+a:a;break;case"I":v=l<10?"0"+l:l;break;case"j":v=c<100?c<10?"00"+c:"0"+c:c;break;case"k":v=a;break;case"l":v=l;break;case"m":v=n<9?"0"+(1+n):1+n;break;case"M":v=h<10?"0"+h:h;break;case"p":case"P":v=f?"PM":"AM";break;case"s":v=Math.floor(e.getTime()/1e3);break;case"S":v=p<10?"0"+p:p;break;case"u":v=o+1;break;case"w":v=o;break;case"y":v=(""+i).substr(2,2);break;case"Y":v=i}d[m]=v}return d.join("")},f=function(e){if(Date.prototype.tempDate)return;Date.prototype.tempDate=null,Date.prototype.months=e.months,Date.prototype.monthsShort=e.monthsShort,Date.prototype.days=e.days,Date.prototype.daysShort=e.daysShort,Date.prototype.getMonthName=function(e){return this[e?"months":"monthsShort"][this.getMonth()]},Date.prototype.getDayName=function(e){return this[e?"days":"daysShort"][this.getDay()]},Date.prototype.addDays=function(e){this.setDate(this.getDate()+e),this.tempDate=this.getDate()},Date.prototype.addMonths=function(e){this.tempDate==null&&(this.tempDate=this.getDate()),this.setDate(1),this.setMonth(this.getMonth()+e),this.setDate(Math.min(this.tempDate,this.getMaxDays()))},Date.prototype.addYears=function(e){this.tempDate==null&&(this.tempDate=this.getDate()),this.setDate(1),this.setFullYear(this.getFullYear()+e),this.setDate(Math.min(this.tempDate,this.getMaxDays()))},Date.prototype.getMaxDays=function(){var e=new Date(Date.parse(this)),t=28,n;n=e.getMonth(),t=28;while(e.getMonth()==n)t++,e.setDate(t);return t-1},Date.prototype.getFirstDay=function(){var e=new Date(Date.parse(this));return e.setDate(1),e.getDay()},Date.prototype.getWeekNumber=function(){var e=new Date(this);e.setDate(e.getDate()-(e.getDay()+6)%7+3);var t=e.valueOf();return e.setMonth(0),e.setDate(4),Math.round((t-e.valueOf())/6048e5)+1},Date.prototype.getDayOfYear=function(){var e=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0),t=new Date(this.getFullYear(),0,0,0,0,0),n=e-t;return Math.floor(n/24*60*60*1e3)}},l=function(t){var n=e(t).data("datepicker"),r=e("#"+n.id);if(!n.extraHeight){var i=e(t).find("div");n.extraHeight=i.get(0).offsetHeight+i.get(1).offsetHeight,n.extraWidth=i.get(2).offsetWidth+i.get(3).offsetWidth}var s=r.find("table:first").get(0),o=s.offsetWidth,u=s.offsetHeight;r.css({width:o+n.extraWidth+"px",height:u+n.extraHeight+"px"}).find("div.datepickerContainer").css({width:o+"px",height:u+"px"})},c=function(t){e(t.target).is("span")&&(t.target=t.target.parentNode);var n=e(t.target);if(n.is("a")){t.target.blur();if(n.hasClass("datepickerDisabled"))return!1;var r=e(this).data("datepicker"),i=n.parent(),s=i.parent().parent().parent(),u=e("table",this).index(s.get(0))-1,f=new Date(r.current),l=!1,c=!1;if(i.is("th")){if(i.hasClass("datepickerWeek")&&r.mode=="range"&&!i.next().hasClass("datepickerDisabled")){var p=parseInt(i.next().text(),10);f.addMonths(u-Math.floor(r.calendars/2)),i.next().hasClass("datepickerNotInMonth")&&f.addMonths(p>15?-1:1),f.setDate(p),r.date[0]=f.setHours(0,0,0,0).valueOf(),f.setHours(23,59,59,0),f.addDays(6),r.date[1]=f.valueOf(),c=!0,l=!0,r.lastSel=!1}else if(i.hasClass("datepickerMonth")){if(r.month_link_inactive)return!1;f.addMonths(u-Math.floor(r.calendars/2));switch(s.get(0).className){case"datepickerViewDays":s.get(0).className="datepickerViewMonths",n.find("span").text(f.getFullYear());break;case"datepickerViewMonths":s.get(0).className="datepickerViewYears",n.find("span").text(f.getFullYear()-6+" - "+(f.getFullYear()+5));break;case"datepickerViewYears":s.get(0).className="datepickerViewDays",n.find("span").text(a(f,"B, Y"))}}else if(i.parent().parent().is("thead")){switch(s.get(0).className){case"datepickerViewDays":r.current.addMonths(i.hasClass("datepickerGoPrev")?-1:1);break;case"datepickerViewMonths":r.current.addYears(i.hasClass("datepickerGoPrev")?-1:1);break;case"datepickerViewYears":r.current.addYears(i.hasClass("datepickerGoPrev")?-12:12)}c=!0}}else if(i.is("td")&&!i.hasClass("datepickerDisabled")){switch(s.get(0).className){case"datepickerViewMonths":r.current.setMonth(s.find("tbody.datepickerMonths td").index(i)),r.current.setFullYear(parseInt(s.find("thead th.datepickerMonth span").text(),10)),r.current.addMonths(Math.floor(r.calendars/2)-u),s.get(0).className="datepickerViewDays";break;case"datepickerViewYears":r.current.setFullYear(parseInt(n.text(),10)),s.get(0).className="datepickerViewMonths";break;default:var p=parseInt(n.text(),10);f.addMonths(u-Math.floor(r.calendars/2)),i.hasClass("datepickerNotInMonth")&&f.addMonths(p>15?-1:1),f.setDate(p);switch(r.mode){case"multiple":p=f.setHours(0,0,0,0).valueOf(),e.inArray(p,r.date)>-1?e.each(r.date,function(e,t){if(t==p)return r.date.splice(e,1),!1}):r.date.push(p);break;case"range":r.lastSel||(r.date[0]=f.setHours(0,0,0,0).valueOf()),p=f.setHours(23,59,59,0).valueOf(),p<r.date[0]?(r.date[1]=r.date[0]+86399e3,r.date[0]=p-86399e3):r.date[1]=p,r.lastSel=!r.lastSel;break;default:r.date=f.valueOf()}}c=!0,l=!0}c&&o(this),l&&r.onChange.apply(this,h(r))}return!1},h=function(t){var n;return t.mode=="single"?(n=new Date(t.date),[a(n,t.format),n,t.el]):(n=[[],[],t.el],e.each(t.date,function(e,r){var i=new Date(r);n[0].push(a(i,t.format)),n[1].push(i)}),n)},p=function(){var e=document.compatMode=="CSS1Compat";return{l:window.pageXOffset||(e?document.documentElement.scrollLeft:document.body.scrollLeft),t:window.pageYOffset||(e?document.documentElement.scrollTop:document.body.scrollTop),w:window.innerWidth||(e?document.documentElement.clientWidth:document.body.clientWidth),h:window.innerHeight||(e?document.documentElement.clientHeight:document.body.clientHeight)}},d=function(e,t,n){if(e==t)return!0;if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return!!(e.compareDocumentPosition(t)&16);var r=t.parentNode;while(r&&r!=n){if(r==e)return!0;r=r.parentNode}return!1},v=function(t){var n=e("#"+e(this).data("datepickerId"));if(!n.is(":visible")){var r=n.get(0);o(r);var i=n.data("datepicker");i.onBeforeShow.apply(this,[n.get(0)]);var s=e(this).offset(),u=p(),a=s.top,f=s.left,c=e.curCSS(r,"display");n.css({visibility:"hidden",display:"block"}),l(r);switch(i.position){case"top":a-=r.offsetHeight;break;case"left":f-=r.offsetWidth;break;case"right":f+=this.offsetWidth;break;case"bottom":a+=this.offsetHeight}a+r.offsetHeight>u.t+u.h&&(a=s.top-r.offsetHeight),a<u.t&&(a=s.top+this.offsetHeight+r.offsetHeight),f+r.offsetWidth>u.l+u.w&&(f=s.left-r.offsetWidth),f<u.l&&(f=s.left+this.offsetWidth),n.css({visibility:"visible",display:"block",top:a+"px",left:f+"px"}),i.onShow.apply(this,[n.get(0)])!=0&&n.show(),e(document).bind("mousedown",{cal:n,trigger:this},m)}return!1},m=function(t){t.target!=t.data.trigger&&!d(t.data.cal.get(0),t.target,t.data.cal.get(0))&&(t.data.cal.data("datepicker").onHide.apply(this,[t.data.cal.get(0)])!=0&&t.data.cal.hide(),e(document).unbind("mousedown",m))};return{init:function(t){return t=e.extend(!0,{},s,t||{}),f(t.locale),t.calendars=Math.max(1,parseInt(t.calendars,10)||1),t.mode=/single|multiple|range/.test(t.mode)?t.mode:"single",this.each(function(){if(!e(this).data("datepicker")){t.el=this,t.date.constructor==String&&(t.date=u(t.date,t.format),t.date.setHours(0,0,0,0));if(t.mode!="single")if(t.date.constructor!=Array)t.date=[t.date.valueOf()],t.mode=="range"&&t.date.push((new Date(t.date[0])).setHours(23,59,59,0).valueOf());else{for(var s=0;s<t.date.length;s++)t.date[s]=u(t.date[s],t.format).setHours(0,0,0,0).valueOf();t.mode=="range"&&(t.date[1]=(new Date(t.date[1])).setHours(23,59,59,0).valueOf())}else t.date=t.date.valueOf();t.current?t.current=u(t.current,t.format):t.current=new Date,t.current.setDate(1),t.current.setHours(0,0,0,0);var a="datepicker_"+parseInt(Math.random()*1e3),f;t.id=a,e(this).data("datepickerId",t.id);var h=e(i.wrapper).attr("id",a).bind("click",c).data("datepicker",t);t.className&&h.addClass(t.className);var p="";for(var s=0;s<t.calendars;s++)f=t.starts,s>0&&(p+=i.space),p+=r(i.head.join(""),{week:t.locale.weekMin,prev:t.prev,next:t.next,day1:t.locale.daysMin[f++%7],day2:t.locale.daysMin[f++%7],day3:t.locale.daysMin[f++%7],day4:t.locale.daysMin[f++%7],day5:t.locale.daysMin[f++%7],day6:t.locale.daysMin[f++%7],day7:t.locale.daysMin[f++%7]});h.find("tr:first").append(p).find("table").addClass(n[t.view]),o(h.get(0)),t.flat?(h.appendTo(this).show().css("position","relative"),l(h.get(0))):(h.appendTo(document.body),e(this).bind(t.eventName,v))}})},showPicker:function(){return this.each(function(){e(this).data("datepickerId")&&v.apply(this)})},hidePicker:function(){return this.each(function(){e(this).data("datepickerId")&&e("#"+e(this).data("datepickerId")).hide()})},setDate:function(t,n){return this.each(function(){if(e(this).data("datepickerId")){var r=e("#"+e(this).data("datepickerId")),i=r.data("datepicker");i.date=t,i.date.constructor==String&&(i.date=u(i.date,i.format),i.date.setHours(0,0,0,0));if(i.mode!="single")if(i.date.constructor!=Array)i.date=[i.date.valueOf()],i.mode=="range"&&i.date.push((new Date(i.date[0])).setHours(23,59,59,0).valueOf());else{for(var s=0;s<i.date.length;s++)i.date[s]=u(i.date[s],i.format).setHours(0,0,0,0).valueOf();i.mode=="range"&&(i.date[1]=(new Date(i.date[1])).setHours(23,59,59,0).valueOf())}else i.date=i.date.valueOf();n&&(i.current=new Date(i.mode!="single"?i.date[0]:i.date)),o(r.get(0))}})},getDate:function(t){if(this.size()>0)return h(e("#"+e(this).data("datepickerId")).data("datepicker"))[t?0:1]},clear:function(){return this.each(function(){if(e(this).data("datepickerId")){var t=e("#"+e(this).data("datepickerId")),n=t.data("datepicker");n.mode!="single"&&(n.date=[],o(t.get(0)))}})},fixLayout:function(){return this.each(function(){if(e(this).data("datepickerId")){var t=e("#"+e(this).data("datepickerId")),n=t.data("datepicker");n.flat&&l(t.get(0))}})}}}();e.fn.extend({DatePicker:t.init,DatePickerHide:t.hidePicker,DatePickerShow:t.showPicker,DatePickerSetDate:t.setDate,DatePickerGetDate:t.getDate,DatePickerClear:t.clear,DatePickerLayout:t.fixLayout});var n={},r=function(e,t){var i=/\W/.test(e)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+e.replace(/[\r\t\n]/g," ").split("<%").join(" ").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split(" ").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):n[e]=n[e]||r(document.getElementById(e).innerHTML);return t?i(t):i}});
 
public/js/external_libs/moment.js CHANGED
@@ -1,7 +1,3 @@
1
- // moment.js
2
- // version : 1.7.2
3
- // author : Tim Wood
4
  // license : MIT
5
- // momentjs.com
6
 
7
- timely.define([],function(){function A(e,t,n,r){var i=n.lang();return i[e].call?i[e](n,r):i[e][t]}function O(e,t){return function(n){return H(e.call(this,n),t)}}function M(e){return function(t){var n=e.call(this,t);return n+this.lang().ordinal(n)}}function _(e,t,n){this._d=e,this._isUTC=!!t,this._a=e._a||null,this._lang=n||!1}function D(e){var t=this._data={},n=e.years||e.y||0,r=e.months||e.M||0,i=e.weeks||e.w||0,s=e.days||e.d||0,o=e.hours||e.h||0,u=e.minutes||e.m||0,a=e.seconds||e.s||0,f=e.milliseconds||e.ms||0;this._milliseconds=f+a*1e3+u*6e4+o*36e5,this._days=s+i*7,this._months=r+n*12,t.milliseconds=f%1e3,a+=P(f/1e3),t.seconds=a%60,u+=P(a/60),t.minutes=u%60,o+=P(u/60),t.hours=o%24,s+=P(o/24),s+=i*7,t.days=s%30,r+=P(s/30),t.months=r%12,n+=P(r/12),t.years=n,this._lang=!1}function P(e){return e<0?Math.ceil(e):Math.floor(e)}function H(e,t){var n=e+"";while(n.length<t)n="0"+n;return n}function B(e,t,n){var r=t._milliseconds,i=t._days,s=t._months,o;r&&e._d.setTime(+e+r*n),i&&e.date(e.date()+i*n),s&&(o=e.date(),e.date(1).month(e.month()+s*n).date(Math.min(o,e.daysInMonth())))}function j(e){return Object.prototype.toString.call(e)==="[object Array]"}function F(e,t){var n=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),i=0,s;for(s=0;s<n;s++)~~e[s]!==~~t[s]&&i++;return i+r}function I(e,t,n,r){var i,s,o=[];for(i=0;i<7;i++)o[i]=e[i]=e[i]==null?i===2?1:0:e[i];return e[7]=o[7]=t,e[8]!=null&&(o[8]=e[8]),e[3]+=n||0,e[4]+=r||0,s=new Date(0),t?(s.setUTCFullYear(e[0],e[1],e[2]),s.setUTCHours(e[3],e[4],e[5],e[6])):(s.setFullYear(e[0],e[1],e[2]),s.setHours(e[3],e[4],e[5],e[6])),s._a=o,s}function q(t,n){var r,s,a=[];!n&&o&&(n=require("./lang/"+t));for(r=0;r<u.length;r++)n[u[r]]=n[u[r]]||i.en[u[r]];for(r=0;r<12;r++)s=e([2e3,r]),a[r]=new RegExp("^"+(n.months[r]||n.months(s,""))+"|^"+(n.monthsShort[r]||n.monthsShort(s,"")).replace(".",""),"i");return n.monthsParse=n.monthsParse||a,i[t]=n,n}function R(t){var n=typeof t=="string"&&t||t&&t._lang||null;return n?i[n]||q(n):e}function U(e){return e.match(/\[.*\]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function z(e){var t=e.match(f),n,r;for(n=0,r=t.length;n<r;n++)L[t[n]]?t[n]=L[t[n]]:t[n]=U(t[n]);return function(i){var s="";for(n=0;n<r;n++)s+=typeof t[n].call=="function"?t[n].call(i,e):t[n];return s}}function W(e,t){function r(t){return e.lang().longDateFormat[t]||t}var n=5;while(n--&&l.test(t))t=t.replace(l,r);return N[t]||(N[t]=z(t)),N[t](e)}function X(e){switch(e){case"DDDD":return d;case"YYYY":return v;case"S":case"SS":case"SSS":case"DDD":return p;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":case"a":case"A":return m;case"Z":case"ZZ":return g;case"T":return y;case"MM":case"DD":case"YY":case"HH":case"hh":case"mm":case"ss":case"M":case"D":case"d":case"H":case"h":case"m":case"s":return h;default:return new RegExp(e.replace("\\",""))}}function V(e,t,n,r){var i,s;switch(e){case"M":case"MM":n[1]=t==null?0:~~t-1;break;case"MMM":case"MMMM":for(i=0;i<12;i++)if(R().monthsParse[i].test(t)){n[1]=i,s=!0;break}s||(n[8]=!1);break;case"D":case"DD":case"DDD":case"DDDD":t!=null&&(n[2]=~~t);break;case"YY":n[0]=~~t+(~~t>70?1900:2e3);break;case"YYYY":n[0]=~~Math.abs(t);break;case"a":case"A":r.isPm=(t+"").toLowerCase()==="pm";break;case"H":case"HH":case"h":case"hh":n[3]=~~t;break;case"m":case"mm":n[4]=~~t;break;case"s":case"ss":n[5]=~~t;break;case"S":case"SS":case"SSS":n[6]=~~(("0."+t)*1e3);break;case"Z":case"ZZ":r.isUTC=!0,i=(t+"").match(S),i&&i[1]&&(r.tzh=~~i[1]),i&&i[2]&&(r.tzm=~~i[2]),i&&i[0]==="+"&&(r.tzh=-r.tzh,r.tzm=-r.tzm)}t==null&&(n[8]=!1)}function $(e,t){var n=[0,0,1,0,0,0,0],r={tzh:0,tzm:0},i=t.match(f),s,o;for(s=0;s<i.length;s++)o=(X(i[s]).exec(e)||[])[0],o&&(e=e.slice(e.indexOf(o)+o.length)),L[i[s]]&&V(i[s],o,n,r);return r.isPm&&n[3]<12&&(n[3]+=12),r.isPm===!1&&n[3]===12&&(n[3]=0),I(n,r.isUTC,r.tzh,r.tzm)}function J(e,t){var n,r=e.match(c)||[],i,s=99,o,u,a;for(o=0;o<t.length;o++)u=$(e,t[o]),i=W(new _(u),t[o]).match(c)||[],a=F(r,i),a<s&&(s=a,n=u);return n}function K(e){var t="YYYY-MM-DDT",n;if(b.exec(e)){for(n=0;n<4;n++)if(E[n][1].exec(e)){t+=E[n][0];break}return g.exec(e)?$(e,t+" Z"):$(e,t)}return new Date(e)}function Q(e,t,n,r,i){var s=i.relativeTime[e];return typeof s=="function"?s(t||1,!!n,e,r):s.replace(/%d/i,t||1)}function G(e,t,r){var i=n(Math.abs(e)/1e3),s=n(i/60),o=n(s/60),u=n(o/24),a=n(u/365),f=i<45&&["s",i]||s===1&&["m"]||s<45&&["mm",s]||o===1&&["h"]||o<22&&["hh",o]||u===1&&["d"]||u<=25&&["dd",u]||u<=45&&["M"]||u<345&&["MM",n(u/30)]||a===1&&["y"]||["yy",a];return f[2]=t,f[3]=e>0,f[4]=r,Q.apply({},f)}function Y(t,n){e.fn[t]=function(e){var t=this._isUTC?"UTC":"";return e!=null?(this._d["set"+t+n](e),this):this._d["get"+t+n]()}}function Z(t){e.duration.fn[t]=function(){return this._data[t]}}function et(t,n){e.duration.fn["as"+t]=function(){return+this/n}}var e,t="1.7.2",n=Math.round,r,i={},s="en",o=typeof module!="undefined"&&module.exports,u="months|monthsShort|weekdays|weekdaysShort|weekdaysMin|longDateFormat|calendar|relativeTime|ordinal|meridiem".split("|"),a=/^\/?Date\((\-?\d+)/i,f=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|SS?S?|zz?|ZZ?|.)/g,l=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?)/g,c=/([0-9a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)/gi,h=/\d\d?/,p=/\d{1,3}/,d=/\d{3}/,v=/\d{1,4}/,m=/[0-9a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+/i,g=/Z|[\+\-]\d\d:?\d\d/i,y=/T/i,b=/^\s*\d{4}-\d\d-\d\d(T(\d\d(:\d\d(:\d\d(\.\d\d?\d?)?)?)?)?([\+\-]\d\d:?\d\d)?)?/,w="YYYY-MM-DDTHH:mm:ssZ",E=[["HH:mm:ss.S",/T\d\d:\d\d:\d\d\.\d{1,3}/],["HH:mm:ss",/T\d\d:\d\d:\d\d/],["HH:mm",/T\d\d:\d\d/],["HH",/T\d\d/]],S=/([\+\-]|\d\d)/gi,x="Month|Date|Hours|Minutes|Seconds|Milliseconds".split("|"),T={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6},N={},C="DDD w M D d".split(" "),k="M D H h m s w".split(" "),L={M:function(){return this.month()+1},MMM:function(e){return A("monthsShort",this.month(),this,e)},MMMM:function(e){return A("months",this.month(),this,e)},D:function(){return this.date()},DDD:function(){var e=new Date(this.year(),this.month(),this.date()),t=new Date(this.year(),0,1);return~~((e-t)/864e5+1.5)},d:function(){return this.day()},dd:function(e){return A("weekdaysMin",this.day(),this,e)},ddd:function(e){return A("weekdaysShort",this.day(),this,e)},dddd:function(e){return A("weekdays",this.day(),this,e)},w:function(){var e=new Date(this.year(),this.month(),this.date()-this.day()+5),t=new Date(e.getFullYear(),0,4);return~~((e-t)/864e5/7+1.5)},YY:function(){return H(this.year()%100,2)},YYYY:function(){return H(this.year(),4)},a:function(){return this.lang().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.lang().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return~~(this.milliseconds()/100)},SS:function(){return H(~~(this.milliseconds()/10),2)},SSS:function(){return H(this.milliseconds(),3)},Z:function(){var e=-this.zone(),t="+";return e<0&&(e=-e,t="-"),t+H(~~(e/60),2)+":"+H(~~e%60,2)},ZZ:function(){var e=-this.zone(),t="+";return e<0&&(e=-e,t="-"),t+H(~~(10*e/6),4)}};while(C.length)r=C.pop(),L[r+"o"]=M(L[r]);while(k.length)r=k.pop(),L[r+r]=O(L[r],2);L.DDDD=O(L.DDD,3),e=function(t,n){if(t===null||t==="")return null;var r,i;return e.isMoment(t)?new _(new Date(+t._d),t._isUTC,t._lang):(n?j(n)?r=J(t,n):r=$(t,n):(i=a.exec(t),r=t===undefined?new Date:i?new Date(+i[1]):t instanceof Date?t:j(t)?I(t):typeof t=="string"?K(t):new Date(t)),new _(r))},e.utc=function(t,n){return j(t)?new _(I(t,!0),!0):(typeof t=="string"&&!g.exec(t)&&(t+=" +0000",n&&(n+=" Z")),e(t,n).utc())},e.unix=function(t){return e(t*1e3)},e.duration=function(t,n){var r=e.isDuration(t),i=typeof t=="number",s=r?t._data:i?{}:t,o;return i&&(n?s[n]=t:s.milliseconds=t),o=new D(s),r&&(o._lang=t._lang),o},e.humanizeDuration=function(t,n,r){return e.duration(t,n===!0?null:n).humanize(n===!0?!0:r)},e.version=t,e.defaultFormat=w,e.lang=function(t,n){var r;if(!t)return s;(n||!i[t])&&q(t,n);if(i[t]){for(r=0;r<u.length;r++)e[u[r]]=i[t][u[r]];e.monthsParse=i[t].monthsParse,s=t}},e.langData=R,e.isMoment=function(e){return e instanceof _},e.isDuration=function(e){return e instanceof D},e.lang("en",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY LT",LLLL:"dddd, MMMM D YYYY LT"},meridiem:function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(e){var t=e%10;return~~(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th"}}),e.fn=_.prototype={clone:function(){return e(this)},valueOf:function(){return+this._d},unix:function(){return Math.floor(+this._d/1e3)},toString:function(){return this._d.toString()},toDate:function(){return this._d},toArray:function(){var e=this;return[e.year(),e.month(),e.date(),e.hours(),e.minutes(),e.seconds(),e.milliseconds(),!!this._isUTC]},isValid:function(){return this._a?this._a[8]!=null?!!this._a[8]:!F(this._a,(this._a[7]?e.utc(this._a):e(this._a)).toArray()):!isNaN(this._d.getTime())},utc:function(){return this._isUTC=!0,this},local:function(){return this._isUTC=!1,this},format:function(t){return W(this,t?t:e.defaultFormat)},add:function(t,n){var r=n?e.duration(+n,t):e.duration(t);return B(this,r,1),this},subtract:function(t,n){var r=n?e.duration(+n,t):e.duration(t);return B(this,r,-1),this},diff:function(t,r,i){var s=this._isUTC?e(t).utc():e(t).local(),o=(this.zone()-s.zone())*6e4,u=this._d-s._d-o,a=this.year()-s.year(),f=this.month()-s.month(),l=this.date()-s.date(),c;return r==="months"?c=a*12+f+l/30:r==="years"?c=a+(f+l/30)/12:c=r==="seconds"?u/1e3:r==="minutes"?u/6e4:r==="hours"?u/36e5:r==="days"?u/864e5:r==="weeks"?u/6048e5:u,i?c:n(c)},from:function(t,n){return e.duration(this.diff(t)).lang(this._lang).humanize(!n)},fromNow:function(t){return this.from(e(),t)},calendar:function(){var t=this.diff(e().sod(),"days",!0),n=this.lang().calendar,r=n.sameElse,i=t<-6?r:t<-1?n.lastWeek:t<0?n.lastDay:t<1?n.sameDay:t<2?n.nextDay:t<7?n.nextWeek:r;return this.format(typeof i=="function"?i.apply(this):i)},isLeapYear:function(){var e=this.year();return e%4===0&&e%100!==0||e%400===0},isDST:function(){return this.zone()<e([this.year()]).zone()||this.zone()<e([this.year(),5]).zone()},day:function(e){var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e==null?t:this.add({d:e-t})},startOf:function(e){switch(e.replace(/s$/,"")){case"year":this.month(0);case"month":this.date(1);case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return this},endOf:function(e){return this.startOf(e).add(e.replace(/s?$/,"s"),1).subtract("ms",1)},sod:function(){return this.clone().startOf("day")},eod:function(){return this.clone().endOf("day")},zone:function(){return this._isUTC?0:this._d.getTimezoneOffset()},daysInMonth:function(){return e.utc([this.year(),this.month()+1,0]).date()},lang:function(e){return e===undefined?R(this):(this._lang=e,this)}};for(r=0;r<x.length;r++)Y(x[r].toLowerCase(),x[r]);Y("year","FullYear"),e.duration.fn=D.prototype={weeks:function(){return P(this.days()/7)},valueOf:function(){return this._milliseconds+this._days*864e5+this._months*2592e6},humanize:function(e){var t=+this,n=this.lang().relativeTime,r=G(t,!e,this.lang()),i=t<=0?n.past:n.future;return e&&(typeof i=="function"?r=i(r):r=i.replace(/%s/i,r)),r},lang:e.fn.lang};for(r in T)T.hasOwnProperty(r)&&(et(r,T[r]),Z(r.toLowerCase()));return et("Weeks",6048e5),e});
 
 
 
1
  // license : MIT
 
2
 
3
+ timely.define([],function(){function A(e,t,n,r){var i=n.lang();return i[e].call?i[e](n,r):i[e][t]}function O(e,t){return function(n){return H(e.call(this,n),t)}}function M(e){return function(t){var n=e.call(this,t);return n+this.lang().ordinal(n)}}function _(e,t,n){this._d=e,this._isUTC=!!t,this._a=e._a||null,this._lang=n||!1}function D(e){var t=this._data={},n=e.years||e.y||0,r=e.months||e.M||0,i=e.weeks||e.w||0,s=e.days||e.d||0,o=e.hours||e.h||0,u=e.minutes||e.m||0,a=e.seconds||e.s||0,f=e.milliseconds||e.ms||0;this._milliseconds=f+a*1e3+u*6e4+o*36e5,this._days=s+i*7,this._months=r+n*12,t.milliseconds=f%1e3,a+=P(f/1e3),t.seconds=a%60,u+=P(a/60),t.minutes=u%60,o+=P(u/60),t.hours=o%24,s+=P(o/24),s+=i*7,t.days=s%30,r+=P(s/30),t.months=r%12,n+=P(r/12),t.years=n,this._lang=!1}function P(e){return e<0?Math.ceil(e):Math.floor(e)}function H(e,t){var n=e+"";while(n.length<t)n="0"+n;return n}function B(e,t,n){var r=t._milliseconds,i=t._days,s=t._months,o;r&&e._d.setTime(+e+r*n),i&&e.date(e.date()+i*n),s&&(o=e.date(),e.date(1).month(e.month()+s*n).date(Math.min(o,e.daysInMonth())))}function j(e){return Object.prototype.toString.call(e)==="[object Array]"}function F(e,t){var n=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),i=0,s;for(s=0;s<n;s++)~~e[s]!==~~t[s]&&i++;return i+r}function I(e,t,n,r){var i,s,o=[];for(i=0;i<7;i++)o[i]=e[i]=e[i]==null?i===2?1:0:e[i];return e[7]=o[7]=t,e[8]!=null&&(o[8]=e[8]),e[3]+=n||0,e[4]+=r||0,s=new Date(0),t?(s.setYear(e[0]),s.setUTCMonth(e[1]),s.setUTCDate(e[2]),s.setUTCHours(e[3],e[4],e[5],e[6])):(s.setYear(e[0]),s.setMonth(e[1]),s.setDate(e[2]),s.setHours(e[3],e[4],e[5],e[6])),s._a=o,s}function q(t,n){var r,s,a=[];!n&&o&&(n=require("./lang/"+t));for(r=0;r<u.length;r++)n[u[r]]=n[u[r]]||i.en[u[r]];for(r=0;r<12;r++)s=e([2e3,r]),a[r]=new RegExp("^"+(n.months[r]||n.months(s,""))+"|^"+(n.monthsShort[r]||n.monthsShort(s,"")).replace(".",""),"i");return n.monthsParse=n.monthsParse||a,i[t]=n,n}function R(t){var n=typeof t=="string"&&t||t&&t._lang||null;return n?i[n]||q(n):e}function U(e){return e.match(/\[.*\]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function z(e){var t=e.match(f),n,r;for(n=0,r=t.length;n<r;n++)L[t[n]]?t[n]=L[t[n]]:t[n]=U(t[n]);return function(i){var s="";for(n=0;n<r;n++)s+=typeof t[n].call=="function"?t[n].call(i,e):t[n];return s}}function W(e,t){function r(t){return e.lang().longDateFormat[t]||t}var n=5;while(n--&&l.test(t))t=t.replace(l,r);return N[t]||(N[t]=z(t)),N[t](e)}function X(e){switch(e){case"DDDD":return d;case"YYYY":return v;case"S":case"SS":case"SSS":case"DDD":return p;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":case"a":case"A":return m;case"Z":case"ZZ":return g;case"T":return y;case"MM":case"DD":case"YY":case"HH":case"hh":case"mm":case"ss":case"M":case"D":case"d":case"H":case"h":case"m":case"s":return h;default:return new RegExp(e.replace("\\",""))}}function V(e,t,n,r){var i,s;switch(e){case"M":case"MM":n[1]=t==null?0:~~t-1;break;case"MMM":case"MMMM":for(i=0;i<12;i++)if(R().monthsParse[i].test(t)){n[1]=i,s=!0;break}s||(n[8]=!1);break;case"D":case"DD":case"DDD":case"DDDD":t!=null&&(n[2]=~~t);break;case"YY":n[0]=~~t+(~~t>70?1900:2e3);break;case"YYYY":n[0]=~~Math.abs(t);break;case"a":case"A":r.isPm=(t+"").toLowerCase()==="pm";break;case"H":case"HH":case"h":case"hh":n[3]=~~t;break;case"m":case"mm":n[4]=~~t;break;case"s":case"ss":n[5]=~~t;break;case"S":case"SS":case"SSS":n[6]=~~(("0."+t)*1e3);break;case"Z":case"ZZ":r.isUTC=!0,i=(t+"").match(S),i&&i[1]&&(r.tzh=~~i[1]),i&&i[2]&&(r.tzm=~~i[2]),i&&i[0]==="+"&&(r.tzh=-r.tzh,r.tzm=-r.tzm)}t==null&&(n[8]=!1)}function $(e,t){var n=[0,0,1,0,0,0,0],r={tzh:0,tzm:0},i=t.match(f),s,o;for(s=0;s<i.length;s++)o=(X(i[s]).exec(e)||[])[0],o&&(e=e.slice(e.indexOf(o)+o.length)),L[i[s]]&&V(i[s],o,n,r);return r.isPm&&n[3]<12&&(n[3]+=12),r.isPm===!1&&n[3]===12&&(n[3]=0),I(n,r.isUTC,r.tzh,r.tzm)}function J(e,t){var n,r=e.match(c)||[],i,s=99,o,u,a;for(o=0;o<t.length;o++)u=$(e,t[o]),i=W(new _(u),t[o]).match(c)||[],a=F(r,i),a<s&&(s=a,n=u);return n}function K(e){var t="YYYY-MM-DDT",n;if(b.exec(e)){for(n=0;n<4;n++)if(E[n][1].exec(e)){t+=E[n][0];break}return g.exec(e)?$(e,t+" Z"):$(e,t)}return new Date(e)}function Q(e,t,n,r,i){var s=i.relativeTime[e];return typeof s=="function"?s(t||1,!!n,e,r):s.replace(/%d/i,t||1)}function G(e,t,r){var i=n(Math.abs(e)/1e3),s=n(i/60),o=n(s/60),u=n(o/24),a=n(u/365),f=i<45&&["s",i]||s===1&&["m"]||s<45&&["mm",s]||o===1&&["h"]||o<22&&["hh",o]||u===1&&["d"]||u<=25&&["dd",u]||u<=45&&["M"]||u<345&&["MM",n(u/30)]||a===1&&["y"]||["yy",a];return f[2]=t,f[3]=e>0,f[4]=r,Q.apply({},f)}function Y(t,n){e.fn[t]=function(e){var t=this._isUTC?"UTC":"";return e!=null?(this._d["set"+t+n](e),this):this._d["get"+t+n]()}}function Z(t){e.duration.fn[t]=function(){return this._data[t]}}function et(t,n){e.duration.fn["as"+t]=function(){return+this/n}}var e,t="1.7.2",n=Math.round,r,i={},s="en",o=typeof module!="undefined"&&module.exports,u="months|monthsShort|weekdays|weekdaysShort|weekdaysMin|longDateFormat|calendar|relativeTime|ordinal|meridiem".split("|"),a=/^\/?Date\((\-?\d+)/i,f=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|SS?S?|zz?|ZZ?|.)/g,l=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?)/g,c=/([0-9a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)/gi,h=/\d\d?/,p=/\d{1,3}/,d=/\d{3}/,v=/\d{1,4}/,m=/[0-9a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+/i,g=/Z|[\+\-]\d\d:?\d\d/i,y=/T/i,b=/^\s*\d{4}-\d\d-\d\d(T(\d\d(:\d\d(:\d\d(\.\d\d?\d?)?)?)?)?([\+\-]\d\d:?\d\d)?)?/,w="YYYY-MM-DDTHH:mm:ssZ",E=[["HH:mm:ss.S",/T\d\d:\d\d:\d\d\.\d{1,3}/],["HH:mm:ss",/T\d\d:\d\d:\d\d/],["HH:mm",/T\d\d:\d\d/],["HH",/T\d\d/]],S=/([\+\-]|\d\d)/gi,x="Month|Date|Hours|Minutes|Seconds|Milliseconds".split("|"),T={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6},N={},C="DDD w M D d".split(" "),k="M D H h m s w".split(" "),L={M:function(){return this.month()+1},MMM:function(e){return A("monthsShort",this.month(),this,e)},MMMM:function(e){return A("months",this.month(),this,e)},D:function(){return this.date()},DDD:function(){var e=new Date(this.year(),this.month(),this.date()),t=new Date(this.year(),0,1);return~~((e-t)/864e5+1.5)},d:function(){return this.day()},dd:function(e){return A("weekdaysMin",this.day(),this,e)},ddd:function(e){return A("weekdaysShort",this.day(),this,e)},dddd:function(e){return A("weekdays",this.day(),this,e)},w:function(){var e=new Date(this.year(),this.month(),this.date()-this.day()+5),t=new Date(e.getFullYear(),0,4);return~~((e-t)/864e5/7+1.5)},YY:function(){return H(this.year()%100,2)},YYYY:function(){return H(this.year(),4)},a:function(){return this.lang().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.lang().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return~~(this.milliseconds()/100)},SS:function(){return H(~~(this.milliseconds()/10),2)},SSS:function(){return H(this.milliseconds(),3)},Z:function(){var e=-this.zone(),t="+";return e<0&&(e=-e,t="-"),t+H(~~(e/60),2)+":"+H(~~e%60,2)},ZZ:function(){var e=-this.zone(),t="+";return e<0&&(e=-e,t="-"),t+H(~~(10*e/6),4)}};while(C.length)r=C.pop(),L[r+"o"]=M(L[r]);while(k.length)r=k.pop(),L[r+r]=O(L[r],2);L.DDDD=O(L.DDD,3),e=function(t,n){if(t===null||t==="")return null;var r,i;return e.isMoment(t)?new _(new Date(+t._d),t._isUTC,t._lang):(n?j(n)?r=J(t,n):r=$(t,n):(i=a.exec(t),r=t===undefined?new Date:i?new Date(+i[1]):t instanceof Date?t:j(t)?I(t):typeof t=="string"?K(t):new Date(t)),new _(r))},e.utc=function(t,n){return j(t)?new _(I(t,!0),!0):(typeof t=="string"&&!g.exec(t)&&(t+=" +0000",n&&(n+=" Z")),e(t,n).utc())},e.unix=function(t){return e(t*1e3)},e.duration=function(t,n){var r=e.isDuration(t),i=typeof t=="number",s=r?t._data:i?{}:t,o;return i&&(n?s[n]=t:s.milliseconds=t),o=new D(s),r&&(o._lang=t._lang),o},e.humanizeDuration=function(t,n,r){return e.duration(t,n===!0?null:n).humanize(n===!0?!0:r)},e.version=t,e.defaultFormat=w,e.lang=function(t,n){var r;if(!t)return s;(n||!i[t])&&q(t,n);if(i[t]){for(r=0;r<u.length;r++)e[u[r]]=i[t][u[r]];e.monthsParse=i[t].monthsParse,s=t}},e.langData=R,e.isMoment=function(e){return e instanceof _},e.isDuration=function(e){return e instanceof D},e.lang("en",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY LT",LLLL:"dddd, MMMM D YYYY LT"},meridiem:function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(e){var t=e%10;return~~(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th"}}),e.fn=_.prototype={clone:function(){return e(this)},valueOf:function(){return+this._d},unix:function(){return Math.floor(+this._d/1e3)},toString:function(){return this._d.toString()},toDate:function(){return this._d},toArray:function(){var e=this;return[e.year(),e.month(),e.date(),e.hours(),e.minutes(),e.seconds(),e.milliseconds(),!!this._isUTC]},isValid:function(){return this._a?this._a[8]!=null?!!this._a[8]:!F(this._a,(this._a[7]?e.utc(this._a):e(this._a)).toArray()):!isNaN(this._d.getTime())},utc:function(){return this._isUTC=!0,this},local:function(){return this._isUTC=!1,this},format:function(t){return W(this,t?t:e.defaultFormat)},add:function(t,n){var r=n?e.duration(+n,t):e.duration(t);return B(this,r,1),this},subtract:function(t,n){var r=n?e.duration(+n,t):e.duration(t);return B(this,r,-1),this},diff:function(t,r,i){var s=this._isUTC?e(t).utc():e(t).local(),o=(this.zone()-s.zone())*6e4,u=this._d-s._d-o,a=this.year()-s.year(),f=this.month()-s.month(),l=this.date()-s.date(),c;return r==="months"?c=a*12+f+l/30:r==="years"?c=a+(f+l/30)/12:c=r==="seconds"?u/1e3:r==="minutes"?u/6e4:r==="hours"?u/36e5:r==="days"?u/864e5:r==="weeks"?u/6048e5:u,i?c:n(c)},from:function(t,n){return e.duration(this.diff(t)).lang(this._lang).humanize(!n)},fromNow:function(t){return this.from(e(),t)},calendar:function(){var t=this.diff(e().sod(),"days",!0),n=this.lang().calendar,r=n.sameElse,i=t<-6?r:t<-1?n.lastWeek:t<0?n.lastDay:t<1?n.sameDay:t<2?n.nextDay:t<7?n.nextWeek:r;return this.format(typeof i=="function"?i.apply(this):i)},isLeapYear:function(){var e=this.year();return e%4===0&&e%100!==0||e%400===0},isDST:function(){return this.zone()<e([this.year()]).zone()||this.zone()<e([this.year(),5]).zone()},day:function(e){var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e==null?t:this.add({d:e-t})},startOf:function(e){switch(e.replace(/s$/,"")){case"year":this.month(0);case"month":this.date(1);case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return this},endOf:function(e){return this.startOf(e).add(e.replace(/s?$/,"s"),1).subtract("ms",1)},sod:function(){return this.clone().startOf("day")},eod:function(){return this.clone().endOf("day")},zone:function(){return this._isUTC?0:this._d.getTimezoneOffset()},daysInMonth:function(){return e.utc([this.year(),this.month()+1,0]).date()},lang:function(e){return e===undefined?R(this):(this._lang=e,this)}};for(r=0;r<x.length;r++)Y(x[r].toLowerCase(),x[r]);Y("year","FullYear"),e.duration.fn=D.prototype={weeks:function(){return P(this.days()/7)},valueOf:function(){return this._milliseconds+this._days*864e5+this._months*2592e6},humanize:function(e){var t=+this,n=this.lang().relativeTime,r=G(t,!e,this.lang()),i=t<=0?n.past:n.future;return e&&(typeof i=="function"?r=i(r):r=i.replace(/%s/i,r)),r},lang:e.fn.lang};for(r in T)T.hasOwnProperty(r)&&(et(r,T[r]),Z(r.toLowerCase()));return et("Weeks",6048e5),e});
public/js/external_libs/twig.js CHANGED
@@ -6,25 +6,13 @@
6
  * @link https://github.com/justjohn/twig.js
7
  */
8
 
9
- // Twig.js
10
  // Copyright (c) 2011-2013 John Roepke
11
- // Available under the BSD 2-Clause License
12
- // https://github.com/justjohn/twig.js
13
 
14
- // The following methods are from MDN and are available under a
15
  // [MIT License](http://www.opensource.org/licenses/mit-license.php) or are
 
16
  // [Public Domain](https://developer.mozilla.org/Project:Copyrights).
17
- //
18
- // See:
19
- // * [Object.keys - MDN](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/keys)
20
 
21
- // ## twig.lib.js
22
- //
23
- // This file contains 3rd party libraries used within twig.
24
- //
25
  // Copies of the licenses for the code included here can be found in the
26
- // LICENSES.md file.
27
- //
28
 
29
  /**
30
  * jPaq - A fully customizable JavaScript/JScript library
@@ -38,10 +26,4 @@
38
  * Revised: April 6, 2011
39
  */
40
 
41
- // Twig.js
42
- // Copyright (c) 2011-2013 John Roepke
43
- // 2012 Hadrien Lanneau
44
- // Available under the BSD 2-Clause License
45
- // https://github.com/justjohn/twig.js
46
-
47
  var Twig=function(e){return e.VERSION="0.7.2",e}(Twig||{}),Twig=function(e){function t(e,t){var n=Object.prototype.toString.call(t).slice(8,-1);return t!==undefined&&t!==null&&n===e}function n(t,n){var r,i,s="/",o=[],u;if(t.url)typeof t.base!="undefined"?r=t.base+(t.base.charAt(t.base.length-1)==="/"?"":"/"):r=t.url;else{if(!t.path)throw new e.Error("Cannot extend an inline template.");var a=require("path"),f=a.sep||s,l=new RegExp("^\\.{1,2}"+f.replace("\\","\\\\"));n=n.replace(/\//g,f),t.base!==undefined&&n.match(l)==null?(n=n.replace(t.base,""),r=t.base+f):r=t.path,r=r.replace(f+f,f),s=f}i=r.split(s),i.pop(),i=i.concat(n.split(s));while(i.length>0)u=i.shift(),u!="."&&(u==".."&&o.length>0&&o[o.length-1]!=".."?o.pop():o.push(u));return o.join(s)}return e.trace=!1,e.debug=!1,e.cache=!0,e.placeholders={parent:"{{|PARENT|}}"},e.indexOf=function(e,t){if(Array.prototype.hasOwnProperty("indexOf"))return e.indexOf(t);if(e===void 0||e===null)throw new TypeError;var n=Object(e),r=n.length>>>0;if(r===0)return-1;var i=0;arguments.length>0&&(i=Number(arguments[1]),i!==i?i=0:i!==0&&i!==Infinity&&i!==-Infinity&&(i=(i>0||-1)*Math.floor(Math.abs(i))));if(i>=r)return-1;var s=i>=0?i:Math.max(r-Math.abs(i),0);for(;s<r;s++)if(s in n&&n[s]===t)return s;return e==t?0:-1},e.forEach=function(e,t,n){if(Array.prototype.forEach)return e.forEach(t,n);var r,i;if(e==null)throw new TypeError(" this is null or not defined");var s=Object(e),o=s.length>>>0;if({}.toString.call(t)!="[object Function]")throw new TypeError(t+" is not a function");n&&(r=n),i=0;while(i<o){var u;i in s&&(u=s[i],t.call(r,u,i,s)),i++}},e.Error=function(e){this.message=e,this.name="TwigException",this.type="TwigException"},e.Error.prototype.toString=function(){var e=this.name+": "+this.message;return e},e.log={trace:function(){e.trace&&console&&console.log(Array.prototype.slice.call(arguments))},debug:function(){e.debug&&console&&console.log(Array.prototype.slice.call(arguments))}},typeof console!="undefined"&&typeof console.log!="undefined"?e.log.error=function(){console.log.apply(console,arguments)}:e.log.error=function(){},e.token={},e.token.type={output:"output",logic:"logic",comment:"comment",raw:"raw"},e.token.definitions=[{type:e.token.type.raw,open:"{% raw %}",close:"{% endraw %}"},{type:e.token.type.output,open:"{{",close:"}}"},{type:e.token.type.logic,open:"{%",close:"%}"},{type:e.token.type.comment,open:"{#",close:"#}"}],e.token.strings=['"',"'"],e.token.findStart=function(t){var n={position:null,def:null},r,i,s;for(r=0;r<e.token.definitions.length;r++)i=e.token.definitions[r],s=t.indexOf(i.open),e.log.trace("Twig.token.findStart: ","Searching for ",i.open," found at ",s),s>=0&&(n.position===null||s<n.position)&&(n.position=s,n.def=i);return n},e.token.findEnd=function(t,n,r){var i=null,s=!1,o=0,u=null,a=null,f=null,l=null,c=null,h=null,p,d;while(!s){u=null,a=null,f=t.indexOf(n.close,o);if(!(f>=0))throw new e.Error("Unable to find closing bracket '"+n.close+"'"+" opened near template position "+r);i=f,s=!0;if(n.type===e.token.type.comment)break;d=e.token.strings.length;for(p=0;p<d;p+=1)c=t.indexOf(e.token.strings[p],o),c>0&&c<f&&(u===null||c<u)&&(u=c,a=e.token.strings[p]);if(u!==null){l=u+1,i=null,s=!1;for(;;){h=t.indexOf(a,l);if(h<0)throw"Unclosed string in template";if(t.substr(h-1,1)!=="\\"){o=h+1;break}l=h+1}}}return i},e.tokenize=function(t){var n=[],r=0,i=null,s=null;while(t.length>0)i=e.token.findStart(t),e.log.trace("Twig.tokenize: ","Found token: ",i),i.position!==null?(i.position>0&&n.push({type:e.token.type.raw,value:t.substring(0,i.position)}),t=t.substr(i.position+i.def.open.length),r+=i.position+i.def.open.length,s=e.token.findEnd(t,i.def,r),e.log.trace("Twig.tokenize: ","Token ends at ",s),n.push({type:i.def.type,value:t.substring(0,s).trim()}),i.def.type==="logic"&&t.substr(s+i.def.close.length,1)==="\n"&&(s+=1),t=t.substr(s+i.def.close.length),r+=s+i.def.close.length):(n.push({type:e.token.type.raw,value:t}),t="");return n},e.compile=function(t){try{var n=[],r=[],i=[],s=null,o=null,u=null,a=null,f=null,l=null,c=null,h=null,p=null;while(t.length>0){s=t.shift(),e.log.trace("Compiling token ",s);switch(s.type){case e.token.type.raw:r.length>0?i.push(s):n.push(s);break;case e.token.type.logic:o=e.logic.compile.apply(this,[s]),c=o.type,h=e.logic.handler[c].open,p=e.logic.handler[c].next,e.log.trace("Twig.compile: ","Compiled logic token to ",o," next is: ",p," open is : ",h);if(h!==undefined&&!h){a=r.pop(),f=e.logic.handler[a.type];if(e.indexOf(f.next,c)<0)throw new Error(c+" not expected after a "+a.type);a.output=a.output||[],a.output=a.output.concat(i),i=[],l={type:e.token.type.logic,token:a},r.length>0?i.push(l):n.push(l)}p!==undefined&&p.length>0?(e.log.trace("Twig.compile: ","Pushing ",o," to logic stack."),r.length>0&&(a=r.pop(),a.output=a.output||[],a.output=a.output.concat(i),r.push(a),i=[]),r.push(o)):h!==undefined&&h&&(l={type:e.token.type.logic,token:o},r.length>0?i.push(l):n.push(l));break;case e.token.type.comment:break;case e.token.type.output:e.expression.compile.apply(this,[s]),r.length>0?i.push(s):n.push(s)}e.log.trace("Twig.compile: "," Output: ",n," Logic Stack: ",r," Pending Output: ",i)}if(r.length>0)throw u=r.pop(),new Error("Unable to find an end tag for "+u.type+", expecting one of "+u.next);return n}catch(d){e.log.error("Error compiling twig template "+this.id+": "),d.stack?e.log.error(d.stack):e.log.error(d.toString());if(this.options.rethrow)throw d}},e.parse=function(t,n){try{var r=[],i=!0,s=this;return n=n||{},e.forEach(t,function(o){e.log.debug("Twig.parse: ","Parsing token: ",o);switch(o.type){case e.token.type.raw:r.push(o.value);break;case e.token.type.logic:var u=o.token,a=e.logic.parse.apply(s,[u,n,i]);a.chain!==undefined&&(i=a.chain),a.context!==undefined&&(n=a.context),a.output!==undefined&&r.push(a.output);break;case e.token.type.comment:break;case e.token.type.output:e.log.debug("Twig.parse: ","Output token: ",o.stack),r.push(e.expression.parse.apply(s,[o.stack,n]))}}),r.join("")}catch(o){e.log.error("Error parsing twig template "+this.id+": "),o.stack?e.log.error(o.stack):e.log.error(o.toString());if(this.options.rethrow)throw o;if(e.debug)return o.toString()}},e.prepare=function(t){var n,r;return e.log.debug("Twig.prepare: ","Tokenizing ",t),r=e.tokenize.apply(this,[t]),e.log.debug("Twig.prepare: ","Compiling ",r),n=e.compile.apply(this,[r]),e.log.debug("Twig.prepare: ","Compiled ",n),n},e.Templates={registry:{}},e.validateId=function(t){if(t==="prototype")throw new e.Error(t+" is not a valid twig identifier");if(e.Templates.registry.hasOwnProperty(t))throw new e.Error("There is already a template with the ID "+t);return!0},e.Templates.save=function(t){if(t.id===undefined)throw new e.Error("Unable to save template with no id");e.Templates.registry[t.id]=t},e.Templates.load=function(t){return e.Templates.registry.hasOwnProperty(t)?e.Templates.registry[t]:null},e.Templates.loadRemote=function(t,n,r,i){var s=n.id,o=n.method,u=n.async,a=n.precompiled,f=null;u===undefined&&(u=!0),s===undefined&&(s=t),n.id=s;if(e.cache&&e.Templates.registry.hasOwnProperty(s))return r&&r(e.Templates.registry[s]),e.Templates.registry[s];if(o=="ajax"){if(typeof XMLHttpRequest=="undefined")throw new e.Error("Unsupported platform: Unable to do remote requests because there is no XMLHTTPRequest implementation");var l=new XMLHttpRequest;l.onreadystatechange=function(){var s=null;l.readyState==4&&(l.status==200?(e.log.debug("Got template ",l.responseText),a===!0?s=JSON.parse(l.responseText):s=l.responseText,n.url=t,n.data=s,f=new e.Template(n),r&&r(f)):i&&i(l))},l.open("GET",t,u),l.send()}else(function(){var s=require("fs"),o=require("path"),l=null,c=function(s,o){if(s){i&&i(s);return}a===!0&&(o=JSON.parse(o)),n.data=o,n.path=t,f=new e.Template(n),r&&r(f)};if(u===!0)s.stat(t,function(n,r){if(n||!r.isFile())throw new e.Error("Unable to find template file "+t);s.readFile(t,"utf8",c)});else{if(!s.statSync(t).isFile())throw new e.Error("Unable to find template file "+t);l=s.readFileSync(t,"utf8"),c(undefined,l)}})();return u===!1?f:!0},e.Template=function(n){var r=n.data,i=n.id,s=n.blocks,o=n.macros||{},u=n.base,a=n.path,f=n.url,l=n.options;this.id=i,this.base=u,this.path=a,this.url=f,this.macros=o,this.options=l,this.reset(s),t("String",r)?this.tokens=e.prepare.apply(this,[r]):this.tokens=r,i!==undefined&&e.Templates.save(this)},e.Template.prototype.reset=function(t){e.log.debug("Twig.Template.reset","Reseting template "+this.id),this.blocks={},this.child={blocks:t||{}},this.extend=null},e.Template.prototype.render=function(t,r){r=r||{};var i,s;this.context=t||{},this.reset(),r.blocks&&(this.blocks=r.blocks),r.macros&&(this.macros=r.macros),i=e.parse.apply(this,[this.tokens,this.context]);if(this.extend){var o;return this.options.allowInlineIncludes&&(o=e.Templates.load(this.extend),o&&(o.options=this.options)),o||(s=n(this,this.extend),o=e.Templates.loadRemote(s,{method:this.url?"ajax":"fs",base:this.base,async:!1,id:s,options:this.options})),this.parent=o,this.parent.render(this.context,{blocks:this.blocks})}return r.output=="blocks"?this.blocks:r.output=="macros"?this.macros:i},e.Template.prototype.importFile=function(t){var r,i;if(!this.url&&!this.path&&this.options.allowInlineIncludes){i=e.Templates.load(t),i.options=this.options;if(i)return i;throw new e.Error("Didn't find the inline template by id")}return r=n(this,t),i=e.Templates.loadRemote(r,{method:this.url?"ajax":"fs",base:this.base,async:!1,options:this.options,id:r}),i},e.Template.prototype.importBlocks=function(t,n){var r=this.importFile(t),i=this.context,s=this,o;n=n||!1,r.render(i),e.forEach(Object.keys(r.blocks),function(e){if(n||s.blocks[e]===undefined)s.blocks[e]=r.blocks[e]})},e.Template.prototype.importMacros=function(t){var r=n(this,t),i=e.Templates.loadRemote(r,{method:this.url?"ajax":"fs",async:!1,id:r});return i},e.Template.prototype.compile=function(t){return e.compiler.compile(this,t)},e}(Twig||{});(function(){String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),Object.keys||(Object.keys=function(e){if(e!==Object(e))throw new TypeError("Object.keys called on non-object");var t=[],n;for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t})})();var Twig=function(e){e.lib={};var t=function(){function e(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function n(e,t){for(var n=[];t>0;n[--t]=e);return n.join("")}var r=function(){return r.cache.hasOwnProperty(arguments[0])||(r.cache[arguments[0]]=r.parse(arguments[0])),r.format.call(null,r.cache[arguments[0]],arguments)};return r.format=function(r,i){var s=1,o=r.length,u="",a,f=[],l,c,h,p,d,v;for(l=0;l<o;l++){u=e(r[l]);if(u==="string")f.push(r[l]);else if(u==="array"){h=r[l];if(h[2]){a=i[s];for(c=0;c<h[2].length;c++){if(!a.hasOwnProperty(h[2][c]))throw t('[sprintf] property "%s" does not exist',h[2][c]);a=a[h[2][c]]}}else h[1]?a=i[h[1]]:a=i[s++];if(/[^s]/.test(h[8])&&e(a)!="number")throw t("[sprintf] expecting number but found %s",e(a));switch(h[8]){case"b":a=a.toString(2);break;case"c":a=String.fromCharCode(a);break;case"d":a=parseInt(a,10);break;case"e":a=h[7]?a.toExponential(h[7]):a.toExponential();break;case"f":a=h[7]?parseFloat(a).toFixed(h[7]):parseFloat(a);break;case"o":a=a.toString(8);break;case"s":a=(a=String(a))&&h[7]?a.substring(0,h[7]):a;break;case"u":a=Math.abs(a);break;case"x":a=a.toString(16);break;case"X":a=a.toString(16).toUpperCase()}a=/[def]/.test(h[8])&&h[3]&&a>=0?"+"+a:a,d=h[4]?h[4]=="0"?"0":h[4].charAt(1):" ",v=h[6]-String(a).length,p=h[6]?n(d,v):"",f.push(h[5]?a+p:p+a)}}return f.join("")},r.cache={},r.parse=function(e){var t=e,n=[],r=[],i=0;while(t){if((n=/^[^\x25]+/.exec(t))!==null)r.push(n[0]);else if((n=/^\x25{2}/.exec(t))!==null)r.push("%");else{if((n=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(t))===null)throw"[sprintf] huh?";if(n[2]){i|=1;var s=[],o=n[2],u=[];if((u=/^([a-z_][a-z_\d]*)/i.exec(o))===null)throw"[sprintf] huh?";s.push(u[1]);while((o=o.substring(u[0].length))!=="")if((u=/^\.([a-z_][a-z_\d]*)/i.exec(o))!==null)s.push(u[1]);else{if((u=/^\[(\d+)\]/.exec(o))===null)throw"[sprintf] huh?";s.push(u[1])}n[2]=s}else i|=2;if(i===3)throw"[sprintf] mixing positional and named placeholders is not (yet) supported";r.push(n)}t=t.substring(n[0].length)}return r},r}(),n=function(e,n){return n.unshift(e),t.apply(null,n)};return e.lib.sprintf=t,e.lib.vsprintf=n,function(){function s(e){return(e=Math.abs(e)%100)%10==1&&e!=11?"st":e%10==2&&e!=12?"nd":e%10==3&&e!=13?"rd":"th"}function o(e){var t=new Date(e.getFullYear()+1,0,4);return(t-e)/864e5<7&&(e.getDay()+6)%7<(t.getDay()+6)%7?t.getFullYear():e.getMonth()>0||e.getDate()>=4?e.getFullYear():e.getFullYear()-((e.getDay()+6)%7-e.getDate()>2?1:0)}function u(e){var t=new Date(o(e),0,4);return t.setDate(t.getDate()-(t.getDay()+6)%7),parseInt((e-t)/6048e5)+1}var t="Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),n="Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),r="Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),i="January,February,March,April,May,June,July,August,September,October,November,December".split(",");e.lib.formatDate=function(e,a){if(typeof a!="string"||/^\s*$/.test(a))return e+"";var f=new Date(e.getFullYear(),0,1),l=e;return a.replace(/[dDjlNSwzWFmMntLoYyaABgGhHisuU]/g,function(e){switch(e){case"d":return("0"+l.getDate()).replace(/^.+(..)$/,"$1");case"D":return t[l.getDay()];case"j":return l.getDate();case"l":return n[l.getDay()];case"N":return(l.getDay()+6)%7+1;case"S":return s(l.getDate());case"w":return l.getDay();case"z":return Math.ceil((f-l)/864e5);case"W":return("0"+u(l)).replace(/^.(..)$/,"$1");case"F":return i[l.getMonth()];case"m":return("0"+(l.getMonth()+1)).replace(/^.+(..)$/,"$1");case"M":return r[l.getMonth()];case"n":return l.getMonth()+1;case"t":return(new Date(l.getFullYear(),l.getMonth()+1,-1)).getDate();case"L":return(new Date(l.getFullYear(),1,29)).getDate()==29?1:0;case"o":return o(l);case"Y":return l.getFullYear();case"y":return(l.getFullYear()+"").replace(/^.+(..)$/,"$1");case"a":return l.getHours()<12?"am":"pm";case"A":return l.getHours()<12?"AM":"PM";case"B":return Math.floor(((l.getUTCHours()+1)%24+l.getUTCMinutes()/60+l.getUTCSeconds()/3600)*1e3/24);case"g":return l.getHours()%12!=0?l.getHours()%12:12;case"G":return l.getHours();case"h":return("0"+(l.getHours()%12!=0?l.getHours()%12:12)).replace(/^.+(..)$/,"$1");case"H":return("0"+l.getHours()).replace(/^.+(..)$/,"$1");case"i":return("0"+l.getMinutes()).replace(/^.+(..)$/,"$1");case"s":return("0"+l.getSeconds()).replace(/^.+(..)$/,"$1");case"u":return l.getMilliseconds();case"U":return l.getTime()/1e3}})}}(),e.lib.strip_tags=function(e,t){t=(((t||"")+"").toLowerCase().match(/<[a-z][a-z0-9]*>/g)||[]).join("");var n=/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,r=/<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi;return e.replace(r,"").replace(n,function(e,n){return t.indexOf("<"+n.toLowerCase()+">")>-1?e:""})},e.lib.parseISO8601Date=function(e){var t=/(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d):(\d\d)(\.\d+)?(Z|([+-])(\d\d):(\d\d))/,n=[];n=e.match(t);if(!n)throw"Couldn't parse ISO 8601 date string '"+e+"'";var r=[1,2,3,4,5,6,10,11];for(var i in r)n[r[i]]=parseInt(n[r[i]],10);n[7]=parseFloat(n[7]);var s=Date.UTC(n[1],n[2]-1,n[3],n[4],n[5],n[6]);n[7]>0&&(s+=Math.round(n[7]*1e3));if(n[8]!="Z"&&n[10]){var o=n[10]*60*60*1e3;n[11]&&(o+=n[11]*60*1e3),n[9]=="-"?s-=o:s+=o}return new Date(s)},e.lib.strtotime=function(t,n){var r,i,s,o,u="";t=t.replace(/\s{2,}|^\s|\s$/g," "),t=t.replace(/[\t\r\n]/g,"");if(t==="now")return n===null||isNaN(n)?(new Date).getTime()/1e3|0:n|0;if(!isNaN(u=Date.parse(t)))return u/1e3|0;n?n=new Date(n*1e3):n=new Date;var a=t;t=t.toLowerCase();var f={day:{sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},mon:["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"]},l=function(e){var t=e[2]&&e[2]==="ago",r=(r=e[0]==="last"?-1:1)*(t?-1:1);switch(e[0]){case"last":case"next":switch(e[1].substring(0,3)){case"yea":n.setFullYear(n.getFullYear()+r);break;case"wee":n.setDate(n.getDate()+r*7);break;case"day":n.setDate(n.getDate()+r);break;case"hou":n.setHours(n.getHours()+r);break;case"min":n.setMinutes(n.getMinutes()+r);break;case"sec":n.setSeconds(n.getSeconds()+r);break;case"mon":if(e[1]==="month"){n.setMonth(n.getMonth()+r);break};default:var i=f.day[e[1].substring(0,3)];if(typeof i!="undefined"){var s=i-n.getDay();s===0?s=7*r:s>0?e[0]==="last"&&(s-=7):e[0]==="next"&&(s+=7),n.setDate(n.getDate()+s),n.setHours(0,0,0,0)}}break;default:if(!/\d+/.test(e[0]))return!1;r*=parseInt(e[0],10);switch(e[1].substring(0,3)){case"yea":n.setFullYear(n.getFullYear()+r);break;case"mon":n.setMonth(n.getMonth()+r);break;case"wee":n.setDate(n.getDate()+r*7);break;case"day":n.setDate(n.getDate()+r);break;case"hou":n.setHours(n.getHours()+r);break;case"min":n.setMinutes(n.getMinutes()+r);break;case"sec":n.setSeconds(n.getSeconds()+r)}}return!0};s=t.match(/^(\d{2,4}-\d{2}-\d{2})(?:\s(\d{1,2}:\d{2}(:\d{2})?)?(?:\.(\d+))?)?$/);if(s!==null)return s[2]?s[3]||(s[2]+=":00"):s[2]="00:00:00",o=s[1].split(/-/g),o[1]=f.mon[o[1]-1]||o[1],o[0]=+o[0],o[0]=o[0]>=0&&o[0]<=69?"20"+(o[0]<10?"0"+o[0]:o[0]+""):o[0]>=70&&o[0]<=99?"19"+o[0]:o[0]+"",parseInt(this.strtotime(o[2]+" "+o[1]+" "+o[0]+" "+s[2])+(s[4]?s[4]/1e3:""),10);var c="([+-]?\\d+\\s(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?|sun\\.?|sunday|mon\\.?|monday|tue\\.?|tuesday|wed\\.?|wednesday|thu\\.?|thursday|fri\\.?|friday|sat\\.?|saturday)|(last|next)\\s(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?|sun\\.?|sunday|mon\\.?|monday|tue\\.?|tuesday|wed\\.?|wednesday|thu\\.?|thursday|fri\\.?|friday|sat\\.?|saturday))(\\sago)?";s=t.match(new RegExp(c,"gi"));if(s===null){try{num=e.lib.parseISO8601Date(a);if(num)return num/1e3|0}catch(h){return!1}return!1}for(r=0,i=s.length;r<i;r++)if(!l(s[r].split(" ")))return!1;return n.getTime()/1e3|0},e.lib.is=function(e,t){var n=Object.prototype.toString.call(t).slice(8,-1);return t!==undefined&&t!==null&&n===e},e.lib.copy=function(e){var t={},n;for(n in e)t[n]=e[n];return t},e.lib.replaceAll=function(e,t,n){return e.split(t).join(n)},e.lib.chunkArray=function(t,n){var r=[],i=0,s=t.length;if(n<1||!e.lib.is("Array",t))return[];while(i<s)r.push(t.slice(i,i+=n));return r},e.lib.round=function(t,n,r){var i,s,o,u;n|=0,i=Math.pow(10,n),t*=i,u=t>0|-(t<0),o=t%1===.5*u,s=Math.floor(t);if(o)switch(r){case"PHP_ROUND_HALF_DOWN":t=s+(u<0);break;case"PHP_ROUND_HALF_EVEN":t=s+s%2*u;break;case"PHP_ROUND_HALF_ODD":t=s+!(s%2);break;default:t=s+(u>0)}return(o?t:Math.round(t))/i},e}(Twig||{}),Twig=function(e){e.logic={},e.logic.type={if_:"Twig.logic.type.if",endif:"Twig.logic.type.endif",for_:"Twig.logic.type.for",endfor:"Twig.logic.type.endfor",else_:"Twig.logic.type.else",elseif:"Twig.logic.type.elseif",set:"Twig.logic.type.set",setcapture:"Twig.logic.type.setcapture",endset:"Twig.logic.type.endset",filter:"Twig.logic.type.filter",endfilter:"Twig.logic.type.endfilter",block:"Twig.logic.type.block",endblock:"Twig.logic.type.endblock",extends_:"Twig.logic.type.extends",use:"Twig.logic.type.use",include:"Twig.logic.type.include",spaceless:"Twig.logic.type.spaceless",endspaceless:"Twig.logic.type.endspaceless",macro:"Twig.logic.type.macro",endmacro:"Twig.logic.type.endmacro",import_:"Twig.logic.type.import",from:"Twig.logic.type.from"},e.logic.definitions=[{type:e.logic.type.if_,regex:/^if\s+([^\s].+)$/,next:[e.logic.type.else_,e.logic.type.elseif,e.logic.type.endif],open:!0,compile:function(t){var n=t.match[1];return t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:n}]).stack,delete t.match,t},parse:function(t,n,r){var i="",s=e.expression.parse.apply(this,[t.stack,n]);return r=!0,s&&(r=!1,i=e.parse.apply(this,[t.output,n])),{chain:r,output:i}}},{type:e.logic.type.elseif,regex:/^elseif\s+([^\s].*)$/,next:[e.logic.type.else_,e.logic.type.elseif,e.logic.type.endif],open:!1,compile:function(t){var n=t.match[1];return t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:n}]).stack,delete t.match,t},parse:function(t,n,r){var i="";return r&&e.expression.parse.apply(this,[t.stack,n])===!0&&(r=!1,i=e.parse.apply(this,[t.output,n])),{chain:r,output:i}}},{type:e.logic.type.else_,regex:/^else$/,next:[e.logic.type.endif,e.logic.type.endfor],open:!1,parse:function(t,n,r){var i="";return r&&(i=e.parse.apply(this,[t.output,n])),{chain:r,output:i}}},{type:e.logic.type.endif,regex:/^endif$/,next:[],open:!1},{type:e.logic.type.for_,regex:/^for\s+([a-zA-Z0-9_,\s]+)\s+in\s+([^\s].*?)(?:\s+if\s+([^\s].*))?$/,next:[e.logic.type.else_,e.logic.type.endfor],open:!0,compile:function(t){var n=t.match[1],r=t.match[2],i=t.match[3],s=null;t.key_var=null,t.value_var=null;if(n.indexOf(",")>=0){s=n.split(",");if(s.length!==2)throw new e.Error("Invalid expression in for loop: "+n);t.key_var=s[0].trim(),t.value_var=s[1].trim()}else t.value_var=n;return t.expression=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:r}]).stack,i&&(t.conditional=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:i}]).stack),delete t.match,t},parse:function(t,n,r){var i=e.expression.parse.apply(this,[t.expression,n]),s=[],o,u=0,a,f=this,l=t.conditional,c=function(e,t){var r=l!==undefined;return{index:e+1,index0:e,revindex:r?undefined:t-e,revindex0:r?undefined:t-e-1,first:e===0,last:r?undefined:e===t-1,length:r?undefined:t,parent:n}},h=function(r,i){var a=e.lib.copy(n);a[t.value_var]=i,t.key_var&&(a[t.key_var]=r),a.loop=c(u,o);if(l===undefined||e.expression.parse.apply(f,[l,a]))s.push(e.parse.apply(f,[t.output,a])),u+=1};return i instanceof Array?(o=i.length,e.forEach(i,function(e){var t=u;h(t,e)})):i instanceof Object&&(i._keys!==undefined?a=i._keys:a=Object.keys(i),o=a.length,e.forEach(a,function(e){if(e==="_keys")return;h(e,i[e])})),r=s.length===0,{chain:r,output:s.join("")}}},{type:e.logic.type.endfor,regex:/^endfor$/,next:[],open:!1},{type:e.logic.type.set,regex:/^set\s+([a-zA-Z0-9_,\s]+)\s*=\s*(.+)$/,next:[],open:!0,compile:function(t){var n=t.match[1].trim(),r=t.match[2],i=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:r}]).stack;return t.key=n,t.expression=i,delete t.match,t},parse:function(t,n,r){var i=e.expression.parse.apply(this,[t.expression,n]),s=t.key;return this.context[s]=i,n[s]=i,{chain:r,context:n}}},{type:e.logic.type.setcapture,regex:/^set\s+([a-zA-Z0-9_,\s]+)$/,next:[e.logic.type.endset],open:!0,compile:function(e){var t=e.match[1].trim();return e.key=t,delete e.match,e},parse:function(t,n,r){var i=e.parse.apply(this,[t.output,n]),s=t.key;return this.context[s]=i,n[s]=i,{chain:r,context:n}}},{type:e.logic.type.endset,regex:/^endset$/,next:[],open:!1},{type:e.logic.type.filter,regex:/^filter\s+(.+)$/,next:[e.logic.type.endfilter],open:!0,compile:function(t){var n="|"+t.match[1].trim();return t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:n}]).stack,delete t.match,t},parse:function(t,n,r){var i=e.parse.apply(this,[t.output,n]),s=[{type:e.expression.type.string,value:i}].concat(t.stack),o=e.expression.parse.apply(this,[s,n]);return{chain:r,output:o}}},{type:e.logic.type.endfilter,regex:/^endfilter$/,next:[],open:!1},{type:e.logic.type.block,regex:/^block\s+([a-zA-Z0-9_]+)$/,next:[e.logic.type.endblock],open:!0,compile:function(e){return e.block=e.match[1].trim(),delete e.match,e},parse:function(t,n,r){var i="",s="",o=this.blocks[t.block]&&this.blocks[t.block].indexOf(e.placeholders.parent)>-1;if(this.blocks[t.block]===undefined||o||n.loop)i=e.expression.parse.apply(this,[{type:e.expression.type.string,value:e.parse.apply(this,[t.output,n])},n]),o?this.blocks[t.block]=this.blocks[t.block].replace(e.placeholders.parent,i):this.blocks[t.block]=i;return this.child.blocks[t.block]?s=this.child.blocks[t.block]:s=this.blocks[t.block],{chain:r,output:s}}},{type:e.logic.type.endblock,regex:/^endblock(?:\s+([a-zA-Z0-9_]+))?$/,next:[],open:!1},{type:e.logic.type.extends_,regex:/^extends\s+(.+)$/,next:[],open:!0,compile:function(t){var n=t.match[1].trim();return delete t.match,t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:n}]).stack,t},parse:function(t,n,r){var i=e.expression.parse.apply(this,[t.stack,n]);return this.extend=i,{chain:r,output:""}}},{type:e.logic.type.use,regex:/^use\s+(.+)$/,next:[],open:!0,compile:function(t){var n=t.match[1].trim();return delete t.match,t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:n}]).stack,t},parse:function(t,n,r){var i=e.expression.parse.apply(this,[t.stack,n]);return this.importBlocks(i),{chain:r,output:""}}},{type:e.logic.type.include,regex:/^include\s+(ignore missing\s+)?(.+?)\s*(?:with\s+(.+?))?\s*(only)?$/,next:[],open:!0,compile:function(t){var n=t.match,r=n[1]!==undefined,i=n[2].trim(),s=n[3],o=n[4]!==undefined&&n[4].length;return delete t.match,t.only=o,t.includeMissing=r,t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:i}]).stack,s!==undefined&&(t.withStack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:s.trim()}]).stack),t},parse:function(t,n,r){var i={},s,o,u;if(!t.only)for(o in n)n.hasOwnProperty(o)&&(i[o]=n[o]);if(t.withStack!==undefined){s=e.expression.parse.apply(this,[t.withStack,n]);for(o in s)s.hasOwnProperty(o)&&(i[o]=s[o])}var a=e.expression.parse.apply(this,[t.stack,i]);return u=this.importFile(a),{chain:r,output:u.render(i)}}},{type:e.logic.type.spaceless,regex:/^spaceless$/,next:[e.logic.type.endspaceless],open:!0,parse:function(t,n,r){var i=e.parse.apply(this,[t.output,n]),s=/>\s+</g,o=i.replace(s,"><").trim();return{chain:r,output:o}}},{type:e.logic.type.endspaceless,regex:/^endspaceless$/,next:[],open:!1},{type:e.logic.type.macro,regex:/^macro\s+([a-zA-Z0-9_]+)\s?\((([a-zA-Z0-9_]+(,\s?)?)*)\)$/,next:[e.logic.type.endmacro],open:!0,compile:function(t){var n=t.match[1],r=t.match[2].split(/[ ,]+/);for(var i=0;i<r.length;i++)for(var s=0;s<r.length;s++)if(r[i]===r[s]&&i!==s)throw new e.Error("Duplicate arguments for parameter: "+r[i]);return t.macroName=n,t.parameters=r,delete t.match,t},parse:function(t,n,r){var i=this;return this.macros[t.macroName]=function(){var n={_self:i.macros};for(var r=0;r<t.parameters.length;r++){var s=t.parameters[r];typeof arguments[r]!="undefined"?n[s]=arguments[r]:n[s]=undefined}return e.parse.apply(i,[t.output,n])},{chain:r,output:""}}},{type:e.logic.type.endmacro,regex:/^endmacro$/,next:[],open:!1},{type:e.logic.type.import_,regex:/^import\s+(.+)\s+as\s+([a-zA-Z0-9_]+)$/,next:[],open:!0,compile:function(t){var n=t.match[1].trim(),r=t.match[2].trim();return delete t.match,t.expression=n,t.contextName=r,t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:n}]).stack,t},parse:function(t,n,r){if(t.expression!=="_self"){var i=e.expression.parse.apply(this,[t.stack,n]),s=this.importMacros(i||t.expression);n[t.contextName]=s.render({},{output:"macros"})}else n[t.contextName]=this.macros;return{chain:r,output:""}}},{type:e.logic.type.from,regex:/^from\s+(.+)\s+import\s+([a-zA-Z0-9_, ]+)$/,next:[],open:!0,compile:function(t){var n=t.match[1].trim(),r=t.match[2].trim().split(/[ ,]+/),i={};for(var s=0;s<r.length;s++){var o=r[s],u=o.match(/^([a-zA-Z0-9_]+)\s+(.+)\s+as\s+([a-zA-Z0-9_]+)$/);u?i[u[1].trim()]=u[2].trim():o.match(/^([a-zA-Z0-9_]+)$/)&&(i[o]=o)}return delete t.match,t.expression=n,t.macroNames=i,t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:n}]).stack,t},parse:function(t,n,r){var i;if(t.expression!=="_self"){var s=e.expression.parse.apply(this,[t.stack,n]),o=this.importMacros(s||t.expression);i=o.render({},{output:"macros"})}else i=this.macros;for(var u in t.macroNames)i.hasOwnProperty(u)&&(n[t.macroNames[u]]=i[u]);return{chain:r,output:""}}}],e.logic.handler={},e.logic.extendType=function(t,n){n=n||"Twig.logic.type"+t,e.logic.type[t]=n},e.logic.extend=function(t){if(!t.type)throw new e.Error("Unable to extend logic definition. No type provided for "+t);if(e.logic.type[t.type])throw new e.Error("Unable to extend logic definitions. Type "+t.type+" is already defined.");e.logic.extendType(t.type),e.logic.handler[t.type]=t};while(e.logic.definitions.length>0)e.logic.extend(e.logic.definitions.shift());return e.logic.compile=function(t){var n=t.value.trim(),r=e.logic.tokenize.apply(this,[n]),i=e.logic.handler[r.type];return i.compile&&(r=i.compile.apply(this,[r]),e.log.trace("Twig.logic.compile: ","Compiled logic token to ",r)),r},e.logic.tokenize=function(t){var n={},r=null,i=null,s=null,o=null,u=null,a=null;t=t.trim();for(r in e.logic.handler)if(e.logic.handler.hasOwnProperty(r)){i=e.logic.handler[r].type,s=e.logic.handler[r].regex,o=[],s instanceof Array?o=s:o.push(s);while(o.length>0){u=o.shift(),a=u.exec(t.trim());if(a!==null)return n.type=i,n.match=a,e.log.trace("Twig.logic.tokenize: ","Matched a ",i," regular expression of ",a),n}}throw new e.Error("Unable to parse '"+t.trim()+"'")},e.logic.parse=function(t,n,r){var i="",s;return n=n||{},e.log.debug("Twig.logic.parse: ","Parsing logic token ",t),s=e.logic.handler[t.type],s.parse&&(i=s.parse.apply(this,[t,n,r])),i},e}(Twig||{}),Twig=function(e){e.expression={},e.expression.reservedWords=["true","false","null","_context"],e.expression.type={comma:"Twig.expression.type.comma",operator:{unary:"Twig.expression.type.operator.unary",binary:"Twig.expression.type.operator.binary"},string:"Twig.expression.type.string",bool:"Twig.expression.type.bool",array:{start:"Twig.expression.type.array.start",end:"Twig.expression.type.array.end"},object:{start:"Twig.expression.type.object.start",end:"Twig.expression.type.object.end"},parameter:{start:"Twig.expression.type.parameter.start",end:"Twig.expression.type.parameter.end"},key:{period:"Twig.expression.type.key.period",brackets:"Twig.expression.type.key.brackets"},filter:"Twig.expression.type.filter",_function:"Twig.expression.type._function",variable:"Twig.expression.type.variable",number:"Twig.expression.type.number",_null:"Twig.expression.type.null",context:"Twig.expression.type.context",test:"Twig.expression.type.test"},e.expression.set={operations:[e.expression.type.filter,e.expression.type.operator.unary,e.expression.type.operator.binary,e.expression.type.array.end,e.expression.type.object.end,e.expression.type.parameter.end,e.expression.type.comma,e.expression.type.test],expressions:[e.expression.type._function,e.expression.type.bool,e.expression.type.string,e.expression.type.variable,e.expression.type.number,e.expression.type._null,e.expression.type.context,e.expression.type.parameter.start,e.expression.type.array.start,e.expression.type.object.start]},e.expression.set.operations_extended=e.expression.set.operations.concat([e.expression.type.key.period,e.expression.type.key.brackets]),e.expression.fn={compile:{push:function(e,t,n){n.push(e)},push_both:function(e,t,n){n.push(e),t.push(e)}},parse:{push:function(e,t,n){t.push(e)},push_value:function(e,t,n){t.push(e.value)}}},e.expression.definitions=[{type:e.expression.type.test,regex:/^is\s+(not)?\s*([a-zA-Z_][a-zA-Z0-9_]*)/,next:e.expression.set.operations.concat([e.expression.type.parameter.start]),compile:function(e,t,n){e.filter=e.match[2],e.modifier=e.match[1],delete e.match,delete e.value,n.push(e)},parse:function(t,n,r){var i=n.pop(),s=t.params&&e.expression.parse.apply(this,[t.params,r]),o=e.test(t.filter,i,s);t.modifier=="not"?n.push(!o):n.push(o)}},{type:e.expression.type.comma,regex:/^,/,next:e.expression.set.expressions.concat([e.expression.type.array.end,e.expression.type.object.end]),compile:function(t,n,r){var i=n.length-1,s;delete t.match,delete t.value;for(;i>=0;i--){s=n.pop();if(s.type===e.expression.type.object.start||s.type===e.expression.type.parameter.start||s.type===e.expression.type.array.start){n.push(s);break}r.push(s)}r.push(t)}},{type:e.expression.type.operator.binary,regex:/(^[\+\-~%\?\:]|^[!=]==?|^[!<>]=?|^\*\*?|^\/\/?|^and\s+|^or\s+|^in\s+|^not in\s+|^\.\.)/,next:e.expression.set.expressions.concat([e.expression.type.operator.unary]),compile:function(t,n,r){delete t.match,t.value=t.value.trim();var i=t.value,s=e.expression.operator.lookup(i,t);e.log.trace("Twig.expression.compile: ","Operator: ",s," from ",i);while(n.length>0&&(n[n.length-1].type==e.expression.type.operator.unary||n[n.length-1].type==e.expression.type.operator.binary)&&(s.associativity===e.expression.operator.leftToRight&&s.precidence>=n[n.length-1].precidence||s.associativity===e.expression.operator.rightToLeft&&s.precidence>n[n.length-1].precidence)){var o=n.pop();r.push(o)}if(i===":"){if(!n[n.length-1]||n[n.length-1].value!=="?"){var u=r.pop();if(u.type!==e.expression.type.string&&u.type!==e.expression.type.variable&&u.type!==e.expression.type.number)throw new e.Error("Unexpected value before ':' of "+u.type+" = "+u.value);t.key=u.value,r.push(t);return}}else n.push(s)},parse:function(t,n,r){t.key?n.push(t):e.expression.operator.parse(t.value,n)}},{type:e.expression.type.operator.unary,regex:/(^not\s+)/,next:e.expression.set.expressions,compile:function(t,n,r){delete t.match,t.value=t.value.trim();var i=t.value,s=e.expression.operator.lookup(i,t);e.log.trace("Twig.expression.compile: ","Operator: ",s," from ",i);while(n.length>0&&(n[n.length-1].type==e.expression.type.operator.unary||n[n.length-1].type==e.expression.type.operator.binary)&&(s.associativity===e.expression.operator.leftToRight&&s.precidence>=n[n.length-1].precidence||s.associativity===e.expression.operator.rightToLeft&&s.precidence>n[n.length-1].precidence)){var o=n.pop();r.push(o)}n.push(s)},parse:function(t,n,r){e.expression.operator.parse(t.value,n)}},{type:e.expression.type.string,regex:/^(["'])(?:(?=(\\?))\2.)*?\1/,next:e.expression.set.operations,compile:function(t,n,r){var i=t.value;delete t.match,i.substring(0,1)==='"'?i=i.replace('\\"','"'):i=i.replace("\\'","'"),t.value=i.substring(1,i.length-1).replace(/\\n/g,"\n").replace(/\\r/g,"\r"),e.log.trace("Twig.expression.compile: ","String value: ",t.value),r.push(t)},parse:e.expression.fn.parse.push_value},{type:e.expression.type.parameter.start,regex:/^\(/,next:e.expression.set.expressions.concat([e.expression.type.parameter.end]),compile:e.expression.fn.compile.push_both,parse:e.expression.fn.parse.push},{type:e.expression.type.parameter.end,regex:/^\)/,next:e.expression.set.operations_extended,compile:function(t,n,r){var i,s=t;i=n.pop();while(n.length>0&&i.type!=e.expression.type.parameter.start)r.push(i),i=n.pop();var o=[];while(t.type!==e.expression.type.parameter.start)o.unshift(t),t=r.pop();o.unshift(t);var u=!1;t=r[r.length-1],t===undefined||t.type!==e.expression.type._function&&t.type!==e.expression.type.filter&&t.type!==e.expression.type.test&&t.type!==e.expression.type.key.brackets&&t.type!==e.expression.type.key.period?(s.expression=!0,o.pop(),o.shift(),s.params=o,r.push(s)):(s.expression=!1,t.params=o)},parse:function(t,n,r){var i=[],s=!1,o=null;if(t.expression)o=e.expression.parse.apply(this,[t.params,r]),n.push(o);else{while(n.length>0){o=n.pop();if(o&&o.type&&o.type==e.expression.type.parameter.start){s=!0;break}i.unshift(o)}if(!s)throw new e.Error("Expected end of parameter set.");n.push(i)}}},{type:e.expression.type.array.start,regex:/^\[/,next:e.expression.set.expressions.concat([e.expression.type.array.end]),compile:e.expression.fn.compile.push_both,parse:e.expression.fn.parse.push},{type:e.expression.type.array.end,regex:/^\]/,next:e.expression.set.operations_extended,compile:function(t,n,r){var i=n.length-1,s;for(;i>=0;i--){s=n.pop();if(s.type===e.expression.type.array.start)break;r.push(s)}r.push(t)},parse:function(t,n,r){var i=[],s=!1,o=null;while(n.length>0){o=n.pop();if(o.type&&o.type==e.expression.type.array.start){s=!0;break}i.unshift(o)}if(!s)throw new e.Error("Expected end of array.");n.push(i)}},{type:e.expression.type.object.start,regex:/^\{/,next:e.expression.set.expressions.concat([e.expression.type.object.end]),compile:e.expression.fn.compile.push_both,parse:e.expression.fn.parse.push},{type:e.expression.type.object.end,regex:/^\}/,next:e.expression.set.operations_extended,compile:function(t,n,r){var i=n.length-1,s;for(;i>=0;i--){s=n.pop();if(s&&s.type===e.expression.type.object.start)break;r.push(s)}r.push(t)},parse:function(t,n,r){var i={},s=!1,o=null,u=null,a=!1,f=null;while(n.length>0){o=n.pop();if(o&&o.type&&o.type===e.expression.type.object.start){s=!0;break}if(o&&o.type&&(o.type===e.expression.type.operator.binary||o.type===e.expression.type.operator.unary)&&o.key){if(!a)throw new e.Error("Missing value for key '"+o.key+"' in object definition.");i[o.key]=f,i._keys===undefined&&(i._keys=[]),i._keys.unshift(o.key),f=null,a=!1}else a=!0,f=o}if(!s)throw new e.Error("Unexpected end of object.");n.push(i)}},{type:e.expression.type.filter,regex:/^\|\s?([a-zA-Z_][a-zA-Z0-9_\-]*)/,next:e.expression.set.operations_extended.concat([e.expression.type.parameter.start]),compile:function(e,t,n){e.value=e.match[1],n.push(e)},parse:function(t,n,r){var i=n.pop(),s=t.params&&e.expression.parse.apply(this,[t.params,r]);n.push(e.filter.apply(this,[t.value,i,s]))}},{type:e.expression.type._function,regex:/^([a-zA-Z_][a-zA-Z0-9_]*)\s*\(/,next:e.expression.type.parameter.start,transform:function(e,t){return"("},compile:function(e,t,n){var r=e.match[1];e.fn=r,delete e.match,delete e.value,n.push(e)},parse:function(t,n,r){var i=t.params&&e.expression.parse.apply(this,[t.params,r]),s=t.fn,o;if(e.functions[s])o=e.functions[s].apply(this,i);else{if(typeof r[s]!="function")throw new e.Error(s+" function does not exist and is not defined in the context");o=r[s].apply(r,i)}n.push(o)}},{type:e.expression.type.variable,regex:/^[a-zA-Z_][a-zA-Z0-9_]*/,next:e.expression.set.operations_extended.concat([e.expression.type.parameter.start]),compile:e.expression.fn.compile.push,validate:function(t,n){return e.indexOf(e.expression.reservedWords,t[0])<0},parse:function(t,n,r){var i=e.expression.resolve(r[t.value],r);n.push(i)}},{type:e.expression.type.key.period,regex:/^\.([a-zA-Z0-9_]+)/,next:e.expression.set.operations_extended.concat([e.expression.type.parameter.start]),compile:function(e,t,n){e.key=e.match[1],delete e.match,delete e.value,n.push(e)},parse:function(t,n,r){var i=t.params&&e.expression.parse.apply(this,[t.params,r]),s=t.key,o=n.pop(),u;if(o===null||o===undefined){if(this.options.strict_variables)throw new e.Error("Can't access a key "+s+" on an null or undefined object.");return null}var a=function(e){return e.substr(0,1).toUpperCase()+e.substr(1)};typeof o=="object"&&s in o?u=o[s]:o["get"+a(s)]!==undefined?u=o["get"+a(s)]:o["is"+a(s)]!==undefined?u=o["is"+a(s)]:u=null,n.push(e.expression.resolve(u,o,i))}},{type:e.expression.type.key.brackets,regex:/^\[([^\]]*)\]/,next:e.expression.set.operations_extended.concat([e.expression.type.parameter.start]),compile:function(t,n,r){var i=t.match[1];delete t.value,delete t.match,t.stack=e.expression.compile({value:i}).stack,r.push(t)},parse:function(t,n,r){var i=t.params&&e.expression.parse.apply(this,[t.params,r]),s=e.expression.parse.apply(this,[t.stack,r]),o=n.pop(),u;if(o===null||o===undefined){if(this.options.strict_variables)throw new e.Error("Can't access a key "+s+" on an null or undefined object.");return null}typeof o=="object"&&s in o?u=o[s]:u=null,n.push(e.expression.resolve(u,o,i))}},{type:e.expression.type._null,regex:/^null/,next:e.expression.set.operations,compile:function(e,t,n){delete e.match,e.value=null,n.push(e)},parse:e.expression.fn.parse.push_value},{type:e.expression.type.context,regex:/^_context/,next:e.expression.set.operations_extended.concat([e.expression.type.parameter.start]),compile:e.expression.fn.compile.push,parse:function(e,t,n){t.push(n)}},{type:e.expression.type.number,regex:/^\-?\d+(\.\d+)?/,next:e.expression.set.operations,compile:function(e,t,n){e.value=Number(e.value),n.push(e)},parse:e.expression.fn.parse.push_value},{type:e.expression.type.bool,regex:/^(true|false)/,next:e.expression.set.operations,compile:function(e,t,n){e.value=e.match[0]=="true",delete e.match,n.push(e)},parse:e.expression.fn.parse.push_value}],e.expression.resolve=function(e,t,n){return typeof e=="function"?e.apply(t,n||[]):e},e.expression.handler={},e.expression.extendType=function(t){e.expression.type[t]="Twig.expression.type."+t},e.expression.extend=function(t){if(!t.type)throw new e.Error("Unable to extend logic definition. No type provided for "+t);e.expression.handler[t.type]=t};while(e.expression.definitions.length>0)e.expression.extend(e.expression.definitions.shift());return e.expression.tokenize=function(t){var n=[],r=0,i=null,s,o,u,a,f,l=[],c;c=function(){var t=Array.prototype.slice.apply(arguments),o=t.pop(),u=t.pop();return e.log.trace("Twig.expression.tokenize","Matched a ",s," regular expression of ",t),i&&e.indexOf(i,s)<0?(l.push(s+" cannot follow a "+n[n.length-1].type+" at template:"+r+" near '"+t[0].substring(0,20)+"...'"),t[0]):e.expression.handler[s].validate&&!e.expression.handler[s].validate(t,n)?t[0]:(l=[],n.push({type:s,value:t[0],match:t}),f=!0,i=a,r+=t[0].length,e.expression.handler[s].transform?e.expression.handler[s].transform(t,n):"")},e.log.debug("Twig.expression.tokenize","Tokenizing expression ",t);while(t.length>0){t=t.trim();for(s in e.expression.handler)if(e.expression.handler.hasOwnProperty(s)){a=e.expression.handler[s].next,o=e.expression.handler[s].regex,o instanceof Array?u=o:u=[o],f=!1;while(u.length>0)o=u.pop(),t=t.replace(o,c);if(f)break}if(!f)throw l.length>0?new e.Error(l.join(" OR ")):new e.Error("Unable to parse '"+t+"' at template position"+r)}return e.log.trace("Twig.expression.tokenize","Tokenized to ",n),n},e.expression.compile=function(t){var n=t.value,r=e.expression.tokenize(n),i=null,s=[],o=[],u=null;e.log.trace("Twig.expression.compile: ","Compiling ",n);while(r.length>0)i=r.shift(),u=e.expression.handler[i.type],e.log.trace("Twig.expression.compile: ","Compiling ",i),u.compile&&u.compile(i,o,s),e.log.trace("Twig.expression.compile: ","Stack is",o),e.log.trace("Twig.expression.compile: ","Output is",s);while(o.length>0)s.push(o.pop());return e.log.trace("Twig.expression.compile: ","Final output is",s),t.stack=s,delete t.value,t},e.expression.parse=function(t,n){var r=this;t instanceof Array||(t=[t]);var i=[],s=null;return e.forEach(t,function(t){s=e.expression.handler[t.type],s.parse&&s.parse.apply(r,[t,i,n])}),i.pop()},e}(Twig||{}),Twig=function(e){e.expression.operator={leftToRight:"leftToRight",rightToLeft:"rightToLeft"};var t=function(e,t){if(t.indexOf!==undefined)return e===t||e!==""&&t.indexOf(e)>-1;var n;for(n in t)if(t.hasOwnProperty(n)&&t[n]===e)return!0;return!1};return e.expression.operator.lookup=function(t,n){switch(t){case"..":case"not in":case"in":n.precidence=20,n.associativity=e.expression.operator.leftToRight;break;case",":n.precidence=18,n.associativity=e.expression.operator.leftToRight;break;case"?":case":":n.precidence=16,n.associativity=e.expression.operator.rightToLeft;break;case"or":n.precidence=14,n.associativity=e.expression.operator.leftToRight;break;case"and":n.precidence=13,n.associativity=e.expression.operator.leftToRight;break;case"==":case"!=":n.precidence=9,n.associativity=e.expression.operator.leftToRight;break;case"<":case"<=":case">":case">=":n.precidence=8,n.associativity=e.expression.operator.leftToRight;break;case"~":case"+":case"-":n.precidence=6,n.associativity=e.expression.operator.leftToRight;break;case"//":case"**":case"*":case"/":case"%":n.precidence=5,n.associativity=e.expression.operator.leftToRight;break;case"not":n.precidence=3,n.associativity=e.expression.operator.rightToLeft;break;default:throw new e.Error(t+" is an unknown operator.")}return n.operator=t,n},e.expression.operator.parse=function(n,r){e.log.trace("Twig.expression.operator.parse: ","Handling ",n);var i,s,o;switch(n){case":":break;case"?":o=r.pop(),s=r.pop(),i=r.pop(),i?r.push(s):r.push(o);break;case"+":s=parseFloat(r.pop()),i=parseFloat(r.pop()),r.push(i+s);break;case"-":s=parseFloat(r.pop()),i=parseFloat(r.pop()),r.push(i-s);break;case"*":s=parseFloat(r.pop()),i=parseFloat(r.pop()),r.push(i*s);break;case"/":s=parseFloat(r.pop()),i=parseFloat(r.pop()),r.push(i/s);break;case"//":s=parseFloat(r.pop()),i=parseFloat(r.pop()),r.push(parseInt(i/s));break;case"%":s=parseFloat(r.pop()),i=parseFloat(r.pop()),r.push(i%s);break;case"~":s=r.pop(),i=r.pop(),r.push((i!==undefined?i.toString():"")+(s!==undefined?s.toString():""));break;case"not":case"!":r.push(!r.pop());break;case"<":s=r.pop(),i=r.pop(),r.push(i<s);break;case"<=":s=r.pop(),i=r.pop(),r.push(i<=s);break;case">":s=r.pop(),i=r.pop(),r.push(i>s);break;case">=":s=r.pop(),i=r.pop(),r.push(i>=s);break;case"===":s=r.pop(),i=r.pop(),r.push(i===s);break;case"==":s=r.pop(),i=r.pop(),r.push(i==s);break;case"!==":s=r.pop(),i=r.pop(),r.push(i!==s);break;case"!=":s=r.pop(),i=r.pop(),r.push(i!=s);break;case"or":s=r.pop(),i=r.pop(),r.push(i||s);break;case"and":s=r.pop(),i=r.pop(),r.push(i&&s);break;case"**":s=r.pop(),i=r.pop(),r.push(Math.pow(i,s));break;case"not in":s=r.pop(),i=r.pop(),r.push(!t(i,s));break;case"in":s=r.pop(),i=r.pop(),r.push(t(i,s));break;case"..":s=r.pop(),i=r.pop(),r.push(e.functions.range(i,s));break;default:throw new e.Error(n+" is an unknown operator.")}},e}(Twig||{}),Twig=function(e){function t(e,t){var n=Object.prototype.toString.call(t).slice(8,-1);return t!==undefined&&t!==null&&n===e}return e.filters={upper:function(e){return typeof e!="string"?e:e.toUpperCase()},lower:function(e){return typeof e!="string"?e:e.toLowerCase()},capitalize:function(e){return typeof e!="string"?e:e.substr(0,1).toUpperCase()+e.toLowerCase().substr(1)},title:function(e){return typeof e!="string"?e:e.toLowerCase().replace(/(^|\s)([a-z])/g,function(e,t,n){return t+n.toUpperCase()})},length:function(t){return e.lib.is("Array",t)||typeof t=="string"?t.length:e.lib.is("Object",t)?t._keys===undefined?Object.keys(t).length:t._keys.length:0},reverse:function(e){if(t("Array",e))return e.reverse();if(t("String",e))return e.split("").reverse().join("");if(e instanceof Object){var n=e._keys||Object.keys(e).reverse();return e._keys=n,e}},sort:function(e){if(t("Array",e))return e.sort();if(e instanceof Object){delete e._keys;var n=Object.keys(e),r=n.sort(function(t,n){return e[t]>e[n]});return e._keys=r,e}},keys:function(t){if(t===undefined||t===null)return;var n=t._keys||Object.keys(t),r=[];return e.forEach(n,function(e){if(e==="_keys")return;t.hasOwnProperty(e)&&r.push(e)}),r},url_encode:function(e){if(e===undefined||e===null)return;return encodeURIComponent(e)},join:function(t,n){if(t===undefined||t===null)return;var r="",i=[],s=null;return n&&n[0]&&(r=n[0]),t instanceof Array?i=t:(s=t._keys||Object.keys(t),e.forEach(s,function(e){if(e==="_keys")return;t.hasOwnProperty(e)&&i.push(t[e])})),i.join(r)},"default":function(t,n){if(n===undefined||n.length!==1)throw new e.Error("default filter expects one argument");return t===undefined||t===null||t===""?n[0]:t},json_encode:function(e){return e&&e.hasOwnProperty("_keys")&&delete e._keys,e===undefined||e===null?"null":JSON.stringify(e)},merge:function(t,n){var r=[],i=0,s=[];t instanceof Array?e.forEach(n,function(e){e instanceof Array||(r={})}):r={},r instanceof Array||(r._keys=[]),t instanceof Array?e.forEach(t,function(e){r._keys&&r._keys.push(i),r[i]=e,i++}):(s=t._keys||Object.keys(t),e.forEach(s,function(e){r[e]=t[e],r._keys.push(e);var n=parseInt(e,10);!isNaN(n)&&n>=i&&(i=n+1)})),e.forEach(n,function(t){t instanceof Array?e.forEach(t,function(e){r._keys&&r._keys.push(i),r[i]=e,i++}):(s=t._keys||Object.keys(t),e.forEach(s,function(e){r[e]||r._keys.push(e),r[e]=t[e];var n=parseInt(e,10);!isNaN(n)&&n>=i&&(i=n+1)}))});if(n.length===0)throw new e.Error("Filter merge expects at least one parameter");return r},date:function(t,n){if(t===undefined||t===null)return;var r=e.functions.date(t);return e.lib.formatDate(r,n[0])},date_modify:function(t,n){if(t===undefined||t===null)return;if(n===undefined||n.length!==1)throw new e.Error("date_modify filter expects 1 argument");var r=n[0],i;return e.lib.is("Date",t)&&(i=e.lib.strtotime(r,t.getTime()/1e3)),e.lib.is("String",t)&&(i=e.lib.strtotime(r,e.lib.strtotime(t))),e.lib.is("Number",t)&&(i=e.lib.strtotime(r,t)),new Date(i*1e3)},replace:function(t,n){if(t===undefined||t===null)return;var r=n[0],i;for(i in r)r.hasOwnProperty(i)&&i!=="_keys"&&(t=e.lib.replaceAll(t,i,r[i]));return t},format:function(t,n){if(t===undefined||t===null)return;return e.lib.vsprintf(t,n)},striptags:function(t){if(t===undefined||t===null)return;return e.lib.strip_tags(t)},escape:function(e){if(e===undefined||e===null)return;return e.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")},e:function(t){return e.filters.escape(t)},nl2br:function(t){if(t===undefined||t===null)return;var n="BACKSLASH_n_replace",r="<br />"+n;return t=e.filters.escape(t).replace(/\r\n/g,r).replace(/\r/g,r).replace(/\n/g,r),e.lib.replaceAll(t,n,"\n")},number_format:function(e,t){var n=e,r=t&&t[0]?t[0]:undefined,i=t&&t[1]!==undefined?t[1]:".",s=t&&t[2]!==undefined?t[2]:",";n=(n+"").replace(/[^0-9+\-Ee.]/g,"");var o=isFinite(+n)?+n:0,u=isFinite(+r)?Math.abs(r):0,a="",f=function(e,t){var n=Math.pow(10,t);return""+Math.round(e*n)/n};return a=(u?f(o,u):""+Math.round(o)).split("."),a[0].length>3&&(a[0]=a[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,s)),(a[1]||"").length<u&&(a[1]=a[1]||"",a[1]+=(new Array(u-a[1].length+1)).join("0")),a.join(i)},trim:function(t,n){if(t===undefined||t===null)return;var r=e.filters.escape(""+t),i;n&&n[0]?i=""+n[0]:i=" \n\r \f            ​\u2028\u2029 ";for(var s=0;s<r.length;s++)if(i.indexOf(r.charAt(s))===-1){r=r.substring(s);break}for(s=r.length-1;s>=0;s--)if(i.indexOf(r.charAt(s))===-1){r=r.substring(0,s+1);break}return i.indexOf(r.charAt(0))===-1?r:""},slice:function(t,n){if(t===undefined||t===null)return;if(n===undefined||n.length<1)throw new e.Error("slice filter expects at least 1 argument");var r=n[0]||0,i=n.length>1?n[1]:t.length,s=r>=0?r:Math.max(t.length+r,0);if(e.lib.is("Array",t)){var o=[];for(var u=s;u<s+i&&u<t.length;u++)o.push(t[u]);return o}if(e.lib.is("String",t))return t.substr(s,i);throw new e.Error("slice filter expects value to be an array or string")},abs:function(e){if(e===undefined||e===null)return;return Math.abs(e)},first:function(e){if(e instanceof Array)return e[0];if(e instanceof Object){if("_keys"in e)return e[e._keys[0]]}else if(typeof e=="string")return e.substr(0,1);return},split:function(t,n){if(t===undefined||t===null)return;if(n===undefined||n.length<1||n.length>2)throw new e.Error("split filter expects 1 or 2 argument");if(e.lib.is("String",t)){var r=n[0],i=n[1],s=t.split(r);if(i===undefined)return s;if(i<0)return t.split(r,s.length+i);var o=[];if(r=="")while(s.length>0){var u="";for(var a=0;a<i&&s.length>0;a++)u+=s.shift();o.push(u)}else{for(var a=0;a<i-1&&s.length>0;a++)o.push(s.shift());s.length>0&&o.push(s.join(r))}return o}throw new e.Error("split filter expects value to be a string")},last:function(t){if(e.lib.is("Object",t)){var n;return t._keys===undefined?n=Object.keys(t):n=t._keys,t[n[n.length-1]]}return t[t.length-1]},raw:function(e){return e},batch:function(t,n){var r=n.shift(),i=n.shift(),s,o,u;if(!e.lib.is("Array",t))throw new e.Error("batch filter expects items to be an array");if(!e.lib.is("Number",r))throw new e.Error("batch filter expects size to be a number");r=Math.ceil(r),s=e.lib.chunkArray(t,r);if(i&&t.length%r!=0){o=s.pop(),u=r-o.length;while(u--)o.push(i);s.push(o)}return s},round:function(t,n){n=n||[];var r=n.length>0?n[0]:0,i=n.length>1?n[1]:"common";t=parseFloat(t);if(r&&!e.lib.is("Number",r))throw new e.Error("round filter expects precision to be a number");if(i==="common")return e.lib.round(t,r);if(!e.lib.is("Function",Math[i]))throw new e.Error("round filter expects method to be 'floor', 'ceil', or 'common'");return Math[i](t*Math.pow(10,r))/Math.pow(10,r)}},e.filter=function(t,n,r){if(!e.filters[t])throw"Unable to find filter "+t;return e.filters[t].apply(this,[n,r])},e.filter.extend=function(t,n){e.filters[t]=n},e}(Twig||{}),Twig=function(e){function t(e,t){var n=Object.prototype.toString.call(t).slice(8,-1);return t!==undefined&&t!==null&&n===e}return e.functions={range:function(e,t,n){var r=[],i,s,o,u=n||1,a=!1;!isNaN(e)&&!isNaN(t)?(i=parseInt(e,10),s=parseInt(t,10)):isNaN(e)&&isNaN(t)?(a=!0,i=e.charCodeAt(0),s=t.charCodeAt(0)):(i=isNaN(e)?0:e,s=isNaN(t)?0:t),o=i>s?!1:!0;if(o)while(i<=s)r.push(a?String.fromCharCode(i):i),i+=u;else while(i>=s)r.push(a?String.fromCharCode(i):i),i-=u;return r},cycle:function(e,t){var n=t%e.length;return e[n]},dump:function(){var t="\n",n=" ",r=0,i="",s=Array.prototype.slice.call(arguments),o=function(e){var t="";while(e>0)e--,t+=n;return t},u=function(e){i+=o(r),typeof e=="object"?a(e):typeof e=="function"?i+="function()"+t:typeof e=="string"?i+="string("+e.length+') "'+e+'"'+t:typeof e=="number"?i+="number("+e+")"+t:typeof e=="boolean"&&(i+="bool("+e+")"+t)},a=function(e){var n;if(e===null)i+="NULL"+t;else if(e===undefined)i+="undefined"+t;else if(typeof e=="object"){i+=o(r)+typeof e,r++,i+="("+function(e){var t=0,n;for(n in e)e.hasOwnProperty(n)&&t++;return t}(e)+") {"+t;for(n in e)i+=o(r)+"["+n+"]=> "+t,u(e[n]);r--,i+=o(r)+"}"+t}else u(e)};return s.length==0&&s.push(this.context),e.forEach(s,function(e){a(e)}),i},date:function(t,n){var r;if(t===undefined)r=new Date;else if(e.lib.is("Date",t))r=t;else if(e.lib.is("String",t))r=new Date(e.lib.strtotime(t)*1e3);else{if(!e.lib.is("Number",t))throw new e.Error("Unable to parse date "+t);r=new Date(t*1e3)}return r},block:function(e){return this.blocks[e]},parent:function(){return e.placeholders.parent},attribute:function(e,t,n){return e instanceof Object&&e.hasOwnProperty(t)?typeof e[t]=="function"?e[t].apply(undefined,n):e[t]:e[t]||undefined}},e._function=function(t,n,r){if(!e.functions[t])throw"Unable to find function "+t;return e.functions[t](n,r)},e._function.extend=function(t,n){e.functions[t]=n},e}(Twig||{}),Twig=function(e){return e.tests={empty:function(e){if(e===null||e===undefined)return!0;if(typeof e=="number")return!1;if(e.length&&e.length>0)return!1;for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},odd:function(e){return e%2===1},even:function(e){return e%2===0},divisibleby:function(e,t){return e%t[0]===0},defined:function(e){return e!==undefined},none:function(e){return e===null},"null":function(e){return this.none(e)},sameas:function(e,t){return e===t[0]}},e.test=function(t,n,r){if(!e.tests[t])throw"Test "+t+" is not defined.";return e.tests[t](n,r)},e.test.extend=function(t,n){e.tests[t]=n},e}(Twig||{}),Twig=function(e){return e.exports={VERSION:e.VERSION},e.exports.twig=function(n){var r=n.id,i={strict_variables:n.strict_variables||!1,allowInlineIncludes:n.allowInlineIncludes||!1,rethrow:n.rethrow||!1};r&&e.validateId(r),n.debug!==undefined&&(e.debug=n.debug),n.trace!==undefined&&(e.trace=n.trace);if(n.data!==undefined)return new e.Template({data:n.data,module:n.module,id:r,options:i});if(n.ref!==undefined){if(n.id!==undefined)throw new e.Error("Both ref and id cannot be set on a twig.js template.");return e.Templates.load(n.ref)}if(n.href!==undefined)return e.Templates.loadRemote(n.href,{id:r,method:"ajax",base:n.base,module:n.module,precompiled:n.precompiled,async:n.async,options:i},n.load,n.error);if(n.path!==undefined)return e.Templates.loadRemote(n.path,{id:r,method:"fs",base:n.base,module:n.module,precompiled:n.precompiled,async:n.async,options:i},n.load,n.error)},e.exports.extendFilter=function(t,n){e.filter.extend(t,n)},e.exports.extendFunction=function(t,n){e._function.extend(t,n)},e.exports.extendTest=function(t,n){e.test.extend(t,n)},e.exports.extendTag=function(t){e.logic.extend(t)},e.exports.extend=function(t){t(e)},e.exports.compile=function(t,n){var r=n.filename,i=n.filename,s;return s=new e.Template({data:t,path:i,id:r,options:n.settings["twig options"]}),function(e){return s.render(e)}},e.exports.renderFile=function(t,n,r){"function"==typeof n&&(r=n,n={}),n=n||{};var i={path:t,base:n.settings.views,load:function(e){r(null,e.render(n))}},s=n.settings["twig options"];if(s)for(var o in s)s.hasOwnProperty(o)&&(i[o]=s[o]);e.exports.twig(i)},e.exports.__express=e.exports.renderFile,e.exports.cache=function(t){e.cache=t},e}(Twig||{}),Twig=function(e){return e.compiler={module:{}},e.compiler.compile=function(t,n){var r=JSON.stringify(t.tokens),i=t.id,s;if(n.module){if(e.compiler.module[n.module]===undefined)throw new e.Error("Unable to find module type "+n.module);s=e.compiler.module[n.module](i,r,n.twig)}else s=e.compiler.wrap(i,r);return s},e.compiler.module={amd:function(t,n,r){return'define(["'+r+'"], function (Twig) {\n var twig, templates;\ntwig = Twig.twig;\ntemplates = '+e.compiler.wrap(t,n)+"\n return templates;\n});"},node:function(t,n){return'var twig = require("twig").twig;\nexports.template = '+e.compiler.wrap(t,n)},cjs2:function(t,n,r){return'module.declare([{ twig: "'+r+'" }], function (require, exports, module) {\n'+' var twig = require("twig").twig;\n'+" exports.template = "+e.compiler.wrap(t,n)+"\n});"}},e.compiler.wrap=function(e,t){return'twig({id:"'+e.replace('"','\\"')+'", data:'+t+", precompiled: true});\n"},e}(Twig||{});typeof module!="undefined"&&module.declare?module.declare([],function(e,t,n){for(key in Twig.exports)Twig.exports.hasOwnProperty(key)&&(t[key]=Twig.exports[key])}):typeof define=="function"&&define.amd||1?timely.define("external_libs/twig",[],function(){return Twig.exports}):typeof module!="undefined"&&module.exports?module.exports=Twig.exports:(window.twig=Twig.exports.twig,window.Twig=Twig.exports);
6
  * @link https://github.com/justjohn/twig.js
7
  */
8
 
 
9
  // Copyright (c) 2011-2013 John Roepke
 
 
10
 
 
11
  // [MIT License](http://www.opensource.org/licenses/mit-license.php) or are
12
+
13
  // [Public Domain](https://developer.mozilla.org/Project:Copyrights).
 
 
 
14
 
 
 
 
 
15
  // Copies of the licenses for the code included here can be found in the
 
 
16
 
17
  /**
18
  * jPaq - A fully customizable JavaScript/JScript library
26
  * Revised: April 6, 2011
27
  */
28
 
 
 
 
 
 
 
29
  var Twig=function(e){return e.VERSION="0.7.2",e}(Twig||{}),Twig=function(e){function t(e,t){var n=Object.prototype.toString.call(t).slice(8,-1);return t!==undefined&&t!==null&&n===e}function n(t,n){var r,i,s="/",o=[],u;if(t.url)typeof t.base!="undefined"?r=t.base+(t.base.charAt(t.base.length-1)==="/"?"":"/"):r=t.url;else{if(!t.path)throw new e.Error("Cannot extend an inline template.");var a=require("path"),f=a.sep||s,l=new RegExp("^\\.{1,2}"+f.replace("\\","\\\\"));n=n.replace(/\//g,f),t.base!==undefined&&n.match(l)==null?(n=n.replace(t.base,""),r=t.base+f):r=t.path,r=r.replace(f+f,f),s=f}i=r.split(s),i.pop(),i=i.concat(n.split(s));while(i.length>0)u=i.shift(),u!="."&&(u==".."&&o.length>0&&o[o.length-1]!=".."?o.pop():o.push(u));return o.join(s)}return e.trace=!1,e.debug=!1,e.cache=!0,e.placeholders={parent:"{{|PARENT|}}"},e.indexOf=function(e,t){if(Array.prototype.hasOwnProperty("indexOf"))return e.indexOf(t);if(e===void 0||e===null)throw new TypeError;var n=Object(e),r=n.length>>>0;if(r===0)return-1;var i=0;arguments.length>0&&(i=Number(arguments[1]),i!==i?i=0:i!==0&&i!==Infinity&&i!==-Infinity&&(i=(i>0||-1)*Math.floor(Math.abs(i))));if(i>=r)return-1;var s=i>=0?i:Math.max(r-Math.abs(i),0);for(;s<r;s++)if(s in n&&n[s]===t)return s;return e==t?0:-1},e.forEach=function(e,t,n){if(Array.prototype.forEach)return e.forEach(t,n);var r,i;if(e==null)throw new TypeError(" this is null or not defined");var s=Object(e),o=s.length>>>0;if({}.toString.call(t)!="[object Function]")throw new TypeError(t+" is not a function");n&&(r=n),i=0;while(i<o){var u;i in s&&(u=s[i],t.call(r,u,i,s)),i++}},e.Error=function(e){this.message=e,this.name="TwigException",this.type="TwigException"},e.Error.prototype.toString=function(){var e=this.name+": "+this.message;return e},e.log={trace:function(){e.trace&&console&&console.log(Array.prototype.slice.call(arguments))},debug:function(){e.debug&&console&&console.log(Array.prototype.slice.call(arguments))}},typeof console!="undefined"&&typeof console.log!="undefined"?e.log.error=function(){console.log.apply(console,arguments)}:e.log.error=function(){},e.token={},e.token.type={output:"output",logic:"logic",comment:"comment",raw:"raw"},e.token.definitions=[{type:e.token.type.raw,open:"{% raw %}",close:"{% endraw %}"},{type:e.token.type.output,open:"{{",close:"}}"},{type:e.token.type.logic,open:"{%",close:"%}"},{type:e.token.type.comment,open:"{#",close:"#}"}],e.token.strings=['"',"'"],e.token.findStart=function(t){var n={position:null,def:null},r,i,s;for(r=0;r<e.token.definitions.length;r++)i=e.token.definitions[r],s=t.indexOf(i.open),e.log.trace("Twig.token.findStart: ","Searching for ",i.open," found at ",s),s>=0&&(n.position===null||s<n.position)&&(n.position=s,n.def=i);return n},e.token.findEnd=function(t,n,r){var i=null,s=!1,o=0,u=null,a=null,f=null,l=null,c=null,h=null,p,d;while(!s){u=null,a=null,f=t.indexOf(n.close,o);if(!(f>=0))throw new e.Error("Unable to find closing bracket '"+n.close+"'"+" opened near template position "+r);i=f,s=!0;if(n.type===e.token.type.comment)break;d=e.token.strings.length;for(p=0;p<d;p+=1)c=t.indexOf(e.token.strings[p],o),c>0&&c<f&&(u===null||c<u)&&(u=c,a=e.token.strings[p]);if(u!==null){l=u+1,i=null,s=!1;for(;;){h=t.indexOf(a,l);if(h<0)throw"Unclosed string in template";if(t.substr(h-1,1)!=="\\"){o=h+1;break}l=h+1}}}return i},e.tokenize=function(t){var n=[],r=0,i=null,s=null;while(t.length>0)i=e.token.findStart(t),e.log.trace("Twig.tokenize: ","Found token: ",i),i.position!==null?(i.position>0&&n.push({type:e.token.type.raw,value:t.substring(0,i.position)}),t=t.substr(i.position+i.def.open.length),r+=i.position+i.def.open.length,s=e.token.findEnd(t,i.def,r),e.log.trace("Twig.tokenize: ","Token ends at ",s),n.push({type:i.def.type,value:t.substring(0,s).trim()}),i.def.type==="logic"&&t.substr(s+i.def.close.length,1)==="\n"&&(s+=1),t=t.substr(s+i.def.close.length),r+=s+i.def.close.length):(n.push({type:e.token.type.raw,value:t}),t="");return n},e.compile=function(t){try{var n=[],r=[],i=[],s=null,o=null,u=null,a=null,f=null,l=null,c=null,h=null,p=null;while(t.length>0){s=t.shift(),e.log.trace("Compiling token ",s);switch(s.type){case e.token.type.raw:r.length>0?i.push(s):n.push(s);break;case e.token.type.logic:o=e.logic.compile.apply(this,[s]),c=o.type,h=e.logic.handler[c].open,p=e.logic.handler[c].next,e.log.trace("Twig.compile: ","Compiled logic token to ",o," next is: ",p," open is : ",h);if(h!==undefined&&!h){a=r.pop(),f=e.logic.handler[a.type];if(e.indexOf(f.next,c)<0)throw new Error(c+" not expected after a "+a.type);a.output=a.output||[],a.output=a.output.concat(i),i=[],l={type:e.token.type.logic,token:a},r.length>0?i.push(l):n.push(l)}p!==undefined&&p.length>0?(e.log.trace("Twig.compile: ","Pushing ",o," to logic stack."),r.length>0&&(a=r.pop(),a.output=a.output||[],a.output=a.output.concat(i),r.push(a),i=[]),r.push(o)):h!==undefined&&h&&(l={type:e.token.type.logic,token:o},r.length>0?i.push(l):n.push(l));break;case e.token.type.comment:break;case e.token.type.output:e.expression.compile.apply(this,[s]),r.length>0?i.push(s):n.push(s)}e.log.trace("Twig.compile: "," Output: ",n," Logic Stack: ",r," Pending Output: ",i)}if(r.length>0)throw u=r.pop(),new Error("Unable to find an end tag for "+u.type+", expecting one of "+u.next);return n}catch(d){e.log.error("Error compiling twig template "+this.id+": "),d.stack?e.log.error(d.stack):e.log.error(d.toString());if(this.options.rethrow)throw d}},e.parse=function(t,n){try{var r=[],i=!0,s=this;return n=n||{},e.forEach(t,function(o){e.log.debug("Twig.parse: ","Parsing token: ",o);switch(o.type){case e.token.type.raw:r.push(o.value);break;case e.token.type.logic:var u=o.token,a=e.logic.parse.apply(s,[u,n,i]);a.chain!==undefined&&(i=a.chain),a.context!==undefined&&(n=a.context),a.output!==undefined&&r.push(a.output);break;case e.token.type.comment:break;case e.token.type.output:e.log.debug("Twig.parse: ","Output token: ",o.stack),r.push(e.expression.parse.apply(s,[o.stack,n]))}}),r.join("")}catch(o){e.log.error("Error parsing twig template "+this.id+": "),o.stack?e.log.error(o.stack):e.log.error(o.toString());if(this.options.rethrow)throw o;if(e.debug)return o.toString()}},e.prepare=function(t){var n,r;return e.log.debug("Twig.prepare: ","Tokenizing ",t),r=e.tokenize.apply(this,[t]),e.log.debug("Twig.prepare: ","Compiling ",r),n=e.compile.apply(this,[r]),e.log.debug("Twig.prepare: ","Compiled ",n),n},e.Templates={registry:{}},e.validateId=function(t){if(t==="prototype")throw new e.Error(t+" is not a valid twig identifier");if(e.Templates.registry.hasOwnProperty(t))throw new e.Error("There is already a template with the ID "+t);return!0},e.Templates.save=function(t){if(t.id===undefined)throw new e.Error("Unable to save template with no id");e.Templates.registry[t.id]=t},e.Templates.load=function(t){return e.Templates.registry.hasOwnProperty(t)?e.Templates.registry[t]:null},e.Templates.loadRemote=function(t,n,r,i){var s=n.id,o=n.method,u=n.async,a=n.precompiled,f=null;u===undefined&&(u=!0),s===undefined&&(s=t),n.id=s;if(e.cache&&e.Templates.registry.hasOwnProperty(s))return r&&r(e.Templates.registry[s]),e.Templates.registry[s];if(o=="ajax"){if(typeof XMLHttpRequest=="undefined")throw new e.Error("Unsupported platform: Unable to do remote requests because there is no XMLHTTPRequest implementation");var l=new XMLHttpRequest;l.onreadystatechange=function(){var s=null;l.readyState==4&&(l.status==200?(e.log.debug("Got template ",l.responseText),a===!0?s=JSON.parse(l.responseText):s=l.responseText,n.url=t,n.data=s,f=new e.Template(n),r&&r(f)):i&&i(l))},l.open("GET",t,u),l.send()}else(function(){var s=require("fs"),o=require("path"),l=null,c=function(s,o){if(s){i&&i(s);return}a===!0&&(o=JSON.parse(o)),n.data=o,n.path=t,f=new e.Template(n),r&&r(f)};if(u===!0)s.stat(t,function(n,r){if(n||!r.isFile())throw new e.Error("Unable to find template file "+t);s.readFile(t,"utf8",c)});else{if(!s.statSync(t).isFile())throw new e.Error("Unable to find template file "+t);l=s.readFileSync(t,"utf8"),c(undefined,l)}})();return u===!1?f:!0},e.Template=function(n){var r=n.data,i=n.id,s=n.blocks,o=n.macros||{},u=n.base,a=n.path,f=n.url,l=n.options;this.id=i,this.base=u,this.path=a,this.url=f,this.macros=o,this.options=l,this.reset(s),t("String",r)?this.tokens=e.prepare.apply(this,[r]):this.tokens=r,i!==undefined&&e.Templates.save(this)},e.Template.prototype.reset=function(t){e.log.debug("Twig.Template.reset","Reseting template "+this.id),this.blocks={},this.child={blocks:t||{}},this.extend=null},e.Template.prototype.render=function(t,r){r=r||{};var i,s;this.context=t||{},this.reset(),r.blocks&&(this.blocks=r.blocks),r.macros&&(this.macros=r.macros),i=e.parse.apply(this,[this.tokens,this.context]);if(this.extend){var o;return this.options.allowInlineIncludes&&(o=e.Templates.load(this.extend),o&&(o.options=this.options)),o||(s=n(this,this.extend),o=e.Templates.loadRemote(s,{method:this.url?"ajax":"fs",base:this.base,async:!1,id:s,options:this.options})),this.parent=o,this.parent.render(this.context,{blocks:this.blocks})}return r.output=="blocks"?this.blocks:r.output=="macros"?this.macros:i},e.Template.prototype.importFile=function(t){var r,i;if(!this.url&&!this.path&&this.options.allowInlineIncludes){i=e.Templates.load(t),i.options=this.options;if(i)return i;throw new e.Error("Didn't find the inline template by id")}return r=n(this,t),i=e.Templates.loadRemote(r,{method:this.url?"ajax":"fs",base:this.base,async:!1,options:this.options,id:r}),i},e.Template.prototype.importBlocks=function(t,n){var r=this.importFile(t),i=this.context,s=this,o;n=n||!1,r.render(i),e.forEach(Object.keys(r.blocks),function(e){if(n||s.blocks[e]===undefined)s.blocks[e]=r.blocks[e]})},e.Template.prototype.importMacros=function(t){var r=n(this,t),i=e.Templates.loadRemote(r,{method:this.url?"ajax":"fs",async:!1,id:r});return i},e.Template.prototype.compile=function(t){return e.compiler.compile(this,t)},e}(Twig||{});(function(){String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),Object.keys||(Object.keys=function(e){if(e!==Object(e))throw new TypeError("Object.keys called on non-object");var t=[],n;for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t})})();var Twig=function(e){e.lib={};var t=function(){function e(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function n(e,t){for(var n=[];t>0;n[--t]=e);return n.join("")}var r=function(){return r.cache.hasOwnProperty(arguments[0])||(r.cache[arguments[0]]=r.parse(arguments[0])),r.format.call(null,r.cache[arguments[0]],arguments)};return r.format=function(r,i){var s=1,o=r.length,u="",a,f=[],l,c,h,p,d,v;for(l=0;l<o;l++){u=e(r[l]);if(u==="string")f.push(r[l]);else if(u==="array"){h=r[l];if(h[2]){a=i[s];for(c=0;c<h[2].length;c++){if(!a.hasOwnProperty(h[2][c]))throw t('[sprintf] property "%s" does not exist',h[2][c]);a=a[h[2][c]]}}else h[1]?a=i[h[1]]:a=i[s++];if(/[^s]/.test(h[8])&&e(a)!="number")throw t("[sprintf] expecting number but found %s",e(a));switch(h[8]){case"b":a=a.toString(2);break;case"c":a=String.fromCharCode(a);break;case"d":a=parseInt(a,10);break;case"e":a=h[7]?a.toExponential(h[7]):a.toExponential();break;case"f":a=h[7]?parseFloat(a).toFixed(h[7]):parseFloat(a);break;case"o":a=a.toString(8);break;case"s":a=(a=String(a))&&h[7]?a.substring(0,h[7]):a;break;case"u":a=Math.abs(a);break;case"x":a=a.toString(16);break;case"X":a=a.toString(16).toUpperCase()}a=/[def]/.test(h[8])&&h[3]&&a>=0?"+"+a:a,d=h[4]?h[4]=="0"?"0":h[4].charAt(1):" ",v=h[6]-String(a).length,p=h[6]?n(d,v):"",f.push(h[5]?a+p:p+a)}}return f.join("")},r.cache={},r.parse=function(e){var t=e,n=[],r=[],i=0;while(t){if((n=/^[^\x25]+/.exec(t))!==null)r.push(n[0]);else if((n=/^\x25{2}/.exec(t))!==null)r.push("%");else{if((n=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(t))===null)throw"[sprintf] huh?";if(n[2]){i|=1;var s=[],o=n[2],u=[];if((u=/^([a-z_][a-z_\d]*)/i.exec(o))===null)throw"[sprintf] huh?";s.push(u[1]);while((o=o.substring(u[0].length))!=="")if((u=/^\.([a-z_][a-z_\d]*)/i.exec(o))!==null)s.push(u[1]);else{if((u=/^\[(\d+)\]/.exec(o))===null)throw"[sprintf] huh?";s.push(u[1])}n[2]=s}else i|=2;if(i===3)throw"[sprintf] mixing positional and named placeholders is not (yet) supported";r.push(n)}t=t.substring(n[0].length)}return r},r}(),n=function(e,n){return n.unshift(e),t.apply(null,n)};return e.lib.sprintf=t,e.lib.vsprintf=n,function(){function s(e){return(e=Math.abs(e)%100)%10==1&&e!=11?"st":e%10==2&&e!=12?"nd":e%10==3&&e!=13?"rd":"th"}function o(e){var t=new Date(e.getFullYear()+1,0,4);return(t-e)/864e5<7&&(e.getDay()+6)%7<(t.getDay()+6)%7?t.getFullYear():e.getMonth()>0||e.getDate()>=4?e.getFullYear():e.getFullYear()-((e.getDay()+6)%7-e.getDate()>2?1:0)}function u(e){var t=new Date(o(e),0,4);return t.setDate(t.getDate()-(t.getDay()+6)%7),parseInt((e-t)/6048e5)+1}var t="Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),n="Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),r="Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),i="January,February,March,April,May,June,July,August,September,October,November,December".split(",");e.lib.formatDate=function(e,a){if(typeof a!="string"||/^\s*$/.test(a))return e+"";var f=new Date(e.getFullYear(),0,1),l=e;return a.replace(/[dDjlNSwzWFmMntLoYyaABgGhHisuU]/g,function(e){switch(e){case"d":return("0"+l.getDate()).replace(/^.+(..)$/,"$1");case"D":return t[l.getDay()];case"j":return l.getDate();case"l":return n[l.getDay()];case"N":return(l.getDay()+6)%7+1;case"S":return s(l.getDate());case"w":return l.getDay();case"z":return Math.ceil((f-l)/864e5);case"W":return("0"+u(l)).replace(/^.(..)$/,"$1");case"F":return i[l.getMonth()];case"m":return("0"+(l.getMonth()+1)).replace(/^.+(..)$/,"$1");case"M":return r[l.getMonth()];case"n":return l.getMonth()+1;case"t":return(new Date(l.getFullYear(),l.getMonth()+1,-1)).getDate();case"L":return(new Date(l.getFullYear(),1,29)).getDate()==29?1:0;case"o":return o(l);case"Y":return l.getFullYear();case"y":return(l.getFullYear()+"").replace(/^.+(..)$/,"$1");case"a":return l.getHours()<12?"am":"pm";case"A":return l.getHours()<12?"AM":"PM";case"B":return Math.floor(((l.getUTCHours()+1)%24+l.getUTCMinutes()/60+l.getUTCSeconds()/3600)*1e3/24);case"g":return l.getHours()%12!=0?l.getHours()%12:12;case"G":return l.getHours();case"h":return("0"+(l.getHours()%12!=0?l.getHours()%12:12)).replace(/^.+(..)$/,"$1");case"H":return("0"+l.getHours()).replace(/^.+(..)$/,"$1");case"i":return("0"+l.getMinutes()).replace(/^.+(..)$/,"$1");case"s":return("0"+l.getSeconds()).replace(/^.+(..)$/,"$1");case"u":return l.getMilliseconds();case"U":return l.getTime()/1e3}})}}(),e.lib.strip_tags=function(e,t){t=(((t||"")+"").toLowerCase().match(/<[a-z][a-z0-9]*>/g)||[]).join("");var n=/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,r=/<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi;return e.replace(r,"").replace(n,function(e,n){return t.indexOf("<"+n.toLowerCase()+">")>-1?e:""})},e.lib.parseISO8601Date=function(e){var t=/(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d):(\d\d)(\.\d+)?(Z|([+-])(\d\d):(\d\d))/,n=[];n=e.match(t);if(!n)throw"Couldn't parse ISO 8601 date string '"+e+"'";var r=[1,2,3,4,5,6,10,11];for(var i in r)n[r[i]]=parseInt(n[r[i]],10);n[7]=parseFloat(n[7]);var s=Date.UTC(n[1],n[2]-1,n[3],n[4],n[5],n[6]);n[7]>0&&(s+=Math.round(n[7]*1e3));if(n[8]!="Z"&&n[10]){var o=n[10]*60*60*1e3;n[11]&&(o+=n[11]*60*1e3),n[9]=="-"?s-=o:s+=o}return new Date(s)},e.lib.strtotime=function(t,n){var r,i,s,o,u="";t=t.replace(/\s{2,}|^\s|\s$/g," "),t=t.replace(/[\t\r\n]/g,"");if(t==="now")return n===null||isNaN(n)?(new Date).getTime()/1e3|0:n|0;if(!isNaN(u=Date.parse(t)))return u/1e3|0;n?n=new Date(n*1e3):n=new Date;var a=t;t=t.toLowerCase();var f={day:{sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},mon:["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"]},l=function(e){var t=e[2]&&e[2]==="ago",r=(r=e[0]==="last"?-1:1)*(t?-1:1);switch(e[0]){case"last":case"next":switch(e[1].substring(0,3)){case"yea":n.setFullYear(n.getFullYear()+r);break;case"wee":n.setDate(n.getDate()+r*7);break;case"day":n.setDate(n.getDate()+r);break;case"hou":n.setHours(n.getHours()+r);break;case"min":n.setMinutes(n.getMinutes()+r);break;case"sec":n.setSeconds(n.getSeconds()+r);break;case"mon":if(e[1]==="month"){n.setMonth(n.getMonth()+r);break};default:var i=f.day[e[1].substring(0,3)];if(typeof i!="undefined"){var s=i-n.getDay();s===0?s=7*r:s>0?e[0]==="last"&&(s-=7):e[0]==="next"&&(s+=7),n.setDate(n.getDate()+s),n.setHours(0,0,0,0)}}break;default:if(!/\d+/.test(e[0]))return!1;r*=parseInt(e[0],10);switch(e[1].substring(0,3)){case"yea":n.setFullYear(n.getFullYear()+r);break;case"mon":n.setMonth(n.getMonth()+r);break;case"wee":n.setDate(n.getDate()+r*7);break;case"day":n.setDate(n.getDate()+r);break;case"hou":n.setHours(n.getHours()+r);break;case"min":n.setMinutes(n.getMinutes()+r);break;case"sec":n.setSeconds(n.getSeconds()+r)}}return!0};s=t.match(/^(\d{2,4}-\d{2}-\d{2})(?:\s(\d{1,2}:\d{2}(:\d{2})?)?(?:\.(\d+))?)?$/);if(s!==null)return s[2]?s[3]||(s[2]+=":00"):s[2]="00:00:00",o=s[1].split(/-/g),o[1]=f.mon[o[1]-1]||o[1],o[0]=+o[0],o[0]=o[0]>=0&&o[0]<=69?"20"+(o[0]<10?"0"+o[0]:o[0]+""):o[0]>=70&&o[0]<=99?"19"+o[0]:o[0]+"",parseInt(this.strtotime(o[2]+" "+o[1]+" "+o[0]+" "+s[2])+(s[4]?s[4]/1e3:""),10);var c="([+-]?\\d+\\s(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?|sun\\.?|sunday|mon\\.?|monday|tue\\.?|tuesday|wed\\.?|wednesday|thu\\.?|thursday|fri\\.?|friday|sat\\.?|saturday)|(last|next)\\s(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?|sun\\.?|sunday|mon\\.?|monday|tue\\.?|tuesday|wed\\.?|wednesday|thu\\.?|thursday|fri\\.?|friday|sat\\.?|saturday))(\\sago)?";s=t.match(new RegExp(c,"gi"));if(s===null){try{num=e.lib.parseISO8601Date(a);if(num)return num/1e3|0}catch(h){return!1}return!1}for(r=0,i=s.length;r<i;r++)if(!l(s[r].split(" ")))return!1;return n.getTime()/1e3|0},e.lib.is=function(e,t){var n=Object.prototype.toString.call(t).slice(8,-1);return t!==undefined&&t!==null&&n===e},e.lib.copy=function(e){var t={},n;for(n in e)t[n]=e[n];return t},e.lib.replaceAll=function(e,t,n){return e.split(t).join(n)},e.lib.chunkArray=function(t,n){var r=[],i=0,s=t.length;if(n<1||!e.lib.is("Array",t))return[];while(i<s)r.push(t.slice(i,i+=n));return r},e.lib.round=function(t,n,r){var i,s,o,u;n|=0,i=Math.pow(10,n),t*=i,u=t>0|-(t<0),o=t%1===.5*u,s=Math.floor(t);if(o)switch(r){case"PHP_ROUND_HALF_DOWN":t=s+(u<0);break;case"PHP_ROUND_HALF_EVEN":t=s+s%2*u;break;case"PHP_ROUND_HALF_ODD":t=s+!(s%2);break;default:t=s+(u>0)}return(o?t:Math.round(t))/i},e}(Twig||{}),Twig=function(e){e.logic={},e.logic.type={if_:"Twig.logic.type.if",endif:"Twig.logic.type.endif",for_:"Twig.logic.type.for",endfor:"Twig.logic.type.endfor",else_:"Twig.logic.type.else",elseif:"Twig.logic.type.elseif",set:"Twig.logic.type.set",setcapture:"Twig.logic.type.setcapture",endset:"Twig.logic.type.endset",filter:"Twig.logic.type.filter",endfilter:"Twig.logic.type.endfilter",block:"Twig.logic.type.block",endblock:"Twig.logic.type.endblock",extends_:"Twig.logic.type.extends",use:"Twig.logic.type.use",include:"Twig.logic.type.include",spaceless:"Twig.logic.type.spaceless",endspaceless:"Twig.logic.type.endspaceless",macro:"Twig.logic.type.macro",endmacro:"Twig.logic.type.endmacro",import_:"Twig.logic.type.import",from:"Twig.logic.type.from"},e.logic.definitions=[{type:e.logic.type.if_,regex:/^if\s+([^\s].+)$/,next:[e.logic.type.else_,e.logic.type.elseif,e.logic.type.endif],open:!0,compile:function(t){var n=t.match[1];return t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:n}]).stack,delete t.match,t},parse:function(t,n,r){var i="",s=e.expression.parse.apply(this,[t.stack,n]);return r=!0,s&&(r=!1,i=e.parse.apply(this,[t.output,n])),{chain:r,output:i}}},{type:e.logic.type.elseif,regex:/^elseif\s+([^\s].*)$/,next:[e.logic.type.else_,e.logic.type.elseif,e.logic.type.endif],open:!1,compile:function(t){var n=t.match[1];return t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:n}]).stack,delete t.match,t},parse:function(t,n,r){var i="";return r&&e.expression.parse.apply(this,[t.stack,n])===!0&&(r=!1,i=e.parse.apply(this,[t.output,n])),{chain:r,output:i}}},{type:e.logic.type.else_,regex:/^else$/,next:[e.logic.type.endif,e.logic.type.endfor],open:!1,parse:function(t,n,r){var i="";return r&&(i=e.parse.apply(this,[t.output,n])),{chain:r,output:i}}},{type:e.logic.type.endif,regex:/^endif$/,next:[],open:!1},{type:e.logic.type.for_,regex:/^for\s+([a-zA-Z0-9_,\s]+)\s+in\s+([^\s].*?)(?:\s+if\s+([^\s].*))?$/,next:[e.logic.type.else_,e.logic.type.endfor],open:!0,compile:function(t){var n=t.match[1],r=t.match[2],i=t.match[3],s=null;t.key_var=null,t.value_var=null;if(n.indexOf(",")>=0){s=n.split(",");if(s.length!==2)throw new e.Error("Invalid expression in for loop: "+n);t.key_var=s[0].trim(),t.value_var=s[1].trim()}else t.value_var=n;return t.expression=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:r}]).stack,i&&(t.conditional=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:i}]).stack),delete t.match,t},parse:function(t,n,r){var i=e.expression.parse.apply(this,[t.expression,n]),s=[],o,u=0,a,f=this,l=t.conditional,c=function(e,t){var r=l!==undefined;return{index:e+1,index0:e,revindex:r?undefined:t-e,revindex0:r?undefined:t-e-1,first:e===0,last:r?undefined:e===t-1,length:r?undefined:t,parent:n}},h=function(r,i){var a=e.lib.copy(n);a[t.value_var]=i,t.key_var&&(a[t.key_var]=r),a.loop=c(u,o);if(l===undefined||e.expression.parse.apply(f,[l,a]))s.push(e.parse.apply(f,[t.output,a])),u+=1};return i instanceof Array?(o=i.length,e.forEach(i,function(e){var t=u;h(t,e)})):i instanceof Object&&(i._keys!==undefined?a=i._keys:a=Object.keys(i),o=a.length,e.forEach(a,function(e){if(e==="_keys")return;h(e,i[e])})),r=s.length===0,{chain:r,output:s.join("")}}},{type:e.logic.type.endfor,regex:/^endfor$/,next:[],open:!1},{type:e.logic.type.set,regex:/^set\s+([a-zA-Z0-9_,\s]+)\s*=\s*(.+)$/,next:[],open:!0,compile:function(t){var n=t.match[1].trim(),r=t.match[2],i=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:r}]).stack;return t.key=n,t.expression=i,delete t.match,t},parse:function(t,n,r){var i=e.expression.parse.apply(this,[t.expression,n]),s=t.key;return this.context[s]=i,n[s]=i,{chain:r,context:n}}},{type:e.logic.type.setcapture,regex:/^set\s+([a-zA-Z0-9_,\s]+)$/,next:[e.logic.type.endset],open:!0,compile:function(e){var t=e.match[1].trim();return e.key=t,delete e.match,e},parse:function(t,n,r){var i=e.parse.apply(this,[t.output,n]),s=t.key;return this.context[s]=i,n[s]=i,{chain:r,context:n}}},{type:e.logic.type.endset,regex:/^endset$/,next:[],open:!1},{type:e.logic.type.filter,regex:/^filter\s+(.+)$/,next:[e.logic.type.endfilter],open:!0,compile:function(t){var n="|"+t.match[1].trim();return t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:n}]).stack,delete t.match,t},parse:function(t,n,r){var i=e.parse.apply(this,[t.output,n]),s=[{type:e.expression.type.string,value:i}].concat(t.stack),o=e.expression.parse.apply(this,[s,n]);return{chain:r,output:o}}},{type:e.logic.type.endfilter,regex:/^endfilter$/,next:[],open:!1},{type:e.logic.type.block,regex:/^block\s+([a-zA-Z0-9_]+)$/,next:[e.logic.type.endblock],open:!0,compile:function(e){return e.block=e.match[1].trim(),delete e.match,e},parse:function(t,n,r){var i="",s="",o=this.blocks[t.block]&&this.blocks[t.block].indexOf(e.placeholders.parent)>-1;if(this.blocks[t.block]===undefined||o||n.loop)i=e.expression.parse.apply(this,[{type:e.expression.type.string,value:e.parse.apply(this,[t.output,n])},n]),o?this.blocks[t.block]=this.blocks[t.block].replace(e.placeholders.parent,i):this.blocks[t.block]=i;return this.child.blocks[t.block]?s=this.child.blocks[t.block]:s=this.blocks[t.block],{chain:r,output:s}}},{type:e.logic.type.endblock,regex:/^endblock(?:\s+([a-zA-Z0-9_]+))?$/,next:[],open:!1},{type:e.logic.type.extends_,regex:/^extends\s+(.+)$/,next:[],open:!0,compile:function(t){var n=t.match[1].trim();return delete t.match,t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:n}]).stack,t},parse:function(t,n,r){var i=e.expression.parse.apply(this,[t.stack,n]);return this.extend=i,{chain:r,output:""}}},{type:e.logic.type.use,regex:/^use\s+(.+)$/,next:[],open:!0,compile:function(t){var n=t.match[1].trim();return delete t.match,t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:n}]).stack,t},parse:function(t,n,r){var i=e.expression.parse.apply(this,[t.stack,n]);return this.importBlocks(i),{chain:r,output:""}}},{type:e.logic.type.include,regex:/^include\s+(ignore missing\s+)?(.+?)\s*(?:with\s+(.+?))?\s*(only)?$/,next:[],open:!0,compile:function(t){var n=t.match,r=n[1]!==undefined,i=n[2].trim(),s=n[3],o=n[4]!==undefined&&n[4].length;return delete t.match,t.only=o,t.includeMissing=r,t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:i}]).stack,s!==undefined&&(t.withStack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:s.trim()}]).stack),t},parse:function(t,n,r){var i={},s,o,u;if(!t.only)for(o in n)n.hasOwnProperty(o)&&(i[o]=n[o]);if(t.withStack!==undefined){s=e.expression.parse.apply(this,[t.withStack,n]);for(o in s)s.hasOwnProperty(o)&&(i[o]=s[o])}var a=e.expression.parse.apply(this,[t.stack,i]);return u=this.importFile(a),{chain:r,output:u.render(i)}}},{type:e.logic.type.spaceless,regex:/^spaceless$/,next:[e.logic.type.endspaceless],open:!0,parse:function(t,n,r){var i=e.parse.apply(this,[t.output,n]),s=/>\s+</g,o=i.replace(s,"><").trim();return{chain:r,output:o}}},{type:e.logic.type.endspaceless,regex:/^endspaceless$/,next:[],open:!1},{type:e.logic.type.macro,regex:/^macro\s+([a-zA-Z0-9_]+)\s?\((([a-zA-Z0-9_]+(,\s?)?)*)\)$/,next:[e.logic.type.endmacro],open:!0,compile:function(t){var n=t.match[1],r=t.match[2].split(/[ ,]+/);for(var i=0;i<r.length;i++)for(var s=0;s<r.length;s++)if(r[i]===r[s]&&i!==s)throw new e.Error("Duplicate arguments for parameter: "+r[i]);return t.macroName=n,t.parameters=r,delete t.match,t},parse:function(t,n,r){var i=this;return this.macros[t.macroName]=function(){var n={_self:i.macros};for(var r=0;r<t.parameters.length;r++){var s=t.parameters[r];typeof arguments[r]!="undefined"?n[s]=arguments[r]:n[s]=undefined}return e.parse.apply(i,[t.output,n])},{chain:r,output:""}}},{type:e.logic.type.endmacro,regex:/^endmacro$/,next:[],open:!1},{type:e.logic.type.import_,regex:/^import\s+(.+)\s+as\s+([a-zA-Z0-9_]+)$/,next:[],open:!0,compile:function(t){var n=t.match[1].trim(),r=t.match[2].trim();return delete t.match,t.expression=n,t.contextName=r,t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:n}]).stack,t},parse:function(t,n,r){if(t.expression!=="_self"){var i=e.expression.parse.apply(this,[t.stack,n]),s=this.importMacros(i||t.expression);n[t.contextName]=s.render({},{output:"macros"})}else n[t.contextName]=this.macros;return{chain:r,output:""}}},{type:e.logic.type.from,regex:/^from\s+(.+)\s+import\s+([a-zA-Z0-9_, ]+)$/,next:[],open:!0,compile:function(t){var n=t.match[1].trim(),r=t.match[2].trim().split(/[ ,]+/),i={};for(var s=0;s<r.length;s++){var o=r[s],u=o.match(/^([a-zA-Z0-9_]+)\s+(.+)\s+as\s+([a-zA-Z0-9_]+)$/);u?i[u[1].trim()]=u[2].trim():o.match(/^([a-zA-Z0-9_]+)$/)&&(i[o]=o)}return delete t.match,t.expression=n,t.macroNames=i,t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:n}]).stack,t},parse:function(t,n,r){var i;if(t.expression!=="_self"){var s=e.expression.parse.apply(this,[t.stack,n]),o=this.importMacros(s||t.expression);i=o.render({},{output:"macros"})}else i=this.macros;for(var u in t.macroNames)i.hasOwnProperty(u)&&(n[t.macroNames[u]]=i[u]);return{chain:r,output:""}}}],e.logic.handler={},e.logic.extendType=function(t,n){n=n||"Twig.logic.type"+t,e.logic.type[t]=n},e.logic.extend=function(t){if(!t.type)throw new e.Error("Unable to extend logic definition. No type provided for "+t);if(e.logic.type[t.type])throw new e.Error("Unable to extend logic definitions. Type "+t.type+" is already defined.");e.logic.extendType(t.type),e.logic.handler[t.type]=t};while(e.logic.definitions.length>0)e.logic.extend(e.logic.definitions.shift());return e.logic.compile=function(t){var n=t.value.trim(),r=e.logic.tokenize.apply(this,[n]),i=e.logic.handler[r.type];return i.compile&&(r=i.compile.apply(this,[r]),e.log.trace("Twig.logic.compile: ","Compiled logic token to ",r)),r},e.logic.tokenize=function(t){var n={},r=null,i=null,s=null,o=null,u=null,a=null;t=t.trim();for(r in e.logic.handler)if(e.logic.handler.hasOwnProperty(r)){i=e.logic.handler[r].type,s=e.logic.handler[r].regex,o=[],s instanceof Array?o=s:o.push(s);while(o.length>0){u=o.shift(),a=u.exec(t.trim());if(a!==null)return n.type=i,n.match=a,e.log.trace("Twig.logic.tokenize: ","Matched a ",i," regular expression of ",a),n}}throw new e.Error("Unable to parse '"+t.trim()+"'")},e.logic.parse=function(t,n,r){var i="",s;return n=n||{},e.log.debug("Twig.logic.parse: ","Parsing logic token ",t),s=e.logic.handler[t.type],s.parse&&(i=s.parse.apply(this,[t,n,r])),i},e}(Twig||{}),Twig=function(e){e.expression={},e.expression.reservedWords=["true","false","null","_context"],e.expression.type={comma:"Twig.expression.type.comma",operator:{unary:"Twig.expression.type.operator.unary",binary:"Twig.expression.type.operator.binary"},string:"Twig.expression.type.string",bool:"Twig.expression.type.bool",array:{start:"Twig.expression.type.array.start",end:"Twig.expression.type.array.end"},object:{start:"Twig.expression.type.object.start",end:"Twig.expression.type.object.end"},parameter:{start:"Twig.expression.type.parameter.start",end:"Twig.expression.type.parameter.end"},key:{period:"Twig.expression.type.key.period",brackets:"Twig.expression.type.key.brackets"},filter:"Twig.expression.type.filter",_function:"Twig.expression.type._function",variable:"Twig.expression.type.variable",number:"Twig.expression.type.number",_null:"Twig.expression.type.null",context:"Twig.expression.type.context",test:"Twig.expression.type.test"},e.expression.set={operations:[e.expression.type.filter,e.expression.type.operator.unary,e.expression.type.operator.binary,e.expression.type.array.end,e.expression.type.object.end,e.expression.type.parameter.end,e.expression.type.comma,e.expression.type.test],expressions:[e.expression.type._function,e.expression.type.bool,e.expression.type.string,e.expression.type.variable,e.expression.type.number,e.expression.type._null,e.expression.type.context,e.expression.type.parameter.start,e.expression.type.array.start,e.expression.type.object.start]},e.expression.set.operations_extended=e.expression.set.operations.concat([e.expression.type.key.period,e.expression.type.key.brackets]),e.expression.fn={compile:{push:function(e,t,n){n.push(e)},push_both:function(e,t,n){n.push(e),t.push(e)}},parse:{push:function(e,t,n){t.push(e)},push_value:function(e,t,n){t.push(e.value)}}},e.expression.definitions=[{type:e.expression.type.test,regex:/^is\s+(not)?\s*([a-zA-Z_][a-zA-Z0-9_]*)/,next:e.expression.set.operations.concat([e.expression.type.parameter.start]),compile:function(e,t,n){e.filter=e.match[2],e.modifier=e.match[1],delete e.match,delete e.value,n.push(e)},parse:function(t,n,r){var i=n.pop(),s=t.params&&e.expression.parse.apply(this,[t.params,r]),o=e.test(t.filter,i,s);t.modifier=="not"?n.push(!o):n.push(o)}},{type:e.expression.type.comma,regex:/^,/,next:e.expression.set.expressions.concat([e.expression.type.array.end,e.expression.type.object.end]),compile:function(t,n,r){var i=n.length-1,s;delete t.match,delete t.value;for(;i>=0;i--){s=n.pop();if(s.type===e.expression.type.object.start||s.type===e.expression.type.parameter.start||s.type===e.expression.type.array.start){n.push(s);break}r.push(s)}r.push(t)}},{type:e.expression.type.operator.binary,regex:/(^[\+\-~%\?\:]|^[!=]==?|^[!<>]=?|^\*\*?|^\/\/?|^and\s+|^or\s+|^in\s+|^not in\s+|^\.\.)/,next:e.expression.set.expressions.concat([e.expression.type.operator.unary]),compile:function(t,n,r){delete t.match,t.value=t.value.trim();var i=t.value,s=e.expression.operator.lookup(i,t);e.log.trace("Twig.expression.compile: ","Operator: ",s," from ",i);while(n.length>0&&(n[n.length-1].type==e.expression.type.operator.unary||n[n.length-1].type==e.expression.type.operator.binary)&&(s.associativity===e.expression.operator.leftToRight&&s.precidence>=n[n.length-1].precidence||s.associativity===e.expression.operator.rightToLeft&&s.precidence>n[n.length-1].precidence)){var o=n.pop();r.push(o)}if(i===":"){if(!n[n.length-1]||n[n.length-1].value!=="?"){var u=r.pop();if(u.type!==e.expression.type.string&&u.type!==e.expression.type.variable&&u.type!==e.expression.type.number)throw new e.Error("Unexpected value before ':' of "+u.type+" = "+u.value);t.key=u.value,r.push(t);return}}else n.push(s)},parse:function(t,n,r){t.key?n.push(t):e.expression.operator.parse(t.value,n)}},{type:e.expression.type.operator.unary,regex:/(^not\s+)/,next:e.expression.set.expressions,compile:function(t,n,r){delete t.match,t.value=t.value.trim();var i=t.value,s=e.expression.operator.lookup(i,t);e.log.trace("Twig.expression.compile: ","Operator: ",s," from ",i);while(n.length>0&&(n[n.length-1].type==e.expression.type.operator.unary||n[n.length-1].type==e.expression.type.operator.binary)&&(s.associativity===e.expression.operator.leftToRight&&s.precidence>=n[n.length-1].precidence||s.associativity===e.expression.operator.rightToLeft&&s.precidence>n[n.length-1].precidence)){var o=n.pop();r.push(o)}n.push(s)},parse:function(t,n,r){e.expression.operator.parse(t.value,n)}},{type:e.expression.type.string,regex:/^(["'])(?:(?=(\\?))\2.)*?\1/,next:e.expression.set.operations,compile:function(t,n,r){var i=t.value;delete t.match,i.substring(0,1)==='"'?i=i.replace('\\"','"'):i=i.replace("\\'","'"),t.value=i.substring(1,i.length-1).replace(/\\n/g,"\n").replace(/\\r/g,"\r"),e.log.trace("Twig.expression.compile: ","String value: ",t.value),r.push(t)},parse:e.expression.fn.parse.push_value},{type:e.expression.type.parameter.start,regex:/^\(/,next:e.expression.set.expressions.concat([e.expression.type.parameter.end]),compile:e.expression.fn.compile.push_both,parse:e.expression.fn.parse.push},{type:e.expression.type.parameter.end,regex:/^\)/,next:e.expression.set.operations_extended,compile:function(t,n,r){var i,s=t;i=n.pop();while(n.length>0&&i.type!=e.expression.type.parameter.start)r.push(i),i=n.pop();var o=[];while(t.type!==e.expression.type.parameter.start)o.unshift(t),t=r.pop();o.unshift(t);var u=!1;t=r[r.length-1],t===undefined||t.type!==e.expression.type._function&&t.type!==e.expression.type.filter&&t.type!==e.expression.type.test&&t.type!==e.expression.type.key.brackets&&t.type!==e.expression.type.key.period?(s.expression=!0,o.pop(),o.shift(),s.params=o,r.push(s)):(s.expression=!1,t.params=o)},parse:function(t,n,r){var i=[],s=!1,o=null;if(t.expression)o=e.expression.parse.apply(this,[t.params,r]),n.push(o);else{while(n.length>0){o=n.pop();if(o&&o.type&&o.type==e.expression.type.parameter.start){s=!0;break}i.unshift(o)}if(!s)throw new e.Error("Expected end of parameter set.");n.push(i)}}},{type:e.expression.type.array.start,regex:/^\[/,next:e.expression.set.expressions.concat([e.expression.type.array.end]),compile:e.expression.fn.compile.push_both,parse:e.expression.fn.parse.push},{type:e.expression.type.array.end,regex:/^\]/,next:e.expression.set.operations_extended,compile:function(t,n,r){var i=n.length-1,s;for(;i>=0;i--){s=n.pop();if(s.type===e.expression.type.array.start)break;r.push(s)}r.push(t)},parse:function(t,n,r){var i=[],s=!1,o=null;while(n.length>0){o=n.pop();if(o.type&&o.type==e.expression.type.array.start){s=!0;break}i.unshift(o)}if(!s)throw new e.Error("Expected end of array.");n.push(i)}},{type:e.expression.type.object.start,regex:/^\{/,next:e.expression.set.expressions.concat([e.expression.type.object.end]),compile:e.expression.fn.compile.push_both,parse:e.expression.fn.parse.push},{type:e.expression.type.object.end,regex:/^\}/,next:e.expression.set.operations_extended,compile:function(t,n,r){var i=n.length-1,s;for(;i>=0;i--){s=n.pop();if(s&&s.type===e.expression.type.object.start)break;r.push(s)}r.push(t)},parse:function(t,n,r){var i={},s=!1,o=null,u=null,a=!1,f=null;while(n.length>0){o=n.pop();if(o&&o.type&&o.type===e.expression.type.object.start){s=!0;break}if(o&&o.type&&(o.type===e.expression.type.operator.binary||o.type===e.expression.type.operator.unary)&&o.key){if(!a)throw new e.Error("Missing value for key '"+o.key+"' in object definition.");i[o.key]=f,i._keys===undefined&&(i._keys=[]),i._keys.unshift(o.key),f=null,a=!1}else a=!0,f=o}if(!s)throw new e.Error("Unexpected end of object.");n.push(i)}},{type:e.expression.type.filter,regex:/^\|\s?([a-zA-Z_][a-zA-Z0-9_\-]*)/,next:e.expression.set.operations_extended.concat([e.expression.type.parameter.start]),compile:function(e,t,n){e.value=e.match[1],n.push(e)},parse:function(t,n,r){var i=n.pop(),s=t.params&&e.expression.parse.apply(this,[t.params,r]);n.push(e.filter.apply(this,[t.value,i,s]))}},{type:e.expression.type._function,regex:/^([a-zA-Z_][a-zA-Z0-9_]*)\s*\(/,next:e.expression.type.parameter.start,transform:function(e,t){return"("},compile:function(e,t,n){var r=e.match[1];e.fn=r,delete e.match,delete e.value,n.push(e)},parse:function(t,n,r){var i=t.params&&e.expression.parse.apply(this,[t.params,r]),s=t.fn,o;if(e.functions[s])o=e.functions[s].apply(this,i);else{if(typeof r[s]!="function")throw new e.Error(s+" function does not exist and is not defined in the context");o=r[s].apply(r,i)}n.push(o)}},{type:e.expression.type.variable,regex:/^[a-zA-Z_][a-zA-Z0-9_]*/,next:e.expression.set.operations_extended.concat([e.expression.type.parameter.start]),compile:e.expression.fn.compile.push,validate:function(t,n){return e.indexOf(e.expression.reservedWords,t[0])<0},parse:function(t,n,r){var i=e.expression.resolve(r[t.value],r);n.push(i)}},{type:e.expression.type.key.period,regex:/^\.([a-zA-Z0-9_]+)/,next:e.expression.set.operations_extended.concat([e.expression.type.parameter.start]),compile:function(e,t,n){e.key=e.match[1],delete e.match,delete e.value,n.push(e)},parse:function(t,n,r){var i=t.params&&e.expression.parse.apply(this,[t.params,r]),s=t.key,o=n.pop(),u;if(o===null||o===undefined){if(this.options.strict_variables)throw new e.Error("Can't access a key "+s+" on an null or undefined object.");return null}var a=function(e){return e.substr(0,1).toUpperCase()+e.substr(1)};typeof o=="object"&&s in o?u=o[s]:o["get"+a(s)]!==undefined?u=o["get"+a(s)]:o["is"+a(s)]!==undefined?u=o["is"+a(s)]:u=null,n.push(e.expression.resolve(u,o,i))}},{type:e.expression.type.key.brackets,regex:/^\[([^\]]*)\]/,next:e.expression.set.operations_extended.concat([e.expression.type.parameter.start]),compile:function(t,n,r){var i=t.match[1];delete t.value,delete t.match,t.stack=e.expression.compile({value:i}).stack,r.push(t)},parse:function(t,n,r){var i=t.params&&e.expression.parse.apply(this,[t.params,r]),s=e.expression.parse.apply(this,[t.stack,r]),o=n.pop(),u;if(o===null||o===undefined){if(this.options.strict_variables)throw new e.Error("Can't access a key "+s+" on an null or undefined object.");return null}typeof o=="object"&&s in o?u=o[s]:u=null,n.push(e.expression.resolve(u,o,i))}},{type:e.expression.type._null,regex:/^null/,next:e.expression.set.operations,compile:function(e,t,n){delete e.match,e.value=null,n.push(e)},parse:e.expression.fn.parse.push_value},{type:e.expression.type.context,regex:/^_context/,next:e.expression.set.operations_extended.concat([e.expression.type.parameter.start]),compile:e.expression.fn.compile.push,parse:function(e,t,n){t.push(n)}},{type:e.expression.type.number,regex:/^\-?\d+(\.\d+)?/,next:e.expression.set.operations,compile:function(e,t,n){e.value=Number(e.value),n.push(e)},parse:e.expression.fn.parse.push_value},{type:e.expression.type.bool,regex:/^(true|false)/,next:e.expression.set.operations,compile:function(e,t,n){e.value=e.match[0]=="true",delete e.match,n.push(e)},parse:e.expression.fn.parse.push_value}],e.expression.resolve=function(e,t,n){return typeof e=="function"?e.apply(t,n||[]):e},e.expression.handler={},e.expression.extendType=function(t){e.expression.type[t]="Twig.expression.type."+t},e.expression.extend=function(t){if(!t.type)throw new e.Error("Unable to extend logic definition. No type provided for "+t);e.expression.handler[t.type]=t};while(e.expression.definitions.length>0)e.expression.extend(e.expression.definitions.shift());return e.expression.tokenize=function(t){var n=[],r=0,i=null,s,o,u,a,f,l=[],c;c=function(){var t=Array.prototype.slice.apply(arguments),o=t.pop(),u=t.pop();return e.log.trace("Twig.expression.tokenize","Matched a ",s," regular expression of ",t),i&&e.indexOf(i,s)<0?(l.push(s+" cannot follow a "+n[n.length-1].type+" at template:"+r+" near '"+t[0].substring(0,20)+"...'"),t[0]):e.expression.handler[s].validate&&!e.expression.handler[s].validate(t,n)?t[0]:(l=[],n.push({type:s,value:t[0],match:t}),f=!0,i=a,r+=t[0].length,e.expression.handler[s].transform?e.expression.handler[s].transform(t,n):"")},e.log.debug("Twig.expression.tokenize","Tokenizing expression ",t);while(t.length>0){t=t.trim();for(s in e.expression.handler)if(e.expression.handler.hasOwnProperty(s)){a=e.expression.handler[s].next,o=e.expression.handler[s].regex,o instanceof Array?u=o:u=[o],f=!1;while(u.length>0)o=u.pop(),t=t.replace(o,c);if(f)break}if(!f)throw l.length>0?new e.Error(l.join(" OR ")):new e.Error("Unable to parse '"+t+"' at template position"+r)}return e.log.trace("Twig.expression.tokenize","Tokenized to ",n),n},e.expression.compile=function(t){var n=t.value,r=e.expression.tokenize(n),i=null,s=[],o=[],u=null;e.log.trace("Twig.expression.compile: ","Compiling ",n);while(r.length>0)i=r.shift(),u=e.expression.handler[i.type],e.log.trace("Twig.expression.compile: ","Compiling ",i),u.compile&&u.compile(i,o,s),e.log.trace("Twig.expression.compile: ","Stack is",o),e.log.trace("Twig.expression.compile: ","Output is",s);while(o.length>0)s.push(o.pop());return e.log.trace("Twig.expression.compile: ","Final output is",s),t.stack=s,delete t.value,t},e.expression.parse=function(t,n){var r=this;t instanceof Array||(t=[t]);var i=[],s=null;return e.forEach(t,function(t){s=e.expression.handler[t.type],s.parse&&s.parse.apply(r,[t,i,n])}),i.pop()},e}(Twig||{}),Twig=function(e){e.expression.operator={leftToRight:"leftToRight",rightToLeft:"rightToLeft"};var t=function(e,t){if(t.indexOf!==undefined)return e===t||e!==""&&t.indexOf(e)>-1;var n;for(n in t)if(t.hasOwnProperty(n)&&t[n]===e)return!0;return!1};return e.expression.operator.lookup=function(t,n){switch(t){case"..":case"not in":case"in":n.precidence=20,n.associativity=e.expression.operator.leftToRight;break;case",":n.precidence=18,n.associativity=e.expression.operator.leftToRight;break;case"?":case":":n.precidence=16,n.associativity=e.expression.operator.rightToLeft;break;case"or":n.precidence=14,n.associativity=e.expression.operator.leftToRight;break;case"and":n.precidence=13,n.associativity=e.expression.operator.leftToRight;break;case"==":case"!=":n.precidence=9,n.associativity=e.expression.operator.leftToRight;break;case"<":case"<=":case">":case">=":n.precidence=8,n.associativity=e.expression.operator.leftToRight;break;case"~":case"+":case"-":n.precidence=6,n.associativity=e.expression.operator.leftToRight;break;case"//":case"**":case"*":case"/":case"%":n.precidence=5,n.associativity=e.expression.operator.leftToRight;break;case"not":n.precidence=3,n.associativity=e.expression.operator.rightToLeft;break;default:throw new e.Error(t+" is an unknown operator.")}return n.operator=t,n},e.expression.operator.parse=function(n,r){e.log.trace("Twig.expression.operator.parse: ","Handling ",n);var i,s,o;switch(n){case":":break;case"?":o=r.pop(),s=r.pop(),i=r.pop(),i?r.push(s):r.push(o);break;case"+":s=parseFloat(r.pop()),i=parseFloat(r.pop()),r.push(i+s);break;case"-":s=parseFloat(r.pop()),i=parseFloat(r.pop()),r.push(i-s);break;case"*":s=parseFloat(r.pop()),i=parseFloat(r.pop()),r.push(i*s);break;case"/":s=parseFloat(r.pop()),i=parseFloat(r.pop()),r.push(i/s);break;case"//":s=parseFloat(r.pop()),i=parseFloat(r.pop()),r.push(parseInt(i/s));break;case"%":s=parseFloat(r.pop()),i=parseFloat(r.pop()),r.push(i%s);break;case"~":s=r.pop(),i=r.pop(),r.push((i!==undefined?i.toString():"")+(s!==undefined?s.toString():""));break;case"not":case"!":r.push(!r.pop());break;case"<":s=r.pop(),i=r.pop(),r.push(i<s);break;case"<=":s=r.pop(),i=r.pop(),r.push(i<=s);break;case">":s=r.pop(),i=r.pop(),r.push(i>s);break;case">=":s=r.pop(),i=r.pop(),r.push(i>=s);break;case"===":s=r.pop(),i=r.pop(),r.push(i===s);break;case"==":s=r.pop(),i=r.pop(),r.push(i==s);break;case"!==":s=r.pop(),i=r.pop(),r.push(i!==s);break;case"!=":s=r.pop(),i=r.pop(),r.push(i!=s);break;case"or":s=r.pop(),i=r.pop(),r.push(i||s);break;case"and":s=r.pop(),i=r.pop(),r.push(i&&s);break;case"**":s=r.pop(),i=r.pop(),r.push(Math.pow(i,s));break;case"not in":s=r.pop(),i=r.pop(),r.push(!t(i,s));break;case"in":s=r.pop(),i=r.pop(),r.push(t(i,s));break;case"..":s=r.pop(),i=r.pop(),r.push(e.functions.range(i,s));break;default:throw new e.Error(n+" is an unknown operator.")}},e}(Twig||{}),Twig=function(e){function t(e,t){var n=Object.prototype.toString.call(t).slice(8,-1);return t!==undefined&&t!==null&&n===e}return e.filters={upper:function(e){return typeof e!="string"?e:e.toUpperCase()},lower:function(e){return typeof e!="string"?e:e.toLowerCase()},capitalize:function(e){return typeof e!="string"?e:e.substr(0,1).toUpperCase()+e.toLowerCase().substr(1)},title:function(e){return typeof e!="string"?e:e.toLowerCase().replace(/(^|\s)([a-z])/g,function(e,t,n){return t+n.toUpperCase()})},length:function(t){return e.lib.is("Array",t)||typeof t=="string"?t.length:e.lib.is("Object",t)?t._keys===undefined?Object.keys(t).length:t._keys.length:0},reverse:function(e){if(t("Array",e))return e.reverse();if(t("String",e))return e.split("").reverse().join("");if(e instanceof Object){var n=e._keys||Object.keys(e).reverse();return e._keys=n,e}},sort:function(e){if(t("Array",e))return e.sort();if(e instanceof Object){delete e._keys;var n=Object.keys(e),r=n.sort(function(t,n){return e[t]>e[n]});return e._keys=r,e}},keys:function(t){if(t===undefined||t===null)return;var n=t._keys||Object.keys(t),r=[];return e.forEach(n,function(e){if(e==="_keys")return;t.hasOwnProperty(e)&&r.push(e)}),r},url_encode:function(e){if(e===undefined||e===null)return;return encodeURIComponent(e)},join:function(t,n){if(t===undefined||t===null)return;var r="",i=[],s=null;return n&&n[0]&&(r=n[0]),t instanceof Array?i=t:(s=t._keys||Object.keys(t),e.forEach(s,function(e){if(e==="_keys")return;t.hasOwnProperty(e)&&i.push(t[e])})),i.join(r)},"default":function(t,n){if(n===undefined||n.length!==1)throw new e.Error("default filter expects one argument");return t===undefined||t===null||t===""?n[0]:t},json_encode:function(e){return e&&e.hasOwnProperty("_keys")&&delete e._keys,e===undefined||e===null?"null":JSON.stringify(e)},merge:function(t,n){var r=[],i=0,s=[];t instanceof Array?e.forEach(n,function(e){e instanceof Array||(r={})}):r={},r instanceof Array||(r._keys=[]),t instanceof Array?e.forEach(t,function(e){r._keys&&r._keys.push(i),r[i]=e,i++}):(s=t._keys||Object.keys(t),e.forEach(s,function(e){r[e]=t[e],r._keys.push(e);var n=parseInt(e,10);!isNaN(n)&&n>=i&&(i=n+1)})),e.forEach(n,function(t){t instanceof Array?e.forEach(t,function(e){r._keys&&r._keys.push(i),r[i]=e,i++}):(s=t._keys||Object.keys(t),e.forEach(s,function(e){r[e]||r._keys.push(e),r[e]=t[e];var n=parseInt(e,10);!isNaN(n)&&n>=i&&(i=n+1)}))});if(n.length===0)throw new e.Error("Filter merge expects at least one parameter");return r},date:function(t,n){if(t===undefined||t===null)return;var r=e.functions.date(t);return e.lib.formatDate(r,n[0])},date_modify:function(t,n){if(t===undefined||t===null)return;if(n===undefined||n.length!==1)throw new e.Error("date_modify filter expects 1 argument");var r=n[0],i;return e.lib.is("Date",t)&&(i=e.lib.strtotime(r,t.getTime()/1e3)),e.lib.is("String",t)&&(i=e.lib.strtotime(r,e.lib.strtotime(t))),e.lib.is("Number",t)&&(i=e.lib.strtotime(r,t)),new Date(i*1e3)},replace:function(t,n){if(t===undefined||t===null)return;var r=n[0],i;for(i in r)r.hasOwnProperty(i)&&i!=="_keys"&&(t=e.lib.replaceAll(t,i,r[i]));return t},format:function(t,n){if(t===undefined||t===null)return;return e.lib.vsprintf(t,n)},striptags:function(t){if(t===undefined||t===null)return;return e.lib.strip_tags(t)},escape:function(e){if(e===undefined||e===null)return;return e.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")},e:function(t){return e.filters.escape(t)},nl2br:function(t){if(t===undefined||t===null)return;var n="BACKSLASH_n_replace",r="<br />"+n;return t=e.filters.escape(t).replace(/\r\n/g,r).replace(/\r/g,r).replace(/\n/g,r),e.lib.replaceAll(t,n,"\n")},number_format:function(e,t){var n=e,r=t&&t[0]?t[0]:undefined,i=t&&t[1]!==undefined?t[1]:".",s=t&&t[2]!==undefined?t[2]:",";n=(n+"").replace(/[^0-9+\-Ee.]/g,"");var o=isFinite(+n)?+n:0,u=isFinite(+r)?Math.abs(r):0,a="",f=function(e,t){var n=Math.pow(10,t);return""+Math.round(e*n)/n};return a=(u?f(o,u):""+Math.round(o)).split("."),a[0].length>3&&(a[0]=a[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,s)),(a[1]||"").length<u&&(a[1]=a[1]||"",a[1]+=(new Array(u-a[1].length+1)).join("0")),a.join(i)},trim:function(t,n){if(t===undefined||t===null)return;var r=e.filters.escape(""+t),i;n&&n[0]?i=""+n[0]:i=" \n\r \f            ​\u2028\u2029 ";for(var s=0;s<r.length;s++)if(i.indexOf(r.charAt(s))===-1){r=r.substring(s);break}for(s=r.length-1;s>=0;s--)if(i.indexOf(r.charAt(s))===-1){r=r.substring(0,s+1);break}return i.indexOf(r.charAt(0))===-1?r:""},slice:function(t,n){if(t===undefined||t===null)return;if(n===undefined||n.length<1)throw new e.Error("slice filter expects at least 1 argument");var r=n[0]||0,i=n.length>1?n[1]:t.length,s=r>=0?r:Math.max(t.length+r,0);if(e.lib.is("Array",t)){var o=[];for(var u=s;u<s+i&&u<t.length;u++)o.push(t[u]);return o}if(e.lib.is("String",t))return t.substr(s,i);throw new e.Error("slice filter expects value to be an array or string")},abs:function(e){if(e===undefined||e===null)return;return Math.abs(e)},first:function(e){if(e instanceof Array)return e[0];if(e instanceof Object){if("_keys"in e)return e[e._keys[0]]}else if(typeof e=="string")return e.substr(0,1);return},split:function(t,n){if(t===undefined||t===null)return;if(n===undefined||n.length<1||n.length>2)throw new e.Error("split filter expects 1 or 2 argument");if(e.lib.is("String",t)){var r=n[0],i=n[1],s=t.split(r);if(i===undefined)return s;if(i<0)return t.split(r,s.length+i);var o=[];if(r=="")while(s.length>0){var u="";for(var a=0;a<i&&s.length>0;a++)u+=s.shift();o.push(u)}else{for(var a=0;a<i-1&&s.length>0;a++)o.push(s.shift());s.length>0&&o.push(s.join(r))}return o}throw new e.Error("split filter expects value to be a string")},last:function(t){if(e.lib.is("Object",t)){var n;return t._keys===undefined?n=Object.keys(t):n=t._keys,t[n[n.length-1]]}return t[t.length-1]},raw:function(e){return e},batch:function(t,n){var r=n.shift(),i=n.shift(),s,o,u;if(!e.lib.is("Array",t))throw new e.Error("batch filter expects items to be an array");if(!e.lib.is("Number",r))throw new e.Error("batch filter expects size to be a number");r=Math.ceil(r),s=e.lib.chunkArray(t,r);if(i&&t.length%r!=0){o=s.pop(),u=r-o.length;while(u--)o.push(i);s.push(o)}return s},round:function(t,n){n=n||[];var r=n.length>0?n[0]:0,i=n.length>1?n[1]:"common";t=parseFloat(t);if(r&&!e.lib.is("Number",r))throw new e.Error("round filter expects precision to be a number");if(i==="common")return e.lib.round(t,r);if(!e.lib.is("Function",Math[i]))throw new e.Error("round filter expects method to be 'floor', 'ceil', or 'common'");return Math[i](t*Math.pow(10,r))/Math.pow(10,r)}},e.filter=function(t,n,r){if(!e.filters[t])throw"Unable to find filter "+t;return e.filters[t].apply(this,[n,r])},e.filter.extend=function(t,n){e.filters[t]=n},e}(Twig||{}),Twig=function(e){function t(e,t){var n=Object.prototype.toString.call(t).slice(8,-1);return t!==undefined&&t!==null&&n===e}return e.functions={range:function(e,t,n){var r=[],i,s,o,u=n||1,a=!1;!isNaN(e)&&!isNaN(t)?(i=parseInt(e,10),s=parseInt(t,10)):isNaN(e)&&isNaN(t)?(a=!0,i=e.charCodeAt(0),s=t.charCodeAt(0)):(i=isNaN(e)?0:e,s=isNaN(t)?0:t),o=i>s?!1:!0;if(o)while(i<=s)r.push(a?String.fromCharCode(i):i),i+=u;else while(i>=s)r.push(a?String.fromCharCode(i):i),i-=u;return r},cycle:function(e,t){var n=t%e.length;return e[n]},dump:function(){var t="\n",n=" ",r=0,i="",s=Array.prototype.slice.call(arguments),o=function(e){var t="";while(e>0)e--,t+=n;return t},u=function(e){i+=o(r),typeof e=="object"?a(e):typeof e=="function"?i+="function()"+t:typeof e=="string"?i+="string("+e.length+') "'+e+'"'+t:typeof e=="number"?i+="number("+e+")"+t:typeof e=="boolean"&&(i+="bool("+e+")"+t)},a=function(e){var n;if(e===null)i+="NULL"+t;else if(e===undefined)i+="undefined"+t;else if(typeof e=="object"){i+=o(r)+typeof e,r++,i+="("+function(e){var t=0,n;for(n in e)e.hasOwnProperty(n)&&t++;return t}(e)+") {"+t;for(n in e)i+=o(r)+"["+n+"]=> "+t,u(e[n]);r--,i+=o(r)+"}"+t}else u(e)};return s.length==0&&s.push(this.context),e.forEach(s,function(e){a(e)}),i},date:function(t,n){var r;if(t===undefined)r=new Date;else if(e.lib.is("Date",t))r=t;else if(e.lib.is("String",t))r=new Date(e.lib.strtotime(t)*1e3);else{if(!e.lib.is("Number",t))throw new e.Error("Unable to parse date "+t);r=new Date(t*1e3)}return r},block:function(e){return this.blocks[e]},parent:function(){return e.placeholders.parent},attribute:function(e,t,n){return e instanceof Object&&e.hasOwnProperty(t)?typeof e[t]=="function"?e[t].apply(undefined,n):e[t]:e[t]||undefined}},e._function=function(t,n,r){if(!e.functions[t])throw"Unable to find function "+t;return e.functions[t](n,r)},e._function.extend=function(t,n){e.functions[t]=n},e}(Twig||{}),Twig=function(e){return e.tests={empty:function(e){if(e===null||e===undefined)return!0;if(typeof e=="number")return!1;if(e.length&&e.length>0)return!1;for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},odd:function(e){return e%2===1},even:function(e){return e%2===0},divisibleby:function(e,t){return e%t[0]===0},defined:function(e){return e!==undefined},none:function(e){return e===null},"null":function(e){return this.none(e)},sameas:function(e,t){return e===t[0]}},e.test=function(t,n,r){if(!e.tests[t])throw"Test "+t+" is not defined.";return e.tests[t](n,r)},e.test.extend=function(t,n){e.tests[t]=n},e}(Twig||{}),Twig=function(e){return e.exports={VERSION:e.VERSION},e.exports.twig=function(n){var r=n.id,i={strict_variables:n.strict_variables||!1,allowInlineIncludes:n.allowInlineIncludes||!1,rethrow:n.rethrow||!1};r&&e.validateId(r),n.debug!==undefined&&(e.debug=n.debug),n.trace!==undefined&&(e.trace=n.trace);if(n.data!==undefined)return new e.Template({data:n.data,module:n.module,id:r,options:i});if(n.ref!==undefined){if(n.id!==undefined)throw new e.Error("Both ref and id cannot be set on a twig.js template.");return e.Templates.load(n.ref)}if(n.href!==undefined)return e.Templates.loadRemote(n.href,{id:r,method:"ajax",base:n.base,module:n.module,precompiled:n.precompiled,async:n.async,options:i},n.load,n.error);if(n.path!==undefined)return e.Templates.loadRemote(n.path,{id:r,method:"fs",base:n.base,module:n.module,precompiled:n.precompiled,async:n.async,options:i},n.load,n.error)},e.exports.extendFilter=function(t,n){e.filter.extend(t,n)},e.exports.extendFunction=function(t,n){e._function.extend(t,n)},e.exports.extendTest=function(t,n){e.test.extend(t,n)},e.exports.extendTag=function(t){e.logic.extend(t)},e.exports.extend=function(t){t(e)},e.exports.compile=function(t,n){var r=n.filename,i=n.filename,s;return s=new e.Template({data:t,path:i,id:r,options:n.settings["twig options"]}),function(e){return s.render(e)}},e.exports.renderFile=function(t,n,r){"function"==typeof n&&(r=n,n={}),n=n||{};var i={path:t,base:n.settings.views,load:function(e){r(null,e.render(n))}},s=n.settings["twig options"];if(s)for(var o in s)s.hasOwnProperty(o)&&(i[o]=s[o]);e.exports.twig(i)},e.exports.__express=e.exports.renderFile,e.exports.cache=function(t){e.cache=t},e}(Twig||{}),Twig=function(e){return e.compiler={module:{}},e.compiler.compile=function(t,n){var r=JSON.stringify(t.tokens),i=t.id,s;if(n.module){if(e.compiler.module[n.module]===undefined)throw new e.Error("Unable to find module type "+n.module);s=e.compiler.module[n.module](i,r,n.twig)}else s=e.compiler.wrap(i,r);return s},e.compiler.module={amd:function(t,n,r){return'define(["'+r+'"], function (Twig) {\n var twig, templates;\ntwig = Twig.twig;\ntemplates = '+e.compiler.wrap(t,n)+"\n return templates;\n});"},node:function(t,n){return'var twig = require("twig").twig;\nexports.template = '+e.compiler.wrap(t,n)},cjs2:function(t,n,r){return'module.declare([{ twig: "'+r+'" }], function (require, exports, module) {\n'+' var twig = require("twig").twig;\n'+" exports.template = "+e.compiler.wrap(t,n)+"\n});"}},e.compiler.wrap=function(e,t){return'twig({id:"'+e.replace('"','\\"')+'", data:'+t+", precompiled: true});\n"},e}(Twig||{});typeof module!="undefined"&&module.declare?module.declare([],function(e,t,n){for(key in Twig.exports)Twig.exports.hasOwnProperty(key)&&(t[key]=Twig.exports[key])}):typeof define=="function"&&define.amd||1?timely.define("external_libs/twig",[],function(){return Twig.exports}):typeof module!="undefined"&&module.exports?module.exports=Twig.exports:(window.twig=Twig.exports.twig,window.Twig=Twig.exports);
public/js/libs/captcha.js ADDED
@@ -0,0 +1 @@
 
1
+ timely.define("libs/captcha/recaptcha",["jquery_timely","//www.google.com/recaptcha/api/js/recaptcha_ajax.js"],function(e){var t=!1,n=function(){return"undefined"!=typeof Recaptcha},r=function(n){Recaptcha.create(n.key,n.object,{theme:"white",callback:function(){e(i(),n.captcha_object).attr("placeholder",n.placeholder),n.captcha_object.removeClass("ai1ec-initializing").addClass("ai1ec-initialized"),t=!0}}),n.captcha_object.addClass("ai1ec-initializing")},i=function(){return"#recaptcha_response_field"},s=function(t){e(i(),t).length&&n()&&Recaptcha.reload()},o=function(t){e(".ai1ec-recaptcha",t).removeClass("ai1ec-initializing ai1ec-initialized"),Recaptcha.destroy()},u=function(){if(!t)return!0;var n=e(i());return n.val().length>0};return{is_ready:n,init:r,get_field_name:i,reload:s,destroy:o,check_field:u}}),timely.define("libs/captcha/nocaptcha",["jquery_timely","//www.google.com/recaptcha/api.js"],function(e){var t=!1,n=!1,r={},i=function(){return"undefined"!=typeof grecaptcha},s=function(i){if(n)return;r=i,e(i.object).html(""),grecaptcha.render(i.object,{sitekey:i.key,theme:"white",callback:function(e){t=!0}}),n=!0},o=function(){return"#g-recaptcha-response"},u=function(e){t=!1,n=!1,s(r)},a=function(e){t=!1,n=!1},f=function(){return t};return{is_ready:i,init:s,get_field_name:o,reload:u,destroy:a,check_field:f}}),timely.define("libs/captcha/void",[],function(){var e=function(){return!1},t=function(e){},n=function(){return""},r=function(e){},i=function(e){},s=function(){return!0};return{is_ready:e,init:t,get_field_name:n,reload:r,destroy:i,check_field:s}}),timely.define("libs/captcha",["jquery_timely","libs/captcha/recaptcha","libs/captcha/nocaptcha","libs/captcha/void"],function($,$recaptcha,$nocaptcha,$void){var $provider=$void,get_provider=function(e){if("recaptcha"===e)return $recaptcha;if("nocaptcha"===e)return $nocaptcha},init_captcha=function($form){var $captcha=$(".ai1ec-captcha",$form);if($captcha.length===0)return;$provider=get_provider($captcha.data("provider"));if($captcha.data("providerConstructor")){var $callback=$captcha.data("providerConstructor");$provider=eval($callback)()}if(!$provider.is_ready()||$captcha.is(".ai1ec-initializing, .ai1ec-initialized"))return;$provider.init({key:$captcha.data("captchaKey"),object:$captcha[0],placeholder:$captcha.data("placeholder"),captcha_object:$captcha})},destroy=function(e){$provider.destroy(e)},reload=function(e){$provider.reload(e)},get_field_name=function(){return $provider.get_field_name()},check_field=function(){return $provider.check_field()};return{init_captcha:init_captcha,destroy:destroy,reload:reload,get_field_name:get_field_name,check_field:check_field}});
public/js/libs/captcha/nocaptcha.js ADDED
@@ -0,0 +1 @@
 
1
+ timely.define(["jquery_timely","//www.google.com/recaptcha/api.js"],function(e){var t=!1,n=!1,r={},i=function(){return"undefined"!=typeof grecaptcha},s=function(i){if(n)return;r=i,e(i.object).html(""),grecaptcha.render(i.object,{sitekey:i.key,theme:"white",callback:function(e){t=!0}}),n=!0},o=function(){return"#g-recaptcha-response"},u=function(e){t=!1,n=!1,s(r)},a=function(e){t=!1,n=!1},f=function(){return t};return{is_ready:i,init:s,get_field_name:o,reload:u,destroy:a,check_field:f}});
public/js/libs/captcha/recaptcha.js ADDED
@@ -0,0 +1 @@
 
1
+ timely.define(["jquery_timely","//www.google.com/recaptcha/api/js/recaptcha_ajax.js"],function(e){var t=!1,n=function(){return"undefined"!=typeof Recaptcha},r=function(n){Recaptcha.create(n.key,n.object,{theme:"white",callback:function(){e(i(),n.captcha_object).attr("placeholder",n.placeholder),n.captcha_object.removeClass("ai1ec-initializing").addClass("ai1ec-initialized"),t=!0}}),n.captcha_object.addClass("ai1ec-initializing")},i=function(){return"#recaptcha_response_field"},s=function(t){e(i(),t).length&&n()&&Recaptcha.reload()},o=function(t){e(".ai1ec-recaptcha",t).removeClass("ai1ec-initializing ai1ec-initialized"),Recaptcha.destroy()},u=function(){if(!t)return!0;var n=e(i());return n.val().length>0};return{is_ready:n,init:r,get_field_name:i,reload:s,destroy:o,check_field:u}});
public/js/libs/captcha/void.js ADDED
@@ -0,0 +1 @@
 
1
+ timely.define([],function(){var e=function(){return!1},t=function(e){},n=function(){return""},r=function(e){},i=function(e){},s=function(){return!0};return{is_ready:e,init:t,get_field_name:n,reload:r,destroy:i,check_field:s}});
public/js/libs/recaptcha.js DELETED
@@ -1 +0,0 @@
1
- timely.define(["jquery_timely","//www.google.com/recaptcha/api/js/recaptcha_ajax.js"],function(e){var t=function(t){var n=e(".ai1ec-recaptcha",t);if(n.length===0)return;if(n.is(".ai1ec-initializing, .ai1ec-initialized"))return;if(typeof Recaptcha=="undefined")return;Recaptcha.create(n.data("recaptchaKey"),n[0],{theme:"white",callback:function(){e("#recaptcha_response_field",n).attr("placeholder",n.data("placeholder")),n.removeClass("ai1ec-initializing").addClass("ai1ec-initialized")}}),n.addClass("ai1ec-initializing")};return{init_recaptcha:t}});
 
public/js/libs/twig.js ADDED
@@ -0,0 +1 @@
 
1
+ timely.define(["external_libs/twig"],function(e){return e.extendFunction("ai1ec_disable_content_output",function(){}),e});
public/js/libs/utils.js CHANGED
@@ -1 +1 @@
1
- timely.define(["jquery_timely","external_libs/bootstrap/tab"],function(e){var t=function(){return{is_float:function(e){return!isNaN(parseFloat(e))},is_valid_coordinate:function(e,t){var n=t?90:180;return this.is_float(e)&&Math.abs(e)<n},convert_comma_to_dot:function(e){return e.replace(",",".")},field_has_value:function(t){var n="#"+t,r=e(n),i=!1;return r.length===1&&(i=e.trim(r.val())!==""),i},make_alert:function(t,n,r){var i="";switch(n){case"error":i="ai1ec-alert ai1ec-alert-danger";break;case"success":i="ai1ec-alert ai1ec-alert-success";break;default:i="ai1ec-alert"}var s=e("<div />",{"class":i,html:t});if(!r){var o=e("<button>",{type:"button","class":"ai1ec-close","data-dismiss":"ai1ec-alert",text:"×"});s.prepend(o)}return s},get_ajax_url:function(){return typeof window.ajaxurl=="undefined"?"http://localhost/wordpress/wp-admin/admin-ajax.php":window.ajaxurl},isUrl:function(e){var t=/(http|https|webcal):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return t.test(e)},isValidEmail:function(e){var t=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return t.test(e)},activate_saved_tab_on_page_load:function(t){null===t||undefined===t?e("ul.ai1ec-nav a:first").tab("show"):e("ul.ai1ec-nav a[href="+t+"]").tab("show")},add_query_arg:function(e,t){var n=e.indexOf("?")===-1?"?":"&";return-1!==e.indexOf(n+t[0]+"=")?e:e+n+t[0]+"="+t[1]},init_autoselect:function(){e(document).one("click",".ai1ec-autoselect",function(t){if(e(this).data("clicked")&&t.originalEvent.detail<2)return;e(this).data("clicked",!0);var n;document.body.createTextRange?(n=document.body.createTextRange(),n.moveToElementText(this),n.select()):window.getSelection&&(selection=window.getSelection(),n=document.createRange(),n.selectNodeContents(this),selection.removeAllRanges(),selection.addRange(n))})}}}();return t});
1
+ timely.define(["jquery_timely","external_libs/bootstrap/tab"],function(e){var t=function(){return{is_float:function(e){return!isNaN(parseFloat(e))},is_valid_coordinate:function(e,t){var n=t?90:180;return this.is_float(e)&&Math.abs(e)<n},convert_comma_to_dot:function(e){return e.replace(",",".")},field_has_value:function(t){var n="#"+t,r=e(n),i=!1;return r.length===1&&(i=e.trim(r.val())!==""),i},make_alert:function(t,n,r){var i="";switch(n){case"error":i="ai1ec-alert ai1ec-alert-danger";break;case"success":i="ai1ec-alert ai1ec-alert-success";break;default:i="ai1ec-alert ai1ec-alert-info"}var s=e("<div />",{"class":i,html:t});if(!r){var o=e("<button>",{type:"button","class":"ai1ec-close","data-dismiss":"ai1ec-alert",text:"×"});s.prepend(o)}return s},get_ajax_url:function(){return typeof window.ajaxurl=="undefined"?"http://localhost/wordpress/wp-admin/admin-ajax.php":window.ajaxurl},isUrl:function(e){var t=/(http|https|webcal):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return t.test(e)},isValidEmail:function(e){var t=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return t.test(e)},activate_saved_tab_on_page_load:function(t){null===t||undefined===t?e("ul.ai1ec-nav a:first").tab("show"):e("ul.ai1ec-nav a[href="+t+"]").tab("show")},add_query_arg:function(e,t){if("string"!=typeof e)return!1;var n=e.indexOf("?")===-1?"?":"&";return-1!==e.indexOf(n+t[0]+"=")?e:e+n+t[0]+"="+t[1]},create_ai1ec_to_send:function(t){var n=e(t),r=[],i=["action","cat_ids","auth_ids","tag_ids","exact_date","display_filters","no_navigation","events_limit"],s=function(e){return e.replace(/\W+(.)/g,function(e,t){return t.toUpperCase()})};return e(i).each(function(e,t){var i=n.data(s(t));i&&r.push(t+"~"+i)}),r.join("|")},init_autoselect:function(){e(document).on("click",".ai1ec-autoselect",function(t){if(e(this).data("clicked")&&t.originalEvent.detail<2)return;e(this).data("clicked",!0);var n;document.body.createTextRange?(n=document.body.createTextRange(),n.moveToElementText(this),n.select()):window.getSelection&&(selection=window.getSelection(),n=document.createRange(),n.selectNodeContents(this),selection.removeAllRanges(),selection.addRange(n))})}}}();return t});
public/js/month.js CHANGED
@@ -1 +1 @@
1
- timely.define(["external_libs/twig","month"],function(e){var t,n;return t=e.twig,n=t({id:"../js_src/month.twig",data:[{type:"output",stack:[{type:"Twig.expression.type.variable",value:"navigation",match:["navigation"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'\n\n<table class="ai1ec-month-view ai1ec-popover-boundary\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"month_word_wrap",match:["month_word_wrap"]}],output:[{type:"raw",value:"ai1ec-word-wrap"}]}},{type:"raw",value:'">\n <thead>\n <tr>\n '},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"weekday",expression:[{type:"Twig.expression.type.variable",value:"weekdays",match:["weekdays"]}],output:[{type:"raw",value:' <th scope="col" class="ai1ec-weekday">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"weekday",match:["weekday"]}]},{type:"raw",value:"</th>\n "}]}},{type:"raw",value:" </tr>\n </thead>\n <tbody>\n "},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"week",expression:[{type:"Twig.expression.type.variable",value:"cell_array",match:["cell_array"]}],output:[{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.set",key:"added_stretcher",expression:[{type:"Twig.expression.type.bool",value:!1}]}},{type:"raw",value:' <tr class="ai1ec-week">\n '},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"day",expression:[{type:"Twig.expression.type.variable",value:"week",match:["week"]}],output:[{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"date"}],output:[{type:"raw",value:" <td "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"today"}],output:[{type:"raw",value:'class="ai1ec-today"'}]}},{type:"raw",value:">\n "},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"added_stretcher",match:["added_stretcher"]},{type:"Twig.expression.type.operator.unary",value:"not",precidence:3,associativity:"rightToLeft",operator:"not"}],output:[{type:"raw",value:' <div class="ai1ec-day-stretcher"></div>\n '},{type:"logic",token:{type:"Twig.logic.type.set",key:"added_stretcher",expression:[{type:"Twig.expression.type.bool",value:!0}]}},{type:"raw",value:" "}]}},{type:"raw",value:'\n <div class="ai1ec-day">\n <div class="ai1ec-date">\n <a class="ai1ec-load-view"\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"data_type",match:["data_type"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'\n href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"date_link"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"date"}]},{type:"raw",value:"</a>\n </div>\n\n "},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"event",expression:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"events"}],output:[{type:"raw",value:' <a href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"instance_permalink"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"data_type_events",match:["data_type_events"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"is_multiday"}],output:[{type:"raw",value:' data-end-day="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"multiday_end_day"}]},{type:"raw",value:'"\n data-start-truncated="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"start_truncated"},{type:"Twig.expression.type.string",value:"true"},{type:"Twig.expression.type.string",value:"false"},{type:"Twig.expression.type.operator.binary",value:"?",precidence:16,associativity:"rightToLeft",operator:"?"}]},{type:"raw",value:'"\n data-end-truncated="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"end_truncated"},{type:"Twig.expression.type.string",value:"true"},{type:"Twig.expression.type.string",value:"false"},{type:"Twig.expression.type.operator.binary",value:"?",precidence:16,associativity:"rightToLeft",operator:"?"}]},{type:"raw",value:'"\n '}]}},{type:"raw",value:' data-instance-id="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"instance_id"}]},{type:"raw",value:'"\n class="ai1ec-event-container ai1ec-load-event\n ai1ec-popup-trigger\n ai1ec-event-id-'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"post_id"}]},{type:"raw",value:"\n ai1ec-event-instance-id-"},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"instance_id"}]},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"is_allday"}],output:[{type:"raw",value:"ai1ec-allday"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"is_multiday"}],output:[{type:"raw",value:"ai1ec-multiday"}]}},{type:"raw",value:'"\n >\n\n <div class="ai1ec-event"\n style="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"color_style"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'">\n <span class="ai1ec-event-title">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"filtered_title"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n </span>\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"is_allday"},{type:"Twig.expression.type.operator.unary",value:"not",precidence:3,associativity:"rightToLeft",operator:"not"}],output:[{type:"raw",value:' <span class="ai1ec-event-time">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"short_start_time"}]},{type:"raw",value:"\n </span>\n "}]}},{type:"raw",value:' </div>\n </a>\n \n <div class="ai1ec-popover ai1ec-popup ai1ec-popup-in-'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"type",match:["type"]}]},{type:"raw",value:'-view">\n '},{type:"logic",token:{type:"Twig.logic.type.set",key:"category_colors",expression:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"category_colors"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"category_colors",match:["category_colors"]}],output:[{type:"raw",value:' <div class="ai1ec-color-swatches">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"category_colors",match:["category_colors"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"</div>\n "}]}},{type:"raw",value:' <span class="ai1ec-popup-title">\n <a href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"permalink"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"filtered_title"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"</a>\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"show_location_in_title",match:["show_location_in_title"]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <span class="ai1ec-event-location"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_venue_separator",match:["text_venue_separator"]},{type:"Twig.expression.type.filter",value:"format",match:["| format","format"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:"</span>\n "}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"is_ticket_button_enabled",match:["is_ticket_button_enabled"]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <a class="ai1ec-pull-right ai1ec-btn ai1ec-btn-primary ai1ec-btn-xs\n ai1ec-buy-tickets" target="_blank"\n href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url_label"}]},{type:"raw",value:"</a>\n "}]}},{type:"raw",value:" </span>\n "},{type:"logic",token:{type:"Twig.logic.type.set",key:"edit_post_link",expression:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"edit_post_link"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"edit_post_link",match:["edit_post_link"]}],output:[{type:"raw",value:' <a class="post-edit-link" href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"edit_post_link",match:["edit_post_link"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'">\n <i class="ai1ec-fa ai1ec-fa-pencil"></i> '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_edit",match:["text_edit"]}]},{type:"raw",value:"\n </a>\n "}]}},{type:"raw",value:' <div class="ai1ec-event-time">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"popup_timespan"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n </div>\n "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"avatar"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"post_excerpt"}],output:[{type:"raw",value:' <div class="ai1ec-popup-excerpt">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"post_excerpt"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"</div>\n "}]}},{type:"raw",value:" </div>\n\n "}]}},{type:"raw",value:" </div>\n </td>\n "}]}},{type:"logic",token:{type:"Twig.logic.type.else",match:["else"],output:[{type:"raw",value:" "},{type:"raw",value:'\n <td class="ai1ec-empty"></td>\n '}]}},{type:"raw",value:" "},{type:"raw",value:"\n\n "}]}},{type:"raw",value:" "},{type:"raw",value:"\n </tr>\n "}]}},{type:"raw",value:" "},{type:"raw",value:"\n </tbody>\n</table>\n"}],precompiled:!0}),n});
1
+ timely.define(["libs/twig","month"],function(e){var t,n;return t=e.twig,n=t({id:"../js_src/month.twig",data:[{type:"output",stack:[{type:"Twig.expression.type.variable",value:"navigation",match:["navigation"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'\n\n<table class="ai1ec-month-view ai1ec-popover-boundary\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"month_word_wrap",match:["month_word_wrap"]}],output:[{type:"raw",value:"ai1ec-word-wrap"}]}},{type:"raw",value:'">\n <thead>\n <tr>\n '},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"weekday",expression:[{type:"Twig.expression.type.variable",value:"weekdays",match:["weekdays"]}],output:[{type:"raw",value:' <th scope="col" class="ai1ec-weekday">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"weekday",match:["weekday"]}]},{type:"raw",value:"</th>\n "}]}},{type:"raw",value:" </tr>\n </thead>\n <tbody>\n "},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"week",expression:[{type:"Twig.expression.type.variable",value:"cell_array",match:["cell_array"]}],output:[{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.set",key:"added_stretcher",expression:[{type:"Twig.expression.type.bool",value:!1}]}},{type:"raw",value:' <tr class="ai1ec-week">\n '},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"day",expression:[{type:"Twig.expression.type.variable",value:"week",match:["week"]}],output:[{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"date"}],output:[{type:"raw",value:" <td "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"today"}],output:[{type:"raw",value:'class="ai1ec-today"'}]}},{type:"raw",value:">\n "},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"added_stretcher",match:["added_stretcher"]},{type:"Twig.expression.type.operator.unary",value:"not",precidence:3,associativity:"rightToLeft",operator:"not"}],output:[{type:"raw",value:' <div class="ai1ec-day-stretcher"></div>\n '},{type:"logic",token:{type:"Twig.logic.type.set",key:"added_stretcher",expression:[{type:"Twig.expression.type.bool",value:!0}]}},{type:"raw",value:" "}]}},{type:"raw",value:'\n <div class="ai1ec-day">\n <div class="ai1ec-date">\n <a class="ai1ec-load-view"\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"data_type",match:["data_type"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'\n href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"date_link"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"date"}]},{type:"raw",value:"</a>\n </div>\n\n "},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"event",expression:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"events"}],output:[{type:"raw",value:' <a href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"permalink"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"is_multiday"}],output:[{type:"raw",value:' data-end-day="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"multiday_end_day"}]},{type:"raw",value:'"\n data-start-truncated="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"start_truncated"},{type:"Twig.expression.type.string",value:"true"},{type:"Twig.expression.type.string",value:"false"},{type:"Twig.expression.type.operator.binary",value:"?",precidence:16,associativity:"rightToLeft",operator:"?"}]},{type:"raw",value:'"\n data-end-truncated="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"end_truncated"},{type:"Twig.expression.type.string",value:"true"},{type:"Twig.expression.type.string",value:"false"},{type:"Twig.expression.type.operator.binary",value:"?",precidence:16,associativity:"rightToLeft",operator:"?"}]},{type:"raw",value:'"\n '}]}},{type:"raw",value:' data-instance-id="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"instance_id"}]},{type:"raw",value:'"\n class="ai1ec-event-container ai1ec-load-event\n ai1ec-popup-trigger\n ai1ec-event-id-'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"post_id"}]},{type:"raw",value:"\n ai1ec-event-instance-id-"},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"instance_id"}]},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"is_allday"}],output:[{type:"raw",value:"ai1ec-allday"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"is_multiday"}],output:[{type:"raw",value:"ai1ec-multiday"}]}},{type:"raw",value:'"\n >\n\n <div class="ai1ec-event"\n style="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"color_style"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'">\n <span class="ai1ec-event-title">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"filtered_title"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n </span>\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"is_allday"},{type:"Twig.expression.type.operator.unary",value:"not",precidence:3,associativity:"rightToLeft",operator:"not"}],output:[{type:"raw",value:' <span class="ai1ec-event-time">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"short_start_time"}]},{type:"raw",value:"\n </span>\n "}]}},{type:"raw",value:' </div>\n </a>\n\n <div class="ai1ec-popover ai1ec-popup ai1ec-popup-in-'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"type",match:["type"]}]},{type:"raw",value:'-view">\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"category_colors"}],output:[{type:"raw",value:' <div class="ai1ec-color-swatches">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"category_colors"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"</div>\n "}]}},{type:"raw",value:' <span class="ai1ec-popup-title">\n <a class="ai1ec-load-event"\n href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"permalink"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"filtered_title"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"</a>\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"show_location_in_title",match:["show_location_in_title"]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <span class="ai1ec-event-location"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_venue_separator",match:["text_venue_separator"]},{type:"Twig.expression.type.filter",value:"format",match:["| format","format"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:"</span>\n "}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"is_ticket_button_enabled",match:["is_ticket_button_enabled"]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <a class="ai1ec-pull-right ai1ec-btn ai1ec-btn-primary ai1ec-btn-xs\n ai1ec-buy-tickets" target="_blank"\n href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url_label"}]},{type:"raw",value:"</a>\n "}]}},{type:"raw",value:" </span>\n\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"edit_post_link"}],output:[{type:"raw",value:' <a class="post-edit-link"\n href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"edit_post_link"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'">\n <i class="ai1ec-fa ai1ec-fa-pencil"></i> '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_edit",match:["text_edit"]}]},{type:"raw",value:"\n </a>\n "}]}},{type:"raw",value:'\n <div class="ai1ec-event-time">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"popup_timespan"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'\n </div>\n\n <a class="ai1ec-load-event"\n href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"permalink"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"avatar_not_wrapped"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n </a>\n\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"post_excerpt"}],output:[{type:"raw",value:' <div class="ai1ec-popup-excerpt">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"post_excerpt"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"</div>\n "}]}},{type:"raw",value:" </div>\n "}]}},{type:"raw",value:" </div>\n </td>\n "}]}},{type:"logic",token:{type:"Twig.logic.type.else",match:["else"],output:[{type:"raw",value:" "},{type:"raw",value:'\n <td class="ai1ec-empty"></td>\n '}]}},{type:"raw",value:" "},{type:"raw",value:"\n\n "}]}},{type:"raw",value:" "},{type:"raw",value:"\n </tr>\n "}]}},{type:"raw",value:" "},{type:"raw",value:'\n </tbody>\n</table>\n\n<div class="ai1ec-pull-left">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"pagination_links",match:["pagination_links"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"</div>\n"}],precompiled:!0}),n});
public/js/oneday.js CHANGED
@@ -1 +1 @@
1
- timely.define(["external_libs/twig","oneday"],function(e){var t,n;return t=e.twig,n=t({id:"../js_src/oneday.twig",data:[{type:"output",stack:[{type:"Twig.expression.type.variable",value:"navigation",match:["navigation"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'\n\n<table class="ai1ec-'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"type",match:["type"]}]},{type:"raw",value:'-view-original" xxx>\n <thead>\n <tr>\n '},{type:"logic",token:{type:"Twig.logic.type.for",key_var:"date",value_var:"day",expression:[{type:"Twig.expression.type.variable",value:"cell_array",match:["cell_array"]}],output:[{type:"raw",value:' <th class="ai1ec-weekday\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"today"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:"ai1ec-today"}]}},{type:"raw",value:'">\n '},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"show_reveal_button",match:["show_reveal_button"]},{type:"Twig.expression.type.variable",value:"loop",match:["loop"]},{type:"Twig.expression.type.key.period",key:"last"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <div class="ai1ec-reveal-full-day">\n <button class="ai1ec-btn ai1ec-btn-info ai1ec-btn-xs\n ai1ec-tooltip-trigger"\n data-placement="left"\n title="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_full_day",match:["text_full_day"]},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'">\n <i class="ai1ec-fa ai1ec-fa-expand"></i>\n </button>\n </div>\n '}]}},{type:"raw",value:' <a class="ai1ec-load-view" href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"href"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"data_type",match:["data_type"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'>\n <span class="ai1ec-weekday-date">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"day"}]},{type:"raw",value:'</span>\n <span class="ai1ec-weekday-day">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"weekday"}]},{type:"raw",value:"</span>\n </a>\n </th>\n "}]}},{type:"raw",value:" </tr>\n <tr>\n "},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"day",expression:[{type:"Twig.expression.type.variable",value:"cell_array",match:["cell_array"]}],output:[{type:"raw",value:' <td class="ai1ec-allday-events\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"today"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:"ai1ec-today"}]}},{type:"raw",value:'">\n\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"loop",match:["loop"]},{type:"Twig.expression.type.key.period",key:"first"}],output:[{type:"raw",value:' <div class="ai1ec-allday-label">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_all_day",match:["text_all_day"]}]},{type:"raw",value:"</div>\n "}]}},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"event",expression:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"allday"}],output:[{type:"raw",value:' <a href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"permalink"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"data_type_events",match:["data_type_events"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'\n data-instance-id="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"instance_id"}]},{type:"raw",value:'"\n class="ai1ec-event-container ai1ec-load-event ai1ec-popup-trigger\n ai1ec-event-id-'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"post_id"}]},{type:"raw",value:"\n ai1ec-event-instance-id-"},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"instance_id"}]},{type:"raw",value:"\n ai1ec-allday\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"is_multiday"}],output:[{type:"raw",value:"ai1ec-multiday"}]}},{type:"raw",value:'"\n >\n <div class="ai1ec-event"\n style="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"color_style"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'">\n <span class="ai1ec-event-title">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"filtered_title"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"show_location_in_title",match:["show_location_in_title"]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <span class="ai1ec-event-location"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_venue_separator",match:["text_venue_separator"]},{type:"Twig.expression.type.filter",value:"format",match:["| format","format"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:"</span>\n "}]}},{type:"raw",value:' </span>\n </div>\n </a>\n\n <div class="ai1ec-popover ai1ec-popup ai1ec-popup-in-'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"type",match:["type"]}]},{type:"raw",value:'-view">\n\n '},{type:"logic",token:{type:"Twig.logic.type.set",key:"category_colors",expression:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"category_colors"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"category_colors",match:["category_colors"]}],output:[{type:"raw",value:' <div class="ai1ec-color-swatches">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"category_colors",match:["category_colors"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"</div>\n "}]}},{type:"raw",value:' \n <span class="ai1ec-popup-title">\n <a href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"permalink"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"filtered_title"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"</a>\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"show_location_in_title",match:["show_location_in_title"]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <span class="ai1ec-event-location"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_venue_separator",match:["text_venue_separator"]},{type:"Twig.expression.type.filter",value:"format",match:["| format","format"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:"</span>\n "}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"is_ticket_button_enabled",match:["is_ticket_button_enabled"]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <a class="ai1ec-pull-right ai1ec-btn ai1ec-btn-primary ai1ec-btn-xs\n ai1ec-buy-tickets" target="_blank"\n href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url_label"}]},{type:"raw",value:"</a>\n "}]}},{type:"raw",value:" </span>\n \n "},{type:"logic",token:{type:"Twig.logic.type.set",key:"edit_post_link",expression:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"edit_post_link"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"edit_post_link",match:["edit_post_link"]}],output:[{type:"raw",value:' <a class="post-edit-link" href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"edit_post_link",match:["edit_post_link"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'">\n <i class="ai1ec-fa ai1ec-fa-pencil"></i> '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_edit",match:["text_edit"]}]},{type:"raw",value:"\n </a>\n "}]}},{type:"raw",value:' \n <div class="ai1ec-event-time">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"popup_timespan"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n </div>\n \n "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"avatar"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"post_excerpt"}],output:[{type:"raw",value:' <div class="ai1ec-popup-excerpt">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"post_excerpt"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"</div>\n "}]}},{type:"raw",value:" \n </div>\n\n "}]}},{type:"raw",value:" "},{type:"raw",value:"\n\n </td>\n "}]}},{type:"raw",value:" "},{type:"raw",value:'\n </tr>\n\n </thead>\n <tbody>\n <tr class="ai1ec-'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"type",match:["type"]}]},{type:"raw",value:'">\n '},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"day",expression:[{type:"Twig.expression.type.variable",value:"cell_array",match:["cell_array"]}],output:[{type:"raw",value:" <td "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"today"}],output:[{type:"raw",value:'class="ai1ec-today"'}]}},{type:"raw",value:">today\n\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"loop",match:["loop"]},{type:"Twig.expression.type.key.period",key:"first"}],output:[{type:"raw",value:' <div class="ai1ec-grid-container">\n '},{type:"logic",token:{type:"Twig.logic.type.for",key_var:"h",value_var:"hour",expression:[{type:"Twig.expression.type.variable",value:"hours",match:["hours"]}],output:[{type:"raw",value:' <div class="ai1ec-hour-marker\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"h",match:["h"]},{type:"Twig.expression.type.number",value:8,match:["8",null]},{type:"Twig.expression.type.operator.binary",value:">=",precidence:8,associativity:"leftToRight",operator:">="},{type:"Twig.expression.type.variable",value:"h",match:["h"]},{type:"Twig.expression.type.number",value:18,match:["18",null]},{type:"Twig.expression.type.operator.binary",value:"<",precidence:8,associativity:"leftToRight",operator:"<"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:"ai1ec-business-hour"}]}},{type:"raw",value:'"\n style="top: '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"h",match:["h"]},{type:"Twig.expression.type.number",value:60,match:["60",null]},{type:"Twig.expression.type.operator.binary",value:"*",precidence:5,associativity:"leftToRight",operator:"*"}]},{type:"raw",value:'px;">\n <div>\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"hour",match:["hour"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n </div>\n </div>\n "},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"quarter",expression:[{type:"Twig.expression.type.number",value:1,match:["1",null]},{type:"Twig.expression.type.number",value:3,match:["3",null]},{type:"Twig.expression.type.operator.binary",value:"..",precidence:20,associativity:"leftToRight",operator:".."}],output:[{type:"raw",value:' <div class="ai1ec-quarter-marker"\n style="top: '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"h",match:["h"]},{type:"Twig.expression.type.number",value:60,match:["60",null]},{type:"Twig.expression.type.operator.binary",value:"*",precidence:5,associativity:"leftToRight",operator:"*"},{type:"Twig.expression.type.variable",value:"quarter",match:["quarter"]},{type:"Twig.expression.type.number",value:15,match:["15",null]},{type:"Twig.expression.type.operator.binary",value:"*",precidence:5,associativity:"leftToRight",operator:"*"},{type:"Twig.expression.type.operator.binary",value:"+",precidence:6,associativity:"leftToRight",operator:"+"}]},{type:"raw",value:'px;"></div>\n '}]}},{type:"raw",value:" "}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"today"}],output:[{type:"raw",value:' <div class="ai1ec-now-marker" style="top: '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"now_top",match:["now_top"]}]},{type:"raw",value:'px;">\n <div>\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_now_label",match:["text_now_label"]}]},{type:"raw",value:" "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"now_text",match:["now_text"]}]},{type:"raw",value:"\n </div>\n </div>\n "}]}},{type:"raw",value:" </div>\n "}]}},{type:"raw",value:'\n <div class="ai1ec-day">\n\n '},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"day_array",expression:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"notallday"}],output:[{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.set",key:"event",expression:[{type:"Twig.expression.type.variable",value:"day_array",match:["day_array"]},{type:"Twig.expression.type.key.period",key:"event"}]}},{type:"raw",value:' <a href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"permalink"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"data_type_events",match:["data_type_events"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'\n data-instance-id="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"instance_id"}]},{type:"raw",value:'"\n class="ai1ec-event-container ai1ec-load-event ai1ec-popup-trigger\n ai1ec-event-id-'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"post_id"}]},{type:"raw",value:"\n ai1ec-event-instance-id-"},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"instance_id"}]},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"start_truncated"}],output:[{type:"raw",value:"ai1ec-start-truncated"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"end_truncated"}],output:[{type:"raw",value:"ai1ec-end-truncated"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"is_multiday"}],output:[{type:"raw",value:"ai1ec-multiday"}]}},{type:"raw",value:'"\n style="top: '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"day_array",match:["day_array"]},{type:"Twig.expression.type.key.period",key:"top"}]},{type:"raw",value:"px;\n height: "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"day_array",match:["day_array"]},{type:"Twig.expression.type.key.period",key:"height"}]},{type:"raw",value:"px;\n left: "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"day_array",match:["day_array"]},{type:"Twig.expression.type.key.period",key:"indent"},{type:"Twig.expression.type.variable",value:"indent_multiplier",match:["indent_multiplier"]},{type:"Twig.expression.type.operator.binary",value:"*",precidence:5,associativity:"leftToRight",operator:"*"},{type:"Twig.expression.type.variable",value:"indent_offset",match:["indent_offset"]},{type:"Twig.expression.type.operator.binary",value:"+",precidence:6,associativity:"leftToRight",operator:"+"}]},{type:"raw",value:"px;\n "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"color_style"}]},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.set",key:"faded_color",expression:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"faded_color"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.set",key:"rgba_color",expression:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"rgba_color"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"faded_color",match:["faded_color"]}],output:[{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.set",key:"rgba1",expression:[{type:"Twig.expression.type.variable",value:"rgba_color",match:["rgba_color"]},{type:"Twig.expression.type.filter",value:"format",match:["| format","format"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"0.05"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.set",key:"rgba3",expression:[{type:"Twig.expression.type.variable",value:"rgba_color",match:["rgba_color"]},{type:"Twig.expression.type.filter",value:"format",match:["| format","format"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"0.3"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]}},{type:"raw",value:" border: 1px solid "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"faded_color",match:["faded_color"]}]},{type:"raw",value:";\n border-color: "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"rgba_color",match:["rgba_color"]},{type:"Twig.expression.type.filter",value:"format",match:["| format","format"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"0.5"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:";\n background-image: -webkit-linear-gradient( top, "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"rgba1",match:["rgba1"]}]},{type:"raw",value:", "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"rgba3",match:["rgba3"]}]},{type:"raw",value:" 50px );\n background-image: -moz-linear-gradient( top, "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"rgba1",match:["rgba1"]}]},{type:"raw",value:", "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"rgba3",match:["rgba3"]}]},{type:"raw",value:" 50px );\n background-image: -ms-linear-gradient( top, "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"rgba1",match:["rgba1"]}]},{type:"raw",value:", "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"rgba3",match:["rgba3"]}]},{type:"raw",value:" 50px );\n background-image: -o-linear-gradient( top, "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"rgba1",match:["rgba1"]}]},{type:"raw",value:", "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"rgba3",match:["rgba3"]}]},{type:"raw",value:" 50px );\n background-image: linear-gradient( top, "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"rgba1",match:["rgba1"]}]},{type:"raw",value:", "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"rgba3",match:["rgba3"]}]},{type:"raw",value:" 50px );\n "}]}},{type:"raw",value:' ">\n\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"start_truncated"}],output:[{type:"raw",value:' <div class="ai1ec-start-truncator">◤</div>\n '}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"end_truncated"}],output:[{type:"raw",value:' <div class="ai1ec-end-truncator">◢</div>\n '}]}},{type:"raw",value:'\n <div class="ai1ec-event">\n <span class="ai1ec-event-time">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"short_start_time"}]},{type:"raw",value:'\n </span>\n <span class="ai1ec-event-title">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"filtered_title"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"show_location_in_title",match:["show_location_in_title"]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <span class="ai1ec-event-location"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_venue_separator",match:["text_venue_separator"]},{type:"Twig.expression.type.filter",value:"format",match:["| format","format"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:"</span>\n "}]}},{type:"raw",value:' </span>\n </div>\n\n </a>\n\n <div class="ai1ec-popover ai1ec-popup ai1ec-popup-in-'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"type",match:["type"]}]},{type:"raw",value:'-view">\n\n '},{type:"logic",token:{type:"Twig.logic.type.set",key:"category_colors",expression:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"category_colors"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"category_colors",match:["category_colors"]}],output:[{type:"raw",value:' <div class="ai1ec-color-swatches">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"category_colors",match:["category_colors"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"</div>\n "}]}},{type:"raw",value:' \n <span class="ai1ec-popup-title">\n <a href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"permalink"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"filtered_title"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"</a>\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"show_location_in_title",match:["show_location_in_title"]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <span class="ai1ec-event-location"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_venue_separator",match:["text_venue_separator"]},{type:"Twig.expression.type.filter",value:"format",match:["| format","format"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:"</span>\n "}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"is_ticket_button_enabled",match:["is_ticket_button_enabled"]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <a class="ai1ec-pull-right ai1ec-btn ai1ec-btn-primary ai1ec-btn-xs\n ai1ec-buy-tickets" target="_blank"\n href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url_label"}]},{type:"raw",value:"</a>\n "}]}},{type:"raw",value:" </span>\n \n "},{type:"logic",token:{type:"Twig.logic.type.set",key:"edit_post_link",expression:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"edit_post_link"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"edit_post_link",match:["edit_post_link"]}],output:[{type:"raw",value:' <a class="post-edit-link" href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"edit_post_link",match:["edit_post_link"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'">\n <i class="ai1ec-fa ai1ec-fa-pencil"></i> '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_edit",match:["text_edit"]}]},{type:"raw",value:"\n </a>\n "}]}},{type:"raw",value:' \n <div class="ai1ec-event-time">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"popup_timespan"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n </div>\n \n "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"avatar"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"post_excerpt"}],output:[{type:"raw",value:' <div class="ai1ec-popup-excerpt">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"post_excerpt"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"</div>\n "}]}},{type:"raw",value:" \n </div>\n\n\n "}]}},{type:"raw",value:" "},{type:"raw",value:"\n </div>\n \n </td>\n "}]}},{type:"raw",value:" "},{type:"raw",value:'\n </tr>\n </tbody>\n\n</table>\n\n<div class="ai1ec-pull-left">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"pagination_links",match:["pagination_links"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"</div>\n"}],precompiled:!0}),n});
1
+ timely.define(["libs/twig","oneday"],function(e){var t,n;return t=e.twig,n=t({id:"../js_src/oneday.twig",data:[{type:"output",stack:[{type:"Twig.expression.type.variable",value:"navigation",match:["navigation"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'\n\n<table class="ai1ec-'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"type",match:["type"]}]},{type:"raw",value:'-view-original">\n <thead>\n <tr>\n '},{type:"logic",token:{type:"Twig.logic.type.for",key_var:"date",value_var:"day",expression:[{type:"Twig.expression.type.variable",value:"cell_array",match:["cell_array"]}],output:[{type:"raw",value:' <th class="ai1ec-weekday\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"today"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:"ai1ec-today"}]}},{type:"raw",value:'">\n '},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"show_reveal_button",match:["show_reveal_button"]},{type:"Twig.expression.type.variable",value:"loop",match:["loop"]},{type:"Twig.expression.type.key.period",key:"last"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <div class="ai1ec-reveal-full-day">\n <button class="ai1ec-btn ai1ec-btn-info ai1ec-btn-xs\n ai1ec-tooltip-trigger"\n data-placement="left"\n title="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_full_day",match:["text_full_day"]},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'">\n <i class="ai1ec-fa ai1ec-fa-expand"></i>\n </button>\n </div>\n '}]}},{type:"raw",value:' <a class="ai1ec-load-view" href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"href"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"data_type",match:["data_type"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'>\n <span class="ai1ec-weekday-date">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"day"}]},{type:"raw",value:'</span>\n <span class="ai1ec-weekday-day">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"weekday"}]},{type:"raw",value:"</span>\n </a>\n </th>\n "}]}},{type:"raw",value:" </tr>\n <tr>\n "},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"day",expression:[{type:"Twig.expression.type.variable",value:"cell_array",match:["cell_array"]}],output:[{type:"raw",value:' <td class="ai1ec-allday-events\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"today"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:"ai1ec-today"}]}},{type:"raw",value:'">\n\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"loop",match:["loop"]},{type:"Twig.expression.type.key.period",key:"first"}],output:[{type:"raw",value:' <div class="ai1ec-allday-label">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_all_day",match:["text_all_day"]}]},{type:"raw",value:"</div>\n "}]}},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"event",expression:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"allday"}],output:[{type:"raw",value:' <a href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"permalink"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n data-instance-id="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"instance_id"}]},{type:"raw",value:'"\n class="ai1ec-event-container ai1ec-load-event ai1ec-popup-trigger\n ai1ec-event-id-'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"post_id"}]},{type:"raw",value:"\n ai1ec-event-instance-id-"},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"instance_id"}]},{type:"raw",value:"\n ai1ec-allday\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"is_multiday"}],output:[{type:"raw",value:"ai1ec-multiday"}]}},{type:"raw",value:'"\n >\n <div class="ai1ec-event"\n style="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"color_style"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'">\n <span class="ai1ec-event-title">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"filtered_title"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"show_location_in_title",match:["show_location_in_title"]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <span class="ai1ec-event-location"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_venue_separator",match:["text_venue_separator"]},{type:"Twig.expression.type.filter",value:"format",match:["| format","format"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:"</span>\n "}]}},{type:"raw",value:' </span>\n </div>\n </a>\n\n <div class="ai1ec-popover ai1ec-popup ai1ec-popup-in-'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"type",match:["type"]}]},{type:"raw",value:'-view">\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"category_colors"}],output:[{type:"raw",value:' <div class="ai1ec-color-swatches">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"category_colors"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"</div>\n "}]}},{type:"raw",value:' <span class="ai1ec-popup-title">\n <a class="ai1ec-load-event"\n href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"permalink"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"filtered_title"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"</a>\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"show_location_in_title",match:["show_location_in_title"]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <span class="ai1ec-event-location"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_venue_separator",match:["text_venue_separator"]},{type:"Twig.expression.type.filter",value:"format",match:["| format","format"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:"</span>\n "}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"is_ticket_button_enabled",match:["is_ticket_button_enabled"]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <a class="ai1ec-pull-right ai1ec-btn ai1ec-btn-primary ai1ec-btn-xs\n ai1ec-buy-tickets" target="_blank"\n href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url_label"}]},{type:"raw",value:"</a>\n "}]}},{type:"raw",value:" </span>\n\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"edit_post_link"}],output:[{type:"raw",value:' <a class="post-edit-link"\n href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"edit_post_link"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'">\n <i class="ai1ec-fa ai1ec-fa-pencil"></i> '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_edit",match:["text_edit"]}]},{type:"raw",value:"\n </a>\n "}]}},{type:"raw",value:'\n <div class="ai1ec-event-time">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"popup_timespan"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'\n </div>\n\n <a class="ai1ec-load-event"\n href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"permalink"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"avatar_not_wrapped"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n </a>\n\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"post_excerpt"}],output:[{type:"raw",value:' <div class="ai1ec-popup-excerpt">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"post_excerpt"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"</div>\n "}]}},{type:"raw",value:" </div>\n\n "}]}},{type:"raw",value:" "},{type:"raw",value:"\n\n </td>\n "}]}},{type:"raw",value:" "},{type:"raw",value:'\n </tr>\n\n </thead>\n <tbody>\n <tr class="ai1ec-'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"type",match:["type"]}]},{type:"raw",value:'">\n '},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"day",expression:[{type:"Twig.expression.type.variable",value:"cell_array",match:["cell_array"]}],output:[{type:"raw",value:" <td "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"today"}],output:[{type:"raw",value:'class="ai1ec-today"'}]}},{type:"raw",value:">\n\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"loop",match:["loop"]},{type:"Twig.expression.type.key.period",key:"first"}],output:[{type:"raw",value:' <div class="ai1ec-grid-container">\n '},{type:"logic",token:{type:"Twig.logic.type.for",key_var:"h",value_var:"hour",expression:[{type:"Twig.expression.type.variable",value:"hours",match:["hours"]}],output:[{type:"raw",value:' <div class="ai1ec-hour-marker\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"h",match:["h"]},{type:"Twig.expression.type.number",value:8,match:["8",null]},{type:"Twig.expression.type.operator.binary",value:">=",precidence:8,associativity:"leftToRight",operator:">="},{type:"Twig.expression.type.variable",value:"h",match:["h"]},{type:"Twig.expression.type.number",value:18,match:["18",null]},{type:"Twig.expression.type.operator.binary",value:"<",precidence:8,associativity:"leftToRight",operator:"<"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:"ai1ec-business-hour"}]}},{type:"raw",value:'"\n style="top: '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"h",match:["h"]},{type:"Twig.expression.type.number",value:60,match:["60",null]},{type:"Twig.expression.type.operator.binary",value:"*",precidence:5,associativity:"leftToRight",operator:"*"}]},{type:"raw",value:'px;">\n <div>\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"hour",match:["hour"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n </div>\n </div>\n "},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"quarter",expression:[{type:"Twig.expression.type.number",value:1,match:["1",null]},{type:"Twig.expression.type.number",value:3,match:["3",null]},{type:"Twig.expression.type.operator.binary",value:"..",precidence:20,associativity:"leftToRight",operator:".."}],output:[{type:"raw",value:' <div class="ai1ec-quarter-marker"\n style="top: '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"h",match:["h"]},{type:"Twig.expression.type.number",value:60,match:["60",null]},{type:"Twig.expression.type.operator.binary",value:"*",precidence:5,associativity:"leftToRight",operator:"*"},{type:"Twig.expression.type.variable",value:"quarter",match:["quarter"]},{type:"Twig.expression.type.number",value:15,match:["15",null]},{type:"Twig.expression.type.operator.binary",value:"*",precidence:5,associativity:"leftToRight",operator:"*"},{type:"Twig.expression.type.operator.binary",value:"+",precidence:6,associativity:"leftToRight",operator:"+"}]},{type:"raw",value:'px;"></div>\n '}]}},{type:"raw",value:" "}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"today"},{type:"Twig.expression.type.variable",value:"show_now",match:["show_now"]},{type:"Twig.expression.type.operator.binary",value:"or",precidence:14,associativity:"leftToRight",operator:"or"}],output:[{type:"raw",value:' <div class="ai1ec-now-marker" style="top: '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"now_top",match:["now_top"]}]},{type:"raw",value:'px;">\n <div>\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_now_label",match:["text_now_label"]}]},{type:"raw",value:" "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"now_text",match:["now_text"]}]},{type:"raw",value:"\n </div>\n </div>\n "}]}},{type:"raw",value:" </div>\n "}]}},{type:"raw",value:'\n <div class="ai1ec-day">\n\n '},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"day_array",expression:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"notallday"}],output:[{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.set",key:"event",expression:[{type:"Twig.expression.type.variable",value:"day_array",match:["day_array"]},{type:"Twig.expression.type.key.period",key:"event"}]}},{type:"raw",value:' <a href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"permalink"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n data-instance-id="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"instance_id"}]},{type:"raw",value:'"\n class="ai1ec-event-container ai1ec-load-event ai1ec-popup-trigger\n ai1ec-event-id-'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"post_id"}]},{type:"raw",value:"\n ai1ec-event-instance-id-"},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"instance_id"}]},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"start_truncated"}],output:[{type:"raw",value:"ai1ec-start-truncated"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"end_truncated"}],output:[{type:"raw",value:"ai1ec-end-truncated"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"is_multiday"}],output:[{type:"raw",value:"ai1ec-multiday"}]}},{type:"raw",value:'"\n style="top: '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"day_array",match:["day_array"]},{type:"Twig.expression.type.key.period",key:"top"}]},{type:"raw",value:"px;\n height: "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"day_array",match:["day_array"]},{type:"Twig.expression.type.key.period",key:"height"}]},{type:"raw",value:"px;\n left: "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"day_array",match:["day_array"]},{type:"Twig.expression.type.key.period",key:"indent"},{type:"Twig.expression.type.variable",value:"indent_multiplier",match:["indent_multiplier"]},{type:"Twig.expression.type.operator.binary",value:"*",precidence:5,associativity:"leftToRight",operator:"*"},{type:"Twig.expression.type.variable",value:"indent_offset",match:["indent_offset"]},{type:"Twig.expression.type.operator.binary",value:"+",precidence:6,associativity:"leftToRight",operator:"+"}]},{type:"raw",value:"px;\n "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"color_style"}]},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.set",key:"faded_color",expression:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"faded_color"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.set",key:"rgba_color",expression:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"rgba_color"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"faded_color",match:["faded_color"]}],output:[{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.set",key:"rgba1",expression:[{type:"Twig.expression.type.variable",value:"rgba_color",match:["rgba_color"]},{type:"Twig.expression.type.filter",value:"format",match:["| format","format"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"0.05"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.set",key:"rgba3",expression:[{type:"Twig.expression.type.variable",value:"rgba_color",match:["rgba_color"]},{type:"Twig.expression.type.filter",value:"format",match:["| format","format"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"0.3"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]}},{type:"raw",value:" border: 1px solid "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"faded_color",match:["faded_color"]}]},{type:"raw",value:";\n border-color: "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"rgba_color",match:["rgba_color"]},{type:"Twig.expression.type.filter",value:"format",match:["| format","format"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"0.5"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:";\n background-image: -webkit-linear-gradient( top, "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"rgba1",match:["rgba1"]}]},{type:"raw",value:", "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"rgba3",match:["rgba3"]}]},{type:"raw",value:" 50px );\n background-image: -moz-linear-gradient( top, "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"rgba1",match:["rgba1"]}]},{type:"raw",value:", "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"rgba3",match:["rgba3"]}]},{type:"raw",value:" 50px );\n background-image: -ms-linear-gradient( top, "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"rgba1",match:["rgba1"]}]},{type:"raw",value:", "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"rgba3",match:["rgba3"]}]},{type:"raw",value:" 50px );\n background-image: -o-linear-gradient( top, "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"rgba1",match:["rgba1"]}]},{type:"raw",value:", "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"rgba3",match:["rgba3"]}]},{type:"raw",value:" 50px );\n background-image: linear-gradient( top, "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"rgba1",match:["rgba1"]}]},{type:"raw",value:", "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"rgba3",match:["rgba3"]}]},{type:"raw",value:" 50px );\n "}]}},{type:"raw",value:' ">\n\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"start_truncated"}],output:[{type:"raw",value:' <div class="ai1ec-start-truncator">◤</div>\n '}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"end_truncated"}],output:[{type:"raw",value:' <div class="ai1ec-end-truncator">◢</div>\n '}]}},{type:"raw",value:'\n <div class="ai1ec-event">\n <span class="ai1ec-event-time">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"short_start_time"}]},{type:"raw",value:'\n </span>\n <span class="ai1ec-event-title">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"filtered_title"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"show_location_in_title",match:["show_location_in_title"]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <span class="ai1ec-event-location"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_venue_separator",match:["text_venue_separator"]},{type:"Twig.expression.type.filter",value:"format",match:["| format","format"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:"</span>\n "}]}},{type:"raw",value:' </span>\n </div>\n\n </a>\n\n <div class="ai1ec-popover ai1ec-popup ai1ec-popup-in-'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"type",match:["type"]}]},{type:"raw",value:'-view">\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"category_colors"}],output:[{type:"raw",value:' <div class="ai1ec-color-swatches">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"category_colors"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"</div>\n "}]}},{type:"raw",value:' <span class="ai1ec-popup-title">\n <a class="ai1ec-load-event"\n href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"permalink"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"filtered_title"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"</a>\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"show_location_in_title",match:["show_location_in_title"]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <span class="ai1ec-event-location"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_venue_separator",match:["text_venue_separator"]},{type:"Twig.expression.type.filter",value:"format",match:["| format","format"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:"</span>\n "}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"is_ticket_button_enabled",match:["is_ticket_button_enabled"]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <a class="ai1ec-pull-right ai1ec-btn ai1ec-btn-primary ai1ec-btn-xs\n ai1ec-buy-tickets" target="_blank"\n href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url_label"}]},{type:"raw",value:"</a>\n "}]}},{type:"raw",value:" </span>\n\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"edit_post_link"}],output:[{type:"raw",value:' <a class="post-edit-link"\n href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"edit_post_link"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'">\n <i class="ai1ec-fa ai1ec-fa-pencil"></i> '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_edit",match:["text_edit"]}]},{type:"raw",value:"\n </a>\n "}]}},{type:"raw",value:'\n <div class="ai1ec-event-time">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"popup_timespan"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'\n </div>\n\n <a class="ai1ec-load-event"\n href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"permalink"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"avatar_not_wrapped"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n </a>\n\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"post_excerpt"}],output:[{type:"raw",value:' <div class="ai1ec-popup-excerpt">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"post_excerpt"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"</div>\n "}]}},{type:"raw",value:" </div>\n\n "}]}},{type:"raw",value:" "},{type:"raw",value:"\n </div>\n\n </td>\n "}]}},{type:"raw",value:" "},{type:"raw",value:'\n </tr>\n </tbody>\n\n</table>\n\n<div class="ai1ec-pull-left">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"pagination_links",match:["pagination_links"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"</div>\n"}],precompiled:!0}),n});
public/js/pages/add_new_event.js CHANGED
@@ -42,6 +42,28 @@
42
  * limitations under the License.
43
  * ======================================================================== */
44
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  /* ========================================================================
46
  * Bootstrap: transition.js v3.0.3
47
  * http://getbootstrap.com/javascript/#transitions
@@ -139,4 +161,4 @@ CONDITIONS OF ANY KIND, either express or implied. See the Apache License and th
139
  the specific language governing permissions and limitations under the Apache License and the GPL License.
140
  */
141
 
142
- timely.define("domReady",[],function(){function u(e){var t;for(t=0;t<e.length;t++)e[t](n)}function a(){var e=r;t&&e.length&&(r=[],u(e))}function f(){t||(t=!0,o&&clearInterval(o),a())}function c(e){return t?e(n):r.push(e),c}var e=typeof window!="undefined"&&window.document,t=!e,n=e?document:null,r=[],i,s,o;if(e){if(document.addEventListener)document.addEventListener("DOMContentLoaded",f,!1),window.addEventListener("load",f,!1);else if(window.attachEvent){window.attachEvent("onload",f),s=document.createElement("div");try{i=window.frameElement===null}catch(l){}s.doScroll&&i&&window.external&&(o=setInterval(function(){try{s.doScroll(),f()}catch(e){}},30))}(document.readyState==="complete"||document.readyState==="interactive")&&f()}return c.version="2.0.0",c.load=function(e,t,n,r){r.isBuild?n(null):c(n)},c}),timely.define("external_libs/bootstrap/tab",["jquery_timely"],function(e){var t=function(t){this.element=e(t)};t.prototype.show=function(){var t=this.element,n=t.closest("ul:not(.ai1ec-dropdown-menu)"),r=t.data("target");r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("ai1ec-active"))return;var i=n.find(".ai1ec-active:last a")[0],s=e.Event("show.bs.tab",{relatedTarget:i});t.trigger(s);if(s.isDefaultPrevented())return;var o=e(r);this.activate(t.parent("li"),n),this.activate(o,o.parent(),function(){t.trigger({type:"shown.bs.tab",relatedTarget:i})})},t.prototype.activate=function(t,n,r){function o(){i.removeClass("ai1ec-active").find("> .ai1ec-dropdown-menu > .ai1ec-active").removeClass("ai1ec-active"),t.addClass("ai1ec-active"),s?(t[0].offsetWidth,t.addClass("ai1ec-in")):t.removeClass("ai1ec-fade"),t.parent(".ai1ec-dropdown-menu")&&t.closest("li.ai1ec-dropdown").addClass("ai1ec-active"),r&&r()}var i=n.find("> .ai1ec-active"),s=r&&e.support.transition&&i.hasClass("ai1ec-fade");s?i.one(e.support.transition.end,o).emulateTransitionEnd(150):o(),i.removeClass("ai1ec-in")};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("bs.tab");i||r.data("bs.tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.bs.tab.data-api",'[data-toggle="ai1ec-tab"], [data-toggle="ai1ec-pill"]',function(t){t.preventDefault(),e(this).tab("show")})}),timely.define("libs/utils",["jquery_timely","external_libs/bootstrap/tab"],function(e){var t=function(){return{is_float:function(e){return!isNaN(parseFloat(e))},is_valid_coordinate:function(e,t){var n=t?90:180;return this.is_float(e)&&Math.abs(e)<n},convert_comma_to_dot:function(e){return e.replace(",",".")},field_has_value:function(t){var n="#"+t,r=e(n),i=!1;return r.length===1&&(i=e.trim(r.val())!==""),i},make_alert:function(t,n,r){var i="";switch(n){case"error":i="ai1ec-alert ai1ec-alert-danger";break;case"success":i="ai1ec-alert ai1ec-alert-success";break;default:i="ai1ec-alert"}var s=e("<div />",{"class":i,html:t});if(!r){var o=e("<button>",{type:"button","class":"ai1ec-close","data-dismiss":"ai1ec-alert",text:"×"});s.prepend(o)}return s},get_ajax_url:function(){return typeof window.ajaxurl=="undefined"?"http://localhost/wordpress/wp-admin/admin-ajax.php":window.ajaxurl},isUrl:function(e){var t=/(http|https|webcal):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return t.test(e)},isValidEmail:function(e){var t=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return t.test(e)},activate_saved_tab_on_page_load:function(t){null===t||undefined===t?e("ul.ai1ec-nav a:first").tab("show"):e("ul.ai1ec-nav a[href="+t+"]").tab("show")},add_query_arg:function(e,t){var n=e.indexOf("?")===-1?"?":"&";return-1!==e.indexOf(n+t[0]+"=")?e:e+n+t[0]+"="+t[1]},init_autoselect:function(){e(document).one("click",".ai1ec-autoselect",function(t){if(e(this).data("clicked")&&t.originalEvent.detail<2)return;e(this).data("clicked",!0);var n;document.body.createTextRange?(n=document.body.createTextRange(),n.moveToElementText(this),n.select()):window.getSelection&&(selection=window.getSelection(),n=document.createRange(),n.selectNodeContents(this),selection.removeAllRanges(),selection.addRange(n))})}}}();return t}),timely.define("scripts/add_new_event/event_location/input_coordinates_utility_functions",["jquery_timely","ai1ec_config","libs/utils"],function(e,t,n){var r=function(){e("#ai1ec_input_coordinates:checked").length>0&&e("#ai1ec_table_coordinates input.coordinates").each(function(){this.value=n.convert_comma_to_dot(this.value)})},i=function(t,n){var r=e("<div />",{text:n,"class":"ai1ec-error"});e(t).after(r)},s=function(t,n){t.target.id==="post"&&(t.stopImmediatePropagation(),t.preventDefault(),e("#publish").removeClass("button-primary-disabled"),e("#publish").siblings(".spinner").css("visibility","hidden")),e(n).focus()},o=function(){var t=n.field_has_value("ai1ec_address"),r=!0;return e(".coordinates").each(function(){var e=n.field_has_value(this.id);e||(r=!1)}),t||r},u=function(n){var r=!0,o=!1;return e("#ai1ec_input_coordinates:checked").length>0&&(e("div.ai1ec-error").remove(),e("#ai1ec_table_coordinates input.coordinates").each(function(){var n=e(this).hasClass("latitude"),s=n?t.error_message_not_entered_lat:t.error_message_not_entered_long;this.value===""&&(r=!1,o===!1&&(o=this),i(this,s))})),r===!1&&s(n,o),r},a=function(r){if(e("#ai1ec_input_coordinates:checked").length===1){e("div.ai1ec-error").remove();var o=!0,u=!1,a=!1;return e("#ai1ec_table_coordinates input.coordinates").each(function(){if(this.value===""){a=!0;return}var r=e(this).hasClass("latitude"),s=r?t.error_message_not_valid_lat:t.error_message_not_valid_long;n.is_valid_coordinate(this.value,r)||(o=!1,u===!1&&(u=this),i(this,s))}),o===!1&&s(r,u),a===!0&&(o=!1),o}};return{ai1ec_convert_commas_to_dots_for_coordinates:r,ai1ec_show_error_message_after_element:i,check_if_address_or_coordinates_are_set:o,ai1ec_check_lat_long_fields_filled_when_publishing_event:u,ai1ec_check_lat_long_ok_for_search:a}}),timely.define("external_libs/jquery.autocomplete_geomod",["jquery_timely"],function(e){e.fn.extend({autocomplete:function(t,n){var r=typeof t=="string";return n=e.extend({},e.Autocompleter.defaults,{url:r?t:null,data:r?null:t,delay:r?e.Autocompleter.defaults.delay:10,max:n&&!n.scroll?10:150},n),n.highlight=n.highlight||function(e){return e},n.formatMatch=n.formatMatch||n.formatItem,this.each(function(){new e.Autocompleter(this,n)})},result:function(e){return this.bind("result",e)},search:function(e){return this.trigger("search",[e])},flushCache:function(){return this.trigger("flushCache")},setOptions:function(e){return this.trigger("setOptions",[e])},unautocomplete:function(){return this.trigger("unautocomplete")}}),e.Autocompleter=function(t,n){function d(){var r=h.selected();if(!r)return!1;var s=r.result;o=s;if(n.multiple){var u=m(i.val());if(u.length>1){var a=n.multipleSeparator.length,f=e(t).selection().start,l,c=0;e.each(u,function(e,t){c+=t.length;if(f<=c)return l=e,!1;c+=a}),u[l]=s,s=u.join(n.multipleSeparator)}s+=n.multipleSeparator}return i.val(s),w(),i.trigger("result",[r.data,r.value]),!0}function v(e,t){if(f==r.DEL){h.hide();return}var s=i.val();if(!t&&s==o)return;o=s,s=g(s),s.length>=n.minChars?(i.addClass(n.loadingClass),n.matchCase||(s=s.toLowerCase()),S(s,E,w)):(T(),h.hide())}function m(t){return t?n.multiple?e.map(t.split(n.multipleSeparator),function(n){return e.trim(t).length?e.trim(n):null}):[e.trim(t)]:[""]}function g(r){if(!n.multiple)return r;var i=m(r);if(i.length==1)return i[0];var s=e(t).selection().start;return s==r.length?i=m(r):i=m(r.replace(r.substring(s),"")),i[i.length-1]}function y(s,u){n.autoFill&&g(i.val()).toLowerCase()==s.toLowerCase()&&f!=r.BACKSPACE&&(i.val(i.val()+u.substring(g(o).length)),e(t).selection(o.length,o.length+u.length))}function b(){clearTimeout(s),s=setTimeout(w,200)}function w(){var e=h.visible();h.hide(),clearTimeout(s),T(),n.mustMatch&&i.search(function(e){if(!e)if(n.multiple){var t=m(i.val()).slice(0,-1);i.val(t.join(n.multipleSeparator)+(t.length?n.multipleSeparator:""))}else i.val(""),i.trigger("result",null)})}function E(e,t){t&&t.length&&a?(T(),h.display(t,e),y(e,t[0].value),h.show()):w()}function S(r,i,s){n.matchCase||(r=r.toLowerCase());var o=u.load(r);if(o&&o.length)i(r,o);else if(n.geocoder){var a=g(r),f={address:a};n.region&&(f.region=n.region),n.geocoder.geocode(f,function(e,t){var s=n.parse(e,t,a);u.add(r,s),i(r,s)})}else if(typeof n.url=="string"&&n.url.length>0){var l={timestamp:+(new Date)};e.each(n.extraParams,function(e,t){l[e]=typeof t=="function"?t():t}),e.ajax({mode:"abort",port:"autocomplete"+t.name,dataType:n.dataType,url:n.url,data:e.extend({q:g(r),limit:n.max},l),success:function(e){var t=n.parse&&n.parse(e)||x(e);u.add(r,t),i(r,t)}})}else h.emptyList(),s(r)}function x(t){var r=[],i=t.split("\n");for(var s=0;s<i.length;s++){var o=e.trim(i[s]);o&&(o=o.split("|"),r[r.length]={data:o,value:o[0],result:n.formatResult&&n.formatResult(o,o[0])||o[0]})}return r}function T(){i.removeClass(n.loadingClass)}var r={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8},i=e(t).attr("autocomplete","off").addClass(n.inputClass),s,o="",u=e.Autocompleter.Cache(n),a=0,f,l=navigator.userAgent.match(/opera/i),c={mouseDownOnSelect:!1},h=e.Autocompleter.Select(n,t,d,c),p;l&&e(t.form).bind("submit.autocomplete",function(){if(p)return p=!1,!1}),i.bind((l?"keypress":"keydown")+".autocomplete",function(t){a=1,f=t.keyCode;switch(t.keyCode){case r.UP:t.preventDefault(),h.visible()?h.prev():v(0,!0);break;case r.DOWN:t.preventDefault(),h.visible()?h.next():v(0,!0);break;case r.PAGEUP:t.preventDefault(),h.visible()?h.pageUp():v(0,!0);break;case r.PAGEDOWN:t.preventDefault(),h.visible()?h.pageDown():v(0,!0);break;case n.multiple&&e.trim(n.multipleSeparator)==","&&r.COMMA:case r.TAB:case r.RETURN:if(d())return t.preventDefault(),p=!0,!1;break;case r.ESC:h.hide();break;default:clearTimeout(s),s=setTimeout(v,n.delay)}}).focus(function(){a++}).blur(function(){a=0,c.mouseDownOnSelect||b()}).click(function(){a++>1&&!h.visible()&&v(0,!0)}).bind("search",function(){function n(e,n){var r;if(n&&n.length)for(var s=0;s<n.length;s++)if(n[s].result.toLowerCase()==e.toLowerCase()){r=n[s];break}typeof t=="function"?t(r):i.trigger("result",r&&[r.data,r.value])}var t=arguments.length>1?arguments[1]:null;e.each(m(i.val()),function(e,t){S(t,n,n)})}).bind("flushCache",function(){u.flush()}).bind("setOptions",function(){e.extend(n,arguments[1]),"data"in arguments[1]&&u.populate()}).bind("unautocomplete",function(){h.unbind(),i.unbind(),e(t.form).unbind(".autocomplete")})},e.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:!1,matchSubset:!0,matchContains:!1,cacheLength:10,max:100,mustMatch:!1,extraParams:{},selectFirst:!0,formatItem:function(e){return e[0]},formatMatch:null,autoFill:!1,width:0,multiple:!1,multipleSeparator:", ",highlight:function(e,t){return e.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+t.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>")},scroll:!0,scrollHeight:180},e.Autocompleter.Cache=function(t){function i(e,n){t.matchCase||(e=e.toLowerCase());var r=e.indexOf(n);return t.matchContains=="word"&&(r=e.toLowerCase().search("\\b"+n.toLowerCase())),r==-1?!1:r==0||t.matchContains}function s(e,i){r>t.cacheLength&&u(),n[e]||r++,n[e]=i}function o(){if(!t.data)return!1;var n={},r=0;t.url||(t.cacheLength=1),n[""]=[];for(var i=0,o=t.data.length;i<o;i++){var u=t.data[i];u=typeof u=="string"?[u]:u;var a=t.formatMatch(u,i+1,t.data.length);if(a===!1)continue;var f=a.charAt(0).toLowerCase();n[f]||(n[f]=[]);var l={value:a,data:u,result:t.formatResult&&t.formatResult(u)||a};n[f].push(l),r++<t.max&&n[""].push(l)}e.each(n,function(e,n){t.cacheLength++,s(e,n)})}function u(){n={},r=0}var n={},r=0;return setTimeout(o,25),{flush:u,add:s,populate:o,load:function(s){if(!t.cacheLength||!r)return null;if(!t.url&&t.matchContains){var o=[];for(var u in n)if(u.length>0){var a=n[u];e.each(a,function(e,t){i(t.value,s)&&o.push(t)})}return o}if(n[s])return n[s];if(t.matchSubset)for(var f=s.length-1;f>=t.minChars;f--){var a=n[s.substr(0,f)];if(a){var o=[];return e.each(a,function(e,t){i(t.value,s)&&(o[o.length]=t)}),o}}return null}}},e.Autocompleter.Select=function(t,n,r,i){function p(){if(!l)return;c=e("<div/>").hide().addClass(t.resultsClass).css("position","absolute").appendTo(document.body),h=e("<ul/>").appendTo(c).mouseover(function(t){d(t).nodeName&&d(t).nodeName.toUpperCase()=="LI"&&(u=e("li",h).removeClass(s.ACTIVE).index(d(t)),e(d(t)).addClass(s.ACTIVE))}).click(function(t){return e(d(t)).addClass(s.ACTIVE),r(),n.focus(),!1}).mousedown(function(){i.mouseDownOnSelect=!0}).mouseup(function(){i.mouseDownOnSelect=!1}),t.width>0&&c.css("width",t.width),l=!1}function d(e){var t=e.target;while(t&&t.tagName!="LI")t=t.parentNode;return t?t:[]}function v(e){o.slice(u,u+1).removeClass(s.ACTIVE),m(e);var n=o.slice(u,u+1).addClass(s.ACTIVE);if(t.scroll){var r=0;o.slice(0,u).each(function(){r+=this.offsetHeight}),r+n[0].offsetHeight-h.scrollTop()>h[0].clientHeight?h.scrollTop(r+n[0].offsetHeight-h.innerHeight()):r<h.scrollTop()&&h.scrollTop(r)}}function m(e){u+=e,u<0?u=o.size()-1:u>=o.size()&&(u=0)}function g(e){return t.max&&t.max<e?t.max:e}function y(){h.empty();var n=g(a.length);for(var r=0;r<n;r++){if(!a[r])continue;var i=t.formatItem(a[r].data,r+1,n,a[r].value,f);if(i===!1)continue;var l=e("<li/>").html(t.highlight(i,f)).addClass(r%2==0?"ac_even":"ac_odd").appendTo(h)[0];e.data(l,"ac_data",a[r])}o=h.find("li"),t.selectFirst&&(o.slice(0,1).addClass(s.ACTIVE),u=0),e.fn.bgiframe&&h.bgiframe()}var s={ACTIVE:"ac_over"},o,u=-1,a,f="",l=!0,c,h;return{display:function(e,t){p(),a=e,f=t,y()},next:function(){v(1)},prev:function(){v(-1)},pageUp:function(){u!=0&&u-8<0?v(-u):v(-8)},pageDown:function(){u!=o.size()-1&&u+8>o.size()?v(o.size()-1-u):v(8)},hide:function(){c&&c.hide(),o&&o.removeClass(s.ACTIVE),u=-1},visible:function(){return c&&c.is(":visible")},current:function(){return this.visible()&&(o.filter("."+s.ACTIVE)[0]||t.selectFirst&&o[0])},show:function(){var r=e(n).offset();c.css({width:typeof t.width=="string"||t.width>0?t.width:e(n).width(),top:r.top+n.offsetHeight,left:r.left}).show();if(t.scroll){h.scrollTop(0),h.css({maxHeight:t.scrollHeight,overflow:"auto"});if(navigator.userAgent.match(/msie/i)&&typeof document.body.style.maxHeight=="undefined"){var i=0;o.each(function(){i+=this.offsetHeight});var s=i>t.scrollHeight;h.css("height",s?t.scrollHeight:i),s||o.width(h.width()-parseInt(o.css("padding-left"))-parseInt(o.css("padding-right")))}}},selected:function(){var t=o&&o.filter("."+s.ACTIVE).removeClass(s.ACTIVE);return t&&t.length&&e.data(t[0],"ac_data")},emptyList:function(){h&&h.empty()},unbind:function(){c&&c.remove()}}},e.fn.selection=function(e,t){if(e!==undefined)return this.each(function(){if(this.createTextRange){var n=this.createTextRange();t===undefined||e==t?(n.move("character",e),n.select()):(n.collapse(!0),n.moveStart("character",e),n.moveEnd("character",t),n.select())}else this.setSelectionRange?this.setSelectionRange(e,t):this.selectionStart&&(this.selectionStart=e,this.selectionEnd=t)});var n=this[0];if(n.createTextRange){var r=document.selection.createRange(),i=n.value,s="<->",o=r.text.length;r.text=s;var u=n.value.indexOf(s);return n.value=i,this.selection(u,u+o),{start:u,end:u+o}}if(n.selectionStart!==undefined)return{start:n.selectionStart,end:n.selectionEnd}}}),timely.define("external_libs/geo_autocomplete",["jquery_timely","external_libs/jquery.autocomplete_geomod"],function(e){e.fn.extend({geo_autocomplete:function(t,n){return options=e.extend({},e.Autocompleter.defaults,{geocoder:t,mapwidth:100,mapheight:100,maptype:"terrain",mapkey:"ABQIAAAAbnvDoAoYOSW2iqoXiGTpYBT2yXp_ZAY8_ufC3CFXhHIE1NvwkxQNumU68AwGqjbSNF9YO8NokKst8w",mapsensor:!1,parse:function(t,n,r){var i=[];return t&&n&&n=="OK"&&e.each(t,function(t,n){if(n.geometry&&n.geometry.viewport){var s=n.formatted_address.split(","),o=s[0];e.each(s,function(t,n){if(n.toLowerCase().indexOf(r.toLowerCase())!=-1)return o=e.trim(n),!1}),i.push({data:n,value:o,result:o})}}),i},formatItem:function(e,t,n,r){var i="https://maps.google.com/maps/api/staticmap?visible="+e.geometry.viewport.getSouthWest().toUrlValue()+"|"+e.geometry.viewport.getNorthEast().toUrlValue()+"&size="+options.mapwidth+"x"+options.mapheight+"&maptype="+options.maptype+"&key="+options.mapkey+"&sensor="+(options.mapsensor?"true":"false"),s=e.formatted_address.replace(/,/gi,",<br/>");return'<img src="'+i+'" width="'+options.mapwidth+'" height="'+options.mapheight+'" /> '+s+'<br clear="both"/>'}},n),options.highlight=options.highlight||function(e){return e},options.formatMatch=options.formatMatch||options.formatItem,options.resultsClass="ai1ec-geo-ac-results-not-ready",this.each(function(){e(this).one("focus",function(){var t=setInterval(function(){var n=e(".ai1ec-geo-ac-results-not-ready");n.length&&(n.removeClass("ai1ec-geo-ac-results-not-ready").addClass("ai1ec-geo-ac-results").children("ul").addClass("ai1ec-dropdown-menu"),clearInterval(t))},500)}),new e.Autocompleter(this,options)})}})}),timely.define("scripts/add_new_event/event_location/gmaps_helper",["jquery_timely","domReady","ai1ec_config","scripts/add_new_event/event_location/input_coordinates_utility_functions","external_libs/jquery.autocomplete_geomod","external_libs/geo_autocomplete"],function(e,t,n,r){var i,s,o,u,a,f,l=function(t){e("input.longitude").val(t.latLng.lng()),e("input.latitude").val(t.latLng.lat()),e("#ai1ec_input_coordinates:checked").length===0&&e("#ai1ec_input_coordinates").trigger("click")},c=function(){!navigator.geolocation||navigator.geolocation.getCurrentPosition(function(e){var t=r.check_if_address_or_coordinates_are_set();if(t===!1){var n=e.coords.latitude,i=e.coords.longitude;s=new google.maps.LatLng(n,i),a.setPosition(s),u.setCenter(s),u.setZoom(15),f=e}})},h=function(){n.disable_autocompletion||e("#ai1ec_address").geo_autocomplete(new google.maps.Geocoder,{selectFirst:!1,minChars:3,cacheLength:50,width:300,scroll:!0,scrollHeight:330,region:n.region}).result(function(e,t){t&&d(t)}).change(function(){if(e(this).val().length>0){var t=e(this).val();i.geocode({address:t,region:n.region},function(e,t){t===google.maps.GeocoderStatus.OK&&d(e[0])})}})},p=function(){i=new google.maps.Geocoder,s=new google.maps.LatLng(9.965,-83.327),o={zoom:0,mapTypeId:google.maps.MapTypeId.ROADMAP,center:s},t(function(){e("#ai1ec_map_canvas").length>0&&(u=new google.maps.Map(e("#ai1ec_map_canvas").get(0),o),a=new google.maps.Marker({map:u,draggable:!0}),google.maps.event.addListener(a,"dragend",l),a.setPosition(s),c(),h(),m())})},d=function(t){u.setCenter(t.geometry.location),u.setZoom(15),a.setPosition(t.geometry.location),e("#ai1ec_address").val(t.formatted_address),e("#ai1ec_latitude").val(t.geometry.location.lat()),e("#ai1ec_longitude").val(t.geometry.location.lng()),e("#ai1ec_input_coordinates").is(":checked")||e("#ai1ec_input_coordinates").click();var n="",r="",i="",s=0,o=0,f="",l;for(var c=0;c<t.address_components.length;c++)switch(t.address_components[c].types[0]){case"street_number":n=t.address_components[c].long_name;break;case"route":r=t.address_components[c].long_name;break;case"locality":i=t.address_components[c].long_name;break;case"administrative_area_level_1":f=t.address_components[c].long_name;break;case"postal_code":s=t.address_components[c].long_name;break;case"country":l=t.address_components[c].short_name,o=t.address_components[c].long_name}var h=n.length>0?n+" ":"";h+=r.length>0?r:"",s=s!==0?s:"",e("#ai1ec_city").val(i),e("#ai1ec_province").val(f),e("#ai1ec_postal_code").val(s),e("#ai1ec_country").val(o),e("#ai1ec_country_short").val(l)},v=function(){var t=parseFloat(e("input.latitude").val()),n=parseFloat(e("input.longitude").val()),r=new google.maps.LatLng(t,n);u.setCenter(r),u.setZoom(15),a.setPosition(r)},m=function(){e("#ai1ec_input_coordinates:checked").length===0?(e("#ai1ec_table_coordinates").css({visibility:"hidden"}),e("#ai1ec_address").change()):v()},g=function(){return a},y=function(){return f};return{init_gmaps:p,ai1ec_update_map_from_coordinates:v,get_marker:g,get_position:y}}),timely.define("scripts/add_new_event/event_location/input_coordinates_event_handlers",["jquery_timely","scripts/add_new_event/event_location/input_coordinates_utility_functions","scripts/add_new_event/event_location/gmaps_helper","ai1ec_config"],function(e,t,n,r){var i=function(t){e(this).is(":checked")?e(".ai1ec_box_map").addClass("ai1ec_box_map_visible").hide().slideDown("fast"):e(".ai1ec_box_map").slideUp("fast")},s=function(t){this.checked===!0?e("#ai1ec_table_coordinates").css({visibility:"visible"}):(e("#ai1ec_table_coordinates").css({visibility:"hidden"}),e("#ai1ec_table_coordinates input").val(""),e("div.ai1ec-error").remove())},o=function(e){t.ai1ec_convert_commas_to_dots_for_coordinates();var r=t.ai1ec_check_lat_long_ok_for_search(e);r===!0&&n.ai1ec_update_map_from_coordinates()};return{toggle_visibility_of_google_map_on_click:i,toggle_visibility_of_coordinate_fields_on_click:s,update_map_from_coordinates_on_blur:o}}),timely.define("scripts/add_new_event/event_date_time/date_time_utility_functions",["jquery_timely","ai1ec_config","libs/utils"],function(e,t,n){var r=n.get_ajax_url(),i=function(t,n,r,i,s,o){e(t).val(i),e("#ai1ec_repeat_box").modal("hide");var u=e.trim(e(n).text());u.lastIndexOf(":")===-1&&(u=u.substring(0,u.length-3),e(n).text(u+":")),e(s).attr("disabled",!1),e(r).fadeOut("fast",function(){e(this).text(o.message),e(this).fadeIn("fast")})},s=function(t,n,r,i){e("#ai1ec_repeat_box .ai1ec-alert-danger").text(r.message).removeClass("ai1ec-hide"),e(i).attr("disabled",!1),e(t).val("");var s=e.trim(e(n).text());s.lastIndexOf("...")===-1&&(s=s.substring(0,s.length-1),e(n).text(s+"...")),e(this).closest("tr").find(".ai1ec_rule_text").text()===""&&e(t).siblings("input:checkbox").removeAttr("checked")},o=function(t,n,r,i,s){e(document).on("click",t,function(){if(!e(n).is(":checked")){e(n).attr("checked",!0);var t=e.trim(e(r).text());t=t.substring(0,t.length-3),e(r).text(t+":")}return l(i,s),!1})},u=function(t,n,r,i,s){e(t).click(function(){if(e(this).is(":checked"))this.id==="ai1ec_repeat"&&e("#ai1ec_exclude").removeAttr("disabled"),l(i,s);else{this.id==="ai1ec_repeat"&&e("#ai1ec_exclude").attr("disabled",!0),e(n).text("");var t=e.trim(e(r).text());t=t.substring(0,t.length-1),e(r).text(t+"...")}})},a=function(t,n,r){if(e.trim(e(t).text())===""){e(n).removeAttr("checked"),e("#ai1ec_repeat").is(":checked")||e("#ai1ec_exclude").attr("disabled",!0);var i=e.trim(e(r).text());i.lastIndexOf("...")===-1&&(i=i.substring(0,i.length-1),e(r).text(i+"..."))}},f=function(){e("#ai1ec_count, #ai1ec_daily_count, #ai1ec_weekly_count, #ai1ec_monthly_count, #ai1ec_yearly_count").rangeinput({css:{input:"ai1ec-range",slider:"ai1ec-slider",progress:"ai1ec-progress",handle:"ai1ec-handle"}});var n={start_date_input:"#ai1ec_until-date-input",start_time:"#ai1ec_until-time",date_format:t.date_format,month_names:t.month_names,day_names:t.day_names,week_start_day:t.week_start_day,twentyfour_hour:t.twentyfour_hour,now:new Date(t.now*1e3)};e.inputdate(n)},l=function(t,n){var i=e("#ai1ec_repeat_box"),s=e(".ai1ec-loading",i);i.modal({backdrop:"static"}),e.post(r,t,function(e){e.error?(window.alert(e.message),i.modal("hide")):(s.addClass("ai1ec-hide").after(e.message),typeof n=="function"&&n())},"json")};return{show_repeat_tabs:l,init_modal_widgets:f,click_on_modal_cancel:a,click_on_checkbox:u,click_on_ics_rule_text:o,repeat_form_error:s,repeat_form_success:i}}),timely.define("external_libs/jquery.calendrical_timespan",["jquery_timely"],function(e){function l(){var e=new Date;return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function c(e,t){return typeof e=="string"&&(e=new Date(e)),typeof t=="string"&&(t=new Date(t)),e.getUTCDate()===t.getUTCDate()&&e.getUTCMonth()===t.getUTCMonth()&&e.getUTCFullYear()===t.getUTCFullYear()?!0:!1}function h(e,t){if(e instanceof Date)return h(e.getUTCFullYear(),e.getUTCMonth());if(t==1){var n=e%4==0&&(e%100!=0||e%400==0);return n?29:28}return t==3||t==5||t==8||t==10?30:31}function p(e){return new Date(e.getTime()+864e5)}function d(e){return new Date(e.getTime()-864e5)}function v(e,t){return t==11?new Date(e+1,0,1):new Date(e,t+1,1)}function m(t,n,r,i){var s=i.monthNames.split(","),o=e("<thead />"),u=e("<tr />").appendTo(o);e("<th />").addClass("monthCell").append(e('<a href="javascript:;">&laquo;</a>').addClass("prevMonth").mousedown(function(e){g(t,r==0?n-1:n,r==0?11:r-1,i),e.preventDefault()})).appendTo(u),e("<th />").addClass("monthCell").attr("colSpan",5).append(e('<a href="javascript:;">'+s[r]+" "+n+"</a>").addClass("monthName")).appendTo(u),e("<th />").addClass("monthCell").append(e('<a href="javascript:;">&raquo;</a>').addClass("nextMonth").mousedown(function(){g(t,r==11?n+1:n,r==11?0:r+1,i)})).appendTo(u);var a=i.dayNames.split(","),f=parseInt(i.weekStartDay),l=[];for(var c=0,h=a.length;c<h;c++)l[c]=a[(c+f)%h];var p=e("<tr />").appendTo(o);return e.each(l,function(t,n){e("<td />").addClass("dayName").append(n).appendTo(p)}),o}function g(t,n,r,i){i=i||{};var s=parseInt(i.weekStartDay),o=i.today?i.today:l();o.setHours(0),o.setMinutes(0);var u=new Date(n,r,1),a=v(n,r),f=Math.abs(o.getTimezoneOffset());f!=0&&(o.setHours(o.getHours()+f/60),o.setMinutes(o.getMinutes()+f%60),u.setHours(u.getHours()+f/60),u.setMinutes(u.getMinutes()+f%60),a.setHours(a.getHours()+f/60),a.setMinutes(a.getMinutes()+f%60));var h=a.getUTCDay()-s;h<0?h=Math.abs(h)-1:h=6-h;for(var g=0;g<h;g++)a=p(a);var y=e("<table />");m(t,n,r,i).appendTo(y);var b=e("<tbody />").appendTo(y),w=e("<tr />"),E=u.getUTCDay()-s;E<0&&(E=7+E);for(var g=0;g<E;g++)u=d(u);while(u<=a){var S=e("<td />").addClass("day").append(e('<a href="javascript:;">'+u.getUTCDate()+"</a>").click(function(){var e=u;return function(){i&&i.selectDate&&i.selectDate(e)}}())).appendTo(w),x=c(u,o),T=i.selected&&c(i.selected,u);x&&S.addClass("today"),T&&S.addClass("selected"),x&&T&&S.addClass("today_selected"),u.getUTCMonth()!=r&&S.addClass("nonMonth");var N=u.getUTCDay();(N+1)%7==s&&(b.append(w),w=e("<tr />")),u=p(u)}w.children().length?b.append(w):w.remove(),t.empty().append(y)}function y(t,n){var r=n.selection&&f(n.selection);r&&(r.minute=Math.floor(r.minute/15)*15);var i=n.startTime&&n.startTime.hour*60+n.startTime.minute,s,o=e("<ul />");for(var a=0;a<24;a++)for(var l=0;l<60;l+=15){if(i&&i>a*60+l)continue;(function(){var t=u(a,l,n.isoTime),f=t;if(i!=null){var c=a*60+l-i;c<60?f+=" ("+c+" min)":c==60?f+=" (1 hr)":f+=" ("+Math.floor(c/60)+" hr "+c%60+" min)"}var h=e("<li />").append(e('<a href="javascript:;">'+f+"</a>").click(function(){n&&n.selectTime&&n.selectTime(t)}).mousemove(function(){e("li.selected",o).removeClass("selected")})).appendTo(o);!s&&a==n.defaultHour&&(s=h),r&&r.hour==a&&r.minute==l&&(h.addClass("selected"),s=h)})()}s&&setTimeout(function(){t[0].scrollTop=s[0].offsetTop-s.height()*2},0),t.empty().append(o)}function b(e){e.addClass("error").fadeOut("normal",function(){e.val(e.data("timespan.stored")).removeClass("error").fadeIn("fast")})}function w(){e(this).data("timespan.stored",this.value)}function E(t,n,r,i,a,f,l,c,h,p){r.val(r.data("timespan.initial_value")),f.val(f.data("timespan.initial_value")),l.get(0).checked=l.data("timespan.initial_value");var d=s(r,p,0,15);n.val(u(d.getUTCHours(),d.getUTCMinutes(),c)),t.val(o(d,h));var v=s(f,d.getTime(),1,15);a.val(u(v.getUTCHours(),v.getUTCMinutes(),c)),l.get(0).checked&&v.setUTCDate(v.getUTCDate()-1),i.val(o(v,h)),t.each(w),n.each(w),i.each(w),a.each(w),l.trigger("change.timespan"),e("#ai1ec_instant_event").trigger("change.timespan")}var t={us:{pattern:/([\d]{1,2})\/([\d]{1,2})\/([\d]{4}|[\d]{2})/,format:"m/d/y",order:"middleEndian",zeroPad:!1},iso:{pattern:/([\d]{4}|[\d]{2})-([\d]{1,2})-([\d]{1,2})/,format:"y-m-d",order:"bigEndian",zeroPad:!0},dot:{pattern:/([\d]{1,2}).([\d]{1,2}).([\d]{4}|[\d]{2})/,format:"d.m.y",order:"littleEndian",zeroPad:!1},def:{pattern:/([\d]{1,2})\/([\d]{1,2})\/([\d]{4}|[\d]{2})/,format:"d/m/y",order:"littleEndian",zeroPad:!1}},n=function(e){return e<10?"0"+e:e},r=function(e,t){typeof t=="undefined"&&(t=!1);var r=e.getUTCFullYear()+"-"+n(e.getUTCMonth()+1)+"-"+n(e.getUTCDate());return t&&(r+="T"+n(e.getUTCHours())+":"+n(e.getUTCMinutes())+":00"),r},i=function(e,t){var n=e.val(),r=null;if(n.length<4)r=new Date(t);else{r=new Date(n);var i=n.split("T"),s=i[0].split("-"),o=i[1].split(":");r.setUTCFullYear(s[0],s[1]-1,s[2]),r.setUTCHours(o[0],o[1],o[2],0)}return r},s=function(e,t,n,r){return t+=n*36e5,t-=t%(r*6e4),i(e,t)},o=function(e,n,r){var i,s,o;typeof t[n]=="undefined"&&(n="def"),typeof r=="undefined"&&(r=!1),!0===r?(i=e.getFullYear().toString(),s=(e.getMonth()+1).toString(),o=e.getDate().toString()):(i=e.getUTCFullYear().toString(),s=(e.getUTCMonth()+1).toString(),o=e.getUTCDate().toString()),t[n].zeroPad&&(s.length==1&&(s="0"+s),o.length==1&&(o="0"+o));var u=t[n].format;return u=u.replace("d",o),u=u.replace("m",s),u=u.replace("y",i),u},u=function(e,t,n){var r=t;t<10&&(r="0"+t);if(n){var i=e;return i<10&&(i="0"+e),i+":"+r}var i=e%12;i==0&&(i=12);var s=e<12?"am":"pm";return i+":"+r+s},a=function(e,n){typeof t[n]=="undefined"&&(n="def");var r=e.match(t[n].pattern);if(!r||r.length!=4)return Date("invalid");switch(t[n].order){case"bigEndian":var i=r[3],s=r[2],o=r[1];break;case"littleEndian":var i=r[1],s=r[2],o=r[3];break;case"middleEndian":var i=r[2],s=r[1],o=r[3];break;default:var i=r[1],s=r[2],o=r[3]}return o.length==2&&(o=(new Date).getUTCFullYear().toString().substr(0,2)+o),new Date(s+"/"+i+"/"+o+" GMT")},f=function(e){var t=t=/(\d+)\s*[:\-\.,]\s*(\d+)\s*(am|pm)?/i.exec(e);if(t&&t.length>=3){var n=Number(t[1]),r=Number(t[2]);return n==12&&t[3]&&(n-=12),t[3]&&t[3].toLowerCase()=="pm"&&(n+=12),{hour:n,minute:r}}return null};e.fn.calendricalDate=function(t){return t=t||{},t.padding=t.padding||4,t.monthNames=t.monthNames||"January,February,March,April,May,June,July,August,September,October,November,December",t.dayNames=t.dayNames||"S,M,T,W,T,F,S",t.weekStartDay=t.weekStartDay||0,this.each(function(){var n=e(this),r,i=!1;n.bind("focus",function(){if(r)return;var s=n.position(),u=n.css("padding-left");r=e("<div />").addClass("calendricalDatePopup").mouseenter(function(){i=!0}).mouseleave(function(){i=!1}).mousedown(function(e){e.preventDefault()}).css({position:"absolute",left:s.left,top:s.top+n.height()+t.padding*2}),n.after(r);var f=a(n.val(),t.dateFormat);f.getUTCFullYear()||(f=t.today?t.today:l()),g(r,f.getUTCFullYear(),f.getUTCMonth(),{today:t.today,selected:f,monthNames:t.monthNames,dayNames:t.dayNames,weekStartDay:t.weekStartDay,selectDate:function(e){i=!1,n.val(o(e,t.dateFormat)),r.remove(),r=null;if(t.endDate){var s=a(t.endDate.val(),t.dateFormat);s>=f&&t.endDate.val(o(new Date(e.getTime()+s.getTime()-f.getTime()),t.dateFormat))}}})}).blur(function(){if(i){r&&n.focus();return}if(!r)return;r.remove(),r=null})})},e.fn.calendricalDateRange=function(t){return this.length>=2&&(e(this[0]).calendricalDate(e.extend({endDate:e(this[1])},t)),e(this[1]).calendricalDate(t)),this},e.fn.calendricalDateRangeSingle=function(t){return this.length==1&&e(this).calendricalDate(t),this},e.fn.calendricalTime=function(t){return t=t||{},t.padding=t.padding||4,this.each(function(){var n=e(this),r,i=!1;n.bind("focus click",function(){if(r)return;var s=t.startTime;s&&t.startDate&&t.endDate&&!c(a(t.startDate.val()),a(t.endDate.val()))&&(s=!1);var o=n.position();r=e("<div />").addClass("calendricalTimePopup").mouseenter(function(){i=!0}).mouseleave(function(){i=!1}).mousedown(function(e){e.preventDefault()}).css({position:"absolute",left:o.left,top:o.top+n.height()+t.padding*2}),s&&r.addClass("calendricalEndTimePopup"),n.after(r);var u={selection:n.val(),selectTime:function(e){i=!1,n.val(e),r.remove(),r=null},isoTime:t.isoTime||!1,defaultHour:t.defaultHour!=null?t.defaultHour:8};s&&(u.startTime=f(t.startTime.val())),y(r,u)}).blur(function(){if(i){r&&n.focus();return}if(!r)return;r.remove(),r=null})})},e.fn.calendricalTimeRange=function(t){return this.length>=2&&(e(this[0]).calendricalTime(t),e(this[1]).calendricalTime(e.extend({startTime:e(this[0])},t))),this},e.fn.calendricalDateTimeRange=function(t){return this.length>=4&&(e(this[0]).calendricalDate(e.extend({endDate:e(this[2])},t)),e(this[1]).calendricalTime(t),e(this[2]).calendricalDate(t),e(this[3]).calendricalTime(e.extend({startTime:e(this[1]),startDate:e(this[0]),endDate:e(this[2])},t))),this};var S={allday:"#allday",start_date_input:"#start-date-input",start_time_input:"#start-time-input",start_time:"#start-time",end_date_input:"#end-date-input",end_time_input:"#end-time-input",end_time:"#end-time",twentyfour_hour:!1,date_format:"def",now:new Date},x={init:function(t){function C(){var e=a(s.val(),n.date_format).getTime()/1e3,t=f(l.val());e+=t.hour*3600+t.minute*60;var r=a(h.val(),n.date_format).getTime()/1e3,i=f(p.val());return r+=i.hour*3600+i.minute*60,r-e}function k(){var e=a(s.data("timespan.stored"),n.date_format),t=f(l.data("timespan.stored")),r=e.getTime()/1e3+t.hour*3600+t.minute*60+s.data("time_diff");return r=new Date(r*1e3),h.val(o(r,n.date_format)),p.val(u(r.getUTCHours(),r.getUTCMinutes(),n.twentyfour_hour)),!0}var n=e.extend({},S,t),i=e(n.allday),s=e(n.start_date_input),l=e(n.start_time_input),c=e(n.start_time),h=e(n.end_date_input),p=e(n.end_time_input),d=e(n.end_time),v=e("#ai1ec_instant_event"),m=h.add(p),g=s.add(n.end_date_input),y=l.add(n.end_time_input),x=s.add(n.start_time_input).add(n.end_date_input).add(n.end_time_input);x.bind("focus.timespan",w),v.bind("change.timespan",function(){this.checked?(m.closest("tr").fadeOut(),i.attr("disabled",!0)):(i.removeAttr("disabled"),m.closest("tr").fadeIn())});var T=new Date(n.now.getFullYear(),n.now.getMonth(),n.now.getDate()),N=!1;return i.bind("change.timespan",function(){this.checked?(y.fadeOut(),v.attr("disabled",!0)):(v.removeAttr("disabled"),y.fadeIn()),N||(N=!0,x.calendricalDateTimeRange({today:T,dateFormat:n.date_format,isoTime:n.twentyfour_hour,monthNames:n.month_names,dayNames:n.day_names,weekStartDay:n.week_start_day}))}).get().checked=!1,g.bind("blur.timespan",function(){var t=a(this.value,n.date_format);isNaN(t)?b(e(this)):(e(this).data("timespan.stored",this.value),e(this).val(o(t,n.date_format)))}),y.bind("blur.timespan",function(){var t=f(this.value);t?(e(this).data("timespan.stored",this.value),e(this).val(u(t.hour,t.minute,n.twentyfour_hour))):b(e(this))}),s.add(n.start_time_input).bind("focus.timespan",function(){s.data("time_diff",C())}).bind("blur.timespan",function(){s.data("time_diff")<0&&s.data("time_diff",900);var e=k()}),h.add(n.start_time_input).bind("blur.timespan",function(){if(C()<0){s.data("time_diff",900);var e=k()}}),s.closest("form").bind("submit.timespan",function(){var e=a(s.val(),n.date_format).getTime()/1e3;if(!isNaN(e)){if(!i.get(0).checked){var t=f(l.val());t?e+=t.hour*3600+t.minute*60:e=""}}else e="";e>0&&c.val(r(new Date(e*1e3),!0));var o=a(h.val(),n.date_format).getTime()/1e3;if(!isNaN(o))if(i.get(0).checked)o+=86400;else{var t=f(p.val());t?o+=t.hour*3600+t.minute*60:o=""}else o="";o>0&&d.val(r(new Date(o*1e3),!0))}),c.data("timespan.initial_value",c.val()),d.data("timespan.initial_value",d.val()),i.data("timespan.initial_value",i.get(0).checked),E(s,l,c,h,p,d,i,n.twentyfour_hour,n.date_format,n.now),this},reset:function(t){var n=e.extend({},S,t);return E(e(n.start_date_input),e(n.start_time_input),e(n.start_time),e(n.end_date_input),e(n.end_time_input),e(n.end_time),e(n.allday),n.twentyfour_hour,n.date_format,n.now),this},destroy:function(t){return t=e.extend({},S,t),e.each(t,function(t,n){e(n).unbind(".timespan")}),e(t.start_date_input).closest("form").unbind(".timespan"),this}};return e.timespan=function(t){if(x[t])return x[t].apply(this,Array.prototype.slice.call(arguments,1));if(typeof t=="object"||!t)return x.init.apply(this,arguments);e.error("Method "+t+" does not exist on jQuery.timespan")},{formatDate:o,parseDate:a}}),timely.define("external_libs/bootstrap/button",["jquery_timely"],function(e){var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r)};t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.is("input")?"val":"html",i=n.data();e+="Text",i.resetText||n.data("resetText",n[r]()),n[r](i[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass("ai1ec-"+t).attr(t,t):n.removeClass("ai1ec-"+t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="ai1ec-buttons"]'),t=!0;if(e.length){var n=this.$element.find("input");n.prop("type")==="radio"&&(n.prop("checked")&&this.$element.hasClass("ai1ec-active")?t=!1:e.find(".ai1ec-active").removeClass("ai1ec-active")),t&&n.prop("checked",!this.$element.hasClass("ai1ec-active")).trigger("change")}t&&this.$element.toggleClass("ai1ec-active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("bs.button"),s=typeof n=="object"&&n;i||r.data("bs.button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.bs.button.data-api","[data-toggle^=ai1ec-button]",function(t){var n=e(t.target);n.hasClass("ai1ec-btn")||(n=n.closest(".ai1ec-btn")),n.button("toggle"),t.preventDefault()})}),timely.define("scripts/add_new_event/event_date_time/date_time_event_handlers",["jquery_timely","ai1ec_config","scripts/add_new_event/event_date_time/date_time_utility_functions","external_libs/jquery.calendrical_timespan","libs/utils","external_libs/bootstrap/button"],function(e,t,n,r,i){var s=i.get_ajax_url(),o=function(){var t=e("#ai1ec_end option:selected").val();switch(t){case"0":e("#ai1ec_until_holder, #ai1ec_count_holder").collapse("hide");break;case"1":e("#ai1ec_until_holder").collapse("hide"),e("#ai1ec_count_holder").collapse("show");break;case"2":e("#ai1ec_count_holder").collapse("hide"),e("#ai1ec_until_holder").collapse("show")}},u=function(){e("#publish").trigger("click")},a=function(){var i=e(this),o="",u=e("#ai1ec_repeat_box .ai1ec-tab-pane.ai1ec-active"),a=u.data("freq");switch(a){case"daily":o+="FREQ=DAILY;";var f=e("#ai1ec_daily_count").val();f>1&&(o+="INTERVAL="+f+";");break;case"weekly":o+="FREQ=WEEKLY;";var l=e("#ai1ec_weekly_count").val();l>1&&(o+="INTERVAL="+l+";");var c=e('input[name="ai1ec_weekly_date_select"]:first').val(),h=e('#ai1ec_weekly_date_select > div:first > input[type="hidden"]:first').val();c.length>0&&(o+="WKST="+h+";BYday="+c+";");break;case"monthly":o+="FREQ=MONTHLY;";var p=e("#ai1ec_monthly_count").val(),d=e('input[name="ai1ec_monthly_type"]:checked').val();p>1&&(o+="INTERVAL="+p+";");var v=e('input[name="ai1ec_montly_date_select"]:first').val();if(v.length>0&&d==="bymonthday")o+="BYMONTHDAY="+v+";";else if(d==="byday"){var m=e("#ai1ec_monthly_byday_num").val(),g=e("#ai1ec_monthly_byday_weekday").val();o+="BYday="+m+g+";"}break;case"yearly":o+="FREQ=YEARLY;";var y=e("#ai1ec_yearly_count").val();y>1&&(o+="INTERVAL="+y+";");var b=e('input[name="ai1ec_yearly_date_select"]:first').val();b.length>0&&(o+="BYMONTH="+b+";")}var w=e("#ai1ec_end").val();if(w==="1")o+="COUNT="+e("#ai1ec_count").val()+";";else if(w==="2"){var E=e("#ai1ec_until-date-input").val();E=r.parseDate(E,t.date_format);var S=e("#ai1ec_start-time").val();S=r.parseDate(S,t.date_format),S=new Date(S);var x=E.getUTCDate(),T=E.getUTCMonth()+1,N=S.getUTCHours(),C=S.getUTCMinutes();T=T<10?"0"+T:T,x=x<10?"0"+x:x,N=N<10?"0"+N:N,C=C<10?"0"+C:C,E=E.getUTCFullYear()+""+T+x+"T235959Z",o+="UNTIL="+E+";"}var k={action:"ai1ec_rrule_to_text",rrule:o};i.button("loading").next().addClass("ai1ec-disabled"),e.post(s,k,function(t){t.error?(i.button("reset").next().removeClass("ai1ec-disabled"),"1"===e("#ai1ec_is_box_repeat").val()?n.repeat_form_error("#ai1ec_rrule","#ai1ec_repeat_label",t,i):n.repeat_form_error("#ai1ec_exrule","#ai1ec_exclude_label",t,i)):"1"===e("#ai1ec_is_box_repeat").val()?n.repeat_form_success("#ai1ec_rrule","#ai1ec_repeat_label","#ai1ec_repeat_text > a",o,i,t):n.repeat_form_success("#ai1ec_exrule","#ai1ec_exclude_label","#ai1ec_exclude_text > a",o,i,t)},"json")},f=function(){return e("#ai1ec_is_box_repeat").val()==="1"?n.click_on_modal_cancel("#ai1ec_repeat_text > a","#ai1ec_repeat","#ai1ec_repeat_label"):n.click_on_modal_cancel("#ai1ec_exclude_text > a","#ai1ec_exclude","#ai1ec_exclude_label"),e("#ai1ec_repeat_box").modal("hide"),!1},l=function(){e(this).is("#ai1ec_monthly_type_bymonthday")?(e("#ai1ec_repeat_monthly_byday").collapse("hide"),e("#ai1ec_repeat_monthly_bymonthday").collapse("show")):(e("#ai1ec_repeat_monthly_bymonthday").collapse("hide"),e("#ai1ec_repeat_monthly_byday").collapse("show"))},c=function(){var t=e(this),n=[],r=t.closest(".ai1ec-btn-group-grid"),i;t.toggleClass("ai1ec-active"),e("a",r).each(function(){var t=e(this);t.is(".ai1ec-active")&&(i=t.next().val(),n.push(i))}),r.next().val(n.join())},h=function(){n.click_on_ics_rule_text("#ai1ec_repeat_text > a","#ai1ec_repeat","#ai1ec_repeat_label",{action:"ai1ec_get_repeat_box",repeat:1,post_id:e("#post_ID").val()},n.init_modal_widgets),n.click_on_ics_rule_text("#ai1ec_exclude_text > a","#ai1ec_exclude","#ai1ec_exclude_label",{action:"ai1ec_get_repeat_box",repeat:0,post_id:e("#post_ID").val()},n.init_modal_widgets),n.click_on_checkbox("#ai1ec_repeat","#ai1ec_repeat_text > a","#ai1ec_repeat_label",{action:"ai1ec_get_repeat_box",repeat:1,post_id:e("#post_ID").val()},n.init_modal_widgets),n.click_on_checkbox("#ai1ec_exclude","#ai1ec_exclude_text > a","#ai1ec_exclude_label",{action:"ai1ec_get_repeat_box",repeat:0,post_id:e("#post_ID").val()},n.init_modal_widgets)},p=function(t){return e("#widgetCalendar").toggle(),!1},d=function(){e(".ai1ec-modal-content",this).not(".ai1ec-loading ").remove().end().removeClass("ai1ec-hide")};return{show_end_fields:o,trigger_publish:u,handle_click_on_apply_button:a,handle_click_on_cancel_modal:f,handle_checkbox_monthly_tab_modal:l,execute_pseudo_handlers:h,handle_animation_of_calendar_widget:p,handle_click_on_toggle_buttons:c,handle_modal_hide:d}}),timely.define("scripts/add_new_event/event_cost_helper",["jquery_timely","ai1ec_config"],function(e,t){var n=function(){return e("#ai1ec_is_free").is(":checked")},r=function(){return e("#ai1ec_cost").val()!==""},i=function(r){var i=e(this).parents("table:eq(0)"),s=e("#ai1ec_cost",i),o=t.label_a_buy_tickets_url;n()?(s.attr("value","").addClass("ai1ec-hidden"),o=t.label_a_rsvp_url):s.removeClass("ai1ec-hidden"),e("label[for=ai1ec_ticket_url]",i).text(o)};return{handle_change_is_free:i,check_is_free:n,check_is_price_entered:r}}),timely.define("external_libs/jquery.inputdate",["jquery_timely","external_libs/jquery.calendrical_timespan"],function(e,t){function n(e){e.addClass("error").fadeOut("normal",function(){e.val(e.data("timespan.stored")).removeClass("error").fadeIn("fast")})}function r(){e(this).data("timespan.stored",this.value)}function i(e,n,i,s,o){n.val(n.data("timespan.initial_value"));var u=parseInt(n.val());isNaN(parseInt(u))?u=new Date(o):u=new Date(parseInt(u)*1e3),e.val(t.formatDate(u,s)),e.each(r)}var s={start_date_input:"date-input",start_time:"time",twentyfour_hour:!1,date_format:"def",now:new Date},o={init:function(o){var u=e.extend({},s,o),a=e(u.start_date_input),f=e(u.start_time),l=a,c=a;return c.bind("focus.timespan",r),l.calendricalDate({today:new Date(u.now.getFullYear(),u.now.getMonth(),u.now.getDate()),dateFormat:u.date_format,monthNames:u.month_names,dayNames:u.day_names,weekStartDay:u.week_start_day}),l.bind("blur.timespan",function(){var r=t.parseDate(this.value,u.date_format);isNaN(r)?n(e(this)):(e(this).data("timespan.stored",this.value),e(this).val(t.formatDate(r,u.date_format)))}),a.bind("focus.timespan",function(){var e=t.parseDate(a.val(),u.date_format).getTime()/1e3}).bind("blur.timespan",function(){var e=t.parseDate(a.data("timespan.stored"),u.date_format)}),a.closest("form").bind("submit.timespan",function(){var e=t.parseDate(a.val(),u.date_format).getTime()/1e3;isNaN(e)&&(e=""),f.val(e)}),f.data("timespan.initial_value",f.val()),i(a,f,u.twentyfour_hour,u.date_format,u.now),this},reset:function(t){var n=e.extend({},s,t);return i(e(n.start_date_input),e(n.start_time),n.twentyfour_hour,n.date_format,n.now),this},destroy:function(t){return t=e.extend({},s,t),e.each(t,function(t,n){e(n).unbind(".timespan")}),e(t.start_date_input).closest("form").unbind(".timespan"),this}};e.inputdate=function(t){if(o[t])return o[t].apply(this,Array.prototype.slice.call(arguments,1));if(typeof t=="object"||!t)return o.init.apply(this,arguments);e.error("Method "+t+" does not exist on jQuery.timespan")}}),timely.define("external_libs/jquery.tools",["jquery_timely"],function(e){function i(e,t){var n=Math.pow(10,t);return Math.round(e*n)/n}function s(e,t){var n=parseInt(e.css(t),10);if(n)return n;var r=e[0].currentStyle;return r&&r.width&&parseInt(r.width,10)}function o(e){var t=e.data("events");return t&&t.onSlide}function u(t,n){function x(e,s,o,u){o===undefined?o=s/h*m:u&&(o-=n.min),g&&(o=Math.round(o/g)*g);if(s===undefined||g)s=o*h/m;if(isNaN(o))return r;s=Math.max(0,Math.min(s,h)),o=s/h*m;if(u||!f)o+=n.min;f&&(u?s=h-s:o=n.max-o),o=i(o,y);var a=e.type=="click";if(S&&l!==undefined&&!a){e.type="onSlide",E.trigger(e,[o,s]);if(e.isDefaultPrevented())return r}var c=a?n.speed:0,b=a?function(){e.type="change",E.trigger(e,[o])}:null;return f?(d.animate({top:s},c,b),n.progress&&v.animate({height:h-s+d.height()/2},c)):(d.animate({left:s},c,b),n.progress&&v.animate({width:s+d.width()/2},c)),l=o,p=s,t.val(o),r}function T(){f=n.vertical||s(a,"height")>s(a,"width"),f?(h=s(a,"height")-s(d,"height"),c=a.offset().top+h):(h=s(a,"width")-s(d,"width"),c=a.offset().left)}function N(){T(),r.setValue(n.value!==undefined?n.value:n.min)}var r=this,u=n.css,a=e("<div><div/><a href='#'/></div>").data("rangeinput",r),f,l,c,h,p;t.before(a);var d=a.addClass(u.slider).find("a").addClass(u.handle),v=a.find("div").addClass(u.progress);e.each("min,max,step,value".split(","),function(e,r){var i=t.attr(r);parseFloat(i)&&(n[r]=parseFloat(i,10))});var m=n.max-n.min,g=n.step=="any"?0:n.step,y=n.precision;y===undefined&&(y=g.toString().split("."),y=y.length===2?y[1].length:0);if(t.attr("type")=="range"){var b=t.clone().wrap("<div/>").parent().html(),w=e(b.replace(/type/i,"type=text data-orig-type"));w.val(n.value),t.replaceWith(w),t=w}t.addClass(u.input);var E=e(r).add(t),S=!0;e.extend(r,{getValue:function(){return l},setValue:function(t,n){return T(),x(n||e.Event("api"),undefined,t,!0)},getConf:function(){return n},getProgress:function(){return v},getHandle:function(){return d},getInput:function(){return t},step:function(t,i){i=i||e.Event();var s=n.step=="any"?1:n.step;r.setValue(l+s*(t||1),i)},stepUp:function(e){return r.step(e||1)},stepDown:function(e){return r.step(-e||-1)}}),e.each("onSlide,change".split(","),function(t,i){e.isFunction(n[i])&&e(r).on(i,n[i]),r[i]=function(t){return t&&e(r).on(i,t),r}}),d.drag({drag:!1}).on("dragStart",function(){T(),S=o(e(r))||o(t)}).on("drag",function(e,n,r){if(t.is(":disabled"))return!1;x(e,f?n:r)}).on("dragEnd",function(e){e.isDefaultPrevented()||(e.type="change",E.trigger(e,[l]))}).click(function(e){return e.preventDefault()}),a.click(function(e){if(t.is(":disabled")||e.target==d[0])return e.preventDefault();T();var n=f?d.height()/2:d.width()/2;x(e,f?h-c-n+e.pageY:e.pageX-c-n)}),n.keyboard&&t.keydown(function(n){if(t.attr("readonly"))return;var i=n.keyCode,s=e([75,76,38,33,39]).index(i)!=-1,o=e([74,72,40,34,37]).index(i)!=-1;if((s||o)&&!(n.shiftKey||n.altKey||n.ctrlKey))return s?r.step(i==33?10:1,n):o&&r.step(i==34?-10:-1,n),n.preventDefault()}),t.blur(function(t){var n=e(this).val();n!==l&&r.setValue(n,t)}),e.extend(t[0],{stepUp:r.stepUp,stepDown:r.stepDown}),N(),h||e(window).load(N)}e.tools=e.tools||{version:"1.2.7"};var t;t=e.tools.rangeinput={conf:{min:0,max:100,step:"any",steps:0,value:0,precision:undefined,vertical:0,keyboard:!0,progress:!1,speed:100,css:{input:"range",slider:"slider",progress:"progress",handle:"handle"}}};var n,r;e.fn.drag=function(t){return document.ondragstart=function(){return!1},t=e.extend({x:!0,y:!0,drag:!0},t),n=n||e(document).on("mousedown mouseup",function(i){var s=e(i.target);if(i.type=="mousedown"&&s.data("drag")){var o=s.position(),u=i.pageX-o.left,a=i.pageY-o.top,f=!0;n.on("mousemove.drag",function(e){var n=e.pageX-u,i=e.pageY-a,o={};t.x&&(o.left=n),t.y&&(o.top=i),f&&(s.trigger("dragStart"),f=!1),t.drag&&s.css(o),s.trigger("drag",[i,n]),r=s}),i.preventDefault()}else try{r&&r.trigger("dragEnd")}finally{n.off("mousemove.drag"),r=null}}),this.data("drag",!0)},e.expr[":"].range=function(t){var n=t.getAttribute("type");return n&&n=="range"||!!e(t).filter("input").data("rangeinput")},e.fn.rangeinput=function(n){if(this.data("rangeinput"))return this;n=e.extend(!0,{},t.conf,n);var r;return this.each(function(){var t=new u(e(this),e.extend(!0,{},n)),i=t.getInput().data("rangeinput",t);r=r?r.add(i):i}),r?r:this}}),timely.define("external_libs/ai1ec_datepicker",["jquery_timely"],function(e){var t=function(){var t={},n={years:"datepickerViewYears",moths:"datepickerViewMonths",days:"datepickerViewDays"},i={wrapper:'<div class="datepicker"><div class="datepickerBorderT" /><div class="datepickerBorderB" /><div class="datepickerBorderL" /><div class="datepickerBorderR" /><div class="datepickerBorderTL" /><div class="datepickerBorderTR" /><div class="datepickerBorderBL" /><div class="datepickerBorderBR" /><div class="datepickerContainer"><table cellspacing="0" cellpadding="0"><tbody><tr></tr></tbody></table></div></div>',head:["<td>",'<table cellspacing="0" cellpadding="0">',"<thead>","<tr>",'<th class="datepickerGoPrev"><a href="#"><span><%=prev%></span></a></th>','<th colspan="5" class="datepickerMonth"><a href="#"><span></span></a></th>','<th class="datepickerGoNext"><a href="#"><span><%=next%></span></a></th>',"</tr>",'<tr class="datepickerDoW">','<th class="ai1ec-datepicker-header-week"><span><%=week%></span></th>',"<th><span><%=day1%></span></th>","<th><span><%=day2%></span></th>","<th><span><%=day3%></span></th>","<th><span><%=day4%></span></th>","<th><span><%=day5%></span></th>","<th><span><%=day6%></span></th>","<th><span><%=day7%></span></th>","</tr>","</thead>","</table></td>"],space:'<td class="datepickerSpace"><div></div></td>',days:['<tbody class="datepickerDays">',"<tr>",'<th class="datepickerWeek ai1ec-datepicker-week"><a href="#"><span><%=weeks[0].week%></span></a></th>','<td class="<%=weeks[0].days[0].classname%>"><a href="#"><span><%=weeks[0].days[0].text%></span></a></td>','<td class="<%=weeks[0].days[1].classname%>"><a href="#"><span><%=weeks[0].days[1].text%></span></a></td>','<td class="<%=weeks[0].days[2].classname%>"><a href="#"><span><%=weeks[0].days[2].text%></span></a></td>','<td class="<%=weeks[0].days[3].classname%>"><a href="#"><span><%=weeks[0].days[3].text%></span></a></td>','<td class="<%=weeks[0].days[4].classname%>"><a href="#"><span><%=weeks[0].days[4].text%></span></a></td>','<td class="<%=weeks[0].days[5].classname%>"><a href="#"><span><%=weeks[0].days[5].text%></span></a></td>','<td class="<%=weeks[0].days[6].classname%>"><a href="#"><span><%=weeks[0].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek ai1ec-datepicker-week"><a href="#"><span><%=weeks[1].week%></span></a></th>','<td class="<%=weeks[1].days[0].classname%>"><a href="#"><span><%=weeks[1].days[0].text%></span></a></td>','<td class="<%=weeks[1].days[1].classname%>"><a href="#"><span><%=weeks[1].days[1].text%></span></a></td>','<td class="<%=weeks[1].days[2].classname%>"><a href="#"><span><%=weeks[1].days[2].text%></span></a></td>','<td class="<%=weeks[1].days[3].classname%>"><a href="#"><span><%=weeks[1].days[3].text%></span></a></td>','<td class="<%=weeks[1].days[4].classname%>"><a href="#"><span><%=weeks[1].days[4].text%></span></a></td>','<td class="<%=weeks[1].days[5].classname%>"><a href="#"><span><%=weeks[1].days[5].text%></span></a></td>','<td class="<%=weeks[1].days[6].classname%>"><a href="#"><span><%=weeks[1].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek ai1ec-datepicker-week"><a href="#"><span><%=weeks[2].week%></span></a></th>','<td class="<%=weeks[2].days[0].classname%>"><a href="#"><span><%=weeks[2].days[0].text%></span></a></td>','<td class="<%=weeks[2].days[1].classname%>"><a href="#"><span><%=weeks[2].days[1].text%></span></a></td>','<td class="<%=weeks[2].days[2].classname%>"><a href="#"><span><%=weeks[2].days[2].text%></span></a></td>','<td class="<%=weeks[2].days[3].classname%>"><a href="#"><span><%=weeks[2].days[3].text%></span></a></td>','<td class="<%=weeks[2].days[4].classname%>"><a href="#"><span><%=weeks[2].days[4].text%></span></a></td>','<td class="<%=weeks[2].days[5].classname%>"><a href="#"><span><%=weeks[2].days[5].text%></span></a></td>','<td class="<%=weeks[2].days[6].classname%>"><a href="#"><span><%=weeks[2].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek ai1ec-datepicker-week"><a href="#"><span><%=weeks[3].week%></span></a></th>','<td class="<%=weeks[3].days[0].classname%>"><a href="#"><span><%=weeks[3].days[0].text%></span></a></td>','<td class="<%=weeks[3].days[1].classname%>"><a href="#"><span><%=weeks[3].days[1].text%></span></a></td>','<td class="<%=weeks[3].days[2].classname%>"><a href="#"><span><%=weeks[3].days[2].text%></span></a></td>','<td class="<%=weeks[3].days[3].classname%>"><a href="#"><span><%=weeks[3].days[3].text%></span></a></td>','<td class="<%=weeks[3].days[4].classname%>"><a href="#"><span><%=weeks[3].days[4].text%></span></a></td>','<td class="<%=weeks[3].days[5].classname%>"><a href="#"><span><%=weeks[3].days[5].text%></span></a></td>','<td class="<%=weeks[3].days[6].classname%>"><a href="#"><span><%=weeks[3].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek ai1ec-datepicker-week"><a href="#"><span><%=weeks[4].week%></span></a></th>','<td class="<%=weeks[4].days[0].classname%>"><a href="#"><span><%=weeks[4].days[0].text%></span></a></td>','<td class="<%=weeks[4].days[1].classname%>"><a href="#"><span><%=weeks[4].days[1].text%></span></a></td>','<td class="<%=weeks[4].days[2].classname%>"><a href="#"><span><%=weeks[4].days[2].text%></span></a></td>','<td class="<%=weeks[4].days[3].classname%>"><a href="#"><span><%=weeks[4].days[3].text%></span></a></td>','<td class="<%=weeks[4].days[4].classname%>"><a href="#"><span><%=weeks[4].days[4].text%></span></a></td>','<td class="<%=weeks[4].days[5].classname%>"><a href="#"><span><%=weeks[4].days[5].text%></span></a></td>','<td class="<%=weeks[4].days[6].classname%>"><a href="#"><span><%=weeks[4].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek ai1ec-datepicker-week"><a href="#"><span><%=weeks[5].week%></span></a></th>','<td class="<%=weeks[5].days[0].classname%>"><a href="#"><span><%=weeks[5].days[0].text%></span></a></td>','<td class="<%=weeks[5].days[1].classname%>"><a href="#"><span><%=weeks[5].days[1].text%></span></a></td>','<td class="<%=weeks[5].days[2].classname%>"><a href="#"><span><%=weeks[5].days[2].text%></span></a></td>','<td class="<%=weeks[5].days[3].classname%>"><a href="#"><span><%=weeks[5].days[3].text%></span></a></td>','<td class="<%=weeks[5].days[4].classname%>"><a href="#"><span><%=weeks[5].days[4].text%></span></a></td>','<td class="<%=weeks[5].days[5].classname%>"><a href="#"><span><%=weeks[5].days[5].text%></span></a></td>','<td class="<%=weeks[5].days[6].classname%>"><a href="#"><span><%=weeks[5].days[6].text%></span></a></td>',"</tr>","</tbody>"],months:['<tbody class="<%=className%>">',"<tr>",'<td colspan="2"><a href="#"><span><%=data[0]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[1]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[2]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[3]%></span></a></td>',"</tr>","<tr>",'<td colspan="2"><a href="#"><span><%=data[4]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[5]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[6]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[7]%></span></a></td>',"</tr>","<tr>",'<td colspan="2"><a href="#"><span><%=data[8]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[9]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[10]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[11]%></span></a></td>',"</tr>","</tbody>"]},s={flat:!1,starts:1,prev:"&#9664;",next:"&#9654;",lastSel:!1,mode:"single",view:"days",calendars:1,format:"Y-m-d",position:"bottom",eventName:"click",onRender:function(){return{}},onChange:function(){return!0},onShow:function(){return!0},onBeforeShow:function(){return!0},onHide:function(){return!0},locale:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekMin:"wk"}},o=function(t){var n=e(t).data("datepicker"),s=e(t),o=Math.floor(n.calendars/2),u,f,l,c,h=0,p,d,v,m,g,y;s.find("td>table tbody").remove();for(var b=0;b<n.calendars;b++){u=new Date(n.current),u.addMonths(-o+b),y=s.find("table").eq(b+1);switch(y[0].className){case"datepickerViewDays":l=a(u,"B Y");break;case"datepickerViewMonths":l=u.getFullYear();break;case"datepickerViewYears":l=u.getFullYear()-6+" - "+(u.getFullYear()+5)}y.find("thead tr:first th:eq(1) span").text(l),l=u.getFullYear()-6,f={data:[],className:"datepickerYears"};for(var w=0;w<12;w++)f.data.push(l+w);g=r(i.months.join(""),f),u.setDate(1),f={weeks:[],test:10},c=u.getMonth();var l=(u.getDay()-n.starts)%7;u.addDays(-(l+(l<0?7:0))),p=-1,h=0;while(h<42){v=parseInt(h/7,10),m=h%7,f.weeks[v]||(p=u.getWeekNumber(),f.weeks[v]={week:p,days:[]}),f.weeks[v].days[m]={text:u.getDate(),classname:[]},c!=u.getMonth()&&f.weeks[v].days[m].classname.push("datepickerNotInMonth"),u.getDay()==0&&f.weeks[v].days[m].classname.push("datepickerSunday"),u.getDay()==6&&f.weeks[v].days[m].classname.push("datepickerSaturday");var E=n.onRender(u),S=u.valueOf();(E.selected||n.date==S||e.inArray(S,n.date)>-1||n.mode=="range"&&S>=n.date[0]&&S<=n.date[1])&&f.weeks[v].days[m].classname.push("datepickerSelected"),E.disabled&&f.weeks[v].days[m].classname.push("datepickerDisabled"),E.className&&f.weeks[v].days[m].classname.push(E.className),f.weeks[v].days[m].classname=f.weeks[v].days[m].classname.join(" "),h++,u.addDays(1)}g=r(i.days.join(""),f)+g,f={data:n.locale.monthsShort,className:"datepickerMonths"},g=r(i.months.join(""),f)+g,y.append(g)}},u=function(e,t){if(e.constructor==Date)return new Date(e);var n=e.split(/\W+/),r=t.split(/\W+/),i,s,o,u,a,f=new Date;for(var l=0;l<n.length;l++)switch(r[l]){case"d":case"e":i=parseInt(n[l],10);break;case"m":s=parseInt(n[l],10)-1;break;case"Y":case"y":o=parseInt(n[l],10),o+=o>100?0:o<29?2e3:1900;break;case"H":case"I":case"k":case"l":u=parseInt(n[l],10);break;case"P":case"p":/pm/i.test(n[l])&&u<12?u+=12:/am/i.test(n[l])&&u>=12&&(u-=12);break;case"M":a=parseInt(n[l],10)}return new Date(o===undefined?f.getFullYear():o,s===undefined?f.getMonth():s,i===undefined?f.getDate():i,u===undefined?f.getHours():u,a===undefined?f.getMinutes():a,0)},a=function(e,t){var n=e.getMonth(),r=e.getDate(),i=e.getFullYear(),s=e.getWeekNumber(),o=e.getDay(),u={},a=e.getHours(),f=a>=12,l=f?a-12:a,c=e.getDayOfYear();l==0&&(l=12);var h=e.getMinutes(),p=e.getSeconds(),d=t.split(""),v;for(var m=0;m<d.length;m++){v=d[m];switch(d[m]){case"a":v=e.getDayName();break;case"A":v=e.getDayName(!0);break;case"b":v=e.getMonthName();break;case"B":v=e.getMonthName(!0);break;case"C":v=1+Math.floor(i/100);break;case"d":v=r<10?"0"+r:r;break;case"e":v=r;break;case"H":v=a<10?"0"+a:a;break;case"I":v=l<10?"0"+l:l;break;case"j":v=c<100?c<10?"00"+c:"0"+c:c;break;case"k":v=a;break;case"l":v=l;break;case"m":v=n<9?"0"+(1+n):1+n;break;case"M":v=h<10?"0"+h:h;break;case"p":case"P":v=f?"PM":"AM";break;case"s":v=Math.floor(e.getTime()/1e3);break;case"S":v=p<10?"0"+p:p;break;case"u":v=o+1;break;case"w":v=o;break;case"y":v=(""+i).substr(2,2);break;case"Y":v=i}d[m]=v}return d.join("")},f=function(e){if(Date.prototype.tempDate)return;Date.prototype.tempDate=null,Date.prototype.months=e.months,Date.prototype.monthsShort=e.monthsShort,Date.prototype.days=e.days,Date.prototype.daysShort=e.daysShort,Date.prototype.getMonthName=function(e){return this[e?"months":"monthsShort"][this.getMonth()]},Date.prototype.getDayName=function(e){return this[e?"days":"daysShort"][this.getDay()]},Date.prototype.addDays=function(e){this.setDate(this.getDate()+e),this.tempDate=this.getDate()},Date.prototype.addMonths=function(e){this.tempDate==null&&(this.tempDate=this.getDate()),this.setDate(1),this.setMonth(this.getMonth()+e),this.setDate(Math.min(this.tempDate,this.getMaxDays()))},Date.prototype.addYears=function(e){this.tempDate==null&&(this.tempDate=this.getDate()),this.setDate(1),this.setFullYear(this.getFullYear()+e),this.setDate(Math.min(this.tempDate,this.getMaxDays()))},Date.prototype.getMaxDays=function(){var e=new Date(Date.parse(this)),t=28,n;n=e.getMonth(),t=28;while(e.getMonth()==n)t++,e.setDate(t);return t-1},Date.prototype.getFirstDay=function(){var e=new Date(Date.parse(this));return e.setDate(1),e.getDay()},Date.prototype.getWeekNumber=function(){var e=new Date(this);e.setDate(e.getDate()-(e.getDay()+6)%7+3);var t=e.valueOf();return e.setMonth(0),e.setDate(4),Math.round((t-e.valueOf())/6048e5)+1},Date.prototype.getDayOfYear=function(){var e=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0),t=new Date(this.getFullYear(),0,0,0,0,0),n=e-t;return Math.floor(n/24*60*60*1e3)}},l=function(t){var n=e(t).data("datepicker"),r=e("#"+n.id);if(!n.extraHeight){var i=e(t).find("div");n.extraHeight=i.get(0).offsetHeight+i.get(1).offsetHeight,n.extraWidth=i.get(2).offsetWidth+i.get(3).offsetWidth}var s=r.find("table:first").get(0),o=s.offsetWidth,u=s.offsetHeight;r.css({width:o+n.extraWidth+"px",height:u+n.extraHeight+"px"}).find("div.datepickerContainer").css({width:o+"px",height:u+"px"})},c=function(t){e(t.target).is("span")&&(t.target=t.target.parentNode);var n=e(t.target);if(n.is("a")){t.target.blur();if(n.hasClass("datepickerDisabled"))return!1;var r=e(this).data("datepicker"),i=n.parent(),s=i.parent().parent().parent(),u=e("table",this).index(s.get(0))-1,f=new Date(r.current),l=!1,c=!1;if(i.is("th")){if(i.hasClass("datepickerWeek")&&r.mode=="range"&&!i.next().hasClass("datepickerDisabled")){var p=parseInt(i.next().text(),10);f.addMonths(u-Math.floor(r.calendars/2)),i.next().hasClass("datepickerNotInMonth")&&f.addMonths(p>15?-1:1),f.setDate(p),r.date[0]=f.setHours(0,0,0,0).valueOf(),f.setHours(23,59,59,0),f.addDays(6),r.date[1]=f.valueOf(),c=!0,l=!0,r.lastSel=!1}else if(i.hasClass("datepickerMonth")){if(r.month_link_inactive)return!1;f.addMonths(u-Math.floor(r.calendars/2));switch(s.get(0).className){case"datepickerViewDays":s.get(0).className="datepickerViewMonths",n.find("span").text(f.getFullYear());break;case"datepickerViewMonths":s.get(0).className="datepickerViewYears",n.find("span").text(f.getFullYear()-6+" - "+(f.getFullYear()+5));break;case"datepickerViewYears":s.get(0).className="datepickerViewDays",n.find("span").text(a(f,"B, Y"))}}else if(i.parent().parent().is("thead")){switch(s.get(0).className){case"datepickerViewDays":r.current.addMonths(i.hasClass("datepickerGoPrev")?-1:1);break;case"datepickerViewMonths":r.current.addYears(i.hasClass("datepickerGoPrev")?-1:1);break;case"datepickerViewYears":r.current.addYears(i.hasClass("datepickerGoPrev")?-12:12)}c=!0}}else if(i.is("td")&&!i.hasClass("datepickerDisabled")){switch(s.get(0).className){case"datepickerViewMonths":r.current.setMonth(s.find("tbody.datepickerMonths td").index(i)),r.current.setFullYear(parseInt(s.find("thead th.datepickerMonth span").text(),10)),r.current.addMonths(Math.floor(r.calendars/2)-u),s.get(0).className="datepickerViewDays";break;case"datepickerViewYears":r.current.setFullYear(parseInt(n.text(),10)),s.get(0).className="datepickerViewMonths";break;default:var p=parseInt(n.text(),10);f.addMonths(u-Math.floor(r.calendars/2)),i.hasClass("datepickerNotInMonth")&&f.addMonths(p>15?-1:1),f.setDate(p);switch(r.mode){case"multiple":p=f.setHours(0,0,0,0).valueOf(),e.inArray(p,r.date)>-1?e.each(r.date,function(e,t){if(t==p)return r.date.splice(e,1),!1}):r.date.push(p);break;case"range":r.lastSel||(r.date[0]=f.setHours(0,0,0,0).valueOf()),p=f.setHours(23,59,59,0).valueOf(),p<r.date[0]?(r.date[1]=r.date[0]+86399e3,r.date[0]=p-86399e3):r.date[1]=p,r.lastSel=!r.lastSel;break;default:r.date=f.valueOf()}}c=!0,l=!0}c&&o(this),l&&r.onChange.apply(this,h(r))}return!1},h=function(t){var n;return t.mode=="single"?(n=new Date(t.date),[a(n,t.format),n,t.el]):(n=[[],[],t.el],e.each(t.date,function(e,r){var i=new Date(r);n[0].push(a(i,t.format)),n[1].push(i)}),n)},p=function(){var e=document.compatMode=="CSS1Compat";return{l:window.pageXOffset||(e?document.documentElement.scrollLeft:document.body.scrollLeft),t:window.pageYOffset||(e?document.documentElement.scrollTop:document.body.scrollTop),w:window.innerWidth||(e?document.documentElement.clientWidth:document.body.clientWidth),h:window.innerHeight||(e?document.documentElement.clientHeight:document.body.clientHeight)}},d=function(e,t,n){if(e==t)return!0;if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return!!(e.compareDocumentPosition(t)&16);var r=t.parentNode;while(r&&r!=n){if(r==e)return!0;r=r.parentNode}return!1},v=function(t){var n=e("#"+e(this).data("datepickerId"));if(!n.is(":visible")){var r=n.get(0);o(r);var i=n.data("datepicker");i.onBeforeShow.apply(this,[n.get(0)]);var s=e(this).offset(),u=p(),a=s.top,f=s.left,c=e.curCSS(r,"display");n.css({visibility:"hidden",display:"block"}),l(r);switch(i.position){case"top":a-=r.offsetHeight;break;case"left":f-=r.offsetWidth;break;case"right":f+=this.offsetWidth;break;case"bottom":a+=this.offsetHeight}a+r.offsetHeight>u.t+u.h&&(a=s.top-r.offsetHeight),a<u.t&&(a=s.top+this.offsetHeight+r.offsetHeight),f+r.offsetWidth>u.l+u.w&&(f=s.left-r.offsetWidth),f<u.l&&(f=s.left+this.offsetWidth),n.css({visibility:"visible",display:"block",top:a+"px",left:f+"px"}),i.onShow.apply(this,[n.get(0)])!=0&&n.show(),e(document).bind("mousedown",{cal:n,trigger:this},m)}return!1},m=function(t){t.target!=t.data.trigger&&!d(t.data.cal.get(0),t.target,t.data.cal.get(0))&&(t.data.cal.data("datepicker").onHide.apply(this,[t.data.cal.get(0)])!=0&&t.data.cal.hide(),e(document).unbind("mousedown",m))};return{init:function(t){return t=e.extend(!0,{},s,t||{}),f(t.locale),t.calendars=Math.max(1,parseInt(t.calendars,10)||1),t.mode=/single|multiple|range/.test(t.mode)?t.mode:"single",this.each(function(){if(!e(this).data("datepicker")){t.el=this,t.date.constructor==String&&(t.date=u(t.date,t.format),t.date.setHours(0,0,0,0));if(t.mode!="single")if(t.date.constructor!=Array)t.date=[t.date.valueOf()],t.mode=="range"&&t.date.push((new Date(t.date[0])).setHours(23,59,59,0).valueOf());else{for(var s=0;s<t.date.length;s++)t.date[s]=u(t.date[s],t.format).setHours(0,0,0,0).valueOf();t.mode=="range"&&(t.date[1]=(new Date(t.date[1])).setHours(23,59,59,0).valueOf())}else t.date=t.date.valueOf();t.current?t.current=u(t.current,t.format):t.current=new Date,t.current.setDate(1),t.current.setHours(0,0,0,0);var a="datepicker_"+parseInt(Math.random()*1e3),f;t.id=a,e(this).data("datepickerId",t.id);var h=e(i.wrapper).attr("id",a).bind("click",c).data("datepicker",t);t.className&&h.addClass(t.className);var p="";for(var s=0;s<t.calendars;s++)f=t.starts,s>0&&(p+=i.space),p+=r(i.head.join(""),{week:t.locale.weekMin,prev:t.prev,next:t.next,day1:t.locale.daysMin[f++%7],day2:t.locale.daysMin[f++%7],day3:t.locale.daysMin[f++%7],day4:t.locale.daysMin[f++%7],day5:t.locale.daysMin[f++%7],day6:t.locale.daysMin[f++%7],day7:t.locale.daysMin[f++%7]});h.find("tr:first").append(p).find("table").addClass(n[t.view]),o(h.get(0)),t.flat?(h.appendTo(this).show().css("position","relative"),l(h.get(0))):(h.appendTo(document.body),e(this).bind(t.eventName,v))}})},showPicker:function(){return this.each(function(){e(this).data("datepickerId")&&v.apply(this)})},hidePicker:function(){return this.each(function(){e(this).data("datepickerId")&&e("#"+e(this).data("datepickerId")).hide()})},setDate:function(t,n){return this.each(function(){if(e(this).data("datepickerId")){var r=e("#"+e(this).data("datepickerId")),i=r.data("datepicker");i.date=t,i.date.constructor==String&&(i.date=u(i.date,i.format),i.date.setHours(0,0,0,0));if(i.mode!="single")if(i.date.constructor!=Array)i.date=[i.date.valueOf()],i.mode=="range"&&i.date.push((new Date(i.date[0])).setHours(23,59,59,0).valueOf());else{for(var s=0;s<i.date.length;s++)i.date[s]=u(i.date[s],i.format).setHours(0,0,0,0).valueOf();i.mode=="range"&&(i.date[1]=(new Date(i.date[1])).setHours(23,59,59,0).valueOf())}else i.date=i.date.valueOf();n&&(i.current=new Date(i.mode!="single"?i.date[0]:i.date)),o(r.get(0))}})},getDate:function(t){if(this.size()>0)return h(e("#"+e(this).data("datepickerId")).data("datepicker"))[t?0:1]},clear:function(){return this.each(function(){if(e(this).data("datepickerId")){var t=e("#"+e(this).data("datepickerId")),n=t.data("datepicker");n.mode!="single"&&(n.date=[],o(t.get(0)))}})},fixLayout:function(){return this.each(function(){if(e(this).data("datepickerId")){var t=e("#"+e(this).data("datepickerId")),n=t.data("datepicker");n.flat&&l(t.get(0))}})}}}();e.fn.extend({DatePicker:t.init,DatePickerHide:t.hidePicker,DatePickerShow:t.showPicker,DatePickerSetDate:t.setDate,DatePickerGetDate:t.getDate,DatePickerClear:t.clear,DatePickerLayout:t.fixLayout});var n={},r=function(e,t){var i=/\W/.test(e)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+e.replace(/[\r\t\n]/g," ").split("<%").join(" ").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split(" ").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):n[e]=n[e]||r(document.getElementById(e).innerHTML);return t?i(t):i}}),timely.define("external_libs/bootstrap/transition",["jquery_timely"],function(e){function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(e.style[n]!==undefined)return{end:t[n]}}e.fn.emulateTransitionEnd=function(t){var n=!1,r=this;e(this).one(e.support.transition.end,function(){n=!0});var i=function(){n||e(r).trigger(e.support.transition.end)};return setTimeout(i,t),this},e(function(){e.support.transition=t()})}),timely.define("external_libs/bootstrap/collapse",["jquery_timely"],function(e){var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r),this.transitioning=null,this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.DEFAULTS={toggle:!0},t.prototype.dimension=function(){var e=this.$element.hasClass("ai1ec-width");return e?"width":"height"},t.prototype.show=function(){if(this.transitioning||this.$element.hasClass("ai1ec-in"))return;var t=e.Event("show.bs.collapse");this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.$parent&&this.$parent.find("> .ai1ec-panel > .ai1ec-in");if(n&&n.length){var r=n.data("bs.collapse");if(r&&r.transitioning)return;n.collapse("hide"),r||n.data("bs.collapse",null)}var i=this.dimension();this.$element.removeClass("ai1ec-collapse").addClass("ai1ec-collapsing")[i](0),this.transitioning=1;var s=function(){this.$element.removeClass("ai1ec-collapsing").addClass("ai1ec-in")[i]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return s.call(this);var o=e.camelCase(["scroll",i].join("-"));this.$element.one(e.support.transition.end,e.proxy(s,this)).emulateTransitionEnd(350)[i](this.$element[0][o])},t.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass("ai1ec-in"))return;var t=e.Event("hide.bs.collapse");this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("ai1ec-collapsing").removeClass("ai1ec-collapse").removeClass("ai1ec-in"),this.transitioning=1;var r=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("ai1ec-collapsing").addClass("ai1ec-collapse")};if(!e.support.transition)return r.call(this);this.$element[n](0).one(e.support.transition.end,e.proxy(r,this)).emulateTransitionEnd(350)},t.prototype.toggle=function(){this[this.$element.hasClass("ai1ec-in")?"hide":"show"]()};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("bs.collapse"),s=e.extend({},t.DEFAULTS,r.data(),typeof n=="object"&&n);i||r.data("bs.collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.bs.collapse.data-api","[data-toggle=ai1ec-collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i),o=s.data("bs.collapse"),u=o?"toggle":n.data(),a=n.attr("data-parent"),f=a&&e(a);if(!o||!o.transitioning)f&&f.find('[data-toggle=ai1ec-collapse][data-parent="'+a+'"]').not(n).addClass("ai1ec-collapsed"),n[s.hasClass("ai1ec-in")?"addClass":"removeClass"]("ai1ec-collapsed");s.collapse(u)})}),timely.define("external_libs/bootstrap/modal",["jquery_timely"],function(e){var t=function(t,n){this.options=n,this.$element=e(t),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.load(this.options.remote)};t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},t.prototype.toggle=function(e){return this[this.isShown?"hide":"show"](e)},t.prototype.show=function(t){var n=this,r=e.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(r);if(this.isShown||r.isDefaultPrevented())return;this.isShown=!0,this.escape(),this.$element.on("click.dismiss.modal",'[data-dismiss="ai1ec-modal"]',e.proxy(this.hide,this)),this.backdrop(function(){var r=e.support.transition&&n.$element.hasClass("ai1ec-fade");n.$element.parent().length||n.$element.appendTo(document.body),n.$element.show(),r&&n.$element[0].offsetWidth,n.$element.addClass("ai1ec-in").attr("aria-hidden",!1),n.enforceFocus();var i=e.Event("shown.bs.modal",{relatedTarget:t});r?n.$element.find(".ai1ec-modal-dialog").one(e.support.transition.end,function(){n.$element.focus().trigger(i)}).emulateTransitionEnd(300):n.$element.focus().trigger(i)})},t.prototype.hide=function(t){t&&t.preventDefault(),t=e.Event("hide.bs.modal"),this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return;this.isShown=!1,this.escape(),e(document).off("focusin.bs.modal"),this.$element.removeClass("ai1ec-in").attr("aria-hidden",!0).off("click.dismiss.modal"),e.support.transition&&this.$element.hasClass("ai1ec-fade")?this.$element.one(e.support.transition.end,e.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal()},t.prototype.enforceFocus=function(){e(document).off("focusin.bs.modal").on("focusin.bs.modal",e.proxy(function(e){this.$element[0]!==e.target&&!this.$element.has(e.target).length&&this.$element.focus()},this))},t.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",e.proxy(function(e){e.which==27&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},t.prototype.hideModal=function(){var e=this;this.$element.hide(),this.backdrop(function(){e.removeBackdrop(),e.$element.trigger("hidden.bs.modal")})},t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},t.prototype.backdrop=function(t){var n=this,r=this.$element.hasClass("ai1ec-fade")?"ai1ec-fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&r;this.$backdrop=e('<div class="ai1ec-modal-backdrop '+r+'" />').appendTo(document.body),this.$element.on("click.dismiss.modal",e.proxy(function(e){if(e.target!==e.currentTarget)return;this.options.backdrop=="static"?this.$element[0].focus.call(this.$element[0]):this.hide.call(this)},this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("ai1ec-in");if(!t)return;i?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("ai1ec-in"),e.support.transition&&this.$element.hasClass("ai1ec-fade")?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()):t&&t()};var n=e.fn.modal;e.fn.modal=function(n,r){return this.each(function(){var i=e(this),s=i.data("bs.modal"),o=e.extend({},t.DEFAULTS,i.data(),typeof n=="object"&&n);s||i.data("bs.modal",s=new t(this,o)),typeof n=="string"?s[n](r):o.show&&s.show(r)})},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.bs.modal.data-api",'[data-toggle="ai1ec-modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s,this).one("hide",function(){n.is(":visible")&&n.focus()})}),e(document).on("show.bs.modal",".ai1ec-modal",function(){e(document.body).addClass("ai1ec-modal-open")}).on("hidden.bs.modal",".ai1ec-modal",function(){e(document.body).removeClass("ai1ec-modal-open")})}),timely.define("external_libs/bootstrap/alert",["jquery_timely"],function(e){var t='[data-dismiss="ai1ec-alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed.bs.alert").remove()}var n=e(this),r=n.attr("data-target");r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));var i=e(r);t&&t.preventDefault(),i.length||(i=n.hasClass("ai1ec-alert")?n:n.parent()),i.trigger(t=e.Event("close.bs.alert"));if(t.isDefaultPrevented())return;i.removeClass("ai1ec-in"),e.support.transition&&i.hasClass("ai1ec-fade")?i.one(e.support.transition.end,s).emulateTransitionEnd(150):s()};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("bs.alert");i||r.data("bs.alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.bs.alert.data-api",t,n.prototype.close)}),timely.define("external_libs/select2",["jquery_timely"],function(e){(function(e){typeof e.fn.each2=="undefined"&&e.fn.extend({each2:function(t){var n=e([0]),r=-1,i=this.length;while(++r<i&&(n.context=n[0]=this[r])&&t.call(n[0],r,n)!==!1);return this}})})(e),function(e,t){function l(e,t){var n=0,r=t.length;for(;n<r;n+=1)if(c(e,t[n]))return n;return-1}function c(e,n){return e===n?!0:e===t||n===t?!1:e===null||n===null?!1:e.constructor===String?e===n+"":n.constructor===String?n===e+"":!1}function h(t,n){var r,i,s;if(t===null||t.length<1)return[];r=t.split(n);for(i=0,s=r.length;i<s;i+=1)r[i]=e.trim(r[i]);return r}function p(e){return e.outerWidth(!1)-e.width()}function d(n){var r="keyup-change-value";n.bind("keydown",function(){e.data(n,r)===t&&e.data(n,r,n.val())}),n.bind("keyup",function(){var i=e.data(n,r);i!==t&&n.val()!==i&&(e.removeData(n,r),n.trigger("keyup-change"))})}function v(n){n.bind("mousemove",function(n){var r=a;(r===t||r.x!==n.pageX||r.y!==n.pageY)&&e(n.target).trigger("mousemove-filtered",n)})}function m(e,n,r){r=r||t;var i;return function(){var t=arguments;window.clearTimeout(i),i=window.setTimeout(function(){n.apply(r,t)},e)}}function g(e){var t=!1,n;return function(){return t===!1&&(n=e(),t=!0),n}}function y(e,t){var n=m(e,function(e){t.trigger("scroll-debounced",e)});t.bind("scroll",function(e){l(e.target,t.get())>=0&&n(e)})}function b(e){if(e[0]===document.activeElement)return;window.setTimeout(function(){var t=e[0],n=e.val().length,r;e.focus(),t.setSelectionRange?t.setSelectionRange(n,n):t.createTextRange&&(r=t.createTextRange(),r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",n),r.select())},0)}function w(e){e.preventDefault(),e.stopPropagation()}function E(e){e.preventDefault(),e.stopImmediatePropagation()}function S(t){if(!u){var n=t[0].currentStyle||window.getComputedStyle(t[0],null);u=e(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:n.fontSize,fontFamily:n.fontFamily,fontStyle:n.fontStyle,fontWeight:n.fontWeight,letterSpacing:n.letterSpacing,textTransform:n.textTransform,whiteSpace:"nowrap"}),u.attr("class","select2-sizer"),e("body").append(u)}return u.text(t.val()),u.width()}function x(t,n,r){var i,s=[],o;i=t.attr("class"),typeof i=="string"&&e(i.split(" ")).each2(function(){this.indexOf("select2-")===0&&s.push(this)}),i=n.attr("class"),typeof i=="string"&&e(i.split(" ")).each2(function(){this.indexOf("select2-")!==0&&(o=r(this),typeof o=="string"&&o.length>0&&s.push(this))}),t.attr("class",s.join(" "))}function T(e,t,n,r){var i=e.toUpperCase().indexOf(t.toUpperCase()),s=t.length;if(i<0){n.push(r(e));return}n.push(r(e.substring(0,i))),n.push("<span class='select2-match'>"),n.push(r(e.substring(i,i+s))),n.push("</span>"),n.push(r(e.substring(i+s,e.length)))}function N(t){var n,r=0,i=null,s=t.quietMillis||100,o=t.url,u=this;return function(a){window.clearTimeout(n),n=window.setTimeout(function(){r+=1;var n=r,s=t.data,f=o,l=t.transport||e.ajax,c=t.type||"GET",h={};s=s?s.call(u,a.term,a.page,a.context):null,f=typeof f=="function"?f.call(u,a.term,a.page,a.context):f,null!==i&&i.abort(),t.params&&(e.isFunction(t.params)?e.extend(h,t.params.call(u)):e.extend(h,t.params)),e.extend(h,{url:f,dataType:t.dataType,data:s,type:c,cache:!1,success:function(e){if(n<r)return;var i=t.results(e,a.page);a.callback(i)}}),i=l.call(u,h)},s)}}function C(t){var n=t,r,i,s=function(e){return""+e.text};e.isArray(n)&&(i=n,n={results:i}),e.isFunction(n)===!1&&(i=n,n=function(){return i});var o=n();return o.text&&(s=o.text,e.isFunction(s)||(r=n.text,s=function(e){return e[r]})),function(t){var r=t.term,i={results:[]},o;if(r===""){t.callback(n());return}o=function(n,i){var u,a;n=n[0];if(n.children){u={};for(a in n)n.hasOwnProperty(a)&&(u[a]=n[a]);u.children=[],e(n.children).each2(function(e,t){o(t,u.children)}),(u.children.length||t.matcher(r,s(u),n))&&i.push(u)}else t.matcher(r,s(n),n)&&i.push(n)},e(n().results).each2(function(e,t){o(t,i.results)}),t.callback(i)}}function k(n){var r=e.isFunction(n);return function(i){var s=i.term,o={results:[]};e(r?n():n).each(function(){var e=this.text!==t,n=e?this.text:this;(s===""||i.matcher(s,n))&&o.results.push(e?this:{id:this,text:this})}),i.callback(o)}}function L(t,n){if(e.isFunction(t))return!0;if(!t)return!1;throw new Error("formatterName must be a function or a falsy value")}function A(t){return e.isFunction(t)?t():t}function O(t){var n=0;return e.each(t,function(e,t){t.children?n+=O(t.children):n++}),n}function M(e,n,r,i){var s=e,o=!1,u,a,f,l,h;if(!i.createSearchChoice||!i.tokenSeparators||i.tokenSeparators.length<1)return t;for(;;){a=-1;for(f=0,l=i.tokenSeparators.length;f<l;f++){h=i.tokenSeparators[f],a=e.indexOf(h);if(a>=0)break}if(a<0)break;u=e.substring(0,a),e=e.substring(a+h.length);if(u.length>0){u=i.createSearchChoice(u,n);if(u!==t&&u!==null&&i.id(u)!==t&&i.id(u)!==null){o=!1;for(f=0,l=n.length;f<l;f++)if(c(i.id(u),i.id(n[f]))){o=!0;break}o||r(u)}}}if(s!==e)return e}function _(t,n){var r=function(){};return r.prototype=new t,r.prototype.constructor=r,r.prototype.parent=t.prototype,r.prototype=e.extend(r.prototype,n),r}var n,r,i,s,o,u,a,f;n={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(e){e=e.which?e.which:e;switch(e){case n.LEFT:case n.RIGHT:case n.UP:case n.DOWN:return!0}return!1},isControl:function(e){var t=e.which;switch(t){case n.SHIFT:case n.CTRL:case n.ALT:return!0}return e.metaKey?!0:!1},isFunctionKey:function(e){return e=e.which?e.which:e,e>=112&&e<=123}},f=e(document),o=function(){var e=1;return function(){return e++}}(),f.bind("mousemove",function(e){a={x:e.pageX,y:e.pageY}}),r=_(Object,{bind:function(e){var t=this;return function(){e.apply(t,arguments)}},init:function(n){var r,i,s=".select2-results",u;this.opts=n=this.prepareOpts(n),this.id=n.id,n.element.data("select2")!==t&&n.element.data("select2")!==null&&this.destroy(),this.enabled=!0,this.container=this.createContainer(),this.containerId="s2id_"+(n.element.attr("id")||"autogen"+o()),this.containerSelector="#"+this.containerId.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.body=g(function(){return n.element.closest("body")}),x(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.css(A(n.containerCss)),this.container.addClass(A(n.containerCssClass)),this.elementTabIndex=this.opts.element.attr("tabIndex"),this.opts.element.data("select2",this).addClass("select2-offscreen").bind("focus.select2",function(){e(this).select2("focus")}).attr("tabIndex","-1").before(this.container),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),this.dropdown.addClass(A(n.dropdownCssClass)),this.dropdown.data("select2",this),this.results=r=this.container.find(s),this.search=i=this.container.find("input.select2-input"),i.attr("tabIndex",this.elementTabIndex),this.resultsPage=0,this.context=null,this.initContainer(),v(this.results),this.dropdown.delegate(s,"mousemove-filtered touchstart touchmove touchend",this.bind(this.highlightUnderEvent)),y(80,this.results),this.dropdown.delegate(s,"scroll-debounced",this.bind(this.loadMoreIfNeeded)),e.fn.mousewheel&&r.mousewheel(function(e,t,n,i){var s=r.scrollTop(),o;i>0&&s-i<=0?(r.scrollTop(0),w(e)):i<0&&r.get(0).scrollHeight-r.scrollTop()+i<=r.height()&&(r.scrollTop(r.get(0).scrollHeight-r.height()),w(e))}),d(i),i.bind("keyup-change input paste",this.bind(this.updateResults)),i.bind("focus",function(){i.addClass("select2-focused")}),i.bind("blur",function(){i.removeClass("select2-focused")}),this.dropdown.delegate(s,"mouseup",this.bind(function(t){e(t.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(t),this.selectHighlighted(t))})),this.dropdown.bind("click mouseup mousedown",function(e){e.stopPropagation()}),e.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),(n.element.is(":disabled")||n.element.is("[readonly='readonly']"))&&this.disable()},destroy:function(){var e=this.opts.element.data("select2");this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),e!==t&&(e.container.remove(),e.dropdown.remove(),e.opts.element.removeClass("select2-offscreen").removeData("select2").unbind(".select2").attr({tabIndex:this.elementTabIndex}).show())},prepareOpts:function(n){var r,i,s,o;r=n.element,r.get(0).tagName.toLowerCase()==="select"&&(this.select=i=n.element),i&&e.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in n)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}),n=e.extend({},{populateResults:function(r,i,s){var o,u,a,f,l=this.opts.id,c=this;o=function(r,i,u){var a,f,h,p,d,v,m,g,y,b;r=n.sortResults(r,i,s);for(a=0,f=r.length;a<f;a+=1)h=r[a],d=h.disabled===!0,p=!d&&l(h)!==t,v=h.children&&h.children.length>0,m=e("<li></li>"),m.addClass("select2-results-dept-"+u),m.addClass("select2-result"),m.addClass(p?"select2-result-selectable":"select2-result-unselectable"),d&&m.addClass("select2-disabled"),v&&m.addClass("select2-result-with-children"),m.addClass(c.opts.formatResultCssClass(h)),g=e(document.createElement("div")),g.addClass("select2-result-label"),b=n.formatResult(h,g,s,c.opts.escapeMarkup),b!==t&&g.html(b),m.append(g),v&&(y=e("<ul></ul>"),y.addClass("select2-result-sub"),o(h.children,y,u+1),m.append(y)),m.data("select2-data",h),i.append(m)},o(i,r,0)}},e.fn.select2.defaults,n),typeof n.id!="function"&&(s=n.id,n.id=function(e){return e[s]});if(e.isArray(n.element.data("select2Tags"))){if("tags"in n)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+n.element.attr("id");n.tags=n.element.attr("data-select2-tags")}i?(n.query=this.bind(function(n){var i={results:[],more:!1},s=n.term,o,u,a;a=function(e,t){var r;e.is("option")?n.matcher(s,e.text(),e)&&t.push({id:e.attr("value"),text:e.text(),element:e.get(),css:e.attr("class"),disabled:c(e.attr("disabled"),"disabled")}):e.is("optgroup")&&(r={text:e.attr("label"),children:[],element:e.get(),css:e.attr("class")},e.children().each2(function(e,t){a(t,r.children)}),r.children.length>0&&t.push(r))},o=r.children(),this.getPlaceholder()!==t&&o.length>0&&(u=o[0],e(u).text()===""&&(o=o.not(u))),o.each2(function(e,t){a(t,i.results)}),n.callback(i)}),n.id=function(e){return e.id},n.formatResultCssClass=function(e){return e.css}):"query"in n||("ajax"in n?(o=n.element.data("ajax-url"),o&&o.length>0&&(n.ajax.url=o),n.query=N.call(n.element,n.ajax)):"data"in n?n.query=C(n.data):"tags"in n&&(n.query=k(n.tags),n.createSearchChoice===t&&(n.createSearchChoice=function(e){return{id:e,text:e}}),n.initSelection===t&&(n.initSelection=function(t,r){var i=[];e(h(t.val(),n.separator)).each(function(){var t=this,r=this,s=n.tags;e.isFunction(s)&&(s=s()),e(s).each(function(){if(c(this.id,t))return r=this.text,!1}),i.push({id:t,text:r})}),r(i)})));if(typeof n.query!="function")throw"query function not defined for Select2 "+n.element.attr("id");return n},monitorSource:function(){var e=this.opts.element,t;e.bind("change.select2",this.bind(function(e){this.opts.element.data("select2-change-triggered")!==!0&&this.initSelection()})),t=this.bind(function(){var e,t,n=this;e=this.opts.element.attr("disabled")!=="disabled",t=this.opts.element.attr("readonly")==="readonly",e=e&&!t,this.enabled!==e&&(e?this.enable():this.disable()),x(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(A(this.opts.containerCssClass)),x(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(A(this.opts.dropdownCssClass))}),e.bind("propertychange.select2 DOMAttrModified.select2",t),typeof WebKitMutationObserver!="undefined"&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new WebKitMutationObserver(function(e){e.forEach(t)}),this.propertyObserver.observe(e.get(0),{attributes:!0,subtree:!1}))},triggerChange:function(t){t=t||{},t=e.extend({},t,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(t),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},enable:function(){if(this.enabled)return;this.enabled=!0,this.container.removeClass("select2-container-disabled"),this.opts.element.removeAttr("disabled")},disable:function(){if(!this.enabled)return;this.close(),this.enabled=!1,this.container.addClass("select2-container-disabled"),this.opts.element.attr("disabled","disabled")},opened:function(){return this.container.hasClass("select2-dropdown-open")},positionDropdown:function(){var t=this.container.offset(),n=this.container.outerHeight(!1),r=this.container.outerWidth(!1),i=this.dropdown.outerHeight(!1),s=e(window).scrollLeft()+e(window).width(),o=e(window).scrollTop()+e(window).height(),u=t.top+n,a=t.left,f=u+i<=o,l=t.top-i>=this.body().scrollTop(),c=this.dropdown.outerWidth(!1),h=a+c<=s,p=this.dropdown.hasClass("select2-drop-above"),d,v,m;this.body().css("position")!=="static"&&(d=this.body().offset(),u-=d.top,a-=d.left),p?(v=!0,!l&&f&&(v=!1)):(v=!1,!f&&l&&(v=!0)),h||(a=t.left+r-c),v?(u=t.top-i,this.container.addClass("select2-drop-above"),this.dropdown.addClass("select2-drop-above")):(this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")),m=e.extend({top:u,left:a,width:r},A(this.opts.dropdownCss)),this.dropdown.css(m)},shouldOpen:function(){var t;return this.opened()?!1:(t=e.Event("opening"),this.opts.element.trigger(t),!t.isDefaultPrevented())},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return this.shouldOpen()?(window.setTimeout(this.bind(this.opening),1),!0):!1},opening:function(){var t=this.containerId,n="scroll."+t,r="resize."+t,i="orientationchange."+t,s;this.clearDropdownAlignmentPreference(),this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.dropdown[0]!==this.body().children().last()[0]&&this.dropdown.detach().appendTo(this.body()),this.updateResults(!0),s=e("#select2-drop-mask"),s.length==0&&(s=e(document.createElement("div")),s.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),s.hide(),s.appendTo(this.body()),s.bind("mousedown touchstart",function(t){var n=e("#select2-drop"),r;n.length>0&&(r=n.data("select2"),r.opts.selectOnBlur&&r.selectHighlighted({noFocus:!0}),r.close())})),this.dropdown.prev()[0]!==s[0]&&this.dropdown.before(s),e("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),s.css({width:document.documentElement.scrollWidth,height:document.documentElement.scrollHeight}),s.show(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active"),this.ensureHighlightVisible();var o=this;this.container.parents().add(window).each(function(){e(this).bind(r+" "+n+" "+i,function(t){e("#select2-drop-mask").css({width:document.documentElement.scrollWidth,height:document.documentElement.scrollHeight}),o.positionDropdown()})}),this.focusSearch()},close:function(){if(!this.opened())return;var t=this.containerId,n="scroll."+t,r="resize."+t,i="orientationchange."+t;this.container.parents().add(window).each(function(){e(this).unbind(n).unbind(r).unbind(i)}),this.clearDropdownAlignmentPreference(),e("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open"),this.results.empty(),this.clearSearch(),this.opts.element.trigger(e.Event("close"))},clearSearch:function(){},getMaximumSelectionSize:function(){return A(this.opts.maximumSelectionSize)},ensureHighlightVisible:function(){var t=this.results,n,r,i,s,o,u,a;r=this.highlight();if(r<0)return;if(r==0){t.scrollTop(0);return}n=this.findHighlightableChoices(),i=e(n[r]),s=i.offset().top+i.outerHeight(!0),r===n.length-1&&(a=t.find("li.select2-more-results"),a.length>0&&(s=a.offset().top+a.outerHeight(!0))),o=t.offset().top+t.outerHeight(!0),s>o&&t.scrollTop(t.scrollTop()+(s-o)),u=i.offset().top-t.offset().top,u<0&&i.css("display")!="none"&&t.scrollTop(t.scrollTop()+u)},findHighlightableChoices:function(){var e=this.results.find(".select2-result-selectable:not(.select2-selected):not(.select2-disabled)");return this.results.find(".select2-result-selectable:not(.select2-selected):not(.select2-disabled)")},moveHighlight:function(t){var n=this.findHighlightableChoices(),r=this.highlight();while(r>-1&&r<n.length){r+=t;var i=e(n[r]);if(i.hasClass("select2-result-selectable")&&!i.hasClass("select2-disabled")&&!i.hasClass("select2-selected")){this.highlight(r);break}}},highlight:function(t){var n=this.findHighlightableChoices(),r,i;if(arguments.length===0)return l(n.filter(".select2-highlighted")[0],n.get());t>=n.length&&(t=n.length-1),t<0&&(t=0),this.results.find(".select2-highlighted").removeClass("select2-highlighted"),r=e(n[t]),r.addClass("select2-highlighted"),this.ensureHighlightVisible(),i=r.data("select2-data"),i&&this.opts.element.trigger({type:"highlight",val:this.id(i),choice:i})},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(t){var n=e(t.target).closest(".select2-result-selectable");if(n.length>0&&!n.is(".select2-highlighted")){var r=this.findHighlightableChoices();this.highlight(r.index(n))}else n.length==0&&this.results.find(".select2-highlighted").removeClass("select2-highlighted")},loadMoreIfNeeded:function(){var e=this.results,t=e.find("li.select2-more-results"),n,r=-1,i=this.resultsPage+1,s=this,o=this.search.val(),u=this.context;if(t.length===0)return;n=t.offset().top-e.offset().top-e.height(),n<=this.opts.loadMorePadding&&(t.addClass("select2-active"),this.opts.query({element:this.opts.element,term:o,page:i,context:u,matcher:this.opts.matcher,callback:this.bind(function(n){if(!s.opened())return;s.opts.populateResults.call(this,e,n.results,{term:o,page:i,context:u}),n.more===!0?(t.detach().appendTo(e).text(s.opts.formatLoadMore(i+1)),window.setTimeout(function(){s.loadMoreIfNeeded()},10)):t.remove(),s.positionDropdown(),s.resultsPage=i,s.context=n.context})}))},tokenize:function(){},updateResults:function(n){function f(){i.scrollTop(0),r.removeClass("select2-active"),u.positionDropdown()}function l(e){i.html(e),f()}var r=this.search,i=this.results,s=this.opts,o,u=this,a;if(n!==!0&&(this.showSearchInput===!1||!this.opened()))return;r.addClass("select2-active");var h=this.getMaximumSelectionSize();if(h>=1){o=this.data();if(e.isArray(o)&&o.length>=h&&L(s.formatSelectionTooBig,"formatSelectionTooBig")){l("<li class='select2-selection-limit'>"+s.formatSelectionTooBig(h)+"</li>");return}}if(r.val().length<s.minimumInputLength){L(s.formatInputTooShort,"formatInputTooShort")?l("<li class='select2-no-results'>"+s.formatInputTooShort(r.val(),s.minimumInputLength)+"</li>"):l("");return}s.formatSearching()&&n===!0&&l("<li class='select2-searching'>"+s.formatSearching()+"</li>");if(s.maximumInputLength&&r.val().length>s.maximumInputLength){L(s.formatInputTooLong,"formatInputTooLong")?l("<li class='select2-no-results'>"+s.formatInputTooLong(r.val(),s.maximumInputLength)+"</li>"):l("");return}a=this.tokenize(),a!=t&&a!=null&&r.val(a),this.resultsPage=1,s.query({element:s.element,term:r.val(),page:this.resultsPage,context:null,matcher:s.matcher,callback:this.bind(function(o){var a;if(!this.opened())return;this.context=o.context===t?null:o.context,this.opts.createSearchChoice&&r.val()!==""&&(a=this.opts.createSearchChoice.call(null,r.val(),o.results),a!==t&&a!==null&&u.id(a)!==t&&u.id(a)!==null&&e(o.results).filter(function(){return c(u.id(this),u.id(a))}).length===0&&o.results.unshift(a));if(o.results.length===0&&L(s.formatNoMatches,"formatNoMatches")){l("<li class='select2-no-results'>"+s.formatNoMatches(r.val())+"</li>");return}i.empty(),u.opts.populateResults.call(this,i,o.results,{term:r.val(),page:this.resultsPage,context:null}),o.more===!0&&L(s.formatLoadMore,"formatLoadMore")&&(i.append("<li class='select2-more-results'>"+u.opts.escapeMarkup(s.formatLoadMore(this.resultsPage))+"</li>"),window.setTimeout(function(){u.loadMoreIfNeeded()},10)),this.postprocessResults(o,n),f()})})},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass("select2-container-active"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){b(this.search)},selectHighlighted:function(e){var t=this.highlight(),n=this.results.find(".select2-highlighted"),r=n.closest(".select2-result").data("select2-data");r&&(this.highlight(t),this.onSelect(r,e))},getPlaceholder:function(){return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder},initContainerWidth:function(){function n(){var n,r,i,s,o;if(this.opts.width==="off")return null;if(this.opts.width==="element")return this.opts.element.outerWidth(!1)===0?"auto":this.opts.element.outerWidth(!1)+"px";if(this.opts.width==="copy"||this.opts.width==="resolve"){n=this.opts.element.attr("style");if(n!==t){r=n.split(";");for(s=0,o=r.length;s<o;s+=1){i=r[s].replace(/\s/g,"").match(/width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/);if(i!==null&&i.length>=1)return i[1]}}return this.opts.width==="resolve"?(n=this.opts.element.css("width"),n.indexOf("%")>0?n:this.opts.element.outerWidth(!1)===0?"auto":this.opts.element.outerWidth(!1)+"px"):null}return e.isFunction(this.opts.width)?this.opts.width():this.opts.width}var r=n.call(this);r!==null&&this.container.css("width",r)}}),i=_(r,{createContainer:function(){var t=e(document.createElement("div")).attr({"class":"select2-container"}).html(["<a href='javascript:void(0)' onclick='return false;' class='select2-choice' tabindex='-1'>"," <span></span><abbr class='select2-search-choice-close' style='display:none;'></abbr>"," <div><b></b></div>","</a>","<input class='select2-focusser select2-offscreen' type='text'/>","<div class='select2-drop' style='display:none'>"," <div class='select2-search'>"," <input type='text' autocomplete='off' class='select2-input'/>"," </div>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return t},disable:function(){if(!this.enabled)return;this.parent.disable.apply(this,arguments),this.focusser.attr("disabled","disabled")},enable:function(){if(this.enabled)return;this.parent.enable.apply(this,arguments),this.focusser.removeAttr("disabled")},opening:function(){this.parent.opening.apply(this,arguments),this.focusser.attr("disabled","disabled"),this.opts.element.trigger(e.Event("open"))},close:function(){if(!this.opened())return;this.parent.close.apply(this,arguments),this.focusser.removeAttr("disabled"),b(this.focusser)},focus:function(){this.opened()?this.close():(this.focusser.removeAttr("disabled"),this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.removeAttr("disabled"),this.focusser.focus()},initContainer:function(){var e,t=this.container,r=this.dropdown,i=!1;this.showSearch(this.opts.minimumResultsForSearch>=0),this.selection=e=t.find(".select2-choice"),this.focusser=t.find(".select2-focusser"),this.search.bind("keydown",this.bind(function(e){if(!this.enabled)return;if(e.which===n.PAGE_UP||e.which===n.PAGE_DOWN){w(e);return}switch(e.which){case n.UP:case n.DOWN:this.moveHighlight(e.which===n.UP?-1:1),w(e);return;case n.TAB:case n.ENTER:this.selectHighlighted(),w(e);return;case n.ESC:this.cancel(e),w(e);return}})),this.focusser.bind("keydown",this.bind(function(e){if(!this.enabled)return;if(e.which===n.TAB||n.isControl(e)||n.isFunctionKey(e)||e.which===n.ESC)return;if(this.opts.openOnEnter===!1&&e.which===n.ENTER){w(e);return}if(e.which==n.DOWN||e.which==n.UP||e.which==n.ENTER&&this.opts.openOnEnter){this.open(),w(e);return}if(e.which==n.DELETE||e.which==n.BACKSPACE){this.opts.allowClear&&this.clear(),w(e);return}})),d(this.focusser),this.focusser.bind("keyup-change input",this.bind(function(e){if(this.opened())return;this.open(),this.showSearchInput!==!1&&this.search.val(this.focusser.val()),this.focusser.val(""),w(e)})),e.delegate("abbr","mousedown",this.bind(function(e){if(!this.enabled)return;this.clear(),E(e),this.close(),this.selection.focus()})),e.bind("mousedown",this.bind(function(e){i=!0,this.opened()?this.close():this.enabled&&this.open(),w(e),i=!1})),r.bind("mousedown",this.bind(function(){this.search.focus()})),e.bind("focus",this.bind(function(e){w(e)})),this.focusser.bind("focus",this.bind(function(){this.container.addClass("select2-container-active")})).bind("blur",this.bind(function(){this.opened()||this.container.removeClass("select2-container-active")})),this.search.bind("focus",this.bind(function(){this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.setPlaceholder()},clear:function(){var e=this.selection.data("select2-data");this.opts.element.val(""),this.selection.find("span").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),this.opts.element.trigger({type:"removed",val:this.id(e),choice:e}),this.triggerChange({removed:e})},initSelection:function(){var e;if(this.opts.element.val()===""&&this.opts.element.text()==="")this.close(),this.setPlaceholder();else{var n=this;this.opts.initSelection.call(null,this.opts.element,function(e){e!==t&&e!==null&&(n.updateSelection(e),n.close(),n.setPlaceholder())})}},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments);return t.element.get(0).tagName.toLowerCase()==="select"?t.initSelection=function(t,n){var r=t.find(":selected");e.isFunction(n)&&n({id:r.attr("value"),text:r.text(),element:r})}:"data"in t&&(t.initSelection=t.initSelection||function(n,r){var i=n.val();t.query({matcher:function(e,n,r){return c(i,t.id(r))},callback:e.isFunction(r)?function(e){r(e.results.length?e.results[0]:null)}:e.noop})}),t},getPlaceholder:function(){return this.select&&this.select.find("option").first().text()!==""?t:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var e=this.getPlaceholder();if(this.opts.element.val()===""&&e!==t){if(this.select&&this.select.find("option:first").text()!=="")return;this.selection.find("span").html(this.opts.escapeMarkup(e)),this.selection.addClass("select2-default"),this.selection.find("abbr").hide()}},postprocessResults:function(e,t){var n=0,r=this,i=!0;this.findHighlightableChoices().each2(function(e,t){if(c(r.id(t.data("select2-data")),r.opts.element.val()))return n=e,!1}),this.highlight(n);if(t===!0){var s=this.opts.minimumResultsForSearch;i=s<0?!1:O(e.results)>=s,this.showSearch(i)}},showSearch:function(t){this.showSearchInput=t,this.dropdown.find(".select2-search")[t?"removeClass":"addClass"]("select2-search-hidden"),e(this.dropdown,this.container)[t?"addClass":"removeClass"]("select2-with-searchbox")},onSelect:function(e,t){var n=this.opts.element.val();this.opts.element.val(this.id(e)),this.updateSelection(e),this.opts.element.trigger({type:"selected",val:this.id(e),choice:e}),this.close(),(!t||!t.noFocus)&&this.selection.focus(),c(n,this.id(e))||this.triggerChange()},updateSelection:function(e){var n=this.selection.find("span"),r;this.selection.data("select2-data",e),n.empty(),r=this.opts.formatSelection(e,n),r!==t&&n.append(this.opts.escapeMarkup(r)),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==t&&this.selection.find("abbr").show()},val:function(){var e,n=!1,r=null,i=this;if(arguments.length===0)return this.opts.element.val();e=arguments[0],arguments.length>1&&(n=arguments[1]);if(this.select)this.select.val(e).find(":selected").each2(function(e,t){return r={id:t.attr("value"),text:t.text()},!1}),this.updateSelection(r),this.setPlaceholder(),n&&this.triggerChange();else{if(this.opts.initSelection===t)throw new Error("cannot call val() if initSelection() is not defined");if(!e&&e!==0){this.clear(),n&&this.triggerChange();return}this.opts.element.val(e),this.opts.initSelection(this.opts.element,function(e){i.opts.element.val(e?i.id(e):""),i.updateSelection(e),i.setPlaceholder(),n&&i.triggerChange()})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(e){var n;if(arguments.length===0)return n=this.selection.data("select2-data"),n==t&&(n=null),n;!e||e===""?this.clear():(this.opts.element.val(e?this.id(e):""),this.updateSelection(e))}}),s=_(r,{createContainer:function(){var t=e(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html([" <ul class='select2-choices'>"," <li class='select2-search-field'>"," <input type='text' autocomplete='off' class='select2-input'>"," </li>","</ul>","<div class='select2-drop select2-drop-multi' style='display:none;'>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return t},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments);return t.element.get(0).tagName.toLowerCase()==="select"?t.initSelection=function(e,t){var n=[];e.find(":selected").each2(function(e,t){n.push({id:t.attr("value"),text:t.text(),element:t[0]})}),t(n)}:"data"in t&&(t.initSelection=t.initSelection||function(n,r){var i=h(n.val(),t.separator);t.query({matcher:function(n,r,s){return e.grep(i,function(e){return c(e,t.id(s))}).length},callback:e.isFunction(r)?function(e){r(e.results)}:e.noop})}),t},initContainer:function(){var t=".select2-choices",r;this.searchContainer=this.container.find(".select2-search-field"),this.selection=r=this.container.find(t),this.search.bind("input paste",this.bind(function(){if(!this.enabled)return;this.opened()||this.open()})),this.search.bind("keydown",this.bind(function(e){if(!this.enabled)return;if(e.which===n.BACKSPACE&&this.search.val()===""){this.close();var t,i=r.find(".select2-search-choice-focus");if(i.length>0){this.unselect(i.first()),this.search.width(10),w(e);return}t=r.find(".select2-search-choice:not(.select2-locked)"),t.length>0&&t.last().addClass("select2-search-choice-focus")}else r.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");if(this.opened())switch(e.which){case n.UP:case n.DOWN:this.moveHighlight(e.which===n.UP?-1:1),w(e);return;case n.ENTER:case n.TAB:this.selectHighlighted(),w(e);return;case n.ESC:this.cancel(e),w(e);return}if(e.which===n.TAB||n.isControl(e)||n.isFunctionKey(e)||e.which===n.BACKSPACE||e.which===n.ESC)return;if(e.which===n.ENTER){if(this.opts.openOnEnter===!1)return;if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)return}this.open(),(e.which===n.PAGE_UP||e.which===n.PAGE_DOWN)&&w(e)})),this.search.bind("keyup",this.bind(this.resizeSearch)),this.search.bind("blur",this.bind(function(e){this.container.removeClass("select2-container-active"),this.search.removeClass("select2-focused"),this.opened()||this.clearSearch(),e.stopImmediatePropagation()})),this.container.delegate(t,"mousedown",this.bind(function(t){if(!this.enabled)return;if(e(t.target).closest(".select2-search-choice").length>0)return;this.clearPlaceholder(),this.open(),this.focusSearch(),t.preventDefault()})),this.container.delegate(t,"focus",this.bind(function(){if(!this.enabled)return;this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder()})),this.initContainerWidth(),this.clearSearch()},enable:function(){if(this.enabled)return;this.parent.enable.apply(this,arguments),this.search.removeAttr("disabled")},disable:function(){if(!this.enabled)return;this.parent.disable.apply(this,arguments),this.search.attr("disabled",!0)},initSelection:function(){var e;this.opts.element.val()===""&&this.opts.element.text()===""&&(this.updateSelection([]),this.close(),this.clearSearch());if(this.select||this.opts.element.val()!==""){var n=this;this.opts.initSelection.call(null,this.opts.element,function(e){e!==t&&e!==null&&(n.updateSelection(e),n.close(),n.clearSearch())})}},clearSearch:function(){var e=this.getPlaceholder();e!==t&&this.getVal().length===0&&this.search.hasClass("select2-focused")===!1?(this.search.val(e).addClass("select2-default"),this.resizeSearch()):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.parent.opening.apply(this,arguments),this.clearPlaceholder(),this.resizeSearch(),this.focusSearch(),this.opts.element.trigger(e.Event("open"))},close:function(){if(!this.opened())return;this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus(),this.opts.element.triggerHandler("focus")},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(t){var n=[],r=[],i=this;e(t).each(function(){l(i.id(this),n)<0&&(n.push(i.id(this)),r.push(this))}),t=r,this.selection.find(".select2-search-choice").remove(),e(t).each(function(){i.addSelectedChoice(this)}),i.postprocessResults()},tokenize:function(){var e=this.search.val();e=this.opts.tokenizer(e,this.data(),this.bind(this.onSelect),this.opts),e!=null&&e!=t&&(this.search.val(e),e.length>0&&this.open())},onSelect:function(e,t){this.addSelectedChoice(e),this.opts.element.trigger({type:"selected",val:this.id(e),choice:e}),(this.select||!this.opts.closeOnSelect)&&this.postprocessResults(),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.val().length>=this.getMaximumSelectionSize()&&this.updateResults(!0),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:e}),(!t||!t.noFocus)&&this.focusSearch()},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(n){var r=!n.locked,i=e("<li class='select2-search-choice'> <div></div> <a href='#' onclick='return false;' class='select2-search-choice-close' tabindex='-1'></a></li>"),s=e("<li class='select2-search-choice select2-locked'><div></div></li>"),o=r?i:s,u=this.id(n),a=this.getVal(),f;f=this.opts.formatSelection(n,o.find("div")),f!=t&&o.find("div").replaceWith("<div>"+this.opts.escapeMarkup(f)+"</div>"),r&&o.find(".select2-search-choice-close").bind("mousedown",w).bind("click dblclick",this.bind(function(t){if(!this.enabled)return;e(t.target).closest(".select2-search-choice").fadeOut("fast",this.bind(function(){this.unselect(e(t.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),this.close(),this.focusSearch()})).dequeue(),w(t)})).bind("focus",this.bind(function(){if(!this.enabled)return;this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active")})),o.data("select2-data",n),o.insertBefore(this.searchContainer),a.push(u),this.setVal(a)},unselect:function(e){var t=this.getVal(),n,r;e=e.closest(".select2-search-choice");if(e.length===0)throw"Invalid argument: "+e+". Must be .select2-search-choice";n=e.data("select2-data");if(!n)return;r=l(this.id(n),t),r>=0&&(t.splice(r,1),this.setVal(t),this.select&&this.postprocessResults()),e.remove(),this.opts.element.trigger({type:"removed",val:this.id(n),choice:n}),this.triggerChange({removed:n})},postprocessResults:function(){var e=this.getVal(),t=this.results.find(".select2-result"),n=this.results.find(".select2-result-with-children"),r=this;t.each2(function(t,n){var i=r.id(n.data("select2-data"));l(i,e)>=0&&(n.addClass("select2-selected"),n.find(".select2-result-selectable").addClass("select2-selected"))}),n.each2(function(e,t){!t.is(".select2-result-selectable")&&t.find(".select2-result-selectable:not(.select2-selected)").length===0&&t.addClass("select2-selected")}),this.highlight()==-1&&r.highlight(0)},resizeSearch:function(){var e,t,n,r,i,s=p(this.search);e=S(this.search)+10,t=this.search.offset().left,n=this.selection.width(),r=this.selection.offset().left,i=n-(t-r)-s,i<e&&(i=n-s),i<40&&(i=n-s),i<=0&&(i=e),this.search.width(i)},getVal:function(){var e;return this.select?(e=this.select.val(),e===null?[]:e):(e=this.opts.element.val(),h(e,this.opts.separator))},setVal:function(t){var n;this.select?this.select.val(t):(n=[],e(t).each(function(){l(this,n)<0&&n.push(this)}),this.opts.element.val(n.length===0?"":n.join(this.opts.separator)))},val:function(){var n,r=!1,i=[],s=this;if(arguments.length===0)return this.getVal();n=arguments[0],arguments.length>1&&(r=arguments[1]);if(!n&&n!==0){this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),r&&this.triggerChange();return}this.setVal(n);if(this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),r&&this.triggerChange();else{if(this.opts.initSelection===t)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(t){var n=e(t).map(s.id);s.setVal(n),s.updateSelection(t),s.clearSearch(),r&&s.triggerChange()})}this.clearSearch()},onSortStart:function(){if(this.select)throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var t=[],n=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){t.push(n.opts.id(e(this).data("select2-data")))}),this.setVal(t),this.triggerChange()},data:function(t){var n=this,r;if(arguments.length===0)return this.selection.find(".select2-search-choice").map(function(){return e(this).data("select2-data")}).get();t||(t=[]),r=e.map(t,function(e){return n.opts.id(e)}),this.setVal(r),this.updateSelection(t),this.clearSearch()}}),e.fn.select2=function(){var n=Array.prototype.slice.call(arguments,0),r,o,u,a,f=["val","destroy","opened","open","close","focus","isFocused","container","onSortStart","onSortEnd","enable","disable","positionDropdown","data"];return this.each(function(){if(n.length===0||typeof n[0]=="object")r=n.length===0?{}:e.extend({},n[0]),r.element=e(this),r.element.get(0).tagName.toLowerCase()==="select"?a=r.element.attr("multiple"):(a=r.multiple||!1,"tags"in r&&(r.multiple=a=!0)),o=a?new s:new i,o.init(r);else{if(typeof n[0]!="string")throw"Invalid arguments to select2 plugin: "+n;if(l(n[0],f)<0)throw"Unknown method: "+n[0];u=t,o=e(this).data("select2");if(o===t)return;n[0]==="container"?u=o.container:u=o[n[0]].apply(o,n.slice(1));if(u!==t)return!1}}),u===t?this:u},e.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(e,t,n,r){var i=[];return T(e.text,n.term,i,r),i.join("")},formatSelection:function(e,n){return e?e.text:t},sortResults:function(e,t,n){return e},formatResultCssClass:function(e){return t},formatNoMatches:function(){return"No matches found"},formatInputTooShort:function(e,t){var n=t-e.length;return"Please enter "+n+" more character"+(n==1?"":"s")},formatInputTooLong:function(e,t){var n=e.length-t;return"Please enter "+n+" less character"+(n==1?"":"s")},formatSelectionTooBig:function(e){return"You can only select "+e+" item"+(e==1?"":"s")},formatLoadMore:function(e){return"Loading more results..."},formatSearching:function(){return"Searching..."},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(e){return e.id},matcher:function(e,t){return t.toUpperCase().indexOf(e.toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:M,escapeMarkup:function(e){var t={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;","/":"&#47;"};return String(e).replace(/[&<>"'/\\]/g,function(e){return t[e[0]]})},blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(e){return e},adaptDropdownCssClass:function(e){return null}}}(e)}),timely.define("scripts/add_new_event",["jquery_timely","domReady","ai1ec_config","scripts/add_new_event/event_location/gmaps_helper","scripts/add_new_event/event_location/input_coordinates_event_handlers","scripts/add_new_event/event_location/input_coordinates_utility_functions","scripts/add_new_event/event_date_time/date_time_event_handlers","scripts/add_new_event/event_cost_helper","external_libs/jquery.calendrical_timespan","external_libs/jquery.inputdate","external_libs/jquery.tools","external_libs/ai1ec_datepicker","external_libs/bootstrap/transition","external_libs/bootstrap/collapse","external_libs/bootstrap/modal","external_libs/bootstrap/alert","external_libs/bootstrap/tab","external_libs/select2"],function(e,t,n,r,i,s,o,u,a){var f=function(){var t=new Date(n.now*1e3),r={allday:"#ai1ec_all_day_event",start_date_input:"#ai1ec_start-date-input",start_time_input:"#ai1ec_start-time-input",start_time:"#ai1ec_start-time",end_date_input:"#ai1ec_end-date-input",end_time_input:"#ai1ec_end-time-input",end_time:"#ai1ec_end-time",date_format:n.date_format,month_names:n.month_names,day_names:n.day_names,week_start_day:n.week_start_day,twentyfour_hour:n.twentyfour_hour,now:t};e.timespan(r);var i=e("#ai1ec_exdate").val(),s=null,o=!1,u;if(i.length>=8){s=[];var f=[];e.each(i.split(","),function(e,t){var r=t.slice(0,8),i=r.substr(0,4),o=r.substr(4,2);u=r.substr(6,2),o=o.charAt(0)==="0"?"0"+(parseInt(o.charAt(1),10)-1):parseInt(o,10)-1,s.push(new Date(i,o,u)),f.push(a.formatDate(new Date(i,o,u),n.date_format,!0))}),e("#ai1ec_exclude-dates-input").text(f.join(", "))}else s=new Date(n.now*1e3),o=!0,e("#ai1ec_exclude-dates-input").text(e("#ai1ec_exclude-dates-input").data("placeholder"));e("#widgetCalendar").DatePicker({flat:!0,calendars:3,mode:"multiple",starts:n.week_start_day,date:s,onChange:function(t){t=t.toString();if(t.length>=8){var r="",i=[];e.each(t.split(","),function(e,t){i.push(a.formatDate(new Date(t),n.date_format)),r+=t.replace(/-/g,"")+"T000000Z,"}),e("#ai1ec_exclude-dates-input").text(i.join(", ")),r=r.slice(0,r.length-1),e("#ai1ec_exdate").val(r)}else e("#ai1ec_exdate").val(""),e("#ai1ec_exclude-dates-input").text(e("#ai1ec_exclude-dates-input").data("placeholder"))},prev:"«",next:"»",month_link_inactive:!0,locale:{daysMin:n.day_names.split(","),months:n.month_names.split(",")}}),o&&e("#widgetCalendar").DatePickerClear(),e(document).on("mousedown.exclude",function(t){var n=e("#widgetCalendar"),r=e("#ai1ec_exclude-dates-input");!n.is(t.target)&&!r.is(t.target)&&0===n.has(t.target).length&&e("#widgetCalendar").hide()})},l=function(){e(".ai1ec-panel-collapse").on("hide",function(){e(this).parent().removeClass("ai1ec-overflow-visible")}),e(".ai1ec-panel-collapse").on("shown",function(){var t=e(this);window.setTimeout(function(){t.parent().addClass("ai1ec-overflow-visible")},350)})},c=function(){f(),timely.require(["libs/gmaps"],function(e){e(r.init_gmaps)})},h=function(t,n){var r=null;"[object Array]"===Object.prototype.toString.call(n)?r=n.join("<br>"):r=n,e("#ai1ec_event_inline_alert").html(r),e("#ai1ec_event_inline_alert").removeClass("ai1ec-hidden"),t.preventDefault(),e("#publish, #ai1ec_bottom_publish").removeClass("button-primary-disabled"),e("#publish, #ai1ec_bottom_publish").removeClass("disabled"),e("#publish, #ai1ec_bottom_publish").siblings("#ajax-loading, .spinner").css("visibility","hidden")},p=function(t){s.ai1ec_check_lat_long_fields_filled_when_publishing_event(t)===!0&&(s.ai1ec_convert_commas_to_dots_for_coordinates(),s.ai1ec_check_lat_long_ok_for_search(t));var r=!1,i=[];e("#ai1ec_ticket_url, #ai1ec_contact_url").each(function(){var t=this.value;e(this).removeClass("ai1ec-input-warn"),e(this).closest(".ai1ec-panel-collapse").parent().find(".ai1ec-panel-heading .ai1ec-fa-warning").addClass("ai1ec-hidden").parent().css("color","");if(""!==t){var s=/(http|https):\/\//;if(!s.test(t)){e(this).closest(".ai1ec-panel-collapse").parent().find(".ai1ec-panel-heading .ai1ec-fa-warning").removeClass("ai1ec-hidden").parent().css("color","rgb(255, 79, 79)"),r||e(this).closest(".ai1ec-panel-collapse").collapse("show"),r=!0;var o=e(this).attr("id")+"_not_valid";i.push(n[o]),e(this).addClass("ai1ec-input-warn")}}}),r&&(i.push(n.general_url_not_valid),h(t,i))},d=function(){e("#ai1ec_google_map").click(i.toggle_visibility_of_google_map_on_click),e("#ai1ec_input_coordinates").change(i.toggle_visibility_of_coordinate_fields_on_click),e("#post").submit(p),e("input.coordinates").blur(i.update_map_from_coordinates_on_blur),e("#ai1ec_bottom_publish").on("click",o.trigger_publish),e(document).on("change","#ai1ec_end",o.show_end_fields).on("click","#ai1ec_repeat_apply",o.handle_click_on_apply_button).on("click","#ai1ec_repeat_cancel",o.handle_click_on_cancel_modal).on("click","#ai1ec_monthly_type_bymonthday, #ai1ec_monthly_type_byday",o.handle_checkbox_monthly_tab_modal).on("click",".ai1ec-btn-group-grid a",o.handle_click_on_toggle_buttons),e("#ai1ec_repeat_box").on("hidden.bs.modal",o.handle_modal_hide),o.execute_pseudo_handlers(),e("#widgetField > a").on("click",o.handle_animation_of_calendar_widget),e("#ai1ec_is_free").on("change",u.handle_change_is_free),e(document).on("click",".ai1ec-set-banner-image",v),e(document).on("click",".ai1ec-remove-banner",m)},v=function(){var t={};return t._frame=wp.media({state:"featured-image",states:[new wp.media.controller.FeaturedImage,new wp.media.controller.EditImage]}),t._frame.open(),e(".media-frame:last ").addClass("ai1ec-banner-image-frame"),e(".media-frame-title:last h1").text(e(".ai1ec-set-banner-block .ai1ec-set-banner-image").text()),e(".media-frame-toolbar:last").append(e(".ai1ec-media-toolbar").clone().removeClass("ai1ec-media-toolbar ai1ec-hidden")),e(".ai1ec-save-banner-image").off().on("click",function(){var n=e(".attachments:visible li.selected img").attr("src"),r=e(".attachment-details:visible input[type=text]").val();return n&&r&&e("#ai1ec_event_banner .inside").find(".ai1ec-banner-image-block").removeClass("ai1ec-hidden").find("img").attr("src",n).end().find("input").val(r).end().end().find(".ai1ec-set-banner-block").addClass("ai1ec-hidden").end().find(".ai1ec-remove-banner-block").removeClass("ai1ec-hidden"),t._frame.close(),!1}),!1},m=function(){return e("#ai1ec_event_banner .inside").find(".ai1ec-remove-banner-block").addClass("ai1ec-hidden").end().find(".ai1ec-banner-image-block").addClass("ai1ec-hidden").find("input").val("").end().find("img").attr("src","").end().end().find(".ai1ec-set-banner-block").removeClass("ai1ec-hidden"),!1},g=function(){e("#ai1ec_event").insertAfter("#ai1ec_event_inline_alert"),e("#post").addClass("ai1ec-visible")},y=function(){e("#timezone-select").select2()},b=function(){c(),t(function(){l(),g(),d(),y()})};return{start:b}}),timely.require(["scripts/add_new_event"],function(e){e.start()}),timely.define("pages/add_new_event",function(){});
42
  * limitations under the License.
43
  * ======================================================================== */
44
 
45
+ /* =========================================================
46
+ * bootstrap-datepicker.js
47
+ * Repo: https://github.com/eternicode/bootstrap-datepicker/
48
+ * Demo: http://eternicode.github.io/bootstrap-datepicker/
49
+ * Docs: http://bootstrap-datepicker.readthedocs.org/
50
+ * Forked from http://www.eyecon.ro/bootstrap-datepicker
51
+ * =========================================================
52
+ * Started by Stefan Petre; improvements by Andrew Rowls + contributors
53
+ *
54
+ * Licensed under the Apache License, Version 2.0 (the "License");
55
+ * you may not use this file except in compliance with the License.
56
+ * You may obtain a copy of the License at
57
+ *
58
+ * http://www.apache.org/licenses/LICENSE-2.0
59
+ *
60
+ * Unless required by applicable law or agreed to in writing, software
61
+ * distributed under the License is distributed on an "AS IS" BASIS,
62
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
63
+ * See the License for the specific language governing permissions and
64
+ * limitations under the License.
65
+ * ========================================================= */
66
+
67
  /* ========================================================================
68
  * Bootstrap: transition.js v3.0.3
69
  * http://getbootstrap.com/javascript/#transitions
161
  the specific language governing permissions and limitations under the Apache License and the GPL License.
162
  */
163
 
164
+ timely.define("domReady",[],function(){function u(e){var t;for(t=0;t<e.length;t++)e[t](n)}function a(){var e=r;t&&e.length&&(r=[],u(e))}function f(){t||(t=!0,o&&clearInterval(o),a())}function c(e){return t?e(n):r.push(e),c}var e=typeof window!="undefined"&&window.document,t=!e,n=e?document:null,r=[],i,s,o;if(e){if(document.addEventListener)document.addEventListener("DOMContentLoaded",f,!1),window.addEventListener("load",f,!1);else if(window.attachEvent){window.attachEvent("onload",f),s=document.createElement("div");try{i=window.frameElement===null}catch(l){}s.doScroll&&i&&window.external&&(o=setInterval(function(){try{s.doScroll(),f()}catch(e){}},30))}(document.readyState==="complete"||document.readyState==="interactive")&&f()}return c.version="2.0.0",c.load=function(e,t,n,r){r.isBuild?n(null):c(n)},c}),timely.define("external_libs/bootstrap/tab",["jquery_timely"],function(e){var t=function(t){this.element=e(t)};t.prototype.show=function(){var t=this.element,n=t.closest("ul:not(.ai1ec-dropdown-menu)"),r=t.data("target");r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("ai1ec-active"))return;var i=n.find(".ai1ec-active:last a")[0],s=e.Event("show.bs.tab",{relatedTarget:i});t.trigger(s);if(s.isDefaultPrevented())return;var o=e(r);this.activate(t.parent("li"),n),this.activate(o,o.parent(),function(){t.trigger({type:"shown.bs.tab",relatedTarget:i})})},t.prototype.activate=function(t,n,r){function o(){i.removeClass("ai1ec-active").find("> .ai1ec-dropdown-menu > .ai1ec-active").removeClass("ai1ec-active"),t.addClass("ai1ec-active"),s?(t[0].offsetWidth,t.addClass("ai1ec-in")):t.removeClass("ai1ec-fade"),t.parent(".ai1ec-dropdown-menu")&&t.closest("li.ai1ec-dropdown").addClass("ai1ec-active"),r&&r()}var i=n.find("> .ai1ec-active"),s=r&&e.support.transition&&i.hasClass("ai1ec-fade");s?i.one(e.support.transition.end,o).emulateTransitionEnd(150):o(),i.removeClass("ai1ec-in")};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("bs.tab");i||r.data("bs.tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.bs.tab.data-api",'[data-toggle="ai1ec-tab"], [data-toggle="ai1ec-pill"]',function(t){t.preventDefault(),e(this).tab("show")})}),timely.define("libs/utils",["jquery_timely","external_libs/bootstrap/tab"],function(e){var t=function(){return{is_float:function(e){return!isNaN(parseFloat(e))},is_valid_coordinate:function(e,t){var n=t?90:180;return this.is_float(e)&&Math.abs(e)<n},convert_comma_to_dot:function(e){return e.replace(",",".")},field_has_value:function(t){var n="#"+t,r=e(n),i=!1;return r.length===1&&(i=e.trim(r.val())!==""),i},make_alert:function(t,n,r){var i="";switch(n){case"error":i="ai1ec-alert ai1ec-alert-danger";break;case"success":i="ai1ec-alert ai1ec-alert-success";break;default:i="ai1ec-alert ai1ec-alert-info"}var s=e("<div />",{"class":i,html:t});if(!r){var o=e("<button>",{type:"button","class":"ai1ec-close","data-dismiss":"ai1ec-alert",text:"×"});s.prepend(o)}return s},get_ajax_url:function(){return typeof window.ajaxurl=="undefined"?"http://localhost/wordpress/wp-admin/admin-ajax.php":window.ajaxurl},isUrl:function(e){var t=/(http|https|webcal):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return t.test(e)},isValidEmail:function(e){var t=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return t.test(e)},activate_saved_tab_on_page_load:function(t){null===t||undefined===t?e("ul.ai1ec-nav a:first").tab("show"):e("ul.ai1ec-nav a[href="+t+"]").tab("show")},add_query_arg:function(e,t){if("string"!=typeof e)return!1;var n=e.indexOf("?")===-1?"?":"&";return-1!==e.indexOf(n+t[0]+"=")?e:e+n+t[0]+"="+t[1]},create_ai1ec_to_send:function(t){var n=e(t),r=[],i=["action","cat_ids","auth_ids","tag_ids","exact_date","display_filters","no_navigation","events_limit"],s=function(e){return e.replace(/\W+(.)/g,function(e,t){return t.toUpperCase()})};return e(i).each(function(e,t){var i=n.data(s(t));i&&r.push(t+"~"+i)}),r.join("|")},init_autoselect:function(){e(document).on("click",".ai1ec-autoselect",function(t){if(e(this).data("clicked")&&t.originalEvent.detail<2)return;e(this).data("clicked",!0);var n;document.body.createTextRange?(n=document.body.createTextRange(),n.moveToElementText(this),n.select()):window.getSelection&&(selection=window.getSelection(),n=document.createRange(),n.selectNodeContents(this),selection.removeAllRanges(),selection.addRange(n))})}}}();return t}),timely.define("scripts/add_new_event/event_location/input_coordinates_utility_functions",["jquery_timely","ai1ec_config","libs/utils"],function(e,t,n){var r=function(){e("#ai1ec_input_coordinates:checked").length>0&&e("#ai1ec_table_coordinates input.ai1ec-coordinates").each(function(){this.value=n.convert_comma_to_dot(this.value)})},i=function(t,n){var r=e("<div />",{text:n,"class":"ai1ec-error"});e(t).after(r)},s=function(t,n){t.target.id==="post"&&(t.stopImmediatePropagation(),t.preventDefault(),e("#publish").removeClass("button-primary-disabled"),e("#publish").siblings(".spinner").css("visibility","hidden")),e(n).focus()},o=function(){var t=n.field_has_value("ai1ec_address"),r=!0;return e("input.ai1ec-coordinates").each(function(){var e=n.field_has_value(this.id);e||(r=!1)}),t||r},u=function(n){var r=!0,o=!1;return e("#ai1ec_input_coordinates:checked").length>0&&(e("div.ai1ec-error").remove(),e("#ai1ec_table_coordinates input.ai1ec-coordinates").each(function(){var n=e(this).hasClass("latitude"),s=n?t.error_message_not_entered_lat:t.error_message_not_entered_long;this.value===""&&(r=!1,o===!1&&(o=this),i(this,s))})),r===!1&&s(n,o),r},a=function(r){if(e("#ai1ec_input_coordinates:checked").length===1){e("div.ai1ec-error").remove();var o=!0,u=!1,a=!1;return e("#ai1ec_table_coordinates input.ai1ec-coordinates").each(function(){if(this.value===""){a=!0;return}var r=e(this).hasClass("latitude"),s=r?t.error_message_not_valid_lat:t.error_message_not_valid_long;n.is_valid_coordinate(this.value,r)||(o=!1,u===!1&&(u=this),i(this,s))}),o===!1&&s(r,u),a===!0&&(o=!1),o}};return{ai1ec_convert_commas_to_dots_for_coordinates:r,ai1ec_show_error_message_after_element:i,check_if_address_or_coordinates_are_set:o,ai1ec_check_lat_long_fields_filled_when_publishing_event:u,ai1ec_check_lat_long_ok_for_search:a}}),timely.define("external_libs/jquery.autocomplete_geomod",["jquery_timely"],function(e){e.fn.extend({autocomplete:function(t,n){var r=typeof t=="string";return n=e.extend({},e.Autocompleter.defaults,{url:r?t:null,data:r?null:t,delay:r?e.Autocompleter.defaults.delay:10,max:n&&!n.scroll?10:150},n),n.highlight=n.highlight||function(e){return e},n.formatMatch=n.formatMatch||n.formatItem,this.each(function(){new e.Autocompleter(this,n)})},result:function(e){return this.bind("result",e)},search:function(e){return this.trigger("search",[e])},flushCache:function(){return this.trigger("flushCache")},setOptions:function(e){return this.trigger("setOptions",[e])},unautocomplete:function(){return this.trigger("unautocomplete")}}),e.Autocompleter=function(t,n){function d(){var r=h.selected();if(!r)return!1;var s=r.result;o=s;if(n.multiple){var u=m(i.val());if(u.length>1){var a=n.multipleSeparator.length,f=e(t).selection().start,l,c=0;e.each(u,function(e,t){c+=t.length;if(f<=c)return l=e,!1;c+=a}),u[l]=s,s=u.join(n.multipleSeparator)}s+=n.multipleSeparator}return i.val(s),w(),i.trigger("result",[r.data,r.value]),!0}function v(e,t){if(f==r.DEL){h.hide();return}var s=i.val();if(!t&&s==o)return;o=s,s=g(s),s.length>=n.minChars?(i.addClass(n.loadingClass),n.matchCase||(s=s.toLowerCase()),S(s,E,w)):(T(),h.hide())}function m(t){return t?n.multiple?e.map(t.split(n.multipleSeparator),function(n){return e.trim(t).length?e.trim(n):null}):[e.trim(t)]:[""]}function g(r){if(!n.multiple)return r;var i=m(r);if(i.length==1)return i[0];var s=e(t).selection().start;return s==r.length?i=m(r):i=m(r.replace(r.substring(s),"")),i[i.length-1]}function y(s,u){n.autoFill&&g(i.val()).toLowerCase()==s.toLowerCase()&&f!=r.BACKSPACE&&(i.val(i.val()+u.substring(g(o).length)),e(t).selection(o.length,o.length+u.length))}function b(){clearTimeout(s),s=setTimeout(w,200)}function w(){var e=h.visible();h.hide(),clearTimeout(s),T(),n.mustMatch&&i.search(function(e){if(!e)if(n.multiple){var t=m(i.val()).slice(0,-1);i.val(t.join(n.multipleSeparator)+(t.length?n.multipleSeparator:""))}else i.val(""),i.trigger("result",null)})}function E(e,t){t&&t.length&&a?(T(),h.display(t,e),y(e,t[0].value),h.show()):w()}function S(r,i,s){n.matchCase||(r=r.toLowerCase());var o=u.load(r);if(o&&o.length)i(r,o);else if(n.geocoder){var a=g(r),f={address:a};n.region&&(f.region=n.region),n.geocoder.geocode(f,function(e,t){var s=n.parse(e,t,a);u.add(r,s),i(r,s)})}else if(typeof n.url=="string"&&n.url.length>0){var l={timestamp:+(new Date)};e.each(n.extraParams,function(e,t){l[e]=typeof t=="function"?t():t}),e.ajax({mode:"abort",port:"autocomplete"+t.name,dataType:n.dataType,url:n.url,data:e.extend({q:g(r),limit:n.max},l),success:function(e){var t=n.parse&&n.parse(e)||x(e);u.add(r,t),i(r,t)}})}else h.emptyList(),s(r)}function x(t){var r=[],i=t.split("\n");for(var s=0;s<i.length;s++){var o=e.trim(i[s]);o&&(o=o.split("|"),r[r.length]={data:o,value:o[0],result:n.formatResult&&n.formatResult(o,o[0])||o[0]})}return r}function T(){i.removeClass(n.loadingClass)}var r={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8},i=e(t).attr("autocomplete","off").addClass(n.inputClass),s,o="",u=e.Autocompleter.Cache(n),a=0,f,l=navigator.userAgent.match(/opera/i),c={mouseDownOnSelect:!1},h=e.Autocompleter.Select(n,t,d,c),p;l&&e(t.form).bind("submit.autocomplete",function(){if(p)return p=!1,!1}),i.bind((l?"keypress":"keydown")+".autocomplete",function(t){a=1,f=t.keyCode;switch(t.keyCode){case r.UP:t.preventDefault(),h.visible()?h.prev():v(0,!0);break;case r.DOWN:t.preventDefault(),h.visible()?h.next():v(0,!0);break;case r.PAGEUP:t.preventDefault(),h.visible()?h.pageUp():v(0,!0);break;case r.PAGEDOWN:t.preventDefault(),h.visible()?h.pageDown():v(0,!0);break;case n.multiple&&e.trim(n.multipleSeparator)==","&&r.COMMA:case r.TAB:case r.RETURN:if(d())return t.preventDefault(),p=!0,!1;break;case r.ESC:h.hide();break;default:clearTimeout(s),s=setTimeout(v,n.delay)}}).focus(function(){a++}).blur(function(){a=0,c.mouseDownOnSelect||b()}).click(function(){a++>1&&!h.visible()&&v(0,!0)}).bind("search",function(){function n(e,n){var r;if(n&&n.length)for(var s=0;s<n.length;s++)if(n[s].result.toLowerCase()==e.toLowerCase()){r=n[s];break}typeof t=="function"?t(r):i.trigger("result",r&&[r.data,r.value])}var t=arguments.length>1?arguments[1]:null;e.each(m(i.val()),function(e,t){S(t,n,n)})}).bind("flushCache",function(){u.flush()}).bind("setOptions",function(){e.extend(n,arguments[1]),"data"in arguments[1]&&u.populate()}).bind("unautocomplete",function(){h.unbind(),i.unbind(),e(t.form).unbind(".autocomplete")})},e.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:!1,matchSubset:!0,matchContains:!1,cacheLength:10,max:100,mustMatch:!1,extraParams:{},selectFirst:!0,formatItem:function(e){return e[0]},formatMatch:null,autoFill:!1,width:0,multiple:!1,multipleSeparator:", ",highlight:function(e,t){return e.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+t.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>")},scroll:!0,scrollHeight:180},e.Autocompleter.Cache=function(t){function i(e,n){t.matchCase||(e=e.toLowerCase());var r=e.indexOf(n);return t.matchContains=="word"&&(r=e.toLowerCase().search("\\b"+n.toLowerCase())),r==-1?!1:r==0||t.matchContains}function s(e,i){r>t.cacheLength&&u(),n[e]||r++,n[e]=i}function o(){if(!t.data)return!1;var n={},r=0;t.url||(t.cacheLength=1),n[""]=[];for(var i=0,o=t.data.length;i<o;i++){var u=t.data[i];u=typeof u=="string"?[u]:u;var a=t.formatMatch(u,i+1,t.data.length);if(a===!1)continue;var f=a.charAt(0).toLowerCase();n[f]||(n[f]=[]);var l={value:a,data:u,result:t.formatResult&&t.formatResult(u)||a};n[f].push(l),r++<t.max&&n[""].push(l)}e.each(n,function(e,n){t.cacheLength++,s(e,n)})}function u(){n={},r=0}var n={},r=0;return setTimeout(o,25),{flush:u,add:s,populate:o,load:function(s){if(!t.cacheLength||!r)return null;if(!t.url&&t.matchContains){var o=[];for(var u in n)if(u.length>0){var a=n[u];e.each(a,function(e,t){i(t.value,s)&&o.push(t)})}return o}if(n[s])return n[s];if(t.matchSubset)for(var f=s.length-1;f>=t.minChars;f--){var a=n[s.substr(0,f)];if(a){var o=[];return e.each(a,function(e,t){i(t.value,s)&&(o[o.length]=t)}),o}}return null}}},e.Autocompleter.Select=function(t,n,r,i){function p(){if(!l)return;c=e("<div/>").hide().addClass(t.resultsClass).css("position","absolute").appendTo(document.body),h=e("<ul/>").appendTo(c).mouseover(function(t){d(t).nodeName&&d(t).nodeName.toUpperCase()=="LI"&&(u=e("li",h).removeClass(s.ACTIVE).index(d(t)),e(d(t)).addClass(s.ACTIVE))}).click(function(t){return e(d(t)).addClass(s.ACTIVE),r(),n.focus(),!1}).mousedown(function(){i.mouseDownOnSelect=!0}).mouseup(function(){i.mouseDownOnSelect=!1}),t.width>0&&c.css("width",t.width),l=!1}function d(e){var t=e.target;while(t&&t.tagName!="LI")t=t.parentNode;return t?t:[]}function v(e){o.slice(u,u+1).removeClass(s.ACTIVE),m(e);var n=o.slice(u,u+1).addClass(s.ACTIVE);if(t.scroll){var r=0;o.slice(0,u).each(function(){r+=this.offsetHeight}),r+n[0].offsetHeight-h.scrollTop()>h[0].clientHeight?h.scrollTop(r+n[0].offsetHeight-h.innerHeight()):r<h.scrollTop()&&h.scrollTop(r)}}function m(e){u+=e,u<0?u=o.size()-1:u>=o.size()&&(u=0)}function g(e){return t.max&&t.max<e?t.max:e}function y(){h.empty();var n=g(a.length);for(var r=0;r<n;r++){if(!a[r])continue;var i=t.formatItem(a[r].data,r+1,n,a[r].value,f);if(i===!1)continue;var l=e("<li/>").html(t.highlight(i,f)).addClass(r%2==0?"ac_even":"ac_odd").appendTo(h)[0];e.data(l,"ac_data",a[r])}o=h.find("li"),t.selectFirst&&(o.slice(0,1).addClass(s.ACTIVE),u=0),e.fn.bgiframe&&h.bgiframe()}var s={ACTIVE:"ac_over"},o,u=-1,a,f="",l=!0,c,h;return{display:function(e,t){p(),a=e,f=t,y()},next:function(){v(1)},prev:function(){v(-1)},pageUp:function(){u!=0&&u-8<0?v(-u):v(-8)},pageDown:function(){u!=o.size()-1&&u+8>o.size()?v(o.size()-1-u):v(8)},hide:function(){c&&c.hide(),o&&o.removeClass(s.ACTIVE),u=-1},visible:function(){return c&&c.is(":visible")},current:function(){return this.visible()&&(o.filter("."+s.ACTIVE)[0]||t.selectFirst&&o[0])},show:function(){var r=e(n).offset();c.css({width:typeof t.width=="string"||t.width>0?t.width:e(n).width(),top:r.top+n.offsetHeight,left:r.left}).show();if(t.scroll){h.scrollTop(0),h.css({maxHeight:t.scrollHeight,overflow:"auto"});if(navigator.userAgent.match(/msie/i)&&typeof document.body.style.maxHeight=="undefined"){var i=0;o.each(function(){i+=this.offsetHeight});var s=i>t.scrollHeight;h.css("height",s?t.scrollHeight:i),s||o.width(h.width()-parseInt(o.css("padding-left"))-parseInt(o.css("padding-right")))}}},selected:function(){var t=o&&o.filter("."+s.ACTIVE).removeClass(s.ACTIVE);return t&&t.length&&e.data(t[0],"ac_data")},emptyList:function(){h&&h.empty()},unbind:function(){c&&c.remove()}}},e.fn.selection=function(e,t){if(e!==undefined)return this.each(function(){if(this.createTextRange){var n=this.createTextRange();t===undefined||e==t?(n.move("character",e),n.select()):(n.collapse(!0),n.moveStart("character",e),n.moveEnd("character",t),n.select())}else this.setSelectionRange?this.setSelectionRange(e,t):this.selectionStart&&(this.selectionStart=e,this.selectionEnd=t)});var n=this[0];if(n.createTextRange){var r=document.selection.createRange(),i=n.value,s="<->",o=r.text.length;r.text=s;var u=n.value.indexOf(s);return n.value=i,this.selection(u,u+o),{start:u,end:u+o}}if(n.selectionStart!==undefined)return{start:n.selectionStart,end:n.selectionEnd}}}),timely.define("external_libs/geo_autocomplete",["jquery_timely","external_libs/jquery.autocomplete_geomod"],function(e){e.fn.extend({geo_autocomplete:function(t,n){return options=e.extend({},e.Autocompleter.defaults,{geocoder:t,mapwidth:100,mapheight:100,maptype:"terrain",mapkey:"ABQIAAAAbnvDoAoYOSW2iqoXiGTpYBT2yXp_ZAY8_ufC3CFXhHIE1NvwkxQNumU68AwGqjbSNF9YO8NokKst8w",mapsensor:!1,parse:function(t,n,r){var i=[];return t&&n&&n=="OK"&&e.each(t,function(t,n){if(n.geometry&&n.geometry.viewport){var s=n.formatted_address.split(","),o=s[0];e.each(s,function(t,n){if(n.toLowerCase().indexOf(r.toLowerCase())!=-1)return o=e.trim(n),!1}),i.push({data:n,value:o,result:o})}}),i},formatItem:function(e,t,n,r){var i="https://maps.google.com/maps/api/staticmap?visible="+e.geometry.viewport.getSouthWest().toUrlValue()+"|"+e.geometry.viewport.getNorthEast().toUrlValue()+"&size="+options.mapwidth+"x"+options.mapheight+"&maptype="+options.maptype+"&key="+options.mapkey+"&sensor="+(options.mapsensor?"true":"false"),s=e.formatted_address.replace(/,/gi,",<br/>");return'<img src="'+i+'" width="'+options.mapwidth+'" height="'+options.mapheight+'" /> '+s+'<br clear="both"/>'}},n),options.highlight=options.highlight||function(e){return e},options.formatMatch=options.formatMatch||options.formatItem,options.resultsClass="ai1ec-geo-ac-results-not-ready",this.each(function(){e(this).one("focus",function(){var t=setInterval(function(){var n=e(".ai1ec-geo-ac-results-not-ready");n.length&&(n.removeClass("ai1ec-geo-ac-results-not-ready").addClass("ai1ec-geo-ac-results").children("ul").addClass("ai1ec-dropdown-menu"),clearInterval(t))},500)}),new e.Autocompleter(this,options)})}})}),timely.define("scripts/add_new_event/event_location/gmaps_helper",["jquery_timely","domReady","ai1ec_config","scripts/add_new_event/event_location/input_coordinates_utility_functions","external_libs/jquery.autocomplete_geomod","external_libs/geo_autocomplete"],function(e,t,n,r){var i,s,o,u,a,f,l=function(t){e("#ai1ec_latitude").val(t.latLng.lat()),e("#ai1ec_longitude").val(t.latLng.lng()),e("#ai1ec_input_coordinates:checked").length===0&&e("#ai1ec_input_coordinates").trigger("click")},c=function(){!navigator.geolocation||navigator.geolocation.getCurrentPosition(function(e){var t=r.check_if_address_or_coordinates_are_set();if(t===!1){var n=e.coords.latitude,i=e.coords.longitude;s=new google.maps.LatLng(n,i),a.setPosition(s),u.setCenter(s),u.setZoom(15),f=e}})},h=function(){n.disable_autocompletion||e("#ai1ec_address").geo_autocomplete(new google.maps.Geocoder,{selectFirst:!1,minChars:3,cacheLength:50,width:300,scroll:!0,scrollHeight:330,region:n.region}).result(function(e,t){t&&d(t)}).change(function(){if(e(this).val().length>0){var t=e(this).val();i.geocode({address:t,region:n.region},function(e,t){t===google.maps.GeocoderStatus.OK&&d(e[0])})}})},p=function(){i=new google.maps.Geocoder,s=new google.maps.LatLng(9.965,-83.327),o={zoom:0,mapTypeId:google.maps.MapTypeId.ROADMAP,center:s},t(function(){e("#ai1ec_map_canvas").length>0&&(u=new google.maps.Map(e("#ai1ec_map_canvas").get(0),o),a=new google.maps.Marker({map:u,draggable:!0}),google.maps.event.addListener(a,"dragend",l),a.setPosition(s),c(),h(),m(),e('a[href="#ai1ec-event-location-box"]').on("click",function(){window.setTimeout(function(){google.maps.event.trigger(u,"resize"),u.setCenter(a.getPosition())},150)}))})},d=function(t){u.setCenter(t.geometry.location),u.setZoom(15),a.setPosition(t.geometry.location),e("#ai1ec_address").val(t.formatted_address),e("#ai1ec_latitude").val(t.geometry.location.lat()),e("#ai1ec_longitude").val(t.geometry.location.lng()),e("#ai1ec_input_coordinates").is(":checked")||e("#ai1ec_input_coordinates").click();var n="",r="",i="",s=0,o=0,f="",l;for(var c=0;c<t.address_components.length;c++)switch(t.address_components[c].types[0]){case"street_number":n=t.address_components[c].long_name;break;case"route":r=t.address_components[c].long_name;break;case"locality":i=t.address_components[c].long_name;break;case"administrative_area_level_1":f=t.address_components[c].long_name;break;case"postal_code":s=t.address_components[c].long_name;break;case"country":l=t.address_components[c].short_name,o=t.address_components[c].long_name}var h=n.length>0?n+" ":"";h+=r.length>0?r:"",s=s!==0?s:"",e("#ai1ec_city").val(i),e("#ai1ec_province").val(f),e("#ai1ec_postal_code").val(s),e("#ai1ec_country").val(o),e("#ai1ec_country_short").val(l)},v=function(){var t=parseFloat(e("#ai1ec_latitude").val()),n=parseFloat(e("#ai1ec_longitude").val()),r=new google.maps.LatLng(t,n);u.setCenter(r),u.setZoom(15),a.setPosition(r)},m=function(){e("#ai1ec_input_coordinates:checked").length===0?(e("#ai1ec_table_coordinates").hide(),e("#ai1ec_address").change()):v()},g=function(){return a},y=function(){return f};return{init_gmaps:p,ai1ec_update_map_from_coordinates:v,get_marker:g,get_position:y}}),timely.define("scripts/add_new_event/event_location/input_coordinates_event_handlers",["jquery_timely","scripts/add_new_event/event_location/input_coordinates_utility_functions","scripts/add_new_event/event_location/gmaps_helper","ai1ec_config"],function(e,t,n,r){var i=function(t){this.checked?e(".ai1ec-map-preview").addClass("ai1ec-map-visible"):e(".ai1ec-map-preview").removeClass("ai1ec-map-visible")},s=function(t){this.checked?e("#ai1ec_table_coordinates").fadeIn("fast"):e("#ai1ec_table_coordinates").fadeOut("fast")},o=function(e){t.ai1ec_convert_commas_to_dots_for_coordinates();var r=t.ai1ec_check_lat_long_ok_for_search(e);r===!0&&n.ai1ec_update_map_from_coordinates()};return{toggle_visibility_of_google_map_on_click:i,toggle_visibility_of_coordinate_fields_on_click:s,update_map_from_coordinates_on_blur:o}}),timely.define("external_libs/jquery.calendrical_timespan",["jquery_timely"],function(e){function l(){var e=new Date;return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function c(e,t){return typeof e=="string"&&(e=new Date(e)),typeof t=="string"&&(t=new Date(t)),e.getUTCDate()===t.getUTCDate()&&e.getUTCMonth()===t.getUTCMonth()&&e.getUTCFullYear()===t.getUTCFullYear()?!0:!1}function h(e,t){if(e instanceof Date)return h(e.getUTCFullYear(),e.getUTCMonth());if(t==1){var n=e%4==0&&(e%100!=0||e%400==0);return n?29:28}return t==3||t==5||t==8||t==10?30:31}function p(e){return new Date(e.getTime()+864e5)}function d(e){return new Date(e.getTime()-864e5)}function v(e,t){return t==11?new Date(e+1,0,1):new Date(e,t+1,1)}function m(t,n,r,i){var s=i.monthNames.split(","),o=e("<thead />"),u=e("<tr />").appendTo(o);e("<th />").addClass("monthCell").append(e('<a href="javascript:;">&laquo;</a>').addClass("prevMonth").mousedown(function(e){g(t,r==0?n-1:n,r==0?11:r-1,i),e.preventDefault()})).appendTo(u),e("<th />").addClass("monthCell").attr("colSpan",5).append(e('<a href="javascript:;">'+s[r]+" "+n+"</a>").addClass("monthName")).appendTo(u),e("<th />").addClass("monthCell").append(e('<a href="javascript:;">&raquo;</a>').addClass("nextMonth").mousedown(function(){g(t,r==11?n+1:n,r==11?0:r+1,i)})).appendTo(u);var a=i.dayNames.split(","),f=parseInt(i.weekStartDay),l=[];for(var c=0,h=a.length;c<h;c++)l[c]=a[(c+f)%h];var p=e("<tr />").appendTo(o);return e.each(l,function(t,n){e("<td />").addClass("dayName").append(n).appendTo(p)}),o}function g(t,n,r,i){i=i||{};var s=parseInt(i.weekStartDay),o=i.today?i.today:l();o.setHours(0),o.setMinutes(0);var u=new Date(n,r,1),a=v(n,r),f=Math.abs(o.getTimezoneOffset());f!=0&&(o.setHours(o.getHours()+f/60),o.setMinutes(o.getMinutes()+f%60),u.setHours(u.getHours()+f/60),u.setMinutes(u.getMinutes()+f%60),a.setHours(a.getHours()+f/60),a.setMinutes(a.getMinutes()+f%60));var h=a.getUTCDay()-s;h<0?h=Math.abs(h)-1:h=6-h;for(var g=0;g<h;g++)a=p(a);var y=e("<table />");m(t,n,r,i).appendTo(y);var b=e("<tbody />").appendTo(y),w=e("<tr />"),E=u.getUTCDay()-s;E<0&&(E=7+E);for(var g=0;g<E;g++)u=d(u);while(u<=a){var S=e("<td />").addClass("day").append(e('<a href="javascript:;">'+u.getUTCDate()+"</a>").click(function(){var e=u;return function(){i&&i.selectDate&&i.selectDate(e)}}())).appendTo(w),x=c(u,o),T=i.selected&&c(i.selected,u);x&&S.addClass("today"),T&&S.addClass("selected"),x&&T&&S.addClass("today_selected"),u.getUTCMonth()!=r&&S.addClass("nonMonth");var N=u.getUTCDay();(N+1)%7==s&&(b.append(w),w=e("<tr />")),u=p(u)}w.children().length?b.append(w):w.remove(),t.empty().append(y)}function y(t,n){var r=n.selection&&f(n.selection);r&&(r.minute=Math.floor(r.minute/15)*15);var i=n.startTime&&n.startTime.hour*60+n.startTime.minute,s,o=e("<ul />");for(var a=0;a<24;a++)for(var l=0;l<60;l+=15){if(i&&i>a*60+l)continue;(function(){var t=u(a,l,n.isoTime),f=t;if(i!=null){var c=a*60+l-i;c<60?f+=" ("+c+" min)":c==60?f+=" (1 hr)":f+=" ("+Math.floor(c/60)+" hr "+c%60+" min)"}var h=e("<li />").append(e('<a href="javascript:;">'+f+"</a>").click(function(){n&&n.selectTime&&n.selectTime(t)}).mousemove(function(){e("li.selected",o).removeClass("selected")})).appendTo(o);!s&&a==n.defaultHour&&(s=h),r&&r.hour==a&&r.minute==l&&(h.addClass("selected"),s=h)})()}s&&setTimeout(function(){t[0].scrollTop=s[0].offsetTop-s.height()*2},0),t.empty().append(o)}function b(e){e.addClass("error").fadeOut("normal",function(){e.val(e.data("timespan.stored")).removeClass("error").fadeIn("fast")})}function w(){e(this).data("timespan.stored",this.value)}function E(t,n,r,i,a,f,l,c,h,p){r.val(r.data("timespan.initial_value")),f.val(f.data("timespan.initial_value")),l.get(0).checked=l.data("timespan.initial_value");var d=s(r,p,0,15);n.val(u(d.getUTCHours(),d.getUTCMinutes(),c)),t.val(o(d,h));var v=s(f,d.getTime(),1,15);a.val(u(v.getUTCHours(),v.getUTCMinutes(),c)),l.get(0).checked&&v.setUTCDate(v.getUTCDate()-1),i.val(o(v,h)),t.each(w),n.each(w),i.each(w),a.each(w),l.trigger("change.timespan"),e("#ai1ec_instant_event").trigger("change.timespan")}var t={us:{pattern:/([\d]{1,2})\/([\d]{1,2})\/([\d]{4}|[\d]{2})/,format:"m/d/y",order:"middleEndian",zeroPad:!1},iso:{pattern:/([\d]{4}|[\d]{2})-([\d]{1,2})-([\d]{1,2})/,format:"y-m-d",order:"bigEndian",zeroPad:!0},dot:{pattern:/([\d]{1,2}).([\d]{1,2}).([\d]{4}|[\d]{2})/,format:"d.m.y",order:"littleEndian",zeroPad:!1},def:{pattern:/([\d]{1,2})\/([\d]{1,2})\/([\d]{4}|[\d]{2})/,format:"d/m/y",order:"littleEndian",zeroPad:!1}},n=function(e){return e<10?"0"+e:e},r=function(e,t){typeof t=="undefined"&&(t=!1);var r=e.getUTCFullYear()+"-"+n(e.getUTCMonth()+1)+"-"+n(e.getUTCDate());return t&&(r+="T"+n(e.getUTCHours())+":"+n(e.getUTCMinutes())+":00"),r},i=function(e,t){var n=e.val(),r=null;if(n.length<4)r=new Date(t);else{r=new Date(n);var i=n.split("T"),s=i[0].split("-"),o=i[1].split(":");r.setUTCFullYear(s[0],s[1]-1,s[2]),r.setUTCHours(o[0],o[1],o[2],0)}return r},s=function(e,t,n,r){return t+=n*36e5,t-=t%(r*6e4),i(e,t)},o=function(e,n,r){var i,s,o;typeof t[n]=="undefined"&&(n="def"),typeof r=="undefined"&&(r=!1),!0===r?(i=e.getFullYear().toString(),s=(e.getMonth()+1).toString(),o=e.getDate().toString()):(i=e.getUTCFullYear().toString(),s=(e.getUTCMonth()+1).toString(),o=e.getUTCDate().toString()),t[n].zeroPad&&(s.length==1&&(s="0"+s),o.length==1&&(o="0"+o));var u=t[n].format;return u=u.replace("d",o),u=u.replace("m",s),u=u.replace("y",i),u},u=function(e,t,n){var r=t;t<10&&(r="0"+t);if(n){var i=e;return i<10&&(i="0"+e),i+":"+r}var i=e%12;i==0&&(i=12);var s=e<12?"am":"pm";return i+":"+r+s},a=function(e,n){typeof t[n]=="undefined"&&(n="def");var r=e.match(t[n].pattern);if(!r||r.length!=4)return Date("invalid");switch(t[n].order){case"bigEndian":var i=r[3],s=r[2],o=r[1];break;case"littleEndian":var i=r[1],s=r[2],o=r[3];break;case"middleEndian":var i=r[2],s=r[1],o=r[3];break;default:var i=r[1],s=r[2],o=r[3]}return o.length==2&&(o=(new Date).getUTCFullYear().toString().substr(0,2)+o),new Date(s+"/"+i+"/"+o+" GMT")},f=function(e){var t=t=/(\d+)\s*[:\-\.,]\s*(\d+)\s*(am|pm)?/i.exec(e);if(t&&t.length>=3){var n=Number(t[1]),r=Number(t[2]);return n==12&&t[3]&&(n-=12),t[3]&&t[3].toLowerCase()=="pm"&&(n+=12),{hour:n,minute:r}}return null};e.fn.calendricalDate=function(t){return t=t||{},t.padding=t.padding||4,t.monthNames=t.monthNames||"January,February,March,April,May,June,July,August,September,October,November,December",t.dayNames=t.dayNames||"S,M,T,W,T,F,S",t.weekStartDay=t.weekStartDay||0,this.each(function(){var n=e(this),r,i=!1;n.bind("focus",function(){if(r)return;var s=n.position(),u=n.css("padding-left");r=e("<div />").addClass("calendricalDatePopup").mouseenter(function(){i=!0}).mouseleave(function(){i=!1}).mousedown(function(e){e.preventDefault()}).css({position:"absolute",left:s.left,top:s.top+n.height()+t.padding*2}),n.after(r);var f=a(n.val(),t.dateFormat);f.getUTCFullYear()||(f=t.today?t.today:l()),g(r,f.getUTCFullYear(),f.getUTCMonth(),{today:t.today,selected:f,monthNames:t.monthNames,dayNames:t.dayNames,weekStartDay:t.weekStartDay,selectDate:function(e){i=!1,n.val(o(e,t.dateFormat)),r.remove(),r=null;if(t.endDate){var s=a(t.endDate.val(),t.dateFormat);s>=f&&t.endDate.val(o(new Date(e.getTime()+s.getTime()-f.getTime()),t.dateFormat))}}})}).blur(function(){if(i){r&&n.focus();return}if(!r)return;r.remove(),r=null})})},e.fn.calendricalDateRange=function(t){return this.length>=2&&(e(this[0]).calendricalDate(e.extend({endDate:e(this[1])},t)),e(this[1]).calendricalDate(t)),this},e.fn.calendricalDateRangeSingle=function(t){return this.length==1&&e(this).calendricalDate(t),this},e.fn.calendricalTime=function(t){return t=t||{},t.padding=t.padding||4,this.each(function(){var n=e(this),r,i=!1;n.bind("focus click",function(){if(r)return;var s=t.startTime;s&&t.startDate&&t.endDate&&!c(a(t.startDate.val()),a(t.endDate.val()))&&(s=!1);var o=n.position();r=e("<div />").addClass("calendricalTimePopup").mouseenter(function(){i=!0}).mouseleave(function(){i=!1}).mousedown(function(e){e.preventDefault()}).css({position:"absolute",left:o.left,top:o.top+n.height()+t.padding*2}),s&&r.addClass("calendricalEndTimePopup"),n.after(r);var u={selection:n.val(),selectTime:function(e){i=!1,n.val(e),r.remove(),r=null},isoTime:t.isoTime||!1,defaultHour:t.defaultHour!=null?t.defaultHour:8};s&&(u.startTime=f(t.startTime.val())),y(r,u)}).blur(function(){if(i){r&&n.focus();return}if(!r)return;r.remove(),r=null})})},e.fn.calendricalTimeRange=function(t){return this.length>=2&&(e(this[0]).calendricalTime(t),e(this[1]).calendricalTime(e.extend({startTime:e(this[0])},t))),this},e.fn.calendricalDateTimeRange=function(t){return this.length>=4&&(e(this[0]).calendricalDate(e.extend({endDate:e(this[2])},t)),e(this[1]).calendricalTime(t),e(this[2]).calendricalDate(t),e(this[3]).calendricalTime(e.extend({startTime:e(this[1]),startDate:e(this[0]),endDate:e(this[2])},t))),this};var S={allday:"#allday",start_date_input:"#start-date-input",start_time_input:"#start-time-input",start_time:"#start-time",end_date_input:"#end-date-input",end_time_input:"#end-time-input",end_time:"#end-time",twentyfour_hour:!1,date_format:"def",now:new Date},x={init:function(t){function C(){var e=a(s.val(),n.date_format).getTime()/1e3,t=f(l.val());e+=t.hour*3600+t.minute*60;var r=a(h.val(),n.date_format).getTime()/1e3,i=f(p.val());return r+=i.hour*3600+i.minute*60,r-e}function k(){var e=a(s.data("timespan.stored"),n.date_format),t=f(l.data("timespan.stored")),r=e.getTime()/1e3+t.hour*3600+t.minute*60+s.data("time_diff");return r=new Date(r*1e3),h.val(o(r,n.date_format)),p.val(u(r.getUTCHours(),r.getUTCMinutes(),n.twentyfour_hour)),!0}var n=e.extend({},S,t),i=e(n.allday),s=e(n.start_date_input),l=e(n.start_time_input),c=e(n.start_time),h=e(n.end_date_input),p=e(n.end_time_input),d=e(n.end_time),v=e("#ai1ec_instant_event"),m=h.add(p),g=s.add(n.end_date_input),y=l.add(n.end_time_input),x=s.add(n.start_time_input).add(n.end_date_input).add(n.end_time_input);x.bind("focus.timespan",w),v.bind("change.timespan",function(){this.checked?(m.closest("tr").fadeOut(),i.attr("disabled",!0)):(i.removeAttr("disabled"),m.closest("tr").fadeIn())});var T=new Date(n.now.getFullYear(),n.now.getMonth(),n.now.getDate()),N=!1;return i.bind("change.timespan",function(){this.checked?(y.fadeOut(),v.attr("disabled",!0)):(v.removeAttr("disabled"),y.fadeIn()),N||(N=!0,x.calendricalDateTimeRange({today:T,dateFormat:n.date_format,isoTime:n.twentyfour_hour,monthNames:n.month_names,dayNames:n.day_names,weekStartDay:n.week_start_day}))}).get().checked=!1,g.bind("blur.timespan",function(){var t=a(this.value,n.date_format);isNaN(t)?b(e(this)):(e(this).data("timespan.stored",this.value),e(this).val(o(t,n.date_format)))}),y.bind("blur.timespan",function(){var t=f(this.value);t?(e(this).data("timespan.stored",this.value),e(this).val(u(t.hour,t.minute,n.twentyfour_hour))):b(e(this))}),s.add(n.start_time_input).bind("focus.timespan",function(){s.data("time_diff",C())}).bind("blur.timespan",function(){s.data("time_diff")<0&&s.data("time_diff",900);var e=k()}),h.add(n.start_time_input).bind("blur.timespan",function(){if(C()<0){s.data("time_diff",900);var e=k()}}),s.closest("form").bind("submit.timespan",function(){var e=a(s.val(),n.date_format).getTime()/1e3;if(!isNaN(e)){if(!i.get(0).checked){var t=f(l.val());t?e+=t.hour*3600+t.minute*60:e=""}}else e="";e>0&&c.val(r(new Date(e*1e3),!0));var o=a(h.val(),n.date_format).getTime()/1e3;if(!isNaN(o))if(i.get(0).checked)o+=86400;else{var t=f(p.val());t?o+=t.hour*3600+t.minute*60:o=""}else o="";o>0&&d.val(r(new Date(o*1e3),!0))}),c.data("timespan.initial_value",c.val()),d.data("timespan.initial_value",d.val()),i.data("timespan.initial_value",i.get(0).checked),E(s,l,c,h,p,d,i,n.twentyfour_hour,n.date_format,n.now),this},reset:function(t){var n=e.extend({},S,t);return E(e(n.start_date_input),e(n.start_time_input),e(n.start_time),e(n.end_date_input),e(n.end_time_input),e(n.end_time),e(n.allday),n.twentyfour_hour,n.date_format,n.now),this},destroy:function(t){return t=e.extend({},S,t),e.each(t,function(t,n){e(n).unbind(".timespan")}),e(t.start_date_input).closest("form").unbind(".timespan"),this}};return e.timespan=function(t){if(x[t])return x[t].apply(this,Array.prototype.slice.call(arguments,1));if(typeof t=="object"||!t)return x.init.apply(this,arguments);e.error("Method "+t+" does not exist on jQuery.timespan")},{formatDate:o,parseDate:a}}),timely.define("scripts/add_new_event/event_date_time/date_time_utility_functions",["jquery_timely","ai1ec_config","libs/utils","external_libs/jquery.calendrical_timespan"],function(e,t,n,r){var i=n.get_ajax_url(),s=function(t,n,r,i,s,o){e(t).val(i),e("#ai1ec_repeat_box").modal("hide");var u=e.trim(e(n).text());u.lastIndexOf(":")===-1&&(u=u.substring(0,u.length-3),e(n).text(u+":")),e(s).attr("disabled",!1),e(r).fadeOut("fast",function(){e(this).text(o.message),e(this).fadeIn("fast")})},o=function(t,n,r,i){e("#ai1ec_repeat_box .ai1ec-alert-danger").text(r.message).removeClass("ai1ec-hide"),e(i).attr("disabled",!1),e(t).val("");var s=e.trim(e(n).text());s.lastIndexOf("...")===-1&&(s=s.substring(0,s.length-1),e(n).text(s+"...")),e(this).closest("tr").find(".ai1ec_rule_text").text()===""&&e(t).siblings("input:checkbox").removeAttr("checked")},u=function(t,n,r,i,s){e(document).on("click",t,function(){if(!e(n).is(":checked")){e(n).attr("checked",!0);var t=e.trim(e(r).text());t=t.substring(0,t.length-3),e(r).text(t+":")}return c(i,s),!1})},a=function(t,n,r,i,s){e(t).click(function(){if(e(this).is(":checked"))this.id==="ai1ec_repeat"&&e("#ai1ec_exclude").removeAttr("disabled"),c(i,s);else{this.id==="ai1ec_repeat"&&(e("#ai1ec_exclude").removeAttr("checked").attr("disabled",!0),e("#ai1ec_exclude_text > a").text("")),e(n).text("");var t=e.trim(e(r).text());t=t.substring(0,t.length-1),e(r).text(t+"...")}})},f=function(t,n,r){if(e.trim(e(t).text())===""){e(n).removeAttr("checked"),e("#ai1ec_repeat").is(":checked")||e("#ai1ec_exclude").attr("disabled",!0);var i=e.trim(e(r).text());i.lastIndexOf("...")===-1&&(i=i.substring(0,i.length-1),e(r).text(i+"..."))}},l=function(){e("#ai1ec_count, #ai1ec_daily_count, #ai1ec_weekly_count, #ai1ec_monthly_count, #ai1ec_yearly_count").rangeinput({css:{input:"ai1ec-range",slider:"ai1ec-slider",progress:"ai1ec-progress",handle:"ai1ec-handle"}});var n=e("#ai1ec_recurrence_calendar");n.datepicker({multidate:!0,weekStart:t.week_start_day}),n.on("changeDate",function(n){var i=[],s=[];for(var o=0;o<n.dates.length;o++){var u=new Date(n.dates[o]),a=""+u.getFullYear()+("0"+(u.getMonth()+1)).slice(-2)+("0"+u.getDate()).slice(-2)+"T000000Z",f='<span class="ai1ec-label ai1ec-label-default">'+r.formatDate(u,t.date_format,!0)+"</span>";i.push(a),s.push(f)}e("#ai1ec_rec_dates_list").html(s.join(" ")),e("#ai1ec_rec_custom_dates").val(i.join(","))});var i={start_date_input:"#ai1ec_until-date-input",start_time:"#ai1ec_until-time",date_format:t.date_format,month_names:t.month_names,day_names:t.day_names,week_start_day:t.week_start_day,twentyfour_hour:t.twentyfour_hour,now:new Date(t.now*1e3)};e.inputdate(i)},c=function(t,n){var r=e("#ai1ec_repeat_box"),s=e(".ai1ec-loading",r);r.modal({backdrop:"static"}),e.post(i,t,function(e){e.error?(window.alert(e.message),r.modal("hide")):(s.addClass("ai1ec-hide").after(e.message),typeof n=="function"&&n())},"json")};return{show_repeat_tabs:c,init_modal_widgets:l,click_on_modal_cancel:f,click_on_checkbox:a,click_on_ics_rule_text:u,repeat_form_error:o,repeat_form_success:s}}),timely.define("external_libs/bootstrap/button",["jquery_timely"],function(e){var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r)};t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.is("input")?"val":"html",i=n.data();e+="Text",i.resetText||n.data("resetText",n[r]()),n[r](i[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass("ai1ec-"+t).attr(t,t):n.removeClass("ai1ec-"+t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="ai1ec-buttons"]'),t=!0;if(e.length){var n=this.$element.find("input");n.prop("type")==="radio"&&(n.prop("checked")&&this.$element.hasClass("ai1ec-active")?t=!1:e.find(".ai1ec-active").removeClass("ai1ec-active")),t&&n.prop("checked",!this.$element.hasClass("ai1ec-active")).trigger("change")}t&&this.$element.toggleClass("ai1ec-active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("bs.button"),s=typeof n=="object"&&n;i||r.data("bs.button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.bs.button.data-api","[data-toggle^=ai1ec-button]",function(t){var n=e(t.target);n.hasClass("ai1ec-btn")||(n=n.closest(".ai1ec-btn")),n.button("toggle"),t.preventDefault()})}),timely.define("scripts/add_new_event/event_date_time/date_time_event_handlers",["jquery_timely","ai1ec_config","scripts/add_new_event/event_date_time/date_time_utility_functions","external_libs/jquery.calendrical_timespan","libs/utils","external_libs/bootstrap/button"],function(e,t,n,r,i){var s=i.get_ajax_url(),o=function(){var t=e("#ai1ec_end option:selected").val();switch(t){case"0":e("#ai1ec_until_holder, #ai1ec_count_holder").collapse("hide");break;case"1":e("#ai1ec_until_holder").collapse("hide"),e("#ai1ec_count_holder").collapse("show");break;case"2":e("#ai1ec_count_holder").collapse("hide"),e("#ai1ec_until_holder").collapse("show")}},u=function(){e("#publish").trigger("click")},a=function(){var i=e(this),o="",u=e("#ai1ec_repeat_box .ai1ec-tab-pane.ai1ec-active"),a=u.data("freq");switch(a){case"daily":o+="FREQ=DAILY;";var f=e("#ai1ec_daily_count").val();f>1&&(o+="INTERVAL="+f+";");break;case"weekly":o+="FREQ=WEEKLY;";var l=e("#ai1ec_weekly_count").val();l>1&&(o+="INTERVAL="+l+";");var c=e('input[name="ai1ec_weekly_date_select"]:first').val(),h=e('#ai1ec_weekly_date_select > div:first > input[type="hidden"]:first').val();c.length>0&&(o+="WKST="+h+";BYday="+c+";");break;case"monthly":o+="FREQ=MONTHLY;";var p=e("#ai1ec_monthly_count").val(),d=e('input[name="ai1ec_monthly_type"]:checked').val();p>1&&(o+="INTERVAL="+p+";");var v=e('input[name="ai1ec_montly_date_select"]:first').val();if(v.length>0&&d==="bymonthday")o+="BYMONTHDAY="+v+";";else if(d==="byday"){var m=e("#ai1ec_monthly_byday_num").val(),g=e("#ai1ec_monthly_byday_weekday").val();o+="BYday="+m+g+";"}break;case"yearly":o+="FREQ=YEARLY;";var y=e("#ai1ec_yearly_count").val();y>1&&(o+="INTERVAL="+y+";");var b=e('input[name="ai1ec_yearly_date_select"]:first').val();b.length>0&&(o+="BYMONTH="+b+";");break;case"custom":"1"===e("#ai1ec_is_box_repeat").val()?o+="RDATE=":o+="EXDATE=",o+=e("#ai1ec_rec_custom_dates").val()}var w=e("#ai1ec_end").val();if(w==="1")o+="COUNT="+e("#ai1ec_count").val()+";";else if(w==="2"){var E=e("#ai1ec_until-date-input").val();E=r.parseDate(E,t.date_format);var S=e("#ai1ec_start-time").val();S=r.parseDate(S,t.date_format),S=new Date(S);var x=E.getUTCDate(),T=E.getUTCMonth()+1,N=S.getUTCHours(),C=S.getUTCMinutes();T=T<10?"0"+T:T,x=x<10?"0"+x:x,N=N<10?"0"+N:N,C=C<10?"0"+C:C,E=E.getUTCFullYear()+""+T+x+"T235959Z",o+="UNTIL="+E+";"}var k={action:"ai1ec_rrule_to_text",rrule:o};i.button("loading").next().addClass("ai1ec-disabled"),e.post(s,k,function(t){t.error?(i.button("reset").next().removeClass("ai1ec-disabled"),"1"===e("#ai1ec_is_box_repeat").val()?n.repeat_form_error("#ai1ec_rrule","#ai1ec_repeat_label",t,i):n.repeat_form_error("#ai1ec_exrule","#ai1ec_exclude_label",t,i)):"1"===e("#ai1ec_is_box_repeat").val()?n.repeat_form_success("#ai1ec_rrule","#ai1ec_repeat_label","#ai1ec_repeat_text > a",o,i,t):n.repeat_form_success("#ai1ec_exrule","#ai1ec_exclude_label","#ai1ec_exclude_text > a",o,i,t)},"json")},f=function(){return e("#ai1ec_is_box_repeat").val()==="1"?n.click_on_modal_cancel("#ai1ec_repeat_text > a","#ai1ec_repeat","#ai1ec_repeat_label"):n.click_on_modal_cancel("#ai1ec_exclude_text > a","#ai1ec_exclude","#ai1ec_exclude_label"),e("#ai1ec_repeat_box").modal("hide"),!1},l=function(){e(this).is("#ai1ec_monthly_type_bymonthday")?(e("#ai1ec_repeat_monthly_byday").collapse("hide"),e("#ai1ec_repeat_monthly_bymonthday").collapse("show")):(e("#ai1ec_repeat_monthly_bymonthday").collapse("hide"),e("#ai1ec_repeat_monthly_byday").collapse("show"))},c=function(){var t=e(this),n=[],r=t.closest(".ai1ec-btn-group-grid"),i;t.toggleClass("ai1ec-active"),e("a",r).each(function(){var t=e(this);t.is(".ai1ec-active")&&(i=t.next().val(),n.push(i))}),r.next().val(n.join())},h=function(){n.click_on_ics_rule_text("#ai1ec_repeat_text > a","#ai1ec_repeat","#ai1ec_repeat_label",{action:"ai1ec_get_repeat_box",repeat:1,post_id:e("#post_ID").val()},n.init_modal_widgets),n.click_on_ics_rule_text("#ai1ec_exclude_text > a","#ai1ec_exclude","#ai1ec_exclude_label",{action:"ai1ec_get_repeat_box",repeat:0,post_id:e("#post_ID").val()},n.init_modal_widgets),n.click_on_checkbox("#ai1ec_repeat","#ai1ec_repeat_text > a","#ai1ec_repeat_label",{action:"ai1ec_get_repeat_box",repeat:1,post_id:e("#post_ID").val()},n.init_modal_widgets),n.click_on_checkbox("#ai1ec_exclude","#ai1ec_exclude_text > a","#ai1ec_exclude_label",{action:"ai1ec_get_repeat_box",repeat:0,post_id:e("#post_ID").val()},n.init_modal_widgets)},p=function(t){return e("#ai1ec_widget_calendar").toggle(),!1},d=function(){e(".ai1ec-modal-content",this).not(".ai1ec-loading ").remove().end().removeClass("ai1ec-hide")};return{show_end_fields:o,trigger_publish:u,handle_click_on_apply_button:a,handle_click_on_cancel_modal:f,handle_checkbox_monthly_tab_modal:l,execute_pseudo_handlers:h,handle_animation_of_calendar_widget:p,handle_click_on_toggle_buttons:c,handle_modal_hide:d}}),timely.define("scripts/add_new_event/event_cost_helper",["jquery_timely","ai1ec_config"],function(e,t){var n=function(){return e("#ai1ec_is_free").is(":checked")},r=function(){return e("#ai1ec_cost").val()!==""},i=function(r){var i=e(this).parents("table:eq(0)"),s=e("#ai1ec_cost",i),o=t.label_a_buy_tickets_url;n()?(s.attr("value","").addClass("ai1ec-hidden"),o=t.label_a_rsvp_url):s.removeClass("ai1ec-hidden"),e("label[for=ai1ec_ticket_url]",i).text(o)};return{handle_change_is_free:i,check_is_free:n,check_is_price_entered:r}}),timely.define("external_libs/jquery.inputdate",["jquery_timely","external_libs/jquery.calendrical_timespan"],function(e,t){function n(e){e.addClass("error").fadeOut("normal",function(){e.val(e.data("timespan.stored")).removeClass("error").fadeIn("fast")})}function r(){e(this).data("timespan.stored",this.value)}function i(e,n,i,s,o){n.val(n.data("timespan.initial_value"));var u=parseInt(n.val());isNaN(parseInt(u))?u=new Date(o):u=new Date(parseInt(u)*1e3),e.val(t.formatDate(u,s)),e.each(r)}var s={start_date_input:"date-input",start_time:"time",twentyfour_hour:!1,date_format:"def",now:new Date},o={init:function(o){var u=e.extend({},s,o),a=e(u.start_date_input),f=e(u.start_time),l=a,c=a;return c.bind("focus.timespan",r),l.calendricalDate({today:new Date(u.now.getFullYear(),u.now.getMonth(),u.now.getDate()),dateFormat:u.date_format,monthNames:u.month_names,dayNames:u.day_names,weekStartDay:u.week_start_day}),l.bind("blur.timespan",function(){var r=t.parseDate(this.value,u.date_format);isNaN(r)?n(e(this)):(e(this).data("timespan.stored",this.value),e(this).val(t.formatDate(r,u.date_format)))}),a.bind("focus.timespan",function(){var e=t.parseDate(a.val(),u.date_format).getTime()/1e3}).bind("blur.timespan",function(){var e=t.parseDate(a.data("timespan.stored"),u.date_format)}),a.closest("form").bind("submit.timespan",function(){var e=t.parseDate(a.val(),u.date_format).getTime()/1e3;isNaN(e)&&(e=""),f.val(e)}),f.data("timespan.initial_value",f.val()),i(a,f,u.twentyfour_hour,u.date_format,u.now),this},reset:function(t){var n=e.extend({},s,t);return i(e(n.start_date_input),e(n.start_time),n.twentyfour_hour,n.date_format,n.now),this},destroy:function(t){return t=e.extend({},s,t),e.each(t,function(t,n){e(n).unbind(".timespan")}),e(t.start_date_input).closest("form").unbind(".timespan"),this}};e.inputdate=function(t){if(o[t])return o[t].apply(this,Array.prototype.slice.call(arguments,1));if(typeof t=="object"||!t)return o.init.apply(this,arguments);e.error("Method "+t+" does not exist on jQuery.timespan")}}),timely.define("external_libs/jquery.tools",["jquery_timely"],function(e){function i(e,t){var n=Math.pow(10,t);return Math.round(e*n)/n}function s(e,t){var n=parseInt(e.css(t),10);if(n)return n;var r=e[0].currentStyle;return r&&r.width&&parseInt(r.width,10)}function o(e){var t=e.data("events");return t&&t.onSlide}function u(t,n){function x(e,s,o,u){o===undefined?o=s/h*m:u&&(o-=n.min),g&&(o=Math.round(o/g)*g);if(s===undefined||g)s=o*h/m;if(isNaN(o))return r;s=Math.max(0,Math.min(s,h)),o=s/h*m;if(u||!f)o+=n.min;f&&(u?s=h-s:o=n.max-o),o=i(o,y);var a=e.type=="click";if(S&&l!==undefined&&!a){e.type="onSlide",E.trigger(e,[o,s]);if(e.isDefaultPrevented())return r}var c=a?n.speed:0,b=a?function(){e.type="change",E.trigger(e,[o])}:null;return f?(d.animate({top:s},c,b),n.progress&&v.animate({height:h-s+d.height()/2},c)):(d.animate({left:s},c,b),n.progress&&v.animate({width:s+d.width()/2},c)),l=o,p=s,t.val(o),r}function T(){f=n.vertical||s(a,"height")>s(a,"width"),f?(h=s(a,"height")-s(d,"height"),c=a.offset().top+h):(h=s(a,"width")-s(d,"width"),c=a.offset().left)}function N(){T(),r.setValue(n.value!==undefined?n.value:n.min)}var r=this,u=n.css,a=e("<div><div/><a href='#'/></div>").data("rangeinput",r),f,l,c,h,p;t.before(a);var d=a.addClass(u.slider).find("a").addClass(u.handle),v=a.find("div").addClass(u.progress);e.each("min,max,step,value".split(","),function(e,r){var i=t.attr(r);parseFloat(i)&&(n[r]=parseFloat(i,10))});var m=n.max-n.min,g=n.step=="any"?0:n.step,y=n.precision;y===undefined&&(y=g.toString().split("."),y=y.length===2?y[1].length:0);if(t.attr("type")=="range"){var b=t.clone().wrap("<div/>").parent().html(),w=e(b.replace(/type/i,"type=text data-orig-type"));w.val(n.value),t.replaceWith(w),t=w}t.addClass(u.input);var E=e(r).add(t),S=!0;e.extend(r,{getValue:function(){return l},setValue:function(t,n){return T(),x(n||e.Event("api"),undefined,t,!0)},getConf:function(){return n},getProgress:function(){return v},getHandle:function(){return d},getInput:function(){return t},step:function(t,i){i=i||e.Event();var s=n.step=="any"?1:n.step;r.setValue(l+s*(t||1),i)},stepUp:function(e){return r.step(e||1)},stepDown:function(e){return r.step(-e||-1)}}),e.each("onSlide,change".split(","),function(t,i){e.isFunction(n[i])&&e(r).on(i,n[i]),r[i]=function(t){return t&&e(r).on(i,t),r}}),d.drag({drag:!1}).on("dragStart",function(){T(),S=o(e(r))||o(t)}).on("drag",function(e,n,r){if(t.is(":disabled"))return!1;x(e,f?n:r)}).on("dragEnd",function(e){e.isDefaultPrevented()||(e.type="change",E.trigger(e,[l]))}).click(function(e){return e.preventDefault()}),a.click(function(e){if(t.is(":disabled")||e.target==d[0])return e.preventDefault();T();var n=f?d.height()/2:d.width()/2;x(e,f?h-c-n+e.pageY:e.pageX-c-n)}),n.keyboard&&t.keydown(function(n){if(t.attr("readonly"))return;var i=n.keyCode,s=e([75,76,38,33,39]).index(i)!=-1,o=e([74,72,40,34,37]).index(i)!=-1;if((s||o)&&!(n.shiftKey||n.altKey||n.ctrlKey))return s?r.step(i==33?10:1,n):o&&r.step(i==34?-10:-1,n),n.preventDefault()}),t.blur(function(t){var n=e(this).val();n!==l&&r.setValue(n,t)}),e.extend(t[0],{stepUp:r.stepUp,stepDown:r.stepDown}),N(),h||e(window).load(N)}e.tools=e.tools||{version:"1.2.7"};var t;t=e.tools.rangeinput={conf:{min:0,max:100,step:"any",steps:0,value:0,precision:undefined,vertical:0,keyboard:!0,progress:!1,speed:100,css:{input:"range",slider:"slider",progress:"progress",handle:"handle"}}};var n,r;e.fn.drag=function(t){return document.ondragstart=function(){return!1},t=e.extend({x:!0,y:!0,drag:!0},t),n=n||e(document).on("mousedown mouseup",function(i){var s=e(i.target);if(i.type=="mousedown"&&s.data("drag")){var o=s.position(),u=i.pageX-o.left,a=i.pageY-o.top,f=!0;n.on("mousemove.drag",function(e){var n=e.pageX-u,i=e.pageY-a,o={};t.x&&(o.left=n),t.y&&(o.top=i),f&&(s.trigger("dragStart"),f=!1),t.drag&&s.css(o),s.trigger("drag",[i,n]),r=s}),i.preventDefault()}else try{r&&r.trigger("dragEnd")}finally{n.off("mousemove.drag"),r=null}}),this.data("drag",!0)},e.expr[":"].range=function(t){var n=t.getAttribute("type");return n&&n=="range"||!!e(t).filter("input").data("rangeinput")},e.fn.rangeinput=function(n){if(this.data("rangeinput"))return this;n=e.extend(!0,{},t.conf,n);var r;return this.each(function(){var t=new u(e(this),e.extend(!0,{},n)),i=t.getInput().data("rangeinput",t);r=r?r.add(i):i}),r?r:this}}),timely.define("external_libs/locales/bootstrap-datepicker.bg",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.bg={days:["Неделя","Понеделник","Вторник","Сряда","Четвъртък","Петък","Събота","Неделя"],daysShort:["Нед","Пон","Вто","Сря","Чет","Пет","Съб","Нед"],daysMin:["Н","П","В","С","Ч","П","С","Н"],months:["Януари","Февруари","Март","Април","Май","Юни","Юли","Август","Септември","Октомври","Ноември","Декември"],monthsShort:["Ян","Фев","Мар","Апр","Май","Юни","Юли","Авг","Сеп","Окт","Ное","Дек"],today:"днес"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.br",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.br={days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Domingo"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb","Dom"],daysMin:["Do","Se","Te","Qu","Qu","Se","Sa","Do"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"]}}}}),timely.define("external_libs/locales/bootstrap-datepicker.cs",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.cs={days:["Neděle","Pondělí","Úterý","Středa","Čtvrtek","Pátek","Sobota","Neděle"],daysShort:["Ned","Pon","Úte","Stř","Čtv","Pát","Sob","Ned"],daysMin:["Ne","Po","Út","St","Čt","Pá","So","Ne"],months:["Leden","Únor","Březen","Duben","Květen","Červen","Červenec","Srpen","Září","Říjen","Listopad","Prosinec"],monthsShort:["Led","Úno","Bře","Dub","Kvě","Čer","Čnc","Srp","Zář","Říj","Lis","Pro"],today:"Dnes"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.da",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.da={days:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Søndag"],daysShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør","Søn"],daysMin:["Sø","Ma","Ti","On","To","Fr","Lø","Sø"],months:["Januar","Februar","Marts","April","Maj","Juni","Juli","August","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"I Dag",clear:"Nulstil"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.de",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.de={days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","Sonntag"],daysShort:["Son","Mon","Die","Mit","Don","Fre","Sam","Son"],daysMin:["So","Mo","Di","Mi","Do","Fr","Sa","So"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",clear:"Löschen",weekStart:1,format:"dd.mm.yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.es",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.es={days:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado","Domingo"],daysShort:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb","Dom"],daysMin:["Do","Lu","Ma","Mi","Ju","Vi","Sa","Do"],months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],monthsShort:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],today:"Hoy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.fi",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.fi={days:["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai","sunnuntai"],daysShort:["sun","maa","tii","kes","tor","per","lau","sun"],daysMin:["su","ma","ti","ke","to","pe","la","su"],months:["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu"],monthsShort:["tam","hel","maa","huh","tou","kes","hei","elo","syy","lok","mar","jou"],today:"tänään",weekStart:1,format:"d.m.yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.fr",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.fr={days:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi","Dimanche"],daysShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam","Dim"],daysMin:["D","L","Ma","Me","J","V","S","D"],months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],monthsShort:["Jan","Fév","Mar","Avr","Mai","Jui","Jul","Aou","Sep","Oct","Nov","Déc"],today:"Aujourd'hui",clear:"Effacer",weekStart:1,format:"dd/mm/yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.id",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.id={days:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu","Minggu"],daysShort:["Mgu","Sen","Sel","Rab","Kam","Jum","Sab","Mgu"],daysMin:["Mg","Sn","Sl","Ra","Ka","Ju","Sa","Mg"],months:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Ags","Sep","Okt","Nov","Des"],today:"Hari Ini",clear:"Kosongkan"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.is",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.is={days:["Sunnudagur","Mánudagur","Þriðjudagur","Miðvikudagur","Fimmtudagur","Föstudagur","Laugardagur","Sunnudagur"],daysShort:["Sun","Mán","Þri","Mið","Fim","Fös","Lau","Sun"],daysMin:["Su","Má","Þr","Mi","Fi","Fö","La","Su"],months:["Janúar","Febrúar","Mars","Apríl","Maí","Júní","Júlí","Ágúst","September","Október","Nóvember","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Maí","Jún","Júl","Ágú","Sep","Okt","Nóv","Des"],today:"Í Dag"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.it",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.it={days:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato","Domenica"],daysShort:["Dom","Lun","Mar","Mer","Gio","Ven","Sab","Dom"],daysMin:["Do","Lu","Ma","Me","Gi","Ve","Sa","Do"],months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],monthsShort:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],today:"Oggi",clear:"Cancella",weekStart:1,format:"dd/mm/yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.ja",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.ja={days:["日曜","月曜","火曜","水曜","木曜","金曜","土曜","日曜"],daysShort:["日","月","火","水","木","金","土","日"],daysMin:["日","月","火","水","木","金","土","日"],months:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],monthsShort:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],today:"今日",format:"yyyy/mm/dd"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.kr",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.kr={days:["일요일","월요일","화요일","수요일","목요일","금요일","토요일","일요일"],daysShort:["일","월","화","수","목","금","토","일"],daysMin:["일","월","화","수","목","금","토","일"],months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],monthsShort:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]}}}}),timely.define("external_libs/locales/bootstrap-datepicker.lt",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.lt={days:["Sekmadienis","Pirmadienis","Antradienis","Trečiadienis","Ketvirtadienis","Penktadienis","Šeštadienis","Sekmadienis"],daysShort:["S","Pr","A","T","K","Pn","Š","S"],daysMin:["Sk","Pr","An","Tr","Ke","Pn","Št","Sk"],months:["Sausis","Vasaris","Kovas","Balandis","Gegužė","Birželis","Liepa","Rugpjūtis","Rugsėjis","Spalis","Lapkritis","Gruodis"],monthsShort:["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rugp","Rugs","Spa","Lap","Gru"],today:"Šiandien",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.lv",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.lv={days:["Svētdiena","Pirmdiena","Otrdiena","Trešdiena","Ceturtdiena","Piektdiena","Sestdiena","Svētdiena"],daysShort:["Sv","P","O","T","C","Pk","S","Sv"],daysMin:["Sv","Pr","Ot","Tr","Ce","Pk","Se","Sv"],months:["Janvāris","Februāris","Marts","Aprīlis","Maijs","Jūnijs","Jūlijs","Augusts","Septembris","Oktobris","Novembris","Decembris"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jūn","Jūl","Aug","Sep","Okt","Nov","Dec"],today:"Šodien",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.ms",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.ms={days:["Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu","Ahad"],daysShort:["Aha","Isn","Sel","Rab","Kha","Jum","Sab","Aha"],daysMin:["Ah","Is","Se","Ra","Kh","Ju","Sa","Ah"],months:["Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember"],monthsShort:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Ogo","Sep","Okt","Nov","Dis"],today:"Hari Ini"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.nb",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.nb={days:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Søndag"],daysShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør","Søn"],daysMin:["Sø","Ma","Ti","On","To","Fr","Lø","Sø"],months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],today:"I Dag"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.nl",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.nl={days:["Zondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrijdag","Zaterdag","Zondag"],daysShort:["Zo","Ma","Di","Wo","Do","Vr","Za","Zo"],daysMin:["Zo","Ma","Di","Wo","Do","Vr","Za","Zo"],months:["Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mrt","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"Vandaag"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.pl",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.pl={days:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota","Niedziela"],daysShort:["Nie","Pn","Wt","Śr","Czw","Pt","So","Nie"],daysMin:["N","Pn","Wt","Śr","Cz","Pt","So","N"],months:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"],monthsShort:["Sty","Lu","Mar","Kw","Maj","Cze","Lip","Sie","Wrz","Pa","Lis","Gru"],today:"Dzisiaj",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.pt-BR",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates["pt-BR"]={days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Domingo"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb","Dom"],daysMin:["Do","Se","Te","Qu","Qu","Se","Sa","Do"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],today:"Hoje",clear:"Limpar"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.pt",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.pt={days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Domingo"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb","Dom"],daysMin:["Do","Se","Te","Qu","Qu","Se","Sa","Do"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],today:"Hoje",clear:"Limpar"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.ru",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.ru={days:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота","Воскресенье"],daysShort:["Вск","Пнд","Втр","Срд","Чтв","Птн","Суб","Вск"],daysMin:["Вс","Пн","Вт","Ср","Чт","Пт","Сб","Вс"],months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],monthsShort:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],today:"Сегодня",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.sl",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.sl={days:["Nedelja","Ponedeljek","Torek","Sreda","Četrtek","Petek","Sobota","Nedelja"],daysShort:["Ned","Pon","Tor","Sre","Čet","Pet","Sob","Ned"],daysMin:["Ne","Po","To","Sr","Če","Pe","So","Ne"],months:["Januar","Februar","Marec","April","Maj","Junij","Julij","Avgust","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Avg","Sep","Okt","Nov","Dec"],today:"Danes"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.sv",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.sv={days:["Söndag","Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag","Söndag"],daysShort:["Sön","Mån","Tis","Ons","Tor","Fre","Lör","Sön"],daysMin:["Sö","Må","Ti","On","To","Fr","Lö","Sö"],months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"I Dag",format:"yyyy-mm-dd",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.th",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.th={days:["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัส","ศุกร์","เสาร์","อาทิตย์"],daysShort:["อา","จ","อ","พ","พฤ","ศ","ส","อา"],daysMin:["อา","จ","อ","พ","พฤ","ศ","ส","อา"],months:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],monthsShort:["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."],today:"วันนี้"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.tr",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.tr={days:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi","Pazar"],daysShort:["Pz","Pzt","Sal","Çrş","Prş","Cu","Cts","Pz"],daysMin:["Pz","Pzt","Sa","Çr","Pr","Cu","Ct","Pz"],months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],monthsShort:["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"],today:"Bugün",format:"dd.mm.yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.zh-CN",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates["zh-CN"]={days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日"],daysShort:["周日","周一","周二","周三","周四","周五","周六","周日"],daysMin:["日","一","二","三","四","五","六","日"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今日",format:"yyyy年mm月dd日",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.zh-TW",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates["zh-TW"]={days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日"],daysShort:["週日","週一","週二","週三","週四","週五","週六","週日"],daysMin:["日","一","二","三","四","五","六","日"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今天",format:"yyyy年mm月dd日",weekStart:1}}}}),timely.define("external_libs/bootstrap_datepicker",["jquery_timely","ai1ec_config","external_libs/locales/bootstrap-datepicker.bg","external_libs/locales/bootstrap-datepicker.br","external_libs/locales/bootstrap-datepicker.cs","external_libs/locales/bootstrap-datepicker.da","external_libs/locales/bootstrap-datepicker.de","external_libs/locales/bootstrap-datepicker.es","external_libs/locales/bootstrap-datepicker.fi","external_libs/locales/bootstrap-datepicker.fr","external_libs/locales/bootstrap-datepicker.id","external_libs/locales/bootstrap-datepicker.is","external_libs/locales/bootstrap-datepicker.it","external_libs/locales/bootstrap-datepicker.ja","external_libs/locales/bootstrap-datepicker.kr","external_libs/locales/bootstrap-datepicker.lt","external_libs/locales/bootstrap-datepicker.lv","external_libs/locales/bootstrap-datepicker.ms","external_libs/locales/bootstrap-datepicker.nb","external_libs/locales/bootstrap-datepicker.nl","external_libs/locales/bootstrap-datepicker.pl","external_libs/locales/bootstrap-datepicker.pt-BR","external_libs/locales/bootstrap-datepicker.pt","external_libs/locales/bootstrap-datepicker.ru","external_libs/locales/bootstrap-datepicker.sl","external_libs/locales/bootstrap-datepicker.sv","external_libs/locales/bootstrap-datepicker.th","external_libs/locales/bootstrap-datepicker.tr","external_libs/locales/bootstrap-datepicker.zh-CN","external_libs/locales/bootstrap-datepicker.zh-TW"],function(e,t){function r(){return new Date(Date.UTC.apply(Date,arguments))}function i(){var e=new Date;return r(e.getFullYear(),e.getMonth(),e.getDate())}function s(e){return function(){return this[e].apply(this,arguments)}}function f(t,n){var r=e(t).data(),i={},s,o=new RegExp("^"+n.toLowerCase()+"([A-Z])"),n=new RegExp("^"+n.toLowerCase());for(var u in r)n.test(u)&&(s=u.replace(o,function(e,t){return t.toLowerCase()}),i[s]=r[u]);return i}function l(t){var n={};if(!d[t]){t=t.split("-")[0];if(!d[t])return}var r=d[t];return e.each(p,function(e,t){t in r&&(n[t]=r[t])}),n}var n=e(window),o=function(){var t={get:function(e){return this.slice(e)[0]},contains:function(e){var t=e&&e.valueOf();for(var n=0,r=this.length;n<r;n++)if(this[n].valueOf()===t)return n;return-1},remove:function(e){this.splice(e,1)},replace:function(t){if(!t)return;e.isArray(t)||(t=[t]),this.clear(),this.push.apply(this,t)},clear:function(){this.splice(0)},copy:function(){var e=new o;return e.replace(this),e}};return function(){var n=[];return n.push.apply(n,arguments),e.extend(n,t),n}}(),u=function(t,n){this.dates=new o,this.viewDate=i(),this.focusDate=null,this._process_options(n),this.element=e(t),this.isInline=!1,this.isInput=this.element.is("input"),this.component=this.element.is(".ai1ec-date")?this.element.find(".ai1ec-input-group, .ai1ec-input-group-addon, .ai1ec-btn"):!1,this.hasInput=this.component&&this.element.find("input").length,this.component&&this.component.length===0&&(this.component=!1),this.picker=e(v.template),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("ai1ec-datepicker-inline").appendTo(this.element):this.picker.addClass("ai1ec-datepicker-dropdown ai1ec-dropdown-menu"),this.o.rtl&&this.picker.addClass("ai1ec-datepicker-rtl"),this.viewMode=this.o.startView,this.o.calendarWeeks&&this.picker.find("tfoot th.ai1ec-today").attr("colspan",function(e,t){return parseInt(t)+1}),this._allow_update=!1,this.setStartDate(this._o.startDate),this.setEndDate(this._o.endDate),this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled),this.fillDow(),this.fillMonths(),this._allow_update=!0,this.update(),this.showMode(),this.isInline&&this.show()};u.prototype={constructor:u,_process_options:function(n){this._o=e.extend({},this._o,n);var r=this.o=e.extend({},this._o),i=r.language;d[i]||(i=i.split("-")[0],d[i]||(i=t.language,d[i]||(i=h.language))),r.language=i;switch(r.startView){case 2:case"decade":r.startView=2;break;case 1:case"year":r.startView=1;break;default:r.startView=0}switch(r.minViewMode){case 1:case"months":r.minViewMode=1;break;case 2:case"years":r.minViewMode=2;break;default:r.minViewMode=0}r.startView=Math.max(r.startView,r.minViewMode),r.multidate!==!0&&(r.multidate=Number(r.multidate)||!1,r.multidate!==!1?r.multidate=Math.max(0,r.multidate):r.multidate=1),r.multidateSeparator=String(r.multidateSeparator),r.weekStart%=7,r.weekEnd=(r.weekStart+6)%7;var s=v.parseFormat(r.format);r.startDate!==-Infinity&&(r.startDate?r.startDate instanceof Date?r.startDate=this._local_to_utc(this._zero_time(r.startDate)):r.startDate=v.parseDate(r.startDate,s,r.language):r.startDate=-Infinity),r.endDate!==Infinity&&(r.endDate?r.endDate instanceof Date?r.endDate=this._local_to_utc(this._zero_time(r.endDate)):r.endDate=v.parseDate(r.endDate,s,r.language):r.endDate=Infinity),r.daysOfWeekDisabled=r.daysOfWeekDisabled||[],e.isArray(r.daysOfWeekDisabled)||(r.daysOfWeekDisabled=r.daysOfWeekDisabled.split(/[,\s]*/)),r.daysOfWeekDisabled=e.map(r.daysOfWeekDisabled,function(e){return parseInt(e,10)});var o=String(r.orientation).toLowerCase().split(/\s+/g),u=r.orientation.toLowerCase();o=e.grep(o,function(e){return/^auto|left|right|top|bottom$/.test(e)}),r.orientation={x:"auto",y:"auto"};if(!!u&&u!=="auto")if(o.length===1)switch(o[0]){case"top":case"bottom":r.orientation.y=o[0];break;case"left":case"right":r.orientation.x=o[0]}else u=e.grep(o,function(e){return/^left|right$/.test(e)}),r.orientation.x=u[0]||"auto",u=e.grep(o,function(e){return/^top|bottom$/.test(e)}),r.orientation.y=u[0]||"auto"},_events:[],_secondaryEvents:[],_applyEvents:function(e){for(var t=0,n,r,i;t<e.length;t++)n=e[t][0],e[t].length==2?(r=undefined,i=e[t][1]):e[t].length==3&&(r=e[t][1],i=e[t][2]),n.on(i,r)},_unapplyEvents:function(e){for(var t=0,n,r,i;t<e.length;t++)n=e[t][0],e[t].length==2?(i=undefined,r=e[t][1]):e[t].length==3&&(i=e[t][1],r=e[t][2]),n.off(r,i)},_buildEvents:function(){this.isInput?this._events=[[this.element,{focus:e.proxy(this.show,this),keyup:e.proxy(function(t){e.inArray(t.keyCode,[27,37,39,38,40,32,13,9])===-1&&this.update()},this),keydown:e.proxy(this.keydown,this)}]]:this.component&&this.hasInput?this._events=[[this.element.find("input"),{focus:e.proxy(this.show,this),keyup:e.proxy(function(t){e.inArray(t.keyCode,[27,37,39,38,40,32,13,9])===-1&&this.update()},this),keydown:e.proxy(this.keydown,this)}],[this.component,{click:e.proxy(this.show,this)}]]:this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:e.proxy(this.show,this)}]],this._events.push([this.element,"*",{blur:e.proxy(function(e){this._focused_from=e.target},this)}],[this.element,{blur:e.proxy(function(e){this._focused_from=e.target},this)}]),this._secondaryEvents=[[this.picker,{click:e.proxy(this.click,this)}],[e(window),{resize:e.proxy(this.place,this)}],[e(document),{"mousedown touchstart":e.proxy(function(e){this.element.is(e.target)||this.element.find(e.target).length||this.picker.is(e.target)||this.picker.find(e.target).length||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(t,n){var r=n||this.dates.get(-1),i=this._utc_to_local(r);this.element.trigger({type:t,date:i,dates:e.map(this.dates,this._utc_to_local),format:e.proxy(function(e,t){arguments.length===0?(e=this.dates.length-1,t=this.o.format):typeof e=="string"&&(t=e,e=this.dates.length-1),t=t||this.o.format;var n=this.dates.get(e);return v.formatDate(n,t,this.o.language)},this)})},show:function(e){this.isInline||this.picker.appendTo("body"),this.picker.show(),this.height=this.component?this.component.outerHeight():this.element.outerHeight(),this.place(),this._attachSecondaryEvents(),this._trigger("show")},hide:function(){if(this.isInline)return;if(!this.picker.is(":visible"))return;this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.viewMode=this.o.startView,this.showMode(),this.o.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this._trigger("hide")},remove:function(){this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date},_utc_to_local:function(e){return e&&new Date(e.getTime()+e.getTimezoneOffset()*6e4)},_local_to_utc:function(e){return e&&new Date(e.getTime()-e.getTimezoneOffset()*6e4)},_zero_time:function(e){return e&&new Date(e.getFullYear(),e.getMonth(),e.getDate())},_zero_utc_time:function(e){return e&&new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))},getDates:function(){return e.map(this.dates,this._utc_to_local)},getUTCDates:function(){return e.map(this.dates,function(e){return new Date(e)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){return new Date(this.dates.get(-1))},setDates:function(){this.update.apply(this,arguments),this._trigger("changeDate"),this.setValue()},setUTCDates:function(){this.update.apply(this,e.map(arguments,this._utc_to_local)),this._trigger("changeDate"),this.setValue()},setDate:s("setDates"),setUTCDate:s("setUTCDates"),setValue:function(){var e=this.getFormattedDate();this.isInput?this.element.val(e).change():this.component&&this.element.find("input").val(e).change()},getFormattedDate:function(t){t===undefined&&(t=this.o.format);var n=this.o.language;return e.map(this.dates,function(e){return v.formatDate(e,t,n)}).join(this.o.multidateSeparator)},setStartDate:function(e){this._process_options({startDate:e}),this.update(),this.updateNavArrows()},setEndDate:function(e){this._process_options({endDate:e}),this.update(),this.updateNavArrows()},setDaysOfWeekDisabled:function(e){this._process_options({daysOfWeekDisabled:e}),this.update(),this.updateNavArrows()},place:function(){if(this.isInline)return;var t=this.picker.outerWidth(),r=this.picker.outerHeight(),i=10,s=n.width(),o=n.height(),u=n.scrollTop(),a=parseInt(this.element.parents().filter(function(){return e(this).css("z-index")!="auto"}).first().css("z-index"))+10,f=this.component?this.component.parent().offset():this.element.offset(),l=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),c=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),h=f.left,p=f.top;this.picker.removeClass("ai1ec-datepicker-orient-top ai1ec-datepicker-orient-bottom ai1ec-datepicker-orient-right ai1ec-datepicker-orient-left"),this.o.orientation.x!=="auto"?(this.picker.addClass("ai1ec-datepicker-orient-"+this.o.orientation.x),this.o.orientation.x==="right"&&(h-=t-c)):(this.picker.addClass("ai1ec-datepicker-orient-left"),f.left<0?h-=f.left-i:f.left+t>s&&(h=s-t-i));var d=this.o.orientation.y,v,m;d==="auto"&&(v=-u+f.top-r,m=u+o-(f.top+l+r),Math.max(v,m)===m?d="top":d="bottom"),this.picker.addClass("ai1ec-datepicker-orient-"+d),d==="top"?p+=l:p-=r+parseInt(this.picker.css("padding-top")),this.picker.css({top:p,left:h,zIndex:a})},_allow_update:!0,update:function(){if(!this._allow_update)return;var t=this.dates.copy(),n=[],r=!1;arguments.length?(e.each(arguments,e.proxy(function(e,t){t instanceof Date&&(t=this._local_to_utc(t)),n.push(t)},this)),r=!0):(n=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),n&&this.o.multidate?n=n.split(this.o.multidateSeparator):n=[n],delete this.element.data().date),n=e.map(n,e.proxy(function(e){return v.parseDate(e,this.o.format,this.o.language)},this)),n=e.grep(n,e.proxy(function(e){return e<this.o.startDate||e>this.o.endDate||!e},this),!0),this.dates.replace(n),this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate&&(this.viewDate=new Date(this.o.endDate)),r?this.setValue():n.length&&String(t)!==String(this.dates)&&this._trigger("changeDate"),!this.dates.length&&t.length&&this._trigger("clearDate"),this.fill()},fillDow:function(){var e=this.o.weekStart,t="<tr>";if(this.o.calendarWeeks){var n='<th class="ai1ec-cw">&nbsp;</th>';t+=n,this.picker.find(".ai1ec-datepicker-days thead tr:first-child").prepend(n)}while(e<this.o.weekStart+7)t+='<th class="ai1ec-dow">'+d[this.o.language].daysMin[e++%7]+"</th>";t+="</tr>",this.picker.find(".ai1ec-datepicker-days thead").append(t)},fillMonths:function(){var e="",t=0;while(t<12)e+='<span class="ai1ec-month">'+d[this.o.language].monthsShort[t++]+"</span>";this.picker.find(".ai1ec-datepicker-months td").html(e)},setRange:function(t){!t||!t.length?delete this.range:this.range=e.map(t,function(e){return e.valueOf()}),this.fill()},getClassNames:function(t){var n=[],r=this.viewDate.getUTCFullYear(),i=this.viewDate.getUTCMonth(),s=new Date;return t.getUTCFullYear()<r||t.getUTCFullYear()==r&&t.getUTCMonth()<i?n.push("ai1ec-old"):(t.getUTCFullYear()>r||t.getUTCFullYear()==r&&t.getUTCMonth()>i)&&n.push("ai1ec-new"),this.focusDate&&t.valueOf()===this.focusDate.valueOf()&&n.push("ai1ec-focused"),this.o.todayHighlight&&t.getUTCFullYear()==s.getFullYear()&&t.getUTCMonth()==s.getMonth()&&t.getUTCDate()==s.getDate()&&n.push("ai1ec-today"),this.dates.contains(t)!==-1&&n.push("ai1ec-active"),(t.valueOf()<this.o.startDate||t.valueOf()>this.o.endDate||e.inArray(t.getUTCDay(),this.o.daysOfWeekDisabled)!==-1)&&n.push("ai1ec-disabled"),this.range&&(t>this.range[0]&&t<this.range[this.range.length-1]&&n.push("ai1ec-range"),e.inArray(t.valueOf(),this.range)!=-1&&n.push("ai1ec-selected")),n},fill:function(){var t=new Date(this.viewDate),n=t.getUTCFullYear(),i=t.getUTCMonth(),s=this.o.startDate!==-Infinity?this.o.startDate.getUTCFullYear():-Infinity,o=this.o.startDate!==-Infinity?this.o.startDate.getUTCMonth():-Infinity,u=this.o.endDate!==Infinity?this.o.endDate.getUTCFullYear():Infinity,a=this.o.endDate!==Infinity?this.o.endDate.getUTCMonth():Infinity,f,l;this.picker.find(".ai1ec-datepicker-days thead th.ai1ec-datepicker-switch").text(d[this.o.language].months[i]+" "+n),this.picker.find("tfoot th.ai1ec-today").text(d[this.o.language].today).toggle(this.o.todayBtn!==!1),this.picker.find("tfoot th.ai1ec-clear").text(d[this.o.language].clear).toggle(this.o.clearBtn!==!1),this.updateNavArrows(),this.fillMonths();var c=r(n,i-1,28),h=v.getDaysInMonth(c.getUTCFullYear(),c.getUTCMonth());c.setUTCDate(h),c.setUTCDate(h-(c.getUTCDay()-this.o.weekStart+7)%7);var p=new Date(c);p.setUTCDate(p.getUTCDate()+42),p=p.valueOf();var m=[],g;while(c.valueOf()<p){if(c.getUTCDay()==this.o.weekStart){m.push("<tr>");if(this.o.calendarWeeks){var y=new Date(+c+(this.o.weekStart-c.getUTCDay()-7)%7*864e5),b=new Date(+y+(11-y.getUTCDay())%7*864e5),w=new Date(+(w=r(b.getUTCFullYear(),0,1))+(11-w.getUTCDay())%7*864e5),E=(b-w)/864e5/7+1;m.push('<td class="ai1ec-cw">'+E+"</td>")}}g=this.getClassNames(c),g.push("ai1ec-day");if(this.o.beforeShowDay!==e.noop){var S=this.o.beforeShowDay(this._utc_to_local(c));S===undefined?S={}:typeof S=="boolean"?S={enabled:S}:typeof S=="string"&&(S={classes:S}),S.enabled===!1&&g.push("ai1ec-disabled"),S.classes&&(g=g.concat(S.classes.split(/\s+/))),S.tooltip&&(f=S.tooltip)}g=e.unique(g),m.push('<td class="'+g.join(" ")+'"'+(f?' title="'+f+'"':"")+">"+c.getUTCDate()+"</td>"),c.getUTCDay()==this.o.weekEnd&&m.push("</tr>"),c.setUTCDate(c.getUTCDate()+1)}this.picker.find(".ai1ec-datepicker-days tbody").empty().append(m.join(""));var x=this.picker.find(".ai1ec-datepicker-months").find("th:eq(1)").text(n).end().find("span").removeClass("ai1ec-active");e.each(this.dates,function(e,t){t.getUTCFullYear()==n&&x.eq(t.getUTCMonth()).addClass("ai1ec-active")}),(n<s||n>u)&&x.addClass("ai1ec-disabled"),n==s&&x.slice(0,o).addClass("ai1ec-disabled"),n==u&&x.slice(a+1).addClass("ai1ec-disabled"),m="",n=parseInt(n/10,10)*10;var T=this.picker.find(".ai1ec-datepicker-years").find("th:eq(1)").text(n+"-"+(n+9)).end().find("td");n-=1;var N=e.map(this.dates,function(e){return e.getUTCFullYear()}),C;for(var k=-1;k<11;k++)C=["ai1ec-year"],k===-1?C.push("ai1ec-old"):k===10&&C.push("ai1ec-new"),e.inArray(n,N)!==-1&&C.push("ai1ec-active"),(n<s||n>u)&&C.push("ai1ec-disabled"),m+='<span class="'+C.join(" ")+'">'+n+"</span>",n+=1;T.html(m)},updateNavArrows:function(){if(!this._allow_update)return;var e=new Date(this.viewDate),t=e.getUTCFullYear(),n=e.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-Infinity&&t<=this.o.startDate.getUTCFullYear()&&n<=this.o.startDate.getUTCMonth()?this.picker.find(".ai1ec-prev").css({visibility:"hidden"}):this.picker.find(".ai1ec-prev").css({visibility:"visible"}),this.o.endDate!==Infinity&&t>=this.o.endDate.getUTCFullYear()&&n>=this.o.endDate.getUTCMonth()?this.picker.find(".ai1ec-next").css({visibility:"hidden"}):this.picker.find(".ai1ec-next").css({visibility:"visible"});break;case 1:case 2:this.o.startDate!==-Infinity&&t<=this.o.startDate.getUTCFullYear()?this.picker.find(".ai1ec-prev").css({visibility:"hidden"}):this.picker.find(".ai1ec-prev").css({visibility:"visible"}),this.o.endDate!==Infinity&&t>=this.o.endDate.getUTCFullYear()?this.picker.find(".ai1ec-next").css({visibility:"hidden"}):this.picker.find(".ai1ec-next").css({visibility:"visible"})}},click:function(t){t.preventDefault();var n=e(t.target).closest("span, td, th"),i,s,o;if(n.length==1)switch(n[0].nodeName.toLowerCase()){case"th":switch(n[0].className){case"ai1ec-datepicker-switch":this.showMode(1);break;case"ai1ec-prev":case"ai1ec-next":var u=v.modes[this.viewMode].navStep*(n[0].className=="ai1ec-prev"?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,u),this._trigger("changeMonth",this.viewDate);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,u),this.viewMode===1&&this._trigger("changeYear",this.viewDate)}this.fill();break;case"ai1ec-today":var a=new Date;a=r(a.getFullYear(),a.getMonth(),a.getDate(),0,0,0),this.showMode(-2);var f=this.o.todayBtn=="linked"?null:"view";this._setDate(a,f);break;case"ai1ec-clear":var l;this.isInput?l=this.element:this.component&&(l=this.element.find("input")),l&&l.val("").change(),this.update(),this._trigger("changeDate"),this.o.autoclose&&this.hide()}break;case"span":n.is(".ai1ec-disabled")||(this.viewDate.setUTCDate(1),n.is(".ai1ec-month")?(o=1,s=n.parent().find("span").index(n),i=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(s),this._trigger("changeMonth",this.viewDate),this.o.minViewMode===1&&this._setDate(r(i,s,o))):(o=1,s=0,i=parseInt(n.text(),10)||0,this.viewDate.setUTCFullYear(i),this._trigger("changeYear",this.viewDate),this.o.minViewMode===2&&this._setDate(r(i,s,o))),this.showMode(-1),this.fill());break;case"td":n.is(".ai1ec-day")&&!n.is(".ai1ec-disabled")&&(o=parseInt(n.text(),10)||1,i=this.viewDate.getUTCFullYear(),s=this.viewDate.getUTCMonth(),n.is(".ai1ec-old")?s===0?(s=11,i-=1):s-=1:n.is(".ai1ec-new")&&(s==11?(s=0,i+=1):s+=1),this._setDate(r(i,s,o)))}this.picker.is(":visible")&&this._focused_from&&e(this._focused_from).focus(),delete this._focused_from},_toggle_multidate:function(e){var t=this.dates.contains(e);e?t!==-1?this.dates.remove(t):this.dates.push(e):this.dates.clear();if(typeof this.o.multidate=="number")while(this.dates.length>this.o.multidate)this.dates.remove(0)},_setDate:function(e,t){(!t||t=="date")&&this._toggle_multidate(e&&new Date(e));if(!t||t=="view")this.viewDate=e&&new Date(e);this.fill(),this.setValue(),this._trigger("changeDate");var n;this.isInput?n=this.element:this.component&&(n=this.element.find("input")),n&&n.change(),this.o.autoclose&&(!t||t=="date")&&this.hide()},moveMonth:function(e,t){if(!e)return undefined;if(!t)return e;var n=new Date(e.valueOf()),r=n.getUTCDate(),i=n.getUTCMonth(),s=Math.abs(t),o,u;t=t>0?1:-1;if(s==1){u=t==-1?function(){return n.getUTCMonth()==i}:function(){return n.getUTCMonth()!=o},o=i+t,n.setUTCMonth(o);if(o<0||o>11)o=(o+12)%12}else{for(var a=0;a<s;a++)n=this.moveMonth(n,t);o=n.getUTCMonth(),n.setUTCDate(r),u=function(){return o!=n.getUTCMonth()}}while(u())n.setUTCDate(--r),n.setUTCMonth(o);return n},moveYear:function(e,t){return this.moveMonth(e,t*12)},dateWithinRange:function(e){return e>=this.o.startDate&&e<=this.o.endDate},keydown:function(e){if(this.picker.is(":not(:visible)")){e.keyCode==27&&this.show();return}var t=!1,n,r,s,o=this.focusDate||this.viewDate;switch(e.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),e.preventDefault();break;case 37:case 39:if(!this.o.keyboardNavigation)break;n=e.keyCode==37?-1:1,e.ctrlKey?(r=this.moveYear(this.dates.get(-1)||i(),n),s=this.moveYear(o,n),this._trigger("changeYear",this.viewDate)):e.shiftKey?(r=this.moveMonth(this.dates.get(-1)||i(),n),s=this.moveMonth(o,n),this._trigger("changeMonth",this.viewDate)):(r=new Date(this.dates.get(-1)||i()),r.setUTCDate(r.getUTCDate()+n),s=new Date(o),s.setUTCDate(o.getUTCDate()+n)),this.dateWithinRange(r)&&(this.focusDate=this.viewDate=s,this.setValue(),this.fill(),e.preventDefault());break;case 38:case 40:if(!this.o.keyboardNavigation)break;n=e.keyCode==38?-1:1,e.ctrlKey?(r=this.moveYear(this.dates.get(-1)||i(),n),s=this.moveYear(o,n),this._trigger("changeYear",this.viewDate)):e.shiftKey?(r=this.moveMonth(this.dates.get(-1)||i(),n),s=this.moveMonth(o,n),this._trigger("changeMonth",this.viewDate)):(r=new Date(this.dates.get(-1)||i()),r.setUTCDate(r.getUTCDate()+n*7),s=new Date(o),s.setUTCDate(o.getUTCDate()+n*7)),this.dateWithinRange(r)&&(this.focusDate=this.viewDate=s,this.setValue(),this.fill(),e.preventDefault());break;case 32:break;case 13:o=this.focusDate||this.dates.get(-1)||this.viewDate,this._toggle_multidate(o),t=!0,this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(e.preventDefault(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}if(t){this.dates.length?this._trigger("changeDate"):this._trigger("clearDate");var u;this.isInput?u=this.element:this.component&&(u=this.element.find("input")),u&&u.change()}},showMode:function(e){e&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(2,this.viewMode+e))),this.picker.find(">div").hide().filter(".ai1ec-datepicker-"+v.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()}};var a=function(t,n){this.element=e(t),this.inputs=e.map(n.inputs,function(e){return e.jquery?e[0]:e}),delete n.inputs,e(this.inputs).datepicker(n).bind("changeDate",e.proxy(this.dateUpdated,this)),this.pickers=e.map(this.inputs,function(t){return e(t).data("datepicker")}),this.updateDates()};a.prototype={updateDates:function(){this.dates=e.map(this.pickers,function(e){return e.getUTCDate()}),this.updateRanges()},updateRanges:function(){var t=e.map(this.dates,function(e){return e.valueOf()});e.each(this.pickers,function(e,n){n.setRange(t)})},dateUpdated:function(t){if(this.updating)return;this.updating=!0;var n=e(t.target).data("datepicker"),r=n.getUTCDate(),i=e.inArray(t.target,this.inputs),s=this.inputs.length;if(i==-1)return;e.each(this.pickers,function(e,t){t.getUTCDate()||t.setUTCDate(r)});if(r<this.dates[i])while(i>=0&&r<this.dates[i])this.pickers[i--].setUTCDate(r);else if(r>this.dates[i])while(i<s&&r>this.dates[i])this.pickers[i++].setUTCDate(r);this.updateDates(),delete this.updating},remove:function(){e.map(this.pickers,function(e){e.remove()}),delete this.element.data().datepicker}};var c=e.fn.datepicker;e.fn.datepicker=function(t){var n=Array.apply(null,arguments);n.shift();var r;return this.each(function(){var i=e(this),s=i.data("datepicker"),o=typeof t=="object"&&t;if(!s){var c=f(this,"date"),p=e.extend({},h,c,o),d=l(p.language),v=e.extend({},h,d,c,o);if(i.is(".ai1ec-input-daterange")||v.inputs){var m={inputs:v.inputs||i.find("input").toArray()};i.data("datepicker",s=new a(this,e.extend(v,m)))}else i.data("datepicker",s=new u(this,v))}if(typeof t=="string"&&typeof s[t]=="function"){r=s[t].apply(s,n);if(r!==undefined)return!1}}),r!==undefined?r:this};var h=e.fn.datepicker.defaults={autoclose:!1,beforeShowDay:e.noop,calendarWeeks:!1,clearBtn:!1,daysOfWeekDisabled:[],endDate:Infinity,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-Infinity,startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0},p=e.fn.datepicker.locale_opts=["format","rtl","weekStart"];e.fn.datepicker.Constructor=u;var d=e.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"}},v={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(e){return e%4===0&&e%100!==0||e%400===0},getDaysInMonth:function(e,t){return[31,v.isLeapYear(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(e){var t=e.replace(this.validParts,"\0").split("\0"),n=e.match(this.validParts);if(!t||!t.length||!n||n.length===0)throw new Error("Invalid date format.");return{separators:t,parts:n}},parseDate:function(t,n,i){if(!t)return undefined;if(t instanceof Date)return t;typeof n=="string"&&(n=v.parseFormat(n));if(/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(t)){var s=/([\-+]\d+)([dmwy])/,o=t.match(/([\-+]\d+)([dmwy])/g),a,f;t=new Date;for(var l=0;l<o.length;l++){a=s.exec(o[l]),f=parseInt(a[1]);switch(a[2]){case"d":t.setUTCDate(t.getUTCDate()+f);break;case"m":t=u.prototype.moveMonth.call(u.prototype,t,f);break;case"w":t.setUTCDate(t.getUTCDate()+f*7);break;case"y":t=u.prototype.moveYear.call(u.prototype,t,f)}}return r(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),0,0,0)}var o=t&&t.match(this.nonpunctuation)||[],t=new Date,c={},h=["yyyy","yy","M","MM","m","mm","d","dd"],p={yyyy:function(e,t){return e.setUTCFullYear(t)},yy:function(e,t){return e.setUTCFullYear(2e3+t)},m:function(e,t){if(isNaN(e))return e;t-=1;while(t<0)t+=12;t%=12,e.setUTCMonth(t);while(e.getUTCMonth()!=t)e.setUTCDate(e.getUTCDate()-1);return e},d:function(e,t){return e.setUTCDate(t)}},m,g,a;p.M=p.MM=p.mm=p.m,p.dd=p.d,t=r(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0);var y=n.parts.slice();o.length!=y.length&&(y=e(y).filter(function(t,n){return e.inArray(n,h)!==-1}).toArray());if(o.length==y.length){for(var l=0,b=y.length;l<b;l++){m=parseInt(o[l],10),a=y[l];if(isNaN(m))switch(a){case"MM":g=e(d[i].months).filter(function(){var e=this.slice(0,o[l].length),t=o[l].slice(0,e.length);return e==t}),m=e.inArray(g[0],d[i].months)+1;break;case"M":g=e(d[i].monthsShort).filter(function(){var e=this.slice(0,o[l].length),t=o[l].slice(0,e.length);return e==t}),m=e.inArray(g[0],d[i].monthsShort)+1}c[a]=m}for(var l=0,w,E;l<h.length;l++)E=h[l],E in c&&!isNaN(c[E])&&(w=new Date(t),p[E](w,c[E]),isNaN(w)||(t=w))}return t},formatDate:function(t,n,r){if(!t)return"";typeof n=="string"&&(n=v.parseFormat(n));var i={d:t.getUTCDate(),D:d[r].daysShort[t.getUTCDay()],DD:d[r].days[t.getUTCDay()],m:t.getUTCMonth()+1,M:d[r].monthsShort[t.getUTCMonth()],MM:d[r].months[t.getUTCMonth()],yy:t.getUTCFullYear().toString().substring(2),yyyy:t.getUTCFullYear()};i.dd=(i.d<10?"0":"")+i.d,i.mm=(i.m<10?"0":"")+i.m;var t=[],s=e.extend([],n.separators);for(var o=0,u=n.parts.length;o<=u;o++)s.length&&t.push(s.shift()),t.push(i[n.parts[o]]);return t.join("")},headTemplate:'<thead><tr><th class="ai1ec-prev"><i class="ai1ec-fa ai1ec-fa-arrow-left"></i></th><th colspan="5" class="ai1ec-datepicker-switch"></th><th class="ai1ec-next"><i class="ai1ec-fa ai1ec-fa-arrow-right"></i></th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="ai1ec-today"></th></tr><tr><th colspan="7" class="ai1ec-clear"></th></tr></tfoot>'};v.template='<div class="timely ai1ec-datepicker"><div class="ai1ec-datepicker-days"><table class=" ai1ec-table-condensed">'+v.headTemplate+"<tbody></tbody>"+v.footTemplate+"</table>"+"</div>"+'<div class="ai1ec-datepicker-months">'+'<table class="ai1ec-table-condensed">'+v.headTemplate+v.contTemplate+v.footTemplate+"</table>"+"</div>"+'<div class="ai1ec-datepicker-years">'+'<table class="ai1ec-table-condensed">'+v.headTemplate+v.contTemplate+v.footTemplate+"</table>"+"</div>"+"</div>",e.fn.datepicker.DPGlobal=v,e.fn.datepicker.noConflict=function(){return e.fn.datepicker=c,this},e(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(t){var n=e(this);if(n.data("datepicker"))return;t.preventDefault(),n.datepicker("show")}),e(function(){e('[data-provide="datepicker-inline"]').datepicker()});for(var m=2,g=arguments.length;m<g;m++)arguments[m].localize()}),timely.define("external_libs/bootstrap/transition",["jquery_timely"],function(e){function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(e.style[n]!==undefined)return{end:t[n]}}e.fn.emulateTransitionEnd=function(t){var n=!1,r=this;e(this).one(e.support.transition.end,function(){n=!0});var i=function(){n||e(r).trigger(e.support.transition.end)};return setTimeout(i,t),this},e(function(){e.support.transition=t()})}),timely.define("external_libs/bootstrap/collapse",["jquery_timely"],function(e){var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r),this.transitioning=null,this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.DEFAULTS={toggle:!0},t.prototype.dimension=function(){var e=this.$element.hasClass("ai1ec-width");return e?"width":"height"},t.prototype.show=function(){if(this.transitioning||this.$element.hasClass("ai1ec-in"))return;var t=e.Event("show.bs.collapse");this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.$parent&&this.$parent.find("> .ai1ec-panel > .ai1ec-in");if(n&&n.length){var r=n.data("bs.collapse");if(r&&r.transitioning)return;n.collapse("hide"),r||n.data("bs.collapse",null)}var i=this.dimension();this.$element.removeClass("ai1ec-collapse").addClass("ai1ec-collapsing")[i](0),this.transitioning=1;var s=function(){this.$element.removeClass("ai1ec-collapsing").addClass("ai1ec-in")[i]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return s.call(this);var o=e.camelCase(["scroll",i].join("-"));this.$element.one(e.support.transition.end,e.proxy(s,this)).emulateTransitionEnd(350)[i](this.$element[0][o])},t.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass("ai1ec-in"))return;var t=e.Event("hide.bs.collapse");this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("ai1ec-collapsing").removeClass("ai1ec-collapse").removeClass("ai1ec-in"),this.transitioning=1;var r=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("ai1ec-collapsing").addClass("ai1ec-collapse")};if(!e.support.transition)return r.call(this);this.$element[n](0).one(e.support.transition.end,e.proxy(r,this)).emulateTransitionEnd(350)},t.prototype.toggle=function(){this[this.$element.hasClass("ai1ec-in")?"hide":"show"]()};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("bs.collapse"),s=e.extend({},t.DEFAULTS,r.data(),typeof n=="object"&&n);i||r.data("bs.collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.bs.collapse.data-api","[data-toggle=ai1ec-collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i),o=s.data("bs.collapse"),u=o?"toggle":n.data(),a=n.attr("data-parent"),f=a&&e(a);if(!o||!o.transitioning)f&&f.find('[data-toggle=ai1ec-collapse][data-parent="'+a+'"]').not(n).addClass("ai1ec-collapsed"),n[s.hasClass("ai1ec-in")?"addClass":"removeClass"]("ai1ec-collapsed");s.collapse(u)})}),timely.define("external_libs/bootstrap/modal",["jquery_timely"],function(e){var t=function(t,n){this.options=n,this.$element=e(t),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.load(this.options.remote)};t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},t.prototype.toggle=function(e){return this[this.isShown?"hide":"show"](e)},t.prototype.show=function(t){var n=this,r=e.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(r);if(this.isShown||r.isDefaultPrevented())return;this.isShown=!0,this.escape(),this.$element.on("click.dismiss.modal",'[data-dismiss="ai1ec-modal"]',e.proxy(this.hide,this)),this.backdrop(function(){var r=e.support.transition&&n.$element.hasClass("ai1ec-fade");n.$element.parent().length||n.$element.appendTo(document.body),n.$element.show(),r&&n.$element[0].offsetWidth,n.$element.addClass("ai1ec-in").attr("aria-hidden",!1),n.enforceFocus();var i=e.Event("shown.bs.modal",{relatedTarget:t});r?n.$element.find(".ai1ec-modal-dialog").one(e.support.transition.end,function(){n.$element.focus().trigger(i)}).emulateTransitionEnd(300):n.$element.focus().trigger(i)})},t.prototype.hide=function(t){t&&t.preventDefault(),t=e.Event("hide.bs.modal"),this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return;this.isShown=!1,this.escape(),e(document).off("focusin.bs.modal"),this.$element.removeClass("ai1ec-in").attr("aria-hidden",!0).off("click.dismiss.modal"),e.support.transition&&this.$element.hasClass("ai1ec-fade")?this.$element.one(e.support.transition.end,e.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal()},t.prototype.enforceFocus=function(){e(document).off("focusin.bs.modal").on("focusin.bs.modal",e.proxy(function(e){this.$element[0]!==e.target&&!this.$element.has(e.target).length&&this.$element.focus()},this))},t.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",e.proxy(function(e){e.which==27&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},t.prototype.hideModal=function(){var e=this;this.$element.hide(),this.backdrop(function(){e.removeBackdrop(),e.$element.trigger("hidden.bs.modal")})},t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},t.prototype.backdrop=function(t){var n=this,r=this.$element.hasClass("ai1ec-fade")?"ai1ec-fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&r;this.$backdrop=e('<div class="ai1ec-modal-backdrop '+r+'" />').appendTo(document.body),this.$element.on("click.dismiss.modal",e.proxy(function(e){if(e.target!==e.currentTarget)return;this.options.backdrop=="static"?this.$element[0].focus.call(this.$element[0]):this.hide.call(this)},this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("ai1ec-in");if(!t)return;i?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("ai1ec-in"),e.support.transition&&this.$element.hasClass("ai1ec-fade")?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()):t&&t()};var n=e.fn.modal;e.fn.modal=function(n,r){return this.each(function(){var i=e(this),s=i.data("bs.modal"),o=e.extend({},t.DEFAULTS,i.data(),typeof n=="object"&&n);s||i.data("bs.modal",s=new t(this,o)),typeof n=="string"?s[n](r):o.show&&s.show(r)})},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.bs.modal.data-api",'[data-toggle="ai1ec-modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s,this).one("hide",function(){n.is(":visible")&&n.focus()})}),e(document).on("show.bs.modal",".ai1ec-modal",function(){e(document.body).addClass("ai1ec-modal-open")}).on("hidden.bs.modal",".ai1ec-modal",function(){e(document.body).removeClass("ai1ec-modal-open")})}),timely.define("external_libs/bootstrap/alert",["jquery_timely"],function(e){var t='[data-dismiss="ai1ec-alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed.bs.alert").remove()}var n=e(this),r=n.attr("data-target");r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));var i=e(r);t&&t.preventDefault(),i.length||(i=n.hasClass("ai1ec-alert")?n:n.parent()),i.trigger(t=e.Event("close.bs.alert"));if(t.isDefaultPrevented())return;i.removeClass("ai1ec-in"),e.support.transition&&i.hasClass("ai1ec-fade")?i.one(e.support.transition.end,s).emulateTransitionEnd(150):s()};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("bs.alert");i||r.data("bs.alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.bs.alert.data-api",t,n.prototype.close)}),timely.define("external_libs/select2",["jquery_timely"],function(e){(function(e){typeof e.fn.each2=="undefined"&&e.fn.extend({each2:function(t){var n=e([0]),r=-1,i=this.length;while(++r<i&&(n.context=n[0]=this[r])&&t.call(n[0],r,n)!==!1);return this}})})(e),function(e,t){function l(e,t){var n=0,r=t.length;for(;n<r;n+=1)if(c(e,t[n]))return n;return-1}function c(e,n){return e===n?!0:e===t||n===t?!1:e===null||n===null?!1:e.constructor===String?e===n+"":n.constructor===String?n===e+"":!1}function h(t,n){var r,i,s;if(t===null||t.length<1)return[];r=t.split(n);for(i=0,s=r.length;i<s;i+=1)r[i]=e.trim(r[i]);return r}function p(e){return e.outerWidth(!1)-e.width()}function d(n){var r="keyup-change-value";n.bind("keydown",function(){e.data(n,r)===t&&e.data(n,r,n.val())}),n.bind("keyup",function(){var i=e.data(n,r);i!==t&&n.val()!==i&&(e.removeData(n,r),n.trigger("keyup-change"))})}function v(n){n.bind("mousemove",function(n){var r=a;(r===t||r.x!==n.pageX||r.y!==n.pageY)&&e(n.target).trigger("mousemove-filtered",n)})}function m(e,n,r){r=r||t;var i;return function(){var t=arguments;window.clearTimeout(i),i=window.setTimeout(function(){n.apply(r,t)},e)}}function g(e){var t=!1,n;return function(){return t===!1&&(n=e(),t=!0),n}}function y(e,t){var n=m(e,function(e){t.trigger("scroll-debounced",e)});t.bind("scroll",function(e){l(e.target,t.get())>=0&&n(e)})}function b(e){if(e[0]===document.activeElement)return;window.setTimeout(function(){var t=e[0],n=e.val().length,r;e.focus(),t.setSelectionRange?t.setSelectionRange(n,n):t.createTextRange&&(r=t.createTextRange(),r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",n),r.select())},0)}function w(e){e.preventDefault(),e.stopPropagation()}function E(e){e.preventDefault(),e.stopImmediatePropagation()}function S(t){if(!u){var n=t[0].currentStyle||window.getComputedStyle(t[0],null);u=e(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:n.fontSize,fontFamily:n.fontFamily,fontStyle:n.fontStyle,fontWeight:n.fontWeight,letterSpacing:n.letterSpacing,textTransform:n.textTransform,whiteSpace:"nowrap"}),u.attr("class","select2-sizer"),e("body").append(u)}return u.text(t.val()),u.width()}function x(t,n,r){var i,s=[],o;i=t.attr("class"),typeof i=="string"&&e(i.split(" ")).each2(function(){this.indexOf("select2-")===0&&s.push(this)}),i=n.attr("class"),typeof i=="string"&&e(i.split(" ")).each2(function(){this.indexOf("select2-")!==0&&(o=r(this),typeof o=="string"&&o.length>0&&s.push(this))}),t.attr("class",s.join(" "))}function T(e,t,n,r){var i=e.toUpperCase().indexOf(t.toUpperCase()),s=t.length;if(i<0){n.push(r(e));return}n.push(r(e.substring(0,i))),n.push("<span class='select2-match'>"),n.push(r(e.substring(i,i+s))),n.push("</span>"),n.push(r(e.substring(i+s,e.length)))}function N(t){var n,r=0,i=null,s=t.quietMillis||100,o=t.url,u=this;return function(a){window.clearTimeout(n),n=window.setTimeout(function(){r+=1;var n=r,s=t.data,f=o,l=t.transport||e.ajax,c=t.type||"GET",h={};s=s?s.call(u,a.term,a.page,a.context):null,f=typeof f=="function"?f.call(u,a.term,a.page,a.context):f,null!==i&&i.abort(),t.params&&(e.isFunction(t.params)?e.extend(h,t.params.call(u)):e.extend(h,t.params)),e.extend(h,{url:f,dataType:t.dataType,data:s,type:c,cache:!1,success:function(e){if(n<r)return;var i=t.results(e,a.page);a.callback(i)}}),i=l.call(u,h)},s)}}function C(t){var n=t,r,i,s=function(e){return""+e.text};e.isArray(n)&&(i=n,n={results:i}),e.isFunction(n)===!1&&(i=n,n=function(){return i});var o=n();return o.text&&(s=o.text,e.isFunction(s)||(r=n.text,s=function(e){return e[r]})),function(t){var r=t.term,i={results:[]},o;if(r===""){t.callback(n());return}o=function(n,i){var u,a;n=n[0];if(n.children){u={};for(a in n)n.hasOwnProperty(a)&&(u[a]=n[a]);u.children=[],e(n.children).each2(function(e,t){o(t,u.children)}),(u.children.length||t.matcher(r,s(u),n))&&i.push(u)}else t.matcher(r,s(n),n)&&i.push(n)},e(n().results).each2(function(e,t){o(t,i.results)}),t.callback(i)}}function k(n){var r=e.isFunction(n);return function(i){var s=i.term,o={results:[]};e(r?n():n).each(function(){var e=this.text!==t,n=e?this.text:this;(s===""||i.matcher(s,n))&&o.results.push(e?this:{id:this,text:this})}),i.callback(o)}}function L(t,n){if(e.isFunction(t))return!0;if(!t)return!1;throw new Error("formatterName must be a function or a falsy value")}function A(t){return e.isFunction(t)?t():t}function O(t){var n=0;return e.each(t,function(e,t){t.children?n+=O(t.children):n++}),n}function M(e,n,r,i){var s=e,o=!1,u,a,f,l,h;if(!i.createSearchChoice||!i.tokenSeparators||i.tokenSeparators.length<1)return t;for(;;){a=-1;for(f=0,l=i.tokenSeparators.length;f<l;f++){h=i.tokenSeparators[f],a=e.indexOf(h);if(a>=0)break}if(a<0)break;u=e.substring(0,a),e=e.substring(a+h.length);if(u.length>0){u=i.createSearchChoice(u,n);if(u!==t&&u!==null&&i.id(u)!==t&&i.id(u)!==null){o=!1;for(f=0,l=n.length;f<l;f++)if(c(i.id(u),i.id(n[f]))){o=!0;break}o||r(u)}}}if(s!==e)return e}function _(t,n){var r=function(){};return r.prototype=new t,r.prototype.constructor=r,r.prototype.parent=t.prototype,r.prototype=e.extend(r.prototype,n),r}var n,r,i,s,o,u,a,f;n={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(e){e=e.which?e.which:e;switch(e){case n.LEFT:case n.RIGHT:case n.UP:case n.DOWN:return!0}return!1},isControl:function(e){var t=e.which;switch(t){case n.SHIFT:case n.CTRL:case n.ALT:return!0}return e.metaKey?!0:!1},isFunctionKey:function(e){return e=e.which?e.which:e,e>=112&&e<=123}},f=e(document),o=function(){var e=1;return function(){return e++}}(),f.bind("mousemove",function(e){a={x:e.pageX,y:e.pageY}}),r=_(Object,{bind:function(e){var t=this;return function(){e.apply(t,arguments)}},init:function(n){var r,i,s=".select2-results",u;this.opts=n=this.prepareOpts(n),this.id=n.id,n.element.data("select2")!==t&&n.element.data("select2")!==null&&this.destroy(),this.enabled=!0,this.container=this.createContainer(),this.containerId="s2id_"+(n.element.attr("id")||"autogen"+o()),this.containerSelector="#"+this.containerId.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.body=g(function(){return n.element.closest("body")}),x(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.css(A(n.containerCss)),this.container.addClass(A(n.containerCssClass)),this.elementTabIndex=this.opts.element.attr("tabIndex"),this.opts.element.data("select2",this).addClass("select2-offscreen").bind("focus.select2",function(){e(this).select2("focus")}).attr("tabIndex","-1").before(this.container),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),this.dropdown.addClass(A(n.dropdownCssClass)),this.dropdown.data("select2",this),this.results=r=this.container.find(s),this.search=i=this.container.find("input.select2-input"),i.attr("tabIndex",this.elementTabIndex),this.resultsPage=0,this.context=null,this.initContainer(),v(this.results),this.dropdown.delegate(s,"mousemove-filtered touchstart touchmove touchend",this.bind(this.highlightUnderEvent)),y(80,this.results),this.dropdown.delegate(s,"scroll-debounced",this.bind(this.loadMoreIfNeeded)),e.fn.mousewheel&&r.mousewheel(function(e,t,n,i){var s=r.scrollTop(),o;i>0&&s-i<=0?(r.scrollTop(0),w(e)):i<0&&r.get(0).scrollHeight-r.scrollTop()+i<=r.height()&&(r.scrollTop(r.get(0).scrollHeight-r.height()),w(e))}),d(i),i.bind("keyup-change input paste",this.bind(this.updateResults)),i.bind("focus",function(){i.addClass("select2-focused")}),i.bind("blur",function(){i.removeClass("select2-focused")}),this.dropdown.delegate(s,"mouseup",this.bind(function(t){e(t.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(t),this.selectHighlighted(t))})),this.dropdown.bind("click mouseup mousedown",function(e){e.stopPropagation()}),e.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),(n.element.is(":disabled")||n.element.is("[readonly='readonly']"))&&this.disable()},destroy:function(){var e=this.opts.element.data("select2");this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),e!==t&&(e.container.remove(),e.dropdown.remove(),e.opts.element.removeClass("select2-offscreen").removeData("select2").unbind(".select2").attr({tabIndex:this.elementTabIndex}).show())},prepareOpts:function(n){var r,i,s,o;r=n.element,r.get(0).tagName.toLowerCase()==="select"&&(this.select=i=n.element),i&&e.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in n)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}),n=e.extend({},{populateResults:function(r,i,s){var o,u,a,f,l=this.opts.id,c=this;o=function(r,i,u){var a,f,h,p,d,v,m,g,y,b;r=n.sortResults(r,i,s);for(a=0,f=r.length;a<f;a+=1)h=r[a],d=h.disabled===!0,p=!d&&l(h)!==t,v=h.children&&h.children.length>0,m=e("<li></li>"),m.addClass("select2-results-dept-"+u),m.addClass("select2-result"),m.addClass(p?"select2-result-selectable":"select2-result-unselectable"),d&&m.addClass("select2-disabled"),v&&m.addClass("select2-result-with-children"),m.addClass(c.opts.formatResultCssClass(h)),g=e(document.createElement("div")),g.addClass("select2-result-label"),b=n.formatResult(h,g,s,c.opts.escapeMarkup),b!==t&&g.html(b),m.append(g),v&&(y=e("<ul></ul>"),y.addClass("select2-result-sub"),o(h.children,y,u+1),m.append(y)),m.data("select2-data",h),i.append(m)},o(i,r,0)}},e.fn.select2.defaults,n),typeof n.id!="function"&&(s=n.id,n.id=function(e){return e[s]});if(e.isArray(n.element.data("select2Tags"))){if("tags"in n)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+n.element.attr("id");n.tags=n.element.attr("data-select2-tags")}i?(n.query=this.bind(function(n){var i={results:[],more:!1},s=n.term,o,u,a;a=function(e,t){var r;e.is("option")?n.matcher(s,e.text(),e)&&t.push({id:e.attr("value"),text:e.text(),element:e.get(),css:e.attr("class"),disabled:c(e.attr("disabled"),"disabled")}):e.is("optgroup")&&(r={text:e.attr("label"),children:[],element:e.get(),css:e.attr("class")},e.children().each2(function(e,t){a(t,r.children)}),r.children.length>0&&t.push(r))},o=r.children(),this.getPlaceholder()!==t&&o.length>0&&(u=o[0],e(u).text()===""&&(o=o.not(u))),o.each2(function(e,t){a(t,i.results)}),n.callback(i)}),n.id=function(e){return e.id},n.formatResultCssClass=function(e){return e.css}):"query"in n||("ajax"in n?(o=n.element.data("ajax-url"),o&&o.length>0&&(n.ajax.url=o),n.query=N.call(n.element,n.ajax)):"data"in n?n.query=C(n.data):"tags"in n&&(n.query=k(n.tags),n.createSearchChoice===t&&(n.createSearchChoice=function(e){return{id:e,text:e}}),n.initSelection===t&&(n.initSelection=function(t,r){var i=[];e(h(t.val(),n.separator)).each(function(){var t=this,r=this,s=n.tags;e.isFunction(s)&&(s=s()),e(s).each(function(){if(c(this.id,t))return r=this.text,!1}),i.push({id:t,text:r})}),r(i)})));if(typeof n.query!="function")throw"query function not defined for Select2 "+n.element.attr("id");return n},monitorSource:function(){var e=this.opts.element,t;e.bind("change.select2",this.bind(function(e){this.opts.element.data("select2-change-triggered")!==!0&&this.initSelection()})),t=this.bind(function(){var e,t,n=this;e=this.opts.element.attr("disabled")!=="disabled",t=this.opts.element.attr("readonly")==="readonly",e=e&&!t,this.enabled!==e&&(e?this.enable():this.disable()),x(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(A(this.opts.containerCssClass)),x(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(A(this.opts.dropdownCssClass))}),e.bind("propertychange.select2 DOMAttrModified.select2",t),typeof WebKitMutationObserver!="undefined"&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new WebKitMutationObserver(function(e){e.forEach(t)}),this.propertyObserver.observe(e.get(0),{attributes:!0,subtree:!1}))},triggerChange:function(t){t=t||{},t=e.extend({},t,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(t),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},enable:function(){if(this.enabled)return;this.enabled=!0,this.container.removeClass("select2-container-disabled"),this.opts.element.removeAttr("disabled")},disable:function(){if(!this.enabled)return;this.close(),this.enabled=!1,this.container.addClass("select2-container-disabled"),this.opts.element.attr("disabled","disabled")},opened:function(){return this.container.hasClass("select2-dropdown-open")},positionDropdown:function(){var t=this.container.offset(),n=this.container.outerHeight(!1),r=this.container.outerWidth(!1),i=this.dropdown.outerHeight(!1),s=e(window).scrollLeft()+e(window).width(),o=e(window).scrollTop()+e(window).height(),u=t.top+n,a=t.left,f=u+i<=o,l=t.top-i>=this.body().scrollTop(),c=this.dropdown.outerWidth(!1),h=a+c<=s,p=this.dropdown.hasClass("select2-drop-above"),d,v,m;this.body().css("position")!=="static"&&(d=this.body().offset(),u-=d.top,a-=d.left),p?(v=!0,!l&&f&&(v=!1)):(v=!1,!f&&l&&(v=!0)),h||(a=t.left+r-c),v?(u=t.top-i,this.container.addClass("select2-drop-above"),this.dropdown.addClass("select2-drop-above")):(this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")),m=e.extend({top:u,left:a,width:r},A(this.opts.dropdownCss)),this.dropdown.css(m)},shouldOpen:function(){var t;return this.opened()?!1:(t=e.Event("opening"),this.opts.element.trigger(t),!t.isDefaultPrevented())},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return this.shouldOpen()?(window.setTimeout(this.bind(this.opening),1),!0):!1},opening:function(){var t=this.containerId,n="scroll."+t,r="resize."+t,i="orientationchange."+t,s;this.clearDropdownAlignmentPreference(),this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.dropdown[0]!==this.body().children().last()[0]&&this.dropdown.detach().appendTo(this.body()),this.updateResults(!0),s=e("#select2-drop-mask"),s.length==0&&(s=e(document.createElement("div")),s.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),s.hide(),s.appendTo(this.body()),s.bind("mousedown touchstart",function(t){var n=e("#select2-drop"),r;n.length>0&&(r=n.data("select2"),r.opts.selectOnBlur&&r.selectHighlighted({noFocus:!0}),r.close())})),this.dropdown.prev()[0]!==s[0]&&this.dropdown.before(s),e("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),s.css({width:document.documentElement.scrollWidth,height:document.documentElement.scrollHeight}),s.show(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active"),this.ensureHighlightVisible();var o=this;this.container.parents().add(window).each(function(){e(this).bind(r+" "+n+" "+i,function(t){e("#select2-drop-mask").css({width:document.documentElement.scrollWidth,height:document.documentElement.scrollHeight}),o.positionDropdown()})}),this.focusSearch()},close:function(){if(!this.opened())return;var t=this.containerId,n="scroll."+t,r="resize."+t,i="orientationchange."+t;this.container.parents().add(window).each(function(){e(this).unbind(n).unbind(r).unbind(i)}),this.clearDropdownAlignmentPreference(),e("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open"),this.results.empty(),this.clearSearch(),this.opts.element.trigger(e.Event("close"))},clearSearch:function(){},getMaximumSelectionSize:function(){return A(this.opts.maximumSelectionSize)},ensureHighlightVisible:function(){var t=this.results,n,r,i,s,o,u,a;r=this.highlight();if(r<0)return;if(r==0){t.scrollTop(0);return}n=this.findHighlightableChoices(),i=e(n[r]),s=i.offset().top+i.outerHeight(!0),r===n.length-1&&(a=t.find("li.select2-more-results"),a.length>0&&(s=a.offset().top+a.outerHeight(!0))),o=t.offset().top+t.outerHeight(!0),s>o&&t.scrollTop(t.scrollTop()+(s-o)),u=i.offset().top-t.offset().top,u<0&&i.css("display")!="none"&&t.scrollTop(t.scrollTop()+u)},findHighlightableChoices:function(){var e=this.results.find(".select2-result-selectable:not(.select2-selected):not(.select2-disabled)");return this.results.find(".select2-result-selectable:not(.select2-selected):not(.select2-disabled)")},moveHighlight:function(t){var n=this.findHighlightableChoices(),r=this.highlight();while(r>-1&&r<n.length){r+=t;var i=e(n[r]);if(i.hasClass("select2-result-selectable")&&!i.hasClass("select2-disabled")&&!i.hasClass("select2-selected")){this.highlight(r);break}}},highlight:function(t){var n=this.findHighlightableChoices(),r,i;if(arguments.length===0)return l(n.filter(".select2-highlighted")[0],n.get());t>=n.length&&(t=n.length-1),t<0&&(t=0),this.results.find(".select2-highlighted").removeClass("select2-highlighted"),r=e(n[t]),r.addClass("select2-highlighted"),this.ensureHighlightVisible(),i=r.data("select2-data"),i&&this.opts.element.trigger({type:"highlight",val:this.id(i),choice:i})},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(t){var n=e(t.target).closest(".select2-result-selectable");if(n.length>0&&!n.is(".select2-highlighted")){var r=this.findHighlightableChoices();this.highlight(r.index(n))}else n.length==0&&this.results.find(".select2-highlighted").removeClass("select2-highlighted")},loadMoreIfNeeded:function(){var e=this.results,t=e.find("li.select2-more-results"),n,r=-1,i=this.resultsPage+1,s=this,o=this.search.val(),u=this.context;if(t.length===0)return;n=t.offset().top-e.offset().top-e.height(),n<=this.opts.loadMorePadding&&(t.addClass("select2-active"),this.opts.query({element:this.opts.element,term:o,page:i,context:u,matcher:this.opts.matcher,callback:this.bind(function(n){if(!s.opened())return;s.opts.populateResults.call(this,e,n.results,{term:o,page:i,context:u}),n.more===!0?(t.detach().appendTo(e).text(s.opts.formatLoadMore(i+1)),window.setTimeout(function(){s.loadMoreIfNeeded()},10)):t.remove(),s.positionDropdown(),s.resultsPage=i,s.context=n.context})}))},tokenize:function(){},updateResults:function(n){function f(){i.scrollTop(0),r.removeClass("select2-active"),u.positionDropdown()}function l(e){i.html(e),f()}var r=this.search,i=this.results,s=this.opts,o,u=this,a;if(n!==!0&&(this.showSearchInput===!1||!this.opened()))return;r.addClass("select2-active");var h=this.getMaximumSelectionSize();if(h>=1){o=this.data();if(e.isArray(o)&&o.length>=h&&L(s.formatSelectionTooBig,"formatSelectionTooBig")){l("<li class='select2-selection-limit'>"+s.formatSelectionTooBig(h)+"</li>");return}}if(r.val().length<s.minimumInputLength){L(s.formatInputTooShort,"formatInputTooShort")?l("<li class='select2-no-results'>"+s.formatInputTooShort(r.val(),s.minimumInputLength)+"</li>"):l("");return}s.formatSearching()&&n===!0&&l("<li class='select2-searching'>"+s.formatSearching()+"</li>");if(s.maximumInputLength&&r.val().length>s.maximumInputLength){L(s.formatInputTooLong,"formatInputTooLong")?l("<li class='select2-no-results'>"+s.formatInputTooLong(r.val(),s.maximumInputLength)+"</li>"):l("");return}a=this.tokenize(),a!=t&&a!=null&&r.val(a),this.resultsPage=1,s.query({element:s.element,term:r.val(),page:this.resultsPage,context:null,matcher:s.matcher,callback:this.bind(function(o){var a;if(!this.opened())return;this.context=o.context===t?null:o.context,this.opts.createSearchChoice&&r.val()!==""&&(a=this.opts.createSearchChoice.call(null,r.val(),o.results),a!==t&&a!==null&&u.id(a)!==t&&u.id(a)!==null&&e(o.results).filter(function(){return c(u.id(this),u.id(a))}).length===0&&o.results.unshift(a));if(o.results.length===0&&L(s.formatNoMatches,"formatNoMatches")){l("<li class='select2-no-results'>"+s.formatNoMatches(r.val())+"</li>");return}i.empty(),u.opts.populateResults.call(this,i,o.results,{term:r.val(),page:this.resultsPage,context:null}),o.more===!0&&L(s.formatLoadMore,"formatLoadMore")&&(i.append("<li class='select2-more-results'>"+u.opts.escapeMarkup(s.formatLoadMore(this.resultsPage))+"</li>"),window.setTimeout(function(){u.loadMoreIfNeeded()},10)),this.postprocessResults(o,n),f()})})},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass("select2-container-active"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){b(this.search)},selectHighlighted:function(e){var t=this.highlight(),n=this.results.find(".select2-highlighted"),r=n.closest(".select2-result").data("select2-data");r&&(this.highlight(t),this.onSelect(r,e))},getPlaceholder:function(){return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder},initContainerWidth:function(){function n(){var n,r,i,s,o;if(this.opts.width==="off")return null;if(this.opts.width==="element")return this.opts.element.outerWidth(!1)===0?"auto":this.opts.element.outerWidth(!1)+"px";if(this.opts.width==="copy"||this.opts.width==="resolve"){n=this.opts.element.attr("style");if(n!==t){r=n.split(";");for(s=0,o=r.length;s<o;s+=1){i=r[s].replace(/\s/g,"").match(/width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/);if(i!==null&&i.length>=1)return i[1]}}return this.opts.width==="resolve"?(n=this.opts.element.css("width"),n.indexOf("%")>0?n:this.opts.element.outerWidth(!1)===0?"auto":this.opts.element.outerWidth(!1)+"px"):null}return e.isFunction(this.opts.width)?this.opts.width():this.opts.width}var r=n.call(this);r!==null&&this.container.css("width",r)}}),i=_(r,{createContainer:function(){var t=e(document.createElement("div")).attr({"class":"select2-container"}).html(["<a href='javascript:void(0)' onclick='return false;' class='select2-choice' tabindex='-1'>"," <span></span><abbr class='select2-search-choice-close' style='display:none;'></abbr>"," <div><b></b></div>","</a>","<input class='select2-focusser select2-offscreen' type='text'/>","<div class='select2-drop' style='display:none'>"," <div class='select2-search'>"," <input type='text' autocomplete='off' class='select2-input'/>"," </div>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return t},disable:function(){if(!this.enabled)return;this.parent.disable.apply(this,arguments),this.focusser.attr("disabled","disabled")},enable:function(){if(this.enabled)return;this.parent.enable.apply(this,arguments),this.focusser.removeAttr("disabled")},opening:function(){this.parent.opening.apply(this,arguments),this.focusser.attr("disabled","disabled"),this.opts.element.trigger(e.Event("open"))},close:function(){if(!this.opened())return;this.parent.close.apply(this,arguments),this.focusser.removeAttr("disabled"),b(this.focusser)},focus:function(){this.opened()?this.close():(this.focusser.removeAttr("disabled"),this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.removeAttr("disabled"),this.focusser.focus()},initContainer:function(){var e,t=this.container,r=this.dropdown,i=!1;this.showSearch(this.opts.minimumResultsForSearch>=0),this.selection=e=t.find(".select2-choice"),this.focusser=t.find(".select2-focusser"),this.search.bind("keydown",this.bind(function(e){if(!this.enabled)return;if(e.which===n.PAGE_UP||e.which===n.PAGE_DOWN){w(e);return}switch(e.which){case n.UP:case n.DOWN:this.moveHighlight(e.which===n.UP?-1:1),w(e);return;case n.TAB:case n.ENTER:this.selectHighlighted(),w(e);return;case n.ESC:this.cancel(e),w(e);return}})),this.focusser.bind("keydown",this.bind(function(e){if(!this.enabled)return;if(e.which===n.TAB||n.isControl(e)||n.isFunctionKey(e)||e.which===n.ESC)return;if(this.opts.openOnEnter===!1&&e.which===n.ENTER){w(e);return}if(e.which==n.DOWN||e.which==n.UP||e.which==n.ENTER&&this.opts.openOnEnter){this.open(),w(e);return}if(e.which==n.DELETE||e.which==n.BACKSPACE){this.opts.allowClear&&this.clear(),w(e);return}})),d(this.focusser),this.focusser.bind("keyup-change input",this.bind(function(e){if(this.opened())return;this.open(),this.showSearchInput!==!1&&this.search.val(this.focusser.val()),this.focusser.val(""),w(e)})),e.delegate("abbr","mousedown",this.bind(function(e){if(!this.enabled)return;this.clear(),E(e),this.close(),this.selection.focus()})),e.bind("mousedown",this.bind(function(e){i=!0,this.opened()?this.close():this.enabled&&this.open(),w(e),i=!1})),r.bind("mousedown",this.bind(function(){this.search.focus()})),e.bind("focus",this.bind(function(e){w(e)})),this.focusser.bind("focus",this.bind(function(){this.container.addClass("select2-container-active")})).bind("blur",this.bind(function(){this.opened()||this.container.removeClass("select2-container-active")})),this.search.bind("focus",this.bind(function(){this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.setPlaceholder()},clear:function(){var e=this.selection.data("select2-data");this.opts.element.val(""),this.selection.find("span").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),this.opts.element.trigger({type:"removed",val:this.id(e),choice:e}),this.triggerChange({removed:e})},initSelection:function(){var e;if(this.opts.element.val()===""&&this.opts.element.text()==="")this.close(),this.setPlaceholder();else{var n=this;this.opts.initSelection.call(null,this.opts.element,function(e){e!==t&&e!==null&&(n.updateSelection(e),n.close(),n.setPlaceholder())})}},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments);return t.element.get(0).tagName.toLowerCase()==="select"?t.initSelection=function(t,n){var r=t.find(":selected");e.isFunction(n)&&n({id:r.attr("value"),text:r.text(),element:r})}:"data"in t&&(t.initSelection=t.initSelection||function(n,r){var i=n.val();t.query({matcher:function(e,n,r){return c(i,t.id(r))},callback:e.isFunction(r)?function(e){r(e.results.length?e.results[0]:null)}:e.noop})}),t},getPlaceholder:function(){return this.select&&this.select.find("option").first().text()!==""?t:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var e=this.getPlaceholder();if(this.opts.element.val()===""&&e!==t){if(this.select&&this.select.find("option:first").text()!=="")return;this.selection.find("span").html(this.opts.escapeMarkup(e)),this.selection.addClass("select2-default"),this.selection.find("abbr").hide()}},postprocessResults:function(e,t){var n=0,r=this,i=!0;this.findHighlightableChoices().each2(function(e,t){if(c(r.id(t.data("select2-data")),r.opts.element.val()))return n=e,!1}),this.highlight(n);if(t===!0){var s=this.opts.minimumResultsForSearch;i=s<0?!1:O(e.results)>=s,this.showSearch(i)}},showSearch:function(t){this.showSearchInput=t,this.dropdown.find(".select2-search")[t?"removeClass":"addClass"]("select2-search-hidden"),e(this.dropdown,this.container)[t?"addClass":"removeClass"]("select2-with-searchbox")},onSelect:function(e,t){var n=this.opts.element.val();this.opts.element.val(this.id(e)),this.updateSelection(e),this.opts.element.trigger({type:"selected",val:this.id(e),choice:e}),this.close(),(!t||!t.noFocus)&&this.selection.focus(),c(n,this.id(e))||this.triggerChange()},updateSelection:function(e){var n=this.selection.find("span"),r;this.selection.data("select2-data",e),n.empty(),r=this.opts.formatSelection(e,n),r!==t&&n.append(this.opts.escapeMarkup(r)),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==t&&this.selection.find("abbr").show()},val:function(){var e,n=!1,r=null,i=this;if(arguments.length===0)return this.opts.element.val();e=arguments[0],arguments.length>1&&(n=arguments[1]);if(this.select)this.select.val(e).find(":selected").each2(function(e,t){return r={id:t.attr("value"),text:t.text()},!1}),this.updateSelection(r),this.setPlaceholder(),n&&this.triggerChange();else{if(this.opts.initSelection===t)throw new Error("cannot call val() if initSelection() is not defined");if(!e&&e!==0){this.clear(),n&&this.triggerChange();return}this.opts.element.val(e),this.opts.initSelection(this.opts.element,function(e){i.opts.element.val(e?i.id(e):""),i.updateSelection(e),i.setPlaceholder(),n&&i.triggerChange()})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(e){var n;if(arguments.length===0)return n=this.selection.data("select2-data"),n==t&&(n=null),n;!e||e===""?this.clear():(this.opts.element.val(e?this.id(e):""),this.updateSelection(e))}}),s=_(r,{createContainer:function(){var t=e(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html([" <ul class='select2-choices'>"," <li class='select2-search-field'>"," <input type='text' autocomplete='off' class='select2-input'>"," </li>","</ul>","<div class='select2-drop select2-drop-multi' style='display:none;'>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return t},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments);return t.element.get(0).tagName.toLowerCase()==="select"?t.initSelection=function(e,t){var n=[];e.find(":selected").each2(function(e,t){n.push({id:t.attr("value"),text:t.text(),element:t[0]})}),t(n)}:"data"in t&&(t.initSelection=t.initSelection||function(n,r){var i=h(n.val(),t.separator);t.query({matcher:function(n,r,s){return e.grep(i,function(e){return c(e,t.id(s))}).length},callback:e.isFunction(r)?function(e){r(e.results)}:e.noop})}),t},initContainer:function(){var t=".select2-choices",r;this.searchContainer=this.container.find(".select2-search-field"),this.selection=r=this.container.find(t),this.search.bind("input paste",this.bind(function(){if(!this.enabled)return;this.opened()||this.open()})),this.search.bind("keydown",this.bind(function(e){if(!this.enabled)return;if(e.which===n.BACKSPACE&&this.search.val()===""){this.close();var t,i=r.find(".select2-search-choice-focus");if(i.length>0){this.unselect(i.first()),this.search.width(10),w(e);return}t=r.find(".select2-search-choice:not(.select2-locked)"),t.length>0&&t.last().addClass("select2-search-choice-focus")}else r.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");if(this.opened())switch(e.which){case n.UP:case n.DOWN:this.moveHighlight(e.which===n.UP?-1:1),w(e);return;case n.ENTER:case n.TAB:this.selectHighlighted(),w(e);return;case n.ESC:this.cancel(e),w(e);return}if(e.which===n.TAB||n.isControl(e)||n.isFunctionKey(e)||e.which===n.BACKSPACE||e.which===n.ESC)return;if(e.which===n.ENTER){if(this.opts.openOnEnter===!1)return;if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)return}this.open(),(e.which===n.PAGE_UP||e.which===n.PAGE_DOWN)&&w(e)})),this.search.bind("keyup",this.bind(this.resizeSearch)),this.search.bind("blur",this.bind(function(e){this.container.removeClass("select2-container-active"),this.search.removeClass("select2-focused"),this.opened()||this.clearSearch(),e.stopImmediatePropagation()})),this.container.delegate(t,"mousedown",this.bind(function(t){if(!this.enabled)return;if(e(t.target).closest(".select2-search-choice").length>0)return;this.clearPlaceholder(),this.open(),this.focusSearch(),t.preventDefault()})),this.container.delegate(t,"focus",this.bind(function(){if(!this.enabled)return;this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder()})),this.initContainerWidth(),this.clearSearch()},enable:function(){if(this.enabled)return;this.parent.enable.apply(this,arguments),this.search.removeAttr("disabled")},disable:function(){if(!this.enabled)return;this.parent.disable.apply(this,arguments),this.search.attr("disabled",!0)},initSelection:function(){var e;this.opts.element.val()===""&&this.opts.element.text()===""&&(this.updateSelection([]),this.close(),this.clearSearch());if(this.select||this.opts.element.val()!==""){var n=this;this.opts.initSelection.call(null,this.opts.element,function(e){e!==t&&e!==null&&(n.updateSelection(e),n.close(),n.clearSearch())})}},clearSearch:function(){var e=this.getPlaceholder();e!==t&&this.getVal().length===0&&this.search.hasClass("select2-focused")===!1?(this.search.val(e).addClass("select2-default"),this.resizeSearch()):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.parent.opening.apply(this,arguments),this.clearPlaceholder(),this.resizeSearch(),this.focusSearch(),this.opts.element.trigger(e.Event("open"))},close:function(){if(!this.opened())return;this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus(),this.opts.element.triggerHandler("focus")},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(t){var n=[],r=[],i=this;e(t).each(function(){l(i.id(this),n)<0&&(n.push(i.id(this)),r.push(this))}),t=r,this.selection.find(".select2-search-choice").remove(),e(t).each(function(){i.addSelectedChoice(this)}),i.postprocessResults()},tokenize:function(){var e=this.search.val();e=this.opts.tokenizer(e,this.data(),this.bind(this.onSelect),this.opts),e!=null&&e!=t&&(this.search.val(e),e.length>0&&this.open())},onSelect:function(e,t){this.addSelectedChoice(e),this.opts.element.trigger({type:"selected",val:this.id(e),choice:e}),(this.select||!this.opts.closeOnSelect)&&this.postprocessResults(),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.val().length>=this.getMaximumSelectionSize()&&this.updateResults(!0),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:e}),(!t||!t.noFocus)&&this.focusSearch()},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(n){var r=!n.locked,i=e("<li class='select2-search-choice'> <div></div> <a href='#' onclick='return false;' class='select2-search-choice-close' tabindex='-1'></a></li>"),s=e("<li class='select2-search-choice select2-locked'><div></div></li>"),o=r?i:s,u=this.id(n),a=this.getVal(),f;f=this.opts.formatSelection(n,o.find("div")),f!=t&&o.find("div").replaceWith("<div>"+this.opts.escapeMarkup(f)+"</div>"),r&&o.find(".select2-search-choice-close").bind("mousedown",w).bind("click dblclick",this.bind(function(t){if(!this.enabled)return;e(t.target).closest(".select2-search-choice").fadeOut("fast",this.bind(function(){this.unselect(e(t.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),this.close(),this.focusSearch()})).dequeue(),w(t)})).bind("focus",this.bind(function(){if(!this.enabled)return;this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active")})),o.data("select2-data",n),o.insertBefore(this.searchContainer),a.push(u),this.setVal(a)},unselect:function(e){var t=this.getVal(),n,r;e=e.closest(".select2-search-choice");if(e.length===0)throw"Invalid argument: "+e+". Must be .select2-search-choice";n=e.data("select2-data");if(!n)return;r=l(this.id(n),t),r>=0&&(t.splice(r,1),this.setVal(t),this.select&&this.postprocessResults()),e.remove(),this.opts.element.trigger({type:"removed",val:this.id(n),choice:n}),this.triggerChange({removed:n})},postprocessResults:function(){var e=this.getVal(),t=this.results.find(".select2-result"),n=this.results.find(".select2-result-with-children"),r=this;t.each2(function(t,n){var i=r.id(n.data("select2-data"));l(i,e)>=0&&(n.addClass("select2-selected"),n.find(".select2-result-selectable").addClass("select2-selected"))}),n.each2(function(e,t){!t.is(".select2-result-selectable")&&t.find(".select2-result-selectable:not(.select2-selected)").length===0&&t.addClass("select2-selected")}),this.highlight()==-1&&r.highlight(0)},resizeSearch:function(){var e,t,n,r,i,s=p(this.search);e=S(this.search)+10,t=this.search.offset().left,n=this.selection.width(),r=this.selection.offset().left,i=n-(t-r)-s,i<e&&(i=n-s),i<40&&(i=n-s),i<=0&&(i=e),this.search.width(i)},getVal:function(){var e;return this.select?(e=this.select.val(),e===null?[]:e):(e=this.opts.element.val(),h(e,this.opts.separator))},setVal:function(t){var n;this.select?this.select.val(t):(n=[],e(t).each(function(){l(this,n)<0&&n.push(this)}),this.opts.element.val(n.length===0?"":n.join(this.opts.separator)))},val:function(){var n,r=!1,i=[],s=this;if(arguments.length===0)return this.getVal();n=arguments[0],arguments.length>1&&(r=arguments[1]);if(!n&&n!==0){this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),r&&this.triggerChange();return}this.setVal(n);if(this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),r&&this.triggerChange();else{if(this.opts.initSelection===t)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(t){var n=e(t).map(s.id);s.setVal(n),s.updateSelection(t),s.clearSearch(),r&&s.triggerChange()})}this.clearSearch()},onSortStart:function(){if(this.select)throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var t=[],n=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){t.push(n.opts.id(e(this).data("select2-data")))}),this.setVal(t),this.triggerChange()},data:function(t){var n=this,r;if(arguments.length===0)return this.selection.find(".select2-search-choice").map(function(){return e(this).data("select2-data")}).get();t||(t=[]),r=e.map(t,function(e){return n.opts.id(e)}),this.setVal(r),this.updateSelection(t),this.clearSearch()}}),e.fn.select2=function(){var n=Array.prototype.slice.call(arguments,0),r,o,u,a,f=["val","destroy","opened","open","close","focus","isFocused","container","onSortStart","onSortEnd","enable","disable","positionDropdown","data"];return this.each(function(){if(n.length===0||typeof n[0]=="object")r=n.length===0?{}:e.extend({},n[0]),r.element=e(this),r.element.get(0).tagName.toLowerCase()==="select"?a=r.element.attr("multiple"):(a=r.multiple||!1,"tags"in r&&(r.multiple=a=!0)),o=a?new s:new i,o.init(r);else{if(typeof n[0]!="string")throw"Invalid arguments to select2 plugin: "+n;if(l(n[0],f)<0)throw"Unknown method: "+n[0];u=t,o=e(this).data("select2");if(o===t)return;n[0]==="container"?u=o.container:u=o[n[0]].apply(o,n.slice(1));if(u!==t)return!1}}),u===t?this:u},e.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(e,t,n,r){var i=[];return T(e.text,n.term,i,r),i.join("")},formatSelection:function(e,n){return e?e.text:t},sortResults:function(e,t,n){return e},formatResultCssClass:function(e){return t},formatNoMatches:function(){return"No matches found"},formatInputTooShort:function(e,t){var n=t-e.length;return"Please enter "+n+" more character"+(n==1?"":"s")},formatInputTooLong:function(e,t){var n=e.length-t;return"Please enter "+n+" less character"+(n==1?"":"s")},formatSelectionTooBig:function(e){return"You can only select "+e+" item"+(e==1?"":"s")},formatLoadMore:function(e){return"Loading more results..."},formatSearching:function(){return"Searching..."},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(e){return e.id},matcher:function(e,t){return t.toUpperCase().indexOf(e.toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:M,escapeMarkup:function(e){var t={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;","/":"&#47;"};return String(e).replace(/[&<>"'/\\]/g,function(e){return t[e[0]]})},blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(e){return e},adaptDropdownCssClass:function(e){return null}}}(e)}),timely.define("scripts/add_new_event",["jquery_timely","domReady","ai1ec_config","scripts/add_new_event/event_location/gmaps_helper","scripts/add_new_event/event_location/input_coordinates_event_handlers","scripts/add_new_event/event_location/input_coordinates_utility_functions","scripts/add_new_event/event_date_time/date_time_event_handlers","scripts/add_new_event/event_cost_helper","external_libs/jquery.calendrical_timespan","external_libs/jquery.inputdate","external_libs/jquery.tools","external_libs/bootstrap_datepicker","external_libs/bootstrap/transition","external_libs/bootstrap/collapse","external_libs/bootstrap/modal","external_libs/bootstrap/alert","external_libs/bootstrap/tab","external_libs/select2"],function(e,t,n,r,i,s,o,u,a){var f=function(){var t=new Date(n.now*1e3),r={allday:"#ai1ec_all_day_event",start_date_input:"#ai1ec_start-date-input",start_time_input:"#ai1ec_start-time-input",start_time:"#ai1ec_start-time",end_date_input:"#ai1ec_end-date-input",end_time_input:"#ai1ec_end-time-input",end_time:"#ai1ec_end-time",date_format:n.date_format,month_names:n.month_names,day_names:n.day_names,week_start_day:n.week_start_day,twentyfour_hour:n.twentyfour_hour,now:t};e.timespan(r)},l=function(){e(".ai1ec-panel-collapse").on("hide",function(){e(this).parent().removeClass("ai1ec-overflow-visible")}),e(".ai1ec-panel-collapse").on("shown",function(){var t=e(this);window.setTimeout(function(){t.parent().addClass("ai1ec-overflow-visible")},350)})},c=function(){f(),timely.require(["libs/gmaps"],function(e){e(r.init_gmaps)})},h=function(t,n){var r=null;"[object Array]"===Object.prototype.toString.call(n)?r=n.join("<br>"):r=n,e("#ai1ec_event_inline_alert").html(r),e("#ai1ec_event_inline_alert").removeClass("ai1ec-hidden"),t.preventDefault(),e("#publish, #ai1ec_bottom_publish").removeClass("button-primary-disabled"),e("#publish, #ai1ec_bottom_publish").removeClass("disabled"),e("#publish, #ai1ec_bottom_publish").siblings("#ajax-loading, .spinner").css("visibility","hidden")},p=function(t){s.ai1ec_check_lat_long_fields_filled_when_publishing_event(t)===!0&&(s.ai1ec_convert_commas_to_dots_for_coordinates(),s.ai1ec_check_lat_long_ok_for_search(t));var r=!1,i=[];e("#ai1ec_ticket_url, #ai1ec_contact_url").each(function(){var t=this.value;e(this).removeClass("ai1ec-input-warn"),e(this).closest(".ai1ec-panel-collapse").parent().find(".ai1ec-panel-heading .ai1ec-fa-warning").addClass("ai1ec-hidden").parent().css("color","");if(""!==t){var s=/(http|https):\/\//;if(!s.test(t)){e(this).closest(".ai1ec-panel-collapse").parent().find(".ai1ec-panel-heading .ai1ec-fa-warning").removeClass("ai1ec-hidden").parent().css("color","rgb(255, 79, 79)"),r||e(this).closest(".ai1ec-panel-collapse").collapse("show"),r=!0;var o=e(this).attr("id")+"_not_valid";i.push(n[o]),e(this).addClass("ai1ec-input-warn")}}}),r&&(i.push(n.general_url_not_valid),h(t,i))},d=function(){e("#ai1ec_google_map").click(i.toggle_visibility_of_google_map_on_click),e("#ai1ec_input_coordinates").change(i.toggle_visibility_of_coordinate_fields_on_click),e("#post").submit(p),e("input.ai1ec-coordinates").blur(i.update_map_from_coordinates_on_blur),e("#ai1ec_bottom_publish").on("click",o.trigger_publish),e(document).on("change","#ai1ec_end",o.show_end_fields).on("click","#ai1ec_repeat_apply",o.handle_click_on_apply_button).on("click","#ai1ec_repeat_cancel",o.handle_click_on_cancel_modal).on("click","#ai1ec_monthly_type_bymonthday, #ai1ec_monthly_type_byday",o.handle_checkbox_monthly_tab_modal).on("click",".ai1ec-btn-group-grid a",o.handle_click_on_toggle_buttons),e("#ai1ec_repeat_box").on("hidden.bs.modal",o.handle_modal_hide),o.execute_pseudo_handlers(),e("#widgetField > a").on("click",o.handle_animation_of_calendar_widget),e("#ai1ec_is_free").on("change",u.handle_change_is_free),e(document).on("click",".ai1ec-set-banner-image",v),e(document).on("click",".ai1ec-remove-banner",m)},v=function(){var t={};return t._frame=wp.media({state:"featured-image",states:[new wp.media.controller.FeaturedImage,new wp.media.controller.EditImage]}),t._frame.open(),e(".media-frame:last ").addClass("ai1ec-banner-image-frame"),e(".media-frame-title:last h1").text(e(".ai1ec-set-banner-block .ai1ec-set-banner-image").text()),e(".media-frame-toolbar:last").append(e(".ai1ec-media-toolbar").clone().removeClass("ai1ec-media-toolbar ai1ec-hidden")),e(".ai1ec-save-banner-image").off().on("click",function(){var n=e(".attachments:visible li.selected img").attr("src"),r=e(".attachment-details:visible input[type=text]").val();return n&&r&&e("#ai1ec_event_banner .inside").find(".ai1ec-banner-image-block").removeClass("ai1ec-hidden").find("img").attr("src",n).end().find("input").val(r).end().end().find(".ai1ec-set-banner-block").addClass("ai1ec-hidden").end().find(".ai1ec-remove-banner-block").removeClass("ai1ec-hidden"),t._frame.close(),!1}),!1},m=function(){return e("#ai1ec_event_banner .inside").find(".ai1ec-remove-banner-block").addClass("ai1ec-hidden").end().find(".ai1ec-banner-image-block").addClass("ai1ec-hidden").find("input").val("").end().find("img").attr("src","").end().end().find(".ai1ec-set-banner-block").removeClass("ai1ec-hidden"),!1},g=function(){e("#ai1ec_event").insertAfter("#ai1ec_event_inline_alert"),e("#post").addClass("ai1ec-visible")},y=function(){e("#timezone-select").select2()},b=function(){c(),t(function(){l(),g(),d(),y()})};return{start:b}}),timely.require(["scripts/add_new_event"],function(e){e.start()}),timely.define("pages/add_new_event",function(){});
public/js/pages/admin_settings.js CHANGED
@@ -80,25 +80,6 @@
80
  * limitations under the License.
81
  * ======================================================================== */
82
 
83
- /* ========================================================================
84
- * Bootstrap: dropdown.js v3.0.3
85
- * http://getbootstrap.com/javascript/#dropdowns
86
- * ========================================================================
87
- * Copyright 2013 Twitter, Inc.
88
- *
89
- * Licensed under the Apache License, Version 2.0 (the "License");
90
- * you may not use this file except in compliance with the License.
91
- * You may obtain a copy of the License at
92
- *
93
- * http://www.apache.org/licenses/LICENSE-2.0
94
- *
95
- * Unless required by applicable law or agreed to in writing, software
96
- * distributed under the License is distributed on an "AS IS" BASIS,
97
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
98
- * See the License for the specific language governing permissions and
99
- * limitations under the License.
100
- * ======================================================================== */
101
-
102
  /* =========================================================
103
  * bootstrap-datepicker.js
104
  * Repo: https://github.com/eternicode/bootstrap-datepicker/
@@ -141,4 +122,4 @@
141
  * limitations under the License.
142
  * ======================================================================== */
143
 
144
- timely.define("domReady",[],function(){function u(e){var t;for(t=0;t<e.length;t++)e[t](n)}function a(){var e=r;t&&e.length&&(r=[],u(e))}function f(){t||(t=!0,o&&clearInterval(o),a())}function c(e){return t?e(n):r.push(e),c}var e=typeof window!="undefined"&&window.document,t=!e,n=e?document:null,r=[],i,s,o;if(e){if(document.addEventListener)document.addEventListener("DOMContentLoaded",f,!1),window.addEventListener("load",f,!1);else if(window.attachEvent){window.attachEvent("onload",f),s=document.createElement("div");try{i=window.frameElement===null}catch(l){}s.doScroll&&i&&window.external&&(o=setInterval(function(){try{s.doScroll(),f()}catch(e){}},30))}(document.readyState==="complete"||document.readyState==="interactive")&&f()}return c.version="2.0.0",c.load=function(e,t,n,r){r.isBuild?n(null):c(n)},c}),timely.define("external_libs/bootstrap/tab",["jquery_timely"],function(e){var t=function(t){this.element=e(t)};t.prototype.show=function(){var t=this.element,n=t.closest("ul:not(.ai1ec-dropdown-menu)"),r=t.data("target");r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("ai1ec-active"))return;var i=n.find(".ai1ec-active:last a")[0],s=e.Event("show.bs.tab",{relatedTarget:i});t.trigger(s);if(s.isDefaultPrevented())return;var o=e(r);this.activate(t.parent("li"),n),this.activate(o,o.parent(),function(){t.trigger({type:"shown.bs.tab",relatedTarget:i})})},t.prototype.activate=function(t,n,r){function o(){i.removeClass("ai1ec-active").find("> .ai1ec-dropdown-menu > .ai1ec-active").removeClass("ai1ec-active"),t.addClass("ai1ec-active"),s?(t[0].offsetWidth,t.addClass("ai1ec-in")):t.removeClass("ai1ec-fade"),t.parent(".ai1ec-dropdown-menu")&&t.closest("li.ai1ec-dropdown").addClass("ai1ec-active"),r&&r()}var i=n.find("> .ai1ec-active"),s=r&&e.support.transition&&i.hasClass("ai1ec-fade");s?i.one(e.support.transition.end,o).emulateTransitionEnd(150):o(),i.removeClass("ai1ec-in")};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("bs.tab");i||r.data("bs.tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.bs.tab.data-api",'[data-toggle="ai1ec-tab"], [data-toggle="ai1ec-pill"]',function(t){t.preventDefault(),e(this).tab("show")})}),timely.define("libs/utils",["jquery_timely","external_libs/bootstrap/tab"],function(e){var t=function(){return{is_float:function(e){return!isNaN(parseFloat(e))},is_valid_coordinate:function(e,t){var n=t?90:180;return this.is_float(e)&&Math.abs(e)<n},convert_comma_to_dot:function(e){return e.replace(",",".")},field_has_value:function(t){var n="#"+t,r=e(n),i=!1;return r.length===1&&(i=e.trim(r.val())!==""),i},make_alert:function(t,n,r){var i="";switch(n){case"error":i="ai1ec-alert ai1ec-alert-danger";break;case"success":i="ai1ec-alert ai1ec-alert-success";break;default:i="ai1ec-alert"}var s=e("<div />",{"class":i,html:t});if(!r){var o=e("<button>",{type:"button","class":"ai1ec-close","data-dismiss":"ai1ec-alert",text:"×"});s.prepend(o)}return s},get_ajax_url:function(){return typeof window.ajaxurl=="undefined"?"http://localhost/wordpress/wp-admin/admin-ajax.php":window.ajaxurl},isUrl:function(e){var t=/(http|https|webcal):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return t.test(e)},isValidEmail:function(e){var t=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return t.test(e)},activate_saved_tab_on_page_load:function(t){null===t||undefined===t?e("ul.ai1ec-nav a:first").tab("show"):e("ul.ai1ec-nav a[href="+t+"]").tab("show")},add_query_arg:function(e,t){var n=e.indexOf("?")===-1?"?":"&";return-1!==e.indexOf(n+t[0]+"=")?e:e+n+t[0]+"="+t[1]},init_autoselect:function(){e(document).one("click",".ai1ec-autoselect",function(t){if(e(this).data("clicked")&&t.originalEvent.detail<2)return;e(this).data("clicked",!0);var n;document.body.createTextRange?(n=document.body.createTextRange(),n.moveToElementText(this),n.select()):window.getSelection&&(selection=window.getSelection(),n=document.createRange(),n.selectNodeContents(this),selection.removeAllRanges(),selection.addRange(n))})}}}();return t}),timely.define("scripts/setting/cache/cache_ajax_handlers",["jquery_timely","libs/utils"],function(e,t){var n=function(n){var r=e("#ai1ec-button-refresh"),i=e("#ai1ec-cache-scan-success"),s=e("#ai1ec-cache-scan-danger"),o;r.button("reset"),n.error?o=t.make_alert(n.message,"error"):"0"===n.state?(i.toggleClass("ai1ec-hide",!0),s.toggleClass("ai1ec-hide",!1)):(i.toggleClass("ai1ec-hide",!1),s.toggleClass("ai1ec-hide",!0))};return{handle_rescan_cache:n}}),timely.define("scripts/setting/cache/cache_event_handlers",["jquery_timely","scripts/setting/cache/cache_ajax_handlers","libs/utils"],function(e,t,n){var r=n.get_ajax_url(),i=function(){var n=e(this);n.button("loading");var i={action:"ai1ec_rescan_cache"};return e.post(r,i,t.handle_rescan_cache,"json"),!1};return{perform_rescan:i}}),timely.define("external_libs/bootstrap/button",["jquery_timely"],function(e){var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r)};t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.is("input")?"val":"html",i=n.data();e+="Text",i.resetText||n.data("resetText",n[r]()),n[r](i[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass("ai1ec-"+t).attr(t,t):n.removeClass("ai1ec-"+t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="ai1ec-buttons"]'),t=!0;if(e.length){var n=this.$element.find("input");n.prop("type")==="radio"&&(n.prop("checked")&&this.$element.hasClass("ai1ec-active")?t=!1:e.find(".ai1ec-active").removeClass("ai1ec-active")),t&&n.prop("checked",!this.$element.hasClass("ai1ec-active")).trigger("change")}t&&this.$element.toggleClass("ai1ec-active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("bs.button"),s=typeof n=="object"&&n;i||r.data("bs.button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.bs.button.data-api","[data-toggle^=ai1ec-button]",function(t){var n=e(t.target);n.hasClass("ai1ec-btn")||(n=n.closest(".ai1ec-btn")),n.button("toggle"),t.preventDefault()})}),timely.define("external_libs/bootstrap/transition",["jquery_timely"],function(e){function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(e.style[n]!==undefined)return{end:t[n]}}e.fn.emulateTransitionEnd=function(t){var n=!1,r=this;e(this).one(e.support.transition.end,function(){n=!0});var i=function(){n||e(r).trigger(e.support.transition.end)};return setTimeout(i,t),this},e(function(){e.support.transition=t()})}),timely.define("external_libs/bootstrap/collapse",["jquery_timely"],function(e){var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r),this.transitioning=null,this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.DEFAULTS={toggle:!0},t.prototype.dimension=function(){var e=this.$element.hasClass("ai1ec-width");return e?"width":"height"},t.prototype.show=function(){if(this.transitioning||this.$element.hasClass("ai1ec-in"))return;var t=e.Event("show.bs.collapse");this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.$parent&&this.$parent.find("> .ai1ec-panel > .ai1ec-in");if(n&&n.length){var r=n.data("bs.collapse");if(r&&r.transitioning)return;n.collapse("hide"),r||n.data("bs.collapse",null)}var i=this.dimension();this.$element.removeClass("ai1ec-collapse").addClass("ai1ec-collapsing")[i](0),this.transitioning=1;var s=function(){this.$element.removeClass("ai1ec-collapsing").addClass("ai1ec-in")[i]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return s.call(this);var o=e.camelCase(["scroll",i].join("-"));this.$element.one(e.support.transition.end,e.proxy(s,this)).emulateTransitionEnd(350)[i](this.$element[0][o])},t.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass("ai1ec-in"))return;var t=e.Event("hide.bs.collapse");this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("ai1ec-collapsing").removeClass("ai1ec-collapse").removeClass("ai1ec-in"),this.transitioning=1;var r=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("ai1ec-collapsing").addClass("ai1ec-collapse")};if(!e.support.transition)return r.call(this);this.$element[n](0).one(e.support.transition.end,e.proxy(r,this)).emulateTransitionEnd(350)},t.prototype.toggle=function(){this[this.$element.hasClass("ai1ec-in")?"hide":"show"]()};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("bs.collapse"),s=e.extend({},t.DEFAULTS,r.data(),typeof n=="object"&&n);i||r.data("bs.collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.bs.collapse.data-api","[data-toggle=ai1ec-collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i),o=s.data("bs.collapse"),u=o?"toggle":n.data(),a=n.attr("data-parent"),f=a&&e(a);if(!o||!o.transitioning)f&&f.find('[data-toggle=ai1ec-collapse][data-parent="'+a+'"]').not(n).addClass("ai1ec-collapsed"),n[s.hasClass("ai1ec-in")?"addClass":"removeClass"]("ai1ec-collapsed");s.collapse(u)})}),timely.define("libs/collapse_helper",["jquery_timely","domReady","external_libs/bootstrap/transition","external_libs/bootstrap/collapse"],function(e,t){t(function(){e(document).on("click",'[data-toggle="ai1ec-collapse"]',function(){e(this).toggleClass("ai1ec-active"),e(".ai1ec-fa-caret-down, .ai1ec-fa-caret-up, .ai1ec-fa-chevron-down, .ai1ec-fa-chevron-up, .ai1ec-fa-arrow-down, .ai1ec-fa-arrow-up",this).toggleClass("ai1ec-hide")})})}),timely.define("external_libs/bootstrap/dropdown",["jquery_timely"],function(e){function i(){e(t).remove(),e(n).each(function(t){var n=s(e(this));if(!n.hasClass("ai1ec-open"))return;n.trigger(t=e.Event("hide.bs.dropdown"));if(t.isDefaultPrevented())return;n.removeClass("ai1ec-open").trigger("hidden.bs.dropdown")})}function s(t){var n=t.attr("data-target");n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var r=n&&e(n);return r&&r.length?r:t.parent()}var t=".ai1ec-dropdown-backdrop",n="[data-toggle=ai1ec-dropdown]",r=function(t){e(t).on("click.bs.dropdown",this.toggle)};r.prototype.toggle=function(t){var n=e(this);if(n.is(".ai1ec-disabled, :disabled"))return;var r=s(n),o=r.hasClass("ai1ec-open");i();if(!o){"ontouchstart"in document.documentElement&&!r.closest(".ai1ec-navbar-nav").length&&e('<div class="ai1ec-dropdown-backdrop"/>').insertAfter(e(this)).on("click",i),r.trigger(t=e.Event("show.bs.dropdown"));if(t.isDefaultPrevented())return;r.toggleClass("ai1ec-open").trigger("shown.bs.dropdown"),n.focus()}return!1},r.prototype.keydown=function(t){if(!/(38|40|27)/.test(t.keyCode))return;var r=e(this);t.preventDefault(),t.stopPropagation();if(r.is(".ai1ec-disabled, :disabled"))return;var i=s(r),o=i.hasClass("ai1ec-open");if(!o||o&&t.keyCode==27)return t.which==27&&i.find(n).focus(),r.click();var u=e("[role=menu] li:not(.ai1ec-divider):visible a",i);if(!u.length)return;var a=u.index(u.filter(":focus"));t.keyCode==38&&a>0&&a--,t.keyCode==40&&a<u.length-1&&a++,~a||(a=0),u.eq(a).focus()};var o=e.fn.dropdown;e.fn.dropdown=function(t){return this.each(function(){var n=e(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new r(this)),typeof t=="string"&&i[t].call(n)})},e.fn.dropdown.Constructor=r,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=o,this},e(document).on("click.bs.dropdown.data-api",i).on("click.bs.dropdown.data-api",".ai1ec-dropdown form",function(e){e.stopPropagation()}).on("click.bs.dropdown.data-api",n,r.prototype.toggle).on("keydown.bs.dropdown.data-api",n+", [role=menu]",r.prototype.keydown)}),timely.define("external_libs/locales/bootstrap-datepicker.bg",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.bg={days:["Неделя","Понеделник","Вторник","Сряда","Четвъртък","Петък","Събота","Неделя"],daysShort:["Нед","Пон","Вто","Сря","Чет","Пет","Съб","Нед"],daysMin:["Н","П","В","С","Ч","П","С","Н"],months:["Януари","Февруари","Март","Април","Май","Юни","Юли","Август","Септември","Октомври","Ноември","Декември"],monthsShort:["Ян","Фев","Мар","Апр","Май","Юни","Юли","Авг","Сеп","Окт","Ное","Дек"],today:"днес"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.br",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.br={days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Domingo"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb","Dom"],daysMin:["Do","Se","Te","Qu","Qu","Se","Sa","Do"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"]}}}}),timely.define("external_libs/locales/bootstrap-datepicker.cs",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.cs={days:["Neděle","Pondělí","Úterý","Středa","Čtvrtek","Pátek","Sobota","Neděle"],daysShort:["Ned","Pon","Úte","Stř","Čtv","Pát","Sob","Ned"],daysMin:["Ne","Po","Út","St","Čt","Pá","So","Ne"],months:["Leden","Únor","Březen","Duben","Květen","Červen","Červenec","Srpen","Září","Říjen","Listopad","Prosinec"],monthsShort:["Led","Úno","Bře","Dub","Kvě","Čer","Čnc","Srp","Zář","Říj","Lis","Pro"],today:"Dnes"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.da",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.da={days:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Søndag"],daysShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør","Søn"],daysMin:["Sø","Ma","Ti","On","To","Fr","Lø","Sø"],months:["Januar","Februar","Marts","April","Maj","Juni","Juli","August","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"I Dag",clear:"Nulstil"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.de",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.de={days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","Sonntag"],daysShort:["Son","Mon","Die","Mit","Don","Fre","Sam","Son"],daysMin:["So","Mo","Di","Mi","Do","Fr","Sa","So"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",clear:"Löschen",weekStart:1,format:"dd.mm.yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.es",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.es={days:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado","Domingo"],daysShort:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb","Dom"],daysMin:["Do","Lu","Ma","Mi","Ju","Vi","Sa","Do"],months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],monthsShort:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],today:"Hoy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.fi",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.fi={days:["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai","sunnuntai"],daysShort:["sun","maa","tii","kes","tor","per","lau","sun"],daysMin:["su","ma","ti","ke","to","pe","la","su"],months:["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu"],monthsShort:["tam","hel","maa","huh","tou","kes","hei","elo","syy","lok","mar","jou"],today:"tänään",weekStart:1,format:"d.m.yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.fr",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.fr={days:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi","Dimanche"],daysShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam","Dim"],daysMin:["D","L","Ma","Me","J","V","S","D"],months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],monthsShort:["Jan","Fév","Mar","Avr","Mai","Jui","Jul","Aou","Sep","Oct","Nov","Déc"],today:"Aujourd'hui",clear:"Effacer",weekStart:1,format:"dd/mm/yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.id",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.id={days:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu","Minggu"],daysShort:["Mgu","Sen","Sel","Rab","Kam","Jum","Sab","Mgu"],daysMin:["Mg","Sn","Sl","Ra","Ka","Ju","Sa","Mg"],months:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Ags","Sep","Okt","Nov","Des"],today:"Hari Ini",clear:"Kosongkan"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.is",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.is={days:["Sunnudagur","Mánudagur","Þriðjudagur","Miðvikudagur","Fimmtudagur","Föstudagur","Laugardagur","Sunnudagur"],daysShort:["Sun","Mán","Þri","Mið","Fim","Fös","Lau","Sun"],daysMin:["Su","Má","Þr","Mi","Fi","Fö","La","Su"],months:["Janúar","Febrúar","Mars","Apríl","Maí","Júní","Júlí","Ágúst","September","Október","Nóvember","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Maí","Jún","Júl","Ágú","Sep","Okt","Nóv","Des"],today:"Í Dag"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.it",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.it={days:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato","Domenica"],daysShort:["Dom","Lun","Mar","Mer","Gio","Ven","Sab","Dom"],daysMin:["Do","Lu","Ma","Me","Gi","Ve","Sa","Do"],months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],monthsShort:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],today:"Oggi",clear:"Cancella",weekStart:1,format:"dd/mm/yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.ja",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.ja={days:["日曜","月曜","火曜","水曜","木曜","金曜","土曜","日曜"],daysShort:["日","月","火","水","木","金","土","日"],daysMin:["日","月","火","水","木","金","土","日"],months:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],monthsShort:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],today:"今日",format:"yyyy/mm/dd"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.kr",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.kr={days:["일요일","월요일","화요일","수요일","목요일","금요일","토요일","일요일"],daysShort:["일","월","화","수","목","금","토","일"],daysMin:["일","월","화","수","목","금","토","일"],months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],monthsShort:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]}}}}),timely.define("external_libs/locales/bootstrap-datepicker.lt",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.lt={days:["Sekmadienis","Pirmadienis","Antradienis","Trečiadienis","Ketvirtadienis","Penktadienis","Šeštadienis","Sekmadienis"],daysShort:["S","Pr","A","T","K","Pn","Š","S"],daysMin:["Sk","Pr","An","Tr","Ke","Pn","Št","Sk"],months:["Sausis","Vasaris","Kovas","Balandis","Gegužė","Birželis","Liepa","Rugpjūtis","Rugsėjis","Spalis","Lapkritis","Gruodis"],monthsShort:["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rugp","Rugs","Spa","Lap","Gru"],today:"Šiandien",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.lv",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.lv={days:["Svētdiena","Pirmdiena","Otrdiena","Trešdiena","Ceturtdiena","Piektdiena","Sestdiena","Svētdiena"],daysShort:["Sv","P","O","T","C","Pk","S","Sv"],daysMin:["Sv","Pr","Ot","Tr","Ce","Pk","Se","Sv"],months:["Janvāris","Februāris","Marts","Aprīlis","Maijs","Jūnijs","Jūlijs","Augusts","Septembris","Oktobris","Novembris","Decembris"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jūn","Jūl","Aug","Sep","Okt","Nov","Dec"],today:"Šodien",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.ms",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.ms={days:["Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu","Ahad"],daysShort:["Aha","Isn","Sel","Rab","Kha","Jum","Sab","Aha"],daysMin:["Ah","Is","Se","Ra","Kh","Ju","Sa","Ah"],months:["Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember"],monthsShort:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Ogo","Sep","Okt","Nov","Dis"],today:"Hari Ini"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.nb",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.nb={days:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Søndag"],daysShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør","Søn"],daysMin:["Sø","Ma","Ti","On","To","Fr","Lø","Sø"],months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],today:"I Dag"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.nl",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.nl={days:["Zondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrijdag","Zaterdag","Zondag"],daysShort:["Zo","Ma","Di","Wo","Do","Vr","Za","Zo"],daysMin:["Zo","Ma","Di","Wo","Do","Vr","Za","Zo"],months:["Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mrt","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"Vandaag"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.pl",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.pl={days:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota","Niedziela"],daysShort:["Nie","Pn","Wt","Śr","Czw","Pt","So","Nie"],daysMin:["N","Pn","Wt","Śr","Cz","Pt","So","N"],months:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"],monthsShort:["Sty","Lu","Mar","Kw","Maj","Cze","Lip","Sie","Wrz","Pa","Lis","Gru"],today:"Dzisiaj",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.pt-BR",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates["pt-BR"]={days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Domingo"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb","Dom"],daysMin:["Do","Se","Te","Qu","Qu","Se","Sa","Do"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],today:"Hoje",clear:"Limpar"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.pt",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.pt={days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Domingo"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb","Dom"],daysMin:["Do","Se","Te","Qu","Qu","Se","Sa","Do"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],today:"Hoje",clear:"Limpar"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.ru",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.ru={days:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота","Воскресенье"],daysShort:["Вск","Пнд","Втр","Срд","Чтв","Птн","Суб","Вск"],daysMin:["Вс","Пн","Вт","Ср","Чт","Пт","Сб","Вс"],months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],monthsShort:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],today:"Сегодня",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.sl",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.sl={days:["Nedelja","Ponedeljek","Torek","Sreda","Četrtek","Petek","Sobota","Nedelja"],daysShort:["Ned","Pon","Tor","Sre","Čet","Pet","Sob","Ned"],daysMin:["Ne","Po","To","Sr","Če","Pe","So","Ne"],months:["Januar","Februar","Marec","April","Maj","Junij","Julij","Avgust","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Avg","Sep","Okt","Nov","Dec"],today:"Danes"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.sv",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.sv={days:["Söndag","Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag","Söndag"],daysShort:["Sön","Mån","Tis","Ons","Tor","Fre","Lör","Sön"],daysMin:["Sö","Må","Ti","On","To","Fr","Lö","Sö"],months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"I Dag",format:"yyyy-mm-dd",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.th",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.th={days:["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัส","ศุกร์","เสาร์","อาทิตย์"],daysShort:["อา","จ","อ","พ","พฤ","ศ","ส","อา"],daysMin:["อา","จ","อ","พ","พฤ","ศ","ส","อา"],months:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],monthsShort:["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."],today:"วันนี้"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.tr",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.tr={days:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi","Pazar"],daysShort:["Pz","Pzt","Sal","Çrş","Prş","Cu","Cts","Pz"],daysMin:["Pz","Pzt","Sa","Çr","Pr","Cu","Ct","Pz"],months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],monthsShort:["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"],today:"Bugün",format:"dd.mm.yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.zh-CN",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates["zh-CN"]={days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日"],daysShort:["周日","周一","周二","周三","周四","周五","周六","周日"],daysMin:["日","一","二","三","四","五","六","日"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今日",format:"yyyy年mm月dd日",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.zh-TW",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates["zh-TW"]={days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日"],daysShort:["週日","週一","週二","週三","週四","週五","週六","週日"],daysMin:["日","一","二","三","四","五","六","日"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今天",format:"yyyy年mm月dd日",weekStart:1}}}}),timely.define("external_libs/bootstrap_datepicker",["jquery_timely","ai1ec_config","external_libs/locales/bootstrap-datepicker.bg","external_libs/locales/bootstrap-datepicker.br","external_libs/locales/bootstrap-datepicker.cs","external_libs/locales/bootstrap-datepicker.da","external_libs/locales/bootstrap-datepicker.de","external_libs/locales/bootstrap-datepicker.es","external_libs/locales/bootstrap-datepicker.fi","external_libs/locales/bootstrap-datepicker.fr","external_libs/locales/bootstrap-datepicker.id","external_libs/locales/bootstrap-datepicker.is","external_libs/locales/bootstrap-datepicker.it","external_libs/locales/bootstrap-datepicker.ja","external_libs/locales/bootstrap-datepicker.kr","external_libs/locales/bootstrap-datepicker.lt","external_libs/locales/bootstrap-datepicker.lv","external_libs/locales/bootstrap-datepicker.ms","external_libs/locales/bootstrap-datepicker.nb","external_libs/locales/bootstrap-datepicker.nl","external_libs/locales/bootstrap-datepicker.pl","external_libs/locales/bootstrap-datepicker.pt-BR","external_libs/locales/bootstrap-datepicker.pt","external_libs/locales/bootstrap-datepicker.ru","external_libs/locales/bootstrap-datepicker.sl","external_libs/locales/bootstrap-datepicker.sv","external_libs/locales/bootstrap-datepicker.th","external_libs/locales/bootstrap-datepicker.tr","external_libs/locales/bootstrap-datepicker.zh-CN","external_libs/locales/bootstrap-datepicker.zh-TW"],function(e,t){function r(){return new Date(Date.UTC.apply(Date,arguments))}function i(){var e=new Date;return r(e.getFullYear(),e.getMonth(),e.getDate())}function s(e){return function(){return this[e].apply(this,arguments)}}function f(t,n){var r=e(t).data(),i={},s,o=new RegExp("^"+n.toLowerCase()+"([A-Z])"),n=new RegExp("^"+n.toLowerCase());for(var u in r)n.test(u)&&(s=u.replace(o,function(e,t){return t.toLowerCase()}),i[s]=r[u]);return i}function l(t){var n={};if(!d[t]){t=t.split("-")[0];if(!d[t])return}var r=d[t];return e.each(p,function(e,t){t in r&&(n[t]=r[t])}),n}var n=e(window),o=function(){var t={get:function(e){return this.slice(e)[0]},contains:function(e){var t=e&&e.valueOf();for(var n=0,r=this.length;n<r;n++)if(this[n].valueOf()===t)return n;return-1},remove:function(e){this.splice(e,1)},replace:function(t){if(!t)return;e.isArray(t)||(t=[t]),this.clear(),this.push.apply(this,t)},clear:function(){this.splice(0)},copy:function(){var e=new o;return e.replace(this),e}};return function(){var n=[];return n.push.apply(n,arguments),e.extend(n,t),n}}(),u=function(t,n){this.dates=new o,this.viewDate=i(),this.focusDate=null,this._process_options(n),this.element=e(t),this.isInline=!1,this.isInput=this.element.is("input"),this.component=this.element.is(".ai1ec-date")?this.element.find(".ai1ec-input-group, .ai1ec-input-group-addon, .ai1ec-btn"):!1,this.hasInput=this.component&&this.element.find("input").length,this.component&&this.component.length===0&&(this.component=!1),this.picker=e(v.template),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("ai1ec-datepicker-inline").appendTo(this.element):this.picker.addClass("ai1ec-datepicker-dropdown ai1ec-dropdown-menu"),this.o.rtl&&this.picker.addClass("ai1ec-datepicker-rtl"),this.viewMode=this.o.startView,this.o.calendarWeeks&&this.picker.find("tfoot th.ai1ec-today").attr("colspan",function(e,t){return parseInt(t)+1}),this._allow_update=!1,this.setStartDate(this._o.startDate),this.setEndDate(this._o.endDate),this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled),this.fillDow(),this.fillMonths(),this._allow_update=!0,this.update(),this.showMode(),this.isInline&&this.show()};u.prototype={constructor:u,_process_options:function(n){this._o=e.extend({},this._o,n);var r=this.o=e.extend({},this._o),i=r.language;d[i]||(i=i.split("-")[0],d[i]||(i=t.language,d[i]||(i=h.language))),r.language=i;switch(r.startView){case 2:case"decade":r.startView=2;break;case 1:case"year":r.startView=1;break;default:r.startView=0}switch(r.minViewMode){case 1:case"months":r.minViewMode=1;break;case 2:case"years":r.minViewMode=2;break;default:r.minViewMode=0}r.startView=Math.max(r.startView,r.minViewMode),r.multidate!==!0&&(r.multidate=Number(r.multidate)||!1,r.multidate!==!1?r.multidate=Math.max(0,r.multidate):r.multidate=1),r.multidateSeparator=String(r.multidateSeparator),r.weekStart%=7,r.weekEnd=(r.weekStart+6)%7;var s=v.parseFormat(r.format);r.startDate!==-Infinity&&(r.startDate?r.startDate instanceof Date?r.startDate=this._local_to_utc(this._zero_time(r.startDate)):r.startDate=v.parseDate(r.startDate,s,r.language):r.startDate=-Infinity),r.endDate!==Infinity&&(r.endDate?r.endDate instanceof Date?r.endDate=this._local_to_utc(this._zero_time(r.endDate)):r.endDate=v.parseDate(r.endDate,s,r.language):r.endDate=Infinity),r.daysOfWeekDisabled=r.daysOfWeekDisabled||[],e.isArray(r.daysOfWeekDisabled)||(r.daysOfWeekDisabled=r.daysOfWeekDisabled.split(/[,\s]*/)),r.daysOfWeekDisabled=e.map(r.daysOfWeekDisabled,function(e){return parseInt(e,10)});var o=String(r.orientation).toLowerCase().split(/\s+/g),u=r.orientation.toLowerCase();o=e.grep(o,function(e){return/^auto|left|right|top|bottom$/.test(e)}),r.orientation={x:"auto",y:"auto"};if(!!u&&u!=="auto")if(o.length===1)switch(o[0]){case"top":case"bottom":r.orientation.y=o[0];break;case"left":case"right":r.orientation.x=o[0]}else u=e.grep(o,function(e){return/^left|right$/.test(e)}),r.orientation.x=u[0]||"auto",u=e.grep(o,function(e){return/^top|bottom$/.test(e)}),r.orientation.y=u[0]||"auto"},_events:[],_secondaryEvents:[],_applyEvents:function(e){for(var t=0,n,r,i;t<e.length;t++)n=e[t][0],e[t].length==2?(r=undefined,i=e[t][1]):e[t].length==3&&(r=e[t][1],i=e[t][2]),n.on(i,r)},_unapplyEvents:function(e){for(var t=0,n,r,i;t<e.length;t++)n=e[t][0],e[t].length==2?(i=undefined,r=e[t][1]):e[t].length==3&&(i=e[t][1],r=e[t][2]),n.off(r,i)},_buildEvents:function(){this.isInput?this._events=[[this.element,{focus:e.proxy(this.show,this),keyup:e.proxy(function(t){e.inArray(t.keyCode,[27,37,39,38,40,32,13,9])===-1&&this.update()},this),keydown:e.proxy(this.keydown,this)}]]:this.component&&this.hasInput?this._events=[[this.element.find("input"),{focus:e.proxy(this.show,this),keyup:e.proxy(function(t){e.inArray(t.keyCode,[27,37,39,38,40,32,13,9])===-1&&this.update()},this),keydown:e.proxy(this.keydown,this)}],[this.component,{click:e.proxy(this.show,this)}]]:this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:e.proxy(this.show,this)}]],this._events.push([this.element,"*",{blur:e.proxy(function(e){this._focused_from=e.target},this)}],[this.element,{blur:e.proxy(function(e){this._focused_from=e.target},this)}]),this._secondaryEvents=[[this.picker,{click:e.proxy(this.click,this)}],[e(window),{resize:e.proxy(this.place,this)}],[e(document),{"mousedown touchstart":e.proxy(function(e){this.element.is(e.target)||this.element.find(e.target).length||this.picker.is(e.target)||this.picker.find(e.target).length||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(t,n){var r=n||this.dates.get(-1),i=this._utc_to_local(r);this.element.trigger({type:t,date:i,dates:e.map(this.dates,this._utc_to_local),format:e.proxy(function(e,t){arguments.length===0?(e=this.dates.length-1,t=this.o.format):typeof e=="string"&&(t=e,e=this.dates.length-1),t=t||this.o.format;var n=this.dates.get(e);return v.formatDate(n,t,this.o.language)},this)})},show:function(e){this.isInline||this.picker.appendTo("body"),this.picker.show(),this.height=this.component?this.component.outerHeight():this.element.outerHeight(),this.place(),this._attachSecondaryEvents(),this._trigger("show")},hide:function(){if(this.isInline)return;if(!this.picker.is(":visible"))return;this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.viewMode=this.o.startView,this.showMode(),this.o.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this._trigger("hide")},remove:function(){this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date},_utc_to_local:function(e){return e&&new Date(e.getTime()+e.getTimezoneOffset()*6e4)},_local_to_utc:function(e){return e&&new Date(e.getTime()-e.getTimezoneOffset()*6e4)},_zero_time:function(e){return e&&new Date(e.getFullYear(),e.getMonth(),e.getDate())},_zero_utc_time:function(e){return e&&new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))},getDates:function(){return e.map(this.dates,this._utc_to_local)},getUTCDates:function(){return e.map(this.dates,function(e){return new Date(e)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){return new Date(this.dates.get(-1))},setDates:function(){this.update.apply(this,arguments),this._trigger("changeDate"),this.setValue()},setUTCDates:function(){this.update.apply(this,e.map(arguments,this._utc_to_local)),this._trigger("changeDate"),this.setValue()},setDate:s("setDates"),setUTCDate:s("setUTCDates"),setValue:function(){var e=this.getFormattedDate();this.isInput?this.element.val(e).change():this.component&&this.element.find("input").val(e).change()},getFormattedDate:function(t){t===undefined&&(t=this.o.format);var n=this.o.language;return e.map(this.dates,function(e){return v.formatDate(e,t,n)}).join(this.o.multidateSeparator)},setStartDate:function(e){this._process_options({startDate:e}),this.update(),this.updateNavArrows()},setEndDate:function(e){this._process_options({endDate:e}),this.update(),this.updateNavArrows()},setDaysOfWeekDisabled:function(e){this._process_options({daysOfWeekDisabled:e}),this.update(),this.updateNavArrows()},place:function(){if(this.isInline)return;var t=this.picker.outerWidth(),r=this.picker.outerHeight(),i=10,s=n.width(),o=n.height(),u=n.scrollTop(),a=parseInt(this.element.parents().filter(function(){return e(this).css("z-index")!="auto"}).first().css("z-index"))+10,f=this.component?this.component.parent().offset():this.element.offset(),l=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),c=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),h=f.left,p=f.top;this.picker.removeClass("ai1ec-datepicker-orient-top ai1ec-datepicker-orient-bottom ai1ec-datepicker-orient-right ai1ec-datepicker-orient-left"),this.o.orientation.x!=="auto"?(this.picker.addClass("ai1ec-datepicker-orient-"+this.o.orientation.x),this.o.orientation.x==="right"&&(h-=t-c)):(this.picker.addClass("ai1ec-datepicker-orient-left"),f.left<0?h-=f.left-i:f.left+t>s&&(h=s-t-i));var d=this.o.orientation.y,v,m;d==="auto"&&(v=-u+f.top-r,m=u+o-(f.top+l+r),Math.max(v,m)===m?d="top":d="bottom"),this.picker.addClass("ai1ec-datepicker-orient-"+d),d==="top"?p+=l:p-=r+parseInt(this.picker.css("padding-top")),this.picker.css({top:p,left:h,zIndex:a})},_allow_update:!0,update:function(){if(!this._allow_update)return;var t=this.dates.copy(),n=[],r=!1;arguments.length?(e.each(arguments,e.proxy(function(e,t){t instanceof Date&&(t=this._local_to_utc(t)),n.push(t)},this)),r=!0):(n=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),n&&this.o.multidate?n=n.split(this.o.multidateSeparator):n=[n],delete this.element.data().date),n=e.map(n,e.proxy(function(e){return v.parseDate(e,this.o.format,this.o.language)},this)),n=e.grep(n,e.proxy(function(e){return e<this.o.startDate||e>this.o.endDate||!e},this),!0),this.dates.replace(n),this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate&&(this.viewDate=new Date(this.o.endDate)),r?this.setValue():n.length&&String(t)!==String(this.dates)&&this._trigger("changeDate"),!this.dates.length&&t.length&&this._trigger("clearDate"),this.fill()},fillDow:function(){var e=this.o.weekStart,t="<tr>";if(this.o.calendarWeeks){var n='<th class="ai1ec-cw">&nbsp;</th>';t+=n,this.picker.find(".ai1ec-datepicker-days thead tr:first-child").prepend(n)}while(e<this.o.weekStart+7)t+='<th class="ai1ec-dow">'+d[this.o.language].daysMin[e++%7]+"</th>";t+="</tr>",this.picker.find(".ai1ec-datepicker-days thead").append(t)},fillMonths:function(){var e="",t=0;while(t<12)e+='<span class="ai1ec-month">'+d[this.o.language].monthsShort[t++]+"</span>";this.picker.find(".ai1ec-datepicker-months td").html(e)},setRange:function(t){!t||!t.length?delete this.range:this.range=e.map(t,function(e){return e.valueOf()}),this.fill()},getClassNames:function(t){var n=[],r=this.viewDate.getUTCFullYear(),i=this.viewDate.getUTCMonth(),s=new Date;return t.getUTCFullYear()<r||t.getUTCFullYear()==r&&t.getUTCMonth()<i?n.push("ai1ec-old"):(t.getUTCFullYear()>r||t.getUTCFullYear()==r&&t.getUTCMonth()>i)&&n.push("ai1ec-new"),this.focusDate&&t.valueOf()===this.focusDate.valueOf()&&n.push("ai1ec-focused"),this.o.todayHighlight&&t.getUTCFullYear()==s.getFullYear()&&t.getUTCMonth()==s.getMonth()&&t.getUTCDate()==s.getDate()&&n.push("ai1ec-today"),this.dates.contains(t)!==-1&&n.push("ai1ec-active"),(t.valueOf()<this.o.startDate||t.valueOf()>this.o.endDate||e.inArray(t.getUTCDay(),this.o.daysOfWeekDisabled)!==-1)&&n.push("ai1ec-disabled"),this.range&&(t>this.range[0]&&t<this.range[this.range.length-1]&&n.push("ai1ec-range"),e.inArray(t.valueOf(),this.range)!=-1&&n.push("ai1ec-selected")),n},fill:function(){var t=new Date(this.viewDate),n=t.getUTCFullYear(),i=t.getUTCMonth(),s=this.o.startDate!==-Infinity?this.o.startDate.getUTCFullYear():-Infinity,o=this.o.startDate!==-Infinity?this.o.startDate.getUTCMonth():-Infinity,u=this.o.endDate!==Infinity?this.o.endDate.getUTCFullYear():Infinity,a=this.o.endDate!==Infinity?this.o.endDate.getUTCMonth():Infinity,f,l;this.picker.find(".ai1ec-datepicker-days thead th.ai1ec-datepicker-switch").text(d[this.o.language].months[i]+" "+n),this.picker.find("tfoot th.ai1ec-today").text(d[this.o.language].today).toggle(this.o.todayBtn!==!1),this.picker.find("tfoot th.ai1ec-clear").text(d[this.o.language].clear).toggle(this.o.clearBtn!==!1),this.updateNavArrows(),this.fillMonths();var c=r(n,i-1,28),h=v.getDaysInMonth(c.getUTCFullYear(),c.getUTCMonth());c.setUTCDate(h),c.setUTCDate(h-(c.getUTCDay()-this.o.weekStart+7)%7);var p=new Date(c);p.setUTCDate(p.getUTCDate()+42),p=p.valueOf();var m=[],g;while(c.valueOf()<p){if(c.getUTCDay()==this.o.weekStart){m.push("<tr>");if(this.o.calendarWeeks){var y=new Date(+c+(this.o.weekStart-c.getUTCDay()-7)%7*864e5),b=new Date(+y+(11-y.getUTCDay())%7*864e5),w=new Date(+(w=r(b.getUTCFullYear(),0,1))+(11-w.getUTCDay())%7*864e5),E=(b-w)/864e5/7+1;m.push('<td class="ai1ec-cw">'+E+"</td>")}}g=this.getClassNames(c),g.push("ai1ec-day");if(this.o.beforeShowDay!==e.noop){var S=this.o.beforeShowDay(this._utc_to_local(c));S===undefined?S={}:typeof S=="boolean"?S={enabled:S}:typeof S=="string"&&(S={classes:S}),S.enabled===!1&&g.push("ai1ec-disabled"),S.classes&&(g=g.concat(S.classes.split(/\s+/))),S.tooltip&&(f=S.tooltip)}g=e.unique(g),m.push('<td class="'+g.join(" ")+'"'+(f?' title="'+f+'"':"")+">"+c.getUTCDate()+"</td>"),c.getUTCDay()==this.o.weekEnd&&m.push("</tr>"),c.setUTCDate(c.getUTCDate()+1)}this.picker.find(".ai1ec-datepicker-days tbody").empty().append(m.join(""));var x=this.picker.find(".ai1ec-datepicker-months").find("th:eq(1)").text(n).end().find("span").removeClass("ai1ec-active");e.each(this.dates,function(e,t){t.getUTCFullYear()==n&&x.eq(t.getUTCMonth()).addClass("ai1ec-active")}),(n<s||n>u)&&x.addClass("ai1ec-disabled"),n==s&&x.slice(0,o).addClass("ai1ec-disabled"),n==u&&x.slice(a+1).addClass("ai1ec-disabled"),m="",n=parseInt(n/10,10)*10;var T=this.picker.find(".ai1ec-datepicker-years").find("th:eq(1)").text(n+"-"+(n+9)).end().find("td");n-=1;var N=e.map(this.dates,function(e){return e.getUTCFullYear()}),C;for(var k=-1;k<11;k++)C=["ai1ec-year"],k===-1?C.push("ai1ec-old"):k===10&&C.push("ai1ec-new"),e.inArray(n,N)!==-1&&C.push("ai1ec-active"),(n<s||n>u)&&C.push("ai1ec-disabled"),m+='<span class="'+C.join(" ")+'">'+n+"</span>",n+=1;T.html(m)},updateNavArrows:function(){if(!this._allow_update)return;var e=new Date(this.viewDate),t=e.getUTCFullYear(),n=e.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-Infinity&&t<=this.o.startDate.getUTCFullYear()&&n<=this.o.startDate.getUTCMonth()?this.picker.find(".ai1ec-prev").css({visibility:"hidden"}):this.picker.find(".ai1ec-prev").css({visibility:"visible"}),this.o.endDate!==Infinity&&t>=this.o.endDate.getUTCFullYear()&&n>=this.o.endDate.getUTCMonth()?this.picker.find(".ai1ec-next").css({visibility:"hidden"}):this.picker.find(".ai1ec-next").css({visibility:"visible"});break;case 1:case 2:this.o.startDate!==-Infinity&&t<=this.o.startDate.getUTCFullYear()?this.picker.find(".ai1ec-prev").css({visibility:"hidden"}):this.picker.find(".ai1ec-prev").css({visibility:"visible"}),this.o.endDate!==Infinity&&t>=this.o.endDate.getUTCFullYear()?this.picker.find(".ai1ec-next").css({visibility:"hidden"}):this.picker.find(".ai1ec-next").css({visibility:"visible"})}},click:function(t){t.preventDefault();var n=e(t.target).closest("span, td, th"),i,s,o;if(n.length==1)switch(n[0].nodeName.toLowerCase()){case"th":switch(n[0].className){case"ai1ec-datepicker-switch":this.showMode(1);break;case"ai1ec-prev":case"ai1ec-next":var u=v.modes[this.viewMode].navStep*(n[0].className=="ai1ec-prev"?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,u),this._trigger("changeMonth",this.viewDate);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,u),this.viewMode===1&&this._trigger("changeYear",this.viewDate)}this.fill();break;case"ai1ec-today":var a=new Date;a=r(a.getFullYear(),a.getMonth(),a.getDate(),0,0,0),this.showMode(-2);var f=this.o.todayBtn=="linked"?null:"view";this._setDate(a,f);break;case"ai1ec-clear":var l;this.isInput?l=this.element:this.component&&(l=this.element.find("input")),l&&l.val("").change(),this.update(),this._trigger("changeDate"),this.o.autoclose&&this.hide()}break;case"span":n.is(".ai1ec-disabled")||(this.viewDate.setUTCDate(1),n.is(".ai1ec-month")?(o=1,s=n.parent().find("span").index(n),i=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(s),this._trigger("changeMonth",this.viewDate),this.o.minViewMode===1&&this._setDate(r(i,s,o))):(o=1,s=0,i=parseInt(n.text(),10)||0,this.viewDate.setUTCFullYear(i),this._trigger("changeYear",this.viewDate),this.o.minViewMode===2&&this._setDate(r(i,s,o))),this.showMode(-1),this.fill());break;case"td":n.is(".ai1ec-day")&&!n.is(".ai1ec-disabled")&&(o=parseInt(n.text(),10)||1,i=this.viewDate.getUTCFullYear(),s=this.viewDate.getUTCMonth(),n.is(".ai1ec-old")?s===0?(s=11,i-=1):s-=1:n.is(".ai1ec-new")&&(s==11?(s=0,i+=1):s+=1),this._setDate(r(i,s,o)))}this.picker.is(":visible")&&this._focused_from&&e(this._focused_from).focus(),delete this._focused_from},_toggle_multidate:function(e){var t=this.dates.contains(e);e?t!==-1?this.dates.remove(t):this.dates.push(e):this.dates.clear();if(typeof this.o.multidate=="number")while(this.dates.length>this.o.multidate)this.dates.remove(0)},_setDate:function(e,t){(!t||t=="date")&&this._toggle_multidate(e&&new Date(e));if(!t||t=="view")this.viewDate=e&&new Date(e);this.fill(),this.setValue(),this._trigger("changeDate");var n;this.isInput?n=this.element:this.component&&(n=this.element.find("input")),n&&n.change(),this.o.autoclose&&(!t||t=="date")&&this.hide()},moveMonth:function(e,t){if(!e)return undefined;if(!t)return e;var n=new Date(e.valueOf()),r=n.getUTCDate(),i=n.getUTCMonth(),s=Math.abs(t),o,u;t=t>0?1:-1;if(s==1){u=t==-1?function(){return n.getUTCMonth()==i}:function(){return n.getUTCMonth()!=o},o=i+t,n.setUTCMonth(o);if(o<0||o>11)o=(o+12)%12}else{for(var a=0;a<s;a++)n=this.moveMonth(n,t);o=n.getUTCMonth(),n.setUTCDate(r),u=function(){return o!=n.getUTCMonth()}}while(u())n.setUTCDate(--r),n.setUTCMonth(o);return n},moveYear:function(e,t){return this.moveMonth(e,t*12)},dateWithinRange:function(e){return e>=this.o.startDate&&e<=this.o.endDate},keydown:function(e){if(this.picker.is(":not(:visible)")){e.keyCode==27&&this.show();return}var t=!1,n,r,s,o=this.focusDate||this.viewDate;switch(e.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),e.preventDefault();break;case 37:case 39:if(!this.o.keyboardNavigation)break;n=e.keyCode==37?-1:1,e.ctrlKey?(r=this.moveYear(this.dates.get(-1)||i(),n),s=this.moveYear(o,n),this._trigger("changeYear",this.viewDate)):e.shiftKey?(r=this.moveMonth(this.dates.get(-1)||i(),n),s=this.moveMonth(o,n),this._trigger("changeMonth",this.viewDate)):(r=new Date(this.dates.get(-1)||i()),r.setUTCDate(r.getUTCDate()+n),s=new Date(o),s.setUTCDate(o.getUTCDate()+n)),this.dateWithinRange(r)&&(this.focusDate=this.viewDate=s,this.setValue(),this.fill(),e.preventDefault());break;case 38:case 40:if(!this.o.keyboardNavigation)break;n=e.keyCode==38?-1:1,e.ctrlKey?(r=this.moveYear(this.dates.get(-1)||i(),n),s=this.moveYear(o,n),this._trigger("changeYear",this.viewDate)):e.shiftKey?(r=this.moveMonth(this.dates.get(-1)||i(),n),s=this.moveMonth(o,n),this._trigger("changeMonth",this.viewDate)):(r=new Date(this.dates.get(-1)||i()),r.setUTCDate(r.getUTCDate()+n*7),s=new Date(o),s.setUTCDate(o.getUTCDate()+n*7)),this.dateWithinRange(r)&&(this.focusDate=this.viewDate=s,this.setValue(),this.fill(),e.preventDefault());break;case 32:break;case 13:o=this.focusDate||this.dates.get(-1)||this.viewDate,this._toggle_multidate(o),t=!0,this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(e.preventDefault(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}if(t){this.dates.length?this._trigger("changeDate"):this._trigger("clearDate");var u;this.isInput?u=this.element:this.component&&(u=this.element.find("input")),u&&u.change()}},showMode:function(e){e&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(2,this.viewMode+e))),this.picker.find(">div").hide().filter(".ai1ec-datepicker-"+v.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()}};var a=function(t,n){this.element=e(t),this.inputs=e.map(n.inputs,function(e){return e.jquery?e[0]:e}),delete n.inputs,e(this.inputs).datepicker(n).bind("changeDate",e.proxy(this.dateUpdated,this)),this.pickers=e.map(this.inputs,function(t){return e(t).data("datepicker")}),this.updateDates()};a.prototype={updateDates:function(){this.dates=e.map(this.pickers,function(e){return e.getUTCDate()}),this.updateRanges()},updateRanges:function(){var t=e.map(this.dates,function(e){return e.valueOf()});e.each(this.pickers,function(e,n){n.setRange(t)})},dateUpdated:function(t){if(this.updating)return;this.updating=!0;var n=e(t.target).data("datepicker"),r=n.getUTCDate(),i=e.inArray(t.target,this.inputs),s=this.inputs.length;if(i==-1)return;e.each(this.pickers,function(e,t){t.getUTCDate()||t.setUTCDate(r)});if(r<this.dates[i])while(i>=0&&r<this.dates[i])this.pickers[i--].setUTCDate(r);else if(r>this.dates[i])while(i<s&&r>this.dates[i])this.pickers[i++].setUTCDate(r);this.updateDates(),delete this.updating},remove:function(){e.map(this.pickers,function(e){e.remove()}),delete this.element.data().datepicker}};var c=e.fn.datepicker;e.fn.datepicker=function(t){var n=Array.apply(null,arguments);n.shift();var r;return this.each(function(){var i=e(this),s=i.data("datepicker"),o=typeof t=="object"&&t;if(!s){var c=f(this,"date"),p=e.extend({},h,c,o),d=l(p.language),v=e.extend({},h,d,c,o);if(i.is(".ai1ec-input-daterange")||v.inputs){var m={inputs:v.inputs||i.find("input").toArray()};i.data("datepicker",s=new a(this,e.extend(v,m)))}else i.data("datepicker",s=new u(this,v))}if(typeof t=="string"&&typeof s[t]=="function"){r=s[t].apply(s,n);if(r!==undefined)return!1}}),r!==undefined?r:this};var h=e.fn.datepicker.defaults={autoclose:!1,beforeShowDay:e.noop,calendarWeeks:!1,clearBtn:!1,daysOfWeekDisabled:[],endDate:Infinity,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-Infinity,startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0},p=e.fn.datepicker.locale_opts=["format","rtl","weekStart"];e.fn.datepicker.Constructor=u;var d=e.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"}},v={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(e){return e%4===0&&e%100!==0||e%400===0},getDaysInMonth:function(e,t){return[31,v.isLeapYear(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(e){var t=e.replace(this.validParts,"\0").split("\0"),n=e.match(this.validParts);if(!t||!t.length||!n||n.length===0)throw new Error("Invalid date format.");return{separators:t,parts:n}},parseDate:function(t,n,i){if(!t)return undefined;if(t instanceof Date)return t;typeof n=="string"&&(n=v.parseFormat(n));if(/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(t)){var s=/([\-+]\d+)([dmwy])/,o=t.match(/([\-+]\d+)([dmwy])/g),a,f;t=new Date;for(var l=0;l<o.length;l++){a=s.exec(o[l]),f=parseInt(a[1]);switch(a[2]){case"d":t.setUTCDate(t.getUTCDate()+f);break;case"m":t=u.prototype.moveMonth.call(u.prototype,t,f);break;case"w":t.setUTCDate(t.getUTCDate()+f*7);break;case"y":t=u.prototype.moveYear.call(u.prototype,t,f)}}return r(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),0,0,0)}var o=t&&t.match(this.nonpunctuation)||[],t=new Date,c={},h=["yyyy","yy","M","MM","m","mm","d","dd"],p={yyyy:function(e,t){return e.setUTCFullYear(t)},yy:function(e,t){return e.setUTCFullYear(2e3+t)},m:function(e,t){if(isNaN(e))return e;t-=1;while(t<0)t+=12;t%=12,e.setUTCMonth(t);while(e.getUTCMonth()!=t)e.setUTCDate(e.getUTCDate()-1);return e},d:function(e,t){return e.setUTCDate(t)}},m,g,a;p.M=p.MM=p.mm=p.m,p.dd=p.d,t=r(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0);var y=n.parts.slice();o.length!=y.length&&(y=e(y).filter(function(t,n){return e.inArray(n,h)!==-1}).toArray());if(o.length==y.length){for(var l=0,b=y.length;l<b;l++){m=parseInt(o[l],10),a=y[l];if(isNaN(m))switch(a){case"MM":g=e(d[i].months).filter(function(){var e=this.slice(0,o[l].length),t=o[l].slice(0,e.length);return e==t}),m=e.inArray(g[0],d[i].months)+1;break;case"M":g=e(d[i].monthsShort).filter(function(){var e=this.slice(0,o[l].length),t=o[l].slice(0,e.length);return e==t}),m=e.inArray(g[0],d[i].monthsShort)+1}c[a]=m}for(var l=0,w,E;l<h.length;l++)E=h[l],E in c&&!isNaN(c[E])&&(w=new Date(t),p[E](w,c[E]),isNaN(w)||(t=w))}return t},formatDate:function(t,n,r){if(!t)return"";typeof n=="string"&&(n=v.parseFormat(n));var i={d:t.getUTCDate(),D:d[r].daysShort[t.getUTCDay()],DD:d[r].days[t.getUTCDay()],m:t.getUTCMonth()+1,M:d[r].monthsShort[t.getUTCMonth()],MM:d[r].months[t.getUTCMonth()],yy:t.getUTCFullYear().toString().substring(2),yyyy:t.getUTCFullYear()};i.dd=(i.d<10?"0":"")+i.d,i.mm=(i.m<10?"0":"")+i.m;var t=[],s=e.extend([],n.separators);for(var o=0,u=n.parts.length;o<=u;o++)s.length&&t.push(s.shift()),t.push(i[n.parts[o]]);return t.join("")},headTemplate:'<thead><tr><th class="ai1ec-prev"><i class="ai1ec-fa ai1ec-fa-arrow-left"></i></th><th colspan="5" class="ai1ec-datepicker-switch"></th><th class="ai1ec-next"><i class="ai1ec-fa ai1ec-fa-arrow-right"></i></th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="ai1ec-today"></th></tr><tr><th colspan="7" class="ai1ec-clear"></th></tr></tfoot>'};v.template='<div class="timely ai1ec-datepicker"><div class="ai1ec-datepicker-days"><table class=" ai1ec-table-condensed">'+v.headTemplate+"<tbody></tbody>"+v.footTemplate+"</table>"+"</div>"+'<div class="ai1ec-datepicker-months">'+'<table class="ai1ec-table-condensed">'+v.headTemplate+v.contTemplate+v.footTemplate+"</table>"+"</div>"+'<div class="ai1ec-datepicker-years">'+'<table class="ai1ec-table-condensed">'+v.headTemplate+v.contTemplate+v.footTemplate+"</table>"+"</div>"+"</div>",e.fn.datepicker.DPGlobal=v,e.fn.datepicker.noConflict=function(){return e.fn.datepicker=c,this},e(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(t){var n=e(this);if(n.data("datepicker"))return;t.preventDefault(),n.datepicker("show")}),e(function(){e('[data-provide="datepicker-inline"]').datepicker()});for(var m=2,g=arguments.length;m<g;m++)arguments[m].localize()}),timely.define("external_libs/bootstrap/tooltip",["jquery_timely"],function(e){var t=function(e,t){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",e,t)};t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="ai1ec-tooltip"><div class="ai1ec-tooltip-arrow"></div><div class="ai1ec-tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},t.prototype.init=function(t,n,r){this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(r);var i=this.options.trigger.split(" ");for(var s=i.length;s--;){var o=i[s];if(o=="click")this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if(o!="manual"){var u=o=="hover"?"mouseenter":"focus",a=o=="hover"?"mouseleave":"blur";this.$element.on(u+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(a+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.getOptions=function(t){return t=e.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},t.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,function(e,r){n[e]!=r&&(t[e]=r)}),t},t.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(n.timeout),n.hoverState="in";if(!n.options.delay||!n.options.delay.show)return n.show();n.timeout=setTimeout(function(){n.hoverState=="in"&&n.show()},n.options.delay.show)},t.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(n.timeout),n.hoverState="out";if(!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},t.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.tip();this.setContent(),this.options.animation&&n.addClass("ai1ec-fade");var r=typeof this.options.placement=="function"?this.options.placement.call(this,n[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,s=i.test(r);s&&(r=r.replace(i,"")||"top"),n.detach().css({top:0,left:0,display:"block"}).addClass("ai1ec-"+r),this.options.container?n.appendTo(this.options.container):n.insertAfter(this.$element);var o=this.getPosition(),u=n[0].offsetWidth,a=n[0].offsetHeight;if(s){var f=this.$element.parent(),l=r,c=document.documentElement.scrollTop||document.body.scrollTop,h=this.options.container=="body"?window.innerWidth:f.outerWidth(),p=this.options.container=="body"?window.innerHeight:f.outerHeight(),d=this.options.container=="body"?0:f.offset().left;r=r=="bottom"&&o.top+o.height+a-c>p?"top":r=="top"&&o.top-c-a<0?"bottom":r=="right"&&o.right+u>h?"left":r=="left"&&o.left-u<d?"right":r,n.removeClass("ai1ec-"+l).addClass("ai1ec-"+r)}var v=this.getCalculatedOffset(r,o,u,a);this.applyPlacement(v,r),this.$element.trigger("shown.bs."+this.type)}},t.prototype.applyPlacement=function(e,t){var n,r=this.tip(),i=r[0].offsetWidth,s=r[0].offsetHeight,o=parseInt(r.css("margin-top"),10),u=parseInt(r.css("margin-left"),10);isNaN(o)&&(o=0),isNaN(u)&&(u=0),e.top=e.top+o,e.left=e.left+u,r.offset(e).addClass("ai1ec-in");var a=r[0].offsetWidth,f=r[0].offsetHeight;t=="top"&&f!=s&&(n=!0,e.top=e.top+s-f);if(/bottom|top/.test(t)){var l=0;e.left<0&&(l=e.left*-2,e.left=0,r.offset(e),a=r[0].offsetWidth,f=r[0].offsetHeight),this.replaceArrow(l-i+a,a,"left")}else this.replaceArrow(f-s,f,"top");n&&r.offset(e)},t.prototype.replaceArrow=function(e,t,n){this.arrow().css(n,e?50*(1-e/t)+"%":"")},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle();e.find(".ai1ec-tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("ai1ec-fade ai1ec-in ai1ec-top ai1ec-bottom ai1ec-left ai1ec-right")},t.prototype.hide=function(){function i(){t.hoverState!="in"&&n.detach()}var t=this,n=this.tip(),r=e.Event("hide.bs."+this.type);this.$element.trigger(r);if(r.isDefaultPrevented())return;return n.removeClass("ai1ec-in"),e.support.transition&&this.$tip.hasClass("ai1ec-fade")?n.one(e.support.transition.end,i).emulateTransitionEnd(150):i(),this.$element.trigger("hidden.bs."+this.type),this},t.prototype.fixTitle=function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},t.prototype.hasContent=function(){return this.getTitle()},t.prototype.getPosition=function(){var t=this.$element[0];return e.extend({},typeof t.getBoundingClientRect=="function"?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},t.prototype.getCalculatedOffset=function(e,t,n,r){return e=="bottom"?{top:t.top+t.height,left:t.left+t.width/2-n/2}:e=="top"?{top:t.top-r,left:t.left+t.width/2-n/2}:e=="left"?{top:t.top+t.height/2-r/2,left:t.left-n}:{top:t.top+t.height/2-r/2,left:t.left+t.width}},t.prototype.getTitle=function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},t.prototype.tip=function(){return this.$tip=this.$tip||e(this.options.template)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".ai1ec-tooltip-arrow")},t.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},t.prototype.enable=function(){this.enabled=!0},t.prototype.disable=function(){this.enabled=!1},t.prototype.toggleEnabled=function(){this.enabled=!this.enabled},t.prototype.toggle=function(t){var n=t?e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;n.tip().hasClass("ai1ec-in")?n.leave(n):n.enter(n)},t.prototype.destroy=function(){this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("bs.tooltip"),s=typeof n=="object"&&n;i||r.data("bs.tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}),timely.define("external_libs/jquery_cookie",["jquery_timely"],function(e){function n(e){return u.raw?e:encodeURIComponent(e)}function r(e){return u.raw?e:decodeURIComponent(e)}function i(e){return n(u.json?JSON.stringify(e):String(e))}function s(e){e.indexOf('"')===0&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return e=decodeURIComponent(e.replace(t," ")),u.json?JSON.parse(e):e}catch(n){}}function o(t,n){var r=u.raw?t:s(t);return e.isFunction(n)?n(r):r}var t=/\+/g,u=e.cookie=function(t,s,a){if(s!==undefined&&!e.isFunction(s)){a=e.extend({},u.defaults,a);if(typeof a.expires=="number"){var f=a.expires,l=a.expires=new Date;l.setTime(+l+f*864e5)}return document.cookie=[n(t),"=",i(s),a.expires?"; expires="+a.expires.toUTCString():"",a.path?"; path="+a.path:"",a.domain?"; domain="+a.domain:"",a.secure?"; secure":""].join("")}var c=t?undefined:{},h=document.cookie?document.cookie.split("; "):[];for(var p=0,d=h.length;p<d;p++){var v=h[p].split("="),m=r(v.shift()),g=v.join("=");if(t&&t===m){c=o(g,s);break}!t&&(g=o(g))!==undefined&&(c[m]=g)}return c};u.defaults={},e.removeCookie=function(t,n){return e.cookie(t)===undefined?!1:(e.cookie(t,"",e.extend({},n,{expires:-1})),!e.cookie(t))}}),timely.define("scripts/admin_settings",["jquery_timely","domReady","ai1ec_config","libs/utils","scripts/setting/cache/cache_event_handlers","external_libs/bootstrap/button","libs/collapse_helper","external_libs/bootstrap/tab","external_libs/bootstrap/dropdown","external_libs/bootstrap_datepicker","external_libs/bootstrap/tooltip","external_libs/jquery_cookie"],function(e,t,n,r,i){var s=function(){var t=!0;e("#ai1ec-plugins-settings input:text").each(function(){this.value!==""&&(t=!1)}),t===!0&&e("#ai1ec-plugins-settings").remove()},o=function(t){var n=e(this).attr("href");e.cookie("ai1ec_general_settings_active_tab",n)},u=function(){var t=e("#week_view_starts_at"),r=e("#week_view_ends_at"),i=parseInt(t.val(),10),s=parseInt(r.val(),10);if(s<i)return window.alert(n.end_must_be_after_start),r.focus(),!1;var o=s-i;if(o<6)return window.alert(n.show_at_least_six_hours),r.focus(),!1},a=function(){e(".ai1ec-gzip-causes-js-failure").remove()},f=function(){e("#ai1ec_save_settings").on("click",function(t){var r=e("#require_disclaimer").is(":checked"),i=e("#disclaimer").val();!0===r&&""===i&&(alert(n.require_desclaimer),e('#ai1ec-general-settings ul.ai1ec-nav a[href="#ai1ec-advanced"]').tab("show"),e("#disclaimer").focus(),t.preventDefault())})},l=function(){t(function(){f(),a(),r.activate_saved_tab_on_page_load(e.cookie("ai1ec_general_settings_active_tab")),e(document).on("click",'#ai1ec-general-settings .ai1ec-nav a[data-toggle="ai1ec-tab"]',o),e(document).on("click","#disable_standard_filter_menu_toggler",function(e){e.preventDefault()}),e(document).on("click","#ai1ec-button-refresh",i.perform_rescan);var t=e("#exact_date");t.datepicker({autoclose:!0}),s(),e(document).on("click",".ai1ec-admin-view-settings .ai1ec-toggle-view",function(){var t=e(this),n=t.parent().index()+1;if(0===t.closest("tr").siblings().find("td:nth-child("+n+") .ai1ec-toggle-view:checked").length)return!1;if(t.parent().next("td").find(".ai1ec-toggle-default-view").is(":checked"))return!1});var n=function(){var t=e(this).closest(".ai1ec-form-group").nextAll(".ai1ec-form-group").slice(0,4);e(this).prop("checked")?t.show():t.hide()};n.apply(e("#affix_filter_menu").on("click",n)[0]),e(document).on("click",".ai1ec-admin-view-settings .ai1ec-toggle-default-view",function(){e(this).parent().prev("td").children(".ai1ec-toggle-view").prop("checked",!0)}),r.init_autoselect(),e("#ai1ec_save_settings").on("click",u),e("#show_create_event_button").trigger("ready")})};return{start:l}}),timely.require(["scripts/admin_settings"],function(e){e.start()}),timely.define("pages/admin_settings",function(){});
80
  * limitations under the License.
81
  * ======================================================================== */
82
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  /* =========================================================
84
  * bootstrap-datepicker.js
85
  * Repo: https://github.com/eternicode/bootstrap-datepicker/
122
  * limitations under the License.
123
  * ======================================================================== */
124
 
125
+ timely.define("domReady",[],function(){function u(e){var t;for(t=0;t<e.length;t++)e[t](n)}function a(){var e=r;t&&e.length&&(r=[],u(e))}function f(){t||(t=!0,o&&clearInterval(o),a())}function c(e){return t?e(n):r.push(e),c}var e=typeof window!="undefined"&&window.document,t=!e,n=e?document:null,r=[],i,s,o;if(e){if(document.addEventListener)document.addEventListener("DOMContentLoaded",f,!1),window.addEventListener("load",f,!1);else if(window.attachEvent){window.attachEvent("onload",f),s=document.createElement("div");try{i=window.frameElement===null}catch(l){}s.doScroll&&i&&window.external&&(o=setInterval(function(){try{s.doScroll(),f()}catch(e){}},30))}(document.readyState==="complete"||document.readyState==="interactive")&&f()}return c.version="2.0.0",c.load=function(e,t,n,r){r.isBuild?n(null):c(n)},c}),timely.define("external_libs/bootstrap/tab",["jquery_timely"],function(e){var t=function(t){this.element=e(t)};t.prototype.show=function(){var t=this.element,n=t.closest("ul:not(.ai1ec-dropdown-menu)"),r=t.data("target");r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("ai1ec-active"))return;var i=n.find(".ai1ec-active:last a")[0],s=e.Event("show.bs.tab",{relatedTarget:i});t.trigger(s);if(s.isDefaultPrevented())return;var o=e(r);this.activate(t.parent("li"),n),this.activate(o,o.parent(),function(){t.trigger({type:"shown.bs.tab",relatedTarget:i})})},t.prototype.activate=function(t,n,r){function o(){i.removeClass("ai1ec-active").find("> .ai1ec-dropdown-menu > .ai1ec-active").removeClass("ai1ec-active"),t.addClass("ai1ec-active"),s?(t[0].offsetWidth,t.addClass("ai1ec-in")):t.removeClass("ai1ec-fade"),t.parent(".ai1ec-dropdown-menu")&&t.closest("li.ai1ec-dropdown").addClass("ai1ec-active"),r&&r()}var i=n.find("> .ai1ec-active"),s=r&&e.support.transition&&i.hasClass("ai1ec-fade");s?i.one(e.support.transition.end,o).emulateTransitionEnd(150):o(),i.removeClass("ai1ec-in")};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("bs.tab");i||r.data("bs.tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.bs.tab.data-api",'[data-toggle="ai1ec-tab"], [data-toggle="ai1ec-pill"]',function(t){t.preventDefault(),e(this).tab("show")})}),timely.define("libs/utils",["jquery_timely","external_libs/bootstrap/tab"],function(e){var t=function(){return{is_float:function(e){return!isNaN(parseFloat(e))},is_valid_coordinate:function(e,t){var n=t?90:180;return this.is_float(e)&&Math.abs(e)<n},convert_comma_to_dot:function(e){return e.replace(",",".")},field_has_value:function(t){var n="#"+t,r=e(n),i=!1;return r.length===1&&(i=e.trim(r.val())!==""),i},make_alert:function(t,n,r){var i="";switch(n){case"error":i="ai1ec-alert ai1ec-alert-danger";break;case"success":i="ai1ec-alert ai1ec-alert-success";break;default:i="ai1ec-alert ai1ec-alert-info"}var s=e("<div />",{"class":i,html:t});if(!r){var o=e("<button>",{type:"button","class":"ai1ec-close","data-dismiss":"ai1ec-alert",text:"×"});s.prepend(o)}return s},get_ajax_url:function(){return typeof window.ajaxurl=="undefined"?"http://localhost/wordpress/wp-admin/admin-ajax.php":window.ajaxurl},isUrl:function(e){var t=/(http|https|webcal):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return t.test(e)},isValidEmail:function(e){var t=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return t.test(e)},activate_saved_tab_on_page_load:function(t){null===t||undefined===t?e("ul.ai1ec-nav a:first").tab("show"):e("ul.ai1ec-nav a[href="+t+"]").tab("show")},add_query_arg:function(e,t){if("string"!=typeof e)return!1;var n=e.indexOf("?")===-1?"?":"&";return-1!==e.indexOf(n+t[0]+"=")?e:e+n+t[0]+"="+t[1]},create_ai1ec_to_send:function(t){var n=e(t),r=[],i=["action","cat_ids","auth_ids","tag_ids","exact_date","display_filters","no_navigation","events_limit"],s=function(e){return e.replace(/\W+(.)/g,function(e,t){return t.toUpperCase()})};return e(i).each(function(e,t){var i=n.data(s(t));i&&r.push(t+"~"+i)}),r.join("|")},init_autoselect:function(){e(document).on("click",".ai1ec-autoselect",function(t){if(e(this).data("clicked")&&t.originalEvent.detail<2)return;e(this).data("clicked",!0);var n;document.body.createTextRange?(n=document.body.createTextRange(),n.moveToElementText(this),n.select()):window.getSelection&&(selection=window.getSelection(),n=document.createRange(),n.selectNodeContents(this),selection.removeAllRanges(),selection.addRange(n))})}}}();return t}),timely.define("scripts/setting/cache/cache_ajax_handlers",["jquery_timely","libs/utils"],function(e,t){var n=function(n){var r=e("#ai1ec-button-refresh"),i=e("#ai1ec-cache-scan-success"),s=e("#ai1ec-cache-scan-danger"),o;r.button("reset"),n.error?o=t.make_alert(n.message,"error"):"0"===n.state?(i.toggleClass("ai1ec-hide",!0),s.toggleClass("ai1ec-hide",!1)):(i.toggleClass("ai1ec-hide",!1),s.toggleClass("ai1ec-hide",!0))};return{handle_rescan_cache:n}}),timely.define("scripts/setting/cache/cache_event_handlers",["jquery_timely","scripts/setting/cache/cache_ajax_handlers","libs/utils"],function(e,t,n){var r=n.get_ajax_url(),i=function(){var n=e(this);n.button("loading");var i={action:"ai1ec_rescan_cache"};return e.post(r,i,t.handle_rescan_cache,"json"),!1};return{perform_rescan:i}}),timely.define("external_libs/bootstrap/button",["jquery_timely"],function(e){var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r)};t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.is("input")?"val":"html",i=n.data();e+="Text",i.resetText||n.data("resetText",n[r]()),n[r](i[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass("ai1ec-"+t).attr(t,t):n.removeClass("ai1ec-"+t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="ai1ec-buttons"]'),t=!0;if(e.length){var n=this.$element.find("input");n.prop("type")==="radio"&&(n.prop("checked")&&this.$element.hasClass("ai1ec-active")?t=!1:e.find(".ai1ec-active").removeClass("ai1ec-active")),t&&n.prop("checked",!this.$element.hasClass("ai1ec-active")).trigger("change")}t&&this.$element.toggleClass("ai1ec-active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("bs.button"),s=typeof n=="object"&&n;i||r.data("bs.button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.bs.button.data-api","[data-toggle^=ai1ec-button]",function(t){var n=e(t.target);n.hasClass("ai1ec-btn")||(n=n.closest(".ai1ec-btn")),n.button("toggle"),t.preventDefault()})}),timely.define("external_libs/bootstrap/transition",["jquery_timely"],function(e){function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(e.style[n]!==undefined)return{end:t[n]}}e.fn.emulateTransitionEnd=function(t){var n=!1,r=this;e(this).one(e.support.transition.end,function(){n=!0});var i=function(){n||e(r).trigger(e.support.transition.end)};return setTimeout(i,t),this},e(function(){e.support.transition=t()})}),timely.define("external_libs/bootstrap/collapse",["jquery_timely"],function(e){var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r),this.transitioning=null,this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.DEFAULTS={toggle:!0},t.prototype.dimension=function(){var e=this.$element.hasClass("ai1ec-width");return e?"width":"height"},t.prototype.show=function(){if(this.transitioning||this.$element.hasClass("ai1ec-in"))return;var t=e.Event("show.bs.collapse");this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.$parent&&this.$parent.find("> .ai1ec-panel > .ai1ec-in");if(n&&n.length){var r=n.data("bs.collapse");if(r&&r.transitioning)return;n.collapse("hide"),r||n.data("bs.collapse",null)}var i=this.dimension();this.$element.removeClass("ai1ec-collapse").addClass("ai1ec-collapsing")[i](0),this.transitioning=1;var s=function(){this.$element.removeClass("ai1ec-collapsing").addClass("ai1ec-in")[i]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return s.call(this);var o=e.camelCase(["scroll",i].join("-"));this.$element.one(e.support.transition.end,e.proxy(s,this)).emulateTransitionEnd(350)[i](this.$element[0][o])},t.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass("ai1ec-in"))return;var t=e.Event("hide.bs.collapse");this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("ai1ec-collapsing").removeClass("ai1ec-collapse").removeClass("ai1ec-in"),this.transitioning=1;var r=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("ai1ec-collapsing").addClass("ai1ec-collapse")};if(!e.support.transition)return r.call(this);this.$element[n](0).one(e.support.transition.end,e.proxy(r,this)).emulateTransitionEnd(350)},t.prototype.toggle=function(){this[this.$element.hasClass("ai1ec-in")?"hide":"show"]()};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("bs.collapse"),s=e.extend({},t.DEFAULTS,r.data(),typeof n=="object"&&n);i||r.data("bs.collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.bs.collapse.data-api","[data-toggle=ai1ec-collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i),o=s.data("bs.collapse"),u=o?"toggle":n.data(),a=n.attr("data-parent"),f=a&&e(a);if(!o||!o.transitioning)f&&f.find('[data-toggle=ai1ec-collapse][data-parent="'+a+'"]').not(n).addClass("ai1ec-collapsed"),n[s.hasClass("ai1ec-in")?"addClass":"removeClass"]("ai1ec-collapsed");s.collapse(u)})}),timely.define("libs/collapse_helper",["jquery_timely","domReady","external_libs/bootstrap/transition","external_libs/bootstrap/collapse"],function(e,t){t(function(){e(document).on("click",'[data-toggle="ai1ec-collapse"]',function(){e(this).toggleClass("ai1ec-active"),e(".ai1ec-fa-caret-down, .ai1ec-fa-caret-up, .ai1ec-fa-chevron-down, .ai1ec-fa-chevron-up, .ai1ec-fa-arrow-down, .ai1ec-fa-arrow-up",this).toggleClass("ai1ec-hide")})})}),timely.define("external_libs/locales/bootstrap-datepicker.bg",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.bg={days:["Неделя","Понеделник","Вторник","Сряда","Четвъртък","Петък","Събота","Неделя"],daysShort:["Нед","Пон","Вто","Сря","Чет","Пет","Съб","Нед"],daysMin:["Н","П","В","С","Ч","П","С","Н"],months:["Януари","Февруари","Март","Април","Май","Юни","Юли","Август","Септември","Октомври","Ноември","Декември"],monthsShort:["Ян","Фев","Мар","Апр","Май","Юни","Юли","Авг","Сеп","Окт","Ное","Дек"],today:"днес"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.br",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.br={days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Domingo"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb","Dom"],daysMin:["Do","Se","Te","Qu","Qu","Se","Sa","Do"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"]}}}}),timely.define("external_libs/locales/bootstrap-datepicker.cs",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.cs={days:["Neděle","Pondělí","Úterý","Středa","Čtvrtek","Pátek","Sobota","Neděle"],daysShort:["Ned","Pon","Úte","Stř","Čtv","Pát","Sob","Ned"],daysMin:["Ne","Po","Út","St","Čt","Pá","So","Ne"],months:["Leden","Únor","Březen","Duben","Květen","Červen","Červenec","Srpen","Září","Říjen","Listopad","Prosinec"],monthsShort:["Led","Úno","Bře","Dub","Kvě","Čer","Čnc","Srp","Zář","Říj","Lis","Pro"],today:"Dnes"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.da",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.da={days:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Søndag"],daysShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør","Søn"],daysMin:["Sø","Ma","Ti","On","To","Fr","Lø","Sø"],months:["Januar","Februar","Marts","April","Maj","Juni","Juli","August","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"I Dag",clear:"Nulstil"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.de",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.de={days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","Sonntag"],daysShort:["Son","Mon","Die","Mit","Don","Fre","Sam","Son"],daysMin:["So","Mo","Di","Mi","Do","Fr","Sa","So"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",clear:"Löschen",weekStart:1,format:"dd.mm.yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.es",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.es={days:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado","Domingo"],daysShort:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb","Dom"],daysMin:["Do","Lu","Ma","Mi","Ju","Vi","Sa","Do"],months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],monthsShort:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],today:"Hoy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.fi",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.fi={days:["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai","sunnuntai"],daysShort:["sun","maa","tii","kes","tor","per","lau","sun"],daysMin:["su","ma","ti","ke","to","pe","la","su"],months:["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu"],monthsShort:["tam","hel","maa","huh","tou","kes","hei","elo","syy","lok","mar","jou"],today:"tänään",weekStart:1,format:"d.m.yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.fr",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.fr={days:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi","Dimanche"],daysShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam","Dim"],daysMin:["D","L","Ma","Me","J","V","S","D"],months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],monthsShort:["Jan","Fév","Mar","Avr","Mai","Jui","Jul","Aou","Sep","Oct","Nov","Déc"],today:"Aujourd'hui",clear:"Effacer",weekStart:1,format:"dd/mm/yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.id",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.id={days:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu","Minggu"],daysShort:["Mgu","Sen","Sel","Rab","Kam","Jum","Sab","Mgu"],daysMin:["Mg","Sn","Sl","Ra","Ka","Ju","Sa","Mg"],months:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Ags","Sep","Okt","Nov","Des"],today:"Hari Ini",clear:"Kosongkan"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.is",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.is={days:["Sunnudagur","Mánudagur","Þriðjudagur","Miðvikudagur","Fimmtudagur","Föstudagur","Laugardagur","Sunnudagur"],daysShort:["Sun","Mán","Þri","Mið","Fim","Fös","Lau","Sun"],daysMin:["Su","Má","Þr","Mi","Fi","Fö","La","Su"],months:["Janúar","Febrúar","Mars","Apríl","Maí","Júní","Júlí","Ágúst","September","Október","Nóvember","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Maí","Jún","Júl","Ágú","Sep","Okt","Nóv","Des"],today:"Í Dag"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.it",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.it={days:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato","Domenica"],daysShort:["Dom","Lun","Mar","Mer","Gio","Ven","Sab","Dom"],daysMin:["Do","Lu","Ma","Me","Gi","Ve","Sa","Do"],months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],monthsShort:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],today:"Oggi",clear:"Cancella",weekStart:1,format:"dd/mm/yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.ja",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.ja={days:["日曜","月曜","火曜","水曜","木曜","金曜","土曜","日曜"],daysShort:["日","月","火","水","木","金","土","日"],daysMin:["日","月","火","水","木","金","土","日"],months:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],monthsShort:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],today:"今日",format:"yyyy/mm/dd"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.kr",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.kr={days:["일요일","월요일","화요일","수요일","목요일","금요일","토요일","일요일"],daysShort:["일","월","화","수","목","금","토","일"],daysMin:["일","월","화","수","목","금","토","일"],months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],monthsShort:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]}}}}),timely.define("external_libs/locales/bootstrap-datepicker.lt",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.lt={days:["Sekmadienis","Pirmadienis","Antradienis","Trečiadienis","Ketvirtadienis","Penktadienis","Šeštadienis","Sekmadienis"],daysShort:["S","Pr","A","T","K","Pn","Š","S"],daysMin:["Sk","Pr","An","Tr","Ke","Pn","Št","Sk"],months:["Sausis","Vasaris","Kovas","Balandis","Gegužė","Birželis","Liepa","Rugpjūtis","Rugsėjis","Spalis","Lapkritis","Gruodis"],monthsShort:["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rugp","Rugs","Spa","Lap","Gru"],today:"Šiandien",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.lv",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.lv={days:["Svētdiena","Pirmdiena","Otrdiena","Trešdiena","Ceturtdiena","Piektdiena","Sestdiena","Svētdiena"],daysShort:["Sv","P","O","T","C","Pk","S","Sv"],daysMin:["Sv","Pr","Ot","Tr","Ce","Pk","Se","Sv"],months:["Janvāris","Februāris","Marts","Aprīlis","Maijs","Jūnijs","Jūlijs","Augusts","Septembris","Oktobris","Novembris","Decembris"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jūn","Jūl","Aug","Sep","Okt","Nov","Dec"],today:"Šodien",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.ms",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.ms={days:["Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu","Ahad"],daysShort:["Aha","Isn","Sel","Rab","Kha","Jum","Sab","Aha"],daysMin:["Ah","Is","Se","Ra","Kh","Ju","Sa","Ah"],months:["Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember"],monthsShort:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Ogo","Sep","Okt","Nov","Dis"],today:"Hari Ini"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.nb",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.nb={days:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Søndag"],daysShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør","Søn"],daysMin:["Sø","Ma","Ti","On","To","Fr","Lø","Sø"],months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],today:"I Dag"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.nl",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.nl={days:["Zondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrijdag","Zaterdag","Zondag"],daysShort:["Zo","Ma","Di","Wo","Do","Vr","Za","Zo"],daysMin:["Zo","Ma","Di","Wo","Do","Vr","Za","Zo"],months:["Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mrt","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"Vandaag"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.pl",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.pl={days:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota","Niedziela"],daysShort:["Nie","Pn","Wt","Śr","Czw","Pt","So","Nie"],daysMin:["N","Pn","Wt","Śr","Cz","Pt","So","N"],months:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"],monthsShort:["Sty","Lu","Mar","Kw","Maj","Cze","Lip","Sie","Wrz","Pa","Lis","Gru"],today:"Dzisiaj",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.pt-BR",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates["pt-BR"]={days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Domingo"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb","Dom"],daysMin:["Do","Se","Te","Qu","Qu","Se","Sa","Do"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],today:"Hoje",clear:"Limpar"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.pt",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.pt={days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Domingo"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb","Dom"],daysMin:["Do","Se","Te","Qu","Qu","Se","Sa","Do"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],today:"Hoje",clear:"Limpar"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.ru",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.ru={days:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота","Воскресенье"],daysShort:["Вск","Пнд","Втр","Срд","Чтв","Птн","Суб","Вск"],daysMin:["Вс","Пн","Вт","Ср","Чт","Пт","Сб","Вс"],months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],monthsShort:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],today:"Сегодня",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.sl",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.sl={days:["Nedelja","Ponedeljek","Torek","Sreda","Četrtek","Petek","Sobota","Nedelja"],daysShort:["Ned","Pon","Tor","Sre","Čet","Pet","Sob","Ned"],daysMin:["Ne","Po","To","Sr","Če","Pe","So","Ne"],months:["Januar","Februar","Marec","April","Maj","Junij","Julij","Avgust","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Avg","Sep","Okt","Nov","Dec"],today:"Danes"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.sv",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.sv={days:["Söndag","Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag","Söndag"],daysShort:["Sön","Mån","Tis","Ons","Tor","Fre","Lör","Sön"],daysMin:["Sö","Må","Ti","On","To","Fr","Lö","Sö"],months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"I Dag",format:"yyyy-mm-dd",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.th",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.th={days:["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัส","ศุกร์","เสาร์","อาทิตย์"],daysShort:["อา","จ","อ","พ","พฤ","ศ","ส","อา"],daysMin:["อา","จ","อ","พ","พฤ","ศ","ส","อา"],months:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],monthsShort:["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."],today:"วันนี้"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.tr",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.tr={days:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi","Pazar"],daysShort:["Pz","Pzt","Sal","Çrş","Prş","Cu","Cts","Pz"],daysMin:["Pz","Pzt","Sa","Çr","Pr","Cu","Ct","Pz"],months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],monthsShort:["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"],today:"Bugün",format:"dd.mm.yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.zh-CN",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates["zh-CN"]={days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日"],daysShort:["周日","周一","周二","周三","周四","周五","周六","周日"],daysMin:["日","一","二","三","四","五","六","日"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今日",format:"yyyy年mm月dd日",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.zh-TW",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates["zh-TW"]={days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日"],daysShort:["週日","週一","週二","週三","週四","週五","週六","週日"],daysMin:["日","一","二","三","四","五","六","日"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今天",format:"yyyy年mm月dd日",weekStart:1}}}}),timely.define("external_libs/bootstrap_datepicker",["jquery_timely","ai1ec_config","external_libs/locales/bootstrap-datepicker.bg","external_libs/locales/bootstrap-datepicker.br","external_libs/locales/bootstrap-datepicker.cs","external_libs/locales/bootstrap-datepicker.da","external_libs/locales/bootstrap-datepicker.de","external_libs/locales/bootstrap-datepicker.es","external_libs/locales/bootstrap-datepicker.fi","external_libs/locales/bootstrap-datepicker.fr","external_libs/locales/bootstrap-datepicker.id","external_libs/locales/bootstrap-datepicker.is","external_libs/locales/bootstrap-datepicker.it","external_libs/locales/bootstrap-datepicker.ja","external_libs/locales/bootstrap-datepicker.kr","external_libs/locales/bootstrap-datepicker.lt","external_libs/locales/bootstrap-datepicker.lv","external_libs/locales/bootstrap-datepicker.ms","external_libs/locales/bootstrap-datepicker.nb","external_libs/locales/bootstrap-datepicker.nl","external_libs/locales/bootstrap-datepicker.pl","external_libs/locales/bootstrap-datepicker.pt-BR","external_libs/locales/bootstrap-datepicker.pt","external_libs/locales/bootstrap-datepicker.ru","external_libs/locales/bootstrap-datepicker.sl","external_libs/locales/bootstrap-datepicker.sv","external_libs/locales/bootstrap-datepicker.th","external_libs/locales/bootstrap-datepicker.tr","external_libs/locales/bootstrap-datepicker.zh-CN","external_libs/locales/bootstrap-datepicker.zh-TW"],function(e,t){function r(){return new Date(Date.UTC.apply(Date,arguments))}function i(){var e=new Date;return r(e.getFullYear(),e.getMonth(),e.getDate())}function s(e){return function(){return this[e].apply(this,arguments)}}function f(t,n){var r=e(t).data(),i={},s,o=new RegExp("^"+n.toLowerCase()+"([A-Z])"),n=new RegExp("^"+n.toLowerCase());for(var u in r)n.test(u)&&(s=u.replace(o,function(e,t){return t.toLowerCase()}),i[s]=r[u]);return i}function l(t){var n={};if(!d[t]){t=t.split("-")[0];if(!d[t])return}var r=d[t];return e.each(p,function(e,t){t in r&&(n[t]=r[t])}),n}var n=e(window),o=function(){var t={get:function(e){return this.slice(e)[0]},contains:function(e){var t=e&&e.valueOf();for(var n=0,r=this.length;n<r;n++)if(this[n].valueOf()===t)return n;return-1},remove:function(e){this.splice(e,1)},replace:function(t){if(!t)return;e.isArray(t)||(t=[t]),this.clear(),this.push.apply(this,t)},clear:function(){this.splice(0)},copy:function(){var e=new o;return e.replace(this),e}};return function(){var n=[];return n.push.apply(n,arguments),e.extend(n,t),n}}(),u=function(t,n){this.dates=new o,this.viewDate=i(),this.focusDate=null,this._process_options(n),this.element=e(t),this.isInline=!1,this.isInput=this.element.is("input"),this.component=this.element.is(".ai1ec-date")?this.element.find(".ai1ec-input-group, .ai1ec-input-group-addon, .ai1ec-btn"):!1,this.hasInput=this.component&&this.element.find("input").length,this.component&&this.component.length===0&&(this.component=!1),this.picker=e(v.template),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("ai1ec-datepicker-inline").appendTo(this.element):this.picker.addClass("ai1ec-datepicker-dropdown ai1ec-dropdown-menu"),this.o.rtl&&this.picker.addClass("ai1ec-datepicker-rtl"),this.viewMode=this.o.startView,this.o.calendarWeeks&&this.picker.find("tfoot th.ai1ec-today").attr("colspan",function(e,t){return parseInt(t)+1}),this._allow_update=!1,this.setStartDate(this._o.startDate),this.setEndDate(this._o.endDate),this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled),this.fillDow(),this.fillMonths(),this._allow_update=!0,this.update(),this.showMode(),this.isInline&&this.show()};u.prototype={constructor:u,_process_options:function(n){this._o=e.extend({},this._o,n);var r=this.o=e.extend({},this._o),i=r.language;d[i]||(i=i.split("-")[0],d[i]||(i=t.language,d[i]||(i=h.language))),r.language=i;switch(r.startView){case 2:case"decade":r.startView=2;break;case 1:case"year":r.startView=1;break;default:r.startView=0}switch(r.minViewMode){case 1:case"months":r.minViewMode=1;break;case 2:case"years":r.minViewMode=2;break;default:r.minViewMode=0}r.startView=Math.max(r.startView,r.minViewMode),r.multidate!==!0&&(r.multidate=Number(r.multidate)||!1,r.multidate!==!1?r.multidate=Math.max(0,r.multidate):r.multidate=1),r.multidateSeparator=String(r.multidateSeparator),r.weekStart%=7,r.weekEnd=(r.weekStart+6)%7;var s=v.parseFormat(r.format);r.startDate!==-Infinity&&(r.startDate?r.startDate instanceof Date?r.startDate=this._local_to_utc(this._zero_time(r.startDate)):r.startDate=v.parseDate(r.startDate,s,r.language):r.startDate=-Infinity),r.endDate!==Infinity&&(r.endDate?r.endDate instanceof Date?r.endDate=this._local_to_utc(this._zero_time(r.endDate)):r.endDate=v.parseDate(r.endDate,s,r.language):r.endDate=Infinity),r.daysOfWeekDisabled=r.daysOfWeekDisabled||[],e.isArray(r.daysOfWeekDisabled)||(r.daysOfWeekDisabled=r.daysOfWeekDisabled.split(/[,\s]*/)),r.daysOfWeekDisabled=e.map(r.daysOfWeekDisabled,function(e){return parseInt(e,10)});var o=String(r.orientation).toLowerCase().split(/\s+/g),u=r.orientation.toLowerCase();o=e.grep(o,function(e){return/^auto|left|right|top|bottom$/.test(e)}),r.orientation={x:"auto",y:"auto"};if(!!u&&u!=="auto")if(o.length===1)switch(o[0]){case"top":case"bottom":r.orientation.y=o[0];break;case"left":case"right":r.orientation.x=o[0]}else u=e.grep(o,function(e){return/^left|right$/.test(e)}),r.orientation.x=u[0]||"auto",u=e.grep(o,function(e){return/^top|bottom$/.test(e)}),r.orientation.y=u[0]||"auto"},_events:[],_secondaryEvents:[],_applyEvents:function(e){for(var t=0,n,r,i;t<e.length;t++)n=e[t][0],e[t].length==2?(r=undefined,i=e[t][1]):e[t].length==3&&(r=e[t][1],i=e[t][2]),n.on(i,r)},_unapplyEvents:function(e){for(var t=0,n,r,i;t<e.length;t++)n=e[t][0],e[t].length==2?(i=undefined,r=e[t][1]):e[t].length==3&&(i=e[t][1],r=e[t][2]),n.off(r,i)},_buildEvents:function(){this.isInput?this._events=[[this.element,{focus:e.proxy(this.show,this),keyup:e.proxy(function(t){e.inArray(t.keyCode,[27,37,39,38,40,32,13,9])===-1&&this.update()},this),keydown:e.proxy(this.keydown,this)}]]:this.component&&this.hasInput?this._events=[[this.element.find("input"),{focus:e.proxy(this.show,this),keyup:e.proxy(function(t){e.inArray(t.keyCode,[27,37,39,38,40,32,13,9])===-1&&this.update()},this),keydown:e.proxy(this.keydown,this)}],[this.component,{click:e.proxy(this.show,this)}]]:this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:e.proxy(this.show,this)}]],this._events.push([this.element,"*",{blur:e.proxy(function(e){this._focused_from=e.target},this)}],[this.element,{blur:e.proxy(function(e){this._focused_from=e.target},this)}]),this._secondaryEvents=[[this.picker,{click:e.proxy(this.click,this)}],[e(window),{resize:e.proxy(this.place,this)}],[e(document),{"mousedown touchstart":e.proxy(function(e){this.element.is(e.target)||this.element.find(e.target).length||this.picker.is(e.target)||this.picker.find(e.target).length||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(t,n){var r=n||this.dates.get(-1),i=this._utc_to_local(r);this.element.trigger({type:t,date:i,dates:e.map(this.dates,this._utc_to_local),format:e.proxy(function(e,t){arguments.length===0?(e=this.dates.length-1,t=this.o.format):typeof e=="string"&&(t=e,e=this.dates.length-1),t=t||this.o.format;var n=this.dates.get(e);return v.formatDate(n,t,this.o.language)},this)})},show:function(e){this.isInline||this.picker.appendTo("body"),this.picker.show(),this.height=this.component?this.component.outerHeight():this.element.outerHeight(),this.place(),this._attachSecondaryEvents(),this._trigger("show")},hide:function(){if(this.isInline)return;if(!this.picker.is(":visible"))return;this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.viewMode=this.o.startView,this.showMode(),this.o.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this._trigger("hide")},remove:function(){this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date},_utc_to_local:function(e){return e&&new Date(e.getTime()+e.getTimezoneOffset()*6e4)},_local_to_utc:function(e){return e&&new Date(e.getTime()-e.getTimezoneOffset()*6e4)},_zero_time:function(e){return e&&new Date(e.getFullYear(),e.getMonth(),e.getDate())},_zero_utc_time:function(e){return e&&new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))},getDates:function(){return e.map(this.dates,this._utc_to_local)},getUTCDates:function(){return e.map(this.dates,function(e){return new Date(e)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){return new Date(this.dates.get(-1))},setDates:function(){this.update.apply(this,arguments),this._trigger("changeDate"),this.setValue()},setUTCDates:function(){this.update.apply(this,e.map(arguments,this._utc_to_local)),this._trigger("changeDate"),this.setValue()},setDate:s("setDates"),setUTCDate:s("setUTCDates"),setValue:function(){var e=this.getFormattedDate();this.isInput?this.element.val(e).change():this.component&&this.element.find("input").val(e).change()},getFormattedDate:function(t){t===undefined&&(t=this.o.format);var n=this.o.language;return e.map(this.dates,function(e){return v.formatDate(e,t,n)}).join(this.o.multidateSeparator)},setStartDate:function(e){this._process_options({startDate:e}),this.update(),this.updateNavArrows()},setEndDate:function(e){this._process_options({endDate:e}),this.update(),this.updateNavArrows()},setDaysOfWeekDisabled:function(e){this._process_options({daysOfWeekDisabled:e}),this.update(),this.updateNavArrows()},place:function(){if(this.isInline)return;var t=this.picker.outerWidth(),r=this.picker.outerHeight(),i=10,s=n.width(),o=n.height(),u=n.scrollTop(),a=parseInt(this.element.parents().filter(function(){return e(this).css("z-index")!="auto"}).first().css("z-index"))+10,f=this.component?this.component.parent().offset():this.element.offset(),l=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),c=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),h=f.left,p=f.top;this.picker.removeClass("ai1ec-datepicker-orient-top ai1ec-datepicker-orient-bottom ai1ec-datepicker-orient-right ai1ec-datepicker-orient-left"),this.o.orientation.x!=="auto"?(this.picker.addClass("ai1ec-datepicker-orient-"+this.o.orientation.x),this.o.orientation.x==="right"&&(h-=t-c)):(this.picker.addClass("ai1ec-datepicker-orient-left"),f.left<0?h-=f.left-i:f.left+t>s&&(h=s-t-i));var d=this.o.orientation.y,v,m;d==="auto"&&(v=-u+f.top-r,m=u+o-(f.top+l+r),Math.max(v,m)===m?d="top":d="bottom"),this.picker.addClass("ai1ec-datepicker-orient-"+d),d==="top"?p+=l:p-=r+parseInt(this.picker.css("padding-top")),this.picker.css({top:p,left:h,zIndex:a})},_allow_update:!0,update:function(){if(!this._allow_update)return;var t=this.dates.copy(),n=[],r=!1;arguments.length?(e.each(arguments,e.proxy(function(e,t){t instanceof Date&&(t=this._local_to_utc(t)),n.push(t)},this)),r=!0):(n=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),n&&this.o.multidate?n=n.split(this.o.multidateSeparator):n=[n],delete this.element.data().date),n=e.map(n,e.proxy(function(e){return v.parseDate(e,this.o.format,this.o.language)},this)),n=e.grep(n,e.proxy(function(e){return e<this.o.startDate||e>this.o.endDate||!e},this),!0),this.dates.replace(n),this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate&&(this.viewDate=new Date(this.o.endDate)),r?this.setValue():n.length&&String(t)!==String(this.dates)&&this._trigger("changeDate"),!this.dates.length&&t.length&&this._trigger("clearDate"),this.fill()},fillDow:function(){var e=this.o.weekStart,t="<tr>";if(this.o.calendarWeeks){var n='<th class="ai1ec-cw">&nbsp;</th>';t+=n,this.picker.find(".ai1ec-datepicker-days thead tr:first-child").prepend(n)}while(e<this.o.weekStart+7)t+='<th class="ai1ec-dow">'+d[this.o.language].daysMin[e++%7]+"</th>";t+="</tr>",this.picker.find(".ai1ec-datepicker-days thead").append(t)},fillMonths:function(){var e="",t=0;while(t<12)e+='<span class="ai1ec-month">'+d[this.o.language].monthsShort[t++]+"</span>";this.picker.find(".ai1ec-datepicker-months td").html(e)},setRange:function(t){!t||!t.length?delete this.range:this.range=e.map(t,function(e){return e.valueOf()}),this.fill()},getClassNames:function(t){var n=[],r=this.viewDate.getUTCFullYear(),i=this.viewDate.getUTCMonth(),s=new Date;return t.getUTCFullYear()<r||t.getUTCFullYear()==r&&t.getUTCMonth()<i?n.push("ai1ec-old"):(t.getUTCFullYear()>r||t.getUTCFullYear()==r&&t.getUTCMonth()>i)&&n.push("ai1ec-new"),this.focusDate&&t.valueOf()===this.focusDate.valueOf()&&n.push("ai1ec-focused"),this.o.todayHighlight&&t.getUTCFullYear()==s.getFullYear()&&t.getUTCMonth()==s.getMonth()&&t.getUTCDate()==s.getDate()&&n.push("ai1ec-today"),this.dates.contains(t)!==-1&&n.push("ai1ec-active"),(t.valueOf()<this.o.startDate||t.valueOf()>this.o.endDate||e.inArray(t.getUTCDay(),this.o.daysOfWeekDisabled)!==-1)&&n.push("ai1ec-disabled"),this.range&&(t>this.range[0]&&t<this.range[this.range.length-1]&&n.push("ai1ec-range"),e.inArray(t.valueOf(),this.range)!=-1&&n.push("ai1ec-selected")),n},fill:function(){var t=new Date(this.viewDate),n=t.getUTCFullYear(),i=t.getUTCMonth(),s=this.o.startDate!==-Infinity?this.o.startDate.getUTCFullYear():-Infinity,o=this.o.startDate!==-Infinity?this.o.startDate.getUTCMonth():-Infinity,u=this.o.endDate!==Infinity?this.o.endDate.getUTCFullYear():Infinity,a=this.o.endDate!==Infinity?this.o.endDate.getUTCMonth():Infinity,f,l;this.picker.find(".ai1ec-datepicker-days thead th.ai1ec-datepicker-switch").text(d[this.o.language].months[i]+" "+n),this.picker.find("tfoot th.ai1ec-today").text(d[this.o.language].today).toggle(this.o.todayBtn!==!1),this.picker.find("tfoot th.ai1ec-clear").text(d[this.o.language].clear).toggle(this.o.clearBtn!==!1),this.updateNavArrows(),this.fillMonths();var c=r(n,i-1,28),h=v.getDaysInMonth(c.getUTCFullYear(),c.getUTCMonth());c.setUTCDate(h),c.setUTCDate(h-(c.getUTCDay()-this.o.weekStart+7)%7);var p=new Date(c);p.setUTCDate(p.getUTCDate()+42),p=p.valueOf();var m=[],g;while(c.valueOf()<p){if(c.getUTCDay()==this.o.weekStart){m.push("<tr>");if(this.o.calendarWeeks){var y=new Date(+c+(this.o.weekStart-c.getUTCDay()-7)%7*864e5),b=new Date(+y+(11-y.getUTCDay())%7*864e5),w=new Date(+(w=r(b.getUTCFullYear(),0,1))+(11-w.getUTCDay())%7*864e5),E=(b-w)/864e5/7+1;m.push('<td class="ai1ec-cw">'+E+"</td>")}}g=this.getClassNames(c),g.push("ai1ec-day");if(this.o.beforeShowDay!==e.noop){var S=this.o.beforeShowDay(this._utc_to_local(c));S===undefined?S={}:typeof S=="boolean"?S={enabled:S}:typeof S=="string"&&(S={classes:S}),S.enabled===!1&&g.push("ai1ec-disabled"),S.classes&&(g=g.concat(S.classes.split(/\s+/))),S.tooltip&&(f=S.tooltip)}g=e.unique(g),m.push('<td class="'+g.join(" ")+'"'+(f?' title="'+f+'"':"")+">"+c.getUTCDate()+"</td>"),c.getUTCDay()==this.o.weekEnd&&m.push("</tr>"),c.setUTCDate(c.getUTCDate()+1)}this.picker.find(".ai1ec-datepicker-days tbody").empty().append(m.join(""));var x=this.picker.find(".ai1ec-datepicker-months").find("th:eq(1)").text(n).end().find("span").removeClass("ai1ec-active");e.each(this.dates,function(e,t){t.getUTCFullYear()==n&&x.eq(t.getUTCMonth()).addClass("ai1ec-active")}),(n<s||n>u)&&x.addClass("ai1ec-disabled"),n==s&&x.slice(0,o).addClass("ai1ec-disabled"),n==u&&x.slice(a+1).addClass("ai1ec-disabled"),m="",n=parseInt(n/10,10)*10;var T=this.picker.find(".ai1ec-datepicker-years").find("th:eq(1)").text(n+"-"+(n+9)).end().find("td");n-=1;var N=e.map(this.dates,function(e){return e.getUTCFullYear()}),C;for(var k=-1;k<11;k++)C=["ai1ec-year"],k===-1?C.push("ai1ec-old"):k===10&&C.push("ai1ec-new"),e.inArray(n,N)!==-1&&C.push("ai1ec-active"),(n<s||n>u)&&C.push("ai1ec-disabled"),m+='<span class="'+C.join(" ")+'">'+n+"</span>",n+=1;T.html(m)},updateNavArrows:function(){if(!this._allow_update)return;var e=new Date(this.viewDate),t=e.getUTCFullYear(),n=e.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-Infinity&&t<=this.o.startDate.getUTCFullYear()&&n<=this.o.startDate.getUTCMonth()?this.picker.find(".ai1ec-prev").css({visibility:"hidden"}):this.picker.find(".ai1ec-prev").css({visibility:"visible"}),this.o.endDate!==Infinity&&t>=this.o.endDate.getUTCFullYear()&&n>=this.o.endDate.getUTCMonth()?this.picker.find(".ai1ec-next").css({visibility:"hidden"}):this.picker.find(".ai1ec-next").css({visibility:"visible"});break;case 1:case 2:this.o.startDate!==-Infinity&&t<=this.o.startDate.getUTCFullYear()?this.picker.find(".ai1ec-prev").css({visibility:"hidden"}):this.picker.find(".ai1ec-prev").css({visibility:"visible"}),this.o.endDate!==Infinity&&t>=this.o.endDate.getUTCFullYear()?this.picker.find(".ai1ec-next").css({visibility:"hidden"}):this.picker.find(".ai1ec-next").css({visibility:"visible"})}},click:function(t){t.preventDefault();var n=e(t.target).closest("span, td, th"),i,s,o;if(n.length==1)switch(n[0].nodeName.toLowerCase()){case"th":switch(n[0].className){case"ai1ec-datepicker-switch":this.showMode(1);break;case"ai1ec-prev":case"ai1ec-next":var u=v.modes[this.viewMode].navStep*(n[0].className=="ai1ec-prev"?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,u),this._trigger("changeMonth",this.viewDate);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,u),this.viewMode===1&&this._trigger("changeYear",this.viewDate)}this.fill();break;case"ai1ec-today":var a=new Date;a=r(a.getFullYear(),a.getMonth(),a.getDate(),0,0,0),this.showMode(-2);var f=this.o.todayBtn=="linked"?null:"view";this._setDate(a,f);break;case"ai1ec-clear":var l;this.isInput?l=this.element:this.component&&(l=this.element.find("input")),l&&l.val("").change(),this.update(),this._trigger("changeDate"),this.o.autoclose&&this.hide()}break;case"span":n.is(".ai1ec-disabled")||(this.viewDate.setUTCDate(1),n.is(".ai1ec-month")?(o=1,s=n.parent().find("span").index(n),i=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(s),this._trigger("changeMonth",this.viewDate),this.o.minViewMode===1&&this._setDate(r(i,s,o))):(o=1,s=0,i=parseInt(n.text(),10)||0,this.viewDate.setUTCFullYear(i),this._trigger("changeYear",this.viewDate),this.o.minViewMode===2&&this._setDate(r(i,s,o))),this.showMode(-1),this.fill());break;case"td":n.is(".ai1ec-day")&&!n.is(".ai1ec-disabled")&&(o=parseInt(n.text(),10)||1,i=this.viewDate.getUTCFullYear(),s=this.viewDate.getUTCMonth(),n.is(".ai1ec-old")?s===0?(s=11,i-=1):s-=1:n.is(".ai1ec-new")&&(s==11?(s=0,i+=1):s+=1),this._setDate(r(i,s,o)))}this.picker.is(":visible")&&this._focused_from&&e(this._focused_from).focus(),delete this._focused_from},_toggle_multidate:function(e){var t=this.dates.contains(e);e?t!==-1?this.dates.remove(t):this.dates.push(e):this.dates.clear();if(typeof this.o.multidate=="number")while(this.dates.length>this.o.multidate)this.dates.remove(0)},_setDate:function(e,t){(!t||t=="date")&&this._toggle_multidate(e&&new Date(e));if(!t||t=="view")this.viewDate=e&&new Date(e);this.fill(),this.setValue(),this._trigger("changeDate");var n;this.isInput?n=this.element:this.component&&(n=this.element.find("input")),n&&n.change(),this.o.autoclose&&(!t||t=="date")&&this.hide()},moveMonth:function(e,t){if(!e)return undefined;if(!t)return e;var n=new Date(e.valueOf()),r=n.getUTCDate(),i=n.getUTCMonth(),s=Math.abs(t),o,u;t=t>0?1:-1;if(s==1){u=t==-1?function(){return n.getUTCMonth()==i}:function(){return n.getUTCMonth()!=o},o=i+t,n.setUTCMonth(o);if(o<0||o>11)o=(o+12)%12}else{for(var a=0;a<s;a++)n=this.moveMonth(n,t);o=n.getUTCMonth(),n.setUTCDate(r),u=function(){return o!=n.getUTCMonth()}}while(u())n.setUTCDate(--r),n.setUTCMonth(o);return n},moveYear:function(e,t){return this.moveMonth(e,t*12)},dateWithinRange:function(e){return e>=this.o.startDate&&e<=this.o.endDate},keydown:function(e){if(this.picker.is(":not(:visible)")){e.keyCode==27&&this.show();return}var t=!1,n,r,s,o=this.focusDate||this.viewDate;switch(e.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),e.preventDefault();break;case 37:case 39:if(!this.o.keyboardNavigation)break;n=e.keyCode==37?-1:1,e.ctrlKey?(r=this.moveYear(this.dates.get(-1)||i(),n),s=this.moveYear(o,n),this._trigger("changeYear",this.viewDate)):e.shiftKey?(r=this.moveMonth(this.dates.get(-1)||i(),n),s=this.moveMonth(o,n),this._trigger("changeMonth",this.viewDate)):(r=new Date(this.dates.get(-1)||i()),r.setUTCDate(r.getUTCDate()+n),s=new Date(o),s.setUTCDate(o.getUTCDate()+n)),this.dateWithinRange(r)&&(this.focusDate=this.viewDate=s,this.setValue(),this.fill(),e.preventDefault());break;case 38:case 40:if(!this.o.keyboardNavigation)break;n=e.keyCode==38?-1:1,e.ctrlKey?(r=this.moveYear(this.dates.get(-1)||i(),n),s=this.moveYear(o,n),this._trigger("changeYear",this.viewDate)):e.shiftKey?(r=this.moveMonth(this.dates.get(-1)||i(),n),s=this.moveMonth(o,n),this._trigger("changeMonth",this.viewDate)):(r=new Date(this.dates.get(-1)||i()),r.setUTCDate(r.getUTCDate()+n*7),s=new Date(o),s.setUTCDate(o.getUTCDate()+n*7)),this.dateWithinRange(r)&&(this.focusDate=this.viewDate=s,this.setValue(),this.fill(),e.preventDefault());break;case 32:break;case 13:o=this.focusDate||this.dates.get(-1)||this.viewDate,this._toggle_multidate(o),t=!0,this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(e.preventDefault(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}if(t){this.dates.length?this._trigger("changeDate"):this._trigger("clearDate");var u;this.isInput?u=this.element:this.component&&(u=this.element.find("input")),u&&u.change()}},showMode:function(e){e&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(2,this.viewMode+e))),this.picker.find(">div").hide().filter(".ai1ec-datepicker-"+v.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()}};var a=function(t,n){this.element=e(t),this.inputs=e.map(n.inputs,function(e){return e.jquery?e[0]:e}),delete n.inputs,e(this.inputs).datepicker(n).bind("changeDate",e.proxy(this.dateUpdated,this)),this.pickers=e.map(this.inputs,function(t){return e(t).data("datepicker")}),this.updateDates()};a.prototype={updateDates:function(){this.dates=e.map(this.pickers,function(e){return e.getUTCDate()}),this.updateRanges()},updateRanges:function(){var t=e.map(this.dates,function(e){return e.valueOf()});e.each(this.pickers,function(e,n){n.setRange(t)})},dateUpdated:function(t){if(this.updating)return;this.updating=!0;var n=e(t.target).data("datepicker"),r=n.getUTCDate(),i=e.inArray(t.target,this.inputs),s=this.inputs.length;if(i==-1)return;e.each(this.pickers,function(e,t){t.getUTCDate()||t.setUTCDate(r)});if(r<this.dates[i])while(i>=0&&r<this.dates[i])this.pickers[i--].setUTCDate(r);else if(r>this.dates[i])while(i<s&&r>this.dates[i])this.pickers[i++].setUTCDate(r);this.updateDates(),delete this.updating},remove:function(){e.map(this.pickers,function(e){e.remove()}),delete this.element.data().datepicker}};var c=e.fn.datepicker;e.fn.datepicker=function(t){var n=Array.apply(null,arguments);n.shift();var r;return this.each(function(){var i=e(this),s=i.data("datepicker"),o=typeof t=="object"&&t;if(!s){var c=f(this,"date"),p=e.extend({},h,c,o),d=l(p.language),v=e.extend({},h,d,c,o);if(i.is(".ai1ec-input-daterange")||v.inputs){var m={inputs:v.inputs||i.find("input").toArray()};i.data("datepicker",s=new a(this,e.extend(v,m)))}else i.data("datepicker",s=new u(this,v))}if(typeof t=="string"&&typeof s[t]=="function"){r=s[t].apply(s,n);if(r!==undefined)return!1}}),r!==undefined?r:this};var h=e.fn.datepicker.defaults={autoclose:!1,beforeShowDay:e.noop,calendarWeeks:!1,clearBtn:!1,daysOfWeekDisabled:[],endDate:Infinity,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-Infinity,startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0},p=e.fn.datepicker.locale_opts=["format","rtl","weekStart"];e.fn.datepicker.Constructor=u;var d=e.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"}},v={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(e){return e%4===0&&e%100!==0||e%400===0},getDaysInMonth:function(e,t){return[31,v.isLeapYear(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(e){var t=e.replace(this.validParts,"\0").split("\0"),n=e.match(this.validParts);if(!t||!t.length||!n||n.length===0)throw new Error("Invalid date format.");return{separators:t,parts:n}},parseDate:function(t,n,i){if(!t)return undefined;if(t instanceof Date)return t;typeof n=="string"&&(n=v.parseFormat(n));if(/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(t)){var s=/([\-+]\d+)([dmwy])/,o=t.match(/([\-+]\d+)([dmwy])/g),a,f;t=new Date;for(var l=0;l<o.length;l++){a=s.exec(o[l]),f=parseInt(a[1]);switch(a[2]){case"d":t.setUTCDate(t.getUTCDate()+f);break;case"m":t=u.prototype.moveMonth.call(u.prototype,t,f);break;case"w":t.setUTCDate(t.getUTCDate()+f*7);break;case"y":t=u.prototype.moveYear.call(u.prototype,t,f)}}return r(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),0,0,0)}var o=t&&t.match(this.nonpunctuation)||[],t=new Date,c={},h=["yyyy","yy","M","MM","m","mm","d","dd"],p={yyyy:function(e,t){return e.setUTCFullYear(t)},yy:function(e,t){return e.setUTCFullYear(2e3+t)},m:function(e,t){if(isNaN(e))return e;t-=1;while(t<0)t+=12;t%=12,e.setUTCMonth(t);while(e.getUTCMonth()!=t)e.setUTCDate(e.getUTCDate()-1);return e},d:function(e,t){return e.setUTCDate(t)}},m,g,a;p.M=p.MM=p.mm=p.m,p.dd=p.d,t=r(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0);var y=n.parts.slice();o.length!=y.length&&(y=e(y).filter(function(t,n){return e.inArray(n,h)!==-1}).toArray());if(o.length==y.length){for(var l=0,b=y.length;l<b;l++){m=parseInt(o[l],10),a=y[l];if(isNaN(m))switch(a){case"MM":g=e(d[i].months).filter(function(){var e=this.slice(0,o[l].length),t=o[l].slice(0,e.length);return e==t}),m=e.inArray(g[0],d[i].months)+1;break;case"M":g=e(d[i].monthsShort).filter(function(){var e=this.slice(0,o[l].length),t=o[l].slice(0,e.length);return e==t}),m=e.inArray(g[0],d[i].monthsShort)+1}c[a]=m}for(var l=0,w,E;l<h.length;l++)E=h[l],E in c&&!isNaN(c[E])&&(w=new Date(t),p[E](w,c[E]),isNaN(w)||(t=w))}return t},formatDate:function(t,n,r){if(!t)return"";typeof n=="string"&&(n=v.parseFormat(n));var i={d:t.getUTCDate(),D:d[r].daysShort[t.getUTCDay()],DD:d[r].days[t.getUTCDay()],m:t.getUTCMonth()+1,M:d[r].monthsShort[t.getUTCMonth()],MM:d[r].months[t.getUTCMonth()],yy:t.getUTCFullYear().toString().substring(2),yyyy:t.getUTCFullYear()};i.dd=(i.d<10?"0":"")+i.d,i.mm=(i.m<10?"0":"")+i.m;var t=[],s=e.extend([],n.separators);for(var o=0,u=n.parts.length;o<=u;o++)s.length&&t.push(s.shift()),t.push(i[n.parts[o]]);return t.join("")},headTemplate:'<thead><tr><th class="ai1ec-prev"><i class="ai1ec-fa ai1ec-fa-arrow-left"></i></th><th colspan="5" class="ai1ec-datepicker-switch"></th><th class="ai1ec-next"><i class="ai1ec-fa ai1ec-fa-arrow-right"></i></th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="ai1ec-today"></th></tr><tr><th colspan="7" class="ai1ec-clear"></th></tr></tfoot>'};v.template='<div class="timely ai1ec-datepicker"><div class="ai1ec-datepicker-days"><table class=" ai1ec-table-condensed">'+v.headTemplate+"<tbody></tbody>"+v.footTemplate+"</table>"+"</div>"+'<div class="ai1ec-datepicker-months">'+'<table class="ai1ec-table-condensed">'+v.headTemplate+v.contTemplate+v.footTemplate+"</table>"+"</div>"+'<div class="ai1ec-datepicker-years">'+'<table class="ai1ec-table-condensed">'+v.headTemplate+v.contTemplate+v.footTemplate+"</table>"+"</div>"+"</div>",e.fn.datepicker.DPGlobal=v,e.fn.datepicker.noConflict=function(){return e.fn.datepicker=c,this},e(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(t){var n=e(this);if(n.data("datepicker"))return;t.preventDefault(),n.datepicker("show")}),e(function(){e('[data-provide="datepicker-inline"]').datepicker()});for(var m=2,g=arguments.length;m<g;m++)arguments[m].localize()}),timely.define("external_libs/bootstrap/tooltip",["jquery_timely"],function(e){var t=function(e,t){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",e,t)};t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="ai1ec-tooltip"><div class="ai1ec-tooltip-arrow"></div><div class="ai1ec-tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},t.prototype.init=function(t,n,r){this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(r);var i=this.options.trigger.split(" ");for(var s=i.length;s--;){var o=i[s];if(o=="click")this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if(o!="manual"){var u=o=="hover"?"mouseenter":"focus",a=o=="hover"?"mouseleave":"blur";this.$element.on(u+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(a+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.getOptions=function(t){return t=e.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},t.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,function(e,r){n[e]!=r&&(t[e]=r)}),t},t.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(n.timeout),n.hoverState="in";if(!n.options.delay||!n.options.delay.show)return n.show();n.timeout=setTimeout(function(){n.hoverState=="in"&&n.show()},n.options.delay.show)},t.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(n.timeout),n.hoverState="out";if(!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},t.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.tip();this.setContent(),this.options.animation&&n.addClass("ai1ec-fade");var r=typeof this.options.placement=="function"?this.options.placement.call(this,n[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,s=i.test(r);s&&(r=r.replace(i,"")||"top"),n.detach().css({top:0,left:0,display:"block"}).addClass("ai1ec-"+r),this.options.container?n.appendTo(this.options.container):n.insertAfter(this.$element);var o=this.getPosition(),u=n[0].offsetWidth,a=n[0].offsetHeight;if(s){var f=this.$element.parent(),l=r,c=document.documentElement.scrollTop||document.body.scrollTop,h=this.options.container=="body"?window.innerWidth:f.outerWidth(),p=this.options.container=="body"?window.innerHeight:f.outerHeight(),d=this.options.container=="body"?0:f.offset().left;r=r=="bottom"&&o.top+o.height+a-c>p?"top":r=="top"&&o.top-c-a<0?"bottom":r=="right"&&o.right+u>h?"left":r=="left"&&o.left-u<d?"right":r,n.removeClass("ai1ec-"+l).addClass("ai1ec-"+r)}var v=this.getCalculatedOffset(r,o,u,a);this.applyPlacement(v,r),this.$element.trigger("shown.bs."+this.type)}},t.prototype.applyPlacement=function(e,t){var n,r=this.tip(),i=r[0].offsetWidth,s=r[0].offsetHeight,o=parseInt(r.css("margin-top"),10),u=parseInt(r.css("margin-left"),10);isNaN(o)&&(o=0),isNaN(u)&&(u=0),e.top=e.top+o,e.left=e.left+u,r.offset(e).addClass("ai1ec-in");var a=r[0].offsetWidth,f=r[0].offsetHeight;t=="top"&&f!=s&&(n=!0,e.top=e.top+s-f);if(/bottom|top/.test(t)){var l=0;e.left<0&&(l=e.left*-2,e.left=0,r.offset(e),a=r[0].offsetWidth,f=r[0].offsetHeight),this.replaceArrow(l-i+a,a,"left")}else this.replaceArrow(f-s,f,"top");n&&r.offset(e)},t.prototype.replaceArrow=function(e,t,n){this.arrow().css(n,e?50*(1-e/t)+"%":"")},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle();e.find(".ai1ec-tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("ai1ec-fade ai1ec-in ai1ec-top ai1ec-bottom ai1ec-left ai1ec-right")},t.prototype.hide=function(){function i(){t.hoverState!="in"&&n.detach()}var t=this,n=this.tip(),r=e.Event("hide.bs."+this.type);this.$element.trigger(r);if(r.isDefaultPrevented())return;return n.removeClass("ai1ec-in"),e.support.transition&&this.$tip.hasClass("ai1ec-fade")?n.one(e.support.transition.end,i).emulateTransitionEnd(150):i(),this.$element.trigger("hidden.bs."+this.type),this},t.prototype.fixTitle=function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},t.prototype.hasContent=function(){return this.getTitle()},t.prototype.getPosition=function(){var t=this.$element[0];return e.extend({},typeof t.getBoundingClientRect=="function"?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},t.prototype.getCalculatedOffset=function(e,t,n,r){return e=="bottom"?{top:t.top+t.height,left:t.left+t.width/2-n/2}:e=="top"?{top:t.top-r,left:t.left+t.width/2-n/2}:e=="left"?{top:t.top+t.height/2-r/2,left:t.left-n}:{top:t.top+t.height/2-r/2,left:t.left+t.width}},t.prototype.getTitle=function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},t.prototype.tip=function(){return this.$tip=this.$tip||e(this.options.template)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".ai1ec-tooltip-arrow")},t.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},t.prototype.enable=function(){this.enabled=!0},t.prototype.disable=function(){this.enabled=!1},t.prototype.toggleEnabled=function(){this.enabled=!this.enabled},t.prototype.toggle=function(t){var n=t?e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;n.tip().hasClass("ai1ec-in")?n.leave(n):n.enter(n)},t.prototype.destroy=function(){this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("bs.tooltip"),s=typeof n=="object"&&n;i||r.data("bs.tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}),timely.define("external_libs/jquery_cookie",["jquery_timely"],function(e){function n(e){return u.raw?e:encodeURICompo