Nimble Page Builder - Version 1.5.1

Version Description

New option to preview and restore a revision. New option to add custom CSS classes to elements. Fixed a Google font bug.

=

Download this release

Release Info

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

Code changes from version 1.5.0 to 1.5.1

assets/czr/sek/js/ccat-sek-control.js CHANGED
@@ -312,6 +312,26 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
312
  self.lastClickedTargetInPreview({});
313
  }
314
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
315
  },//doSektionThinksOnApiReady
316
 
317
 
@@ -450,7 +470,7 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
450
  });
451
 
452
 
453
- // GLOBAL OPTIONS SETTING
454
  // Will Be updated in ::generateUIforGlobalOptions()
455
  // has no control.
456
  api.CZR_Helpers.register( {
@@ -725,9 +745,83 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
725
  var CZRSeksPrototype = CZRSeksPrototype || {};
726
  (function ( api, $ ) {
727
  $.extend( CZRSeksPrototype, {
728
- /* HISTORY */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
729
  // @param direction = string 'undo', 'redo'
730
  // @return void()
 
731
  navigateHistory : function( direction ) {
732
  var self = this,
733
  historyLog = $.extend( true, [], self.historyLog() );
@@ -1382,6 +1476,76 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
1382
  })( wp.customize, jQuery );
1383
  //global sektionsLocalizedData
1384
  var CZRSeksPrototype = CZRSeksPrototype || {};
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1385
  (function ( api, $ ) {
1386
  $.extend( CZRSeksPrototype, {
1387
  // Fired on api 'ready', in reaction to ::setContextualCollectionSettingIdWhenSkopeSet => ::localSectionsSettingId
@@ -1431,7 +1595,13 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
1431
  // params : params
1432
  // }
1433
  // );
1434
- self.trackHistoryLog( sektionSetInstance, params );
 
 
 
 
 
 
1435
 
1436
  }, 1000 ) );
1437
  });//api( settingData.collectionSettingId, function( sektionSetInstance ){}
@@ -1463,74 +1633,6 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
1463
  // });
1464
  },// SetupSettingsToBeSaved()
1465
 
1466
-
1467
- // React to a local or global setting change api( settingData.collectionSettingId )
1468
- trackHistoryLog : function( sektionSetInstance, params ) {
1469
- var self = this,
1470
- _isGlobal = sektionSetInstance.id === self.getGlobalSectionsSettingId();
1471
-
1472
- // Track changes, if not currently navigating the logs
1473
- // Always clean future values if the logs have been previously navigated back
1474
- if ( params && true !== params.navigatingHistoryLogs ) {
1475
- var newHistoryLog = [],
1476
- historyLog = $.extend( true, [], self.historyLog() ),
1477
- sektionToRefresh;
1478
-
1479
- if ( ! _.isEmpty( params.in_sektion ) ) {//<= module changed, column resized, removed...
1480
- sektionToRefresh = params.in_sektion;
1481
- } else if ( ! _.isEmpty( params.to_sektion ) ) {// column moved /
1482
- sektionToRefresh = params.to_sektion;
1483
- }
1484
-
1485
- // Reset all status but 'future' to 'previous'
1486
- _.each( historyLog, function( log ) {
1487
- var newStatus = 'previous';
1488
- if ( 'future' == log.status )
1489
- return;
1490
- $.extend( log, { status : 'previous' } );
1491
- newHistoryLog.push( log );
1492
- });
1493
- newHistoryLog.push({
1494
- status : 'current',
1495
- value : _isGlobal ? { global : sektionSetInstance() } : { local : sektionSetInstance() },
1496
- action : _.isObject( params ) ? ( params.action || '' ) : '',
1497
- sektionToRefresh : sektionToRefresh
1498
- });
1499
- self.historyLog( newHistoryLog );
1500
- }
1501
- },
1502
-
1503
-
1504
-
1505
- // Fired in ::initialize(), at api 'ready'
1506
- initializeHistoryLogWhenSettingsRegistered : function() {
1507
- var self = this;
1508
- // This api.Value() is bound in ::setupTopBar
1509
- self.historyLog = new api.Value([{
1510
- status : 'current',
1511
- value : {
1512
- 'local' : api( self.localSectionsSettingId() )(),//<= "nimble___[skp__post_page_10]"
1513
- 'global' : api( self.getGlobalSectionsSettingId() )()
1514
- },
1515
- action : 'initial'
1516
- }]);
1517
- // LISTEN TO HISTORY LOG CHANGES TO UPDATE THE BUTTON STATE
1518
- self.historyLog.bind( function( newLog ) {
1519
- if ( _.isEmpty( newLog ) )
1520
- return;
1521
-
1522
- var newCurrentKey = _.findKey( newLog, { status : 'current'} );
1523
- newCurrentKey = Number( newCurrentKey );
1524
- $( '#nimble-top-bar' ).find('[data-nimble-history]').each( function() {
1525
- if ( 'undo' === $(this).data('nimble-history') ) {
1526
- $(this).attr('data-nimble-state', 0 >= newCurrentKey ? 'disabled' : 'enabled');
1527
- } else {
1528
- $(this).attr('data-nimble-state', newLog.length <= ( newCurrentKey + 1 ) ? 'disabled' : 'enabled');
1529
- }
1530
- });
1531
- });
1532
- },
1533
-
1534
  // Fired :
1535
  // 1) when instantiating the setting
1536
  // 2) on each setting change, as an override of api.Value::validate( to ) @see customize-base.js
@@ -1683,8 +1785,12 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
1683
  _.each( level.collection, function( _l_ ) {
1684
  // Set the parent level now
1685
  parentLevel = $.extend( true, {}, level );
1686
- // And walk sub levels
1687
- _checkWalker_( _l_ );
 
 
 
 
1688
  });
1689
  }
1690
  }
@@ -2014,7 +2120,8 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
2014
  direction : 'up',
2015
  id : params.id,
2016
  is_nested : ! _.isEmpty( params.in_sektion ) && ! _.isEmpty( params.in_column ),
2017
- location : params.location
 
2018
  };
2019
  return self.updateAPISetting( apiParams );
2020
  },
@@ -2035,7 +2142,8 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
2035
  direction : 'down',
2036
  id : params.id,
2037
  is_nested : ! _.isEmpty( params.in_sektion ) && ! _.isEmpty( params.in_column ),
2038
- location : params.location
 
2039
  };
2040
  return self.updateAPISetting( apiParams );
2041
  },
@@ -2351,17 +2459,18 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
2351
  // }
2352
  'sek-notify' : function( params ) {
2353
  sendToPreview = false;
 
2354
  return $.Deferred(function() {
2355
  api.panel( sektionsLocalizedData.sektionsPanelId, function( __main_panel__ ) {
2356
- api.notifications.add( new api.Notification( 'sek-notify', {
2357
  type: params.type || 'info',
2358
  message: params.message,
2359
  dismissible: true
2360
- } ) );
2361
 
2362
  // Removed if not dismissed after 5 seconds
2363
  _.delay( function() {
2364
- api.notifications.remove( 'sek-notify' );
2365
  }, params.duration || 5000 );
2366
  });
2367
  // always pass the local or global skope of the currently customized location id when resolving the promise.
@@ -2907,7 +3016,7 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
2907
  if ( null !== parentModuleType ) {
2908
  inputDefaultValue = self.getInputDefaultValue( input_id, parentModuleType );
2909
  if ( 'no_default_value_specified' === inputDefaultValue ) {
2910
- api.infoLog( '::updateAPISettingAndExecutePreviewActions => missing default value for input ' + input_id + ' in module ' + parentModuleType );
2911
  }
2912
  }
2913
  if ( isEqualToDefault( _val, inputDefaultValue ) ) {
@@ -3510,7 +3619,7 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
3510
  anchor : {
3511
  settingControlId : params.id + '__anchor_options',
3512
  module_type : 'sek_level_anchor_module',
3513
- controlLabel : sektionsLocalizedData.i18n['Set a custom anchor ( CSS ID ) for the'] + ' ' + sektionsLocalizedData.i18n[params.level],
3514
  icon : '<i class="fas fa-anchor sek-level-option-icon"></i>'
3515
  },
3516
  visibility : {
@@ -3819,10 +3928,18 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
3819
  registrationParams[ opt_name ] = {
3820
  settingControlId : _id_ + '__local_reset',
3821
  module_type : mod_type,
3822
- controlLabel : sektionsLocalizedData.i18n['Remove the sections in this page'],
3823
  icon : '<i class="material-icons sek-level-option-icon">cached</i>'
3824
  };
3825
  break;
 
 
 
 
 
 
 
 
3826
  default :
3827
  api.errare('::generateUIforLocalOptions => an option group could not be registered => ' + mod_type, opt_name );
3828
  break;
@@ -4009,6 +4126,14 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
4009
  icon : '<i class="material-icons sek-level-option-icon">security</i>'
4010
  };
4011
  break;
 
 
 
 
 
 
 
 
4012
  case 'beta_features' :
4013
  registrationParams[ opt_name ] = {
4014
  settingControlId : _id_ + '__beta_features',
@@ -4135,7 +4260,6 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
4135
  // in_column
4136
  // }
4137
  updateAPISetting : function( params ) {
4138
-
4139
  var self = this,
4140
  __updateAPISettingDeferred__ = $.Deferred();
4141
 
@@ -4146,10 +4270,8 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
4146
  params.is_global_location = self.isGlobalLocation( params );
4147
 
4148
  var _collectionSettingId_ = params.is_global_location ? self.getGlobalSectionsSettingId() : self.localSectionsSettingId();
4149
-
4150
- // Update the sektion collection
4151
- api( _collectionSettingId_, function( sektionSetInstance ) {
4152
- // sektionSetInstance() = {
4153
  // collection : [
4154
  // 'loop_start' : { level : location, collection : [ 'sek124' : { collection : [], level : section, options : {} }], options : {}},
4155
  // 'loop_end' : { level : location, collection : [], options : {}}
@@ -4158,7 +4280,7 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
4158
  // options : {}
4159
  //
4160
  // }
4161
- var currentSetValue = sektionSetInstance(),
4162
  newSetValue = _.isObject( currentSetValue ) ? $.extend( true, {}, currentSetValue ) : self.getDefaultSektionSettingValue( params.is_global_location ? 'global' : 'local' ),
4163
  locationCandidate,
4164
  sektionCandidate,
@@ -4170,7 +4292,7 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
4170
  //duplication variable
4171
  cloneId, //will be passed in resolve()
4172
  startingModuleValue,// will be populated by the optional starting value specificied on module registration
4173
- __presetSectionInjected__ = false,
4174
  parentSektionCandidate;
4175
 
4176
  // make sure we have a collection array to populate
@@ -4379,18 +4501,17 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
4379
  break;
4380
 
4381
 
4382
- // Fired on click on up / down arrows in the ( not nested ) section ui menu
 
4383
  case 'sek-move-section-up-down' :
4384
  //api.infoLog('PARAMS in sek-move-section-up', params );
4385
-
4386
- inLocationCandidate = self.getLevelModel( params.location, newSetValue.collection );
4387
-
4388
- if ( _.isEmpty( inLocationCandidate ) || 'no_match' == inLocationCandidate ) {
4389
  throw new Error( 'updateAPISetting => ' + params.action + ' => missing target location' );
4390
  }
4391
- inLocationCandidate.collection = _.isArray( inLocationCandidate.collection ) ? inLocationCandidate.collection : [];
4392
- originalCollection = $.extend( true, [], inLocationCandidate.collection );
4393
- reorderedCollection = $.extend( true, [], inLocationCandidate.collection );
4394
 
4395
  var _indexInOriginal = _.findIndex( originalCollection, function( _sec_ ) {
4396
  return _sec_.id === params.id;
@@ -4402,10 +4523,19 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
4402
 
4403
  // Swap up <=> down
4404
  var direction = params.direction || 'up';
 
 
 
 
 
 
 
 
 
 
4405
  reorderedCollection[ _indexInOriginal ] = originalCollection[ 'up' === direction ? _indexInOriginal - 1 : _indexInOriginal + 1 ];
4406
  reorderedCollection[ 'up' === direction ? _indexInOriginal - 1 : _indexInOriginal + 1 ] = originalCollection[ _indexInOriginal ];
4407
-
4408
- inLocationCandidate.collection = reorderedCollection;
4409
  break;
4410
 
4411
 
@@ -5170,6 +5300,14 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
5170
  // this is then used server side in Sek_Dyn_CSS_Handler::sek_get_gfont_print_candidates to build the Google Fonts request
5171
  newSetValue.fonts = currentGfonts;
5172
  break;
 
 
 
 
 
 
 
 
5173
  }// switch
5174
 
5175
 
@@ -5179,12 +5317,10 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
5179
  if ( 'pending' == __updateAPISettingDeferred__.state() ) {
5180
  var mayBeUpdateSektionsSetting = function() {
5181
  if ( _.isEqual( currentSetValue, newSetValue ) ) {
5182
- if ( sektionsLocalizedData.isDevMode ) {
5183
- __updateAPISettingDeferred__.reject( 'updateAPISetting => the new setting value is unchanged when firing action : ' + params.action );
5184
- }
5185
  } else {
5186
  if ( null !== self.validateSettingValue( newSetValue ) ) {
5187
- sektionSetInstance( newSetValue, params );
5188
  // Add the cloneId to the params when we resolve
5189
  // the cloneId is only needed in the duplication scenarii
5190
  params.cloneId = cloneId;
@@ -5196,19 +5332,38 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
5196
  }
5197
  };//mayBeUpdateSektionsSetting()
5198
 
5199
- if ( false === __presetSectionInjected__ ) {
 
 
 
 
 
5200
  mayBeUpdateSektionsSetting();
 
 
 
 
5201
  } else {
5202
  __presetSectionInjected__
5203
  .done( function() {
5204
  mayBeUpdateSektionsSetting();
 
 
 
 
5205
  })
5206
  .fail( function( _er_ ) {
5207
  api.errare( 'updateAPISetting => __presetSectionInjected__ failed', _er_ );
5208
  });
5209
  }
5210
  }
5211
- });//api( _collectionSettingId_, function( sektionSetInstance ) {}
 
 
 
 
 
 
5212
  return __updateAPISettingDeferred__.promise();
5213
  },//updateAPISetting
5214
 
@@ -8284,7 +8439,6 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
8284
  // For example, a content picker can be given params to display only taxonomies
8285
  // the default input_event_map can also be overriden in this callback
8286
  $.extend( api.czrInputMap, {
8287
- // FONT AWESOME ICON PICKER
8288
  // FONT AWESOME ICON PICKER
8289
  fa_icon_picker : function() {
8290
  var input = this,
@@ -9480,6 +9634,113 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
9480
  });
9481
  }
9482
  });//$.extend( api.czrInputMap, {})
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9483
  })( wp.customize, jQuery, _ );//global sektionsLocalizedData, serverControlParams
9484
  //extends api.CZRDynModule
9485
  /* ------------------------------------------------------------------------- *
@@ -10732,6 +10993,31 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
10732
  });
10733
  })( wp.customize , jQuery, _ );//global sektionsLocalizedData, serverControlParams
10734
  //extends api.CZRDynModule
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10735
  ( function ( api, $, _ ) {
10736
  var Constructor = {
10737
  initialize: function( id, options ) {
@@ -11069,6 +11355,23 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
11069
  });
11070
  })( wp.customize , jQuery, _ );//global sektionsLocalizedData, serverControlParams
11071
  //extends api.CZRDynModule
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11072
  ( function ( api, $, _ ) {
11073
  //provides a description of each module
11074
  //=> will determine :
312
  self.lastClickedTargetInPreview({});
313
  }
314
  });
315
+
316
+ // PRINT A WARNING NOTICE FOR USERS OF CACHE PLUGIN
317
+ if ( sektionsLocalizedData.hasActiveCachePlugin ) {
318
+ _.delay( function() {
319
+ api.previewer.trigger('sek-notify', {
320
+ notif_id : 'has-active-cache-plugin',
321
+ type : 'info',
322
+ duration : 60000,
323
+ message : [
324
+ '<span style="color:#0075a2">',
325
+ sektionsLocalizedData.i18n['You seem to be using a cache plugin.'],
326
+ '<strong> (' + sektionsLocalizedData.hasActiveCachePlugin + ')</strong><br/>',
327
+ '<strong>',
328
+ sektionsLocalizedData.i18n['It is recommended to disable your cache plugin when customizing your website.'],
329
+ '</strong>',
330
+ '</span>'
331
+ ].join('')
332
+ });
333
+ }, 2000 );//delay()
334
+ }
335
  },//doSektionThinksOnApiReady
336
 
337
 
470
  });
471
 
472
 
473
+ // SITE WIDE GLOBAL OPTIONS SETTING
474
  // Will Be updated in ::generateUIforGlobalOptions()
475
  // has no control.
476
  api.CZR_Helpers.register( {
745
  var CZRSeksPrototype = CZRSeksPrototype || {};
746
  (function ( api, $ ) {
747
  $.extend( CZRSeksPrototype, {
748
+ // Fired in ::initialize(), at api 'ready'
749
+ // March 2019 : history log tracks local and global section settings
750
+ // no tracking of the global option sektionsLocalizedData.optNameForGlobalOptions
751
+ initializeHistoryLogWhenSettingsRegistered : function() {
752
+ var self = this;
753
+ // This api.Value() is bound in ::setupTopBar
754
+ self.historyLog = new api.Value([{
755
+ status : 'current',
756
+ value : {
757
+ 'local' : api( self.localSectionsSettingId() )(),//<= "nimble___[skp__post_page_10]"
758
+ 'global' : api( self.getGlobalSectionsSettingId() )()
759
+ },
760
+ action : 'initial'
761
+ }]);
762
+ // LISTEN TO HISTORY LOG CHANGES AND UPDATE THE BUTTON STATE
763
+ self.historyLog.bind( function( newLog ) {
764
+ if ( _.isEmpty( newLog ) )
765
+ return;
766
+
767
+ var newCurrentKey = _.findKey( newLog, { status : 'current'} );
768
+ newCurrentKey = Number( newCurrentKey );
769
+ $( '#nimble-top-bar' ).find('[data-nimble-history]').each( function() {
770
+ if ( 'undo' === $(this).data('nimble-history') ) {
771
+ $(this).attr('data-nimble-state', 0 >= newCurrentKey ? 'disabled' : 'enabled');
772
+ } else {
773
+ $(this).attr('data-nimble-state', newLog.length <= ( newCurrentKey + 1 ) ? 'disabled' : 'enabled');
774
+ }
775
+ });
776
+ });
777
+ },
778
+
779
+ // React to a local or global setting change api( settingData.collectionSettingId )
780
+ // =>populates self.historyLog() observable value
781
+ // invoked in ::setupSettingsToBeSaved, if params.navigatingHistoryLogs !== true <=> not already navigating
782
+ trackHistoryLog : function( sektionSetInstance, params ) {
783
+ var self = this,
784
+ _isGlobal = sektionSetInstance.id === self.getGlobalSectionsSettingId();
785
+
786
+ // Safety checks
787
+ // trackHistoryLog must be invoked with a try catch statement
788
+ if ( !_.isObject( params ) || !_.isFunction( self.historyLog ) || !_.isArray( self.historyLog() ) ) {
789
+ throw new Error('trackHistoryLog => invalid params or historyLog value');
790
+ }
791
+
792
+ // Always clean future values if the logs have been previously navigated back
793
+ var newHistoryLog = [],
794
+ historyLog = $.extend( true, [], self.historyLog() ),
795
+ sektionToRefresh;
796
+
797
+ if ( ! _.isEmpty( params.in_sektion ) ) {//<= module changed, column resized, removed...
798
+ sektionToRefresh = params.in_sektion;
799
+ } else if ( ! _.isEmpty( params.to_sektion ) ) {// column moved /
800
+ sektionToRefresh = params.to_sektion;
801
+ }
802
+
803
+ // Reset all status but 'future' to 'previous'
804
+ _.each( historyLog, function( log ) {
805
+ var newStatus = 'previous';
806
+ if ( 'future' == log.status )
807
+ return;
808
+ $.extend( log, { status : 'previous' } );
809
+ newHistoryLog.push( log );
810
+ });
811
+ newHistoryLog.push({
812
+ status : 'current',
813
+ value : _isGlobal ? { global : sektionSetInstance() } : { local : sektionSetInstance() },
814
+ action : _.isObject( params ) ? ( params.action || '' ) : '',
815
+ sektionToRefresh : sektionToRefresh
816
+ });
817
+ self.historyLog( newHistoryLog );
818
+ },
819
+
820
+
821
+
822
  // @param direction = string 'undo', 'redo'
823
  // @return void()
824
+ // Fired on click in the topbar or when hitting ctrl z / y
825
  navigateHistory : function( direction ) {
826
  var self = this,
827
  historyLog = $.extend( true, [], self.historyLog() );
1476
  })( wp.customize, jQuery );
1477
  //global sektionsLocalizedData
1478
  var CZRSeksPrototype = CZRSeksPrototype || {};
1479
+ (function ( api, $ ) {
1480
+ $.extend( CZRSeksPrototype, {
1481
+ // the input id determine if we fetch the revision history of the local or global setting
1482
+ // @return a deferred promise
1483
+ // @params object : { is_local:bool} <= 'local_revisions' === input.id
1484
+ getRevisionHistory : function(params) {
1485
+ return wp.ajax.post( 'sek_get_revision_history', {
1486
+ nonce: api.settings.nonce.save,
1487
+ skope_id : params.is_local ? api.czr_skopeBase.getSkopeProperty( 'skope_id' ) : sektionsLocalizedData.globalSkopeId
1488
+ });
1489
+ },
1490
+
1491
+ // @return void()
1492
+ // Fetches the_content and try to set the setting value through normalized ::updateAPISetting method
1493
+ // @params {
1494
+ // is_local : bool//<= 'local_revisions' === input.id
1495
+ // revision_post_id : int
1496
+ // }
1497
+ setSingleRevision : function(params) {
1498
+ var self = this;
1499
+ var _notify = function( message, type ) {
1500
+ api.previewer.trigger('sek-notify', {
1501
+ notif_id : 'restore-revision-error',
1502
+ type : type || 'info',
1503
+ duration : 10000,
1504
+ message : [
1505
+ '<span style="">',
1506
+ '<strong>',
1507
+ message || '',
1508
+ '</strong>',
1509
+ '</span>'
1510
+ ].join('')
1511
+ });
1512
+ };
1513
+ wp.ajax.post( 'sek_get_single_revision', {
1514
+ nonce: api.settings.nonce.save,
1515
+ //skope_id : api.czr_skopeBase.getSkopeProperty( 'skope_id' ),
1516
+ revision_post_id : params.revision_post_id
1517
+ }).done( function( revision_value ){
1518
+ // If the setting value is unchanged, no need to go further
1519
+ // is_local is decided with the input id => @see revision_history input type.
1520
+ var setId = params.is_local ? self.localSectionsSettingId() : self.getGlobalSectionsSettingId();
1521
+ if ( _.isEqual( api( setId )(), revision_value ) ) {
1522
+ _notify( sektionsLocalizedData.i18n['This is the current version.'], 'info' );
1523
+ return;
1524
+ }
1525
+ // api.infoLog( 'getSingleRevision response', revision_value );
1526
+ // api.infoLog( 'Current val', api(self.localSectionsSettingId())() );
1527
+ self.updateAPISetting({
1528
+ action : 'sek-restore-revision',
1529
+ is_global_location : !params.is_local,//<= will determine which setting will be updated,
1530
+ // => self.getGlobalSectionsSettingId() or self.localSectionsSettingId()
1531
+ revision_value : revision_value
1532
+ }).done( function() {
1533
+ //_notify( sektionsLocalizedData.i18n['The revision has been successfully restored.'], 'success' );
1534
+ api.previewer.refresh();
1535
+ }).fail( function( response ) {
1536
+ api.errare( '::setSingleRevision error when firing ::updateAPISetting', response );
1537
+ _notify( sektionsLocalizedData.i18n['The revision could not be restored.'], 'error' );
1538
+ });
1539
+ //api.previewer.refresh();
1540
+ }).fail( function( response ) {
1541
+ api.errare( '::setSingleRevision ajax error', response );
1542
+ _notify( sektionsLocalizedData.i18n['The revision could not be restored.'], 'error' );
1543
+ });
1544
+ }
1545
+ });//$.extend()
1546
+ })( wp.customize, jQuery );
1547
+ //global sektionsLocalizedData
1548
+ var CZRSeksPrototype = CZRSeksPrototype || {};
1549
  (function ( api, $ ) {
1550
  $.extend( CZRSeksPrototype, {
1551
  // Fired on api 'ready', in reaction to ::setContextualCollectionSettingIdWhenSkopeSet => ::localSectionsSettingId
1595
  // params : params
1596
  // }
1597
  // );
1598
+
1599
+ // Track changes, if not already navigating the logs
1600
+ if ( !_.isObject( params ) || true !== params.navigatingHistoryLogs ) {
1601
+ try { self.trackHistoryLog( sektionSetInstance, params ); } catch(er) {
1602
+ api.errare( 'setupSettingsToBeSaved => trackHistoryLog', er );
1603
+ }
1604
+ }
1605
 
1606
  }, 1000 ) );
1607
  });//api( settingData.collectionSettingId, function( sektionSetInstance ){}
1633
  // });
1634
  },// SetupSettingsToBeSaved()
1635
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1636
  // Fired :
1637
  // 1) when instantiating the setting
1638
  // 2) on each setting change, as an override of api.Value::validate( to ) @see customize-base.js
1785
  _.each( level.collection, function( _l_ ) {
1786
  // Set the parent level now
1787
  parentLevel = $.extend( true, {}, level );
1788
+ if ( ! _.isUndefined( _l_ ) ) {
1789
+ // And walk sub levels
1790
+ _checkWalker_( _l_ );
1791
+ } else {
1792
+ _errorDetected_('validation error => undefined level ' );
1793
+ }
1794
  });
1795
  }
1796
  }
2120
  direction : 'up',
2121
  id : params.id,
2122
  is_nested : ! _.isEmpty( params.in_sektion ) && ! _.isEmpty( params.in_column ),
2123
+ location : params.location,
2124
+ in_column : params.in_column//<= will be used when moving a nested section
2125
  };
2126
  return self.updateAPISetting( apiParams );
2127
  },
2142
  direction : 'down',
2143
  id : params.id,
2144
  is_nested : ! _.isEmpty( params.in_sektion ) && ! _.isEmpty( params.in_column ),
2145
+ location : params.location,
2146
+ in_column : params.in_column//<= will be used when moving a nested section
2147
  };
2148
  return self.updateAPISetting( apiParams );
2149
  },
2459
  // }
2460
  'sek-notify' : function( params ) {
2461
  sendToPreview = false;
2462
+ var notif_id = params.notif_id || 'sek-notify';
2463
  return $.Deferred(function() {
2464
  api.panel( sektionsLocalizedData.sektionsPanelId, function( __main_panel__ ) {
2465
+ api.notifications.add( new api.Notification( notif_id, {
2466
  type: params.type || 'info',
2467
  message: params.message,
2468
  dismissible: true
2469
+ }));
2470
 
2471
  // Removed if not dismissed after 5 seconds
2472
  _.delay( function() {
2473
+ api.notifications.remove( notif_id );
2474
  }, params.duration || 5000 );
2475
  });
2476
  // always pass the local or global skope of the currently customized location id when resolving the promise.
3016
  if ( null !== parentModuleType ) {
3017
  inputDefaultValue = self.getInputDefaultValue( input_id, parentModuleType );
3018
  if ( 'no_default_value_specified' === inputDefaultValue ) {
3019
+ api.infoLog( '::normalizeAndSanitizeSingleItemInputValues => missing default value for input ' + input_id + ' in module ' + parentModuleType );
3020
  }
3021
  }
3022
  if ( isEqualToDefault( _val, inputDefaultValue ) ) {
3619
  anchor : {
3620
  settingControlId : params.id + '__anchor_options',
3621
  module_type : 'sek_level_anchor_module',
3622
+ controlLabel : sektionsLocalizedData.i18n['Custom anchor ( CSS ID ) and CSS classes for the'] + ' ' + sektionsLocalizedData.i18n[params.level],
3623
  icon : '<i class="fas fa-anchor sek-level-option-icon"></i>'
3624
  },
3625
  visibility : {
3928
  registrationParams[ opt_name ] = {
3929
  settingControlId : _id_ + '__local_reset',
3930
  module_type : mod_type,
3931
+ controlLabel : sektionsLocalizedData.i18n['Reset the sections in this page'],
3932
  icon : '<i class="material-icons sek-level-option-icon">cached</i>'
3933
  };
3934
  break;
3935
+ case 'local_revisions' :
3936
+ registrationParams[ opt_name ] = {
3937
+ settingControlId : _id_ + '__local_revisions',
3938
+ module_type : mod_type,
3939
+ controlLabel : sektionsLocalizedData.i18n['Revision history of local sections'],
3940
+ icon : '<i class="material-icons sek-level-option-icon">settings_backup_restore</i>'
3941
+ };
3942
+ break;
3943
  default :
3944
  api.errare('::generateUIforLocalOptions => an option group could not be registered => ' + mod_type, opt_name );
3945
  break;
4126
  icon : '<i class="material-icons sek-level-option-icon">security</i>'
4127
  };
4128
  break;
4129
+ case 'global_revisions' :
4130
+ registrationParams[ opt_name ] = {
4131
+ settingControlId : _id_ + '__global_revisions',
4132
+ module_type : mod_type,
4133
+ controlLabel : sektionsLocalizedData.i18n['Revision history of global sections'],
4134
+ icon : '<i class="material-icons sek-level-option-icon">settings_backup_restore</i>'
4135
+ };
4136
+ break;
4137
  case 'beta_features' :
4138
  registrationParams[ opt_name ] = {
4139
  settingControlId : _id_ + '__beta_features',
4260
  // in_column
4261
  // }
4262
  updateAPISetting : function( params ) {
 
4263
  var self = this,
4264
  __updateAPISettingDeferred__ = $.Deferred();
4265
 
4270
  params.is_global_location = self.isGlobalLocation( params );
4271
 
4272
  var _collectionSettingId_ = params.is_global_location ? self.getGlobalSectionsSettingId() : self.localSectionsSettingId();
4273
+ var _do_update_setting_id = function() {
4274
+ // api( _collectionSettingId_)() = {
 
 
4275
  // collection : [
4276
  // 'loop_start' : { level : location, collection : [ 'sek124' : { collection : [], level : section, options : {} }], options : {}},
4277
  // 'loop_end' : { level : location, collection : [], options : {}}
4280
  // options : {}
4281
  //
4282
  // }
4283
+ var currentSetValue = api( _collectionSettingId_ )(),
4284
  newSetValue = _.isObject( currentSetValue ) ? $.extend( true, {}, currentSetValue ) : self.getDefaultSektionSettingValue( params.is_global_location ? 'global' : 'local' ),
4285
  locationCandidate,
4286
  sektionCandidate,
4292
  //duplication variable
4293
  cloneId, //will be passed in resolve()
4294
  startingModuleValue,// will be populated by the optional starting value specificied on module registration
4295
+ __presetSectionInjected__ = '_not_injection_scenario_',//this property is turned into a $.Deferred() object in a scenario of section injection
4296
  parentSektionCandidate;
4297
 
4298
  // make sure we have a collection array to populate
4501
  break;
4502
 
4503
 
4504
+ // Fired on click on up / down arrows in the section ui menu
4505
+ // This handles the nested sections case
4506
  case 'sek-move-section-up-down' :
4507
  //api.infoLog('PARAMS in sek-move-section-up', params );
4508
+ parentCandidate = self.getLevelModel( params.is_nested ? params.in_column : params.location , newSetValue.collection );
4509
+ if ( _.isEmpty( parentCandidate ) || 'no_match' == parentCandidate ) {
 
 
4510
  throw new Error( 'updateAPISetting => ' + params.action + ' => missing target location' );
4511
  }
4512
+ parentCandidate.collection = _.isArray( parentCandidate.collection ) ? parentCandidate.collection : [];
4513
+ originalCollection = $.extend( true, [], parentCandidate.collection );
4514
+ reorderedCollection = $.extend( true, [], parentCandidate.collection );
4515
 
4516
  var _indexInOriginal = _.findIndex( originalCollection, function( _sec_ ) {
4517
  return _sec_.id === params.id;
4523
 
4524
  // Swap up <=> down
4525
  var direction = params.direction || 'up';
4526
+
4527
+ // prevent absurd movements of a section
4528
+ // this should not happen because up / down arrows are not displayed when section is positionned top / bottom
4529
+ // but safer to add it
4530
+ if ( 'up' !== direction && originalCollection.length === _indexInOriginal + 1 ) {
4531
+ throw new Error( 'updateAPISetting => ' + params.action + ' => bottom reached' );
4532
+ } else if ( 'up' === direction && 0 === _indexInOriginal ){
4533
+ throw new Error( 'updateAPISetting => ' + params.action + ' => top reached' );
4534
+ }
4535
+
4536
  reorderedCollection[ _indexInOriginal ] = originalCollection[ 'up' === direction ? _indexInOriginal - 1 : _indexInOriginal + 1 ];
4537
  reorderedCollection[ 'up' === direction ? _indexInOriginal - 1 : _indexInOriginal + 1 ] = originalCollection[ _indexInOriginal ];
4538
+ parentCandidate.collection = reorderedCollection;
 
4539
  break;
4540
 
4541
 
5300
  // this is then used server side in Sek_Dyn_CSS_Handler::sek_get_gfont_print_candidates to build the Google Fonts request
5301
  newSetValue.fonts = currentGfonts;
5302
  break;
5303
+
5304
+ //-------------------------------------------------------------------------------------------------
5305
+ //-- RESTORE A REVISION
5306
+ //-------------------------------------------------------------------------------------------------
5307
+ case 'sek-restore-revision' :
5308
+ //api.infoLog( 'sek-restore-revision', params );
5309
+ newSetValue = params.revision_value;
5310
+ break;
5311
  }// switch
5312
 
5313
 
5317
  if ( 'pending' == __updateAPISettingDeferred__.state() ) {
5318
  var mayBeUpdateSektionsSetting = function() {
5319
  if ( _.isEqual( currentSetValue, newSetValue ) ) {
5320
+ __updateAPISettingDeferred__.reject( 'updateAPISetting => the new setting value is unchanged when firing action : ' + params.action );
 
 
5321
  } else {
5322
  if ( null !== self.validateSettingValue( newSetValue ) ) {
5323
+ api( _collectionSettingId_ )( newSetValue, params );
5324
  // Add the cloneId to the params when we resolve
5325
  // the cloneId is only needed in the duplication scenarii
5326
  params.cloneId = cloneId;
5332
  }
5333
  };//mayBeUpdateSektionsSetting()
5334
 
5335
+ // For all scenarios but section injection, we can update the sektion setting now
5336
+ // otherwise we need to wait for the injection to be processed asynchronously
5337
+ // CRITICAL => __updateAPISettingDeferred__ has to be resolved / rejected
5338
+ // otherwise this can lead to scenarios where a change is not taken into account in ::updateAPISettingAndExecutePreviewActions
5339
+ // like in https://github.com/presscustomizr/nimble-builder/issues/373
5340
+ if ( '_not_injection_scenario_' === __presetSectionInjected__ ) {
5341
  mayBeUpdateSektionsSetting();
5342
+ // At this point the __updateAPISettingDeferred__ obj can't be in a 'pending' state
5343
+ if ( 'pending' === __updateAPISettingDeferred__.state() ) {
5344
+ api.errare( '::updateAPISetting => The __updateAPISettingDeferred__ promise has not been resolved properly.');
5345
+ }
5346
  } else {
5347
  __presetSectionInjected__
5348
  .done( function() {
5349
  mayBeUpdateSektionsSetting();
5350
+ // At this point the __updateAPISettingDeferred__ obj can't be in a 'pending' state
5351
+ if ( 'pending' === __updateAPISettingDeferred__.state() ) {
5352
+ api.errare( '::updateAPISetting => The __updateAPISettingDeferred__ promise has not been resolved properly.');
5353
+ }
5354
  })
5355
  .fail( function( _er_ ) {
5356
  api.errare( 'updateAPISetting => __presetSectionInjected__ failed', _er_ );
5357
  });
5358
  }
5359
  }
5360
+ };//_do_update_setting_id()
5361
+
5362
+
5363
+ // Update the sektion collection
5364
+ api( _collectionSettingId_, function( sektionSetInstance ) {
5365
+ _do_update_setting_id();
5366
+ });
5367
  return __updateAPISettingDeferred__.promise();
5368
  },//updateAPISetting
5369
 
8439
  // For example, a content picker can be given params to display only taxonomies
8440
  // the default input_event_map can also be overriden in this callback
8441
  $.extend( api.czrInputMap, {
 
8442
  // FONT AWESOME ICON PICKER
8443
  fa_icon_picker : function() {
8444
  var input = this,
9634
  });
9635
  }
9636
  });//$.extend( api.czrInputMap, {})
9637
+ })( wp.customize, jQuery, _ );//global sektionsLocalizedData
9638
+ ( function ( api, $, _ ) {
9639
+ // all available input type as a map
9640
+ api.czrInputMap = api.czrInputMap || {};
9641
+
9642
+ // the input id determine if we fetch the revision history of the local or global setting
9643
+ $.extend( api.czrInputMap, {
9644
+ revision_history : function( params ) {
9645
+ var input = this;
9646
+ _selected_found = false;
9647
+ //generates the options
9648
+ var _generateOptions = function( revisionHistory ) {
9649
+ if ( input.container.find('.sek-revision-history').length > 0 )
9650
+ return;
9651
+ if ( _.isEmpty( revisionHistory ) ) {
9652
+ input.container.append( [ '<i>', sektionsLocalizedData.i18n['No revision history available for the moment.'], '</i>' ].join('') );
9653
+ return;
9654
+ }
9655
+ input.container.append( $('<select/>', {
9656
+ class : 'sek-revision-history',
9657
+ html : [ '<option value="_select_">', ' -', sektionsLocalizedData.i18n['Select'], '- ', '</option>'].join('')
9658
+ }));
9659
+
9660
+ // The revisions are listed by ascending date
9661
+ // => let's reverse the order so that we see the latest first
9662
+ var optionsNodes = [];
9663
+ _.each( revisionHistory , function( _date, _post_id ) {
9664
+ var _attributes = {
9665
+ value: _post_id,
9666
+ html: _date
9667
+ };
9668
+
9669
+ if ( _attributes.value == input() ) {
9670
+ $.extend( _attributes, { selected : "selected" } );
9671
+ _selected_found = true;
9672
+ }
9673
+ optionsNodes.unshift( $('<option>', _attributes) );
9674
+ });
9675
+
9676
+ // Add the 'published' note to the first node
9677
+ optionsNodes[0].html( [ optionsNodes[0].html(), sektionsLocalizedData.i18n['(currently published version)'] ].join(' ') );
9678
+ _.each( optionsNodes, function( nod ) {
9679
+ $( 'select.sek-revision-history', input.container ).append( nod );
9680
+ });
9681
+
9682
+ // Initialize selecter
9683
+ $( 'select.sek-revision-history', input.container ).selecter();
9684
+ };//_generateOptions
9685
+
9686
+
9687
+ var _getRevisionHistory = function() {
9688
+ return $.Deferred( function( _dfd_ ) {
9689
+ if ( ! _.isEmpty( input.sek_revisionHistory ) ) {
9690
+ _dfd_.resolve( input.sek_revisionHistory );
9691
+ } else {
9692
+ // The revision history sent by the server is an object
9693
+ // {
9694
+ // post_id : date,
9695
+ // post_id : date,
9696
+ // ...
9697
+ // }
9698
+ api.czr_sektions.getRevisionHistory( { is_local : 'local_revisions' === input.id } ).done( function( revisionHistory ) {
9699
+ // Ensure we have a string that's JSON.parse-able
9700
+ if ( !_.isObject(revisionHistory) ) {
9701
+ throw new Error( '_getRevisionHistory => server list is not a object');
9702
+ }
9703
+ input.sek_revisionHistory = revisionHistory;
9704
+ _dfd_.resolve( input.sek_revisionHistory );
9705
+ }).fail( function( _r_ ) {
9706
+ _dfd_.reject( _r_ );
9707
+ });
9708
+ }
9709
+ //return dfd.promise();
9710
+ });
9711
+ };//_getRevisionHistory
9712
+
9713
+ // do
9714
+ var _do_ = function( params ) {
9715
+ if ( true === input.revisionHistorySet )
9716
+ return;
9717
+ $.when( _getRevisionHistory() ).done( function( revisionHistory ) {
9718
+ _generateOptions( revisionHistory );
9719
+ if ( params && true === params.open_on_init ) {
9720
+ // let's open select2 after a delay ( because there's no 'ready' event with select2 )
9721
+ _.delay( function() {
9722
+ try{ $( 'select[data-czrtype]', input.container ).czrSelect2('open'); }catch(er) {}
9723
+ }, 100 );
9724
+ }
9725
+ }).fail( function( _r_ ) {
9726
+ api.errare( '_getRevisionHistory => fail response =>', _r_ );
9727
+ });
9728
+ input.revisionHistorySet = true;
9729
+ };
9730
+
9731
+ // Generate options and open select2
9732
+ input.container.on('change', '.sek-revision-history', function() {
9733
+ var _val = $(this).val();
9734
+ if ( '_select_' !== _val ) {
9735
+ api.czr_sektions.setSingleRevision( { revision_post_id : _val, is_local : 'local_revisions' === input.id } );
9736
+ }
9737
+ });
9738
+
9739
+ // schedule the revisionHistorySet after a delay
9740
+ _.delay( function() { _do_( { open_on_init : false } );}, 1000 );
9741
+
9742
+ }//revision_history
9743
+ });//$.extend( api.czrInputMap, {})
9744
  })( wp.customize, jQuery, _ );//global sektionsLocalizedData, serverControlParams
9745
  //extends api.CZRDynModule
9746
  /* ------------------------------------------------------------------------- *
10993
  });
10994
  })( wp.customize , jQuery, _ );//global sektionsLocalizedData, serverControlParams
10995
  //extends api.CZRDynModule
10996
+ ( function ( api, $, _ ) {
10997
+ //provides a description of each module
10998
+ //=> will determine :
10999
+ //1) how to initialize the module model. If not crud, then the initial item(s) model shall be provided
11000
+ //2) which js template(s) to use : if crud, the module template shall include the add new and pre-item elements.
11001
+ // , if crud, the item shall be removable
11002
+ //3) how to render : if multi item, the item content is rendered when user click on edit button.
11003
+ // If not multi item, the single item content is rendered as soon as the item wrapper is rendered.
11004
+ //4) some DOM behaviour. For example, a multi item shall be sortable.
11005
+ api.czrModuleMap = api.czrModuleMap || {};
11006
+ $.extend( api.czrModuleMap, {
11007
+ sek_local_revisions : {
11008
+ //mthds : Constructor,
11009
+ crud : false,
11010
+ name : api.czr_sektions.getRegisteredModuleProperty( 'sek_local_revisions', 'name' ),
11011
+ has_mod_opt : false,
11012
+ ready_on_section_expanded : true,
11013
+ defaultItemModel : _.extend(
11014
+ { id : '', title : '' },
11015
+ api.czr_sektions.getDefaultItemModelFromRegisteredModuleData( 'sek_local_revisions' )
11016
+ )
11017
+ },
11018
+ });
11019
+ })( wp.customize , jQuery, _ );//global sektionsLocalizedData, serverControlParams
11020
+ //extends api.CZRDynModule
11021
  ( function ( api, $, _ ) {
11022
  var Constructor = {
11023
  initialize: function( id, options ) {
11355
  });
11356
  })( wp.customize , jQuery, _ );//global sektionsLocalizedData, serverControlParams
11357
  //extends api.CZRDynModule
11358
+ ( function ( api, $, _ ) {
11359
+ api.czrModuleMap = api.czrModuleMap || {};
11360
+ $.extend( api.czrModuleMap, {
11361
+ sek_global_revisions : {
11362
+ //mthds : Constructor,
11363
+ crud : false,
11364
+ name : api.czr_sektions.getRegisteredModuleProperty( 'sek_global_revisions', 'name' ),
11365
+ has_mod_opt : false,
11366
+ ready_on_section_expanded : true,
11367
+ defaultItemModel : _.extend(
11368
+ { id : '', title : '' },
11369
+ api.czr_sektions.getDefaultItemModelFromRegisteredModuleData( 'sek_global_revisions' )
11370
+ )
11371
+ },
11372
+ });
11373
+ })( wp.customize , jQuery, _ );//global sektionsLocalizedData, serverControlParams
11374
+ //extends api.CZRDynModule
11375
  ( function ( api, $, _ ) {
11376
  //provides a description of each module
11377
  //=> will determine :
assets/czr/sek/js/ccat-sek-control.min.js CHANGED
@@ -1 +1 @@
1
- var CZRSeksPrototype=CZRSeksPrototype||{};!function(r,s){s.extend(CZRSeksPrototype,{initialize:function(){var e=this;if(_.isUndefined(window.sektionsLocalizedData))throw new Error("CZRSeksPrototype => missing localized server params sektionsLocalizedData");if(!_.isFunction(r.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.defaultLocalSektionSettingValue=e.getDefaultSektionSettingValue("local"),e.localSectionsSettingId=new r.Value({}),e.registered=new r.Value([]),r.bind("ready",function(){e.doSektionThinksOnApiReady()}),r.bind("save-request-params",function(e){s.extend(e,{local_skope_id:r.czr_skopeBase.getSkopeProperty("skope_id")})})},doSektionThinksOnApiReady:function(){var o=this;o.registerAndSetupDefaultPanelSectionOptions(),o.localSectionsSettingId.callbacks.add(function(e,t){try{o.setupSettingsToBeSaved()}catch(e){r.errare("Error in self.localSectionsSettingId.callbacks => self.setupSettingsToBeSaved()",e)}o.initializeHistoryLogWhenSettingsRegistered(),r.previewer.send("sek-request-active-locations")});var i=function(e,t){o.setContextualCollectionSettingIdWhenSkopeSet(e,t),r.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"})}))})}),r.section(o.SECTION_ID_FOR_GLOBAL_OPTIONS,function(e){!0!==e.nimbleGlobalOptionGenerated&&(o.generateUI({action:"sek-generate-global-options-ui"}),e.nimbleGlobalOptionGenerated=!0)}),r.trigger("nimble-ready-for-current-skope")};_.isEmpty(r.czr_activeSkopes().local)||i(),r.czr_activeSkopes.callbacks.add(function(e,t){i(e,t)}),o.reactToPreviewMsg(),o.setupDnd(),o.setupTinyMceEditor(),o.schedulePrintSectionJson(),o.bind("sek-ui-removed",function(){r.previewedDevice("desktop")}),r.previewedDevice.bind(function(t){var e=_.filter(o.registered(),function(e){return"control"==e.what});_.each(e||[],function(e){r.control(e.id,function(e){e.container.find('[data-sek-device="'+t+'"]').each(function(){s(this).trigger("click")})})})}),s("#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")&&r.control(e.id,function(e){e.container.find("[draggable]").each(function(){s(this).off("dragstart dragend")})}),"control"==e.what&&r.control(e.id,function(e){e.container.find("select").each(function(){_.isUndefined(s(this).data("czrSelect2"))||s(this).czrSelect2("destroy")})})}),r.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=s.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 r.Value([]),r.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 r.Value,o.lastClickedTargetInPreview.bind(function(e,t){_.isObject(e)&&e.id?r.previewer.send("sek-set-double-click-target",e):r.previewer.send("sek-reset-double-click-target"),clearTimeout(s(window).data("_preview_target_timer_")),s(window).data("_preview_target_timer_",setTimeout(function(){o.lastClickedTargetInPreview({}),r.previewer.send("sek-reset-double-click-target")},2e4))}),r.previewer.bind("sek-clean-target-drop-zone",function(){o.lastClickedTargetInPreview({})}),s(document).keydown(function(e){e&&27===e.keyCode&&o.lastClickedTargetInPreview({})})},registerAndSetupDefaultPanelSectionOptions:function(){var n=this,e=r.Panel.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}});r.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)}})}),r.CZR_Helpers.register({origin:"nimble",what:"panel",id:sektionsLocalizedData.sektionsPanelId,title:sektionsLocalizedData.i18n["Nimble Builder"],priority:-1e3,constructWith:e,track:!1}),r.CZR_Helpers.register({origin:"nimble",what:"section",id:n.SECTION_ID_FOR_GLOBAL_OPTIONS,title:sektionsLocalizedData.i18n["Site wide options"],panel:sektionsLocalizedData.sektionsPanelId,priority:20,track:!1,constructWith:r.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){r.section(n.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>'),n.scheduleModuleAccordion.call(e)})}),r.CZR_Helpers.register({origin:"nimble",what:"section",id:n.SECTION_ID_FOR_LOCAL_OPTIONS,title:sektionsLocalizedData.i18n["Current page options"],panel:sektionsLocalizedData.sektionsPanelId,priority:10,track:!1,constructWith:r.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){r.section(n.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>'),n.scheduleModuleAccordion.call(e)})}),r.CZR_Helpers.register({origin:"nimble",what:"setting",id:sektionsLocalizedData.optNameForGlobalOptions,dirty:!1,value:sektionsLocalizedData.globalOptionDBValues,transport:"refresh",type:"option"}),r.CZR_Helpers.register({origin:"nimble",what:"section",id:n.SECTION_ID_FOR_CONTENT_PICKER,title:sektionsLocalizedData.i18n["Content Picker"],panel:sektionsLocalizedData.sektionsPanelId,priority:30,track:!1,constructWith:r.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){r.section(n.SECTION_ID_FOR_CONTENT_PICKER,function(e){"resolved"!=r.czr_initialSkopeCollectionPopulated.state()?r.czr_initialSkopeCollectionPopulated.done(function(){r.previewer.trigger("sek-pick-content",{focus:!1})}):r.previewer.trigger("sek-pick-content",{focus:!1})})})},setContextualCollectionSettingIdWhenSkopeSet:function(e,t){t=t||{},!_.isEmpty(t.local)&&r.panel(sektionsLocalizedData.sektionsPanelId).expanded()&&r.previewer.trigger("sek-pick-content"),sektionsData=r.czr_skopeBase.getSkopeProperty("sektions","local"),sektionsLocalizedData.isDevMode&&r.infoLog("::setContextualCollectionSettingIdWhenSkopeSet => SEKTIONS DATA ? ",sektionsData),_.isEmpty(sektionsData)&&r.errare("::setContextualCollectionSettingIdWhenSkopeSet() => no sektionsData"),_.isEmpty(sektionsData.setting_id)&&r.errare("::setContextualCollectionSettingIdWhenSkopeSet() => missing setting_id"),this.localSectionsSettingId(sektionsData.setting_id)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(r,s){s.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(s(window).data("_scroll_move_timer_")),s(window).data("_scroll_move_timer_",setTimeout(function(){t.mouseMovedRecently.set({})},4e3))};s(window).on("mousemove scroll,",_.throttle(e,50)),r.previewer.bind("ready",function(){s(r.previewer.targetWindow().document).on("mousemove scroll,",_.throttle(e,50))}),t.setupLevelTree()},toggleTopBar:function(e){e=!!_.isUndefined(e)||e;var t,i=this;e?s.when(i.renderAndSetupTopBarTmpl({})).done(function(e){i.topBarContainer=e,_.delay(function(){s("body").addClass("nimble-top-bar-visible")},200)}):(t=s.Deferred(),s("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<s(i.topBarId).length)return s(i.topBarId);try{t=wp.template("nimble-top-bar")({})}catch(e){return r.errare("Error when parsing the the top note template",e),!1}s("#customize-preview").after(s(t)),s(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)}}),s(".sek-add-content",i.topBarId).on("click",function(e){e.preventDefault(),r.previewer.trigger("sek-pick-content",{content_type:"module"})}),s(".sek-level-tree",i.topBarId).on("click",function(e){e.preventDefault(),i.levelTreeExpanded(!i.levelTreeExpanded())}),s("[data-nimble-history]",i.topBarId).on("click",function(e){try{i.navigateHistory(s(this).data("nimble-history"))}catch(e){r.errare("Error when firing self.navigateHistory",e)}}),s(".sek-settings",i.topBarId).on("click",function(e){r.panel(sektionsLocalizedData.sektionsPanelId,function(e){i.rootPanelFocus(),e.focus()})}),s(".sek-nimble-doc",i.topBarId).on("click",function(e){e.preventDefault(),window.open(s(this).data("doc-href"),"_blank")});var n=function(e){s(i.topBarId).length<1||(_.isObject(e)&&e.local_template&&"default"!==e.local_template?s(i.topBarId).find(".sek-notifications").html(['<span class="fas fa-info-circle"></span>',sektionsLocalizedData.i18n["This page uses a custom template."]].join(" ")):s(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()}),s(i.topBarId)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{navigateHistory:function(i){var t,n,o,r,e=this,s=d.extend(!0,[],e.historyLog()),a=[];if(_.each(s,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),{navigatingHistoryLogs:!0}),_.isEmpty(r.global)||l(e.getGlobalSectionsSettingId())(e.validateSettingValue(r.global),{navigatingHistoryLogs:!0});l.previewer.refresh(),l.previewer.trigger("sek-pick-content",{}),e.cleanRegistered(),e.cleanRegisteredLevelSettingsAfterHistoryNavigation()}var c=_.findKey(s,{status:"current"});c=Number(c),_.isNumber(c)?(_.each(s,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":s.length>c+1&&(t===c?newLog.status="previous":t===c+1&&(newLog.status="current"))}a.push(newLog)}),e.historyLog(a)):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(),s=this.localSectionsSettingId(),a=sektionsLocalizedData.optNameForGlobalOptions,c=!1;if(_.each([r,s,a],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(s)(),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(a)(),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,s=!1;if(!_.isArray(e)||_.isEmpty(e))return b.errare("::buildLevelTree => invalid collection param",e),r;var a='<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)&&(s=!_.contains(i.activeLocations(),e.id)),s||(sektionsLocalizedData.i18n[n]&&(o=sektionsLocalizedData.i18n[n]),!0===e.is_nested&&(o=sektionsLocalizedData.i18n["nested section"]),a="location"!==n?a:"",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,")",a].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(a,c){c.extend(CZRSeksPrototype,{setupSaveUI:function(){var n=this;n.saveUIVisible=new a.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 s=this;try{_tmpl=wp.template("nimble-top-save-ui")({})}catch(e){return a.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,{},s.getLevelModel(c("#sek-saved-section-id").val())),i=c("#sek-saved-section-title").val(),n=c("#sek-saved-section-description").val(),o=s.guid(),r=s.preProcessSektion(t);if(_.isEmpty(i))return c("#sek-saved-section-title").addClass("error"),void a.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:a.settings.nonce.save,sek_title:i,sek_description:n,sek_id:o,sek_data:JSON.stringify(r)}).done(function(e){a.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){a.errorLog("ajax sek_save_section => error",e),a.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(),s.saveUIVisible(!1)}),c("#nimble-top-save-ui")}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(a,c){c.extend(CZRSeksPrototype,{setupSettingsToBeSaved:function(){var i,o=this,e={local:{collectionSettingId:o.localSectionsSettingId()},global:{collectionSettingId:o.getGlobalSectionsSettingId()}};_.each(e,function(e,t){if(i=a.czr_skopeBase.getSkopeProperty("sektions",t).db_values,_.isEmpty(e.collectionSettingId))throw new Error("setupSettingsToBeSaved => the collectionSettingId is invalid");if(!a.has(e.collectionSettingId)){a.CZR_Helpers.register({what:"setting",id:e.collectionSettingId,value:o.validateSettingValue(_.isObject(i)?i:o.getDefaultSektionSettingValue(t)),transport:"postMessage",type:"option",track:!1,origin:"nimble"});a(e.collectionSettingId,function(n){n.bind(_.debounce(function(e,t,i){o.trackHistoryLog(n,i)},1e3))})}})},trackHistoryLog:function(e,t){var i=e.id===this.getGlobalSectionsSettingId();if(t&&!0!==t.navigatingHistoryLogs){var n,o=[],r=c.extend(!0,[],this.historyLog());_.isEmpty(t.in_sektion)?_.isEmpty(t.to_sektion)||(n=t.to_sektion):n=t.in_sektion,_.each(r,function(e){"future"!=e.status&&(c.extend(e,{status:"previous"}),o.push(e))}),o.push({status:"current",value:i?{global:e()}:{local:e()},action:_.isObject(t)&&t.action||"",sektionToRefresh:n}),this.historyLog(o)}},initializeHistoryLogWhenSettingsRegistered:function(){this.historyLog=new a.Value([{status:"current",value:{local:a(this.localSectionsSettingId())(),global:a(this.getGlobalSectionsSettingId())()},action:"initial"}]),this.historyLog.bind(function(e){if(!_.isEmpty(e)){var t=_.findKey(e,{status:"current"});t=Number(t),c("#nimble-top-bar").find("[data-nimble-history]").each(function(){"undo"===c(this).data("nimble-history")?c(this).attr("data-nimble-state",t<=0?"disabled":"enabled"):c(this).attr("data-nimble-state",e.length<=t+1?"disabled":"enabled")})}})},validateSettingValue:function(i){if(!_.isObject(i))return a.errare("validation error => the setting should be an object",i),null;var n={},o=!1,e=[],r=function(e){a.errare(e,i),a.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("")}),o=!0},s=function(t){if(!o)if(_.isUndefined(t)&&_.isEmpty(n)){if(t=c.extend(!0,{},i),_.isUndefined(t.id)||_.isUndefined(t.level)){if(_.isUndefined(t.collection))return void r("validation error => the root level is missing the collection of locations");if(!_.isEmpty(t.level)||!_.isEmpty(t.id))return void r('validation error => the root level should not have a "level" or an "id" property');_.each(i.collection,function(e){n=t,s(e)})}}else{if(_.isEmpty(t.id)||!_.isString(t.id))return void r("validation error => a "+t.level+" level must have a valid id");if(_.contains(e,t.id))return void r("validation error => duplicated level id : "+t.id);if(e.push(t.id),_.isEmpty(t.level)||!_.isString(t.level))return void r("validation error => a "+t.level+" level must have a level property");if(!_.contains(["location","section","column","module"],t.level))return void r('validation error => the level "'+t.level+'" is not authorized');if("module"==t.level){if(!_.isUndefined(t.collection))return void r("validation error => a module can not have a collection property")}else if(_.isUndefined(t.collection))return void r("validation error => missing collection property for level => "+t.level+" "+t.id);switch(_.isUndefined(t.ver_ini)&&a.errare("validateSettingValue() => validation error => a "+t.level+' should have a version property : "ver_ini"'),t.level){case"location":if(!_.isEmpty(n.level))return void r("validation error => the parent of location "+t.id+" should have no level set");break;case"section":if(t.is_nested&&"column"!=n.level)return void r("validation error => the nested section "+t.id+" must be child of a column");if(!t.is_nested&&"location"!=n.level)return void r("validation error => the section "+t.id+" must be child of a location");break;case"column":if("section"!=n.level)return void r("validation error => the column "+t.id+" must be child of a section");break;case"module":if("column"!=n.level)return void r("validation error => the module "+t.id+" must be child of a column")}"module"!=t.level&&_.each(t.collection,function(e){n=c.extend(!0,{},t),s(e)})}};return s(),o?null:i},resetCollectionSetting:function(){if(_.isEmpty(this.localSectionsSettingId()))throw new Error("setupSettingsToBeSaved => the collectionSettingId is invalid");a(this.localSectionsSettingId())(this.getDefaultSektionSettingValue("local")),a.previewer.refresh(),a.notifications.remove("sek-notify"),a.panel(sektionsLocalizedData.sektionsPanelId,function(e){a.notifications.add(new a.Notification("sek-reset-done",{type:"success",message:sektionsLocalizedData.i18n["Reset complete"],dismissible:!0})),_.delay(function(){a.notifications.remove("sek-reset-done")},5e3)})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,n){n.extend(CZRSeksPrototype,{reactToPreviewMsg:function(){var o=this,r={},s={},a=!0,e={"sek-add-section":{callback:function(e){return a=!!_.isUndefined(e.send_to_preview)||e.send_to_preview,s={},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 a=!0,s={},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 a=!0,s={},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(a=!0,s={},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(a=!0,s={},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 a=!1,s={},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},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 a=!1,s={},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},o.updateAPISetting(r)},complete:function(e){c.previewer.trigger("sek-refresh-level",{level:"location",id:e.apiParams.location})}},"sek-duplicate":{callback:function(e){switch(a=!0,s={},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 a=!0,s={},r=e,o.updateAPISetting(r)},"sek-add-content-in-new-sektion":{callback:function(e){switch(a=!!_.isUndefined(e.send_to_preview)||e.send_to_preview,s={},(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 a=!1,s={},(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}),a=!0,r={},s={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(s)},"sek-edit-options":function(e){return a=!0,r={},_.isEmpty(e.id)?n.Deferred(function(){this.reject("missing id")}):(s={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(s))},"sek-edit-module":function(e){return a=!0,r={},s={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(s)},"sek-notify":function(t){return a=!1,n.Deferred(function(){c.panel(sektionsLocalizedData.sektionsPanelId,function(e){c.notifications.add(new c.Notification("sek-notify",{type:t.type||"info",message:t.message,dismissible:!0})),_.delay(function(){c.notifications.remove("sek-notify")},t.duration||5e3)}),this.resolve({is_global_location:o.isGlobalLocation(t)})})},"sek-refresh-level":function(t){return a=!0,n.Deferred(function(e){r={action:"sek-refresh-level",level:t.level,id:t.id},s={},e.resolve({is_global_location:o.isGlobalLocation(t)})})},"sek-refresh-stylesheet":function(t){return a=!0,t=t||{},n.Deferred(function(e){r={id:t.id},s={},e.resolve({is_global_location:o.isGlobalLocation(t)})})},"sek-toggle-save-section-ui":function(t){return a=!1,o.saveUIVisible(!0,t),n.Deferred(function(e){r={},s={},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||{},a?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:s,cloneId:!_.isEmpty(e.cloneId)&&e.cloneId}):c.previewer.trigger([n,"done"].join("_"),{apiParams:r,uiParams:s}),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(k,y){y.extend(CZRSeksPrototype,{generateUI:function(e){var t=this,i=y.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){k.errare("::generateUI() => error",e),i=y.Deferred()}break;case"sek-generate-level-options-ui":try{i=t.generateUIforLevelOptions(e,i)}catch(e){k.errare("::generateUI() => error",e),i=y.Deferred()}break;case"sek-generate-draggable-candidates-picker-ui":t.cleanRegistered();try{i=t.generateUIforDraggableContent(e,i)}catch(e){k.errare("::generateUI() => error",e),i=y.Deferred()}break;case"sek-generate-local-skope-options-ui":t.cleanRegistered();try{i=t.generateUIforLocalSkopeOptions(e,i)}catch(e){k.errare("::generateUI() => error",e),i=y.Deferred()}break;case"sek-generate-global-options-ui":t.cleanRegistered();try{i=t.generateUIforGlobalOptions(e,i)}catch(e){k.errare("::generateUI() => error",e),i=y.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 s=n.settingParams.args.moduleRegistrationParams.control,a=n.settingParams.args.moduleRegistrationParams.id,c=s.czr_Module(a);if(_.isEmpty(c)?k.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))k.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;_.isUndefined(f)||(l=r.getInputRegistrationParams(f,t),_.isUndefined(l.refresh_stylesheet)||(d=Boolean(l.refresh_stylesheet)),_.isUndefined(l.refresh_markup)||(u=Boolean(l.refresh_markup)),_.isUndefined(l.refresh_fonts)||(p=Boolean(l.refresh_fonts)),_.isUndefined(l.refresh_preview)||(m=Boolean(l.refresh_preview)));var g=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&&k.previewer.send("sek-refresh-stylesheet",{location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:k.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:k.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-refresh-stylesheet",id:n.uiParams.id,level:n.uiParams.level}}),!0===u&&k.previewer.send("sek-refresh-level",{location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:k.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:k.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-refresh-level",id:n.uiParams.id,level:n.uiParams.level},skope_id:k.czr_skopeBase.getSkopeProperty("skope_id")}),!0===m&&k.previewer.refresh()});if(_.isEmpty(n.options_type))k.errare("updateAPISettingAndExecutePreviewActions => error when updating the global options => missing options_type");else{var e=k(sektionsLocalizedData.optNameForGlobalOptions)(),t=y.extend(!0,{},_.isObject(e)?e:{}),i={};_.each(o||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(i[t]=e)}),t[n.options_type]=i,k(sektionsLocalizedData.optNameForGlobalOptions)(t)}};if(!0===p){var h=n.settingParams.args.input_value;if(!_.isString(h))return void k.errare("updateAPISettingAndExecutePreviewActions => font-family must be a string",h);-1<h.indexOf("gfont")?r.updateAPISetting({action:"sek-update-fonts",font_family:h,is_global_location:r.isGlobalLocation(n.uiParams)}).always(function(){g().then(function(){r.updateAPISetting({action:"sek-update-fonts",is_global_location:r.isGlobalLocation(n.uiParams)})})}):g()}else g()}}else k.errare("updateAPISettingAndExecutePreviewActions => missing params.settingParams.args.moduleRegistrationParams The api main setting can not be updated",n)}else k.errare("updateAPISettingAndExecutePreviewActions => missing params.settingParams.to. The api main setting can not be updated",n)},normalizeAndSanitizeSingleItemInputValues:function(e,o){var i,r={},n={},s=null,a=this;return _.each(e,function(e,t){var i,n;_.contains(["title","id"],t)||(null!==o&&"no_default_value_specified"===(s=a.getInputDefaultValue(t,o))&&k.infoLog("::updateAPISettingAndExecutePreviewActions => missing default value for input "+t+" in module "+o),i=e,n=s,(_.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(a.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"tiny_mce_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=k.control.has(t):(i=!0,1<e.length&&k.errare("generateUI => why is this control registered more than once ? => "+t)),i}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(s,a){a.extend(CZRSeksPrototype,{generateUIforDraggableContent:function(o,e){var r=this,t={};a.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:!0,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&&a.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&&a.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)?s.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){s.has(n.settingControlId)||(s(n.settingControlId,function(e){e.bind(function(e,t){s.errare("generateUIforDraggableContent => the setting() should not changed")})}),s.CZR_Helpers.register({origin:"nimble",level:o.level,what:"setting",id:n.settingControlId,dirty:!1,value:n.settingValue||{},transport:"postMessage",type:"_nimble_ui_"})),s.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(){s.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")})})})},s.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}),r._maybeFetchSectionsFromServer()})),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(d,u){u.extend(CZRSeksPrototype,{generateUIforFrontModules:function(r,e){var s=this;_.isEmpty(r.id)&&e.reject("generateUI => missing id");var i=s.getLevelProperty({property:"value",id:r.id}),t=s.getLevelProperty({property:"module_type",id:r.id}),n=s.getRegisteredModuleProperty(t,"name");_.isEmpty(t)&&e.reject("generateUI => module => invalid module_type");var o={};if(!0===s.getRegisteredModuleProperty(t,"is_father")){var a=s.getRegisteredModuleProperty(t,"children");if(_.isEmpty(a))throw new Error("::generateUIforFrontModules => a father module "+t+" is missing children modules ");_.each(a,function(e,t){o[t]={settingControlId:r.id+"__"+t,module_type:e,controlLabel:s.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 s.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))}}):(s.cleanRegistered(),_do_register_=function(){_.each(o,function(n,o){if(!d.has(n.settingControlId)){var t=function(e,t,i){try{s.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,s.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>'),s.scheduleModuleAccordion.call(e,{expand_first_control:!0})})),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{generateUIforLevelOptions:function(s,e){var a=this,c=a.getLevelProperty({property:"options",id:s.id});c=_.isObject(c)?c:{};var t={};d.extend(t,{bg:{settingControlId:s.id+"__bg_options",module_type:"sek_level_bg_module",controlLabel:sektionsLocalizedData.i18n["Background settings for the"]+" "+sektionsLocalizedData.i18n[s.level],expandAndFocusOnInit:!0,icon:'<i class="material-icons sek-level-option-icon">gradient</i>'},border:{settingControlId:s.id+"__border_options",module_type:"sek_level_border_module",controlLabel:sektionsLocalizedData.i18n["Borders settings for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="material-icons sek-level-option-icon">rounded_corner</i>'},spacing:{settingControlId:s.id+"__spacing_options",module_type:"sek_level_spacing_module",controlLabel:sektionsLocalizedData.i18n["Padding and margin settings for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="material-icons sek-level-option-icon">center_focus_weak</i>'},anchor:{settingControlId:s.id+"__anchor_options",module_type:"sek_level_anchor_module",controlLabel:sektionsLocalizedData.i18n["Set a custom anchor ( CSS ID ) for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="fas fa-anchor sek-level-option-icon"></i>'},visibility:{settingControlId:s.id+"__visibility_options",module_type:"sek_level_visibility_module",controlLabel:sektionsLocalizedData.i18n["Device visibility settings for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="far fa-eye sek-level-option-icon"></i>'},height:{settingControlId:s.id+"__height_options",module_type:"sek_level_height_module",controlLabel:sektionsLocalizedData.i18n["Height and vertical alignment for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="fas fa-ruler-vertical sek-level-option-icon"></i>'}}),"section"===s.level&&(d.extend(t,{width:{settingControlId:s.id+"__width_options",module_type:"sek_level_width_section",controlLabel:sektionsLocalizedData.i18n["Width settings for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'}}),d.extend(t,{breakpoint:{settingControlId:s.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"===s.level&&d.extend(t,{width:{settingControlId:s.id+"__width_options",module_type:"sek_level_width_module",controlLabel:sektionsLocalizedData.i18n["Width settings for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'}});var i=_.keys(t)[0],n=t[i].settingControlId;return a.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))}}):(a.cleanRegistered(),_do_register_=function(){_.each(t,function(n,o){if(a.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{a.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh_stylesheet",uiParams:s,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,a.SETTING_UPDATE_BUFFER))});var e=c[o]||{},i=a.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:s.level,what:"setting",id:n.settingControlId,dirty:!1,value:e,transport:"postMessage",type:"_nimble_ui_"})}l.CZR_Helpers.register({origin:"nimble",level:s.level,level_id:s.id,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:s.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(s.id)||l.section(s.id,function(e){a.scheduleModuleAccordion.call(e,{expand_first_control:!0})}),l.CZR_Helpers.register({origin:"nimble",what:"section",id:s.id,title:sektionsLocalizedData.i18n["Settings for the"]+" "+s.level,panel:sektionsLocalizedData.sektionsPanelId,priority:10}).done(function(){}),l.section(s.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(d,u){u.extend(CZRSeksPrototype,{getLocalSkopeOptionId:function(){var e=d.czr_skopeBase.getSkopeProperty("skope_id");return _.isEmpty(e)?(d.errare("czr_sektions::getLocalSkopeOptionId => empty skope_id "),""):sektionsLocalizedData.optPrefixForSektionsNotSaved+e+"__localSkopeOptions"},generateUIforLocalSkopeOptions:function(c,e){var l=this,i=l.getLocalSkopeOptionId();if(l.isUIControlAlreadyRegistered(i))return e;var n={};return _.isUndefined(sektionsLocalizedData.localOptionsMap)||!_.isObject(sektionsLocalizedData.localOptionsMap)?d.errare("::generateUIforGlobalOptions => missing or invalid localOptionsMap"):(_.each(sektionsLocalizedData.localOptionsMap,function(e,t){switch(t){case"template":n[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&&(n[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":n[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":n[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":n[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":n[t]={settingControlId:i+"__local_reset",module_type:e,controlLabel:sektionsLocalizedData.i18n["Remove the sections in this page"],icon:'<i class="material-icons sek-level-option-icon">cached</i>'};break;default:d.errare("::generateUIforLocalOptions => an option group could not be registered => "+e,t)}}),_do_register_=function(){_.each(n,function(n,o){if(!d.has(n.settingControlId)){var t=function(e,t,i){try{l.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh",uiParams:c,options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){d.errare("::generateUIforLocalSkopeOptions => Error in updateAPISettingAndExecutePreviewActions",e)}};d(n.settingControlId,function(e){e.bind(_.debounce(t,l.SETTING_UPDATE_BUFFER))});var e=l.getModuleStartingValue(n.module_type),i=d(l.localSectionsSettingId())(),r=u.extend(!0,{},_.isObject(i.local_options)?i.local_options:{}),s=_.isObject(r[o])?r[o]:{};if("no_starting_value"!==e&&_.isObject(e)){var a=u.extend(!0,{},e);s=u.extend(a,s)}d.CZR_Helpers.register({origin:"nimble",level:c.level,what:"setting",id:n.settingControlId,dirty:!1,value:s,transport:"postMessage",type:"_nimble_ui_"})}d.CZR_Helpers.register({origin:"nimble",level:c.level,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:l.SECTION_ID_FOR_LOCAL_OPTIONS,priority:10,settings:{default:n.settingControlId}}).done(function(){d.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 c=this,i=sektionsLocalizedData.optPrefixForSektionsNotSaved+sektionsLocalizedData.optNameForGlobalOptions;if(c.isUIControlAlreadyRegistered(i))return e;var n={};return _.isUndefined(sektionsLocalizedData.globalOptionsMap)||!_.isObject(sektionsLocalizedData.globalOptionsMap)?l.errare("::generateUIforGlobalOptions => missing or invalid globalOptionsMap"):(_.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"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)}}),_do_register_=function(){_.each(n,function(n,o){if(!l.has(n.settingControlId)){var t=function(e,t,i){try{c.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,c.SETTING_UPDATE_BUFFER))});var e=sektionsLocalizedData.globalOptionDBValues,i=c.getModuleStartingValue(n.module_type),r=_.isObject(e)&&!_.isEmpty(e[o])?e[o]:{};if("no_starting_value"!==i&&_.isObject(i)){var s=d.extend(!0,{},i);r=d.extend(s,r)}l.CZR_Helpers.register({origin:"nimble",level:a.level,what:"setting",id:n.settingControlId,dirty:!1,value:r,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:c.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(K,X){X.extend(CZRSeksPrototype,{updateAPISetting:function(q){var Y=this,J=X.Deferred();(q=q||{}).is_global_location=Y.isGlobalLocation(q);var e=q.is_global_location?Y.getGlobalSectionsSettingId():Y.localSectionsSettingId();return K(e,function(e){var n,t,o,i,r,s,a,c,l,d=e(),u=_.isObject(d)?X.extend(!0,{},d):Y.getDefaultSektionSettingValue(q.is_global_location?"global":"local"),p=!1;switch(u.collection=_.isArray(u.collection)?u.collection:Y.getDefaultSektionSettingValue(q.is_global_location?"global":"local").collection,q.action){case"sek-add-section":if(_.isEmpty(q.id))throw new Error("updateAPISetting => "+q.action+" => missing id");if(_.isEmpty(q.location))throw new Error("updateAPISetting => "+q.action+" => missing location");if(!0===q.is_nested){if(o=Y.getLevelModel(q.in_column,u.collection),"no_match"==(l=Y.getLevelModel(q.in_sektion,u.collection))){J.reject("updateAPISetting => "+q.action+" => no grand parent sektion found");break}if(!0===l.is_nested){J.reject(sektionsLocalizedData.i18n["You've reached the maximum number of allowed nested sections."]);break}if("no_match"==o){K.errare("updateAPISetting => "+q.action+" => no parent column matched"),J.reject("updateAPISetting => "+q.action+" => no parent column matched");break}o.collection=_.isArray(o.collection)?o.collection:[],o.collection.push({id:q.id,level:"section",collection:[{id:sektionsLocalizedData.optPrefixForSektionsNotSaved+Y.guid(),level:"column",collection:[],ver_ini:sektionsLocalizedData.nimbleVersion}],is_nested:!0,ver_ini:sektionsLocalizedData.nimbleVersion})}else{if("no_match"==(n=Y.getLevelModel(q.location,u.collection))){K.errare("updateAPISetting => "+q.action+" => no location matched"),J.reject("updateAPISetting => "+q.action+" => no location matched");break}n.collection=_.isArray(n.collection)?n.collection:[],_.each(n.collection,function(e,t){q.before_section===e.id&&(L=t),q.after_section===e.id&&(L=t+1)}),n.collection=_.isArray(n.collection)?n.collection:[],n.collection.splice(L,0,{id:q.id,level:"section",collection:[{id:sektionsLocalizedData.optPrefixForSektionsNotSaved+Y.guid(),level:"column",collection:[],ver_ini:sektionsLocalizedData.nimbleVersion}],ver_ini:sektionsLocalizedData.nimbleVersion})}break;case"sek-duplicate-section":if(_.isEmpty(q.id))throw new Error("updateAPISetting => "+q.action+" => missing id");if(_.isEmpty(q.location))throw new Error("updateAPISetting => "+q.action+" => missing location");var m;try{m=Y.cloneLevel(q.id)}catch(e){K.errare("updateAPISetting => "+q.action,e);break}var f=Y.getLevelPositionInCollection(q.id,u.collection);if(!0===q.is_nested){if("no_match"==(o=Y.getLevelModel(q.in_column,u.collection))){K.errare("updateAPISetting => "+q.action+" => no parent column matched"),J.reject("updateAPISetting => "+q.action+" => no parent column matched");break}o.collection=_.isArray(o.collection)?o.collection:[],o.collection.splice(parseInt(f+1,10),0,m)}else{if("no_match"==(n=Y.getLevelModel(q.location,u.collection))){K.errare("updateAPISetting => "+q.action+" => no location matched"),J.reject("updateAPISetting => "+q.action+" => no location matched");break}n.collection=_.isArray(n.collection)?n.collection:[],n.collection.splice(parseInt(f+1,10),0,m)}a=m.id;break;case"sek-remove-section":if(!0===q.is_nested)"no_match"!=(o=Y.getLevelModel(q.in_column,u.collection))?(o.collection=_.isArray(o.collection)?o.collection:[],o.collection=_.filter(o.collection,function(e){return e.id!=q.id})):K.errare("updateAPISetting => "+q.action+" => no parent column matched");else{if("no_match"==(n=Y.getLevelModel(q.location,u.collection))){K.errare("updateAPISetting => "+q.action+" => no location matched"),J.reject("updateAPISetting => "+q.action+" => no location matched");break}n.collection=_.filter(n.collection,function(e){return e.id!=q.id})}break;case"sek-move-section":var g,h,k=Y.getLevelModel(q.to_location,u.collection);if(_.isEmpty(k)||"no_match"==k)throw new Error("updateAPISetting => "+q.action+" => missing target location");if(q.from_location!=q.to_location){var y=Y.getLevelModel(q.from_location,u.collection);if(_.isEmpty(y)||"no_match"==y)throw new Error("updateAPISetting => "+q.action+" => missing source location");y.collection=_.isArray(y.collection)?y.collection:[],g=Y.getLevelModel(q.id,y.collection),h=X.extend(!0,{},g),y.collection=_.filter(y.collection,function(e){return e.id!=q.id})}k.collection=_.isArray(k.collection)?k.collection:[],r=X.extend(!0,[],k.collection),s=[],_.each(q.newOrder,function(e){if(q.from_location!=q.to_location&&e==h.id)s.push(h);else{if(t=Y.getLevelModel(e,r),_.isEmpty(t)||"no_match"==t)throw new Error("updateAPISetting => "+q.action+" => missing section candidate");s.push(t)}}),k.collection=s;break;case"sek-move-section-up-down":if(inLocationCandidate=Y.getLevelModel(q.location,u.collection),_.isEmpty(inLocationCandidate)||"no_match"==inLocationCandidate)throw new Error("updateAPISetting => "+q.action+" => missing target location");inLocationCandidate.collection=_.isArray(inLocationCandidate.collection)?inLocationCandidate.collection:[],r=X.extend(!0,[],inLocationCandidate.collection),s=X.extend(!0,[],inLocationCandidate.collection);var v=_.findIndex(r,function(e){return e.id===q.id});if(-1===v)throw new Error("updateAPISetting => "+q.action+" => invalid index");var b=q.direction||"up";s[v]=r["up"===b?v-1:v+1],s["up"===b?v-1:v+1]=r[v],inLocationCandidate.collection=s;break;case"sek-add-column":if(_.isEmpty(q.id))throw new Error("updateAPISetting => "+q.action+" => missing id");if("no_match"==(t=Y.getLevelModel(q.in_sektion,u.collection))){K.errare("updateAPISetting => "+q.action+" => no parent sektion matched"),J.reject("updateAPISetting => "+q.action+" => no parent sektion matched");break}if(t.collection=_.isArray(t.collection)?t.collection:[],Y.MAX_NUMBER_OF_COLUMNS-1<_.size(t.collection)){J.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:q.id,level:"column",collection:[],ver_ini:sektionsLocalizedData.nimbleVersion});break;case"sek-remove-column":if("no_match"!=(t=Y.getLevelModel(q.in_sektion,u.collection))){if(1===_.size(t.collection)){J.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!=q.id}),_.each(t.collection,function(e){e.width=""})}else K.errare("updateAPISetting => "+q.action+" => no parent sektion matched");break;case"sek-duplicate-column":if(_.isEmpty(q.id))throw new Error("updateAPISetting => "+q.action+" => missing id");if("no_match"==(t=Y.getLevelModel(q.in_sektion,u.collection))){K.errare("updateAPISetting => "+q.action+" => no parent sektion matched"),J.reject("updateAPISetting => "+q.action+" => no parent sektion matched");break}if(t.collection=_.isArray(t.collection)?t.collection:[],Y.MAX_NUMBER_OF_COLUMNS-1<_.size(t.collection)){J.reject(sektionsLocalizedData.i18n["You've reached the maximum number of columns allowed in this section."]);break}var z;try{z=Y.cloneLevel(q.id)}catch(e){K.errare("updateAPISetting => "+q.action,e);break}var I=Y.getLevelPositionInCollection(q.id,u.collection);a=z.id,t.collection.splice(parseInt(I+1,10),0,z),_.each(t.collection,function(e){e.width=""});break;case"sek-resize-columns":if(q.col_number<2)break;var w=Y.getLevelModel(q.resized_column,u.collection),M=Y.getLevelModel(q.sister_column,u.collection);if("no_match"==w){K.errare("updateAPISetting => "+q.action+" => no resized column matched"),J.reject("updateAPISetting => "+q.action+" => no resized column matched");break}w.width=parseFloat(q.resizedColumnWidthInPercent);var C=Y.getLevelModel(q.in_sektion,u.collection),S=_.filter(C.collection,function(e){return e.id!=w.id&&e.id!=M.id}),D=parseFloat(w.width.toFixed(3));_.isEmpty(S)||_.each(S,function(e){currentColWidth=parseFloat(1*e.width),(!_.has(e,"width")||!_.isNumber(1*currentColWidth)||_.isEmpty(currentColWidth+"")||currentColWidth<1)&&(e.width=parseFloat((100/q.col_number).toFixed(3))),D=parseFloat((D+e.width).toFixed(3))}),M.width=parseFloat((100-D).toFixed(3));break;case"sek-move-column":var P,x,E=Y.getLevelModel(q.to_sektion,u.collection);if(_.isEmpty(E)||"no_match"==E)throw new Error("updateAPISetting => "+q.action+" => missing target sektion");if(q.from_sektion!=q.to_sektion){var R=Y.getLevelModel(q.from_sektion,u.collection);if(_.isEmpty(R)||"no_match"==R)throw new Error("updateAPISetting => "+q.action+" => missing source column");R.collection=_.isArray(R.collection)?R.collection:[],P=Y.getLevelModel(q.id,R.collection),x=X.extend(!0,{},P),R.collection=_.filter(R.collection,function(e){return e.id!=q.id}),_.each(R.collection,function(e){e.width=""})}E.collection=_.isArray(E.collection)?E.collection:[],r=X.extend(!0,[],E.collection),s=[],_.each(q.newOrder,function(e){if(q.from_sektion!=q.to_sektion&&e==x.id)s.push(x);else{if(o=Y.getLevelModel(e,r),_.isEmpty(o)||"no_match"==o)throw new Error("updateAPISetting => moveColumn => missing columnCandidate");s.push(o)}}),E.collection=s,_.each(E.collection,function(e){e.width=""});break;case"sek-add-module":if(_.isEmpty(q.id))throw new Error("updateAPISetting => "+q.action+" => missing id");if(_.isEmpty(q.module_type))throw new Error("updateAPISetting => "+q.action+" => missing module_type");if("no_match"===(o=Y.getLevelModel(q.in_column,u.collection))){K.errare("updateAPISetting => "+q.action+" => no parent column matched"),J.reject("updateAPISetting => "+q.action+" => no parent column matched");break}var L=0;o.collection=_.isArray(o.collection)?o.collection:[],_.each(o.collection,function(e,t){q.before_module===e.id&&(L=t),q.after_module===e.id&&(L=t+1)});var O={id:q.id,level:"module",module_type:q.module_type,ver_ini:sektionsLocalizedData.nimbleVersion};"no_starting_value"!==(c=Y.getModuleStartingValue(q.module_type))&&(O.value=c),o.collection.splice(L,0,O);break;case"sek-duplicate-module":if(_.isEmpty(q.id))throw new Error("updateAPISetting => "+q.action+" => missing id");if("no_match"==(o=Y.getLevelModel(q.in_column,u.collection))){K.errare("updateAPISetting => "+q.action+" => no parent column matched"),J.reject("updateAPISetting => "+q.action+" => no parent column matched");break}var A;o.collection=_.isArray(o.collection)?o.collection:[];try{A=Y.cloneLevel(q.id)}catch(e){K.errare("updateAPISetting => "+q.action,e),J.reject("updateAPISetting => "+q.action+" => error when cloning the level");break}var Z=Y.getLevelPositionInCollection(q.id,u.collection);a=A.id,o.collection.splice(parseInt(Z+1,10),0,A);break;case"sek-remove-module":if(_.isEmpty(q.id))throw new Error("updateAPISetting => "+q.action+" => missing id");"no_match"!=(o=Y.getLevelModel(q.in_column,u.collection))?(o.collection=_.isArray(o.collection)?o.collection:[],o.collection=_.filter(o.collection,function(e){return e.id!=q.id})):K.errare("updateAPISetting => "+q.action+" => no parent column matched");break;case"sek-move-module":var T,j,V;if(T=Y.getLevelModel(q.to_column,u.collection),_.isEmpty(T)||"no_match"==T)throw new Error("updateAPISetting => "+q.action+" => missing target column");if(q.from_column!=q.to_column){var F;if(F=Y.getLevelModel(q.from_column,u.collection),_.isEmpty(F)||"no_match"==F)throw new Error("updateAPISetting => "+q.action+" => missing source column");F.collection=_.isArray(F.collection)?F.collection:[],j=Y.getLevelModel(q.id,u.collection),V=X.extend(!0,{},j),F.collection=_.filter(F.collection,function(e){return e.id!=q.id})}if(T.collection=_.isArray(T.collection)?T.collection:[],r=X.extend(!0,[],T.collection),s=[],_.each(q.newOrder,function(e){if(q.from_column!=q.to_column&&e==V.id)s.push(V);else{if(i=Y.getLevelModel(e,u.collection),_.isEmpty(i)||"no_match"==i)throw new Error("updateAPISetting => "+q.action+" => missing moduleCandidate");s.push(i)}}),s.length!=_.uniq(s).length)throw new Error("updateAPISetting => "+q.action+" => there are duplicated modules in column : "+T.id);T.collection=s;break;case"sek-set-module-value":i=Y.getLevelModel(q.id,u.collection);var U={};if(_.each(q.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(U[t]=e)}),"no_match"==i){K.errare("updateAPISetting => "+q.action+" => no module matched",q),J.reject("updateAPISetting => "+q.action+" => error no module matched");break}if(_.isEmpty(q.options_type)){K.errare("updateAPISetting => "+q.action+" => missing options_type"),J.reject("updateAPISetting => "+q.action+" => missing options_type");break}"__no_option_group_to_be_updated_by_children_modules__"===q.options_type?i.value=U:(i.value=_.isEmpty(i.value)?{}:i.value,i.value[q.options_type]=U);break;case"sek-generate-level-options-ui":var N=Y.getLevelModel(q.id,u.collection),B={};if("no_match"===N){K.errare("updateAPISetting => "+q.action+" => no parent sektion matched"),J.reject("updateAPISetting => "+q.action+" => no parent sektion matched");break}N.options=N.options||{},_.each(q.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(B[t]=e)}),_.isEmpty(q.options_type)&&K.errare("updateAPISetting => "+q.action+" => missing options_type"),N.options[q.options_type]=B;break;case"sek-generate-local-skope-options-ui":B={};var Q=X.extend(!0,{},_.isObject(u.local_options)?u.local_options:{});if(_.each(q.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(B[t]=e)}),_.isEmpty(q.options_type)||!_.isString(q.options_type))K.errare("updateAPISetting => "+q.action+" => missing options_type");else{var H={};H[q.options_type]=B,u.local_options=X.extend(Q,H)}break;case"sek-add-content-in-new-sektion":if(_.isEmpty(q.id))throw new Error("updateAPISetting => "+q.action+" => missing id");if(L=0,"no_match"==(n=Y.getLevelModel(q.location,u.collection))){K.errare("updateAPISetting => "+q.action+" => no location matched"),J.reject("updateAPISetting => "+q.action+" => no location matched");break}switch(n.collection=_.isArray(n.collection)?n.collection:[],_.each(n.collection,function(e,t){q.before_section===e.id&&(L=t),q.after_section===e.id&&(L=t+1)}),q.content_type){case"module":c=Y.getModuleStartingValue(q.content_id),n.collection.splice(L,0,{id:q.id,level:"section",collection:[{id:sektionsLocalizedData.optPrefixForSektionsNotSaved+Y.guid(),level:"column",collection:[{id:q.droppedModuleId,level:"module",module_type:q.content_id,value:"no_starting_value"!==c?c:null,ver_ini:sektionsLocalizedData.nimbleVersion}],ver_ini:sektionsLocalizedData.nimbleVersion}],ver_ini:sektionsLocalizedData.nimbleVersion});break;case"preset_section":p=X.Deferred();var G=function(e){Y.preparePresetSectionForInjection(e).fail(function(e){J.reject("updateAPISetting => error when preparePresetSectionForInjection => "+q.action+" => "+e),p.reject(e)}).done(function(e){var t=!1;if(!_.isEmpty(q.sektion_to_replace)){var i=Y.getLevelModel(q.sektion_to_replace,u.collection);"no_match"===i&&(K.errare("updateAPISetting => "+q.action+" => no sektionToReplace matched"),J.reject("updateAPISetting => "+q.action+" => no sektionToReplace matched")),t=!0===i.is_nested}t?("no_match"===(o=Y.getLevelModel(q.in_column,u.collection))&&(K.errare("updateAPISetting => "+q.action+" => no parent column matched"),J.reject("updateAPISetting => "+q.action+" => no parent column matched")),o.collection=_.isArray(o.collection)?o.collection:[],_.each(o.collection,function(e,t){q.before_section===e.id&&(L=t),q.after_section===e.id&&(L=t+1)}),o.collection.splice(L,0,{id:q.id,is_nested:!0,level:"section",collection:e.collection,options:e.options||{},ver_ini:sektionsLocalizedData.nimbleVersion})):n.collection.splice(L,0,{id:q.id,level:"section",collection:e.collection,options:e.options||{},ver_ini:sektionsLocalizedData.nimbleVersion}),p.resolve()})};Y.getPresetSectionCollection({is_user_section:q.is_user_section,presetSectionId:q.content_id,section_id:q.id}).fail(function(e){K.errare("updateAPISetting => "+q.action+" => Error with self.getPresetSectionCollection()",e),J.reject("updateAPISetting => "+q.action+" => Error with self.getPresetSectionCollection()")}).done(function(e){_.isObject(e)&&!_.isEmpty(e)||(K.errare("updateAPISetting => "+q.action+" => preset section type not found or empty : "+q.content_id,e),J.reject("updateAPISetting => "+q.action+" => preset section type not found or empty")),G(e)})}break;case"sek-add-preset-section-in-new-nested-sektion":if(_.isEmpty(q.id))throw new Error("updateAPISetting => "+q.action+" => missing id");if(o=Y.getLevelModel(q.in_column,u.collection),"no_match"==(l=Y.getLevelModel(q.in_sektion,u.collection))){J.reject("updateAPISetting => "+q.action+" => no grand parent sektion found");break}if(!0===l.is_nested){J.reject(sektionsLocalizedData.i18n["You've reached the maximum number of allowed nested sections."]);break}if("no_match"==o){K.errare("updateAPISetting => "+q.action+" => no parent column matched"),J.reject("updateAPISetting => "+q.action+" => no parent column matched");break}o.collection=_.isArray(o.collection)?o.collection:[],p=X.Deferred(),G=function(e){Y.preparePresetSectionForInjection(e).fail(function(e){J.reject("updateAPISetting => error when preparePresetSectionForInjection => "+q.action+" => "+e),p.reject(e)}).done(function(e){o.collection.push({id:q.id,level:"section",collection:e.collection,options:e.options||{},is_nested:!0,ver_ini:sektionsLocalizedData.nimbleVersion}),p.resolve()})},Y.getPresetSectionCollection({is_user_section:q.is_user_section,presetSectionId:q.content_id,section_id:q.id}).fail(function(){K.errare("updateAPISetting => "+q.action+" => Error with self.getPresetSectionCollection()",_er_),J.reject("updateAPISetting => "+q.action+" => Error with self.getPresetSectionCollection()")}).done(function(e){_.isObject(e)&&!_.isEmpty(e)||(K.errare("updateAPISetting => "+q.action+" => preset section type not found or empty : "+q.content_id,e),J.reject("updateAPISetting => "+q.action+" => preset section type not found or empty")),G(e)});break;case"sek-update-fonts":var W=Y.sniffGFonts({is_global_location:q&&!0===q.is_global_location});if(!_.isEmpty(q.font_family)&&_.isString(q.font_family)&&!_.contains(W,q.font_family)){if(q.font_family.indexOf("gfont")<0){K.errare("updateAPISetting => "+q.action+" => error => must be a google font, prefixed gfont"),J.reject("updateAPISetting => "+q.action+" => error => must be a google font, prefixed gfont");break}W.push(q.font_family)}u.fonts=W}if("pending"==J.state()){var $=function(){_.isEqual(d,u)?sektionsLocalizedData.isDevMode&&J.reject("updateAPISetting => the new setting value is unchanged when firing action : "+q.action):null!==Y.validateSettingValue(u)?(e(u,q),q.cloneId=a,J.resolve(q)):J.reject("Validation problem for action "+q.action)};!1===p?$():p.done(function(){$()}).fail(function(e){K.errare("updateAPISetting => __presetSectionInjected__ failed",e)})}}),J.promise()},_maybeFetchSectionsFromServer:function(t){var e,i=X.Deferred();return!0===(t=t||{is_user_section:!1}).is_user_section?_.isEmpty(K.sek_userSavedSections)||_.isEmpty(K.sek_userSavedSections[t.preset_section_id])?(K.sek_userSavedSections=K.sek_userSavedSections||{},_.isUndefined(K.sek_fetchingUserSavedSections)||"pending"!=K.sek_fetchingUserSavedSections.state()?(e=wp.ajax.post("sek_get_user_saved_sections",{nonce:K.settings.nonce.save,preset_section_id:t.preset_section_id}),K.sek_fetchingUserSavedSections=e):e=K.sek_fetchingUserSavedSections,e.done(function(e){K.sek_userSavedSections[t.preset_section_id]=e,i.resolve(K.sek_userSavedSections)}).fail(function(e){i.reject(e)})):i.resolve(K.sek_userSavedSections):_.isEmpty(K.sek_presetSections)?(_.isUndefined(K.sek_fetchingPresetSections)||"pending"!=K.sek_fetchingPresetSections.state()?(e=wp.ajax.post("sek_get_preset_sections",{nonce:K.settings.nonce.save}),K.sek_fetchingPresetSections=e):e=K.sek_fetchingPresetSections,e.done(function(e){K.sek_presetSections=e,i.resolve(K.sek_presetSections)}).fail(function(e){i.reject(e)})):i.resolve(K.sek_presetSections),i.promise()},getPresetSectionCollection:function(r){var s=this,a=X.Deferred();return s._maybeFetchSectionsFromServer({is_user_section:r.is_user_section,preset_section_id:r.presetSectionId}).fail(function(e){a.reject(e)}).done(function(e){var t=X.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+s.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),a.resolve(i)}),a.promise()},preparePresetSectionForInjection:function(o){var i=this,n={},r=X.Deferred(),s=function(e){return _.each(e,function(e,t){_.isObject(e)||_.isArray(e)?s(e):_.isString(e)&&-1!=e.indexOf("::img-path::")&&(_.has(n,e)||(n[e]=i.importAttachment(e.replace("::img-path::",""))))}),n},a=function(i,n){return _.each(i,function(e,t){_.isObject(e)||_.isArray(e)?a(e,n):_.isString(e)&&-1!=e.indexOf("::img-path::")&&_.has(n,e)&&_.isObject(n[e])&&(i[t]=n[e].id)}),o};return i.whenAllPromisesInParallel(s(o)).done(function(e){var t=a(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()||[]);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)},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 s=this,a="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,{},s.getDefaultSektionSettingValue(n));e=_.isArray(r.collection)?r.collection:[]}return _.each(e,function(e){"no_match"==a&&(t===e.id?a=e:_.isArray(e.collection)&&c(t,e.collection,i,n))}),a};return _.isEmpty(n)?_.each({local:s.localSectionsSettingId(),global:s.getGlobalSectionsSettingId()},function(e,t){"no_match"===a&&c(i,n,e,t)}):c(i,n),a},isGlobalLocation:function(e){var t=!1;return e=e||{},_.has(e,"is_global_location")?t=e.is_global_location:_.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,s=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=s(t,e.collection)))}),i};return"no_match"!==s(e)},getLevelPositionInCollection:function(i,n){var s=this,a="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,{},s.getDefaultSektionSettingValue(o));e=_.isArray(r.collection)?r.collection:[]}_.each(e,function(e,t){"no_match"==a&&(i===e.id?a=t:_.isArray(e.collection)&&c(i,e.collection,n,o))})};return _.isEmpty(n)?_.each({local:s.localSectionsSettingId(),global:s.getGlobalSectionsSettingId()},function(e,t){"no_match"===a&&c(i,e,t,n)}):c(i,n),a},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=[],s=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))&&s(i,n,e)})};return(e=e||{is_global_location:!1}).is_global_location?s(o.getGlobalSectionsSettingId(),"global"):s(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));e=_.isUndefined(e)?t.choices:e,!_.isEmpty(e)&&_.isObject(e)?(_.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()):l.errare("api.czr_sektions.setupSelectInput => missing select options for input id => "+n.id+" in image module")},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",{rel_path: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(a,m){m.extend(CZRSeksPrototype,{setupDnd:function(){var t=this;t.bind("sek-refresh-dragzones",function(e){!0!="draggable"in document.createElement("span")&&a.panel(sektionsLocalizedData.sektionsPanelId,function(e){a.notifications.add(new a.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(){a.notifications.remove("drag-drop-support")},1e4)}),t.setupNimbleDragZones(e.input_container)}),a.previewer.bind("ready",function(){try{t.setupNimbleDropZones()}catch(e){a.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(){a.notifications.add(new a.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(){a.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){a.panel(sektionsLocalizedData.sektionsPanelId,function(e){a.notifications.add(new a.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(){a.notifications.remove("drag-drop-support")},1e4)})}m(this).addClass("sek-dragged"),m("body").addClass("sek-dragging"),a.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"),a.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?(a.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(),a.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),a.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)),s=(Math.abs(o.top-i),Math.abs(n-(o.right-(o.right-o.left)/2))),a=(o.right,o.left,r<50),c=s<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=s,t=r,Math.sqrt(e*e+t*t))}),m(this).removeClass("sek-drag-is-in"),(a||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:a.errare("::dnd_getPreDropElementContent => invalid content type provided")}return i},dnd_getDropZonesElements:function(){return m(a.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"),s=!0===i.closest('[data-sek-level="location"]').data("sek-is-footer-location"),a="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||s)&&a?(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):s&&"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){a.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,s=i.right,a=i.top,c=i.bottom;return r<=n&&n-r<=s-r&&(a<=o&&o-a<=c-a)},dnd_onDrop:function(e,t){t.stopPropagation();this.dnd_getPosition(e,t),e.index();a.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"),s=o.data("sek-id");if(_.isEmpty(r)||_.isEmpty(s))throw new Error("No valid level id found");a.previewer.trigger("sek-add-module",{level:r,id:s,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":a.previewer.trigger("sek-add-content-in-new-sektion",e);break;case"preset-section-in-a-nested-section-to-create":a.previewer.trigger("sek-add-preset-section-in-new-nested-sektion",e);break;case"content-in-empty-location":a.previewer.trigger("sek-add-content-in-new-sektion",e);break;default:a.errare("sek control panel => ::reactToDrop => invalid drop case : "+i)}}(e)}catch(e){a.errare("error when reactToDrop",e)}})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(r,s){s.extend(CZRSeksPrototype,{setupTinyMceEditor:function(){var n=this;r.sekEditorExpanded=new r.Value(!1),r.sekEditorSynchronizedInput=new r.Value,n.editorEventsListenerSetup=!1;var o=function(){r.sekTinyMceEditor=r.sekTinyMceEditor||tinyMCE.get("czr-customize-content_editor"),!1===n.editorEventsListenerSetup&&(n.attachEventsToEditor(),n.editorEventsListenerSetup=!0,n.trigger("sek-tiny-mce-editor-bound-and-instantiated"))};n.bind("sek-edit-module_done",function(e){if(("tiny_mce_editor"===(e=_.isObject(e)?e:{}).clicked_input_type||"czr_tiny_mce_editor_module"===e.module_type)&&!_.isEmpty(e.syncedTinyMceInputId)){var i=e.id;if(!0===n.getRegisteredModuleProperty(e.module_type,"is_father")){var t=n.getRegisteredModuleProperty(e.module_type,"children");if(_.isEmpty(t))throw new Error("::generateUIforFrontModules => a father module "+e.module_type+" is missing children modules ");_.each(t,function(e,t){"czr_tinymce_child"===e&&(i=i+"__"+t)})}r.sekEditorSynchronizedInput({control_id:i,input_id:e.syncedTinyMceInputId}),r.sekEditorExpanded(!0),r.sekTinyMceEditor.focus()}}),s("#customize-theme-controls").on("click",'[data-czr-action="open-tinymce-editor"]',function(){var e=s(this).data("czr-control-id"),t=s(this).data("czr-input-id");if(_.isEmpty(e)||_.isEmpty(t))r.errare("toggle-tinymce-editor => missing input or control id");else{var i=s.extend(!0,{},r.sekEditorSynchronizedInput()),n=_.extend(i,{input_id:t,control_id:e});r.sekEditorSynchronizedInput(n),r.sekEditorExpanded(!0),r.sekTinyMceEditor.focus()}}),r.sekEditorSynchronizedInput.bind(function(n,e){o(),r(n.control_id,function(e){var t=e(),i=_.isObject(t)&&!_.isEmpty(t[n.input_id])?t[n.input_id]:"";i=i.replace(/\r?\n/g,"<br/>");try{r.sekTinyMceEditor.setContent(i)}catch(e){r.errare("Error when setting the tiny mce editor content in setupTinyMceEditor",e)}r.sekTinyMceEditor.focus()})}),r.sekEditorExpanded.bind(function(e,t,i){o(),e&&r.sekTinyMceEditor.focus(),s(document.body).toggleClass("czr-customize-content_editor-pane-open",e),s(window)[e?"on":"off"]("resize",function(){r.sekEditorExpanded()&&_.delay(function(){n.czrResizeEditor(window.innerHeight-n.$editorPane.height())},50)}),e?n.czrResizeEditor(window.innerHeight-n.$editorPane.height()):(n.$preview.css("bottom",""),n.$collapseSidebar.css("bottom",""))}),s("#czr-customize-content_editor-pane").on("click",'[data-czr-action="close-tinymce-editor"]',function(){r.sekEditorExpanded(!1)}),s("#customize-controls").on("click",function(e){"open-tinymce-editor"!=s(e.target).data("czr-action")&&r.sekEditorExpanded(!1,{context:"clicked anywhere"})}),s(document).on("keydown",_.throttle(function(e){27===e.keyCode&&r.sekEditorExpanded(!1)},50)),n.bind("sek-tiny-mce-editor-bound-and-instantiated",function(){var e=s(r.sekTinyMceEditor.iframeElement).contents().get(0);s(e).on("keydown",_.throttle(function(e){27===e.keyCode&&r.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?r.previewer.bind(e,function(){r.sekEditorExpanded(!1)}):r.previewer.bind(e,function(e){r.sekEditorExpanded("czr_tiny_mce_editor_module"===e.module_type)})})},attachEventsToEditor:function(){var t=this;t.$editorTextArea=s("#czr-customize-content_editor"),t.$editorPane=s("#czr-customize-content_editor-pane"),t.$editorDragbar=s("#czr-customize-content_editor-dragbar"),t.$editorFrame=s("#czr-customize-content_editor_ifr"),t.$mceTools=s("#wp-czr-customize-content_editor-tools"),t.$mceToolbar=t.$editorPane.find(".mce-toolbar-grp"),t.$mceStatusbar=t.$editorPane.find(".mce-statusbar"),t.$preview=s("#customize-preview"),t.$collapseSidebar=s(".collapse-sidebar"),r.sekTinyMceEditor.on("input change keyup",function(e){if(r.control.has(r.sekEditorSynchronizedInput().control_id))try{r.control(r.sekEditorSynchronizedInput().control_id).trigger("tinyMceEditorUpdated",{input_id:r.sekEditorSynchronizedInput().input_id,html_content:r.sekTinyMceEditor.getContent(),modified_editor_element:r.sekTinyMceEditor})}catch(e){r.errare("Error when triggering tinyMceEditorUpdated",e)}}),t.$editorTextArea.on("input",function(e){try{r.control(r.sekEditorSynchronizedInput().control_id).trigger("tinyMceEditorUpdated",{input_id:r.sekEditorSynchronizedInput().input_id,html_content:t.$editorTextArea.val(),modified_editor_element:t.$editorTextArea})}catch(e){r.errare("Error when triggering tinyMceEditorUpdated",e)}}),s("#czr-customize-content_editor-pane").on("mousedown mouseup",function(e){if(("mousedown"!==e.type||"czr-customize-content_editor-dragbar"===s(e.target).attr("id")||s(e.target).hasClass("czr-resize-handle"))&&r.sekEditorExpanded())switch(e.type){case"mousedown":s(document).on("mousemove.czr-customize-content_editor",function(e){e.preventDefault(),s(document.body).addClass("czr-customize-content_editor-pane-resize"),t.$editorFrame.css("pointer-events","none"),t.czrResizeEditor(e.pageY)});break;case"mouseup":s(document).off("mousemove.czr-customize-content_editor"),s(document.body).removeClass("czr-customize-content_editor-pane-resize"),t.$editorFrame.css("pointer-events","")}})},czrResizeEditor:function(e){var t,i=this,n=window.innerHeight,o=(window.innerWidth,{});r.sekEditorExpanded()&&(_.isNaN(e)||(t=n-e),o.height=t,o.components=i.$mceTools.outerHeight()+i.$mceToolbar.outerHeight()+i.$mceStatusbar.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),i.$editorFrame.css("height",o.height-o.components),i.$collapseSidebar.css("bottom",n-o.height<56?i.$mceStatusbar.outerHeight()+4:o.height+8))}})}(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 s=o();o.initial_unit="px",u.isEmpty(s)||(o.initial_unit=u.isEmpty(s.unit)?"px":s.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,s=d(".sek-spacing-wrapper",r.container),t=l.czr_sektions.getInputRegistrationParams(r.id,r.module.module_type),a=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,{},a);t=u.isObject(t)?d.extend(i,t):i;var n=c(t,e);d("[data-sek-spacing]",s).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)),s.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,s,a),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,s);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,a,c){n.czrInputMap=n.czrInputMap||{},a.extend(n.czrInputMap,{bg_position:function(e){var t=this;a(".sek-bg-pos-wrapper",t.container).on("change",'input[type="radio"]',function(e){t(a(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 s=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?s(e,i[n+1]):{}},i=function(e){var t=a.extend(!0,{},c.isObject(o())?o():{}),i=a.extend(!0,{},r);t=c.isObject(t)?a.extend(i,t):i;var n=s(t,e);o.container.find('input[value="'+n+'"]').attr("checked",!0).trigger("click",{previewed_device_switched:!0})};a(".sek-bg-pos-wrapper",o.container).on("change",'input[type="radio"]',function(e){var t,i=a(this).val();(t=a.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",s=l(i,o.container);c.czr_sektions.maybeSetupDeviceSwitcherForInput.call(o);var a=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?a(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=a(t,e);s.find(".selected").removeClass("selected"),s.find('div[data-sek-align="'+n+'"]').addClass("selected")};s.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"),s.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 a=this,o=a.input_parent,n=function(e,t){o();var n=c('select[data-czrtype="'+a.id+'"]',a.container);l.isNull(a())||l.isEmpty(a())?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,s,i=c("<optgroup>",{label:e.title,html:(t=e.list,r=e.type,s="",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(""):"")==a()?s+='<option selected="selected" value="'+n+'">'+o+"</option>":s+='<option value="'+n+'">'+o+"</option>"}),s)});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",a.container).css(r(a()))},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=s(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"}},s=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:a.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,s,a){r.czrInputMap=r.czrInputMap||{},s.extend(r.czrInputMap,{fa_icon_picker:function(){var n=this,o=!1,e=function(t){!0!==n.iconCollectionSet&&(s.when(s.Deferred(function(t){a.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){a.each(e,function(e){var t={value:e,html:r.CZR_Helpers.capitalize(e.substring(7))};t.value==n()&&(s.extend(t,{selected:"selected"}),o=!0),s("select[data-czrtype]",n.container).append(s("<option>",t))});var t,i=function(e){return e.id?s('<span class="'+e.element.value+'"></span><span class="social-name">&nbsp;&nbsp;'+e.text+"</span>"):e.text};t=o?s("<option>"):s("<option>",{selected:"selected"}),s("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&&a.delay(function(){try{s("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()}),a.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"),s=r.data("editor-params");wp.codeEditor&&(p.isUndefined(s)||!1!==s)&&(t=s),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{a(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 a=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(a,c,l){a.czrInputMap=a.czrInputMap||{},c.extend(a.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"),s=function(e){return l.contains(["px","em","%"],e)||(a.errare("error : invalid unit for input "+t.id,e),e="px"),e};t.css_unit=new a.Value(l.isEmpty(r)?"px":s(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()+s(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(a,_,m){a.czrInputMap=a.czrInputMap||{},_.extend(a.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"]'),s=function(e){return m.contains(["px","em","%"],e)||(a.errare("range_with_unit_picker_device_switcher => error : invalid unit for input "+c.id,e),e="px"),e},t=a.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),s=(o=r,m.isEmpty(o)||!m.isString(o)?"px":o.replace(/[0-9]|\.|,/g,"")),a=(n=r,m.isEmpty(n)||!m.isString(n)?"16":n.replace(/px|em|%/g,""));_(".sek-unit-wrapper",l).find('[data-sek-unit="'+s+'"]').trigger("click",{previewed_device_switched:!0}),l.find('.sek-ui-button[data-sek-unit="'+s+'"]').addClass("is-selected").attr("aria-pressed",!0),d.val(a).trigger("input",{previewed_device_switched:!0})};a.czr_sektions.maybeSetupDeviceSwitcherForInput.call(c),c.css_unit=new a.Value(m.isEmpty(i())?"px":s(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=a.previewedDevice()||"desktop",o=_(this).val()+s(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){a.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=a.previewedDevice(),i=_.extend(!0,{},m.isObject(c())?c():{});m.isEmpty(i[t])||(i=m.omit(i,t),c(i),n(a.previewedDevice()))}),r.val(d.val()||0);try{n(a.previewedDevice())}catch(e){a.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 a=this,c=h(".sek-borders",a.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 "+a.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(a.id,a.module.module_type),f=k.isEmpty(t)||k.isEmpty(t.default)?{}:t.default;a.cssBorderTypes=["top","left","right","bottom"];var i,n,o=function(){var e=a(),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=a(),t="#000000";return k.isObject(e)&&k.has(e,"_all_")&&k.isObject(e._all_)&&!k.isEmpty(e._all_.col)&&(t=e._all_.col),t},s=function(e){if(!k.contains(k.union(a.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=a(),i={},n=h.extend(!0,{},f);k.isObject(t)?i=h.extend(!0,{},t):k.isString(t)&&(i={_all_:{wght:t}});var o,r,s=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(s)||!k.isObject(s)||k.isEmpty(s.wght)||k.isEmpty(s.col))throw new Error("Error in syncWithBorderType : getCurrentBorderTypeOrAllValue must return an object formed : array( 'wght' => '1px', 'col' => '#000000' )");o=m(s.wght),r=_(s.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(s.col).trigger("change"),u.data("border_type_switched",!1)};a.borderColor=new g.Value(k.isEmpty(r())?"#000000":r()),a.css_unit=new g.Value(k.isEmpty(o())?"px":p(o())),a.borderType=new g.Value("_all_"),l.val((i=a(),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 : "+a.module.module_type+" the initial border width is invalid : "+n),n=1),n)),u.val(a.borderColor()),u.wpColorPicker({palettes:!0,width:1440<=window.innerWidth?271:251,change:function(e,t){h(this).val(t.color.toString()).trigger("colorpickerchange"),a.borderColor(t.color.toString(),{border_type_switched:!0===h(this).data("border_type_switched")})},clear:function(e,t){h(this).val("").trigger("colorpickerchange"),a.borderColor("")}}),a.css_unit.bind(function(e,t,i){(!k.isObject(i)||!0!==i.border_type_switched&&!0!==i.initializing_the_unit)&&l.trigger("input",i)}),a.borderColor.bind(function(e,t,i){(!k.isObject(i)||!0!==i.border_type_switched&&!0!==i.initializing_the_color)&&l.trigger("input",i)}),a.borderType.bind(function(e){try{s(e)}catch(e){g.errare("Error when firing syncWithBorderType for input type borders for module type "+a.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=a.borderType()||"_all_",o=a.borderColor(),r=h(this).val()+p(a.css_unit()),s=h.extend(!0,{},f);(i=h.extend(!0,{},k.isObject(a())?a():s))[n]=h.extend(!0,{},i[n]||s[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(a.cssBorderTypes,function(e){i=k.omit(i,e)}),a(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")),a.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)}a.borderType(i,t)}),a.container.on("click",".sek-reset-button",function(e){var t=a.borderType()||"_all_",i=h.extend(!0,{},k.isObject(a())?a():{});k.isEmpty(i[t])||(i=k.omit(i,t),a(i),s(t))}),d.val(l.val()||0);try{s(a.borderType())}catch(e){g.errare("Error when firing syncWithBorderType for input type borders for module type "+a.module.module_type,e)}h('[data-sek-unit="'+a.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 a=this,c=f(".sek-borders",a.container),l=c.find('input[type="number"]'),s=c.find('input[type="range"]'),d=function(e){return g.contains(["px","em","%"],e)||(m.errare("border_radius => error : invalid unit for input "+a.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(a.id,a.module.module_type),_=g.isEmpty(t)||g.isEmpty(t.default)?{}:t.default;a.cssRadiusTypes=["top_left","top_right","bottom_right","bottom_left"];var i,n,o=function(){var e=a(),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=a(),i={},n=f.extend(!0,{},_);g.isObject(t)?i=f.extend(!0,{},t):g.isString(t)&&(i={_all_:"0px"});var o,r,s=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(s)||!g.isString(s))throw new Error("Error in syncWithRadiusType : getCurrentRadiusTypeOrAllValue must return a string like 3em");o=p(s),r=u(s),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})};a.css_unit=new m.Value(g.isEmpty(o())?"px":d(o())),a.radiusType=new m.Value("_all_"),l.val((i=a(),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 : "+a.module.module_type+" the initial radius is invalid : "+n),n=0),n)),a.css_unit.bind(function(e,t,i){(!g.isObject(i)||!0!==i.radius_type_switched&&!0!==i.initializing_the_unit)&&l.trigger("input",i)}),a.radiusType.bind(function(e){try{r(e)}catch(e){m.errare("Error when firing syncWithRadiusType for input type border_radius for module type "+a.module.module_type,e)}}),s.on("input",function(e){l.val(f(this).val()).trigger("input")}),l.on("input",function(e,t){var i,n=a.radiusType()||"_all_",o=f(this).val()+d(a.css_unit()),r=f.extend(!0,{},_);(i=f.extend(!0,{},g.isObject(a())?a():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(a.cssRadiusTypes,function(e){i=g.omit(i,e)}),a(i)),s.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")),a.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)}a.radiusType(i,t)}),a.container.on("click",".sek-reset-button",function(e){var t=a.radiusType()||"_all_",i=f.extend(!0,{},g.isObject(a())?a():{});g.isEmpty(i[t])||(i=g.omit(i,t),a(i),r(t))}),s.val(l.val()||0);try{r(a.radiusType())}catch(e){m.errare("Error when firing syncWithRadiusType for input type border_radius for module type "+a.module.module_type,e)}f('[data-sek-unit="'+a.css_unit()+'"]',c).trigger("click",{initializing_the_unit:!0})}})}(wp.customize,jQuery,_),function(r,s,a){r.czrInputMap=r.czrInputMap||{},s.extend(r.czrInputMap,{buttons_choice:function(e){var n=this,o=s(".sek-button-choice-wrapper",n.container),t=o.find('input[type="number"]'),i=r.czr_sektions.getInputRegistrationParams(n.id,n.module.module_type);a.isEmpty(i)||a.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),s(this).addClass("is-selected").attr("aria-pressed",!0);try{i=s(this).data("sek-choice")}catch(e){r.errare("buttons_choice input type => error when attaching click event",e)}n(i)}),s('[data-sek-choice="'+n()+'"]',o).trigger("click",{initializing_the_unit:!0})}})}(wp.customize,jQuery,_),function(i,n,e){i.czrInputMap=i.czrInputMap||{},n.extend(i.czrInputMap,{reset_button:function(e){this.container.on("click","[data-sek-reset-scope]",function(e,t){if(e.stopPropagation(),"local"===n(this).data("sek-reset-scope"))try{i.czr_sektions.resetCollectionSetting()}catch(e){i.errare("reset_button => error when firing resetCollectionSetting() on click event",e)}})}})}(wp.customize,jQuery,_),function(o,r,s){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:s.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"),s.each(i.controls(),function(e){s.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=["sek_intro_sec_picker_module","sek_features_sec_picker_module","sek_contact_sec_picker_module","sek_column_layouts_sec_picker_module"];sektionsLocalizedData.isNimbleHeaderFooterEnabled&&(n=i.union(n,["sek_header_sec_picker_module","sek_footer_sec_picker_module"])),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:!0,defaultItemModel:i.extend({id:"",title:""},t.czr_sektions.getDefaultItemModelFromRegisteredModuleData(e))}})}(wp.customize,jQuery,_),function(r,e,s){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="";s.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>",s.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:!0,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,s){var t={initialize:function(e,t){var i=this;i.inputConstructor=r.CZRInput.extend(i.CZRInputMths||{}),i.itemConstructor=r.CZRItem.extend(i.CZRItemConstructor||{}),r.CZRDynModule.prototype.initialize.call(i,e,t)},CZRInputMths:{setupSelect:function(){r.czr_sektions.setupSelectInput.call(this)}},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!s.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":s.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=!s.isEmpty(i()+"")&&r.CZR_Helpers.isChecked(n.czr_Input("bg-apply-overlay")());break;case"bg-parallax-force":e=!s.isEmpty(i()+"")&&r.CZR_Helpers.isChecked(n.czr_Input("bg-parallax")());break;case"bg-scale":case"bg-repeat":e=!s.isEmpty(i()+"")&&!r.CZR_Helpers.isChecked(n.czr_Input("bg-parallax")());break;default:e=!s.isEmpty(i()+"")}return e})}catch(e){r.errare(o.id+" => error in setInputVisibilityDeps",e)}});break;case"bg-apply-overlay":s.each(["bg-color-overlay","bg-opacity-overlay"],function(e){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return!s.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":s.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=!s.isEmpty(n.czr_Input("bg-image")()+"")&&r.CZR_Helpers.isChecked(i());break;case"bg-repeat":case"bg-scale":e=!s.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:s.extend({id:"",title:""},r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_bg_module"))}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){var i=this;i.inputConstructor=n.CZRInput.extend(i.CZRInputMths||{}),i.itemConstructor=n.CZRItem.extend(i.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(i,e,t)},CZRInputMths:{setupSelect:function(){n.czr_sektions.setupSelectInput.call(this)}},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){var i=this;i.inputConstructor=n.CZRInput.extend(i.CZRInputMths||{}),i.itemConstructor=n.CZRItem.extend(i.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(i,e,t)},CZRInputMths:{setupSelect:function(){n.czr_sektions.setupSelectInput.call(this)}},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(n,e,i){var t={initialize:function(e,t){var i=this;i.inputConstructor=n.CZRInput.extend(i.CZRInputMths||{}),i.itemConstructor=n.CZRItem.extend(i.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(i,e,t)},CZRInputMths:{setupSelect:function(){n.czr_sektions.setupSelectInput.call(this)}},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!i.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(e){switch(e.id){case"width-type":n.czr_sektions.scheduleVisibilityOfInputId.call(e,"custom-width",function(){return"custom"===e()}),n.czr_sektions.scheduleVisibilityOfInputId.call(e,"h_alignment",function(){return"custom"===e()})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{sek_level_width_module:{mthds:t,crud:!1,name:n.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:i.extend({id:"",title:""},n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_width_module"))}})}(wp.customize,jQuery,_),function(n,e,i){var t={initialize:function(e,t){var i=this;i.inputConstructor=n.CZRInput.extend(i.CZRInputMths||{}),i.itemConstructor=n.CZRItem.extend(i.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(i,e,t)},CZRInputMths:{setupSelect:function(){n.czr_sektions.setupSelectInput.call(this)}},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!i.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(e){switch(e.id){case"use-custom-outer-width":n.czr_sektions.scheduleVisibilityOfInputId.call(e,"outer-section-width",function(){return e()});break;case"use-custom-inner-width":n.czr_sektions.scheduleVisibilityOfInputId.call(e,"inner-section-width",function(){return e()})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{sek_level_width_section:{mthds:t,crud:!1,name:n.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:i.extend({id:"",title:""},n.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(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),i.CZRDynModule.prototype.initialize.call(this,e,t)}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_local_template:{mthds:n,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_local_template","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:t.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_template"))}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),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(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),i.CZRDynModule.prototype.initialize.call(this,e,t)}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_local_performances:{mthds:n,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_local_performances","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:t.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_performances"))}})}(wp.customize,jQuery,_),function(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),i.CZRDynModule.prototype.initialize.call(this,e,t)}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_local_header_footer:{mthds:n,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_local_header_footer","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:t.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_header_footer"))}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),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.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),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(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),i.CZRDynModule.prototype.initialize.call(this,e,t)}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_global_header_footer:{mthds:n,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_global_header_footer","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:t.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_header_footer"))}})}(wp.customize,jQuery,_),function(r,e,s){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(!s.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":s.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":s.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:s.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_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){var i=this;i.inputConstructor=o.CZRInput.extend({setupSelect:function(){o.czr_sektions.setupSelectInput.call(this)}}),i.itemConstructor=o.CZRItem.extend(i.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(i,e,t),i.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.inputConstructor=n.CZRInput.extend({setupSelect:function(){n.czr_sektions.setupSelectInput.call(this)}}),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;"tiny_mce_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)},setupSelect:function(){n.czr_sektions.setupSelectInput.call(this)}}};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.inputConstructor=n.CZRInput.extend({setupSelect:function(){n.czr_sektions.setupSelectInput.call(this)}}),this.itemConstructor=n.CZRItem.extend(this.CZRFPItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRFPItemConstructor:{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,s){var t={initialize:function(e,t){var i=this;i.inputConstructor=r.CZRInput.extend({setupSelect:function(){r.czr_sektions.setupSelectInput.call(this)}}),i.itemConstructor=r.CZRItem.extend(i.CZRIconItemConstructor||{}),i.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(i,e,t)},CZRIconItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!s.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":s.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":s.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.inputConstructor=n.CZRInput.extend({setupSelect:function(){n.czr_sektions.setupSelectInput.call(this)}}),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){var i=this;i.inputConstructor=o.CZRInput.extend(i.CZRHeadingInputMths||{}),i.itemConstructor=o.CZRItem.extend(i.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(i,e,t),i.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})},CZRHeadingInputMths:{setupSelect:function(){o.czr_sektions.setupSelectInput.call(this)}},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(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend(this.CZRHeadingInputMths||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRHeadingInputMths:{setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_heading_spacing_child:{mthds:n,crud:!1,name:i.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:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_heading_spacing_child")}})}(wp.customize,jQuery,_),function(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend(this.CZRDividerInputMths||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRDividerInputMths:{setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_divider_module:{mthds:n,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("czr_divider_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.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.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),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(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),i.CZRDynModule.prototype.initialize.call(this,e,t)}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_quote_quote_child:{mthds:n,crud:!1,name:i.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:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_quote_quote_child")}})}(wp.customize,jQuery,_),function(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),i.CZRDynModule.prototype.initialize.call(this,e,t)}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_quote_cite_child:{mthds:n,crud:!1,name:i.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:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_quote_cite_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){var i=this;i.inputConstructor=o.CZRInput.extend({setupSelect:function(){o.czr_sektions.setupSelectInput.call(this)}}),i.itemConstructor=o.CZRItem.extend(i.CZRButtonItemConstructor||{}),i.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(i,e,t)},CZRButtonItemConstructor:{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.inputConstructor=n.CZRInput.extend({setupSelect:function(){n.czr_sektions.setupSelectInput.call(this)}}),this.itemConstructor=n.CZRItem.extend(this.CZRButtonItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRButtonItemConstructor:{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(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),i.CZRDynModule.prototype.initialize.call(this,e,t)}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_menu_content_child:{mthds:n,crud:!1,name:i.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:i.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.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),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.inputConstructor=n.CZRInput.extend({setupSelect:function(){n.czr_sektions.setupSelectInput.call(this)}}),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.inputConstructor=n.CZRInput.extend({setupSelect:function(){n.czr_sektions.setupSelectInput.call(this)}}),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(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),i.CZRDynModule.prototype.initialize.call(this,e,t)}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_simple_form_fonts_child:{mthds:n,crud:!1,name:i.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:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_fonts_child")}})}(wp.customize,jQuery,_),function(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),i.CZRDynModule.prototype.initialize.call(this,e,t)}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_simple_form_submission_child:{mthds:n,crud:!1,name:i.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:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_submission_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.inputConstructor=o.CZRInput.extend({setupSelect:function(){o.czr_sektions.setupSelectInput.call(this)}}),this.itemConstructor=o.CZRItem.extend(this.CZRButtonItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(this,e,t)},CZRButtonItemConstructor:{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.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this,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(r,s){s.extend(CZRSeksPrototype,{initialize:function(){var e=this;if(_.isUndefined(window.sektionsLocalizedData))throw new Error("CZRSeksPrototype => missing localized server params sektionsLocalizedData");if(!_.isFunction(r.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.defaultLocalSektionSettingValue=e.getDefaultSektionSettingValue("local"),e.localSectionsSettingId=new r.Value({}),e.registered=new r.Value([]),r.bind("ready",function(){e.doSektionThinksOnApiReady()}),r.bind("save-request-params",function(e){s.extend(e,{local_skope_id:r.czr_skopeBase.getSkopeProperty("skope_id")})})},doSektionThinksOnApiReady:function(){var o=this;o.registerAndSetupDefaultPanelSectionOptions(),o.localSectionsSettingId.callbacks.add(function(e,t){try{o.setupSettingsToBeSaved()}catch(e){r.errare("Error in self.localSectionsSettingId.callbacks => self.setupSettingsToBeSaved()",e)}o.initializeHistoryLogWhenSettingsRegistered(),r.previewer.send("sek-request-active-locations")});var i=function(e,t){o.setContextualCollectionSettingIdWhenSkopeSet(e,t),r.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"})}))})}),r.section(o.SECTION_ID_FOR_GLOBAL_OPTIONS,function(e){!0!==e.nimbleGlobalOptionGenerated&&(o.generateUI({action:"sek-generate-global-options-ui"}),e.nimbleGlobalOptionGenerated=!0)}),r.trigger("nimble-ready-for-current-skope")};_.isEmpty(r.czr_activeSkopes().local)||i(),r.czr_activeSkopes.callbacks.add(function(e,t){i(e,t)}),o.reactToPreviewMsg(),o.setupDnd(),o.setupTinyMceEditor(),o.schedulePrintSectionJson(),o.bind("sek-ui-removed",function(){r.previewedDevice("desktop")}),r.previewedDevice.bind(function(t){var e=_.filter(o.registered(),function(e){return"control"==e.what});_.each(e||[],function(e){r.control(e.id,function(e){e.container.find('[data-sek-device="'+t+'"]').each(function(){s(this).trigger("click")})})})}),s("#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")&&r.control(e.id,function(e){e.container.find("[draggable]").each(function(){s(this).off("dragstart dragend")})}),"control"==e.what&&r.control(e.id,function(e){e.container.find("select").each(function(){_.isUndefined(s(this).data("czrSelect2"))||s(this).czrSelect2("destroy")})})}),r.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=s.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 r.Value([]),r.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 r.Value,o.lastClickedTargetInPreview.bind(function(e,t){_.isObject(e)&&e.id?r.previewer.send("sek-set-double-click-target",e):r.previewer.send("sek-reset-double-click-target"),clearTimeout(s(window).data("_preview_target_timer_")),s(window).data("_preview_target_timer_",setTimeout(function(){o.lastClickedTargetInPreview({}),r.previewer.send("sek-reset-double-click-target")},2e4))}),r.previewer.bind("sek-clean-target-drop-zone",function(){o.lastClickedTargetInPreview({})}),s(document).keydown(function(e){e&&27===e.keyCode&&o.lastClickedTargetInPreview({})}),sektionsLocalizedData.hasActiveCachePlugin&&_.delay(function(){r.previewer.trigger("sek-notify",{notif_id:"has-active-cache-plugin",type:"info",duration:6e4,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 n=this,e=r.Panel.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}});r.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)}})}),r.CZR_Helpers.register({origin:"nimble",what:"panel",id:sektionsLocalizedData.sektionsPanelId,title:sektionsLocalizedData.i18n["Nimble Builder"],priority:-1e3,constructWith:e,track:!1}),r.CZR_Helpers.register({origin:"nimble",what:"section",id:n.SECTION_ID_FOR_GLOBAL_OPTIONS,title:sektionsLocalizedData.i18n["Site wide options"],panel:sektionsLocalizedData.sektionsPanelId,priority:20,track:!1,constructWith:r.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){r.section(n.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>'),n.scheduleModuleAccordion.call(e)})}),r.CZR_Helpers.register({origin:"nimble",what:"section",id:n.SECTION_ID_FOR_LOCAL_OPTIONS,title:sektionsLocalizedData.i18n["Current page options"],panel:sektionsLocalizedData.sektionsPanelId,priority:10,track:!1,constructWith:r.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){r.section(n.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>'),n.scheduleModuleAccordion.call(e)})}),r.CZR_Helpers.register({origin:"nimble",what:"setting",id:sektionsLocalizedData.optNameForGlobalOptions,dirty:!1,value:sektionsLocalizedData.globalOptionDBValues,transport:"refresh",type:"option"}),r.CZR_Helpers.register({origin:"nimble",what:"section",id:n.SECTION_ID_FOR_CONTENT_PICKER,title:sektionsLocalizedData.i18n["Content Picker"],panel:sektionsLocalizedData.sektionsPanelId,priority:30,track:!1,constructWith:r.Section.extend({isContextuallyActive:function(){return this.active()},_toggleActive:function(){return!0}})}).done(function(){r.section(n.SECTION_ID_FOR_CONTENT_PICKER,function(e){"resolved"!=r.czr_initialSkopeCollectionPopulated.state()?r.czr_initialSkopeCollectionPopulated.done(function(){r.previewer.trigger("sek-pick-content",{focus:!1})}):r.previewer.trigger("sek-pick-content",{focus:!1})})})},setContextualCollectionSettingIdWhenSkopeSet:function(e,t){t=t||{},!_.isEmpty(t.local)&&r.panel(sektionsLocalizedData.sektionsPanelId).expanded()&&r.previewer.trigger("sek-pick-content"),sektionsData=r.czr_skopeBase.getSkopeProperty("sektions","local"),sektionsLocalizedData.isDevMode&&r.infoLog("::setContextualCollectionSettingIdWhenSkopeSet => SEKTIONS DATA ? ",sektionsData),_.isEmpty(sektionsData)&&r.errare("::setContextualCollectionSettingIdWhenSkopeSet() => no sektionsData"),_.isEmpty(sektionsData.setting_id)&&r.errare("::setContextualCollectionSettingIdWhenSkopeSet() => missing setting_id"),this.localSectionsSettingId(sektionsData.setting_id)}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(r,s){s.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(s(window).data("_scroll_move_timer_")),s(window).data("_scroll_move_timer_",setTimeout(function(){t.mouseMovedRecently.set({})},4e3))};s(window).on("mousemove scroll,",_.throttle(e,50)),r.previewer.bind("ready",function(){s(r.previewer.targetWindow().document).on("mousemove scroll,",_.throttle(e,50))}),t.setupLevelTree()},toggleTopBar:function(e){e=!!_.isUndefined(e)||e;var t,i=this;e?s.when(i.renderAndSetupTopBarTmpl({})).done(function(e){i.topBarContainer=e,_.delay(function(){s("body").addClass("nimble-top-bar-visible")},200)}):(t=s.Deferred(),s("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<s(i.topBarId).length)return s(i.topBarId);try{t=wp.template("nimble-top-bar")({})}catch(e){return r.errare("Error when parsing the the top note template",e),!1}s("#customize-preview").after(s(t)),s(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)}}),s(".sek-add-content",i.topBarId).on("click",function(e){e.preventDefault(),r.previewer.trigger("sek-pick-content",{content_type:"module"})}),s(".sek-level-tree",i.topBarId).on("click",function(e){e.preventDefault(),i.levelTreeExpanded(!i.levelTreeExpanded())}),s("[data-nimble-history]",i.topBarId).on("click",function(e){try{i.navigateHistory(s(this).data("nimble-history"))}catch(e){r.errare("Error when firing self.navigateHistory",e)}}),s(".sek-settings",i.topBarId).on("click",function(e){r.panel(sektionsLocalizedData.sektionsPanelId,function(e){i.rootPanelFocus(),e.focus()})}),s(".sek-nimble-doc",i.topBarId).on("click",function(e){e.preventDefault(),window.open(s(this).data("doc-href"),"_blank")});var n=function(e){s(i.topBarId).length<1||(_.isObject(e)&&e.local_template&&"default"!==e.local_template?s(i.topBarId).find(".sek-notifications").html(['<span class="fas fa-info-circle"></span>',sektionsLocalizedData.i18n["This page uses a custom template."]].join(" ")):s(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()}),s(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 new Error("trackHistoryLog => invalid params or historyLog value");var o,r=[],s=d.extend(!0,[],i.historyLog());_.isEmpty(t.in_sektion)?_.isEmpty(t.to_sektion)||(o=t.to_sektion):o=t.in_sektion,_.each(s,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,s=d.extend(!0,[],e.historyLog()),a=[];if(_.each(s,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),{navigatingHistoryLogs:!0}),_.isEmpty(r.global)||l(e.getGlobalSectionsSettingId())(e.validateSettingValue(r.global),{navigatingHistoryLogs:!0});l.previewer.refresh(),l.previewer.trigger("sek-pick-content",{}),e.cleanRegistered(),e.cleanRegisteredLevelSettingsAfterHistoryNavigation()}var c=_.findKey(s,{status:"current"});c=Number(c),_.isNumber(c)?(_.each(s,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":s.length>c+1&&(t===c?newLog.status="previous":t===c+1&&(newLog.status="current"))}a.push(newLog)}),e.historyLog(a)):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(),s=this.localSectionsSettingId(),a=sektionsLocalizedData.optNameForGlobalOptions,c=!1;if(_.each([r,s,a],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(s)(),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(a)(),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,s=!1;if(!_.isArray(e)||_.isEmpty(e))return b.errare("::buildLevelTree => invalid collection param",e),r;var a='<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)&&(s=!_.contains(i.activeLocations(),e.id)),s||(sektionsLocalizedData.i18n[n]&&(o=sektionsLocalizedData.i18n[n]),!0===e.is_nested&&(o=sektionsLocalizedData.i18n["nested section"]),a="location"!==n?a:"",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,")",a].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(a,c){c.extend(CZRSeksPrototype,{setupSaveUI:function(){var n=this;n.saveUIVisible=new a.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 s=this;try{_tmpl=wp.template("nimble-top-save-ui")({})}catch(e){return a.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,{},s.getLevelModel(c("#sek-saved-section-id").val())),i=c("#sek-saved-section-title").val(),n=c("#sek-saved-section-description").val(),o=s.guid(),r=s.preProcessSektion(t);if(_.isEmpty(i))return c("#sek-saved-section-title").addClass("error"),void a.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:a.settings.nonce.save,sek_title:i,sek_description:n,sek_id:o,sek_data:JSON.stringify(r)}).done(function(e){a.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){a.errorLog("ajax sek_save_section => error",e),a.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(),s.saveUIVisible(!1)}),c("#nimble-top-save-ui")}})}(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(a,c){c.extend(CZRSeksPrototype,{setupSettingsToBeSaved:function(){var i,o=this,e={local:{collectionSettingId:o.localSectionsSettingId()},global:{collectionSettingId:o.getGlobalSectionsSettingId()}};_.each(e,function(e,t){if(i=a.czr_skopeBase.getSkopeProperty("sektions",t).db_values,_.isEmpty(e.collectionSettingId))throw new Error("setupSettingsToBeSaved => the collectionSettingId is invalid");if(!a.has(e.collectionSettingId)){a.CZR_Helpers.register({what:"setting",id:e.collectionSettingId,value:o.validateSettingValue(_.isObject(i)?i:o.getDefaultSektionSettingValue(t)),transport:"postMessage",type:"option",track:!1,origin:"nimble"});a(e.collectionSettingId,function(n){n.bind(_.debounce(function(e,t,i){if(!_.isObject(i)||!0!==i.navigatingHistoryLogs)try{o.trackHistoryLog(n,i)}catch(e){a.errare("setupSettingsToBeSaved => trackHistoryLog",e)}},1e3))})}})},validateSettingValue:function(i){if(!_.isObject(i))return a.errare("validation error => the setting should be an object",i),null;var n={},o=!1,e=[],r=function(e){a.errare(e,i),a.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("")}),o=!0},s=function(t){if(!o)if(_.isUndefined(t)&&_.isEmpty(n)){if(t=c.extend(!0,{},i),_.isUndefined(t.id)||_.isUndefined(t.level)){if(_.isUndefined(t.collection))return void r("validation error => the root level is missing the collection of locations");if(!_.isEmpty(t.level)||!_.isEmpty(t.id))return void r('validation error => the root level should not have a "level" or an "id" property');_.each(i.collection,function(e){n=t,s(e)})}}else{if(_.isEmpty(t.id)||!_.isString(t.id))return void r("validation error => a "+t.level+" level must have a valid id");if(_.contains(e,t.id))return void r("validation error => duplicated level id : "+t.id);if(e.push(t.id),_.isEmpty(t.level)||!_.isString(t.level))return void r("validation error => a "+t.level+" level must have a level property");if(!_.contains(["location","section","column","module"],t.level))return void r('validation error => the level "'+t.level+'" is not authorized');if("module"==t.level){if(!_.isUndefined(t.collection))return void r("validation error => a module can not have a collection property")}else if(_.isUndefined(t.collection))return void r("validation error => missing collection property for level => "+t.level+" "+t.id);switch(_.isUndefined(t.ver_ini)&&a.errare("validateSettingValue() => validation error => a "+t.level+' should have a version property : "ver_ini"'),t.level){case"location":if(!_.isEmpty(n.level))return void r("validation error => the parent of location "+t.id+" should have no level set");break;case"section":if(t.is_nested&&"column"!=n.level)return void r("validation error => the nested section "+t.id+" must be child of a column");if(!t.is_nested&&"location"!=n.level)return void r("validation error => the section "+t.id+" must be child of a location");break;case"column":if("section"!=n.level)return void r("validation error => the column "+t.id+" must be child of a section");break;case"module":if("column"!=n.level)return void r("validation error => the module "+t.id+" must be child of a column")}"module"!=t.level&&_.each(t.collection,function(e){n=c.extend(!0,{},t),_.isUndefined(e)?r("validation error => undefined level "):s(e)})}};return s(),o?null:i},resetCollectionSetting:function(){if(_.isEmpty(this.localSectionsSettingId()))throw new Error("setupSettingsToBeSaved => the collectionSettingId is invalid");a(this.localSectionsSettingId())(this.getDefaultSektionSettingValue("local")),a.previewer.refresh(),a.notifications.remove("sek-notify"),a.panel(sektionsLocalizedData.sektionsPanelId,function(e){a.notifications.add(new a.Notification("sek-reset-done",{type:"success",message:sektionsLocalizedData.i18n["Reset complete"],dismissible:!0})),_.delay(function(){a.notifications.remove("sek-reset-done")},5e3)})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(c,n){n.extend(CZRSeksPrototype,{reactToPreviewMsg:function(){var o=this,r={},s={},a=!0,e={"sek-add-section":{callback:function(e){return a=!!_.isUndefined(e.send_to_preview)||e.send_to_preview,s={},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 a=!0,s={},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 a=!0,s={},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(a=!0,s={},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(a=!0,s={},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 a=!1,s={},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 a=!1,s={},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(a=!0,s={},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 a=!0,s={},r=e,o.updateAPISetting(r)},"sek-add-content-in-new-sektion":{callback:function(e){switch(a=!!_.isUndefined(e.send_to_preview)||e.send_to_preview,s={},(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 a=!1,s={},(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}),a=!0,r={},s={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(s)},"sek-edit-options":function(e){return a=!0,r={},_.isEmpty(e.id)?n.Deferred(function(){this.reject("missing id")}):(s={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(s))},"sek-edit-module":function(e){return a=!0,r={},s={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(s)},"sek-notify":function(t){a=!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 a=!0,n.Deferred(function(e){r={action:"sek-refresh-level",level:t.level,id:t.id},s={},e.resolve({is_global_location:o.isGlobalLocation(t)})})},"sek-refresh-stylesheet":function(t){return a=!0,t=t||{},n.Deferred(function(e){r={id:t.id},s={},e.resolve({is_global_location:o.isGlobalLocation(t)})})},"sek-toggle-save-section-ui":function(t){return a=!1,o.saveUIVisible(!0,t),n.Deferred(function(e){r={},s={},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||{},a?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:s,cloneId:!_.isEmpty(e.cloneId)&&e.cloneId}):c.previewer.trigger([n,"done"].join("_"),{apiParams:r,uiParams:s}),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(k,y){y.extend(CZRSeksPrototype,{generateUI:function(e){var t=this,i=y.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){k.errare("::generateUI() => error",e),i=y.Deferred()}break;case"sek-generate-level-options-ui":try{i=t.generateUIforLevelOptions(e,i)}catch(e){k.errare("::generateUI() => error",e),i=y.Deferred()}break;case"sek-generate-draggable-candidates-picker-ui":t.cleanRegistered();try{i=t.generateUIforDraggableContent(e,i)}catch(e){k.errare("::generateUI() => error",e),i=y.Deferred()}break;case"sek-generate-local-skope-options-ui":t.cleanRegistered();try{i=t.generateUIforLocalSkopeOptions(e,i)}catch(e){k.errare("::generateUI() => error",e),i=y.Deferred()}break;case"sek-generate-global-options-ui":t.cleanRegistered();try{i=t.generateUIforGlobalOptions(e,i)}catch(e){k.errare("::generateUI() => error",e),i=y.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 s=n.settingParams.args.moduleRegistrationParams.control,a=n.settingParams.args.moduleRegistrationParams.id,c=s.czr_Module(a);if(_.isEmpty(c)?k.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))k.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;_.isUndefined(f)||(l=r.getInputRegistrationParams(f,t),_.isUndefined(l.refresh_stylesheet)||(d=Boolean(l.refresh_stylesheet)),_.isUndefined(l.refresh_markup)||(u=Boolean(l.refresh_markup)),_.isUndefined(l.refresh_fonts)||(p=Boolean(l.refresh_fonts)),_.isUndefined(l.refresh_preview)||(m=Boolean(l.refresh_preview)));var g=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&&k.previewer.send("sek-refresh-stylesheet",{location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:k.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:k.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-refresh-stylesheet",id:n.uiParams.id,level:n.uiParams.level}}),!0===u&&k.previewer.send("sek-refresh-level",{location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:k.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:k.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-refresh-level",id:n.uiParams.id,level:n.uiParams.level},skope_id:k.czr_skopeBase.getSkopeProperty("skope_id")}),!0===m&&k.previewer.refresh()});if(_.isEmpty(n.options_type))k.errare("updateAPISettingAndExecutePreviewActions => error when updating the global options => missing options_type");else{var e=k(sektionsLocalizedData.optNameForGlobalOptions)(),t=y.extend(!0,{},_.isObject(e)?e:{}),i={};_.each(o||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(i[t]=e)}),t[n.options_type]=i,k(sektionsLocalizedData.optNameForGlobalOptions)(t)}};if(!0===p){var h=n.settingParams.args.input_value;if(!_.isString(h))return void k.errare("updateAPISettingAndExecutePreviewActions => font-family must be a string",h);-1<h.indexOf("gfont")?r.updateAPISetting({action:"sek-update-fonts",font_family:h,is_global_location:r.isGlobalLocation(n.uiParams)}).always(function(){g().then(function(){r.updateAPISetting({action:"sek-update-fonts",is_global_location:r.isGlobalLocation(n.uiParams)})})}):g()}else g()}}else k.errare("updateAPISettingAndExecutePreviewActions => missing params.settingParams.args.moduleRegistrationParams The api main setting can not be updated",n)}else k.errare("updateAPISettingAndExecutePreviewActions => missing params.settingParams.to. The api main setting can not be updated",n)},normalizeAndSanitizeSingleItemInputValues:function(e,o){var i,r={},n={},s=null,a=this;return _.each(e,function(e,t){var i,n;_.contains(["title","id"],t)||(null!==o&&"no_default_value_specified"===(s=a.getInputDefaultValue(t,o))&&k.infoLog("::normalizeAndSanitizeSingleItemInputValues => missing default value for input "+t+" in module "+o),i=e,n=s,(_.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(a.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"tiny_mce_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=k.control.has(t):(i=!0,1<e.length&&k.errare("generateUI => why is this control registered more than once ? => "+t)),i}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(s,a){a.extend(CZRSeksPrototype,{generateUIforDraggableContent:function(o,e){var r=this,t={};a.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:!0,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&&a.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&&a.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)?s.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){s.has(n.settingControlId)||(s(n.settingControlId,function(e){e.bind(function(e,t){s.errare("generateUIforDraggableContent => the setting() should not changed")})}),s.CZR_Helpers.register({origin:"nimble",level:o.level,what:"setting",id:n.settingControlId,dirty:!1,value:n.settingValue||{},transport:"postMessage",type:"_nimble_ui_"})),s.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(){s.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")})})})},s.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}),r._maybeFetchSectionsFromServer()})),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(d,u){u.extend(CZRSeksPrototype,{generateUIforFrontModules:function(r,e){var s=this;_.isEmpty(r.id)&&e.reject("generateUI => missing id");var i=s.getLevelProperty({property:"value",id:r.id}),t=s.getLevelProperty({property:"module_type",id:r.id}),n=s.getRegisteredModuleProperty(t,"name");_.isEmpty(t)&&e.reject("generateUI => module => invalid module_type");var o={};if(!0===s.getRegisteredModuleProperty(t,"is_father")){var a=s.getRegisteredModuleProperty(t,"children");if(_.isEmpty(a))throw new Error("::generateUIforFrontModules => a father module "+t+" is missing children modules ");_.each(a,function(e,t){o[t]={settingControlId:r.id+"__"+t,module_type:e,controlLabel:s.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 s.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))}}):(s.cleanRegistered(),_do_register_=function(){_.each(o,function(n,o){if(!d.has(n.settingControlId)){var t=function(e,t,i){try{s.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,s.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>'),s.scheduleModuleAccordion.call(e,{expand_first_control:!0})})),e}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(l,d){d.extend(CZRSeksPrototype,{generateUIforLevelOptions:function(s,e){var a=this,c=a.getLevelProperty({property:"options",id:s.id});c=_.isObject(c)?c:{};var t={};d.extend(t,{bg:{settingControlId:s.id+"__bg_options",module_type:"sek_level_bg_module",controlLabel:sektionsLocalizedData.i18n["Background settings for the"]+" "+sektionsLocalizedData.i18n[s.level],expandAndFocusOnInit:!0,icon:'<i class="material-icons sek-level-option-icon">gradient</i>'},border:{settingControlId:s.id+"__border_options",module_type:"sek_level_border_module",controlLabel:sektionsLocalizedData.i18n["Borders settings for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="material-icons sek-level-option-icon">rounded_corner</i>'},spacing:{settingControlId:s.id+"__spacing_options",module_type:"sek_level_spacing_module",controlLabel:sektionsLocalizedData.i18n["Padding and margin settings for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="material-icons sek-level-option-icon">center_focus_weak</i>'},anchor:{settingControlId:s.id+"__anchor_options",module_type:"sek_level_anchor_module",controlLabel:sektionsLocalizedData.i18n["Custom anchor ( CSS ID ) and CSS classes for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="fas fa-anchor sek-level-option-icon"></i>'},visibility:{settingControlId:s.id+"__visibility_options",module_type:"sek_level_visibility_module",controlLabel:sektionsLocalizedData.i18n["Device visibility settings for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="far fa-eye sek-level-option-icon"></i>'},height:{settingControlId:s.id+"__height_options",module_type:"sek_level_height_module",controlLabel:sektionsLocalizedData.i18n["Height and vertical alignment for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="fas fa-ruler-vertical sek-level-option-icon"></i>'}}),"section"===s.level&&(d.extend(t,{width:{settingControlId:s.id+"__width_options",module_type:"sek_level_width_section",controlLabel:sektionsLocalizedData.i18n["Width settings for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'}}),d.extend(t,{breakpoint:{settingControlId:s.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"===s.level&&d.extend(t,{width:{settingControlId:s.id+"__width_options",module_type:"sek_level_width_module",controlLabel:sektionsLocalizedData.i18n["Width settings for the"]+" "+sektionsLocalizedData.i18n[s.level],icon:'<i class="fas fa-ruler-horizontal sek-level-option-icon"></i>'}});var i=_.keys(t)[0],n=t[i].settingControlId;return a.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))}}):(a.cleanRegistered(),_do_register_=function(){_.each(t,function(n,o){if(a.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{a.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh_stylesheet",uiParams:s,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,a.SETTING_UPDATE_BUFFER))});var e=c[o]||{},i=a.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:s.level,what:"setting",id:n.settingControlId,dirty:!1,value:e,transport:"postMessage",type:"_nimble_ui_"})}l.CZR_Helpers.register({origin:"nimble",level:s.level,level_id:s.id,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:s.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(s.id)||l.section(s.id,function(e){a.scheduleModuleAccordion.call(e,{expand_first_control:!0})}),l.CZR_Helpers.register({origin:"nimble",what:"section",id:s.id,title:sektionsLocalizedData.i18n["Settings for the"]+" "+s.level,panel:sektionsLocalizedData.sektionsPanelId,priority:10}).done(function(){}),l.section(s.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(d,u){u.extend(CZRSeksPrototype,{getLocalSkopeOptionId:function(){var e=d.czr_skopeBase.getSkopeProperty("skope_id");return _.isEmpty(e)?(d.errare("czr_sektions::getLocalSkopeOptionId => empty skope_id "),""):sektionsLocalizedData.optPrefixForSektionsNotSaved+e+"__localSkopeOptions"},generateUIforLocalSkopeOptions:function(c,e){var l=this,i=l.getLocalSkopeOptionId();if(l.isUIControlAlreadyRegistered(i))return e;var n={};return _.isUndefined(sektionsLocalizedData.localOptionsMap)||!_.isObject(sektionsLocalizedData.localOptionsMap)?d.errare("::generateUIforGlobalOptions => missing or invalid localOptionsMap"):(_.each(sektionsLocalizedData.localOptionsMap,function(e,t){switch(t){case"template":n[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&&(n[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":n[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":n[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":n[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":n[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":n[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">settings_backup_restore</i>'};break;default:d.errare("::generateUIforLocalOptions => an option group could not be registered => "+e,t)}}),_do_register_=function(){_.each(n,function(n,o){if(!d.has(n.settingControlId)){var t=function(e,t,i){try{l.updateAPISettingAndExecutePreviewActions({defaultPreviewAction:"refresh",uiParams:c,options_type:o,settingParams:{to:e,from:t,args:i}})}catch(e){d.errare("::generateUIforLocalSkopeOptions => Error in updateAPISettingAndExecutePreviewActions",e)}};d(n.settingControlId,function(e){e.bind(_.debounce(t,l.SETTING_UPDATE_BUFFER))});var e=l.getModuleStartingValue(n.module_type),i=d(l.localSectionsSettingId())(),r=u.extend(!0,{},_.isObject(i.local_options)?i.local_options:{}),s=_.isObject(r[o])?r[o]:{};if("no_starting_value"!==e&&_.isObject(e)){var a=u.extend(!0,{},e);s=u.extend(a,s)}d.CZR_Helpers.register({origin:"nimble",level:c.level,what:"setting",id:n.settingControlId,dirty:!1,value:s,transport:"postMessage",type:"_nimble_ui_"})}d.CZR_Helpers.register({origin:"nimble",level:c.level,what:"control",id:n.settingControlId,label:n.controlLabel,type:"czr_module",module_type:n.module_type,section:l.SECTION_ID_FOR_LOCAL_OPTIONS,priority:10,settings:{default:n.settingControlId}}).done(function(){d.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 c=this,i=sektionsLocalizedData.optPrefixForSektionsNotSaved+sektionsLocalizedData.optNameForGlobalOptions;if(c.isUIControlAlreadyRegistered(i))return e;var n={};return _.isUndefined(sektionsLocalizedData.globalOptionsMap)||!_.isObject(sektionsLocalizedData.globalOptionsMap)?l.errare("::generateUIforGlobalOptions => missing or invalid globalOptionsMap"):(_.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">settings_backup_restore</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)}}),_do_register_=function(){_.each(n,function(n,o){if(!l.has(n.settingControlId)){var t=function(e,t,i){try{c.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,c.SETTING_UPDATE_BUFFER))});var e=sektionsLocalizedData.globalOptionDBValues,i=c.getModuleStartingValue(n.module_type),r=_.isObject(e)&&!_.isEmpty(e[o])?e[o]:{};if("no_starting_value"!==i&&_.isObject(i)){var s=d.extend(!0,{},i);r=d.extend(s,r)}l.CZR_Helpers.register({origin:"nimble",level:a.level,what:"setting",id:n.settingControlId,dirty:!1,value:r,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:c.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(K,X){X.extend(CZRSeksPrototype,{updateAPISetting:function($){var q=this,Y=X.Deferred();($=$||{}).is_global_location=q.isGlobalLocation($);var J=$.is_global_location?q.getGlobalSectionsSettingId():q.localSectionsSettingId();return K(J,function(e){!function(){var n,t,o,i,r,s,e,a,c,l=K(J)(),d=_.isObject(l)?X.extend(!0,{},l):q.getDefaultSektionSettingValue($.is_global_location?"global":"local"),u="_not_injection_scenario_";switch(d.collection=_.isArray(d.collection)?d.collection:q.getDefaultSektionSettingValue($.is_global_location?"global":"local").collection,$.action){case"sek-add-section":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");if(_.isEmpty($.location))throw new Error("updateAPISetting => "+$.action+" => missing location");if(!0===$.is_nested){if(o=q.getLevelModel($.in_column,d.collection),"no_match"==(c=q.getLevelModel($.in_sektion,d.collection))){Y.reject("updateAPISetting => "+$.action+" => no grand parent sektion found");break}if(!0===c.is_nested){Y.reject(sektionsLocalizedData.i18n["You've reached the maximum number of allowed nested sections."]);break}if("no_match"==o){K.errare("updateAPISetting => "+$.action+" => no parent column matched"),Y.reject("updateAPISetting => "+$.action+" => no parent column matched");break}o.collection=_.isArray(o.collection)?o.collection:[],o.collection.push({id:$.id,level:"section",collection:[{id:sektionsLocalizedData.optPrefixForSektionsNotSaved+q.guid(),level:"column",collection:[],ver_ini:sektionsLocalizedData.nimbleVersion}],is_nested:!0,ver_ini:sektionsLocalizedData.nimbleVersion})}else{if("no_match"==(n=q.getLevelModel($.location,d.collection))){K.errare("updateAPISetting => "+$.action+" => no location matched"),Y.reject("updateAPISetting => "+$.action+" => no location matched");break}n.collection=_.isArray(n.collection)?n.collection:[],_.each(n.collection,function(e,t){$.before_section===e.id&&(R=t),$.after_section===e.id&&(R=t+1)}),n.collection=_.isArray(n.collection)?n.collection:[],n.collection.splice(R,0,{id:$.id,level:"section",collection:[{id:sektionsLocalizedData.optPrefixForSektionsNotSaved+q.guid(),level:"column",collection:[],ver_ini:sektionsLocalizedData.nimbleVersion}],ver_ini:sektionsLocalizedData.nimbleVersion})}break;case"sek-duplicate-section":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");if(_.isEmpty($.location))throw new Error("updateAPISetting => "+$.action+" => missing location");var p;try{p=q.cloneLevel($.id)}catch(e){K.errare("updateAPISetting => "+$.action,e);break}var m=q.getLevelPositionInCollection($.id,d.collection);if(!0===$.is_nested){if("no_match"==(o=q.getLevelModel($.in_column,d.collection))){K.errare("updateAPISetting => "+$.action+" => no parent column matched"),Y.reject("updateAPISetting => "+$.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=q.getLevelModel($.location,d.collection))){K.errare("updateAPISetting => "+$.action+" => no location matched"),Y.reject("updateAPISetting => "+$.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===$.is_nested)"no_match"!=(o=q.getLevelModel($.in_column,d.collection))?(o.collection=_.isArray(o.collection)?o.collection:[],o.collection=_.filter(o.collection,function(e){return e.id!=$.id})):K.errare("updateAPISetting => "+$.action+" => no parent column matched");else{if("no_match"==(n=q.getLevelModel($.location,d.collection))){K.errare("updateAPISetting => "+$.action+" => no location matched"),Y.reject("updateAPISetting => "+$.action+" => no location matched");break}n.collection=_.filter(n.collection,function(e){return e.id!=$.id})}break;case"sek-move-section":var f,g,h=q.getLevelModel($.to_location,d.collection);if(_.isEmpty(h)||"no_match"==h)throw new Error("updateAPISetting => "+$.action+" => missing target location");if($.from_location!=$.to_location){var k=q.getLevelModel($.from_location,d.collection);if(_.isEmpty(k)||"no_match"==k)throw new Error("updateAPISetting => "+$.action+" => missing source location");k.collection=_.isArray(k.collection)?k.collection:[],f=q.getLevelModel($.id,k.collection),g=X.extend(!0,{},f),k.collection=_.filter(k.collection,function(e){return e.id!=$.id})}h.collection=_.isArray(h.collection)?h.collection:[],r=X.extend(!0,[],h.collection),s=[],_.each($.newOrder,function(e){if($.from_location!=$.to_location&&e==g.id)s.push(g);else{if(t=q.getLevelModel(e,r),_.isEmpty(t)||"no_match"==t)throw new Error("updateAPISetting => "+$.action+" => missing section candidate");s.push(t)}}),h.collection=s;break;case"sek-move-section-up-down":if(parentCandidate=q.getLevelModel($.is_nested?$.in_column:$.location,d.collection),_.isEmpty(parentCandidate)||"no_match"==parentCandidate)throw new Error("updateAPISetting => "+$.action+" => missing target location");parentCandidate.collection=_.isArray(parentCandidate.collection)?parentCandidate.collection:[],r=X.extend(!0,[],parentCandidate.collection),s=X.extend(!0,[],parentCandidate.collection);var y=_.findIndex(r,function(e){return e.id===$.id});if(-1===y)throw new Error("updateAPISetting => "+$.action+" => invalid index");var v=$.direction||"up";if("up"!==v&&r.length===y+1)throw new Error("updateAPISetting => "+$.action+" => bottom reached");if("up"===v&&0===y)throw new Error("updateAPISetting => "+$.action+" => top reached");s[y]=r["up"===v?y-1:y+1],s["up"===v?y-1:y+1]=r[y],parentCandidate.collection=s;break;case"sek-add-column":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");if("no_match"==(t=q.getLevelModel($.in_sektion,d.collection))){K.errare("updateAPISetting => "+$.action+" => no parent sektion matched"),Y.reject("updateAPISetting => "+$.action+" => no parent sektion matched");break}if(t.collection=_.isArray(t.collection)?t.collection:[],q.MAX_NUMBER_OF_COLUMNS-1<_.size(t.collection)){Y.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:$.id,level:"column",collection:[],ver_ini:sektionsLocalizedData.nimbleVersion});break;case"sek-remove-column":if("no_match"!=(t=q.getLevelModel($.in_sektion,d.collection))){if(1===_.size(t.collection)){Y.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!=$.id}),_.each(t.collection,function(e){e.width=""})}else K.errare("updateAPISetting => "+$.action+" => no parent sektion matched");break;case"sek-duplicate-column":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");if("no_match"==(t=q.getLevelModel($.in_sektion,d.collection))){K.errare("updateAPISetting => "+$.action+" => no parent sektion matched"),Y.reject("updateAPISetting => "+$.action+" => no parent sektion matched");break}if(t.collection=_.isArray(t.collection)?t.collection:[],q.MAX_NUMBER_OF_COLUMNS-1<_.size(t.collection)){Y.reject(sektionsLocalizedData.i18n["You've reached the maximum number of columns allowed in this section."]);break}var b;try{b=q.cloneLevel($.id)}catch(e){K.errare("updateAPISetting => "+$.action,e);break}var z=q.getLevelPositionInCollection($.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($.col_number<2)break;var I=q.getLevelModel($.resized_column,d.collection),w=q.getLevelModel($.sister_column,d.collection);if("no_match"==I){K.errare("updateAPISetting => "+$.action+" => no resized column matched"),Y.reject("updateAPISetting => "+$.action+" => no resized column matched");break}I.width=parseFloat($.resizedColumnWidthInPercent);var M=q.getLevelModel($.in_sektion,d.collection),S=_.filter(M.collection,function(e){return e.id!=I.id&&e.id!=w.id}),C=parseFloat(I.width.toFixed(3));_.isEmpty(S)||_.each(S,function(e){currentColWidth=parseFloat(1*e.width),(!_.has(e,"width")||!_.isNumber(1*currentColWidth)||_.isEmpty(currentColWidth+"")||currentColWidth<1)&&(e.width=parseFloat((100/$.col_number).toFixed(3))),C=parseFloat((C+e.width).toFixed(3))}),w.width=parseFloat((100-C).toFixed(3));break;case"sek-move-column":var D,P,x=q.getLevelModel($.to_sektion,d.collection);if(_.isEmpty(x)||"no_match"==x)throw new Error("updateAPISetting => "+$.action+" => missing target sektion");if($.from_sektion!=$.to_sektion){var E=q.getLevelModel($.from_sektion,d.collection);if(_.isEmpty(E)||"no_match"==E)throw new Error("updateAPISetting => "+$.action+" => missing source column");E.collection=_.isArray(E.collection)?E.collection:[],D=q.getLevelModel($.id,E.collection),P=X.extend(!0,{},D),E.collection=_.filter(E.collection,function(e){return e.id!=$.id}),_.each(E.collection,function(e){e.width=""})}x.collection=_.isArray(x.collection)?x.collection:[],r=X.extend(!0,[],x.collection),s=[],_.each($.newOrder,function(e){if($.from_sektion!=$.to_sektion&&e==P.id)s.push(P);else{if(o=q.getLevelModel(e,r),_.isEmpty(o)||"no_match"==o)throw new Error("updateAPISetting => moveColumn => missing columnCandidate");s.push(o)}}),x.collection=s,_.each(x.collection,function(e){e.width=""});break;case"sek-add-module":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");if(_.isEmpty($.module_type))throw new Error("updateAPISetting => "+$.action+" => missing module_type");if("no_match"===(o=q.getLevelModel($.in_column,d.collection))){K.errare("updateAPISetting => "+$.action+" => no parent column matched"),Y.reject("updateAPISetting => "+$.action+" => no parent column matched");break}var R=0;o.collection=_.isArray(o.collection)?o.collection:[],_.each(o.collection,function(e,t){$.before_module===e.id&&(R=t),$.after_module===e.id&&(R=t+1)});var L={id:$.id,level:"module",module_type:$.module_type,ver_ini:sektionsLocalizedData.nimbleVersion};"no_starting_value"!==(a=q.getModuleStartingValue($.module_type))&&(L.value=a),o.collection.splice(R,0,L);break;case"sek-duplicate-module":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");if("no_match"==(o=q.getLevelModel($.in_column,d.collection))){K.errare("updateAPISetting => "+$.action+" => no parent column matched"),Y.reject("updateAPISetting => "+$.action+" => no parent column matched");break}var O;o.collection=_.isArray(o.collection)?o.collection:[];try{O=q.cloneLevel($.id)}catch(e){K.errare("updateAPISetting => "+$.action,e),Y.reject("updateAPISetting => "+$.action+" => error when cloning the level");break}var A=q.getLevelPositionInCollection($.id,d.collection);e=O.id,o.collection.splice(parseInt(A+1,10),0,O);break;case"sek-remove-module":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");"no_match"!=(o=q.getLevelModel($.in_column,d.collection))?(o.collection=_.isArray(o.collection)?o.collection:[],o.collection=_.filter(o.collection,function(e){return e.id!=$.id})):K.errare("updateAPISetting => "+$.action+" => no parent column matched");break;case"sek-move-module":var Z,j,T;if(Z=q.getLevelModel($.to_column,d.collection),_.isEmpty(Z)||"no_match"==Z)throw new Error("updateAPISetting => "+$.action+" => missing target column");if($.from_column!=$.to_column){var V;if(V=q.getLevelModel($.from_column,d.collection),_.isEmpty(V)||"no_match"==V)throw new Error("updateAPISetting => "+$.action+" => missing source column");V.collection=_.isArray(V.collection)?V.collection:[],j=q.getLevelModel($.id,d.collection),T=X.extend(!0,{},j),V.collection=_.filter(V.collection,function(e){return e.id!=$.id})}if(Z.collection=_.isArray(Z.collection)?Z.collection:[],r=X.extend(!0,[],Z.collection),s=[],_.each($.newOrder,function(e){if($.from_column!=$.to_column&&e==T.id)s.push(T);else{if(i=q.getLevelModel(e,d.collection),_.isEmpty(i)||"no_match"==i)throw new Error("updateAPISetting => "+$.action+" => missing moduleCandidate");s.push(i)}}),s.length!=_.uniq(s).length)throw new Error("updateAPISetting => "+$.action+" => there are duplicated modules in column : "+Z.id);Z.collection=s;break;case"sek-set-module-value":i=q.getLevelModel($.id,d.collection);var F={};if(_.each($.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(F[t]=e)}),"no_match"==i){K.errare("updateAPISetting => "+$.action+" => no module matched",$),Y.reject("updateAPISetting => "+$.action+" => error no module matched");break}if(_.isEmpty($.options_type)){K.errare("updateAPISetting => "+$.action+" => missing options_type"),Y.reject("updateAPISetting => "+$.action+" => missing options_type");break}"__no_option_group_to_be_updated_by_children_modules__"===$.options_type?i.value=F:(i.value=_.isEmpty(i.value)?{}:i.value,i.value[$.options_type]=F);break;case"sek-generate-level-options-ui":var U=q.getLevelModel($.id,d.collection),N={};if("no_match"===U){K.errare("updateAPISetting => "+$.action+" => no parent sektion matched"),Y.reject("updateAPISetting => "+$.action+" => no parent sektion matched");break}U.options=U.options||{},_.each($.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(N[t]=e)}),_.isEmpty($.options_type)&&K.errare("updateAPISetting => "+$.action+" => missing options_type"),U.options[$.options_type]=N;break;case"sek-generate-local-skope-options-ui":N={};var B=X.extend(!0,{},_.isObject(d.local_options)?d.local_options:{});if(_.each($.value||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(N[t]=e)}),_.isEmpty($.options_type)||!_.isString($.options_type))K.errare("updateAPISetting => "+$.action+" => missing options_type");else{var Q={};Q[$.options_type]=N,d.local_options=X.extend(B,Q)}break;case"sek-add-content-in-new-sektion":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");if(R=0,"no_match"==(n=q.getLevelModel($.location,d.collection))){K.errare("updateAPISetting => "+$.action+" => no location matched"),Y.reject("updateAPISetting => "+$.action+" => no location matched");break}switch(n.collection=_.isArray(n.collection)?n.collection:[],_.each(n.collection,function(e,t){$.before_section===e.id&&(R=t),$.after_section===e.id&&(R=t+1)}),$.content_type){case"module":a=q.getModuleStartingValue($.content_id),n.collection.splice(R,0,{id:$.id,level:"section",collection:[{id:sektionsLocalizedData.optPrefixForSektionsNotSaved+q.guid(),level:"column",collection:[{id:$.droppedModuleId,level:"module",module_type:$.content_id,value:"no_starting_value"!==a?a:null,ver_ini:sektionsLocalizedData.nimbleVersion}],ver_ini:sektionsLocalizedData.nimbleVersion}],ver_ini:sektionsLocalizedData.nimbleVersion});break;case"preset_section":u=X.Deferred();var H=function(e){q.preparePresetSectionForInjection(e).fail(function(e){Y.reject("updateAPISetting => error when preparePresetSectionForInjection => "+$.action+" => "+e),u.reject(e)}).done(function(e){var t=!1;if(!_.isEmpty($.sektion_to_replace)){var i=q.getLevelModel($.sektion_to_replace,d.collection);"no_match"===i&&(K.errare("updateAPISetting => "+$.action+" => no sektionToReplace matched"),Y.reject("updateAPISetting => "+$.action+" => no sektionToReplace matched")),t=!0===i.is_nested}t?("no_match"===(o=q.getLevelModel($.in_column,d.collection))&&(K.errare("updateAPISetting => "+$.action+" => no parent column matched"),Y.reject("updateAPISetting => "+$.action+" => no parent column matched")),o.collection=_.isArray(o.collection)?o.collection:[],_.each(o.collection,function(e,t){$.before_section===e.id&&(R=t),$.after_section===e.id&&(R=t+1)}),o.collection.splice(R,0,{id:$.id,is_nested:!0,level:"section",collection:e.collection,options:e.options||{},ver_ini:sektionsLocalizedData.nimbleVersion})):n.collection.splice(R,0,{id:$.id,level:"section",collection:e.collection,options:e.options||{},ver_ini:sektionsLocalizedData.nimbleVersion}),u.resolve()})};q.getPresetSectionCollection({is_user_section:$.is_user_section,presetSectionId:$.content_id,section_id:$.id}).fail(function(e){K.errare("updateAPISetting => "+$.action+" => Error with self.getPresetSectionCollection()",e),Y.reject("updateAPISetting => "+$.action+" => Error with self.getPresetSectionCollection()")}).done(function(e){_.isObject(e)&&!_.isEmpty(e)||(K.errare("updateAPISetting => "+$.action+" => preset section type not found or empty : "+$.content_id,e),Y.reject("updateAPISetting => "+$.action+" => preset section type not found or empty")),H(e)})}break;case"sek-add-preset-section-in-new-nested-sektion":if(_.isEmpty($.id))throw new Error("updateAPISetting => "+$.action+" => missing id");if(o=q.getLevelModel($.in_column,d.collection),"no_match"==(c=q.getLevelModel($.in_sektion,d.collection))){Y.reject("updateAPISetting => "+$.action+" => no grand parent sektion found");break}if(!0===c.is_nested){Y.reject(sektionsLocalizedData.i18n["You've reached the maximum number of allowed nested sections."]);break}if("no_match"==o){K.errare("updateAPISetting => "+$.action+" => no parent column matched"),Y.reject("updateAPISetting => "+$.action+" => no parent column matched");break}o.collection=_.isArray(o.collection)?o.collection:[],u=X.Deferred(),H=function(e){q.preparePresetSectionForInjection(e).fail(function(e){Y.reject("updateAPISetting => error when preparePresetSectionForInjection => "+$.action+" => "+e),u.reject(e)}).done(function(e){o.collection.push({id:$.id,level:"section",collection:e.collection,options:e.options||{},is_nested:!0,ver_ini:sektionsLocalizedData.nimbleVersion}),u.resolve()})},q.getPresetSectionCollection({is_user_section:$.is_user_section,presetSectionId:$.content_id,section_id:$.id}).fail(function(){K.errare("updateAPISetting => "+$.action+" => Error with self.getPresetSectionCollection()",_er_),Y.reject("updateAPISetting => "+$.action+" => Error with self.getPresetSectionCollection()")}).done(function(e){_.isObject(e)&&!_.isEmpty(e)||(K.errare("updateAPISetting => "+$.action+" => preset section type not found or empty : "+$.content_id,e),Y.reject("updateAPISetting => "+$.action+" => preset section type not found or empty")),H(e)});break;case"sek-update-fonts":var G=q.sniffGFonts({is_global_location:$&&!0===$.is_global_location});if(!_.isEmpty($.font_family)&&_.isString($.font_family)&&!_.contains(G,$.font_family)){if($.font_family.indexOf("gfont")<0){K.errare("updateAPISetting => "+$.action+" => error => must be a google font, prefixed gfont"),Y.reject("updateAPISetting => "+$.action+" => error => must be a google font, prefixed gfont");break}G.push($.font_family)}d.fonts=G;break;case"sek-restore-revision":d=$.revision_value}if("pending"==Y.state()){var W=function(){_.isEqual(l,d)?Y.reject("updateAPISetting => the new setting value is unchanged when firing action : "+$.action):null!==q.validateSettingValue(d)?(K(J)(d,$),$.cloneId=e,Y.resolve($)):Y.reject("Validation problem for action "+$.action)};"_not_injection_scenario_"===u?(W(),"pending"===Y.state()&&K.errare("::updateAPISetting => The __updateAPISettingDeferred__ promise has not been resolved properly.")):u.done(function(){W(),"pending"===Y.state()&&K.errare("::updateAPISetting => The __updateAPISettingDeferred__ promise has not been resolved properly.")}).fail(function(e){K.errare("updateAPISetting => __presetSectionInjected__ failed",e)})}}()}),Y.promise()},_maybeFetchSectionsFromServer:function(t){var e,i=X.Deferred();return!0===(t=t||{is_user_section:!1}).is_user_section?_.isEmpty(K.sek_userSavedSections)||_.isEmpty(K.sek_userSavedSections[t.preset_section_id])?(K.sek_userSavedSections=K.sek_userSavedSections||{},_.isUndefined(K.sek_fetchingUserSavedSections)||"pending"!=K.sek_fetchingUserSavedSections.state()?(e=wp.ajax.post("sek_get_user_saved_sections",{nonce:K.settings.nonce.save,preset_section_id:t.preset_section_id}),K.sek_fetchingUserSavedSections=e):e=K.sek_fetchingUserSavedSections,e.done(function(e){K.sek_userSavedSections[t.preset_section_id]=e,i.resolve(K.sek_userSavedSections)}).fail(function(e){i.reject(e)})):i.resolve(K.sek_userSavedSections):_.isEmpty(K.sek_presetSections)?(_.isUndefined(K.sek_fetchingPresetSections)||"pending"!=K.sek_fetchingPresetSections.state()?(e=wp.ajax.post("sek_get_preset_sections",{nonce:K.settings.nonce.save}),K.sek_fetchingPresetSections=e):e=K.sek_fetchingPresetSections,e.done(function(e){K.sek_presetSections=e,i.resolve(K.sek_presetSections)}).fail(function(e){i.reject(e)})):i.resolve(K.sek_presetSections),i.promise()},getPresetSectionCollection:function(r){var s=this,a=X.Deferred();return s._maybeFetchSectionsFromServer({is_user_section:r.is_user_section,preset_section_id:r.presetSectionId}).fail(function(e){a.reject(e)}).done(function(e){var t=X.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+s.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),a.resolve(i)}),a.promise()},preparePresetSectionForInjection:function(o){var i=this,n={},r=X.Deferred(),s=function(e){return _.each(e,function(e,t){_.isObject(e)||_.isArray(e)?s(e):_.isString(e)&&-1!=e.indexOf("::img-path::")&&(_.has(n,e)||(n[e]=i.importAttachment(e.replace("::img-path::",""))))}),n},a=function(i,n){return _.each(i,function(e,t){_.isObject(e)||_.isArray(e)?a(e,n):_.isString(e)&&-1!=e.indexOf("::img-path::")&&_.has(n,e)&&_.isObject(n[e])&&(i[t]=n[e].id)}),o};return i.whenAllPromisesInParallel(s(o)).done(function(e){var t=a(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()||[]);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)},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 s=this,a="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,{},s.getDefaultSektionSettingValue(n));e=_.isArray(r.collection)?r.collection:[]}return _.each(e,function(e){"no_match"==a&&(t===e.id?a=e:_.isArray(e.collection)&&c(t,e.collection,i,n))}),a};return _.isEmpty(n)?_.each({local:s.localSectionsSettingId(),global:s.getGlobalSectionsSettingId()},function(e,t){"no_match"===a&&c(i,n,e,t)}):c(i,n),a},isGlobalLocation:function(e){var t=!1;return e=e||{},_.has(e,"is_global_location")?t=e.is_global_location:_.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,s=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=s(t,e.collection)))}),i};return"no_match"!==s(e)},getLevelPositionInCollection:function(i,n){var s=this,a="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,{},s.getDefaultSektionSettingValue(o));e=_.isArray(r.collection)?r.collection:[]}_.each(e,function(e,t){"no_match"==a&&(i===e.id?a=t:_.isArray(e.collection)&&c(i,e.collection,n,o))})};return _.isEmpty(n)?_.each({local:s.localSectionsSettingId(),global:s.getGlobalSectionsSettingId()},function(e,t){"no_match"===a&&c(i,e,t,n)}):c(i,n),a},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=[],s=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))&&s(i,n,e)})};return(e=e||{is_global_location:!1}).is_global_location?s(o.getGlobalSectionsSettingId(),"global"):s(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));e=_.isUndefined(e)?t.choices:e,!_.isEmpty(e)&&_.isObject(e)?(_.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()):l.errare("api.czr_sektions.setupSelectInput => missing select options for input id => "+n.id+" in image module")},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",{rel_path: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(a,m){m.extend(CZRSeksPrototype,{setupDnd:function(){var t=this;t.bind("sek-refresh-dragzones",function(e){!0!="draggable"in document.createElement("span")&&a.panel(sektionsLocalizedData.sektionsPanelId,function(e){a.notifications.add(new a.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(){a.notifications.remove("drag-drop-support")},1e4)}),t.setupNimbleDragZones(e.input_container)}),a.previewer.bind("ready",function(){try{t.setupNimbleDropZones()}catch(e){a.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(){a.notifications.add(new a.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(){a.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){a.panel(sektionsLocalizedData.sektionsPanelId,function(e){a.notifications.add(new a.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(){a.notifications.remove("drag-drop-support")},1e4)})}m(this).addClass("sek-dragged"),m("body").addClass("sek-dragging"),a.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"),a.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?(a.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(),a.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),a.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)),s=(Math.abs(o.top-i),Math.abs(n-(o.right-(o.right-o.left)/2))),a=(o.right,o.left,r<50),c=s<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=s,t=r,Math.sqrt(e*e+t*t))}),m(this).removeClass("sek-drag-is-in"),(a||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:a.errare("::dnd_getPreDropElementContent => invalid content type provided")}return i},dnd_getDropZonesElements:function(){return m(a.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"),s=!0===i.closest('[data-sek-level="location"]').data("sek-is-footer-location"),a="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||s)&&a?(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):s&&"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){a.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,s=i.right,a=i.top,c=i.bottom;return r<=n&&n-r<=s-r&&(a<=o&&o-a<=c-a)},dnd_onDrop:function(e,t){t.stopPropagation();this.dnd_getPosition(e,t),e.index();a.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"),s=o.data("sek-id");if(_.isEmpty(r)||_.isEmpty(s))throw new Error("No valid level id found");a.previewer.trigger("sek-add-module",{level:r,id:s,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":a.previewer.trigger("sek-add-content-in-new-sektion",e);break;case"preset-section-in-a-nested-section-to-create":a.previewer.trigger("sek-add-preset-section-in-new-nested-sektion",e);break;case"content-in-empty-location":a.previewer.trigger("sek-add-content-in-new-sektion",e);break;default:a.errare("sek control panel => ::reactToDrop => invalid drop case : "+i)}}(e)}catch(e){a.errare("error when reactToDrop",e)}})}})}(wp.customize,jQuery);CZRSeksPrototype=CZRSeksPrototype||{};!function(r,s){s.extend(CZRSeksPrototype,{setupTinyMceEditor:function(){var n=this;r.sekEditorExpanded=new r.Value(!1),r.sekEditorSynchronizedInput=new r.Value,n.editorEventsListenerSetup=!1;var o=function(){r.sekTinyMceEditor=r.sekTinyMceEditor||tinyMCE.get("czr-customize-content_editor"),!1===n.editorEventsListenerSetup&&(n.attachEventsToEditor(),n.editorEventsListenerSetup=!0,n.trigger("sek-tiny-mce-editor-bound-and-instantiated"))};n.bind("sek-edit-module_done",function(e){if(("tiny_mce_editor"===(e=_.isObject(e)?e:{}).clicked_input_type||"czr_tiny_mce_editor_module"===e.module_type)&&!_.isEmpty(e.syncedTinyMceInputId)){var i=e.id;if(!0===n.getRegisteredModuleProperty(e.module_type,"is_father")){var t=n.getRegisteredModuleProperty(e.module_type,"children");if(_.isEmpty(t))throw new Error("::generateUIforFrontModules => a father module "+e.module_type+" is missing children modules ");_.each(t,function(e,t){"czr_tinymce_child"===e&&(i=i+"__"+t)})}r.sekEditorSynchronizedInput({control_id:i,input_id:e.syncedTinyMceInputId}),r.sekEditorExpanded(!0),r.sekTinyMceEditor.focus()}}),s("#customize-theme-controls").on("click",'[data-czr-action="open-tinymce-editor"]',function(){var e=s(this).data("czr-control-id"),t=s(this).data("czr-input-id");if(_.isEmpty(e)||_.isEmpty(t))r.errare("toggle-tinymce-editor => missing input or control id");else{var i=s.extend(!0,{},r.sekEditorSynchronizedInput()),n=_.extend(i,{input_id:t,control_id:e});r.sekEditorSynchronizedInput(n),r.sekEditorExpanded(!0),r.sekTinyMceEditor.focus()}}),r.sekEditorSynchronizedInput.bind(function(n,e){o(),r(n.control_id,function(e){var t=e(),i=_.isObject(t)&&!_.isEmpty(t[n.input_id])?t[n.input_id]:"";i=i.replace(/\r?\n/g,"<br/>");try{r.sekTinyMceEditor.setContent(i)}catch(e){r.errare("Error when setting the tiny mce editor content in setupTinyMceEditor",e)}r.sekTinyMceEditor.focus()})}),r.sekEditorExpanded.bind(function(e,t,i){o(),e&&r.sekTinyMceEditor.focus(),s(document.body).toggleClass("czr-customize-content_editor-pane-open",e),s(window)[e?"on":"off"]("resize",function(){r.sekEditorExpanded()&&_.delay(function(){n.czrResizeEditor(window.innerHeight-n.$editorPane.height())},50)}),e?n.czrResizeEditor(window.innerHeight-n.$editorPane.height()):(n.$preview.css("bottom",""),n.$collapseSidebar.css("bottom",""))}),s("#czr-customize-content_editor-pane").on("click",'[data-czr-action="close-tinymce-editor"]',function(){r.sekEditorExpanded(!1)}),s("#customize-controls").on("click",function(e){"open-tinymce-editor"!=s(e.target).data("czr-action")&&r.sekEditorExpanded(!1,{context:"clicked anywhere"})}),s(document).on("keydown",_.throttle(function(e){27===e.keyCode&&r.sekEditorExpanded(!1)},50)),n.bind("sek-tiny-mce-editor-bound-and-instantiated",function(){var e=s(r.sekTinyMceEditor.iframeElement).contents().get(0);s(e).on("keydown",_.throttle(function(e){27===e.keyCode&&r.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?r.previewer.bind(e,function(){r.sekEditorExpanded(!1)}):r.previewer.bind(e,function(e){r.sekEditorExpanded("czr_tiny_mce_editor_module"===e.module_type)})})},attachEventsToEditor:function(){var t=this;t.$editorTextArea=s("#czr-customize-content_editor"),t.$editorPane=s("#czr-customize-content_editor-pane"),t.$editorDragbar=s("#czr-customize-content_editor-dragbar"),t.$editorFrame=s("#czr-customize-content_editor_ifr"),t.$mceTools=s("#wp-czr-customize-content_editor-tools"),t.$mceToolbar=t.$editorPane.find(".mce-toolbar-grp"),t.$mceStatusbar=t.$editorPane.find(".mce-statusbar"),t.$preview=s("#customize-preview"),t.$collapseSidebar=s(".collapse-sidebar"),r.sekTinyMceEditor.on("input change keyup",function(e){if(r.control.has(r.sekEditorSynchronizedInput().control_id))try{r.control(r.sekEditorSynchronizedInput().control_id).trigger("tinyMceEditorUpdated",{input_id:r.sekEditorSynchronizedInput().input_id,html_content:r.sekTinyMceEditor.getContent(),modified_editor_element:r.sekTinyMceEditor})}catch(e){r.errare("Error when triggering tinyMceEditorUpdated",e)}}),t.$editorTextArea.on("input",function(e){try{r.control(r.sekEditorSynchronizedInput().control_id).trigger("tinyMceEditorUpdated",{input_id:r.sekEditorSynchronizedInput().input_id,html_content:t.$editorTextArea.val(),modified_editor_element:t.$editorTextArea})}catch(e){r.errare("Error when triggering tinyMceEditorUpdated",e)}}),s("#czr-customize-content_editor-pane").on("mousedown mouseup",function(e){if(("mousedown"!==e.type||"czr-customize-content_editor-dragbar"===s(e.target).attr("id")||s(e.target).hasClass("czr-resize-handle"))&&r.sekEditorExpanded())switch(e.type){case"mousedown":s(document).on("mousemove.czr-customize-content_editor",function(e){e.preventDefault(),s(document.body).addClass("czr-customize-content_editor-pane-resize"),t.$editorFrame.css("pointer-events","none"),t.czrResizeEditor(e.pageY)});break;case"mouseup":s(document).off("mousemove.czr-customize-content_editor"),s(document.body).removeClass("czr-customize-content_editor-pane-resize"),t.$editorFrame.css("pointer-events","")}})},czrResizeEditor:function(e){var t,i=this,n=window.innerHeight,o=(window.innerWidth,{});r.sekEditorExpanded()&&(_.isNaN(e)||(t=n-e),o.height=t,o.components=i.$mceTools.outerHeight()+i.$mceToolbar.outerHeight()+i.$mceStatusbar.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),i.$editorFrame.css("height",o.height-o.components),i.$collapseSidebar.css("bottom",n-o.height<56?i.$mceStatusbar.outerHeight()+4:o.height+8))}})}(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 s=o();o.initial_unit="px",u.isEmpty(s)||(o.initial_unit=u.isEmpty(s.unit)?"px":s.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,s=d(".sek-spacing-wrapper",r.container),t=l.czr_sektions.getInputRegistrationParams(r.id,r.module.module_type),a=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,{},a);t=u.isObject(t)?d.extend(i,t):i;var n=c(t,e);d("[data-sek-spacing]",s).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)),s.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,s,a),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,s);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,a,c){n.czrInputMap=n.czrInputMap||{},a.extend(n.czrInputMap,{bg_position:function(e){var t=this;a(".sek-bg-pos-wrapper",t.container).on("change",'input[type="radio"]',function(e){t(a(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 s=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?s(e,i[n+1]):{}},i=function(e){var t=a.extend(!0,{},c.isObject(o())?o():{}),i=a.extend(!0,{},r);t=c.isObject(t)?a.extend(i,t):i;var n=s(t,e);o.container.find('input[value="'+n+'"]').attr("checked",!0).trigger("click",{previewed_device_switched:!0})};a(".sek-bg-pos-wrapper",o.container).on("change",'input[type="radio"]',function(e){var t,i=a(this).val();(t=a.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",s=l(i,o.container);c.czr_sektions.maybeSetupDeviceSwitcherForInput.call(o);var a=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?a(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=a(t,e);s.find(".selected").removeClass("selected"),s.find('div[data-sek-align="'+n+'"]').addClass("selected")};s.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"),s.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 a=this,o=a.input_parent,n=function(e,t){o();var n=c('select[data-czrtype="'+a.id+'"]',a.container);l.isNull(a())||l.isEmpty(a())?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,s,i=c("<optgroup>",{label:e.title,html:(t=e.list,r=e.type,s="",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(""):"")==a()?s+='<option selected="selected" value="'+n+'">'+o+"</option>":s+='<option value="'+n+'">'+o+"</option>"}),s)});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",a.container).css(r(a()))},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=s(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"}},s=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:a.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,s,a){r.czrInputMap=r.czrInputMap||{},s.extend(r.czrInputMap,{fa_icon_picker:function(){var n=this,o=!1,e=function(t){!0!==n.iconCollectionSet&&(s.when(s.Deferred(function(t){a.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){a.each(e,function(e){var t={value:e,html:r.CZR_Helpers.capitalize(e.substring(7))};t.value==n()&&(s.extend(t,{selected:"selected"}),o=!0),s("select[data-czrtype]",n.container).append(s("<option>",t))});var t,i=function(e){return e.id?s('<span class="'+e.element.value+'"></span><span class="social-name">&nbsp;&nbsp;'+e.text+"</span>"):e.text};t=o?s("<option>"):s("<option>",{selected:"selected"}),s("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&&a.delay(function(){try{s("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()}),a.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"),s=r.data("editor-params");wp.codeEditor&&(p.isUndefined(s)||!1!==s)&&(t=s),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{a(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 a=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(a,c,l){a.czrInputMap=a.czrInputMap||{},c.extend(a.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"),s=function(e){return l.contains(["px","em","%"],e)||(a.errare("error : invalid unit for input "+t.id,e),e="px"),e};t.css_unit=new a.Value(l.isEmpty(r)?"px":s(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()+s(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(a,_,m){a.czrInputMap=a.czrInputMap||{},_.extend(a.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"]'),s=function(e){return m.contains(["px","em","%"],e)||(a.errare("range_with_unit_picker_device_switcher => error : invalid unit for input "+c.id,e),e="px"),e},t=a.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),s=(o=r,m.isEmpty(o)||!m.isString(o)?"px":o.replace(/[0-9]|\.|,/g,"")),a=(n=r,m.isEmpty(n)||!m.isString(n)?"16":n.replace(/px|em|%/g,""));_(".sek-unit-wrapper",l).find('[data-sek-unit="'+s+'"]').trigger("click",{previewed_device_switched:!0}),l.find('.sek-ui-button[data-sek-unit="'+s+'"]').addClass("is-selected").attr("aria-pressed",!0),d.val(a).trigger("input",{previewed_device_switched:!0})};a.czr_sektions.maybeSetupDeviceSwitcherForInput.call(c),c.css_unit=new a.Value(m.isEmpty(i())?"px":s(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=a.previewedDevice()||"desktop",o=_(this).val()+s(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){a.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=a.previewedDevice(),i=_.extend(!0,{},m.isObject(c())?c():{});m.isEmpty(i[t])||(i=m.omit(i,t),c(i),n(a.previewedDevice()))}),r.val(d.val()||0);try{n(a.previewedDevice())}catch(e){a.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 a=this,c=h(".sek-borders",a.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 "+a.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(a.id,a.module.module_type),f=k.isEmpty(t)||k.isEmpty(t.default)?{}:t.default;a.cssBorderTypes=["top","left","right","bottom"];var i,n,o=function(){var e=a(),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=a(),t="#000000";return k.isObject(e)&&k.has(e,"_all_")&&k.isObject(e._all_)&&!k.isEmpty(e._all_.col)&&(t=e._all_.col),t},s=function(e){if(!k.contains(k.union(a.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=a(),i={},n=h.extend(!0,{},f);k.isObject(t)?i=h.extend(!0,{},t):k.isString(t)&&(i={_all_:{wght:t}});var o,r,s=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(s)||!k.isObject(s)||k.isEmpty(s.wght)||k.isEmpty(s.col))throw new Error("Error in syncWithBorderType : getCurrentBorderTypeOrAllValue must return an object formed : array( 'wght' => '1px', 'col' => '#000000' )");o=m(s.wght),r=_(s.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(s.col).trigger("change"),u.data("border_type_switched",!1)};a.borderColor=new g.Value(k.isEmpty(r())?"#000000":r()),a.css_unit=new g.Value(k.isEmpty(o())?"px":p(o())),a.borderType=new g.Value("_all_"),l.val((i=a(),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 : "+a.module.module_type+" the initial border width is invalid : "+n),n=1),n)),u.val(a.borderColor()),u.wpColorPicker({palettes:!0,width:1440<=window.innerWidth?271:251,change:function(e,t){h(this).val(t.color.toString()).trigger("colorpickerchange"),a.borderColor(t.color.toString(),{border_type_switched:!0===h(this).data("border_type_switched")})},clear:function(e,t){h(this).val("").trigger("colorpickerchange"),a.borderColor("")}}),a.css_unit.bind(function(e,t,i){(!k.isObject(i)||!0!==i.border_type_switched&&!0!==i.initializing_the_unit)&&l.trigger("input",i)}),a.borderColor.bind(function(e,t,i){(!k.isObject(i)||!0!==i.border_type_switched&&!0!==i.initializing_the_color)&&l.trigger("input",i)}),a.borderType.bind(function(e){try{s(e)}catch(e){g.errare("Error when firing syncWithBorderType for input type borders for module type "+a.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=a.borderType()||"_all_",o=a.borderColor(),r=h(this).val()+p(a.css_unit()),s=h.extend(!0,{},f);(i=h.extend(!0,{},k.isObject(a())?a():s))[n]=h.extend(!0,{},i[n]||s[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(a.cssBorderTypes,function(e){i=k.omit(i,e)}),a(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")),a.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)}a.borderType(i,t)}),a.container.on("click",".sek-reset-button",function(e){var t=a.borderType()||"_all_",i=h.extend(!0,{},k.isObject(a())?a():{});k.isEmpty(i[t])||(i=k.omit(i,t),a(i),s(t))}),d.val(l.val()||0);try{s(a.borderType())}catch(e){g.errare("Error when firing syncWithBorderType for input type borders for module type "+a.module.module_type,e)}h('[data-sek-unit="'+a.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 a=this,c=f(".sek-borders",a.container),l=c.find('input[type="number"]'),s=c.find('input[type="range"]'),d=function(e){return g.contains(["px","em","%"],e)||(m.errare("border_radius => error : invalid unit for input "+a.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(a.id,a.module.module_type),_=g.isEmpty(t)||g.isEmpty(t.default)?{}:t.default;a.cssRadiusTypes=["top_left","top_right","bottom_right","bottom_left"];var i,n,o=function(){var e=a(),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=a(),i={},n=f.extend(!0,{},_);g.isObject(t)?i=f.extend(!0,{},t):g.isString(t)&&(i={_all_:"0px"});var o,r,s=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(s)||!g.isString(s))throw new Error("Error in syncWithRadiusType : getCurrentRadiusTypeOrAllValue must return a string like 3em");o=p(s),r=u(s),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})};a.css_unit=new m.Value(g.isEmpty(o())?"px":d(o())),a.radiusType=new m.Value("_all_"),l.val((i=a(),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 : "+a.module.module_type+" the initial radius is invalid : "+n),n=0),n)),a.css_unit.bind(function(e,t,i){(!g.isObject(i)||!0!==i.radius_type_switched&&!0!==i.initializing_the_unit)&&l.trigger("input",i)}),a.radiusType.bind(function(e){try{r(e)}catch(e){m.errare("Error when firing syncWithRadiusType for input type border_radius for module type "+a.module.module_type,e)}}),s.on("input",function(e){l.val(f(this).val()).trigger("input")}),l.on("input",function(e,t){var i,n=a.radiusType()||"_all_",o=f(this).val()+d(a.css_unit()),r=f.extend(!0,{},_);(i=f.extend(!0,{},g.isObject(a())?a():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(a.cssRadiusTypes,function(e){i=g.omit(i,e)}),a(i)),s.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")),a.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)}a.radiusType(i,t)}),a.container.on("click",".sek-reset-button",function(e){var t=a.radiusType()||"_all_",i=f.extend(!0,{},g.isObject(a())?a():{});g.isEmpty(i[t])||(i=g.omit(i,t),a(i),r(t))}),s.val(l.val()||0);try{r(a.radiusType())}catch(e){m.errare("Error when firing syncWithRadiusType for input type border_radius for module type "+a.module.module_type,e)}f('[data-sek-unit="'+a.css_unit()+'"]',c).trigger("click",{initializing_the_unit:!0})}})}(wp.customize,jQuery,_),function(r,s,a){r.czrInputMap=r.czrInputMap||{},s.extend(r.czrInputMap,{buttons_choice:function(e){var n=this,o=s(".sek-button-choice-wrapper",n.container),t=o.find('input[type="number"]'),i=r.czr_sektions.getInputRegistrationParams(n.id,n.module.module_type);a.isEmpty(i)||a.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),s(this).addClass("is-selected").attr("aria-pressed",!0);try{i=s(this).data("sek-choice")}catch(e){r.errare("buttons_choice input type => error when attaching click event",e)}n(i)}),s('[data-sek-choice="'+n()+'"]',o).trigger("click",{initializing_the_unit:!0})}})}(wp.customize,jQuery,_),function(i,n,e){i.czrInputMap=i.czrInputMap||{},n.extend(i.czrInputMap,{reset_button:function(e){this.container.on("click","[data-sek-reset-scope]",function(e,t){if(e.stopPropagation(),"local"===n(this).data("sek-reset-scope"))try{i.czr_sektions.resetCollectionSetting()}catch(e){i.errare("reset_button => error when firing resetCollectionSetting() on click event",e)}})}})}(wp.customize,jQuery,_),function(i,r,s){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){s.isEmpty(o.sek_revisionHistory)?i.czr_sektions.getRevisionHistory({is_local:"local_revisions"===o.id}).done(function(e){if(!s.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(s.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=[];s.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(" ")),s.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&&s.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})}),s.delay(function(){t({open_on_init:!1})},1e3)}})}(wp.customize,jQuery,_),function(o,r,s){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:s.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"),s.each(i.controls(),function(e){s.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=["sek_intro_sec_picker_module","sek_features_sec_picker_module","sek_contact_sec_picker_module","sek_column_layouts_sec_picker_module"];sektionsLocalizedData.isNimbleHeaderFooterEnabled&&(n=i.union(n,["sek_header_sec_picker_module","sek_footer_sec_picker_module"])),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:!0,defaultItemModel:i.extend({id:"",title:""},t.czr_sektions.getDefaultItemModelFromRegisteredModuleData(e))}})}(wp.customize,jQuery,_),function(r,e,s){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="";s.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>",s.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:!0,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,s){var t={initialize:function(e,t){var i=this;i.inputConstructor=r.CZRInput.extend(i.CZRInputMths||{}),i.itemConstructor=r.CZRItem.extend(i.CZRItemConstructor||{}),r.CZRDynModule.prototype.initialize.call(i,e,t)},CZRInputMths:{setupSelect:function(){r.czr_sektions.setupSelectInput.call(this)}},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!s.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":s.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=!s.isEmpty(i()+"")&&r.CZR_Helpers.isChecked(n.czr_Input("bg-apply-overlay")());break;case"bg-parallax-force":e=!s.isEmpty(i()+"")&&r.CZR_Helpers.isChecked(n.czr_Input("bg-parallax")());break;case"bg-scale":case"bg-repeat":e=!s.isEmpty(i()+"")&&!r.CZR_Helpers.isChecked(n.czr_Input("bg-parallax")());break;default:e=!s.isEmpty(i()+"")}return e})}catch(e){r.errare(o.id+" => error in setInputVisibilityDeps",e)}});break;case"bg-apply-overlay":s.each(["bg-color-overlay","bg-opacity-overlay"],function(e){try{r.czr_sektions.scheduleVisibilityOfInputId.call(i,e,function(){return!s.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":s.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=!s.isEmpty(n.czr_Input("bg-image")()+"")&&r.CZR_Helpers.isChecked(i());break;case"bg-repeat":case"bg-scale":e=!s.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:s.extend({id:"",title:""},r.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_bg_module"))}})}(wp.customize,jQuery,_),function(n,e,o){var t={initialize:function(e,t){var i=this;i.inputConstructor=n.CZRInput.extend(i.CZRInputMths||{}),i.itemConstructor=n.CZRItem.extend(i.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(i,e,t)},CZRInputMths:{setupSelect:function(){n.czr_sektions.setupSelectInput.call(this)}},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){var i=this;i.inputConstructor=n.CZRInput.extend(i.CZRInputMths||{}),i.itemConstructor=n.CZRItem.extend(i.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(i,e,t)},CZRInputMths:{setupSelect:function(){n.czr_sektions.setupSelectInput.call(this)}},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(n,e,i){var t={initialize:function(e,t){var i=this;i.inputConstructor=n.CZRInput.extend(i.CZRInputMths||{}),i.itemConstructor=n.CZRItem.extend(i.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(i,e,t)},CZRInputMths:{setupSelect:function(){n.czr_sektions.setupSelectInput.call(this)}},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!i.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(e){switch(e.id){case"width-type":n.czr_sektions.scheduleVisibilityOfInputId.call(e,"custom-width",function(){return"custom"===e()}),n.czr_sektions.scheduleVisibilityOfInputId.call(e,"h_alignment",function(){return"custom"===e()})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{sek_level_width_module:{mthds:t,crud:!1,name:n.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:i.extend({id:"",title:""},n.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_level_width_module"))}})}(wp.customize,jQuery,_),function(n,e,i){var t={initialize:function(e,t){var i=this;i.inputConstructor=n.CZRInput.extend(i.CZRInputMths||{}),i.itemConstructor=n.CZRItem.extend(i.CZRItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(i,e,t)},CZRInputMths:{setupSelect:function(){n.czr_sektions.setupSelectInput.call(this)}},CZRItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!i.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(e){switch(e.id){case"use-custom-outer-width":n.czr_sektions.scheduleVisibilityOfInputId.call(e,"outer-section-width",function(){return e()});break;case"use-custom-inner-width":n.czr_sektions.scheduleVisibilityOfInputId.call(e,"inner-section-width",function(){return e()})}})}}};n.czrModuleMap=n.czrModuleMap||{},e.extend(n.czrModuleMap,{sek_level_width_section:{mthds:t,crud:!1,name:n.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:i.extend({id:"",title:""},n.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(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),i.CZRDynModule.prototype.initialize.call(this,e,t)}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_local_template:{mthds:n,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_local_template","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:t.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_template"))}})}(wp.customize,jQuery,_),function(i,e,n){var t={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),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(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),i.CZRDynModule.prototype.initialize.call(this,e,t)}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_local_performances:{mthds:n,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_local_performances","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:t.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_local_performances"))}})}(wp.customize,jQuery,_),function(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),i.CZRDynModule.prototype.initialize.call(this,e,t)}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_local_header_footer:{mthds:n,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_local_header_footer","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:t.extend({id:"",title:""},i.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(i,e,n){var t={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),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.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),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(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),i.CZRDynModule.prototype.initialize.call(this,e,t)}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{sek_global_header_footer:{mthds:n,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("sek_global_header_footer","name"),has_mod_opt:!1,ready_on_section_expanded:!0,defaultItemModel:t.extend({id:"",title:""},i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("sek_global_header_footer"))}})}(wp.customize,jQuery,_),function(r,e,s){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(!s.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":s.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":s.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:s.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_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){var i=this;i.inputConstructor=o.CZRInput.extend({setupSelect:function(){o.czr_sektions.setupSelectInput.call(this)}}),i.itemConstructor=o.CZRItem.extend(i.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(i,e,t),i.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.inputConstructor=n.CZRInput.extend({setupSelect:function(){n.czr_sektions.setupSelectInput.call(this)}}),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;"tiny_mce_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)},setupSelect:function(){n.czr_sektions.setupSelectInput.call(this)}}};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.inputConstructor=n.CZRInput.extend({setupSelect:function(){n.czr_sektions.setupSelectInput.call(this)}}),this.itemConstructor=n.CZRItem.extend(this.CZRFPItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRFPItemConstructor:{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,s){var t={initialize:function(e,t){var i=this;i.inputConstructor=r.CZRInput.extend({setupSelect:function(){r.czr_sektions.setupSelectInput.call(this)}}),i.itemConstructor=r.CZRItem.extend(i.CZRIconItemConstructor||{}),i.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(i,e,t)},CZRIconItemConstructor:{ready:function(){var t=this;t.inputCollection.bind(function(e){if(!s.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":s.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":s.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.inputConstructor=n.CZRInput.extend({setupSelect:function(){n.czr_sektions.setupSelectInput.call(this)}}),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){var i=this;i.inputConstructor=o.CZRInput.extend(i.CZRHeadingInputMths||{}),i.itemConstructor=o.CZRItem.extend(i.CZRItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(i,e,t),i.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})},CZRHeadingInputMths:{setupSelect:function(){o.czr_sektions.setupSelectInput.call(this)}},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(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend(this.CZRHeadingInputMths||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRHeadingInputMths:{setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_heading_spacing_child:{mthds:n,crud:!1,name:i.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:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_heading_spacing_child")}})}(wp.customize,jQuery,_),function(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend(this.CZRDividerInputMths||{}),i.CZRDynModule.prototype.initialize.call(this,e,t)},CZRDividerInputMths:{setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_divider_module:{mthds:n,crud:!1,name:i.czr_sektions.getRegisteredModuleProperty("czr_divider_module","name"),has_mod_opt:!1,ready_on_section_expanded:!1,ready_on_control_event:"sek-accordion-expanded",defaultItemModel:i.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.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),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(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),i.CZRDynModule.prototype.initialize.call(this,e,t)}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_quote_quote_child:{mthds:n,crud:!1,name:i.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:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_quote_quote_child")}})}(wp.customize,jQuery,_),function(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),i.CZRDynModule.prototype.initialize.call(this,e,t)}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_quote_cite_child:{mthds:n,crud:!1,name:i.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:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_quote_cite_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){var i=this;i.inputConstructor=o.CZRInput.extend({setupSelect:function(){o.czr_sektions.setupSelectInput.call(this)}}),i.itemConstructor=o.CZRItem.extend(i.CZRButtonItemConstructor||{}),i.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(i,e,t)},CZRButtonItemConstructor:{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.inputConstructor=n.CZRInput.extend({setupSelect:function(){n.czr_sektions.setupSelectInput.call(this)}}),this.itemConstructor=n.CZRItem.extend(this.CZRButtonItemConstructor||{}),n.CZRDynModule.prototype.initialize.call(this,e,t)},CZRButtonItemConstructor:{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(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),i.CZRDynModule.prototype.initialize.call(this,e,t)}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_menu_content_child:{mthds:n,crud:!1,name:i.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:i.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.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),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.inputConstructor=n.CZRInput.extend({setupSelect:function(){n.czr_sektions.setupSelectInput.call(this)}}),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.inputConstructor=n.CZRInput.extend({setupSelect:function(){n.czr_sektions.setupSelectInput.call(this)}}),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(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),i.CZRDynModule.prototype.initialize.call(this,e,t)}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_simple_form_fonts_child:{mthds:n,crud:!1,name:i.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:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_fonts_child")}})}(wp.customize,jQuery,_),function(i,e,t){var n={initialize:function(e,t){this.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this)}}),i.CZRDynModule.prototype.initialize.call(this,e,t)}};i.czrModuleMap=i.czrModuleMap||{},e.extend(i.czrModuleMap,{czr_simple_form_submission_child:{mthds:n,crud:!1,name:i.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:i.czr_sektions.getDefaultItemModelFromRegisteredModuleData("czr_simple_form_submission_child")}})}(wp.customize,jQuery,_),function(o,e,r){var t={initialize:function(e,t){this.inputConstructor=o.CZRInput.extend({setupSelect:function(){o.czr_sektions.setupSelectInput.call(this)}}),this.itemConstructor=o.CZRItem.extend(this.CZRButtonItemConstructor||{}),o.CZRDynModule.prototype.initialize.call(this,e,t)},CZRButtonItemConstructor:{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.inputConstructor=i.CZRInput.extend({setupSelect:function(){i.czr_sektions.setupSelectInput.call(this,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
@@ -853,21 +853,33 @@ var SekPreviewPrototype = SekPreviewPrototype || {};
853
  // Let's prepare the is_last and is_first params that we are going to send to the js template
854
  // => this will determine which up / down arrow to display in the UI menu for moving a section
855
  var $parentLocation = $levelEl.closest('div[data-sek-level="location"]'),
 
 
856
  _is_last_section,
857
- _is_first_section;
858
-
859
- if ( $parentLocation.length > 0 ) {
860
- var $sectionCollection = $parentLocation.children( 'div[data-sek-level="section"]' );
861
- _is_last_section = $sectionCollection.length == $levelEl.index() + 1;
862
- _is_first_section = 0 === $levelEl.index();
 
 
 
 
 
 
 
 
 
 
863
  }
864
 
865
  params = _.extend( params, {
866
- is_nested : true === $levelEl.data('sek-is-nested'),
867
  can_have_more_columns : $levelEl.find('.sek-sektion-inner').first().children( 'div[data-sek-level="column"]' ).length < 12,
868
  is_global_location : true === $parentLocation.data('sek-is-global-location'),
869
- is_last_section_in_location : _is_last_section,
870
- is_first_section_in_location : _is_first_section,
871
  is_header_location : true === $parentLocation.data('sek-is-header-location'),
872
  is_footer_location : true === $parentLocation.data('sek-is-footer-location')
873
  });
853
  // Let's prepare the is_last and is_first params that we are going to send to the js template
854
  // => this will determine which up / down arrow to display in the UI menu for moving a section
855
  var $parentLocation = $levelEl.closest('div[data-sek-level="location"]'),
856
+ $parentColumn = $levelEl.closest('div[data-sek-level="column"]'),
857
+ $sectionCollection,
858
  _is_last_section,
859
+ _is_first_section,
860
+ _is_nested = true === $levelEl.data('sek-is-nested');
861
+
862
+ // information about first and last section is used when rendering the up / down moving arrows
863
+ if ( _is_nested ) {
864
+ if ( $parentColumn.length > 0 ) {
865
+ $sectionCollection = $parentColumn.find('.sek-column-inner').first().children( 'div[data-sek-level]' );
866
+ _is_last_section = $sectionCollection.length == $levelEl.index() + 1;
867
+ _is_first_section = 0 === $levelEl.index();
868
+ }
869
+ } else {
870
+ if ( $parentLocation.length > 0 ) {
871
+ $sectionCollection = $parentLocation.children( 'div[data-sek-level="section"]' );
872
+ _is_last_section = $sectionCollection.length == $levelEl.index() + 1;
873
+ _is_first_section = 0 === $levelEl.index();
874
+ }
875
  }
876
 
877
  params = _.extend( params, {
878
+ is_nested : _is_nested,
879
  can_have_more_columns : $levelEl.find('.sek-sektion-inner').first().children( 'div[data-sek-level="column"]' ).length < 12,
880
  is_global_location : true === $parentLocation.data('sek-is-global-location'),
881
+ is_last_section_in_parent : _is_last_section,
882
+ is_first_section_in_parent : _is_first_section,
883
  is_header_location : true === $parentLocation.data('sek-is-header-location'),
884
  is_footer_location : true === $parentLocation.data('sek-is-footer-location')
885
  });
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(p,m,h){m.extend(SekPreviewPrototype,{setupSortable:function(){var a=this;return this.sortableDefaultParams={placeholder:"sortable-placeholder",over:function(e,t){},cursorAt:{top:0,left:0},tolerance:"pointer"},m('[data-sek-level="location"]').each(function(){a.makeSektionsSortableInLocation(m(this).data("sek-id"))}),m("body").on("sek-section-added sek-level-refreshed",'[data-sek-level="location"]',function(e,t){a.makeSektionsSortableInLocation(m(this).data("sek-id"))}),m('[data-sek-level="location"]').each(function(){m(this).find('[data-sek-level="section"]').each(function(){a.makeColumnsSortableInSektion(m(this).data("sek-id"))})}),m("body").on("sek-columns-refreshed sek-section-added",'[data-sek-level="section"]',function(e){a.makeColumnsSortableInSektion(m(this).data("sek-id"))}),m("body").on("sek-level-refreshed",'[data-sek-level="location"]',function(e,t){m(this).find('[data-sek-level="section"]').each(function(){a.makeColumnsSortableInSektion(m(this).data("sek-id"))})}),m('[data-sek-level="location"]').each(function(){m(this).find('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(m(this).data("sek-id"))})}),m("body").on("sek-modules-refreshed",'[data-sek-level="column"]',function(){a.makeModulesSortableInColumn(m(this).data("sek-id"))}),m("body").on("sek-columns-refreshed",'[data-sek-level="section"]',function(){m(this).find(".sek-sektion-inner").first().children('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(m(this).data("sek-id"))})}),m("body").on("sek-level-refreshed",'[data-sek-level="location"]',function(e,t){m(this).find('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(m(this).data("sek-id"))})}),m("body").on("sek-section-added",'[data-sek-level="location"]',function(e,t){m(this).find('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(m(this).data("sek-id"))})}),this},makeSektionsSortableInLocation:function(e){var a,i,t,n=this,s=[],o=[];m('[data-sek-id="'+e+'"]').each(function(){!0!==m(this).data("sek-is-global-location")&&(t=m.extend(!0,{},n.sortableDefaultParams),m(this).sortable(h.extend(t,{handle:".sek-move-section",connectWith:'[data-sek-is-global-location="false"]',placeholder:{element:function(e){return m('<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){m("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(m(this).data("sek-id"))})},stop:function(e,t){m("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(m(this).data("sek-id"))}),p.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=m.extend(!0,{},o.sortableDefaultParams),d=[],r=[],l=m('[data-sek-id="'+e+'"]').find(".sek-sektion-inner").first(),c=function(e){if(e=m.extend({forTarget:!0},e||{}),!h.isEmpty(m(this).data("_sortable_columns_css_classes_")))return m(this).data("_sortable_columns_css_classes_");var t,a=m(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 m(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=m(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]');!0!==m(this).data("sek-is-sender")?(a=c.call(m(this)),h.isEmpty(a)||i.each(function(){m(this).removeClass(a.current).addClass(a.next)})):(a=c.call(m(this),{forTarget:!1}),h.isEmpty(a)||i.each(function(){m(this).addClass(a.current).removeClass(a.next)}))},out:function(e,t){var a,i=m(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]');!0!==m(this).data("sek-is-sender")?(a=c.call(m(this)),h.isEmpty(a)||i.each(function(){m(this).addClass(a.current).removeClass(a.next)})):(a=c.call(m(this),{forTarget:!1}),h.isEmpty(a)||i.each(function(){m(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?(p.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)||(p.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"),d=[],r=[],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(){d.push(m(this).data("sek-id"))}),m(this).data("sek-is-sender",!0),h.isEmpty(d)&&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(){r.push(m(this).data("sek-id"))});var a,i=m(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]');!0!==m(this).data("sek-is-sender")?(a=c.call(m(this)),h.isEmpty(a)||i.each(function(){m(this).removeClass(a.current).addClass(a.next)})):(a=c.call(m(this),{forTarget:!1}),h.isEmpty(a)||i.each(function(){m(this).addClass(a.current).removeClass(a.next)})),m('[data-sek-level="section"]').find(".sek-sektion-inner").each(function(){m(this).data("sek-is-sender",null).data("_sortable_columns_css_classes_",null)}),h.isEmpty(r)?o.errare("column sortable => newOrder should not be empty"):h.isEqual(r,d)&&to_sektion===from_sektion?sekPreviewLocalized.isDevMode&&o.errare("preview => makeModulesSortableInColumn => start and stop positions are identical"):p.preview.send("sek-move",{id:t.item.data("sek-id"),level:"column",newOrder:r,from_sektion:from_sektion,to_sektion:to_sektion})}}))},makeModulesSortableInColumn:function(e){var a,i,n,s,t,o,d,r,l,c=[],k=[],u=this;t=m.extend(!0,{},u.sortableDefaultParams),m('[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){m('[data-sek-level="location"]').find(".sek-sortable-overing").each(function(){m(this).removeClass("sek-sortable-overing")}),m(e.target).addClass("sek-sortable-overing")},remove:function(e,t){r=t.item.closest('[data-sek-level="location"]'),to_location=r.data("sek-id"),l=!0===r.data("sek-is-global-location");var a=to_location!=from_location;return!(d!==l||!0===d&&!0===l&&a)||(p.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"),d=!0===o.data("sek-is-global-location"),c=[],k=[],m("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(m(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(m(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"):(p.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")}),m("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,d,r,e=c(this).find(".sek-sektion-inner").first().children('div[data-sek-level="column"]');e.length<2||e.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");r=n.index()+1==o,d=r?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:d.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,u,p){u.extend(SekPreviewPrototype,{printLevelUI:function(e){var t,a,i,n;if((p.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 d,r,l=n.closest('div[data-sek-level="location"]');if(0<l.length)d=l.children('div[data-sek-level="section"]').length==n.index()+1,r=0===n.index();i=p.extend(i,{is_nested:!0===n.data("sek-is-nested"),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_location:d,is_first_section_in_location:r,is_header_location:!0===l.data("sek-is-header-location"),is_footer_location:!0===l.data("sek-is-footer-location")});break;case"column":var c=n.closest('div[data-sek-level="section"]');i=p.extend(i,{parent_can_have_more_columns:c.find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').length<12,parent_is_single_column:c.find(".sek-sektion-inner").first().children('div[data-sek-level="column"]').length<2,parent_is_last_allowed_nested:!0===c.data("sek-is-nested")});break;case"module":var k=this.getRegisteredModuleProperty(n.data("sek-module-type"),"name");i=p.extend(i,{module_name:"not_set"!=k?k:""})}!0===u(".sektion-wrapper").data("sek-resizing-columns")&&p.contains(["column","module"],a)||(t=this.parseTemplate("#sek-dyn-ui-tmpl-"+a),u.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,d=function(){(e=u(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(){u(this).remove(),e.data("UIisFadingOut",!1)}}))},a=function(){var e=u(this);clearTimeout(e.data("_toggle_ui_menu_")),e.data("_toggle_ui_menu_",setTimeout(function(){n.call(e)},1e4))},n=function(e){var t=u(this),a=u(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())};u("body").on("click",".sek-dyn-ui-location-inner",function(e){var t=u(this).find(".sek-dyn-ui-hamb-menu-wrapper");u(this).closest('[data-sek-level="section"]').find(".sek-dyn-ui-hamb-menu-wrapper").each(function(){n.call(u(this))}),n.call(t,!0),a.call(t)}),u("body").on("mouseenter mouseover mouseleave",".sek-dyn-ui-wrapper",p.throttle(function(e){var t=u(this).find(".sek-dyn-ui-hamb-menu-wrapper");p.isUndefined(t.data("_toggle_ui_menu_"))||t.hasClass("sek-collapsed")||0<t.length&&a.call(t)},50)),u("body").on("click",".sek-minimize-ui",function(e){u(this).closest(".sek-dyn-ui-location-type").slideToggle("fast")}),u("body").on("mouseenter",".sek-wp-content-wrapper",function(e){0<(t=u(this)).children(".sek-dyn-ui-wrapper").length&&!0!==t.data("UIisFadingOut")||(i=o.parseTemplate("#sek-dyn-ui-tmpl-wp-content"),u.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){u(this).data("UIisFadingOut",!0),t=u(this),u(this).children(".sek-dyn-ui-wrapper").stop(!0,!0).fadeOut({duration:150,complete:function(){u(this).remove(),t.data("UIisFadingOut",!1)}})});var r=function(n,e){var t,s;p.isUndefined(e)||e.length<1?(t=u("body").find("[data-sek-level]"),s="printOrScheduleRemoval"):(t=e,s="mayBeRemove"),t.each(function(){var e=u(this)[0].getBoundingClientRect(),t=n.x<=e.right&&e.left<=n.x,a=n.y>=e.top&&e.bottom>=n.y,i=u(this);switch(s){case"mayBeRemove":i.data("sek-ui-removal-scheduled",!1),t&&a||d.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?r(n,i):p.delay(function(){!0===i.data("sek-ui-removal-scheduled")&&r(o.mouseMovedRecently(),i)},3500))}})};o.mouseMovedRecently=new l.Value({}),o.mouseMovedRecently.bind(function(e){var k,t,a;p.isEmpty(e)?(u("body").stop(!0,!0).find(".sek-add-content-button").each(function(){u(this).fadeOut({duration:200,complete:function(){u(this).remove()}})}),u("body").stop(!0,!0).find("[data-sek-level]").each(function(){u(this).children(".sek-dyn-ui-wrapper").find(".sek-is-expanded").length<1&&d.call(u(this))})):(u("body").find('div[data-sek-level="location"]').each(function(){var e;$sectionCollection=u(this).children('div[data-sek-level="section"]'),i=o.parseTemplate("#sek-tmpl-add-content-button"),t=u(this).data("sek-id"),a=!0===u(this).data("sek-is-global-location"),$sectionCollection.each(function(){0<u(this).find(".sek-add-content-button").length||(u.when(u(this).prepend(i({location:t,is_global_location:a}))).done(function(){e=u(this).find(".sek-add-content-button"),u(this).data("sek-id")&&e.attr("data-sek-before-section",u(this).data("sek-id")),e.fadeIn(300)}),$sectionCollection.length==u(this).index()+1&&u.when(u(this).append(i({is_last:!0,location:t,is_global_location:a}))).done(function(){e=u(this).find(".sek-add-content-button").last(),u(this).data("sek-id")&&e.attr("data-sek-after-section",u(this).data("sek-id")),e.fadeIn(300)}))})}),u(".sek-empty-location-placeholder").each(function(){0<u(this).find(".sek-add-content-button").length||(t=u(this).closest('div[data-sek-level="location"]').data("sek-id"),a=!0===u(this).closest('div[data-sek-level="location"]').data("sek-is-global-location"),u.when(u(this).append(i({location:t,is_global_location:a}))).done(function(){$btn_el=u(this).find(".sek-add-content-button"),$btn_el.attr("data-sek-is-first-section",!0),$btn_el.fadeIn(300)}))}),k=e,u("body").find(".sek-add-content-button").each(function(){var e=u(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,d=i<40||n<40,r=0<s&&s<40||0<o&&o<40,l=a<=e.right&&e.left<=a,c=t>=e.top&&e.bottom>=t;u(this).toggleClass("sek-mouse-is-close",(d||c)&&(r||l))}),r(e))});var s=function(){clearTimeout(u(window).data("_scroll_move_timer_")),o.mouseMovedRecently.set({})};return u(window).on("mousemove scroll",p.throttle(function(e){o.mouseMovedRecently({x:e.clientX,y:e.clientY}),clearTimeout(u(window).data("_scroll_move_timer_")),u(window).data("_scroll_move_timer_",setTimeout(function(){o.mouseMovedRecently.set({})},4e3))},50)),l.preview.bind("sek-drag-start",function(){s()}),u("body").on("sek-section-added",'[data-sek-level="location"]',function(e,t){s()}),this}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(u,p,m){p.extend(SekPreviewPrototype,{scheduleUiClickReactions:function(){var k=this;p("body").on("click",function(e){u.preview.send("sek-clean-target-drop-zone");var t,a=p(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"),d=n.data("sek-level"),r=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":!m.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":m.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"),m.isEmpty(t))throw new Error("Invalid action");if(m.isEmpty(d)||m.isEmpty(r))throw new Error("ERROR => sek-front-preview => No valid level id found");k._send_(a,{action:t,location:o,level:d,id:r,was_triggered:!1});break;case"moduleWrapper":if(0<a.parent(".sek-dyn-ui-icons").length)return;k._send_(a,{action:"edit-module",level:d,id:r});break;case"noModulesColumn":if(0<a.parent(".sek-dyn-ui-icons").length)return;k._send_(a,{action:"pick-content",content_type:"module",level:d,id:r});break;case"columnOutsideModules":case"sectionOutsideColumns":k._send_(a,{action:"edit-options",location:o,level:d,id:r});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:r});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");m.isEmpty(c)||window.open(c,"_blank");break;case"inactiveZone":u.preview.send("sek-click-on-inactive-zone")}})},_send_:function(e,t){var a=p.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,m.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,d,r){d.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=d('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):((r.isEmpty(a)||i.length<1)&&o.errare("reactToPanelMsg => sek-remove => invalid candidate id => ",a),d("body").find(i).remove(),d('[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 r.isEmpty(t)?d.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),d('[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 => ajax_response.data.contents is undefined ",e);var a='<span class="sek-placeholder" data-sek-placeholder-for="'+s.apiParams.id+'"></span>',i=d('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=d('[data-sek-placeholder-for="'+s.apiParams.id+'"]');i.remove(),r.isUndefined(t)?o.errare("reactToPanelMsg => sek-refresh-level ajax done => missing html_content",e):n.after(t),n.remove(),d('[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=d.extend(!0,{},e),a=d.extend(!0,{},e);d('[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=r.extend(t.apiParams,{in_sektion:e.apiParams.from_sektion,action:"sek-refresh-columns-in-sektion"}),o.ajaxRefreshColumns(t)),a.apiParams=r.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=d.extend(!0,{},e),n=d.extend(!0,{},e);i.apiParams.from_column!=i.apiParams.to_column&&(i.apiParams=r.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=r.extend(n.apiParams,{in_column:n.apiParams.to_column,in_sektion:n.apiParams.to_sektion,action:"sek-refresh-modules-in-column"}),o.ajaxRefreshModulesAndNestedSections(n),d('[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;d('[data-sek-level="location"]').children('[data-sek-level="section"]').each(function(){var e=d(this).data("sek-id"),t=d(this).find('[data-sek-level="column"]').length,a=d(this).find('[data-sek-level="module"]').length,i=t<2&&a<1;!o&&!i&&d('[data-drop-zone-before-section="'+e+'"]').length<1&&d(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!=d(".sektion-wrapper").children('[data-sek-level="section"]').length||d(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}),d(".sek-empty-location-placeholder").each(function(){d.when(d(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&&d('[data-sek-level="column"]').each(function(){var e=d(this).children(".sek-column-inner").children('[data-sek-level="module"]'),t=d(this).children(".sek-column-inner").children('[data-sek-is-nested="true"]');e=e.add(t);var a=1;e.each(function(){d('[data-drop-zone-before-module-or-nested-section="'+d(this).data("sek-id")+'"]').length<1&&d(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="'+d(this).data("sek-id")+'"></div>'),a==e.length&&d('[data-drop-zone-after-module-or-nested-section="'+d(this).data("sek-id")+'"]').length<1&&d(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="'+d(this).data("sek-id")+'"></div>'),a++})}),d("body").addClass("sek-dragging"),r.delay(function(){d(".sek-dynamic-drop-zone").css({opacity:1})},100)},"sek-drag-stop":function(e){d("body").removeClass("sek-dragging"),d(".sortable-placeholder").remove(),d(".sek-dynamic-drop-zone").remove()},"sek-animate-to-level":function(e){var t=d('[data-sek-id="'+e.id+'"]');0<t.length&&d("html, body").animate({scrollTop:t.offset().top-100},200)},"sek-display-level-ui":function(e){var t=d('[data-sek-id="'+e.id+'"]');0<t.length&&(t.trigger("click"),o.printLevelUI(t))},"sek-set-double-click-target":function(e){if(d(".sek-target-for-double-click-insertion").removeClass("sek-target-for-double-click-insertion"),r.isObject(e)&&e.id){var t=d('[data-sek-id="'+e.id+'"]');1===t.length&&t.addClass("sek-target-for-double-click-insertion")}},"sek-reset-double-click-target":function(e){d(".sek-target-for-double-click-insertion").removeClass("sek-target-for-double-click-insertion")}};r.each(e,function(e,i){s.preview.bind(i,function(a){a=r.extend({location_skope_id:"",apiParams:{},uiParams:{}},a||{});d("body").addClass(i);try{d.when(r.isFunction(e)?e(a):o[e].call(o,a)).done(function(e){var t;t=e,s.preview.send([i,"done"].join("_"),a),r.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){d("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),d("body").removeClass(i)}})})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,o,d){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 => ajax_response.data.contents is undefined ",e),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||d.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+'"]'),!d.isEmpty(n.apiParams.before_section)&&0<$beforeCandidate.length?$beforeCandidate.before(a):!d.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,d,e){d.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 => ajax_response.data.contents is undefined ",e);var a=d('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(),d(".sektion-wrapper").find(".sek-placeholder").after(t),d(".sektion-wrapper").find(".sek-placeholder").remove(),o.preview.trigger("sek-refresh-stylesheet",n),d('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),d('[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 => ajax_response.data.contents is undefined ",e),d('[data-sek-id="'+a.apiParams.resized_column+'"]').css({width:"",height:""}),i.appendDynStyleSheet(a.location_skope_id,t),d('div[data-sek-id="'+a.apiParams.in_sektion+'"]').trigger("sek-columns-refreshed")}).fail(function(e){i.errare("ERROR reactToPanelMsg => sek-resize-columns => ",e),d('[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 => ajax_response.data.contents is undefined ",e);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.errare("SekPreviewPrototype => ajax_response.data.contents is undefined ",e),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(),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,d){o.extend(SekPreviewPrototype,{parseTemplate:d.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||d.template(o(t).html(),n)}catch(e){i.errare("preview => parseTemplate => problem when parsing tmpl =>"+t,e)}return a(e)}}),_prettyPrintLog:function(e){e=d.extend({bgCol:"#5ed1f5",textCol:"#000",consoleArguments:[]},e);var t,a=Array.from(e.consoleArguments);return a=d.isEmpty(d.filter(a,function(e){return!d.isString(e)}))?a.join(" "):JSON.stringify(a.join(" ")),["%c "+(t=a,d.isString(t)?300<t.length?t.substr(0,299)+"...":t:""),["background:"+e.bgCol,"color:"+e.textCol,"display: block;"].join(";")]},_wrapLogInsideTags:function(e,t,a){d.isUndefined(console)&&"function"!=typeof window.console.log||(sekPreviewLocalized.isDevMode?d.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||(d.isObject(e)?e:{})).ajaxUrl||sekPreviewLocalized.ajaxUrl,i=sekPreviewLocalized.frontNonce,n=o.Deferred(),s=d.extend({action:"",withNonce:!1},e);return"https:"==document.location.protocol&&(a=a.replace("http://","https://")),d.isEmpty(s.action)||!d.isString(s.action)?(t.errare("self.doAjax : unproper action provided"),n.resolve().promise()):(s[i.id]=i.handle,!d.isObject(i)||d.isUndefined(i.id)||d.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&&!d.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 d.isUndefined(e)&&a.errare("getLevelModel => a collection must be provided"),d.each(e,function(e){"no_match"==i&&(t===e.id?i=e:d.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(p,m,h){m.extend(SekPreviewPrototype,{setupSortable:function(){var a=this;return this.sortableDefaultParams={placeholder:"sortable-placeholder",over:function(e,t){},cursorAt:{top:0,left:0},tolerance:"pointer"},m('[data-sek-level="location"]').each(function(){a.makeSektionsSortableInLocation(m(this).data("sek-id"))}),m("body").on("sek-section-added sek-level-refreshed",'[data-sek-level="location"]',function(e,t){a.makeSektionsSortableInLocation(m(this).data("sek-id"))}),m('[data-sek-level="location"]').each(function(){m(this).find('[data-sek-level="section"]').each(function(){a.makeColumnsSortableInSektion(m(this).data("sek-id"))})}),m("body").on("sek-columns-refreshed sek-section-added",'[data-sek-level="section"]',function(e){a.makeColumnsSortableInSektion(m(this).data("sek-id"))}),m("body").on("sek-level-refreshed",'[data-sek-level="location"]',function(e,t){m(this).find('[data-sek-level="section"]').each(function(){a.makeColumnsSortableInSektion(m(this).data("sek-id"))})}),m('[data-sek-level="location"]').each(function(){m(this).find('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(m(this).data("sek-id"))})}),m("body").on("sek-modules-refreshed",'[data-sek-level="column"]',function(){a.makeModulesSortableInColumn(m(this).data("sek-id"))}),m("body").on("sek-columns-refreshed",'[data-sek-level="section"]',function(){m(this).find(".sek-sektion-inner").first().children('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(m(this).data("sek-id"))})}),m("body").on("sek-level-refreshed",'[data-sek-level="location"]',function(e,t){m(this).find('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(m(this).data("sek-id"))})}),m("body").on("sek-section-added",'[data-sek-level="location"]',function(e,t){m(this).find('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(m(this).data("sek-id"))})}),this},makeSektionsSortableInLocation:function(e){var a,i,t,n=this,s=[],o=[];m('[data-sek-id="'+e+'"]').each(function(){!0!==m(this).data("sek-is-global-location")&&(t=m.extend(!0,{},n.sortableDefaultParams),m(this).sortable(h.extend(t,{handle:".sek-move-section",connectWith:'[data-sek-is-global-location="false"]',placeholder:{element:function(e){return m('<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){m("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(m(this).data("sek-id"))})},stop:function(e,t){m("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(m(this).data("sek-id"))}),p.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=m.extend(!0,{},o.sortableDefaultParams),d=[],r=[],l=m('[data-sek-id="'+e+'"]').find(".sek-sektion-inner").first(),c=function(e){if(e=m.extend({forTarget:!0},e||{}),!h.isEmpty(m(this).data("_sortable_columns_css_classes_")))return m(this).data("_sortable_columns_css_classes_");var t,a=m(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 m(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=m(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]');!0!==m(this).data("sek-is-sender")?(a=c.call(m(this)),h.isEmpty(a)||i.each(function(){m(this).removeClass(a.current).addClass(a.next)})):(a=c.call(m(this),{forTarget:!1}),h.isEmpty(a)||i.each(function(){m(this).addClass(a.current).removeClass(a.next)}))},out:function(e,t){var a,i=m(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]');!0!==m(this).data("sek-is-sender")?(a=c.call(m(this)),h.isEmpty(a)||i.each(function(){m(this).addClass(a.current).removeClass(a.next)})):(a=c.call(m(this),{forTarget:!1}),h.isEmpty(a)||i.each(function(){m(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?(p.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)||(p.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"),d=[],r=[],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(){d.push(m(this).data("sek-id"))}),m(this).data("sek-is-sender",!0),h.isEmpty(d)&&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(){r.push(m(this).data("sek-id"))});var a,i=m(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]');!0!==m(this).data("sek-is-sender")?(a=c.call(m(this)),h.isEmpty(a)||i.each(function(){m(this).removeClass(a.current).addClass(a.next)})):(a=c.call(m(this),{forTarget:!1}),h.isEmpty(a)||i.each(function(){m(this).addClass(a.current).removeClass(a.next)})),m('[data-sek-level="section"]').find(".sek-sektion-inner").each(function(){m(this).data("sek-is-sender",null).data("_sortable_columns_css_classes_",null)}),h.isEmpty(r)?o.errare("column sortable => newOrder should not be empty"):h.isEqual(r,d)&&to_sektion===from_sektion?sekPreviewLocalized.isDevMode&&o.errare("preview => makeModulesSortableInColumn => start and stop positions are identical"):p.preview.send("sek-move",{id:t.item.data("sek-id"),level:"column",newOrder:r,from_sektion:from_sektion,to_sektion:to_sektion})}}))},makeModulesSortableInColumn:function(e){var a,i,n,s,t,o,d,r,l,c=[],k=[],u=this;t=m.extend(!0,{},u.sortableDefaultParams),m('[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){m('[data-sek-level="location"]').find(".sek-sortable-overing").each(function(){m(this).removeClass("sek-sortable-overing")}),m(e.target).addClass("sek-sortable-overing")},remove:function(e,t){r=t.item.closest('[data-sek-level="location"]'),to_location=r.data("sek-id"),l=!0===r.data("sek-is-global-location");var a=to_location!=from_location;return!(d!==l||!0===d&&!0===l&&a)||(p.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"),d=!0===o.data("sek-is-global-location"),c=[],k=[],m("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(m(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(m(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"):(p.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")}),m("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,d,r,e=c(this).find(".sek-sektion-inner").first().children('div[data-sek-level="column"]');e.length<2||e.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");r=n.index()+1==o,d=r?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:d.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,m,h){m.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 d,r,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&&(d=c.find(".sek-column-inner").first().children("div[data-sek-level]").length==n.index()+1,r=0===n.index()):0<l.length&&(d=l.children('div[data-sek-level="section"]').length==n.index()+1,r=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:d,is_first_section_in_parent:r,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 p=this.getRegisteredModuleProperty(n.data("sek-module-type"),"name");i=h.extend(i,{module_name:"not_set"!=p?p:""})}!0===m(".sektion-wrapper").data("sek-resizing-columns")&&h.contains(["column","module"],a)||(t=this.parseTemplate("#sek-dyn-ui-tmpl-"+a),m.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,d=function(){(e=m(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(){m(this).remove(),e.data("UIisFadingOut",!1)}}))},a=function(){var e=m(this);clearTimeout(e.data("_toggle_ui_menu_")),e.data("_toggle_ui_menu_",setTimeout(function(){n.call(e)},1e4))},n=function(e){var t=m(this),a=m(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())};m("body").on("click",".sek-dyn-ui-location-inner",function(e){var t=m(this).find(".sek-dyn-ui-hamb-menu-wrapper");m(this).closest('[data-sek-level="section"]').find(".sek-dyn-ui-hamb-menu-wrapper").each(function(){n.call(m(this))}),n.call(t,!0),a.call(t)}),m("body").on("mouseenter mouseover mouseleave",".sek-dyn-ui-wrapper",h.throttle(function(e){var t=m(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)),m("body").on("click",".sek-minimize-ui",function(e){m(this).closest(".sek-dyn-ui-location-type").slideToggle("fast")}),m("body").on("mouseenter",".sek-wp-content-wrapper",function(e){0<(t=m(this)).children(".sek-dyn-ui-wrapper").length&&!0!==t.data("UIisFadingOut")||(i=o.parseTemplate("#sek-dyn-ui-tmpl-wp-content"),m.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){m(this).data("UIisFadingOut",!0),t=m(this),m(this).children(".sek-dyn-ui-wrapper").stop(!0,!0).fadeOut({duration:150,complete:function(){m(this).remove(),t.data("UIisFadingOut",!1)}})});var r=function(n,e){var t,s;h.isUndefined(e)||e.length<1?(t=m("body").find("[data-sek-level]"),s="printOrScheduleRemoval"):(t=e,s="mayBeRemove"),t.each(function(){var e=m(this)[0].getBoundingClientRect(),t=n.x<=e.right&&e.left<=n.x,a=n.y>=e.top&&e.bottom>=n.y,i=m(this);switch(s){case"mayBeRemove":i.data("sek-ui-removal-scheduled",!1),t&&a||d.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?r(n,i):h.delay(function(){!0===i.data("sek-ui-removal-scheduled")&&r(o.mouseMovedRecently(),i)},3500))}})};o.mouseMovedRecently=new l.Value({}),o.mouseMovedRecently.bind(function(e){var k,t,a;h.isEmpty(e)?(m("body").stop(!0,!0).find(".sek-add-content-button").each(function(){m(this).fadeOut({duration:200,complete:function(){m(this).remove()}})}),m("body").stop(!0,!0).find("[data-sek-level]").each(function(){m(this).children(".sek-dyn-ui-wrapper").find(".sek-is-expanded").length<1&&d.call(m(this))})):(m("body").find('div[data-sek-level="location"]').each(function(){var e;$sectionCollection=m(this).children('div[data-sek-level="section"]'),i=o.parseTemplate("#sek-tmpl-add-content-button"),t=m(this).data("sek-id"),a=!0===m(this).data("sek-is-global-location"),$sectionCollection.each(function(){0<m(this).find(".sek-add-content-button").length||(m.when(m(this).prepend(i({location:t,is_global_location:a}))).done(function(){e=m(this).find(".sek-add-content-button"),m(this).data("sek-id")&&e.attr("data-sek-before-section",m(this).data("sek-id")),e.fadeIn(300)}),$sectionCollection.length==m(this).index()+1&&m.when(m(this).append(i({is_last:!0,location:t,is_global_location:a}))).done(function(){e=m(this).find(".sek-add-content-button").last(),m(this).data("sek-id")&&e.attr("data-sek-after-section",m(this).data("sek-id")),e.fadeIn(300)}))})}),m(".sek-empty-location-placeholder").each(function(){0<m(this).find(".sek-add-content-button").length||(t=m(this).closest('div[data-sek-level="location"]').data("sek-id"),a=!0===m(this).closest('div[data-sek-level="location"]').data("sek-is-global-location"),m.when(m(this).append(i({location:t,is_global_location:a}))).done(function(){$btn_el=m(this).find(".sek-add-content-button"),$btn_el.attr("data-sek-is-first-section",!0),$btn_el.fadeIn(300)}))}),k=e,m("body").find(".sek-add-content-button").each(function(){var e=m(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,d=i<40||n<40,r=0<s&&s<40||0<o&&o<40,l=a<=e.right&&e.left<=a,c=t>=e.top&&e.bottom>=t;m(this).toggleClass("sek-mouse-is-close",(d||c)&&(r||l))}),r(e))});var s=function(){clearTimeout(m(window).data("_scroll_move_timer_")),o.mouseMovedRecently.set({})};return m(window).on("mousemove scroll",h.throttle(function(e){o.mouseMovedRecently({x:e.clientX,y:e.clientY}),clearTimeout(m(window).data("_scroll_move_timer_")),m(window).data("_scroll_move_timer_",setTimeout(function(){o.mouseMovedRecently.set({})},4e3))},50)),l.preview.bind("sek-drag-start",function(){s()}),m("body").on("sek-section-added",'[data-sek-level="location"]',function(e,t){s()}),this}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(u,p,m){p.extend(SekPreviewPrototype,{scheduleUiClickReactions:function(){var k=this;p("body").on("click",function(e){u.preview.send("sek-clean-target-drop-zone");var t,a=p(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"),d=n.data("sek-level"),r=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":!m.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":m.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"),m.isEmpty(t))throw new Error("Invalid action");if(m.isEmpty(d)||m.isEmpty(r))throw new Error("ERROR => sek-front-preview => No valid level id found");k._send_(a,{action:t,location:o,level:d,id:r,was_triggered:!1});break;case"moduleWrapper":if(0<a.parent(".sek-dyn-ui-icons").length)return;k._send_(a,{action:"edit-module",level:d,id:r});break;case"noModulesColumn":if(0<a.parent(".sek-dyn-ui-icons").length)return;k._send_(a,{action:"pick-content",content_type:"module",level:d,id:r});break;case"columnOutsideModules":case"sectionOutsideColumns":k._send_(a,{action:"edit-options",location:o,level:d,id:r});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:r});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");m.isEmpty(c)||window.open(c,"_blank");break;case"inactiveZone":u.preview.send("sek-click-on-inactive-zone")}})},_send_:function(e,t){var a=p.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,m.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,d,r){d.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=d('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):((r.isEmpty(a)||i.length<1)&&o.errare("reactToPanelMsg => sek-remove => invalid candidate id => ",a),d("body").find(i).remove(),d('[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 r.isEmpty(t)?d.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),d('[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 => ajax_response.data.contents is undefined ",e);var a='<span class="sek-placeholder" data-sek-placeholder-for="'+s.apiParams.id+'"></span>',i=d('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=d('[data-sek-placeholder-for="'+s.apiParams.id+'"]');i.remove(),r.isUndefined(t)?o.errare("reactToPanelMsg => sek-refresh-level ajax done => missing html_content",e):n.after(t),n.remove(),d('[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=d.extend(!0,{},e),a=d.extend(!0,{},e);d('[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=r.extend(t.apiParams,{in_sektion:e.apiParams.from_sektion,action:"sek-refresh-columns-in-sektion"}),o.ajaxRefreshColumns(t)),a.apiParams=r.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=d.extend(!0,{},e),n=d.extend(!0,{},e);i.apiParams.from_column!=i.apiParams.to_column&&(i.apiParams=r.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=r.extend(n.apiParams,{in_column:n.apiParams.to_column,in_sektion:n.apiParams.to_sektion,action:"sek-refresh-modules-in-column"}),o.ajaxRefreshModulesAndNestedSections(n),d('[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;d('[data-sek-level="location"]').children('[data-sek-level="section"]').each(function(){var e=d(this).data("sek-id"),t=d(this).find('[data-sek-level="column"]').length,a=d(this).find('[data-sek-level="module"]').length,i=t<2&&a<1;!o&&!i&&d('[data-drop-zone-before-section="'+e+'"]').length<1&&d(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!=d(".sektion-wrapper").children('[data-sek-level="section"]').length||d(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}),d(".sek-empty-location-placeholder").each(function(){d.when(d(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&&d('[data-sek-level="column"]').each(function(){var e=d(this).children(".sek-column-inner").children('[data-sek-level="module"]'),t=d(this).children(".sek-column-inner").children('[data-sek-is-nested="true"]');e=e.add(t);var a=1;e.each(function(){d('[data-drop-zone-before-module-or-nested-section="'+d(this).data("sek-id")+'"]').length<1&&d(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="'+d(this).data("sek-id")+'"></div>'),a==e.length&&d('[data-drop-zone-after-module-or-nested-section="'+d(this).data("sek-id")+'"]').length<1&&d(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="'+d(this).data("sek-id")+'"></div>'),a++})}),d("body").addClass("sek-dragging"),r.delay(function(){d(".sek-dynamic-drop-zone").css({opacity:1})},100)},"sek-drag-stop":function(e){d("body").removeClass("sek-dragging"),d(".sortable-placeholder").remove(),d(".sek-dynamic-drop-zone").remove()},"sek-animate-to-level":function(e){var t=d('[data-sek-id="'+e.id+'"]');0<t.length&&d("html, body").animate({scrollTop:t.offset().top-100},200)},"sek-display-level-ui":function(e){var t=d('[data-sek-id="'+e.id+'"]');0<t.length&&(t.trigger("click"),o.printLevelUI(t))},"sek-set-double-click-target":function(e){if(d(".sek-target-for-double-click-insertion").removeClass("sek-target-for-double-click-insertion"),r.isObject(e)&&e.id){var t=d('[data-sek-id="'+e.id+'"]');1===t.length&&t.addClass("sek-target-for-double-click-insertion")}},"sek-reset-double-click-target":function(e){d(".sek-target-for-double-click-insertion").removeClass("sek-target-for-double-click-insertion")}};r.each(e,function(e,i){s.preview.bind(i,function(a){a=r.extend({location_skope_id:"",apiParams:{},uiParams:{}},a||{});d("body").addClass(i);try{d.when(r.isFunction(e)?e(a):o[e].call(o,a)).done(function(e){var t;t=e,s.preview.send([i,"done"].join("_"),a),r.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){d("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),d("body").removeClass(i)}})})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,o,d){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 => ajax_response.data.contents is undefined ",e),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||d.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+'"]'),!d.isEmpty(n.apiParams.before_section)&&0<$beforeCandidate.length?$beforeCandidate.before(a):!d.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,d,e){d.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 => ajax_response.data.contents is undefined ",e);var a=d('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(),d(".sektion-wrapper").find(".sek-placeholder").after(t),d(".sektion-wrapper").find(".sek-placeholder").remove(),o.preview.trigger("sek-refresh-stylesheet",n),d('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),d('[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 => ajax_response.data.contents is undefined ",e),d('[data-sek-id="'+a.apiParams.resized_column+'"]').css({width:"",height:""}),i.appendDynStyleSheet(a.location_skope_id,t),d('div[data-sek-id="'+a.apiParams.in_sektion+'"]').trigger("sek-columns-refreshed")}).fail(function(e){i.errare("ERROR reactToPanelMsg => sek-resize-columns => ",e),d('[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 => ajax_response.data.contents is undefined ",e);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.errare("SekPreviewPrototype => ajax_response.data.contents is undefined ",e),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(),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,d){o.extend(SekPreviewPrototype,{parseTemplate:d.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||d.template(o(t).html(),n)}catch(e){i.errare("preview => parseTemplate => problem when parsing tmpl =>"+t,e)}return a(e)}}),_prettyPrintLog:function(e){e=d.extend({bgCol:"#5ed1f5",textCol:"#000",consoleArguments:[]},e);var t,a=Array.from(e.consoleArguments);return a=d.isEmpty(d.filter(a,function(e){return!d.isString(e)}))?a.join(" "):JSON.stringify(a.join(" ")),["%c "+(t=a,d.isString(t)?300<t.length?t.substr(0,299)+"...":t:""),["background:"+e.bgCol,"color:"+e.textCol,"display: block;"].join(";")]},_wrapLogInsideTags:function(e,t,a){d.isUndefined(console)&&"function"!=typeof window.console.log||(sekPreviewLocalized.isDevMode?d.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||(d.isObject(e)?e:{})).ajaxUrl||sekPreviewLocalized.ajaxUrl,i=sekPreviewLocalized.frontNonce,n=o.Deferred(),s=d.extend({action:"",withNonce:!1},e);return"https:"==document.location.protocol&&(a=a.replace("http://","https://")),d.isEmpty(s.action)||!d.isString(s.action)?(t.errare("self.doAjax : unproper action provided"),n.resolve().promise()):(s[i.id]=i.handle,!d.isObject(i)||d.isUndefined(i.id)||d.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&&!d.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 d.isUndefined(e)&&a.errare("getLevelModel => a collection must be provided"),d.each(e,function(e){"no_match"==i&&(t===e.id?i=e:d.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,_);
inc/sektions/ccat-czr-sektions.php CHANGED
@@ -76,7 +76,9 @@ function sek_enqueue_controls_js_css() {
76
 
77
  'registeredLocations' => sek_get_locations(),
78
  'moduleCollection' => sek_get_module_collection(),
79
- 'moduleIconPath' => NIMBLE_MODULE_ICON_PATH
 
 
80
  )
81
  )
82
  );//wp_localize_script()
@@ -385,7 +387,7 @@ function nimble_add_i18n_localized_control_params( $params ) {
385
  'Padding and margin settings for the' => __('Padding and margin settings for the', 'nimble-builder'),
386
  'Height and vertical alignment for the' => __('Height and vertical alignment for the', 'nimble-builder'),
387
  'Width settings for the' => __('Width settings for the', 'nimble-builder'),
388
- 'Set a custom anchor ( CSS ID ) for the' => __('Set a custom anchor ( CSS ID ) for the', 'nimble-builder'),
389
  'Device visibility settings for the' => __('Device visibility settings for the', 'nimble-builder'),
390
  'Responsive settings : breakpoint, column direction' => __('Responsive settings : breakpoint, column direction', 'nimble-builder'),
391
 
@@ -396,7 +398,7 @@ function nimble_add_i18n_localized_control_params( $params ) {
396
  'Page header and footer' => __( 'Page header and footer', 'nimble-builder'),
397
  'Inner and outer widths' => __( 'Inner and outer widths', 'nimble-builder'),
398
  'Custom CSS' => __( 'Custom CSS', 'nimble-builder'),
399
- 'Remove the sections in this page' => __( 'Remove the sections in this page', 'nimble-builder'),
400
  'Page speed optimizations' => __( 'Page speed optimizations', 'nimble-builder'),
401
 
402
  'Site wide header and footer' => __( 'Site wide header and footer', 'nimble-builder'),
@@ -436,6 +438,16 @@ function nimble_add_i18n_localized_control_params( $params ) {
436
  'Settings on mobiles' => __('Settings on mobiles', 'nimble-builder'),
437
  'No sections to navigate' => __('No sections to navigate', 'nimble-builder'),
438
  'Remove this element' => __('Remove this element', 'nimble-builder'),
 
 
 
 
 
 
 
 
 
 
439
 
440
  )//array()
441
  )//array()
@@ -560,8 +572,59 @@ function sek_print_nimble_customizer_tmpl() {
560
  </script>
561
  <?php
562
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
563
 
564
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
565
  ?><?php
566
  /* ------------------------------------------------------------------------- *
567
  * SETUP DYNAMIC SERVER REGISTRATION FOR SETTING
@@ -787,6 +850,9 @@ function sek_set_input_tmpl_content( $input_type, $input_id, $input_data ) {
787
  case 'reset_button' :
788
  sek_set_input_tmpl___reset_button( $input_id, $input_data );
789
  break;
 
 
 
790
  }
791
  }
792
  ?><?php
@@ -1631,3 +1697,20 @@ function sek_set_input_tmpl___reset_button( $input_id, $input_data ) {
1631
  <?php
1632
  }
1633
  ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76
 
77
  'registeredLocations' => sek_get_locations(),
78
  'moduleCollection' => sek_get_module_collection(),
79
+ 'moduleIconPath' => NIMBLE_MODULE_ICON_PATH,
80
+
81
+ 'hasActiveCachePlugin' => sek_has_active_cache_plugin()
82
  )
83
  )
84
  );//wp_localize_script()
387
  'Padding and margin settings for the' => __('Padding and margin settings for the', 'nimble-builder'),
388
  'Height and vertical alignment for the' => __('Height and vertical alignment for the', 'nimble-builder'),
389
  'Width settings for the' => __('Width settings for the', 'nimble-builder'),
390
+ 'Custom anchor ( CSS ID ) and CSS classes for the' => __('Custom anchor ( CSS ID ) and CSS classes for the', 'nimble-builder'),
391
  'Device visibility settings for the' => __('Device visibility settings for the', 'nimble-builder'),
392
  'Responsive settings : breakpoint, column direction' => __('Responsive settings : breakpoint, column direction', 'nimble-builder'),
393
 
398
  'Page header and footer' => __( 'Page header and footer', 'nimble-builder'),
399
  'Inner and outer widths' => __( 'Inner and outer widths', 'nimble-builder'),
400
  'Custom CSS' => __( 'Custom CSS', 'nimble-builder'),
401
+ 'Reset the sections in this page' => __( 'Reset the sections in this page', 'nimble-builder'),
402
  'Page speed optimizations' => __( 'Page speed optimizations', 'nimble-builder'),
403
 
404
  'Site wide header and footer' => __( 'Site wide header and footer', 'nimble-builder'),
438
  'Settings on mobiles' => __('Settings on mobiles', 'nimble-builder'),
439
  'No sections to navigate' => __('No sections to navigate', 'nimble-builder'),
440
  'Remove this element' => __('Remove this element', 'nimble-builder'),
441
+ 'You seem to be using a cache plugin.' => __('You seem to be using a cache plugin.', 'nimble-builder'),
442
+ 'It is recommended to disable your cache plugin when customizing your website.' => __('It is recommended to disable your cache plugin when customizing your website.', 'nimble-builder'),
443
+ 'Revision history of local sections' => __('Revision history of local sections', 'nimble-builder'),
444
+ 'Revision history of global sections' => __('Revision history of global sections', 'nimble-builder'),
445
+ 'The revision could not be restored.' => __('The revision could not be restored.', 'nimble-builder'),
446
+ 'The revision has been successfully restored.' => __('The revision has been successfully restored.', 'nimble-builder'),
447
+ 'Select' => __('Select', 'nimble-builder'),
448
+ 'No revision history available for the moment.' => __('No revision history available for the moment.', 'nimble-builder'),
449
+ 'This is the current version.' => __('This is the current version.', 'nimble-builder'),
450
+ '(currently published version)' => __('(currently published version)','nimble-builder')
451
 
452
  )//array()
453
  )//array()
572
  </script>
573
  <?php
574
  }
575
+ function sek_has_active_cache_plugin() {
576
+ $cache_plugins = array(
577
+ 'WP Fastest Cache' => 'wp-fastest-cache/wpFastestCache.php',
578
+ 'W3 Total Cache' => 'w3-total-cache/w3-total-cache.php',
579
+ 'LiteSpeed Cache' => 'litespeed-cache/litespeed-cache.php',
580
+ 'WP Super Cache' => 'wp-super-cache/wp-cache.php',
581
+ 'Cache Enabler' => 'cache-enabler/cache-enabler.php',
582
+ 'Autoptimize' => 'autoptimize/autoptimize.php',
583
+ 'CachePress' => 'sg-cachepress/sg-cachepress.php',
584
+ 'Comet Cache' => 'comet-cache/comet-cache.php'
585
+ );
586
+ $active = null;
587
+ foreach ( $cache_plugins as $plug_name => $plug_file ) {
588
+ if( !is_null($active) )
589
+ break;
590
+ if ( sek_is_plugin_active( $plug_file ) )
591
+ $active = $plug_name;
592
+ }
593
+ return $active;
594
+ }
595
+
596
+ /**
597
+ * HELPER
598
+ * Check whether the plugin is active by checking the active_plugins list.
599
+ * copy of is_plugin_active declared in wp-admin/includes/plugin.php
600
+ *
601
+ *
602
+ * @param string $plugin Base plugin path from plugins directory.
603
+ * @return bool True, if in the active plugins list. False, not in the list.
604
+ */
605
+ function sek_is_plugin_active( $plugin ) {
606
+ return in_array( $plugin, (array) get_option( 'active_plugins', array() ) ) || sek_is_plugin_active_for_network( $plugin );
607
+ }
608
 
609
 
610
+ /**
611
+ * HELPER
612
+ * Check whether the plugin is active for the entire network.
613
+ * copy of is_plugin_active_for_network declared in wp-admin/includes/plugin.php
614
+ *
615
+ * @param string $plugin Base plugin path from plugins directory.
616
+ * @return bool True, if active for the network, otherwise false.
617
+ */
618
+ function sek_is_plugin_active_for_network( $plugin ) {
619
+ if ( ! is_multisite() )
620
+ return false;
621
+
622
+ $plugins = get_site_option( 'active_sitewide_plugins');
623
+ if ( isset($plugins[$plugin]) )
624
+ return true;
625
+
626
+ return false;
627
+ }
628
  ?><?php
629
  /* ------------------------------------------------------------------------- *
630
  * SETUP DYNAMIC SERVER REGISTRATION FOR SETTING
850
  case 'reset_button' :
851
  sek_set_input_tmpl___reset_button( $input_id, $input_data );
852
  break;
853
+ case 'revision_history' :
854
+ sek_set_input_tmpl___revision_history( $input_id, $input_data );
855
+ break;
856
  }
857
  }
858
  ?><?php
1697
  <?php
1698
  }
1699
  ?>
1700
+ <?php
1701
+ /* ------------------------------------------------------------------------- *
1702
+ * RESET BUTTON INPUT TEMPLATE
1703
+ /* ------------------------------------------------------------------------- */
1704
+ function sek_set_input_tmpl___revision_history( $input_id, $input_data ) {
1705
+ ?>
1706
+ <# //console.log( 'IN php::sek_set_input_tmpl___buttons_choice() => data range_slide => ', data ); #>
1707
+ <?php
1708
+ if ( ! is_array( $input_data ) || empty( $input_data['scope'] ) ) {
1709
+ sek_error_log( __FUNCTION__ . ' error => missing scope property' );
1710
+ return;
1711
+ }
1712
+ ?>
1713
+ <input data-czrtype="<?php echo $input_id; ?>" type="hidden"/>
1714
+ <?php
1715
+ }
1716
+ ?>
inc/sektions/ccat-sektions.php CHANGED
@@ -1662,17 +1662,6 @@ function sek_get_seks_post( $skope_id = '', $skope_level = 'local' ) {
1662
  return $post;
1663
  }
1664
 
1665
- /**
1666
- * Fetch the revisions of the `nimble_post_type` post for a given {skope_id}
1667
- *
1668
- * @since 4.7.0
1669
- *
1670
- * @param string $stylesheet Optional. A theme object stylesheet name. Defaults to the current theme.
1671
- * @return WP_Post|null The skope post or null if none exists.
1672
- */
1673
-
1674
-
1675
-
1676
 
1677
  /**
1678
  * Fetch the saved collection of sektion for a given skope_id / location
@@ -1938,6 +1927,60 @@ function sek_update_saved_seks_post( $seks_data ) {
1938
  }
1939
  return get_post( $r );
1940
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1941
  ?><?php
1942
  function sek_generate_css_rules_for_multidimensional_border_options( $rules, $border_settings, $border_type, $css_selectors = '' ) {
1943
  if ( ! is_array( $rules ) )
@@ -2533,11 +2576,13 @@ function sek_register_modules() {
2533
  'sek_local_reset',
2534
  'sek_local_performances',
2535
  'sek_local_header_footer',
 
2536
  'sek_global_breakpoint',
2537
  'sek_global_widths',
2538
  'sek_global_performances',
2539
  'sek_global_header_footer',
2540
  'sek_global_recaptcha',
 
2541
  'sek_global_beta_features',
2542
  'czr_simple_html_module',
2543
 
@@ -3742,8 +3787,16 @@ function sek_get_module_params_for_sek_level_anchor_module() {
3742
  'input_type' => 'text',
3743
  'title' => __('Custom anchor', 'nimble-builder'),
3744
  'default' => '',
3745
- 'notice_after' => __('Note : white spaces, numbers and special characters are not allowed when setting an anchor.', 'nimble-builder')
 
3746
  ),
 
 
 
 
 
 
 
3747
  )
3748
  )//tmpl
3749
  );
@@ -4149,6 +4202,28 @@ function sek_get_module_params_for_sek_local_header_footer() {
4149
  );
4150
  }
4151
  ?><?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4152
  function sek_get_module_params_for_sek_global_breakpoint() {
4153
  return array(
4154
  'dynamic_registration' => true,
@@ -4453,6 +4528,29 @@ function sek_get_module_params_for_sek_global_recaptcha() {
4453
  );
4454
  }
4455
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4456
  ?><?php
4457
  function sek_get_module_params_for_sek_global_beta_features() {
4458
  return array(
@@ -8993,6 +9091,7 @@ if ( ! class_exists( 'SEK_Front_Construct' ) ) :
8993
  'widths' => 'sek_global_widths',
8994
  'performances' => 'sek_global_performances',
8995
  'recaptcha' => 'sek_global_recaptcha',
 
8996
  'beta_features' => 'sek_global_beta_features'
8997
  ];
8998
  public static $local_options_map = [
@@ -9001,7 +9100,8 @@ if ( ! class_exists( 'SEK_Front_Construct' ) ) :
9001
  'widths' => 'sek_local_widths',
9002
  'custom_css' => 'sek_local_custom_css',
9003
  'local_performances' => 'sek_local_performances',
9004
- 'local_reset' => 'sek_local_reset'
 
9005
  ];
9006
  function __construct( $params = array() ) {
9007
  $this->registered_locations = $this->default_locations;
@@ -9045,6 +9145,8 @@ if ( ! class_exists( 'SEK_Front_Ajax' ) ) :
9045
  function _schedule_front_ajax_actions() {
9046
  add_action( 'wp_ajax_sek_get_content', array( $this, 'sek_get_level_content_for_injection' ) );
9047
  add_action( 'wp_ajax_sek_get_preset_sections', array( $this, 'sek_get_preset_sektions' ) );
 
 
9048
  $this -> ajax_action_map = array(
9049
  'sek-add-section',
9050
  'sek-remove-section',
@@ -9079,7 +9181,7 @@ if ( ! class_exists( 'SEK_Front_Ajax' ) ) :
9079
  if ( ! check_ajax_referer( $action, 'nonce', false ) ) {
9080
  wp_send_json_error( array(
9081
  'code' => 'invalid_nonce',
9082
- 'message' => __( 'sek_get_preset_sektions => check_ajax_referer() failed.', 'nimble-builder' ),
9083
  ) );
9084
  }
9085
  if ( ! is_user_logged_in() ) {
@@ -9453,6 +9555,64 @@ if ( ! class_exists( 'SEK_Front_Ajax' ) ) :
9453
  wp_send_json_error( __CLASS__ . '::' . __FUNCTION__ . ' => missing post data for section title ' . $section_infos['title'] );
9454
  }
9455
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9456
  /*function sek_get_ui_content_for_injection( $params ) {
9457
  if ( ! is_user_logged_in() ) {
9458
  wp_send_json_error( __CLASS__ . '::' . __FUNCTION__ . ' => unauthenticated' );
@@ -9684,17 +9844,17 @@ if ( ! class_exists( 'SEK_Front_Assets' ) ) :
9684
  <div class="sek-dyn-ui-inner <?php echo $icon_left_side_class; ?>">
9685
  <div class="sek-dyn-ui-icons">
9686
 
9687
- <?php // if this is a nested section, it has the is_nested property set to true. We don't want to make it movable for the moment. @todo ?>
9688
  <?php if ( sek_is_dev_mode() ) : ?>
9689
  <i class="sek-to-json fas fa-code"></i>
9690
  <?php endif; ?>
 
 
 
 
 
 
 
9691
  <# if ( ! data.is_nested ) { #>
9692
- <# if ( true !== data.is_first_section_in_location ) { #>
9693
- <i data-sek-click-on="move-section-up" class="material-icons sek-click-on" title="<?php _e( 'Move section up', 'nimble-builder' ); ?>">keyboard_arrow_up</i>
9694
- <# } #>
9695
- <# if ( true !== data.is_last_section_in_location ) { #>
9696
- <i data-sek-click-on="move-section-down" class="material-icons sek-click-on" title="<?php _e( 'Move section down', 'nimble-builder' ); ?>">keyboard_arrow_down</i>
9697
- <# } #>
9698
  <# if ( true !== data.is_global_location ) { #>
9699
  <i class="fas fa-arrows-alt sek-move-section" title="<?php _e( 'Drag section', 'nimble-builder' ); ?>"></i>
9700
  <# } #>
@@ -10034,6 +10194,18 @@ if ( ! class_exists( 'SEK_Front_Render' ) ) :
10034
  $this -> model = $model;
10035
 
10036
  $collection = array_key_exists( 'collection', $model ) ? $model['collection'] : array();
 
 
 
 
 
 
 
 
 
 
 
 
10037
 
10038
  switch ( $level_type ) {
10039
  case 'location' :
@@ -10081,21 +10253,16 @@ if ( ! class_exists( 'SEK_Front_Render' ) ) :
10081
  if ( !empty( $model[ 'options' ][ 'layout' ][ 'boxed-wide' ] ) && 'boxed' == $model[ 'options' ][ 'layout' ][ 'boxed-wide' ] ) {
10082
  $column_container_class = 'sek-container';
10083
  }
10084
- $custom_anchor = null;
10085
- if ( !empty( $model[ 'options' ] ) && !empty( $model[ 'options' ][ 'anchor' ] ) && !empty( $model[ 'options' ][ 'anchor' ]['custom_anchor'] ) ) {
10086
- if ( is_string( $model[ 'options' ][ 'anchor' ]['custom_anchor'] ) ) {
10087
- $custom_anchor = $model[ 'options' ][ 'anchor' ]['custom_anchor'];
10088
- }
10089
- }
10090
 
10091
  ?>
10092
- <?php printf('<div data-sek-level="section" data-sek-id="%1$s" %2$s class="sek-section %3$s %4$s" %5$s %6$s>',
10093
  $id,
10094
  $is_nested ? 'data-sek-is-nested="true"' : '',
10095
  $has_at_least_one_module ? 'sek-has-modules' : '',
10096
  $this->get_level_visibility_css_class( $model ),
10097
  is_null( $custom_anchor ) ? '' : 'id="' . $custom_anchor . '"',
10098
- $this -> sek_maybe_add_bg_attributes( $model )
 
10099
  ); ?>
10100
  <div class="<?php echo $column_container_class; ?>">
10101
  <div class="sek-row sek-sektion-inner">
@@ -10127,12 +10294,14 @@ if ( ! class_exists( 'SEK_Front_Render' ) ) :
10127
  }
10128
  ?>
10129
  <?php
10130
- printf('<div data-sek-level="column" data-sek-id="%1$s" class="sek-column sek-col-base %2$s %3$s" %4$s %5$s>',
10131
  $id,
10132
  $grid_column_class,
10133
  $this->get_level_visibility_css_class( $model ),
10134
  empty( $collection ) ? 'data-sek-no-modules="true"' : '',
10135
- $this -> sek_maybe_add_bg_attributes( $model )
 
 
10136
  );
10137
  ?>
10138
  <?php
@@ -10180,12 +10349,14 @@ if ( ! class_exists( 'SEK_Front_Render' ) ) :
10180
  $title_attribute = 'title="'.$title_attribute.'"';
10181
  }
10182
  ?>
10183
- <?php printf('<div data-sek-level="module" data-sek-id="%1$s" data-sek-module-type="%2$s" class="sek-module %3$s" %4$s %5$s>',
10184
  $id,
10185
  $module_type,
10186
  $this->get_level_visibility_css_class( $model ),
10187
  $title_attribute,
10188
- $this -> sek_maybe_add_bg_attributes( $model )
 
 
10189
  );?>
10190
  <div class="sek-module-inner">
10191
  <?php $this -> sek_print_module_tmpl( $model ); ?>
1662
  return $post;
1663
  }
1664
 
 
 
 
 
 
 
 
 
 
 
 
1665
 
1666
  /**
1667
  * Fetch the saved collection of sektion for a given skope_id / location
1927
  }
1928
  return get_post( $r );
1929
  }
1930
+ ?><?php
1931
+ /* ------------------------------------------------------------------------- *
1932
+ * REVISION HELPERS
1933
+ /* ------------------------------------------------------------------------- */
1934
+ /**
1935
+ * Fetch the revisions of the `nimble_post_type` post for a given {skope_id}
1936
+ * @param string $skope_id optional
1937
+ * @return string $skope_level optional
1938
+ */
1939
+ function sek_get_revision_history_from_posts( $skope_id = '', $skope_level = 'local' ) {
1940
+ if ( empty( $skope_id ) ) {
1941
+ $skope_id = skp_get_skope_id( $skope_level );
1942
+ }
1943
+ if ( defined('DOING_AJAX') && DOING_AJAX && '_skope_not_set_' === $skope_id ) {
1944
+ wp_send_json_error( __FUNCTION__ . ' => invalid skope id' );
1945
+ }
1946
+ $option_name = NIMBLE_OPT_PREFIX_FOR_SEKTION_COLLECTION . $skope_id;
1947
+ $post_id = (int)get_option( $option_name );
1948
+ $raw_revision_history = array();
1949
+ if ( -1 !== $post_id ) {
1950
+ $args = array(
1951
+ 'post_parent' => $post_id, // id
1952
+ 'post_type' => 'revision',
1953
+ 'post_status' => 'inherit'
1954
+ );
1955
+ $raw_revision_history = get_children($args);
1956
+ }
1957
+ $revision_history = array();
1958
+ if ( is_array( $raw_revision_history ) ) {
1959
+ foreach ($raw_revision_history as $post_id => $post_object ) {
1960
+ $revision_history[$post_id] = $post_object->post_date;
1961
+ }
1962
+ }
1963
+ return $revision_history;
1964
+ }
1965
+
1966
+
1967
+ /**
1968
+ * Fetch the revisions of the `nimble_post_type` post for a given revision post id
1969
+ * @param string $skope_id optional
1970
+ * @return string $skope_level optional
1971
+ */
1972
+ function sek_get_single_post_revision( $post_id = null ) {
1973
+ if ( defined('DOING_AJAX') && DOING_AJAX && ( is_null( $post_id ) || !is_numeric( (int)$post_id ) ) ) {
1974
+ wp_send_json_error( __FUNCTION__ . ' => invalid post id' );
1975
+ }
1976
+ $post = get_post( (int)$post_id );
1977
+ if ( is_wp_error( $post ) ) {
1978
+ wp_send_json_error( __FUNCTION__ . ' => post does not exist' );
1979
+ return;
1980
+ }
1981
+ return maybe_unserialize( $post->post_content );
1982
+ }
1983
+
1984
  ?><?php
1985
  function sek_generate_css_rules_for_multidimensional_border_options( $rules, $border_settings, $border_type, $css_selectors = '' ) {
1986
  if ( ! is_array( $rules ) )
2576
  'sek_local_reset',
2577
  'sek_local_performances',
2578
  'sek_local_header_footer',
2579
+ 'sek_local_revisions',
2580
  'sek_global_breakpoint',
2581
  'sek_global_widths',
2582
  'sek_global_performances',
2583
  'sek_global_header_footer',
2584
  'sek_global_recaptcha',
2585
+ 'sek_global_revisions',
2586
  'sek_global_beta_features',
2587
  'czr_simple_html_module',
2588
 
3787
  'input_type' => 'text',
3788
  'title' => __('Custom anchor', 'nimble-builder'),
3789
  'default' => '',
3790
+ 'notice_after' => __('Note : white spaces, numbers and special characters are not allowed when setting a CSS ID.', 'nimble-builder'),
3791
+ 'refresh_markup' => true
3792
  ),
3793
+ 'custom_css_classes' => array(
3794
+ 'input_type' => 'text',
3795
+ 'title' => __('Custom CSS classes', 'nimble-builder'),
3796
+ 'default' => '',
3797
+ 'notice_after' => __('Note : you can add several custom CSS classes separated by a white space.', 'nimble-builder'),
3798
+ 'refresh_markup' => true
3799
+ )
3800
  )
3801
  )//tmpl
3802
  );
4202
  );
4203
  }
4204
  ?><?php
4205
+ function sek_get_module_params_for_sek_local_revisions() {
4206
+ return array(
4207
+ 'dynamic_registration' => true,
4208
+ 'module_type' => 'sek_local_revisions',
4209
+ 'name' => __('Revision history', 'nimble-builder'),
4210
+ 'tmpl' => array(
4211
+ 'item-inputs' => array(
4212
+ 'local_revisions' => array(
4213
+ 'input_type' => 'revision_history',
4214
+ 'title' => __('Browse your revision history', 'nimble-builder'),
4215
+ 'refresh_markup' => false,
4216
+ 'refresh_stylesheet' => false,
4217
+ 'width-100' => true,
4218
+ 'title_width' => 'width-100',
4219
+ 'notice_before' => __('This is the revision history of the sections of the currently customized page.', 'nimble-builder'),
4220
+ 'notice_after' => __('Select a revision from the drop-down list to preview it. You can then restore it by clicking the Publish button at the top of the page.', 'nimble-builder')
4221
+ )
4222
+ )
4223
+ )//tmpl
4224
+ );
4225
+ }
4226
+ ?><?php
4227
  function sek_get_module_params_for_sek_global_breakpoint() {
4228
  return array(
4229
  'dynamic_registration' => true,
4528
  );
4529
  }
4530
 
4531
+ ?><?php
4532
+ function sek_get_module_params_for_sek_global_revisions() {
4533
+ return array(
4534
+ 'dynamic_registration' => true,
4535
+ 'module_type' => 'sek_global_revisions',
4536
+ 'name' => __('Revision history', 'nimble-builder'),
4537
+ 'tmpl' => array(
4538
+ 'item-inputs' => array(
4539
+ 'global_revisions' => array(
4540
+ 'input_type' => 'revision_history',
4541
+ 'title' => __('Browse your revision history', 'nimble-builder'),
4542
+ 'refresh_markup' => false,
4543
+ 'refresh_stylesheet' => false,
4544
+ 'width-100' => true,
4545
+ 'title_width' => 'width-100',
4546
+ 'notice_before' => __('This is the revision history of the global sections displayed site wide.', 'nimble-builder'),
4547
+ 'notice_after' => __('Select a revision from the drop-down list to preview it. You can then restore it by clicking the Publish button at the top of the page.', 'nimble-builder')
4548
+ )
4549
+ )
4550
+ )//tmpl
4551
+ );
4552
+ }
4553
+
4554
  ?><?php
4555
  function sek_get_module_params_for_sek_global_beta_features() {
4556
  return array(
9091
  'widths' => 'sek_global_widths',
9092
  'performances' => 'sek_global_performances',
9093
  'recaptcha' => 'sek_global_recaptcha',
9094
+ 'global_revisions' => 'sek_global_revisions',
9095
  'beta_features' => 'sek_global_beta_features'
9096
  ];
9097
  public static $local_options_map = [
9100
  'widths' => 'sek_local_widths',
9101
  'custom_css' => 'sek_local_custom_css',
9102
  'local_performances' => 'sek_local_performances',
9103
+ 'local_reset' => 'sek_local_reset',
9104
+ 'local_revisions' => 'sek_local_revisions'
9105
  ];
9106
  function __construct( $params = array() ) {
9107
  $this->registered_locations = $this->default_locations;
9145
  function _schedule_front_ajax_actions() {
9146
  add_action( 'wp_ajax_sek_get_content', array( $this, 'sek_get_level_content_for_injection' ) );
9147
  add_action( 'wp_ajax_sek_get_preset_sections', array( $this, 'sek_get_preset_sektions' ) );
9148
+ add_action( 'wp_ajax_sek_get_revision_history', array( $this, 'sek_get_revision_history' ) );
9149
+ add_action( 'wp_ajax_sek_get_single_revision', array( $this, 'sek_get_single_revision' ) );
9150
  $this -> ajax_action_map = array(
9151
  'sek-add-section',
9152
  'sek-remove-section',
9181
  if ( ! check_ajax_referer( $action, 'nonce', false ) ) {
9182
  wp_send_json_error( array(
9183
  'code' => 'invalid_nonce',
9184
+ 'message' => __( __CLASS__ . '::' . __FUNCTION__ . ' => check_ajax_referer() failed.', 'nimble-builder' ),
9185
  ) );
9186
  }
9187
  if ( ! is_user_logged_in() ) {
9555
  wp_send_json_error( __CLASS__ . '::' . __FUNCTION__ . ' => missing post data for section title ' . $section_infos['title'] );
9556
  }
9557
  }
9558
+ function sek_get_revision_history() {
9559
+ $action = 'save-customize_' . get_stylesheet();
9560
+ if ( ! check_ajax_referer( $action, 'nonce', false ) ) {
9561
+ wp_send_json_error( array(
9562
+ 'code' => 'invalid_nonce',
9563
+ 'message' => __( __CLASS__ . '::' . __FUNCTION__ . ' check_ajax_referer() failed.', 'nimble-builder' ),
9564
+ ) );
9565
+ }
9566
+ if ( ! is_user_logged_in() ) {
9567
+ wp_send_json_error( __CLASS__ . '::' . __FUNCTION__ . ' => unauthenticated' );
9568
+ }
9569
+ if ( ! current_user_can( 'edit_theme_options' ) ) {
9570
+ wp_send_json_error( __CLASS__ . '::' . __FUNCTION__ . ' => user_cant_edit_theme_options');
9571
+ }
9572
+ if ( ! current_user_can( 'customize' ) ) {
9573
+ status_header( 403 );
9574
+ wp_send_json_error( __CLASS__ . '::' . __FUNCTION__ . ' => customize_not_allowed' );
9575
+ } else if ( ! isset( $_SERVER['REQUEST_METHOD'] ) || 'POST' !== $_SERVER['REQUEST_METHOD'] ) {
9576
+ status_header( 405 );
9577
+ wp_send_json_error( __CLASS__ . '::' . __FUNCTION__ . ' => bad_method' );
9578
+ }
9579
+
9580
+ if ( ! isset( $_POST['skope_id'] ) || empty( $_POST['skope_id'] ) ) {
9581
+ wp_send_json_error( __CLASS__ . '::' . __FUNCTION__ . ' => missing skope_id' );
9582
+ }
9583
+ $rev_list = sek_get_revision_history_from_posts( $_POST['skope_id'] );
9584
+ wp_send_json_success( $rev_list );
9585
+ }
9586
+
9587
+
9588
+ function sek_get_single_revision() {
9589
+ $action = 'save-customize_' . get_stylesheet();
9590
+ if ( ! check_ajax_referer( $action, 'nonce', false ) ) {
9591
+ wp_send_json_error( array(
9592
+ 'code' => 'invalid_nonce',
9593
+ 'message' => __( __CLASS__ . '::' . __FUNCTION__ . ' check_ajax_referer() failed.', 'nimble-builder' ),
9594
+ ) );
9595
+ }
9596
+ if ( ! is_user_logged_in() ) {
9597
+ wp_send_json_error( __CLASS__ . '::' . __FUNCTION__ . ' => unauthenticated' );
9598
+ }
9599
+ if ( ! current_user_can( 'edit_theme_options' ) ) {
9600
+ wp_send_json_error( __CLASS__ . '::' . __FUNCTION__ . ' => user_cant_edit_theme_options');
9601
+ }
9602
+ if ( ! current_user_can( 'customize' ) ) {
9603
+ status_header( 403 );
9604
+ wp_send_json_error( __CLASS__ . '::' . __FUNCTION__ . ' => customize_not_allowed' );
9605
+ } else if ( ! isset( $_SERVER['REQUEST_METHOD'] ) || 'POST' !== $_SERVER['REQUEST_METHOD'] ) {
9606
+ status_header( 405 );
9607
+ wp_send_json_error( __CLASS__ . '::' . __FUNCTION__ . ' => bad_method' );
9608
+ }
9609
+
9610
+ if ( ! isset( $_POST['revision_post_id'] ) || empty( $_POST['revision_post_id'] ) ) {
9611
+ wp_send_json_error( __CLASS__ . '::' . __FUNCTION__ . ' => missing skope_id' );
9612
+ }
9613
+ $revision = sek_get_single_post_revision( $_POST['revision_post_id'] );
9614
+ wp_send_json_success( $revision );
9615
+ }
9616
  /*function sek_get_ui_content_for_injection( $params ) {
9617
  if ( ! is_user_logged_in() ) {
9618
  wp_send_json_error( __CLASS__ . '::' . __FUNCTION__ . ' => unauthenticated' );
9844
  <div class="sek-dyn-ui-inner <?php echo $icon_left_side_class; ?>">
9845
  <div class="sek-dyn-ui-icons">
9846
 
 
9847
  <?php if ( sek_is_dev_mode() ) : ?>
9848
  <i class="sek-to-json fas fa-code"></i>
9849
  <?php endif; ?>
9850
+ <# if ( true !== data.is_first_section_in_parent ) { #>
9851
+ <i data-sek-click-on="move-section-up" class="material-icons sek-click-on" title="<?php _e( 'Move section up', 'nimble-builder' ); ?>">keyboard_arrow_up</i>
9852
+ <# } #>
9853
+ <# if ( true !== data.is_last_section_in_parent ) { #>
9854
+ <i data-sek-click-on="move-section-down" class="material-icons sek-click-on" title="<?php _e( 'Move section down', 'nimble-builder' ); ?>">keyboard_arrow_down</i>
9855
+ <# } #>
9856
+ <?php // if this is a nested section, it has the is_nested property set to true. We don't want to make it draggable for the moment. @todo ?>
9857
  <# if ( ! data.is_nested ) { #>
 
 
 
 
 
 
9858
  <# if ( true !== data.is_global_location ) { #>
9859
  <i class="fas fa-arrows-alt sek-move-section" title="<?php _e( 'Drag section', 'nimble-builder' ); ?>"></i>
9860
  <# } #>
10194
  $this -> model = $model;
10195
 
10196
  $collection = array_key_exists( 'collection', $model ) ? $model['collection'] : array();
10197
+ $custom_anchor = null;
10198
+ if ( !empty( $model[ 'options' ] ) && !empty( $model[ 'options' ][ 'anchor' ] ) && !empty( $model[ 'options' ][ 'anchor' ]['custom_anchor'] ) ) {
10199
+ if ( is_string( $model[ 'options' ][ 'anchor' ]['custom_anchor'] ) ) {
10200
+ $custom_anchor = esc_attr( $model[ 'options' ][ 'anchor' ]['custom_anchor'] );
10201
+ }
10202
+ }
10203
+ $custom_css_classes = null;
10204
+ if ( !empty( $model[ 'options' ] ) && !empty( $model[ 'options' ][ 'anchor' ] ) && !empty( $model[ 'options' ][ 'anchor' ]['custom_css_classes'] ) ) {
10205
+ if ( is_string( $model[ 'options' ][ 'anchor' ]['custom_css_classes'] ) ) {
10206
+ $custom_css_classes = esc_attr( $model[ 'options' ][ 'anchor' ]['custom_css_classes'] );
10207
+ }
10208
+ }
10209
 
10210
  switch ( $level_type ) {
10211
  case 'location' :
10253
  if ( !empty( $model[ 'options' ][ 'layout' ][ 'boxed-wide' ] ) && 'boxed' == $model[ 'options' ][ 'layout' ][ 'boxed-wide' ] ) {
10254
  $column_container_class = 'sek-container';
10255
  }
 
 
 
 
 
 
10256
 
10257
  ?>
10258
+ <?php printf('<div data-sek-level="section" data-sek-id="%1$s" %2$s class="sek-section %3$s %4$s %7$s" %5$s %6$s>',
10259
  $id,
10260
  $is_nested ? 'data-sek-is-nested="true"' : '',
10261
  $has_at_least_one_module ? 'sek-has-modules' : '',
10262
  $this->get_level_visibility_css_class( $model ),
10263
  is_null( $custom_anchor ) ? '' : 'id="' . $custom_anchor . '"',
10264
+ $this -> sek_maybe_add_bg_attributes( $model ),
10265
+ is_null( $custom_css_classes ) ? '' : $custom_css_classes
10266
  ); ?>
10267
  <div class="<?php echo $column_container_class; ?>">
10268
  <div class="sek-row sek-sektion-inner">
10294
  }
10295
  ?>
10296
  <?php
10297
+ printf('<div data-sek-level="column" data-sek-id="%1$s" class="sek-column sek-col-base %2$s %3$s %7$s" %4$s %5$s %6$s>',
10298
  $id,
10299
  $grid_column_class,
10300
  $this->get_level_visibility_css_class( $model ),
10301
  empty( $collection ) ? 'data-sek-no-modules="true"' : '',
10302
+ $this -> sek_maybe_add_bg_attributes( $model ),
10303
+ is_null( $custom_anchor ) ? '' : 'id="' . $custom_anchor . '"',
10304
+ is_null( $custom_css_classes ) ? '' : $custom_css_classes
10305
  );
10306
  ?>
10307
  <?php
10349
  $title_attribute = 'title="'.$title_attribute.'"';
10350
  }
10351
  ?>
10352
+ <?php printf('<div data-sek-level="module" data-sek-id="%1$s" data-sek-module-type="%2$s" class="sek-module %3$s %7$s" %4$s %5$s %6$s>',
10353
  $id,
10354
  $module_type,
10355
  $this->get_level_visibility_css_class( $model ),
10356
  $title_attribute,
10357
+ $this -> sek_maybe_add_bg_attributes( $model ),
10358
+ is_null( $custom_anchor ) ? '' : 'id="' . $custom_anchor . '"',
10359
+ is_null( $custom_css_classes ) ? '' : $custom_css_classes
10360
  );?>
10361
  <div class="sek-module-inner">
10362
  <?php $this -> sek_print_module_tmpl( $model ); ?>
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.5.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,7 +13,7 @@ if ( ! defined( 'ABSPATH' ) ) {
13
  /* ------------------------------------------------------------------------- *
14
  * CONSTANTS
15
  /* ------------------------------------------------------------------------- */
16
- $current_version = "1.5.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 ) ); }
@@ -26,8 +26,8 @@ if ( !defined( 'NIMBLE_PLUGIN_FILE' ) ) { define( 'NIMBLE_PLUGIN_FILE', __FILE__
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.5.0' ); }
30
- if ( !defined( 'NIMBLE_RELEASE_NOTE_URL' ) ) { define( 'NIMBLE_RELEASE_NOTE_URL', 'https://presscustomizr.com/release-note-for-nimble-builder-version-1-5-0/?utm_source=usersite&utm_medium=link&utm_campaign=nimble-update-notice' ); }
31
 
32
  if ( !defined( 'NIMBLE_WELCOME_NOTICE_ID' ) ) { define ( 'NIMBLE_WELCOME_NOTICE_ID', 'nimble-welcome-notice-12-2018' ); }
33
  // when NIMBLE_IS_PREVIEW_UI_DEBUG_MODE or $_GET['preview_ui_debug'] is true, the levels UI in the preview are not being auto removed, so we can inspect the markup and CSS
2
  /**
3
  * Plugin Name: Nimble Page Builder
4
  * Description: Powerful drag and drop page builder using the native WordPress customizer.
5
+ * Version: 1.5.1
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.5.1";
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 ) ); }
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.5.1' ); }
30
+ if ( !defined( 'NIMBLE_RELEASE_NOTE_URL' ) ) { define( 'NIMBLE_RELEASE_NOTE_URL', 'https://presscustomizr.com/release-note-for-nimble-builder-version-1-5-1/?utm_source=usersite&utm_medium=link&utm_campaign=nimble-update-notice' ); }
31
 
32
  if ( !defined( 'NIMBLE_WELCOME_NOTICE_ID' ) ) { define ( 'NIMBLE_WELCOME_NOTICE_ID', 'nimble-welcome-notice-12-2018' ); }
33
  // when NIMBLE_IS_PREVIEW_UI_DEBUG_MODE or $_GET['preview_ui_debug'] is true, the levels UI in the preview are not being auto removed, so we can inspect the markup and CSS
readme.txt CHANGED
@@ -2,39 +2,76 @@
2
  Contributors: nikeo, d4z_c0nf
3
  Author URI: https://nimblebuilder.com
4
  Plugin URI: https://wordpress.org/plugins/nimble-builder/
5
- Tags: page builder, customizer, drag and drop, header, footer, landing page
6
  Requires at least: 4.7
7
  Requires PHP: 5.4
8
- Tested up to: 5.1.0
9
- Stable tag: 1.5.0
10
  License: GPLv3
11
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
 
12
 
13
  Powerful drag and drop page builder using the native WordPress customizer.
14
 
15
  == Description ==
16
  = What is the Nimble Page Builder ? =
17
- The **[Nimble Page Builder](https://nimblebuilder.com/?utm_source=wp-org&utm_campaign=nimble-builder-page&utm_medium=link)** is a powerful and easy to use page builder plugin. It takes the native WordPress customizer to a level you've never seen before.
18
-
19
- Nimble allows you to drag and drop content modules, or pre-built section templates, into any context of your site, including search results or 404 pages. You can edit your sections in real time from the live customizer, and then publish when you are happy of the result, or save for later.
20
-
21
- You can also start designing from a blank page, and create your header, footer, and custom content.
22
-
23
- The plugin automatically creates fluid and responsive sections for a pixel-perfect rendering on smartphones and tablets, without the need to add complex code.
24
-
25
- = Features =
26
- * Drag and drop carefully crafted pre-designed sections into any pages.
27
- * Content modules: classic text editor, image, column layouts, contact form, button, icons, map, html code, and more.
28
- * Add image background to your sections, and activate a parallax effect.
29
- * Easily create responsive column layouts.
30
- * Create content, style, move / duplicate / remove elements in live preview.
31
- * Embed shortcodes from other plugins, and see the result in live preview.
32
- * Embed WordPress blocks, videos, tweets or any embed types supported by WordPress, and see the result in live preview.
33
- * Leverage the customizer auto-drafting and schedule publishing features, and safely build and save drafts of your content before deploying in production.
34
- * Works in any WordPress contexts : home, pages, posts, custom post types, archives, author pages, search page, ...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
 
36
  == Documentation ==
37
- You'll find an online knowledge base for the Nimble builder here : [Nimble builder documentation](https://docs.presscustomizr.com/collection/334-nimble-builder/?utm_source=wp-org&utm_medium=link&utm_campaign=nimble-builder-page).
 
 
 
 
 
 
 
 
 
38
 
39
  == Screenshots ==
40
  1. Creating a page with 3 sections
@@ -42,6 +79,7 @@ You'll find an online knowledge base for the Nimble builder here : [Nimble build
42
  3. Editing content in live preview
43
  4. Creating columns layouts
44
  5. Customizing a section with an image background
 
45
 
46
  == Installation ==
47
  1. Install the plugin through the WordPress plugins screen. Or download the plugin, unzip the package and upload it to your /wp-content/plugins/ directory
@@ -56,10 +94,17 @@ You'll find an online knowledge base for the Nimble builder here : [Nimble build
56
  The Nimble builder works with any WordPress theme. If you experience any problem with a specific theme, please report it in the [plugin support forum](https://wordpress.org/support/plugin/nimble-builder).
57
 
58
  == Upgrade Notice ==
59
- = 1.5.0 =
60
- Introducing a section navigation UI. A new interface allowing users to navigate in the structure of Nimble Builder elements : locations, sections, columns and modules. Added a new option for the Menu module to expand the mobile menu in full width below the hamburger icon.
61
 
62
  == Changelog ==
 
 
 
 
 
 
 
63
  = 1.5.0 : March 5th 2019 =
64
  * added : [menu module] a new option to expand the mobile menu in full width below the hamburger icon.
65
  * added : a new user interface for section navigation, allowing users to navigate in the structure of Nimble Builder elements : locations, sections, columns and modules.
2
  Contributors: nikeo, d4z_c0nf
3
  Author URI: https://nimblebuilder.com
4
  Plugin URI: https://wordpress.org/plugins/nimble-builder/
5
+ Tags: page builder, visual editor, customizer, drag and drop, header, footer, landing page, contact form
6
  Requires at least: 4.7
7
  Requires PHP: 5.4
8
+ Tested up to: 5.1.1
9
+ Stable tag: 1.5.1
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
13
 
14
  Powerful drag and drop page builder using the native WordPress customizer.
15
 
16
  == Description ==
17
  = What is the Nimble Page Builder ? =
18
+ **[Nimble Page Builder](https://nimblebuilder.com/?utm_source=wp-org&utm_campaign=nimble-builder-page&utm_medium=link)** is a powerful yet easy to use page builder plugin for WordPress. Nimble Builder uses the live customizer which is the native WordPress interface for real-time design.
19
+ The plugin allows you to drag-and-drop modules like text-editor, images, contact forms, maps, icons, or beautiful pre-built sections with a [parallax background](https://docs.presscustomizr.com/article/380-how-to-set-a-parallax-background-for-a-section-in-wordpress-with-the-nimble-builder/?utm_source=wp-org&utm_campaign=nimble-builder-page&utm_medium=link), into any page of your site. You can edit your sections in real-time, and then click "publish" when you are happy with the result, or save for later.
20
+
21
+ = Works in any page of your site and with all WordPress themes =
22
+ Nimble Builder allows you to insert sections in any context of your site : home page, single post or page, category or tag page, even search results or [404 pages](https://docs.presscustomizr.com/article/372-design-your-404-page-with-the-nimble-builder/?utm_source=wp-org&utm_campaign=nimble-builder-page&utm_medium=link). No only that, but you can also decide to [start designing from a blank page](https://docs.presscustomizr.com/article/371-how-to-start-building-from-a-blank-page-with-the-wordpress-nimble-builder/?utm_source=wp-org&utm_campaign=nimble-builder-page&utm_medium=link) in any page of your site, and even create a custom header and footer. Nimble Builder uses WordPress default action hooks, which makes it compatible with all WordPress themes.
23
+
24
+ = Live demos =
25
+ * Example of [integration with the Customizr theme](https://demo.presscustomizr.com/nimble-builder/?utm_source=wp-org&utm_campaign=nimble-builder-page&utm_medium=link)
26
+ * Example of [integration with the Hueman theme](https://demo-hueman.presscustomizr.com/nimble-builder/?utm_source=wp-org&utm_campaign=nimble-builder-page&utm_medium=link)
27
+ * Example of a [404 page created with Nimble Builder](https://docs.presscustomizr.com/article/372-design-your-404-page-with-the-nimble-builder/?utm_source=wp-org&utm_campaign=nimble-builder-page&utm_medium=link), header and footer disabled.
28
+
29
+ = Features overview =
30
+ * Drag and drop neatly pre-designed sections and customize them in real-time preview.
31
+ * **Works in any WordPress contexts** : home, pages, posts, custom post types, archives, author pages, search page, ...
32
+ * Includes many content modules : classic text editor, image, column layouts, contact form, button, icons, map, html code, WordPress widget area, menu, and more.
33
+ * Add image background to your sections, and [enable a parallax effect](https://docs.presscustomizr.com/article/380-how-to-set-a-parallax-background-for-a-section-in-wordpress-with-the-nimble-builder/?utm_source=wp-org&utm_campaign=nimble-builder-page&utm_medium=link).
34
+ * Easily [customize your content specifically for mobile devices](https://docs.presscustomizr.com/article/343-designing-for-mobile-devices-with-wordpress-nimble-builder/?utm_source=wp-org&utm_campaign=nimble-builder-page&utm_medium=link) : change the responsive breakpoint, adapt font-size, spacing, alignment, column layouts, in real-time preview.
35
+ * Customize any text [with Google Fonts](https://docs.presscustomizr.com/article/364-how-to-use-google-fonts-with-the-nimble-builder/?utm_source=wp-org&utm_campaign=nimble-builder-page&utm_medium=link).
36
+ * Create content, style, move / duplicate / remove elements in real-time preview.
37
+ * [Embed shortcodes](https://docs.presscustomizr.com/article/350-how-to-use-shortcodes-from-other-plugins-with-the-nimble-builder-plugin/?utm_source=wp-org&utm_medium=link&utm_campaign=nimble-builder-page) from other plugins, and see the result in real-time preview.
38
+ * Nimble Builder automatically generates responsive HTML markup for a pixel-perfect rendering on smartphones and tablets.
39
+ * Embed WordPress blocks, videos, tweets or any embed types supported by WordPress, and see the result in real-time preview.
40
+ * Nimble Builder Leverage the WordPress customizer auto-drafting and schedule publishing features. You can safely build and save drafts of your content before deploying in production.
41
+
42
+ = Content modules =
43
+ * Headings
44
+ * WordPress text editor
45
+ * [Image](https://docs.presscustomizr.com/article/381-how-to-enable-lightbox-on-your-images-with-the-nimble-builder/?utm_source=wp-org&utm_medium=link&utm_campaign=nimble-builder-page)
46
+ * Button
47
+ * Icon
48
+ * [Contact Form](https://docs.presscustomizr.com/article/385-how-to-enable-recaptcha-protection-against-spam-in-your-forms-with-the-nimble-builder/?utm_source=wp-org&utm_medium=link&utm_campaign=nimble-builder-page)
49
+ * [Google Map](https://docs.presscustomizr.com/article/387-how-to-insert-google-maps-in-your-wordpress-pages-with-the-nimble-builder/?utm_source=wp-org&utm_medium=link&utm_campaign=nimble-builder-page)
50
+ * Divider
51
+ * Spacer
52
+ * Columns
53
+ * Quote
54
+ * Widget zone
55
+ * Menu
56
+ * Post Grid ( under development )
57
+ * Image Slider ( under development )
58
+ * Accordion ( under development )
59
+ * ... and more to come !
60
+
61
+ = Getting started =
62
+ Once [installed](https://docs.presscustomizr.com/article/347-installing-the-nimble-builder-plugin/?utm_source=wp-org&utm_medium=link&utm_campaign=nimble-builder-page), Nimble Builder can be accessed in the WordPress live customizer. You can [start creating your first section](https://docs.presscustomizr.com/article/337-getting-started-with-the-nimble-builder-plugin/?utm_source=wp-org&utm_medium=link&utm_campaign=nimble-builder-page) !
63
 
64
  == Documentation ==
65
+ You'll find a growing online knowledge base for Nimble builder here : [Nimble builder documentation](https://docs.presscustomizr.com/collection/334-nimble-builder/?utm_source=wp-org&utm_medium=link&utm_campaign=nimble-builder-page).
66
+
67
+ * [Getting started with Nimble Page Builder for WordPress](https://docs.presscustomizr.com/article/337-getting-started-with-the-nimble-builder-plugin)
68
+ * [Technical requirements for the Nimble Builder : server, browser, php version, WP version](https://docs.presscustomizr.com/article/355-technical-requirements-server-browser-php-version-wordpress-version)
69
+ * [Designing for mobile devices with the WordPress Nimble Builder](https://docs.presscustomizr.com/article/343-designing-for-mobile-devices-with-wordpress-nimble-builder)
70
+ * [How to start building from a blank page with the WordPress Nimble Builder?](https://docs.presscustomizr.com/article/371-how-to-start-building-from-a-blank-page-with-the-wordpress-nimble-builder)
71
+ * [How to build your WordPress header and footer with the Nimble Builder ?](https://docs.presscustomizr.com/article/358-building-your-header-and-footer-with-the-nimble-builder)
72
+ * [How to set a parallax background for a section in WordPress with the Nimble Builder ?](https://docs.presscustomizr.com/article/380-how-to-set-a-parallax-background-for-a-section-in-wordpress-with-the-nimble-builder)
73
+ * [How to enable reCAPTCHA protection against spam in your forms with the Nimble Builder?](https://docs.presscustomizr.com/article/385-how-to-enable-recaptcha-protection-against-spam-in-your-forms-with-the-nimble-builder)
74
+ * [How to change the page template with Nimble Builder ?](https://docs.presscustomizr.com/article/339-changing-the-page-template)
75
 
76
  == Screenshots ==
77
  1. Creating a page with 3 sections
79
  3. Editing content in live preview
80
  4. Creating columns layouts
81
  5. Customizing a section with an image background
82
+ 6. Using the section navigator
83
 
84
  == Installation ==
85
  1. Install the plugin through the WordPress plugins screen. Or download the plugin, unzip the package and upload it to your /wp-content/plugins/ directory
94
  The Nimble builder works with any WordPress theme. If you experience any problem with a specific theme, please report it in the [plugin support forum](https://wordpress.org/support/plugin/nimble-builder).
95
 
96
  == Upgrade Notice ==
97
+ = 1.5.1 =
98
+ New option to preview and restore a revision. New option to add custom CSS classes to elements. Fixed a Google font bug.
99
 
100
  == Changelog ==
101
+ = 1.5.1 : March 8th 2019 =
102
+ * fixed : Google font customizations could be not taken into account in some cases
103
+ * improved : nested sections can now be moved up and down in a column
104
+ * added : a new option to preview and restore a revision, for contextual and site wide sections
105
+ * added : new option to add custom CSS classes to sections, columns and modules
106
+ * added : a customizer notification for users of cache plugins
107
+
108
  = 1.5.0 : March 5th 2019 =
109
  * added : [menu module] a new option to expand the mobile menu in full width below the hamburger icon.
110
  * added : a new user interface for section navigation, allowing users to navigate in the structure of Nimble Builder elements : locations, sections, columns and modules.