All-in-One Event Calendar - Version 2.5.0

Version Description

Download this release

Release Info

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

Code changes from version 2.4.1 to 2.5.0

Files changed (61) hide show
  1. all-in-one-event-calendar.php +1 -1
  2. app/config/constants.php +3 -3
  3. app/controller/front.php +15 -0
  4. app/controller/import-export.php +1 -1
  5. app/controller/javascript.php +8 -2
  6. app/model/api/api-abstract.php +86 -10
  7. app/model/api/api-feeds.php +279 -20
  8. app/model/api/api-registration.php +24 -5
  9. app/model/api/api-ticketing.php +23 -9
  10. app/model/event/creating.php +15 -3
  11. app/model/event/parent.php +4 -4
  12. app/model/search.php +129 -0
  13. app/model/settings.php +1 -5
  14. app/view/admin/abstract.php +11 -5
  15. app/view/admin/add-new-event.php +1 -1
  16. app/view/admin/calendar-feeds.php +12 -2
  17. app/view/admin/get-tax-box.php +1 -1
  18. app/view/admin/organize.php +2 -2
  19. app/view/admin/settings.php +1 -1
  20. app/view/admin/tickets.php +8 -9
  21. app/view/calendar/page.php +1 -1
  22. app/view/calendar/view/abstract.php +2 -2
  23. app/view/calendar/view/agenda.php +145 -35
  24. app/view/calendar/view/month.php +11 -2
  25. app/view/calendar/view/oneday.php +11 -2
  26. app/view/calendar/view/week.php +11 -2
  27. app/view/event/avatar.php +3 -3
  28. language/all-in-one-event-calendar.mo +0 -0
  29. language/all-in-one-event-calendar.po +408 -274
  30. language/all-in-one-event-calendar.pot +385 -258
  31. lib/bootstrap/loader-map.php +68 -0
  32. lib/calendar-feed/ics.php +368 -101
  33. lib/calendar-feed/import.php +146 -0
  34. lib/calendar-feed/suggested.php +139 -0
  35. lib/captcha/provider/nocaptcha.php +2 -2
  36. lib/command/export-events.php +1 -4
  37. lib/css/frontend.php +2 -2
  38. lib/environment/check.php +21 -0
  39. lib/html/element/setting/abstract.php +6 -2
  40. lib/html/element/setting/custom.php +28 -0
  41. lib/html/element/setting/input.php +6 -1
  42. lib/import-export/api-ics.php +767 -0
  43. lib/import-export/ics.php +29 -44
  44. lib/robots/helper.php +1 -0
  45. lib/theme/list.php +2 -2
  46. public/admin/css/add_new_event.css +1 -15
  47. public/admin/css/settings.css +343 -4
  48. public/admin/feed_row.php +132 -89
  49. public/admin/feeds_settings.php +17 -0
  50. public/admin/plugins/ics/display_feeds.php +47 -100
  51. public/admin/plugins/ics/import_feed.php +124 -0
  52. public/admin/plugins/render_opening_div.php +1 -1
  53. public/admin/plugins/suggested/display_feeds.php +83 -0
  54. public/admin/plugins/suggested/event_actions.php +20 -0
  55. public/admin/plugins/suggested/feeds_list.php +58 -0
  56. public/admin/twig/setting/custom.twig +6 -0
  57. public/js/libs/gmaps.js +1 -1
  58. public/js/month.js +1 -1
  59. public/js/oneday.js +1 -1
  60. public/js/pages/add_new_event.js +1 -1
  61. public/js/pages/calendar.js +1 -1
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.4.1
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.5.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.4.1' );
54
  }
55
 
56
  // ================
@@ -469,7 +469,7 @@ define( 'AI1EC_VERSION', '2.4.1' );
469
  if ( ! defined( 'AI1EC_API_URL' ) ) {
470
  define(
471
  'AI1EC_API_URL',
472
- 'https://ticketing.time.ly/api/'
473
  );
474
  }
475
 
@@ -477,7 +477,7 @@ define( 'AI1EC_VERSION', '2.4.1' );
477
  if ( ! defined( 'AI1EC_TICKETS_CHECKOUT_URL' ) ) {
478
  define(
479
  'AI1EC_TICKETS_CHECKOUT_URL',
480
- 'https://ticketing.time.ly/events/{event_id}/checkout'
481
  );
482
  }
483
 
50
  // = Plugin Version =
51
  // ==================
52
  if ( ! defined( 'AI1EC_VERSION' ) ) {
53
+ define( 'AI1EC_VERSION', '2.5.0' );
54
  }
55
 
56
  // ================
469
  if ( ! defined( 'AI1EC_API_URL' ) ) {
470
  define(
471
  'AI1EC_API_URL',
472
+ 'https://api.time.ly/api/'
473
  );
474
  }
475
 
477
  if ( ! defined( 'AI1EC_TICKETS_CHECKOUT_URL' ) ) {
478
  define(
479
  'AI1EC_TICKETS_CHECKOUT_URL',
480
+ 'https://api.time.ly/events/{event_id}/checkout'
481
  );
482
  }
483
 
app/controller/front.php CHANGED
@@ -603,6 +603,21 @@ class Ai1ec_Front_Controller {
603
  }
604
 
605
  if ( is_admin() ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
606
  // get the repeat box
607
  $dispatcher->register_action(
608
  'wp_ajax_ai1ec_get_repeat_box',
603
  }
604
 
605
  if ( is_admin() ) {
606
+ // Import suggested event
607
+ $dispatcher->register_action(
608
+ 'wp_ajax_ai1ec_import_suggested_event',
609
+ array( 'calendar-feed.ics', 'add_discover_events_feed_subscription' )
610
+ );
611
+ // Remove suggested event
612
+ $dispatcher->register_action(
613
+ 'wp_ajax_ai1ec_remove_suggested_event',
614
+ array( 'calendar-feed.ics', 'delete_individual_event_subscription' )
615
+ );
616
+ // Search for events
617
+ $dispatcher->register_action(
618
+ 'wp_ajax_ai1ec_search_events',
619
+ array( 'calendar-feed.suggested', 'search_events' )
620
+ );
621
  // get the repeat box
622
  $dispatcher->register_action(
623
  'wp_ajax_ai1ec_get_repeat_box',
app/controller/import-export.php CHANGED
@@ -40,7 +40,7 @@ class Ai1ec_Import_Export_Controller {
40
  */
41
  public function __construct(
42
  Ai1ec_Registry_Object $registry,
43
- array $core_engines = array( 'ics' ),
44
  array $params = array()
45
  ) {
46
  $this->_registry = $registry;
40
  */
41
  public function __construct(
42
  Ai1ec_Registry_Object $registry,
43
+ array $core_engines = array( 'ics', 'api-ics' ),
44
  array $params = array()
45
  ) {
46
  $this->_registry = $registry;
app/controller/javascript.php CHANGED
@@ -505,6 +505,12 @@ class Ai1ec_Javascript_Controller {
505
  'ticketing_no_tickets_included' => Ai1ec_I18n::__( '<b>
506
  The Event has the cost option Tickets selected but no ticket was included.</b>'
507
  ),
 
 
 
 
 
 
508
  'language' => $this->_registry->get( 'p28n.wpml' )->get_lang(),
509
  'ajax_url' => $ajax_url,
510
  // 24h time format for time pickers
@@ -715,7 +721,7 @@ JSC;
715
  $is_calendar_page = self::TRUE_PARAM;
716
  }
717
 
718
- $url = esc_url( add_query_arg(
719
  array(
720
  // Add the page to load
721
  self::LOAD_JS_PARAMETER => $page,
@@ -725,7 +731,7 @@ JSC;
725
  self::IS_CALENDAR_PAGE => $is_calendar_page,
726
  ),
727
  trailingslashit( ai1ec_get_site_url() )
728
- ) );
729
  if (
730
  $this->_settings->get( 'cache_dynamic_js' ) &&
731
  $is_calendar_page &&
505
  'ticketing_no_tickets_included' => Ai1ec_I18n::__( '<b>
506
  The Event has the cost option Tickets selected but no ticket was included.</b>'
507
  ),
508
+ 'discovery_event_success' => Ai1ec_I18n::__(
509
+ 'Event was imported successfully.'
510
+ ),
511
+ 'discovery_event_error' => Ai1ec_I18n::__(
512
+ 'An error occurred when importing event. Please, try later.'
513
+ ),
514
  'language' => $this->_registry->get( 'p28n.wpml' )->get_lang(),
515
  'ajax_url' => $ajax_url,
516
  // 24h time format for time pickers
721
  $is_calendar_page = self::TRUE_PARAM;
722
  }
723
 
724
+ $url = add_query_arg(
725
  array(
726
  // Add the page to load
727
  self::LOAD_JS_PARAMETER => $page,
731
  self::IS_CALENDAR_PAGE => $is_calendar_page,
732
  ),
733
  trailingslashit( ai1ec_get_site_url() )
734
+ );
735
  if (
736
  $this->_settings->get( 'cache_dynamic_js' ) &&
737
  $is_calendar_page &&
app/model/api/api-abstract.php CHANGED
@@ -23,11 +23,11 @@ abstract class Ai1ec_Api_Abstract extends Ai1ec_App {
23
  * @return void Return from this method is ignored.
24
  */
25
  protected function _initialize() {
26
- $this->_settings = $this->_registry->get( 'model.settings' );
27
  }
28
 
29
  protected function get_ticketing_settings( $find_attribute = null, $default_value_attribute = null ) {
30
- $api_settings = get_option( self::WP_OPTION_KEY, null );
31
  if ( ! is_array( $api_settings ) ) {
32
  $api_settings = array(
33
  'enabled' => $this->_settings->get( 'ticketing_enabled' ),
@@ -39,7 +39,7 @@ abstract class Ai1ec_Api_Abstract extends Ai1ec_App {
39
  $this->_settings->set( 'ticketing_message' , '' );
40
  $this->_settings->set( 'ticketing_enabled' , false );
41
  $this->_settings->set( 'ticketing_token' , '' );
42
- $this->_settings->set( 'ticketing_calendar_id', null );
43
  }
44
  if ( is_null( $find_attribute ) ) {
45
  return $api_settings;
@@ -64,13 +64,18 @@ abstract class Ai1ec_Api_Abstract extends Ai1ec_App {
64
  $api_settings['message'] = $message;
65
  $api_settings['enabled'] = $enabled;
66
  $api_settings['token'] = $token;
67
- $api_settings['calendar_id'] = $calendar_id;
68
  $api_settings['account'] = $account;
69
  return update_option( self::WP_OPTION_KEY, $api_settings );
70
  }
71
 
72
  protected function clear_ticketing_settings() {
73
  delete_option( self::WP_OPTION_KEY );
 
 
 
 
 
74
  }
75
 
76
  /**
@@ -256,11 +261,14 @@ abstract class Ai1ec_Api_Abstract extends Ai1ec_App {
256
  * settings, then we will try to find on the API
257
  * @return string JSON.
258
  */
259
- protected function _get_ticket_calendar() {
260
  $ticketing_calendar_id = $this->get_ticketing_settings( 'calendar_id', 0 );
261
  if ( 0 < $ticketing_calendar_id ) {
262
  return $ticketing_calendar_id;
263
  } else {
 
 
 
264
  //if the calendar is not saved on settings it should exists on API
265
  $ticketing_calendar_id = $this->_find_user_calendar();
266
  if ( 0 < $ticketing_calendar_id ) {
@@ -358,6 +366,61 @@ abstract class Ai1ec_Api_Abstract extends Ai1ec_App {
358
  return update_option( self::WP_OPTION_KEY, $api_settings );
359
  }
360
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
361
  /**
362
  * Make the request to the API endpons
363
  * @param $url The end part of the url to make the request.
@@ -387,8 +450,8 @@ abstract class Ai1ec_Api_Abstract extends Ai1ec_App {
387
  $result->is_error = true;
388
  $result->error = $response->get_error_message();
389
  } else {
390
- $result->response_code = wp_remote_retrieve_response_code( $response );
391
- if ( 200 === $result->response_code ) {
392
  if ( true === $decode_response_body ) {
393
  $result->body = json_decode( $response['body'] );
394
  if ( false === is_null( $result->body ) ) {
@@ -410,6 +473,20 @@ abstract class Ai1ec_Api_Abstract extends Ai1ec_App {
410
  return $result;
411
  }
412
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
413
  /**
414
  * Save an error notification to be showed to the user on WP header of the page
415
  * @param $response The response got from request_api method.
@@ -425,7 +502,7 @@ abstract class Ai1ec_Api_Abstract extends Ai1ec_App {
425
  );
426
  $response->error_message = $error_message;
427
  $notification = $this->_registry->get( 'notification.admin' );
428
- $notification->store( $error_message, 'error', 0, array( Ai1ec_Notification_Admin::RCPT_ADMIN ), false );
429
  error_log( $custom_error_response . ': ' . $error_message . ' - raw error: ' . print_r( $response->raw, true ) );
430
  return $error_message;
431
  }
@@ -452,8 +529,7 @@ abstract class Ai1ec_Api_Abstract extends Ai1ec_App {
452
  */
453
  public function is_response_success( $response ) {
454
  return $response != null &&
455
- isset( $response->is_error ) &&
456
- false === $response->is_error;
457
  }
458
 
459
  }
23
  * @return void Return from this method is ignored.
24
  */
25
  protected function _initialize() {
26
+ $this->_settings = $this->_registry->get( 'model.settings' );
27
  }
28
 
29
  protected function get_ticketing_settings( $find_attribute = null, $default_value_attribute = null ) {
30
+ $api_settings = get_option( self::WP_OPTION_KEY, null );
31
  if ( ! is_array( $api_settings ) ) {
32
  $api_settings = array(
33
  'enabled' => $this->_settings->get( 'ticketing_enabled' ),
39
  $this->_settings->set( 'ticketing_message' , '' );
40
  $this->_settings->set( 'ticketing_enabled' , false );
41
  $this->_settings->set( 'ticketing_token' , '' );
42
+ $this->_settings->set( 'ticketing_calendar_id', null );
43
  }
44
  if ( is_null( $find_attribute ) ) {
45
  return $api_settings;
64
  $api_settings['message'] = $message;
65
  $api_settings['enabled'] = $enabled;
66
  $api_settings['token'] = $token;
67
+ $api_settings['calendar_id'] = $calendar_id;
68
  $api_settings['account'] = $account;
69
  return update_option( self::WP_OPTION_KEY, $api_settings );
70
  }
71
 
72
  protected function clear_ticketing_settings() {
73
  delete_option( self::WP_OPTION_KEY );
74
+
75
+ // Clear transient API data
76
+ delete_site_transient( 'ai1ec_api_feeds_subscriptions' );
77
+ delete_site_transient( 'ai1ec_api_subscriptions' );
78
+ delete_site_transient( 'ai1ec_api_features' );
79
  }
80
 
81
  /**
261
  * settings, then we will try to find on the API
262
  * @return string JSON.
263
  */
264
+ protected function _get_ticket_calendar( $createIfNotExists = true ) {
265
  $ticketing_calendar_id = $this->get_ticketing_settings( 'calendar_id', 0 );
266
  if ( 0 < $ticketing_calendar_id ) {
267
  return $ticketing_calendar_id;
268
  } else {
269
+ if ( ! $createIfNotExists ) {
270
+ return 0;
271
+ }
272
  //if the calendar is not saved on settings it should exists on API
273
  $ticketing_calendar_id = $this->_find_user_calendar();
274
  if ( 0 < $ticketing_calendar_id ) {
366
  return update_option( self::WP_OPTION_KEY, $api_settings );
367
  }
368
 
369
+ /**
370
+ * @return array List of subscriptions and limits
371
+ */
372
+ protected function get_subscriptions( $force_refresh = false ) {
373
+ $subscriptions = get_site_transient( 'ai1ec_api_subscriptions' );
374
+
375
+ if ( false === $subscriptions || $force_refresh || ( defined( 'AI1EC_DEBUG' ) && AI1EC_DEBUG ) ) {
376
+ $response = $this->request_api( 'GET', AI1EC_API_URL . 'calendars/' . $this->_get_ticket_calendar() . '/subscriptions',
377
+ null,
378
+ true
379
+ );
380
+ if ( $this->is_response_success( $response ) ) {
381
+ $subscriptions = (array) $response->body;
382
+ } else {
383
+ $subscriptions = array();
384
+ }
385
+
386
+ // Save for 30 minutes
387
+ $minutes = 30;
388
+ set_site_transient( 'ai1ec_api_subscriptions', $subscriptions, $minutes * 60 );
389
+ }
390
+
391
+ return $subscriptions;
392
+ }
393
+
394
+ /**
395
+ * Check if calendar should have a specific feature enabled
396
+ */
397
+ public function has_subscription_active( $feature ) {
398
+ $subscriptions = $this->get_subscriptions();
399
+
400
+ return array_key_exists( $feature, $subscriptions );
401
+ }
402
+
403
+ /**
404
+ * Check if feature has reached its limit
405
+ */
406
+ public function subscription_has_reached_limit( $feature ) {
407
+ $has_reached_limit = true;
408
+
409
+ $subscriptions = $this->get_subscriptions();
410
+
411
+ if ( array_key_exists( $feature, $subscriptions ) ) {
412
+ $quantity = (array) $subscriptions[$feature];
413
+ $provided = $quantity['provided'];
414
+ $used = $quantity['used'];
415
+
416
+ if ( $provided - $used > 0 ) {
417
+ $has_reached_limit = false;
418
+ }
419
+ }
420
+
421
+ return $has_reached_limit;
422
+ }
423
+
424
  /**
425
  * Make the request to the API endpons
426
  * @param $url The end part of the url to make the request.
450
  $result->is_error = true;
451
  $result->error = $response->get_error_message();
452
  } else {
453
+ $result->response_code = wp_remote_retrieve_response_code( $response );
454
+ if ( 200 === $result->response_code ) {
455
  if ( true === $decode_response_body ) {
456
  $result->body = json_decode( $response['body'] );
457
  if ( false === is_null( $result->body ) ) {
473
  return $result;
474
  }
475
 
476
+ /**
477
+ * Make a post request to the api
478
+ * @param rest_endpoint Partial URL that can include {calendar_id} that will be replaced by the current calendar signed
479
+ */
480
+ public function call_api( $method, $endpoint, $body = null, $decode_response_body = true, $custom_headers = null ) {
481
+ $calendar_id = $this->_get_ticket_calendar();
482
+ if ( 0 >= $calendar_id ) {
483
+ return false;
484
+ }
485
+ $url = AI1EC_API_URL . str_replace( '{calendar_id}', $calendar_id, $endpoint );
486
+ $body = json_encode( $body );
487
+ return $this->request_api( $method, $url, $body, $decode_response_body, $custom_headers );
488
+ }
489
+
490
  /**
491
  * Save an error notification to be showed to the user on WP header of the page
492
  * @param $response The response got from request_api method.
502
  );
503
  $response->error_message = $error_message;
504
  $notification = $this->_registry->get( 'notification.admin' );
505
+ $notification->store( $error_message, 'error', 0, array( Ai1ec_Notification_Admin::RCPT_ADMIN ), false );
506
  error_log( $custom_error_response . ': ' . $error_message . ' - raw error: ' . print_r( $response->raw, true ) );
507
  return $error_message;
508
  }
529
  */
530
  public function is_response_success( $response ) {
531
  return $response != null &&
532
+ ( !isset( $response->is_error ) || ( isset( $response->is_error ) && false === $response->is_error ) );
 
533
  }
534
 
535
  }
app/model/api/api-feeds.php CHANGED
@@ -10,6 +10,14 @@
10
  */
11
  class Ai1ec_Api_Feeds extends Ai1ec_Api_Abstract {
12
 
 
 
 
 
 
 
 
 
13
  /**
14
  * Post construction routine.
15
  *
@@ -22,32 +30,283 @@ class Ai1ec_Api_Feeds extends Ai1ec_Api_Abstract {
22
  }
23
 
24
  /**
25
- * That's currently a mock for getting a suggested events list.
26
- * @return object Response body in JSON.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  */
28
- public function get_suggested_events( $page = 0, $max = 20 ) {
29
  $calendar_id = $this->_get_ticket_calendar();
30
  if ( 0 >= $calendar_id ) {
31
- return null;
32
  }
33
- $request = array(
34
- 'headers' => $this->_get_headers(),
35
- 'timeout' => parent::DEFAULT_TIMEOUT
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  );
37
- $url = AI1EC_API_URL . "calendars/$calendar_id/discover/events?page=$page&max=$max";
38
- $response = wp_remote_get( $url, $request );
39
- $response_code = wp_remote_retrieve_response_code( $response );
40
- if ( 200 === $response_code ) {
41
- $result = json_decode( $response['body'] );
42
- return $result->data;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  } else {
44
- $error_message = $this->_transform_error_message(
45
- __( 'We were unable to get the Suggested Events from Time.ly Network', AI1EC_PLUGIN_NAME )
46
- , $response, $url, true );
47
- $notification = $this->_registry->get( 'notification.admin' );
48
- $notification->store( $error_message, 'error', 0, array( Ai1ec_Notification_Admin::RCPT_ADMIN ), false );
49
- return array();
50
  }
51
  }
52
 
53
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  */
11
  class Ai1ec_Api_Feeds extends Ai1ec_Api_Abstract {
12
 
13
+ // Feed status
14
+ // c = Feed not migrated yet to API
15
+ // a = Feed migrated to API (all events)
16
+ // b = Feed migrated to API (individual events were selected)
17
+ const FEED_NOT_MIGRATED_CODE = 'c';
18
+ const FEED_API_ALL_EVENTS_CODE = 'a';
19
+ const FEED_API_SOME_EVENTS_CODE = 'b';
20
+
21
  /**
22
  * Post construction routine.
23
  *
30
  }
31
 
32
  /**
33
+ * Getting a suggested events list.
34
+ * @return stClass Response using the following format:
35
+ * [total] => 10
36
+ * [per_page] => 8
37
+ * [current_page] => 1
38
+ * [last_page] => 2
39
+ * [next_page_url] => http://dev.time.ly:882/api/calendars/4/discover/events?page=2
40
+ * [prev_page_url] =>
41
+ * [from] => 1
42
+ * [to] => 8
43
+ * [data] => Array list of suggested events
44
+ */
45
+ public function get_suggested_events() {
46
+ $calendar_id = $this->_get_ticket_calendar();
47
+ if ( 0 >= $calendar_id ) {
48
+ throw new Exception( 'Calendar ID not found' );
49
+ }
50
+
51
+ $body = null;
52
+ if (
53
+ isset( $_POST[ 'lat' ] ) &&
54
+ isset( $_POST[ 'lng' ] ) &&
55
+ isset( $_POST[ 'radius' ] )
56
+ ) {
57
+ $body = array(
58
+ 'lat' => $_POST[ 'lat' ],
59
+ 'lng' => $_POST[ 'lng' ],
60
+ 'radius' => $_POST[ 'radius' ]
61
+ );
62
+ }
63
+
64
+ $page = isset( $_POST[ 'page' ] ) ? $_POST[ 'page' ] : 1;
65
+ $max = isset( $_POST[ 'max' ] ) ? $_POST[ 'max' ] : 8;
66
+ $term = isset( $_POST[ 'term' ] ) && $_POST[ 'term' ]
67
+ ? urlencode( $_POST[ 'term' ] )
68
+ : '*';
69
+ $location = isset( $_POST[ 'location' ] ) && $_POST[ 'location' ]
70
+ ? '&location=' . urlencode( $_POST[ 'location' ] )
71
+ : '';
72
+
73
+ $url = AI1EC_API_URL .
74
+ "calendars/$calendar_id/discover/events?page=$page&max=$max&term=$term" .
75
+ $location;
76
+
77
+ $response = $this->request_api( 'GET', $url,
78
+ null !== $body ? json_encode( $body ) : null,
79
+ true //decode body response
80
+ );
81
+
82
+ if ( $this->is_response_success( $response ) ) {
83
+ return $response->body;
84
+ } else {
85
+ $this->save_error_notification(
86
+ $response,
87
+ __( 'We were unable to get the Suggested Events from Time.ly Network', AI1EC_PLUGIN_NAME )
88
+ );
89
+ throw new Exception( 'We were unable to get the Suggested Events from Time.ly Network' );
90
+ }
91
+ }
92
+
93
+ /**
94
+ * Call the API to Process and Import the Feed
95
+ */
96
+ public function import_feed( $entry ) {
97
+ $calendar_id = $this->_get_ticket_calendar();
98
+ if ( 0 >= $calendar_id ) {
99
+ throw new Exception( 'Calendar ID not found' );
100
+ }
101
+ $response = $this->request_api( 'POST', AI1EC_API_URL . 'calendars/' . $calendar_id . '/feeds/import',
102
+ json_encode( [
103
+ 'url' => $entry['feed_url'],
104
+ 'categories' => $entry['feed_category'],
105
+ 'tags' => $entry['feed_tags'],
106
+ 'allow_comments' => $entry['comments_enabled'],
107
+ 'show_maps' => $entry['map_display_enabled'],
108
+ 'import_any_tag_and_categories' => $entry['keep_tags_categories'],
109
+ 'preserve_imported_events' => $entry['keep_old_events'],
110
+ 'assign_default_utc' => $entry['import_timezone']
111
+ ] )
112
+ );
113
+
114
+ if ( $this->is_response_success( $response ) ) {
115
+ // Refresh list of subscriptions and limits
116
+ $this->get_subscriptions( true );
117
+
118
+ return $response->body;
119
+ } else {
120
+ $this->save_error_notification(
121
+ $response,
122
+ __( 'We were unable to import feed', AI1EC_PLUGIN_NAME )
123
+ );
124
+ throw new Exception( $this->get_api_error_msg( $response->raw ) );
125
+ }
126
+ }
127
+
128
+ /**
129
+ * Call the API to get the feed
130
  */
131
+ public function get_feed( $feed_id ) {
132
  $calendar_id = $this->_get_ticket_calendar();
133
  if ( 0 >= $calendar_id ) {
134
+ throw new Exception( 'Calendar ID not found' );
135
  }
136
+ $response = $this->request_api( 'GET', AI1EC_API_URL . 'calendars/' . $calendar_id . '/feeds/get/' . $feed_id,
137
+ json_encode( [ "max" => "9999" ] )
138
+ );
139
+
140
+ if ( $this->is_response_success( $response ) ) {
141
+ return $response->body;
142
+ } else {
143
+ $this->save_error_notification(
144
+ $response,
145
+ __( 'We were unable to get feed data', AI1EC_PLUGIN_NAME )
146
+ );
147
+ throw new Exception( $this->get_api_error_msg( $response->raw ) );
148
+ }
149
+ }
150
+
151
+ /**
152
+ * Call the API to get list of feed subscriptions
153
+ */
154
+ public function get_feed_subscriptions( $force_refresh = false ) {
155
+ $feeds_subscriptions = get_site_transient( 'ai1ec_api_feeds_subscriptions' );
156
+
157
+ if ( $force_refresh || false === $feeds_subscriptions ) {
158
+ $response = $this->request_api( 'GET', AI1EC_API_URL . 'calendars/' . $this->_get_ticket_calendar() . '/feeds/list',
159
+ null,
160
+ true
161
  );
162
+
163
+ if ( $this->is_response_success( $response ) ) {
164
+ $feeds_subscriptions = (array) $response->body;
165
+ } else {
166
+ $feeds_subscriptions = array();
167
+ }
168
+
169
+ // Save for 5 minutes
170
+ $minutes = 5;
171
+ set_site_transient( 'ai1ec_api_feeds_subscriptions', $feeds_subscriptions, $minutes * 60 );
172
+ }
173
+
174
+ return $feeds_subscriptions;
175
+ }
176
+
177
+ /**
178
+ * Sync feed subscriptions
179
+ */
180
+ public function get_and_sync_feed_subscriptions() {
181
+ $feeds_subscriptions = $this->get_feed_subscriptions();
182
+
183
+ $db = $this->_registry->get( 'dbi.dbi' );
184
+ $table_name = $db->get_table_name( 'ai1ec_event_feeds' );
185
+
186
+ // Select all feeds
187
+ $rows = $db->select(
188
+ $table_name,
189
+ array(
190
+ 'feed_id',
191
+ 'feed_url',
192
+ 'feed_name',
193
+ 'feed_category',
194
+ 'feed_tags',
195
+ 'comments_enabled',
196
+ 'map_display_enabled',
197
+ 'keep_tags_categories',
198
+ 'keep_old_events',
199
+ 'import_timezone'
200
+ )
201
+ );
202
+
203
+ // Iterate over API response
204
+ foreach( $feeds_subscriptions as $api_feed ) {
205
+ $found = false;
206
+
207
+ foreach ( $rows as $row ) {
208
+ // Check if URL is the same
209
+ if ( trim( $row->feed_url ) === trim( $api_feed->url ) ) {
210
+ $found = true;
211
+
212
+ // Update feed
213
+ $db->update(
214
+ $table_name,
215
+ array(
216
+ 'comments_enabled' => $api_feed->allow_comments,
217
+ 'map_display_enabled' => $api_feed->show_maps,
218
+ 'keep_tags_categories' => $api_feed->import_any_tag_and_categories,
219
+ 'keep_old_events' => $api_feed->preserve_imported_events,
220
+ 'import_timezone' => $api_feed->assign_default_utc,
221
+ 'feed_name' => $api_feed->feed_id
222
+ ),
223
+ array(
224
+ 'feed_id' => $row->feed_id
225
+ )
226
+ );
227
+ }
228
+ }
229
+
230
+ // Not found in local database.. Insert
231
+ if ( ! $found ) {
232
+ $entry = array(
233
+ 'feed_url' => $api_feed->url,
234
+ 'feed_name' => $api_feed->feed_id,
235
+ 'feed_category' => $api_feed->categories,
236
+ 'feed_tags' => $api_feed->tags,
237
+ 'comments_enabled' => $api_feed->allow_comments,
238
+ 'map_display_enabled' => $api_feed->show_maps,
239
+ 'keep_tags_categories' => $api_feed->import_any_tag_and_categories,
240
+ 'keep_old_events' => $api_feed->preserve_imported_events,
241
+ 'import_timezone' => $api_feed->assign_default_utc
242
+ );
243
+ $format = array( '%s', '%s', '%s', '%s', '%d', '%d', '%d', '%d', '%d' );
244
+ $db->insert(
245
+ $table_name,
246
+ $entry,
247
+ $format
248
+ );
249
+ }
250
+ }
251
+ }
252
+
253
+ /**
254
+ * Call the API to subscribe feed
255
+ */
256
+ public function subscribe_feed( $feed_id, $feed_event_uid = '' ) {
257
+ $calendar_id = $this->_get_ticket_calendar();
258
+ if ( 0 >= $calendar_id ) {
259
+ throw new Exception( 'Calendar ID not found' );
260
+ }
261
+
262
+ $response = $this->request_api( 'POST', AI1EC_API_URL . 'calendars/' . $calendar_id . '/feeds/subscribe',
263
+ json_encode( [
264
+ 'feed_id' => $feed_id,
265
+ 'feed_event_uid' => $feed_event_uid
266
+ ] )
267
+ );
268
+
269
+ // Refresh list of subscriptions and limits
270
+ $this->get_subscriptions( true );
271
+
272
+ if ( $this->is_response_success( $response ) ) {
273
+ return $response->body;
274
  } else {
275
+ $this->save_error_notification(
276
+ $response,
277
+ __( 'We were unable to subscribe feed', AI1EC_PLUGIN_NAME )
278
+ );
279
+ throw new Exception( $this->get_api_error_msg( $response->raw ) );
 
280
  }
281
  }
282
 
283
+ /**
284
+ * Call the API to unsubscribe feed
285
+ */
286
+ public function unsubscribe_feed( $feed_id, $feed_event_uid = '' ) {
287
+ $calendar_id = $this->_get_ticket_calendar();
288
+ if ( 0 >= $calendar_id ) {
289
+ throw new Exception( 'Calendar ID not found' );
290
+ }
291
+
292
+ $response = $this->request_api( 'POST', AI1EC_API_URL . 'calendars/' . $calendar_id . '/feeds/unsubscribe',
293
+ json_encode( [
294
+ 'feed_id' => $feed_id,
295
+ 'feed_event_uid' => $feed_event_uid
296
+ ] )
297
+ );
298
+
299
+ // Refresh list of subscriptions and limits
300
+ $this->get_subscriptions( true );
301
+
302
+ if ( $this->is_response_success( $response ) ) {
303
+ return $response->body;
304
+ } else {
305
+ $this->save_error_notification(
306
+ $response,
307
+ __( 'We were unable to unsubscribe feed', AI1EC_PLUGIN_NAME )
308
+ );
309
+ throw new Exception( $this->get_api_error_msg( $response->raw ) );
310
+ }
311
+ }
312
+ }
app/model/api/api-registration.php CHANGED
@@ -32,6 +32,7 @@ class Ai1ec_Api_Registration extends Ai1ec_Api_Abstract {
32
  $response_body = (array) $response->body;
33
  $this->save_ticketing_settings( $response_body['message'], true, $response_body['auth_token'], $this->_find_user_calendar(), $body['email'] );
34
  $this->has_payment_settings();
 
35
  } else {
36
  $error_message = $this->save_error_notification( $response, __( 'We were unable to Sign you In for Time.ly Network', AI1EC_PLUGIN_NAME ) );
37
  $this->save_ticketing_settings( $error_message, false, '', 0, null );
@@ -75,8 +76,8 @@ class Ai1ec_Api_Registration extends Ai1ec_Api_Abstract {
75
  $api_features = array();
76
  }
77
 
78
- // Save for 30 minutes
79
- $minutes = 30;
80
  set_site_transient( 'ai1ec_api_features', $api_features, $minutes * 60 );
81
  }
82
 
@@ -104,13 +105,14 @@ class Ai1ec_Api_Registration extends Ai1ec_Api_Abstract {
104
  public function is_ticket_available() {
105
  return $this->is_feature_available( Ai1ec_Api_Features::CODE_TICKETING );
106
  }
107
-
108
  /**
109
  * Clean the ticketing settings on WP database only
110
  */
111
  public function signout() {
112
- $calendar_id = $this->_get_ticket_calendar();
113
  if ( 0 >= $calendar_id ) {
 
114
  return false;
115
  }
116
  $response = $this->request_api( 'GET', AI1EC_API_URL . "calendars/$calendar_id/signout", null, true );
@@ -120,7 +122,7 @@ class Ai1ec_Api_Registration extends Ai1ec_Api_Abstract {
120
  } else {
121
  $error_message = $this->save_error_notification( $response, __( 'We were unable to Sign you Out of Time.ly Network', AI1EC_PLUGIN_NAME ) );
122
  return array( 'message' => $error_message );
123
- }
124
  }
125
 
126
  /**
@@ -190,4 +192,21 @@ class Ai1ec_Api_Registration extends Ai1ec_Api_Abstract {
190
  return array();
191
  }
192
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
193
  }
32
  $response_body = (array) $response->body;
33
  $this->save_ticketing_settings( $response_body['message'], true, $response_body['auth_token'], $this->_find_user_calendar(), $body['email'] );
34
  $this->has_payment_settings();
35
+ $this->sync_api_settings();
36
  } else {
37
  $error_message = $this->save_error_notification( $response, __( 'We were unable to Sign you In for Time.ly Network', AI1EC_PLUGIN_NAME ) );
38
  $this->save_ticketing_settings( $error_message, false, '', 0, null );
76
  $api_features = array();
77
  }
78
 
79
+ // Save for 5 minutes
80
+ $minutes = 5;
81
  set_site_transient( 'ai1ec_api_features', $api_features, $minutes * 60 );
82
  }
83
 
105
  public function is_ticket_available() {
106
  return $this->is_feature_available( Ai1ec_Api_Features::CODE_TICKETING );
107
  }
108
+
109
  /**
110
  * Clean the ticketing settings on WP database only
111
  */
112
  public function signout() {
113
+ $calendar_id = $this->_get_ticket_calendar( false );
114
  if ( 0 >= $calendar_id ) {
115
+ $this->clear_ticketing_settings();
116
  return false;
117
  }
118
  $response = $this->request_api( 'GET', AI1EC_API_URL . "calendars/$calendar_id/signout", null, true );
122
  } else {
123
  $error_message = $this->save_error_notification( $response, __( 'We were unable to Sign you Out of Time.ly Network', AI1EC_PLUGIN_NAME ) );
124
  return array( 'message' => $error_message );
125
+ }
126
  }
127
 
128
  /**
192
  return array();
193
  }
194
  }
195
+
196
+ /**
197
+ * Sync settings from API after signing in
198
+ */
199
+ public function sync_api_settings() {
200
+ // Sync feeds subscriptions
201
+ try {
202
+ $api_feed = $this->_registry->get( 'model.api.api-feeds' );
203
+ $api_feed->get_and_sync_feed_subscriptions();
204
+ } catch ( Exception $e ) {
205
+ $error_message = 'Some feeds were not imported to Time.ly Network. Error: ' . $e->getMessage();
206
+
207
+ $notification = $this->_registry->get( 'notification.admin' );
208
+ $notification->store( $error_message, 'error', 0, array( Ai1ec_Notification_Admin::RCPT_ADMIN ), false );
209
+ }
210
+ }
211
+
212
  }
app/model/api/api-ticketing.php CHANGED
@@ -140,11 +140,11 @@ class Ai1ec_Api_Ticketing extends Ai1ec_Api_Abstract {
140
  }
141
  $api_event_id = $this->get_api_event_id( $event->get( 'post_id' ) );
142
  $is_new = ! $api_event_id;
143
- $fields = array( 'visibility' => $_POST['visibility'], 'ai1ec_version' => AI1EC_VERSION );
144
  if ( isset( $_POST['tax_options'] ) ) {
145
  $fields['tax_options'] = $_POST['tax_options'];
146
  }
147
- $body_data = $this->_parse_event_fields_to_api_structure(
148
  $event,
149
  $post,
150
  $_POST['ai1ec_tickets'],
@@ -252,8 +252,7 @@ class Ai1ec_Api_Ticketing extends Ai1ec_Api_Abstract {
252
  /**
253
  * Parse the fields of an Event to the structure used by API
254
  */
255
- protected function _parse_event_fields_to_api_structure( Ai1ec_Event $event , WP_Post $post, $post_ticket_types, $api_fields_values ) {
256
-
257
  $calendar_id = $this->_get_ticket_calendar();
258
  if ( $calendar_id <= 0 ) {
259
  return null;
@@ -277,12 +276,11 @@ class Ai1ec_Api_Ticketing extends Ai1ec_Api_Abstract {
277
  $body['contact_phone'] = $event->get( 'contact_phone' );
278
  $body['contact_email'] = $event->get( 'contact_email' );
279
  $body['contact_website'] = $event->get( 'contact_url' );
280
- $body['uid'] = $event->get( 'ical_uid' );
281
  $body['title'] = $post->post_title;
282
  $body['description'] = $post->post_content;
283
  $body['url'] = get_permalink( $post->ID );
284
  $body['status'] = $post->post_status;
285
- $body['tax_rate'] = 0;
286
 
287
  $utc_current_time = $this->_registry->get( 'date.time')->format_to_javascript();
288
  $body['created_at'] = $utc_current_time;
@@ -295,7 +293,12 @@ class Ai1ec_Api_Ticketing extends Ai1ec_Api_Abstract {
295
  }
296
  }
297
 
298
- if ( null !== $api_fields_values && is_array( $api_fields_values )) {
 
 
 
 
 
299
  foreach ( $api_fields_values as $key => $value ) {
300
  $body[$key] = $api_fields_values[$key];
301
  if ( 'visibility' === $key ) {
@@ -309,7 +312,7 @@ class Ai1ec_Api_Ticketing extends Ai1ec_Api_Abstract {
309
  }
310
 
311
  $tickets_types = array();
312
- if ( isset( $post_ticket_types )) {
313
  $index = 0;
314
  foreach ( $post_ticket_types as $ticket_type_ite ) {
315
  if ( false === isset( $ticket_type_ite['id'] ) &&
@@ -624,7 +627,7 @@ class Ai1ec_Api_Ticketing extends Ai1ec_Api_Abstract {
624
  }
625
  }
626
  $headers = $this->_get_headers();
627
- $body_data = $this->_parse_event_fields_to_api_structure(
628
  $event,
629
  $post,
630
  null, //does not update ticket types, just chaging the api fields specified
@@ -844,6 +847,17 @@ class Ai1ec_Api_Ticketing extends Ai1ec_Api_Abstract {
844
  return (object) array( 'data' => $response->raw, 'error' => false );
845
  }
846
 
 
 
 
 
 
 
 
 
 
 
 
847
 
848
  /**
849
  * Save the API event data
140
  }
141
  $api_event_id = $this->get_api_event_id( $event->get( 'post_id' ) );
142
  $is_new = ! $api_event_id;
143
+ $fields = array( 'visibility' => $_POST['visibility'] );
144
  if ( isset( $_POST['tax_options'] ) ) {
145
  $fields['tax_options'] = $_POST['tax_options'];
146
  }
147
+ $body_data = $this->parse_event_fields_to_api_structure(
148
  $event,
149
  $post,
150
  $_POST['ai1ec_tickets'],
252
  /**
253
  * Parse the fields of an Event to the structure used by API
254
  */
255
+ public function parse_event_fields_to_api_structure( Ai1ec_Event $event , WP_Post $post, $post_ticket_types, $api_fields_values ) {
 
256
  $calendar_id = $this->_get_ticket_calendar();
257
  if ( $calendar_id <= 0 ) {
258
  return null;
276
  $body['contact_phone'] = $event->get( 'contact_phone' );
277
  $body['contact_email'] = $event->get( 'contact_email' );
278
  $body['contact_website'] = $event->get( 'contact_url' );
279
+ $body['uid'] = $event->get_uid();
280
  $body['title'] = $post->post_title;
281
  $body['description'] = $post->post_content;
282
  $body['url'] = get_permalink( $post->ID );
283
  $body['status'] = $post->post_status;
 
284
 
285
  $utc_current_time = $this->_registry->get( 'date.time')->format_to_javascript();
286
  $body['created_at'] = $utc_current_time;
293
  }
294
  }
295
 
296
+ if ( is_null( $api_fields_values ) || 0 == count( $api_fields_values ) ) {
297
+ $api_fields_values = array( 'status' => 'closed', 'ai1ec_version' => AI1EC_VERSION );
298
+ } else {
299
+ if ( ! isset( $api_fields_values['ai1ec_version'] ) ) {
300
+ $api_fields_values['ai1ec_version'] = AI1EC_VERSION;
301
+ }
302
  foreach ( $api_fields_values as $key => $value ) {
303
  $body[$key] = $api_fields_values[$key];
304
  if ( 'visibility' === $key ) {
312
  }
313
 
314
  $tickets_types = array();
315
+ if ( ! is_null( $post_ticket_types ) ) {
316
  $index = 0;
317
  foreach ( $post_ticket_types as $ticket_type_ite ) {
318
  if ( false === isset( $ticket_type_ite['id'] ) &&
627
  }
628
  }
629
  $headers = $this->_get_headers();
630
+ $body_data = $this->parse_event_fields_to_api_structure(
631
  $event,
632
  $post,
633
  null, //does not update ticket types, just chaging the api fields specified
847
  return (object) array( 'data' => $response->raw, 'error' => false );
848
  }
849
 
850
+ /**
851
+ * Get tax options modal
852
+ * @param int $event_id Event ID (optional)
853
+ */
854
+ public function get_tax_options_modal_ep() {
855
+ $calendar_id = $this->_get_ticket_calendar();
856
+ $response = $this->request_api( 'GET',
857
+ AI1EC_API_URL . "eventpromote/$calendar_id/tax_options"
858
+ );
859
+ return (object) array( 'data' => $response->raw, 'error' => false );
860
+ }
861
 
862
  /**
863
  * Save the API event data
app/model/event/creating.php CHANGED
@@ -227,17 +227,29 @@ class Ai1ec_Event_Creating extends Ai1ec_Base {
227
  if ( $cost_type ) {
228
  update_post_meta( $post_id, '_ai1ec_cost_type', $cost_type );
229
  }
230
-
231
  if ( $update === false ) {
232
  //this method just creates the API event, the update action
233
  //is treated by another hook (pre_update_event inside api )
234
- $api = $this->_registry->get( 'model.api.api-ticketing' );
235
  if ( 'tickets' === $cost_type ) {
236
  $result = $api->store_event( $event, $post, false );
237
  if ( true !== $result ) {
238
  $_POST['_ticket_store_event_error'] = $result;
 
 
 
 
 
 
239
  }
240
- }
 
 
 
 
 
 
 
241
  }
242
 
243
  // let other extensions save their fields.
227
  if ( $cost_type ) {
228
  update_post_meta( $post_id, '_ai1ec_cost_type', $cost_type );
229
  }
230
+ $api = $this->_registry->get( 'model.api.api-ticketing' );
231
  if ( $update === false ) {
232
  //this method just creates the API event, the update action
233
  //is treated by another hook (pre_update_event inside api )
 
234
  if ( 'tickets' === $cost_type ) {
235
  $result = $api->store_event( $event, $post, false );
236
  if ( true !== $result ) {
237
  $_POST['_ticket_store_event_error'] = $result;
238
+ } else {
239
+ update_post_meta(
240
+ $post_id,
241
+ '_ai1ec_timely_tickets_url',
242
+ $api->get_api_event_buy_ticket_url( $event->get( 'post_id' ) )
243
+ );
244
  }
245
+ }
246
+ }
247
+ if ( 'tickets' === $cost_type ) {
248
+ update_post_meta(
249
+ $post_id,
250
+ '_ai1ec_timely_tickets_url',
251
+ $api->get_api_event_buy_ticket_url( $event->get( 'post_id' ) )
252
+ );
253
  }
254
 
255
  // let other extensions save their fields.
app/model/event/parent.php CHANGED
@@ -138,11 +138,11 @@ class Ai1ec_Event_Parent extends Ai1ec_Base {
138
  $old_post_id,
139
  $instance_id
140
  );
141
- $location = esc_url( add_query_arg(
142
  'message',
143
  1,
144
  get_edit_post_link( $post_id, 'url' )
145
- ) );
146
  wp_redirect(
147
  apply_filters(
148
  'redirect_post_location',
@@ -166,7 +166,7 @@ class Ai1ec_Event_Parent extends Ai1ec_Base {
166
  *
167
  * @return array Optionally modified $actions list
168
  */
169
- public function post_row_actions( array $actions, $post ) {
170
  if ( $this->_registry->get( 'acl.aco' )->is_our_post_type( $post ) ) {
171
  $parent_post_id = $this->event_parent( $post->ID );
172
  if (
@@ -363,4 +363,4 @@ class Ai1ec_Event_Parent extends Ai1ec_Base {
363
  }
364
  return $dates;
365
  }
366
- }
138
  $old_post_id,
139
  $instance_id
140
  );
141
+ $location = add_query_arg(
142
  'message',
143
  1,
144
  get_edit_post_link( $post_id, 'url' )
145
+ );
146
  wp_redirect(
147
  apply_filters(
148
  'redirect_post_location',
166
  *
167
  * @return array Optionally modified $actions list
168
  */
169
+ public function post_row_actions( $actions, $post ) {
170
  if ( $this->_registry->get( 'acl.aco' )->is_our_post_type( $post ) ) {
171
  $parent_post_id = $this->event_parent( $post->ID );
172
  if (
363
  }
364
  return $dates;
365
  }
366
+ }
app/model/search.php CHANGED
@@ -380,6 +380,135 @@ class Ai1ec_Event_Search extends Ai1ec_Base {
380
  );
381
  }
382
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
383
  /**
384
  * Returns events for given day. Event must start before end of day and must
385
  * ends after beginning of day.
380
  );
381
  }
382
 
383
+ /**
384
+ * get_events_relative_to_reference function
385
+ *
386
+ * Return all events starting after the given date reference, limiting the
387
+ * result set to a maximum of $limit items, offset by $page_offset. A
388
+ * negative $page_offset can be provided, which will return events *before*
389
+ * the reference time, as expected.
390
+ *
391
+ * @param int $date_reference if page_offset is greater than or equal to zero, events with start date greater than the date_reference will be returned
392
+ * otherwise events with start date less than the date_reference will be returned.
393
+ * @param int $limit return a maximum of this number of items
394
+ * @param int $page_offset offset the result set by $limit times this number
395
+ * @param array $filter Array of filters for the events returned.
396
+ * ['cat_ids'] => non-associatative array of category IDs
397
+ * ['tag_ids'] => non-associatative array of tag IDs
398
+ * ['post_ids'] => non-associatative array of post IDs
399
+ * ['auth_ids'] => non-associatative array of author IDs
400
+ * ['instance_ids'] => non-associatative array of author IDs
401
+ * @param bool $unique Whether display only unique events and don't
402
+ * duplicate results with other instances or not.
403
+ *
404
+ * @return array five-element array:
405
+ * ['events'] an array of matching event objects
406
+ * ['prev'] true if more previous events
407
+ * ['next'] true if more next events
408
+ * ['date_first'] UNIX timestamp (date part) of first event
409
+ * ['date_last'] UNIX timestamp (date part) of last event
410
+ */
411
+ public function get_events_relative_to_reference( $date_reference, $limit = 0, $page_offset = 0, $filter = array(), $unique = false ) {
412
+ $localization_helper = $this->_registry->get( 'p28n.wpml' );
413
+ $settings = $this->_registry->get( 'model.settings' );
414
+
415
+ // Even if there ARE more than 5 times the limit results - we shall not
416
+ // try to fetch and display these, as it would crash system
417
+ $limit = preg_replace( '/\D/', '', $limit );
418
+
419
+ // Convert timestamp to GMT time
420
+ if ( 0 == $date_reference ) {
421
+ $time = $this->_registry->get( 'date.system' )->get_current_rounded_time();
422
+ } else {
423
+ $time = $date_reference;
424
+ }
425
+
426
+ // Get post status Where snippet and associated SQL arguments
427
+ $where_parameters = $this->_get_post_status_sql();
428
+ $post_status_where = $where_parameters['post_status_where'];
429
+
430
+ // Get the Join (filter_join) and Where (filter_where) statements based
431
+ // on $filter elements specified
432
+ $filter = $this->_get_filter_sql( $filter );
433
+
434
+ // Query arguments
435
+ $args = array( $time );
436
+ $args = array_merge( $args, $where_parameters['args'] );
437
+
438
+ if ( $page_offset >= 0 ) {
439
+ $first_record = $page_offset * $limit;
440
+ $filter_date_clause = 'i.start >= %d ';
441
+ $order_direction = 'ASC';
442
+ } else {
443
+ $first_record = ( - $page_offset - 1 ) * $limit;
444
+ $filter_date_clause = 'i.start < %d ';
445
+ $order_direction = 'DESC';
446
+ }
447
+
448
+ $wpml_join_particle = $localization_helper->get_wpml_table_join( 'p.ID' );
449
+ $wpml_where_particle = $localization_helper->get_wpml_table_where();
450
+
451
+ $query = $this->_dbi->prepare(
452
+ 'SELECT DISTINCT p.*, e.post_id, i.id AS instance_id, ' . 'i.start AS start, ' . 'i.end AS end, ' .
453
+ 'e.allday AS event_allday, ' .
454
+ 'e.recurrence_rules, e.exception_rules, e.ticket_url, e.instant_event, e.recurrence_dates, e.exception_dates, ' .
455
+ 'e.venue, e.country, e.address, e.city, e.province, e.postal_code, ' .
456
+ 'e.show_map, e.contact_name, e.contact_phone, e.contact_email, e.cost, ' .
457
+ 'e.ical_feed_url, e.ical_source_url, e.ical_organizer, e.ical_contact, e.ical_uid, e.timezone_name, e.longitude, e.latitude ' .
458
+ 'FROM ' . $this->_dbi->get_table_name( 'ai1ec_events' ) . ' e ' . 'INNER JOIN ' .
459
+ $this->_dbi->get_table_name( 'posts' ) . ' p ON e.post_id = p.ID ' . $wpml_join_particle .
460
+ ' INNER JOIN ' . $this->_dbi->get_table_name( 'ai1ec_event_instances' ) . ' i ON e.post_id = i.post_id ' .
461
+ $filter['filter_join'] . " WHERE post_type = '" . AI1EC_POST_TYPE . "' " . ' AND ' . $filter_date_clause .
462
+ $wpml_where_particle . $filter['filter_where'] . $post_status_where .
463
+ ( $unique ? ' GROUP BY e.post_id' : '' ) .
464
+ // Reverse order when viewing negative pages, to get correct set of
465
+ // records. Then reverse results later to order them properly.
466
+ ' ORDER BY i.start ' . $order_direction . ', post_title ' . $order_direction . ' LIMIT ' . $first_record .
467
+ ', ' . ( $limit + 1 ),
468
+ $args );
469
+
470
+ $events = $this->_dbi->get_results( $query, ARRAY_A );
471
+
472
+ if ( $page_offset >= 0 ) {
473
+ $prev = true;
474
+ $next = ( count( $events ) > $limit );
475
+ if ( $next ) {
476
+ array_pop( $events );
477
+ }
478
+ } else {
479
+ $prev = ( count( $events ) > $limit );
480
+ if ( $prev ) {
481
+ array_pop( $events );
482
+ }
483
+ $next = true;
484
+ }
485
+
486
+ // Reorder records if in negative page offset
487
+ if ( $page_offset < 0 ) {
488
+ $events = array_reverse( $events );
489
+ }
490
+
491
+ $date_first = $date_last = NULL;
492
+
493
+ foreach ( $events as &$event ) {
494
+ $event['allday'] = $this->_is_all_day( $event );
495
+ $event = $this->_registry->get( 'model.event', $event );
496
+ if ( null === $date_first ) {
497
+ $date_first = $event->get( 'start' );
498
+ }
499
+ $date_last = $event->get( 'start' );
500
+ }
501
+ $date_first = $this->_registry->get( 'date.time', $date_first );
502
+ $date_last = $this->_registry->get( 'date.time', $date_last );
503
+
504
+ return array(
505
+ 'events' => $events,
506
+ 'prev' => $prev,
507
+ 'next' => $next,
508
+ 'date_first' => $date_first,
509
+ 'date_last' => $date_last );
510
+ }
511
+
512
  /**
513
  * Returns events for given day. Event must start before end of day and must
514
  * ends after beginning of day.
app/model/settings.php CHANGED
@@ -49,11 +49,7 @@ class Ai1ec_Settings extends Ai1ec_App {
49
  ) {
50
 
51
  if ( 'deprecated' === $type ) {
52
- unset( $this->_options[$option] );
53
- } else if ( 'hidden' === $type ) {
54
- if ( isset( $this->_options[$option] ) && isset( $this->_options[$option]['renderer'] ) ) {
55
- $this->_options[$option]['renderer'] = null;
56
- }
57
  } else if (
58
  ! isset( $this->_options[$option] ) ||
59
  ! isset( $this->_options[$option]['version'] ) ||
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'] ) ||
app/view/admin/abstract.php CHANGED
@@ -21,6 +21,11 @@ abstract class Ai1ec_View_Admin_Abstract extends Ai1ec_Base {
21
  */
22
  protected $_page_suffix;
23
 
 
 
 
 
 
24
  /**
25
  * Standard constructor
26
  *
@@ -28,8 +33,9 @@ abstract class Ai1ec_View_Admin_Abstract extends Ai1ec_Base {
28
  */
29
  public function __construct( Ai1ec_Registry_Object $registry ) {
30
  parent::__construct( $registry );
31
- $exploded_class = explode( '_', get_class( $this ) );
32
- $this->_page_suffix = strtolower( end( $exploded_class ) );
 
33
  }
34
 
35
  /**
@@ -38,13 +44,13 @@ abstract class Ai1ec_View_Admin_Abstract extends Ai1ec_Base {
38
  * @return string
39
  */
40
  public function get_url() {
41
- return esc_url( add_query_arg(
42
  array(
43
  'post_type' => AI1EC_POST_TYPE,
44
  'page' => AI1EC_PLUGIN_NAME . '-' . $this->_page_suffix,
45
  ),
46
  ai1ec_admin_url( 'edit.php' )
47
- ) );
48
  }
49
 
50
  /**
@@ -67,4 +73,4 @@ abstract class Ai1ec_View_Admin_Abstract extends Ai1ec_Base {
67
  */
68
  abstract public function handle_post();
69
 
70
- }
21
  */
22
  protected $_page_suffix;
23
 
24
+ /**
25
+ * @var string
26
+ */
27
+ protected $_api_registration;
28
+
29
  /**
30
  * Standard constructor
31
  *
33
  */
34
  public function __construct( Ai1ec_Registry_Object $registry ) {
35
  parent::__construct( $registry );
36
+ $exploded_class = explode( '_', get_class( $this ) );
37
+ $this->_page_suffix = strtolower( end( $exploded_class ) );
38
+ $this->_api_registration = $this->_registry->get( 'model.api.api-registration' );
39
  }
40
 
41
  /**
44
  * @return string
45
  */
46
  public function get_url() {
47
+ return add_query_arg(
48
  array(
49
  'post_type' => AI1EC_POST_TYPE,
50
  'page' => AI1EC_PLUGIN_NAME . '-' . $this->_page_suffix,
51
  ),
52
  ai1ec_admin_url( 'edit.php' )
53
+ );
54
  }
55
 
56
  /**
73
  */
74
  abstract public function handle_post();
75
 
76
+ }
app/view/admin/add-new-event.php CHANGED
@@ -79,7 +79,7 @@ class Ai1ec_View_Add_New_Event extends Ai1ec_Base {
79
  $longitude = '';
80
  $latitude = '';
81
  $coordinates = '';
82
- $ticket_url = '';
83
 
84
  $instance_id = false;
85
  if ( isset( $_REQUEST['instance'] ) ) {
79
  $longitude = '';
80
  $latitude = '';
81
  $coordinates = '';
82
+ $ticket_url = '';
83
 
84
  $instance_id = false;
85
  if ( isset( $_REQUEST['instance'] ) ) {
app/view/admin/calendar-feeds.php CHANGED
@@ -69,7 +69,7 @@ class Ai1ec_View_Calendar_Feeds extends Ai1ec_View_Admin_Abstract {
69
  'settings_page' => $settings->get( 'feeds_page' ),
70
  'calendar_settings' => false,
71
  );
72
- $file = $loader->get_file( 'settings.php', $args, true );
73
  $file->render();
74
  }
75
 
@@ -81,7 +81,17 @@ class Ai1ec_View_Calendar_Feeds extends Ai1ec_View_Admin_Abstract {
81
  public function display_meta_box( $object, $box ) {
82
  // register the calendar feeds page.
83
  $calendar_feeds = $this->_registry->get( 'controller.calendar-feeds' );
84
- $feeds = array( $this->_registry->get( 'calendar-feed.ics' ) );
 
 
 
 
 
 
 
 
 
 
85
  $feeds = apply_filters( 'ai1ec_calendar_feeds', $feeds );
86
  foreach ( $feeds as $feed ) {
87
  $calendar_feeds->add_plugin( $feed );
69
  'settings_page' => $settings->get( 'feeds_page' ),
70
  'calendar_settings' => false,
71
  );
72
+ $file = $loader->get_file( 'feeds_settings.php', $args, true );
73
  $file->render();
74
  }
75
 
81
  public function display_meta_box( $object, $box ) {
82
  // register the calendar feeds page.
83
  $calendar_feeds = $this->_registry->get( 'controller.calendar-feeds' );
84
+ $feeds = array();
85
+
86
+ array_push( $feeds, $this->_registry->get( 'calendar-feed.import' ) );
87
+ // Check for user subscription - Discover events
88
+ if ($this->_api_registration->has_subscription_active( 'discover-events' ) ) {
89
+ array_push( $feeds, $this->_registry->get( 'calendar-feed.suggested' ) );
90
+ }
91
+
92
+ // Add ICS
93
+ array_push( $feeds, $this->_registry->get( 'calendar-feed.ics' ) );
94
+
95
  $feeds = apply_filters( 'ai1ec_calendar_feeds', $feeds );
96
  foreach ( $feeds as $feed ) {
97
  $calendar_feeds->add_plugin( $feed );
app/view/admin/get-tax-box.php CHANGED
@@ -11,7 +11,7 @@
11
  */
12
  class Ai1ec_View_Admin_Get_Tax_Box extends Ai1ec_Base {
13
  /**
14
- * get_repeat_box function
15
  *
16
  * @return string
17
  **/
11
  */
12
  class Ai1ec_View_Admin_Get_Tax_Box extends Ai1ec_Base {
13
  /**
14
+ * get_tax_box function
15
  *
16
  * @return string
17
  **/
app/view/admin/organize.php CHANGED
@@ -47,13 +47,13 @@ class Ai1ec_View_Organize extends Ai1ec_Base {
47
  }
48
  $this->_taxonomies[] = array(
49
  'taxonomy_name' => $taxonomy,
50
- 'url' => esc_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] ) ?
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] ) ?
app/view/admin/settings.php CHANGED
@@ -227,7 +227,7 @@ class Ai1ec_View_Admin_Settings extends Ai1ec_View_Admin_Abstract {
227
  ) .
228
  '</div>',
229
  wp_nonce_url(
230
- esc_url( add_query_arg( 'ai1ec_disable_gzip_compression', '1' ) ),
231
  'ai1ec_disable_gzip_compression'
232
  )
233
  )
227
  ) .
228
  '</div>',
229
  wp_nonce_url(
230
+ add_query_arg( 'ai1ec_disable_gzip_compression', '1' ),
231
  'ai1ec_disable_gzip_compression'
232
  )
233
  )
app/view/admin/tickets.php CHANGED
@@ -54,17 +54,16 @@ class Ai1ec_View_Tickets extends Ai1ec_View_Admin_Abstract {
54
  */
55
  public function display_page() {
56
 
57
- $api = $this->_registry->get( 'model.api.api-registration' );
58
- $signed_to_api = $api->is_signed();
59
- $signup_available = $api->is_api_sign_up_available();
60
- $ticketing_available = $api->is_ticket_available();
61
- $ticketing_message = $api->get_sign_message();
62
  $loader = $this->_registry->get( 'theme.loader' );
63
 
64
  if ( ! $signed_to_api ) {
65
 
66
  if ( false === ai1ec_is_blank( $ticketing_message ) ) {
67
- $api->clear_sign_message();
68
  }
69
 
70
  $args = array(
@@ -92,8 +91,8 @@ class Ai1ec_View_Tickets extends Ai1ec_View_Admin_Abstract {
92
  );
93
  $file = $loader->get_file( 'ticketing/signup.twig', $args, true );
94
  } else {
95
- $response = $api->get_payment_preferences();
96
- $purchases = $api->get_purchases();
97
  $args = array(
98
  'title' => Ai1ec_I18n::__(
99
  'Time.ly Ticketing<sup>beta</sup>'
@@ -171,7 +170,7 @@ class Ai1ec_View_Tickets extends Ai1ec_View_Admin_Abstract {
171
  )
172
  );
173
  if ( isset( $_POST['ai1ec_save_settings'] ) ) {
174
- $response = $api->save_payment_preferences();
175
 
176
  // this redirect makes sure that the error messages appear on the screen
177
  header( "Location: " . $_SERVER['HTTP_REFERER'] );
54
  */
55
  public function display_page() {
56
 
57
+ $signed_to_api = $this->_api_registration->is_signed();
58
+ $signup_available = $this->_api_registration->is_api_sign_up_available();
59
+ $ticketing_available = $this->_api_registration->is_ticket_available();
60
+ $ticketing_message = $this->_api_registration->get_sign_message();
 
61
  $loader = $this->_registry->get( 'theme.loader' );
62
 
63
  if ( ! $signed_to_api ) {
64
 
65
  if ( false === ai1ec_is_blank( $ticketing_message ) ) {
66
+ $this->_api_registration->clear_sign_message();
67
  }
68
 
69
  $args = array(
91
  );
92
  $file = $loader->get_file( 'ticketing/signup.twig', $args, true );
93
  } else {
94
+ $response = $this->_api_registration->get_payment_preferences();
95
+ $purchases = $this->_api_registration->get_purchases();
96
  $args = array(
97
  'title' => Ai1ec_I18n::__(
98
  'Time.ly Ticketing<sup>beta</sup>'
170
  )
171
  );
172
  if ( isset( $_POST['ai1ec_save_settings'] ) ) {
173
+ $response = $this->_api_registration->save_payment_preferences();
174
 
175
  // this redirect makes sure that the error messages appear on the screen
176
  header( "Location: " . $_SERVER['HTTP_REFERER'] );
app/view/calendar/page.php CHANGED
@@ -109,7 +109,7 @@ class Ai1ec_Calendar_Page extends Ai1ec_Base {
109
 
110
  // Get HTML for subscribe buttons.
111
  $subscribe_buttons = $this->get_html_for_subscribe_buttons( $view_args );
112
-
113
  // Get HTML for view itself.
114
  $view = $view_obj->get_content( $view_args );
115
 
109
 
110
  // Get HTML for subscribe buttons.
111
  $subscribe_buttons = $this->get_html_for_subscribe_buttons( $view_args );
112
+
113
  // Get HTML for view itself.
114
  $view = $view_obj->get_content( $view_args );
115
 
app/view/calendar/view/abstract.php CHANGED
@@ -266,11 +266,11 @@ abstract class Ai1ec_Calendar_View_Abstract extends Ai1ec_Base {
266
  $instance_permalink = get_permalink(
267
  $event->get( 'post_id' )
268
  );
269
- $instance_permalink = esc_url( add_query_arg(
270
  'instance_id',
271
  $event->get( 'instance_id' ),
272
  $instance_permalink
273
- ) );
274
  $event->set_runtime( 'instance_permalink', $instance_permalink );
275
 
276
  $event->set_runtime(
266
  $instance_permalink = get_permalink(
267
  $event->get( 'post_id' )
268
  );
269
+ $instance_permalink = add_query_arg(
270
  'instance_id',
271
  $event->get( 'instance_id' ),
272
  $instance_permalink
273
+ );
274
  $event->set_runtime( 'instance_permalink', $instance_permalink );
275
 
276
  $event->set_runtime(
app/view/calendar/view/agenda.php CHANGED
@@ -38,28 +38,52 @@ class Ai1ec_Calendar_View_Agenda extends Ai1ec_Calendar_View_Abstract {
38
  $events_limit = apply_filters(
39
  'ai1ec_events_limit',
40
  $events_limit
41
- );
42
- $results = $search->get_events_relative_to(
43
- $timestamp,
44
- $events_limit,
45
- $view_args['page_offset'],
46
- apply_filters(
47
- 'ai1ec_get_events_relative_to_filter',
48
- array(
49
- 'post_ids' => $view_args['post_ids'],
50
- 'auth_ids' => $view_args['auth_ids'],
51
- 'cat_ids' => $view_args['cat_ids'],
52
- 'tag_ids' => $view_args['tag_ids'],
53
- 'instance_ids' => $view_args['instance_ids'],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  ),
55
- $view_args
56
- ),
57
- $view_args['time_limit'],
58
- apply_filters(
59
- 'ai1ec_show_unique_events',
60
- false
61
- )
62
- );
63
  $this->_update_meta( $results['events'] );
64
  $dates = $this->get_agenda_like_date_array(
65
  $results['events'],
@@ -101,19 +125,33 @@ class Ai1ec_Calendar_View_Agenda extends Ai1ec_Calendar_View_Abstract {
101
  $pagination_links = '';
102
  if ( ! $view_args['no_navigation'] ) {
103
 
104
- $pagination_links = $this->_get_agenda_like_pagination_links(
105
- $view_args,
106
- $results['prev'],
107
- $results['next'],
108
- $results['date_first'],
109
- $results['date_last'],
110
- $title,
111
- $title_short,
112
- null === $view_args['time_limit'] ||
113
- 0 === $view_args['time_limit'] ?
114
- $timestamp :
115
- $view_args['time_limit']
116
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
 
118
  $pagination_links = $loader->get_file(
119
  'pagination.twig',
@@ -281,13 +319,23 @@ class Ai1ec_Calendar_View_Agenda extends Ai1ec_Calendar_View_Abstract {
281
  'category_divider_color'
282
  );
283
 
 
 
 
 
 
 
 
 
 
 
 
284
  if (
285
  true === apply_filters(
286
  'ai1ec_buy_button_product',
287
  false
288
  )
289
  ) {
290
- $meta = $this->_registry->get( 'model.meta-post' );
291
  $full_details = $meta->get(
292
  $event->get( 'post_id' ),
293
  '_ai1ec_ep_product_details',
@@ -436,6 +484,68 @@ class Ai1ec_Calendar_View_Agenda extends Ai1ec_Calendar_View_Abstract {
436
 
437
  return $links;
438
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
439
 
440
  /* (non-PHPdoc)
441
  * @see Ai1ec_Calendar_View_Abstract::_add_view_specific_runtime_properties()
38
  $events_limit = apply_filters(
39
  'ai1ec_events_limit',
40
  $events_limit
41
+ );
42
+ $relative_to_reference = in_array( $this->get_name(), array( 'agenda', 'posterboard', 'stream' ) );
43
+ if ( $relative_to_reference ) {
44
+ $results = $search->get_events_relative_to_reference(
45
+ $view_args['time_limit'],
46
+ $events_limit,
47
+ $view_args['page_offset'],
48
+ apply_filters(
49
+ 'ai1ec_get_events_relative_to_filter',
50
+ array(
51
+ 'post_ids' => $view_args['post_ids'],
52
+ 'auth_ids' => $view_args['auth_ids'],
53
+ 'cat_ids' => $view_args['cat_ids'],
54
+ 'tag_ids' => $view_args['tag_ids'],
55
+ 'instance_ids' => $view_args['instance_ids'],
56
+ ),
57
+ $view_args
58
+ ),
59
+ apply_filters(
60
+ 'ai1ec_show_unique_events',
61
+ false
62
+ )
63
+ );
64
+ } else {
65
+ $results = $search->get_events_relative_to(
66
+ $timestamp,
67
+ $events_limit,
68
+ $view_args['page_offset'],
69
+ apply_filters(
70
+ 'ai1ec_get_events_relative_to_filter',
71
+ array(
72
+ 'post_ids' => $view_args['post_ids'],
73
+ 'auth_ids' => $view_args['auth_ids'],
74
+ 'cat_ids' => $view_args['cat_ids'],
75
+ 'tag_ids' => $view_args['tag_ids'],
76
+ 'instance_ids' => $view_args['instance_ids'],
77
+ ),
78
+ $view_args
79
  ),
80
+ $view_args['time_limit'],
81
+ apply_filters(
82
+ 'ai1ec_show_unique_events',
83
+ false
84
+ )
85
+ );
86
+ }
 
87
  $this->_update_meta( $results['events'] );
88
  $dates = $this->get_agenda_like_date_array(
89
  $results['events'],
125
  $pagination_links = '';
126
  if ( ! $view_args['no_navigation'] ) {
127
 
128
+ if ( $relative_to_reference ) {
129
+ $pagination_links = $this->_get_pagination_links(
130
+ $view_args,
131
+ $results['prev'],
132
+ $results['next'],
133
+ $results['date_first'],
134
+ $results['date_last'],
135
+ $title,
136
+ $title_short,
137
+ $view_args['page_offset'] + -1,
138
+ $view_args['page_offset'] + 1
139
+ );
140
+ } else {
141
+ $pagination_links = $this->_get_agenda_like_pagination_links(
142
+ $view_args,
143
+ $results['prev'],
144
+ $results['next'],
145
+ $results['date_first'],
146
+ $results['date_last'],
147
+ $title,
148
+ $title_short,
149
+ null === $view_args['time_limit'] ||
150
+ 0 === $view_args['time_limit'] ?
151
+ $timestamp :
152
+ $view_args['time_limit']
153
+ );
154
+ }
155
 
156
  $pagination_links = $loader->get_file(
157
  'pagination.twig',
319
  'category_divider_color'
320
  );
321
 
322
+ $meta = $this->_registry->get( 'model.meta-post' );
323
+ if ( ! $event_props['ticket_url'] ) {
324
+ $timely_tickets = $meta->get(
325
+ $event->get( 'post_id' ),
326
+ '_ai1ec_timely_tickets_url',
327
+ null
328
+ );
329
+ if ( $timely_tickets ) {
330
+ $event_props['ticket_url'] = $timely_tickets;
331
+ }
332
+ }
333
  if (
334
  true === apply_filters(
335
  'ai1ec_buy_button_product',
336
  false
337
  )
338
  ) {
 
339
  $full_details = $meta->get(
340
  $event->get( 'post_id' ),
341
  '_ai1ec_ep_product_details',
484
 
485
  return $links;
486
  }
487
+
488
+ /**
489
+ * Returns an associative array of two links for any agenda-like view of the
490
+ * calendar:
491
+ * previous page (if previous events exist),
492
+ * next page (if next events exist).
493
+ * Each element is an associative array containing the link's enabled status
494
+ * ['enabled'], CSS class ['class'], text ['text'] and value to assign to
495
+ * link's href ['href'].
496
+ *
497
+ * @param array $args Current request arguments
498
+ *
499
+ * @param bool $prev Whether there are more events before
500
+ * the current page
501
+ * @param bool $next Whether there are more events after
502
+ * the current page
503
+ * @param Ai1ec_Date_Time|null $date_first
504
+ * @param Ai1ec_Date_Time|null $date_last
505
+ * @param string $title Title to display in datepicker button
506
+ * @param string $title_short Short month names.
507
+ * @param int|null $default_time_limit The default time limit in the case of pagination ends.
508
+ * @return array Array of links
509
+ */
510
+ protected function _get_pagination_links(
511
+ $args,
512
+ $prev = false,
513
+ $next = false,
514
+ $date_first = null,
515
+ $date_last = null,
516
+ $title = '',
517
+ $title_short = '',
518
+ $prev_offset = -1,
519
+ $next_offset = 1) {
520
+
521
+ $links = array();
522
+
523
+ if ( $this->_registry->get( 'model.settings' )->get( 'ai1ec_use_frontend_rendering' ) ) {
524
+ $args['request_format'] = 'json';
525
+ }
526
+ $args['page_offset'] = $prev_offset;
527
+
528
+ $href = $this->_registry->get( 'html.element.href', $args );
529
+ $links[] = array(
530
+ 'class' => 'ai1ec-prev-page',
531
+ 'text' => '<i class="ai1ec-fa ai1ec-fa-chevron-left"></i>',
532
+ 'href' => $href->generate_href(),
533
+ 'enabled' => $prev );
534
+
535
+ // Minical datepicker.
536
+ $factory = $this->_registry->get( 'factory.html' );
537
+ $links[] = $factory->create_datepicker_link( $args, $date_first->format_to_gmt(), $title, $title_short );
538
+
539
+ $args['page_offset'] = $next_offset;
540
+ $href = $this->_registry->get( 'html.element.href', $args );
541
+ $links[] = array(
542
+ 'class' => 'ai1ec-next-page',
543
+ 'text' => '<i class="ai1ec-fa ai1ec-fa-chevron-right"></i>',
544
+ 'href' => $href->generate_href(),
545
+ 'enabled' => $next );
546
+
547
+ return $links;
548
+ }
549
 
550
  /* (non-PHPdoc)
551
  * @see Ai1ec_Calendar_View_Abstract::_add_view_specific_runtime_properties()
app/view/calendar/view/month.php CHANGED
@@ -388,14 +388,23 @@ class Ai1ec_Calendar_View_Month extends Ai1ec_Calendar_View_Abstract {
388
  '',
389
  false ),
390
  );
391
-
 
 
 
 
 
 
 
 
 
 
392
  if (
393
  true === apply_filters(
394
  'ai1ec_buy_button_product',
395
  false
396
  )
397
  ) {
398
- $meta = $this->_registry->get( 'model.meta-post' );
399
  $full_details = $meta->get(
400
  $evt->get( 'post_id' ),
401
  '_ai1ec_ep_product_details',
388
  '',
389
  false ),
390
  );
391
+ $meta = $this->_registry->get( 'model.meta-post' );
392
+ if ( ! $event_data['ticket_url'] ) {
393
+ $timely_tickets = $meta->get(
394
+ $evt->get( 'post_id' ),
395
+ '_ai1ec_timely_tickets_url',
396
+ null
397
+ );
398
+ if ( $timely_tickets ) {
399
+ $event_data['ticket_url'] = $timely_tickets;
400
+ }
401
+ }
402
  if (
403
  true === apply_filters(
404
  'ai1ec_buy_button_product',
405
  false
406
  )
407
  ) {
 
408
  $full_details = $meta->get(
409
  $evt->get( 'post_id' ),
410
  '_ai1ec_ep_product_details',
app/view/calendar/view/oneday.php CHANGED
@@ -332,14 +332,23 @@ class Ai1ec_Calendar_View_Oneday extends Ai1ec_Calendar_View_Abstract {
332
  '',
333
  false ),
334
  );
335
-
 
 
 
 
 
 
 
 
 
 
336
  if (
337
  true === apply_filters(
338
  'ai1ec_buy_button_product',
339
  false
340
  )
341
  ) {
342
- $meta = $this->_registry->get( 'model.meta-post' );
343
  $full_details = $meta->get(
344
  $evt->get( 'post_id' ),
345
  '_ai1ec_ep_product_details',
332
  '',
333
  false ),
334
  );
335
+ $meta = $this->_registry->get( 'model.meta-post' );
336
+ if ( ! $event['ticket_url'] ) {
337
+ $timely_tickets = $meta->get(
338
+ $evt->get( 'post_id' ),
339
+ '_ai1ec_timely_tickets_url',
340
+ null
341
+ );
342
+ if ( $timely_tickets ) {
343
+ $event['ticket_url'] = $timely_tickets;
344
+ }
345
+ }
346
  if (
347
  true === apply_filters(
348
  'ai1ec_buy_button_product',
349
  false
350
  )
351
  ) {
 
352
  $full_details = $meta->get(
353
  $evt->get( 'post_id' ),
354
  '_ai1ec_ep_product_details',
app/view/calendar/view/week.php CHANGED
@@ -373,14 +373,23 @@ class Ai1ec_Calendar_View_Week extends Ai1ec_Calendar_View_Abstract {
373
  '',
374
  false ),
375
  );
376
-
 
 
 
 
 
 
 
 
 
 
377
  if (
378
  true === apply_filters(
379
  'ai1ec_buy_button_product',
380
  false
381
  )
382
  ) {
383
- $meta = $this->_registry->get( 'model.meta-post' );
384
  $full_details = $meta->get(
385
  $evt->get( 'post_id' ),
386
  '_ai1ec_ep_product_details',
373
  '',
374
  false ),
375
  );
376
+ $meta = $this->_registry->get( 'model.meta-post' );
377
+ if ( ! $event['ticket_url'] ) {
378
+ $timely_tickets = $meta->get(
379
+ $evt->get( 'post_id' ),
380
+ '_ai1ec_timely_tickets_url',
381
+ null
382
+ );
383
+ if ( $timely_tickets ) {
384
+ $event['ticket_url'] = $timely_tickets;
385
+ }
386
+ }
387
  if (
388
  true === apply_filters(
389
  'ai1ec_buy_button_product',
390
  false
391
  )
392
  ) {
 
393
  $full_details = $meta->get(
394
  $evt->get( 'post_id' ),
395
  '_ai1ec_ep_product_details',
app/view/event/avatar.php CHANGED
@@ -61,11 +61,11 @@ class Ai1ec_View_Event_Avatar extends Ai1ec_Base {
61
  $size_attr . ' />';
62
 
63
  if ( $wrap_permalink ) {
64
- $permalink = esc_url( add_query_arg(
65
  'instance_id',
66
  $event->get( 'instance_id' ),
67
  get_permalink( $event->get( 'post_id' ) )
68
- ) );
69
  $html = '<a href="' . $permalink . '">' . $html . '</a>';
70
  }
71
 
@@ -402,4 +402,4 @@ class Ai1ec_View_Event_Avatar extends Ai1ec_Base {
402
  return $fallbacks;
403
  }
404
 
405
- }
61
  $size_attr . ' />';
62
 
63
  if ( $wrap_permalink ) {
64
+ $permalink = add_query_arg(
65
  'instance_id',
66
  $event->get( 'instance_id' ),
67
  get_permalink( $event->get( 'post_id' ) )
68
+ );
69
  $html = '<a href="' . $permalink . '">' . $html . '</a>';
70
  }
71
 
402
  return $fallbacks;
403
  }
404
 
405
+ }
language/all-in-one-event-calendar.mo CHANGED
Binary file
language/all-in-one-event-calendar.po CHANGED
@@ -2,13 +2,13 @@
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.4.1\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/all-in-one-event-calendar\n"
7
- "POT-Creation-Date: 2016-06-07 23:27:25+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: 2016-06-07 23:27+0000\n"
12
  "Last-Translator: Timely <support@time.ly>\n"
13
  "Language-Team:\n"
14
 
@@ -32,7 +32,7 @@ msgstr ""
32
  msgid "Calendar Themes"
33
  msgstr "Calendar Themes"
34
 
35
- #: app/controller/front.php:1046
36
  msgid ""
37
  "Your database is found to be corrupt. Likely previous update has failed. "
38
  "Please restore All-in-One Event Calendar tables from a backup and retry."
@@ -164,11 +164,19 @@ msgstr ""
164
  "\t\t\t\tThe Event has the cost option Tickets selected but no ticket was "
165
  "included.</b>"
166
 
167
- #: app/controller/javascript.php:535 app/view/admin/widget-creator.php:139
 
 
 
 
 
 
 
 
168
  msgid "Preview:"
169
  msgstr "Preview:"
170
 
171
- #: app/controller/javascript.php:536
172
  msgid ""
173
  "Loading preview&nbsp;<i class=\"ai1ec-fa ai1ec-fa-spin ai1ec-fa-spinner\"></"
174
  "i>"
@@ -176,119 +184,119 @@ msgstr ""
176
  "Loading preview&nbsp;<i class=\"ai1ec-fa ai1ec-fa-spin ai1ec-fa-spinner\"></"
177
  "i>"
178
 
179
- #: app/controller/javascript.php:541 app/view/admin/all-events.php:83
180
  msgid "Ticketing Details"
181
  msgstr "Ticketing Details"
182
 
183
- #: app/controller/javascript.php:542
184
  msgid "Hide Ticketing Details"
185
  msgstr "Hide Ticketing Details"
186
 
187
- #: app/controller/javascript.php:543
188
  msgid "Loading tickets details..."
189
  msgstr "Loading tickets details..."
190
 
191
- #: app/controller/javascript.php:544
192
  msgid "Type and price"
193
  msgstr "Type and price"
194
 
195
- #: app/controller/javascript.php:545
196
  msgid "Info"
197
  msgstr "Info"
198
 
199
- #: app/controller/javascript.php:546
200
  msgid "Information"
201
  msgstr "Information"
202
 
203
- #: app/controller/javascript.php:547
204
  msgid "Report"
205
  msgstr "Report"
206
 
207
- #: app/controller/javascript.php:548
208
  msgid "Sale dates"
209
  msgstr "Sale dates"
210
 
211
- #: app/controller/javascript.php:549
212
  msgid "Limits"
213
  msgstr "Limits"
214
 
215
- #: app/controller/javascript.php:550
216
  msgid "Actions"
217
  msgstr "Actions"
218
 
219
- #: app/controller/javascript.php:551
220
  msgid "Sold:"
221
  msgstr "Sold:"
222
 
223
- #: app/controller/javascript.php:552
224
  msgid "Left:"
225
  msgstr "Left:"
226
 
227
- #: app/controller/javascript.php:553
228
  msgid "Start:"
229
  msgstr "Start:"
230
 
231
- #: app/controller/javascript.php:554
232
  msgid "End:"
233
  msgstr "End:"
234
 
235
- #: app/controller/javascript.php:555 public/admin/box_event_cost.php:158
236
  msgid "Min:"
237
  msgstr "Min:"
238
 
239
- #: app/controller/javascript.php:556 public/admin/box_event_cost.php:168
240
  msgid "Max:"
241
  msgstr "Max:"
242
 
243
- #: app/controller/javascript.php:557
244
  msgid "Attendees"
245
  msgstr "Attendees"
246
 
247
- #: app/controller/javascript.php:558
248
  msgid "Hide Attendees"
249
  msgstr "Hide Attendees"
250
 
251
- #: app/controller/javascript.php:559
252
  msgid "Attendees List"
253
  msgstr "Attendees List"
254
 
255
- #: app/controller/javascript.php:560
256
  msgid "Guest Name"
257
  msgstr "Guest Name"
258
 
259
- #: app/controller/javascript.php:561 app/view/admin/tickets.php:117
260
  msgid "Status"
261
  msgstr "Status"
262
 
263
- #: app/controller/javascript.php:562 app/view/admin/tickets.php:116
264
  #: app/view/event/ticket.php:71
265
  msgid "Email"
266
  msgstr "Email"
267
 
268
- #: app/controller/javascript.php:563
269
  msgid "No attendees for this ticket type."
270
  msgstr "No attendees for this ticket type."
271
 
272
- #: app/controller/javascript.php:564 app/view/calendar/view/agenda.php:167
273
- #: app/view/calendar/widget.php:373 public/admin/feed_row.php:112
274
  msgid "Edit"
275
  msgstr "Edit"
276
 
277
- #: app/controller/javascript.php:565
278
  msgid "Code"
279
  msgstr "Code"
280
 
281
- #: app/controller/javascript.php:566 public/admin/box_event_cost.php:189
282
  #: public/admin/box_event_cost.php:308
283
  msgid "Unlimited"
284
  msgstr "Unlimited"
285
 
286
- #: app/controller/javascript.php:567 app/model/api/api-ticketing.php:398
287
  #: public/admin/box_event_cost.php:280
288
  msgid "Open for sale"
289
  msgstr "Open for sale"
290
 
291
- #: app/controller/javascript.php:568
292
  msgid ""
293
  "You have sold tickets for this ticket type. Please change it's status to "
294
  "\"Canceled\" and make refunds to all users that purchased tickets."
@@ -296,7 +304,7 @@ msgstr ""
296
  "You have sold tickets for this ticket type. Please change it's status to "
297
  "\"Canceled\" and make refunds to all users that purchased tickets."
298
 
299
- #: app/controller/javascript.php:569
300
  msgid ""
301
  "You have sold tickets for this ticket type. Please make refunds to all users "
302
  "that purchased tickets"
@@ -304,15 +312,15 @@ msgstr ""
304
  "You have sold tickets for this ticket type. Please make refunds to all users "
305
  "that purchased tickets"
306
 
307
- #: app/controller/javascript.php:572
308
  msgid "Your message has been sent. Thank you for your feedback."
309
  msgstr "Your message has been sent. Thank you for your feedback."
310
 
311
- #: app/controller/javascript.php:573
312
  msgid "Your message has not been sent. Please try again or contact us."
313
  msgstr "Your message has not been sent. Please try again or contact us."
314
 
315
- #: app/controller/javascript.php:575
316
  msgid ""
317
  "Something went wrong while fetching events.<br>The request status is: %STATUS"
318
  "% <br>The error thrown was: %ERROR%"
@@ -320,36 +328,36 @@ msgstr ""
320
  "Something went wrong while fetching events.<br>The request status is: %STATUS"
321
  "% <br>The error thrown was: %ERROR%"
322
 
323
- #: app/controller/javascript.php:578
324
  msgid "Response text received from server"
325
  msgstr "Response text received from server"
326
 
327
- #: app/controller/javascript.php:579
328
  msgid "Click here for technical details"
329
  msgstr "Click here for technical details"
330
 
331
- #: app/controller/javascript.php:584
332
  msgid "The end date can't be earlier than the start date."
333
  msgstr "The end date can't be earlier than the start date."
334
 
335
- #: app/controller/javascript.php:585
336
  msgid "For week and day view, you must select an interval of at least 6 hours."
337
  msgstr ""
338
  "For week and day view, you must select an interval of at least 6 hours."
339
 
340
- #: app/model/api/api-abstract.php:183
341
  msgid "%s.<br/>Detail: %s."
342
  msgstr "%s.<br/>Detail: %s."
343
 
344
- #: app/model/api/api-abstract.php:189
345
  msgid "API URL: %s.<br/>Detail: %s"
346
  msgstr "API URL: %s.<br/>Detail: %s"
347
 
348
- #: app/model/api/api-abstract.php:195
349
  msgid "API URL: %s.<br/>Detail: %s - %s"
350
  msgstr "API URL: %s.<br/>Detail: %s - %s"
351
 
352
- #: app/model/api/api-abstract.php:203
353
  msgid ""
354
  "%s. Please reload this page to try again. If this error persists, please "
355
  "contact us at %s. In your report please include the information below.<br/>"
@@ -359,7 +367,7 @@ msgstr ""
359
  "contact us at %s. In your report please include the information below.<br/>"
360
  "%s."
361
 
362
- #: app/model/api/api-abstract.php:210
363
  msgid ""
364
  "%s. Please try again. If this error persists, please contact us at %s. In "
365
  "your report please include the information below.<br/>%s."
@@ -367,35 +375,51 @@ msgstr ""
367
  "%s. Please try again. If this error persists, please contact us at %s. In "
368
  "your report please include the information below.<br/>%s."
369
 
370
- #: app/model/api/api-abstract.php:398
371
  msgid "Error decoding the response"
372
  msgstr "Error decoding the response"
373
 
374
- #: app/model/api/api-feeds.php:45
375
  msgid "We were unable to get the Suggested Events from Time.ly Network"
376
  msgstr "We were unable to get the Suggested Events from Time.ly Network"
377
 
378
- #: app/model/api/api-registration.php:36
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
379
  msgid "We were unable to Sign you In for Time.ly Network"
380
  msgstr "We were unable to Sign you In for Time.ly Network"
381
 
382
- #: app/model/api/api-registration.php:57
383
  msgid "We were unable to Sign you Up for Time.ly Network"
384
  msgstr "We were unable to Sign you Up for Time.ly Network"
385
 
386
- #: app/model/api/api-registration.php:121
387
  msgid "We were unable to Sign you Out of Time.ly Network"
388
  msgstr "We were unable to Sign you Out of Time.ly Network"
389
 
390
- #: app/model/api/api-registration.php:151
391
  msgid "Payment preferences were saved."
392
  msgstr "Payment preferences were saved."
393
 
394
- #: app/model/api/api-registration.php:160
395
  msgid "Payment preferences were not saved."
396
  msgstr "Payment preferences were not saved."
397
 
398
- #: app/model/api/api-registration.php:188
399
  msgid "We were unable to get the Sales information from Time.ly Network"
400
  msgstr "We were unable to get the Sales information from Time.ly Network"
401
 
@@ -448,59 +472,59 @@ msgstr "We were unable to create the Event on Time.ly Ticketing"
448
  msgid "We were unable to update the Event on Time.ly Ticketing"
449
  msgstr "We were unable to update the Event on Time.ly Ticketing"
450
 
451
- #: app/model/api/api-ticketing.php:400 public/admin/box_event_cost.php:285
452
  msgid "Sale ended"
453
  msgstr "Sale ended"
454
 
455
- #: app/model/api/api-ticketing.php:402 public/admin/box_event_cost.php:289
456
  msgid "Canceled"
457
  msgstr "Canceled"
458
 
459
- #: app/model/api/api-ticketing.php:435
460
  msgid "Past Event"
461
  msgstr "Past Event"
462
 
463
- #: app/model/api/api-ticketing.php:437
464
  msgid "Event closed"
465
  msgstr "Event closed"
466
 
467
- #: app/model/api/api-ticketing.php:439
468
  msgid "Not available yet"
469
  msgstr "Not available yet"
470
 
471
- #: app/model/api/api-ticketing.php:441
472
  msgid "Sale closed"
473
  msgstr "Sale closed"
474
 
475
- #: app/model/api/api-ticketing.php:443
476
  msgid "Sold out"
477
  msgstr "Sold out"
478
 
479
- #: app/model/api/api-ticketing.php:445
480
  msgid "Not available"
481
  msgstr "Not available"
482
 
483
- #: app/model/api/api-ticketing.php:465
484
  msgid "We were unable to get the Event Details from Time.ly Ticketing"
485
  msgstr "We were unable to get the Event Details from Time.ly Ticketing"
486
 
487
- #: app/model/api/api-ticketing.php:495
488
  msgid "We were unable to get the Tickets Details from Time.ly Ticketing"
489
  msgstr "We were unable to get the Tickets Details from Time.ly Ticketing"
490
 
491
- #: app/model/api/api-ticketing.php:522
492
  msgid "We were unable to get the Tickets Attendees from Time.ly Ticketing"
493
  msgstr "We were unable to get the Tickets Attendees from Time.ly Ticketing"
494
 
495
- #: app/model/api/api-ticketing.php:608 app/model/api/api-ticketing.php:668
496
  msgid "Event not found inside the database."
497
  msgstr "Event not found inside the database."
498
 
499
- #: app/model/api/api-ticketing.php:648
500
  msgid "We were unable to Update the Event on Time.ly Network"
501
  msgstr "We were unable to Update the Event on Time.ly Network"
502
 
503
- #: app/model/api/api-ticketing.php:699
504
  msgid "We were unable to remove the Event on Time.ly Network"
505
  msgstr "We were unable to remove the Event on Time.ly Network"
506
 
@@ -532,52 +556,52 @@ msgstr "Site URL"
532
  msgid "Message"
533
  msgstr "Message"
534
 
535
- #: app/model/settings.php:413
536
  #: lib/html/element/setting/calendar-page-selector.php:50
537
  msgid "Calendar page"
538
  msgstr "Calendar page"
539
 
540
- #: app/model/settings.php:423
541
  msgid "Week starts on"
542
  msgstr "Week starts on"
543
 
544
- #: app/model/settings.php:436
545
  msgid "Available views"
546
  msgstr "Available views"
547
 
548
- #: app/model/settings.php:444
549
  msgid "Agenda"
550
  msgid_plural "Agenda"
551
  msgstr[0] "Agenda"
552
  msgstr[1] "Agenda"
553
 
554
- #: app/model/settings.php:455
555
  msgid "Day"
556
  msgid_plural "Day"
557
  msgstr[0] "Day"
558
  msgstr[1] "Day"
559
 
560
- #: app/model/settings.php:466
561
  msgid "Month"
562
  msgid_plural "Month"
563
  msgstr[0] "Month"
564
  msgstr[1] "Month"
565
 
566
- #: app/model/settings.php:477
567
  msgid "Week"
568
  msgid_plural "Week"
569
  msgstr[0] "Week"
570
  msgstr[1] "Week"
571
 
572
- #: app/model/settings.php:491
573
  msgid "Timezone"
574
  msgstr "Timezone"
575
 
576
- #: app/model/settings.php:504
577
  msgid "Preselected calendar filters"
578
  msgstr "Preselected calendar filters"
579
 
580
- #: app/model/settings.php:505 app/view/calendar/widget.php:128
581
  msgid ""
582
  "To clear, hold &#8984;/<abbr class=\"initialism\">CTRL</abbr> and click "
583
  "selection."
@@ -585,31 +609,31 @@ msgstr ""
585
  "To clear, hold &#8984;/<abbr class=\"initialism\">CTRL</abbr> and click "
586
  "selection."
587
 
588
- #: app/model/settings.php:520
589
  msgid "Default calendar start date (optional)"
590
  msgstr "Default calendar start date (optional)"
591
 
592
- #: app/model/settings.php:531
593
  msgid "Agenda pages show at most"
594
  msgstr "Agenda pages show at most"
595
 
596
- #: app/model/settings.php:544
597
  msgid "Week/Day view starts at"
598
  msgstr "Week/Day view starts at"
599
 
600
- #: app/model/settings.php:557
601
  msgid "Week/Day view ends at"
602
  msgstr "Week/Day view ends at"
603
 
604
- #: app/model/settings.php:570
605
  msgid "<strong>Word-wrap event stubs</strong> in Month view"
606
  msgstr "<strong>Word-wrap event stubs</strong> in Month view"
607
 
608
- #: app/model/settings.php:573
609
  msgid "Only applies to events that span a single day."
610
  msgstr "Only applies to events that span a single day."
611
 
612
- #: app/model/settings.php:585
613
  msgid ""
614
  "In <span class=\"ai1ec-tooltip-toggle\"\n"
615
  "\t\t\t\t\t\tdata-original-title=\"These include Agenda view,\n"
@@ -623,23 +647,23 @@ msgstr ""
623
  "\t\t\t\t\t\tAgenda-like views</span>, <strong>include all events\n"
624
  "\t\t\t\t\t\tfrom last day shown</strong>"
625
 
626
- #: app/model/settings.php:601
627
  msgid "Keep all events <strong>expanded</strong> in Agenda view"
628
  msgstr "Keep all events <strong>expanded</strong> in Agenda view"
629
 
630
- #: app/model/settings.php:613
631
  msgid "<strong>Show year</strong> in calendar date labels"
632
  msgstr "<strong>Show year</strong> in calendar date labels"
633
 
634
- #: app/model/settings.php:625
635
  msgid "<strong>Show location in event titles</strong> in calendar views"
636
  msgstr "<strong>Show location in event titles</strong> in calendar views"
637
 
638
- #: app/model/settings.php:637
639
  msgid "<strong>Exclude</strong> events from search results"
640
  msgstr "<strong>Exclude</strong> events from search results"
641
 
642
- #: app/model/settings.php:649
643
  msgid ""
644
  "Hide <strong>Subscribe</strong>/<strong>Add to Calendar</strong> buttons in "
645
  "calendar and single event views "
@@ -647,15 +671,15 @@ msgstr ""
647
  "Hide <strong>Subscribe</strong>/<strong>Add to Calendar</strong> buttons in "
648
  "calendar and single event views "
649
 
650
- #: app/model/settings.php:661
651
  msgid "Hide <strong>Get a Timely Calendar</strong> button"
652
  msgstr "Hide <strong>Get a Timely Calendar</strong> button"
653
 
654
- #: app/model/settings.php:673
655
  msgid " Hide <strong>Google Maps</strong> until clicked"
656
  msgstr " Hide <strong>Google Maps</strong> until clicked"
657
 
658
- #: app/model/settings.php:685
659
  msgid ""
660
  " <strong>Affix filter menu</strong> to top of window when it scrolls out of "
661
  "view"
@@ -663,69 +687,69 @@ msgstr ""
663
  " <strong>Affix filter menu</strong> to top of window when it scrolls out of "
664
  "view"
665
 
666
- #: app/model/settings.php:688
667
  msgid "Only applies to first visible calendar found on the page."
668
  msgstr "Only applies to first visible calendar found on the page."
669
 
670
- #: app/model/settings.php:700
671
  msgid "Offset affixed filter bar vertically by"
672
  msgstr "Offset affixed filter bar vertically by"
673
 
674
- #: app/model/settings.php:715
675
  msgid "Wide screens only (&#8805; 1200px)"
676
  msgstr "Wide screens only (&#8805; 1200px)"
677
 
678
- #: app/model/settings.php:730
679
  msgid "Tablets only (< 980px)"
680
  msgstr "Tablets only (< 980px)"
681
 
682
- #: app/model/settings.php:745
683
  msgid "Phones only (< 768px)"
684
  msgstr "Phones only (< 768px)"
685
 
686
- #: app/model/settings.php:758
687
  msgid "Strict compatibility content filtering"
688
  msgstr "Strict compatibility content filtering"
689
 
690
- #: app/model/settings.php:770
691
  msgid " <strong>Hide featured image</strong> from event details page"
692
  msgstr " <strong>Hide featured image</strong> from event details page"
693
 
694
- #: app/model/settings.php:773
695
  msgid ""
696
  "Select this option if your theme already displays each post's featured image."
697
  msgstr ""
698
  "Select this option if your theme already displays each post's featured image."
699
 
700
- #: app/model/settings.php:784
701
  msgid "Input dates in this format"
702
  msgstr "Input dates in this format"
703
 
704
- #: app/model/settings.php:789
705
  msgid "Default (d/m/yyyy)"
706
  msgstr "Default (d/m/yyyy)"
707
 
708
- #: app/model/settings.php:793
709
  msgid "US (m/d/yyyy)"
710
  msgstr "US (m/d/yyyy)"
711
 
712
- #: app/model/settings.php:797
713
  msgid "ISO 8601 (yyyy-m-d)"
714
  msgstr "ISO 8601 (yyyy-m-d)"
715
 
716
- #: app/model/settings.php:801
717
  msgid "Dotted (m.d.yyyy)"
718
  msgstr "Dotted (m.d.yyyy)"
719
 
720
- #: app/model/settings.php:813
721
  msgid " Use <strong>24h time</strong> in time pickers"
722
  msgstr " Use <strong>24h time</strong> in time pickers"
723
 
724
- #: app/model/settings.php:824
725
  msgid "<strong>Disable address autocomplete</strong> function"
726
  msgstr "<strong>Disable address autocomplete</strong> function"
727
 
728
- #: app/model/settings.php:835
729
  msgid ""
730
  "Use the configured <strong>region</strong> (WordPress locale) to bias the "
731
  "address autocomplete function "
@@ -733,7 +757,7 @@ msgstr ""
733
  "Use the configured <strong>region</strong> (WordPress locale) to bias the "
734
  "address autocomplete function "
735
 
736
- #: app/model/settings.php:851
737
  msgid ""
738
  " Show the old <strong>Post Your Event</strong> button above the calendar to "
739
  "privileged users"
@@ -741,7 +765,7 @@ msgstr ""
741
  " Show the old <strong>Post Your Event</strong> button above the calendar to "
742
  "privileged users"
743
 
744
- #: app/model/settings.php:854
745
  msgid ""
746
  "Install the <a target=\"_blank\" href=\"http://time.ly/\">Interactive "
747
  "Frontend Extension</a> for the <strong>frontend Post Your Event form</"
@@ -751,11 +775,11 @@ msgstr ""
751
  "Frontend Extension</a> for the <strong>frontend Post Your Event form</"
752
  "strong>."
753
 
754
- #: app/model/settings.php:875
755
  msgid "Move calendar into this DOM element"
756
  msgstr "Move calendar into this DOM element"
757
 
758
- #: app/model/settings.php:877
759
  msgid ""
760
  "Optional. Use this JavaScript-based shortcut to place the\n"
761
  "\t\t\t\t\t\tcalendar a DOM element other than the usual page content "
@@ -779,7 +803,7 @@ msgstr ""
779
  "\t\t\t\t\t\tAny existing markup found within the target will be replaced\n"
780
  "\t\t\t\t\t\tby the calendar."
781
 
782
- #: app/model/settings.php:896
783
  msgid ""
784
  "<strong>Skip <tt>in_the_loop()</tt> check </strong> that protects against "
785
  "multiple calendar output"
@@ -787,7 +811,7 @@ msgstr ""
787
  "<strong>Skip <tt>in_the_loop()</tt> check </strong> that protects against "
788
  "multiple calendar output"
789
 
790
- #: app/model/settings.php:899
791
  msgid ""
792
  "Try enabling this option if your calendar does not appear on the calendar "
793
  "page. It is needed for compatibility with a small number of themes that call "
@@ -797,11 +821,11 @@ msgstr ""
797
  "page. It is needed for compatibility with a small number of themes that call "
798
  "<tt>the_content()</tt> from outside of The Loop. Leave disabled otherwise."
799
 
800
- #: app/model/settings.php:911
801
  msgid "Disable <strong>gzip</strong> compression."
802
  msgstr "Disable <strong>gzip</strong> compression."
803
 
804
- #: app/model/settings.php:914
805
  msgid ""
806
  "Use this option if calendar is unresponsive. <a target=\"_blank\" href="
807
  "\"http://time.ly/document/user-guide/troubleshooting/disable-gzip-"
@@ -813,11 +837,11 @@ msgstr ""
813
  "compression/\">Read more</a> about the issue. (From version 2.1 onwards, "
814
  "gzip is disabled by default for maximum compatibility.)"
815
 
816
- #: app/model/settings.php:926
817
  msgid "Use frontend rendering."
818
  msgstr "Use frontend rendering."
819
 
820
- #: app/model/settings.php:929
821
  msgid ""
822
  "Renders calendar views on the client rather than the server; can improve "
823
  "performance."
@@ -825,15 +849,15 @@ msgstr ""
825
  "Renders calendar views on the client rather than the server; can improve "
826
  "performance."
827
 
828
- #: app/model/settings.php:941
829
  msgid "Use advanced JS cache."
830
  msgstr "Use advanced JS cache."
831
 
832
- #: app/model/settings.php:944
833
  msgid "Cache dynamically generated JS files. Improves performance."
834
  msgstr "Cache dynamically generated JS files. Improves performance."
835
 
836
- #: app/model/settings.php:956
837
  msgid ""
838
  "<strong>Link CSS</strong> in <code>&lt;head&gt;</code> section when file "
839
  "cache is unavailable."
@@ -841,7 +865,7 @@ msgstr ""
841
  "<strong>Link CSS</strong> in <code>&lt;head&gt;</code> section when file "
842
  "cache is unavailable."
843
 
844
- #: app/model/settings.php:959
845
  msgid ""
846
  "Use this option if file cache is unavailable and you would prefer to serve "
847
  "CSS as a link rather than have it output inline."
@@ -849,11 +873,11 @@ msgstr ""
849
  "Use this option if file cache is unavailable and you would prefer to serve "
850
  "CSS as a link rather than have it output inline."
851
 
852
- #: app/model/settings.php:971
853
  msgid "Current <strong>robots.txt</strong> on this site"
854
  msgstr "Current <strong>robots.txt</strong> on this site"
855
 
856
- #: app/model/settings.php:975
857
  msgid ""
858
  "The Robot Exclusion Standard, also known as the Robots Exclusion Protocol "
859
  "or\n"
@@ -877,7 +901,7 @@ msgstr ""
877
  "\t\t\t\t\t\tYou can change it manually by editing <code>robots.txt</code> in "
878
  "your root WordPress directory."
879
 
880
- #: app/model/settings.php:992
881
  msgid ""
882
  "<strong>Publicize, promote, and share my events</strong> marked as public on "
883
  "the Timely network. (<a href=\"%s\" target=\"_blank\">Learn more &#187;</a>)"
@@ -885,15 +909,15 @@ msgstr ""
885
  "<strong>Publicize, promote, and share my events</strong> marked as public on "
886
  "the Timely network. (<a href=\"%s\" target=\"_blank\">Learn more &#187;</a>)"
887
 
888
- #: app/model/settings.php:1015
889
  msgid "Templates cache improves site performance"
890
  msgstr "Templates cache improves site performance"
891
 
892
- #: app/model/settings.php:1028
893
  msgid "Display events in <strong>calendar time zone</strong>"
894
  msgstr "Display events in <strong>calendar time zone</strong>"
895
 
896
- #: app/model/settings.php:1031
897
  msgid ""
898
  "If this box is checked events will appear in the calendar time zone with "
899
  "time zone information displayed on the event details page."
@@ -984,6 +1008,7 @@ msgid "Show All Authors"
984
  msgstr "Show All Authors"
985
 
986
  #: app/view/admin/calendar-feeds.php:27 app/view/admin/calendar-feeds.php:28
 
987
  msgid "Import Feeds"
988
  msgstr "Import Feeds"
989
 
@@ -1150,7 +1175,7 @@ msgid "All-in-One Event Calendar: Settings"
1150
  msgstr "All-in-One Event Calendar: Settings"
1151
 
1152
  #: app/view/admin/settings.php:68 app/view/admin/settings.php:69
1153
- #: app/view/admin/tickets.php:104 lib/date/timezone.php:366
1154
  msgid "Settings"
1155
  msgstr "Settings"
1156
 
@@ -1200,7 +1225,7 @@ msgstr "Cache Report"
1200
  msgid "Please, Sign In to Timely Network."
1201
  msgstr "Please, Sign In to Timely Network."
1202
 
1203
- #: app/view/admin/settings.php:184 app/view/admin/tickets.php:110
1204
  #: public/admin/box_ask_customer_review.php:113
1205
  #: public/admin/box_ask_customer_review.php:127
1206
  #: public/admin/box_ask_customer_review.php:141
@@ -1273,11 +1298,11 @@ msgstr ""
1273
  "Conditions</a> for more details."
1274
 
1275
  #: app/view/admin/settings.php:204 public/admin/box_repeat.php:116
1276
- #: public/admin/plugins/ics/display_feeds.php:84
1277
  msgid "Cancel"
1278
  msgstr "Cancel"
1279
 
1280
- #: app/view/admin/settings.php:205 app/view/admin/tickets.php:119
1281
  msgid "Sign Out"
1282
  msgstr "Sign Out"
1283
 
@@ -1360,12 +1385,12 @@ msgstr "Ticketing"
1360
  msgid "Ticketing<sup>beta</sup>"
1361
  msgstr "Ticketing<sup>beta</sup>"
1362
 
1363
- #: app/view/admin/tickets.php:71 app/view/admin/tickets.php:86
1364
- #: app/view/admin/tickets.php:98
1365
  msgid "Time.ly Ticketing<sup>beta</sup>"
1366
  msgstr "Time.ly Ticketing<sup>beta</sup>"
1367
 
1368
- #: app/view/admin/tickets.php:75
1369
  msgid ""
1370
  "You need to sign up for a Timely Network account in order to use "
1371
  "Ticketing<sup>beta</sup> <br /><br />"
@@ -1373,7 +1398,7 @@ msgstr ""
1373
  "You need to sign up for a Timely Network account in order to use "
1374
  "Ticketing<sup>beta</sup> <br /><br />"
1375
 
1376
- #: app/view/admin/tickets.php:78
1377
  msgid ""
1378
  "<a href=\"edit.php?post_type=ai1ec_event&page=all-in-one-event-calendar-"
1379
  "settings\" class=\"ai1ec-btn ai1ec-btn-primary ai1ec-btn-lg\">Sign In to "
@@ -1383,7 +1408,7 @@ msgstr ""
1383
  "settings\" class=\"ai1ec-btn ai1ec-btn-primary ai1ec-btn-lg\">Sign In to "
1384
  "Timely Network</a>"
1385
 
1386
- #: app/view/admin/tickets.php:79
1387
  msgid ""
1388
  "<b>Signing up for a Timely Network account is currently unavailable. Please, "
1389
  "try again later.</b>"
@@ -1391,7 +1416,7 @@ msgstr ""
1391
  "<b>Signing up for a Timely Network account is currently unavailable. Please, "
1392
  "try again later.</b>"
1393
 
1394
- #: app/view/admin/tickets.php:101
1395
  msgid ""
1396
  "Please consider Ticketing is in beta. If you encounter any bugs please raise "
1397
  "the at <a href=\"mailto:labs@time.ly\">labs@time.ly</a>. Any enhancements "
@@ -1403,69 +1428,69 @@ msgstr ""
1403
  "requests please raise them on <a href=\"http://ideas.time.ly\">ideas.time."
1404
  "ly</a> under \"Ticketing\"."
1405
 
1406
- #: app/view/admin/tickets.php:105
1407
  msgid "Sales"
1408
  msgstr "Sales"
1409
 
1410
- #: app/view/admin/tickets.php:106
1411
  msgid "Please provide your PayPal details."
1412
  msgstr "Please provide your PayPal details."
1413
 
1414
- #: app/view/admin/tickets.php:107
1415
  msgid "Cheque"
1416
  msgstr "Cheque"
1417
 
1418
- #: app/view/admin/tickets.php:108
1419
  msgid "PayPal"
1420
  msgstr "PayPal"
1421
 
1422
- #: app/view/admin/tickets.php:109
1423
  msgid "Preferred currency for tickets:"
1424
  msgstr "Preferred currency for tickets:"
1425
 
1426
- #: app/view/admin/tickets.php:111
1427
  msgid "Save Changes"
1428
  msgstr "Save Changes"
1429
 
1430
- #: app/view/admin/tickets.php:112
1431
  msgid "Date"
1432
  msgstr "Date"
1433
 
1434
- #: app/view/admin/tickets.php:113
1435
  msgid "Event"
1436
  msgstr "Event"
1437
 
1438
- #: app/view/admin/tickets.php:114
1439
  msgid "Purchaser"
1440
  msgstr "Purchaser"
1441
 
1442
- #: app/view/admin/tickets.php:115 app/view/calendar/view/abstract.php:107
1443
  #: app/view/event/ticket.php:39
1444
  msgid "Tickets"
1445
  msgstr "Tickets"
1446
 
1447
- #: app/view/admin/tickets.php:118
1448
  msgid "Total"
1449
  msgstr "Total"
1450
 
1451
- #: app/view/admin/tickets.php:135
1452
  msgid "United States Dollar"
1453
  msgstr "United States Dollar"
1454
 
1455
- #: app/view/admin/tickets.php:136
1456
  msgid "Canadian Dollar"
1457
  msgstr "Canadian Dollar"
1458
 
1459
- #: app/view/admin/tickets.php:137
1460
  msgid "Australian Dollar"
1461
  msgstr "Australian Dollar"
1462
 
1463
- #: app/view/admin/tickets.php:138
1464
  msgid "Brazilian Real"
1465
  msgstr "Brazilian Real"
1466
 
1467
- #: app/view/admin/tickets.php:138 app/view/admin/tickets.php:146
1468
- #: app/view/admin/tickets.php:159
1469
  msgid ""
1470
  "Note: This currency is supported as a payment currency and a currency "
1471
  "balance for in-country PayPal accounts only."
@@ -1473,27 +1498,27 @@ msgstr ""
1473
  "Note: This currency is supported as a payment currency and a currency "
1474
  "balance for in-country PayPal accounts only."
1475
 
1476
- #: app/view/admin/tickets.php:139
1477
  msgid "Czech Koruna"
1478
  msgstr "Czech Koruna"
1479
 
1480
- #: app/view/admin/tickets.php:140
1481
  msgid "Danish Krone"
1482
  msgstr "Danish Krone"
1483
 
1484
- #: app/view/admin/tickets.php:141
1485
  msgid "Euro"
1486
  msgstr "Euro"
1487
 
1488
- #: app/view/admin/tickets.php:142
1489
  msgid "Hong Kong Dollar"
1490
  msgstr "Hong Kong Dollar"
1491
 
1492
- #: app/view/admin/tickets.php:143
1493
  msgid "Hungarian Forint"
1494
  msgstr "Hungarian Forint"
1495
 
1496
- #: app/view/admin/tickets.php:143 app/view/admin/tickets.php:157
1497
  msgid ""
1498
  "Note: Decimal amounts are not supported for this currency. Passing a decimal "
1499
  "amount will throw an error."
@@ -1501,15 +1526,15 @@ msgstr ""
1501
  "Note: Decimal amounts are not supported for this currency. Passing a decimal "
1502
  "amount will throw an error."
1503
 
1504
- #: app/view/admin/tickets.php:144
1505
  msgid "Israeli New Sheqel"
1506
  msgstr "Israeli New Sheqel"
1507
 
1508
- #: app/view/admin/tickets.php:145
1509
  msgid "Japanese Yen"
1510
  msgstr "Japanese Yen"
1511
 
1512
- #: app/view/admin/tickets.php:145
1513
  msgid ""
1514
  "Note: This currency does not support decimals. Passing a decimal amount will "
1515
  "throw an error. 1,000,000"
@@ -1517,39 +1542,39 @@ msgstr ""
1517
  "Note: This currency does not support decimals. Passing a decimal amount will "
1518
  "throw an error. 1,000,000"
1519
 
1520
- #: app/view/admin/tickets.php:146
1521
  msgid "Malaysian Ringgit"
1522
  msgstr "Malaysian Ringgit"
1523
 
1524
- #: app/view/admin/tickets.php:147
1525
  msgid "Mexican Peso"
1526
  msgstr "Mexican Peso"
1527
 
1528
- #: app/view/admin/tickets.php:148
1529
  msgid "Norwegian Krone"
1530
  msgstr "Norwegian Krone"
1531
 
1532
- #: app/view/admin/tickets.php:149
1533
  msgid "New Zealand Dollar"
1534
  msgstr "New Zealand Dollar"
1535
 
1536
- #: app/view/admin/tickets.php:150
1537
  msgid "Philippine Peso"
1538
  msgstr "Philippine Peso"
1539
 
1540
- #: app/view/admin/tickets.php:151
1541
  msgid "Polish Zloty"
1542
  msgstr "Polish Zloty"
1543
 
1544
- #: app/view/admin/tickets.php:152
1545
  msgid "Pound Sterling"
1546
  msgstr "Pound Sterling"
1547
 
1548
- #: app/view/admin/tickets.php:153
1549
  msgid "Russian Ruble"
1550
  msgstr "Russian Ruble"
1551
 
1552
- #: app/view/admin/tickets.php:153
1553
  msgid ""
1554
  "For in-border payments (payments made within Russia), the Russian Ruble is "
1555
  "the only accepted currency. If you use another currency for in-border "
@@ -1559,27 +1584,27 @@ msgstr ""
1559
  "the only accepted currency. If you use another currency for in-border "
1560
  "payments, the transaction will fail"
1561
 
1562
- #: app/view/admin/tickets.php:154
1563
  msgid "Singapore Dollar"
1564
  msgstr "Singapore Dollar"
1565
 
1566
- #: app/view/admin/tickets.php:155
1567
  msgid "Swedish Krona"
1568
  msgstr "Swedish Krona"
1569
 
1570
- #: app/view/admin/tickets.php:156
1571
  msgid "Swiss Franc"
1572
  msgstr "Swiss Franc"
1573
 
1574
- #: app/view/admin/tickets.php:157
1575
  msgid "Taiwan New Dollar"
1576
  msgstr "Taiwan New Dollar"
1577
 
1578
- #: app/view/admin/tickets.php:158
1579
  msgid "Thai Baht"
1580
  msgstr "Thai Baht"
1581
 
1582
- #: app/view/admin/tickets.php:159
1583
  msgid "Turkish Lira"
1584
  msgstr "Turkish Lira"
1585
 
@@ -1729,32 +1754,32 @@ msgstr "Clear tag filter"
1729
  msgid "Tags"
1730
  msgstr "Tags"
1731
 
1732
- #: app/view/calendar/view/agenda.php:142
1733
  msgid "Collapse All"
1734
  msgstr "Collapse All"
1735
 
1736
- #: app/view/calendar/view/agenda.php:143
1737
  msgid "Expand All"
1738
  msgstr "Expand All"
1739
 
1740
- #: app/view/calendar/view/agenda.php:166
1741
  msgid "There are no upcoming events to display at this time."
1742
  msgstr "There are no upcoming events to display at this time."
1743
 
1744
- #: app/view/calendar/view/agenda.php:168
1745
  msgid "Read more"
1746
  msgstr "Read more"
1747
 
1748
- #: app/view/calendar/view/agenda.php:169
1749
  msgid "Categories:"
1750
  msgstr "Categories:"
1751
 
1752
- #: app/view/calendar/view/agenda.php:170 lib/theme/list.php:320
1753
  #: public/admin/themes.php:29
1754
  msgid "Tags:"
1755
  msgstr "Tags:"
1756
 
1757
- #: app/view/calendar/view/agenda.php:171 app/view/calendar/view/month.php:87
1758
  #: app/view/calendar/view/oneday.php:105 app/view/calendar/view/week.php:118
1759
  #: app/view/calendar/widget.php:374
1760
  msgid "@ %s"
@@ -1987,78 +2012,74 @@ msgstr "Excludes: "
1987
  msgid "Repeats"
1988
  msgstr "Repeats"
1989
 
1990
- #: lib/calendar-feed/ics.php:38
1991
- msgid "ICS"
1992
- msgstr "ICS"
1993
 
1994
- #: lib/calendar-feed/ics.php:69
1995
  msgid "Another import process in progress. Please try again later."
1996
  msgstr "Another import process in progress. Please try again later."
1997
 
1998
- #: lib/calendar-feed/ics.php:174
1999
- msgid ""
2000
- "A system error has prevented calendar data from being fetched. Something is "
2001
- "preventing the plugin from functioning correctly. This message should "
2002
- "provide a clue: %s"
2003
- msgstr ""
2004
- "A system error has prevented calendar data from being fetched. Something is "
2005
- "preventing the plugin from functioning correctly. This message should "
2006
- "provide a clue: %s"
2007
-
2008
- #: lib/calendar-feed/ics.php:181
2009
- msgid ""
2010
- "Calendar data could not be fetched. If your URL is valid and contains an "
2011
- "iCalendar resource, this is likely the result of a temporary server error "
2012
- "and time may resolve this issue"
2013
- msgstr ""
2014
- "Calendar data could not be fetched. If your URL is valid and contains an "
2015
- "iCalendar resource, this is likely the result of a temporary server error "
2016
- "and time may resolve this issue"
2017
-
2018
- #: lib/calendar-feed/ics.php:195
2019
  msgid "Imported %s event"
2020
  msgid_plural "Imported %s events"
2021
  msgstr[0] "Imported %s event"
2022
  msgstr[1] "Imported %s events"
2023
 
2024
- #: lib/calendar-feed/ics.php:202 lib/calendar-feed/ics.php:707
2025
  msgid "Invalid ICS feed ID"
2026
  msgstr "Invalid ICS feed ID"
2027
 
2028
- #: lib/calendar-feed/ics.php:350
2029
  msgid "Categories (optional)"
2030
  msgstr "Categories (optional)"
2031
 
2032
- #: lib/calendar-feed/ics.php:367
2033
  msgid ""
2034
  "Do you want to keep the events imported from the calendar or remove them?"
2035
  msgstr ""
2036
  "Do you want to keep the events imported from the calendar or remove them?"
2037
 
2038
- #: lib/calendar-feed/ics.php:373
2039
  msgid "Removing ICS Feed"
2040
  msgstr "Removing ICS Feed"
2041
 
2042
- #: lib/calendar-feed/ics.php:376
2043
  msgid "Keep Events"
2044
  msgstr "Keep Events"
2045
 
2046
- #: lib/calendar-feed/ics.php:379
2047
  msgid "Remove Events"
2048
  msgstr "Remove Events"
2049
 
2050
- #: lib/calendar-feed/ics.php:519
2051
  msgid "Oh, submission was not accepted."
2052
  msgstr "Oh, submission was not accepted."
2053
 
2054
- #: lib/calendar-feed/ics.php:699
2055
  msgid "Deleted %d events"
2056
  msgstr "Deleted %d events"
2057
 
2058
- #: lib/calendar-feed/ics.php:735
2059
  msgid "Feed deleted"
2060
  msgstr "Feed deleted"
2061
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2062
  #: lib/captcha/provider/nocaptcha.php:31
2063
  msgid "noCAPTCHA public key:"
2064
  msgstr "noCAPTCHA public key:"
@@ -2243,7 +2264,17 @@ msgstr ""
2243
  "The plugin is installed, but has not been configured. Please log in as an "
2244
  "Administrator to set it up."
2245
 
2246
- #: lib/environment/check.php:104
 
 
 
 
 
 
 
 
 
 
2247
  msgid ""
2248
  "PHP extension \"iconv\" needed for All-In-One-Event-Calendar is missing. "
2249
  "Please, check your PHP configuration.<br />"
@@ -2251,7 +2282,7 @@ msgstr ""
2251
  "PHP extension \"iconv\" needed for All-In-One-Event-Calendar is missing. "
2252
  "Please, check your PHP configuration.<br />"
2253
 
2254
- #: lib/environment/check.php:120
2255
  msgid ""
2256
  "PHP extension \"mbstring\" needed for All-In-One-Event-Calendar is missing. "
2257
  "Please, check your PHP configuration.<br />"
@@ -2259,7 +2290,7 @@ msgstr ""
2259
  "PHP extension \"mbstring\" needed for All-In-One-Event-Calendar is missing. "
2260
  "Please, check your PHP configuration.<br />"
2261
 
2262
- #: lib/environment/check.php:230
2263
  msgid ""
2264
  "The add-on <strong>%s</strong> must be updated to at least version %s to "
2265
  "maintain compatibility with the core calendar."
@@ -2267,7 +2298,7 @@ msgstr ""
2267
  "The add-on <strong>%s</strong> must be updated to at least version %s to "
2268
  "maintain compatibility with the core calendar."
2269
 
2270
- #: lib/environment/check.php:231
2271
  msgid ""
2272
  "If you do not see update notices below, ensure you have properly <a href="
2273
  "\"https://time.ly/document/user-guide/getting-started/license-keys/\" target="
@@ -2493,7 +2524,7 @@ msgstr ""
2493
  "page. Do not attempt to embed the calendar via shortcode in a page that "
2494
  "already displays the calendar."
2495
 
2496
- #: lib/import-export/ics.php:894
2497
  msgid "Tickets: "
2498
  msgstr "Tickets: "
2499
 
@@ -3177,15 +3208,15 @@ msgstr "Eventbrite Ticketing"
3177
  msgid "Register this event with Eventbrite.com?"
3178
  msgstr "Register this event with Eventbrite.com?"
3179
 
3180
- #: public/admin/box_eventbrite.php:12 public/admin/feed_row.php:43
3181
- #: public/admin/feed_row.php:54 public/admin/feed_row.php:66
3182
- #: public/admin/feed_row.php:78 public/admin/feed_row.php:91
3183
  msgid "Yes"
3184
  msgstr "Yes"
3185
 
3186
- #: public/admin/box_eventbrite.php:14 public/admin/feed_row.php:45
3187
- #: public/admin/feed_row.php:56 public/admin/feed_row.php:68
3188
- #: public/admin/feed_row.php:80 public/admin/feed_row.php:93
3189
  msgid "No"
3190
  msgstr "No"
3191
 
@@ -3286,7 +3317,7 @@ msgid "Ending after"
3286
  msgstr "Ending after"
3287
 
3288
  #: public/admin/box_repeat.php:109
3289
- #: public/admin/plugins/ics/display_feeds.php:90
3290
  msgid "Please wait&#8230;"
3291
  msgstr "Please wait&#8230;"
3292
 
@@ -3438,31 +3469,31 @@ msgstr "Hourly"
3438
  msgid "Twice Daily"
3439
  msgstr "Twice Daily"
3440
 
3441
- #: public/admin/feed_row.php:14 public/admin/plugins/ics/display_feeds.php:27
3442
- msgid "iCalendar/.ics Feed URL:"
3443
- msgstr "iCalendar/.ics Feed URL:"
3444
 
3445
- #: public/admin/feed_row.php:24
3446
  msgid "Event categories:"
3447
  msgstr "Event categories:"
3448
 
3449
- #: public/admin/feed_row.php:31
3450
  msgid "Tag with"
3451
  msgstr "Tag with"
3452
 
3453
- #: public/admin/feed_row.php:40
3454
  msgid "Allow comments"
3455
  msgstr "Allow comments"
3456
 
3457
- #: public/admin/feed_row.php:51
3458
  msgid "Show map"
3459
  msgstr "Show map"
3460
 
3461
- #: public/admin/feed_row.php:63
3462
  msgid "Keep original events categories and tags"
3463
  msgstr "Keep original events categories and tags"
3464
 
3465
- #: public/admin/feed_row.php:75 public/admin/plugins/ics/display_feeds.php:67
3466
  msgid ""
3467
  "On refresh, preserve previously imported events that are missing from the "
3468
  "feed"
@@ -3470,7 +3501,7 @@ msgstr ""
3470
  "On refresh, preserve previously imported events that are missing from the "
3471
  "feed"
3472
 
3473
- #: public/admin/feed_row.php:86 public/admin/plugins/ics/display_feeds.php:74
3474
  msgid ""
3475
  "Guesses the time zone of events that have none specified; recommended for "
3476
  "Google Calendar feeds"
@@ -3478,67 +3509,170 @@ msgstr ""
3478
  "Guesses the time zone of events that have none specified; recommended for "
3479
  "Google Calendar feeds"
3480
 
3481
- #: public/admin/feed_row.php:87 public/admin/plugins/ics/display_feeds.php:75
3482
  msgid "Assign default time zone to events in UTC"
3483
  msgstr "Assign default time zone to events in UTC"
3484
 
3485
- #: public/admin/feed_row.php:104
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3486
  msgid "Refreshing&#8230;"
3487
  msgstr "Refreshing&#8230;"
3488
 
3489
- #: public/admin/feed_row.php:106
3490
  msgid "Refresh"
3491
  msgstr "Refresh"
3492
 
3493
- #: public/admin/feed_row.php:119
3494
  msgid "Removing&#8230;"
3495
  msgstr "Removing&#8230;"
3496
 
3497
- #: public/admin/feed_row.php:121
3498
- msgid "Remove"
3499
- msgstr "Remove"
3500
-
3501
  #: public/admin/import.php:6
3502
  msgid "Successfully imported events:"
3503
  msgstr "Successfully imported events:"
3504
 
3505
- #: public/admin/plugins/ics/display_feeds.php:2
 
 
 
 
 
 
 
 
 
 
 
 
3506
  msgid ""
3507
- "Configure which other calendars your own calendar subscribes to.\n"
3508
- " You can add any calendar that provides an iCalendar (.ics) feed.\n"
3509
- " Enter the feed URL(s) below and the events from those feeds will be\n"
3510
- " imported periodically."
3511
  msgstr ""
3512
- "Configure which other calendars your own calendar subscribes to.\n"
3513
- " You can add any calendar that provides an iCalendar (.ics) feed.\n"
3514
- " Enter the feed URL(s) below and the events from those feeds will be\n"
3515
- " imported periodically."
3516
 
3517
- #: public/admin/plugins/ics/display_feeds.php:14
3518
- msgid "Check for new events"
3519
- msgstr "Check for new events"
3520
 
3521
- #: public/admin/plugins/ics/display_feeds.php:45
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3522
  msgid "Allow comments on imported events"
3523
  msgstr "Allow comments on imported events"
3524
 
3525
- #: public/admin/plugins/ics/display_feeds.php:52
3526
  msgid "Show map on imported events"
3527
  msgstr "Show map on imported events"
3528
 
3529
- #: public/admin/plugins/ics/display_feeds.php:59
3530
  msgid ""
3531
  "Import any tags/categories provided by feed, in addition those selected above"
3532
  msgstr ""
3533
  "Import any tags/categories provided by feed, in addition those selected above"
3534
 
3535
- #: public/admin/plugins/ics/display_feeds.php:93
3536
- msgid "Add new subscription"
3537
- msgstr "Add new subscription"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3538
 
3539
- #: public/admin/plugins/ics/display_feeds.php:96
3540
- msgid "Update subscription"
3541
- msgstr "Update subscription"
3542
 
3543
  #: public/admin/row_custom.php:3
3544
  msgid "Custom dates:"
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.5.0\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/all-in-one-event-calendar\n"
7
+ "POT-Creation-Date: 2016-06-14 16:02:21+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: 2016-06-14 16:02+0000\n"
12
  "Last-Translator: Timely <support@time.ly>\n"
13
  "Language-Team:\n"
14
 
32
  msgid "Calendar Themes"
33
  msgstr "Calendar Themes"
34
 
35
+ #: app/controller/front.php:1061
36
  msgid ""
37
  "Your database is found to be corrupt. Likely previous update has failed. "
38
  "Please restore All-in-One Event Calendar tables from a backup and retry."
164
  "\t\t\t\tThe Event has the cost option Tickets selected but no ticket was "
165
  "included.</b>"
166
 
167
+ #: app/controller/javascript.php:508
168
+ msgid "Event was imported successfully."
169
+ msgstr "Event was imported successfully."
170
+
171
+ #: app/controller/javascript.php:511
172
+ msgid "An error occurred when importing event. Please, try later."
173
+ msgstr "An error occurred when importing event. Please, try later."
174
+
175
+ #: app/controller/javascript.php:541 app/view/admin/widget-creator.php:139
176
  msgid "Preview:"
177
  msgstr "Preview:"
178
 
179
+ #: app/controller/javascript.php:542
180
  msgid ""
181
  "Loading preview&nbsp;<i class=\"ai1ec-fa ai1ec-fa-spin ai1ec-fa-spinner\"></"
182
  "i>"
184
  "Loading preview&nbsp;<i class=\"ai1ec-fa ai1ec-fa-spin ai1ec-fa-spinner\"></"
185
  "i>"
186
 
187
+ #: app/controller/javascript.php:547 app/view/admin/all-events.php:83
188
  msgid "Ticketing Details"
189
  msgstr "Ticketing Details"
190
 
191
+ #: app/controller/javascript.php:548
192
  msgid "Hide Ticketing Details"
193
  msgstr "Hide Ticketing Details"
194
 
195
+ #: app/controller/javascript.php:549
196
  msgid "Loading tickets details..."
197
  msgstr "Loading tickets details..."
198
 
199
+ #: app/controller/javascript.php:550
200
  msgid "Type and price"
201
  msgstr "Type and price"
202
 
203
+ #: app/controller/javascript.php:551
204
  msgid "Info"
205
  msgstr "Info"
206
 
207
+ #: app/controller/javascript.php:552
208
  msgid "Information"
209
  msgstr "Information"
210
 
211
+ #: app/controller/javascript.php:553
212
  msgid "Report"
213
  msgstr "Report"
214
 
215
+ #: app/controller/javascript.php:554
216
  msgid "Sale dates"
217
  msgstr "Sale dates"
218
 
219
+ #: app/controller/javascript.php:555
220
  msgid "Limits"
221
  msgstr "Limits"
222
 
223
+ #: app/controller/javascript.php:556
224
  msgid "Actions"
225
  msgstr "Actions"
226
 
227
+ #: app/controller/javascript.php:557
228
  msgid "Sold:"
229
  msgstr "Sold:"
230
 
231
+ #: app/controller/javascript.php:558
232
  msgid "Left:"
233
  msgstr "Left:"
234
 
235
+ #: app/controller/javascript.php:559
236
  msgid "Start:"
237
  msgstr "Start:"
238
 
239
+ #: app/controller/javascript.php:560
240
  msgid "End:"
241
  msgstr "End:"
242
 
243
+ #: app/controller/javascript.php:561 public/admin/box_event_cost.php:158
244
  msgid "Min:"
245
  msgstr "Min:"
246
 
247
+ #: app/controller/javascript.php:562 public/admin/box_event_cost.php:168
248
  msgid "Max:"
249
  msgstr "Max:"
250
 
251
+ #: app/controller/javascript.php:563
252
  msgid "Attendees"
253
  msgstr "Attendees"
254
 
255
+ #: app/controller/javascript.php:564
256
  msgid "Hide Attendees"
257
  msgstr "Hide Attendees"
258
 
259
+ #: app/controller/javascript.php:565
260
  msgid "Attendees List"
261
  msgstr "Attendees List"
262
 
263
+ #: app/controller/javascript.php:566
264
  msgid "Guest Name"
265
  msgstr "Guest Name"
266
 
267
+ #: app/controller/javascript.php:567 app/view/admin/tickets.php:116
268
  msgid "Status"
269
  msgstr "Status"
270
 
271
+ #: app/controller/javascript.php:568 app/view/admin/tickets.php:115
272
  #: app/view/event/ticket.php:71
273
  msgid "Email"
274
  msgstr "Email"
275
 
276
+ #: app/controller/javascript.php:569
277
  msgid "No attendees for this ticket type."
278
  msgstr "No attendees for this ticket type."
279
 
280
+ #: app/controller/javascript.php:570 app/view/calendar/view/agenda.php:205
281
+ #: app/view/calendar/widget.php:373 public/admin/feed_row.php:150
282
  msgid "Edit"
283
  msgstr "Edit"
284
 
285
+ #: app/controller/javascript.php:571
286
  msgid "Code"
287
  msgstr "Code"
288
 
289
+ #: app/controller/javascript.php:572 public/admin/box_event_cost.php:189
290
  #: public/admin/box_event_cost.php:308
291
  msgid "Unlimited"
292
  msgstr "Unlimited"
293
 
294
+ #: app/controller/javascript.php:573 app/model/api/api-ticketing.php:401
295
  #: public/admin/box_event_cost.php:280
296
  msgid "Open for sale"
297
  msgstr "Open for sale"
298
 
299
+ #: app/controller/javascript.php:574
300
  msgid ""
301
  "You have sold tickets for this ticket type. Please change it's status to "
302
  "\"Canceled\" and make refunds to all users that purchased tickets."
304
  "You have sold tickets for this ticket type. Please change it's status to "
305
  "\"Canceled\" and make refunds to all users that purchased tickets."
306
 
307
+ #: app/controller/javascript.php:575
308
  msgid ""
309
  "You have sold tickets for this ticket type. Please make refunds to all users "
310
  "that purchased tickets"
312
  "You have sold tickets for this ticket type. Please make refunds to all users "
313
  "that purchased tickets"
314
 
315
+ #: app/controller/javascript.php:578
316
  msgid "Your message has been sent. Thank you for your feedback."
317
  msgstr "Your message has been sent. Thank you for your feedback."
318
 
319
+ #: app/controller/javascript.php:579
320
  msgid "Your message has not been sent. Please try again or contact us."
321
  msgstr "Your message has not been sent. Please try again or contact us."
322
 
323
+ #: app/controller/javascript.php:581
324
  msgid ""
325
  "Something went wrong while fetching events.<br>The request status is: %STATUS"
326
  "% <br>The error thrown was: %ERROR%"
328
  "Something went wrong while fetching events.<br>The request status is: %STATUS"
329
  "% <br>The error thrown was: %ERROR%"
330
 
331
+ #: app/controller/javascript.php:584
332
  msgid "Response text received from server"
333
  msgstr "Response text received from server"
334
 
335
+ #: app/controller/javascript.php:585
336
  msgid "Click here for technical details"
337
  msgstr "Click here for technical details"
338
 
339
+ #: app/controller/javascript.php:590
340
  msgid "The end date can't be earlier than the start date."
341
  msgstr "The end date can't be earlier than the start date."
342
 
343
+ #: app/controller/javascript.php:591
344
  msgid "For week and day view, you must select an interval of at least 6 hours."
345
  msgstr ""
346
  "For week and day view, you must select an interval of at least 6 hours."
347
 
348
+ #: app/model/api/api-abstract.php:188
349
  msgid "%s.<br/>Detail: %s."
350
  msgstr "%s.<br/>Detail: %s."
351
 
352
+ #: app/model/api/api-abstract.php:194
353
  msgid "API URL: %s.<br/>Detail: %s"
354
  msgstr "API URL: %s.<br/>Detail: %s"
355
 
356
+ #: app/model/api/api-abstract.php:200
357
  msgid "API URL: %s.<br/>Detail: %s - %s"
358
  msgstr "API URL: %s.<br/>Detail: %s - %s"
359
 
360
+ #: app/model/api/api-abstract.php:208
361
  msgid ""
362
  "%s. Please reload this page to try again. If this error persists, please "
363
  "contact us at %s. In your report please include the information below.<br/>"
367
  "contact us at %s. In your report please include the information below.<br/>"
368
  "%s."
369
 
370
+ #: app/model/api/api-abstract.php:215
371
  msgid ""
372
  "%s. Please try again. If this error persists, please contact us at %s. In "
373
  "your report please include the information below.<br/>%s."
375
  "%s. Please try again. If this error persists, please contact us at %s. In "
376
  "your report please include the information below.<br/>%s."
377
 
378
+ #: app/model/api/api-abstract.php:461
379
  msgid "Error decoding the response"
380
  msgstr "Error decoding the response"
381
 
382
+ #: app/model/api/api-feeds.php:87
383
  msgid "We were unable to get the Suggested Events from Time.ly Network"
384
  msgstr "We were unable to get the Suggested Events from Time.ly Network"
385
 
386
+ #: app/model/api/api-feeds.php:122
387
+ msgid "We were unable to import feed"
388
+ msgstr "We were unable to import feed"
389
+
390
+ #: app/model/api/api-feeds.php:145
391
+ msgid "We were unable to get feed data"
392
+ msgstr "We were unable to get feed data"
393
+
394
+ #: app/model/api/api-feeds.php:277
395
+ msgid "We were unable to subscribe feed"
396
+ msgstr "We were unable to subscribe feed"
397
+
398
+ #: app/model/api/api-feeds.php:307
399
+ msgid "We were unable to unsubscribe feed"
400
+ msgstr "We were unable to unsubscribe feed"
401
+
402
+ #: app/model/api/api-registration.php:37
403
  msgid "We were unable to Sign you In for Time.ly Network"
404
  msgstr "We were unable to Sign you In for Time.ly Network"
405
 
406
+ #: app/model/api/api-registration.php:58
407
  msgid "We were unable to Sign you Up for Time.ly Network"
408
  msgstr "We were unable to Sign you Up for Time.ly Network"
409
 
410
+ #: app/model/api/api-registration.php:123
411
  msgid "We were unable to Sign you Out of Time.ly Network"
412
  msgstr "We were unable to Sign you Out of Time.ly Network"
413
 
414
+ #: app/model/api/api-registration.php:153
415
  msgid "Payment preferences were saved."
416
  msgstr "Payment preferences were saved."
417
 
418
+ #: app/model/api/api-registration.php:162
419
  msgid "Payment preferences were not saved."
420
  msgstr "Payment preferences were not saved."
421
 
422
+ #: app/model/api/api-registration.php:190
423
  msgid "We were unable to get the Sales information from Time.ly Network"
424
  msgstr "We were unable to get the Sales information from Time.ly Network"
425
 
472
  msgid "We were unable to update the Event on Time.ly Ticketing"
473
  msgstr "We were unable to update the Event on Time.ly Ticketing"
474
 
475
+ #: app/model/api/api-ticketing.php:403 public/admin/box_event_cost.php:285
476
  msgid "Sale ended"
477
  msgstr "Sale ended"
478
 
479
+ #: app/model/api/api-ticketing.php:405 public/admin/box_event_cost.php:289
480
  msgid "Canceled"
481
  msgstr "Canceled"
482
 
483
+ #: app/model/api/api-ticketing.php:438
484
  msgid "Past Event"
485
  msgstr "Past Event"
486
 
487
+ #: app/model/api/api-ticketing.php:440
488
  msgid "Event closed"
489
  msgstr "Event closed"
490
 
491
+ #: app/model/api/api-ticketing.php:442
492
  msgid "Not available yet"
493
  msgstr "Not available yet"
494
 
495
+ #: app/model/api/api-ticketing.php:444
496
  msgid "Sale closed"
497
  msgstr "Sale closed"
498
 
499
+ #: app/model/api/api-ticketing.php:446
500
  msgid "Sold out"
501
  msgstr "Sold out"
502
 
503
+ #: app/model/api/api-ticketing.php:448
504
  msgid "Not available"
505
  msgstr "Not available"
506
 
507
+ #: app/model/api/api-ticketing.php:468
508
  msgid "We were unable to get the Event Details from Time.ly Ticketing"
509
  msgstr "We were unable to get the Event Details from Time.ly Ticketing"
510
 
511
+ #: app/model/api/api-ticketing.php:498
512
  msgid "We were unable to get the Tickets Details from Time.ly Ticketing"
513
  msgstr "We were unable to get the Tickets Details from Time.ly Ticketing"
514
 
515
+ #: app/model/api/api-ticketing.php:525
516
  msgid "We were unable to get the Tickets Attendees from Time.ly Ticketing"
517
  msgstr "We were unable to get the Tickets Attendees from Time.ly Ticketing"
518
 
519
+ #: app/model/api/api-ticketing.php:611 app/model/api/api-ticketing.php:671
520
  msgid "Event not found inside the database."
521
  msgstr "Event not found inside the database."
522
 
523
+ #: app/model/api/api-ticketing.php:651
524
  msgid "We were unable to Update the Event on Time.ly Network"
525
  msgstr "We were unable to Update the Event on Time.ly Network"
526
 
527
+ #: app/model/api/api-ticketing.php:702
528
  msgid "We were unable to remove the Event on Time.ly Network"
529
  msgstr "We were unable to remove the Event on Time.ly Network"
530
 
556
  msgid "Message"
557
  msgstr "Message"
558
 
559
+ #: app/model/settings.php:409
560
  #: lib/html/element/setting/calendar-page-selector.php:50
561
  msgid "Calendar page"
562
  msgstr "Calendar page"
563
 
564
+ #: app/model/settings.php:419
565
  msgid "Week starts on"
566
  msgstr "Week starts on"
567
 
568
+ #: app/model/settings.php:432
569
  msgid "Available views"
570
  msgstr "Available views"
571
 
572
+ #: app/model/settings.php:440
573
  msgid "Agenda"
574
  msgid_plural "Agenda"
575
  msgstr[0] "Agenda"
576
  msgstr[1] "Agenda"
577
 
578
+ #: app/model/settings.php:451
579
  msgid "Day"
580
  msgid_plural "Day"
581
  msgstr[0] "Day"
582
  msgstr[1] "Day"
583
 
584
+ #: app/model/settings.php:462
585
  msgid "Month"
586
  msgid_plural "Month"
587
  msgstr[0] "Month"
588
  msgstr[1] "Month"
589
 
590
+ #: app/model/settings.php:473
591
  msgid "Week"
592
  msgid_plural "Week"
593
  msgstr[0] "Week"
594
  msgstr[1] "Week"
595
 
596
+ #: app/model/settings.php:487
597
  msgid "Timezone"
598
  msgstr "Timezone"
599
 
600
+ #: app/model/settings.php:500
601
  msgid "Preselected calendar filters"
602
  msgstr "Preselected calendar filters"
603
 
604
+ #: app/model/settings.php:501 app/view/calendar/widget.php:128
605
  msgid ""
606
  "To clear, hold &#8984;/<abbr class=\"initialism\">CTRL</abbr> and click "
607
  "selection."
609
  "To clear, hold &#8984;/<abbr class=\"initialism\">CTRL</abbr> and click "
610
  "selection."
611
 
612
+ #: app/model/settings.php:516
613
  msgid "Default calendar start date (optional)"
614
  msgstr "Default calendar start date (optional)"
615
 
616
+ #: app/model/settings.php:527
617
  msgid "Agenda pages show at most"
618
  msgstr "Agenda pages show at most"
619
 
620
+ #: app/model/settings.php:540
621
  msgid "Week/Day view starts at"
622
  msgstr "Week/Day view starts at"
623
 
624
+ #: app/model/settings.php:553
625
  msgid "Week/Day view ends at"
626
  msgstr "Week/Day view ends at"
627
 
628
+ #: app/model/settings.php:566
629
  msgid "<strong>Word-wrap event stubs</strong> in Month view"
630
  msgstr "<strong>Word-wrap event stubs</strong> in Month view"
631
 
632
+ #: app/model/settings.php:569
633
  msgid "Only applies to events that span a single day."
634
  msgstr "Only applies to events that span a single day."
635
 
636
+ #: app/model/settings.php:581
637
  msgid ""
638
  "In <span class=\"ai1ec-tooltip-toggle\"\n"
639
  "\t\t\t\t\t\tdata-original-title=\"These include Agenda view,\n"
647
  "\t\t\t\t\t\tAgenda-like views</span>, <strong>include all events\n"
648
  "\t\t\t\t\t\tfrom last day shown</strong>"
649
 
650
+ #: app/model/settings.php:597
651
  msgid "Keep all events <strong>expanded</strong> in Agenda view"
652
  msgstr "Keep all events <strong>expanded</strong> in Agenda view"
653
 
654
+ #: app/model/settings.php:609
655
  msgid "<strong>Show year</strong> in calendar date labels"
656
  msgstr "<strong>Show year</strong> in calendar date labels"
657
 
658
+ #: app/model/settings.php:621
659
  msgid "<strong>Show location in event titles</strong> in calendar views"
660
  msgstr "<strong>Show location in event titles</strong> in calendar views"
661
 
662
+ #: app/model/settings.php:633
663
  msgid "<strong>Exclude</strong> events from search results"
664
  msgstr "<strong>Exclude</strong> events from search results"
665
 
666
+ #: app/model/settings.php:645
667
  msgid ""
668
  "Hide <strong>Subscribe</strong>/<strong>Add to Calendar</strong> buttons in "
669
  "calendar and single event views "
671
  "Hide <strong>Subscribe</strong>/<strong>Add to Calendar</strong> buttons in "
672
  "calendar and single event views "
673
 
674
+ #: app/model/settings.php:657
675
  msgid "Hide <strong>Get a Timely Calendar</strong> button"
676
  msgstr "Hide <strong>Get a Timely Calendar</strong> button"
677
 
678
+ #: app/model/settings.php:669
679
  msgid " Hide <strong>Google Maps</strong> until clicked"
680
  msgstr " Hide <strong>Google Maps</strong> until clicked"
681
 
682
+ #: app/model/settings.php:681
683
  msgid ""
684
  " <strong>Affix filter menu</strong> to top of window when it scrolls out of "
685
  "view"
687
  " <strong>Affix filter menu</strong> to top of window when it scrolls out of "
688
  "view"
689
 
690
+ #: app/model/settings.php:684
691
  msgid "Only applies to first visible calendar found on the page."
692
  msgstr "Only applies to first visible calendar found on the page."
693
 
694
+ #: app/model/settings.php:696
695
  msgid "Offset affixed filter bar vertically by"
696
  msgstr "Offset affixed filter bar vertically by"
697
 
698
+ #: app/model/settings.php:711
699
  msgid "Wide screens only (&#8805; 1200px)"
700
  msgstr "Wide screens only (&#8805; 1200px)"
701
 
702
+ #: app/model/settings.php:726
703
  msgid "Tablets only (< 980px)"
704
  msgstr "Tablets only (< 980px)"
705
 
706
+ #: app/model/settings.php:741
707
  msgid "Phones only (< 768px)"
708
  msgstr "Phones only (< 768px)"
709
 
710
+ #: app/model/settings.php:754
711
  msgid "Strict compatibility content filtering"
712
  msgstr "Strict compatibility content filtering"
713
 
714
+ #: app/model/settings.php:766
715
  msgid " <strong>Hide featured image</strong> from event details page"
716
  msgstr " <strong>Hide featured image</strong> from event details page"
717
 
718
+ #: app/model/settings.php:769
719
  msgid ""
720
  "Select this option if your theme already displays each post's featured image."
721
  msgstr ""
722
  "Select this option if your theme already displays each post's featured image."
723
 
724
+ #: app/model/settings.php:780
725
  msgid "Input dates in this format"
726
  msgstr "Input dates in this format"
727
 
728
+ #: app/model/settings.php:785
729
  msgid "Default (d/m/yyyy)"
730
  msgstr "Default (d/m/yyyy)"
731
 
732
+ #: app/model/settings.php:789
733
  msgid "US (m/d/yyyy)"
734
  msgstr "US (m/d/yyyy)"
735
 
736
+ #: app/model/settings.php:793
737
  msgid "ISO 8601 (yyyy-m-d)"
738
  msgstr "ISO 8601 (yyyy-m-d)"
739
 
740
+ #: app/model/settings.php:797
741
  msgid "Dotted (m.d.yyyy)"
742
  msgstr "Dotted (m.d.yyyy)"
743
 
744
+ #: app/model/settings.php:809
745
  msgid " Use <strong>24h time</strong> in time pickers"
746
  msgstr " Use <strong>24h time</strong> in time pickers"
747
 
748
+ #: app/model/settings.php:820
749
  msgid "<strong>Disable address autocomplete</strong> function"
750
  msgstr "<strong>Disable address autocomplete</strong> function"
751
 
752
+ #: app/model/settings.php:831
753
  msgid ""
754
  "Use the configured <strong>region</strong> (WordPress locale) to bias the "
755
  "address autocomplete function "
757
  "Use the configured <strong>region</strong> (WordPress locale) to bias the "
758
  "address autocomplete function "
759
 
760
+ #: app/model/settings.php:847
761
  msgid ""
762
  " Show the old <strong>Post Your Event</strong> button above the calendar to "
763
  "privileged users"
765
  " Show the old <strong>Post Your Event</strong> button above the calendar to "
766
  "privileged users"
767
 
768
+ #: app/model/settings.php:850
769
  msgid ""
770
  "Install the <a target=\"_blank\" href=\"http://time.ly/\">Interactive "
771
  "Frontend Extension</a> for the <strong>frontend Post Your Event form</"
775
  "Frontend Extension</a> for the <strong>frontend Post Your Event form</"
776
  "strong>."
777
 
778
+ #: app/model/settings.php:871
779
  msgid "Move calendar into this DOM element"
780
  msgstr "Move calendar into this DOM element"
781
 
782
+ #: app/model/settings.php:873
783
  msgid ""
784
  "Optional. Use this JavaScript-based shortcut to place the\n"
785
  "\t\t\t\t\t\tcalendar a DOM element other than the usual page content "
803
  "\t\t\t\t\t\tAny existing markup found within the target will be replaced\n"
804
  "\t\t\t\t\t\tby the calendar."
805
 
806
+ #: app/model/settings.php:892
807
  msgid ""
808
  "<strong>Skip <tt>in_the_loop()</tt> check </strong> that protects against "
809
  "multiple calendar output"
811
  "<strong>Skip <tt>in_the_loop()</tt> check </strong> that protects against "
812
  "multiple calendar output"
813
 
814
+ #: app/model/settings.php:895
815
  msgid ""
816
  "Try enabling this option if your calendar does not appear on the calendar "
817
  "page. It is needed for compatibility with a small number of themes that call "
821
  "page. It is needed for compatibility with a small number of themes that call "
822
  "<tt>the_content()</tt> from outside of The Loop. Leave disabled otherwise."
823
 
824
+ #: app/model/settings.php:907
825
  msgid "Disable <strong>gzip</strong> compression."
826
  msgstr "Disable <strong>gzip</strong> compression."
827
 
828
+ #: app/model/settings.php:910
829
  msgid ""
830
  "Use this option if calendar is unresponsive. <a target=\"_blank\" href="
831
  "\"http://time.ly/document/user-guide/troubleshooting/disable-gzip-"
837
  "compression/\">Read more</a> about the issue. (From version 2.1 onwards, "
838
  "gzip is disabled by default for maximum compatibility.)"
839
 
840
+ #: app/model/settings.php:922
841
  msgid "Use frontend rendering."
842
  msgstr "Use frontend rendering."
843
 
844
+ #: app/model/settings.php:925
845
  msgid ""
846
  "Renders calendar views on the client rather than the server; can improve "
847
  "performance."
849
  "Renders calendar views on the client rather than the server; can improve "
850
  "performance."
851
 
852
+ #: app/model/settings.php:937
853
  msgid "Use advanced JS cache."
854
  msgstr "Use advanced JS cache."
855
 
856
+ #: app/model/settings.php:940
857
  msgid "Cache dynamically generated JS files. Improves performance."
858
  msgstr "Cache dynamically generated JS files. Improves performance."
859
 
860
+ #: app/model/settings.php:952
861
  msgid ""
862
  "<strong>Link CSS</strong> in <code>&lt;head&gt;</code> section when file "
863
  "cache is unavailable."
865
  "<strong>Link CSS</strong> in <code>&lt;head&gt;</code> section when file "
866
  "cache is unavailable."
867
 
868
+ #: app/model/settings.php:955
869
  msgid ""
870
  "Use this option if file cache is unavailable and you would prefer to serve "
871
  "CSS as a link rather than have it output inline."
873
  "Use this option if file cache is unavailable and you would prefer to serve "
874
  "CSS as a link rather than have it output inline."
875
 
876
+ #: app/model/settings.php:967
877
  msgid "Current <strong>robots.txt</strong> on this site"
878
  msgstr "Current <strong>robots.txt</strong> on this site"
879
 
880
+ #: app/model/settings.php:971
881
  msgid ""
882
  "The Robot Exclusion Standard, also known as the Robots Exclusion Protocol "
883
  "or\n"
901
  "\t\t\t\t\t\tYou can change it manually by editing <code>robots.txt</code> in "
902
  "your root WordPress directory."
903
 
904
+ #: app/model/settings.php:988
905
  msgid ""
906
  "<strong>Publicize, promote, and share my events</strong> marked as public on "
907
  "the Timely network. (<a href=\"%s\" target=\"_blank\">Learn more &#187;</a>)"
909
  "<strong>Publicize, promote, and share my events</strong> marked as public on "
910
  "the Timely network. (<a href=\"%s\" target=\"_blank\">Learn more &#187;</a>)"
911
 
912
+ #: app/model/settings.php:1011
913
  msgid "Templates cache improves site performance"
914
  msgstr "Templates cache improves site performance"
915
 
916
+ #: app/model/settings.php:1024
917
  msgid "Display events in <strong>calendar time zone</strong>"
918
  msgstr "Display events in <strong>calendar time zone</strong>"
919
 
920
+ #: app/model/settings.php:1027
921
  msgid ""
922
  "If this box is checked events will appear in the calendar time zone with "
923
  "time zone information displayed on the event details page."
1008
  msgstr "Show All Authors"
1009
 
1010
  #: app/view/admin/calendar-feeds.php:27 app/view/admin/calendar-feeds.php:28
1011
+ #: lib/calendar-feed/import.php:24
1012
  msgid "Import Feeds"
1013
  msgstr "Import Feeds"
1014
 
1175
  msgstr "All-in-One Event Calendar: Settings"
1176
 
1177
  #: app/view/admin/settings.php:68 app/view/admin/settings.php:69
1178
+ #: app/view/admin/tickets.php:103 lib/date/timezone.php:366
1179
  msgid "Settings"
1180
  msgstr "Settings"
1181
 
1225
  msgid "Please, Sign In to Timely Network."
1226
  msgstr "Please, Sign In to Timely Network."
1227
 
1228
+ #: app/view/admin/settings.php:184 app/view/admin/tickets.php:109
1229
  #: public/admin/box_ask_customer_review.php:113
1230
  #: public/admin/box_ask_customer_review.php:127
1231
  #: public/admin/box_ask_customer_review.php:141
1298
  "Conditions</a> for more details."
1299
 
1300
  #: app/view/admin/settings.php:204 public/admin/box_repeat.php:116
1301
+ #: public/admin/plugins/ics/import_feed.php:103
1302
  msgid "Cancel"
1303
  msgstr "Cancel"
1304
 
1305
+ #: app/view/admin/settings.php:205 app/view/admin/tickets.php:118
1306
  msgid "Sign Out"
1307
  msgstr "Sign Out"
1308
 
1385
  msgid "Ticketing<sup>beta</sup>"
1386
  msgstr "Ticketing<sup>beta</sup>"
1387
 
1388
+ #: app/view/admin/tickets.php:70 app/view/admin/tickets.php:85
1389
+ #: app/view/admin/tickets.php:97
1390
  msgid "Time.ly Ticketing<sup>beta</sup>"
1391
  msgstr "Time.ly Ticketing<sup>beta</sup>"
1392
 
1393
+ #: app/view/admin/tickets.php:74
1394
  msgid ""
1395
  "You need to sign up for a Timely Network account in order to use "
1396
  "Ticketing<sup>beta</sup> <br /><br />"
1398
  "You need to sign up for a Timely Network account in order to use "
1399
  "Ticketing<sup>beta</sup> <br /><br />"
1400
 
1401
+ #: app/view/admin/tickets.php:77
1402
  msgid ""
1403
  "<a href=\"edit.php?post_type=ai1ec_event&page=all-in-one-event-calendar-"
1404
  "settings\" class=\"ai1ec-btn ai1ec-btn-primary ai1ec-btn-lg\">Sign In to "
1408
  "settings\" class=\"ai1ec-btn ai1ec-btn-primary ai1ec-btn-lg\">Sign In to "
1409
  "Timely Network</a>"
1410
 
1411
+ #: app/view/admin/tickets.php:78
1412
  msgid ""
1413
  "<b>Signing up for a Timely Network account is currently unavailable. Please, "
1414
  "try again later.</b>"
1416
  "<b>Signing up for a Timely Network account is currently unavailable. Please, "
1417
  "try again later.</b>"
1418
 
1419
+ #: app/view/admin/tickets.php:100
1420
  msgid ""
1421
  "Please consider Ticketing is in beta. If you encounter any bugs please raise "
1422
  "the at <a href=\"mailto:labs@time.ly\">labs@time.ly</a>. Any enhancements "
1428
  "requests please raise them on <a href=\"http://ideas.time.ly\">ideas.time."
1429
  "ly</a> under \"Ticketing\"."
1430
 
1431
+ #: app/view/admin/tickets.php:104
1432
  msgid "Sales"
1433
  msgstr "Sales"
1434
 
1435
+ #: app/view/admin/tickets.php:105
1436
  msgid "Please provide your PayPal details."
1437
  msgstr "Please provide your PayPal details."
1438
 
1439
+ #: app/view/admin/tickets.php:106
1440
  msgid "Cheque"
1441
  msgstr "Cheque"
1442
 
1443
+ #: app/view/admin/tickets.php:107
1444
  msgid "PayPal"
1445
  msgstr "PayPal"
1446
 
1447
+ #: app/view/admin/tickets.php:108
1448
  msgid "Preferred currency for tickets:"
1449
  msgstr "Preferred currency for tickets:"
1450
 
1451
+ #: app/view/admin/tickets.php:110
1452
  msgid "Save Changes"
1453
  msgstr "Save Changes"
1454
 
1455
+ #: app/view/admin/tickets.php:111
1456
  msgid "Date"
1457
  msgstr "Date"
1458
 
1459
+ #: app/view/admin/tickets.php:112
1460
  msgid "Event"
1461
  msgstr "Event"
1462
 
1463
+ #: app/view/admin/tickets.php:113
1464
  msgid "Purchaser"
1465
  msgstr "Purchaser"
1466
 
1467
+ #: app/view/admin/tickets.php:114 app/view/calendar/view/abstract.php:107
1468
  #: app/view/event/ticket.php:39
1469
  msgid "Tickets"
1470
  msgstr "Tickets"
1471
 
1472
+ #: app/view/admin/tickets.php:117
1473
  msgid "Total"
1474
  msgstr "Total"
1475
 
1476
+ #: app/view/admin/tickets.php:134
1477
  msgid "United States Dollar"
1478
  msgstr "United States Dollar"
1479
 
1480
+ #: app/view/admin/tickets.php:135
1481
  msgid "Canadian Dollar"
1482
  msgstr "Canadian Dollar"
1483
 
1484
+ #: app/view/admin/tickets.php:136
1485
  msgid "Australian Dollar"
1486
  msgstr "Australian Dollar"
1487
 
1488
+ #: app/view/admin/tickets.php:137
1489
  msgid "Brazilian Real"
1490
  msgstr "Brazilian Real"
1491
 
1492
+ #: app/view/admin/tickets.php:137 app/view/admin/tickets.php:145
1493
+ #: app/view/admin/tickets.php:158
1494
  msgid ""
1495
  "Note: This currency is supported as a payment currency and a currency "
1496
  "balance for in-country PayPal accounts only."
1498
  "Note: This currency is supported as a payment currency and a currency "
1499
  "balance for in-country PayPal accounts only."
1500
 
1501
+ #: app/view/admin/tickets.php:138
1502
  msgid "Czech Koruna"
1503
  msgstr "Czech Koruna"
1504
 
1505
+ #: app/view/admin/tickets.php:139
1506
  msgid "Danish Krone"
1507
  msgstr "Danish Krone"
1508
 
1509
+ #: app/view/admin/tickets.php:140
1510
  msgid "Euro"
1511
  msgstr "Euro"
1512
 
1513
+ #: app/view/admin/tickets.php:141
1514
  msgid "Hong Kong Dollar"
1515
  msgstr "Hong Kong Dollar"
1516
 
1517
+ #: app/view/admin/tickets.php:142
1518
  msgid "Hungarian Forint"
1519
  msgstr "Hungarian Forint"
1520
 
1521
+ #: app/view/admin/tickets.php:142 app/view/admin/tickets.php:156
1522
  msgid ""
1523
  "Note: Decimal amounts are not supported for this currency. Passing a decimal "
1524
  "amount will throw an error."
1526
  "Note: Decimal amounts are not supported for this currency. Passing a decimal "
1527
  "amount will throw an error."
1528
 
1529
+ #: app/view/admin/tickets.php:143
1530
  msgid "Israeli New Sheqel"
1531
  msgstr "Israeli New Sheqel"
1532
 
1533
+ #: app/view/admin/tickets.php:144
1534
  msgid "Japanese Yen"
1535
  msgstr "Japanese Yen"
1536
 
1537
+ #: app/view/admin/tickets.php:144
1538
  msgid ""
1539
  "Note: This currency does not support decimals. Passing a decimal amount will "
1540
  "throw an error. 1,000,000"
1542
  "Note: This currency does not support decimals. Passing a decimal amount will "
1543
  "throw an error. 1,000,000"
1544
 
1545
+ #: app/view/admin/tickets.php:145
1546
  msgid "Malaysian Ringgit"
1547
  msgstr "Malaysian Ringgit"
1548
 
1549
+ #: app/view/admin/tickets.php:146
1550
  msgid "Mexican Peso"
1551
  msgstr "Mexican Peso"
1552
 
1553
+ #: app/view/admin/tickets.php:147
1554
  msgid "Norwegian Krone"
1555
  msgstr "Norwegian Krone"
1556
 
1557
+ #: app/view/admin/tickets.php:148
1558
  msgid "New Zealand Dollar"
1559
  msgstr "New Zealand Dollar"
1560
 
1561
+ #: app/view/admin/tickets.php:149
1562
  msgid "Philippine Peso"
1563
  msgstr "Philippine Peso"
1564
 
1565
+ #: app/view/admin/tickets.php:150
1566
  msgid "Polish Zloty"
1567
  msgstr "Polish Zloty"
1568
 
1569
+ #: app/view/admin/tickets.php:151
1570
  msgid "Pound Sterling"
1571
  msgstr "Pound Sterling"
1572
 
1573
+ #: app/view/admin/tickets.php:152
1574
  msgid "Russian Ruble"
1575
  msgstr "Russian Ruble"
1576
 
1577
+ #: app/view/admin/tickets.php:152
1578
  msgid ""
1579
  "For in-border payments (payments made within Russia), the Russian Ruble is "
1580
  "the only accepted currency. If you use another currency for in-border "
1584
  "the only accepted currency. If you use another currency for in-border "
1585
  "payments, the transaction will fail"
1586
 
1587
+ #: app/view/admin/tickets.php:153
1588
  msgid "Singapore Dollar"
1589
  msgstr "Singapore Dollar"
1590
 
1591
+ #: app/view/admin/tickets.php:154
1592
  msgid "Swedish Krona"
1593
  msgstr "Swedish Krona"
1594
 
1595
+ #: app/view/admin/tickets.php:155
1596
  msgid "Swiss Franc"
1597
  msgstr "Swiss Franc"
1598
 
1599
+ #: app/view/admin/tickets.php:156
1600
  msgid "Taiwan New Dollar"
1601
  msgstr "Taiwan New Dollar"
1602
 
1603
+ #: app/view/admin/tickets.php:157
1604
  msgid "Thai Baht"
1605
  msgstr "Thai Baht"
1606
 
1607
+ #: app/view/admin/tickets.php:158
1608
  msgid "Turkish Lira"
1609
  msgstr "Turkish Lira"
1610
 
1754
  msgid "Tags"
1755
  msgstr "Tags"
1756
 
1757
+ #: app/view/calendar/view/agenda.php:180
1758
  msgid "Collapse All"
1759
  msgstr "Collapse All"
1760
 
1761
+ #: app/view/calendar/view/agenda.php:181
1762
  msgid "Expand All"
1763
  msgstr "Expand All"
1764
 
1765
+ #: app/view/calendar/view/agenda.php:204
1766
  msgid "There are no upcoming events to display at this time."
1767
  msgstr "There are no upcoming events to display at this time."
1768
 
1769
+ #: app/view/calendar/view/agenda.php:206
1770
  msgid "Read more"
1771
  msgstr "Read more"
1772
 
1773
+ #: app/view/calendar/view/agenda.php:207
1774
  msgid "Categories:"
1775
  msgstr "Categories:"
1776
 
1777
+ #: app/view/calendar/view/agenda.php:208 lib/theme/list.php:320
1778
  #: public/admin/themes.php:29
1779
  msgid "Tags:"
1780
  msgstr "Tags:"
1781
 
1782
+ #: app/view/calendar/view/agenda.php:209 app/view/calendar/view/month.php:87
1783
  #: app/view/calendar/view/oneday.php:105 app/view/calendar/view/week.php:118
1784
  #: app/view/calendar/widget.php:374
1785
  msgid "@ %s"
2012
  msgid "Repeats"
2013
  msgstr "Repeats"
2014
 
2015
+ #: lib/calendar-feed/ics.php:40
2016
+ msgid "My Feeds"
2017
+ msgstr "My Feeds"
2018
 
2019
+ #: lib/calendar-feed/ics.php:72
2020
  msgid "Another import process in progress. Please try again later."
2021
  msgstr "Another import process in progress. Please try again later."
2022
 
2023
+ #: lib/calendar-feed/ics.php:201
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2024
  msgid "Imported %s event"
2025
  msgid_plural "Imported %s events"
2026
  msgstr[0] "Imported %s event"
2027
  msgstr[1] "Imported %s events"
2028
 
2029
+ #: lib/calendar-feed/ics.php:208 lib/calendar-feed/ics.php:769
2030
  msgid "Invalid ICS feed ID"
2031
  msgstr "Invalid ICS feed ID"
2032
 
2033
+ #: lib/calendar-feed/ics.php:362 lib/calendar-feed/import.php:82
2034
  msgid "Categories (optional)"
2035
  msgstr "Categories (optional)"
2036
 
2037
+ #: lib/calendar-feed/ics.php:379
2038
  msgid ""
2039
  "Do you want to keep the events imported from the calendar or remove them?"
2040
  msgstr ""
2041
  "Do you want to keep the events imported from the calendar or remove them?"
2042
 
2043
+ #: lib/calendar-feed/ics.php:385
2044
  msgid "Removing ICS Feed"
2045
  msgstr "Removing ICS Feed"
2046
 
2047
+ #: lib/calendar-feed/ics.php:388
2048
  msgid "Keep Events"
2049
  msgstr "Keep Events"
2050
 
2051
+ #: lib/calendar-feed/ics.php:391
2052
  msgid "Remove Events"
2053
  msgstr "Remove Events"
2054
 
2055
+ #: lib/calendar-feed/ics.php:566 lib/calendar-feed/ics.php:835
2056
  msgid "Oh, submission was not accepted."
2057
  msgstr "Oh, submission was not accepted."
2058
 
2059
+ #: lib/calendar-feed/ics.php:761
2060
  msgid "Deleted %d events"
2061
  msgstr "Deleted %d events"
2062
 
2063
+ #: lib/calendar-feed/ics.php:815 lib/calendar-feed/ics.php:970
2064
  msgid "Feed deleted"
2065
  msgstr "Feed deleted"
2066
 
2067
+ #: lib/calendar-feed/ics.php:889
2068
+ msgid "Event imported"
2069
+ msgstr "Event imported"
2070
+
2071
+ #: lib/calendar-feed/suggested.php:24
2072
+ msgid "Discover Events"
2073
+ msgstr "Discover Events"
2074
+
2075
+ #: lib/calendar-feed/suggested.php:103
2076
+ msgid "&laquo;"
2077
+ msgstr "&laquo;"
2078
+
2079
+ #: lib/calendar-feed/suggested.php:104
2080
+ msgid "&raquo;"
2081
+ msgstr "&raquo;"
2082
+
2083
  #: lib/captcha/provider/nocaptcha.php:31
2084
  msgid "noCAPTCHA public key:"
2085
  msgstr "noCAPTCHA public key:"
2264
  "The plugin is installed, but has not been configured. Please log in as an "
2265
  "Administrator to set it up."
2266
 
2267
+ #: lib/environment/check.php:107
2268
+ msgid ""
2269
+ "<b>ACTION REQUIRED!</b> Please, <a href=\"edit.php?"
2270
+ "post_type=ai1ec_event&page=all-in-one-event-calendar-settings\">sign</a> "
2271
+ "into Timely Network to continue syncing your imported events."
2272
+ msgstr ""
2273
+ "<b>ACTION REQUIRED!</b> Please, <a href=\"edit.php?"
2274
+ "post_type=ai1ec_event&page=all-in-one-event-calendar-settings\">sign</a> "
2275
+ "into Timely Network to continue syncing your imported events."
2276
+
2277
+ #: lib/environment/check.php:125
2278
  msgid ""
2279
  "PHP extension \"iconv\" needed for All-In-One-Event-Calendar is missing. "
2280
  "Please, check your PHP configuration.<br />"
2282
  "PHP extension \"iconv\" needed for All-In-One-Event-Calendar is missing. "
2283
  "Please, check your PHP configuration.<br />"
2284
 
2285
+ #: lib/environment/check.php:141
2286
  msgid ""
2287
  "PHP extension \"mbstring\" needed for All-In-One-Event-Calendar is missing. "
2288
  "Please, check your PHP configuration.<br />"
2290
  "PHP extension \"mbstring\" needed for All-In-One-Event-Calendar is missing. "
2291
  "Please, check your PHP configuration.<br />"
2292
 
2293
+ #: lib/environment/check.php:251
2294
  msgid ""
2295
  "The add-on <strong>%s</strong> must be updated to at least version %s to "
2296
  "maintain compatibility with the core calendar."
2298
  "The add-on <strong>%s</strong> must be updated to at least version %s to "
2299
  "maintain compatibility with the core calendar."
2300
 
2301
+ #: lib/environment/check.php:252
2302
  msgid ""
2303
  "If you do not see update notices below, ensure you have properly <a href="
2304
  "\"https://time.ly/document/user-guide/getting-started/license-keys/\" target="
2524
  "page. Do not attempt to embed the calendar via shortcode in a page that "
2525
  "already displays the calendar."
2526
 
2527
+ #: lib/import-export/ics.php:879
2528
  msgid "Tickets: "
2529
  msgstr "Tickets: "
2530
 
3208
  msgid "Register this event with Eventbrite.com?"
3209
  msgstr "Register this event with Eventbrite.com?"
3210
 
3211
+ #: public/admin/box_eventbrite.php:12 public/admin/feed_row.php:50
3212
+ #: public/admin/feed_row.php:61 public/admin/feed_row.php:73
3213
+ #: public/admin/feed_row.php:85 public/admin/feed_row.php:98
3214
  msgid "Yes"
3215
  msgstr "Yes"
3216
 
3217
+ #: public/admin/box_eventbrite.php:14 public/admin/feed_row.php:52
3218
+ #: public/admin/feed_row.php:63 public/admin/feed_row.php:75
3219
+ #: public/admin/feed_row.php:87 public/admin/feed_row.php:100
3220
  msgid "No"
3221
  msgstr "No"
3222
 
3317
  msgstr "Ending after"
3318
 
3319
  #: public/admin/box_repeat.php:109
3320
+ #: public/admin/plugins/ics/import_feed.php:109
3321
  msgid "Please wait&#8230;"
3322
  msgstr "Please wait&#8230;"
3323
 
3469
  msgid "Twice Daily"
3470
  msgstr "Twice Daily"
3471
 
3472
+ #: public/admin/feed_row.php:16 public/admin/plugins/ics/import_feed.php:41
3473
+ msgid "Feed URL:"
3474
+ msgstr "Feed URL:"
3475
 
3476
+ #: public/admin/feed_row.php:31
3477
  msgid "Event categories:"
3478
  msgstr "Event categories:"
3479
 
3480
+ #: public/admin/feed_row.php:38
3481
  msgid "Tag with"
3482
  msgstr "Tag with"
3483
 
3484
+ #: public/admin/feed_row.php:47
3485
  msgid "Allow comments"
3486
  msgstr "Allow comments"
3487
 
3488
+ #: public/admin/feed_row.php:58
3489
  msgid "Show map"
3490
  msgstr "Show map"
3491
 
3492
+ #: public/admin/feed_row.php:70
3493
  msgid "Keep original events categories and tags"
3494
  msgstr "Keep original events categories and tags"
3495
 
3496
+ #: public/admin/feed_row.php:82 public/admin/plugins/ics/import_feed.php:85
3497
  msgid ""
3498
  "On refresh, preserve previously imported events that are missing from the "
3499
  "feed"
3501
  "On refresh, preserve previously imported events that are missing from the "
3502
  "feed"
3503
 
3504
+ #: public/admin/feed_row.php:93 public/admin/plugins/ics/import_feed.php:92
3505
  msgid ""
3506
  "Guesses the time zone of events that have none specified; recommended for "
3507
  "Google Calendar feeds"
3509
  "Guesses the time zone of events that have none specified; recommended for "
3510
  "Google Calendar feeds"
3511
 
3512
+ #: public/admin/feed_row.php:94 public/admin/plugins/ics/import_feed.php:93
3513
  msgid "Assign default time zone to events in UTC"
3514
  msgstr "Assign default time zone to events in UTC"
3515
 
3516
+ #: public/admin/feed_row.php:108
3517
+ msgid "List of imported events:"
3518
+ msgstr "List of imported events:"
3519
+
3520
+ #: public/admin/feed_row.php:119
3521
+ #: public/admin/plugins/suggested/event_actions.php:13
3522
+ msgid "Removing"
3523
+ msgstr "Removing"
3524
+
3525
+ #: public/admin/feed_row.php:124 public/admin/feed_row.php:162
3526
+ #: public/admin/plugins/suggested/event_actions.php:18
3527
+ msgid "Remove"
3528
+ msgstr "Remove"
3529
+
3530
+ #: public/admin/feed_row.php:142
3531
  msgid "Refreshing&#8230;"
3532
  msgstr "Refreshing&#8230;"
3533
 
3534
+ #: public/admin/feed_row.php:144
3535
  msgid "Refresh"
3536
  msgstr "Refresh"
3537
 
3538
+ #: public/admin/feed_row.php:160
3539
  msgid "Removing&#8230;"
3540
  msgstr "Removing&#8230;"
3541
 
 
 
 
 
3542
  #: public/admin/import.php:6
3543
  msgid "Successfully imported events:"
3544
  msgstr "Successfully imported events:"
3545
 
3546
+ #: public/admin/plugins/ics/display_feeds.php:6
3547
+ #: public/admin/plugins/ics/import_feed.php:6
3548
+ #: public/admin/plugins/suggested/display_feeds.php:6
3549
+ msgid "Please, Sign In to <b>Timely Network</b> to manage your feeds."
3550
+ msgstr "Please, Sign In to <b>Timely Network</b> to manage your feeds."
3551
+
3552
+ #: public/admin/plugins/ics/display_feeds.php:10
3553
+ #: public/admin/plugins/ics/import_feed.php:10
3554
+ #: public/admin/plugins/suggested/display_feeds.php:10
3555
+ msgid "Sign In to Timely Network"
3556
+ msgstr "Sign In to Timely Network"
3557
+
3558
+ #: public/admin/plugins/ics/display_feeds.php:22
3559
  msgid ""
3560
+ "<b>Your feeds will be migrated at the next scheduled refresh (it can take up "
3561
+ "to one hour).</b><br />\n"
3562
+ "\t\tYou can't edit or remove them at the moment.\n"
3563
+ "\t\tPlease, visit this page later to manage your feeds."
3564
  msgstr ""
3565
+ "<b>Your feeds will be migrated at the next scheduled refresh (it can take up "
3566
+ "to one hour).</b><br />\n"
3567
+ "\t\tYou can't edit or remove them at the moment.\n"
3568
+ "\t\tPlease, visit this page later to manage your feeds."
3569
 
3570
+ #: public/admin/plugins/ics/display_feeds.php:33
3571
+ msgid "My imported Feeds:"
3572
+ msgstr "My imported Feeds:"
3573
 
3574
+ #: public/admin/plugins/ics/display_feeds.php:43
3575
+ msgid ""
3576
+ "My imported Events (click on the feed to see the individually imported "
3577
+ "events):"
3578
+ msgstr ""
3579
+ "My imported Events (click on the feed to see the individually imported "
3580
+ "events):"
3581
+
3582
+ #: public/admin/plugins/ics/import_feed.php:17
3583
+ msgid ""
3584
+ "<b>You don't have a subscription for this feature.</b><br>\n"
3585
+ "\t\tPlease <a href=\"https://time.ly/pricing\">upgrade here</a> to a plan "
3586
+ "that\n"
3587
+ "\t\tsupports \"Import Feeds\"."
3588
+ msgstr ""
3589
+ "<b>You don't have a subscription for this feature.</b><br>\n"
3590
+ "\t\tPlease <a href=\"https://time.ly/pricing\">upgrade here</a> to a plan "
3591
+ "that\n"
3592
+ "\t\tsupports \"Import Feeds\"."
3593
+
3594
+ #: public/admin/plugins/ics/import_feed.php:27
3595
+ msgid ""
3596
+ "<b>You have reached the limit of how many feeds you can import.</b><br>\n"
3597
+ "\t\tPlease <a href=\"https://time.ly/pricing\">upgrade here</a> to a plan "
3598
+ "that\n"
3599
+ "\t\tsupports more feeds."
3600
+ msgstr ""
3601
+ "<b>You have reached the limit of how many feeds you can import.</b><br>\n"
3602
+ "\t\tPlease <a href=\"https://time.ly/pricing\">upgrade here</a> to a plan "
3603
+ "that\n"
3604
+ "\t\tsupports more feeds."
3605
+
3606
+ #: public/admin/plugins/ics/import_feed.php:63
3607
  msgid "Allow comments on imported events"
3608
  msgstr "Allow comments on imported events"
3609
 
3610
+ #: public/admin/plugins/ics/import_feed.php:70
3611
  msgid "Show map on imported events"
3612
  msgstr "Show map on imported events"
3613
 
3614
+ #: public/admin/plugins/ics/import_feed.php:77
3615
  msgid ""
3616
  "Import any tags/categories provided by feed, in addition those selected above"
3617
  msgstr ""
3618
  "Import any tags/categories provided by feed, in addition those selected above"
3619
 
3620
+ #: public/admin/plugins/ics/import_feed.php:112
3621
+ msgid "Import feed"
3622
+ msgstr "Import feed"
3623
+
3624
+ #: public/admin/plugins/ics/import_feed.php:115
3625
+ msgid "Update feed"
3626
+ msgstr "Update feed"
3627
+
3628
+ #: public/admin/plugins/suggested/display_feeds.php:17
3629
+ msgid "Find events matching:"
3630
+ msgstr "Find events matching:"
3631
+
3632
+ #: public/admin/plugins/suggested/display_feeds.php:22
3633
+ msgid "Located in:"
3634
+ msgstr "Located in:"
3635
+
3636
+ #: public/admin/plugins/suggested/display_feeds.php:29
3637
+ msgid "Search"
3638
+ msgstr "Search"
3639
+
3640
+ #: public/admin/plugins/suggested/display_feeds.php:40
3641
+ msgid " events found."
3642
+ msgstr " events found."
3643
+
3644
+ #: public/admin/plugins/suggested/display_feeds.php:42
3645
+ msgid "Update settings for the imported events in “My feeds” tab."
3646
+ msgstr "Update settings for the imported events in “My feeds” tab."
3647
+
3648
+ #: public/admin/plugins/suggested/display_feeds.php:47
3649
+ msgid "Map"
3650
+ msgstr "Map"
3651
+
3652
+ #: public/admin/plugins/suggested/display_feeds.php:50
3653
+ msgid "Both"
3654
+ msgstr "Both"
3655
+
3656
+ #: public/admin/plugins/suggested/display_feeds.php:53
3657
+ msgid "List"
3658
+ msgstr "List"
3659
+
3660
+ #: public/admin/plugins/suggested/display_feeds.php:72
3661
+ #: public/admin/plugins/suggested/feeds_list.php:4
3662
+ msgid "No events found."
3663
+ msgstr "No events found."
3664
+
3665
+ #: public/admin/plugins/suggested/display_feeds.php:75
3666
+ msgid "Please, modify your search criteria and try again."
3667
+ msgstr "Please, modify your search criteria and try again."
3668
+
3669
+ #: public/admin/plugins/suggested/event_actions.php:5
3670
+ msgid "Import"
3671
+ msgstr "Import"
3672
 
3673
+ #: public/admin/plugins/suggested/event_actions.php:9
3674
+ msgid "Importing"
3675
+ msgstr "Importing"
3676
 
3677
  #: public/admin/row_custom.php:3
3678
  msgid "Custom dates:"
language/all-in-one-event-calendar.pot CHANGED
@@ -2,9 +2,9 @@
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.4.1\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/all-in-one-event-calendar\n"
7
- "POT-Creation-Date: 2016-06-07 23:27:25+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -29,7 +29,7 @@ msgstr ""
29
  msgid "Calendar Themes"
30
  msgstr ""
31
 
32
- #: app/controller/front.php:1046
33
  msgid ""
34
  "Your database is found to be corrupt. Likely previous update has failed. "
35
  "Please restore All-in-One Event Calendar tables from a backup and retry."
@@ -137,224 +137,248 @@ msgid ""
137
  "included.</b>"
138
  msgstr ""
139
 
140
- #: app/controller/javascript.php:535 app/view/admin/widget-creator.php:139
 
 
 
 
 
 
 
 
141
  msgid "Preview:"
142
  msgstr ""
143
 
144
- #: app/controller/javascript.php:536
145
  msgid ""
146
  "Loading preview&nbsp;<i class=\"ai1ec-fa ai1ec-fa-spin ai1ec-fa-spinner\"></"
147
  "i>"
148
  msgstr ""
149
 
150
- #: app/controller/javascript.php:541 app/view/admin/all-events.php:83
151
  msgid "Ticketing Details"
152
  msgstr ""
153
 
154
- #: app/controller/javascript.php:542
155
  msgid "Hide Ticketing Details"
156
  msgstr ""
157
 
158
- #: app/controller/javascript.php:543
159
  msgid "Loading tickets details..."
160
  msgstr ""
161
 
162
- #: app/controller/javascript.php:544
163
  msgid "Type and price"
164
  msgstr ""
165
 
166
- #: app/controller/javascript.php:545
167
  msgid "Info"
168
  msgstr ""
169
 
170
- #: app/controller/javascript.php:546
171
  msgid "Information"
172
  msgstr ""
173
 
174
- #: app/controller/javascript.php:547
175
  msgid "Report"
176
  msgstr ""
177
 
178
- #: app/controller/javascript.php:548
179
  msgid "Sale dates"
180
  msgstr ""
181
 
182
- #: app/controller/javascript.php:549
183
  msgid "Limits"
184
  msgstr ""
185
 
186
- #: app/controller/javascript.php:550
187
  msgid "Actions"
188
  msgstr ""
189
 
190
- #: app/controller/javascript.php:551
191
  msgid "Sold:"
192
  msgstr ""
193
 
194
- #: app/controller/javascript.php:552
195
  msgid "Left:"
196
  msgstr ""
197
 
198
- #: app/controller/javascript.php:553
199
  msgid "Start:"
200
  msgstr ""
201
 
202
- #: app/controller/javascript.php:554
203
  msgid "End:"
204
  msgstr ""
205
 
206
- #: app/controller/javascript.php:555 public/admin/box_event_cost.php:158
207
  msgid "Min:"
208
  msgstr ""
209
 
210
- #: app/controller/javascript.php:556 public/admin/box_event_cost.php:168
211
  msgid "Max:"
212
  msgstr ""
213
 
214
- #: app/controller/javascript.php:557
215
  msgid "Attendees"
216
  msgstr ""
217
 
218
- #: app/controller/javascript.php:558
219
  msgid "Hide Attendees"
220
  msgstr ""
221
 
222
- #: app/controller/javascript.php:559
223
  msgid "Attendees List"
224
  msgstr ""
225
 
226
- #: app/controller/javascript.php:560
227
  msgid "Guest Name"
228
  msgstr ""
229
 
230
- #: app/controller/javascript.php:561 app/view/admin/tickets.php:117
231
  msgid "Status"
232
  msgstr ""
233
 
234
- #: app/controller/javascript.php:562 app/view/admin/tickets.php:116
235
  #: app/view/event/ticket.php:71
236
  msgid "Email"
237
  msgstr ""
238
 
239
- #: app/controller/javascript.php:563
240
  msgid "No attendees for this ticket type."
241
  msgstr ""
242
 
243
- #: app/controller/javascript.php:564 app/view/calendar/view/agenda.php:167
244
- #: app/view/calendar/widget.php:373 public/admin/feed_row.php:112
245
  msgid "Edit"
246
  msgstr ""
247
 
248
- #: app/controller/javascript.php:565
249
  msgid "Code"
250
  msgstr ""
251
 
252
- #: app/controller/javascript.php:566 public/admin/box_event_cost.php:189
253
  #: public/admin/box_event_cost.php:308
254
  msgid "Unlimited"
255
  msgstr ""
256
 
257
- #: app/controller/javascript.php:567 app/model/api/api-ticketing.php:398
258
  #: public/admin/box_event_cost.php:280
259
  msgid "Open for sale"
260
  msgstr ""
261
 
262
- #: app/controller/javascript.php:568
263
  msgid ""
264
  "You have sold tickets for this ticket type. Please change it's status to "
265
  "\"Canceled\" and make refunds to all users that purchased tickets."
266
  msgstr ""
267
 
268
- #: app/controller/javascript.php:569
269
  msgid ""
270
  "You have sold tickets for this ticket type. Please make refunds to all users "
271
  "that purchased tickets"
272
  msgstr ""
273
 
274
- #: app/controller/javascript.php:572
275
  msgid "Your message has been sent. Thank you for your feedback."
276
  msgstr ""
277
 
278
- #: app/controller/javascript.php:573
279
  msgid "Your message has not been sent. Please try again or contact us."
280
  msgstr ""
281
 
282
- #: app/controller/javascript.php:575
283
  msgid ""
284
  "Something went wrong while fetching events.<br>The request status is: %STATUS"
285
  "% <br>The error thrown was: %ERROR%"
286
  msgstr ""
287
 
288
- #: app/controller/javascript.php:578
289
  msgid "Response text received from server"
290
  msgstr ""
291
 
292
- #: app/controller/javascript.php:579
293
  msgid "Click here for technical details"
294
  msgstr ""
295
 
296
- #: app/controller/javascript.php:584
297
  msgid "The end date can't be earlier than the start date."
298
  msgstr ""
299
 
300
- #: app/controller/javascript.php:585
301
  msgid "For week and day view, you must select an interval of at least 6 hours."
302
  msgstr ""
303
 
304
- #: app/model/api/api-abstract.php:183
305
  msgid "%s.<br/>Detail: %s."
306
  msgstr ""
307
 
308
- #: app/model/api/api-abstract.php:189
309
  msgid "API URL: %s.<br/>Detail: %s"
310
  msgstr ""
311
 
312
- #: app/model/api/api-abstract.php:195
313
  msgid "API URL: %s.<br/>Detail: %s - %s"
314
  msgstr ""
315
 
316
- #: app/model/api/api-abstract.php:203
317
  msgid ""
318
  "%s. Please reload this page to try again. If this error persists, please "
319
  "contact us at %s. In your report please include the information below.<br/>"
320
  "%s."
321
  msgstr ""
322
 
323
- #: app/model/api/api-abstract.php:210
324
  msgid ""
325
  "%s. Please try again. If this error persists, please contact us at %s. In "
326
  "your report please include the information below.<br/>%s."
327
  msgstr ""
328
 
329
- #: app/model/api/api-abstract.php:398
330
  msgid "Error decoding the response"
331
  msgstr ""
332
 
333
- #: app/model/api/api-feeds.php:45
334
  msgid "We were unable to get the Suggested Events from Time.ly Network"
335
  msgstr ""
336
 
337
- #: app/model/api/api-registration.php:36
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
338
  msgid "We were unable to Sign you In for Time.ly Network"
339
  msgstr ""
340
 
341
- #: app/model/api/api-registration.php:57
342
  msgid "We were unable to Sign you Up for Time.ly Network"
343
  msgstr ""
344
 
345
- #: app/model/api/api-registration.php:121
346
  msgid "We were unable to Sign you Out of Time.ly Network"
347
  msgstr ""
348
 
349
- #: app/model/api/api-registration.php:151
350
  msgid "Payment preferences were saved."
351
  msgstr ""
352
 
353
- #: app/model/api/api-registration.php:160
354
  msgid "Payment preferences were not saved."
355
  msgstr ""
356
 
357
- #: app/model/api/api-registration.php:188
358
  msgid "We were unable to get the Sales information from Time.ly Network"
359
  msgstr ""
360
 
@@ -401,59 +425,59 @@ msgstr ""
401
  msgid "We were unable to update the Event on Time.ly Ticketing"
402
  msgstr ""
403
 
404
- #: app/model/api/api-ticketing.php:400 public/admin/box_event_cost.php:285
405
  msgid "Sale ended"
406
  msgstr ""
407
 
408
- #: app/model/api/api-ticketing.php:402 public/admin/box_event_cost.php:289
409
  msgid "Canceled"
410
  msgstr ""
411
 
412
- #: app/model/api/api-ticketing.php:435
413
  msgid "Past Event"
414
  msgstr ""
415
 
416
- #: app/model/api/api-ticketing.php:437
417
  msgid "Event closed"
418
  msgstr ""
419
 
420
- #: app/model/api/api-ticketing.php:439
421
  msgid "Not available yet"
422
  msgstr ""
423
 
424
- #: app/model/api/api-ticketing.php:441
425
  msgid "Sale closed"
426
  msgstr ""
427
 
428
- #: app/model/api/api-ticketing.php:443
429
  msgid "Sold out"
430
  msgstr ""
431
 
432
- #: app/model/api/api-ticketing.php:445
433
  msgid "Not available"
434
  msgstr ""
435
 
436
- #: app/model/api/api-ticketing.php:465
437
  msgid "We were unable to get the Event Details from Time.ly Ticketing"
438
  msgstr ""
439
 
440
- #: app/model/api/api-ticketing.php:495
441
  msgid "We were unable to get the Tickets Details from Time.ly Ticketing"
442
  msgstr ""
443
 
444
- #: app/model/api/api-ticketing.php:522
445
  msgid "We were unable to get the Tickets Attendees from Time.ly Ticketing"
446
  msgstr ""
447
 
448
- #: app/model/api/api-ticketing.php:608 app/model/api/api-ticketing.php:668
449
  msgid "Event not found inside the database."
450
  msgstr ""
451
 
452
- #: app/model/api/api-ticketing.php:648
453
  msgid "We were unable to Update the Event on Time.ly Network"
454
  msgstr ""
455
 
456
- #: app/model/api/api-ticketing.php:699
457
  msgid "We were unable to remove the Event on Time.ly Network"
458
  msgstr ""
459
 
@@ -485,82 +509,82 @@ msgstr ""
485
  msgid "Message"
486
  msgstr ""
487
 
488
- #: app/model/settings.php:413
489
  #: lib/html/element/setting/calendar-page-selector.php:50
490
  msgid "Calendar page"
491
  msgstr ""
492
 
493
- #: app/model/settings.php:423
494
  msgid "Week starts on"
495
  msgstr ""
496
 
497
- #: app/model/settings.php:436
498
  msgid "Available views"
499
  msgstr ""
500
 
501
- #: app/model/settings.php:444
502
  msgid "Agenda"
503
  msgid_plural "Agenda"
504
  msgstr[0] ""
505
  msgstr[1] ""
506
 
507
- #: app/model/settings.php:455
508
  msgid "Day"
509
  msgid_plural "Day"
510
  msgstr[0] ""
511
  msgstr[1] ""
512
 
513
- #: app/model/settings.php:466
514
  msgid "Month"
515
  msgid_plural "Month"
516
  msgstr[0] ""
517
  msgstr[1] ""
518
 
519
- #: app/model/settings.php:477
520
  msgid "Week"
521
  msgid_plural "Week"
522
  msgstr[0] ""
523
  msgstr[1] ""
524
 
525
- #: app/model/settings.php:491
526
  msgid "Timezone"
527
  msgstr ""
528
 
529
- #: app/model/settings.php:504
530
  msgid "Preselected calendar filters"
531
  msgstr ""
532
 
533
- #: app/model/settings.php:505 app/view/calendar/widget.php:128
534
  msgid ""
535
  "To clear, hold &#8984;/<abbr class=\"initialism\">CTRL</abbr> and click "
536
  "selection."
537
  msgstr ""
538
 
539
- #: app/model/settings.php:520
540
  msgid "Default calendar start date (optional)"
541
  msgstr ""
542
 
543
- #: app/model/settings.php:531
544
  msgid "Agenda pages show at most"
545
  msgstr ""
546
 
547
- #: app/model/settings.php:544
548
  msgid "Week/Day view starts at"
549
  msgstr ""
550
 
551
- #: app/model/settings.php:557
552
  msgid "Week/Day view ends at"
553
  msgstr ""
554
 
555
- #: app/model/settings.php:570
556
  msgid "<strong>Word-wrap event stubs</strong> in Month view"
557
  msgstr ""
558
 
559
- #: app/model/settings.php:573
560
  msgid "Only applies to events that span a single day."
561
  msgstr ""
562
 
563
- #: app/model/settings.php:585
564
  msgid ""
565
  "In <span class=\"ai1ec-tooltip-toggle\"\n"
566
  "\t\t\t\t\t\tdata-original-title=\"These include Agenda view,\n"
@@ -569,127 +593,127 @@ msgid ""
569
  "\t\t\t\t\t\tfrom last day shown</strong>"
570
  msgstr ""
571
 
572
- #: app/model/settings.php:601
573
  msgid "Keep all events <strong>expanded</strong> in Agenda view"
574
  msgstr ""
575
 
576
- #: app/model/settings.php:613
577
  msgid "<strong>Show year</strong> in calendar date labels"
578
  msgstr ""
579
 
580
- #: app/model/settings.php:625
581
  msgid "<strong>Show location in event titles</strong> in calendar views"
582
  msgstr ""
583
 
584
- #: app/model/settings.php:637
585
  msgid "<strong>Exclude</strong> events from search results"
586
  msgstr ""
587
 
588
- #: app/model/settings.php:649
589
  msgid ""
590
  "Hide <strong>Subscribe</strong>/<strong>Add to Calendar</strong> buttons in "
591
  "calendar and single event views "
592
  msgstr ""
593
 
594
- #: app/model/settings.php:661
595
  msgid "Hide <strong>Get a Timely Calendar</strong> button"
596
  msgstr ""
597
 
598
- #: app/model/settings.php:673
599
  msgid " Hide <strong>Google Maps</strong> until clicked"
600
  msgstr ""
601
 
602
- #: app/model/settings.php:685
603
  msgid ""
604
  " <strong>Affix filter menu</strong> to top of window when it scrolls out of "
605
  "view"
606
  msgstr ""
607
 
608
- #: app/model/settings.php:688
609
  msgid "Only applies to first visible calendar found on the page."
610
  msgstr ""
611
 
612
- #: app/model/settings.php:700
613
  msgid "Offset affixed filter bar vertically by"
614
  msgstr ""
615
 
616
- #: app/model/settings.php:715
617
  msgid "Wide screens only (&#8805; 1200px)"
618
  msgstr ""
619
 
620
- #: app/model/settings.php:730
621
  msgid "Tablets only (< 980px)"
622
  msgstr ""
623
 
624
- #: app/model/settings.php:745
625
  msgid "Phones only (< 768px)"
626
  msgstr ""
627
 
628
- #: app/model/settings.php:758
629
  msgid "Strict compatibility content filtering"
630
  msgstr ""
631
 
632
- #: app/model/settings.php:770
633
  msgid " <strong>Hide featured image</strong> from event details page"
634
  msgstr ""
635
 
636
- #: app/model/settings.php:773
637
  msgid ""
638
  "Select this option if your theme already displays each post's featured image."
639
  msgstr ""
640
 
641
- #: app/model/settings.php:784
642
  msgid "Input dates in this format"
643
  msgstr ""
644
 
645
- #: app/model/settings.php:789
646
  msgid "Default (d/m/yyyy)"
647
  msgstr ""
648
 
649
- #: app/model/settings.php:793
650
  msgid "US (m/d/yyyy)"
651
  msgstr ""
652
 
653
- #: app/model/settings.php:797
654
  msgid "ISO 8601 (yyyy-m-d)"
655
  msgstr ""
656
 
657
- #: app/model/settings.php:801
658
  msgid "Dotted (m.d.yyyy)"
659
  msgstr ""
660
 
661
- #: app/model/settings.php:813
662
  msgid " Use <strong>24h time</strong> in time pickers"
663
  msgstr ""
664
 
665
- #: app/model/settings.php:824
666
  msgid "<strong>Disable address autocomplete</strong> function"
667
  msgstr ""
668
 
669
- #: app/model/settings.php:835
670
  msgid ""
671
  "Use the configured <strong>region</strong> (WordPress locale) to bias the "
672
  "address autocomplete function "
673
  msgstr ""
674
 
675
- #: app/model/settings.php:851
676
  msgid ""
677
  " Show the old <strong>Post Your Event</strong> button above the calendar to "
678
  "privileged users"
679
  msgstr ""
680
 
681
- #: app/model/settings.php:854
682
  msgid ""
683
  "Install the <a target=\"_blank\" href=\"http://time.ly/\">Interactive "
684
  "Frontend Extension</a> for the <strong>frontend Post Your Event form</"
685
  "strong>."
686
  msgstr ""
687
 
688
- #: app/model/settings.php:875
689
  msgid "Move calendar into this DOM element"
690
  msgstr ""
691
 
692
- #: app/model/settings.php:877
693
  msgid ""
694
  "Optional. Use this JavaScript-based shortcut to place the\n"
695
  "\t\t\t\t\t\tcalendar a DOM element other than the usual page content "
@@ -703,24 +727,24 @@ msgid ""
703
  "\t\t\t\t\t\tby the calendar."
704
  msgstr ""
705
 
706
- #: app/model/settings.php:896
707
  msgid ""
708
  "<strong>Skip <tt>in_the_loop()</tt> check </strong> that protects against "
709
  "multiple calendar output"
710
  msgstr ""
711
 
712
- #: app/model/settings.php:899
713
  msgid ""
714
  "Try enabling this option if your calendar does not appear on the calendar "
715
  "page. It is needed for compatibility with a small number of themes that call "
716
  "<tt>the_content()</tt> from outside of The Loop. Leave disabled otherwise."
717
  msgstr ""
718
 
719
- #: app/model/settings.php:911
720
  msgid "Disable <strong>gzip</strong> compression."
721
  msgstr ""
722
 
723
- #: app/model/settings.php:914
724
  msgid ""
725
  "Use this option if calendar is unresponsive. <a target=\"_blank\" href="
726
  "\"http://time.ly/document/user-guide/troubleshooting/disable-gzip-"
@@ -728,41 +752,41 @@ msgid ""
728
  "gzip is disabled by default for maximum compatibility.)"
729
  msgstr ""
730
 
731
- #: app/model/settings.php:926
732
  msgid "Use frontend rendering."
733
  msgstr ""
734
 
735
- #: app/model/settings.php:929
736
  msgid ""
737
  "Renders calendar views on the client rather than the server; can improve "
738
  "performance."
739
  msgstr ""
740
 
741
- #: app/model/settings.php:941
742
  msgid "Use advanced JS cache."
743
  msgstr ""
744
 
745
- #: app/model/settings.php:944
746
  msgid "Cache dynamically generated JS files. Improves performance."
747
  msgstr ""
748
 
749
- #: app/model/settings.php:956
750
  msgid ""
751
  "<strong>Link CSS</strong> in <code>&lt;head&gt;</code> section when file "
752
  "cache is unavailable."
753
  msgstr ""
754
 
755
- #: app/model/settings.php:959
756
  msgid ""
757
  "Use this option if file cache is unavailable and you would prefer to serve "
758
  "CSS as a link rather than have it output inline."
759
  msgstr ""
760
 
761
- #: app/model/settings.php:971
762
  msgid "Current <strong>robots.txt</strong> on this site"
763
  msgstr ""
764
 
765
- #: app/model/settings.php:975
766
  msgid ""
767
  "The Robot Exclusion Standard, also known as the Robots Exclusion Protocol "
768
  "or\n"
@@ -776,21 +800,21 @@ msgid ""
776
  "your root WordPress directory."
777
  msgstr ""
778
 
779
- #: app/model/settings.php:992
780
  msgid ""
781
  "<strong>Publicize, promote, and share my events</strong> marked as public on "
782
  "the Timely network. (<a href=\"%s\" target=\"_blank\">Learn more &#187;</a>)"
783
  msgstr ""
784
 
785
- #: app/model/settings.php:1015
786
  msgid "Templates cache improves site performance"
787
  msgstr ""
788
 
789
- #: app/model/settings.php:1028
790
  msgid "Display events in <strong>calendar time zone</strong>"
791
  msgstr ""
792
 
793
- #: app/model/settings.php:1031
794
  msgid ""
795
  "If this box is checked events will appear in the calendar time zone with "
796
  "time zone information displayed on the event details page."
@@ -872,6 +896,7 @@ msgid "Show All Authors"
872
  msgstr ""
873
 
874
  #: app/view/admin/calendar-feeds.php:27 app/view/admin/calendar-feeds.php:28
 
875
  msgid "Import Feeds"
876
  msgstr ""
877
 
@@ -1036,7 +1061,7 @@ msgid "All-in-One Event Calendar: Settings"
1036
  msgstr ""
1037
 
1038
  #: app/view/admin/settings.php:68 app/view/admin/settings.php:69
1039
- #: app/view/admin/tickets.php:104 lib/date/timezone.php:366
1040
  msgid "Settings"
1041
  msgstr ""
1042
 
@@ -1086,7 +1111,7 @@ msgstr ""
1086
  msgid "Please, Sign In to Timely Network."
1087
  msgstr ""
1088
 
1089
- #: app/view/admin/settings.php:184 app/view/admin/tickets.php:110
1090
  #: public/admin/box_ask_customer_review.php:113
1091
  #: public/admin/box_ask_customer_review.php:127
1092
  #: public/admin/box_ask_customer_review.php:141
@@ -1152,11 +1177,11 @@ msgid ""
1152
  msgstr ""
1153
 
1154
  #: app/view/admin/settings.php:204 public/admin/box_repeat.php:116
1155
- #: public/admin/plugins/ics/display_feeds.php:84
1156
  msgid "Cancel"
1157
  msgstr ""
1158
 
1159
- #: app/view/admin/settings.php:205 app/view/admin/tickets.php:119
1160
  msgid "Sign Out"
1161
  msgstr ""
1162
 
@@ -1238,31 +1263,31 @@ msgstr ""
1238
  msgid "Ticketing<sup>beta</sup>"
1239
  msgstr ""
1240
 
1241
- #: app/view/admin/tickets.php:71 app/view/admin/tickets.php:86
1242
- #: app/view/admin/tickets.php:98
1243
  msgid "Time.ly Ticketing<sup>beta</sup>"
1244
  msgstr ""
1245
 
1246
- #: app/view/admin/tickets.php:75
1247
  msgid ""
1248
  "You need to sign up for a Timely Network account in order to use "
1249
  "Ticketing<sup>beta</sup> <br /><br />"
1250
  msgstr ""
1251
 
1252
- #: app/view/admin/tickets.php:78
1253
  msgid ""
1254
  "<a href=\"edit.php?post_type=ai1ec_event&page=all-in-one-event-calendar-"
1255
  "settings\" class=\"ai1ec-btn ai1ec-btn-primary ai1ec-btn-lg\">Sign In to "
1256
  "Timely Network</a>"
1257
  msgstr ""
1258
 
1259
- #: app/view/admin/tickets.php:79
1260
  msgid ""
1261
  "<b>Signing up for a Timely Network account is currently unavailable. Please, "
1262
  "try again later.</b>"
1263
  msgstr ""
1264
 
1265
- #: app/view/admin/tickets.php:101
1266
  msgid ""
1267
  "Please consider Ticketing is in beta. If you encounter any bugs please raise "
1268
  "the at <a href=\"mailto:labs@time.ly\">labs@time.ly</a>. Any enhancements "
@@ -1270,174 +1295,174 @@ msgid ""
1270
  "ly</a> under \"Ticketing\"."
1271
  msgstr ""
1272
 
1273
- #: app/view/admin/tickets.php:105
1274
  msgid "Sales"
1275
  msgstr ""
1276
 
1277
- #: app/view/admin/tickets.php:106
1278
  msgid "Please provide your PayPal details."
1279
  msgstr ""
1280
 
1281
- #: app/view/admin/tickets.php:107
1282
  msgid "Cheque"
1283
  msgstr ""
1284
 
1285
- #: app/view/admin/tickets.php:108
1286
  msgid "PayPal"
1287
  msgstr ""
1288
 
1289
- #: app/view/admin/tickets.php:109
1290
  msgid "Preferred currency for tickets:"
1291
  msgstr ""
1292
 
1293
- #: app/view/admin/tickets.php:111
1294
  msgid "Save Changes"
1295
  msgstr ""
1296
 
1297
- #: app/view/admin/tickets.php:112
1298
  msgid "Date"
1299
  msgstr ""
1300
 
1301
- #: app/view/admin/tickets.php:113
1302
  msgid "Event"
1303
  msgstr ""
1304
 
1305
- #: app/view/admin/tickets.php:114
1306
  msgid "Purchaser"
1307
  msgstr ""
1308
 
1309
- #: app/view/admin/tickets.php:115 app/view/calendar/view/abstract.php:107
1310
  #: app/view/event/ticket.php:39
1311
  msgid "Tickets"
1312
  msgstr ""
1313
 
1314
- #: app/view/admin/tickets.php:118
1315
  msgid "Total"
1316
  msgstr ""
1317
 
1318
- #: app/view/admin/tickets.php:135
1319
  msgid "United States Dollar"
1320
  msgstr ""
1321
 
1322
- #: app/view/admin/tickets.php:136
1323
  msgid "Canadian Dollar"
1324
  msgstr ""
1325
 
1326
- #: app/view/admin/tickets.php:137
1327
  msgid "Australian Dollar"
1328
  msgstr ""
1329
 
1330
- #: app/view/admin/tickets.php:138
1331
  msgid "Brazilian Real"
1332
  msgstr ""
1333
 
1334
- #: app/view/admin/tickets.php:138 app/view/admin/tickets.php:146
1335
- #: app/view/admin/tickets.php:159
1336
  msgid ""
1337
  "Note: This currency is supported as a payment currency and a currency "
1338
  "balance for in-country PayPal accounts only."
1339
  msgstr ""
1340
 
1341
- #: app/view/admin/tickets.php:139
1342
  msgid "Czech Koruna"
1343
  msgstr ""
1344
 
1345
- #: app/view/admin/tickets.php:140
1346
  msgid "Danish Krone"
1347
  msgstr ""
1348
 
1349
- #: app/view/admin/tickets.php:141
1350
  msgid "Euro"
1351
  msgstr ""
1352
 
1353
- #: app/view/admin/tickets.php:142
1354
  msgid "Hong Kong Dollar"
1355
  msgstr ""
1356
 
1357
- #: app/view/admin/tickets.php:143
1358
  msgid "Hungarian Forint"
1359
  msgstr ""
1360
 
1361
- #: app/view/admin/tickets.php:143 app/view/admin/tickets.php:157
1362
  msgid ""
1363
  "Note: Decimal amounts are not supported for this currency. Passing a decimal "
1364
  "amount will throw an error."
1365
  msgstr ""
1366
 
1367
- #: app/view/admin/tickets.php:144
1368
  msgid "Israeli New Sheqel"
1369
  msgstr ""
1370
 
1371
- #: app/view/admin/tickets.php:145
1372
  msgid "Japanese Yen"
1373
  msgstr ""
1374
 
1375
- #: app/view/admin/tickets.php:145
1376
  msgid ""
1377
  "Note: This currency does not support decimals. Passing a decimal amount will "
1378
  "throw an error. 1,000,000"
1379
  msgstr ""
1380
 
1381
- #: app/view/admin/tickets.php:146
1382
  msgid "Malaysian Ringgit"
1383
  msgstr ""
1384
 
1385
- #: app/view/admin/tickets.php:147
1386
  msgid "Mexican Peso"
1387
  msgstr ""
1388
 
1389
- #: app/view/admin/tickets.php:148
1390
  msgid "Norwegian Krone"
1391
  msgstr ""
1392
 
1393
- #: app/view/admin/tickets.php:149
1394
  msgid "New Zealand Dollar"
1395
  msgstr ""
1396
 
1397
- #: app/view/admin/tickets.php:150
1398
  msgid "Philippine Peso"
1399
  msgstr ""
1400
 
1401
- #: app/view/admin/tickets.php:151
1402
  msgid "Polish Zloty"
1403
  msgstr ""
1404
 
1405
- #: app/view/admin/tickets.php:152
1406
  msgid "Pound Sterling"
1407
  msgstr ""
1408
 
1409
- #: app/view/admin/tickets.php:153
1410
  msgid "Russian Ruble"
1411
  msgstr ""
1412
 
1413
- #: app/view/admin/tickets.php:153
1414
  msgid ""
1415
  "For in-border payments (payments made within Russia), the Russian Ruble is "
1416
  "the only accepted currency. If you use another currency for in-border "
1417
  "payments, the transaction will fail"
1418
  msgstr ""
1419
 
1420
- #: app/view/admin/tickets.php:154
1421
  msgid "Singapore Dollar"
1422
  msgstr ""
1423
 
1424
- #: app/view/admin/tickets.php:155
1425
  msgid "Swedish Krona"
1426
  msgstr ""
1427
 
1428
- #: app/view/admin/tickets.php:156
1429
  msgid "Swiss Franc"
1430
  msgstr ""
1431
 
1432
- #: app/view/admin/tickets.php:157
1433
  msgid "Taiwan New Dollar"
1434
  msgstr ""
1435
 
1436
- #: app/view/admin/tickets.php:158
1437
  msgid "Thai Baht"
1438
  msgstr ""
1439
 
1440
- #: app/view/admin/tickets.php:159
1441
  msgid "Turkish Lira"
1442
  msgstr ""
1443
 
@@ -1570,32 +1595,32 @@ msgstr ""
1570
  msgid "Tags"
1571
  msgstr ""
1572
 
1573
- #: app/view/calendar/view/agenda.php:142
1574
  msgid "Collapse All"
1575
  msgstr ""
1576
 
1577
- #: app/view/calendar/view/agenda.php:143
1578
  msgid "Expand All"
1579
  msgstr ""
1580
 
1581
- #: app/view/calendar/view/agenda.php:166
1582
  msgid "There are no upcoming events to display at this time."
1583
  msgstr ""
1584
 
1585
- #: app/view/calendar/view/agenda.php:168
1586
  msgid "Read more"
1587
  msgstr ""
1588
 
1589
- #: app/view/calendar/view/agenda.php:169
1590
  msgid "Categories:"
1591
  msgstr ""
1592
 
1593
- #: app/view/calendar/view/agenda.php:170 lib/theme/list.php:320
1594
  #: public/admin/themes.php:29
1595
  msgid "Tags:"
1596
  msgstr ""
1597
 
1598
- #: app/view/calendar/view/agenda.php:171 app/view/calendar/view/month.php:87
1599
  #: app/view/calendar/view/oneday.php:105 app/view/calendar/view/week.php:118
1600
  #: app/view/calendar/widget.php:374
1601
  msgid "@ %s"
@@ -1822,71 +1847,73 @@ msgstr ""
1822
  msgid "Repeats"
1823
  msgstr ""
1824
 
1825
- #: lib/calendar-feed/ics.php:38
1826
- msgid "ICS"
1827
  msgstr ""
1828
 
1829
- #: lib/calendar-feed/ics.php:69
1830
  msgid "Another import process in progress. Please try again later."
1831
  msgstr ""
1832
 
1833
- #: lib/calendar-feed/ics.php:174
1834
- msgid ""
1835
- "A system error has prevented calendar data from being fetched. Something is "
1836
- "preventing the plugin from functioning correctly. This message should "
1837
- "provide a clue: %s"
1838
- msgstr ""
1839
-
1840
- #: lib/calendar-feed/ics.php:181
1841
- msgid ""
1842
- "Calendar data could not be fetched. If your URL is valid and contains an "
1843
- "iCalendar resource, this is likely the result of a temporary server error "
1844
- "and time may resolve this issue"
1845
- msgstr ""
1846
-
1847
- #: lib/calendar-feed/ics.php:195
1848
  msgid "Imported %s event"
1849
  msgid_plural "Imported %s events"
1850
  msgstr[0] ""
1851
  msgstr[1] ""
1852
 
1853
- #: lib/calendar-feed/ics.php:202 lib/calendar-feed/ics.php:707
1854
  msgid "Invalid ICS feed ID"
1855
  msgstr ""
1856
 
1857
- #: lib/calendar-feed/ics.php:350
1858
  msgid "Categories (optional)"
1859
  msgstr ""
1860
 
1861
- #: lib/calendar-feed/ics.php:367
1862
  msgid ""
1863
  "Do you want to keep the events imported from the calendar or remove them?"
1864
  msgstr ""
1865
 
1866
- #: lib/calendar-feed/ics.php:373
1867
  msgid "Removing ICS Feed"
1868
  msgstr ""
1869
 
1870
- #: lib/calendar-feed/ics.php:376
1871
  msgid "Keep Events"
1872
  msgstr ""
1873
 
1874
- #: lib/calendar-feed/ics.php:379
1875
  msgid "Remove Events"
1876
  msgstr ""
1877
 
1878
- #: lib/calendar-feed/ics.php:519
1879
  msgid "Oh, submission was not accepted."
1880
  msgstr ""
1881
 
1882
- #: lib/calendar-feed/ics.php:699
1883
  msgid "Deleted %d events"
1884
  msgstr ""
1885
 
1886
- #: lib/calendar-feed/ics.php:735
1887
  msgid "Feed deleted"
1888
  msgstr ""
1889
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1890
  #: lib/captcha/provider/nocaptcha.php:31
1891
  msgid "noCAPTCHA public key:"
1892
  msgstr ""
@@ -2042,25 +2069,32 @@ msgid ""
2042
  "Administrator to set it up."
2043
  msgstr ""
2044
 
2045
- #: lib/environment/check.php:104
 
 
 
 
 
 
 
2046
  msgid ""
2047
  "PHP extension \"iconv\" needed for All-In-One-Event-Calendar is missing. "
2048
  "Please, check your PHP configuration.<br />"
2049
  msgstr ""
2050
 
2051
- #: lib/environment/check.php:120
2052
  msgid ""
2053
  "PHP extension \"mbstring\" needed for All-In-One-Event-Calendar is missing. "
2054
  "Please, check your PHP configuration.<br />"
2055
  msgstr ""
2056
 
2057
- #: lib/environment/check.php:230
2058
  msgid ""
2059
  "The add-on <strong>%s</strong> must be updated to at least version %s to "
2060
  "maintain compatibility with the core calendar."
2061
  msgstr ""
2062
 
2063
- #: lib/environment/check.php:231
2064
  msgid ""
2065
  "If you do not see update notices below, ensure you have properly <a href="
2066
  "\"https://time.ly/document/user-guide/getting-started/license-keys/\" target="
@@ -2271,7 +2305,7 @@ msgid ""
2271
  "already displays the calendar."
2272
  msgstr ""
2273
 
2274
- #: lib/import-export/ics.php:894
2275
  msgid "Tickets: "
2276
  msgstr ""
2277
 
@@ -2915,15 +2949,15 @@ msgstr ""
2915
  msgid "Register this event with Eventbrite.com?"
2916
  msgstr ""
2917
 
2918
- #: public/admin/box_eventbrite.php:12 public/admin/feed_row.php:43
2919
- #: public/admin/feed_row.php:54 public/admin/feed_row.php:66
2920
- #: public/admin/feed_row.php:78 public/admin/feed_row.php:91
2921
  msgid "Yes"
2922
  msgstr ""
2923
 
2924
- #: public/admin/box_eventbrite.php:14 public/admin/feed_row.php:45
2925
- #: public/admin/feed_row.php:56 public/admin/feed_row.php:68
2926
- #: public/admin/feed_row.php:80 public/admin/feed_row.php:93
2927
  msgid "No"
2928
  msgstr ""
2929
 
@@ -3020,7 +3054,7 @@ msgid "Ending after"
3020
  msgstr ""
3021
 
3022
  #: public/admin/box_repeat.php:109
3023
- #: public/admin/plugins/ics/display_feeds.php:90
3024
  msgid "Please wait&#8230;"
3025
  msgstr ""
3026
 
@@ -3168,97 +3202,190 @@ msgstr ""
3168
  msgid "Twice Daily"
3169
  msgstr ""
3170
 
3171
- #: public/admin/feed_row.php:14 public/admin/plugins/ics/display_feeds.php:27
3172
- msgid "iCalendar/.ics Feed URL:"
3173
  msgstr ""
3174
 
3175
- #: public/admin/feed_row.php:24
3176
  msgid "Event categories:"
3177
  msgstr ""
3178
 
3179
- #: public/admin/feed_row.php:31
3180
  msgid "Tag with"
3181
  msgstr ""
3182
 
3183
- #: public/admin/feed_row.php:40
3184
  msgid "Allow comments"
3185
  msgstr ""
3186
 
3187
- #: public/admin/feed_row.php:51
3188
  msgid "Show map"
3189
  msgstr ""
3190
 
3191
- #: public/admin/feed_row.php:63
3192
  msgid "Keep original events categories and tags"
3193
  msgstr ""
3194
 
3195
- #: public/admin/feed_row.php:75 public/admin/plugins/ics/display_feeds.php:67
3196
  msgid ""
3197
  "On refresh, preserve previously imported events that are missing from the "
3198
  "feed"
3199
  msgstr ""
3200
 
3201
- #: public/admin/feed_row.php:86 public/admin/plugins/ics/display_feeds.php:74
3202
  msgid ""
3203
  "Guesses the time zone of events that have none specified; recommended for "
3204
  "Google Calendar feeds"
3205
  msgstr ""
3206
 
3207
- #: public/admin/feed_row.php:87 public/admin/plugins/ics/display_feeds.php:75
3208
  msgid "Assign default time zone to events in UTC"
3209
  msgstr ""
3210
 
3211
- #: public/admin/feed_row.php:104
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3212
  msgid "Refreshing&#8230;"
3213
  msgstr ""
3214
 
3215
- #: public/admin/feed_row.php:106
3216
  msgid "Refresh"
3217
  msgstr ""
3218
 
3219
- #: public/admin/feed_row.php:119
3220
  msgid "Removing&#8230;"
3221
  msgstr ""
3222
 
3223
- #: public/admin/feed_row.php:121
3224
- msgid "Remove"
3225
- msgstr ""
3226
-
3227
  #: public/admin/import.php:6
3228
  msgid "Successfully imported events:"
3229
  msgstr ""
3230
 
3231
- #: public/admin/plugins/ics/display_feeds.php:2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3232
  msgid ""
3233
- "Configure which other calendars your own calendar subscribes to.\n"
3234
- " You can add any calendar that provides an iCalendar (.ics) feed.\n"
3235
- " Enter the feed URL(s) below and the events from those feeds will be\n"
3236
- " imported periodically."
3237
  msgstr ""
3238
 
3239
- #: public/admin/plugins/ics/display_feeds.php:14
3240
- msgid "Check for new events"
 
 
 
 
3241
  msgstr ""
3242
 
3243
- #: public/admin/plugins/ics/display_feeds.php:45
3244
  msgid "Allow comments on imported events"
3245
  msgstr ""
3246
 
3247
- #: public/admin/plugins/ics/display_feeds.php:52
3248
  msgid "Show map on imported events"
3249
  msgstr ""
3250
 
3251
- #: public/admin/plugins/ics/display_feeds.php:59
3252
  msgid ""
3253
  "Import any tags/categories provided by feed, in addition those selected above"
3254
  msgstr ""
3255
 
3256
- #: public/admin/plugins/ics/display_feeds.php:93
3257
- msgid "Add new subscription"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3258
  msgstr ""
3259
 
3260
- #: public/admin/plugins/ics/display_feeds.php:96
3261
- msgid "Update subscription"
3262
  msgstr ""
3263
 
3264
  #: public/admin/row_custom.php:3
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.5.0\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/all-in-one-event-calendar\n"
7
+ "POT-Creation-Date: 2016-06-14 16:02:21+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
29
  msgid "Calendar Themes"
30
  msgstr ""
31
 
32
+ #: app/controller/front.php:1061
33
  msgid ""
34
  "Your database is found to be corrupt. Likely previous update has failed. "
35
  "Please restore All-in-One Event Calendar tables from a backup and retry."
137
  "included.</b>"
138
  msgstr ""
139
 
140
+ #: app/controller/javascript.php:508
141
+ msgid "Event was imported successfully."
142
+ msgstr ""
143
+
144
+ #: app/controller/javascript.php:511
145
+ msgid "An error occurred when importing event. Please, try later."
146
+ msgstr ""
147
+
148
+ #: app/controller/javascript.php:541 app/view/admin/widget-creator.php:139
149
  msgid "Preview:"
150
  msgstr ""
151
 
152
+ #: app/controller/javascript.php:542
153
  msgid ""
154
  "Loading preview&nbsp;<i class=\"ai1ec-fa ai1ec-fa-spin ai1ec-fa-spinner\"></"
155
  "i>"
156
  msgstr ""
157
 
158
+ #: app/controller/javascript.php:547 app/view/admin/all-events.php:83
159
  msgid "Ticketing Details"
160
  msgstr ""
161
 
162
+ #: app/controller/javascript.php:548
163
  msgid "Hide Ticketing Details"
164
  msgstr ""
165
 
166
+ #: app/controller/javascript.php:549
167
  msgid "Loading tickets details..."
168
  msgstr ""
169
 
170
+ #: app/controller/javascript.php:550
171
  msgid "Type and price"
172
  msgstr ""
173
 
174
+ #: app/controller/javascript.php:551
175
  msgid "Info"
176
  msgstr ""
177
 
178
+ #: app/controller/javascript.php:552
179
  msgid "Information"
180
  msgstr ""
181
 
182
+ #: app/controller/javascript.php:553
183
  msgid "Report"
184
  msgstr ""
185
 
186
+ #: app/controller/javascript.php:554
187
  msgid "Sale dates"
188
  msgstr ""
189
 
190
+ #: app/controller/javascript.php:555
191
  msgid "Limits"
192
  msgstr ""
193
 
194
+ #: app/controller/javascript.php:556
195
  msgid "Actions"
196
  msgstr ""
197
 
198
+ #: app/controller/javascript.php:557
199
  msgid "Sold:"
200
  msgstr ""
201
 
202
+ #: app/controller/javascript.php:558
203
  msgid "Left:"
204
  msgstr ""
205
 
206
+ #: app/controller/javascript.php:559
207
  msgid "Start:"
208
  msgstr ""
209
 
210
+ #: app/controller/javascript.php:560
211
  msgid "End:"
212
  msgstr ""
213
 
214
+ #: app/controller/javascript.php:561 public/admin/box_event_cost.php:158
215
  msgid "Min:"
216
  msgstr ""
217
 
218
+ #: app/controller/javascript.php:562 public/admin/box_event_cost.php:168
219
  msgid "Max:"
220
  msgstr ""
221
 
222
+ #: app/controller/javascript.php:563
223
  msgid "Attendees"
224
  msgstr ""
225
 
226
+ #: app/controller/javascript.php:564
227
  msgid "Hide Attendees"
228
  msgstr ""
229
 
230
+ #: app/controller/javascript.php:565
231
  msgid "Attendees List"
232
  msgstr ""
233
 
234
+ #: app/controller/javascript.php:566
235
  msgid "Guest Name"
236
  msgstr ""
237
 
238
+ #: app/controller/javascript.php:567 app/view/admin/tickets.php:116
239
  msgid "Status"
240
  msgstr ""
241
 
242
+ #: app/controller/javascript.php:568 app/view/admin/tickets.php:115
243
  #: app/view/event/ticket.php:71
244
  msgid "Email"
245
  msgstr ""
246
 
247
+ #: app/controller/javascript.php:569
248
  msgid "No attendees for this ticket type."
249
  msgstr ""
250
 
251
+ #: app/controller/javascript.php:570 app/view/calendar/view/agenda.php:205
252
+ #: app/view/calendar/widget.php:373 public/admin/feed_row.php:150
253
  msgid "Edit"
254
  msgstr ""
255
 
256
+ #: app/controller/javascript.php:571
257
  msgid "Code"
258
  msgstr ""
259
 
260
+ #: app/controller/javascript.php:572 public/admin/box_event_cost.php:189
261
  #: public/admin/box_event_cost.php:308
262
  msgid "Unlimited"
263
  msgstr ""
264
 
265
+ #: app/controller/javascript.php:573 app/model/api/api-ticketing.php:401
266
  #: public/admin/box_event_cost.php:280
267
  msgid "Open for sale"
268
  msgstr ""
269
 
270
+ #: app/controller/javascript.php:574
271
  msgid ""
272
  "You have sold tickets for this ticket type. Please change it's status to "
273
  "\"Canceled\" and make refunds to all users that purchased tickets."
274
  msgstr ""
275
 
276
+ #: app/controller/javascript.php:575
277
  msgid ""
278
  "You have sold tickets for this ticket type. Please make refunds to all users "
279
  "that purchased tickets"
280
  msgstr ""
281
 
282
+ #: app/controller/javascript.php:578
283
  msgid "Your message has been sent. Thank you for your feedback."
284
  msgstr ""
285
 
286
+ #: app/controller/javascript.php:579
287
  msgid "Your message has not been sent. Please try again or contact us."
288
  msgstr ""
289
 
290
+ #: app/controller/javascript.php:581
291
  msgid ""
292
  "Something went wrong while fetching events.<br>The request status is: %STATUS"
293
  "% <br>The error thrown was: %ERROR%"
294
  msgstr ""
295
 
296
+ #: app/controller/javascript.php:584
297
  msgid "Response text received from server"
298
  msgstr ""
299
 
300
+ #: app/controller/javascript.php:585
301
  msgid "Click here for technical details"
302
  msgstr ""
303
 
304
+ #: app/controller/javascript.php:590
305
  msgid "The end date can't be earlier than the start date."
306
  msgstr ""
307
 
308
+ #: app/controller/javascript.php:591
309
  msgid "For week and day view, you must select an interval of at least 6 hours."
310
  msgstr ""
311
 
312
+ #: app/model/api/api-abstract.php:188
313
  msgid "%s.<br/>Detail: %s."
314
  msgstr ""
315
 
316
+ #: app/model/api/api-abstract.php:194
317
  msgid "API URL: %s.<br/>Detail: %s"
318
  msgstr ""
319
 
320
+ #: app/model/api/api-abstract.php:200
321
  msgid "API URL: %s.<br/>Detail: %s - %s"
322
  msgstr ""
323
 
324
+ #: app/model/api/api-abstract.php:208
325
  msgid ""
326
  "%s. Please reload this page to try again. If this error persists, please "
327
  "contact us at %s. In your report please include the information below.<br/>"
328
  "%s."
329
  msgstr ""
330
 
331
+ #: app/model/api/api-abstract.php:215
332
  msgid ""
333
  "%s. Please try again. If this error persists, please contact us at %s. In "
334
  "your report please include the information below.<br/>%s."
335
  msgstr ""
336
 
337
+ #: app/model/api/api-abstract.php:461
338
  msgid "Error decoding the response"
339
  msgstr ""
340
 
341
+ #: app/model/api/api-feeds.php:87
342
  msgid "We were unable to get the Suggested Events from Time.ly Network"
343
  msgstr ""
344
 
345
+ #: app/model/api/api-feeds.php:122
346
+ msgid "We were unable to import feed"
347
+ msgstr ""
348
+
349
+ #: app/model/api/api-feeds.php:145
350
+ msgid "We were unable to get feed data"
351
+ msgstr ""
352
+
353
+ #: app/model/api/api-feeds.php:277
354
+ msgid "We were unable to subscribe feed"
355
+ msgstr ""
356
+
357
+ #: app/model/api/api-feeds.php:307
358
+ msgid "We were unable to unsubscribe feed"
359
+ msgstr ""
360
+
361
+ #: app/model/api/api-registration.php:37
362
  msgid "We were unable to Sign you In for Time.ly Network"
363
  msgstr ""
364
 
365
+ #: app/model/api/api-registration.php:58
366
  msgid "We were unable to Sign you Up for Time.ly Network"
367
  msgstr ""
368
 
369
+ #: app/model/api/api-registration.php:123
370
  msgid "We were unable to Sign you Out of Time.ly Network"
371
  msgstr ""
372
 
373
+ #: app/model/api/api-registration.php:153
374
  msgid "Payment preferences were saved."
375
  msgstr ""
376
 
377
+ #: app/model/api/api-registration.php:162
378
  msgid "Payment preferences were not saved."
379
  msgstr ""
380
 
381
+ #: app/model/api/api-registration.php:190
382
  msgid "We were unable to get the Sales information from Time.ly Network"
383
  msgstr ""
384
 
425
  msgid "We were unable to update the Event on Time.ly Ticketing"
426
  msgstr ""
427
 
428
+ #: app/model/api/api-ticketing.php:403 public/admin/box_event_cost.php:285
429
  msgid "Sale ended"
430
  msgstr ""
431
 
432
+ #: app/model/api/api-ticketing.php:405 public/admin/box_event_cost.php:289
433
  msgid "Canceled"
434
  msgstr ""
435
 
436
+ #: app/model/api/api-ticketing.php:438
437
  msgid "Past Event"
438
  msgstr ""
439
 
440
+ #: app/model/api/api-ticketing.php:440
441
  msgid "Event closed"
442
  msgstr ""
443
 
444
+ #: app/model/api/api-ticketing.php:442
445
  msgid "Not available yet"
446
  msgstr ""
447
 
448
+ #: app/model/api/api-ticketing.php:444
449
  msgid "Sale closed"
450
  msgstr ""
451
 
452
+ #: app/model/api/api-ticketing.php:446
453
  msgid "Sold out"
454
  msgstr ""
455
 
456
+ #: app/model/api/api-ticketing.php:448
457
  msgid "Not available"
458
  msgstr ""
459
 
460
+ #: app/model/api/api-ticketing.php:468
461
  msgid "We were unable to get the Event Details from Time.ly Ticketing"
462
  msgstr ""
463
 
464
+ #: app/model/api/api-ticketing.php:498
465
  msgid "We were unable to get the Tickets Details from Time.ly Ticketing"
466
  msgstr ""
467
 
468
+ #: app/model/api/api-ticketing.php:525
469
  msgid "We were unable to get the Tickets Attendees from Time.ly Ticketing"
470
  msgstr ""
471
 
472
+ #: app/model/api/api-ticketing.php:611 app/model/api/api-ticketing.php:671
473
  msgid "Event not found inside the database."
474
  msgstr ""
475
 
476
+ #: app/model/api/api-ticketing.php:651
477
  msgid "We were unable to Update the Event on Time.ly Network"
478
  msgstr ""
479
 
480
+ #: app/model/api/api-ticketing.php:702
481
  msgid "We were unable to remove the Event on Time.ly Network"
482
  msgstr ""
483
 
509
  msgid "Message"
510
  msgstr ""
511
 
512
+ #: app/model/settings.php:409
513
  #: lib/html/element/setting/calendar-page-selector.php:50
514
  msgid "Calendar page"
515
  msgstr ""
516
 
517
+ #: app/model/settings.php:419
518
  msgid "Week starts on"
519
  msgstr ""
520
 
521
+ #: app/model/settings.php:432
522
  msgid "Available views"
523
  msgstr ""
524
 
525
+ #: app/model/settings.php:440
526
  msgid "Agenda"
527
  msgid_plural "Agenda"
528
  msgstr[0] ""
529
  msgstr[1] ""
530
 
531
+ #: app/model/settings.php:451
532
  msgid "Day"
533
  msgid_plural "Day"
534
  msgstr[0] ""
535
  msgstr[1] ""
536
 
537
+ #: app/model/settings.php:462
538
  msgid "Month"
539
  msgid_plural "Month"
540
  msgstr[0] ""
541
  msgstr[1] ""
542
 
543
+ #: app/model/settings.php:473
544
  msgid "Week"
545
  msgid_plural "Week"
546
  msgstr[0] ""
547
  msgstr[1] ""
548
 
549
+ #: app/model/settings.php:487
550
  msgid "Timezone"
551
  msgstr ""
552
 
553
+ #: app/model/settings.php:500
554
  msgid "Preselected calendar filters"
555
  msgstr ""
556
 
557
+ #: app/model/settings.php:501 app/view/calendar/widget.php:128
558
  msgid ""
559
  "To clear, hold &#8984;/<abbr class=\"initialism\">CTRL</abbr> and click "
560
  "selection."
561
  msgstr ""
562
 
563
+ #: app/model/settings.php:516
564
  msgid "Default calendar start date (optional)"
565
  msgstr ""
566
 
567
+ #: app/model/settings.php:527
568
  msgid "Agenda pages show at most"
569
  msgstr ""
570
 
571
+ #: app/model/settings.php:540
572
  msgid "Week/Day view starts at"
573
  msgstr ""
574
 
575
+ #: app/model/settings.php:553
576
  msgid "Week/Day view ends at"
577
  msgstr ""
578
 
579
+ #: app/model/settings.php:566
580
  msgid "<strong>Word-wrap event stubs</strong> in Month view"
581
  msgstr ""
582
 
583
+ #: app/model/settings.php:569
584
  msgid "Only applies to events that span a single day."
585
  msgstr ""
586
 
587
+ #: app/model/settings.php:581
588
  msgid ""
589
  "In <span class=\"ai1ec-tooltip-toggle\"\n"
590
  "\t\t\t\t\t\tdata-original-title=\"These include Agenda view,\n"
593
  "\t\t\t\t\t\tfrom last day shown</strong>"
594
  msgstr ""
595
 
596
+ #: app/model/settings.php:597
597
  msgid "Keep all events <strong>expanded</strong> in Agenda view"
598
  msgstr ""
599
 
600
+ #: app/model/settings.php:609
601
  msgid "<strong>Show year</strong> in calendar date labels"
602
  msgstr ""
603
 
604
+ #: app/model/settings.php:621
605
  msgid "<strong>Show location in event titles</strong> in calendar views"
606
  msgstr ""
607
 
608
+ #: app/model/settings.php:633
609
  msgid "<strong>Exclude</strong> events from search results"
610
  msgstr ""
611
 
612
+ #: app/model/settings.php:645
613
  msgid ""
614
  "Hide <strong>Subscribe</strong>/<strong>Add to Calendar</strong> buttons in "
615
  "calendar and single event views "
616
  msgstr ""
617
 
618
+ #: app/model/settings.php:657
619
  msgid "Hide <strong>Get a Timely Calendar</strong> button"
620
  msgstr ""
621
 
622
+ #: app/model/settings.php:669
623
  msgid " Hide <strong>Google Maps</strong> until clicked"
624
  msgstr ""
625
 
626
+ #: app/model/settings.php:681
627
  msgid ""
628
  " <strong>Affix filter menu</strong> to top of window when it scrolls out of "
629
  "view"
630
  msgstr ""
631
 
632
+ #: app/model/settings.php:684
633
  msgid "Only applies to first visible calendar found on the page."
634
  msgstr ""
635
 
636
+ #: app/model/settings.php:696
637
  msgid "Offset affixed filter bar vertically by"
638
  msgstr ""
639
 
640
+ #: app/model/settings.php:711
641
  msgid "Wide screens only (&#8805; 1200px)"
642
  msgstr ""
643
 
644
+ #: app/model/settings.php:726
645
  msgid "Tablets only (< 980px)"
646
  msgstr ""
647
 
648
+ #: app/model/settings.php:741
649
  msgid "Phones only (< 768px)"
650
  msgstr ""
651
 
652
+ #: app/model/settings.php:754
653
  msgid "Strict compatibility content filtering"
654
  msgstr ""
655
 
656
+ #: app/model/settings.php:766
657
  msgid " <strong>Hide featured image</strong> from event details page"
658
  msgstr ""
659
 
660
+ #: app/model/settings.php:769
661
  msgid ""
662
  "Select this option if your theme already displays each post's featured image."
663
  msgstr ""
664
 
665
+ #: app/model/settings.php:780
666
  msgid "Input dates in this format"
667
  msgstr ""
668
 
669
+ #: app/model/settings.php:785
670
  msgid "Default (d/m/yyyy)"
671
  msgstr ""
672
 
673
+ #: app/model/settings.php:789
674
  msgid "US (m/d/yyyy)"
675
  msgstr ""
676
 
677
+ #: app/model/settings.php:793
678
  msgid "ISO 8601 (yyyy-m-d)"
679
  msgstr ""
680
 
681
+ #: app/model/settings.php:797
682
  msgid "Dotted (m.d.yyyy)"
683
  msgstr ""
684
 
685
+ #: app/model/settings.php:809
686
  msgid " Use <strong>24h time</strong> in time pickers"
687
  msgstr ""
688
 
689
+ #: app/model/settings.php:820
690
  msgid "<strong>Disable address autocomplete</strong> function"
691
  msgstr ""
692
 
693
+ #: app/model/settings.php:831
694
  msgid ""
695
  "Use the configured <strong>region</strong> (WordPress locale) to bias the "
696
  "address autocomplete function "
697
  msgstr ""
698
 
699
+ #: app/model/settings.php:847
700
  msgid ""
701
  " Show the old <strong>Post Your Event</strong> button above the calendar to "
702
  "privileged users"
703
  msgstr ""
704
 
705
+ #: app/model/settings.php:850
706
  msgid ""
707
  "Install the <a target=\"_blank\" href=\"http://time.ly/\">Interactive "
708
  "Frontend Extension</a> for the <strong>frontend Post Your Event form</"
709
  "strong>."
710
  msgstr ""
711
 
712
+ #: app/model/settings.php:871
713
  msgid "Move calendar into this DOM element"
714
  msgstr ""
715
 
716
+ #: app/model/settings.php:873
717
  msgid ""
718
  "Optional. Use this JavaScript-based shortcut to place the\n"
719
  "\t\t\t\t\t\tcalendar a DOM element other than the usual page content "
727
  "\t\t\t\t\t\tby the calendar."
728
  msgstr ""
729
 
730
+ #: app/model/settings.php:892
731
  msgid ""
732
  "<strong>Skip <tt>in_the_loop()</tt> check </strong> that protects against "
733
  "multiple calendar output"
734
  msgstr ""
735
 
736
+ #: app/model/settings.php:895
737
  msgid ""
738
  "Try enabling this option if your calendar does not appear on the calendar "
739
  "page. It is needed for compatibility with a small number of themes that call "
740
  "<tt>the_content()</tt> from outside of The Loop. Leave disabled otherwise."
741
  msgstr ""
742
 
743
+ #: app/model/settings.php:907
744
  msgid "Disable <strong>gzip</strong> compression."
745
  msgstr ""
746
 
747
+ #: app/model/settings.php:910
748
  msgid ""
749
  "Use this option if calendar is unresponsive. <a target=\"_blank\" href="
750
  "\"http://time.ly/document/user-guide/troubleshooting/disable-gzip-"
752
  "gzip is disabled by default for maximum compatibility.)"
753
  msgstr ""
754
 
755
+ #: app/model/settings.php:922
756
  msgid "Use frontend rendering."
757
  msgstr ""
758
 
759
+ #: app/model/settings.php:925
760
  msgid ""
761
  "Renders calendar views on the client rather than the server; can improve "
762
  "performance."
763
  msgstr ""
764
 
765
+ #: app/model/settings.php:937
766
  msgid "Use advanced JS cache."
767
  msgstr ""
768
 
769
+ #: app/model/settings.php:940
770
  msgid "Cache dynamically generated JS files. Improves performance."
771
  msgstr ""
772
 
773
+ #: app/model/settings.php:952
774
  msgid ""
775
  "<strong>Link CSS</strong> in <code>&lt;head&gt;</code> section when file "
776
  "cache is unavailable."
777
  msgstr ""
778
 
779
+ #: app/model/settings.php:955
780
  msgid ""
781
  "Use this option if file cache is unavailable and you would prefer to serve "
782
  "CSS as a link rather than have it output inline."
783
  msgstr ""
784
 
785
+ #: app/model/settings.php:967
786
  msgid "Current <strong>robots.txt</strong> on this site"
787
  msgstr ""
788
 
789
+ #: app/model/settings.php:971
790
  msgid ""
791
  "The Robot Exclusion Standard, also known as the Robots Exclusion Protocol "
792
  "or\n"
800
  "your root WordPress directory."
801
  msgstr ""
802
 
803
+ #: app/model/settings.php:988
804
  msgid ""
805
  "<strong>Publicize, promote, and share my events</strong> marked as public on "
806
  "the Timely network. (<a href=\"%s\" target=\"_blank\">Learn more &#187;</a>)"
807
  msgstr ""
808
 
809
+ #: app/model/settings.php:1011
810
  msgid "Templates cache improves site performance"
811
  msgstr ""
812
 
813
+ #: app/model/settings.php:1024
814
  msgid "Display events in <strong>calendar time zone</strong>"
815
  msgstr ""
816
 
817
+ #: app/model/settings.php:1027
818
  msgid ""
819
  "If this box is checked events will appear in the calendar time zone with "
820
  "time zone information displayed on the event details page."
896
  msgstr ""
897
 
898
  #: app/view/admin/calendar-feeds.php:27 app/view/admin/calendar-feeds.php:28
899
+ #: lib/calendar-feed/import.php:24
900
  msgid "Import Feeds"
901
  msgstr ""
902
 
1061
  msgstr ""
1062
 
1063
  #: app/view/admin/settings.php:68 app/view/admin/settings.php:69
1064
+ #: app/view/admin/tickets.php:103 lib/date/timezone.php:366
1065
  msgid "Settings"
1066
  msgstr ""
1067
 
1111
  msgid "Please, Sign In to Timely Network."
1112
  msgstr ""
1113
 
1114
+ #: app/view/admin/settings.php:184 app/view/admin/tickets.php:109
1115
  #: public/admin/box_ask_customer_review.php:113
1116
  #: public/admin/box_ask_customer_review.php:127
1117
  #: public/admin/box_ask_customer_review.php:141
1177
  msgstr ""
1178
 
1179
  #: app/view/admin/settings.php:204 public/admin/box_repeat.php:116
1180
+ #: public/admin/plugins/ics/import_feed.php:103
1181
  msgid "Cancel"
1182
  msgstr ""
1183
 
1184
+ #: app/view/admin/settings.php:205 app/view/admin/tickets.php:118
1185
  msgid "Sign Out"
1186
  msgstr ""
1187
 
1263
  msgid "Ticketing<sup>beta</sup>"
1264
  msgstr ""
1265
 
1266
+ #: app/view/admin/tickets.php:70 app/view/admin/tickets.php:85
1267
+ #: app/view/admin/tickets.php:97
1268
  msgid "Time.ly Ticketing<sup>beta</sup>"
1269
  msgstr ""
1270
 
1271
+ #: app/view/admin/tickets.php:74
1272
  msgid ""
1273
  "You need to sign up for a Timely Network account in order to use "
1274
  "Ticketing<sup>beta</sup> <br /><br />"
1275
  msgstr ""
1276
 
1277
+ #: app/view/admin/tickets.php:77
1278
  msgid ""
1279
  "<a href=\"edit.php?post_type=ai1ec_event&page=all-in-one-event-calendar-"
1280
  "settings\" class=\"ai1ec-btn ai1ec-btn-primary ai1ec-btn-lg\">Sign In to "
1281
  "Timely Network</a>"
1282
  msgstr ""
1283
 
1284
+ #: app/view/admin/tickets.php:78
1285
  msgid ""
1286
  "<b>Signing up for a Timely Network account is currently unavailable. Please, "
1287
  "try again later.</b>"
1288
  msgstr ""
1289
 
1290
+ #: app/view/admin/tickets.php:100
1291
  msgid ""
1292
  "Please consider Ticketing is in beta. If you encounter any bugs please raise "
1293
  "the at <a href=\"mailto:labs@time.ly\">labs@time.ly</a>. Any enhancements "
1295
  "ly</a> under \"Ticketing\"."
1296
  msgstr ""
1297
 
1298
+ #: app/view/admin/tickets.php:104
1299
  msgid "Sales"
1300
  msgstr ""
1301
 
1302
+ #: app/view/admin/tickets.php:105
1303
  msgid "Please provide your PayPal details."
1304
  msgstr ""
1305
 
1306
+ #: app/view/admin/tickets.php:106
1307
  msgid "Cheque"
1308
  msgstr ""
1309
 
1310
+ #: app/view/admin/tickets.php:107
1311
  msgid "PayPal"
1312
  msgstr ""
1313
 
1314
+ #: app/view/admin/tickets.php:108
1315
  msgid "Preferred currency for tickets:"
1316
  msgstr ""
1317
 
1318
+ #: app/view/admin/tickets.php:110
1319
  msgid "Save Changes"
1320
  msgstr ""
1321
 
1322
+ #: app/view/admin/tickets.php:111
1323
  msgid "Date"
1324
  msgstr ""
1325
 
1326
+ #: app/view/admin/tickets.php:112
1327
  msgid "Event"
1328
  msgstr ""
1329
 
1330
+ #: app/view/admin/tickets.php:113
1331
  msgid "Purchaser"
1332
  msgstr ""
1333
 
1334
+ #: app/view/admin/tickets.php:114 app/view/calendar/view/abstract.php:107
1335
  #: app/view/event/ticket.php:39
1336
  msgid "Tickets"
1337
  msgstr ""
1338
 
1339
+ #: app/view/admin/tickets.php:117
1340
  msgid "Total"
1341
  msgstr ""
1342
 
1343
+ #: app/view/admin/tickets.php:134
1344
  msgid "United States Dollar"
1345
  msgstr ""
1346
 
1347
+ #: app/view/admin/tickets.php:135
1348
  msgid "Canadian Dollar"
1349
  msgstr ""
1350
 
1351
+ #: app/view/admin/tickets.php:136
1352
  msgid "Australian Dollar"
1353
  msgstr ""
1354
 
1355
+ #: app/view/admin/tickets.php:137
1356
  msgid "Brazilian Real"
1357
  msgstr ""
1358
 
1359
+ #: app/view/admin/tickets.php:137 app/view/admin/tickets.php:145
1360
+ #: app/view/admin/tickets.php:158
1361
  msgid ""
1362
  "Note: This currency is supported as a payment currency and a currency "
1363
  "balance for in-country PayPal accounts only."
1364
  msgstr ""
1365
 
1366
+ #: app/view/admin/tickets.php:138
1367
  msgid "Czech Koruna"
1368
  msgstr ""
1369
 
1370
+ #: app/view/admin/tickets.php:139
1371
  msgid "Danish Krone"
1372
  msgstr ""
1373
 
1374
+ #: app/view/admin/tickets.php:140
1375
  msgid "Euro"
1376
  msgstr ""
1377
 
1378
+ #: app/view/admin/tickets.php:141
1379
  msgid "Hong Kong Dollar"
1380
  msgstr ""
1381
 
1382
+ #: app/view/admin/tickets.php:142
1383
  msgid "Hungarian Forint"
1384
  msgstr ""
1385
 
1386
+ #: app/view/admin/tickets.php:142 app/view/admin/tickets.php:156
1387
  msgid ""
1388
  "Note: Decimal amounts are not supported for this currency. Passing a decimal "
1389
  "amount will throw an error."
1390
  msgstr ""
1391
 
1392
+ #: app/view/admin/tickets.php:143
1393
  msgid "Israeli New Sheqel"
1394
  msgstr ""
1395
 
1396
+ #: app/view/admin/tickets.php:144
1397
  msgid "Japanese Yen"
1398
  msgstr ""
1399
 
1400
+ #: app/view/admin/tickets.php:144
1401
  msgid ""
1402
  "Note: This currency does not support decimals. Passing a decimal amount will "
1403
  "throw an error. 1,000,000"
1404
  msgstr ""
1405
 
1406
+ #: app/view/admin/tickets.php:145
1407
  msgid "Malaysian Ringgit"
1408
  msgstr ""
1409
 
1410
+ #: app/view/admin/tickets.php:146
1411
  msgid "Mexican Peso"
1412
  msgstr ""
1413
 
1414
+ #: app/view/admin/tickets.php:147
1415
  msgid "Norwegian Krone"
1416
  msgstr ""
1417
 
1418
+ #: app/view/admin/tickets.php:148
1419
  msgid "New Zealand Dollar"
1420
  msgstr ""
1421
 
1422
+ #: app/view/admin/tickets.php:149
1423
  msgid "Philippine Peso"
1424
  msgstr ""
1425
 
1426
+ #: app/view/admin/tickets.php:150
1427
  msgid "Polish Zloty"
1428
  msgstr ""
1429
 
1430
+ #: app/view/admin/tickets.php:151
1431
  msgid "Pound Sterling"
1432
  msgstr ""
1433
 
1434
+ #: app/view/admin/tickets.php:152
1435
  msgid "Russian Ruble"
1436
  msgstr ""
1437
 
1438
+ #: app/view/admin/tickets.php:152
1439
  msgid ""
1440
  "For in-border payments (payments made within Russia), the Russian Ruble is "
1441
  "the only accepted currency. If you use another currency for in-border "
1442
  "payments, the transaction will fail"
1443
  msgstr ""
1444
 
1445
+ #: app/view/admin/tickets.php:153
1446
  msgid "Singapore Dollar"
1447
  msgstr ""
1448
 
1449
+ #: app/view/admin/tickets.php:154
1450
  msgid "Swedish Krona"
1451
  msgstr ""
1452
 
1453
+ #: app/view/admin/tickets.php:155
1454
  msgid "Swiss Franc"
1455
  msgstr ""
1456
 
1457
+ #: app/view/admin/tickets.php:156
1458
  msgid "Taiwan New Dollar"
1459
  msgstr ""
1460
 
1461
+ #: app/view/admin/tickets.php:157
1462
  msgid "Thai Baht"
1463
  msgstr ""
1464
 
1465
+ #: app/view/admin/tickets.php:158
1466
  msgid "Turkish Lira"
1467
  msgstr ""
1468
 
1595
  msgid "Tags"
1596
  msgstr ""
1597
 
1598
+ #: app/view/calendar/view/agenda.php:180
1599
  msgid "Collapse All"
1600
  msgstr ""
1601
 
1602
+ #: app/view/calendar/view/agenda.php:181
1603
  msgid "Expand All"
1604
  msgstr ""
1605
 
1606
+ #: app/view/calendar/view/agenda.php:204
1607
  msgid "There are no upcoming events to display at this time."
1608
  msgstr ""
1609
 
1610
+ #: app/view/calendar/view/agenda.php:206
1611
  msgid "Read more"
1612
  msgstr ""
1613
 
1614
+ #: app/view/calendar/view/agenda.php:207
1615
  msgid "Categories:"
1616
  msgstr ""
1617
 
1618
+ #: app/view/calendar/view/agenda.php:208 lib/theme/list.php:320
1619
  #: public/admin/themes.php:29
1620
  msgid "Tags:"
1621
  msgstr ""
1622
 
1623
+ #: app/view/calendar/view/agenda.php:209 app/view/calendar/view/month.php:87
1624
  #: app/view/calendar/view/oneday.php:105 app/view/calendar/view/week.php:118
1625
  #: app/view/calendar/widget.php:374
1626
  msgid "@ %s"
1847
  msgid "Repeats"
1848
  msgstr ""
1849
 
1850
+ #: lib/calendar-feed/ics.php:40
1851
+ msgid "My Feeds"
1852
  msgstr ""
1853
 
1854
+ #: lib/calendar-feed/ics.php:72
1855
  msgid "Another import process in progress. Please try again later."
1856
  msgstr ""
1857
 
1858
+ #: lib/calendar-feed/ics.php:201
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1859
  msgid "Imported %s event"
1860
  msgid_plural "Imported %s events"
1861
  msgstr[0] ""
1862
  msgstr[1] ""
1863
 
1864
+ #: lib/calendar-feed/ics.php:208 lib/calendar-feed/ics.php:769
1865
  msgid "Invalid ICS feed ID"
1866
  msgstr ""
1867
 
1868
+ #: lib/calendar-feed/ics.php:362 lib/calendar-feed/import.php:82
1869
  msgid "Categories (optional)"
1870
  msgstr ""
1871
 
1872
+ #: lib/calendar-feed/ics.php:379
1873
  msgid ""
1874
  "Do you want to keep the events imported from the calendar or remove them?"
1875
  msgstr ""
1876
 
1877
+ #: lib/calendar-feed/ics.php:385
1878
  msgid "Removing ICS Feed"
1879
  msgstr ""
1880
 
1881
+ #: lib/calendar-feed/ics.php:388
1882
  msgid "Keep Events"
1883
  msgstr ""
1884
 
1885
+ #: lib/calendar-feed/ics.php:391
1886
  msgid "Remove Events"
1887
  msgstr ""
1888
 
1889
+ #: lib/calendar-feed/ics.php:566 lib/calendar-feed/ics.php:835
1890
  msgid "Oh, submission was not accepted."
1891
  msgstr ""
1892
 
1893
+ #: lib/calendar-feed/ics.php:761
1894
  msgid "Deleted %d events"
1895
  msgstr ""
1896
 
1897
+ #: lib/calendar-feed/ics.php:815 lib/calendar-feed/ics.php:970
1898
  msgid "Feed deleted"
1899
  msgstr ""
1900
 
1901
+ #: lib/calendar-feed/ics.php:889
1902
+ msgid "Event imported"
1903
+ msgstr ""
1904
+
1905
+ #: lib/calendar-feed/suggested.php:24
1906
+ msgid "Discover Events"
1907
+ msgstr ""
1908
+
1909
+ #: lib/calendar-feed/suggested.php:103
1910
+ msgid "&laquo;"
1911
+ msgstr ""
1912
+
1913
+ #: lib/calendar-feed/suggested.php:104
1914
+ msgid "&raquo;"
1915
+ msgstr ""
1916
+
1917
  #: lib/captcha/provider/nocaptcha.php:31
1918
  msgid "noCAPTCHA public key:"
1919
  msgstr ""
2069
  "Administrator to set it up."
2070
  msgstr ""
2071
 
2072
+ #: lib/environment/check.php:107
2073
+ msgid ""
2074
+ "<b>ACTION REQUIRED!</b> Please, <a href=\"edit.php?"
2075
+ "post_type=ai1ec_event&page=all-in-one-event-calendar-settings\">sign</a> "
2076
+ "into Timely Network to continue syncing your imported events."
2077
+ msgstr ""
2078
+
2079
+ #: lib/environment/check.php:125
2080
  msgid ""
2081
  "PHP extension \"iconv\" needed for All-In-One-Event-Calendar is missing. "
2082
  "Please, check your PHP configuration.<br />"
2083
  msgstr ""
2084
 
2085
+ #: lib/environment/check.php:141
2086
  msgid ""
2087
  "PHP extension \"mbstring\" needed for All-In-One-Event-Calendar is missing. "
2088
  "Please, check your PHP configuration.<br />"
2089
  msgstr ""
2090
 
2091
+ #: lib/environment/check.php:251
2092
  msgid ""
2093
  "The add-on <strong>%s</strong> must be updated to at least version %s to "
2094
  "maintain compatibility with the core calendar."
2095
  msgstr ""
2096
 
2097
+ #: lib/environment/check.php:252
2098
  msgid ""
2099
  "If you do not see update notices below, ensure you have properly <a href="
2100
  "\"https://time.ly/document/user-guide/getting-started/license-keys/\" target="
2305
  "already displays the calendar."
2306
  msgstr ""
2307
 
2308
+ #: lib/import-export/ics.php:879
2309
  msgid "Tickets: "
2310
  msgstr ""
2311
 
2949
  msgid "Register this event with Eventbrite.com?"
2950
  msgstr ""
2951
 
2952
+ #: public/admin/box_eventbrite.php:12 public/admin/feed_row.php:50
2953
+ #: public/admin/feed_row.php:61 public/admin/feed_row.php:73
2954
+ #: public/admin/feed_row.php:85 public/admin/feed_row.php:98
2955
  msgid "Yes"
2956
  msgstr ""
2957
 
2958
+ #: public/admin/box_eventbrite.php:14 public/admin/feed_row.php:52
2959
+ #: public/admin/feed_row.php:63 public/admin/feed_row.php:75
2960
+ #: public/admin/feed_row.php:87 public/admin/feed_row.php:100
2961
  msgid "No"
2962
  msgstr ""
2963
 
3054
  msgstr ""
3055
 
3056
  #: public/admin/box_repeat.php:109
3057
+ #: public/admin/plugins/ics/import_feed.php:109
3058
  msgid "Please wait&#8230;"
3059
  msgstr ""
3060
 
3202
  msgid "Twice Daily"
3203
  msgstr ""
3204
 
3205
+ #: public/admin/feed_row.php:16 public/admin/plugins/ics/import_feed.php:41
3206
+ msgid "Feed URL:"
3207
  msgstr ""
3208
 
3209
+ #: public/admin/feed_row.php:31
3210
  msgid "Event categories:"
3211
  msgstr ""
3212
 
3213
+ #: public/admin/feed_row.php:38
3214
  msgid "Tag with"
3215
  msgstr ""
3216
 
3217
+ #: public/admin/feed_row.php:47
3218
  msgid "Allow comments"
3219
  msgstr ""
3220
 
3221
+ #: public/admin/feed_row.php:58
3222
  msgid "Show map"
3223
  msgstr ""
3224
 
3225
+ #: public/admin/feed_row.php:70
3226
  msgid "Keep original events categories and tags"
3227
  msgstr ""
3228
 
3229
+ #: public/admin/feed_row.php:82 public/admin/plugins/ics/import_feed.php:85
3230
  msgid ""
3231
  "On refresh, preserve previously imported events that are missing from the "
3232
  "feed"
3233
  msgstr ""
3234
 
3235
+ #: public/admin/feed_row.php:93 public/admin/plugins/ics/import_feed.php:92
3236
  msgid ""
3237
  "Guesses the time zone of events that have none specified; recommended for "
3238
  "Google Calendar feeds"
3239
  msgstr ""
3240
 
3241
+ #: public/admin/feed_row.php:94 public/admin/plugins/ics/import_feed.php:93
3242
  msgid "Assign default time zone to events in UTC"
3243
  msgstr ""
3244
 
3245
+ #: public/admin/feed_row.php:108
3246
+ msgid "List of imported events:"
3247
+ msgstr ""
3248
+
3249
+ #: public/admin/feed_row.php:119
3250
+ #: public/admin/plugins/suggested/event_actions.php:13
3251
+ msgid "Removing"
3252
+ msgstr ""
3253
+
3254
+ #: public/admin/feed_row.php:124 public/admin/feed_row.php:162
3255
+ #: public/admin/plugins/suggested/event_actions.php:18
3256
+ msgid "Remove"
3257
+ msgstr ""
3258
+
3259
+ #: public/admin/feed_row.php:142
3260
  msgid "Refreshing&#8230;"
3261
  msgstr ""
3262
 
3263
+ #: public/admin/feed_row.php:144
3264
  msgid "Refresh"
3265
  msgstr ""
3266
 
3267
+ #: public/admin/feed_row.php:160
3268
  msgid "Removing&#8230;"
3269
  msgstr ""
3270
 
 
 
 
 
3271
  #: public/admin/import.php:6
3272
  msgid "Successfully imported events:"
3273
  msgstr ""
3274
 
3275
+ #: public/admin/plugins/ics/display_feeds.php:6
3276
+ #: public/admin/plugins/ics/import_feed.php:6
3277
+ #: public/admin/plugins/suggested/display_feeds.php:6
3278
+ msgid "Please, Sign In to <b>Timely Network</b> to manage your feeds."
3279
+ msgstr ""
3280
+
3281
+ #: public/admin/plugins/ics/display_feeds.php:10
3282
+ #: public/admin/plugins/ics/import_feed.php:10
3283
+ #: public/admin/plugins/suggested/display_feeds.php:10
3284
+ msgid "Sign In to Timely Network"
3285
+ msgstr ""
3286
+
3287
+ #: public/admin/plugins/ics/display_feeds.php:22
3288
+ msgid ""
3289
+ "<b>Your feeds will be migrated at the next scheduled refresh (it can take up "
3290
+ "to one hour).</b><br />\n"
3291
+ "\t\tYou can't edit or remove them at the moment.\n"
3292
+ "\t\tPlease, visit this page later to manage your feeds."
3293
+ msgstr ""
3294
+
3295
+ #: public/admin/plugins/ics/display_feeds.php:33
3296
+ msgid "My imported Feeds:"
3297
+ msgstr ""
3298
+
3299
+ #: public/admin/plugins/ics/display_feeds.php:43
3300
+ msgid ""
3301
+ "My imported Events (click on the feed to see the individually imported "
3302
+ "events):"
3303
+ msgstr ""
3304
+
3305
+ #: public/admin/plugins/ics/import_feed.php:17
3306
  msgid ""
3307
+ "<b>You don't have a subscription for this feature.</b><br>\n"
3308
+ "\t\tPlease <a href=\"https://time.ly/pricing\">upgrade here</a> to a plan "
3309
+ "that\n"
3310
+ "\t\tsupports \"Import Feeds\"."
3311
  msgstr ""
3312
 
3313
+ #: public/admin/plugins/ics/import_feed.php:27
3314
+ msgid ""
3315
+ "<b>You have reached the limit of how many feeds you can import.</b><br>\n"
3316
+ "\t\tPlease <a href=\"https://time.ly/pricing\">upgrade here</a> to a plan "
3317
+ "that\n"
3318
+ "\t\tsupports more feeds."
3319
  msgstr ""
3320
 
3321
+ #: public/admin/plugins/ics/import_feed.php:63
3322
  msgid "Allow comments on imported events"
3323
  msgstr ""
3324
 
3325
+ #: public/admin/plugins/ics/import_feed.php:70
3326
  msgid "Show map on imported events"
3327
  msgstr ""
3328
 
3329
+ #: public/admin/plugins/ics/import_feed.php:77
3330
  msgid ""
3331
  "Import any tags/categories provided by feed, in addition those selected above"
3332
  msgstr ""
3333
 
3334
+ #: public/admin/plugins/ics/import_feed.php:112
3335
+ msgid "Import feed"
3336
+ msgstr ""
3337
+
3338
+ #: public/admin/plugins/ics/import_feed.php:115
3339
+ msgid "Update feed"
3340
+ msgstr ""
3341
+
3342
+ #: public/admin/plugins/suggested/display_feeds.php:17
3343
+ msgid "Find events matching:"
3344
+ msgstr ""
3345
+
3346
+ #: public/admin/plugins/suggested/display_feeds.php:22
3347
+ msgid "Located in:"
3348
+ msgstr ""
3349
+
3350
+ #: public/admin/plugins/suggested/display_feeds.php:29
3351
+ msgid "Search"
3352
+ msgstr ""
3353
+
3354
+ #: public/admin/plugins/suggested/display_feeds.php:40
3355
+ msgid " events found."
3356
+ msgstr ""
3357
+
3358
+ #: public/admin/plugins/suggested/display_feeds.php:42
3359
+ msgid "Update settings for the imported events in “My feeds” tab."
3360
+ msgstr ""
3361
+
3362
+ #: public/admin/plugins/suggested/display_feeds.php:47
3363
+ msgid "Map"
3364
+ msgstr ""
3365
+
3366
+ #: public/admin/plugins/suggested/display_feeds.php:50
3367
+ msgid "Both"
3368
+ msgstr ""
3369
+
3370
+ #: public/admin/plugins/suggested/display_feeds.php:53
3371
+ msgid "List"
3372
+ msgstr ""
3373
+
3374
+ #: public/admin/plugins/suggested/display_feeds.php:72
3375
+ #: public/admin/plugins/suggested/feeds_list.php:4
3376
+ msgid "No events found."
3377
+ msgstr ""
3378
+
3379
+ #: public/admin/plugins/suggested/display_feeds.php:75
3380
+ msgid "Please, modify your search criteria and try again."
3381
+ msgstr ""
3382
+
3383
+ #: public/admin/plugins/suggested/event_actions.php:5
3384
+ msgid "Import"
3385
  msgstr ""
3386
 
3387
+ #: public/admin/plugins/suggested/event_actions.php:9
3388
+ msgid "Importing"
3389
  msgstr ""
3390
 
3391
  #: public/admin/row_custom.php:3
lib/bootstrap/loader-map.php CHANGED
@@ -12,6 +12,20 @@
12
  'i' => 'g',
13
  'r' => 'y',
14
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  'Ai1ec_Abstract_Query' =>
16
  array (
17
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'http' . DIRECTORY_SEPARATOR . 'request' . DIRECTORY_SEPARATOR . 'abstract.php',
@@ -57,6 +71,13 @@
57
  'i' => 'g',
58
  'r' => 'y',
59
  ),
 
 
 
 
 
 
 
60
  'Ai1ec_Api_Registration' =>
61
  array (
62
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'model' . DIRECTORY_SEPARATOR . 'api' . DIRECTORY_SEPARATOR . 'api-registration.php',
@@ -939,6 +960,13 @@
939
  'i' => 'n',
940
  'r' => 'y',
941
  ),
 
 
 
 
 
 
 
942
  'Ai1ec_Html_Setting_Html' =>
943
  array (
944
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'html' . DIRECTORY_SEPARATOR . 'element' . DIRECTORY_SEPARATOR . 'setting' . DIRECTORY_SEPARATOR . 'html.php',
@@ -3146,6 +3174,12 @@
3146
  'c' => '__TwigTemplate_eeeaebb8da9bb78c051017293e6e38b7b9b5b9ce2693c48fc571b498eaf0027d',
3147
  'i' => 'g',
3148
  ),
 
 
 
 
 
 
3149
  '__TwigTemplate_f33591d24d07f386c1027eeea2cbf1deffececd4acae7346e2c250942cfcff65' =>
3150
  array (
3151
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'f3' . DIRECTORY_SEPARATOR . '35' . DIRECTORY_SEPARATOR . '91d24d07f386c1027eeea2cbf1deffececd4acae7346e2c250942cfcff65.php',
@@ -3293,6 +3327,20 @@
3293
  'i' => 'g',
3294
  'r' => 'y',
3295
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3296
  'calendar.state' =>
3297
  array (
3298
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'calendar' . DIRECTORY_SEPARATOR . 'state.php',
@@ -3883,6 +3931,13 @@
3883
  'i' => 'n',
3884
  'r' => 'y',
3885
  ),
 
 
 
 
 
 
 
3886
  'html.element.setting.enabled-views' =>
3887
  array (
3888
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'html' . DIRECTORY_SEPARATOR . 'element' . DIRECTORY_SEPARATOR . 'setting' . DIRECTORY_SEPARATOR . 'enabled-views.php',
@@ -4142,6 +4197,13 @@
4142
  'c' => 'iCalcnv',
4143
  'i' => 'g',
4144
  ),
 
 
 
 
 
 
 
4145
  'import-export.exception' =>
4146
  array (
4147
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'import-export' . DIRECTORY_SEPARATOR . 'exception.php',
@@ -6070,6 +6132,12 @@
6070
  'c' => 'Ai1ec_Twig_Environment',
6071
  'i' => 'g',
6072
  ),
 
 
 
 
 
 
6073
  'twig.f3.35.91d24d07f386c1027eeea2cbf1deffececd4acae7346e2c250942cfcff65' =>
6074
  array (
6075
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'f3' . DIRECTORY_SEPARATOR . '35' . DIRECTORY_SEPARATOR . '91d24d07f386c1027eeea2cbf1deffececd4acae7346e2c250942cfcff65.php',
12
  'i' => 'g',
13
  'r' => 'y',
14
  ),
15
+ 'Ai1ecImportConnectorPlugin' =>
16
+ array (
17
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'calendar-feed' . DIRECTORY_SEPARATOR . 'import.php',
18
+ 'c' => 'Ai1ecImportConnectorPlugin',
19
+ 'i' => 'g',
20
+ 'r' => 'y',
21
+ ),
22
+ 'Ai1ecSuggestedConnectorPlugin' =>
23
+ array (
24
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'calendar-feed' . DIRECTORY_SEPARATOR . 'suggested.php',
25
+ 'c' => 'Ai1ecSuggestedConnectorPlugin',
26
+ 'i' => 'g',
27
+ 'r' => 'y',
28
+ ),
29
  'Ai1ec_Abstract_Query' =>
30
  array (
31
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'http' . DIRECTORY_SEPARATOR . 'request' . DIRECTORY_SEPARATOR . 'abstract.php',
71
  'i' => 'g',
72
  'r' => 'y',
73
  ),
74
+ 'Ai1ec_Api_Ics_Import_Export_Engine' =>
75
+ array (
76
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'import-export' . DIRECTORY_SEPARATOR . 'api-ics.php',
77
+ 'c' => 'Ai1ec_Api_Ics_Import_Export_Engine',
78
+ 'i' => 'g',
79
+ 'r' => 'y',
80
+ ),
81
  'Ai1ec_Api_Registration' =>
82
  array (
83
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'model' . DIRECTORY_SEPARATOR . 'api' . DIRECTORY_SEPARATOR . 'api-registration.php',
960
  'i' => 'n',
961
  'r' => 'y',
962
  ),
963
+ 'Ai1ec_Html_Setting_Custom' =>
964
+ array (
965
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'html' . DIRECTORY_SEPARATOR . 'element' . DIRECTORY_SEPARATOR . 'setting' . DIRECTORY_SEPARATOR . 'custom.php',
966
+ 'c' => 'Ai1ec_Html_Setting_Custom',
967
+ 'i' => 'n',
968
+ 'r' => 'y',
969
+ ),
970
  'Ai1ec_Html_Setting_Html' =>
971
  array (
972
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'html' . DIRECTORY_SEPARATOR . 'element' . DIRECTORY_SEPARATOR . 'setting' . DIRECTORY_SEPARATOR . 'html.php',
3174
  'c' => '__TwigTemplate_eeeaebb8da9bb78c051017293e6e38b7b9b5b9ce2693c48fc571b498eaf0027d',
3175
  'i' => 'g',
3176
  ),
3177
+ '__TwigTemplate_f0915421eb30386d27f75f584e4cc07ba290c43e8fc2c085f751b0c25ad606bb' =>
3178
+ array (
3179
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'f0' . DIRECTORY_SEPARATOR . '91' . DIRECTORY_SEPARATOR . '5421eb30386d27f75f584e4cc07ba290c43e8fc2c085f751b0c25ad606bb.php',
3180
+ 'c' => '__TwigTemplate_f0915421eb30386d27f75f584e4cc07ba290c43e8fc2c085f751b0c25ad606bb',
3181
+ 'i' => 'g',
3182
+ ),
3183
  '__TwigTemplate_f33591d24d07f386c1027eeea2cbf1deffececd4acae7346e2c250942cfcff65' =>
3184
  array (
3185
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'f3' . DIRECTORY_SEPARATOR . '35' . DIRECTORY_SEPARATOR . '91d24d07f386c1027eeea2cbf1deffececd4acae7346e2c250942cfcff65.php',
3327
  'i' => 'g',
3328
  'r' => 'y',
3329
  ),
3330
+ 'calendar-feed.import' =>
3331
+ array (
3332
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'calendar-feed' . DIRECTORY_SEPARATOR . 'import.php',
3333
+ 'c' => 'Ai1ecImportConnectorPlugin',
3334
+ 'i' => 'g',
3335
+ 'r' => 'y',
3336
+ ),
3337
+ 'calendar-feed.suggested' =>
3338
+ array (
3339
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'calendar-feed' . DIRECTORY_SEPARATOR . 'suggested.php',
3340
+ 'c' => 'Ai1ecSuggestedConnectorPlugin',
3341
+ 'i' => 'g',
3342
+ 'r' => 'y',
3343
+ ),
3344
  'calendar.state' =>
3345
  array (
3346
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'calendar' . DIRECTORY_SEPARATOR . 'state.php',
3931
  'i' => 'n',
3932
  'r' => 'y',
3933
  ),
3934
+ 'html.element.setting.custom' =>
3935
+ array (
3936
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'html' . DIRECTORY_SEPARATOR . 'element' . DIRECTORY_SEPARATOR . 'setting' . DIRECTORY_SEPARATOR . 'custom.php',
3937
+ 'c' => 'Ai1ec_Html_Setting_Custom',
3938
+ 'i' => 'n',
3939
+ 'r' => 'y',
3940
+ ),
3941
  'html.element.setting.enabled-views' =>
3942
  array (
3943
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'html' . DIRECTORY_SEPARATOR . 'element' . DIRECTORY_SEPARATOR . 'setting' . DIRECTORY_SEPARATOR . 'enabled-views.php',
4197
  'c' => 'iCalcnv',
4198
  'i' => 'g',
4199
  ),
4200
+ 'import-export.api-ics' =>
4201
+ array (
4202
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'import-export' . DIRECTORY_SEPARATOR . 'api-ics.php',
4203
+ 'c' => 'Ai1ec_Api_Ics_Import_Export_Engine',
4204
+ 'i' => 'g',
4205
+ 'r' => 'y',
4206
+ ),
4207
  'import-export.exception' =>
4208
  array (
4209
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'import-export' . DIRECTORY_SEPARATOR . 'exception.php',
6132
  'c' => 'Ai1ec_Twig_Environment',
6133
  'i' => 'g',
6134
  ),
6135
+ 'twig.f0.91.5421eb30386d27f75f584e4cc07ba290c43e8fc2c085f751b0c25ad606bb' =>
6136
+ array (
6137
+ 'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'f0' . DIRECTORY_SEPARATOR . '91' . DIRECTORY_SEPARATOR . '5421eb30386d27f75f584e4cc07ba290c43e8fc2c085f751b0c25ad606bb.php',
6138
+ 'c' => '__TwigTemplate_f0915421eb30386d27f75f584e4cc07ba290c43e8fc2c085f751b0c25ad606bb',
6139
+ 'i' => 'g',
6140
+ ),
6141
  'twig.f3.35.91d24d07f386c1027eeea2cbf1deffececd4acae7346e2c250942cfcff65' =>
6142
  array (
6143
  'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'f3' . DIRECTORY_SEPARATOR . '35' . DIRECTORY_SEPARATOR . '91d24d07f386c1027eeea2cbf1deffececd4acae7346e2c250942cfcff65.php',
lib/calendar-feed/ics.php CHANGED
@@ -34,8 +34,10 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
34
  */
35
  protected $_xguard = null;
36
 
 
 
37
  public function get_tab_title() {
38
- return Ai1ec_I18n::__( 'ICS' );
39
  }
40
 
41
  public function __construct( Ai1ec_Registry_Object $registry ) {
@@ -45,6 +47,7 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
45
  // Install the CRON
46
  $this->install_cron();
47
  $this->_xguard = $registry->get( 'compatibility.xguard' );
 
48
  }
49
 
50
  /**
@@ -101,60 +104,80 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
101
  'SELECT * FROM ' . $table_name . ' WHERE feed_id = %d', $feed_id
102
  )
103
  );
 
 
104
  $output = array();
 
105
  if ( $feed ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
106
 
107
- $count = 0;
108
- $message = false;
109
- // reimport the feed
110
- $response = wp_remote_get(
111
- $feed->feed_url,
112
- array( 'sslverify' => false, 'timeout' => 120 )
113
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
 
115
- if (
116
- ! is_wp_error( $response ) &&
117
- isset( $response['response'] ) &&
118
- isset( $response['response']['code'] ) &&
119
- $response['response']['code'] == 200 &&
120
- isset( $response['body'] ) &&
121
- ! empty( $response['body'] )
122
- ) {
123
  try {
 
124
 
125
- $import_export = $this->_registry->get(
126
- 'controller.import-export'
127
- );
128
 
129
- $search = $this->_registry->get( 'model.search' );
130
- $events_in_db = $search->get_event_ids_for_feed( $feed->feed_url );
131
  // flip the array. We will use keys to check events which are imported.
132
- $events_in_db = array_flip( $events_in_db );
133
- $args = array();
134
- $args['events_in_db'] = $events_in_db;
135
- $args['feed'] = $feed;
136
-
137
- $args['comment_status'] = 'open';
138
- if (
139
- isset( $feed->comments_enabled ) &&
140
- $feed->comments_enabled < 1
141
- ) {
142
  $args['comment_status'] = 'closed';
143
  }
144
 
145
- $args['do_show_map'] = 0;
146
- if (
147
- isset( $feed->map_display_enabled ) &&
148
- $feed->map_display_enabled > 0
149
- ) {
150
- $args['do_show_map'] = 1;
151
  }
152
- $args['source'] = $response['body'];
153
  do_action( 'ai1ec_ics_before_import', $args );
154
- $result = $import_export->import_events( 'ics', $args );
 
 
155
  do_action( 'ai1ec_ics_after_import' );
156
- $count = $result['count'];
157
- $feed_name = ! empty( $result['name'][1] ) ? $result['name'][1] : $feed->feed_url;
158
  // we must flip again the array to iterate over it
159
  if ( 0 == $feed->keep_old_events ) {
160
  $events_to_delete = array_flip( $result['events_to_delete'] );
@@ -162,26 +185,9 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
162
  wp_delete_post( $event_id, true );
163
  }
164
  }
165
- } catch ( Ai1ec_Parse_Exception $e ) {
166
- $message = "The provided feed didn't return valid ics data";
167
- } catch ( Ai1ec_Engine_Not_Set_Exception $e ) {
168
- $message = "ICS import is not supported on this install.";
169
- } catch ( Ai1ec_Event_Create_Exception $e ) {
170
  $message = $e->getMessage();
171
  }
172
- } else if ( is_wp_error( $response ) ) {
173
- $message = sprintf(
174
- __(
175
- 'A system error has prevented calendar data from being fetched. Something is preventing the plugin from functioning correctly. This message should provide a clue: %s',
176
- AI1EC_PLUGIN_NAME
177
- ),
178
- $response->get_error_message()
179
- );
180
- } else {
181
- $message = __(
182
- "Calendar data could not be fetched. If your URL is valid and contains an iCalendar resource, this is likely the result of a temporary server error and time may resolve this issue",
183
- AI1EC_PLUGIN_NAME
184
- );
185
  }
186
  if ( $message ) {
187
  // If we already got an error message, display it.
@@ -202,6 +208,7 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
202
  'message' => __( 'Invalid ICS feed ID', AI1EC_PLUGIN_NAME )
203
  );
204
  }
 
205
  $output['data']['ics_id'] = $feed_id;
206
  return $output;
207
  }
@@ -294,6 +301,10 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
294
  * @return void
295
  */
296
  public function cron() {
 
 
 
 
297
  $db = $this->_registry->get( 'dbi.dbi' );
298
  // Initializing custom post type and custom taxonomies
299
  $post_type = $this->_registry->get( 'post.custom-type' );
@@ -336,9 +347,10 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
336
  // Render the opening div
337
  $this->render_opening_div_of_tab();
338
  // Render the body of the tab
339
- $settings = $this->_registry->get( 'model.settings' );
340
-
341
- $factory = $this->_registry->get(
 
342
  'factory.html'
343
  );
344
  $select2_cats = $factory->create_select2_multiselect(
@@ -360,7 +372,7 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
360
  )
361
  );
362
  $select2_tags = $factory->create_select2_input(
363
- array( 'id' => 'ai1ec_feed_tags')
364
  );
365
  $modal = $this->_registry->get(
366
  'html.element.legacy.bootstrap.modal',
@@ -386,12 +398,19 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
386
  true
387
  );
388
 
389
- $args = array(
 
 
 
 
390
  'cron_freq' => $cron_freq->get_content(),
391
  'event_categories' => $select2_cats,
392
  'event_tags' => $select2_tags,
393
- 'feed_rows' => $this->_get_feed_rows(),
 
394
  'modal' => $modal,
 
 
395
  );
396
 
397
  $display_feeds = $loader->get_file(
@@ -410,7 +429,7 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
410
  *
411
  * @return String feed rows
412
  **/
413
- protected function _get_feed_rows() {
414
  // Select all added feeds
415
  $rows = $this->_registry->get( 'dbi.dbi' )->select(
416
  'ai1ec_event_feeds',
@@ -424,14 +443,27 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
424
  'map_display_enabled',
425
  'keep_tags_categories',
426
  'keep_old_events',
427
- 'import_timezone',
428
  )
429
  );
430
 
431
- $html = '';
432
- $theme_loader = $this->_registry->get( 'theme.loader' );
 
 
 
 
433
 
434
  foreach ( $rows as $row ) {
 
 
 
 
 
 
 
 
 
435
  $feed_categories = explode( ',', $row->feed_category );
436
  $categories = array();
437
 
@@ -446,20 +478,32 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
446
  }
447
  unset( $feed_categories );
448
 
 
 
 
 
 
 
 
 
 
 
 
449
  $args = array(
450
- 'feed_url' => $row->feed_url,
451
- 'feed_name' => ! empty( $row->feed_name ) ? $row->feed_name : $row->feed_url,
452
- 'event_category' => implode( ', ', $categories ),
453
- 'categories_ids' => $row->feed_category,
454
- 'tags' => stripslashes(
 
455
  str_replace( ',', ', ', $row->feed_tags )
456
  ),
457
- 'tags_ids' => $row->feed_tags,
458
- 'feed_id' => $row->feed_id,
459
- 'comments_enabled' => (bool) intval(
460
  $row->comments_enabled
461
  ),
462
- 'map_display_enabled' => (bool) intval(
463
  $row->map_display_enabled
464
  ),
465
  'keep_tags_categories' => (bool) intval(
@@ -469,16 +513,18 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
469
  $row->keep_old_events
470
  ),
471
  'feed_import_timezone' => (bool) intval(
472
- $row->import_timezone
473
  ),
 
 
474
  );
475
  $html .= $theme_loader->get_file( 'feed_row.php', $args, true )
476
  ->get_content();
477
  }
478
 
479
-
480
  return $html;
481
  }
 
482
  /**
483
  * (non-PHPdoc)
484
  *
@@ -487,6 +533,7 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
487
  public function display_admin_notices() {
488
  return;
489
  }
 
490
  /**
491
  * (non-PHPdoc)
492
  *
@@ -518,14 +565,21 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
518
  if ( ! current_user_can( 'manage_ai1ec_feeds' ) ) {
519
  wp_die( Ai1ec_I18n::__( 'Oh, submission was not accepted.' ) );
520
  }
 
 
 
521
  $db = $this->_registry->get( 'dbi.dbi' );
522
  $table_name = $db->get_table_name( 'ai1ec_event_feeds' );
523
 
524
  $feed_categories = empty( $_REQUEST['feed_category'] ) ? '' : implode(
525
  ',', $_REQUEST['feed_category'] );
 
 
 
 
 
526
  $entry = array(
527
  'feed_url' => $_REQUEST['feed_url'],
528
- 'feed_name' => $_REQUEST['feed_url'],
529
  'feed_category' => $feed_categories,
530
  'feed_tags' => $_REQUEST['feed_tags'],
531
  'comments_enabled' => Ai1ec_Primitive_Int::db_bool(
@@ -537,17 +591,31 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
537
  'keep_tags_categories' => Ai1ec_Primitive_Int::db_bool(
538
  $_REQUEST['keep_tags_categories']
539
  ),
540
- 'keep_old_events' => Ai1ec_Primitive_Int::db_bool(
541
  $_REQUEST['keep_old_events']
542
  ),
543
- 'import_timezone' => Ai1ec_Primitive_Int::db_bool(
544
  $_REQUEST['feed_import_timezone']
545
- ),
546
- );
547
- $entry = apply_filters( 'ai1ec_ics_feed_entry', $entry );
548
- $json_strategy = $this->_registry->get(
549
- 'http.response.render.strategy.json'
550
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
551
  if ( is_wp_error( $entry ) ) {
552
  $output = array(
553
  'error' => true,
@@ -556,9 +624,11 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
556
  return $json_strategy->render( array( 'data' => $output ) );
557
  }
558
 
559
- $format = array( '%s', '%s', '%s', '%s', '%d', '%d', '%d', '%d', '%d' );
 
560
  if ( ! empty( $_REQUEST['feed_id'] ) ) {
561
  $feed_id = $_REQUEST['feed_id'];
 
562
  $db->update(
563
  $table_name,
564
  $entry,
@@ -573,18 +643,8 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
573
  do_action( 'ai1ec_ics_feed_added', $feed_id, $entry );
574
 
575
  $update = $this->update_ics_feed( $feed_id );
576
- if ( $update['data']['error'] ) {
577
- $this->delete_ics_feed( false, $feed_id );
578
- return $json_strategy->render( $update );
579
- }
580
  $feed_name = $update['data']['name'];
581
- $db->update(
582
- $table_name,
583
- array(
584
- 'feed_name' => $feed_name
585
- ),
586
- array( 'feed_id' => $feed_id )
587
- );
588
 
589
  $cat_ids = '';
590
  if ( ! empty( $_REQUEST['feed_category'] ) ) {
@@ -598,6 +658,7 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
598
  $args = array(
599
  'feed_url' => $_REQUEST['feed_url'],
600
  'feed_name' => $feed_name,
 
601
  'event_category' => implode( ', ', $categories ),
602
  'categories_ids' => $cat_ids,
603
  'tags' => str_replace(
@@ -617,12 +678,13 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
617
  'keep_tags_categories' => (bool) intval(
618
  $_REQUEST['keep_tags_categories']
619
  ),
620
- 'keep_old_events' => (bool) intval(
621
  $_REQUEST['keep_old_events']
622
  ),
623
  'feed_import_timezone' => (bool) intval(
624
  $_REQUEST['feed_import_timezone']
625
  ),
 
626
  );
627
 
628
  // Display added feed row.
@@ -712,6 +774,7 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
712
  return $output;
713
  }
714
  }
 
715
  /**
716
  * delete_ics_feed function
717
  *
@@ -728,8 +791,25 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
728
  $ics_id = (int) $_REQUEST['ics_id'];
729
  }
730
  $table_name = $db->get_table_name( 'ai1ec_event_feeds' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
731
  $db->query( $db->prepare( "DELETE FROM {$table_name} WHERE feed_id = %d", $ics_id ) );
732
  do_action( 'ai1ec_ics_feed_deleted', $ics_id );
 
733
  $output = array(
734
  'error' => false,
735
  'message' => __( 'Feed deleted', AI1EC_PLUGIN_NAME ),
@@ -743,6 +823,162 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
743
  }
744
  }
745
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
746
  /**
747
  * Get name to use for import locking via xguard.
748
  *
@@ -753,4 +989,35 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
753
  protected function _import_lock_name( $feed_id ) {
754
  return 'ics_import_' . (int)$feed_id;
755
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
756
  }
34
  */
35
  protected $_xguard = null;
36
 
37
+ protected $_api_feed = null;
38
+
39
  public function get_tab_title() {
40
+ return Ai1ec_I18n::__( 'My Feeds' );
41
  }
42
 
43
  public function __construct( Ai1ec_Registry_Object $registry ) {
47
  // Install the CRON
48
  $this->install_cron();
49
  $this->_xguard = $registry->get( 'compatibility.xguard' );
50
+ $this->_api_feed = $registry->get( 'model.api.api-feeds' );
51
  }
52
 
53
  /**
104
  'SELECT * FROM ' . $table_name . ' WHERE feed_id = %d', $feed_id
105
  )
106
  );
107
+
108
+ $message = '';
109
  $output = array();
110
+
111
  if ( $feed ) {
112
+ // Migrate manually imported feed URLs to API
113
+ if ( ! is_numeric( $feed->feed_name ) ) {
114
+ // Build array with feed options
115
+ $entry = array(
116
+ 'feed_url' => $feed->feed_url,
117
+ 'feed_category' => $feed->feed_category,
118
+ 'feed_tags' => $feed->feed_tags,
119
+ 'comments_enabled' => $feed->comments_enabled,
120
+ 'map_display_enabled' => $feed->map_display_enabled,
121
+ 'keep_tags_categories' => $feed->keep_tags_categories,
122
+ 'keep_old_events' => $feed->keep_old_events,
123
+ 'import_timezone' => $feed->import_timezone
124
+ );
125
 
126
+ // Import to API
127
+ try {
128
+ $response = $this->_api_feed->import_feed( $entry );
129
+
130
+ $api_feed = $this->_api_feed;
131
+
132
+ $db->update(
133
+ $table_name,
134
+ array(
135
+ 'feed_name' => $response->id
136
+ ),
137
+ array(
138
+ 'feed_id' => $feed_id
139
+ )
140
+ );
141
+ // Set ID
142
+ $feed->feed_name = $response->id;
143
+ } catch ( Exception $e ) {
144
+ $message = $e->getMessage();
145
+ }
146
+ }
147
+ // Only process if we have the API feed ID
148
+ if ( is_numeric( $feed->feed_name ) ) {
149
+ $count = 0;
150
 
 
 
 
 
 
 
 
 
151
  try {
152
+ $response = $this->_api_feed->get_feed( $feed->feed_name );
153
 
154
+ $import_export = $this->_registry->get( 'controller.import-export' );
 
 
155
 
156
+ $search = $this->_registry->get( 'model.search' );
157
+ $events_in_db = $search->get_event_ids_for_feed( $feed->feed_url );
158
  // flip the array. We will use keys to check events which are imported.
159
+ $events_in_db = array_flip( $events_in_db );
160
+ $args = array();
161
+ $args['events_in_db'] = $events_in_db;
162
+ $args['feed'] = $feed;
163
+
164
+ $args['comment_status'] = 'open';
165
+ if ( isset( $feed->comments_enabled ) && $feed->comments_enabled < 1 ) {
 
 
 
166
  $args['comment_status'] = 'closed';
167
  }
168
 
169
+ $args['do_show_map'] = 0;
170
+ if ( isset( $feed->map_display_enabled ) && $feed->map_display_enabled > 0 ) {
171
+ $args['do_show_map'] = 1;
 
 
 
172
  }
173
+ $args['source'] = $response;
174
  do_action( 'ai1ec_ics_before_import', $args );
175
+
176
+ $result = $import_export->import_events( 'api-ics', $args );
177
+
178
  do_action( 'ai1ec_ics_after_import' );
179
+ $count = $result['count'];
180
+ $feed_name = $result['name'];
181
  // we must flip again the array to iterate over it
182
  if ( 0 == $feed->keep_old_events ) {
183
  $events_to_delete = array_flip( $result['events_to_delete'] );
185
  wp_delete_post( $event_id, true );
186
  }
187
  }
188
+ } catch ( Exception $e ) {
 
 
 
 
189
  $message = $e->getMessage();
190
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
191
  }
192
  if ( $message ) {
193
  // If we already got an error message, display it.
208
  'message' => __( 'Invalid ICS feed ID', AI1EC_PLUGIN_NAME )
209
  );
210
  }
211
+
212
  $output['data']['ics_id'] = $feed_id;
213
  return $output;
214
  }
301
  * @return void
302
  */
303
  public function cron() {
304
+ if ( false === $this->_api_feed->is_signed() ) {
305
+ return;
306
+ }
307
+
308
  $db = $this->_registry->get( 'dbi.dbi' );
309
  // Initializing custom post type and custom taxonomies
310
  $post_type = $this->_registry->get( 'post.custom-type' );
347
  // Render the opening div
348
  $this->render_opening_div_of_tab();
349
  // Render the body of the tab
350
+ $api_feed = $this->_api_feed;
351
+ $api_signed = $api_feed->is_signed();
352
+ $settings = $this->_registry->get( 'model.settings' );
353
+ $factory = $this->_registry->get(
354
  'factory.html'
355
  );
356
  $select2_cats = $factory->create_select2_multiselect(
372
  )
373
  );
374
  $select2_tags = $factory->create_select2_input(
375
+ array( 'id' => 'ai1ec_feed_tags' )
376
  );
377
  $modal = $this->_registry->get(
378
  'html.element.legacy.bootstrap.modal',
398
  true
399
  );
400
 
401
+ $db = $this->_registry->get( 'dbi.dbi' );
402
+ $table_name = $db->get_table_name( 'ai1ec_event_feeds' );
403
+ $sql = "SELECT COUNT(*) FROM $table_name WHERE $table_name.feed_name REGEXP '[a-zA-Z]+'";
404
+ $local_feeds = $db->get_var( $sql );
405
+ $args = array(
406
  'cron_freq' => $cron_freq->get_content(),
407
  'event_categories' => $select2_cats,
408
  'event_tags' => $select2_tags,
409
+ 'feed_rows' => $this->_get_feed_rows( $api_feed::FEED_API_ALL_EVENTS_CODE ),
410
+ 'single_feed_rows' => $this->_get_feed_rows( $api_feed::FEED_API_SOME_EVENTS_CODE ),
411
  'modal' => $modal,
412
+ 'api_signed' => $api_signed,
413
+ 'migration' => $api_signed && 0 < $local_feeds
414
  );
415
 
416
  $display_feeds = $loader->get_file(
429
  *
430
  * @return String feed rows
431
  **/
432
+ protected function _get_feed_rows( $feed_status ) {
433
  // Select all added feeds
434
  $rows = $this->_registry->get( 'dbi.dbi' )->select(
435
  'ai1ec_event_feeds',
443
  'map_display_enabled',
444
  'keep_tags_categories',
445
  'keep_old_events',
446
+ 'import_timezone'
447
  )
448
  );
449
 
450
+ $html = '';
451
+ $theme_loader = $this->_registry->get( 'theme.loader' );
452
+ $api_feed = $this->_api_feed;
453
+ $api_signed = $api_feed->is_signed();
454
+ // Get list of subscriptions
455
+ $api_subscriptions = $api_feed->get_feed_subscriptions();
456
 
457
  foreach ( $rows as $row ) {
458
+ $row_feed_status = $this->getFeedStatus( $row->feed_name );
459
+
460
+ // If the status of the feed is different from requested, skip
461
+ if ( $api_feed::FEED_API_ALL_EVENTS_CODE === $feed_status && $row_feed_status === $api_feed::FEED_API_SOME_EVENTS_CODE ) {
462
+ continue;
463
+ } else if ( $api_feed::FEED_API_SOME_EVENTS_CODE === $feed_status && $feed_status !== $row_feed_status ) {
464
+ continue;
465
+ }
466
+
467
  $feed_categories = explode( ',', $row->feed_category );
468
  $categories = array();
469
 
478
  }
479
  unset( $feed_categories );
480
 
481
+ // Get event UIDs
482
+ $feed_events_uids = array();
483
+ if ( $api_feed::FEED_API_SOME_EVENTS_CODE === $feed_status ) {
484
+ foreach ( $api_subscriptions as $api_subscription ) {
485
+ if ( $api_subscription->feed_id === $row->feed_name ) {
486
+ $feed_events_uids = (array) $api_subscription->feed_events_uids;
487
+ break;
488
+ }
489
+ }
490
+ }
491
+
492
  $args = array(
493
+ 'feed_url' => $row->feed_url,
494
+ 'feed_name' => ! empty( $row->feed_name ) ? $row->feed_name : $row->feed_url,
495
+ 'feed_events_uids' => $feed_events_uids,
496
+ 'event_category' => implode( ', ', $categories ),
497
+ 'categories_ids' => $row->feed_category,
498
+ 'tags' => stripslashes(
499
  str_replace( ',', ', ', $row->feed_tags )
500
  ),
501
+ 'tags_ids' => $row->feed_tags,
502
+ 'feed_id' => $row->feed_id,
503
+ 'comments_enabled' => (bool) intval(
504
  $row->comments_enabled
505
  ),
506
+ 'map_display_enabled' => (bool) intval(
507
  $row->map_display_enabled
508
  ),
509
  'keep_tags_categories' => (bool) intval(
513
  $row->keep_old_events
514
  ),
515
  'feed_import_timezone' => (bool) intval(
516
+ $row->import_timezone
517
  ),
518
+ 'feed_status' => $row_feed_status,
519
+ 'api_signed' => $api_signed,
520
  );
521
  $html .= $theme_loader->get_file( 'feed_row.php', $args, true )
522
  ->get_content();
523
  }
524
 
 
525
  return $html;
526
  }
527
+
528
  /**
529
  * (non-PHPdoc)
530
  *
533
  public function display_admin_notices() {
534
  return;
535
  }
536
+
537
  /**
538
  * (non-PHPdoc)
539
  *
565
  if ( ! current_user_can( 'manage_ai1ec_feeds' ) ) {
566
  wp_die( Ai1ec_I18n::__( 'Oh, submission was not accepted.' ) );
567
  }
568
+
569
+ $api_feed = $this->_api_feed;
570
+
571
  $db = $this->_registry->get( 'dbi.dbi' );
572
  $table_name = $db->get_table_name( 'ai1ec_event_feeds' );
573
 
574
  $feed_categories = empty( $_REQUEST['feed_category'] ) ? '' : implode(
575
  ',', $_REQUEST['feed_category'] );
576
+
577
+ $json_strategy = $this->_registry->get(
578
+ 'http.response.render.strategy.json'
579
+ );
580
+
581
  $entry = array(
582
  'feed_url' => $_REQUEST['feed_url'],
 
583
  'feed_category' => $feed_categories,
584
  'feed_tags' => $_REQUEST['feed_tags'],
585
  'comments_enabled' => Ai1ec_Primitive_Int::db_bool(
591
  'keep_tags_categories' => Ai1ec_Primitive_Int::db_bool(
592
  $_REQUEST['keep_tags_categories']
593
  ),
594
+ 'keep_old_events' => Ai1ec_Primitive_Int::db_bool(
595
  $_REQUEST['keep_old_events']
596
  ),
597
+ 'import_timezone' => Ai1ec_Primitive_Int::db_bool(
598
  $_REQUEST['feed_import_timezone']
599
+ )
 
 
 
 
600
  );
601
+
602
+ // Import to the API
603
+ $api_signed = $this->_api_feed->is_signed();
604
+ try {
605
+ $response = $this->_api_feed->import_feed( $entry );
606
+ } catch ( Exception $e ) {
607
+ $output = array(
608
+ 'error' => true,
609
+ 'message' => $e->getMessage()
610
+ );
611
+ return $json_strategy->render( array( 'data' => $output ) );
612
+ }
613
+
614
+ // Get API feed ID
615
+ $entry['feed_name'] = $response->id;
616
+
617
+ $entry = apply_filters( 'ai1ec_ics_feed_entry', $entry );
618
+
619
  if ( is_wp_error( $entry ) ) {
620
  $output = array(
621
  'error' => true,
624
  return $json_strategy->render( array( 'data' => $output ) );
625
  }
626
 
627
+ $format = array( '%s', '%s', '%s', '%d', '%d', '%d', '%d', '%d', '%s' );
628
+
629
  if ( ! empty( $_REQUEST['feed_id'] ) ) {
630
  $feed_id = $_REQUEST['feed_id'];
631
+
632
  $db->update(
633
  $table_name,
634
  $entry,
643
  do_action( 'ai1ec_ics_feed_added', $feed_id, $entry );
644
 
645
  $update = $this->update_ics_feed( $feed_id );
646
+
 
 
 
647
  $feed_name = $update['data']['name'];
 
 
 
 
 
 
 
648
 
649
  $cat_ids = '';
650
  if ( ! empty( $_REQUEST['feed_category'] ) ) {
658
  $args = array(
659
  'feed_url' => $_REQUEST['feed_url'],
660
  'feed_name' => $feed_name,
661
+ 'feed_events_uids' => array(),
662
  'event_category' => implode( ', ', $categories ),
663
  'categories_ids' => $cat_ids,
664
  'tags' => str_replace(
678
  'keep_tags_categories' => (bool) intval(
679
  $_REQUEST['keep_tags_categories']
680
  ),
681
+ 'keep_old_events' => (bool) intval(
682
  $_REQUEST['keep_old_events']
683
  ),
684
  'feed_import_timezone' => (bool) intval(
685
  $_REQUEST['feed_import_timezone']
686
  ),
687
+ 'api_signed' => $api_signed,
688
  );
689
 
690
  // Display added feed row.
774
  return $output;
775
  }
776
  }
777
+
778
  /**
779
  * delete_ics_feed function
780
  *
791
  $ics_id = (int) $_REQUEST['ics_id'];
792
  }
793
  $table_name = $db->get_table_name( 'ai1ec_event_feeds' );
794
+ // Get API feed ID
795
+ $feed_id = $db->get_var(
796
+ $db->prepare(
797
+ 'SELECT feed_name FROM ' . $table_name .
798
+ ' WHERE feed_id = %d',
799
+ $ics_id
800
+ )
801
+ );
802
+
803
+ // Unsubscribe in API
804
+ try {
805
+ $this->_api_feed->unsubscribe_feed( $feed_id );
806
+ } catch ( Exception $e ) {
807
+ }
808
+
809
+ // Delete from database
810
  $db->query( $db->prepare( "DELETE FROM {$table_name} WHERE feed_id = %d", $ics_id ) );
811
  do_action( 'ai1ec_ics_feed_deleted', $ics_id );
812
+
813
  $output = array(
814
  'error' => false,
815
  'message' => __( 'Feed deleted', AI1EC_PLUGIN_NAME ),
823
  }
824
  }
825
 
826
+
827
+ /**
828
+ * Adds discover event feed to the database
829
+ *
830
+ * @return string JSON output
831
+ *
832
+ */
833
+ public function add_discover_events_feed_subscription() {
834
+ if ( ! current_user_can( 'manage_ai1ec_feeds' ) ) {
835
+ wp_die( Ai1ec_I18n::__( 'Oh, submission was not accepted.' ) );
836
+ }
837
+
838
+ $feed_id = $_POST['ai1ec_feed_id'];
839
+ $event_id = $_POST['ai1ec_event_id'];
840
+ $feed_url = $_POST['ai1ec_feed_url'];
841
+
842
+ $api_feed = $this->_api_feed;
843
+
844
+ $db = $this->_registry->get( 'dbi.dbi' );
845
+ $table_name = $db->get_table_name( 'ai1ec_event_feeds' );
846
+
847
+ $json_strategy = $this->_registry->get(
848
+ 'http.response.render.strategy.json'
849
+ );
850
+
851
+ // Import to the API
852
+ try {
853
+ $response = $this->_api_feed->subscribe_feed( $feed_id, $event_id );
854
+ } catch ( Exception $e ) {
855
+ $output = array(
856
+ 'error' => true,
857
+ 'message' => $e->getMessage()
858
+ );
859
+ return $json_strategy->render( array( 'data' => $output ) );
860
+ }
861
+
862
+ $sql = "SELECT COUNT(*) FROM $table_name WHERE feed_name = '" . $feed_id . "'";
863
+ $feed_count = $db->get_var( $sql );
864
+
865
+ // Not imported yet
866
+ if ( '0' === $feed_count ) {
867
+ $entry = array(
868
+ 'feed_url' => $feed_url,
869
+ 'feed_name' => $feed_id,
870
+ 'feed_category' => '',
871
+ 'feed_tags' => '',
872
+ 'comments_enabled' => 0,
873
+ 'map_display_enabled' => 1,
874
+ 'keep_tags_categories' => '',
875
+ 'keep_old_events' => 0,
876
+ 'import_timezone' => 0
877
+ );
878
+
879
+ $format = array( '%s', '%s', '%s', '%s', '%d', '%d', '%s', '%d', '%d' );
880
+
881
+ $res = $db->insert( $table_name, $entry, $format );
882
+ $feed_id = $db->get_insert_id();
883
+ }
884
+
885
+ $update = $this->update_ics_feed( $feed_id );
886
+
887
+ $output = array(
888
+ 'error' => false,
889
+ 'message' => __( 'Event imported', AI1EC_PLUGIN_NAME ),
890
+ 'feed_id' => $feed_id,
891
+ );
892
+
893
+ return $json_strategy->render( array( 'data' => $output ) );
894
+ }
895
+
896
+ /**
897
+ * delete_individual_event_subscription function
898
+ *
899
+ * Deletes submitted ics feed id from the database
900
+ *
901
+ * @param bool $ajax When set to TRUE, the data is outputted using json_response
902
+ * @param bool|string $ics_id Feed URL
903
+ *
904
+ * @return String JSON output
905
+ **/
906
+ public function delete_individual_event_subscription() {
907
+ $db = $this->_registry->get( 'dbi.dbi' );
908
+
909
+ $feed_id = $_POST['ai1ec_feed_id'];
910
+ $feed_event_uid = $_POST['ai1ec_event_id'];
911
+ $delete = $_POST['ai1ec_delete'];
912
+
913
+ $table_name = $db->get_table_name( 'ai1ec_event_feeds' );
914
+
915
+ $ics_id = $db->get_var(
916
+ $db->prepare(
917
+ 'SELECT feed_id FROM ' . $table_name .
918
+ ' WHERE feed_name = %s',
919
+ $feed_id
920
+ )
921
+ );
922
+
923
+ // Unsubscribe in API
924
+ try {
925
+ $this->_api_feed->unsubscribe_feed( $feed_id, $feed_event_uid );
926
+ } catch ( Exception $e ) {
927
+ }
928
+
929
+ // Check if has more subscriptions
930
+ $found_subscription = false;
931
+
932
+ $feeds_subscriptions = $this->_api_feed->get_feed_subscriptions( true );
933
+ foreach( $feeds_subscriptions as $api_feed ) {
934
+ if ( $api_feed->feed_id === $feed_id ) {
935
+ $found_subscription = true;
936
+ break;
937
+ }
938
+ }
939
+
940
+ // Delete from database if there are no more individual feeds imported
941
+ if ( ! $found_subscription ) {
942
+ $db->query( $db->prepare( 'DELETE FROM ' . $table_name . ' WHERE feed_id = %d', $ics_id ) );
943
+ do_action( 'ai1ec_ics_feed_deleted', $ics_id );
944
+ }
945
+
946
+ // Delete event from database
947
+ if ( $delete ) {
948
+ $feed_url = $db->get_var(
949
+ $db->prepare(
950
+ 'SELECT feed_url FROM ' . $table_name .
951
+ ' WHERE feed_id = %d',
952
+ $ics_id
953
+ )
954
+ );
955
+
956
+ $table_name = $db->get_table_name( 'ai1ec_events' );
957
+ $sql = 'SELECT post_id FROM ' . $table_name .
958
+ ' WHERE ical_feed_url = %s AND ical_uid = %s';
959
+ $events = $db->get_col( $db->prepare( $sql, $feed_url, $feed_event_uid ) );
960
+ $total = count( $events );
961
+ foreach ( $events as $event_id ) {
962
+ // delete post (this will trigger deletion of cached events, and
963
+ // remove the event from events table)
964
+ wp_delete_post( $event_id, true );
965
+ }
966
+ }
967
+
968
+ $output = array(
969
+ 'error' => false,
970
+ 'message' => __( 'Feed deleted', AI1EC_PLUGIN_NAME ),
971
+ 'ics_id' => $ics_id,
972
+ );
973
+
974
+ $json_strategy = $this->_registry->get(
975
+ 'http.response.render.strategy.json'
976
+ );
977
+
978
+ return $json_strategy->render( array( 'data' => $output ) );
979
+ }
980
+
981
+
982
  /**
983
  * Get name to use for import locking via xguard.
984
  *
989
  protected function _import_lock_name( $feed_id ) {
990
  return 'ics_import_' . (int)$feed_id;
991
  }
992
+
993
+ /**
994
+ * Check feed status
995
+ *
996
+ * @param int $feed_id ID of feed
997
+ *
998
+ * @return string Feed status
999
+ */
1000
+ public function getFeedStatus( $feed_id ) {
1001
+ $api_feed = $this->_api_feed;
1002
+
1003
+ // Default status
1004
+ $feed_status = $api_feed::FEED_NOT_MIGRATED_CODE;
1005
+
1006
+ // Get list of subscriptions
1007
+ $api_subscriptions = $api_feed->get_feed_subscriptions();
1008
+
1009
+ foreach ( $api_subscriptions as $api_subscription ) {
1010
+ if ( $api_subscription->feed_id === $feed_id ) {
1011
+ if ( sizeof( $api_subscription->feed_events_uids ) > 0 ) {
1012
+ $feed_status = $api_feed::FEED_API_SOME_EVENTS_CODE;
1013
+ } else {
1014
+ $feed_status = $api_feed::FEED_API_ALL_EVENTS_CODE;
1015
+ }
1016
+ break;
1017
+ }
1018
+ }
1019
+
1020
+ return $feed_status;
1021
+ }
1022
+
1023
  }
lib/calendar-feed/import.php ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * The class which handles manual Feeds import.
5
+ *
6
+ * @author Time.ly Network Inc.
7
+ * @since 2.4
8
+ *
9
+ * @package AI1EC
10
+ * @subpackage AI1EC.Calendar-feed
11
+ */
12
+ class Ai1ecImportConnectorPlugin extends Ai1ec_Connector_Plugin {
13
+
14
+ /**
15
+ * @var array
16
+ * title: The title of the tab and the title of the configuration section
17
+ * id: The id used in the generation of the tab
18
+ */
19
+ protected $variables = array(
20
+ 'id' => 'import',
21
+ );
22
+
23
+ public function get_tab_title() {
24
+ return Ai1ec_I18n::__( 'Import Feeds' );
25
+ }
26
+
27
+ public function __construct( Ai1ec_Registry_Object $registry ) {
28
+ parent::__construct( $registry );
29
+ }
30
+
31
+ /**
32
+ * Returns the translations array
33
+ *
34
+ * @return array
35
+ */
36
+ private function get_translations() {
37
+ $categories = isset( $_POST['ai1ec_categories'] ) ? $_POST['ai1ec_categories'] : array();
38
+ foreach ( $categories as &$cat ) {
39
+ $term = get_term( $cat, 'events_categories' );
40
+ $cat = $term->name;
41
+ }
42
+ $translations = array(
43
+ '[feed_url]' => $_POST['ai1ec_calendar_url'],
44
+ '[categories]' => implode( ', ', $categories ),
45
+ '[user_email]' => $_POST['ai1ec_submitter_email'],
46
+ '[site_title]' => get_bloginfo( 'name' ),
47
+ '[site_url]' => ai1ec_site_url(),
48
+ '[feeds_url]' => ai1ec_admin_url(
49
+ AI1EC_FEED_SETTINGS_BASE_URL . '#ics'
50
+ ),
51
+ );
52
+ return $translations;
53
+ }
54
+
55
+ /**
56
+ * (non-PHPdoc)
57
+ *
58
+ * @see Ai1ec_Connector_Plugin::render_tab_content()
59
+ */
60
+ public function render_tab_content() {
61
+ // Render the opening div
62
+ $this->render_opening_div_of_tab();
63
+ // Render the body of the tab
64
+ $api = $this->_registry->get( 'model.api.api-feeds' );
65
+ $api_signed = $api->is_signed();
66
+ $settings = $this->_registry->get( 'model.settings' );
67
+ $factory = $this->_registry->get(
68
+ 'factory.html'
69
+ );
70
+ $has_feature = $api->has_subscription_active(
71
+ Ai1ec_Api_Features::CODE_IMPORT_FEEDS
72
+ );
73
+ $reached_limit = $api->subscription_has_reached_limit(
74
+ Ai1ec_Api_Features::CODE_IMPORT_FEEDS
75
+ );
76
+ $select2_cats = $factory->create_select2_multiselect(
77
+ array(
78
+ 'name' => 'ai1ec_feed_category[]',
79
+ 'id' => 'ai1ec_feed_category',
80
+ 'use_id' => true,
81
+ 'type' => 'category',
82
+ 'placeholder' => __(
83
+ 'Categories (optional)',
84
+ AI1EC_PLUGIN_NAME
85
+ )
86
+ ),
87
+ get_terms(
88
+ 'events_categories',
89
+ array(
90
+ 'hide_empty' => false
91
+ )
92
+ )
93
+ );
94
+ $select2_tags = $factory->create_select2_input(
95
+ array( 'id' => 'ai1ec_feed_tags')
96
+ );
97
+ $loader = $this->_registry->get( 'theme.loader' );
98
+
99
+ $args = array(
100
+ 'event_categories' => $select2_cats,
101
+ 'event_tags' => $select2_tags,
102
+ 'api_signed' => $api->is_signed(),
103
+ 'has_feature' => $has_feature,
104
+ 'reached_limit' => $reached_limit,
105
+ );
106
+
107
+ $import_feed = $loader->get_file(
108
+ 'plugins/ics/import_feed.php',
109
+ $args,
110
+ true
111
+ );
112
+ $import_feed->render();
113
+ $this->render_closing_div_of_tab();
114
+ }
115
+
116
+ /**
117
+ * (non-PHPdoc)
118
+ *
119
+ * @see Ai1ec_Connector_Plugin::display_admin_notices()
120
+ */
121
+ public function display_admin_notices() {
122
+ return;
123
+ }
124
+ /**
125
+ * (non-PHPdoc)
126
+ *
127
+ * @see Ai1ec_Connector_Plugin::run_uninstall_procedures()
128
+ */
129
+ public function run_uninstall_procedures() {
130
+ }
131
+
132
+ /**
133
+ * add_ics_feed function
134
+ *
135
+ * Adds submitted ics feed to the database
136
+ *
137
+ * @return string JSON output
138
+ *
139
+ */
140
+ public function add_ics_feed() {
141
+ }
142
+
143
+ public function handle_feeds_page_post() {
144
+ }
145
+
146
+ }
lib/calendar-feed/suggested.php ADDED
@@ -0,0 +1,139 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * The class which handles suggested feeds tab.
5
+ *
6
+ * @author Time.ly Network Inc.
7
+ * @since 2.4
8
+ *
9
+ * @package AI1EC
10
+ * @subpackage AI1EC.Calendar-feed
11
+ */
12
+ class Ai1ecSuggestedConnectorPlugin extends Ai1ec_Connector_Plugin {
13
+
14
+ /**
15
+ * @var array
16
+ * title: The title of the tab and the title of the configuration section
17
+ * id: The id used in the generation of the tab
18
+ */
19
+ protected $variables = array(
20
+ 'id' => 'suggested'
21
+ );
22
+
23
+ public function get_tab_title() {
24
+ return Ai1ec_I18n::__( 'Discover Events' );
25
+ }
26
+
27
+ public function __construct( Ai1ec_Registry_Object $registry ) {
28
+ parent::__construct( $registry );
29
+ }
30
+
31
+ /**
32
+ * (non-PHPdoc)
33
+ *
34
+ * @see Ai1ec_Connector_Plugin::handle_feeds_page_post()
35
+ */
36
+ public function handle_feeds_page_post() {
37
+ }
38
+
39
+ /**
40
+ * (non-PHPdoc)
41
+ *
42
+ * @see Ai1ec_Connector_Plugin::render_tab_content()
43
+ */
44
+ public function render_tab_content() {
45
+ // Render the opening div
46
+ $this->render_opening_div_of_tab();
47
+
48
+ $loader = $this->_registry->get( 'theme.loader' );
49
+ $api = $this->_registry->get( 'model.api.api-feeds' );
50
+ $event_actions = $loader->get_file(
51
+ 'plugins/suggested/event_actions.php',
52
+ array(),
53
+ true
54
+ );
55
+ $display_feeds = $loader->get_file(
56
+ 'plugins/suggested/display_feeds.php',
57
+ array(
58
+ 'event_actions' => $event_actions,
59
+ 'api_signed' => $api->is_signed()
60
+ ),
61
+ true
62
+ );
63
+ $display_feeds->render();
64
+
65
+ // Render the body of the tab
66
+ $this->render_closing_div_of_tab();
67
+ }
68
+
69
+ /**
70
+ * (non-PHPdoc)
71
+ *
72
+ * @see Ai1ec_Connector_Plugin::display_admin_notices()
73
+ */
74
+ public function display_admin_notices() {
75
+ return;
76
+ }
77
+
78
+ /**
79
+ * Events search
80
+ */
81
+ public function search_events() {
82
+ $api = $this->_registry->get( 'model.api.api-feeds' );
83
+ $events = $api->get_suggested_events();
84
+ $imported = $api->get_feed_subscriptions();
85
+ $loader = $this->_registry->get( 'theme.loader' );
86
+ $event_actions = $loader->get_file(
87
+ 'plugins/suggested/event_actions.php',
88
+ array(),
89
+ true
90
+ );
91
+ if ( null === $events ) {
92
+ echo json_encode(
93
+ array(
94
+ 'list' => '',
95
+ 'total' => 0
96
+ )
97
+ );
98
+ exit( 0 );
99
+ }
100
+ $page_links = paginate_links( array(
101
+ 'base' => add_query_arg( 'pagenum', '%#%' ),
102
+ 'format' => '',
103
+ 'prev_text' => __( '&laquo;', AI1EC_PLUGIN_NAME ),
104
+ 'next_text' => __( '&raquo;', AI1EC_PLUGIN_NAME ),
105
+ 'total' => $events->last_page,
106
+ 'current' => $events->current_page
107
+ ) );
108
+ $avatar_url = $loader->get_file(
109
+ 'default-event-avatar.png',
110
+ array(),
111
+ false
112
+ )->get_url();
113
+ $feeds_list = $loader->get_file(
114
+ 'plugins/suggested/feeds_list.php',
115
+ array(
116
+ 'suggested_feeds' => $events->data,
117
+ 'default_image' => $avatar_url,
118
+ 'event_actions' => $event_actions,
119
+ 'page_links' => $page_links
120
+ ),
121
+ true
122
+ );
123
+ $feeds_list = array(
124
+ 'list' => $feeds_list->get_content(),
125
+ 'total' => $events->total,
126
+ 'imported' => $imported
127
+ );
128
+ echo json_encode( $feeds_list );
129
+ exit( 0 );
130
+ }
131
+
132
+ /**
133
+ * (non-PHPdoc)
134
+ *
135
+ * @see Ai1ec_Connector_Plugin::run_uninstall_procedures()
136
+ */
137
+ public function run_uninstall_procedures() {
138
+ }
139
+ }
lib/captcha/provider/nocaptcha.php CHANGED
@@ -94,7 +94,7 @@ class Ai1ec_Captcha_Nocaptcha_Provider extends Ai1ec_Captcha_Provider {
94
  );
95
  $response['success'] = false;
96
  }
97
- $url = esc_url( add_query_arg(
98
  array(
99
  'secret' => $this->_settings->get(
100
  'google_nocaptcha_private_key'
@@ -102,7 +102,7 @@ class Ai1ec_Captcha_Nocaptcha_Provider extends Ai1ec_Captcha_Provider {
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;
94
  );
95
  $response['success'] = false;
96
  }
97
+ $url = add_query_arg(
98
  array(
99
  'secret' => $this->_settings->get(
100
  'google_nocaptcha_private_key'
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;
lib/command/export-events.php CHANGED
@@ -116,10 +116,7 @@ class Ai1ec_Command_Export_Events extends Ai1ec_Command {
116
  );
117
  }
118
  $filter = apply_filters( 'ai1ec_export_filter', $filter );
119
- // when exporting events by post_id, do not look up the event's start/end date/time
120
- $start = ( $ai1ec_post_ids !== false )
121
- ? $this->_registry->get( 'date.time', '-3 years' )
122
- : $this->_registry->get( 'date.time', time() - 24 * 60 * 60 ); // Include any events ending today
123
  $end = $this->_registry->get( 'date.time', '+3 years' );
124
  $search = $this->_registry->get( 'model.search' );
125
  $params = array(
116
  );
117
  }
118
  $filter = apply_filters( 'ai1ec_export_filter', $filter );
119
+ $start = $this->_registry->get( 'date.time', '-3 years' );
 
 
 
120
  $end = $this->_registry->get( 'date.time', '+3 years' );
121
  $search = $this->_registry->get( 'model.search' );
122
  $params = array(
lib/css/frontend.php CHANGED
@@ -177,10 +177,10 @@ class Ai1ec_Css_Frontend extends Ai1ec_Base {
177
  $time = (int) $saved_par;
178
  $template_helper = $this->_registry->get( 'template.link.helper' );
179
  return Ai1ec_Http_Response_Helper::remove_protocols(
180
- esc_url( add_query_arg(
181
  array( self::QUERY_STRING_PARAM => $time, ),
182
  trailingslashit( ai1ec_get_site_url() )
183
- ) )
184
  );
185
  } else {
186
  add_action( 'wp_head', array( $this, 'echo_css' ) );
177
  $time = (int) $saved_par;
178
  $template_helper = $this->_registry->get( 'template.link.helper' );
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 {
186
  add_action( 'wp_head', array( $this, 'echo_css' ) );
lib/environment/check.php CHANGED
@@ -95,6 +95,27 @@ class Ai1ec_Environment_Checks extends Ai1ec_Base {
95
  }
96
  return;
97
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
  // Check for needed PHP extensions.
99
  $option = $this->_registry->get( 'model.option' );
100
  if (
95
  }
96
  return;
97
  }
98
+ // Tell user to sign in to API in order to use Feeds
99
+ $rows = $this->_registry->get( 'dbi.dbi' )->select(
100
+ 'ai1ec_event_feeds',
101
+ array( 'feed_id' )
102
+ );
103
+ $api_reg = $this->_registry->get( 'model.api.api-registration' );
104
+ $is_signed = $api_reg->is_signed();
105
+
106
+ if ( 0 < count( $rows ) && ! $is_signed ) {
107
+ $msg = Ai1ec_I18n::__(
108
+ '<b>ACTION REQUIRED!</b> Please, <a href="edit.php?post_type=ai1ec_event&page=all-in-one-event-calendar-settings">sign</a> into Timely Network to continue syncing your imported events.'
109
+ );
110
+ $notification->store(
111
+ $msg,
112
+ 'error',
113
+ 0,
114
+ array( Ai1ec_Notification_Admin::RCPT_ADMIN ),
115
+ false
116
+ );
117
+ }
118
+
119
  // Check for needed PHP extensions.
120
  $option = $this->_registry->get( 'model.option' );
121
  if (
lib/html/element/setting/abstract.php CHANGED
@@ -68,7 +68,7 @@ abstract class Ai1ec_Html_Element_Settings extends Ai1ec_Base
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 ) ) {
@@ -91,7 +91,11 @@ abstract class Ai1ec_Html_Element_Settings extends Ai1ec_Base
91
  if ( ! $wrap ) {
92
  return $output;
93
  }
94
- return '<div class="ai1ec-form-group">' . $output . '</div>';
 
 
 
 
95
  }
96
 
97
  }
68
  *
69
  * @return string Finalized HTML snippet.
70
  */
71
+ public function render( $output = '', $wrap = true, $hidden = false ) {
72
  if ( isset( $this->_args['renderer']['condition'] ) ) {
73
  $condition = $this->_args['renderer']['condition'];
74
  if ( is_bool( $condition ) ) {
91
  if ( ! $wrap ) {
92
  return $output;
93
  }
94
+ if ( $hidden ) {
95
+ return '<div class="ai1ec-form-group ai1ec-hidden">' . $output . '</div>';
96
+ } else {
97
+ return '<div class="ai1ec-form-group">' . $output . '</div>';
98
+ }
99
  }
100
 
101
  }
lib/html/element/setting/custom.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Renderer of settings page custom option.
5
+ *
6
+ * @author Time.ly Network, Inc.
7
+ * @instantiator new
8
+ * @since 2.4
9
+ * @package Ai1EC
10
+ * @subpackage Ai1EC.Html
11
+ */
12
+ class Ai1ec_Html_Setting_Custom extends Ai1ec_Html_Element_Settings {
13
+
14
+ /* (non-PHPdoc)
15
+ * @see Ai1ec_Html_Element_Settings::render()
16
+ */
17
+ public function render( $output = '' ) {
18
+ $label = $this->_args['renderer']['label'];
19
+ $content = $this->_args['renderer']['content'];
20
+ $loader = $this->_registry->get( 'theme.loader' );
21
+ $file = $loader->get_file( 'setting/custom.twig', array(
22
+ 'label' => $label,
23
+ 'content' => $content
24
+ ), true );
25
+ return parent::render( $file->get_content() );
26
+ }
27
+
28
+ }
lib/html/element/setting/input.php CHANGED
@@ -87,7 +87,12 @@ class Ai1ec_Html_Setting_Input extends Ai1ec_Html_Element_Settings {
87
 
88
  $loader = $this->_registry->get( 'theme.loader' );
89
  $file = $loader->get_file( 'setting/input.twig', $args, true );
90
- return parent::render( $file->get_content() );
 
 
 
 
 
91
  }
92
 
93
  }
87
 
88
  $loader = $this->_registry->get( 'theme.loader' );
89
  $file = $loader->get_file( 'setting/input.twig', $args, true );
90
+ if ( isset( $this->_args['type'] ) && 'hidden' === $this->_args['type'] ) {
91
+ $hidden = true;
92
+ } else {
93
+ $hidden = false;
94
+ }
95
+ return parent::render( $file->get_content(), true, $hidden );
96
  }
97
 
98
  }
lib/import-export/api-ics.php ADDED
@@ -0,0 +1,767 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * The ics import engine to import feeds from API
5
+ *
6
+ * @author Time.ly Network Inc.
7
+ * @since 2.4
8
+ *
9
+ * @package AI1EC
10
+ * @subpackage AI1EC.Import-export
11
+ */
12
+ class Ai1ec_Api_Ics_Import_Export_Engine
13
+ extends Ai1ec_Base
14
+ implements Ai1ec_Import_Export_Engine {
15
+
16
+ /**
17
+ * @var Ai1ec_Taxonomy
18
+ */
19
+ protected $_taxonomy_model = null;
20
+
21
+ /**
22
+ * Recurrence rule class. Contains filter method.
23
+ *
24
+ * @var Ai1ec_Recurrence_Rule
25
+ */
26
+ protected $_rule_filter = null;
27
+
28
+ protected function is_valid( $cal ) {
29
+ if ( is_null( $cal ) || ! is_array( $cal ) ) {
30
+ return false;
31
+ }
32
+ return true;
33
+ }
34
+
35
+ /* (non-PHPdoc)
36
+ * @see Ai1ec_Import_Export_Engine::import()
37
+ */
38
+ public function import( array $arguments ) {
39
+ $cal = $arguments['source'];
40
+ if ( $this->is_valid( $cal ) ) {
41
+ try {
42
+ $result = $this->add_vcalendar_events_to_db( $arguments );
43
+ } catch ( Ai1ec_Parse_Exception $exception ) {
44
+ throw new Ai1ec_Parse_Exception(
45
+ 'Processing "' . $arguments['source'] .
46
+ '" triggered error: ' . $exception->getMessage()
47
+ );
48
+ }
49
+ return $result;
50
+ }
51
+ throw new Ai1ec_Parse_Exception( 'The passed string is not a valid ics feed' );
52
+ }
53
+
54
+ public function events_order_comparator( $e1, $e2 ) {
55
+ return strcmp( $e1->dtstart, $e2->dtstart );
56
+ }
57
+
58
+ /**
59
+ * Process vcalendar instance - add events to database.
60
+ *
61
+ * @param vcalendar $v Calendar to retrieve data from.
62
+ * @param array $args Arbitrary arguments map.
63
+ *
64
+ * @throws Ai1ec_Parse_Exception
65
+ *
66
+ * @internal param array $args Array with events and configuration
67
+ *
68
+ * @return int Count of events added to database.
69
+ */
70
+ public function add_vcalendar_events_to_db( array $args ) {
71
+
72
+ $cal = $args['source'];
73
+
74
+ $feed = isset( $args['feed'] ) ? $args['feed'] : null;
75
+ $comment_status = isset( $args['comment_status'] ) ? $args['comment_status'] : 'open';
76
+ $do_show_map = isset( $args['do_show_map'] ) ? $args['do_show_map'] : 0;
77
+ $count = 0;
78
+ $events_in_db = isset( $args['events_in_db'] ) ? $args['events_in_db'] : 0;
79
+ $feed_name = $feed->feed_url;
80
+
81
+ // Fetch default timezone in case individual properties don't define it
82
+ $local_timezone = $this->_registry->get( 'date.timezone' )->get_default_timezone();
83
+ $timezone = $local_timezone;
84
+
85
+ $messages = array();
86
+
87
+ $current_timestamp = $this->_registry->get( 'date.time' )->format_to_gmt();
88
+
89
+ // initialize empty custom exclusions structure
90
+ $exclusions = array();
91
+ // go over each event
92
+ foreach ( $cal as $e ) {
93
+
94
+ // Event data array.
95
+ $data = array();
96
+ // =====================
97
+ // = Start & end times =
98
+ // =====================
99
+ $start = (array)$e->dtstart;
100
+ $end = (array)$e->dtend;
101
+ // For cases where a "VEVENT" calendar component
102
+ // specifies a "DTSTART" property with a DATE value type but none
103
+ // of "DTEND" nor "DURATION" property, the event duration is taken to
104
+ // be one day. For cases where a "VEVENT" calendar component
105
+ // specifies a "DTSTART" property with a DATE-TIME value type but no
106
+ // "DTEND" property, the event ends on the same calendar date and
107
+ // time of day specified by the "DTSTART" property.
108
+ if ( empty( $end ) ) {
109
+ // #1 if duration is present, assign it to end time
110
+ $end = $e->duration;
111
+ if ( empty( $end ) ) {
112
+ // #2 if only DATE value is set for start, set duration to 1 day
113
+ if ( ! isset( $start['time']['hour'] ) ) {
114
+ $end = array(
115
+ 'date' => array(
116
+ 'year' => $start['date']['year'],
117
+ 'month' => $start['date']['month'],
118
+ 'day' => $start['date']['day'] + 1,
119
+ ),
120
+ 'time' => array(
121
+ 'hour' => 0,
122
+ 'minute' => 0,
123
+ 'second' => 0,
124
+ ),
125
+ );
126
+ // #3 set end date to start time
127
+ $end = $start;
128
+ }
129
+ }
130
+ }
131
+ $categories = $e->categories;
132
+ $imported_cat = array( Ai1ec_Event_Taxonomy::CATEGORIES => array() );
133
+ // If the user chose to preserve taxonomies during import, add categories.
134
+ if( $categories && $feed->keep_tags_categories ) {
135
+ $imported_cat = $this->add_categories_and_tags(
136
+ $categories,
137
+ $imported_cat,
138
+ false,
139
+ true
140
+ );
141
+ }
142
+ $feed_categories = $feed->feed_category;
143
+ if( ! empty( $feed_categories ) ) {
144
+ $imported_cat = $this->add_categories_and_tags(
145
+ $feed_categories,
146
+ $imported_cat,
147
+ false,
148
+ false
149
+ );
150
+ }
151
+ $tags = $e->x_tags;
152
+ $imported_tags = array( Ai1ec_Event_Taxonomy::TAGS => array() );
153
+ // If the user chose to preserve taxonomies during import, add tags.
154
+ if( $tags && $feed->keep_tags_categories ) {
155
+ $imported_tags = $this->add_categories_and_tags(
156
+ $tags,
157
+ $imported_tags,
158
+ true,
159
+ true
160
+ );
161
+ }
162
+ $feed_tags = $feed->feed_tags;
163
+ if( ! empty( $feed_tags ) ) {
164
+ $imported_tags = $this->add_categories_and_tags(
165
+ $feed_tags,
166
+ $imported_tags,
167
+ true,
168
+ true
169
+ );
170
+ }
171
+ // Event is all-day if no time components are defined
172
+ $allday = $this->_is_timeless( (array)$start['time'] ) &&
173
+ $this->_is_timeless( (array)$end['time'] );
174
+ // Also check the proprietary MS all-day field.
175
+ $ms_allday = $e->x_microsoft_cdo_alldayevent;
176
+ if ( ! empty( $ms_allday ) && 'TRUE' == $ms_allday ) {
177
+ $allday = true;
178
+ }
179
+ $event_timezone = $e->timezone;
180
+ if ( $allday ) {
181
+ $event_timezone = $local_timezone;
182
+ }
183
+ $start = $this->_time_array_to_datetime(
184
+ (array)$start['date'],
185
+ (array)$start['time'],
186
+ $timezone,
187
+ $feed->import_timezone ? $event_timezone : null
188
+ );
189
+ $end = $this->_time_array_to_datetime(
190
+ (array)$end['date'],
191
+ (array)$end['time'],
192
+ $timezone,
193
+ $feed->import_timezone ? $event_timezone : null
194
+ );
195
+ if ( false === $start || false === $end ) {
196
+ throw new Ai1ec_Parse_Exception(
197
+ 'Failed to parse one or more dates given timezone "' .
198
+ var_export( $event_timezone, true ) . '"'
199
+ );
200
+ continue;
201
+ }
202
+
203
+ // If all-day, and start and end times are equal, then this event has
204
+ // invalid end time (happens sometimes with poorly implemented iCalendar
205
+ // exports, such as in The Event Calendar), so set end time to 1 day
206
+ // after start time.
207
+ if ( $allday && $start->format() === $end->format() ) {
208
+ $end->adjust_day( +1 );
209
+ }
210
+
211
+ $data += compact( 'start', 'end', 'allday' );
212
+
213
+ // =======================================
214
+ // = Recurrence rules & recurrence dates =
215
+ // =======================================
216
+ $rrule = $e->rrule;
217
+ $rdate = $e->rdate;
218
+
219
+ // =======================================
220
+ // = Exclusion rules & exclusion dates =
221
+ // =======================================
222
+ $exrule = $e->exrule;
223
+ $exdate = $e->exdate;
224
+
225
+ // Add custom exclusions if there any
226
+ $recurrence_id = $e->recurrence_id;
227
+ if (
228
+ false === $recurrence_id &&
229
+ ! empty( $exclusions[$e->uid] )
230
+ ) {
231
+ if ( isset( $exdate{0} ) ) {
232
+ $exdate .= ',';
233
+ }
234
+ $exdate .= implode( ',', $exclusions[$e->uid] );
235
+ }
236
+ // ========================
237
+ // = Latitude & longitude =
238
+ // ========================
239
+ $latitude = $longitude = NULL;
240
+ $geo_tag = $e->geo;
241
+ if ( ! empty( $geo_tag ) && false !== strpos( $geo_tag, ',' ) ) {
242
+ list( $latitude, $longitude ) = explode( ',', $geo_tag, 2 );
243
+ $latitude = (float)$latitude;
244
+ $longitude = (float)$longitude;
245
+ }
246
+ unset( $geo_tag );
247
+ if ( NULL !== $latitude ) {
248
+ $data += compact( 'latitude', 'longitude' );
249
+ // Check the input coordinates checkbox, otherwise lat/long data
250
+ // is not present on the edit event page
251
+ $data['show_coordinates'] = 1;
252
+ }
253
+ // ===================
254
+ // = Venue & address =
255
+ // ===================
256
+ $data['country'] = '';
257
+ $data['city'] = '';
258
+ $data['province'] = '';
259
+ $data['postal_code'] = '';
260
+
261
+ $address = '';
262
+ $venue = '';
263
+ $location = $e->location;
264
+ $matches = array();
265
+ // This regexp matches a venue / address in the format
266
+ // "venue @ address" or "venue - address".
267
+ preg_match( '/\s*(.*\S)\s+[\-@]\s+(.*)\s*/', $location, $matches );
268
+ // if there is no match, it's not a combined venue + address
269
+ if ( empty( $matches ) ) {
270
+ // temporary fix for Mac ICS import. Se AIOEC-2187
271
+ // and https://github.com/iCalcreator/iCalcreator/issues/13
272
+ $location = str_replace( '\n', "\n", $location );
273
+ // if there is a comma, probably it's an address
274
+ if ( false === strpos( $location, ',' ) ) {
275
+ $venue = $location;
276
+ } else {
277
+ $address = $location;
278
+ }
279
+ } else {
280
+ $venue = isset( $matches[1] ) ? $matches[1] : '';
281
+ $address = isset( $matches[2] ) ? $matches[2] : '';
282
+ }
283
+
284
+ // =====================================================
285
+ // = Set show map status based on presence of location =
286
+ // =====================================================
287
+ $event_do_show_map = $do_show_map;
288
+ if (
289
+ 1 === $do_show_map &&
290
+ NULL === $latitude &&
291
+ empty( $address )
292
+ ) {
293
+ $event_do_show_map = 0;
294
+ }
295
+
296
+ // ==================
297
+ // = Cost & tickets =
298
+ // ==================
299
+ $cost = $e->x_cost;
300
+ $ticket_url = $e->x_tickets_url;
301
+
302
+ // ===============================
303
+ // = Contact name, phone, e-mail =
304
+ // ===============================
305
+ // Initialize default values
306
+ $data['contact_email'] = '';
307
+ $data['contact_url'] = '';
308
+ $data['contact_phone'] = '';
309
+ $data['contact_name'] = '';
310
+
311
+ $organizer = $e->organizer;
312
+ if (
313
+ 'MAILTO:' === substr( $organizer, 0, 7 ) &&
314
+ false === strpos( $organizer, '@' )
315
+ ) {
316
+ $organizer = substr( $organizer, 7 );
317
+ }
318
+ $contact = $e->contact;
319
+ $elements = explode( ';', $contact, 4 );
320
+
321
+ foreach ( $elements as $el ) {
322
+ $el = trim( $el );
323
+ // Detect e-mail address.
324
+ if ( false !== strpos( $el, '@' ) ) {
325
+ $data['contact_email'] = $el;
326
+ }
327
+ // Detect URL.
328
+ elseif ( false !== strpos( $el, '://' ) ) {
329
+ $data['contact_url'] = $el;
330
+ }
331
+ // Detect phone number.
332
+ elseif ( preg_match( '/\d/', $el ) ) {
333
+ $data['contact_phone'] = $el;
334
+ }
335
+ // Default to name.
336
+ else {
337
+ $data['contact_name'] = $el;
338
+ }
339
+ }
340
+ if ( ! isset( $data['contact_name'] ) || ! $data['contact_name'] ) {
341
+ // If no contact name, default to organizer property.
342
+ $data['contact_name'] = $organizer;
343
+ }
344
+
345
+ $description = stripslashes(
346
+ str_replace(
347
+ '\n',
348
+ "\n",
349
+ $e->description
350
+ ));
351
+
352
+ $description = $this->_remove_ticket_url( $description );
353
+
354
+ // Store yet-unsaved values to the $data array.
355
+ $data += array(
356
+ 'recurrence_rules' => $rrule,
357
+ 'exception_rules' => $exrule,
358
+ 'recurrence_dates' => $rdate,
359
+ 'exception_dates' => $exdate,
360
+ 'venue' => $venue,
361
+ 'address' => $address,
362
+ 'cost' => $cost,
363
+ 'ticket_url' => $ticket_url,
364
+ 'show_map' => $event_do_show_map,
365
+ 'ical_feed_url' => $feed->feed_url,
366
+ 'ical_source_url' => $e->url,
367
+ 'ical_organizer' => $organizer,
368
+ 'ical_contact' => $contact,
369
+ 'ical_uid' => $this->_get_ical_uid( $e ),
370
+ 'categories' => array_keys( $imported_cat[Ai1ec_Event_Taxonomy::CATEGORIES] ),
371
+ 'tags' => array_keys( $imported_tags[Ai1ec_Event_Taxonomy::TAGS] ),
372
+ 'feed' => $feed,
373
+ 'post' => array(
374
+ 'post_status' => 'publish',
375
+ 'comment_status' => $comment_status,
376
+ 'post_type' => AI1EC_POST_TYPE,
377
+ 'post_author' => 1,
378
+ 'post_title' => $e->summary,
379
+ 'post_content' => $description
380
+ )
381
+ );
382
+ // register any custom exclusions for given event
383
+ $exclusions = $this->_add_recurring_events_exclusions(
384
+ $e,
385
+ $exclusions,
386
+ $start
387
+ );
388
+
389
+ // Create event object.
390
+ $data = apply_filters(
391
+ 'ai1ec_pre_init_event_from_feed',
392
+ $data,
393
+ $e,
394
+ $feed
395
+ );
396
+
397
+ $event = $this->_registry->get( 'model.event', $data );
398
+
399
+ // Instant Event
400
+ $is_instant = $e->x_instant_event;
401
+ if ( $is_instant ) {
402
+ $event->set_no_end_time();
403
+ }
404
+
405
+ $recurrence = $event->get( 'recurrence_rules' );
406
+ $search = $this->_registry->get( 'model.search' );
407
+ // first let's check by UID
408
+ $matching_event_id = $search
409
+ ->get_matching_event_by_uid_and_url(
410
+ $event->get( 'ical_uid' ),
411
+ $event->get( 'ical_feed_url' )
412
+ );
413
+ // if no result, perform the legacy check.
414
+ if ( null === $matching_event_id ) {
415
+ $matching_event_id = $search
416
+ ->get_matching_event_id(
417
+ $event->get( 'ical_uid' ),
418
+ $event->get( 'ical_feed_url' ),
419
+ $event->get( 'start' ),
420
+ ! empty( $recurrence )
421
+ );
422
+ }
423
+ if ( null === $matching_event_id ) {
424
+
425
+ // =================================================
426
+ // = Event was not found, so store it and the post =
427
+ // =================================================
428
+ $event->save();
429
+ $count++;
430
+ } else {
431
+ // ======================================================
432
+ // = Event was found, let's store the new event details =
433
+ // ======================================================
434
+ $uid_cal = $e->uid;
435
+ if ( ! ai1ec_is_blank( $uid_cal ) ) {
436
+ $uid_cal_original = sprintf( $event->get_uid_pattern(), $matching_event_id );
437
+ if ( $uid_cal_original === $uid_cal ) {
438
+ //avoiding cycle import
439
+ //ignore the event, it belongs to site
440
+ unset( $events_in_db[$matching_event_id] );
441
+ continue;
442
+ }
443
+ }
444
+
445
+ // Update the post
446
+ $post = get_post( $matching_event_id );
447
+
448
+ if ( null !== $post ) {
449
+ $post->post_title = $event->get( 'post' )->post_title;
450
+ $post->post_content = $event->get( 'post' )->post_content;
451
+ wp_update_post( $post );
452
+
453
+ // Update the event
454
+ $event->set( 'post_id', $matching_event_id );
455
+ $event->set( 'post', $post );
456
+ $event->save( true );
457
+ $count++;
458
+ }
459
+ }
460
+ do_action( 'ai1ec_ics_event_saved', $event, $feed );
461
+
462
+ // import not standard taxonomies.
463
+ unset( $imported_cat[Ai1ec_Event_Taxonomy::CATEGORIES] );
464
+ foreach ( $imported_cat as $tax_name => $ids ) {
465
+ wp_set_post_terms( $event->get( 'post_id' ), array_keys( $ids ), $tax_name );
466
+ }
467
+
468
+ unset( $imported_tags[Ai1ec_Event_Taxonomy::TAGS] );
469
+ foreach ( $imported_tags as $tax_name => $ids ) {
470
+ wp_set_post_terms( $event->get( 'post_id' ), array_keys( $ids ), $tax_name );
471
+ }
472
+
473
+ // import the metadata used by ticket events
474
+
475
+ $cost_type = $e->x_cost_type;
476
+ if ( $cost_type && false === ai1ec_is_blank( $cost_type ) ) {
477
+ update_post_meta( $event->get( 'post_id' ), '_ai1ec_cost_type', $cost_type );
478
+ }
479
+
480
+ $api_event_id = $e->x_api_event_id;
481
+ if ( $api_event_id && false === ai1ec_is_blank( $api_event_id ) ) {
482
+ $api_event_id = $api_event_id;
483
+ } else {
484
+ $api_event_id = null;
485
+ }
486
+
487
+ $api_url = $e->x_api_url;
488
+ if ( $api_url && false === ai1ec_is_blank( $api_url ) ) {
489
+ $api_url = $api_url;
490
+ } else {
491
+ $api_url = null;
492
+ }
493
+
494
+ $checkout_url = $e->x_checkout_url;
495
+ if ( $checkout_url && false === ai1ec_is_blank( $checkout_url ) ) {
496
+ $checkout_url = $checkout_url;
497
+ } else {
498
+ $checkout_url = null;
499
+ }
500
+
501
+ $currency = $e->x_api_event_currency;
502
+ if ( $currency && false === ai1ec_is_blank( $currency ) ) {
503
+ $currency = $currency;
504
+ } else {
505
+ $currency = null;
506
+ }
507
+ if ( $api_event_id || $api_url || $checkout_url || $currency ) {
508
+ if ( ! isset( $api ) ) {
509
+ $api = $this->_registry->get( 'model.api.api-ticketing' );
510
+ }
511
+ $api->save_api_event_data( $event->get( 'post_id' ), $api_event_id, $api_url, $checkout_url, $currency );
512
+ }
513
+
514
+ $wp_images_url = $e->x_wp_image_url;
515
+ if ( $wp_images_url && false === ai1ec_is_blank( $wp_images_url ) ) {
516
+ $images_arr = explode( ',', $wp_images_url );
517
+ foreach ( $images_arr as $key => $value ) {
518
+ $images_arr[ $key ] = explode( ';', $value );
519
+ }
520
+ if ( count( $images_arr ) > 0 ) {
521
+ update_post_meta( $event->get( 'post_id' ), '_featured_image', $images_arr );
522
+ }
523
+ }
524
+
525
+ unset( $events_in_db[$event->get( 'post_id' )] );
526
+ } //close while iteration
527
+
528
+ return array(
529
+ 'count' => $count,
530
+ 'events_to_delete' => $events_in_db,
531
+ 'messages' => $messages,
532
+ 'name' => $feed_name,
533
+ );
534
+
535
+ }
536
+
537
+ /**
538
+ * Returns modified ical uid for google recurring edited events.
539
+ *
540
+ * @param vevent $e Vevent object.
541
+ *
542
+ * @return string ICAL uid.
543
+ */
544
+ protected function _get_ical_uid( $e ) {
545
+ $ical_uid = $e->uid;
546
+ $recurrence_id = $e->recurrence_id;
547
+ if ( '' !== $recurrence_id ) {
548
+ $ical_uid = implode( '', array_values( $recurrence_id ) ) . '-' . $ical_uid;
549
+ }
550
+
551
+ return $ical_uid;
552
+ }
553
+
554
+ /**
555
+ * time_array_to_timestamp function
556
+ *
557
+ * Converts time array to time string.
558
+ * Passed array: Array( 'year', 'month', 'day', ['hour', 'minute', 'second', ['tz']] )
559
+ * Return int: UNIX timestamp in GMT
560
+ *
561
+ * @param array $time iCalcreator time property array
562
+ * (*full* format expected)
563
+ * @param string $def_timezone Default time zone in case not defined
564
+ * in $time
565
+ * @param null|string $forced_timezone Timezone to use instead of UTC.
566
+ *
567
+ * @return int UNIX timestamp
568
+ **/
569
+ protected function _time_array_to_datetime(
570
+ array $date,
571
+ array $time,
572
+ $def_timezone,
573
+ $forced_timezone = null
574
+ ) {
575
+ $timezone = $def_timezone;
576
+
577
+ $date_time = $this->_registry->get( 'date.time' );
578
+
579
+ if ( ! empty( $timezone ) ) {
580
+ $parser = $this->_registry->get( 'date.timezone' );
581
+ $timezone = $parser->get_name( $timezone );
582
+ if ( false === $timezone ) {
583
+ return false;
584
+ }
585
+ $date_time->set_timezone( $timezone );
586
+ }
587
+
588
+ if ( ! isset( $time['hour'] ) ) {
589
+ $time['hour'] = $time['minute'] = $time['second'] = 0;
590
+ }
591
+
592
+ $date_time
593
+ ->set_date(
594
+ $date['year'],
595
+ $date['month'],
596
+ $date['day']
597
+ )
598
+ ->set_time(
599
+ $time['hour'],
600
+ $time['minute'],
601
+ $time['second']
602
+ );
603
+ if ( 'UTC' === $timezone && null !== $forced_timezone ) {
604
+ $date_time->set_timezone( $forced_timezone );
605
+ }
606
+ return $date_time;
607
+ }
608
+
609
+ /**
610
+ * Check if date-time specification has no (empty) time component.
611
+ *
612
+ * @param array $datetime Datetime array returned by iCalcreator.
613
+ *
614
+ * @return bool Timelessness.
615
+ */
616
+ protected function _is_timeless( array $datetime ) {
617
+ $timeless = true;
618
+ foreach ( array( 'hour', 'minute', 'second' ) as $field ) {
619
+ $timeless &= (
620
+ isset( $datetime[$field] ) &&
621
+ 0 != $datetime[$field]
622
+ )
623
+ ? false
624
+ : true;
625
+ }
626
+ return $timeless;
627
+ }
628
+
629
+ /**
630
+ * Parse importable feed timezone to sensible value.
631
+ *
632
+ * @param string $def_timezone Timezone value from feed.
633
+ *
634
+ * @return string Valid timezone name to use.
635
+ */
636
+ protected function _get_import_timezone( $def_timezone ) {
637
+ $parser = $this->_registry->get( 'date.timezone' );
638
+ $timezone = $parser->get_name( $def_timezone );
639
+ if ( false === $timezone ) {
640
+ return 'sys.default';
641
+ }
642
+ return $timezone;
643
+ }
644
+
645
+ /**
646
+ * _string_to_datetime function
647
+ *
648
+ * Converts time string "Y-m-d H:i:s" to DateTime object.
649
+ * Passed array: Array( 'year', 'month', 'day', ['hour', 'minute', 'second', ['tz']] )
650
+ * Return int: UNIX timestamp in GMT
651
+ *
652
+ * @param array $time iCalcreator time property array
653
+ * (*full* format expected)
654
+ * @param string $def_timezone Default time zone in case not defined
655
+ * in $time
656
+ * @param null|string $forced_timezone Timezone to use instead of UTC.
657
+ *
658
+ * @return int UNIX timestamp
659
+ **/
660
+ protected function _string_to_datetime(
661
+ $time,
662
+ $def_timezone,
663
+ $forced_timezone = null
664
+ ) {
665
+ $date_time = null;
666
+ if ( 0 === strcasecmp( $def_timezone, 'utc' ) &&
667
+ null !== $forced_timezone ) {
668
+ $date_time = $this->_registry->get( 'date.time', $time, $forced_timezone );
669
+ } else {
670
+ $date_time = $this->_registry->get( 'date.time', $time, $def_timezone );
671
+ }
672
+ return $date_time;
673
+ }
674
+
675
+
676
+ /**
677
+ * Takes a comma-separated list of tags or categories.
678
+ * If they exist, reuses
679
+ * the existing ones. If not, creates them.
680
+ *
681
+ * The $imported_terms array uses keys to store values rather than values to
682
+ * speed up lookups (using isset() insted of in_array()).
683
+ *
684
+ * @param string $terms
685
+ * @param array $imported_terms
686
+ * @param boolean $is_tag
687
+ * @param boolean $use_name
688
+ *
689
+ * @return array
690
+ */
691
+ public function add_categories_and_tags(
692
+ $terms,
693
+ array $imported_terms,
694
+ $is_tag,
695
+ $use_name
696
+ ) {
697
+ $taxonomy = $is_tag ? 'events_tags' : 'events_categories';
698
+ $categories = explode( ',', $terms );
699
+ $event_taxonomy = $this->_registry->get( 'model.event.taxonomy' );
700
+
701
+ foreach ( $categories as $cat_name ) {
702
+ $cat_name = trim( $cat_name );
703
+ if ( empty( $cat_name ) ) {
704
+ continue;
705
+ }
706
+ $term = $event_taxonomy->initiate_term( $cat_name, $taxonomy, ! $use_name );
707
+ if ( false !== $term ) {
708
+ if ( ! isset( $imported_terms[$term['taxonomy']] ) ) {
709
+ $imported_terms[$term['taxonomy']] = array();
710
+ }
711
+ $imported_terms[$term['taxonomy']][$term['term_id']] = true;
712
+ }
713
+ }
714
+ return $imported_terms;
715
+ }
716
+
717
+ /**
718
+ * Remove the Ticket URL that maybe exists inside the field Description of the Event
719
+ */
720
+ protected function _remove_ticket_url( $description ) {
721
+ return preg_replace( '/<p>[^<>]+<a[^<>]+class=[\'"]?ai1ec-ticket-url-exported[\'"]?[^<>]+>.[^<>]+<\/a>[\.\s]*<\/p>/'
722
+ , ''
723
+ , $description );
724
+ }
725
+
726
+ /* (non-PHPdoc)
727
+ * @see Ai1ec_Import_Export_Engine::export()
728
+ */
729
+ public function export( array $arguments, array $params = array() ) {
730
+ throw new Exception( 'Export not supported' );
731
+ }
732
+
733
+ /**
734
+ * Returns modified exclusions structure for given event.
735
+ *
736
+ * @param vcalendar $e Vcalendar event object.
737
+ * @param array $exclusions Exclusions.
738
+ * @param Ai1ec_Date_Time $start Date time object.
739
+ *
740
+ * @return array Modified exclusions structure.
741
+ */
742
+ protected function _add_recurring_events_exclusions( $e, $exclusions, $start ) {
743
+ $recurrence_id = $e->recurrence_id;
744
+ if ( '' === $recurrence_id ||
745
+ ! isset( $recurrence_id['year'] ) ||
746
+ ! isset( $recurrence_id['month'] ) ||
747
+ ! isset( $recurrence_id['day'] ) ) {
748
+ return $exclusions;
749
+ }
750
+ $year = $month = $day = $hour = $min = $sec = null;
751
+ extract( $recurrence_id, EXTR_IF_EXISTS );
752
+ $timezone = '';
753
+ $exdate = sprintf( '%04d%02d%02d', $year, $month, $day );
754
+ if ( null === $hour ||
755
+ null === $min ||
756
+ null === $sec
757
+ ) {
758
+ $hour = $min = $sec = '00';
759
+ $timezone = 'Z';
760
+ }
761
+ $exdate .= sprintf( 'T%02d%02d%02d%s', $hour, $min, $sec, $timezone );
762
+ $exclusions[$e->uid][] = $exdate;
763
+ return $exclusions;
764
+ }
765
+
766
+
767
+ }
lib/import-export/ics.php CHANGED
@@ -29,22 +29,7 @@ class Ai1ec_Ics_Import_Export_Engine
29
  * @see Ai1ec_Import_Export_Engine::import()
30
  */
31
  public function import( array $arguments ) {
32
- $cal = $this->_registry->get( 'vcalendar' );
33
- if ( $cal->parse( $arguments['source'] ) ) {
34
- try {
35
- $result = $this->add_vcalendar_events_to_db(
36
- $cal,
37
- $arguments
38
- );
39
- } catch ( Ai1ec_Parse_Exception $exception ) {
40
- throw new Ai1ec_Parse_Exception(
41
- 'Processing "' . $arguments['source'] .
42
- '" triggered error: ' . $exception->getMessage()
43
- );
44
- }
45
- return $result;
46
- }
47
- throw new Ai1ec_Parse_Exception( 'The passed string is not a valid ics feed' );
48
  }
49
 
50
  /* (non-PHPdoc)
@@ -322,12 +307,12 @@ class Ai1ec_Ics_Import_Export_Engine
322
  }
323
  }
324
  if ( null !== $matches ) {
325
- $rdate = implode( ',', $matches );
326
- unset( $matches );
327
- unset( $arr );
328
  } else {
329
  $rdate = null;
330
- }
331
  }
332
 
333
  // ===================
@@ -449,7 +434,7 @@ class Ai1ec_Ics_Import_Export_Engine
449
  ) {
450
  $event_do_show_map = 0;
451
  }
452
-
453
  // ==================
454
  // = Cost & tickets =
455
  // ==================
@@ -501,8 +486,8 @@ class Ai1ec_Ics_Import_Export_Engine
501
  "\n",
502
  $e->getProperty( 'description' )
503
  ));
504
-
505
- $description = $this->_remove_ticket_url( $description );
506
 
507
  // Store yet-unsaved values to the $data array.
508
  $data += array(
@@ -547,7 +532,7 @@ class Ai1ec_Ics_Import_Export_Engine
547
  $feed
548
  );
549
 
550
- $event = $this->_registry->get( 'model.event', $data );
551
 
552
  // Instant Event
553
  $is_instant = $e->getProperty( 'X-INSTANT-EVENT' );
@@ -574,18 +559,18 @@ class Ai1ec_Ics_Import_Export_Engine
574
  );
575
  }
576
  if ( null === $matching_event_id ) {
577
-
578
  // =================================================
579
  // = Event was not found, so store it and the post =
580
  // =================================================
581
  $event->save();
582
  $count++;
583
- } else {
584
  // ======================================================
585
  // = Event was found, let's store the new event details =
586
  // ======================================================
587
  $uid_cal = $e->getProperty( 'uid' );
588
- if ( ! ai1ec_is_blank( $uid_cal ) ) {
589
  $uid_cal_original = sprintf( $event->get_uid_pattern(), $matching_event_id );
590
  if ( $uid_cal_original === $uid_cal ) {
591
  //avoiding cycle import
@@ -650,7 +635,7 @@ class Ai1ec_Ics_Import_Export_Engine
650
  } else {
651
  $checkout_url = null;
652
  }
653
-
654
  $currency = $e->getProperty( 'X-API-EVENT-CURRENCY' );
655
  if ( $currency && false === ai1ec_is_blank( $currency[1] ) ) {
656
  $currency = $currency[1];
@@ -660,9 +645,9 @@ class Ai1ec_Ics_Import_Export_Engine
660
  if ( $api_event_id || $api_url || $checkout_url || $currency ) {
661
  if ( ! isset( $api ) ) {
662
  $api = $this->_registry->get( 'model.api.api-ticketing' );
663
- }
664
  $api->save_api_event_data( $event->get( 'post_id' ), $api_event_id, $api_url, $checkout_url, $currency );
665
- }
666
 
667
  $wp_images_url = $e->getProperty( 'X-WP-IMAGES-URL' );
668
  if ( $wp_images_url && false === ai1ec_is_blank( $wp_images_url[1] ) ) {
@@ -671,8 +656,8 @@ class Ai1ec_Ics_Import_Export_Engine
671
  $images_arr[ $key ] = explode( ';', $value );
672
  }
673
  if ( count( $images_arr ) > 0 ) {
674
- update_post_meta( $event->get( 'post_id' ), '_featured_image', $images_arr );
675
- }
676
  }
677
 
678
  unset( $events_in_db[$event->get( 'post_id' )] );
@@ -726,9 +711,9 @@ class Ai1ec_Ics_Import_Export_Engine
726
  if ( isset( $time['params']['TZID'] ) ) {
727
  $timezone = $time['params']['TZID'];
728
  $tzid_values = explode( ':', $timezone );
729
- if ( 2 === count( $tzid_values ) &&
730
  15 === strlen ( $tzid_values[1] ) ) {
731
- //the $e->getProperty('DTSTART') or getProperty('DTEND') for the strings below
732
  //is not returning the value TZID only with the timezone name
733
  //DTSTART;TZID=America/Halifax:20160502T180000
734
  //DTEND;TZID=America/Halifax:20160502T200000
@@ -850,7 +835,7 @@ class Ai1ec_Ics_Import_Export_Engine
850
  $post_meta_values = get_post_meta( $event->get( 'post_id' ), '', false );
851
  $cost_type = null;
852
  if ( $post_meta_values ) {
853
- foreach ($post_meta_values as $key => $value) {
854
  if ( '_ai1ec_cost_type' === $key ) {
855
  $cost_type = $value[0];
856
  }
@@ -883,18 +868,18 @@ class Ai1ec_Ics_Import_Export_Engine
883
  $e->setProperty( 'X-API-URL' , $api->get_api_event_url( $event->get( 'post_id' ) ) );
884
  $e->setProperty( 'X-CHECKOUT-URL' , $api->get_api_event_checkout_url( $event->get( 'post_id' ) ) );
885
  $e->setProperty( 'X-API-EVENT-CURRENCY', $api->get_api_event_currency( $event->get( 'post_id' ) ) );
886
- } else if ( $event->get( 'ticket_url' ) ) {
887
  $url = $event->get( 'ticket_url' );
888
  }
889
 
890
  //Adding Ticket URL to the Description field
891
  if ( false === ai1ec_is_blank( $url ) ) {
892
- $content = $this->_remove_ticket_url( $content );
893
  $content = $content
894
  . '<p>' . __( 'Tickets: ', AI1EC_PLUGIN_NAME )
895
  . '<a class="ai1ec-ticket-url-exported" href="'
896
  . $url . '">' . $url
897
- . '</a>.</p>';
898
  }
899
 
900
  $content = str_replace(']]>', ']]&gt;', $content);
@@ -908,18 +893,18 @@ class Ai1ec_Ics_Import_Export_Engine
908
  if ( empty( $matches ) ) {
909
 
910
  $post_id = get_post_thumbnail_id( $event->get( 'post_id' ) );
911
- $images = null;
912
  $added = null;
913
  foreach ( array( 'thumbnail', 'medium', 'large', 'full' ) as $_size ) {
914
- $attributes = wp_get_attachment_image_src( $post_id, $_size );
915
  if ( false !== $attributes ) {
916
- $key_str = sprintf( '%d_%d', $attributes[1], $attributes[2]);
917
  if ( null === $added || false === isset( $added[$key_str] ) ) {
918
- $added[$key_str] = true;
919
  array_unshift( $attributes, $_size );
920
  $images[] = implode( ';', $attributes );
921
  }
922
- }
923
  }
924
  if ( null !== $images ) {
925
  $e->setProperty(
@@ -1072,7 +1057,7 @@ class Ai1ec_Ics_Import_Export_Engine
1072
  ) {
1073
  if ( 'events_categories' === $cat->taxonomy ) {
1074
  $categories[] = $cat->name;
1075
- }
1076
  }
1077
  $e->setProperty(
1078
  'categories',
29
  * @see Ai1ec_Import_Export_Engine::import()
30
  */
31
  public function import( array $arguments ) {
32
+ throw new Exception( 'Import not supported' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  }
34
 
35
  /* (non-PHPdoc)
307
  }
308
  }
309
  if ( null !== $matches ) {
310
+ $rdate = implode( ',', $matches );
311
+ unset( $matches );
312
+ unset( $arr );
313
  } else {
314
  $rdate = null;
315
+ }
316
  }
317
 
318
  // ===================
434
  ) {
435
  $event_do_show_map = 0;
436
  }
437
+
438
  // ==================
439
  // = Cost & tickets =
440
  // ==================
486
  "\n",
487
  $e->getProperty( 'description' )
488
  ));
489
+
490
+ $description = $this->_remove_ticket_url( $description );
491
 
492
  // Store yet-unsaved values to the $data array.
493
  $data += array(
532
  $feed
533
  );
534
 
535
+ $event = $this->_registry->get( 'model.event', $data );
536
 
537
  // Instant Event
538
  $is_instant = $e->getProperty( 'X-INSTANT-EVENT' );
559
  );
560
  }
561
  if ( null === $matching_event_id ) {
562
+
563
  // =================================================
564
  // = Event was not found, so store it and the post =
565
  // =================================================
566
  $event->save();
567
  $count++;
568
+ } else {
569
  // ======================================================
570
  // = Event was found, let's store the new event details =
571
  // ======================================================
572
  $uid_cal = $e->getProperty( 'uid' );
573
+ if ( ! ai1ec_is_blank( $uid_cal ) ) {
574
  $uid_cal_original = sprintf( $event->get_uid_pattern(), $matching_event_id );
575
  if ( $uid_cal_original === $uid_cal ) {
576
  //avoiding cycle import
635
  } else {
636
  $checkout_url = null;
637
  }
638
+
639
  $currency = $e->getProperty( 'X-API-EVENT-CURRENCY' );
640
  if ( $currency && false === ai1ec_is_blank( $currency[1] ) ) {
641
  $currency = $currency[1];
645
  if ( $api_event_id || $api_url || $checkout_url || $currency ) {
646
  if ( ! isset( $api ) ) {
647
  $api = $this->_registry->get( 'model.api.api-ticketing' );
648
+ }
649
  $api->save_api_event_data( $event->get( 'post_id' ), $api_event_id, $api_url, $checkout_url, $currency );
650
+ }
651
 
652
  $wp_images_url = $e->getProperty( 'X-WP-IMAGES-URL' );
653
  if ( $wp_images_url && false === ai1ec_is_blank( $wp_images_url[1] ) ) {
656
  $images_arr[ $key ] = explode( ';', $value );
657
  }
658
  if ( count( $images_arr ) > 0 ) {
659
+ update_post_meta( $event->get( 'post_id' ), '_featured_image', $images_arr );
660
+ }
661
  }
662
 
663
  unset( $events_in_db[$event->get( 'post_id' )] );
711
  if ( isset( $time['params']['TZID'] ) ) {
712
  $timezone = $time['params']['TZID'];
713
  $tzid_values = explode( ':', $timezone );
714
+ if ( 2 === count( $tzid_values ) &&
715
  15 === strlen ( $tzid_values[1] ) ) {
716
+ //the $e->getProperty('DTSTART') or getProperty('DTEND') for the strings below
717
  //is not returning the value TZID only with the timezone name
718
  //DTSTART;TZID=America/Halifax:20160502T180000
719
  //DTEND;TZID=America/Halifax:20160502T200000
835
  $post_meta_values = get_post_meta( $event->get( 'post_id' ), '', false );
836
  $cost_type = null;
837
  if ( $post_meta_values ) {
838
+ foreach ($post_meta_values as $key => $value) {
839
  if ( '_ai1ec_cost_type' === $key ) {
840
  $cost_type = $value[0];
841
  }
868
  $e->setProperty( 'X-API-URL' , $api->get_api_event_url( $event->get( 'post_id' ) ) );
869
  $e->setProperty( 'X-CHECKOUT-URL' , $api->get_api_event_checkout_url( $event->get( 'post_id' ) ) );
870
  $e->setProperty( 'X-API-EVENT-CURRENCY', $api->get_api_event_currency( $event->get( 'post_id' ) ) );
871
+ } else if ( $event->get( 'ticket_url' ) ) {
872
  $url = $event->get( 'ticket_url' );
873
  }
874
 
875
  //Adding Ticket URL to the Description field
876
  if ( false === ai1ec_is_blank( $url ) ) {
877
+ $content = $this->_remove_ticket_url( $content );
878
  $content = $content
879
  . '<p>' . __( 'Tickets: ', AI1EC_PLUGIN_NAME )
880
  . '<a class="ai1ec-ticket-url-exported" href="'
881
  . $url . '">' . $url
882
+ . '</a>.</p>';
883
  }
884
 
885
  $content = str_replace(']]>', ']]&gt;', $content);
893
  if ( empty( $matches ) ) {
894
 
895
  $post_id = get_post_thumbnail_id( $event->get( 'post_id' ) );
896
+ $images = null;
897
  $added = null;
898
  foreach ( array( 'thumbnail', 'medium', 'large', 'full' ) as $_size ) {
899
+ $attributes = wp_get_attachment_image_src( $post_id, $_size );
900
  if ( false !== $attributes ) {
901
+ $key_str = sprintf( '%d_%d', $attributes[1], $attributes[2]);
902
  if ( null === $added || false === isset( $added[$key_str] ) ) {
903
+ $added[$key_str] = true;
904
  array_unshift( $attributes, $_size );
905
  $images[] = implode( ';', $attributes );
906
  }
907
+ }
908
  }
909
  if ( null !== $images ) {
910
  $e->setProperty(
1057
  ) {
1058
  if ( 'events_categories' === $cat->taxonomy ) {
1059
  $categories[] = $cat->name;
1060
+ }
1061
  }
1062
  $e->setProperty(
1063
  'categories',
lib/robots/helper.php CHANGED
@@ -161,6 +161,7 @@ class Ai1ec_Robots_Helper extends Ai1ec_Base {
161
  "Disallow: /$page_base/action~poster/",
162
  "Disallow: /$page_base/action~*/",
163
  "Disallow: /*controller=ai1ec_exporter_controller*",
 
164
  );
165
  }
166
 
161
  "Disallow: /$page_base/action~poster/",
162
  "Disallow: /$page_base/action~*/",
163
  "Disallow: /*controller=ai1ec_exporter_controller*",
164
+ "Disallow: /*/action~*/",
165
  );
166
  }
167
 
lib/theme/list.php CHANGED
@@ -236,7 +236,7 @@ class Ai1ec_Theme_List extends WP_List_Table {
236
 
237
  // Generate theme activation link.
238
  $activate_link = ai1ec_admin_url( AI1EC_THEME_SELECTION_BASE_URL );
239
- $activate_link = esc_url( add_query_arg(
240
  array(
241
  'ai1ec_action' => 'activate_theme',
242
  'ai1ec_theme_dir' => $theme_dir,
@@ -244,7 +244,7 @@ class Ai1ec_Theme_List extends WP_List_Table {
244
  'ai1ec_stylesheet' => $stylesheet,
245
  'ai1ec_theme_root' => $theme_root,
246
  'ai1ec_theme_url' => $theme_root_uri . '/' . $stylesheet,
247
- ) ),
248
  $activate_link
249
  );
250
  $activate_link = wp_nonce_url(
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,
244
  'ai1ec_stylesheet' => $stylesheet,
245
  'ai1ec_theme_root' => $theme_root,
246
  'ai1ec_theme_url' => $theme_root_uri . '/' . $stylesheet,
247
+ ),
248
  $activate_link
249
  );
250
  $activate_link = wp_nonce_url(
public/admin/css/add_new_event.css CHANGED
@@ -159,26 +159,12 @@
159
  .ai1ec-tickets-form-template {
160
  display: none !important;
161
  }
162
- #ai1ec_add_new_ticket,
163
- #ai1ec_tax_options,
164
- #ai1ec_update_tax_options {
165
  margin: 15px 0 20px;
166
  }
167
  .ai1ec-reset-css * {
168
  all: initial !important;
169
  }
170
- #ai1ec_tax_box {
171
- padding: 20px;
172
- }
173
- #ai1ec_tax_box .ai1ec-loading {
174
- padding: 20px;
175
- }
176
- #ai1ec_tax_box .ai1ec-modal-dialog {
177
- margin-top: 0;
178
- }
179
- #ai1ec_tax_box .ai1ec-modal-body {
180
- padding-top: 0;
181
- }
182
  #ai1ec_cancel_edit_ticket {
183
  margin-right: 6px;
184
  display: none;
159
  .ai1ec-tickets-form-template {
160
  display: none !important;
161
  }
162
+ #ai1ec_add_new_ticket {
 
 
163
  margin: 15px 0 20px;
164
  }
165
  .ai1ec-reset-css * {
166
  all: initial !important;
167
  }
 
 
 
 
 
 
 
 
 
 
 
 
168
  #ai1ec_cancel_edit_ticket {
169
  margin-right: 6px;
170
  display: none;
public/admin/css/settings.css CHANGED
@@ -191,18 +191,328 @@
191
  word-break: break-word;
192
  }
193
  #ics .ai1ec-feed-url {
194
- margin-bottom: 15px;
195
  }
196
- #ics .ai1ec-feed-actions {
197
- margin-top: 15px;
 
198
  }
199
  #ics #ai1ec_cancel_ics {
200
  display: none;
201
  }
202
- #ics .ai1ec-form-group {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
203
  margin-bottom: 10px;
204
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
205
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
206
  /* Calendar theme options */
207
 
208
  #ai1ec-less-variables-tabs .inside {
@@ -262,6 +572,9 @@ div.ai1ec-form-group > .ai1ec-setting-fieldset {
262
  #posterboard_mode {
263
  width: 120px;
264
  }
 
 
 
265
  #ai1ec-api-signout-confirm {
266
  display: none;
267
  padding: 20px;
@@ -275,3 +588,29 @@ div.ai1ec-form-group > .ai1ec-setting-fieldset {
275
  #ai1ec-api-signed-in .ai1ec-fa-check {
276
  color:#6AAB2D;
277
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
191
  word-break: break-word;
192
  }
193
  #ics .ai1ec-feed-url {
194
+ margin-bottom: 10px;
195
  }
196
+ .ai1ec-feed-url-label {
197
+ white-space: nowrap;
198
+ margin-top: 6px;
199
  }
200
  #ics #ai1ec_cancel_ics {
201
  display: none;
202
  }
203
+ .ai1ec-feeds-edit-fields {
204
+ margin-top: 10px;
205
+ }
206
+ .ai1ec-feeds-page {
207
+ max-width: 900px;
208
+ }
209
+
210
+ #suggested .ai1ec-suggested-feeds-list {
211
+ width: 100% !important;
212
+ background: #fff;
213
+ border: 1px solid #ccc;
214
+ margin-right: 15px;
215
+ margin-bottom: 20px;
216
+ border-collapse: collapse;
217
+ }
218
+ #suggested .ai1ec-suggested-feeds-list th {
219
+ color: #fff;
220
+ background: #999;
221
+ font-weight: bold;
222
+ padding: 8px;
223
+ padding-left: 0;
224
+ margin: 0;
225
+ }
226
+ #suggested .ai1ec-suggested-feeds-list tr {
227
+ border-bottom: 1px solid #ddd;
228
+ }
229
+ #suggested .ai1ec-suggested-feeds-list td {
230
+ padding: 5px 0;
231
+ }
232
+ #suggested .ai1ec-suggested-feed-title {
233
+ font-weight: bold;
234
+ }
235
+ #suggested .ai1ec-suggested-feeds-description {
236
+ color: #999;
237
+ font-size: 11px;
238
+ }
239
+ #suggested .ai1ec-suggested-add-feed {
240
+ display: inline-block;
241
+ }
242
+ #suggested .ai1ec-suggested-secondary-action {
243
+ font-size: 12px;
244
+ display: inline-block;
245
+ margin: 0 15px;
246
+ }
247
+ #suggested td.ai1ec-suggested-primary-actions {
248
+ width: 1px;
249
+ }
250
+ #suggested td.ai1ec-suggested-secondary-actions {
251
+ width: 1px;
252
+ white-space: nowrap;
253
+ }
254
+ .ai1ec-ics-signup-box {
255
+ margin-bottom: 30px;
256
+ }
257
+ #suggested .ai1ec-suggested-events-container {
258
+ padding: 7px !important;
259
+ background: #eee;
260
+ }
261
+ #suggested table.ai1ec-suggested-events {
262
+ width: 100%;
263
+ background: #fff;
264
+ table-layout: fixed;
265
+ }
266
+ #suggested.ai1ec-feeds-both .ai1ec-feeds-list-container {
267
+ width: 55%;
268
+ float: left;
269
+ }
270
+ #suggested table.ai1ec-suggested-events tr {
271
+ border: 1px solid #ddd;
272
+ margin: 10px;
273
+ transition: background-color 0.2s ease;
274
+ height: 52px;
275
+ }
276
+ #ai1ec_events_map_canvas {
277
+ left: 0;
278
+ opacity: 1;
279
+ transition: all 0.2s ease;
280
+ z-index: 10;
281
+ }
282
+ #suggested.ai1ec-feeds-both .goes-left {
283
+ left: -395px;
284
+ opacity: 0;
285
+ pointer-events: none;
286
+ }
287
+ .ai1ec-feeds-migration.ai1ec-ics-feeds-list .ai1ec-btn {
288
+ display: none !important;
289
+ }
290
+ .ai1ec-myfeeds-removing {
291
+ text-decoration: line-through;
292
+ }
293
+ #ai1ec_events_extra_details {
294
+ position: absolute;
295
+ z-index: 1;
296
+ width: 44%;
297
+ height: 417px;
298
+ border: 1px solid #ddd;
299
+ background: #f5f5f5;
300
+ padding: 20px;
301
+ overflow-y: auto;
302
+ }
303
+ #ai1ec_events_extra_details img {
304
+ max-height: 100px;
305
+ max-width: 268px;
306
+ border: 1px solid #eee;
307
  margin-bottom: 10px;
308
  }
309
+ #ai1ec_events_extra_details .ai1ec-extra-title {
310
+ font-weight: bold;
311
+ }
312
+ #ai1ec_events_extra_details .ai1ec-extra-date {
313
+
314
+ }
315
+ #ai1ec_events_extra_details .ai1ec-extra-description {
316
+ margin-top: 20px;
317
+ }
318
+ #suggested.ai1ec-has-map {
319
+ min-height: 581px;
320
+ }
321
+ #suggested table.ai1ec-suggested-events td {
322
+ padding: 5px;
323
+ vertical-align: top;
324
+ border: none;
325
+ }
326
+ #suggested td.ai1ec-suggested-event-actions {
327
+ width: 125px;
328
+ text-align: center;
329
+ }
330
+ #suggested.ai1ec-feeds-both td.ai1ec-suggested-event-actions {
331
+ width: 95px;
332
+ }
333
+ #suggested .ai1ec-suggested-event-import a {
334
+ width: 100%;
335
+ font-size: 12px;
336
+ padding: 3px 5px;
337
+ }
338
+ #suggested.ai1ec-feeds-both .ai1ec-suggested-event-import a {
339
+ font-size: 11px;
340
+ padding: 1px 4px;
341
+ }
342
+ #suggested.ai1ec-feeds-both .ai1ec-suggested-map-container {
343
+ width: 45%;
344
+ float: left;
345
+ }
346
+ #suggested .ai1ec-suggested-map-container .ai1ec-suggested-event-import a {
347
+ width: 80px;
348
+ font-size: 11px;
349
+ padding: 3px 6px;
350
+ border-radius: 2px;
351
+ line-height: 1.2;
352
+ margin-top: 7px;
353
+ }
354
+ #suggested .ai1ec-suggested-map-container .ai1ec-suggested-event-import .ai1ec-suggested-whole-feed {
355
+ display: none;
356
+ }
357
+ #suggested td.ai1ec-suggested-image {
358
+ width: 100px;
359
+ background: #fcfcfc;
360
+ border-right: 1px solid #f5f5f5;
361
+ background-position: center center;
362
+ background-size: cover;
363
+ background-repeat: no-repeat;
364
+ }
365
+ #suggested.ai1ec-feeds-both td.ai1ec-suggested-image {
366
+ width: 52px;
367
+ }
368
+ #suggested .ai1ec-suggested-no-events {
369
+ padding: 20px;
370
+ font-weight: bold;
371
+ }
372
+ #suggested .ai1ec-feeds-pagination {
373
+ margin: auto 0;
374
+ color: #666;
375
+ margin-bottom: 30px;
376
+ }
377
+ #suggested .ai1ec-feeds-pagination .current {
378
+ font-weight: bold;
379
+ font-size: 14px;
380
+ }]
381
+ #suggested .tablenav-pages {
382
+ margin: 1em 0;
383
+ }
384
+ #suggested .ai1ec-feeds-pagination a {
385
+ color: #6AAB2D !important;
386
+ background: #f5f5f5;
387
+ border-color: #f0f0f0;
388
+ font-size: 14px;
389
+ padding: 3px 5px;
390
+ }
391
+ .ai1ec-feeds-map .ai1ec-feeds-pagination {
392
+ display: none;
393
+ }
394
+ .ai1ec-feeds-map .ai1ec-suggested-events {
395
+ display: none !important;
396
+ }
397
+ #suggested.ai1ec-feeds-both td.ai1ec-suggested-image {
398
+ transition: background-color 0.2s ease;
399
+ }
400
+ #suggested.ai1ec-feeds-both .ai1ec-suggested-hover td.ai1ec-suggested-image {
401
+ background-color: #feb;
402
+ }
403
+ #suggested td.ai1ec-suggested-content {
404
+ padding: 5px 10px !important;
405
+ overflow: hidden;
406
+ display: block;
407
+ }
408
+ #suggested.ai1ec-feeds-both td.ai1ec-suggested-content {
409
+ padding: 4px 10px !important;
410
+ height: 40px;
411
+ }
412
+ #suggested div.ai1ec-suggested-description {
413
+ font-size: 12px;
414
+ color: #666;
415
+ max-height: 45px;
416
+ margin-top: 7px;
417
+ }
418
+ #suggested.ai1ec-feeds-both div.ai1ec-suggested-description {
419
+ display: none;
420
+ }
421
+ #suggested .ai1ec-feeds-loading {
422
+ opacity: 0.3;
423
+ pointer-events: none;
424
+ -webkit-filter: grayscale(100%) !important;
425
+ }
426
+ #suggested .ai1ec-suggested-date {
427
+ font-size: 12px;
428
+ color: #666;
429
+ }
430
+ #suggested a.ai1ec-suggested-title {
431
+ font-weight: bold;
432
+ pointer-events: none;
433
+ }
434
+ #suggested.ai1ec-feeds-both a.ai1ec-suggested-title {
435
+ pointer-events: all;
436
+ }
437
+ #suggested a.ai1ec-suggested-whole-feed {
438
+ font-size: 12px;
439
+ border: none !important;
440
+ margin-top: 3px;
441
+ display: inline-block;
442
+ }
443
+ #suggested.ai1ec-feeds-both a.ai1ec-suggested-whole-feed {
444
+ white-space: nowrap;
445
+ font-size: 11px;
446
+ }
447
+ #suggested #ai1ec_events_map_canvas {
448
+ height: 100%;
449
+ min-height: 417px;
450
+ border: 1px solid #ddd;
451
+ background: #f5f5f5;
452
+ }
453
+ #suggested .ai1ec-suggested-view-selector {
454
+ text-align: right;
455
+ color: #ddd;
456
+ font-size: 16px;
457
+ margin-bottom: 15px;
458
+ }
459
+ #suggested .ai1ec-suggested-view-selector a {
460
+ font-size: 14px;
461
+ color: #6AAB2D;
462
+
463
+ }
464
+ #suggested .ai1ec-suggested-view-selector a.ai1ec-active {
465
+ font-size: 14px;
466
+ color: #666;
467
+ font-weight: bold;
468
+ pointer-events: none;
469
+ }
470
+ #suggested.ai1ec-feeds-both .ai1ec-suggested-hover {
471
+ background: #feb;
472
+ }
473
 
474
+ #suggested .ai1ec-infowindow-title {
475
+ font-weight: bold;
476
+ }
477
+ #ai1ec_suggested_search {
478
+ margin-top: 12px;
479
+ min-width: 90px;
480
+ }
481
+ #suggested .ai1ec-suggested-search-form {
482
+ padding: 10px 20px;
483
+ }
484
+ #suggested .ai1ec-suggested-search-form label {
485
+ color: #333;
486
+ font-size: 13px;
487
+ margin-right: 4px;
488
+ }
489
+ #suggested .ai1ec-suggested-search-form input {
490
+ margin-top: 2px;
491
+ }
492
+ #ai1ec_suggested_term {
493
+ min-width: 320px;
494
+ }
495
+ #suggested .ai1ec-suggested-results,
496
+ #suggested .ai1ec-suggested-no-results {
497
+ display: none;
498
+ }
499
+ #suggested .ai1ec-suggested-no-results {
500
+ padding: 20px;
501
+ }
502
+ #suggested .ai1ec-suggested-no-results p {
503
+ color: #666;
504
+ }
505
+ #suggested .ai1ec-open-event {
506
+ float: right;
507
+ display: none;
508
+ }
509
+ #ai1ec-discovery-status {
510
+ color: #6AAB2D;
511
+ font-weight: bold;
512
+ }
513
+ #ai1ec-discovery-status.ai1ec-error {
514
+ color: #FF0000;
515
+ }
516
  /* Calendar theme options */
517
 
518
  #ai1ec-less-variables-tabs .inside {
572
  #posterboard_mode {
573
  width: 120px;
574
  }
575
+ #suggested input.ai1ec-error {
576
+ border-color: #f00;
577
+ }
578
  #ai1ec-api-signout-confirm {
579
  display: none;
580
  padding: 20px;
588
  #ai1ec-api-signed-in .ai1ec-fa-check {
589
  color:#6AAB2D;
590
  }
591
+ #ai1ec_tax_options,
592
+ #ai1ec_update_tax_options {
593
+ margin: 15px 0 20px;
594
+ }
595
+ #ai1ec_tax_box {
596
+ padding: 20px;
597
+ }
598
+ #ai1ec_tax_box .ai1ec-loading {
599
+ padding: 20px;
600
+ }
601
+ #ai1ec_tax_box .ai1ec-modal-dialog {
602
+ margin-top: 0;
603
+ }
604
+ #ai1ec_tax_box .ai1ec-modal-body {
605
+ padding-top: 0;
606
+ }
607
+ .ai1ec_ep_tax_error {
608
+ color: red;
609
+ font-weight: bold;
610
+ margin-bottom: -10px;
611
+ }
612
+ .ai1ec_ep_terms_error {
613
+ color: red;
614
+ font-weight: bold;
615
+ margin-bottom: 5px;
616
+ }
public/admin/feed_row.php CHANGED
@@ -3,7 +3,7 @@
3
  <a data-toggle="ai1ec-collapse"
4
  data-parent="#ai1ec-feeds-accordion"
5
  href="#ai1ec-feed-<?php echo $feed_id; ?>">
6
- <?php echo $feed_name; ?>
7
  </a>
8
  </div>
9
  <div class="ai1ec-panel-collapse ai1ec-collapse"
@@ -11,116 +11,159 @@
11
  <div class="ai1ec-panel-body">
12
  <div class="ai1ec-feed-content">
13
  <div class="ai1ec-form-group">
14
- <label><?php _e( 'iCalendar/.ics Feed URL:', AI1EC_PLUGIN_NAME ); ?></label>
15
- <input type="text" class="ai1ec-feed-url ai1ec-form-control"
16
- readonly="readonly" value="<?php echo esc_attr( $feed_url ) ?>">
 
 
 
 
 
 
17
  </div>
18
  <input type="hidden" name="feed_id" class="ai1ec_feed_id"
19
  value="<?php echo $feed_id; ?>">
20
- <div class="ai1ec-clearfix">
21
- <?php if ( $event_category ) : ?>
22
- <div class="ai1ec-feed-category"
23
- data-ids="<?php echo esc_attr( $categories_ids ); ?>">
24
- <?php _e( 'Event categories:', AI1EC_PLUGIN_NAME ); ?>
25
- <strong><?php echo $event_category; ?></strong>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  </div>
27
- <?php endif; ?>
28
- <?php if ( $tags ) : ?>
29
- <div class="ai1ec-feed-tags ai1ec-pull-left"
30
- data-ids="<?php echo esc_attr( $tags_ids ); ?>">
31
- <?php _e( 'Tag with', AI1EC_PLUGIN_NAME ); ?>:
32
- <strong><?php echo $tags; ?></strong>
 
 
 
 
33
  </div>
34
- <?php endif; ?>
35
- </div>
36
- <?php do_action( 'ai1ec_ics_row_after_categories_tags', $feed_id ); ?>
37
- <div class="ai1ec-clearfix">
38
- <div class="ai1ec-feed-comments-enabled"
39
- data-state="<?php echo esc_attr( $comments_enabled ? 1 : 0 ); ?>">
40
- <?php _e( 'Allow comments', AI1EC_PLUGIN_NAME ); ?>:
41
  <strong><?php
42
- if ( $comments_enabled ) {
43
  _e( 'Yes', AI1EC_PLUGIN_NAME );
44
  } else {
45
  _e( 'No', AI1EC_PLUGIN_NAME );
46
  }
47
  ?></strong>
48
  </div>
49
- <div class="ai1ec-feed-map-display-enabled"
50
- data-state="<?php echo esc_attr( $map_display_enabled ? 1 : 0 ); ?>">
51
- <?php _e( 'Show map', AI1EC_PLUGIN_NAME ); ?>:
 
52
  <strong><?php
53
- if ( $map_display_enabled ) {
54
  _e( 'Yes', AI1EC_PLUGIN_NAME );
55
  } else {
56
  _e( 'No', AI1EC_PLUGIN_NAME );
57
  }
58
  ?></strong>
59
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  </div>
61
- <div class="ai1ec-feed-keep-tags-categories"
62
- data-state="<?php echo esc_attr( $keep_tags_categories ? 1 : 0 ); ?>">
63
- <?php _e( 'Keep original events categories and tags', AI1EC_PLUGIN_NAME ); ?>:
64
- <strong><?php
65
- if ( $keep_tags_categories ) {
66
- _e( 'Yes', AI1EC_PLUGIN_NAME );
67
- } else {
68
- _e( 'No', AI1EC_PLUGIN_NAME );
69
- }
70
- ?></strong>
71
- </div>
72
- <?php do_action( 'ai1ec_ics_row_after_keep_categories_tags', $feed_id ); ?>
73
- <div class="ai1ec-feed-keep-old-events"
74
- data-state="<?php echo esc_attr( $keep_old_events ? 1 : 0 ); ?>">
75
- <?php _e( 'On refresh, preserve previously imported events that are missing from the feed', AI1EC_PLUGIN_NAME ); ?>:
76
- <strong><?php
77
- if ( $keep_old_events ) {
78
- _e( 'Yes', AI1EC_PLUGIN_NAME );
79
- } else {
80
- _e( 'No', AI1EC_PLUGIN_NAME );
81
- }
82
- ?></strong>
83
- </div>
84
- <div class="ai1ec-feed-import-timezone"
85
- data-state="<?php echo esc_attr( $feed_import_timezone ? 1 : 0 ); ?>">
86
- <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 ); ?>">
87
- <?php _e( 'Assign default time zone to events in UTC', AI1EC_PLUGIN_NAME );
88
- ?>:</span>
89
- <strong><?php
90
- if ( $feed_import_timezone ) {
91
- _e( 'Yes', AI1EC_PLUGIN_NAME );
92
- } else {
93
- _e( 'No', AI1EC_PLUGIN_NAME );
94
- } ?>
95
- </strong>
96
  </div>
97
  <?php do_action( 'ai1ec_ics_row_after_settings', $feed_id ); ?>
98
- <div class="ai1ec-btn-group ai1ec-pull-right ai1ec-feed-actions">
99
- <button type="button"
100
- class="ai1ec-btn ai1ec-btn-sm ai1ec-btn-default ai1ec-text-primary
101
- ai1ec_update_ics"
102
- data-loading-text="<?php echo esc_attr(
103
- '<i class="ai1ec-fa ai1ec-fa-refresh ai1ec-fa-spin ai1ec-fa-fw"></i> ' .
104
- __( 'Refreshing&#8230;', AI1EC_PLUGIN_NAME ) ); ?>">
105
- <i class="ai1ec-fa ai1ec-fa-refresh ai1ec-fa-fw"></i>
106
- <?php _e( 'Refresh', AI1EC_PLUGIN_NAME ); ?>
107
- </button>
108
- <button type="button"
109
- class="ai1ec-btn ai1ec-btn-sm ai1ec-btn-default ai1ec-text-warning
110
- ai1ec_edit_ics">
111
- <i class="ai1ec-fa ai1ec-fa-edit ai1ec-fa-fw"></i>
112
- <?php _e( 'Edit', AI1EC_PLUGIN_NAME ); ?>
113
- </button>
114
- <button type="button"
115
- class="ai1ec-btn ai1ec-btn-sm ai1ec-btn-default ai1ec-text-danger
116
- ai1ec_delete_ics"
117
- data-loading-text="<?php echo esc_attr(
118
- '<i class="ai1ec-fa ai1ec-fa-spinner ai1ec-fa-spin ai1ec-fa-fw"></i> ' .
119
- __( 'Removing&#8230;', AI1EC_PLUGIN_NAME ) ); ?>">
120
- <i class="ai1ec-fa ai1ec-fa-times ai1ec-fa-fw"></i>
121
- <?php _e( 'Remove', AI1EC_PLUGIN_NAME ); ?>
122
- </button>
123
- </div>
124
  </div>
125
  </div>
126
  </div>
3
  <a data-toggle="ai1ec-collapse"
4
  data-parent="#ai1ec-feeds-accordion"
5
  href="#ai1ec-feed-<?php echo $feed_id; ?>">
6
+ <?php echo parse_url( trim( $feed_url ), PHP_URL_HOST ); ?>
7
  </a>
8
  </div>
9
  <div class="ai1ec-panel-collapse ai1ec-collapse"
11
  <div class="ai1ec-panel-body">
12
  <div class="ai1ec-feed-content">
13
  <div class="ai1ec-form-group">
14
+ <div class="ai1ec-col-sm-1">
15
+ <label class="ai1ec-feed-url-label">
16
+ <?php _e( 'Feed URL:', AI1EC_PLUGIN_NAME ); ?>
17
+ </label>
18
+ </div>
19
+ <div class="ai1ec-col-sm-11">
20
+ <input type="text" class="ai1ec-feed-url ai1ec-form-control"
21
+ readonly="readonly" value="<?php echo esc_attr( $feed_url ) ?>">
22
+ </div>
23
  </div>
24
  <input type="hidden" name="feed_id" class="ai1ec_feed_id"
25
  value="<?php echo $feed_id; ?>">
26
+ <div>
27
+ <div class="ai1ec-clearfix">
28
+ <?php if ( $event_category ) : ?>
29
+ <div class="ai1ec-feed-category"
30
+ data-ids="<?php echo esc_attr( $categories_ids ); ?>">
31
+ <?php _e( 'Event categories:', AI1EC_PLUGIN_NAME ); ?>
32
+ <strong><?php echo $event_category; ?></strong>
33
+ </div>
34
+ <?php endif; ?>
35
+ <?php if ( $tags ) : ?>
36
+ <div class="ai1ec-feed-tags ai1ec-pull-left"
37
+ data-ids="<?php echo esc_attr( $tags_ids ); ?>">
38
+ <?php _e( 'Tag with', AI1EC_PLUGIN_NAME ); ?>:
39
+ <strong><?php echo $tags; ?></strong>
40
+ </div>
41
+ <?php endif; ?>
42
+ </div>
43
+ <?php do_action( 'ai1ec_ics_row_after_categories_tags', $feed_id ); ?>
44
+ <div class="ai1ec-clearfix">
45
+ <div class="ai1ec-feed-comments-enabled"
46
+ data-state="<?php echo esc_attr( $comments_enabled ? 1 : 0 ); ?>">
47
+ <?php _e( 'Allow comments', AI1EC_PLUGIN_NAME ); ?>:
48
+ <strong><?php
49
+ if ( $comments_enabled ) {
50
+ _e( 'Yes', AI1EC_PLUGIN_NAME );
51
+ } else {
52
+ _e( 'No', AI1EC_PLUGIN_NAME );
53
+ }
54
+ ?></strong>
55
  </div>
56
+ <div class="ai1ec-feed-map-display-enabled"
57
+ data-state="<?php echo esc_attr( $map_display_enabled ? 1 : 0 ); ?>">
58
+ <?php _e( 'Show map', AI1EC_PLUGIN_NAME ); ?>:
59
+ <strong><?php
60
+ if ( $map_display_enabled ) {
61
+ _e( 'Yes', AI1EC_PLUGIN_NAME );
62
+ } else {
63
+ _e( 'No', AI1EC_PLUGIN_NAME );
64
+ }
65
+ ?></strong>
66
  </div>
67
+ </div>
68
+ <div class="ai1ec-feed-keep-tags-categories"
69
+ data-state="<?php echo esc_attr( $keep_tags_categories ? 1 : 0 ); ?>">
70
+ <?php _e( 'Keep original events categories and tags', AI1EC_PLUGIN_NAME ); ?>:
 
 
 
71
  <strong><?php
72
+ if ( $keep_tags_categories ) {
73
  _e( 'Yes', AI1EC_PLUGIN_NAME );
74
  } else {
75
  _e( 'No', AI1EC_PLUGIN_NAME );
76
  }
77
  ?></strong>
78
  </div>
79
+ <?php do_action( 'ai1ec_ics_row_after_keep_categories_tags', $feed_id ); ?>
80
+ <div class="ai1ec-feed-keep-old-events"
81
+ data-state="<?php echo esc_attr( $keep_old_events ? 1 : 0 ); ?>">
82
+ <?php _e( 'On refresh, preserve previously imported events that are missing from the feed', AI1EC_PLUGIN_NAME ); ?>:
83
  <strong><?php
84
+ if ( $keep_old_events ) {
85
  _e( 'Yes', AI1EC_PLUGIN_NAME );
86
  } else {
87
  _e( 'No', AI1EC_PLUGIN_NAME );
88
  }
89
  ?></strong>
90
  </div>
91
+ <div class="ai1ec-feed-import-timezone"
92
+ data-state="<?php echo esc_attr( $feed_import_timezone ? 1 : 0 ); ?>">
93
+ <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 ); ?>">
94
+ <?php _e( 'Assign default time zone to events in UTC', AI1EC_PLUGIN_NAME );
95
+ ?>:</span>
96
+ <strong><?php
97
+ if ( $feed_import_timezone ) {
98
+ _e( 'Yes', AI1EC_PLUGIN_NAME );
99
+ } else {
100
+ _e( 'No', AI1EC_PLUGIN_NAME );
101
+ } ?>
102
+ </strong>
103
+ </div>
104
+
105
+ <?php if ( sizeof( $feed_events_uids ) > 0 ) : ?>
106
+ <div class="ai1ec-feed-category"
107
+ data-ids="<?php echo esc_attr( $categories_ids ); ?>"><br />
108
+ <label><?php _e( 'List of imported events:', AI1EC_PLUGIN_NAME ); ?></label>
109
+ <br />
110
+ <strong>
111
+ <?php
112
+ foreach ( $feed_events_uids as $feed_event_uid => $feed_event_title ):?>
113
+ <div class="ai1ec-myfeeds-event"
114
+ data-event-id="<?php echo esc_attr( $feed_event_uid ); ?>"
115
+ data-feed-id="<?php echo esc_attr( $feed_name ); ?>">
116
+ <?php echo $feed_event_title; ?>&nbsp;&nbsp;
117
+ <a href="#" class="ai1ec-btn ai1ec-btn-secondary ai1ec-btn-xs ai1ec-text-warning
118
+ ai1ec-disabled ai1ec-hidden ai1ec-suggested-removing">
119
+ <?php _e( 'Removing', AI1EC_PLUGIN_NAME ); ?>&hellip;
120
+ </a>
121
+ <a href="#" class="ai1ec-btn ai1ec-btn-secondary ai1ec-btn-xs ai1ec-text-danger
122
+ ai1ec-suggested-remove-event">
123
+ <i class="ai1ec-fa ai1ec-fa-minus ai1ec-fa-xs ai1ec-fa-fw"></i>
124
+ <?php _e( 'Remove', AI1EC_PLUGIN_NAME ); ?>
125
+ </a>
126
+ </div>
127
+ <?php endforeach; ?>
128
+ </strong>
129
+ </div>
130
+ <?php endif; ?>
131
  </div>
132
+ <div>
133
+ <div class="ai1ec-btn-group ai1ec-pull-right ai1ec-feed-actions">
134
+ <?php
135
+ if ( $api_signed ):
136
+ ?>
137
+ <button type="button"
138
+ class="ai1ec-btn ai1ec-btn-sm ai1ec-btn-default ai1ec-text-primary
139
+ ai1ec_update_ics"
140
+ data-loading-text="<?php echo esc_attr(
141
+ '<i class="ai1ec-fa ai1ec-fa-refresh ai1ec-fa-spin ai1ec-fa-fw"></i> ' .
142
+ __( 'Refreshing&#8230;', AI1EC_PLUGIN_NAME ) ); ?>">
143
+ <i class="ai1ec-fa ai1ec-fa-refresh ai1ec-fa-fw"></i>
144
+ <?php _e( 'Refresh', AI1EC_PLUGIN_NAME ); ?>
145
+ </button>
146
+ <button type="button"
147
+ class="ai1ec-btn ai1ec-btn-sm ai1ec-btn-default ai1ec-text-warning
148
+ ai1ec_edit_ics">
149
+ <i class="ai1ec-fa ai1ec-fa-edit ai1ec-fa-fw"></i>
150
+ <?php _e( 'Edit', AI1EC_PLUGIN_NAME ); ?>
151
+ </button>
152
+ <?php
153
+ endif;
154
+ ?>
155
+ <button type="button"
156
+ class="ai1ec-btn ai1ec-btn-sm ai1ec-btn-default ai1ec-text-danger
157
+ ai1ec_delete_ics"
158
+ data-loading-text="<?php echo esc_attr(
159
+ '<i class="ai1ec-fa ai1ec-fa-spinner ai1ec-fa-spin ai1ec-fa-fw"></i> ' .
160
+ __( 'Removing&#8230;', AI1EC_PLUGIN_NAME ) ); ?>">
161
+ <i class="ai1ec-fa ai1ec-fa-times ai1ec-fa-fw"></i>
162
+ <?php _e( 'Remove', AI1EC_PLUGIN_NAME ); ?>
163
+ </button>
164
+ </div>
 
 
165
  </div>
166
  <?php do_action( 'ai1ec_ics_row_after_settings', $feed_id ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
167
  </div>
168
  </div>
169
  </div>
public/admin/feeds_settings.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="wrap">
2
+
3
+ <?php screen_icon(); ?>
4
+
5
+ <h2><?php echo $title; ?></h2>
6
+
7
+ <div id="poststuff">
8
+
9
+ <div class="metabox-holder">
10
+ <div class="post-box-container ai1ec-feeds-page left-side timely">
11
+ <?php do_meta_boxes( $settings_page, 'left', null ); ?>
12
+ </div>
13
+ </div>
14
+
15
+ </div><!-- #poststuff -->
16
+
17
+ </div><!-- .wrap -->
public/admin/plugins/ics/display_feeds.php CHANGED
@@ -1,105 +1,52 @@
1
- <p>
2
- <?php _e(
3
- 'Configure which other calendars your own calendar subscribes to.
4
- You can add any calendar that provides an iCalendar (.ics) feed.
5
- Enter the feed URL(s) below and the events from those feeds will be
6
- imported periodically.',
7
- AI1EC_PLUGIN_NAME ); ?>
8
- </p>
9
- <div id="ics-alerts"></div>
10
- <div class="ai1ec-form-horizontal">
11
- <div class="ai1ec-form-group">
12
- <div class="ai1ec-col-md-12">
13
- <label class="ai1ec-control-label ai1ec-pull-left" for="cron_freq">
14
- <?php _e( 'Check for new events', AI1EC_PLUGIN_NAME ) ?>:
15
- </label>
16
- <div class="ai1ec-col-sm-6">
17
- <?php echo $cron_freq ?>
18
- </div>
19
- </div>
20
- </div>
21
  </div>
22
-
23
- <div id="ai1ec-feeds-after"
24
- class="ai1ec-feed-container ai1ec-well ai1ec-well-sm ai1ec-clearfix">
25
- <div class="ai1ec-form-group">
26
- <label for="ai1ec_feed_url">
27
- <?php _e( 'iCalendar/.ics Feed URL:', AI1EC_PLUGIN_NAME ) ?>
28
- </label>
29
- <input type="text" name="ai1ec_feed_url" id="ai1ec_feed_url"
30
- class="ai1ec-form-control" maxlength="255">
31
- </div>
32
- <div class="ai1ec-row">
33
- <div class="ai1ec-col-sm-6">
34
- <?php $event_categories->render(); ?>
35
- </div>
36
- <div class="ai1ec-col-sm-6">
37
- <?php $event_tags->render(); ?>
38
- </div>
39
- </div>
40
- <?php do_action( 'ai1ec_ics_row_after_categories_tags', null ); ?>
41
- <div class="ai1ec-feed-comments-enabled">
42
- <label for="ai1ec_comments_enabled">
43
- <input type="checkbox" name="ai1ec_comments_enabled"
44
- id="ai1ec_comments_enabled" value="1">
45
- <?php _e( 'Allow comments on imported events', AI1EC_PLUGIN_NAME ); ?>
46
- </label>
47
- </div>
48
- <div class="ai1ec-feed-map-display-enabled">
49
- <label for="ai1ec_map_display_enabled">
50
- <input type="checkbox" name="ai1ec_map_display_enabled"
51
- id="ai1ec_map_display_enabled" value="1">
52
- <?php _e( 'Show map on imported events', AI1EC_PLUGIN_NAME ); ?>
53
- </label>
54
- </div>
55
- <div class="ai1ec-feed-add-tags-categories">
56
- <label for="ai1ec_add_tag_categories">
57
- <input type="checkbox" name="ai1ec_add_tag_categories"
58
- id="ai1ec_add_tag_categories" value="1">
59
- <?php _e( 'Import any tags/categories provided by feed, in addition those selected above', AI1EC_PLUGIN_NAME ); ?>
60
- </label>
61
- </div>
62
- <?php do_action( 'ai1ec_ics_row_after_keep_categories_tags', null ); ?>
63
- <div class="ai1ec-feed-keep-old-events">
64
- <label for="ai1ec_keep_old_events">
65
- <input type="checkbox" name="ai1ec_keep_old_events"
66
- id="ai1ec_keep_old_events" value="1">
67
- <?php _e( 'On refresh, preserve previously imported events that are missing from the feed', AI1EC_PLUGIN_NAME ); ?>
68
- </label>
69
- </div>
70
- <div class="ai1ec-feed-import-timezone">
71
- <label for="ai1ec_feed_import_timezone">
72
- <input type="checkbox" name="ai1ec_feed_import_timezones"
73
- id="ai1ec_feed_import_timezone" value="1">
74
- <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 ); ?>">
75
- <?php _e( 'Assign default time zone to events in UTC', AI1EC_PLUGIN_NAME ); ?>
76
- </span>
77
- </label>
78
- </div>
79
- <?php do_action( 'ai1ec_ics_row_after_settings', null ); ?>
80
- <div class="ai1ec-pull-right">
81
- <button type="button" id="ai1ec_cancel_ics"
82
- class="ai1ec-btn ai1ec-btn-primary ai1ec-btn-sm">
83
- <i class="ai1ec-fa ai1ec-fa-cancel"></i>
84
- <?php _e( 'Cancel', AI1EC_PLUGIN_NAME ); ?>
85
- </button>
86
- <button type="button" id="ai1ec_add_new_ics"
87
- class="ai1ec-btn ai1ec-btn-primary ai1ec-btn-sm"
88
- data-loading-text="<?php echo esc_attr(
89
- '<i class="ai1ec-fa ai1ec-fa-spinner ai1ec-fa-spin ai1ec-fa-fw"></i> ' .
90
- __( 'Please wait&#8230;', AI1EC_PLUGIN_NAME ) ); ?>">
91
- <i class="ai1ec-fa ai1ec-fa-plus"></i>
92
- <span id="ai1ec_ics_add_new">
93
- <?php _e( 'Add new subscription', AI1EC_PLUGIN_NAME ); ?>
94
- </span>
95
- <span id="ai1ec_ics_update" class="ai1ec-hidden">
96
- <?php _e( 'Update subscription', AI1EC_PLUGIN_NAME ); ?>
97
- </span>
98
- </button>
99
- </div>
100
  </div>
101
-
102
- <div class="timely ai1ec-form-inline ai1ec-panel-group" id="ai1ec-feeds-accordion">
 
 
 
 
 
103
  <?php echo $feed_rows; ?>
104
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
105
  <?php echo $modal->render(); ?>
1
+ <?php
2
+ if ( ! $api_signed ):
3
+ ?>
4
+ <div class="ai1ec-ics-signup-box">
5
+ <p>
6
+ <?php _e( 'Please, Sign In to <b>Timely Network</b> to manage your feeds.', AI1EC_PLUGIN_NAME ) ?>
7
+ </p>
8
+ <a href="edit.php?post_type=ai1ec_event&page=all-in-one-event-calendar-settings"
9
+ class="ai1ec-btn ai1ec-btn-primary ai1ec-btn-md">
10
+ <?php _e( 'Sign In to Timely Network', AI1EC_PLUGIN_NAME ) ?>
11
+ </a>
 
 
 
 
 
 
 
 
 
12
  </div>
13
+ <?php
14
+ endif;
15
+ ?>
16
+ <div id="ics-alerts"></div>
17
+ <p></p>
18
+ <?php
19
+ if ( $migration ):
20
+ ?>
21
+ <div class="ai1ec-feeds-migration">
22
+ <?php _e(
23
+ '<b>Your feeds will be migrated at the next scheduled refresh (it can take up to one hour).</b><br />
24
+ You can\'t edit or remove them at the moment.
25
+ Please, visit this page later to manage your feeds.',
26
+ AI1EC_PLUGIN_NAME )
27
+ ?>
28
+ <br /><br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  </div>
30
+ <?php
31
+ endif;
32
+ ?>
33
+ <h5><?php _e( 'My imported Feeds:', AI1EC_PLUGIN_NAME ) ?></h5>
34
+ <div class="timely ai1ec-form-inline ai1ec-panel-group ai1ec-ics-feeds-list
35
+ <?php if ( $migration ):?>ai1ec-feeds-migration<?php endif; ?>"
36
+ id="ai1ec-feeds-accordion">
37
  <?php echo $feed_rows; ?>
38
  </div>
39
+ <br />
40
+ <?php
41
+ if ( $single_feed_rows ):
42
+ ?>
43
+ <h5><?php _e( 'My imported Events (click on the feed to see the individually imported events):', AI1EC_PLUGIN_NAME ) ?></h5>
44
+ <div class="timely ai1ec-form-inline ai1ec-panel-group ai1ec-ics-single-events
45
+ <?php if ( $migration ):?>ai1ec-feeds-migration<?php endif; ?>"
46
+ id="ai1ec-feeds-accordion">
47
+ <?php echo $single_feed_rows; ?>
48
+ </div>
49
+ <?php
50
+ endif;
51
+ ?>
52
  <?php echo $modal->render(); ?>
public/admin/plugins/ics/import_feed.php ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! $api_signed ):
3
+ ?>
4
+ <div class="ai1ec-ics-signup-box">
5
+ <p>
6
+ <?php _e( 'Please, Sign In to <b>Timely Network</b> to manage your feeds.', AI1EC_PLUGIN_NAME ) ?>
7
+ </p>
8
+ <a href="edit.php?post_type=ai1ec_event&page=all-in-one-event-calendar-settings"
9
+ class="ai1ec-btn ai1ec-btn-primary ai1ec-btn-md">
10
+ <?php _e( 'Sign In to Timely Network', AI1EC_PLUGIN_NAME ) ?>
11
+ </a>
12
+ </div>
13
+ <?php
14
+ elseif ( ! $has_feature ):
15
+ ?>
16
+ <div class="ai1ec-feed-container ai1ec-well ai1ec-well-sm ai1ec-clearfix">
17
+ <?php _e(
18
+ '<b>You don\'t have a subscription for this feature.</b><br>
19
+ Please <a href="https://time.ly/pricing">upgrade here</a> to a plan that
20
+ supports "Import Feeds".', AI1EC_PLUGIN_NAME )
21
+ ?>
22
+ </div>
23
+ <?php
24
+ elseif ( $reached_limit ):
25
+ ?>
26
+ <div class="ai1ec-feed-container ai1ec-well ai1ec-well-sm ai1ec-clearfix">
27
+ <?php _e(
28
+ '<b>You have reached the limit of how many feeds you can import.</b><br>
29
+ Please <a href="https://time.ly/pricing">upgrade here</a> to a plan that
30
+ supports more feeds.', AI1EC_PLUGIN_NAME )
31
+ ?>
32
+ </div>
33
+ <?php
34
+ else:
35
+ ?>
36
+ <div id="ai1ec-feeds-after"
37
+ class="ai1ec-feed-container ai1ec-well ai1ec-well-sm ai1ec-clearfix">
38
+ <div class="ai1ec-form-group ai1ec-row">
39
+ <div class="ai1ec-col-sm-1">
40
+ <label class="ai1ec-feed-url-label">
41
+ <?php _e( 'Feed URL:', AI1EC_PLUGIN_NAME ); ?>
42
+ </label>
43
+ </div>
44
+ <div class="ai1ec-col-sm-11">
45
+ <input type="text" name="ai1ec_feed_url" id="ai1ec_feed_url"
46
+ class="ai1ec-form-control" maxlength="255">
47
+ </div>
48
+ </div>
49
+ <div class="ai1ec-feeds-edit-fields">
50
+ <div class="ai1ec-row">
51
+ <div class="ai1ec-col-sm-6">
52
+ <?php $event_categories->render(); ?>
53
+ </div>
54
+ <div class="ai1ec-col-sm-6">
55
+ <?php $event_tags->render(); ?>
56
+ </div>
57
+ </div>
58
+ <?php do_action( 'ai1ec_ics_row_after_categories_tags', null ); ?>
59
+ <div class="ai1ec-feed-comments-enabled">
60
+ <label for="ai1ec_comments_enabled">
61
+ <input type="checkbox" name="ai1ec_comments_enabled"
62
+ id="ai1ec_comments_enabled" value="1">
63
+ <?php _e( 'Allow comments on imported events', AI1EC_PLUGIN_NAME ); ?>
64
+ </label>
65
+ </div>
66
+ <div class="ai1ec-feed-map-display-enabled">
67
+ <label for="ai1ec_map_display_enabled">
68
+ <input type="checkbox" name="ai1ec_map_display_enabled"
69
+ id="ai1ec_map_display_enabled" value="1">
70
+ <?php _e( 'Show map on imported events', AI1EC_PLUGIN_NAME ); ?>
71
+ </label>
72
+ </div>
73
+ <div class="ai1ec-feed-add-tags-categories">
74
+ <label for="ai1ec_add_tag_categories">
75
+ <input type="checkbox" name="ai1ec_add_tag_categories"
76
+ id="ai1ec_add_tag_categories" value="1">
77
+ <?php _e( 'Import any tags/categories provided by feed, in addition those selected above', AI1EC_PLUGIN_NAME ); ?>
78
+ </label>
79
+ </div>
80
+ <?php do_action( 'ai1ec_ics_row_after_keep_categories_tags', null ); ?>
81
+ <div class="ai1ec-feed-keep-old-events">
82
+ <label for="ai1ec_keep_old_events">
83
+ <input type="checkbox" name="ai1ec_keep_old_events"
84
+ id="ai1ec_keep_old_events" value="1">
85
+ <?php _e( 'On refresh, preserve previously imported events that are missing from the feed', AI1EC_PLUGIN_NAME ); ?>
86
+ </label>
87
+ </div>
88
+ <div class="ai1ec-feed-import-timezone">
89
+ <label for="ai1ec_feed_import_timezone">
90
+ <input type="checkbox" name="ai1ec_feed_import_timezones"
91
+ id="ai1ec_feed_import_timezone" value="1">
92
+ <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 ); ?>">
93
+ <?php _e( 'Assign default time zone to events in UTC', AI1EC_PLUGIN_NAME ); ?>
94
+ </span>
95
+ </label>
96
+ </div>
97
+ </div>
98
+ <div class="ai1ec-feeds-edit-fields">
99
+ <div class="ai1ec-pull-right">
100
+ <button type="button" id="ai1ec_cancel_ics"
101
+ class="ai1ec-btn ai1ec-btn-primary ai1ec-btn-sm ai1ec-hidden">
102
+ <i class="ai1ec-fa ai1ec-fa-cancel"></i>
103
+ <?php _e( 'Cancel', AI1EC_PLUGIN_NAME ); ?>
104
+ </button>
105
+ <button type="button" id="ai1ec_add_new_ics"
106
+ class="ai1ec-btn ai1ec-btn-primary ai1ec-btn-sm"
107
+ data-loading-text="<?php echo esc_attr(
108
+ '<i class="ai1ec-fa ai1ec-fa-spinner ai1ec-fa-spin ai1ec-fa-fw"></i> ' .
109
+ __( 'Please wait&#8230;', AI1EC_PLUGIN_NAME ) ); ?>">
110
+ <i class="ai1ec-fa ai1ec-fa-plus"></i>
111
+ <span id="ai1ec_ics_add_new">
112
+ <?php _e( 'Import feed', AI1EC_PLUGIN_NAME ); ?>
113
+ </span>
114
+ <span id="ai1ec_ics_update" class="ai1ec-hidden">
115
+ <?php _e( 'Update feed', AI1EC_PLUGIN_NAME ); ?>
116
+ </span>
117
+ </button>
118
+ </div>
119
+ </div>
120
+ <?php do_action( 'ai1ec_ics_row_after_settings', null ); ?>
121
+ </div>
122
+ <?php
123
+ endif;
124
+ ?>
public/admin/plugins/render_opening_div.php CHANGED
@@ -1 +1 @@
1
- <div class="ai1ec-tab-pane" id="<?php echo $id ?>">
1
+ <div class="ai1ec-tab-pane ai1ec-feeds-both" id="<?php echo $id ?>">
public/admin/plugins/suggested/display_feeds.php ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! $api_signed ):
3
+ ?>
4
+ <div class="ai1ec-ics-signup-box">
5
+ <p>
6
+ <?php _e( 'Please, Sign In to <b>Timely Network</b> to manage your feeds.', AI1EC_PLUGIN_NAME ) ?>
7
+ </p>
8
+ <a href="edit.php?post_type=ai1ec_event&page=all-in-one-event-calendar-settings"
9
+ class="ai1ec-btn ai1ec-btn-primary ai1ec-btn-md">
10
+ <?php _e( 'Sign In to Timely Network', AI1EC_PLUGIN_NAME ) ?>
11
+ </a>
12
+ </div>
13
+ <?php
14
+ else:
15
+ ?>
16
+ <div class="ai1ec-form ai1ec-suggested-search-form">
17
+ <label><?php _e( 'Find events matching:', AI1EC_PLUGIN_NAME ); ?>
18
+ <input type="text" placeholder="Ex.: Concert"
19
+ class="ai1ec-form-control" name="term" id="ai1ec_suggested_term" />
20
+ </label>
21
+
22
+ <label><?php _e( 'Located in:', AI1EC_PLUGIN_NAME ); ?>
23
+ <input type="text" placeholder="Ex.: Vancouver"
24
+ class="ai1ec-form-control" name="location" id="ai1ec_suggested_location" autocomplete="off"/>
25
+ </label>
26
+
27
+ <a href="#" class="ai1ec-btn ai1ec-btn-success" id="ai1ec_suggested_search">
28
+ <i class="ai1ec-fa ai1ec-fa-search"></i>
29
+ <?php _e( 'Search', AI1EC_PLUGIN_NAME ); ?>
30
+ </a>
31
+ <input type="hidden" id="ai1ec_suggested_radius" />
32
+ <input type="hidden" id="ai1ec_suggested_lat" />
33
+ <input type="hidden" id="ai1ec_suggested_lng" />
34
+ </div>
35
+
36
+ <div class="ai1ec-suggested-results">
37
+ <div>
38
+ <b>
39
+ <span class="ai1ec-suggested-results-found">0</span>
40
+ <?php _e( ' events found.', AI1EC_PLUGIN_NAME ); ?>
41
+ </b>
42
+ <?php _e( 'Update settings for the imported events in “My feeds” tab.', AI1EC_PLUGIN_NAME ); ?>
43
+ </div>
44
+ <div id="ai1ec-discovery-status">&nbsp;</div>
45
+ <div class="ai1ec-suggested-view-selector">
46
+ <a href="#" data-ai1ec-view="map">
47
+ <?php _e( 'Map', AI1EC_PLUGIN_NAME ); ?>
48
+ </a> |
49
+ <a href="#" data-ai1ec-view="both" class="ai1ec-active">
50
+ <?php _e( 'Both', AI1EC_PLUGIN_NAME ); ?>
51
+ </a> |
52
+ <a href="#" data-ai1ec-view="list">
53
+ <?php _e( 'List', AI1EC_PLUGIN_NAME ); ?>
54
+ </a>
55
+ </div>
56
+ <div class="ai1ec-suggested-map-container" data-ai1ec-show="both map">
57
+ <div id="ai1ec_events_extra_details" data-ai1ec-show="both"></div>
58
+ <div id="ai1ec_events_map_canvas"></div>
59
+ </div>
60
+ <div class="ai1ec-feeds-list-container">
61
+ </div>
62
+ </div>
63
+
64
+ <?php
65
+ endif;
66
+ ?>
67
+
68
+ <div class="ai1ec-suggested-no-results">
69
+
70
+ <h4>
71
+ <i class="ai1ec-fa ai1ec-fa-times-circle"></i>
72
+ <?php _e( 'No events found.', AI1EC_PLUGIN_NAME ); ?>
73
+ </h4>
74
+ <p class="ai1ec-suggested-results-hint">
75
+ <?php _e( 'Please, modify your search criteria and try again.', AI1EC_PLUGIN_NAME ); ?>
76
+ </p>
77
+ </div>
78
+
79
+ <div class="ai1ec-suggested-events-actions-template ai1ec-hidden">
80
+ <?php echo $event_actions; ?>
81
+ </div>
82
+
83
+
public/admin/plugins/suggested/event_actions.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="ai1ec-suggested-event-import">
2
+ <a href="#" class="ai1ec-btn ai1ec-btn-primary ai1ec-btn-xs
3
+ ai1ec-suggested-import-event">
4
+ <i class="ai1ec-fa ai1ec-fa-plus ai1ec-fa-xs ai1ec-fa-fw"></i>
5
+ <?php _e( 'Import', AI1EC_PLUGIN_NAME ); ?>
6
+ </a>
7
+ <a href="#" class="ai1ec-btn ai1ec-btn-primary ai1ec-btn-xs ai1ec-btn-warning
8
+ ai1ec-disabled ai1ec-hidden ai1ec-suggested-processing">
9
+ <?php _e( 'Importing', AI1EC_PLUGIN_NAME ); ?>&hellip;
10
+ </a>
11
+ <a href="#" class="ai1ec-btn ai1ec-btn-primary ai1ec-btn-xs ai1ec-btn-warning
12
+ ai1ec-disabled ai1ec-hidden ai1ec-suggested-removing">
13
+ <?php _e( 'Removing', AI1EC_PLUGIN_NAME ); ?>&hellip;
14
+ </a>
15
+ <a href="#" class="ai1ec-btn ai1ec-btn-primary ai1ec-btn-xs ai1ec-btn-danger
16
+ ai1ec-hidden ai1ec-suggested-remove-event">
17
+ <i class="ai1ec-fa ai1ec-fa-minus ai1ec-fa-xs ai1ec-fa-fw"></i>
18
+ <?php _e( 'Remove', AI1EC_PLUGIN_NAME ); ?>
19
+ </a>
20
+ </div>
public/admin/plugins/suggested/feeds_list.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( 0 === count( $suggested_feeds ) ):
3
+ ?>
4
+ <p class="ai1ec-suggested-no-events"><?php _e( 'No events found.', AI1EC_PLUGIN_NAME ); ?></p>
5
+ <?php
6
+ else:
7
+ ?>
8
+ <table class="ai1ec-suggested-events" data-ai1ec-show="list both">
9
+ <tbody>
10
+ <?php foreach ( $suggested_feeds as $event ):?>
11
+ <tr class="ai1ec-suggested-event"
12
+ data-event="<?php echo esc_attr( json_encode( $event ) ); ?>"
13
+ data-event-id="<?php echo $event->id;?>">
14
+ <td class="ai1ec-suggested-image"
15
+ style="background-image:url(<?php
16
+ if ( isset( $event->image_url ) ) {
17
+ echo esc_attr( $event->image_url );
18
+ } else {
19
+ echo esc_attr( $default_image );
20
+ }?>)">&nbsp;
21
+ </td>
22
+ <td class="ai1ec-suggested-content">
23
+ <a href="#" class="ai1ec-suggested-title" data-url="<?php echo $event->url;?>">
24
+ <?php if ( isset( $event->longitude ) && isset( $event->latitude ) ):?>
25
+ <i class="ai1ec-fa ai1ec-fa-map-marker ai1ec-fa-xs ai1ec-fa-fw"></i>
26
+ <?php endif; ?>
27
+ <?php echo strip_tags( $event->title );?>
28
+ </a>
29
+ <div class="ai1ec-suggested-date">
30
+ <?php
31
+ $date = new DateTime( $event->dtstart );
32
+ echo $date->format( 'l jS M \'y' ) . ' @ ';
33
+ echo $event->venue_name;
34
+ ?>
35
+ </div>
36
+ <div class="ai1ec-suggested-description" data-ai1ec-show="list">
37
+ <?php echo strip_tags( $event->description ) ;?>
38
+ </div>
39
+ </td>
40
+ <td class="ai1ec-suggested-event-actions">
41
+ <?php echo $event_actions; ?>
42
+ </td>
43
+ </tr>
44
+ <?php endforeach; ?>
45
+ </tbody>
46
+ </table>
47
+ <?php
48
+ endif;
49
+ ?>
50
+ <div class="ai1ec-feeds-pagination">
51
+ <?php
52
+ if ( $page_links ) {
53
+ echo '<div class="tablenav"><div class="tablenav-pages">'
54
+ . $page_links
55
+ . '</div></div>';
56
+ }
57
+ ?>
58
+ </div>
public/admin/twig/setting/custom.twig ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <label class="ai1ec-control-label ai1ec-col-sm-5" for="{{ id }}">
2
+ {{ label | raw }}
3
+ </label>
4
+ <div class="ai1ec-col-sm-7">
5
+ {{ content | raw }}
6
+ </div>
public/js/libs/gmaps.js CHANGED
@@ -1 +1 @@
1
- timely.define(["ai1ec_config"],function(e){var t=e.language,n="async!https://maps.google.com/maps/api/js?sensor=false&language="+t;return function(e){typeof google=="object"&&typeof google.maps=="object"?e():timely.require([n],e)}});
1
+ timely.define(["ai1ec_config"],function(e){var t=e.language,n="async!https://maps.google.com/maps/api/js?language="+t;return function(e){typeof google=="object"&&typeof google.maps=="object"?e():timely.require([n],e)}});
public/js/month.js CHANGED
@@ -1 +1 @@
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:"has_product_buy_button",match:["has_product_buy_button"]}],output:[{type:"raw",value:" ai1ec-has-product-buy-button"}]}},{type:"raw",value:" "},{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-start-day="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"start_day"}]},{type:"raw",value:'"\n 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 '},{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:"ticket_url"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:' data-ticket-url="'},{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:"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 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:"ticket_url"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:" ai1ec-has-tickets-button\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:"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 "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"action_buttons",match:["action_buttons"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{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:"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});
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:"has_product_buy_button",match:["has_product_buy_button"]}],output:[{type:"raw",value:" ai1ec-has-product-buy-button"}]}},{type:"raw",value:" "},{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-start-day="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"start_day"}]},{type:"raw",value:'"\n 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 '},{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:"ticket_url"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:' data-ticket-url="'},{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:"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 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:"ticket_url"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:" ai1ec-has-tickets-button\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:"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:" </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 "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"action_buttons",match:["action_buttons"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{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:"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(["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"},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"has_product_buy_button",match:["has_product_buy_button"]}],output:[{type:"raw",value:" ai1ec-has-product-buy-button"}]}},{type:"raw",value:'">\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 '},{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:"ticket_url"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:' data-ticket-url="'},{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:"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 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:"ticket_url"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:" ai1ec-has-tickets-button\n "}]}},{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:"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 "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"action_buttons",match:["action_buttons"]},{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:" "},{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 '},{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:"ticket_url"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:' data-ticket-url="'},{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:"raw",value:'>\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 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:"ticket_url"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:" ai1ec-has-tickets-button\n "}]}},{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:"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 "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"action_buttons",match:["action_buttons"]},{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:" "},{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"},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"has_product_buy_button",match:["has_product_buy_button"]}],output:[{type:"raw",value:" ai1ec-has-product-buy-button"}]}},{type:"raw",value:'">\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 '},{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:"ticket_url"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:' data-ticket-url="'},{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:"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 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:"ticket_url"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:" ai1ec-has-tickets-button\n "}]}},{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:"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:" </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 "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"action_buttons",match:["action_buttons"]},{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:" "},{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 '},{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:"ticket_url"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:' data-ticket-url="'},{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:"raw",value:'>\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 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:"ticket_url"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:" ai1ec-has-tickets-button\n "}]}},{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:"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 "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"action_buttons",match:["action_buttons"]},{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:" "},{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
@@ -161,4 +161,4 @@ CONDITIONS OF ANY KIND, either express or implied. See the Apache License and th
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},alert:function(t,n){$document=e(document.body),$one_shot_popup=e("#ai1ec-show-popup-alert",$document),0===$one_shot_popup.length&&($div=e('<div class="timely"/>'),$div.html('<div id="ai1ec-show-popup-alert" class="timely ai1ec-modal ai1ec-fade"role="dialog" aria-hidden="true" style="display: none;"><div class="ai1ec-modal-dialog"><div class="ai1ec-modal-content"><div class="ai1ec-modal-header"><button type="button" class="ai1ec-close"data-dismiss="ai1ec-modal" aria-hidden="true">×</button><h4 class="ai1ec-modal-title" id="ai1ec-one-shot-popup-title"></h4></div><div class="ai1ec-modal-body"><p id="ai1ec-one-shot-popup-text"></p></div></div></div></div>').appendTo($document),$one_shot_popup=e("#ai1ec-show-popup-alert",$document));var r=e(this).closest("a");e("#ai1ec-one-shot-popup-title",$one_shot_popup).text(t),e("#ai1ec-one-shot-popup-text",$one_shot_popup).text(n),$one_shot_popup.modal("show")},make_popup_content_link:function(t,n,r){return'<div class="timely"><a href="#" class="timely ai1ec-link"data-toggle="ai1ec-modal" data-target="#popupMoreInfoInline">'+e("<div />").text(t).html()+"</a>"+'<div id="popupMoreInfoInline" class="timely ai1ec-modal ai1ec-fade"'+'role="dialog" aria-hidden="true" style="display: none;">'+'<div class="ai1ec-modal-dialog">'+'<div class="ai1ec-modal-content">'+'<div class="ai1ec-modal-header">'+'<button type="button" class="ai1ec-close"'+'data-dismiss="ai1ec-modal" aria-hidden="true">×</button>'+"<strong>"+e("<div />").text(n).html()+"</strong>"+"</div>"+'<div class="ai1ec-modal-body ai1ec-clearfix">'+'<textarea class="ai1ec-form-control code" rows="8" cols="40">'+e("<div />").text(r).html()+"</textarea>"+"</div>"+"</div>"+"</div>"+"</div>"+"</div>"},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)},isValidUrl:function(e,t){if(!0===t){var n=/^(http|https):\/\//;return n.test(e)}return!0},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"];return n.each(function(){e.each(this.attributes,function(){this.specified&&this.value&&this.name.match(/^data-/)&&(-1<e.inArray(this.name.replace(/^data\-/,""),i)||this.name.match(/_ids$/))&&r.push(this.name.replace(/^data\-/,"")+"~"+this.value)})}),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(){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&&p(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&&p(e[0])})}})},h=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(),v(),e('a[href="#ai1ec-event-location-box"]').on("click",function(){window.setTimeout(function(){google.maps.event.trigger(u,"resize"),u.setCenter(a.getPosition())},150)}))})},p=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)},d=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)},v=function(){e("#ai1ec_input_coordinates:checked").length===0?(e("#ai1ec_table_coordinates").hide(),e("#ai1ec_address").change()):d()},m=function(){return a},g=function(){return f};return{init_gmaps:h,ai1ec_update_map_from_coordinates:d,get_marker:m,get_position:g}}),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),e(document).trigger("ai1ec.recurrence-modal.inited")},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"),f=!0;switch(a){case"daily":o+="FREQ=DAILY;";var l=e("#ai1ec_daily_count").val();l>1&&(o+="INTERVAL="+l+";");break;case"weekly":o+="FREQ=WEEKLY;";var c=e("#ai1ec_weekly_count").val();c>1&&(o+="INTERVAL="+c+";");var h=e('input[name="ai1ec_weekly_date_select"]:first').val(),p=e('#ai1ec_weekly_date_select > div:first > input[type="hidden"]:first').val();h.length>0&&(o+="WKST="+p+";BYday="+h+";");break;case"monthly":o+="FREQ=MONTHLY;";var d=e("#ai1ec_monthly_count").val(),v=e('input[name="ai1ec_monthly_type"]:checked').val();d>1&&(o+="INTERVAL="+d+";");var m=e('input[name="ai1ec_montly_date_select"]:first').val();if(m.length>0&&v==="bymonthday")o+="BYMONTHDAY="+m+";";else if(v==="byday"){var g=e("#ai1ec_monthly_byday_num").val(),y=e("#ai1ec_monthly_byday_weekday").val();o+="BYday="+g+y+";"}break;case"yearly":o+="FREQ=YEARLY;";var b=e("#ai1ec_yearly_count").val();b>1&&(o+="INTERVAL="+b+";");var w=e('input[name="ai1ec_yearly_date_select"]:first').val();w.length>0&&(o+="BYMONTH="+w+";");break;case"custom":"1"===e("#ai1ec_is_box_repeat").val()?o+="RDATE=":o+="EXDATE=",o+=e("#ai1ec_rec_custom_dates").val(),f=!1}var E=e("#ai1ec_end").val();if("1"===E&&f)o+="COUNT="+e("#ai1ec_count").val()+";";else if("2"===E&&f){var S=e("#ai1ec_until-date-input").val();S=r.parseDate(S,t.date_format);var x=e("#ai1ec_start-time").val();x=r.parseDate(x,t.date_format),x=new Date(x);var T=S.getUTCDate(),N=S.getUTCMonth()+1,C=x.getUTCHours(),k=x.getUTCMinutes();N=N<10?"0"+N:N,T=T<10?"0"+T:T,C=C<10?"0"+C:C,k=k<10?"0"+k:k,S=S.getUTCFullYear()+""+N+T+"T235959Z",o+="UNTIL="+S+";"}var L={action:"ai1ec_rrule_to_text",rrule:o};i.button("loading").next().addClass("ai1ec-disabled"),e.post(s,L,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")},v=function(){var t=e("#ai1ec_repeat_box").find("ul.ai1ec-nav").find("li.ai1ec-active"),n=e("#ai1ec_repeat_box").find(".ai1ec-end-field");t.hasClass("ai1ec-freq-custom")?n.addClass("ai1ec-hidden"):n.removeClass("ai1ec-hidden"),t.hasClass("ai1ec-freq-monthly")&&l()},m=function(){var t=e("#ai1ec-tab-content").data("activeFreq"),n=e("#ai1ec_recurrence_calendar");e(".ai1ec-freq").removeClass("ai1ec-active"),e(".ai1ec-freq-"+t).addClass("ai1ec-active"),e(document).on("shown.bs.tab",v),o(),v()};return e(document).on("ai1ec.recurrence-modal.inited",m),{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=e(".ai1ec-tickets-cost"),r=e(".ai1ec-tickets-url-text"),i=e(".ai1ec-register-url-text");e('input[name="ai1ec_cost_type"]').on("click change",function(){var t=e(".ai1ec-no-tickets"),n=e(".ai1ec-tickets-form, .ai1ec-tickets-list-container"),r=e(".ai1ec-tickets-external");"free"===this.value?(n.hide(),r.hide(),t.show()):"tickets"===this.value?(n.show(),r.hide(),t.hide()):(n.hide(),r.show(),t.show())}),e('input[name="ai1ec_cost_type"]:checked').click(),e("#ai1ec_is_free").on("click",function(){this.checked?(n.addClass("ai1ec-hidden"),r.addClass("ai1ec-hidden"),i.removeClass("ai1ec-hidden")):(n.removeClass("ai1ec-hidden"),r.removeClass("ai1ec-hidden"),i.addClass("ai1ec-hidden"))})}),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).toString(),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","libs/utils","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,f){var l=function(){var t=new Date(r.now*1e3),n={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:r.date_format,month_names:r.month_names,day_names:r.day_names,week_start_day:r.week_start_day,twentyfour_hour:r.twentyfour_hour,now:t};e.timespan(n)},c=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)})},h=function(){l(),timely.require(["libs/gmaps"],function(e){e(i.init_gmaps)})},p=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")},d=function(t){o.ai1ec_check_lat_long_fields_filled_when_publishing_event(t)===!0&&(o.ai1ec_convert_commas_to_dots_for_coordinates(),o.ai1ec_check_lat_long_ok_for_search(t));var i=!1,s=[];e("#ai1ec_ticket_ext_url, #ai1ec_contact_url").each(function(){var t=this.value;e(this).removeClass("ai1ec-input-warn");var o=e(this).closest(".ai1ec-panel-collapse").parent().find(".ai1ec-panel-heading .ai1ec-fa-warning");i||o.addClass("ai1ec-hidden").parent().removeClass("ai1ec-tab-title-error");var u=e(this).attr("id"),a="ai1ec_ticket_ext_url"===u;if(""!==t&&!1===n.isValidUrl(t,a)){o.removeClass("ai1ec-hidden").parent().addClass("ai1ec-tab-title-error"),i||e(this).closest(".ai1ec-panel-collapse").collapse("show"),i=!0;var f=u+"_not_valid";s.push(r[f]),e(this).addClass("ai1ec-input-warn")}});var u=e("#ai1ec_contact_email"),a=u.closest(".ai1ec-panel-collapse").parent().find(".ai1ec-panel-heading .ai1ec-fa-warning");u.removeClass("ai1ec-input-warn"),i||a.addClass("ai1ec-hidden").parent().removeClass("ai1ec-tab-title-error");var f=e.trim(u.val());if(""!==f&&!1===n.isValidEmail(f)){a.removeClass("ai1ec-hidden").parent().addClass("ai1ec-tab-title-error"),i||u.closest(".ai1ec-panel-collapse").collapse("show"),i=!0;var l=u.attr("id")+"_not_valid";s.push(r[l]),u.addClass("ai1ec-input-warn")}var c=e("#title, #ai1ec_contact_name, #ai1ec_contact_email, #ai1ec_contact_phone, #content");if(e("#ai1ec_has_tickets").prop("checked")){c.addClass("ai1ec-required"),E(),e("#content").hasClass("ai1ec-error")?T(!0):T(!1);if(e(".ai1ec-error").not(".ai1ec-hidden .ai1ec-error").length||e(".ai1ec-tax-options-button").hasClass("ai1ec-required-error"))i=!0,e("#ai1ec-add-new-event-accordion > .ai1ec-panel-default > .ai1ec-panel-collapse").removeClass("ai1ec-collapse").css("height","auto"),s.push(r.ticketing_required_fields);e("#ai1ec_repeat").prop("checked")===!0&&(i=!0,s.push(r.ticketing_repeat_not_supported));if(!1===i){var h=0,d=0;e(".ai1ec-tickets-edit-form").not(".ai1ec-tickets-form-template").each(function(){var t=e(this),n=!1;t.find(".ai1ec-tickets-fields").remove(),t.find("select, input").each(function(){if(!this.name)return;"remove"===this.name&&(n=!0);var r=this.value;"checkbox"==this.type&&(1==this.checked?r="on":r="off"),e("<input />",{type:"hidden",name:"ai1ec_tickets["+h+"]["+this.name+"]","class":"ai1ec-tickets-fields",value:r}).appendTo(t)}),n||d++,h++}),0===d&&(i=!0,s.push(r.ticketing_no_tickets_included))}}else c.removeClass("ai1ec-required");i?p(t,s):(e(".ai1ec-tickets-form-template").remove(),e(".ai1ec-tickets-edit-form").find("input, select").not(".ai1ec-tickets-fields").prop("disabled",!0))},v=function(){e("#ai1ec_google_map").click(s.toggle_visibility_of_google_map_on_click),e("#ai1ec_input_coordinates").change(s.toggle_visibility_of_coordinate_fields_on_click),e("#post").submit(d),e("input.ai1ec-coordinates").blur(s.update_map_from_coordinates_on_blur),e("#ai1ec_bottom_publish").on("click",u.trigger_publish),e(document).on("change","#ai1ec_end",u.show_end_fields).on("click","#ai1ec_repeat_apply",u.handle_click_on_apply_button).on("click","#ai1ec_repeat_cancel",u.handle_click_on_cancel_modal).on("click","#ai1ec_monthly_type_bymonthday, #ai1ec_monthly_type_byday",u.handle_checkbox_monthly_tab_modal).on("click",".ai1ec-btn-group-grid a",u.handle_click_on_toggle_buttons),e("#ai1ec_repeat_box").on("hidden.bs.modal",u.handle_modal_hide),u.execute_pseudo_handlers(),e("#widgetField > a").on("click",u.handle_animation_of_calendar_widget),e(document).on("click",".ai1ec-set-banner-image",m),e(document).on("click",".ai1ec-remove-banner",g),e(document).on("click","#ai1ec_tax_options, #ai1ec_update_tax_options",k)},m=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},g=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},y=function(){e("#ai1ec_event").insertAfter("#ai1ec_event_inline_alert"),e("#post").addClass("ai1ec-visible")},b=function(){e("#timezone-select").select2()},w=function(){e(".ai1ec-tickets-datepicker").not(".ai1ec-tickets-datepicker-inited").not(".ai1ec-tickets-form-template .ai1ec-tickets-datepicker").each(function(){var t=e(this),n=t.closest(".ai1ec-tickets-dates-block"),r=e(".ai1ec-tickets-time",n),i=e("input.ai1ec-tickets-full-date",n),s=i.val();t.val(s.substr(0,10)),r.val(s.substr(11,5)),r.on("change",function(){s=i.val(),i.val(s.substr(0,10)+" "+this.value+":00")}),t.addClass("ai1ec-tickets-datepicker-inited").datepicker({autoclose:!0}).on("changeDate",function(e){i.val(this.value+" "+r.val()+":00")})})},E=function(){e(".ai1ec-tickets-edit-form").not(".ai1ec-tickets-form-template").not(".ai1ec-hidden").find('input[id="ai1ec_ticket_unlimited"]').each(function(){var t=e(this),n=t.closest(".ai1ec-tickets-edit-form"),r=e('input[id="ai1ec_ticket_quantity"]',n);!1===t.prop("checked")?(r.val()==0&&r.val(""),r.addClass("ai1ec-required")):r.removeClass("ai1ec-required")}),e(".ai1ec-tickets-edit-form").not(".ai1ec-tickets-form-template").not(".ai1ec-hidden").find('input[id="ai1ec_ticket_avail"]').each(function(){var t=e(this);t.closest(".ai1ec-tickets-edit-form").find('input[id="ai1ec_ticket_sale_start_date"],input[id="ai1ec_ticket_sale_end_date"]').each(function(){!1===t.prop("checked")?e(this).addClass("ai1ec-required"):e(this).removeClass("ai1ec-required")})}),e(".ai1ec-ticket-field-error").hide(),e(".ai1ec-required").not(".ai1ec-tickets-form-template .ai1ec-required").each(function(){var t=e(this);t.removeClass("ai1ec-error");if(!e.trim(t.val())||"checkbox"===t.attr("type")&&!t.prop("checked"))t.addClass("ai1ec-error"),t.parent().find(".ai1ec-ticket-field-error").show()}),e('[name="ticket_sale_start_date"], [name="ticket_sale_end_date"]').not(".ai1ec-tickets-form-template input").each(function(){var t=e(this),n=t.closest(".ai1ec-tickets-dates-block").find('input[type="text"]');n.removeClass("ai1ec-error"),!t.closest(".ai1ec-avail-block").find('input[name="availibility"]:checked').length&&null===this.value.match(/^(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})$/)&&n.addClass("ai1ec-error")});var t=e("#ai1ec_editing_ticket").val();return 0==t&&!e("#ai1ec_tax_inputs input").length?e(".ai1ec-tax-options-button").addClass("ai1ec-required-error").show():e(".ai1ec-tax-options-button").removeClass("ai1ec-required-error").hide(),e(".ai1ec-ticket-field-error:visible").length?!1:!0},S=function(t){var n=t.closest(".ai1ec-tickets-edit-form"),r=e("#ai1ec_ticket_quantity",n);1==t.prop("checked")?r.hide():r.show()},x=function(t){var n=t.closest(".ai1ec-tickets-edit-form"),r=e(".ai1ec-tickets-dates",n);1==t.prop("checked")?r.hide():r.show()},T=function(t){e("#ai1ec-event-description-field-error").remove(),t&&e("#postdivrich").before('<div id="ai1ec-event-description-field-error"><strong style="color: red;">* The Event description is required.</strong></div>')},N=function(){e(document).on("click change",'[id="ai1ec_ticket_unlimited"]',function(){S(e(this))}),e(document).on("click change",'[id="ai1ec_ticket_avail"]',function(){x(e(this))}),e(document).on("click change",'[id="ai1ec_new_ticket_status"]',function(){var t=e(this),n=t.closest(".ai1ec-tickets-panel"),i=t.find(":selected");if("canceled"===i.val()){var s=e("#ai1ec-ticket-taken",n);if(0<s.val()){e("#ai1ec-ticket-status-message",n).text(r.ticketing.cancel_message);return}}n.find("#ai1ec-ticket-status-message").text("")}),e(document).on("click",".ai1ec-remove-ticket",function(){var t=e(this).closest(".ai1ec-tickets-panel"),i=e("#ai1ec-ticket-taken",t);return 0<i.val()?n.alert(r.ticketing.information,r.ticketing.no_delete_text):t.addClass("ai1ec-hidden").append('<input type="hidden" name="remove" value="1">'),!1});var t=function(){var t=e(".ai1ec-tickets-form-template").clone();return t.removeClass("ai1ec-tickets-form-template").appendTo("#ai1ec-ticket-forms"),$checkbox=e("#ai1ec_ticket_unlimited",t),$checkbox.prop("checked",!0),S($checkbox),$checkbox=e("#ai1ec_ticket_avail",t),$checkbox.prop("checked",!0),x($checkbox),w(),!1};e("#ai1ec_add_new_ticket").on("click",t),e(".ai1ec-tickets-edit-form").not(".ai1ec-tickets-form-template").length||t()},C=function(){var t=function(){e(".ai1ec_review_modal").modal("hide"),e(".ai1ec_review_modal").hide()},n=function(){var n=e(".ai1ec_review_negative_feedback, .ai1ec_review_contact_name, .ai1ec_review_contact_email, .ai1ec_review_site_url");n.each(function(){var t=e(this);t.removeClass("ai1ec-error"),t.closest("td").find(".ai1ec-required-message").hide(),t.closest("td").find(".ai1ec-invalid-email-message").hide(),t.closest("td").find(".ai1ec-invalid-site-message").hide();if(!e.trim(t.val()))t.addClass("ai1ec-error"),t.closest("td").find(".ai1ec-required-message").show();else if(t.hasClass("ai1ec_review_contact_email")){var n=/^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;!1===n.test(t.val())&&(t.addClass("ai1ec-error"),t.closest("td").find(".ai1ec-invalid-email-message").show())}else if(t.hasClass("ai1ec_review_site_url")){var r=/[-a-zA-Z0-9@:%_\+.~#?&//=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?/gi;!1===r.test(t.val())&&(t.addClass("ai1ec-error"),t.closest("td").find(".ai1ec-invalid-site-message").show())}}),!1===n.hasClass("ai1ec-error")&&(e(".ai1ec_review_send_feedback").button("loading"),n.prop("disabled",!0),e.ajax({url:r.ajax_url,type:"POST",data:{action:"ai1ec_send_feedback_message",message:e(".ai1ec_review_negative_feedback").val(),name:e(".ai1ec_review_contact_name").val(),email:e(".ai1ec_review_contact_email").val(),site:e(".ai1ec_review_site_url").val()},success:function(n){e(".ai1ec_review_messages").remove(),e(".ai1ec-review-form").prepend('<div class="timely ai1ec-alert ai1ec-alert-success ai1ec_review_messages"><strong>'+r.review.message_sent+"</strong></div>"),setTimeout(function(){e(".ai1ec_review_send_feedback").button("reset"),e(".ai1ec_not_enjoying_popup").prop("disabled",!0),t()},3e3)},error:function(t){n.prop("disabled",!1),e(".ai1ec_review_messages").remove(),e(".ai1ec-review-form").prepend('<div class="timely ai1ec-alert ai1ec-alert-danger ai1ec_review_messages"><strong>Error!</strong> '+r.review.message_error+"</div>")}}))},i=function(){o("y")},s=function(){o("n")},o=function(n){t(),e.ajax({url:r.ajax_url,type:"POST",data:{action:"ai1ec_save_feedback_review",feedback:n}})};e(".ai1ec_review_enjoying_no_rating, .ai1ec_review_enjoying_go_wordpress").on("click",i),e(".ai1ec_review_send_feedback").on("click",n),e(".ai1ec_review_not_enjoying_no_rating").on("click",s)},k=function(){var t=e("#ai1ec_tax_box"),n=e(".ai1ec-modal-content",t),r=e(".ai1ec-loading",t);if(t.hasClass("ai1ec-active")){t.modal("show");return}t.addClass("ai1ec-active").modal({backdrop:"static"}),e.post(ajaxurl,{action:"ai1ec_get_tax_box",ai1ec_event_id:e("#post_ID").val()},function(t){var n=ai1ec_tax_frame.contentWindow.document;r.remove(),e(ai1ec_tax_frame).removeClass("ai1ec-hidden"),n.open(),n.write(t.message.body),n.close();var i=0,s=0,o=e("#ai1ec_tax_frame");setInterval(function(){s=o.contents().find("body").height(),s!=i&&o.css("height",(i=s)+"px")},500)},"json")};window.addEventListener("message",function(t){var n=t.data,r="timely_tax_options_",i="timely_tax_cancel",s=e("#ai1ec_tax_inputs");if(n===i){e("#ai1ec_tax_box").modal("hide");return}if(0!==n.indexOf(r))return;n=JSON.parse(n.substr(r.length)),e("#ai1ec_tax_box").modal("hide"),e("#ai1ec_tax_options").addClass("ai1ec-hidden"),e("#ai1ec_update_tax_options").removeClass("ai1ec-hidden"),s.html("");for(var o in n)s.append(e("<input />",{type:"hidden",name:"tax_options["+o+"]",value:n[o]}))},!1);var L=function(){h(),t(function(){c(),y(),v(),b(),N(),w(),C()})};return{start:L}}),timely.require(["scripts/add_new_event"],function(e){e.start()}),timely.define("pages/add_new_event",function(){});
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},alert:function(t,n){$document=e(document.body),$one_shot_popup=e("#ai1ec-show-popup-alert",$document),0===$one_shot_popup.length&&($div=e('<div class="timely"/>'),$div.html('<div id="ai1ec-show-popup-alert" class="timely ai1ec-modal ai1ec-fade"role="dialog" aria-hidden="true" style="display: none;"><div class="ai1ec-modal-dialog"><div class="ai1ec-modal-content"><div class="ai1ec-modal-header"><button type="button" class="ai1ec-close"data-dismiss="ai1ec-modal" aria-hidden="true">×</button><h4 class="ai1ec-modal-title" id="ai1ec-one-shot-popup-title"></h4></div><div class="ai1ec-modal-body"><p id="ai1ec-one-shot-popup-text"></p></div></div></div></div>').appendTo($document),$one_shot_popup=e("#ai1ec-show-popup-alert",$document));var r=e(this).closest("a");e("#ai1ec-one-shot-popup-title",$one_shot_popup).text(t),e("#ai1ec-one-shot-popup-text",$one_shot_popup).text(n),$one_shot_popup.modal("show")},make_popup_content_link:function(t,n,r){return'<div class="timely"><a href="#" class="timely ai1ec-link"data-toggle="ai1ec-modal" data-target="#popupMoreInfoInline">'+e("<div />").text(t).html()+"</a>"+'<div id="popupMoreInfoInline" class="timely ai1ec-modal ai1ec-fade"'+'role="dialog" aria-hidden="true" style="display: none;">'+'<div class="ai1ec-modal-dialog">'+'<div class="ai1ec-modal-content">'+'<div class="ai1ec-modal-header">'+'<button type="button" class="ai1ec-close"'+'data-dismiss="ai1ec-modal" aria-hidden="true">×</button>'+"<strong>"+e("<div />").text(n).html()+"</strong>"+"</div>"+'<div class="ai1ec-modal-body ai1ec-clearfix">'+'<textarea class="ai1ec-form-control code" rows="8" cols="40">'+e("<div />").text(r).html()+"</textarea>"+"</div>"+"</div>"+"</div>"+"</div>"+"</div>"},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)},isValidUrl:function(e,t){if(!0===t){var n=/^(http|https):\/\//;return n.test(e)}return!0},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"];return n.each(function(){e.each(this.attributes,function(){this.specified&&this.value&&this.name.match(/^data-/)&&(-1<e.inArray(this.name.replace(/^data\-/,""),i)||this.name.match(/_ids$/))&&r.push(this.name.replace(/^data\-/,"")+"~"+this.value)})}),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(){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&&p(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&&p(e[0])})}})},h=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(),v(),e('a[href="#ai1ec-event-location-box"]').on("click",function(){window.setTimeout(function(){google.maps.event.trigger(u,"resize"),u.setCenter(a.getPosition())},150)}))})},p=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)},d=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)},v=function(){e("#ai1ec_input_coordinates:checked").length===0?(e("#ai1ec_table_coordinates").hide(),e("#ai1ec_address").change()):d()},m=function(){return a},g=function(){return f};return{init_gmaps:h,ai1ec_update_map_from_coordinates:d,get_marker:m,get_position:g}}),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),e(document).trigger("ai1ec.recurrence-modal.inited")},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"),f=!0;switch(a){case"daily":o+="FREQ=DAILY;";var l=e("#ai1ec_daily_count").val();l>1&&(o+="INTERVAL="+l+";");break;case"weekly":o+="FREQ=WEEKLY;";var c=e("#ai1ec_weekly_count").val();c>1&&(o+="INTERVAL="+c+";");var h=e('input[name="ai1ec_weekly_date_select"]:first').val(),p=e('#ai1ec_weekly_date_select > div:first > input[type="hidden"]:first').val();h.length>0&&(o+="WKST="+p+";BYday="+h+";");break;case"monthly":o+="FREQ=MONTHLY;";var d=e("#ai1ec_monthly_count").val(),v=e('input[name="ai1ec_monthly_type"]:checked').val();d>1&&(o+="INTERVAL="+d+";");var m=e('input[name="ai1ec_montly_date_select"]:first').val();if(m.length>0&&v==="bymonthday")o+="BYMONTHDAY="+m+";";else if(v==="byday"){var g=e("#ai1ec_monthly_byday_num").val(),y=e("#ai1ec_monthly_byday_weekday").val();o+="BYday="+g+y+";"}break;case"yearly":o+="FREQ=YEARLY;";var b=e("#ai1ec_yearly_count").val();b>1&&(o+="INTERVAL="+b+";");var w=e('input[name="ai1ec_yearly_date_select"]:first').val();w.length>0&&(o+="BYMONTH="+w+";");break;case"custom":"1"===e("#ai1ec_is_box_repeat").val()?o+="RDATE=":o+="EXDATE=",o+=e("#ai1ec_rec_custom_dates").val(),f=!1}var E=e("#ai1ec_end").val();if("1"===E&&f)o+="COUNT="+e("#ai1ec_count").val()+";";else if("2"===E&&f){var S=e("#ai1ec_until-date-input").val();S=r.parseDate(S,t.date_format);var x=e("#ai1ec_start-time").val();x=r.parseDate(x,t.date_format),x=new Date(x);var T=S.getUTCDate(),N=S.getUTCMonth()+1,C=x.getUTCHours(),k=x.getUTCMinutes();N=N<10?"0"+N:N,T=T<10?"0"+T:T,C=C<10?"0"+C:C,k=k<10?"0"+k:k,S=S.getUTCFullYear()+""+N+T+"T235959Z",o+="UNTIL="+S+";"}var L={action:"ai1ec_rrule_to_text",rrule:o};i.button("loading").next().addClass("ai1ec-disabled"),e.post(s,L,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")},v=function(){var t=e("#ai1ec_repeat_box").find("ul.ai1ec-nav").find("li.ai1ec-active"),n=e("#ai1ec_repeat_box").find(".ai1ec-end-field");t.hasClass("ai1ec-freq-custom")?n.addClass("ai1ec-hidden"):n.removeClass("ai1ec-hidden"),t.hasClass("ai1ec-freq-monthly")&&l()},m=function(){var t=e("#ai1ec-tab-content").data("activeFreq"),n=e("#ai1ec_recurrence_calendar");e(".ai1ec-freq").removeClass("ai1ec-active"),e(".ai1ec-freq-"+t).addClass("ai1ec-active"),e(document).on("shown.bs.tab",v),o(),v()};return e(document).on("ai1ec.recurrence-modal.inited",m),{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=e(".ai1ec-tickets-cost"),r=e(".ai1ec-tickets-url-text"),i=e(".ai1ec-register-url-text");e('input[name="ai1ec_cost_type"]').on("click change",function(){var t=e(".ai1ec-no-tickets"),n=e(".ai1ec-tickets-form, .ai1ec-tickets-list-container"),r=e(".ai1ec-tickets-external");"free"===this.value?(n.hide(),r.hide(),t.show()):"tickets"===this.value?(n.show(),r.hide(),t.hide()):(n.hide(),r.show(),t.show())}),e('input[name="ai1ec_cost_type"]:checked').click(),e("#ai1ec_is_free").on("click",function(){this.checked?(n.addClass("ai1ec-hidden"),r.addClass("ai1ec-hidden"),i.removeClass("ai1ec-hidden")):(n.removeClass("ai1ec-hidden"),r.removeClass("ai1ec-hidden"),i.addClass("ai1ec-hidden"))})}),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).toString(),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","libs/utils","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,f){var l=function(){var t=new Date(r.now*1e3),n={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:r.date_format,month_names:r.month_names,day_names:r.day_names,week_start_day:r.week_start_day,twentyfour_hour:r.twentyfour_hour,now:t};e.timespan(n)},c=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)})},h=function(){l(),timely.require(["libs/gmaps"],function(e){e(i.init_gmaps)})},p=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")},d=function(t){o.ai1ec_check_lat_long_fields_filled_when_publishing_event(t)===!0&&(o.ai1ec_convert_commas_to_dots_for_coordinates(),o.ai1ec_check_lat_long_ok_for_search(t));var i=!1,s=[];e("#ai1ec_ticket_ext_url, #ai1ec_contact_url").each(function(){var t=this.value;e(this).removeClass("ai1ec-input-warn");var o=e(this).closest(".ai1ec-panel-collapse").parent().find(".ai1ec-panel-heading .ai1ec-fa-warning");i||o.addClass("ai1ec-hidden").parent().removeClass("ai1ec-tab-title-error");var u=e(this).attr("id"),a="ai1ec_ticket_ext_url"===u;if(""!==t&&!1===n.isValidUrl(t,a)){o.removeClass("ai1ec-hidden").parent().addClass("ai1ec-tab-title-error"),i||e(this).closest(".ai1ec-panel-collapse").collapse("show"),i=!0;var f=u+"_not_valid";s.push(r[f]),e(this).addClass("ai1ec-input-warn")}});var u=e("#ai1ec_contact_email"),a=u.closest(".ai1ec-panel-collapse").parent().find(".ai1ec-panel-heading .ai1ec-fa-warning");u.removeClass("ai1ec-input-warn"),i||a.addClass("ai1ec-hidden").parent().removeClass("ai1ec-tab-title-error");var f=e.trim(u.val());if(""!==f&&!1===n.isValidEmail(f)){a.removeClass("ai1ec-hidden").parent().addClass("ai1ec-tab-title-error"),i||u.closest(".ai1ec-panel-collapse").collapse("show"),i=!0;var l=u.attr("id")+"_not_valid";s.push(r[l]),u.addClass("ai1ec-input-warn")}var c=e("#title, #ai1ec_contact_name, #ai1ec_contact_email, #ai1ec_contact_phone, #content");if(e("#ai1ec_has_tickets").prop("checked")){c.addClass("ai1ec-required"),E(),e("#content").hasClass("ai1ec-error")?T(!0):T(!1);if(e(".ai1ec-error").not(".ai1ec-hidden .ai1ec-error").length||e(".ai1ec-tax-options-button").hasClass("ai1ec-required-error"))i=!0,e("#ai1ec-add-new-event-accordion > .ai1ec-panel-default > .ai1ec-panel-collapse").removeClass("ai1ec-collapse").css("height","auto"),s.push(r.ticketing_required_fields);e("#ai1ec_repeat").prop("checked")===!0&&(i=!0,s.push(r.ticketing_repeat_not_supported));if(!1===i){var h=0,d=0;e(".ai1ec-tickets-edit-form").not(".ai1ec-tickets-form-template").each(function(){var t=e(this),n=!1;t.find(".ai1ec-tickets-fields").remove(),t.find("select, input").each(function(){if(!this.name)return;"remove"===this.name&&(n=!0);var r=this.value;"checkbox"==this.type&&(1==this.checked?r="on":r="off"),e("<input />",{type:"hidden",name:"ai1ec_tickets["+h+"]["+this.name+"]","class":"ai1ec-tickets-fields",value:r}).appendTo(t)}),n||d++,h++}),0===d&&(i=!0,s.push(r.ticketing_no_tickets_included))}}else c.removeClass("ai1ec-required");i?p(t,s):(e(".ai1ec-tickets-form-template").remove(),e(".ai1ec-tickets-edit-form").find("input, select").not(".ai1ec-tickets-fields").prop("disabled",!0))},v=function(){e("#ai1ec_google_map").click(s.toggle_visibility_of_google_map_on_click),e("#ai1ec_input_coordinates").change(s.toggle_visibility_of_coordinate_fields_on_click),e("#post").submit(d),e("input.ai1ec-coordinates").blur(s.update_map_from_coordinates_on_blur),e("#ai1ec_bottom_publish").on("click",u.trigger_publish),e(document).on("change","#ai1ec_end",u.show_end_fields).on("click","#ai1ec_repeat_apply",u.handle_click_on_apply_button).on("click","#ai1ec_repeat_cancel",u.handle_click_on_cancel_modal).on("click","#ai1ec_monthly_type_bymonthday, #ai1ec_monthly_type_byday",u.handle_checkbox_monthly_tab_modal).on("click",".ai1ec-btn-group-grid a",u.handle_click_on_toggle_buttons),e("#ai1ec_repeat_box").on("hidden.bs.modal",u.handle_modal_hide),u.execute_pseudo_handlers(),e("#widgetField > a").on("click",u.handle_animation_of_calendar_widget),e(document).on("click",".ai1ec-set-banner-image",m),e(document).on("click",".ai1ec-remove-banner",g),e(document).on("click","#ai1ec_tax_options, #ai1ec_update_tax_options",k)},m=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},g=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},y=function(){e("#ai1ec_event").insertAfter("#ai1ec_event_inline_alert"),e("#post").addClass("ai1ec-visible")},b=function(){e("#timezone-select").select2()},w=function(){e(".ai1ec-tickets-datepicker").not(".ai1ec-tickets-datepicker-inited").not(".ai1ec-tickets-form-template .ai1ec-tickets-datepicker").each(function(){var t=e(this),n=t.closest(".ai1ec-tickets-dates-block"),r=e(".ai1ec-tickets-time",n),i=e("input.ai1ec-tickets-full-date",n),s=i.val();t.val(s.substr(0,10)),r.val(s.substr(11,5)),r.on("change",function(){s=i.val(),i.val(s.substr(0,10)+" "+this.value+":00")}),t.addClass("ai1ec-tickets-datepicker-inited").datepicker({autoclose:!0}).on("changeDate",function(e){i.val(this.value+" "+r.val()+":00")})})},E=function(){e(".ai1ec-tickets-edit-form").not(".ai1ec-tickets-form-template").not(".ai1ec-hidden").find('input[id="ai1ec_ticket_unlimited"]').each(function(){var t=e(this),n=t.closest(".ai1ec-tickets-edit-form"),r=e('input[id="ai1ec_ticket_quantity"]',n);!1===t.prop("checked")?(r.val()==0&&r.val(""),r.addClass("ai1ec-required")):r.removeClass("ai1ec-required")}),e(".ai1ec-tickets-edit-form").not(".ai1ec-tickets-form-template").not(".ai1ec-hidden").find('input[id="ai1ec_ticket_avail"]').each(function(){var t=e(this);t.closest(".ai1ec-tickets-edit-form").find('input[id="ai1ec_ticket_sale_start_date"],input[id="ai1ec_ticket_sale_end_date"]').each(function(){!1===t.prop("checked")?e(this).addClass("ai1ec-required"):e(this).removeClass("ai1ec-required")})}),e(".ai1ec-ticket-field-error").hide(),e(".ai1ec-required").not(".ai1ec-tickets-form-template .ai1ec-required").each(function(){var t=e(this);t.removeClass("ai1ec-error");if(!e.trim(t.val())||"checkbox"===t.attr("type")&&!t.prop("checked"))t.addClass("ai1ec-error"),t.parent().find(".ai1ec-ticket-field-error").show()}),e('[name="ticket_sale_start_date"], [name="ticket_sale_end_date"]').not(".ai1ec-tickets-form-template input").each(function(){var t=e(this),n=t.closest(".ai1ec-tickets-dates-block").find('input[type="text"]');n.removeClass("ai1ec-error"),!t.closest(".ai1ec-avail-block").find('input[name="availibility"]:checked').length&&null===this.value.match(/^(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})$/)&&n.addClass("ai1ec-error")});var t=e("#ai1ec_editing_ticket").val();return 0==t&&!e("#ai1ec_tax_inputs input").length?e(".ai1ec-tax-options-button").addClass("ai1ec-required-error").show():e(".ai1ec-tax-options-button").removeClass("ai1ec-required-error").hide(),e(".ai1ec-ticket-field-error:visible").length?!1:!0},S=function(t){var n=t.closest(".ai1ec-tickets-edit-form"),r=e("#ai1ec_ticket_quantity",n);1==t.prop("checked")?r.hide():r.show()},x=function(t){var n=t.closest(".ai1ec-tickets-edit-form"),r=e(".ai1ec-tickets-dates",n);1==t.prop("checked")?r.hide():r.show()},T=function(t){e("#ai1ec-event-description-field-error").remove(),t&&e("#postdivrich").before('<div id="ai1ec-event-description-field-error"><strong style="color: red;">* The Event description is required.</strong></div>')},N=function(){e(document).on("click change",'[id="ai1ec_ticket_unlimited"]',function(){S(e(this))}),e(document).on("click change",'[id="ai1ec_ticket_avail"]',function(){x(e(this))}),e(document).on("click change",'[id="ai1ec_new_ticket_status"]',function(){var t=e(this),n=t.closest(".ai1ec-tickets-panel"),i=t.find(":selected");if("canceled"===i.val()){var s=e("#ai1ec-ticket-taken",n);if(0<s.val()){e("#ai1ec-ticket-status-message",n).text(r.ticketing.cancel_message);return}}n.find("#ai1ec-ticket-status-message").text("")}),e(document).on("click",".ai1ec-remove-ticket",function(){var t=e(this).closest(".ai1ec-tickets-panel"),i=e("#ai1ec-ticket-taken",t);return 0<i.val()?n.alert(r.ticketing.information,r.ticketing.no_delete_text):t.addClass("ai1ec-hidden").append('<input type="hidden" name="remove" value="1">'),!1});var t=function(){var t=e(".ai1ec-tickets-form-template").clone();return t.removeClass("ai1ec-tickets-form-template").appendTo("#ai1ec-ticket-forms"),$checkbox=e("#ai1ec_ticket_unlimited",t),$checkbox.prop("checked",!0),S($checkbox),$checkbox=e("#ai1ec_ticket_avail",t),$checkbox.prop("checked",!0),x($checkbox),w(),!1};e("#ai1ec_add_new_ticket").on("click",t),e(".ai1ec-tickets-edit-form").not(".ai1ec-tickets-form-template").length||t()},C=function(){var t=function(){e(".ai1ec_review_modal").modal("hide"),e(".ai1ec_review_modal").hide()},n=function(){var n=e(".ai1ec_review_negative_feedback, .ai1ec_review_contact_name, .ai1ec_review_contact_email, .ai1ec_review_site_url");n.each(function(){var t=e(this);t.removeClass("ai1ec-error"),t.closest("td").find(".ai1ec-required-message").hide(),t.closest("td").find(".ai1ec-invalid-email-message").hide(),t.closest("td").find(".ai1ec-invalid-site-message").hide();if(!e.trim(t.val()))t.addClass("ai1ec-error"),t.closest("td").find(".ai1ec-required-message").show();else if(t.hasClass("ai1ec_review_contact_email")){var n=/^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;!1===n.test(t.val())&&(t.addClass("ai1ec-error"),t.closest("td").find(".ai1ec-invalid-email-message").show())}else if(t.hasClass("ai1ec_review_site_url")){var r=/[-a-zA-Z0-9@:%_\+.~#?&//=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?/gi;!1===r.test(t.val())&&(t.addClass("ai1ec-error"),t.closest("td").find(".ai1ec-invalid-site-message").show())}}),!1===n.hasClass("ai1ec-error")&&(e(".ai1ec_review_send_feedback").button("loading"),n.prop("disabled",!0),e.ajax({url:r.ajax_url,type:"POST",data:{action:"ai1ec_send_feedback_message",message:e(".ai1ec_review_negative_feedback").val(),name:e(".ai1ec_review_contact_name").val(),email:e(".ai1ec_review_contact_email").val(),site:e(".ai1ec_review_site_url").val()},success:function(n){e(".ai1ec_review_messages").remove(),e(".ai1ec-review-form").prepend('<div class="timely ai1ec-alert ai1ec-alert-success ai1ec_review_messages"><strong>'+r.review.message_sent+"</strong></div>"),setTimeout(function(){e(".ai1ec_review_send_feedback").button("reset"),e(".ai1ec_not_enjoying_popup").prop("disabled",!0),t()},3e3)},error:function(t){n.prop("disabled",!1),e(".ai1ec_review_messages").remove(),e(".ai1ec-review-form").prepend('<div class="timely ai1ec-alert ai1ec-alert-danger ai1ec_review_messages"><strong>Error!</strong> '+r.review.message_error+"</div>")}}))},i=function(){o("y")},s=function(){o("n")},o=function(n){t(),e.ajax({url:r.ajax_url,type:"POST",data:{action:"ai1ec_save_feedback_review",feedback:n}})};e(".ai1ec_review_enjoying_no_rating, .ai1ec_review_enjoying_go_wordpress").on("click",i),e(".ai1ec_review_send_feedback").on("click",n),e(".ai1ec_review_not_enjoying_no_rating").on("click",s)},k=function(){var t=e("#ai1ec_tax_box"),n=e(".ai1ec-modal-content",t),r=e(".ai1ec-loading",t);if(t.hasClass("ai1ec-active")){t.modal("show");return}t.addClass("ai1ec-active").modal({backdrop:"static"}),e.post(ajaxurl,{action:"ai1ec_get_tax_box",ai1ec_event_id:e("#post_ID").val()},function(t){var n=ai1ec_tax_frame.contentWindow.document;r.remove(),e(ai1ec_tax_frame).removeClass("ai1ec-hidden"),n.open(),n.write(t.message.body),n.close();var i=0,s=0,o=e("#ai1ec_tax_frame");setInterval(function(){s=o.contents().find("body").height(),s!=i&&o.css("height",(i=s)+"px")},500)},"json")};window.addEventListener("message",function(t){var n=t.data.toString(),r="timely_tax_options_",i="timely_tax_cancel",s=e("#ai1ec_tax_inputs");if(n===i){e("#ai1ec_tax_box").modal("hide");return}if(0!==n.indexOf(r))return;n=JSON.parse(n.substr(r.length)),e("#ai1ec_tax_box").modal("hide"),e("#ai1ec_tax_options").addClass("ai1ec-hidden"),e("#ai1ec_update_tax_options").removeClass("ai1ec-hidden"),s.html("");for(var o in n)s.append(e("<input />",{type:"hidden",name:"tax_options["+o+"]",value:n[o]}))},!1);var L=function(){h(),t(function(){c(),y(),v(),b(),N(),w(),C()})};return{start:L}}),timely.require(["scripts/add_new_event"],function(e){e.start()}),timely.define("pages/add_new_event",function(){});
public/js/pages/calendar.js CHANGED
@@ -358,4 +358,4 @@ OTHER DEALINGS IN THE SOFTWARE.
358
  * limitations under the License.
359
  * ======================================================================== */
360
 
361
- 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("scripts/calendar/print",["jquery_timely"],function(e){var t=function(t){t.preventDefault();var n=e("body"),r=e("html"),i=e(this).closest(".ai1ec-calendar").html(),s=n.html();s=s.replace(/<script.*?>([\s\S]*?)<\/script>/gmi,""),n.empty(),n.addClass("timely"),r.addClass("ai1ec-print"),n.html(i),e("span").click(function(){return!1}),e(".ai1ec-agenda-view a").each(function(){e(this).data("href",e(this).attr("href")),e(this).attr("href","#")}),window.print(),e(".ai1ec-agenda-view a").each(function(){e(this).attr("href",e(this).data("href")),e(this).data("href","")}),n.removeClass("timely"),r.removeClass("ai1ec-print"),n.html(s)};return{handle_click_on_print_button:t}}),timely.define("scripts/calendar/agenda_view",["jquery_timely"],function(e){var t=function(){e(this).closest(".ai1ec-event").toggleClass("ai1ec-expanded").find(".ai1ec-event-summary").slideToggle(300)},n=function(){var t=e(this).closest(".ai1ec-calendar");t.find(".ai1ec-expanded .ai1ec-event-toggle").click()},r=function(){var t=e(this).closest(".ai1ec-calendar");t.find(".ai1ec-event:not(.ai1ec-expanded) .ai1ec-event-toggle").click()};return{toggle_event:t,collapse_all:n,expand_all:r}}),timely.define("external_libs/modernizr",[],function(){var e=function(e,t,n){function S(e){f.cssText=e}function x(e,t){return S(h.join(e+";")+(t||""))}function T(e,t){return typeof e===t}function N(e,t){return!!~(""+e).indexOf(t)}function C(e,t,r){for(var i in e){var s=t[e[i]];if(s!==n)return r===!1?e[i]:T(s,"function")?s.bind(r||t):s}return!1}var r="2.5.3",i={},s=!0,o=t.documentElement,u="modernizr",a=t.createElement(u),f=a.style,l,c={}.toString,h=" -webkit- -moz- -o- -ms- ".split(" "),p={},d={},v={},m=[],g=m.slice,y,b=function(e,n,r,i){var s,a,f,l=t.createElement("div"),c=t.body,h=c?c:t.createElement("body");if(parseInt(r,10))while(r--)f=t.createElement("div"),f.id=i?i[r]:u+(r+1),l.appendChild(f);return s=["&#173;","<style>",e,"</style>"].join(""),l.id=u,(c?l:h).innerHTML+=s,h.appendChild(l),c||(h.style.background="",o.appendChild(h)),a=n(l,e),c?l.parentNode.removeChild(l):h.parentNode.removeChild(h),!!a},w={}.hasOwnProperty,E;!T(w,"undefined")&&!T(w.call,"undefined")?E=function(e,t){return w.call(e,t)}:E=function(e,t){return t in e&&T(e.constructor.prototype[t],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(t){var n=this;if(typeof n!="function")throw new TypeError;var r=g.call(arguments,1),i=function(){if(this instanceof i){var e=function(){};e.prototype=n.prototype;var s=new e,o=n.apply(s,r.concat(g.call(arguments)));return Object(o)===o?o:s}return n.apply(t,r.concat(g.call(arguments)))};return i});var k=function(n,r){var s=n.join(""),o=r.length;b(s,function(n,r){var s=t.styleSheets[t.styleSheets.length-1],u=s?s.cssRules&&s.cssRules[0]?s.cssRules[0].cssText:s.cssText||"":"",a=n.childNodes,f={};while(o--)f[a[o].id]=a[o];i.touch="ontouchstart"in e||e.DocumentTouch&&t instanceof DocumentTouch||(f.touch&&f.touch.offsetTop)===9},o,r)}([,["@media (",h.join("touch-enabled),("),u,")","{#touch{top:9px;position:absolute}}"].join("")],[,"touch"]);p.touch=function(){return i.touch};for(var L in p)E(p,L)&&(y=L.toLowerCase(),i[y]=p[L](),m.push((i[y]?"":"no-")+y));return S(""),a=l=null,i._version=r,i._prefixes=h,i.testStyles=b,o.className=o.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(s?" js "+m.join(" "):""),i}(window,window.document);return e}),timely.define("scripts/calendar/month_view",["jquery_timely","external_libs/modernizr"],function(e,t){var n=navigator.userAgent.match(/opera/i),r=navigator.userAgent.match(/webkit/i),i=function(t){var n=t.find(".ai1ec-day"),r=t.find(".ai1ec-week:first .ai1ec-day").length;t.find(".ai1ec-month-view .ai1ec-multiday").each(function(){var t=this.parentNode,r=e(this).outerHeight(!0),i=e(".ai1ec-date",t),u=parseInt(i.text(),10),a=e(this).data("endTruncated"),f=parseInt(a?e(n[n.length-1]).text():e(this).data("endDay"),10),l=e(this),c=e(".ai1ec-event",l)[0].style.backgroundColor,h=0,p=f-u+1,d=p,v,m=0;n.each(function(t){var n=e(".ai1ec-date",this),r=e(this.parentNode),i=r.index(),a=parseInt(n.text(),10);if(a>=u&&a<=f){a===u&&(v=parseInt(n.css("marginBottom"),10)+16),h===0&&m++;if(i===0&&a>u&&d!==0){var p=l.next(".ai1ec-popup").andSelf().clone(!1);n.parent().append(p);var g=p.first();g.addClass("ai1ec-multiday-bar ai1ec-multiday-clone"),g.css({position:"absolute",left:"1px",top:parseInt(n.css("marginBottom"),10)+13,backgroundColor:c});var y=d>7?7:d;g.css("width",s(y)),d>7&&g.append(o(1,c)),g.append(o(2,c))}h===0?n.css({marginBottom:v+"px"}):n.css({marginBottom:"+=16px"}),d--,d>0&&i===6&&h++}});if(a){var g=l.find("."+l[0].className.replace(/\s+/igm,".")).last();g.append(o(1,c))}e(this).css({position:"absolute",top:i.outerHeight(!0)-r-1+"px",left:"1px",width:s(m)}),h>0&&e(this).append(o(1,c)),e(this).data("startTruncated")&&e(this).append(o(2,c)).addClass("ai1ec-multiday-bar")}),n.each(function(){var t=e(".ai1ec-date",this),n=parseInt(t.text(),10),r=t.closest(".ai1ec-week"),i=e(this).find("a.ai1ec-event-container:not(.ai1ec-multiday)").length,s=null,o;if(0===i)return;o=r.find("a.ai1ec-multiday[data-end-day]").filter(function(){return e(this).data("startDay")<=n&&e(this).data("endDay")>=n}),o.each(function(){var t=e(this).prop("offsetTop");if(null===s||t>s)s=t}),null!==s&&(s+=3,t.css("marginBottom",s))})},s=function(e){var t;switch(e){case 1:t=97.5;break;case 2:t=198.7;break;case 3:t=300;break;case 4:t=401;break;case 5:r||n?t=507:t=503.4;break;case 6:r||n?t=608:t=603.5;break;case 7:r||n?t=709:t=705}return t+"%"},o=function(t,n){var r=e('<div class="ai1ec-multiday-arrow'+t+'"></div>');return t===1?r.css({borderLeftColor:n}):r.css({borderTopColor:n,borderRightColor:n,borderBottomColor:n}),r};return{extend_multiday_events:i}}),timely.define("libs/frontend_utils",[],function(){var e=function(e){var t,n;t=function(e){if(/&[^;]+;/.test(e)){var t=document.createElement("div");return t.innerHTML=e,t.firstChild?t.firstChild.nodeValue:e}return e};if(typeof e=="string")return t(e);if(typeof e=="object")for(n in e)typeof e[n]=="string"&&(e[n]=t(e[n]));return e},t=function(e,t,n){var r,i,s,o,u;if("#"===e.charAt(0)||"?"===e.charAt(0))e=e.substring(1);r={},e=e.split(t);for(i=0;i<e.length;i++)o=e[i].trim(),-1!==(u=o.indexOf(n))?(s=o.substring(0,u).trim(),o=o.substring(u+1).trim()):(s=o,o=!0),r[s]=o;return r},n=function(e){var n,r,i,s,o;e=t(e,"&","="),i=Object.keys(e),n={ai1ec:{},action:"month"};for(r=0;r<i.length;r++)if("ai1ec"===i[r]){var u=t(e[i[r]],"|",":");for(s in u)if(""!==u[s]){if("action"===s||"view"===s)n.action=u[s];n.ai1ec[s]=u[s]}}else"ai1ec_"===i[r].substring(0,6)?n.ai1ec[i[r].substring(6)]=e[i[r]]:n[i[r]]=e[i[r]];"ai1ec_"!==n.action.substring(0,6)&&(n.action="ai1ec_"+n.action),o="action="+n.action+"&ai1ec=";for(s in n.ai1ec)n.ai1ec.hasOwnProperty(s)&&(o+=escape(s)+":"+escape(n.ai1ec[s])+"|");o=o.substring(0,o.length-1);for(s in n)"ai1ec"!==s&&"action"!==s&&(o+="&"+s+"="+escape(n[s]));return o};return{ai1ec_convert_entities:e,ai1ec_map_internal_query:n,ai1ec_tokenize_uri:t}}),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},alert:function(t,n){$document=e(document.body),$one_shot_popup=e("#ai1ec-show-popup-alert",$document),0===$one_shot_popup.length&&($div=e('<div class="timely"/>'),$div.html('<div id="ai1ec-show-popup-alert" class="timely ai1ec-modal ai1ec-fade"role="dialog" aria-hidden="true" style="display: none;"><div class="ai1ec-modal-dialog"><div class="ai1ec-modal-content"><div class="ai1ec-modal-header"><button type="button" class="ai1ec-close"data-dismiss="ai1ec-modal" aria-hidden="true">×</button><h4 class="ai1ec-modal-title" id="ai1ec-one-shot-popup-title"></h4></div><div class="ai1ec-modal-body"><p id="ai1ec-one-shot-popup-text"></p></div></div></div></div>').appendTo($document),$one_shot_popup=e("#ai1ec-show-popup-alert",$document));var r=e(this).closest("a");e("#ai1ec-one-shot-popup-title",$one_shot_popup).text(t),e("#ai1ec-one-shot-popup-text",$one_shot_popup).text(n),$one_shot_popup.modal("show")},make_popup_content_link:function(t,n,r){return'<div class="timely"><a href="#" class="timely ai1ec-link"data-toggle="ai1ec-modal" data-target="#popupMoreInfoInline">'+e("<div />").text(t).html()+"</a>"+'<div id="popupMoreInfoInline" class="timely ai1ec-modal ai1ec-fade"'+'role="dialog" aria-hidden="true" style="display: none;">'+'<div class="ai1ec-modal-dialog">'+'<div class="ai1ec-modal-content">'+'<div class="ai1ec-modal-header">'+'<button type="button" class="ai1ec-close"'+'data-dismiss="ai1ec-modal" aria-hidden="true">×</button>'+"<strong>"+e("<div />").text(n).html()+"</strong>"+"</div>"+'<div class="ai1ec-modal-body ai1ec-clearfix">'+'<textarea class="ai1ec-form-control code" rows="8" cols="40">'+e("<div />").text(r).html()+"</textarea>"+"</div>"+"</div>"+"</div>"+"</div>"+"</div>"},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)},isValidUrl:function(e,t){if(!0===t){var n=/^(http|https):\/\//;return n.test(e)}return!0},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"];return n.each(function(){e.each(this.attributes,function(){this.specified&&this.value&&this.name.match(/^data-/)&&(-1<e.inArray(this.name.replace(/^data\-/,""),i)||this.name.match(/_ids$/))&&r.push(this.name.replace(/^data\-/,"")+"~"+this.value)})}),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("external_libs/bootstrap/affix",["jquery_timely"],function(e){var t=function(n,r){this.options=e.extend({},t.DEFAULTS,r),this.$window=e(window).on("scroll.bs.affix.data-api",e.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",e.proxy(this.checkPositionWithEventLoop,this)),this.$element=e(n),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};t.RESET="ai1ec-affix ai1ec-affix-top ai1ec-affix-bottom",t.DEFAULTS={offset:0},t.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(t.RESET).addClass("ai1ec-affix");var e=this.$window.scrollTop(),n=this.$element.offset();return this.pinnedOffset=n.top-e},t.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)},t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var n=e(document).height(),r=this.$window.scrollTop(),i=this.$element.offset(),s=this.options.offset,o=s.top,u=s.bottom;this.affixed=="top"&&(i.top+=r),typeof s!="object"&&(u=o=s),typeof o=="function"&&(o=s.top(this.$element)),typeof u=="function"&&(u=s.bottom(this.$element));var a=this.unpin!=null&&r+this.unpin<=i.top?!1:u!=null&&i.top+this.$element.height()>=n-u?"bottom":o!=null&&r<=o?"top":!1;if(this.affixed===a)return;this.unpin&&this.$element.css("top","");var f="ai1ec-affix"+(a?"-"+a:""),l=e.Event(f+".bs.affix");this.$element.trigger(l);if(l.isDefaultPrevented())return;this.affixed=a,this.unpin=a=="bottom"?this.getPinnedOffset():null,this.$element.removeClass(t.RESET).addClass(f).trigger(e.Event(f.replace("affix","affixed"))),a=="bottom"&&this.$element.offset({top:n-u-this.$element.height()})};var n=e.fn.affix;e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("bs.affix"),s=typeof n=="object"&&n;i||r.data("bs.affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.noConflict=function(){return e.fn.affix=n,this},e(window).on("load",function(){e('[data-spy="ai1ec-affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}),timely.define("scripts/common_scripts/frontend/common_event_handlers",["jquery_timely","external_libs/bootstrap/affix"],function(e){var t=function(t){var n=e(this),r=n.next(".ai1ec-popup"),i,s,o;if(r.length===0)return;i=r.html(),s=r.attr("class");var u=n.closest("#ai1ec-calendar-view");u.length===0&&(u=e("body")),n.offset().left-u.offset().left>182?o="left":o="right",n.constrained_popover({content:i,title:"",placement:o,trigger:"manual",html:!0,template:'<div class="timely ai1ec-popover '+s+'">'+'<div class="ai1ec-arrow"></div>'+'<div class="ai1ec-popover-inner">'+'<div class="ai1ec-popover-content"><div></div></div>'+"</div>"+"</div>",container:"body"}).constrained_popover("show")},n=function(t){var n=e(t.toElement||t.relatedTarget);n.closest(".ai1ec-popup").length===0&&e(this).constrained_popover("hide")},r=function(t){var n=e(t.toElement||t.relatedTarget);n.closest(".ai1ec-tooltip").length===0&&(e(this).remove(),e("body > .ai1ec-tooltip").remove())},i=function(t){if("ontouchstart"in document.documentElement){t.preventDefault();return}var n=e(this),r={template:'<div class="timely ai1ec-tooltip"><div class="ai1ec-tooltip-arrow"></div><div class="ai1ec-tooltip-inner"></div></div>',trigger:"manual",container:"body"};if(n.is(".ai1ec-category .ai1ec-color-swatch")||n.is(".ai1ec-custom-filter .ai1ec-color-swatch"))return;n.is(".ai1ec-tooltip-auto")&&(r.placement=u(250)),n.tooltip(r),n.tooltip("show")},s=function(t){e(this).tooltip("hide")},o=function(t){var n=e(t.toElement||t.relatedTarget);n.closest(".ai1ec-tooltip-trigger").length===0&&e(this).remove(),n.closest(".ai1ec-popup").length===0&&e("body > .ai1ec-popup").remove()},u=function(t){return function(n,r){var i,s,o=e(r),u=o.attr("data-placement"),a=e.extend({},o.offset(),{width:r.offsetWidth,height:r.offsetHeight}),f=function(){return!1===i?!1:(i=a.left-t>=0,i?"left":!1)},l=function(){return!1===s?!1:(s=a.left+t<=e(window).width(),s?"right":!1)};switch(u){case"top":return"top";case"bottom":return"bottom";case"left":if(f())return"left";case"right":if(l())return"right";default:if(f())return"left";if(l())return"right";return u}}};return{handle_popover_over:t,handle_popover_out:n,handle_popover_self_out:r,handle_tooltip_over:i,handle_tooltip_out:s,handle_tooltip_self_out:o}}),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/bootstrap/popover",["jquery_timely","external_libs/bootstrap/tooltip"],function(e){var t=function(e,t){this.init("popover",e,t)};if(!e.fn.tooltip)throw new Error("Popover requires tooltip.js");t.DEFAULTS=e.extend({},e.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="ai1ec-popover"><div class="ai1ec-arrow"></div><h3 class="ai1ec-popover-title"></h3><div class="ai1ec-popover-content"></div></div>'}),t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype),t.prototype.constructor=t,t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".ai1ec-popover-title")[this.options.html?"html":"text"](t),e.find(".ai1ec-popover-content")[this.options.html?"html":"text"](n),e.removeClass("ai1ec-fade ai1ec-top ai1ec-bottom ai1ec-left ai1ec-right ai1ec-in"),e.find(".ai1ec-popover-title").html()||e.find(".ai1ec-popover-title").hide()},t.prototype.hasContent=function(){return this.getTitle()||this.getContent()},t.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||(typeof t.content=="function"?t.content.call(e[0]):t.content)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".ai1ec-arrow")},t.prototype.tip=function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip};var n=e.fn.popover;e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("bs.popover"),s=typeof n=="object"&&n;i||r.data("bs.popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.noConflict=function(){return e.fn.popover=n,this}}),timely.define("external_libs/constrained_popover",["jquery_timely","external_libs/bootstrap/popover"],function(e){var t=function(e,t){this.init("constrained_popover",e,t)};t.DEFAULTS=e.extend({},e.fn.popover.Constructor.DEFAULTS,{container:"",content:this.options}),t.prototype=e.extend({},e.fn.popover.Constructor.prototype),t.prototype.constructor=t,t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.applyPlacement=function(t,n){e.fn.popover.Constructor.prototype.applyPlacement.call(this,t,n);var r=this.tip(),i=r[0].offsetWidth,s=r[0].offsetHeight,o=this.getPosition(),u={};switch(n){case"left":newPos=this.defineBounds(o),typeof newPos.top=="undefined"?u.top=o.top+o.height/2-s/2:u.top=newPos.top-s/2,typeof newPos.left=="undefined"?u.left=o.left-i:u.left=newPos.left-i,r.offset(u);break;case"right":newPos=this.defineBounds(o),typeof newPos.top=="undefined"?u.top=o.top+o.height/2-s/2:u.top=newPos.top-s/2,typeof newPos.left=="undefined"?u.left=o.left+o.width:u.left=newPos.left+o.width,r.offset(u)}},t.prototype.defineBounds=function(t){var n,r,i,s,o,u={},a=e("body"===this.options.container?document:this.options.container);return a.length?(n=a.offset()||{top:0,left:0},r=n.top,i=n.left,s=r+a.height(),o=i+a.width(),t.top+t.height/2<r&&(u.top=r),t.top+t.height/2>s&&(u.top=s),t.left-t.width/2<i&&(u.left=i),t.left-t.width/2>o&&(u.left=o),u):!1};var n=e.fn.popover;e.fn.constrained_popover=function(n){return this.each(function(){var r=e(this),i=r.data("ai1ec.constrained_popover"),s=typeof n=="object"&&n;i||r.data("ai1ec.constrained_popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.constrained_popover.Constructor=t,e.fn.constrained_popover.noConflict=function(){return e.fn.constrained_popover=n,this}}),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("scripts/common_scripts/frontend/common_frontend",["jquery_timely","domReady","scripts/common_scripts/frontend/common_event_handlers","ai1ec_calendar","external_libs/modernizr","external_libs/bootstrap/tooltip","external_libs/constrained_popover","external_libs/bootstrap/dropdown"],function(e,t,n,r,i){var s=!1,o=function(){s=!0,e(document).on("mouseenter",".ai1ec-popup-trigger",n.handle_popover_over),e(document).on("mouseleave",".ai1ec-popup-trigger",n.handle_popover_out),e(document).on("mouseleave",".ai1ec-popup",n.handle_popover_self_out),e(document).on("mouseenter",".ai1ec-tooltip-trigger",n.handle_tooltip_over),e(document).on("mouseleave",".ai1ec-tooltip-trigger",n.handle_tooltip_out),e(document).on("mouseleave",".ai1ec-tooltip",n.handle_tooltip_self_out)},u=function(){t(function(){o()})},a=function(){return s};return{start:u,are_event_listeners_attached:a}}),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).toString(),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("libs/select2_multiselect_helper",["jquery_timely","external_libs/select2"],function(e){var t=function(t){var n=e(t.element),r=n.data("color"),i=n.data("description"),s="";return typeof r!="undefined"&&r!==""&&(s+='<span class="ai1ec-color-swatch" style="background: '+n.data("color")+'"></span> '),s+=t.text,s='<span title="'+i+'">'+s+"</span>",s},n=function(t){var n=e(t.element),r=n.data("color"),i=n.data("description"),s="";return typeof r!="undefined"&&r!==""?s+='<span class="ai1ec-color-swatch" style="background: '+n.data("color")+'"></span> ':s+='<span class="ai1ec-color-swatch-empty"></span> ',s+=t.text,s='<span title="'+i+'">'+s+"</span>",s},r=function(r){typeof r=="undefined"&&(r=e(document)),e(".ai1ec-select2-multiselect-selector",r).select2({allowClear:!0,formatResult:n,formatSelection:t,escapeMarkup:function(e){return e}})},i=function(t){e(".ai1ec-select2-multiselect-selector.select2-container",t).each(function(){e(this).data("select2").resizeSearch()})};return{init:r,refresh:i}});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),timely.define("libs/twig",["external_libs/twig"],function(e){return e.extendFunction("ai1ec_disable_content_output",function(){}),e}),timely.define("agenda",["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'},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"has_product_buy_button",match:["has_product_buy_button"]}],output:[{type:"raw",value:" ai1ec-has-product-buy-button"}]}},{type:"raw",value:'">\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 '},{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:"ticket_url"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:' data-ticket-url="'},{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:"raw",value:' data-end="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"end"}]},{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 "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"action_buttons",match:["action_buttons"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\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}),timely.define("oneday",["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"},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"has_product_buy_button",match:["has_product_buy_button"]}],output:[{type:"raw",value:" ai1ec-has-product-buy-button"}]}},{type:"raw",value:'">\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 '},{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:"ticket_url"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:' data-ticket-url="'},{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:"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 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:"ticket_url"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:" ai1ec-has-tickets-button\n "}]}},{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:"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 "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"action_buttons",match:["action_buttons"]},{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:" "},{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 '},{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:"ticket_url"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:' data-ticket-url="'},{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:"raw",value:'>\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 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:"ticket_url"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:" ai1ec-has-tickets-button\n "}]}},{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:"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 "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"action_buttons",match:["action_buttons"]},{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:" "},{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}),timely.define("month",["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:"has_product_buy_button",match:["has_product_buy_button"]}],output:[{type:"raw",value:" ai1ec-has-product-buy-button"}]}},{type:"raw",value:" "},{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-start-day="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"start_day"}]},{type:"raw",value:'"\n 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 '},{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:"ticket_url"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:' data-ticket-url="'},{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:"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 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:"ticket_url"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:" ai1ec-has-tickets-button\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:"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 "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"action_buttons",match:["action_buttons"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{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:"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}),timely.define("external_libs/jquery_history",["jquery_timely"],function(e){try{(function(t,n){var r=t.History=t.History||{};if(typeof r.Adapter!="undefined")throw new Error("History.js Adapter has already been loaded...");r.Adapter={bind:function(t,n,r){e(t).bind(n,r)},trigger:function(t,n,r){e(t).trigger(n,r)},extractEventData:function(e,t,r){var i=t&&t.originalEvent&&t.originalEvent[e]||r&&r[e]||n;return i},onDomLoad:function(t){e(t)}},typeof r.init!="undefined"&&r.init()})(window),function(e,t){var n=e.document,r=e.setTimeout||r,i=e.clearTimeout||i,s=e.setInterval||s,o=e.History=e.History||{};if(typeof o.initHtml4!="undefined")throw new Error("History.js HTML4 Support has already been loaded...");o.initHtml4=function(){if(typeof o.initHtml4.initialized!="undefined")return!1;o.initHtml4.initialized=!0,o.enabled=!0,o.savedHashes=[],o.isLastHash=function(e){var t=o.getHashByIndex(),n;return n=e===t,n},o.saveHash=function(e){return o.isLastHash(e)?!1:(o.savedHashes.push(e),!0)},o.getHashByIndex=function(e){var t=null;return typeof e=="undefined"?t=o.savedHashes[o.savedHashes.length-1]:e<0?t=o.savedHashes[o.savedHashes.length+e]:t=o.savedHashes[e],t},o.discardedHashes={},o.discardedStates={},o.discardState=function(e,t,n){var r=o.getHashByState(e),i;return i={discardedState:e,backState:n,forwardState:t},o.discardedStates[r]=i,!0},o.discardHash=function(e,t,n){var r={discardedHash:e,backState:n,forwardState:t};return o.discardedHashes[e]=r,!0},o.discardedState=function(e){var t=o.getHashByState(e),n;return n=o.discardedStates[t]||!1,n},o.discardedHash=function(e){var t=o.discardedHashes[e]||!1;return t},o.recycleState=function(e){var t=o.getHashByState(e);return o.discardedState(e)&&delete o.discardedStates[t],!0},o.emulated.hashChange&&(o.hashChangeInit=function(){o.checkerFunction=null;var t="",r,i,u,a;return o.isInternetExplorer()?(r="historyjs-iframe",i=n.createElement("iframe"),i.setAttribute("id",r),i.style.display="none",n.body.appendChild(i),i.contentWindow.document.open(),i.contentWindow.document.close(),u="",a=!1,o.checkerFunction=function(){if(a)return!1;a=!0;var n=o.getHash()||"",r=o.unescapeHash(i.contentWindow.document.location.hash)||"";return n!==t?(t=n,r!==n&&(u=r=n,i.contentWindow.document.open(),i.contentWindow.document.close(),i.contentWindow.document.location.hash=o.escapeHash(n)),o.Adapter.trigger(e,"hashchange")):r!==u&&(u=r,o.setHash(r,!1)),a=!1,!0}):o.checkerFunction=function(){var n=o.getHash();return n!==t&&(t=n,o.Adapter.trigger(e,"hashchange")),!0},o.intervalList.push(s(o.checkerFunction,o.options.hashChangeInterval)),!0},o.Adapter.onDomLoad(o.hashChangeInit)),o.emulated.pushState&&(o.onHashChange=function(t){var r=t&&t.newURL||n.location.href,i=o.getHashByUrl(r),s=null,u=null,a=null,f;return o.isLastHash(i)?(o.busy(!1),!1):(o.doubleCheckComplete(),o.saveHash(i),i&&o.isTraditionalAnchor(i)?(o.Adapter.trigger(e,"anchorchange"),o.busy(!1),!1):(s=o.extractState(o.getFullUrl(i||n.location.href,!1),!0),o.isLastSavedState(s)?(o.busy(!1),!1):(u=o.getHashByState(s),f=o.discardedState(s),f?(o.getHashByIndex(-2)===o.getHashByState(f.forwardState)?o.back(!1):o.forward(!1),!1):(o.pushState(s.data,s.title,s.url,!1),!0))))},o.Adapter.bind(e,"hashchange",o.onHashChange),o.pushState=function(t,r,i,s){if(o.getHashByUrl(i))throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(s!==!1&&o.busy())return o.pushQueue({scope:o,callback:o.pushState,args:arguments,queue:s}),!1;o.busy(!0);var u=o.createStateObject(t,r,i),a=o.getHashByState(u),f=o.getState(!1),l=o.getHashByState(f),c=o.getHash();return o.storeState(u),o.expectedStateId=u.id,o.recycleState(u),o.setTitle(u),a===l?(o.busy(!1),!1):a!==c&&a!==o.getShortUrl(n.location.href)?(o.setHash(a,!1),!1):(o.saveState(u),o.Adapter.trigger(e,"statechange"),o.busy(!1),!0)},o.replaceState=function(e,t,n,r){if(o.getHashByUrl(n))throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(r!==!1&&o.busy())return o.pushQueue({scope:o,callback:o.replaceState,args:arguments,queue:r}),!1;o.busy(!0);var i=o.createStateObject(e,t,n),s=o.getState(!1),u=o.getStateByIndex(-2);return o.discardState(s,i,u),o.pushState(i.data,i.title,i.url,!1),!0}),o.emulated.pushState&&o.getHash()&&!o.emulated.hashChange&&o.Adapter.onDomLoad(function(){o.Adapter.trigger(e,"hashchange")})},typeof o.init!="undefined"&&o.init()}(window),function(e,t){var n=e.console||t,r=e.document,i=e.navigator,s=e.sessionStorage||!1,o=e.setTimeout,u=e.clearTimeout,a=e.setInterval,f=e.clearInterval,l=e.JSON,c=e.alert,h=e.History=e.History||{},p=e.history;l.stringify=l.stringify||l.encode,l.parse=l.parse||l.decode;if(typeof h.init!="undefined")throw new Error("History.js Core has already been loaded...");h.init=function(){return typeof h.Adapter=="undefined"?!1:(typeof h.initCore!="undefined"&&h.initCore(),typeof h.initHtml4!="undefined"&&h.initHtml4(),!0)},h.initCore=function(){if(typeof h.initCore.initialized!="undefined")return!1;h.initCore.initialized=!0,h.options=h.options||{},h.options.hashChangeInterval=h.options.hashChangeInterval||100,h.options.safariPollInterval=h.options.safariPollInterval||500,h.options.doubleCheckInterval=h.options.doubleCheckInterval||500,h.options.storeInterval=h.options.storeInterval||1e3,h.options.busyDelay=h.options.busyDelay||250,h.options.debug=h.options.debug||!1,h.options.initialTitle=h.options.initialTitle||r.title,h.intervalList=[],h.clearAllIntervals=function(){var e,t=h.intervalList;if(typeof t!="undefined"&&t!==null){for(e=0;e<t.length;e++)f(t[e]);h.intervalList=null}},h.debug=function(){(h.options.debug||!1)&&h.log.apply(h,arguments)},h.log=function(){var e=typeof n!="undefined"&&typeof n.log!="undefined"&&typeof n.log.apply!="undefined",t=r.getElementById("log"),i,s,o,u,a;e?(u=Array.prototype.slice.call(arguments),i=u.shift(),typeof n.debug!="undefined"?n.debug.apply(n,[i,u]):n.log.apply(n,[i,u])):i="\n"+arguments[0]+"\n";for(s=1,o=arguments.length;s<o;++s){a=arguments[s];if(typeof a=="object"&&typeof l!="undefined")try{a=l.stringify(a)}catch(f){}i+="\n"+a+"\n"}return t?(t.value+=i+"\n-----\n",t.scrollTop=t.scrollHeight-t.clientHeight):e||c(i),!0},h.getInternetExplorerMajorVersion=function(){var e=h.getInternetExplorerMajorVersion.cached=typeof h.getInternetExplorerMajorVersion.cached!="undefined"?h.getInternetExplorerMajorVersion.cached:function(){var e=3,t=r.createElement("div"),n=t.getElementsByTagName("i");while((t.innerHTML="<!--[if gt IE "+ ++e+"]><i></i><![endif]-->")&&n[0]);return e>4?e:!1}();return e},h.isInternetExplorer=function(){var e=h.isInternetExplorer.cached=typeof h.isInternetExplorer.cached!="undefined"?h.isInternetExplorer.cached:Boolean(h.getInternetExplorerMajorVersion());return e},h.emulated={pushState:!Boolean(e.history&&e.history.pushState&&e.history.replaceState&&!/ Mobile\/([1-7][a-z]|(8([abcde]|f(1[0-8]))))/i.test(i.userAgent)&&!/AppleWebKit\/5([0-2]|3[0-2])/i.test(i.userAgent)),hashChange:Boolean(!("onhashchange"in e||"onhashchange"in r)||h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<8)},h.enabled=!h.emulated.pushState,h.bugs={setHash:Boolean(!h.emulated.pushState&&i.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(i.userAgent)),safariPoll:Boolean(!h.emulated.pushState&&i.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(i.userAgent)),ieDoubleCheck:Boolean(h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<8),hashEscape:Boolean(h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<7)},h.isEmptyObject=function(e){for(var t in e)return!1;return!0},h.cloneObject=function(e){var t,n;return e?(t=l.stringify(e),n=l.parse(t)):n={},n},h.getRootUrl=function(){var e=r.location.protocol+"//"+(r.location.hostname||r.location.host);if(r.location.port||!1)e+=":"+r.location.port;return e+="/",e},h.getBaseHref=function(){var e=r.getElementsByTagName("base"),t=null,n="";return e.length===1&&(t=e[0],n=t.href.replace(/[^\/]+$/,"")),n=n.replace(/\/+$/,""),n&&(n+="/"),n},h.getBaseUrl=function(){var e=h.getBaseHref()||h.getBasePageUrl()||h.getRootUrl();return e},h.getPageUrl=function(){var e=h.getState(!1,!1),t=(e||{}).url||r.location.href,n;return n=t.replace(/\/+$/,"").replace(/[^\/]+$/,function(e,t,n){return/\./.test(e)?e:e+"/"}),n},h.getBasePageUrl=function(){var e=r.location.href.replace(/[#\?].*/,"").replace(/[^\/]+$/,function(e,t,n){return/[^\/]$/.test(e)?"":e}).replace(/\/+$/,"")+"/";return e},h.getFullUrl=function(e,t){var n=e,r=e.substring(0,1);return t=typeof t=="undefined"?!0:t,/[a-z]+\:\/\//.test(e)||(r==="/"?n=h.getRootUrl()+e.replace(/^\/+/,""):r==="#"?n=h.getPageUrl().replace(/#.*/,"")+e:r==="?"?n=h.getPageUrl().replace(/[\?#].*/,"")+e:t?n=h.getBaseUrl()+e.replace(/^(\.\/)+/,""):n=h.getBasePageUrl()+e.replace(/^(\.\/)+/,"")),n.replace(/\#$/,"")},h.getShortUrl=function(e){var t=e,n=h.getBaseUrl(),r=h.getRootUrl();return h.emulated.pushState&&(t=t.replace(n,"")),t=t.replace(r,"/"),h.isTraditionalAnchor(t)&&(t="./"+t),t=t.replace(/^(\.\/)+/g,"./").replace(/\#$/,""),t},h.store={},h.idToState=h.idToState||{},h.stateToId=h.stateToId||{},h.urlToId=h.urlToId||{},h.storedStates=h.storedStates||[],h.savedStates=h.savedStates||[],h.normalizeStore=function(){h.store.idToState=h.store.idToState||{},h.store.urlToId=h.store.urlToId||{},h.store.stateToId=h.store.stateToId||{}},h.getState=function(e,t){typeof e=="undefined"&&(e=!0),typeof t=="undefined"&&(t=!0);var n=h.getLastSavedState();return!n&&t&&(n=h.createStateObject()),e&&(n=h.cloneObject(n),n.url=n.cleanUrl||n.url),n},h.getIdByState=function(e){var t=h.extractId(e.url),n;if(!t){n=h.getStateString(e);if(typeof h.stateToId[n]!="undefined")t=h.stateToId[n];else if(typeof h.store.stateToId[n]!="undefined")t=h.store.stateToId[n];else{for(;;){t=(new Date).getTime()+String(Math.random()).replace(/\D/g,"");if(typeof h.idToState[t]=="undefined"&&typeof h.store.idToState[t]=="undefined")break}h.stateToId[n]=t,h.idToState[t]=e}}return t},h.normalizeState=function(e){var t,n;if(!e||typeof e!="object")e={};if(typeof e.normalized!="undefined")return e;if(!e.data||typeof e.data!="object")e.data={};t={},t.normalized=!0,t.title=e.title||"",t.url=h.getFullUrl(h.unescapeString(e.url||r.location.href)),t.hash=h.getShortUrl(t.url),t.data=h.cloneObject(e.data),t.id=h.getIdByState(t),t.cleanUrl=t.url.replace(/\??\&_suid.*/,""),t.url=t.cleanUrl,n=!h.isEmptyObject(t.data);if(t.title||n)t.hash=h.getShortUrl(t.url).replace(/\??\&_suid.*/,""),/\?/.test(t.hash)||(t.hash+="?"),t.hash+="&_suid="+t.id;return t.hashedUrl=h.getFullUrl(t.hash),(h.emulated.pushState||h.bugs.safariPoll)&&h.hasUrlDuplicate(t)&&(t.url=t.hashedUrl),t},h.createStateObject=function(e,t,n){var r={data:e,title:t,url:n};return r=h.normalizeState(r),r},h.getStateById=function(e){e=String(e);var n=h.idToState[e]||h.store.idToState[e]||t;return n},h.getStateString=function(e){var t,n,r;return t=h.normalizeState(e),n={data:t.data,title:e.title,url:e.url},r=l.stringify(n),r},h.getStateId=function(e){var t,n;return t=h.normalizeState(e),n=t.id,n},h.getHashByState=function(e){var t,n;return t=h.normalizeState(e),n=t.hash,n},h.extractId=function(e){var t,n,r;return n=/(.*)\&_suid=([0-9]+)$/.exec(e),r=n?n[1]||e:e,t=n?String(n[2]||""):"",t||!1},h.isTraditionalAnchor=function(e){var t=!/[\/\?\.]/.test(e);return t},h.extractState=function(e,t){var n=null,r,i;return t=t||!1,r=h.extractId(e),r&&(n=h.getStateById(r)),n||(i=h.getFullUrl(e),r=h.getIdByUrl(i)||!1,r&&(n=h.getStateById(r)),!n&&t&&!h.isTraditionalAnchor(e)&&(n=h.createStateObject(null,null,i))),n},h.getIdByUrl=function(e){var n=h.urlToId[e]||h.store.urlToId[e]||t;return n},h.getLastSavedState=function(){return h.savedStates[h.savedStates.length-1]||t},h.getLastStoredState=function(){return h.storedStates[h.storedStates.length-1]||t},h.hasUrlDuplicate=function(e){var t=!1,n;return n=h.extractState(e.url),t=n&&n.id!==e.id,t},h.storeState=function(e){return h.urlToId[e.url]=e.id,h.storedStates.push(h.cloneObject(e)),e},h.isLastSavedState=function(e){var t=!1,n,r,i;return h.savedStates.length&&(n=e.id,r=h.getLastSavedState(),i=r.id,t=n===i),t},h.saveState=function(e){return h.isLastSavedState(e)?!1:(h.savedStates.push(h.cloneObject(e)),!0)},h.getStateByIndex=function(e){var t=null;return typeof e=="undefined"?t=h.savedStates[h.savedStates.length-1]:e<0?t=h.savedStates[h.savedStates.length+e]:t=h.savedStates[e],t},h.getHash=function(){var e=h.unescapeHash(r.location.hash);return e},h.unescapeString=function(t){var n=t,r;for(;;){r=e.unescape(n);if(r===n)break;n=r}return n},h.unescapeHash=function(e){var t=h.normalizeHash(e);return t=h.unescapeString(t),t},h.normalizeHash=function(e){var t=e.replace(/[^#]*#/,"").replace(/#.*/,"");return t},h.setHash=function(e,t){var n,i,s;return t!==!1&&h.busy()?(h.pushQueue({scope:h,callback:h.setHash,args:arguments,queue:t}),!1):(n=h.escapeHash(e),h.busy(!0),i=h.extractState(e,!0),i&&!h.emulated.pushState?h.pushState(i.data,i.title,i.url,!1):r.location.hash!==n&&(h.bugs.setHash?(s=h.getPageUrl(),h.pushState(null,null,s+"#"+n,!1)):r.location.hash=n),h)},h.escapeHash=function(t){var n=h.normalizeHash(t);return n=e.escape(n),h.bugs.hashEscape||(n=n.replace(/\%21/g,"!").replace(/\%26/g,"&").replace(/\%3D/g,"=").replace(/\%3F/g,"?")),n},h.getHashByUrl=function(e){var t=String(e).replace(/([^#]*)#?([^#]*)#?(.*)/,"$2");return t=h.unescapeHash(t),t},h.setTitle=function(e){var t=e.title,n;t||(n=h.getStateByIndex(0),n&&n.url===e.url&&(t=n.title||h.options.initialTitle));try{r.getElementsByTagName("title")[0].innerHTML=t.replace("<","&lt;").replace(">","&gt;").replace(" & "," &amp; ")}catch(i){}return r.title=t,h},h.queues=[],h.busy=function(e){typeof e!="undefined"?h.busy.flag=e:typeof h.busy.flag=="undefined"&&(h.busy.flag=!1);if(!h.busy.flag){u(h.busy.timeout);var t=function(){var e,n,r;if(h.busy.flag)return;for(e=h.queues.length-1;e>=0;--e){n=h.queues[e];if(n.length===0)continue;r=n.shift(),h.fireQueueItem(r),h.busy.timeout=o(t,h.options.busyDelay)}};h.busy.timeout=o(t,h.options.busyDelay)}return h.busy.flag},h.busy.flag=!1,h.fireQueueItem=function(e){return e.callback.apply(e.scope||h,e.args||[])},h.pushQueue=function(e){return h.queues[e.queue||0]=h.queues[e.queue||0]||[],h.queues[e.queue||0].push(e),h},h.queue=function(e,t){return typeof e=="function"&&(e={callback:e}),typeof t!="undefined"&&(e.queue=t),h.busy()?h.pushQueue(e):h.fireQueueItem(e),h},h.clearQueue=function(){return h.busy.flag=!1,h.queues=[],h},h.stateChanged=!1,h.doubleChecker=!1,h.doubleCheckComplete=function(){return h.stateChanged=!0,h.doubleCheckClear(),h},h.doubleCheckClear=function(){return h.doubleChecker&&(u(h.doubleChecker),h.doubleChecker=!1),h},h.doubleCheck=function(e){return h.stateChanged=!1,h.doubleCheckClear(),h.bugs.ieDoubleCheck&&(h.doubleChecker=o(function(){return h.doubleCheckClear(),h.stateChanged||e(),!0},h.options.doubleCheckInterval)),h},h.safariStatePoll=function(){var t=h.extractState(r.location.href),n;if(!h.isLastSavedState(t))return n=t,n||(n=h.createStateObject()),h.Adapter.trigger(e,"popstate"),h;return},h.back=function(e){return e!==!1&&h.busy()?(h.pushQueue({scope:h,callback:h.back,args:arguments,queue:e}),!1):(h.busy(!0),h.doubleCheck(function(){h.back(!1)}),p.go(-1),!0)},h.forward=function(e){return e!==!1&&h.busy()?(h.pushQueue({scope:h,callback:h.forward,args:arguments,queue:e}),!1):(h.busy(!0),h.doubleCheck(function(){h.forward(!1)}),p.go(1),!0)},h.go=function(e,t){var n;if(e>0)for(n=1;n<=e;++n)h.forward(t);else{if(!(e<0))throw new Error("History.go: History.go requires a positive or negative integer passed.");for(n=-1;n>=e;--n)h.back(t)}return h};if(h.emulated.pushState){var d=function(){};h.pushState=h.pushState||d,h.replaceState=h.replaceState||d}else h.onPopState=function(t,n){var i=!1,s=!1,o,u;return h.doubleCheckComplete(),o=h.getHash(),o?(u=h.extractState(o||r.location.href,!0),u?h.replaceState(u.data,u.title,u.url,!1):(h.Adapter.trigger(e,"anchorchange"),h.busy(!1)),h.expectedStateId=!1,!1):(i=h.Adapter.extractEventData("state",t,n)||!1,i?s=h.getStateById(i):h.expectedStateId?s=h.getStateById(h.expectedStateId):s=h.extractState(r.location.href),s||(s=h.createStateObject(null,null,r.location.href)),h.expectedStateId=!1,h.isLastSavedState(s)?(h.busy(!1),!1):(h.storeState(s),h.saveState(s),h.setTitle(s),h.Adapter.trigger(e,"statechange"),h.busy(!1),!0))},h.Adapter.bind(e,"popstate",h.onPopState),h.pushState=function(t,n,r,i){if(h.getHashByUrl(r)&&h.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(i!==!1&&h.busy())return h.pushQueue({scope:h,callback:h.pushState,args:arguments,queue:i}),!1;h.busy(!0);var s=h.createStateObject(t,n,r);return h.isLastSavedState(s)?h.busy(!1):(h.storeState(s),h.expectedStateId=s.id,p.pushState(s.id,s.title,s.url),h.Adapter.trigger(e,"popstate")),!0},h.replaceState=function(t,n,r,i){if(h.getHashByUrl(r)&&h.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(i!==!1&&h.busy())return h.pushQueue({scope:h,callback:h.replaceState,args:arguments,queue:i}),!1;h.busy(!0);var s=h.createStateObject(t,n,r);return h.isLastSavedState(s)?h.busy(!1):(h.storeState(s),h.expectedStateId=s.id,p.replaceState(s.id,s.title,s.url),h.Adapter.trigger(e,"popstate")),!0};if(s){try{h.store=l.parse(s.getItem("History.store"))||{}}catch(v){h.store={}}h.normalizeStore()}else h.store={},h.normalizeStore();h.Adapter.bind(e,"beforeunload",h.clearAllIntervals),h.Adapter.bind(e,"unload",h.clearAllIntervals),h.saveState(h.storeState(h.extractState(r.location.href,!0))),s&&(h.onUnload=function(){var e,t;try{e=l.parse(s.getItem("History.store"))||{}}catch(n){e={}}e.idToState=e.idToState||{},e.urlToId=e.urlToId||{},e.stateToId=e.stateToId||{};for(t in h.idToState){if(!h.idToState.hasOwnProperty(t))continue;e.idToState[t]=h.idToState[t]}for(t in h.urlToId){if(!h.urlToId.hasOwnProperty(t))continue;e.urlToId[t]=h.urlToId[t]}for(t in h.stateToId){if(!h.stateToId.hasOwnProperty(t))continue;e.stateToId[t]=h.stateToId[t]}h.store=e,h.normalizeStore(),s.setItem("History.store",l.stringify(e))},h.intervalList.push(a(h.onUnload,h.options.storeInterval)),h.Adapter.bind(e,"beforeunload",h.onUnload),h.Adapter.bind(e,"unload",h.onUnload));if(!h.emulated.pushState){h.bugs.safariPoll&&h.intervalList.push(a(h.safariStatePoll,h.options.safariPollInterval));if(i.vendor==="Apple Computer, Inc."||(i.appCodeName||"")==="Mozilla")h.Adapter.bind(e,"hashchange",function(){h.Adapter.trigger(e,"popstate")}),h.getHash()&&h.Adapter.onDomLoad(function(){h.Adapter.trigger(e,"hashchange")})}},h.init()}(window)}catch(t){}}),timely.define("external_libs/jquery.tablescroller",["jquery_timely"],function(e){function n(){if(t)return t;var n=e('<div style="width:50px;height:50px;overflow:hidden;position:absolute;top:-200px;left:-200px;"><div style="height:100px;"></div></div>');e("body").append(n);var r=e("div",n).innerWidth();n.css("overflow-y","auto");var i=e("div",n).innerWidth();return e(n).remove(),t=r-i,t}var t=0;e.fn.tableScroll=function(t){if(t=="undo"){var r=e(this).parent().parent();r.hasClass("tablescroll_wrapper")&&(r.find(".tablescroll_head thead").prependTo(this),r.find(".tablescroll_foot tfoot").appendTo(this),r.before(this),r.empty());return}var i=e.extend({},e.fn.tableScroll.defaults,t);return i.scrollbarWidth=n(),this.each(function(){var t=i.flush,n=e(this).addClass("tablescroll_body"),r=e('<div class="tablescroll_wrapper ai1ec-popover-boundary"></div>').insertBefore(n).append(n);r.parent("div").hasClass(i.containerClass)||e("<div></div>").addClass(i.containerClass).insertBefore(r).append(r);var s=i.width?i.width:n.outerWidth(),o=i.scroll?"auto":"hidden";r.css({width:s+"px",height:i.height+"px",overflow:o}),n.css("width",s+"px");var u=r.outerWidth(),a=u-s;r.css({width:s-a-2+"px"}),n.css("width",s-a-i.scrollbarWidth+"px"),n.outerHeight()<=i.height&&(r.css({height:"auto",width:s-a+"px"}),t=!1);var f=e("thead",n).length?!0:!1,l=e("tfoot",n).length?!0:!1,c=e("thead tr:first",n),h=e("tbody tr:first",n),p=e("tfoot tr:first",n),d=0;e("th, td",c).each(function(t){d=e(this).width(),e("th:eq("+t+"), td:eq("+t+")",c).css("width",d+"px"),e("th:eq("+t+"), td:eq("+t+")",h).css("width",d+"px"),l&&e("th:eq("+t+"), td:eq("+t+")",p).css("width",d+"px")});if(f)var v=e('<table class="tablescroll_head" cellspacing="0"></table>').insertBefore(r).prepend(e("thead",n));if(l)var m=e('<table class="tablescroll_foot" cellspacing="0"></table>').insertAfter(r).prepend(e("tfoot",n));v!=undefined&&(v.css("width",s+"px"),t&&(e("tr:first th:last, tr:first td:last",v).css("width",d+i.scrollbarWidth+"px"),v.css("width",r.outerWidth()+"px"))),m!=undefined&&(m.css("width",s+"px"),t&&(e("tr:first th:last, tr:first td:last",m).css("width",d+i.scrollbarWidth+"px"),m.css("width",r.outerWidth()+"px")))}),this},e.fn.tableScroll.defaults={flush:!0,width:null,height:100,containerClass:"tablescroll",scroll:!0}}),timely.define("external_libs/jquery.scrollTo",["jquery_timely"],function(e){function n(e){return typeof e=="object"?e:{top:e,left:e}}var t=e.scrollTo=function(t,n,r){e(window).scrollTo(t,n,r)};t.defaults={axis:"xy",duration:parseFloat(e.fn.jquery)>=1.3?0:1,limit:!0},t.window=function(t){return e(window)._scrollable()},e.fn._scrollable=function(){return this.map(function(){var t=this,n=!t.nodeName||e.inArray(t.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1;if(!n)return t;var r=(t.contentWindow||t).document||t.ownerDocument||t;return/webkit/i.test(navigator.userAgent)||r.compatMode=="BackCompat"?r.body:r.documentElement})},e.fn.scrollTo=function(r,i,s){return typeof i=="object"&&(s=i,i=0),typeof s=="function"&&(s={onAfter:s}),r=="max"&&(r=9e9),s=e.extend({},t.defaults,s),i=i||s.duration,s.queue=s.queue&&s.axis.length>1,s.queue&&(i/=2),s.offset=n(s.offset),s.over=n(s.over),this._scrollable().each(function(){function h(e){u.animate(l,i,s.easing,e&&function(){e.call(this,r,s)})}if(r==null)return;var o=this,u=e(o),a=r,f,l={},c=u.is("html,body");switch(typeof a){case"number":case"string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(a)){a=n(a);break}a=e(a,this);if(!a.length)return;case"object":if(a.is||a.style)f=(a=e(a)).offset()}e.each(s.axis.split(""),function(e,n){var r=n=="x"?"Left":"Top",i=r.toLowerCase(),p="scroll"+r,d=o[p],v=t.max(o,n);if(f)l[p]=f[i]+(c?0:d-u.offset()[i]),s.margin&&(l[p]-=parseInt(a.css("margin"+r))||0,l[p]-=parseInt(a.css("border"+r+"Width"))||0),l[p]+=s.offset[i]||0,s.over[i]&&(l[p]+=a[n=="x"?"width":"height"]()*s.over[i]);else{var m=a[i];l[p]=m.slice&&m.slice(-1)=="%"?parseFloat(m)/100*v:m}s.limit&&/^\d+$/.test(l[p])&&(l[p]=l[p]<=0?0:Math.min(l[p],v)),!e&&s.queue&&(d!=l[p]&&h(s.onAfterFirst),delete l[p])}),h(s.onAfter)}).end()},t.max=function(t,n){var r=n=="x"?"Width":"Height",i="scroll"+r;if(!e(t).is("html,body"))return t[i]-e(t)[r.toLowerCase()]();var s="client"+r,o=t.ownerDocument.documentElement,u=t.ownerDocument.body;return Math.max(o[i],u[i])-Math.min(o[s],u[s])}}),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/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/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/calendar/load_views",["jquery_timely","scripts/calendar/print","scripts/calendar/agenda_view","scripts/calendar/month_view","libs/frontend_utils","libs/utils","ai1ec_calendar","ai1ec_config","scripts/common_scripts/frontend/common_frontend","libs/select2_multiselect_helper","external_libs/twig","agenda","oneday","month","external_libs/jquery_history","external_libs/jquery.tablescroller","external_libs/jquery.scrollTo","external_libs/bootstrap_datepicker","external_libs/bootstrap/alert","external_libs/jquery_cookie"],function(e,t,n,r,i,s,o,u,a,f,l,c,h,p){e.cookie.json=!0;var d="ai1ec_saved_filter",v=!e("#save_filtered_views").hasClass("ai1ec-hide");timely.renderer_map||(timely.renderer_map={}),e.extend(timely.renderer_map,{agenda:c,oneday:h,week:h,month:p});var m=function(t){var n=t.find("#ai1ec-view-dropdown .ai1ec-dropdown-menu .ai1ec-active a"),i=u.week_view_ends_at-u.week_view_starts_at,s=i*60;t.find("table.ai1ec-week-view-original").tableScroll({height:s,containerClass:"ai1ec-week-view ai1ec-popover-boundary",scroll:!1}),t.find("table.ai1ec-oneday-view-original").tableScroll({height:s,containerClass:"ai1ec-oneday-view ai1ec-popover-boundary",scroll:!1});if(t.find(".ai1ec-week-view").length||t.find(".ai1ec-oneday-view").length)t.find(".ai1ec-oneday-view .tablescroll_wrapper, .ai1ec-week-view .tablescroll_wrapper").scrollTo(t.find(".ai1ec-hour-marker:eq("+u.week_view_starts_at+")")),t.find(".ai1ec-hour-marker:eq("+u.week_view_starts_at+")").addClass("ai1ec-first-visible");t.find(".ai1ec-month-view .ai1ec-multiday").length&&r.extend_multiday_events(t),t.find(".ai1ec-calendar-view-container").data("ai1ec-inited",!0).trigger("initialize_view.ai1ec"),t.find(".ai1ec-calendar-toolbar").trigger("ai1ec-affix.reinit"),e(".ai1ec-event[data-ticket-url], .ai1ec-has-tickets-button").each(function(){var t=e(this),n=t.data("ticket-url"),r=e.merge(e(".ai1ec-sas-action-tickets",t),e(".ai1ec-sas-action-tickets",t.parent("a").next(".ai1ec-popover"))).attr("href",n)})},g=function(t){t.find(".ai1ec-calendar-view-container").trigger("destroy_view.ai1ec");var n=t.find(".ai1ec-minical-trigger").data("datepicker");typeof n!="undefined"&&(n.picker.remove(),e(document).off("changeDate",".ai1ec-minical-trigger")),t.find(".ai1ec-tooltip.ai1ec-in, .ai1ec-popup").remove(),t.find(".ai1ec-calendar-toolbar .ai1ec-btn-toolbar").remove()},y=function(){var t=[],n=[],r=[],i;e(".ai1ec-category-filter .ai1ec-dropdown-menu .ai1ec-active").each(function(){t.push(e(this).data("term"))}),e(".ai1ec-tag-filter .ai1ec-dropdown-menu .ai1ec-active").each(function(){n.push(e(this).data("term"))}),e(".ai1ec-author-filter .ai1ec-dropdown-menu .ai1ec-active").each(function(){r.push(e(this).data("term"))});var s={};return s.cat_ids=t,s.tag_ids=n,s.auth_ids=r,i=e(".ai1ec-views-dropdown .ai1ec-dropdown-menu .ai1ec-active").data("action"),s.action=i,s},b=function(){var t=History.getState(),n=e.cookie(d);if(null===n||undefined===n)n={};var r=y();u.is_calendar_page?n.calendar_page=r:n[t.url]=r,e.cookie(d,n,{path:"/",expires:365}),e("#save_filtered_views").addClass("ai1ec-active").attr("data-original-title",u.clear_saved_filter_text);var i=s.make_alert(u.save_filter_text_ok,"success");e("#ai1ec-calendar").prepend(i)},w=function(t){t.stopImmediatePropagation();var n=e.cookie(d);if(u.is_calendar_page)delete n.calendar_page;else{var r=History.getState();delete n[r.url]}e.cookie(d,n,{path:"/",expires:365}),e("#save_filtered_views").removeClass("ai1ec-active").attr("data-original-title",u.reset_saved_filter_text),v||e("#save_filtered_views").addClass("ai1ec-hide");var i=s.make_alert(u.remove_filter_text_ok,"success");e("#ai1ec-calendar").prepend(i)},E=!1,S={},x=function(t,n,r){D(t,n),t.find(".ai1ec-calendar-view-loading").fadeIn("fast").end().find(".ai1ec-calendar-view").fadeTo("fast",.3,function(){var i={request_type:r,ai1ec_doing_ajax:!0};e("#ai1ec-container > .ai1ec-alert").remove(),E&&1===E.readyState&&E.abort("ai1ec_abort");var o="-"+i.request_type;S[n+o]?E=S[n+o]:(E=e.ajax({url:n,dataType:r,data:i,method:"GET"}),S[n+o]=E.promise()),E.done(function(i){e(document).trigger("calendar_view_loaded.ai1ec",t),g(t),typeof i.views_dropdown=="string"&&t.find(".ai1ec-views-dropdown").replaceWith(i.views_dropdown),typeof i.categories=="string"&&t.find(".ai1ec-category-filter").replaceWith(i.categories),typeof i.authors=="string"&&t.find(".ai1ec-author-filter").replaceWith(i.authors),typeof i.tags=="string"&&t.find(".ai1ec-tag-filter").replaceWith(i.tags);if(typeof i.custom_filters=="string"){var s=t.find("li.ai1ec-custom-filter").parent();t.find("li.ai1ec-custom-filter").remove(),s.append(i.custom_filters)}typeof i.subscribe_buttons=="string"&&t.find(".ai1ec-subscribe-container").empty().append(i.subscribe_buttons),typeof i.save_view_btngroup=="string"&&t.find("#save_filtered_views").closest(".ai1ec-btn-group").replaceWith(i.save_view_btngroup),v=i.are_filters_set;var o;if(i.is_json){var u=i.html.type;if(!timely.renderer_map[u]){x(t,n.replace(/\~json/,"~html"),r);return}o=timely.renderer_map[u]}t.find(".ai1ec-calendar-view").html(o?o.render(i.html):e(i.html).find(".ai1ec-calendar-view").length?e(i.html).find(".ai1ec-calendar-view").html():i.html),m(t)}),E.fail(function(n,r,i){if("ai1ec_abort"===r)return;var o=u.load_views_error;o=o.replace("%STATUS%",n.status),o=o.replace("%ERROR%",i),o=o+"<br/>"+s.make_popup_content_link(u.load_views_error_link_popup,u.load_views_error_popup_title,n.responseText);var a=s.make_alert(o,"error",!0);e("#ai1ec-container").prepend(a),g(t),m(t)}),E.always(function(){t.find(".ai1ec-calendar-view-loading").fadeOut("fast"),t.find(".ai1ec-calendar-view").fadeTo("fast",1)})})},T=!1,N=function(t){var n=History.getState(),r=e(".ai1ec-calendar:first");if(n.data.ai1ec!==undefined&&!0===n.data.ai1ec||!0===T)T=!0,x(r,n.url,"json")},C=function(e,t,n){if(t==="json"){var r={ai1ec:!0};null===n.match(/^http/)&&(n=location.protocol+n),History.pushState(r,document.title,decodeURI(n))}else x(e,n,"jsonp")},k=function(t){var n=e(this),r=n.closest(".ai1ec-calendar");t.preventDefault(),C(r,n.data("type"),n.attr("href"))},L=function(t){var n=e(this);t.preventDefault();if(typeof n.data("datepicker")=="undefined"){n.datepicker({todayBtn:"linked",todayHighlight:!0,language:n.data("lang")});var r=n.data("datepicker");if(n.closest(".ai1ec-pull-right").length>0){r.picker.addClass("ai1ec-right-aligned");var i=r.place;r.place=function(){i.call(this);var t=this.component?this.component:this.element,n=t.offset();this.picker.css({left:"auto",right:e(document).width()-n.left-t.outerWidth()})}}e(document).one("changeDate",".ai1ec-minical-trigger",A)}n.datepicker("show")},A=function(t){var n,r=e(this),i=r.closest(".ai1ec-calendar"),s;r.datepicker("hide"),n=r.data("href"),s=t.format(),s=s.replace(/\//g,"-"),n=n.replace("__DATE__",s),C(i,r.data("type"),n)},O=function(t){var n;typeof t.added!="undefined"?n=e(t.added.element).data("href"):n=e("option[value="+t.removed.id+"]",t.target).data("href");var r={ai1ec:!0};History.pushState(r,null,n)},M=function(){var t=e(this).closest(".ai1ec-calendar");return C(t,e(this).attr("data-type"),e(this).attr("data-href")),!1},_=u.ai1ec_permalinks_enabled?"/":"|",D=function(t,n){var r={},i=function(i,s){var o=e(".ai1ec-filters .ai1ec-load-view."+s.filter_class,t),u=e(s.filter_button,t),a=new RegExp(i+"~((,?[0-9]+)+)"),f=n.match(a),l=n.match(/action~(\w+)/),l=l&&l[1]?l[1]:null,f=f&&f[1]?e.map(f[1].split(","),function(e){return parseInt(e,10)}):[];r[i]=f.join(","),o.each(function(){var t=this.href,n=e(this).closest("[data-term]"),r=n.data("term"),s=e.extend(!0,[],f);-1<e.inArray(r,f)?(s=e.grep(s,function(e){return r!=e}),n.addClass("ai1ec-active")):(s.push(r),n.removeClass("ai1ec-active"));var o=s.length?i+"~"+s.join(","):"";t.match(a)?this.href=t.replace(a,o):s.length&&(this.href+=_+o),l&&(this.href=this.href.replace(/action~(\w+)/,"action~"+l)),this.href=P(this.href)}),e(s.filter_items,t).length?u.addClass("ai1ec-active"):u.removeClass("ai1ec-active"),e(".ai1ec-clear-filter",u).each(function(){e(this).attr("data-href",P(e(this).attr("data-href").replace(a,"").replace(/action~(\w+)/,"action~"+l)))})},s={};e("ul.ai1ec-filters > li",t).each(function(){var t=e(this),n=t.data("slug");s[n+"_ids"]={filter_class:"ai1ec-"+n,filter_button:"li.ai1ec-"+n+"-filter",filter_items:".ai1ec-"+n+"-filter .ai1ec-active"}});for(var o in s)i(o,s[o]);for(var o in r){var u=r[o],a=new RegExp(o+"~((,?[0-9]+)+)");e(".ai1ec-filters .ai1ec-load-view").each(function(){if(e(this).hasClass(s[o].filter_class))return;u?this.href.match(a)?this.href=this.href.replace(a,o+"~"+u):this.href=this.href+_+o+"~"+u:this.href=P(this.href.replace(a,""))}),e(".ai1ec-clear-filter",t).each(function(){var t=e(this),n=t.closest("[data-slug]").data("slug");n===o.substr(0,o.length-4)||!u?t.attr("data-href",P(t.attr("data-href").replace(a,""))):t.attr("data-href").match(a)?t.attr("data-href",P(t.attr("data-href").replace(a,o+"~"+u))):t.attr("data-href",P(t.attr("data-href")+_+o+"~"+u))})}},P=function(e){return"/"===_?e.replace(/\/\//g,"/").replace(/\/\//g,"/").replace(/:\//g,"://"):e.replace(/\|\|/g,"|").replace(/\|\|/g,"|")};return{initialize_view:m,handle_click_on_link_to_load_view:k,handle_minical_trigger:L,handle_minical_change_date:A,clear_filters:M,handle_state_change:N,load_view:x,save_current_filter:b,remove_current_filter:w,load_view_from_select2_filter:O,load_view_according_to_datatype:C}}),timely.define("scripts/calendar/calendar-affix",["jquery_timely","ai1ec_config"],function(e,t){var n=function(n){var r=n.find(".ai1ec-calendar-toolbar");r.length||(r=e("<div />",{"class":"timely ai1ec-calendar-toolbar ai1ec-empty-toolbar ai1ec-clearfix"}),n.prepend(r));var i=n.find(".ai1ec-views-dropdown").closest("div.ai1ec-clearfix").css("clear","both"),s=r.find(".ai1ec-dropdown-toggle"),o=n.find("#ai1ec-calendar-view"),u=e("#wpadminbar"),a=r.offset().top,f=0,l=null,c=function(){return e("#ai1ec-bs-modes div:visible:first").text()},h=function(){var t=["xs","sm","md","lg"],n=e('<div id="ai1ec-bs-modes"></div>');for(var r in t)e('<div class="ai1ec-device-'+t[r]+" ai1ec-visible-"+t[r]+'">'+t[r]+"</div>").appendTo(n);n.appendTo("body")},p=function(){return parseInt(t["affix_vertical_offset_"+c()]||0)},d=function(){s.each(function(){e(this).contents().eq(-3).wrap('<div class="ai1ec-hidden" />')})},v=function(){s.find(".ai1ec-hidden").contents().unwrap()},m=function(){var e=0;"fixed"===u.css("position")&&(e=u.height()),r.css("top",e+p()+"px")},g=function(){return f},y=function(){f=a-("fixed"===u.css("position")?u.height():0)-p()},b=function(){r.height()>r.data("original_height")?(d(),r.height()>r.data("original_height")&&v()):v()},w=function(){n.find(".ai1ec-affix .ai1ec-views-dropdown").closest("div.ai1ec-clearfix").remove(),i=n.find(".ai1ec-views-dropdown").closest("div.ai1ec-clearfix"),s=r.find(".ai1ec-dropdown-toggle"),r.trigger("ai1ec-affix-top.bs.affix").find(".ai1ec-views-dropdown").closest("div.ai1ec-clearfix").hide().end().end().data({original_height:r.height()}).find(".ai1ec-views-dropdown").closest("div.ai1ec-clearfix").show().end().end().filter(".ai1ec-affix").trigger("ai1ec-affix.bs.affix")},E=function(){r.hasClass("ai1ec-affix")&&r.addClass("ai1ec-was-affixed"),y(),r.removeClass("ai1ec-affix").css("width",n.width()).find(".ai1ec-btn-toolbar").hide().end().data({original_height:r.height()}),m(),a=r.offset().top,r.filter(".ai1ec-was-affixed").addClass("ai1ec-affix").removeClass("ai1ec-was-affixed").find(".ai1ec-btn-toolbar").show(),l=null};return h(),y(),r.data({original_height:r.height()}).css("width",n.width()).affix({offset:{top:g,bottom:0}}).on("ai1ec-affix.bs.affix",function(){var t=o.offset().top;i.hide().appendTo(r).show().css("opacity",0).animate({opacity:1},400),b(),m(),o.css("margin-top",r.outerHeight(!0)+parseInt(r.css("margin-bottom"))+"px"),e("body").addClass("ai1ec-has-affixed-toolbar")}).on("ai1ec-affix-top.bs.affix",function(){i.hide(),o.prepend(i),i.show().css("opacity",0).animate({opacity:1},400),v(),m(),o.css("margin-top",0),r.data("original_height",r.height()),e("body").removeClass("ai1ec-has-affixed-toolbar")}).on("ai1ec-affix.reinit",w).filter(".ai1ec-affix").trigger("ai1ec-affix.bs.affix"),e(window).on("resize.affix",function(){clearTimeout(l),l=setTimeout(E,100)}),n};return{initialize_affixed_toolbar:n}}),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/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("scripts/calendar",["jquery_timely","domReady","scripts/calendar/load_views","scripts/calendar/print","scripts/calendar/agenda_view","scripts/calendar/month_view","scripts/calendar/calendar-affix","ai1ec_calendar","ai1ec_config","scripts/common_scripts/frontend/common_frontend","libs/utils","libs/select2_multiselect_helper","external_libs/bootstrap/transition","external_libs/bootstrap/modal","external_libs/jquery.scrollTo","external_libs/jquery_cookie"],function(e,t,n,r,i,s,o,u,a,f,l,c){var h=function(){if(u.selector!==undefined&&u.selector!==""&&e(u.selector).length===1){var t=e(":header:contains("+u.title+"):first");t.length||(t=e('<h1 class="page-title"></h1>'),t.text(u.title));var n=e(".ai1ec-main-container:first").detach().before(t);e(u.selector).empty().append(n).hide().css("visibility","visible").fadeIn("fast")}},p=function(){var t=e(this).data("instanceId"),n=e(this).closest(".ai1ec-calendar");n.find(".ai1ec-event-instance-id-"+t).addClass("ai1ec-hover")},d=function(){var t=e(this).data("instanceId"),n=e(this).closest(".ai1ec-calendar");n.find(".ai1ec-event-instance-id-"+t).removeClass("ai1ec-hover")},v=function(){var t=e(this),n=t.closest(".ai1ec-calendar"),r=t.data("instanceId");t.delay(500).queue(function(){n.find(".ai1ec-event-instance-id-"+r).addClass("ai1ec-raised")})},m=function(t){var n=e(this),r=n.closest(".ai1ec-calendar"),i=n.data("instanceId"),s=e(t.toElement||t.relatedTarget),o=r.find(".ai1ec-event-instance-id-"+i);if(s.is(o)||s.parent().is(o))return;r.find(".ai1ec-event-instance-id-"+i).clearQueue().removeClass("ai1ec-raised")},g=function(){h()},y=function(){e(document).on({mouseenter:p,mouseleave:d},".ai1ec-event-container.ai1ec-multiday"),e(document).on({mouseenter:v,mouseleave:m},".ai1ec-oneday-view .ai1ec-oneday .ai1ec-event-container, .ai1ec-week-view .ai1ec-week .ai1ec-event-container"),e(document).on("click",".ai1ec-agenda-view .ai1ec-event-header",i.toggle_event),e(document).on("click","#ai1ec-agenda-expand-all",i.expand_all),e(document).on("click","#ai1ec-agenda-collapse-all",i.collapse_all),e(document).on("click","a.ai1ec-load-view",n.handle_click_on_link_to_load_view),e(document).on("click",".ai1ec-minical-trigger",n.handle_minical_trigger),e(document).on("click",".ai1ec-clear-filter",n.clear_filters),e(document).on("click","#ai1ec-print-button",r.handle_click_on_print_button),e(document).on("click",".ai1ec-reveal-full-day button",function(){var t=e(this).closest(".ai1ec-calendar");e(this).fadeOut();var n=t.find(".ai1ec-oneday-view-original, .ai1ec-week-view-original"),r=t.find(".tablescroll_wrapper").offset().top-n.offset().top;e(window).scrollTo("+="+r+"px",400);var i=1442;t.find(".tablescroll_wrapper").scrollTo("-="+r+"px",400).animate({height:i+"px"})}),History.Adapter.bind(window,"statechange",n.handle_state_change),e(document).on("click","#ai1ec-calendar-view .ai1ec-load-event",function(t){e.cookie.raw=!1,e.cookie("ai1ec_calendar_url",document.URL,{path:a.cookie_path})})},b=function(){c.init(e(".ai1ec-select2-filters")),e(document).on("change",".ai1ec-select2-multiselect-selector",n.load_view_from_select2_filter)};t(function(){var t=e(".ai1ec-calendar"),r=e(".ai1ec-calendar:visible").first();g(),a.use_select2&&b(),y(),t.each(function(){n.initialize_view(e(this))}),a.affix_filter_menu&&1===r.length&&o.initialize_affixed_toolbar(r)});var w=function(){};return{start:w,initialize_view:n.initialize_view}}),timely.require(["scripts/calendar"],function(e){e.start()}),timely.define("pages/calendar",function(){});
358
  * limitations under the License.
359
  * ======================================================================== */
360
 
361
+ 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("scripts/calendar/print",["jquery_timely"],function(e){var t=function(t){t.preventDefault();var n=e("body"),r=e("html"),i=e(this).closest(".ai1ec-calendar").html(),s=n.html();s=s.replace(/<script.*?>([\s\S]*?)<\/script>/gmi,""),n.empty(),n.addClass("timely"),r.addClass("ai1ec-print"),n.html(i),e("span").click(function(){return!1}),e(".ai1ec-agenda-view a").each(function(){e(this).data("href",e(this).attr("href")),e(this).attr("href","#")}),window.print(),e(".ai1ec-agenda-view a").each(function(){e(this).attr("href",e(this).data("href")),e(this).data("href","")}),n.removeClass("timely"),r.removeClass("ai1ec-print"),n.html(s)};return{handle_click_on_print_button:t}}),timely.define("scripts/calendar/agenda_view",["jquery_timely"],function(e){var t=function(){e(this).closest(".ai1ec-event").toggleClass("ai1ec-expanded").find(".ai1ec-event-summary").slideToggle(300)},n=function(){var t=e(this).closest(".ai1ec-calendar");t.find(".ai1ec-expanded .ai1ec-event-toggle").click()},r=function(){var t=e(this).closest(".ai1ec-calendar");t.find(".ai1ec-event:not(.ai1ec-expanded) .ai1ec-event-toggle").click()};return{toggle_event:t,collapse_all:n,expand_all:r}}),timely.define("external_libs/modernizr",[],function(){var e=function(e,t,n){function S(e){f.cssText=e}function x(e,t){return S(h.join(e+";")+(t||""))}function T(e,t){return typeof e===t}function N(e,t){return!!~(""+e).indexOf(t)}function C(e,t,r){for(var i in e){var s=t[e[i]];if(s!==n)return r===!1?e[i]:T(s,"function")?s.bind(r||t):s}return!1}var r="2.5.3",i={},s=!0,o=t.documentElement,u="modernizr",a=t.createElement(u),f=a.style,l,c={}.toString,h=" -webkit- -moz- -o- -ms- ".split(" "),p={},d={},v={},m=[],g=m.slice,y,b=function(e,n,r,i){var s,a,f,l=t.createElement("div"),c=t.body,h=c?c:t.createElement("body");if(parseInt(r,10))while(r--)f=t.createElement("div"),f.id=i?i[r]:u+(r+1),l.appendChild(f);return s=["&#173;","<style>",e,"</style>"].join(""),l.id=u,(c?l:h).innerHTML+=s,h.appendChild(l),c||(h.style.background="",o.appendChild(h)),a=n(l,e),c?l.parentNode.removeChild(l):h.parentNode.removeChild(h),!!a},w={}.hasOwnProperty,E;!T(w,"undefined")&&!T(w.call,"undefined")?E=function(e,t){return w.call(e,t)}:E=function(e,t){return t in e&&T(e.constructor.prototype[t],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(t){var n=this;if(typeof n!="function")throw new TypeError;var r=g.call(arguments,1),i=function(){if(this instanceof i){var e=function(){};e.prototype=n.prototype;var s=new e,o=n.apply(s,r.concat(g.call(arguments)));return Object(o)===o?o:s}return n.apply(t,r.concat(g.call(arguments)))};return i});var k=function(n,r){var s=n.join(""),o=r.length;b(s,function(n,r){var s=t.styleSheets[t.styleSheets.length-1],u=s?s.cssRules&&s.cssRules[0]?s.cssRules[0].cssText:s.cssText||"":"",a=n.childNodes,f={};while(o--)f[a[o].id]=a[o];i.touch="ontouchstart"in e||e.DocumentTouch&&t instanceof DocumentTouch||(f.touch&&f.touch.offsetTop)===9},o,r)}([,["@media (",h.join("touch-enabled),("),u,")","{#touch{top:9px;position:absolute}}"].join("")],[,"touch"]);p.touch=function(){return i.touch};for(var L in p)E(p,L)&&(y=L.toLowerCase(),i[y]=p[L](),m.push((i[y]?"":"no-")+y));return S(""),a=l=null,i._version=r,i._prefixes=h,i.testStyles=b,o.className=o.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(s?" js "+m.join(" "):""),i}(window,window.document);return e}),timely.define("scripts/calendar/month_view",["jquery_timely","external_libs/modernizr"],function(e,t){var n=navigator.userAgent.match(/opera/i),r=navigator.userAgent.match(/webkit/i),i=function(t){var n=t.find(".ai1ec-day"),r=t.find(".ai1ec-week:first .ai1ec-day").length;t.find(".ai1ec-month-view .ai1ec-multiday").each(function(){var t=this.parentNode,r=e(this).outerHeight(!0),i=e(".ai1ec-date",t),u=parseInt(i.text(),10),a=e(this).data("endTruncated"),f=parseInt(a?e(n[n.length-1]).text():e(this).data("endDay"),10),l=e(this),c=e(".ai1ec-event",l)[0].style.backgroundColor,h=0,p=f-u+1,d=p,v,m=0;n.each(function(t){var n=e(".ai1ec-date",this),r=e(this.parentNode),i=r.index(),a=parseInt(n.text(),10);if(a>=u&&a<=f){a===u&&(v=parseInt(n.css("marginBottom"),10)+16),h===0&&m++;if(i===0&&a>u&&d!==0){var p=l.next(".ai1ec-popup").andSelf().clone(!1);n.parent().append(p);var g=p.first();g.addClass("ai1ec-multiday-bar ai1ec-multiday-clone"),g.css({position:"absolute",left:"1px",top:parseInt(n.css("marginBottom"),10)+13,backgroundColor:c});var y=d>7?7:d;g.css("width",s(y)),d>7&&g.append(o(1,c)),g.append(o(2,c))}h===0?n.css({marginBottom:v+"px"}):n.css({marginBottom:"+=16px"}),d--,d>0&&i===6&&h++}});if(a){var g=l.find("."+l[0].className.replace(/\s+/igm,".")).last();g.append(o(1,c))}e(this).css({position:"absolute",top:i.outerHeight(!0)-r-1+"px",left:"1px",width:s(m)}),h>0&&e(this).append(o(1,c)),e(this).data("startTruncated")&&e(this).append(o(2,c)).addClass("ai1ec-multiday-bar")}),n.each(function(){var t=e(".ai1ec-date",this),n=parseInt(t.text(),10),r=t.closest(".ai1ec-week"),i=e(this).find("a.ai1ec-event-container:not(.ai1ec-multiday)").length,s=null,o;if(0===i)return;o=r.find("a.ai1ec-multiday[data-end-day]").filter(function(){return e(this).data("startDay")<=n&&e(this).data("endDay")>=n}),o.each(function(){var t=e(this).prop("offsetTop");if(null===s||t>s)s=t}),null!==s&&(s+=3,t.css("marginBottom",s))})},s=function(e){var t;switch(e){case 1:t=97.5;break;case 2:t=198.7;break;case 3:t=300;break;case 4:t=401;break;case 5:r||n?t=507:t=503.4;break;case 6:r||n?t=608:t=603.5;break;case 7:r||n?t=709:t=705}return t+"%"},o=function(t,n){var r=e('<div class="ai1ec-multiday-arrow'+t+'"></div>');return t===1?r.css({borderLeftColor:n}):r.css({borderTopColor:n,borderRightColor:n,borderBottomColor:n}),r};return{extend_multiday_events:i}}),timely.define("libs/frontend_utils",[],function(){var e=function(e){var t,n;t=function(e){if(/&[^;]+;/.test(e)){var t=document.createElement("div");return t.innerHTML=e,t.firstChild?t.firstChild.nodeValue:e}return e};if(typeof e=="string")return t(e);if(typeof e=="object")for(n in e)typeof e[n]=="string"&&(e[n]=t(e[n]));return e},t=function(e,t,n){var r,i,s,o,u;if("#"===e.charAt(0)||"?"===e.charAt(0))e=e.substring(1);r={},e=e.split(t);for(i=0;i<e.length;i++)o=e[i].trim(),-1!==(u=o.indexOf(n))?(s=o.substring(0,u).trim(),o=o.substring(u+1).trim()):(s=o,o=!0),r[s]=o;return r},n=function(e){var n,r,i,s,o;e=t(e,"&","="),i=Object.keys(e),n={ai1ec:{},action:"month"};for(r=0;r<i.length;r++)if("ai1ec"===i[r]){var u=t(e[i[r]],"|",":");for(s in u)if(""!==u[s]){if("action"===s||"view"===s)n.action=u[s];n.ai1ec[s]=u[s]}}else"ai1ec_"===i[r].substring(0,6)?n.ai1ec[i[r].substring(6)]=e[i[r]]:n[i[r]]=e[i[r]];"ai1ec_"!==n.action.substring(0,6)&&(n.action="ai1ec_"+n.action),o="action="+n.action+"&ai1ec=";for(s in n.ai1ec)n.ai1ec.hasOwnProperty(s)&&(o+=escape(s)+":"+escape(n.ai1ec[s])+"|");o=o.substring(0,o.length-1);for(s in n)"ai1ec"!==s&&"action"!==s&&(o+="&"+s+"="+escape(n[s]));return o};return{ai1ec_convert_entities:e,ai1ec_map_internal_query:n,ai1ec_tokenize_uri:t}}),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},alert:function(t,n){$document=e(document.body),$one_shot_popup=e("#ai1ec-show-popup-alert",$document),0===$one_shot_popup.length&&($div=e('<div class="timely"/>'),$div.html('<div id="ai1ec-show-popup-alert" class="timely ai1ec-modal ai1ec-fade"role="dialog" aria-hidden="true" style="display: none;"><div class="ai1ec-modal-dialog"><div class="ai1ec-modal-content"><div class="ai1ec-modal-header"><button type="button" class="ai1ec-close"data-dismiss="ai1ec-modal" aria-hidden="true">×</button><h4 class="ai1ec-modal-title" id="ai1ec-one-shot-popup-title"></h4></div><div class="ai1ec-modal-body"><p id="ai1ec-one-shot-popup-text"></p></div></div></div></div>').appendTo($document),$one_shot_popup=e("#ai1ec-show-popup-alert",$document));var r=e(this).closest("a");e("#ai1ec-one-shot-popup-title",$one_shot_popup).text(t),e("#ai1ec-one-shot-popup-text",$one_shot_popup).text(n),$one_shot_popup.modal("show")},make_popup_content_link:function(t,n,r){return'<div class="timely"><a href="#" class="timely ai1ec-link"data-toggle="ai1ec-modal" data-target="#popupMoreInfoInline">'+e("<div />").text(t).html()+"</a>"+'<div id="popupMoreInfoInline" class="timely ai1ec-modal ai1ec-fade"'+'role="dialog" aria-hidden="true" style="display: none;">'+'<div class="ai1ec-modal-dialog">'+'<div class="ai1ec-modal-content">'+'<div class="ai1ec-modal-header">'+'<button type="button" class="ai1ec-close"'+'data-dismiss="ai1ec-modal" aria-hidden="true">×</button>'+"<strong>"+e("<div />").text(n).html()+"</strong>"+"</div>"+'<div class="ai1ec-modal-body ai1ec-clearfix">'+'<textarea class="ai1ec-form-control code" rows="8" cols="40">'+e("<div />").text(r).html()+"</textarea>"+"</div>"+"</div>"+"</div>"+"</div>"+"</div>"},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)},isValidUrl:function(e,t){if(!0===t){var n=/^(http|https):\/\//;return n.test(e)}return!0},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"];return n.each(function(){e.each(this.attributes,function(){this.specified&&this.value&&this.name.match(/^data-/)&&(-1<e.inArray(this.name.replace(/^data\-/,""),i)||this.name.match(/_ids$/))&&r.push(this.name.replace(/^data\-/,"")+"~"+this.value)})}),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("external_libs/bootstrap/affix",["jquery_timely"],function(e){var t=function(n,r){this.options=e.extend({},t.DEFAULTS,r),this.$window=e(window).on("scroll.bs.affix.data-api",e.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",e.proxy(this.checkPositionWithEventLoop,this)),this.$element=e(n),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};t.RESET="ai1ec-affix ai1ec-affix-top ai1ec-affix-bottom",t.DEFAULTS={offset:0},t.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(t.RESET).addClass("ai1ec-affix");var e=this.$window.scrollTop(),n=this.$element.offset();return this.pinnedOffset=n.top-e},t.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)},t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var n=e(document).height(),r=this.$window.scrollTop(),i=this.$element.offset(),s=this.options.offset,o=s.top,u=s.bottom;this.affixed=="top"&&(i.top+=r),typeof s!="object"&&(u=o=s),typeof o=="function"&&(o=s.top(this.$element)),typeof u=="function"&&(u=s.bottom(this.$element));var a=this.unpin!=null&&r+this.unpin<=i.top?!1:u!=null&&i.top+this.$element.height()>=n-u?"bottom":o!=null&&r<=o?"top":!1;if(this.affixed===a)return;this.unpin&&this.$element.css("top","");var f="ai1ec-affix"+(a?"-"+a:""),l=e.Event(f+".bs.affix");this.$element.trigger(l);if(l.isDefaultPrevented())return;this.affixed=a,this.unpin=a=="bottom"?this.getPinnedOffset():null,this.$element.removeClass(t.RESET).addClass(f).trigger(e.Event(f.replace("affix","affixed"))),a=="bottom"&&this.$element.offset({top:n-u-this.$element.height()})};var n=e.fn.affix;e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("bs.affix"),s=typeof n=="object"&&n;i||r.data("bs.affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.noConflict=function(){return e.fn.affix=n,this},e(window).on("load",function(){e('[data-spy="ai1ec-affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}),timely.define("scripts/common_scripts/frontend/common_event_handlers",["jquery_timely","external_libs/bootstrap/affix"],function(e){var t=function(t){var n=e(this),r=n.next(".ai1ec-popup"),i,s,o;if(r.length===0)return;i=r.html(),s=r.attr("class");var u=n.closest("#ai1ec-calendar-view");u.length===0&&(u=e("body")),n.offset().left-u.offset().left>182?o="left":o="right",n.constrained_popover({content:i,title:"",placement:o,trigger:"manual",html:!0,template:'<div class="timely ai1ec-popover '+s+'">'+'<div class="ai1ec-arrow"></div>'+'<div class="ai1ec-popover-inner">'+'<div class="ai1ec-popover-content"><div></div></div>'+"</div>"+"</div>",container:"body"}).constrained_popover("show")},n=function(t){var n=e(t.toElement||t.relatedTarget);n.closest(".ai1ec-popup").length===0&&e(this).constrained_popover("hide")},r=function(t){var n=e(t.toElement||t.relatedTarget);n.closest(".ai1ec-tooltip").length===0&&(e(this).remove(),e("body > .ai1ec-tooltip").remove())},i=function(t){if("ontouchstart"in document.documentElement){t.preventDefault();return}var n=e(this),r={template:'<div class="timely ai1ec-tooltip"><div class="ai1ec-tooltip-arrow"></div><div class="ai1ec-tooltip-inner"></div></div>',trigger:"manual",container:"body"};if(n.is(".ai1ec-category .ai1ec-color-swatch")||n.is(".ai1ec-custom-filter .ai1ec-color-swatch"))return;n.is(".ai1ec-tooltip-auto")&&(r.placement=u(250)),n.tooltip(r),n.tooltip("show")},s=function(t){e(this).tooltip("hide")},o=function(t){var n=e(t.toElement||t.relatedTarget);n.closest(".ai1ec-tooltip-trigger").length===0&&e(this).remove(),n.closest(".ai1ec-popup").length===0&&e("body > .ai1ec-popup").remove()},u=function(t){return function(n,r){var i,s,o=e(r),u=o.attr("data-placement"),a=e.extend({},o.offset(),{width:r.offsetWidth,height:r.offsetHeight}),f=function(){return!1===i?!1:(i=a.left-t>=0,i?"left":!1)},l=function(){return!1===s?!1:(s=a.left+t<=e(window).width(),s?"right":!1)};switch(u){case"top":return"top";case"bottom":return"bottom";case"left":if(f())return"left";case"right":if(l())return"right";default:if(f())return"left";if(l())return"right";return u}}};return{handle_popover_over:t,handle_popover_out:n,handle_popover_self_out:r,handle_tooltip_over:i,handle_tooltip_out:s,handle_tooltip_self_out:o}}),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/bootstrap/popover",["jquery_timely","external_libs/bootstrap/tooltip"],function(e){var t=function(e,t){this.init("popover",e,t)};if(!e.fn.tooltip)throw new Error("Popover requires tooltip.js");t.DEFAULTS=e.extend({},e.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="ai1ec-popover"><div class="ai1ec-arrow"></div><h3 class="ai1ec-popover-title"></h3><div class="ai1ec-popover-content"></div></div>'}),t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype),t.prototype.constructor=t,t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".ai1ec-popover-title")[this.options.html?"html":"text"](t),e.find(".ai1ec-popover-content")[this.options.html?"html":"text"](n),e.removeClass("ai1ec-fade ai1ec-top ai1ec-bottom ai1ec-left ai1ec-right ai1ec-in"),e.find(".ai1ec-popover-title").html()||e.find(".ai1ec-popover-title").hide()},t.prototype.hasContent=function(){return this.getTitle()||this.getContent()},t.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||(typeof t.content=="function"?t.content.call(e[0]):t.content)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".ai1ec-arrow")},t.prototype.tip=function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip};var n=e.fn.popover;e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("bs.popover"),s=typeof n=="object"&&n;i||r.data("bs.popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.noConflict=function(){return e.fn.popover=n,this}}),timely.define("external_libs/constrained_popover",["jquery_timely","external_libs/bootstrap/popover"],function(e){var t=function(e,t){this.init("constrained_popover",e,t)};t.DEFAULTS=e.extend({},e.fn.popover.Constructor.DEFAULTS,{container:"",content:this.options}),t.prototype=e.extend({},e.fn.popover.Constructor.prototype),t.prototype.constructor=t,t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.applyPlacement=function(t,n){e.fn.popover.Constructor.prototype.applyPlacement.call(this,t,n);var r=this.tip(),i=r[0].offsetWidth,s=r[0].offsetHeight,o=this.getPosition(),u={};switch(n){case"left":newPos=this.defineBounds(o),typeof newPos.top=="undefined"?u.top=o.top+o.height/2-s/2:u.top=newPos.top-s/2,typeof newPos.left=="undefined"?u.left=o.left-i:u.left=newPos.left-i,r.offset(u);break;case"right":newPos=this.defineBounds(o),typeof newPos.top=="undefined"?u.top=o.top+o.height/2-s/2:u.top=newPos.top-s/2,typeof newPos.left=="undefined"?u.left=o.left+o.width:u.left=newPos.left+o.width,r.offset(u)}},t.prototype.defineBounds=function(t){var n,r,i,s,o,u={},a=e("body"===this.options.container?document:this.options.container);return a.length?(n=a.offset()||{top:0,left:0},r=n.top,i=n.left,s=r+a.height(),o=i+a.width(),t.top+t.height/2<r&&(u.top=r),t.top+t.height/2>s&&(u.top=s),t.left-t.width/2<i&&(u.left=i),t.left-t.width/2>o&&(u.left=o),u):!1};var n=e.fn.popover;e.fn.constrained_popover=function(n){return this.each(function(){var r=e(this),i=r.data("ai1ec.constrained_popover"),s=typeof n=="object"&&n;i||r.data("ai1ec.constrained_popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.constrained_popover.Constructor=t,e.fn.constrained_popover.noConflict=function(){return e.fn.constrained_popover=n,this}}),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("scripts/common_scripts/frontend/common_frontend",["jquery_timely","domReady","scripts/common_scripts/frontend/common_event_handlers","ai1ec_calendar","external_libs/modernizr","external_libs/bootstrap/tooltip","external_libs/constrained_popover","external_libs/bootstrap/dropdown"],function(e,t,n,r,i){var s=!1,o=function(){s=!0,e(document).on("mouseenter",".ai1ec-popup-trigger",n.handle_popover_over),e(document).on("mouseleave",".ai1ec-popup-trigger",n.handle_popover_out),e(document).on("mouseleave",".ai1ec-popup",n.handle_popover_self_out),e(document).on("mouseenter",".ai1ec-tooltip-trigger",n.handle_tooltip_over),e(document).on("mouseleave",".ai1ec-tooltip-trigger",n.handle_tooltip_out),e(document).on("mouseleave",".ai1ec-tooltip",n.handle_tooltip_self_out)},u=function(){t(function(){o()})},a=function(){return s};return{start:u,are_event_listeners_attached:a}}),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).toString(),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("libs/select2_multiselect_helper",["jquery_timely","external_libs/select2"],function(e){var t=function(t){var n=e(t.element),r=n.data("color"),i=n.data("description"),s="";return typeof r!="undefined"&&r!==""&&(s+='<span class="ai1ec-color-swatch" style="background: '+n.data("color")+'"></span> '),s+=t.text,s='<span title="'+i+'">'+s+"</span>",s},n=function(t){var n=e(t.element),r=n.data("color"),i=n.data("description"),s="";return typeof r!="undefined"&&r!==""?s+='<span class="ai1ec-color-swatch" style="background: '+n.data("color")+'"></span> ':s+='<span class="ai1ec-color-swatch-empty"></span> ',s+=t.text,s='<span title="'+i+'">'+s+"</span>",s},r=function(r){typeof r=="undefined"&&(r=e(document)),e(".ai1ec-select2-multiselect-selector",r).select2({allowClear:!0,formatResult:n,formatSelection:t,escapeMarkup:function(e){return e}})},i=function(t){e(".ai1ec-select2-multiselect-selector.select2-container",t).each(function(){e(this).data("select2").resizeSearch()})};return{init:r,refresh:i}});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)