From f411f3be16b06e614ddc48066819c27ce292b7f6 Mon Sep 17 00:00:00 2001
From: Elliot Condon
Date: Thu, 1 Oct 2020 13:48:16 +0200
Subject: [PATCH] 5.9.1
---
acf.php | 52 +-
assets/css/acf-field-group.css | 2 +-
assets/css/acf-global.css | 2 +-
assets/css/acf-input.css | 2 +-
assets/font/LICENSE.txt | 48 -
assets/font/README.txt | 75 -
assets/font/acf.eot | Bin 8212 -> 0 bytes
assets/font/acf.svg | 48 -
assets/font/acf.ttf | Bin 8064 -> 0 bytes
assets/font/acf.woff | Bin 5008 -> 0 bytes
assets/font/acf.woff2 | Bin 4160 -> 0 bytes
assets/font/config.json | 124 -
assets/js/acf-field-group.js | 13 +-
assets/js/acf-field-group.min.js | 2 +-
assets/js/acf-input.js | 5231 ++---------------
assets/js/acf-input.min.js | 8 +-
assets/js/acf.js | 4447 ++++++++++++++
assets/js/acf.min.js | 1 +
includes/acf-field-functions.php | 56 +-
includes/acf-field-group-functions.php | 82 +-
includes/acf-helper-functions.php | 57 +-
includes/acf-post-functions.php | 24 +-
includes/acf-user-functions.php | 11 +-
includes/acf-wp-functions.php | 108 +
includes/admin/admin-field-group.php | 18 +-
includes/admin/admin-field-groups.php | 1545 ++---
includes/admin/admin-upgrade.php | 12 +-
includes/admin/admin.php | 162 +-
.../admin/views/html-admin-navigation.php | 81 +
.../views/html-admin-page-upgrade-network.php | 34 +-
.../admin/views/html-admin-page-upgrade.php | 30 +-
includes/admin/views/settings-info.php | 157 -
.../ajax/class-acf-ajax-local-json-diff.php | 80 +
includes/ajax/class-acf-ajax-query-users.php | 273 +
includes/ajax/class-acf-ajax-query.php | 150 +
includes/ajax/class-acf-ajax.php | 59 +-
includes/api/api-helpers.php | 170 +-
includes/api/api-template.php | 260 +-
includes/api/api-term.php | 5 +-
includes/assets.php | 860 +--
includes/fields/class-acf-field-checkbox.php | 11 +-
.../fields/class-acf-field-color_picker.php | 44 +-
includes/fields/class-acf-field-file.php | 9 +-
.../fields/class-acf-field-google-map.php | 6 +-
includes/fields/class-acf-field-group.php | 100 +-
includes/fields/class-acf-field-image.php | 134 +-
includes/fields/class-acf-field-page_link.php | 59 +-
includes/fields/class-acf-field-range.php | 14 +-
.../fields/class-acf-field-relationship.php | 14 +-
includes/fields/class-acf-field-select.php | 42 +-
includes/fields/class-acf-field-taxonomy.php | 31 +-
includes/fields/class-acf-field-text.php | 2 +-
includes/fields/class-acf-field-textarea.php | 4 +-
.../fields/class-acf-field-time_picker.php | 4 +-
includes/fields/class-acf-field-user.php | 770 +--
includes/fields/class-acf-field-wysiwyg.php | 48 +-
includes/forms/form-nav-menu.php | 34 +-
includes/json.php | 280 -
includes/l10n.php | 2 +-
includes/legacy/legacy-locations.php | 70 +
includes/local-fields.php | 51 +-
includes/local-json.php | 319 +
includes/locations.php | 589 +-
.../abstract-acf-legacy-location.php | 62 +
includes/locations/abstract-acf-location.php | 188 +
.../class-acf-location-attachment.php | 159 +-
.../locations/class-acf-location-comment.php | 130 +-
.../class-acf-location-current-user-role.php | 153 +-
.../class-acf-location-current-user.php | 146 +-
.../class-acf-location-nav-menu-item.php | 129 +-
.../locations/class-acf-location-nav-menu.php | 171 +-
.../class-acf-location-page-parent.php | 130 +-
.../class-acf-location-page-template.php | 128 +-
.../class-acf-location-page-type.php | 222 +-
.../locations/class-acf-location-page.php | 125 +-
.../class-acf-location-post-category.php | 122 +-
.../class-acf-location-post-format.php | 169 +-
.../class-acf-location-post-status.php | 181 +-
.../class-acf-location-post-taxonomy.php | 179 +-
.../class-acf-location-post-template.php | 192 +-
.../class-acf-location-post-type.php | 171 +-
.../locations/class-acf-location-post.php | 150 +-
.../locations/class-acf-location-taxonomy.php | 139 +-
.../class-acf-location-user-form.php | 55 +-
.../class-acf-location-user-role.php | 76 +-
.../locations/class-acf-location-widget.php | 141 +-
includes/locations/class-acf-location.php | 111 -
includes/media.php | 22 +-
lang/acf-ar.mo | Bin 58483 -> 60740 bytes
lang/acf-ar.po | 2922 +++++----
lang/acf-ca.mo | Bin 0 -> 52362 bytes
lang/acf-ca.po | 3310 +++++++++++
lang/acf-de_DE.mo | Bin 53663 -> 50069 bytes
lang/acf-de_DE.po | 2235 +++----
lang/acf-de_DE_formal.mo | Bin 53848 -> 50278 bytes
lang/acf-de_DE_formal.po | 2236 +++----
lang/acf-fi.mo | Bin 51204 -> 51729 bytes
lang/acf-fi.po | 2788 +++++----
lang/acf-fr_CA.mo | Bin 54213 -> 55114 bytes
lang/acf-fr_CA.po | 1156 ++--
lang/acf-fr_FR.mo | Bin 54218 -> 47132 bytes
lang/acf-fr_FR.po | 2155 ++++---
lang/{acf-hr_HR.mo => acf-hr.mo} | Bin
lang/{acf-hr_HR.po => acf-hr.po} | 0
lang/acf-id_ID.mo | Bin 42502 -> 46907 bytes
lang/acf-id_ID.po | 4405 +++++++++-----
lang/acf-pt_PT.mo | Bin 52378 -> 49294 bytes
lang/acf-pt_PT.po | 1413 +++--
lang/acf-tr_TR.mo | Bin 51705 -> 48781 bytes
lang/acf-tr_TR.po | 2052 ++++---
lang/acf-zh_TW.mo | Bin 0 -> 48005 bytes
lang/acf-zh_TW.po | 4152 +++++++++++++
lang/acf.pot | 1390 +++--
pro/admin/views/html-options-page.php | 2 +-
pro/admin/views/html-settings-updates.php | 65 +-
pro/assets/css/acf-pro-field-group.css | 2 +-
pro/assets/css/acf-pro-input.css | 2 +-
pro/assets/js/acf-pro-blocks.min.js | 2 +-
pro/assets/js/acf-pro-field-group.js | 5 +
pro/assets/js/acf-pro-field-group.min.js | 2 +-
pro/assets/js/acf-pro-input.js | 137 +-
pro/assets/js/acf-pro-input.min.js | 2 +-
pro/blocks.php | 97 +-
.../class-acf-field-flexible-content.php | 6 +-
pro/fields/class-acf-field-repeater.php | 103 +-
pro/locations/class-acf-location-block.php | 120 +-
.../class-acf-location-options-page.php | 116 +-
readme.txt | 134 +-
128 files changed, 31014 insertions(+), 20372 deletions(-)
delete mode 100644 assets/font/LICENSE.txt
delete mode 100644 assets/font/README.txt
delete mode 100644 assets/font/acf.eot
delete mode 100644 assets/font/acf.svg
delete mode 100644 assets/font/acf.ttf
delete mode 100644 assets/font/acf.woff
delete mode 100644 assets/font/acf.woff2
delete mode 100644 assets/font/config.json
create mode 100644 assets/js/acf.js
create mode 100644 assets/js/acf.min.js
create mode 100644 includes/acf-wp-functions.php
create mode 100644 includes/admin/views/html-admin-navigation.php
delete mode 100644 includes/admin/views/settings-info.php
create mode 100644 includes/ajax/class-acf-ajax-local-json-diff.php
create mode 100644 includes/ajax/class-acf-ajax-query-users.php
create mode 100644 includes/ajax/class-acf-ajax-query.php
delete mode 100644 includes/json.php
create mode 100644 includes/legacy/legacy-locations.php
create mode 100644 includes/local-json.php
create mode 100644 includes/locations/abstract-acf-legacy-location.php
create mode 100644 includes/locations/abstract-acf-location.php
delete mode 100644 includes/locations/class-acf-location.php
create mode 100644 lang/acf-ca.mo
create mode 100644 lang/acf-ca.po
rename lang/{acf-hr_HR.mo => acf-hr.mo} (100%)
rename lang/{acf-hr_HR.po => acf-hr.po} (100%)
create mode 100644 lang/acf-zh_TW.mo
create mode 100644 lang/acf-zh_TW.po
diff --git a/acf.php b/acf.php
index 90bf395..3356241 100644
--- a/acf.php
+++ b/acf.php
@@ -3,7 +3,7 @@
Plugin Name: Advanced Custom Fields PRO
Plugin URI: https://www.advancedcustomfields.com
Description: Customize WordPress with powerful, professional and intuitive fields.
-Version: 5.8.7
+Version: 5.9.1
Author: Elliot Condon
Author URI: https://www.advancedcustomfields.com
Text Domain: acf
@@ -17,7 +17,7 @@ if( ! class_exists('ACF') ) :
class ACF {
/** @var string The plugin version number. */
- var $version = '5.8.7';
+ var $version = '5.9.1';
/** @var array The plugin settings array. */
var $settings = array();
@@ -108,7 +108,8 @@ class ACF {
// Include classes.
acf_include('includes/class-acf-data.php');
acf_include('includes/fields/class-acf-field.php');
- acf_include('includes/locations/class-acf-location.php');
+ acf_include('includes/locations/abstract-acf-legacy-location.php');
+ acf_include('includes/locations/abstract-acf-location.php');
// Include functions.
acf_include('includes/acf-helper-functions.php');
@@ -121,6 +122,7 @@ class ACF {
acf_include('includes/acf-user-functions.php');
acf_include('includes/acf-value-functions.php');
acf_include('includes/acf-input-functions.php');
+ acf_include('includes/acf-wp-functions.php');
// Include core.
acf_include('includes/fields.php');
@@ -128,10 +130,10 @@ class ACF {
acf_include('includes/assets.php');
acf_include('includes/compatibility.php');
acf_include('includes/deprecated.php');
- acf_include('includes/json.php');
acf_include('includes/l10n.php');
acf_include('includes/local-fields.php');
acf_include('includes/local-meta.php');
+ acf_include('includes/local-json.php');
acf_include('includes/loop.php');
acf_include('includes/media.php');
acf_include('includes/revisions.php');
@@ -144,6 +146,9 @@ class ACF {
acf_include('includes/ajax/class-acf-ajax-check-screen.php');
acf_include('includes/ajax/class-acf-ajax-user-setting.php');
acf_include('includes/ajax/class-acf-ajax-upgrade.php');
+ acf_include('includes/ajax/class-acf-ajax-query.php');
+ acf_include('includes/ajax/class-acf-ajax-query-users.php');
+ acf_include('includes/ajax/class-acf-ajax-local-json-diff.php');
// Include forms.
acf_include('includes/forms/form-attachment.php');
@@ -167,6 +172,9 @@ class ACF {
acf_include('includes/admin/admin-upgrade.php');
}
+ // Include legacy.
+ acf_include('includes/legacy/legacy-locations.php');
+
// Include PRO.
acf_include('pro/acf-pro.php');
@@ -413,12 +421,12 @@ class ACF {
// Register the Disabled post status.
register_post_status('acf-disabled', array(
- 'label' => __( 'Inactive', 'acf' ),
+ 'label' => _x( 'Disabled', 'post status', 'acf' ),
'public' => true,
'exclude_from_search' => false,
'show_in_admin_all_list' => true,
'show_in_admin_status_list' => true,
- 'label_count' => _n_noop( 'Inactive (%s) ', 'Inactive (%s) ', 'acf' ),
+ 'label_count' => _n_noop( 'Disabled (%s) ', 'Disabled (%s) ', 'acf' ),
));
}
@@ -584,6 +592,38 @@ class ACF {
$this->instances[ $name ] = $instance;
return $instance;
}
+
+ /**
+ * Magic __isset method for backwards compatibility.
+ *
+ * @date 24/4/20
+ * @since 5.9.0
+ *
+ * @param string $key Key name.
+ * @return bool
+ */
+ public function __isset( $key ) {
+ return in_array( $key, array( 'locations', 'json' ) );
+ }
+
+ /**
+ * Magic __get method for backwards compatibility.
+ *
+ * @date 24/4/20
+ * @since 5.9.0
+ *
+ * @param string $key Key name.
+ * @return mixed
+ */
+ public function __get( $key ) {
+ switch ( $key ) {
+ case 'locations':
+ return acf_get_instance( 'ACF_Legacy_Locations' );
+ case 'json':
+ return acf_get_instance( 'ACF_Local_JSON' );
+ }
+ return null;
+ }
}
/*
diff --git a/assets/css/acf-field-group.css b/assets/css/acf-field-group.css
index 78b6870..903b2ee 100644
--- a/assets/css/acf-field-group.css
+++ b/assets/css/acf-field-group.css
@@ -1 +1 @@
-#acf-field-group-fields>.inside,#acf-field-group-locations>.inside,#acf-field-group-options>.inside{padding:0;margin:0}#minor-publishing-actions,#misc-publishing-actions #visibility{display:none}#minor-publishing{border-bottom:0 none}#misc-pub-section{border-bottom:0 none}#misc-publishing-actions .misc-pub-section{border-bottom-color:#F5F5F5}#acf-field-group-fields{border:0 none;box-shadow:none}#acf-field-group-fields>.handlediv,#acf-field-group-fields>.hndle{display:none}#acf-field-group-fields a{text-decoration:none}#acf-field-group-fields a:active,#acf-field-group-fields a:focus{outline:none;box-shadow:none}#acf-field-group-fields .li-field-order{width:20%}#acf-field-group-fields .li-field-label{width:30%}#acf-field-group-fields .li-field-name{width:25%}#acf-field-group-fields .li-field-type{width:25%}#acf-field-group-fields .li-field-key{display:none}#acf-field-group-fields.show-field-keys .li-field-label,#acf-field-group-fields.show-field-keys .li-field-name,#acf-field-group-fields.show-field-keys .li-field-type,#acf-field-group-fields.show-field-keys .li-field-key{width:20%}#acf-field-group-fields.show-field-keys .li-field-key{display:block}#acf-field-group-fields .acf-field-list-wrap{border:#ccd0d4 solid 1px}#acf-field-group-fields .acf-field-list{background:#f5f5f5;margin-top:-1px}#acf-field-group-fields .acf-field-list .no-fields-message{padding:15px 15px;background:#fff;display:none}#acf-field-group-fields .acf-field-list.-empty .no-fields-message{display:block}.acf-admin-3-8 #acf-field-group-fields .acf-field-list-wrap{border-color:#dfdfdf}.acf-field-object{border-top:#eee solid 1px;background:#fff}.acf-field-object.ui-sortable-helper{border-top-color:#fff;box-shadow:0 0 0 1px #DFDFDF,0 1px 4px rgba(0,0,0,0.1)}.acf-field-object.ui-sortable-placeholder{box-shadow:0 -1px 0 0 #DFDFDF;visibility:visible !important;background:#F9F9F9;border-top-color:transparent;min-height:54px}.acf-field-object.ui-sortable-placeholder:after,.acf-field-object.ui-sortable-placeholder:before{visibility:hidden}.acf-field-object>.meta{display:none}.acf-field-object>.handle a{-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.acf-field-object>.handle li{padding-top:10px;padding-bottom:10px;word-wrap:break-word}.acf-field-object>.handle .acf-icon{margin:1px 0 0;cursor:move;background:transparent;float:left;height:28px;line-height:28px;width:28px;font-size:13px;color:#444;position:relative;z-index:1}.acf-field-object>.handle strong{display:block;padding-bottom:6px;font-size:14px;line-height:14px;min-height:14px}.acf-field-object>.handle .row-options{visibility:hidden}.acf-field-object>.handle .row-options a{margin-right:4px}.acf-field-object>.handle .row-options a.delete-field{color:#a00}.acf-field-object>.handle .row-options a.delete-field:hover{color:#f00}.acf-field-object.open+.acf-field-object{border-top-color:#E1E1E1}.acf-field-object.open>.handle{background:#2a9bd9;border:#2696d3 solid 1px;text-shadow:#268FBB 0 1px 0;color:#fff;position:relative;margin:-1px -1px 0 -1px}.acf-field-object.open>.handle a{color:#fff !important}.acf-field-object.open>.handle a:hover{text-decoration:underline !important}.acf-field-object.open>.handle .acf-icon{border-color:#fff;color:#fff}.acf-field-object.open>.handle .acf-required{color:#fff}.acf-field-object:hover>.handle .row-options,.acf-field-object.-hover>.handle .row-options{visibility:visible}.acf-field-object>.settings{display:none;width:100%}.acf-field-object>.settings>.acf-table{border:none}.acf-field-object .rule-groups{margin-top:20px}.rule-groups h4{margin:3px 0}.rule-groups .rule-group{margin:0 0 5px}.rule-groups .rule-group h4{margin:0 0 3px}.rule-groups .rule-group td.param{width:35%}.rule-groups .rule-group td.operator{width:20%}.rule-groups .rule-group td.add{width:40px}.rule-groups .rule-group td.remove{width:28px;vertical-align:middle}.rule-groups .rule-group td.remove a{visibility:hidden}.rule-groups .rule-group tr:hover td.remove a{visibility:visible}.rule-groups .rule-group:first-child tr:first-child td.remove a{visibility:hidden !important}.rule-groups .rule-group select:empty{background:#f8f8f8}#acf-field-group-options tr[data-name="hide_on_screen"] li{float:left;width:33%}@media (max-width: 1100px){#acf-field-group-options tr[data-name="hide_on_screen"] li{width:50%}}table.conditional-logic-rules{background:transparent;border:0 none;border-radius:0}table.conditional-logic-rules tbody td{background:transparent;border:0 none !important;padding:5px 2px !important}.acf-field-object-tab .acf-field-setting-name,.acf-field-object-accordion .acf-field-setting-name,.acf-field-object-tab .acf-field-setting-instructions,.acf-field-object-accordion .acf-field-setting-instructions,.acf-field-object-tab .acf-field-setting-required,.acf-field-object-accordion .acf-field-setting-required,.acf-field-object-tab .acf-field-setting-warning,.acf-field-object-accordion .acf-field-setting-warning,.acf-field-object-tab .acf-field-setting-wrapper,.acf-field-object-accordion .acf-field-setting-wrapper{display:none}.acf-field-object-tab .li-field-name,.acf-field-object-accordion .li-field-name{visibility:hidden}.acf-field-object+.acf-field-object-tab:before,.acf-field-object+.acf-field-object-accordion:before{display:block;content:"";height:5px;width:100%;background:#f5f5f5;border-top:#e1e1e1 solid 1px;border-bottom:#e1e1e1 solid 1px;margin-top:-1px}.acf-admin-3-8 .acf-field-object+.acf-field-object-tab:before,.acf-admin-3-8 .acf-field-object+.acf-field-object-accordion:before{border-color:#E5E5E5}.acf-field-object-tab p:first-child,.acf-field-object-accordion p:first-child{margin:0.5em 0}.acf-field-object-accordion .acf-field-setting-instructions{display:table-row}.acf-field-object-message tr[data-name="name"],.acf-field-object-message tr[data-name="instructions"],.acf-field-object-message tr[data-name="required"]{display:none !important}.acf-field-object-message .li-field-name{visibility:hidden}.acf-field-object-message textarea{height:175px !important}.acf-field-object-separator tr[data-name="name"],.acf-field-object-separator tr[data-name="instructions"],.acf-field-object-separator tr[data-name="required"]{display:none !important}.acf-field-object-date-picker .acf-radio-list li,.acf-field-object-time-picker .acf-radio-list li,.acf-field-object-date-time-picker .acf-radio-list li{line-height:25px}.acf-field-object-date-picker .acf-radio-list span,.acf-field-object-time-picker .acf-radio-list span,.acf-field-object-date-time-picker .acf-radio-list span{display:inline-block;min-width:10em}.acf-field-object-date-picker .acf-radio-list input[type="text"],.acf-field-object-time-picker .acf-radio-list input[type="text"],.acf-field-object-date-time-picker .acf-radio-list input[type="text"]{width:100px}.acf-field-object-date-time-picker .acf-radio-list span{min-width:15em}.acf-field-object-date-time-picker .acf-radio-list input[type="text"]{width:200px}#slugdiv .inside{padding:12px;margin:0}#slugdiv input[type="text"]{width:100%;height:28px;font-size:14px}html[dir="rtl"] .acf-field-object.open>.handle{margin:-1px -1px 0}html[dir="rtl"] .acf-field-object.open>.handle .acf-icon{float:right}html[dir="rtl"] .acf-field-object.open>.handle .li-field-order{padding-left:0 !important;padding-right:15px !important}@media only screen and (max-width: 850px){tr.acf-field,td.acf-label,td.acf-input{display:block !important;width:auto !important;border:0 none !important}tr.acf-field{border-top:#ededed solid 1px !important;margin-bottom:0 !important}td.acf-label{background:transparent !important;padding-bottom:0 !important}}
+#acf-field-group-fields>.inside,#acf-field-group-locations>.inside,#acf-field-group-options>.inside{padding:0;margin:0}.postbox .handle-order-higher,.postbox .handle-order-lower{display:none}#minor-publishing-actions,#misc-publishing-actions #visibility,#misc-publishing-actions .edit-timestamp{display:none}#minor-publishing{border-bottom:0 none}#misc-pub-section{border-bottom:0 none}#misc-publishing-actions .misc-pub-section{border-bottom-color:#F5F5F5}#acf-field-group-fields{border:0 none;box-shadow:none}#acf-field-group-fields>.postbox-header,#acf-field-group-fields>.handlediv,#acf-field-group-fields>.hndle{display:none}#acf-field-group-fields a{text-decoration:none}#acf-field-group-fields a:active,#acf-field-group-fields a:focus{outline:none;box-shadow:none}#acf-field-group-fields .li-field-order{width:20%}#acf-field-group-fields .li-field-label{width:30%}#acf-field-group-fields .li-field-name{width:25%}#acf-field-group-fields .li-field-type{width:25%}#acf-field-group-fields .li-field-key{display:none}#acf-field-group-fields.show-field-keys .li-field-label,#acf-field-group-fields.show-field-keys .li-field-name,#acf-field-group-fields.show-field-keys .li-field-type,#acf-field-group-fields.show-field-keys .li-field-key{width:20%}#acf-field-group-fields.show-field-keys .li-field-key{display:block}#acf-field-group-fields .acf-field-list-wrap{border:#ccd0d4 solid 1px}#acf-field-group-fields .acf-field-list{background:#f5f5f5;margin-top:-1px}#acf-field-group-fields .acf-field-list .no-fields-message{padding:15px 15px;background:#fff;display:none}#acf-field-group-fields .acf-field-list.-empty .no-fields-message{display:block}.acf-admin-3-8 #acf-field-group-fields .acf-field-list-wrap{border-color:#dfdfdf}.acf-field-object{border-top:#eee solid 1px;background:#fff}.acf-field-object.ui-sortable-helper{border-top-color:#fff;box-shadow:0 0 0 1px #DFDFDF,0 1px 4px rgba(0,0,0,0.1)}.acf-field-object.ui-sortable-placeholder{box-shadow:0 -1px 0 0 #DFDFDF;visibility:visible !important;background:#F9F9F9;border-top-color:transparent;min-height:54px}.acf-field-object.ui-sortable-placeholder:after,.acf-field-object.ui-sortable-placeholder:before{visibility:hidden}.acf-field-object>.meta{display:none}.acf-field-object>.handle a{-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.acf-field-object>.handle li{padding-top:10px;padding-bottom:10px;word-wrap:break-word}.acf-field-object>.handle .acf-icon{margin:1px 0 0;cursor:move;background:transparent;float:left;height:28px;line-height:26px;width:28px;font-size:13px;color:#444;position:relative;z-index:1}.acf-field-object>.handle strong{display:block;padding-bottom:6px;font-size:14px;line-height:14px;min-height:14px}.acf-field-object>.handle .row-options{visibility:hidden}.acf-field-object>.handle .row-options a{margin-right:4px}.acf-field-object>.handle .row-options a.delete-field{color:#a00}.acf-field-object>.handle .row-options a.delete-field:hover{color:#f00}.acf-field-object.open+.acf-field-object{border-top-color:#E1E1E1}.acf-field-object.open>.handle{background:#2a9bd9;border:#2696d3 solid 1px;text-shadow:#268FBB 0 1px 0;color:#fff;position:relative;margin:-1px -1px 0 -1px}.acf-field-object.open>.handle a{color:#fff !important}.acf-field-object.open>.handle a:hover{text-decoration:underline !important}.acf-field-object.open>.handle .acf-icon{border-color:#fff;color:#fff}.acf-field-object.open>.handle .acf-required{color:#fff}.acf-field-object:hover>.handle .row-options,.acf-field-object.-hover>.handle .row-options{visibility:visible}.acf-field-object>.settings{display:none;width:100%}.acf-field-object>.settings>.acf-table{border:none}.acf-field-object .rule-groups{margin-top:20px}.rule-groups h4{margin:3px 0}.rule-groups .rule-group{margin:0 0 5px}.rule-groups .rule-group h4{margin:0 0 3px}.rule-groups .rule-group td.param{width:35%}.rule-groups .rule-group td.operator{width:20%}.rule-groups .rule-group td.add{width:40px}.rule-groups .rule-group td.remove{width:28px;vertical-align:middle}.rule-groups .rule-group td.remove a{visibility:hidden}.rule-groups .rule-group tr:hover td.remove a{visibility:visible}.rule-groups .rule-group:first-child tr:first-child td.remove a{visibility:hidden !important}.rule-groups .rule-group select:empty{background:#f8f8f8}#acf-field-group-options tr[data-name="hide_on_screen"] li{float:left;width:33%}@media (max-width: 1100px){#acf-field-group-options tr[data-name="hide_on_screen"] li{width:50%}}table.conditional-logic-rules{background:transparent;border:0 none;border-radius:0}table.conditional-logic-rules tbody td{background:transparent;border:0 none !important;padding:5px 2px !important}.acf-field-object-tab .acf-field-setting-name,.acf-field-object-accordion .acf-field-setting-name,.acf-field-object-tab .acf-field-setting-instructions,.acf-field-object-accordion .acf-field-setting-instructions,.acf-field-object-tab .acf-field-setting-required,.acf-field-object-accordion .acf-field-setting-required,.acf-field-object-tab .acf-field-setting-warning,.acf-field-object-accordion .acf-field-setting-warning,.acf-field-object-tab .acf-field-setting-wrapper,.acf-field-object-accordion .acf-field-setting-wrapper{display:none}.acf-field-object-tab .li-field-name,.acf-field-object-accordion .li-field-name{visibility:hidden}.acf-field-object+.acf-field-object-tab:before,.acf-field-object+.acf-field-object-accordion:before{display:block;content:"";height:5px;width:100%;background:#f5f5f5;border-top:#e1e1e1 solid 1px;border-bottom:#e1e1e1 solid 1px;margin-top:-1px}.acf-admin-3-8 .acf-field-object+.acf-field-object-tab:before,.acf-admin-3-8 .acf-field-object+.acf-field-object-accordion:before{border-color:#E5E5E5}.acf-field-object-tab p:first-child,.acf-field-object-accordion p:first-child{margin:0.5em 0}.acf-field-object-accordion .acf-field-setting-instructions{display:table-row}.acf-field-object-message tr[data-name="name"],.acf-field-object-message tr[data-name="instructions"],.acf-field-object-message tr[data-name="required"]{display:none !important}.acf-field-object-message .li-field-name{visibility:hidden}.acf-field-object-message textarea{height:175px !important}.acf-field-object-separator tr[data-name="name"],.acf-field-object-separator tr[data-name="instructions"],.acf-field-object-separator tr[data-name="required"]{display:none !important}.acf-field-object-date-picker .acf-radio-list li,.acf-field-object-time-picker .acf-radio-list li,.acf-field-object-date-time-picker .acf-radio-list li{line-height:25px}.acf-field-object-date-picker .acf-radio-list span,.acf-field-object-time-picker .acf-radio-list span,.acf-field-object-date-time-picker .acf-radio-list span{display:inline-block;min-width:10em}.acf-field-object-date-picker .acf-radio-list input[type="text"],.acf-field-object-time-picker .acf-radio-list input[type="text"],.acf-field-object-date-time-picker .acf-radio-list input[type="text"]{width:100px}.acf-field-object-date-time-picker .acf-radio-list span{min-width:15em}.acf-field-object-date-time-picker .acf-radio-list input[type="text"]{width:200px}#slugdiv .inside{padding:12px;margin:0}#slugdiv input[type="text"]{width:100%;height:28px;font-size:14px}html[dir="rtl"] .acf-field-object.open>.handle{margin:-1px -1px 0}html[dir="rtl"] .acf-field-object.open>.handle .acf-icon{float:right}html[dir="rtl"] .acf-field-object.open>.handle .li-field-order{padding-left:0 !important;padding-right:15px !important}@media only screen and (max-width: 850px){tr.acf-field,td.acf-label,td.acf-input{display:block !important;width:auto !important;border:0 none !important}tr.acf-field{border-top:#ededed solid 1px !important;margin-bottom:0 !important}td.acf-label{background:transparent !important;padding-bottom:0 !important}}
diff --git a/assets/css/acf-global.css b/assets/css/acf-global.css
index 072cbf7..ada453b 100644
--- a/assets/css/acf-global.css
+++ b/assets/css/acf-global.css
@@ -1 +1 @@
-.acf-hl{padding:0;margin:0;list-style:none;display:block;position:relative}.acf-hl>li{float:left;display:block;margin:0;padding:0}.acf-hl>li.acf-fr{float:right}.acf-hl:before,.acf-hl:after,.acf-bl:before,.acf-bl:after,.acf-cf:before,.acf-cf:after{content:"";display:block;line-height:0}.acf-hl:after,.acf-bl:after,.acf-cf:after{clear:both}.acf-bl{padding:0;margin:0;list-style:none;display:block;position:relative}.acf-bl>li{display:block;margin:0;padding:0;float:none}.acf-hidden{display:none !important}.acf-empty{display:table-cell !important}.acf-empty *{display:none !important}.acf-fl{float:left}.acf-fr{float:right}.acf-fn{float:none}.acf-al{text-align:left}.acf-ar{text-align:right}.acf-ac{text-align:center}.acf-loading,.acf-spinner{display:inline-block;height:20px;width:20px;vertical-align:text-top;background:transparent url(../images/spinner.gif) no-repeat 50% 50%}.acf-spinner{display:none}.acf-spinner.is-active{display:inline-block}.spinner.is-active{display:inline-block}.acf-required{color:#f00}.acf-soh .acf-soh-target{-webkit-transition:opacity 0.25s 0s ease-in-out, visibility 0s linear 0.25s;-moz-transition:opacity 0.25s 0s ease-in-out, visibility 0s linear 0.25s;-o-transition:opacity 0.25s 0s ease-in-out, visibility 0s linear 0.25s;transition:opacity 0.25s 0s ease-in-out, visibility 0s linear 0.25s;visibility:hidden;opacity:0}.acf-soh:hover .acf-soh-target{-webkit-transition-delay:0s;-moz-transition-delay:0s;-o-transition-delay:0s;transition-delay:0s;visibility:visible;opacity:1}.show-if-value{display:none}.hide-if-value{display:block}.has-value .show-if-value{display:block}.has-value .hide-if-value{display:none}.select2-search-choice-close{-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.acf-tooltip{background:#2F353E;border-radius:5px;color:#fff;padding:5px 10px;position:absolute;font-size:12px;line-height:1.4em;z-index:900000}.acf-tooltip:before{border:solid;border-color:transparent;border-width:6px;content:"";position:absolute}.acf-tooltip.top{margin-top:-8px}.acf-tooltip.top:before{top:100%;left:50%;margin-left:-6px;border-top-color:#2F353E;border-bottom-width:0}.acf-tooltip.right{margin-left:8px}.acf-tooltip.right:before{top:50%;margin-top:-6px;right:100%;border-right-color:#2F353E;border-left-width:0}.acf-tooltip.bottom{margin-top:8px}.acf-tooltip.bottom:before{bottom:100%;left:50%;margin-left:-6px;border-bottom-color:#2F353E;border-top-width:0}.acf-tooltip.left{margin-left:-8px}.acf-tooltip.left:before{top:50%;margin-top:-6px;left:100%;border-left-color:#2F353E;border-right-width:0}.acf-tooltip .acf-overlay{z-index:-1}.acf-tooltip.-confirm{z-index:900001}.acf-tooltip.-confirm a{text-decoration:none;color:#9ea3a8}.acf-tooltip.-confirm a:hover{text-decoration:underline}.acf-tooltip.-confirm a[data-event="confirm"]{color:#F55E4F}.acf-overlay{position:fixed;top:0;bottom:0;left:0;right:0;cursor:default}.acf-tooltip-target{position:relative;z-index:900002}.acf-loading-overlay{position:absolute;top:0;bottom:0;left:0;right:0;cursor:default;z-index:99;background:rgba(249,249,249,0.5)}.acf-loading-overlay i{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}@font-face{font-family:'acf';src:url("../font/acf.eot?57601716");src:url("../font/acf.eot?57601716#iefix") format("embedded-opentype"),url("../font/acf.woff2?57601716") format("woff2"),url("../font/acf.woff?57601716") format("woff"),url("../font/acf.ttf?57601716") format("truetype"),url("../font/acf.svg?57601716#acf") format("svg");font-weight:normal;font-style:normal}.acf-icon:before{font-family:"acf";font-style:normal;font-weight:normal;speak:none;display:inline-block;text-decoration:inherit;width:1em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:relative}.acf-icon.-plus:before{content:'\e800'}.acf-icon.-minus:before{content:'\e801'}.acf-icon.-cancel:before{content:'\e802'}.acf-icon.-pencil:before{content:'\e803';top:-1px}.acf-icon.-location:before{content:'\e804'}.acf-icon.-down:before{content:'\e805';top:1px}.acf-icon.-left:before{content:'\e806';left:-1px}.acf-icon.-right:before{content:'\e807';left:1px}.acf-icon.-up:before{content:'\e808';top:-1px}.acf-icon.-sync:before{content:'\e809'}.acf-icon.-globe:before{content:'\e80a'}.acf-icon.-picture:before{content:'\e80b'}.acf-icon.-check:before{content:'\e80c'}.acf-icon.-dot-3:before{content:'\e80d'}.acf-icon.-arrow-combo:before{content:'\e80e'}.acf-icon.-arrow-up:before{content:'\e810';top:-1px}.acf-icon.-arrow-down:before{content:'\e80f';top:1px}.acf-icon.-search:before{content:'\e811'}.acf-icon.-link-ext:before{content:'\f08e'}.acf-icon.-collapse:before{content:'\e810';top:-1px}.-collapsed .acf-icon.-collapse:before{content:'\e80f';top:1px}.acf-icon{display:inline-block;height:26px;width:26px;border:transparent solid 1px;border-radius:100%;font-size:16px;line-height:26px;text-align:center;text-decoration:none;vertical-align:top;box-sizing:content-box}span.acf-icon{color:#999;border-color:#BBB;background-color:#fff}a.acf-icon{color:#555d66;border-color:#b5bcc2;background-color:#fff;position:relative;overflow:hidden;transition:none}a.acf-icon.-clear{color:#444;background:transparent;border:none}a.acf-icon.light{border:none;padding:1px;background:#F5F5F5;color:#23282d}a.acf-icon:hover{border-color:transparent;background:#2a9bd9;color:#fff}a.acf-icon:active{color:#fff;background-color:#238cc6}a.acf-icon:active,a.acf-icon:focus{outline:none;box-shadow:none}a.acf-icon.-minus:hover,a.acf-icon.-cancel:hover{background-color:#F55E4F}a.acf-icon.-minus:active,a.acf-icon.-cancel:active{background-color:#f44837}.acf-icon.-pencil{font-size:15px}.acf-icon.-location{font-size:18px}.acf-icon.small,.acf-icon.-small{width:18px;height:18px;line-height:18px;font-size:14px}.acf-icon.dark{border-color:transparent;background:#23282D;color:#eee}a.acf-icon.dark:hover{border-color:transparent;background:#191E23;color:#00b9eb}a.acf-icon.-minus.dark:hover,a.acf-icon.-cancel.dark:hover{color:#D54E21}.acf-icon.grey{border-color:transparent;background:#b4b9be;color:#fff}a.acf-icon.grey:hover{border-color:transparent;background:#00A0D2;color:#fff}a.acf-icon.-minus.grey:hover,a.acf-icon.-cancel.grey:hover{background:#32373C}.acf-icon.red{border-color:transparent;background-color:#F55E4F;color:#fff}.acf-icon.yellow{border-color:transparent;background-color:#FDBC40;color:#fff}.acf-icon.logo{width:150px;height:150px;background:#5EE8BF;border:0 none;position:absolute;right:0;top:0}.acf-box{background:#FFFFFF;border:1px solid #ccd0d4;position:relative;box-shadow:0 1px 1px rgba(0,0,0,0.04)}.acf-box .title{border-bottom:1px solid #ccd0d4;margin:0;padding:15px}.acf-box .title h3{font-size:14px;line-height:1em;margin:0;padding:0}.acf-box .inner{padding:15px}.acf-box h2{color:#333333;font-size:26px;line-height:1.25em;margin:0.25em 0 0.75em;padding:0}.acf-box h3{margin:1.5em 0 0}.acf-box p{margin-top:0.5em}.acf-box a{text-decoration:none}.acf-box i.dashicons-external{margin-top:-1px}.acf-box .footer{border-top:1px solid #ccd0d4;padding:12px;font-size:13px;line-height:1.5}.acf-box .footer p{margin:0}.acf-admin-3-8 .acf-box{border-color:#E5E5E5}.acf-admin-3-8 .acf-box .title,.acf-admin-3-8 .acf-box .footer{border-color:#E5E5E5}.acf-notice{position:relative;display:block;color:#fff;margin:5px 0 15px;padding:3px 12px;background:#2a9bd9;border-left:#2183b9 solid 4px}.acf-notice p{font-size:13px;line-height:1.5;margin:0.5em 0;text-shadow:none;color:inherit}.acf-notice a.acf-notice-dismiss{position:absolute;border-color:transparent;top:9px;right:12px;color:#fff;background:rgba(0,0,0,0.1)}.acf-notice a.acf-notice-dismiss:hover{background:rgba(0,0,0,0.2)}.acf-notice.-dismiss{padding-right:40px}.acf-notice.-error{background:#F55E4F;border-color:#f33b28}.acf-notice.-success{background:#46b450;border-color:#3b9743}.acf-notice.-warning{background:#fd8d3b;border-color:#fd7613}.acf-table{border:#ccd0d4 solid 1px;background:#fff;border-spacing:0;border-radius:0;table-layout:auto;padding:0;margin:0;width:100%;clear:both;box-sizing:content-box}.acf-table>tbody>tr>th,.acf-table>tbody>tr>td,.acf-table>thead>tr>th,.acf-table>thead>tr>td{padding:8px;vertical-align:top;background:#fff;text-align:left;border-style:solid;font-weight:normal}.acf-table>tbody>tr>th,.acf-table>thead>tr>th{position:relative;color:#333333}.acf-table>thead>tr>th{border-color:#d5d9dd;border-width:0 0 1px 1px}.acf-table>thead>tr>th:first-child{border-left-width:0}.acf-table>tbody>tr{z-index:1}.acf-table>tbody>tr>td{border-color:#eee;border-width:1px 0 0 1px}.acf-table>tbody>tr>td:first-child{border-left-width:0}.acf-table>tbody>tr:first-child>td{border-top-width:0}.acf-table.-clear{border:0 none}.acf-table.-clear>tbody>tr>td,.acf-table.-clear>tbody>tr>th,.acf-table.-clear>thead>tr>td,.acf-table.-clear>thead>tr>th{border:0 none;padding:4px}.acf-remove-element{-webkit-transition:all 0.25s ease-out;-moz-transition:all 0.25s ease-out;-o-transition:all 0.25s ease-out;transition:all 0.25s ease-out;transform:translate(50px, 0);opacity:0}.acf-fade-up{-webkit-transition:all 0.25s ease-out;-moz-transition:all 0.25s ease-out;-o-transition:all 0.25s ease-out;transition:all 0.25s ease-out;transform:translate(0, -10px);opacity:0}#acf-field-group-wrap .tablenav,#acf-field-group-wrap p.search-box{display:none}#acf-field-group-wrap .wp-list-table .column-acf-fg-description,#acf-field-group-wrap .wp-list-table .column-acf-fg-description:before{display:none !important}#acf-field-group-wrap .wp-list-table .column-acf-fg-count{width:10%}#acf-field-group-wrap .wp-list-table .column-acf-fg-status{width:10%}#acf-field-group-wrap .tablenav.bottom{display:block}#acf-field-group-wrap .acf-description{font-weight:normal;font-size:13px;color:#999;margin-left:7px;font-style:italic}#acf-field-group-wrap .subsubsub{margin-bottom:3px}#acf-field-group-wrap .subsubsub ul{margin:0}#acf-field-group-wrap .subsubsub+.subsubsub{margin-top:0}#acf-field-group-wrap .subsubsub a:focus{box-shadow:none}.acf-columns-2{margin-right:300px;clear:both}.acf-columns-2:after{display:block;clear:both;content:""}html[dir="rtl"] .acf-columns-2{margin-right:0;margin-left:300px}.acf-columns-2 .acf-column-1{float:left;width:100%}html[dir="rtl"] .acf-columns-2 .acf-column-1{float:right}.acf-columns-2 .acf-column-2{float:right;margin-right:-300px;width:280px}html[dir="rtl"] .acf-columns-2 .acf-column-2{float:left;margin-right:0;margin-left:-300px}#acf-field-group-wrap .search-box:after{display:block;content:"";height:5px}.acf-clear{clear:both}@media screen and (max-width: 782px){#acf-field-group-wrap #the-list .acf-icon:after{content:attr(title);position:absolute;margin-left:5px;font-size:13px;line-height:18px;font-style:normal;color:#444}}.acf-thead,.acf-tbody,.acf-tfoot{width:100%;padding:0;margin:0}.acf-thead>li,.acf-tbody>li,.acf-tfoot>li{box-sizing:border-box;padding:8px 12px;font-size:12px;line-height:14px}.acf-thead{border-bottom:#ccd0d4 solid 1px;color:#23282d}.acf-thead>li{font-size:14px;line-height:1.4;font-weight:bold}.acf-admin-3-8 .acf-thead{border-color:#dfdfdf}.acf-tfoot{background:#f5f5f5;border-top:#d5d9dd solid 1px}.acf-settings-wrap #poststuff{padding-top:15px}.acf-settings-wrap .acf-box{margin:20px 0}.acf-settings-wrap table{margin:0}.acf-settings-wrap table .button{vertical-align:middle}#acf-popup{position:fixed;z-index:900000;top:0;left:0;right:0;bottom:0;text-align:center}#acf-popup .bg{position:absolute;top:0;left:0;right:0;bottom:0;z-index:0;background:rgba(0,0,0,0.25)}#acf-popup:before{content:'';display:inline-block;height:100%;vertical-align:middle}#acf-popup .acf-popup-box{display:inline-block;vertical-align:middle;z-index:1;min-width:300px;min-height:160px;border-color:#aaaaaa;box-shadow:0 5px 30px -5px rgba(0,0,0,0.25);text-align:left}html[dir="rtl"] #acf-popup .acf-popup-box{text-align:right}#acf-popup .acf-popup-box .title{min-height:15px;line-height:15px}#acf-popup .acf-popup-box .title .acf-icon{position:absolute;top:10px;right:10px}html[dir="rtl"] #acf-popup .acf-popup-box .title .acf-icon{right:auto;left:10px}#acf-popup .acf-popup-box .inner{min-height:50px;padding:0;margin:15px}#acf-popup .acf-popup-box .loading{position:absolute;top:45px;left:0;right:0;bottom:0;z-index:2;background:rgba(0,0,0,0.1);display:none}#acf-popup .acf-popup-box .loading i{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.acf-submit{margin-bottom:0;line-height:28px}.acf-submit span{float:right;color:#999}.acf-submit span.-error{color:#dd4232}.acf-submit .button{margin-right:5px}#acf-upgrade-notice{position:relative;background:#fff;border-left:4px solid #00a0d2;padding:20px}#acf-upgrade-notice:after{display:block;clear:both;content:""}#acf-upgrade-notice .col-content{float:left;width:55%;padding-left:90px}#acf-upgrade-notice .col-actions{float:right;text-align:center;padding:10px}#acf-upgrade-notice img{float:left;width:70px;height:70px;margin:0 0 0 -90px}#acf-upgrade-notice h2{font-size:16px;margin:2px 0 6.5px}#acf-upgrade-notice p{padding:0;margin:0}#acf-upgrade-notice .button:before{margin-top:11px}@media screen and (max-width: 640px){#acf-upgrade-notice .col-content,#acf-upgrade-notice .col-actions{float:none;padding-left:90px;width:auto;text-align:left}}.acf-wrap h1{margin-top:0;padding-top:20px}.acf-wrap .about-text{margin-top:0.5em;min-height:50px}.acf-wrap .about-headline-callout{font-size:2.4em;font-weight:300;line-height:1.3;margin:1.1em 0 0.2em;text-align:center}.acf-wrap .feature-section{padding:40px 0}.acf-wrap .feature-section h2{margin-top:20px}.acf-wrap .changelog{list-style:disc;padding-left:15px}.acf-wrap .changelog li{margin:0 0 0.75em}.acf-wrap .acf-three-col{display:flex;flex-wrap:wrap;justify-content:space-between}.acf-wrap .acf-three-col>div{flex:1;align-self:flex-start;min-width:31%;max-width:31%}@media screen and (max-width: 880px){.acf-wrap .acf-three-col>div{min-width:48%}}@media screen and (max-width: 640px){.acf-wrap .acf-three-col>div{min-width:100%}}.acf-wrap .acf-three-col h3 .badge{display:inline-block;vertical-align:top;border-radius:5px;background:#fc9700;color:#fff;font-weight:normal;font-size:12px;padding:2px 5px}.acf-wrap .acf-three-col img+h3{margin-top:0.5em}.acf-hl[data-cols]{margin-left:-10px;margin-right:-10px}.acf-hl[data-cols]>li{padding:0 10px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.acf-hl[data-cols="2"]>li{width:50%}.acf-hl[data-cols="3"]>li{width:33.333%}.acf-hl[data-cols="4"]>li{width:25%}@media screen and (max-width: 640px){.acf-hl[data-cols]{margin-left:0;margin-right:0;margin-top:-10px}.acf-hl[data-cols]>li{width:100% !important;padding:10px 0 0}}.acf-actions{text-align:right;z-index:1}.acf-actions a{margin-left:4px}.acf-actions.-hover{position:absolute;display:none;top:0;right:0;padding:5px}html[dir="rtl"] .acf-actions a{margin-left:0;margin-right:4px}html[dir="rtl"] .acf-actions.-hover{right:auto;left:0}ul.acf-actions li{float:right;margin-left:4px}.acf-plugin-upgrade-notice{font-weight:normal;color:#fff;background:#d54d21;padding:1em;margin:9px 0}.acf-plugin-upgrade-notice:before{content:"\f348";display:inline-block;font:400 18px/1 dashicons;speak:none;margin:0 8px 0 -2px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top}.acf-plugin-upgrade-notice h4{display:none}.acf-plugin-upgrade-notice ul,.acf-plugin-upgrade-notice li{display:inline;color:inherit;list-style:none}.acf-plugin-upgrade-notice li:after{content:'. ';display:inline}html[dir="rtl"] .acf-fl{float:right}html[dir="rtl"] .acf-fr{float:left}html[dir="rtl"] .acf-hl>li{float:right}html[dir="rtl"] .acf-hl>li.acf-fr{float:left}html[dir="rtl"] .acf-icon.logo{left:0;right:auto}html[dir="rtl"] .acf-table thead th{text-align:right;border-right-width:1px;border-left-width:0px}html[dir="rtl"] .acf-table>tbody>tr>td{text-align:right;border-right-width:1px;border-left-width:0px}html[dir="rtl"] .acf-table>thead>tr>th:first-child,html[dir="rtl"] .acf-table>tbody>tr>td:first-child{border-right-width:0}html[dir="rtl"] .acf-table>tbody>tr>td.order+td{border-right-color:#e1e1e1}.acf-postbox-columns{position:relative;margin-top:-11px;margin-bottom:-12px;margin-left:-12px;margin-right:268px}.acf-postbox-columns:after{display:block;clear:both;content:""}.acf-postbox-columns .acf-postbox-main,.acf-postbox-columns .acf-postbox-side{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0 12px 12px}.acf-postbox-columns .acf-postbox-main{float:left;width:100%}.acf-postbox-columns .acf-postbox-side{float:right;width:280px;margin-right:-280px}.acf-postbox-columns .acf-postbox-side:before{content:"";display:block;position:absolute;width:1px;height:100%;top:0;right:0;background:#d5d9dd}.acf-admin-3-8 .acf-postbox-columns .acf-postbox-side:before{background:#dfdfdf}@media only screen and (max-width: 850px){.acf-postbox-columns{margin:0}.acf-postbox-columns .acf-postbox-main,.acf-postbox-columns .acf-postbox-side{float:none;width:auto;margin:0;padding:0}.acf-postbox-columns .acf-postbox-side{margin-top:1em}.acf-postbox-columns .acf-postbox-side:before{display:none}}.acf-panel{margin-top:-1px;border-top:1px solid #d5d9dd;border-bottom:1px solid #d5d9dd}.acf-panel .acf-panel-title{margin:0;padding:12px;font-weight:bold;cursor:pointer;font-size:inherit}.acf-panel .acf-panel-title i{float:right}.acf-panel .acf-panel-inside{margin:0;padding:0 12px 12px;display:none}.acf-panel.-open .acf-panel-inside{display:block}.postbox .acf-panel{margin-left:-12px;margin-right:-12px}.acf-panel .acf-field{margin:20px 0 0}.acf-panel .acf-field .acf-label label{color:#555d66;font-weight:normal}.acf-panel .acf-field:first-child{margin-top:0}.acf-admin-3-8 .acf-panel{border-color:#dfdfdf}#acf-admin-tools .notice{margin-top:10px}.acf-meta-box-wrap{margin-top:10px}.acf-meta-box-wrap .postbox{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.acf-meta-box-wrap .postbox .inside{margin-bottom:0}.acf-meta-box-wrap .postbox .hndle{font-size:14px;padding:8px 12px;margin:0;line-height:1.4;position:relative;z-index:1}.acf-meta-box-wrap .postbox .handlediv{display:none}.acf-meta-box-wrap .acf-fields{border:#ebebeb solid 1px;background:#fafafa;border-radius:3px}.acf-meta-box-wrap.-grid{margin-left:8px;margin-right:8px}.acf-meta-box-wrap.-grid .postbox{float:left;clear:left;width:50%;margin:0 0 16px}.acf-meta-box-wrap.-grid .postbox:nth-child(odd){margin-left:-8px}.acf-meta-box-wrap.-grid .postbox:nth-child(even){float:right;clear:right;margin-right:-8px}@media only screen and (max-width: 850px){.acf-meta-box-wrap.-grid{margin-left:0;margin-right:0}.acf-meta-box-wrap.-grid .postbox{margin-left:0 !important;margin-right:0 !important;width:100%}}#acf-admin-tool-export p{max-width:800px}#acf-admin-tool-export ul{column-width:200px}#acf-admin-tool-export .acf-postbox-side .button{margin:0;width:100%}#acf-admin-tool-export textarea{display:block;width:100%;min-height:500px;background:#fafafa;box-shadow:none;padding:7px;border-radius:3px}#acf-admin-tool-export .acf-panel-selection .acf-label{display:none}@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2 / 1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx){.acf-loading,.acf-spinner{background-image:url(../images/spinner@2x.gif);background-size:20px 20px}}@media only screen and (max-width: 850px){.acf-columns-2{margin-right:0}.acf-columns-2 .acf-column-1,.acf-columns-2 .acf-column-2{float:none;width:auto;margin:0}}
+.acf-hl{padding:0;margin:0;list-style:none;display:block;position:relative}.acf-hl>li{float:left;display:block;margin:0;padding:0}.acf-hl>li.acf-fr{float:right}.acf-hl:before,.acf-hl:after,.acf-bl:before,.acf-bl:after,.acf-cf:before,.acf-cf:after{content:"";display:block;line-height:0}.acf-hl:after,.acf-bl:after,.acf-cf:after{clear:both}.acf-bl{padding:0;margin:0;list-style:none;display:block;position:relative}.acf-bl>li{display:block;margin:0;padding:0;float:none}.acf-hidden{display:none !important}.acf-empty{display:table-cell !important}.acf-empty *{display:none !important}.acf-fl{float:left}.acf-fr{float:right}.acf-fn{float:none}.acf-al{text-align:left}.acf-ar{text-align:right}.acf-ac{text-align:center}.acf-loading,.acf-spinner{display:inline-block;height:20px;width:20px;vertical-align:text-top;background:transparent url(../images/spinner.gif) no-repeat 50% 50%}.acf-spinner{display:none}.acf-spinner.is-active{display:inline-block}.spinner.is-active{display:inline-block}.acf-required{color:#f00}.acf-soh .acf-soh-target{-webkit-transition:opacity 0.25s 0s ease-in-out, visibility 0s linear 0.25s;-moz-transition:opacity 0.25s 0s ease-in-out, visibility 0s linear 0.25s;-o-transition:opacity 0.25s 0s ease-in-out, visibility 0s linear 0.25s;transition:opacity 0.25s 0s ease-in-out, visibility 0s linear 0.25s;visibility:hidden;opacity:0}.acf-soh:hover .acf-soh-target{-webkit-transition-delay:0s;-moz-transition-delay:0s;-o-transition-delay:0s;transition-delay:0s;visibility:visible;opacity:1}.show-if-value{display:none}.hide-if-value{display:block}.has-value .show-if-value{display:block}.has-value .hide-if-value{display:none}.select2-search-choice-close{-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.acf-tooltip{background:#2F353E;border-radius:5px;color:#fff;padding:5px 10px;position:absolute;font-size:12px;line-height:1.4em;z-index:900000}.acf-tooltip:before{border:solid;border-color:transparent;border-width:6px;content:"";position:absolute}.acf-tooltip.top{margin-top:-8px}.acf-tooltip.top:before{top:100%;left:50%;margin-left:-6px;border-top-color:#2F353E;border-bottom-width:0}.acf-tooltip.right{margin-left:8px}.acf-tooltip.right:before{top:50%;margin-top:-6px;right:100%;border-right-color:#2F353E;border-left-width:0}.acf-tooltip.bottom{margin-top:8px}.acf-tooltip.bottom:before{bottom:100%;left:50%;margin-left:-6px;border-bottom-color:#2F353E;border-top-width:0}.acf-tooltip.left{margin-left:-8px}.acf-tooltip.left:before{top:50%;margin-top:-6px;left:100%;border-left-color:#2F353E;border-right-width:0}.acf-tooltip .acf-overlay{z-index:-1}.acf-tooltip.-confirm{z-index:900001}.acf-tooltip.-confirm a{text-decoration:none;color:#9ea3a8}.acf-tooltip.-confirm a:hover{text-decoration:underline}.acf-tooltip.-confirm a[data-event="confirm"]{color:#F55E4F}.acf-overlay{position:fixed;top:0;bottom:0;left:0;right:0;cursor:default}.acf-tooltip-target{position:relative;z-index:900002}.acf-loading-overlay{position:absolute;top:0;bottom:0;left:0;right:0;cursor:default;z-index:99;background:rgba(249,249,249,0.5)}.acf-loading-overlay i{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.acf-icon{display:inline-block;height:28px;width:28px;border:transparent solid 1px;border-radius:100%;font-size:20px;line-height:21px;text-align:center;text-decoration:none;vertical-align:top;box-sizing:border-box}.acf-icon:before{font-family:dashicons;display:inline-block;line-height:1;font-weight:400;font-style:normal;speak:none;text-decoration:inherit;text-transform:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:1em;height:1em;vertical-align:middle;text-align:center}.acf-icon.-plus:before{content:"\f543"}.acf-icon.-minus:before{content:"\f460"}.acf-icon.-cancel:before{content:"\f335"}.acf-icon.-pencil:before{content:"\f464"}.acf-icon.-location:before{content:"\f230"}.acf-icon.-up:before{content:"\f343";margin-top:-.1em}.acf-icon.-down:before{content:"\f347";margin-top:.1em}.acf-icon.-left:before{content:"\f341";margin-left:-.1em}.acf-icon.-right:before{content:"\f345";margin-left:.1em}.acf-icon.-sync:before{content:"\f463"}.acf-icon.-globe:before{content:"\f319";margin-top:.1em;margin-left:.1em}.acf-icon.-picture:before{content:"\f128"}.acf-icon.-check:before{content:"\f147";margin-left:-.1em}.acf-icon.-dot-3:before{content:"\f533";margin-top:-.1em}.acf-icon.-arrow-combo:before{content:"\f156"}.acf-icon.-arrow-up:before{content:"\f142";margin-left:-.1em}.acf-icon.-arrow-down:before{content:"\f140";margin-left:-.1em}.acf-icon.-search:before{content:"\f179"}.acf-icon.-link-ext:before{content:"\f504"}.acf-icon.-duplicate{position:relative}.acf-icon.-duplicate:before,.acf-icon.-duplicate:after{content:"";display:block;box-sizing:border-box;width:46%;height:46%;position:absolute;top:33%;left:23%}.acf-icon.-duplicate:before{margin:-1px 0 0 1px;box-shadow:2px -2px 0px 0px currentColor}.acf-icon.-duplicate:after{border:solid 2px currentColor}.acf-icon.-collapse:before{content:"\f142";margin-left:-.1em}.-collapsed .acf-icon.-collapse:before{content:"\f140";margin-left:-.1em}span.acf-icon{color:#555d66;border-color:#b5bcc2;background-color:#fff}a.acf-icon{color:#555d66;border-color:#b5bcc2;background-color:#fff;position:relative;transition:none;cursor:pointer}a.acf-icon:hover{background:#f3f5f6;border-color:#0071a1;color:#0071a1}a.acf-icon.-minus:hover,a.acf-icon.-cancel:hover{background:#f7efef;border-color:#a10000;color:#dc3232}a.acf-icon:active,a.acf-icon:focus{outline:none;box-shadow:none}.acf-icon.-clear{border-color:transparent;background:transparent;color:#444}.acf-icon.light{border-color:transparent;background:#F5F5F5;color:#23282d}.acf-icon.dark{border-color:transparent !important;background:#23282D;color:#eee}a.acf-icon.dark:hover{background:#191E23;color:#00b9eb}a.acf-icon.dark.-minus:hover,a.acf-icon.dark.-cancel:hover{color:#D54E21}.acf-icon.grey{border-color:transparent !important;background:#b4b9be;color:#fff !important}.acf-icon.grey:hover{background:#00A0D2;color:#fff}.acf-icon.grey.-minus:hover,.acf-icon.grey.-cancel:hover{background:#32373C}.acf-icon.small,.acf-icon.-small{width:20px;height:20px;line-height:14px;font-size:14px}.acf-icon.small.-duplicate:before,.acf-icon.small.-duplicate:after,.acf-icon.-small.-duplicate:before,.acf-icon.-small.-duplicate:after{opacity:0.8}.acf-box{background:#FFFFFF;border:1px solid #ccd0d4;position:relative;box-shadow:0 1px 1px rgba(0,0,0,0.04)}.acf-box .title{border-bottom:1px solid #ccd0d4;margin:0;padding:15px}.acf-box .title h3{font-size:14px;line-height:1em;margin:0;padding:0}.acf-box .inner{padding:15px}.acf-box h2{color:#333333;font-size:26px;line-height:1.25em;margin:0.25em 0 0.75em;padding:0}.acf-box h3{margin:1.5em 0 0}.acf-box p{margin-top:0.5em}.acf-box a{text-decoration:none}.acf-box i.dashicons-external{margin-top:-1px}.acf-box .footer{border-top:1px solid #ccd0d4;padding:12px;font-size:13px;line-height:1.5}.acf-box .footer p{margin:0}.acf-admin-3-8 .acf-box{border-color:#E5E5E5}.acf-admin-3-8 .acf-box .title,.acf-admin-3-8 .acf-box .footer{border-color:#E5E5E5}.acf-notice{position:relative;display:block;color:#fff;margin:5px 0 15px;padding:3px 12px;background:#2a9bd9;border-left:#1f7db1 solid 3px}.acf-notice p{font-size:13px;line-height:1.5;margin:0.5em 0;text-shadow:none;color:inherit}.acf-notice .acf-notice-dismiss{position:absolute;top:9px;right:12px;background:transparent !important;color:inherit !important;border-color:#fff !important;opacity:0.75}.acf-notice .acf-notice-dismiss:hover{opacity:1}.acf-notice.-dismiss{padding-right:40px}.acf-notice.-error{background:#d94f4f;border-color:#c92c2c}.acf-notice.-success{background:#49ad52;border-color:#3a8941}.acf-notice.-warning{background:#fd8d3b;border-color:#fc7009}.acf-table{border:#ccd0d4 solid 1px;background:#fff;border-spacing:0;border-radius:0;table-layout:auto;padding:0;margin:0;width:100%;clear:both;box-sizing:content-box}.acf-table>tbody>tr>th,.acf-table>tbody>tr>td,.acf-table>thead>tr>th,.acf-table>thead>tr>td{padding:8px;vertical-align:top;background:#fff;text-align:left;border-style:solid;font-weight:normal}.acf-table>tbody>tr>th,.acf-table>thead>tr>th{position:relative;color:#333333}.acf-table>thead>tr>th{border-color:#d5d9dd;border-width:0 0 1px 1px}.acf-table>thead>tr>th:first-child{border-left-width:0}.acf-table>tbody>tr{z-index:1}.acf-table>tbody>tr>td{border-color:#eee;border-width:1px 0 0 1px}.acf-table>tbody>tr>td:first-child{border-left-width:0}.acf-table>tbody>tr:first-child>td{border-top-width:0}.acf-table.-clear{border:0 none}.acf-table.-clear>tbody>tr>td,.acf-table.-clear>tbody>tr>th,.acf-table.-clear>thead>tr>td,.acf-table.-clear>thead>tr>th{border:0 none;padding:4px}.acf-remove-element{-webkit-transition:all 0.25s ease-out;-moz-transition:all 0.25s ease-out;-o-transition:all 0.25s ease-out;transition:all 0.25s ease-out;transform:translate(50px, 0);opacity:0}.acf-fade-up{-webkit-transition:all 0.25s ease-out;-moz-transition:all 0.25s ease-out;-o-transition:all 0.25s ease-out;transition:all 0.25s ease-out;transform:translate(0, -10px);opacity:0}.acf-thead,.acf-tbody,.acf-tfoot{width:100%;padding:0;margin:0}.acf-thead>li,.acf-tbody>li,.acf-tfoot>li{box-sizing:border-box;padding:8px 12px;font-size:12px;line-height:14px}.acf-thead{border-bottom:#ccd0d4 solid 1px;color:#23282d}.acf-thead>li{font-size:14px;line-height:1.4;font-weight:bold}.acf-admin-3-8 .acf-thead{border-color:#dfdfdf}.acf-tfoot{background:#f5f5f5;border-top:#d5d9dd solid 1px}.acf-settings-wrap #poststuff{padding-top:15px}.acf-settings-wrap .acf-box{margin:20px 0}.acf-settings-wrap table{margin:0}.acf-settings-wrap table .button{vertical-align:middle}#acf-popup{position:fixed;z-index:900000;top:0;left:0;right:0;bottom:0;text-align:center}#acf-popup .bg{position:absolute;top:0;left:0;right:0;bottom:0;z-index:0;background:rgba(0,0,0,0.25)}#acf-popup:before{content:'';display:inline-block;height:100%;vertical-align:middle}#acf-popup .acf-popup-box{display:inline-block;vertical-align:middle;z-index:1;min-width:300px;min-height:160px;border-color:#aaaaaa;box-shadow:0 5px 30px -5px rgba(0,0,0,0.25);text-align:left}html[dir="rtl"] #acf-popup .acf-popup-box{text-align:right}#acf-popup .acf-popup-box .title{min-height:15px;line-height:15px}#acf-popup .acf-popup-box .title .acf-icon{position:absolute;top:10px;right:10px}html[dir="rtl"] #acf-popup .acf-popup-box .title .acf-icon{right:auto;left:10px}#acf-popup .acf-popup-box .inner{min-height:50px;padding:0;margin:15px}#acf-popup .acf-popup-box .loading{position:absolute;top:45px;left:0;right:0;bottom:0;z-index:2;background:rgba(0,0,0,0.1);display:none}#acf-popup .acf-popup-box .loading i{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.acf-submit{margin-bottom:0;line-height:28px}.acf-submit span{float:right;color:#999}.acf-submit span.-error{color:#dd4232}.acf-submit .button{margin-right:5px}#acf-upgrade-notice{position:relative;background:#fff;border-left:4px solid #00a0d2;padding:20px}#acf-upgrade-notice:after{display:block;clear:both;content:""}#acf-upgrade-notice .col-content{float:left;width:55%;padding-left:90px}#acf-upgrade-notice .col-actions{float:right;text-align:center;padding:10px}#acf-upgrade-notice img{float:left;width:70px;height:70px;margin:0 0 0 -90px}#acf-upgrade-notice h2{font-size:16px;margin:2px 0 6.5px}#acf-upgrade-notice p{padding:0;margin:0}#acf-upgrade-notice .button:before{margin-top:11px}@media screen and (max-width: 640px){#acf-upgrade-notice .col-content,#acf-upgrade-notice .col-actions{float:none;padding-left:90px;width:auto;text-align:left}}.acf-wrap h1{margin-top:0;padding-top:20px}.acf-wrap .about-text{margin-top:0.5em;min-height:50px}.acf-wrap .about-headline-callout{font-size:2.4em;font-weight:300;line-height:1.3;margin:1.1em 0 0.2em;text-align:center}.acf-wrap .feature-section{padding:40px 0}.acf-wrap .feature-section h2{margin-top:20px}.acf-wrap .changelog{list-style:disc;padding-left:15px}.acf-wrap .changelog li{margin:0 0 0.75em}.acf-wrap .acf-three-col{display:flex;flex-wrap:wrap;justify-content:space-between}.acf-wrap .acf-three-col>div{flex:1;align-self:flex-start;min-width:31%;max-width:31%}@media screen and (max-width: 880px){.acf-wrap .acf-three-col>div{min-width:48%}}@media screen and (max-width: 640px){.acf-wrap .acf-three-col>div{min-width:100%}}.acf-wrap .acf-three-col h3 .badge{display:inline-block;vertical-align:top;border-radius:5px;background:#fc9700;color:#fff;font-weight:normal;font-size:12px;padding:2px 5px}.acf-wrap .acf-three-col img+h3{margin-top:0.5em}.acf-hl[data-cols]{margin-left:-10px;margin-right:-10px}.acf-hl[data-cols]>li{padding:0 10px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.acf-hl[data-cols="2"]>li{width:50%}.acf-hl[data-cols="3"]>li{width:33.333%}.acf-hl[data-cols="4"]>li{width:25%}@media screen and (max-width: 640px){.acf-hl[data-cols]{margin-left:0;margin-right:0;margin-top:-10px}.acf-hl[data-cols]>li{width:100% !important;padding:10px 0 0}}.acf-actions{text-align:right;z-index:1}.acf-actions.-hover{position:absolute;display:none;top:0;right:0;padding:5px}html[dir="rtl"] .acf-actions.-hover{right:auto;left:0}ul.acf-actions li{float:right;margin-left:4px}html[dir="rtl"] .acf-fl{float:right}html[dir="rtl"] .acf-fr{float:left}html[dir="rtl"] .acf-hl>li{float:right}html[dir="rtl"] .acf-hl>li.acf-fr{float:left}html[dir="rtl"] .acf-icon.logo{left:0;right:auto}html[dir="rtl"] .acf-table thead th{text-align:right;border-right-width:1px;border-left-width:0px}html[dir="rtl"] .acf-table>tbody>tr>td{text-align:right;border-right-width:1px;border-left-width:0px}html[dir="rtl"] .acf-table>thead>tr>th:first-child,html[dir="rtl"] .acf-table>tbody>tr>td:first-child{border-right-width:0}html[dir="rtl"] .acf-table>tbody>tr>td.order+td{border-right-color:#e1e1e1}.acf-postbox-columns{position:relative;margin-top:-11px;margin-bottom:-12px;margin-left:-12px;margin-right:268px}.acf-postbox-columns:after{display:block;clear:both;content:""}.acf-postbox-columns .acf-postbox-main,.acf-postbox-columns .acf-postbox-side{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0 12px 12px}.acf-postbox-columns .acf-postbox-main{float:left;width:100%}.acf-postbox-columns .acf-postbox-side{float:right;width:280px;margin-right:-280px}.acf-postbox-columns .acf-postbox-side:before{content:"";display:block;position:absolute;width:1px;height:100%;top:0;right:0;background:#d5d9dd}.acf-admin-3-8 .acf-postbox-columns .acf-postbox-side:before{background:#dfdfdf}@media only screen and (max-width: 850px){.acf-postbox-columns{margin:0}.acf-postbox-columns .acf-postbox-main,.acf-postbox-columns .acf-postbox-side{float:none;width:auto;margin:0;padding:0}.acf-postbox-columns .acf-postbox-side{margin-top:1em}.acf-postbox-columns .acf-postbox-side:before{display:none}}.acf-panel{margin-top:-1px;border-top:1px solid #d5d9dd;border-bottom:1px solid #d5d9dd}.acf-panel .acf-panel-title{margin:0;padding:12px;font-weight:bold;cursor:pointer;font-size:inherit}.acf-panel .acf-panel-title i{float:right}.acf-panel .acf-panel-inside{margin:0;padding:0 12px 12px;display:none}.acf-panel.-open .acf-panel-inside{display:block}.postbox .acf-panel{margin-left:-12px;margin-right:-12px}.acf-panel .acf-field{margin:20px 0 0}.acf-panel .acf-field .acf-label label{color:#555d66;font-weight:normal}.acf-panel .acf-field:first-child{margin-top:0}.acf-admin-3-8 .acf-panel{border-color:#dfdfdf}#acf-admin-tools .notice{margin-top:10px}.acf-meta-box-wrap{margin-top:10px}.acf-meta-box-wrap .postbox{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.acf-meta-box-wrap .postbox .inside{margin-bottom:0}.acf-meta-box-wrap .postbox .hndle{font-size:14px;padding:8px 12px;margin:0;line-height:1.4;position:relative;z-index:1;cursor:default}.acf-meta-box-wrap .postbox .handlediv,.acf-meta-box-wrap .postbox .handle-order-higher,.acf-meta-box-wrap .postbox .handle-order-lower{display:none}.acf-meta-box-wrap .acf-fields{border:#ebebeb solid 1px;background:#fafafa;border-radius:3px}.acf-meta-box-wrap.-grid{margin-left:8px;margin-right:8px}.acf-meta-box-wrap.-grid .postbox{float:left;clear:left;width:50%;margin:0 0 16px}.acf-meta-box-wrap.-grid .postbox:nth-child(odd){margin-left:-8px}.acf-meta-box-wrap.-grid .postbox:nth-child(even){float:right;clear:right;margin-right:-8px}@media only screen and (max-width: 850px){.acf-meta-box-wrap.-grid{margin-left:0;margin-right:0}.acf-meta-box-wrap.-grid .postbox{margin-left:0 !important;margin-right:0 !important;width:100%}}#acf-admin-tool-export p{max-width:800px}#acf-admin-tool-export ul{column-width:200px}#acf-admin-tool-export .acf-postbox-side .button{margin:0;width:100%}#acf-admin-tool-export textarea{display:block;width:100%;min-height:500px;background:#fafafa;box-shadow:none;padding:7px;border-radius:3px}#acf-admin-tool-export .acf-panel-selection .acf-label{display:none}.acf-admin-toolbar{background:#fff;border-bottom:1px solid #ccd0d4}.acf-admin-toolbar h2{font-size:14px;line-height:2.57143;display:inline-block;padding:5px 0;margin:0 10px 0 0}.acf-admin-toolbar h2 i{vertical-align:middle;color:#babbbc}.acf-admin-toolbar .acf-tab{display:inline-block;font-size:14px;line-height:2.57143;padding:5px;margin:0 5px;text-decoration:none;color:inherit}.acf-admin-toolbar .acf-tab.is-active{border-bottom:#0071a4 solid 3px;padding-bottom:2px}.acf-admin-toolbar .acf-tab:hover{color:#00a0d2}.acf-admin-toolbar .acf-tab:focus{box-shadow:none}#wpcontent .acf-admin-toolbar{margin-left:-20px;padding-left:20px}@media screen and (max-width: 600px){.acf-admin-toolbar{display:none}}.acf-admin-field-groups .tablenav.top{display:none}.acf-admin-field-groups .subsubsub{margin-bottom:3px}.acf-admin-field-groups .wp-list-table td,.acf-admin-field-groups .wp-list-table th{box-sizing:border-box}.acf-admin-field-groups .wp-list-table tr:hover{background:#f7f7f7}@media screen and (min-width: 782px){.acf-admin-field-groups .wp-list-table .column-acf-count{width:10%}}.acf-admin-field-groups .wp-list-table .row-actions span.file{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.acf-admin-field-groups .acf-secondary-text{color:#a0a5aa}.acf-multi-dashicon{position:relative;z-index:1}.acf-multi-dashicon:before,.acf-multi-dashicon:after{width:18px;height:18px;line-height:18px;font-size:14px;background:#fff;border:#7e8993 solid 1px;border-radius:2px;display:block}.acf-multi-dashicon:after{content:"";position:absolute;top:-3px;left:-3px;z-index:-1;background:#e7e7e7}.acf-css-tooltip{position:relative}.acf-css-tooltip:before{content:attr(aria-label);display:none;position:absolute;z-index:999;bottom:100%;left:50%;transform:translate(-50%, -8px);background:#191e23;border-radius:2px;padding:5px 10px;color:#fff;font-size:12px;line-height:1.4em;white-space:pre}.acf-css-tooltip:after{content:"";display:none;position:absolute;z-index:998;bottom:100%;left:50%;transform:translate(-50%, 4px);border:solid 6px transparent;border-top-color:#191e23}.acf-css-tooltip:hover:before,.acf-css-tooltip:hover:after,.acf-css-tooltip:focus:before,.acf-css-tooltip:focus:after{display:block}.acf-diff .acf-diff-title{position:absolute;top:0;left:0;right:0;height:40px;padding:14px 16px;background:#f3f3f3;border-bottom:#dddddd solid 1px}.acf-diff .acf-diff-title strong{font-size:14px;display:block}.acf-diff .acf-diff-title .acf-diff-title-left,.acf-diff .acf-diff-title .acf-diff-title-right{width:50%;float:left}.acf-diff .acf-diff-content{position:absolute;top:70px;left:0;right:0;bottom:0;overflow:auto}.acf-diff table.diff{border-spacing:0}.acf-diff table.diff col.diffsplit.middle{width:0}.acf-diff table.diff td,.acf-diff table.diff th{padding-top:0.25em;padding-bottom:0.25em}.acf-diff table.diff td:nth-child(3){border-left:#dddddd solid 1px}@media screen and (max-width: 600px){.acf-diff .acf-diff-title{height:70px}.acf-diff .acf-diff-content{top:100px}}.acf-modal{position:fixed;top:30px;left:30px;right:30px;bottom:30px;z-index:160000;box-shadow:0 5px 15px rgba(0,0,0,0.7);background:#fcfcfc}.acf-modal .acf-modal-title,.acf-modal .acf-modal-content,.acf-modal .acf-modal-toolbar{box-sizing:border-box;position:absolute;left:0;right:0}.acf-modal .acf-modal-title{height:50px;top:0;border-bottom:1px solid #ddd}.acf-modal .acf-modal-title h2{margin:0;padding:0 16px;line-height:50px}.acf-modal .acf-modal-title .acf-modal-close{position:absolute;top:0;right:0;height:50px;width:50px;border:none;border-left:1px solid #ddd;background:transparent;cursor:pointer;color:#666}.acf-modal .acf-modal-title .acf-modal-close:hover{color:#00a0d2}.acf-modal .acf-modal-content{top:50px;bottom:60px;background:#fff;overflow:auto;padding:16px}.acf-modal .acf-modal-feedback{position:absolute;top:50%;margin:-10px 0;left:0;right:0;text-align:center;opacity:0.75}.acf-modal .acf-modal-feedback.error{opacity:1;color:#b52727}.acf-modal .acf-modal-toolbar{height:60px;bottom:0;padding:15px 16px;border-top:1px solid #ddd}.acf-modal .acf-modal-toolbar .button{float:right}@media only screen and (max-width: 640px){.acf-modal{top:0;left:0;right:0;bottom:0}}.acf-modal-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;background:#000;opacity:0.7;z-index:159900}@media only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min--moz-device-pixel-ratio: 2),only screen and (-o-min-device-pixel-ratio: 2/1),only screen and (min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx){.acf-loading,.acf-spinner{background-image:url(../images/spinner@2x.gif);background-size:20px 20px}}
diff --git a/assets/css/acf-input.css b/assets/css/acf-input.css
index f82f26e..bfc2fd8 100644
--- a/assets/css/acf-input.css
+++ b/assets/css/acf-input.css
@@ -1 +1 @@
-.acf-field,.acf-field .acf-label,.acf-field .acf-input{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative}.acf-field{margin:15px 0;clear:both}.acf-field p.description{display:block;margin:0;padding:0}.acf-field .acf-label{vertical-align:top;margin:0 0 10px}.acf-field .acf-label label{display:block;font-weight:bold;margin:0 0 3px;padding:0}.acf-field .acf-label:empty{margin-bottom:0}.acf-field .acf-input{vertical-align:top}.acf-field .acf-input>p.description{margin-top:5px}.acf-field .acf-notice{margin:0 0 15px;background:#edf2ff;color:#2183b9;border:none}.acf-field .acf-notice .acf-notice-dismiss{background:transparent;color:inherit}.acf-field .acf-notice .acf-notice-dismiss:hover{background:#fff}.acf-field .acf-notice.-dismiss{padding-right:40px}.acf-field .acf-notice.-error{background:#ffe6e6;color:#d12626}.acf-field .acf-notice.-success{background:#eefbe8;color:#32a23b}.acf-field .acf-notice.-warning{background:#fff3e6;color:#d16226}td.acf-field,tr.acf-field{margin:0}.acf-field[data-width]{float:left;clear:none}.acf-field[data-width]+.acf-field[data-width]{border-left:1px solid #eeeeee}html[dir="rtl"] .acf-field[data-width]{float:right}html[dir="rtl"] .acf-field[data-width]+.acf-field[data-width]{border-left:none;border-right:1px solid #eeeeee}td.acf-field[data-width],tr.acf-field[data-width]{float:none}.acf-field.-c0{clear:both;border-left-width:0 !important}html[dir="rtl"] .acf-field.-c0{border-left-width:1px !important;border-right-width:0 !important}.acf-field.-r0{border-top-width:0 !important}.acf-fields{position:relative}.acf-fields:after{display:block;clear:both;content:""}.acf-fields.-border{border:#ccd0d4 solid 1px;background:#fff}.acf-fields>.acf-field{position:relative;margin:0;padding:15px 12px;border-top:#EEEEEE solid 1px}.acf-fields>.acf-field:first-child{border-top:none;margin-top:0}td.acf-fields{padding:0 !important}.acf-fields.-clear>.acf-field{border:none;padding:0;margin:15px 0}.acf-fields.-clear>.acf-field[data-width]{border:none !important}.acf-fields.-clear>.acf-field>.acf-label{padding:0}.acf-fields.-clear>.acf-field>.acf-input{padding:0}.acf-fields.-left>.acf-field{padding:15px 0}.acf-fields.-left>.acf-field:after{display:block;clear:both;content:""}.acf-fields.-left>.acf-field:before{content:"";display:block;position:absolute;z-index:0;background:#F9F9F9;border-color:#E1E1E1;border-style:solid;border-width:0 1px 0 0;top:0;bottom:0;left:0;width:20%}.acf-fields.-left>.acf-field[data-width]{float:none;width:auto !important;border-left-width:0 !important;border-right-width:0 !important}.acf-fields.-left>.acf-field>.acf-label{float:left;width:20%;margin:0;padding:0 12px}.acf-fields.-left>.acf-field>.acf-input{float:left;width:80%;margin:0;padding:0 12px}html[dir="rtl"] .acf-fields.-left>.acf-field:before{border-width:0 0 0 1px;left:auto;right:0}html[dir="rtl"] .acf-fields.-left>.acf-field>.acf-label{float:right}html[dir="rtl"] .acf-fields.-left>.acf-field>.acf-input{float:right}#side-sortables .acf-fields.-left>.acf-field:before{display:none}#side-sortables .acf-fields.-left>.acf-field>.acf-label{width:100%;margin-bottom:10px}#side-sortables .acf-fields.-left>.acf-field>.acf-input{width:100%}@media screen and (max-width: 640px){.acf-fields.-left>.acf-field:before{display:none}.acf-fields.-left>.acf-field>.acf-label{width:100%;margin-bottom:10px}.acf-fields.-left>.acf-field>.acf-input{width:100%}}.acf-fields.-clear.-left>.acf-field{padding:0;border:none}.acf-fields.-clear.-left>.acf-field:before{display:none}.acf-fields.-clear.-left>.acf-field>.acf-label{padding:0}.acf-fields.-clear.-left>.acf-field>.acf-input{padding:0}.acf-table tr.acf-field>td.acf-label{padding:15px 12px;margin:0;background:#F9F9F9;width:20%}.acf-table tr.acf-field>td.acf-input{padding:15px 12px;margin:0;border-left-color:#E1E1E1}.acf-sortable-tr-helper{position:relative !important;display:table-row !important}.acf-postbox{position:relative}.acf-postbox>.inside{margin:0 !important;padding:0 !important}.acf-postbox>.hndle .acf-hndle-cog{color:#AAAAAA;font-size:16px;line-height:20px;padding:0 2px;float:right;position:relative;display:none}.acf-postbox>.hndle .acf-hndle-cog:hover{color:#777777}.acf-postbox:hover>.hndle .acf-hndle-cog{display:block}.acf-postbox .acf-replace-with-fields{padding:15px;text-align:center}#post-body-content #acf_after_title-sortables{margin:20px 0 -20px}.acf-postbox.seamless{border:0 none;background:transparent;box-shadow:none}.acf-postbox.seamless>.hndle,.acf-postbox.seamless>.handlediv{display:none !important}.acf-postbox.seamless>.inside{display:block !important;margin-left:-12px !important;margin-right:-12px !important}.acf-postbox.seamless>.inside>.acf-field{border-color:transparent}.acf-postbox.seamless>.acf-fields.-left>.acf-field:before{display:none}@media screen and (max-width: 782px){.acf-postbox.seamless>.acf-fields.-left>.acf-field>.acf-label,.acf-postbox.seamless>.acf-fields.-left>.acf-field>.acf-input{padding:0}}.acf-field input[type="text"],.acf-field input[type="password"],.acf-field input[type="date"],.acf-field input[type="datetime"],.acf-field input[type="datetime-local"],.acf-field input[type="email"],.acf-field input[type="month"],.acf-field input[type="number"],.acf-field input[type="search"],.acf-field input[type="tel"],.acf-field input[type="time"],.acf-field input[type="url"],.acf-field input[type="week"],.acf-field textarea,.acf-field select{width:100%;padding:4px 8px;margin:0;box-sizing:border-box;font-size:14px;line-height:1.4}.acf-admin-3-8 .acf-field input[type="text"],.acf-admin-3-8 .acf-field input[type="password"],.acf-admin-3-8 .acf-field input[type="date"],.acf-admin-3-8 .acf-field input[type="datetime"],.acf-admin-3-8 .acf-field input[type="datetime-local"],.acf-admin-3-8 .acf-field input[type="email"],.acf-admin-3-8 .acf-field input[type="month"],.acf-admin-3-8 .acf-field input[type="number"],.acf-admin-3-8 .acf-field input[type="search"],.acf-admin-3-8 .acf-field input[type="tel"],.acf-admin-3-8 .acf-field input[type="time"],.acf-admin-3-8 .acf-field input[type="url"],.acf-admin-3-8 .acf-field input[type="week"],.acf-admin-3-8 .acf-field textarea,.acf-admin-3-8 .acf-field select{padding:3px 5px}.acf-field textarea{resize:vertical}.acf-input-prepend,.acf-input-append,.acf-input-wrap{box-sizing:border-box}.acf-input-prepend,.acf-input-append{font-size:14px;line-height:1.4;padding:4px 8px;background:#f5f5f5;border:#7e8993 solid 1px;min-height:30px}.acf-admin-3-8 .acf-input-prepend,.acf-admin-3-8 .acf-input-append{padding:3px 5px;border-color:#ddd;min-height:28px}.acf-input-prepend{float:left;border-right-width:0;border-radius:3px 0 0 3px}.acf-input-append{float:right;border-left-width:0;border-radius:0 3px 3px 0}.acf-input-wrap{position:relative;overflow:hidden}input.acf-is-prepended{border-radius:0 3px 3px 0 !important}input.acf-is-appended{border-radius:3px 0 0 3px !important}input.acf-is-prepended.acf-is-appended{border-radius:0 !important}html[dir="rtl"] .acf-input-prepend{border-left-width:0;border-right-width:1px;border-radius:0 3px 3px 0;float:right}html[dir="rtl"] .acf-input-append{border-left-width:1px;border-right-width:0;border-radius:3px 0 0 3px;float:left}html[dir="rtl"] input.acf-is-prepended{border-radius:3px 0 0 3px !important}html[dir="rtl"] input.acf-is-appended{border-radius:0 3px 3px 0 !important}html[dir="rtl"] input.acf-is-prepended.acf-is-appended{border-radius:0 !important}.acf-color-picker .wp-color-result{border-color:#7e8993}.acf-admin-3-8 .acf-color-picker .wp-color-result{border-color:#ccd0d4}.acf-color-picker .wp-picker-active{position:relative;z-index:1}.acf-url i{position:absolute;top:4px;left:4px;opacity:0.5;color:#A9A9A9}.acf-url input[type="url"]{padding-left:25px !important}.acf-url.-valid i{opacity:1}.acf-field select{padding:2px}.acf-field select optgroup{padding:5px;background:#fff}.acf-field select option{padding:3px}.acf-field select optgroup option{padding-left:5px}.acf-field select optgroup:nth-child(2n){background:#F9F9F9}.acf-field .select2-input{max-width:200px}.select2-container.-acf .select2-choices{background:#fff;border-color:#ddd;box-shadow:0 1px 2px rgba(0,0,0,0.07) inset;min-height:31px}.select2-container.-acf .select2-choices .select2-search-choice{margin:5px 0 5px 5px;padding:3px 5px 3px 18px;border-color:#bbb;background:#f9f9f9;box-shadow:0 1px 0 rgba(255,255,255,0.25) inset}.select2-container.-acf .select2-choices .select2-search-choice.ui-sortable-helper{background:#5897fb;border-color:#3f87fa;color:#fff;box-shadow:0 0 3px rgba(0,0,0,0.1)}.select2-container.-acf .select2-choices .select2-search-choice.ui-sortable-helper a{visibility:hidden}.select2-container.-acf .select2-choices .select2-search-choice.ui-sortable-placeholder{background-color:#f7f7f7;border-color:#f7f7f7;visibility:visible !important}.select2-container.-acf .select2-choices .select2-search-choice-focus{border-color:#999}.select2-container.-acf .select2-choices .select2-search-field input{height:31px;line-height:22px;margin:0;padding:5px 5px 5px 7px}.select2-container.-acf .select2-choice{border-color:#BBBBBB}.select2-container.-acf .select2-choice .select2-arrow{background:transparent;border-left-color:#DFDFDF;padding-left:1px}.select2-container.-acf .select2-choice .select2-result-description{display:none}.select2-container.-acf.select2-container-active .select2-choices,.select2-container.-acf.select2-dropdown-open .select2-choices{border-color:#5B9DD9;border-radius:3px 3px 0 0}.select2-container.-acf.select2-dropdown-open .select2-choice{background:#fff;border-color:#5B9DD9}html[dir="rtl"] .select2-container.-acf .select2-search-choice-close{left:24px}html[dir="rtl"] .select2-container.-acf .select2-choice>.select2-chosen{margin-left:42px}html[dir="rtl"] .select2-container.-acf .select2-choice .select2-arrow{padding-left:0;padding-right:1px}.select2-drop .select2-search{padding:4px 4px 0}.select2-drop .select2-result .select2-result-description{color:#999;font-size:12px;margin-left:5px}.select2-drop .select2-result.select2-highlighted .select2-result-description{color:#fff;opacity:0.75}.select2-container.-acf li{margin-bottom:0}.select2-container.-acf .select2-selection{border-color:#7e8993}.acf-admin-3-8 .select2-container.-acf .select2-selection{border-color:#aaa}.select2-container.-acf .select2-selection--multiple .select2-search--inline:first-child{float:none}.select2-container.-acf .select2-selection--multiple .select2-search--inline:first-child input{width:100% !important}.select2-container.-acf .select2-selection--multiple .select2-selection__rendered{padding-right:0}.select2-container.-acf .select2-selection--multiple .select2-selection__choice{background-color:#f7f7f7;border-color:#cccccc;max-width:100%;overflow:hidden;word-wrap:normal !important;white-space:normal}.select2-container.-acf .select2-selection--multiple .select2-selection__choice.ui-sortable-helper{background:#5897fb;border-color:#3f87fa;color:#fff;box-shadow:0 0 3px rgba(0,0,0,0.1)}.select2-container.-acf .select2-selection--multiple .select2-selection__choice.ui-sortable-helper span{visibility:hidden}.select2-container.-acf .select2-selection--multiple .select2-selection__choice.ui-sortable-placeholder{background-color:#f7f7f7;border-color:#f7f7f7;visibility:visible !important}.select2-container.-acf .select2-selection--multiple .select2-search__field{box-shadow:none !important;min-height:0}.acf-row .select2-container.-acf .select2-selection--single{overflow:hidden}.acf-row .select2-container.-acf .select2-selection--single .select2-selection__rendered{white-space:normal}.select2-container .select2-dropdown{z-index:900000}.select2-container .select2-dropdown .select2-search__field{line-height:1.4;min-height:0}.acf-link .link-wrap{display:none;border:#ccd0d4 solid 1px;border-radius:3px;padding:5px;line-height:26px;background:#fff;word-wrap:break-word;word-break:break-all}.acf-link .link-wrap .link-title{padding:0 5px}.acf-link.-value .button{display:none}.acf-link.-value .acf-icon.-link-ext{display:none}.acf-link.-value .link-wrap{display:inline-block}.acf-link.-external .acf-icon.-link-ext{display:inline-block}#wp-link-backdrop{z-index:900000 !important}#wp-link-wrap{z-index:900001 !important}ul.acf-radio-list,ul.acf-checkbox-list{background:transparent;position:relative;padding:1px;margin:0}ul.acf-radio-list li,ul.acf-checkbox-list li{font-size:13px;line-height:22px;margin:0;position:relative;word-wrap:break-word}ul.acf-radio-list li label,ul.acf-checkbox-list li label{display:inline}ul.acf-radio-list li input[type="checkbox"],ul.acf-radio-list li input[type="radio"],ul.acf-checkbox-list li input[type="checkbox"],ul.acf-checkbox-list li input[type="radio"]{margin:-1px 4px 0 0;vertical-align:middle}ul.acf-radio-list li input[type="text"],ul.acf-checkbox-list li input[type="text"]{width:auto;vertical-align:middle;margin:2px 0}ul.acf-radio-list li span,ul.acf-checkbox-list li span{float:none}ul.acf-radio-list li i,ul.acf-checkbox-list li i{vertical-align:middle}ul.acf-radio-list.acf-hl li,ul.acf-checkbox-list.acf-hl li{margin-right:20px;clear:none}html[dir="rtl"] ul.acf-radio-list input[type="checkbox"],html[dir="rtl"] ul.acf-radio-list input[type="radio"],html[dir="rtl"] ul.acf-checkbox-list input[type="checkbox"],html[dir="rtl"] ul.acf-checkbox-list input[type="radio"]{margin-left:4px;margin-right:0}.acf-button-group{display:inline-block}.acf-button-group label{display:inline-block;border:#7e8993 solid 1px;position:relative;z-index:1;padding:5px 10px;background:#fff}.acf-button-group label:hover{color:#016087;background:#f3f5f6;border-color:#0071a1;z-index:2}.acf-button-group label.selected{border-color:#007cba;background:#008dd4;color:#fff;z-index:2}.acf-button-group input{display:none !important}.acf-button-group{padding-left:1px;display:inline-flex;flex-direction:row;flex-wrap:nowrap}.acf-button-group label{margin:0 0 0 -1px;flex:1;text-align:center;white-space:nowrap}.acf-button-group label:first-child{border-radius:3px 0 0 3px}html[dir="rtl"] .acf-button-group label:first-child{border-radius:0 3px 3px 0}.acf-button-group label:last-child{border-radius:0 3px 3px 0}html[dir="rtl"] .acf-button-group label:last-child{border-radius:3px 0 0 3px}.acf-button-group label:only-child{border-radius:3px}.acf-button-group.-vertical{padding-left:0;padding-top:1px;flex-direction:column}.acf-button-group.-vertical label{margin:-1px 0 0 0}.acf-button-group.-vertical label:first-child{border-radius:3px 3px 0 0}.acf-button-group.-vertical label:last-child{border-radius:0 0 3px 3px}.acf-button-group.-vertical label:only-child{border-radius:3px}.acf-admin-3-8 .acf-button-group label{border-color:#ccd0d4}.acf-admin-3-8 .acf-button-group label:hover{border-color:#0071a1}.acf-admin-3-8 .acf-button-group label.selected{border-color:#007cba}.acf-checkbox-list .button{margin:10px 0 0}.acf-switch{display:inline-block;border-radius:5px;cursor:pointer;position:relative;background:#f5f5f5;height:30px;vertical-align:middle;border:#7e8993 solid 1px;-webkit-transition:background 0.25s ease;-moz-transition:background 0.25s ease;-o-transition:background 0.25s ease;transition:background 0.25s ease}.acf-switch span{display:inline-block;float:left;text-align:center;font-size:13px;line-height:22px;padding:4px 10px;min-width:15px}.acf-switch span i{vertical-align:middle}.acf-switch .acf-switch-on{color:#fff;text-shadow:#007cba 0 1px 0}.acf-switch .acf-switch-slider{position:absolute;top:2px;left:2px;bottom:2px;right:50%;z-index:1;background:#fff;border-radius:3px;border:#7e8993 solid 1px;-webkit-transition:all 0.25s ease;-moz-transition:all 0.25s ease;-o-transition:all 0.25s ease;transition:all 0.25s ease;transition-property:left, right}.acf-switch:hover,.acf-switch.-focus{border-color:#0071a1;background:#f3f5f6;color:#016087}.acf-switch:hover .acf-switch-slider,.acf-switch.-focus .acf-switch-slider{border-color:#0071a1}.acf-switch.-on{background:#0d99d5;border-color:#007cba}.acf-switch.-on .acf-switch-slider{left:50%;right:2px;border-color:#007cba}.acf-switch.-on:hover{border-color:#007cba}.acf-switch+span{margin-left:6px}.acf-admin-3-8 .acf-switch{border-color:#ccd0d4}.acf-admin-3-8 .acf-switch .acf-switch-slider{border-color:#ccd0d4}.acf-admin-3-8 .acf-switch:hover,.acf-admin-3-8 .acf-switch.-focus{border-color:#0071a1}.acf-admin-3-8 .acf-switch:hover .acf-switch-slider,.acf-admin-3-8 .acf-switch.-focus .acf-switch-slider{border-color:#0071a1}.acf-admin-3-8 .acf-switch.-on{border-color:#007cba}.acf-admin-3-8 .acf-switch.-on .acf-switch-slider{border-color:#007cba}.acf-admin-3-8 .acf-switch.-on:hover{border-color:#007cba}.acf-switch-input{opacity:0;position:absolute;margin:0}.compat-item .acf-true-false .message{float:none;padding:0;vertical-align:middle}.acf-google-map{position:relative;border:#ccd0d4 solid 1px;background:#fff}.acf-google-map .title{position:relative;border-bottom:#ccd0d4 solid 1px}.acf-google-map .title .search{margin:0;font-size:14px;line-height:30px;height:40px;padding:5px 10px;border:0 none;box-shadow:none;border-radius:0;font-family:inherit;cursor:text}.acf-google-map .title .acf-loading{position:absolute;top:10px;right:11px;display:none}.acf-google-map .title .acf-icon:active{display:inline-block !important}.acf-google-map .canvas{height:400px}.acf-google-map:hover .title .acf-actions{display:block}.acf-google-map .title .acf-icon.-location{display:inline-block}.acf-google-map .title .acf-icon.-cancel,.acf-google-map .title .acf-icon.-search{display:none}.acf-google-map.-value .title .search{font-weight:bold}.acf-google-map.-value .title .acf-icon.-location{display:none}.acf-google-map.-value .title .acf-icon.-cancel{display:inline-block}.acf-google-map.-searching .title .acf-icon.-location{display:none}.acf-google-map.-searching .title .acf-icon.-cancel,.acf-google-map.-searching .title .acf-icon.-search{display:inline-block}.acf-google-map.-searching .title .acf-actions{display:block}.acf-google-map.-searching .title .search{font-weight:normal !important}.acf-google-map.-loading .title a{display:none !important}.acf-google-map.-loading .title i{display:inline-block}.pac-container{border-width:1px 0;box-shadow:none}.pac-container:after{display:none}.pac-container .pac-item:first-child{border-top:0 none}.pac-container .pac-item{padding:5px 10px;cursor:pointer}html[dir="rtl"] .pac-container .pac-item{text-align:right}.acf-relationship{background:#fff;border:#ccd0d4 solid 1px}.acf-relationship .filters{border-bottom:#ccd0d4 solid 1px;background:#fff}.acf-relationship .filters:after{display:block;clear:both;content:""}.acf-relationship .filters .filter{margin:0;padding:0;float:left;width:100%}.acf-relationship .filters .filter span{display:block;padding:7px 7px 7px 0}.acf-relationship .filters .filter:first-child span{padding-left:7px}.acf-relationship .filters .filter input,.acf-relationship .filters .filter select{height:28px;line-height:1;padding:2px;width:100%;margin:0;float:none}.acf-relationship .filters .filter input:focus,.acf-relationship .filters .filter input:active,.acf-relationship .filters .filter select:focus,.acf-relationship .filters .filter select:active{outline:none;box-shadow:none}.acf-relationship .filters .filter input{border-color:transparent;box-shadow:none}.acf-relationship .filters.-f2 .filter{width:50%}.acf-relationship .filters.-f3 .filter{width:25%}.acf-relationship .filters.-f3 .filter.-search{width:50%}.acf-relationship .list{margin:0;padding:5px;height:160px;overflow:auto}.acf-relationship .list .acf-rel-label,.acf-relationship .list .acf-rel-item,.acf-relationship .list p{padding:5px 7px;margin:0;display:block;position:relative;min-height:18px}.acf-relationship .list .acf-rel-label{font-weight:bold}.acf-relationship .list .acf-rel-item{cursor:pointer}.acf-relationship .list .acf-rel-item b{text-decoration:underline;font-weight:normal}.acf-relationship .list .acf-rel-item .thumbnail{background:#e0e0e0;width:22px;height:22px;float:left;margin:-2px 5px 0 0}.acf-relationship .list .acf-rel-item .thumbnail img{max-width:22px;max-height:22px;margin:0 auto;display:block}.acf-relationship .list .acf-rel-item .thumbnail.-icon{background:#fff}.acf-relationship .list .acf-rel-item .thumbnail.-icon img{max-height:20px;margin-top:1px}.acf-relationship .list .acf-rel-item:hover{background:#3875D7;color:#fff}.acf-relationship .list .acf-rel-item:hover .thumbnail{background:#a2bfec}.acf-relationship .list .acf-rel-item:hover .thumbnail.-icon{background:#fff}.acf-relationship .list .acf-rel-item.disabled{opacity:0.5}.acf-relationship .list .acf-rel-item.disabled:hover{background:transparent;color:#333;cursor:default}.acf-relationship .list .acf-rel-item.disabled:hover .thumbnail{background:#e0e0e0}.acf-relationship .list .acf-rel-item.disabled:hover .thumbnail.-icon{background:#fff}.acf-relationship .list ul{padding-bottom:5px}.acf-relationship .list ul .acf-rel-label,.acf-relationship .list ul .acf-rel-item,.acf-relationship .list ul p{padding-left:20px}.acf-relationship .selection{position:relative}.acf-relationship .selection:after{display:block;clear:both;content:""}.acf-relationship .selection .values,.acf-relationship .selection .choices{width:50%;background:#fff;float:left}.acf-relationship .selection .choices{background:#F9F9F9}.acf-relationship .selection .choices .list{border-right:#DFDFDF solid 1px}.acf-relationship .selection .values .acf-icon{position:absolute;top:4px;right:7px;display:none}html[dir="rtl"] .acf-relationship .selection .values .acf-icon{right:auto;left:7px}.acf-relationship .selection .values .acf-rel-item:hover .acf-icon{display:block}.acf-relationship .selection .values .acf-rel-item{cursor:move}.acf-relationship .selection .values .acf-rel-item b{text-decoration:none}.menu-item .acf-relationship ul{width:auto}.menu-item .acf-relationship li{display:block}.acf-editor-wrap.delay .acf-editor-toolbar{content:"";display:block;background:#f5f5f5;border-bottom:#dddddd solid 1px;color:#555d66;padding:10px}.acf-editor-wrap.delay .wp-editor-area{padding:10px;border:none;color:inherit !important}.acf-editor-wrap iframe{min-height:200px}.acf-editor-wrap .wp-editor-container{border:1px solid #ccd0d4;box-shadow:none !important}.acf-editor-wrap .wp-editor-tabs{box-sizing:content-box}.acf-editor-wrap .wp-switch-editor{border-color:#ccd0d4;border-bottom-color:transparent}#mce_fullscreen_container{z-index:900000 !important}.acf-field-tab{display:none !important}.hidden-by-tab{display:none !important}.acf-tab-wrap{clear:both;z-index:1}.acf-tab-group{border-bottom:#ccc solid 1px;padding:10px 10px 0}.acf-tab-group li{margin:0 0.5em 0 0}.acf-tab-group li a{padding:5px 10px;display:block;color:#555;font-size:14px;font-weight:600;line-height:24px;border:#ccc solid 1px;border-bottom:0 none;text-decoration:none;background:#e5e5e5;transition:none}.acf-tab-group li a:hover{background:#FFF}.acf-tab-group li a:focus{outline:none;box-shadow:none}.acf-tab-group li a:empty{display:none}html[dir="rtl"] .acf-tab-group li{margin:0 0 0 0.5em}.acf-tab-group li.active a{background:#F1F1F1;color:#000;padding-bottom:6px;margin-bottom:-1px;position:relative;z-index:1}.acf-fields>.acf-tab-wrap{background:#F9F9F9}.acf-fields>.acf-tab-wrap .acf-tab-group{position:relative;border-top:#ccd0d4 solid 1px;border-bottom:#ccd0d4 solid 1px;z-index:2;margin-bottom:-1px}.acf-fields>.acf-tab-wrap .acf-tab-group li a{background:#f1f1f1;border-color:#ccd0d4}.acf-fields>.acf-tab-wrap .acf-tab-group li a:hover{background:#FFF}.acf-fields>.acf-tab-wrap .acf-tab-group li.active a{background:#FFFFFF}.acf-admin-3-8 .acf-fields>.acf-tab-wrap .acf-tab-group{border-color:#dfdfdf}.acf-fields>.acf-tab-wrap:first-child .acf-tab-group{border-top:none}.acf-fields.-left>.acf-tab-wrap .acf-tab-group{padding-left:20%}@media screen and (max-width: 640px){.acf-fields.-left>.acf-tab-wrap .acf-tab-group{padding-left:10px}}html[dir="rtl"] .acf-fields.-left>.acf-tab-wrap .acf-tab-group{padding-left:0;padding-right:20%}@media screen and (max-width: 850px){html[dir="rtl"] .acf-fields.-left>.acf-tab-wrap .acf-tab-group{padding-right:10px}}.acf-tab-wrap.-left .acf-tab-group{position:absolute;left:0;width:20%;border:0 none;padding:0 !important;margin:1px 0 0}.acf-tab-wrap.-left .acf-tab-group li{float:none;margin:-1px 0 0}.acf-tab-wrap.-left .acf-tab-group li a{border:1px solid #ededed;font-size:13px;line-height:18px;color:#0073aa;padding:10px;margin:0;font-weight:normal;border-width:1px 0;border-radius:0;background:transparent}.acf-tab-wrap.-left .acf-tab-group li a:hover{color:#00a0d2}.acf-tab-wrap.-left .acf-tab-group li.active a{border-color:#DFDFDF;color:#000;margin-right:-1px;background:#fff}html[dir="rtl"] .acf-tab-wrap.-left .acf-tab-group{left:auto;right:0}html[dir="rtl"] .acf-tab-wrap.-left .acf-tab-group li.active a{margin-right:0;margin-left:-1px}.acf-field+.acf-tab-wrap.-left:before{content:"";display:block;position:relative;z-index:1;height:10px;border-top:#DFDFDF solid 1px;border-bottom:#DFDFDF solid 1px;margin-bottom:-1px}.acf-tab-wrap.-left:first-child .acf-tab-group li:first-child a{border-top:none}.acf-fields.-sidebar{padding:0 0 0 20% !important;position:relative}.acf-fields.-sidebar:before{content:"";display:block;position:absolute;top:0;left:0;width:20%;bottom:0;border-right:#DFDFDF solid 1px;background:#F9F9F9;z-index:1}html[dir="rtl"] .acf-fields.-sidebar{padding:0 20% 0 0 !important}html[dir="rtl"] .acf-fields.-sidebar:before{border-left:#DFDFDF solid 1px;border-right-width:0;left:auto;right:0}.acf-fields.-sidebar.-left{padding:0 0 0 180px !important}html[dir="rtl"] .acf-fields.-sidebar.-left{padding:0 180px 0 0 !important}.acf-fields.-sidebar.-left:before{background:#F1F1F1;border-color:#dfdfdf;width:180px}.acf-fields.-sidebar.-left>.acf-tab-wrap.-left .acf-tab-group{width:180px}.acf-fields.-sidebar.-left>.acf-tab-wrap.-left .acf-tab-group li a{border-color:#e4e4e4}.acf-fields.-sidebar.-left>.acf-tab-wrap.-left .acf-tab-group li.active a{background:#F9F9F9}.acf-fields.-sidebar>.acf-field-tab+.acf-field{border-top:none}.acf-fields.-clear>.acf-tab-wrap{background:transparent}.acf-fields.-clear>.acf-tab-wrap .acf-tab-group{margin-top:0;border-top:none;padding-left:0;padding-right:0}.acf-fields.-clear>.acf-tab-wrap .acf-tab-group li a{background:#e5e5e5}.acf-fields.-clear>.acf-tab-wrap .acf-tab-group li a:hover{background:#fff}.acf-fields.-clear>.acf-tab-wrap .acf-tab-group li.active a{background:#f1f1f1}.acf-postbox.seamless>.acf-fields.-sidebar{margin-left:0 !important}.acf-postbox.seamless>.acf-fields.-sidebar:before{background:transparent}.acf-postbox.seamless>.acf-fields>.acf-tab-wrap{background:transparent;margin-bottom:10px;padding-left:12px;padding-right:12px}.acf-postbox.seamless>.acf-fields>.acf-tab-wrap .acf-tab-group{border-top:0 none;border-color:#ccd0d4}.acf-postbox.seamless>.acf-fields>.acf-tab-wrap .acf-tab-group li a{background:#e5e5e5;border-color:#ccd0d4}.acf-postbox.seamless>.acf-fields>.acf-tab-wrap .acf-tab-group li a:hover{background:#fff}.acf-postbox.seamless>.acf-fields>.acf-tab-wrap .acf-tab-group li.active a{background:#f1f1f1}.acf-postbox.seamless>.acf-fields>.acf-tab-wrap.-left:before{border-top:none;height:auto}.acf-postbox.seamless>.acf-fields>.acf-tab-wrap.-left .acf-tab-group{margin-bottom:0}.acf-postbox.seamless>.acf-fields>.acf-tab-wrap.-left .acf-tab-group li a{border-width:1px 0 1px 1px !important;border-color:#cccccc;background:#e5e5e5}.acf-postbox.seamless>.acf-fields>.acf-tab-wrap.-left .acf-tab-group li.active a{background:#f1f1f1}.menu-edit .acf-fields.-clear>.acf-tab-wrap .acf-tab-group li a,.widget .acf-fields.-clear>.acf-tab-wrap .acf-tab-group li a{background:#f1f1f1}.menu-edit .acf-fields.-clear>.acf-tab-wrap .acf-tab-group li a:hover,.menu-edit .acf-fields.-clear>.acf-tab-wrap .acf-tab-group li.active a,.widget .acf-fields.-clear>.acf-tab-wrap .acf-tab-group li a:hover,.widget .acf-fields.-clear>.acf-tab-wrap .acf-tab-group li.active a{background:#fff}.compat-item .acf-tab-wrap td{display:block}.acf-gallery-side .acf-tab-wrap{border-top:0 none !important}.acf-gallery-side .acf-tab-wrap .acf-tab-group{margin:10px 0 !important;padding:0 !important}.acf-gallery-side .acf-tab-group li.active a{background:#F9F9F9 !important}.widget .acf-tab-group{border-bottom-color:#e8e8e8}.widget .acf-tab-group li a{background:#F1F1F1}.widget .acf-tab-group li.active a{background:#fff}.media-modal.acf-expanded .compat-attachment-fields>tbody>tr.acf-tab-wrap .acf-tab-group{padding-left:23%;border-bottom-color:#DDDDDD}.form-table>tbody>tr.acf-tab-wrap .acf-tab-group{padding:0 5px 0 210px}html[dir="rtl"] .form-table>tbody>tr.acf-tab-wrap .acf-tab-group{padding:0 210px 0 5px}.acf-oembed{position:relative;border:#ccd0d4 solid 1px;background:#fff}.acf-oembed .title{position:relative;border-bottom:#ccd0d4 solid 1px;padding:5px 10px}.acf-oembed .title .input-search{margin:0;font-size:14px;line-height:30px;height:30px;padding:0;border:0 none;box-shadow:none;border-radius:0;font-family:inherit;cursor:text}.acf-oembed .title .acf-actions{padding:6px}.acf-oembed .canvas{position:relative;min-height:250px;background:#F9F9F9}.acf-oembed .canvas .canvas-media{position:relative;z-index:1}.acf-oembed .canvas iframe{display:block;margin:0;padding:0;width:100%}.acf-oembed .canvas .acf-icon.-picture{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);z-index:0;height:42px;width:42px;font-size:42px;color:#999}.acf-oembed .canvas .acf-loading-overlay{background:rgba(255,255,255,0.9)}.acf-oembed .canvas .canvas-error{position:absolute;top:50%;left:0%;right:0%;margin:-9px 0 0 0;text-align:center;display:none}.acf-oembed .canvas .canvas-error p{padding:8px;margin:0;display:inline}.acf-oembed.has-value .canvas{min-height:50px}.acf-oembed.has-value .input-search{font-weight:bold}.acf-oembed.has-value .title:hover .acf-actions{display:block}.acf-image-uploader{position:relative}.acf-image-uploader:after{display:block;clear:both;content:""}.acf-image-uploader p{margin:0}.acf-image-uploader .image-wrap{position:relative;float:left}.acf-image-uploader .image-wrap img{max-width:100%;width:auto;height:auto;display:block;min-width:30px;min-height:30px;background:#f1f1f1;margin:0;padding:0}.acf-image-uploader .image-wrap img[src$=".svg"]{min-height:100px;min-width:100px}.acf-image-uploader .image-wrap:hover .acf-actions{display:block}.acf-image-uploader input.button{width:auto}html[dir="rtl"] .acf-image-uploader .image-wrap{float:right}.acf-file-uploader{position:relative}.acf-file-uploader p{margin:0}.acf-file-uploader .file-wrap{border:#ccd0d4 solid 1px;min-height:84px;position:relative;background:#fff}.acf-file-uploader .file-icon{position:absolute;top:0;left:0;bottom:0;padding:10px;background:#F1F1F1;border-right:#d5d9dd solid 1px}.acf-file-uploader .file-icon img{display:block;padding:0;margin:0;max-width:48px}.acf-file-uploader .file-info{padding:10px;margin-left:69px}.acf-file-uploader .file-info p{margin:0 0 2px;font-size:13px;line-height:1.4em;word-break:break-all}.acf-file-uploader .file-info a{text-decoration:none}.acf-file-uploader:hover .acf-actions{display:block}html[dir="rtl"] .acf-file-uploader .file-icon{left:auto;right:0;border-left:#E5E5E5 solid 1px;border-right:none}html[dir="rtl"] .acf-file-uploader .file-info{margin-right:69px;margin-left:0}.acf-ui-datepicker .ui-datepicker{z-index:900000 !important}.acf-ui-datepicker .ui-datepicker .ui-widget-header a{cursor:pointer;transition:none}.acf-ui-datepicker .ui-state-highlight.ui-state-hover{border:1px solid #98b7e8 !important;background:#98b7e8 !important;font-weight:normal !important;color:#ffffff !important}.acf-ui-datepicker .ui-state-highlight.ui-state-active{border:1px solid #3875d7 !important;background:#3875d7 !important;font-weight:normal !important;color:#ffffff !important}.acf-field-separator .acf-label{margin-bottom:0}.acf-field-separator .acf-label label{font-weight:normal}.acf-field-separator .acf-input{display:none}.acf-fields>.acf-field-separator{background:#f9f9f9;border-bottom:1px solid #dfdfdf;border-top:1px solid #dfdfdf;margin-bottom:-1px;z-index:2}.acf-taxonomy-field{position:relative}.acf-taxonomy-field .categorychecklist-holder{border:#ccd0d4 solid 1px;border-radius:3px;max-height:200px;overflow:auto}.acf-taxonomy-field .acf-checkbox-list{margin:0;padding:10px}.acf-taxonomy-field .acf-checkbox-list ul.children{padding-left:18px}.acf-taxonomy-field:hover .acf-actions{display:block}.acf-taxonomy-field[data-ftype="select"] .acf-actions{padding:0;margin:-9px}.acf-range-wrap .acf-append,.acf-range-wrap .acf-prepend{display:inline-block;vertical-align:middle;line-height:28px;margin:0 7px 0 0}.acf-range-wrap .acf-append{margin:0 0 0 7px}.acf-range-wrap input[type="range"]{display:inline-block;padding:0;margin:0;vertical-align:middle;height:28px}.acf-range-wrap input[type="range"]:focus{outline:none}.acf-range-wrap input[type="number"]{display:inline-block;min-width:3em;margin-left:10px;vertical-align:middle}html[dir="rtl"] .acf-range-wrap input[type="number"]{margin-right:10px;margin-left:0}html[dir="rtl"] .acf-range-wrap .acf-append{margin:0 7px 0 0}html[dir="rtl"] .acf-range-wrap .acf-prepend{margin:0 0 0 7px}.acf-accordion{margin:-1px 0;padding:0;background:#fff;border-top:1px solid #d5d9dd;border-bottom:1px solid #d5d9dd;z-index:1}.acf-accordion .acf-accordion-title{margin:0;padding:12px;font-weight:bold;cursor:pointer;font-size:inherit;font-size:13px;line-height:1.4em}.acf-accordion .acf-accordion-title:hover{background:#f3f4f5}.acf-accordion .acf-accordion-title label{margin:0;padding:0;font-size:13px;line-height:1.4em}.acf-accordion .acf-accordion-title p{font-weight:normal}.acf-accordion .acf-accordion-title .acf-accordion-icon{float:right}.acf-accordion .acf-accordion-content{margin:0;padding:0 12px 12px;display:none}.acf-accordion.-open>.acf-accordion-content{display:block}.acf-field.acf-accordion{margin:-1px 0;padding:0 !important;border-color:#d5d9dd}.acf-field.acf-accordion .acf-label.acf-accordion-title{padding:12px;width:auto;float:none;width:auto}.acf-field.acf-accordion .acf-input.acf-accordion-content{padding:0;float:none;width:auto}.acf-field.acf-accordion .acf-input.acf-accordion-content>.acf-fields{border-top:#eee solid 1px}.acf-field.acf-accordion .acf-input.acf-accordion-content>.acf-fields.-clear{padding:0 12px 15px}.acf-fields.-left>.acf-field.acf-accordion:before{display:none}.acf-fields.-left>.acf-field.acf-accordion .acf-accordion-title{width:auto;margin:0 !important;padding:12px;float:none !important}.acf-fields.-left>.acf-field.acf-accordion .acf-accordion-content{padding:0 !important}.acf-fields.-clear>.acf-field.acf-accordion{border:#cccccc solid 1px;background:transparent}.acf-fields.-clear>.acf-field.acf-accordion+.acf-field.acf-accordion{margin-top:-16px}tr.acf-field.acf-accordion{background:transparent}tr.acf-field.acf-accordion>.acf-input{padding:0 !important;border:#cccccc solid 1px}tr.acf-field.acf-accordion .acf-accordion-content{padding:0 12px 12px}#addtag div.acf-field.error{border:0 none;padding:8px 0}#addtag>.acf-field.acf-accordion{padding-right:0;margin-right:5%}#addtag>.acf-field.acf-accordion+p.submit{margin-top:0}tr.acf-accordion{margin:15px 0 !important}tr.acf-accordion+tr.acf-accordion{margin-top:-16px !important}.acf-postbox.seamless>.acf-fields>.acf-accordion{margin-left:12px;margin-right:12px;border:#ccd0d4 solid 1px}.widget .widget-content>.acf-field.acf-accordion{border:#dfdfdf solid 1px;margin-bottom:10px}.widget .widget-content>.acf-field.acf-accordion .acf-accordion-title{margin-bottom:0}.widget .widget-content>.acf-field.acf-accordion+.acf-field.acf-accordion{margin-top:-11px}.media-modal .compat-attachment-fields .acf-field.acf-accordion+.acf-field.acf-accordion{margin-top:-1px}.media-modal .compat-attachment-fields .acf-field.acf-accordion>.acf-input{width:100%}.media-modal .compat-attachment-fields .acf-field.acf-accordion .compat-attachment-fields>tbody>tr>td{padding-bottom:5px}.form-table>tbody>.acf-field>.acf-label{padding:20px 10px 20px 0;width:210px}html[dir="rtl"] .form-table>tbody>.acf-field>.acf-label{padding:20px 0 20px 10px}.form-table>tbody>.acf-field>.acf-label label{font-size:14px;color:#23282d}.form-table>tbody>.acf-field>.acf-input{padding:15px 10px}html[dir="rtl"] .form-table>tbody>.acf-field>.acf-input{padding:15px 10px 15px 5%}.form-table>tbody>.acf-tab-wrap td{padding:15px 5% 15px 0}html[dir="rtl"] .form-table>tbody>.acf-tab-wrap td{padding:15px 0 15px 5%}.form-table>tbody .form-table th.acf-th{width:auto}#your-profile .acf-field input[type="text"],#your-profile .acf-field input[type="password"],#your-profile .acf-field input[type="number"],#your-profile .acf-field input[type="search"],#your-profile .acf-field input[type="email"],#your-profile .acf-field input[type="url"],#your-profile .acf-field select,#createuser .acf-field input[type="text"],#createuser .acf-field input[type="password"],#createuser .acf-field input[type="number"],#createuser .acf-field input[type="search"],#createuser .acf-field input[type="email"],#createuser .acf-field input[type="url"],#createuser .acf-field select{max-width:25em}#your-profile .acf-field textarea,#createuser .acf-field textarea{max-width:500px}#your-profile .acf-field .acf-field input[type="text"],#your-profile .acf-field .acf-field input[type="password"],#your-profile .acf-field .acf-field input[type="number"],#your-profile .acf-field .acf-field input[type="search"],#your-profile .acf-field .acf-field input[type="email"],#your-profile .acf-field .acf-field input[type="url"],#your-profile .acf-field .acf-field textarea,#your-profile .acf-field .acf-field select,#createuser .acf-field .acf-field input[type="text"],#createuser .acf-field .acf-field input[type="password"],#createuser .acf-field .acf-field input[type="number"],#createuser .acf-field .acf-field input[type="search"],#createuser .acf-field .acf-field input[type="email"],#createuser .acf-field .acf-field input[type="url"],#createuser .acf-field .acf-field textarea,#createuser .acf-field .acf-field select{max-width:none}#registerform h2{margin:1em 0}#registerform .acf-field{margin-top:0}#registerform .acf-field .acf-label{margin-bottom:0}#registerform .acf-field .acf-label label{font-weight:normal;line-height:1.5}#registerform p.submit{text-align:right}#acf-term-fields{padding-right:5%}#acf-term-fields>.acf-field>.acf-label{margin:0}#acf-term-fields>.acf-field>.acf-label label{font-size:12px;font-weight:normal}p.submit .spinner,p.submit .acf-spinner{vertical-align:top;float:none;margin:4px 4px 0}#edittag .acf-fields.-left>.acf-field{padding-left:220px}#edittag .acf-fields.-left>.acf-field:before{width:209px}#edittag .acf-fields.-left>.acf-field>.acf-label{width:220px;margin-left:-220px;padding:0 10px}#edittag .acf-fields.-left>.acf-field>.acf-input{padding:0}#edittag>.acf-fields.-left{width:96%}#edittag>.acf-fields.-left>.acf-field>.acf-label{padding-left:0}.editcomment td:first-child{white-space:nowrap;width:131px}#widgets-right .widget .acf-field .description{padding-left:0;padding-right:0}.acf-widget-fields>.acf-field .acf-label{margin-bottom:5px}.acf-widget-fields>.acf-field .acf-label label{font-weight:normal;margin:0}.acf-menu-settings{border-top:1px solid #eee;margin-top:2em}.acf-menu-settings.-seamless{border-top:none;margin-top:15px}.acf-menu-settings.-seamless>h2{display:none}.acf-menu-settings .list li{display:block;margin-bottom:0}.acf-menu-item-fields{margin-right:10px;float:left}#post .compat-attachment-fields .compat-field-acf-form-data{display:none}#post .compat-attachment-fields,#post .compat-attachment-fields>tbody,#post .compat-attachment-fields>tbody>tr,#post .compat-attachment-fields>tbody>tr>th,#post .compat-attachment-fields>tbody>tr>td{display:block}#post .compat-attachment-fields>tbody>.acf-field{margin:15px 0}#post .compat-attachment-fields>tbody>.acf-field>.acf-label{margin:0}#post .compat-attachment-fields>tbody>.acf-field>.acf-label label{margin:0;padding:0}#post .compat-attachment-fields>tbody>.acf-field>.acf-label label p{margin:0 0 3px !important}#post .compat-attachment-fields>tbody>.acf-field>.acf-input{margin:0}.media-modal .compat-attachment-fields td.acf-input table{display:table;table-layout:auto}.media-modal .compat-attachment-fields td.acf-input table tbody{display:table-row-group}.media-modal .compat-attachment-fields td.acf-input table tr{display:table-row}.media-modal .compat-attachment-fields td.acf-input table td,.media-modal .compat-attachment-fields td.acf-input table th{display:table-cell}.media-modal .compat-attachment-fields>tbody>.acf-field{margin:5px 0}.media-modal .compat-attachment-fields>tbody>.acf-field>.acf-label{min-width:30%;margin:0;padding:0;float:left;text-align:right;display:block;float:left}.media-modal .compat-attachment-fields>tbody>.acf-field>.acf-label>label{padding-top:6px;margin:0;color:#666666;font-weight:400;line-height:16px}.media-modal .compat-attachment-fields>tbody>.acf-field>.acf-input{width:65%;margin:0;padding:0;float:right;display:block}.media-modal .compat-attachment-fields>tbody>.acf-field p.description{margin:0}.acf-selection-error{background:#ffebe8;border:1px solid #c00;border-radius:3px;padding:8px;margin:20px 0 0}.acf-selection-error .selection-error-label{background:#CC0000;border-radius:3px;color:#fff;font-weight:bold;margin-right:8px;padding:2px 4px}.acf-selection-error .selection-error-message{color:#b44;display:block;padding-top:8px;word-wrap:break-word;white-space:pre-wrap}.media-modal .attachment.acf-disabled .thumbnail{opacity:0.25 !important}.media-modal .attachment.acf-disabled .attachment-preview:before{background:rgba(0,0,0,0.15);z-index:1;position:relative}.media-modal .compat-field-acf-form-data,.media-modal .compat-field-acf-blank{display:none !important}.media-modal .upload-error-message{white-space:pre-wrap}.media-modal .acf-required{padding:0 !important;margin:0 !important;float:none !important;color:#f00 !important}.media-modal .media-sidebar .compat-item{padding-bottom:20px}@media (max-width: 900px){.media-modal .setting span,.media-modal .compat-attachment-fields>tbody>.acf-field>.acf-label{width:98%;float:none;text-align:left;min-height:0;padding:0}.media-modal .setting input,.media-modal .setting textarea,.media-modal .compat-attachment-fields>tbody>.acf-field>.acf-input{float:none;height:auto;max-width:none;width:98%}}.media-modal .acf-expand-details{float:right;padding:1px 10px;margin-right:6px;height:18px;line-height:18px;color:#AAAAAA;font-size:12px}.media-modal .acf-expand-details:focus,.media-modal .acf-expand-details:active{outline:0 none;box-shadow:none;color:#AAAAAA}.media-modal .acf-expand-details:hover{color:#666666 !important}.media-modal .acf-expand-details span{display:block;float:left}.media-modal .acf-expand-details .acf-icon{margin:0 4px 0 0}.media-modal .acf-expand-details:hover .acf-icon{border-color:#AAAAAA}.media-modal .acf-expand-details .is-open{display:none}.media-modal .acf-expand-details .is-closed{display:block}@media (max-width: 640px){.media-modal .acf-expand-details{display:none}}.media-modal.acf-expanded .acf-expand-details .is-open{display:block}.media-modal.acf-expanded .acf-expand-details .is-closed{display:none}.media-modal.acf-expanded .attachments-browser .media-toolbar,.media-modal.acf-expanded .attachments-browser .attachments{right:740px}.media-modal.acf-expanded .media-sidebar{width:708px}.media-modal.acf-expanded .media-sidebar .attachment-info .thumbnail{float:left;max-height:none}.media-modal.acf-expanded .media-sidebar .attachment-info .thumbnail img{max-width:100%;max-height:200px}.media-modal.acf-expanded .media-sidebar .attachment-info .details{float:right}.media-modal.acf-expanded .media-sidebar .attachment-info .thumbnail,.media-modal.acf-expanded .media-sidebar .attachment-details .setting .name,.media-modal.acf-expanded .media-sidebar .compat-attachment-fields>tbody>.acf-field>.acf-label{min-width:20%;margin-right:0}.media-modal.acf-expanded .media-sidebar .attachment-info .details,.media-modal.acf-expanded .media-sidebar .attachment-details .setting input,.media-modal.acf-expanded .media-sidebar .attachment-details .setting textarea,.media-modal.acf-expanded .media-sidebar .attachment-details .setting+.description,.media-modal.acf-expanded .media-sidebar .compat-attachment-fields>tbody>.acf-field>.acf-input{min-width:77%}@media (max-width: 900px){.media-modal.acf-expanded .attachments-browser .media-toolbar{display:none}.media-modal.acf-expanded .attachments{display:none}.media-modal.acf-expanded .media-sidebar{width:auto;max-width:none !important;bottom:0 !important}.media-modal.acf-expanded .media-sidebar .attachment-info .thumbnail{min-width:0;max-width:none;width:30%}.media-modal.acf-expanded .media-sidebar .attachment-info .details{min-width:0;max-width:none;width:67%}}@media (max-width: 640px){.media-modal.acf-expanded .media-sidebar .attachment-info .thumbnail,.media-modal.acf-expanded .media-sidebar .attachment-info .details{width:100%}}.acf-media-modal .media-embed .setting.align,.acf-media-modal .media-embed .setting.link-to{display:none}.acf-media-modal.-edit{left:15%;right:15%;top:100px;bottom:100px}.acf-media-modal.-edit .media-frame-menu,.acf-media-modal.-edit .media-frame-router,.acf-media-modal.-edit .media-frame-content .attachments,.acf-media-modal.-edit .media-frame-content .media-toolbar{display:none}.acf-media-modal.-edit .media-frame-title,.acf-media-modal.-edit .media-frame-content,.acf-media-modal.-edit .media-frame-toolbar,.acf-media-modal.-edit .media-sidebar{width:auto;left:0;right:0}.acf-media-modal.-edit .media-frame-content{top:50px}.acf-media-modal.-edit .media-frame-title{border-bottom:1px solid #DFDFDF;box-shadow:0 4px 4px -4px rgba(0,0,0,0.1)}.acf-media-modal.-edit .media-sidebar{padding:0 16px}.acf-media-modal.-edit .media-sidebar .attachment-details{overflow:visible}.acf-media-modal.-edit .media-sidebar .attachment-details>h3,.acf-media-modal.-edit .media-sidebar .attachment-details>h2{display:none}.acf-media-modal.-edit .media-sidebar .attachment-details .attachment-info{background:#fff;border-bottom:#dddddd solid 1px;padding:16px;margin:0 -16px 16px}.acf-media-modal.-edit .media-sidebar .attachment-details .thumbnail{margin:0 16px 0 0}.acf-media-modal.-edit .media-sidebar .attachment-details .setting{margin:0 0 5px}.acf-media-modal.-edit .media-sidebar .attachment-details .setting span{margin:0}.acf-media-modal.-edit .media-sidebar .compat-attachment-fields>tbody>.acf-field{margin:0 0 5px}.acf-media-modal.-edit .media-sidebar .compat-attachment-fields>tbody>.acf-field p.description{margin-top:3px}.acf-media-modal.-edit .media-sidebar .media-types-required-info{display:none}@media (max-width: 900px){.acf-media-modal.-edit{top:30px;right:30px;bottom:30px;left:30px}}@media (max-width: 640px){.acf-media-modal.-edit{top:0;right:0;bottom:0;left:0}}@media (max-width: 480px){.acf-media-modal.-edit .media-frame-content{top:40px}}.acf-temp-remove{position:relative;opacity:1;-webkit-transition:all 0.25s ease;-moz-transition:all 0.25s ease;-o-transition:all 0.25s ease;transition:all 0.25s ease;overflow:hidden}.acf-temp-remove:after{display:block;content:"";position:absolute;top:0;left:0;right:0;bottom:0;z-index:99}.hidden-by-conditional-logic{display:none !important}.hidden-by-conditional-logic.appear-empty{display:table-cell !important}.hidden-by-conditional-logic.appear-empty .acf-input{display:none !important}.acf-postbox.acf-hidden{display:none !important}#editor .edit-post-layout__metaboxes{padding:0}#editor .postbox{color:#444}#editor .postbox .handlediv{color:#191e23 !important;height:46px;width:auto;padding:0 14px 0 5px;position:relative;z-index:2}#editor .postbox .hndle{color:#191e23 !important;font-size:13px;line-height:normal;padding:15px}#editor .postbox .hndle:hover{background:#f2f4f5}#editor .postbox .hndle .acf-hndle-cog{line-height:16px}#editor .postbox .handlediv .toggle-indicator{color:inherit}#editor .postbox .handlediv .toggle-indicator:before{content:"\f343";font-size:18px;width:auto}#editor .postbox.closed .handlediv .toggle-indicator:before{content:"\f347"}
+.acf-field,.acf-field .acf-label,.acf-field .acf-input{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative}.acf-field{margin:15px 0;clear:both}.acf-field p.description{display:block;margin:0;padding:0}.acf-field .acf-label{vertical-align:top;margin:0 0 10px}.acf-field .acf-label label{display:block;font-weight:bold;margin:0 0 3px;padding:0}.acf-field .acf-label:empty{margin-bottom:0}.acf-field .acf-input{vertical-align:top}.acf-field .acf-input>p.description{margin-top:5px}.acf-field .acf-notice{margin:0 0 15px;background:#edf2ff;color:#2183b9;border-color:#2183b9}.acf-field .acf-notice.-error{background:#ffe6e6;color:#d12626;border-color:#d12626}.acf-field .acf-notice.-success{background:#eefbe8;color:#32a23b;border-color:#32a23b}.acf-field .acf-notice.-warning{background:#fff3e6;color:#d16226;border-color:#d16226}td.acf-field,tr.acf-field{margin:0}.acf-field[data-width]{float:left;clear:none}.acf-field[data-width]+.acf-field[data-width]{border-left:1px solid #eeeeee}html[dir="rtl"] .acf-field[data-width]{float:right}html[dir="rtl"] .acf-field[data-width]+.acf-field[data-width]{border-left:none;border-right:1px solid #eeeeee}td.acf-field[data-width],tr.acf-field[data-width]{float:none}.acf-field.-c0{clear:both;border-left-width:0 !important}html[dir="rtl"] .acf-field.-c0{border-left-width:1px !important;border-right-width:0 !important}.acf-field.-r0{border-top-width:0 !important}.acf-fields{position:relative}.acf-fields:after{display:block;clear:both;content:""}.acf-fields.-border{border:#ccd0d4 solid 1px;background:#fff}.acf-fields>.acf-field{position:relative;margin:0;padding:15px 12px;border-top:#EEEEEE solid 1px}.acf-fields>.acf-field:first-child{border-top:none;margin-top:0}td.acf-fields{padding:0 !important}.acf-fields.-clear>.acf-field{border:none;padding:0;margin:15px 0}.acf-fields.-clear>.acf-field[data-width]{border:none !important}.acf-fields.-clear>.acf-field>.acf-label{padding:0}.acf-fields.-clear>.acf-field>.acf-input{padding:0}.acf-fields.-left>.acf-field{padding:15px 0}.acf-fields.-left>.acf-field:after{display:block;clear:both;content:""}.acf-fields.-left>.acf-field:before{content:"";display:block;position:absolute;z-index:0;background:#F9F9F9;border-color:#E1E1E1;border-style:solid;border-width:0 1px 0 0;top:0;bottom:0;left:0;width:20%}.acf-fields.-left>.acf-field[data-width]{float:none;width:auto !important;border-left-width:0 !important;border-right-width:0 !important}.acf-fields.-left>.acf-field>.acf-label{float:left;width:20%;margin:0;padding:0 12px}.acf-fields.-left>.acf-field>.acf-input{float:left;width:80%;margin:0;padding:0 12px}html[dir="rtl"] .acf-fields.-left>.acf-field:before{border-width:0 0 0 1px;left:auto;right:0}html[dir="rtl"] .acf-fields.-left>.acf-field>.acf-label{float:right}html[dir="rtl"] .acf-fields.-left>.acf-field>.acf-input{float:right}#side-sortables .acf-fields.-left>.acf-field:before{display:none}#side-sortables .acf-fields.-left>.acf-field>.acf-label{width:100%;margin-bottom:10px}#side-sortables .acf-fields.-left>.acf-field>.acf-input{width:100%}@media screen and (max-width: 640px){.acf-fields.-left>.acf-field:before{display:none}.acf-fields.-left>.acf-field>.acf-label{width:100%;margin-bottom:10px}.acf-fields.-left>.acf-field>.acf-input{width:100%}}.acf-fields.-clear.-left>.acf-field{padding:0;border:none}.acf-fields.-clear.-left>.acf-field:before{display:none}.acf-fields.-clear.-left>.acf-field>.acf-label{padding:0}.acf-fields.-clear.-left>.acf-field>.acf-input{padding:0}.acf-table tr.acf-field>td.acf-label{padding:15px 12px;margin:0;background:#F9F9F9;width:20%}.acf-table tr.acf-field>td.acf-input{padding:15px 12px;margin:0;border-left-color:#E1E1E1}.acf-sortable-tr-helper{position:relative !important;display:table-row !important}.acf-postbox{position:relative}.acf-postbox>.inside{margin:0 !important;padding:0 !important}.acf-postbox .acf-hndle-cog{color:#72777c;font-size:16px;line-height:36px;height:36px;width:1.62rem;position:relative;display:none}.acf-postbox .acf-hndle-cog:hover{color:#191e23}.acf-postbox>.hndle:hover .acf-hndle-cog,.acf-postbox>.postbox-header:hover .acf-hndle-cog{display:inline-block}.acf-postbox>.hndle .acf-hndle-cog{height:20px;line-height:20px;float:right;width:auto}.acf-postbox>.hndle .acf-hndle-cog:hover{color:#777777}.acf-postbox .acf-replace-with-fields{padding:15px;text-align:center}#post-body-content #acf_after_title-sortables{margin:20px 0 -20px}.acf-postbox.seamless{border:0 none;background:transparent;box-shadow:none}.acf-postbox.seamless>.postbox-header,.acf-postbox.seamless>.hndle,.acf-postbox.seamless>.handlediv{display:none !important}.acf-postbox.seamless>.inside{display:block !important;margin-left:-12px !important;margin-right:-12px !important}.acf-postbox.seamless>.inside>.acf-field{border-color:transparent}.acf-postbox.seamless>.acf-fields.-left>.acf-field:before{display:none}@media screen and (max-width: 782px){.acf-postbox.seamless>.acf-fields.-left>.acf-field>.acf-label,.acf-postbox.seamless>.acf-fields.-left>.acf-field>.acf-input{padding:0}}.acf-field input[type="text"],.acf-field input[type="password"],.acf-field input[type="date"],.acf-field input[type="datetime"],.acf-field input[type="datetime-local"],.acf-field input[type="email"],.acf-field input[type="month"],.acf-field input[type="number"],.acf-field input[type="search"],.acf-field input[type="tel"],.acf-field input[type="time"],.acf-field input[type="url"],.acf-field input[type="week"],.acf-field textarea,.acf-field select{width:100%;padding:4px 8px;margin:0;box-sizing:border-box;font-size:14px;line-height:1.4}.acf-admin-3-8 .acf-field input[type="text"],.acf-admin-3-8 .acf-field input[type="password"],.acf-admin-3-8 .acf-field input[type="date"],.acf-admin-3-8 .acf-field input[type="datetime"],.acf-admin-3-8 .acf-field input[type="datetime-local"],.acf-admin-3-8 .acf-field input[type="email"],.acf-admin-3-8 .acf-field input[type="month"],.acf-admin-3-8 .acf-field input[type="number"],.acf-admin-3-8 .acf-field input[type="search"],.acf-admin-3-8 .acf-field input[type="tel"],.acf-admin-3-8 .acf-field input[type="time"],.acf-admin-3-8 .acf-field input[type="url"],.acf-admin-3-8 .acf-field input[type="week"],.acf-admin-3-8 .acf-field textarea,.acf-admin-3-8 .acf-field select{padding:3px 5px}.acf-field textarea{resize:vertical}body.acf-browser-firefox .acf-field select{padding:4px 5px}.acf-input-prepend,.acf-input-append,.acf-input-wrap{box-sizing:border-box}.acf-input-prepend,.acf-input-append{font-size:14px;line-height:1.4;padding:4px 8px;background:#f5f5f5;border:#7e8993 solid 1px;min-height:30px}.acf-admin-3-8 .acf-input-prepend,.acf-admin-3-8 .acf-input-append{padding:3px 5px;border-color:#ddd;min-height:28px}.acf-input-prepend{float:left;border-right-width:0;border-radius:3px 0 0 3px}.acf-input-append{float:right;border-left-width:0;border-radius:0 3px 3px 0}.acf-input-wrap{position:relative;overflow:hidden}.acf-input-wrap .acf-is-prepended{border-radius:0 3px 3px 0 !important}.acf-input-wrap acf-is-appended{border-radius:3px 0 0 3px !important}.acf-input-wrap .acf-is-prepended.acf-is-appended{border-radius:0 !important}html[dir="rtl"] .acf-input-prepend{border-left-width:0;border-right-width:1px;border-radius:0 3px 3px 0;float:right}html[dir="rtl"] .acf-input-append{border-left-width:1px;border-right-width:0;border-radius:3px 0 0 3px;float:left}html[dir="rtl"] input.acf-is-prepended{border-radius:3px 0 0 3px !important}html[dir="rtl"] input.acf-is-appended{border-radius:0 3px 3px 0 !important}html[dir="rtl"] input.acf-is-prepended.acf-is-appended{border-radius:0 !important}.acf-color-picker .wp-color-result{border-color:#7e8993}.acf-admin-3-8 .acf-color-picker .wp-color-result{border-color:#ccd0d4}.acf-color-picker .wp-picker-active{position:relative;z-index:1}.acf-url i{position:absolute;top:5px;left:5px;opacity:0.5;color:#7e8993}.acf-url input[type="url"]{padding-left:27px !important}.acf-url.-valid i{opacity:1}.select2-container.-acf .select2-choices{background:#fff;border-color:#ddd;box-shadow:0 1px 2px rgba(0,0,0,0.07) inset;min-height:31px}.select2-container.-acf .select2-choices .select2-search-choice{margin:5px 0 5px 5px;padding:3px 5px 3px 18px;border-color:#bbb;background:#f9f9f9;box-shadow:0 1px 0 rgba(255,255,255,0.25) inset}.select2-container.-acf .select2-choices .select2-search-choice.ui-sortable-helper{background:#5897fb;border-color:#3f87fa;color:#fff;box-shadow:0 0 3px rgba(0,0,0,0.1)}.select2-container.-acf .select2-choices .select2-search-choice.ui-sortable-helper a{visibility:hidden}.select2-container.-acf .select2-choices .select2-search-choice.ui-sortable-placeholder{background-color:#f7f7f7;border-color:#f7f7f7;visibility:visible !important}.select2-container.-acf .select2-choices .select2-search-choice-focus{border-color:#999}.select2-container.-acf .select2-choices .select2-search-field input{height:31px;line-height:22px;margin:0;padding:5px 5px 5px 7px}.select2-container.-acf .select2-choice{border-color:#BBBBBB}.select2-container.-acf .select2-choice .select2-arrow{background:transparent;border-left-color:#DFDFDF;padding-left:1px}.select2-container.-acf .select2-choice .select2-result-description{display:none}.select2-container.-acf.select2-container-active .select2-choices,.select2-container.-acf.select2-dropdown-open .select2-choices{border-color:#5B9DD9;border-radius:3px 3px 0 0}.select2-container.-acf.select2-dropdown-open .select2-choice{background:#fff;border-color:#5B9DD9}html[dir="rtl"] .select2-container.-acf .select2-search-choice-close{left:24px}html[dir="rtl"] .select2-container.-acf .select2-choice>.select2-chosen{margin-left:42px}html[dir="rtl"] .select2-container.-acf .select2-choice .select2-arrow{padding-left:0;padding-right:1px}.select2-drop .select2-search{padding:4px 4px 0}.select2-drop .select2-result .select2-result-description{color:#999;font-size:12px;margin-left:5px}.select2-drop .select2-result.select2-highlighted .select2-result-description{color:#fff;opacity:0.75}.select2-container.-acf li{margin-bottom:0}.select2-container.-acf .select2-selection{border-color:#7e8993}.acf-admin-3-8 .select2-container.-acf .select2-selection{border-color:#aaa}.select2-container.-acf .select2-selection--multiple .select2-search--inline:first-child{float:none}.select2-container.-acf .select2-selection--multiple .select2-search--inline:first-child input{width:100% !important}.select2-container.-acf .select2-selection--multiple .select2-selection__rendered{padding-right:0}.select2-container.-acf .select2-selection--multiple .select2-selection__choice{background-color:#f7f7f7;border-color:#cccccc;max-width:100%;overflow:hidden;word-wrap:normal !important;white-space:normal}.select2-container.-acf .select2-selection--multiple .select2-selection__choice.ui-sortable-helper{background:#5897fb;border-color:#3f87fa;color:#fff;box-shadow:0 0 3px rgba(0,0,0,0.1)}.select2-container.-acf .select2-selection--multiple .select2-selection__choice.ui-sortable-helper span{visibility:hidden}.select2-container.-acf .select2-selection--multiple .select2-selection__choice.ui-sortable-placeholder{background-color:#f7f7f7;border-color:#f7f7f7;visibility:visible !important}.select2-container.-acf .select2-selection--multiple .select2-search__field{box-shadow:none !important;min-height:0}.acf-row .select2-container.-acf .select2-selection--single{overflow:hidden}.acf-row .select2-container.-acf .select2-selection--single .select2-selection__rendered{white-space:normal}.select2-container .select2-dropdown{z-index:900000}.select2-container .select2-dropdown .select2-search__field{line-height:1.4;min-height:0}.acf-link .link-wrap{display:none;border:#ccd0d4 solid 1px;border-radius:3px;padding:5px;line-height:26px;background:#fff;word-wrap:break-word;word-break:break-all}.acf-link .link-wrap .link-title{padding:0 5px}.acf-link.-value .button{display:none}.acf-link.-value .acf-icon.-link-ext{display:none}.acf-link.-value .link-wrap{display:inline-block}.acf-link.-external .acf-icon.-link-ext{display:inline-block}#wp-link-backdrop{z-index:900000 !important}#wp-link-wrap{z-index:900001 !important}ul.acf-radio-list,ul.acf-checkbox-list{background:transparent;position:relative;padding:1px;margin:0}ul.acf-radio-list li,ul.acf-checkbox-list li{font-size:13px;line-height:22px;margin:0;position:relative;word-wrap:break-word}ul.acf-radio-list li label,ul.acf-checkbox-list li label{display:inline}ul.acf-radio-list li input[type="checkbox"],ul.acf-radio-list li input[type="radio"],ul.acf-checkbox-list li input[type="checkbox"],ul.acf-checkbox-list li input[type="radio"]{margin:-1px 4px 0 0;vertical-align:middle}ul.acf-radio-list li input[type="text"],ul.acf-checkbox-list li input[type="text"]{width:auto;vertical-align:middle;margin:2px 0}ul.acf-radio-list li span,ul.acf-checkbox-list li span{float:none}ul.acf-radio-list li i,ul.acf-checkbox-list li i{vertical-align:middle}ul.acf-radio-list.acf-hl li,ul.acf-checkbox-list.acf-hl li{margin-right:20px;clear:none}html[dir="rtl"] ul.acf-radio-list input[type="checkbox"],html[dir="rtl"] ul.acf-radio-list input[type="radio"],html[dir="rtl"] ul.acf-checkbox-list input[type="checkbox"],html[dir="rtl"] ul.acf-checkbox-list input[type="radio"]{margin-left:4px;margin-right:0}.acf-button-group{display:inline-block}.acf-button-group label{display:inline-block;border:#7e8993 solid 1px;position:relative;z-index:1;padding:5px 10px;background:#fff}.acf-button-group label:hover{color:#016087;background:#f3f5f6;border-color:#0071a1;z-index:2}.acf-button-group label.selected{border-color:#007cba;background:#008dd4;color:#fff;z-index:2}.acf-button-group input{display:none !important}.acf-button-group{padding-left:1px;display:inline-flex;flex-direction:row;flex-wrap:nowrap}.acf-button-group label{margin:0 0 0 -1px;flex:1;text-align:center;white-space:nowrap}.acf-button-group label:first-child{border-radius:3px 0 0 3px}html[dir="rtl"] .acf-button-group label:first-child{border-radius:0 3px 3px 0}.acf-button-group label:last-child{border-radius:0 3px 3px 0}html[dir="rtl"] .acf-button-group label:last-child{border-radius:3px 0 0 3px}.acf-button-group label:only-child{border-radius:3px}.acf-button-group.-vertical{padding-left:0;padding-top:1px;flex-direction:column}.acf-button-group.-vertical label{margin:-1px 0 0 0}.acf-button-group.-vertical label:first-child{border-radius:3px 3px 0 0}.acf-button-group.-vertical label:last-child{border-radius:0 0 3px 3px}.acf-button-group.-vertical label:only-child{border-radius:3px}.acf-admin-3-8 .acf-button-group label{border-color:#ccd0d4}.acf-admin-3-8 .acf-button-group label:hover{border-color:#0071a1}.acf-admin-3-8 .acf-button-group label.selected{border-color:#007cba}.acf-checkbox-list .button{margin:10px 0 0}.acf-switch{display:inline-block;border-radius:5px;cursor:pointer;position:relative;background:#f5f5f5;height:30px;vertical-align:middle;border:#7e8993 solid 1px;-webkit-transition:background 0.25s ease;-moz-transition:background 0.25s ease;-o-transition:background 0.25s ease;transition:background 0.25s ease}.acf-switch span{display:inline-block;float:left;text-align:center;font-size:13px;line-height:22px;padding:4px 10px;min-width:15px}.acf-switch span i{vertical-align:middle}.acf-switch .acf-switch-on{color:#fff;text-shadow:#007cba 0 1px 0}.acf-switch .acf-switch-slider{position:absolute;top:2px;left:2px;bottom:2px;right:50%;z-index:1;background:#fff;border-radius:3px;border:#7e8993 solid 1px;-webkit-transition:all 0.25s ease;-moz-transition:all 0.25s ease;-o-transition:all 0.25s ease;transition:all 0.25s ease;transition-property:left, right}.acf-switch:hover,.acf-switch.-focus{border-color:#0071a1;background:#f3f5f6;color:#016087}.acf-switch:hover .acf-switch-slider,.acf-switch.-focus .acf-switch-slider{border-color:#0071a1}.acf-switch.-on{background:#0d99d5;border-color:#007cba}.acf-switch.-on .acf-switch-slider{left:50%;right:2px;border-color:#007cba}.acf-switch.-on:hover{border-color:#007cba}.acf-switch+span{margin-left:6px}.acf-admin-3-8 .acf-switch{border-color:#ccd0d4}.acf-admin-3-8 .acf-switch .acf-switch-slider{border-color:#ccd0d4}.acf-admin-3-8 .acf-switch:hover,.acf-admin-3-8 .acf-switch.-focus{border-color:#0071a1}.acf-admin-3-8 .acf-switch:hover .acf-switch-slider,.acf-admin-3-8 .acf-switch.-focus .acf-switch-slider{border-color:#0071a1}.acf-admin-3-8 .acf-switch.-on{border-color:#007cba}.acf-admin-3-8 .acf-switch.-on .acf-switch-slider{border-color:#007cba}.acf-admin-3-8 .acf-switch.-on:hover{border-color:#007cba}.acf-switch-input{opacity:0;position:absolute;margin:0}.compat-item .acf-true-false .message{float:none;padding:0;vertical-align:middle}.acf-google-map{position:relative;border:#ccd0d4 solid 1px;background:#fff}.acf-google-map .title{position:relative;border-bottom:#ccd0d4 solid 1px}.acf-google-map .title .search{margin:0;font-size:14px;line-height:30px;height:40px;padding:5px 10px;border:0 none;box-shadow:none;border-radius:0;font-family:inherit;cursor:text}.acf-google-map .title .acf-loading{position:absolute;top:10px;right:11px;display:none}.acf-google-map .title .acf-icon:active{display:inline-block !important}.acf-google-map .canvas{height:400px}.acf-google-map:hover .title .acf-actions{display:block}.acf-google-map .title .acf-icon.-location{display:inline-block}.acf-google-map .title .acf-icon.-cancel,.acf-google-map .title .acf-icon.-search{display:none}.acf-google-map.-value .title .search{font-weight:bold}.acf-google-map.-value .title .acf-icon.-location{display:none}.acf-google-map.-value .title .acf-icon.-cancel{display:inline-block}.acf-google-map.-searching .title .acf-icon.-location{display:none}.acf-google-map.-searching .title .acf-icon.-cancel,.acf-google-map.-searching .title .acf-icon.-search{display:inline-block}.acf-google-map.-searching .title .acf-actions{display:block}.acf-google-map.-searching .title .search{font-weight:normal !important}.acf-google-map.-loading .title a{display:none !important}.acf-google-map.-loading .title i{display:inline-block}.pac-container{border-width:1px 0;box-shadow:none}.pac-container:after{display:none}.pac-container .pac-item:first-child{border-top:0 none}.pac-container .pac-item{padding:5px 10px;cursor:pointer}html[dir="rtl"] .pac-container .pac-item{text-align:right}.acf-relationship{background:#fff;border:#ccd0d4 solid 1px}.acf-relationship .filters{border-bottom:#ccd0d4 solid 1px;background:#fff}.acf-relationship .filters:after{display:block;clear:both;content:""}.acf-relationship .filters .filter{margin:0;padding:0;float:left;width:100%;box-sizing:border-box;padding:7px 7px 7px 0}.acf-relationship .filters .filter:first-child{padding-left:7px}.acf-relationship .filters .filter input,.acf-relationship .filters .filter select{margin:0;float:none}.acf-relationship .filters .filter input:focus,.acf-relationship .filters .filter input:active,.acf-relationship .filters .filter select:focus,.acf-relationship .filters .filter select:active{outline:none;box-shadow:none}.acf-relationship .filters .filter input{border-color:transparent;box-shadow:none;padding-left:3px;padding-right:3px}.acf-relationship .filters.-f2 .filter{width:50%}.acf-relationship .filters.-f3 .filter{width:25%}.acf-relationship .filters.-f3 .filter.-search{width:50%}.acf-relationship .list{margin:0;padding:5px;height:160px;overflow:auto}.acf-relationship .list .acf-rel-label,.acf-relationship .list .acf-rel-item,.acf-relationship .list p{padding:5px;margin:0;display:block;position:relative;min-height:18px}.acf-relationship .list .acf-rel-label{font-weight:bold}.acf-relationship .list .acf-rel-item{cursor:pointer}.acf-relationship .list .acf-rel-item b{text-decoration:underline;font-weight:normal}.acf-relationship .list .acf-rel-item .thumbnail{background:#e0e0e0;width:22px;height:22px;float:left;margin:-2px 5px 0 0}.acf-relationship .list .acf-rel-item .thumbnail img{max-width:22px;max-height:22px;margin:0 auto;display:block}.acf-relationship .list .acf-rel-item .thumbnail.-icon{background:#fff}.acf-relationship .list .acf-rel-item .thumbnail.-icon img{max-height:20px;margin-top:1px}.acf-relationship .list .acf-rel-item:hover{background:#3875D7;color:#fff}.acf-relationship .list .acf-rel-item:hover .thumbnail{background:#a2bfec}.acf-relationship .list .acf-rel-item:hover .thumbnail.-icon{background:#fff}.acf-relationship .list .acf-rel-item.disabled{opacity:0.5}.acf-relationship .list .acf-rel-item.disabled:hover{background:transparent;color:#333;cursor:default}.acf-relationship .list .acf-rel-item.disabled:hover .thumbnail{background:#e0e0e0}.acf-relationship .list .acf-rel-item.disabled:hover .thumbnail.-icon{background:#fff}.acf-relationship .list ul{padding-bottom:5px}.acf-relationship .list ul .acf-rel-label,.acf-relationship .list ul .acf-rel-item,.acf-relationship .list ul p{padding-left:20px}.acf-relationship .selection{position:relative}.acf-relationship .selection:after{display:block;clear:both;content:""}.acf-relationship .selection .values,.acf-relationship .selection .choices{width:50%;background:#fff;float:left}.acf-relationship .selection .choices{background:#F9F9F9}.acf-relationship .selection .choices .list{border-right:#DFDFDF solid 1px}.acf-relationship .selection .values .acf-icon{position:absolute;top:4px;right:7px;display:none}html[dir="rtl"] .acf-relationship .selection .values .acf-icon{right:auto;left:7px}.acf-relationship .selection .values .acf-rel-item:hover .acf-icon{display:block}.acf-relationship .selection .values .acf-rel-item{cursor:move}.acf-relationship .selection .values .acf-rel-item b{text-decoration:none}.menu-item .acf-relationship ul{width:auto}.menu-item .acf-relationship li{display:block}.acf-editor-wrap.delay .acf-editor-toolbar{content:"";display:block;background:#f5f5f5;border-bottom:#dddddd solid 1px;color:#555d66;padding:10px}.acf-editor-wrap.delay .wp-editor-area{padding:10px;border:none;color:inherit !important}.acf-editor-wrap iframe{min-height:200px}.acf-editor-wrap .wp-editor-container{border:1px solid #ccd0d4;box-shadow:none !important}.acf-editor-wrap .wp-editor-tabs{box-sizing:content-box}.acf-editor-wrap .wp-switch-editor{border-color:#ccd0d4;border-bottom-color:transparent}#mce_fullscreen_container{z-index:900000 !important}.acf-field-tab{display:none !important}.hidden-by-tab{display:none !important}.acf-tab-wrap{clear:both;z-index:1}.acf-tab-group{border-bottom:#ccc solid 1px;padding:10px 10px 0}.acf-tab-group li{margin:0 0.5em 0 0}.acf-tab-group li a{padding:5px 10px;display:block;color:#555;font-size:14px;font-weight:600;line-height:24px;border:#ccc solid 1px;border-bottom:0 none;text-decoration:none;background:#e5e5e5;transition:none}.acf-tab-group li a:hover{background:#FFF}.acf-tab-group li a:focus{outline:none;box-shadow:none}.acf-tab-group li a:empty{display:none}html[dir="rtl"] .acf-tab-group li{margin:0 0 0 0.5em}.acf-tab-group li.active a{background:#F1F1F1;color:#000;padding-bottom:6px;margin-bottom:-1px;position:relative;z-index:1}.acf-fields>.acf-tab-wrap{background:#F9F9F9}.acf-fields>.acf-tab-wrap .acf-tab-group{position:relative;border-top:#ccd0d4 solid 1px;border-bottom:#ccd0d4 solid 1px;z-index:2;margin-bottom:-1px}.acf-fields>.acf-tab-wrap .acf-tab-group li a{background:#f1f1f1;border-color:#ccd0d4}.acf-fields>.acf-tab-wrap .acf-tab-group li a:hover{background:#FFF}.acf-fields>.acf-tab-wrap .acf-tab-group li.active a{background:#FFFFFF}.acf-admin-3-8 .acf-fields>.acf-tab-wrap .acf-tab-group{border-color:#dfdfdf}.acf-fields>.acf-tab-wrap:first-child .acf-tab-group{border-top:none}.acf-fields.-left>.acf-tab-wrap .acf-tab-group{padding-left:20%}@media screen and (max-width: 640px){.acf-fields.-left>.acf-tab-wrap .acf-tab-group{padding-left:10px}}html[dir="rtl"] .acf-fields.-left>.acf-tab-wrap .acf-tab-group{padding-left:0;padding-right:20%}@media screen and (max-width: 850px){html[dir="rtl"] .acf-fields.-left>.acf-tab-wrap .acf-tab-group{padding-right:10px}}.acf-tab-wrap.-left .acf-tab-group{position:absolute;left:0;width:20%;border:0 none;padding:0 !important;margin:1px 0 0}.acf-tab-wrap.-left .acf-tab-group li{float:none;margin:-1px 0 0}.acf-tab-wrap.-left .acf-tab-group li a{border:1px solid #ededed;font-size:13px;line-height:18px;color:#0073aa;padding:10px;margin:0;font-weight:normal;border-width:1px 0;border-radius:0;background:transparent}.acf-tab-wrap.-left .acf-tab-group li a:hover{color:#00a0d2}.acf-tab-wrap.-left .acf-tab-group li.active a{border-color:#DFDFDF;color:#000;margin-right:-1px;background:#fff}html[dir="rtl"] .acf-tab-wrap.-left .acf-tab-group{left:auto;right:0}html[dir="rtl"] .acf-tab-wrap.-left .acf-tab-group li.active a{margin-right:0;margin-left:-1px}.acf-field+.acf-tab-wrap.-left:before{content:"";display:block;position:relative;z-index:1;height:10px;border-top:#DFDFDF solid 1px;border-bottom:#DFDFDF solid 1px;margin-bottom:-1px}.acf-tab-wrap.-left:first-child .acf-tab-group li:first-child a{border-top:none}.acf-fields.-sidebar{padding:0 0 0 20% !important;position:relative}.acf-fields.-sidebar:before{content:"";display:block;position:absolute;top:0;left:0;width:20%;bottom:0;border-right:#DFDFDF solid 1px;background:#F9F9F9;z-index:1}html[dir="rtl"] .acf-fields.-sidebar{padding:0 20% 0 0 !important}html[dir="rtl"] .acf-fields.-sidebar:before{border-left:#DFDFDF solid 1px;border-right-width:0;left:auto;right:0}.acf-fields.-sidebar.-left{padding:0 0 0 180px !important}html[dir="rtl"] .acf-fields.-sidebar.-left{padding:0 180px 0 0 !important}.acf-fields.-sidebar.-left:before{background:#F1F1F1;border-color:#dfdfdf;width:180px}.acf-fields.-sidebar.-left>.acf-tab-wrap.-left .acf-tab-group{width:180px}.acf-fields.-sidebar.-left>.acf-tab-wrap.-left .acf-tab-group li a{border-color:#e4e4e4}.acf-fields.-sidebar.-left>.acf-tab-wrap.-left .acf-tab-group li.active a{background:#F9F9F9}.acf-fields.-sidebar>.acf-field-tab+.acf-field{border-top:none}.acf-fields.-clear>.acf-tab-wrap{background:transparent}.acf-fields.-clear>.acf-tab-wrap .acf-tab-group{margin-top:0;border-top:none;padding-left:0;padding-right:0}.acf-fields.-clear>.acf-tab-wrap .acf-tab-group li a{background:#e5e5e5}.acf-fields.-clear>.acf-tab-wrap .acf-tab-group li a:hover{background:#fff}.acf-fields.-clear>.acf-tab-wrap .acf-tab-group li.active a{background:#f1f1f1}.acf-postbox.seamless>.acf-fields.-sidebar{margin-left:0 !important}.acf-postbox.seamless>.acf-fields.-sidebar:before{background:transparent}.acf-postbox.seamless>.acf-fields>.acf-tab-wrap{background:transparent;margin-bottom:10px;padding-left:12px;padding-right:12px}.acf-postbox.seamless>.acf-fields>.acf-tab-wrap .acf-tab-group{border-top:0 none;border-color:#ccd0d4}.acf-postbox.seamless>.acf-fields>.acf-tab-wrap .acf-tab-group li a{background:#e5e5e5;border-color:#ccd0d4}.acf-postbox.seamless>.acf-fields>.acf-tab-wrap .acf-tab-group li a:hover{background:#fff}.acf-postbox.seamless>.acf-fields>.acf-tab-wrap .acf-tab-group li.active a{background:#f1f1f1}.acf-postbox.seamless>.acf-fields>.acf-tab-wrap.-left:before{border-top:none;height:auto}.acf-postbox.seamless>.acf-fields>.acf-tab-wrap.-left .acf-tab-group{margin-bottom:0}.acf-postbox.seamless>.acf-fields>.acf-tab-wrap.-left .acf-tab-group li a{border-width:1px 0 1px 1px !important;border-color:#cccccc;background:#e5e5e5}.acf-postbox.seamless>.acf-fields>.acf-tab-wrap.-left .acf-tab-group li.active a{background:#f1f1f1}.menu-edit .acf-fields.-clear>.acf-tab-wrap .acf-tab-group li a,.widget .acf-fields.-clear>.acf-tab-wrap .acf-tab-group li a{background:#f1f1f1}.menu-edit .acf-fields.-clear>.acf-tab-wrap .acf-tab-group li a:hover,.menu-edit .acf-fields.-clear>.acf-tab-wrap .acf-tab-group li.active a,.widget .acf-fields.-clear>.acf-tab-wrap .acf-tab-group li a:hover,.widget .acf-fields.-clear>.acf-tab-wrap .acf-tab-group li.active a{background:#fff}.compat-item .acf-tab-wrap td{display:block}.acf-gallery-side .acf-tab-wrap{border-top:0 none !important}.acf-gallery-side .acf-tab-wrap .acf-tab-group{margin:10px 0 !important;padding:0 !important}.acf-gallery-side .acf-tab-group li.active a{background:#F9F9F9 !important}.widget .acf-tab-group{border-bottom-color:#e8e8e8}.widget .acf-tab-group li a{background:#F1F1F1}.widget .acf-tab-group li.active a{background:#fff}.media-modal.acf-expanded .compat-attachment-fields>tbody>tr.acf-tab-wrap .acf-tab-group{padding-left:23%;border-bottom-color:#DDDDDD}.form-table>tbody>tr.acf-tab-wrap .acf-tab-group{padding:0 5px 0 210px}html[dir="rtl"] .form-table>tbody>tr.acf-tab-wrap .acf-tab-group{padding:0 210px 0 5px}.acf-oembed{position:relative;border:#ccd0d4 solid 1px;background:#fff}.acf-oembed .title{position:relative;border-bottom:#ccd0d4 solid 1px;padding:5px 10px}.acf-oembed .title .input-search{margin:0;font-size:14px;line-height:30px;height:30px;padding:0;border:0 none;box-shadow:none;border-radius:0;font-family:inherit;cursor:text}.acf-oembed .title .acf-actions{padding:6px}.acf-oembed .canvas{position:relative;min-height:250px;background:#F9F9F9}.acf-oembed .canvas .canvas-media{position:relative;z-index:1}.acf-oembed .canvas iframe{display:block;margin:0;padding:0;width:100%}.acf-oembed .canvas .acf-icon.-picture{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);z-index:0;height:42px;width:42px;font-size:42px;color:#999}.acf-oembed .canvas .acf-loading-overlay{background:rgba(255,255,255,0.9)}.acf-oembed .canvas .canvas-error{position:absolute;top:50%;left:0%;right:0%;margin:-9px 0 0 0;text-align:center;display:none}.acf-oembed .canvas .canvas-error p{padding:8px;margin:0;display:inline}.acf-oembed.has-value .canvas{min-height:50px}.acf-oembed.has-value .input-search{font-weight:bold}.acf-oembed.has-value .title:hover .acf-actions{display:block}.acf-image-uploader{position:relative}.acf-image-uploader:after{display:block;clear:both;content:""}.acf-image-uploader p{margin:0}.acf-image-uploader .image-wrap{position:relative;float:left}.acf-image-uploader .image-wrap img{max-width:100%;max-height:100%;width:auto;height:auto;display:block;min-width:30px;min-height:30px;background:#f1f1f1;margin:0;padding:0}.acf-image-uploader .image-wrap img[src$=".svg"]{min-height:100px;min-width:100px}.acf-image-uploader .image-wrap:hover .acf-actions{display:block}.acf-image-uploader input.button{width:auto}html[dir="rtl"] .acf-image-uploader .image-wrap{float:right}.acf-file-uploader{position:relative}.acf-file-uploader p{margin:0}.acf-file-uploader .file-wrap{border:#ccd0d4 solid 1px;min-height:84px;position:relative;background:#fff}.acf-file-uploader .file-icon{position:absolute;top:0;left:0;bottom:0;padding:10px;background:#F1F1F1;border-right:#d5d9dd solid 1px}.acf-file-uploader .file-icon img{display:block;padding:0;margin:0;max-width:48px}.acf-file-uploader .file-info{padding:10px;margin-left:69px}.acf-file-uploader .file-info p{margin:0 0 2px;font-size:13px;line-height:1.4em;word-break:break-all}.acf-file-uploader .file-info a{text-decoration:none}.acf-file-uploader:hover .acf-actions{display:block}html[dir="rtl"] .acf-file-uploader .file-icon{left:auto;right:0;border-left:#E5E5E5 solid 1px;border-right:none}html[dir="rtl"] .acf-file-uploader .file-info{margin-right:69px;margin-left:0}.acf-ui-datepicker .ui-datepicker{z-index:900000 !important}.acf-ui-datepicker .ui-datepicker .ui-widget-header a{cursor:pointer;transition:none}.acf-ui-datepicker .ui-state-highlight.ui-state-hover{border:1px solid #98b7e8 !important;background:#98b7e8 !important;font-weight:normal !important;color:#ffffff !important}.acf-ui-datepicker .ui-state-highlight.ui-state-active{border:1px solid #3875d7 !important;background:#3875d7 !important;font-weight:normal !important;color:#ffffff !important}.acf-field-separator .acf-label{margin-bottom:0}.acf-field-separator .acf-label label{font-weight:normal}.acf-field-separator .acf-input{display:none}.acf-fields>.acf-field-separator{background:#f9f9f9;border-bottom:1px solid #dfdfdf;border-top:1px solid #dfdfdf;margin-bottom:-1px;z-index:2}.acf-taxonomy-field{position:relative}.acf-taxonomy-field .categorychecklist-holder{border:#ccd0d4 solid 1px;border-radius:3px;max-height:200px;overflow:auto}.acf-taxonomy-field .acf-checkbox-list{margin:0;padding:10px}.acf-taxonomy-field .acf-checkbox-list ul.children{padding-left:18px}.acf-taxonomy-field:hover .acf-actions{display:block}.acf-taxonomy-field[data-ftype="select"] .acf-actions{padding:0;margin:-9px}.acf-range-wrap .acf-append,.acf-range-wrap .acf-prepend{display:inline-block;vertical-align:middle;line-height:28px;margin:0 7px 0 0}.acf-range-wrap .acf-append{margin:0 0 0 7px}.acf-range-wrap input[type="range"]{display:inline-block;padding:0;margin:0;vertical-align:middle;height:28px}.acf-range-wrap input[type="range"]:focus{outline:none}.acf-range-wrap input[type="number"]{display:inline-block;min-width:3em;margin-left:10px;vertical-align:middle}html[dir="rtl"] .acf-range-wrap input[type="number"]{margin-right:10px;margin-left:0}html[dir="rtl"] .acf-range-wrap .acf-append{margin:0 7px 0 0}html[dir="rtl"] .acf-range-wrap .acf-prepend{margin:0 0 0 7px}.acf-accordion{margin:-1px 0;padding:0;background:#fff;border-top:1px solid #d5d9dd;border-bottom:1px solid #d5d9dd;z-index:1}.acf-accordion .acf-accordion-title{margin:0;padding:12px;font-weight:bold;cursor:pointer;font-size:inherit;font-size:13px;line-height:1.4em}.acf-accordion .acf-accordion-title:hover{background:#f3f4f5}.acf-accordion .acf-accordion-title label{margin:0;padding:0;font-size:13px;line-height:1.4em}.acf-accordion .acf-accordion-title p{font-weight:normal}.acf-accordion .acf-accordion-title .acf-accordion-icon{float:right}.acf-accordion .acf-accordion-title svg.acf-accordion-icon{position:absolute;right:10px;top:50%;transform:translateY(-50%);color:#191e23;fill:currentColor}.acf-accordion .acf-accordion-content{margin:0;padding:0 12px 12px;display:none}.acf-accordion.-open>.acf-accordion-content{display:block}.acf-field.acf-accordion{margin:-1px 0;padding:0 !important;border-color:#d5d9dd}.acf-field.acf-accordion .acf-label.acf-accordion-title{padding:12px;width:auto;float:none;width:auto}.acf-field.acf-accordion .acf-input.acf-accordion-content{padding:0;float:none;width:auto}.acf-field.acf-accordion .acf-input.acf-accordion-content>.acf-fields{border-top:#eee solid 1px}.acf-field.acf-accordion .acf-input.acf-accordion-content>.acf-fields.-clear{padding:0 12px 15px}.acf-fields.-left>.acf-field.acf-accordion:before{display:none}.acf-fields.-left>.acf-field.acf-accordion .acf-accordion-title{width:auto;margin:0 !important;padding:12px;float:none !important}.acf-fields.-left>.acf-field.acf-accordion .acf-accordion-content{padding:0 !important}.acf-fields.-clear>.acf-field.acf-accordion{border:#cccccc solid 1px;background:transparent}.acf-fields.-clear>.acf-field.acf-accordion+.acf-field.acf-accordion{margin-top:-16px}tr.acf-field.acf-accordion{background:transparent}tr.acf-field.acf-accordion>.acf-input{padding:0 !important;border:#cccccc solid 1px}tr.acf-field.acf-accordion .acf-accordion-content{padding:0 12px 12px}#addtag div.acf-field.error{border:0 none;padding:8px 0}#addtag>.acf-field.acf-accordion{padding-right:0;margin-right:5%}#addtag>.acf-field.acf-accordion+p.submit{margin-top:0}tr.acf-accordion{margin:15px 0 !important}tr.acf-accordion+tr.acf-accordion{margin-top:-16px !important}.acf-postbox.seamless>.acf-fields>.acf-accordion{margin-left:12px;margin-right:12px;border:#ccd0d4 solid 1px}.widget .widget-content>.acf-field.acf-accordion{border:#dfdfdf solid 1px;margin-bottom:10px}.widget .widget-content>.acf-field.acf-accordion .acf-accordion-title{margin-bottom:0}.widget .widget-content>.acf-field.acf-accordion+.acf-field.acf-accordion{margin-top:-11px}.media-modal .compat-attachment-fields .acf-field.acf-accordion+.acf-field.acf-accordion{margin-top:-1px}.media-modal .compat-attachment-fields .acf-field.acf-accordion>.acf-input{width:100%}.media-modal .compat-attachment-fields .acf-field.acf-accordion .compat-attachment-fields>tbody>tr>td{padding-bottom:5px}.block-editor .edit-post-sidebar .acf-postbox>.postbox-header,.block-editor .edit-post-sidebar .acf-postbox>.hndle{border-bottom-width:0 !important}.block-editor .edit-post-sidebar .acf-postbox.closed>.postbox-header,.block-editor .edit-post-sidebar .acf-postbox.closed>.hndle{border-bottom-width:1px !important}.block-editor .edit-post-sidebar .acf-fields{min-height:1px;overflow:auto}.block-editor .edit-post-sidebar .acf-fields>.acf-field{border-width:0;border-color:#e2e4e7;margin:16px;padding:0;width:auto !important;min-height:0 !important;float:none !important}.block-editor .edit-post-sidebar .acf-fields>.acf-field>.acf-label{margin-bottom:5px}.block-editor .edit-post-sidebar .acf-fields>.acf-field>.acf-label label{font-weight:normal}.block-editor .edit-post-sidebar .acf-fields>.acf-field.acf-accordion{padding:0;margin:0;border-top-width:1px}.block-editor .edit-post-sidebar .acf-fields>.acf-field.acf-accordion:first-child{border-top-width:0}.block-editor .edit-post-sidebar .acf-fields>.acf-field.acf-accordion .acf-accordion-title{margin:0;padding:15px}.block-editor .edit-post-sidebar .acf-fields>.acf-field.acf-accordion .acf-accordion-title label{font-weight:bold}.block-editor .edit-post-sidebar .acf-fields>.acf-field.acf-accordion .acf-accordion-content>.acf-fields{border-top-width:0}.form-table>tbody>.acf-field>.acf-label{padding:20px 10px 20px 0;width:210px}html[dir="rtl"] .form-table>tbody>.acf-field>.acf-label{padding:20px 0 20px 10px}.form-table>tbody>.acf-field>.acf-label label{font-size:14px;color:#23282d}.form-table>tbody>.acf-field>.acf-input{padding:15px 10px}html[dir="rtl"] .form-table>tbody>.acf-field>.acf-input{padding:15px 10px 15px 5%}.form-table>tbody>.acf-tab-wrap td{padding:15px 5% 15px 0}html[dir="rtl"] .form-table>tbody>.acf-tab-wrap td{padding:15px 0 15px 5%}.form-table>tbody .form-table th.acf-th{width:auto}#your-profile .acf-field input[type="text"],#your-profile .acf-field input[type="password"],#your-profile .acf-field input[type="number"],#your-profile .acf-field input[type="search"],#your-profile .acf-field input[type="email"],#your-profile .acf-field input[type="url"],#your-profile .acf-field select,#createuser .acf-field input[type="text"],#createuser .acf-field input[type="password"],#createuser .acf-field input[type="number"],#createuser .acf-field input[type="search"],#createuser .acf-field input[type="email"],#createuser .acf-field input[type="url"],#createuser .acf-field select{max-width:25em}#your-profile .acf-field textarea,#createuser .acf-field textarea{max-width:500px}#your-profile .acf-field .acf-field input[type="text"],#your-profile .acf-field .acf-field input[type="password"],#your-profile .acf-field .acf-field input[type="number"],#your-profile .acf-field .acf-field input[type="search"],#your-profile .acf-field .acf-field input[type="email"],#your-profile .acf-field .acf-field input[type="url"],#your-profile .acf-field .acf-field textarea,#your-profile .acf-field .acf-field select,#createuser .acf-field .acf-field input[type="text"],#createuser .acf-field .acf-field input[type="password"],#createuser .acf-field .acf-field input[type="number"],#createuser .acf-field .acf-field input[type="search"],#createuser .acf-field .acf-field input[type="email"],#createuser .acf-field .acf-field input[type="url"],#createuser .acf-field .acf-field textarea,#createuser .acf-field .acf-field select{max-width:none}#registerform h2{margin:1em 0}#registerform .acf-field{margin-top:0}#registerform .acf-field .acf-label{margin-bottom:0}#registerform .acf-field .acf-label label{font-weight:normal;line-height:1.5}#registerform p.submit{text-align:right}#acf-term-fields{padding-right:5%}#acf-term-fields>.acf-field>.acf-label{margin:0}#acf-term-fields>.acf-field>.acf-label label{font-size:12px;font-weight:normal}p.submit .spinner,p.submit .acf-spinner{vertical-align:top;float:none;margin:4px 4px 0}#edittag .acf-fields.-left>.acf-field{padding-left:220px}#edittag .acf-fields.-left>.acf-field:before{width:209px}#edittag .acf-fields.-left>.acf-field>.acf-label{width:220px;margin-left:-220px;padding:0 10px}#edittag .acf-fields.-left>.acf-field>.acf-input{padding:0}#edittag>.acf-fields.-left{width:96%}#edittag>.acf-fields.-left>.acf-field>.acf-label{padding-left:0}.editcomment td:first-child{white-space:nowrap;width:131px}#widgets-right .widget .acf-field .description{padding-left:0;padding-right:0}.acf-widget-fields>.acf-field .acf-label{margin-bottom:5px}.acf-widget-fields>.acf-field .acf-label label{font-weight:normal;margin:0}.acf-menu-settings{border-top:1px solid #eee;margin-top:2em}.acf-menu-settings.-seamless{border-top:none;margin-top:15px}.acf-menu-settings.-seamless>h2{display:none}.acf-menu-settings .list li{display:block;margin-bottom:0}.acf-fields.acf-menu-item-fields{clear:both;padding-top:1px}.acf-fields.acf-menu-item-fields>.acf-field{margin:5px 0;padding-right:10px}.acf-fields.acf-menu-item-fields>.acf-field .acf-label{margin-bottom:0}.acf-fields.acf-menu-item-fields>.acf-field .acf-label label{font-style:italic;font-weight:normal}#post .compat-attachment-fields .compat-field-acf-form-data{display:none}#post .compat-attachment-fields,#post .compat-attachment-fields>tbody,#post .compat-attachment-fields>tbody>tr,#post .compat-attachment-fields>tbody>tr>th,#post .compat-attachment-fields>tbody>tr>td{display:block}#post .compat-attachment-fields>tbody>.acf-field{margin:15px 0}#post .compat-attachment-fields>tbody>.acf-field>.acf-label{margin:0}#post .compat-attachment-fields>tbody>.acf-field>.acf-label label{margin:0;padding:0}#post .compat-attachment-fields>tbody>.acf-field>.acf-label label p{margin:0 0 3px !important}#post .compat-attachment-fields>tbody>.acf-field>.acf-input{margin:0}.media-modal .compat-attachment-fields td.acf-input table{display:table;table-layout:auto}.media-modal .compat-attachment-fields td.acf-input table tbody{display:table-row-group}.media-modal .compat-attachment-fields td.acf-input table tr{display:table-row}.media-modal .compat-attachment-fields td.acf-input table td,.media-modal .compat-attachment-fields td.acf-input table th{display:table-cell}.media-modal .compat-attachment-fields>tbody>.acf-field{margin:5px 0}.media-modal .compat-attachment-fields>tbody>.acf-field>.acf-label{min-width:30%;margin:0;padding:0;float:left;text-align:right;display:block;float:left}.media-modal .compat-attachment-fields>tbody>.acf-field>.acf-label>label{padding-top:6px;margin:0;color:#666666;font-weight:400;line-height:16px}.media-modal .compat-attachment-fields>tbody>.acf-field>.acf-input{width:65%;margin:0;padding:0;float:right;display:block}.media-modal .compat-attachment-fields>tbody>.acf-field p.description{margin:0}.acf-selection-error{background:#ffebe8;border:1px solid #c00;border-radius:3px;padding:8px;margin:20px 0 0}.acf-selection-error .selection-error-label{background:#CC0000;border-radius:3px;color:#fff;font-weight:bold;margin-right:8px;padding:2px 4px}.acf-selection-error .selection-error-message{color:#b44;display:block;padding-top:8px;word-wrap:break-word;white-space:pre-wrap}.media-modal .attachment.acf-disabled .thumbnail{opacity:0.25 !important}.media-modal .attachment.acf-disabled .attachment-preview:before{background:rgba(0,0,0,0.15);z-index:1;position:relative}.media-modal .compat-field-acf-form-data,.media-modal .compat-field-acf-blank{display:none !important}.media-modal .upload-error-message{white-space:pre-wrap}.media-modal .acf-required{padding:0 !important;margin:0 !important;float:none !important;color:#f00 !important}.media-modal .media-sidebar .compat-item{padding-bottom:20px}@media (max-width: 900px){.media-modal .setting span,.media-modal .compat-attachment-fields>tbody>.acf-field>.acf-label{width:98%;float:none;text-align:left;min-height:0;padding:0}.media-modal .setting input,.media-modal .setting textarea,.media-modal .compat-attachment-fields>tbody>.acf-field>.acf-input{float:none;height:auto;max-width:none;width:98%}}.media-modal .acf-expand-details{float:right;padding:8px 10px;margin-right:6px;font-size:13px;height:18px;line-height:18px;color:#666;text-decoration:none}.media-modal .acf-expand-details:focus,.media-modal .acf-expand-details:active{outline:0 none;box-shadow:none;color:#666}.media-modal .acf-expand-details:hover{color:#000}.media-modal .acf-expand-details .is-open{display:none}.media-modal .acf-expand-details .is-closed{display:block}@media (max-width: 640px){.media-modal .acf-expand-details{display:none}}.media-modal.acf-expanded .acf-expand-details .is-open{display:block}.media-modal.acf-expanded .acf-expand-details .is-closed{display:none}.media-modal.acf-expanded .attachments-browser .media-toolbar,.media-modal.acf-expanded .attachments-browser .attachments{right:740px}.media-modal.acf-expanded .media-sidebar{width:708px}.media-modal.acf-expanded .media-sidebar .attachment-info .thumbnail{float:left;max-height:none}.media-modal.acf-expanded .media-sidebar .attachment-info .thumbnail img{max-width:100%;max-height:200px}.media-modal.acf-expanded .media-sidebar .attachment-info .details{float:right}.media-modal.acf-expanded .media-sidebar .attachment-info .thumbnail,.media-modal.acf-expanded .media-sidebar .attachment-details .setting .name,.media-modal.acf-expanded .media-sidebar .compat-attachment-fields>tbody>.acf-field>.acf-label{min-width:20%;margin-right:0}.media-modal.acf-expanded .media-sidebar .attachment-info .details,.media-modal.acf-expanded .media-sidebar .attachment-details .setting input,.media-modal.acf-expanded .media-sidebar .attachment-details .setting textarea,.media-modal.acf-expanded .media-sidebar .attachment-details .setting+.description,.media-modal.acf-expanded .media-sidebar .compat-attachment-fields>tbody>.acf-field>.acf-input{min-width:77%}@media (max-width: 900px){.media-modal.acf-expanded .attachments-browser .media-toolbar{display:none}.media-modal.acf-expanded .attachments{display:none}.media-modal.acf-expanded .media-sidebar{width:auto;max-width:none !important;bottom:0 !important}.media-modal.acf-expanded .media-sidebar .attachment-info .thumbnail{min-width:0;max-width:none;width:30%}.media-modal.acf-expanded .media-sidebar .attachment-info .details{min-width:0;max-width:none;width:67%}}@media (max-width: 640px){.media-modal.acf-expanded .media-sidebar .attachment-info .thumbnail,.media-modal.acf-expanded .media-sidebar .attachment-info .details{width:100%}}.acf-media-modal .media-embed .setting.align,.acf-media-modal .media-embed .setting.link-to{display:none}.acf-media-modal.-edit{left:15%;right:15%;top:100px;bottom:100px}.acf-media-modal.-edit .media-frame-menu,.acf-media-modal.-edit .media-frame-router,.acf-media-modal.-edit .media-frame-content .attachments,.acf-media-modal.-edit .media-frame-content .media-toolbar{display:none}.acf-media-modal.-edit .media-frame-title,.acf-media-modal.-edit .media-frame-content,.acf-media-modal.-edit .media-frame-toolbar,.acf-media-modal.-edit .media-sidebar{width:auto;left:0;right:0}.acf-media-modal.-edit .media-frame-content{top:50px}.acf-media-modal.-edit .media-frame-title{border-bottom:1px solid #DFDFDF;box-shadow:0 4px 4px -4px rgba(0,0,0,0.1)}.acf-media-modal.-edit .media-sidebar{padding:0 16px}.acf-media-modal.-edit .media-sidebar .attachment-details{overflow:visible}.acf-media-modal.-edit .media-sidebar .attachment-details>h3,.acf-media-modal.-edit .media-sidebar .attachment-details>h2{display:none}.acf-media-modal.-edit .media-sidebar .attachment-details .attachment-info{background:#fff;border-bottom:#dddddd solid 1px;padding:16px;margin:0 -16px 16px}.acf-media-modal.-edit .media-sidebar .attachment-details .thumbnail{margin:0 16px 0 0}.acf-media-modal.-edit .media-sidebar .attachment-details .setting{margin:0 0 5px}.acf-media-modal.-edit .media-sidebar .attachment-details .setting span{margin:0}.acf-media-modal.-edit .media-sidebar .compat-attachment-fields>tbody>.acf-field{margin:0 0 5px}.acf-media-modal.-edit .media-sidebar .compat-attachment-fields>tbody>.acf-field p.description{margin-top:3px}.acf-media-modal.-edit .media-sidebar .media-types-required-info{display:none}@media (max-width: 900px){.acf-media-modal.-edit{top:30px;right:30px;bottom:30px;left:30px}}@media (max-width: 640px){.acf-media-modal.-edit{top:0;right:0;bottom:0;left:0}}@media (max-width: 480px){.acf-media-modal.-edit .media-frame-content{top:40px}}.acf-temp-remove{position:relative;opacity:1;-webkit-transition:all 0.25s ease;-moz-transition:all 0.25s ease;-o-transition:all 0.25s ease;transition:all 0.25s ease;overflow:hidden}.acf-temp-remove:after{display:block;content:"";position:absolute;top:0;left:0;right:0;bottom:0;z-index:99}.hidden-by-conditional-logic{display:none !important}.hidden-by-conditional-logic.appear-empty{display:table-cell !important}.hidden-by-conditional-logic.appear-empty .acf-input{display:none !important}.acf-postbox.acf-hidden{display:none !important}.acf-attention{transition:border 0.250s ease-out}.acf-attention.-focused{border:#23282d solid 1px !important;transition:none}tr.acf-attention{transition:box-shadow 0.250s ease-out;position:relative}tr.acf-attention.-focused{box-shadow:#23282d 0 0 0px 1px !important}#editor .edit-post-layout__metaboxes{padding:0}#editor .edit-post-layout__metaboxes .edit-post-meta-boxes-area{margin:0}#editor .metabox-location-side .postbox-container{float:none}#editor .postbox{color:#444}#editor .postbox>.postbox-header .hndle{border-bottom:none}#editor .postbox>.postbox-header .hndle:hover{background:transparent}#editor .postbox>.postbox-header .handle-actions .handle-order-higher,#editor .postbox>.postbox-header .handle-actions .handle-order-lower{width:1.62rem}#editor .postbox>.postbox-header .handle-actions .acf-hndle-cog{height:44px;line-height:44px}#editor .postbox>.postbox-header:hover{background:#f0f0f0}#editor .postbox.closed:last-child>.postbox-header{border-bottom:none}#editor .postbox:last-child>.inside{border-bottom:none}#editor .block-editor-writing-flow__click-redirect{min-height:50px}
diff --git a/assets/font/LICENSE.txt b/assets/font/LICENSE.txt
deleted file mode 100644
index f92d39c..0000000
--- a/assets/font/LICENSE.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-Font license info
-
-
-## Entypo
-
- Copyright (C) 2012 by Daniel Bruce
-
- Author: Daniel Bruce
- License: SIL (http://scripts.sil.org/OFL)
- Homepage: http://www.entypo.com
-
-
-## Typicons
-
- (c) Stephen Hutchings 2012
-
- Author: Stephen Hutchings
- License: SIL (http://scripts.sil.org/OFL)
- Homepage: http://typicons.com/
-
-
-## Font Awesome
-
- Copyright (C) 2016 by Dave Gandy
-
- Author: Dave Gandy
- License: SIL ()
- Homepage: http://fortawesome.github.com/Font-Awesome/
-
-
-## Elusive
-
- Copyright (C) 2013 by Aristeides Stathopoulos
-
- Author: Aristeides Stathopoulos
- License: SIL (http://scripts.sil.org/OFL)
- Homepage: http://aristeides.com/
-
-
-## Modern Pictograms
-
- Copyright (c) 2012 by John Caserta. All rights reserved.
-
- Author: John Caserta
- License: SIL (http://scripts.sil.org/OFL)
- Homepage: http://thedesignoffice.org/project/modern-pictograms/
-
-
diff --git a/assets/font/README.txt b/assets/font/README.txt
deleted file mode 100644
index beaab33..0000000
--- a/assets/font/README.txt
+++ /dev/null
@@ -1,75 +0,0 @@
-This webfont is generated by http://fontello.com open source project.
-
-
-================================================================================
-Please, note, that you should obey original font licenses, used to make this
-webfont pack. Details available in LICENSE.txt file.
-
-- Usually, it's enough to publish content of LICENSE.txt file somewhere on your
- site in "About" section.
-
-- If your project is open-source, usually, it will be ok to make LICENSE.txt
- file publicly available in your repository.
-
-- Fonts, used in Fontello, don't require a clickable link on your site.
- But any kind of additional authors crediting is welcome.
-================================================================================
-
-
-Comments on archive content
----------------------------
-
-- /font/* - fonts in different formats
-
-- /css/* - different kinds of css, for all situations. Should be ok with
- twitter bootstrap. Also, you can skip style and assign icon classes
- directly to text elements, if you don't mind about IE7.
-
-- demo.html - demo file, to show your webfont content
-
-- LICENSE.txt - license info about source fonts, used to build your one.
-
-- config.json - keeps your settings. You can import it back into fontello
- anytime, to continue your work
-
-
-Why so many CSS files ?
------------------------
-
-Because we like to fit all your needs :)
-
-- basic file, .css - is usually enough, it contains @font-face
- and character code definitions
-
-- *-ie7.css - if you need IE7 support, but still don't wish to put char codes
- directly into html
-
-- *-codes.css and *-ie7-codes.css - if you like to use your own @font-face
- rules, but still wish to benefit from css generation. That can be very
- convenient for automated asset build systems. When you need to update font -
- no need to manually edit files, just override old version with archive
- content. See fontello source code for examples.
-
-- *-embedded.css - basic css file, but with embedded WOFF font, to avoid
- CORS issues in Firefox and IE9+, when fonts are hosted on the separate domain.
- We strongly recommend to resolve this issue by `Access-Control-Allow-Origin`
- server headers. But if you ok with dirty hack - this file is for you. Note,
- that data url moved to separate @font-face to avoid problems with 7-?LX^?9$zgaV8l31XCmv0Od(e(2riS#;IS}0cE{blYN@E4%{O6j2$P5sG+
z%$R2m1bG&Uuuj!0xEIo=xrul
zW=Dam;6kXawSM@-#s*^~nR@(4+a9wQm?J}5m07ThCd_YUcGiM$a>8$|%*{Mtr@j4u
z|Jh9g{HkFFSY-_$HM0F$qfuh7H5&P9tKc#o|$8vMxC8jX@{t?IYjrv7%}o|n7RrQX^%&JUNy9xThvf@Y+x_P
zV9WLICOWX-|KPP1?S_3jk_jt=~nE}egL`&mV@#w>|h}6
zXI$_K>C42_=8#}V^66$@Tbt(7d@)(^#ktRG;SL^$QBy-amGpBz@8-#&?gZb?)ot8A
z#JijLP`5?;zR!2#?|nzYzX-L7UH-KHMr|Me%k=sW9G*aH#_wwy_!c+zuHP@(vfs^$
zFZeRxZVSB^J_>Hk{G&9l?Y;3eYlmyp=WA;|I?%(7^!hRWO!m7Os0=MPe#CzzK0vJb
zS%11u<$P4;*g{o8^$`qP09Ou-;)u)1nb+g=yZp?-9SXeYfvts;CuHoxlS~c7LaNvI
z(cIHtNsrhE?F8;lD-0pW=NmnfP>Z`GsD`{pk
z9&_TW$P0hki`_6jPUH$)HQU}QV0sU%?Q?R!Z%h6!9VFxGRmkXfz3X!QNG!Qr5&ezV
z^@z*$zANE+8%i<0@c|xFknJMb&=r9|fn6b$+kK{NsOjVsk`$4M#c7Cp7g8gUt5+it
zS5hpIy!T1`>u*3j$tB^)Q)}G@Drci4u*xM03_ws?%Zl3h1PTs|b
zlBps5Biz&GRpUGqOYP;ca7eY_AE85oBYbDl=ckO74o80etz*ybIndnc^Ep0p_(aov
zJu^dxzS^y}%l7kDo5Sm>Qzxs3LG&y3ip9<&*S~e_IhxeY6^VcI>d5B~G@H|Xoz3?}
zdikLd+i;7Wzk;bmxv!3^a)Z-6i5vNDWkGfV*RhwlBhWby6s>*kQwt
zjE~_g5KI;eOi1`U&m={WN^lvoA7F~Y^N5KSelSq458a>U#)R{qW=}^!lM$q{kWr&0
zQ30P+VG8HUR70-9@5|@Y9?tTgKQKO=x~pB0nU!1XbsC|gq49wjY}3W}3ZDZ3zO&1W
za(@by#)8_|CHy`lXq)-BGntAF4vZkR5^^}f)jBdFhDNyL+nF4SS>Q)C?BM*JAM*C~
zwe_X->%2o0zWo)qkUL$P*QY0Zp^?rmVQcqAPOc}af6=45I_;faAxDn54!CSW?Ko|9
zIlTR$9^o4BhPryJR(FR(?#*OIE=_kl*nZFUL&DxEjjUgX@HO7fpWq$q+GB6`wp(Kz
zs$H}vGJ0B!Y7={Ottz@4kIxB-t2V1WvunWHIU(Dp^t4r*8g_?LTD#4v3Tv0c7V5D%
z9B#YZ@$rY=QQan-tuE0{DTWh#<5h_cbqObw12@IV^!;|ODlN^nCK-p}xRv9H^KSv%
zlES3ZI1f}=K^CCqi%HZ&e$qn4@sJhA`(1udtJPt3SX6idS<~8tqSe+KY>ft6gPy@5
zzsKK(jPNIY7O!dv#iX^5XQYXbjZ@#8{o8-JG1DIlCV77-njDozKYsP7c;UtiyZ`Pa
z5C8l>`14VW#De`C6^-i74J7rSifcH>+tThP)JXFnM9_J-Tc8Z@q&hjmeRp#{!r^|L
zvEko@d@sAK`Y!iFyvLR5Xtz7o|I8cde7}7-Vr_qp{|p3>Z~R!Jn+~@7EPoR@-wLbj
zN)K6O3#tNQnN2l7oZ*T@NBR+u+XfZ7!Ry!8
z2d-Zyw)JOjJjNF{YiXxAjCrsXHZW@1$`mQcR!u^5uK)M?e~H8E-TbGt^?Loibxz&B
zH|GpCQC2&b_)pin>$<%zg~WTNwe<8otyDYdw4~DjMv@ROV4I@z6IBz3zsK+CuHRXZ
zQaImHFef4uwlDpay5$&}@lb2q5nX_w&_4dogqxd@->P%?bYrU^=_Sdgn
z${qTC?((BozW!)kkKZ7kCs{Y!%SO}tdN^013m-}dSp>Nvqt44h5wfy?cU4p|RCgv&
z=?mm@i9N_v)vg}g6^IU|qB|{0fG&F~u4S>oR@_S9!)@HeRZFYa=MN@Rn-$*E>UH3r
zf`iUHpy~3J+6jKieLB0|pFMp#%m2_~vsu=^939}P2>)?(z-EnDZEvFrPp?0txa72|
z^7&~LYrf6tX$FF;P|1io=|UV`9^H@Za;h
zmlwb2-19%ISu!v6KiT)_J{qQe^bh{ll&3>
z0{=(;v3Od#Ed5;e%BST=+5?mUVyF5^9h
zonucmV0sVzZ37m#5z^YkBQcdb8?X$xtpO{{#{&&m1${>Ywy~3Zr~x;#82?7LQoXoz
z_RQRh)|0(QOZM*=(xxwJ6_Cy@7U#9%g_XI=(z2G;W-E&;<@xzaqEuNZmS!i*XD-Ya
zmjL1KWO-@%Y-Lf~k?03DUS2FO6<5kLBx(7fGs%^eS#5TyvY_p6$k3`wm2>6NN@8wh
zrMheT_FHAMERNy!#%#mf_X|!2ji=dXlF%LL_t49UbuKE|D+rI|YY4zuwzY5jI#vyId{AyG*CC^};
zx=zdNA?Te1bpPzNo8r%N~Jv8i-#?C=b3ET;Dw=1CTV%zcWv-Cz}Y~~i;aPRo@
zqBKcd<_cGFLRonexAA6fM`d+zCwK8yRleMZNSUtK>M+T$*1-!^b-7$zD$QBv&n}+tD?hwa-vSOie04EDaNV}2c4q#g
z8bZxrx@NEwxv{*a9e#y5jvY4C3l#l
zh6x(Z=e1g$sW@ZwfYiV=qo2n6iSyb-PJrWtay2!)jFM9xsc8AAp!_Z5csVUPLjYjH=(-Y%k
zB}3{Bf}Yh@wN=Qj^(#?q>sYQZ5hzaPbKyKj)5mid3ect+EB6_SZdkJMD+npmG%C<=
zCJYmYGetv8&lq|6$#&jcsS(v=FwOc3I
zDQ3c%E6p}(EEf!fgZbWIpV6Y%gcvhsilcpoL&pX*&9G+=(Y^qLGkK$hut{Jo!1@d)
z#JEh8Xs|#DY8#GhL0c_oh66_HGhF)Nsa#E-8O=wGmU8&vKBHAXd@OhPc%2vsg6=Wt
zZoS5w*%P^%(+U3-GlnxxL5k4L)a>+V!NcG_ctVO!-v@xR@L21Ln
zg^X6f@_*%Waop}Rnbktgt;UU|cpwBbd9gQ7yw7OUYn*x?>`c91uSwLm>ouAByY!ku
zeTQCCsSoHi3-z6P%}V_?z1Bp1m(Glq`0t^}-B6?p0yHQ>eGrOJAA%y(hoK1d5hy}^
z6pBzEgCf*-LlNqGpa}K%=-M7L&U|_V_4Mp!brGTg{4)+;JJ>lQeXYBl4tcb7@*azSW=8I|xZJaU_
zCOo*hIvyTJCCH&>qvj!9cXHg4vHl=Rh!4?^Ka<61%Ers9iLj>aS%s|B&0#H3mtn||
z2`)=!(}q5#~qE(KQ@S&=}J)OFm4Vu1p^6{(y1{oSEBey70reWH)-Ms;ORcsLNe
z#oxhvL&ppmW7DWv+JBHNPbxO{v9;wJ*N~0hslWeuc4p01gA-1RT+?aFcQ$0F!c*crqBepLhtE
zARYpa5f1^A#4`fmIPnlLMLYzYARYov5>Fby=ZS}a9Ptp4CmsS$5lZVYd6pCQEL
zo--lhK5Ih6dQLY!x5av%5R-M@got&)got%fH+F5YRtPa!t0qLOUos(LUD97_lEvoD
zC=)lVWkZTgJWNMTAHya4hm*K~@F!4|>(}aPjVT%Ip7j#&l1*@H9da-eQZrZa35~NR
zP%W9OEM12sHd>4D%g1nQyqv2^Go!T_VOOn}@G_geT*B1}EVvx!U&8B
diff --git a/assets/font/acf.svg b/assets/font/acf.svg
deleted file mode 100644
index 3a681d9..0000000
--- a/assets/font/acf.svg
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-
-Copyright (C) 2017 by original authors @ fontello.com
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/assets/font/acf.ttf b/assets/font/acf.ttf
deleted file mode 100644
index cf96a92d9c7af9fbf51270e95ba058cc0eec5988..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 8064
zcmd^EeQaCTb-(w%4^k9GJ&_cth_dqdDMfsuWm=+C$B~~&$#QJRk!9H>-P9#TNtSI%
zWFpUUtf~@O+
ze#Fv#=aEwE##w>>JBs(+bIv{Y+;h*@y^ms?G1khiFo{(sPM*r@PsJ~T@*djs!zXvA
zNA=0?GR7x?pDr(zs&D-~e*^dnjES}KqieeQ!!4OH-vY+<`Rci)^)EbA0DhIR=IXi9
zY87-1coDtx+~Vc=tl9O)jLBV$x!zisE6uh%W=2T?d@>6lIFiyd@Dbp#g{8H}hDuvM
z1^x)|$;C>!6#C6QUf|yb-nUeGtjb%Pe+~Sffa}Ypr8)WAm!VthFQMNTs+HBXKmXSt
z=6avP_&-!v=BodGF!?fL-56(|W3+b{8(^bMESA=mnP=?Kv1!)Hup|3Ju`SDq1Zm@TsmZr8Y
zurtyW`y$wArTPal;U&flG_1?7G{znWmADM_E}Jg1j;yOj&p7Fc{
zm>=V;P4l>$n;fbvn2-A$ia*KIXzl*U13VfTyq^yZrgw3X=<{R{pQ-nR)Gdh&
z8AJX!m~QS8kcvgnVGSrlODKXlxGL2}N5hf9y(I3|FT1-TYj#@(e?!c$U98&-?Fx8Q
z89Gl$$UaelJT~v|^!sF`BN-3))yQt{P$NBw!2=wR;Y|8ojz_@X%K2;FSlavKlisvf
z)7IBD4FF*=@A|9WbVPgpd7Jc=ui6a2B5Che8F_c>3F(G33LE>G&SJ>4X|t`jClQNA
z?(GWteO|ZVeB!8e&t%?g!w%htp_^cNDBr>!44Fa31+S34OiXVN33jYtHV4|<^?)8o
z$Vwo|1AYhh@Fa|y8RnUEkOz4WPY?H`_-?N5;=y6w)5M2+9MU%ffm?qcI2QeBq+RR_
zn!#JOgZwYe&2M>pp|)%=&@}iZZXMWsShVN9o)aGrWWn7Yc{_R>+?e@CCa)d1^;u`9
zHWmo9HyIkT7z1UdALV`7k#j`XyqvxyYQtmgNcah5Bz%J*-x9JuE^1lWB$t&N;Em59%AzLHa&=r9|
zfn6b$I|8BRH<4>xxO0-j%c0;1`m-r3ip0Noee@%To9*d=uI7hgef-F%Yox`^U&2(PJXFV3xxs0l#EpD+
zvM@Wv%Irn6-RBlEi*q6CT|yFPP74JVJ8HR+@d=y-g2`fu2?^heOi~o743{zYVWud&
zfS73E4~FXXq346#m~iof>}DJ^89^!w88uoG74S(Frf{xIH{>e(p+dp*aaQ=~;fayV
zJspb7oZMNj(+C|MjSnVZn{IwU1Uv}vz1?<{2Q#QN4%EhO5ey(f+wJe(bS5!0IEvIt
z$&U1W9_3PCZ+bZ4fFISUhx0eT%R4qVHdi)p@=j6w%BQ_T?$UIBz(@rmqg~y?
z)e(rD-b_{hqF2?r++BVl$Bt=-HJ4C3&pI`ae<0E;v_XHQyVvRTc6#K#Y=1mCS;2r#F-npqi`9@!dGtsHKMMo-Ym|{$y+;8Yr(d~I^K}cM6Io;WP
zgZ{2b**$HTPJMdB8_DP$E~hG--5yt@*X8ke-E!x9@A}6KmuPL%L&W>wSY@9%?35j-3W#Mk-2ichD-s>)$9!HFR0syV
zoxV;_OH-SxtsaO?jq?D7U@#NL!Eh(AoHETvOp`yAGPC)t-P`!<=9z5vjCuPL>QD{4
zz+cBL8dq-CX5tpqsNr6_hKG3ACxvg`+#I}llh`(&yY(br-maxx;wa|9R@lIpZ7W-(
zAX_yF(Y5*CoBt(_ZuamW(bntr_x3q;`@TPCsEM+=b%p91~8I@cmdlqou8#y{^!r5QHawUJ{oB69xT>IP;bv=HCc%EWC>;M}x5B74d
zLKi-q60!($MMj;Mg(75S3GXeaVyNy+pwbt~=MsB_sj6Fja9=1sl!@bKt6x?o!g
z@37<-`-3_5dm58AF#eyI1feiK%g10Hhn}@djbzrvOiHy+g2sH)a~M`Tu0=
zmh?QvUI$-Sy-Dr$F`cXIL1~1EjL$f3SNrYKkw)~1X^8x#2*`Kz_@F(kp_(NgczywP_fE3V1+f~
z##N`Qpf_%0cvDHTlMQ+^>dq4w<1*f3*ah~522AgvziGe%H$qyQcqFFs)&?vCZg0Q}
z3-C|_Rzcs>fL-h~A8x?SEWtmYt5h$qoIkg)ruXLV)6)ZchV_}tdIhBO%cVuVbZKp&
zva+h1`g~=1ZEkU~k}6l0O6B>fxpS8mODllzJw3OwdcLx(?@0{+o0wakTPdy0&61?m
zN6)3#*5>v3mCBNSs3AkIu2e3}mDf@WYiregyLaC%o8@pcSJ`E@!p^gEY=NyY9WMqs
zb|3mQeuCJ;h5^lhLkDM_>pWX#CAJ7kiCw~s1$$%_xQR9oY#G!!a4Z5&;p$PrwX1}F
zo=t&%4zm`4uQX`&k<%DiK`5NJ=j&KGh4t%W6Bt{z$4j>4S*%mnX_Y++d1+ABAe~lU
zu~*aCAzRM-dg$0Eja`78GPqOrZr4EF$9CiI!}LaEZ08o5ifFe@zScYbbk5Ls#-2Bm**DM>fCbq{GyY7L|TJe<=M)o
zmgU8{`8CCk6mh94uU=j*E9Vv~GjopW`SRMOl{uxnFju~)%vRR=_coVSRw|$BN2JVD
zTy>aaIP2i0s=7K?S}89$7tb$W?4NsVt-b{uc=*-D{(eh`(OHQ1**2`VF@$&f8$MWH5IJBPEt;xxJ*fI+t-5Mciq)^anb*9p+
z)eBMs)2#s-A0W;flX)FVte14lHJLAhqSKg*pbSBoVyIXs6hanH779^|P3Gqcg?>vi
z^l{yi<0UAh^$?7yxU!0y8A1_-{Ul{b9zOJuB
zc5Oh3V_PTk#mP`=(^?39ie>zh-M2`3t>~hT7dOitq`NxCedMmGSs#_
zxuU*a)GZH;)^BOX(dm3mo*gU1td_axWBpc}ar8v~=*c=U6b9XA)4fKGwdPLcYpt#D
zUny&~CMie}y4jkW9xZrSJOEEf@yUFRA{WNWuEV{wY+pEvY1?q9K2B2*`!rg>P9~uL
zL=jHB!&M*Rz#6W&QJ6SqvC(Usb2}P*2CFeKKApE(qgj32YDQ4Huy8S}7qR?bX&T4v
zKAT-H*1T%cT1kc?Fq0p9^CkPOcB96r55UgU2aTFUeTPw#slUglDb#lwHI@31QFBn=
zWz?M1?=osl)OQ=qYDxYcirfoDx*PTg*mJBM}~`jD;X0C@QL2h$Z*;I3*Bodv#Q*Wambj(OP%Z2ZO5^ZFmMc_FMZJ8sxTJQ>3%^x3{?M%KMF|o+7IqLe<@0NY(JO
z7ZPv(4jJBjpZvfM+2-D!dI!&_VGSj>NA3`Mz_2pOb;J+_%R18W0}I0~DJzNfP1{@)
zfZNuk;EEzEQb>}zjt5aJP@s1rb$h?RI}|7G78t)z^pV}DuI!JFgu=J^J6ve!m?dLu
z8#PD!50m9d#l}8%wmgO{x7U*sM>+D)m$LRC7so$@eh9Ue`+Zg#JQIdBi0&|1Z5(#h
z58=$(w$pV*>an@eq(F9s&x)L%{?$Fm%Srm*CDieI`sfi%^b$n$5@qxdq$$xw@4bZRHEIx@
zZ*uSb^PRQ!de7ePIZs>9pZ)l0D=Pzl08BuV0HpuE4?_RT|K=7PndLiZCnu^7;P5A%K-o^@6|uXZ8pB%Oqe_zqd_oW!kM}U
z+j}^;VzdkZ06Pf)AoPfRn`GjEKw^6FxG*(%{{xwWOMpFw!T|u>3jly%RbG}p(a{cJ
z3jmP)tHaC>5GD4PWp%`e7|k5RA7H?S%L_7aboKVfXh9e*fq{+);{LabyUoA4dJO0J
z2iP?&g)71zGcVaXhBN&Gkd*Ms4dH4B0FZ+*d-1}o^DVeCpv=P^=?wr-V8#SwVK7#@
zLSydXWryj7P-1u>29X1kR&CP
zEy(#u`Yj674eGBAbs}N14~xbEaGPMO0{+u$IwX!lrJ_*fu}-8QkOFDAeNdZKZ!ehA
z&dScdjR0%hTpvnr0T0@?A-T%yBI~060Vn1f#7hPNfI&pAm@)Q~`^Y=sWMH$|i~;&?
zwIe2KtW_oO4+(9?o1xzK@Y#y#G$WPrZ`hTn?uDm>8%hP;6H`Jnu)oOWjg^2cb7QBA
zrc(SL$qZdD>LjXzO3sEDVBhwF?qo;aLLB&s%xRme)*jqS1wVqlkfCutq*~CXtl*8<
z)hGxw@L1BV0aET^VVlVnTp8AIQ||tzbRorlso1WpTVqD)LW_OQoC8f6Zb_E3DePc}@?
zbE;DF<0vI}T8?9umMu?g=aJiD!KQ~W0k)(sTOL{O(0*G(Q-eS4C`^-Q34gy$$rk9E
zoaT75CxyQg`E)=xh)eP%vt4Z861FZ`RoZ+VLzJQ-i_X`NHHu`{j3!yOLEE~@1K*0C
zJ?-a{-r+Y}lWR6y3Z{G9Un^NqWdF$9QTh|RA=I!?wM1HPyu_~TidT)dskLM9*^o|0
zv=)m~6K(gX>MxkXmwrc)Z);q!E}s^-^w_die)cg#e8b1|
zhgnDP{`^?_u;ZGJpS6@3DTA4WZr`z^UTLOg?!4L%nwz*V#hb%_uo}cAQ>bR)Y9kVp
zsxl#N-yN>Vg2lI>p)dDPvbKmDJcOogZh)0E`0|++^?}Y7(C4R{M)eI7`tu~GpOr(5
zO06Hy5>D(mtqUAG&2O+M?Og5925YX$O=AhYNu!UL!I?eSKjAHV
zHLZA51iXfgGHOq8<7-A_7)Be(T35X=N$Z=cq%QBB^i#+(YN?z6$9mDz^t8l#-da9-
zl$Jr!vJ^A%nU!A}xvzmYK_8UuBb_x<-sJ`Kv=7iKHAy@CE!^`5l)Gv2er5+x!>knj
zP-fBzwW0Eu!6rbCFw1+XJt+>pjzy9L4=)BO7+bt%en>@xXuwl2rbgfmutPik*g!kH
zXd`QyD($8w_0`tqGmUXv+Ln`J3DoSLY-aWPHB=T0a2tgUv}{XxQCiDSL#xCj~S`>AOI_Gas$&UYV~l%+xe+-wX=u%JT=*sHaw^(dJ2uso3<#_s#plNr%XT0ZNYA55)lk}
zx#aDc)c@VIPe{cTq+dsusy~yZux1#wyQzEDytW6Cc#-AS$jKOJIZ^Smz03Sz&0klN
zaXk*2$umR*ap6E$vCgiYu-aigE|eNNdZ-io=KjOgY|wjN!-z3Ywk55}y0I-Qq8rlL
z5S25~=()|d7cu|Hc@`wk?R3Q@^J5{+@6v5C_=~CrlSZ6{QE$*Hvr1J$eLrzfDUN4g
zQ3L%B^Rmq%)he)!BeZK7viLQAQy+l7jF))Qwl##RI62K*!--tx
zGcgP3?jerg87W58Y=sWk;k3pFr4!($Ja>7rbr^F_`m;;60RRL5@9zPm{yDBj?kCG>^P4SU1Hel|rd}l8(-hNVO|X
zL6tG7yZG#MS3!PpzV#$v(#KW-ccC~+O`tDIx;dfU_Dg^{mijiuF00CZrE8yhN$cM1
z;7=T$6Q1B#U=K&p*L`h7VE5#NmzUS$t;gD=f)fj_5^Nb3k8@;?b_O1D}a{bWb^3>K29R+KAk^Vl)GGa`C=mY1JZ?57kOJ%&G!074rcl4=J
z>6-(zaYMW9(vA25&h~8b?APCnDUZqoX1MA%-BC?5>`)^7pi|XnVd;9`Hcu49*17vO?_w?343!Rp=`;_y&5SBDVOH&
z)qqx@Gbxp3%(h)iVdh&gcOg*uo>bm4o1~EbOO;c$tzuNR7>;_5%(_Uhn9=nHEB&U9
z7)|4M#o)xa9~KlG4mrkkyvf={MZKznU7ckI`je(S&l~i3jziy5UNI7!iMbVC-A@xw
zJ$_;(+a2B!v0T5AUc
z(qVQXv;6F-zk+Kfa9)R5%2{5G$TinOu%dhv7_;QiF(HC=m$n3{?ycwP
z-P(1Q>kF-m%f}sP&Mo|X3wgK1yJ;d7ATKLavffo27%NXFzEJDjWY}%l;AU%#Z7JH-
zF>S6t=VML*D!mq~{?hVfj4DpD;iGhM6?{(JZKHXjG*shMK5`nf
zCuF;sJvEGH{rw1Va7!*UcDrr+g}@|mdtaX;71?AZ2@>gfvGGSZ(^LIK*Yz^pup1dT
zT;k=FrG3O^H>dOl_Ba1oag*E2%Zidr6NO*%Zgs=-!;FJcpIwu8CCaI)3jbUuq4H!!
zd2*V+i=Zz}N+vX`q{+r>JN7<+Kk{*+78UhpEWhwXC&!{^^+LsZrq72`uTeX+ycNsKf@R)W!
zo$;D5CU;vd6V;ctY`njS7QXi1Xvz%zoMjizT)RN3`&6*Vi*LEzVc=!?mLfv<2WXylP8pNqhkH3z9y
zDn`dT(r`&7}hAcSLQ~fi`59LlUf5)jvSLgw@#FoVLgESxwrMbO&s))PjNa|yAZGNcKOa6a4NS~g*wVi
zY110xQxcQqREttwxb1tl>E2*ejI?i0?zl^c?t@`h%71l{%x&TByVR^Qs26QG9Q;a(
zGOt$3eD+LhO=NAuIillh)lBHk=6q&EA1Sqk^sCFLQc2&Sgv+KxgI+vZ!n|rM_!sOf
z5uOPaE}_*XO)4H
z5wwxbrXVX{YXWAJwtBS;r@O=3dH4y)0>8}ve%8K2k6X^_+UKae?lB!3djOd0QG=@
zz%t+@@CGXx6b)JjQ-UqPf#4KyCHM&26I1!`eS;EU3&8$Q7ZxUG10XTE8zIKG|68X|
z;(&UmEHq-|l;c}|{&x3JWs#C<_G^R2T4R?wy@G4up{k-xp-k$=V`B4**DcX7?PNJc
zc%Np=ea^iQXc;SytnB^EkFnUh@jM?_z@%xvgC6jS^=hYOZ!gbz#a+d1h#nj{H-u?4
zjX~b%E5m|}sVgr&nRjNArTun{K@JfAN!{T1*!5%G}JI8Rc(eAo`q|Y
zFAb@T)4F7)ql5J8e5lHqWArMW;y8K(fqjOZU$?%rA&6i|7*!=>jzlS@J15>V<9GiXiVstBXJj1uJ*`@q4Lh5x8~IDs2Jdnd{=AQ;FktVRL$Uhdgk1
zUiFOqcjm5xLlm!>pvnjf5c|H&ccN#{-v%cOvB2?c7GF)&?^nK`LeT!?nY(wkokb}y
zsQ_c7)eXd#qanlf%dxP7vSX`->@U$KKfkO`n(A?!_a}>vi#wxz)6U(#E|fi^lq0nn
zOx_ykNruM%HdqnqqD;xx9b*fm$#$5ET%L|xSZMG%Ib;^&$P=g_7FI{^PnP-F?h#T*
z3C#cJ-X8sG_h8|&W@WXpT*v9or6-~%>cfW78s~}%!i5}B(Cmf`s07o)Cphr9At#y%
zV7@SC($K+|xOQNNy}id=S;s6nw6?u~)tVItpln7p*=ZjYDM)92x+TFY74)@P8OV7QFxf
diff --git a/assets/font/acf.woff2 b/assets/font/acf.woff2
deleted file mode 100644
index 5835f80242a46700a462d84cac0c809ce0461b4d..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 4160
zcmV-G5WnwtPew8T0RR9101!X`4*&oF03Uz=01xK?0RR9100000000000000000000
z0000SR0dW6gmefX36^jX2nv;Cl28FQ0we=a3n~BvAO(dH2Z2!xfd(759J3Ks(9cgu0h9SLC>SW<+Glg<7A
zt(kUaO8h*~7L97H%KpvdGBY`tzMKnlAhyYY
zqAs7PDT4=Jsa(Za5Kv^5i`WZ~zVan1?fsjM>Bl1;7aS|=g=e3Blw{|_=WG#4Oq8@~
zU(g2#V6V4t0`Cb*=nt&Pcs9Wyn!N3)y(h>!{PC>2;}rLK0X|lq31F7P0gLSk=&jPk
z*W)6#7>J^*q~{hO5=mI6{>QVY6v_mQ(h?)HFk`r$K%_uIN|6#7WhzvuQKvyu`^Sq2
zk+I^h`Az8HXb3tQ1|1Ct9Ssj1jQ|~u2pvh`jv`5*NKz=0A{0ppiX?*~DMOJ|ph&7v
zBsD0KIuu2N72@QHG!Y(&>$PBIg7K3A1mAIxq__VVyuT%Weu`{vnf=e#YVV4eHUAT7
zNq%AHm2>b9w0=hr=HL++O|Cr#U5f9H@zJMlHgq_+7#x0%&Ro^rBW@c=V_`YuxgEbn?$6yIV_@KHH0Mr0dp$K@oZtwNrX!CSma$>X4b
z@YY<4z;PsKAZlp3HKD}gVQng{%M!96sk376tSA{=;OM)^L=J_EcJqo+RjFjGfdOD
zOkNWOX<8o<9yHPriw~@9I0y1fRYA^ijts=(%-ewv<&1mw2zcV!+H5?^&oj#
zC`?y9T__4rH!;*h9O@+=^^t)3NkjvrfCfo|hDaJej45ukHv*5~10DsPjRCN605$=@
zCIQ$K0GkG2GXQKBAT$SUuO&2JDpO0;t6ucRJE(-Y1(m%3=H320ch4fEk%l^G&APo$
zoqMjnR#H7nwKYg)OWT$8|Rsb7w5LHiDI&tSFI7~lFfeIzU#m&)hNDScQYXk
z-9`xWn=76zzyfc!k!?%L)vI<{rR}zyOSZFos&~1?53F{8szRF
zP!Y_OI5S+(csiO^zGAIyb5+81&bcG&m|7ZlH)|Kf{a%L^=V32b{?DJ&GdrDxF_
z!Lw$;J^AW#jVvszil%MVwqDfReR-`UH4Dq|uNbX7Xga*7$ZdPuICZWAF13$e83coz5~$p$zAz)=7$2Im9=
zcn$#11>kw$t3(3ud;nemzze~bND;t`0eA^OR;l-V@DTH|6FDCqEi1ZYVuCui>WmS`Io}+3{&wha0vD>D~
z+b}UwM5^#N5u|TdEp)Xm=8_shEmPvEHe_7pDefcSy+{;u!pQL=1!=kyfuLH#WtmxO
zNlg(d$4!t}+HN!^)|G;6yHDGW5+mqY3{$mAao{&fNT$wG=-wm<5>qr9Ini%|?5N^N
zjZnc=#KX%a06q>uvdJMBQ~No}n9Kf`Z>)VVsL{|!Rc0B}Js~AOJN)VC&yRf3La4>#
zrY}vvZf+CXN}p@A5tW6?e>zlCt5hPSsf&DM#8lpL0oW#ueC752#A&SjrYAR7SE0V!
z!04;(X;daBm0?d6D+>40zFDgCNe>&8c?vbbs#1S08Y^
zIc{-kK%pHswye>1pj061rorZgvS?5a}eP5N89I!^M>N?1N%-%((z9d#GBI19sPE$sidMbQUG
zhg4Dz80KyK_Rku&4HW%LE4(K?s`NmOriEv0_*mCy6
zM3&aV+LB20r6}}jTE=)rE*37oUV&b9eE*X#hF)>`DZ{}|*MVZYaI*e#lq`MoN7s@9
z?ig@;>kr9GhgRMy@QZdfZFt~I
zXy`2|nXMW&ES?BMUh)0!66w~qw+3tVfeii59+QdTc+NBS_S5fi9~%^sgxn|e6C-8N
zZq$2}uM-F-nC!ZbhQzTpdUTJI&`qLVt7N6L5WUerlh
zfHFq|c@Hw3Bs0N|)594z-J6%XyShfZt?o|y(7li^MXBv2({(4zICC>tPYk=MRu!#g
zwWroYMU~LHX0wvm1DnqOItz*AWo2;>aAOeIjxdVn(jGR4a>S$XOXw#V)(-0
z-FJ1$V!EObd*m#UoIfB)ex
z-ytthX=dc
zeZ9exC|McJ-kK?fa;cblAMGHK$77X(+TtDp6@BQnok?~FX1Z30!s>=3fxez*J*imx
z6=Lu>Z#^B|mK&+qli(>qQw^)4-kro3ECwWwpT>ml3C@IWYBq|g=;?0sH~TB)v|g+?
zj-;`bIbPma-H>RPeF$I}q#SY2J6E4WrkLdb;Y_X%MPSD)%TTkYIkU!dF3(C)waeOB
zHg97J-XGvCm=7-!oY}U|Bh1Sl!J+lz0bl}U
zW>9h+fZtwz^W~t;(%}$efppK1pA5Z8Fc)v%P>mc-Qo!Xvbvb$6~IfS>xk3_zi&hImNIzE#hj*Q
z6xe0XioOK)E3RmP5_?+2ahq0TfjiqT(d5lIMV(jk#GK~g@T
zOf-@OpLBwMpah|>tqA%$dUE_OY@QIM#-{C2!NybrYzbAf@HIUNytN?_IJsKF`$X31
zX-VcRbggr0v-4&091O%#%uG&RK~V)IN>x-znaZlDs#^6LHEY$Sa^1vGU2E%wsYzia
znwrC{MVp2pDR@3>tE9BG6@!YaOJw>=(N)6U%4%jP!Mf9uqsOYuQLd^f@%^yoZJ&TGHvspymd-GKRo`GqG)f?@+C86^IxYI
K|K4J>0RR9+1?V9F
diff --git a/assets/font/config.json b/assets/font/config.json
deleted file mode 100644
index 874f6cc..0000000
--- a/assets/font/config.json
+++ /dev/null
@@ -1,124 +0,0 @@
-{
- "name": "acf",
- "css_prefix_text": "acf-icon-",
- "css_use_suffix": false,
- "hinting": true,
- "units_per_em": 1000,
- "ascent": 850,
- "glyphs": [
- {
- "uid": "a73c5deb486c8d66249811642e5d719a",
- "css": "sync",
- "code": 59401,
- "src": "fontawesome"
- },
- {
- "uid": "7222571caa5c15f83dcfd447c58d68d9",
- "css": "search",
- "code": 59409,
- "src": "entypo"
- },
- {
- "uid": "14017aae737730faeda4a6fd8fb3a5f0",
- "css": "check",
- "code": 59404,
- "src": "entypo"
- },
- {
- "uid": "c709da589c923ba3c2ad48d9fc563e93",
- "css": "cancel",
- "code": 59394,
- "src": "entypo"
- },
- {
- "uid": "70370693ada58ef0a60fa0984fe8d52a",
- "css": "plus",
- "code": 59392,
- "src": "entypo"
- },
- {
- "uid": "1256e3054823e304d7e452a589cf8bb8",
- "css": "minus",
- "code": 59393,
- "src": "entypo"
- },
- {
- "uid": "a42b598e4298f3319b25a2702a02e7ff",
- "css": "location",
- "code": 59396,
- "src": "entypo"
- },
- {
- "uid": "0a3192de65a73ca1501b073ad601f87d",
- "css": "arrow-combo",
- "code": 59406,
- "src": "entypo"
- },
- {
- "uid": "8704cd847a47b64265b8bb110c8b4d62",
- "css": "down",
- "code": 59397,
- "src": "entypo"
- },
- {
- "uid": "c311c48d79488965b0fab7f9cd12b6b5",
- "css": "left",
- "code": 59398,
- "src": "entypo"
- },
- {
- "uid": "749e7d90a9182938180f1d2d8c33584e",
- "css": "right",
- "code": 59399,
- "src": "entypo"
- },
- {
- "uid": "9c7ff134960bb5a82404e4aeaab366d9",
- "css": "up",
- "code": 59400,
- "src": "entypo"
- },
- {
- "uid": "6a12c2b74456ea21cc984e11dec227a1",
- "css": "globe",
- "code": 59402,
- "src": "entypo"
- },
- {
- "uid": "d10920db2e79c997c5e783279291970c",
- "css": "dot-3",
- "code": 59405,
- "src": "entypo"
- },
- {
- "uid": "1e77a2yvsq3owssduo2lcgsiven57iv5",
- "css": "pencil",
- "code": 59395,
- "src": "typicons"
- },
- {
- "uid": "8ax1xqcbzz1hobyd4i7f0unwib1bztip",
- "css": "arrow-down",
- "code": 59407,
- "src": "modernpics"
- },
- {
- "uid": "6ipws8y9gej6vbloufvhi5qux7rluf64",
- "css": "arrow-up",
- "code": 59408,
- "src": "modernpics"
- },
- {
- "uid": "a1be363d4de9be39857893d4134f6215",
- "css": "picture",
- "code": 59403,
- "src": "elusive"
- },
- {
- "uid": "e15f0d620a7897e2035c18c80142f6d9",
- "css": "link-ext",
- "code": 61582,
- "src": "fontawesome"
- }
- ]
-}
\ No newline at end of file
diff --git a/assets/js/acf-field-group.js b/assets/js/acf-field-group.js
index b0d7651..85860fb 100644
--- a/assets/js/acf-field-group.js
+++ b/assets/js/acf-field-group.js
@@ -641,19 +641,24 @@
onClickDelete: function( e, $el ){
+ // Bypass confirmation when holding down "shift" key.
+ if( e.shiftKey ) {
+ return this.delete();
+ }
+
// add class
this.$el.addClass('-hover');
// add tooltip
- var self = this;
var tooltip = acf.newTooltip({
confirmRemove: true,
target: $el,
+ context: this,
confirm: function(){
- self.delete( true );
+ this.delete();
},
cancel: function(){
- self.$el.removeClass('-hover');
+ this.$el.removeClass('-hover');
}
});
},
@@ -1434,7 +1439,7 @@
conditionTypes.map(function( model ){
choices.push({
id: model.prototype.operator,
- text: acf.strEscape(model.prototype.label)
+ text: model.prototype.label
});
});
diff --git a/assets/js/acf-field-group.min.js b/assets/js/acf-field-group.min.js
index 03e32cd..1471848 100644
--- a/assets/js/acf-field-group.min.js
+++ b/assets/js/acf-field-group.min.js
@@ -1 +1 @@
-!function(o,e){var t=new acf.Model({id:"fieldGroupManager",events:{"submit #post":"onSubmit",'click a[href="#"]':"onClick","click .submitdelete":"onClickTrash"},filters:{find_fields_args:"filterFindFieldArgs"},onSubmit:function(e,t){var i=o("#titlewrap #title");i.val()||(e.preventDefault(),acf.unlockForm(t),alert(acf.__("Field group title is required")),i.focus())},onClick:function(e){e.preventDefault()},onClickTrash:function(e){var t;confirm(acf.__("Move to trash. Are you sure?"))||e.preventDefault()},filterFindFieldArgs:function(e){return e.visible=!0,e}}),i=new acf.Model({id:"screenOptionsManager",wait:"prepare",events:{change:"onChange"},initialize:function(){var e=o("#adv-settings"),t=o("#acf-append-show-on-screen");e.find(".metabox-prefs").append(t.html()),e.find(".metabox-prefs br").remove(),t.remove(),this.$el=o("#acf-field-key-hide"),this.render()},isChecked:function(){return this.$el.prop("checked")},onChange:function(e,t){var i=this.isChecked()?1:0;acf.updateUserSetting("show_field_keys",i),this.render()},render:function(){this.isChecked()?o("#acf-field-group-fields").addClass("show-field-keys"):o("#acf-field-group-fields").removeClass("show-field-keys")}}),n=new acf.Model({actions:{new_field:"onNewField"},onNewField:function(e){if(e.has("append")){var t=e.get("append"),i=e.$el.siblings('[data-name="'+t+'"]').first();if(i.length){var n=i.children(".acf-input"),a=n.children("ul");a.length||(n.wrapInner(''),a=n.children("ul"));var c=e.$(".acf-input").html(),l=o(""+c+" ");a.append(l),a.attr("data-cols",a.children().length),e.remove()}}}})}(jQuery),function(s,i){acf.FieldObject=acf.Model.extend({eventScope:".acf-field-object",events:{"click .edit-field":"onClickEdit","click .delete-field":"onClickDelete","click .duplicate-field":"duplicate","click .move-field":"move","change .field-type":"onChangeType","change .field-required":"onChangeRequired","blur .field-label":"onChangeLabel","blur .field-name":"onChangeName",change:"onChange",changed:"onChanged"},data:{id:0,key:"",type:""},setup:function(e){this.$el=e,this.inherit(e),this.prop("ID"),this.prop("parent"),this.prop("menu_order")},$input:function(e){return s("#"+this.getInputId()+"-"+e)},$meta:function(){return this.$(".meta:first")},$handle:function(){return this.$(".handle:first")},$settings:function(){return this.$(".settings:first")},$setting:function(e){return this.$(".acf-field-settings:first > .acf-field-setting-"+e)},getParent:function(){return acf.getFieldObjects({child:this.$el,limit:1}).pop()},getParents:function(){return acf.getFieldObjects({child:this.$el})},getFields:function(){return acf.getFieldObjects({parent:this.$el})},getInputName:function(){return"acf_fields["+this.get("id")+"]"},getInputId:function(){return"acf_fields-"+this.get("id")},newInput:function(e,t){var i=this.getInputId(),n=this.getInputName();e&&(i+="-"+e,n+="["+e+"]");var a=s(" ").attr({id:i,name:n,value:t});return this.$("> .meta").append(a),a},getProp:function(e){if(this.has(e))return this.get(e);var t=this.$input(e),i=t.length?t.val():null;return this.set(e,i,!0),i},setProp:function(e,t){var i=this.$input(e),n=i.val();return i.length||(i=this.newInput(e,t)),null===t?i.remove():i.val(t),this.has(e)?this.set(e,t):this.set(e,t,!0),this},prop:function(e,t){return t!==i?this.setProp(e,t):this.getProp(e)},props:function(t){Object.keys(t).map(function(e){this.setProp(e,t[e])},this)},getLabel:function(){var e=this.prop("label");return""===e&&(e=acf.__("(no label)")),e},getName:function(){return this.prop("name")},getType:function(){return this.prop("type")},getTypeLabel:function(){var e=this.prop("type"),t=acf.get("fieldTypes");return t[e]?t[e].label:e},getKey:function(){return this.prop("key")},initialize:function(){},render:function(){var e=this.$(".handle:first"),t=this.prop("menu_order"),i=this.getLabel(),n=this.prop("name"),a=this.getTypeLabel(),c=this.prop("key"),l=this.$input("required").prop("checked");e.find(".acf-icon").html(parseInt(t)+1),l&&(i+=' * '),e.find(".li-field-label strong a").html(i),e.find(".li-field-name").text(n),e.find(".li-field-type").text(a),e.find(".li-field-key").text(c),acf.doAction("render_field_object",this)},refresh:function(){acf.doAction("refresh_field_object",this)},isOpen:function(){return this.$el.hasClass("open")},onClickEdit:function(e){this.isOpen()?this.close():this.open()},open:function(){var e=this.$el.children(".settings");e.slideDown(),this.$el.addClass("open"),acf.doAction("open_field_object",this),this.trigger("openFieldObject"),acf.doAction("show",e)},close:function(){var e=this.$el.children(".settings");e.slideUp(),this.$el.removeClass("open"),acf.doAction("close_field_object",this),this.trigger("closeFieldObject"),acf.doAction("hide",e)},serialize:function(){return acf.serialize(this.$el,this.getInputName())},save:function(e){var t;e=e||"settings","settings"!==this.getProp("save")&&(this.setProp("save",e),this.$el.attr("data-save",e),acf.doAction("save_field_object",this,e))},submit:function(){var e=this.getInputName(),t=this.get("save");this.isOpen()&&this.close(),"settings"==t||("meta"==t?this.$('> .settings [name^="'+e+'"]').remove():this.$('[name^="'+e+'"]').remove()),acf.doAction("submit_field_object",this)},onChange:function(e,t){this.save(),acf.doAction("change_field_object",this)},onChanged:function(e,t,i,n){"save"!=i&&(-1<["menu_order","parent"].indexOf(i)?this.save("meta"):this.save(),-1<["menu_order","label","required","name","type","key"].indexOf(i)&&this.render(),acf.doAction("change_field_object_"+i,this,n))},onChangeLabel:function(e,t){var i=t.val();if(this.set("label",i),""==this.prop("name")){var n=acf.applyFilters("generate_field_object_name",acf.strSanitize(i),this);this.prop("name",n)}},onChangeName:function(e,t){var i=t.val();this.set("name",i),"field_"===i.substr(0,6)&&alert(acf.__('The string "field_" may not be used at the start of a field name'))},onChangeRequired:function(e,t){var i=t.prop("checked")?1:0;this.set("required",i)},delete:function(e){e=acf.parseArgs(e,{animate:!0});var t=this.prop("ID");if(t){var i=s("#_acf_delete_fields"),n=i.val()+"|"+t;i.val(n)}acf.doAction("delete_field_object",this),e.animate?this.removeAnimate():this.remove()},onClickDelete:function(e,t){this.$el.addClass("-hover");var i=this,n=acf.newTooltip({confirmRemove:!0,target:t,confirm:function(){i.delete(!0)},cancel:function(){i.$el.removeClass("-hover")}})},removeAnimate:function(){var e=this,t=this.$el.parent(),i=acf.findFieldObjects({sibling:this.$el});acf.remove({target:this.$el,endHeight:i.length?0:50,complete:function(){e.remove(),acf.doAction("removed_field_object",e,t)}}),acf.doAction("remove_field_object",e,t)},duplicate:function(){var e=acf.uniqid("field_"),t=acf.duplicate({target:this.$el,search:this.get("id"),replace:e});t.attr("data-key",e);var i=acf.getFieldObject(t);this.isOpen()?this.close():i.open();var n=i.$setting("label input");setTimeout(function(){n.focus()},251);var a=i.prop("label"),c=i.prop("name"),l=c.split("_").pop(),o=acf.__("copy");if(s.isNumeric(l)){var r=1*l+1;a=a.replace(l,r),c=c.replace(l,r)}else if(0===l.indexOf(o)){var r;r=(r=1*l.replace(o,""))?r+1:2,a=a.replace(l,o+r),c=c.replace(l,o+r)}else a+=" ("+o+")",c+="_"+o;i.prop("ID",0),i.prop("label",a),i.prop("name",c),i.prop("key",e),acf.doAction("duplicate_field_object",this,i),acf.doAction("append_field_object",i)},wipe:function(){var e=this.get("id"),t=this.get("key"),i=acf.uniqid("field_");acf.rename({target:this.$el,search:e,replace:i}),this.set("id",i),this.set("prevId",e),this.set("prevKey",t),this.prop("key",i),this.prop("ID",0),this.$el.attr("data-key",i),this.$el.attr("data-id",i),acf.doAction("wipe_field_object",this)},move:function(){var t=function(e){return"settings"==e.get("save")},i=t(this);if(i||acf.getFieldObjects({parent:this.$el}).map(function(e){i=t(e)||e.changed}),i)alert(acf.__("This field cannot be moved until its changes have been saved"));else{var n=this.prop("ID"),a=this,c=!1,e=function(){c=acf.newPopup({title:acf.__("Move Custom Field"),loading:!0,width:"300px"});var e={action:"acf/field_group/move_field",field_id:n};s.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(e),type:"post",dataType:"html",success:l})},l=function(e){c.loading(!1),c.content(e),c.on("submit","form",o)},o=function(e,t){e.preventDefault(),acf.startButtonLoading(c.$(".button"));var i={action:"acf/field_group/move_field",field_id:n,field_group_id:c.$("select").val()};s.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(i),type:"post",dataType:"html",success:r})},r=function(e){c.content(e),a.removeAnimate()};e()}},onChangeType:function(e,t){this.changeTimeout&&clearTimeout(this.changeTimeout),this.changeTimeout=this.setTimeout(function(){this.changeType(t.val())},300)},changeType:function(e){var t=this.prop("type"),i=acf.strSlugify("acf-field-object-"+t),n=acf.strSlugify("acf-field-object-"+e);this.$el.removeClass(i).addClass(n),this.$el.attr("data-type",e),this.$el.data("type",e),this.has("xhr")&&this.get("xhr").abort();var a=this.$("> .settings > table > tbody"),c=a.children('[data-setting="'+t+'"]');if(this.set("settings-"+t,c),c.detach(),this.has("settings-"+e)){var l=this.get("settings-"+e);return this.$setting("conditional_logic").before(l),void this.set("type",e)}var o=s('
');this.$setting("conditional_logic").before(o);var r={action:"acf/field_group/render_field_settings",field:this.serialize(),prefix:this.getInputName()},d=s.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(r),type:"post",dataType:"html",context:this,success:function(e){e&&(o.after(e),acf.doAction("append",a))},complete:function(){o.remove(),this.set("type",e)}});this.set("xhr",d)},updateParent:function(){var e=acf.get("post_id"),t=this.getParent();t&&(e=parseInt(t.prop("ID"))||t.prop("key")),this.prop("parent",e)}})}(jQuery),function(i,e){var l=function(e){return acf.strPascalCase(e||"")+"FieldSetting"};acf.registerFieldSetting=function(e){var t=e.prototype,i=l(t.type+" "+t.name);this.models[i]=e},acf.newFieldSetting=function(e){var t=e.get("setting")||"",i=e.get("name")||"",n=l(t+" "+i),a=acf.models[n]||null,c;return null!==a&&new a(e)},acf.getFieldSetting=function(e){return e instanceof jQuery&&(e=acf.getField(e)),e.setting};var t=new acf.Model({actions:{new_field:"onNewField"},onNewField:function(e){e.setting=acf.newFieldSetting(e)}});acf.FieldSetting=acf.Model.extend({field:!1,type:"",name:"",wait:"ready",eventScope:".acf-field",events:{change:"render"},setup:function(e){var t=e.$el;this.$el=t,this.field=e,this.$fieldObject=t.closest(".acf-field-object"),this.fieldObject=acf.getFieldObject(this.$fieldObject),i.extend(this.data,e.data)},initialize:function(){this.render()},render:function(){}});var n=acf.FieldSetting.extend({type:"",name:"",render:function(){var e=this.$('input[type="radio"]:checked');"other"!=e.val()&&this.$('input[type="text"]').val(e.val())}}),a=n.extend({type:"date_picker",name:"display_format"}),c=n.extend({type:"date_picker",name:"return_format"});acf.registerFieldSetting(a),acf.registerFieldSetting(c);var o=n.extend({type:"date_time_picker",name:"display_format"}),r=n.extend({type:"date_time_picker",name:"return_format"});acf.registerFieldSetting(o),acf.registerFieldSetting(r);var d=n.extend({type:"time_picker",name:"display_format"}),s=n.extend({name:"time_picker",name:"return_format"});acf.registerFieldSetting(d),acf.registerFieldSetting(s)}(jQuery),function(d,e){var t=acf.FieldSetting.extend({type:"",name:"conditional_logic",events:{"change .conditions-toggle":"onChangeToggle","click .add-conditional-group":"onClickAddGroup","focus .condition-rule-field":"onFocusField","change .condition-rule-field":"onChangeField","change .condition-rule-operator":"onChangeOperator","click .add-conditional-rule":"onClickAdd","click .remove-conditional-rule":"onClickRemove"},$rule:!1,scope:function(e){return this.$rule=e,this},ruleData:function(e,t){return this.$rule.data.apply(this.$rule,arguments)},$input:function(e){return this.$rule.find(".condition-rule-"+e)},$td:function(e){return this.$rule.find("td."+e)},$toggle:function(){return this.$(".conditions-toggle")},$control:function(){return this.$(".rule-groups")},$groups:function(){return this.$(".rule-group")},$rules:function(){return this.$(".rule")},open:function(){var e=this.$control();e.show(),acf.enable(e)},close:function(){var e=this.$control();e.hide(),acf.disable(e)},render:function(){this.$toggle().prop("checked")?(this.renderRules(),this.open()):this.close()},renderRules:function(){var e=this;this.$rules().each(function(){e.renderRule(d(this))})},renderRule:function(e){this.scope(e),this.renderField(),this.renderOperator(),this.renderValue()},renderField:function(){var a=[],e=[],c=this.fieldObject.cid,t=this.$input("field");acf.getFieldObjects().map(function(e){var t={id:e.getKey(),text:e.getLabel()},i;e.cid===c&&(t.text+=acf.__("(this field)"),t.disabled=!0),acf.getConditionTypes({fieldType:e.getType()}).length||(t.disabled=!0);var n=e.getParents().length;t.text="- ".repeat(n)+t.text,a.push(t)}),a.length||a.push({id:"",text:acf.__("No toggle fields available")}),acf.renderSelect(t,a),this.ruleData("field",t.val())},renderOperator:function(){if(this.ruleData("field")){var e=this.$input("operator"),t=e.val(),i=[];null===e.val()&&acf.renderSelect(e,[{id:this.ruleData("operator"),text:""}]);var n=acf.findFieldObject(this.ruleData("field")),a=acf.getFieldObject(n),c;acf.getConditionTypes({fieldType:a.getType()}).map(function(e){i.push({id:e.prototype.operator,text:acf.strEscape(e.prototype.label)})}),acf.renderSelect(e,i),this.ruleData("operator",e.val())}},renderValue:function(){if(this.ruleData("field")&&this.ruleData("operator")){var t=this.$input("value"),e=this.$td("value"),i=t.val(),n=acf.findFieldObject(this.ruleData("field")),a=acf.getFieldObject(n),c,l,o=acf.getConditionTypes({fieldType:a.getType(),operator:this.ruleData("operator")})[0].prototype.choices(a);if(o instanceof Array){var r=d(" ");acf.renderSelect(r,o)}else var r=d(o);t.detach(),e.html(r),setTimeout(function(){["class","name","id"].map(function(e){r.attr(e,t.attr(e))})},0),r.prop("disabled")||acf.val(r,i,!0),this.ruleData("value",r.val())}},onChangeToggle:function(){this.render()},onClickAddGroup:function(e,t){this.addGroup()},addGroup:function(){var e=this.$(".rule-group:last"),t=acf.duplicate(e);t.find("h4").text(acf.__("or")),t.find("tr").not(":first").remove(),this.fieldObject.save()},onFocusField:function(e,t){this.renderField()},onChangeField:function(e,t){this.scope(t.closest(".rule")),this.ruleData("field",t.val()),this.renderOperator(),this.renderValue()},onChangeOperator:function(e,t){this.scope(t.closest(".rule")),this.ruleData("operator",t.val()),this.renderValue()},onClickAdd:function(e,t){var i=acf.duplicate(t.closest(".rule"));this.renderRule(i)},onClickRemove:function(e,t){var i=t.closest(".rule");this.fieldObject.save(),0==i.siblings(".rule").length&&i.closest(".rule-group").remove(),i.remove()}});acf.registerFieldSetting(t);var i=new acf.Model({actions:{duplicate_field_objects:"onDuplicateFieldObjects"},onDuplicateFieldObjects:function(e,t,i){var n={},a=d();e.map(function(e){n[e.get("prevKey")]=e.get("key"),a=a.add(e.$(".condition-rule-field"))}),a.each(function(){var e=d(this),t=e.val();t&&n[t]&&(e.find("option:selected").attr("value",n[t]),e.val(n[t]))})}})}(jQuery),function(r,e){acf.findFieldObject=function(e){return acf.findFieldObjects({key:e,limit:1})},acf.findFieldObjects=function(e){e=e||{};var t=".acf-field-object",i=!1;return(e=acf.parseArgs(e,{id:"",key:"",type:"",limit:!1,list:null,parent:!1,sibling:!1,child:!1})).id&&(t+='[data-id="'+e.id+'"]'),e.key&&(t+='[data-key="'+e.key+'"]'),e.type&&(t+='[data-type="'+e.type+'"]'),i=e.list?e.list.children(t):e.parent?e.parent.find(t):e.sibling?e.sibling.siblings(t):e.child?e.child.parents(t):r(t),e.limit&&(i=i.slice(0,e.limit)),i},acf.getFieldObject=function(e){"string"==typeof e&&(e=acf.findFieldObject(e));var t=e.data("acf");return t||(t=acf.newFieldObject(e)),t},acf.getFieldObjects=function(e){var t=acf.findFieldObjects(e),i=[];return t.each(function(){var e=acf.getFieldObject(r(this));i.push(e)}),i},acf.newFieldObject=function(e){var t=new acf.FieldObject(e);return acf.doAction("new_field_object",t),t};var t=new acf.Model({priority:5,initialize:function(){var e;["prepare","ready","append","remove"].map(function(e){this.addFieldActions(e)},this)},addFieldActions:function(e){var n=e+"_field_objects",a=e+"_field_object",c=e+"FieldObject",t=function(e){var t=acf.getFieldObjects({parent:e});if(t.length){var i=acf.arrayArgs(arguments);i.splice(0,1,n,t),acf.doAction.apply(null,i)}},i=function(e){var t=acf.arrayArgs(arguments);t.unshift(a),e.map(function(e){t[1]=e,acf.doAction.apply(null,t)})},l=function(t){var i=acf.arrayArgs(arguments),e;i.unshift(a),["type","name","key"].map(function(e){i[0]=a+"/"+e+"="+t.get(e),acf.doAction.apply(null,i)}),i.splice(0,2),t.trigger(c,i)};acf.addAction(e,t,5),acf.addAction(n,i,5),acf.addAction(a,l,5)}}),i=new acf.Model({id:"fieldManager",events:{"submit #post":"onSubmit","mouseenter .acf-field-list":"onHoverSortable","click .add-field":"onClickAdd"},actions:{removed_field_object:"onRemovedField",sortstop_field_object:"onReorderField",delete_field_object:"onDeleteField",change_field_object_type:"onChangeFieldType",duplicate_field_object:"onDuplicateField"},onSubmit:function(e,t){var i;acf.getFieldObjects().map(function(e){e.submit()})},setFieldMenuOrder:function(e){this.renderFields(e.$el.parent())},onHoverSortable:function(e,n){n.hasClass("ui-sortable")||n.sortable({handle:".acf-sortable-handle",connectWith:".acf-field-list",start:function(e,t){var i=acf.getFieldObject(t.item);t.placeholder.height(t.item.height()),acf.doAction("sortstart_field_object",i,n)},update:function(e,t){var i=acf.getFieldObject(t.item);acf.doAction("sortstop_field_object",i,n)}})},onRemovedField:function(e,t){this.renderFields(t)},onReorderField:function(e,t){e.updateParent(),this.renderFields(t)},onDeleteField:function(e){e.getFields().map(function(e){e.delete({animate:!1})})},onChangeFieldType:function(e){},onDuplicateField:function(e,t){var i=t.getFields();i.length&&(i.map(function(e){e.wipe(),e.updateParent()}),acf.doAction("duplicate_field_objects",i,t,e)),this.setFieldMenuOrder(t)},renderFields:function(e){var t=acf.getFieldObjects({list:e});t.length?(e.removeClass("-empty"),t.map(function(e,t){e.prop("menu_order",t)})):e.addClass("-empty")},onClickAdd:function(e,t){var i=t.closest(".acf-tfoot").siblings(".acf-field-list");this.addField(i)},addField:function(i){var e=r("#tmpl-acf-field").html(),t=r(e),n=t.data("id"),a=acf.uniqid("field_"),c=acf.duplicate({target:t,search:n,replace:a,append:function(e,t){i.append(t)}}),l=acf.getFieldObject(c);l.prop("key",a),l.prop("ID",0),l.prop("label",""),l.prop("name",""),c.attr("data-key",a),c.attr("data-id",a),l.updateParent();var o=l.$input("label");setTimeout(function(){o.focus()},251),l.open(),this.renderFields(i),acf.doAction("add_field_object",l),acf.doAction("append_field_object",l)}})}(jQuery),function(a,e){var t=new acf.Model({id:"locationManager",wait:"ready",events:{"click .add-location-rule":"onClickAddRule","click .add-location-group":"onClickAddGroup","click .remove-location-rule":"onClickRemoveRule","change .refresh-location-rule":"onChangeRemoveRule"},initialize:function(){this.$el=a("#acf-field-group-locations")},onClickAddRule:function(e,t){this.addRule(t.closest("tr"))},onClickRemoveRule:function(e,t){this.removeRule(t.closest("tr"))},onChangeRemoveRule:function(e,t){this.changeRule(t.closest("tr"))},onClickAddGroup:function(e,t){this.addGroup()},addRule:function(e){acf.duplicate(e)},removeRule:function(e){0==e.siblings("tr").length?e.closest(".rule-group").remove():e.remove()},changeRule:function(t){var e=t.closest(".rule-group"),i=t.find("td.param select").attr("name").replace("[param]",""),n={action:"acf/field_group/render_location_rule"};n.rule=acf.serialize(t,i),n.rule.id=t.data("id"),n.rule.group=e.data("id"),acf.disable(t.find("td.value")),a.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(n),type:"post",dataType:"html",success:function(e){e&&t.replaceWith(e)}})},addGroup:function(){var e=this.$(".rule-group:last");$group2=acf.duplicate(e),$group2.find("h4").text(acf.__("or")),$group2.find("tr").not(":first").remove()}})}(jQuery),function(l,i){var e=acf.getCompatibility(acf);e.field_group={save_field:function(e,t){t=t!==i?t:"settings",acf.getFieldObject(e).save(t)},delete_field:function(e,t){t=t===i||t,acf.getFieldObject(e).delete({animate:t})},update_field_meta:function(e,t,i){acf.getFieldObject(e).prop(t,i)},delete_field_meta:function(e,t){acf.getFieldObject(e).prop(t,null)}},e.field_group.field_object=acf.model.extend({type:"",o:{},$field:null,$settings:null,tag:function(e){var t=this.type,i=e.split("_");return i.splice(1,0,"field"),e=i.join("_"),t&&(e+="/type="+t),e},selector:function(){var e=".acf-field-object",t=this.type;return t&&(e+="-"+t,e=acf.str_replace("_","-",e)),e},_add_action:function(e,t){var i=this;acf.add_action(this.tag(e),function(e){i.set("$field",e),i[t].apply(i,arguments)})},_add_filter:function(e,t){var i=this;acf.add_filter(this.tag(e),function(e){i.set("$field",e),i[t].apply(i,arguments)})},_add_event:function(e,t){var i=this,n=e.substr(0,e.indexOf(" ")),a=e.substr(e.indexOf(" ")+1),c=this.selector();l(document).on(n,c+" "+a,function(e){e.$el=l(this),e.$field=e.$el.closest(".acf-field-object"),i.set("$field",e.$field),i[t].apply(i,[e])})},_set_$field:function(){this.o=this.$field.data(),this.$settings=this.$field.find("> .settings > table > tbody"),this.focus()},focus:function(){},setting:function(e){return this.$settings.find("> .acf-field-setting-"+e)}});var t=new acf.Model({actions:{open_field_object:"onOpenFieldObject",close_field_object:"onCloseFieldObject",add_field_object:"onAddFieldObject",duplicate_field_object:"onDuplicateFieldObject",delete_field_object:"onDeleteFieldObject",change_field_object_type:"onChangeFieldObjectType",change_field_object_label:"onChangeFieldObjectLabel",change_field_object_name:"onChangeFieldObjectName",change_field_object_parent:"onChangeFieldObjectParent",sortstop_field_object:"onChangeFieldObjectParent"},onOpenFieldObject:function(e){acf.doAction("open_field",e.$el),acf.doAction("open_field/type="+e.get("type"),e.$el),acf.doAction("render_field_settings",e.$el),acf.doAction("render_field_settings/type="+e.get("type"),e.$el)},onCloseFieldObject:function(e){acf.doAction("close_field",e.$el),acf.doAction("close_field/type="+e.get("type"),e.$el)},onAddFieldObject:function(e){acf.doAction("add_field",e.$el),acf.doAction("add_field/type="+e.get("type"),e.$el)},onDuplicateFieldObject:function(e){acf.doAction("duplicate_field",e.$el),acf.doAction("duplicate_field/type="+e.get("type"),e.$el)},onDeleteFieldObject:function(e){acf.doAction("delete_field",e.$el),acf.doAction("delete_field/type="+e.get("type"),e.$el)},onChangeFieldObjectType:function(e){acf.doAction("change_field_type",e.$el),acf.doAction("change_field_type/type="+e.get("type"),e.$el),acf.doAction("render_field_settings",e.$el),acf.doAction("render_field_settings/type="+e.get("type"),e.$el)},onChangeFieldObjectLabel:function(e){acf.doAction("change_field_label",e.$el),acf.doAction("change_field_label/type="+e.get("type"),e.$el)},onChangeFieldObjectName:function(e){acf.doAction("change_field_name",e.$el),acf.doAction("change_field_name/type="+e.get("type"),e.$el)},onChangeFieldObjectParent:function(e){acf.doAction("update_field_parent",e.$el)}})}(jQuery);
\ No newline at end of file
+!function(e,t){var i=new acf.Model({id:"fieldGroupManager",events:{"submit #post":"onSubmit",'click a[href="#"]':"onClick","click .submitdelete":"onClickTrash"},filters:{find_fields_args:"filterFindFieldArgs"},onSubmit:function(t,i){var n=e("#titlewrap #title");n.val()||(t.preventDefault(),acf.unlockForm(i),alert(acf.__("Field group title is required")),n.focus())},onClick:function(e){e.preventDefault()},onClickTrash:function(e){var t;confirm(acf.__("Move to trash. Are you sure?"))||e.preventDefault()},filterFindFieldArgs:function(e){return e.visible=!0,e}}),n=new acf.Model({id:"screenOptionsManager",wait:"prepare",events:{change:"onChange"},initialize:function(){var t=e("#adv-settings"),i=e("#acf-append-show-on-screen");t.find(".metabox-prefs").append(i.html()),t.find(".metabox-prefs br").remove(),i.remove(),this.$el=e("#acf-field-key-hide"),this.render()},isChecked:function(){return this.$el.prop("checked")},onChange:function(e,t){var i=this.isChecked()?1:0;acf.updateUserSetting("show_field_keys",i),this.render()},render:function(){this.isChecked()?e("#acf-field-group-fields").addClass("show-field-keys"):e("#acf-field-group-fields").removeClass("show-field-keys")}}),a=new acf.Model({actions:{new_field:"onNewField"},onNewField:function(t){if(t.has("append")){var i=t.get("append"),n=t.$el.siblings('[data-name="'+i+'"]').first();if(n.length){var a=n.children(".acf-input"),l=a.children("ul");l.length||(a.wrapInner(''),l=a.children("ul"));var c=t.$(".acf-input").html(),o=e(""+c+" ");l.append(o),l.attr("data-cols",l.children().length),t.remove()}}}})}(jQuery),function(e,t){acf.FieldObject=acf.Model.extend({eventScope:".acf-field-object",events:{"click .edit-field":"onClickEdit","click .delete-field":"onClickDelete","click .duplicate-field":"duplicate","click .move-field":"move","change .field-type":"onChangeType","change .field-required":"onChangeRequired","blur .field-label":"onChangeLabel","blur .field-name":"onChangeName",change:"onChange",changed:"onChanged"},data:{id:0,key:"",type:""},setup:function(e){this.$el=e,this.inherit(e),this.prop("ID"),this.prop("parent"),this.prop("menu_order")},$input:function(t){return e("#"+this.getInputId()+"-"+t)},$meta:function(){return this.$(".meta:first")},$handle:function(){return this.$(".handle:first")},$settings:function(){return this.$(".settings:first")},$setting:function(e){return this.$(".acf-field-settings:first > .acf-field-setting-"+e)},getParent:function(){return acf.getFieldObjects({child:this.$el,limit:1}).pop()},getParents:function(){return acf.getFieldObjects({child:this.$el})},getFields:function(){return acf.getFieldObjects({parent:this.$el})},getInputName:function(){return"acf_fields["+this.get("id")+"]"},getInputId:function(){return"acf_fields-"+this.get("id")},newInput:function(t,i){var n=this.getInputId(),a=this.getInputName();t&&(n+="-"+t,a+="["+t+"]");var l=e(" ").attr({id:n,name:a,value:i});return this.$("> .meta").append(l),l},getProp:function(e){if(this.has(e))return this.get(e);var t=this.$input(e),i=t.length?t.val():null;return this.set(e,i,!0),i},setProp:function(e,t){var i=this.$input(e),n=i.val();return i.length||(i=this.newInput(e,t)),null===t?i.remove():i.val(t),this.has(e)?this.set(e,t):this.set(e,t,!0),this},prop:function(e,t){return void 0!==t?this.setProp(e,t):this.getProp(e)},props:function(e){Object.keys(e).map((function(t){this.setProp(t,e[t])}),this)},getLabel:function(){var e=this.prop("label");return""===e&&(e=acf.__("(no label)")),e},getName:function(){return this.prop("name")},getType:function(){return this.prop("type")},getTypeLabel:function(){var e=this.prop("type"),t=acf.get("fieldTypes");return t[e]?t[e].label:e},getKey:function(){return this.prop("key")},initialize:function(){},render:function(){var e=this.$(".handle:first"),t=this.prop("menu_order"),i=this.getLabel(),n=this.prop("name"),a=this.getTypeLabel(),l=this.prop("key"),c=this.$input("required").prop("checked");e.find(".acf-icon").html(parseInt(t)+1),c&&(i+=' * '),e.find(".li-field-label strong a").html(i),e.find(".li-field-name").text(n),e.find(".li-field-type").text(a),e.find(".li-field-key").text(l),acf.doAction("render_field_object",this)},refresh:function(){acf.doAction("refresh_field_object",this)},isOpen:function(){return this.$el.hasClass("open")},onClickEdit:function(e){this.isOpen()?this.close():this.open()},open:function(){var e=this.$el.children(".settings");e.slideDown(),this.$el.addClass("open"),acf.doAction("open_field_object",this),this.trigger("openFieldObject"),acf.doAction("show",e)},close:function(){var e=this.$el.children(".settings");e.slideUp(),this.$el.removeClass("open"),acf.doAction("close_field_object",this),this.trigger("closeFieldObject"),acf.doAction("hide",e)},serialize:function(){return acf.serialize(this.$el,this.getInputName())},save:function(e){var t;e=e||"settings","settings"!==this.getProp("save")&&(this.setProp("save",e),this.$el.attr("data-save",e),acf.doAction("save_field_object",this,e))},submit:function(){var e=this.getInputName(),t=this.get("save");this.isOpen()&&this.close(),"settings"==t||("meta"==t?this.$('> .settings [name^="'+e+'"]').remove():this.$('[name^="'+e+'"]').remove()),acf.doAction("submit_field_object",this)},onChange:function(e,t){this.save(),acf.doAction("change_field_object",this)},onChanged:function(e,t,i,n){"save"!=i&&(["menu_order","parent"].indexOf(i)>-1?this.save("meta"):this.save(),["menu_order","label","required","name","type","key"].indexOf(i)>-1&&this.render(),acf.doAction("change_field_object_"+i,this,n))},onChangeLabel:function(e,t){var i=t.val();if(this.set("label",i),""==this.prop("name")){var n=acf.applyFilters("generate_field_object_name",acf.strSanitize(i),this);this.prop("name",n)}},onChangeName:function(e,t){var i=t.val();this.set("name",i),"field_"===i.substr(0,6)&&alert(acf.__('The string "field_" may not be used at the start of a field name'))},onChangeRequired:function(e,t){var i=t.prop("checked")?1:0;this.set("required",i)},delete:function(t){t=acf.parseArgs(t,{animate:!0});var i=this.prop("ID");if(i){var n=e("#_acf_delete_fields"),a=n.val()+"|"+i;n.val(a)}acf.doAction("delete_field_object",this),t.animate?this.removeAnimate():this.remove()},onClickDelete:function(e,t){if(e.shiftKey)return this.delete();this.$el.addClass("-hover");var i=acf.newTooltip({confirmRemove:!0,target:t,context:this,confirm:function(){this.delete()},cancel:function(){this.$el.removeClass("-hover")}})},removeAnimate:function(){var e=this,t=this.$el.parent(),i=acf.findFieldObjects({sibling:this.$el});acf.remove({target:this.$el,endHeight:i.length?0:50,complete:function(){e.remove(),acf.doAction("removed_field_object",e,t)}}),acf.doAction("remove_field_object",e,t)},duplicate:function(){var t=acf.uniqid("field_"),i=acf.duplicate({target:this.$el,search:this.get("id"),replace:t});i.attr("data-key",t);var n=acf.getFieldObject(i);this.isOpen()?this.close():n.open();var a=n.$setting("label input");setTimeout((function(){a.focus()}),251);var l=n.prop("label"),c=n.prop("name"),o=c.split("_").pop(),r=acf.__("copy");if(e.isNumeric(o)){var d=1*o+1;l=l.replace(o,d),c=c.replace(o,d)}else if(0===o.indexOf(r)){var d;d=(d=1*o.replace(r,""))?d+1:2,l=l.replace(o,r+d),c=c.replace(o,r+d)}else l+=" ("+r+")",c+="_"+r;n.prop("ID",0),n.prop("label",l),n.prop("name",c),n.prop("key",t),acf.doAction("duplicate_field_object",this,n),acf.doAction("append_field_object",n)},wipe:function(){var e=this.get("id"),t=this.get("key"),i=acf.uniqid("field_");acf.rename({target:this.$el,search:e,replace:i}),this.set("id",i),this.set("prevId",e),this.set("prevKey",t),this.prop("key",i),this.prop("ID",0),this.$el.attr("data-key",i),this.$el.attr("data-id",i),acf.doAction("wipe_field_object",this)},move:function(){var t=function(e){return"settings"==e.get("save")},i=t(this);if(i||acf.getFieldObjects({parent:this.$el}).map((function(e){i=t(e)||e.changed})),i)alert(acf.__("This field cannot be moved until its changes have been saved"));else{var n=this.prop("ID"),a=this,l=!1,c=function(){l=acf.newPopup({title:acf.__("Move Custom Field"),loading:!0,width:"300px"});var t={action:"acf/field_group/move_field",field_id:n};e.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(t),type:"post",dataType:"html",success:o})},o=function(e){l.loading(!1),l.content(e),l.on("submit","form",r)},r=function(t,i){t.preventDefault(),acf.startButtonLoading(l.$(".button"));var a={action:"acf/field_group/move_field",field_id:n,field_group_id:l.$("select").val()};e.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(a),type:"post",dataType:"html",success:d})},d=function(e){l.content(e),a.removeAnimate()};c()}},onChangeType:function(e,t){this.changeTimeout&&clearTimeout(this.changeTimeout),this.changeTimeout=this.setTimeout((function(){this.changeType(t.val())}),300)},changeType:function(t){var i=this.prop("type"),n=acf.strSlugify("acf-field-object-"+i),a=acf.strSlugify("acf-field-object-"+t);this.$el.removeClass(n).addClass(a),this.$el.attr("data-type",t),this.$el.data("type",t),this.has("xhr")&&this.get("xhr").abort();var l=this.$("> .settings > table > tbody"),c=l.children('[data-setting="'+i+'"]');if(this.set("settings-"+i,c),c.detach(),this.has("settings-"+t)){var o=this.get("settings-"+t);return this.$setting("conditional_logic").before(o),void this.set("type",t)}var r=e('
');this.$setting("conditional_logic").before(r);var d={action:"acf/field_group/render_field_settings",field:this.serialize(),prefix:this.getInputName()},s=e.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(d),type:"post",dataType:"html",context:this,success:function(e){e&&(r.after(e),acf.doAction("append",l))},complete:function(){r.remove(),this.set("type",t)}});this.set("xhr",s)},updateParent:function(){var e=acf.get("post_id"),t=this.getParent();t&&(e=parseInt(t.prop("ID"))||t.prop("key")),this.prop("parent",e)}})}(jQuery),function(e,t){var i=function(e){return acf.strPascalCase(e||"")+"FieldSetting"};acf.registerFieldSetting=function(e){var t=e.prototype,n=i(t.type+" "+t.name);this.models[n]=e},acf.newFieldSetting=function(e){var t=e.get("setting")||"",n=e.get("name")||"",a=i(t+" "+n),l=acf.models[a]||null,c;return null!==l&&new l(e)},acf.getFieldSetting=function(e){return e instanceof jQuery&&(e=acf.getField(e)),e.setting};var n=new acf.Model({actions:{new_field:"onNewField"},onNewField:function(e){e.setting=acf.newFieldSetting(e)}});acf.FieldSetting=acf.Model.extend({field:!1,type:"",name:"",wait:"ready",eventScope:".acf-field",events:{change:"render"},setup:function(t){var i=t.$el;this.$el=i,this.field=t,this.$fieldObject=i.closest(".acf-field-object"),this.fieldObject=acf.getFieldObject(this.$fieldObject),e.extend(this.data,t.data)},initialize:function(){this.render()},render:function(){}});var a=acf.FieldSetting.extend({type:"",name:"",render:function(){var e=this.$('input[type="radio"]:checked');"other"!=e.val()&&this.$('input[type="text"]').val(e.val())}}),l=a.extend({type:"date_picker",name:"display_format"}),c=a.extend({type:"date_picker",name:"return_format"});acf.registerFieldSetting(l),acf.registerFieldSetting(c);var o=a.extend({type:"date_time_picker",name:"display_format"}),r=a.extend({type:"date_time_picker",name:"return_format"});acf.registerFieldSetting(o),acf.registerFieldSetting(r);var d=a.extend({type:"time_picker",name:"display_format"}),s=a.extend({name:"time_picker",name:"return_format"});acf.registerFieldSetting(d),acf.registerFieldSetting(s)}(jQuery),function(e,t){var i=acf.FieldSetting.extend({type:"",name:"conditional_logic",events:{"change .conditions-toggle":"onChangeToggle","click .add-conditional-group":"onClickAddGroup","focus .condition-rule-field":"onFocusField","change .condition-rule-field":"onChangeField","change .condition-rule-operator":"onChangeOperator","click .add-conditional-rule":"onClickAdd","click .remove-conditional-rule":"onClickRemove"},$rule:!1,scope:function(e){return this.$rule=e,this},ruleData:function(e,t){return this.$rule.data.apply(this.$rule,arguments)},$input:function(e){return this.$rule.find(".condition-rule-"+e)},$td:function(e){return this.$rule.find("td."+e)},$toggle:function(){return this.$(".conditions-toggle")},$control:function(){return this.$(".rule-groups")},$groups:function(){return this.$(".rule-group")},$rules:function(){return this.$(".rule")},open:function(){var e=this.$control();e.show(),acf.enable(e)},close:function(){var e=this.$control();e.hide(),acf.disable(e)},render:function(){this.$toggle().prop("checked")?(this.renderRules(),this.open()):this.close()},renderRules:function(){var t=this;this.$rules().each((function(){t.renderRule(e(this))}))},renderRule:function(e){this.scope(e),this.renderField(),this.renderOperator(),this.renderValue()},renderField:function(){var e=[],t=[],i=this.fieldObject.cid,n=this.$input("field");acf.getFieldObjects().map((function(t){var n={id:t.getKey(),text:t.getLabel()},a;t.cid===i&&(n.text+=acf.__("(this field)"),n.disabled=!0),acf.getConditionTypes({fieldType:t.getType()}).length||(n.disabled=!0);var l=t.getParents().length;n.text="- ".repeat(l)+n.text,e.push(n)})),e.length||e.push({id:"",text:acf.__("No toggle fields available")}),acf.renderSelect(n,e),this.ruleData("field",n.val())},renderOperator:function(){if(this.ruleData("field")){var e=this.$input("operator"),t=e.val(),i=[];null===e.val()&&acf.renderSelect(e,[{id:this.ruleData("operator"),text:""}]);var n=acf.findFieldObject(this.ruleData("field")),a=acf.getFieldObject(n),l;acf.getConditionTypes({fieldType:a.getType()}).map((function(e){i.push({id:e.prototype.operator,text:e.prototype.label})})),acf.renderSelect(e,i),this.ruleData("operator",e.val())}},renderValue:function(){if(this.ruleData("field")&&this.ruleData("operator")){var t=this.$input("value"),i=this.$td("value"),n=t.val(),a=acf.findFieldObject(this.ruleData("field")),l=acf.getFieldObject(a),c,o,r=acf.getConditionTypes({fieldType:l.getType(),operator:this.ruleData("operator")})[0].prototype.choices(l);if(r instanceof Array){var d=e(" ");acf.renderSelect(d,r)}else var d=e(r);t.detach(),i.html(d),setTimeout((function(){["class","name","id"].map((function(e){d.attr(e,t.attr(e))}))}),0),d.prop("disabled")||acf.val(d,n,!0),this.ruleData("value",d.val())}},onChangeToggle:function(){this.render()},onClickAddGroup:function(e,t){this.addGroup()},addGroup:function(){var e=this.$(".rule-group:last"),t=acf.duplicate(e);t.find("h4").text(acf.__("or")),t.find("tr").not(":first").remove(),this.fieldObject.save()},onFocusField:function(e,t){this.renderField()},onChangeField:function(e,t){this.scope(t.closest(".rule")),this.ruleData("field",t.val()),this.renderOperator(),this.renderValue()},onChangeOperator:function(e,t){this.scope(t.closest(".rule")),this.ruleData("operator",t.val()),this.renderValue()},onClickAdd:function(e,t){var i=acf.duplicate(t.closest(".rule"));this.renderRule(i)},onClickRemove:function(e,t){var i=t.closest(".rule");this.fieldObject.save(),0==i.siblings(".rule").length&&i.closest(".rule-group").remove(),i.remove()}});acf.registerFieldSetting(i);var n=new acf.Model({actions:{duplicate_field_objects:"onDuplicateFieldObjects"},onDuplicateFieldObjects:function(t,i,n){var a={},l=e();t.map((function(e){a[e.get("prevKey")]=e.get("key"),l=l.add(e.$(".condition-rule-field"))})),l.each((function(){var t=e(this),i=t.val();i&&a[i]&&(t.find("option:selected").attr("value",a[i]),t.val(a[i]))}))}})}(jQuery),function(e,t){acf.findFieldObject=function(e){return acf.findFieldObjects({key:e,limit:1})},acf.findFieldObjects=function(t){t=t||{};var i=".acf-field-object",n=!1;return(t=acf.parseArgs(t,{id:"",key:"",type:"",limit:!1,list:null,parent:!1,sibling:!1,child:!1})).id&&(i+='[data-id="'+t.id+'"]'),t.key&&(i+='[data-key="'+t.key+'"]'),t.type&&(i+='[data-type="'+t.type+'"]'),n=t.list?t.list.children(i):t.parent?t.parent.find(i):t.sibling?t.sibling.siblings(i):t.child?t.child.parents(i):e(i),t.limit&&(n=n.slice(0,t.limit)),n},acf.getFieldObject=function(e){"string"==typeof e&&(e=acf.findFieldObject(e));var t=e.data("acf");return t||(t=acf.newFieldObject(e)),t},acf.getFieldObjects=function(t){var i=acf.findFieldObjects(t),n=[];return i.each((function(){var t=acf.getFieldObject(e(this));n.push(t)})),n},acf.newFieldObject=function(e){var t=new acf.FieldObject(e);return acf.doAction("new_field_object",t),t};var i=new acf.Model({priority:5,initialize:function(){var e;["prepare","ready","append","remove"].map((function(e){this.addFieldActions(e)}),this)},addFieldActions:function(e){var t=e+"_field_objects",i=e+"_field_object",n=e+"FieldObject",a=function(e){var i=acf.getFieldObjects({parent:e});if(i.length){var n=acf.arrayArgs(arguments);n.splice(0,1,t,i),acf.doAction.apply(null,n)}},l=function(e){var t=acf.arrayArgs(arguments);t.unshift(i),e.map((function(e){t[1]=e,acf.doAction.apply(null,t)}))},c=function(e){var t=acf.arrayArgs(arguments);t.unshift(i);var a=["type","name","key"];a.map((function(n){t[0]=i+"/"+n+"="+e.get(n),acf.doAction.apply(null,t)})),t.splice(0,2),e.trigger(n,t)};acf.addAction(e,a,5),acf.addAction(t,l,5),acf.addAction(i,c,5)}}),n=new acf.Model({id:"fieldManager",events:{"submit #post":"onSubmit","mouseenter .acf-field-list":"onHoverSortable","click .add-field":"onClickAdd"},actions:{removed_field_object:"onRemovedField",sortstop_field_object:"onReorderField",delete_field_object:"onDeleteField",change_field_object_type:"onChangeFieldType",duplicate_field_object:"onDuplicateField"},onSubmit:function(e,t){var i;acf.getFieldObjects().map((function(e){e.submit()}))},setFieldMenuOrder:function(e){this.renderFields(e.$el.parent())},onHoverSortable:function(e,t){t.hasClass("ui-sortable")||t.sortable({handle:".acf-sortable-handle",connectWith:".acf-field-list",start:function(e,i){var n=acf.getFieldObject(i.item);i.placeholder.height(i.item.height()),acf.doAction("sortstart_field_object",n,t)},update:function(e,i){var n=acf.getFieldObject(i.item);acf.doAction("sortstop_field_object",n,t)}})},onRemovedField:function(e,t){this.renderFields(t)},onReorderField:function(e,t){e.updateParent(),this.renderFields(t)},onDeleteField:function(e){e.getFields().map((function(e){e.delete({animate:!1})}))},onChangeFieldType:function(e){},onDuplicateField:function(e,t){var i=t.getFields();i.length&&(i.map((function(e){e.wipe(),e.updateParent()})),acf.doAction("duplicate_field_objects",i,t,e)),this.setFieldMenuOrder(t)},renderFields:function(e){var t=acf.getFieldObjects({list:e});t.length?(e.removeClass("-empty"),t.map((function(e,t){e.prop("menu_order",t)}))):e.addClass("-empty")},onClickAdd:function(e,t){var i=t.closest(".acf-tfoot").siblings(".acf-field-list");this.addField(i)},addField:function(t){var i=e("#tmpl-acf-field").html(),n=e(i),a=n.data("id"),l=acf.uniqid("field_"),c=acf.duplicate({target:n,search:a,replace:l,append:function(e,i){t.append(i)}}),o=acf.getFieldObject(c);o.prop("key",l),o.prop("ID",0),o.prop("label",""),o.prop("name",""),c.attr("data-key",l),c.attr("data-id",l),o.updateParent();var r=o.$input("label");setTimeout((function(){r.focus()}),251),o.open(),this.renderFields(t),acf.doAction("add_field_object",o),acf.doAction("append_field_object",o)}})}(jQuery),function(e,t){var i=new acf.Model({id:"locationManager",wait:"ready",events:{"click .add-location-rule":"onClickAddRule","click .add-location-group":"onClickAddGroup","click .remove-location-rule":"onClickRemoveRule","change .refresh-location-rule":"onChangeRemoveRule"},initialize:function(){this.$el=e("#acf-field-group-locations")},onClickAddRule:function(e,t){this.addRule(t.closest("tr"))},onClickRemoveRule:function(e,t){this.removeRule(t.closest("tr"))},onChangeRemoveRule:function(e,t){this.changeRule(t.closest("tr"))},onClickAddGroup:function(e,t){this.addGroup()},addRule:function(e){acf.duplicate(e)},removeRule:function(e){0==e.siblings("tr").length?e.closest(".rule-group").remove():e.remove()},changeRule:function(t){var i=t.closest(".rule-group"),n=t.find("td.param select").attr("name").replace("[param]",""),a={action:"acf/field_group/render_location_rule"};a.rule=acf.serialize(t,n),a.rule.id=t.data("id"),a.rule.group=i.data("id"),acf.disable(t.find("td.value")),e.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(a),type:"post",dataType:"html",success:function(e){e&&t.replaceWith(e)}})},addGroup:function(){var e=this.$(".rule-group:last");$group2=acf.duplicate(e),$group2.find("h4").text(acf.__("or")),$group2.find("tr").not(":first").remove()}})}(jQuery),function(e,t){var i=acf.getCompatibility(acf);i.field_group={save_field:function(e,t){t=void 0!==t?t:"settings",acf.getFieldObject(e).save(t)},delete_field:function(e,t){t=void 0===t||t,acf.getFieldObject(e).delete({animate:t})},update_field_meta:function(e,t,i){acf.getFieldObject(e).prop(t,i)},delete_field_meta:function(e,t){acf.getFieldObject(e).prop(t,null)}},i.field_group.field_object=acf.model.extend({type:"",o:{},$field:null,$settings:null,tag:function(e){var t=this.type,i=e.split("_");return i.splice(1,0,"field"),e=i.join("_"),t&&(e+="/type="+t),e},selector:function(){var e=".acf-field-object",t=this.type;return t&&(e+="-"+t,e=acf.str_replace("_","-",e)),e},_add_action:function(e,t){var i=this;acf.add_action(this.tag(e),(function(e){i.set("$field",e),i[t].apply(i,arguments)}))},_add_filter:function(e,t){var i=this;acf.add_filter(this.tag(e),(function(e){i.set("$field",e),i[t].apply(i,arguments)}))},_add_event:function(t,i){var n=this,a=t.substr(0,t.indexOf(" ")),l=t.substr(t.indexOf(" ")+1),c=this.selector();e(document).on(a,c+" "+l,(function(t){t.$el=e(this),t.$field=t.$el.closest(".acf-field-object"),n.set("$field",t.$field),n[i].apply(n,[t])}))},_set_$field:function(){this.o=this.$field.data(),this.$settings=this.$field.find("> .settings > table > tbody"),this.focus()},focus:function(){},setting:function(e){return this.$settings.find("> .acf-field-setting-"+e)}});var n=new acf.Model({actions:{open_field_object:"onOpenFieldObject",close_field_object:"onCloseFieldObject",add_field_object:"onAddFieldObject",duplicate_field_object:"onDuplicateFieldObject",delete_field_object:"onDeleteFieldObject",change_field_object_type:"onChangeFieldObjectType",change_field_object_label:"onChangeFieldObjectLabel",change_field_object_name:"onChangeFieldObjectName",change_field_object_parent:"onChangeFieldObjectParent",sortstop_field_object:"onChangeFieldObjectParent"},onOpenFieldObject:function(e){acf.doAction("open_field",e.$el),acf.doAction("open_field/type="+e.get("type"),e.$el),acf.doAction("render_field_settings",e.$el),acf.doAction("render_field_settings/type="+e.get("type"),e.$el)},onCloseFieldObject:function(e){acf.doAction("close_field",e.$el),acf.doAction("close_field/type="+e.get("type"),e.$el)},onAddFieldObject:function(e){acf.doAction("add_field",e.$el),acf.doAction("add_field/type="+e.get("type"),e.$el)},onDuplicateFieldObject:function(e){acf.doAction("duplicate_field",e.$el),acf.doAction("duplicate_field/type="+e.get("type"),e.$el)},onDeleteFieldObject:function(e){acf.doAction("delete_field",e.$el),acf.doAction("delete_field/type="+e.get("type"),e.$el)},onChangeFieldObjectType:function(e){acf.doAction("change_field_type",e.$el),acf.doAction("change_field_type/type="+e.get("type"),e.$el),acf.doAction("render_field_settings",e.$el),acf.doAction("render_field_settings/type="+e.get("type"),e.$el)},onChangeFieldObjectLabel:function(e){acf.doAction("change_field_label",e.$el),acf.doAction("change_field_label/type="+e.get("type"),e.$el)},onChangeFieldObjectName:function(e){acf.doAction("change_field_name",e.$el),acf.doAction("change_field_name/type="+e.get("type"),e.$el)},onChangeFieldObjectParent:function(e){acf.doAction("update_field_parent",e.$el)}})}(jQuery);
\ No newline at end of file
diff --git a/assets/js/acf-input.js b/assets/js/acf-input.js
index a7c6401..825933f 100644
--- a/assets/js/acf-input.js
+++ b/assets/js/acf-input.js
@@ -1,4438 +1,3 @@
-(function($, undefined){
-
- /**
- * acf
- *
- * description
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- // The global acf object
- var acf = {};
-
- // Set as a browser global
- window.acf = acf;
-
- /** @var object Data sent from PHP */
- acf.data = {};
-
-
- /**
- * get
- *
- * Gets a specific data value
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param string name
- * @return mixed
- */
-
- acf.get = function( name ){
- return this.data[name] || null;
- };
-
-
- /**
- * has
- *
- * Returns `true` if the data exists and is not null
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param string name
- * @return boolean
- */
-
- acf.has = function( name ){
- return this.get(name) !== null;
- };
-
-
- /**
- * set
- *
- * Sets a specific data value
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param string name
- * @param mixed value
- * @return this
- */
-
- acf.set = function( name, value ){
- this.data[ name ] = value;
- return this;
- };
-
-
- /**
- * uniqueId
- *
- * Returns a unique ID
- *
- * @date 9/11/17
- * @since 5.6.3
- *
- * @param string prefix Optional prefix.
- * @return string
- */
-
- var idCounter = 0;
- acf.uniqueId = function(prefix){
- var id = ++idCounter + '';
- return prefix ? prefix + id : id;
- };
-
- /**
- * acf.uniqueArray
- *
- * Returns a new array with only unique values
- * Credit: https://stackoverflow.com/questions/1960473/get-all-unique-values-in-an-array-remove-duplicates
- *
- * @date 23/3/18
- * @since 5.6.9
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.uniqueArray = function( array ){
- function onlyUnique(value, index, self) {
- return self.indexOf(value) === index;
- }
- return array.filter( onlyUnique );
- };
-
- /**
- * uniqid
- *
- * Returns a unique ID (PHP version)
- *
- * @date 9/11/17
- * @since 5.6.3
- * @source http://locutus.io/php/misc/uniqid/
- *
- * @param string prefix Optional prefix.
- * @return string
- */
-
- var uniqidSeed = '';
- acf.uniqid = function(prefix, moreEntropy){
- // discuss at: http://locutus.io/php/uniqid/
- // original by: Kevin van Zonneveld (http://kvz.io)
- // revised by: Kankrelune (http://www.webfaktory.info/)
- // note 1: Uses an internal counter (in locutus global) to avoid collision
- // example 1: var $id = uniqid()
- // example 1: var $result = $id.length === 13
- // returns 1: true
- // example 2: var $id = uniqid('foo')
- // example 2: var $result = $id.length === (13 + 'foo'.length)
- // returns 2: true
- // example 3: var $id = uniqid('bar', true)
- // example 3: var $result = $id.length === (23 + 'bar'.length)
- // returns 3: true
- if (typeof prefix === 'undefined') {
- prefix = '';
- }
-
- var retId;
- var formatSeed = function(seed, reqWidth) {
- seed = parseInt(seed, 10).toString(16); // to hex str
- if (reqWidth < seed.length) { // so long we split
- return seed.slice(seed.length - reqWidth);
- }
- if (reqWidth > seed.length) { // so short we pad
- return Array(1 + (reqWidth - seed.length)).join('0') + seed;
- }
- return seed;
- };
-
- if (!uniqidSeed) { // init seed with big random int
- uniqidSeed = Math.floor(Math.random() * 0x75bcd15);
- }
- uniqidSeed++;
-
- retId = prefix; // start with prefix, add current milliseconds hex string
- retId += formatSeed(parseInt(new Date().getTime() / 1000, 10), 8);
- retId += formatSeed(uniqidSeed, 5); // add seed hex string
- if (moreEntropy) {
- // for more entropy we add a float lower to 10
- retId += (Math.random() * 10).toFixed(8).toString();
- }
-
- return retId;
- };
-
-
- /**
- * strReplace
- *
- * Performs a string replace
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param string search
- * @param string replace
- * @param string subject
- * @return string
- */
-
- acf.strReplace = function( search, replace, subject ){
- return subject.split(search).join(replace);
- };
-
-
- /**
- * strCamelCase
- *
- * Converts a string into camelCase
- * Thanks to https://stackoverflow.com/questions/2970525/converting-any-string-into-camel-case
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param string str
- * @return string
- */
-
- acf.strCamelCase = function( str ){
-
- // replace [_-] characters with space
- str = str.replace(/[_-]/g, ' ');
-
- // camelCase
- str = str.replace(/(?:^\w|\b\w|\s+)/g, function(match, index) {
- if (+match === 0) return ""; // or if (/\s+/.test(match)) for white spaces
- return index == 0 ? match.toLowerCase() : match.toUpperCase();
- });
-
- // return
- return str;
- };
-
- /**
- * strPascalCase
- *
- * Converts a string into PascalCase
- * Thanks to https://stackoverflow.com/questions/1026069/how-do-i-make-the-first-letter-of-a-string-uppercase-in-javascript
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param string str
- * @return string
- */
-
- acf.strPascalCase = function( str ){
- var camel = acf.strCamelCase( str );
- return camel.charAt(0).toUpperCase() + camel.slice(1);
- };
-
- /**
- * acf.strSlugify
- *
- * Converts a string into a HTML class friendly slug
- *
- * @date 21/3/18
- * @since 5.6.9
- *
- * @param string str
- * @return string
- */
-
- acf.strSlugify = function( str ){
- return acf.strReplace( '_', '-', str.toLowerCase() );
- };
-
-
- acf.strSanitize = function( str ){
-
- // chars (https://jsperf.com/replace-foreign-characters)
- var map = {
- "À": "A",
- "Á": "A",
- "Â": "A",
- "Ã": "A",
- "Ä": "A",
- "Å": "A",
- "Æ": "AE",
- "Ç": "C",
- "È": "E",
- "É": "E",
- "Ê": "E",
- "Ë": "E",
- "Ì": "I",
- "Í": "I",
- "Î": "I",
- "Ï": "I",
- "Ð": "D",
- "Ñ": "N",
- "Ò": "O",
- "Ó": "O",
- "Ô": "O",
- "Õ": "O",
- "Ö": "O",
- "Ø": "O",
- "Ù": "U",
- "Ú": "U",
- "Û": "U",
- "Ü": "U",
- "Ý": "Y",
- "ß": "s",
- "à": "a",
- "á": "a",
- "â": "a",
- "ã": "a",
- "ä": "a",
- "å": "a",
- "æ": "ae",
- "ç": "c",
- "è": "e",
- "é": "e",
- "ê": "e",
- "ë": "e",
- "ì": "i",
- "í": "i",
- "î": "i",
- "ï": "i",
- "ñ": "n",
- "ò": "o",
- "ó": "o",
- "ô": "o",
- "õ": "o",
- "ö": "o",
- "ø": "o",
- "ù": "u",
- "ú": "u",
- "û": "u",
- "ü": "u",
- "ý": "y",
- "ÿ": "y",
- "Ā": "A",
- "ā": "a",
- "Ă": "A",
- "ă": "a",
- "Ą": "A",
- "ą": "a",
- "Ć": "C",
- "ć": "c",
- "Ĉ": "C",
- "ĉ": "c",
- "Ċ": "C",
- "ċ": "c",
- "Č": "C",
- "č": "c",
- "Ď": "D",
- "ď": "d",
- "Đ": "D",
- "đ": "d",
- "Ē": "E",
- "ē": "e",
- "Ĕ": "E",
- "ĕ": "e",
- "Ė": "E",
- "ė": "e",
- "Ę": "E",
- "ę": "e",
- "Ě": "E",
- "ě": "e",
- "Ĝ": "G",
- "ĝ": "g",
- "Ğ": "G",
- "ğ": "g",
- "Ġ": "G",
- "ġ": "g",
- "Ģ": "G",
- "ģ": "g",
- "Ĥ": "H",
- "ĥ": "h",
- "Ħ": "H",
- "ħ": "h",
- "Ĩ": "I",
- "ĩ": "i",
- "Ī": "I",
- "ī": "i",
- "Ĭ": "I",
- "ĭ": "i",
- "Į": "I",
- "į": "i",
- "İ": "I",
- "ı": "i",
- "IJ": "IJ",
- "ij": "ij",
- "Ĵ": "J",
- "ĵ": "j",
- "Ķ": "K",
- "ķ": "k",
- "Ĺ": "L",
- "ĺ": "l",
- "Ļ": "L",
- "ļ": "l",
- "Ľ": "L",
- "ľ": "l",
- "Ŀ": "L",
- "ŀ": "l",
- "Ł": "l",
- "ł": "l",
- "Ń": "N",
- "ń": "n",
- "Ņ": "N",
- "ņ": "n",
- "Ň": "N",
- "ň": "n",
- "ʼn": "n",
- "Ō": "O",
- "ō": "o",
- "Ŏ": "O",
- "ŏ": "o",
- "Ő": "O",
- "ő": "o",
- "Œ": "OE",
- "œ": "oe",
- "Ŕ": "R",
- "ŕ": "r",
- "Ŗ": "R",
- "ŗ": "r",
- "Ř": "R",
- "ř": "r",
- "Ś": "S",
- "ś": "s",
- "Ŝ": "S",
- "ŝ": "s",
- "Ş": "S",
- "ş": "s",
- "Š": "S",
- "š": "s",
- "Ţ": "T",
- "ţ": "t",
- "Ť": "T",
- "ť": "t",
- "Ŧ": "T",
- "ŧ": "t",
- "Ũ": "U",
- "ũ": "u",
- "Ū": "U",
- "ū": "u",
- "Ŭ": "U",
- "ŭ": "u",
- "Ů": "U",
- "ů": "u",
- "Ű": "U",
- "ű": "u",
- "Ų": "U",
- "ų": "u",
- "Ŵ": "W",
- "ŵ": "w",
- "Ŷ": "Y",
- "ŷ": "y",
- "Ÿ": "Y",
- "Ź": "Z",
- "ź": "z",
- "Ż": "Z",
- "ż": "z",
- "Ž": "Z",
- "ž": "z",
- "ſ": "s",
- "ƒ": "f",
- "Ơ": "O",
- "ơ": "o",
- "Ư": "U",
- "ư": "u",
- "Ǎ": "A",
- "ǎ": "a",
- "Ǐ": "I",
- "ǐ": "i",
- "Ǒ": "O",
- "ǒ": "o",
- "Ǔ": "U",
- "ǔ": "u",
- "Ǖ": "U",
- "ǖ": "u",
- "Ǘ": "U",
- "ǘ": "u",
- "Ǚ": "U",
- "ǚ": "u",
- "Ǜ": "U",
- "ǜ": "u",
- "Ǻ": "A",
- "ǻ": "a",
- "Ǽ": "AE",
- "ǽ": "ae",
- "Ǿ": "O",
- "ǿ": "o",
-
- // extra
- ' ': '_',
- "'": '',
- '?': '',
- '/': '',
- '\\': '',
- '.': '',
- ',': '',
- '`': '',
- '>': '',
- '<': '',
- '"': '',
- '[': '',
- ']': '',
- '|': '',
- '{': '',
- '}': '',
- '(': '',
- ')': ''
- };
-
- // vars
- var nonWord = /\W/g;
- var mapping = function (c) {
- return (map[c] !== undefined) ? map[c] : c;
- };
-
- // replace
- str = str.replace(nonWord, mapping);
-
- // lowercase
- str = str.toLowerCase();
-
- // return
- return str;
- };
-
- /**
- * acf.strMatch
- *
- * Returns the number of characters that match between two strings
- *
- * @date 1/2/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.strMatch = function( s1, s2 ){
-
- // vars
- var val = 0;
- var min = Math.min( s1.length, s2.length );
-
- // loop
- for( var i = 0; i < min; i++ ) {
- if( s1[i] !== s2[i] ) {
- break;
- }
- val++;
- }
-
- // return
- return val;
- };
-
- /**
- * acf.decode
- *
- * description
- *
- * @date 13/1/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.decode = function( string ){
- return $('').html( string ).text();
- };
-
- /**
- * acf.strEscape
- *
- * description
- *
- * @date 3/2/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.strEscape = function( string ){
- return $('').text(string).html();
- };
-
- /**
- * parseArgs
- *
- * Merges together defaults and args much like the WP wp_parse_args function
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param object args
- * @param object defaults
- * @return object
- */
-
- acf.parseArgs = function( args, defaults ){
- if( typeof args !== 'object' ) args = {};
- if( typeof defaults !== 'object' ) defaults = {};
- return $.extend({}, defaults, args);
- }
-
- /**
- * __
- *
- * Retrieve the translation of $text.
- *
- * @date 16/4/18
- * @since 5.6.9
- *
- * @param string text Text to translate.
- * @return string Translated text.
- */
-
- if( window.acfL10n == undefined ) {
- acfL10n = {};
- }
-
- acf.__ = function( text ){
- return acfL10n[ text ] || text;
- };
-
- /**
- * _x
- *
- * Retrieve translated string with gettext context.
- *
- * @date 16/4/18
- * @since 5.6.9
- *
- * @param string text Text to translate.
- * @param string context Context information for the translators.
- * @return string Translated text.
- */
-
- acf._x = function( text, context ){
- return acfL10n[ text + '.' + context ] || acfL10n[ text ] || text;
- };
-
- /**
- * _n
- *
- * Retrieve the plural or single form based on the amount.
- *
- * @date 16/4/18
- * @since 5.6.9
- *
- * @param string single Single text to translate.
- * @param string plural Plural text to translate.
- * @param int number The number to compare against.
- * @return string Translated text.
- */
-
- acf._n = function( single, plural, number ){
- if( number == 1 ) {
- return acf.__(single);
- } else {
- return acf.__(plural);
- }
- };
-
- acf.isArray = function( a ){
- return Array.isArray(a);
- };
-
- acf.isObject = function( a ){
- return ( typeof a === 'object' );
- }
-
- /**
- * serialize
- *
- * description
- *
- * @date 24/12/17
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- var buildObject = function( obj, name, value ){
-
- // replace [] with placeholder
- name = name.replace('[]', '[%%index%%]');
-
- // vars
- var keys = name.match(/([^\[\]])+/g);
- if( !keys ) return;
- var length = keys.length;
- var ref = obj;
-
- // loop
- for( var i = 0; i < length; i++ ) {
-
- // vars
- var key = String( keys[i] );
-
- // value
- if( i == length - 1 ) {
-
- // %%index%%
- if( key === '%%index%%' ) {
- ref.push( value );
-
- // default
- } else {
- ref[ key ] = value;
- }
-
- // path
- } else {
-
- // array
- if( keys[i+1] === '%%index%%' ) {
- if( !acf.isArray(ref[ key ]) ) {
- ref[ key ] = [];
- }
-
- // object
- } else {
- if( !acf.isObject(ref[ key ]) ) {
- ref[ key ] = {};
- }
- }
-
- // crawl
- ref = ref[ key ];
- }
- }
- };
-
- acf.serialize = function( $el, prefix ){
-
- // vars
- var obj = {};
- var inputs = acf.serializeArray( $el );
-
- // prefix
- if( prefix !== undefined ) {
-
- // filter and modify
- inputs = inputs.filter(function( item ){
- return item.name.indexOf(prefix) === 0;
- }).map(function( item ){
- item.name = item.name.slice(prefix.length);
- return item;
- });
- }
-
- // loop
- for( var i = 0; i < inputs.length; i++ ) {
- buildObject( obj, inputs[i].name, inputs[i].value );
- }
-
- // return
- return obj;
- };
-
- /**
- * acf.serializeArray
- *
- * Similar to $.serializeArray() but works with a parent wrapping element.
- *
- * @date 19/8/18
- * @since 5.7.3
- *
- * @param jQuery $el The element or form to serialize.
- * @return array
- */
-
- acf.serializeArray = function( $el ){
- return $el.find('select, textarea, input').serializeArray();
- }
-
- /**
- * acf.serializeForAjax
- *
- * Returns an object containing name => value data ready to be encoded for Ajax.
- *
- * @date 17/12/18
- * @since 5.8.0
- *
- * @param jQUery $el The element or form to serialize.
- * @return object
- */
- acf.serializeForAjax = function( $el ){
-
- // vars
- var data = {};
- var index = {};
-
- // Serialize inputs.
- var inputs = acf.serializeArray( $el );
-
- // Loop over inputs and build data.
- inputs.map(function( item ){
-
- // Append to array.
- if( item.name.slice(-2) === '[]' ) {
- data[ item.name ] = data[ item.name ] || [];
- data[ item.name ].push( item.value );
- // Append
- } else {
- data[ item.name ] = item.value;
- }
- });
-
- // return
- return data;
- };
-
- /**
- * addAction
- *
- * Wrapper for acf.hooks.addAction
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param n/a
- * @return this
- */
-
-/*
- var prefixAction = function( action ){
- return 'acf_' + action;
- }
-*/
-
- acf.addAction = function( action, callback, priority, context ){
- //action = prefixAction(action);
- acf.hooks.addAction.apply(this, arguments);
- return this;
- };
-
-
- /**
- * removeAction
- *
- * Wrapper for acf.hooks.removeAction
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param n/a
- * @return this
- */
-
- acf.removeAction = function( action, callback ){
- //action = prefixAction(action);
- acf.hooks.removeAction.apply(this, arguments);
- return this;
- };
-
-
- /**
- * doAction
- *
- * Wrapper for acf.hooks.doAction
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param n/a
- * @return this
- */
-
- var actionHistory = {};
- //var currentAction = false;
- acf.doAction = function( action ){
- //action = prefixAction(action);
- //currentAction = action;
- actionHistory[ action ] = 1;
- acf.hooks.doAction.apply(this, arguments);
- actionHistory[ action ] = 0;
- return this;
- };
-
-
- /**
- * doingAction
- *
- * Return true if doing action
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param n/a
- * @return this
- */
-
- acf.doingAction = function( action ){
- //action = prefixAction(action);
- return (actionHistory[ action ] === 1);
- };
-
-
- /**
- * didAction
- *
- * Wrapper for acf.hooks.doAction
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param n/a
- * @return this
- */
-
- acf.didAction = function( action ){
- //action = prefixAction(action);
- return (actionHistory[ action ] !== undefined);
- };
-
- /**
- * currentAction
- *
- * Wrapper for acf.hooks.doAction
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param n/a
- * @return this
- */
-
- acf.currentAction = function(){
- for( var k in actionHistory ) {
- if( actionHistory[k] ) {
- return k;
- }
- }
- return false;
- };
-
- /**
- * addFilter
- *
- * Wrapper for acf.hooks.addFilter
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param n/a
- * @return this
- */
-
- acf.addFilter = function( action ){
- //action = prefixAction(action);
- acf.hooks.addFilter.apply(this, arguments);
- return this;
- };
-
-
- /**
- * removeFilter
- *
- * Wrapper for acf.hooks.removeFilter
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param n/a
- * @return this
- */
-
- acf.removeFilter = function( action ){
- //action = prefixAction(action);
- acf.hooks.removeFilter.apply(this, arguments);
- return this;
- };
-
-
- /**
- * applyFilters
- *
- * Wrapper for acf.hooks.applyFilters
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param n/a
- * @return this
- */
-
- acf.applyFilters = function( action ){
- //action = prefixAction(action);
- return acf.hooks.applyFilters.apply(this, arguments);
- };
-
-
- /**
- * getArgs
- *
- * description
- *
- * @date 15/12/17
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.arrayArgs = function( args ){
- return Array.prototype.slice.call( args );
- };
-
-
- /**
- * extendArgs
- *
- * description
- *
- * @date 15/12/17
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
-/*
- acf.extendArgs = function( ){
- var args = Array.prototype.slice.call( arguments );
- var realArgs = args.shift();
-
- Array.prototype.push.call(arguments, 'bar')
- return Array.prototype.push.apply( args, arguments );
- };
-*/
-
- // Preferences
- // - use try/catch to avoid JS error if cookies are disabled on front-end form
- try {
- var preferences = JSON.parse(localStorage.getItem('acf')) || {};
- } catch(e) {
- var preferences = {};
- }
-
-
- /**
- * getPreferenceName
- *
- * Gets the true preference name.
- * Converts "this.thing" to "thing-123" if editing post 123.
- *
- * @date 11/11/17
- * @since 5.6.5
- *
- * @param string name
- * @return string
- */
-
- var getPreferenceName = function( name ){
- if( name.substr(0, 5) === 'this.' ) {
- name = name.substr(5) + '-' + acf.get('post_id');
- }
- return name;
- };
-
-
- /**
- * acf.getPreference
- *
- * Gets a preference setting or null if not set.
- *
- * @date 11/11/17
- * @since 5.6.5
- *
- * @param string name
- * @return mixed
- */
-
- acf.getPreference = function( name ){
- name = getPreferenceName( name );
- return preferences[ name ] || null;
- }
-
-
- /**
- * acf.setPreference
- *
- * Sets a preference setting.
- *
- * @date 11/11/17
- * @since 5.6.5
- *
- * @param string name
- * @param mixed value
- * @return n/a
- */
-
- acf.setPreference = function( name, value ){
- name = getPreferenceName( name );
- if( value === null ) {
- delete preferences[ name ];
- } else {
- preferences[ name ] = value;
- }
- localStorage.setItem('acf', JSON.stringify(preferences));
- }
-
-
- /**
- * acf.removePreference
- *
- * Removes a preference setting.
- *
- * @date 11/11/17
- * @since 5.6.5
- *
- * @param string name
- * @return n/a
- */
-
- acf.removePreference = function( name ){
- acf.setPreference(name, null);
- };
-
-
- /**
- * remove
- *
- * Removes an element with fade effect
- *
- * @date 1/1/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.remove = function( props ){
-
- // allow jQuery
- if( props instanceof jQuery ) {
- props = {
- target: props
- };
- }
-
- // defaults
- props = acf.parseArgs(props, {
- target: false,
- endHeight: 0,
- complete: function(){}
- });
-
- // action
- acf.doAction('remove', props.target);
-
- // tr
- if( props.target.is('tr') ) {
- removeTr( props );
-
- // div
- } else {
- removeDiv( props );
- }
-
- };
-
- /**
- * removeDiv
- *
- * description
- *
- * @date 16/2/18
- * @since 5.6.9
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- var removeDiv = function( props ){
-
- // vars
- var $el = props.target;
- var height = $el.height();
- var width = $el.width();
- var margin = $el.css('margin');
- var outerHeight = $el.outerHeight(true);
- var style = $el.attr('style') + ''; // needed to copy
-
- // wrap
- $el.wrap('
');
- var $wrap = $el.parent();
-
- // set pos
- $el.css({
- height: height,
- width: width,
- margin: margin,
- position: 'absolute'
- });
-
- // fade wrap
- setTimeout(function(){
-
- $wrap.css({
- opacity: 0,
- height: props.endHeight
- });
-
- }, 50);
-
- // remove
- setTimeout(function(){
-
- $el.attr('style', style);
- $wrap.remove();
- props.complete();
-
- }, 301);
- };
-
- /**
- * removeTr
- *
- * description
- *
- * @date 16/2/18
- * @since 5.6.9
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- var removeTr = function( props ){
-
- // vars
- var $tr = props.target;
- var height = $tr.height();
- var children = $tr.children().length;
-
- // create dummy td
- var $td = $('
');
-
- // fade away tr
- $tr.addClass('acf-remove-element');
-
- // update HTML after fade animation
- setTimeout(function(){
- $tr.html( $td );
- }, 251);
-
- // allow .acf-temp-remove to exist before changing CSS
- setTimeout(function(){
-
- // remove class
- $tr.removeClass('acf-remove-element');
-
- // collapse
- $td.css({
- height: props.endHeight
- });
-
- }, 300);
-
- // remove
- setTimeout(function(){
-
- $tr.remove();
- props.complete();
-
- }, 451);
- };
-
- /**
- * duplicate
- *
- * description
- *
- * @date 3/1/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.duplicate = function( args ){
-
- // allow jQuery
- if( args instanceof jQuery ) {
- args = {
- target: args
- };
- }
-
- // vars
- var timeout = 0;
-
- // defaults
- args = acf.parseArgs(args, {
- target: false,
- search: '',
- replace: '',
- before: function( $el ){},
- after: function( $el, $el2 ){},
- append: function( $el, $el2 ){
- $el.after( $el2 );
- timeout = 1;
- }
- });
-
- // compatibility
- args.target = args.target || args.$el;
-
- // vars
- var $el = args.target;
-
- // search
- args.search = args.search || $el.attr('data-id');
- args.replace = args.replace || acf.uniqid();
-
- // before
- // - allow acf to modify DOM
- // - fixes bug where select field option is not selected
- args.before( $el );
- acf.doAction('before_duplicate', $el);
-
- // clone
- var $el2 = $el.clone();
-
- // rename
- acf.rename({
- target: $el2,
- search: args.search,
- replace: args.replace,
- });
-
- // remove classes
- $el2.removeClass('acf-clone');
- $el2.find('.ui-sortable').removeClass('ui-sortable');
-
- // after
- // - allow acf to modify DOM
- args.after( $el, $el2 );
- acf.doAction('after_duplicate', $el, $el2 );
-
- // append
- args.append( $el, $el2 );
-
- /**
- * Fires after an element has been duplicated and appended to the DOM.
- *
- * @date 30/10/19
- * @since 5.8.7
- *
- * @param jQuery $el The original element.
- * @param jQuery $el2 The duplicated element.
- */
- acf.doAction('duplicate', $el, $el2 );
-
- // append
- // - allow element to be moved into a visible position before fire action
- //var callback = function(){
- acf.doAction('append', $el2);
- //};
- //if( timeout ) {
- // setTimeout(callback, timeout);
- //} else {
- // callback();
- //}
-
- // return
- return $el2;
- };
-
- /**
- * rename
- *
- * description
- *
- * @date 7/1/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.rename = function( args ){
-
- // allow jQuery
- if( args instanceof jQuery ) {
- args = {
- target: args
- };
- }
-
- // defaults
- args = acf.parseArgs(args, {
- target: false,
- destructive: false,
- search: '',
- replace: '',
- });
-
- // vars
- var $el = args.target;
- var search = args.search || $el.attr('data-id');
- var replace = args.replace || acf.uniqid('acf');
- var replaceAttr = function(i, value){
- return value.replace( search, replace );
- }
-
- // replace (destructive)
- if( args.destructive ) {
- var html = $el.outerHTML();
- html = acf.strReplace( search, replace, html );
- $el.replaceWith( html );
-
- // replace
- } else {
- $el.attr('data-id', replace);
- $el.find('[id*="' + search + '"]').attr('id', replaceAttr);
- $el.find('[for*="' + search + '"]').attr('for', replaceAttr);
- $el.find('[name*="' + search + '"]').attr('name', replaceAttr);
- }
-
- // return
- return $el;
- };
-
-
- /**
- * acf.prepareForAjax
- *
- * description
- *
- * @date 4/1/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.prepareForAjax = function( data ){
-
- // required
- data.nonce = acf.get('nonce');
- data.post_id = acf.get('post_id');
-
- // language
- if( acf.has('language') ) {
- data.lang = acf.get('language');
- }
-
- // filter for 3rd party customization
- data = acf.applyFilters('prepare_for_ajax', data);
-
- // return
- return data;
- };
-
-
- /**
- * acf.startButtonLoading
- *
- * description
- *
- * @date 5/1/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.startButtonLoading = function( $el ){
- $el.prop('disabled', true);
- $el.after('
');
- }
-
- acf.stopButtonLoading = function( $el ){
- $el.prop('disabled', false);
- $el.next('.acf-loading').remove();
- }
-
-
- /**
- * acf.showLoading
- *
- * description
- *
- * @date 12/1/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.showLoading = function( $el ){
- $el.append('
');
- };
-
- acf.hideLoading = function( $el ){
- $el.children('.acf-loading-overlay').remove();
- };
-
-
- /**
- * acf.updateUserSetting
- *
- * description
- *
- * @date 5/1/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.updateUserSetting = function( name, value ){
-
- var ajaxData = {
- action: 'acf/ajax/user_setting',
- name: name,
- value: value
- };
-
- $.ajax({
- url: acf.get('ajaxurl'),
- data: acf.prepareForAjax(ajaxData),
- type: 'post',
- dataType: 'html'
- });
-
- };
-
-
- /**
- * acf.val
- *
- * description
- *
- * @date 8/1/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.val = function( $input, value, silent ){
-
- // vars
- var prevValue = $input.val();
-
- // bail if no change
- if( value === prevValue ) {
- return false
- }
-
- // update value
- $input.val( value );
-
- // prevent select elements displaying blank value if option doesn't exist
- if( $input.is('select') && $input.val() === null ) {
- $input.val( prevValue );
- return false;
- }
-
- // update with trigger
- if( silent !== true ) {
- $input.trigger('change');
- }
-
- // return
- return true;
- };
-
- /**
- * acf.show
- *
- * description
- *
- * @date 9/2/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.show = function( $el, lockKey ){
-
- // unlock
- if( lockKey ) {
- acf.unlock($el, 'hidden', lockKey);
- }
-
- // bail early if $el is still locked
- if( acf.isLocked($el, 'hidden') ) {
- //console.log( 'still locked', getLocks( $el, 'hidden' ));
- return false;
- }
-
- // $el is hidden, remove class and return true due to change in visibility
- if( $el.hasClass('acf-hidden') ) {
- $el.removeClass('acf-hidden');
- return true;
-
- // $el is visible, return false due to no change in visibility
- } else {
- return false;
- }
- };
-
-
- /**
- * acf.hide
- *
- * description
- *
- * @date 9/2/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.hide = function( $el, lockKey ){
-
- // lock
- if( lockKey ) {
- acf.lock($el, 'hidden', lockKey);
- }
-
- // $el is hidden, return false due to no change in visibility
- if( $el.hasClass('acf-hidden') ) {
- return false;
-
- // $el is visible, add class and return true due to change in visibility
- } else {
- $el.addClass('acf-hidden');
- return true;
- }
- };
-
-
- /**
- * acf.isHidden
- *
- * description
- *
- * @date 9/2/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.isHidden = function( $el ){
- return $el.hasClass('acf-hidden');
- };
-
-
- /**
- * acf.isVisible
- *
- * description
- *
- * @date 9/2/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.isVisible = function( $el ){
- return !acf.isHidden( $el );
- };
-
-
- /**
- * enable
- *
- * description
- *
- * @date 12/3/18
- * @since 5.6.9
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- var enable = function( $el, lockKey ){
-
- // check class. Allow .acf-disabled to overrule all JS
- if( $el.hasClass('acf-disabled') ) {
- return false;
- }
-
- // unlock
- if( lockKey ) {
- acf.unlock($el, 'disabled', lockKey);
- }
-
- // bail early if $el is still locked
- if( acf.isLocked($el, 'disabled') ) {
- return false;
- }
-
- // $el is disabled, remove prop and return true due to change
- if( $el.prop('disabled') ) {
- $el.prop('disabled', false);
- return true;
-
- // $el is enabled, return false due to no change
- } else {
- return false;
- }
- };
-
- /**
- * acf.enable
- *
- * description
- *
- * @date 9/2/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.enable = function( $el, lockKey ){
-
- // enable single input
- if( $el.attr('name') ) {
- return enable( $el, lockKey );
- }
-
- // find and enable child inputs
- // return true if any inputs have changed
- var results = false;
- $el.find('[name]').each(function(){
- var result = enable( $(this), lockKey );
- if( result ) {
- results = true;
- }
- });
- return results;
- };
-
-
- /**
- * disable
- *
- * description
- *
- * @date 12/3/18
- * @since 5.6.9
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- var disable = function( $el, lockKey ){
-
- // lock
- if( lockKey ) {
- acf.lock($el, 'disabled', lockKey);
- }
-
- // $el is disabled, return false due to no change
- if( $el.prop('disabled') ) {
- return false;
-
- // $el is enabled, add prop and return true due to change
- } else {
- $el.prop('disabled', true);
- return true;
- }
- };
-
-
- /**
- * acf.disable
- *
- * description
- *
- * @date 9/2/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.disable = function( $el, lockKey ){
-
- // disable single input
- if( $el.attr('name') ) {
- return disable( $el, lockKey );
- }
-
- // find and enable child inputs
- // return true if any inputs have changed
- var results = false;
- $el.find('[name]').each(function(){
- var result = disable( $(this), lockKey );
- if( result ) {
- results = true;
- }
- });
- return results;
- };
-
-
- /**
- * acf.isset
- *
- * description
- *
- * @date 10/1/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.isset = function( obj /*, level1, level2, ... */ ) {
- for( var i = 1; i < arguments.length; i++ ) {
- if( !obj || !obj.hasOwnProperty(arguments[i]) ) {
- return false;
- }
- obj = obj[ arguments[i] ];
- }
- return true;
- };
-
- /**
- * acf.isget
- *
- * description
- *
- * @date 10/1/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.isget = function( obj /*, level1, level2, ... */ ) {
- for( var i = 1; i < arguments.length; i++ ) {
- if( !obj || !obj.hasOwnProperty(arguments[i]) ) {
- return null;
- }
- obj = obj[ arguments[i] ];
- }
- return obj;
- };
-
- /**
- * acf.getFileInputData
- *
- * description
- *
- * @date 10/1/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.getFileInputData = function( $input, callback ){
-
- // vars
- var value = $input.val();
-
- // bail early if no value
- if( !value ) {
- return false;
- }
-
- // data
- var data = {
- url: value
- };
-
- // modern browsers
- var file = acf.isget( $input[0], 'files', 0);
- if( file ){
-
- // update data
- data.size = file.size;
- data.type = file.type;
-
- // image
- if( file.type.indexOf('image') > -1 ) {
-
- // vars
- var windowURL = window.URL || window.webkitURL;
- var img = new Image();
-
- img.onload = function() {
-
- // update
- data.width = this.width;
- data.height = this.height;
-
- callback( data );
- };
- img.src = windowURL.createObjectURL( file );
- } else {
- callback( data );
- }
- } else {
- callback( data );
- }
- };
-
- /**
- * acf.isAjaxSuccess
- *
- * description
- *
- * @date 18/1/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.isAjaxSuccess = function( json ){
- return ( json && json.success );
- };
-
- /**
- * acf.getAjaxMessage
- *
- * description
- *
- * @date 18/1/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.getAjaxMessage = function( json ){
- return acf.isget( json, 'data', 'message' );
- };
-
- /**
- * acf.getAjaxError
- *
- * description
- *
- * @date 18/1/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.getAjaxError = function( json ){
- return acf.isget( json, 'data', 'error' );
- };
-
-
- /**
- * acf.renderSelect
- *
- * Renders the innter html for a select field.
- *
- * @date 19/2/18
- * @since 5.6.9
- *
- * @param jQuery $select The select element.
- * @param array choices An array of choices.
- * @return void
- */
-
- acf.renderSelect = function( $select, choices ){
-
- // vars
- var value = $select.val();
- var values = [];
-
- // callback
- var crawl = function( items ){
-
- // vars
- var itemsHtml = '';
-
- // loop
- items.map(function( item ){
-
- // vars
- var text = item.text || item.label || '';
- var id = item.id || item.value || '';
-
- // append
- values.push(id);
-
- // optgroup
- if( item.children ) {
- itemsHtml += '
' + crawl( item.children ) + ' ';
-
- // option
- } else {
- itemsHtml += '
' + acf.strEscape(text) + ' ';
- }
- });
-
- // return
- return itemsHtml;
- };
-
- // update HTML
- $select.html( crawl(choices) );
-
- // update value
- if( values.indexOf(value) > -1 ){
- $select.val( value );
- }
-
- // return selected value
- return $select.val();
- };
-
- /**
- * acf.lock
- *
- * Creates a "lock" on an element for a given type and key
- *
- * @date 22/2/18
- * @since 5.6.9
- *
- * @param jQuery $el The element to lock.
- * @param string type The type of lock such as "condition" or "visibility".
- * @param string key The key that will be used to unlock.
- * @return void
- */
-
- var getLocks = function( $el, type ){
- return $el.data('acf-lock-'+type) || [];
- };
-
- var setLocks = function( $el, type, locks ){
- $el.data('acf-lock-'+type, locks);
- }
-
- acf.lock = function( $el, type, key ){
- var locks = getLocks( $el, type );
- var i = locks.indexOf(key);
- if( i < 0 ) {
- locks.push( key );
- setLocks( $el, type, locks );
- }
- };
-
- /**
- * acf.unlock
- *
- * Unlocks a "lock" on an element for a given type and key
- *
- * @date 22/2/18
- * @since 5.6.9
- *
- * @param jQuery $el The element to lock.
- * @param string type The type of lock such as "condition" or "visibility".
- * @param string key The key that will be used to unlock.
- * @return void
- */
-
- acf.unlock = function( $el, type, key ){
- var locks = getLocks( $el, type );
- var i = locks.indexOf(key);
- if( i > -1 ) {
- locks.splice(i, 1);
- setLocks( $el, type, locks );
- }
-
- // return true if is unlocked (no locks)
- return (locks.length === 0);
- };
-
- /**
- * acf.isLocked
- *
- * Returns true if a lock exists for a given type
- *
- * @date 22/2/18
- * @since 5.6.9
- *
- * @param jQuery $el The element to lock.
- * @param string type The type of lock such as "condition" or "visibility".
- * @return void
- */
-
- acf.isLocked = function( $el, type ){
- return ( getLocks( $el, type ).length > 0 );
- };
-
- /**
- * acf.isGutenberg
- *
- * Returns true if the Gutenberg editor is being used.
- *
- * @date 14/11/18
- * @since 5.8.0
- *
- * @param vois
- * @return bool
- */
- acf.isGutenberg = function(){
- return ( window.wp && wp.data && wp.data.select && wp.data.select( 'core/editor' ) );
- };
-
- /**
- * acf.objectToArray
- *
- * Returns an array of items from the given object.
- *
- * @date 20/11/18
- * @since 5.8.0
- *
- * @param object obj The object of items.
- * @return array
- */
- acf.objectToArray = function( obj ){
- return Object.keys( obj ).map(function( key ){
- return obj[key];
- });
- };
-
- /**
- * acf.debounce
- *
- * Returns a debounced version of the passed function which will postpone its execution until after `wait` milliseconds have elapsed since the last time it was invoked.
- *
- * @date 28/8/19
- * @since 5.8.1
- *
- * @param function callback The callback function.
- * @return int wait The number of milliseconds to wait.
- */
- acf.debounce = function( callback, wait ){
- var timeout;
- return function(){
- var context = this;
- var args = arguments;
- var later = function(){
- callback.apply( context, args );
- };
- clearTimeout( timeout );
- timeout = setTimeout( later, wait );
- };
- };
-
- /**
- * acf.throttle
- *
- * Returns a throttled version of the passed function which will allow only one execution per `limit` time period.
- *
- * @date 28/8/19
- * @since 5.8.1
- *
- * @param function callback The callback function.
- * @return int wait The number of milliseconds to wait.
- */
- acf.throttle = function( callback, limit ){
- var busy = false;
- return function(){
- if( busy ) return;
- busy = true;
- setTimeout(function(){
- busy = false;
- }, limit);
- callback.apply( this, arguments );
- };
- };
-
- /**
- * acf.isInView
- *
- * Returns true if the given element is in view.
- *
- * @date 29/8/19
- * @since 5.8.1
- *
- * @param elem el The dom element to inspect.
- * @return bool
- */
- acf.isInView = function( el ){
- var rect = el.getBoundingClientRect();
- return (
- rect.top !== rect.bottom &&
- rect.top >= 0 &&
- rect.left >= 0 &&
- rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
- rect.right <= (window.innerWidth || document.documentElement.clientWidth)
- );
- };
-
- /**
- * acf.onceInView
- *
- * Watches for a dom element to become visible in the browser and then excecutes the passed callback.
- *
- * @date 28/8/19
- * @since 5.8.1
- *
- * @param dom el The dom element to inspect.
- * @param function callback The callback function.
- */
- acf.onceInView = (function() {
-
- // Define list.
- var items = [];
- var id = 0;
-
- // Define check function.
- var check = function() {
- items.forEach(function( item ){
- if( acf.isInView(item.el) ) {
- item.callback.apply( this );
- pop( item.id );
- }
- });
- };
-
- // And create a debounced version.
- var debounced = acf.debounce( check, 300 );
-
- // Define add function.
- var push = function( el, callback ) {
-
- // Add event listener.
- if( !items.length ) {
- $(window).on( 'scroll resize', debounced ).on( 'acfrefresh orientationchange', check );
- }
-
- // Append to list.
- items.push({ id: id++, el: el, callback: callback });
- }
-
- // Define remove function.
- var pop = function( id ) {
-
- // Remove from list.
- items = items.filter(function(item) {
- return (item.id !== id);
- });
-
- // Clean up listener.
- if( !items.length ) {
- $(window).off( 'scroll resize', debounced ).off( 'acfrefresh orientationchange', check );
- }
- }
-
- // Define returned function.
- return function( el, callback ){
-
- // Allow jQuery object.
- if( el instanceof jQuery )
- el = el[0];
-
- // Execute callback if already in view or add to watch list.
- if( acf.isInView(el) ) {
- callback.apply( this );
- } else {
- push( el, callback );
- }
- }
- })();
-
- /**
- * acf.once
- *
- * Creates a function that is restricted to invoking `func` once.
- *
- * @date 2/9/19
- * @since 5.8.1
- *
- * @param function func The function to restrict.
- * @return function
- */
- acf.once = function( func ){
- var i = 0;
- return function(){
- if( i++ > 0 ) {
- return (func = undefined);
- }
- return func.apply(this, arguments);
- }
- }
-
- /*
- * exists
- *
- * This function will return true if a jQuery selection exists
- *
- * @type function
- * @date 8/09/2014
- * @since 5.0.0
- *
- * @param n/a
- * @return (boolean)
- */
-
- $.fn.exists = function() {
- return $(this).length>0;
- };
-
-
- /*
- * outerHTML
- *
- * This function will return a string containing the HTML of the selected element
- *
- * @type function
- * @date 19/11/2013
- * @since 5.0.0
- *
- * @param $.fn
- * @return (string)
- */
-
- $.fn.outerHTML = function() {
- return $(this).get(0).outerHTML;
- };
-
- /*
- * indexOf
- *
- * This function will provide compatibility for ie8
- *
- * @type function
- * @date 5/3/17
- * @since 5.5.10
- *
- * @param n/a
- * @return n/a
- */
-
- if( !Array.prototype.indexOf ) {
-
- Array.prototype.indexOf = function(val) {
- return $.inArray(val, this);
- };
-
- }
-
-
- // Set up actions from events
- $(document).ready(function(){
- acf.doAction('ready');
- });
-
- $(window).on('load', function(){
- acf.doAction('load');
- });
-
- $(window).on('beforeunload', function(){
- acf.doAction('unload');
- });
-
- $(window).on('resize', function(){
- acf.doAction('resize');
- });
-
- $(document).on('sortstart', function( event, ui ) {
- acf.doAction('sortstart', ui.item, ui.placeholder);
- });
-
- $(document).on('sortstop', function( event, ui ) {
- acf.doAction('sortstop', ui.item, ui.placeholder);
- });
-
-})(jQuery);
-
-( function( window, undefined ) {
- "use strict";
-
- /**
- * Handles managing all events for whatever you plug it into. Priorities for hooks are based on lowest to highest in
- * that, lowest priority hooks are fired first.
- */
- var EventManager = function() {
- /**
- * Maintain a reference to the object scope so our public methods never get confusing.
- */
- var MethodsAvailable = {
- removeFilter : removeFilter,
- applyFilters : applyFilters,
- addFilter : addFilter,
- removeAction : removeAction,
- doAction : doAction,
- addAction : addAction,
- storage : getStorage
- };
-
- /**
- * Contains the hooks that get registered with this EventManager. The array for storage utilizes a "flat"
- * object literal such that looking up the hook utilizes the native object literal hash.
- */
- var STORAGE = {
- actions : {},
- filters : {}
- };
-
- function getStorage() {
-
- return STORAGE;
-
- };
-
- /**
- * Adds an action to the event manager.
- *
- * @param action Must contain namespace.identifier
- * @param callback Must be a valid callback function before this action is added
- * @param [priority=10] Used to control when the function is executed in relation to other callbacks bound to the same hook
- * @param [context] Supply a value to be used for this
- */
- function addAction( action, callback, priority, context ) {
- if( typeof action === 'string' && typeof callback === 'function' ) {
- priority = parseInt( ( priority || 10 ), 10 );
- _addHook( 'actions', action, callback, priority, context );
- }
-
- return MethodsAvailable;
- }
-
- /**
- * Performs an action if it exists. You can pass as many arguments as you want to this function; the only rule is
- * that the first argument must always be the action.
- */
- function doAction( /* action, arg1, arg2, ... */ ) {
- var args = Array.prototype.slice.call( arguments );
- var action = args.shift();
-
- if( typeof action === 'string' ) {
- _runHook( 'actions', action, args );
- }
-
- return MethodsAvailable;
- }
-
- /**
- * Removes the specified action if it contains a namespace.identifier & exists.
- *
- * @param action The action to remove
- * @param [callback] Callback function to remove
- */
- function removeAction( action, callback ) {
- if( typeof action === 'string' ) {
- _removeHook( 'actions', action, callback );
- }
-
- return MethodsAvailable;
- }
-
- /**
- * Adds a filter to the event manager.
- *
- * @param filter Must contain namespace.identifier
- * @param callback Must be a valid callback function before this action is added
- * @param [priority=10] Used to control when the function is executed in relation to other callbacks bound to the same hook
- * @param [context] Supply a value to be used for this
- */
- function addFilter( filter, callback, priority, context ) {
- if( typeof filter === 'string' && typeof callback === 'function' ) {
- priority = parseInt( ( priority || 10 ), 10 );
- _addHook( 'filters', filter, callback, priority, context );
- }
-
- return MethodsAvailable;
- }
-
- /**
- * Performs a filter if it exists. You should only ever pass 1 argument to be filtered. The only rule is that
- * the first argument must always be the filter.
- */
- function applyFilters( /* filter, filtered arg, arg2, ... */ ) {
- var args = Array.prototype.slice.call( arguments );
- var filter = args.shift();
-
- if( typeof filter === 'string' ) {
- return _runHook( 'filters', filter, args );
- }
-
- return MethodsAvailable;
- }
-
- /**
- * Removes the specified filter if it contains a namespace.identifier & exists.
- *
- * @param filter The action to remove
- * @param [callback] Callback function to remove
- */
- function removeFilter( filter, callback ) {
- if( typeof filter === 'string') {
- _removeHook( 'filters', filter, callback );
- }
-
- return MethodsAvailable;
- }
-
- /**
- * Removes the specified hook by resetting the value of it.
- *
- * @param type Type of hook, either 'actions' or 'filters'
- * @param hook The hook (namespace.identifier) to remove
- * @private
- */
- function _removeHook( type, hook, callback, context ) {
- if ( !STORAGE[ type ][ hook ] ) {
- return;
- }
- if ( !callback ) {
- STORAGE[ type ][ hook ] = [];
- } else {
- var handlers = STORAGE[ type ][ hook ];
- var i;
- if ( !context ) {
- for ( i = handlers.length; i--; ) {
- if ( handlers[i].callback === callback ) {
- handlers.splice( i, 1 );
- }
- }
- }
- else {
- for ( i = handlers.length; i--; ) {
- var handler = handlers[i];
- if ( handler.callback === callback && handler.context === context) {
- handlers.splice( i, 1 );
- }
- }
- }
- }
- }
-
- /**
- * Adds the hook to the appropriate storage container
- *
- * @param type 'actions' or 'filters'
- * @param hook The hook (namespace.identifier) to add to our event manager
- * @param callback The function that will be called when the hook is executed.
- * @param priority The priority of this hook. Must be an integer.
- * @param [context] A value to be used for this
- * @private
- */
- function _addHook( type, hook, callback, priority, context ) {
- var hookObject = {
- callback : callback,
- priority : priority,
- context : context
- };
-
- // Utilize 'prop itself' : http://jsperf.com/hasownproperty-vs-in-vs-undefined/19
- var hooks = STORAGE[ type ][ hook ];
- if( hooks ) {
- hooks.push( hookObject );
- hooks = _hookInsertSort( hooks );
- }
- else {
- hooks = [ hookObject ];
- }
-
- STORAGE[ type ][ hook ] = hooks;
- }
-
- /**
- * Use an insert sort for keeping our hooks organized based on priority. This function is ridiculously faster
- * than bubble sort, etc: http://jsperf.com/javascript-sort
- *
- * @param hooks The custom array containing all of the appropriate hooks to perform an insert sort on.
- * @private
- */
- function _hookInsertSort( hooks ) {
- var tmpHook, j, prevHook;
- for( var i = 1, len = hooks.length; i < len; i++ ) {
- tmpHook = hooks[ i ];
- j = i;
- while( ( prevHook = hooks[ j - 1 ] ) && prevHook.priority > tmpHook.priority ) {
- hooks[ j ] = hooks[ j - 1 ];
- --j;
- }
- hooks[ j ] = tmpHook;
- }
-
- return hooks;
- }
-
- /**
- * Runs the specified hook. If it is an action, the value is not modified but if it is a filter, it is.
- *
- * @param type 'actions' or 'filters'
- * @param hook The hook ( namespace.identifier ) to be ran.
- * @param args Arguments to pass to the action/filter. If it's a filter, args is actually a single parameter.
- * @private
- */
- function _runHook( type, hook, args ) {
- var handlers = STORAGE[ type ][ hook ];
-
- if ( !handlers ) {
- return (type === 'filters') ? args[0] : false;
- }
-
- var i = 0, len = handlers.length;
- if ( type === 'filters' ) {
- for ( ; i < len; i++ ) {
- args[ 0 ] = handlers[ i ].callback.apply( handlers[ i ].context, args );
- }
- } else {
- for ( ; i < len; i++ ) {
- handlers[ i ].callback.apply( handlers[ i ].context, args );
- }
- }
-
- return ( type === 'filters' ) ? args[ 0 ] : true;
- }
-
- // return all of the publicly available methods
- return MethodsAvailable;
-
- };
-
- // instantiate
- acf.hooks = new EventManager();
-
-} )( window );
-
-(function($, undefined){
-
- // Cached regex to split keys for `addEvent`.
- var delegateEventSplitter = /^(\S+)\s*(.*)$/;
-
- /**
- * extend
- *
- * Helper function to correctly set up the prototype chain for subclasses
- * Heavily inspired by backbone.js
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param object protoProps New properties for this object.
- * @return function.
- */
-
- var extend = function( protoProps ) {
-
- // vars
- var Parent = this;
- var Child;
-
- // The constructor function for the new subclass is either defined by you
- // (the "constructor" property in your `extend` definition), or defaulted
- // by us to simply call the parent constructor.
- if( protoProps && protoProps.hasOwnProperty('constructor') ) {
- Child = protoProps.constructor;
- } else {
- Child = function(){ return Parent.apply(this, arguments); };
- }
-
- // Add static properties to the constructor function, if supplied.
- $.extend(Child, Parent);
-
- // Set the prototype chain to inherit from `parent`, without calling
- // `parent`'s constructor function and add the prototype properties.
- Child.prototype = Object.create(Parent.prototype);
- $.extend(Child.prototype, protoProps);
- Child.prototype.constructor = Child;
-
- // Set a convenience property in case the parent's prototype is needed later.
- //Child.prototype.__parent__ = Parent.prototype;
-
- // return
- return Child;
-
- };
-
-
- /**
- * Model
- *
- * Base class for all inheritence
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param object props
- * @return function.
- */
-
- var Model = acf.Model = function(){
-
- // generate uique client id
- this.cid = acf.uniqueId('acf');
-
- // set vars to avoid modifying prototype
- this.data = $.extend(true, {}, this.data);
-
- // pass props to setup function
- this.setup.apply(this, arguments);
-
- // store on element (allow this.setup to create this.$el)
- if( this.$el && !this.$el.data('acf') ) {
- this.$el.data('acf', this);
- }
-
- // initialize
- var initialize = function(){
- this.initialize();
- this.addEvents();
- this.addActions();
- this.addFilters();
- };
-
- // initialize on action
- if( this.wait && !acf.didAction(this.wait) ) {
- this.addAction(this.wait, initialize);
-
- // initialize now
- } else {
- initialize.apply(this);
- }
- };
-
- // Attach all inheritable methods to the Model prototype.
- $.extend(Model.prototype, {
-
- // Unique model id
- id: '',
-
- // Unique client id
- cid: '',
-
- // jQuery element
- $el: null,
-
- // Data specific to this instance
- data: {},
-
- // toggle used when changing data
- busy: false,
- changed: false,
-
- // Setup events hooks
- events: {},
- actions: {},
- filters: {},
-
- // class used to avoid nested event triggers
- eventScope: '',
-
- // action to wait until initialize
- wait: false,
-
- // action priority default
- priority: 10,
-
- /**
- * get
- *
- * Gets a specific data value
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param string name
- * @return mixed
- */
-
- get: function( name ) {
- return this.data[name];
- },
-
- /**
- * has
- *
- * Returns `true` if the data exists and is not null
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param string name
- * @return boolean
- */
-
- has: function( name ) {
- return this.get(name) != null;
- },
-
- /**
- * set
- *
- * Sets a specific data value
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param string name
- * @param mixed value
- * @return this
- */
-
- set: function( name, value, silent ) {
-
- // bail if unchanged
- var prevValue = this.get(name);
- if( prevValue == value ) {
- return this;
- }
-
- // set data
- this.data[ name ] = value;
-
- // trigger events
- if( !silent ) {
- this.changed = true;
- this.trigger('changed:' + name, [value, prevValue]);
- this.trigger('changed', [name, value, prevValue]);
- }
-
- // return
- return this;
- },
-
- /**
- * inherit
- *
- * Inherits the data from a jQuery element
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param jQuery $el
- * @return this
- */
-
- inherit: function( data ){
-
- // allow jQuery
- if( data instanceof jQuery ) {
- data = data.data();
- }
-
- // extend
- $.extend(this.data, data);
-
- // return
- return this;
- },
-
- /**
- * prop
- *
- * mimics the jQuery prop function
- *
- * @date 4/6/18
- * @since 5.6.9
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- prop: function(){
- return this.$el.prop.apply(this.$el, arguments);
- },
-
- /**
- * setup
- *
- * Run during constructor function
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param n/a
- * @return n/a
- */
-
- setup: function( props ){
- $.extend(this, props);
- },
-
- /**
- * initialize
- *
- * Also run during constructor function
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param n/a
- * @return n/a
- */
-
- initialize: function(){},
-
- /**
- * addElements
- *
- * Adds multiple jQuery elements to this object
- *
- * @date 9/5/18
- * @since 5.6.9
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- addElements: function( elements ){
- elements = elements || this.elements || null;
- if( !elements || !Object.keys(elements).length ) return false;
- for( var i in elements ) {
- this.addElement( i, elements[i] );
- }
- },
-
- /**
- * addElement
- *
- * description
- *
- * @date 9/5/18
- * @since 5.6.9
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- addElement: function( name, selector){
- this[ '$' + name ] = this.$( selector );
- },
-
- /**
- * addEvents
- *
- * Adds multiple event handlers
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param object events {event1 : callback, event2 : callback, etc }
- * @return n/a
- */
-
- addEvents: function( events ){
- events = events || this.events || null;
- if( !events ) return false;
- for( var key in events ) {
- var match = key.match(delegateEventSplitter);
- this.on(match[1], match[2], events[key]);
- }
- },
-
- /**
- * removeEvents
- *
- * Removes multiple event handlers
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param object events {event1 : callback, event2 : callback, etc }
- * @return n/a
- */
-
- removeEvents: function( events ){
- events = events || this.events || null;
- if( !events ) return false;
- for( var key in events ) {
- var match = key.match(delegateEventSplitter);
- this.off(match[1], match[2], events[key]);
- }
- },
-
- /**
- * getEventTarget
- *
- * Returns a jQUery element to tigger an event on
- *
- * @date 5/6/18
- * @since 5.6.9
- *
- * @param jQuery $el The default jQuery element. Optional.
- * @param string event The event name. Optional.
- * @return jQuery
- */
-
- getEventTarget: function( $el, event ){
- return $el || this.$el || $(document);
- },
-
- /**
- * validateEvent
- *
- * Returns true if the event target's closest $el is the same as this.$el
- * Requires both this.el and this.$el to be defined
- *
- * @date 5/6/18
- * @since 5.6.9
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- validateEvent: function( e ){
- if( this.eventScope ) {
- return $( e.target ).closest( this.eventScope ).is( this.$el );
- } else {
- return true;
- }
- },
-
- /**
- * proxyEvent
- *
- * Returns a new event callback function scoped to this model
- *
- * @date 29/3/18
- * @since 5.6.9
- *
- * @param function callback
- * @return function
- */
-
- proxyEvent: function( callback ){
- return this.proxy(function(e){
-
- // validate
- if( !this.validateEvent(e) ) {
- return;
- }
-
- // construct args
- var args = acf.arrayArgs( arguments );
- var extraArgs = args.slice(1);
- var eventArgs = [ e, $(e.currentTarget) ].concat( extraArgs );
-
- // callback
- callback.apply(this, eventArgs);
- });
- },
-
- /**
- * on
- *
- * Adds an event handler similar to jQuery
- * Uses the instance 'cid' to namespace event
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param string name
- * @param string callback
- * @return n/a
- */
-
- on: function( a1, a2, a3, a4 ){
-
- // vars
- var $el, event, selector, callback, args;
-
- // find args
- if( a1 instanceof jQuery ) {
-
- // 1. args( $el, event, selector, callback )
- if( a4 ) {
- $el = a1; event = a2; selector = a3; callback = a4;
-
- // 2. args( $el, event, callback )
- } else {
- $el = a1; event = a2; callback = a3;
- }
- } else {
-
- // 3. args( event, selector, callback )
- if( a3 ) {
- event = a1; selector = a2; callback = a3;
-
- // 4. args( event, callback )
- } else {
- event = a1; callback = a2;
- }
- }
-
- // element
- $el = this.getEventTarget( $el );
-
- // modify callback
- if( typeof callback === 'string' ) {
- callback = this.proxyEvent( this[callback] );
- }
-
- // modify event
- event = event + '.' + this.cid;
-
- // args
- if( selector ) {
- args = [ event, selector, callback ];
- } else {
- args = [ event, callback ];
- }
-
- // on()
- $el.on.apply($el, args);
- },
-
- /**
- * off
- *
- * Removes an event handler similar to jQuery
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param string name
- * @param string callback
- * @return n/a
- */
-
- off: function( a1, a2 ,a3 ){
-
- // vars
- var $el, event, selector, args;
-
- // find args
- if( a1 instanceof jQuery ) {
-
- // 1. args( $el, event, selector )
- if( a3 ) {
- $el = a1; event = a2; selector = a3;
-
- // 2. args( $el, event )
- } else {
- $el = a1; event = a2;
- }
- } else {
-
- // 3. args( event, selector )
- if( a2 ) {
- event = a1; selector = a2;
-
- // 4. args( event )
- } else {
- event = a1;
- }
- }
-
- // element
- $el = this.getEventTarget( $el );
-
- // modify event
- event = event + '.' + this.cid;
-
- // args
- if( selector ) {
- args = [ event, selector ];
- } else {
- args = [ event ];
- }
-
- // off()
- $el.off.apply($el, args);
- },
-
- /**
- * trigger
- *
- * Triggers an event similar to jQuery
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param string name
- * @param string callback
- * @return n/a
- */
-
- trigger: function( name, args, bubbles ){
- var $el = this.getEventTarget();
- if( bubbles ) {
- $el.trigger.apply( $el, arguments );
- } else {
- $el.triggerHandler.apply( $el, arguments );
- }
- return this;
- },
-
- /**
- * addActions
- *
- * Adds multiple action handlers
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param object actions {action1 : callback, action2 : callback, etc }
- * @return n/a
- */
-
- addActions: function( actions ){
- actions = actions || this.actions || null;
- if( !actions ) return false;
- for( var i in actions ) {
- this.addAction( i, actions[i] );
- }
- },
-
- /**
- * removeActions
- *
- * Removes multiple action handlers
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param object actions {action1 : callback, action2 : callback, etc }
- * @return n/a
- */
-
- removeActions: function( actions ){
- actions = actions || this.actions || null;
- if( !actions ) return false;
- for( var i in actions ) {
- this.removeAction( i, actions[i] );
- }
- },
-
- /**
- * addAction
- *
- * Adds an action using the wp.hooks library
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param string name
- * @param string callback
- * @return n/a
- */
-
- addAction: function( name, callback, priority ){
- //console.log('addAction', name, priority);
- // defaults
- priority = priority || this.priority;
-
- // modify callback
- if( typeof callback === 'string' ) {
- callback = this[ callback ];
- }
-
- // add
- acf.addAction(name, callback, priority, this);
-
- },
-
- /**
- * removeAction
- *
- * Remove an action using the wp.hooks library
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param string name
- * @param string callback
- * @return n/a
- */
-
- removeAction: function( name, callback ){
- acf.removeAction(name, this[ callback ]);
- },
-
- /**
- * addFilters
- *
- * Adds multiple filter handlers
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param object filters {filter1 : callback, filter2 : callback, etc }
- * @return n/a
- */
-
- addFilters: function( filters ){
- filters = filters || this.filters || null;
- if( !filters ) return false;
- for( var i in filters ) {
- this.addFilter( i, filters[i] );
- }
- },
-
- /**
- * addFilter
- *
- * Adds a filter using the wp.hooks library
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param string name
- * @param string callback
- * @return n/a
- */
-
- addFilter: function( name, callback, priority ){
-
- // defaults
- priority = priority || this.priority;
-
- // modify callback
- if( typeof callback === 'string' ) {
- callback = this[ callback ];
- }
-
- // add
- acf.addFilter(name, callback, priority, this);
-
- },
-
- /**
- * removeFilters
- *
- * Removes multiple filter handlers
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param object filters {filter1 : callback, filter2 : callback, etc }
- * @return n/a
- */
-
- removeFilters: function( filters ){
- filters = filters || this.filters || null;
- if( !filters ) return false;
- for( var i in filters ) {
- this.removeFilter( i, filters[i] );
- }
- },
-
- /**
- * removeFilter
- *
- * Remove a filter using the wp.hooks library
- *
- * @date 14/12/17
- * @since 5.6.5
- *
- * @param string name
- * @param string callback
- * @return n/a
- */
-
- removeFilter: function( name, callback ){
- acf.removeFilter(name, this[ callback ]);
- },
-
- /**
- * $
- *
- * description
- *
- * @date 16/12/17
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- $: function( selector ){
- return this.$el.find( selector );
- },
-
- /**
- * remove
- *
- * Removes the element and listenters
- *
- * @date 19/12/17
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- remove: function(){
- this.removeEvents();
- this.removeActions();
- this.removeFilters();
- this.$el.remove();
- },
-
- /**
- * setTimeout
- *
- * description
- *
- * @date 16/1/18
- * @since 5.6.5
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- setTimeout: function( callback, milliseconds ){
- return setTimeout( this.proxy(callback), milliseconds );
- },
-
- /**
- * time
- *
- * used for debugging
- *
- * @date 7/3/18
- * @since 5.6.9
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- time: function(){
- console.time( this.id || this.cid );
- },
-
- /**
- * timeEnd
- *
- * used for debugging
- *
- * @date 7/3/18
- * @since 5.6.9
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- timeEnd: function(){
- console.timeEnd( this.id || this.cid );
- },
-
- /**
- * show
- *
- * description
- *
- * @date 15/3/18
- * @since 5.6.9
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- show: function(){
- acf.show( this.$el );
- },
-
-
- /**
- * hide
- *
- * description
- *
- * @date 15/3/18
- * @since 5.6.9
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- hide: function(){
- acf.hide( this.$el );
- },
-
- /**
- * proxy
- *
- * Returns a new function scoped to this model
- *
- * @date 29/3/18
- * @since 5.6.9
- *
- * @param function callback
- * @return function
- */
-
- proxy: function( callback ){
- return $.proxy( callback, this );
- }
-
-
- });
-
- // Set up inheritance for the model
- Model.extend = extend;
-
- // Global model storage
- acf.models = {};
-
- /**
- * acf.getInstance
- *
- * This function will get an instance from an element
- *
- * @date 5/3/18
- * @since 5.6.9
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.getInstance = function( $el ){
- return $el.data('acf');
- };
-
- /**
- * acf.getInstances
- *
- * This function will get an array of instances from multiple elements
- *
- * @date 5/3/18
- * @since 5.6.9
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- acf.getInstances = function( $el ){
- var instances = [];
- $el.each(function(){
- instances.push( acf.getInstance( $(this) ) );
- });
- return instances;
- };
-
-})(jQuery);
-
-(function($, undefined){
-
- acf.models.Popup = acf.Model.extend({
-
- data: {
- title: '',
- content: '',
- width: 0,
- height: 0,
- loading: false,
- },
-
- events: {
- 'click [data-event="close"]': 'onClickClose',
- 'click .acf-close-popup': 'onClickClose',
- },
-
- setup: function( props ){
- $.extend(this.data, props);
- this.$el = $(this.tmpl());
- },
-
- initialize: function(){
- this.render();
- this.open();
- },
-
- tmpl: function(){
- return [
- ''
- ].join('');
- },
-
- render: function(){
-
- // vars
- var title = this.get('title');
- var content = this.get('content');
- var loading = this.get('loading');
- var width = this.get('width');
- var height = this.get('height');
-
- // html
- this.title( title );
- this.content( content );
-
- // width
- if( width ) {
- this.$('.acf-popup-box').css('width', width);
- }
-
- // height
- if( height ) {
- this.$('.acf-popup-box').css('min-height', height);
- }
-
- // loading
- this.loading( loading );
-
- // action
- acf.doAction('append', this.$el);
-
- },
-
- update: function( props ){
- this.data = acf.parseArgs(props, this.data);
- this.render();
- },
-
- title: function( title ){
- this.$('.title:first h3').html( title );
- },
-
- content: function( content ){
- this.$('.inner:first').html( content );
- },
-
- loading: function( show ){
- var $loading = this.$('.loading:first');
- show ? $loading.show() : $loading.hide();
- },
-
- open: function(){
- $('body').append( this.$el );
- },
-
- close: function(){
- this.remove();
- },
-
- onClickClose: function( e, $el ){
- e.preventDefault();
- this.close();
- }
-
- });
-
- /**
- * newPopup
- *
- * Creates a new Popup with the supplied props
- *
- * @date 17/12/17
- * @since 5.6.5
- *
- * @param object props
- * @return object
- */
-
- acf.newPopup = function( props ){
- return new acf.models.Popup( props );
- };
-
-})(jQuery);
-
-(function($, undefined){
-
- acf.unload = new acf.Model({
-
- wait: 'load',
- active: true,
- changed: false,
-
- actions: {
- 'validation_failure': 'startListening',
- 'validation_success': 'stopListening'
- },
-
- events: {
- 'change form .acf-field': 'startListening',
- 'submit form': 'stopListening'
- },
-
- enable: function(){
- this.active = true;
- },
-
- disable: function(){
- this.active = false;
- },
-
- reset: function(){
- this.stopListening();
- },
-
- startListening: function(){
-
- // bail ealry if already changed, not active
- if( this.changed || !this.active ) {
- return;
- }
-
- // update
- this.changed = true;
-
- // add event
- $(window).on('beforeunload', this.onUnload);
-
- },
-
- stopListening: function(){
-
- // update
- this.changed = false;
-
- // remove event
- $(window).off('beforeunload', this.onUnload);
-
- },
-
- onUnload: function(){
- return acf.__('The changes you made will be lost if you navigate away from this page');
- }
-
- });
-
-})(jQuery);
-
-(function($, undefined){
-
- var panel = new acf.Model({
-
- events: {
- 'click .acf-panel-title': 'onClick',
- },
-
- onClick: function( e, $el ){
- e.preventDefault();
- this.toggle( $el.parent() );
- },
-
- isOpen: function( $el ) {
- return $el.hasClass('-open');
- },
-
- toggle: function( $el ){
- this.isOpen($el) ? this.close( $el ) : this.open( $el );
- },
-
- open: function( $el ){
- $el.addClass('-open');
- $el.find('.acf-panel-title i').attr('class', 'dashicons dashicons-arrow-down');
- },
-
- close: function( $el ){
- $el.removeClass('-open');
- $el.find('.acf-panel-title i').attr('class', 'dashicons dashicons-arrow-right');
- }
-
- });
-
-})(jQuery);
-
-(function($, undefined){
-
- var Notice = acf.Model.extend({
-
- data: {
- text: '',
- type: '',
- timeout: 0,
- dismiss: true,
- target: false,
- close: function(){}
- },
-
- events: {
- 'click .acf-notice-dismiss': 'onClickClose',
- },
-
- tmpl: function(){
- return '
';
- },
-
- setup: function( props ){
- $.extend(this.data, props);
- this.$el = $(this.tmpl());
- },
-
- initialize: function(){
-
- // render
- this.render();
-
- // show
- this.show();
- },
-
- render: function(){
-
- // class
- this.type( this.get('type') );
-
- // text
- this.html( '
' + this.get('text') + '
' );
-
- // close
- if( this.get('dismiss') ) {
- this.$el.append('
');
- this.$el.addClass('-dismiss');
- }
-
- // timeout
- var timeout = this.get('timeout');
- if( timeout ) {
- this.away( timeout );
- }
- },
-
- update: function( props ){
-
- // update
- $.extend(this.data, props);
-
- // re-initialize
- this.initialize();
-
- // refresh events
- this.removeEvents();
- this.addEvents();
- },
-
- show: function(){
- var $target = this.get('target');
- if( $target ) {
- $target.prepend( this.$el );
- }
- },
-
- hide: function(){
- this.$el.remove();
- },
-
- away: function( timeout ){
- this.setTimeout(function(){
- acf.remove( this.$el );
- }, timeout );
- },
-
- type: function( type ){
-
- // remove prev type
- var prevType = this.get('type');
- if( prevType ) {
- this.$el.removeClass('-' + prevType);
- }
-
- // add new type
- this.$el.addClass('-' + type);
-
- // backwards compatibility
- if( type == 'error' ) {
- this.$el.addClass('acf-error-message');
- }
- },
-
- html: function( html ){
- this.$el.html( html );
- },
-
- text: function( text ){
- this.$('p').html( text );
- },
-
- onClickClose: function( e, $el ){
- e.preventDefault();
- this.get('close').apply(this, arguments);
- this.remove();
- }
- });
-
- acf.newNotice = function( props ){
-
- // ensure object
- if( typeof props !== 'object' ) {
- props = { text: props };
- }
-
- // instantiate
- return new Notice( props );
- };
-
- var noticeManager = new acf.Model({
- wait: 'prepare',
- priority: 1,
- initialize: function(){
-
- // vars
- var $notice = $('.acf-admin-notice');
-
- // move to avoid WP flicker
- if( $notice.length ) {
- $('h1:first').after( $notice );
- }
- }
- });
-
-
-})(jQuery);
-
-(function($, undefined){
-
- /**
- * postboxManager
- *
- * Manages postboxes on the screen.
- *
- * @date 25/5/19
- * @since 5.8.1
- *
- * @param void
- * @return void
- */
- var postboxManager = new acf.Model({
- wait: 'prepare',
- priority: 1,
- initialize: function(){
- (acf.get('postboxes') || []).map( acf.newPostbox );
- },
- });
-
- /**
- * acf.getPostbox
- *
- * Returns a postbox instance.
- *
- * @date 23/9/18
- * @since 5.7.7
- *
- * @param mixed $el Either a jQuery element or the postbox id.
- * @return object
- */
- acf.getPostbox = function( $el ){
-
- // allow string parameter
- if( typeof arguments[0] == 'string' ) {
- $el = $('#' + arguments[0]);
- }
-
- // return instance
- return acf.getInstance( $el );
- };
-
- /**
- * acf.getPostboxes
- *
- * Returns an array of postbox instances.
- *
- * @date 23/9/18
- * @since 5.7.7
- *
- * @param void
- * @return array
- */
- acf.getPostboxes = function(){
- return acf.getInstances( $('.acf-postbox') );
- };
-
- /**
- * acf.newPostbox
- *
- * Returns a new postbox instance for the given props.
- *
- * @date 20/9/18
- * @since 5.7.6
- *
- * @param object props The postbox properties.
- * @return object
- */
- acf.newPostbox = function( props ){
- return new acf.models.Postbox( props );
- };
-
- /**
- * acf.models.Postbox
- *
- * The postbox model.
- *
- * @date 20/9/18
- * @since 5.7.6
- *
- * @param void
- * @return void
- */
- acf.models.Postbox = acf.Model.extend({
-
- data: {
- id: '',
- key: '',
- style: 'default',
- label: 'top',
- edit: ''
- },
-
- setup: function( props ){
-
- // compatibilty
- if( props.editLink ) {
- props.edit = props.editLink;
- }
-
- // extend data
- $.extend(this.data, props);
-
- // set $el
- this.$el = this.$postbox();
- },
-
- $postbox: function(){
- return $('#' + this.get('id'));
- },
-
- $hide: function(){
- return $('#' + this.get('id') + '-hide');
- },
-
- $hideLabel: function(){
- return this.$hide().parent();
- },
-
- $hndle: function(){
- return this.$('> .hndle');
- },
-
- $inside: function(){
- return this.$('> .inside');
- },
-
- isVisible: function(){
- return this.$el.hasClass('acf-hidden');
- },
-
- initialize: function(){
-
- // Add default class.
- this.$el.addClass('acf-postbox');
-
- // Remove 'hide-if-js class.
- // This class is added by WP to postboxes that are hidden via the "Screen Options" tab.
- this.$el.removeClass('hide-if-js');
-
- // Add field group style class (ignore in block editor).
- if( acf.get('editor') !== 'block' ) {
- var style = this.get('style');
- if( style !== 'default' ) {
- this.$el.addClass( style );
- }
- }
-
- // Add .inside class.
- this.$inside().addClass('acf-fields').addClass('-' + this.get('label'));
-
- // Append edit link.
- var edit = this.get('edit');
- if( edit ) {
- this.$hndle().append('
');
- }
-
- // Show postbox.
- this.show();
- },
-
- show: function(){
-
- // Show label.
- this.$hideLabel().show();
-
- // toggle on checkbox
- this.$hide().prop('checked', true);
-
- // Show postbox
- this.$el.show().removeClass('acf-hidden');
-
- // Do action.
- acf.doAction('show_postbox', this);
- },
-
- enable: function(){
- acf.enable( this.$el, 'postbox' );
- },
-
- showEnable: function(){
- this.enable();
- this.show();
- },
-
- hide: function(){
-
- // Hide label.
- this.$hideLabel().hide();
-
- // Hide postbox
- this.$el.hide().addClass('acf-hidden');
-
- // Do action.
- acf.doAction('hide_postbox', this);
- },
-
- disable: function(){
- acf.disable( this.$el, 'postbox' );
- },
-
- hideDisable: function(){
- this.disable();
- this.hide();
- },
-
- html: function( html ){
-
- // Update HTML.
- this.$inside().html( html );
-
- // Do action.
- acf.doAction('append', this.$el);
- }
- });
-
-})(jQuery);
-
-(function($, undefined){
-
- acf.newTooltip = function( props ){
-
- // ensure object
- if( typeof props !== 'object' ) {
- props = { text: props };
- }
-
- // confirmRemove
- if( props.confirmRemove !== undefined ) {
-
- props.textConfirm = acf.__('Remove');
- props.textCancel = acf.__('Cancel');
- return new TooltipConfirm( props );
-
- // confirm
- } else if( props.confirm !== undefined ) {
-
- return new TooltipConfirm( props );
-
- // default
- } else {
- return new Tooltip( props );
- }
-
- };
-
- var Tooltip = acf.Model.extend({
-
- data: {
- text: '',
- timeout: 0,
- target: null
- },
-
- tmpl: function(){
- return '
';
- },
-
- setup: function( props ){
- $.extend(this.data, props);
- this.$el = $(this.tmpl());
- },
-
- initialize: function(){
-
- // render
- this.render();
-
- // append
- this.show();
-
- // position
- this.position();
-
- // timeout
- var timeout = this.get('timeout');
- if( timeout ) {
- setTimeout( $.proxy(this.fade, this), timeout );
- }
- },
-
- update: function( props ){
- $.extend(this.data, props);
- this.initialize();
- },
-
- render: function(){
- this.html( this.get('text') );
- },
-
- show: function(){
- $('body').append( this.$el );
- },
-
- hide: function(){
- this.$el.remove();
- },
-
- fade: function(){
-
- // add class
- this.$el.addClass('acf-fade-up');
-
- // remove
- this.setTimeout(function(){
- this.remove();
- }, 250);
- },
-
- html: function( html ){
- this.$el.html( html );
- },
-
- position: function(){
-
- // vars
- var $tooltip = this.$el;
- var $target = this.get('target');
- if( !$target ) return;
-
- // Reset position.
- $tooltip.removeClass('right left bottom top').css({ top: 0, left: 0 });
-
- // Declare tollerance to edge of screen.
- var tolerance = 10;
-
- // Find target position.
- var targetWidth = $target.outerWidth();
- var targetHeight = $target.outerHeight();
- var targetTop = $target.offset().top;
- var targetLeft = $target.offset().left;
-
- // Find tooltip position.
- var tooltipWidth = $tooltip.outerWidth();
- var tooltipHeight = $tooltip.outerHeight();
- var tooltipTop = $tooltip.offset().top; // Should be 0, but WP media grid causes this to be 32 (toolbar padding).
-
- // Assume default top alignment.
- var top = targetTop - tooltipHeight - tooltipTop;
- var left = targetLeft + (targetWidth / 2) - (tooltipWidth / 2);
-
- // Check if too far left.
- if( left < tolerance ) {
- $tooltip.addClass('right');
- left = targetLeft + targetWidth;
- top = targetTop + (targetHeight / 2) - (tooltipHeight / 2) - tooltipTop;
-
- // Check if too far right.
- } else if( (left + tooltipWidth + tolerance) > $(window).width() ) {
- $tooltip.addClass('left');
- left = targetLeft - tooltipWidth;
- top = targetTop + (targetHeight / 2) - (tooltipHeight / 2) - tooltipTop;
-
- // Check if too far up.
- } else if( top - $(window).scrollTop() < tolerance ) {
- $tooltip.addClass('bottom');
- top = targetTop + targetHeight - tooltipTop;
-
- // No colision with edges.
- } else {
- $tooltip.addClass('top');
- }
-
- // update css
- $tooltip.css({ 'top': top, 'left': left });
- }
- });
-
- var TooltipConfirm = Tooltip.extend({
-
- data: {
- text: '',
- textConfirm: '',
- textCancel: '',
- target: null,
- targetConfirm: true,
- confirm: function(){},
- cancel: function(){},
- context: false
- },
-
- events: {
- 'click [data-event="cancel"]': 'onCancel',
- 'click [data-event="confirm"]': 'onConfirm',
- },
-
- addEvents: function(){
-
- // add events
- acf.Model.prototype.addEvents.apply(this);
-
- // vars
- var $document = $(document);
- var $target = this.get('target');
-
- // add global 'cancel' click event
- // - use timeout to avoid the current 'click' event triggering the onCancel function
- this.setTimeout(function(){
- this.on( $document, 'click', 'onCancel' );
- });
-
- // add target 'confirm' click event
- // - allow setting to control this feature
- if( this.get('targetConfirm') ) {
- this.on( $target, 'click', 'onConfirm' );
- }
- },
-
- removeEvents: function(){
-
- // remove events
- acf.Model.prototype.removeEvents.apply(this);
-
- // vars
- var $document = $(document);
- var $target = this.get('target');
-
- // remove custom events
- this.off( $document, 'click' );
- this.off( $target, 'click' );
- },
-
- render: function(){
-
- // defaults
- var text = this.get('text') || acf.__('Are you sure?');
- var textConfirm = this.get('textConfirm') || acf.__('Yes');
- var textCancel = this.get('textCancel') || acf.__('No');
-
- // html
- var html = [
- text,
- '
' + textConfirm + ' ',
- '
' + textCancel + ' '
- ].join(' ');
-
- // html
- this.html( html );
-
- // class
- this.$el.addClass('-confirm');
- },
-
- onCancel: function( e, $el ){
-
- // prevent default
- e.preventDefault();
- e.stopImmediatePropagation();
-
- // callback
- var callback = this.get('cancel');
- var context = this.get('context') || this;
- callback.apply( context, arguments );
-
- //remove
- this.remove();
- },
-
- onConfirm: function( e, $el ){
-
- // prevent default
- e.preventDefault();
- e.stopImmediatePropagation();
-
- // callback
- var callback = this.get('confirm');
- var context = this.get('context') || this;
- callback.apply( context, arguments );
-
- //remove
- this.remove();
- }
- });
-
- // storage
- acf.models.Tooltip = Tooltip;
- acf.models.TooltipConfirm = TooltipConfirm;
-
-
- /**
- * tooltipManager
- *
- * description
- *
- * @date 17/4/18
- * @since 5.6.9
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- var tooltipHoverHelper = new acf.Model({
-
- tooltip: false,
-
- events: {
- 'mouseenter .acf-js-tooltip': 'showTitle',
- 'mouseup .acf-js-tooltip': 'hideTitle',
- 'mouseleave .acf-js-tooltip': 'hideTitle'
- },
-
- showTitle: function( e, $el ){
-
- // vars
- var title = $el.attr('title');
-
- // bail ealry if no title
- if( !title ) {
- return;
- }
-
- // clear title to avoid default browser tooltip
- $el.attr('title', '');
-
- // create
- if( !this.tooltip ) {
- this.tooltip = acf.newTooltip({
- text: title,
- target: $el
- });
-
- // update
- } else {
- this.tooltip.update({
- text: title,
- target: $el
- });
- }
-
- },
-
- hideTitle: function( e, $el ){
-
- // hide tooltip
- this.tooltip.hide();
-
- // restore title
- $el.attr('title', this.tooltip.get('text'));
- }
- });
-
-})(jQuery);
-
(function($, undefined){
// vars
@@ -5263,7 +828,7 @@
// vars
var singleAction = action + '_field'; // ready_field
var singleEvent = action + 'Field'; // readyField
-
+
// single action
var singleCallback = function( field /*, arg1, arg2, etc*/ ){
//console.log( singleAction, arguments );
@@ -5296,8 +861,8 @@
// vars
var globalFieldActions = [ 'prepare', 'ready', 'load', 'append', 'remove', 'unmount', 'remount', 'sortstart', 'sortstop', 'show', 'hide', 'unload' ];
- var singleFieldActions = [ 'valid', 'invalid', 'enable', 'disable', 'new' ];
- var singleFieldEvents = [ 'remove', 'unmount', 'remount', 'sortstart', 'sortstop', 'show', 'hide', 'unload', 'valid', 'invalid', 'enable', 'disable' ];
+ var singleFieldActions = [ 'valid', 'invalid', 'enable', 'disable', 'new', 'duplicate' ];
+ var singleFieldEvents = [ 'remove', 'unmount', 'remount', 'sortstart', 'sortstop', 'show', 'hide', 'unload', 'valid', 'invalid', 'enable', 'disable', 'duplicate' ];
// add
globalFieldActions.map( addGlobalFieldAction );
@@ -5332,6 +897,26 @@
$('#_acf_changed').val(1);
}
});
+
+ var duplicateFieldsManager = new acf.Model({
+ id: 'duplicateFieldsManager',
+ actions: {
+ 'duplicate': 'onDuplicate',
+ 'duplicate_fields': 'onDuplicateFields',
+ },
+ onDuplicate: function( $el, $el2 ){
+ var fields = acf.getFields({ parent: $el });
+ if( fields.length ) {
+ var $fields = acf.findFields({ parent: $el2 });
+ acf.doAction( 'duplicate_fields', fields, $fields );
+ }
+ },
+ onDuplicateFields: function( fields, duplicates ){
+ fields.map(function( field, i ){
+ acf.doAction( 'duplicate_field', field, $(duplicates[i]) );
+ });
+ }
+ });
})(jQuery);
@@ -5351,6 +936,11 @@
initialize: function(){
+ // Bail early if this is a duplicate of an existing initialized accordion.
+ if( this.$el.hasClass('acf-accordion') ) {
+ return;
+ }
+
// bail early if is cell
if( this.$el.is('td') ) return;
@@ -5481,21 +1071,27 @@
iconHtml: function( props ){
- // Determine icon.
- //if( acf.isGutenberg() ) {
- // var icon = props.open ? 'arrow-up-alt2' : 'arrow-down-alt2';
- //} else {
- var icon = props.open ? 'arrow-down' : 'arrow-right';
- //}
-
- // Return HTML.
- return '
';
+ // Use SVG inside Gutenberg editor.
+ if( acf.isGutenberg() ) {
+ if( props.open ) {
+ return '
';
+ } else {
+ return '
';
+ }
+ } else {
+ if( props.open ) {
+ return '
';
+ } else {
+ return '
';
+ }
+ }
},
open: function( $el ){
+ var duration = acf.isGutenberg() ? 0 : 300;
// open
- $el.find('.acf-accordion-content:first').slideDown().css('display', 'block');
+ $el.find('.acf-accordion-content:first').slideDown( duration ).css('display', 'block');
$el.find('.acf-accordion-icon:first').replaceWith( this.iconHtml({ open: true }) );
$el.addClass('-open');
@@ -5511,9 +1107,10 @@
},
close: function( $el ){
+ var duration = acf.isGutenberg() ? 0 : 300;
// close
- $el.find('.acf-accordion-content:first').slideUp();
+ $el.find('.acf-accordion-content:first').slideUp( duration );
$el.find('.acf-accordion-icon:first').replaceWith( this.iconHtml({ open: false }) );
$el.removeClass('-open');
@@ -5733,6 +1330,10 @@
wait: 'load',
+ events: {
+ 'duplicateField': 'onDuplicate'
+ },
+
$control: function(){
return this.$('.acf-color-picker');
},
@@ -5783,6 +1384,15 @@
// initialize
$inputText.wpColorPicker( args );
+ },
+
+ onDuplicate: function( e, $el, $duplicate ){
+
+ // The wpColorPicker library does not provide a destroy method.
+ // Manually reset DOM by replacing elements back to their original state.
+ $colorPicker = $duplicate.find('.wp-picker-container');
+ $inputText = $duplicate.find('input[type="text"]');
+ $colorPicker.replaceWith( $inputText );
}
});
@@ -5797,7 +1407,8 @@
type: 'date_picker',
events: {
- 'blur input[type="text"]': 'onBlur'
+ 'blur input[type="text"]': 'onBlur',
+ 'duplicateField': 'onDuplicate'
},
$control: function(){
@@ -5890,6 +1501,10 @@
if( !this.$inputText().val() ) {
acf.val( this.$input(), '' );
}
+ },
+
+ onDuplicate: function( e, $el, $duplicate ){
+ $duplicate.find('input[type="text"]').removeClass('hasDatepicker').removeAttr('id');
}
});
@@ -6334,7 +1949,10 @@
} else {
var val = this.parseResult( results[0] );
- // Update value.
+ // Override lat/lng to match user defined marker location.
+ // Avoids issue where marker "snaps" to nearest result.
+ val.lat = lat;
+ val.lng = lng;
this.val( val );
}
@@ -6344,21 +1962,22 @@
searchPlace: function( place ){
//console.log('searchPlace', place );
- // Ignore empty search.
- if( !place || !place.name ) {
+ // Bail early if no place.
+ if( !place ) {
return;
}
- // No geometry (Custom address search).
- if( !place.geometry ) {
- return this.searchAddress( place.name );
+ // Selecting from the autocomplete dropdown will return a rich PlaceResult object.
+ // Be sure to over-write the "formatted_address" value with the one displayed to the user for best UX.
+ if( place.geometry ) {
+ place.formatted_address = this.$search().val();
+ var val = this.parseResult( place );
+ this.val( val );
+
+ // Searching a custom address will return an empty PlaceResult object.
+ } else if( place.name ) {
+ this.searchAddress( place.name );
}
-
- // Parse place.
- var val = this.parseResult( place );
-
- // Update value.
- this.val( val );
},
searchAddress: function( address ){
@@ -6471,7 +2090,12 @@
if( obj.place_id ) {
result.place_id = obj.place_id;
}
-
+
+ // Add place name.
+ if( obj.name ) {
+ result.name = obj.name;
+ }
+
// Create search map for address component data.
var map = {
street_number: [ 'street_number' ],
@@ -6667,16 +2291,14 @@
validateAttachment: function( attachment ){
- // defaults
- attachment = attachment || {};
-
- // WP attachment
- if( attachment.id !== undefined ) {
+ // Use WP attachment attributes when available.
+ if( attachment && attachment.attributes ) {
attachment = attachment.attributes;
}
- // args
+ // Apply defaults.
attachment = acf.parseArgs(attachment, {
+ id: 0,
url: '',
alt: '',
title: '',
@@ -6686,38 +2308,31 @@
height: 0
});
- // preview size
- var url = acf.isget(attachment, 'sizes', this.get('preview_size'), 'url');
- if( url !== null ) {
- attachment.url = url;
+ // Override with "preview size".
+ var size = acf.isget( attachment, 'sizes', this.get('preview_size') );
+ if( size ) {
+ attachment.url = size.url;
+ attachment.width = size.width;
+ attachment.height = size.height;
}
- // return
+ // Return.
return attachment;
},
render: function( attachment ){
-
- // vars
attachment = this.validateAttachment( attachment );
- // update image
+ // Update DOM.
this.$('img').attr({
- src: attachment.url,
- alt: attachment.alt,
- title: attachment.title
- });
-
- // vars
- var val = attachment.id || '';
-
- // update val
- this.val( val );
-
- // update class
- if( val ) {
+ src: attachment.url,
+ alt: attachment.alt
+ });
+ if( attachment.id ) {
+ this.val( attachment.id );
this.$control().addClass('has-value');
} else {
+ this.val( '' );
this.$control().removeClass('has-value');
}
},
@@ -7104,7 +2719,6 @@
// open popup
wpLink.open( 'acf-link-textarea', val.url, val.title, null );
-
},
onOpen: function(){
@@ -7115,6 +2729,11 @@
// set inputs
var val = this.getNodeValue();
this.setInputValue( val );
+
+ // Update button text.
+ if( val.url && wpLinkL10n ) {
+ $('#wp-link-submit').val( wpLinkL10n.update );
+ }
},
close: function(){
@@ -7123,26 +2742,27 @@
onClose: function(){
- // bail early if no node
- // needed due to WP triggering this event twice
+ // Bail early if no node.
+ // Needed due to WP triggering this event twice.
if( !this.has('node') ) {
return false;
}
+
+ // Determine context.
+ var $submit = $('#wp-link-submit');
+ var isSubmit = ( $submit.is(':hover') || $submit.is(':focus') );
- // remove events
+ // Set value
+ if( isSubmit ) {
+ var val = this.getInputValue();
+ this.setNodeValue( val );
+ }
+
+ // Cleanup.
this.off('wplink-open');
this.off('wplink-close');
-
- // set value
- var val = this.getInputValue();
- this.setNodeValue( val );
-
- // remove textarea
$('#acf-link-textarea').remove();
-
- // reset
this.set('node', null);
-
}
});
@@ -7780,13 +3400,13 @@
// group
if( data.children !== undefined ) {
- html += '
' + data.text + ' ';
+ html += '' + acf.escHtml( data.text ) + ' ';
html += walk( data.children );
html += ' ';
// single
} else {
- html += '' + data.text + ' ';
+ html += '' + acf.escHtml( data.text ) + ' ';
}
}
@@ -7876,6 +3496,10 @@
tab: false,
+ events: {
+ 'duplicateField': 'onDuplicate'
+ },
+
findFields: function(){
return this.$el.nextUntil('.acf-field-tab', '.acf-field');
},
@@ -7998,6 +3622,12 @@
this.getFields().map(function( field ){
field.disable( CONTEXT );
});
+ },
+
+ onDuplicate: function( e, $el, $duplicate ){
+ if( this.isActive() ) {
+ $duplicate.prevAll('.acf-tab-wrap:first').remove();
+ }
}
});
@@ -8164,10 +3794,7 @@
addTab: function( $a, field ){
// create
- var $li = $(' ');
-
- // append
- $li.append( $a );
+ var $li = $('' + $a.outerHTML() + ' ');
// append
this.$('ul').append( $li );
@@ -8414,6 +4041,7 @@
events: {
'click a[data-name="add"]': 'onClickAdd',
'click input[type="radio"]': 'onClickRadio',
+ 'removeField': 'onRemove'
},
$control: function(){
@@ -8456,8 +4084,9 @@
},
onRemove: function(){
- if( this.select2 ) {
- this.select2.destroy();
+ var proto = this.getRelatedPrototype();
+ if( proto.onRemove ) {
+ proto.onRemove.apply(this, arguments);
}
},
@@ -9010,8 +4639,9 @@
var oldId = $textarea.attr('id');
var newId = acf.uniqueId('acf-editor-');
- // store copy of textarea data
- var data = $textarea.data();
+ // Backup textarea data.
+ var inputData = $textarea.data();
+ var inputVal = $textarea.val();
// rename
acf.rename({
@@ -9024,12 +4654,12 @@
// update id
this.set('id', newId, true);
- // initialize
- acf.tinymce.initialize( newId, args );
-
// apply data to new textarea (acf.rename creates a new textarea element due to destructive mode)
// fixes bug where conditional logic "disabled" is lost during "screen_check"
- this.$input().data(data);
+ this.$input().data( inputData ).val( inputVal );
+
+ // initialize
+ acf.tinymce.initialize( newId, args );
},
onMousedown: function( e ){
@@ -10066,6 +5696,298 @@
})(jQuery);
+(function($, undefined){
+
+ acf.unload = new acf.Model({
+
+ wait: 'load',
+ active: true,
+ changed: false,
+
+ actions: {
+ 'validation_failure': 'startListening',
+ 'validation_success': 'stopListening'
+ },
+
+ events: {
+ 'change form .acf-field': 'startListening',
+ 'submit form': 'stopListening'
+ },
+
+ enable: function(){
+ this.active = true;
+ },
+
+ disable: function(){
+ this.active = false;
+ },
+
+ reset: function(){
+ this.stopListening();
+ },
+
+ startListening: function(){
+
+ // bail ealry if already changed, not active
+ if( this.changed || !this.active ) {
+ return;
+ }
+
+ // update
+ this.changed = true;
+
+ // add event
+ $(window).on('beforeunload', this.onUnload);
+
+ },
+
+ stopListening: function(){
+
+ // update
+ this.changed = false;
+
+ // remove event
+ $(window).off('beforeunload', this.onUnload);
+
+ },
+
+ onUnload: function(){
+ return acf.__('The changes you made will be lost if you navigate away from this page');
+ }
+
+ });
+
+})(jQuery);
+
+(function($, undefined){
+
+ /**
+ * postboxManager
+ *
+ * Manages postboxes on the screen.
+ *
+ * @date 25/5/19
+ * @since 5.8.1
+ *
+ * @param void
+ * @return void
+ */
+ var postboxManager = new acf.Model({
+ wait: 'prepare',
+ priority: 1,
+ initialize: function(){
+ (acf.get('postboxes') || []).map( acf.newPostbox );
+ },
+ });
+
+ /**
+ * acf.getPostbox
+ *
+ * Returns a postbox instance.
+ *
+ * @date 23/9/18
+ * @since 5.7.7
+ *
+ * @param mixed $el Either a jQuery element or the postbox id.
+ * @return object
+ */
+ acf.getPostbox = function( $el ){
+
+ // allow string parameter
+ if( typeof arguments[0] == 'string' ) {
+ $el = $('#' + arguments[0]);
+ }
+
+ // return instance
+ return acf.getInstance( $el );
+ };
+
+ /**
+ * acf.getPostboxes
+ *
+ * Returns an array of postbox instances.
+ *
+ * @date 23/9/18
+ * @since 5.7.7
+ *
+ * @param void
+ * @return array
+ */
+ acf.getPostboxes = function(){
+ return acf.getInstances( $('.acf-postbox') );
+ };
+
+ /**
+ * acf.newPostbox
+ *
+ * Returns a new postbox instance for the given props.
+ *
+ * @date 20/9/18
+ * @since 5.7.6
+ *
+ * @param object props The postbox properties.
+ * @return object
+ */
+ acf.newPostbox = function( props ){
+ return new acf.models.Postbox( props );
+ };
+
+ /**
+ * acf.models.Postbox
+ *
+ * The postbox model.
+ *
+ * @date 20/9/18
+ * @since 5.7.6
+ *
+ * @param void
+ * @return void
+ */
+ acf.models.Postbox = acf.Model.extend({
+
+ data: {
+ id: '',
+ key: '',
+ style: 'default',
+ label: 'top',
+ edit: ''
+ },
+
+ setup: function( props ){
+
+ // compatibilty
+ if( props.editLink ) {
+ props.edit = props.editLink;
+ }
+
+ // extend data
+ $.extend(this.data, props);
+
+ // set $el
+ this.$el = this.$postbox();
+ },
+
+ $postbox: function(){
+ return $('#' + this.get('id'));
+ },
+
+ $hide: function(){
+ return $('#' + this.get('id') + '-hide');
+ },
+
+ $hideLabel: function(){
+ return this.$hide().parent();
+ },
+
+ $hndle: function(){
+ return this.$('> .hndle');
+ },
+
+ $handleActions: function(){
+ return this.$('> .postbox-header .handle-actions');
+ },
+
+ $inside: function(){
+ return this.$('> .inside');
+ },
+
+ isVisible: function(){
+ return this.$el.hasClass('acf-hidden');
+ },
+
+ initialize: function(){
+
+ // Add default class.
+ this.$el.addClass('acf-postbox');
+
+ // Remove 'hide-if-js class.
+ // This class is added by WP to postboxes that are hidden via the "Screen Options" tab.
+ this.$el.removeClass('hide-if-js');
+
+ // Add field group style class (ignore in block editor).
+ if( acf.get('editor') !== 'block' ) {
+ var style = this.get('style');
+ if( style !== 'default' ) {
+ this.$el.addClass( style );
+ }
+ }
+
+ // Add .inside class.
+ this.$inside().addClass('acf-fields').addClass('-' + this.get('label'));
+
+ // Append edit link.
+ var edit = this.get('edit');
+ if( edit ) {
+ var html = ' ';
+ var $handleActions = this.$handleActions();
+ if( $handleActions.length ) {
+ $handleActions.prepend( html );
+ } else {
+ this.$hndle().append( html );
+ }
+ }
+
+ // Show postbox.
+ this.show();
+ },
+
+ show: function(){
+
+ // Show label.
+ this.$hideLabel().show();
+
+ // toggle on checkbox
+ this.$hide().prop('checked', true);
+
+ // Show postbox
+ this.$el.show().removeClass('acf-hidden');
+
+ // Do action.
+ acf.doAction('show_postbox', this);
+ },
+
+ enable: function(){
+ acf.enable( this.$el, 'postbox' );
+ },
+
+ showEnable: function(){
+ this.enable();
+ this.show();
+ },
+
+ hide: function(){
+
+ // Hide label.
+ this.$hideLabel().hide();
+
+ // Hide postbox
+ this.$el.hide().addClass('acf-hidden');
+
+ // Do action.
+ acf.doAction('hide_postbox', this);
+ },
+
+ disable: function(){
+ acf.disable( this.$el, 'postbox' );
+ },
+
+ hideDisable: function(){
+ this.disable();
+ this.hide();
+ },
+
+ html: function( html ){
+
+ // Update HTML.
+ this.$inside().html( html );
+
+ // Do action.
+ acf.doAction('append', this.$el);
+ }
+ });
+
+})(jQuery);
+
(function($, undefined){
/**
@@ -10658,8 +6580,8 @@
// vars
var $a = $([
'',
- ' ' + acf.__('Expand Details') + ' ',
- ' ' + acf.__('Collapse Details') + ' ',
+ ' ' + acf.__('Expand Details') + ' ',
+ ' ' + acf.__('Collapse Details') + ' ',
' '
].join(''));
@@ -11121,21 +7043,17 @@
// success
var onSuccess = function( json ){
- // Check success.
- if( acf.isAjaxSuccess(json) ) {
-
- // Render post screen.
- if( acf.get('screen') == 'post' ) {
- this.renderPostScreen( json.data );
-
- // Render user screen.
- } else if( acf.get('screen') == 'user' ) {
- this.renderUserScreen( json.data );
- }
+ // Render post screen.
+ if( acf.get('screen') == 'post' ) {
+ this.renderPostScreen( json );
+
+ // Render user screen.
+ } else if( acf.get('screen') == 'user' ) {
+ this.renderUserScreen( json );
}
// action
- acf.doAction('check_screen_complete', json.data, ajaxData);
+ acf.doAction('check_screen_complete', json, ajaxData);
};
// ajax
@@ -11211,17 +7129,37 @@
// Create postbox if doesn't exist.
if( !postbox ) {
+ var wpMinorVersion = parseFloat( acf.get('wp_version') );
+ if( wpMinorVersion >= 5.5 ) {
+ var postboxHeader = [
+ ''
+ ].join('');
+ } else {
+ var postboxHeader = [
+ '',
+ 'Toggle panel: ' + acf.escHtml( result.title ) + ' ',
+ ' ',
+ ' ',
+ '',
+ '' + acf.escHtml( result.title ) + ' ',
+ ' ',
+ ].join('');
+ }
// Create it.
var $postbox = $([
'',
- '
',
- 'Toggle panel: ' + result.title + ' ',
- ' ',
- ' ',
- '
',
- '' + result.title + ' ',
- ' ',
+ postboxHeader,
'
',
result.html,
'
',
@@ -11343,8 +7281,8 @@
// Keep a reference to the most recent post attributes.
postEdits: {},
- // Wait until load to avoid 'core' issues when loading taxonomies.
- wait: 'load',
+ // Wait until assets have been loaded.
+ wait: 'prepare',
initialize: function(){
@@ -11371,6 +7309,9 @@
if( wpMinorVersion >= 5.3 ) {
this.addAction( 'refresh_post_screen', this.onRefreshPostScreen );
}
+
+ // Trigger "refresh" after WP has moved metaboxes into place.
+ wp.domReady( acf.refresh );
},
onChange: function(){
@@ -11709,24 +7650,6 @@
return crawl( this.$el );
},
- decodeChoices: function( choices ){
-
- // callback
- var crawl = function( items ){
- items.map(function( item ){
- item.text = acf.decode( item.text );
- if( item.children ) {
- item.children = crawl( item.children );
- }
- return item;
- });
- return items;
- };
-
- // crawl
- return crawl( choices );
- },
-
getAjaxData: function( params ){
// vars
@@ -11763,11 +7686,6 @@
more: false,
});
- // decode
- if( json.results ) {
- json.results = this.decodeChoices(json.results);
- }
-
// callback
var callback = this.get('ajaxResults');
if( callback ) {
@@ -11836,7 +7754,9 @@
placeholder: this.get('placeholder'),
multiple: this.get('multiple'),
data: [],
- escapeMarkup: function( m ){ return m; }
+ escapeMarkup: function( string ){
+ return acf.escHtml( string );
+ },
};
// multiple
@@ -11971,7 +7891,9 @@
separator: '||',
multiple: this.get('multiple'),
data: this.getChoices(),
- escapeMarkup: function( m ){ return m; },
+ escapeMarkup: function( string ){
+ return acf.escHtml( string );
+ },
dropdownCss: {
'z-index': '999999999'
},
@@ -12638,7 +8560,11 @@
// bail ealry if not initialized
if( typeof tinyMCEPreInit.mceInit[ id ] === 'undefined' ) return false;
-
+
+ // Ensure textarea element is visible
+ // - Fixes bug in block editor when switching between "Block" and "Document" tabs.
+ $('#'+id).show();
+
// toggle
switchEditors.go( id, 'tmce');
@@ -13381,7 +9307,20 @@
// default
return $form;
};
-
+
+ /**
+ * A debounced function to trigger a form submission.
+ *
+ * @date 15/07/2020
+ * @since 5.9.0
+ *
+ * @param type Var Description.
+ * @return type Description.
+ */
+ var submitFormDebounced = acf.debounce(function( $form ){
+ $form.submit();
+ });
+
/**
* acf.validation
*
@@ -13531,7 +9470,7 @@
// - prevents browser error message
// - also fixes chrome bug where 'hidden-by-tab' field throws focus error
e.preventDefault();
-
+
// vars
var $form = $el.closest('form');
@@ -13541,12 +9480,12 @@
// add error to validator
getValidator( $form ).addError({
input: $el.attr('name'),
- message: e.target.validationMessage
+ message: acf.strEscape( e.target.validationMessage )
});
// trigger submit on $form
// - allows for "save", "preview" and "publish" to work
- $form.submit();
+ submitFormDebounced( $form );
}
},
@@ -13707,6 +9646,112 @@
}
});
+ var gutenbergValidation = new acf.Model({
+ wait: 'prepare',
+ initialize: function(){
+
+ // Bail early if not Gutenberg.
+ if( !acf.isGutenberg() ) {
+ return;
+ }
+
+ // Custommize the editor.
+ this.customizeEditor();
+ },
+ customizeEditor: function(){
+
+ // Extract vars.
+ var editor = wp.data.dispatch( 'core/editor' );
+ var editorSelect = wp.data.select( 'core/editor' );
+ var notices = wp.data.dispatch( 'core/notices' );
+
+ // Backup original method.
+ var savePost = editor.savePost;
+
+ // Listen for changes to post status and perform actions:
+ // a) Enable validation for "publish" action.
+ // b) Remember last non "publish" status used for restoring after validation fail.
+ var useValidation = false;
+ var lastPostStatus = '';
+ wp.data.subscribe(function() {
+ var postStatus = editorSelect.getEditedPostAttribute( 'status' );
+ useValidation = ( postStatus === 'publish' );
+ lastPostStatus = ( postStatus !== 'publish' ) ? postStatus : lastPostStatus;
+ });
+
+ // Create validation version.
+ editor.savePost = function( options ){
+ options = options || {};
+
+ // Backup vars.
+ var _this = this;
+ var _args = arguments;
+
+ // Perform validation within a Promise.
+ return new Promise(function( resolve, reject ) {
+
+ // Bail early if is autosave or preview.
+ if( options.isAutosave || options.isPreview ) {
+ return resolve( 'Validation ignored (autosave).' );
+ }
+
+ // Bail early if validation is not neeed.
+ if( !useValidation ) {
+ return resolve( 'Validation ignored (draft).' );
+ }
+
+ // Validate the editor form.
+ var valid = acf.validateForm({
+ form: $('#editor'),
+ reset: true,
+ complete: function( $form, validator ){
+
+ // Always unlock the form after AJAX.
+ editor.unlockPostSaving( 'acf' );
+ },
+ failure: function( $form, validator ){
+
+ // Get validation error and append to Gutenberg notices.
+ var notice = validator.get('notice');
+ notices.createErrorNotice( notice.get('text'), {
+ id: 'acf-validation',
+ isDismissible: true
+ });
+ notice.remove();
+
+ // Restore last non "publish" status.
+ if( lastPostStatus ) {
+ editor.editPost({
+ status: lastPostStatus
+ });
+ }
+
+ // Rejext promise and prevent savePost().
+ reject( 'Validation failed.' );
+ },
+ success: function(){
+ notices.removeNotice( 'acf-validation' );
+
+ // Resolve promise and allow savePost().
+ resolve( 'Validation success.' );
+ }
+ });
+
+ // Resolve promise and allow savePost() if no validation is needed.
+ if( valid ) {
+ resolve( 'Validation bypassed.' );
+
+ // Otherwise, lock the form and wait for AJAX response.
+ } else {
+ editor.lockPostSaving( 'acf' );
+ }
+ }).then(function(){
+ return savePost.apply(_this, _args);
+ });
+ };
+ }
+ });
+
})(jQuery);
(function($, undefined){
@@ -13725,9 +9770,6 @@
var refreshHelper = new acf.Model({
priority: 90,
- initialize: function(){
- this.refresh = acf.debounce( this.refresh, 0 );
- },
actions: {
'new_field': 'refresh',
'show_field': 'refresh',
@@ -13737,8 +9779,7 @@
'remount_field': 'refresh',
},
refresh: function(){
- acf.doAction('refresh');
- $(window).trigger('acfrefresh');
+ acf.refresh();
}
});
@@ -14070,6 +10111,33 @@
}
}
});
+
+ /**
+ * Adds a body class when holding down the "shift" key.
+ *
+ * @date 06/05/2020
+ * @since 5.9.0
+ */
+ var bodyClassShiftHelper = new acf.Model({
+ id: 'bodyClassShiftHelper',
+ events: {
+ 'keydown': 'onKeyDown',
+ 'keyup': 'onKeyUp'
+ },
+ isShiftKey: function( e ){
+ return ( e.keyCode === 16 );
+ },
+ onKeyDown: function( e ){
+ if( this.isShiftKey(e) ) {
+ $('body').addClass('acf-keydown-shift');
+ }
+ },
+ onKeyUp: function( e ){
+ if( this.isShiftKey(e) ) {
+ $('body').removeClass('acf-keydown-shift');
+ }
+ },
+ });
})(jQuery);
@@ -14835,15 +10903,6 @@
})(jQuery);
-// @codekit-prepend "_acf.js";
-// @codekit-prepend "_acf-hooks.js";
-// @codekit-prepend "_acf-model.js";
-// @codekit-prepend "_acf-popup.js";
-// @codekit-prepend "_acf-unload.js";
-// @codekit-prepend "_acf-panel.js";
-// @codekit-prepend "_acf-notice.js";
-// @codekit-prepend "_acf-postbox.js";
-// @codekit-prepend "_acf-tooltip.js";
// @codekit-prepend "_acf-field.js";
// @codekit-prepend "_acf-fields.js";
// @codekit-prepend "_acf-field-accordion.js";
@@ -14873,10 +10932,12 @@
// @codekit-prepend "_acf-condition.js";
// @codekit-prepend "_acf-conditions.js";
// @codekit-prepend "_acf-condition-types.js";
+// @codekit-prepend "_acf-unload.js";
+// @codekit-prepend "_acf-postbox.js";
// @codekit-prepend "_acf-media.js";
// @codekit-prepend "_acf-screen.js";
// @codekit-prepend "_acf-select2.js";
// @codekit-prepend "_acf-tinymce.js";
// @codekit-prepend "_acf-validation.js";
// @codekit-prepend "_acf-helpers.js";
-// @codekit-prepend "_acf-compatibility";
+// @codekit-prepend "_acf-compatibility";
\ No newline at end of file
diff --git a/assets/js/acf-input.min.js b/assets/js/acf-input.min.js
index 5ae7557..e2d24a2 100644
--- a/assets/js/acf-input.min.js
+++ b/assets/js/acf-input.min.js
@@ -1,4 +1,4 @@
-!function(t,e){var i={};window.acf=i,i.data={},i.get=function(t){return this.data[t]||null},i.has=function(t){return null!==this.get(t)},i.set=function(t,e){return this.data[t]=e,this};var n=0;i.uniqueId=function(t){var e=++n+"";return t?t+e:e},i.uniqueArray=function(t){function e(t,e,i){return i.indexOf(t)===e}return t.filter(e)};var a="";i.uniqid=function(t,e){var i;void 0===t&&(t="");var n=function(t,e){return e<(t=parseInt(t,10).toString(16)).length?t.slice(t.length-e):e>t.length?Array(e-t.length+1).join("0")+t:t};return a||(a=Math.floor(123456789*Math.random())),a++,i=t,i+=n(parseInt((new Date).getTime()/1e3,10),8),i+=n(a,5),e&&(i+=(10*Math.random()).toFixed(8).toString()),i},i.strReplace=function(t,e,i){return i.split(t).join(e)},i.strCamelCase=function(t){return t=(t=t.replace(/[_-]/g," ")).replace(/(?:^\w|\b\w|\s+)/g,(function(t,e){return 0==+t?"":0==e?t.toLowerCase():t.toUpperCase()}))},i.strPascalCase=function(t){var e=i.strCamelCase(t);return e.charAt(0).toUpperCase()+e.slice(1)},i.strSlugify=function(t){return i.strReplace("_","-",t.toLowerCase())},i.strSanitize=function(t){var e={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","ß":"s","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Ĉ":"C","ĉ":"c","Ċ":"C","ċ":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"D","đ":"d","Ē":"E","ē":"e","Ĕ":"E","ĕ":"e","Ė":"E","ė":"e","Ę":"E","ę":"e","Ě":"E","ě":"e","Ĝ":"G","ĝ":"g","Ğ":"G","ğ":"g","Ġ":"G","ġ":"g","Ģ":"G","ģ":"g","Ĥ":"H","ĥ":"h","Ħ":"H","ħ":"h","Ĩ":"I","ĩ":"i","Ī":"I","ī":"i","Ĭ":"I","ĭ":"i","Į":"I","į":"i","İ":"I","ı":"i","IJ":"IJ","ij":"ij","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","Ĺ":"L","ĺ":"l","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ŀ":"L","ŀ":"l","Ł":"l","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","ʼn":"n","Ō":"O","ō":"o","Ŏ":"O","ŏ":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ŗ":"R","ŗ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ŝ":"S","ŝ":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ŧ":"T","ŧ":"t","Ũ":"U","ũ":"u","Ū":"U","ū":"u","Ŭ":"U","ŭ":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","ſ":"s","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Ǎ":"A","ǎ":"a","Ǐ":"I","ǐ":"i","Ǒ":"O","ǒ":"o","Ǔ":"U","ǔ":"u","Ǖ":"U","ǖ":"u","Ǘ":"U","ǘ":"u","Ǚ":"U","ǚ":"u","Ǜ":"U","ǜ":"u","Ǻ":"A","ǻ":"a","Ǽ":"AE","ǽ":"ae","Ǿ":"O","ǿ":"o"," ":"_","'":"","?":"","/":"","\\":"",".":"",",":"","`":"",">":"","<":"",'"':"","[":"","]":"","|":"","{":"","}":"","(":"",")":""},i=/\W/g,n=function(t){return void 0!==e[t]?e[t]:t};return t=(t=t.replace(i,n)).toLowerCase()},i.strMatch=function(t,e){for(var i=0,n=Math.min(t.length,e.length),a=0;a
").html(e).text()},i.strEscape=function(e){return t("
").text(e).html()},i.parseArgs=function(e,i){return"object"!=typeof e&&(e={}),"object"!=typeof i&&(i={}),t.extend({},i,e)},null==window.acfL10n&&(acfL10n={}),i.__=function(t){return acfL10n[t]||t},i._x=function(t,e){return acfL10n[t+"."+e]||acfL10n[t]||t},i._n=function(t,e,n){return 1==n?i.__(t):i.__(e)},i.isArray=function(t){return Array.isArray(t)},i.isObject=function(t){return"object"==typeof t};var r=function(t,e,n){var a=(e=e.replace("[]","[%%index%%]")).match(/([^\[\]])+/g);if(a)for(var r=a.length,o=t,s=0;s
');var s=e.parent();e.css({height:i,width:n,margin:a,position:"absolute"}),setTimeout((function(){s.css({opacity:0,height:t.endHeight})}),50),setTimeout((function(){e.attr("style",o),s.remove(),t.complete()}),301)},u=function(e){var i=e.target,n=i.height(),a=i.children().length,r=t('
');i.addClass("acf-remove-element"),setTimeout((function(){i.html(r)}),251),setTimeout((function(){i.removeClass("acf-remove-element"),r.css({height:e.endHeight})}),300),setTimeout((function(){i.remove(),e.complete()}),451)};i.duplicate=function(t){t instanceof jQuery&&(t={target:t});var e=0;(t=i.parseArgs(t,{target:!1,search:"",replace:"",before:function(t){},after:function(t,e){},append:function(t,i){t.after(i),e=1}})).target=t.target||t.$el;var n=t.target;t.search=t.search||n.attr("data-id"),t.replace=t.replace||i.uniqid(),t.before(n),i.doAction("before_duplicate",n);var a=n.clone();return i.rename({target:a,search:t.search,replace:t.replace}),a.removeClass("acf-clone"),a.find(".ui-sortable").removeClass("ui-sortable"),t.after(n,a),i.doAction("after_duplicate",n,a),t.append(n,a),i.doAction("duplicate",n,a),i.doAction("append",a),a},i.rename=function(t){t instanceof jQuery&&(t={target:t});var e=(t=i.parseArgs(t,{target:!1,destructive:!1,search:"",replace:""})).target,n=t.search||e.attr("data-id"),a=t.replace||i.uniqid("acf"),r=function(t,e){return e.replace(n,a)};if(t.destructive){var o=e.outerHTML();o=i.strReplace(n,a,o),e.replaceWith(o)}else e.attr("data-id",a),e.find('[id*="'+n+'"]').attr("id",r),e.find('[for*="'+n+'"]').attr("for",r),e.find('[name*="'+n+'"]').attr("name",r);return e},i.prepareForAjax=function(t){return t.nonce=i.get("nonce"),t.post_id=i.get("post_id"),i.has("language")&&(t.lang=i.get("language")),t=i.applyFilters("prepare_for_ajax",t)},i.startButtonLoading=function(t){t.prop("disabled",!0),t.after('
')},i.stopButtonLoading=function(t){t.prop("disabled",!1),t.next(".acf-loading").remove()},i.showLoading=function(t){t.append('
')},i.hideLoading=function(t){t.children(".acf-loading-overlay").remove()},i.updateUserSetting=function(e,n){var a={action:"acf/ajax/user_setting",name:e,value:n};t.ajax({url:i.get("ajaxurl"),data:i.prepareForAjax(a),type:"post",dataType:"html"})},i.val=function(t,e,i){var n=t.val();return e!==n&&(t.val(e),t.is("select")&&null===t.val()?(t.val(n),!1):(!0!==i&&t.trigger("change"),!0))},i.show=function(t,e){return e&&i.unlock(t,"hidden",e),!i.isLocked(t,"hidden")&&(!!t.hasClass("acf-hidden")&&(t.removeClass("acf-hidden"),!0))},i.hide=function(t,e){return e&&i.lock(t,"hidden",e),!t.hasClass("acf-hidden")&&(t.addClass("acf-hidden"),!0)},i.isHidden=function(t){return t.hasClass("acf-hidden")},i.isVisible=function(t){return!i.isHidden(t)};var d=function(t,e){return!t.hasClass("acf-disabled")&&(e&&i.unlock(t,"disabled",e),!i.isLocked(t,"disabled")&&(!!t.prop("disabled")&&(t.prop("disabled",!1),!0)))};i.enable=function(e,i){if(e.attr("name"))return d(e,i);var n=!1;return e.find("[name]").each((function(){var e;d(t(this),i)&&(n=!0)})),n};var f=function(t,e){return e&&i.lock(t,"disabled",e),!t.prop("disabled")&&(t.prop("disabled",!0),!0)};i.disable=function(e,i){if(e.attr("name"))return f(e,i);var n=!1;return e.find("[name]").each((function(){var e;f(t(this),i)&&(n=!0)})),n},i.isset=function(t){for(var e=1;e
-1){var o=window.URL||window.webkitURL,s=new Image;s.onload=function(){a.width=this.width,a.height=this.height,e(a)},s.src=o.createObjectURL(r)}else e(a);else e(a)},i.isAjaxSuccess=function(t){return t&&t.success},i.getAjaxMessage=function(t){return i.isget(t,"data","message")},i.getAjaxError=function(t){return i.isget(t,"data","error")},i.renderSelect=function(t,e){var n=t.val(),a=[],r=function(t){var e="";return t.map((function(t){var n=t.text||t.label||"",o=t.id||t.value||"";a.push(o),t.children?e+=''+r(t.children)+" ":e+='"+i.strEscape(n)+" "})),e};return t.html(r(e)),a.indexOf(n)>-1&&t.val(n),t.val()};var h=function(t,e){return t.data("acf-lock-"+e)||[]},p=function(t,e,i){t.data("acf-lock-"+e,i)},g,m,v,y,b,_;i.lock=function(t,e,i){var n=h(t,e),a;n.indexOf(i)<0&&(n.push(i),p(t,e,n))},i.unlock=function(t,e,i){var n=h(t,e),a=n.indexOf(i);return a>-1&&(n.splice(a,1),p(t,e,n)),0===n.length},i.isLocked=function(t,e){return h(t,e).length>0},i.isGutenberg=function(){return window.wp&&wp.data&&wp.data.select&&wp.data.select("core/editor")},i.objectToArray=function(t){return Object.keys(t).map((function(e){return t[e]}))},i.debounce=function(t,e){var i;return function(){var n=this,a=arguments,r=function(){t.apply(n,a)};clearTimeout(i),i=setTimeout(r,e)}},i.throttle=function(t,e){var i=!1;return function(){i||(i=!0,setTimeout((function(){i=!1}),e),t.apply(this,arguments))}},i.isInView=function(t){var e=t.getBoundingClientRect();return e.top!==e.bottom&&e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)},i.onceInView=(g=[],m=0,v=function(){g.forEach((function(t){i.isInView(t.el)&&(t.callback.apply(this),_(t.id))}))},y=i.debounce(v,300),b=function(e,i){g.length||t(window).on("scroll resize",y).on("acfrefresh orientationchange",v),g.push({id:m++,el:e,callback:i})},_=function(e){(g=g.filter((function(t){return t.id!==e}))).length||t(window).off("scroll resize",y).off("acfrefresh orientationchange",v)},function(t,e){t instanceof jQuery&&(t=t[0]),i.isInView(t)?e.apply(this):b(t,e)}),i.once=function(t){var e=0;return function(){return e++>0?t=void 0:t.apply(this,arguments)}},t.fn.exists=function(){return t(this).length>0},t.fn.outerHTML=function(){return t(this).get(0).outerHTML},Array.prototype.indexOf||(Array.prototype.indexOf=function(e){return t.inArray(e,this)}),t(document).ready((function(){i.doAction("ready")})),t(window).on("load",(function(){i.doAction("load")})),t(window).on("beforeunload",(function(){i.doAction("unload")})),t(window).on("resize",(function(){i.doAction("resize")})),t(document).on("sortstart",(function(t,e){i.doAction("sortstart",e.item,e.placeholder)})),t(document).on("sortstop",(function(t,e){i.doAction("sortstop",e.item,e.placeholder)}))}(jQuery),function(t,e){"use strict";var i=function(){function t(){return f}function e(t,e,i,n){return"string"==typeof t&&"function"==typeof e&&c("actions",t,e,i=parseInt(i||10,10),n),d}function i(){var t=Array.prototype.slice.call(arguments),e=t.shift();return"string"==typeof e&&u("actions",e,t),d}function n(t,e){return"string"==typeof t&&s("actions",t,e),d}function a(t,e,i,n){return"string"==typeof t&&"function"==typeof e&&c("filters",t,e,i=parseInt(i||10,10),n),d}function r(){var t=Array.prototype.slice.call(arguments),e=t.shift();return"string"==typeof e?u("filters",e,t):d}function o(t,e){return"string"==typeof t&&s("filters",t,e),d}function s(t,e,i,n){if(f[t][e])if(i){var a=f[t][e],r;if(n)for(r=a.length;r--;){var o=a[r];o.callback===i&&o.context===n&&a.splice(r,1)}else for(r=a.length;r--;)a[r].callback===i&&a.splice(r,1)}else f[t][e]=[]}function c(t,e,i,n,a){var r={callback:i,priority:n,context:a},o=f[t][e];o?(o.push(r),o=l(o)):o=[r],f[t][e]=o}function l(t){for(var e,i,n,a=1,r=t.length;ae.priority;)t[i]=t[i-1],--i;t[i]=e}return t}function u(t,e,i){var n=f[t][e];if(!n)return"filters"===t&&i[0];var a=0,r=n.length;if("filters"===t)for(;a "].join("")},render:function(){var t=this.get("title"),e=this.get("content"),i=this.get("loading"),n=this.get("width"),a=this.get("height");this.title(t),this.content(e),n&&this.$(".acf-popup-box").css("width",n),a&&this.$(".acf-popup-box").css("min-height",a),this.loading(i),acf.doAction("append",this.$el)},update:function(t){this.data=acf.parseArgs(t,this.data),this.render()},title:function(t){this.$(".title:first h3").html(t)},content:function(t){this.$(".inner:first").html(t)},loading:function(t){var e=this.$(".loading:first");t?e.show():e.hide()},open:function(){t("body").append(this.$el)},close:function(){this.remove()},onClickClose:function(t,e){t.preventDefault(),this.close()}}),acf.newPopup=function(t){return new acf.models.Popup(t)}}(jQuery),function(t,e){acf.unload=new acf.Model({wait:"load",active:!0,changed:!1,actions:{validation_failure:"startListening",validation_success:"stopListening"},events:{"change form .acf-field":"startListening","submit form":"stopListening"},enable:function(){this.active=!0},disable:function(){this.active=!1},reset:function(){this.stopListening()},startListening:function(){!this.changed&&this.active&&(this.changed=!0,t(window).on("beforeunload",this.onUnload))},stopListening:function(){this.changed=!1,t(window).off("beforeunload",this.onUnload)},onUnload:function(){return acf.__("The changes you made will be lost if you navigate away from this page")}})}(jQuery),function(t,e){var i=new acf.Model({events:{"click .acf-panel-title":"onClick"},onClick:function(t,e){t.preventDefault(),this.toggle(e.parent())},isOpen:function(t){return t.hasClass("-open")},toggle:function(t){this.isOpen(t)?this.close(t):this.open(t)},open:function(t){t.addClass("-open"),t.find(".acf-panel-title i").attr("class","dashicons dashicons-arrow-down")},close:function(t){t.removeClass("-open"),t.find(".acf-panel-title i").attr("class","dashicons dashicons-arrow-right")}})}(jQuery),function(t,e){var i=acf.Model.extend({data:{text:"",type:"",timeout:0,dismiss:!0,target:!1,close:function(){}},events:{"click .acf-notice-dismiss":"onClickClose"},tmpl:function(){return'
'},setup:function(e){t.extend(this.data,e),this.$el=t(this.tmpl())},initialize:function(){this.render(),this.show()},render:function(){this.type(this.get("type")),this.html(""+this.get("text")+"
"),this.get("dismiss")&&(this.$el.append(' '),this.$el.addClass("-dismiss"));var t=this.get("timeout");t&&this.away(t)},update:function(e){t.extend(this.data,e),this.initialize(),this.removeEvents(),this.addEvents()},show:function(){var t=this.get("target");t&&t.prepend(this.$el)},hide:function(){this.$el.remove()},away:function(t){this.setTimeout((function(){acf.remove(this.$el)}),t)},type:function(t){var e=this.get("type");e&&this.$el.removeClass("-"+e),this.$el.addClass("-"+t),"error"==t&&this.$el.addClass("acf-error-message")},html:function(t){this.$el.html(t)},text:function(t){this.$("p").html(t)},onClickClose:function(t,e){t.preventDefault(),this.get("close").apply(this,arguments),this.remove()}});acf.newNotice=function(t){return"object"!=typeof t&&(t={text:t}),new i(t)};var n=new acf.Model({wait:"prepare",priority:1,initialize:function(){var e=t(".acf-admin-notice");e.length&&t("h1:first").after(e)}})}(jQuery),function(t,e){var i=new acf.Model({wait:"prepare",priority:1,initialize:function(){(acf.get("postboxes")||[]).map(acf.newPostbox)}});acf.getPostbox=function(e){return"string"==typeof e&&(e=t("#"+e)),acf.getInstance(e)},acf.getPostboxes=function(){return acf.getInstances(t(".acf-postbox"))},acf.newPostbox=function(t){return new acf.models.Postbox(t)},acf.models.Postbox=acf.Model.extend({data:{id:"",key:"",style:"default",label:"top",edit:""},setup:function(e){e.editLink&&(e.edit=e.editLink),t.extend(this.data,e),this.$el=this.$postbox()},$postbox:function(){return t("#"+this.get("id"))},$hide:function(){return t("#"+this.get("id")+"-hide")},$hideLabel:function(){return this.$hide().parent()},$hndle:function(){return this.$("> .hndle")},$inside:function(){return this.$("> .inside")},isVisible:function(){return this.$el.hasClass("acf-hidden")},initialize:function(){if(this.$el.addClass("acf-postbox"),this.$el.removeClass("hide-if-js"),"block"!==acf.get("editor")){var t=this.get("style");"default"!==t&&this.$el.addClass(t)}this.$inside().addClass("acf-fields").addClass("-"+this.get("label"));var e=this.get("edit");e&&this.$hndle().append(' '),this.show()},show:function(){this.$hideLabel().show(),this.$hide().prop("checked",!0),this.$el.show().removeClass("acf-hidden"),acf.doAction("show_postbox",this)},enable:function(){acf.enable(this.$el,"postbox")},showEnable:function(){this.enable(),this.show()},hide:function(){this.$hideLabel().hide(),this.$el.hide().addClass("acf-hidden"),acf.doAction("hide_postbox",this)},disable:function(){acf.disable(this.$el,"postbox")},hideDisable:function(){this.disable(),this.hide()},html:function(t){this.$inside().html(t),acf.doAction("append",this.$el)}})}(jQuery),function(t,e){acf.newTooltip=function(t){return"object"!=typeof t&&(t={text:t}),void 0!==t.confirmRemove?(t.textConfirm=acf.__("Remove"),t.textCancel=acf.__("Cancel"),new n(t)):void 0!==t.confirm?new n(t):new i(t)};var i=acf.Model.extend({data:{text:"",timeout:0,target:null},tmpl:function(){return'
'},setup:function(e){t.extend(this.data,e),this.$el=t(this.tmpl())},initialize:function(){this.render(),this.show(),this.position();var e=this.get("timeout");e&&setTimeout(t.proxy(this.fade,this),e)},update:function(e){t.extend(this.data,e),this.initialize()},render:function(){this.html(this.get("text"))},show:function(){t("body").append(this.$el)},hide:function(){this.$el.remove()},fade:function(){this.$el.addClass("acf-fade-up"),this.setTimeout((function(){this.remove()}),250)},html:function(t){this.$el.html(t)},position:function(){var e=this.$el,i=this.get("target");if(i){e.removeClass("right left bottom top").css({top:0,left:0});var n=10,a=i.outerWidth(),r=i.outerHeight(),o=i.offset().top,s=i.offset().left,c=e.outerWidth(),l=e.outerHeight(),u=e.offset().top,d=o-l-u,f=s+a/2-c/2;f<10?(e.addClass("right"),f=s+a,d=o+r/2-l/2-u):f+c+10>t(window).width()?(e.addClass("left"),f=s-c,d=o+r/2-l/2-u):d-t(window).scrollTop()<10?(e.addClass("bottom"),d=o+r-u):e.addClass("top"),e.css({top:d,left:f})}}}),n=i.extend({data:{text:"",textConfirm:"",textCancel:"",target:null,targetConfirm:!0,confirm:function(){},cancel:function(){},context:!1},events:{'click [data-event="cancel"]':"onCancel",'click [data-event="confirm"]':"onConfirm"},addEvents:function(){acf.Model.prototype.addEvents.apply(this);var e=t(document),i=this.get("target");this.setTimeout((function(){this.on(e,"click","onCancel")})),this.get("targetConfirm")&&this.on(i,"click","onConfirm")},removeEvents:function(){acf.Model.prototype.removeEvents.apply(this);var e=t(document),i=this.get("target");this.off(e,"click"),this.off(i,"click")},render:function(){var t,e,i,n=[this.get("text")||acf.__("Are you sure?"),''+(this.get("textConfirm")||acf.__("Yes"))+" ",''+(this.get("textCancel")||acf.__("No"))+" "].join(" ");this.html(n),this.$el.addClass("-confirm")},onCancel:function(t,e){t.preventDefault(),t.stopImmediatePropagation();var i=this.get("cancel"),n=this.get("context")||this;i.apply(n,arguments),this.remove()},onConfirm:function(t,e){t.preventDefault(),t.stopImmediatePropagation();var i=this.get("confirm"),n=this.get("context")||this;i.apply(n,arguments),this.remove()}});acf.models.Tooltip=i,acf.models.TooltipConfirm=n;var a=new acf.Model({tooltip:!1,events:{"mouseenter .acf-js-tooltip":"showTitle","mouseup .acf-js-tooltip":"hideTitle","mouseleave .acf-js-tooltip":"hideTitle"},showTitle:function(t,e){var i=e.attr("title");i&&(e.attr("title",""),this.tooltip?this.tooltip.update({text:i,target:e}):this.tooltip=acf.newTooltip({text:i,target:e}))},hideTitle:function(t,e){this.tooltip.hide(),e.attr("title",this.tooltip.get("text"))}})}(jQuery),function(t,e){var i=[];acf.Field=acf.Model.extend({type:"",eventScope:".acf-field",wait:"ready",setup:function(t){this.$el=t,this.inherit(t),this.inherit(this.$control())},val:function(t){return void 0!==t?this.setValue(t):this.prop("disabled")?null:this.getValue()},getValue:function(){return this.$input().val()},setValue:function(t){return acf.val(this.$input(),t)},__:function(t){return acf._e(this.type,t)},$control:function(){return!1},$input:function(){return this.$("[name]:first")},$inputWrap:function(){return this.$(".acf-input:first")},$labelWrap:function(){return this.$(".acf-label:first")},getInputName:function(){return this.$input().attr("name")||""},parent:function(){var t=this.parents();return!!t.length&&t[0]},parents:function(){var t=this.$el.parents(".acf-field"),e;return acf.getFields(t)},show:function(t,e){var i=acf.show(this.$el,t);return i&&(this.prop("hidden",!1),acf.doAction("show_field",this,e)),i},hide:function(t,e){var i=acf.hide(this.$el,t);return i&&(this.prop("hidden",!0),acf.doAction("hide_field",this,e)),i},enable:function(t,e){var i=acf.enable(this.$el,t);return i&&(this.prop("disabled",!1),acf.doAction("enable_field",this,e)),i},disable:function(t,e){var i=acf.disable(this.$el,t);return i&&(this.prop("disabled",!0),acf.doAction("disable_field",this,e)),i},showEnable:function(t,e){return this.enable.apply(this,arguments),this.show.apply(this,arguments)},hideDisable:function(t,e){return this.disable.apply(this,arguments),this.hide.apply(this,arguments)},showNotice:function(t){"object"!=typeof t&&(t={text:t}),this.notice&&this.notice.remove(),t.target=this.$inputWrap(),this.notice=acf.newNotice(t)},removeNotice:function(t){this.notice&&(this.notice.away(t||0),this.notice=!1)},showError:function(e){this.$el.addClass("acf-error"),void 0!==e&&this.showNotice({text:e,type:"error",dismiss:!1}),acf.doAction("invalid_field",this),this.$el.one("focus change","input, select, textarea",t.proxy(this.removeError,this))},removeError:function(){this.$el.removeClass("acf-error"),this.removeNotice(250),acf.doAction("valid_field",this)},trigger:function(t,e,i){return"invalidField"==t&&(i=!0),acf.Model.prototype.trigger.apply(this,[t,e,i])}}),acf.newField=function(t){var e=t.data("type"),i=n(e),a,r=new(acf.models[i]||acf.Field)(t);return acf.doAction("new_field",r),r};var n=function(t){return acf.strPascalCase(t||"")+"Field"};acf.registerFieldType=function(t){var e,a=t.prototype.type,r=n(a);acf.models[r]=t,i.push(a)},acf.getFieldType=function(t){var e=n(t);return acf.models[e]||!1},acf.getFieldTypes=function(t){t=acf.parseArgs(t,{category:""});var e=[];return i.map((function(i){var n=acf.getFieldType(i),a=n.prototype;t.category&&a.category!==t.category||e.push(n)})),e}}(jQuery),function(t,e){acf.findFields=function(e){var i=".acf-field",n=!1;return(e=acf.parseArgs(e,{key:"",name:"",type:"",is:"",parent:!1,sibling:!1,limit:!1,visible:!1,suppressFilters:!1})).suppressFilters||(e=acf.applyFilters("find_fields_args",e)),e.key&&(i+='[data-key="'+e.key+'"]'),e.type&&(i+='[data-type="'+e.type+'"]'),e.name&&(i+='[data-name="'+e.name+'"]'),e.is&&(i+=e.is),e.visible&&(i+=":visible"),n=e.parent?e.parent.find(i):e.sibling?e.sibling.siblings(i):t(i),e.suppressFilters||(n=n.not(".acf-clone .acf-field"),n=acf.applyFilters("find_fields",n)),e.limit&&(n=n.slice(0,e.limit)),n},acf.findField=function(t,e){return acf.findFields({key:t,limit:1,parent:e,suppressFilters:!0})},acf.getField=function(t){t instanceof jQuery||(t=acf.findField(t));var e=t.data("acf");return e||(e=acf.newField(t)),e},acf.getFields=function(e){e instanceof jQuery||(e=acf.findFields(e));var i=[];return e.each((function(){var e=acf.getField(t(this));i.push(e)})),i},acf.findClosestField=function(t){return t.closest(".acf-field")},acf.getClosestField=function(t){var e=acf.findClosestField(t);return this.getField(e)};var i=function(t){var e=t,i=t+"_fields",a=t+"_field",r=function(t){var e=acf.arrayArgs(arguments),n=e.slice(1),a=acf.getFields({parent:t});if(a.length){var r=[i,a].concat(n);acf.doAction.apply(null,r)}},o=function(t){var e=acf.arrayArgs(arguments),i=e.slice(1);t.map((function(t,e){var n=[a,t].concat(i);acf.doAction.apply(null,n)}))};acf.addAction(e,r),acf.addAction(i,o),n(t)},n=function(t){var e=t+"_field",i=t+"Field",n=function(n){var a=acf.arrayArgs(arguments),r=a.slice(1),s=["type","name","key"];s.map((function(t){var i="/"+t+"="+n.get(t);a=[e+i,n].concat(r),acf.doAction.apply(null,a)})),o.indexOf(t)>-1&&n.trigger(i,r)};acf.addAction(e,n)},a,r=["valid","invalid","enable","disable","new"],o=["remove","unmount","remount","sortstart","sortstop","show","hide","unload","valid","invalid","enable","disable"];["prepare","ready","load","append","remove","unmount","remount","sortstart","sortstop","show","hide","unload"].map(i),r.map(n);var s=new acf.Model({id:"fieldsEventManager",events:{'click .acf-field a[href="#"]':"onClick","change .acf-field":"onChange"},onClick:function(t){t.preventDefault()},onChange:function(){t("#_acf_changed").val(1)}})}(jQuery),function(t,e){var i=0,n=acf.Field.extend({type:"accordion",wait:"",$control:function(){
-return this.$(".acf-fields:first")},initialize:function(){if(!this.$el.is("td")){if(this.get("endpoint"))return this.remove();var e=this.$el,n=this.$labelWrap(),r=this.$inputWrap(),o=this.$control(),s=r.children(".description");if(s.length&&n.append(s),this.$el.is("tr")){var c=this.$el.closest("table"),l=t('
'),u=t('
'),d=t(''),f=t(" ");l.append(n.html()),d.append(f),u.append(d),r.append(l),r.append(u),n.remove(),o.remove(),r.attr("colspan",2),n=l,r=u,o=f}e.addClass("acf-accordion"),n.addClass("acf-accordion-title"),r.addClass("acf-accordion-content"),i++,this.get("multi_expand")&&e.attr("multi-expand",1);var h=acf.getPreference("this.accordions")||[];void 0!==h[i-1]&&this.set("open",h[i-1]),this.get("open")&&(e.addClass("-open"),r.css("display","block")),n.prepend(a.iconHtml({open:this.get("open")}));var p=e.parent();o.addClass(p.hasClass("-left")?"-left":""),o.addClass(p.hasClass("-clear")?"-clear":""),o.append(e.nextUntil(".acf-field-accordion",".acf-field")),o.removeAttr("data-open data-multi_expand data-endpoint")}}});acf.registerFieldType(n);var a=new acf.Model({actions:{unload:"onUnload"},events:{"click .acf-accordion-title":"onClick","invalidField .acf-accordion":"onInvalidField"},isOpen:function(t){return t.hasClass("-open")},toggle:function(t){this.isOpen(t)?this.close(t):this.open(t)},iconHtml:function(t){var e;return' '},open:function(e){e.find(".acf-accordion-content:first").slideDown().css("display","block"),e.find(".acf-accordion-icon:first").replaceWith(this.iconHtml({open:!0})),e.addClass("-open"),acf.doAction("show",e),e.attr("multi-expand")||e.siblings(".acf-accordion.-open").each((function(){a.close(t(this))}))},close:function(t){t.find(".acf-accordion-content:first").slideUp(),t.find(".acf-accordion-icon:first").replaceWith(this.iconHtml({open:!1})),t.removeClass("-open"),acf.doAction("hide",t)},onClick:function(t,e){t.preventDefault(),this.toggle(e.parent())},onInvalidField:function(t,e){this.busy||(this.busy=!0,this.setTimeout((function(){this.busy=!1}),1e3),this.open(e))},onUnload:function(e){var i=[];t(".acf-accordion").each((function(){var e=t(this).hasClass("-open")?1:0;i.push(e)})),i.length&&acf.setPreference("this.accordions",i)}})}(jQuery),function(t,e){var i=acf.Field.extend({type:"button_group",events:{'click input[type="radio"]':"onClick"},$control:function(){return this.$(".acf-button-group")},$input:function(){return this.$("input:checked")},setValue:function(t){this.$('input[value="'+t+'"]').prop("checked",!0).trigger("change")},onClick:function(t,e){var i=e.parent("label"),n=i.hasClass("selected");this.$(".selected").removeClass("selected"),i.addClass("selected"),this.get("allow_null")&&n&&(i.removeClass("selected"),e.prop("checked",!1).trigger("change"))}});acf.registerFieldType(i)}(jQuery),function(t,e){var i=acf.Field.extend({type:"checkbox",events:{"change input":"onChange","click .acf-add-checkbox":"onClickAdd","click .acf-checkbox-toggle":"onClickToggle","click .acf-checkbox-custom":"onClickCustom"},$control:function(){return this.$(".acf-checkbox-list")},$toggle:function(){return this.$(".acf-checkbox-toggle")},$input:function(){return this.$('input[type="hidden"]')},$inputs:function(){return this.$('input[type="checkbox"]').not(".acf-checkbox-toggle")},getValue:function(){var e=[];return this.$(":checked").each((function(){e.push(t(this).val())})),!!e.length&&e},onChange:function(t,e){var i=e.prop("checked"),n=e.parent("label"),a=this.$toggle(),r;(i?n.addClass("selected"):n.removeClass("selected"),a.length)&&(0==this.$inputs().not(":checked").length?a.prop("checked",!0):a.prop("checked",!1))},onClickAdd:function(t,e){var i=' ';e.parent("li").before(i)},onClickToggle:function(t,e){var i=e.prop("checked"),n=this.$('input[type="checkbox"]'),a=this.$("label");n.prop("checked",i),i?a.addClass("selected"):a.removeClass("selected")},onClickCustom:function(t,e){var i=e.prop("checked"),n=e.next('input[type="text"]');i?n.prop("disabled",!1):(n.prop("disabled",!0),""==n.val()&&e.parent("li").remove())}});acf.registerFieldType(i)}(jQuery),function(t,e){var i=acf.Field.extend({type:"color_picker",wait:"load",$control:function(){return this.$(".acf-color-picker")},$input:function(){return this.$('input[type="hidden"]')},$inputText:function(){return this.$('input[type="text"]')},setValue:function(t){acf.val(this.$input(),t),this.$inputText().iris("color",t)},initialize:function(){var t=this.$input(),e=this.$inputText(),i=function(i){setTimeout((function(){acf.val(t,e.val())}),1)},n={defaultColor:!1,palettes:!0,hide:!0,change:i,clear:i},n=acf.applyFilters("color_picker_args",n,this);e.wpColorPicker(n)}});acf.registerFieldType(i)}(jQuery),function(t,e){var i=acf.Field.extend({type:"date_picker",events:{'blur input[type="text"]':"onBlur"},$control:function(){return this.$(".acf-date-picker")},$input:function(){return this.$('input[type="hidden"]')},$inputText:function(){return this.$('input[type="text"]')},initialize:function(){if(this.has("save_format"))return this.initializeCompatibility();var t=this.$input(),e=this.$inputText(),i={dateFormat:this.get("date_format"),altField:t,altFormat:"yymmdd",changeYear:!0,yearRange:"-100:+100",changeMonth:!0,showButtonPanel:!0,firstDay:this.get("first_day")};i=acf.applyFilters("date_picker_args",i,this),acf.newDatePicker(e,i),acf.doAction("date_picker_init",e,i,this)},initializeCompatibility:function(){var t=this.$input(),e=this.$inputText();e.val(t.val());var i={dateFormat:this.get("date_format"),altField:t,altFormat:this.get("save_format"),changeYear:!0,yearRange:"-100:+100",changeMonth:!0,showButtonPanel:!0,firstDay:this.get("first_day")},n=(i=acf.applyFilters("date_picker_args",i,this)).dateFormat;i.dateFormat=this.get("save_format"),acf.newDatePicker(e,i),e.datepicker("option","dateFormat",n),acf.doAction("date_picker_init",e,i,this)},onBlur:function(){this.$inputText().val()||acf.val(this.$input(),"")}});acf.registerFieldType(i);var n=new acf.Model({priority:5,wait:"ready",initialize:function(){var e=acf.get("locale"),i=acf.get("rtl"),n=acf.get("datePickerL10n");return!!n&&(void 0!==t.datepicker&&(n.isRTL=i,t.datepicker.regional[e]=n,void t.datepicker.setDefaults(n)))}});acf.newDatePicker=function(e,i){if(void 0===t.datepicker)return!1;i=i||{},e.datepicker(i),t("body > #ui-datepicker-div").exists()&&t("body > #ui-datepicker-div").wrap('
')}}(jQuery),function(t,e){var i=acf.models.DatePickerField.extend({type:"date_time_picker",$control:function(){return this.$(".acf-date-time-picker")},initialize:function(){var t=this.$input(),e=this.$inputText(),i={dateFormat:this.get("date_format"),timeFormat:this.get("time_format"),altField:t,altFieldTimeOnly:!1,altFormat:"yy-mm-dd",altTimeFormat:"HH:mm:ss",changeYear:!0,yearRange:"-100:+100",changeMonth:!0,showButtonPanel:!0,firstDay:this.get("first_day"),controlType:"select",oneLine:!0};i=acf.applyFilters("date_time_picker_args",i,this),acf.newDateTimePicker(e,i),acf.doAction("date_time_picker_init",e,i,this)}});acf.registerFieldType(i);var n=new acf.Model({priority:5,wait:"ready",initialize:function(){var e=acf.get("locale"),i=acf.get("rtl"),n=acf.get("dateTimePickerL10n");return!!n&&(void 0!==t.timepicker&&(n.isRTL=i,t.timepicker.regional[e]=n,void t.timepicker.setDefaults(n)))}});acf.newDateTimePicker=function(e,i){if(void 0===t.timepicker)return!1;i=i||{},e.datetimepicker(i),t("body > #ui-datepicker-div").exists()&&t("body > #ui-datepicker-div").wrap('
')}}(jQuery),function(t,e){function i(e){if(r)return e();if(acf.isset(window,"google","maps","Geocoder"))return r=new google.maps.Geocoder,e();if(acf.addAction("google_map_api_loaded",e),!a){var i=acf.get("google_map_api");i&&(a=!0,t.ajax({url:i,dataType:"script",cache:!0,success:function(){r=new google.maps.Geocoder,acf.doAction("google_map_api_loaded")}}))}}var n=acf.Field.extend({type:"google_map",map:!1,wait:"load",events:{'click a[data-name="clear"]':"onClickClear",'click a[data-name="locate"]':"onClickLocate",'click a[data-name="search"]':"onClickSearch","keydown .search":"onKeydownSearch","keyup .search":"onKeyupSearch","focus .search":"onFocusSearch","blur .search":"onBlurSearch",showField:"onShow"},$control:function(){return this.$(".acf-google-map")},$search:function(){return this.$(".search")},$canvas:function(){return this.$(".canvas")},setState:function(t){this.$control().removeClass("-value -loading -searching"),"default"===t&&(t=this.val()?"value":""),t&&this.$control().addClass("-"+t)},getValue:function(){var t=this.$input().val();return!!t&&JSON.parse(t)},setValue:function(t,e){var i="";t&&(i=JSON.stringify(t)),acf.val(this.$input(),i),e||(this.renderVal(t),acf.doAction("google_map_change",t,this.map,this))},renderVal:function(t){t?(this.setState("value"),this.$search().val(t.address),this.setPosition(t.lat,t.lng)):(this.setState(""),this.$search().val(""),this.map.marker.setVisible(!1))},newLatLng:function(t,e){return new google.maps.LatLng(parseFloat(t),parseFloat(e))},setPosition:function(t,e){this.map.marker.setPosition({lat:parseFloat(t),lng:parseFloat(e)}),this.map.marker.setVisible(!0),this.center()},center:function(){var t=this.map.marker.getPosition();if(t)var e=t.lat(),i=t.lng();else var e=this.get("lat"),i=this.get("lng");this.map.setCenter({lat:parseFloat(e),lng:parseFloat(i)})},initialize:function(){i(this.initializeMap.bind(this))},initializeMap:function(){var t=this.getValue(),e=acf.parseArgs(t,{zoom:this.get("zoom"),lat:this.get("lat"),lng:this.get("lng")}),i={scrollwheel:!1,zoom:parseInt(e.zoom),center:{lat:parseFloat(e.lat),lng:parseFloat(e.lng)},mapTypeId:google.maps.MapTypeId.ROADMAP,marker:{draggable:!0,raiseOnDrag:!0},autocomplete:{}};i=acf.applyFilters("google_map_args",i,this);var n=new google.maps.Map(this.$canvas()[0],i),a=acf.parseArgs(i.marker,{draggable:!0,raiseOnDrag:!0,map:n});a=acf.applyFilters("google_map_marker_args",a,this);var r=new google.maps.Marker(a),o=!1;if(acf.isset(google,"maps","places","Autocomplete")){var s=i.autocomplete||{};s=acf.applyFilters("google_map_autocomplete_args",s,this),(o=new google.maps.places.Autocomplete(this.$search()[0],s)).bindTo("bounds",n)}this.addMapEvents(this,n,r,o),n.acf=this,n.marker=r,n.autocomplete=o,this.map=n,t&&this.setPosition(t.lat,t.lng),acf.doAction("google_map_init",n,r,this)},addMapEvents:function(t,e,i,n){google.maps.event.addListener(e,"click",(function(e){var i=e.latLng.lat(),n=e.latLng.lng();t.searchPosition(i,n)})),google.maps.event.addListener(i,"dragend",(function(){var e=this.getPosition().lat(),i=this.getPosition().lng();t.searchPosition(e,i)})),n&&google.maps.event.addListener(n,"place_changed",(function(){var e=this.getPlace();t.searchPlace(e)})),google.maps.event.addListener(e,"zoom_changed",(function(){var i=t.val();i&&(i.zoom=e.getZoom(),t.setValue(i,!0))}))},searchPosition:function(t,e){this.setState("loading");var i={lat:t,lng:e};r.geocode({location:i},function(t,e){if(this.setState(""),"OK"!==e)this.showNotice({text:acf.__("Location not found: %s").replace("%s",e),type:"warning"});else{var i=this.parseResult(t[0]);this.val(i)}}.bind(this))},searchPlace:function(t){if(t&&t.name){if(!t.geometry)return this.searchAddress(t.name);var e=this.parseResult(t);this.val(e)}},searchAddress:function(t){if(t){var e=t.split(",");if(2==e.length){var i=parseFloat(e[0]),n=parseFloat(e[1]);if(i&&n)return this.searchPosition(i,n)}this.setState("loading"),r.geocode({address:t},function(e,i){if(this.setState(""),"OK"!==i)this.showNotice({text:acf.__("Location not found: %s").replace("%s",i),type:"warning"});else{var n=this.parseResult(e[0]);n.address=t,this.val(n)}}.bind(this))}},searchLocation:function(){if(!navigator.geolocation)return alert(acf.__("Sorry, this browser does not support geolocation"));this.setState("loading"),navigator.geolocation.getCurrentPosition(function(t){this.setState("");var e=t.coords.latitude,i=t.coords.longitude;this.searchPosition(e,i)}.bind(this),function(t){this.setState("")}.bind(this))},parseResult:function(t){var e={address:t.formatted_address,lat:t.geometry.location.lat(),lng:t.geometry.location.lng()};e.zoom=this.map.getZoom(),t.place_id&&(e.place_id=t.place_id);var i={street_number:["street_number"],street_name:["street_address","route"],city:["locality"],state:["administrative_area_level_1","administrative_area_level_2","administrative_area_level_3","administrative_area_level_4","administrative_area_level_5"],post_code:["postal_code"],country:["country"]};for(var n in i)for(var a=i[n],r=0;r0?this.append(t,e):this.render(t)}),this)})},editAttachment:function(){var e=this.val();if(e)var i=acf.newMediaPopup({mode:"edit",title:acf.__("Edit Image"),button:acf.__("Update Image"),attachment:e,field:this.get("key"),select:t.proxy((function(t,e){this.render(t)}),this)})},removeAttachment:function(){this.render(!1)},onClickAdd:function(t,e){this.selectAttachment()},onClickEdit:function(t,e){this.editAttachment()},onClickRemove:function(t,e){this.removeAttachment()},onChange:function(e,i){var n=this.$input();acf.getFileInputData(i,(function(e){n.val(t.param(e))}))}});acf.registerFieldType(i)}(jQuery),function(t,e){var i=acf.models.ImageField.extend({type:"file",$control:function(){return this.$(".acf-file-uploader")},$input:function(){return this.$('input[type="hidden"]')},validateAttachment:function(t){return void 0!==(t=t||{}).id&&(t=t.attributes),t=acf.parseArgs(t,{url:"",alt:"",title:"",filename:"",filesizeHumanReadable:"",icon:"/wp-includes/images/media/default.png"})},render:function(t){t=this.validateAttachment(t),this.$("img").attr({src:t.icon,alt:t.alt,title:t.title}),this.$('[data-name="title"]').text(t.title),this.$('[data-name="filename"]').text(t.filename).attr("href",t.url),this.$('[data-name="filesize"]').text(t.filesizeHumanReadable);var e=t.id||"";acf.val(this.$input(),e),e?this.$control().addClass("has-value"):this.$control().removeClass("has-value")},selectAttachment:function(){var e=this.parent(),i=e&&"repeater"===e.get("type"),n=acf.newMediaPopup({mode:"select",title:acf.__("Select File"),field:this.get("key"),multiple:i,library:this.get("library"),allowedTypes:this.get("mime_types"),select:t.proxy((function(t,i){i>0?this.append(t,e):this.render(t)}),this)})},editAttachment:function(){var e=this.val();if(!e)return!1;var i=acf.newMediaPopup({mode:"edit",title:acf.__("Edit File"),button:acf.__("Update File"),attachment:e,field:this.get("key"),select:t.proxy((function(t,e){this.render(t)}),this)})}});acf.registerFieldType(i)}(jQuery),function(t,e){var i=acf.Field.extend({type:"link",events:{'click a[data-name="add"]':"onClickEdit",'click a[data-name="edit"]':"onClickEdit",'click a[data-name="remove"]':"onClickRemove","change .link-node":"onChange"},$control:function(){return this.$(".acf-link")},$node:function(){return this.$(".link-node")},getValue:function(){var t=this.$node();return!!t.attr("href")&&{title:t.html(),url:t.attr("href"),target:t.attr("target")}},setValue:function(t){t=acf.parseArgs(t,{title:"",url:"",target:""});var e=this.$control(),i=this.$node();e.removeClass("-value -external"),t.url&&e.addClass("-value"),"_blank"===t.target&&e.addClass("-external"),this.$(".link-title").html(t.title),this.$(".link-url").attr("href",t.url).html(t.url),i.html(t.title),i.attr("href",t.url),i.attr("target",t.target),this.$(".input-title").val(t.title),this.$(".input-target").val(t.target),this.$(".input-url").val(t.url).trigger("change")},onClickEdit:function(t,e){acf.wpLink.open(this.$node())},onClickRemove:function(t,e){this.setValue(!1)},onChange:function(t,e){var i=this.getValue();this.setValue(i)}});acf.registerFieldType(i),acf.wpLink=new acf.Model({getNodeValue:function(){var t=this.get("node");return{title:acf.decode(t.html()),url:t.attr("href"),target:t.attr("target")}},setNodeValue:function(t){var e=this.get("node");e.text(t.title),e.attr("href",t.url),e.attr("target",t.target),e.trigger("change")},getInputValue:function(){return{title:t("#wp-link-text").val(),url:t("#wp-link-url").val(),target:t("#wp-link-target").prop("checked")?"_blank":""}},setInputValue:function(e){t("#wp-link-text").val(e.title),t("#wp-link-url").val(e.url),t("#wp-link-target").prop("checked","_blank"===e.target)},open:function(e){this.on("wplink-open","onOpen"),this.on("wplink-close","onClose"),this.set("node",e);var i=t('');t("body").append(i);var n=this.getNodeValue();wpLink.open("acf-link-textarea",n.url,n.title,null)},onOpen:function(){t("#wp-link-wrap").addClass("has-text-field");var e=this.getNodeValue();this.setInputValue(e)},close:function(){wpLink.close()},onClose:function(){if(!this.has("node"))return!1;this.off("wplink-open"),this.off("wplink-close");var e=this.getInputValue();this.setNodeValue(e),t("#acf-link-textarea").remove(),this.set("node",null)}})}(jQuery),function(t,e){var i=acf.Field.extend({type:"oembed",events:{'click [data-name="clear-button"]':"onClickClear","keypress .input-search":"onKeypressSearch","keyup .input-search":"onKeyupSearch","change .input-search":"onChangeSearch"},$control:function(){return this.$(".acf-oembed")},$input:function(){return this.$(".input-value")},$search:function(){return this.$(".input-search")},getValue:function(){return this.$input().val()},getSearchVal:function(){return this.$search().val()},setValue:function(t){t?this.$control().addClass("has-value"):this.$control().removeClass("has-value"),acf.val(this.$input(),t)},showLoading:function(t){acf.showLoading(this.$(".canvas"))},hideLoading:function(){acf.hideLoading(this.$(".canvas"))},maybeSearch:function(){var e=this.val(),i=this.getSearchVal();if(!i)return this.clear();if("http"!=i.substr(0,4)&&(i="http://"+i),i!==e){var n=this.get("timeout");n&&clearTimeout(n);var a=t.proxy(this.search,this,i);this.set("timeout",setTimeout(a,300))}},search:function(e){var i={action:"acf/fields/oembed/search",s:e,field_key:this.get("key")},n;(n=this.get("xhr"))&&n.abort(),this.showLoading();var n=t.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(i),type:"post",dataType:"json",context:this,success:function(t){t&&t.html||(t={url:!1,html:""}),this.val(t.url),this.$(".canvas-media").html(t.html)},complete:function(){this.hideLoading()}});this.set("xhr",n)},clear:function(){this.val(""),this.$search().val(""),this.$(".canvas-media").html("")},onClickClear:function(t,e){this.clear()},onKeypressSearch:function(t,e){13==t.which&&(t.preventDefault(),this.maybeSearch())},onKeyupSearch:function(t,e){e.val()&&this.maybeSearch()},onChangeSearch:function(t,e){this.maybeSearch()}});acf.registerFieldType(i)}(jQuery),function(t,e){var i=acf.Field.extend({type:"radio",events:{'click input[type="radio"]':"onClick"},$control:function(){return this.$(".acf-radio-list")},$input:function(){return this.$("input:checked")},$inputText:function(){return this.$('input[type="text"]')},getValue:function(){var t=this.$input().val();return"other"===t&&this.get("other_choice")&&(t=this.$inputText().val()),t},onClick:function(t,e){var i=e.parent("label"),n=i.hasClass("selected"),a=e.val();this.$(".selected").removeClass("selected"),i.addClass("selected"),this.get("allow_null")&&n&&(i.removeClass("selected"),e.prop("checked",!1).trigger("change"),a=!1),this.get("other_choice")&&("other"===a?this.$inputText().prop("disabled",!1):this.$inputText().prop("disabled",!0))}});acf.registerFieldType(i)}(jQuery),function(t,e){var i=acf.Field.extend({type:"range",events:{'input input[type="range"]':"onChange","change input":"onChange"},$input:function(){return this.$('input[type="range"]')},$inputAlt:function(){return this.$('input[type="number"]')},setValue:function(t){this.busy=!0,acf.val(this.$input(),t),acf.val(this.$inputAlt(),this.$input().val(),!0),this.busy=!1},onChange:function(t,e){this.busy||this.setValue(e.val())}});acf.registerFieldType(i)}(jQuery),function(t,e){var i=acf.Field.extend({type:"relationship",events:{"keypress [data-filter]":"onKeypressFilter","change [data-filter]":"onChangeFilter","keyup [data-filter]":"onChangeFilter","click .choices-list .acf-rel-item":"onClickAdd",'click [data-name="remove_item"]':"onClickRemove"},$control:function(){return this.$(".acf-relationship")},$list:function(t){return this.$("."+t+"-list")},$listItems:function(t){return this.$list(t).find(".acf-rel-item")},$listItem:function(t,e){return this.$list(t).find('.acf-rel-item[data-id="'+e+'"]')},getValue:function(){var e=[];return this.$listItems("values").each((function(){e.push(t(this).data("id"))})),!!e.length&&e},newChoice:function(t){return["",''+t.text+" "," "].join("")},newValue:function(t){return["",' ',''+t.text,' '," "," "].join("")},initialize:function(){var t=this.proxy(acf.once((function(){this.$list("values").sortable({items:"li",forceHelperSize:!0,forcePlaceholderSize:!0,scroll:!0,update:this.proxy((function(){this.$input().trigger("change")}))}),this.$list("choices").scrollTop(0).on("scroll",this.proxy(this.onScrollChoices)),this.fetch()})));this.$el.one("mouseover",t),this.$el.one("focus","input",t),acf.onceInView(this.$el,t)},onScrollChoices:function(t){if(!this.get("loading")&&this.get("more")){var e=this.$list("choices"),i=Math.ceil(e.scrollTop()),n=Math.ceil(e[0].scrollHeight),a=Math.ceil(e.innerHeight()),r=this.get("paged")||1;i+a>=n&&(this.set("paged",r+1),this.fetch())}},onKeypressFilter:function(t,e){13==t.which&&t.preventDefault()},onChangeFilter:function(t,e){var i=e.val(),n=e.data("filter");this.get(n)!==i&&(this.set(n,i),this.set("paged",1),e.is("select")?this.fetch():this.maybeFetch())},onClickAdd:function(t,e){var i=this.val(),n=parseInt(this.get("max"));if(e.hasClass("disabled"))return!1;if(n>0&&i&&i.length>=n)return this.showNotice({text:acf.__("Maximum values reached ( {max} values )").replace("{max}",n),type:"warning"}),!1;e.addClass("disabled");var a=this.newValue({id:e.data("id"),text:e.html()});this.$list("values").append(a),this.$input().trigger("change")},onClickRemove:function(t,e){t.preventDefault();var i=e.parent(),n=i.parent(),a=i.data("id");n.remove(),this.$listItem("choices",a).removeClass("disabled"),this.$input().trigger("change")},maybeFetch:function(){var t=this.get("timeout");t&&clearTimeout(t),t=this.setTimeout(this.fetch,300),this.set("timeout",t)},getAjaxData:function(){var t=this.$control().data();for(var e in t)t[e]=this.get(e);return t.action="acf/fields/relationship/query",t.field_key=this.get("key"),t=acf.applyFilters("relationship_ajax_data",t,this)},fetch:function(){var e;(e=this.get("xhr"))&&e.abort();var i=this.getAjaxData(),n=this.$list("choices");1==i.paged&&n.html("");var a=t(' '+acf.__("Loading")+" ");n.append(a),this.set("loading",!0);var r=function(){this.set("loading",!1),a.remove()},o=function(e){if(!e||!e.results||!e.results.length)return this.set("more",!1),void(1==this.get("paged")&&this.$list("choices").append(""+acf.__("No matches found")+" "));this.set("more",e.more);var i=this.walkChoices(e.results),a=t(i),r=this.val();r&&r.length&&r.map((function(t){a.find('.acf-rel-item[data-id="'+t+'"]').addClass("disabled")})),n.append(a);var o=!1,s=!1;n.find(".acf-rel-label").each((function(){var e=t(this),i=e.siblings("ul");if(o&&o.text()==e.text())return s.append(i.children()),void t(this).parent().remove();o=e,s=i}))},e=t.ajax({url:acf.get("ajaxurl"),dataType:"json",type:"post",data:acf.prepareForAjax(i),context:this,success:o,complete:r});this.set("xhr",e)},walkChoices:function(e){var i=function(e){var n="";return t.isArray(e)?e.map((function(t){n+=i(t)})):t.isPlainObject(e)&&(void 0!==e.children?(n+=''+e.text+' "):n+=''+e.text+" "),n};return i(e)}});acf.registerFieldType(i)}(jQuery),function(t,e){var i=acf.Field.extend({type:"select",select2:!1,wait:"load",events:{removeField:"onRemove"},$input:function(){return this.$("select")},initialize:function(){var t=this.$input();if(this.inherit(t),this.get("ui")){var e=this.get("ajax_action");e||(e="acf/fields/"+this.get("type")+"/query"),this.select2=acf.newSelect2(t,{field:this,ajax:this.get("ajax"),multiple:this.get("multiple"),placeholder:this.get("placeholder"),allowNull:this.get("allow_null"),ajaxAction:e})}},onRemove:function(){this.select2&&this.select2.destroy()}});acf.registerFieldType(i)}(jQuery),function(t,e){var i="tab",n=acf.Field.extend({type:"tab",wait:"",tabs:!1,tab:!1,findFields:function(){return this.$el.nextUntil(".acf-field-tab",".acf-field")},getFields:function(){return acf.getFields(this.findFields())},findTabs:function(){return this.$el.prevAll(".acf-tab-wrap:first")},findTab:function(){return this.$(".acf-tab-button")},initialize:function(){if(this.$el.is("td"))return this.events={},!1;var t=this.findTabs(),e=this.findTab(),i=acf.parseArgs(e.data(),{endpoint:!1,placement:"",before:this.$el});!t.length||i.endpoint?this.tabs=new r(i):this.tabs=t.data("acf"),this.tab=this.tabs.addTab(e,this)},isActive:function(){return this.tab.isActive()},showFields:function(){this.getFields().map((function(t){t.show(this.cid,"tab"),t.hiddenByTab=!1}),this)},hideFields:function(){this.getFields().map((function(t){t.hide(this.cid,"tab"),t.hiddenByTab=this.tab}),this)},show:function(t){var e=acf.Field.prototype.show.apply(this,arguments);return e&&(this.tab.show(),this.tabs.refresh()),e},hide:function(t){var e=acf.Field.prototype.hide.apply(this,arguments);return e&&(this.tab.hide(),this.isActive()&&this.tabs.reset()),e},enable:function(t){this.getFields().map((function(t){t.enable("tab")}))},disable:function(t){this.getFields().map((function(t){t.disable("tab")}))}});acf.registerFieldType(n);var a=0,r=acf.Model.extend({tabs:[],active:!1,actions:{refresh:"onRefresh"},data:{before:!1,placement:"top",index:0,initialized:!1},setup:function(e){t.extend(this.data,e),this.tabs=[],this.active=!1;var i=this.get("placement"),n=this.get("before"),r=n.parent();"left"==i&&r.hasClass("acf-fields")&&r.addClass("-sidebar"),n.is("tr")?this.$el=t(' '):this.$el=t(''),n.before(this.$el),this.set("index",a,!0),a++},initializeTabs:function(){var t=this.getVisible().shift(),e,i,n=(acf.getPreference("this.tabs")||[])[this.get("index")];this.tabs[n]&&this.tabs[n].isVisible()&&(t=this.tabs[n]),t?this.selectTab(t):this.closeTabs(),this.set("initialized",!0)},getVisible:function(){return this.tabs.filter((function(t){return t.isVisible()}))},getActive:function(){return this.active},setActive:function(t){return this.active=t},hasActive:function(){return!1!==this.active},isActive:function(t){var e=this.getActive();return e&&e.cid===t.cid},closeActive:function(){this.hasActive()&&this.closeTab(this.getActive())},openTab:function(t){this.closeActive(),t.open(),this.setActive(t)},closeTab:function(t){t.close(),this.setActive(!1)},closeTabs:function(){this.tabs.map(this.closeTab,this)},selectTab:function(t){this.tabs.map((function(e){t.cid!==e.cid&&this.closeTab(e)}),this),this.openTab(t)},addTab:function(e,i){var n=t(" ");n.append(e),this.$("ul").append(n);var a=new o({$el:n,field:i,group:this});return this.tabs.push(a),a},reset:function(){return this.closeActive(),this.refresh()},refresh:function(){if(this.hasActive())return!1;var t=this.getVisible().shift();return t&&this.openTab(t),t},onRefresh:function(){if("left"===this.get("placement")){var t=this.$el.parent(),e=this.$el.children("ul"),i=t.is("td")?"height":"min-height",n=e.position().top+e.outerHeight(!0)-1;t.css(i,n)}}}),o=acf.Model.extend({group:!1,field:!1,events:{"click a":"onClick"},index:function(){return this.$el.index()},isVisible:function(){return acf.isVisible(this.$el)},isActive:function(){return this.$el.hasClass("active")},open:function(){this.$el.addClass("active"),this.field.showFields()},close:function(){this.$el.removeClass("active"),this.field.hideFields()},onClick:function(t,e){t.preventDefault(),this.toggle()},toggle:function(){this.isActive()||this.group.openTab(this)}}),s=new acf.Model({priority:50,actions:{prepare:"render",append:"render",unload:"onUnload",invalid_field:"onInvalidField"},findTabs:function(){return t(".acf-tab-wrap")},getTabs:function(){return acf.getInstances(this.findTabs())},render:function(t){this.getTabs().map((function(t){t.get("initialized")||t.initializeTabs()}))},onInvalidField:function(t){this.busy||t.hiddenByTab&&(t.hiddenByTab.toggle(),this.busy=!0,this.setTimeout((function(){this.busy=!1}),100))},onUnload:function(){var t=[];this.getTabs().map((function(e){var i=e.hasActive()?e.getActive().index():0;t.push(i)})),t.length&&acf.setPreference("this.tabs",t)}})}(jQuery),function(t,e){var i=acf.models.SelectField.extend({type:"post_object"});acf.registerFieldType(i)}(jQuery),function(t,e){var i=acf.models.SelectField.extend({type:"page_link"});acf.registerFieldType(i)}(jQuery),function(t,e){var i=acf.models.SelectField.extend({type:"user"});acf.registerFieldType(i)}(jQuery),function(t,e){var i=acf.Field.extend({type:"taxonomy",data:{ftype:"select"},select2:!1,wait:"load",events:{
-'click a[data-name="add"]':"onClickAdd",'click input[type="radio"]':"onClickRadio"},$control:function(){return this.$(".acf-taxonomy-field")},$input:function(){return this.getRelatedPrototype().$input.apply(this,arguments)},getRelatedType:function(){var t=this.get("ftype");return"multi_select"==t&&(t="select"),t},getRelatedPrototype:function(){return acf.getFieldType(this.getRelatedType()).prototype},getValue:function(){return this.getRelatedPrototype().getValue.apply(this,arguments)},setValue:function(){return this.getRelatedPrototype().setValue.apply(this,arguments)},initialize:function(){this.getRelatedPrototype().initialize.apply(this,arguments)},onRemove:function(){this.select2&&this.select2.destroy()},onClickAdd:function(e,i){var n=this,a=!1,r=!1,o=!1,s=!1,c=!1,l=!1,u=!1,d=function(){a=acf.newPopup({title:i.attr("title"),loading:!0,width:"300px"});var e={action:"acf/fields/taxonomy/add_term",field_key:n.get("key")};t.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(e),type:"post",dataType:"html",success:f})},f=function(t){a.loading(!1),a.content(t),r=a.$("form"),o=a.$('input[name="term_name"]'),s=a.$('select[name="term_parent"]'),c=a.$(".acf-submit-button"),o.focus(),a.on("submit","form",h)},h=function(e,i){if(e.preventDefault(),e.stopImmediatePropagation(),""===o.val())return o.focus(),!1;acf.startButtonLoading(c);var a={action:"acf/fields/taxonomy/add_term",field_key:n.get("key"),term_name:o.val(),term_parent:s.length?s.val():0};t.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(a),type:"post",dataType:"json",success:p})},p=function(t){acf.stopButtonLoading(c),u&&u.remove(),acf.isAjaxSuccess(t)?(o.val(""),g(t.data),u=acf.newNotice({type:"success",text:acf.getAjaxMessage(t),target:r,timeout:2e3,dismiss:!1})):u=acf.newNotice({type:"error",text:acf.getAjaxError(t),target:r,timeout:2e3,dismiss:!1}),o.focus()},g=function(e){var i=t(''+e.term_label+" "),a;e.term_parent?s.children('option[value="'+e.term_parent+'"]').after(i):s.append(i),acf.getFields({type:"taxonomy"}).map((function(t){t.get("taxonomy")==n.get("taxonomy")&&t.appendTerm(e)})),n.selectTerm(e.term_id)};d()},appendTerm:function(t){"select"==this.getRelatedType()?this.appendTermSelect(t):this.appendTermCheckbox(t)},appendTermSelect:function(t){this.select2.addOption({id:t.term_id,text:t.term_label})},appendTermCheckbox:function(e){var i=this.$("[name]:first").attr("name"),n=this.$("ul:first");"checkbox"==this.getRelatedType()&&(i+="[]");var a=t(['',"",' ',""+e.term_name+" "," "," "].join(""));if(e.term_parent){var r=n.find('li[data-id="'+e.term_parent+'"]');(n=r.children("ul")).exists()||(n=t(''),r.append(n))}n.append(a)},selectTerm:function(t){var e;"select"==this.getRelatedType()?this.select2.selectOption(t):this.$('input[value="'+t+'"]').prop("checked",!0).trigger("change")},onClickRadio:function(t,e){var i=e.parent("label"),n=i.hasClass("selected");this.$(".selected").removeClass("selected"),i.addClass("selected"),this.get("allow_null")&&n&&(i.removeClass("selected"),e.prop("checked",!1).trigger("change"))}});acf.registerFieldType(i)}(jQuery),function(t,e){var i=acf.models.DatePickerField.extend({type:"time_picker",$control:function(){return this.$(".acf-time-picker")},initialize:function(){var t=this.$input(),e=this.$inputText(),i={timeFormat:this.get("time_format"),altField:t,altFieldTimeOnly:!1,altTimeFormat:"HH:mm:ss",showButtonPanel:!0,controlType:"select",oneLine:!0,closeText:acf.get("dateTimePickerL10n").selectText,timeOnly:!0,onClose:function(t,e,i){var n=e.dpDiv.find(".ui-datepicker-close");!t&&n.is(":hover")&&i._updateDateTime()}};i=acf.applyFilters("time_picker_args",i,this),acf.newTimePicker(e,i),acf.doAction("time_picker_init",e,i,this)}});acf.registerFieldType(i),acf.newTimePicker=function(e,i){if(void 0===t.timepicker)return!1;i=i||{},e.timepicker(i),t("body > #ui-datepicker-div").exists()&&t("body > #ui-datepicker-div").wrap('
')}}(jQuery),function(t,e){var i=acf.Field.extend({type:"true_false",events:{"change .acf-switch-input":"onChange","focus .acf-switch-input":"onFocus","blur .acf-switch-input":"onBlur","keypress .acf-switch-input":"onKeypress"},$input:function(){return this.$('input[type="checkbox"]')},$switch:function(){return this.$(".acf-switch")},getValue:function(){return this.$input().prop("checked")?1:0},initialize:function(){this.render()},render:function(){var t=this.$switch();if(t.length){var e=t.children(".acf-switch-on"),i=t.children(".acf-switch-off"),n=Math.max(e.width(),i.width());n&&(e.css("min-width",n),i.css("min-width",n))}},switchOn:function(){this.$input().prop("checked",!0),this.$switch().addClass("-on")},switchOff:function(){this.$input().prop("checked",!1),this.$switch().removeClass("-on")},onChange:function(t,e){e.prop("checked")?this.switchOn():this.switchOff()},onFocus:function(t,e){this.$switch().addClass("-focus")},onBlur:function(t,e){this.$switch().removeClass("-focus")},onKeypress:function(t,e){return 37===t.keyCode?this.switchOff():39===t.keyCode?this.switchOn():void 0}});acf.registerFieldType(i)}(jQuery),function(t,e){var i=acf.Field.extend({type:"url",events:{'keyup input[type="url"]':"onkeyup"},$control:function(){return this.$(".acf-input-wrap")},$input:function(){return this.$('input[type="url"]')},initialize:function(){this.render()},isValid:function(){var t=this.val();return!!t&&(-1!==t.indexOf("://")||0===t.indexOf("//"))},render:function(){this.isValid()?this.$control().addClass("-valid"):this.$control().removeClass("-valid")},onkeyup:function(t,e){this.render()}});acf.registerFieldType(i)}(jQuery),function(t,e){var i=acf.Field.extend({type:"wysiwyg",wait:"load",events:{"mousedown .acf-editor-wrap.delay":"onMousedown",unmountField:"disableEditor",remountField:"enableEditor",removeField:"disableEditor"},$control:function(){return this.$(".acf-editor-wrap")},$input:function(){return this.$("textarea")},getMode:function(){return this.$control().hasClass("tmce-active")?"visual":"text"},initialize:function(){this.$control().hasClass("delay")||this.initializeEditor()},initializeEditor:function(){var t=this.$control(),e=this.$input(),i={tinymce:!0,quicktags:!0,toolbar:this.get("toolbar"),mode:this.getMode(),field:this},n=e.attr("id"),a=acf.uniqueId("acf-editor-"),r=e.data();acf.rename({target:t,search:n,replace:a,destructive:!0}),this.set("id",a,!0),acf.tinymce.initialize(a,i),this.$input().data(r)},onMousedown:function(t){t.preventDefault();var e=this.$control();e.removeClass("delay"),e.find(".acf-editor-toolbar").remove(),this.initializeEditor()},enableEditor:function(){"visual"==this.getMode()&&acf.tinymce.enable(this.get("id"))},disableEditor:function(){acf.tinymce.destroy(this.get("id"))}});acf.registerFieldType(i)}(jQuery),function(t,e){var i=[];acf.Condition=acf.Model.extend({type:"",operator:"==",label:"",choiceType:"input",fieldTypes:[],data:{conditions:!1,field:!1,rule:{}},events:{change:"change",keyup:"change",enableField:"change",disableField:"change"},setup:function(e){t.extend(this.data,e)},getEventTarget:function(t,e){return t||this.get("field").$el},change:function(t,e){this.get("conditions").change(t)},match:function(t,e){return!1},calculate:function(){return this.match(this.get("rule"),this.get("field"))},choices:function(t){return' '}}),acf.newCondition=function(t,e){var i=e.get("field"),n=i.getField(t.field);if(!i||!n)return!1;var a={rule:t,target:i,conditions:e,field:n},r=n.get("type"),o=t.operator,s,c,l;return new(acf.getConditionTypes({fieldType:r,operator:o})[0]||acf.Condition)(a)};var n=function(t){return acf.strPascalCase(t||"")+"Condition"};acf.registerConditionType=function(t){var e,a=t.prototype.type,r=n(a);acf.models[r]=t,i.push(a)},acf.getConditionType=function(t){var e=n(t);return acf.models[e]||!1},acf.registerConditionForFieldType=function(t,e){var i=acf.getConditionType(t);i&&i.prototype.fieldTypes.push(e)},acf.getConditionTypes=function(t){t=acf.parseArgs(t,{fieldType:"",operator:""});var e=[];return i.map((function(i){var n=acf.getConditionType(i),a=n.prototype.fieldTypes,r=n.prototype.operator;t.fieldType&&-1===a.indexOf(t.fieldType)||t.operator&&r!==t.operator||e.push(n)})),e}}(jQuery),function(t,e){var i="conditional_logic",n=new acf.Model({id:"conditionsManager",priority:20,actions:{new_field:"onNewField"},onNewField:function(t){t.has("conditions")&&t.getConditions().render()}}),a=function(t,e){var i=acf.getFields({key:e,sibling:t.$el,suppressFilters:!0});return i.length||(i=acf.getFields({key:e,parent:t.$el.parent(),suppressFilters:!0})),!!i.length&&i[0]};acf.Field.prototype.getField=function(t){var e=a(this,t);if(e)return e;for(var i=this.parents(),n=0;nparseFloat(e)},s=function(t,e){return parseFloat(t)-1},l=function(t,e){return n(t).indexOf(n(e))>-1},u=function(t,e){var i=new RegExp(n(e),"gi");return n(t).match(i)},d=acf.Condition.extend({type:"hasValue",operator:"!=empty",label:i("Has any value"),fieldTypes:["text","textarea","number","range","email","url","password","image","file","wysiwyg","oembed","select","checkbox","radio","button_group","link","post_object","page_link","relationship","taxonomy","user","google_map","date_picker","date_time_picker","time_picker","color_picker"],match:function(t,e){return!!e.val()},choices:function(t){return' '}});acf.registerConditionType(d);var f=d.extend({type:"hasNoValue",operator:"==empty",label:i("Has no value"),match:function(t,e){return!d.prototype.match.apply(this,arguments)}});acf.registerConditionType(f);var h=acf.Condition.extend({type:"equalTo",operator:"==",label:i("Value is equal to"),fieldTypes:["text","textarea","number","range","email","url","password"],match:function(e,i){return t.isNumeric(e.value)?r(e.value,i.val()):a(e.value,i.val())},choices:function(t){return' '}});acf.registerConditionType(h);var p=h.extend({type:"notEqualTo",operator:"!=",label:i("Value is not equal to"),match:function(t,e){return!h.prototype.match.apply(this,arguments)}});acf.registerConditionType(p);var g=acf.Condition.extend({type:"patternMatch",operator:"==pattern",label:i("Value matches pattern"),fieldTypes:["text","textarea","email","url","password","wysiwyg"],match:function(t,e){return u(e.val(),t.value)},choices:function(t){return' '}});acf.registerConditionType(g);var m=acf.Condition.extend({type:"contains",operator:"==contains",label:i("Value contains"),fieldTypes:["text","textarea","number","email","url","password","wysiwyg","oembed","select"],match:function(t,e){return l(e.val(),t.value)},choices:function(t){return' '}});acf.registerConditionType(m);var v=h.extend({type:"trueFalseEqualTo",choiceType:"select",fieldTypes:["true_false"],choices:function(t){return[{id:1,text:i("Checked")}]}});acf.registerConditionType(v);var y=p.extend({type:"trueFalseNotEqualTo",choiceType:"select",fieldTypes:["true_false"],choices:function(t){return[{id:1,text:i("Checked")}]}});acf.registerConditionType(y);var b=acf.Condition.extend({type:"selectEqualTo",operator:"==",label:i("Value is equal to"),fieldTypes:["select","checkbox","radio","button_group"],match:function(t,e){var i=e.val();return i instanceof Array?c(t.value,i):a(t.value,i)},choices:function(e){var n=[],a=e.$setting("choices textarea").val().split("\n");return e.$input("allow_null").prop("checked")&&n.push({id:"",text:i("Null")}),a.map((function(e){(e=e.split(":"))[1]=e[1]||e[0],n.push({id:t.trim(e[0]),text:t.trim(e[1])})})),n}});acf.registerConditionType(b);var _=b.extend({type:"selectNotEqualTo",operator:"!=",label:i("Value is not equal to"),match:function(t,e){return!b.prototype.match.apply(this,arguments)}});acf.registerConditionType(_);var w=acf.Condition.extend({type:"greaterThan",operator:">",label:i("Value is greater than"),fieldTypes:["number","range"],match:function(t,e){var i=e.val();return i instanceof Array&&(i=i.length),o(i,t.value)},choices:function(t){return' '}});acf.registerConditionType(w);var x=w.extend({type:"lessThan",operator:"<",label:i("Value is less than"),match:function(t,e){var i=e.val();return i instanceof Array&&(i=i.length),s(i,t.value)},choices:function(t){return' '}});acf.registerConditionType(x);var $=w.extend({type:"selectionGreaterThan",label:i("Selection is greater than"),fieldTypes:["checkbox","select","post_object","page_link","relationship","taxonomy","user"]});acf.registerConditionType($);var k=x.extend({type:"selectionLessThan",label:i("Selection is less than"),fieldTypes:["checkbox","select","post_object","page_link","relationship","taxonomy","user"]});acf.registerConditionType(k)}(jQuery),function(t,e){acf.newMediaPopup=function(t){var e=null,t=acf.parseArgs(t,{mode:"select",title:"",button:"",type:"",field:!1,allowedTypes:"",library:"all",multiple:!1,attachment:0,autoOpen:!0,open:function(){},select:function(){},close:function(){}});return e="edit"==t.mode?new acf.models.EditMediaPopup(t):new acf.models.SelectMediaPopup(t),t.autoOpen&&setTimeout((function(){e.open()}),1),acf.doAction("new_media_popup",e),e};var i=function(){var e=acf.get("post_id");return t.isNumeric(e)?e:0};acf.getMimeTypes=function(){return this.get("mimeTypes")},acf.getMimeType=function(t){var e=acf.getMimeTypes();if(void 0!==e[t])return e[t];for(var i in e)if(-1!==i.indexOf(t))return e[i];return!1};var n=acf.Model.extend({id:"MediaPopup",data:{},defaults:{},frame:!1,setup:function(e){t.extend(this.data,e)},initialize:function(){var t=this.getFrameOptions();this.addFrameStates(t);var e=wp.media(t);e.acf=this,this.addFrameEvents(e,t),this.frame=e},open:function(){this.frame.open()},close:function(){this.frame.close()},remove:function(){this.frame.detach(),this.frame.remove()},getFrameOptions:function(){var t={title:this.get("title"),multiple:this.get("multiple"),library:{},states:[]};return this.get("type")&&(t.library.type=this.get("type")),"uploadedTo"===this.get("library")&&(t.library.uploadedTo=i()),this.get("attachment")&&(t.library.post__in=[this.get("attachment")]),this.get("button")&&(t.button={text:this.get("button")}),t},addFrameStates:function(t){var e=wp.media.query(t.library);this.get("field")&&acf.isset(e,"mirroring","args")&&(e.mirroring.args._acfuploader=this.get("field")),t.states.push(new wp.media.controller.Library({library:e,multiple:this.get("multiple"),title:this.get("title"),priority:20,filterable:"all",editable:!0,allowLocalEdits:!0})),acf.isset(wp,"media","controller","EditImage")&&t.states.push(new wp.media.controller.EditImage)},addFrameEvents:function(t,e){t.on("open",(function(){this.$el.closest(".media-modal").addClass("acf-media-modal -"+this.acf.get("mode"))}),t),t.on("content:render:edit-image",(function(){var t=this.state().get("image"),e=new wp.media.view.EditImage({model:t,controller:this}).render();this.content.set(e),e.loadEditor()}),t),t.on("select",(function(){var e=t.state().get("selection");e&&e.each((function(e,i){t.acf.get("select").apply(t.acf,[e,i])}))})),t.on("close",(function(){setTimeout((function(){t.acf.get("close").apply(t.acf),t.acf.remove()}),1)}))}});acf.models.SelectMediaPopup=n.extend({id:"SelectMediaPopup",setup:function(t){t.button||(t.button=acf._x("Select","verb")),n.prototype.setup.apply(this,arguments)},addFrameEvents:function(t,e){acf.isset(_wpPluploadSettings,"defaults","multipart_params")&&(_wpPluploadSettings.defaults.multipart_params._acfuploader=this.get("field"),t.on("open",(function(){delete _wpPluploadSettings.defaults.multipart_params._acfuploader}))),t.on("content:activate:browse",(function(){var e=!1;try{e=t.content.get().toolbar}catch(t){return void console.log(t)}t.acf.customizeFilters.apply(t.acf,[e])})),n.prototype.addFrameEvents.apply(this,arguments)},customizeFilters:function(e){var i=e.get("filters"),n;("image"==this.get("type")&&(i.filters.all.text=acf.__("All images"),delete i.filters.audio,delete i.filters.video,delete i.filters.image,t.each(i.filters,(function(t,e){e.props.type=e.props.type||"image"}))),this.get("allowedTypes"))&&this.get("allowedTypes").split(" ").join("").split(".").join("").split(",").map((function(t){var e=acf.getMimeType(t);if(e){var n={text:e,props:{status:null,type:e,uploadedTo:null,orderby:"date",order:"DESC"},priority:20};i.filters[e]=n}}));if("uploadedTo"===this.get("library")){var a=this.frame.options.library.uploadedTo;delete i.filters.unattached,delete i.filters.uploaded,t.each(i.filters,(function(t,e){e.text+=" ("+acf.__("Uploaded to this post")+")",e.props.uploadedTo=a}))}var r=this.get("field"),o;t.each(i.filters,(function(t,e){e.props._acfuploader=r})),e.get("search").model.attributes._acfuploader=r,i.renderFilters&&i.renderFilters()}}),acf.models.EditMediaPopup=n.extend({id:"SelectMediaPopup",setup:function(t){t.button||(t.button=acf._x("Update","verb")),n.prototype.setup.apply(this,arguments)},addFrameEvents:function(t,e){t.on("open",(function(){this.$el.closest(".media-modal").addClass("acf-expanded"),"browse"!=this.content.mode()&&this.content.mode("browse");var e,i=this.state().get("selection"),n=wp.media.attachment(t.acf.get("attachment"));i.add(n)}),t),n.prototype.addFrameEvents.apply(this,arguments)}});var a=new acf.Model({id:"customizePrototypes",wait:"ready",initialize:function(){if(acf.isset(window,"wp","media","view")){var t=i();t&&acf.isset(wp,"media","view","settings","post")&&(wp.media.view.settings.post.id=t),this.customizeAttachmentsButton(),this.customizeAttachmentsRouter(),this.customizeAttachmentFilters(),this.customizeAttachmentCompat(),this.customizeAttachmentLibrary()}},customizeAttachmentsButton:function(){if(acf.isset(wp,"media","view","Button")){var t=wp.media.view.Button;wp.media.view.Button=t.extend({initialize:function(){var t=_.defaults(this.options,this.defaults);this.model=new Backbone.Model(t),this.listenTo(this.model,"change",this.render)}})}},customizeAttachmentsRouter:function(){if(acf.isset(wp,"media","view","Router")){var e=wp.media.view.Router;wp.media.view.Router=e.extend({addExpand:function(){var e=t(['',' '+acf.__("Expand Details")+" ",' '+acf.__("Collapse Details")+" "," "].join(""));e.on("click",(function(e){e.preventDefault();var i=t(this).closest(".media-modal");i.hasClass("acf-expanded")?i.removeClass("acf-expanded"):i.addClass("acf-expanded")})),this.$el.append(e)},initialize:function(){return e.prototype.initialize.apply(this,arguments),this.addExpand(),this}})}},customizeAttachmentFilters:function(){var e;acf.isset(wp,"media","view","AttachmentFilters","All")&&(wp.media.view.AttachmentFilters.All.prototype.renderFilters=function(){this.$el.html(_.chain(this.filters).map((function(e,i){return{el:t(" ").val(i).html(e.text)[0],priority:e.priority||50}}),this).sortBy("priority").pluck("el").value())})},customizeAttachmentCompat:function(){if(acf.isset(wp,"media","view","AttachmentCompat")){var e=wp.media.view.AttachmentCompat,i=!1;wp.media.view.AttachmentCompat=e.extend({render:function(){return this.rendered?this:(e.prototype.render.apply(this,arguments),this.$("#acf-form-data").length?(clearTimeout(i),i=setTimeout(t.proxy((function(){this.rendered=!0,acf.doAction("append",this.$el)}),this),50),this):this)},save:function(t){var e={};t&&t.preventDefault(),e=acf.serializeForAjax(this.$el),this.controller.trigger("attachment:compat:waiting",["waiting"]),this.model.saveCompat(e).always(_.bind(this.postSave,this))}})}},customizeAttachmentLibrary:function(){if(acf.isset(wp,"media","view","Attachment","Library")){var t=wp.media.view.Attachment.Library;wp.media.view.Attachment.Library=t.extend({render:function(){var e=acf.isget(this,"controller","acf"),i=acf.isget(this,"model","attributes");if(e&&i){i.acf_errors&&this.$el.addClass("acf-disabled");var n=e.get("selected");n&&n.indexOf(i.id)>-1&&this.$el.addClass("acf-selected")}return t.prototype.render.apply(this,arguments)},toggleSelection:function(e){var i=this.collection,n=this.options.selection,a=this.model,r=n.single(),o=this.controller,s=acf.isget(this,"model","attributes","acf_errors"),c=o.$el.find(".media-frame-content .media-sidebar");if(c.children(".acf-selection-error").remove(),c.children().removeClass("acf-hidden"),o&&s){var l=acf.isget(this,"model","attributes","filename");return c.children().addClass("acf-hidden"),c.prepend(['',''+acf.__("Restricted")+" ",''+l+" ",''+s+" ","
"].join("")),n.reset(),void n.single(a)}return t.prototype.toggleSelection.apply(this,arguments)}})}}})}(jQuery),function(t,e){acf.screen=new acf.Model({active:!0,xhr:!1,timeout:!1,wait:"load",events:{"change #page_template":"onChange","change #parent_id":"onChange","change #post-formats-select":"onChange","change .categorychecklist":"onChange","change .tagsdiv":"onChange",'change .acf-taxonomy-field[data-save="1"]':"onChange","change #product-type":"onChange"},isPost:function(){return"post"===acf.get("screen")},isUser:function(){return"user"===acf.get("screen")},isTaxonomy:function(){return"taxonomy"===acf.get("screen")},isAttachment:function(){return"attachment"===acf.get("screen")},isNavMenu:function(){return"nav_menu"===acf.get("screen")},isWidget:function(){return"widget"===acf.get("screen")},isComment:function(){return"comment"===acf.get("screen")},getPageTemplate:function(){var e=t("#page_template");return e.length?e.val():null},getPageParent:function(e,i){var i;return(i=t("#parent_id")).length?i.val():null},getPageType:function(t,e){return this.getPageParent()?"child":"parent"},getPostType:function(){return t("#post_type").val()},getPostFormat:function(e,i){var i;if((i=t("#post-formats-select input:checked")).length){var n=i.val();return"0"==n?"standard":n}return null},getPostCoreTerms:function(){var e={},i=acf.serialize(t(".categorydiv, .tagsdiv"));for(var n in i.tax_input&&(e=i.tax_input),i.post_category&&(e.category=i.post_category),e)acf.isArray(e[n])||(e[n]=e[n].split(/,[\s]?/));return e},getPostTerms:function(){var t=this.getPostCoreTerms();for(var e in acf.getFields({type:"taxonomy"}).map((function(e){if(e.get("save")){var i=e.val(),n=e.get("taxonomy");i&&(t[n]=t[n]||[],i=acf.isArray(i)?i:[i],t[n]=t[n].concat(i))}})),null!==(productType=this.getProductType())&&(t.product_type=[productType]),t)t[e]=acf.uniqueArray(t[e]);return t},getProductType:function(){var e=t("#product-type");return e.length?e.val():null},check:function(){if("post"===acf.get("screen")){this.xhr&&this.xhr.abort();var e=acf.parseArgs(this.data,{action:"acf/ajax/check_screen",screen:acf.get("screen"),exists:[]});this.isPost()&&(e.post_id=acf.get("post_id")),null!==(postType=this.getPostType())&&(e.post_type=postType),null!==(pageTemplate=this.getPageTemplate())&&(e.page_template=pageTemplate),null!==(pageParent=this.getPageParent())&&(e.page_parent=pageParent),null!==(pageType=this.getPageType())&&(e.page_type=pageType),null!==(postFormat=this.getPostFormat())&&(e.post_format=postFormat),null!==(postTerms=this.getPostTerms())&&(e.post_terms=postTerms),acf.getPostboxes().map((function(t){e.exists.push(t.get("key"))})),e=acf.applyFilters("check_screen_args",e);var i=function(t){acf.isAjaxSuccess(t)&&("post"==acf.get("screen")?this.renderPostScreen(t.data):"user"==acf.get("screen")&&this.renderUserScreen(t.data)),acf.doAction("check_screen_complete",t.data,e)};this.xhr=t.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(e),type:"post",dataType:"json",context:this,success:i})}},onChange:function(t,e){this.setTimeout(this.check,1)},renderPostScreen:function(e){var i=function(e,i){var n=t._data(e[0]).events;for(var a in n)for(var r=0;r=0;a--)if(t("#"+i[a]).length)return t("#"+i[a]).after(t("#"+e));for(var a=n+1;a','','Toggle panel: '+a.title+" ",' '," ",'',""+a.title+" "," ",'',a.html,"
"," "].join(""));if(t("#adv-settings").length){var c=t("#adv-settings .metabox-prefs"),l=t(['',' '," "+a.title," "].join(""));i(c.find("input").first(),l.find("input")),c.append(l)}t(".postbox").length&&(i(t(".postbox .handlediv").first(),s.children(".handlediv")),i(t(".postbox .hndle").first(),s.children(".hndle"))),"side"===a.position?t("#"+a.position+"-sortables").append(s):t("#"+a.position+"-sortables").prepend(s);var u=[];if(e.results.map((function(e){a.position===e.position&&t("#"+a.position+"-sortables #"+e.id).length&&u.push(e.id)})),n(a.id,u),e.sorted)for(var d in e.sorted){var u=e.sorted[d].split(",");if(n(a.id,u))break}o=acf.newPostbox(a),acf.doAction("append",s),acf.doAction("append_postbox",o)}return o.showEnable(),e.visible.push(a.id),a})),acf.getPostboxes().map((function(t){-1===e.visible.indexOf(t.get("id"))&&(t.hideDisable(),e.hidden.push(t.get("id")))})),t("#acf-style").html(e.style),acf.doAction("refresh_post_screen",e)},renderUserScreen:function(t){}});var i=new acf.Model({postEdits:{},wait:"load",initialize:function(){var t;acf.isGutenberg()&&(wp.data.subscribe(acf.debounce(this.onChange).bind(this)),acf.screen.getPageTemplate=this.getPageTemplate,acf.screen.getPageParent=this.getPageParent,acf.screen.getPostType=this.getPostType,acf.screen.getPostFormat=this.getPostFormat,acf.screen.getPostCoreTerms=this.getPostCoreTerms,acf.unload.disable(),parseFloat(acf.get("wp_version"))>=5.3&&this.addAction("refresh_post_screen",this.onRefreshPostScreen))},onChange:function(){var t=["template","parent","format"];(wp.data.select("core").getTaxonomies()||[]).map((function(e){t.push(e.rest_base)}));var e=wp.data.select("core/editor").getPostEdits(),i={};t.map((function(t){void 0!==e[t]&&(i[t]=e[t])})),JSON.stringify(i)!==JSON.stringify(this.postEdits)&&(this.postEdits=i,acf.screen.check())},getPageTemplate:function(){return wp.data.select("core/editor").getEditedPostAttribute("template")},getPageParent:function(t,e){return wp.data.select("core/editor").getEditedPostAttribute("parent")},getPostType:function(){return wp.data.select("core/editor").getEditedPostAttribute("type")},getPostFormat:function(t,e){return wp.data.select("core/editor").getEditedPostAttribute("format")},getPostCoreTerms:function(){var t={},e;return(wp.data.select("core").getTaxonomies()||[]).map((function(e){var i=wp.data.select("core/editor").getEditedPostAttribute(e.rest_base);i&&(t[e.slug]=i)})),t},onRefreshPostScreen:function(t){var e=wp.data.select("core/edit-post"),i=wp.data.dispatch("core/edit-post"),n={};e.getActiveMetaBoxLocations().map((function(t){n[t]=e.getMetaBoxesPerLocation(t)}));var a=[];for(var r in n)n[r].map((function(t){a.push(t.id)}));for(var r in t.results.filter((function(t){return-1===a.indexOf(t.id)})).map((function(t,e){var i=t.position;n[i]=n[i]||[],n[i].push({id:t.id,title:t.title})})),n)n[r]=n[r].filter((function(e){return-1===t.hidden.indexOf(e.id)}));i.setAvailableMetaBoxesPerLocation(n)}})}(jQuery),function(t,e){function i(){return acf.isset(window,"jQuery","fn","select2","amd")?4:!!acf.isset(window,"Select2")&&3}acf.newSelect2=function(t,e){if(e=acf.parseArgs(e,{allowNull:!1,placeholder:"",multiple:!1,field:!1,ajax:!1,ajaxAction:"",ajaxData:function(t){return t},ajaxResults:function(t){return t}}),4==i())var n=new a(t,e);else var n=new r(t,e);return acf.doAction("new_select2",n),n};var n=acf.Model.extend({setup:function(e,i){t.extend(this.data,i),this.$el=e},initialize:function(){},selectOption:function(t){var e=this.getOption(t);e.prop("selected")||e.prop("selected",!0).trigger("change")},unselectOption:function(t){var e=this.getOption(t);e.prop("selected")&&e.prop("selected",!1).trigger("change")},getOption:function(t){return this.$('option[value="'+t+'"]')},addOption:function(e){e=acf.parseArgs(e,{id:"",text:"",selected:!1});var i=this.getOption(e.id);return i.length||((i=t(" ")).html(e.text),i.attr("value",e.id),i.prop("selected",e.selected),this.$el.append(i)),i},getValue:function(){var e=[],i=this.$el.find("option:selected");return i.exists()?((i=i.sort((function(t,e){return+t.getAttribute("data-i")-+e.getAttribute("data-i")}))).each((function(){var i=t(this);e.push({$el:i,id:i.attr("value"),text:i.text()})})),e):e},mergeOptions:function(){},getChoices:function(){var e=function(i){var n=[];return i.children().each((function(){var i=t(this);i.is("optgroup")?n.push({text:i.attr("label"),children:e(i)}):n.push({id:i.attr("value"),text:i.text()})})),n};return e(this.$el)},decodeChoices:function(t){var e=function(t){return t.map((function(t){return t.text=acf.decode(t.text),t.children&&(t.children=e(t.children)),t})),t};return e(t)},getAjaxData:function(t){var e={action:this.get("ajaxAction"),s:t.term||"",paged:t.page||1},i=this.get("field");i&&(e.field_key=i.get("key"));var n=this.get("ajaxData");return n&&(e=n.apply(this,[e,t])),e=acf.applyFilters("select2_ajax_data",e,this.data,this.$el,i||!1,this),acf.prepareForAjax(e)},getAjaxResults:function(t,e){(t=acf.parseArgs(t,{results:!1,more:!1})).results&&(t.results=this.decodeChoices(t.results));var i=this.get("ajaxResults");return i&&(t=i.apply(this,[t,e])),
-t=acf.applyFilters("select2_ajax_results",t,e,this)},processAjaxResults:function(e,i){var e;return(e=this.getAjaxResults(e,i)).more&&(e.pagination={more:!0}),setTimeout(t.proxy(this.mergeOptions,this),1),e},destroy:function(){this.$el.data("select2")&&this.$el.select2("destroy"),this.$el.siblings(".select2-container").remove()}}),a=n.extend({initialize:function(){var e=this.$el,i={width:"100%",allowClear:this.get("allowNull"),placeholder:this.get("placeholder"),multiple:this.get("multiple"),data:[],escapeMarkup:function(t){return t}};i.multiple&&this.getValue().map((function(t){t.$el.detach().appendTo(e)})),e.removeData("ajax"),e.removeAttr("data-ajax"),this.get("ajax")&&(i.ajax={url:acf.get("ajaxurl"),delay:250,dataType:"json",type:"post",cache:!1,data:t.proxy(this.getAjaxData,this),processResults:t.proxy(this.processAjaxResults,this)});var n=this.get("field");i=acf.applyFilters("select2_args",i,e,this.data,n||!1,this),e.select2(i);var a=e.next(".select2-container");if(i.multiple){var r=a.find("ul");r.sortable({stop:function(i){r.find(".select2-selection__choice").each((function(){var i;t(t(this).data("data").element).detach().appendTo(e)})),e.trigger("change")}}),e.on("select2:select",this.proxy((function(t){this.getOption(t.params.data.id).detach().appendTo(this.$el)})))}a.addClass("-acf"),acf.doAction("select2_init",e,i,this.data,n||!1,this)},mergeOptions:function(){var e=!1,i=!1;t('.select2-results__option[role="group"]').each((function(){var n=t(this).children("ul"),a=t(this).children("strong");if(i&&i.text()===a.text())return e.append(n.children()),void t(this).remove();e=n,i=a}))}}),r=n.extend({initialize:function(){var e=this.$el,i=this.getValue(),n=this.get("multiple"),a={width:"100%",allowClear:this.get("allowNull"),placeholder:this.get("placeholder"),separator:"||",multiple:this.get("multiple"),data:this.getChoices(),escapeMarkup:function(t){return t},dropdownCss:{"z-index":"999999999"},initSelection:function(t,e){e(n?i:i.shift())}},r=e.siblings("input");r.length||(r=t(' '),e.before(r)),inputValue=i.map((function(t){return t.id})).join("||"),r.val(inputValue),a.multiple&&i.map((function(t){t.$el.detach().appendTo(e)})),a.allowClear&&(a.data=a.data.filter((function(t){return""!==t.id}))),e.removeData("ajax"),e.removeAttr("data-ajax"),this.get("ajax")&&(a.ajax={url:acf.get("ajaxurl"),quietMillis:250,dataType:"json",type:"post",cache:!1,data:t.proxy(this.getAjaxData,this),results:t.proxy(this.processAjaxResults,this)});var o=this.get("field");a=acf.applyFilters("select2_args",a,e,this.data,o||!1,this),r.select2(a);var s=r.select2("container"),c=t.proxy(this.getOption,this);if(a.multiple){var l=s.find("ul");l.sortable({stop:function(){l.find(".select2-search-choice").each((function(){var i=t(this).data("select2Data"),n;c(i.id).detach().appendTo(e)})),e.trigger("change")}})}r.on("select2-selecting",(function(i){var n=i.choice,a=c(n.id);a.length||(a=t(''+n.text+" ")),a.detach().appendTo(e)})),s.addClass("-acf"),acf.doAction("select2_init",e,a,this.data,o||!1,this),r.on("change",(function(){var t=r.val();t.indexOf("||")&&(t=t.split("||")),e.val(t).trigger("change")})),e.hide()},mergeOptions:function(){var e=!1,i=!1;t("#select2-drop .select2-result-with-children").each((function(){var n=t(this).children("ul"),a=t(this).children(".select2-result-label");if(i&&i.text()===a.text())return i.append(n.children()),void t(this).remove();e=n,i=a}))},getAjaxData:function(t,e){var i={term:t,page:e};return n.prototype.getAjaxData.apply(this,[i])}}),o=new acf.Model({priority:5,wait:"prepare",actions:{duplicate:"onDuplicate"},initialize:function(){var t=acf.get("locale"),e=acf.get("rtl"),n=acf.get("select2L10n"),a=i();return!!n&&(0!==t.indexOf("en")&&void(4==a?this.addTranslations4():3==a&&this.addTranslations3()))},addTranslations4:function(){var t=acf.get("select2L10n"),e=acf.get("locale");e=e.replace("_","-");var i={errorLoading:function(){return t.load_fail},inputTooLong:function(e){var i=e.input.length-e.maximum;return i>1?t.input_too_long_n.replace("%d",i):t.input_too_long_1},inputTooShort:function(e){var i=e.minimum-e.input.length;return i>1?t.input_too_short_n.replace("%d",i):t.input_too_short_1},loadingMore:function(){return t.load_more},maximumSelected:function(e){var i=e.maximum;return i>1?t.selection_too_long_n.replace("%d",i):t.selection_too_long_1},noResults:function(){return t.matches_0},searching:function(){return t.searching}};jQuery.fn.select2.amd.define("select2/i18n/"+e,[],(function(){return i}))},addTranslations3:function(){var e=acf.get("select2L10n"),i=acf.get("locale");i=i.replace("_","-");var n={formatMatches:function(t){return t>1?e.matches_n.replace("%d",t):e.matches_1},formatNoMatches:function(){return e.matches_0},formatAjaxError:function(){return e.load_fail},formatInputTooShort:function(t,i){var n=i-t.length;return n>1?e.input_too_short_n.replace("%d",n):e.input_too_short_1},formatInputTooLong:function(t,i){var n=t.length-i;return n>1?e.input_too_long_n.replace("%d",n):e.input_too_long_1},formatSelectionTooBig:function(t){return t>1?e.selection_too_long_n.replace("%d",t):e.selection_too_long_1},formatLoadMore:function(){return e.load_more},formatSearching:function(){return e.searching}};t.fn.select2.locales=t.fn.select2.locales||{},t.fn.select2.locales[i]=n,t.extend(t.fn.select2.defaults,n)},onDuplicate:function(t,e){e.find(".select2-container").remove()}})}(jQuery),function(t,e){acf.tinymce={defaults:function(){return"undefined"!=typeof tinyMCEPreInit&&{tinymce:tinyMCEPreInit.mceInit.acf_content,quicktags:tinyMCEPreInit.qtInit.acf_content};var t},initialize:function(t,e){(e=acf.parseArgs(e,{tinymce:!0,quicktags:!0,toolbar:"full",mode:"visual",field:!1})).tinymce&&this.initializeTinymce(t,e),e.quicktags&&this.initializeQuicktags(t,e)},initializeTinymce:function(e,i){var n=t("#"+e),a=this.defaults(),r=acf.get("toolbars"),o=i.field||!1,s=o.$el||!1;if("undefined"==typeof tinymce)return!1;if(!a)return!1;if(tinymce.get(e))return this.enable(e);var c=t.extend({},a.tinymce,i.tinymce);c.id=e,c.selector="#"+e;var l=i.toolbar;if(l&&r&&r[l])for(var u=1;u<=4;u++)c["toolbar"+u]=r[l][u]||"";if(c.setup=function(t){t.on("change",(function(e){t.save(),n.trigger("change")})),t.on("mouseup",(function(t){var e=new MouseEvent("mouseup");window.dispatchEvent(e)}))},c.wp_autoresize_on=!1,c.tadv_noautop||(c.wpautop=!0),c=acf.applyFilters("wysiwyg_tinymce_settings",c,e,o),tinyMCEPreInit.mceInit[e]=c,"visual"==i.mode){var d=tinymce.init(c),f=tinymce.get(e);if(!f)return!1;f.acf=i.field,acf.doAction("wysiwyg_tinymce_init",f,f.id,c,o)}},initializeQuicktags:function(e,i){var n=this.defaults();if("undefined"==typeof quicktags)return!1;if(!n)return!1;var a=t.extend({},n.quicktags,i.quicktags);a.id=e;var r=i.field||!1,o=r.$el||!1;a=acf.applyFilters("wysiwyg_quicktags_settings",a,a.id,r),tinyMCEPreInit.qtInit[e]=a;var s=quicktags(a);if(!s)return!1;this.buildQuicktags(s),acf.doAction("wysiwyg_quicktags_init",s,s.id,a,r)},buildQuicktags:function(t){var e,i,n,a,r,t,o,s,c,l,u=",strong,em,link,block,del,ins,img,ul,ol,li,code,more,close,";for(s in e=t.canvas,i=t.name,n=t.settings,r="",a={},c="",l=t.id,n.buttons&&(c=","+n.buttons+","),edButtons)edButtons[s]&&(o=edButtons[s].id,c&&-1!==u.indexOf(","+o+",")&&-1===c.indexOf(","+o+",")||edButtons[s].instance&&edButtons[s].instance!==l||(a[o]=edButtons[s],edButtons[s].html&&(r+=edButtons[s].html(i+"_"))));c&&-1!==c.indexOf(",dfw,")&&(a.dfw=new QTags.DFWButton,r+=a.dfw.html(i+"_")),"rtl"===document.getElementsByTagName("html")[0].dir&&(a.textdirection=new QTags.TextDirectionButton,r+=a.textdirection.html(i+"_")),t.toolbar.innerHTML=r,t.theButtons=a,"undefined"!=typeof jQuery&&jQuery(document).triggerHandler("quicktags-init",[t])},disable:function(t){this.destroyTinymce(t)},remove:function(t){this.destroyTinymce(t)},destroy:function(t){this.destroyTinymce(t)},destroyTinymce:function(t){if("undefined"==typeof tinymce)return!1;var e=tinymce.get(t);return!!e&&(e.save(),e.destroy(),!0)},enable:function(t){this.enableTinymce(t)},enableTinymce:function(t){return"undefined"!=typeof switchEditors&&(void 0!==tinyMCEPreInit.mceInit[t]&&(switchEditors.go(t,"tmce"),!0))}};var i=new acf.Model({priority:5,actions:{prepare:"onPrepare",ready:"onReady"},onPrepare:function(){var e=t("#acf-hidden-wp-editor");e.exists()&&e.appendTo("body")},onReady:function(){acf.isset(window,"wp","oldEditor")&&(wp.editor.autop=wp.oldEditor.autop,wp.editor.removep=wp.oldEditor.removep),acf.isset(window,"tinymce","on")&&tinymce.on("AddEditor",(function(t){var e=t.editor;"acf"===e.id.substr(0,3)&&(e=tinymce.editors.content||e,tinymce.activeEditor=e,wpActiveEditor=e.id)}))}})}(jQuery),function(t,e){var i=acf.Model.extend({id:"Validator",data:{errors:[],notice:null,status:""},events:{"changed:status":"onChangeStatus"},addErrors:function(t){t.map(this.addError,this)},addError:function(t){this.data.errors.push(t)},hasErrors:function(){return this.data.errors.length},clearErrors:function(){return this.data.errors=[]},getErrors:function(){return this.data.errors},getFieldErrors:function(){var t=[],e=[];return this.getErrors().map((function(i){if(i.input){var n=e.indexOf(i.input);n>-1?t[n]=i:(t.push(i),e.push(i.input))}})),t},getGlobalErrors:function(){return this.getErrors().filter((function(t){return!t.input}))},showErrors:function(){if(this.hasErrors()){var e=this.getFieldErrors(),i=this.getGlobalErrors(),n=0,a=!1;e.map((function(t){var e=this.$('[name="'+t.input+'"]').first();if(e.length||(e=this.$('[name^="'+t.input+'"]').first()),e.length){n++;var i=acf.getClosestField(e);i.showError(t.message),a||(a=i.$el)}}),this);var r=acf.__("Validation failed");if(i.map((function(t){r+=". "+t.message})),1==n?r+=". "+acf.__("1 field requires attention"):n>1&&(r+=". "+acf.__("%d fields require attention").replace("%d",n)),this.has("notice"))this.get("notice").update({type:"error",text:r});else{var o=acf.newNotice({type:"error",text:r,target:this.$el});this.set("notice",o)}a||(a=this.get("notice").$el),setTimeout((function(){t("html, body").animate({scrollTop:a.offset().top-t(window).height()/2},500)}),10)}},onChangeStatus:function(t,e,i,n){this.$el.removeClass("is-"+n).addClass("is-"+i)},validate:function(e){if(e=acf.parseArgs(e,{event:!1,reset:!1,loading:function(){},complete:function(){},failure:function(){},success:function(t){t.submit()}}),"valid"==this.get("status"))return!0;if("validating"==this.get("status"))return!1;if(!this.$(".acf-field").length)return!0;if(e.event){var i=t.Event(null,e.event);e.success=function(){acf.enableSubmit(t(i.target)).trigger(i)}}acf.doAction("validation_begin",this.$el),acf.lockForm(this.$el),e.loading(this.$el,this),this.set("status","validating");var n=function(t){if(acf.isAjaxSuccess(t)){var e=acf.applyFilters("validation_complete",t.data,this.$el,this);e.valid||this.addErrors(e.errors)}},a=function(){acf.unlockForm(this.$el),this.hasErrors()?(this.set("status","invalid"),acf.doAction("validation_failure",this.$el,this),this.showErrors(),e.failure(this.$el,this)):(this.set("status","valid"),this.has("notice")&&this.get("notice").update({type:"success",text:acf.__("Validation successful"),timeout:1e3}),acf.doAction("validation_success",this.$el,this),acf.doAction("submit",this.$el),e.success(this.$el,this),acf.lockForm(this.$el),e.reset&&this.reset()),e.complete(this.$el,this),this.clearErrors()},r=acf.serialize(this.$el);return r.action="acf/validate_save_post",t.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(r),type:"post",dataType:"json",context:this,success:n,complete:a}),!1},setup:function(t){this.$el=t},reset:function(){this.set("errors",[]),this.set("notice",null),this.set("status",""),acf.unlockForm(this.$el)}}),n=function(t){var e=t.data("acf");return e||(e=new i(t)),e};acf.validateForm=function(t){return n(t.form).validate(t)},acf.enableSubmit=function(t){return t.removeClass("disabled")},acf.disableSubmit=function(t){return t.addClass("disabled")},acf.showSpinner=function(t){return t.addClass("is-active"),t.css("display","inline-block"),t},acf.hideSpinner=function(t){return t.removeClass("is-active"),t.css("display","none"),t},acf.lockForm=function(t){var e=a(t),i=e.find('.button, [type="submit"]'),n=e.find(".spinner, .acf-spinner");return acf.hideSpinner(n),acf.disableSubmit(i),acf.showSpinner(n.last()),t},acf.unlockForm=function(t){var e=a(t),i=e.find('.button, [type="submit"]'),n=e.find(".spinner, .acf-spinner");return acf.enableSubmit(i),acf.hideSpinner(n),t};var a=function(t){var e,e,e,e;return(e=t.find("#submitdiv")).length?e:(e=t.find("#submitpost")).length?e:(e=t.find("p.submit").last()).length?e:(e=t.find(".acf-form-submit")).length?e:t};acf.validation=new acf.Model({id:"validation",active:!0,wait:"prepare",actions:{ready:"addInputEvents",append:"addInputEvents"},events:{'click input[type="submit"]':"onClickSubmit",'click button[type="submit"]':"onClickSubmit","click #save-post":"onClickSave","submit form#post":"onSubmitPost","submit form":"onSubmit"},initialize:function(){acf.get("validation")||(this.active=!1,this.actions={},this.events={})},enable:function(){this.active=!0},disable:function(){this.active=!1},reset:function(t){n(t).reset()},addInputEvents:function(e){if("safari"!==acf.get("browser")){var i=t(".acf-field [name]",e);i.length&&this.on(i,"invalid","onInvalid")}},onInvalid:function(t,e){t.preventDefault();var i=e.closest("form");i.length&&(n(i).addError({input:e.attr("name"),message:t.target.validationMessage}),i.submit())},onClickSubmit:function(t,e){this.set("originalEvent",t)},onClickSave:function(t,e){this.set("ignore",!0)},onClickSubmitGutenberg:function(e,i){var n;acf.validateForm({form:t("#editor"),event:e,reset:!0,failure:function(t,e){var i=e.get("notice").$el;i.appendTo(".components-notice-list"),i.find(".acf-notice-dismiss").removeClass("small")}})||(e.preventDefault(),e.stopImmediatePropagation())},onSubmitPost:function(e,i){"dopreview"===t("input#wp-preview").val()&&(this.set("ignore",!0),acf.unlockForm(i))},onSubmit:function(t,e){if(!this.active||this.get("ignore")||t.isDefaultPrevented())return this.allowSubmit();var i;acf.validateForm({form:e,event:this.get("originalEvent")})||t.preventDefault()},allowSubmit:function(){return this.set("ignore",!1),this.set("originalEvent",!1),!0}})}(jQuery),function(t,e){var i=new acf.Model({priority:90,initialize:function(){this.refresh=acf.debounce(this.refresh,0)},actions:{new_field:"refresh",show_field:"refresh",hide_field:"refresh",remove_field:"refresh",unmount_field:"refresh",remount_field:"refresh"},refresh:function(){acf.doAction("refresh"),t(window).trigger("acfrefresh")}}),n=new acf.Model({priority:1,actions:{sortstart:"onSortstart",sortstop:"onSortstop"},onSortstart:function(t){acf.doAction("unmount",t)},onSortstop:function(t){acf.doAction("remount",t)}}),a=new acf.Model({actions:{sortstart:"onSortstart"},onSortstart:function(e,i){e.is("tr")&&(i.html(' '),e.addClass("acf-sortable-tr-helper"),e.children().each((function(){t(this).width(t(this).width())})),i.height(e.height()+"px"),e.removeClass("acf-sortable-tr-helper"))}}),r=new acf.Model({actions:{after_duplicate:"onAfterDuplicate"},onAfterDuplicate:function(e,i){var n=[];e.find("select").each((function(e){n.push(t(this).val())})),i.find("select").each((function(e){t(this).val(n[e])}))}}),o=new acf.Model({id:"tableHelper",priority:20,actions:{refresh:"renderTables"},renderTables:function(e){var i=this;t(".acf-table:visible").each((function(){i.renderTable(t(this))}))},renderTable:function(e){var i=e.find("> thead > tr:visible > th[data-key]"),n=e.find("> tbody > tr:visible > td[data-key]");if(!i.length||!n.length)return!1;i.each((function(e){var i=t(this),a=i.data("key"),r=n.filter('[data-key="'+a+'"]'),o=r.filter(".acf-hidden");r.removeClass("acf-empty"),r.length===o.length?acf.hide(i):(acf.show(i),o.addClass("acf-empty"))})),i.css("width","auto"),i=i.not(".acf-hidden");var a=100,r=i.length,o;i.filter("[data-width]").each((function(){var e=t(this).data("width");t(this).css("width",e+"%"),a-=e}));var s=i.not("[data-width]");if(s.length){var c=a/s.length;s.css("width",c+"%"),a=0}a>0&&i.last().css("width","auto"),n.filter(".-collapsed-target").each((function(){var e=t(this);e.parent().hasClass("-collapsed")?e.attr("colspan",i.length):e.removeAttr("colspan")}))}}),s=new acf.Model({id:"fieldsHelper",priority:30,actions:{refresh:"renderGroups"},renderGroups:function(){var e=this;t(".acf-fields:visible").each((function(){e.renderGroup(t(this))}))},renderGroup:function(e){var i=0,n=0,a=t(),r=e.children(".acf-field[data-width]:visible");return!!r.length&&(e.hasClass("-left")?(r.removeAttr("data-width"),r.css("width","auto"),!1):(r.removeClass("-r0 -c0").css({"min-height":0}),r.each((function(e){var r=t(this),o=r.position(),s=Math.ceil(o.top),c=Math.ceil(o.left);a.length&&s>i&&(a.css({"min-height":n+"px"}),o=r.position(),s=Math.ceil(o.top),c=Math.ceil(o.left),i=0,n=0,a=t()),acf.get("rtl")&&(c=Math.ceil(r.parent().width()-(o.left+r.outerWidth()))),0==s?r.addClass("-r0"):0==c&&r.addClass("-c0");var l=Math.ceil(r.outerHeight())+1;n=Math.max(n,l),i=Math.max(i,s),a=a.add(r)})),void(a.length&&a.css({"min-height":n+"px"}))))}})}(jQuery),function(t,e){acf.newCompatibility=function(t,e){return(e=e||{}).__proto__=t.__proto__,t.__proto__=e,t.compatibility=e,e},acf.getCompatibility=function(t){return t.compatibility||null};var i=acf.newCompatibility(acf,{l10n:{},o:{},fields:{},update:acf.set,add_action:acf.addAction,remove_action:acf.removeAction,do_action:acf.doAction,add_filter:acf.addFilter,remove_filter:acf.removeFilter,apply_filters:acf.applyFilters,parse_args:acf.parseArgs,disable_el:acf.disable,disable_form:acf.disable,enable_el:acf.enable,enable_form:acf.enable,update_user_setting:acf.updateUserSetting,prepare_for_ajax:acf.prepareForAjax,is_ajax_success:acf.isAjaxSuccess,remove_el:acf.remove,remove_tr:acf.remove,str_replace:acf.strReplace,render_select:acf.renderSelect,get_uniqid:acf.uniqid,serialize_form:acf.serialize,esc_html:acf.strEscape,str_sanitize:acf.strSanitize});i._e=function(t,e){t=t||"";var i=(e=e||"")?t+"."+e:t,n={"image.select":"Select Image","image.edit":"Edit Image","image.update":"Update Image"};if(n[i])return acf.__(n[i]);var a=this.l10n[t]||"";return e&&(a=a[e]||""),a},i.get_selector=function(e){var i=".acf-field";if(!e)return i;if(t.isPlainObject(e)){if(t.isEmptyObject(e))return i;for(var n in e){e=e[n];break}}return i+="-"+e,i=acf.strReplace("_","-",i),i=acf.strReplace("field-field-","field-",i)},i.get_fields=function(t,e,i){var n={is:t||"",parent:e||!1,suppressFilters:i||!1};return n.is&&(n.is=this.get_selector(n.is)),acf.findFields(n)},i.get_field=function(t,e){var i=this.get_fields.apply(this,arguments);return!!i.length&&i.first()},i.get_closest_field=function(t,e){return t.closest(this.get_selector(e))},i.get_field_wrap=function(t){return t.closest(this.get_selector())},i.get_field_key=function(t){return t.data("key")},i.get_field_type=function(t){return t.data("type")},i.get_data=function(t,e){return acf.parseArgs(t.data(),e)},i.maybe_get=function(t,e,i){void 0===i&&(i=null),keys=String(e).split(".");for(var n=0;n1){for(var c=0;c0?e.substr(0,a):e,o=a>0?e.substr(a+1):"",s=function(e){e.$el=t(this),acf.field_group&&(e.$field=e.$el.closest(".acf-field-object")),"function"==typeof n.event&&(e=n.event(e)),n[i].apply(n,arguments)};o?t(document).on(r,o,s):t(document).on(r,s)},get:function(t,e){return e=e||null,void 0!==this[t]&&(e=this[t]),e},set:function(t,e){return this[t]=e,"function"==typeof this["_set_"+t]&&this["_set_"+t].apply(this),this}},i.field=acf.model.extend({type:"",o:{},$field:null,_add_action:function(t,e){var i=this;t=t+"_field/type="+i.type,acf.add_action(t,(function(t){i.set("$field",t),i[e].apply(i,arguments)}))},_add_filter:function(t,e){var i=this;t=t+"_field/type="+i.type,acf.add_filter(t,(function(t){i.set("$field",t),i[e].apply(i,arguments)}))},_add_event:function(e,i){var n=this,a=e.substr(0,e.indexOf(" ")),r=e.substr(e.indexOf(" ")+1),o=acf.get_selector(n.type);t(document).on(a,o+" "+r,(function(e){var a=t(this),r=acf.get_closest_field(a,n.type);r.length&&(r.is(n.$field)||n.set("$field",r),e.$el=a,e.$field=r,n[i].apply(n,[e]))}))},_set_$field:function(){"function"==typeof this.focus&&this.focus()},doFocus:function(t){return this.set("$field",t)}});var o=acf.newCompatibility(acf.validation,{remove_error:function(t){acf.getField(t).removeError()},add_warning:function(t,e){acf.getField(t).showNotice({text:e,type:"warning",timeout:1e3})},fetch:acf.validateForm,enableSubmit:acf.enableSubmit,disableSubmit:acf.disableSubmit,showSpinner:acf.showSpinner,hideSpinner:acf.hideSpinner,unlockForm:acf.unlockForm,lockForm:acf.lockForm});i.tooltip={tooltip:function(t,e){var i;return acf.newTooltip({text:t,target:e}).$el},temp:function(t,e){var i=acf.newTooltip({text:t,target:e,timeout:250})},confirm:function(t,e,i,n,a){var r=acf.newTooltip({confirm:!0,text:i,target:t,confirm:function(){e(!0)},cancel:function(){e(!1)}})},confirm_remove:function(t,e){var i=acf.newTooltip({confirmRemove:!0,target:t,confirm:function(){e(!0)},cancel:function(){e(!1)}})}},i.media=new acf.Model({activeFrame:!1,actions:{new_media_popup:"onNewMediaPopup"},frame:function(){return this.activeFrame},onNewMediaPopup:function(t){this.activeFrame=t.frame},popup:function(t){var e;return(t.mime_types&&(t.allowedTypes=t.mime_types),t.id&&(t.attachment=t.id),acf.newMediaPopup(t).frame)}}),i.select2={init:function(t,e,i){return e.allow_null&&(e.allowNull=e.allow_null),e.ajax_action&&(e.ajaxAction=e.ajax_action),i&&(e.field=acf.getField(i)),acf.newSelect2(t,e)},destroy:function(t){return acf.getInstance(t).destroy()}},i.postbox={render:function(t){return t.edit_url&&(t.editLink=t.edit_url),t.edit_title&&(t.editTitle=t.edit_title),acf.newPostbox(t)}},acf.newCompatibility(acf.screen,{update:function(){return this.set.apply(this,arguments)},fetch:acf.screen.check}),i.ajax=acf.screen}(jQuery);
\ No newline at end of file
+!function(t,e){var i=[];acf.Field=acf.Model.extend({type:"",eventScope:".acf-field",wait:"ready",setup:function(t){this.$el=t,this.inherit(t),this.inherit(this.$control())},val:function(t){return void 0!==t?this.setValue(t):this.prop("disabled")?null:this.getValue()},getValue:function(){return this.$input().val()},setValue:function(t){return acf.val(this.$input(),t)},__:function(t){return acf._e(this.type,t)},$control:function(){return!1},$input:function(){return this.$("[name]:first")},$inputWrap:function(){return this.$(".acf-input:first")},$labelWrap:function(){return this.$(".acf-label:first")},getInputName:function(){return this.$input().attr("name")||""},parent:function(){var t=this.parents();return!!t.length&&t[0]},parents:function(){var t=this.$el.parents(".acf-field"),e;return acf.getFields(t)},show:function(t,e){var i=acf.show(this.$el,t);return i&&(this.prop("hidden",!1),acf.doAction("show_field",this,e)),i},hide:function(t,e){var i=acf.hide(this.$el,t);return i&&(this.prop("hidden",!0),acf.doAction("hide_field",this,e)),i},enable:function(t,e){var i=acf.enable(this.$el,t);return i&&(this.prop("disabled",!1),acf.doAction("enable_field",this,e)),i},disable:function(t,e){var i=acf.disable(this.$el,t);return i&&(this.prop("disabled",!0),acf.doAction("disable_field",this,e)),i},showEnable:function(t,e){return this.enable.apply(this,arguments),this.show.apply(this,arguments)},hideDisable:function(t,e){return this.disable.apply(this,arguments),this.hide.apply(this,arguments)},showNotice:function(t){"object"!=typeof t&&(t={text:t}),this.notice&&this.notice.remove(),t.target=this.$inputWrap(),this.notice=acf.newNotice(t)},removeNotice:function(t){this.notice&&(this.notice.away(t||0),this.notice=!1)},showError:function(e){this.$el.addClass("acf-error"),void 0!==e&&this.showNotice({text:e,type:"error",dismiss:!1}),acf.doAction("invalid_field",this),this.$el.one("focus change","input, select, textarea",t.proxy(this.removeError,this))},removeError:function(){this.$el.removeClass("acf-error"),this.removeNotice(250),acf.doAction("valid_field",this)},trigger:function(t,e,i){return"invalidField"==t&&(i=!0),acf.Model.prototype.trigger.apply(this,[t,e,i])}}),acf.newField=function(t){var e=t.data("type"),i=a(e),n,s=new(acf.models[i]||acf.Field)(t);return acf.doAction("new_field",s),s};var a=function(t){return acf.strPascalCase(t||"")+"Field"};acf.registerFieldType=function(t){var e,n=t.prototype.type,s=a(n);acf.models[s]=t,i.push(n)},acf.getFieldType=function(t){var e=a(t);return acf.models[e]||!1},acf.getFieldTypes=function(t){t=acf.parseArgs(t,{category:""});var e=[];return i.map((function(i){var a=acf.getFieldType(i),n=a.prototype;t.category&&n.category!==t.category||e.push(a)})),e}}(jQuery),function(t,e){acf.findFields=function(e){var i=".acf-field",a=!1;return(e=acf.parseArgs(e,{key:"",name:"",type:"",is:"",parent:!1,sibling:!1,limit:!1,visible:!1,suppressFilters:!1})).suppressFilters||(e=acf.applyFilters("find_fields_args",e)),e.key&&(i+='[data-key="'+e.key+'"]'),e.type&&(i+='[data-type="'+e.type+'"]'),e.name&&(i+='[data-name="'+e.name+'"]'),e.is&&(i+=e.is),e.visible&&(i+=":visible"),a=e.parent?e.parent.find(i):e.sibling?e.sibling.siblings(i):t(i),e.suppressFilters||(a=a.not(".acf-clone .acf-field"),a=acf.applyFilters("find_fields",a)),e.limit&&(a=a.slice(0,e.limit)),a},acf.findField=function(t,e){return acf.findFields({key:t,limit:1,parent:e,suppressFilters:!0})},acf.getField=function(t){t instanceof jQuery||(t=acf.findField(t));var e=t.data("acf");return e||(e=acf.newField(t)),e},acf.getFields=function(e){e instanceof jQuery||(e=acf.findFields(e));var i=[];return e.each((function(){var e=acf.getField(t(this));i.push(e)})),i},acf.findClosestField=function(t){return t.closest(".acf-field")},acf.getClosestField=function(t){var e=acf.findClosestField(t);return this.getField(e)};var i=function(t){var e=t,i=t+"_fields",n=t+"_field",s=function(t){var e=acf.arrayArgs(arguments),a=e.slice(1),n=acf.getFields({parent:t});if(n.length){var s=[i,n].concat(a);acf.doAction.apply(null,s)}},r=function(t){var e=acf.arrayArgs(arguments),i=e.slice(1);t.map((function(t,e){var a=[n,t].concat(i);acf.doAction.apply(null,a)}))};acf.addAction(e,s),acf.addAction(i,r),a(t)},a=function(t){var e=t+"_field",i=t+"Field",a=function(a){var n=acf.arrayArgs(arguments),s=n.slice(1),o=["type","name","key"];o.map((function(t){var i="/"+t+"="+a.get(t);n=[e+i,a].concat(s),acf.doAction.apply(null,n)})),r.indexOf(t)>-1&&a.trigger(i,s)};acf.addAction(e,a)},n,s=["valid","invalid","enable","disable","new","duplicate"],r=["remove","unmount","remount","sortstart","sortstop","show","hide","unload","valid","invalid","enable","disable","duplicate"];["prepare","ready","load","append","remove","unmount","remount","sortstart","sortstop","show","hide","unload"].map(i),s.map(a);var o=new acf.Model({id:"fieldsEventManager",events:{'click .acf-field a[href="#"]':"onClick","change .acf-field":"onChange"},onClick:function(t){t.preventDefault()},onChange:function(){t("#_acf_changed").val(1)}}),c=new acf.Model({id:"duplicateFieldsManager",actions:{duplicate:"onDuplicate",duplicate_fields:"onDuplicateFields"},onDuplicate:function(t,e){var i=acf.getFields({parent:t});if(i.length){var a=acf.findFields({parent:e});acf.doAction("duplicate_fields",i,a)}},onDuplicateFields:function(e,i){e.map((function(e,a){acf.doAction("duplicate_field",e,t(i[a]))}))}})}(jQuery),function(t,e){var i=0,a=acf.Field.extend({type:"accordion",wait:"",$control:function(){return this.$(".acf-fields:first")},initialize:function(){if(!this.$el.hasClass("acf-accordion")&&!this.$el.is("td")){if(this.get("endpoint"))return this.remove();var e=this.$el,a=this.$labelWrap(),s=this.$inputWrap(),r=this.$control(),o=s.children(".description");if(o.length&&a.append(o),this.$el.is("tr")){var c=this.$el.closest("table"),l=t('
'),d=t('
'),u=t(''),f=t(" ");l.append(a.html()),u.append(f),d.append(u),s.append(l),s.append(d),a.remove(),r.remove(),s.attr("colspan",2),a=l,s=d,r=f}e.addClass("acf-accordion"),a.addClass("acf-accordion-title"),s.addClass("acf-accordion-content"),i++,this.get("multi_expand")&&e.attr("multi-expand",1);var p=acf.getPreference("this.accordions")||[];void 0!==p[i-1]&&this.set("open",p[i-1]),this.get("open")&&(e.addClass("-open"),s.css("display","block")),a.prepend(n.iconHtml({open:this.get("open")}));var h=e.parent();r.addClass(h.hasClass("-left")?"-left":""),r.addClass(h.hasClass("-clear")?"-clear":""),r.append(e.nextUntil(".acf-field-accordion",".acf-field")),r.removeAttr("data-open data-multi_expand data-endpoint")}}});acf.registerFieldType(a);var n=new acf.Model({actions:{unload:"onUnload"},events:{"click .acf-accordion-title":"onClick","invalidField .acf-accordion":"onInvalidField"},isOpen:function(t){return t.hasClass("-open")},toggle:function(t){this.isOpen(t)?this.close(t):this.open(t)},iconHtml:function(t){return acf.isGutenberg()?t.open?' ':' ':t.open?' ':' '},open:function(e){var i=acf.isGutenberg()?0:300;e.find(".acf-accordion-content:first").slideDown(i).css("display","block"),e.find(".acf-accordion-icon:first").replaceWith(this.iconHtml({open:!0})),e.addClass("-open"),acf.doAction("show",e),e.attr("multi-expand")||e.siblings(".acf-accordion.-open").each((function(){n.close(t(this))}))},close:function(t){var e=acf.isGutenberg()?0:300;t.find(".acf-accordion-content:first").slideUp(e),t.find(".acf-accordion-icon:first").replaceWith(this.iconHtml({open:!1})),t.removeClass("-open"),acf.doAction("hide",t)},onClick:function(t,e){t.preventDefault(),this.toggle(e.parent())},onInvalidField:function(t,e){this.busy||(this.busy=!0,this.setTimeout((function(){this.busy=!1}),1e3),this.open(e))},onUnload:function(e){var i=[];t(".acf-accordion").each((function(){var e=t(this).hasClass("-open")?1:0;i.push(e)})),i.length&&acf.setPreference("this.accordions",i)}})}(jQuery),function(t,e){var i=acf.Field.extend({type:"button_group",events:{'click input[type="radio"]':"onClick"},$control:function(){return this.$(".acf-button-group")},$input:function(){return this.$("input:checked")},setValue:function(t){this.$('input[value="'+t+'"]').prop("checked",!0).trigger("change")},onClick:function(t,e){var i=e.parent("label"),a=i.hasClass("selected");this.$(".selected").removeClass("selected"),i.addClass("selected"),this.get("allow_null")&&a&&(i.removeClass("selected"),e.prop("checked",!1).trigger("change"))}});acf.registerFieldType(i)}(jQuery),function(t,e){var i=acf.Field.extend({type:"checkbox",events:{"change input":"onChange","click .acf-add-checkbox":"onClickAdd","click .acf-checkbox-toggle":"onClickToggle","click .acf-checkbox-custom":"onClickCustom"},$control:function(){return this.$(".acf-checkbox-list")},$toggle:function(){return this.$(".acf-checkbox-toggle")},$input:function(){return this.$('input[type="hidden"]')},$inputs:function(){return this.$('input[type="checkbox"]').not(".acf-checkbox-toggle")},getValue:function(){var e=[];return this.$(":checked").each((function(){e.push(t(this).val())})),!!e.length&&e},onChange:function(t,e){var i=e.prop("checked"),a=e.parent("label"),n=this.$toggle(),s;(i?a.addClass("selected"):a.removeClass("selected"),n.length)&&(0==this.$inputs().not(":checked").length?n.prop("checked",!0):n.prop("checked",!1))},onClickAdd:function(t,e){var i=' ';e.parent("li").before(i)},onClickToggle:function(t,e){var i=e.prop("checked"),a=this.$('input[type="checkbox"]'),n=this.$("label");a.prop("checked",i),i?n.addClass("selected"):n.removeClass("selected")},onClickCustom:function(t,e){var i=e.prop("checked"),a=e.next('input[type="text"]');i?a.prop("disabled",!1):(a.prop("disabled",!0),""==a.val()&&e.parent("li").remove())}});acf.registerFieldType(i)}(jQuery),function(t,e){var i=acf.Field.extend({type:"color_picker",wait:"load",events:{duplicateField:"onDuplicate"},$control:function(){return this.$(".acf-color-picker")},$input:function(){return this.$('input[type="hidden"]')},$inputText:function(){return this.$('input[type="text"]')},setValue:function(t){acf.val(this.$input(),t),this.$inputText().iris("color",t)},initialize:function(){var t=this.$input(),e=this.$inputText(),i=function(i){setTimeout((function(){acf.val(t,e.val())}),1)},a={defaultColor:!1,palettes:!0,hide:!0,change:i,clear:i},a=acf.applyFilters("color_picker_args",a,this);e.wpColorPicker(a)},onDuplicate:function(t,e,i){$colorPicker=i.find(".wp-picker-container"),$inputText=i.find('input[type="text"]'),$colorPicker.replaceWith($inputText)}});acf.registerFieldType(i)}(jQuery),function(t,e){var i=acf.Field.extend({type:"date_picker",events:{'blur input[type="text"]':"onBlur",duplicateField:"onDuplicate"},$control:function(){return this.$(".acf-date-picker")},$input:function(){return this.$('input[type="hidden"]')},$inputText:function(){return this.$('input[type="text"]')},initialize:function(){if(this.has("save_format"))return this.initializeCompatibility();var t=this.$input(),e=this.$inputText(),i={dateFormat:this.get("date_format"),altField:t,altFormat:"yymmdd",changeYear:!0,yearRange:"-100:+100",changeMonth:!0,showButtonPanel:!0,firstDay:this.get("first_day")};i=acf.applyFilters("date_picker_args",i,this),acf.newDatePicker(e,i),acf.doAction("date_picker_init",e,i,this)},initializeCompatibility:function(){var t=this.$input(),e=this.$inputText();e.val(t.val());var i={dateFormat:this.get("date_format"),altField:t,altFormat:this.get("save_format"),changeYear:!0,yearRange:"-100:+100",changeMonth:!0,showButtonPanel:!0,firstDay:this.get("first_day")},a=(i=acf.applyFilters("date_picker_args",i,this)).dateFormat;i.dateFormat=this.get("save_format"),acf.newDatePicker(e,i),e.datepicker("option","dateFormat",a),acf.doAction("date_picker_init",e,i,this)},onBlur:function(){this.$inputText().val()||acf.val(this.$input(),"")},onDuplicate:function(t,e,i){i.find('input[type="text"]').removeClass("hasDatepicker").removeAttr("id")}});acf.registerFieldType(i);var a=new acf.Model({priority:5,wait:"ready",initialize:function(){var e=acf.get("locale"),i=acf.get("rtl"),a=acf.get("datePickerL10n");return!!a&&(void 0!==t.datepicker&&(a.isRTL=i,t.datepicker.regional[e]=a,void t.datepicker.setDefaults(a)))}});acf.newDatePicker=function(e,i){if(void 0===t.datepicker)return!1;i=i||{},e.datepicker(i),t("body > #ui-datepicker-div").exists()&&t("body > #ui-datepicker-div").wrap('
')}}(jQuery),function(t,e){var i=acf.models.DatePickerField.extend({type:"date_time_picker",$control:function(){return this.$(".acf-date-time-picker")},initialize:function(){var t=this.$input(),e=this.$inputText(),i={dateFormat:this.get("date_format"),timeFormat:this.get("time_format"),altField:t,altFieldTimeOnly:!1,altFormat:"yy-mm-dd",altTimeFormat:"HH:mm:ss",changeYear:!0,yearRange:"-100:+100",changeMonth:!0,showButtonPanel:!0,firstDay:this.get("first_day"),controlType:"select",oneLine:!0};i=acf.applyFilters("date_time_picker_args",i,this),acf.newDateTimePicker(e,i),acf.doAction("date_time_picker_init",e,i,this)}});acf.registerFieldType(i);var a=new acf.Model({priority:5,wait:"ready",initialize:function(){var e=acf.get("locale"),i=acf.get("rtl"),a=acf.get("dateTimePickerL10n");return!!a&&(void 0!==t.timepicker&&(a.isRTL=i,t.timepicker.regional[e]=a,void t.timepicker.setDefaults(a)))}});acf.newDateTimePicker=function(e,i){if(void 0===t.timepicker)return!1;i=i||{},e.datetimepicker(i),t("body > #ui-datepicker-div").exists()&&t("body > #ui-datepicker-div").wrap('
')}}(jQuery),function(t,e){function i(e){if(s)return e();if(acf.isset(window,"google","maps","Geocoder"))return s=new google.maps.Geocoder,e();if(acf.addAction("google_map_api_loaded",e),!n){var i=acf.get("google_map_api");i&&(n=!0,t.ajax({url:i,dataType:"script",cache:!0,success:function(){s=new google.maps.Geocoder,acf.doAction("google_map_api_loaded")}}))}}var a=acf.Field.extend({type:"google_map",map:!1,wait:"load",events:{'click a[data-name="clear"]':"onClickClear",'click a[data-name="locate"]':"onClickLocate",'click a[data-name="search"]':"onClickSearch","keydown .search":"onKeydownSearch","keyup .search":"onKeyupSearch","focus .search":"onFocusSearch","blur .search":"onBlurSearch",showField:"onShow"},$control:function(){return this.$(".acf-google-map")},$search:function(){return this.$(".search")},$canvas:function(){return this.$(".canvas")},setState:function(t){this.$control().removeClass("-value -loading -searching"),"default"===t&&(t=this.val()?"value":""),t&&this.$control().addClass("-"+t)},getValue:function(){var t=this.$input().val();return!!t&&JSON.parse(t)},setValue:function(t,e){var i="";t&&(i=JSON.stringify(t)),acf.val(this.$input(),i),e||(this.renderVal(t),acf.doAction("google_map_change",t,this.map,this))},renderVal:function(t){t?(this.setState("value"),this.$search().val(t.address),this.setPosition(t.lat,t.lng)):(this.setState(""),this.$search().val(""),this.map.marker.setVisible(!1))},newLatLng:function(t,e){return new google.maps.LatLng(parseFloat(t),parseFloat(e))},setPosition:function(t,e){this.map.marker.setPosition({lat:parseFloat(t),lng:parseFloat(e)}),this.map.marker.setVisible(!0),this.center()},center:function(){var t=this.map.marker.getPosition();if(t)var e=t.lat(),i=t.lng();else var e=this.get("lat"),i=this.get("lng");this.map.setCenter({lat:parseFloat(e),lng:parseFloat(i)})},initialize:function(){i(this.initializeMap.bind(this))},initializeMap:function(){var t=this.getValue(),e=acf.parseArgs(t,{zoom:this.get("zoom"),lat:this.get("lat"),lng:this.get("lng")}),i={scrollwheel:!1,zoom:parseInt(e.zoom),center:{lat:parseFloat(e.lat),lng:parseFloat(e.lng)},mapTypeId:google.maps.MapTypeId.ROADMAP,marker:{draggable:!0,raiseOnDrag:!0},autocomplete:{}};i=acf.applyFilters("google_map_args",i,this);var a=new google.maps.Map(this.$canvas()[0],i),n=acf.parseArgs(i.marker,{draggable:!0,raiseOnDrag:!0,map:a});n=acf.applyFilters("google_map_marker_args",n,this);var s=new google.maps.Marker(n),r=!1;if(acf.isset(google,"maps","places","Autocomplete")){var o=i.autocomplete||{};o=acf.applyFilters("google_map_autocomplete_args",o,this),(r=new google.maps.places.Autocomplete(this.$search()[0],o)).bindTo("bounds",a)}this.addMapEvents(this,a,s,r),a.acf=this,a.marker=s,a.autocomplete=r,this.map=a,t&&this.setPosition(t.lat,t.lng),acf.doAction("google_map_init",a,s,this)},addMapEvents:function(t,e,i,a){google.maps.event.addListener(e,"click",(function(e){var i=e.latLng.lat(),a=e.latLng.lng();t.searchPosition(i,a)})),google.maps.event.addListener(i,"dragend",(function(){var e=this.getPosition().lat(),i=this.getPosition().lng();t.searchPosition(e,i)})),a&&google.maps.event.addListener(a,"place_changed",(function(){var e=this.getPlace();t.searchPlace(e)})),google.maps.event.addListener(e,"zoom_changed",(function(){var i=t.val();i&&(i.zoom=e.getZoom(),t.setValue(i,!0))}))},searchPosition:function(t,e){this.setState("loading");var i={lat:t,lng:e};s.geocode({location:i},function(i,a){if(this.setState(""),"OK"!==a)this.showNotice({text:acf.__("Location not found: %s").replace("%s",a),type:"warning"});else{var n=this.parseResult(i[0]);n.lat=t,n.lng=e,this.val(n)}}.bind(this))},searchPlace:function(t){if(t)if(t.geometry){t.formatted_address=this.$search().val();var e=this.parseResult(t);this.val(e)}else t.name&&this.searchAddress(t.name)},searchAddress:function(t){if(t){var e=t.split(",");if(2==e.length){var i=parseFloat(e[0]),a=parseFloat(e[1]);if(i&&a)return this.searchPosition(i,a)}this.setState("loading"),s.geocode({address:t},function(e,i){if(this.setState(""),"OK"!==i)this.showNotice({text:acf.__("Location not found: %s").replace("%s",i),type:"warning"});else{var a=this.parseResult(e[0]);a.address=t,this.val(a)}}.bind(this))}},searchLocation:function(){if(!navigator.geolocation)return alert(acf.__("Sorry, this browser does not support geolocation"));this.setState("loading"),navigator.geolocation.getCurrentPosition(function(t){this.setState("");var e=t.coords.latitude,i=t.coords.longitude;this.searchPosition(e,i)}.bind(this),function(t){this.setState("")}.bind(this))},parseResult:function(t){var e={address:t.formatted_address,lat:t.geometry.location.lat(),lng:t.geometry.location.lng()};e.zoom=this.map.getZoom(),t.place_id&&(e.place_id=t.place_id),t.name&&(e.name=t.name);var i={street_number:["street_number"],street_name:["street_address","route"],city:["locality"],state:["administrative_area_level_1","administrative_area_level_2","administrative_area_level_3","administrative_area_level_4","administrative_area_level_5"],post_code:["postal_code"],country:["country"]};for(var a in i)for(var n=i[a],s=0;s0?this.append(t,e):this.render(t)}),this)})},editAttachment:function(){var e=this.val();if(e)var i=acf.newMediaPopup({mode:"edit",title:acf.__("Edit Image"),button:acf.__("Update Image"),attachment:e,field:this.get("key"),select:t.proxy((function(t,e){this.render(t)}),this)})},removeAttachment:function(){this.render(!1)},onClickAdd:function(t,e){this.selectAttachment()},onClickEdit:function(t,e){this.editAttachment()},onClickRemove:function(t,e){this.removeAttachment()},onChange:function(e,i){var a=this.$input();acf.getFileInputData(i,(function(e){a.val(t.param(e))}))}});acf.registerFieldType(i)}(jQuery),function(t,e){var i=acf.models.ImageField.extend({type:"file",$control:function(){return this.$(".acf-file-uploader")},$input:function(){return this.$('input[type="hidden"]')},validateAttachment:function(t){return void 0!==(t=t||{}).id&&(t=t.attributes),t=acf.parseArgs(t,{url:"",alt:"",title:"",filename:"",filesizeHumanReadable:"",icon:"/wp-includes/images/media/default.png"})},render:function(t){t=this.validateAttachment(t),this.$("img").attr({src:t.icon,alt:t.alt,title:t.title}),this.$('[data-name="title"]').text(t.title),this.$('[data-name="filename"]').text(t.filename).attr("href",t.url),this.$('[data-name="filesize"]').text(t.filesizeHumanReadable);var e=t.id||"";acf.val(this.$input(),e),e?this.$control().addClass("has-value"):this.$control().removeClass("has-value")},selectAttachment:function(){var e=this.parent(),i=e&&"repeater"===e.get("type"),a=acf.newMediaPopup({mode:"select",title:acf.__("Select File"),field:this.get("key"),multiple:i,library:this.get("library"),allowedTypes:this.get("mime_types"),select:t.proxy((function(t,i){i>0?this.append(t,e):this.render(t)}),this)})},editAttachment:function(){var e=this.val();if(!e)return!1;var i=acf.newMediaPopup({mode:"edit",title:acf.__("Edit File"),button:acf.__("Update File"),attachment:e,field:this.get("key"),select:t.proxy((function(t,e){this.render(t)}),this)})}});acf.registerFieldType(i)}(jQuery),function(t,e){var i=acf.Field.extend({type:"link",events:{'click a[data-name="add"]':"onClickEdit",'click a[data-name="edit"]':"onClickEdit",'click a[data-name="remove"]':"onClickRemove","change .link-node":"onChange"},$control:function(){return this.$(".acf-link")},$node:function(){return this.$(".link-node")},getValue:function(){var t=this.$node();return!!t.attr("href")&&{title:t.html(),url:t.attr("href"),target:t.attr("target")}},setValue:function(t){t=acf.parseArgs(t,{title:"",url:"",target:""});var e=this.$control(),i=this.$node();e.removeClass("-value -external"),t.url&&e.addClass("-value"),"_blank"===t.target&&e.addClass("-external"),this.$(".link-title").html(t.title),this.$(".link-url").attr("href",t.url).html(t.url),i.html(t.title),i.attr("href",t.url),i.attr("target",t.target),this.$(".input-title").val(t.title),this.$(".input-target").val(t.target),this.$(".input-url").val(t.url).trigger("change")},onClickEdit:function(t,e){acf.wpLink.open(this.$node())},onClickRemove:function(t,e){this.setValue(!1)},onChange:function(t,e){var i=this.getValue();this.setValue(i)}});acf.registerFieldType(i),acf.wpLink=new acf.Model({getNodeValue:function(){var t=this.get("node");return{title:acf.decode(t.html()),url:t.attr("href"),target:t.attr("target")}},setNodeValue:function(t){var e=this.get("node");e.text(t.title),e.attr("href",t.url),e.attr("target",t.target),e.trigger("change")},getInputValue:function(){return{title:t("#wp-link-text").val(),url:t("#wp-link-url").val(),target:t("#wp-link-target").prop("checked")?"_blank":""}},setInputValue:function(e){t("#wp-link-text").val(e.title),t("#wp-link-url").val(e.url),t("#wp-link-target").prop("checked","_blank"===e.target)},open:function(e){this.on("wplink-open","onOpen"),this.on("wplink-close","onClose"),this.set("node",e);var i=t('');t("body").append(i);var a=this.getNodeValue();wpLink.open("acf-link-textarea",a.url,a.title,null)},onOpen:function(){t("#wp-link-wrap").addClass("has-text-field");var e=this.getNodeValue();this.setInputValue(e),e.url&&wpLinkL10n&&t("#wp-link-submit").val(wpLinkL10n.update)},close:function(){wpLink.close()},onClose:function(){if(!this.has("node"))return!1;var e=t("#wp-link-submit"),i;if(e.is(":hover")||e.is(":focus")){var a=this.getInputValue();this.setNodeValue(a)}this.off("wplink-open"),this.off("wplink-close"),t("#acf-link-textarea").remove(),this.set("node",null)}})}(jQuery),function(t,e){var i=acf.Field.extend({type:"oembed",events:{'click [data-name="clear-button"]':"onClickClear","keypress .input-search":"onKeypressSearch","keyup .input-search":"onKeyupSearch","change .input-search":"onChangeSearch"},$control:function(){return this.$(".acf-oembed")},$input:function(){return this.$(".input-value")},$search:function(){return this.$(".input-search")},getValue:function(){return this.$input().val()},getSearchVal:function(){return this.$search().val()},setValue:function(t){t?this.$control().addClass("has-value"):this.$control().removeClass("has-value"),acf.val(this.$input(),t)},showLoading:function(t){acf.showLoading(this.$(".canvas"))},hideLoading:function(){acf.hideLoading(this.$(".canvas"))},maybeSearch:function(){var e=this.val(),i=this.getSearchVal();if(!i)return this.clear();if("http"!=i.substr(0,4)&&(i="http://"+i),i!==e){var a=this.get("timeout");a&&clearTimeout(a);var n=t.proxy(this.search,this,i);this.set("timeout",setTimeout(n,300))}},search:function(e){var i={action:"acf/fields/oembed/search",s:e,field_key:this.get("key")},a;(a=this.get("xhr"))&&a.abort(),this.showLoading();var a=t.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(i),type:"post",dataType:"json",context:this,success:function(t){t&&t.html||(t={url:!1,html:""}),this.val(t.url),this.$(".canvas-media").html(t.html)},complete:function(){this.hideLoading()}});this.set("xhr",a)},clear:function(){this.val(""),this.$search().val(""),this.$(".canvas-media").html("")},onClickClear:function(t,e){this.clear()},onKeypressSearch:function(t,e){13==t.which&&(t.preventDefault(),this.maybeSearch())},onKeyupSearch:function(t,e){e.val()&&this.maybeSearch()},onChangeSearch:function(t,e){this.maybeSearch()}});acf.registerFieldType(i)}(jQuery),function(t,e){var i=acf.Field.extend({type:"radio",events:{'click input[type="radio"]':"onClick"},$control:function(){return this.$(".acf-radio-list")},$input:function(){return this.$("input:checked")},$inputText:function(){return this.$('input[type="text"]')},getValue:function(){var t=this.$input().val();return"other"===t&&this.get("other_choice")&&(t=this.$inputText().val()),t},onClick:function(t,e){var i=e.parent("label"),a=i.hasClass("selected"),n=e.val();this.$(".selected").removeClass("selected"),i.addClass("selected"),this.get("allow_null")&&a&&(i.removeClass("selected"),e.prop("checked",!1).trigger("change"),n=!1),this.get("other_choice")&&("other"===n?this.$inputText().prop("disabled",!1):this.$inputText().prop("disabled",!0))}});acf.registerFieldType(i)}(jQuery),function(t,e){var i=acf.Field.extend({type:"range",events:{'input input[type="range"]':"onChange","change input":"onChange"},$input:function(){return this.$('input[type="range"]')},$inputAlt:function(){return this.$('input[type="number"]')},setValue:function(t){this.busy=!0,acf.val(this.$input(),t),acf.val(this.$inputAlt(),this.$input().val(),!0),this.busy=!1},onChange:function(t,e){this.busy||this.setValue(e.val())}});acf.registerFieldType(i)}(jQuery),function(t,e){var i=acf.Field.extend({type:"relationship",events:{"keypress [data-filter]":"onKeypressFilter","change [data-filter]":"onChangeFilter","keyup [data-filter]":"onChangeFilter","click .choices-list .acf-rel-item":"onClickAdd",'click [data-name="remove_item"]':"onClickRemove"},$control:function(){return this.$(".acf-relationship")},$list:function(t){return this.$("."+t+"-list")},$listItems:function(t){return this.$list(t).find(".acf-rel-item")},$listItem:function(t,e){return this.$list(t).find('.acf-rel-item[data-id="'+e+'"]')},getValue:function(){var e=[];return this.$listItems("values").each((function(){e.push(t(this).data("id"))})),!!e.length&&e},newChoice:function(t){return["",''+t.text+" "," "].join("")},newValue:function(t){return["",' ',''+t.text,' '," "," "].join("")},initialize:function(){var t=this.proxy(acf.once((function(){this.$list("values").sortable({items:"li",forceHelperSize:!0,forcePlaceholderSize:!0,scroll:!0,update:this.proxy((function(){this.$input().trigger("change")}))}),this.$list("choices").scrollTop(0).on("scroll",this.proxy(this.onScrollChoices)),this.fetch()})));this.$el.one("mouseover",t),this.$el.one("focus","input",t),acf.onceInView(this.$el,t)},onScrollChoices:function(t){if(!this.get("loading")&&this.get("more")){var e=this.$list("choices"),i=Math.ceil(e.scrollTop()),a=Math.ceil(e[0].scrollHeight),n=Math.ceil(e.innerHeight()),s=this.get("paged")||1;i+n>=a&&(this.set("paged",s+1),this.fetch())}},onKeypressFilter:function(t,e){13==t.which&&t.preventDefault()},onChangeFilter:function(t,e){var i=e.val(),a=e.data("filter");this.get(a)!==i&&(this.set(a,i),this.set("paged",1),e.is("select")?this.fetch():this.maybeFetch())},onClickAdd:function(t,e){var i=this.val(),a=parseInt(this.get("max"));if(e.hasClass("disabled"))return!1;if(a>0&&i&&i.length>=a)return this.showNotice({text:acf.__("Maximum values reached ( {max} values )").replace("{max}",a),type:"warning"}),!1;e.addClass("disabled");var n=this.newValue({id:e.data("id"),text:e.html()});this.$list("values").append(n),this.$input().trigger("change")},onClickRemove:function(t,e){t.preventDefault();var i=e.parent(),a=i.parent(),n=i.data("id");a.remove(),this.$listItem("choices",n).removeClass("disabled"),this.$input().trigger("change")},maybeFetch:function(){var t=this.get("timeout");t&&clearTimeout(t),t=this.setTimeout(this.fetch,300),this.set("timeout",t)},getAjaxData:function(){var t=this.$control().data();for(var e in t)t[e]=this.get(e);return t.action="acf/fields/relationship/query",t.field_key=this.get("key"),
+t=acf.applyFilters("relationship_ajax_data",t,this)},fetch:function(){var e;(e=this.get("xhr"))&&e.abort();var i=this.getAjaxData(),a=this.$list("choices");1==i.paged&&a.html("");var n=t(' '+acf.__("Loading")+" ");a.append(n),this.set("loading",!0);var s=function(){this.set("loading",!1),n.remove()},r=function(e){if(!e||!e.results||!e.results.length)return this.set("more",!1),void(1==this.get("paged")&&this.$list("choices").append(""+acf.__("No matches found")+" "));this.set("more",e.more);var i=this.walkChoices(e.results),n=t(i),s=this.val();s&&s.length&&s.map((function(t){n.find('.acf-rel-item[data-id="'+t+'"]').addClass("disabled")})),a.append(n);var r=!1,o=!1;a.find(".acf-rel-label").each((function(){var e=t(this),i=e.siblings("ul");if(r&&r.text()==e.text())return o.append(i.children()),void t(this).parent().remove();r=e,o=i}))},e=t.ajax({url:acf.get("ajaxurl"),dataType:"json",type:"post",data:acf.prepareForAjax(i),context:this,success:r,complete:s});this.set("xhr",e)},walkChoices:function(e){var i=function(e){var a="";return t.isArray(e)?e.map((function(t){a+=i(t)})):t.isPlainObject(e)&&(void 0!==e.children?(a+=''+acf.escHtml(e.text)+' "):a+=''+acf.escHtml(e.text)+" "),a};return i(e)}});acf.registerFieldType(i)}(jQuery),function(t,e){var i=acf.Field.extend({type:"select",select2:!1,wait:"load",events:{removeField:"onRemove"},$input:function(){return this.$("select")},initialize:function(){var t=this.$input();if(this.inherit(t),this.get("ui")){var e=this.get("ajax_action");e||(e="acf/fields/"+this.get("type")+"/query"),this.select2=acf.newSelect2(t,{field:this,ajax:this.get("ajax"),multiple:this.get("multiple"),placeholder:this.get("placeholder"),allowNull:this.get("allow_null"),ajaxAction:e})}},onRemove:function(){this.select2&&this.select2.destroy()}});acf.registerFieldType(i)}(jQuery),function(t,e){var i="tab",a=acf.Field.extend({type:"tab",wait:"",tabs:!1,tab:!1,events:{duplicateField:"onDuplicate"},findFields:function(){return this.$el.nextUntil(".acf-field-tab",".acf-field")},getFields:function(){return acf.getFields(this.findFields())},findTabs:function(){return this.$el.prevAll(".acf-tab-wrap:first")},findTab:function(){return this.$(".acf-tab-button")},initialize:function(){if(this.$el.is("td"))return this.events={},!1;var t=this.findTabs(),e=this.findTab(),i=acf.parseArgs(e.data(),{endpoint:!1,placement:"",before:this.$el});!t.length||i.endpoint?this.tabs=new s(i):this.tabs=t.data("acf"),this.tab=this.tabs.addTab(e,this)},isActive:function(){return this.tab.isActive()},showFields:function(){this.getFields().map((function(t){t.show(this.cid,"tab"),t.hiddenByTab=!1}),this)},hideFields:function(){this.getFields().map((function(t){t.hide(this.cid,"tab"),t.hiddenByTab=this.tab}),this)},show:function(t){var e=acf.Field.prototype.show.apply(this,arguments);return e&&(this.tab.show(),this.tabs.refresh()),e},hide:function(t){var e=acf.Field.prototype.hide.apply(this,arguments);return e&&(this.tab.hide(),this.isActive()&&this.tabs.reset()),e},enable:function(t){this.getFields().map((function(t){t.enable("tab")}))},disable:function(t){this.getFields().map((function(t){t.disable("tab")}))},onDuplicate:function(t,e,i){this.isActive()&&i.prevAll(".acf-tab-wrap:first").remove()}});acf.registerFieldType(a);var n=0,s=acf.Model.extend({tabs:[],active:!1,actions:{refresh:"onRefresh"},data:{before:!1,placement:"top",index:0,initialized:!1},setup:function(e){t.extend(this.data,e),this.tabs=[],this.active=!1;var i=this.get("placement"),a=this.get("before"),s=a.parent();"left"==i&&s.hasClass("acf-fields")&&s.addClass("-sidebar"),a.is("tr")?this.$el=t(' '):this.$el=t(''),a.before(this.$el),this.set("index",n,!0),n++},initializeTabs:function(){var t=this.getVisible().shift(),e,i,a=(acf.getPreference("this.tabs")||[])[this.get("index")];this.tabs[a]&&this.tabs[a].isVisible()&&(t=this.tabs[a]),t?this.selectTab(t):this.closeTabs(),this.set("initialized",!0)},getVisible:function(){return this.tabs.filter((function(t){return t.isVisible()}))},getActive:function(){return this.active},setActive:function(t){return this.active=t},hasActive:function(){return!1!==this.active},isActive:function(t){var e=this.getActive();return e&&e.cid===t.cid},closeActive:function(){this.hasActive()&&this.closeTab(this.getActive())},openTab:function(t){this.closeActive(),t.open(),this.setActive(t)},closeTab:function(t){t.close(),this.setActive(!1)},closeTabs:function(){this.tabs.map(this.closeTab,this)},selectTab:function(t){this.tabs.map((function(e){t.cid!==e.cid&&this.closeTab(e)}),this),this.openTab(t)},addTab:function(e,i){var a=t(""+e.outerHTML()+" ");this.$("ul").append(a);var n=new r({$el:a,field:i,group:this});return this.tabs.push(n),n},reset:function(){return this.closeActive(),this.refresh()},refresh:function(){if(this.hasActive())return!1;var t=this.getVisible().shift();return t&&this.openTab(t),t},onRefresh:function(){if("left"===this.get("placement")){var t=this.$el.parent(),e=this.$el.children("ul"),i=t.is("td")?"height":"min-height",a=e.position().top+e.outerHeight(!0)-1;t.css(i,a)}}}),r=acf.Model.extend({group:!1,field:!1,events:{"click a":"onClick"},index:function(){return this.$el.index()},isVisible:function(){return acf.isVisible(this.$el)},isActive:function(){return this.$el.hasClass("active")},open:function(){this.$el.addClass("active"),this.field.showFields()},close:function(){this.$el.removeClass("active"),this.field.hideFields()},onClick:function(t,e){t.preventDefault(),this.toggle()},toggle:function(){this.isActive()||this.group.openTab(this)}}),o=new acf.Model({priority:50,actions:{prepare:"render",append:"render",unload:"onUnload",invalid_field:"onInvalidField"},findTabs:function(){return t(".acf-tab-wrap")},getTabs:function(){return acf.getInstances(this.findTabs())},render:function(t){this.getTabs().map((function(t){t.get("initialized")||t.initializeTabs()}))},onInvalidField:function(t){this.busy||t.hiddenByTab&&(t.hiddenByTab.toggle(),this.busy=!0,this.setTimeout((function(){this.busy=!1}),100))},onUnload:function(){var t=[];this.getTabs().map((function(e){var i=e.hasActive()?e.getActive().index():0;t.push(i)})),t.length&&acf.setPreference("this.tabs",t)}})}(jQuery),function(t,e){var i=acf.models.SelectField.extend({type:"post_object"});acf.registerFieldType(i)}(jQuery),function(t,e){var i=acf.models.SelectField.extend({type:"page_link"});acf.registerFieldType(i)}(jQuery),function(t,e){var i=acf.models.SelectField.extend({type:"user"});acf.registerFieldType(i)}(jQuery),function(t,e){var i=acf.Field.extend({type:"taxonomy",data:{ftype:"select"},select2:!1,wait:"load",events:{'click a[data-name="add"]':"onClickAdd",'click input[type="radio"]':"onClickRadio",removeField:"onRemove"},$control:function(){return this.$(".acf-taxonomy-field")},$input:function(){return this.getRelatedPrototype().$input.apply(this,arguments)},getRelatedType:function(){var t=this.get("ftype");return"multi_select"==t&&(t="select"),t},getRelatedPrototype:function(){return acf.getFieldType(this.getRelatedType()).prototype},getValue:function(){return this.getRelatedPrototype().getValue.apply(this,arguments)},setValue:function(){return this.getRelatedPrototype().setValue.apply(this,arguments)},initialize:function(){this.getRelatedPrototype().initialize.apply(this,arguments)},onRemove:function(){var t=this.getRelatedPrototype();t.onRemove&&t.onRemove.apply(this,arguments)},onClickAdd:function(e,i){var a=this,n=!1,s=!1,r=!1,o=!1,c=!1,l=!1,d=!1,u=function(){n=acf.newPopup({title:i.attr("title"),loading:!0,width:"300px"});var e={action:"acf/fields/taxonomy/add_term",field_key:a.get("key")};t.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(e),type:"post",dataType:"html",success:f})},f=function(t){n.loading(!1),n.content(t),s=n.$("form"),r=n.$('input[name="term_name"]'),o=n.$('select[name="term_parent"]'),c=n.$(".acf-submit-button"),r.focus(),n.on("submit","form",p)},p=function(e,i){if(e.preventDefault(),e.stopImmediatePropagation(),""===r.val())return r.focus(),!1;acf.startButtonLoading(c);var n={action:"acf/fields/taxonomy/add_term",field_key:a.get("key"),term_name:r.val(),term_parent:o.length?o.val():0};t.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(n),type:"post",dataType:"json",success:h})},h=function(t){acf.stopButtonLoading(c),d&&d.remove(),acf.isAjaxSuccess(t)?(r.val(""),g(t.data),d=acf.newNotice({type:"success",text:acf.getAjaxMessage(t),target:s,timeout:2e3,dismiss:!1})):d=acf.newNotice({type:"error",text:acf.getAjaxError(t),target:s,timeout:2e3,dismiss:!1}),r.focus()},g=function(e){var i=t(''+e.term_label+" "),n;e.term_parent?o.children('option[value="'+e.term_parent+'"]').after(i):o.append(i),acf.getFields({type:"taxonomy"}).map((function(t){t.get("taxonomy")==a.get("taxonomy")&&t.appendTerm(e)})),a.selectTerm(e.term_id)};u()},appendTerm:function(t){"select"==this.getRelatedType()?this.appendTermSelect(t):this.appendTermCheckbox(t)},appendTermSelect:function(t){this.select2.addOption({id:t.term_id,text:t.term_label})},appendTermCheckbox:function(e){var i=this.$("[name]:first").attr("name"),a=this.$("ul:first");"checkbox"==this.getRelatedType()&&(i+="[]");var n=t(['',"",' ',""+e.term_name+" "," "," "].join(""));if(e.term_parent){var s=a.find('li[data-id="'+e.term_parent+'"]');(a=s.children("ul")).exists()||(a=t(''),s.append(a))}a.append(n)},selectTerm:function(t){var e;"select"==this.getRelatedType()?this.select2.selectOption(t):this.$('input[value="'+t+'"]').prop("checked",!0).trigger("change")},onClickRadio:function(t,e){var i=e.parent("label"),a=i.hasClass("selected");this.$(".selected").removeClass("selected"),i.addClass("selected"),this.get("allow_null")&&a&&(i.removeClass("selected"),e.prop("checked",!1).trigger("change"))}});acf.registerFieldType(i)}(jQuery),function(t,e){var i=acf.models.DatePickerField.extend({type:"time_picker",$control:function(){return this.$(".acf-time-picker")},initialize:function(){var t=this.$input(),e=this.$inputText(),i={timeFormat:this.get("time_format"),altField:t,altFieldTimeOnly:!1,altTimeFormat:"HH:mm:ss",showButtonPanel:!0,controlType:"select",oneLine:!0,closeText:acf.get("dateTimePickerL10n").selectText,timeOnly:!0,onClose:function(t,e,i){var a=e.dpDiv.find(".ui-datepicker-close");!t&&a.is(":hover")&&i._updateDateTime()}};i=acf.applyFilters("time_picker_args",i,this),acf.newTimePicker(e,i),acf.doAction("time_picker_init",e,i,this)}});acf.registerFieldType(i),acf.newTimePicker=function(e,i){if(void 0===t.timepicker)return!1;i=i||{},e.timepicker(i),t("body > #ui-datepicker-div").exists()&&t("body > #ui-datepicker-div").wrap('
')}}(jQuery),function(t,e){var i=acf.Field.extend({type:"true_false",events:{"change .acf-switch-input":"onChange","focus .acf-switch-input":"onFocus","blur .acf-switch-input":"onBlur","keypress .acf-switch-input":"onKeypress"},$input:function(){return this.$('input[type="checkbox"]')},$switch:function(){return this.$(".acf-switch")},getValue:function(){return this.$input().prop("checked")?1:0},initialize:function(){this.render()},render:function(){var t=this.$switch();if(t.length){var e=t.children(".acf-switch-on"),i=t.children(".acf-switch-off"),a=Math.max(e.width(),i.width());a&&(e.css("min-width",a),i.css("min-width",a))}},switchOn:function(){this.$input().prop("checked",!0),this.$switch().addClass("-on")},switchOff:function(){this.$input().prop("checked",!1),this.$switch().removeClass("-on")},onChange:function(t,e){e.prop("checked")?this.switchOn():this.switchOff()},onFocus:function(t,e){this.$switch().addClass("-focus")},onBlur:function(t,e){this.$switch().removeClass("-focus")},onKeypress:function(t,e){return 37===t.keyCode?this.switchOff():39===t.keyCode?this.switchOn():void 0}});acf.registerFieldType(i)}(jQuery),function(t,e){var i=acf.Field.extend({type:"url",events:{'keyup input[type="url"]':"onkeyup"},$control:function(){return this.$(".acf-input-wrap")},$input:function(){return this.$('input[type="url"]')},initialize:function(){this.render()},isValid:function(){var t=this.val();return!!t&&(-1!==t.indexOf("://")||0===t.indexOf("//"))},render:function(){this.isValid()?this.$control().addClass("-valid"):this.$control().removeClass("-valid")},onkeyup:function(t,e){this.render()}});acf.registerFieldType(i)}(jQuery),function(t,e){var i=acf.Field.extend({type:"wysiwyg",wait:"load",events:{"mousedown .acf-editor-wrap.delay":"onMousedown",unmountField:"disableEditor",remountField:"enableEditor",removeField:"disableEditor"},$control:function(){return this.$(".acf-editor-wrap")},$input:function(){return this.$("textarea")},getMode:function(){return this.$control().hasClass("tmce-active")?"visual":"text"},initialize:function(){this.$control().hasClass("delay")||this.initializeEditor()},initializeEditor:function(){var t=this.$control(),e=this.$input(),i={tinymce:!0,quicktags:!0,toolbar:this.get("toolbar"),mode:this.getMode(),field:this},a=e.attr("id"),n=acf.uniqueId("acf-editor-"),s=e.data(),r=e.val();acf.rename({target:t,search:a,replace:n,destructive:!0}),this.set("id",n,!0),this.$input().data(s).val(r),acf.tinymce.initialize(n,i)},onMousedown:function(t){t.preventDefault();var e=this.$control();e.removeClass("delay"),e.find(".acf-editor-toolbar").remove(),this.initializeEditor()},enableEditor:function(){"visual"==this.getMode()&&acf.tinymce.enable(this.get("id"))},disableEditor:function(){acf.tinymce.destroy(this.get("id"))}});acf.registerFieldType(i)}(jQuery),function(t,e){var i=[];acf.Condition=acf.Model.extend({type:"",operator:"==",label:"",choiceType:"input",fieldTypes:[],data:{conditions:!1,field:!1,rule:{}},events:{change:"change",keyup:"change",enableField:"change",disableField:"change"},setup:function(e){t.extend(this.data,e)},getEventTarget:function(t,e){return t||this.get("field").$el},change:function(t,e){this.get("conditions").change(t)},match:function(t,e){return!1},calculate:function(){return this.match(this.get("rule"),this.get("field"))},choices:function(t){return' '}}),acf.newCondition=function(t,e){var i=e.get("field"),a=i.getField(t.field);if(!i||!a)return!1;var n={rule:t,target:i,conditions:e,field:a},s=a.get("type"),r=t.operator,o,c,l;return new(acf.getConditionTypes({fieldType:s,operator:r})[0]||acf.Condition)(n)};var a=function(t){return acf.strPascalCase(t||"")+"Condition"};acf.registerConditionType=function(t){var e,n=t.prototype.type,s=a(n);acf.models[s]=t,i.push(n)},acf.getConditionType=function(t){var e=a(t);return acf.models[e]||!1},acf.registerConditionForFieldType=function(t,e){var i=acf.getConditionType(t);i&&i.prototype.fieldTypes.push(e)},acf.getConditionTypes=function(t){t=acf.parseArgs(t,{fieldType:"",operator:""});var e=[];return i.map((function(i){var a=acf.getConditionType(i),n=a.prototype.fieldTypes,s=a.prototype.operator;t.fieldType&&-1===n.indexOf(t.fieldType)||t.operator&&s!==t.operator||e.push(a)})),e}}(jQuery),function(t,e){var i="conditional_logic",a=new acf.Model({id:"conditionsManager",priority:20,actions:{new_field:"onNewField"},onNewField:function(t){t.has("conditions")&&t.getConditions().render()}}),n=function(t,e){var i=acf.getFields({key:e,sibling:t.$el,suppressFilters:!0});return i.length||(i=acf.getFields({key:e,parent:t.$el.parent(),suppressFilters:!0})),!!i.length&&i[0]};acf.Field.prototype.getField=function(t){var e=n(this,t);if(e)return e;for(var i=this.parents(),a=0;aparseFloat(e)},o=function(t,e){return parseFloat(t)-1},l=function(t,e){return a(t).indexOf(a(e))>-1},d=function(t,e){var i=new RegExp(a(e),"gi");return a(t).match(i)},u=acf.Condition.extend({type:"hasValue",operator:"!=empty",label:i("Has any value"),fieldTypes:["text","textarea","number","range","email","url","password","image","file","wysiwyg","oembed","select","checkbox","radio","button_group","link","post_object","page_link","relationship","taxonomy","user","google_map","date_picker","date_time_picker","time_picker","color_picker"],match:function(t,e){return!!e.val()},choices:function(t){return' '}});acf.registerConditionType(u);var f=u.extend({type:"hasNoValue",operator:"==empty",label:i("Has no value"),match:function(t,e){return!u.prototype.match.apply(this,arguments)}});acf.registerConditionType(f);var p=acf.Condition.extend({type:"equalTo",operator:"==",label:i("Value is equal to"),fieldTypes:["text","textarea","number","range","email","url","password"],match:function(e,i){return t.isNumeric(e.value)?s(e.value,i.val()):n(e.value,i.val())},choices:function(t){return' '}});acf.registerConditionType(p);var h=p.extend({type:"notEqualTo",operator:"!=",label:i("Value is not equal to"),match:function(t,e){return!p.prototype.match.apply(this,arguments)}});acf.registerConditionType(h);var g=acf.Condition.extend({type:"patternMatch",operator:"==pattern",label:i("Value matches pattern"),fieldTypes:["text","textarea","email","url","password","wysiwyg"],match:function(t,e){return d(e.val(),t.value)},choices:function(t){return' '}});acf.registerConditionType(g);var m=acf.Condition.extend({type:"contains",operator:"==contains",label:i("Value contains"),fieldTypes:["text","textarea","number","email","url","password","wysiwyg","oembed","select"],match:function(t,e){return l(e.val(),t.value)},choices:function(t){return' '}});acf.registerConditionType(m);var v=p.extend({type:"trueFalseEqualTo",choiceType:"select",fieldTypes:["true_false"],choices:function(t){return[{id:1,text:i("Checked")}]}});acf.registerConditionType(v);var y=h.extend({type:"trueFalseNotEqualTo",choiceType:"select",fieldTypes:["true_false"],choices:function(t){return[{id:1,text:i("Checked")}]}});acf.registerConditionType(y);var b=acf.Condition.extend({type:"selectEqualTo",operator:"==",label:i("Value is equal to"),fieldTypes:["select","checkbox","radio","button_group"],match:function(t,e){var i=e.val();return i instanceof Array?c(t.value,i):n(t.value,i)},choices:function(e){var a=[],n=e.$setting("choices textarea").val().split("\n");return e.$input("allow_null").prop("checked")&&a.push({id:"",text:i("Null")}),n.map((function(e){(e=e.split(":"))[1]=e[1]||e[0],a.push({id:t.trim(e[0]),text:t.trim(e[1])})})),a}});acf.registerConditionType(b);var _=b.extend({type:"selectNotEqualTo",operator:"!=",label:i("Value is not equal to"),match:function(t,e){return!b.prototype.match.apply(this,arguments)}});acf.registerConditionType(_);var w=acf.Condition.extend({type:"greaterThan",operator:">",label:i("Value is greater than"),fieldTypes:["number","range"],match:function(t,e){var i=e.val();return i instanceof Array&&(i=i.length),r(i,t.value)},choices:function(t){return' '}});acf.registerConditionType(w);var x=w.extend({type:"lessThan",operator:"<",label:i("Value is less than"),match:function(t,e){var i=e.val();return i instanceof Array&&(i=i.length),o(i,t.value)},choices:function(t){return' '}});acf.registerConditionType(x);var $=w.extend({type:"selectionGreaterThan",label:i("Selection is greater than"),fieldTypes:["checkbox","select","post_object","page_link","relationship","taxonomy","user"]});acf.registerConditionType($);var k=x.extend({type:"selectionLessThan",label:i("Selection is less than"),fieldTypes:["checkbox","select","post_object","page_link","relationship","taxonomy","user"]});acf.registerConditionType(k)}(jQuery),function(t,e){acf.unload=new acf.Model({wait:"load",active:!0,changed:!1,actions:{validation_failure:"startListening",validation_success:"stopListening"},events:{"change form .acf-field":"startListening","submit form":"stopListening"},enable:function(){this.active=!0},disable:function(){this.active=!1},reset:function(){this.stopListening()},startListening:function(){!this.changed&&this.active&&(this.changed=!0,t(window).on("beforeunload",this.onUnload))},stopListening:function(){this.changed=!1,t(window).off("beforeunload",this.onUnload)},onUnload:function(){return acf.__("The changes you made will be lost if you navigate away from this page")}})}(jQuery),function(t,e){var i=new acf.Model({wait:"prepare",priority:1,initialize:function(){(acf.get("postboxes")||[]).map(acf.newPostbox)}});acf.getPostbox=function(e){return"string"==typeof e&&(e=t("#"+e)),acf.getInstance(e)},acf.getPostboxes=function(){return acf.getInstances(t(".acf-postbox"))},acf.newPostbox=function(t){return new acf.models.Postbox(t)},acf.models.Postbox=acf.Model.extend({data:{id:"",key:"",style:"default",label:"top",edit:""},setup:function(e){e.editLink&&(e.edit=e.editLink),t.extend(this.data,e),this.$el=this.$postbox()},$postbox:function(){return t("#"+this.get("id"))},$hide:function(){return t("#"+this.get("id")+"-hide")},$hideLabel:function(){return this.$hide().parent()},$hndle:function(){return this.$("> .hndle")},$handleActions:function(){return this.$("> .postbox-header .handle-actions")},$inside:function(){return this.$("> .inside")},isVisible:function(){return this.$el.hasClass("acf-hidden")},initialize:function(){if(this.$el.addClass("acf-postbox"),this.$el.removeClass("hide-if-js"),"block"!==acf.get("editor")){var t=this.get("style");"default"!==t&&this.$el.addClass(t)}this.$inside().addClass("acf-fields").addClass("-"+this.get("label"));var e=this.get("edit");if(e){var i=' ',a=this.$handleActions();a.length?a.prepend(i):this.$hndle().append(i)}this.show()},show:function(){this.$hideLabel().show(),this.$hide().prop("checked",!0),this.$el.show().removeClass("acf-hidden"),acf.doAction("show_postbox",this)},enable:function(){acf.enable(this.$el,"postbox")},showEnable:function(){this.enable(),this.show()},hide:function(){this.$hideLabel().hide(),this.$el.hide().addClass("acf-hidden"),acf.doAction("hide_postbox",this)},disable:function(){acf.disable(this.$el,"postbox")},hideDisable:function(){this.disable(),this.hide()},html:function(t){this.$inside().html(t),acf.doAction("append",this.$el)}})}(jQuery),function(t,e){acf.newMediaPopup=function(t){var e=null,t=acf.parseArgs(t,{mode:"select",title:"",button:"",type:"",field:!1,allowedTypes:"",library:"all",multiple:!1,attachment:0,autoOpen:!0,open:function(){},select:function(){},close:function(){}});return e="edit"==t.mode?new acf.models.EditMediaPopup(t):new acf.models.SelectMediaPopup(t),t.autoOpen&&setTimeout((function(){e.open()}),1),acf.doAction("new_media_popup",e),e};var i=function(){var e=acf.get("post_id");return t.isNumeric(e)?e:0};acf.getMimeTypes=function(){return this.get("mimeTypes")},acf.getMimeType=function(t){var e=acf.getMimeTypes();if(void 0!==e[t])return e[t];for(var i in e)if(-1!==i.indexOf(t))return e[i];return!1};var a=acf.Model.extend({id:"MediaPopup",data:{},defaults:{},frame:!1,setup:function(e){t.extend(this.data,e)},initialize:function(){var t=this.getFrameOptions();this.addFrameStates(t);var e=wp.media(t);e.acf=this,this.addFrameEvents(e,t),this.frame=e},open:function(){this.frame.open()},close:function(){this.frame.close()},remove:function(){this.frame.detach(),this.frame.remove()},getFrameOptions:function(){var t={title:this.get("title"),multiple:this.get("multiple"),library:{},states:[]};return this.get("type")&&(t.library.type=this.get("type")),"uploadedTo"===this.get("library")&&(t.library.uploadedTo=i()),this.get("attachment")&&(t.library.post__in=[this.get("attachment")]),this.get("button")&&(t.button={text:this.get("button")}),t},addFrameStates:function(t){var e=wp.media.query(t.library);this.get("field")&&acf.isset(e,"mirroring","args")&&(e.mirroring.args._acfuploader=this.get("field")),t.states.push(new wp.media.controller.Library({library:e,multiple:this.get("multiple"),title:this.get("title"),priority:20,filterable:"all",editable:!0,allowLocalEdits:!0})),acf.isset(wp,"media","controller","EditImage")&&t.states.push(new wp.media.controller.EditImage)},addFrameEvents:function(t,e){t.on("open",(function(){this.$el.closest(".media-modal").addClass("acf-media-modal -"+this.acf.get("mode"))}),t),t.on("content:render:edit-image",(function(){var t=this.state().get("image"),e=new wp.media.view.EditImage({model:t,controller:this}).render();this.content.set(e),e.loadEditor()}),t),t.on("select",(function(){var e=t.state().get("selection");e&&e.each((function(e,i){t.acf.get("select").apply(t.acf,[e,i])}))})),t.on("close",(function(){setTimeout((function(){t.acf.get("close").apply(t.acf),t.acf.remove()}),1)}))}});acf.models.SelectMediaPopup=a.extend({id:"SelectMediaPopup",setup:function(t){t.button||(t.button=acf._x("Select","verb")),a.prototype.setup.apply(this,arguments)},addFrameEvents:function(t,e){acf.isset(_wpPluploadSettings,"defaults","multipart_params")&&(_wpPluploadSettings.defaults.multipart_params._acfuploader=this.get("field"),t.on("open",(function(){delete _wpPluploadSettings.defaults.multipart_params._acfuploader}))),t.on("content:activate:browse",(function(){var e=!1;try{e=t.content.get().toolbar}catch(t){return void console.log(t)}t.acf.customizeFilters.apply(t.acf,[e])})),a.prototype.addFrameEvents.apply(this,arguments)},customizeFilters:function(e){var i=e.get("filters"),a;("image"==this.get("type")&&(i.filters.all.text=acf.__("All images"),delete i.filters.audio,delete i.filters.video,delete i.filters.image,t.each(i.filters,(function(t,e){e.props.type=e.props.type||"image"}))),this.get("allowedTypes"))&&this.get("allowedTypes").split(" ").join("").split(".").join("").split(",").map((function(t){var e=acf.getMimeType(t);if(e){var a={text:e,props:{status:null,type:e,uploadedTo:null,orderby:"date",order:"DESC"},priority:20};i.filters[e]=a}}));if("uploadedTo"===this.get("library")){var n=this.frame.options.library.uploadedTo;delete i.filters.unattached,delete i.filters.uploaded,t.each(i.filters,(function(t,e){e.text+=" ("+acf.__("Uploaded to this post")+")",e.props.uploadedTo=n}))}var s=this.get("field"),r;t.each(i.filters,(function(t,e){e.props._acfuploader=s})),e.get("search").model.attributes._acfuploader=s,i.renderFilters&&i.renderFilters()}}),acf.models.EditMediaPopup=a.extend({id:"SelectMediaPopup",setup:function(t){t.button||(t.button=acf._x("Update","verb")),a.prototype.setup.apply(this,arguments)},addFrameEvents:function(t,e){t.on("open",(function(){this.$el.closest(".media-modal").addClass("acf-expanded"),"browse"!=this.content.mode()&&this.content.mode("browse");var e,i=this.state().get("selection"),a=wp.media.attachment(t.acf.get("attachment"));i.add(a)}),t),a.prototype.addFrameEvents.apply(this,arguments)}});var n=new acf.Model({id:"customizePrototypes",wait:"ready",initialize:function(){if(acf.isset(window,"wp","media","view")){var t=i();t&&acf.isset(wp,"media","view","settings","post")&&(wp.media.view.settings.post.id=t),this.customizeAttachmentsButton(),this.customizeAttachmentsRouter(),this.customizeAttachmentFilters(),this.customizeAttachmentCompat(),this.customizeAttachmentLibrary()}},customizeAttachmentsButton:function(){if(acf.isset(wp,"media","view","Button")){var t=wp.media.view.Button;wp.media.view.Button=t.extend({initialize:function(){var t=_.defaults(this.options,this.defaults);this.model=new Backbone.Model(t),this.listenTo(this.model,"change",this.render)}})}},customizeAttachmentsRouter:function(){if(acf.isset(wp,"media","view","Router")){var e=wp.media.view.Router;wp.media.view.Router=e.extend({addExpand:function(){var e=t(['',' '+acf.__("Expand Details")+" ",' '+acf.__("Collapse Details")+" "," "].join(""));e.on("click",(function(e){e.preventDefault();var i=t(this).closest(".media-modal");i.hasClass("acf-expanded")?i.removeClass("acf-expanded"):i.addClass("acf-expanded")})),this.$el.append(e)},initialize:function(){return e.prototype.initialize.apply(this,arguments),this.addExpand(),this}})}},customizeAttachmentFilters:function(){var e;acf.isset(wp,"media","view","AttachmentFilters","All")&&(wp.media.view.AttachmentFilters.All.prototype.renderFilters=function(){this.$el.html(_.chain(this.filters).map((function(e,i){return{el:t(" ").val(i).html(e.text)[0],priority:e.priority||50}}),this).sortBy("priority").pluck("el").value())})},customizeAttachmentCompat:function(){if(acf.isset(wp,"media","view","AttachmentCompat")){var e=wp.media.view.AttachmentCompat,i=!1;wp.media.view.AttachmentCompat=e.extend({render:function(){return this.rendered?this:(e.prototype.render.apply(this,arguments),this.$("#acf-form-data").length?(clearTimeout(i),i=setTimeout(t.proxy((function(){this.rendered=!0,acf.doAction("append",this.$el)}),this),50),this):this)},save:function(t){var e={};t&&t.preventDefault(),e=acf.serializeForAjax(this.$el),this.controller.trigger("attachment:compat:waiting",["waiting"]),this.model.saveCompat(e).always(_.bind(this.postSave,this))}})}},customizeAttachmentLibrary:function(){if(acf.isset(wp,"media","view","Attachment","Library")){var t=wp.media.view.Attachment.Library;wp.media.view.Attachment.Library=t.extend({render:function(){var e=acf.isget(this,"controller","acf"),i=acf.isget(this,"model","attributes");if(e&&i){i.acf_errors&&this.$el.addClass("acf-disabled");var a=e.get("selected");a&&a.indexOf(i.id)>-1&&this.$el.addClass("acf-selected")}return t.prototype.render.apply(this,arguments)},toggleSelection:function(e){var i=this.collection,a=this.options.selection,n=this.model,s=a.single(),r=this.controller,o=acf.isget(this,"model","attributes","acf_errors"),c=r.$el.find(".media-frame-content .media-sidebar")
+;if(c.children(".acf-selection-error").remove(),c.children().removeClass("acf-hidden"),r&&o){var l=acf.isget(this,"model","attributes","filename");return c.children().addClass("acf-hidden"),c.prepend(['',''+acf.__("Restricted")+" ",''+l+" ",''+o+" ","
"].join("")),a.reset(),void a.single(n)}return t.prototype.toggleSelection.apply(this,arguments)}})}}})}(jQuery),function(t,e){acf.screen=new acf.Model({active:!0,xhr:!1,timeout:!1,wait:"load",events:{"change #page_template":"onChange","change #parent_id":"onChange","change #post-formats-select":"onChange","change .categorychecklist":"onChange","change .tagsdiv":"onChange",'change .acf-taxonomy-field[data-save="1"]':"onChange","change #product-type":"onChange"},isPost:function(){return"post"===acf.get("screen")},isUser:function(){return"user"===acf.get("screen")},isTaxonomy:function(){return"taxonomy"===acf.get("screen")},isAttachment:function(){return"attachment"===acf.get("screen")},isNavMenu:function(){return"nav_menu"===acf.get("screen")},isWidget:function(){return"widget"===acf.get("screen")},isComment:function(){return"comment"===acf.get("screen")},getPageTemplate:function(){var e=t("#page_template");return e.length?e.val():null},getPageParent:function(e,i){var i;return(i=t("#parent_id")).length?i.val():null},getPageType:function(t,e){return this.getPageParent()?"child":"parent"},getPostType:function(){return t("#post_type").val()},getPostFormat:function(e,i){var i;if((i=t("#post-formats-select input:checked")).length){var a=i.val();return"0"==a?"standard":a}return null},getPostCoreTerms:function(){var e={},i=acf.serialize(t(".categorydiv, .tagsdiv"));for(var a in i.tax_input&&(e=i.tax_input),i.post_category&&(e.category=i.post_category),e)acf.isArray(e[a])||(e[a]=e[a].split(/,[\s]?/));return e},getPostTerms:function(){var t=this.getPostCoreTerms();for(var e in acf.getFields({type:"taxonomy"}).map((function(e){if(e.get("save")){var i=e.val(),a=e.get("taxonomy");i&&(t[a]=t[a]||[],i=acf.isArray(i)?i:[i],t[a]=t[a].concat(i))}})),null!==(productType=this.getProductType())&&(t.product_type=[productType]),t)t[e]=acf.uniqueArray(t[e]);return t},getProductType:function(){var e=t("#product-type");return e.length?e.val():null},check:function(){if("post"===acf.get("screen")){this.xhr&&this.xhr.abort();var e=acf.parseArgs(this.data,{action:"acf/ajax/check_screen",screen:acf.get("screen"),exists:[]});this.isPost()&&(e.post_id=acf.get("post_id")),null!==(postType=this.getPostType())&&(e.post_type=postType),null!==(pageTemplate=this.getPageTemplate())&&(e.page_template=pageTemplate),null!==(pageParent=this.getPageParent())&&(e.page_parent=pageParent),null!==(pageType=this.getPageType())&&(e.page_type=pageType),null!==(postFormat=this.getPostFormat())&&(e.post_format=postFormat),null!==(postTerms=this.getPostTerms())&&(e.post_terms=postTerms),acf.getPostboxes().map((function(t){e.exists.push(t.get("key"))})),e=acf.applyFilters("check_screen_args",e);var i=function(t){"post"==acf.get("screen")?this.renderPostScreen(t):"user"==acf.get("screen")&&this.renderUserScreen(t),acf.doAction("check_screen_complete",t,e)};this.xhr=t.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(e),type:"post",dataType:"json",context:this,success:i})}},onChange:function(t,e){this.setTimeout(this.check,1)},renderPostScreen:function(e){var i=function(e,i){var a=t._data(e[0]).events;for(var n in a)for(var s=0;s=0;n--)if(t("#"+i[n]).length)return t("#"+i[n]).after(t("#"+e));for(var n=a+1;n=5.5)var c=['"].join("");else var c=['','Toggle panel: '+acf.escHtml(n.title)+" ",' '," ",'',""+acf.escHtml(n.title)+" "," "].join("");var l=t(['"].join(""));if(t("#adv-settings").length){var d=t("#adv-settings .metabox-prefs"),u=t(['',' '," "+n.title," "].join(""));i(d.find("input").first(),u.find("input")),d.append(u)}t(".postbox").length&&(i(t(".postbox .handlediv").first(),l.children(".handlediv")),i(t(".postbox .hndle").first(),l.children(".hndle"))),"side"===n.position?t("#"+n.position+"-sortables").append(l):t("#"+n.position+"-sortables").prepend(l);var f=[];if(e.results.map((function(e){n.position===e.position&&t("#"+n.position+"-sortables #"+e.id).length&&f.push(e.id)})),a(n.id,f),e.sorted)for(var p in e.sorted){var f=e.sorted[p].split(",");if(a(n.id,f))break}r=acf.newPostbox(n),acf.doAction("append",l),acf.doAction("append_postbox",r)}return r.showEnable(),e.visible.push(n.id),n})),acf.getPostboxes().map((function(t){-1===e.visible.indexOf(t.get("id"))&&(t.hideDisable(),e.hidden.push(t.get("id")))})),t("#acf-style").html(e.style),acf.doAction("refresh_post_screen",e)},renderUserScreen:function(t){}});var i=new acf.Model({postEdits:{},wait:"prepare",initialize:function(){var t;acf.isGutenberg()&&(wp.data.subscribe(acf.debounce(this.onChange).bind(this)),acf.screen.getPageTemplate=this.getPageTemplate,acf.screen.getPageParent=this.getPageParent,acf.screen.getPostType=this.getPostType,acf.screen.getPostFormat=this.getPostFormat,acf.screen.getPostCoreTerms=this.getPostCoreTerms,acf.unload.disable(),parseFloat(acf.get("wp_version"))>=5.3&&this.addAction("refresh_post_screen",this.onRefreshPostScreen),wp.domReady(acf.refresh))},onChange:function(){var t=["template","parent","format"];(wp.data.select("core").getTaxonomies()||[]).map((function(e){t.push(e.rest_base)}));var e=wp.data.select("core/editor").getPostEdits(),i={};t.map((function(t){void 0!==e[t]&&(i[t]=e[t])})),JSON.stringify(i)!==JSON.stringify(this.postEdits)&&(this.postEdits=i,acf.screen.check())},getPageTemplate:function(){return wp.data.select("core/editor").getEditedPostAttribute("template")},getPageParent:function(t,e){return wp.data.select("core/editor").getEditedPostAttribute("parent")},getPostType:function(){return wp.data.select("core/editor").getEditedPostAttribute("type")},getPostFormat:function(t,e){return wp.data.select("core/editor").getEditedPostAttribute("format")},getPostCoreTerms:function(){var t={},e;return(wp.data.select("core").getTaxonomies()||[]).map((function(e){var i=wp.data.select("core/editor").getEditedPostAttribute(e.rest_base);i&&(t[e.slug]=i)})),t},onRefreshPostScreen:function(t){var e=wp.data.select("core/edit-post"),i=wp.data.dispatch("core/edit-post"),a={};e.getActiveMetaBoxLocations().map((function(t){a[t]=e.getMetaBoxesPerLocation(t)}));var n=[];for(var s in a)a[s].map((function(t){n.push(t.id)}));for(var s in t.results.filter((function(t){return-1===n.indexOf(t.id)})).map((function(t,e){var i=t.position;a[i]=a[i]||[],a[i].push({id:t.id,title:t.title})})),a)a[s]=a[s].filter((function(e){return-1===t.hidden.indexOf(e.id)}));i.setAvailableMetaBoxesPerLocation(a)}})}(jQuery),function(t,e){function i(){return acf.isset(window,"jQuery","fn","select2","amd")?4:!!acf.isset(window,"Select2")&&3}acf.newSelect2=function(t,e){if(e=acf.parseArgs(e,{allowNull:!1,placeholder:"",multiple:!1,field:!1,ajax:!1,ajaxAction:"",ajaxData:function(t){return t},ajaxResults:function(t){return t}}),4==i())var a=new n(t,e);else var a=new s(t,e);return acf.doAction("new_select2",a),a};var a=acf.Model.extend({setup:function(e,i){t.extend(this.data,i),this.$el=e},initialize:function(){},selectOption:function(t){var e=this.getOption(t);e.prop("selected")||e.prop("selected",!0).trigger("change")},unselectOption:function(t){var e=this.getOption(t);e.prop("selected")&&e.prop("selected",!1).trigger("change")},getOption:function(t){return this.$('option[value="'+t+'"]')},addOption:function(e){e=acf.parseArgs(e,{id:"",text:"",selected:!1});var i=this.getOption(e.id);return i.length||((i=t(" ")).html(e.text),i.attr("value",e.id),i.prop("selected",e.selected),this.$el.append(i)),i},getValue:function(){var e=[],i=this.$el.find("option:selected");return i.exists()?((i=i.sort((function(t,e){return+t.getAttribute("data-i")-+e.getAttribute("data-i")}))).each((function(){var i=t(this);e.push({$el:i,id:i.attr("value"),text:i.text()})})),e):e},mergeOptions:function(){},getChoices:function(){var e=function(i){var a=[];return i.children().each((function(){var i=t(this);i.is("optgroup")?a.push({text:i.attr("label"),children:e(i)}):a.push({id:i.attr("value"),text:i.text()})})),a};return e(this.$el)},getAjaxData:function(t){var e={action:this.get("ajaxAction"),s:t.term||"",paged:t.page||1},i=this.get("field");i&&(e.field_key=i.get("key"));var a=this.get("ajaxData");return a&&(e=a.apply(this,[e,t])),e=acf.applyFilters("select2_ajax_data",e,this.data,this.$el,i||!1,this),acf.prepareForAjax(e)},getAjaxResults:function(t,e){t=acf.parseArgs(t,{results:!1,more:!1});var i=this.get("ajaxResults");return i&&(t=i.apply(this,[t,e])),t=acf.applyFilters("select2_ajax_results",t,e,this)},processAjaxResults:function(e,i){var e;return(e=this.getAjaxResults(e,i)).more&&(e.pagination={more:!0}),setTimeout(t.proxy(this.mergeOptions,this),1),e},destroy:function(){this.$el.data("select2")&&this.$el.select2("destroy"),this.$el.siblings(".select2-container").remove()}}),n=a.extend({initialize:function(){var e=this.$el,i={width:"100%",allowClear:this.get("allowNull"),placeholder:this.get("placeholder"),multiple:this.get("multiple"),data:[],escapeMarkup:function(t){return acf.escHtml(t)}};i.multiple&&this.getValue().map((function(t){t.$el.detach().appendTo(e)})),e.removeData("ajax"),e.removeAttr("data-ajax"),this.get("ajax")&&(i.ajax={url:acf.get("ajaxurl"),delay:250,dataType:"json",type:"post",cache:!1,data:t.proxy(this.getAjaxData,this),processResults:t.proxy(this.processAjaxResults,this)});var a=this.get("field");i=acf.applyFilters("select2_args",i,e,this.data,a||!1,this),e.select2(i);var n=e.next(".select2-container");if(i.multiple){var s=n.find("ul");s.sortable({stop:function(i){s.find(".select2-selection__choice").each((function(){var i;t(t(this).data("data").element).detach().appendTo(e)})),e.trigger("change")}}),e.on("select2:select",this.proxy((function(t){this.getOption(t.params.data.id).detach().appendTo(this.$el)})))}n.addClass("-acf"),acf.doAction("select2_init",e,i,this.data,a||!1,this)},mergeOptions:function(){var e=!1,i=!1;t('.select2-results__option[role="group"]').each((function(){var a=t(this).children("ul"),n=t(this).children("strong");if(i&&i.text()===n.text())return e.append(a.children()),void t(this).remove();e=a,i=n}))}}),s=a.extend({initialize:function(){var e=this.$el,i=this.getValue(),a=this.get("multiple"),n={width:"100%",allowClear:this.get("allowNull"),placeholder:this.get("placeholder"),separator:"||",multiple:this.get("multiple"),data:this.getChoices(),escapeMarkup:function(t){return acf.escHtml(t)},dropdownCss:{"z-index":"999999999"},initSelection:function(t,e){e(a?i:i.shift())}},s=e.siblings("input");s.length||(s=t(' '),e.before(s)),inputValue=i.map((function(t){return t.id})).join("||"),s.val(inputValue),n.multiple&&i.map((function(t){t.$el.detach().appendTo(e)})),n.allowClear&&(n.data=n.data.filter((function(t){return""!==t.id}))),e.removeData("ajax"),e.removeAttr("data-ajax"),this.get("ajax")&&(n.ajax={url:acf.get("ajaxurl"),quietMillis:250,dataType:"json",type:"post",cache:!1,data:t.proxy(this.getAjaxData,this),results:t.proxy(this.processAjaxResults,this)});var r=this.get("field");n=acf.applyFilters("select2_args",n,e,this.data,r||!1,this),s.select2(n);var o=s.select2("container"),c=t.proxy(this.getOption,this);if(n.multiple){var l=o.find("ul");l.sortable({stop:function(){l.find(".select2-search-choice").each((function(){var i=t(this).data("select2Data"),a;c(i.id).detach().appendTo(e)})),e.trigger("change")}})}s.on("select2-selecting",(function(i){var a=i.choice,n=c(a.id);n.length||(n=t(''+a.text+" ")),n.detach().appendTo(e)})),o.addClass("-acf"),acf.doAction("select2_init",e,n,this.data,r||!1,this),s.on("change",(function(){var t=s.val();t.indexOf("||")&&(t=t.split("||")),e.val(t).trigger("change")})),e.hide()},mergeOptions:function(){var e=!1,i=!1;t("#select2-drop .select2-result-with-children").each((function(){var a=t(this).children("ul"),n=t(this).children(".select2-result-label");if(i&&i.text()===n.text())return i.append(a.children()),void t(this).remove();e=a,i=n}))},getAjaxData:function(t,e){var i={term:t,page:e};return a.prototype.getAjaxData.apply(this,[i])}}),r=new acf.Model({priority:5,wait:"prepare",actions:{duplicate:"onDuplicate"},initialize:function(){var t=acf.get("locale"),e=acf.get("rtl"),a=acf.get("select2L10n"),n=i();return!!a&&(0!==t.indexOf("en")&&void(4==n?this.addTranslations4():3==n&&this.addTranslations3()))},addTranslations4:function(){var t=acf.get("select2L10n"),e=acf.get("locale");e=e.replace("_","-");var i={errorLoading:function(){return t.load_fail},inputTooLong:function(e){var i=e.input.length-e.maximum;return i>1?t.input_too_long_n.replace("%d",i):t.input_too_long_1},inputTooShort:function(e){var i=e.minimum-e.input.length;return i>1?t.input_too_short_n.replace("%d",i):t.input_too_short_1},loadingMore:function(){return t.load_more},maximumSelected:function(e){var i=e.maximum;return i>1?t.selection_too_long_n.replace("%d",i):t.selection_too_long_1},noResults:function(){return t.matches_0},searching:function(){return t.searching}};jQuery.fn.select2.amd.define("select2/i18n/"+e,[],(function(){return i}))},addTranslations3:function(){var e=acf.get("select2L10n"),i=acf.get("locale");i=i.replace("_","-");var a={formatMatches:function(t){return t>1?e.matches_n.replace("%d",t):e.matches_1},formatNoMatches:function(){return e.matches_0},formatAjaxError:function(){return e.load_fail},formatInputTooShort:function(t,i){var a=i-t.length;return a>1?e.input_too_short_n.replace("%d",a):e.input_too_short_1},formatInputTooLong:function(t,i){var a=t.length-i;return a>1?e.input_too_long_n.replace("%d",a):e.input_too_long_1},formatSelectionTooBig:function(t){return t>1?e.selection_too_long_n.replace("%d",t):e.selection_too_long_1},formatLoadMore:function(){return e.load_more},formatSearching:function(){return e.searching}};t.fn.select2.locales=t.fn.select2.locales||{},t.fn.select2.locales[i]=a,t.extend(t.fn.select2.defaults,a)},onDuplicate:function(t,e){e.find(".select2-container").remove()}})}(jQuery),function(t,e){acf.tinymce={defaults:function(){return"undefined"!=typeof tinyMCEPreInit&&{tinymce:tinyMCEPreInit.mceInit.acf_content,quicktags:tinyMCEPreInit.qtInit.acf_content};var t},initialize:function(t,e){(e=acf.parseArgs(e,{tinymce:!0,quicktags:!0,toolbar:"full",mode:"visual",field:!1})).tinymce&&this.initializeTinymce(t,e),e.quicktags&&this.initializeQuicktags(t,e)},initializeTinymce:function(e,i){var a=t("#"+e),n=this.defaults(),s=acf.get("toolbars"),r=i.field||!1,o=r.$el||!1;if("undefined"==typeof tinymce)return!1;if(!n)return!1;if(tinymce.get(e))return this.enable(e);var c=t.extend({},n.tinymce,i.tinymce);c.id=e,c.selector="#"+e;var l=i.toolbar;if(l&&s&&s[l])for(var d=1;d<=4;d++)c["toolbar"+d]=s[l][d]||"";if(c.setup=function(t){t.on("change",(function(e){t.save(),a.trigger("change")})),t.on("mouseup",(function(t){var e=new MouseEvent("mouseup");window.dispatchEvent(e)}))},c.wp_autoresize_on=!1,c.tadv_noautop||(c.wpautop=!0),c=acf.applyFilters("wysiwyg_tinymce_settings",c,e,r),tinyMCEPreInit.mceInit[e]=c,"visual"==i.mode){var u=tinymce.init(c),f=tinymce.get(e);if(!f)return!1;f.acf=i.field,acf.doAction("wysiwyg_tinymce_init",f,f.id,c,r)}},initializeQuicktags:function(e,i){var a=this.defaults();if("undefined"==typeof quicktags)return!1;if(!a)return!1;var n=t.extend({},a.quicktags,i.quicktags);n.id=e;var s=i.field||!1,r=s.$el||!1;n=acf.applyFilters("wysiwyg_quicktags_settings",n,n.id,s),tinyMCEPreInit.qtInit[e]=n;var o=quicktags(n);if(!o)return!1;this.buildQuicktags(o),acf.doAction("wysiwyg_quicktags_init",o,o.id,n,s)},buildQuicktags:function(t){var e,i,a,n,s,t,r,o,c,l,d=",strong,em,link,block,del,ins,img,ul,ol,li,code,more,close,";for(o in e=t.canvas,i=t.name,a=t.settings,s="",n={},c="",l=t.id,a.buttons&&(c=","+a.buttons+","),edButtons)edButtons[o]&&(r=edButtons[o].id,c&&-1!==d.indexOf(","+r+",")&&-1===c.indexOf(","+r+",")||edButtons[o].instance&&edButtons[o].instance!==l||(n[r]=edButtons[o],edButtons[o].html&&(s+=edButtons[o].html(i+"_"))));c&&-1!==c.indexOf(",dfw,")&&(n.dfw=new QTags.DFWButton,s+=n.dfw.html(i+"_")),"rtl"===document.getElementsByTagName("html")[0].dir&&(n.textdirection=new QTags.TextDirectionButton,s+=n.textdirection.html(i+"_")),t.toolbar.innerHTML=s,t.theButtons=n,"undefined"!=typeof jQuery&&jQuery(document).triggerHandler("quicktags-init",[t])},disable:function(t){this.destroyTinymce(t)},remove:function(t){this.destroyTinymce(t)},destroy:function(t){this.destroyTinymce(t)},destroyTinymce:function(t){if("undefined"==typeof tinymce)return!1;var e=tinymce.get(t);return!!e&&(e.save(),e.destroy(),!0)},enable:function(t){this.enableTinymce(t)},enableTinymce:function(e){return"undefined"!=typeof switchEditors&&(void 0!==tinyMCEPreInit.mceInit[e]&&(t("#"+e).show(),switchEditors.go(e,"tmce"),!0))}};var i=new acf.Model({priority:5,actions:{prepare:"onPrepare",ready:"onReady"},onPrepare:function(){var e=t("#acf-hidden-wp-editor");e.exists()&&e.appendTo("body")},onReady:function(){acf.isset(window,"wp","oldEditor")&&(wp.editor.autop=wp.oldEditor.autop,wp.editor.removep=wp.oldEditor.removep),acf.isset(window,"tinymce","on")&&tinymce.on("AddEditor",(function(t){var e=t.editor;"acf"===e.id.substr(0,3)&&(e=tinymce.editors.content||e,tinymce.activeEditor=e,wpActiveEditor=e.id)}))}})}(jQuery),function(t,e){var i=acf.Model.extend({id:"Validator",data:{errors:[],notice:null,status:""},events:{"changed:status":"onChangeStatus"},addErrors:function(t){t.map(this.addError,this)},addError:function(t){this.data.errors.push(t)},hasErrors:function(){return this.data.errors.length},clearErrors:function(){return this.data.errors=[]},getErrors:function(){return this.data.errors},getFieldErrors:function(){var t=[],e=[];return this.getErrors().map((function(i){if(i.input){var a=e.indexOf(i.input);a>-1?t[a]=i:(t.push(i),e.push(i.input))}})),t},getGlobalErrors:function(){return this.getErrors().filter((function(t){return!t.input}))},showErrors:function(){if(this.hasErrors()){var e=this.getFieldErrors(),i=this.getGlobalErrors(),a=0,n=!1;e.map((function(t){var e=this.$('[name="'+t.input+'"]').first();if(e.length||(e=this.$('[name^="'+t.input+'"]').first()),e.length){a++;var i=acf.getClosestField(e);i.showError(t.message),n||(n=i.$el)}}),this);var s=acf.__("Validation failed");if(i.map((function(t){s+=". "+t.message})),1==a?s+=". "+acf.__("1 field requires attention"):a>1&&(s+=". "+acf.__("%d fields require attention").replace("%d",a)),this.has("notice"))this.get("notice").update({type:"error",text:s});else{var r=acf.newNotice({type:"error",text:s,target:this.$el});this.set("notice",r)}n||(n=this.get("notice").$el),setTimeout((function(){t("html, body").animate({scrollTop:n.offset().top-t(window).height()/2},500)}),10)}},onChangeStatus:function(t,e,i,a){this.$el.removeClass("is-"+a).addClass("is-"+i)},validate:function(e){if(e=acf.parseArgs(e,{event:!1,reset:!1,loading:function(){},complete:function(){},failure:function(){},success:function(t){t.submit()}}),"valid"==this.get("status"))return!0;if("validating"==this.get("status"))return!1;if(!this.$(".acf-field").length)return!0;if(e.event){var i=t.Event(null,e.event);e.success=function(){acf.enableSubmit(t(i.target)).trigger(i)}}acf.doAction("validation_begin",this.$el),acf.lockForm(this.$el),e.loading(this.$el,this),this.set("status","validating");var a=function(t){if(acf.isAjaxSuccess(t)){var e=acf.applyFilters("validation_complete",t.data,this.$el,this);e.valid||this.addErrors(e.errors)}},n=function(){acf.unlockForm(this.$el),this.hasErrors()?(this.set("status","invalid"),acf.doAction("validation_failure",this.$el,this),this.showErrors(),e.failure(this.$el,this)):(this.set("status","valid"),this.has("notice")&&this.get("notice").update({type:"success",text:acf.__("Validation successful"),timeout:1e3}),acf.doAction("validation_success",this.$el,this),acf.doAction("submit",this.$el),e.success(this.$el,this),acf.lockForm(this.$el),e.reset&&this.reset()),e.complete(this.$el,this),this.clearErrors()},s=acf.serialize(this.$el);return s.action="acf/validate_save_post",t.ajax({url:acf.get("ajaxurl"),data:acf.prepareForAjax(s),type:"post",dataType:"json",context:this,success:a,complete:n}),!1},setup:function(t){this.$el=t},reset:function(){this.set("errors",[]),this.set("notice",null),this.set("status",""),acf.unlockForm(this.$el)}}),a=function(t){var e=t.data("acf");return e||(e=new i(t)),e};acf.validateForm=function(t){return a(t.form).validate(t)},acf.enableSubmit=function(t){return t.removeClass("disabled")},acf.disableSubmit=function(t){return t.addClass("disabled")},acf.showSpinner=function(t){return t.addClass("is-active"),t.css("display","inline-block"),t},acf.hideSpinner=function(t){return t.removeClass("is-active"),t.css("display","none"),t},acf.lockForm=function(t){var e=n(t),i=e.find('.button, [type="submit"]'),a=e.find(".spinner, .acf-spinner");return acf.hideSpinner(a),acf.disableSubmit(i),acf.showSpinner(a.last()),t},acf.unlockForm=function(t){var e=n(t),i=e.find('.button, [type="submit"]'),a=e.find(".spinner, .acf-spinner");return acf.enableSubmit(i),acf.hideSpinner(a),t};var n=function(t){var e,e,e,e;return(e=t.find("#submitdiv")).length||(e=t.find("#submitpost")).length||(e=t.find("p.submit").last()).length||(e=t.find(".acf-form-submit")).length?e:t},s=acf.debounce((function(t){t.submit()}));acf.validation=new acf.Model({id:"validation",active:!0,wait:"prepare",actions:{ready:"addInputEvents",append:"addInputEvents"},events:{'click input[type="submit"]':"onClickSubmit",'click button[type="submit"]':"onClickSubmit","click #save-post":"onClickSave","submit form#post":"onSubmitPost","submit form":"onSubmit"},initialize:function(){acf.get("validation")||(this.active=!1,this.actions={},this.events={})},enable:function(){this.active=!0},disable:function(){this.active=!1},reset:function(t){a(t).reset()},addInputEvents:function(e){if("safari"!==acf.get("browser")){var i=t(".acf-field [name]",e);i.length&&this.on(i,"invalid","onInvalid")}},onInvalid:function(t,e){t.preventDefault();var i=e.closest("form");i.length&&(a(i).addError({input:e.attr("name"),message:acf.strEscape(t.target.validationMessage)}),s(i))},onClickSubmit:function(t,e){this.set("originalEvent",t)},onClickSave:function(t,e){this.set("ignore",!0)},onClickSubmitGutenberg:function(e,i){var a;acf.validateForm({form:t("#editor"),event:e,reset:!0,failure:function(t,e){var i=e.get("notice").$el;i.appendTo(".components-notice-list"),i.find(".acf-notice-dismiss").removeClass("small")}})||(e.preventDefault(),e.stopImmediatePropagation())},onSubmitPost:function(e,i){"dopreview"===t("input#wp-preview").val()&&(this.set("ignore",!0),acf.unlockForm(i))},onSubmit:function(t,e){if(!this.active||this.get("ignore")||t.isDefaultPrevented())return this.allowSubmit();var i;acf.validateForm({form:e,event:this.get("originalEvent")})||t.preventDefault()},allowSubmit:function(){return this.set("ignore",!1),this.set("originalEvent",!1),!0}});var r=new acf.Model({wait:"prepare",initialize:function(){acf.isGutenberg()&&this.customizeEditor()},customizeEditor:function(){var e=wp.data.dispatch("core/editor"),i=wp.data.select("core/editor"),a=wp.data.dispatch("core/notices"),n=e.savePost,s=!1,r="";wp.data.subscribe((function(){var t=i.getEditedPostAttribute("status");s="publish"===t,r="publish"!==t?t:r})),e.savePost=function(i){i=i||{};var o=this,c=arguments;return new Promise((function(n,o){return i.isAutosave||i.isPreview?n("Validation ignored (autosave)."):s?void(acf.validateForm({form:t("#editor"),reset:!0,complete:function(t,i){e.unlockPostSaving("acf")},failure:function(t,i){var n=i.get("notice");a.createErrorNotice(n.get("text"),{id:"acf-validation",isDismissible:!0}),n.remove(),r&&e.editPost({status:r}),o("Validation failed.")},success:function(){a.removeNotice("acf-validation"),n("Validation success.")}})?n("Validation bypassed."):e.lockPostSaving("acf")):n("Validation ignored (draft).");var c})).then((function(){return n.apply(o,c)}))}}})}(jQuery),function(t,e){var i=new acf.Model({priority:90,actions:{new_field:"refresh",show_field:"refresh",hide_field:"refresh",remove_field:"refresh",unmount_field:"refresh",remount_field:"refresh"},refresh:function(){acf.refresh()}}),a=new acf.Model({priority:1,actions:{sortstart:"onSortstart",sortstop:"onSortstop"},onSortstart:function(t){acf.doAction("unmount",t)},onSortstop:function(t){acf.doAction("remount",t)}}),n=new acf.Model({actions:{sortstart:"onSortstart"},onSortstart:function(e,i){e.is("tr")&&(i.html(' '),e.addClass("acf-sortable-tr-helper"),e.children().each((function(){t(this).width(t(this).width())})),i.height(e.height()+"px"),e.removeClass("acf-sortable-tr-helper"))}}),s=new acf.Model({actions:{after_duplicate:"onAfterDuplicate"},onAfterDuplicate:function(e,i){var a=[];e.find("select").each((function(e){a.push(t(this).val())})),i.find("select").each((function(e){t(this).val(a[e])}))}}),r=new acf.Model({id:"tableHelper",priority:20,actions:{refresh:"renderTables"},renderTables:function(e){var i=this;t(".acf-table:visible").each((function(){i.renderTable(t(this))}))},renderTable:function(e){var i=e.find("> thead > tr:visible > th[data-key]"),a=e.find("> tbody > tr:visible > td[data-key]");if(!i.length||!a.length)return!1;i.each((function(e){var i=t(this),n=i.data("key"),s=a.filter('[data-key="'+n+'"]'),r=s.filter(".acf-hidden");s.removeClass("acf-empty"),s.length===r.length?acf.hide(i):(acf.show(i),r.addClass("acf-empty"))})),i.css("width","auto"),i=i.not(".acf-hidden");var n=100,s=i.length,r;i.filter("[data-width]").each((function(){var e=t(this).data("width");t(this).css("width",e+"%"),n-=e}));var o=i.not("[data-width]");if(o.length){var c=n/o.length;o.css("width",c+"%"),n=0}n>0&&i.last().css("width","auto"),a.filter(".-collapsed-target").each((function(){var e=t(this);e.parent().hasClass("-collapsed")?e.attr("colspan",i.length):e.removeAttr("colspan")}))}}),o=new acf.Model({id:"fieldsHelper",priority:30,actions:{refresh:"renderGroups"},renderGroups:function(){var e=this;t(".acf-fields:visible").each((function(){e.renderGroup(t(this))}))},renderGroup:function(e){var i=0,a=0,n=t(),s=e.children(".acf-field[data-width]:visible");return!!s.length&&(e.hasClass("-left")?(s.removeAttr("data-width"),s.css("width","auto"),!1):(s.removeClass("-r0 -c0").css({"min-height":0}),s.each((function(e){var s=t(this),r=s.position(),o=Math.ceil(r.top),c=Math.ceil(r.left);n.length&&o>i&&(n.css({"min-height":a+"px"}),r=s.position(),o=Math.ceil(r.top),c=Math.ceil(r.left),i=0,a=0,n=t()),acf.get("rtl")&&(c=Math.ceil(s.parent().width()-(r.left+s.outerWidth()))),0==o?s.addClass("-r0"):0==c&&s.addClass("-c0");var l=Math.ceil(s.outerHeight())+1;a=Math.max(a,l),i=Math.max(i,o),n=n.add(s)})),void(n.length&&n.css({"min-height":a+"px"}))))}}),c=new acf.Model({id:"bodyClassShiftHelper",events:{keydown:"onKeyDown",keyup:"onKeyUp"},isShiftKey:function(t){return 16===t.keyCode},onKeyDown:function(e){this.isShiftKey(e)&&t("body").addClass("acf-keydown-shift")},onKeyUp:function(e){this.isShiftKey(e)&&t("body").removeClass("acf-keydown-shift")}})}(jQuery),function(t,e){acf.newCompatibility=function(t,e){return(e=e||{}).__proto__=t.__proto__,t.__proto__=e,t.compatibility=e,e},acf.getCompatibility=function(t){return t.compatibility||null};var i=acf.newCompatibility(acf,{l10n:{},o:{},fields:{},update:acf.set,add_action:acf.addAction,remove_action:acf.removeAction,do_action:acf.doAction,add_filter:acf.addFilter,remove_filter:acf.removeFilter,apply_filters:acf.applyFilters,parse_args:acf.parseArgs,disable_el:acf.disable,disable_form:acf.disable,enable_el:acf.enable,enable_form:acf.enable,update_user_setting:acf.updateUserSetting,prepare_for_ajax:acf.prepareForAjax,is_ajax_success:acf.isAjaxSuccess,remove_el:acf.remove,remove_tr:acf.remove,str_replace:acf.strReplace,render_select:acf.renderSelect,get_uniqid:acf.uniqid,serialize_form:acf.serialize,esc_html:acf.strEscape,str_sanitize:acf.strSanitize});i._e=function(t,e){t=t||"";var i=(e=e||"")?t+"."+e:t,a={"image.select":"Select Image","image.edit":"Edit Image","image.update":"Update Image"};if(a[i])return acf.__(a[i]);var n=this.l10n[t]||"";return e&&(n=n[e]||""),n},i.get_selector=function(e){var i=".acf-field";if(!e)return i;if(t.isPlainObject(e)){if(t.isEmptyObject(e))return i;for(var a in e){e=e[a];break}}return i+="-"+e,i=acf.strReplace("_","-",i),i=acf.strReplace("field-field-","field-",i)},i.get_fields=function(t,e,i){var a={is:t||"",parent:e||!1,suppressFilters:i||!1};return a.is&&(a.is=this.get_selector(a.is)),acf.findFields(a)},i.get_field=function(t,e){var i=this.get_fields.apply(this,arguments);return!!i.length&&i.first()},i.get_closest_field=function(t,e){return t.closest(this.get_selector(e))},i.get_field_wrap=function(t){return t.closest(this.get_selector())},i.get_field_key=function(t){return t.data("key")},i.get_field_type=function(t){return t.data("type")},i.get_data=function(t,e){return acf.parseArgs(t.data(),e)},i.maybe_get=function(t,e,i){void 0===i&&(i=null),keys=String(e).split(".");for(var a=0;a1){for(var c=0;c0?e.substr(0,n):e,r=n>0?e.substr(n+1):"",o=function(e){e.$el=t(this),acf.field_group&&(e.$field=e.$el.closest(".acf-field-object")),"function"==typeof a.event&&(e=a.event(e)),a[i].apply(a,arguments)};r?t(document).on(s,r,o):t(document).on(s,o)},get:function(t,e){return e=e||null,void 0!==this[t]&&(e=this[t]),e},set:function(t,e){return this[t]=e,"function"==typeof this["_set_"+t]&&this["_set_"+t].apply(this),this}},
+i.field=acf.model.extend({type:"",o:{},$field:null,_add_action:function(t,e){var i=this;t=t+"_field/type="+i.type,acf.add_action(t,(function(t){i.set("$field",t),i[e].apply(i,arguments)}))},_add_filter:function(t,e){var i=this;t=t+"_field/type="+i.type,acf.add_filter(t,(function(t){i.set("$field",t),i[e].apply(i,arguments)}))},_add_event:function(e,i){var a=this,n=e.substr(0,e.indexOf(" ")),s=e.substr(e.indexOf(" ")+1),r=acf.get_selector(a.type);t(document).on(n,r+" "+s,(function(e){var n=t(this),s=acf.get_closest_field(n,a.type);s.length&&(s.is(a.$field)||a.set("$field",s),e.$el=n,e.$field=s,a[i].apply(a,[e]))}))},_set_$field:function(){"function"==typeof this.focus&&this.focus()},doFocus:function(t){return this.set("$field",t)}});var r=acf.newCompatibility(acf.validation,{remove_error:function(t){acf.getField(t).removeError()},add_warning:function(t,e){acf.getField(t).showNotice({text:e,type:"warning",timeout:1e3})},fetch:acf.validateForm,enableSubmit:acf.enableSubmit,disableSubmit:acf.disableSubmit,showSpinner:acf.showSpinner,hideSpinner:acf.hideSpinner,unlockForm:acf.unlockForm,lockForm:acf.lockForm});i.tooltip={tooltip:function(t,e){var i;return acf.newTooltip({text:t,target:e}).$el},temp:function(t,e){var i=acf.newTooltip({text:t,target:e,timeout:250})},confirm:function(t,e,i,a,n){var s=acf.newTooltip({confirm:!0,text:i,target:t,confirm:function(){e(!0)},cancel:function(){e(!1)}})},confirm_remove:function(t,e){var i=acf.newTooltip({confirmRemove:!0,target:t,confirm:function(){e(!0)},cancel:function(){e(!1)}})}},i.media=new acf.Model({activeFrame:!1,actions:{new_media_popup:"onNewMediaPopup"},frame:function(){return this.activeFrame},onNewMediaPopup:function(t){this.activeFrame=t.frame},popup:function(t){var e;return t.mime_types&&(t.allowedTypes=t.mime_types),t.id&&(t.attachment=t.id),acf.newMediaPopup(t).frame}}),i.select2={init:function(t,e,i){return e.allow_null&&(e.allowNull=e.allow_null),e.ajax_action&&(e.ajaxAction=e.ajax_action),i&&(e.field=acf.getField(i)),acf.newSelect2(t,e)},destroy:function(t){return acf.getInstance(t).destroy()}},i.postbox={render:function(t){return t.edit_url&&(t.editLink=t.edit_url),t.edit_title&&(t.editTitle=t.edit_title),acf.newPostbox(t)}},acf.newCompatibility(acf.screen,{update:function(){return this.set.apply(this,arguments)},fetch:acf.screen.check}),i.ajax=acf.screen}(jQuery);
\ No newline at end of file
diff --git a/assets/js/acf.js b/assets/js/acf.js
new file mode 100644
index 0000000..fa2f4a9
--- /dev/null
+++ b/assets/js/acf.js
@@ -0,0 +1,4447 @@
+(function($, undefined){
+
+ /**
+ * acf
+ *
+ * description
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ // The global acf object
+ var acf = {};
+
+ // Set as a browser global
+ window.acf = acf;
+
+ /** @var object Data sent from PHP */
+ acf.data = {};
+
+
+ /**
+ * get
+ *
+ * Gets a specific data value
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param string name
+ * @return mixed
+ */
+
+ acf.get = function( name ){
+ return this.data[name] || null;
+ };
+
+
+ /**
+ * has
+ *
+ * Returns `true` if the data exists and is not null
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param string name
+ * @return boolean
+ */
+
+ acf.has = function( name ){
+ return this.get(name) !== null;
+ };
+
+
+ /**
+ * set
+ *
+ * Sets a specific data value
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param string name
+ * @param mixed value
+ * @return this
+ */
+
+ acf.set = function( name, value ){
+ this.data[ name ] = value;
+ return this;
+ };
+
+
+ /**
+ * uniqueId
+ *
+ * Returns a unique ID
+ *
+ * @date 9/11/17
+ * @since 5.6.3
+ *
+ * @param string prefix Optional prefix.
+ * @return string
+ */
+
+ var idCounter = 0;
+ acf.uniqueId = function(prefix){
+ var id = ++idCounter + '';
+ return prefix ? prefix + id : id;
+ };
+
+ /**
+ * acf.uniqueArray
+ *
+ * Returns a new array with only unique values
+ * Credit: https://stackoverflow.com/questions/1960473/get-all-unique-values-in-an-array-remove-duplicates
+ *
+ * @date 23/3/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.uniqueArray = function( array ){
+ function onlyUnique(value, index, self) {
+ return self.indexOf(value) === index;
+ }
+ return array.filter( onlyUnique );
+ };
+
+ /**
+ * uniqid
+ *
+ * Returns a unique ID (PHP version)
+ *
+ * @date 9/11/17
+ * @since 5.6.3
+ * @source http://locutus.io/php/misc/uniqid/
+ *
+ * @param string prefix Optional prefix.
+ * @return string
+ */
+
+ var uniqidSeed = '';
+ acf.uniqid = function(prefix, moreEntropy){
+ // discuss at: http://locutus.io/php/uniqid/
+ // original by: Kevin van Zonneveld (http://kvz.io)
+ // revised by: Kankrelune (http://www.webfaktory.info/)
+ // note 1: Uses an internal counter (in locutus global) to avoid collision
+ // example 1: var $id = uniqid()
+ // example 1: var $result = $id.length === 13
+ // returns 1: true
+ // example 2: var $id = uniqid('foo')
+ // example 2: var $result = $id.length === (13 + 'foo'.length)
+ // returns 2: true
+ // example 3: var $id = uniqid('bar', true)
+ // example 3: var $result = $id.length === (23 + 'bar'.length)
+ // returns 3: true
+ if (typeof prefix === 'undefined') {
+ prefix = '';
+ }
+
+ var retId;
+ var formatSeed = function(seed, reqWidth) {
+ seed = parseInt(seed, 10).toString(16); // to hex str
+ if (reqWidth < seed.length) { // so long we split
+ return seed.slice(seed.length - reqWidth);
+ }
+ if (reqWidth > seed.length) { // so short we pad
+ return Array(1 + (reqWidth - seed.length)).join('0') + seed;
+ }
+ return seed;
+ };
+
+ if (!uniqidSeed) { // init seed with big random int
+ uniqidSeed = Math.floor(Math.random() * 0x75bcd15);
+ }
+ uniqidSeed++;
+
+ retId = prefix; // start with prefix, add current milliseconds hex string
+ retId += formatSeed(parseInt(new Date().getTime() / 1000, 10), 8);
+ retId += formatSeed(uniqidSeed, 5); // add seed hex string
+ if (moreEntropy) {
+ // for more entropy we add a float lower to 10
+ retId += (Math.random() * 10).toFixed(8).toString();
+ }
+
+ return retId;
+ };
+
+
+ /**
+ * strReplace
+ *
+ * Performs a string replace
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param string search
+ * @param string replace
+ * @param string subject
+ * @return string
+ */
+
+ acf.strReplace = function( search, replace, subject ){
+ return subject.split(search).join(replace);
+ };
+
+
+ /**
+ * strCamelCase
+ *
+ * Converts a string into camelCase
+ * Thanks to https://stackoverflow.com/questions/2970525/converting-any-string-into-camel-case
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param string str
+ * @return string
+ */
+
+ acf.strCamelCase = function( str ){
+ var matches = str.match( /([a-zA-Z0-9]+)/g );
+ return matches ? matches.map(function( s, i ){
+ var c = s.charAt(0);
+ return ( i === 0 ? c.toLowerCase() : c.toUpperCase() ) + s.slice(1);
+ }).join('') : '';
+ };
+
+ /**
+ * strPascalCase
+ *
+ * Converts a string into PascalCase
+ * Thanks to https://stackoverflow.com/questions/1026069/how-do-i-make-the-first-letter-of-a-string-uppercase-in-javascript
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param string str
+ * @return string
+ */
+
+ acf.strPascalCase = function( str ){
+ var camel = acf.strCamelCase( str );
+ return camel.charAt(0).toUpperCase() + camel.slice(1);
+ };
+
+ /**
+ * acf.strSlugify
+ *
+ * Converts a string into a HTML class friendly slug
+ *
+ * @date 21/3/18
+ * @since 5.6.9
+ *
+ * @param string str
+ * @return string
+ */
+
+ acf.strSlugify = function( str ){
+ return acf.strReplace( '_', '-', str.toLowerCase() );
+ };
+
+
+ acf.strSanitize = function( str ){
+
+ // chars (https://jsperf.com/replace-foreign-characters)
+ var map = {
+ "À": "A",
+ "Á": "A",
+ "Â": "A",
+ "Ã": "A",
+ "Ä": "A",
+ "Å": "A",
+ "Æ": "AE",
+ "Ç": "C",
+ "È": "E",
+ "É": "E",
+ "Ê": "E",
+ "Ë": "E",
+ "Ì": "I",
+ "Í": "I",
+ "Î": "I",
+ "Ï": "I",
+ "Ð": "D",
+ "Ñ": "N",
+ "Ò": "O",
+ "Ó": "O",
+ "Ô": "O",
+ "Õ": "O",
+ "Ö": "O",
+ "Ø": "O",
+ "Ù": "U",
+ "Ú": "U",
+ "Û": "U",
+ "Ü": "U",
+ "Ý": "Y",
+ "ß": "s",
+ "à": "a",
+ "á": "a",
+ "â": "a",
+ "ã": "a",
+ "ä": "a",
+ "å": "a",
+ "æ": "ae",
+ "ç": "c",
+ "è": "e",
+ "é": "e",
+ "ê": "e",
+ "ë": "e",
+ "ì": "i",
+ "í": "i",
+ "î": "i",
+ "ï": "i",
+ "ñ": "n",
+ "ò": "o",
+ "ó": "o",
+ "ô": "o",
+ "õ": "o",
+ "ö": "o",
+ "ø": "o",
+ "ù": "u",
+ "ú": "u",
+ "û": "u",
+ "ü": "u",
+ "ý": "y",
+ "ÿ": "y",
+ "Ā": "A",
+ "ā": "a",
+ "Ă": "A",
+ "ă": "a",
+ "Ą": "A",
+ "ą": "a",
+ "Ć": "C",
+ "ć": "c",
+ "Ĉ": "C",
+ "ĉ": "c",
+ "Ċ": "C",
+ "ċ": "c",
+ "Č": "C",
+ "č": "c",
+ "Ď": "D",
+ "ď": "d",
+ "Đ": "D",
+ "đ": "d",
+ "Ē": "E",
+ "ē": "e",
+ "Ĕ": "E",
+ "ĕ": "e",
+ "Ė": "E",
+ "ė": "e",
+ "Ę": "E",
+ "ę": "e",
+ "Ě": "E",
+ "ě": "e",
+ "Ĝ": "G",
+ "ĝ": "g",
+ "Ğ": "G",
+ "ğ": "g",
+ "Ġ": "G",
+ "ġ": "g",
+ "Ģ": "G",
+ "ģ": "g",
+ "Ĥ": "H",
+ "ĥ": "h",
+ "Ħ": "H",
+ "ħ": "h",
+ "Ĩ": "I",
+ "ĩ": "i",
+ "Ī": "I",
+ "ī": "i",
+ "Ĭ": "I",
+ "ĭ": "i",
+ "Į": "I",
+ "į": "i",
+ "İ": "I",
+ "ı": "i",
+ "IJ": "IJ",
+ "ij": "ij",
+ "Ĵ": "J",
+ "ĵ": "j",
+ "Ķ": "K",
+ "ķ": "k",
+ "Ĺ": "L",
+ "ĺ": "l",
+ "Ļ": "L",
+ "ļ": "l",
+ "Ľ": "L",
+ "ľ": "l",
+ "Ŀ": "L",
+ "ŀ": "l",
+ "Ł": "l",
+ "ł": "l",
+ "Ń": "N",
+ "ń": "n",
+ "Ņ": "N",
+ "ņ": "n",
+ "Ň": "N",
+ "ň": "n",
+ "ʼn": "n",
+ "Ō": "O",
+ "ō": "o",
+ "Ŏ": "O",
+ "ŏ": "o",
+ "Ő": "O",
+ "ő": "o",
+ "Œ": "OE",
+ "œ": "oe",
+ "Ŕ": "R",
+ "ŕ": "r",
+ "Ŗ": "R",
+ "ŗ": "r",
+ "Ř": "R",
+ "ř": "r",
+ "Ś": "S",
+ "ś": "s",
+ "Ŝ": "S",
+ "ŝ": "s",
+ "Ş": "S",
+ "ş": "s",
+ "Š": "S",
+ "š": "s",
+ "Ţ": "T",
+ "ţ": "t",
+ "Ť": "T",
+ "ť": "t",
+ "Ŧ": "T",
+ "ŧ": "t",
+ "Ũ": "U",
+ "ũ": "u",
+ "Ū": "U",
+ "ū": "u",
+ "Ŭ": "U",
+ "ŭ": "u",
+ "Ů": "U",
+ "ů": "u",
+ "Ű": "U",
+ "ű": "u",
+ "Ų": "U",
+ "ų": "u",
+ "Ŵ": "W",
+ "ŵ": "w",
+ "Ŷ": "Y",
+ "ŷ": "y",
+ "Ÿ": "Y",
+ "Ź": "Z",
+ "ź": "z",
+ "Ż": "Z",
+ "ż": "z",
+ "Ž": "Z",
+ "ž": "z",
+ "ſ": "s",
+ "ƒ": "f",
+ "Ơ": "O",
+ "ơ": "o",
+ "Ư": "U",
+ "ư": "u",
+ "Ǎ": "A",
+ "ǎ": "a",
+ "Ǐ": "I",
+ "ǐ": "i",
+ "Ǒ": "O",
+ "ǒ": "o",
+ "Ǔ": "U",
+ "ǔ": "u",
+ "Ǖ": "U",
+ "ǖ": "u",
+ "Ǘ": "U",
+ "ǘ": "u",
+ "Ǚ": "U",
+ "ǚ": "u",
+ "Ǜ": "U",
+ "ǜ": "u",
+ "Ǻ": "A",
+ "ǻ": "a",
+ "Ǽ": "AE",
+ "ǽ": "ae",
+ "Ǿ": "O",
+ "ǿ": "o",
+
+ // extra
+ ' ': '_',
+ "'": '',
+ '?': '',
+ '/': '',
+ '\\': '',
+ '.': '',
+ ',': '',
+ '`': '',
+ '>': '',
+ '<': '',
+ '"': '',
+ '[': '',
+ ']': '',
+ '|': '',
+ '{': '',
+ '}': '',
+ '(': '',
+ ')': ''
+ };
+
+ // vars
+ var nonWord = /\W/g;
+ var mapping = function (c) {
+ return (map[c] !== undefined) ? map[c] : c;
+ };
+
+ // replace
+ str = str.replace(nonWord, mapping);
+
+ // lowercase
+ str = str.toLowerCase();
+
+ // return
+ return str;
+ };
+
+ /**
+ * acf.strMatch
+ *
+ * Returns the number of characters that match between two strings
+ *
+ * @date 1/2/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.strMatch = function( s1, s2 ){
+
+ // vars
+ var val = 0;
+ var min = Math.min( s1.length, s2.length );
+
+ // loop
+ for( var i = 0; i < min; i++ ) {
+ if( s1[i] !== s2[i] ) {
+ break;
+ }
+ val++;
+ }
+
+ // return
+ return val;
+ };
+
+ /**
+ * Escapes HTML entities from a string.
+ *
+ * @date 08/06/2020
+ * @since 5.9.0
+ *
+ * @param string string The input string.
+ * @return string
+ */
+ acf.strEscape = function( string ){
+ var htmlEscapes = {
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ "'": '''
+ };
+ return ('' + string).replace(/[&<>"']/g, function( chr ) {
+ return htmlEscapes[ chr ];
+ });
+ };
+
+ // Tests.
+ //console.log( acf.strEscape('Test 1') );
+ //console.log( acf.strEscape('Test & 1') );
+ //console.log( acf.strEscape('Test\'s & 1') );
+ //console.log( acf.strEscape('') );
+
+ /**
+ * Unescapes HTML entities from a string.
+ *
+ * @date 08/06/2020
+ * @since 5.9.0
+ *
+ * @param string string The input string.
+ * @return string
+ */
+ acf.strUnescape = function( string ){
+ var htmlUnescapes = {
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ ''': "'"
+ };
+ return ('' + string).replace(/&|<|>|"|'/g, function( entity ) {
+ return htmlUnescapes[ entity ];
+ });
+ };
+
+ // Tests.
+ //console.log( acf.strUnescape( acf.strEscape('Test 1') ) );
+ //console.log( acf.strUnescape( acf.strEscape('Test & 1') ) );
+ //console.log( acf.strUnescape( acf.strEscape('Test\'s & 1') ) );
+ //console.log( acf.strUnescape( acf.strEscape('') ) );
+
+ /**
+ * Escapes HTML entities from a string.
+ *
+ * @date 08/06/2020
+ * @since 5.9.0
+ *
+ * @param string string The input string.
+ * @return string
+ */
+ acf.escAttr = acf.strEscape;
+
+ /**
+ * Encodes ') );
+ //console.log( acf.escHtml( acf.strEscape('') ) );
+ //console.log( acf.escHtml( '' ) );
+
+ /**
+ * acf.decode
+ *
+ * description
+ *
+ * @date 13/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.decode = function( string ){
+ return $('').html( string ).text();
+ };
+
+
+
+ /**
+ * parseArgs
+ *
+ * Merges together defaults and args much like the WP wp_parse_args function
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param object args
+ * @param object defaults
+ * @return object
+ */
+
+ acf.parseArgs = function( args, defaults ){
+ if( typeof args !== 'object' ) args = {};
+ if( typeof defaults !== 'object' ) defaults = {};
+ return $.extend({}, defaults, args);
+ }
+
+ /**
+ * __
+ *
+ * Retrieve the translation of $text.
+ *
+ * @date 16/4/18
+ * @since 5.6.9
+ *
+ * @param string text Text to translate.
+ * @return string Translated text.
+ */
+
+ if( window.acfL10n == undefined ) {
+ acfL10n = {};
+ }
+
+ acf.__ = function( text ){
+ return acfL10n[ text ] || text;
+ };
+
+ /**
+ * _x
+ *
+ * Retrieve translated string with gettext context.
+ *
+ * @date 16/4/18
+ * @since 5.6.9
+ *
+ * @param string text Text to translate.
+ * @param string context Context information for the translators.
+ * @return string Translated text.
+ */
+
+ acf._x = function( text, context ){
+ return acfL10n[ text + '.' + context ] || acfL10n[ text ] || text;
+ };
+
+ /**
+ * _n
+ *
+ * Retrieve the plural or single form based on the amount.
+ *
+ * @date 16/4/18
+ * @since 5.6.9
+ *
+ * @param string single Single text to translate.
+ * @param string plural Plural text to translate.
+ * @param int number The number to compare against.
+ * @return string Translated text.
+ */
+
+ acf._n = function( single, plural, number ){
+ if( number == 1 ) {
+ return acf.__(single);
+ } else {
+ return acf.__(plural);
+ }
+ };
+
+ acf.isArray = function( a ){
+ return Array.isArray(a);
+ };
+
+ acf.isObject = function( a ){
+ return ( typeof a === 'object' );
+ }
+
+ /**
+ * serialize
+ *
+ * description
+ *
+ * @date 24/12/17
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ var buildObject = function( obj, name, value ){
+
+ // replace [] with placeholder
+ name = name.replace('[]', '[%%index%%]');
+
+ // vars
+ var keys = name.match(/([^\[\]])+/g);
+ if( !keys ) return;
+ var length = keys.length;
+ var ref = obj;
+
+ // loop
+ for( var i = 0; i < length; i++ ) {
+
+ // vars
+ var key = String( keys[i] );
+
+ // value
+ if( i == length - 1 ) {
+
+ // %%index%%
+ if( key === '%%index%%' ) {
+ ref.push( value );
+
+ // default
+ } else {
+ ref[ key ] = value;
+ }
+
+ // path
+ } else {
+
+ // array
+ if( keys[i+1] === '%%index%%' ) {
+ if( !acf.isArray(ref[ key ]) ) {
+ ref[ key ] = [];
+ }
+
+ // object
+ } else {
+ if( !acf.isObject(ref[ key ]) ) {
+ ref[ key ] = {};
+ }
+ }
+
+ // crawl
+ ref = ref[ key ];
+ }
+ }
+ };
+
+ acf.serialize = function( $el, prefix ){
+
+ // vars
+ var obj = {};
+ var inputs = acf.serializeArray( $el );
+
+ // prefix
+ if( prefix !== undefined ) {
+
+ // filter and modify
+ inputs = inputs.filter(function( item ){
+ return item.name.indexOf(prefix) === 0;
+ }).map(function( item ){
+ item.name = item.name.slice(prefix.length);
+ return item;
+ });
+ }
+
+ // loop
+ for( var i = 0; i < inputs.length; i++ ) {
+ buildObject( obj, inputs[i].name, inputs[i].value );
+ }
+
+ // return
+ return obj;
+ };
+
+ /**
+ * acf.serializeArray
+ *
+ * Similar to $.serializeArray() but works with a parent wrapping element.
+ *
+ * @date 19/8/18
+ * @since 5.7.3
+ *
+ * @param jQuery $el The element or form to serialize.
+ * @return array
+ */
+
+ acf.serializeArray = function( $el ){
+ return $el.find('select, textarea, input').serializeArray();
+ }
+
+ /**
+ * acf.serializeForAjax
+ *
+ * Returns an object containing name => value data ready to be encoded for Ajax.
+ *
+ * @date 17/12/18
+ * @since 5.8.0
+ *
+ * @param jQUery $el The element or form to serialize.
+ * @return object
+ */
+ acf.serializeForAjax = function( $el ){
+
+ // vars
+ var data = {};
+ var index = {};
+
+ // Serialize inputs.
+ var inputs = acf.serializeArray( $el );
+
+ // Loop over inputs and build data.
+ inputs.map(function( item ){
+
+ // Append to array.
+ if( item.name.slice(-2) === '[]' ) {
+ data[ item.name ] = data[ item.name ] || [];
+ data[ item.name ].push( item.value );
+ // Append
+ } else {
+ data[ item.name ] = item.value;
+ }
+ });
+
+ // return
+ return data;
+ };
+
+ /**
+ * addAction
+ *
+ * Wrapper for acf.hooks.addAction
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param n/a
+ * @return this
+ */
+
+/*
+ var prefixAction = function( action ){
+ return 'acf_' + action;
+ }
+*/
+
+ acf.addAction = function( action, callback, priority, context ){
+ //action = prefixAction(action);
+ acf.hooks.addAction.apply(this, arguments);
+ return this;
+ };
+
+
+ /**
+ * removeAction
+ *
+ * Wrapper for acf.hooks.removeAction
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param n/a
+ * @return this
+ */
+
+ acf.removeAction = function( action, callback ){
+ //action = prefixAction(action);
+ acf.hooks.removeAction.apply(this, arguments);
+ return this;
+ };
+
+
+ /**
+ * doAction
+ *
+ * Wrapper for acf.hooks.doAction
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param n/a
+ * @return this
+ */
+
+ var actionHistory = {};
+ //var currentAction = false;
+ acf.doAction = function( action ){
+ //action = prefixAction(action);
+ //currentAction = action;
+ actionHistory[ action ] = 1;
+ acf.hooks.doAction.apply(this, arguments);
+ actionHistory[ action ] = 0;
+ return this;
+ };
+
+
+ /**
+ * doingAction
+ *
+ * Return true if doing action
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param n/a
+ * @return this
+ */
+
+ acf.doingAction = function( action ){
+ //action = prefixAction(action);
+ return (actionHistory[ action ] === 1);
+ };
+
+
+ /**
+ * didAction
+ *
+ * Wrapper for acf.hooks.doAction
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param n/a
+ * @return this
+ */
+
+ acf.didAction = function( action ){
+ //action = prefixAction(action);
+ return (actionHistory[ action ] !== undefined);
+ };
+
+ /**
+ * currentAction
+ *
+ * Wrapper for acf.hooks.doAction
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param n/a
+ * @return this
+ */
+
+ acf.currentAction = function(){
+ for( var k in actionHistory ) {
+ if( actionHistory[k] ) {
+ return k;
+ }
+ }
+ return false;
+ };
+
+ /**
+ * addFilter
+ *
+ * Wrapper for acf.hooks.addFilter
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param n/a
+ * @return this
+ */
+
+ acf.addFilter = function( action ){
+ //action = prefixAction(action);
+ acf.hooks.addFilter.apply(this, arguments);
+ return this;
+ };
+
+
+ /**
+ * removeFilter
+ *
+ * Wrapper for acf.hooks.removeFilter
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param n/a
+ * @return this
+ */
+
+ acf.removeFilter = function( action ){
+ //action = prefixAction(action);
+ acf.hooks.removeFilter.apply(this, arguments);
+ return this;
+ };
+
+
+ /**
+ * applyFilters
+ *
+ * Wrapper for acf.hooks.applyFilters
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param n/a
+ * @return this
+ */
+
+ acf.applyFilters = function( action ){
+ //action = prefixAction(action);
+ return acf.hooks.applyFilters.apply(this, arguments);
+ };
+
+
+ /**
+ * getArgs
+ *
+ * description
+ *
+ * @date 15/12/17
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.arrayArgs = function( args ){
+ return Array.prototype.slice.call( args );
+ };
+
+
+ /**
+ * extendArgs
+ *
+ * description
+ *
+ * @date 15/12/17
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+/*
+ acf.extendArgs = function( ){
+ var args = Array.prototype.slice.call( arguments );
+ var realArgs = args.shift();
+
+ Array.prototype.push.call(arguments, 'bar')
+ return Array.prototype.push.apply( args, arguments );
+ };
+*/
+
+ // Preferences
+ // - use try/catch to avoid JS error if cookies are disabled on front-end form
+ try {
+ var preferences = JSON.parse(localStorage.getItem('acf')) || {};
+ } catch(e) {
+ var preferences = {};
+ }
+
+
+ /**
+ * getPreferenceName
+ *
+ * Gets the true preference name.
+ * Converts "this.thing" to "thing-123" if editing post 123.
+ *
+ * @date 11/11/17
+ * @since 5.6.5
+ *
+ * @param string name
+ * @return string
+ */
+
+ var getPreferenceName = function( name ){
+ if( name.substr(0, 5) === 'this.' ) {
+ name = name.substr(5) + '-' + acf.get('post_id');
+ }
+ return name;
+ };
+
+
+ /**
+ * acf.getPreference
+ *
+ * Gets a preference setting or null if not set.
+ *
+ * @date 11/11/17
+ * @since 5.6.5
+ *
+ * @param string name
+ * @return mixed
+ */
+
+ acf.getPreference = function( name ){
+ name = getPreferenceName( name );
+ return preferences[ name ] || null;
+ }
+
+
+ /**
+ * acf.setPreference
+ *
+ * Sets a preference setting.
+ *
+ * @date 11/11/17
+ * @since 5.6.5
+ *
+ * @param string name
+ * @param mixed value
+ * @return n/a
+ */
+
+ acf.setPreference = function( name, value ){
+ name = getPreferenceName( name );
+ if( value === null ) {
+ delete preferences[ name ];
+ } else {
+ preferences[ name ] = value;
+ }
+ localStorage.setItem('acf', JSON.stringify(preferences));
+ }
+
+
+ /**
+ * acf.removePreference
+ *
+ * Removes a preference setting.
+ *
+ * @date 11/11/17
+ * @since 5.6.5
+ *
+ * @param string name
+ * @return n/a
+ */
+
+ acf.removePreference = function( name ){
+ acf.setPreference(name, null);
+ };
+
+
+ /**
+ * remove
+ *
+ * Removes an element with fade effect
+ *
+ * @date 1/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.remove = function( props ){
+
+ // allow jQuery
+ if( props instanceof jQuery ) {
+ props = {
+ target: props
+ };
+ }
+
+ // defaults
+ props = acf.parseArgs(props, {
+ target: false,
+ endHeight: 0,
+ complete: function(){}
+ });
+
+ // action
+ acf.doAction('remove', props.target);
+
+ // tr
+ if( props.target.is('tr') ) {
+ removeTr( props );
+
+ // div
+ } else {
+ removeDiv( props );
+ }
+
+ };
+
+ /**
+ * removeDiv
+ *
+ * description
+ *
+ * @date 16/2/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ var removeDiv = function( props ){
+
+ // vars
+ var $el = props.target;
+ var height = $el.height();
+ var width = $el.width();
+ var margin = $el.css('margin');
+ var outerHeight = $el.outerHeight(true);
+ var style = $el.attr('style') + ''; // needed to copy
+
+ // wrap
+ $el.wrap('
');
+ var $wrap = $el.parent();
+
+ // set pos
+ $el.css({
+ height: height,
+ width: width,
+ margin: margin,
+ position: 'absolute'
+ });
+
+ // fade wrap
+ setTimeout(function(){
+
+ $wrap.css({
+ opacity: 0,
+ height: props.endHeight
+ });
+
+ }, 50);
+
+ // remove
+ setTimeout(function(){
+
+ $el.attr('style', style);
+ $wrap.remove();
+ props.complete();
+
+ }, 301);
+ };
+
+ /**
+ * removeTr
+ *
+ * description
+ *
+ * @date 16/2/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ var removeTr = function( props ){
+
+ // vars
+ var $tr = props.target;
+ var height = $tr.height();
+ var children = $tr.children().length;
+
+ // create dummy td
+ var $td = $(' ');
+
+ // fade away tr
+ $tr.addClass('acf-remove-element');
+
+ // update HTML after fade animation
+ setTimeout(function(){
+ $tr.html( $td );
+ }, 251);
+
+ // allow .acf-temp-remove to exist before changing CSS
+ setTimeout(function(){
+
+ // remove class
+ $tr.removeClass('acf-remove-element');
+
+ // collapse
+ $td.css({
+ height: props.endHeight
+ });
+
+ }, 300);
+
+ // remove
+ setTimeout(function(){
+
+ $tr.remove();
+ props.complete();
+
+ }, 451);
+ };
+
+ /**
+ * duplicate
+ *
+ * description
+ *
+ * @date 3/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.duplicate = function( args ){
+
+ // allow jQuery
+ if( args instanceof jQuery ) {
+ args = {
+ target: args
+ };
+ }
+
+ // defaults
+ args = acf.parseArgs(args, {
+ target: false,
+ search: '',
+ replace: '',
+ rename: true,
+ before: function( $el ){},
+ after: function( $el, $el2 ){},
+ append: function( $el, $el2 ){
+ $el.after( $el2 );
+ }
+ });
+
+ // compatibility
+ args.target = args.target || args.$el;
+
+ // vars
+ var $el = args.target;
+
+ // search
+ args.search = args.search || $el.attr('data-id');
+ args.replace = args.replace || acf.uniqid();
+
+ // before
+ // - allow acf to modify DOM
+ // - fixes bug where select field option is not selected
+ args.before( $el );
+ acf.doAction('before_duplicate', $el);
+
+ // clone
+ var $el2 = $el.clone();
+
+ // rename
+ if( args.rename ) {
+ acf.rename({
+ target: $el2,
+ search: args.search,
+ replace: args.replace,
+ replacer: ( typeof args.rename === 'function' ? args.rename : null )
+ });
+ }
+
+ // remove classes
+ $el2.removeClass('acf-clone');
+ $el2.find('.ui-sortable').removeClass('ui-sortable');
+
+ // after
+ // - allow acf to modify DOM
+ args.after( $el, $el2 );
+ acf.doAction('after_duplicate', $el, $el2 );
+
+ // append
+ args.append( $el, $el2 );
+
+ /**
+ * Fires after an element has been duplicated and appended to the DOM.
+ *
+ * @date 30/10/19
+ * @since 5.8.7
+ *
+ * @param jQuery $el The original element.
+ * @param jQuery $el2 The duplicated element.
+ */
+ acf.doAction('duplicate', $el, $el2 );
+
+ // append
+ acf.doAction('append', $el2);
+
+ // return
+ return $el2;
+ };
+
+ /**
+ * rename
+ *
+ * description
+ *
+ * @date 7/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.rename = function( args ){
+
+ // Allow jQuery param.
+ if( args instanceof jQuery ) {
+ args = {
+ target: args
+ };
+ }
+
+ // Apply default args.
+ args = acf.parseArgs(args, {
+ target: false,
+ destructive: false,
+ search: '',
+ replace: '',
+ replacer: null
+ });
+
+ // Extract args.
+ var $el = args.target;
+
+ // Provide backup for empty args.
+ if( !args.search ) {
+ args.search = $el.attr('data-id');
+ }
+ if( !args.replace ) {
+ args.replace = acf.uniqid('acf');
+ }
+ if( !args.replacer ) {
+ args.replacer = function( name, value, search, replace ){
+ return value.replace( search, replace );
+ };
+ }
+
+ // Callback function for jQuery replacing.
+ var withReplacer = function( name ){
+ return function( i, value ){
+ return args.replacer( name, value, args.search, args.replace );
+ }
+ };
+
+ // Destructive Replace.
+ if( args.destructive ) {
+ var html = acf.strReplace( args.search, args.replace, $el.outerHTML() );
+ $el.replaceWith( html );
+
+ // Standard Replace.
+ } else {
+ $el.attr('data-id', args.replace);
+ $el.find('[id*="' + args.search + '"]').attr('id', withReplacer('id'));
+ $el.find('[for*="' + args.search + '"]').attr('for', withReplacer('for'));
+ $el.find('[name*="' + args.search + '"]').attr('name', withReplacer('name'));
+ }
+
+ // return
+ return $el;
+ };
+
+
+ /**
+ * acf.prepareForAjax
+ *
+ * description
+ *
+ * @date 4/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.prepareForAjax = function( data ){
+
+ // required
+ data.nonce = acf.get('nonce');
+ data.post_id = acf.get('post_id');
+
+ // language
+ if( acf.has('language') ) {
+ data.lang = acf.get('language');
+ }
+
+ // filter for 3rd party customization
+ data = acf.applyFilters('prepare_for_ajax', data);
+
+ // return
+ return data;
+ };
+
+
+ /**
+ * acf.startButtonLoading
+ *
+ * description
+ *
+ * @date 5/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.startButtonLoading = function( $el ){
+ $el.prop('disabled', true);
+ $el.after(' ');
+ }
+
+ acf.stopButtonLoading = function( $el ){
+ $el.prop('disabled', false);
+ $el.next('.acf-loading').remove();
+ }
+
+
+ /**
+ * acf.showLoading
+ *
+ * description
+ *
+ * @date 12/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.showLoading = function( $el ){
+ $el.append('
');
+ };
+
+ acf.hideLoading = function( $el ){
+ $el.children('.acf-loading-overlay').remove();
+ };
+
+
+ /**
+ * acf.updateUserSetting
+ *
+ * description
+ *
+ * @date 5/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.updateUserSetting = function( name, value ){
+
+ var ajaxData = {
+ action: 'acf/ajax/user_setting',
+ name: name,
+ value: value
+ };
+
+ $.ajax({
+ url: acf.get('ajaxurl'),
+ data: acf.prepareForAjax(ajaxData),
+ type: 'post',
+ dataType: 'html'
+ });
+
+ };
+
+
+ /**
+ * acf.val
+ *
+ * description
+ *
+ * @date 8/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.val = function( $input, value, silent ){
+
+ // vars
+ var prevValue = $input.val();
+
+ // bail if no change
+ if( value === prevValue ) {
+ return false
+ }
+
+ // update value
+ $input.val( value );
+
+ // prevent select elements displaying blank value if option doesn't exist
+ if( $input.is('select') && $input.val() === null ) {
+ $input.val( prevValue );
+ return false;
+ }
+
+ // update with trigger
+ if( silent !== true ) {
+ $input.trigger('change');
+ }
+
+ // return
+ return true;
+ };
+
+ /**
+ * acf.show
+ *
+ * description
+ *
+ * @date 9/2/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.show = function( $el, lockKey ){
+
+ // unlock
+ if( lockKey ) {
+ acf.unlock($el, 'hidden', lockKey);
+ }
+
+ // bail early if $el is still locked
+ if( acf.isLocked($el, 'hidden') ) {
+ //console.log( 'still locked', getLocks( $el, 'hidden' ));
+ return false;
+ }
+
+ // $el is hidden, remove class and return true due to change in visibility
+ if( $el.hasClass('acf-hidden') ) {
+ $el.removeClass('acf-hidden');
+ return true;
+
+ // $el is visible, return false due to no change in visibility
+ } else {
+ return false;
+ }
+ };
+
+
+ /**
+ * acf.hide
+ *
+ * description
+ *
+ * @date 9/2/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.hide = function( $el, lockKey ){
+
+ // lock
+ if( lockKey ) {
+ acf.lock($el, 'hidden', lockKey);
+ }
+
+ // $el is hidden, return false due to no change in visibility
+ if( $el.hasClass('acf-hidden') ) {
+ return false;
+
+ // $el is visible, add class and return true due to change in visibility
+ } else {
+ $el.addClass('acf-hidden');
+ return true;
+ }
+ };
+
+
+ /**
+ * acf.isHidden
+ *
+ * description
+ *
+ * @date 9/2/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.isHidden = function( $el ){
+ return $el.hasClass('acf-hidden');
+ };
+
+
+ /**
+ * acf.isVisible
+ *
+ * description
+ *
+ * @date 9/2/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.isVisible = function( $el ){
+ return !acf.isHidden( $el );
+ };
+
+
+ /**
+ * enable
+ *
+ * description
+ *
+ * @date 12/3/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ var enable = function( $el, lockKey ){
+
+ // check class. Allow .acf-disabled to overrule all JS
+ if( $el.hasClass('acf-disabled') ) {
+ return false;
+ }
+
+ // unlock
+ if( lockKey ) {
+ acf.unlock($el, 'disabled', lockKey);
+ }
+
+ // bail early if $el is still locked
+ if( acf.isLocked($el, 'disabled') ) {
+ return false;
+ }
+
+ // $el is disabled, remove prop and return true due to change
+ if( $el.prop('disabled') ) {
+ $el.prop('disabled', false);
+ return true;
+
+ // $el is enabled, return false due to no change
+ } else {
+ return false;
+ }
+ };
+
+ /**
+ * acf.enable
+ *
+ * description
+ *
+ * @date 9/2/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.enable = function( $el, lockKey ){
+
+ // enable single input
+ if( $el.attr('name') ) {
+ return enable( $el, lockKey );
+ }
+
+ // find and enable child inputs
+ // return true if any inputs have changed
+ var results = false;
+ $el.find('[name]').each(function(){
+ var result = enable( $(this), lockKey );
+ if( result ) {
+ results = true;
+ }
+ });
+ return results;
+ };
+
+
+ /**
+ * disable
+ *
+ * description
+ *
+ * @date 12/3/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ var disable = function( $el, lockKey ){
+
+ // lock
+ if( lockKey ) {
+ acf.lock($el, 'disabled', lockKey);
+ }
+
+ // $el is disabled, return false due to no change
+ if( $el.prop('disabled') ) {
+ return false;
+
+ // $el is enabled, add prop and return true due to change
+ } else {
+ $el.prop('disabled', true);
+ return true;
+ }
+ };
+
+
+ /**
+ * acf.disable
+ *
+ * description
+ *
+ * @date 9/2/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.disable = function( $el, lockKey ){
+
+ // disable single input
+ if( $el.attr('name') ) {
+ return disable( $el, lockKey );
+ }
+
+ // find and enable child inputs
+ // return true if any inputs have changed
+ var results = false;
+ $el.find('[name]').each(function(){
+ var result = disable( $(this), lockKey );
+ if( result ) {
+ results = true;
+ }
+ });
+ return results;
+ };
+
+
+ /**
+ * acf.isset
+ *
+ * description
+ *
+ * @date 10/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.isset = function( obj /*, level1, level2, ... */ ) {
+ for( var i = 1; i < arguments.length; i++ ) {
+ if( !obj || !obj.hasOwnProperty(arguments[i]) ) {
+ return false;
+ }
+ obj = obj[ arguments[i] ];
+ }
+ return true;
+ };
+
+ /**
+ * acf.isget
+ *
+ * description
+ *
+ * @date 10/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.isget = function( obj /*, level1, level2, ... */ ) {
+ for( var i = 1; i < arguments.length; i++ ) {
+ if( !obj || !obj.hasOwnProperty(arguments[i]) ) {
+ return null;
+ }
+ obj = obj[ arguments[i] ];
+ }
+ return obj;
+ };
+
+ /**
+ * acf.getFileInputData
+ *
+ * description
+ *
+ * @date 10/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.getFileInputData = function( $input, callback ){
+
+ // vars
+ var value = $input.val();
+
+ // bail early if no value
+ if( !value ) {
+ return false;
+ }
+
+ // data
+ var data = {
+ url: value
+ };
+
+ // modern browsers
+ var file = acf.isget( $input[0], 'files', 0);
+ if( file ){
+
+ // update data
+ data.size = file.size;
+ data.type = file.type;
+
+ // image
+ if( file.type.indexOf('image') > -1 ) {
+
+ // vars
+ var windowURL = window.URL || window.webkitURL;
+ var img = new Image();
+
+ img.onload = function() {
+
+ // update
+ data.width = this.width;
+ data.height = this.height;
+
+ callback( data );
+ };
+ img.src = windowURL.createObjectURL( file );
+ } else {
+ callback( data );
+ }
+ } else {
+ callback( data );
+ }
+ };
+
+ /**
+ * acf.isAjaxSuccess
+ *
+ * description
+ *
+ * @date 18/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.isAjaxSuccess = function( json ){
+ return ( json && json.success );
+ };
+
+ /**
+ * acf.getAjaxMessage
+ *
+ * description
+ *
+ * @date 18/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.getAjaxMessage = function( json ){
+ return acf.isget( json, 'data', 'message' );
+ };
+
+ /**
+ * acf.getAjaxError
+ *
+ * description
+ *
+ * @date 18/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.getAjaxError = function( json ){
+ return acf.isget( json, 'data', 'error' );
+ };
+
+ /**
+ * Returns the error message from an XHR object.
+ *
+ * @date 17/3/20
+ * @since 5.8.9
+ *
+ * @param object xhr The XHR object.
+ * @return (string)
+ */
+ acf.getXhrError = function( xhr ){
+ if( xhr.responseJSON && xhr.responseJSON.message ) {
+ return xhr.responseJSON.message;
+ } else if( xhr.statusText ) {
+ return xhr.statusText;
+ }
+ return "";
+ };
+
+ /**
+ * acf.renderSelect
+ *
+ * Renders the innter html for a select field.
+ *
+ * @date 19/2/18
+ * @since 5.6.9
+ *
+ * @param jQuery $select The select element.
+ * @param array choices An array of choices.
+ * @return void
+ */
+
+ acf.renderSelect = function( $select, choices ){
+
+ // vars
+ var value = $select.val();
+ var values = [];
+
+ // callback
+ var crawl = function( items ){
+
+ // vars
+ var itemsHtml = '';
+
+ // loop
+ items.map(function( item ){
+
+ // vars
+ var text = item.text || item.label || '';
+ var id = item.id || item.value || '';
+
+ // append
+ values.push(id);
+
+ // optgroup
+ if( item.children ) {
+ itemsHtml += '' + crawl( item.children ) + ' ';
+
+ // option
+ } else {
+ itemsHtml += '' + acf.strEscape(text) + ' ';
+ }
+ });
+
+ // return
+ return itemsHtml;
+ };
+
+ // update HTML
+ $select.html( crawl(choices) );
+
+ // update value
+ if( values.indexOf(value) > -1 ){
+ $select.val( value );
+ }
+
+ // return selected value
+ return $select.val();
+ };
+
+ /**
+ * acf.lock
+ *
+ * Creates a "lock" on an element for a given type and key
+ *
+ * @date 22/2/18
+ * @since 5.6.9
+ *
+ * @param jQuery $el The element to lock.
+ * @param string type The type of lock such as "condition" or "visibility".
+ * @param string key The key that will be used to unlock.
+ * @return void
+ */
+
+ var getLocks = function( $el, type ){
+ return $el.data('acf-lock-'+type) || [];
+ };
+
+ var setLocks = function( $el, type, locks ){
+ $el.data('acf-lock-'+type, locks);
+ }
+
+ acf.lock = function( $el, type, key ){
+ var locks = getLocks( $el, type );
+ var i = locks.indexOf(key);
+ if( i < 0 ) {
+ locks.push( key );
+ setLocks( $el, type, locks );
+ }
+ };
+
+ /**
+ * acf.unlock
+ *
+ * Unlocks a "lock" on an element for a given type and key
+ *
+ * @date 22/2/18
+ * @since 5.6.9
+ *
+ * @param jQuery $el The element to lock.
+ * @param string type The type of lock such as "condition" or "visibility".
+ * @param string key The key that will be used to unlock.
+ * @return void
+ */
+
+ acf.unlock = function( $el, type, key ){
+ var locks = getLocks( $el, type );
+ var i = locks.indexOf(key);
+ if( i > -1 ) {
+ locks.splice(i, 1);
+ setLocks( $el, type, locks );
+ }
+
+ // return true if is unlocked (no locks)
+ return (locks.length === 0);
+ };
+
+ /**
+ * acf.isLocked
+ *
+ * Returns true if a lock exists for a given type
+ *
+ * @date 22/2/18
+ * @since 5.6.9
+ *
+ * @param jQuery $el The element to lock.
+ * @param string type The type of lock such as "condition" or "visibility".
+ * @return void
+ */
+
+ acf.isLocked = function( $el, type ){
+ return ( getLocks( $el, type ).length > 0 );
+ };
+
+ /**
+ * acf.isGutenberg
+ *
+ * Returns true if the Gutenberg editor is being used.
+ *
+ * @date 14/11/18
+ * @since 5.8.0
+ *
+ * @param vois
+ * @return bool
+ */
+ acf.isGutenberg = function(){
+ return !!( window.wp && wp.data && wp.data.select && wp.data.select( 'core/editor' ) );
+ };
+
+ /**
+ * acf.objectToArray
+ *
+ * Returns an array of items from the given object.
+ *
+ * @date 20/11/18
+ * @since 5.8.0
+ *
+ * @param object obj The object of items.
+ * @return array
+ */
+ acf.objectToArray = function( obj ){
+ return Object.keys( obj ).map(function( key ){
+ return obj[key];
+ });
+ };
+
+ /**
+ * acf.debounce
+ *
+ * Returns a debounced version of the passed function which will postpone its execution until after `wait` milliseconds have elapsed since the last time it was invoked.
+ *
+ * @date 28/8/19
+ * @since 5.8.1
+ *
+ * @param function callback The callback function.
+ * @return int wait The number of milliseconds to wait.
+ */
+ acf.debounce = function( callback, wait ){
+ var timeout;
+ return function(){
+ var context = this;
+ var args = arguments;
+ var later = function(){
+ callback.apply( context, args );
+ };
+ clearTimeout( timeout );
+ timeout = setTimeout( later, wait );
+ };
+ };
+
+ /**
+ * acf.throttle
+ *
+ * Returns a throttled version of the passed function which will allow only one execution per `limit` time period.
+ *
+ * @date 28/8/19
+ * @since 5.8.1
+ *
+ * @param function callback The callback function.
+ * @return int wait The number of milliseconds to wait.
+ */
+ acf.throttle = function( callback, limit ){
+ var busy = false;
+ return function(){
+ if( busy ) return;
+ busy = true;
+ setTimeout(function(){
+ busy = false;
+ }, limit);
+ callback.apply( this, arguments );
+ };
+ };
+
+ /**
+ * acf.isInView
+ *
+ * Returns true if the given element is in view.
+ *
+ * @date 29/8/19
+ * @since 5.8.1
+ *
+ * @param elem el The dom element to inspect.
+ * @return bool
+ */
+ acf.isInView = function( el ){
+ if( el instanceof jQuery ) {
+ el = el[0];
+ }
+ var rect = el.getBoundingClientRect();
+ return (
+ rect.top !== rect.bottom &&
+ rect.top >= 0 &&
+ rect.left >= 0 &&
+ rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
+ rect.right <= (window.innerWidth || document.documentElement.clientWidth)
+ );
+ };
+
+ /**
+ * acf.onceInView
+ *
+ * Watches for a dom element to become visible in the browser and then excecutes the passed callback.
+ *
+ * @date 28/8/19
+ * @since 5.8.1
+ *
+ * @param dom el The dom element to inspect.
+ * @param function callback The callback function.
+ */
+ acf.onceInView = (function() {
+
+ // Define list.
+ var items = [];
+ var id = 0;
+
+ // Define check function.
+ var check = function() {
+ items.forEach(function( item ){
+ if( acf.isInView(item.el) ) {
+ item.callback.apply( this );
+ pop( item.id );
+ }
+ });
+ };
+
+ // And create a debounced version.
+ var debounced = acf.debounce( check, 300 );
+
+ // Define add function.
+ var push = function( el, callback ) {
+
+ // Add event listener.
+ if( !items.length ) {
+ $(window).on( 'scroll resize', debounced ).on( 'acfrefresh orientationchange', check );
+ }
+
+ // Append to list.
+ items.push({ id: id++, el: el, callback: callback });
+ }
+
+ // Define remove function.
+ var pop = function( id ) {
+
+ // Remove from list.
+ items = items.filter(function(item) {
+ return (item.id !== id);
+ });
+
+ // Clean up listener.
+ if( !items.length ) {
+ $(window).off( 'scroll resize', debounced ).off( 'acfrefresh orientationchange', check );
+ }
+ }
+
+ // Define returned function.
+ return function( el, callback ){
+
+ // Allow jQuery object.
+ if( el instanceof jQuery )
+ el = el[0];
+
+ // Execute callback if already in view or add to watch list.
+ if( acf.isInView(el) ) {
+ callback.apply( this );
+ } else {
+ push( el, callback );
+ }
+ }
+ })();
+
+ /**
+ * acf.once
+ *
+ * Creates a function that is restricted to invoking `func` once.
+ *
+ * @date 2/9/19
+ * @since 5.8.1
+ *
+ * @param function func The function to restrict.
+ * @return function
+ */
+ acf.once = function( func ){
+ var i = 0;
+ return function(){
+ if( i++ > 0 ) {
+ return (func = undefined);
+ }
+ return func.apply(this, arguments);
+ }
+ }
+
+ /**
+ * Focuses attention to a specific element.
+ *
+ * @date 05/05/2020
+ * @since 5.9.0
+ *
+ * @param jQuery $el The jQuery element to focus.
+ * @return void
+ */
+ acf.focusAttention = function( $el ){
+ var wait = 1000;
+
+ // Apply class to focus attention.
+ $el.addClass( 'acf-attention -focused' );
+
+ // Scroll to element if needed.
+ var scrollTime = 500;
+ if( !acf.isInView( $el ) ) {
+ $( 'body, html' ).animate({
+ scrollTop: $el.offset().top - ( $(window).height() / 2 )
+ }, scrollTime);
+ wait += scrollTime;
+ }
+
+ // Remove class after $wait amount of time.
+ var fadeTime = 250;
+ setTimeout(function(){
+ $el.removeClass( '-focused' );
+ setTimeout(function(){
+ $el.removeClass( 'acf-attention' );
+ }, fadeTime);
+ }, wait);
+ };
+
+ /**
+ * Description
+ *
+ * @date 05/05/2020
+ * @since 5.9.0
+ *
+ * @param type Var Description.
+ * @return type Description.
+ */
+ acf.onFocus = function( $el, callback ){
+
+ // Only run once per element.
+ // if( $el.data('acf.onFocus') ) {
+ // return false;
+ // }
+
+ // Vars.
+ var ignoreBlur = false;
+ var focus = false;
+
+ // Functions.
+ var onFocus = function(){
+ ignoreBlur = true;
+ setTimeout(function(){
+ ignoreBlur = false;
+ }, 1);
+ setFocus( true );
+ };
+ var onBlur = function(){
+ if( !ignoreBlur ) {
+ setFocus( false );
+ }
+ };
+ var addEvents = function(){
+ $(document).on('click', onBlur);
+ //$el.on('acfBlur', onBlur);
+ $el.on('blur', 'input, select, textarea', onBlur);
+ };
+ var removeEvents = function(){
+ $(document).off('click', onBlur);
+ //$el.off('acfBlur', onBlur);
+ $el.off('blur', 'input, select, textarea', onBlur);
+ };
+ var setFocus = function( value ){
+ if( focus === value ) {
+ return;
+ }
+ if( value ) {
+ addEvents();
+ } else {
+ removeEvents();
+ }
+ focus = value;
+ callback( value );
+ };
+
+ // Add events and set data.
+ $el.on('click', onFocus);
+ //$el.on('acfFocus', onFocus);
+ $el.on('focus', 'input, select, textarea', onFocus);
+ //$el.data('acf.onFocus', true);
+ };
+
+ /*
+ * exists
+ *
+ * This function will return true if a jQuery selection exists
+ *
+ * @type function
+ * @date 8/09/2014
+ * @since 5.0.0
+ *
+ * @param n/a
+ * @return (boolean)
+ */
+
+ $.fn.exists = function() {
+ return $(this).length>0;
+ };
+
+
+ /*
+ * outerHTML
+ *
+ * This function will return a string containing the HTML of the selected element
+ *
+ * @type function
+ * @date 19/11/2013
+ * @since 5.0.0
+ *
+ * @param $.fn
+ * @return (string)
+ */
+
+ $.fn.outerHTML = function() {
+ return $(this).get(0).outerHTML;
+ };
+
+ /*
+ * indexOf
+ *
+ * This function will provide compatibility for ie8
+ *
+ * @type function
+ * @date 5/3/17
+ * @since 5.5.10
+ *
+ * @param n/a
+ * @return n/a
+ */
+
+ if( !Array.prototype.indexOf ) {
+
+ Array.prototype.indexOf = function(val) {
+ return $.inArray(val, this);
+ };
+
+ }
+
+ /**
+ * Triggers a "refresh" action used by various Components to redraw the DOM.
+ *
+ * @date 26/05/2020
+ * @since 5.9.0
+ *
+ * @param void
+ * @return void
+ */
+ acf.refresh = acf.debounce(function(){
+ $( window ).trigger('acfrefresh');
+ acf.doAction('refresh');
+ }, 0);
+
+ // Set up actions from events
+ $(document).ready(function(){
+ acf.doAction('ready');
+ });
+
+ $(window).on('load', function(){
+ acf.doAction('load');
+ });
+
+ $(window).on('beforeunload', function(){
+ acf.doAction('unload');
+ });
+
+ $(window).on('resize', function(){
+ acf.doAction('resize');
+ });
+
+ $(document).on('sortstart', function( event, ui ) {
+ acf.doAction('sortstart', ui.item, ui.placeholder);
+ });
+
+ $(document).on('sortstop', function( event, ui ) {
+ acf.doAction('sortstop', ui.item, ui.placeholder);
+ });
+
+})(jQuery);
+
+( function( window, undefined ) {
+ "use strict";
+
+ /**
+ * Handles managing all events for whatever you plug it into. Priorities for hooks are based on lowest to highest in
+ * that, lowest priority hooks are fired first.
+ */
+ var EventManager = function() {
+ /**
+ * Maintain a reference to the object scope so our public methods never get confusing.
+ */
+ var MethodsAvailable = {
+ removeFilter : removeFilter,
+ applyFilters : applyFilters,
+ addFilter : addFilter,
+ removeAction : removeAction,
+ doAction : doAction,
+ addAction : addAction,
+ storage : getStorage
+ };
+
+ /**
+ * Contains the hooks that get registered with this EventManager. The array for storage utilizes a "flat"
+ * object literal such that looking up the hook utilizes the native object literal hash.
+ */
+ var STORAGE = {
+ actions : {},
+ filters : {}
+ };
+
+ function getStorage() {
+
+ return STORAGE;
+
+ };
+
+ /**
+ * Adds an action to the event manager.
+ *
+ * @param action Must contain namespace.identifier
+ * @param callback Must be a valid callback function before this action is added
+ * @param [priority=10] Used to control when the function is executed in relation to other callbacks bound to the same hook
+ * @param [context] Supply a value to be used for this
+ */
+ function addAction( action, callback, priority, context ) {
+ if( typeof action === 'string' && typeof callback === 'function' ) {
+ priority = parseInt( ( priority || 10 ), 10 );
+ _addHook( 'actions', action, callback, priority, context );
+ }
+
+ return MethodsAvailable;
+ }
+
+ /**
+ * Performs an action if it exists. You can pass as many arguments as you want to this function; the only rule is
+ * that the first argument must always be the action.
+ */
+ function doAction( /* action, arg1, arg2, ... */ ) {
+ var args = Array.prototype.slice.call( arguments );
+ var action = args.shift();
+
+ if( typeof action === 'string' ) {
+ _runHook( 'actions', action, args );
+ }
+
+ return MethodsAvailable;
+ }
+
+ /**
+ * Removes the specified action if it contains a namespace.identifier & exists.
+ *
+ * @param action The action to remove
+ * @param [callback] Callback function to remove
+ */
+ function removeAction( action, callback ) {
+ if( typeof action === 'string' ) {
+ _removeHook( 'actions', action, callback );
+ }
+
+ return MethodsAvailable;
+ }
+
+ /**
+ * Adds a filter to the event manager.
+ *
+ * @param filter Must contain namespace.identifier
+ * @param callback Must be a valid callback function before this action is added
+ * @param [priority=10] Used to control when the function is executed in relation to other callbacks bound to the same hook
+ * @param [context] Supply a value to be used for this
+ */
+ function addFilter( filter, callback, priority, context ) {
+ if( typeof filter === 'string' && typeof callback === 'function' ) {
+ priority = parseInt( ( priority || 10 ), 10 );
+ _addHook( 'filters', filter, callback, priority, context );
+ }
+
+ return MethodsAvailable;
+ }
+
+ /**
+ * Performs a filter if it exists. You should only ever pass 1 argument to be filtered. The only rule is that
+ * the first argument must always be the filter.
+ */
+ function applyFilters( /* filter, filtered arg, arg2, ... */ ) {
+ var args = Array.prototype.slice.call( arguments );
+ var filter = args.shift();
+
+ if( typeof filter === 'string' ) {
+ return _runHook( 'filters', filter, args );
+ }
+
+ return MethodsAvailable;
+ }
+
+ /**
+ * Removes the specified filter if it contains a namespace.identifier & exists.
+ *
+ * @param filter The action to remove
+ * @param [callback] Callback function to remove
+ */
+ function removeFilter( filter, callback ) {
+ if( typeof filter === 'string') {
+ _removeHook( 'filters', filter, callback );
+ }
+
+ return MethodsAvailable;
+ }
+
+ /**
+ * Removes the specified hook by resetting the value of it.
+ *
+ * @param type Type of hook, either 'actions' or 'filters'
+ * @param hook The hook (namespace.identifier) to remove
+ * @private
+ */
+ function _removeHook( type, hook, callback, context ) {
+ if ( !STORAGE[ type ][ hook ] ) {
+ return;
+ }
+ if ( !callback ) {
+ STORAGE[ type ][ hook ] = [];
+ } else {
+ var handlers = STORAGE[ type ][ hook ];
+ var i;
+ if ( !context ) {
+ for ( i = handlers.length; i--; ) {
+ if ( handlers[i].callback === callback ) {
+ handlers.splice( i, 1 );
+ }
+ }
+ }
+ else {
+ for ( i = handlers.length; i--; ) {
+ var handler = handlers[i];
+ if ( handler.callback === callback && handler.context === context) {
+ handlers.splice( i, 1 );
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Adds the hook to the appropriate storage container
+ *
+ * @param type 'actions' or 'filters'
+ * @param hook The hook (namespace.identifier) to add to our event manager
+ * @param callback The function that will be called when the hook is executed.
+ * @param priority The priority of this hook. Must be an integer.
+ * @param [context] A value to be used for this
+ * @private
+ */
+ function _addHook( type, hook, callback, priority, context ) {
+ var hookObject = {
+ callback : callback,
+ priority : priority,
+ context : context
+ };
+
+ // Utilize 'prop itself' : http://jsperf.com/hasownproperty-vs-in-vs-undefined/19
+ var hooks = STORAGE[ type ][ hook ];
+ if( hooks ) {
+ hooks.push( hookObject );
+ hooks = _hookInsertSort( hooks );
+ }
+ else {
+ hooks = [ hookObject ];
+ }
+
+ STORAGE[ type ][ hook ] = hooks;
+ }
+
+ /**
+ * Use an insert sort for keeping our hooks organized based on priority. This function is ridiculously faster
+ * than bubble sort, etc: http://jsperf.com/javascript-sort
+ *
+ * @param hooks The custom array containing all of the appropriate hooks to perform an insert sort on.
+ * @private
+ */
+ function _hookInsertSort( hooks ) {
+ var tmpHook, j, prevHook;
+ for( var i = 1, len = hooks.length; i < len; i++ ) {
+ tmpHook = hooks[ i ];
+ j = i;
+ while( ( prevHook = hooks[ j - 1 ] ) && prevHook.priority > tmpHook.priority ) {
+ hooks[ j ] = hooks[ j - 1 ];
+ --j;
+ }
+ hooks[ j ] = tmpHook;
+ }
+
+ return hooks;
+ }
+
+ /**
+ * Runs the specified hook. If it is an action, the value is not modified but if it is a filter, it is.
+ *
+ * @param type 'actions' or 'filters'
+ * @param hook The hook ( namespace.identifier ) to be ran.
+ * @param args Arguments to pass to the action/filter. If it's a filter, args is actually a single parameter.
+ * @private
+ */
+ function _runHook( type, hook, args ) {
+ var handlers = STORAGE[ type ][ hook ];
+
+ if ( !handlers ) {
+ return (type === 'filters') ? args[0] : false;
+ }
+
+ var i = 0, len = handlers.length;
+ if ( type === 'filters' ) {
+ for ( ; i < len; i++ ) {
+ args[ 0 ] = handlers[ i ].callback.apply( handlers[ i ].context, args );
+ }
+ } else {
+ for ( ; i < len; i++ ) {
+ handlers[ i ].callback.apply( handlers[ i ].context, args );
+ }
+ }
+
+ return ( type === 'filters' ) ? args[ 0 ] : true;
+ }
+
+ // return all of the publicly available methods
+ return MethodsAvailable;
+
+ };
+
+ // instantiate
+ acf.hooks = new EventManager();
+
+} )( window );
+
+(function($, undefined){
+
+ // Cached regex to split keys for `addEvent`.
+ var delegateEventSplitter = /^(\S+)\s*(.*)$/;
+
+ /**
+ * extend
+ *
+ * Helper function to correctly set up the prototype chain for subclasses
+ * Heavily inspired by backbone.js
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param object protoProps New properties for this object.
+ * @return function.
+ */
+
+ var extend = function( protoProps ) {
+
+ // vars
+ var Parent = this;
+ var Child;
+
+ // The constructor function for the new subclass is either defined by you
+ // (the "constructor" property in your `extend` definition), or defaulted
+ // by us to simply call the parent constructor.
+ if( protoProps && protoProps.hasOwnProperty('constructor') ) {
+ Child = protoProps.constructor;
+ } else {
+ Child = function(){ return Parent.apply(this, arguments); };
+ }
+
+ // Add static properties to the constructor function, if supplied.
+ $.extend(Child, Parent);
+
+ // Set the prototype chain to inherit from `parent`, without calling
+ // `parent`'s constructor function and add the prototype properties.
+ Child.prototype = Object.create(Parent.prototype);
+ $.extend(Child.prototype, protoProps);
+ Child.prototype.constructor = Child;
+
+ // Set a convenience property in case the parent's prototype is needed later.
+ //Child.prototype.__parent__ = Parent.prototype;
+
+ // return
+ return Child;
+
+ };
+
+
+ /**
+ * Model
+ *
+ * Base class for all inheritence
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param object props
+ * @return function.
+ */
+
+ var Model = acf.Model = function(){
+
+ // generate uique client id
+ this.cid = acf.uniqueId('acf');
+
+ // set vars to avoid modifying prototype
+ this.data = $.extend(true, {}, this.data);
+
+ // pass props to setup function
+ this.setup.apply(this, arguments);
+
+ // store on element (allow this.setup to create this.$el)
+ if( this.$el && !this.$el.data('acf') ) {
+ this.$el.data('acf', this);
+ }
+
+ // initialize
+ var initialize = function(){
+ this.initialize();
+ this.addEvents();
+ this.addActions();
+ this.addFilters();
+ };
+
+ // initialize on action
+ if( this.wait && !acf.didAction(this.wait) ) {
+ this.addAction(this.wait, initialize);
+
+ // initialize now
+ } else {
+ initialize.apply(this);
+ }
+ };
+
+ // Attach all inheritable methods to the Model prototype.
+ $.extend(Model.prototype, {
+
+ // Unique model id
+ id: '',
+
+ // Unique client id
+ cid: '',
+
+ // jQuery element
+ $el: null,
+
+ // Data specific to this instance
+ data: {},
+
+ // toggle used when changing data
+ busy: false,
+ changed: false,
+
+ // Setup events hooks
+ events: {},
+ actions: {},
+ filters: {},
+
+ // class used to avoid nested event triggers
+ eventScope: '',
+
+ // action to wait until initialize
+ wait: false,
+
+ // action priority default
+ priority: 10,
+
+ /**
+ * get
+ *
+ * Gets a specific data value
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param string name
+ * @return mixed
+ */
+
+ get: function( name ) {
+ return this.data[name];
+ },
+
+ /**
+ * has
+ *
+ * Returns `true` if the data exists and is not null
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param string name
+ * @return boolean
+ */
+
+ has: function( name ) {
+ return this.get(name) != null;
+ },
+
+ /**
+ * set
+ *
+ * Sets a specific data value
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param string name
+ * @param mixed value
+ * @return this
+ */
+
+ set: function( name, value, silent ) {
+
+ // bail if unchanged
+ var prevValue = this.get(name);
+ if( prevValue == value ) {
+ return this;
+ }
+
+ // set data
+ this.data[ name ] = value;
+
+ // trigger events
+ if( !silent ) {
+ this.changed = true;
+ this.trigger('changed:' + name, [value, prevValue]);
+ this.trigger('changed', [name, value, prevValue]);
+ }
+
+ // return
+ return this;
+ },
+
+ /**
+ * inherit
+ *
+ * Inherits the data from a jQuery element
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param jQuery $el
+ * @return this
+ */
+
+ inherit: function( data ){
+
+ // allow jQuery
+ if( data instanceof jQuery ) {
+ data = data.data();
+ }
+
+ // extend
+ $.extend(this.data, data);
+
+ // return
+ return this;
+ },
+
+ /**
+ * prop
+ *
+ * mimics the jQuery prop function
+ *
+ * @date 4/6/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ prop: function(){
+ return this.$el.prop.apply(this.$el, arguments);
+ },
+
+ /**
+ * setup
+ *
+ * Run during constructor function
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param n/a
+ * @return n/a
+ */
+
+ setup: function( props ){
+ $.extend(this, props);
+ },
+
+ /**
+ * initialize
+ *
+ * Also run during constructor function
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param n/a
+ * @return n/a
+ */
+
+ initialize: function(){},
+
+ /**
+ * addElements
+ *
+ * Adds multiple jQuery elements to this object
+ *
+ * @date 9/5/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ addElements: function( elements ){
+ elements = elements || this.elements || null;
+ if( !elements || !Object.keys(elements).length ) return false;
+ for( var i in elements ) {
+ this.addElement( i, elements[i] );
+ }
+ },
+
+ /**
+ * addElement
+ *
+ * description
+ *
+ * @date 9/5/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ addElement: function( name, selector){
+ this[ '$' + name ] = this.$( selector );
+ },
+
+ /**
+ * addEvents
+ *
+ * Adds multiple event handlers
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param object events {event1 : callback, event2 : callback, etc }
+ * @return n/a
+ */
+
+ addEvents: function( events ){
+ events = events || this.events || null;
+ if( !events ) return false;
+ for( var key in events ) {
+ var match = key.match(delegateEventSplitter);
+ this.on(match[1], match[2], events[key]);
+ }
+ },
+
+ /**
+ * removeEvents
+ *
+ * Removes multiple event handlers
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param object events {event1 : callback, event2 : callback, etc }
+ * @return n/a
+ */
+
+ removeEvents: function( events ){
+ events = events || this.events || null;
+ if( !events ) return false;
+ for( var key in events ) {
+ var match = key.match(delegateEventSplitter);
+ this.off(match[1], match[2], events[key]);
+ }
+ },
+
+ /**
+ * getEventTarget
+ *
+ * Returns a jQUery element to tigger an event on
+ *
+ * @date 5/6/18
+ * @since 5.6.9
+ *
+ * @param jQuery $el The default jQuery element. Optional.
+ * @param string event The event name. Optional.
+ * @return jQuery
+ */
+
+ getEventTarget: function( $el, event ){
+ return $el || this.$el || $(document);
+ },
+
+ /**
+ * validateEvent
+ *
+ * Returns true if the event target's closest $el is the same as this.$el
+ * Requires both this.el and this.$el to be defined
+ *
+ * @date 5/6/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ validateEvent: function( e ){
+ if( this.eventScope ) {
+ return $( e.target ).closest( this.eventScope ).is( this.$el );
+ } else {
+ return true;
+ }
+ },
+
+ /**
+ * proxyEvent
+ *
+ * Returns a new event callback function scoped to this model
+ *
+ * @date 29/3/18
+ * @since 5.6.9
+ *
+ * @param function callback
+ * @return function
+ */
+
+ proxyEvent: function( callback ){
+ return this.proxy(function(e){
+
+ // validate
+ if( !this.validateEvent(e) ) {
+ return;
+ }
+
+ // construct args
+ var args = acf.arrayArgs( arguments );
+ var extraArgs = args.slice(1);
+ var eventArgs = [ e, $(e.currentTarget) ].concat( extraArgs );
+
+ // callback
+ callback.apply(this, eventArgs);
+ });
+ },
+
+ /**
+ * on
+ *
+ * Adds an event handler similar to jQuery
+ * Uses the instance 'cid' to namespace event
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param string name
+ * @param string callback
+ * @return n/a
+ */
+
+ on: function( a1, a2, a3, a4 ){
+
+ // vars
+ var $el, event, selector, callback, args;
+
+ // find args
+ if( a1 instanceof jQuery ) {
+
+ // 1. args( $el, event, selector, callback )
+ if( a4 ) {
+ $el = a1; event = a2; selector = a3; callback = a4;
+
+ // 2. args( $el, event, callback )
+ } else {
+ $el = a1; event = a2; callback = a3;
+ }
+ } else {
+
+ // 3. args( event, selector, callback )
+ if( a3 ) {
+ event = a1; selector = a2; callback = a3;
+
+ // 4. args( event, callback )
+ } else {
+ event = a1; callback = a2;
+ }
+ }
+
+ // element
+ $el = this.getEventTarget( $el );
+
+ // modify callback
+ if( typeof callback === 'string' ) {
+ callback = this.proxyEvent( this[callback] );
+ }
+
+ // modify event
+ event = event + '.' + this.cid;
+
+ // args
+ if( selector ) {
+ args = [ event, selector, callback ];
+ } else {
+ args = [ event, callback ];
+ }
+
+ // on()
+ $el.on.apply($el, args);
+ },
+
+ /**
+ * off
+ *
+ * Removes an event handler similar to jQuery
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param string name
+ * @param string callback
+ * @return n/a
+ */
+
+ off: function( a1, a2 ,a3 ){
+
+ // vars
+ var $el, event, selector, args;
+
+ // find args
+ if( a1 instanceof jQuery ) {
+
+ // 1. args( $el, event, selector )
+ if( a3 ) {
+ $el = a1; event = a2; selector = a3;
+
+ // 2. args( $el, event )
+ } else {
+ $el = a1; event = a2;
+ }
+ } else {
+
+ // 3. args( event, selector )
+ if( a2 ) {
+ event = a1; selector = a2;
+
+ // 4. args( event )
+ } else {
+ event = a1;
+ }
+ }
+
+ // element
+ $el = this.getEventTarget( $el );
+
+ // modify event
+ event = event + '.' + this.cid;
+
+ // args
+ if( selector ) {
+ args = [ event, selector ];
+ } else {
+ args = [ event ];
+ }
+
+ // off()
+ $el.off.apply($el, args);
+ },
+
+ /**
+ * trigger
+ *
+ * Triggers an event similar to jQuery
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param string name
+ * @param string callback
+ * @return n/a
+ */
+
+ trigger: function( name, args, bubbles ){
+ var $el = this.getEventTarget();
+ if( bubbles ) {
+ $el.trigger.apply( $el, arguments );
+ } else {
+ $el.triggerHandler.apply( $el, arguments );
+ }
+ return this;
+ },
+
+ /**
+ * addActions
+ *
+ * Adds multiple action handlers
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param object actions {action1 : callback, action2 : callback, etc }
+ * @return n/a
+ */
+
+ addActions: function( actions ){
+ actions = actions || this.actions || null;
+ if( !actions ) return false;
+ for( var i in actions ) {
+ this.addAction( i, actions[i] );
+ }
+ },
+
+ /**
+ * removeActions
+ *
+ * Removes multiple action handlers
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param object actions {action1 : callback, action2 : callback, etc }
+ * @return n/a
+ */
+
+ removeActions: function( actions ){
+ actions = actions || this.actions || null;
+ if( !actions ) return false;
+ for( var i in actions ) {
+ this.removeAction( i, actions[i] );
+ }
+ },
+
+ /**
+ * addAction
+ *
+ * Adds an action using the wp.hooks library
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param string name
+ * @param string callback
+ * @return n/a
+ */
+
+ addAction: function( name, callback, priority ){
+ //console.log('addAction', name, priority);
+ // defaults
+ priority = priority || this.priority;
+
+ // modify callback
+ if( typeof callback === 'string' ) {
+ callback = this[ callback ];
+ }
+
+ // add
+ acf.addAction(name, callback, priority, this);
+
+ },
+
+ /**
+ * removeAction
+ *
+ * Remove an action using the wp.hooks library
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param string name
+ * @param string callback
+ * @return n/a
+ */
+
+ removeAction: function( name, callback ){
+ acf.removeAction(name, this[ callback ]);
+ },
+
+ /**
+ * addFilters
+ *
+ * Adds multiple filter handlers
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param object filters {filter1 : callback, filter2 : callback, etc }
+ * @return n/a
+ */
+
+ addFilters: function( filters ){
+ filters = filters || this.filters || null;
+ if( !filters ) return false;
+ for( var i in filters ) {
+ this.addFilter( i, filters[i] );
+ }
+ },
+
+ /**
+ * addFilter
+ *
+ * Adds a filter using the wp.hooks library
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param string name
+ * @param string callback
+ * @return n/a
+ */
+
+ addFilter: function( name, callback, priority ){
+
+ // defaults
+ priority = priority || this.priority;
+
+ // modify callback
+ if( typeof callback === 'string' ) {
+ callback = this[ callback ];
+ }
+
+ // add
+ acf.addFilter(name, callback, priority, this);
+
+ },
+
+ /**
+ * removeFilters
+ *
+ * Removes multiple filter handlers
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param object filters {filter1 : callback, filter2 : callback, etc }
+ * @return n/a
+ */
+
+ removeFilters: function( filters ){
+ filters = filters || this.filters || null;
+ if( !filters ) return false;
+ for( var i in filters ) {
+ this.removeFilter( i, filters[i] );
+ }
+ },
+
+ /**
+ * removeFilter
+ *
+ * Remove a filter using the wp.hooks library
+ *
+ * @date 14/12/17
+ * @since 5.6.5
+ *
+ * @param string name
+ * @param string callback
+ * @return n/a
+ */
+
+ removeFilter: function( name, callback ){
+ acf.removeFilter(name, this[ callback ]);
+ },
+
+ /**
+ * $
+ *
+ * description
+ *
+ * @date 16/12/17
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ $: function( selector ){
+ return this.$el.find( selector );
+ },
+
+ /**
+ * remove
+ *
+ * Removes the element and listenters
+ *
+ * @date 19/12/17
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ remove: function(){
+ this.removeEvents();
+ this.removeActions();
+ this.removeFilters();
+ this.$el.remove();
+ },
+
+ /**
+ * setTimeout
+ *
+ * description
+ *
+ * @date 16/1/18
+ * @since 5.6.5
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ setTimeout: function( callback, milliseconds ){
+ return setTimeout( this.proxy(callback), milliseconds );
+ },
+
+ /**
+ * time
+ *
+ * used for debugging
+ *
+ * @date 7/3/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ time: function(){
+ console.time( this.id || this.cid );
+ },
+
+ /**
+ * timeEnd
+ *
+ * used for debugging
+ *
+ * @date 7/3/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ timeEnd: function(){
+ console.timeEnd( this.id || this.cid );
+ },
+
+ /**
+ * show
+ *
+ * description
+ *
+ * @date 15/3/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ show: function(){
+ acf.show( this.$el );
+ },
+
+
+ /**
+ * hide
+ *
+ * description
+ *
+ * @date 15/3/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ hide: function(){
+ acf.hide( this.$el );
+ },
+
+ /**
+ * proxy
+ *
+ * Returns a new function scoped to this model
+ *
+ * @date 29/3/18
+ * @since 5.6.9
+ *
+ * @param function callback
+ * @return function
+ */
+
+ proxy: function( callback ){
+ return $.proxy( callback, this );
+ }
+
+
+ });
+
+ // Set up inheritance for the model
+ Model.extend = extend;
+
+ // Global model storage
+ acf.models = {};
+
+ /**
+ * acf.getInstance
+ *
+ * This function will get an instance from an element
+ *
+ * @date 5/3/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.getInstance = function( $el ){
+ return $el.data('acf');
+ };
+
+ /**
+ * acf.getInstances
+ *
+ * This function will get an array of instances from multiple elements
+ *
+ * @date 5/3/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ acf.getInstances = function( $el ){
+ var instances = [];
+ $el.each(function(){
+ instances.push( acf.getInstance( $(this) ) );
+ });
+ return instances;
+ };
+
+})(jQuery);
+
+(function($, undefined){
+
+ acf.models.Popup = acf.Model.extend({
+
+ data: {
+ title: '',
+ content: '',
+ width: 0,
+ height: 0,
+ loading: false
+ },
+
+ events: {
+ 'click [data-event="close"]': 'onClickClose',
+ 'click .acf-close-popup': 'onClickClose',
+ },
+
+ setup: function( props ){
+ $.extend(this.data, props);
+ this.$el = $(this.tmpl());
+ },
+
+ initialize: function(){
+ this.render();
+ this.open();
+ },
+
+ tmpl: function(){
+ return [
+ ''
+ ].join('');
+ },
+
+ render: function(){
+
+ // Extract Vars.
+ var title = this.get('title');
+ var content = this.get('content');
+ var loading = this.get('loading');
+ var width = this.get('width');
+ var height = this.get('height');
+
+ // Update.
+ this.title( title );
+ this.content( content );
+ if( width ) {
+ this.$('.acf-popup-box').css('width', width);
+ }
+ if( height ) {
+ this.$('.acf-popup-box').css('min-height', height);
+ }
+ this.loading( loading );
+
+ // Trigger action.
+ acf.doAction('append', this.$el);
+ },
+
+ update: function( props ){
+ this.data = acf.parseArgs(props, this.data);
+ this.render();
+ },
+
+ title: function( title ){
+ this.$('.title:first h3').html( title );
+ },
+
+ content: function( content ){
+ this.$('.inner:first').html( content );
+ },
+
+ loading: function( show ){
+ var $loading = this.$('.loading:first');
+ show ? $loading.show() : $loading.hide();
+ },
+
+ open: function(){
+ $('body').append( this.$el );
+ },
+
+ close: function(){
+ this.remove();
+ },
+
+ onClickClose: function( e, $el ){
+ e.preventDefault();
+ this.close();
+ }
+
+ });
+
+ /**
+ * newPopup
+ *
+ * Creates a new Popup with the supplied props
+ *
+ * @date 17/12/17
+ * @since 5.6.5
+ *
+ * @param object props
+ * @return object
+ */
+
+ acf.newPopup = function( props ){
+ return new acf.models.Popup( props );
+ };
+
+})(jQuery);
+
+(function($, undefined){
+
+ acf.models.Modal = acf.Model.extend({
+ data: {
+ title: '',
+ content: '',
+ toolbar: '',
+ },
+ events: {
+ 'click .acf-modal-close': 'onClickClose',
+ },
+ setup: function( props ){
+ $.extend(this.data, props);
+ this.$el = $();
+ this.render();
+ },
+ initialize: function(){
+ this.open();
+ },
+ render: function(){
+
+ // Extract vars.
+ var title = this.get('title');
+ var content = this.get('content');
+ var toolbar = this.get('toolbar');
+
+ // Create element.
+ var $el = $([
+ '',
+ '
',
+ '
',
+ '
' + title + ' ',
+ ' ',
+ '',
+ '
' + content + '
',
+ '
' + toolbar + '
',
+ '
',
+ '
',
+ '
'
+ ].join('') );
+
+ // Update DOM.
+ if( this.$el ) {
+ this.$el.replaceWith( $el );
+ }
+ this.$el = $el;
+
+ // Trigger action.
+ acf.doAction('append', $el);
+ },
+ update: function( props ){
+ this.data = acf.parseArgs(props, this.data);
+ this.render();
+ },
+ title: function( title ){
+ this.$('.acf-modal-title h2').html( title );
+ },
+ content: function( content ){
+ this.$('.acf-modal-content').html( content );
+ },
+ toolbar: function( toolbar ){
+ this.$('.acf-modal-toolbar').html( toolbar );
+ },
+ open: function(){
+ $('body').append( this.$el );
+ },
+ close: function(){
+ this.remove();
+ },
+ onClickClose: function( e, $el ){
+ e.preventDefault();
+ this.close();
+ }
+ });
+
+ /**
+ * Returns a new modal.
+ *
+ * @date 21/4/20
+ * @since 5.9.0
+ *
+ * @param object props The modal props.
+ * @return object
+ */
+ acf.newModal = function( props ){
+ return new acf.models.Modal( props );
+ };
+
+})(jQuery);
+
+(function($, undefined){
+
+ var panel = new acf.Model({
+
+ events: {
+ 'click .acf-panel-title': 'onClick',
+ },
+
+ onClick: function( e, $el ){
+ e.preventDefault();
+ this.toggle( $el.parent() );
+ },
+
+ isOpen: function( $el ) {
+ return $el.hasClass('-open');
+ },
+
+ toggle: function( $el ){
+ this.isOpen($el) ? this.close( $el ) : this.open( $el );
+ },
+
+ open: function( $el ){
+ $el.addClass('-open');
+ $el.find('.acf-panel-title i').attr('class', 'dashicons dashicons-arrow-down');
+ },
+
+ close: function( $el ){
+ $el.removeClass('-open');
+ $el.find('.acf-panel-title i').attr('class', 'dashicons dashicons-arrow-right');
+ }
+
+ });
+
+})(jQuery);
+
+(function($, undefined){
+
+ var Notice = acf.Model.extend({
+
+ data: {
+ text: '',
+ type: '',
+ timeout: 0,
+ dismiss: true,
+ target: false,
+ close: function(){}
+ },
+
+ events: {
+ 'click .acf-notice-dismiss': 'onClickClose',
+ },
+
+ tmpl: function(){
+ return '
';
+ },
+
+ setup: function( props ){
+ $.extend(this.data, props);
+ this.$el = $(this.tmpl());
+ },
+
+ initialize: function(){
+
+ // render
+ this.render();
+
+ // show
+ this.show();
+ },
+
+ render: function(){
+
+ // class
+ this.type( this.get('type') );
+
+ // text
+ this.html( '' + this.get('text') + '
' );
+
+ // close
+ if( this.get('dismiss') ) {
+ this.$el.append(' ');
+ this.$el.addClass('-dismiss');
+ }
+
+ // timeout
+ var timeout = this.get('timeout');
+ if( timeout ) {
+ this.away( timeout );
+ }
+ },
+
+ update: function( props ){
+
+ // update
+ $.extend(this.data, props);
+
+ // re-initialize
+ this.initialize();
+
+ // refresh events
+ this.removeEvents();
+ this.addEvents();
+ },
+
+ show: function(){
+ var $target = this.get('target');
+ if( $target ) {
+ $target.prepend( this.$el );
+ }
+ },
+
+ hide: function(){
+ this.$el.remove();
+ },
+
+ away: function( timeout ){
+ this.setTimeout(function(){
+ acf.remove( this.$el );
+ }, timeout );
+ },
+
+ type: function( type ){
+
+ // remove prev type
+ var prevType = this.get('type');
+ if( prevType ) {
+ this.$el.removeClass('-' + prevType);
+ }
+
+ // add new type
+ this.$el.addClass('-' + type);
+
+ // backwards compatibility
+ if( type == 'error' ) {
+ this.$el.addClass('acf-error-message');
+ }
+ },
+
+ html: function( html ){
+ this.$el.html( acf.escHtml( html ) );
+ },
+
+ text: function( text ){
+ this.$('p').html( acf.escHtml( text ) );
+ },
+
+ onClickClose: function( e, $el ){
+ e.preventDefault();
+ this.get('close').apply(this, arguments);
+ this.remove();
+ }
+ });
+
+ acf.newNotice = function( props ){
+
+ // ensure object
+ if( typeof props !== 'object' ) {
+ props = { text: props };
+ }
+
+ // instantiate
+ return new Notice( props );
+ };
+
+ var noticeManager = new acf.Model({
+ wait: 'prepare',
+ priority: 1,
+ initialize: function(){
+
+ // vars
+ var $notice = $('.acf-admin-notice');
+
+ // move to avoid WP flicker
+ if( $notice.length ) {
+ $('h1:first').after( $notice );
+ }
+ }
+ });
+
+
+})(jQuery);
+
+(function($, undefined){
+
+ acf.newTooltip = function( props ){
+
+ // ensure object
+ if( typeof props !== 'object' ) {
+ props = { text: props };
+ }
+
+ // confirmRemove
+ if( props.confirmRemove !== undefined ) {
+
+ props.textConfirm = acf.__('Remove');
+ props.textCancel = acf.__('Cancel');
+ return new TooltipConfirm( props );
+
+ // confirm
+ } else if( props.confirm !== undefined ) {
+
+ return new TooltipConfirm( props );
+
+ // default
+ } else {
+ return new Tooltip( props );
+ }
+
+ };
+
+ var Tooltip = acf.Model.extend({
+
+ data: {
+ text: '',
+ timeout: 0,
+ target: null
+ },
+
+ tmpl: function(){
+ return '
';
+ },
+
+ setup: function( props ){
+ $.extend(this.data, props);
+ this.$el = $(this.tmpl());
+ },
+
+ initialize: function(){
+
+ // render
+ this.render();
+
+ // append
+ this.show();
+
+ // position
+ this.position();
+
+ // timeout
+ var timeout = this.get('timeout');
+ if( timeout ) {
+ setTimeout( $.proxy(this.fade, this), timeout );
+ }
+ },
+
+ update: function( props ){
+ $.extend(this.data, props);
+ this.initialize();
+ },
+
+ render: function(){
+ this.html( this.get('text') );
+ },
+
+ show: function(){
+ $('body').append( this.$el );
+ },
+
+ hide: function(){
+ this.$el.remove();
+ },
+
+ fade: function(){
+
+ // add class
+ this.$el.addClass('acf-fade-up');
+
+ // remove
+ this.setTimeout(function(){
+ this.remove();
+ }, 250);
+ },
+
+ html: function( html ){
+ this.$el.html( html );
+ },
+
+ position: function(){
+
+ // vars
+ var $tooltip = this.$el;
+ var $target = this.get('target');
+ if( !$target ) return;
+
+ // Reset position.
+ $tooltip.removeClass('right left bottom top').css({ top: 0, left: 0 });
+
+ // Declare tollerance to edge of screen.
+ var tolerance = 10;
+
+ // Find target position.
+ var targetWidth = $target.outerWidth();
+ var targetHeight = $target.outerHeight();
+ var targetTop = $target.offset().top;
+ var targetLeft = $target.offset().left;
+
+ // Find tooltip position.
+ var tooltipWidth = $tooltip.outerWidth();
+ var tooltipHeight = $tooltip.outerHeight();
+ var tooltipTop = $tooltip.offset().top; // Should be 0, but WP media grid causes this to be 32 (toolbar padding).
+
+ // Assume default top alignment.
+ var top = targetTop - tooltipHeight - tooltipTop;
+ var left = targetLeft + (targetWidth / 2) - (tooltipWidth / 2);
+
+ // Check if too far left.
+ if( left < tolerance ) {
+ $tooltip.addClass('right');
+ left = targetLeft + targetWidth;
+ top = targetTop + (targetHeight / 2) - (tooltipHeight / 2) - tooltipTop;
+
+ // Check if too far right.
+ } else if( (left + tooltipWidth + tolerance) > $(window).width() ) {
+ $tooltip.addClass('left');
+ left = targetLeft - tooltipWidth;
+ top = targetTop + (targetHeight / 2) - (tooltipHeight / 2) - tooltipTop;
+
+ // Check if too far up.
+ } else if( top - $(window).scrollTop() < tolerance ) {
+ $tooltip.addClass('bottom');
+ top = targetTop + targetHeight - tooltipTop;
+
+ // No colision with edges.
+ } else {
+ $tooltip.addClass('top');
+ }
+
+ // update css
+ $tooltip.css({ 'top': top, 'left': left });
+ }
+ });
+
+ var TooltipConfirm = Tooltip.extend({
+
+ data: {
+ text: '',
+ textConfirm: '',
+ textCancel: '',
+ target: null,
+ targetConfirm: true,
+ confirm: function(){},
+ cancel: function(){},
+ context: false
+ },
+
+ events: {
+ 'click [data-event="cancel"]': 'onCancel',
+ 'click [data-event="confirm"]': 'onConfirm',
+ },
+
+ addEvents: function(){
+
+ // add events
+ acf.Model.prototype.addEvents.apply(this);
+
+ // vars
+ var $document = $(document);
+ var $target = this.get('target');
+
+ // add global 'cancel' click event
+ // - use timeout to avoid the current 'click' event triggering the onCancel function
+ this.setTimeout(function(){
+ this.on( $document, 'click', 'onCancel' );
+ });
+
+ // add target 'confirm' click event
+ // - allow setting to control this feature
+ if( this.get('targetConfirm') ) {
+ this.on( $target, 'click', 'onConfirm' );
+ }
+ },
+
+ removeEvents: function(){
+
+ // remove events
+ acf.Model.prototype.removeEvents.apply(this);
+
+ // vars
+ var $document = $(document);
+ var $target = this.get('target');
+
+ // remove custom events
+ this.off( $document, 'click' );
+ this.off( $target, 'click' );
+ },
+
+ render: function(){
+
+ // defaults
+ var text = this.get('text') || acf.__('Are you sure?');
+ var textConfirm = this.get('textConfirm') || acf.__('Yes');
+ var textCancel = this.get('textCancel') || acf.__('No');
+
+ // html
+ var html = [
+ text,
+ '' + textConfirm + ' ',
+ '' + textCancel + ' '
+ ].join(' ');
+
+ // html
+ this.html( html );
+
+ // class
+ this.$el.addClass('-confirm');
+ },
+
+ onCancel: function( e, $el ){
+
+ // prevent default
+ e.preventDefault();
+ e.stopImmediatePropagation();
+
+ // callback
+ var callback = this.get('cancel');
+ var context = this.get('context') || this;
+ callback.apply( context, arguments );
+
+ //remove
+ this.remove();
+ },
+
+ onConfirm: function( e, $el ){
+
+ // Prevent event from propagating completely to allow "targetConfirm" to be clicked.
+ e.preventDefault();
+ e.stopImmediatePropagation();
+
+ // callback
+ var callback = this.get('confirm');
+ var context = this.get('context') || this;
+ callback.apply( context, arguments );
+
+ //remove
+ this.remove();
+ }
+ });
+
+ // storage
+ acf.models.Tooltip = Tooltip;
+ acf.models.TooltipConfirm = TooltipConfirm;
+
+
+ /**
+ * tooltipManager
+ *
+ * description
+ *
+ * @date 17/4/18
+ * @since 5.6.9
+ *
+ * @param type $var Description. Default.
+ * @return type Description.
+ */
+
+ var tooltipHoverHelper = new acf.Model({
+
+ tooltip: false,
+
+ events: {
+ 'mouseenter .acf-js-tooltip': 'showTitle',
+ 'mouseup .acf-js-tooltip': 'hideTitle',
+ 'mouseleave .acf-js-tooltip': 'hideTitle'
+ },
+
+ showTitle: function( e, $el ){
+
+ // vars
+ var title = $el.attr('title');
+
+ // bail ealry if no title
+ if( !title ) {
+ return;
+ }
+
+ // clear title to avoid default browser tooltip
+ $el.attr('title', '');
+
+ // create
+ if( !this.tooltip ) {
+ this.tooltip = acf.newTooltip({
+ text: title,
+ target: $el
+ });
+
+ // update
+ } else {
+ this.tooltip.update({
+ text: title,
+ target: $el
+ });
+ }
+
+ },
+
+ hideTitle: function( e, $el ){
+
+ // hide tooltip
+ this.tooltip.hide();
+
+ // restore title
+ $el.attr('title', this.tooltip.get('text'));
+ }
+ });
+
+})(jQuery);
+
+// @codekit-prepend "_acf.js";
+// @codekit-prepend "_acf-hooks.js";
+// @codekit-prepend "_acf-model.js";
+// @codekit-prepend "_acf-popup.js";
+// @codekit-prepend "_acf-modal.js";
+// @codekit-prepend "_acf-panel.js";
+// @codekit-prepend "_acf-notice.js";
+// @codekit-prepend "_acf-tooltip.js";
\ No newline at end of file
diff --git a/assets/js/acf.min.js b/assets/js/acf.min.js
new file mode 100644
index 0000000..40e8e5b
--- /dev/null
+++ b/assets/js/acf.min.js
@@ -0,0 +1 @@
+!function(t,e){var n={};window.acf=n,n.data={},n.get=function(t){return this.data[t]||null},n.has=function(t){return null!==this.get(t)},n.set=function(t,e){return this.data[t]=e,this};var i=0;n.uniqueId=function(t){var e=++i+"";return t?t+e:e},n.uniqueArray=function(t){function e(t,e,n){return n.indexOf(t)===e}return t.filter(e)};var o="";n.uniqid=function(t,e){var n;void 0===t&&(t="");var i=function(t,e){return e<(t=parseInt(t,10).toString(16)).length?t.slice(t.length-e):e>t.length?Array(e-t.length+1).join("0")+t:t};return o||(o=Math.floor(123456789*Math.random())),o++,n=t,n+=i(parseInt((new Date).getTime()/1e3,10),8),n+=i(o,5),e&&(n+=(10*Math.random()).toFixed(8).toString()),n},n.strReplace=function(t,e,n){return n.split(t).join(e)},n.strCamelCase=function(t){var e=t.match(/([a-zA-Z0-9]+)/g);return e?e.map((function(t,e){var n=t.charAt(0);return(0===e?n.toLowerCase():n.toUpperCase())+t.slice(1)})).join(""):""},n.strPascalCase=function(t){var e=n.strCamelCase(t);return e.charAt(0).toUpperCase()+e.slice(1)},n.strSlugify=function(t){return n.strReplace("_","-",t.toLowerCase())},n.strSanitize=function(t){var e={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","ß":"s","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Ĉ":"C","ĉ":"c","Ċ":"C","ċ":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"D","đ":"d","Ē":"E","ē":"e","Ĕ":"E","ĕ":"e","Ė":"E","ė":"e","Ę":"E","ę":"e","Ě":"E","ě":"e","Ĝ":"G","ĝ":"g","Ğ":"G","ğ":"g","Ġ":"G","ġ":"g","Ģ":"G","ģ":"g","Ĥ":"H","ĥ":"h","Ħ":"H","ħ":"h","Ĩ":"I","ĩ":"i","Ī":"I","ī":"i","Ĭ":"I","ĭ":"i","Į":"I","į":"i","İ":"I","ı":"i","IJ":"IJ","ij":"ij","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","Ĺ":"L","ĺ":"l","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ŀ":"L","ŀ":"l","Ł":"l","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","ʼn":"n","Ō":"O","ō":"o","Ŏ":"O","ŏ":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ŗ":"R","ŗ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ŝ":"S","ŝ":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ŧ":"T","ŧ":"t","Ũ":"U","ũ":"u","Ū":"U","ū":"u","Ŭ":"U","ŭ":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","ſ":"s","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Ǎ":"A","ǎ":"a","Ǐ":"I","ǐ":"i","Ǒ":"O","ǒ":"o","Ǔ":"U","ǔ":"u","Ǖ":"U","ǖ":"u","Ǘ":"U","ǘ":"u","Ǚ":"U","ǚ":"u","Ǜ":"U","ǜ":"u","Ǻ":"A","ǻ":"a","Ǽ":"AE","ǽ":"ae","Ǿ":"O","ǿ":"o"," ":"_","'":"","?":"","/":"","\\":"",".":"",",":"","`":"",">":"","<":"",'"':"","[":"","]":"","|":"","{":"","}":"","(":"",")":""},n=/\W/g,i=function(t){return void 0!==e[t]?e[t]:t};return t=(t=t.replace(n,i)).toLowerCase()},n.strMatch=function(t,e){for(var n=0,i=Math.min(t.length,e.length),o=0;o":">",'"':""","'":"'"};return(""+t).replace(/[&<>"']/g,(function(t){return e[t]}))},n.strUnescape=function(t){var e={"&":"&","<":"<",">":">",""":'"',"'":"'"};return(""+t).replace(/&|<|>|"|'/g,(function(t){return e[t]}))},n.escAttr=n.strEscape,n.escHtml=function(t){return(""+t).replace(/").html(e).text()},n.parseArgs=function(e,n){return"object"!=typeof e&&(e={}),"object"!=typeof n&&(n={}),t.extend({},n,e)},null==window.acfL10n&&(acfL10n={}),n.__=function(t){return acfL10n[t]||t},n._x=function(t,e){return acfL10n[t+"."+e]||acfL10n[t]||t},n._n=function(t,e,i){return 1==i?n.__(t):n.__(e)},n.isArray=function(t){return Array.isArray(t)},n.isObject=function(t){return"object"==typeof t};var r=function(t,e,i){var o=(e=e.replace("[]","[%%index%%]")).match(/([^\[\]])+/g);if(o)for(var r=o.length,a=t,s=0;s');var s=e.parent();e.css({height:n,width:i,margin:o,position:"absolute"}),setTimeout((function(){s.css({opacity:0,height:t.endHeight})}),50),setTimeout((function(){e.attr("style",a),s.remove(),t.complete()}),301)},u=function(e){var n=e.target,i=n.height(),o=n.children().length,r=t(' ');n.addClass("acf-remove-element"),setTimeout((function(){n.html(r)}),251),setTimeout((function(){n.removeClass("acf-remove-element"),r.css({height:e.endHeight})}),300),setTimeout((function(){n.remove(),e.complete()}),451)};n.duplicate=function(t){t instanceof jQuery&&(t={target:t}),(t=n.parseArgs(t,{target:!1,search:"",replace:"",rename:!0,before:function(t){},after:function(t,e){},append:function(t,e){t.after(e)}})).target=t.target||t.$el;var e=t.target;t.search=t.search||e.attr("data-id"),t.replace=t.replace||n.uniqid(),t.before(e),n.doAction("before_duplicate",e);var i=e.clone();return t.rename&&n.rename({target:i,search:t.search,replace:t.replace,replacer:"function"==typeof t.rename?t.rename:null}),i.removeClass("acf-clone"),i.find(".ui-sortable").removeClass("ui-sortable"),t.after(e,i),n.doAction("after_duplicate",e,i),t.append(e,i),n.doAction("duplicate",e,i),n.doAction("append",i),i},n.rename=function(t){t instanceof jQuery&&(t={target:t});var e=(t=n.parseArgs(t,{target:!1,destructive:!1,search:"",replace:"",replacer:null})).target;t.search||(t.search=e.attr("data-id")),t.replace||(t.replace=n.uniqid("acf")),t.replacer||(t.replacer=function(t,e,n,i){return e.replace(n,i)});var i=function(e){return function(n,i){return t.replacer(e,i,t.search,t.replace)}};if(t.destructive){var o=n.strReplace(t.search,t.replace,e.outerHTML());e.replaceWith(o)}else e.attr("data-id",t.replace),e.find('[id*="'+t.search+'"]').attr("id",i("id")),e.find('[for*="'+t.search+'"]').attr("for",i("for")),e.find('[name*="'+t.search+'"]').attr("name",i("name"));return e},n.prepareForAjax=function(t){return t.nonce=n.get("nonce"),t.post_id=n.get("post_id"),n.has("language")&&(t.lang=n.get("language")),t=n.applyFilters("prepare_for_ajax",t)},n.startButtonLoading=function(t){t.prop("disabled",!0),t.after(' ')},n.stopButtonLoading=function(t){t.prop("disabled",!1),t.next(".acf-loading").remove()},n.showLoading=function(t){t.append('
')},n.hideLoading=function(t){t.children(".acf-loading-overlay").remove()},n.updateUserSetting=function(e,i){var o={action:"acf/ajax/user_setting",name:e,value:i};t.ajax({url:n.get("ajaxurl"),data:n.prepareForAjax(o),type:"post",dataType:"html"})},n.val=function(t,e,n){var i=t.val();return e!==i&&(t.val(e),t.is("select")&&null===t.val()?(t.val(i),!1):(!0!==n&&t.trigger("change"),!0))},n.show=function(t,e){return e&&n.unlock(t,"hidden",e),!n.isLocked(t,"hidden")&&(!!t.hasClass("acf-hidden")&&(t.removeClass("acf-hidden"),!0))},n.hide=function(t,e){return e&&n.lock(t,"hidden",e),!t.hasClass("acf-hidden")&&(t.addClass("acf-hidden"),!0)},n.isHidden=function(t){return t.hasClass("acf-hidden")},n.isVisible=function(t){return!n.isHidden(t)};var f=function(t,e){return!t.hasClass("acf-disabled")&&(e&&n.unlock(t,"disabled",e),!n.isLocked(t,"disabled")&&(!!t.prop("disabled")&&(t.prop("disabled",!1),!0)))};n.enable=function(e,n){if(e.attr("name"))return f(e,n);var i=!1;return e.find("[name]").each((function(){var e;f(t(this),n)&&(i=!0)})),i};var d=function(t,e){return e&&n.lock(t,"disabled",e),!t.prop("disabled")&&(t.prop("disabled",!0),!0)};n.disable=function(e,n){if(e.attr("name"))return d(e,n);var i=!1;return e.find("[name]").each((function(){var e;d(t(this),n)&&(i=!0)})),i},n.isset=function(t){for(var e=1;e-1){var a=window.URL||window.webkitURL,s=new Image;s.onload=function(){o.width=this.width,o.height=this.height,e(o)},s.src=a.createObjectURL(r)}else e(o);else e(o)},n.isAjaxSuccess=function(t){return t&&t.success},n.getAjaxMessage=function(t){return n.isget(t,"data","message")},n.getAjaxError=function(t){return n.isget(t,"data","error")},n.getXhrError=function(t){return t.responseJSON&&t.responseJSON.message?t.responseJSON.message:t.statusText?t.statusText:""},n.renderSelect=function(t,e){var i=t.val(),o=[],r=function(t){var e="";return t.map((function(t){var i=t.text||t.label||"",a=t.id||t.value||"";o.push(a),t.children?e+=''+r(t.children)+" ":e+='"+n.strEscape(i)+" "})),e};return t.html(r(e)),o.indexOf(i)>-1&&t.val(i),t.val()};var h=function(t,e){return t.data("acf-lock-"+e)||[]},p=function(t,e,n){t.data("acf-lock-"+e,n)},v,g,m,y,w,x;n.lock=function(t,e,n){var i=h(t,e),o;i.indexOf(n)<0&&(i.push(n),p(t,e,i))},n.unlock=function(t,e,n){var i=h(t,e),o=i.indexOf(n);return o>-1&&(i.splice(o,1),p(t,e,i)),0===i.length},n.isLocked=function(t,e){return h(t,e).length>0},n.isGutenberg=function(){return!!(window.wp&&wp.data&&wp.data.select&&wp.data.select("core/editor"))},n.objectToArray=function(t){return Object.keys(t).map((function(e){return t[e]}))},n.debounce=function(t,e){var n;return function(){var i=this,o=arguments,r=function(){t.apply(i,o)};clearTimeout(n),n=setTimeout(r,e)}},n.throttle=function(t,e){var n=!1;return function(){n||(n=!0,setTimeout((function(){n=!1}),e),t.apply(this,arguments))}},n.isInView=function(t){t instanceof jQuery&&(t=t[0]);var e=t.getBoundingClientRect();return e.top!==e.bottom&&e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)},n.onceInView=(v=[],g=0,m=function(){v.forEach((function(t){n.isInView(t.el)&&(t.callback.apply(this),x(t.id))}))},y=n.debounce(m,300),w=function(e,n){v.length||t(window).on("scroll resize",y).on("acfrefresh orientationchange",m),v.push({id:g++,el:e,callback:n})},x=function(e){(v=v.filter((function(t){return t.id!==e}))).length||t(window).off("scroll resize",y).off("acfrefresh orientationchange",m)},function(t,e){t instanceof jQuery&&(t=t[0]),n.isInView(t)?e.apply(this):w(t,e)}),n.once=function(t){var e=0;return function(){return e++>0?t=void 0:t.apply(this,arguments)}},n.focusAttention=function(e){var i=1e3;e.addClass("acf-attention -focused");var o=500;n.isInView(e)||(t("body, html").animate({scrollTop:e.offset().top-t(window).height()/2},500),i+=500);var r=250;setTimeout((function(){e.removeClass("-focused"),setTimeout((function(){e.removeClass("acf-attention")}),250)}),i)},n.onFocus=function(e,n){var i=!1,o=!1,r=function(){i=!0,setTimeout((function(){i=!1}),1),l(!0)},a=function(){i||l(!1)},s=function(){t(document).on("click",a),e.on("blur","input, select, textarea",a)},c=function(){t(document).off("click",a),e.off("blur","input, select, textarea",a)},l=function(t){o!==t&&(t?s():c(),o=t,n(t))};e.on("click",r),e.on("focus","input, select, textarea",r)},t.fn.exists=function(){return t(this).length>0},t.fn.outerHTML=function(){return t(this).get(0).outerHTML},Array.prototype.indexOf||(Array.prototype.indexOf=function(e){return t.inArray(e,this)}),n.refresh=n.debounce((function(){t(window).trigger("acfrefresh"),n.doAction("refresh")}),0),t(document).ready((function(){n.doAction("ready")})),t(window).on("load",(function(){n.doAction("load")})),t(window).on("beforeunload",(function(){n.doAction("unload")})),t(window).on("resize",(function(){n.doAction("resize")})),t(document).on("sortstart",(function(t,e){n.doAction("sortstart",e.item,e.placeholder)})),t(document).on("sortstop",(function(t,e){n.doAction("sortstop",e.item,e.placeholder)}))}(jQuery),function(t,e){"use strict";var n=function(){function t(){return d}function e(t,e,n,i){return"string"==typeof t&&"function"==typeof e&&c("actions",t,e,n=parseInt(n||10,10),i),f}function n(){var t=Array.prototype.slice.call(arguments),e=t.shift();return"string"==typeof e&&u("actions",e,t),f}function i(t,e){return"string"==typeof t&&s("actions",t,e),f}function o(t,e,n,i){return"string"==typeof t&&"function"==typeof e&&c("filters",t,e,n=parseInt(n||10,10),i),f}function r(){var t=Array.prototype.slice.call(arguments),e=t.shift();return"string"==typeof e?u("filters",e,t):f}function a(t,e){return"string"==typeof t&&s("filters",t,e),f}function s(t,e,n,i){if(d[t][e])if(n){var o=d[t][e],r;if(i)for(r=o.length;r--;){var a=o[r];a.callback===n&&a.context===i&&o.splice(r,1)}else for(r=o.length;r--;)o[r].callback===n&&o.splice(r,1)}else d[t][e]=[]}function c(t,e,n,i,o){var r={callback:n,priority:i,context:o},a=d[t][e];a?(a.push(r),a=l(a)):a=[r],d[t][e]=a}function l(t){for(var e,n,i,o=1,r=t.length;oe.priority;)t[n]=t[n-1],--n;t[n]=e}return t}function u(t,e,n){var i=d[t][e];if(!i)return"filters"===t&&n[0];var o=0,r=i.length;if("filters"===t)for(;o ', 'acf' ), admin_url('edit.php?post_type=acf-field-group&page=acf-settings-info') ); ?>
+ See what\'s new', 'acf' ), admin_url('edit.php?post_type=acf-field-group') ); ?>
\n", 'acf.data = ' . wp_json_encode( $this->data ) . ';' );
- // todo: force 'acf-input' script enqueue if not yet included
- // - fixes potential timing issue if acf_enqueue_assest() was called during body
+ if( wp_script_is('acf-input') ) {
+
+ /**
+ * Filters an empty array for compat l10n data.
+ *
+ * @since 5.0.0
+ *
+ * @param array $data An array of data to append to.
+ */
+ $compat_l10n = apply_filters( 'acf/input/admin_l10n', array() );
+ if( $compat_l10n ) {
+ printf( "\n", 'acf.l10n = ' . wp_json_encode( $compat_l10n ) . ';' );
+ }
+
+ /**
+ * Fires during "admin_footer" when ACF scripts are enqueued.
+ *
+ * @since 5.6.9
+ *
+ * @param void
+ */
+ do_action( 'acf/input/admin_footer' );
+ do_action( 'acf/input/admin_print_footer_scripts' );
+ }
- // localize data
- ?>
-
-
-
-\n%s\n\n", "acf.doAction( 'prepare' );" );
}
-
/**
- * admin_print_footer_scripts
- *
- * description
- *
- * @date 18/4/18
- * @since 5.6.9
- *
- * @param type $var Description. Default.
- * @return type Description.
- */
-
- function admin_print_footer_scripts() {
- do_action('acf/admin_print_footer_scripts');
- }
-
- /*
- * enqueue_uploader
- *
- * This function will render a WP WYSIWYG and enqueue media
- *
- * @type function
- * @date 27/10/2014
- * @since 5.0.9
- *
- * @param n/a
- * @return n/a
- */
-
- function enqueue_uploader() {
-
- // run only once
- if( acf_has_done('enqueue_uploader') ) {
- return;
- }
-
- // bail early if doing ajax
- if( acf_is_ajax() ) {
- return;
- }
-
- // enqueue media if user can upload
- if( current_user_can('upload_files') ) {
- wp_enqueue_media();
- }
-
- // create dummy editor
+ * Prints uploader scripts in footer.
+ *
+ * @date 11/06/2020
+ * @since 5.9.0
+ *
+ * @param void
+ * @return void
+ */
+ public function print_uploader_scripts() {
+ // Todo: investigate output-buffer to hide HTML.
?>
-
+
add_text( $text );
}
-
/**
-* acf_localize_data
-*
-* description
-*
-* @date 13/4/18
-* @since 5.6.9
-*
-* @param type $var Description. Default.
-* @return type Description.
-*/
-
+ * Appends an array of l10n data for localization.
+ *
+ * @date 13/4/18
+ * @since 5.6.9
+ *
+ * @param array $data An array of data for l10n.
+ * @return void
+ */
function acf_localize_data( $data ) {
return acf_get_instance('ACF_Assets')->add_data( $data );
}
-
-/*
-* acf_enqueue_scripts
-*
-*
-*
-* @type function
-* @date 6/10/13
-* @since 5.0.0
-*
-* @param n/a
-* @return n/a
-*/
-
-function acf_enqueue_scripts( $args = array() ) {
- return acf_get_instance('ACF_Assets')->enqueue_scripts( $args );
+/**
+ * Enqueues a script with support for supplemental inline scripts.
+ *
+ * @date 27/4/20
+ * @since 5.9.0
+ *
+ * @param string $name The script name.
+ * @return void
+ */
+function acf_enqueue_script( $name ) {
+ return acf_get_instance('ACF_Assets')->enqueue_script( $name );
}
+/**
+ * Enqueues the input scripts required for fields.
+ *
+ * @date 13/4/18
+ * @since 5.6.9
+ *
+ * @param array $args See ACF_Assets::enqueue_scripts() for a list of args.
+ * @return void
+ */
+function acf_enqueue_scripts( $args = array() ) {
+ return acf_get_instance('ACF_Assets')->enqueue( $args );
+}
-/*
-* acf_enqueue_uploader
-*
-* This function will render a WP WYSIWYG and enqueue media
-*
-* @type function
-* @date 27/10/2014
-* @since 5.0.9
-*
-* @param n/a
-* @return n/a
-*/
-
+/**
+ * Enqueues the WP media uploader scripts and styles.
+ *
+ * @date 27/10/2014
+ * @since 5.0.9
+ *
+ * @param void
+ * @return void
+ */
function acf_enqueue_uploader() {
return acf_get_instance('ACF_Assets')->enqueue_uploader();
}
-
-?>
\ No newline at end of file
diff --git a/includes/fields/class-acf-field-checkbox.php b/includes/fields/class-acf-field-checkbox.php
index 3fc4f8b..b47b889 100644
--- a/includes/fields/class-acf-field-checkbox.php
+++ b/includes/fields/class-acf-field-checkbox.php
@@ -442,8 +442,10 @@ class acf_field_checkbox extends acf_field {
function update_field( $field ) {
- return acf_get_field_type('select')->update_field( $field );
-
+ // Decode choices (convert to array).
+ $field['choices'] = acf_decode_choices( $field['choices'] );
+ $field['default_value'] = acf_decode_choices( $field['default_value'], true );
+ return $field;
}
@@ -479,7 +481,10 @@ class acf_field_checkbox extends acf_field {
// get raw $field (may have been changed via repeater field)
// if field is local, it won't have an ID
$selector = $field['ID'] ? $field['ID'] : $field['key'];
- $field = acf_get_field( $selector, true );
+ $field = acf_get_field( $selector );
+ if( !$field ) {
+ return false;
+ }
// bail early if no ID (JSON only)
diff --git a/includes/fields/class-acf-field-color_picker.php b/includes/fields/class-acf-field-color_picker.php
index 6b6657f..e5a7aa8 100644
--- a/includes/fields/class-acf-field-color_picker.php
+++ b/includes/fields/class-acf-field-color_picker.php
@@ -45,40 +45,20 @@ class acf_field_color_picker extends acf_field {
*/
function input_admin_enqueue_scripts() {
-
- // globals
- global $wp_scripts;
-
-
- // register if not already (on front end)
- // http://wordpress.stackexchange.com/questions/82718/how-do-i-implement-the-wordpress-iris-picker-into-my-plugin-on-the-front-end
- if( !isset($wp_scripts->registered['iris']) ) {
-
- // styles
- wp_register_style('wp-color-picker', admin_url('css/color-picker.css'), array(), '', true);
-
-
- // scripts
- wp_register_script('iris', admin_url('js/iris.min.js'), array('jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch'), '1.0.7', true);
- wp_register_script('wp-color-picker', admin_url('js/color-picker.min.js'), array('iris'), '', true);
-
-
- // localize
- wp_localize_script('wp-color-picker', 'wpColorPickerL10n', array(
- 'clear' => __('Clear', 'acf' ),
- 'defaultString' => __('Default', 'acf' ),
- 'pick' => __('Select Color', 'acf' ),
- 'current' => __('Current Color', 'acf' )
- ));
-
+
+ // Register scripts for non-admin.
+ // Applies logic from wp_default_scripts() function.
+ if( !is_admin() ) {
+ $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
+ $scripts = wp_scripts();
+ $scripts->add( 'iris', '/wp-admin/js/iris.min.js', array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), '1.0.7', 1 );
+ $scripts->add( 'wp-color-picker', "/wp-admin/js/color-picker$suffix.js", array( 'iris' ), false, 1 );
+ $scripts->set_translations( 'wp-color-picker' );
}
-
- // enqueue
- wp_enqueue_style('wp-color-picker');
- wp_enqueue_script('wp-color-picker');
-
-
+ // Enqueue.
+ wp_enqueue_style( 'wp-color-picker' );
+ wp_enqueue_script( 'wp-color-picker' );
}
diff --git a/includes/fields/class-acf-field-file.php b/includes/fields/class-acf-field-file.php
index 7e081d2..bee1a06 100644
--- a/includes/fields/class-acf-field-file.php
+++ b/includes/fields/class-acf-field-file.php
@@ -147,11 +147,10 @@ class acf_field_file extends acf_field {
diff --git a/includes/fields/class-acf-field-google-map.php b/includes/fields/class-acf-field-google-map.php
index a4f2519..3cb2599 100644
--- a/includes/fields/class-acf-field-google-map.php
+++ b/includes/fields/class-acf-field-google-map.php
@@ -143,9 +143,9 @@ class acf_field_google_map extends acf_field {
" value="" />
diff --git a/includes/fields/class-acf-field-group.php b/includes/fields/class-acf-field-group.php
index 4e2cc5f..13c7f04 100644
--- a/includes/fields/class-acf-field-group.php
+++ b/includes/fields/class-acf-field-group.php
@@ -571,78 +571,54 @@ class acf_field__group extends acf_field {
}
-
- /*
- * prepare_field_for_export
- *
- * description
- *
- * @type function
- * @date 11/03/2014
- * @since 5.0.0
- *
- * @param $post_id (int)
- * @return $post_id (int)
- */
-
+ /**
+ * prepare_field_for_export
+ *
+ * Prepares the field for export.
+ *
+ * @date 11/03/2014
+ * @since 5.0.0
+ *
+ * @param array $field The field settings.
+ * @return array
+ */
function prepare_field_for_export( $field ) {
- // bail early if no sub fields
- if( empty($field['sub_fields']) ) return $field;
-
-
- // prepare
- $field['sub_fields'] = acf_prepare_fields_for_export( $field['sub_fields'] );
-
-
- // return
+ // Check for sub fields.
+ if( !empty($field['sub_fields']) ) {
+ $field['sub_fields'] = acf_prepare_fields_for_export( $field['sub_fields'] );
+ }
return $field;
-
}
-
- /*
- * prepare_field_for_import
- *
- * description
- *
- * @type function
- * @date 11/03/2014
- * @since 5.0.0
- *
- * @param $post_id (int)
- * @return $post_id (int)
- */
-
+ /**
+ * prepare_field_for_import
+ *
+ * Returns a flat array of fields containing all sub fields ready for import.
+ *
+ * @date 11/03/2014
+ * @since 5.0.0
+ *
+ * @param array $field The field settings.
+ * @return array
+ */
function prepare_field_for_import( $field ) {
- // bail early if no sub fields
- if( empty($field['sub_fields']) ) return $field;
-
-
- // vars
- $sub_fields = $field['sub_fields'];
-
-
- // reset field setting
- $field['sub_fields'] = array();
-
-
- // loop
- foreach( $sub_fields as &$sub_field ) {
+ // Check for sub fields.
+ if( !empty($field['sub_fields']) ) {
+ $sub_fields = acf_extract_var( $field, 'sub_fields' );
- $sub_field['parent'] = $field['key'];
+ // Modify sub fields.
+ foreach( $sub_fields as $i => $sub_field ) {
+ $sub_fields[ $i ]['parent'] = $field['key'];
+ $sub_fields[ $i ]['menu_order'] = $i;
+ }
+
+ // Return array of [field, sub_1, sub_2, ...].
+ return array_merge( array($field), $sub_fields );
}
-
-
- // merge
- array_unshift($sub_fields, $field);
-
-
- // return
- return $sub_fields;
-
+ return $field;
}
diff --git a/includes/fields/class-acf-field-image.php b/includes/fields/class-acf-field-image.php
index 46dbcc1..5bc93c0 100644
--- a/includes/fields/class-acf-field-image.php
+++ b/includes/fields/class-acf-field-image.php
@@ -67,99 +67,89 @@ class acf_field_image extends acf_field {
));
}
-
- /*
- * render_field()
- *
- * Create the HTML interface for your field
- *
- * @param $field - an array holding all the field's data
- *
- * @type action
- * @since 3.6
- * @date 23/01/13
- */
-
+ /**
+ * Renders the field HTML.
+ *
+ * @date 23/01/13
+ * @since 3.6.0
+ *
+ * @param array $field The field settings.
+ * @return void
+ */
function render_field( $field ) {
-
- // vars
$uploader = acf_get_setting('uploader');
-
- // enqueue
- if( $uploader == 'wp' ) {
+ // Enqueue uploader scripts
+ if( $uploader === 'wp' ) {
acf_enqueue_uploader();
}
-
-
- // vars
- $url = '';
- $alt = '';
- $div = array(
- 'class' => 'acf-image-uploader',
- 'data-preview_size' => $field['preview_size'],
- 'data-library' => $field['library'],
- 'data-mime_types' => $field['mime_types'],
- 'data-uploader' => $uploader
+
+ // Elements and attributes.
+ $value = '';
+ $div_attrs = array(
+ 'class' => 'acf-image-uploader',
+ 'data-preview_size' => $field['preview_size'],
+ 'data-library' => $field['library'],
+ 'data-mime_types' => $field['mime_types'],
+ 'data-uploader' => $uploader
+ );
+ $img_attrs = array(
+ 'src' => '',
+ 'alt' => '',
+ 'data-name' => 'image'
);
-
- // has value?
- if( $field['value'] ) {
-
- // update vars
- $url = wp_get_attachment_image_src($field['value'], $field['preview_size']);
- $alt = get_post_meta($field['value'], '_wp_attachment_image_alt', true);
-
-
- // url exists
- if( $url ) $url = $url[0];
-
-
- // url exists
- if( $url ) {
- $div['class'] .= ' has-value';
- }
-
+ // Detect value.
+ if( $field['value'] && is_numeric($field['value']) ) {
+ $image = wp_get_attachment_image_src( $field['value'], $field['preview_size'] );
+ if( $image ) {
+ $value = $field['value'];
+ $img_attrs['src'] = $image[0];
+ $img_attrs['alt'] = get_post_meta( $field['value'], '_wp_attachment_image_alt', true );
+ $div_attrs['class'] .= ' has-value';
+ }
}
-
- // get size of preview value
- $size = acf_get_image_size($field['preview_size']);
-
-?>
-
>
- $field['name'], 'value' => $field['value'] )); ?>
-
style="">
-
+ // Add "preview size" max width and height style.
+ // Apply max-width to wrap, and max-height to img for max compatibility with field widths.
+ $size = acf_get_image_size( $field['preview_size'] );
+ $size_w = $size['width'] ? $size['width'] . 'px' : '100%';
+ $size_h = $size['height'] ? $size['height'] . 'px' : '100%';
+ $img_attrs['style'] = sprintf( 'max-height: %s;', $size_h );
+
+ // Render HTML.
+ ?>
+
>
+ $field['name'],
+ 'value' => $value
+ )); ?>
+
+
/>
-
-
+
-
+
-
- $field['name'], 'id' => $field['id'] )); ?>
+ $field['name'],
+ 'id' => $field['id']
+ )); ?>
-
-
-
-
+
- home_url(),
- 'text' => home_url()
- );
-
+ // Generate unique list of URLs.
+ $links = array();
+ $links[] = home_url();
foreach( $args['post_type'] as $post_type ) {
-
- // vars
- $archive_link = get_post_type_archive_link( $post_type );
-
-
- // bail ealry if no link
- if( !$archive_link ) continue;
-
-
- // bail early if no search match
- if( $is_search && stripos($archive_link, $s) === false ) continue;
-
-
- // append
- $archives[] = array(
- 'id' => $archive_link,
- 'text' => $archive_link
- );
-
+ $links[] = get_post_type_archive_link( $post_type );
+ }
+ $links = array_filter( $links );
+ $links = array_unique( $links );
+
+ // Convert list into choices.
+ $children = array();
+ foreach( $links as $link ) {
+
+ // Ignore if search does not match.
+ if( $is_search && stripos($link, $s) === false ) {
+ continue;
+ }
+ $children[] = array(
+ 'id' => $link,
+ 'text' => $link
+ );
+ }
+ if( $children ) {
+ $results[] = array(
+ 'text' => __('Archives', 'acf'),
+ 'children' => $children
+ );
}
-
-
- // append
- $results[] = array(
- 'text' => __('Archives', 'acf'),
- 'children' => $archives
- );
-
}
diff --git a/includes/fields/class-acf-field-range.php b/includes/fields/class-acf-field-range.php
index 68cfd71..8970326 100644
--- a/includes/fields/class-acf-field-range.php
+++ b/includes/fields/class-acf-field-range.php
@@ -100,10 +100,16 @@ class acf_field_range extends acf_field_number {
// range
$html .= acf_get_text_input( $atts );
-
- // calculate input width based on character length (+1 char if using decimals)
- $len = strlen( (string) $field['max'] );
- if( $atts['step'] < 1 ) $len++;
+
+ // Calculate input width based on the largest possible input character length.
+ // Also take into account the step size for decimal steps minus - 1.5 chars for leading "0.".
+ $len = max(
+ strlen( strval($field['min']) ),
+ strlen( strval($field['max']) )
+ );
+ if( floatval($atts['step']) < 1 ) {
+ $len += strlen( strval($field['step']) ) - 1.5;
+ }
// input
$html .= acf_get_text_input(array(
diff --git a/includes/fields/class-acf-field-relationship.php b/includes/fields/class-acf-field-relationship.php
index e7090b6..4cff95e 100644
--- a/includes/fields/class-acf-field-relationship.php
+++ b/includes/fields/class-acf-field-relationship.php
@@ -473,9 +473,7 @@ class acf_field_relationship extends acf_field {
/* search */
if( in_array('search', $filters) ): ?>
-
- __("Search...",'acf'), 'data-filter' => 's') ); ?>
-
+ __("Search...",'acf'), 'data-filter' => 's') ); ?>
-
- $filter_post_type_choices, 'data-filter' => 'post_type') ); ?>
-
+ $filter_post_type_choices, 'data-filter' => 'post_type') ); ?>
-
- $filter_taxonomy_choices, 'data-filter' => 'taxonomy') ); ?>
-
+ $filter_taxonomy_choices, 'data-filter' => 'taxonomy') ); ?>
@@ -521,7 +515,7 @@ class acf_field_relationship extends acf_field {
$field['name'].'[]', 'value' => $post->ID) ); ?>
- get_post_title( $post, $field ); ?>
+ get_post_title( $post, $field ) ); ?>
diff --git a/includes/fields/class-acf-field-select.php b/includes/fields/class-acf-field-select.php
index 508441a..99f207c 100644
--- a/includes/fields/class-acf-field-select.php
+++ b/includes/fields/class-acf-field-select.php
@@ -452,15 +452,18 @@ class acf_field_select extends acf_field {
* @param $field (array) the field array holding all the field options
* @return $value
*/
-
function load_value( $value, $post_id, $field ) {
- // ACF4 null
- if( $value === 'null' ) return false;
-
-
- // return
- return $value;
+ // Return an array when field is set for multiple.
+ if( $field['multiple'] ) {
+ if( acf_is_empty( $value ) ) {
+ return array();
+ }
+ return acf_array( $value );
+ }
+
+ // Otherwise, return a single value.
+ return acf_unarray( $value );
}
@@ -484,7 +487,11 @@ class acf_field_select extends acf_field {
// decode choices (convert to array)
$field['choices'] = acf_decode_choices($field['choices']);
$field['default_value'] = acf_decode_choices($field['default_value'], true);
-
+
+ // Convert back to string for single selects.
+ if( !$field['multiple'] ) {
+ $field['default_value'] = acf_unarray( $field['default_value'] );
+ }
// return
return $field;
@@ -565,28 +572,15 @@ class acf_field_select extends acf_field {
*
* @return $value (mixed) the modified value
*/
-
function format_value( $value, $post_id, $field ) {
-
- // array
- if( acf_is_array($value) ) {
-
- foreach( $value as $i => $v ) {
-
- $value[ $i ] = $this->format_value_single( $v, $post_id, $field );
-
+ if( is_array( $value ) ) {
+ foreach( $value as $i => $val ) {
+ $value[ $i ] = $this->format_value_single( $val, $post_id, $field );
}
-
} else {
-
$value = $this->format_value_single( $value, $post_id, $field );
-
}
-
-
- // return
return $value;
-
}
diff --git a/includes/fields/class-acf-field-taxonomy.php b/includes/fields/class-acf-field-taxonomy.php
index 27b8371..988d349 100644
--- a/includes/fields/class-acf-field-taxonomy.php
+++ b/includes/fields/class-acf-field-taxonomy.php
@@ -474,26 +474,23 @@ class acf_field_taxonomy extends acf_field {
function save_post( $post_id ) {
- // bail ealry if no terms
- if( empty($this->save_post_terms) ) return;
-
-
- // vars
- $info = acf_get_post_id_info($post_id);
-
-
- // loop
- foreach( $this->save_post_terms as $taxonomy => $term_ids ){
+ // Check for saved terms.
+ if( !empty($this->save_post_terms) ) {
- // save
- wp_set_object_terms( $info['id'], $term_ids, $taxonomy, false );
+ // Determine object ID allowing for non "post" $post_id (user, taxonomy, etc).
+ // Although not fully supported by WordPress, non "post" objects may use the term relationships table.
+ // Sharing taxonomies across object types is discoraged, but unique taxonomies work well.
+ // Note: Do not attempt to restrict to "post" only. This has been attempted in 5.8.9 and later reverted.
+ $info = acf_get_post_id_info( $post_id );
+ // Loop over taxonomies and save terms.
+ foreach( $this->save_post_terms as $taxonomy => $term_ids ){
+ wp_set_object_terms( $info['id'], $term_ids, $taxonomy, false );
+ }
+
+ // Reset storage.
+ $this->save_post_terms = array();
}
-
-
- // reset array ( WP saves twice )
- $this->save_post_terms = array();
-
}
diff --git a/includes/fields/class-acf-field-text.php b/includes/fields/class-acf-field-text.php
index aababa4..fcaaaaa 100644
--- a/includes/fields/class-acf-field-text.php
+++ b/includes/fields/class-acf-field-text.php
@@ -153,7 +153,7 @@ class acf_field_text extends acf_field {
function validate_value( $valid, $value, $field, $input ){
// Check maxlength
- if( $field['maxlength'] && mb_strlen(wp_unslash($value)) > $field['maxlength'] ) {
+ if( $field['maxlength'] && (acf_strlen($value) > $field['maxlength']) ) {
return sprintf( __('Value must not exceed %d characters', 'acf'), $field['maxlength'] );
}
diff --git a/includes/fields/class-acf-field-textarea.php b/includes/fields/class-acf-field-textarea.php
index a096e49..8b87cd1 100644
--- a/includes/fields/class-acf-field-textarea.php
+++ b/includes/fields/class-acf-field-textarea.php
@@ -209,9 +209,7 @@ class acf_field_textarea extends acf_field {
function validate_value( $valid, $value, $field, $input ){
// Check maxlength.
- // Note: Due to the way strlen (and mb_strlen) work, line breaks count as two characters in PHP, but not in Javascript (or HTML).
- // To avoid incorrectly calculating the length, replace double line breaks.
- if( $field['maxlength'] && mb_strlen(str_replace("\r\n", "\n", wp_unslash($value))) > $field['maxlength'] ) {
+ if( $field['maxlength'] && (acf_strlen($value) > $field['maxlength']) ) {
return sprintf( __('Value must not exceed %d characters', 'acf'), $field['maxlength'] );
}
diff --git a/includes/fields/class-acf-field-time_picker.php b/includes/fields/class-acf-field-time_picker.php
index efdaf27..2c732a7 100644
--- a/includes/fields/class-acf-field-time_picker.php
+++ b/includes/fields/class-acf-field-time_picker.php
@@ -100,8 +100,8 @@ class acf_field_time_picker extends acf_field {
function render_field_settings( $field ) {
// vars
- $g_i_a = date('g:i a');
- $H_i_s = date('H:i:s');
+ $g_i_a = date_i18n('g:i a');
+ $H_i_s = date_i18n('H:i:s');
// display_format
diff --git a/includes/fields/class-acf-field-user.php b/includes/fields/class-acf-field-user.php
index 46b0808..775ee5a 100644
--- a/includes/fields/class-acf-field-user.php
+++ b/includes/fields/class-acf-field-user.php
@@ -1,26 +1,21 @@
name = 'user';
$this->label = __("User",'acf');
$this->category = 'relational';
@@ -31,302 +26,78 @@ class acf_field_user extends acf_field {
'return_format' => 'array',
);
+ // Register filter variations.
+ acf_add_filter_variations( 'acf/fields/user/query', array('name', 'key'), 1 );
+ acf_add_filter_variations( 'acf/fields/user/result', array('name', 'key'), 2 );
+ acf_add_filter_variations( 'acf/fields/user/search_columns', array('name', 'key'), 3 );
- // extra
- add_action('wp_ajax_acf/fields/user/query', array($this, 'ajax_query'));
- add_action('wp_ajax_nopriv_acf/fields/user/query', array($this, 'ajax_query'));
-
- }
-
-
- /*
- * ajax_query
- *
- * description
- *
- * @type function
- * @date 24/10/13
- * @since 5.0.0
- *
- * @param $post_id (int)
- * @return $post_id (int)
- */
-
- function ajax_query() {
-
- // validate
- if( !acf_verify_ajax() ) die();
-
-
- // get choices
- $response = $this->get_ajax_query( $_POST );
-
-
- // return
- acf_send_ajax_results($response);
-
+ // Add AJAX query.
+ add_action( 'wp_ajax_acf/fields/user/query', array( $this, 'ajax_query' ) );
+ add_action( 'wp_ajax_nopriv_acf/fields/user/query', array( $this, 'ajax_query' ) );
}
-
- /*
- * get_ajax_query
- *
- * This function will return an array of data formatted for use in a select2 AJAX response
- *
- * @type function
- * @date 15/10/2014
- * @since 5.0.9
- *
- * @param $options (array)
- * @return (array)
- */
-
- function get_ajax_query( $options = array() ) {
+ /**
+ * Renders the field settings HTML.
+ *
+ * @date 23/01/13
+ * @since 3.6.0
+ *
+ * @param array $field The ACF field.
+ * @return void
+ */
+ function render_field_settings( $field ) {
- // defaults
- $options = acf_parse_args($options, array(
- 'post_id' => 0,
- 's' => '',
- 'field_key' => '',
- 'paged' => 1
+ acf_render_field_setting( $field, array(
+ 'label' => __('Filter by role','acf'),
+ 'instructions' => '',
+ 'type' => 'select',
+ 'name' => 'role',
+ 'choices' => acf_get_user_role_labels(),
+ 'multiple' => 1,
+ 'ui' => 1,
+ 'allow_null' => 1,
+ 'placeholder' => __("All user roles",'acf'),
));
+ acf_render_field_setting( $field, array(
+ 'label' => __('Allow Null?','acf'),
+ 'instructions' => '',
+ 'name' => 'allow_null',
+ 'type' => 'true_false',
+ 'ui' => 1,
+ ));
- // load field
- $field = acf_get_field( $options['field_key'] );
- if( !$field ) return false;
-
-
- // vars
- $results = array();
- $args = array();
- $s = false;
- $is_search = false;
-
-
- // paged
- $args['users_per_page'] = 20;
- $args['paged'] = $options['paged'];
-
-
- // search
- if( $options['s'] !== '' ) {
-
- // strip slashes (search may be integer)
- $s = wp_unslash( strval($options['s']) );
-
-
- // update vars
- $args['s'] = $s;
- $is_search = true;
-
- }
-
-
- // role
- if( !empty($field['role']) ) {
-
- $args['role'] = acf_get_array( $field['role'] );
-
- }
-
-
- // search
- if( $is_search ) {
-
- // append to $args
- $args['search'] = '*' . $options['s'] . '*';
-
-
- // add reference
- $this->field = $field;
-
-
- // add filter to modify search colums
- add_filter('user_search_columns', array($this, 'user_search_columns'), 10, 3);
-
- }
-
-
- // filters
- $args = apply_filters("acf/fields/user/query", $args, $field, $options['post_id']);
- $args = apply_filters("acf/fields/user/query/name={$field['_name']}", $args, $field, $options['post_id']);
- $args = apply_filters("acf/fields/user/query/key={$field['key']}", $args, $field, $options['post_id']);
-
-
- // get users
- $groups = acf_get_grouped_users( $args );
-
-
- // loop
- if( !empty($groups) ) {
-
- foreach( array_keys($groups) as $group_title ) {
-
- // vars
- $users = acf_extract_var( $groups, $group_title );
- $data = array(
- 'text' => $group_title,
- 'children' => array()
- );
-
-
- // append users
- foreach( array_keys($users) as $user_id ) {
-
- $users[ $user_id ] = $this->get_result( $users[ $user_id ], $field, $options['post_id'] );
-
- };
-
-
- // order by search
- if( $is_search && empty($args['orderby']) ) {
-
- $users = acf_order_by_search( $users, $args['s'] );
-
- }
-
-
- // append to $data
- foreach( $users as $id => $title ) {
-
- $data['children'][] = array(
- 'id' => $id,
- 'text' => $title
- );
-
- }
-
-
- // append to $r
- $results[] = $data;
-
- }
-
- // optgroup or single
- if( !empty($args['role']) && count($args['role']) == 1 ) {
- $results = $results[0]['children'];
- }
- }
-
-
- // vars
- $response = array(
- 'results' => $results,
- 'limit' => $args['users_per_page']
- );
-
-
- // return
- return $response;
+ acf_render_field_setting( $field, array(
+ 'label' => __('Select multiple values?','acf'),
+ 'instructions' => '',
+ 'name' => 'multiple',
+ 'type' => 'true_false',
+ 'ui' => 1,
+ ));
+ acf_render_field_setting( $field, array(
+ 'label' => __('Return Format','acf'),
+ 'instructions' => '',
+ 'type' => 'radio',
+ 'name' => 'return_format',
+ 'choices' => array(
+ 'array' => __("User Array",'acf'),
+ 'object' => __("User Object",'acf'),
+ 'id' => __("User ID",'acf'),
+ ),
+ 'layout' => 'horizontal',
+ ));
}
-
-
- /*
- * get_result
- *
- * This function returns the HTML for a result
- *
- * @type function
- * @date 1/11/2013
- * @since 5.0.0
- *
- * @param $post (object)
- * @param $field (array)
- * @param $post_id (int) the post_id to which this value is saved to
- * @return (string)
- */
-
- function get_result( $user, $field, $post_id = 0 ) {
-
- // get post_id
- if( !$post_id ) $post_id = acf_get_form_data('post_id');
-
-
- // vars
- $result = $user->user_login;
-
-
- // append name
- if( $user->first_name ) {
-
- $result .= ' (' . $user->first_name;
-
- if( $user->last_name ) {
-
- $result .= ' ' . $user->last_name;
-
- }
-
- $result .= ')';
-
- }
-
-
- // filters
- $result = apply_filters("acf/fields/user/result", $result, $user, $field, $post_id);
- $result = apply_filters("acf/fields/user/result/name={$field['_name']}", $result, $user, $field, $post_id);
- $result = apply_filters("acf/fields/user/result/key={$field['key']}", $result, $user, $field, $post_id);
-
-
- // return
- return $result;
-
- }
-
-
- /*
- * user_search_columns
- *
- * This function will modify the columns which the user AJAX search looks in
- *
- * @type function
- * @date 17/06/2014
- * @since 5.0.0
- *
- * @param $columns (array)
- * @return $columns
- */
-
- function user_search_columns( $columns, $search, $WP_User_Query ) {
-
- // bail early if no field
- if( empty($this->field) ) {
-
- return $columns;
-
- }
-
-
- // vars
- $field = $this->field;
-
-
- // filter for 3rd party customization
- $columns = apply_filters("acf/fields/user/search_columns", $columns, $search, $WP_User_Query, $field);
- $columns = apply_filters("acf/fields/user/search_columns/name={$field['_name']}", $columns, $search, $WP_User_Query, $field);
- $columns = apply_filters("acf/fields/user/search_columns/key={$field['key']}", $columns, $search, $WP_User_Query, $field);
-
-
- // return
- return $columns;
-
- }
-
- /*
- * render_field()
- *
- * Create the HTML interface for your field
- *
- * @type action
- * @since 3.6
- * @date 23/01/13
- *
- * @param $field - an array holding all the field's data
- */
-
+ /**
+ * Renders the field input HTML.
+ *
+ * @date 23/01/13
+ * @since 3.6.0
+ *
+ * @param array $field The ACF field.
+ * @return void
+ */
function render_field( $field ) {
// Change Field into a select.
@@ -358,159 +129,69 @@ class acf_field_user extends acf_field {
acf_render_field( $field );
}
-
- /*
- * render_field_settings()
- *
- * Create extra options for your field. This is rendered when editing a field.
- * The value of $field['name'] can be used (like bellow) to save extra data to the $field
- *
- * @type action
- * @since 3.6
- * @date 23/01/13
- *
- * @param $field - an array holding all the field's data
- */
-
- function render_field_settings( $field ) {
+ /**
+ * Returns the result text for a fiven WP_User object.
+ *
+ * @date 1/11/2013
+ * @since 5.0.0
+ *
+ * @param WP_User $user The WP_User object.
+ * @param array $field The ACF field related to this query.
+ * @param (int|string) $post_id The post_id being edited.
+ * @return string
+ */
+ function get_result( $user, $field, $post_id = 0 ) {
- acf_render_field_setting( $field, array(
- 'label' => __('Filter by role','acf'),
- 'instructions' => '',
- 'type' => 'select',
- 'name' => 'role',
- 'choices' => acf_get_pretty_user_roles(),
- 'multiple' => 1,
- 'ui' => 1,
- 'allow_null' => 1,
- 'placeholder' => __("All user roles",'acf'),
- ));
-
-
-
- // allow_null
- acf_render_field_setting( $field, array(
- 'label' => __('Allow Null?','acf'),
- 'instructions' => '',
- 'name' => 'allow_null',
- 'type' => 'true_false',
- 'ui' => 1,
- ));
-
-
- // multiple
- acf_render_field_setting( $field, array(
- 'label' => __('Select multiple values?','acf'),
- 'instructions' => '',
- 'name' => 'multiple',
- 'type' => 'true_false',
- 'ui' => 1,
- ));
-
- // return_format
- acf_render_field_setting( $field, array(
- 'label' => __('Return Format','acf'),
- 'instructions' => '',
- 'type' => 'radio',
- 'name' => 'return_format',
- 'choices' => array(
- 'array' => __("User Array",'acf'),
- 'object' => __("User Object",'acf'),
- 'id' => __("User ID",'acf'),
- ),
- 'layout' => 'horizontal',
- ));
+ // Get user result item.
+ $item = acf_get_user_result( $user );
+ // Default $post_id to current post being edited.
+ $post_id = $post_id ? $post_id : acf_get_form_data('post_id');
+ /**
+ * Filters the result text.
+ *
+ * @date 21/5/19
+ * @since 5.8.1
+ *
+ * @param array $args The query args.
+ * @param array $field The ACF field related to this query.
+ * @param (int|string) $post_id The post_id being edited.
+ */
+ return apply_filters( "acf/fields/user/result", $item['text'], $user, $field, $post_id );
}
-
- /*
- * update_value()
- *
- * This filter is appied to the $value before it is updated in the db
- *
- * @type filter
- * @since 3.6
- * @date 23/01/13
- *
- * @param $value - the value which will be saved in the database
- * @param $post_id - the $post_id of which the value will be saved
- * @param $field - the field array holding all the field options
- *
- * @return $value - the modified value
- */
-
- function update_value( $value, $post_id, $field ) {
-
- // Bail early if no value.
- if( empty($value) ) {
- return $value;
- }
-
- // Format array of values.
- // - ensure each value is an id.
- // - Parse each id as string for SQL LIKE queries.
- if( acf_is_sequential_array($value) ) {
- $value = array_map('acf_idval', $value);
- $value = array_map('strval', $value);
-
- // Parse single value for id.
- } else {
- $value = acf_idval( $value );
- }
-
- // Return value.
- return $value;
- }
-
-
- /*
- * load_value()
- *
- * This filter is applied to the $value after it is loaded from the db
- *
- * @type filter
- * @since 3.6
- * @date 23/01/13
- *
- * @param $value (mixed) the value found in the database
- * @param $post_id (mixed) the $post_id from which the value was loaded
- * @param $field (array) the field array holding all the field options
- * @return $value
- */
-
+ /**
+ * Filters the field value after it is loaded from the database.
+ *
+ * @date 23/01/13
+ * @since 3.6.0
+ *
+ * @param mixed $value The field value.
+ * @param mixed $post_id The post ID where the value is saved.
+ * @param array $field The field array containing all settings.
+ * @return mixed
+ */
function load_value( $value, $post_id, $field ) {
- // ACF4 null
+ // Add compatibility for version 4.
if( $value === 'null' ) {
-
return false;
-
}
-
-
- // return
return $value;
}
-
- /*
- * format_value()
- *
- * This filter is appied to the $value after it is loaded from the db and before it is returned to the template
- *
- * @type filter
- * @since 3.6
- * @date 23/01/13
- *
- * @param $value (mixed) the value which was loaded from the database
- * @param $post_id (mixed) the $post_id from which the value was loaded
- * @param $field (array) the field array holding all the field options
- *
- * @return $value (mixed) the modified value
- */
-
+ /**
+ * Filters the field value after it is loaded from the database but before it is returned to the front-end API.
+ *
+ * @date 23/01/13
+ * @since 3.6.0
+ *
+ * @param mixed $value The field value.
+ * @param mixed $post_id The post ID where the value is saved.
+ * @param array $field The field array containing all settings.
+ * @return mixed
+ */
function format_value( $value, $post_id, $field ) {
// Bail early if no value.
@@ -571,13 +252,210 @@ class acf_field_user extends acf_field {
// Return.
return $value;
+ }
+
+ /**
+ * Filters the field value before it is saved into the database.
+ *
+ * @date 23/01/13
+ * @since 3.6.0
+ *
+ * @param mixed $value The field value.
+ * @param mixed $post_id The post ID where the value is saved.
+ * @param array $field The field array containing all settings.
+ * @return mixed
+ */
+ function update_value( $value, $post_id, $field ) {
+
+ // Bail early if no value.
+ if( empty($value) ) {
+ return $value;
+ }
+
+ // Format array of values.
+ // - ensure each value is an id.
+ // - Parse each id as string for SQL LIKE queries.
+ if( acf_is_sequential_array($value) ) {
+ $value = array_map('acf_idval', $value);
+ $value = array_map('strval', $value);
+
+ // Parse single value for id.
+ } else {
+ $value = acf_idval( $value );
+ }
+
+ // Return value.
+ return $value;
+ }
+
+ /**
+ * Callback for the AJAX query request.
+ *
+ * @date 24/10/13
+ * @since 5.0.0
+ *
+ * @param void
+ * @return void
+ */
+ function ajax_query() {
+
+ // Modify Request args.
+ if( isset($_REQUEST['s']) ) {
+ $_REQUEST['search'] = $_REQUEST['s'];
+ }
+ if( isset($_REQUEST['paged']) ) {
+ $_REQUEST['page'] = $_REQUEST['paged'];
+ }
+
+ // Add query hooks.
+ add_action( 'acf/ajax/query_users/init', array( $this, 'ajax_query_init' ), 10, 2 );
+ add_filter( 'acf/ajax/query_users/args', array( $this, 'ajax_query_args' ), 10, 3 );
+ add_filter( 'acf/ajax/query_users/result', array( $this, 'ajax_query_result' ), 10, 3 );
+ add_filter( 'acf/ajax/query_users/search_columns', array( $this, 'ajax_query_search_columns' ), 10, 4 );
+
+ // Simulate AJAX request.
+ acf_get_instance('ACF_Ajax_Query_Users')->request();
+ }
+
+ /**
+ * Runs during the AJAX query initialization.
+ *
+ * @date 9/3/20
+ * @since 5.8.8
+ *
+ * @param array $request The query request.
+ * @param ACF_Ajax_Query $query The query object.
+ * @return void
+ */
+ function ajax_query_init( $request, $query ) {
+
+ // Require field.
+ if( !$query->field ) {
+ $query->send( new WP_Error( 'acf_missing_field', __( 'Error loading field.', 'acf' ), array( 'status' => 404 ) ) );
+ }
+ }
+
+ /**
+ * Filters the AJAX query args.
+ *
+ * @date 9/3/20
+ * @since 5.8.8
+ *
+ * @param array $args The query args.
+ * @param array $request The query request.
+ * @param ACF_Ajax_Query $query The query object.
+ * @return array
+ */
+ function ajax_query_args( $args, $request, $query ) {
+
+ // Add specific roles.
+ if( $query->field['role'] ) {
+ $args['role__in'] = acf_array( $query->field['role'] );
+ }
+
+ /**
+ * Filters the query args.
+ *
+ * @date 21/5/19
+ * @since 5.8.1
+ *
+ * @param array $args The query args.
+ * @param array $field The ACF field related to this query.
+ * @param (int|string) $post_id The post_id being edited.
+ */
+ return apply_filters( "acf/fields/user/query", $args, $query->field, $query->post_id );
+ }
+
+ /**
+ * Filters the WP_User_Query search columns.
+ *
+ * @date 9/3/20
+ * @since 5.8.8
+ *
+ * @param array $columns An array of column names to be searched.
+ * @param string $search The search term.
+ * @param WP_User_Query $WP_User_Query The WP_User_Query instance.
+ * @return array
+ */
+ function ajax_query_search_columns( $columns, $search, $WP_User_Query, $query ) {
+
+ /**
+ * Filters the column names to be searched.
+ *
+ * @date 21/5/19
+ * @since 5.8.1
+ *
+ * @param array $columns An array of column names to be searched.
+ * @param string $search The search term.
+ * @param WP_User_Query $WP_User_Query The WP_User_Query instance.
+ * @param array $field The ACF field related to this query.
+ */
+ return apply_filters( "acf/fields/user/search_columns", $columns, $search, $WP_User_Query, $query->field );
+ }
+
+ /**
+ * Filters the AJAX Query result.
+ *
+ * @date 9/3/20
+ * @since 5.8.8
+ *
+ * @param array $item The choice id and text.
+ * @param WP_User $user The user object.
+ * @param ACF_Ajax_Query $query The query object.
+ * @return array
+ */
+ function ajax_query_result( $item, $user, $query ) {
+
+ /**
+ * Filters the result text.
+ *
+ * @date 21/5/19
+ * @since 5.8.1
+ *
+ * @param string The result text.
+ * @param WP_User $user The user object.
+ * @param array $field The ACF field related to this query.
+ * @param (int|string) $post_id The post_id being edited.
+ */
+ $item['text'] = apply_filters( "acf/fields/user/result", $item['text'], $user, $query->field, $query->post_id );
+ return $item;
+ }
+
+ /**
+ * Return an array of data formatted for use in a select2 AJAX response.
+ *
+ * @date 15/10/2014
+ * @since 5.0.9
+ * @deprecated 5.8.9
+ *
+ * @param array $args An array of query args.
+ * @return array
+ */
+ function get_ajax_query( $options = array() ) {
+ _deprecated_function( __FUNCTION__, '5.8.9' );
+ return array();
+ }
+
+ /**
+ * Filters the WP_User_Query search columns.
+ *
+ * @date 15/10/2014
+ * @since 5.0.9
+ * @deprecated 5.8.9
+ *
+ * @param array $columns An array of column names to be searched.
+ * @param string $search The search term.
+ * @param WP_User_Query $WP_User_Query The WP_User_Query instance.
+ * @return array
+ */
+ function user_search_columns( $columns, $search, $WP_User_Query ) {
+ _deprecated_function( __FUNCTION__, '5.8.9' );
+ return $columns;
}
}
// initialize
-acf_register_field_type( 'acf_field_user' );
+acf_register_field_type( 'ACF_Field_User' );
endif; // class_exists check
-
-?>
\ No newline at end of file
diff --git a/includes/fields/class-acf-field-wysiwyg.php b/includes/fields/class-acf-field-wysiwyg.php
index e6cf9ef..c51cdb5 100644
--- a/includes/fields/class-acf-field-wysiwyg.php
+++ b/includes/fields/class-acf-field-wysiwyg.php
@@ -56,40 +56,25 @@ class acf_field_wysiwyg extends acf_field {
function add_filters() {
- // wp-includes/class-wp-embed.php
- if( !empty($GLOBALS['wp_embed']) ) {
-
- add_filter( 'acf_the_content', array( $GLOBALS['wp_embed'], 'run_shortcode' ), 8 );
- add_filter( 'acf_the_content', array( $GLOBALS['wp_embed'], 'autoembed' ), 8 );
-
- }
-
-
- // wp-includes/default-filters.php
+ // WordPress 5.5 introduced new function for applying image tags.
+ $wp_filter_content_tags = function_exists('wp_filter_content_tags') ? 'wp_filter_content_tags' : 'wp_make_content_images_responsive';
+
+ // Mimic filters added to "the_content" in "wp-includes/default-filters.php".
add_filter( 'acf_the_content', 'capital_P_dangit', 11 );
+ //add_filter( 'acf_the_content', 'do_blocks', 9 ); Not yet supported.
add_filter( 'acf_the_content', 'wptexturize' );
add_filter( 'acf_the_content', 'convert_smilies', 20 );
-
- // Removed in 4.4
- if( acf_version_compare('wp', '<', '4.4') ) {
- add_filter( 'acf_the_content', 'convert_chars' );
- }
-
add_filter( 'acf_the_content', 'wpautop' );
add_filter( 'acf_the_content', 'shortcode_unautop' );
-
-
- // should only be for the_content (causes double image on attachment page)
- //add_filter( 'acf_the_content', 'prepend_attachment' );
-
-
- // Added in 4.4
- if( function_exists('wp_make_content_images_responsive') ) {
- add_filter( 'acf_the_content', 'wp_make_content_images_responsive' );
- }
-
+ //add_filter( 'acf_the_content', 'prepend_attachment' ); Causes double image on attachment page.
+ add_filter( 'acf_the_content', $wp_filter_content_tags );
add_filter( 'acf_the_content', 'do_shortcode', 11);
-
+
+ // Mimic filters added to "the_content" in "wp-includes/class-wp-embed.php"
+ if( isset($GLOBALS['wp_embed']) ) {
+ add_filter( 'acf_the_content', array( $GLOBALS['wp_embed'], 'run_shortcode' ), 8 );
+ add_filter( 'acf_the_content', array( $GLOBALS['wp_embed'], 'autoembed' ), 8 );
+ }
}
@@ -322,7 +307,12 @@ class acf_field_wysiwyg extends acf_field {