Nimble Page Builder - Version 1.8.0

Version Description

Header / footer, widget module, menu module are now part of Nimble Builder's core features, after a few monthes of beta tests.

=

Download this release

Release Info

Developer nikeo
Plugin Icon 128x128 Nimble Page Builder
Version 1.8.0
Comparing to
See all releases

Code changes from version 1.7.7 to 1.8.0

assets/czr/sek/js/ccat-sek-control.js CHANGED
@@ -206,7 +206,7 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
206
 
207
  // Schedule a reset
208
  $('#customize-notifications-area').on( 'click', '[data-sek-reset="true"]', function() {
209
- self.resetCollectionSetting();
210
  });
211
 
212
 
@@ -1083,7 +1083,11 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
1083
  var $el = $(evt.target),
1084
  $closestLevel = $el.closest('[data-nimb-level]');
1085
  api.previewer.send('sek-animate-to-level', { id : $closestLevel.data('nimb-id') });
1086
- api.previewer.send('sek-display-level-ui', { id : $closestLevel.data('nimb-id') });
 
 
 
 
1087
  });
1088
 
1089
  $('body').on('click', '#nimble-level-tree .sek-remove-level', function(evt) {
@@ -1825,6 +1829,10 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
1825
  // }
1826
  // );
1827
 
 
 
 
 
1828
  // Track changes, if not already navigating the logs
1829
  if ( !_.isObject( params ) || true !== params.navigatingHistoryLogs ) {
1830
  try { self.trackHistoryLog( sektionSetInstance, params ); } catch(er) {
@@ -2695,6 +2703,12 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
2695
  'sek-notify' : function( params ) {
2696
  sendToPreview = false;
2697
  var notif_id = params.notif_id || 'sek-notify';
 
 
 
 
 
 
2698
  return $.Deferred(function() {
2699
  api.panel( sektionsLocalizedData.sektionsPanelId, function( __main_panel__ ) {
2700
  api.notifications.add( new api.Notification( notif_id, {
@@ -2703,6 +2717,8 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
2703
  dismissible: true
2704
  }));
2705
 
 
 
2706
  // Removed if not dismissed after 5 seconds
2707
  _.delay( function() {
2708
  api.notifications.remove( notif_id );
@@ -2763,7 +2779,35 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
2763
  is_global_location : self.isGlobalLocation( params )
2764
  });
2765
  });
2766
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2767
  };//msgCollection
2768
 
2769
  // Schedule the reactions
@@ -3199,6 +3243,10 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
3199
  if ( true === refresh_preview ) {
3200
  api.previewer.refresh();
3201
  }
 
 
 
 
3202
  });//self.updateAPISetting()
3203
  }
3204
  };//_doUpdateWithRequestedAction
@@ -3495,33 +3543,33 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
3495
  expandAndFocusOnInit : false,
3496
  priority : 10,
3497
  icon : '<i class="fas fa-grip-vertical sek-level-option-icon"></i>'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3498
  }
3499
  });
3500
 
3501
- // Header and footer have been introduced in v1.4.0 but not enabled by default
3502
- // The header and footer preset sections are on hold until "header and footer" feature is released.
3503
- if ( sektionsLocalizedData.isNimbleHeaderFooterEnabled ) {
3504
- $.extend( registrationParams, {
3505
- sek_header_sec_picker_module : {
3506
- settingControlId : sektionsLocalizedData.optPrefixForSektionsNotSaved + self.guid() + '_sek_draggable_sections_ui',
3507
- module_type : 'sek_header_sec_picker_module',
3508
- controlLabel : sektionsLocalizedData.i18n['Header sections'],// sektionsLocalizedData.i18n['Header sections'],
3509
- content_type : 'section',
3510
- expandAndFocusOnInit : false,
3511
- priority : 10,
3512
- icon : '<i class="fas fa-grip-vertical sek-level-option-icon"></i>'
3513
- },
3514
- sek_footer_sec_picker_module : {
3515
- settingControlId : sektionsLocalizedData.optPrefixForSektionsNotSaved + self.guid() + '_sek_draggable_sections_ui',
3516
- module_type : 'sek_footer_sec_picker_module',
3517
- controlLabel : sektionsLocalizedData.i18n['Footer sections'],// sektionsLocalizedData.i18n['Header sections'],
3518
- content_type : 'section',
3519
- expandAndFocusOnInit : false,
3520
- priority : 10,
3521
- icon : '<i class="fas fa-grip-vertical sek-level-option-icon"></i>'
3522
- }
3523
- });
3524
- }
3525
 
3526
  if ( sektionsLocalizedData.isSavedSectionEnabled ) {
3527
  $.extend( registrationParams, {
@@ -4214,16 +4262,14 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
4214
  icon : '<i class="material-icons sek-level-option-icon">check_box_outline_blank</i>'
4215
  };
4216
  break;
4217
- // Header and footer have been introduced in v1.4.0 but not enabled by default.
4218
  case 'local_header_footer':
4219
- if ( sektionsLocalizedData.isNimbleHeaderFooterEnabled ) {
4220
- self.localOptionsRegistrationParams[ opt_name ] = {
4221
- settingControlId : _id_ + '__local_header_footer',
4222
- module_type : mod_type,
4223
- controlLabel : sektionsLocalizedData.i18n['Page header and footer'],
4224
- icon : '<i class="material-icons sek-level-option-icon">web</i>'
4225
- };
4226
- }
4227
  break;
4228
  case 'widths' :
4229
  self.localOptionsRegistrationParams[ opt_name ] = {
@@ -4426,16 +4472,14 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
4426
  // Populate the registration params
4427
  _.each( sektionsLocalizedData.globalOptionsMap, function( mod_type, opt_name ) {
4428
  switch( opt_name ) {
4429
- // Header and footer have been introduced in v1.4.0 but not enabled by default.
4430
  case 'global_header_footer':
4431
- if ( sektionsLocalizedData.isNimbleHeaderFooterEnabled ) {
4432
- registrationParams[ opt_name ] = {
4433
- settingControlId : _id_ + '__header_footer',
4434
- module_type : mod_type,
4435
- controlLabel : sektionsLocalizedData.i18n['Site wide header and footer'],
4436
- icon : '<i class="material-icons sek-level-option-icon">web</i>'
4437
- };
4438
- }
4439
  break;
4440
  case 'breakpoint' :
4441
  registrationParams[ opt_name ] = {
@@ -5268,7 +5312,7 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
5268
  case 'sek-set-module-value' :
5269
  moduleCandidate = self.getLevelModel( params.id, newSetValue.collection );
5270
 
5271
- var _value_ = {};
5272
  // consider only the non empty settings for db
5273
  // booleans should bypass this check
5274
  _.each( params.value || {}, function( _val_, _key_ ) {
@@ -5276,7 +5320,7 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
5276
  // that's why we need to cast the _val_ to a string when using _.isEmpty()
5277
  if ( ! _.isBoolean( _val_ ) && _.isEmpty( _val_ + "" ) )
5278
  return;
5279
- _value_[ _key_ ] = _val_;
5280
  });
5281
  if ( 'no_match' == moduleCandidate ) {
5282
  api.errare( 'updateAPISetting => ' + params.action + ' => no module matched', params );
@@ -5293,10 +5337,13 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
5293
  // If yes, the module value is structured by option group, each option group being updated by a child module
5294
  // If no, the default option type is : '__no_option_group_to_be_updated_by_children_modules__'
5295
  if ( '__no_option_group_to_be_updated_by_children_modules__' === params.options_type ) {
5296
- moduleCandidate.value = _value_;
5297
  } else {
5298
- moduleCandidate.value = _.isEmpty( moduleCandidate.value ) ? {} : moduleCandidate.value;
5299
- moduleCandidate.value[ params.options_type ] = _value_;
 
 
 
5300
  }
5301
 
5302
  break;
@@ -5312,12 +5359,15 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
5312
  case 'sek-generate-level-options-ui' :
5313
  var _candidate_ = self.getLevelModel( params.id, newSetValue.collection ),
5314
  _valueCandidate = {};
 
5315
  if ( 'no_match'=== _candidate_ ) {
5316
  api.errare( 'updateAPISetting => ' + params.action + ' => no parent sektion matched' );
5317
  __updateAPISettingDeferred__.reject( 'updateAPISetting => ' + params.action + ' => no parent sektion matched');
5318
  break;
5319
  }
5320
- _candidate_.options = _candidate_.options || {};
 
 
5321
 
5322
  // consider only the non empty settings for db
5323
  // booleans should bypass this check
@@ -5328,10 +5378,13 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
5328
  return;
5329
  _valueCandidate[ _key_ ] = _val_;
5330
  });
 
5331
  if ( _.isEmpty( params.options_type ) ) {
5332
  api.errare( 'updateAPISetting => ' + params.action + ' => missing options_type');
5333
  }
5334
- _candidate_.options[ params.options_type ] = _valueCandidate;
 
 
5335
  break;
5336
 
5337
 
@@ -5784,7 +5837,20 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
5784
  // at this point it should have been.
5785
  if ( 'pending' == __updateAPISettingDeferred__.state() ) {
5786
  var mayBeUpdateSektionsSetting = function() {
5787
- if ( _.isEqual( currentSetValue, newSetValue ) ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
5788
  __updateAPISettingDeferred__.reject( 'updateAPISetting => the new setting value is unchanged when firing action : ' + params.action );
5789
  } else {
5790
  if ( null !== self.validateSettingValue( newSetValue, params.is_global_location ? 'global' : 'local' ) ) {
@@ -7545,9 +7611,14 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
7545
  dnd_canDrop : function( params ) {
7546
  params = _.extend( { targetEl : {}, evt : {} }, params || {} );
7547
  var self = this, $dropTarget = params.targetEl;
 
7548
  if ( ! _.isObject( $dropTarget ) || 1 > $dropTarget.length )
7549
  return false;
7550
 
 
 
 
 
7551
  var isSectionDropZone = $dropTarget.hasClass( 'sek-content-preset_section-drop-zone' ),
7552
  sectionHasNoModule = $dropTarget.hasClass( 'sek-module-drop-zone-for-first-module' ),
7553
  isHeaderLocation = true === $dropTarget.closest('[data-sek-level="location"]').data('sek-is-header-location'),
@@ -7567,7 +7638,7 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
7567
  };
7568
 
7569
  if ( ( isHeaderLocation || isFooterLocation ) && isContentSectionCandidate ) {
7570
- msg = isHeaderLocation ? sektionsLocalizedData.i18n['The header location only accepts modules and pre-built header sections'] : sektionsLocalizedData.i18n['The footer location only accepts modules and pre-built footer sections'];
7571
  maybePrintErrorMessage( msg );
7572
  return false;
7573
  }
@@ -10207,21 +10278,6 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
10207
  action : 'sek-reset-collection',
10208
  scope : scope,//<= will determine which setting will be updated,
10209
  // => self.getGlobalSectionsSettingId() or self.localSectionsSettingId()
10210
- }).done( function() {
10211
- //_notify( sektionsLocalizedData.i18n['The revision has been successfully restored.'], 'success' );
10212
- api.previewer.refresh();
10213
- api.previewer.trigger('sek-notify', {
10214
- notif_id : 'reset-success',
10215
- type : 'success',
10216
- duration : 8000,
10217
- message : [
10218
- '<span>',
10219
- '<strong>',
10220
- sektionsLocalizedData.i18n['Reset complete'],
10221
- '</strong>',
10222
- '</span>'
10223
- ].join('')
10224
- });
10225
  }).fail( function( response ) {
10226
  api.errare( 'reset_button input => error when firing ::updateAPISetting', response );
10227
  api.previewer.trigger('sek-notify', {
@@ -11510,13 +11566,6 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
11510
  return;
11511
  }
11512
 
11513
- // Header and footer have been introduced in v1.4.0 but not enabled by default
11514
- // The header and footer preset sections are on hold until "header and footer" feature is released.
11515
- if ( !sektionsLocalizedData.isNimbleHeaderFooterEnabled ) {
11516
- section_modules = _.filter( section_modules, function( mod ) {
11517
- return !_.contains([ 'sek_header_sec_picker_module','sek_footer_sec_picker_module' ], mod );
11518
- });
11519
- }
11520
  _.each( section_modules, function( module_type ) {
11521
  api.czrModuleMap[ module_type ] = {
11522
  //mthds : SectionPickerModuleConstructor,
206
 
207
  // Schedule a reset
208
  $('#customize-notifications-area').on( 'click', '[data-sek-reset="true"]', function() {
209
+ api.previewer.trigger('sek-reset-collection', { scope : 'local' } );
210
  });
211
 
212
 
1083
  var $el = $(evt.target),
1084
  $closestLevel = $el.closest('[data-nimb-level]');
1085
  api.previewer.send('sek-animate-to-level', { id : $closestLevel.data('nimb-id') });
1086
+ api.previewer.send('sek-clean-level-uis');
1087
+ _.delay( function() {
1088
+ api.previewer.send('sek-display-level-ui', { id : $closestLevel.data('nimb-id') });
1089
+ }, 100 );
1090
+
1091
  });
1092
 
1093
  $('body').on('click', '#nimble-level-tree .sek-remove-level', function(evt) {
1829
  // }
1830
  // );
1831
 
1832
+ // console.log('MAIN SETTING CHANGED', params );
1833
+ // console.log('NEW MAIN SETTING VALUE', newSektionSettingValue );
1834
+
1835
+
1836
  // Track changes, if not already navigating the logs
1837
  if ( !_.isObject( params ) || true !== params.navigatingHistoryLogs ) {
1838
  try { self.trackHistoryLog( sektionSetInstance, params ); } catch(er) {
2703
  'sek-notify' : function( params ) {
2704
  sendToPreview = false;
2705
  var notif_id = params.notif_id || 'sek-notify';
2706
+
2707
+ // Make sure we clean the last printed notification
2708
+ if ( self.lastNimbleNotificationId ) {
2709
+ api.notifications.remove( self.lastNimbleNotificationId );
2710
+ }
2711
+
2712
  return $.Deferred(function() {
2713
  api.panel( sektionsLocalizedData.sektionsPanelId, function( __main_panel__ ) {
2714
  api.notifications.add( new api.Notification( notif_id, {
2717
  dismissible: true
2718
  }));
2719
 
2720
+ self.lastNimbleNotificationId = notif_id;
2721
+
2722
  // Removed if not dismissed after 5 seconds
2723
  _.delay( function() {
2724
  api.notifications.remove( notif_id );
2779
  is_global_location : self.isGlobalLocation( params )
2780
  });
2781
  });
2782
+ },
2783
+
2784
+
2785
+ // RESET
2786
+ 'sek-reset-collection' : {
2787
+ callback : function( params ) {
2788
+ sendToPreview = false;//<= when the level is refreshed when complete, we don't need to send to preview.
2789
+ uiParams = {};
2790
+ apiParams = params;
2791
+ apiParams.action = 'sek-reset-collection';
2792
+ apiParams.scope = params.scope;
2793
+ return self.updateAPISetting( apiParams );
2794
+ },
2795
+ complete : function( params ) {
2796
+ api.previewer.refresh();
2797
+ api.previewer.trigger('sek-notify', {
2798
+ notif_id : 'reset-success',
2799
+ type : 'success',
2800
+ duration : 8000,
2801
+ message : [
2802
+ '<span>',
2803
+ '<strong>',
2804
+ sektionsLocalizedData.i18n['Reset complete'],
2805
+ '</strong>',
2806
+ '</span>'
2807
+ ].join('')
2808
+ });
2809
+ }
2810
+ },
2811
  };//msgCollection
2812
 
2813
  // Schedule the reactions
3243
  if ( true === refresh_preview ) {
3244
  api.previewer.refresh();
3245
  }
3246
+ })
3247
+ .fail( function( er ) {
3248
+ api.errare( '::updateAPISettingAndExecutePreviewActions=> api setting not updated', er );
3249
+ api.errare( '::updateAPISettingAndExecutePreviewActions=> api setting not updated => params ', params );
3250
  });//self.updateAPISetting()
3251
  }
3252
  };//_doUpdateWithRequestedAction
3543
  expandAndFocusOnInit : false,
3544
  priority : 10,
3545
  icon : '<i class="fas fa-grip-vertical sek-level-option-icon"></i>'
3546
+ },
3547
+
3548
+ // Header/footer have been beta tested during 5 months and released in June 2019, in version 1.8.0
3549
+ sek_header_sec_picker_module : {
3550
+ settingControlId : sektionsLocalizedData.optPrefixForSektionsNotSaved + self.guid() + '_sek_draggable_sections_ui',
3551
+ module_type : 'sek_header_sec_picker_module',
3552
+ controlLabel : sektionsLocalizedData.i18n['Header sections'],// sektionsLocalizedData.i18n['Header sections'],
3553
+ content_type : 'section',
3554
+ expandAndFocusOnInit : false,
3555
+ priority : 10,
3556
+ icon : '<i class="fas fa-grip-vertical sek-level-option-icon"></i>'
3557
+ },
3558
+ sek_footer_sec_picker_module : {
3559
+ settingControlId : sektionsLocalizedData.optPrefixForSektionsNotSaved + self.guid() + '_sek_draggable_sections_ui',
3560
+ module_type : 'sek_footer_sec_picker_module',
3561
+ controlLabel : sektionsLocalizedData.i18n['Footer sections'],// sektionsLocalizedData.i18n['Header sections'],
3562
+ content_type : 'section',
3563
+ expandAndFocusOnInit : false,
3564
+ priority : 10,
3565
+ icon : '<i class="fas fa-grip-vertical sek-level-option-icon"></i>'
3566
  }
3567
  });
3568
 
3569
+ // Beta features to merge here ?
3570
+ // if ( sektionsLocalizedData.areBetaFeaturesEnabled ) {
3571
+ // $.extend( registrationParams, {});
3572
+ // }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3573
 
3574
  if ( sektionsLocalizedData.isSavedSectionEnabled ) {
3575
  $.extend( registrationParams, {
4262
  icon : '<i class="material-icons sek-level-option-icon">check_box_outline_blank</i>'
4263
  };
4264
  break;
4265
+ // Header and footer have been beta tested during 5 months and released in June 2019, in version 1.8.0
4266
  case 'local_header_footer':
4267
+ self.localOptionsRegistrationParams[ opt_name ] = {
4268
+ settingControlId : _id_ + '__local_header_footer',
4269
+ module_type : mod_type,
4270
+ controlLabel : sektionsLocalizedData.i18n['Page header and footer'],
4271
+ icon : '<i class="material-icons sek-level-option-icon">web</i>'
4272
+ };
 
 
4273
  break;
4274
  case 'widths' :
4275
  self.localOptionsRegistrationParams[ opt_name ] = {
4472
  // Populate the registration params
4473
  _.each( sektionsLocalizedData.globalOptionsMap, function( mod_type, opt_name ) {
4474
  switch( opt_name ) {
4475
+ // Header and footer have been beta tested during 5 months and released in June 2019, in version 1.8.0
4476
  case 'global_header_footer':
4477
+ registrationParams[ opt_name ] = {
4478
+ settingControlId : _id_ + '__header_footer',
4479
+ module_type : mod_type,
4480
+ controlLabel : sektionsLocalizedData.i18n['Site wide header and footer'],
4481
+ icon : '<i class="material-icons sek-level-option-icon">web</i>'
4482
+ };
 
 
4483
  break;
4484
  case 'breakpoint' :
4485
  registrationParams[ opt_name ] = {
5312
  case 'sek-set-module-value' :
5313
  moduleCandidate = self.getLevelModel( params.id, newSetValue.collection );
5314
 
5315
+ var _modValueCandidate = {};
5316
  // consider only the non empty settings for db
5317
  // booleans should bypass this check
5318
  _.each( params.value || {}, function( _val_, _key_ ) {
5320
  // that's why we need to cast the _val_ to a string when using _.isEmpty()
5321
  if ( ! _.isBoolean( _val_ ) && _.isEmpty( _val_ + "" ) )
5322
  return;
5323
+ _modValueCandidate[ _key_ ] = _val_;
5324
  });
5325
  if ( 'no_match' == moduleCandidate ) {
5326
  api.errare( 'updateAPISetting => ' + params.action + ' => no module matched', params );
5337
  // If yes, the module value is structured by option group, each option group being updated by a child module
5338
  // If no, the default option type is : '__no_option_group_to_be_updated_by_children_modules__'
5339
  if ( '__no_option_group_to_be_updated_by_children_modules__' === params.options_type ) {
5340
+ moduleCandidate.value = _modValueCandidate;
5341
  } else {
5342
+ // start from a deep cloned object
5343
+ // prevents issues like https://github.com/presscustomizr/nimble-builder/issues/455
5344
+ var _new_module_values = $.extend( true, {}, _.isEmpty( moduleCandidate.value ) ? {} : moduleCandidate.value );
5345
+ _new_module_values[ params.options_type ] = _modValueCandidate;
5346
+ moduleCandidate.value = _new_module_values;
5347
  }
5348
 
5349
  break;
5359
  case 'sek-generate-level-options-ui' :
5360
  var _candidate_ = self.getLevelModel( params.id, newSetValue.collection ),
5361
  _valueCandidate = {};
5362
+
5363
  if ( 'no_match'=== _candidate_ ) {
5364
  api.errare( 'updateAPISetting => ' + params.action + ' => no parent sektion matched' );
5365
  __updateAPISettingDeferred__.reject( 'updateAPISetting => ' + params.action + ' => no parent sektion matched');
5366
  break;
5367
  }
5368
+ // start from a deep cloned object
5369
+ // important => fixes https://github.com/presscustomizr/nimble-builder/issues/455
5370
+ var _new_options_values = $.extend( true, {}, _candidate_.options || {} );
5371
 
5372
  // consider only the non empty settings for db
5373
  // booleans should bypass this check
5378
  return;
5379
  _valueCandidate[ _key_ ] = _val_;
5380
  });
5381
+
5382
  if ( _.isEmpty( params.options_type ) ) {
5383
  api.errare( 'updateAPISetting => ' + params.action + ' => missing options_type');
5384
  }
5385
+
5386
+ _new_options_values[ params.options_type ] = _valueCandidate;
5387
+ _candidate_.options = _new_options_values;
5388
  break;
5389
 
5390
 
5837
  // at this point it should have been.
5838
  if ( 'pending' == __updateAPISettingDeferred__.state() ) {
5839
  var mayBeUpdateSektionsSetting = function() {
5840
+
5841
+ // When a sektion setting is changed, "from" and "to" are passed to the .settingParams property
5842
+ // settingParams : {
5843
+ // to : to,
5844
+ // from : from,
5845
+ // args : args
5846
+ // }
5847
+ // @see for example ::generateUIforFrontModules or ::generateUIforLevelOptions
5848
+ var isSettingValueChangeCase = params.settingParams && params.settingParams.from && params.settingParams.to;
5849
+ // in a setting value change case, the from and to must be different
5850
+ // implemented when fixing https://github.com/presscustomizr/nimble-builder/issues/455
5851
+ if ( isSettingValueChangeCase && _.isEqual( params.settingParams.from, params.settingParams.to ) ) {
5852
+ __updateAPISettingDeferred__.reject( 'updateAPISetting => the new setting value is unchanged when firing action : ' + params.action );
5853
+ } else if ( ! isSettingValueChangeCase && _.isEqual( currentSetValue, newSetValue ) ) {
5854
  __updateAPISettingDeferred__.reject( 'updateAPISetting => the new setting value is unchanged when firing action : ' + params.action );
5855
  } else {
5856
  if ( null !== self.validateSettingValue( newSetValue, params.is_global_location ? 'global' : 'local' ) ) {
7611
  dnd_canDrop : function( params ) {
7612
  params = _.extend( { targetEl : {}, evt : {} }, params || {} );
7613
  var self = this, $dropTarget = params.targetEl;
7614
+
7615
  if ( ! _.isObject( $dropTarget ) || 1 > $dropTarget.length )
7616
  return false;
7617
 
7618
+ // stop here if the drop target is not a child of a location
7619
+ if ( $dropTarget.closest('[data-sek-level="location"]').length < 1 )
7620
+ return false;
7621
+
7622
  var isSectionDropZone = $dropTarget.hasClass( 'sek-content-preset_section-drop-zone' ),
7623
  sectionHasNoModule = $dropTarget.hasClass( 'sek-module-drop-zone-for-first-module' ),
7624
  isHeaderLocation = true === $dropTarget.closest('[data-sek-level="location"]').data('sek-is-header-location'),
7638
  };
7639
 
7640
  if ( ( isHeaderLocation || isFooterLocation ) && isContentSectionCandidate ) {
7641
+ msg = isHeaderLocation ? sektionsLocalizedData.i18n['Header location only accepts modules and pre-built header sections'] : sektionsLocalizedData.i18n['Footer location only accepts modules and pre-built footer sections'];
7642
  maybePrintErrorMessage( msg );
7643
  return false;
7644
  }
10278
  action : 'sek-reset-collection',
10279
  scope : scope,//<= will determine which setting will be updated,
10280
  // => self.getGlobalSectionsSettingId() or self.localSectionsSettingId()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10281
  }).fail( function( response ) {
10282
  api.errare( 'reset_button input => error when firing ::updateAPISetting', response );
10283
  api.previewer.trigger('sek-notify', {
11566
  return;
11567
  }
11568
 
 
 
 
 
 
 
 
11569
  _.each( section_modules, function( module_type ) {
11570
  api.czrModuleMap[ module_type ] = {
11571
  //mthds : SectionPickerModuleConstructor,
assets/czr/sek/js/ccat-sek-control.min.js CHANGED
@@ -1 +1 @@
1
- var CZRSeksPrototype=CZRSeksPrototype||{};!function(n,r){r.extend(CZRSeksPrototype,{initialize:function(){var e=this;if(_.isUndefined(window.sektionsLocalizedData))throw new Error("CZRSeksPrototype => missing localized server params sektionsLocalizedData");if(!_.isFunction(n.czr_activeSkopes))throw new Error("CZRSeksPrototype => api.czr_activeSkopes");e.SECTION_ID_FOR_GLOBAL_OPTIONS="__globalOptionsSectionId",e.SECTION_ID_FOR_LOCAL_OPTIONS="__localOptionsSection",e.SECTION_ID_FOR_CONTENT_PICKER="__content_picker__",e.MAX_NUMBER_OF_COLUMNS=12,e.SETTING_UPDATE_BUFFER=100,e.TINYMCE_EDITOR_HEIGHT=100,e.defaultLocalSektionSettingValue=e.getDefaultSektionSettingValue("local"),e.localSectionsSettingId=new n.Value({}),e.registered=new n.Value([]),n.bind("ready",function(){e.doSektionThinksOnApiReady()}),n.bind("save-request-params",function(e){r.extend(e,{local_skope_id:n.czr_skopeBase.getSkopeProperty("skope_id")})}),n.bind("sek-before-clean-registered",function(){_.isArray(n.czrActiveWPEditors)&&(_.each(n.czrActiveWPEditors,function(e){wp.editor.remove(e)}),n.czrActiveWPEditors=[])})},doSektionThinksOnApiReady:function(){var o=this;o.registerAndSetupDefaultPanelSectionOptions(),o.localSectionsSettingId.callbacks.add(function(e,t){try{o.setupSettingsToBeSaved()}catch(e){n.errare("Error in self.localSectionsSettingId.callbacks => self.setupSettingsToBeSaved()",e)}o.initializeHistoryLogWhenSettingsRegistered(),n.previewer.send("sek-request-active-locations")});var i=function(e,t){o.setContextualCollectionSettingIdWhenSkopeSet(e,t),n.section(o.SECTION_ID_FOR_LOCAL_OPTIONS,function(e){e.deferred.embedded.done(function(){!0!==e.boundForLocalOptionGeneration&&(e.boundForLocalOptionGeneration=!0,e.expanded.bind(function(e){!0===e&&o.generateUI({action:"sek-generate-local-skope-options-ui"})}))})}),n.section(o.SECTION_ID_FOR_GLOBAL_OPTIONS,function(e){!0!==e.nimbleGlobalOptionGenerated&&(o.generateUI({action:"sek-generate-global-options-ui"}),e.nimbleGlobalOptionGenerated=!0)}),n.trigger("nimble-ready-for-current-skope")};_.isEmpty(n.czr_activeSkopes().local)||i(),n.czr_activeSkopes.callbacks.add(function(e,t){i(e,t)}),o.reactToPreviewMsg(),o.setupDnd(),o.setupTinyMceEditor(),o.schedulePrintSectionJson(),o.bind("sek-ui-removed",function(){n.previewedDevice("desktop")}),n.previewedDevice.bind(function(t){var e=_.filter(o.registered(),function(e){return"control"==e.what});_.each(e||[],function(e){n.control(e.id,function(e){e.container.find('[data-sek-device="'+t+'"]').each(function(){r(this).trigger("click")})})})}),r("#customize-notifications-area").on("click",'[data-sek-reset="true"]',function(){o.resetCollectionSetting()}),o.bind("sek-ui-pre-removal",function(e){"control"==e.what&&-1<e.id.indexOf("draggable")&&n.control(e.id,function(e){e.container.find("[draggable]").each(function(){r(this).off("dragstart dragend")})}),"control"==e.what&&n.control(e.id,function(e){e.container.find("select").each(function(){_.isUndefined(r(this).data("czrSelect2"))||r(this).czrSelect2("destroy")})})}),n.bind("czr-new-registered",function(e){if(_.isUndefined(e.origin))throw new Error("czr-new-registered event => missing params.origin");if("nimble"===e.origin&&!1!==e.track){var t=o.registered(),i=r.extend(!0,[],t),n=_.findWhere(i,{id:e.id});if(!_.isEmpty(n)&&_.isEqual(n,e))throw new Error("register => duplicated element in self.registered() collection "+e.id);i.push(e),o.registered(i)}}),o.activeLocations=new n.Value([]),n.previewer.bind("sek-active-locations-in-preview",function(e){o.activeLocations(_.isObject(e)&&_.isArray(e.active_locations)?e.active_locations:[])}),o.setupTopBar(),sektionsLocalizedData.isSavedSectionEnabled&&o.setupSaveUI(),o.lastClickedTargetInPreview=new n.Value,o.lastClickedTargetInPreview.bind(function(e,t){_.isObject(e)&&e.id?n.previewer.send("sek-set-double-click-target",e):n.previewer.send("sek-reset-double-click-target"),clearTimeout(r(window).data("_preview_target_timer_")),r(window).data("_preview_target_timer_",setTimeout(function(){o.lastClickedTargetInPreview({}),n.previewer.send("sek-reset-double-click-target")},2e4))}),n.previewer.bind("sek-clean-target-drop-zone",function(){o.lastClickedTargetInPreview({})}),r(document).keydown(function(e){e&&27===e.keyCode&&o.lastClickedTargetInPreview({})}),sektionsLocalizedData.hasActiveCachePlugin&&_.delay(function(){n.previewer.trigger("sek-notify",{notif_id:"has-active-cache-plugin",type:"info",duration:2e4,message:['<span style="color:#0075a2">',sektionsLocalizedData.i18n["You seem to be using a cache plugin."],"<strong> ("+sektionsLocalizedData.hasActiveCachePlugin+")</strong><br/>","<strong>",sektionsLocalizedData.i18n["It is recommended to disable your cache plugin when customizing your website."],"</strong>","</span>"].join("")})},2e3)},registerAndSetupDefaultPanelSectionOptions:function(){var o=this,e=n.Panel.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}});n.panel(sektionsLocalizedData.sektionsPanelId,function(n){n.deferred.embedded.done(function(){var e=n.container.find("h3.accordion-section-title"),t=(n.container.find(".panel-meta .accordion-section-title"),['<img class="sek-nimble-logo" alt="'+n.params.title+'" src="',sektionsLocalizedData.baseUrl,"/assets/img/nimble/nimble_horizontal.svg?ver="+sektionsLocalizedData.nimbleVersion,'"/>'].join(""));if(0<e.length){var i=e.find("span");e.addClass("sek-side-nimble-logo-wrapper").html(t).append(i)}sektionsLocalizedData.eligibleForFeedbackNotification&&n.expanded.bind(function(e){e&&_.isUndefined(o.feedbackUIVisible)&&o.setupFeedBackUI()})})}),n.CZR_Helpers.register({origin:"nimble",what:"panel",id:sektionsLocalizedData.sektionsPanelId,title:sektionsLocalizedData.i18n["Nimble Builder"],priority:-1e3,constructWith:e,track:!1}),n.CZR_Helpers.register({origin:"nimble",what:"section",id:o.SECTION_ID_FOR_GLOBAL_OPTIONS,title:sektionsLocalizedData.i18n["Site wide options"],panel:sektionsLocalizedData.sektionsPanelId,priority:20,track:!1,constructWith:n.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){n.section(o.SECTION_ID_FOR_GLOBAL_OPTIONS,function(e){var t=e.container.find(".accordion-section-title"),i=e.container.find(".customize-section-title h3");0<t.length&&t.prepend('<i class="fas fa-globe sek-level-option-icon"></i>'),0<i.length&&i.find(".customize-action").after('<i class="fas fa-globe sek-level-option-icon"></i>'),o.scheduleModuleAccordion.call(e)})}),n.CZR_Helpers.register({origin:"nimble",what:"section",id:o.SECTION_ID_FOR_LOCAL_OPTIONS,title:sektionsLocalizedData.i18n["Current page options"],panel:sektionsLocalizedData.sektionsPanelId,priority:10,track:!1,constructWith:n.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){n.section(o.SECTION_ID_FOR_LOCAL_OPTIONS,function(e){var t=e.container.find(".accordion-section-title"),i=e.container.find(".customize-section-title h3");0<t.length&&t.prepend('<i class="fas fa-map-marker-alt sek-level-option-icon"></i>'),0<i.length&&i.find(".customize-action").after('<i class="fas fa-map-marker-alt sek-level-option-icon"></i>'),o.scheduleModuleAccordion.call(e)})}),n.CZR_Helpers.register({origin:"nimble",what:"setting",id:sektionsLocalizedData.optNameForGlobalOptions,dirty:!1,value:sektionsLocalizedData.globalOptionDBValues,transport:"refresh",type:"option"}),n.CZR_Helpers.register({origin:"nimble",what:"section",id:o.SECTION_ID_FOR_CONTENT_PICKER,title:sektionsLocalizedData.i18n["Content Picker"],panel:sektionsLocalizedData.sektionsPanelId,priority:30,track:!1,constructWith:n.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){n.section(o.SECTION_ID_FOR_CONTENT_PICKER,function(e){"resolved"!=n.czr_initialSkopeCollectionPopulated.state()?n.czr_initialSkopeCollectionPopulated.done(function(){n.previewer.trigger("sek-pick-content",{focus:!1})}):n.previewer.trigger("sek-pick-content",{focus:!1})})})},setContextualCollectionSettingIdWhenSkopeSet:function(e,t){t=t||{},!_.isEmpty(t.local)&&n.panel(sektionsLocalizedData.sektionsPanelId).expanded()&&n.previewer.trigger("sek-pick-content"),sektionsData=n.czr_skopeBase.getSkopeProperty("sektions","local"),sektionsLocalizedData.isDevMode&&n.infoLog("::setContextualCollectionSettingIdWhenSkopeSet => SEKTIONS DATA ? ",sektionsData),_.isEmpty(sektionsData)&&n.errare("::setContextualCollectionSettingIdWhenSkopeSet() => no sektionsData"),_.isEmpty(sektionsData.setting_id)&&n.errare("::setContextualCollectionSettingIdWhenSkopeSet() => missing setting_id"),this.localSectionsSettingId(sektionsData.setting_id)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(r,a){a.extend(CZRSeksPrototype,{setupTopBar:function(){var t=this;t.topBarId="#nimble-top-bar",t.topBarVisible=new r.Value(!1),t.topBarVisible.bind(function(e){t.levelTreeExpanded()||t.toggleTopBar(e)}),t.mouseMovedRecently=new r.Value({}),t.mouseMovedRecently.bind(function(e){t.topBarVisible(!_.isEmpty(e))});var e=function(e){t.mouseMovedRecently({x:e.clientX,y:e.clientY}),clearTimeout(a(window).data("_scroll_move_timer_")),a(window).data("_scroll_move_timer_",setTimeout(function(){t.mouseMovedRecently.set({})},4e3))};a(window).on("mousemove scroll,",_.throttle(e,50)),r.previewer.bind("ready",function(){a(r.previewer.targetWindow().document).on("mousemove scroll,",_.throttle(e,50))}),t.setupLevelTree()},toggleTopBar:function(e){e=!!_.isUndefined(e)||e;var t,i=this;e?a.when(i.renderAndSetupTopBarTmpl({})).done(function(e){i.topBarContainer=e,_.delay(function(){a("body").addClass("nimble-top-bar-visible")},200)}):(t=a.Deferred(),a("body").removeClass("nimble-top-bar-visible"),i.topBarContainer&&i.topBarContainer.length?_.delay(function(){t.resolve()},300):t.resolve(),t.promise()).done(function(){i.topBarVisible(!1)})},renderAndSetupTopBarTmpl:function(e){var t,i=this;if(0<a(i.topBarId).length)return a(i.topBarId);try{t=wp.template("nimble-top-bar")({})}catch(e){return r.errare("Error when parsing the the top note template",e),!1}a("#customize-preview").after(a(t)),a(document).keydown(function(e){if(e.ctrlKey&&_.contains([89,90],e.keyCode))try{i.navigateHistory(90===e.keyCode?"undo":"redo")}catch(e){r.errare("Error when firing self.navigateHistory",e)}}),a(".sek-add-content",i.topBarId).on("click",function(e){e.preventDefault(),r.previewer.trigger("sek-pick-content",{content_type:"module"})}),a(".sek-level-tree",i.topBarId).on("click",function(e){e.preventDefault(),i.levelTreeExpanded(!i.levelTreeExpanded())}),a("[data-nimble-history]",i.topBarId).on("click",function(e){try{i.navigateHistory(a(this).data("nimble-history"))}catch(e){r.errare("Error when firing self.navigateHistory",e)}}),a(".sek-settings",i.topBarId).on("click",function(e){r.panel(sektionsLocalizedData.sektionsPanelId,function(e){i.rootPanelFocus(),e.focus()})}),a(".sek-nimble-doc",i.topBarId).on("click",function(e){e.preventDefault(),window.open(a(this).data("doc-href"),"_blank")});var n=function(e){a(i.topBarId).length<1||(_.isObject(e)&&e.local_template&&"default"!==e.local_template?a(i.topBarId).find(".sek-notifications").html(['<span class="fas fa-info-circle"></span>',sektionsLocalizedData.i18n["This page uses a custom template."]].join(" ")):a(i.topBarId).find(".sek-notifications").html(""))},o=function(){r(i.localSectionsSettingId(),function(e){var t=e(),i=_.isObject(t)&&t.local_options&&t.local_options.template?t.local_options.template:null;n(i)}),r(i.getLocalSkopeOptionId()+"__template",function(e){e.bind(function(e,t){n(e)})})};return o(),r.bind("nimble-ready-for-current-skope",function(){o()}),a(i.topBarId)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{initializeHistoryLogWhenSettingsRegistered:function(){this.historyLog=new l.Value([{status:"current",value:{local:l(this.localSectionsSettingId())(),global:l(this.getGlobalSectionsSettingId())()},action:"initial"}]),this.historyLog.bind(function(e){if(!_.isEmpty(e)){var t=_.findKey(e,{status:"current"});t=Number(t),d("#nimble-top-bar").find("[data-nimble-history]").each(function(){"undo"===d(this).data("nimble-history")?d(this).attr("data-nimble-state",t<=0?"disabled":"enabled"):d(this).attr("data-nimble-state",e.length<=t+1?"disabled":"enabled")})}})},trackHistoryLog:function(e,t){var i=this,n=e.id===i.getGlobalSectionsSettingId();if(!_.isObject(t)||!_.isFunction(i.historyLog)||!_.isArray(i.historyLog()))throw l.errare("params, self.historyLog() ",t,i.historyLog()),new Error("trackHistoryLog => invalid params or historyLog value");var o,r=[],a=d.extend(!0,[],i.historyLog());_.isEmpty(t.in_sektion)?_.isEmpty(t.to_sektion)||(o=t.to_sektion):o=t.in_sektion,_.each(a,function(e){"future"!=e.status&&(d.extend(e,{status:"previous"}),r.push(e))}),r.push({status:"current",value:n?{global:e()}:{local:e()},action:_.isObject(t)&&t.action||"",sektionToRefresh:o}),i.historyLog(r)},navigateHistory:function(i){var t,n,o,r,e=this,a=d.extend(!0,[],e.historyLog()),s=[];if(_.each(a,function(e){if(_.isEmpty(r)){switch(e.status){case"previous":t=e;break;case"current":n=e;break;case"future":o=e}switch(i){case"undo":_.isEmpty(n)||_.isEmpty(t)||(r=t.value,n.sektionToRefresh,t.sektionToRefresh);break;case"redo":_.isEmpty(o)||(r=o.value,n.sektionToRefresh,o.sektionToRefresh)}}}),!_.isUndefined(r)){_.isEmpty(r.local)||(l(e.localSectionsSettingId())(e.validateSettingValue(r.local,"local"),{navigatingHistoryLogs:!0}),l.czr_sektions.generateUI({action:"sek-generate-local-skope-options-ui",clean_settings:!0})),_.isEmpty(r.global)||l(e.getGlobalSectionsSettingId())(e.validateSettingValue(r.global,"global"),{navigatingHistoryLogs:!0});l.previewer.refresh(),l.previewer.trigger("sek-pick-content",{}),e.cleanRegistered(),e.cleanRegisteredLevelSettingsAfterHistoryNavigation()}var c=_.findKey(a,{status:"current"});c=Number(c),_.isNumber(c)?(_.each(a,function(e,t){switch(newLog=d.extend(!0,{},e),t=Number(t),i){case"undo":0<c&&(t===c-1?newLog.status="current":t===c&&(newLog.status="future"));break;case"redo":a.length>c+1&&(t===c?newLog.status="previous":t===c+1&&(newLog.status="current"))}s.push(newLog)}),e.historyLog(s)):l.errare("Error when navigating the history log, the current key should be a number")}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(b,z){z.extend(CZRSeksPrototype,{setupLevelTree:function(){var i=this;i.levelTree=new b.Value([]),i.levelTree.bind(function(){i.levelTreeExpanded()&&i.renderOrRefreshTree()}),i.levelTreeExpanded=new b.Value(!1),i.levelTreeExpanded.bind(function(e){if(z("body").toggleClass("sek-level-tree-expanded",e),e){if(i.setLevelTreeValue(),_.isEmpty(i.levelTree()))return b.previewer.trigger("sek-notify",{type:"info",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["No sections to navigate"]+"</strong>","</span>"].join("")}),void i.levelTreeExpanded(!1);z("#customize-preview iframe").css("z-index",1),i.renderOrRefreshTree()}else 0<z("#nimble-level-tree").length&&_.delay(function(){z("#nimble-level-tree").remove(),z("#customize-preview iframe").css("z-index","")},300)}),i.activeLocations.bind(function(){_.isEmpty(i.levelTree())||i.renderOrRefreshTree()}),b.previewer.bind("ready",function(){i.localSectionsSettingId.callbacks.add(function(){i.levelTreeExpanded(!1),_.each([i.getGlobalSectionsSettingId(),i.localSectionsSettingId(),sektionsLocalizedData.optNameForGlobalOptions],function(e){b(e)._isBoundForNimbleLevelTree||(b(e).bind(function(e){i.setLevelTreeValue()}),b(e)._isBoundForNimbleLevelTree=!0)})})}),z("body").on("click","#nimble-level-tree [data-nimb-level]",function(e){e.preventDefault(),e.stopPropagation();var t=z(e.target).closest("[data-nimb-level]");b.previewer.send("sek-animate-to-level",{id:t.data("nimb-id")}),b.previewer.send("sek-display-level-ui",{id:t.data("nimb-id")})}),z("body").on("click","#nimble-level-tree .sek-remove-level",function(e){e.preventDefault(),e.stopPropagation();var t=z(e.target).closest("[data-nimb-level]");b.previewer.trigger("sek-remove",{level:t.data("nimb-level"),id:t.data("nimb-id"),location:t.closest('[data-nimb-level="location"]').data("nimb-id"),in_sektion:t.closest('[data-nimb-level="section"]').data("nimb-id"),in_column:t.closest('[data-nimb-level="column"]').data("nimb-id")}),t.fadeOut("slow"),i.renderOrRefreshTree()}),z("body").on("click",".sek-close-level-tree",function(e){e.preventDefault(),i.levelTreeExpanded(!1)})},setLevelTreeValue:function(){var e,t,i,n,o,r=this.getGlobalSectionsSettingId(),a=this.localSectionsSettingId(),s=sektionsLocalizedData.optNameForGlobalOptions,c=!1;if(_.each([r,a,s],function(e){b.has(e)||(c=e)}),!1===c){e=b(r)(),i=_.isObject(e)?z.extend(!0,{},e):{},i=_.isEmpty(i.collection)?[]:i.collection,i=_.isArray(i)?i:[],t=b(a)(),t=_.isObject(t)?t:{},n=z.extend(!0,{},t),n=_.isEmpty(n.collection)?[]:n.collection,n=_.isArray(n)?n:[];var l,d=_.union(i,n),u=!1,p=!1;o=b(s)(),o=_.isObject(o)?o:{},t.local_options&&t.local_options.local_header_footer&&(u="nimble_local"===(l=t.local_options.local_header_footer["header-footer"])),o.global_header_footer&&!u&&"theme"!==l&&(p="nimble_global"===o.global_header_footer["header-footer"]||"nimble_global"===l);var m,f,g=z.extend(!0,[],d);g=_.filter(g,function(e,t){return!_.contains(["nimble_global_header","nimble_global_footer","nimble_local_header","nimble_local_footer"],e.id)});var h=function(e){m=_.findWhere(d,{id:"nimble_"+e+"_header"}),f=_.findWhere(d,{id:"nimble_"+e+"_footer"}),g.unshift(m),g.push(f)};u?h("local"):p&&h("global");var k,y=this.activeLocations(),v=[];_.isEmpty(y)?v=g:_.each(y,function(e){k=_.findWhere(g,{id:e}),_.isUndefined(k)||v.push(k)}),this.levelTree(v)}else b.errare("::setLevelTreeValue => a setting id is not registered ")},renderOrRefreshTree:function(){var e;if(z("#nimble-level-tree").length<1){try{e=wp.template("nimble-level-tree")({})}catch(e){return b.errare("Error when parsing the the nimble-level-tree template",e),!1}z("#customize-preview").after(z(e))}z("#nimble-level-tree").find(".sek-tree-wrap").html(this.getLevelTreeHtml())},getLevelTreeHtml:function(e,t){var i=this;e=e||i.levelTree();var n,o,r,a=!1;if(!_.isArray(e)||_.isEmpty(e))return b.errare("::buildLevelTree => invalid collection param",e),r;var s='<i class="material-icons sek-remove-level" title="'+sektionsLocalizedData.i18n["Remove this element"]+'">delete_forever</i>';return r="<ul>",_.each(e,function(e){_.isUndefined(e.level)?b.errare("::buildLevelTree => missing level property",e):_.isUndefined(e.id)?b.errare("::buildLevelTree => missing id property",e):(n=e.level,"location"===(o=n)&&(a=!_.contains(i.activeLocations(),e.id)),a||(sektionsLocalizedData.i18n[n]&&(o=sektionsLocalizedData.i18n[n]),!0===e.is_nested&&(o=sektionsLocalizedData.i18n["nested section"]),s="location"!==n?s:"",r+='<li data-nimb-level="'+n+'" data-nimb-id="'+e.id+'">',r+='<div class="sek-level-infos"><div class="sek-inner-level-infos">',"module"===n&&(r+=[i.getTreeModuleIcon(e.module_type),i.getTreeModuleTitle(e.module_type)].join(" ")),r+=[" ",o,"( id :",e.id,")",s].join(" "),r+="</div></div>",_.isArray(e.collection)&&!_.isEmpty(e.collection)&&(r+=i.getLevelTreeHtml(e.collection,t)),r+="</li>"))}),r+="</ul>"},getTreeModuleIcon:function(t){var i={};return _.each(sektionsLocalizedData.moduleCollection,function(e){_.isEmpty(i)&&t===e["content-id"]&&(i={svg:e.icon?sektionsLocalizedData.moduleIconPath+e.icon:"",font:e.font_icon?e.font_icon:""})}),_.isEmpty(i.svg)?_.isEmpty(i.font)?void 0:i.font:'<img class="sek-svg-mod-icon" src="'+i.svg+'"/>'},getTreeModuleTitle:function(t){var i={};return _.each(sektionsLocalizedData.moduleCollection,function(e){_.isEmpty(i)&&t===e["content-id"]&&(i=e.title)}),i}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(s,c){c.extend(CZRSeksPrototype,{setupSaveUI:function(){var n=this;n.saveUIVisible=new s.Value(!1),n.saveUIVisible.bind(function(e,t,i){n.toggleSaveUI(e,i?i.id:null)})},toggleSaveUI:function(e,t){e=!!_.isUndefined(e)||e;var i,n=this;e?c.when(n.renderAndSetupSaveUITmpl({})).done(function(e){n.saveUIContainer=e,_.delay(function(){c("body").addClass("nimble-save-ui-visible")},200),c("#sek-saved-section-id").val(t)}):(i=c.Deferred(),c("body").removeClass("nimble-save-ui-visible"),0<c("#nimble-top-save-ui").length?_.delay(function(){n.saveUIContainer.remove(),i.resolve()},300):i.resolve(),i.promise()).done(function(){n.saveUIVisible(!1)})},preProcessSektion:function(e){var t=this.cleanIds(e);return _.omit(t,function(e,t){return _.contains(["id","level"],t)})},renderAndSetupSaveUITmpl:function(e){if(0<c("#nimble-top-save-ui").length)return c("#nimble-top-save-ui");var a=this;try{_tmpl=wp.template("nimble-top-save-ui")({})}catch(e){return s.errare("Error when parsing the the top note template",e),!1}return c("#customize-preview").after(c(_tmpl)),c(".sek-do-save-section","#nimble-top-save-ui").on("click",function(e){e.preventDefault();var t=c.extend(!0,{},a.getLevelModel(c("#sek-saved-section-id").val())),i=c("#sek-saved-section-title").val(),n=c("#sek-saved-section-description").val(),o=a.guid(),r=a.preProcessSektion(t);if(_.isEmpty(i))return c("#sek-saved-section-title").addClass("error"),void s.previewer.trigger("sek-notify",{type:"error",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>@missi18n You need to set a title</strong>","</span>"].join("")});c("#sek-saved-section-title").removeClass("error"),wp.ajax.post("sek_save_section",{nonce:s.settings.nonce.save,sek_title:i,sek_description:n,sek_id:o,sek_data:JSON.stringify(r)}).done(function(e){s.previewer.trigger("sek-notify",{type:"success",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>@missi18n Your section has been saved.</strong>","</span>"].join("")})}).fail(function(e){s.errorLog("ajax sek_save_section => error",e),s.previewer.trigger("sek-notify",{type:"error",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>@missi18n You need to set a title</strong>","</span>"].join("")})})}),c(".sek-cancel-save","#nimble-top-save-ui").on("click",function(e){e.preventDefault(),a.saveUIVisible(!1)}),c("#nimble-top-save-ui")}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(r,a){a.extend(CZRSeksPrototype,{setupFeedBackUI:function(){var t=this;t.feedbackLastUserAction="none",t.feedbackUIId="#nimble-feedback",t.feedbackUIVisible=new r.Value(!1),t.feedbackUIVisible.bind(function(e){t.levelTreeExpanded()||t.toggleFeddBackUI(e),e&&t.refreshSelfClosingTimer()}),t.feedbackUIVisible(!0)},refreshSelfClosingTimer:function(){var e=this;clearTimeout(a(e.feedbackUIId).data("_feedback_user_action_timer_")),a(e.feedbackUIId).data("_feedback_user_action_timer_",setTimeout(function(){_.contains(["go_review","reporting_problem"],e.feedbackLastUserAction)||e.feedbackUIVisible(!1)},6e4))},toggleFeddBackUI:function(e){e=!!_.isUndefined(e)||e;var t,i=this;e?a.when(i.renderAndSetupFeedbackTmpl({})).done(function(e){_.delay(function(){a("body").addClass("nimble-feedback-ui-visible")},200)}):(t=a.Deferred(),a("body").removeClass("nimble-feedback-ui-visible"),0<a(i.feedbackUIId).length?_.delay(function(){a(i.feedbackUIId).remove(),t.resolve()},300):t.resolve(),t.promise()).done(function(){i.feedbackUIVisible(!1)})},renderAndSetupFeedbackTmpl:function(e){var t,i=this;if(0<a(i.feedbackUIId).length)return a(i.feedbackUIId);try{t=wp.template("nimble-feedback-ui")({})}catch(e){return r.errare("Error when parsing the the feedback template",e),!1}if(a("#customize-preview").after(a(t)),!i.feedbackEventsScheduled){var n=a(i.feedbackUIId).data("sek-dismiss-pointer"),o=function(){wp.ajax.post("dismiss-wp-pointer",{pointer:n}).fail(function(e){r.errare("ajax dismiss failure",e)})};return a("body").on("click","[data-sek-feedback-action]",function(e){e.preventDefault(),i.refreshSelfClosingTimer();var t=a(this).data("sek-feedback-action");switch(i.feedbackLastUserAction=t){case"not_enjoying":a(i.feedbackUIId).find(".sek-feedback-step-one").hide(),a(i.feedbackUIId).find(".sek-feedback-step-two-not-enjoying").show();break;case"enjoying":a(i.feedbackUIId).find(".sek-feedback-step-one").hide(),a(i.feedbackUIId).find(".sek-feedback-step-two-enjoying").show();break;case"reporting_problem":window.open(a(this).data("problem-href"),"_blank");break;case"go_review":window.open("https://wordpress.org/support/plugin/nimble-builder/reviews/?filter=5/#new-post","_blank");break;case"maybe_later":i.feedbackUIVisible(!1),wp.ajax.post("sek_postpone_feedback",{nonce:r.settings.nonce.save,transient_duration_in_days:30}).fail(function(e){r.errare("ajax dismiss failure",e)});break;case"already_did":a(i.feedbackUIId).find(".sek-feedback-step-two-not-enjoying").hide(),a(i.feedbackUIId).find(".sek-feedback-step-two-enjoying").hide(),a(i.feedbackUIId).find(".sek-feedback-step-three-thanks").show(),_.delay(function(){i.feedbackUIVisible(!1)},3e3),o();break;case"dismiss":i.feedbackUIVisible(!1),o();break;default:r.errare("::renderAndSetupFeedbackTmpl => invalid action")}}),i.feedbackEventsScheduled=!0,a(i.feedbackUIId)}}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(r,e){jQuery.extend(CZRSeksPrototype,{getRevisionHistory:function(e){return wp.ajax.post("sek_get_revision_history",{nonce:r.settings.nonce.save,skope_id:e.is_local?r.czr_skopeBase.getSkopeProperty("skope_id"):sektionsLocalizedData.globalSkopeId})},setSingleRevision:function(i){var n=this,o=function(e,t){r.previewer.trigger("sek-notify",{notif_id:"restore-revision-error",type:t||"info",duration:1e4,message:['<span style="">',"<strong>",e||"","</strong>","</span>"].join("")})};wp.ajax.post("sek_get_single_revision",{nonce:r.settings.nonce.save,revision_post_id:i.revision_post_id}).done(function(e){var t=i.is_local?n.localSectionsSettingId():n.getGlobalSectionsSettingId();_.isEqual(r(t)(),e)?o(sektionsLocalizedData.i18n["This is the current version."],"info"):n.updateAPISetting({action:"sek-restore-revision",is_global_location:!i.is_local,revision_value:e}).done(function(){r.previewer.refresh()}).fail(function(e){r.errare("::setSingleRevision error when firing ::updateAPISetting",e),o(sektionsLocalizedData.i18n["The revision could not be restored."],"error")})}).fail(function(e){r.errare("::setSingleRevision ajax error",e),o(sektionsLocalizedData.i18n["The revision could not be restored."],"error")})}})}(wp.customize);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,l){l.extend(CZRSeksPrototype,{setupSettingsToBeSaved:function(){var i,o=this,e={local:{collectionSettingId:o.localSectionsSettingId()},global:{collectionSettingId:o.getGlobalSectionsSettingId()}};_.each(e,function(e,t){if(i=c.czr_skopeBase.getSkopeProperty("sektions",t).db_values,_.isEmpty(e.collectionSettingId))throw new Error("setupSettingsToBeSaved => the collectionSettingId is invalid");if(!c.has(e.collectionSettingId)){c.CZR_Helpers.register({what:"setting",id:e.collectionSettingId,value:o.validateSettingValue(_.isObject(i)?i:o.getDefaultSektionSettingValue(t),t),transport:"postMessage",type:"option",track:!1,origin:"nimble"});c(e.collectionSettingId,function(n){n.bind(_.debounce(function(e,t,i){if(!_.isObject(i)||!0!==i.navigatingHistoryLogs)try{o.trackHistoryLog(n,i)}catch(e){c.errare("setupSettingsToBeSaved => trackHistoryLog",e)}},1e3))})}})},validateSettingValue:function(i,n){if(!_.isObject(i))return c.errare("::validateSettingValue => validation error => the setting should be an object",i),null;if(!_.isEmpty(n)&&_.contains(["local","global"],n)){var o={},r=!1,e=[],a=function(e){c.errare(e,i),c.previewer.trigger("sek-notify",{type:"error",duration:6e4,message:['<span style="font-size:0.95em">',"<strong>"+e+"</strong>","<br>",sektionsLocalizedData.i18n["If this problem locks Nimble Builder, you can try resetting the sections of this page."],"<br>",'<span style="text-align:center;display:block">','<button type="button" class="button" aria-label="'+sektionsLocalizedData.i18n.Reset+'" data-sek-reset="true">'+sektionsLocalizedData.i18n.Reset+"</button>","</span>","</span>"].join("")}),r=!0},s=function(t){if(!r)if(_.isUndefined(t)&&_.isEmpty(o)){if(t=l.extend(!0,{},i),_.isUndefined(t.id)||_.isUndefined(t.level)){if(_.isUndefined(t.collection))return void a("validation error => the root level is missing the collection of locations");if(!_.isEmpty(t.level)||!_.isEmpty(t.id))return void a('validation error => the root level should not have a "level" or an "id" property');_.each(t,function(e,t){switch(n){case"local":if(!_.contains(["collection","local_options","fonts"],t))return void a("validation error => unauthorized option group for local setting value => "+t);break;case"global":if(!_.contains(["collection","fonts"],t))return void a("validation error => unauthorized option group for global setting value => "+t)}}),_.each(i.collection,function(e){o=t,s(e)})}}else{if(_.isEmpty(t.id)||!_.isString(t.id))return void a("validation error => a "+t.level+" level must have a valid id");if(_.contains(e,t.id))return void a("validation error => duplicated level id : "+t.id);if(e.push(t.id),_.isEmpty(t.level)||!_.isString(t.level))return void a("validation error => a "+t.level+" level must have a level property");if(!_.contains(["location","section","column","module"],t.level))return void a('validation error => the level "'+t.level+'" is not authorized');if("module"==t.level){if(!_.isUndefined(t.collection))return void a("validation error => a module can not have a collection property")}else if(_.isUndefined(t.collection))return void a("validation error => missing collection property for level => "+t.level+" "+t.id);switch(_.isUndefined(t.ver_ini)&&c.errare("validateSettingValue() => validation error => a "+t.level+' should have a version property : "ver_ini"'),t.level){case"location":if(!_.isEmpty(o.level))return void a("validation error => the parent of location "+t.id+" should have no level set");break;case"section":if(t.is_nested&&"column"!=o.level)return void a("validation error => the nested section "+t.id+" must be child of a column");if(!t.is_nested&&"location"!=o.level)return void a("validation error => the section "+t.id+" must be child of a location");break;case"column":if("section"!=o.level)return void a("validation error => the column "+t.id+" must be child of a section");break;case"module":if("column"!=o.level)return void a("validation error => the module "+t.id+" must be child of a column")}"module"!=t.level&&_.each(t.collection,function(e){o=l.extend(!0,{},t),_.isUndefined(e)?a("validation error => undefined level "):s(e)})}};return s(),r?null:i}c.errare("::validateSettingValue => invalid scope provided.",n)},resetCollectionSetting:function(e){if(_.isEmpty(e)||!_.contains(["local","global"],e))throw new Error("resetCollectionSetting => invalid scope provided.",e);return l.extend(!0,{},this.getDefaultSektionSettingValue(e))}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,n){n.extend(CZRSeksPrototype,{reactToPreviewMsg:function(){var o=this,r={},a={},s=!0,e={"sek-add-section":{callback:function(e){return s=!!_.isUndefined(e.send_to_preview)||e.send_to_preview,a={},r={action:"sek-add-section",id:sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid(),location:e.location,in_sektion:e.in_sektion,in_column:e.in_column,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column),before_section:e.before_section,after_section:e.after_section,is_first_section:e.is_first_section},o.updateAPISetting(r)},complete:function(e){e.apiParams.is_first_section&&c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location}),c.previewer.trigger("sek-pick-content",{id:e.apiParams?e.apiParams.id:"",content_type:"section"}),c.previewer.send("sek-animate-to-level",{id:e.apiParams.id})}},"sek-add-column":{callback:function(e){return s=!0,a={},r={id:sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid(),action:"sek-add-column",in_sektion:e.in_sektion,autofocus:e.autofocus},o.updateAPISetting(r)},complete:function(e){!1!==e.apiParams.autofocus&&c.previewer.trigger("sek-pick-content",{})}},"sek-add-module":{callback:function(e){return s=!0,a={},r={id:sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid(),action:"sek-add-module",in_sektion:e.in_sektion,in_column:e.in_column,module_type:e.content_id,before_module:e.before_module,after_module:e.after_module},o.updateAPISetting(r)},complete:function(e){c.previewer.trigger("sek-edit-module",{id:e.apiParams.id,level:"module",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column}),o.updateAPISetting({action:"sek-update-fonts",is_global_location:o.isGlobalLocation(e.apiParams)}),c.previewer.trigger("sek-refresh-stylesheet",{id:e.apiParams.in_column,location_skope_id:c.czr_skopeBase.getSkopeProperty("skope_id")})}},"sek-remove":{callback:function(e){switch(s=!0,a={},e.level){case"section":var t=o.getLevelModel(e.id);if("no_match"===t){c.errare("reactToPreviewMsg => sek-remove-section => no sektionToRemove matched");break}r={action:"sek-remove-section",id:e.id,location:e.location,in_sektion:e.in_sektion,in_column:e.in_column,is_nested:t.is_nested};break;case"column":r={action:"sek-remove-column",id:e.id,in_sektion:e.in_sektion};break;case"module":r={action:"sek-remove-module",id:e.id,in_sektion:e.in_sektion,in_column:e.in_column};break;default:c.errare("::reactToPreviewMsg => sek-remove => missing level ",e)}return o.updateAPISetting(r)},complete:function(e){if(c.previewer.trigger("sek-pick-content",{}),o.updateAPISetting({action:"sek-update-fonts",is_global_location:o.isGlobalLocation(e.apiParams)}),"sek-remove-section"===e.apiParams.action){var t=o.getLevelModel(e.apiParams.location);_.isEmpty(t.collection)&&c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location})}}},"sek-move":{callback:function(e){switch(s=!0,a={},e.level){case"section":r={action:"sek-move-section",id:e.id,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column),newOrder:e.newOrder,from_location:e.from_location,to_location:e.to_location};break;case"column":r={action:"sek-move-column",id:e.id,newOrder:e.newOrder,from_sektion:e.from_sektion,to_sektion:e.to_sektion};break;case"module":r={action:"sek-move-module",id:e.id,newOrder:e.newOrder,from_column:e.from_column,to_column:e.to_column,from_sektion:e.from_sektion,to_sektion:e.to_sektion}}return o.updateAPISetting(r)},complete:function(e){switch(e.apiParams.action){case"sek-move-section":c.previewer.trigger("sek-edit-options",{id:e.apiParams.id,level:"section",in_sektion:e.apiParams.id}),e.apiParams.from_location!=e.apiParams.to_location&&(c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.to_location}),c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.from_location}));break;case"sek-move-column":c.previewer.trigger("sek-edit-options",{id:e.apiParams.id,level:"column",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column});break;case"sek-refresh-modules-in-column":c.previewer.trigger("sek-edit-module",{id:e.apiParams.id,level:"module",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column})}}},"sek-move-section-up":{callback:function(e){return s=!1,a={},r={action:"sek-move-section-up-down",direction:"up",id:e.id,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column),location:e.location,in_column:e.in_column},o.updateAPISetting(r)},complete:function(e){c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location})}},"sek-move-section-down":{callback:function(e){return s=!1,a={},r={action:"sek-move-section-up-down",direction:"down",id:e.id,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column),location:e.location,in_column:e.in_column},o.updateAPISetting(r)},complete:function(e){c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location})}},"sek-duplicate":{callback:function(e){switch(s=!0,a={},e.level){case"section":r={action:"sek-duplicate-section",id:e.id,location:e.location,in_sektion:e.in_sektion,in_column:e.in_column,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column)};break;case"column":r={action:"sek-duplicate-column",id:e.id,in_sektion:e.in_sektion,in_column:e.in_column};break;case"module":r={action:"sek-duplicate-module",id:e.id,in_sektion:e.in_sektion,in_column:e.in_column}}return o.updateAPISetting(r)},complete:function(e){var t;switch(e.apiParams.action){case"sek-duplicate-section":c.previewer.trigger("sek-edit-options",{id:e.apiParams.id,level:"section",in_sektion:e.apiParams.id}),t=e.apiParams.location,c.previewer.send("sek-animate-to-level",{id:e.apiParams.id});break;case"sek-duplicate-column":c.previewer.trigger("sek-edit-options",{id:e.apiParams.id,level:"column",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column}),t=e.apiParams.in_sektion;break;case"sek-duplicate-module":c.previewer.trigger("sek-edit-module",{id:e.apiParams.id,level:"module",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column}),t=e.apiParams.in_column}c.previewer.trigger("sek-refresh-stylesheet",{id:t,location_skope_id:c.czr_skopeBase.getSkopeProperty("skope_id")})}},"sek-resize-columns":function(e){return s=!0,a={},r=e,o.updateAPISetting(r)},"sek-add-content-in-new-sektion":{callback:function(e){switch(s=!!_.isUndefined(e.send_to_preview)||e.send_to_preview,a={},(r=e).action="sek-add-content-in-new-sektion",r.id=sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid(),e.content_type){case"module":r.droppedModuleId=sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid();break;case"preset_section":c.previewer.send("sek-maybe-print-loader",{loader_located_in_level_id:e.location}),c.previewer.send("sek-maybe-print-loader",{fullPageLoader:!0})}return o.updateAPISetting(r)},complete:function(e){switch(e.apiParams.content_type){case"module":c.previewer.trigger("sek-edit-module",{level:"module",id:e.apiParams.droppedModuleId});break;case"preset_section":c.previewer.send("sek-clean-loader",{cleanFullPageLoader:!0})}o.updateAPISetting({action:"sek-update-fonts",is_global_location:o.isGlobalLocation(e.apiParams)});var t=e.location_skope_id;_.isUndefined(t)&&(t=!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:c.czr_skopeBase.getSkopeProperty("skope_id")),c.previewer.trigger("sek-refresh-stylesheet",{location_skope_id:t,is_global_location:o.isGlobalLocation(e.apiParams)}),e.apiParams.is_first_section&&c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location}),e.apiParams.sektion_to_replace&&c.previewer.trigger("sek-remove",{id:e.apiParams.sektion_to_replace,location:e.apiParams.location,in_column:e.apiParams.in_column,level:"section"})}},"sek-add-preset-section-in-new-nested-sektion":{callback:function(e){return s=!1,a={},(r=e).action="sek-add-preset-section-in-new-nested-sektion",r.id=sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid(),c.previewer.send("sek-maybe-print-loader",{loader_located_in_level_id:e.location}),o.updateAPISetting(r)},complete:function(e){c.previewer.trigger("sek-refresh-stylesheet",{id:e.apiParams.in_sektion,location_skope_id:c.czr_skopeBase.getSkopeProperty("skope_id")}),o.updateAPISetting({action:"sek-update-fonts",is_global_location:o.isGlobalLocation(e.apiParams)}),c.previewer.trigger("sek-refresh-level",{level:"section",id:e.apiParams.in_sektion})}},"sek-pick-content":function(e){return e=_.isObject(e)?e:{},c.czr_sektions.currentContentPickerType=c.czr_sektions.currentContentPickerType||new c.Value,c.czr_sektions.currentContentPickerType(e.content_type||"module"),_.isObject(e)&&e.id&&o.lastClickedTargetInPreview({id:e.id}),s=!0,r={},a={action:"sek-generate-draggable-candidates-picker-ui",content_type:(e=e||{}).content_type||"module",was_triggered:!_.has(e,"was_triggered")||e.was_triggered,focus:!_.has(e,"focus")||e.focus},o.generateUI(a)},"sek-edit-options":function(e){return s=!0,r={},_.isEmpty(e.id)?n.Deferred(function(){this.reject("missing id")}):(a={action:"sek-generate-level-options-ui",level:e.level,id:e.id,in_sektion:e.in_sektion,in_column:e.in_column,options:e.options||[]},o.generateUI(a))},"sek-edit-module":function(e){return s=!0,r={},a={action:"sek-generate-module-ui",level:e.level,id:e.id,in_sektion:e.in_sektion,in_column:e.in_column,options:e.options||[]},o.generateUI(a)},"sek-notify":function(t){s=!1;var i=t.notif_id||"sek-notify";return n.Deferred(function(){c.panel(sektionsLocalizedData.sektionsPanelId,function(e){c.notifications.add(new c.Notification(i,{type:t.type||"info",message:t.message,dismissible:!0})),_.delay(function(){c.notifications.remove(i)},t.duration||5e3)}),this.resolve({is_global_location:o.isGlobalLocation(t)})})},"sek-refresh-level":function(t){return s=!0,n.Deferred(function(e){r={action:"sek-refresh-level",level:t.level,id:t.id},a={},e.resolve({is_global_location:o.isGlobalLocation(t)})})},"sek-refresh-stylesheet":function(t){return s=!0,t=t||{},n.Deferred(function(e){r={id:t.id},a={},e.resolve({is_global_location:o.isGlobalLocation(t)})})},"sek-toggle-save-section-ui":function(t){return s=!1,o.saveUIVisible(!0,t),n.Deferred(function(e){r={},a={},e.resolve({is_global_location:o.isGlobalLocation(t)})})}};_.each(e,function(i,n){c.previewer.bind(n,function(t){var e;if(_.isFunction(i))e=i;else{if(!_.isFunction(i.callback))return void c.errare("::reactToPreviewMsg => invalid callback for action "+n);e=i.callback}try{e(t).done(function(e){e=e||{},s?c.previewer.send(n,{location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:c.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:c.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:r,uiParams:a,cloneId:!_.isEmpty(e.cloneId)&&e.cloneId}):c.previewer.trigger([n,"done"].join("_"),{apiParams:r,uiParams:a}),o.trigger([n,"done"].join("_"),t)}).fail(function(e){c.errare("reactToPreviewMsg => error when firing "+n,e),c.previewer.trigger("sek-notify",{type:"error",duration:3e4,message:['<span style="font-size:0.95em">',"<strong>"+e+"</strong>","<br>",sektionsLocalizedData.i18n["If this problem locks Nimble Builder, you can try resetting the sections of this page."],"<br>",'<span style="text-align:center;display:block">','<button type="button" class="button" aria-label="'+sektionsLocalizedData.i18n.Reset+'" data-sek-reset="true">'+sektionsLocalizedData.i18n.Reset+"</button>","</span>","</span>"].join("")})})}catch(e){c.errare("reactToPreviewMsg => error when receiving "+n,e)}})}),_.each(e,function(t,i){c.previewer.bind([i,"done"].join("_"),function(e){if(_.isFunction(t.complete))try{t.complete(e)}catch(e){c.errare("reactToPreviewMsg done => error when receiving "+[i,"done"].join("_"),e)}})})},schedulePrintSectionJson:function(){var i=this;c.previewer.bind("sek-to-json",function(e){var t=n.extend(!0,{},i.getLevelModel(e.id));console.log(JSON.stringify(i.cleanIds(t)))})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(y,v){v.extend(CZRSeksPrototype,{generateUI:function(e){var t=this,i=v.Deferred();switch(_.isEmpty(e.action)&&i.reject("generateUI => missing action"),e.action){case"sek-generate-module-ui":try{i=t.generateUIforFrontModules(e,i)}catch(e){y.errare("::generateUI() => error",e),i=v.Deferred()}break;case"sek-generate-level-options-ui":try{i=t.generateUIforLevelOptions(e,i)}catch(e){y.errare("::generateUI() => error",e),i=v.Deferred()}break;case"sek-generate-draggable-candidates-picker-ui":t.cleanRegistered();try{i=t.generateUIforDraggableContent(e,i)}catch(e){y.errare("::generateUI() => error",e),i=v.Deferred()}break;case"sek-generate-local-skope-options-ui":t.cleanRegistered();try{i=t.generateUIforLocalSkopeOptions(e,i)}catch(e){y.errare("::generateUI() => error",e),i=v.Deferred()}break;case"sek-generate-global-options-ui":t.cleanRegistered();try{i=t.generateUIforGlobalOptions(e,i)}catch(e){y.errare("::generateUI() => error",e),i=v.Deferred()}}return"pending"==i.state()?i.resolve().promise():i.promise()},updateAPISettingAndExecutePreviewActions:function(n){if(!_.isEmpty(n.settingParams)&&_.has(n.settingParams,"to")){var o,r=this,e=n.settingParams.to,t=null,i=!1;if(!_.isEmpty(n.settingParams.args)&&_.has(n.settingParams.args,"moduleRegistrationParams")){var a=n.settingParams.args.moduleRegistrationParams.control,s=n.settingParams.args.moduleRegistrationParams.id,c=a.czr_Module(s);if(_.isEmpty(c)?y.errare("updateAPISettingAndExecutePreviewActions => missing parentModuleInstance",n):(t=c.module_type,i=c.isMultiItem()),!i&&_.isObject(e)?o=r.normalizeAndSanitizeSingleItemInputValues(e,t):(o=[],_.each(e,function(e){o.push(r.normalizeAndSanitizeSingleItemInputValues(e,t))})),_.isEmpty(n.defaultPreviewAction))y.errare("updateAPISettingAndExecutePreviewActions => missing defaultPreviewAction in passed params. No action can be triggered to the api.previewer.",n);else{var l,d="refresh_stylesheet"===n.defaultPreviewAction,u="refresh_markup"===n.defaultPreviewAction,p="refresh_fonts"===n.defaultPreviewAction,m="refresh_preview"===n.defaultPreviewAction,f=n.settingParams.args.input_changed,g=function(){return l&&_.isString(l.refresh_markup)&&"true"!==l.refresh_markup&&"false"!==l.refresh_markup};_.isUndefined(f)||(l=r.getInputRegistrationParams(f,t),_.isUndefined(l.refresh_stylesheet)||(d=Boolean(l.refresh_stylesheet)),_.isUndefined(l.refresh_markup)||(u=g()?l.refresh_markup:Boolean(l.refresh_markup)),_.isUndefined(l.refresh_fonts)||(p=Boolean(l.refresh_fonts)),_.isUndefined(l.refresh_preview)||(m=Boolean(l.refresh_preview)));var h=function(){if(!0!==n.isGlobalOptions)return r.updateAPISetting({action:n.uiParams.action,id:n.uiParams.id,value:o,in_column:n.uiParams.in_column,in_sektion:n.uiParams.in_sektion,options_type:n.options_type,settingParams:n.settingParams}).done(function(e){!0===d&&y.previewer.send("sek-refresh-stylesheet",{location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:y.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:y.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-refresh-stylesheet",id:n.uiParams.id,level:n.uiParams.level}});var t=function(){y.previewer.send("sek-refresh-level",{location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:y.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:y.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-refresh-level",id:n.uiParams.id,level:n.uiParams.level},skope_id:y.czr_skopeBase.getSkopeProperty("skope_id")})};if(!0===u&&t(),g()){var i=n.settingParams.args.input_value;if(!_.isString(i))throw new Error("::updateAPISettingAndExecutePreviewActions => _doUpdateWithRequestedAction => refreshMarkupWhenNeededForInput => html content is not a string.");r.htmlIncludesShortcodesOrTmplTags(i)?t():y.previewer.send("sek-update-html-in-selector",{selector:l.refresh_markup,html:i,id:n.uiParams.id,location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:y.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:y.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-update-html-in-selector",id:n.uiParams.id,level:n.uiParams.level},skope_id:y.czr_skopeBase.getSkopeProperty("skope_id")})}!0===m&&y.previewer.refresh()});if(_.isEmpty(n.options_type))y.errare("updateAPISettingAndExecutePreviewActions => error when updating the global options => missing options_type");else{var e=y(sektionsLocalizedData.optNameForGlobalOptions)(),t=v.extend(!0,{},_.isObject(e)?e:{}),i={};_.each(o||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(i[t]=e)}),t[n.options_type]=i,y(sektionsLocalizedData.optNameForGlobalOptions)(t)}};if(!0===p){var k=n.settingParams.args.input_value;if(!_.isString(k))return void y.errare("updateAPISettingAndExecutePreviewActions => font-family must be a string",k);-1<k.indexOf("gfont")?r.updateAPISetting({action:"sek-update-fonts",font_family:k,is_global_location:r.isGlobalLocation(n.uiParams)}).always(function(){h().then(function(){r.updateAPISetting({action:"sek-update-fonts",is_global_location:r.isGlobalLocation(n.uiParams)})})}):h()}else h()}}else y.errare("updateAPISettingAndExecutePreviewActions => missing params.settingParams.args.moduleRegistrationParams The api main setting can not be updated",n)}else y.errare("updateAPISettingAndExecutePreviewActions => missing params.settingParams.to. The api main setting can not be updated",n)},normalizeAndSanitizeSingleItemInputValues:function(e,o){var i,r={},n={},a=null,s=this;return _.each(e,function(e,t){var i,n;_.contains(["title","id"],t)||(null!==o&&"no_default_value_specified"===(a=s.getInputDefaultValue(t,o))&&y.infoLog("::normalizeAndSanitizeSingleItemInputValues => missing default value for input "+t+" in module "+o),i=e,n=a,(_.isBoolean(i)||_.isBoolean(n)?Boolean(i)===Boolean(n):_.isNumber(i)||_.isNumber(n)?Number(i)===Number(n):_.isString(i)||_.isString(n)?i+""==n+"":_.isObject(i)&&_.isObject(n)?_.isEqual(i,n):_.isArray(i)&&_.isArray(n)?JSON.stringify(i.sort())===JSON.stringify(n.sort()):i===n)||(_.isString(e)||_.isObject(e))&&_.isEmpty(e)||(r[t]=e))}),_.each(r,function(e,t){switch(s.getInputType(t,o)){case"text":case"textarea":case"check":case"gutencheck":case"select":case"radio":case"number":case"upload":case"upload_url":case"color":case"wp_color_alpha":case"wp_color":case"content_picker":case"detached_tinymce_editor":case"nimble_tinymce_editor":case"password":case"range":case"range_slider":case"hidden":case"h_alignment":case"h_text_alignment":case"spacing":case"bg_position":case"v_alignment":case"font_size":case"line_height":case"font_picker":default:i=e}n[t]=i}),n},isUIControlAlreadyRegistered:function(t){var e=_.filter(this.registered(),function(e){return e.id==t&&"control"===e.what}),i=!1;return _.isEmpty(e)?i=y.control.has(t):(i=!0,1<e.length&&y.errare("generateUI => why is this control registered more than once ? => "+t)),i},htmlIncludesShortcodesOrTmplTags:function(e){var t=e.match(/\[+([\w_-])+/g),i=e.match(/\{\{+([\w_-])+/g),n=[],o=[];if(t)for(var r=0;r<t.length;r++){var a=t[r].replace(/^\[+/g,"");-1===n.indexOf(a)&&n.push(a)}if(i)for(var s=0;s<i.length;s++){var c=i[s].replace(/^\[+/g,"");-1===o.indexOf(c)&&o.push(c)}return!_.isEmpty(n)||!_.isEmpty(o)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(a,s){s.extend(CZRSeksPrototype,{generateUIforDraggableContent:function(o,e){var r=this,t={};s.extend(t,{content_type_switcher:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+"_sek_content_type_switcher_ui",module_type:"sek_content_type_switcher_module",controlLabel:sektionsLocalizedData.i18n["Select a content type"],priority:0,settingValue:{content_type:o.content_type}},module_picker:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+"_sek_draggable_modules_ui",module_type:"sek_module_picker_module",controlLabel:sektionsLocalizedData.i18n["Pick a module"],content_type:"module",priority:20,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_intro_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.guid()+"_sek_draggable_sections_ui",module_type:"sek_intro_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Sections for an introduction"],content_type:"section",expandAndFocusOnInit:!1,priority:10,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_features_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.guid()+"_sek_draggable_sections_ui",module_type:"sek_features_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Sections for services and features"],content_type:"section",expandAndFocusOnInit:!1,priority:10,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_contact_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.guid()+"_sek_draggable_sections_ui",module_type:"sek_contact_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Contact-us sections"],content_type:"section",expandAndFocusOnInit:!1,priority:10,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_column_layouts_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.guid()+"_sek_draggable_sections_ui",module_type:"sek_column_layouts_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Empty sections with columns layout"],content_type:"section",expandAndFocusOnInit:!1,priority:10,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'}}),sektionsLocalizedData.isNimbleHeaderFooterEnabled&&s.extend(t,{sek_header_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.guid()+"_sek_draggable_sections_ui",module_type:"sek_header_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Header sections"],content_type:"section",expandAndFocusOnInit:!1,priority:10,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_footer_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.guid()+"_sek_draggable_sections_ui",module_type:"sek_footer_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Footer sections"],content_type:"section",expandAndFocusOnInit:!1,priority:10,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'}}),sektionsLocalizedData.isSavedSectionEnabled&&s.extend(t,{sek_my_sections_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.guid()+"_sek_draggable_sections_ui",module_type:"sek_my_sections_sec_picker_module",controlLabel:"@missi18n My sections",content_type:"section",expandAndFocusOnInit:!1,priority:10,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'}});var i=_.keys(t)[0],n=t[i].settingControlId;return r.isUIControlAlreadyRegistered(n)?a.control(n,function(t){t.focus({completeCallback:function(){var e=t.container;e.hasClass("button-see-me")||(e.addClass("button-see-me"),_.delay(function(){e.removeClass("button-see-me")},800))}})}):(_do_register_=function(){_.each(t,function(n,e){a.has(n.settingControlId)||(a(n.settingControlId,function(e){e.bind(function(e,t){a.errare("generateUIforDraggableContent => the setting() should not changed")})}),a.CZR_Helpers.register({origin:"nimble",level:o.level,what:"setting",id:n.settingControlId,dirty:!1,value:n.settingValue||{},transport:"postMessage",type:"_nimble_ui_"})),a.CZR_Helpers.register({origin:"nimble",level:o.level,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:r.SECTION_ID_FOR_CONTENT_PICKER,priority:n.priority||10,settings:{default:n.settingControlId},track:!1}).done(function(){a.control(n.settingControlId,function(e){e.content_type=n.content_type,!0===o.focus&&e.focus({completeCallback:function(){}});var t=e.container.find("label > .customize-control-title"),i=t.html();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.icon),"section"===e.content_type?(e.container.find(".czr-items-wrapper").hide(),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false"),!0===n.expandAndFocusOnInit&&"false"==e.container.attr("data-sek-expanded")&&(e.container.find(".czr-items-wrapper").show(),t.trigger("click"))):e.container.attr("data-sek-accordion","no")})})})},a.section(r.SECTION_ID_FOR_CONTENT_PICKER,function(e){_do_register_();var t=e.container.find(".accordion-section-title"),i=e.container.find(".customize-section-title h3");0<t.length&&t.find(".sek-level-option-icon").length<1&&t.prepend('<i class="fas fa-grip-vertical sek-level-option-icon"></i>'),0<i.length&&i.find(".sek-level-option-icon").length<1&&i.find(".customize-action").after('<i class="fas fa-grip-vertical sek-level-option-icon"></i>'),r.scheduleModuleAccordion.call(e,{expand_first_control:!0})})),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(d,u){u.extend(CZRSeksPrototype,{generateUIforFrontModules:function(r,e){var a=this;_.isEmpty(r.id)&&e.reject("generateUI => missing id");var i=a.getLevelProperty({property:"value",id:r.id}),t=a.getLevelProperty({property:"module_type",id:r.id}),n=a.getRegisteredModuleProperty(t,"name");_.isEmpty(t)&&e.reject("generateUI => module => invalid module_type");var o={};if(!0===a.getRegisteredModuleProperty(t,"is_father")){var s=a.getRegisteredModuleProperty(t,"children");if(_.isEmpty(s))throw new Error("::generateUIforFrontModules => a father module "+t+" is missing children modules ");_.each(s,function(e,t){o[t]={settingControlId:r.id+"__"+t,module_type:e,controlLabel:a.getRegisteredModuleProperty(e,"name")}})}else o.__no_option_group_to_be_updated_by_children_modules__={settingControlId:r.id,module_type:t,controlLabel:n};var c=_.keys(o)[0],l=o[c].settingControlId;return a.isUIControlAlreadyRegistered(l)?d.control(l).focus({completeCallback:function(){var e=d.control(l).container;e.hasClass("button-see-me")||(e.addClass("button-see-me"),_.delay(function(){e.removeClass("button-see-me")},800))}}):(a.cleanRegistered(),_do_register_=function(){_.each(o,function(n,o){if(!d.has(n.settingControlId)){var t=function(e,t,i){try{a.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh_markup",uiParams:_.extend(r,{action:"sek-set-module-value"}),options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){d.errare("::generateUIforFrontModules => Error in updateAPISettingAndExecutePreviewActions",e)}};d(n.settingControlId,function(e){e.bind(_.debounce(t,a.SETTING_UPDATE_BUFFER))});var e=u.extend(!0,{},i);"__no_option_group_to_be_updated_by_children_modules__"!==o&&(e=!_.isEmpty(e)&&_.isObject(e)&&_.isObject(e[o])?e[o]:{}),d.CZR_Helpers.register({origin:"nimble",level:r.level,what:"setting",id:n.settingControlId,dirty:!1,value:e,transport:"postMessage",type:"_nimble_ui_"})}d.CZR_Helpers.register({origin:"nimble",level:r.level,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:r.id,priority:10,settings:{default:n.settingControlId}}).done(function(){}),d.control(n.settingControlId,function(e){d.control(n.settingControlId).focus({completeCallback:function(){}}),e.container.find(".czr-items-wrapper").hide();var t=e.container.find("label > .customize-control-title"),i=t.html();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.icon),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false")})})},d.section.when(r.id,function(){d.section(r.id).focus(),_do_register_()}),d.CZR_Helpers.register({origin:"nimble",what:"section",id:r.id,title:sektionsLocalizedData.i18n["Content for"]+" "+n,panel:sektionsLocalizedData.sektionsPanelId,priority:1e3}).done(function(){}),d.section(r.id,function(e){e.container.find(".accordion-section-title").first().hide();var t=e.container.find(".customize-section-title h3");0<t.length&&t.find(".customize-action").after('<i class="fas fa-pencil-alt sek-level-option-icon"></i>'),a.scheduleModuleAccordion.call(e,{expand_first_control:!0})})),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{generateUIforLevelOptions:function(a,e){var s=this,c=s.getLevelProperty({property:"options",id:a.id});c=_.isObject(c)?c:{};var t={};d.extend(t,{bg:{settingControlId:a.id+"__bg_options",module_type:"sek_level_bg_module",controlLabel:sektionsLocalizedData.i18n["Background settings for the"]+" "+sektionsLocalizedData.i18n[a.level],expandAndFocusOnInit:!0,icon:'<i class="material-icons sek-level-option-icon">gradient</i>'},border:{settingControlId:a.id+"__border_options",module_type:"sek_level_border_module",controlLabel:sektionsLocalizedData.i18n["Borders settings for the"]+" "+sektionsLocalizedData.i18n[a.level],icon:'<i class="material-icons sek-level-option-icon">rounded_corner</i>'},spacing:{settingControlId:a.id+"__spacing_options",module_type:"sek_level_spacing_module",controlLabel:sektionsLocalizedData.i18n["Padding and margin settings for the"]+" "+sektionsLocalizedData.i18n[a.level],icon:'<i class="material-icons sek-level-option-icon">center_focus_weak</i>'},anchor:{settingControlId:a.id+"__anchor_options",module_type:"sek_level_anchor_module",controlLabel:sektionsLocalizedData.i18n["Custom anchor ( CSS ID ) and CSS classes for the"]+" "+sektionsLocalizedData.i18n[a.level],icon:'<i class="fas fa-anchor sek-level-option-icon"></i>'},visibility:{settingControlId:a.id+"__visibility_options",module_type:"sek_level_visibility_module",controlLabel:sektionsLocalizedData.i18n["Device visibility settings for the"]+" "+sektionsLocalizedData.i18n[a.level],icon:'<i class="far fa-eye sek-level-option-icon"></i>'},height:{settingControlId:a.id+"__height_options",module_type:"sek_level_height_module",controlLabel:sektionsLocalizedData.i18n["Height and vertical alignment for the"]+" "+sektionsLocalizedData.i18n[a.level],icon:'<i class="fas fa-ruler-vertical sek-level-option-icon"></i>'}}),"section"===a.level&&(d.extend(t,{width:{settingControlId:a.id+"__width_options",module_type:"sek_level_width_section",controlLabel:sektionsLocalizedData.i18n["Width settings for the"]+" "+sektionsLocalizedData.i18n[a.level],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'}}),d.extend(t,{breakpoint:{settingControlId:a.id+"__breakpoint_options",module_type:"sek_level_breakpoint_module",controlLabel:sektionsLocalizedData.i18n["Responsive settings : breakpoint, column direction"],icon:'<i class="material-icons sek-level-option-icon">devices</i>'}})),"module"===a.level&&d.extend(t,{width:{settingControlId:a.id+"__width_options",module_type:"sek_level_width_module",controlLabel:sektionsLocalizedData.i18n["Width settings for the"]+" "+sektionsLocalizedData.i18n[a.level],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'}});var i=_.keys(t)[0],n=t[i].settingControlId;return s.isUIControlAlreadyRegistered(n)?l.control(n).focus({completeCallback:function(){var e=l.control(n).container;e.hasClass("button-see-me")||(e.addClass("button-see-me"),_.delay(function(){e.removeClass("button-see-me")},800))}}):(s.cleanRegistered(),_do_register_=function(){_.each(t,function(n,o){if(s.isUIControlAlreadyRegistered(n.settingControlId))l.section(l.control(n.settingControlId).section()).expanded(!0);else{if(!l.has(n.settingControlId)){var t=function(e,t,i){try{s.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh_stylesheet",uiParams:a,options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){l.errare("::generateUIforLevelOptions => Error in updateAPISettingAndExecutePreviewActions",e)}};l(n.settingControlId,function(e){e.bind(_.debounce(t,s.SETTING_UPDATE_BUFFER))});var e=c[o]||{},i=s.getModuleStartingValue(n.module_type);if("no_starting_value"!==i&&_.isObject(i)){var r=d.extend(!0,{},i);e=d.extend(r,e)}l.CZR_Helpers.register({origin:"nimble",level:a.level,what:"setting",id:n.settingControlId,dirty:!1,value:e,transport:"postMessage",type:"_nimble_ui_"})}l.CZR_Helpers.register({origin:"nimble",level:a.level,level_id:a.id,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:a.id,priority:0,settings:{default:n.settingControlId}}).done(function(){}),l.control(n.settingControlId,function(e){!0===n.expandAndFocusOnInit&&e.focus({completeCallback:function(){}}),e.container.find(".czr-items-wrapper").hide();var t=e.container.find("label > .customize-control-title"),i=t.html();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.icon),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false")})}})},l.section.has(a.id)||l.section(a.id,function(e){s.scheduleModuleAccordion.call(e,{expand_first_control:!0})}),l.CZR_Helpers.register({origin:"nimble",what:"section",id:a.id,title:sektionsLocalizedData.i18n["Settings for the"]+" "+a.level,panel:sektionsLocalizedData.sektionsPanelId,priority:10}).done(function(){}),l.section(a.id,function(e){_do_register_(),e.container.find(".accordion-section-title").first().hide();var t=e.container.find(".customize-section-title h3");0<t.length&&t.find(".sek-level-option-icon").length<1&&t.find(".customize-action").after('<i class="fas fa-sliders-h sek-level-option-icon"></i>')})),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{getLocalSkopeOptionId:function(){var e=l.czr_skopeBase.getSkopeProperty("skope_id");return _.isEmpty(e)?(l.errare("czr_sektions::getLocalSkopeOptionId => empty skope_id "),""):sektionsLocalizedData.optPrefixForSektionsNotSaved+e+"__localSkopeOptions"},generateUIforLocalSkopeOptions:function(a,e){var s=this,i=s.getLocalSkopeOptionId();if(s.isUIControlAlreadyRegistered(i))return e;if(s.localOptionsRegistrationParams={},_.isUndefined(sektionsLocalizedData.localOptionsMap)||!_.isObject(sektionsLocalizedData.localOptionsMap))return l.errare("::generateUIforGlobalOptions => missing or invalid localOptionsMap"),e;!0===a.clean_settings&&s.cleanRegisteredLocalOptionSettings(),_.each(sektionsLocalizedData.localOptionsMap,function(e,t){switch(t){case"template":s.localOptionsRegistrationParams[t]={settingControlId:i+"__template",module_type:e,controlLabel:sektionsLocalizedData.i18n["Page template"],expandAndFocusOnInit:!1,icon:'<i class="material-icons sek-level-option-icon">check_box_outline_blank</i>'};break;case"local_header_footer":sektionsLocalizedData.isNimbleHeaderFooterEnabled&&(s.localOptionsRegistrationParams[t]={settingControlId:i+"__local_header_footer",module_type:e,controlLabel:sektionsLocalizedData.i18n["Page header and footer"],icon:'<i class="material-icons sek-level-option-icon">web</i>'});break;case"widths":s.localOptionsRegistrationParams[t]={settingControlId:i+"__widths",module_type:e,controlLabel:sektionsLocalizedData.i18n["Inner and outer widths"],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'};break;case"custom_css":s.localOptionsRegistrationParams[t]={settingControlId:i+"__custom_css",module_type:e,controlLabel:sektionsLocalizedData.i18n["Custom CSS"],icon:'<i class="material-icons sek-level-option-icon">code</i>'};break;case"local_performances":s.localOptionsRegistrationParams[t]={settingControlId:i+"__local_performances",module_type:e,controlLabel:sektionsLocalizedData.i18n["Page speed optimizations"],icon:'<i class="fas fa-fighter-jet sek-level-option-icon"></i>'};break;case"local_reset":s.localOptionsRegistrationParams[t]={settingControlId:i+"__local_reset",module_type:e,controlLabel:sektionsLocalizedData.i18n["Reset the sections in this page"],icon:'<i class="material-icons sek-level-option-icon">cached</i>'};break;case"local_revisions":s.localOptionsRegistrationParams[t]={settingControlId:i+"__local_revisions",module_type:e,controlLabel:sektionsLocalizedData.i18n["Revision history of local sections"],icon:'<i class="material-icons sek-level-option-icon">history</i>'};break;case"import_export":s.localOptionsRegistrationParams[t]={settingControlId:i+"__local_imp_exp",module_type:e,controlLabel:sektionsLocalizedData.i18n["Export / Import"],icon:'<i class="material-icons sek-level-option-icon">import_export</i>'};break;default:l.errare("::generateUIforLocalOptions => an option group could not be registered => "+e,t)}});var t=l(s.localSectionsSettingId())(),c=d.extend(!0,{},_.isObject(t.local_options)?t.local_options:{});return _do_register_=function(){_.each(s.localOptionsRegistrationParams,function(n,o){var e=s.getModuleStartingValue(n.module_type),t=_.isObject(c[o])?c[o]:{};if(!l.has(n.settingControlId)){var i=function(e,t,i){try{s.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh",uiParams:a,options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){l.errare("::generateUIforLocalSkopeOptions => Error in updateAPISettingAndExecutePreviewActions",e)}};if(l(n.settingControlId,function(e){e.bind(_.debounce(i,s.SETTING_UPDATE_BUFFER))}),"no_starting_value"!==e&&_.isObject(e)){var r=d.extend(!0,{},e);t=d.extend(r,t)}l.CZR_Helpers.register({origin:"nimble",level:a.level,what:"setting",id:n.settingControlId,dirty:!1,value:t,transport:"postMessage",type:"_nimble_ui_"})}l.CZR_Helpers.register({origin:"nimble",level:a.level,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:s.SECTION_ID_FOR_LOCAL_OPTIONS,priority:10,settings:{default:n.settingControlId}}).done(function(){l.control(n.settingControlId,function(e){e.container.find(".czr-items-wrapper").hide();var t=e.container.find("label > .customize-control-title"),i=t.html();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.icon),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false"),!0===n.expandAndFocusOnInit&&"false"==e.container.attr("data-sek-expanded")&&t.trigger("click")})})})},_do_register_(),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{generateUIforGlobalOptions:function(a,e){var s=this,i=sektionsLocalizedData.optPrefixForSektionsNotSaved+sektionsLocalizedData.optNameForGlobalOptions;if(s.isUIControlAlreadyRegistered(i))return e;var n={};if(_.isUndefined(sektionsLocalizedData.globalOptionsMap)||!_.isObject(sektionsLocalizedData.globalOptionsMap))return l.errare("::generateUIforGlobalOptions => missing or invalid globalOptionsMap"),e;_.each(sektionsLocalizedData.globalOptionsMap,function(e,t){switch(t){case"global_header_footer":sektionsLocalizedData.isNimbleHeaderFooterEnabled&&(n[t]={settingControlId:i+"__header_footer",module_type:e,controlLabel:sektionsLocalizedData.i18n["Site wide header and footer"],icon:'<i class="material-icons sek-level-option-icon">web</i>'});break;case"breakpoint":n[t]={settingControlId:i+"__breakpoint",module_type:e,controlLabel:sektionsLocalizedData.i18n["Site wide breakpoint for Nimble sections"],expandAndFocusOnInit:!1,icon:'<i class="material-icons sek-level-option-icon">devices</i>'};break;case"widths":n[t]={settingControlId:i+"__widths",module_type:e,controlLabel:sektionsLocalizedData.i18n["Site wide inner and outer sections widths"],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'};break;case"performances":n[t]={settingControlId:i+"__performances",module_type:e,controlLabel:sektionsLocalizedData.i18n["Site wide page speed optimizations"],icon:'<i class="fas fa-fighter-jet sek-level-option-icon"></i>'};break;case"recaptcha":n[t]={settingControlId:i+"__recaptcha",module_type:e,controlLabel:sektionsLocalizedData.i18n["Protect your contact forms with Google reCAPTCHA"],icon:'<i class="material-icons sek-level-option-icon">security</i>'};break;case"global_revisions":n[t]={settingControlId:i+"__global_revisions",module_type:e,controlLabel:sektionsLocalizedData.i18n["Revision history of global sections"],icon:'<i class="material-icons sek-level-option-icon">history</i>'};break;case"global_reset":n[t]={settingControlId:i+"__global_reset",module_type:e,controlLabel:sektionsLocalizedData.i18n["Reset the sections displayed in global locations"],icon:'<i class="material-icons sek-level-option-icon">cached</i>'};break;case"beta_features":n[t]={settingControlId:i+"__beta_features",module_type:e,controlLabel:sektionsLocalizedData.i18n["Beta features"],icon:'<i class="material-icons sek-level-option-icon">widgets</i>'};break;default:l.errare("::generateUIforGlobalOptions => an option group could not be registered => "+e,t)}});var c=sektionsLocalizedData.globalOptionDBValues;return _do_register_=function(){_.each(n,function(n,o){if(!l.has(n.settingControlId)){var t=function(e,t,i){try{s.updateAPISettingAndExecutePreviewActions({isGlobalOptions:!0,defaultPreviewAction:"refresh",uiParams:a,options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){l.errare("::generateUIforGlobalOptions => Error in updateAPISettingAndExecutePreviewActions",e)}};l(n.settingControlId,function(e){e.bind(_.debounce(t,s.SETTING_UPDATE_BUFFER))});var e=s.getModuleStartingValue(n.module_type),i=_.isObject(c)&&!_.isEmpty(c[o])?c[o]:{};if("no_starting_value"!==e&&_.isObject(e)){var r=d.extend(!0,{},e);i=d.extend(r,i)}l.CZR_Helpers.register({origin:"nimble",level:a.level,what:"setting",id:n.settingControlId,dirty:!1,value:i,transport:"postMessage",type:"_nimble_ui_"})}l.CZR_Helpers.register({origin:"nimble",level:a.level,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:s.SECTION_ID_FOR_GLOBAL_OPTIONS,priority:20,settings:{default:n.settingControlId},track:!1}).done(function(){l.control(n.settingControlId,function(e){e.container.find(".czr-items-wrapper").hide();var t=e.container.find("label > .customize-control-title"),i=t.html();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.icon),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false"),!0===n.expandAndFocusOnInit&&"false"==e.container.attr("data-sek-expanded")&&t.trigger("click")})})})},_do_register_(),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(ae,se){se.extend(CZRSeksPrototype,{updateAPISetting:function(ie){var ne=this,oe=se.Deferred();(ie=ie||{}).is_global_location="global"===ie.scope||ne.isGlobalLocation(ie);var re=ie.is_global_location?ne.getGlobalSectionsSettingId():ne.localSectionsSettingId();return ae(re,function(e){!function(){var n,t,o,i,r,a,e,s,c,l=ae(re)(),d=_.isObject(l)?se.extend(!0,{},l):ne.getDefaultSektionSettingValue(ie.is_global_location?"global":"local"),u="_not_injection_scenario_";switch(d.collection=_.isArray(d.collection)?d.collection:ne.getDefaultSektionSettingValue(ie.is_global_location?"global":"local").collection,ie.action){case"sek-add-section":if(_.isEmpty(ie.id))throw new Error("updateAPISetting => "+ie.action+" => missing id");if(_.isEmpty(ie.location))throw new Error("updateAPISetting => "+ie.action+" => missing location");if(!0===ie.is_nested){if(o=ne.getLevelModel(ie.in_column,d.collection),"no_match"==(c=ne.getLevelModel(ie.in_sektion,d.collection))){oe.reject("updateAPISetting => "+ie.action+" => no grand parent sektion found");break}if(!0===c.is_nested){oe.reject(sektionsLocalizedData.i18n["You've reached the maximum number of allowed nested sections."]);break}if("no_match"==o){ae.errare("updateAPISetting => "+ie.action+" => no parent column matched"),oe.reject("updateAPISetting => "+ie.action+" => no parent column matched");break}o.collection=_.isArray(o.collection)?o.collection:[],o.collection.push({id:ie.id,level:"section",collection:[{id:sektionsLocalizedData.optPrefixForSektionsNotSaved+ne.guid(),level:"column",collection:[],ver_ini:sektionsLocalizedData.nimbleVersion}],is_nested:!0,ver_ini:sektionsLocalizedData.nimbleVersion})}else{if("no_match"==(n=ne.getLevelModel(ie.location,d.collection))){ae.errare("updateAPISetting => "+ie.action+" => no location matched"),oe.reject("updateAPISetting => "+ie.action+" => no location matched");break}n.collection=_.isArray(n.collection)?n.collection:[],_.each(n.collection,function(e,t){ie.before_section===e.id&&(L=t),ie.after_section===e.id&&(L=t+1)}),n.collection=_.isArray(n.collection)?n.collection:[],n.collection.splice(L,0,{id:ie.id,level:"section",collection:[{id:sektionsLocalizedData.optPrefixForSektionsNotSaved+ne.guid(),level:"column",collection:[],ver_ini:sektionsLocalizedData.nimbleVersion}],ver_ini:sektionsLocalizedData.nimbleVersion})}break;case"sek-duplicate-section":if(_.isEmpty(ie.id))throw new Error("updateAPISetting => "+ie.action+" => missing id");if(_.isEmpty(ie.location))throw new Error("updateAPISetting => "+ie.action+" => missing location");var p;try{p=ne.cloneLevel(ie.id)}catch(e){ae.errare("updateAPISetting => "+ie.action,e);break}var m=ne.getLevelPositionInCollection(ie.id,d.collection);if(!0===ie.is_nested){if("no_match"==(o=ne.getLevelModel(ie.in_column,d.collection))){ae.errare("updateAPISetting => "+ie.action+" => no parent column matched"),oe.reject("updateAPISetting => "+ie.action+" => no parent column matched");break}o.collection=_.isArray(o.collection)?o.collection:[],o.collection.splice(parseInt(m+1,10),0,p)}else{if("no_match"==(n=ne.getLevelModel(ie.location,d.collection))){ae.errare("updateAPISetting => "+ie.action+" => no location matched"),oe.reject("updateAPISetting => "+ie.action+" => no location matched");break}n.collection=_.isArray(n.collection)?n.collection:[],n.collection.splice(parseInt(m+1,10),0,p)}e=p.id;break;case"sek-remove-section":if(!0===ie.is_nested)"no_match"!=(o=ne.getLevelModel(ie.in_column,d.collection))?(o.collection=_.isArray(o.collection)?o.collection:[],o.collection=_.filter(o.collection,function(e){return e.id!=ie.id})):ae.errare("updateAPISetting => "+ie.action+" => no parent column matched");else{if("no_match"==(n=ne.getLevelModel(ie.location,d.collection))){ae.errare("updateAPISetting => "+ie.action+" => no location matched"),oe.reject("updateAPISetting => "+ie.action+" => no location matched");break}n.collection=_.filter(n.collection,function(e){return e.id!=ie.id})}break;case"sek-move-section":var f,g,h=ne.getLevelModel(ie.to_location,d.collection);if(_.isEmpty(h)||"no_match"==h)throw new Error("updateAPISetting => "+ie.action+" => missing target location");if(ie.from_location!=ie.to_location){var k=ne.getLevelModel(ie.from_location,d.collection);if(_.isEmpty(k)||"no_match"==k)throw new Error("updateAPISetting => "+ie.action+" => missing source location");k.collection=_.isArray(k.collection)?k.collection:[],f=ne.getLevelModel(ie.id,k.collection),g=se.extend(!0,{},f),k.collection=_.filter(k.collection,function(e){return e.id!=ie.id})}h.collection=_.isArray(h.collection)?h.collection:[],r=se.extend(!0,[],h.collection),a=[],_.each(ie.newOrder,function(e){if(ie.from_location!=ie.to_location&&e==g.id)a.push(g);else{if(t=ne.getLevelModel(e,r),_.isEmpty(t)||"no_match"==t)throw new Error("updateAPISetting => "+ie.action+" => missing section candidate");a.push(t)}}),h.collection=a;break;case"sek-move-section-up-down":if(parentCandidate=ne.getLevelModel(ie.is_nested?ie.in_column:ie.location,d.collection),_.isEmpty(parentCandidate)||"no_match"==parentCandidate)throw new Error("updateAPISetting => "+ie.action+" => missing target location");parentCandidate.collection=_.isArray(parentCandidate.collection)?parentCandidate.collection:[],r=se.extend(!0,[],parentCandidate.collection),a=se.extend(!0,[],parentCandidate.collection);var y=_.findIndex(r,function(e){return e.id===ie.id});if(-1===y)throw new Error("updateAPISetting => "+ie.action+" => invalid index");var v=ie.direction||"up";if("up"!==v&&r.length===y+1)throw new Error("updateAPISetting => "+ie.action+" => bottom reached");if("up"===v&&0===y)throw new Error("updateAPISetting => "+ie.action+" => top reached");a[y]=r["up"===v?y-1:y+1],a["up"===v?y-1:y+1]=r[y],parentCandidate.collection=a;break;case"sek-add-column":if(_.isEmpty(ie.id))throw new Error("updateAPISetting => "+ie.action+" => missing id");if("no_match"==(t=ne.getLevelModel(ie.in_sektion,d.collection))){ae.errare("updateAPISetting => "+ie.action+" => no parent sektion matched"),oe.reject("updateAPISetting => "+ie.action+" => no parent sektion matched");break}if(t.collection=_.isArray(t.collection)?t.collection:[],ne.MAX_NUMBER_OF_COLUMNS-1<_.size(t.collection)){oe.reject(sektionsLocalizedData.i18n["You've reached the maximum number of columns allowed in this section."]);break}_.each(t.collection,function(e){e.width=""}),t.collection.push({id:ie.id,level:"column",collection:[],ver_ini:sektionsLocalizedData.nimbleVersion});break;case"sek-remove-column":if("no_match"!=(t=ne.getLevelModel(ie.in_sektion,d.collection))){if(1===_.size(t.collection)){oe.reject(sektionsLocalizedData.i18n["A section must have at least one column."]);break}t.collection=_.isArray(t.collection)?t.collection:[],t.collection=_.filter(t.collection,function(e){return e.id!=ie.id}),_.each(t.collection,function(e){e.width=""})}else ae.errare("updateAPISetting => "+ie.action+" => no parent sektion matched");break;case"sek-duplicate-column":if(_.isEmpty(ie.id))throw new Error("updateAPISetting => "+ie.action+" => missing id");if("no_match"==(t=ne.getLevelModel(ie.in_sektion,d.collection))){ae.errare("updateAPISetting => "+ie.action+" => no parent sektion matched"),oe.reject("updateAPISetting => "+ie.action+" => no parent sektion matched");break}if(t.collection=_.isArray(t.collection)?t.collection:[],ne.MAX_NUMBER_OF_COLUMNS-1<_.size(t.collection)){oe.reject(sektionsLocalizedData.i18n["You've reached the maximum number of columns allowed in this section."]);break}var b;try{b=ne.cloneLevel(ie.id)}catch(e){ae.errare("updateAPISetting => "+ie.action,e);break}var z=ne.getLevelPositionInCollection(ie.id,d.collection);e=b.id,t.collection.splice(parseInt(z+1,10),0,b),_.each(t.collection,function(e){e.width=""});break;case"sek-resize-columns":if(ie.col_number<2)break;var I=ne.getLevelModel(ie.resized_column,d.collection),w=ne.getLevelModel(ie.sister_column,d.collection);if("no_match"==I){ae.errare("updateAPISetting => "+ie.action+" => no resized column matched"),oe.reject("updateAPISetting => "+ie.action+" => no resized column matched");break}I.width=parseFloat(ie.resizedColumnWidthInPercent);var M=ne.getLevelModel(ie.in_sektion,d.collection),D=_.filter(M.collection,function(e){return e.id!=I.id&&e.id!=w.id}),S=parseFloat(I.width.toFixed(3));_.isEmpty(D)||_.each(D,function(e){currentColWidth=parseFloat(1*e.width),(!_.has(e,"width")||!_.isNumber(1*currentColWidth)||_.isEmpty(currentColWidth+"")||currentColWidth<1)&&(e.width=parseFloat((100/ie.col_number).toFixed(3))),S=parseFloat((S+e.width).toFixed(3))}),w.width=parseFloat((100-S).toFixed(3));break;case"sek-move-column":var C,P,x=ne.getLevelModel(ie.to_sektion,d.collection);if(_.isEmpty(x)||"no_match"==x)throw new Error("updateAPISetting => "+ie.action+" => missing target sektion");if(ie.from_sektion!=ie.to_sektion){var E=ne.getLevelModel(ie.from_sektion,d.collection);if(_.isEmpty(E)||"no_match"==E)throw new Error("updateAPISetting => "+ie.action+" => missing source column");E.collection=_.isArray(E.collection)?E.collection:[],C=ne.getLevelModel(ie.id,E.collection),P=se.extend(!0,{},C),E.collection=_.filter(E.collection,function(e){return e.id!=ie.id}),_.each(E.collection,function(e){e.width=""})}x.collection=_.isArray(x.collection)?x.collection:[],r=se.extend(!0,[],x.collection),a=[],_.each(ie.newOrder,function(e){if(ie.from_sektion!=ie.to_sektion&&e==P.id)a.push(P);else{if(o=ne.getLevelModel(e,r),_.isEmpty(o)||"no_match"==o)throw new Error("updateAPISetting => moveColumn => missing columnCandidate");a.push(o)}}),x.collection=a,_.each(x.collection,function(e){e.width=""});break;case"sek-add-module":if(_.isEmpty(ie.id))throw new Error("updateAPISetting => "+ie.action+" => missing id");if(_.isEmpty(ie.module_type))throw new Error("updateAPISetting => "+ie.action+" => missing module_type");if("no_match"===(o=ne.getLevelModel(ie.in_column,d.collection))){ae.errare("updateAPISetting => "+ie.action+" => no parent column matched"),oe.reject("updateAPISetting => "+ie.action+" => no parent column matched");break}var L=0;o.collection=_.isArray(o.collection)?o.collection:[],_.each(o.collection,function(e,t){ie.before_module===e.id&&(L=t),ie.after_module===e.id&&(L=t+1)});var R={id:ie.id,level:"module",module_type:ie.module_type,ver_ini:sektionsLocalizedData.nimbleVersion};"no_starting_value"!==(s=ne.getModuleStartingValue(ie.module_type))&&(R.value=s),o.collection.splice(L,0,R);break;case"sek-duplicate-module":if(_.isEmpty(ie.id))throw new Error("updateAPISetting => "+ie.action+" => missing id");if("no_match"==(o=ne.getLevelModel(ie.in_column,d.collection))){ae.errare("updateAPISetting => "+ie.action+" => no parent column matched"),oe.reject("updateAPISetting => "+ie.action+" => no parent column matched");break}var O;o.collection=_.isArray(o.collection)?o.collection:[];try{O=ne.cloneLevel(ie.id)}catch(e){ae.errare("updateAPISetting => "+ie.action,e),oe.reject("updateAPISetting => "+ie.action+" => error when cloning the level");break}var A=ne.getLevelPositionInCollection(ie.id,d.collection);e=O.id,o.collection.splice(parseInt(A+1,10),0,O);break;case"sek-remove-module":if(_.isEmpty(ie.id))throw new Error("updateAPISetting => "+ie.action+" => missing id");"no_match"!=(o=ne.getLevelModel(ie.in_column,d.collection))?(o.collection=_.isArray(o.collection)?o.collection:[],o.collection=_.filter(o.collection,function(e){return e.id!=ie.id})):ae.errare("updateAPISetting => "+ie.action+" => no parent column matched");break;case"sek-move-module":var j,T,V;if(j=ne.getLevelModel(ie.to_column,d.collection),_.isEmpty(j)||"no_match"==j)throw new Error("updateAPISetting => "+ie.action+" => missing target column");if(ie.from_column!=ie.to_column){var Z;if(Z=ne.getLevelModel(ie.from_column,d.collection),_.isEmpty(Z)||"no_match"==Z)throw new Error("updateAPISetting => "+ie.action+" => missing source column");Z.collection=_.isArray(Z.collection)?Z.collection:[],T=ne.getLevelModel(ie.id,d.collection),V=se.extend(!0,{},T),Z.collection=_.filter(Z.collection,function(e){return e.id!=ie.id})}if(j.collection=_.isArray(j.collection)?j.collection:[],r=se.extend(!0,[],j.collection),a=[],_.each(ie.newOrder,function(e){if(ie.from_column!=ie.to_column&&e==V.id)a.push(V);else{if(i=ne.getLevelModel(e,d.collection),_.isEmpty(i)||"no_match"==i)throw new Error("updateAPISetting => "+ie.action+" => missing moduleCandidate");a.push(i)}}),a.length!=_.uniq(a).length)throw new Error("updateAPISetting => "+ie.action+" => there are duplicated modules in column : "+j.id);j.collection=a;break;case"sek-set-module-value":i=ne.getLevelModel(ie.id,d.collection);var F={};if(_.each(ie.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(F[t]=e)}),"no_match"==i){ae.errare("updateAPISetting => "+ie.action+" => no module matched",ie),oe.reject("updateAPISetting => "+ie.action+" => error no module matched");break}if(_.isEmpty(ie.options_type)){ae.errare("updateAPISetting => "+ie.action+" => missing options_type"),oe.reject("updateAPISetting => "+ie.action+" => missing options_type");break}"__no_option_group_to_be_updated_by_children_modules__"===ie.options_type?i.value=F:(i.value=_.isEmpty(i.value)?{}:i.value,i.value[ie.options_type]=F);break;case"sek-generate-level-options-ui":var U=ne.getLevelModel(ie.id,d.collection),N={};if("no_match"===U){ae.errare("updateAPISetting => "+ie.action+" => no parent sektion matched"),oe.reject("updateAPISetting => "+ie.action+" => no parent sektion matched");break}U.options=U.options||{},_.each(ie.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(N[t]=e)}),_.isEmpty(ie.options_type)&&ae.errare("updateAPISetting => "+ie.action+" => missing options_type"),U.options[ie.options_type]=N;break;case"sek-generate-local-skope-options-ui":N={};var B=se.extend(!0,{},_.isObject(d.local_options)?d.local_options:{});if(_.each(ie.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(N[t]=e)}),_.isEmpty(ie.options_type)||!_.isString(ie.options_type))ae.errare("updateAPISetting => "+ie.action+" => missing options_type");else{var Q={};Q[ie.options_type]=N,d.local_options=se.extend(B,Q)}break;case"sek-add-content-in-new-sektion":if(_.isEmpty(ie.id))throw new Error("updateAPISetting => "+ie.action+" => missing id");if(L=0,"no_match"==(n=ne.getLevelModel(ie.location,d.collection))){ae.errare("updateAPISetting => "+ie.action+" => no location matched"),oe.reject("updateAPISetting => "+ie.action+" => no location matched");break}switch(n.collection=_.isArray(n.collection)?n.collection:[],_.each(n.collection,function(e,t){ie.before_section===e.id&&(L=t),ie.after_section===e.id&&(L=t+1)}),ie.content_type){case"module":s=ne.getModuleStartingValue(ie.content_id),n.collection.splice(L,0,{id:ie.id,level:"section",collection:[{id:sektionsLocalizedData.optPrefixForSektionsNotSaved+ne.guid(),level:"column",collection:[{id:ie.droppedModuleId,level:"module",module_type:ie.content_id,value:"no_starting_value"!==s?s:null,ver_ini:sektionsLocalizedData.nimbleVersion}],ver_ini:sektionsLocalizedData.nimbleVersion}],ver_ini:sektionsLocalizedData.nimbleVersion});break;case"preset_section":u=se.Deferred();var H=function(e){ne.preparePresetSectionForInjection(e).fail(function(e){oe.reject("updateAPISetting => error when preparePresetSectionForInjection => "+ie.action+" => "+e),u.reject(e)}).done(function(e){var t=!1;if(!_.isEmpty(ie.sektion_to_replace)){var i=ne.getLevelModel(ie.sektion_to_replace,d.collection);"no_match"===i&&(ae.errare("updateAPISetting => "+ie.action+" => no sektionToReplace matched"),oe.reject("updateAPISetting => "+ie.action+" => no sektionToReplace matched")),t=!0===i.is_nested}t?("no_match"===(o=ne.getLevelModel(ie.in_column,d.collection))&&(ae.errare("updateAPISetting => "+ie.action+" => no parent column matched"),oe.reject("updateAPISetting => "+ie.action+" => no parent column matched")),o.collection=_.isArray(o.collection)?o.collection:[],_.each(o.collection,function(e,t){ie.before_section===e.id&&(L=t),ie.after_section===e.id&&(L=t+1)}),o.collection.splice(L,0,{id:ie.id,is_nested:!0,level:"section",collection:e.collection,options:e.options||{},ver_ini:sektionsLocalizedData.nimbleVersion})):n.collection.splice(L,0,{id:ie.id,level:"section",collection:e.collection,options:e.options||{},ver_ini:sektionsLocalizedData.nimbleVersion}),u.resolve()})};ne.getPresetSectionCollection({is_user_section:ie.is_user_section,presetSectionId:ie.content_id,section_id:ie.id}).fail(function(e){ae.errare("updateAPISetting => "+ie.action+" => Error with self.getPresetSectionCollection()",e),oe.reject("updateAPISetting => "+ie.action+" => Error with self.getPresetSectionCollection()")}).done(function(e){_.isObject(e)&&!_.isEmpty(e)||(ae.errare("updateAPISetting => "+ie.action+" => preset section type not found or empty : "+ie.content_id,e),oe.reject("updateAPISetting => "+ie.action+" => preset section type not found or empty")),H(e)})}break;case"sek-add-preset-section-in-new-nested-sektion":if(_.isEmpty(ie.id))throw new Error("updateAPISetting => "+ie.action+" => missing id");if(o=ne.getLevelModel(ie.in_column,d.collection),"no_match"==(c=ne.getLevelModel(ie.in_sektion,d.collection))){oe.reject("updateAPISetting => "+ie.action+" => no grand parent sektion found");break}if(!0===c.is_nested){oe.reject(sektionsLocalizedData.i18n["You've reached the maximum number of allowed nested sections."]);break}if("no_match"==o){ae.errare("updateAPISetting => "+ie.action+" => no parent column matched"),oe.reject("updateAPISetting => "+ie.action+" => no parent column matched");break}o.collection=_.isArray(o.collection)?o.collection:[],u=se.Deferred(),H=function(e){ne.preparePresetSectionForInjection(e).fail(function(e){oe.reject("updateAPISetting => error when preparePresetSectionForInjection => "+ie.action+" => "+e),u.reject(e)}).done(function(e){o.collection.push({id:ie.id,level:"section",collection:e.collection,options:e.options||{},is_nested:!0,ver_ini:sektionsLocalizedData.nimbleVersion}),u.resolve()})},ne.getPresetSectionCollection({is_user_section:ie.is_user_section,presetSectionId:ie.content_id,section_id:ie.id}).fail(function(){ae.errare("updateAPISetting => "+ie.action+" => Error with self.getPresetSectionCollection()",_er_),oe.reject("updateAPISetting => "+ie.action+" => Error with self.getPresetSectionCollection()")}).done(function(e){_.isObject(e)&&!_.isEmpty(e)||(ae.errare("updateAPISetting => "+ie.action+" => preset section type not found or empty : "+ie.content_id,e),oe.reject("updateAPISetting => "+ie.action+" => preset section type not found or empty")),H(e)});break;case"sek-update-fonts":var G=ne.sniffGFonts({is_global_location:ie&&!0===ie.is_global_location});if(!_.isEmpty(ie.font_family)&&_.isString(ie.font_family)&&!_.contains(G,ie.font_family)){if(ie.font_family.indexOf("gfont")<0){ae.errare("updateAPISetting => "+ie.action+" => error => must be a google font, prefixed gfont"),oe.reject("updateAPISetting => "+ie.action+" => error => must be a google font, prefixed gfont");break}G.push(ie.font_family)}d.fonts=G;break;case"sek-restore-revision":d=ie.revision_value;break;case"sek-import-from-file":if(ae.infoLog("sek-import-from-file",ie),_.isUndefined(ie.imported_content.data)||_.isUndefined(ie.imported_content.metas)){ae.errare("updateAPISetting::sek-import-from-file => invalid imported content",imported_content);break}var W=_.isArray(ie.imported_content.data.collection)?se.extend(!0,[],ie.imported_content.data.collection):[];if(!0===ie.assign_missing_locations){var $=ie.imported_content.metas.active_locations,q=ae.czr_sektions.activeLocations(),Y=_.first(q);if(!_.isEmpty(Y)&&!_.isEmpty($)&&_.isArray($)){var J=se($).not(q).get(),K=ne.getLevelModel(Y,d.collection),X=ne.getLevelModel(Y,ie.imported_content.data.collection),ee=[];K.collection=_.isArray(K.collection)?K.collection:[],X.collection=_.isArray(X.collection)?X.collection:[],_.each($,function(e){var t=ne.getLevelModel(e,W);_.isEmpty(t.collection)||(ee=_.union(ee,t.collection))}),X.collection=ee,ie.imported_content.data.collection=_.filter(ie.imported_content.data.collection,function(e){return!_.contains(J,e.id)})}}!0===ie.keep_existing_sections&&(_.each(W,function(e){var t=ne.getLevelModel(e.id,d.collection);if(!_.isEmpty(t.collection)){var i=ne.getLevelModel(e.id,ie.imported_content.data.collection);i.collection=_.union(t.collection,i.collection)}}),d.fonts&&!_.isEmpty(d.fonts)&&_.isArray(d.fonts)&&(ie.imported_content.data.fonts=_.isArray(ie.imported_content.data.fonts)?ie.imported_content.data.fonts:[],ie.imported_content.data.fonts=_.uniq(_.union(d.fonts,ie.imported_content.data.fonts)))),d=ie.imported_content.data;break;case"sek-reset-collection":try{d=ae.czr_sektions.resetCollectionSetting(ie.scope)}catch(e){ae.errare("sek-reset-collection => error when firing resetCollectionSetting()",e)}}if("pending"==oe.state()){var te=function(){_.isEqual(l,d)?oe.reject("updateAPISetting => the new setting value is unchanged when firing action : "+ie.action):null!==ne.validateSettingValue(d,ie.is_global_location?"global":"local")?(ae(re)(d,ie),ie.cloneId=e,oe.resolve(ie)):oe.reject("Validation problem for action "+ie.action)};"_not_injection_scenario_"===u?(te(),"pending"===oe.state()&&ae.errare("::updateAPISetting => The __updateAPISettingDeferred__ promise has not been resolved properly.")):u.done(function(){te(),"pending"===oe.state()&&ae.errare("::updateAPISetting => The __updateAPISettingDeferred__ promise has not been resolved properly.")}).fail(function(e){ae.errare("updateAPISetting => __presetSectionInjected__ failed",e)})}}()}),oe.promise()},_maybeFetchSectionsFromServer:function(t){var e,i=se.Deferred();return!0===(t=t||{is_user_section:!1}).is_user_section?_.isEmpty(ae.sek_userSavedSections)||_.isEmpty(ae.sek_userSavedSections[t.preset_section_id])?(ae.sek_userSavedSections=ae.sek_userSavedSections||{},_.isUndefined(ae.sek_fetchingUserSavedSections)||"pending"!=ae.sek_fetchingUserSavedSections.state()?(e=wp.ajax.post("sek_get_user_saved_sections",{nonce:ae.settings.nonce.save,preset_section_id:t.preset_section_id}),ae.sek_fetchingUserSavedSections=e):e=ae.sek_fetchingUserSavedSections,e.done(function(e){ae.sek_userSavedSections[t.preset_section_id]=e,i.resolve(ae.sek_userSavedSections)}).fail(function(e){i.reject(e)})):i.resolve(ae.sek_userSavedSections):_.isEmpty(ae.sek_presetSections)?(_.isUndefined(ae.sek_fetchingPresetSections)||"pending"!=ae.sek_fetchingPresetSections.state()?(e=wp.ajax.post("sek_get_preset_sections",{nonce:ae.settings.nonce.save}),ae.sek_fetchingPresetSections=e):e=ae.sek_fetchingPresetSections,e.done(function(e){ae.sek_presetSections=e,i.resolve(ae.sek_presetSections)}).fail(function(e){i.reject(e)})):i.resolve(ae.sek_presetSections),i.promise()},getPresetSectionCollection:function(r){var a=this,s=se.Deferred();return a._maybeFetchSectionsFromServer({is_user_section:r.is_user_section,preset_section_id:r.presetSectionId}).fail(function(e){s.reject(e)}).done(function(e){var t=se.extend(!0,{},_.isObject(e)?e:{});if(_.isEmpty(t))throw new Error("getPresetSectionCollection => Invalid collection");if(_.isEmpty(t[r.presetSectionId]))throw new Error('getPresetSectionCollection => the preset section : "'+r.presetSectionId+'" has not been found in the collection');var i=t[r.presetSectionId],n=function(e){return _.each(e,function(e){e.id=sektionsLocalizedData.optPrefixForSektionsNotSaved+a.guid(),_.isArray(e.collection)&&n(e.collection)}),e},o=function(e){return _.each(e,function(e){e.ver_ini=sektionsLocalizedData.nimbleVersion,_.isArray(e.collection)&&o(e.collection)}),e};i.id=r.section_id,i.collection=n(i.collection),i.ver_ini=sektionsLocalizedData.nimbleVersion,i.collection=o(i.collection),s.resolve(i)}),s.promise()},preparePresetSectionForInjection:function(o){var i=this,n={},r=se.Deferred(),a=function(e){return _.each(e,function(e,t){_.isObject(e)||_.isArray(e)?a(e):_.isString(e)&&-1!=e.indexOf("__img_url__")&&(_.has(n,e)||(n[e]=i.importAttachment(e.replace("__img_url__",""))))}),n},s=function(i,n){return _.each(i,function(e,t){_.isObject(e)||_.isArray(e)?s(e,n):_.isString(e)&&-1!=e.indexOf("__img_url__")&&_.has(n,e)&&_.isObject(n[e])&&(i[t]=n[e].id)}),o};return i.whenAllPromisesInParallel(a(o)).done(function(e){var t=s(o,e);r.resolve(t)}).fail(function(e){r.reject(e)}),r.promise()}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(n,o){o.extend(CZRSeksPrototype,{cleanRegistered:function(t){var i=this,e=o.extend(!0,[],i.registered()||[]);n.trigger("sek-before-clean-registered"),e=_.filter(e,function(e){if("setting"!==e.what&&n[e.what].has(e.id)){if(!_.isEmpty(t)&&e.id!==t)return;_.isFunction(n[e.what](e.id).trigger)&&i.trigger("sek-ui-pre-removal",{what:e.what,id:e.id}),o.when(n[e.what](e.id).container.remove()).done(function(){n[e.what].remove(e.id),i.trigger("sek-ui-removed",{what:e.what,id:e.id})})}return"setting"===e.what}),i.registered(e)},cleanRegisteredLocalOptionSettings:function(){var t=this.getLocalSkopeOptionId(),e=o.extend(!0,[],this.registered()||[]);e=_.filter(e,function(e){return e.id&&-1!==e.id.indexOf(t)&&n.has(e.id)&&n.remove(e.id),e.id&&-1===e.id.indexOf(t)}),this.registered(e)},cleanRegisteredLevelSettingsAfterHistoryNavigation:function(){var e=o.extend(!0,[],this.registered()||[]);e=_.filter(e,function(e){return!_.isEmpty(e.level)&&"setting"===e.what&&n.has(e.id)&&n.remove(e.id),_.isEmpty(e.level)&&"setting"===e.what}),this.registered(e)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{rootPanelFocus:function(){l.section.has(l.czr_activeSectionId())?l.section(l.czr_activeSectionId()).expanded(!1):l.section.each(function(e){e.expanded(!1)}),l.panel.each(function(e){e.expanded(!1)})},guid:function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+e()},getGlobalSectionsSettingId:function(){return sektionsLocalizedData.settingIdForGlobalSections},getLevelModel:function(i,n){var a=this,s="no_match",c=function(t,e,i,n){if(_.isUndefined(e)){var o=l(i)(),r=_.isObject(o)?d.extend(!0,{},o):d.extend(!0,{},a.getDefaultSektionSettingValue(n));e=_.isArray(r.collection)?r.collection:[]}return _.each(e,function(e){"no_match"==s&&(t===e.id?s=e:_.isArray(e.collection)&&c(t,e.collection,i,n))}),s};return _.isEmpty(n)?_.each({local:a.localSectionsSettingId(),global:a.getGlobalSectionsSettingId()},function(e,t){"no_match"===s&&c(i,n,e,t)}):c(i,n),s},isGlobalLocation:function(e){var t=!1;return e=e||{},_.has(e,"is_global_location")?t=e.is_global_location:_.has(e,"scope")?t="global"===e.scope:_.isEmpty(e.location)?_.isEmpty(e.in_sektion)?_.isEmpty(e.id)||(t=this.isChildOfAGlobalLocation(e.id)):t=this.isChildOfAGlobalLocation(e.in_sektion):t=this.isChildOfAGlobalLocation(e.location),t},isChildOfAGlobalLocation:function(e){var r=this,a=function(t,e){var i="no_match";if(_.isUndefined(e)){var n=l(r.getGlobalSectionsSettingId())(),o=_.isObject(n)?d.extend(!0,{},n):r.getDefaultSektionSettingValue("global");e=_.isArray(o.collection)?o.collection:[]}return _.each(e,function(e){"no_match"==i&&(t===e.id?i=e:_.isArray(e.collection)&&(i=a(t,e.collection)))}),i};return"no_match"!==a(e)},getLevelPositionInCollection:function(i,n){var a=this,s="no_match",c=function(i,e,n,o){if(_.isUndefined(e)){var t=l(n)(),r=_.isObject(t)?d.extend(!0,{},t):d.extend(!0,{},a.getDefaultSektionSettingValue(o));e=_.isArray(r.collection)?r.collection:[]}_.each(e,function(e,t){"no_match"==s&&(i===e.id?s=t:_.isArray(e.collection)&&c(i,e.collection,n,o))})};return _.isEmpty(n)?_.each({local:a.localSectionsSettingId(),global:a.getGlobalSectionsSettingId()},function(e,t){"no_match"===s&&c(i,e,t,n)}):c(i,n),s},getLevelProperty:function(e){if(e=_.extend({id:"",property:""},e),_.isEmpty(e.id))l.errare("getLevelProperty => invalid id provided");else{var t=this.getLevelModel(e.id);if("no_match"!=t){if(_.isObject(t))return t[e.property];l.errare("getLevelProperty => invalid model for id : "+e.id,t)}else l.errare("getLevelProperty => no level model found for id : "+e.id)}},cloneLevel:function(e){var t=this,i=t.getLevelModel(e);if("no_match"==i)throw new Error("cloneLevel => no match for level id : "+e);var n=d.extend(!0,{},i),o=function(e){if(_.isEmpty(e.id))throw new Error("cloneLevel => missing level id");if(e.id=sektionsLocalizedData.optPrefixForSektionsNotSaved+t.guid(),!_.isEmpty(e.collection)){if(!_.isArray(e.collection))throw new Error("cloneLevel => the collection must be an array for level id : "+e.id);_.each(e.collection,function(e){e.id=sektionsLocalizedData.optPrefixForSektionsNotSaved+t.guid(),o(e)})}return e};return o(n)},getDefaultItemModelFromRegisteredModuleData:function(e){if(!this.isModuleRegistered(e))return{};if(!sektionsLocalizedData.registeredModules[e].is_father){var t=sektionsLocalizedData.registeredModules[e].tmpl["item-inputs"],i={id:"",title:""};return _.each(t,function(e,t){switch(t){case"tabs":_.each(e,function(e){_.each(e.inputs,function(e,t){i[t]=e.default||""})});break;default:i[t]=e.default||""}}),i}l.errare("getDefaultItemModelFromRegisteredModuleData => Father modules should be treated specifically")},getRegisteredModuleProperty:function(e,t){return this.isModuleRegistered(e)?sektionsLocalizedData.registeredModules[e][t]:"not_set"},isModuleRegistered:function(e){return sektionsLocalizedData.registeredModules&&!_.isUndefined(sektionsLocalizedData.registeredModules[e])},sniffGFonts:function(e){var o=this,r=[],a=function(i,n,e){if(_.isUndefined(e)){var t=l(i)();e=_.isObject(t)?d.extend(!0,{},t):d.extend(!0,{},o.getDefaultSektionSettingValue(n))}_.each(e,function(e,t){_.isString(t)&&"_css"===t.substr(t.length-4)&&!0===o.inputIsAFontFamilyModifier(t)&&-1<e.indexOf("gfont")&&!_.contains(r,e)&&r.push(e),(_.isArray(e)||_.isObject(e))&&a(i,n,e)})};return(e=e||{is_global_location:!1}).is_global_location?a(o.getGlobalSectionsSettingId(),"global"):a(o.localSectionsSettingId(),"local"),r},getInputDefaultValue:function(i,n,e){var o=this;if(o.cachedDefaultInputValues=o.cachedDefaultInputValues||{},o.cachedDefaultInputValues[n]=o.cachedDefaultInputValues[n]||{},_.has(o.cachedDefaultInputValues[n],i))return o.cachedDefaultInputValues[n][i];if(_.isUndefined(sektionsLocalizedData.registeredModules))l.errare("getInputDefaultValue => missing sektionsLocalizedData.registeredModules");else if(_.isUndefined(sektionsLocalizedData.registeredModules[n]))l.errare("getInputDefaultValue => missing "+n+" in sektionsLocalizedData.registeredModules");else{if(!sektionsLocalizedData.registeredModules[n].is_father){_.isUndefined(e)&&(e=sektionsLocalizedData.registeredModules[n].tmpl);var r="no_default_value_specified";return _.each(e,function(e,t){"no_default_value_specified"===r&&(i!==t||_.isUndefined(e.default)||(r=e.default),"no_default_value_specified"===r&&(_.isArray(e)||_.isObject(e))&&(r=o.getInputDefaultValue(i,n,e)),"no_default_value_specified"!==r&&(o.cachedDefaultInputValues[n][i]=r))}),r}l.errare("getInputDefaultValue => Father modules should be treated specifically")}},getInputType:function(i,n,e){var o=this;if(o.cachedInputTypes=o.cachedInputTypes||{},o.cachedInputTypes[n]=o.cachedInputTypes[n]||{},_.has(o.cachedInputTypes[n],i))return o.cachedInputTypes[n][i];if(_.isUndefined(sektionsLocalizedData.registeredModules))l.errare("getInputType => missing sektionsLocalizedData.registeredModules");else if(_.isUndefined(sektionsLocalizedData.registeredModules[n]))l.errare("getInputType => missing "+n+" in sektionsLocalizedData.registeredModules");else{if(!sektionsLocalizedData.registeredModules[n].is_father){_.isUndefined(e)&&(e=sektionsLocalizedData.registeredModules[n].tmpl);var r="no_input_type_specified";return _.each(e,function(e,t){"no_input_type_specified"===r&&(i!==t||_.isUndefined(e.input_type)||(r=e.input_type),"no_input_type_specified"===r&&(_.isArray(e)||_.isObject(e))&&(r=o.getInputType(i,n,e)),"no_input_type_specified"!==r&&(o.cachedInputTypes[n][i]=r))}),r}l.errare("getInputType => Father modules should be treated specifically")}},getInputRegistrationParams:function(i,n,e){var o=this;if(o.cachedInputRegistrationParams=o.cachedInputRegistrationParams||{},o.cachedInputRegistrationParams[n]=o.cachedInputRegistrationParams[n]||{},_.has(o.cachedInputRegistrationParams[n],i))return o.cachedInputRegistrationParams[n][i];if(_.isUndefined(sektionsLocalizedData.registeredModules))l.errare("getInputRegistrationParams => missing sektionsLocalizedData.registeredModules");else if(_.isUndefined(sektionsLocalizedData.registeredModules[n]))l.errare("getInputRegistrationParams => missing "+n+" in sektionsLocalizedData.registeredModules");else{if(!sektionsLocalizedData.registeredModules[n].is_father){_.isUndefined(e)&&(e=sektionsLocalizedData.registeredModules[n].tmpl);var r={};return _.each(e,function(e,t){_.isEmpty(r)&&(i!==t||_.isUndefined(e.input_type)||(r=e),_.isEmpty(r)&&(_.isArray(e)||_.isObject(e))&&(r=o.getInputRegistrationParams(i,n,e)),_.isEmpty(r)||(o.cachedInputRegistrationParams[n][i]=r))}),r}l.errare("getInputRegistrationParams => Father modules should be treated specifically")}},inputIsAFontFamilyModifier:function(i,e){var n=this;if(n.cachedFontFamilyModifier=n.cachedFontFamilyModifier||{},_.has(n.cachedFontFamilyModifier,i))return n.cachedFontFamilyModifier[i];if(!_.isUndefined(sektionsLocalizedData.registeredModules)){_.isUndefined(e)&&(e=sektionsLocalizedData.registeredModules);var o="not_set";return _.each(e,function(e,t){"not_set"===o&&(i!==t||_.isUndefined(e.input_type)||(o=!_.isUndefined(e.refresh_fonts)&&e.refresh_fonts),"not_set"===o&&(_.isArray(e)||_.isObject(e))&&(o=n.inputIsAFontFamilyModifier(i,e)),"not_set"!==o&&(n.cachedFontFamilyModifier[i]=o))}),o}l.errare("inputIsAFontFamilyModifier => missing sektionsLocalizedData.registeredModules")},getModuleStartingValue:function(e){if(!sektionsLocalizedData.registeredModules)return l.errare("getModuleStartingValue => missing sektionsLocalizedData.registeredModules"),"no_starting_value";if(_.isUndefined(sektionsLocalizedData.registeredModules[e]))return l.errare("getModuleStartingValue => the module type "+e+" is not registered"),"no_starting_value";var t=sektionsLocalizedData.registeredModules[e].starting_value;return _.isEmpty(t)?"no_starting_value":t},selectNextTabbableOrFocusable:function(e){var t=d(e),i=d(":focus"),n=0;if(1===i.length){var o=t.index(i);o+1<t.length&&(n=o+1)}t.eq(n).focus()},selectPrevTabbableOrFocusable:function(e){var t=d(e),i=d(":focus"),n=t.length-1;if(1===i.length){var o=t.index(i);0<o&&(n=o-1)}t.eq(n).focus()},setupSelectInput:function(e){var n=this,t=(n.input_parent,n.module,l.czr_sektions.getInputRegistrationParams(n.id,n.module.module_type)),i={params:e=_.isEmpty(e)?t.choices:e};if(n.module.trigger("nimble-set-select-input-options",i),e=i.params,!_.isEmpty(e)&&_.isObject(e))switch(n.type){case"simpleselect":_.each(e,function(e,t){var i={value:t,html:e};t==n()?d.extend(i,{selected:"selected"}):"px"===t&&d.extend(i,{selected:"selected"}),d("select[data-czrtype]",n.container).append(d("<option>",i))}),d("select[data-czrtype]",n.container).selecter();break;case"multiselect":var o=n();o=_.isString(o)?[o]:o,o=_.isArray(o)?o:[],_.each(e,function(e,t){var i={value:t,html:e};_.contains(o,t)&&d.extend(i,{selected:"selected"}),d("select[data-czrtype]",n.container).append(d("<option>",i))}),d("select[data-czrtype]",n.container).czrSelect2({closeOnSelect:!0,templateSelection:function(e){return e.text.replace(/\u2013|\u2014/g,"")}}),d("select[data-czrtype]",n.container).on("change",function(){0===d(this).find("option:selected").length&&n([])});break;default:l.errare("::setupSelectInput => invalid input type => "+n.type)}else l.errare("api.czr_sektions.setupSelectInput => missing select options for input id => "+n.id+" in module "+n.module.module_type)},setupFontSizeAndLineHeightInputs:function(e){var t=this,i=d(".sek-font-size-line-height-wrapper",t.container),n=i.find("input[data-czrtype]").data("sek-unit"),o=function(e){return _.contains(["px","em","%"],e)||(l.errare("error : invalid unit for input "+t.id,e),e="px"),e};t.css_unit=new l.Value(_.isEmpty(n)?"px":o(n)),t.css_unit.bind(function(e){e=_.isEmpty(e)?"px":e,i.find('input[type="number"]').trigger("change")}),i.find('input[type="number"]').on("input change",function(e){t(d(this).val()+o(t.css_unit()))}).stepper(),i.on("click","[data-sek-unit]",function(e){e.preventDefault(),i.find("[data-sek-unit]").removeClass("is-selected").attr("aria-pressed",!1),d(this).addClass("is-selected").attr("aria-pressed",!0),i.find("input[data-czrtype]").data("sek-unit",d(this).data("sek-unit")),t.css_unit(d(this).data("sek-unit"))}),i.find('.sek-ui-button[data-sek-unit="'+n+'"]').addClass("is-selected").attr("aria-pressed",!0)},maybeSetupDeviceSwitcherForInput:function(){var i=this,e=['<span class="sek-input-device-switcher">','<i data-sek-device="desktop" class="sek-switcher preview-desktop active" title="'+sektionsLocalizedData.i18n["Settings on desktops"]+'"></i>','<i data-sek-device="tablet" class="sek-switcher preview-tablet" title="'+sektionsLocalizedData.i18n["Settings on tablets"]+'"></i>','<i data-sek-device="mobile" class="sek-switcher preview-mobile" title="'+sektionsLocalizedData.i18n["Settings on mobiles"]+'"></i>',"</span>"].join(" ");i.container.find(".customize-control-title").prepend(e),i.previewedDevice=new l.Value(l.previewedDevice()),syncWithPreviewedDevice=function(e){e.stopPropagation(),i.container.find("[data-sek-device]").removeClass("active"),d(this).addClass("active");var t="desktop";try{t=d(this).data("sek-device")}catch(e){l.errare("maybeSetupDeviceSwitcherForInput => error when binding sek-switcher",e)}try{l.previewedDevice(t)}catch(e){l.errare("maybeSetupDeviceSwitcherForInput => error when setting the previewed device",e)}i.previewedDevice(t)},i.container.on("click","[data-sek-device]",syncWithPreviewedDevice);var t=i.container.find('[data-sek-device="'+l.previewedDevice()+'"]');0<t.length&&t.trigger("click")},scheduleModuleAccordion:function(e){e=e||{expand_first_control:!0};var i=this;if(d(i.container).on("click",".customize-control label > .customize-control-title",function(e){e.stopPropagation();var t=d(this).closest(".customize-control");"no"!==t.attr("data-sek-accordion")&&(i.container.find(".customize-control").not(t).each(function(){d(this).attr("data-sek-accordion")||(d(this).attr("data-sek-expanded","false"),d(this).find(".czr-items-wrapper").stop(!0,!0).slideUp(0))}),t.find(".czr-items-wrapper").stop(!0,!0).slideToggle({duration:0,start:function(){t.attr("data-sek-expanded","false"==t.attr("data-sek-expanded")?"true":"false"),t.trigger("true"==t.attr("data-sek-expanded")?"sek-accordion-expanded":"sek-accordion-collapsed")}}))}),e.expand_first_control){var t=_.first(i.controls());_.isObject(t)&&!_.isEmpty(t.id)&&l.control(t.id,function(e){e.container.trigger("sek-accordion-expanded"),i.container.find(".customize-control").first().find("label > .customize-control-title").trigger("click")})}},isPromise:function(e){return e&&"function"==typeof e.then&&String(d.Deferred().then)===String(e.then)},whenAllPromisesInParallel:function(e){var i=this,t=d.Deferred(),n=[],o=_.keys(e);return _.each(e,function(e,t){n.push(d.Deferred(function(t){(i.isPromise(e)?e:d.Deferred()).done(t.resolve).fail(function(e){t.reject(e)})}))}),d.when.apply(this,n).done(function(){var i={},e=Array.prototype.slice.call(arguments);_.each(e,function(e,t){i[o[t]]=e}),t.resolve(i)}).fail(t.reject),t},whenAllPromisesInSerie:function(t,i,n,o){i=i||0,n=n||{},o=o||d.Deferred();var r=this;if(_.isArray(t)){var e=t[i];(r.isPromise(e)?e:d.Deferred(function(e){e.resolve()})).always(function(e){n[i]=e,i+1==t.length?o.resolve(n):i+1<t.length&&r.whenAllPromisesInSerie(t,i+1,n,o)})}return o},importAttachment:function(t){return wp.ajax.post("sek_import_attachment",{img_url:t,nonce:l.settings.nonce.save}).fail(function(e){l.errare("sek_import_attachment ajax action failed for image "+t,e)})},cleanIds:function(e){e.id="";var t=this;return _.each(e.collection,function(e){e.id="",_.isArray(e.collection)&&t.cleanIds(e)}),e},getDefaultSektionSettingValue:function(e){return!_.isUndefined(e)&&_.contains(["local","global"],e)||l.errare("getDefaultSektionSettingValue => the skope should be set to local or global"),"global"===e?sektionsLocalizedData.defaultGlobalSektionSettingValue:sektionsLocalizedData.defaultLocalSektionSettingValue},scheduleVisibilityOfInputId:function(t,i){var n=this.input_parent;if(!_.isFunction(i)||_.isEmpty(t))throw new Error("::scheduleVisibilityOfInputId => error when firing for input id : "+this.id);n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(s,m){m.extend(CZRSeksPrototype,{setupDnd:function(){var t=this;t.bind("sek-refresh-dragzones",function(e){!0!="draggable"in document.createElement("span")&&s.panel(sektionsLocalizedData.sektionsPanelId,function(e){s.notifications.add(new s.Notification("drag-drop-support",{type:"error",message:sektionsLocalizedData.i18n["This browser does not support drag and drop. You might need to update your browser or use another one."],dismissible:!0})),_.delay(function(){s.notifications.remove("drag-drop-support")},1e4)}),t.setupNimbleDragZones(e.input_container)}),s.previewer.bind("ready",function(){try{t.setupNimbleDropZones()}catch(e){s.errare("::setupDnd => error on self.setupNimbleDropZones()",e)}_.isUndefined(_.findWhere(t.registered(),{module_type:"sek_intro_sec_picker_module"}))&&_.isUndefined(_.findWhere(t.registered(),{module_type:"sek_module_picker_module"}))||t.rootPanelFocus()}),t.reactToDrop()},setupNimbleDragZones:function(e){var n=this,o=function(){s.notifications.add(new s.Notification("missing-injection-target",{type:"info",message:sektionsLocalizedData.i18n["You first need to click on a target ( with a + icon ) in the preview."],dismissible:!0})),_.delay(function(){s.notifications.remove("missing-injection-target")},3e4)};e.find('[draggable="true"]').each(function(){m(this).on("dragstart",function(e){(function(e){n.lastClickedTargetInPreview({}),e.originalEvent.dataTransfer.setData("sek-content-type",m(this).data("sek-content-type")),e.originalEvent.dataTransfer.setData("sek-content-id",m(this).data("sek-content-id")),e.originalEvent.dataTransfer.setData("sek-section-type",m(this).data("sek-section-type")),e.originalEvent.dataTransfer.setData("sek-is-user-section",m(this).data("sek-is-user-section")),n.dndData={content_type:e.originalEvent.dataTransfer.getData("sek-content-type"),content_id:e.originalEvent.dataTransfer.getData("sek-content-id"),section_type:e.originalEvent.dataTransfer.getData("sek-section-type"),is_user_section:"true"===e.originalEvent.dataTransfer.getData("sek-is-user-section")};try{e.originalEvent.dataTransfer.setData("browserSupport","browserSupport"),e.originalEvent.dataTransfer.clearData("browserSupport")}catch(e){s.panel(sektionsLocalizedData.sektionsPanelId,function(e){s.notifications.add(new s.Notification("drag-drop-support",{type:"error",message:sektionsLocalizedData.i18n["This browser does not support drag and drop. You might need to update your browser or use another one."],dismissible:!0})),_.delay(function(){s.notifications.remove("drag-drop-support")},1e4)})}m(this).addClass("sek-dragged"),m("body").addClass("sek-dragging"),s.previewer.send("sek-drag-start",{type:n.dndData.content_type})}).call(m(this),e)}).on("dragend",function(e){(function(e){m("body").removeClass("sek-dragging"),m(this).removeClass("sek-dragged"),s.previewer.send("sek-drag-stop")}).call(m(this),e)}).dblclick(function(e){(function(e){var t,i=n.lastClickedTargetInPreview();!_.isEmpty(i)&&i.id?t=n.dnd_getDropZonesElements().find('[data-sek-id="'+i.id+'"]').find(".sek-module-drop-zone-for-first-module").first():o(),t&&0<t.length?(s.czr_sektions.trigger("sek-content-dropped",{drop_target_element:t,location:t.closest('[data-sek-level="location"]').data("sek-id"),before_module:t.data("drop-zone-before-module-or-nested-section"),after_module:t.data("drop-zone-after-module-or-nested-section"),before_section:t.data("drop-zone-before-section"),after_section:t.data("drop-zone-after-section"),content_type:m(this).data("sek-content-type"),content_id:m(this).data("sek-content-id"),section_type:m(this).data("sek-section-type"),is_user_section:"true"===m(this).data("sek-is-user-section")}),n.lastClickedTargetInPreview({})):(o(),s.errare("Double click insertion => the target zone was not found"))}).call(m(this),e)})})},setupNimbleDropZones:function(){var t=this;if(this.$dropZones=this.dnd_getDropZonesElements(),this.preDropElement=m("<div>",{class:sektionsLocalizedData.preDropElementClass,html:""}),this.$dropZones.length<1)throw new Error("::setupNimbleDropZones => invalid Dom element");this.$dropZones.each(function(){var e=m(this);!0!==e.data("zone-droppable-setup")&&(t.enterOverTimer=null,e.on("dragenter dragover",sektionsLocalizedData.dropSelectors,function(e){_.isNull(t.enterOverTimer)&&(t.enterOverTimer=!0,_.delay(function(){t.currentMousePosition&&t.currentMousePosition+""==e.clientY+""+e.clientX?t.enterOverTimer=null:(t.currentMousePosition=e.clientY+""+e.clientX,t.dnd_toggleDragApproachClassesToDropZones(e))},100)),t.dnd_canDrop({targetEl:m(this),evt:e})&&(e.stopPropagation(),t.dnd_OnEnterOver(m(this),e))}).on("dragleave drop",sektionsLocalizedData.dropSelectors,function(e){switch(e.type){case"dragleave":t.dnd_isOveringDropTarget(m(this),e)||t.dnd_cleanOnLeaveDrop(m(this),e);break;case"drop":if(this.$cachedDropZoneCandidates=null,!t.dnd_canDrop({targetEl:m(this),evt:e}))return;e.preventDefault(),t.dnd_onDrop(m(this),e),t.dnd_cleanOnLeaveDrop(m(this),e),s.previewer.send("sek-drag-stop")}}).data("zone-droppable-setup",!0))})},dnd_isInTarget:function(e,t){var i=t.clientY,n=t.clientX,o=e[0].getBoundingClientRect(),r=n<=o.right&&o.left<=n;return i>=o.top&&o.bottom>=i&&r},dnd_toggleDragApproachClassesToDropZones:function(u){var p=this;this.$dropZones=this.$dropZones||this.dnd_getDropZonesElements(),this.$cachedDropZoneCandidates=_.isEmpty(this.$cachedDropZoneCandidates)?this.$dropZones.find(".sek-drop-zone"):this.$cachedDropZoneCandidates,this.distanceTable=[],this.$dropZones.find(".sek-drop-zone").each(function(){var e,t,i=u.clientY,n=u.clientX,o=m(this)[0].getBoundingClientRect(),r=Math.abs(i-(o.bottom-(o.bottom-o.top)/2)),a=(Math.abs(o.top-i),Math.abs(n-(o.right-(o.right-o.left)/2))),s=(o.right,o.left,r<50),c=a<50,l=n<=o.right&&o.left<=n,d=i>=o.top&&o.bottom>=i;p.distanceTable.push({el:m(this),dist:d&&l?0:(e=a,t=r,Math.sqrt(e*e+t*t))}),m(this).removeClass("sek-drag-is-in"),(s||d)&&(c||l)?(m(this).removeClass("sek-drag-is-approaching"),m(this).removeClass("sek-drag-is-close"),m(this).addClass("sek-drag-is-very-close")):(m(this).removeClass("sek-drag-is-approaching"),m(this).removeClass("sek-drag-is-close"),m(this).removeClass("sek-drag-is-very-close")),m(this).removeClass("sek-drag-is-in")});var t=_.min(_.pluck(p.distanceTable,"dist"));p.$dropTargetCandidate=null,_.each(p.distanceTable,function(e){_.isNull(p.$dropTargetCandidate)&&t===e.dist&&(p.$dropTargetCandidate=e.el)}),p.$dropTargetCandidate&&0<p.$dropTargetCandidate.length&&p.dnd_isInTarget(p.$dropTargetCandidate,u)&&p.$dropTargetCandidate.addClass("sek-drag-is-in"),p.enterOverTimer=null},dnd_getPreDropElementContent:function(e){var t,i,n=m(e.currentTarget);switch(this.dndData.content_type){case"module":t=sektionsLocalizedData.i18n["Insert here"],0<n.length&&("between-sections"!==n.data("sek-location")&&"in-empty-location"!==n.data("sek-location")||(t=sektionsLocalizedData.i18n["Insert in a new section"])),i='<div class="sek-module-placeholder-content"><p>'+t+"</p></div>";break;case"preset_section":i='<div class="sek-module-placeholder-content"><p>'+(t=sektionsLocalizedData.i18n["Insert a new section here"])+"</p></div>";break;default:s.errare("::dnd_getPreDropElementContent => invalid content type provided")}return i},dnd_getDropZonesElements:function(){return m(s.previewer.targetWindow().document)},dnd_canDrop:function(e){var t=this,i=(e=_.extend({targetEl:{},evt:{}},e||{})).targetEl;if(!_.isObject(i)||i.length<1)return!1;var n=i.hasClass("sek-content-preset_section-drop-zone"),o=i.hasClass("sek-module-drop-zone-for-first-module"),r=!0===i.closest('[data-sek-level="location"]').data("sek-is-header-location"),a=!0===i.closest('[data-sek-level="location"]').data("sek-is-footer-location"),s="preset_section"===t.dndData.content_type&&"content"===t.dndData.section_type,c=function(e){m(".sek-no-drop-possible-message",i).length<1&&i.append(['<div class="sek-no-drop-possible-message">','<i class="material-icons">not_interested</i>',e,"</div>"].join(""))};return(r||a)&&s?(c(r?sektionsLocalizedData.i18n["The header location only accepts modules and pre-built header sections"]:sektionsLocalizedData.i18n["The footer location only accepts modules and pre-built footer sections"]),!1):a&&"preset_section"===t.dndData.content_type&&"header"===t.dndData.section_type?(c(sektionsLocalizedData.i18n["You can't drop a header section in the footer location"]),!1):r&&"preset_section"===t.dndData.content_type&&"footer"===t.dndData.section_type?(c(sektionsLocalizedData.i18n["You can't drop a footer section in the header location"]),!1):i.hasClass("sek-drop-zone")&&("preset_section"===t.dndData.content_type&&n||"module"===t.dndData.content_type&&!n||"preset_section"===t.dndData.content_type&&o)},dnd_OnEnterOver:function(e,t){t.preventDefault(),!0!==e.data("is-drag-entered")&&(e.data("is-drag-entered",!0),e.addClass("sek-active-drop-zone"),this.$dropZones.addClass("sek-is-dragging"));try{this.dnd_mayBePrintPreDropElement(e,t)}catch(e){s.errare("Error when trying to insert the preDrop content",e)}},dnd_cleanOnLeaveDrop:function(e,t){var i=this;this.$dropZones=this.$dropZones||this.dnd_getDropZonesElements(),this.preDropElement.remove(),this.$dropZones.removeClass("sek-is-dragging"),m(sektionsLocalizedData.dropSelectors,this.$dropZones).each(function(){i.dnd_cleanSingleDropTarget(m(this))})},dnd_cleanSingleDropTarget:function(e){_.isEmpty(e)||e.length<1||(e.data("is-drag-entered",!1),e.data("preDrop-position",!1),e.removeClass("sek-active-drop-zone"),e.find(".sek-drop-zone").removeClass("sek-drag-is-close"),e.find(".sek-drop-zone").removeClass("sek-drag-is-approaching"),e.removeClass("sek-feed-me-seymore"),e.find(".sek-no-drop-possible-message").remove())},dnd_getPosition:function(e,t){var i=e[0].getBoundingClientRect(),n=i.height;return"before"===e.data("preDrop-position")?n+=this.preDropElement.outerHeight():"after"===e.data("preDrop-position")&&(n-=this.preDropElement.outerHeight()),0<t.originalEvent.clientY-i.top-n/2?"after":"before"},dnd_mayBePrintPreDropElement:function(e,t){var i=this,n=e.data("preDrop-position"),o=this.dnd_getPosition(e,t);if(n!==o&&!0!==i.isPrintingPreDrop){i.isPrintingPreDrop=!0,this.dnd_cleanSingleDropTarget(this.$currentPreDropTarget);var r="between-sections"===e.data("sek-location")||"in-empty-location"===e.data("sek-location");m.when(i.preDropElement.remove()).done(function(){e["before"===o?"prepend":"append"](i.preDropElement).find("."+sektionsLocalizedData.preDropElementClass).html(i.dnd_getPreDropElementContent(t)),e.find("."+sektionsLocalizedData.preDropElementClass).toggleClass("in-new-sektion",r),e.data("preDrop-position",o),e.addClass("sek-feed-me-seymore"),i.isPrintingPreDrop=!1,i.$currentPreDropTarget=e})}},dnd_isOveringDropTarget:function(e,t){var i=e[0].getBoundingClientRect(),n=t.clientX,o=t.clientY,r=i.left,a=i.right,s=i.top,c=i.bottom;return r<=n&&n-r<=a-r&&(s<=o&&o-s<=c-s)},dnd_onDrop:function(e,t){t.stopPropagation();this.dnd_getPosition(e,t),e.index();s.czr_sektions.trigger("sek-content-dropped",{drop_target_element:e,location:e.closest('[data-sek-level="location"]').data("sek-id"),before_module:e.data("drop-zone-before-module-or-nested-section"),after_module:e.data("drop-zone-after-module-or-nested-section"),before_section:e.data("drop-zone-before-section"),after_section:e.data("drop-zone-after-section"),content_type:t.originalEvent.dataTransfer.getData("sek-content-type"),content_id:t.originalEvent.dataTransfer.getData("sek-content-id"),section_type:t.originalEvent.dataTransfer.getData("sek-section-type"),is_user_section:"true"===t.originalEvent.dataTransfer.getData("sek-is-user-section")})},reactToDrop:function(){this.bind("sek-content-dropped",function(e){try{!function(e){if(!_.isObject(e))throw new Error("Invalid params provided");if(e.drop_target_element.length<1)throw new Error("Invalid drop_target_element");var t=e.drop_target_element,i="content-in-column";switch(t.data("sek-location")){case"between-sections":i="content-in-a-section-to-create";break;case"in-empty-location":e.is_first_section=!0,e.send_to_preview=!1,i="content-in-empty-location";break;case"between-columns":i="content-in-new-column"}if("preset_section"===e.content_type)if(t.hasClass("sek-module-drop-zone-for-first-module")){var n=t.closest('div[data-sek-level="section"]');1<n.find(".sek-sektion-inner").first().children('[data-sek-level="column"]').length?(i="preset-section-in-a-nested-section-to-create",e.is_nested=!0,e.in_column=t.closest('[data-sek-level="column"]').data("sek-id"),e.in_sektion=n.data("sek-id")):(e.sektion_to_replace=n.data("sek-id"),e.after_section=e.sektion_to_replace,e.in_column=n.closest('[data-sek-level="column"]').data("sek-id"),i="content-in-a-section-to-replace")}else"between-sections"===t.data("sek-location")&&(i="content-in-a-section-to-create");switch(i){case"content-in-column":var o=t.closest("div[data-sek-level]");if(o.length<1)throw new Error("No valid level dom element found");var r=o.data("sek-level"),a=o.data("sek-id");if(_.isEmpty(r)||_.isEmpty(a))throw new Error("No valid level id found");s.previewer.trigger("sek-add-module",{level:r,id:a,in_column:t.closest('div[data-sek-level="column"]').data("sek-id"),in_sektion:t.closest('div[data-sek-level="section"]').data("sek-id"),before_module:e.before_module,after_module:e.after_module,content_type:e.content_type,content_id:e.content_id});break;case"content-in-a-section-to-create":case"content-in-a-section-to-replace":s.previewer.trigger("sek-add-content-in-new-sektion",e);break;case"preset-section-in-a-nested-section-to-create":s.previewer.trigger("sek-add-preset-section-in-new-nested-sektion",e);break;case"content-in-empty-location":s.previewer.trigger("sek-add-content-in-new-sektion",e);break;default:s.errare("sek control panel => ::reactToDrop => invalid drop case : "+i)}}(e)}catch(e){s.errare("error when reactToDrop",e)}})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{setupTinyMceEditor:function(){var n=this;l.sekEditorExpanded=new l.Value(!1),n.editorEventsListenerSetup=!1,n.$editorPane=d("#czr-customize-content_editor-pane"),n.$editorDragbar=d("#czr-customize-content_editor-dragbar"),n.$preview=d("#customize-preview"),n.$collapseSidebar=d(".collapse-sidebar"),n.attachResizeEventsToEditor();d("#customize-theme-controls").on("click",'[data-czr-action="open-tinymce-editor"]',function(){var e=d(this).data("czr-control-id"),t=d(this).data("czr-input-id");_.isEmpty(e)||_.isEmpty(t)?l.errare("toggle-tinymce-editor => missing input or control id"):l.sekEditorExpanded(!0)}),l.sekEditorExpanded.bind(function(e,t,i){!function(){l.sekTinyMceEditor=tinyMCE.get(sektionsLocalizedData.idOfDetachedTinyMceTextArea);var e=function(){!1===n.editorEventsListenerSetup&&(n.editorEventsListenerSetup=!0,n.trigger("sek-tiny-mce-editor-bound-and-instantiated"))};l.sekTinyMceEditor&&(l.sekTinyMceEditor.initialized?e():l.sekTinyMceEditor.on("init",function(){e()}))}(),e&&l.sekTinyMceEditor&&l.sekTinyMceEditor.focus(),d(document.body).toggleClass("czr-customize-content_editor-pane-open",e),d(window)[e?"on":"off"]("resize",function(){l.sekEditorExpanded()&&_.delay(function(){n.czrResizeEditor(window.innerHeight-n.$editorPane.height())},50)}),e?(n.czrResizeEditor(window.innerHeight-n.$editorPane.height()),_.delay(function(){d(window).trigger("resize")},100)):(n.$preview.css("bottom",""),n.$collapseSidebar.css("bottom",""))}),d("#czr-customize-content_editor-pane").on("click",'[data-czr-action="close-tinymce-editor"]',function(){l.sekEditorExpanded(!1)}),d("#customize-controls").on("click",function(e){"open-tinymce-editor"!=d(e.target).data("czr-action")&&l.sekEditorExpanded(!1,{context:"clicked anywhere"})}),d(document).on("keydown",_.throttle(function(e){27===e.keyCode&&l.sekEditorExpanded(!1)},50)),n.bind("sek-tiny-mce-editor-bound-and-instantiated",function(){var e=d(l.sekTinyMceEditor.iframeElement).contents().get(0);d(e).on("keydown",_.throttle(function(e){27===e.keyCode&&l.sekEditorExpanded(!1)},50))}),_.each(["sek-click-on-inactive-zone","sek-add-section","sek-add-column","sek-add-module","sek-remove","sek-move","sek-duplicate","sek-resize-columns","sek-add-content-in-new-sektion","sek-pick-content","sek-edit-options","sek-edit-module","sek-notify"],function(e){"sek-edit-module"!=e?l.previewer.bind(e,function(){l.sekEditorExpanded(!1)}):l.previewer.bind(e,function(e){l.sekEditorExpanded("czr_tiny_mce_editor_module"===e.module_type)})})},attachResizeEventsToEditor:function(){var t=this;d("#czr-customize-content_editor-pane").on("mousedown mouseup",function(e){if(("mousedown"!==e.type||"czr-customize-content_editor-dragbar"===d(e.target).attr("id")||d(e.target).hasClass("czr-resize-handle"))&&l.sekEditorExpanded())switch(e.type){case"mousedown":d(document).on("mousemove."+sektionsLocalizedData.idOfDetachedTinyMceTextArea,function(e){e.preventDefault(),d(document.body).addClass("czr-customize-content_editor-pane-resize"),d("#czr-customize-content_editor_ifr").css("pointer-events","none"),t.czrResizeEditor(e.pageY)});break;case"mouseup":d(document).off("mousemove."+sektionsLocalizedData.idOfDetachedTinyMceTextArea),d(document.body).removeClass("czr-customize-content_editor-pane-resize"),d("#czr-customize-content_editor_ifr").css("pointer-events","")}})},czrResizeEditor:function(e){var t,i=this,n=window.innerHeight,o=(window.innerWidth,{}),r=d("#czr-customize-content_editor_ifr"),a=d("#wp-czr-customize-content_editor-tools"),s=i.$editorPane.find(".mce-toolbar-grp"),c=i.$editorPane.find(".mce-statusbar");l.sekEditorExpanded()&&(_.isNaN(e)||(t=n-e),o.height=t,o.components=a.outerHeight()+s.outerHeight()+c.outerHeight(),t<40&&(o.height=40),n-1<t&&(o.height=n-1),n<i.$editorPane.outerHeight()&&(o.height=n),i.$preview.css("bottom",o.height),i.$editorPane.css("height",o.height),r.css("height",o.height-o.components))}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(t,e){jQuery.extend(CZRSeksPrototype,t.Events);var i=t.Class.extend(CZRSeksPrototype);try{t.czr_sektions=new i}catch(e){t.errare("api.czr_sektions => problem on instantiation",e)}}(wp.customize),function(l,d,u){l.czrInputMap=l.czrInputMap||{};var p=function(e){return u.contains(["px","em","%"],e)||(l.errare("error : invalid unit for input "+this.id,e),e="px"),e},_=function(i){var n=this;i.on("click",".sek-ui-button",function(e,t){e.preventDefault(),i.find(".sek-ui-button").removeClass("is-selected").attr("aria-pressed",!1),d(this).addClass("is-selected").attr("aria-pressed",!0),n.css_unit(d(this).data("sek-unit"),t)}),i.find('.sek-ui-button[data-sek-unit="'+(n.initial_unit||"px")+'"]').addClass("is-selected").attr("aria-pressed",!0)},m=function(t,i){var n=this;t.on("click",".reset-spacing-wrap",function(e){e.preventDefault(),t.find('input[type="number"]').each(function(){d(this).val("")}),n(i),d(".sek-unit-wrapper",t).find('[data-sek-unit="px"]').trigger("click")})};d.extend(l.czrInputMap,{spacing:function(e){var o=this,i=d(".sek-spacing-wrapper",o.container),t=l.czr_sektions.getInputRegistrationParams(o.id,o.module.module_type),n=u.isEmpty(t)||u.isEmpty(t.default)?[]:t.default;if(i.on("input",'input[type="number"]',function(e){var t=d(this).closest("[data-sek-spacing]").data("sek-spacing"),i=d.extend(!0,{},u.isObject(o())?o():{}),n=d(this).val();u.isString(n)&&!u.isEmpty(n)||u.isNumber(n)?i[t]=n:i=u.omit(i,t),o(i)}),m.call(o,i,n),u.isObject(o())){u.each(o(),function(e,t){d('[data-sek-spacing="'+t+'"]',i).find('input[type="number"]').val(e)});var r="px";d(".sek-unit-wrapper .sek-ui-button",o.container).each(function(){var e=d(this).data("sek-unit");u.isEmpty(o())||u.isEmpty(o().unit)||e===o().unit&&(r=e)}),d(".sek-unit-wrapper",o.container).find('[data-sek-unit="'+p.call(o,r)+'"]').trigger("click")}var a=o();o.initial_unit="px",u.isEmpty(a)||(o.initial_unit=u.isEmpty(a.unit)?"px":a.unit),o.css_unit=new l.Value(p.call(o,o.initial_unit)),o.css_unit.bind(function(e){var t;e=u.isEmpty(e)?"px":e,(t=d.extend(!0,{},u.isObject(o())?o():{})).unit=e,o(t)}),_.call(o,i)}}),d.extend(l.czrInputMap,{spacingWithDeviceSwitcher:function(e){var r=this,a=d(".sek-spacing-wrapper",r.container),t=l.czr_sektions.getInputRegistrationParams(r.id,r.module.module_type),s=u.isEmpty(t)||u.isEmpty(t.default)?{}:t.default,c=function(e,t){var i=["mobile","tablet","desktop"];if(u.has(e,t))return e[t];var n=u.findIndex(i,function(e){return t===e});return!u.isEmpty(t)&&n<i.length?c(e,i[n+1]):{}},i=function(e){var t=d.extend(!0,{},u.isObject(r())?r():{}),i=d.extend(!0,{},s);t=u.isObject(t)?d.extend(i,t):i;var n=c(t,e);d("[data-sek-spacing]",a).each(function(){var e=d(this).data("sek-spacing"),t="";u.isEmpty(n)||u.isEmpty(n[e])||(t=n[e]),d(this).find('input[type="number"]').val(t)});var o="px";d(".sek-unit-wrapper .sek-ui-button",r.container).each(function(){var e=d(this).data("sek-unit");u.isEmpty(n)||u.isEmpty(n.unit)||e===n.unit&&(o=e)}),d(".sek-unit-wrapper",r.container).find('[data-sek-unit="'+p.call(r,o)+'"]').trigger("click",{previewed_device_switched:!0})};l.czr_sektions.maybeSetupDeviceSwitcherForInput.call(r);var n=r();r.initial_unit="px",u.isEmpty(n)||u.isEmpty(n[r.previewedDevice()])||(r.initial_unit=u.isEmpty(n[r.previewedDevice()].unit)?"px":n[r.previewedDevice()].unit),r.css_unit=new l.Value(p.call(r,r.initial_unit)),a.on("input",'input[type="number"]',function(e){var t,i=d(this).closest("[data-sek-spacing]").data("sek-spacing"),n=d(this).val(),o=l.previewedDevice()||"desktop";(t=d.extend(!0,{},u.isObject(r())?r():{}))[o]=d.extend(!0,{},t[o]||{}),u.isString(n)&&!u.isEmpty(n)||u.isNumber(n)?t[o][i]=n:t[o]=u.omit(t[o],i),r(t)}),m.call(r,a,s),r.previewedDevice.bind(function(e){try{i(e)}catch(e){l.errare("Error when firing syncWithPreviewedDevice for input type spacingWithDeviceSwitcher for input id "+r.id,e)}}),r.css_unit.bind(function(e,t,i){if(!u.isObject(i)||!0!==i.previewed_device_switched){e=u.isEmpty(e)?"px":e;var n,o=r.previewedDevice()||"desktop";(n=d.extend(!0,{},u.isObject(r())?r():{}))[o]=d.extend(!0,{},n[o]||{}),n[o].unit=e,r(n)}}),_.call(r,a);try{i(l.previewedDevice())}catch(e){l.errare("Error when firing syncWithPreviewedDevice for input type spacingWithDeviceSwitcher for input id "+r.id,e)}}})}(wp.customize,jQuery,_),function(n,s,c){n.czrInputMap=n.czrInputMap||{},s.extend(n.czrInputMap,{bg_position:function(e){var t=this;s(".sek-bg-pos-wrapper",t.container).on("change",'input[type="radio"]',function(e){t(s(this).val())}),c.isEmpty(t())||t.container.find('input[value="'+t()+'"]').attr("checked",!0).trigger("click")},bgPositionWithDeviceSwitcher:function(e){var o=this,t=n.czr_sektions.getInputRegistrationParams(o.id,o.module.module_type),r=c.isEmpty(t)||c.isEmpty(t.default)?{}:t.default;n.czr_sektions.maybeSetupDeviceSwitcherForInput.call(o);var a=function(e,t){var i=["mobile","tablet","desktop"];if(c.has(e,t))return e[t];var n=c.findIndex(i,function(e){return t===e});return!c.isEmpty(t)&&n<i.length?a(e,i[n+1]):{}},i=function(e){var t=s.extend(!0,{},c.isObject(o())?o():{}),i=s.extend(!0,{},r);t=c.isObject(t)?s.extend(i,t):i;var n=a(t,e);o.container.find('input[value="'+n+'"]').attr("checked",!0).trigger("click",{previewed_device_switched:!0})};s(".sek-bg-pos-wrapper",o.container).on("change",'input[type="radio"]',function(e){var t,i=s(this).val();(t=s.extend(!0,{},c.isObject(o())?o():{}))[n.previewedDevice()||"desktop"]=i,o(t)}),o.previewedDevice.bind(function(e){try{i(e)}catch(e){n.errare("Error when firing syncWithPreviewedDevice for input type spacingWithDeviceSwitcher for input id "+o.id,e)}});try{i(n.previewedDevice())}catch(e){n.errare("Error when firing syncWithPreviewedDevice for input type bgPositionWithDeviceSwitcher for input id "+o.id,e)}}})}(wp.customize,jQuery,_),function(c,l,d){c.czrInputMap=c.czrInputMap||{};var e=function(e){var o=this,t=c.czr_sektions.getInputRegistrationParams(o.id,o.module.module_type),r=d.isEmpty(t)||d.isEmpty(t.default)?{}:t.default,i="verticalAlignWithDeviceSwitcher"===o.type?".sek-v-align-wrapper":".sek-h-align-wrapper",a=l(i,o.container);c.czr_sektions.maybeSetupDeviceSwitcherForInput.call(o);var s=function(e,t){var i=["mobile","tablet","desktop"];if(d.has(e,t))return e[t];var n=d.findIndex(i,function(e){return t===e});return!d.isEmpty(t)&&n<i.length?s(e,i[n+1]):{}},n=function(e){var t=l.extend(!0,{},d.isObject(o())?o():{}),i=l.extend(!0,{},r);t=d.isObject(t)?l.extend(i,t):i;var n=s(t,e);a.find(".selected").removeClass("selected"),a.find('div[data-sek-align="'+n+'"]').addClass("selected")};a.on("click","[data-sek-align]",function(e){var t;e.preventDefault(),(t=l.extend(!0,{},d.isObject(o())?o():{}))[c.previewedDevice()||"desktop"]=l(this).data("sek-align"),a.find(".selected").removeClass("selected"),l.when(l(this).addClass("selected")).done(function(){o(t)})}),o.previewedDevice.bind(function(e){try{n(e)}catch(e){c.errare("Error when firing syncWithPreviewedDevice for input type : "+o.type+" for input id "+o.id,e)}});try{n(c.previewedDevice())}catch(e){c.errare("Error when firing syncWithPreviewedDevice for input type : "+o.type+" for input id "+o.id,e)}};l.extend(c.czrInputMap,{horizTextAlignmentWithDeviceSwitcher:e,horizAlignmentWithDeviceSwitcher:e,verticalAlignWithDeviceSwitcher:e})}(wp.customize,jQuery,_),function(t,e,i){t.czrInputMap=t.czrInputMap||{},e.extend(t.czrInputMap,{font_size:function(e){t.czr_sektions.setupFontSizeAndLineHeightInputs.call(this)}})}(wp.customize,jQuery,_),function(t,e,i){t.czrInputMap=t.czrInputMap||{},e.extend(t.czrInputMap,{line_height:function(e){t.czr_sektions.setupFontSizeAndLineHeightInputs.call(this)}})}(wp.customize,jQuery,_),function(i,c,l){i.czrInputMap=i.czrInputMap||{},c.extend(i.czrInputMap,{font_picker:function(e){var s=this,o=s.input_parent,n=function(e,t){o();var n=c('select[data-czrtype="'+s.id+'"]',s.container);l.isNull(s())||l.isEmpty(s())?n.append('<option value="none" selected="selected">'+sektionsLocalizedData.i18n["Select a font family"]+"</option>"):n.append('<option value="none">'+sektionsLocalizedData.i18n["Select a font family"]+"</option>"),l.each([{title:sektionsLocalizedData.i18n["Web Safe Fonts"],type:"cfont",list:t.cfonts},{title:sektionsLocalizedData.i18n["Google Fonts"],type:"gfont",list:t.gfonts}],function(e){var t,r,a,i=c("<optgroup>",{label:e.title,html:(t=e.list,r=e.type,a="",l.each(t,function(e){var t,i,n=e.name,o=l.isString(n)?n.replace(/[+|:]/g," "):n;t=n,i=r,(n=l.isString(t)?["[",i,"]",t].join(""):"")==s()?a+='<option selected="selected" value="'+n+'">'+o+"</option>":a+='<option value="'+n+'">'+o+"</option>"}),a)});n.append(i)});var i={escapeMarkup:function(e){return e}};e&&c.extend(i,{resultsAdapter:e,closeOnSelect:!1}),n.czrSelect2(i),c(".czrSelect2-selection__rendered",s.container).css(r(s()))},r=function(e){if(!l.isString(e)||l.isEmpty(e))return{};var t,i,n,o=(e=e.replace("[gfont]","").replace("[cfont]","")).split(":");return t=a(e),i=o[1]?o[1].replace(/[^0-9.]+/g,""):400,i=l.isNumber(i)?i:400,n=o[1]&&-1!=o[1].indexOf("italic")?"italic":"",{"font-family":"none"==t?"inherit":t.replace(/[+|:]/g," "),"font-weight":i||400,"font-style":n||"normal"}},a=function(e){if(!l.isString(e)||l.isEmpty(e))return e;var t=(e=e.replace("[gfont]","").replace("[cfont]","")).split(":");return l.isString(t[0])?t[0].replace(/[+|:]/g," "):""};c.when(function(){var e,t=c.Deferred();l.isEmpty(i.sek_fontCollections)?(l.isUndefined(i.sek_fetchingFontCollection)||"pending"!=i.sek_fetchingFontCollection.state()?(e=i.CZR_Helpers.getModuleTmpl({tmpl:"font_list",module_type:"font_picker_input",module_id:s.module.id}),i.sek_fetchingFontCollection=e):e=i.sek_fetchingFontCollection,e.done(function(e){if("string"!=typeof e||"{"!==e[0])throw new Error("font_picker => server list is not JSON.parse-able");i.sek_fontCollections=JSON.parse(e),t.resolve(i.sek_fontCollections)}).fail(function(e){t.reject(e)})):t.resolve(i.sek_fontCollections);return t.promise()}()).done(function(t){var i;(i=c.Deferred(),void 0!==c.fn.czrSelect2&&void 0!==c.fn.czrSelect2.amd&&"function"==typeof c.fn.czrSelect2.amd.require?c.fn.czrSelect2.amd.require(["czrSelect2/results","czrSelect2/utils"],function(e,t){var n=function(e,t,i){n.__super__.constructor.call(this,e,t,i)};t.Extend(n,e),n.prototype.bind=function(e,t){var i=this;e.on("results:focus",function(e){"true"!=e.element.attr("aria-selected")&&i.trigger("select",{data:e.data})}),n.__super__.bind.call(this,e,t)},i.resolve(n)}):i.resolve(!1),i.promise()).done(function(e){n(e,t)})}).fail(function(e){i.errare("font_picker => fail response =>",e)})}})}(wp.customize,jQuery,_),function(r,a,s){r.czrInputMap=r.czrInputMap||{},a.extend(r.czrInputMap,{fa_icon_picker:function(){var n=this,o=!1,e=function(t){!0!==n.iconCollectionSet&&(a.when(a.Deferred(function(t){s.isEmpty(n.sek_faIconCollection)?r.CZR_Helpers.getModuleTmpl({tmpl:"icon_list",module_type:"fa_icon_picker_input",module_id:n.module.id}).done(function(e){if("string"!=typeof e||"["!==e[0])throw new Error("fa_icon_picker => server list is not JSON.parse-able");n.sek_faIconCollection=JSON.parse(e),t.resolve(n.sek_faIconCollection)}).fail(function(e){t.reject(e)}):t.resolve(n.sek_faIconCollection)})).done(function(e){!function(e){s.each(e,function(e){var t={value:e,html:r.CZR_Helpers.capitalize(e.substring(7))};t.value==n()&&(a.extend(t,{selected:"selected"}),o=!0),a("select[data-czrtype]",n.container).append(a("<option>",t))});var t,i=function(e){return e.id?a('<span class="'+e.element.value+'"></span><span class="social-name">&nbsp;&nbsp;'+e.text+"</span>"):e.text};t=o?a("<option>"):a("<option>",{selected:"selected"}),a("select[data-czrtype]",n.container).prepend(t).czrSelect2({templateResult:i,templateSelection:i,placeholder:sektionsLocalizedData.i18n["Select an icon"],allowClear:!0})}(e),t&&!0===t.open_on_init&&s.delay(function(){try{a("select[data-czrtype]",n.container).czrSelect2("open")}catch(e){}},100)}).fail(function(e){r.errare("fa_icon_picker => fail response =>",e)}),n.iconCollectionSet=!0)};n.container.on("click",function(){e()}),s.delay(function(){e({open_on_init:!1})},1e3)}})}(wp.customize,jQuery,_),function(d,u,p){d.czrInputMap=d.czrInputMap||{},u.extend(d.czrInputMap,{code_editor:function(e){var n=this,i=this.module.control,t=(n.input_parent(),!1),r=n.container.find("textarea"),o=n.container.find(".customize-control-title"),a=r.data("editor-params");wp.codeEditor&&(p.isUndefined(a)||!1!==a)&&(t=a),n.isReady.done(function(){var e=function(e){p.isEmpty(this.editor)&&(p.isEmpty(this.module.control.container.attr("data-sek-expanded"))||"false"==this.module.control.container.attr("data-sek-expanded")||setTimeout(function(){if(t)try{s(t)}catch(e){d.errare("error in sek_control => code_editor() input",e),c()}else c();o.click()},10))};e.call(n),n.module.control.container.on("sek-accordion-expanded",function(){e.call(n)})});var s=function(e){var t,i=!1;t=p.extend({},e,{onTabNext:CZRSeksPrototype.selectNextTabbableOrFocusable(":tabbable"),onTabPrevious:CZRSeksPrototype.selectPrevTabbableOrFocusable(":tabbable"),onUpdateErrorNotice:l}),n.editor=wp.codeEditor.initialize(r,t),u(n.editor.codemirror.display.lineDiv).attr({role:"textbox","aria-multiline":"true","aria-label":o.html(),"aria-describedby":"editor-keyboard-trap-help-1 editor-keyboard-trap-help-2 editor-keyboard-trap-help-3 editor-keyboard-trap-help-4"}),o.on("click",function(e){e.stopPropagation(),n.editor.codemirror.focus()}),n.editor.codemirror.on("change",function(e){i=!0,r.val(e.getValue()).trigger("change"),i=!1}),n.editor.codemirror.setValue(n()),n.bind(n.id+":changed",function(e){i||n.editor.codemirror.setValue(e)}),n.editor.codemirror.on("keydown",function(e,t){27===t.keyCode&&t.stopPropagation()})},c=function(){var o=r[0];n.editor=o,r.on("blur",function(){r.data("next-tab-blurs",!1)}),r.on("keydown",function(e){var t,i,n;27!==e.keyCode?9!==e.keyCode||e.ctrlKey||e.altKey||e.shiftKey||r.data("next-tab-blurs")||(t=o.selectionStart,i=o.selectionEnd,n=o.value,0<=t&&(o.value=n.substring(0,t).concat("\t",n.substring(i)),r.selectionStart=o.selectionEnd=t+1),e.stopPropagation(),e.preventDefault()):r.data("next-tab-blurs")||(r.data("next-tab-blurs",!0),e.stopPropagation())})},l=function(e){var t;i.setting.notifications.remove(n.id),0!==e.length&&(t=1===e.length?sektionsLocalizedData.i18n.codeEditorSingular.replace("%d","1").replace("%s",o.html()):sektionsLocalizedData.i18n.codeEditorPlural.replace("%d",String(e.length)).replace("%s",o.html()),i.setting.notifications.add(n.id,new d.Notification(n.id,{message:t,type:"warning"})))}}})}(wp.customize,jQuery,_),function(e,r,t){e.czrInputMap=e.czrInputMap||{},r.extend(e.czrInputMap,{range_simple:function(e){var t=this,i=r(".sek-range-with-unit-picker-wrapper",t.container),n=i.find('input[type="number"]'),o=i.find('input[type="range"]');o.on("input",function(e){n.val(r(this).val()).trigger("input")}),n.on("input",function(e){t(r(this).val()),o.val(r(this).val())}),o.val(n.val()||0)}})}(wp.customize,jQuery,_),function(d,u,p){d.czrInputMap=d.czrInputMap||{},u.extend(d.czrInputMap,{range_simple_device_switcher:function(e){var a=this,t=u(".sek-range-with-unit-picker-wrapper",a.container),s=t.find('input[type="number"]'),r=t.find('input[type="range"]'),i=d.czr_sektions.getInputRegistrationParams(a.id,a.module.module_type),c=p.isEmpty(i)||p.isEmpty(i.default)?{}:i.default,l=function(e,t){var i=["mobile","tablet","desktop"];if(p.has(e,t))return e[t];var n=p.findIndex(i,function(e){return t===e});return!p.isEmpty(t)&&n<i.length?l(e,i[n+1]):u.extend(!0,{desktop:""},c).desktop},n=function(e){var t=a(),i={};i=u.extend(!0,{},c),p.isObject(t)?i=u.extend(!0,{},t):p.isString(t)&&!p.isEmpty(t)&&(i={desktop:t});var n,o=l(i,e),r=(n=o,p.isEmpty(n)||!p.isString(n)?"16":n.replace(/px|em|%/g,""));s.val(r).trigger("input",{previewed_device_switched:!0})};d.czr_sektions.maybeSetupDeviceSwitcherForInput.call(a),r.on("input",function(e){s.val(u(this).val()).trigger("input")}),s.on("input",function(e,t){var i,n=d.previewedDevice()||"desktop",o=u(this).val();(i=u.extend(!0,{},p.isObject(a())?a():{}))[n]=u.extend(!0,{},i[n]||{}),p.isString(o)&&!p.isEmpty(o)&&(i[n]=o),(p.isEmpty(t)||p.isObject(t)&&!0!==t.previewed_device_switched)&&a(i),r.val(u(this).val())}),a.previewedDevice.bind(function(e){try{n(e)}catch(e){d.errare("Error when firing syncWithPreviewedDevice for input type "+a.type+" for input id "+a.id,e)}}),r.val(s.val()||0);try{n(d.previewedDevice())}catch(e){d.errare("Error when firing syncWithPreviewedDevice for input type "+a.type+" for input id "+a.id,e)}}})}(wp.customize,jQuery,_),function(s,c,l){s.czrInputMap=s.czrInputMap||{},c.extend(s.czrInputMap,{range_with_unit_picker:function(e){var t=this,i=c(".sek-range-with-unit-picker-wrapper",t.container),n=i.find('input[type="number"]'),o=i.find('input[type="range"]'),r=i.find("input[data-czrtype]").data("sek-unit"),a=function(e){return l.contains(["px","em","%"],e)||(s.errare("error : invalid unit for input "+t.id,e),e="px"),e};t.css_unit=new s.Value(l.isEmpty(r)?"px":a(r)),t.css_unit.bind(function(e){e=l.isEmpty(e)?"px":e,i.find('input[type="number"]').trigger("input")}),o.on("input",function(e){n.val(c(this).val()).trigger("input")}),n.on("input",function(e){t(c(this).val()+a(t.css_unit())),o.val(c(this).val())}),o.val(n.val()||0),i.on("click",".sek-ui-button",function(e){e.preventDefault(),i.find(".sek-ui-button").removeClass("is-selected").attr("aria-pressed",!1),c(this).addClass("is-selected").attr("aria-pressed",!0),i.find("input[data-czrtype]").data("sek-unit",c(this).data("sek-unit")),t.css_unit(c(this).data("sek-unit"))}),i.find('.sek-ui-button[data-sek-unit="'+r+'"]').addClass("is-selected").attr("aria-pressed",!0)}})}(wp.customize,jQuery,_),function(s,_,m){s.czrInputMap=s.czrInputMap||{},_.extend(s.czrInputMap,{range_with_unit_picker_device_switcher:function(e){var c=this,l=_(".sek-range-with-unit-picker-wrapper",c.container),d=l.find('input[type="number"]'),r=l.find('input[type="range"]'),a=function(e){return m.contains(["px","em","%"],e)||(s.errare("range_with_unit_picker_device_switcher => error : invalid unit for input "+c.id,e),e="px"),e},t=s.czr_sektions.getInputRegistrationParams(c.id,c.module.module_type),u=m.isEmpty(t)||m.isEmpty(t.default)?{}:t.default,i=function(){return l.find("input[data-czrtype]").data("sek-unit")||"px"},p=function(e,t){var i=["mobile","tablet","desktop"];if(m.has(e,t))return e[t];var n=m.findIndex(i,function(e){return t===e});return!m.isEmpty(t)&&n<i.length?p(e,i[n+1]):_.extend(!0,{desktop:""},u).desktop},n=function(e){var t=c(),i={};i=_.extend(!0,{},u),m.isObject(t)?i=_.extend(!0,{},t):m.isString(t)&&!m.isEmpty(t)&&(i={desktop:t});var n,o,r=p(i,e),a=(o=r,m.isEmpty(o)||!m.isString(o)?"px":o.replace(/[0-9]|\.|,/g,"")),s=(n=r,m.isEmpty(n)||!m.isString(n)?"16":n.replace(/px|em|%/g,""));_(".sek-unit-wrapper",l).find('[data-sek-unit="'+a+'"]').trigger("click",{previewed_device_switched:!0}),l.find('.sek-ui-button[data-sek-unit="'+a+'"]').addClass("is-selected").attr("aria-pressed",!0),d.val(s).trigger("input",{previewed_device_switched:!0})};s.czr_sektions.maybeSetupDeviceSwitcherForInput.call(c),c.css_unit=new s.Value(m.isEmpty(i())?"px":a(i()));var o='<button type="button" class="button sek-reset-button sek-float-right">'+sektionsLocalizedData.i18n.Reset+"</button>";c.container.find(".customize-control-title").append(o),c.css_unit.bind(function(e,t,i){m.isObject(i)&&!0===i.previewed_device_switched||d.trigger("input")}),r.on("input",function(e){d.val(_(this).val()).trigger("input")}),d.on("input",function(e,t){var i,n=s.previewedDevice()||"desktop",o=_(this).val()+a(c.css_unit());(i=_.extend(!0,{},m.isObject(c())?c():{}))[n]=_.extend(!0,{},i[n]||{}),m.isString(o)&&!m.isEmpty(o)&&(i[n]=o),(m.isEmpty(t)||m.isObject(t)&&!0!==t.previewed_device_switched)&&c(i),r.val(_(this).val())}),l.on("click",".sek-ui-button",function(e,t){e.stopPropagation(),l.find(".sek-ui-button").removeClass("is-selected").attr("aria-pressed",!1),_(this).addClass("is-selected").attr("aria-pressed",!0),l.find("input[data-czrtype]").data("sek-unit",_(this).data("sek-unit")),c.css_unit(_(this).data("sek-unit"),t)}),c.previewedDevice.bind(function(e){try{n(e)}catch(e){s.errare("Error when firing syncWithPreviewedDevice for input type range_with_unit_picker_device_switcher for input id "+c.id,e)}}),c.container.on("click",".sek-reset-button",function(e){var t=s.previewedDevice(),i=_.extend(!0,{},m.isObject(c())?c():{});m.isEmpty(i[t])||(i=m.omit(i,t),c(i),n(s.previewedDevice()))}),r.val(d.val()||0);try{n(s.previewedDevice())}catch(e){s.errare("Error when firing syncWithPreviewedDevice for input type range_with_unit_picker_device_switcher for input id "+c.id,e)}}})}(wp.customize,jQuery,_),function(g,h,k){g.czrInputMap=g.czrInputMap||{},h.extend(g.czrInputMap,{borders:function(e){var s=this,c=h(".sek-borders",s.container),l=c.find('input[type="number"]'),d=c.find('input[type="range"]'),u=c.find(".sek-alpha-color-input"),p=function(e){return k.contains(["px","em","%"],e)||(g.errare("borders => error : invalid unit for input "+s.id,e),e="px"),e},_=function(e){return k.isEmpty(e)||!k.isString(e)?"16":e.replace(/px|em|%/g,"")},m=function(e){return k.isEmpty(e)||!k.isString(e)?"px":e.replace(/[0-9]|\.|,/g,"")},t=g.czr_sektions.getInputRegistrationParams(s.id,s.module.module_type),f=k.isEmpty(t)||k.isEmpty(t.default)?{}:t.default;s.cssBorderTypes=["top","left","right","bottom"];var i,n,o=function(){var e=s(),t="px";return k.isObject(e)&&k.has(e,"_all_")&&k.isObject(e._all_)&&!k.isEmpty(e._all_.wght)&&(t=p(m(e._all_.wght))),t},r=function(){var e=s(),t="#000000";return k.isObject(e)&&k.has(e,"_all_")&&k.isObject(e._all_)&&!k.isEmpty(e._all_.col)&&(t=e._all_.col),t},a=function(e){if(!k.contains(k.union(s.cssBorderTypes,["_all_"]),e))throw new Error("Error in syncWithBorderType : the border type must be one of those values '_all_', 'top', 'left', 'right', 'bottom'");var t=s(),i={},n=h.extend(!0,{},f);k.isObject(t)?i=h.extend(!0,{},t):k.isString(t)&&(i={_all_:{wght:t}});var o,r,a=function(e,t){var i,n=h.extend(!0,{},f);if(!k.has(n,"_all_"))throw new Error("Error when firing getCurrentBorderTypeOrAllValue : the default value of the borders input must be php registered as an array formed : array( 'wght' => '1px', 'col' => '#000000' )");return i=k.isObject(e)&&k.has(e,"_all_")?k.extend(n._all_,e._all_):n._all_,k.has(e,t)&&k.isObject(e[t])?k.extend(i,e[t]):n._all_}(i=h.extend(n,i),e);if(k.isEmpty(a)||!k.isObject(a)||k.isEmpty(a.wght)||k.isEmpty(a.col))throw new Error("Error in syncWithBorderType : getCurrentBorderTypeOrAllValue must return an object formed : array( 'wght' => '1px', 'col' => '#000000' )");o=m(a.wght),r=_(a.wght),h(".sek-unit-wrapper",c).find('[data-sek-unit="'+o+'"]').trigger("click",{border_type_switched:!0}),c.find('.sek-ui-button[data-sek-unit="'+o+'"]').addClass("is-selected").attr("aria-pressed",!0),l.val(r).trigger("input",{border_type_switched:!0}),u.data("border_type_switched",!0),u.val(a.col).trigger("change"),u.data("border_type_switched",!1)};s.borderColor=new g.Value(k.isEmpty(r())?"#000000":r()),s.css_unit=new g.Value(k.isEmpty(o())?"px":p(o())),s.borderType=new g.Value("_all_"),l.val((i=s(),n=1,k.isObject(i)&&k.has(i,"_all_")&&k.isObject(i._all_)&&!k.isEmpty(i._all_.wght)&&(n=_(i._all_.wght)),n=parseInt(n,10),(!k.isNumber(n)||n<0)&&(g.errare("Error in borders input type for module : "+s.module.module_type+" the initial border width is invalid : "+n),n=1),n)),u.val(s.borderColor()),u.wpColorPicker({palettes:!0,width:1440<=window.innerWidth?271:251,change:function(e,t){h(this).val(t.color.toString()).trigger("colorpickerchange"),s.borderColor(t.color.toString(),{border_type_switched:!0===h(this).data("border_type_switched")})},clear:function(e,t){h(this).val("").trigger("colorpickerchange"),s.borderColor("")}}),s.css_unit.bind(function(e,t,i){(!k.isObject(i)||!0!==i.border_type_switched&&!0!==i.initializing_the_unit)&&l.trigger("input",i)}),s.borderColor.bind(function(e,t,i){(!k.isObject(i)||!0!==i.border_type_switched&&!0!==i.initializing_the_color)&&l.trigger("input",i)}),s.borderType.bind(function(e){try{a(e)}catch(e){g.errare("Error when firing syncWithBorderType for input type borders for module type "+s.module.module_type,e)}}),d.on("input",function(e){l.val(h(this).val()).trigger("input")}),l.on("input",function(e,t){var i,n=s.borderType()||"_all_",o=s.borderColor(),r=h(this).val()+p(s.css_unit()),a=h.extend(!0,{},f);(i=h.extend(!0,{},k.isObject(s())?s():a))[n]=h.extend(!0,{},i[n]||a[n]),k.isString(r)&&!k.isEmpty(r)&&(i[n].wght=r),i[n].col=o,(k.isEmpty(t)||k.isObject(t)&&!0!==t.border_type_switched)&&("_all_"===n&&k.each(s.cssBorderTypes,function(e){i=k.omit(i,e)}),s(i)),d.val(h(this).val())}),c.on("click","[data-sek-unit]",function(e,t){e.preventDefault(),c.find("[data-sek-unit]").removeClass("is-selected").attr("aria-pressed",!1),h(this).addClass("is-selected").attr("aria-pressed",!0),c.find("input[data-czrtype]").data("sek-unit",h(this).data("sek-unit")),s.css_unit(h(this).data("sek-unit"),t)}),c.on("click","[data-sek-border-type]",function(e,t){e.preventDefault(),c.find("[data-sek-border-type]").removeClass("is-selected").attr("aria-pressed",!1),h(this).addClass("is-selected").attr("aria-pressed",!0);var i="_all_";try{i=h(this).data("sek-border-type")}catch(e){g.errare("borders input type => error when attaching click event",e)}s.borderType(i,t)}),s.container.on("click",".sek-reset-button",function(e){var t=s.borderType()||"_all_",i=h.extend(!0,{},k.isObject(s())?s():{});k.isEmpty(i[t])||(i=k.omit(i,t),s(i),a(t))}),d.val(l.val()||0);try{a(s.borderType())}catch(e){g.errare("Error when firing syncWithBorderType for input type borders for module type "+s.module.module_type,e)}h('[data-sek-unit="'+s.css_unit()+'"]',c).trigger("click",{initializing_the_unit:!0})}})}(wp.customize,jQuery,_),function(m,f,g){m.czrInputMap=m.czrInputMap||{},f.extend(m.czrInputMap,{border_radius:function(e){var s=this,c=f(".sek-borders",s.container),l=c.find('input[type="number"]'),a=c.find('input[type="range"]'),d=function(e){return g.contains(["px","em","%"],e)||(m.errare("border_radius => error : invalid unit for input "+s.id,e),e="px"),e},u=function(e){return g.isEmpty(e)||!g.isString(e)?"16":e.replace(/px|em|%/g,"")},p=function(e){return g.isEmpty(e)||!g.isString(e)?"px":e.replace(/[0-9]|\.|,/g,"")},t=m.czr_sektions.getInputRegistrationParams(s.id,s.module.module_type),_=g.isEmpty(t)||g.isEmpty(t.default)?{}:t.default;s.cssRadiusTypes=["top_left","top_right","bottom_right","bottom_left"];var i,n,o=function(){var e=s(),t="px";return g.isObject(e)&&g.has(e,"_all_")&&(t=d(p(e._all_))),t},r=function(e){if(!g.contains(["_all_","top_left","top_right","bottom_right","bottom_left"],e))throw new Error("Error in syncWithRadiusType : the radius type must be one of those values '_all_', 'top_left', 'top_right', 'bottom_right', 'bottom_left', => radius type => "+e);var t=s(),i={},n=f.extend(!0,{},_);g.isObject(t)?i=f.extend(!0,{},t):g.isString(t)&&(i={_all_:"0px"});var o,r,a=function(e,t){var i,n=f.extend(!0,{},_);if(!g.has(n,"_all_"))throw new Error("Error when firing getCurrentRadiusTypeOrAllValue : the default value of the border_radius input must be php registered as an array");return i=g.isObject(e)&&g.has(e,"_all_")?e._all_:n._all_,g.has(e,t)?e[t]:i}(i=f.extend(n,i),e);if(g.isEmpty(a)||!g.isString(a))throw new Error("Error in syncWithRadiusType : getCurrentRadiusTypeOrAllValue must return a string like 3em");o=p(a),r=u(a),f(".sek-unit-wrapper",c).find('[data-sek-unit="'+o+'"]').trigger("click",{radius_type_switched:!0}),c.find('.sek-ui-button[data-sek-unit="'+o+'"]').addClass("is-selected").attr("aria-pressed",!0),l.val(r).trigger("input",{radius_type_switched:!0})};s.css_unit=new m.Value(g.isEmpty(o())?"px":d(o())),s.radiusType=new m.Value("_all_"),l.val((i=s(),n=0,g.isObject(i)&&g.has(i,"_all_")&&(n=u(i._all_)),n=parseInt(n,10),(!g.isNumber(n)||n<0)&&(m.errare("Error in border_radius input type for module : "+s.module.module_type+" the initial radius is invalid : "+n),n=0),n)),s.css_unit.bind(function(e,t,i){(!g.isObject(i)||!0!==i.radius_type_switched&&!0!==i.initializing_the_unit)&&l.trigger("input",i)}),s.radiusType.bind(function(e){try{r(e)}catch(e){m.errare("Error when firing syncWithRadiusType for input type border_radius for module type "+s.module.module_type,e)}}),a.on("input",function(e){l.val(f(this).val()).trigger("input")}),l.on("input",function(e,t){var i,n=s.radiusType()||"_all_",o=f(this).val()+d(s.css_unit()),r=f.extend(!0,{},_);(i=f.extend(!0,{},g.isObject(s())?s():r))[n]=f.extend(!0,{},i[n]||r[n]),g.isString(o)&&!g.isEmpty(o)&&(i[n]=o),(g.isEmpty(t)||g.isObject(t)&&!0!==t.radius_type_switched)&&("_all_"===n&&g.each(s.cssRadiusTypes,function(e){i=g.omit(i,e)}),s(i)),a.val(f(this).val())}),c.on("click","[data-sek-unit]",function(e,t){e.preventDefault(),c.find("[data-sek-unit]").removeClass("is-selected").attr("aria-pressed",!1),f(this).addClass("is-selected").attr("aria-pressed",!0),c.find("input[data-czrtype]").data("sek-unit",f(this).data("sek-unit")),s.css_unit(f(this).data("sek-unit"),t)}),c.on("click","[data-sek-radius-type]",function(e,t){e.preventDefault(),c.find("[data-sek-radius-type]").removeClass("is-selected").attr("aria-pressed",!1),f(this).addClass("is-selected").attr("aria-pressed",!0);var i="_all_";try{i=f(this).data("sek-radius-type")}catch(e){m.errare("border_radius input type => error when attaching click event",e)}s.radiusType(i,t)}),s.container.on("click",".sek-reset-button",function(e){var t=s.radiusType()||"_all_",i=f.extend(!0,{},g.isObject(s())?s():{});g.isEmpty(i[t])||(i=g.omit(i,t),s(i),r(t))}),a.val(l.val()||0);try{r(s.radiusType())}catch(e){m.errare("Error when firing syncWithRadiusType for input type border_radius for module type "+s.module.module_type,e)}f('[data-sek-unit="'+s.css_unit()+'"]',c).trigger("click",{initializing_the_unit:!0})}})}(wp.customize,jQuery,_),function(r,a,s){r.czrInputMap=r.czrInputMap||{},a.extend(r.czrInputMap,{buttons_choice:function(e){var n=this,o=a(".sek-button-choice-wrapper",n.container),t=o.find('input[type="number"]'),i=r.czr_sektions.getInputRegistrationParams(n.id,n.module.module_type);s.isEmpty(i)||s.isEmpty(i.default)||i.default;t.val(n()),o.on("click","[data-sek-choice]",function(e,t){var i;e.stopPropagation(),o.find("[data-sek-choice]").removeClass("is-selected").attr("aria-pressed",!1),a(this).addClass("is-selected").attr("aria-pressed",!0);try{i=a(this).data("sek-choice")}catch(e){r.errare("buttons_choice input type => error when attaching click event",e)}n(i)}),a('[data-sek-choice="'+n()+'"]',o).trigger("click",{initializing_the_unit:!0})}})}(wp.customize,jQuery,_),function(n,o,r){n.czrInputMap=n.czrInputMap||{},o.extend(n.czrInputMap,{reset_button:function(e){this.container.on("click","[data-sek-reset-scope]",function(e,t){e.stopPropagation();var i=o(this).data("sek-reset-scope");!r.isEmpty(i)&&r.contains(["local","global"],i)?n.czr_sektions.updateAPISetting({action:"sek-reset-collection",scope:i}).done(function(){n.previewer.refresh(),n.previewer.trigger("sek-notify",{notif_id:"reset-success",type:"success",duration:8e3,message:["<span>","<strong>",sektionsLocalizedData.i18n["Reset complete"],"</strong>","</span>"].join("")})}).fail(function(e){n.errare("reset_button input => error when firing ::updateAPISetting",e),n.previewer.trigger("sek-notify",{notif_id:"reset-failed",type:"error",duration:8e3,message:["<span>","<strong>",sektionsLocalizedData.i18n["Reset failed"],"<br/>","<i>"+e+"</i>","</strong>","</span>"].join("")})}):n.errare("reset_button input => invalid scope provided.",i)})}})}(wp.customize,jQuery,_),function(i,r,a){i.czrInputMap=i.czrInputMap||{},r.extend(i.czrInputMap,{revision_history:function(e){var o=this;_selected_found=!1;var t=function(t){!0!==o.revisionHistorySet&&(r.when(r.Deferred(function(t){a.isEmpty(o.sek_revisionHistory)?i.czr_sektions.getRevisionHistory({is_local:"local_revisions"===o.id}).done(function(e){if(!a.isObject(e))throw new Error("_getRevisionHistory => server list is not a object");o.sek_revisionHistory=e,t.resolve(o.sek_revisionHistory)}).fail(function(e){t.reject(e)}):t.resolve(o.sek_revisionHistory)})).done(function(e){!function(e){if(!(0<o.container.find(".sek-revision-history").length))if(a.isEmpty(e))o.container.append(["<i>",sektionsLocalizedData.i18n["No revision history available for the moment."],"</i>"].join(""));else{o.container.append(r("<select/>",{class:"sek-revision-history",html:['<option value="_select_">'," -",sektionsLocalizedData.i18n.Select,"- ","</option>"].join("")}));var n=[];a.each(e,function(e,t){var i={value:t,html:e};i.value==o()&&(r.extend(i,{selected:"selected"}),_selected_found=!0),n.unshift(r("<option>",i))}),n[0].html([n[0].html(),sektionsLocalizedData.i18n["(currently published version)"]].join(" ")),a.each(n,function(e){r("select.sek-revision-history",o.container).append(e)}),r("select.sek-revision-history",o.container).selecter()}}(e),t&&!0===t.open_on_init&&a.delay(function(){try{r("select[data-czrtype]",o.container).czrSelect2("open")}catch(e){}},100)}).fail(function(e){i.errare("_getRevisionHistory => fail response =>",e)}),o.revisionHistorySet=!0)};o.container.on("change",".sek-revision-history",function(){var e=r(this).val();"_select_"!==e&&i.czr_sektions.setSingleRevision({revision_post_id:e,is_local:"local_revisions"===o.id})}),a.delay(function(){t({open_on_init:!1})},1e3)}})}(wp.customize,jQuery,_),function(p,_,m){p.czrInputMap=p.czrInputMap||{},_.extend(p.czrInputMap,{nimble_tinymce_editor:function(){var t=this,e=t.container.find("textarea").first(),i=0<e.length?e.attr("id"):null,n=p.czr_sektions.getInputRegistrationParams(t.id,t.module.module_type),o=sektionsLocalizedData.defaultToolbarBtns;if(m.isNull(i))throw new Error("setupTinyMceEditor => missing textarea for module :"+t.module.id);if(tinyMCE.get(i))throw new Error("setupTinyMceEditor => duplicate editor id.");var r,a,s=function(){return n&&n.editor_params&&!0===n.editor_params.autop},c={tinymce:{toolbar1:function(){var e=o.split(",");if(n.editor_params&&m.isArray(n.editor_params.excludedBtns)){var t=n.editor_params.excludedBtns;e=m.filter(e,function(e){return!m.contains(t,e)})}if(n.editor_params&&m.isString(n.editor_params.includedBtns)){var i=n.editor_params.includedBtns;m.isEmpty(i)||!m.isArray(sektionsLocalizedData[i])?p.errare("nimble_tinymce_editor input => invalid set of buttons provided",i):(i=sektionsLocalizedData[i],e=m.filter(e,function(e){return m.contains(i,e)}))}return e.join(",")}(),content_css:(r=wp.editor.getDefaultSettings(),a=[sektionsLocalizedData.tinyMceNimbleEditorStylesheetUrl],r&&r.tinymce&&r.tinymce.content_css&&(a=m.union(r.tinymce.content_css.split(","),a)),a.join(",")),min_height:40,height:n.editor_params&&m.isNumber(n.editor_params.height)?n.editor_params.height:p.czr_sektions.TINYMCE_EDITOR_HEIGHT},quicktags:{buttons:"strong,em,link,code"},mediaButtons:!n.editor_params||!1!==n.editor_params.media_button};c.tinymce.wpautop=s(),s()||(c.tinymce.forced_root_block=""),wp.editor.initialize(i,c);var l=tinyMCE.get(i);if(!l)throw new Error("setupTinyMceEditor => missing editor instance for module :"+t.module.id);p.czrActiveWPEditors=p.czrActiveWPEditors||[];var d=_.extend(!0,[],p.czrActiveWPEditors);d.push(i),p.czrActiveWPEditors=d;var u=function(){l.setContent(t())};l.initialized?u():l.on("init",u),l.on("input change keyup",function(e){t(l.getContent())})},detached_tinymce_editor:function(){var e,t=this,i=_("textarea#"+sektionsLocalizedData.idOfDetachedTinyMceTextArea),n=p.czr_sektions.getInputRegistrationParams(t.id,t.module.module_type);if(!(0<i.length))throw new Error("api.czrInputMap::detached_tinymce_editor => missing textarea element");if(e=i.attr("id"),window.tinymce&&(mceInstance=window.tinymce.get(e),mceInstance&&mceInstance.remove()),!window.nimbleTinyMCEPreInit||!window.nimbleTinyMCEPreInit.mceInit||!window.nimbleTinyMCEPreInit.mceInit[e])throw new Error("setupDetachedTinyMceEditor => invalid nimbleTinyMCEPreInit global var");var o,r,a=nimbleTinyMCEPreInit.mceInit[e];a.content_css=(o=wp.editor.getDefaultSettings(),r=[sektionsLocalizedData.tinyMceNimbleEditorStylesheetUrl],o&&o.tinymce&&o.tinymce.content_css&&(r=m.union(o.tinymce.content_css.split(","),r)),r.join(","));var s=t.input_parent,c=function(){var e=s();return m.isUndefined(e.autop)?n&&n.editor_params&&!0===n.editor_params.autop:e.autop};a.wpautop=c(),c()||(a.forced_root_block=""),a.toolbar1=sektionsLocalizedData.defaultToolbarBtns,a.toolbar2="",window.tinymce.init(a),window.QTags.getInstance(e);var l=tinyMCE.get(e);if(!l)throw new Error("setupDetachedTinyMceEditor => missing editor instance for module :"+t.module.id);var d=function(){var e=c()?wp.editor.autop(t()):t();l.setContent(e),p.sekEditorExpanded(!0),_(window).trigger("resize")};l.initialized?d():l.on("init",d),l.on("input change keyup keydown click SetContent BeforeSetContent",function(e){t(c()?l.getContent():wp.editor.removep(l.getContent()))}),p.sekCurrentDetachedTinyMceInput=t,i.data("czr-bound-for-detached-editor")||(i.on("input",function(e,t){p.sekCurrentDetachedTinyMceInput(_(this).val())}),i.data("czr-bound-for-detached-editor",!0))}})}(wp.customize,jQuery,_),function(_,m,f){_.czrInputMap=_.czrInputMap||{},m.extend(_.czrInputMap,{import_export:function(){var o=this,r=o.container.find('button[data-czr-action="sek-pre-import"]'),i=o.container.find("input[name=sek-import-file]"),n=_.czr_sektions.getInputRegistrationParams(o.id,o.module.module_type),s="local"===n.scope?_.czr_sektions.localSectionsSettingId():_.czr_sektions.getGlobalSectionsSettingId();i.on("change",function(e){r.toggleClass("disabled",f.isEmpty(m(this).val()))});o.container.on("click","[data-czr-action]",function(e){var i,t;switch(e.stopPropagation(),m(this).data("czr-action")){case"sek-export":if(i=!1,t=wp.customize.dirtyValues(),f.isEmpty(t)||f.each(t,function(e,t){i||(i=-1!==t.indexOf("nimble"))}),i){alert(sektionsLocalizedData.i18n["You need to publish before exporting."]);break}var n=_(s)(),o=!0;if(f.each(n.collection,function(e){o&&(f.isEmpty(e.collection)||(o=!1))}),o){alert(sektionsLocalizedData.i18n["Nothing to export."]);break}p();break;case"sek-pre-import":if(f.isEmpty(_.czr_sektions.activeLocations())){alert(sektionsLocalizedData.i18n["The current page has no available locations to import Nimble Builder sections."]);break}c({pre_import_check:!0}).done(a).fail(function(e){_.errare("sek_pre_import_checks failed",e),u(),c()});break;case"sek-import-as-is":c();break;case"sek-import-assign":c({assign_missing_locations:!0});break;case"sek-cancel-import":u()}});var a=function(e){var t=_.czr_sektions.activeLocations(),i=m.extend(!0,[],f.isArray(e.data.metas.active_locations)?e.data.metas.active_locations:[]);if(i=f.filter(i,function(e){return!f.contains(["nimble_local_header","nimble_local_footer"],e)}),f.isArray(i)&&f.isArray(t)){var n=m(i).not(t).get();f.isEmpty(n)?c():(r.hide(),o.container.find(".czr-import-dialog").slideToggle(),_.infoLog("sek-pre-import => imported locations missing in current page.",n))}else _.previewer.trigger("sek-notify",{notif_id:"import-failed",type:"info",duration:3e4,message:['<span style="color:#0075a2">',"<strong>",sektionsLocalizedData.i18n["Import failed"],"</strong>","</span>"].join("")}),u()},c=function(t){if(t=t||{},i.length<1||f.isUndefined(i[0])||!i[0].files||f.isEmpty(i.val()))_.previewer.trigger("sek-notify",{notif_id:"missing-import-file",type:"info",duration:3e4,message:['<span style="color:#0075a2">',"<strong>",sektionsLocalizedData.i18n["Missing file"],"</strong>","</span>"].join("")});else{_.notifications.remove("missing-import-file"),_.notifications.remove("import-success"),_.notifications.remove("import-failed"),_.notifications.remove("img-import-errors"),o.container.find(".sek-uploading").show();var e=new FormData;if(e.append("file_candidate",i[0].files[0]),e.append("action","sek_get_imported_file_content"),e.append("nonce",_.settings.nonce.save),f.contains(["local","global"],n.scope)){if(e.append("skope",n.scope),t.pre_import_check&&e.append("pre_import_check",t.pre_import_check),__request__=m.ajax({url:wp.ajax.settings.url,data:e,processData:!1,contentType:!1,type:"POST"}),t.pre_import_check)return m.Deferred(function(){var t=this;__request__.done(function(e){e.success||t.reject(e),l(e)||t.reject(e),t.resolve(e)}).fail(function(e){t.reject(e)}).always(function(){})});o.container.find(".sek-uploading").show(),_.previewer.send("sek-maybe-print-loader",{fullPageLoader:!0}),__request__.done(function(e){var n=function(i){return(f.isObject(i)||f.isArray(i))&&f.each(i,function(e,t){(f.isObject(e)||f.isArray(e))&&(i[t]=n(e)),"id"!==t||!f.isString(e)||0!==e.indexOf("__rep__me__")&&0!==e.indexOf("__nimble__")||(i[t]=sektionsLocalizedData.optPrefixForSektionsNotSaved+_.czr_sektions.guid())}),i};e.data.data.collection=n(e.data.data.collection),d(e,t)}).fail(function(e){_.errare("sek-import input => ajax error",e),_.previewer.trigger("sek-notify",{notif_id:"import-failed",type:"error",duration:3e4,message:["<span>","<strong>",sektionsLocalizedData.i18n["Import failed, file problem"],"</strong>","</span>"].join("")})}).always(u)}else _.errare("sek-import input => invalid scope provided",n.scope)}},l=function(e){var t=!0,i=e.data,n=null;e.success||(n=[sektionsLocalizedData.i18n["Import failed"],i].join(" : ")),f.isNull(n)&&!f.isObject(i)&&(n=sektionsLocalizedData.i18n["Import failed, invalid file content"]);var o=i.data,r=i.metas,a=i.img_errors;return f.isNull(n)&&!f.isObject(o)&&(n=sektionsLocalizedData.i18n["Import failed, invalid file content"]),f.isNull(n)&&!f.isObject(r)&&(n=sektionsLocalizedData.i18n["Import failed, invalid file content"]),f.isNull(n)&&f.isEqual(_(s)(),o)&&(_.infoLog("sek-import input => Setting unchanged"),t=!1),f.isNull(n)||(_.errare("sek-import input => invalid data sent from server",i),_.previewer.trigger("sek-notify",{notif_id:"import-failed",type:"error",duration:3e4,message:["<span>","<strong>",n,"</strong>","</span>"].join("")}),t=!1),f.isEmpty(a)||_.previewer.trigger("sek-notify",{notif_id:"img-import-errors",type:"info",duration:6e4,message:['<span style="color:#0075a2">',["<strong>"+sektionsLocalizedData.i18n["Some image(s) could not be imported"]+"</strong><br/>",'<span style="font-size:11px">'+a+"</span>"].join(" : "),"</span>"].join("")}),t},d=function(e,t){t=t||{},l(e)?(_.czr_sektions.updateAPISetting({action:"sek-import-from-file",scope:"global"===n.scope,imported_content:e.data,assign_missing_locations:t.assign_missing_locations,keep_existing_sections:o.input_parent.czr_Input("keep_existing_sections")()}).done(function(){"local"===n.scope&&_.czr_sektions.generateUI({action:"sek-generate-local-skope-options-ui",clean_settings:!0}),_.previewer.refresh(),_.previewer.trigger("sek-notify",{notif_id:"import-success",type:"success",duration:3e4,message:["<span>","<strong>",sektionsLocalizedData.i18n["File successfully imported"],"</strong>","</span>"].join("")})}).fail(function(e){_.errare("sek-import input => error when firing ::updateAPISetting",e),_.previewer.trigger("sek-notify",{notif_id:"import-failed",type:"error",duration:3e4,message:["<span>","<strong>",[sektionsLocalizedData.i18n["Import failed"],e].join(" : "),"</strong>","</span>"].join("")})}),_.previewer.refresh()):u()},u=function(){_.previewer.send("sek-clean-loader",{cleanFullPageLoader:!0}),o.container.find(".sek-uploading").hide(),i.val("").trigger("change"),o.container.find(".czr-import-dialog").hide(),r.show()},p=function(){var i=[],e={sek_export_nonce:_.settings.nonce.save,skope_id:_.czr_skopeBase.getSkopeProperty("skope_id"),active_locations:_.czr_sektions.activeLocations()};f.each(e,function(e,t){i.push(encodeURIComponent(t)+"="+encodeURIComponent(e))}),wp.ajax.post("sek_pre_export_checks",{nonce:_.settings.nonce.save,sek_export_nonce:_.settings.nonce.save,skope_id:_.czr_skopeBase.getSkopeProperty("skope_id"),active_locations:_.czr_sektions.activeLocations()}).done(function(){m(window).off("beforeunload"),window.location.href=[sektionsLocalizedData.customizerURL,"?",i.join("&")].join(""),m(window).on("beforeunload")}).fail(function(e){_.previewer.trigger("sek-notify",{notif_id:"import-failed",type:"error",duration:3e4,message:["<span>","<strong>",[sektionsLocalizedData.i18n["Export failed"],encodeURIComponent(e)].join(" "),"</strong>","</span>"].join("")})})}}})}(wp.customize,jQuery,_),function(t,e,i){t.czrInputMap=t.czrInputMap||{},e.extend(t.czrInputMap,{simpleselect:function(e){t.czr_sektions.setupSelectInput.call(this,e)},multiselect:function(e){t.czr_sektions.setupSelectInput.call(this,e)}})}(wp.customize,jQuery,_),function(s,c,l){s.czrInputMap=s.czrInputMap||{},c.extend(s.czrInputMap,{category_picker:function(e){var n=this,o=c("select[data-czrtype]",n.container),r=function(){var e=n();return e=l.isString(e)?[e]:e,l.isArray(e)?e:[]},t=function(t){!0!==n.catCollectionSet&&(c.when(c.Deferred(function(i){l.isEmpty(s.czr_sektions.post_categories)?wp.ajax.post("sek_get_post_categories",{nonce:s.settings.nonce.save}).done(function(e){l.isArray(e)||s.errare(n.id+" => error => invalid category collection sent by server");var t={};l.each(e,function(e){l.isEmpty(e.slug)||l.isEmpty(e.name)?i.reject("missing slug or name for at least one category"):t[e.slug]=e.name}),s.czr_sektions.post_categories=t,i.resolve(s.czr_sektions.post_categories)}).fail(function(e){i.reject(e)}):i.resolve(s.czr_sektions.post_categories)})).done(function(e){i(e),t&&!0===t.open_on_init&&l.delay(function(){try{o.czrSelect2("open")}catch(e){}},100)}).fail(function(e){s.errare(n.id+" => fail response when _getCategoryCollection()",e)}),n.catCollectionSet=!0)},i=function(e){l.each(e,function(e,t){var i={value:t,html:e};l.contains(r(),t)&&c.extend(i,{selected:"selected"}),o.append(c("<option>",i))}),o.czrSelect2({closeOnSelect:!0,templateSelection:function(e){return e.text.replace(/\u2013|\u2014/g,"")}}),o.on("change",function(){0===c(this).find("option:selected").length&&n([])})},a={};l.each(r(),function(e){a[e]=(e+"").replace(/-/g," ")}),i(a),n.container.on("click",function(){!0!==n.catCollectionSet&&(o.czrSelect2("destroy"),c.when(o.find("option").remove()).done(function(){t({open_on_init:!0})}))})}})}(wp.customize,jQuery,_),function(r,a,e){r.czrInputMap=r.czrInputMap||{},a.extend(r.czrInputMap,{grid_layout:function(e){var n=this,o=a(".sek-grid-layout-wrapper",n.container);o.find('input[type="hidden"]').val(n()),o.on("click","[data-sek-grid-layout]",function(e,t){var i;e.stopPropagation(),o.find("[data-sek-grid-layout]").removeClass("selected").attr("aria-pressed",!1),a(this).addClass("selected").attr("aria-pressed",!0);try{i=a(this).data("sek-grid-layout")}catch(e){r.errare(n.type+" => error when attaching click event",e)}n(i)}),a('[data-sek-grid-layout="'+n()+'"]',o).trigger("click")}})}(wp.customize,jQuery,_),function(o,r,a){o.czrModuleMap=o.czrModuleMap||{},r.extend(o.czrModuleMap,{sek_content_type_switcher_module:{crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("sek_content_type_switcher_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:a.extend({id:"",title:""},o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_content_type_switcher_module"))}}),o.czrInputMap=o.czrInputMap||{},r.extend(o.czrInputMap,{content_type_switcher:function(e){var i,n=this;if(!o.section.has(n.module.control.section()))throw new Error("api.czrInputMap.content_type_switcher => section not registered");i=o.section(n.module.control.section()),n.container.on("click","[data-sek-content-type]",function(e){e.preventDefault(),n.container.find("[data-sek-content-type]").removeClass("is-selected").attr("aria-pressed",!1),r(this).addClass("is-selected").attr("aria-pressed",!0),o.czr_sektions.currentContentPickerType(r(this).data("sek-content-type"))});var t=function(t){n.container.find('[data-sek-content-type="'+(t||"module")+'"]').trigger("click"),a.each(i.controls(),function(e){a.isUndefined(e.content_type)||e.active(t===e.content_type)})};o.czr_sektions.currentContentPickerType=o.czr_sektions.currentContentPickerType||new o.Value(n()),t(o.czr_sektions.currentContentPickerType()),o.czr_sektions.currentContentPickerType.bind(function(e){t(e)})}})}(wp.customize,jQuery,_),function(t,e,i){t.czrModuleMap=t.czrModuleMap||{},e.extend(t.czrModuleMap,{sek_module_picker_module:{crud:!1,name:t.czr_sektions.getRegisteredModuleProperty("sek_module_picker_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},t.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_module_picker_module"))}}),t.czrInputMap=t.czrInputMap||{},e.extend(t.czrInputMap,{module_picker:function(e){t.czr_sektions.trigger("sek-refresh-dragzones",{type:"module",input_container:this.container})}})}(wp.customize,jQuery,_),function(t,e,i){t.czrModuleMap=t.czrModuleMap||{};var n=sektionsLocalizedData.presetSectionsModules;i.isArray(n)&&!i.isEmpty(n)?(sektionsLocalizedData.isNimbleHeaderFooterEnabled||(n=i.filter(n,function(e){return!i.contains(["sek_header_sec_picker_module","sek_footer_sec_picker_module"],e)})),i.each(n,function(e){t.czrModuleMap[e]={crud:!1,name:t.czr_sektions.getRegisteredModuleProperty(e,"name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.extend({id:"",title:""},t.czr_sektions.getDefaultItemModelFromRegisteredModuleData(e))}})):t.errare("api.czrModuleMap => error when adding section modules")}(wp.customize,jQuery,_),function(r,e,a){var t={initialize:function(e,t){this.inputConstructor=r.CZRInput.extend({initialize:function(e,t){var i=this;r.CZRInput.prototype.initialize.call(i,e,t),i.isReady.then(function(){i.renderUserSavedSections(),r.czr_sektions.trigger("sek-refresh-dragzones",{type:"preset_section",input_container:i.container})})},renderUserSavedSections:function(){var i="",n=this.container.find(".sek-content-type-wrapper"),o="";a.each(sektionsLocalizedData.userSavedSektions,function(e,t){try{o=function(e){var t=e.getDate(),i=e.getMonth(),n=e.getFullYear();e.getHours(),e.getMinutes(),e.getSeconds();return[t,["January","February","March","April","May","June","July","August","September","October","November","December"][i],n].join(" ")}(new Date(e.creation_date.replace(/-/g,"/")))}catch(e){r.errare("::renderUserSavedSections => formatDate => error",e)}i=['<div class="sek-user-section-wrapper">','<div class="sek-saved-section-title"><i class="sek-remove-user-section far fa-trash-alt"></i>'+e.title+"</div>",'<div draggable="true" data-sek-is-user-section="true" data-sek-section-type="'+e.type+'" data-sek-content-type="preset_section" data-sek-content-id="'+t+'" style="" title="'+e.title+'">','<div class="sek-overlay"></div>','<div class="sek-saved-section-description">'+e.description+"</div>",a.isEmpty(o)?"":'<div class="sek-saved-section-date"><i class="far fa-calendar-alt"></i> @missi18n Created : '+o+"</div>","</div>","</div>"].join(""),n.append(i)})}}),r.CZRDynModule.prototype.initialize.call(this,e,t)}};r.czrModuleMap=r.czrModuleMap||{},sektionsLocalizedData.isSavedSectionEnabled&&e.extend(r.czrModuleMap,{sek_my_sections_sec_picker_module:{mthds:t,crud:!1,name:r.czr_sektions.getRegisteredModuleProperty("sek_my_sections_sec_picker_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_my_sections_sec_picker_module")}})}(wp.customize,jQuery,_),function(t,e,i){t.czrInputMap=t.czrInputMap||{},e.extend(t.czrInputMap,{section_picker:function(e){t.czr_sektions.trigger("sek-refresh-dragzones",{type:"preset_section",input_container:this.container})}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_level_anchor_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_level_anchor_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_anchor_module"))}})}(wp.customize,jQuery,_),function(r,e,a){var t={initialize:function(e,t){this.itemConstructor=r.CZRItem.extend(this.CZRItemConstructor||{}),r.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!a.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){r.errorLog("item.setInputVisibilityDeps() : "+e)}}),r.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,o=n.module;n.czr_Input.each(function(i){switch(i.id){case"bg-image":a.each(["bg-attachment","bg-scale","bg-repeat","bg-apply-overlay","bg-color-overlay","bg-opacity-overlay","bg-parallax","bg-parallax-force"],function(t){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"bg-color-overlay":case"bg-opacity-overlay":e=!a.isEmpty(i()+"")&&r.CZR_Helpers.isChecked(n.czr_Input("bg-apply-overlay")());break;case"bg-parallax-force":e=!a.isEmpty(i()+"")&&r.CZR_Helpers.isChecked(n.czr_Input("bg-parallax")());break;case"bg-scale":case"bg-repeat":e=!a.isEmpty(i()+"")&&!r.CZR_Helpers.isChecked(n.czr_Input("bg-parallax")());break;default:e=!a.isEmpty(i()+"")}return e})}catch(e){r.errare(o.id+" => error in setInputVisibilityDeps",e)}});break;case"bg-apply-overlay":a.each(["bg-color-overlay","bg-opacity-overlay"],function(e){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return!a.isEmpty(n.czr_Input("bg-image")()+"")&&r.CZR_Helpers.isChecked(i())})}catch(e){r.errare(o.id+" => error in setInputVisibilityDeps",e)}});break;case"bg-parallax":a.each(["bg-parallax-force","bg-scale","bg-repeat"],function(t){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"bg-parallax-force":e=!a.isEmpty(n.czr_Input("bg-image")()+"")&&r.CZR_Helpers.isChecked(i());break;case"bg-repeat":case"bg-scale":e=!a.isEmpty(n.czr_Input("bg-image")()+"")&&!r.CZR_Helpers.isChecked(i())}return e})}catch(e){r.errare(o.id+" => error in setInputVisibilityDeps",e)}}),i.bind(function(e){r.CZR_Helpers.isChecked(i())&&r.CZR_Helpers.isChecked(n.czr_Input("bg-attachment")())&&n.czr_Input("bg-attachment").container.find("input[type=checkbox]").trigger("click")});break;case"bg-attachment":i.bind(function(e){r.CZR_Helpers.isChecked(i())&&r.CZR_Helpers.isChecked(n.czr_Input("bg-parallax")())&&n.czr_Input("bg-parallax").container.find("input[type=checkbox]").trigger("click")})}})}}};r.czrModuleMap=r.czrModuleMap||{},e.extend(r.czrModuleMap,{sek_level_bg_module:{mthds:t,crud:!1,name:r.czr_sektions.getRegisteredModuleProperty("sek_level_bg_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:a.extend({id:"",title:""},r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_bg_module"))}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var i=this.module;this.czr_Input.each(function(t){switch(t.id){case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{sek_level_border_module:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("sek_level_border_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.extend({id:"",title:""},n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_border_module"))}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(e){switch(e.id){case"use-custom-breakpoint":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"custom-breakpoint",function(){return e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_level_breakpoint_module:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_level_breakpoint_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_breakpoint_module"))}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var i=this.module;this.czr_Input.each(function(t){switch(t.id){case"height-type":o.each(["custom-height","overflow_hidden"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"custom"===t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{sek_level_height_module:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("sek_level_height_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.extend({id:"",title:""},n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_height_module"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_level_visibility_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_level_visibility_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_visibility_module"))}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(e){switch(e.id){case"width-type":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"custom-width",function(){return"custom"===e()}),i.czr_sektions.scheduleVisibilityOfInputId.call(e,"h_alignment",function(){return"custom"===e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_level_width_module:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_level_width_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_width_module"))}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(e){switch(e.id){case"use-custom-outer-width":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"outer-section-width",function(){return e()});break;case"use-custom-inner-width":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"inner-section-width",function(){return e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_level_width_section:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_level_width_section","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_width_section"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_level_spacing_module:{mthds:"",crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_level_spacing_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_spacing_module"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_template:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_template","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_template"))}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(e){switch(e.id){case"use-custom-outer-width":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"outer-section-width",function(){return e()});break;case"use-custom-inner-width":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"inner-section-width",function(){return e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_local_widths:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_local_widths","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:n.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_widths"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_custom_css:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_custom_css","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_custom_css"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_reset:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_reset","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_reset"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_performances:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_performances","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_performances"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_header_footer:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_header_footer","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_header_footer"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_revisions:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_revisions","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_revisions"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_imp_exp:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_imp_exp","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_imp_exp"))}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(e){switch(e.id){case"use-custom-breakpoint":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"global-custom-breakpoint",function(){return e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_global_breakpoint:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_global_breakpoint","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:n.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_breakpoint"))}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(e){switch(e.id){case"use-custom-outer-width":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"outer-section-width",function(){return e()});break;case"use-custom-inner-width":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"inner-section-width",function(){return e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_global_widths:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_global_widths","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:n.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_widths"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_global_performances:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_global_performances","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_performances"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_global_header_footer:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_global_header_footer","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_header_footer"))}})}(wp.customize,jQuery,_),function(r,e,a){var t={initialize:function(e,t){this.itemConstructor=r.CZRItem.extend(this.CZRItemConstructor||{}),r.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!a.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){r.errorLog("item.setInputVisibilityDeps() : "+e)}}),r.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,o=n.module;n.czr_Input.each(function(i){switch(i.id){case"enable":a.each(["public_key","private_key","badge","show_failure_message","failure_message","score"],function(t){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"failure_message":e=i()&&n.czr_Input("show_failure_message")();break;default:e=i()}return e})}catch(e){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}});break;case"show_failure_message":a.each(["failure_message"],function(e){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()&&n.czr_Input("enable")()})}catch(e){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};r.czrModuleMap=r.czrModuleMap||{},e.extend(r.czrModuleMap,{sek_global_recaptcha:{mthds:t,crud:!1,name:r.czr_sektions.getRegisteredModuleProperty("sek_global_recaptcha","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:a.extend({id:"",title:""},r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_recaptcha"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_global_revisions:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_global_revisions","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_revisions"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_global_reset:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_global_reset","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_reset"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_global_beta_features:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_global_beta_features","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_beta_features"))}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.itemConstructor=o.CZRItem.extend(this.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(this,e,t),this.bind("set_default_content_picker_options",function(e){return e.defaultContentPickerOption.defaultOption={title:'<span style="font-weight:bold">'+sektionsLocalizedData.i18n["Set a custom url"]+"</span>",type:"",type_label:"",object:"",id:"_custom_",url:""},e})},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,t=n.module;n.czr_Input.each(function(i){switch(i.id){case"img":o.czr_sektions.scheduleVisibilityOfInputId.call(i,"img-size",function(){return!r.isEmpty(i()+"")&&r.isNumber(i())});break;case"link-to":r.each(["link-pick-url","link-custom-url","link-target"],function(t){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"link-custom-url":e="url"===i()&&"_custom_"==n.czr_Input("link-pick-url")().id;break;case"link-pick-url":e="url"===i();break;case"link-target":e=!r.contains(["no-link","img-lightbox"],i())}return e})}catch(e){o.errare("Image module => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":o.czr_sektions.scheduleVisibilityOfInputId.call(i,"link-custom-url",function(){return"_custom_"==i().id&&"url"==n.czr_Input("link-to")()});break;case"border-type":r.each(["borders"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return"none"!==i()})}catch(e){o.errare(t.id+" => error in setInputVisibilityDeps",e)}});break;case"use_custom_width":r.each(["custom_width"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare("Image module => error in setInputVisibilityDeps",e)}});break;case"use_custom_title_attr":r.each(["heading_title"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare("Image module => error in setInputVisibilityDeps",e)}})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_image_main_settings_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_image_main_settings_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_image_main_settings_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var e=this,i=e.module;e.czr_Input.each(function(t){switch(t.id){case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_image_borders_corners_child:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_image_borders_corners_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_image_borders_corners_child")}})}(wp.customize,jQuery,_),function(n,e,t){var i={initialize:function(e,t){this.inputConstructor=n.CZRInput.extend(this.CZRTextEditorInputMths||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRTextEditorInputMths:{initialize:function(e,t){var i=this;"detached_tinymce_editor"==i.type&&i.isReady.then(function(){i.container.find('[data-czr-action="open-tinymce-editor"]').trigger("click")}),n.CZRInput.prototype.initialize.call(i,e,t)}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_tinymce_child:{mthds:i,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_tinymce_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_tinymce_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_simple_html_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_simple_html_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_html_module")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(i){switch(i.id){case"img-type":o.each(["img-id","img-size"],function(t){try{n.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"img-id":e="custom"===i();break;default:e="none"!==i()}return e})}catch(e){n.errare("Featured pages module => error in setInputVisibilityDeps",e)}});break;case"content-type":o.each(["content-custom-text"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return"custom"===i()})}catch(e){n.errare("Featured pages module => error in setInputVisibilityDeps",e)}});break;case"btn-display":o.each(["btn-custom-text"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){n.errare("Featured pages module => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_featured_pages_module:{mthds:t,crud:n.czr_sektions.getRegisteredModuleProperty("czr_featured_pages_module","is_crud"),hasPreItem:!1,refresh_on_add_item:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_featured_pages_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_featured_pages_module")}})}(wp.customize,jQuery,_),function(r,e,a){var t={initialize:function(e,t){this.itemConstructor=r.CZRItem.extend(this.CZRItemConstructor||{}),this.bind("set_default_content_picker_options",function(e){return e.defaultContentPickerOption.defaultOption={title:'<span style="font-weight:bold">'+sektionsLocalizedData.i18n["Set a custom url"]+"</span>",type:"",type_label:"",object:"",id:"_custom_",url:""},e}),r.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!a.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){r.errorLog("item.setInputVisibilityDeps() : "+e)}}),r.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,o=n.module;n.czr_Input.each(function(i){switch(i.id){case"link-to":a.each(["link-pick-url","link-custom-url","link-target"],function(t){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"link-custom-url":e="url"==i()&&"_custom_"==n.czr_Input("link-pick-url")().id;break;default:e="url"==i()}return e})}catch(e){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":r.czr_sektions.scheduleVisibilityOfInputId.call(i,"link-custom-url",function(){return"_custom_"==i().id&&"url"==n.czr_Input("link-to")()});break;case"use_custom_color_on_hover":a.each(["color_hover"],function(e){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};r.czrModuleMap=r.czrModuleMap||{},e.extend(r.czrModuleMap,{czr_icon_settings_child:{mthds:t,crud:!1,name:r.czr_sektions.getRegisteredModuleProperty("czr_icon_settings_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_icon_settings_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var e=this,i=e.module;e.czr_Input.each(function(t){switch(t.id){case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_icon_spacing_border_child:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_icon_spacing_border_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_icon_spacing_border_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.itemConstructor=o.CZRItem.extend(this.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(this,e,t),this.bind("set_default_content_picker_options",function(e){return e.defaultContentPickerOption.defaultOption={title:'<span style="font-weight:bold">'+sektionsLocalizedData.i18n["Set a custom url"]+"</span>",type:"",type_label:"",object:"",id:"_custom_",url:""},e})},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this;n.module;n.czr_Input.each(function(i){switch(i.id){case"link-to":r.each(["link-pick-url","link-custom-url","link-target"],function(t){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"link-custom-url":e=i()&&"_custom_"==n.czr_Input("link-pick-url")().id;break;case"link-pick-url":case"link-target":e=i()}return e})}catch(e){o.errare("Heading module => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":o.czr_sektions.scheduleVisibilityOfInputId.call(i,"link-custom-url",function(){return"_custom_"==i().id&&!0===n.czr_Input("link-to")()})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_heading_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_heading_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_heading_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_heading_spacing_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_heading_spacing_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_heading_spacing_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_divider_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_divider_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_divider_module")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_spacer_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_spacer_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_spacer_module")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_map_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_map_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_map_module")}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRButtonItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRButtonItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(t){switch(t.id){case"quote_design":n.each(["border_width_css","border_color_css"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"border-before"==t()})}catch(e){i.errare("Quote module => error in setInputVisibilityDeps",e)}}),n.each(["icon_color_css","icon_size_css"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"quote-icon-before"==t()})}catch(e){i.errare("Quote module => error in setInputVisibilityDeps",e)}})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_quote_design_child:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("czr_quote_design_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_quote_design_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_quote_quote_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_quote_quote_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_quote_quote_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_quote_cite_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_quote_cite_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_quote_cite_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.itemConstructor=o.CZRItem.extend(this.CZRItemConstructor||{}),this.bind("set_default_content_picker_options",function(e){return e.defaultContentPickerOption.defaultOption={title:'<span style="font-weight:bold">'+sektionsLocalizedData.i18n["Set a custom url"]+"</span>",type:"",type_label:"",object:"",id:"_custom_",url:""},e}),o.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this;n.module;n.czr_Input.each(function(i){switch(i.id){case"link-to":r.each(["link-pick-url","link-custom-url","link-target"],function(t){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"link-custom-url":e="url"==i()&&"_custom_"==n.czr_Input("link-pick-url")().id;break;default:e="url"==i()}return e})}catch(e){o.errare("Button module => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":o.czr_sektions.scheduleVisibilityOfInputId.call(i,"link-custom-url",function(){return"_custom_"==i().id&&"url"==n.czr_Input("link-to")()});break;case"icon":o.czr_sektions.scheduleVisibilityOfInputId.call(i,"icon-side",function(){return!r.isEmpty(i())})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_btn_content_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_btn_content_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_btn_content_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var e=this,i=e.module;e.czr_Input.each(function(t){switch(t.id){case"use_custom_bg_color_on_hover":o.each(["bg_color_hover"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){n.errare("Button module => error in setInputVisibilityDeps",e)}});break;case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}});break;case"use_box_shadow":o.each(["push_effect"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){n.errare("Button module => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_btn_design_child:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_btn_design_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_btn_design_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.itemConstructor=o.CZRItem.extend(this.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this.module;this.czr_Input.each(function(i){switch(i.id){case"layout":r.each(["columns","img_column_width","has_tablet_breakpoint","has_mobile_breakpoint"],function(t){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"columns":e="grid"===i();break;case"has_tablet_breakpoint":case"has_mobile_breakpoint":case"img_column_width":e="list"===i()}return e})}catch(e){o.errare(n.module_type+" => error in setInputVisibilityDeps",e)}});break;case"categories":r.each(["must_have_all_cats"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){var e=i();return r.isArray(e)&&1<e.length})}catch(e){o.errare(n.module_type+" => error in setInputVisibilityDeps",e)}});break;case"custom_grid_spaces":r.each(["column_gap","row_gap"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare(n.module_type+" => error in setInputVisibilityDeps",e)}});break;case"show_excerpt":r.each(["excerpt_length"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare(n.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_post_grid_main_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_post_grid_main_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_post_grid_main_child")}})}(wp.customize,jQuery,_),function(r,e,a){var t={initialize:function(e,t){this.itemConstructor=r.CZRItem.extend(this.CZRItemConstructor||{}),r.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!a.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){r.errorLog("item.setInputVisibilityDeps() : "+e)}}),r.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,o=n.module;n.czr_Input.each(function(i){switch(i.id){case"show_thumb":a.each(["img_size","img_has_custom_height","img_height","border_radius_css","use_post_thumb_placeholder"],function(t){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"img_height":e=i()&&n.czr_Input("img_has_custom_height")();break;default:e=i()}return e})}catch(e){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}});break;case"img_has_custom_height":a.each(["img_height"],function(e){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()&&n.czr_Input("show_thumb")()})}catch(e){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};r.czrModuleMap=r.czrModuleMap||{},e.extend(r.czrModuleMap,{czr_post_grid_thumb_child:{mthds:t,crud:!1,name:r.czr_sektions.getRegisteredModuleProperty("czr_post_grid_thumb_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_post_grid_thumb_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_post_grid_metas_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_post_grid_metas_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_post_grid_metas_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_post_grid_fonts_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_post_grid_fonts_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_post_grid_fonts_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_menu_content_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_menu_content_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_menu_content_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_menu_mobile_options:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_menu_mobile_options","name"),has_mod_opt:!1,ready_on_section_expanded:!0,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_menu_mobile_options")}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(t){switch(t.id){case"show_name_field":n.each(["name_field_label","name_field_required"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){i.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"show_subject_field":n.each(["subject_field_label","subject_field_required"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){i.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"show_message_field":n.each(["message_field_label","message_field_required"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){i.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,"link-custom-url",function(){return t()})}catch(e){i.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_simple_form_fields_child:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("czr_simple_form_fields_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_fields_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var i=this.module;this.czr_Input.each(function(t){switch(t.id){case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_simple_form_design_child:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_simple_form_design_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_design_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var i=this.module;this.czr_Input.each(function(t){switch(t.id){case"use_custom_bg_color_on_hover":o.each(["bg_color_hover"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){n.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}});break;case"use_box_shadow":o.each(["push_effect"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){n.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_simple_form_button_child:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_simple_form_button_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_button_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_simple_form_fonts_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_simple_form_fonts_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_fonts_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_simple_form_submission_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_simple_form_submission_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_submission_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.itemConstructor=o.CZRItem.extend(this.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this;n.module;n.czr_Input.each(function(i){switch(i.id){case"use_custom_bg_color_on_hover":r.each(["bg_color_hover"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare("Button module => error in setInputVisibilityDeps",e)}});break;case"use_box_shadow":r.each(["push_effect"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare("Button module => error in setInputVisibilityDeps",e)}});break;case"link-to":r.each(["link-pick-url","link-custom-url","link-target"],function(t){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"link-custom-url":e="url"==i()&&"_custom_"==n.czr_Input("link-pick-url")().id;break;default:e="url"==i()}return e})}catch(e){o.errare("Button module => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":o.czr_sektions.scheduleVisibilityOfInputId.call(i,"link-custom-url",function(){return"_custom_"==i().id&&"url"==n.czr_Input("link-to")()})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_font_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_font_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_font_child")}})}(wp.customize,jQuery,_),function(i,e,t){var n={initialize:function(e,t){this.bind("nimble-set-select-input-options",function(e){e.params=sektionsLocalizedData.registeredWidgetZones}),i.CZRDynModule.prototype.initialize.call(this,e,t)}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_widget_area_module:{mthds:n,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("czr_widget_area_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_widget_area_module")}})}(wp.customize,jQuery,_);
1
+ var CZRSeksPrototype=CZRSeksPrototype||{};!function(n,r){r.extend(CZRSeksPrototype,{initialize:function(){var e=this;if(_.isUndefined(window.sektionsLocalizedData))throw new Error("CZRSeksPrototype => missing localized server params sektionsLocalizedData");if(!_.isFunction(n.czr_activeSkopes))throw new Error("CZRSeksPrototype => api.czr_activeSkopes");e.SECTION_ID_FOR_GLOBAL_OPTIONS="__globalOptionsSectionId",e.SECTION_ID_FOR_LOCAL_OPTIONS="__localOptionsSection",e.SECTION_ID_FOR_CONTENT_PICKER="__content_picker__",e.MAX_NUMBER_OF_COLUMNS=12,e.SETTING_UPDATE_BUFFER=100,e.TINYMCE_EDITOR_HEIGHT=100,e.defaultLocalSektionSettingValue=e.getDefaultSektionSettingValue("local"),e.localSectionsSettingId=new n.Value({}),e.registered=new n.Value([]),n.bind("ready",function(){e.doSektionThinksOnApiReady()}),n.bind("save-request-params",function(e){r.extend(e,{local_skope_id:n.czr_skopeBase.getSkopeProperty("skope_id")})}),n.bind("sek-before-clean-registered",function(){_.isArray(n.czrActiveWPEditors)&&(_.each(n.czrActiveWPEditors,function(e){wp.editor.remove(e)}),n.czrActiveWPEditors=[])})},doSektionThinksOnApiReady:function(){var o=this;o.registerAndSetupDefaultPanelSectionOptions(),o.localSectionsSettingId.callbacks.add(function(e,t){try{o.setupSettingsToBeSaved()}catch(e){n.errare("Error in self.localSectionsSettingId.callbacks => self.setupSettingsToBeSaved()",e)}o.initializeHistoryLogWhenSettingsRegistered(),n.previewer.send("sek-request-active-locations")});var i=function(e,t){o.setContextualCollectionSettingIdWhenSkopeSet(e,t),n.section(o.SECTION_ID_FOR_LOCAL_OPTIONS,function(e){e.deferred.embedded.done(function(){!0!==e.boundForLocalOptionGeneration&&(e.boundForLocalOptionGeneration=!0,e.expanded.bind(function(e){!0===e&&o.generateUI({action:"sek-generate-local-skope-options-ui"})}))})}),n.section(o.SECTION_ID_FOR_GLOBAL_OPTIONS,function(e){!0!==e.nimbleGlobalOptionGenerated&&(o.generateUI({action:"sek-generate-global-options-ui"}),e.nimbleGlobalOptionGenerated=!0)}),n.trigger("nimble-ready-for-current-skope")};_.isEmpty(n.czr_activeSkopes().local)||i(),n.czr_activeSkopes.callbacks.add(function(e,t){i(e,t)}),o.reactToPreviewMsg(),o.setupDnd(),o.setupTinyMceEditor(),o.schedulePrintSectionJson(),o.bind("sek-ui-removed",function(){n.previewedDevice("desktop")}),n.previewedDevice.bind(function(t){var e=_.filter(o.registered(),function(e){return"control"==e.what});_.each(e||[],function(e){n.control(e.id,function(e){e.container.find('[data-sek-device="'+t+'"]').each(function(){r(this).trigger("click")})})})}),r("#customize-notifications-area").on("click",'[data-sek-reset="true"]',function(){n.previewer.trigger("sek-reset-collection",{scope:"local"})}),o.bind("sek-ui-pre-removal",function(e){"control"==e.what&&-1<e.id.indexOf("draggable")&&n.control(e.id,function(e){e.container.find("[draggable]").each(function(){r(this).off("dragstart dragend")})}),"control"==e.what&&n.control(e.id,function(e){e.container.find("select").each(function(){_.isUndefined(r(this).data("czrSelect2"))||r(this).czrSelect2("destroy")})})}),n.bind("czr-new-registered",function(e){if(_.isUndefined(e.origin))throw new Error("czr-new-registered event => missing params.origin");if("nimble"===e.origin&&!1!==e.track){var t=o.registered(),i=r.extend(!0,[],t),n=_.findWhere(i,{id:e.id});if(!_.isEmpty(n)&&_.isEqual(n,e))throw new Error("register => duplicated element in self.registered() collection "+e.id);i.push(e),o.registered(i)}}),o.activeLocations=new n.Value([]),n.previewer.bind("sek-active-locations-in-preview",function(e){o.activeLocations(_.isObject(e)&&_.isArray(e.active_locations)?e.active_locations:[])}),o.setupTopBar(),sektionsLocalizedData.isSavedSectionEnabled&&o.setupSaveUI(),o.lastClickedTargetInPreview=new n.Value,o.lastClickedTargetInPreview.bind(function(e,t){_.isObject(e)&&e.id?n.previewer.send("sek-set-double-click-target",e):n.previewer.send("sek-reset-double-click-target"),clearTimeout(r(window).data("_preview_target_timer_")),r(window).data("_preview_target_timer_",setTimeout(function(){o.lastClickedTargetInPreview({}),n.previewer.send("sek-reset-double-click-target")},2e4))}),n.previewer.bind("sek-clean-target-drop-zone",function(){o.lastClickedTargetInPreview({})}),r(document).keydown(function(e){e&&27===e.keyCode&&o.lastClickedTargetInPreview({})}),sektionsLocalizedData.hasActiveCachePlugin&&_.delay(function(){n.previewer.trigger("sek-notify",{notif_id:"has-active-cache-plugin",type:"info",duration:2e4,message:['<span style="color:#0075a2">',sektionsLocalizedData.i18n["You seem to be using a cache plugin."],"<strong> ("+sektionsLocalizedData.hasActiveCachePlugin+")</strong><br/>","<strong>",sektionsLocalizedData.i18n["It is recommended to disable your cache plugin when customizing your website."],"</strong>","</span>"].join("")})},2e3)},registerAndSetupDefaultPanelSectionOptions:function(){var o=this,e=n.Panel.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}});n.panel(sektionsLocalizedData.sektionsPanelId,function(n){n.deferred.embedded.done(function(){var e=n.container.find("h3.accordion-section-title"),t=(n.container.find(".panel-meta .accordion-section-title"),['<img class="sek-nimble-logo" alt="'+n.params.title+'" src="',sektionsLocalizedData.baseUrl,"/assets/img/nimble/nimble_horizontal.svg?ver="+sektionsLocalizedData.nimbleVersion,'"/>'].join(""));if(0<e.length){var i=e.find("span");e.addClass("sek-side-nimble-logo-wrapper").html(t).append(i)}sektionsLocalizedData.eligibleForFeedbackNotification&&n.expanded.bind(function(e){e&&_.isUndefined(o.feedbackUIVisible)&&o.setupFeedBackUI()})})}),n.CZR_Helpers.register({origin:"nimble",what:"panel",id:sektionsLocalizedData.sektionsPanelId,title:sektionsLocalizedData.i18n["Nimble Builder"],priority:-1e3,constructWith:e,track:!1}),n.CZR_Helpers.register({origin:"nimble",what:"section",id:o.SECTION_ID_FOR_GLOBAL_OPTIONS,title:sektionsLocalizedData.i18n["Site wide options"],panel:sektionsLocalizedData.sektionsPanelId,priority:20,track:!1,constructWith:n.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){n.section(o.SECTION_ID_FOR_GLOBAL_OPTIONS,function(e){var t=e.container.find(".accordion-section-title"),i=e.container.find(".customize-section-title h3");0<t.length&&t.prepend('<i class="fas fa-globe sek-level-option-icon"></i>'),0<i.length&&i.find(".customize-action").after('<i class="fas fa-globe sek-level-option-icon"></i>'),o.scheduleModuleAccordion.call(e)})}),n.CZR_Helpers.register({origin:"nimble",what:"section",id:o.SECTION_ID_FOR_LOCAL_OPTIONS,title:sektionsLocalizedData.i18n["Current page options"],panel:sektionsLocalizedData.sektionsPanelId,priority:10,track:!1,constructWith:n.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){n.section(o.SECTION_ID_FOR_LOCAL_OPTIONS,function(e){var t=e.container.find(".accordion-section-title"),i=e.container.find(".customize-section-title h3");0<t.length&&t.prepend('<i class="fas fa-map-marker-alt sek-level-option-icon"></i>'),0<i.length&&i.find(".customize-action").after('<i class="fas fa-map-marker-alt sek-level-option-icon"></i>'),o.scheduleModuleAccordion.call(e)})}),n.CZR_Helpers.register({origin:"nimble",what:"setting",id:sektionsLocalizedData.optNameForGlobalOptions,dirty:!1,value:sektionsLocalizedData.globalOptionDBValues,transport:"refresh",type:"option"}),n.CZR_Helpers.register({origin:"nimble",what:"section",id:o.SECTION_ID_FOR_CONTENT_PICKER,title:sektionsLocalizedData.i18n["Content Picker"],panel:sektionsLocalizedData.sektionsPanelId,priority:30,track:!1,constructWith:n.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){n.section(o.SECTION_ID_FOR_CONTENT_PICKER,function(e){"resolved"!=n.czr_initialSkopeCollectionPopulated.state()?n.czr_initialSkopeCollectionPopulated.done(function(){n.previewer.trigger("sek-pick-content",{focus:!1})}):n.previewer.trigger("sek-pick-content",{focus:!1})})})},setContextualCollectionSettingIdWhenSkopeSet:function(e,t){t=t||{},!_.isEmpty(t.local)&&n.panel(sektionsLocalizedData.sektionsPanelId).expanded()&&n.previewer.trigger("sek-pick-content"),sektionsData=n.czr_skopeBase.getSkopeProperty("sektions","local"),sektionsLocalizedData.isDevMode&&n.infoLog("::setContextualCollectionSettingIdWhenSkopeSet => SEKTIONS DATA ? ",sektionsData),_.isEmpty(sektionsData)&&n.errare("::setContextualCollectionSettingIdWhenSkopeSet() => no sektionsData"),_.isEmpty(sektionsData.setting_id)&&n.errare("::setContextualCollectionSettingIdWhenSkopeSet() => missing setting_id"),this.localSectionsSettingId(sektionsData.setting_id)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(r,a){a.extend(CZRSeksPrototype,{setupTopBar:function(){var t=this;t.topBarId="#nimble-top-bar",t.topBarVisible=new r.Value(!1),t.topBarVisible.bind(function(e){t.levelTreeExpanded()||t.toggleTopBar(e)}),t.mouseMovedRecently=new r.Value({}),t.mouseMovedRecently.bind(function(e){t.topBarVisible(!_.isEmpty(e))});var e=function(e){t.mouseMovedRecently({x:e.clientX,y:e.clientY}),clearTimeout(a(window).data("_scroll_move_timer_")),a(window).data("_scroll_move_timer_",setTimeout(function(){t.mouseMovedRecently.set({})},4e3))};a(window).on("mousemove scroll,",_.throttle(e,50)),r.previewer.bind("ready",function(){a(r.previewer.targetWindow().document).on("mousemove scroll,",_.throttle(e,50))}),t.setupLevelTree()},toggleTopBar:function(e){e=!!_.isUndefined(e)||e;var t,i=this;e?a.when(i.renderAndSetupTopBarTmpl({})).done(function(e){i.topBarContainer=e,_.delay(function(){a("body").addClass("nimble-top-bar-visible")},200)}):(t=a.Deferred(),a("body").removeClass("nimble-top-bar-visible"),i.topBarContainer&&i.topBarContainer.length?_.delay(function(){t.resolve()},300):t.resolve(),t.promise()).done(function(){i.topBarVisible(!1)})},renderAndSetupTopBarTmpl:function(e){var t,i=this;if(0<a(i.topBarId).length)return a(i.topBarId);try{t=wp.template("nimble-top-bar")({})}catch(e){return r.errare("Error when parsing the the top note template",e),!1}a("#customize-preview").after(a(t)),a(document).keydown(function(e){if(e.ctrlKey&&_.contains([89,90],e.keyCode))try{i.navigateHistory(90===e.keyCode?"undo":"redo")}catch(e){r.errare("Error when firing self.navigateHistory",e)}}),a(".sek-add-content",i.topBarId).on("click",function(e){e.preventDefault(),r.previewer.trigger("sek-pick-content",{content_type:"module"})}),a(".sek-level-tree",i.topBarId).on("click",function(e){e.preventDefault(),i.levelTreeExpanded(!i.levelTreeExpanded())}),a("[data-nimble-history]",i.topBarId).on("click",function(e){try{i.navigateHistory(a(this).data("nimble-history"))}catch(e){r.errare("Error when firing self.navigateHistory",e)}}),a(".sek-settings",i.topBarId).on("click",function(e){r.panel(sektionsLocalizedData.sektionsPanelId,function(e){i.rootPanelFocus(),e.focus()})}),a(".sek-nimble-doc",i.topBarId).on("click",function(e){e.preventDefault(),window.open(a(this).data("doc-href"),"_blank")});var n=function(e){a(i.topBarId).length<1||(_.isObject(e)&&e.local_template&&"default"!==e.local_template?a(i.topBarId).find(".sek-notifications").html(['<span class="fas fa-info-circle"></span>',sektionsLocalizedData.i18n["This page uses a custom template."]].join(" ")):a(i.topBarId).find(".sek-notifications").html(""))},o=function(){r(i.localSectionsSettingId(),function(e){var t=e(),i=_.isObject(t)&&t.local_options&&t.local_options.template?t.local_options.template:null;n(i)}),r(i.getLocalSkopeOptionId()+"__template",function(e){e.bind(function(e,t){n(e)})})};return o(),r.bind("nimble-ready-for-current-skope",function(){o()}),a(i.topBarId)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{initializeHistoryLogWhenSettingsRegistered:function(){this.historyLog=new l.Value([{status:"current",value:{local:l(this.localSectionsSettingId())(),global:l(this.getGlobalSectionsSettingId())()},action:"initial"}]),this.historyLog.bind(function(e){if(!_.isEmpty(e)){var t=_.findKey(e,{status:"current"});t=Number(t),d("#nimble-top-bar").find("[data-nimble-history]").each(function(){"undo"===d(this).data("nimble-history")?d(this).attr("data-nimble-state",t<=0?"disabled":"enabled"):d(this).attr("data-nimble-state",e.length<=t+1?"disabled":"enabled")})}})},trackHistoryLog:function(e,t){var i=this,n=e.id===i.getGlobalSectionsSettingId();if(!_.isObject(t)||!_.isFunction(i.historyLog)||!_.isArray(i.historyLog()))throw l.errare("params, self.historyLog() ",t,i.historyLog()),new Error("trackHistoryLog => invalid params or historyLog value");var o,r=[],a=d.extend(!0,[],i.historyLog());_.isEmpty(t.in_sektion)?_.isEmpty(t.to_sektion)||(o=t.to_sektion):o=t.in_sektion,_.each(a,function(e){"future"!=e.status&&(d.extend(e,{status:"previous"}),r.push(e))}),r.push({status:"current",value:n?{global:e()}:{local:e()},action:_.isObject(t)&&t.action||"",sektionToRefresh:o}),i.historyLog(r)},navigateHistory:function(i){var t,n,o,r,e=this,a=d.extend(!0,[],e.historyLog()),s=[];if(_.each(a,function(e){if(_.isEmpty(r)){switch(e.status){case"previous":t=e;break;case"current":n=e;break;case"future":o=e}switch(i){case"undo":_.isEmpty(n)||_.isEmpty(t)||(r=t.value,n.sektionToRefresh,t.sektionToRefresh);break;case"redo":_.isEmpty(o)||(r=o.value,n.sektionToRefresh,o.sektionToRefresh)}}}),!_.isUndefined(r)){_.isEmpty(r.local)||(l(e.localSectionsSettingId())(e.validateSettingValue(r.local,"local"),{navigatingHistoryLogs:!0}),l.czr_sektions.generateUI({action:"sek-generate-local-skope-options-ui",clean_settings:!0})),_.isEmpty(r.global)||l(e.getGlobalSectionsSettingId())(e.validateSettingValue(r.global,"global"),{navigatingHistoryLogs:!0});l.previewer.refresh(),l.previewer.trigger("sek-pick-content",{}),e.cleanRegistered(),e.cleanRegisteredLevelSettingsAfterHistoryNavigation()}var c=_.findKey(a,{status:"current"});c=Number(c),_.isNumber(c)?(_.each(a,function(e,t){switch(newLog=d.extend(!0,{},e),t=Number(t),i){case"undo":0<c&&(t===c-1?newLog.status="current":t===c&&(newLog.status="future"));break;case"redo":a.length>c+1&&(t===c?newLog.status="previous":t===c+1&&(newLog.status="current"))}s.push(newLog)}),e.historyLog(s)):l.errare("Error when navigating the history log, the current key should be a number")}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(b,z){z.extend(CZRSeksPrototype,{setupLevelTree:function(){var i=this;i.levelTree=new b.Value([]),i.levelTree.bind(function(){i.levelTreeExpanded()&&i.renderOrRefreshTree()}),i.levelTreeExpanded=new b.Value(!1),i.levelTreeExpanded.bind(function(e){if(z("body").toggleClass("sek-level-tree-expanded",e),e){if(i.setLevelTreeValue(),_.isEmpty(i.levelTree()))return b.previewer.trigger("sek-notify",{type:"info",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>"+sektionsLocalizedData.i18n["No sections to navigate"]+"</strong>","</span>"].join("")}),void i.levelTreeExpanded(!1);z("#customize-preview iframe").css("z-index",1),i.renderOrRefreshTree()}else 0<z("#nimble-level-tree").length&&_.delay(function(){z("#nimble-level-tree").remove(),z("#customize-preview iframe").css("z-index","")},300)}),i.activeLocations.bind(function(){_.isEmpty(i.levelTree())||i.renderOrRefreshTree()}),b.previewer.bind("ready",function(){i.localSectionsSettingId.callbacks.add(function(){i.levelTreeExpanded(!1),_.each([i.getGlobalSectionsSettingId(),i.localSectionsSettingId(),sektionsLocalizedData.optNameForGlobalOptions],function(e){b(e)._isBoundForNimbleLevelTree||(b(e).bind(function(e){i.setLevelTreeValue()}),b(e)._isBoundForNimbleLevelTree=!0)})})}),z("body").on("click","#nimble-level-tree [data-nimb-level]",function(e){e.preventDefault(),e.stopPropagation();var t=z(e.target).closest("[data-nimb-level]");b.previewer.send("sek-animate-to-level",{id:t.data("nimb-id")}),b.previewer.send("sek-clean-level-uis"),_.delay(function(){b.previewer.send("sek-display-level-ui",{id:t.data("nimb-id")})},100)}),z("body").on("click","#nimble-level-tree .sek-remove-level",function(e){e.preventDefault(),e.stopPropagation();var t=z(e.target).closest("[data-nimb-level]");b.previewer.trigger("sek-remove",{level:t.data("nimb-level"),id:t.data("nimb-id"),location:t.closest('[data-nimb-level="location"]').data("nimb-id"),in_sektion:t.closest('[data-nimb-level="section"]').data("nimb-id"),in_column:t.closest('[data-nimb-level="column"]').data("nimb-id")}),t.fadeOut("slow"),i.renderOrRefreshTree()}),z("body").on("click",".sek-close-level-tree",function(e){e.preventDefault(),i.levelTreeExpanded(!1)})},setLevelTreeValue:function(){var e,t,i,n,o,r=this.getGlobalSectionsSettingId(),a=this.localSectionsSettingId(),s=sektionsLocalizedData.optNameForGlobalOptions,c=!1;if(_.each([r,a,s],function(e){b.has(e)||(c=e)}),!1===c){e=b(r)(),i=_.isObject(e)?z.extend(!0,{},e):{},i=_.isEmpty(i.collection)?[]:i.collection,i=_.isArray(i)?i:[],t=b(a)(),t=_.isObject(t)?t:{},n=z.extend(!0,{},t),n=_.isEmpty(n.collection)?[]:n.collection,n=_.isArray(n)?n:[];var l,d=_.union(i,n),u=!1,p=!1;o=b(s)(),o=_.isObject(o)?o:{},t.local_options&&t.local_options.local_header_footer&&(u="nimble_local"===(l=t.local_options.local_header_footer["header-footer"])),o.global_header_footer&&!u&&"theme"!==l&&(p="nimble_global"===o.global_header_footer["header-footer"]||"nimble_global"===l);var m,f,g=z.extend(!0,[],d);g=_.filter(g,function(e,t){return!_.contains(["nimble_global_header","nimble_global_footer","nimble_local_header","nimble_local_footer"],e.id)});var h=function(e){m=_.findWhere(d,{id:"nimble_"+e+"_header"}),f=_.findWhere(d,{id:"nimble_"+e+"_footer"}),g.unshift(m),g.push(f)};u?h("local"):p&&h("global");var k,y=this.activeLocations(),v=[];_.isEmpty(y)?v=g:_.each(y,function(e){k=_.findWhere(g,{id:e}),_.isUndefined(k)||v.push(k)}),this.levelTree(v)}else b.errare("::setLevelTreeValue => a setting id is not registered ")},renderOrRefreshTree:function(){var e;if(z("#nimble-level-tree").length<1){try{e=wp.template("nimble-level-tree")({})}catch(e){return b.errare("Error when parsing the the nimble-level-tree template",e),!1}z("#customize-preview").after(z(e))}z("#nimble-level-tree").find(".sek-tree-wrap").html(this.getLevelTreeHtml())},getLevelTreeHtml:function(e,t){var i=this;e=e||i.levelTree();var n,o,r,a=!1;if(!_.isArray(e)||_.isEmpty(e))return b.errare("::buildLevelTree => invalid collection param",e),r;var s='<i class="material-icons sek-remove-level" title="'+sektionsLocalizedData.i18n["Remove this element"]+'">delete_forever</i>';return r="<ul>",_.each(e,function(e){_.isUndefined(e.level)?b.errare("::buildLevelTree => missing level property",e):_.isUndefined(e.id)?b.errare("::buildLevelTree => missing id property",e):(n=e.level,"location"===(o=n)&&(a=!_.contains(i.activeLocations(),e.id)),a||(sektionsLocalizedData.i18n[n]&&(o=sektionsLocalizedData.i18n[n]),!0===e.is_nested&&(o=sektionsLocalizedData.i18n["nested section"]),s="location"!==n?s:"",r+='<li data-nimb-level="'+n+'" data-nimb-id="'+e.id+'">',r+='<div class="sek-level-infos"><div class="sek-inner-level-infos">',"module"===n&&(r+=[i.getTreeModuleIcon(e.module_type),i.getTreeModuleTitle(e.module_type)].join(" ")),r+=[" ",o,"( id :",e.id,")",s].join(" "),r+="</div></div>",_.isArray(e.collection)&&!_.isEmpty(e.collection)&&(r+=i.getLevelTreeHtml(e.collection,t)),r+="</li>"))}),r+="</ul>"},getTreeModuleIcon:function(t){var i={};return _.each(sektionsLocalizedData.moduleCollection,function(e){_.isEmpty(i)&&t===e["content-id"]&&(i={svg:e.icon?sektionsLocalizedData.moduleIconPath+e.icon:"",font:e.font_icon?e.font_icon:""})}),_.isEmpty(i.svg)?_.isEmpty(i.font)?void 0:i.font:'<img class="sek-svg-mod-icon" src="'+i.svg+'"/>'},getTreeModuleTitle:function(t){var i={};return _.each(sektionsLocalizedData.moduleCollection,function(e){_.isEmpty(i)&&t===e["content-id"]&&(i=e.title)}),i}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(s,c){c.extend(CZRSeksPrototype,{setupSaveUI:function(){var n=this;n.saveUIVisible=new s.Value(!1),n.saveUIVisible.bind(function(e,t,i){n.toggleSaveUI(e,i?i.id:null)})},toggleSaveUI:function(e,t){e=!!_.isUndefined(e)||e;var i,n=this;e?c.when(n.renderAndSetupSaveUITmpl({})).done(function(e){n.saveUIContainer=e,_.delay(function(){c("body").addClass("nimble-save-ui-visible")},200),c("#sek-saved-section-id").val(t)}):(i=c.Deferred(),c("body").removeClass("nimble-save-ui-visible"),0<c("#nimble-top-save-ui").length?_.delay(function(){n.saveUIContainer.remove(),i.resolve()},300):i.resolve(),i.promise()).done(function(){n.saveUIVisible(!1)})},preProcessSektion:function(e){var t=this.cleanIds(e);return _.omit(t,function(e,t){return _.contains(["id","level"],t)})},renderAndSetupSaveUITmpl:function(e){if(0<c("#nimble-top-save-ui").length)return c("#nimble-top-save-ui");var a=this;try{_tmpl=wp.template("nimble-top-save-ui")({})}catch(e){return s.errare("Error when parsing the the top note template",e),!1}return c("#customize-preview").after(c(_tmpl)),c(".sek-do-save-section","#nimble-top-save-ui").on("click",function(e){e.preventDefault();var t=c.extend(!0,{},a.getLevelModel(c("#sek-saved-section-id").val())),i=c("#sek-saved-section-title").val(),n=c("#sek-saved-section-description").val(),o=a.guid(),r=a.preProcessSektion(t);if(_.isEmpty(i))return c("#sek-saved-section-title").addClass("error"),void s.previewer.trigger("sek-notify",{type:"error",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>@missi18n You need to set a title</strong>","</span>"].join("")});c("#sek-saved-section-title").removeClass("error"),wp.ajax.post("sek_save_section",{nonce:s.settings.nonce.save,sek_title:i,sek_description:n,sek_id:o,sek_data:JSON.stringify(r)}).done(function(e){s.previewer.trigger("sek-notify",{type:"success",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>@missi18n Your section has been saved.</strong>","</span>"].join("")})}).fail(function(e){s.errorLog("ajax sek_save_section => error",e),s.previewer.trigger("sek-notify",{type:"error",duration:1e4,message:['<span style="font-size:0.95em">',"<strong>@missi18n You need to set a title</strong>","</span>"].join("")})})}),c(".sek-cancel-save","#nimble-top-save-ui").on("click",function(e){e.preventDefault(),a.saveUIVisible(!1)}),c("#nimble-top-save-ui")}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(r,a){a.extend(CZRSeksPrototype,{setupFeedBackUI:function(){var t=this;t.feedbackLastUserAction="none",t.feedbackUIId="#nimble-feedback",t.feedbackUIVisible=new r.Value(!1),t.feedbackUIVisible.bind(function(e){t.levelTreeExpanded()||t.toggleFeddBackUI(e),e&&t.refreshSelfClosingTimer()}),t.feedbackUIVisible(!0)},refreshSelfClosingTimer:function(){var e=this;clearTimeout(a(e.feedbackUIId).data("_feedback_user_action_timer_")),a(e.feedbackUIId).data("_feedback_user_action_timer_",setTimeout(function(){_.contains(["go_review","reporting_problem"],e.feedbackLastUserAction)||e.feedbackUIVisible(!1)},6e4))},toggleFeddBackUI:function(e){e=!!_.isUndefined(e)||e;var t,i=this;e?a.when(i.renderAndSetupFeedbackTmpl({})).done(function(e){_.delay(function(){a("body").addClass("nimble-feedback-ui-visible")},200)}):(t=a.Deferred(),a("body").removeClass("nimble-feedback-ui-visible"),0<a(i.feedbackUIId).length?_.delay(function(){a(i.feedbackUIId).remove(),t.resolve()},300):t.resolve(),t.promise()).done(function(){i.feedbackUIVisible(!1)})},renderAndSetupFeedbackTmpl:function(e){var t,i=this;if(0<a(i.feedbackUIId).length)return a(i.feedbackUIId);try{t=wp.template("nimble-feedback-ui")({})}catch(e){return r.errare("Error when parsing the the feedback template",e),!1}if(a("#customize-preview").after(a(t)),!i.feedbackEventsScheduled){var n=a(i.feedbackUIId).data("sek-dismiss-pointer"),o=function(){wp.ajax.post("dismiss-wp-pointer",{pointer:n}).fail(function(e){r.errare("ajax dismiss failure",e)})};return a("body").on("click","[data-sek-feedback-action]",function(e){e.preventDefault(),i.refreshSelfClosingTimer();var t=a(this).data("sek-feedback-action");switch(i.feedbackLastUserAction=t){case"not_enjoying":a(i.feedbackUIId).find(".sek-feedback-step-one").hide(),a(i.feedbackUIId).find(".sek-feedback-step-two-not-enjoying").show();break;case"enjoying":a(i.feedbackUIId).find(".sek-feedback-step-one").hide(),a(i.feedbackUIId).find(".sek-feedback-step-two-enjoying").show();break;case"reporting_problem":window.open(a(this).data("problem-href"),"_blank");break;case"go_review":window.open("https://wordpress.org/support/plugin/nimble-builder/reviews/?filter=5/#new-post","_blank");break;case"maybe_later":i.feedbackUIVisible(!1),wp.ajax.post("sek_postpone_feedback",{nonce:r.settings.nonce.save,transient_duration_in_days:30}).fail(function(e){r.errare("ajax dismiss failure",e)});break;case"already_did":a(i.feedbackUIId).find(".sek-feedback-step-two-not-enjoying").hide(),a(i.feedbackUIId).find(".sek-feedback-step-two-enjoying").hide(),a(i.feedbackUIId).find(".sek-feedback-step-three-thanks").show(),_.delay(function(){i.feedbackUIVisible(!1)},3e3),o();break;case"dismiss":i.feedbackUIVisible(!1),o();break;default:r.errare("::renderAndSetupFeedbackTmpl => invalid action")}}),i.feedbackEventsScheduled=!0,a(i.feedbackUIId)}}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(r,e){jQuery.extend(CZRSeksPrototype,{getRevisionHistory:function(e){return wp.ajax.post("sek_get_revision_history",{nonce:r.settings.nonce.save,skope_id:e.is_local?r.czr_skopeBase.getSkopeProperty("skope_id"):sektionsLocalizedData.globalSkopeId})},setSingleRevision:function(i){var n=this,o=function(e,t){r.previewer.trigger("sek-notify",{notif_id:"restore-revision-error",type:t||"info",duration:1e4,message:['<span style="">',"<strong>",e||"","</strong>","</span>"].join("")})};wp.ajax.post("sek_get_single_revision",{nonce:r.settings.nonce.save,revision_post_id:i.revision_post_id}).done(function(e){var t=i.is_local?n.localSectionsSettingId():n.getGlobalSectionsSettingId();_.isEqual(r(t)(),e)?o(sektionsLocalizedData.i18n["This is the current version."],"info"):n.updateAPISetting({action:"sek-restore-revision",is_global_location:!i.is_local,revision_value:e}).done(function(){r.previewer.refresh()}).fail(function(e){r.errare("::setSingleRevision error when firing ::updateAPISetting",e),o(sektionsLocalizedData.i18n["The revision could not be restored."],"error")})}).fail(function(e){r.errare("::setSingleRevision ajax error",e),o(sektionsLocalizedData.i18n["The revision could not be restored."],"error")})}})}(wp.customize);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,l){l.extend(CZRSeksPrototype,{setupSettingsToBeSaved:function(){var i,o=this,e={local:{collectionSettingId:o.localSectionsSettingId()},global:{collectionSettingId:o.getGlobalSectionsSettingId()}};_.each(e,function(e,t){if(i=c.czr_skopeBase.getSkopeProperty("sektions",t).db_values,_.isEmpty(e.collectionSettingId))throw new Error("setupSettingsToBeSaved => the collectionSettingId is invalid");if(!c.has(e.collectionSettingId)){c.CZR_Helpers.register({what:"setting",id:e.collectionSettingId,value:o.validateSettingValue(_.isObject(i)?i:o.getDefaultSektionSettingValue(t),t),transport:"postMessage",type:"option",track:!1,origin:"nimble"});c(e.collectionSettingId,function(n){n.bind(_.debounce(function(e,t,i){if(!_.isObject(i)||!0!==i.navigatingHistoryLogs)try{o.trackHistoryLog(n,i)}catch(e){c.errare("setupSettingsToBeSaved => trackHistoryLog",e)}},1e3))})}})},validateSettingValue:function(i,n){if(!_.isObject(i))return c.errare("::validateSettingValue => validation error => the setting should be an object",i),null;if(!_.isEmpty(n)&&_.contains(["local","global"],n)){var o={},r=!1,e=[],a=function(e){c.errare(e,i),c.previewer.trigger("sek-notify",{type:"error",duration:6e4,message:['<span style="font-size:0.95em">',"<strong>"+e+"</strong>","<br>",sektionsLocalizedData.i18n["If this problem locks Nimble Builder, you can try resetting the sections of this page."],"<br>",'<span style="text-align:center;display:block">','<button type="button" class="button" aria-label="'+sektionsLocalizedData.i18n.Reset+'" data-sek-reset="true">'+sektionsLocalizedData.i18n.Reset+"</button>","</span>","</span>"].join("")}),r=!0},s=function(t){if(!r)if(_.isUndefined(t)&&_.isEmpty(o)){if(t=l.extend(!0,{},i),_.isUndefined(t.id)||_.isUndefined(t.level)){if(_.isUndefined(t.collection))return void a("validation error => the root level is missing the collection of locations");if(!_.isEmpty(t.level)||!_.isEmpty(t.id))return void a('validation error => the root level should not have a "level" or an "id" property');_.each(t,function(e,t){switch(n){case"local":if(!_.contains(["collection","local_options","fonts"],t))return void a("validation error => unauthorized option group for local setting value => "+t);break;case"global":if(!_.contains(["collection","fonts"],t))return void a("validation error => unauthorized option group for global setting value => "+t)}}),_.each(i.collection,function(e){o=t,s(e)})}}else{if(_.isEmpty(t.id)||!_.isString(t.id))return void a("validation error => a "+t.level+" level must have a valid id");if(_.contains(e,t.id))return void a("validation error => duplicated level id : "+t.id);if(e.push(t.id),_.isEmpty(t.level)||!_.isString(t.level))return void a("validation error => a "+t.level+" level must have a level property");if(!_.contains(["location","section","column","module"],t.level))return void a('validation error => the level "'+t.level+'" is not authorized');if("module"==t.level){if(!_.isUndefined(t.collection))return void a("validation error => a module can not have a collection property")}else if(_.isUndefined(t.collection))return void a("validation error => missing collection property for level => "+t.level+" "+t.id);switch(_.isUndefined(t.ver_ini)&&c.errare("validateSettingValue() => validation error => a "+t.level+' should have a version property : "ver_ini"'),t.level){case"location":if(!_.isEmpty(o.level))return void a("validation error => the parent of location "+t.id+" should have no level set");break;case"section":if(t.is_nested&&"column"!=o.level)return void a("validation error => the nested section "+t.id+" must be child of a column");if(!t.is_nested&&"location"!=o.level)return void a("validation error => the section "+t.id+" must be child of a location");break;case"column":if("section"!=o.level)return void a("validation error => the column "+t.id+" must be child of a section");break;case"module":if("column"!=o.level)return void a("validation error => the module "+t.id+" must be child of a column")}"module"!=t.level&&_.each(t.collection,function(e){o=l.extend(!0,{},t),_.isUndefined(e)?a("validation error => undefined level "):s(e)})}};return s(),r?null:i}c.errare("::validateSettingValue => invalid scope provided.",n)},resetCollectionSetting:function(e){if(_.isEmpty(e)||!_.contains(["local","global"],e))throw new Error("resetCollectionSetting => invalid scope provided.",e);return l.extend(!0,{},this.getDefaultSektionSettingValue(e))}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,n){n.extend(CZRSeksPrototype,{reactToPreviewMsg:function(){var o=this,r={},a={},s=!0,e={"sek-add-section":{callback:function(e){return s=!!_.isUndefined(e.send_to_preview)||e.send_to_preview,a={},r={action:"sek-add-section",id:sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid(),location:e.location,in_sektion:e.in_sektion,in_column:e.in_column,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column),before_section:e.before_section,after_section:e.after_section,is_first_section:e.is_first_section},o.updateAPISetting(r)},complete:function(e){e.apiParams.is_first_section&&c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location}),c.previewer.trigger("sek-pick-content",{id:e.apiParams?e.apiParams.id:"",content_type:"section"}),c.previewer.send("sek-animate-to-level",{id:e.apiParams.id})}},"sek-add-column":{callback:function(e){return s=!0,a={},r={id:sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid(),action:"sek-add-column",in_sektion:e.in_sektion,autofocus:e.autofocus},o.updateAPISetting(r)},complete:function(e){!1!==e.apiParams.autofocus&&c.previewer.trigger("sek-pick-content",{})}},"sek-add-module":{callback:function(e){return s=!0,a={},r={id:sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid(),action:"sek-add-module",in_sektion:e.in_sektion,in_column:e.in_column,module_type:e.content_id,before_module:e.before_module,after_module:e.after_module},o.updateAPISetting(r)},complete:function(e){c.previewer.trigger("sek-edit-module",{id:e.apiParams.id,level:"module",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column}),o.updateAPISetting({action:"sek-update-fonts",is_global_location:o.isGlobalLocation(e.apiParams)}),c.previewer.trigger("sek-refresh-stylesheet",{id:e.apiParams.in_column,location_skope_id:c.czr_skopeBase.getSkopeProperty("skope_id")})}},"sek-remove":{callback:function(e){switch(s=!0,a={},e.level){case"section":var t=o.getLevelModel(e.id);if("no_match"===t){c.errare("reactToPreviewMsg => sek-remove-section => no sektionToRemove matched");break}r={action:"sek-remove-section",id:e.id,location:e.location,in_sektion:e.in_sektion,in_column:e.in_column,is_nested:t.is_nested};break;case"column":r={action:"sek-remove-column",id:e.id,in_sektion:e.in_sektion};break;case"module":r={action:"sek-remove-module",id:e.id,in_sektion:e.in_sektion,in_column:e.in_column};break;default:c.errare("::reactToPreviewMsg => sek-remove => missing level ",e)}return o.updateAPISetting(r)},complete:function(e){if(c.previewer.trigger("sek-pick-content",{}),o.updateAPISetting({action:"sek-update-fonts",is_global_location:o.isGlobalLocation(e.apiParams)}),"sek-remove-section"===e.apiParams.action){var t=o.getLevelModel(e.apiParams.location);_.isEmpty(t.collection)&&c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location})}}},"sek-move":{callback:function(e){switch(s=!0,a={},e.level){case"section":r={action:"sek-move-section",id:e.id,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column),newOrder:e.newOrder,from_location:e.from_location,to_location:e.to_location};break;case"column":r={action:"sek-move-column",id:e.id,newOrder:e.newOrder,from_sektion:e.from_sektion,to_sektion:e.to_sektion};break;case"module":r={action:"sek-move-module",id:e.id,newOrder:e.newOrder,from_column:e.from_column,to_column:e.to_column,from_sektion:e.from_sektion,to_sektion:e.to_sektion}}return o.updateAPISetting(r)},complete:function(e){switch(e.apiParams.action){case"sek-move-section":c.previewer.trigger("sek-edit-options",{id:e.apiParams.id,level:"section",in_sektion:e.apiParams.id}),e.apiParams.from_location!=e.apiParams.to_location&&(c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.to_location}),c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.from_location}));break;case"sek-move-column":c.previewer.trigger("sek-edit-options",{id:e.apiParams.id,level:"column",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column});break;case"sek-refresh-modules-in-column":c.previewer.trigger("sek-edit-module",{id:e.apiParams.id,level:"module",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column})}}},"sek-move-section-up":{callback:function(e){return s=!1,a={},r={action:"sek-move-section-up-down",direction:"up",id:e.id,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column),location:e.location,in_column:e.in_column},o.updateAPISetting(r)},complete:function(e){c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location})}},"sek-move-section-down":{callback:function(e){return s=!1,a={},r={action:"sek-move-section-up-down",direction:"down",id:e.id,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column),location:e.location,in_column:e.in_column},o.updateAPISetting(r)},complete:function(e){c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location})}},"sek-duplicate":{callback:function(e){switch(s=!0,a={},e.level){case"section":r={action:"sek-duplicate-section",id:e.id,location:e.location,in_sektion:e.in_sektion,in_column:e.in_column,is_nested:!_.isEmpty(e.in_sektion)&&!_.isEmpty(e.in_column)};break;case"column":r={action:"sek-duplicate-column",id:e.id,in_sektion:e.in_sektion,in_column:e.in_column};break;case"module":r={action:"sek-duplicate-module",id:e.id,in_sektion:e.in_sektion,in_column:e.in_column}}return o.updateAPISetting(r)},complete:function(e){var t;switch(e.apiParams.action){case"sek-duplicate-section":c.previewer.trigger("sek-edit-options",{id:e.apiParams.id,level:"section",in_sektion:e.apiParams.id}),t=e.apiParams.location,c.previewer.send("sek-animate-to-level",{id:e.apiParams.id});break;case"sek-duplicate-column":c.previewer.trigger("sek-edit-options",{id:e.apiParams.id,level:"column",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column}),t=e.apiParams.in_sektion;break;case"sek-duplicate-module":c.previewer.trigger("sek-edit-module",{id:e.apiParams.id,level:"module",in_sektion:e.apiParams.in_sektion,in_column:e.apiParams.in_column}),t=e.apiParams.in_column}c.previewer.trigger("sek-refresh-stylesheet",{id:t,location_skope_id:c.czr_skopeBase.getSkopeProperty("skope_id")})}},"sek-resize-columns":function(e){return s=!0,a={},r=e,o.updateAPISetting(r)},"sek-add-content-in-new-sektion":{callback:function(e){switch(s=!!_.isUndefined(e.send_to_preview)||e.send_to_preview,a={},(r=e).action="sek-add-content-in-new-sektion",r.id=sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid(),e.content_type){case"module":r.droppedModuleId=sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid();break;case"preset_section":c.previewer.send("sek-maybe-print-loader",{loader_located_in_level_id:e.location}),c.previewer.send("sek-maybe-print-loader",{fullPageLoader:!0})}return o.updateAPISetting(r)},complete:function(e){switch(e.apiParams.content_type){case"module":c.previewer.trigger("sek-edit-module",{level:"module",id:e.apiParams.droppedModuleId});break;case"preset_section":c.previewer.send("sek-clean-loader",{cleanFullPageLoader:!0})}o.updateAPISetting({action:"sek-update-fonts",is_global_location:o.isGlobalLocation(e.apiParams)});var t=e.location_skope_id;_.isUndefined(t)&&(t=!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:c.czr_skopeBase.getSkopeProperty("skope_id")),c.previewer.trigger("sek-refresh-stylesheet",{location_skope_id:t,is_global_location:o.isGlobalLocation(e.apiParams)}),e.apiParams.is_first_section&&c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location}),e.apiParams.sektion_to_replace&&c.previewer.trigger("sek-remove",{id:e.apiParams.sektion_to_replace,location:e.apiParams.location,in_column:e.apiParams.in_column,level:"section"})}},"sek-add-preset-section-in-new-nested-sektion":{callback:function(e){return s=!1,a={},(r=e).action="sek-add-preset-section-in-new-nested-sektion",r.id=sektionsLocalizedData.optPrefixForSektionsNotSaved+o.guid(),c.previewer.send("sek-maybe-print-loader",{loader_located_in_level_id:e.location}),o.updateAPISetting(r)},complete:function(e){c.previewer.trigger("sek-refresh-stylesheet",{id:e.apiParams.in_sektion,location_skope_id:c.czr_skopeBase.getSkopeProperty("skope_id")}),o.updateAPISetting({action:"sek-update-fonts",is_global_location:o.isGlobalLocation(e.apiParams)}),c.previewer.trigger("sek-refresh-level",{level:"section",id:e.apiParams.in_sektion})}},"sek-pick-content":function(e){return e=_.isObject(e)?e:{},c.czr_sektions.currentContentPickerType=c.czr_sektions.currentContentPickerType||new c.Value,c.czr_sektions.currentContentPickerType(e.content_type||"module"),_.isObject(e)&&e.id&&o.lastClickedTargetInPreview({id:e.id}),s=!0,r={},a={action:"sek-generate-draggable-candidates-picker-ui",content_type:(e=e||{}).content_type||"module",was_triggered:!_.has(e,"was_triggered")||e.was_triggered,focus:!_.has(e,"focus")||e.focus},o.generateUI(a)},"sek-edit-options":function(e){return s=!0,r={},_.isEmpty(e.id)?n.Deferred(function(){this.reject("missing id")}):(a={action:"sek-generate-level-options-ui",level:e.level,id:e.id,in_sektion:e.in_sektion,in_column:e.in_column,options:e.options||[]},o.generateUI(a))},"sek-edit-module":function(e){return s=!0,r={},a={action:"sek-generate-module-ui",level:e.level,id:e.id,in_sektion:e.in_sektion,in_column:e.in_column,options:e.options||[]},o.generateUI(a)},"sek-notify":function(t){s=!1;var i=t.notif_id||"sek-notify";return o.lastNimbleNotificationId&&c.notifications.remove(o.lastNimbleNotificationId),n.Deferred(function(){c.panel(sektionsLocalizedData.sektionsPanelId,function(e){c.notifications.add(new c.Notification(i,{type:t.type||"info",message:t.message,dismissible:!0})),o.lastNimbleNotificationId=i,_.delay(function(){c.notifications.remove(i)},t.duration||5e3)}),this.resolve({is_global_location:o.isGlobalLocation(t)})})},"sek-refresh-level":function(t){return s=!0,n.Deferred(function(e){r={action:"sek-refresh-level",level:t.level,id:t.id},a={},e.resolve({is_global_location:o.isGlobalLocation(t)})})},"sek-refresh-stylesheet":function(t){return s=!0,t=t||{},n.Deferred(function(e){r={id:t.id},a={},e.resolve({is_global_location:o.isGlobalLocation(t)})})},"sek-toggle-save-section-ui":function(t){return s=!1,o.saveUIVisible(!0,t),n.Deferred(function(e){r={},a={},e.resolve({is_global_location:o.isGlobalLocation(t)})})},"sek-reset-collection":{callback:function(e){return s=!1,a={},(r=e).action="sek-reset-collection",r.scope=e.scope,o.updateAPISetting(r)},complete:function(e){c.previewer.refresh(),c.previewer.trigger("sek-notify",{notif_id:"reset-success",type:"success",duration:8e3,message:["<span>","<strong>",sektionsLocalizedData.i18n["Reset complete"],"</strong>","</span>"].join("")})}}};_.each(e,function(i,n){c.previewer.bind(n,function(t){var e;if(_.isFunction(i))e=i;else{if(!_.isFunction(i.callback))return void c.errare("::reactToPreviewMsg => invalid callback for action "+n);e=i.callback}try{e(t).done(function(e){e=e||{},s?c.previewer.send(n,{location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:c.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:c.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:r,uiParams:a,cloneId:!_.isEmpty(e.cloneId)&&e.cloneId}):c.previewer.trigger([n,"done"].join("_"),{apiParams:r,uiParams:a}),o.trigger([n,"done"].join("_"),t)}).fail(function(e){c.errare("reactToPreviewMsg => error when firing "+n,e),c.previewer.trigger("sek-notify",{type:"error",duration:3e4,message:['<span style="font-size:0.95em">',"<strong>"+e+"</strong>","<br>",sektionsLocalizedData.i18n["If this problem locks Nimble Builder, you can try resetting the sections of this page."],"<br>",'<span style="text-align:center;display:block">','<button type="button" class="button" aria-label="'+sektionsLocalizedData.i18n.Reset+'" data-sek-reset="true">'+sektionsLocalizedData.i18n.Reset+"</button>","</span>","</span>"].join("")})})}catch(e){c.errare("reactToPreviewMsg => error when receiving "+n,e)}})}),_.each(e,function(t,i){c.previewer.bind([i,"done"].join("_"),function(e){if(_.isFunction(t.complete))try{t.complete(e)}catch(e){c.errare("reactToPreviewMsg done => error when receiving "+[i,"done"].join("_"),e)}})})},schedulePrintSectionJson:function(){var i=this;c.previewer.bind("sek-to-json",function(e){var t=n.extend(!0,{},i.getLevelModel(e.id));console.log(JSON.stringify(i.cleanIds(t)))})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(y,v){v.extend(CZRSeksPrototype,{generateUI:function(e){var t=this,i=v.Deferred();switch(_.isEmpty(e.action)&&i.reject("generateUI => missing action"),e.action){case"sek-generate-module-ui":try{i=t.generateUIforFrontModules(e,i)}catch(e){y.errare("::generateUI() => error",e),i=v.Deferred()}break;case"sek-generate-level-options-ui":try{i=t.generateUIforLevelOptions(e,i)}catch(e){y.errare("::generateUI() => error",e),i=v.Deferred()}break;case"sek-generate-draggable-candidates-picker-ui":t.cleanRegistered();try{i=t.generateUIforDraggableContent(e,i)}catch(e){y.errare("::generateUI() => error",e),i=v.Deferred()}break;case"sek-generate-local-skope-options-ui":t.cleanRegistered();try{i=t.generateUIforLocalSkopeOptions(e,i)}catch(e){y.errare("::generateUI() => error",e),i=v.Deferred()}break;case"sek-generate-global-options-ui":t.cleanRegistered();try{i=t.generateUIforGlobalOptions(e,i)}catch(e){y.errare("::generateUI() => error",e),i=v.Deferred()}}return"pending"==i.state()?i.resolve().promise():i.promise()},updateAPISettingAndExecutePreviewActions:function(n){if(!_.isEmpty(n.settingParams)&&_.has(n.settingParams,"to")){var o,r=this,e=n.settingParams.to,t=null,i=!1;if(!_.isEmpty(n.settingParams.args)&&_.has(n.settingParams.args,"moduleRegistrationParams")){var a=n.settingParams.args.moduleRegistrationParams.control,s=n.settingParams.args.moduleRegistrationParams.id,c=a.czr_Module(s);if(_.isEmpty(c)?y.errare("updateAPISettingAndExecutePreviewActions => missing parentModuleInstance",n):(t=c.module_type,i=c.isMultiItem()),!i&&_.isObject(e)?o=r.normalizeAndSanitizeSingleItemInputValues(e,t):(o=[],_.each(e,function(e){o.push(r.normalizeAndSanitizeSingleItemInputValues(e,t))})),_.isEmpty(n.defaultPreviewAction))y.errare("updateAPISettingAndExecutePreviewActions => missing defaultPreviewAction in passed params. No action can be triggered to the api.previewer.",n);else{var l,d="refresh_stylesheet"===n.defaultPreviewAction,u="refresh_markup"===n.defaultPreviewAction,p="refresh_fonts"===n.defaultPreviewAction,m="refresh_preview"===n.defaultPreviewAction,f=n.settingParams.args.input_changed,g=function(){return l&&_.isString(l.refresh_markup)&&"true"!==l.refresh_markup&&"false"!==l.refresh_markup};_.isUndefined(f)||(l=r.getInputRegistrationParams(f,t),_.isUndefined(l.refresh_stylesheet)||(d=Boolean(l.refresh_stylesheet)),_.isUndefined(l.refresh_markup)||(u=g()?l.refresh_markup:Boolean(l.refresh_markup)),_.isUndefined(l.refresh_fonts)||(p=Boolean(l.refresh_fonts)),_.isUndefined(l.refresh_preview)||(m=Boolean(l.refresh_preview)));var h=function(){if(!0!==n.isGlobalOptions)return r.updateAPISetting({action:n.uiParams.action,id:n.uiParams.id,value:o,in_column:n.uiParams.in_column,in_sektion:n.uiParams.in_sektion,options_type:n.options_type,settingParams:n.settingParams}).done(function(e){!0===d&&y.previewer.send("sek-refresh-stylesheet",{location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:y.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:y.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-refresh-stylesheet",id:n.uiParams.id,level:n.uiParams.level}});var t=function(){y.previewer.send("sek-refresh-level",{location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:y.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:y.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-refresh-level",id:n.uiParams.id,level:n.uiParams.level},skope_id:y.czr_skopeBase.getSkopeProperty("skope_id")})};if(!0===u&&t(),g()){var i=n.settingParams.args.input_value;if(!_.isString(i))throw new Error("::updateAPISettingAndExecutePreviewActions => _doUpdateWithRequestedAction => refreshMarkupWhenNeededForInput => html content is not a string.");r.htmlIncludesShortcodesOrTmplTags(i)?t():y.previewer.send("sek-update-html-in-selector",{selector:l.refresh_markup,html:i,id:n.uiParams.id,location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:y.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:y.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-update-html-in-selector",id:n.uiParams.id,level:n.uiParams.level},skope_id:y.czr_skopeBase.getSkopeProperty("skope_id")})}!0===m&&y.previewer.refresh()}).fail(function(e){y.errare("::updateAPISettingAndExecutePreviewActions=> api setting not updated",e),y.errare("::updateAPISettingAndExecutePreviewActions=> api setting not updated => params ",n)});if(_.isEmpty(n.options_type))y.errare("updateAPISettingAndExecutePreviewActions => error when updating the global options => missing options_type");else{var e=y(sektionsLocalizedData.optNameForGlobalOptions)(),t=v.extend(!0,{},_.isObject(e)?e:{}),i={};_.each(o||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(i[t]=e)}),t[n.options_type]=i,y(sektionsLocalizedData.optNameForGlobalOptions)(t)}};if(!0===p){var k=n.settingParams.args.input_value;if(!_.isString(k))return void y.errare("updateAPISettingAndExecutePreviewActions => font-family must be a string",k);-1<k.indexOf("gfont")?r.updateAPISetting({action:"sek-update-fonts",font_family:k,is_global_location:r.isGlobalLocation(n.uiParams)}).always(function(){h().then(function(){r.updateAPISetting({action:"sek-update-fonts",is_global_location:r.isGlobalLocation(n.uiParams)})})}):h()}else h()}}else y.errare("updateAPISettingAndExecutePreviewActions => missing params.settingParams.args.moduleRegistrationParams The api main setting can not be updated",n)}else y.errare("updateAPISettingAndExecutePreviewActions => missing params.settingParams.to. The api main setting can not be updated",n)},normalizeAndSanitizeSingleItemInputValues:function(e,o){var i,r={},n={},a=null,s=this;return _.each(e,function(e,t){var i,n;_.contains(["title","id"],t)||(null!==o&&"no_default_value_specified"===(a=s.getInputDefaultValue(t,o))&&y.infoLog("::normalizeAndSanitizeSingleItemInputValues => missing default value for input "+t+" in module "+o),i=e,n=a,(_.isBoolean(i)||_.isBoolean(n)?Boolean(i)===Boolean(n):_.isNumber(i)||_.isNumber(n)?Number(i)===Number(n):_.isString(i)||_.isString(n)?i+""==n+"":_.isObject(i)&&_.isObject(n)?_.isEqual(i,n):_.isArray(i)&&_.isArray(n)?JSON.stringify(i.sort())===JSON.stringify(n.sort()):i===n)||(_.isString(e)||_.isObject(e))&&_.isEmpty(e)||(r[t]=e))}),_.each(r,function(e,t){switch(s.getInputType(t,o)){case"text":case"textarea":case"check":case"gutencheck":case"select":case"radio":case"number":case"upload":case"upload_url":case"color":case"wp_color_alpha":case"wp_color":case"content_picker":case"detached_tinymce_editor":case"nimble_tinymce_editor":case"password":case"range":case"range_slider":case"hidden":case"h_alignment":case"h_text_alignment":case"spacing":case"bg_position":case"v_alignment":case"font_size":case"line_height":case"font_picker":default:i=e}n[t]=i}),n},isUIControlAlreadyRegistered:function(t){var e=_.filter(this.registered(),function(e){return e.id==t&&"control"===e.what}),i=!1;return _.isEmpty(e)?i=y.control.has(t):(i=!0,1<e.length&&y.errare("generateUI => why is this control registered more than once ? => "+t)),i},htmlIncludesShortcodesOrTmplTags:function(e){var t=e.match(/\[+([\w_-])+/g),i=e.match(/\{\{+([\w_-])+/g),n=[],o=[];if(t)for(var r=0;r<t.length;r++){var a=t[r].replace(/^\[+/g,"");-1===n.indexOf(a)&&n.push(a)}if(i)for(var s=0;s<i.length;s++){var c=i[s].replace(/^\[+/g,"");-1===o.indexOf(c)&&o.push(c)}return!_.isEmpty(n)||!_.isEmpty(o)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(a,s){s.extend(CZRSeksPrototype,{generateUIforDraggableContent:function(o,e){var r=this,t={};s.extend(t,{content_type_switcher:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+"_sek_content_type_switcher_ui",module_type:"sek_content_type_switcher_module",controlLabel:sektionsLocalizedData.i18n["Select a content type"],priority:0,settingValue:{content_type:o.content_type}},module_picker:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+"_sek_draggable_modules_ui",module_type:"sek_module_picker_module",controlLabel:sektionsLocalizedData.i18n["Pick a module"],content_type:"module",priority:20,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_intro_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.guid()+"_sek_draggable_sections_ui",module_type:"sek_intro_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Sections for an introduction"],content_type:"section",expandAndFocusOnInit:!1,priority:10,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_features_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.guid()+"_sek_draggable_sections_ui",module_type:"sek_features_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Sections for services and features"],content_type:"section",expandAndFocusOnInit:!1,priority:10,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_contact_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.guid()+"_sek_draggable_sections_ui",module_type:"sek_contact_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Contact-us sections"],content_type:"section",expandAndFocusOnInit:!1,priority:10,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_column_layouts_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.guid()+"_sek_draggable_sections_ui",module_type:"sek_column_layouts_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Empty sections with columns layout"],content_type:"section",expandAndFocusOnInit:!1,priority:10,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_header_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.guid()+"_sek_draggable_sections_ui",module_type:"sek_header_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Header sections"],content_type:"section",expandAndFocusOnInit:!1,priority:10,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'},sek_footer_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.guid()+"_sek_draggable_sections_ui",module_type:"sek_footer_sec_picker_module",controlLabel:sektionsLocalizedData.i18n["Footer sections"],content_type:"section",expandAndFocusOnInit:!1,priority:10,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'}}),sektionsLocalizedData.isSavedSectionEnabled&&s.extend(t,{sek_my_sections_sec_picker_module:{settingControlId:sektionsLocalizedData.optPrefixForSektionsNotSaved+r.guid()+"_sek_draggable_sections_ui",module_type:"sek_my_sections_sec_picker_module",controlLabel:"@missi18n My sections",content_type:"section",expandAndFocusOnInit:!1,priority:10,icon:'<i class="fas fa-grip-vertical sek-level-option-icon"></i>'}});var i=_.keys(t)[0],n=t[i].settingControlId;return r.isUIControlAlreadyRegistered(n)?a.control(n,function(t){t.focus({completeCallback:function(){var e=t.container;e.hasClass("button-see-me")||(e.addClass("button-see-me"),_.delay(function(){e.removeClass("button-see-me")},800))}})}):(_do_register_=function(){_.each(t,function(n,e){a.has(n.settingControlId)||(a(n.settingControlId,function(e){e.bind(function(e,t){a.errare("generateUIforDraggableContent => the setting() should not changed")})}),a.CZR_Helpers.register({origin:"nimble",level:o.level,what:"setting",id:n.settingControlId,dirty:!1,value:n.settingValue||{},transport:"postMessage",type:"_nimble_ui_"})),a.CZR_Helpers.register({origin:"nimble",level:o.level,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:r.SECTION_ID_FOR_CONTENT_PICKER,priority:n.priority||10,settings:{default:n.settingControlId},track:!1}).done(function(){a.control(n.settingControlId,function(e){e.content_type=n.content_type,!0===o.focus&&e.focus({completeCallback:function(){}});var t=e.container.find("label > .customize-control-title"),i=t.html();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.icon),"section"===e.content_type?(e.container.find(".czr-items-wrapper").hide(),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false"),!0===n.expandAndFocusOnInit&&"false"==e.container.attr("data-sek-expanded")&&(e.container.find(".czr-items-wrapper").show(),t.trigger("click"))):e.container.attr("data-sek-accordion","no")})})})},a.section(r.SECTION_ID_FOR_CONTENT_PICKER,function(e){_do_register_();var t=e.container.find(".accordion-section-title"),i=e.container.find(".customize-section-title h3");0<t.length&&t.find(".sek-level-option-icon").length<1&&t.prepend('<i class="fas fa-grip-vertical sek-level-option-icon"></i>'),0<i.length&&i.find(".sek-level-option-icon").length<1&&i.find(".customize-action").after('<i class="fas fa-grip-vertical sek-level-option-icon"></i>'),r.scheduleModuleAccordion.call(e,{expand_first_control:!0})})),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(d,u){u.extend(CZRSeksPrototype,{generateUIforFrontModules:function(r,e){var a=this;_.isEmpty(r.id)&&e.reject("generateUI => missing id");var i=a.getLevelProperty({property:"value",id:r.id}),t=a.getLevelProperty({property:"module_type",id:r.id}),n=a.getRegisteredModuleProperty(t,"name");_.isEmpty(t)&&e.reject("generateUI => module => invalid module_type");var o={};if(!0===a.getRegisteredModuleProperty(t,"is_father")){var s=a.getRegisteredModuleProperty(t,"children");if(_.isEmpty(s))throw new Error("::generateUIforFrontModules => a father module "+t+" is missing children modules ");_.each(s,function(e,t){o[t]={settingControlId:r.id+"__"+t,module_type:e,controlLabel:a.getRegisteredModuleProperty(e,"name")}})}else o.__no_option_group_to_be_updated_by_children_modules__={settingControlId:r.id,module_type:t,controlLabel:n};var c=_.keys(o)[0],l=o[c].settingControlId;return a.isUIControlAlreadyRegistered(l)?d.control(l).focus({completeCallback:function(){var e=d.control(l).container;e.hasClass("button-see-me")||(e.addClass("button-see-me"),_.delay(function(){e.removeClass("button-see-me")},800))}}):(a.cleanRegistered(),_do_register_=function(){_.each(o,function(n,o){if(!d.has(n.settingControlId)){var t=function(e,t,i){try{a.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh_markup",uiParams:_.extend(r,{action:"sek-set-module-value"}),options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){d.errare("::generateUIforFrontModules => Error in updateAPISettingAndExecutePreviewActions",e)}};d(n.settingControlId,function(e){e.bind(_.debounce(t,a.SETTING_UPDATE_BUFFER))});var e=u.extend(!0,{},i);"__no_option_group_to_be_updated_by_children_modules__"!==o&&(e=!_.isEmpty(e)&&_.isObject(e)&&_.isObject(e[o])?e[o]:{}),d.CZR_Helpers.register({origin:"nimble",level:r.level,what:"setting",id:n.settingControlId,dirty:!1,value:e,transport:"postMessage",type:"_nimble_ui_"})}d.CZR_Helpers.register({origin:"nimble",level:r.level,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:r.id,priority:10,settings:{default:n.settingControlId}}).done(function(){}),d.control(n.settingControlId,function(e){d.control(n.settingControlId).focus({completeCallback:function(){}}),e.container.find(".czr-items-wrapper").hide();var t=e.container.find("label > .customize-control-title"),i=t.html();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.icon),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false")})})},d.section.when(r.id,function(){d.section(r.id).focus(),_do_register_()}),d.CZR_Helpers.register({origin:"nimble",what:"section",id:r.id,title:sektionsLocalizedData.i18n["Content for"]+" "+n,panel:sektionsLocalizedData.sektionsPanelId,priority:1e3}).done(function(){}),d.section(r.id,function(e){e.container.find(".accordion-section-title").first().hide();var t=e.container.find(".customize-section-title h3");0<t.length&&t.find(".customize-action").after('<i class="fas fa-pencil-alt sek-level-option-icon"></i>'),a.scheduleModuleAccordion.call(e,{expand_first_control:!0})})),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{generateUIforLevelOptions:function(a,e){var s=this,c=s.getLevelProperty({property:"options",id:a.id});c=_.isObject(c)?c:{};var t={};d.extend(t,{bg:{settingControlId:a.id+"__bg_options",module_type:"sek_level_bg_module",controlLabel:sektionsLocalizedData.i18n["Background settings for the"]+" "+sektionsLocalizedData.i18n[a.level],expandAndFocusOnInit:!0,icon:'<i class="material-icons sek-level-option-icon">gradient</i>'},border:{settingControlId:a.id+"__border_options",module_type:"sek_level_border_module",controlLabel:sektionsLocalizedData.i18n["Borders settings for the"]+" "+sektionsLocalizedData.i18n[a.level],icon:'<i class="material-icons sek-level-option-icon">rounded_corner</i>'},spacing:{settingControlId:a.id+"__spacing_options",module_type:"sek_level_spacing_module",controlLabel:sektionsLocalizedData.i18n["Padding and margin settings for the"]+" "+sektionsLocalizedData.i18n[a.level],icon:'<i class="material-icons sek-level-option-icon">center_focus_weak</i>'},anchor:{settingControlId:a.id+"__anchor_options",module_type:"sek_level_anchor_module",controlLabel:sektionsLocalizedData.i18n["Custom anchor ( CSS ID ) and CSS classes for the"]+" "+sektionsLocalizedData.i18n[a.level],icon:'<i class="fas fa-anchor sek-level-option-icon"></i>'},visibility:{settingControlId:a.id+"__visibility_options",module_type:"sek_level_visibility_module",controlLabel:sektionsLocalizedData.i18n["Device visibility settings for the"]+" "+sektionsLocalizedData.i18n[a.level],icon:'<i class="far fa-eye sek-level-option-icon"></i>'},height:{settingControlId:a.id+"__height_options",module_type:"sek_level_height_module",controlLabel:sektionsLocalizedData.i18n["Height and vertical alignment for the"]+" "+sektionsLocalizedData.i18n[a.level],icon:'<i class="fas fa-ruler-vertical sek-level-option-icon"></i>'}}),"section"===a.level&&(d.extend(t,{width:{settingControlId:a.id+"__width_options",module_type:"sek_level_width_section",controlLabel:sektionsLocalizedData.i18n["Width settings for the"]+" "+sektionsLocalizedData.i18n[a.level],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'}}),d.extend(t,{breakpoint:{settingControlId:a.id+"__breakpoint_options",module_type:"sek_level_breakpoint_module",controlLabel:sektionsLocalizedData.i18n["Responsive settings : breakpoint, column direction"],icon:'<i class="material-icons sek-level-option-icon">devices</i>'}})),"module"===a.level&&d.extend(t,{width:{settingControlId:a.id+"__width_options",module_type:"sek_level_width_module",controlLabel:sektionsLocalizedData.i18n["Width settings for the"]+" "+sektionsLocalizedData.i18n[a.level],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'}});var i=_.keys(t)[0],n=t[i].settingControlId;return s.isUIControlAlreadyRegistered(n)?l.control(n).focus({completeCallback:function(){var e=l.control(n).container;e.hasClass("button-see-me")||(e.addClass("button-see-me"),_.delay(function(){e.removeClass("button-see-me")},800))}}):(s.cleanRegistered(),_do_register_=function(){_.each(t,function(n,o){if(s.isUIControlAlreadyRegistered(n.settingControlId))l.section(l.control(n.settingControlId).section()).expanded(!0);else{if(!l.has(n.settingControlId)){var t=function(e,t,i){try{s.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh_stylesheet",uiParams:a,options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){l.errare("::generateUIforLevelOptions => Error in updateAPISettingAndExecutePreviewActions",e)}};l(n.settingControlId,function(e){e.bind(_.debounce(t,s.SETTING_UPDATE_BUFFER))});var e=c[o]||{},i=s.getModuleStartingValue(n.module_type);if("no_starting_value"!==i&&_.isObject(i)){var r=d.extend(!0,{},i);e=d.extend(r,e)}l.CZR_Helpers.register({origin:"nimble",level:a.level,what:"setting",id:n.settingControlId,dirty:!1,value:e,transport:"postMessage",type:"_nimble_ui_"})}l.CZR_Helpers.register({origin:"nimble",level:a.level,level_id:a.id,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:a.id,priority:0,settings:{default:n.settingControlId}}).done(function(){}),l.control(n.settingControlId,function(e){!0===n.expandAndFocusOnInit&&e.focus({completeCallback:function(){}}),e.container.find(".czr-items-wrapper").hide();var t=e.container.find("label > .customize-control-title"),i=t.html();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.icon),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false")})}})},l.section.has(a.id)||l.section(a.id,function(e){s.scheduleModuleAccordion.call(e,{expand_first_control:!0})}),l.CZR_Helpers.register({origin:"nimble",what:"section",id:a.id,title:sektionsLocalizedData.i18n["Settings for the"]+" "+a.level,panel:sektionsLocalizedData.sektionsPanelId,priority:10}).done(function(){}),l.section(a.id,function(e){_do_register_(),e.container.find(".accordion-section-title").first().hide();var t=e.container.find(".customize-section-title h3");0<t.length&&t.find(".sek-level-option-icon").length<1&&t.find(".customize-action").after('<i class="fas fa-sliders-h sek-level-option-icon"></i>')})),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{getLocalSkopeOptionId:function(){var e=l.czr_skopeBase.getSkopeProperty("skope_id");return _.isEmpty(e)?(l.errare("czr_sektions::getLocalSkopeOptionId => empty skope_id "),""):sektionsLocalizedData.optPrefixForSektionsNotSaved+e+"__localSkopeOptions"},generateUIforLocalSkopeOptions:function(a,e){var s=this,i=s.getLocalSkopeOptionId();if(s.isUIControlAlreadyRegistered(i))return e;if(s.localOptionsRegistrationParams={},_.isUndefined(sektionsLocalizedData.localOptionsMap)||!_.isObject(sektionsLocalizedData.localOptionsMap))return l.errare("::generateUIforGlobalOptions => missing or invalid localOptionsMap"),e;!0===a.clean_settings&&s.cleanRegisteredLocalOptionSettings(),_.each(sektionsLocalizedData.localOptionsMap,function(e,t){switch(t){case"template":s.localOptionsRegistrationParams[t]={settingControlId:i+"__template",module_type:e,controlLabel:sektionsLocalizedData.i18n["Page template"],expandAndFocusOnInit:!1,icon:'<i class="material-icons sek-level-option-icon">check_box_outline_blank</i>'};break;case"local_header_footer":s.localOptionsRegistrationParams[t]={settingControlId:i+"__local_header_footer",module_type:e,controlLabel:sektionsLocalizedData.i18n["Page header and footer"],icon:'<i class="material-icons sek-level-option-icon">web</i>'};break;case"widths":s.localOptionsRegistrationParams[t]={settingControlId:i+"__widths",module_type:e,controlLabel:sektionsLocalizedData.i18n["Inner and outer widths"],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'};break;case"custom_css":s.localOptionsRegistrationParams[t]={settingControlId:i+"__custom_css",module_type:e,controlLabel:sektionsLocalizedData.i18n["Custom CSS"],icon:'<i class="material-icons sek-level-option-icon">code</i>'};break;case"local_performances":s.localOptionsRegistrationParams[t]={settingControlId:i+"__local_performances",module_type:e,controlLabel:sektionsLocalizedData.i18n["Page speed optimizations"],icon:'<i class="fas fa-fighter-jet sek-level-option-icon"></i>'};break;case"local_reset":s.localOptionsRegistrationParams[t]={settingControlId:i+"__local_reset",module_type:e,controlLabel:sektionsLocalizedData.i18n["Reset the sections in this page"],icon:'<i class="material-icons sek-level-option-icon">cached</i>'};break;case"local_revisions":s.localOptionsRegistrationParams[t]={settingControlId:i+"__local_revisions",module_type:e,controlLabel:sektionsLocalizedData.i18n["Revision history of local sections"],icon:'<i class="material-icons sek-level-option-icon">history</i>'};break;case"import_export":s.localOptionsRegistrationParams[t]={settingControlId:i+"__local_imp_exp",module_type:e,controlLabel:sektionsLocalizedData.i18n["Export / Import"],icon:'<i class="material-icons sek-level-option-icon">import_export</i>'};break;default:l.errare("::generateUIforLocalOptions => an option group could not be registered => "+e,t)}});var t=l(s.localSectionsSettingId())(),c=d.extend(!0,{},_.isObject(t.local_options)?t.local_options:{});return _do_register_=function(){_.each(s.localOptionsRegistrationParams,function(n,o){var e=s.getModuleStartingValue(n.module_type),t=_.isObject(c[o])?c[o]:{};if(!l.has(n.settingControlId)){var i=function(e,t,i){try{s.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh",uiParams:a,options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){l.errare("::generateUIforLocalSkopeOptions => Error in updateAPISettingAndExecutePreviewActions",e)}};if(l(n.settingControlId,function(e){e.bind(_.debounce(i,s.SETTING_UPDATE_BUFFER))}),"no_starting_value"!==e&&_.isObject(e)){var r=d.extend(!0,{},e);t=d.extend(r,t)}l.CZR_Helpers.register({origin:"nimble",level:a.level,what:"setting",id:n.settingControlId,dirty:!1,value:t,transport:"postMessage",type:"_nimble_ui_"})}l.CZR_Helpers.register({origin:"nimble",level:a.level,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:s.SECTION_ID_FOR_LOCAL_OPTIONS,priority:10,settings:{default:n.settingControlId}}).done(function(){l.control(n.settingControlId,function(e){e.container.find(".czr-items-wrapper").hide();var t=e.container.find("label > .customize-control-title"),i=t.html();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.icon),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false"),!0===n.expandAndFocusOnInit&&"false"==e.container.attr("data-sek-expanded")&&t.trigger("click")})})})},_do_register_(),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{generateUIforGlobalOptions:function(a,e){var s=this,i=sektionsLocalizedData.optPrefixForSektionsNotSaved+sektionsLocalizedData.optNameForGlobalOptions;if(s.isUIControlAlreadyRegistered(i))return e;var n={};if(_.isUndefined(sektionsLocalizedData.globalOptionsMap)||!_.isObject(sektionsLocalizedData.globalOptionsMap))return l.errare("::generateUIforGlobalOptions => missing or invalid globalOptionsMap"),e;_.each(sektionsLocalizedData.globalOptionsMap,function(e,t){switch(t){case"global_header_footer":n[t]={settingControlId:i+"__header_footer",module_type:e,controlLabel:sektionsLocalizedData.i18n["Site wide header and footer"],icon:'<i class="material-icons sek-level-option-icon">web</i>'};break;case"breakpoint":n[t]={settingControlId:i+"__breakpoint",module_type:e,controlLabel:sektionsLocalizedData.i18n["Site wide breakpoint for Nimble sections"],expandAndFocusOnInit:!1,icon:'<i class="material-icons sek-level-option-icon">devices</i>'};break;case"widths":n[t]={settingControlId:i+"__widths",module_type:e,controlLabel:sektionsLocalizedData.i18n["Site wide inner and outer sections widths"],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'};break;case"performances":n[t]={settingControlId:i+"__performances",module_type:e,controlLabel:sektionsLocalizedData.i18n["Site wide page speed optimizations"],icon:'<i class="fas fa-fighter-jet sek-level-option-icon"></i>'};break;case"recaptcha":n[t]={settingControlId:i+"__recaptcha",module_type:e,controlLabel:sektionsLocalizedData.i18n["Protect your contact forms with Google reCAPTCHA"],icon:'<i class="material-icons sek-level-option-icon">security</i>'};break;case"global_revisions":n[t]={settingControlId:i+"__global_revisions",module_type:e,controlLabel:sektionsLocalizedData.i18n["Revision history of global sections"],icon:'<i class="material-icons sek-level-option-icon">history</i>'};break;case"global_reset":n[t]={settingControlId:i+"__global_reset",module_type:e,controlLabel:sektionsLocalizedData.i18n["Reset the sections displayed in global locations"],icon:'<i class="material-icons sek-level-option-icon">cached</i>'};break;case"beta_features":n[t]={settingControlId:i+"__beta_features",module_type:e,controlLabel:sektionsLocalizedData.i18n["Beta features"],icon:'<i class="material-icons sek-level-option-icon">widgets</i>'};break;default:l.errare("::generateUIforGlobalOptions => an option group could not be registered => "+e,t)}});var c=sektionsLocalizedData.globalOptionDBValues;return _do_register_=function(){_.each(n,function(n,o){if(!l.has(n.settingControlId)){var t=function(e,t,i){try{s.updateAPISettingAndExecutePreviewActions({isGlobalOptions:!0,defaultPreviewAction:"refresh",uiParams:a,options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){l.errare("::generateUIforGlobalOptions => Error in updateAPISettingAndExecutePreviewActions",e)}};l(n.settingControlId,function(e){e.bind(_.debounce(t,s.SETTING_UPDATE_BUFFER))});var e=s.getModuleStartingValue(n.module_type),i=_.isObject(c)&&!_.isEmpty(c[o])?c[o]:{};if("no_starting_value"!==e&&_.isObject(e)){var r=d.extend(!0,{},e);i=d.extend(r,i)}l.CZR_Helpers.register({origin:"nimble",level:a.level,what:"setting",id:n.settingControlId,dirty:!1,value:i,transport:"postMessage",type:"_nimble_ui_"})}l.CZR_Helpers.register({origin:"nimble",level:a.level,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:s.SECTION_ID_FOR_GLOBAL_OPTIONS,priority:20,settings:{default:n.settingControlId},track:!1}).done(function(){l.control(n.settingControlId,function(e){e.container.find(".czr-items-wrapper").hide();var t=e.container.find("label > .customize-control-title"),i=t.html();t.html(['<span class="sek-ctrl-accordion-title">',i,"</span>"].join("")),_.isUndefined(n.icon)||t.addClass("sek-flex-vertical-center").prepend(n.icon),t.prepend('<span class="sek-animated-arrow" data-name="icon-chevron-down"><span class="fa fa-chevron-down"></span></span>'),e.container.attr("data-sek-expanded","false"),!0===n.expandAndFocusOnInit&&"false"==e.container.attr("data-sek-expanded")&&t.trigger("click")})})})},_do_register_(),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(ce,le){le.extend(CZRSeksPrototype,{updateAPISetting:function(oe){var re=this,ae=le.Deferred();(oe=oe||{}).is_global_location="global"===oe.scope||re.isGlobalLocation(oe);var se=oe.is_global_location?re.getGlobalSectionsSettingId():re.localSectionsSettingId();return ce(se,function(e){!function(){var n,t,o,i,r,a,s,e,c,l=ce(se)(),d=_.isObject(l)?le.extend(!0,{},l):re.getDefaultSektionSettingValue(oe.is_global_location?"global":"local"),u="_not_injection_scenario_";switch(d.collection=_.isArray(d.collection)?d.collection:re.getDefaultSektionSettingValue(oe.is_global_location?"global":"local").collection,oe.action){case"sek-add-section":if(_.isEmpty(oe.id))throw new Error("updateAPISetting => "+oe.action+" => missing id");if(_.isEmpty(oe.location))throw new Error("updateAPISetting => "+oe.action+" => missing location");if(!0===oe.is_nested){if(o=re.getLevelModel(oe.in_column,d.collection),"no_match"==(c=re.getLevelModel(oe.in_sektion,d.collection))){ae.reject("updateAPISetting => "+oe.action+" => no grand parent sektion found");break}if(!0===c.is_nested){ae.reject(sektionsLocalizedData.i18n["You've reached the maximum number of allowed nested sections."]);break}if("no_match"==o){ce.errare("updateAPISetting => "+oe.action+" => no parent column matched"),ae.reject("updateAPISetting => "+oe.action+" => no parent column matched");break}o.collection=_.isArray(o.collection)?o.collection:[],o.collection.push({id:oe.id,level:"section",collection:[{id:sektionsLocalizedData.optPrefixForSektionsNotSaved+re.guid(),level:"column",collection:[],ver_ini:sektionsLocalizedData.nimbleVersion}],is_nested:!0,ver_ini:sektionsLocalizedData.nimbleVersion})}else{if("no_match"==(n=re.getLevelModel(oe.location,d.collection))){ce.errare("updateAPISetting => "+oe.action+" => no location matched"),ae.reject("updateAPISetting => "+oe.action+" => no location matched");break}n.collection=_.isArray(n.collection)?n.collection:[],_.each(n.collection,function(e,t){oe.before_section===e.id&&(R=t),oe.after_section===e.id&&(R=t+1)}),n.collection=_.isArray(n.collection)?n.collection:[],n.collection.splice(R,0,{id:oe.id,level:"section",collection:[{id:sektionsLocalizedData.optPrefixForSektionsNotSaved+re.guid(),level:"column",collection:[],ver_ini:sektionsLocalizedData.nimbleVersion}],ver_ini:sektionsLocalizedData.nimbleVersion})}break;case"sek-duplicate-section":if(_.isEmpty(oe.id))throw new Error("updateAPISetting => "+oe.action+" => missing id");if(_.isEmpty(oe.location))throw new Error("updateAPISetting => "+oe.action+" => missing location");var p;try{p=re.cloneLevel(oe.id)}catch(e){ce.errare("updateAPISetting => "+oe.action,e);break}var m=re.getLevelPositionInCollection(oe.id,d.collection);if(!0===oe.is_nested){if("no_match"==(o=re.getLevelModel(oe.in_column,d.collection))){ce.errare("updateAPISetting => "+oe.action+" => no parent column matched"),ae.reject("updateAPISetting => "+oe.action+" => no parent column matched");break}o.collection=_.isArray(o.collection)?o.collection:[],o.collection.splice(parseInt(m+1,10),0,p)}else{if("no_match"==(n=re.getLevelModel(oe.location,d.collection))){ce.errare("updateAPISetting => "+oe.action+" => no location matched"),ae.reject("updateAPISetting => "+oe.action+" => no location matched");break}n.collection=_.isArray(n.collection)?n.collection:[],n.collection.splice(parseInt(m+1,10),0,p)}s=p.id;break;case"sek-remove-section":if(!0===oe.is_nested)"no_match"!=(o=re.getLevelModel(oe.in_column,d.collection))?(o.collection=_.isArray(o.collection)?o.collection:[],o.collection=_.filter(o.collection,function(e){return e.id!=oe.id})):ce.errare("updateAPISetting => "+oe.action+" => no parent column matched");else{if("no_match"==(n=re.getLevelModel(oe.location,d.collection))){ce.errare("updateAPISetting => "+oe.action+" => no location matched"),ae.reject("updateAPISetting => "+oe.action+" => no location matched");break}n.collection=_.filter(n.collection,function(e){return e.id!=oe.id})}break;case"sek-move-section":var f,g,h=re.getLevelModel(oe.to_location,d.collection);if(_.isEmpty(h)||"no_match"==h)throw new Error("updateAPISetting => "+oe.action+" => missing target location");if(oe.from_location!=oe.to_location){var k=re.getLevelModel(oe.from_location,d.collection);if(_.isEmpty(k)||"no_match"==k)throw new Error("updateAPISetting => "+oe.action+" => missing source location");k.collection=_.isArray(k.collection)?k.collection:[],f=re.getLevelModel(oe.id,k.collection),g=le.extend(!0,{},f),k.collection=_.filter(k.collection,function(e){return e.id!=oe.id})}h.collection=_.isArray(h.collection)?h.collection:[],r=le.extend(!0,[],h.collection),a=[],_.each(oe.newOrder,function(e){if(oe.from_location!=oe.to_location&&e==g.id)a.push(g);else{if(t=re.getLevelModel(e,r),_.isEmpty(t)||"no_match"==t)throw new Error("updateAPISetting => "+oe.action+" => missing section candidate");a.push(t)}}),h.collection=a;break;case"sek-move-section-up-down":if(parentCandidate=re.getLevelModel(oe.is_nested?oe.in_column:oe.location,d.collection),_.isEmpty(parentCandidate)||"no_match"==parentCandidate)throw new Error("updateAPISetting => "+oe.action+" => missing target location");parentCandidate.collection=_.isArray(parentCandidate.collection)?parentCandidate.collection:[],r=le.extend(!0,[],parentCandidate.collection),a=le.extend(!0,[],parentCandidate.collection);var y=_.findIndex(r,function(e){return e.id===oe.id});if(-1===y)throw new Error("updateAPISetting => "+oe.action+" => invalid index");var v=oe.direction||"up";if("up"!==v&&r.length===y+1)throw new Error("updateAPISetting => "+oe.action+" => bottom reached");if("up"===v&&0===y)throw new Error("updateAPISetting => "+oe.action+" => top reached");a[y]=r["up"===v?y-1:y+1],a["up"===v?y-1:y+1]=r[y],parentCandidate.collection=a;break;case"sek-add-column":if(_.isEmpty(oe.id))throw new Error("updateAPISetting => "+oe.action+" => missing id");if("no_match"==(t=re.getLevelModel(oe.in_sektion,d.collection))){ce.errare("updateAPISetting => "+oe.action+" => no parent sektion matched"),ae.reject("updateAPISetting => "+oe.action+" => no parent sektion matched");break}if(t.collection=_.isArray(t.collection)?t.collection:[],re.MAX_NUMBER_OF_COLUMNS-1<_.size(t.collection)){ae.reject(sektionsLocalizedData.i18n["You've reached the maximum number of columns allowed in this section."]);break}_.each(t.collection,function(e){e.width=""}),t.collection.push({id:oe.id,level:"column",collection:[],ver_ini:sektionsLocalizedData.nimbleVersion});break;case"sek-remove-column":if("no_match"!=(t=re.getLevelModel(oe.in_sektion,d.collection))){if(1===_.size(t.collection)){ae.reject(sektionsLocalizedData.i18n["A section must have at least one column."]);break}t.collection=_.isArray(t.collection)?t.collection:[],t.collection=_.filter(t.collection,function(e){return e.id!=oe.id}),_.each(t.collection,function(e){e.width=""})}else ce.errare("updateAPISetting => "+oe.action+" => no parent sektion matched");break;case"sek-duplicate-column":if(_.isEmpty(oe.id))throw new Error("updateAPISetting => "+oe.action+" => missing id");if("no_match"==(t=re.getLevelModel(oe.in_sektion,d.collection))){ce.errare("updateAPISetting => "+oe.action+" => no parent sektion matched"),ae.reject("updateAPISetting => "+oe.action+" => no parent sektion matched");break}if(t.collection=_.isArray(t.collection)?t.collection:[],re.MAX_NUMBER_OF_COLUMNS-1<_.size(t.collection)){ae.reject(sektionsLocalizedData.i18n["You've reached the maximum number of columns allowed in this section."]);break}var b;try{b=re.cloneLevel(oe.id)}catch(e){ce.errare("updateAPISetting => "+oe.action,e);break}var z=re.getLevelPositionInCollection(oe.id,d.collection);s=b.id,t.collection.splice(parseInt(z+1,10),0,b),_.each(t.collection,function(e){e.width=""});break;case"sek-resize-columns":if(oe.col_number<2)break;var I=re.getLevelModel(oe.resized_column,d.collection),w=re.getLevelModel(oe.sister_column,d.collection);if("no_match"==I){ce.errare("updateAPISetting => "+oe.action+" => no resized column matched"),ae.reject("updateAPISetting => "+oe.action+" => no resized column matched");break}I.width=parseFloat(oe.resizedColumnWidthInPercent);var M=re.getLevelModel(oe.in_sektion,d.collection),D=_.filter(M.collection,function(e){return e.id!=I.id&&e.id!=w.id}),S=parseFloat(I.width.toFixed(3));_.isEmpty(D)||_.each(D,function(e){currentColWidth=parseFloat(1*e.width),(!_.has(e,"width")||!_.isNumber(1*currentColWidth)||_.isEmpty(currentColWidth+"")||currentColWidth<1)&&(e.width=parseFloat((100/oe.col_number).toFixed(3))),S=parseFloat((S+e.width).toFixed(3))}),w.width=parseFloat((100-S).toFixed(3));break;case"sek-move-column":var C,P,x=re.getLevelModel(oe.to_sektion,d.collection);if(_.isEmpty(x)||"no_match"==x)throw new Error("updateAPISetting => "+oe.action+" => missing target sektion");if(oe.from_sektion!=oe.to_sektion){var E=re.getLevelModel(oe.from_sektion,d.collection);if(_.isEmpty(E)||"no_match"==E)throw new Error("updateAPISetting => "+oe.action+" => missing source column");E.collection=_.isArray(E.collection)?E.collection:[],C=re.getLevelModel(oe.id,E.collection),P=le.extend(!0,{},C),E.collection=_.filter(E.collection,function(e){return e.id!=oe.id}),_.each(E.collection,function(e){e.width=""})}x.collection=_.isArray(x.collection)?x.collection:[],r=le.extend(!0,[],x.collection),a=[],_.each(oe.newOrder,function(e){if(oe.from_sektion!=oe.to_sektion&&e==P.id)a.push(P);else{if(o=re.getLevelModel(e,r),_.isEmpty(o)||"no_match"==o)throw new Error("updateAPISetting => moveColumn => missing columnCandidate");a.push(o)}}),x.collection=a,_.each(x.collection,function(e){e.width=""});break;case"sek-add-module":if(_.isEmpty(oe.id))throw new Error("updateAPISetting => "+oe.action+" => missing id");if(_.isEmpty(oe.module_type))throw new Error("updateAPISetting => "+oe.action+" => missing module_type");if("no_match"===(o=re.getLevelModel(oe.in_column,d.collection))){ce.errare("updateAPISetting => "+oe.action+" => no parent column matched"),ae.reject("updateAPISetting => "+oe.action+" => no parent column matched");break}var R=0;o.collection=_.isArray(o.collection)?o.collection:[],_.each(o.collection,function(e,t){oe.before_module===e.id&&(R=t),oe.after_module===e.id&&(R=t+1)});var L={id:oe.id,level:"module",module_type:oe.module_type,ver_ini:sektionsLocalizedData.nimbleVersion};"no_starting_value"!==(e=re.getModuleStartingValue(oe.module_type))&&(L.value=e),o.collection.splice(R,0,L);break;case"sek-duplicate-module":if(_.isEmpty(oe.id))throw new Error("updateAPISetting => "+oe.action+" => missing id");if("no_match"==(o=re.getLevelModel(oe.in_column,d.collection))){ce.errare("updateAPISetting => "+oe.action+" => no parent column matched"),ae.reject("updateAPISetting => "+oe.action+" => no parent column matched");break}var O;o.collection=_.isArray(o.collection)?o.collection:[];try{O=re.cloneLevel(oe.id)}catch(e){ce.errare("updateAPISetting => "+oe.action,e),ae.reject("updateAPISetting => "+oe.action+" => error when cloning the level");break}var A=re.getLevelPositionInCollection(oe.id,d.collection);s=O.id,o.collection.splice(parseInt(A+1,10),0,O);break;case"sek-remove-module":if(_.isEmpty(oe.id))throw new Error("updateAPISetting => "+oe.action+" => missing id");"no_match"!=(o=re.getLevelModel(oe.in_column,d.collection))?(o.collection=_.isArray(o.collection)?o.collection:[],o.collection=_.filter(o.collection,function(e){return e.id!=oe.id})):ce.errare("updateAPISetting => "+oe.action+" => no parent column matched");break;case"sek-move-module":var j,T,V;if(j=re.getLevelModel(oe.to_column,d.collection),_.isEmpty(j)||"no_match"==j)throw new Error("updateAPISetting => "+oe.action+" => missing target column");if(oe.from_column!=oe.to_column){var Z;if(Z=re.getLevelModel(oe.from_column,d.collection),_.isEmpty(Z)||"no_match"==Z)throw new Error("updateAPISetting => "+oe.action+" => missing source column");Z.collection=_.isArray(Z.collection)?Z.collection:[],T=re.getLevelModel(oe.id,d.collection),V=le.extend(!0,{},T),Z.collection=_.filter(Z.collection,function(e){return e.id!=oe.id})}if(j.collection=_.isArray(j.collection)?j.collection:[],r=le.extend(!0,[],j.collection),a=[],_.each(oe.newOrder,function(e){if(oe.from_column!=oe.to_column&&e==V.id)a.push(V);else{if(i=re.getLevelModel(e,d.collection),_.isEmpty(i)||"no_match"==i)throw new Error("updateAPISetting => "+oe.action+" => missing moduleCandidate");a.push(i)}}),a.length!=_.uniq(a).length)throw new Error("updateAPISetting => "+oe.action+" => there are duplicated modules in column : "+j.id);j.collection=a;break;case"sek-set-module-value":i=re.getLevelModel(oe.id,d.collection);var F={};if(_.each(oe.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(F[t]=e)}),"no_match"==i){ce.errare("updateAPISetting => "+oe.action+" => no module matched",oe),ae.reject("updateAPISetting => "+oe.action+" => error no module matched");break}if(_.isEmpty(oe.options_type)){ce.errare("updateAPISetting => "+oe.action+" => missing options_type"),ae.reject("updateAPISetting => "+oe.action+" => missing options_type");break}if("__no_option_group_to_be_updated_by_children_modules__"===oe.options_type)i.value=F;else{var U=le.extend(!0,{},_.isEmpty(i.value)?{}:i.value);U[oe.options_type]=F,i.value=U}break;case"sek-generate-level-options-ui":var N=re.getLevelModel(oe.id,d.collection),B={};if("no_match"===N){ce.errare("updateAPISetting => "+oe.action+" => no parent sektion matched"),ae.reject("updateAPISetting => "+oe.action+" => no parent sektion matched");break}var Q=le.extend(!0,{},N.options||{});_.each(oe.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(B[t]=e)}),_.isEmpty(oe.options_type)&&ce.errare("updateAPISetting => "+oe.action+" => missing options_type"),Q[oe.options_type]=B,N.options=Q;break;case"sek-generate-local-skope-options-ui":B={};var H=le.extend(!0,{},_.isObject(d.local_options)?d.local_options:{});if(_.each(oe.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(B[t]=e)}),_.isEmpty(oe.options_type)||!_.isString(oe.options_type))ce.errare("updateAPISetting => "+oe.action+" => missing options_type");else{var G={};G[oe.options_type]=B,d.local_options=le.extend(H,G)}break;case"sek-add-content-in-new-sektion":if(_.isEmpty(oe.id))throw new Error("updateAPISetting => "+oe.action+" => missing id");if(R=0,"no_match"==(n=re.getLevelModel(oe.location,d.collection))){ce.errare("updateAPISetting => "+oe.action+" => no location matched"),ae.reject("updateAPISetting => "+oe.action+" => no location matched");break}switch(n.collection=_.isArray(n.collection)?n.collection:[],_.each(n.collection,function(e,t){oe.before_section===e.id&&(R=t),oe.after_section===e.id&&(R=t+1)}),oe.content_type){case"module":e=re.getModuleStartingValue(oe.content_id),n.collection.splice(R,0,{id:oe.id,level:"section",collection:[{id:sektionsLocalizedData.optPrefixForSektionsNotSaved+re.guid(),level:"column",collection:[{id:oe.droppedModuleId,level:"module",module_type:oe.content_id,value:"no_starting_value"!==e?e:null,ver_ini:sektionsLocalizedData.nimbleVersion}],ver_ini:sektionsLocalizedData.nimbleVersion}],ver_ini:sektionsLocalizedData.nimbleVersion});break;case"preset_section":u=le.Deferred();var W=function(e){re.preparePresetSectionForInjection(e).fail(function(e){ae.reject("updateAPISetting => error when preparePresetSectionForInjection => "+oe.action+" => "+e),u.reject(e)}).done(function(e){var t=!1;if(!_.isEmpty(oe.sektion_to_replace)){var i=re.getLevelModel(oe.sektion_to_replace,d.collection);"no_match"===i&&(ce.errare("updateAPISetting => "+oe.action+" => no sektionToReplace matched"),ae.reject("updateAPISetting => "+oe.action+" => no sektionToReplace matched")),t=!0===i.is_nested}t?("no_match"===(o=re.getLevelModel(oe.in_column,d.collection))&&(ce.errare("updateAPISetting => "+oe.action+" => no parent column matched"),ae.reject("updateAPISetting => "+oe.action+" => no parent column matched")),o.collection=_.isArray(o.collection)?o.collection:[],_.each(o.collection,function(e,t){oe.before_section===e.id&&(R=t),oe.after_section===e.id&&(R=t+1)}),o.collection.splice(R,0,{id:oe.id,is_nested:!0,level:"section",collection:e.collection,options:e.options||{},ver_ini:sektionsLocalizedData.nimbleVersion})):n.collection.splice(R,0,{id:oe.id,level:"section",collection:e.collection,options:e.options||{},ver_ini:sektionsLocalizedData.nimbleVersion}),u.resolve()})};re.getPresetSectionCollection({is_user_section:oe.is_user_section,presetSectionId:oe.content_id,section_id:oe.id}).fail(function(e){ce.errare("updateAPISetting => "+oe.action+" => Error with self.getPresetSectionCollection()",e),ae.reject("updateAPISetting => "+oe.action+" => Error with self.getPresetSectionCollection()")}).done(function(e){_.isObject(e)&&!_.isEmpty(e)||(ce.errare("updateAPISetting => "+oe.action+" => preset section type not found or empty : "+oe.content_id,e),ae.reject("updateAPISetting => "+oe.action+" => preset section type not found or empty")),W(e)})}break;case"sek-add-preset-section-in-new-nested-sektion":if(_.isEmpty(oe.id))throw new Error("updateAPISetting => "+oe.action+" => missing id");if(o=re.getLevelModel(oe.in_column,d.collection),"no_match"==(c=re.getLevelModel(oe.in_sektion,d.collection))){ae.reject("updateAPISetting => "+oe.action+" => no grand parent sektion found");break}if(!0===c.is_nested){ae.reject(sektionsLocalizedData.i18n["You've reached the maximum number of allowed nested sections."]);break}if("no_match"==o){ce.errare("updateAPISetting => "+oe.action+" => no parent column matched"),ae.reject("updateAPISetting => "+oe.action+" => no parent column matched");break}o.collection=_.isArray(o.collection)?o.collection:[],u=le.Deferred(),W=function(e){re.preparePresetSectionForInjection(e).fail(function(e){ae.reject("updateAPISetting => error when preparePresetSectionForInjection => "+oe.action+" => "+e),u.reject(e)}).done(function(e){o.collection.push({id:oe.id,level:"section",collection:e.collection,options:e.options||{},is_nested:!0,ver_ini:sektionsLocalizedData.nimbleVersion}),u.resolve()})},re.getPresetSectionCollection({is_user_section:oe.is_user_section,presetSectionId:oe.content_id,section_id:oe.id}).fail(function(){ce.errare("updateAPISetting => "+oe.action+" => Error with self.getPresetSectionCollection()",_er_),ae.reject("updateAPISetting => "+oe.action+" => Error with self.getPresetSectionCollection()")}).done(function(e){_.isObject(e)&&!_.isEmpty(e)||(ce.errare("updateAPISetting => "+oe.action+" => preset section type not found or empty : "+oe.content_id,e),ae.reject("updateAPISetting => "+oe.action+" => preset section type not found or empty")),W(e)});break;case"sek-update-fonts":var $=re.sniffGFonts({is_global_location:oe&&!0===oe.is_global_location});if(!_.isEmpty(oe.font_family)&&_.isString(oe.font_family)&&!_.contains($,oe.font_family)){if(oe.font_family.indexOf("gfont")<0){ce.errare("updateAPISetting => "+oe.action+" => error => must be a google font, prefixed gfont"),ae.reject("updateAPISetting => "+oe.action+" => error => must be a google font, prefixed gfont");break}$.push(oe.font_family)}d.fonts=$;break;case"sek-restore-revision":d=oe.revision_value;break;case"sek-import-from-file":if(ce.infoLog("sek-import-from-file",oe),_.isUndefined(oe.imported_content.data)||_.isUndefined(oe.imported_content.metas)){ce.errare("updateAPISetting::sek-import-from-file => invalid imported content",imported_content);break}var q=_.isArray(oe.imported_content.data.collection)?le.extend(!0,[],oe.imported_content.data.collection):[];if(!0===oe.assign_missing_locations){var Y=oe.imported_content.metas.active_locations,J=ce.czr_sektions.activeLocations(),K=_.first(J);if(!_.isEmpty(K)&&!_.isEmpty(Y)&&_.isArray(Y)){var X=le(Y).not(J).get(),ee=re.getLevelModel(K,d.collection),te=re.getLevelModel(K,oe.imported_content.data.collection),ie=[];ee.collection=_.isArray(ee.collection)?ee.collection:[],te.collection=_.isArray(te.collection)?te.collection:[],_.each(Y,function(e){var t=re.getLevelModel(e,q);_.isEmpty(t.collection)||(ie=_.union(ie,t.collection))}),te.collection=ie,oe.imported_content.data.collection=_.filter(oe.imported_content.data.collection,function(e){return!_.contains(X,e.id)})}}!0===oe.keep_existing_sections&&(_.each(q,function(e){var t=re.getLevelModel(e.id,d.collection);if(!_.isEmpty(t.collection)){var i=re.getLevelModel(e.id,oe.imported_content.data.collection);i.collection=_.union(t.collection,i.collection)}}),d.fonts&&!_.isEmpty(d.fonts)&&_.isArray(d.fonts)&&(oe.imported_content.data.fonts=_.isArray(oe.imported_content.data.fonts)?oe.imported_content.data.fonts:[],oe.imported_content.data.fonts=_.uniq(_.union(d.fonts,oe.imported_content.data.fonts)))),d=oe.imported_content.data;break;case"sek-reset-collection":try{d=ce.czr_sektions.resetCollectionSetting(oe.scope)}catch(e){ce.errare("sek-reset-collection => error when firing resetCollectionSetting()",e)}}if("pending"==ae.state()){var ne=function(){var e=oe.settingParams&&oe.settingParams.from&&oe.settingParams.to;e&&_.isEqual(oe.settingParams.from,oe.settingParams.to)?ae.reject("updateAPISetting => the new setting value is unchanged when firing action : "+oe.action):!e&&_.isEqual(l,d)?ae.reject("updateAPISetting => the new setting value is unchanged when firing action : "+oe.action):null!==re.validateSettingValue(d,oe.is_global_location?"global":"local")?(ce(se)(d,oe),oe.cloneId=s,ae.resolve(oe)):ae.reject("Validation problem for action "+oe.action)};"_not_injection_scenario_"===u?(ne(),"pending"===ae.state()&&ce.errare("::updateAPISetting => The __updateAPISettingDeferred__ promise has not been resolved properly.")):u.done(function(){ne(),"pending"===ae.state()&&ce.errare("::updateAPISetting => The __updateAPISettingDeferred__ promise has not been resolved properly.")}).fail(function(e){ce.errare("updateAPISetting => __presetSectionInjected__ failed",e)})}}()}),ae.promise()},_maybeFetchSectionsFromServer:function(t){var e,i=le.Deferred();return!0===(t=t||{is_user_section:!1}).is_user_section?_.isEmpty(ce.sek_userSavedSections)||_.isEmpty(ce.sek_userSavedSections[t.preset_section_id])?(ce.sek_userSavedSections=ce.sek_userSavedSections||{},_.isUndefined(ce.sek_fetchingUserSavedSections)||"pending"!=ce.sek_fetchingUserSavedSections.state()?(e=wp.ajax.post("sek_get_user_saved_sections",{nonce:ce.settings.nonce.save,preset_section_id:t.preset_section_id}),ce.sek_fetchingUserSavedSections=e):e=ce.sek_fetchingUserSavedSections,e.done(function(e){ce.sek_userSavedSections[t.preset_section_id]=e,i.resolve(ce.sek_userSavedSections)}).fail(function(e){i.reject(e)})):i.resolve(ce.sek_userSavedSections):_.isEmpty(ce.sek_presetSections)?(_.isUndefined(ce.sek_fetchingPresetSections)||"pending"!=ce.sek_fetchingPresetSections.state()?(e=wp.ajax.post("sek_get_preset_sections",{nonce:ce.settings.nonce.save}),ce.sek_fetchingPresetSections=e):e=ce.sek_fetchingPresetSections,e.done(function(e){ce.sek_presetSections=e,i.resolve(ce.sek_presetSections)}).fail(function(e){i.reject(e)})):i.resolve(ce.sek_presetSections),i.promise()},getPresetSectionCollection:function(r){var a=this,s=le.Deferred();return a._maybeFetchSectionsFromServer({is_user_section:r.is_user_section,preset_section_id:r.presetSectionId}).fail(function(e){s.reject(e)}).done(function(e){var t=le.extend(!0,{},_.isObject(e)?e:{});if(_.isEmpty(t))throw new Error("getPresetSectionCollection => Invalid collection");if(_.isEmpty(t[r.presetSectionId]))throw new Error('getPresetSectionCollection => the preset section : "'+r.presetSectionId+'" has not been found in the collection');var i=t[r.presetSectionId],n=function(e){return _.each(e,function(e){e.id=sektionsLocalizedData.optPrefixForSektionsNotSaved+a.guid(),_.isArray(e.collection)&&n(e.collection)}),e},o=function(e){return _.each(e,function(e){e.ver_ini=sektionsLocalizedData.nimbleVersion,_.isArray(e.collection)&&o(e.collection)}),e};i.id=r.section_id,i.collection=n(i.collection),i.ver_ini=sektionsLocalizedData.nimbleVersion,i.collection=o(i.collection),s.resolve(i)}),s.promise()},preparePresetSectionForInjection:function(o){var i=this,n={},r=le.Deferred(),a=function(e){return _.each(e,function(e,t){_.isObject(e)||_.isArray(e)?a(e):_.isString(e)&&-1!=e.indexOf("__img_url__")&&(_.has(n,e)||(n[e]=i.importAttachment(e.replace("__img_url__",""))))}),n},s=function(i,n){return _.each(i,function(e,t){_.isObject(e)||_.isArray(e)?s(e,n):_.isString(e)&&-1!=e.indexOf("__img_url__")&&_.has(n,e)&&_.isObject(n[e])&&(i[t]=n[e].id)}),o};return i.whenAllPromisesInParallel(a(o)).done(function(e){var t=s(o,e);r.resolve(t)}).fail(function(e){r.reject(e)}),r.promise()}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(n,o){o.extend(CZRSeksPrototype,{cleanRegistered:function(t){var i=this,e=o.extend(!0,[],i.registered()||[]);n.trigger("sek-before-clean-registered"),e=_.filter(e,function(e){if("setting"!==e.what&&n[e.what].has(e.id)){if(!_.isEmpty(t)&&e.id!==t)return;_.isFunction(n[e.what](e.id).trigger)&&i.trigger("sek-ui-pre-removal",{what:e.what,id:e.id}),o.when(n[e.what](e.id).container.remove()).done(function(){n[e.what].remove(e.id),i.trigger("sek-ui-removed",{what:e.what,id:e.id})})}return"setting"===e.what}),i.registered(e)},cleanRegisteredLocalOptionSettings:function(){var t=this.getLocalSkopeOptionId(),e=o.extend(!0,[],this.registered()||[]);e=_.filter(e,function(e){return e.id&&-1!==e.id.indexOf(t)&&n.has(e.id)&&n.remove(e.id),e.id&&-1===e.id.indexOf(t)}),this.registered(e)},cleanRegisteredLevelSettingsAfterHistoryNavigation:function(){var e=o.extend(!0,[],this.registered()||[]);e=_.filter(e,function(e){return!_.isEmpty(e.level)&&"setting"===e.what&&n.has(e.id)&&n.remove(e.id),_.isEmpty(e.level)&&"setting"===e.what}),this.registered(e)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{rootPanelFocus:function(){l.section.has(l.czr_activeSectionId())?l.section(l.czr_activeSectionId()).expanded(!1):l.section.each(function(e){e.expanded(!1)}),l.panel.each(function(e){e.expanded(!1)})},guid:function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+e()},getGlobalSectionsSettingId:function(){return sektionsLocalizedData.settingIdForGlobalSections},getLevelModel:function(i,n){var a=this,s="no_match",c=function(t,e,i,n){if(_.isUndefined(e)){var o=l(i)(),r=_.isObject(o)?d.extend(!0,{},o):d.extend(!0,{},a.getDefaultSektionSettingValue(n));e=_.isArray(r.collection)?r.collection:[]}return _.each(e,function(e){"no_match"==s&&(t===e.id?s=e:_.isArray(e.collection)&&c(t,e.collection,i,n))}),s};return _.isEmpty(n)?_.each({local:a.localSectionsSettingId(),global:a.getGlobalSectionsSettingId()},function(e,t){"no_match"===s&&c(i,n,e,t)}):c(i,n),s},isGlobalLocation:function(e){var t=!1;return e=e||{},_.has(e,"is_global_location")?t=e.is_global_location:_.has(e,"scope")?t="global"===e.scope:_.isEmpty(e.location)?_.isEmpty(e.in_sektion)?_.isEmpty(e.id)||(t=this.isChildOfAGlobalLocation(e.id)):t=this.isChildOfAGlobalLocation(e.in_sektion):t=this.isChildOfAGlobalLocation(e.location),t},isChildOfAGlobalLocation:function(e){var r=this,a=function(t,e){var i="no_match";if(_.isUndefined(e)){var n=l(r.getGlobalSectionsSettingId())(),o=_.isObject(n)?d.extend(!0,{},n):r.getDefaultSektionSettingValue("global");e=_.isArray(o.collection)?o.collection:[]}return _.each(e,function(e){"no_match"==i&&(t===e.id?i=e:_.isArray(e.collection)&&(i=a(t,e.collection)))}),i};return"no_match"!==a(e)},getLevelPositionInCollection:function(i,n){var a=this,s="no_match",c=function(i,e,n,o){if(_.isUndefined(e)){var t=l(n)(),r=_.isObject(t)?d.extend(!0,{},t):d.extend(!0,{},a.getDefaultSektionSettingValue(o));e=_.isArray(r.collection)?r.collection:[]}_.each(e,function(e,t){"no_match"==s&&(i===e.id?s=t:_.isArray(e.collection)&&c(i,e.collection,n,o))})};return _.isEmpty(n)?_.each({local:a.localSectionsSettingId(),global:a.getGlobalSectionsSettingId()},function(e,t){"no_match"===s&&c(i,e,t,n)}):c(i,n),s},getLevelProperty:function(e){if(e=_.extend({id:"",property:""},e),_.isEmpty(e.id))l.errare("getLevelProperty => invalid id provided");else{var t=this.getLevelModel(e.id);if("no_match"!=t){if(_.isObject(t))return t[e.property];l.errare("getLevelProperty => invalid model for id : "+e.id,t)}else l.errare("getLevelProperty => no level model found for id : "+e.id)}},cloneLevel:function(e){var t=this,i=t.getLevelModel(e);if("no_match"==i)throw new Error("cloneLevel => no match for level id : "+e);var n=d.extend(!0,{},i),o=function(e){if(_.isEmpty(e.id))throw new Error("cloneLevel => missing level id");if(e.id=sektionsLocalizedData.optPrefixForSektionsNotSaved+t.guid(),!_.isEmpty(e.collection)){if(!_.isArray(e.collection))throw new Error("cloneLevel => the collection must be an array for level id : "+e.id);_.each(e.collection,function(e){e.id=sektionsLocalizedData.optPrefixForSektionsNotSaved+t.guid(),o(e)})}return e};return o(n)},getDefaultItemModelFromRegisteredModuleData:function(e){if(!this.isModuleRegistered(e))return{};if(!sektionsLocalizedData.registeredModules[e].is_father){var t=sektionsLocalizedData.registeredModules[e].tmpl["item-inputs"],i={id:"",title:""};return _.each(t,function(e,t){switch(t){case"tabs":_.each(e,function(e){_.each(e.inputs,function(e,t){i[t]=e.default||""})});break;default:i[t]=e.default||""}}),i}l.errare("getDefaultItemModelFromRegisteredModuleData => Father modules should be treated specifically")},getRegisteredModuleProperty:function(e,t){return this.isModuleRegistered(e)?sektionsLocalizedData.registeredModules[e][t]:"not_set"},isModuleRegistered:function(e){return sektionsLocalizedData.registeredModules&&!_.isUndefined(sektionsLocalizedData.registeredModules[e])},sniffGFonts:function(e){var o=this,r=[],a=function(i,n,e){if(_.isUndefined(e)){var t=l(i)();e=_.isObject(t)?d.extend(!0,{},t):d.extend(!0,{},o.getDefaultSektionSettingValue(n))}_.each(e,function(e,t){_.isString(t)&&"_css"===t.substr(t.length-4)&&!0===o.inputIsAFontFamilyModifier(t)&&-1<e.indexOf("gfont")&&!_.contains(r,e)&&r.push(e),(_.isArray(e)||_.isObject(e))&&a(i,n,e)})};return(e=e||{is_global_location:!1}).is_global_location?a(o.getGlobalSectionsSettingId(),"global"):a(o.localSectionsSettingId(),"local"),r},getInputDefaultValue:function(i,n,e){var o=this;if(o.cachedDefaultInputValues=o.cachedDefaultInputValues||{},o.cachedDefaultInputValues[n]=o.cachedDefaultInputValues[n]||{},_.has(o.cachedDefaultInputValues[n],i))return o.cachedDefaultInputValues[n][i];if(_.isUndefined(sektionsLocalizedData.registeredModules))l.errare("getInputDefaultValue => missing sektionsLocalizedData.registeredModules");else if(_.isUndefined(sektionsLocalizedData.registeredModules[n]))l.errare("getInputDefaultValue => missing "+n+" in sektionsLocalizedData.registeredModules");else{if(!sektionsLocalizedData.registeredModules[n].is_father){_.isUndefined(e)&&(e=sektionsLocalizedData.registeredModules[n].tmpl);var r="no_default_value_specified";return _.each(e,function(e,t){"no_default_value_specified"===r&&(i!==t||_.isUndefined(e.default)||(r=e.default),"no_default_value_specified"===r&&(_.isArray(e)||_.isObject(e))&&(r=o.getInputDefaultValue(i,n,e)),"no_default_value_specified"!==r&&(o.cachedDefaultInputValues[n][i]=r))}),r}l.errare("getInputDefaultValue => Father modules should be treated specifically")}},getInputType:function(i,n,e){var o=this;if(o.cachedInputTypes=o.cachedInputTypes||{},o.cachedInputTypes[n]=o.cachedInputTypes[n]||{},_.has(o.cachedInputTypes[n],i))return o.cachedInputTypes[n][i];if(_.isUndefined(sektionsLocalizedData.registeredModules))l.errare("getInputType => missing sektionsLocalizedData.registeredModules");else if(_.isUndefined(sektionsLocalizedData.registeredModules[n]))l.errare("getInputType => missing "+n+" in sektionsLocalizedData.registeredModules");else{if(!sektionsLocalizedData.registeredModules[n].is_father){_.isUndefined(e)&&(e=sektionsLocalizedData.registeredModules[n].tmpl);var r="no_input_type_specified";return _.each(e,function(e,t){"no_input_type_specified"===r&&(i!==t||_.isUndefined(e.input_type)||(r=e.input_type),"no_input_type_specified"===r&&(_.isArray(e)||_.isObject(e))&&(r=o.getInputType(i,n,e)),"no_input_type_specified"!==r&&(o.cachedInputTypes[n][i]=r))}),r}l.errare("getInputType => Father modules should be treated specifically")}},getInputRegistrationParams:function(i,n,e){var o=this;if(o.cachedInputRegistrationParams=o.cachedInputRegistrationParams||{},o.cachedInputRegistrationParams[n]=o.cachedInputRegistrationParams[n]||{},_.has(o.cachedInputRegistrationParams[n],i))return o.cachedInputRegistrationParams[n][i];if(_.isUndefined(sektionsLocalizedData.registeredModules))l.errare("getInputRegistrationParams => missing sektionsLocalizedData.registeredModules");else if(_.isUndefined(sektionsLocalizedData.registeredModules[n]))l.errare("getInputRegistrationParams => missing "+n+" in sektionsLocalizedData.registeredModules");else{if(!sektionsLocalizedData.registeredModules[n].is_father){_.isUndefined(e)&&(e=sektionsLocalizedData.registeredModules[n].tmpl);var r={};return _.each(e,function(e,t){_.isEmpty(r)&&(i!==t||_.isUndefined(e.input_type)||(r=e),_.isEmpty(r)&&(_.isArray(e)||_.isObject(e))&&(r=o.getInputRegistrationParams(i,n,e)),_.isEmpty(r)||(o.cachedInputRegistrationParams[n][i]=r))}),r}l.errare("getInputRegistrationParams => Father modules should be treated specifically")}},inputIsAFontFamilyModifier:function(i,e){var n=this;if(n.cachedFontFamilyModifier=n.cachedFontFamilyModifier||{},_.has(n.cachedFontFamilyModifier,i))return n.cachedFontFamilyModifier[i];if(!_.isUndefined(sektionsLocalizedData.registeredModules)){_.isUndefined(e)&&(e=sektionsLocalizedData.registeredModules);var o="not_set";return _.each(e,function(e,t){"not_set"===o&&(i!==t||_.isUndefined(e.input_type)||(o=!_.isUndefined(e.refresh_fonts)&&e.refresh_fonts),"not_set"===o&&(_.isArray(e)||_.isObject(e))&&(o=n.inputIsAFontFamilyModifier(i,e)),"not_set"!==o&&(n.cachedFontFamilyModifier[i]=o))}),o}l.errare("inputIsAFontFamilyModifier => missing sektionsLocalizedData.registeredModules")},getModuleStartingValue:function(e){if(!sektionsLocalizedData.registeredModules)return l.errare("getModuleStartingValue => missing sektionsLocalizedData.registeredModules"),"no_starting_value";if(_.isUndefined(sektionsLocalizedData.registeredModules[e]))return l.errare("getModuleStartingValue => the module type "+e+" is not registered"),"no_starting_value";var t=sektionsLocalizedData.registeredModules[e].starting_value;return _.isEmpty(t)?"no_starting_value":t},selectNextTabbableOrFocusable:function(e){var t=d(e),i=d(":focus"),n=0;if(1===i.length){var o=t.index(i);o+1<t.length&&(n=o+1)}t.eq(n).focus()},selectPrevTabbableOrFocusable:function(e){var t=d(e),i=d(":focus"),n=t.length-1;if(1===i.length){var o=t.index(i);0<o&&(n=o-1)}t.eq(n).focus()},setupSelectInput:function(e){var n=this,t=(n.input_parent,n.module,l.czr_sektions.getInputRegistrationParams(n.id,n.module.module_type)),i={params:e=_.isEmpty(e)?t.choices:e};if(n.module.trigger("nimble-set-select-input-options",i),e=i.params,!_.isEmpty(e)&&_.isObject(e))switch(n.type){case"simpleselect":_.each(e,function(e,t){var i={value:t,html:e};t==n()?d.extend(i,{selected:"selected"}):"px"===t&&d.extend(i,{selected:"selected"}),d("select[data-czrtype]",n.container).append(d("<option>",i))}),d("select[data-czrtype]",n.container).selecter();break;case"multiselect":var o=n();o=_.isString(o)?[o]:o,o=_.isArray(o)?o:[],_.each(e,function(e,t){var i={value:t,html:e};_.contains(o,t)&&d.extend(i,{selected:"selected"}),d("select[data-czrtype]",n.container).append(d("<option>",i))}),d("select[data-czrtype]",n.container).czrSelect2({closeOnSelect:!0,templateSelection:function(e){return e.text.replace(/\u2013|\u2014/g,"")}}),d("select[data-czrtype]",n.container).on("change",function(){0===d(this).find("option:selected").length&&n([])});break;default:l.errare("::setupSelectInput => invalid input type => "+n.type)}else l.errare("api.czr_sektions.setupSelectInput => missing select options for input id => "+n.id+" in module "+n.module.module_type)},setupFontSizeAndLineHeightInputs:function(e){var t=this,i=d(".sek-font-size-line-height-wrapper",t.container),n=i.find("input[data-czrtype]").data("sek-unit"),o=function(e){return _.contains(["px","em","%"],e)||(l.errare("error : invalid unit for input "+t.id,e),e="px"),e};t.css_unit=new l.Value(_.isEmpty(n)?"px":o(n)),t.css_unit.bind(function(e){e=_.isEmpty(e)?"px":e,i.find('input[type="number"]').trigger("change")}),i.find('input[type="number"]').on("input change",function(e){t(d(this).val()+o(t.css_unit()))}).stepper(),i.on("click","[data-sek-unit]",function(e){e.preventDefault(),i.find("[data-sek-unit]").removeClass("is-selected").attr("aria-pressed",!1),d(this).addClass("is-selected").attr("aria-pressed",!0),i.find("input[data-czrtype]").data("sek-unit",d(this).data("sek-unit")),t.css_unit(d(this).data("sek-unit"))}),i.find('.sek-ui-button[data-sek-unit="'+n+'"]').addClass("is-selected").attr("aria-pressed",!0)},maybeSetupDeviceSwitcherForInput:function(){var i=this,e=['<span class="sek-input-device-switcher">','<i data-sek-device="desktop" class="sek-switcher preview-desktop active" title="'+sektionsLocalizedData.i18n["Settings on desktops"]+'"></i>','<i data-sek-device="tablet" class="sek-switcher preview-tablet" title="'+sektionsLocalizedData.i18n["Settings on tablets"]+'"></i>','<i data-sek-device="mobile" class="sek-switcher preview-mobile" title="'+sektionsLocalizedData.i18n["Settings on mobiles"]+'"></i>',"</span>"].join(" ");i.container.find(".customize-control-title").prepend(e),i.previewedDevice=new l.Value(l.previewedDevice()),syncWithPreviewedDevice=function(e){e.stopPropagation(),i.container.find("[data-sek-device]").removeClass("active"),d(this).addClass("active");var t="desktop";try{t=d(this).data("sek-device")}catch(e){l.errare("maybeSetupDeviceSwitcherForInput => error when binding sek-switcher",e)}try{l.previewedDevice(t)}catch(e){l.errare("maybeSetupDeviceSwitcherForInput => error when setting the previewed device",e)}i.previewedDevice(t)},i.container.on("click","[data-sek-device]",syncWithPreviewedDevice);var t=i.container.find('[data-sek-device="'+l.previewedDevice()+'"]');0<t.length&&t.trigger("click")},scheduleModuleAccordion:function(e){e=e||{expand_first_control:!0};var i=this;if(d(i.container).on("click",".customize-control label > .customize-control-title",function(e){e.stopPropagation();var t=d(this).closest(".customize-control");"no"!==t.attr("data-sek-accordion")&&(i.container.find(".customize-control").not(t).each(function(){d(this).attr("data-sek-accordion")||(d(this).attr("data-sek-expanded","false"),d(this).find(".czr-items-wrapper").stop(!0,!0).slideUp(0))}),t.find(".czr-items-wrapper").stop(!0,!0).slideToggle({duration:0,start:function(){t.attr("data-sek-expanded","false"==t.attr("data-sek-expanded")?"true":"false"),t.trigger("true"==t.attr("data-sek-expanded")?"sek-accordion-expanded":"sek-accordion-collapsed")}}))}),e.expand_first_control){var t=_.first(i.controls());_.isObject(t)&&!_.isEmpty(t.id)&&l.control(t.id,function(e){e.container.trigger("sek-accordion-expanded"),i.container.find(".customize-control").first().find("label > .customize-control-title").trigger("click")})}},isPromise:function(e){return e&&"function"==typeof e.then&&String(d.Deferred().then)===String(e.then)},whenAllPromisesInParallel:function(e){var i=this,t=d.Deferred(),n=[],o=_.keys(e);return _.each(e,function(e,t){n.push(d.Deferred(function(t){(i.isPromise(e)?e:d.Deferred()).done(t.resolve).fail(function(e){t.reject(e)})}))}),d.when.apply(this,n).done(function(){var i={},e=Array.prototype.slice.call(arguments);_.each(e,function(e,t){i[o[t]]=e}),t.resolve(i)}).fail(t.reject),t},whenAllPromisesInSerie:function(t,i,n,o){i=i||0,n=n||{},o=o||d.Deferred();var r=this;if(_.isArray(t)){var e=t[i];(r.isPromise(e)?e:d.Deferred(function(e){e.resolve()})).always(function(e){n[i]=e,i+1==t.length?o.resolve(n):i+1<t.length&&r.whenAllPromisesInSerie(t,i+1,n,o)})}return o},importAttachment:function(t){return wp.ajax.post("sek_import_attachment",{img_url:t,nonce:l.settings.nonce.save}).fail(function(e){l.errare("sek_import_attachment ajax action failed for image "+t,e)})},cleanIds:function(e){e.id="";var t=this;return _.each(e.collection,function(e){e.id="",_.isArray(e.collection)&&t.cleanIds(e)}),e},getDefaultSektionSettingValue:function(e){return!_.isUndefined(e)&&_.contains(["local","global"],e)||l.errare("getDefaultSektionSettingValue => the skope should be set to local or global"),"global"===e?sektionsLocalizedData.defaultGlobalSektionSettingValue:sektionsLocalizedData.defaultLocalSektionSettingValue},scheduleVisibilityOfInputId:function(t,i){var n=this.input_parent;if(!_.isFunction(i)||_.isEmpty(t))throw new Error("::scheduleVisibilityOfInputId => error when firing for input id : "+this.id);n.czr_Input(t).visible(i()),this.bind(function(e){n.czr_Input(t).visible(i())})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(s,m){m.extend(CZRSeksPrototype,{setupDnd:function(){var t=this;t.bind("sek-refresh-dragzones",function(e){!0!="draggable"in document.createElement("span")&&s.panel(sektionsLocalizedData.sektionsPanelId,function(e){s.notifications.add(new s.Notification("drag-drop-support",{type:"error",message:sektionsLocalizedData.i18n["This browser does not support drag and drop. You might need to update your browser or use another one."],dismissible:!0})),_.delay(function(){s.notifications.remove("drag-drop-support")},1e4)}),t.setupNimbleDragZones(e.input_container)}),s.previewer.bind("ready",function(){try{t.setupNimbleDropZones()}catch(e){s.errare("::setupDnd => error on self.setupNimbleDropZones()",e)}_.isUndefined(_.findWhere(t.registered(),{module_type:"sek_intro_sec_picker_module"}))&&_.isUndefined(_.findWhere(t.registered(),{module_type:"sek_module_picker_module"}))||t.rootPanelFocus()}),t.reactToDrop()},setupNimbleDragZones:function(e){var n=this,o=function(){s.notifications.add(new s.Notification("missing-injection-target",{type:"info",message:sektionsLocalizedData.i18n["You first need to click on a target ( with a + icon ) in the preview."],dismissible:!0})),_.delay(function(){s.notifications.remove("missing-injection-target")},3e4)};e.find('[draggable="true"]').each(function(){m(this).on("dragstart",function(e){(function(e){n.lastClickedTargetInPreview({}),e.originalEvent.dataTransfer.setData("sek-content-type",m(this).data("sek-content-type")),e.originalEvent.dataTransfer.setData("sek-content-id",m(this).data("sek-content-id")),e.originalEvent.dataTransfer.setData("sek-section-type",m(this).data("sek-section-type")),e.originalEvent.dataTransfer.setData("sek-is-user-section",m(this).data("sek-is-user-section")),n.dndData={content_type:e.originalEvent.dataTransfer.getData("sek-content-type"),content_id:e.originalEvent.dataTransfer.getData("sek-content-id"),section_type:e.originalEvent.dataTransfer.getData("sek-section-type"),is_user_section:"true"===e.originalEvent.dataTransfer.getData("sek-is-user-section")};try{e.originalEvent.dataTransfer.setData("browserSupport","browserSupport"),e.originalEvent.dataTransfer.clearData("browserSupport")}catch(e){s.panel(sektionsLocalizedData.sektionsPanelId,function(e){s.notifications.add(new s.Notification("drag-drop-support",{type:"error",message:sektionsLocalizedData.i18n["This browser does not support drag and drop. You might need to update your browser or use another one."],dismissible:!0})),_.delay(function(){s.notifications.remove("drag-drop-support")},1e4)})}m(this).addClass("sek-dragged"),m("body").addClass("sek-dragging"),s.previewer.send("sek-drag-start",{type:n.dndData.content_type})}).call(m(this),e)}).on("dragend",function(e){(function(e){m("body").removeClass("sek-dragging"),m(this).removeClass("sek-dragged"),s.previewer.send("sek-drag-stop")}).call(m(this),e)}).dblclick(function(e){(function(e){var t,i=n.lastClickedTargetInPreview();!_.isEmpty(i)&&i.id?t=n.dnd_getDropZonesElements().find('[data-sek-id="'+i.id+'"]').find(".sek-module-drop-zone-for-first-module").first():o(),t&&0<t.length?(s.czr_sektions.trigger("sek-content-dropped",{drop_target_element:t,location:t.closest('[data-sek-level="location"]').data("sek-id"),before_module:t.data("drop-zone-before-module-or-nested-section"),after_module:t.data("drop-zone-after-module-or-nested-section"),before_section:t.data("drop-zone-before-section"),after_section:t.data("drop-zone-after-section"),content_type:m(this).data("sek-content-type"),content_id:m(this).data("sek-content-id"),section_type:m(this).data("sek-section-type"),is_user_section:"true"===m(this).data("sek-is-user-section")}),n.lastClickedTargetInPreview({})):(o(),s.errare("Double click insertion => the target zone was not found"))}).call(m(this),e)})})},setupNimbleDropZones:function(){var t=this;if(this.$dropZones=this.dnd_getDropZonesElements(),this.preDropElement=m("<div>",{class:sektionsLocalizedData.preDropElementClass,html:""}),this.$dropZones.length<1)throw new Error("::setupNimbleDropZones => invalid Dom element");this.$dropZones.each(function(){var e=m(this);!0!==e.data("zone-droppable-setup")&&(t.enterOverTimer=null,e.on("dragenter dragover",sektionsLocalizedData.dropSelectors,function(e){_.isNull(t.enterOverTimer)&&(t.enterOverTimer=!0,_.delay(function(){t.currentMousePosition&&t.currentMousePosition+""==e.clientY+""+e.clientX?t.enterOverTimer=null:(t.currentMousePosition=e.clientY+""+e.clientX,t.dnd_toggleDragApproachClassesToDropZones(e))},100)),t.dnd_canDrop({targetEl:m(this),evt:e})&&(e.stopPropagation(),t.dnd_OnEnterOver(m(this),e))}).on("dragleave drop",sektionsLocalizedData.dropSelectors,function(e){switch(e.type){case"dragleave":t.dnd_isOveringDropTarget(m(this),e)||t.dnd_cleanOnLeaveDrop(m(this),e);break;case"drop":if(this.$cachedDropZoneCandidates=null,!t.dnd_canDrop({targetEl:m(this),evt:e}))return;e.preventDefault(),t.dnd_onDrop(m(this),e),t.dnd_cleanOnLeaveDrop(m(this),e),s.previewer.send("sek-drag-stop")}}).data("zone-droppable-setup",!0))})},dnd_isInTarget:function(e,t){var i=t.clientY,n=t.clientX,o=e[0].getBoundingClientRect(),r=n<=o.right&&o.left<=n;return i>=o.top&&o.bottom>=i&&r},dnd_toggleDragApproachClassesToDropZones:function(u){var p=this;this.$dropZones=this.$dropZones||this.dnd_getDropZonesElements(),this.$cachedDropZoneCandidates=_.isEmpty(this.$cachedDropZoneCandidates)?this.$dropZones.find(".sek-drop-zone"):this.$cachedDropZoneCandidates,this.distanceTable=[],this.$dropZones.find(".sek-drop-zone").each(function(){var e,t,i=u.clientY,n=u.clientX,o=m(this)[0].getBoundingClientRect(),r=Math.abs(i-(o.bottom-(o.bottom-o.top)/2)),a=(Math.abs(o.top-i),Math.abs(n-(o.right-(o.right-o.left)/2))),s=(o.right,o.left,r<50),c=a<50,l=n<=o.right&&o.left<=n,d=i>=o.top&&o.bottom>=i;p.distanceTable.push({el:m(this),dist:d&&l?0:(e=a,t=r,Math.sqrt(e*e+t*t))}),m(this).removeClass("sek-drag-is-in"),(s||d)&&(c||l)?(m(this).removeClass("sek-drag-is-approaching"),m(this).removeClass("sek-drag-is-close"),m(this).addClass("sek-drag-is-very-close")):(m(this).removeClass("sek-drag-is-approaching"),m(this).removeClass("sek-drag-is-close"),m(this).removeClass("sek-drag-is-very-close")),m(this).removeClass("sek-drag-is-in")});var t=_.min(_.pluck(p.distanceTable,"dist"));p.$dropTargetCandidate=null,_.each(p.distanceTable,function(e){_.isNull(p.$dropTargetCandidate)&&t===e.dist&&(p.$dropTargetCandidate=e.el)}),p.$dropTargetCandidate&&0<p.$dropTargetCandidate.length&&p.dnd_isInTarget(p.$dropTargetCandidate,u)&&p.$dropTargetCandidate.addClass("sek-drag-is-in"),p.enterOverTimer=null},dnd_getPreDropElementContent:function(e){var t,i,n=m(e.currentTarget);switch(this.dndData.content_type){case"module":t=sektionsLocalizedData.i18n["Insert here"],0<n.length&&("between-sections"!==n.data("sek-location")&&"in-empty-location"!==n.data("sek-location")||(t=sektionsLocalizedData.i18n["Insert in a new section"])),i='<div class="sek-module-placeholder-content"><p>'+t+"</p></div>";break;case"preset_section":i='<div class="sek-module-placeholder-content"><p>'+(t=sektionsLocalizedData.i18n["Insert a new section here"])+"</p></div>";break;default:s.errare("::dnd_getPreDropElementContent => invalid content type provided")}return i},dnd_getDropZonesElements:function(){return m(s.previewer.targetWindow().document)},dnd_canDrop:function(e){var t=this,i=(e=_.extend({targetEl:{},evt:{}},e||{})).targetEl;if(!_.isObject(i)||i.length<1)return!1;if(i.closest('[data-sek-level="location"]').length<1)return!1;var n=i.hasClass("sek-content-preset_section-drop-zone"),o=i.hasClass("sek-module-drop-zone-for-first-module"),r=!0===i.closest('[data-sek-level="location"]').data("sek-is-header-location"),a=!0===i.closest('[data-sek-level="location"]').data("sek-is-footer-location"),s="preset_section"===t.dndData.content_type&&"content"===t.dndData.section_type,c=function(e){m(".sek-no-drop-possible-message",i).length<1&&i.append(['<div class="sek-no-drop-possible-message">','<i class="material-icons">not_interested</i>',e,"</div>"].join(""))};return(r||a)&&s?(c(r?sektionsLocalizedData.i18n["Header location only accepts modules and pre-built header sections"]:sektionsLocalizedData.i18n["Footer location only accepts modules and pre-built footer sections"]),!1):a&&"preset_section"===t.dndData.content_type&&"header"===t.dndData.section_type?(c(sektionsLocalizedData.i18n["You can't drop a header section in the footer location"]),!1):r&&"preset_section"===t.dndData.content_type&&"footer"===t.dndData.section_type?(c(sektionsLocalizedData.i18n["You can't drop a footer section in the header location"]),!1):i.hasClass("sek-drop-zone")&&("preset_section"===t.dndData.content_type&&n||"module"===t.dndData.content_type&&!n||"preset_section"===t.dndData.content_type&&o)},dnd_OnEnterOver:function(e,t){t.preventDefault(),!0!==e.data("is-drag-entered")&&(e.data("is-drag-entered",!0),e.addClass("sek-active-drop-zone"),this.$dropZones.addClass("sek-is-dragging"));try{this.dnd_mayBePrintPreDropElement(e,t)}catch(e){s.errare("Error when trying to insert the preDrop content",e)}},dnd_cleanOnLeaveDrop:function(e,t){var i=this;this.$dropZones=this.$dropZones||this.dnd_getDropZonesElements(),this.preDropElement.remove(),this.$dropZones.removeClass("sek-is-dragging"),m(sektionsLocalizedData.dropSelectors,this.$dropZones).each(function(){i.dnd_cleanSingleDropTarget(m(this))})},dnd_cleanSingleDropTarget:function(e){_.isEmpty(e)||e.length<1||(e.data("is-drag-entered",!1),e.data("preDrop-position",!1),e.removeClass("sek-active-drop-zone"),e.find(".sek-drop-zone").removeClass("sek-drag-is-close"),e.find(".sek-drop-zone").removeClass("sek-drag-is-approaching"),e.removeClass("sek-feed-me-seymore"),e.find(".sek-no-drop-possible-message").remove())},dnd_getPosition:function(e,t){var i=e[0].getBoundingClientRect(),n=i.height;return"before"===e.data("preDrop-position")?n+=this.preDropElement.outerHeight():"after"===e.data("preDrop-position")&&(n-=this.preDropElement.outerHeight()),0<t.originalEvent.clientY-i.top-n/2?"after":"before"},dnd_mayBePrintPreDropElement:function(e,t){var i=this,n=e.data("preDrop-position"),o=this.dnd_getPosition(e,t);if(n!==o&&!0!==i.isPrintingPreDrop){i.isPrintingPreDrop=!0,this.dnd_cleanSingleDropTarget(this.$currentPreDropTarget);var r="between-sections"===e.data("sek-location")||"in-empty-location"===e.data("sek-location");m.when(i.preDropElement.remove()).done(function(){e["before"===o?"prepend":"append"](i.preDropElement).find("."+sektionsLocalizedData.preDropElementClass).html(i.dnd_getPreDropElementContent(t)),e.find("."+sektionsLocalizedData.preDropElementClass).toggleClass("in-new-sektion",r),e.data("preDrop-position",o),e.addClass("sek-feed-me-seymore"),i.isPrintingPreDrop=!1,i.$currentPreDropTarget=e})}},dnd_isOveringDropTarget:function(e,t){var i=e[0].getBoundingClientRect(),n=t.clientX,o=t.clientY,r=i.left,a=i.right,s=i.top,c=i.bottom;return r<=n&&n-r<=a-r&&(s<=o&&o-s<=c-s)},dnd_onDrop:function(e,t){t.stopPropagation();this.dnd_getPosition(e,t),e.index();s.czr_sektions.trigger("sek-content-dropped",{drop_target_element:e,location:e.closest('[data-sek-level="location"]').data("sek-id"),before_module:e.data("drop-zone-before-module-or-nested-section"),after_module:e.data("drop-zone-after-module-or-nested-section"),before_section:e.data("drop-zone-before-section"),after_section:e.data("drop-zone-after-section"),content_type:t.originalEvent.dataTransfer.getData("sek-content-type"),content_id:t.originalEvent.dataTransfer.getData("sek-content-id"),section_type:t.originalEvent.dataTransfer.getData("sek-section-type"),is_user_section:"true"===t.originalEvent.dataTransfer.getData("sek-is-user-section")})},reactToDrop:function(){this.bind("sek-content-dropped",function(e){try{!function(e){if(!_.isObject(e))throw new Error("Invalid params provided");if(e.drop_target_element.length<1)throw new Error("Invalid drop_target_element");var t=e.drop_target_element,i="content-in-column";switch(t.data("sek-location")){case"between-sections":i="content-in-a-section-to-create";break;case"in-empty-location":e.is_first_section=!0,e.send_to_preview=!1,i="content-in-empty-location";break;case"between-columns":i="content-in-new-column"}if("preset_section"===e.content_type)if(t.hasClass("sek-module-drop-zone-for-first-module")){var n=t.closest('div[data-sek-level="section"]');1<n.find(".sek-sektion-inner").first().children('[data-sek-level="column"]').length?(i="preset-section-in-a-nested-section-to-create",e.is_nested=!0,e.in_column=t.closest('[data-sek-level="column"]').data("sek-id"),e.in_sektion=n.data("sek-id")):(e.sektion_to_replace=n.data("sek-id"),e.after_section=e.sektion_to_replace,e.in_column=n.closest('[data-sek-level="column"]').data("sek-id"),i="content-in-a-section-to-replace")}else"between-sections"===t.data("sek-location")&&(i="content-in-a-section-to-create");switch(i){case"content-in-column":var o=t.closest("div[data-sek-level]");if(o.length<1)throw new Error("No valid level dom element found");var r=o.data("sek-level"),a=o.data("sek-id");if(_.isEmpty(r)||_.isEmpty(a))throw new Error("No valid level id found");s.previewer.trigger("sek-add-module",{level:r,id:a,in_column:t.closest('div[data-sek-level="column"]').data("sek-id"),in_sektion:t.closest('div[data-sek-level="section"]').data("sek-id"),before_module:e.before_module,after_module:e.after_module,content_type:e.content_type,content_id:e.content_id});break;case"content-in-a-section-to-create":case"content-in-a-section-to-replace":s.previewer.trigger("sek-add-content-in-new-sektion",e);break;case"preset-section-in-a-nested-section-to-create":s.previewer.trigger("sek-add-preset-section-in-new-nested-sektion",e);break;case"content-in-empty-location":s.previewer.trigger("sek-add-content-in-new-sektion",e);break;default:s.errare("sek control panel => ::reactToDrop => invalid drop case : "+i)}}(e)}catch(e){s.errare("error when reactToDrop",e)}})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{setupTinyMceEditor:function(){var n=this;l.sekEditorExpanded=new l.Value(!1),n.editorEventsListenerSetup=!1,n.$editorPane=d("#czr-customize-content_editor-pane"),n.$editorDragbar=d("#czr-customize-content_editor-dragbar"),n.$preview=d("#customize-preview"),n.$collapseSidebar=d(".collapse-sidebar"),n.attachResizeEventsToEditor();d("#customize-theme-controls").on("click",'[data-czr-action="open-tinymce-editor"]',function(){var e=d(this).data("czr-control-id"),t=d(this).data("czr-input-id");_.isEmpty(e)||_.isEmpty(t)?l.errare("toggle-tinymce-editor => missing input or control id"):l.sekEditorExpanded(!0)}),l.sekEditorExpanded.bind(function(e,t,i){!function(){l.sekTinyMceEditor=tinyMCE.get(sektionsLocalizedData.idOfDetachedTinyMceTextArea);var e=function(){!1===n.editorEventsListenerSetup&&(n.editorEventsListenerSetup=!0,n.trigger("sek-tiny-mce-editor-bound-and-instantiated"))};l.sekTinyMceEditor&&(l.sekTinyMceEditor.initialized?e():l.sekTinyMceEditor.on("init",function(){e()}))}(),e&&l.sekTinyMceEditor&&l.sekTinyMceEditor.focus(),d(document.body).toggleClass("czr-customize-content_editor-pane-open",e),d(window)[e?"on":"off"]("resize",function(){l.sekEditorExpanded()&&_.delay(function(){n.czrResizeEditor(window.innerHeight-n.$editorPane.height())},50)}),e?(n.czrResizeEditor(window.innerHeight-n.$editorPane.height()),_.delay(function(){d(window).trigger("resize")},100)):(n.$preview.css("bottom",""),n.$collapseSidebar.css("bottom",""))}),d("#czr-customize-content_editor-pane").on("click",'[data-czr-action="close-tinymce-editor"]',function(){l.sekEditorExpanded(!1)}),d("#customize-controls").on("click",function(e){"open-tinymce-editor"!=d(e.target).data("czr-action")&&l.sekEditorExpanded(!1,{context:"clicked anywhere"})}),d(document).on("keydown",_.throttle(function(e){27===e.keyCode&&l.sekEditorExpanded(!1)},50)),n.bind("sek-tiny-mce-editor-bound-and-instantiated",function(){var e=d(l.sekTinyMceEditor.iframeElement).contents().get(0);d(e).on("keydown",_.throttle(function(e){27===e.keyCode&&l.sekEditorExpanded(!1)},50))}),_.each(["sek-click-on-inactive-zone","sek-add-section","sek-add-column","sek-add-module","sek-remove","sek-move","sek-duplicate","sek-resize-columns","sek-add-content-in-new-sektion","sek-pick-content","sek-edit-options","sek-edit-module","sek-notify"],function(e){"sek-edit-module"!=e?l.previewer.bind(e,function(){l.sekEditorExpanded(!1)}):l.previewer.bind(e,function(e){l.sekEditorExpanded("czr_tiny_mce_editor_module"===e.module_type)})})},attachResizeEventsToEditor:function(){var t=this;d("#czr-customize-content_editor-pane").on("mousedown mouseup",function(e){if(("mousedown"!==e.type||"czr-customize-content_editor-dragbar"===d(e.target).attr("id")||d(e.target).hasClass("czr-resize-handle"))&&l.sekEditorExpanded())switch(e.type){case"mousedown":d(document).on("mousemove."+sektionsLocalizedData.idOfDetachedTinyMceTextArea,function(e){e.preventDefault(),d(document.body).addClass("czr-customize-content_editor-pane-resize"),d("#czr-customize-content_editor_ifr").css("pointer-events","none"),t.czrResizeEditor(e.pageY)});break;case"mouseup":d(document).off("mousemove."+sektionsLocalizedData.idOfDetachedTinyMceTextArea),d(document.body).removeClass("czr-customize-content_editor-pane-resize"),d("#czr-customize-content_editor_ifr").css("pointer-events","")}})},czrResizeEditor:function(e){var t,i=this,n=window.innerHeight,o=(window.innerWidth,{}),r=d("#czr-customize-content_editor_ifr"),a=d("#wp-czr-customize-content_editor-tools"),s=i.$editorPane.find(".mce-toolbar-grp"),c=i.$editorPane.find(".mce-statusbar");l.sekEditorExpanded()&&(_.isNaN(e)||(t=n-e),o.height=t,o.components=a.outerHeight()+s.outerHeight()+c.outerHeight(),t<40&&(o.height=40),n-1<t&&(o.height=n-1),n<i.$editorPane.outerHeight()&&(o.height=n),i.$preview.css("bottom",o.height),i.$editorPane.css("height",o.height),r.css("height",o.height-o.components))}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(t,e){jQuery.extend(CZRSeksPrototype,t.Events);var i=t.Class.extend(CZRSeksPrototype);try{t.czr_sektions=new i}catch(e){t.errare("api.czr_sektions => problem on instantiation",e)}}(wp.customize),function(l,d,u){l.czrInputMap=l.czrInputMap||{};var p=function(e){return u.contains(["px","em","%"],e)||(l.errare("error : invalid unit for input "+this.id,e),e="px"),e},_=function(i){var n=this;i.on("click",".sek-ui-button",function(e,t){e.preventDefault(),i.find(".sek-ui-button").removeClass("is-selected").attr("aria-pressed",!1),d(this).addClass("is-selected").attr("aria-pressed",!0),n.css_unit(d(this).data("sek-unit"),t)}),i.find('.sek-ui-button[data-sek-unit="'+(n.initial_unit||"px")+'"]').addClass("is-selected").attr("aria-pressed",!0)},m=function(t,i){var n=this;t.on("click",".reset-spacing-wrap",function(e){e.preventDefault(),t.find('input[type="number"]').each(function(){d(this).val("")}),n(i),d(".sek-unit-wrapper",t).find('[data-sek-unit="px"]').trigger("click")})};d.extend(l.czrInputMap,{spacing:function(e){var o=this,i=d(".sek-spacing-wrapper",o.container),t=l.czr_sektions.getInputRegistrationParams(o.id,o.module.module_type),n=u.isEmpty(t)||u.isEmpty(t.default)?[]:t.default;if(i.on("input",'input[type="number"]',function(e){var t=d(this).closest("[data-sek-spacing]").data("sek-spacing"),i=d.extend(!0,{},u.isObject(o())?o():{}),n=d(this).val();u.isString(n)&&!u.isEmpty(n)||u.isNumber(n)?i[t]=n:i=u.omit(i,t),o(i)}),m.call(o,i,n),u.isObject(o())){u.each(o(),function(e,t){d('[data-sek-spacing="'+t+'"]',i).find('input[type="number"]').val(e)});var r="px";d(".sek-unit-wrapper .sek-ui-button",o.container).each(function(){var e=d(this).data("sek-unit");u.isEmpty(o())||u.isEmpty(o().unit)||e===o().unit&&(r=e)}),d(".sek-unit-wrapper",o.container).find('[data-sek-unit="'+p.call(o,r)+'"]').trigger("click")}var a=o();o.initial_unit="px",u.isEmpty(a)||(o.initial_unit=u.isEmpty(a.unit)?"px":a.unit),o.css_unit=new l.Value(p.call(o,o.initial_unit)),o.css_unit.bind(function(e){var t;e=u.isEmpty(e)?"px":e,(t=d.extend(!0,{},u.isObject(o())?o():{})).unit=e,o(t)}),_.call(o,i)}}),d.extend(l.czrInputMap,{spacingWithDeviceSwitcher:function(e){var r=this,a=d(".sek-spacing-wrapper",r.container),t=l.czr_sektions.getInputRegistrationParams(r.id,r.module.module_type),s=u.isEmpty(t)||u.isEmpty(t.default)?{}:t.default,c=function(e,t){var i=["mobile","tablet","desktop"];if(u.has(e,t))return e[t];var n=u.findIndex(i,function(e){return t===e});return!u.isEmpty(t)&&n<i.length?c(e,i[n+1]):{}},i=function(e){var t=d.extend(!0,{},u.isObject(r())?r():{}),i=d.extend(!0,{},s);t=u.isObject(t)?d.extend(i,t):i;var n=c(t,e);d("[data-sek-spacing]",a).each(function(){var e=d(this).data("sek-spacing"),t="";u.isEmpty(n)||u.isEmpty(n[e])||(t=n[e]),d(this).find('input[type="number"]').val(t)});var o="px";d(".sek-unit-wrapper .sek-ui-button",r.container).each(function(){var e=d(this).data("sek-unit");u.isEmpty(n)||u.isEmpty(n.unit)||e===n.unit&&(o=e)}),d(".sek-unit-wrapper",r.container).find('[data-sek-unit="'+p.call(r,o)+'"]').trigger("click",{previewed_device_switched:!0})};l.czr_sektions.maybeSetupDeviceSwitcherForInput.call(r);var n=r();r.initial_unit="px",u.isEmpty(n)||u.isEmpty(n[r.previewedDevice()])||(r.initial_unit=u.isEmpty(n[r.previewedDevice()].unit)?"px":n[r.previewedDevice()].unit),r.css_unit=new l.Value(p.call(r,r.initial_unit)),a.on("input",'input[type="number"]',function(e){var t,i=d(this).closest("[data-sek-spacing]").data("sek-spacing"),n=d(this).val(),o=l.previewedDevice()||"desktop";(t=d.extend(!0,{},u.isObject(r())?r():{}))[o]=d.extend(!0,{},t[o]||{}),u.isString(n)&&!u.isEmpty(n)||u.isNumber(n)?t[o][i]=n:t[o]=u.omit(t[o],i),r(t)}),m.call(r,a,s),r.previewedDevice.bind(function(e){try{i(e)}catch(e){l.errare("Error when firing syncWithPreviewedDevice for input type spacingWithDeviceSwitcher for input id "+r.id,e)}}),r.css_unit.bind(function(e,t,i){if(!u.isObject(i)||!0!==i.previewed_device_switched){e=u.isEmpty(e)?"px":e;var n,o=r.previewedDevice()||"desktop";(n=d.extend(!0,{},u.isObject(r())?r():{}))[o]=d.extend(!0,{},n[o]||{}),n[o].unit=e,r(n)}}),_.call(r,a);try{i(l.previewedDevice())}catch(e){l.errare("Error when firing syncWithPreviewedDevice for input type spacingWithDeviceSwitcher for input id "+r.id,e)}}})}(wp.customize,jQuery,_),function(n,s,c){n.czrInputMap=n.czrInputMap||{},s.extend(n.czrInputMap,{bg_position:function(e){var t=this;s(".sek-bg-pos-wrapper",t.container).on("change",'input[type="radio"]',function(e){t(s(this).val())}),c.isEmpty(t())||t.container.find('input[value="'+t()+'"]').attr("checked",!0).trigger("click")},bgPositionWithDeviceSwitcher:function(e){var o=this,t=n.czr_sektions.getInputRegistrationParams(o.id,o.module.module_type),r=c.isEmpty(t)||c.isEmpty(t.default)?{}:t.default;n.czr_sektions.maybeSetupDeviceSwitcherForInput.call(o);var a=function(e,t){var i=["mobile","tablet","desktop"];if(c.has(e,t))return e[t];var n=c.findIndex(i,function(e){return t===e});return!c.isEmpty(t)&&n<i.length?a(e,i[n+1]):{}},i=function(e){var t=s.extend(!0,{},c.isObject(o())?o():{}),i=s.extend(!0,{},r);t=c.isObject(t)?s.extend(i,t):i;var n=a(t,e);o.container.find('input[value="'+n+'"]').attr("checked",!0).trigger("click",{previewed_device_switched:!0})};s(".sek-bg-pos-wrapper",o.container).on("change",'input[type="radio"]',function(e){var t,i=s(this).val();(t=s.extend(!0,{},c.isObject(o())?o():{}))[n.previewedDevice()||"desktop"]=i,o(t)}),o.previewedDevice.bind(function(e){try{i(e)}catch(e){n.errare("Error when firing syncWithPreviewedDevice for input type spacingWithDeviceSwitcher for input id "+o.id,e)}});try{i(n.previewedDevice())}catch(e){n.errare("Error when firing syncWithPreviewedDevice for input type bgPositionWithDeviceSwitcher for input id "+o.id,e)}}})}(wp.customize,jQuery,_),function(c,l,d){c.czrInputMap=c.czrInputMap||{};var e=function(e){var o=this,t=c.czr_sektions.getInputRegistrationParams(o.id,o.module.module_type),r=d.isEmpty(t)||d.isEmpty(t.default)?{}:t.default,i="verticalAlignWithDeviceSwitcher"===o.type?".sek-v-align-wrapper":".sek-h-align-wrapper",a=l(i,o.container);c.czr_sektions.maybeSetupDeviceSwitcherForInput.call(o);var s=function(e,t){var i=["mobile","tablet","desktop"];if(d.has(e,t))return e[t];var n=d.findIndex(i,function(e){return t===e});return!d.isEmpty(t)&&n<i.length?s(e,i[n+1]):{}},n=function(e){var t=l.extend(!0,{},d.isObject(o())?o():{}),i=l.extend(!0,{},r);t=d.isObject(t)?l.extend(i,t):i;var n=s(t,e);a.find(".selected").removeClass("selected"),a.find('div[data-sek-align="'+n+'"]').addClass("selected")};a.on("click","[data-sek-align]",function(e){var t;e.preventDefault(),(t=l.extend(!0,{},d.isObject(o())?o():{}))[c.previewedDevice()||"desktop"]=l(this).data("sek-align"),a.find(".selected").removeClass("selected"),l.when(l(this).addClass("selected")).done(function(){o(t)})}),o.previewedDevice.bind(function(e){try{n(e)}catch(e){c.errare("Error when firing syncWithPreviewedDevice for input type : "+o.type+" for input id "+o.id,e)}});try{n(c.previewedDevice())}catch(e){c.errare("Error when firing syncWithPreviewedDevice for input type : "+o.type+" for input id "+o.id,e)}};l.extend(c.czrInputMap,{horizTextAlignmentWithDeviceSwitcher:e,horizAlignmentWithDeviceSwitcher:e,verticalAlignWithDeviceSwitcher:e})}(wp.customize,jQuery,_),function(t,e,i){t.czrInputMap=t.czrInputMap||{},e.extend(t.czrInputMap,{font_size:function(e){t.czr_sektions.setupFontSizeAndLineHeightInputs.call(this)}})}(wp.customize,jQuery,_),function(t,e,i){t.czrInputMap=t.czrInputMap||{},e.extend(t.czrInputMap,{line_height:function(e){t.czr_sektions.setupFontSizeAndLineHeightInputs.call(this)}})}(wp.customize,jQuery,_),function(i,c,l){i.czrInputMap=i.czrInputMap||{},c.extend(i.czrInputMap,{font_picker:function(e){var s=this,o=s.input_parent,n=function(e,t){o();var n=c('select[data-czrtype="'+s.id+'"]',s.container);l.isNull(s())||l.isEmpty(s())?n.append('<option value="none" selected="selected">'+sektionsLocalizedData.i18n["Select a font family"]+"</option>"):n.append('<option value="none">'+sektionsLocalizedData.i18n["Select a font family"]+"</option>"),l.each([{title:sektionsLocalizedData.i18n["Web Safe Fonts"],type:"cfont",list:t.cfonts},{title:sektionsLocalizedData.i18n["Google Fonts"],type:"gfont",list:t.gfonts}],function(e){var t,r,a,i=c("<optgroup>",{label:e.title,html:(t=e.list,r=e.type,a="",l.each(t,function(e){var t,i,n=e.name,o=l.isString(n)?n.replace(/[+|:]/g," "):n;t=n,i=r,(n=l.isString(t)?["[",i,"]",t].join(""):"")==s()?a+='<option selected="selected" value="'+n+'">'+o+"</option>":a+='<option value="'+n+'">'+o+"</option>"}),a)});n.append(i)});var i={escapeMarkup:function(e){return e}};e&&c.extend(i,{resultsAdapter:e,closeOnSelect:!1}),n.czrSelect2(i),c(".czrSelect2-selection__rendered",s.container).css(r(s()))},r=function(e){if(!l.isString(e)||l.isEmpty(e))return{};var t,i,n,o=(e=e.replace("[gfont]","").replace("[cfont]","")).split(":");return t=a(e),i=o[1]?o[1].replace(/[^0-9.]+/g,""):400,i=l.isNumber(i)?i:400,n=o[1]&&-1!=o[1].indexOf("italic")?"italic":"",{"font-family":"none"==t?"inherit":t.replace(/[+|:]/g," "),"font-weight":i||400,"font-style":n||"normal"}},a=function(e){if(!l.isString(e)||l.isEmpty(e))return e;var t=(e=e.replace("[gfont]","").replace("[cfont]","")).split(":");return l.isString(t[0])?t[0].replace(/[+|:]/g," "):""};c.when(function(){var e,t=c.Deferred();l.isEmpty(i.sek_fontCollections)?(l.isUndefined(i.sek_fetchingFontCollection)||"pending"!=i.sek_fetchingFontCollection.state()?(e=i.CZR_Helpers.getModuleTmpl({tmpl:"font_list",module_type:"font_picker_input",module_id:s.module.id}),i.sek_fetchingFontCollection=e):e=i.sek_fetchingFontCollection,e.done(function(e){if("string"!=typeof e||"{"!==e[0])throw new Error("font_picker => server list is not JSON.parse-able");i.sek_fontCollections=JSON.parse(e),t.resolve(i.sek_fontCollections)}).fail(function(e){t.reject(e)})):t.resolve(i.sek_fontCollections);return t.promise()}()).done(function(t){var i;(i=c.Deferred(),void 0!==c.fn.czrSelect2&&void 0!==c.fn.czrSelect2.amd&&"function"==typeof c.fn.czrSelect2.amd.require?c.fn.czrSelect2.amd.require(["czrSelect2/results","czrSelect2/utils"],function(e,t){var n=function(e,t,i){n.__super__.constructor.call(this,e,t,i)};t.Extend(n,e),n.prototype.bind=function(e,t){var i=this;e.on("results:focus",function(e){"true"!=e.element.attr("aria-selected")&&i.trigger("select",{data:e.data})}),n.__super__.bind.call(this,e,t)},i.resolve(n)}):i.resolve(!1),i.promise()).done(function(e){n(e,t)})}).fail(function(e){i.errare("font_picker => fail response =>",e)})}})}(wp.customize,jQuery,_),function(r,a,s){r.czrInputMap=r.czrInputMap||{},a.extend(r.czrInputMap,{fa_icon_picker:function(){var n=this,o=!1,e=function(t){!0!==n.iconCollectionSet&&(a.when(a.Deferred(function(t){s.isEmpty(n.sek_faIconCollection)?r.CZR_Helpers.getModuleTmpl({tmpl:"icon_list",module_type:"fa_icon_picker_input",module_id:n.module.id}).done(function(e){if("string"!=typeof e||"["!==e[0])throw new Error("fa_icon_picker => server list is not JSON.parse-able");n.sek_faIconCollection=JSON.parse(e),t.resolve(n.sek_faIconCollection)}).fail(function(e){t.reject(e)}):t.resolve(n.sek_faIconCollection)})).done(function(e){!function(e){s.each(e,function(e){var t={value:e,html:r.CZR_Helpers.capitalize(e.substring(7))};t.value==n()&&(a.extend(t,{selected:"selected"}),o=!0),a("select[data-czrtype]",n.container).append(a("<option>",t))});var t,i=function(e){return e.id?a('<span class="'+e.element.value+'"></span><span class="social-name">&nbsp;&nbsp;'+e.text+"</span>"):e.text};t=o?a("<option>"):a("<option>",{selected:"selected"}),a("select[data-czrtype]",n.container).prepend(t).czrSelect2({templateResult:i,templateSelection:i,placeholder:sektionsLocalizedData.i18n["Select an icon"],allowClear:!0})}(e),t&&!0===t.open_on_init&&s.delay(function(){try{a("select[data-czrtype]",n.container).czrSelect2("open")}catch(e){}},100)}).fail(function(e){r.errare("fa_icon_picker => fail response =>",e)}),n.iconCollectionSet=!0)};n.container.on("click",function(){e()}),s.delay(function(){e({open_on_init:!1})},1e3)}})}(wp.customize,jQuery,_),function(d,u,p){d.czrInputMap=d.czrInputMap||{},u.extend(d.czrInputMap,{code_editor:function(e){var n=this,i=this.module.control,t=(n.input_parent(),!1),r=n.container.find("textarea"),o=n.container.find(".customize-control-title"),a=r.data("editor-params");wp.codeEditor&&(p.isUndefined(a)||!1!==a)&&(t=a),n.isReady.done(function(){var e=function(e){p.isEmpty(this.editor)&&(p.isEmpty(this.module.control.container.attr("data-sek-expanded"))||"false"==this.module.control.container.attr("data-sek-expanded")||setTimeout(function(){if(t)try{s(t)}catch(e){d.errare("error in sek_control => code_editor() input",e),c()}else c();o.click()},10))};e.call(n),n.module.control.container.on("sek-accordion-expanded",function(){e.call(n)})});var s=function(e){var t,i=!1;t=p.extend({},e,{onTabNext:CZRSeksPrototype.selectNextTabbableOrFocusable(":tabbable"),onTabPrevious:CZRSeksPrototype.selectPrevTabbableOrFocusable(":tabbable"),onUpdateErrorNotice:l}),n.editor=wp.codeEditor.initialize(r,t),u(n.editor.codemirror.display.lineDiv).attr({role:"textbox","aria-multiline":"true","aria-label":o.html(),"aria-describedby":"editor-keyboard-trap-help-1 editor-keyboard-trap-help-2 editor-keyboard-trap-help-3 editor-keyboard-trap-help-4"}),o.on("click",function(e){e.stopPropagation(),n.editor.codemirror.focus()}),n.editor.codemirror.on("change",function(e){i=!0,r.val(e.getValue()).trigger("change"),i=!1}),n.editor.codemirror.setValue(n()),n.bind(n.id+":changed",function(e){i||n.editor.codemirror.setValue(e)}),n.editor.codemirror.on("keydown",function(e,t){27===t.keyCode&&t.stopPropagation()})},c=function(){var o=r[0];n.editor=o,r.on("blur",function(){r.data("next-tab-blurs",!1)}),r.on("keydown",function(e){var t,i,n;27!==e.keyCode?9!==e.keyCode||e.ctrlKey||e.altKey||e.shiftKey||r.data("next-tab-blurs")||(t=o.selectionStart,i=o.selectionEnd,n=o.value,0<=t&&(o.value=n.substring(0,t).concat("\t",n.substring(i)),r.selectionStart=o.selectionEnd=t+1),e.stopPropagation(),e.preventDefault()):r.data("next-tab-blurs")||(r.data("next-tab-blurs",!0),e.stopPropagation())})},l=function(e){var t;i.setting.notifications.remove(n.id),0!==e.length&&(t=1===e.length?sektionsLocalizedData.i18n.codeEditorSingular.replace("%d","1").replace("%s",o.html()):sektionsLocalizedData.i18n.codeEditorPlural.replace("%d",String(e.length)).replace("%s",o.html()),i.setting.notifications.add(n.id,new d.Notification(n.id,{message:t,type:"warning"})))}}})}(wp.customize,jQuery,_),function(e,r,t){e.czrInputMap=e.czrInputMap||{},r.extend(e.czrInputMap,{range_simple:function(e){var t=this,i=r(".sek-range-with-unit-picker-wrapper",t.container),n=i.find('input[type="number"]'),o=i.find('input[type="range"]');o.on("input",function(e){n.val(r(this).val()).trigger("input")}),n.on("input",function(e){t(r(this).val()),o.val(r(this).val())}),o.val(n.val()||0)}})}(wp.customize,jQuery,_),function(d,u,p){d.czrInputMap=d.czrInputMap||{},u.extend(d.czrInputMap,{range_simple_device_switcher:function(e){var a=this,t=u(".sek-range-with-unit-picker-wrapper",a.container),s=t.find('input[type="number"]'),r=t.find('input[type="range"]'),i=d.czr_sektions.getInputRegistrationParams(a.id,a.module.module_type),c=p.isEmpty(i)||p.isEmpty(i.default)?{}:i.default,l=function(e,t){var i=["mobile","tablet","desktop"];if(p.has(e,t))return e[t];var n=p.findIndex(i,function(e){return t===e});return!p.isEmpty(t)&&n<i.length?l(e,i[n+1]):u.extend(!0,{desktop:""},c).desktop},n=function(e){var t=a(),i={};i=u.extend(!0,{},c),p.isObject(t)?i=u.extend(!0,{},t):p.isString(t)&&!p.isEmpty(t)&&(i={desktop:t});var n,o=l(i,e),r=(n=o,p.isEmpty(n)||!p.isString(n)?"16":n.replace(/px|em|%/g,""));s.val(r).trigger("input",{previewed_device_switched:!0})};d.czr_sektions.maybeSetupDeviceSwitcherForInput.call(a),r.on("input",function(e){s.val(u(this).val()).trigger("input")}),s.on("input",function(e,t){var i,n=d.previewedDevice()||"desktop",o=u(this).val();(i=u.extend(!0,{},p.isObject(a())?a():{}))[n]=u.extend(!0,{},i[n]||{}),p.isString(o)&&!p.isEmpty(o)&&(i[n]=o),(p.isEmpty(t)||p.isObject(t)&&!0!==t.previewed_device_switched)&&a(i),r.val(u(this).val())}),a.previewedDevice.bind(function(e){try{n(e)}catch(e){d.errare("Error when firing syncWithPreviewedDevice for input type "+a.type+" for input id "+a.id,e)}}),r.val(s.val()||0);try{n(d.previewedDevice())}catch(e){d.errare("Error when firing syncWithPreviewedDevice for input type "+a.type+" for input id "+a.id,e)}}})}(wp.customize,jQuery,_),function(s,c,l){s.czrInputMap=s.czrInputMap||{},c.extend(s.czrInputMap,{range_with_unit_picker:function(e){var t=this,i=c(".sek-range-with-unit-picker-wrapper",t.container),n=i.find('input[type="number"]'),o=i.find('input[type="range"]'),r=i.find("input[data-czrtype]").data("sek-unit"),a=function(e){return l.contains(["px","em","%"],e)||(s.errare("error : invalid unit for input "+t.id,e),e="px"),e};t.css_unit=new s.Value(l.isEmpty(r)?"px":a(r)),t.css_unit.bind(function(e){e=l.isEmpty(e)?"px":e,i.find('input[type="number"]').trigger("input")}),o.on("input",function(e){n.val(c(this).val()).trigger("input")}),n.on("input",function(e){t(c(this).val()+a(t.css_unit())),o.val(c(this).val())}),o.val(n.val()||0),i.on("click",".sek-ui-button",function(e){e.preventDefault(),i.find(".sek-ui-button").removeClass("is-selected").attr("aria-pressed",!1),c(this).addClass("is-selected").attr("aria-pressed",!0),i.find("input[data-czrtype]").data("sek-unit",c(this).data("sek-unit")),t.css_unit(c(this).data("sek-unit"))}),i.find('.sek-ui-button[data-sek-unit="'+r+'"]').addClass("is-selected").attr("aria-pressed",!0)}})}(wp.customize,jQuery,_),function(s,_,m){s.czrInputMap=s.czrInputMap||{},_.extend(s.czrInputMap,{range_with_unit_picker_device_switcher:function(e){var c=this,l=_(".sek-range-with-unit-picker-wrapper",c.container),d=l.find('input[type="number"]'),r=l.find('input[type="range"]'),a=function(e){return m.contains(["px","em","%"],e)||(s.errare("range_with_unit_picker_device_switcher => error : invalid unit for input "+c.id,e),e="px"),e},t=s.czr_sektions.getInputRegistrationParams(c.id,c.module.module_type),u=m.isEmpty(t)||m.isEmpty(t.default)?{}:t.default,i=function(){return l.find("input[data-czrtype]").data("sek-unit")||"px"},p=function(e,t){var i=["mobile","tablet","desktop"];if(m.has(e,t))return e[t];var n=m.findIndex(i,function(e){return t===e});return!m.isEmpty(t)&&n<i.length?p(e,i[n+1]):_.extend(!0,{desktop:""},u).desktop},n=function(e){var t=c(),i={};i=_.extend(!0,{},u),m.isObject(t)?i=_.extend(!0,{},t):m.isString(t)&&!m.isEmpty(t)&&(i={desktop:t});var n,o,r=p(i,e),a=(o=r,m.isEmpty(o)||!m.isString(o)?"px":o.replace(/[0-9]|\.|,/g,"")),s=(n=r,m.isEmpty(n)||!m.isString(n)?"16":n.replace(/px|em|%/g,""));_(".sek-unit-wrapper",l).find('[data-sek-unit="'+a+'"]').trigger("click",{previewed_device_switched:!0}),l.find('.sek-ui-button[data-sek-unit="'+a+'"]').addClass("is-selected").attr("aria-pressed",!0),d.val(s).trigger("input",{previewed_device_switched:!0})};s.czr_sektions.maybeSetupDeviceSwitcherForInput.call(c),c.css_unit=new s.Value(m.isEmpty(i())?"px":a(i()));var o='<button type="button" class="button sek-reset-button sek-float-right">'+sektionsLocalizedData.i18n.Reset+"</button>";c.container.find(".customize-control-title").append(o),c.css_unit.bind(function(e,t,i){m.isObject(i)&&!0===i.previewed_device_switched||d.trigger("input")}),r.on("input",function(e){d.val(_(this).val()).trigger("input")}),d.on("input",function(e,t){var i,n=s.previewedDevice()||"desktop",o=_(this).val()+a(c.css_unit());(i=_.extend(!0,{},m.isObject(c())?c():{}))[n]=_.extend(!0,{},i[n]||{}),m.isString(o)&&!m.isEmpty(o)&&(i[n]=o),(m.isEmpty(t)||m.isObject(t)&&!0!==t.previewed_device_switched)&&c(i),r.val(_(this).val())}),l.on("click",".sek-ui-button",function(e,t){e.stopPropagation(),l.find(".sek-ui-button").removeClass("is-selected").attr("aria-pressed",!1),_(this).addClass("is-selected").attr("aria-pressed",!0),l.find("input[data-czrtype]").data("sek-unit",_(this).data("sek-unit")),c.css_unit(_(this).data("sek-unit"),t)}),c.previewedDevice.bind(function(e){try{n(e)}catch(e){s.errare("Error when firing syncWithPreviewedDevice for input type range_with_unit_picker_device_switcher for input id "+c.id,e)}}),c.container.on("click",".sek-reset-button",function(e){var t=s.previewedDevice(),i=_.extend(!0,{},m.isObject(c())?c():{});m.isEmpty(i[t])||(i=m.omit(i,t),c(i),n(s.previewedDevice()))}),r.val(d.val()||0);try{n(s.previewedDevice())}catch(e){s.errare("Error when firing syncWithPreviewedDevice for input type range_with_unit_picker_device_switcher for input id "+c.id,e)}}})}(wp.customize,jQuery,_),function(g,h,k){g.czrInputMap=g.czrInputMap||{},h.extend(g.czrInputMap,{borders:function(e){var s=this,c=h(".sek-borders",s.container),l=c.find('input[type="number"]'),d=c.find('input[type="range"]'),u=c.find(".sek-alpha-color-input"),p=function(e){return k.contains(["px","em","%"],e)||(g.errare("borders => error : invalid unit for input "+s.id,e),e="px"),e},_=function(e){return k.isEmpty(e)||!k.isString(e)?"16":e.replace(/px|em|%/g,"")},m=function(e){return k.isEmpty(e)||!k.isString(e)?"px":e.replace(/[0-9]|\.|,/g,"")},t=g.czr_sektions.getInputRegistrationParams(s.id,s.module.module_type),f=k.isEmpty(t)||k.isEmpty(t.default)?{}:t.default;s.cssBorderTypes=["top","left","right","bottom"];var i,n,o=function(){var e=s(),t="px";return k.isObject(e)&&k.has(e,"_all_")&&k.isObject(e._all_)&&!k.isEmpty(e._all_.wght)&&(t=p(m(e._all_.wght))),t},r=function(){var e=s(),t="#000000";return k.isObject(e)&&k.has(e,"_all_")&&k.isObject(e._all_)&&!k.isEmpty(e._all_.col)&&(t=e._all_.col),t},a=function(e){if(!k.contains(k.union(s.cssBorderTypes,["_all_"]),e))throw new Error("Error in syncWithBorderType : the border type must be one of those values '_all_', 'top', 'left', 'right', 'bottom'");var t=s(),i={},n=h.extend(!0,{},f);k.isObject(t)?i=h.extend(!0,{},t):k.isString(t)&&(i={_all_:{wght:t}});var o,r,a=function(e,t){var i,n=h.extend(!0,{},f);if(!k.has(n,"_all_"))throw new Error("Error when firing getCurrentBorderTypeOrAllValue : the default value of the borders input must be php registered as an array formed : array( 'wght' => '1px', 'col' => '#000000' )");return i=k.isObject(e)&&k.has(e,"_all_")?k.extend(n._all_,e._all_):n._all_,k.has(e,t)&&k.isObject(e[t])?k.extend(i,e[t]):n._all_}(i=h.extend(n,i),e);if(k.isEmpty(a)||!k.isObject(a)||k.isEmpty(a.wght)||k.isEmpty(a.col))throw new Error("Error in syncWithBorderType : getCurrentBorderTypeOrAllValue must return an object formed : array( 'wght' => '1px', 'col' => '#000000' )");o=m(a.wght),r=_(a.wght),h(".sek-unit-wrapper",c).find('[data-sek-unit="'+o+'"]').trigger("click",{border_type_switched:!0}),c.find('.sek-ui-button[data-sek-unit="'+o+'"]').addClass("is-selected").attr("aria-pressed",!0),l.val(r).trigger("input",{border_type_switched:!0}),u.data("border_type_switched",!0),u.val(a.col).trigger("change"),u.data("border_type_switched",!1)};s.borderColor=new g.Value(k.isEmpty(r())?"#000000":r()),s.css_unit=new g.Value(k.isEmpty(o())?"px":p(o())),s.borderType=new g.Value("_all_"),l.val((i=s(),n=1,k.isObject(i)&&k.has(i,"_all_")&&k.isObject(i._all_)&&!k.isEmpty(i._all_.wght)&&(n=_(i._all_.wght)),n=parseInt(n,10),(!k.isNumber(n)||n<0)&&(g.errare("Error in borders input type for module : "+s.module.module_type+" the initial border width is invalid : "+n),n=1),n)),u.val(s.borderColor()),u.wpColorPicker({palettes:!0,width:1440<=window.innerWidth?271:251,change:function(e,t){h(this).val(t.color.toString()).trigger("colorpickerchange"),s.borderColor(t.color.toString(),{border_type_switched:!0===h(this).data("border_type_switched")})},clear:function(e,t){h(this).val("").trigger("colorpickerchange"),s.borderColor("")}}),s.css_unit.bind(function(e,t,i){(!k.isObject(i)||!0!==i.border_type_switched&&!0!==i.initializing_the_unit)&&l.trigger("input",i)}),s.borderColor.bind(function(e,t,i){(!k.isObject(i)||!0!==i.border_type_switched&&!0!==i.initializing_the_color)&&l.trigger("input",i)}),s.borderType.bind(function(e){try{a(e)}catch(e){g.errare("Error when firing syncWithBorderType for input type borders for module type "+s.module.module_type,e)}}),d.on("input",function(e){l.val(h(this).val()).trigger("input")}),l.on("input",function(e,t){var i,n=s.borderType()||"_all_",o=s.borderColor(),r=h(this).val()+p(s.css_unit()),a=h.extend(!0,{},f);(i=h.extend(!0,{},k.isObject(s())?s():a))[n]=h.extend(!0,{},i[n]||a[n]),k.isString(r)&&!k.isEmpty(r)&&(i[n].wght=r),i[n].col=o,(k.isEmpty(t)||k.isObject(t)&&!0!==t.border_type_switched)&&("_all_"===n&&k.each(s.cssBorderTypes,function(e){i=k.omit(i,e)}),s(i)),d.val(h(this).val())}),c.on("click","[data-sek-unit]",function(e,t){e.preventDefault(),c.find("[data-sek-unit]").removeClass("is-selected").attr("aria-pressed",!1),h(this).addClass("is-selected").attr("aria-pressed",!0),c.find("input[data-czrtype]").data("sek-unit",h(this).data("sek-unit")),s.css_unit(h(this).data("sek-unit"),t)}),c.on("click","[data-sek-border-type]",function(e,t){e.preventDefault(),c.find("[data-sek-border-type]").removeClass("is-selected").attr("aria-pressed",!1),h(this).addClass("is-selected").attr("aria-pressed",!0);var i="_all_";try{i=h(this).data("sek-border-type")}catch(e){g.errare("borders input type => error when attaching click event",e)}s.borderType(i,t)}),s.container.on("click",".sek-reset-button",function(e){var t=s.borderType()||"_all_",i=h.extend(!0,{},k.isObject(s())?s():{});k.isEmpty(i[t])||(i=k.omit(i,t),s(i),a(t))}),d.val(l.val()||0);try{a(s.borderType())}catch(e){g.errare("Error when firing syncWithBorderType for input type borders for module type "+s.module.module_type,e)}h('[data-sek-unit="'+s.css_unit()+'"]',c).trigger("click",{initializing_the_unit:!0})}})}(wp.customize,jQuery,_),function(m,f,g){m.czrInputMap=m.czrInputMap||{},f.extend(m.czrInputMap,{border_radius:function(e){var s=this,c=f(".sek-borders",s.container),l=c.find('input[type="number"]'),a=c.find('input[type="range"]'),d=function(e){return g.contains(["px","em","%"],e)||(m.errare("border_radius => error : invalid unit for input "+s.id,e),e="px"),e},u=function(e){return g.isEmpty(e)||!g.isString(e)?"16":e.replace(/px|em|%/g,"")},p=function(e){return g.isEmpty(e)||!g.isString(e)?"px":e.replace(/[0-9]|\.|,/g,"")},t=m.czr_sektions.getInputRegistrationParams(s.id,s.module.module_type),_=g.isEmpty(t)||g.isEmpty(t.default)?{}:t.default;s.cssRadiusTypes=["top_left","top_right","bottom_right","bottom_left"];var i,n,o=function(){var e=s(),t="px";return g.isObject(e)&&g.has(e,"_all_")&&(t=d(p(e._all_))),t},r=function(e){if(!g.contains(["_all_","top_left","top_right","bottom_right","bottom_left"],e))throw new Error("Error in syncWithRadiusType : the radius type must be one of those values '_all_', 'top_left', 'top_right', 'bottom_right', 'bottom_left', => radius type => "+e);var t=s(),i={},n=f.extend(!0,{},_);g.isObject(t)?i=f.extend(!0,{},t):g.isString(t)&&(i={_all_:"0px"});var o,r,a=function(e,t){var i,n=f.extend(!0,{},_);if(!g.has(n,"_all_"))throw new Error("Error when firing getCurrentRadiusTypeOrAllValue : the default value of the border_radius input must be php registered as an array");return i=g.isObject(e)&&g.has(e,"_all_")?e._all_:n._all_,g.has(e,t)?e[t]:i}(i=f.extend(n,i),e);if(g.isEmpty(a)||!g.isString(a))throw new Error("Error in syncWithRadiusType : getCurrentRadiusTypeOrAllValue must return a string like 3em");o=p(a),r=u(a),f(".sek-unit-wrapper",c).find('[data-sek-unit="'+o+'"]').trigger("click",{radius_type_switched:!0}),c.find('.sek-ui-button[data-sek-unit="'+o+'"]').addClass("is-selected").attr("aria-pressed",!0),l.val(r).trigger("input",{radius_type_switched:!0})};s.css_unit=new m.Value(g.isEmpty(o())?"px":d(o())),s.radiusType=new m.Value("_all_"),l.val((i=s(),n=0,g.isObject(i)&&g.has(i,"_all_")&&(n=u(i._all_)),n=parseInt(n,10),(!g.isNumber(n)||n<0)&&(m.errare("Error in border_radius input type for module : "+s.module.module_type+" the initial radius is invalid : "+n),n=0),n)),s.css_unit.bind(function(e,t,i){(!g.isObject(i)||!0!==i.radius_type_switched&&!0!==i.initializing_the_unit)&&l.trigger("input",i)}),s.radiusType.bind(function(e){try{r(e)}catch(e){m.errare("Error when firing syncWithRadiusType for input type border_radius for module type "+s.module.module_type,e)}}),a.on("input",function(e){l.val(f(this).val()).trigger("input")}),l.on("input",function(e,t){var i,n=s.radiusType()||"_all_",o=f(this).val()+d(s.css_unit()),r=f.extend(!0,{},_);(i=f.extend(!0,{},g.isObject(s())?s():r))[n]=f.extend(!0,{},i[n]||r[n]),g.isString(o)&&!g.isEmpty(o)&&(i[n]=o),(g.isEmpty(t)||g.isObject(t)&&!0!==t.radius_type_switched)&&("_all_"===n&&g.each(s.cssRadiusTypes,function(e){i=g.omit(i,e)}),s(i)),a.val(f(this).val())}),c.on("click","[data-sek-unit]",function(e,t){e.preventDefault(),c.find("[data-sek-unit]").removeClass("is-selected").attr("aria-pressed",!1),f(this).addClass("is-selected").attr("aria-pressed",!0),c.find("input[data-czrtype]").data("sek-unit",f(this).data("sek-unit")),s.css_unit(f(this).data("sek-unit"),t)}),c.on("click","[data-sek-radius-type]",function(e,t){e.preventDefault(),c.find("[data-sek-radius-type]").removeClass("is-selected").attr("aria-pressed",!1),f(this).addClass("is-selected").attr("aria-pressed",!0);var i="_all_";try{i=f(this).data("sek-radius-type")}catch(e){m.errare("border_radius input type => error when attaching click event",e)}s.radiusType(i,t)}),s.container.on("click",".sek-reset-button",function(e){var t=s.radiusType()||"_all_",i=f.extend(!0,{},g.isObject(s())?s():{});g.isEmpty(i[t])||(i=g.omit(i,t),s(i),r(t))}),a.val(l.val()||0);try{r(s.radiusType())}catch(e){m.errare("Error when firing syncWithRadiusType for input type border_radius for module type "+s.module.module_type,e)}f('[data-sek-unit="'+s.css_unit()+'"]',c).trigger("click",{initializing_the_unit:!0})}})}(wp.customize,jQuery,_),function(r,a,s){r.czrInputMap=r.czrInputMap||{},a.extend(r.czrInputMap,{buttons_choice:function(e){var n=this,o=a(".sek-button-choice-wrapper",n.container),t=o.find('input[type="number"]'),i=r.czr_sektions.getInputRegistrationParams(n.id,n.module.module_type);s.isEmpty(i)||s.isEmpty(i.default)||i.default;t.val(n()),o.on("click","[data-sek-choice]",function(e,t){var i;e.stopPropagation(),o.find("[data-sek-choice]").removeClass("is-selected").attr("aria-pressed",!1),a(this).addClass("is-selected").attr("aria-pressed",!0);try{i=a(this).data("sek-choice")}catch(e){r.errare("buttons_choice input type => error when attaching click event",e)}n(i)}),a('[data-sek-choice="'+n()+'"]',o).trigger("click",{initializing_the_unit:!0})}})}(wp.customize,jQuery,_),function(n,o,r){n.czrInputMap=n.czrInputMap||{},o.extend(n.czrInputMap,{reset_button:function(e){this.container.on("click","[data-sek-reset-scope]",function(e,t){e.stopPropagation();var i=o(this).data("sek-reset-scope");!r.isEmpty(i)&&r.contains(["local","global"],i)?n.czr_sektions.updateAPISetting({action:"sek-reset-collection",scope:i}).fail(function(e){n.errare("reset_button input => error when firing ::updateAPISetting",e),n.previewer.trigger("sek-notify",{notif_id:"reset-failed",type:"error",duration:8e3,message:["<span>","<strong>",sektionsLocalizedData.i18n["Reset failed"],"<br/>","<i>"+e+"</i>","</strong>","</span>"].join("")})}):n.errare("reset_button input => invalid scope provided.",i)})}})}(wp.customize,jQuery,_),function(i,r,a){i.czrInputMap=i.czrInputMap||{},r.extend(i.czrInputMap,{revision_history:function(e){var o=this;_selected_found=!1;var t=function(t){!0!==o.revisionHistorySet&&(r.when(r.Deferred(function(t){a.isEmpty(o.sek_revisionHistory)?i.czr_sektions.getRevisionHistory({is_local:"local_revisions"===o.id}).done(function(e){if(!a.isObject(e))throw new Error("_getRevisionHistory => server list is not a object");o.sek_revisionHistory=e,t.resolve(o.sek_revisionHistory)}).fail(function(e){t.reject(e)}):t.resolve(o.sek_revisionHistory)})).done(function(e){!function(e){if(!(0<o.container.find(".sek-revision-history").length))if(a.isEmpty(e))o.container.append(["<i>",sektionsLocalizedData.i18n["No revision history available for the moment."],"</i>"].join(""));else{o.container.append(r("<select/>",{class:"sek-revision-history",html:['<option value="_select_">'," -",sektionsLocalizedData.i18n.Select,"- ","</option>"].join("")}));var n=[];a.each(e,function(e,t){var i={value:t,html:e};i.value==o()&&(r.extend(i,{selected:"selected"}),_selected_found=!0),n.unshift(r("<option>",i))}),n[0].html([n[0].html(),sektionsLocalizedData.i18n["(currently published version)"]].join(" ")),a.each(n,function(e){r("select.sek-revision-history",o.container).append(e)}),r("select.sek-revision-history",o.container).selecter()}}(e),t&&!0===t.open_on_init&&a.delay(function(){try{r("select[data-czrtype]",o.container).czrSelect2("open")}catch(e){}},100)}).fail(function(e){i.errare("_getRevisionHistory => fail response =>",e)}),o.revisionHistorySet=!0)};o.container.on("change",".sek-revision-history",function(){var e=r(this).val();"_select_"!==e&&i.czr_sektions.setSingleRevision({revision_post_id:e,is_local:"local_revisions"===o.id})}),a.delay(function(){t({open_on_init:!1})},1e3)}})}(wp.customize,jQuery,_),function(p,_,m){p.czrInputMap=p.czrInputMap||{},_.extend(p.czrInputMap,{nimble_tinymce_editor:function(){var t=this,e=t.container.find("textarea").first(),i=0<e.length?e.attr("id"):null,n=p.czr_sektions.getInputRegistrationParams(t.id,t.module.module_type),o=sektionsLocalizedData.defaultToolbarBtns;if(m.isNull(i))throw new Error("setupTinyMceEditor => missing textarea for module :"+t.module.id);if(tinyMCE.get(i))throw new Error("setupTinyMceEditor => duplicate editor id.");var r,a,s=function(){return n&&n.editor_params&&!0===n.editor_params.autop},c={tinymce:{toolbar1:function(){var e=o.split(",");if(n.editor_params&&m.isArray(n.editor_params.excludedBtns)){var t=n.editor_params.excludedBtns;e=m.filter(e,function(e){return!m.contains(t,e)})}if(n.editor_params&&m.isString(n.editor_params.includedBtns)){var i=n.editor_params.includedBtns;m.isEmpty(i)||!m.isArray(sektionsLocalizedData[i])?p.errare("nimble_tinymce_editor input => invalid set of buttons provided",i):(i=sektionsLocalizedData[i],e=m.filter(e,function(e){return m.contains(i,e)}))}return e.join(",")}(),content_css:(r=wp.editor.getDefaultSettings(),a=[sektionsLocalizedData.tinyMceNimbleEditorStylesheetUrl],r&&r.tinymce&&r.tinymce.content_css&&(a=m.union(r.tinymce.content_css.split(","),a)),a.join(",")),min_height:40,height:n.editor_params&&m.isNumber(n.editor_params.height)?n.editor_params.height:p.czr_sektions.TINYMCE_EDITOR_HEIGHT},quicktags:{buttons:"strong,em,link,code"},mediaButtons:!n.editor_params||!1!==n.editor_params.media_button};c.tinymce.wpautop=s(),s()||(c.tinymce.forced_root_block=""),wp.editor.initialize(i,c);var l=tinyMCE.get(i);if(!l)throw new Error("setupTinyMceEditor => missing editor instance for module :"+t.module.id);p.czrActiveWPEditors=p.czrActiveWPEditors||[];var d=_.extend(!0,[],p.czrActiveWPEditors);d.push(i),p.czrActiveWPEditors=d;var u=function(){l.setContent(t())};l.initialized?u():l.on("init",u),l.on("input change keyup",function(e){t(l.getContent())})},detached_tinymce_editor:function(){var e,t=this,i=_("textarea#"+sektionsLocalizedData.idOfDetachedTinyMceTextArea),n=p.czr_sektions.getInputRegistrationParams(t.id,t.module.module_type);if(!(0<i.length))throw new Error("api.czrInputMap::detached_tinymce_editor => missing textarea element");if(e=i.attr("id"),window.tinymce&&(mceInstance=window.tinymce.get(e),mceInstance&&mceInstance.remove()),!window.nimbleTinyMCEPreInit||!window.nimbleTinyMCEPreInit.mceInit||!window.nimbleTinyMCEPreInit.mceInit[e])throw new Error("setupDetachedTinyMceEditor => invalid nimbleTinyMCEPreInit global var");var o,r,a=nimbleTinyMCEPreInit.mceInit[e];a.content_css=(o=wp.editor.getDefaultSettings(),r=[sektionsLocalizedData.tinyMceNimbleEditorStylesheetUrl],o&&o.tinymce&&o.tinymce.content_css&&(r=m.union(o.tinymce.content_css.split(","),r)),r.join(","));var s=t.input_parent,c=function(){var e=s();return m.isUndefined(e.autop)?n&&n.editor_params&&!0===n.editor_params.autop:e.autop};a.wpautop=c(),c()||(a.forced_root_block=""),a.toolbar1=sektionsLocalizedData.defaultToolbarBtns,a.toolbar2="",window.tinymce.init(a),window.QTags.getInstance(e);var l=tinyMCE.get(e);if(!l)throw new Error("setupDetachedTinyMceEditor => missing editor instance for module :"+t.module.id);var d=function(){var e=c()?wp.editor.autop(t()):t();l.setContent(e),p.sekEditorExpanded(!0),_(window).trigger("resize")};l.initialized?d():l.on("init",d),l.on("input change keyup keydown click SetContent BeforeSetContent",function(e){t(c()?l.getContent():wp.editor.removep(l.getContent()))}),p.sekCurrentDetachedTinyMceInput=t,i.data("czr-bound-for-detached-editor")||(i.on("input",function(e,t){p.sekCurrentDetachedTinyMceInput(_(this).val())}),i.data("czr-bound-for-detached-editor",!0))}})}(wp.customize,jQuery,_),function(_,m,f){_.czrInputMap=_.czrInputMap||{},m.extend(_.czrInputMap,{import_export:function(){var o=this,r=o.container.find('button[data-czr-action="sek-pre-import"]'),i=o.container.find("input[name=sek-import-file]"),n=_.czr_sektions.getInputRegistrationParams(o.id,o.module.module_type),s="local"===n.scope?_.czr_sektions.localSectionsSettingId():_.czr_sektions.getGlobalSectionsSettingId();i.on("change",function(e){r.toggleClass("disabled",f.isEmpty(m(this).val()))});o.container.on("click","[data-czr-action]",function(e){var i,t;switch(e.stopPropagation(),m(this).data("czr-action")){case"sek-export":if(i=!1,t=wp.customize.dirtyValues(),f.isEmpty(t)||f.each(t,function(e,t){i||(i=-1!==t.indexOf("nimble"))}),i){alert(sektionsLocalizedData.i18n["You need to publish before exporting."]);break}var n=_(s)(),o=!0;if(f.each(n.collection,function(e){o&&(f.isEmpty(e.collection)||(o=!1))}),o){alert(sektionsLocalizedData.i18n["Nothing to export."]);break}p();break;case"sek-pre-import":if(f.isEmpty(_.czr_sektions.activeLocations())){alert(sektionsLocalizedData.i18n["The current page has no available locations to import Nimble Builder sections."]);break}c({pre_import_check:!0}).done(a).fail(function(e){_.errare("sek_pre_import_checks failed",e),u(),c()});break;case"sek-import-as-is":c();break;case"sek-import-assign":c({assign_missing_locations:!0});break;case"sek-cancel-import":u()}});var a=function(e){var t=_.czr_sektions.activeLocations(),i=m.extend(!0,[],f.isArray(e.data.metas.active_locations)?e.data.metas.active_locations:[]);if(i=f.filter(i,function(e){return!f.contains(["nimble_local_header","nimble_local_footer"],e)}),f.isArray(i)&&f.isArray(t)){var n=m(i).not(t).get();f.isEmpty(n)?c():(r.hide(),o.container.find(".czr-import-dialog").slideToggle(),_.infoLog("sek-pre-import => imported locations missing in current page.",n))}else _.previewer.trigger("sek-notify",{notif_id:"import-failed",type:"info",duration:3e4,message:['<span style="color:#0075a2">',"<strong>",sektionsLocalizedData.i18n["Import failed"],"</strong>","</span>"].join("")}),u()},c=function(t){if(t=t||{},i.length<1||f.isUndefined(i[0])||!i[0].files||f.isEmpty(i.val()))_.previewer.trigger("sek-notify",{notif_id:"missing-import-file",type:"info",duration:3e4,message:['<span style="color:#0075a2">',"<strong>",sektionsLocalizedData.i18n["Missing file"],"</strong>","</span>"].join("")});else{_.notifications.remove("missing-import-file"),_.notifications.remove("import-success"),_.notifications.remove("import-failed"),_.notifications.remove("img-import-errors"),o.container.find(".sek-uploading").show();var e=new FormData;if(e.append("file_candidate",i[0].files[0]),e.append("action","sek_get_imported_file_content"),e.append("nonce",_.settings.nonce.save),f.contains(["local","global"],n.scope)){if(e.append("skope",n.scope),t.pre_import_check&&e.append("pre_import_check",t.pre_import_check),__request__=m.ajax({url:wp.ajax.settings.url,data:e,processData:!1,contentType:!1,type:"POST"}),t.pre_import_check)return m.Deferred(function(){var t=this;__request__.done(function(e){e.success||t.reject(e),l(e)||t.reject(e),t.resolve(e)}).fail(function(e){t.reject(e)}).always(function(){})});o.container.find(".sek-uploading").show(),_.previewer.send("sek-maybe-print-loader",{fullPageLoader:!0}),__request__.done(function(e){var n=function(i){return(f.isObject(i)||f.isArray(i))&&f.each(i,function(e,t){(f.isObject(e)||f.isArray(e))&&(i[t]=n(e)),"id"!==t||!f.isString(e)||0!==e.indexOf("__rep__me__")&&0!==e.indexOf("__nimble__")||(i[t]=sektionsLocalizedData.optPrefixForSektionsNotSaved+_.czr_sektions.guid())}),i};e.data.data.collection=n(e.data.data.collection),d(e,t)}).fail(function(e){_.errare("sek-import input => ajax error",e),_.previewer.trigger("sek-notify",{notif_id:"import-failed",type:"error",duration:3e4,message:["<span>","<strong>",sektionsLocalizedData.i18n["Import failed, file problem"],"</strong>","</span>"].join("")})}).always(u)}else _.errare("sek-import input => invalid scope provided",n.scope)}},l=function(e){var t=!0,i=e.data,n=null;e.success||(n=[sektionsLocalizedData.i18n["Import failed"],i].join(" : ")),f.isNull(n)&&!f.isObject(i)&&(n=sektionsLocalizedData.i18n["Import failed, invalid file content"]);var o=i.data,r=i.metas,a=i.img_errors;return f.isNull(n)&&!f.isObject(o)&&(n=sektionsLocalizedData.i18n["Import failed, invalid file content"]),f.isNull(n)&&!f.isObject(r)&&(n=sektionsLocalizedData.i18n["Import failed, invalid file content"]),f.isNull(n)&&f.isEqual(_(s)(),o)&&(_.infoLog("sek-import input => Setting unchanged"),t=!1),f.isNull(n)||(_.errare("sek-import input => invalid data sent from server",i),_.previewer.trigger("sek-notify",{notif_id:"import-failed",type:"error",duration:3e4,message:["<span>","<strong>",n,"</strong>","</span>"].join("")}),t=!1),f.isEmpty(a)||_.previewer.trigger("sek-notify",{notif_id:"img-import-errors",type:"info",duration:6e4,message:['<span style="color:#0075a2">',["<strong>"+sektionsLocalizedData.i18n["Some image(s) could not be imported"]+"</strong><br/>",'<span style="font-size:11px">'+a+"</span>"].join(" : "),"</span>"].join("")}),t},d=function(e,t){t=t||{},l(e)?(_.czr_sektions.updateAPISetting({action:"sek-import-from-file",scope:"global"===n.scope,imported_content:e.data,assign_missing_locations:t.assign_missing_locations,keep_existing_sections:o.input_parent.czr_Input("keep_existing_sections")()}).done(function(){"local"===n.scope&&_.czr_sektions.generateUI({action:"sek-generate-local-skope-options-ui",clean_settings:!0}),_.previewer.refresh(),_.previewer.trigger("sek-notify",{notif_id:"import-success",type:"success",duration:3e4,message:["<span>","<strong>",sektionsLocalizedData.i18n["File successfully imported"],"</strong>","</span>"].join("")})}).fail(function(e){_.errare("sek-import input => error when firing ::updateAPISetting",e),_.previewer.trigger("sek-notify",{notif_id:"import-failed",type:"error",duration:3e4,message:["<span>","<strong>",[sektionsLocalizedData.i18n["Import failed"],e].join(" : "),"</strong>","</span>"].join("")})}),_.previewer.refresh()):u()},u=function(){_.previewer.send("sek-clean-loader",{cleanFullPageLoader:!0}),o.container.find(".sek-uploading").hide(),i.val("").trigger("change"),o.container.find(".czr-import-dialog").hide(),r.show()},p=function(){var i=[],e={sek_export_nonce:_.settings.nonce.save,skope_id:_.czr_skopeBase.getSkopeProperty("skope_id"),active_locations:_.czr_sektions.activeLocations()};f.each(e,function(e,t){i.push(encodeURIComponent(t)+"="+encodeURIComponent(e))}),wp.ajax.post("sek_pre_export_checks",{nonce:_.settings.nonce.save,sek_export_nonce:_.settings.nonce.save,skope_id:_.czr_skopeBase.getSkopeProperty("skope_id"),active_locations:_.czr_sektions.activeLocations()}).done(function(){m(window).off("beforeunload"),window.location.href=[sektionsLocalizedData.customizerURL,"?",i.join("&")].join(""),m(window).on("beforeunload")}).fail(function(e){_.previewer.trigger("sek-notify",{notif_id:"import-failed",type:"error",duration:3e4,message:["<span>","<strong>",[sektionsLocalizedData.i18n["Export failed"],encodeURIComponent(e)].join(" "),"</strong>","</span>"].join("")})})}}})}(wp.customize,jQuery,_),function(t,e,i){t.czrInputMap=t.czrInputMap||{},e.extend(t.czrInputMap,{simpleselect:function(e){t.czr_sektions.setupSelectInput.call(this,e)},multiselect:function(e){t.czr_sektions.setupSelectInput.call(this,e)}})}(wp.customize,jQuery,_),function(s,c,l){s.czrInputMap=s.czrInputMap||{},c.extend(s.czrInputMap,{category_picker:function(e){var n=this,o=c("select[data-czrtype]",n.container),r=function(){var e=n();return e=l.isString(e)?[e]:e,l.isArray(e)?e:[]},t=function(t){!0!==n.catCollectionSet&&(c.when(c.Deferred(function(i){l.isEmpty(s.czr_sektions.post_categories)?wp.ajax.post("sek_get_post_categories",{nonce:s.settings.nonce.save}).done(function(e){l.isArray(e)||s.errare(n.id+" => error => invalid category collection sent by server");var t={};l.each(e,function(e){l.isEmpty(e.slug)||l.isEmpty(e.name)?i.reject("missing slug or name for at least one category"):t[e.slug]=e.name}),s.czr_sektions.post_categories=t,i.resolve(s.czr_sektions.post_categories)}).fail(function(e){i.reject(e)}):i.resolve(s.czr_sektions.post_categories)})).done(function(e){i(e),t&&!0===t.open_on_init&&l.delay(function(){try{o.czrSelect2("open")}catch(e){}},100)}).fail(function(e){s.errare(n.id+" => fail response when _getCategoryCollection()",e)}),n.catCollectionSet=!0)},i=function(e){l.each(e,function(e,t){var i={value:t,html:e};l.contains(r(),t)&&c.extend(i,{selected:"selected"}),o.append(c("<option>",i))}),o.czrSelect2({closeOnSelect:!0,templateSelection:function(e){return e.text.replace(/\u2013|\u2014/g,"")}}),o.on("change",function(){0===c(this).find("option:selected").length&&n([])})},a={};l.each(r(),function(e){a[e]=(e+"").replace(/-/g," ")}),i(a),n.container.on("click",function(){!0!==n.catCollectionSet&&(o.czrSelect2("destroy"),c.when(o.find("option").remove()).done(function(){t({open_on_init:!0})}))})}})}(wp.customize,jQuery,_),function(r,a,e){r.czrInputMap=r.czrInputMap||{},a.extend(r.czrInputMap,{grid_layout:function(e){var n=this,o=a(".sek-grid-layout-wrapper",n.container);o.find('input[type="hidden"]').val(n()),o.on("click","[data-sek-grid-layout]",function(e,t){var i;e.stopPropagation(),o.find("[data-sek-grid-layout]").removeClass("selected").attr("aria-pressed",!1),a(this).addClass("selected").attr("aria-pressed",!0);try{i=a(this).data("sek-grid-layout")}catch(e){r.errare(n.type+" => error when attaching click event",e)}n(i)}),a('[data-sek-grid-layout="'+n()+'"]',o).trigger("click")}})}(wp.customize,jQuery,_),function(o,r,a){o.czrModuleMap=o.czrModuleMap||{},r.extend(o.czrModuleMap,{sek_content_type_switcher_module:{crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("sek_content_type_switcher_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:a.extend({id:"",title:""},o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_content_type_switcher_module"))}}),o.czrInputMap=o.czrInputMap||{},r.extend(o.czrInputMap,{content_type_switcher:function(e){var i,n=this;if(!o.section.has(n.module.control.section()))throw new Error("api.czrInputMap.content_type_switcher => section not registered");i=o.section(n.module.control.section()),n.container.on("click","[data-sek-content-type]",function(e){e.preventDefault(),n.container.find("[data-sek-content-type]").removeClass("is-selected").attr("aria-pressed",!1),r(this).addClass("is-selected").attr("aria-pressed",!0),o.czr_sektions.currentContentPickerType(r(this).data("sek-content-type"))});var t=function(t){n.container.find('[data-sek-content-type="'+(t||"module")+'"]').trigger("click"),a.each(i.controls(),function(e){a.isUndefined(e.content_type)||e.active(t===e.content_type)})};o.czr_sektions.currentContentPickerType=o.czr_sektions.currentContentPickerType||new o.Value(n()),t(o.czr_sektions.currentContentPickerType()),o.czr_sektions.currentContentPickerType.bind(function(e){t(e)})}})}(wp.customize,jQuery,_),function(t,e,i){t.czrModuleMap=t.czrModuleMap||{},e.extend(t.czrModuleMap,{sek_module_picker_module:{crud:!1,name:t.czr_sektions.getRegisteredModuleProperty("sek_module_picker_module","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},t.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_module_picker_module"))}}),t.czrInputMap=t.czrInputMap||{},e.extend(t.czrInputMap,{module_picker:function(e){t.czr_sektions.trigger("sek-refresh-dragzones",{type:"module",input_container:this.container})}})}(wp.customize,jQuery,_),function(t,e,i){t.czrModuleMap=t.czrModuleMap||{};var n=sektionsLocalizedData.presetSectionsModules;i.isArray(n)&&!i.isEmpty(n)?i.each(n,function(e){t.czrModuleMap[e]={crud:!1,name:t.czr_sektions.getRegisteredModuleProperty(e,"name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.extend({id:"",title:""},t.czr_sektions.getDefaultItemModelFromRegisteredModuleData(e))}}):t.errare("api.czrModuleMap => error when adding section modules")}(wp.customize,jQuery,_),function(r,e,a){var t={initialize:function(e,t){this.inputConstructor=r.CZRInput.extend({initialize:function(e,t){var i=this;r.CZRInput.prototype.initialize.call(i,e,t),i.isReady.then(function(){i.renderUserSavedSections(),r.czr_sektions.trigger("sek-refresh-dragzones",{type:"preset_section",input_container:i.container})})},renderUserSavedSections:function(){var i="",n=this.container.find(".sek-content-type-wrapper"),o="";a.each(sektionsLocalizedData.userSavedSektions,function(e,t){try{o=function(e){var t=e.getDate(),i=e.getMonth(),n=e.getFullYear();e.getHours(),e.getMinutes(),e.getSeconds();return[t,["January","February","March","April","May","June","July","August","September","October","November","December"][i],n].join(" ")}(new Date(e.creation_date.replace(/-/g,"/")))}catch(e){r.errare("::renderUserSavedSections => formatDate => error",e)}i=['<div class="sek-user-section-wrapper">','<div class="sek-saved-section-title"><i class="sek-remove-user-section far fa-trash-alt"></i>'+e.title+"</div>",'<div draggable="true" data-sek-is-user-section="true" data-sek-section-type="'+e.type+'" data-sek-content-type="preset_section" data-sek-content-id="'+t+'" style="" title="'+e.title+'">','<div class="sek-overlay"></div>','<div class="sek-saved-section-description">'+e.description+"</div>",a.isEmpty(o)?"":'<div class="sek-saved-section-date"><i class="far fa-calendar-alt"></i> @missi18n Created : '+o+"</div>","</div>","</div>"].join(""),n.append(i)})}}),r.CZRDynModule.prototype.initialize.call(this,e,t)}};r.czrModuleMap=r.czrModuleMap||{},sektionsLocalizedData.isSavedSectionEnabled&&e.extend(r.czrModuleMap,{sek_my_sections_sec_picker_module:{mthds:t,crud:!1,name:r.czr_sektions.getRegisteredModuleProperty("sek_my_sections_sec_picker_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_my_sections_sec_picker_module")}})}(wp.customize,jQuery,_),function(t,e,i){t.czrInputMap=t.czrInputMap||{},e.extend(t.czrInputMap,{section_picker:function(e){t.czr_sektions.trigger("sek-refresh-dragzones",{type:"preset_section",input_container:this.container})}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_level_anchor_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_level_anchor_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_anchor_module"))}})}(wp.customize,jQuery,_),function(r,e,a){var t={initialize:function(e,t){this.itemConstructor=r.CZRItem.extend(this.CZRItemConstructor||{}),r.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!a.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){r.errorLog("item.setInputVisibilityDeps() : "+e)}}),r.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,o=n.module;n.czr_Input.each(function(i){switch(i.id){case"bg-image":a.each(["bg-attachment","bg-scale","bg-repeat","bg-apply-overlay","bg-color-overlay","bg-opacity-overlay","bg-parallax","bg-parallax-force"],function(t){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"bg-color-overlay":case"bg-opacity-overlay":e=!a.isEmpty(i()+"")&&r.CZR_Helpers.isChecked(n.czr_Input("bg-apply-overlay")());break;case"bg-parallax-force":e=!a.isEmpty(i()+"")&&r.CZR_Helpers.isChecked(n.czr_Input("bg-parallax")());break;case"bg-scale":case"bg-repeat":e=!a.isEmpty(i()+"")&&!r.CZR_Helpers.isChecked(n.czr_Input("bg-parallax")());break;default:e=!a.isEmpty(i()+"")}return e})}catch(e){r.errare(o.id+" => error in setInputVisibilityDeps",e)}});break;case"bg-apply-overlay":a.each(["bg-color-overlay","bg-opacity-overlay"],function(e){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return!a.isEmpty(n.czr_Input("bg-image")()+"")&&r.CZR_Helpers.isChecked(i())})}catch(e){r.errare(o.id+" => error in setInputVisibilityDeps",e)}});break;case"bg-parallax":a.each(["bg-parallax-force","bg-scale","bg-repeat"],function(t){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"bg-parallax-force":e=!a.isEmpty(n.czr_Input("bg-image")()+"")&&r.CZR_Helpers.isChecked(i());break;case"bg-repeat":case"bg-scale":e=!a.isEmpty(n.czr_Input("bg-image")()+"")&&!r.CZR_Helpers.isChecked(i())}return e})}catch(e){r.errare(o.id+" => error in setInputVisibilityDeps",e)}}),i.bind(function(e){r.CZR_Helpers.isChecked(i())&&r.CZR_Helpers.isChecked(n.czr_Input("bg-attachment")())&&n.czr_Input("bg-attachment").container.find("input[type=checkbox]").trigger("click")});break;case"bg-attachment":i.bind(function(e){r.CZR_Helpers.isChecked(i())&&r.CZR_Helpers.isChecked(n.czr_Input("bg-parallax")())&&n.czr_Input("bg-parallax").container.find("input[type=checkbox]").trigger("click")})}})}}};r.czrModuleMap=r.czrModuleMap||{},e.extend(r.czrModuleMap,{sek_level_bg_module:{mthds:t,crud:!1,name:r.czr_sektions.getRegisteredModuleProperty("sek_level_bg_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:a.extend({id:"",title:""},r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_bg_module"))}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var i=this.module;this.czr_Input.each(function(t){switch(t.id){case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{sek_level_border_module:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("sek_level_border_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.extend({id:"",title:""},n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_border_module"))}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(e){switch(e.id){case"use-custom-breakpoint":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"custom-breakpoint",function(){return e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_level_breakpoint_module:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_level_breakpoint_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_breakpoint_module"))}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var i=this.module;this.czr_Input.each(function(t){switch(t.id){case"height-type":o.each(["custom-height","overflow_hidden"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"custom"===t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{sek_level_height_module:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("sek_level_height_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.extend({id:"",title:""},n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_height_module"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_level_visibility_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_level_visibility_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_visibility_module"))}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(e){switch(e.id){case"width-type":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"custom-width",function(){return"custom"===e()}),i.czr_sektions.scheduleVisibilityOfInputId.call(e,"h_alignment",function(){return"custom"===e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_level_width_module:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_level_width_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_width_module"))}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(e){switch(e.id){case"use-custom-outer-width":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"outer-section-width",function(){return e()});break;case"use-custom-inner-width":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"inner-section-width",function(){return e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_level_width_section:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_level_width_section","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_width_section"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_level_spacing_module:{mthds:"",crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_level_spacing_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_spacing_module"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_template:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_template","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_template"))}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(e){switch(e.id){case"use-custom-outer-width":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"outer-section-width",function(){return e()});break;case"use-custom-inner-width":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"inner-section-width",function(){return e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_local_widths:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_local_widths","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:n.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_widths"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_custom_css:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_custom_css","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_custom_css"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_reset:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_reset","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_reset"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_performances:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_performances","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_performances"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_header_footer:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_header_footer","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_header_footer"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_revisions:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_revisions","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_revisions"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_local_imp_exp:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_local_imp_exp","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_imp_exp"))}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(e){switch(e.id){case"use-custom-breakpoint":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"global-custom-breakpoint",function(){return e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_global_breakpoint:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_global_breakpoint","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:n.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_breakpoint"))}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(e){switch(e.id){case"use-custom-outer-width":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"outer-section-width",function(){return e()});break;case"use-custom-inner-width":i.czr_sektions.scheduleVisibilityOfInputId.call(e,"inner-section-width",function(){return e()})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_global_widths:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_global_widths","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:n.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_widths"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_global_performances:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_global_performances","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_performances"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_global_header_footer:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_global_header_footer","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_header_footer"))}})}(wp.customize,jQuery,_),function(r,e,a){var t={initialize:function(e,t){this.itemConstructor=r.CZRItem.extend(this.CZRItemConstructor||{}),r.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!a.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){r.errorLog("item.setInputVisibilityDeps() : "+e)}}),r.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,o=n.module;n.czr_Input.each(function(i){switch(i.id){case"enable":a.each(["public_key","private_key","badge","show_failure_message","failure_message","score"],function(t){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"failure_message":e=i()&&n.czr_Input("show_failure_message")();break;default:e=i()}return e})}catch(e){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}});break;case"show_failure_message":a.each(["failure_message"],function(e){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()&&n.czr_Input("enable")()})}catch(e){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};r.czrModuleMap=r.czrModuleMap||{},e.extend(r.czrModuleMap,{sek_global_recaptcha:{mthds:t,crud:!1,name:r.czr_sektions.getRegisteredModuleProperty("sek_global_recaptcha","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:a.extend({id:"",title:""},r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_recaptcha"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_global_revisions:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_global_revisions","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_revisions"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_global_reset:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_global_reset","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_reset"))}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{sek_global_beta_features:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("sek_global_beta_features","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:i.extend({id:"",title:""},e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_beta_features"))}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.itemConstructor=o.CZRItem.extend(this.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(this,e,t),this.bind("set_default_content_picker_options",function(e){return e.defaultContentPickerOption.defaultOption={title:'<span style="font-weight:bold">'+sektionsLocalizedData.i18n["Set a custom url"]+"</span>",type:"",type_label:"",object:"",id:"_custom_",url:""},e})},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,t=n.module;n.czr_Input.each(function(i){switch(i.id){case"img":o.czr_sektions.scheduleVisibilityOfInputId.call(i,"img-size",function(){return!r.isEmpty(i()+"")&&r.isNumber(i())});break;case"link-to":r.each(["link-pick-url","link-custom-url","link-target"],function(t){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"link-custom-url":e="url"===i()&&"_custom_"==n.czr_Input("link-pick-url")().id;break;case"link-pick-url":e="url"===i();break;case"link-target":e=!r.contains(["no-link","img-lightbox"],i())}return e})}catch(e){o.errare("Image module => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":o.czr_sektions.scheduleVisibilityOfInputId.call(i,"link-custom-url",function(){return"_custom_"==i().id&&"url"==n.czr_Input("link-to")()});break;case"border-type":r.each(["borders"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return"none"!==i()})}catch(e){o.errare(t.id+" => error in setInputVisibilityDeps",e)}});break;case"use_custom_width":r.each(["custom_width"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare("Image module => error in setInputVisibilityDeps",e)}});break;case"use_custom_title_attr":r.each(["heading_title"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare("Image module => error in setInputVisibilityDeps",e)}})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_image_main_settings_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_image_main_settings_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_image_main_settings_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var e=this,i=e.module;e.czr_Input.each(function(t){switch(t.id){case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_image_borders_corners_child:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_image_borders_corners_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_image_borders_corners_child")}})}(wp.customize,jQuery,_),function(n,e,t){var i={initialize:function(e,t){this.inputConstructor=n.CZRInput.extend(this.CZRTextEditorInputMths||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRTextEditorInputMths:{initialize:function(e,t){var i=this;"detached_tinymce_editor"==i.type&&i.isReady.then(function(){i.container.find('[data-czr-action="open-tinymce-editor"]').trigger("click")}),n.CZRInput.prototype.initialize.call(i,e,t)}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_tinymce_child:{mthds:i,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_tinymce_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_tinymce_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_simple_html_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_simple_html_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_html_module")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(i){switch(i.id){case"img-type":o.each(["img-id","img-size"],function(t){try{n.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"img-id":e="custom"===i();break;default:e="none"!==i()}return e})}catch(e){n.errare("Featured pages module => error in setInputVisibilityDeps",e)}});break;case"content-type":o.each(["content-custom-text"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return"custom"===i()})}catch(e){n.errare("Featured pages module => error in setInputVisibilityDeps",e)}});break;case"btn-display":o.each(["btn-custom-text"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){n.errare("Featured pages module => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_featured_pages_module:{mthds:t,crud:n.czr_sektions.getRegisteredModuleProperty("czr_featured_pages_module","is_crud"),hasPreItem:!1,refresh_on_add_item:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_featured_pages_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_featured_pages_module")}})}(wp.customize,jQuery,_),function(r,e,a){var t={initialize:function(e,t){this.itemConstructor=r.CZRItem.extend(this.CZRItemConstructor||{}),this.bind("set_default_content_picker_options",function(e){return e.defaultContentPickerOption.defaultOption={title:'<span style="font-weight:bold">'+sektionsLocalizedData.i18n["Set a custom url"]+"</span>",type:"",type_label:"",object:"",id:"_custom_",url:""},e}),r.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!a.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){r.errorLog("item.setInputVisibilityDeps() : "+e)}}),r.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,o=n.module;n.czr_Input.each(function(i){switch(i.id){case"link-to":a.each(["link-pick-url","link-custom-url","link-target"],function(t){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"link-custom-url":e="url"==i()&&"_custom_"==n.czr_Input("link-pick-url")().id;break;default:e="url"==i()}return e})}catch(e){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":r.czr_sektions.scheduleVisibilityOfInputId.call(i,"link-custom-url",function(){return"_custom_"==i().id&&"url"==n.czr_Input("link-to")()});break;case"use_custom_color_on_hover":a.each(["color_hover"],function(e){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};r.czrModuleMap=r.czrModuleMap||{},e.extend(r.czrModuleMap,{czr_icon_settings_child:{mthds:t,crud:!1,name:r.czr_sektions.getRegisteredModuleProperty("czr_icon_settings_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_icon_settings_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var e=this,i=e.module;e.czr_Input.each(function(t){switch(t.id){case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_icon_spacing_border_child:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_icon_spacing_border_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_icon_spacing_border_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.itemConstructor=o.CZRItem.extend(this.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(this,e,t),this.bind("set_default_content_picker_options",function(e){return e.defaultContentPickerOption.defaultOption={title:'<span style="font-weight:bold">'+sektionsLocalizedData.i18n["Set a custom url"]+"</span>",type:"",type_label:"",object:"",id:"_custom_",url:""},e})},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this;n.module;n.czr_Input.each(function(i){switch(i.id){case"link-to":r.each(["link-pick-url","link-custom-url","link-target"],function(t){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"link-custom-url":e=i()&&"_custom_"==n.czr_Input("link-pick-url")().id;break;case"link-pick-url":case"link-target":e=i()}return e})}catch(e){o.errare("Heading module => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":o.czr_sektions.scheduleVisibilityOfInputId.call(i,"link-custom-url",function(){return"_custom_"==i().id&&!0===n.czr_Input("link-to")()})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_heading_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_heading_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_heading_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_heading_spacing_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_heading_spacing_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_heading_spacing_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_divider_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_divider_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_divider_module")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_spacer_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_spacer_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_spacer_module")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_map_module:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_map_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_map_module")}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRButtonItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRButtonItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(t){switch(t.id){case"quote_design":n.each(["border_width_css","border_color_css"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"border-before"==t()})}catch(e){i.errare("Quote module => error in setInputVisibilityDeps",e)}}),n.each(["icon_color_css","icon_size_css"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"quote-icon-before"==t()})}catch(e){i.errare("Quote module => error in setInputVisibilityDeps",e)}})}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_quote_design_child:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("czr_quote_design_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_quote_design_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_quote_quote_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_quote_quote_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_quote_quote_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_quote_cite_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_quote_cite_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_quote_cite_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.itemConstructor=o.CZRItem.extend(this.CZRItemConstructor||{}),this.bind("set_default_content_picker_options",function(e){return e.defaultContentPickerOption.defaultOption={title:'<span style="font-weight:bold">'+sektionsLocalizedData.i18n["Set a custom url"]+"</span>",type:"",type_label:"",object:"",id:"_custom_",url:""},e}),o.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this;n.module;n.czr_Input.each(function(i){switch(i.id){case"link-to":r.each(["link-pick-url","link-custom-url","link-target"],function(t){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"link-custom-url":e="url"==i()&&"_custom_"==n.czr_Input("link-pick-url")().id;break;default:e="url"==i()}return e})}catch(e){o.errare("Button module => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":o.czr_sektions.scheduleVisibilityOfInputId.call(i,"link-custom-url",function(){return"_custom_"==i().id&&"url"==n.czr_Input("link-to")()});break;case"icon":o.czr_sektions.scheduleVisibilityOfInputId.call(i,"icon-side",function(){return!r.isEmpty(i())})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_btn_content_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_btn_content_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_btn_content_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var e=this,i=e.module;e.czr_Input.each(function(t){switch(t.id){case"use_custom_bg_color_on_hover":o.each(["bg_color_hover"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){n.errare("Button module => error in setInputVisibilityDeps",e)}});break;case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}});break;case"use_box_shadow":o.each(["push_effect"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){n.errare("Button module => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_btn_design_child:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_btn_design_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_btn_design_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.itemConstructor=o.CZRItem.extend(this.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this.module;this.czr_Input.each(function(i){switch(i.id){case"layout":r.each(["columns","img_column_width","has_tablet_breakpoint","has_mobile_breakpoint"],function(t){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"columns":e="grid"===i();break;case"has_tablet_breakpoint":case"has_mobile_breakpoint":case"img_column_width":e="list"===i()}return e})}catch(e){o.errare(n.module_type+" => error in setInputVisibilityDeps",e)}});break;case"categories":r.each(["must_have_all_cats"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){var e=i();return r.isArray(e)&&1<e.length})}catch(e){o.errare(n.module_type+" => error in setInputVisibilityDeps",e)}});break;case"custom_grid_spaces":r.each(["column_gap","row_gap"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare(n.module_type+" => error in setInputVisibilityDeps",e)}});break;case"show_excerpt":r.each(["excerpt_length"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare(n.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_post_grid_main_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_post_grid_main_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_post_grid_main_child")}})}(wp.customize,jQuery,_),function(r,e,a){var t={initialize:function(e,t){this.itemConstructor=r.CZRItem.extend(this.CZRItemConstructor||{}),r.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!a.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){r.errorLog("item.setInputVisibilityDeps() : "+e)}}),r.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this,o=n.module;n.czr_Input.each(function(i){switch(i.id){case"show_thumb":a.each(["img_size","img_has_custom_height","img_height","border_radius_css","use_post_thumb_placeholder"],function(t){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"img_height":e=i()&&n.czr_Input("img_has_custom_height")();break;default:e=i()}return e})}catch(e){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}});break;case"img_has_custom_height":a.each(["img_height"],function(e){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()&&n.czr_Input("show_thumb")()})}catch(e){r.errare(o.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};r.czrModuleMap=r.czrModuleMap||{},e.extend(r.czrModuleMap,{czr_post_grid_thumb_child:{mthds:t,crud:!1,name:r.czr_sektions.getRegisteredModuleProperty("czr_post_grid_thumb_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_post_grid_thumb_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_post_grid_metas_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_post_grid_metas_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_post_grid_metas_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_post_grid_fonts_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_post_grid_fonts_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_post_grid_fonts_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_menu_content_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_menu_content_child","name"),has_mod_opt:!1,ready_on_section_expanded:!0,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_menu_content_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_menu_mobile_options:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_menu_mobile_options","name"),has_mod_opt:!1,ready_on_section_expanded:!0,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_menu_mobile_options")}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.itemConstructor=i.CZRItem.extend(this.CZRItemConstructor||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!n.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){i.errorLog("item.setInputVisibilityDeps() : "+e)}}),i.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){this.module;this.czr_Input.each(function(t){switch(t.id){case"show_name_field":n.each(["name_field_label","name_field_required"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){i.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"show_subject_field":n.each(["subject_field_label","subject_field_required"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){i.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"show_message_field":n.each(["message_field_label","message_field_required"],function(e){try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){i.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":try{i.czr_sektions.scheduleVisibilityOfInputId.call(t,"link-custom-url",function(){return t()})}catch(e){i.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}}})}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_simple_form_fields_child:{mthds:t,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("czr_simple_form_fields_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_fields_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var i=this.module;this.czr_Input.each(function(t){switch(t.id){case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_simple_form_design_child:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_simple_form_design_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_design_child")}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){this.itemConstructor=n.CZRItem.extend(this.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!o.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){n.errorLog("item.setInputVisibilityDeps() : "+e)}}),n.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var i=this.module;this.czr_Input.each(function(t){switch(t.id){case"use_custom_bg_color_on_hover":o.each(["bg_color_hover"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){n.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}});break;case"border-type":o.each(["borders"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return"none"!==t()})}catch(e){n.errare(i.id+" => error in setInputVisibilityDeps",e)}});break;case"use_box_shadow":o.each(["push_effect"],function(e){try{n.czr_sektions.scheduleVisibilityOfInputId.call(t,e,function(){return t()})}catch(e){n.errare(t.module.module_type+" => error in setInputVisibilityDeps",e)}})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{czr_simple_form_button_child:{mthds:t,crud:!1,name:n.czr_sektions.getRegisteredModuleProperty("czr_simple_form_button_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_button_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_simple_form_fonts_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_simple_form_fonts_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_fonts_child")}})}(wp.customize,jQuery,_),function(e,t,i){e.czrModuleMap=e.czrModuleMap||{},t.extend(e.czrModuleMap,{czr_simple_form_submission_child:{crud:!1,name:e.czr_sektions.getRegisteredModuleProperty("czr_simple_form_submission_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:e.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_submission_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.itemConstructor=o.CZRItem.extend(this.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(this,e,t)},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!r.isEmpty(e))try{t.setInputVisibilityDeps()}catch(e){o.errorLog("item.setInputVisibilityDeps() : "+e)}}),o.CZRItem.prototype.ready.call(t)},setInputVisibilityDeps:function(){var n=this;n.module;n.czr_Input.each(function(i){switch(i.id){case"use_custom_bg_color_on_hover":r.each(["bg_color_hover"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare("Button module => error in setInputVisibilityDeps",e)}});break;case"use_box_shadow":r.each(["push_effect"],function(e){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return i()})}catch(e){o.errare("Button module => error in setInputVisibilityDeps",e)}});break;case"link-to":r.each(["link-pick-url","link-custom-url","link-target"],function(t){try{o.czr_sektions.scheduleVisibilityOfInputId.call(i,t,function(){var e=!1;switch(t){case"link-custom-url":e="url"==i()&&"_custom_"==n.czr_Input("link-pick-url")().id;break;default:e="url"==i()}return e})}catch(e){o.errare("Button module => error in setInputVisibilityDeps",e)}});break;case"link-pick-url":o.czr_sektions.scheduleVisibilityOfInputId.call(i,"link-custom-url",function(){return"_custom_"==i().id&&"url"==n.czr_Input("link-to")()})}})}}};o.czrModuleMap=o.czrModuleMap||{},e.extend(o.czrModuleMap,{czr_font_child:{mthds:t,crud:!1,name:o.czr_sektions.getRegisteredModuleProperty("czr_font_child","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:o.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_font_child")}})}(wp.customize,jQuery,_),function(i,e,t){var n={initialize:function(e,t){this.bind("nimble-set-select-input-options",function(e){e.params=sektionsLocalizedData.registeredWidgetZones}),i.CZRDynModule.prototype.initialize.call(this,e,t)}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_widget_area_module:{mthds:n,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("czr_widget_area_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_widget_area_module")}})}(wp.customize,jQuery,_);
assets/czr/sek/js/ccat-sek-preview.js CHANGED
@@ -551,6 +551,14 @@ var SekPreviewPrototype = SekPreviewPrototype || {};
551
  from_sektion : from_sektion,
552
  to_sektion : to_sektion
553
  });
 
 
 
 
 
 
 
 
554
  }
555
  }));
556
  },//self.makeColumnsSortableInSektion
@@ -1934,6 +1942,14 @@ var SekPreviewPrototype = SekPreviewPrototype || {};
1934
  }
1935
  },
1936
 
 
 
 
 
 
 
 
 
1937
  'sek-display-level-ui' : function( params ) {
1938
  var $elToFocusOn = $('[data-sek-id="' + params.id + '"]' );
1939
  if ( $elToFocusOn.length > 0 ) {
551
  from_sektion : from_sektion,
552
  to_sektion : to_sektion
553
  });
554
+
555
+ // inform the parent section that it's been refreshed
556
+ //=> will be listened to by columns to re-instantiate sortable, resizable
557
+ $('div[data-sek-id="' + from_sektion + '"]' ).trigger('sek-level-refreshed');
558
+ if ( from_sektion !== to_sektion ) {
559
+ $('div[data-sek-id="' + to_sektion + '"]' ).trigger('sek-level-refreshed');
560
+ }
561
+
562
  }
563
  }));
564
  },//self.makeColumnsSortableInSektion
1942
  }
1943
  },
1944
 
1945
+
1946
+ // LEVEL UI's
1947
+ 'sek-clean-level-uis' : function( params ) {
1948
+ $('.sek-dyn-ui-wrapper').each( function() {
1949
+ $(this).remove();
1950
+ });
1951
+ },
1952
+
1953
  'sek-display-level-ui' : function( params ) {
1954
  var $elToFocusOn = $('[data-sek-id="' + params.id + '"]' );
1955
  if ( $elToFocusOn.length > 0 ) {
assets/czr/sek/js/ccat-sek-preview.min.js CHANGED
@@ -1 +1 @@
1
- var SekPreviewPrototype=SekPreviewPrototype||{};!function(a,s,i){s.extend(SekPreviewPrototype,{initialize:function(){var t=this;try{this.skope_id=i.findWhere(_wpCustomizeSettings.czr_new_skopes,{skope:"local"}).skope_id}catch(e){return void this.errare("Preview => error when storing the skope_id",e)}this.scheduleHighlightActiveLevel(),t.setupLoader(),s(function(){t.setupSortable(),t.setupResizable(),t.setupUiHoverVisibility(),t.scheduleUiClickReactions(),t.schedulePanelMsgReactions()}),s("body").on("sek-columns-refreshed sek-modules-refreshed",function(e,t){if(!i.isUndefined(t)&&!i.isUndefined(t.in_sektion)&&0<s('[data-sek-id="'+t.in_sektion+'"]').length){var a=s('[data-sek-id="'+t.in_sektion+'"]');a.toggleClass("sek-has-modules",0<a.find('[data-sek-level="module"]').length)}}),t.deactivateLinks(),s("body").on(["sek-modules-refreshed","sek-columns-refreshed","sek-section-added","sek-level-refreshed","sek-edit-module"].join(" "),function(e){t.deactivateLinks(e)});var e=function(){var e=[];s('[data-sek-level="location"]').each(function(){e.push(s(this).data("sek-id"))}),a.preview.send("sek-active-locations-in-preview",{active_locations:e})};a.preview.bind("sek-request-active-locations",e),e()},deactivateLinks:function(e){e=e||{};s("body").find('[data-sek-level="module"]').each(function(){s(this).find("a").each(function(){try{(function(){if("yes"!==s(this).data("sek-unlinked")){var e=i.isString(s(this)[0].protocol)&&-1!==s(this)[0].protocol.indexOf("javascript");!e&&a.isLinkPreviewable(s(this)[0])?(s(this).addClass("nimble-shift-clickable"),s(this).data("sek-unlinked","yes").attr("data-nimble-href",s(this).attr("href")).attr("href","javascript:void(0)"),s(this).hover(function(){s(this).attr("title",sekPreviewLocalized.i18n["Shift-click to visit the link"])},function(){s(this).removeAttr("title")}),s(this).on("click",function(e){e.shiftKey&&(e.preventDefault(),window.location.href=s(this).attr("data-nimble-href"))})):(s(this).addClass("nimble-unclickable"),s(this).data("sek-unlinked","yes").attr("data-nimble-href",s(this).attr("href")).attr("href","javascript:void(0)"),s(this).hover(function(){s(this).attr("title",e?sekPreviewLocalized.i18n["Link deactivated while previewing"]:sekPreviewLocalized.i18n["External links are disabled when customizing"])},function(){s(this).removeAttr("title")}),s(this).on("click",function(e){e.preventDefault()}))}}).call(s(this))}catch(e){a.errare("::deactivateLinks => error ",e)}})})},scheduleHighlightActiveLevel:function(){var n=this;this.activeLevelUI=new a.Value(""),this.activeUIChangedRecently=new a.Value(!1),this.activeLevelUI.bind(function(e,t){var a=s('[data-sek-id="'+e+'"]'),i=s('[data-sek-id="'+t+'"]');0<a.length&&a.addClass("sek-active-ui sek-highlight-active-ui"),0<i.length&&i.removeClass("sek-active-ui sek-highlight-active-ui"),n.activeUIChangedRecently(Date.now())}),i.each(["sek-refresh-stylesheet","sek-refresh-level"],function(e){a.preview.bind(e,function(e){n.activeUIChangedRecently(Date.now())})}),this.activeUIChangedRecently.bind(function(e){var t=s('[data-sek-id="'+n.activeLevelUI()+'"]');s(".sek-highlight-active-ui").length&&s(".sek-highlight-active-ui").removeClass("sek-highlight-active-ui"),0<t.length&&t.toggleClass("sek-highlight-active-ui",!1!==e),clearTimeout(s.data(this,"_ui_change_timer_")),s.data(this,"_ui_change_timer_",setTimeout(function(){n.activeUIChangedRecently(!1)},3e3))})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(m,p,h){p.extend(SekPreviewPrototype,{setupSortable:function(){var a=this;return this.sortableDefaultParams={placeholder:"sortable-placeholder",over:function(e,t){},cursorAt:{top:0,left:0},tolerance:"pointer"},p('[data-sek-level="location"]').each(function(){a.makeSektionsSortableInLocation(p(this).data("sek-id"))}),p("body").on("sek-section-added sek-level-refreshed",'[data-sek-level="location"]',function(e,t){a.makeSektionsSortableInLocation(p(this).data("sek-id"))}),p('[data-sek-level="location"]').each(function(){p(this).find('[data-sek-level="section"]').each(function(){a.makeColumnsSortableInSektion(p(this).data("sek-id"))})}),p("body").on("sek-columns-refreshed sek-section-added",'[data-sek-level="section"]',function(e){a.makeColumnsSortableInSektion(p(this).data("sek-id"))}),p("body").on("sek-level-refreshed",'[data-sek-level="location"]',function(e,t){p(this).find('[data-sek-level="section"]').each(function(){a.makeColumnsSortableInSektion(p(this).data("sek-id"))})}),p('[data-sek-level="location"]').each(function(){p(this).find('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(p(this).data("sek-id"))})}),p("body").on("sek-modules-refreshed",'[data-sek-level="column"]',function(){a.makeModulesSortableInColumn(p(this).data("sek-id"))}),p("body").on("sek-columns-refreshed",'[data-sek-level="section"]',function(){p(this).find(".sek-sektion-inner").first().children('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(p(this).data("sek-id"))})}),p("body").on("sek-level-refreshed",'[data-sek-level="location"]',function(e,t){p(this).find('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(p(this).data("sek-id"))})}),p("body").on("sek-section-added",'[data-sek-level="location"]',function(e,t){p(this).find('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(p(this).data("sek-id"))})}),this},makeSektionsSortableInLocation:function(e){var a,i,t,n=this,s=[],o=[];p('[data-sek-id="'+e+'"]').each(function(){!0!==p(this).data("sek-is-global-location")&&(t=p.extend(!0,{},n.sortableDefaultParams),p(this).sortable(h.extend(t,{handle:".sek-move-section",connectWith:'[data-sek-is-global-location="false"]',placeholder:{element:function(e){return p('<div class="sortable-placeholder"><div class="sek-module-placeholder-content"><p>'+sekPreviewLocalized.i18n["Insert here"]+"</p></div></div>")[0]},update:function(e,t){}},start:function(e,t){p("body").addClass("sek-moving-section"),$sourceLocation=t.item.closest('[data-sek-level="location"]'),a=$sourceLocation.data("sek-id"),$sourceLocation.children('[data-sek-level="section"]').each(function(){s.push(p(this).data("sek-id"))})},stop:function(e,t){p("body").removeClass("sek-moving-section"),o=[],$targetLocation=t.item.closest('[data-sek-level="location"]'),i=$targetLocation.data("sek-id"),$targetLocation.children('[data-sek-level="section"]').each(function(){o.push(p(this).data("sek-id"))}),m.preview.send("sek-move",{id:t.item.data("sek-id"),level:"section",newOrder:o,from_location:a,to_location:i})},over:function(e,t){t.placeholder.addClass("sek-sortable-section-over")},out:function(e,t){t.placeholder.removeClass("sek-sortable-section-over")}})))})},makeColumnsSortableInSektion:function(e){var a,i,n,s,o=this,t=p.extend(!0,{},o.sortableDefaultParams),r=[],d=[],l=p('[data-sek-id="'+e+'"]').find(".sek-sektion-inner").first(),c=function(e){if(e=p.extend({forTarget:!0},e||{}),!h.isEmpty(p(this).data("_sortable_columns_css_classes_")))return p(this).data("_sortable_columns_css_classes_");var t,a=p(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]').length,i=Math.floor(100/a);t=!0===e.forTarget?12<a+1?12:a+1:a-1<1?1:a-1;var n={current:"sek-col-"+i,next:"sek-col-"+Math.floor(100/t)};return p(this).data("_sortable_columns_css_classes_",n),n};l.sortable(h.extend(t,{handle:".sek-move-column",connectWith:".sek-sektion-inner",over:function(e,t){var a,i=p(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]');!0!==p(this).data("sek-is-sender")?(a=c.call(p(this)),h.isEmpty(a)||i.each(function(){p(this).removeClass(a.current).addClass(a.next)})):(a=c.call(p(this),{forTarget:!1}),h.isEmpty(a)||i.each(function(){p(this).addClass(a.current).removeClass(a.next)}))},out:function(e,t){var a,i=p(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]');!0!==p(this).data("sek-is-sender")?(a=c.call(p(this)),h.isEmpty(a)||i.each(function(){p(this).addClass(a.current).removeClass(a.next)})):(a=c.call(p(this),{forTarget:!1}),h.isEmpty(a)||i.each(function(){p(this).removeClass(a.current).addClass(a.next)}))},remove:function(e,t){n=t.item.closest('[data-sek-level="location"]'),to_location=n.data("sek-id"),s=!0===n.data("sek-is-global-location");var a=to_location!=from_location;return i!==s||!0===i&&!0===s&&a?(m.preview.send("sek-notify",{message:sekPreviewLocalized.i18n["Moving elements between global and local sections is not allowed."]}),!1):($targetSektionCandidate=t.item.closest('[data-sek-level="section"]'),!(0<$targetSektionCandidate.length&&12<$targetSektionCandidate.find(".sek-sektion-inner").first().children('[data-sek-level="column"]').length)||(m.preview.send("sek-notify",{message:sekPreviewLocalized.i18n["You've reached the maximum number of columns allowed in this section."]}),!1))},start:function(e,t){a=t.item.closest('[data-sek-level="location"]'),from_location=a.data("sek-id"),i=!0===a.data("sek-is-global-location"),r=[],d=[],from_sektion=t.item.closest('[data-sek-level="section"]').data("sek-id"),t.item.closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]').each(function(){r.push(p(this).data("sek-id"))}),p(this).data("sek-is-sender",!0),h.isEmpty(r)&&o.errare("column sortable => startOrder should not be empty")},stop:function(e,t){$targetSektion=t.item.closest('[data-sek-level="section"]'),to_sektion=$targetSektion.data("sek-id"),$targetSektion.find(".sek-sektion-inner").first().children('[data-sek-level="column"]').each(function(){d.push(p(this).data("sek-id"))});var a,i=p(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]');!0!==p(this).data("sek-is-sender")?(a=c.call(p(this)),h.isEmpty(a)||i.each(function(){p(this).removeClass(a.current).addClass(a.next)})):(a=c.call(p(this),{forTarget:!1}),h.isEmpty(a)||i.each(function(){p(this).addClass(a.current).removeClass(a.next)})),p('[data-sek-level="section"]').find(".sek-sektion-inner").each(function(){p(this).data("sek-is-sender",null).data("_sortable_columns_css_classes_",null)}),h.isEmpty(d)?o.errare("column sortable => newOrder should not be empty"):h.isEqual(d,r)&&to_sektion===from_sektion?sekPreviewLocalized.isDevMode&&o.errare("preview => makeModulesSortableInColumn => start and stop positions are identical"):m.preview.send("sek-move",{id:t.item.data("sek-id"),level:"column",newOrder:d,from_sektion:from_sektion,to_sektion:to_sektion})}}))},makeModulesSortableInColumn:function(e){var a,i,n,s,t,o,r,d,l,c=[],k=[],u=this;t=p.extend(!0,{},u.sortableDefaultParams),p('[data-sek-id="'+e+'"]').find(".sek-column-inner").first().sortable(h.extend(t,{handle:".sek-move-module",connectWith:".sek-column-inner",over:function(e,t){p('[data-sek-level="location"]').find(".sek-sortable-overing").each(function(){p(this).removeClass("sek-sortable-overing")}),p(e.target).addClass("sek-sortable-overing")},remove:function(e,t){d=t.item.closest('[data-sek-level="location"]'),to_location=d.data("sek-id"),l=!0===d.data("sek-is-global-location");var a=to_location!=from_location;return!(r!==l||!0===r&&!0===l&&a)||(m.preview.send("sek-notify",{message:sekPreviewLocalized.i18n["Moving elements between global and local sections is not allowed."]}),!1)},start:function(e,t){o=t.item.closest('[data-sek-level="location"]'),from_location=o.data("sek-id"),r=!0===o.data("sek-is-global-location"),c=[],k=[],p("body").addClass("sek-dragging-element"),i=t.item.closest('[data-sek-level="column"]').data("sek-id"),a=t.item.closest('[data-sek-level="section"]').data("sek-id"),t.item.closest('[data-sek-level="column"]').find(".sek-column-inner").first().children('[data-sek-level="module"]').each(function(){c.push(p(this).data("sek-id"))}),h.isEmpty(c)&&u.errare("makeModulesSortableInColumn => startOrder should not be empty")},stop:function(e,t){s=t.item.closest('[data-sek-level="column"]'),n=s.data("sek-id"),s.find(".sek-column-inner").first().children("[data-sek-id]").each(function(){k.push(p(this).data("sek-id"))}),h.isEmpty(k)?u.errare("makeModulesSortableInColumn => newOrder should not be empty"):h.isEqual(k,c)&&n===i?u.errare("preview => makeModulesSortableInColumn => start and stop positions are identical"):(m.preview.send("sek-move",{id:t.item.data("sek-id"),level:"module",newOrder:k,from_column:i,to_column:n,from_sektion:a,to_sektion:t.item.closest('[data-sek-level="section"]').data("sek-id")}),p("body").removeClass("sek-dragging-element"))}}))}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(l,c,k){c.extend(SekPreviewPrototype,{setupResizable:function(){var t=this;return c(".sektion-wrapper").find('div[data-sek-level="section"]').each(function(){t.maybeMakeColumnResizableInSektion.call(this)}),c("body").on("sek-level-refreshed sek-modules-refreshed sek-columns-refreshed sek-section-added",'[data-sek-level="location"]',function(e){c(this).find('[data-sek-level="section"]').each(function(){t.maybeMakeColumnResizableInSektion.call(this)})}),this},maybeMakeColumnResizableInSektion:function(){var a,i,n,s,o,r,d,e=c(this).find(".sek-sektion-inner").first().children('div[data-sek-level="column"]');if(!(e.length<2)){var t=c(this).find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').last();e.not(t).each(function(){c(this).resizable({resize:function(e,t){c(".sektion-wrapper").data("sek-resizing-columns",!0)},start:function(e,t){if(a=t.element.closest('div[data-sek-level="section"]'),a.data("sek-id"),i=a.find(".sek-sektion-inner")[0].getBoundingClientRect().width,!((o=a.find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').length)<2)){if((n=t.element.closest('div[data-sek-level="column"]')).length<1)throw new Error("ERROR => resizable => No valid level dom element found");d=n.index()+1==o,r=d?n.prev():n.next(),c(".sektion-wrapper").data("sek-resizing-columns",!0),k.delay(function(){c(".sektion-wrapper").data("sek-resizing-columns",!1)},3e3)}},stop:function(e,t){if(!(o<2)){if(n.length<1)throw new Error("ERROR => resizable => No valid level dom element found");n.css({width:"",height:""}),s=(parseFloat(t.size.width)/parseFloat(i)*100).toFixed(3),l.preview.send("sek-resize-columns",{action:"sek-resize-columns",level:n.data("sek-level"),in_sektion:a.data("sek-id"),id:n.data("sek-id"),resized_column:n.data("sek-id"),sister_column:r.data("sek-id"),resizedColumnWidthInPercent:s,col_number:o}),c(".sektion-wrapper").data("sek-resizing-columns",!1)}},helper:"ui-resizable-helper",handles:"e"});var e=c(this);k.delay(function(){e.find(".ui-resizable-handle").find(".fa-arrows-alt-h").length<1&&e.find(".ui-resizable-handle").append('<i class="fas fa-arrows-alt-h"></i>')},500)})}}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(l,p,h){p.extend(SekPreviewPrototype,{printLevelUI:function(e){var t,a,i,n;if((h.isUndefined(e)||e.length<1)&&this.errare("sekPreview::printeLevelUI => invalid level element => ",e),"location"!=(a=e.data("sek-level"))&&!(0<(n=e).children(".sek-dyn-ui-wrapper").length)){var s=n[0].getBoundingClientRect(),o=n.data("sek-level");switch(n.toggleClass("sek-shrink-my-ui",s.width&&s.width<("section"===o?350:"column"===o?300:200)),i={id:n.data("sek-id"),level:o},a){case"section":var r,d,l=n.closest('div[data-sek-level="location"]'),c=n.closest('div[data-sek-level="column"]'),k=!0===n.data("sek-is-nested");k?0<c.length&&(r=c.find(".sek-column-inner").first().children("div[data-sek-level]").length==n.index()+1,d=0===n.index()):0<l.length&&(r=l.children('div[data-sek-level="section"]').length==n.index()+1,d=0===n.index()),i=h.extend(i,{is_nested:k,can_have_more_columns:n.find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').length<12,is_global_location:!0===l.data("sek-is-global-location"),is_last_section_in_parent:r,is_first_section_in_parent:d,is_header_location:!0===l.data("sek-is-header-location"),is_footer_location:!0===l.data("sek-is-footer-location")});break;case"column":var u=n.closest('div[data-sek-level="section"]');i=h.extend(i,{parent_can_have_more_columns:u.find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').length<12,parent_is_single_column:u.find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').length<2,parent_is_last_allowed_nested:!0===u.data("sek-is-nested")});break;case"module":var m=this.getRegisteredModuleProperty(n.data("sek-module-type"),"name");i=h.extend(i,{module_name:"not_set"!=m?m:""})}!0===p(".sektion-wrapper").data("sek-resizing-columns")&&h.contains(["column","module"],a)||(t=this.parseTemplate("#sek-dyn-ui-tmpl-"+a),p.when(n.prepend(t(i))).done(function(){n.find(".sek-dyn-ui-wrapper").stop(!0,!0).fadeIn({duration:150,complete:function(){}})}))}},setupUiHoverVisibility:function(){var i,e,t,o=this,r=function(){(e=p(this)).children(".sek-dyn-ui-wrapper").length<1||sekPreviewLocalized.isPreviewUIDebugMode||(e.data("UIisFadingOut",!0),e.children(".sek-dyn-ui-wrapper").stop(!0,!0).fadeOut({duration:150,complete:function(){p(this).remove(),e.data("UIisFadingOut",!1)}}))},a=function(){var e=p(this);clearTimeout(e.data("_toggle_ui_menu_")),e.data("_toggle_ui_menu_",setTimeout(function(){n.call(e)},1e4))},n=function(e){var t=p(this),a=p(this).closest(".sek-dyn-ui-location-type"),i=t.closest(".sek-dyn-ui-wrapper").find(".sek-dyn-ui-inner");!0===e?(t.removeClass("sek-collapsed"),i.addClass("sek-is-expanded"),a.hide()):(t.addClass("sek-collapsed"),i.removeClass("sek-is-expanded"),a.show())};p("body").on("click",".sek-dyn-ui-location-inner",function(e){var t=p(this).find(".sek-dyn-ui-hamb-menu-wrapper");p(this).closest('[data-sek-level="section"]').find(".sek-dyn-ui-hamb-menu-wrapper").each(function(){n.call(p(this))}),n.call(t,!0),a.call(t)}),p("body").on("mouseenter mouseover mouseleave",".sek-dyn-ui-wrapper",h.throttle(function(e){var t=p(this).find(".sek-dyn-ui-hamb-menu-wrapper");h.isUndefined(t.data("_toggle_ui_menu_"))||t.hasClass("sek-collapsed")||0<t.length&&a.call(t)},50)),p("body").on("click",".sek-minimize-ui",function(e){p(this).closest(".sek-dyn-ui-location-type").slideToggle("fast")}),p("body").on("mouseenter",".sek-wp-content-wrapper",function(e){0<(t=p(this)).children(".sek-dyn-ui-wrapper").length&&!0!==t.data("UIisFadingOut")||(i=o.parseTemplate("#sek-dyn-ui-tmpl-wp-content"),p.when(t.prepend(i({}))).done(function(){t.find(".sek-dyn-ui-wrapper").stop(!0,!0).fadeIn({duration:150,complete:function(){}})}))}).on("mouseleave",".sek-wp-content-wrapper",function(e){p(this).data("UIisFadingOut",!0),t=p(this),p(this).children(".sek-dyn-ui-wrapper").stop(!0,!0).fadeOut({duration:150,complete:function(){p(this).remove(),t.data("UIisFadingOut",!1)}})});var d=function(n,e){var t,s;h.isUndefined(e)||e.length<1?(t=p("body").find("[data-sek-level]"),s="printOrScheduleRemoval"):(t=e,s="mayBeRemove"),t.each(function(){var e=p(this)[0].getBoundingClientRect(),t=n.x<=e.right&&e.left<=n.x,a=n.y>=e.top&&e.bottom>=n.y,i=p(this);switch(s){case"mayBeRemove":i.data("sek-ui-removal-scheduled",!1),t&&a||r.call(i);break;case"printOrScheduleRemoval":t&&a?(i.data("sek-ui-removal-scheduled",!1),o.printLevelUI(i)):!0!==i.data("sek-ui-removal-scheduled")&&(i.data("sek-ui-removal-scheduled",!0),i.children(".sek-dyn-ui-wrapper").find(".sek-is-expanded").length<1?d(n,i):h.delay(function(){!0===i.data("sek-ui-removal-scheduled")&&d(o.mouseMovedRecently(),i)},3500))}})};o.mouseMovedRecently=new l.Value({}),o.mouseMovedRecently.bind(function(e){var k,t,a;h.isEmpty(e)?(p("body").stop(!0,!0).find(".sek-add-content-button").each(function(){p(this).fadeOut({duration:200,complete:function(){p(this).remove()}})}),p("body").stop(!0,!0).find("[data-sek-level]").each(function(){p(this).children(".sek-dyn-ui-wrapper").find(".sek-is-expanded").length<1&&r.call(p(this))})):(p("body").find('div[data-sek-level="location"]').each(function(){var e;$sectionCollection=p(this).children('div[data-sek-level="section"]'),i=o.parseTemplate("#sek-tmpl-add-content-button"),t=p(this).data("sek-id"),a=!0===p(this).data("sek-is-global-location"),$sectionCollection.each(function(){0<p(this).find(".sek-add-content-button").length||(p.when(p(this).prepend(i({location:t,is_global_location:a}))).done(function(){e=p(this).find(".sek-add-content-button"),p(this).data("sek-id")&&e.attr("data-sek-before-section",p(this).data("sek-id")),e.fadeIn(300)}),$sectionCollection.length==p(this).index()+1&&p.when(p(this).append(i({is_last:!0,location:t,is_global_location:a}))).done(function(){e=p(this).find(".sek-add-content-button").last(),p(this).data("sek-id")&&e.attr("data-sek-after-section",p(this).data("sek-id")),e.fadeIn(300)}))})}),p(".sek-empty-location-placeholder").each(function(){0<p(this).find(".sek-add-content-button").length||(t=p(this).closest('div[data-sek-level="location"]').data("sek-id"),a=!0===p(this).closest('div[data-sek-level="location"]').data("sek-is-global-location"),p.when(p(this).append(i({location:t,is_global_location:a}))).done(function(){$btn_el=p(this).find(".sek-add-content-button"),$btn_el.attr("data-sek-is-first-section",!0),$btn_el.fadeIn(300)}))}),k=e,p("body").find(".sek-add-content-button").each(function(){var e=p(this)[0].getBoundingClientRect(),t=k.y,a=k.x,i=Math.abs(t-e.bottom),n=Math.abs(e.top-t),s=a-e.right,o=e.left-a,r=i<40||n<40,d=0<s&&s<40||0<o&&o<40,l=a<=e.right&&e.left<=a,c=t>=e.top&&e.bottom>=t;p(this).toggleClass("sek-mouse-is-close",(r||c)&&(d||l))}),d(e))});var s=function(){clearTimeout(p(window).data("_scroll_move_timer_")),o.mouseMovedRecently.set({})};return p(window).on("mousemove scroll",h.throttle(function(e){o.mouseMovedRecently({x:e.clientX,y:e.clientY}),clearTimeout(p(window).data("_scroll_move_timer_")),p(window).data("_scroll_move_timer_",setTimeout(function(){o.mouseMovedRecently.set({})},4e3))},50)),l.preview.bind("sek-drag-start",function(){s()}),p("body").on("sek-section-added",'[data-sek-level="location"]',function(e,t){s()}),this}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(u,m,p){m.extend(SekPreviewPrototype,{scheduleUiClickReactions:function(){var k=this;m("body").on("click",function(e){u.preview.send("sek-clean-target-drop-zone");var t,a=m(e.target),i=a.closest('[data-sek-level="location"]'),n=a.closest("[data-sek-level]"),s=a.closest("[data-sek-click-on]"),o=i.data("sek-id"),r=n.data("sek-level"),d=n.data("sek-id");switch("add-content"==a.data("sek-click-on")||0<a.closest("[data-sek-click-on]").length&&"add-content"==a.closest("[data-sek-click-on]").data("sek-click-on")?"addContentButton":!p.isEmpty(a.data("sek-click-on"))||0<s.length?"UIIcon":"module"==n.data("sek-level")?"moduleWrapper":"column"==n.data("sek-level")&&!0===n.data("sek-no-modules")?"noModulesColumn":a.hasClass("sek-to-json")?"sekToJson":"column"==n.data("sek-level")?"columnOutsideModules":"section"==n.data("sek-level")?"sectionOutsideColumns":p.isEmpty(a.data("sek-add"))?a.hasClass("sek-wp-content-wrapper")||a.hasClass("sek-wp-content-dyn-ui")?"wpContent":a.hasClass("sek-edit-wp-content")?"editWpContent":"inactiveZone":"addSektion"){case"addContentButton":var l=!0===a.closest("[data-sek-is-first-section]").data("sek-is-first-section");u.preview.send("sek-add-section",{location:o,level:"section",before_section:a.closest("[data-sek-before-section]").data("sek-before-section"),after_section:a.closest("[data-sek-after-section]").data("sek-after-section"),is_first_section:l,send_to_preview:!l});break;case"UIIcon":if(n.length<1)throw new Error("ERROR => sek-front-preview => No valid level dom element found");if(t=a.closest("[data-sek-click-on]").data("sek-click-on"),p.isEmpty(t))throw new Error("Invalid action");if(p.isEmpty(r)||p.isEmpty(d))throw new Error("ERROR => sek-front-preview => No valid level id found");k._send_(a,{action:t,location:o,level:r,id:d,was_triggered:!1});break;case"moduleWrapper":if(0<a.parent(".sek-dyn-ui-icons").length)return;k._send_(a,{action:"edit-module",level:r,id:d});break;case"noModulesColumn":if(0<a.parent(".sek-dyn-ui-icons").length)return;k._send_(a,{action:"pick-content",content_type:"module",level:r,id:d});break;case"columnOutsideModules":case"sectionOutsideColumns":k._send_(a,{action:"edit-options",location:o,level:r,id:d});break;case"addSektion":u.preview.send("sek-add-section",{location:o,level:a.data("sek-add")});break;case"sekToJson":u.preview.send("sek-to-json",{id:d});break;case"wpContent":u.preview.send("sek-notify",{type:"info",duration:8e3,message:sekPreviewLocalized.i18n["This content has been created with the WordPress editor."]});break;case"editWpContent":var c=a.closest("[data-sek-wp-edit-link]").data("sek-wp-edit-link");p.isEmpty(c)||window.open(c,"_blank");break;case"inactiveZone":u.preview.send("sek-click-on-inactive-zone")}})},_send_:function(e,t){var a=m.extend(!0,{},t),i="",n=e.closest('div[data-sek-level="module"]'),s="module"===t.level?n.data("sek-module-type"):"";"module"===t.level&&"czr_tiny_mce_editor_module"===s&&(i=0<n.find("div[data-sek-input-id]").length?n.find("div[data-sek-input-id]").data("sek-input-id"):""),u.preview.send("sek-"+t.action,p.extend({location:t.location,level:t.level,id:t.id,content_type:e.data("sek-content-type"),module_type:s,in_column:0<e.closest('div[data-sek-level="column"]').length?e.closest('div[data-sek-level="column"]').data("sek-id"):"",in_sektion:0<e.closest('div[data-sek-level="section"]').length?e.closest('div[data-sek-level="section"]').data("sek-id"):"",clicked_input_type:0<e.closest("div[data-sek-input-type]").length?e.closest("div[data-sek-input-type]").data("sek-input-type"):"",clicked_input_id:0<e.closest("div[data-sek-input-id]").length?e.closest("div[data-sek-input-id]").data("sek-input-id"):"",was_triggered:t.was_triggered,syncedTinyMceInputId:i},a))}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,s,o){s.extend(SekPreviewPrototype,{setupLoader:function(){var t=this;this._css_loader_html='<div class="sek-css-loader sek-mr-loader" style="display:none"><div></div><div></div><div></div></div>',s("body").on(["sek-modules-refreshed","sek-columns-refreshed","sek-section-added","sek-level-refreshed","sek-stylesheet-refreshed","sek-ajax-error"].join(" "),function(e){t.cleanLoader()})},mayBePrintLoader:function(e){var t=this,a=e.loader_located_in_level_id;if(!o.isEmpty(a)){var i=s('[data-sek-id="'+a+'"]');0<i.length&&s(".sek-level-clone ").length<1&&($levelClone=s("<div>",{class:"sek-level-clone"}),i.find("[data-sek-level]").each(function(){s(this).addClass("sek-refreshing")}),i.prepend($levelClone),$levelClone.css({width:i.outerWidth()+"px",height:i.outerHeight()+"px"}).append(t._css_loader_html).find(".sek-css-loader").fadeIn("fast"),clearTimeout(s.data(this,"_nimble_loader_active_timer_")),s.data(this,"_nimble_loader_active_timer_",setTimeout(function(){t.cleanLoader()},4e3)))}if(!0===e.fullPageLoader){var n=s("<div>",{id:"nimble-full-page-loader-wrapper",class:"white-loader"});s("body").append(n),n.fadeIn("fast").append(t._css_loader_html).find(".sek-css-loader").fadeIn("fast"),s('[data-sek-level="location"]').each(function(){s(this).addClass("sek-blur")}),clearTimeout(s.data(this,"_nimble_full_page_loader_active_timer_")),s.data(this,"_nimble_full_page_loader_active_timer_",setTimeout(function(){t.cleanLoader({cleanFullPageLoader:!0})},6e3))}},cleanLoader:function(e){s(".sek-level-clone").remove(),s("[data-sek-level]").each(function(){s(this).removeClass("sek-refreshing")}),!0===(e=e||{}).cleanFullPageLoader&&(s('[data-sek-level="location"]').each(function(){s(this).removeClass("sek-blur")}),s("#nimble-full-page-loader-wrapper").remove())}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(s,r,d){r.extend(SekPreviewPrototype,{schedulePanelMsgReactions:function(){var o=this,e={"sek-add-section":"ajaxAddSektion","sek-add-content-in-new-sektion":"ajaxAddSektion","sek-add-content-in-new-nested-sektion":"ajaxAddSektion","sek-add-column":"ajaxRefreshColumns","sek-add-module":"ajaxRefreshModulesAndNestedSections","sek-refresh-stylesheet":"ajaxRefreshStylesheet","sek-resize-columns":"ajaxResizeColumns","sek-maybe-print-loader":function(e){try{o.mayBePrintLoader(e)}catch(e){s.errare("sek-clean-loader => error",e)}},"sek-clean-loader":function(e){try{o.cleanLoader(e)}catch(e){s.errare("sek-clean-loader => error",e)}},"sek-remove":function(e){var t,a=e.apiParams.id,i=r('div[data-sek-id="'+a+'"]');switch(e.apiParams.action){case"sek-remove-section":o.mayBePrintLoader({loader_located_in_level_id:e.apiParams.location}),!0===e.apiParams.is_nested?t=o.ajaxRefreshModulesAndNestedSections(e):((d.isEmpty(a)||i.length<1)&&o.errare("reactToPanelMsg => sek-remove => invalid candidate id => ",a),r("body").find(i).remove(),r('[data-sek-id="'+e.apiParams.location+'"]').trigger("sek-level-refreshed"));break;case"sek-remove-column":t=o.ajaxRefreshColumns(e);break;case"sek-remove-module":t=o.ajaxRefreshModulesAndNestedSections(e)}return d.isEmpty(t)?r.Deferred(function(){this.resolve()}):t},"sek-duplicate":function(e){var t;switch(e.apiParams.action){case"sek-duplicate-section":e.apiParams.id=e.cloneId,t=o.ajaxAddSektion(e);break;case"sek-duplicate-column":e.apiParams.id=e.cloneId,t=o.ajaxRefreshColumns(e);break;case"sek-duplicate-module":e.apiParams.id=e.cloneId,t=o.ajaxRefreshModulesAndNestedSections(e)}return t},"sek-refresh-level":function(s){return o.mayBePrintLoader({loader_located_in_level_id:s.apiParams.id}),o.doAjax({location_skope_id:s.location_skope_id,local_skope_id:s.local_skope_id,action:"sek_get_content",id:s.apiParams.id,level:s.apiParams.level,sek_action:s.apiParams.action}).fail(function(e){o.errare("ERROR reactToPanelMsg => sek-refresh-level => ",e),r('[data-sek-id="'+s.apiParams.id+'"]').trigger("sek-ajax-error")}).done(function(e){var t="";e.data&&e.data.contents?t=e.data.contents:(o.errare("SekPreviewPrototype::sek-refresh-level => ajax_response.data.contents is undefined ",e),o.errare("params ?",s));var a='<span class="sek-placeholder" data-sek-placeholder-for="'+s.apiParams.id+'"></span>',i=r('div[data-sek-id="'+s.apiParams.id+'"]');if(i.length<1)o.errare("reactToPanelMsg => sek-refresh-level ajax done => the level to refresh is not rendered in the page",e);else{i.before(a);var n=r('[data-sek-placeholder-for="'+s.apiParams.id+'"]');i.remove(),d.isUndefined(t)?o.errare("reactToPanelMsg => sek-refresh-level ajax done => missing html_content",e):n.after(t),n.remove(),r('[data-sek-id="'+s.apiParams.id+'"]').trigger("sek-level-refreshed",{level:s.apiParams.level,id:s.apiParams.id})}})},"sek-move":function(e){switch(e.apiParams.action){case"sek-move-column":if(e.apiParams.from_sektion!=e.apiParams.to_sektion){var t=r.extend(!0,{},e),a=r.extend(!0,{},e);r('[data-sek-id="'+e.apiParams.from_sektion+'"]',".sektion-wrapper").find('div[data-sek-level="column"]').length<1?s.preview.send("sek-add-column",{in_sektion:e.apiParams.from_sektion,autofocus:!1}):(t.apiParams=d.extend(t.apiParams,{in_sektion:e.apiParams.from_sektion,action:"sek-refresh-columns-in-sektion"}),o.ajaxRefreshColumns(t)),a.apiParams=d.extend(a.apiParams,{in_sektion:e.apiParams.to_sektion,action:"sek-refresh-columns-in-sektion"}),o.ajaxRefreshColumns(a)}break;case"sek-move-module":var i=r.extend(!0,{},e),n=r.extend(!0,{},e);i.apiParams.from_column!=i.apiParams.to_column&&(i.apiParams=d.extend(i.apiParams,{in_column:i.apiParams.from_column,in_sektion:i.apiParams.from_sektion,action:"sek-refresh-modules-in-column"}),o.ajaxRefreshModulesAndNestedSections(i)),e.apiParams=d.extend(n.apiParams,{in_column:n.apiParams.to_column,in_sektion:n.apiParams.to_sektion,action:"sek-refresh-modules-in-column"}),o.ajaxRefreshModulesAndNestedSections(n),r('[data-sek-id="'+e.apiParams.to_column+'"]',".sektion-wrapper").find(".sek-column-inner").sortable("refresh")}},"sek-edit-options":function(e){o.activeLevelUI(e.uiParams.id)},"sek-edit-module":function(e){o.activeLevelUI(e.uiParams.id)},"sek-drag-start":function(n){var s=1,o=!1;r('[data-sek-level="location"]').children('[data-sek-level="section"]').each(function(){var e=r(this).data("sek-id"),t=r(this).find('[data-sek-level="column"]').length,a=r(this).find('[data-sek-level="module"]').length,i=t<2&&a<1;!o&&!i&&r('[data-drop-zone-before-section="'+e+'"]').length<1&&r(this).before('<div class="sek-content-'+n.type+'-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="between-sections" data-drop-zone-before-section="'+e+'"></div>'),i||s!=r(".sektion-wrapper").children('[data-sek-level="section"]').length||r(this).after('<div class="sek-content-'+n.type+'-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="between-sections" data-drop-zone-after-section="'+e+'"></div>'),s++,o=i}),r(".sek-empty-location-placeholder").each(function(){r.when(r(this).append('<div class="sek-content-'+n.type+'-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="in-empty-location"></div>'))}),"module"==n.type&&r('[data-sek-level="column"]').each(function(){var e=r(this).children(".sek-column-inner").children('[data-sek-level="module"]'),t=r(this).children(".sek-column-inner").children('[data-sek-is-nested="true"]');e=e.add(t);var a=1;e.each(function(){r('[data-drop-zone-before-module-or-nested-section="'+r(this).data("sek-id")+'"]').length<1&&r(this).before('<div class="sek-content-module-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="between-modules-and-nested-sections" data-drop-zone-before-module-or-nested-section="'+r(this).data("sek-id")+'"></div>'),a==e.length&&r('[data-drop-zone-after-module-or-nested-section="'+r(this).data("sek-id")+'"]').length<1&&r(this).after('<div class="sek-content-module-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="between-modules-and-nested-sections" data-drop-zone-after-module-or-nested-section="'+r(this).data("sek-id")+'"></div>'),a++})}),r("body").addClass("sek-dragging"),d.delay(function(){r(".sek-dynamic-drop-zone").css({opacity:1})},100)},"sek-drag-stop":function(e){r("body").removeClass("sek-dragging"),r(".sortable-placeholder").remove(),r(".sek-dynamic-drop-zone").remove()},"sek-animate-to-level":function(e){var t=r('[data-sek-id="'+e.id+'"]');0<t.length&&r("html, body").animate({scrollTop:t.offset().top-100},200)},"sek-display-level-ui":function(e){var t=r('[data-sek-id="'+e.id+'"]');0<t.length&&(t.trigger("click"),o.printLevelUI(t))},"sek-set-double-click-target":function(e){if(r(".sek-target-for-double-click-insertion").removeClass("sek-target-for-double-click-insertion"),d.isObject(e)&&e.id){var t=r('[data-sek-id="'+e.id+'"]');1===t.length&&t.addClass("sek-target-for-double-click-insertion")}},"sek-reset-double-click-target":function(e){r(".sek-target-for-double-click-insertion").removeClass("sek-target-for-double-click-insertion")},"sek-update-html-in-selector":function(e){var t=r('[data-sek-id="'+e.id+'"]'),a=r(e.selector,t);0<t.length&&0<a.length?a.html(e.html):o.errare("reactToPanelMsg => sek-update-html-in-selector => missing level or target dom element",e)}};d.each(e,function(e,i){s.preview.bind(i,function(a){a=d.extend({location_skope_id:"",apiParams:{},uiParams:{}},a||{});r("body").addClass(i);try{r.when(d.isFunction(e)?e(a):o[e].call(o,a)).done(function(e){var t;t=e,s.preview.send([i,"done"].join("_"),a),d.isUndefined(t)||t.data&&t.data.setting_validities&&s.preview.send("selective-refresh-setting-validities",t.data.setting_validities)}).fail(function(){s.preview.send("sek-notify",{type:"error",duration:1e4,message:sekPreviewLocalized.i18n["Something went wrong, please refresh this page."]})}).always(function(e){r("body").removeClass(i)}).then(function(){s.preview.trigger("control-panel-requested-action-done",{action:i,args:a})})}catch(e){o.errare("reactToPanelMsg => Error when firing the callback of "+i,e),r("body").removeClass(i)}})})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,o,r){o.extend(SekPreviewPrototype,{ajaxAddSektion:function(n){var s=this;return s.mayBePrintLoader({loader_located_in_level_id:n.apiParams.location}),s.doAjax({action:"sek_get_content",id:n.apiParams.id,in_sektion:n.apiParams.in_sektion,in_column:n.apiParams.in_column,location_skope_id:n.location_skope_id,local_skope_id:n.local_skope_id,sek_action:n.apiParams.action,is_nested:n.apiParams.is_nested}).done(function(e){var t,a="";if(e.data&&e.data.contents?a=e.data.contents:(s.errare("SekPreviewPrototype::ajaxAddSektion => ajax_response.data.contents is undefined ",e),s.errare("params ?",n)),n.apiParams.is_nested){(t=o(".sektion-wrapper").find('div[data-sek-id="'+n.apiParams.in_column+'"]')).length<1&&s.errare("preview => reactToPanelMsg => sek-add-column => no DOM node for parent column => ",n.apiParams.in_column);var i='<span class="sek-placeholder" data-sek-placeholder-for="'+n.apiParams.in_column+'"></span>';t.before(i),t.remove(),o(".sektion-wrapper").find(".sek-placeholder").after(a),o(".sektion-wrapper").find(".sek-placeholder").remove()}else"sek-duplicate-section"!=n.apiParams.action||r.isEmpty(n.cloneId)?($beforeCandidate=o('.sektion-wrapper[data-sek-id="'+n.apiParams.location+'"]').find('div[data-sek-id="'+n.apiParams.before_section+'"]'),$afterCandidate=o('.sektion-wrapper[data-sek-id="'+n.apiParams.location+'"]').find('div[data-sek-id="'+n.apiParams.after_section+'"]'),!r.isEmpty(n.apiParams.before_section)&&0<$beforeCandidate.length?$beforeCandidate.before(a):!r.isEmpty(n.apiParams.after_section)&&0<$afterCandidate.length?$afterCandidate.after(a):o('[data-sek-id="'+n.apiParams.location+'"]').append(a)):o(".sektion-wrapper").find('div[data-sek-id="'+n.apiParams.in_sektion+'"]').after(a);"sek-duplicate-section"==n.apiParams.action&&o('div[data-sek-id="'+n.cloneId+'"]',".sektion-wrapper").each(function(){o(this).trigger("sek-columns-refreshed")}),n.apiParams.is_nested&&(s.makeModulesSortableInColumn(n.apiParams.in_column),o(".sektion-wrapper").find('div[data-sek-id="'+n.apiParams.in_sektion+'"]').each(function(){s.maybeMakeColumnResizableInSektion.call(this)})),n.cloneId&&o('div[data-sek-id="'+n.cloneId+'"]').trigger("sek-section-added",n),o('div[data-sek-id="'+n.apiParams.id+'"]').trigger("sek-section-added",n)}).fail(function(e){s.errare("ERROR in sek_get_html_for_injection ? ",e),o('[data-sek-id="'+n.apiParams.id+'"]').trigger("sek-ajax-error")})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(o,r,e){r.extend(SekPreviewPrototype,{ajaxRefreshColumns:function(n){var s=this;return s.mayBePrintLoader({loader_located_in_level_id:n.apiParams.in_sektion}),s.doAjax({action:"sek_get_content",id:n.apiParams.id,in_sektion:n.apiParams.in_sektion,location_skope_id:n.location_skope_id,local_skope_id:n.local_skope_id,sek_action:n.apiParams.action}).done(function(e){var t="";e.data&&e.data.contents?t=e.data.contents:(s.errare("SekPreviewPrototype::ajaxRefreshColumns => ajax_response.data.contents is undefined ",e),s.errare("params ?",n));var a=r('div[data-sek-id="'+n.apiParams.in_sektion+'"]');a.length<1&&s.errare("reactToPanelMsg => "+n.apiParams.action+" => no DOM node for parent sektion => ",n.apiParams.in_sektion);var i='<span class="sek-placeholder" data-sek-placeholder-for="'+n.apiParams.in_sektion+'"></span>';a.before(i),a.remove(),r(".sektion-wrapper").find(".sek-placeholder").after(t),r(".sektion-wrapper").find(".sek-placeholder").remove(),o.preview.trigger("sek-refresh-stylesheet",n),r('div[data-sek-id="'+n.apiParams.in_sektion+'"]').trigger("sek-columns-refreshed",{in_sektion:n.apiParams.in_sektion})}).fail(function(e){s.errare("ERROR reactToPanelMsg => sek-add-column => ",e),r('[data-sek-id="'+n.apiParams.id+'"]').trigger("sek-ajax-error")})},ajaxResizeColumns:function(a){var i=this;return i.mayBePrintLoader({loader_located_in_level_id:a.apiParams.in_sektion}),i.doAjax({action:"sek_get_content",resized_column:a.apiParams.resized_column,sister_column:a.apiParams.sister_column,location_skope_id:a.location_skope_id,local_skope_id:a.local_skope_id,sek_action:"sek-resize-columns"}).done(function(e){var t="";e.data&&e.data.contents?t=e.data.contents:(i.errare("SekPreviewPrototype::ajaxResizeColumns => ajax_response.data.contents is undefined ",e),i.errare("params ?",a)),r('[data-sek-id="'+a.apiParams.resized_column+'"]').css({width:"",height:""}),i.appendDynStyleSheet(a.location_skope_id,t),r('div[data-sek-id="'+a.apiParams.in_sektion+'"]').trigger("sek-columns-refreshed")}).fail(function(e){i.errare("ERROR reactToPanelMsg => sek-resize-columns => ",e),r('[data-sek-id="'+a.apiParams.in_sektion+'"]').trigger("sek-ajax-error")})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,o,t){o.extend(SekPreviewPrototype,{ajaxRefreshModulesAndNestedSections:function(n){var s=this;return s.mayBePrintLoader({loader_located_in_level_id:n.apiParams.in_column}),s.doAjax({action:"sek_get_content",id:n.apiParams.id,in_sektion:n.apiParams.in_sektion,in_column:n.apiParams.in_column,location_skope_id:n.location_skope_id,local_skope_id:n.local_skope_id,sek_action:n.apiParams.action,is_nested:n.apiParams.is_nested}).done(function(e){var t="";e.data&&e.data.contents?t=e.data.contents:(s.errare("SekPreviewPrototype::ajaxRefreshModulesAndNestedSections => ajax_response.data.contents is undefined ",e),s.errare("params ?",n));var a=o('[data-sek-id="'+n.apiParams.in_column+'"]');a.length<1&&s.errare("reactToPanelMsg => ajaxRefreshModulesAndNestedSections => no DOM node for parent column => ",n.apiParams.in_column);var i='<span class="sek-placeholder" data-sek-placeholder-for="'+n.apiParams.in_column+'"></span>';a.before(i),a.remove(),o('[data-sek-placeholder-for="'+n.apiParams.in_column+'"]').after(t),o('[data-sek-placeholder-for="'+n.apiParams.in_column+'"]').remove(),o('[data-sek-id="'+n.apiParams.in_column+'"]').trigger("sek-modules-refreshed",{in_column:n.apiParams.in_column,in_sektion:n.apiParams.in_sektion})}).fail(function(e){s.errare("ERROR reactToPanelMsg => sek-add-module => ",e),o('[data-sek-id="'+n.apiParams.id+'"]').trigger("sek-ajax-error")})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,n,s){n.extend(SekPreviewPrototype,{ajaxRefreshStylesheet:function(a){var i=this;return i.mayBePrintLoader({loader_located_in_level_id:a.apiParams.id}),i.doAjax({action:"sek_get_content",location_skope_id:a.location_skope_id,local_skope_id:a.local_skope_id,sek_action:"sek-refresh-stylesheet"}).done(function(e){var t="";e.data&&e.data.contents&&(t=e.data.contents),i.appendDynStyleSheet(a.location_skope_id,t),n('[data-sek-id="'+a.apiParams.id+'"]').trigger("sek-stylesheet-refreshed",{level:a.apiParams.level,id:a.apiParams.id})}).fail(function(e){i.errare("sek-refresh-stylesheet fail !"),n('[data-sek-id="'+a.apiParams.id+'"]').trigger("sek-ajax-error")})},appendDynStyleSheet:function(e,t){var a="#sek-"+e,i="#sek-gfonts-"+e;0<n("head").find(a).length&&n("head").find(a).remove(),0<n("head").find(i).length&&n("head").find(i).remove(),s.isEmpty(t)||n("head").append(t),!s.isEmpty(t)&&n("head").find(a).length<1?this.errare("sek-preview => problem when printing the dynamic inline style for : "+a,t):n("head").find(a).attr("sek-data-origin","customizer")}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,o,r){o.extend(SekPreviewPrototype,{parseTemplate:r.memoize(function(t){var a,i=this,n={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};return function(e){if(o(t).length<1)return i.errare("preview => parseTemplate => the requested tmpl does not exist =>"+t),"";try{a=a||r.template(o(t).html(),n)}catch(e){i.errare("preview => parseTemplate => problem when parsing tmpl =>"+t,e)}return a(e)}}),_prettyPrintLog:function(e){e=r.extend({bgCol:"#5ed1f5",textCol:"#000",consoleArguments:[]},e);var t,a=Array.from(e.consoleArguments);return a=r.isEmpty(r.filter(a,function(e){return!r.isString(e)}))?a.join(" "):JSON.stringify(a.join(" ")),["%c "+(t=a,r.isString(t)?300<t.length?t.substr(0,299)+"...":t:""),["background:"+e.bgCol,"color:"+e.textCol,"display: block;"].join(";")]},_wrapLogInsideTags:function(e,t,a){r.isUndefined(console)&&"function"!=typeof window.console.log||(sekPreviewLocalized.isDevMode?r.isUndefined(t)?console.log.apply(console,this._prettyPrintLog({bgCol:a,textCol:"#000",consoleArguments:["<"+e+">"]})):(console.log.apply(console,this._prettyPrintLog({bgCol:a,textCol:"#000",consoleArguments:["<"+e+">"]})),console.log(t),console.log.apply(console,this._prettyPrintLog({bgCol:a,textCol:"#000",consoleArguments:["</"+e+">"]}))):console.log.apply(console,this._prettyPrintLog({bgCol:a,textCol:"#000",consoleArguments:[e]})))},errare:function(e,t){this._wrapLogInsideTags(e,t,"#ffd5a0")},infoLog:function(e,t){this._wrapLogInsideTags(e,t,"#5ed1f5")},doAjax:function(e){var t=this,a=(e=e||(r.isObject(e)?e:{})).ajaxUrl||sekPreviewLocalized.ajaxUrl,i=sekPreviewLocalized.frontNonce,n=o.Deferred(),s=r.extend({action:"",withNonce:!1},e);return"https:"==document.location.protocol&&(a=a.replace("http://","https://")),r.isEmpty(s.action)||!r.isString(s.action)?(t.errare("self.doAjax : unproper action provided"),n.resolve().promise()):(s[i.id]=i.handle,!r.isObject(i)||r.isUndefined(i.id)||r.isUndefined(i.handle)?(t.errare("self.doAjax : unproper nonce"),n.resolve().promise()):(o.post(a,s).done(function(e){"0"!==e&&"-1"!==e&&!1!==e.success||(t.errare("self.doAjax : done ajax error for action : "+s.action,e),n.reject(e)),n.resolve(e)}).fail(function(e){t.errare("self.doAjax : failed ajax error for : "+s.action,e),n.reject(e)}),n.promise()))},isModuleRegistered:function(e){return sekPreviewLocalized.registeredModules&&!r.isUndefined(sekPreviewLocalized.registeredModules[e])},getRegisteredModuleProperty:function(e,t){return this.isModuleRegistered(e)?sekPreviewLocalized.registeredModules[e][t]:"not_set"},getLevelModel:function(t,e){var a=this,i="no_match";return r.isUndefined(e)&&a.errare("getLevelModel => a collection must be provided"),r.each(e,function(e){"no_match"==i&&(t===e.id?i=e:r.isArray(e.collection)&&(i=a.getLevelModel(t,e.collection)))}),i}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,t,a){t.extend(SekPreviewPrototype,e.Events);var i=e.Class.extend(SekPreviewPrototype);e.bind("preview-ready",function(){e.preview.bind("active",function(){try{e.sekPreview=new i}catch(e){SekPreviewPrototype.errare("SekPreviewConstructor => problem on instantiation",e)}})})}(wp.customize,jQuery,_);
1
+ var SekPreviewPrototype=SekPreviewPrototype||{};!function(a,s,i){s.extend(SekPreviewPrototype,{initialize:function(){var t=this;try{this.skope_id=i.findWhere(_wpCustomizeSettings.czr_new_skopes,{skope:"local"}).skope_id}catch(e){return void this.errare("Preview => error when storing the skope_id",e)}this.scheduleHighlightActiveLevel(),t.setupLoader(),s(function(){t.setupSortable(),t.setupResizable(),t.setupUiHoverVisibility(),t.scheduleUiClickReactions(),t.schedulePanelMsgReactions()}),s("body").on("sek-columns-refreshed sek-modules-refreshed",function(e,t){if(!i.isUndefined(t)&&!i.isUndefined(t.in_sektion)&&0<s('[data-sek-id="'+t.in_sektion+'"]').length){var a=s('[data-sek-id="'+t.in_sektion+'"]');a.toggleClass("sek-has-modules",0<a.find('[data-sek-level="module"]').length)}}),t.deactivateLinks(),s("body").on(["sek-modules-refreshed","sek-columns-refreshed","sek-section-added","sek-level-refreshed","sek-edit-module"].join(" "),function(e){t.deactivateLinks(e)});var e=function(){var e=[];s('[data-sek-level="location"]').each(function(){e.push(s(this).data("sek-id"))}),a.preview.send("sek-active-locations-in-preview",{active_locations:e})};a.preview.bind("sek-request-active-locations",e),e()},deactivateLinks:function(e){e=e||{};s("body").find('[data-sek-level="module"]').each(function(){s(this).find("a").each(function(){try{(function(){if("yes"!==s(this).data("sek-unlinked")){var e=i.isString(s(this)[0].protocol)&&-1!==s(this)[0].protocol.indexOf("javascript");!e&&a.isLinkPreviewable(s(this)[0])?(s(this).addClass("nimble-shift-clickable"),s(this).data("sek-unlinked","yes").attr("data-nimble-href",s(this).attr("href")).attr("href","javascript:void(0)"),s(this).hover(function(){s(this).attr("title",sekPreviewLocalized.i18n["Shift-click to visit the link"])},function(){s(this).removeAttr("title")}),s(this).on("click",function(e){e.shiftKey&&(e.preventDefault(),window.location.href=s(this).attr("data-nimble-href"))})):(s(this).addClass("nimble-unclickable"),s(this).data("sek-unlinked","yes").attr("data-nimble-href",s(this).attr("href")).attr("href","javascript:void(0)"),s(this).hover(function(){s(this).attr("title",e?sekPreviewLocalized.i18n["Link deactivated while previewing"]:sekPreviewLocalized.i18n["External links are disabled when customizing"])},function(){s(this).removeAttr("title")}),s(this).on("click",function(e){e.preventDefault()}))}}).call(s(this))}catch(e){a.errare("::deactivateLinks => error ",e)}})})},scheduleHighlightActiveLevel:function(){var n=this;this.activeLevelUI=new a.Value(""),this.activeUIChangedRecently=new a.Value(!1),this.activeLevelUI.bind(function(e,t){var a=s('[data-sek-id="'+e+'"]'),i=s('[data-sek-id="'+t+'"]');0<a.length&&a.addClass("sek-active-ui sek-highlight-active-ui"),0<i.length&&i.removeClass("sek-active-ui sek-highlight-active-ui"),n.activeUIChangedRecently(Date.now())}),i.each(["sek-refresh-stylesheet","sek-refresh-level"],function(e){a.preview.bind(e,function(e){n.activeUIChangedRecently(Date.now())})}),this.activeUIChangedRecently.bind(function(e){var t=s('[data-sek-id="'+n.activeLevelUI()+'"]');s(".sek-highlight-active-ui").length&&s(".sek-highlight-active-ui").removeClass("sek-highlight-active-ui"),0<t.length&&t.toggleClass("sek-highlight-active-ui",!1!==e),clearTimeout(s.data(this,"_ui_change_timer_")),s.data(this,"_ui_change_timer_",setTimeout(function(){n.activeUIChangedRecently(!1)},3e3))})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(m,p,h){p.extend(SekPreviewPrototype,{setupSortable:function(){var a=this;return this.sortableDefaultParams={placeholder:"sortable-placeholder",over:function(e,t){},cursorAt:{top:0,left:0},tolerance:"pointer"},p('[data-sek-level="location"]').each(function(){a.makeSektionsSortableInLocation(p(this).data("sek-id"))}),p("body").on("sek-section-added sek-level-refreshed",'[data-sek-level="location"]',function(e,t){a.makeSektionsSortableInLocation(p(this).data("sek-id"))}),p('[data-sek-level="location"]').each(function(){p(this).find('[data-sek-level="section"]').each(function(){a.makeColumnsSortableInSektion(p(this).data("sek-id"))})}),p("body").on("sek-columns-refreshed sek-section-added",'[data-sek-level="section"]',function(e){a.makeColumnsSortableInSektion(p(this).data("sek-id"))}),p("body").on("sek-level-refreshed",'[data-sek-level="location"]',function(e,t){p(this).find('[data-sek-level="section"]').each(function(){a.makeColumnsSortableInSektion(p(this).data("sek-id"))})}),p('[data-sek-level="location"]').each(function(){p(this).find('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(p(this).data("sek-id"))})}),p("body").on("sek-modules-refreshed",'[data-sek-level="column"]',function(){a.makeModulesSortableInColumn(p(this).data("sek-id"))}),p("body").on("sek-columns-refreshed",'[data-sek-level="section"]',function(){p(this).find(".sek-sektion-inner").first().children('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(p(this).data("sek-id"))})}),p("body").on("sek-level-refreshed",'[data-sek-level="location"]',function(e,t){p(this).find('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(p(this).data("sek-id"))})}),p("body").on("sek-section-added",'[data-sek-level="location"]',function(e,t){p(this).find('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(p(this).data("sek-id"))})}),this},makeSektionsSortableInLocation:function(e){var a,i,t,n=this,s=[],o=[];p('[data-sek-id="'+e+'"]').each(function(){!0!==p(this).data("sek-is-global-location")&&(t=p.extend(!0,{},n.sortableDefaultParams),p(this).sortable(h.extend(t,{handle:".sek-move-section",connectWith:'[data-sek-is-global-location="false"]',placeholder:{element:function(e){return p('<div class="sortable-placeholder"><div class="sek-module-placeholder-content"><p>'+sekPreviewLocalized.i18n["Insert here"]+"</p></div></div>")[0]},update:function(e,t){}},start:function(e,t){p("body").addClass("sek-moving-section"),$sourceLocation=t.item.closest('[data-sek-level="location"]'),a=$sourceLocation.data("sek-id"),$sourceLocation.children('[data-sek-level="section"]').each(function(){s.push(p(this).data("sek-id"))})},stop:function(e,t){p("body").removeClass("sek-moving-section"),o=[],$targetLocation=t.item.closest('[data-sek-level="location"]'),i=$targetLocation.data("sek-id"),$targetLocation.children('[data-sek-level="section"]').each(function(){o.push(p(this).data("sek-id"))}),m.preview.send("sek-move",{id:t.item.data("sek-id"),level:"section",newOrder:o,from_location:a,to_location:i})},over:function(e,t){t.placeholder.addClass("sek-sortable-section-over")},out:function(e,t){t.placeholder.removeClass("sek-sortable-section-over")}})))})},makeColumnsSortableInSektion:function(e){var a,i,n,s,o=this,t=p.extend(!0,{},o.sortableDefaultParams),r=[],d=[],l=p('[data-sek-id="'+e+'"]').find(".sek-sektion-inner").first(),c=function(e){if(e=p.extend({forTarget:!0},e||{}),!h.isEmpty(p(this).data("_sortable_columns_css_classes_")))return p(this).data("_sortable_columns_css_classes_");var t,a=p(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]').length,i=Math.floor(100/a);t=!0===e.forTarget?12<a+1?12:a+1:a-1<1?1:a-1;var n={current:"sek-col-"+i,next:"sek-col-"+Math.floor(100/t)};return p(this).data("_sortable_columns_css_classes_",n),n};l.sortable(h.extend(t,{handle:".sek-move-column",connectWith:".sek-sektion-inner",over:function(e,t){var a,i=p(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]');!0!==p(this).data("sek-is-sender")?(a=c.call(p(this)),h.isEmpty(a)||i.each(function(){p(this).removeClass(a.current).addClass(a.next)})):(a=c.call(p(this),{forTarget:!1}),h.isEmpty(a)||i.each(function(){p(this).addClass(a.current).removeClass(a.next)}))},out:function(e,t){var a,i=p(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]');!0!==p(this).data("sek-is-sender")?(a=c.call(p(this)),h.isEmpty(a)||i.each(function(){p(this).addClass(a.current).removeClass(a.next)})):(a=c.call(p(this),{forTarget:!1}),h.isEmpty(a)||i.each(function(){p(this).removeClass(a.current).addClass(a.next)}))},remove:function(e,t){n=t.item.closest('[data-sek-level="location"]'),to_location=n.data("sek-id"),s=!0===n.data("sek-is-global-location");var a=to_location!=from_location;return i!==s||!0===i&&!0===s&&a?(m.preview.send("sek-notify",{message:sekPreviewLocalized.i18n["Moving elements between global and local sections is not allowed."]}),!1):($targetSektionCandidate=t.item.closest('[data-sek-level="section"]'),!(0<$targetSektionCandidate.length&&12<$targetSektionCandidate.find(".sek-sektion-inner").first().children('[data-sek-level="column"]').length)||(m.preview.send("sek-notify",{message:sekPreviewLocalized.i18n["You've reached the maximum number of columns allowed in this section."]}),!1))},start:function(e,t){a=t.item.closest('[data-sek-level="location"]'),from_location=a.data("sek-id"),i=!0===a.data("sek-is-global-location"),r=[],d=[],from_sektion=t.item.closest('[data-sek-level="section"]').data("sek-id"),t.item.closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]').each(function(){r.push(p(this).data("sek-id"))}),p(this).data("sek-is-sender",!0),h.isEmpty(r)&&o.errare("column sortable => startOrder should not be empty")},stop:function(e,t){$targetSektion=t.item.closest('[data-sek-level="section"]'),to_sektion=$targetSektion.data("sek-id"),$targetSektion.find(".sek-sektion-inner").first().children('[data-sek-level="column"]').each(function(){d.push(p(this).data("sek-id"))});var a,i=p(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]');!0!==p(this).data("sek-is-sender")?(a=c.call(p(this)),h.isEmpty(a)||i.each(function(){p(this).removeClass(a.current).addClass(a.next)})):(a=c.call(p(this),{forTarget:!1}),h.isEmpty(a)||i.each(function(){p(this).addClass(a.current).removeClass(a.next)})),p('[data-sek-level="section"]').find(".sek-sektion-inner").each(function(){p(this).data("sek-is-sender",null).data("_sortable_columns_css_classes_",null)}),h.isEmpty(d)?o.errare("column sortable => newOrder should not be empty"):h.isEqual(d,r)&&to_sektion===from_sektion?sekPreviewLocalized.isDevMode&&o.errare("preview => makeModulesSortableInColumn => start and stop positions are identical"):(m.preview.send("sek-move",{id:t.item.data("sek-id"),level:"column",newOrder:d,from_sektion:from_sektion,to_sektion:to_sektion}),p('div[data-sek-id="'+from_sektion+'"]').trigger("sek-level-refreshed"),from_sektion!==to_sektion&&p('div[data-sek-id="'+to_sektion+'"]').trigger("sek-level-refreshed"))}}))},makeModulesSortableInColumn:function(e){var a,i,n,s,t,o,r,d,l,c=[],k=[],u=this;t=p.extend(!0,{},u.sortableDefaultParams),p('[data-sek-id="'+e+'"]').find(".sek-column-inner").first().sortable(h.extend(t,{handle:".sek-move-module",connectWith:".sek-column-inner",over:function(e,t){p('[data-sek-level="location"]').find(".sek-sortable-overing").each(function(){p(this).removeClass("sek-sortable-overing")}),p(e.target).addClass("sek-sortable-overing")},remove:function(e,t){d=t.item.closest('[data-sek-level="location"]'),to_location=d.data("sek-id"),l=!0===d.data("sek-is-global-location");var a=to_location!=from_location;return!(r!==l||!0===r&&!0===l&&a)||(m.preview.send("sek-notify",{message:sekPreviewLocalized.i18n["Moving elements between global and local sections is not allowed."]}),!1)},start:function(e,t){o=t.item.closest('[data-sek-level="location"]'),from_location=o.data("sek-id"),r=!0===o.data("sek-is-global-location"),c=[],k=[],p("body").addClass("sek-dragging-element"),i=t.item.closest('[data-sek-level="column"]').data("sek-id"),a=t.item.closest('[data-sek-level="section"]').data("sek-id"),t.item.closest('[data-sek-level="column"]').find(".sek-column-inner").first().children('[data-sek-level="module"]').each(function(){c.push(p(this).data("sek-id"))}),h.isEmpty(c)&&u.errare("makeModulesSortableInColumn => startOrder should not be empty")},stop:function(e,t){s=t.item.closest('[data-sek-level="column"]'),n=s.data("sek-id"),s.find(".sek-column-inner").first().children("[data-sek-id]").each(function(){k.push(p(this).data("sek-id"))}),h.isEmpty(k)?u.errare("makeModulesSortableInColumn => newOrder should not be empty"):h.isEqual(k,c)&&n===i?u.errare("preview => makeModulesSortableInColumn => start and stop positions are identical"):(m.preview.send("sek-move",{id:t.item.data("sek-id"),level:"module",newOrder:k,from_column:i,to_column:n,from_sektion:a,to_sektion:t.item.closest('[data-sek-level="section"]').data("sek-id")}),p("body").removeClass("sek-dragging-element"))}}))}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(l,c,k){c.extend(SekPreviewPrototype,{setupResizable:function(){var t=this;return c(".sektion-wrapper").find('div[data-sek-level="section"]').each(function(){t.maybeMakeColumnResizableInSektion.call(this)}),c("body").on("sek-level-refreshed sek-modules-refreshed sek-columns-refreshed sek-section-added",'[data-sek-level="location"]',function(e){c(this).find('[data-sek-level="section"]').each(function(){t.maybeMakeColumnResizableInSektion.call(this)})}),this},maybeMakeColumnResizableInSektion:function(){var a,i,n,s,o,r,d,e=c(this).find(".sek-sektion-inner").first().children('div[data-sek-level="column"]');if(!(e.length<2)){var t=c(this).find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').last();e.not(t).each(function(){c(this).resizable({resize:function(e,t){c(".sektion-wrapper").data("sek-resizing-columns",!0)},start:function(e,t){if(a=t.element.closest('div[data-sek-level="section"]'),a.data("sek-id"),i=a.find(".sek-sektion-inner")[0].getBoundingClientRect().width,!((o=a.find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').length)<2)){if((n=t.element.closest('div[data-sek-level="column"]')).length<1)throw new Error("ERROR => resizable => No valid level dom element found");d=n.index()+1==o,r=d?n.prev():n.next(),c(".sektion-wrapper").data("sek-resizing-columns",!0),k.delay(function(){c(".sektion-wrapper").data("sek-resizing-columns",!1)},3e3)}},stop:function(e,t){if(!(o<2)){if(n.length<1)throw new Error("ERROR => resizable => No valid level dom element found");n.css({width:"",height:""}),s=(parseFloat(t.size.width)/parseFloat(i)*100).toFixed(3),l.preview.send("sek-resize-columns",{action:"sek-resize-columns",level:n.data("sek-level"),in_sektion:a.data("sek-id"),id:n.data("sek-id"),resized_column:n.data("sek-id"),sister_column:r.data("sek-id"),resizedColumnWidthInPercent:s,col_number:o}),c(".sektion-wrapper").data("sek-resizing-columns",!1)}},helper:"ui-resizable-helper",handles:"e"});var e=c(this);k.delay(function(){e.find(".ui-resizable-handle").find(".fa-arrows-alt-h").length<1&&e.find(".ui-resizable-handle").append('<i class="fas fa-arrows-alt-h"></i>')},500)})}}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(l,p,h){p.extend(SekPreviewPrototype,{printLevelUI:function(e){var t,a,i,n;if((h.isUndefined(e)||e.length<1)&&this.errare("sekPreview::printeLevelUI => invalid level element => ",e),"location"!=(a=e.data("sek-level"))&&!(0<(n=e).children(".sek-dyn-ui-wrapper").length)){var s=n[0].getBoundingClientRect(),o=n.data("sek-level");switch(n.toggleClass("sek-shrink-my-ui",s.width&&s.width<("section"===o?350:"column"===o?300:200)),i={id:n.data("sek-id"),level:o},a){case"section":var r,d,l=n.closest('div[data-sek-level="location"]'),c=n.closest('div[data-sek-level="column"]'),k=!0===n.data("sek-is-nested");k?0<c.length&&(r=c.find(".sek-column-inner").first().children("div[data-sek-level]").length==n.index()+1,d=0===n.index()):0<l.length&&(r=l.children('div[data-sek-level="section"]').length==n.index()+1,d=0===n.index()),i=h.extend(i,{is_nested:k,can_have_more_columns:n.find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').length<12,is_global_location:!0===l.data("sek-is-global-location"),is_last_section_in_parent:r,is_first_section_in_parent:d,is_header_location:!0===l.data("sek-is-header-location"),is_footer_location:!0===l.data("sek-is-footer-location")});break;case"column":var u=n.closest('div[data-sek-level="section"]');i=h.extend(i,{parent_can_have_more_columns:u.find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').length<12,parent_is_single_column:u.find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').length<2,parent_is_last_allowed_nested:!0===u.data("sek-is-nested")});break;case"module":var m=this.getRegisteredModuleProperty(n.data("sek-module-type"),"name");i=h.extend(i,{module_name:"not_set"!=m?m:""})}!0===p(".sektion-wrapper").data("sek-resizing-columns")&&h.contains(["column","module"],a)||(t=this.parseTemplate("#sek-dyn-ui-tmpl-"+a),p.when(n.prepend(t(i))).done(function(){n.find(".sek-dyn-ui-wrapper").stop(!0,!0).fadeIn({duration:150,complete:function(){}})}))}},setupUiHoverVisibility:function(){var i,e,t,o=this,r=function(){(e=p(this)).children(".sek-dyn-ui-wrapper").length<1||sekPreviewLocalized.isPreviewUIDebugMode||(e.data("UIisFadingOut",!0),e.children(".sek-dyn-ui-wrapper").stop(!0,!0).fadeOut({duration:150,complete:function(){p(this).remove(),e.data("UIisFadingOut",!1)}}))},a=function(){var e=p(this);clearTimeout(e.data("_toggle_ui_menu_")),e.data("_toggle_ui_menu_",setTimeout(function(){n.call(e)},1e4))},n=function(e){var t=p(this),a=p(this).closest(".sek-dyn-ui-location-type"),i=t.closest(".sek-dyn-ui-wrapper").find(".sek-dyn-ui-inner");!0===e?(t.removeClass("sek-collapsed"),i.addClass("sek-is-expanded"),a.hide()):(t.addClass("sek-collapsed"),i.removeClass("sek-is-expanded"),a.show())};p("body").on("click",".sek-dyn-ui-location-inner",function(e){var t=p(this).find(".sek-dyn-ui-hamb-menu-wrapper");p(this).closest('[data-sek-level="section"]').find(".sek-dyn-ui-hamb-menu-wrapper").each(function(){n.call(p(this))}),n.call(t,!0),a.call(t)}),p("body").on("mouseenter mouseover mouseleave",".sek-dyn-ui-wrapper",h.throttle(function(e){var t=p(this).find(".sek-dyn-ui-hamb-menu-wrapper");h.isUndefined(t.data("_toggle_ui_menu_"))||t.hasClass("sek-collapsed")||0<t.length&&a.call(t)},50)),p("body").on("click",".sek-minimize-ui",function(e){p(this).closest(".sek-dyn-ui-location-type").slideToggle("fast")}),p("body").on("mouseenter",".sek-wp-content-wrapper",function(e){0<(t=p(this)).children(".sek-dyn-ui-wrapper").length&&!0!==t.data("UIisFadingOut")||(i=o.parseTemplate("#sek-dyn-ui-tmpl-wp-content"),p.when(t.prepend(i({}))).done(function(){t.find(".sek-dyn-ui-wrapper").stop(!0,!0).fadeIn({duration:150,complete:function(){}})}))}).on("mouseleave",".sek-wp-content-wrapper",function(e){p(this).data("UIisFadingOut",!0),t=p(this),p(this).children(".sek-dyn-ui-wrapper").stop(!0,!0).fadeOut({duration:150,complete:function(){p(this).remove(),t.data("UIisFadingOut",!1)}})});var d=function(n,e){var t,s;h.isUndefined(e)||e.length<1?(t=p("body").find("[data-sek-level]"),s="printOrScheduleRemoval"):(t=e,s="mayBeRemove"),t.each(function(){var e=p(this)[0].getBoundingClientRect(),t=n.x<=e.right&&e.left<=n.x,a=n.y>=e.top&&e.bottom>=n.y,i=p(this);switch(s){case"mayBeRemove":i.data("sek-ui-removal-scheduled",!1),t&&a||r.call(i);break;case"printOrScheduleRemoval":t&&a?(i.data("sek-ui-removal-scheduled",!1),o.printLevelUI(i)):!0!==i.data("sek-ui-removal-scheduled")&&(i.data("sek-ui-removal-scheduled",!0),i.children(".sek-dyn-ui-wrapper").find(".sek-is-expanded").length<1?d(n,i):h.delay(function(){!0===i.data("sek-ui-removal-scheduled")&&d(o.mouseMovedRecently(),i)},3500))}})};o.mouseMovedRecently=new l.Value({}),o.mouseMovedRecently.bind(function(e){var k,t,a;h.isEmpty(e)?(p("body").stop(!0,!0).find(".sek-add-content-button").each(function(){p(this).fadeOut({duration:200,complete:function(){p(this).remove()}})}),p("body").stop(!0,!0).find("[data-sek-level]").each(function(){p(this).children(".sek-dyn-ui-wrapper").find(".sek-is-expanded").length<1&&r.call(p(this))})):(p("body").find('div[data-sek-level="location"]').each(function(){var e;$sectionCollection=p(this).children('div[data-sek-level="section"]'),i=o.parseTemplate("#sek-tmpl-add-content-button"),t=p(this).data("sek-id"),a=!0===p(this).data("sek-is-global-location"),$sectionCollection.each(function(){0<p(this).find(".sek-add-content-button").length||(p.when(p(this).prepend(i({location:t,is_global_location:a}))).done(function(){e=p(this).find(".sek-add-content-button"),p(this).data("sek-id")&&e.attr("data-sek-before-section",p(this).data("sek-id")),e.fadeIn(300)}),$sectionCollection.length==p(this).index()+1&&p.when(p(this).append(i({is_last:!0,location:t,is_global_location:a}))).done(function(){e=p(this).find(".sek-add-content-button").last(),p(this).data("sek-id")&&e.attr("data-sek-after-section",p(this).data("sek-id")),e.fadeIn(300)}))})}),p(".sek-empty-location-placeholder").each(function(){0<p(this).find(".sek-add-content-button").length||(t=p(this).closest('div[data-sek-level="location"]').data("sek-id"),a=!0===p(this).closest('div[data-sek-level="location"]').data("sek-is-global-location"),p.when(p(this).append(i({location:t,is_global_location:a}))).done(function(){$btn_el=p(this).find(".sek-add-content-button"),$btn_el.attr("data-sek-is-first-section",!0),$btn_el.fadeIn(300)}))}),k=e,p("body").find(".sek-add-content-button").each(function(){var e=p(this)[0].getBoundingClientRect(),t=k.y,a=k.x,i=Math.abs(t-e.bottom),n=Math.abs(e.top-t),s=a-e.right,o=e.left-a,r=i<40||n<40,d=0<s&&s<40||0<o&&o<40,l=a<=e.right&&e.left<=a,c=t>=e.top&&e.bottom>=t;p(this).toggleClass("sek-mouse-is-close",(r||c)&&(d||l))}),d(e))});var s=function(){clearTimeout(p(window).data("_scroll_move_timer_")),o.mouseMovedRecently.set({})};return p(window).on("mousemove scroll",h.throttle(function(e){o.mouseMovedRecently({x:e.clientX,y:e.clientY}),clearTimeout(p(window).data("_scroll_move_timer_")),p(window).data("_scroll_move_timer_",setTimeout(function(){o.mouseMovedRecently.set({})},4e3))},50)),l.preview.bind("sek-drag-start",function(){s()}),p("body").on("sek-section-added",'[data-sek-level="location"]',function(e,t){s()}),this}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(u,m,p){m.extend(SekPreviewPrototype,{scheduleUiClickReactions:function(){var k=this;m("body").on("click",function(e){u.preview.send("sek-clean-target-drop-zone");var t,a=m(e.target),i=a.closest('[data-sek-level="location"]'),n=a.closest("[data-sek-level]"),s=a.closest("[data-sek-click-on]"),o=i.data("sek-id"),r=n.data("sek-level"),d=n.data("sek-id");switch("add-content"==a.data("sek-click-on")||0<a.closest("[data-sek-click-on]").length&&"add-content"==a.closest("[data-sek-click-on]").data("sek-click-on")?"addContentButton":!p.isEmpty(a.data("sek-click-on"))||0<s.length?"UIIcon":"module"==n.data("sek-level")?"moduleWrapper":"column"==n.data("sek-level")&&!0===n.data("sek-no-modules")?"noModulesColumn":a.hasClass("sek-to-json")?"sekToJson":"column"==n.data("sek-level")?"columnOutsideModules":"section"==n.data("sek-level")?"sectionOutsideColumns":p.isEmpty(a.data("sek-add"))?a.hasClass("sek-wp-content-wrapper")||a.hasClass("sek-wp-content-dyn-ui")?"wpContent":a.hasClass("sek-edit-wp-content")?"editWpContent":"inactiveZone":"addSektion"){case"addContentButton":var l=!0===a.closest("[data-sek-is-first-section]").data("sek-is-first-section");u.preview.send("sek-add-section",{location:o,level:"section",before_section:a.closest("[data-sek-before-section]").data("sek-before-section"),after_section:a.closest("[data-sek-after-section]").data("sek-after-section"),is_first_section:l,send_to_preview:!l});break;case"UIIcon":if(n.length<1)throw new Error("ERROR => sek-front-preview => No valid level dom element found");if(t=a.closest("[data-sek-click-on]").data("sek-click-on"),p.isEmpty(t))throw new Error("Invalid action");if(p.isEmpty(r)||p.isEmpty(d))throw new Error("ERROR => sek-front-preview => No valid level id found");k._send_(a,{action:t,location:o,level:r,id:d,was_triggered:!1});break;case"moduleWrapper":if(0<a.parent(".sek-dyn-ui-icons").length)return;k._send_(a,{action:"edit-module",level:r,id:d});break;case"noModulesColumn":if(0<a.parent(".sek-dyn-ui-icons").length)return;k._send_(a,{action:"pick-content",content_type:"module",level:r,id:d});break;case"columnOutsideModules":case"sectionOutsideColumns":k._send_(a,{action:"edit-options",location:o,level:r,id:d});break;case"addSektion":u.preview.send("sek-add-section",{location:o,level:a.data("sek-add")});break;case"sekToJson":u.preview.send("sek-to-json",{id:d});break;case"wpContent":u.preview.send("sek-notify",{type:"info",duration:8e3,message:sekPreviewLocalized.i18n["This content has been created with the WordPress editor."]});break;case"editWpContent":var c=a.closest("[data-sek-wp-edit-link]").data("sek-wp-edit-link");p.isEmpty(c)||window.open(c,"_blank");break;case"inactiveZone":u.preview.send("sek-click-on-inactive-zone")}})},_send_:function(e,t){var a=m.extend(!0,{},t),i="",n=e.closest('div[data-sek-level="module"]'),s="module"===t.level?n.data("sek-module-type"):"";"module"===t.level&&"czr_tiny_mce_editor_module"===s&&(i=0<n.find("div[data-sek-input-id]").length?n.find("div[data-sek-input-id]").data("sek-input-id"):""),u.preview.send("sek-"+t.action,p.extend({location:t.location,level:t.level,id:t.id,content_type:e.data("sek-content-type"),module_type:s,in_column:0<e.closest('div[data-sek-level="column"]').length?e.closest('div[data-sek-level="column"]').data("sek-id"):"",in_sektion:0<e.closest('div[data-sek-level="section"]').length?e.closest('div[data-sek-level="section"]').data("sek-id"):"",clicked_input_type:0<e.closest("div[data-sek-input-type]").length?e.closest("div[data-sek-input-type]").data("sek-input-type"):"",clicked_input_id:0<e.closest("div[data-sek-input-id]").length?e.closest("div[data-sek-input-id]").data("sek-input-id"):"",was_triggered:t.was_triggered,syncedTinyMceInputId:i},a))}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,s,o){s.extend(SekPreviewPrototype,{setupLoader:function(){var t=this;this._css_loader_html='<div class="sek-css-loader sek-mr-loader" style="display:none"><div></div><div></div><div></div></div>',s("body").on(["sek-modules-refreshed","sek-columns-refreshed","sek-section-added","sek-level-refreshed","sek-stylesheet-refreshed","sek-ajax-error"].join(" "),function(e){t.cleanLoader()})},mayBePrintLoader:function(e){var t=this,a=e.loader_located_in_level_id;if(!o.isEmpty(a)){var i=s('[data-sek-id="'+a+'"]');0<i.length&&s(".sek-level-clone ").length<1&&($levelClone=s("<div>",{class:"sek-level-clone"}),i.find("[data-sek-level]").each(function(){s(this).addClass("sek-refreshing")}),i.prepend($levelClone),$levelClone.css({width:i.outerWidth()+"px",height:i.outerHeight()+"px"}).append(t._css_loader_html).find(".sek-css-loader").fadeIn("fast"),clearTimeout(s.data(this,"_nimble_loader_active_timer_")),s.data(this,"_nimble_loader_active_timer_",setTimeout(function(){t.cleanLoader()},4e3)))}if(!0===e.fullPageLoader){var n=s("<div>",{id:"nimble-full-page-loader-wrapper",class:"white-loader"});s("body").append(n),n.fadeIn("fast").append(t._css_loader_html).find(".sek-css-loader").fadeIn("fast"),s('[data-sek-level="location"]').each(function(){s(this).addClass("sek-blur")}),clearTimeout(s.data(this,"_nimble_full_page_loader_active_timer_")),s.data(this,"_nimble_full_page_loader_active_timer_",setTimeout(function(){t.cleanLoader({cleanFullPageLoader:!0})},6e3))}},cleanLoader:function(e){s(".sek-level-clone").remove(),s("[data-sek-level]").each(function(){s(this).removeClass("sek-refreshing")}),!0===(e=e||{}).cleanFullPageLoader&&(s('[data-sek-level="location"]').each(function(){s(this).removeClass("sek-blur")}),s("#nimble-full-page-loader-wrapper").remove())}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(s,r,d){r.extend(SekPreviewPrototype,{schedulePanelMsgReactions:function(){var o=this,e={"sek-add-section":"ajaxAddSektion","sek-add-content-in-new-sektion":"ajaxAddSektion","sek-add-content-in-new-nested-sektion":"ajaxAddSektion","sek-add-column":"ajaxRefreshColumns","sek-add-module":"ajaxRefreshModulesAndNestedSections","sek-refresh-stylesheet":"ajaxRefreshStylesheet","sek-resize-columns":"ajaxResizeColumns","sek-maybe-print-loader":function(e){try{o.mayBePrintLoader(e)}catch(e){s.errare("sek-clean-loader => error",e)}},"sek-clean-loader":function(e){try{o.cleanLoader(e)}catch(e){s.errare("sek-clean-loader => error",e)}},"sek-remove":function(e){var t,a=e.apiParams.id,i=r('div[data-sek-id="'+a+'"]');switch(e.apiParams.action){case"sek-remove-section":o.mayBePrintLoader({loader_located_in_level_id:e.apiParams.location}),!0===e.apiParams.is_nested?t=o.ajaxRefreshModulesAndNestedSections(e):((d.isEmpty(a)||i.length<1)&&o.errare("reactToPanelMsg => sek-remove => invalid candidate id => ",a),r("body").find(i).remove(),r('[data-sek-id="'+e.apiParams.location+'"]').trigger("sek-level-refreshed"));break;case"sek-remove-column":t=o.ajaxRefreshColumns(e);break;case"sek-remove-module":t=o.ajaxRefreshModulesAndNestedSections(e)}return d.isEmpty(t)?r.Deferred(function(){this.resolve()}):t},"sek-duplicate":function(e){var t;switch(e.apiParams.action){case"sek-duplicate-section":e.apiParams.id=e.cloneId,t=o.ajaxAddSektion(e);break;case"sek-duplicate-column":e.apiParams.id=e.cloneId,t=o.ajaxRefreshColumns(e);break;case"sek-duplicate-module":e.apiParams.id=e.cloneId,t=o.ajaxRefreshModulesAndNestedSections(e)}return t},"sek-refresh-level":function(s){return o.mayBePrintLoader({loader_located_in_level_id:s.apiParams.id}),o.doAjax({location_skope_id:s.location_skope_id,local_skope_id:s.local_skope_id,action:"sek_get_content",id:s.apiParams.id,level:s.apiParams.level,sek_action:s.apiParams.action}).fail(function(e){o.errare("ERROR reactToPanelMsg => sek-refresh-level => ",e),r('[data-sek-id="'+s.apiParams.id+'"]').trigger("sek-ajax-error")}).done(function(e){var t="";e.data&&e.data.contents?t=e.data.contents:(o.errare("SekPreviewPrototype::sek-refresh-level => ajax_response.data.contents is undefined ",e),o.errare("params ?",s));var a='<span class="sek-placeholder" data-sek-placeholder-for="'+s.apiParams.id+'"></span>',i=r('div[data-sek-id="'+s.apiParams.id+'"]');if(i.length<1)o.errare("reactToPanelMsg => sek-refresh-level ajax done => the level to refresh is not rendered in the page",e);else{i.before(a);var n=r('[data-sek-placeholder-for="'+s.apiParams.id+'"]');i.remove(),d.isUndefined(t)?o.errare("reactToPanelMsg => sek-refresh-level ajax done => missing html_content",e):n.after(t),n.remove(),r('[data-sek-id="'+s.apiParams.id+'"]').trigger("sek-level-refreshed",{level:s.apiParams.level,id:s.apiParams.id})}})},"sek-move":function(e){switch(e.apiParams.action){case"sek-move-column":if(e.apiParams.from_sektion!=e.apiParams.to_sektion){var t=r.extend(!0,{},e),a=r.extend(!0,{},e);r('[data-sek-id="'+e.apiParams.from_sektion+'"]',".sektion-wrapper").find('div[data-sek-level="column"]').length<1?s.preview.send("sek-add-column",{in_sektion:e.apiParams.from_sektion,autofocus:!1}):(t.apiParams=d.extend(t.apiParams,{in_sektion:e.apiParams.from_sektion,action:"sek-refresh-columns-in-sektion"}),o.ajaxRefreshColumns(t)),a.apiParams=d.extend(a.apiParams,{in_sektion:e.apiParams.to_sektion,action:"sek-refresh-columns-in-sektion"}),o.ajaxRefreshColumns(a)}break;case"sek-move-module":var i=r.extend(!0,{},e),n=r.extend(!0,{},e);i.apiParams.from_column!=i.apiParams.to_column&&(i.apiParams=d.extend(i.apiParams,{in_column:i.apiParams.from_column,in_sektion:i.apiParams.from_sektion,action:"sek-refresh-modules-in-column"}),o.ajaxRefreshModulesAndNestedSections(i)),e.apiParams=d.extend(n.apiParams,{in_column:n.apiParams.to_column,in_sektion:n.apiParams.to_sektion,action:"sek-refresh-modules-in-column"}),o.ajaxRefreshModulesAndNestedSections(n),r('[data-sek-id="'+e.apiParams.to_column+'"]',".sektion-wrapper").find(".sek-column-inner").sortable("refresh")}},"sek-edit-options":function(e){o.activeLevelUI(e.uiParams.id)},"sek-edit-module":function(e){o.activeLevelUI(e.uiParams.id)},"sek-drag-start":function(n){var s=1,o=!1;r('[data-sek-level="location"]').children('[data-sek-level="section"]').each(function(){var e=r(this).data("sek-id"),t=r(this).find('[data-sek-level="column"]').length,a=r(this).find('[data-sek-level="module"]').length,i=t<2&&a<1;!o&&!i&&r('[data-drop-zone-before-section="'+e+'"]').length<1&&r(this).before('<div class="sek-content-'+n.type+'-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="between-sections" data-drop-zone-before-section="'+e+'"></div>'),i||s!=r(".sektion-wrapper").children('[data-sek-level="section"]').length||r(this).after('<div class="sek-content-'+n.type+'-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="between-sections" data-drop-zone-after-section="'+e+'"></div>'),s++,o=i}),r(".sek-empty-location-placeholder").each(function(){r.when(r(this).append('<div class="sek-content-'+n.type+'-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="in-empty-location"></div>'))}),"module"==n.type&&r('[data-sek-level="column"]').each(function(){var e=r(this).children(".sek-column-inner").children('[data-sek-level="module"]'),t=r(this).children(".sek-column-inner").children('[data-sek-is-nested="true"]');e=e.add(t);var a=1;e.each(function(){r('[data-drop-zone-before-module-or-nested-section="'+r(this).data("sek-id")+'"]').length<1&&r(this).before('<div class="sek-content-module-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="between-modules-and-nested-sections" data-drop-zone-before-module-or-nested-section="'+r(this).data("sek-id")+'"></div>'),a==e.length&&r('[data-drop-zone-after-module-or-nested-section="'+r(this).data("sek-id")+'"]').length<1&&r(this).after('<div class="sek-content-module-drop-zone sek-dynamic-drop-zone sek-drop-zone" data-sek-location="between-modules-and-nested-sections" data-drop-zone-after-module-or-nested-section="'+r(this).data("sek-id")+'"></div>'),a++})}),r("body").addClass("sek-dragging"),d.delay(function(){r(".sek-dynamic-drop-zone").css({opacity:1})},100)},"sek-drag-stop":function(e){r("body").removeClass("sek-dragging"),r(".sortable-placeholder").remove(),r(".sek-dynamic-drop-zone").remove()},"sek-animate-to-level":function(e){var t=r('[data-sek-id="'+e.id+'"]');0<t.length&&r("html, body").animate({scrollTop:t.offset().top-100},200)},"sek-clean-level-uis":function(e){r(".sek-dyn-ui-wrapper").each(function(){r(this).remove()})},"sek-display-level-ui":function(e){var t=r('[data-sek-id="'+e.id+'"]');0<t.length&&(t.trigger("click"),o.printLevelUI(t))},"sek-set-double-click-target":function(e){if(r(".sek-target-for-double-click-insertion").removeClass("sek-target-for-double-click-insertion"),d.isObject(e)&&e.id){var t=r('[data-sek-id="'+e.id+'"]');1===t.length&&t.addClass("sek-target-for-double-click-insertion")}},"sek-reset-double-click-target":function(e){r(".sek-target-for-double-click-insertion").removeClass("sek-target-for-double-click-insertion")},"sek-update-html-in-selector":function(e){var t=r('[data-sek-id="'+e.id+'"]'),a=r(e.selector,t);0<t.length&&0<a.length?a.html(e.html):o.errare("reactToPanelMsg => sek-update-html-in-selector => missing level or target dom element",e)}};d.each(e,function(e,i){s.preview.bind(i,function(a){a=d.extend({location_skope_id:"",apiParams:{},uiParams:{}},a||{});r("body").addClass(i);try{r.when(d.isFunction(e)?e(a):o[e].call(o,a)).done(function(e){var t;t=e,s.preview.send([i,"done"].join("_"),a),d.isUndefined(t)||t.data&&t.data.setting_validities&&s.preview.send("selective-refresh-setting-validities",t.data.setting_validities)}).fail(function(){s.preview.send("sek-notify",{type:"error",duration:1e4,message:sekPreviewLocalized.i18n["Something went wrong, please refresh this page."]})}).always(function(e){r("body").removeClass(i)}).then(function(){s.preview.trigger("control-panel-requested-action-done",{action:i,args:a})})}catch(e){o.errare("reactToPanelMsg => Error when firing the callback of "+i,e),r("body").removeClass(i)}})})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,o,r){o.extend(SekPreviewPrototype,{ajaxAddSektion:function(n){var s=this;return s.mayBePrintLoader({loader_located_in_level_id:n.apiParams.location}),s.doAjax({action:"sek_get_content",id:n.apiParams.id,in_sektion:n.apiParams.in_sektion,in_column:n.apiParams.in_column,location_skope_id:n.location_skope_id,local_skope_id:n.local_skope_id,sek_action:n.apiParams.action,is_nested:n.apiParams.is_nested}).done(function(e){var t,a="";if(e.data&&e.data.contents?a=e.data.contents:(s.errare("SekPreviewPrototype::ajaxAddSektion => ajax_response.data.contents is undefined ",e),s.errare("params ?",n)),n.apiParams.is_nested){(t=o(".sektion-wrapper").find('div[data-sek-id="'+n.apiParams.in_column+'"]')).length<1&&s.errare("preview => reactToPanelMsg => sek-add-column => no DOM node for parent column => ",n.apiParams.in_column);var i='<span class="sek-placeholder" data-sek-placeholder-for="'+n.apiParams.in_column+'"></span>';t.before(i),t.remove(),o(".sektion-wrapper").find(".sek-placeholder").after(a),o(".sektion-wrapper").find(".sek-placeholder").remove()}else"sek-duplicate-section"!=n.apiParams.action||r.isEmpty(n.cloneId)?($beforeCandidate=o('.sektion-wrapper[data-sek-id="'+n.apiParams.location+'"]').find('div[data-sek-id="'+n.apiParams.before_section+'"]'),$afterCandidate=o('.sektion-wrapper[data-sek-id="'+n.apiParams.location+'"]').find('div[data-sek-id="'+n.apiParams.after_section+'"]'),!r.isEmpty(n.apiParams.before_section)&&0<$beforeCandidate.length?$beforeCandidate.before(a):!r.isEmpty(n.apiParams.after_section)&&0<$afterCandidate.length?$afterCandidate.after(a):o('[data-sek-id="'+n.apiParams.location+'"]').append(a)):o(".sektion-wrapper").find('div[data-sek-id="'+n.apiParams.in_sektion+'"]').after(a);"sek-duplicate-section"==n.apiParams.action&&o('div[data-sek-id="'+n.cloneId+'"]',".sektion-wrapper").each(function(){o(this).trigger("sek-columns-refreshed")}),n.apiParams.is_nested&&(s.makeModulesSortableInColumn(n.apiParams.in_column),o(".sektion-wrapper").find('div[data-sek-id="'+n.apiParams.in_sektion+'"]').each(function(){s.maybeMakeColumnResizableInSektion.call(this)})),n.cloneId&&o('div[data-sek-id="'+n.cloneId+'"]').trigger("sek-section-added",n),o('div[data-sek-id="'+n.apiParams.id+'"]').trigger("sek-section-added",n)}).fail(function(e){s.errare("ERROR in sek_get_html_for_injection ? ",e),o('[data-sek-id="'+n.apiParams.id+'"]').trigger("sek-ajax-error")})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(o,r,e){r.extend(SekPreviewPrototype,{ajaxRefreshColumns:function(n){var s=this;return s.mayBePrintLoader({loader_located_in_level_id:n.apiParams.in_sektion}),s.doAjax({action:"sek_get_content",id:n.apiParams.id,in_sektion:n.apiParams.in_sektion,location_skope_id:n.location_skope_id,local_skope_id:n.local_skope_id,sek_action:n.apiParams.action}).done(function(e){var t="";e.data&&e.data.contents?t=e.data.contents:(s.errare("SekPreviewPrototype::ajaxRefreshColumns => ajax_response.data.contents is undefined ",e),s.errare("params ?",n));var a=r('div[data-sek-id="'+n.apiParams.in_sektion+'"]');a.length<1&&s.errare("reactToPanelMsg => "+n.apiParams.action+" => no DOM node for parent sektion => ",n.apiParams.in_sektion);var i='<span class="sek-placeholder" data-sek-placeholder-for="'+n.apiParams.in_sektion+'"></span>';a.before(i),a.remove(),r(".sektion-wrapper").find(".sek-placeholder").after(t),r(".sektion-wrapper").find(".sek-placeholder").remove(),o.preview.trigger("sek-refresh-stylesheet",n),r('div[data-sek-id="'+n.apiParams.in_sektion+'"]').trigger("sek-columns-refreshed",{in_sektion:n.apiParams.in_sektion})}).fail(function(e){s.errare("ERROR reactToPanelMsg => sek-add-column => ",e),r('[data-sek-id="'+n.apiParams.id+'"]').trigger("sek-ajax-error")})},ajaxResizeColumns:function(a){var i=this;return i.mayBePrintLoader({loader_located_in_level_id:a.apiParams.in_sektion}),i.doAjax({action:"sek_get_content",resized_column:a.apiParams.resized_column,sister_column:a.apiParams.sister_column,location_skope_id:a.location_skope_id,local_skope_id:a.local_skope_id,sek_action:"sek-resize-columns"}).done(function(e){var t="";e.data&&e.data.contents?t=e.data.contents:(i.errare("SekPreviewPrototype::ajaxResizeColumns => ajax_response.data.contents is undefined ",e),i.errare("params ?",a)),r('[data-sek-id="'+a.apiParams.resized_column+'"]').css({width:"",height:""}),i.appendDynStyleSheet(a.location_skope_id,t),r('div[data-sek-id="'+a.apiParams.in_sektion+'"]').trigger("sek-columns-refreshed")}).fail(function(e){i.errare("ERROR reactToPanelMsg => sek-resize-columns => ",e),r('[data-sek-id="'+a.apiParams.in_sektion+'"]').trigger("sek-ajax-error")})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,o,t){o.extend(SekPreviewPrototype,{ajaxRefreshModulesAndNestedSections:function(n){var s=this;return s.mayBePrintLoader({loader_located_in_level_id:n.apiParams.in_column}),s.doAjax({action:"sek_get_content",id:n.apiParams.id,in_sektion:n.apiParams.in_sektion,in_column:n.apiParams.in_column,location_skope_id:n.location_skope_id,local_skope_id:n.local_skope_id,sek_action:n.apiParams.action,is_nested:n.apiParams.is_nested}).done(function(e){var t="";e.data&&e.data.contents?t=e.data.contents:(s.errare("SekPreviewPrototype::ajaxRefreshModulesAndNestedSections => ajax_response.data.contents is undefined ",e),s.errare("params ?",n));var a=o('[data-sek-id="'+n.apiParams.in_column+'"]');a.length<1&&s.errare("reactToPanelMsg => ajaxRefreshModulesAndNestedSections => no DOM node for parent column => ",n.apiParams.in_column);var i='<span class="sek-placeholder" data-sek-placeholder-for="'+n.apiParams.in_column+'"></span>';a.before(i),a.remove(),o('[data-sek-placeholder-for="'+n.apiParams.in_column+'"]').after(t),o('[data-sek-placeholder-for="'+n.apiParams.in_column+'"]').remove(),o('[data-sek-id="'+n.apiParams.in_column+'"]').trigger("sek-modules-refreshed",{in_column:n.apiParams.in_column,in_sektion:n.apiParams.in_sektion})}).fail(function(e){s.errare("ERROR reactToPanelMsg => sek-add-module => ",e),o('[data-sek-id="'+n.apiParams.id+'"]').trigger("sek-ajax-error")})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,n,s){n.extend(SekPreviewPrototype,{ajaxRefreshStylesheet:function(a){var i=this;return i.mayBePrintLoader({loader_located_in_level_id:a.apiParams.id}),i.doAjax({action:"sek_get_content",location_skope_id:a.location_skope_id,local_skope_id:a.local_skope_id,sek_action:"sek-refresh-stylesheet"}).done(function(e){var t="";e.data&&e.data.contents&&(t=e.data.contents),i.appendDynStyleSheet(a.location_skope_id,t),n('[data-sek-id="'+a.apiParams.id+'"]').trigger("sek-stylesheet-refreshed",{level:a.apiParams.level,id:a.apiParams.id})}).fail(function(e){i.errare("sek-refresh-stylesheet fail !"),n('[data-sek-id="'+a.apiParams.id+'"]').trigger("sek-ajax-error")})},appendDynStyleSheet:function(e,t){var a="#sek-"+e,i="#sek-gfonts-"+e;0<n("head").find(a).length&&n("head").find(a).remove(),0<n("head").find(i).length&&n("head").find(i).remove(),s.isEmpty(t)||n("head").append(t),!s.isEmpty(t)&&n("head").find(a).length<1?this.errare("sek-preview => problem when printing the dynamic inline style for : "+a,t):n("head").find(a).attr("sek-data-origin","customizer")}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,o,r){o.extend(SekPreviewPrototype,{parseTemplate:r.memoize(function(t){var a,i=this,n={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};return function(e){if(o(t).length<1)return i.errare("preview => parseTemplate => the requested tmpl does not exist =>"+t),"";try{a=a||r.template(o(t).html(),n)}catch(e){i.errare("preview => parseTemplate => problem when parsing tmpl =>"+t,e)}return a(e)}}),_prettyPrintLog:function(e){e=r.extend({bgCol:"#5ed1f5",textCol:"#000",consoleArguments:[]},e);var t,a=Array.from(e.consoleArguments);return a=r.isEmpty(r.filter(a,function(e){return!r.isString(e)}))?a.join(" "):JSON.stringify(a.join(" ")),["%c "+(t=a,r.isString(t)?300<t.length?t.substr(0,299)+"...":t:""),["background:"+e.bgCol,"color:"+e.textCol,"display: block;"].join(";")]},_wrapLogInsideTags:function(e,t,a){r.isUndefined(console)&&"function"!=typeof window.console.log||(sekPreviewLocalized.isDevMode?r.isUndefined(t)?console.log.apply(console,this._prettyPrintLog({bgCol:a,textCol:"#000",consoleArguments:["<"+e+">"]})):(console.log.apply(console,this._prettyPrintLog({bgCol:a,textCol:"#000",consoleArguments:["<"+e+">"]})),console.log(t),console.log.apply(console,this._prettyPrintLog({bgCol:a,textCol:"#000",consoleArguments:["</"+e+">"]}))):console.log.apply(console,this._prettyPrintLog({bgCol:a,textCol:"#000",consoleArguments:[e]})))},errare:function(e,t){this._wrapLogInsideTags(e,t,"#ffd5a0")},infoLog:function(e,t){this._wrapLogInsideTags(e,t,"#5ed1f5")},doAjax:function(e){var t=this,a=(e=e||(r.isObject(e)?e:{})).ajaxUrl||sekPreviewLocalized.ajaxUrl,i=sekPreviewLocalized.frontNonce,n=o.Deferred(),s=r.extend({action:"",withNonce:!1},e);return"https:"==document.location.protocol&&(a=a.replace("http://","https://")),r.isEmpty(s.action)||!r.isString(s.action)?(t.errare("self.doAjax : unproper action provided"),n.resolve().promise()):(s[i.id]=i.handle,!r.isObject(i)||r.isUndefined(i.id)||r.isUndefined(i.handle)?(t.errare("self.doAjax : unproper nonce"),n.resolve().promise()):(o.post(a,s).done(function(e){"0"!==e&&"-1"!==e&&!1!==e.success||(t.errare("self.doAjax : done ajax error for action : "+s.action,e),n.reject(e)),n.resolve(e)}).fail(function(e){t.errare("self.doAjax : failed ajax error for : "+s.action,e),n.reject(e)}),n.promise()))},isModuleRegistered:function(e){return sekPreviewLocalized.registeredModules&&!r.isUndefined(sekPreviewLocalized.registeredModules[e])},getRegisteredModuleProperty:function(e,t){return this.isModuleRegistered(e)?sekPreviewLocalized.registeredModules[e][t]:"not_set"},getLevelModel:function(t,e){var a=this,i="no_match";return r.isUndefined(e)&&a.errare("getLevelModel => a collection must be provided"),r.each(e,function(e){"no_match"==i&&(t===e.id?i=e:r.isArray(e.collection)&&(i=a.getLevelModel(t,e.collection)))}),i}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,t,a){t.extend(SekPreviewPrototype,e.Events);var i=e.Class.extend(SekPreviewPrototype);e.bind("preview-ready",function(){e.preview.bind("active",function(){try{e.sekPreview=new i}catch(e){SekPreviewPrototype.errare("SekPreviewConstructor => problem on instantiation",e)}})})}(wp.customize,jQuery,_);
assets/img/section_assets/thumbs/header_two.jpg ADDED
Binary file
assets/preset_sections.json CHANGED
@@ -10,5 +10,6 @@
10
  "three_columns":{"collection":[{"id":"","level":"column","collection":[],"width":""},{"id":"","level":"column","collection":[],"width":""},{"id":"","level":"column","collection":[]}]},
11
  "four_columns":{"collection":[{"id":"","level":"column","collection":[],"width":""},{"id":"","level":"column","collection":[],"width":""},{"id":"","level":"column","collection":[],"width":""},{"id":"","level":"column","collection":[]}]},
12
  "header_one":{"collection":[{"id":"","level":"column","collection":[{"id":"","level":"module","module_type":"czr_image_module","ver_ini":"1.4.0","value":{"main_settings":{"img":"__img_url__https://ec45f9666931702052dd-d41d6dc80bfaa5965f59737e1438a459.ssl.cf5.rackcdn.com/prebuilt_sections/imgs/logo_placeholder_190x80.jpg","img-size":"original","link-to":"url","link-pick-url":{"id":"_custom_","type_label":"","title":"<span style=\"font-weight:bold\">Set a custom url</span>","url":""},"link-custom-url":"{{home_url}}"},"borders_corners":{"border_radius_css":{"_all_":"8px"}}},"options":{"spacing":{"pad_marg":{"desktop":{"padding-top":"8","padding-bottom":"8"}}}}}],"ver_ini":"1.4.0","width":25},{"id":"","level":"column","collection":[{"id":"","level":"module","module_type":"czr_menu_module","ver_ini":"1.4.0","value":{"content":{"h_alignment_css":{"desktop":"right"}},"font":{"font_family_css":"[gfont]Poppins:regular","font_size_css":{"desktop":"18px"},"text_transform_css":"uppercase"}}}],"ver_ini":"1.4.0","width":75}],"ver_ini":"1.4.0"},
 
13
  "footer_one":{"collection":[{"id":"","level":"column","collection":[],"width":""},{"id":"","level":"column","collection":[],"width":""},{"id":"","level":"column","collection":[]}]}
14
  }
10
  "three_columns":{"collection":[{"id":"","level":"column","collection":[],"width":""},{"id":"","level":"column","collection":[],"width":""},{"id":"","level":"column","collection":[]}]},
11
  "four_columns":{"collection":[{"id":"","level":"column","collection":[],"width":""},{"id":"","level":"column","collection":[],"width":""},{"id":"","level":"column","collection":[],"width":""},{"id":"","level":"column","collection":[]}]},
12
  "header_one":{"collection":[{"id":"","level":"column","collection":[{"id":"","level":"module","module_type":"czr_image_module","ver_ini":"1.4.0","value":{"main_settings":{"img":"__img_url__https://ec45f9666931702052dd-d41d6dc80bfaa5965f59737e1438a459.ssl.cf5.rackcdn.com/prebuilt_sections/imgs/logo_placeholder_190x80.jpg","img-size":"original","link-to":"url","link-pick-url":{"id":"_custom_","type_label":"","title":"<span style=\"font-weight:bold\">Set a custom url</span>","url":""},"link-custom-url":"{{home_url}}"},"borders_corners":{"border_radius_css":{"_all_":"8px"}}},"options":{"spacing":{"pad_marg":{"desktop":{"padding-top":"8","padding-bottom":"8"}}}}}],"ver_ini":"1.4.0","width":25},{"id":"","level":"column","collection":[{"id":"","level":"module","module_type":"czr_menu_module","ver_ini":"1.4.0","value":{"content":{"h_alignment_css":{"desktop":"right"}},"font":{"font_family_css":"[gfont]Poppins:regular","font_size_css":{"desktop":"18px"},"text_transform_css":"uppercase"}}}],"ver_ini":"1.4.0","width":75}],"ver_ini":"1.4.0"},
13
+ "header_two":{"collection":[{"id":"","level":"column","collection":[{"id":"","level":"module","module_type":"czr_menu_module","ver_ini":"1.8.0","value":{"content":{"h_alignment_css":{"desktop":"left"}},"font":{"font_family_css":"[gfont]Poppins:regular","font_size_css":{"desktop":"18px"},"text_transform_css":"uppercase"}}}],"ver_ini":"1.8.0","width":75},{"id":"","level":"column","collection":[{"id":"","level":"module","module_type":"czr_image_module","ver_ini":"1.8.0","value":{"main_settings":{"img":"__img_url__https://ec45f9666931702052dd-d41d6dc80bfaa5965f59737e1438a459.ssl.cf5.rackcdn.com/prebuilt_sections/imgs/logo_placeholder_190x80.jpg","img-size":"original","link-to":"url","link-pick-url":{"id":"_custom_","type_label":"","title":"<span style=\"font-weight:bold\">Set a custom url</span>","url":""},"link-custom-url":"{{home_url}}"},"borders_corners":{"border_radius_css":{"_all_":"8px"}}},"options":{"spacing":{"pad_marg":{"desktop":{"padding-top":"8","padding-bottom":"8"}}}}}],"ver_ini":"1.8.0","width":25}],"options":{"breakpoint":{"reverse-col-at-breakpoint":true}},"ver_ini":"1.8.0"},
14
  "footer_one":{"collection":[{"id":"","level":"column","collection":[],"width":""},{"id":"","level":"column","collection":[],"width":""},{"id":"","level":"column","collection":[]}]}
15
  }
inc/admin/nimble-admin.php CHANGED
@@ -389,8 +389,8 @@ function sek_render_welcome_notice() {
389
  <div class="nimble-welcome-icon-holder">
390
  <img class="nimble-welcome-icon" src="<?php echo NIMBLE_BASE_URL.'/assets/img/nimble/nimble_banner.svg?ver='.NIMBLE_VERSION; ?>" alt="<?php esc_html_e( 'Nimble Builder', 'nimble-builder' ); ?>" />
391
  </div>
392
- <h1><?php echo apply_filters( 'nimble_update_notice', __('Welcome to the Nimble Builder for WordPress :D', 'nimble-builder' ) ); ?></h1>
393
- <h3><?php _e( 'The Nimble Builder takes the native WordPress customizer to a level you\'ve never seen before.', 'nimble-builder' ); ?></h3>
394
  <h3><?php _e( 'Nimble allows you to drag and drop content modules, or pre-built section templates, into <u>any context</u> of your site, including search results or 404 pages. You can edit your pages in <i>real time</i> from the live customizer, and then publish when you are happy of the result, or save for later.', 'nimble-builder' ); ?></h3>
395
  <h3><?php _e( 'The plugin automatically creates fluid and responsive sections for a pixel-perfect rendering on smartphones and tablets, without the need to add complex code.', 'nimble-builder' ); ?></h3>
396
  <?php printf( '<a href="%1$s" target="_blank" class="button button-primary button-hero"><span class="dashicons dashicons-admin-appearance"></span> %2$s</a>',
389
  <div class="nimble-welcome-icon-holder">
390
  <img class="nimble-welcome-icon" src="<?php echo NIMBLE_BASE_URL.'/assets/img/nimble/nimble_banner.svg?ver='.NIMBLE_VERSION; ?>" alt="<?php esc_html_e( 'Nimble Builder', 'nimble-builder' ); ?>" />
391
  </div>
392
+ <h1><?php echo apply_filters( 'nimble_update_notice', __('Welcome to Nimble Builder for WordPress :D', 'nimble-builder' ) ); ?></h1>
393
+ <h3><?php _e( 'Nimble Builder takes the native WordPress customizer to a level you\'ve never seen before.', 'nimble-builder' ); ?></h3>
394
  <h3><?php _e( 'Nimble allows you to drag and drop content modules, or pre-built section templates, into <u>any context</u> of your site, including search results or 404 pages. You can edit your pages in <i>real time</i> from the live customizer, and then publish when you are happy of the result, or save for later.', 'nimble-builder' ); ?></h3>
395
  <h3><?php _e( 'The plugin automatically creates fluid and responsive sections for a pixel-perfect rendering on smartphones and tablets, without the need to add complex code.', 'nimble-builder' ); ?></h3>
396
  <?php printf( '<a href="%1$s" target="_blank" class="button button-primary button-hero"><span class="dashicons dashicons-admin-appearance"></span> %2$s</a>',
inc/czr-base-fmk/czr-base-fmk.php CHANGED
@@ -591,8 +591,7 @@ if ( ! class_exists( 'CZR_Fmk_Base_Tmpl_Builder' ) ) :
591
  'editor_params' => array(),
592
 
593
  // introduced for https://github.com/presscustomizr/nimble-builder/issues/431
594
- 'section_collection' => array(),
595
- 'section_type' => 'content'
596
  );
597
  foreach( $tmpl_map as $input_id => $input_data ) {
598
  if ( ! is_string( $input_id ) || empty( $input_id ) ) {
591
  'editor_params' => array(),
592
 
593
  // introduced for https://github.com/presscustomizr/nimble-builder/issues/431
594
+ 'section_collection' => array()
 
595
  );
596
  foreach( $tmpl_map as $input_id => $input_data ) {
597
  if ( ! is_string( $input_id ) || empty( $input_id ) ) {
inc/czr-skope/index.php CHANGED
@@ -257,7 +257,7 @@ function skp_get_query_skope() {
257
  $obj_id = 'home';
258
  // December 2018
259
  // when the home page is a page, the skope now includes the page id, instead of being generic as it was since then : skp__post_page_home
260
- // This has been introduced to facilitate the compatibility of the Nimble Builder with multilanguage plugins like polylang
261
  // => Allows user to create a different home page for each languages
262
  //
263
  // To summarize,
257
  $obj_id = 'home';
258
  // December 2018
259
  // when the home page is a page, the skope now includes the page id, instead of being generic as it was since then : skp__post_page_home
260
+ // This has been introduced to facilitate the compatibility of Nimble Builder with multilanguage plugins like polylang
261
  // => Allows user to create a different home page for each languages
262
  //
263
  // To summarize,
inc/sektions/ccat-czr-sektions.php CHANGED
@@ -87,7 +87,7 @@ function sek_enqueue_controls_js_css() {
87
  ]),
88
 
89
  'isSavedSectionEnabled' => defined( 'NIMBLE_SAVED_SECTIONS_ENABLED' ) ? NIMBLE_SAVED_SECTIONS_ENABLED : true,
90
- 'isNimbleHeaderFooterEnabled' => sek_is_header_footer_enabled(),
91
 
92
  'registeredWidgetZones' => array_merge( array( '_none_' => __('Select a widget area', 'nimble-builder') ), sek_get_registered_widget_areas() ),
93
 
@@ -412,8 +412,8 @@ function nimble_add_i18n_localized_control_params( $params ) {
412
  'Pick a pre-designed section' => __('Pick a pre-designed section', 'nimble-builder'),
413
  'Select a content type' => __('Select a content type', 'nimble-builder'),
414
 
415
- 'The header location only accepts modules and pre-built header sections' => __('The header location only accepts modules and pre-built header sections', 'nimble-builder'),
416
- 'The footer location only accepts modules and pre-built footer sections' => __('The footer location only accepts modules and pre-built footer sections', 'nimble-builder'),
417
  'You can\'t drop a header section in the footer location' => __('You can\'t drop a header section in the footer location', 'nimble-builder'),
418
  'You can\'t drop a footer section in the header location' => __('You can\'t drop a footer section in the header location', 'nimble-builder'),
419
 
@@ -3151,11 +3151,11 @@ function sek_set_input_tmpl___module_picker( $input_id, $input_data ) {
3151
  $content_collection = sek_get_module_collection();
3152
 
3153
  $i = 0;
3154
- foreach( $content_collection as $_params ) {
3155
  // if ( $i % 2 == 0 ) {
3156
  // //printf('<div class="sek-module-raw"></div');
3157
  // }
3158
- $_params = wp_parse_args( $_params, array(
3159
  'content-type' => 'module',
3160
  'content-id' => '',
3161
  'title' => '',
@@ -3165,21 +3165,21 @@ function sek_set_input_tmpl___module_picker( $input_id, $input_data ) {
3165
  ));
3166
 
3167
  $icon_img_html = '<i style="color:red">Missing Icon</i>';
3168
- if ( !empty( $_params['icon'] ) ) {
3169
- $icon_img_src = NIMBLE_MODULE_ICON_PATH . $_params['icon'];
3170
- $icon_img_html = '<img draggable="false" title="'. $_params['title'] . '" alt="'. $_params['title'] . '" class="nimble-module-icons" src="' . $icon_img_src .'"/>';
3171
- } else if ( !empty( $_params['font_icon'] ) ) {
3172
- $icon_img_html = $_params['font_icon'];
3173
  }
3174
 
3175
  printf('<div draggable="%7$s" data-sek-content-type="%1$s" data-sek-content-id="%2$s" title="%5$s"><div class="sek-module-icon %6$s">%3$s</div><div class="sek-module-title"><div class="sek-centered-module-title">%4$s</div></div></div>',
3176
- $_params['content-type'],
3177
- $_params['content-id'],
3178
  $icon_img_html,
3179
- $_params['title'],
3180
- true === $_params['active'] ? __('Drag and drop or double-click to insert in your chosen target element.', 'nimble-builder' ) : __('Available soon ! This module is currently in beta, you can activate it in Site Wide Options > Beta features', 'nimble-builder'),
3181
- !empty( $_params['font_icon'] ) ? 'is-font-icon' : '',
3182
- true === $_params['active'] ? 'true' : 'false'
3183
  );
3184
  }
3185
  ?>
@@ -3213,26 +3213,27 @@ function sek_set_input_tmpl___section_picker( $input_id, $input_data ) {
3213
  }
3214
  $content_collection = $input_data['section_collection'];
3215
 
3216
- foreach( $content_collection as $_params ) {
3217
  $section_type = 'content';
3218
  // Section type has to be specified for header and footer sections
3219
- if ( !empty($input_data['section_type']) ) {
3220
- $section_type = $input_data['section_type'];
 
3221
  }
3222
 
3223
  printf('<div draggable="true" data-sek-content-type="%1$s" data-sek-content-id="%2$s" style="%3$s" title="%4$s" data-sek-section-type="%5$s"><div class="sek-overlay"></div></div>',
3224
  'preset_section',
3225
- $_params['content-id'],
3226
  sprintf( 'background: url(%1$s) 50% 50% / cover no-repeat;%2$s',
3227
  // v1.4.2 : added the ?ver param to make sure we always display the latest shot of the section
3228
  // May 21st, v1.7.5 => back to the local data
3229
  // after problem was reported when fetching data remotely : https://github.com/presscustomizr/nimble-builder/issues/445
3230
- NIMBLE_BASE_URL . '/assets/img/section_assets/thumbs/' . $_params['thumb'] . '?ver=' . NIMBLE_VERSION,
3231
 
3232
- //$_params['thumb'] . '?ver=' . NIMBLE_VERSION,
3233
- isset( $_params['height'] ) ? 'height:'.$_params['height'] : ''
3234
  ),
3235
- $_params['title'],
3236
  $section_type
3237
  );
3238
  }
@@ -4043,7 +4044,7 @@ function sek_set_input_tmpl___imp_exp( $input_id, $input_data ) {
4043
  <div class="sek-import-btn-wrap">
4044
  <div class="customize-control-title width-100"><?php _e('IMPORT', 'nimble-builder'); ?></div>
4045
  <span class="czr-notice"><?php _e('Select the file to import and click on Import button.', 'nimble-builder' ); ?></span>
4046
- <span class="czr-notice"><?php _e('Be sure to import a file generated with the Nimble Builder export system.', 'nimble-builder' ); ?></span>
4047
  <div class="czr-import-dialog notice notice-info">
4048
  <div class="czr-import-message"><?php _e('Some of the imported sections need a location that is not active on this page. Sections in missing locations will not be rendered. You can continue importing or assign those sections to a contextually active location.', 'nimble-builder' ); ?></div>
4049
  <button type="button" class="button" data-czr-control-id="{{ data.control_id }}" data-czr-input-id="<?php echo $input_id; ?>" data-czr-action="sek-import-as-is"><?php _e('Import without modification', 'nimble-builder' ); ?></button>
87
  ]),
88
 
89
  'isSavedSectionEnabled' => defined( 'NIMBLE_SAVED_SECTIONS_ENABLED' ) ? NIMBLE_SAVED_SECTIONS_ENABLED : true,
90
+ 'areBetaFeaturesEnabled' => sek_are_beta_features_enabled(),
91
 
92
  'registeredWidgetZones' => array_merge( array( '_none_' => __('Select a widget area', 'nimble-builder') ), sek_get_registered_widget_areas() ),
93
 
412
  'Pick a pre-designed section' => __('Pick a pre-designed section', 'nimble-builder'),
413
  'Select a content type' => __('Select a content type', 'nimble-builder'),
414
 
415
+ 'Header location only accepts modules and pre-built header sections' => __('Header location only accepts modules and pre-built header sections', 'nimble-builder'),
416
+ 'Footer location only accepts modules and pre-built footer sections' => __('Footer location only accepts modules and pre-built footer sections', 'nimble-builder'),
417
  'You can\'t drop a header section in the footer location' => __('You can\'t drop a header section in the footer location', 'nimble-builder'),
418
  'You can\'t drop a footer section in the header location' => __('You can\'t drop a footer section in the header location', 'nimble-builder'),
419
 
3151
  $content_collection = sek_get_module_collection();
3152
 
3153
  $i = 0;
3154
+ foreach( $content_collection as $_module_params ) {
3155
  // if ( $i % 2 == 0 ) {
3156
  // //printf('<div class="sek-module-raw"></div');
3157
  // }
3158
+ $_module_params = wp_parse_args( $_module_params, array(
3159
  'content-type' => 'module',
3160
  'content-id' => '',
3161
  'title' => '',
3165
  ));
3166
 
3167
  $icon_img_html = '<i style="color:red">Missing Icon</i>';
3168
+ if ( !empty( $_module_params['icon'] ) ) {
3169
+ $icon_img_src = NIMBLE_MODULE_ICON_PATH . $_module_params['icon'];
3170
+ $icon_img_html = '<img draggable="false" title="'. $_module_params['title'] . '" alt="'. $_module_params['title'] . '" class="nimble-module-icons" src="' . $icon_img_src .'"/>';
3171
+ } else if ( !empty( $_module_params['font_icon'] ) ) {
3172
+ $icon_img_html = $_module_params['font_icon'];
3173
  }
3174
 
3175
  printf('<div draggable="%7$s" data-sek-content-type="%1$s" data-sek-content-id="%2$s" title="%5$s"><div class="sek-module-icon %6$s">%3$s</div><div class="sek-module-title"><div class="sek-centered-module-title">%4$s</div></div></div>',
3176
+ $_module_params['content-type'],
3177
+ $_module_params['content-id'],
3178
  $icon_img_html,
3179
+ $_module_params['title'],
3180
+ true === $_module_params['active'] ? __('Drag and drop or double-click to insert in your chosen target element.', 'nimble-builder' ) : __('Available soon ! This module is currently in beta, you can activate it in Site Wide Options > Beta features', 'nimble-builder'),
3181
+ !empty( $_module_params['font_icon'] ) ? 'is-font-icon' : '',
3182
+ true === $_module_params['active'] ? 'true' : 'false'
3183
  );
3184
  }
3185
  ?>
3213
  }
3214
  $content_collection = $input_data['section_collection'];
3215
 
3216
+ foreach( $content_collection as $_section_params ) {
3217
  $section_type = 'content';
3218
  // Section type has to be specified for header and footer sections
3219
+ // Otherwise bug : https://github.com/presscustomizr/nimble-builder/issues/454
3220
+ if ( !empty($_section_params['section_type']) ) {
3221
+ $section_type = $_section_params['section_type'];
3222
  }
3223
 
3224
  printf('<div draggable="true" data-sek-content-type="%1$s" data-sek-content-id="%2$s" style="%3$s" title="%4$s" data-sek-section-type="%5$s"><div class="sek-overlay"></div></div>',
3225
  'preset_section',
3226
+ $_section_params['content-id'],
3227
  sprintf( 'background: url(%1$s) 50% 50% / cover no-repeat;%2$s',
3228
  // v1.4.2 : added the ?ver param to make sure we always display the latest shot of the section
3229
  // May 21st, v1.7.5 => back to the local data
3230
  // after problem was reported when fetching data remotely : https://github.com/presscustomizr/nimble-builder/issues/445
3231
+ NIMBLE_BASE_URL . '/assets/img/section_assets/thumbs/' . $_section_params['thumb'] . '?ver=' . NIMBLE_VERSION,
3232
 
3233
+ //$_section_params['thumb'] . '?ver=' . NIMBLE_VERSION,
3234
+ isset( $_section_params['height'] ) ? 'height:'.$_section_params['height'] : ''
3235
  ),
3236
+ $_section_params['title'],
3237
  $section_type
3238
  );
3239
  }
4044
  <div class="sek-import-btn-wrap">
4045
  <div class="customize-control-title width-100"><?php _e('IMPORT', 'nimble-builder'); ?></div>
4046
  <span class="czr-notice"><?php _e('Select the file to import and click on Import button.', 'nimble-builder' ); ?></span>
4047
+ <span class="czr-notice"><?php _e('Be sure to import a file generated with Nimble Builder export system.', 'nimble-builder' ); ?></span>
4048
  <div class="czr-import-dialog notice notice-info">
4049
  <div class="czr-import-message"><?php _e('Some of the imported sections need a location that is not active on this page. Sections in missing locations will not be rendered. You can continue importing or assign those sections to a contextually active location.', 'nimble-builder' ); ?></div>
4050
  <button type="button" class="button" data-czr-control-id="{{ data.control_id }}" data-czr-input-id="<?php echo $input_id; ?>" data-czr-action="sek-import-as-is"><?php _e('Import without modification', 'nimble-builder' ); ?></button>
inc/sektions/ccat-sektions.php CHANGED
@@ -1579,12 +1579,12 @@ add_filter( 'nimble_parse_template_tags', '\Nimble\sek_parse_template_tags' );
1579
  // December 2018 => preparation of the header / footer feature
1580
  // The beta features can be control by a constant
1581
  // and by a global option
1582
- function sek_is_header_footer_enabled() {
1583
  $global_beta_feature = sek_get_global_option_value( 'beta_features');
1584
  if ( is_array( $global_beta_feature ) && array_key_exists('beta-enabled', $global_beta_feature ) ) {
1585
  return (bool)$global_beta_feature['beta-enabled'];
1586
  }
1587
- return NIMBLE_HEADER_FOOTER_ENABLED;
1588
  }
1589
 
1590
  /* ------------------------------------------------------------------------- *
@@ -1711,15 +1711,15 @@ function sek_get_module_collection() {
1711
  'content-type' => 'module',
1712
  'content-id' => 'czr_widget_area_module',
1713
  'title' => __( 'WordPress widget area', 'nimble-builder' ),
1714
- 'font_icon' => '<i class="fab fa-wordpress-simple"></i>',
1715
- 'active' => sek_is_header_footer_enabled()
1716
  ),
1717
  array(
1718
  'content-type' => 'module',
1719
  'content-id' => 'czr_menu_module',
1720
  'title' => __( 'Menu', 'nimble-builder' ),
1721
- 'font_icon' => '<i class="material-icons">menu</i>',
1722
- 'active' => sek_is_header_footer_enabled()
1723
  ),
1724
 
1725
  // array(
@@ -1774,8 +1774,8 @@ function sek_get_feedback_notif_status() {
1774
  $start_version = get_option( 'nimble_started_with_version', NIMBLE_VERSION );
1775
  //sek_error_log('START VERSION ?' . $start_version, version_compare( $start_version, '1.6.0', '<=' ) );
1776
 
1777
- // Bail if user did not start before 1.6.0
1778
- if ( ! version_compare( $start_version, '1.6.0', '<=' ) )
1779
  return;
1780
 
1781
  $sek_post_query_vars = array(
@@ -1816,7 +1816,7 @@ function sek_get_feedback_notif_status() {
1816
  // sek_error_log('$modules_used ?? ' . count($modules_used), $modules_used );
1817
  // sek_error_log('$customized_pages ??', $customized_pages );
1818
  //version_compare( $this->wp_version, '4.1', '>=' )
1819
- return $customized_pages > 0 && $nb_section_created > 3 && count($modules_used) > 3;
1820
  }
1821
 
1822
  // recursive helper to count the number of sections in a given set of sections data
@@ -2246,9 +2246,17 @@ function sek_get_raw_registration_params() {
2246
  'section_collection' => array(
2247
  array(
2248
  'content-id' => 'header_one',
2249
- 'title' => __('simple header with a logo on the right, menu on the left', 'nimble-builder' ),
2250
  'thumb' => 'header_one.jpg',
2251
- 'height' => '33px'
 
 
 
 
 
 
 
 
2252
  )
2253
  )
2254
  ],
@@ -2258,7 +2266,8 @@ function sek_get_raw_registration_params() {
2258
  array(
2259
  'content-id' => 'footer_one',
2260
  'title' => __('simple footer with 3 columns and large bottom zone', 'nimble-builder' ),
2261
- 'thumb' => 'footer_one.jpg'
 
2262
  )
2263
  )
2264
  ]
@@ -2443,7 +2452,7 @@ function sek_maybe_do_version_mapping() {
2443
  // It's related to a modification of the skope_id when home is a static page
2444
  // Was skp__post_page_home
2445
  // Now is skp__post_page_{$static_home_page_id}
2446
- // This was introduced to facilitate the compatibility of the Nimble Builder with multilanguage plugins like polylang
2447
  // => Allows user to create a different home page for each languages
2448
  //
2449
  // If the current home page is not a static page, we don't have to do anything
@@ -3963,9 +3972,8 @@ function sek_register_modules_when_customizing_or_ajaxing() {
3963
  SEK_Front_Construct::$ui_front_modules
3964
  );
3965
 
3966
- // Header and footer have been introduced in v1.4.0 but not enabled by default
3967
- // The module menu and the widget area module are on hold until "header and footer" feature is released.
3968
- if ( sek_is_header_footer_enabled() ) {
3969
  $modules = array_merge( $modules, SEK_Front_Construct::$ui_front_beta_modules );
3970
  }
3971
  sek_do_register_module_collection( $modules );
@@ -4350,11 +4358,10 @@ function sek_get_module_params_for_sek_content_type_switcher_module() {
4350
  __('use the Nimble page template', 'nimble-builder'),
4351
  "javascript:wp.customize.section('__localOptionsSection', function( _s_ ){_s_.container.find('.accordion-section-title').first().trigger('click');})"
4352
  ),
4353
- // Header and footer have been introduced in v1.4.0 but not enabled by default
4354
- sek_is_header_footer_enabled() ? sprintf('<a href="#" onclick="%2$s" title="%1$s">%1$s</a>',
4355
  __('header and footer', 'nimble-builder'),
4356
  "javascript:wp.customize.section('__globalOptionsSectionId', function( _s_ ){ _s_.focus(); })"
4357
- ) : __('header and footer', 'nimble-builder')
4358
  )
4359
  )
4360
  )
@@ -5634,8 +5641,8 @@ function sek_get_module_params_for_sek_local_template() {
5634
  'nimble_template' => __('Nimble Builder template','nimble-builder')
5635
  ),
5636
  'refresh_preview' => true,
5637
- 'notice_before_title' => __('Use the Nimble Builder template to display content created only with the Nimble Builder on this page. Your theme\'s default template will be overriden','nimble-builder')
5638
- //'notice_after' => __('When you select the Nimble Builder template, only the Nimble sections are displayed.')
5639
  )
5640
  )
5641
  )//tmpl
@@ -5955,8 +5962,8 @@ function sek_get_module_params_for_sek_local_header_footer() {
5955
  'choices' => array(
5956
  'inherit' => __('Inherit the site wide option', 'nimble-builder' ),
5957
  'theme' => __('Use the active theme\'s header and footer', 'nimble-builder' ),
5958
- 'nimble_global' => __('Nimble site wide header and footer ( beta )', 'nimble-builder' ),
5959
- 'nimble_local' => __('Nimble specific header and footer for this page ( beta )', 'nimble-builder' )
5960
  ),
5961
  'refresh_preview' => true,
5962
  'width-100' => true,
@@ -6339,10 +6346,10 @@ function sek_get_module_params_for_sek_global_header_footer() {
6339
  'default' => 'inherit',
6340
  'choices' => array(
6341
  'theme' => __('Use the active theme\'s header and footer', 'nimble-builder' ),
6342
- 'nimble_global' => __('Nimble site wide header and footer ( beta )', 'nimble-builder' )
6343
  ),
6344
  //'refresh_preview' => true,
6345
- 'notice_before_title' => sprintf( __( 'The Nimble Builder allows you to build your own header and footer, or to use your theme\'s ones. This option can be overriden in the %1$s.', 'nimble-builder'),
6346
  sprintf( '<a href="#" onclick="%1$s">%2$s</a>',
6347
  "javascript:wp.customize.section('__localOptionsSection', function( _s_ ){_s_.container.find('.accordion-section-title').first().trigger('click');})",
6348
  __('current page options', 'nimble-builder')
@@ -6376,7 +6383,7 @@ function sek_get_module_params_for_sek_global_recaptcha() {
6376
  'default' => 0,
6377
  'title_width' => 'width-80',
6378
  'input_width' => 'width-20',
6379
- 'notice_after' => sprintf( __('The Nimble Builder can activate the %1$s service to protect your forms against spambots. You need to %2$s.', 'nimble-builder'),
6380
  sprintf('<a href="%1$s" target="_blank">%2$s</a>', 'https://docs.presscustomizr.com/article/385-how-to-enable-recaptcha-protection-against-spam-in-your-forms-with-the-nimble-builder/?utm_source=usersite&utm_medium=link&utm_campaign=nimble-form-module', __('Google reCAPTCHA', 'nimble-builder') ),
6381
  sprintf('<a href="%1$s" target="_blank">%2$s</a>', 'https://www.google.com/recaptcha/admin#list', __('get your domain API keys from Google', 'nimble-builder') )
6382
  )
@@ -6487,7 +6494,10 @@ function sek_get_module_params_for_sek_global_beta_features() {
6487
  'default' => 0,
6488
  'title_width' => 'width-80',
6489
  'input_width' => 'width-20',
6490
- 'notice_before_title' => __( 'Check this option to try the upcoming features of the Nimble Builder. Available beta features as of December 2018 : header and footer customization, menu module, widget area module.', 'nimble-builder'),
 
 
 
6491
  'notice_after' => __( 'Be sure to refresh the customizer before you start using the beta features.', 'nimble-builder')
6492
  ),
6493
  )
@@ -9449,7 +9459,7 @@ function sek_get_module_params_for_czr_simple_form_submission_child() {
9449
  ),
9450
  'refresh_preview' => false,
9451
  'refresh_markup' => false,
9452
- 'notice_after' => sprintf( __('The Nimble Builder can activate the %1$s service to protect your forms against spam. You need to %2$s.', 'nimble-builder'),
9453
  sprintf('<a href="%1$s" target="_blank">%2$s</a>', 'https://docs.presscustomizr.com/article/385-how-to-enable-recaptcha-protection-against-spam-in-your-forms-with-the-nimble-builder/?utm_source=usersite&utm_medium=link&utm_campaign=nimble-form-module', __('Google reCAPTCHA', 'nimble-builder') ),
9454
  sprintf('<a href="#" onclick="%1$s">%2$s</a>',
9455
  "javascript:wp.customize.section('__globalOptionsSectionId', function( _s_ ){ _s_.focus(); })",
@@ -12808,11 +12818,9 @@ if ( ! class_exists( 'SEK_Front_Construct' ) ) :
12808
  'czr_post_grid_thumb_child',
12809
  'czr_post_grid_metas_child',
12810
  'czr_post_grid_fonts_child'
12811
- )
12812
- ];
12813
 
12814
- public static $ui_front_beta_modules = [
12815
- // modules for header and footer
12816
  'czr_menu_module' => array(
12817
  'czr_menu_module',
12818
  'czr_menu_content_child',
@@ -12825,6 +12833,11 @@ if ( ! class_exists( 'SEK_Front_Construct' ) ) :
12825
  //'czr_menu_design_child',
12826
  ];
12827
 
 
 
 
 
 
12828
 
12829
  /////////////////////////////////////////////////////////////////
12830
  // <CONSTRUCTOR>
@@ -12851,11 +12864,9 @@ if ( ! class_exists( 'SEK_Front_Construct' ) ) :
12851
  }//__construct
12852
 
12853
  // @fired @hook 'widgets_init'
 
12854
  public function sek_nimble_widgets_init() {
12855
- // Header and footer have been introduced in v1.4.0 but not enabled by default
12856
- // The Nimble widget areas registration is on hold until "header and footer" feature is released.
12857
- if ( ! sek_is_header_footer_enabled() )
12858
- return;
12859
  $defaults = array(
12860
  'name' => '',
12861
  'id' => '',
@@ -13871,13 +13882,12 @@ if ( ! class_exists( 'SEK_Front_Render' ) ) :
13871
  add_filter( 'template_include', array( $this, 'sek_maybe_set_local_nimble_template' ) );
13872
 
13873
  // HEADER FOOTER
13874
- if ( sek_is_header_footer_enabled() ) {
13875
- add_action( 'template_redirect', array( $this, 'sek_maybe_set_nimble_header_footer' ) );
13876
- // HEADER : USE THE DEFAULT WP TEMPLATE OR A CUSTOM NIMBLE ONE
13877
- add_filter( 'get_header', array( $this, 'sek_maybe_set_local_nimble_header') );
13878
- // FOOTER : USE THE DEFAULT WP TEMPLATE OR A CUSTOM NIMBLE ONE
13879
- add_filter( 'get_footer', array( $this, 'sek_maybe_set_local_nimble_footer') );
13880
- }
13881
 
13882
  // INCLUDE NIMBLE CONTENT IN SEARCH RESULTS
13883
  add_action( 'wp_head', array( $this, 'sek_maybe_include_nimble_content_in_search_results' ) );
1579
  // December 2018 => preparation of the header / footer feature
1580
  // The beta features can be control by a constant
1581
  // and by a global option
1582
+ function sek_are_beta_features_enabled() {
1583
  $global_beta_feature = sek_get_global_option_value( 'beta_features');
1584
  if ( is_array( $global_beta_feature ) && array_key_exists('beta-enabled', $global_beta_feature ) ) {
1585
  return (bool)$global_beta_feature['beta-enabled'];
1586
  }
1587
+ return NIMBLE_BETA_FEATURES_ENABLED;
1588
  }
1589
 
1590
  /* ------------------------------------------------------------------------- *
1711
  'content-type' => 'module',
1712
  'content-id' => 'czr_widget_area_module',
1713
  'title' => __( 'WordPress widget area', 'nimble-builder' ),
1714
+ 'font_icon' => '<i class="fab fa-wordpress-simple"></i>'
1715
+ //'active' => sek_are_beta_features_enabled()
1716
  ),
1717
  array(
1718
  'content-type' => 'module',
1719
  'content-id' => 'czr_menu_module',
1720
  'title' => __( 'Menu', 'nimble-builder' ),
1721
+ 'font_icon' => '<i class="material-icons">menu</i>'
1722
+ //'active' => sek_are_beta_features_enabled()
1723
  ),
1724
 
1725
  // array(
1774
  $start_version = get_option( 'nimble_started_with_version', NIMBLE_VERSION );
1775
  //sek_error_log('START VERSION ?' . $start_version, version_compare( $start_version, '1.6.0', '<=' ) );
1776
 
1777
+ // Bail if user did not start before 1.7.4, May 10th 2019
1778
+ if ( ! version_compare( $start_version, '1.7.4', '<=' ) )
1779
  return;
1780
 
1781
  $sek_post_query_vars = array(
1816
  // sek_error_log('$modules_used ?? ' . count($modules_used), $modules_used );
1817
  // sek_error_log('$customized_pages ??', $customized_pages );
1818
  //version_compare( $this->wp_version, '4.1', '>=' )
1819
+ return $customized_pages > 0 && $nb_section_created > 2 && count($modules_used) > 3;
1820
  }
1821
 
1822
  // recursive helper to count the number of sections in a given set of sections data
2246
  'section_collection' => array(
2247
  array(
2248
  'content-id' => 'header_one',
2249
+ 'title' => __('simple header with a logo on the left and a menu on the right', 'nimble-builder' ),
2250
  'thumb' => 'header_one.jpg',
2251
+ 'height' => '33px',
2252
+ 'section_type' => 'header'
2253
+ ),
2254
+ array(
2255
+ 'content-id' => 'header_two',
2256
+ 'title' => __('simple header with a logo on the right and a menu on the left', 'nimble-builder' ),
2257
+ 'thumb' => 'header_two.jpg',
2258
+ 'height' => '33px',
2259
+ 'section_type' => 'header'
2260
  )
2261
  )
2262
  ],
2266
  array(
2267
  'content-id' => 'footer_one',
2268
  'title' => __('simple footer with 3 columns and large bottom zone', 'nimble-builder' ),
2269
+ 'thumb' => 'footer_one.jpg',
2270
+ 'section_type' => 'footer'
2271
  )
2272
  )
2273
  ]
2452
  // It's related to a modification of the skope_id when home is a static page
2453
  // Was skp__post_page_home
2454
  // Now is skp__post_page_{$static_home_page_id}
2455
+ // This was introduced to facilitate the compatibility of Nimble Builder with multilanguage plugins like polylang
2456
  // => Allows user to create a different home page for each languages
2457
  //
2458
  // If the current home page is not a static page, we don't have to do anything
3972
  SEK_Front_Construct::$ui_front_modules
3973
  );
3974
 
3975
+ // widgets module, menu module have been beta tested during 5 months and released in June 2019, in version 1.8.0
3976
+ if ( sek_are_beta_features_enabled() ) {
 
3977
  $modules = array_merge( $modules, SEK_Front_Construct::$ui_front_beta_modules );
3978
  }
3979
  sek_do_register_module_collection( $modules );
4358
  __('use the Nimble page template', 'nimble-builder'),
4359
  "javascript:wp.customize.section('__localOptionsSection', function( _s_ ){_s_.container.find('.accordion-section-title').first().trigger('click');})"
4360
  ),
4361
+ sprintf('<a href="#" onclick="%2$s" title="%1$s">%1$s</a>',
 
4362
  __('header and footer', 'nimble-builder'),
4363
  "javascript:wp.customize.section('__globalOptionsSectionId', function( _s_ ){ _s_.focus(); })"
4364
+ )
4365
  )
4366
  )
4367
  )
5641
  'nimble_template' => __('Nimble Builder template','nimble-builder')
5642
  ),
5643
  'refresh_preview' => true,
5644
+ 'notice_before_title' => __('Use Nimble Builder\'s template to display content created only with Nimble Builder on this page. Your theme\'s default template will be overriden','nimble-builder')
5645
+ //'notice_after' => __('When you select Nimble Builder\'s template, only the Nimble sections are displayed.')
5646
  )
5647
  )
5648
  )//tmpl
5962
  'choices' => array(
5963
  'inherit' => __('Inherit the site wide option', 'nimble-builder' ),
5964
  'theme' => __('Use the active theme\'s header and footer', 'nimble-builder' ),
5965
+ 'nimble_global' => __('Nimble site wide header and footer', 'nimble-builder' ),
5966
+ 'nimble_local' => __('Nimble specific header and footer for this page', 'nimble-builder' )
5967
  ),
5968
  'refresh_preview' => true,
5969
  'width-100' => true,
6346
  'default' => 'inherit',
6347
  'choices' => array(
6348
  'theme' => __('Use the active theme\'s header and footer', 'nimble-builder' ),
6349
+ 'nimble_global' => __('Nimble site wide header and footer', 'nimble-builder' )
6350
  ),
6351
  //'refresh_preview' => true,
6352
+ 'notice_before_title' => sprintf( __( 'Nimble Builder allows you to build your own header and footer, or to use your theme\'s ones. This option can be overriden in the %1$s.', 'nimble-builder'),
6353
  sprintf( '<a href="#" onclick="%1$s">%2$s</a>',
6354
  "javascript:wp.customize.section('__localOptionsSection', function( _s_ ){_s_.container.find('.accordion-section-title').first().trigger('click');})",
6355
  __('current page options', 'nimble-builder')
6383
  'default' => 0,
6384
  'title_width' => 'width-80',
6385
  'input_width' => 'width-20',
6386
+ 'notice_after' => sprintf( __('Nimble Builder can activate the %1$s service to protect your forms against spambots. You need to %2$s.', 'nimble-builder'),
6387
  sprintf('<a href="%1$s" target="_blank">%2$s</a>', 'https://docs.presscustomizr.com/article/385-how-to-enable-recaptcha-protection-against-spam-in-your-forms-with-the-nimble-builder/?utm_source=usersite&utm_medium=link&utm_campaign=nimble-form-module', __('Google reCAPTCHA', 'nimble-builder') ),
6388
  sprintf('<a href="%1$s" target="_blank">%2$s</a>', 'https://www.google.com/recaptcha/admin#list', __('get your domain API keys from Google', 'nimble-builder') )
6389
  )
6494
  'default' => 0,
6495
  'title_width' => 'width-80',
6496
  'input_width' => 'width-20',
6497
+ 'notice_before_title' => sprintf( '%1$s <strong>%2$s</strong>',
6498
+ __( 'Check this option to try the upcoming features of Nimble Builder.', 'nimble-builder') ,
6499
+ __('There are currently no available beta features to test.', 'nimble-builder')
6500
+ ),
6501
  'notice_after' => __( 'Be sure to refresh the customizer before you start using the beta features.', 'nimble-builder')
6502
  ),
6503
  )
9459
  ),
9460
  'refresh_preview' => false,
9461
  'refresh_markup' => false,
9462
+ 'notice_after' => sprintf( __('Nimble Builder can activate the %1$s service to protect your forms against spam. You need to %2$s.', 'nimble-builder'),
9463
  sprintf('<a href="%1$s" target="_blank">%2$s</a>', 'https://docs.presscustomizr.com/article/385-how-to-enable-recaptcha-protection-against-spam-in-your-forms-with-the-nimble-builder/?utm_source=usersite&utm_medium=link&utm_campaign=nimble-form-module', __('Google reCAPTCHA', 'nimble-builder') ),
9464
  sprintf('<a href="#" onclick="%1$s">%2$s</a>',
9465
  "javascript:wp.customize.section('__globalOptionsSectionId', function( _s_ ){ _s_.focus(); })",
12818
  'czr_post_grid_thumb_child',
12819
  'czr_post_grid_metas_child',
12820
  'czr_post_grid_fonts_child'
12821
+ ),
 
12822
 
12823
+ // widgets module, menu module have been beta tested during 5 months and released in June 2019, in version 1.8.0
 
12824
  'czr_menu_module' => array(
12825
  'czr_menu_module',
12826
  'czr_menu_content_child',
12833
  //'czr_menu_design_child',
12834
  ];
12835
 
12836
+ // Is merged with front module when sek_is_header_footer_enabled() === true
12837
+ // @see sek_register_modules_when_customizing_or_ajaxing
12838
+ // and sek_register_modules_when_not_customizing_and_not_ajaxing
12839
+ public static $ui_front_beta_modules = [];
12840
+
12841
 
12842
  /////////////////////////////////////////////////////////////////
12843
  // <CONSTRUCTOR>
12864
  }//__construct
12865
 
12866
  // @fired @hook 'widgets_init'
12867
+ // Creates 10 widget zones
12868
  public function sek_nimble_widgets_init() {
12869
+ // Header/footer, widgets module, menu module have been beta tested during 5 months and released in June 2019, in version 1.8.0
 
 
 
12870
  $defaults = array(
12871
  'name' => '',
12872
  'id' => '',
13882
  add_filter( 'template_include', array( $this, 'sek_maybe_set_local_nimble_template' ) );
13883
 
13884
  // HEADER FOOTER
13885
+ // Header/footer, widgets module, menu module have been beta tested during 5 months and released in June 2019, in version 1.8.0
13886
+ add_action( 'template_redirect', array( $this, 'sek_maybe_set_nimble_header_footer' ) );
13887
+ // HEADER : USE THE DEFAULT WP TEMPLATE OR A CUSTOM NIMBLE ONE
13888
+ add_filter( 'get_header', array( $this, 'sek_maybe_set_local_nimble_header') );
13889
+ // FOOTER : USE THE DEFAULT WP TEMPLATE OR A CUSTOM NIMBLE ONE
13890
+ add_filter( 'get_footer', array( $this, 'sek_maybe_set_local_nimble_footer') );
 
13891
 
13892
  // INCLUDE NIMBLE CONTENT IN SEARCH RESULTS
13893
  add_action( 'wp_head', array( $this, 'sek_maybe_include_nimble_content_in_search_results' ) );
inc/sektions/seks_setting_class.php CHANGED
@@ -138,7 +138,9 @@ final class Nimble_Customizer_Setting extends \WP_Customize_Setting {
138
  if ( ! is_array( $seks_collection ) ) {
139
  $seks_collection = array();
140
  }
141
- //error_log( __CLASS__. ' in update => ' . $this->skope_id );
 
 
142
  if ( empty( $this->skope_id ) || ! is_string( $this->skope_id ) ) {
143
  throw new Exception( 'Nimble_Customizer_Setting => update => invalid skope id' );
144
  }
138
  if ( ! is_array( $seks_collection ) ) {
139
  $seks_collection = array();
140
  }
141
+ // sek_error_log( __CLASS__. ' in update => ' . $this->skope_id );
142
+ // sek_error_log( __CLASS__. ' $seks_collection' , $seks_collection );
143
+
144
  if ( empty( $this->skope_id ) || ! is_string( $this->skope_id ) ) {
145
  throw new Exception( 'Nimble_Customizer_Setting => update => invalid skope id' );
146
  }
nimble-builder.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Nimble Page Builder
4
  * Description: Powerful drag and drop page builder using the native WordPress customizer.
5
- * Version: 1.7.7
6
  * Text Domain: nimble-builder
7
  * Author: Press Customizr
8
  * Author URI: https://nimblebuilder.com/?utm_source=wp-plugins&utm_medium=wp-dashboard&utm_campaign=author-uri
@@ -13,7 +13,7 @@ if ( ! defined( 'ABSPATH' ) ) {
13
  /* ------------------------------------------------------------------------- *
14
  * CONSTANTS
15
  /* ------------------------------------------------------------------------- */
16
- $current_version = "1.7.7";
17
  if ( !defined( "NIMBLE_VERSION" ) ) { define( "NIMBLE_VERSION", $current_version ); }
18
  if ( !defined( 'NIMBLE_DIR_NAME' ) ) { define( 'NIMBLE_DIR_NAME' , basename( dirname( __FILE__ ) ) ); }
19
  if ( !defined( 'NIMBLE_BASE_URL' ) ) { define( 'NIMBLE_BASE_URL' , plugins_url( NIMBLE_DIR_NAME ) ); }
@@ -22,9 +22,9 @@ if ( !defined( 'NIMBLE_MIN_PHP_VERSION' ) ) { define ( 'NIMBLE_MIN_PHP_VERSION',
22
  if ( !defined( 'NIMBLE_MIN_WP_VERSION' ) ) { define ( 'NIMBLE_MIN_WP_VERSION', '4.7' ); }
23
  if ( !defined( 'NIMBLE_PLUGIN_FILE' ) ) { define( 'NIMBLE_PLUGIN_FILE', __FILE__ ); }// Plugin Root File used register_activation_hook( NIMBLE_PLUGIN_FILE, 'nimble_install' );
24
 
25
- // Note : NIMBLE_SAVED_SECTIONS_ENABLED and NIMBLE_HEADER_FOOTER_ENABLED can be defined in wp_config.php !
26
  if ( !defined( 'NIMBLE_SAVED_SECTIONS_ENABLED' ) ) { define ( 'NIMBLE_SAVED_SECTIONS_ENABLED', false ); }
27
- if ( !defined( 'NIMBLE_HEADER_FOOTER_ENABLED' ) ) { define ( 'NIMBLE_HEADER_FOOTER_ENABLED', false ); }
28
 
29
  if ( !defined( 'NIMBLE_SHOW_UPDATE_NOTICE_FOR_VERSION' ) ) { define( 'NIMBLE_SHOW_UPDATE_NOTICE_FOR_VERSION', '1.7.4' ); }
30
  if ( !defined( 'NIMBLE_RELEASE_NOTE_URL' ) ) { define( 'NIMBLE_RELEASE_NOTE_URL', 'https://presscustomizr.com/nimble-builder-version-1-7-4-includes-nimble-created-content-in-search-results/' ); }
2
  /**
3
  * Plugin Name: Nimble Page Builder
4
  * Description: Powerful drag and drop page builder using the native WordPress customizer.
5
+ * Version: 1.8.0
6
  * Text Domain: nimble-builder
7
  * Author: Press Customizr
8
  * Author URI: https://nimblebuilder.com/?utm_source=wp-plugins&utm_medium=wp-dashboard&utm_campaign=author-uri
13
  /* ------------------------------------------------------------------------- *
14
  * CONSTANTS
15
  /* ------------------------------------------------------------------------- */
16
+ $current_version = "1.8.0";
17
  if ( !defined( "NIMBLE_VERSION" ) ) { define( "NIMBLE_VERSION", $current_version ); }
18
  if ( !defined( 'NIMBLE_DIR_NAME' ) ) { define( 'NIMBLE_DIR_NAME' , basename( dirname( __FILE__ ) ) ); }
19
  if ( !defined( 'NIMBLE_BASE_URL' ) ) { define( 'NIMBLE_BASE_URL' , plugins_url( NIMBLE_DIR_NAME ) ); }
22
  if ( !defined( 'NIMBLE_MIN_WP_VERSION' ) ) { define ( 'NIMBLE_MIN_WP_VERSION', '4.7' ); }
23
  if ( !defined( 'NIMBLE_PLUGIN_FILE' ) ) { define( 'NIMBLE_PLUGIN_FILE', __FILE__ ); }// Plugin Root File used register_activation_hook( NIMBLE_PLUGIN_FILE, 'nimble_install' );
24
 
25
+ // Note : NIMBLE_SAVED_SECTIONS_ENABLED and NIMBLE_BETA_FEATURES_ENABLED can be defined in wp_config.php !
26
  if ( !defined( 'NIMBLE_SAVED_SECTIONS_ENABLED' ) ) { define ( 'NIMBLE_SAVED_SECTIONS_ENABLED', false ); }
27
+ if ( !defined( 'NIMBLE_BETA_FEATURES_ENABLED' ) ) { define ( 'NIMBLE_BETA_FEATURES_ENABLED', false ); }
28
 
29
  if ( !defined( 'NIMBLE_SHOW_UPDATE_NOTICE_FOR_VERSION' ) ) { define( 'NIMBLE_SHOW_UPDATE_NOTICE_FOR_VERSION', '1.7.4' ); }
30
  if ( !defined( 'NIMBLE_RELEASE_NOTE_URL' ) ) { define( 'NIMBLE_RELEASE_NOTE_URL', 'https://presscustomizr.com/nimble-builder-version-1-7-4-includes-nimble-created-content-in-search-results/' ); }
readme.txt CHANGED
@@ -5,8 +5,8 @@ Plugin URI: https://wordpress.org/plugins/nimble-builder/
5
  Tags: page builder, visual editor, customizer, drag and drop, header, footer, landing page, contact form, grid, post grid
6
  Requires at least: 4.7
7
  Requires PHP: 5.4
8
- Tested up to: 5.2.1
9
- Stable tag: 1.7.7
10
  License: GPLv3
11
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
12
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8FMNQPU36U27J&source=url
@@ -60,7 +60,6 @@ Nimble Builder allows you to insert sections in any context of your site : home
60
  * Quote
61
  * Widget zone
62
  * Menu
63
- * Image Slider ( under development )
64
  * Accordion ( under development )
65
  * ... and more to come !
66
 
@@ -109,10 +108,17 @@ Nimble builder works with any WordPress theme. If you experience any problem wit
109
  7. **Theme** : try to switch to another WordPress theme, like the default WordPress theme. If you use a child theme, activate the parent theme instead.
110
 
111
  == Upgrade Notice ==
112
- = 1.7.7 =
113
- Fixed capability checks missing for new edit button in admin. Now checking if user can 'edit post' and 'customize'.
114
 
115
  == Changelog ==
 
 
 
 
 
 
 
116
  = 1.7.7 : May 28th 2019 =
117
  * fixed : capability checks missing for new edit button. Now checking if user can 'edit post' and 'customize'
118
  * improved : only print and enqueue js assets of the edit button when editing a post, a CPT or a page
5
  Tags: page builder, visual editor, customizer, drag and drop, header, footer, landing page, contact form, grid, post grid
6
  Requires at least: 4.7
7
  Requires PHP: 5.4
8
+ Tested up to: 5.2.2
9
+ Stable tag: 1.8.0
10
  License: GPLv3
11
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
12
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8FMNQPU36U27J&source=url
60
  * Quote
61
  * Widget zone
62
  * Menu
 
63
  * Accordion ( under development )
64
  * ... and more to come !
65
 
108
  7. **Theme** : try to switch to another WordPress theme, like the default WordPress theme. If you use a child theme, activate the parent theme instead.
109
 
110
  == Upgrade Notice ==
111
+ = 1.8.0 =
112
+ Header / footer, widget module, menu module are now part of Nimble Builder's core features, after a few monthes of beta tests.
113
 
114
  == Changelog ==
115
+ = 1.8.0 : June 11th 2019 =
116
+ * fixed : bug preventing dropping of a pre-built section in header and footer location
117
+ * fixed : reset action broken when used from the customizer notification zone
118
+ * fixed : resizable not re-instantiated when moving columns
119
+ * added : Header / footer, widget module, menu module are now part of Nimble Builder's core features, after a few monthes of beta tests
120
+ * added : a new pre-built header section
121
+
122
  = 1.7.7 : May 28th 2019 =
123
  * fixed : capability checks missing for new edit button. Now checking if user can 'edit post' and 'customize'
124
  * improved : only print and enqueue js assets of the edit button when editing a post, a CPT or a page