Nimble Page Builder - Version 1.5.2

Version Description

Various performance improvements for the text editor. Bug fixes.

=

Download this release

Release Info

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

Code changes from version 1.5.1 to 1.5.2

assets/czr/sek/css/sek-preview.css CHANGED
@@ -63,13 +63,13 @@
63
 
64
  /* MODULES SPECIFICS WHEN CUSTOMIZING */
65
  /* TinyMce block outline */
66
- .sek-module [data-sek-input-type="tiny_mce_editor"]:hover {
67
  outline: 1px solid #1d85bb;
68
  }
69
  /* Make sure tinyMce module is always accessible
70
  see https://github.com/presscustomizr/nimble-builder/issues/243
71
  */
72
- .sek-module [data-sek-input-type="tiny_mce_editor"] {
73
  min-height: 30px
74
  }
75
 
63
 
64
  /* MODULES SPECIFICS WHEN CUSTOMIZING */
65
  /* TinyMce block outline */
66
+ .sek-module [data-sek-input-type="detached_tinymce_editor"]:hover {
67
  outline: 1px solid #1d85bb;
68
  }
69
  /* Make sure tinyMce module is always accessible
70
  see https://github.com/presscustomizr/nimble-builder/issues/243
71
  */
72
+ .sek-module [data-sek-input-type="detached_tinymce_editor"] {
73
  min-height: 30px
74
  }
75
 
assets/czr/sek/css/sek-preview.min.css CHANGED
@@ -1 +1 @@
1
- .sektion-wrapper{min-height:50px;margin-top:21px}.sek-section{position:relative}.sek-column{position:relative}.sek-column-inner.sek-empty-col{min-height:130px;height:100%}.sek-has-modules .sek-column-inner.sek-empty-col{min-height:auto;height:auto}.sek-module{position:relative}.sek-module-inner{position:relative;-webkit-transition:all .25s ease-in-out;-moz-transition:all,.25s ease-in-out;-ms-transition:all,.25s ease-in-out;-o-transition:all,.25s ease-in-out;transition:all .25s ease-in-out}[data-sek-level]:not([data-sek-bg-parallax]){-webkit-transition:all .2s ease-out;-o-transition:all .2s ease-out;transition:all .2s ease-out}.sek-duplicate [data-sek-level],.sek-refresh-stylesheet [data-sek-level],.sek-remove [data-sek-level]{-webkit-transition:inherit!important;-o-transition:inherit!important;transition:inherit!important}.sek-module [data-sek-input-type=tiny_mce_editor]:hover{outline:1px solid #1d85bb}.sek-module [data-sek-input-type=tiny_mce_editor]{min-height:30px}@media (min-width:767px){[data-sek-level=location] .sek-hidden-on-desktops{display:-ms-flexbox;display:-webkit-box;display:flex;-webkit-filter:grayscale(30%);filter:grayscale(30%);-webkit-filter:gray;filter:gray;opacity:.8}}@media (min-width:575px) and (max-width:768px){[data-sek-level=location] .sek-hidden-on-tablets{display:-ms-flexbox;display:-webkit-box;display:flex;-webkit-filter:grayscale(30%);filter:grayscale(30%);-webkit-filter:gray;filter:gray;opacity:.8}}@media (max-width:575px){[data-sek-level=location] .sek-hidden-on-mobiles{display:-ms-flexbox;display:-webkit-box;display:flex;-webkit-filter:grayscale(30%);filter:grayscale(30%);-webkit-filter:gray;filter:gray;opacity:.8}}.sek-dyn-ui-wrapper{display:none;position:absolute;bottom:0;left:0;top:0;right:0;color:#fff;background:rgba(190,239,255,0);border-radius:4px;box-sizing:border-box!important;-moz-box-sizing:border-box!important;-webkit-box-sizing:border-box!important}.sek-dyn-ui-wrapper,.sek-dyn-ui-wrapper *{text-shadow:none;-webkit-touch-callout:none}.sek-dyn-ui-inner{position:absolute;-webkit-transition:opacity .25s ease;-o-transition:opacity .25s ease;transition:opacity .25s ease}.sek-dyn-ui-inner.sek-is-expanded{display:block!important;z-index:2000!important}.sek-dyn-left-icons{left:0}.sek-dyn-right-icons{right:0}.sek-dyn-ui-inner:hover{opacity:1}.sek-dyn-ui-wrapper-active{position:relative}.sek-dyn-ui-icons{background:#00a0d2;float:left;min-height:18px;padding:0 4px;text-shadow:none;font-size:1em}.sek-dyn-ui-icons>span{display:block;float:left}.sek-dyn-ui-icons i{color:#fff!important;cursor:pointer;float:left;font-size:1em;height:1.4em;line-height:1.4em;opacity:.8;text-align:center;width:1em}.sek-dyn-left-icons .sek-dyn-ui-icons i,.sek-dyn-right-icons .sek-dyn-ui-icons i{margin:0 .3em}.sek-dyn-ui-icons i:hover{opacity:1}.sek-dyn-ui-icons .fa-arrows-alt{cursor:move}.sek-dyn-ui-icons [data-sek-click-on=remove]{padding-left:.42em;margin-left:0;width:1.6em!important;border-left:1px dotted #fff}.sek-dyn-ui-icons [data-sek-click-on=pick-content]{padding-left:.42em;margin-left:0;width:1.6em!important;border-left:1px dotted #fff}.sek-dyn-ui-location-type{position:absolute;z-index:2;bottom:0;padding:0 .5em;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:11px;line-height:16px;font-style:normal;letter-spacing:0;text-align:center;text-indent:0;text-shadow:none;text-decoration:none;text-transform:none;right:0;cursor:pointer;opacity:.75}.sek-dyn-ui-location-type:hover{opacity:1}.sek-dyn-ui-location-inner{padding:3px 0}.sek-minimize-ui{float:left;text-align:center;width:16px;padding:3px}.sek-column-dyn-ui,.sek-module-dyn-ui,.sek-section-dyn-ui{font-size:16px}.sek-shrink-my-ui .sek-module-dyn-ui,.sek-shrink-my-ui>.sek-column-dyn-ui,.sek-shrink-my-ui>.sek-section-dyn-ui{font-size:11px}.sek-shrink-my-ui>.sek-column-dyn-ui .sek-ham__toggler-spn-wrapper,.sek-shrink-my-ui>.sek-module-dyn-ui .sek-ham__toggler-spn-wrapper,.sek-shrink-my-ui>.sek-section-dyn-ui .sek-ham__toggler-spn-wrapper{height:8px;width:16px}.sek-shrink-my-ui .sek-module-dyn-ui .sek-ham__toggler-spn-wrapper .line,.sek-shrink-my-ui>.sek-column-dyn-ui .sek-ham__toggler-spn-wrapper .line,.sek-shrink-my-ui>.sek-section-dyn-ui .sek-ham__toggler-spn-wrapper .line{width:15px;height:1px}.sek-shrink-my-ui .sek-module-dyn-ui .sek-dyn-ui-location-type:hover .line,.sek-shrink-my-ui>.sek-column-dyn-ui .sek-dyn-ui-location-type:hover .line,.sek-shrink-my-ui>.sek-section-dyn-ui .sek-dyn-ui-location-type:hover .line{width:16px;-webkit-transform:translate(-1px,0);transform:translate(-1px,0)}.sek-shrink-my-ui .sek-module-dyn-ui .sek-dyn-ui-location-type,.sek-shrink-my-ui>.sek-column-dyn-ui .sek-dyn-ui-location-type,.sek-shrink-my-ui>.sek-section-dyn-ui .sek-dyn-ui-location-type{font-size:10px;line-height:11px}.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-icons,.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{background:#000;opacity:.75}.sek-section>.sek-section-dyn-ui .sek-dyn-ui-inner{z-index:1001;display:none}.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-icons:hover{opacity:1}.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{z-index:1000;position:relative;float:left}.sek-section[data-sek-is-nested=true]>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{z-index:1002}.sek-section-dyn-ui{border:2px dotted #000}.sek-section>.sek-section-dyn-ui .sek-dyn-ui-inner{top:-1px;z-index:1000}.sek-section[data-sek-is-nested=true]>.sek-section-dyn-ui .sek-dyn-ui-inner{top:18px}.sek-section.sek-highlight-active-ui{-webkit-box-shadow:0 0 2px rgba(0,0,0,.8);box-shadow:0 0 2px rgba(0,0,0,.8)}.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-location-inner{float:left}.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-hamb-menu-wrapper,.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-level-type{float:left}.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-level-type{padding-left:.5em}.sek-column>.sek-column-dyn-ui .sek-dyn-ui-inner{bottom:0;z-index:1002;display:none}.sek-column>.sek-dyn-ui-wrapper .sek-dyn-ui-icons,.sek-column>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{background:#00b846}.sek-column>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{z-index:1001;bottom:3px}.sek-column-dyn-ui{border:2px dotted #00b846;font-size:16px}.sek-column-dyn-ui .dev-level-data{background:#0085ba}.sek-column.sek-highlight-active-ui{-webkit-box-shadow:0 0 2px rgba(0,184,70,.8);box-shadow:0 0 2px rgba(0,184,70,.8)}.sek-column>.sek-dyn-ui-wrapper .sek-dyn-ui-hamb-menu-wrapper,.sek-column>.sek-dyn-ui-wrapper .sek-dyn-ui-level-type{float:right}.sek-column>.sek-dyn-ui-wrapper .sek-dyn-ui-level-type{padding-right:.5em}.sek-column>.sek-dyn-ui-wrapper .sek-dyn-ui-location-inner{float:left}.sek-module:hover{cursor:pointer}.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-inner{bottom:0;z-index:1006;display:none}.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-icons,.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{background:#0085ba}.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{left:0;top:auto;bottom:0;right:auto;z-index:1005}.sek-module-dyn-ui{border:2px dotted #0085ba;font-size:16px}.dev-level-data{position:absolute;bottom:0;left:0;background:#000;padding:1px 12px;font-size:11px}.sek-module-dyn-ui .dev-level-data{background:#c68f00;right:0;left:unset}.sek-module.sek-highlight-active-ui{-webkit-box-shadow:0 0 2px rgba(0,133,186,.8);box-shadow:0 0 2px rgba(0,133,186,.8)}.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-hamb-menu-wrapper,.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-level-type{float:left}.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-level-type{padding-left:.5em}.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-location-inner{float:left}.sek-ham__toggler-spn-wrapper{height:10px;position:relative;width:16px;display:block}.sek-ham__toggler-spn-wrapper .line.line-1{top:10%}.sek-ham__toggler-spn-wrapper .line.line-2{top:60%}.sek-ham__toggler-spn-wrapper .line.line-3{top:110%}.sek-ham__toggler-spn-wrapper .line{background:#fff;display:block;width:16px;height:2px;position:absolute;-webkit-border-radius:5px;-webkit-background-clip:padding-box;-moz-border-radius:5px;-moz-background-clip:padding;border-radius:5px;background-clip:padding-box;-webkit-transition:all ease .2s;-o-transition:all ease .2s;transition:all ease .2s;-webkit-backface-visibility:hidden;backface-visibility:hidden}.sek-dyn-ui-location-type:hover .line{-webkit-transform:translate(-2px,0);transform:translate(-2px,0);width:20px}.sek-wp-content-wrapper{cursor:pointer;position:relative}.sek-wp-content-wrapper:after{content:'';display:block;clear:both}.sek-wp-content-wrapper:hover{outline:2px dashed #036697}.sek-wp-content-wrapper>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{left:auto;right:0;z-index:1005;background:#036697}.sek-wp-content-wrapper .sek-dyn-ui-icons{background-color:#036697}.sek-wp-content-wrapper .sek-dyn-ui-inner{top:0;z-index:1005}.sek-wp-content-dyn-ui{bottom:0;left:0;top:0;right:0;font-size:16px}.sek-empty-location-placeholder{position:relative;min-height:50px;margin:20px 0;border-radius:5px;text-align:center}[data-sek-is-footer-location=true]>.sek-empty-location-placeholder,[data-sek-is-header-location=true]>.sek-empty-location-placeholder{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;background:#eee;line-height:45px;font-size:20px}.sek-header-footer-location-placeholder{opacity:1;-webkit-transition:opacity ease .4s;-o-transition:opacity ease .4s;transition:opacity ease .4s}.sek-header-footer-location-placeholder .sek-nimble-icon img{width:30px;height:30px;position:relative;top:-2px;-webkit-filter:grayscale(100%);filter:grayscale(100%);-webkit-filter:gray;filter:gray}.sek-empty-location-placeholder:hover .sek-nimble-icon img{-webkit-filter:none;filter:none;-webkit-filter:none;filter:none}.sek-empty-location-placeholder:hover .sek-header-footer-location-placeholder{opacity:.6}.sek-empty-location-placeholder:hover{outline:2px dotted #000}.sek-add-button-wrapper{text-align:center;width:100%;margin:16px 0;position:relative}.sek-no-modules-column{position:relative;height:100%;bottom:0;left:0;right:0;z-index:1}.sek-module-drop-zone-for-first-module{text-align:center;border:1px dotted #ccc;background:#eee;background:rgba(0,0,0,.1);height:100%;min-height:40px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;display:-ms-flexbox;display:-webkit-box;display:flex}.sek-module-drop-zone-for-first-module:hover{background:rgba(0,0,0,.5)}.sek-module-drop-zone-for-first-module:hover [data-sek-click-on=pick-content]{color:#fff}.sek-module-drop-zone-for-first-module [data-sek-click-on=pick-content]{cursor:pointer;width:50px;height:50px;color:#535353;border-radius:30px;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.sek-module-drop-zone-for-first-module [data-sek-click-on=pick-content]:hover{-webkit-box-shadow:0 2px 6px rgba(0,0,0,.2);box-shadow:0 2px 6px rgba(0,0,0,.2);color:#fff}.sek-col-10 [data-sek-click-on=pick-content],.sek-col-11 [data-sek-click-on=pick-content],.sek-col-12 [data-sek-click-on=pick-content],.sek-col-14 [data-sek-click-on=pick-content],.sek-col-16 [data-sek-click-on=pick-content],.sek-col-20 [data-sek-click-on=pick-content],.sek-col-25 [data-sek-click-on=pick-content],.sek-col-8 [data-sek-click-on=pick-content],.sek-col-9 [data-sek-click-on=pick-content]{font-size:14px}.sek-sortable-overing>.sek-no-modules-column{display:none}.sek-drop-zone{-webkit-transition:opacity,height,background .4s ease;-o-transition:opacity,height,background .4s ease;transition:opacity,height,background .4s ease;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;flex:0 0 100%;max-width:100%;text-align:center}.sek-no-drop-possible-message{margin:auto;padding:20px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#004085;background-color:#cce5ff;border:1px solid #b8daff;border-radius:.25rem;font-size:16px;line-height:1.5em;max-width:80%}.sek-active-drop-zone.sek-module-drop-zone-for-first-module [data-sek-click-on=pick-content]{display:none}.sek-dynamic-drop-zone{opacity:0}.sek-active-drop-zone.sek-dynamic-drop-zone{height:auto!important;min-height:50px}.sek-dragging .sek-module-drop-zone-for-first-module [data-sek-click-on=pick-content]{display:none}.sek-dragging .sek-drop-zone .sek-injection-instructions{display:none!important}.sek-dragging [data-sek-location=between-sections].sek-dynamic-drop-zone{height:15px}.sek-dragging .sek-dynamic-drop-zone{height:5px;-webkit-transition:all 3s ease;-o-transition:all 3s ease;transition:all 3s ease;border:2px dotted #72777c;background:#ddd;border-radius:5px}.sek-dragging .sek-drop-zone{-webkit-transition:all 1s ease;-o-transition:all 1s ease;transition:all 1s ease}.sek-dragging [data-sek-location=between-sections],.sek-dragging [data-sek-location=in-empty-location]{background:#ddd;border:2px dotted #72777c}.sek-dragging .sek-drag-is-approaching.sek-dynamic-drop-zone{height:20px}.sek-dragging .sek-drag-is-close.sek-dynamic-drop-zone{height:55px;-webkit-transition:all 1.5s ease;-o-transition:all 1.5s ease;transition:all 1.5s ease}.sek-dragging .sek-drag-is-very-close.sek-dynamic-drop-zone{height:55px;-webkit-transition:all 1.5s ease;-o-transition:all 1.5s ease;transition:all 1.5s ease}.sek-dragging .sek-drag-is-in.sek-dynamic-drop-zone{height:100px;-webkit-transition:all .75s ease;-o-transition:all .75s ease;transition:all .75s ease}.sek-dragging .sek-feed-me-seymore{-moz-box-shadow:inset 0 0 30px #000;-webkit-box-shadow:inset 0 0 30px #000;box-shadow:inset 0 0 30px #000}.sek-dragging .sek-module-drop-zone-for-first-module,.sek-dragging [data-sek-location=between-modules-and-nested-sections]{background:#dcefff;background:rgba(220,239,255,.84);border:2px dotted #1d85bb;border-radius:5px}.sek-dragging-element .sek-column-inner,.sek-dragging-element .sek-sektion-inner{min-height:50px}.sek-module-placeholder-content{text-align:center;text-transform:uppercase}.sek-module-placeholder-content>p{padding:35px 10px}.sek-add-content-button{position:absolute;top:0;width:100%;z-index:1001;display:none}.sek-empty-location-placeholder .sek-add-content-button{top:50%}.sek-add-content-button.is_last{bottom:0;top:unset}.sek-add-content-button-wrapper{position:relative;top:-5px;width:100%;border:1px dashed #ccc;height:10px;left:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-transition:.35s ease-in-out;-o-transition:.35s ease-in-out;transition:.35s ease-in-out}.is_last .sek-add-content-button-wrapper{top:10px}.sek-mouse-is-close .sek-add-content-button-wrapper{border:1px dashed #333}.sek-mouse-is-close .sek-add-content-button-wrapper .sek-add-content-btn{opacity:1}.sek-add-content-button-wrapper .sek-add-content-btn{margin:auto;padding:0;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:1000px;width:18px;height:18px;background-color:#000;color:#fff;border:none;outline:0;font-size:13px;overflow:hidden;-webkit-transition:width .5s ease,background-color .5s ease;-o-transition:width .5s ease,background-color .5s ease;transition:width .5s ease,background-color .5s ease;font-weight:400;font-style:normal;cursor:pointer;position:absolute;left:calc(50% - 12px);-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;opacity:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:13px;line-height:26px}.sek-add-content-btn.sek-mouse-is-close{z-index:10000}.sek-add-content-btn:hover{width:26px;height:26px;--sek-add-content-btn-width:65px;width:calc(var(--sek-add-content-btn-width) + 70px);background-color:#000;opacity:1;left:calc(50% - var(--sek-add-content-btn-width));-webkit-box-shadow:0 2px 6px rgba(0,0,0,.2);box-shadow:0 2px 6px rgba(0,0,0,.2)}.sek-click-on-button-icon{line-height:18px;width:18px}.sek-add-content-btn:hover .sek-click-on-button-icon{padding-left:6px;font-size:13px;line-height:26px}.action-button-text{visibility:hidden;display:none;white-space:nowrap;padding-left:5px;padding-bottom:2px;text-transform:none;letter-spacing:0;font-size:13px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.sek-add-content-btn:not(.disabled):hover .action-button-text{visibility:visible;display:inline-block}.sortable-placeholder{max-width:100%;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;background:#00a2d7;border-radius:4px;color:#fff!important;display:block;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-weight:400;font-size:12px;letter-spacing:1px;line-height:14px;margin:10px;padding:6px 8px 5px;position:relative;text-align:left;-o-text-overflow:ellipsis;text-overflow:ellipsis;text-shadow:none;text-transform:none;white-space:nowrap;overflow:hidden;z-index:10}.in-new-sektion.sortable-placeholder{background:#72777c}.sek-moving-section [data-sek-level=location]{background:#ddd;border:2px dotted #72777c;border-radius:5px}.sek-moving-section .sek-empty-location-placeholder{display:none}.sek-sortable-section-over .sortable-placeholder{background:#72777c}.ui-resizable-helper{border:2px dotted #00b846}[data-sek-level=column] .ui-resizable-e{cursor:e-resize;width:7px;right:-4px;font-size:.55em}[data-sek-level=column] .ui-resizable-e i{background:#00b846;border-radius:12px;color:#fff;padding:2px;width:auto;display:none}[data-sek-level=section]:hover .ui-resizable-e{background:#d5d5d573;background:rgba(213,213,213,.42)}[data-sek-level=section]:hover .ui-resizable-e i{display:block}[data-sek-level=column] .ui-resizable-handle{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.sek-blur,.sek-refreshing{-webkit-filter:blur(3px);filter:blur(3px);-webkit-transition:all .3s ease-in-out;-moz-transition:all,.3s ease-in-out;-ms-transition:all,.3s ease-in-out;-o-transition:all,.3s ease-in-out;transition:all .3s ease-in-out}.sek-level-clone{position:absolute!important;z-index:10000}.sek-level-clone::before{content:"";display:block;position:absolute;top:0;left:0;right:0;bottom:0;background-color:#fff;opacity:.5}#nimble-full-page-loader-wrapper{height:100vh;position:absolute;text-align:center;right:0;left:0;z-index:20;color:#fff;display:block;-webkit-transition:all .3s ease-in-out;-moz-transition:all,.3s ease-in-out;-ms-transition:all,.3s ease-in-out;-o-transition:all,.3s ease-in-out;transition:all .3s ease-in-out;opacity:.3;top:0;background:rgba(0,0,0,.8);padding:2px;z-index:99999;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;flex:0 0 100%;max-width:100%;display:none}@-webkit-keyframes sek-mr-loader{0%{-webkit-transform:scale(.1);transform:scale(.1);opacity:1}70%{-webkit-transform:scale(1);transform:scale(1);opacity:.7}100%{opacity:0}}@keyframes sek-mr-loader{0%{-webkit-transform:scale(.1);transform:scale(.1);opacity:1}70%{-webkit-transform:scale(1);transform:scale(1);opacity:.7}100%{opacity:0}}.sek-css-loader{display:none;width:50px;height:50px;position:absolute;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0);top:50%;left:50%}.csstransforms3d .sek-css-loader{display:block}.sek-mr-loader>div:nth-child(0){-webkit-animation-delay:-.8s;animation-delay:-.8s}.sek-mr-loader>div:nth-child(1){-webkit-animation-delay:-.6s;animation-delay:-.6s}.sek-mr-loader>div:nth-child(2){-webkit-animation-delay:-.4s;animation-delay:-.4s}.sek-mr-loader>div:nth-child(3){-webkit-animation-delay:-.2s;animation-delay:-.2s}.sek-mr-loader>div{-webkit-animation-fill-mode:both;animation-fill-mode:both;position:absolute;top:0;left:0;width:100%;height:100%;border-radius:100%;border:2px solid #777;-webkit-animation:sek-mr-loader 1.25s 0s infinite cubic-bezier(.21,.53,.56,.8);animation:sek-mr-loader 1.25s 0s infinite cubic-bezier(.21,.53,.56,.8)}.white-loader>.sek-mr-loader>div{border:2px solid #fff}.sek-tiny-mce-module-placeholder-text{padding:10px;border:1px dotted;background:rgba(0,0,0,.35);color:#fff;font-size:1rem;line-height:1.5rem}.nimble-unclickable{cursor:not-allowed!important}.nimble-shift-clickable{cursor:alias!important}[data-sek-is-global-location=true] .sek-empty-location-placeholder:hover{outline:2px dotted red}[data-sek-is-global-location=true] .sek-add-content-button-wrapper{border:1px dashed #ff7878}[data-sek-is-global-location=true] .sek-mouse-is-close .sek-add-content-button-wrapper{border:1px dashed red}[data-sek-is-global-location=true] .sek-add-content-button-wrapper .sek-add-content-btn{background-color:red}[data-sek-is-global-location=true] .sek-module-drop-zone-for-first-module{border:1px dotted red}[data-sek-is-global-location=true] .sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-icons,[data-sek-is-global-location=true] .sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{background:red;opacity:.75}[data-sek-is-footer-location=true]{margin-bottom:40px}[data-sek-is-header-location=true]{margin-top:0}@keyframes sek-target-highlight{0%{background-color:#0085ba}50%{background-color:#00a0d2}100%{background-color:#0085ba}}.sek-target-for-double-click-insertion .sek-drop-zone{animation:sek-target-highlight 3s infinite;background-color:#eee}.sek-injection-instructions{display:none;font-size:13px;line-height:1.5em;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;color:#fff;padding:4px}.sek-shrink-my-ui .sek-injection-instructions{font-size:10px}.sek-target-for-double-click-insertion .sek-drop-zone .sek-injection-instructions{display:inline-block}.sek-target-for-double-click-insertion .sek-drop-zone [data-sek-click-on=pick-content]{display:none}
1
+ .sektion-wrapper{min-height:50px;margin-top:21px}.sek-section{position:relative}.sek-column{position:relative}.sek-column-inner.sek-empty-col{min-height:130px;height:100%}.sek-has-modules .sek-column-inner.sek-empty-col{min-height:auto;height:auto}.sek-module{position:relative}.sek-module-inner{position:relative;-webkit-transition:all .25s ease-in-out;-moz-transition:all,.25s ease-in-out;-ms-transition:all,.25s ease-in-out;-o-transition:all,.25s ease-in-out;transition:all .25s ease-in-out}[data-sek-level]:not([data-sek-bg-parallax]){-webkit-transition:all .2s ease-out;-o-transition:all .2s ease-out;transition:all .2s ease-out}.sek-duplicate [data-sek-level],.sek-refresh-stylesheet [data-sek-level],.sek-remove [data-sek-level]{-webkit-transition:inherit!important;-o-transition:inherit!important;transition:inherit!important}.sek-module [data-sek-input-type=detached_tinymce_editor]:hover{outline:1px solid #1d85bb}.sek-module [data-sek-input-type=detached_tinymce_editor]{min-height:30px}@media (min-width:767px){[data-sek-level=location] .sek-hidden-on-desktops{display:-ms-flexbox;display:-webkit-box;display:flex;-webkit-filter:grayscale(30%);filter:grayscale(30%);-webkit-filter:gray;filter:gray;opacity:.8}}@media (min-width:575px) and (max-width:768px){[data-sek-level=location] .sek-hidden-on-tablets{display:-ms-flexbox;display:-webkit-box;display:flex;-webkit-filter:grayscale(30%);filter:grayscale(30%);-webkit-filter:gray;filter:gray;opacity:.8}}@media (max-width:575px){[data-sek-level=location] .sek-hidden-on-mobiles{display:-ms-flexbox;display:-webkit-box;display:flex;-webkit-filter:grayscale(30%);filter:grayscale(30%);-webkit-filter:gray;filter:gray;opacity:.8}}.sek-dyn-ui-wrapper{display:none;position:absolute;bottom:0;left:0;top:0;right:0;color:#fff;background:rgba(190,239,255,0);border-radius:4px;box-sizing:border-box!important;-moz-box-sizing:border-box!important;-webkit-box-sizing:border-box!important}.sek-dyn-ui-wrapper,.sek-dyn-ui-wrapper *{text-shadow:none;-webkit-touch-callout:none}.sek-dyn-ui-inner{position:absolute;-webkit-transition:opacity .25s ease;-o-transition:opacity .25s ease;transition:opacity .25s ease}.sek-dyn-ui-inner.sek-is-expanded{display:block!important;z-index:2000!important}.sek-dyn-left-icons{left:0}.sek-dyn-right-icons{right:0}.sek-dyn-ui-inner:hover{opacity:1}.sek-dyn-ui-wrapper-active{position:relative}.sek-dyn-ui-icons{background:#00a0d2;float:left;min-height:18px;padding:0 4px;text-shadow:none;font-size:1em}.sek-dyn-ui-icons>span{display:block;float:left}.sek-dyn-ui-icons i{color:#fff!important;cursor:pointer;float:left;font-size:1em;height:1.4em;line-height:1.4em;opacity:.8;text-align:center;width:1em}.sek-dyn-left-icons .sek-dyn-ui-icons i,.sek-dyn-right-icons .sek-dyn-ui-icons i{margin:0 .3em}.sek-dyn-ui-icons i:hover{opacity:1}.sek-dyn-ui-icons .fa-arrows-alt{cursor:move}.sek-dyn-ui-icons [data-sek-click-on=remove]{padding-left:.42em;margin-left:0;width:1.6em!important;border-left:1px dotted #fff}.sek-dyn-ui-icons [data-sek-click-on=pick-content]{padding-left:.42em;margin-left:0;width:1.6em!important;border-left:1px dotted #fff}.sek-dyn-ui-location-type{position:absolute;z-index:2;bottom:0;padding:0 .5em;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:11px;line-height:16px;font-style:normal;letter-spacing:0;text-align:center;text-indent:0;text-shadow:none;text-decoration:none;text-transform:none;right:0;cursor:pointer;opacity:.75}.sek-dyn-ui-location-type:hover{opacity:1}.sek-dyn-ui-location-inner{padding:3px 0}.sek-minimize-ui{float:left;text-align:center;width:16px;padding:3px}.sek-column-dyn-ui,.sek-module-dyn-ui,.sek-section-dyn-ui{font-size:16px}.sek-shrink-my-ui .sek-module-dyn-ui,.sek-shrink-my-ui>.sek-column-dyn-ui,.sek-shrink-my-ui>.sek-section-dyn-ui{font-size:11px}.sek-shrink-my-ui>.sek-column-dyn-ui .sek-ham__toggler-spn-wrapper,.sek-shrink-my-ui>.sek-module-dyn-ui .sek-ham__toggler-spn-wrapper,.sek-shrink-my-ui>.sek-section-dyn-ui .sek-ham__toggler-spn-wrapper{height:8px;width:16px}.sek-shrink-my-ui .sek-module-dyn-ui .sek-ham__toggler-spn-wrapper .line,.sek-shrink-my-ui>.sek-column-dyn-ui .sek-ham__toggler-spn-wrapper .line,.sek-shrink-my-ui>.sek-section-dyn-ui .sek-ham__toggler-spn-wrapper .line{width:15px;height:1px}.sek-shrink-my-ui .sek-module-dyn-ui .sek-dyn-ui-location-type:hover .line,.sek-shrink-my-ui>.sek-column-dyn-ui .sek-dyn-ui-location-type:hover .line,.sek-shrink-my-ui>.sek-section-dyn-ui .sek-dyn-ui-location-type:hover .line{width:16px;-webkit-transform:translate(-1px,0);transform:translate(-1px,0)}.sek-shrink-my-ui .sek-module-dyn-ui .sek-dyn-ui-location-type,.sek-shrink-my-ui>.sek-column-dyn-ui .sek-dyn-ui-location-type,.sek-shrink-my-ui>.sek-section-dyn-ui .sek-dyn-ui-location-type{font-size:10px;line-height:11px}.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-icons,.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{background:#000;opacity:.75}.sek-section>.sek-section-dyn-ui .sek-dyn-ui-inner{z-index:1001;display:none}.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-icons:hover{opacity:1}.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{z-index:1000;position:relative;float:left}.sek-section[data-sek-is-nested=true]>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{z-index:1002}.sek-section-dyn-ui{border:2px dotted #000}.sek-section>.sek-section-dyn-ui .sek-dyn-ui-inner{top:-1px;z-index:1000}.sek-section[data-sek-is-nested=true]>.sek-section-dyn-ui .sek-dyn-ui-inner{top:18px}.sek-section.sek-highlight-active-ui{-webkit-box-shadow:0 0 2px rgba(0,0,0,.8);box-shadow:0 0 2px rgba(0,0,0,.8)}.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-location-inner{float:left}.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-hamb-menu-wrapper,.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-level-type{float:left}.sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-level-type{padding-left:.5em}.sek-column>.sek-column-dyn-ui .sek-dyn-ui-inner{bottom:0;z-index:1002;display:none}.sek-column>.sek-dyn-ui-wrapper .sek-dyn-ui-icons,.sek-column>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{background:#00b846}.sek-column>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{z-index:1001;bottom:3px}.sek-column-dyn-ui{border:2px dotted #00b846;font-size:16px}.sek-column-dyn-ui .dev-level-data{background:#0085ba}.sek-column.sek-highlight-active-ui{-webkit-box-shadow:0 0 2px rgba(0,184,70,.8);box-shadow:0 0 2px rgba(0,184,70,.8)}.sek-column>.sek-dyn-ui-wrapper .sek-dyn-ui-hamb-menu-wrapper,.sek-column>.sek-dyn-ui-wrapper .sek-dyn-ui-level-type{float:right}.sek-column>.sek-dyn-ui-wrapper .sek-dyn-ui-level-type{padding-right:.5em}.sek-column>.sek-dyn-ui-wrapper .sek-dyn-ui-location-inner{float:left}.sek-module:hover{cursor:pointer}.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-inner{bottom:0;z-index:1006;display:none}.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-icons,.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{background:#0085ba}.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{left:0;top:auto;bottom:0;right:auto;z-index:1005}.sek-module-dyn-ui{border:2px dotted #0085ba;font-size:16px}.dev-level-data{position:absolute;bottom:0;left:0;background:#000;padding:1px 12px;font-size:11px}.sek-module-dyn-ui .dev-level-data{background:#c68f00;right:0;left:unset}.sek-module.sek-highlight-active-ui{-webkit-box-shadow:0 0 2px rgba(0,133,186,.8);box-shadow:0 0 2px rgba(0,133,186,.8)}.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-hamb-menu-wrapper,.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-level-type{float:left}.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-level-type{padding-left:.5em}.sek-module>.sek-dyn-ui-wrapper .sek-dyn-ui-location-inner{float:left}.sek-ham__toggler-spn-wrapper{height:10px;position:relative;width:16px;display:block}.sek-ham__toggler-spn-wrapper .line.line-1{top:10%}.sek-ham__toggler-spn-wrapper .line.line-2{top:60%}.sek-ham__toggler-spn-wrapper .line.line-3{top:110%}.sek-ham__toggler-spn-wrapper .line{background:#fff;display:block;width:16px;height:2px;position:absolute;-webkit-border-radius:5px;-webkit-background-clip:padding-box;-moz-border-radius:5px;-moz-background-clip:padding;border-radius:5px;background-clip:padding-box;-webkit-transition:all ease .2s;-o-transition:all ease .2s;transition:all ease .2s;-webkit-backface-visibility:hidden;backface-visibility:hidden}.sek-dyn-ui-location-type:hover .line{-webkit-transform:translate(-2px,0);transform:translate(-2px,0);width:20px}.sek-wp-content-wrapper{cursor:pointer;position:relative}.sek-wp-content-wrapper:after{content:'';display:block;clear:both}.sek-wp-content-wrapper:hover{outline:2px dashed #036697}.sek-wp-content-wrapper>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{left:auto;right:0;z-index:1005;background:#036697}.sek-wp-content-wrapper .sek-dyn-ui-icons{background-color:#036697}.sek-wp-content-wrapper .sek-dyn-ui-inner{top:0;z-index:1005}.sek-wp-content-dyn-ui{bottom:0;left:0;top:0;right:0;font-size:16px}.sek-empty-location-placeholder{position:relative;min-height:50px;margin:20px 0;border-radius:5px;text-align:center}[data-sek-is-footer-location=true]>.sek-empty-location-placeholder,[data-sek-is-header-location=true]>.sek-empty-location-placeholder{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;background:#eee;line-height:45px;font-size:20px}.sek-header-footer-location-placeholder{opacity:1;-webkit-transition:opacity ease .4s;-o-transition:opacity ease .4s;transition:opacity ease .4s}.sek-header-footer-location-placeholder .sek-nimble-icon img{width:30px;height:30px;position:relative;top:-2px;-webkit-filter:grayscale(100%);filter:grayscale(100%);-webkit-filter:gray;filter:gray}.sek-empty-location-placeholder:hover .sek-nimble-icon img{-webkit-filter:none;filter:none;-webkit-filter:none;filter:none}.sek-empty-location-placeholder:hover .sek-header-footer-location-placeholder{opacity:.6}.sek-empty-location-placeholder:hover{outline:2px dotted #000}.sek-add-button-wrapper{text-align:center;width:100%;margin:16px 0;position:relative}.sek-no-modules-column{position:relative;height:100%;bottom:0;left:0;right:0;z-index:1}.sek-module-drop-zone-for-first-module{text-align:center;border:1px dotted #ccc;background:#eee;background:rgba(0,0,0,.1);height:100%;min-height:40px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;display:-ms-flexbox;display:-webkit-box;display:flex}.sek-module-drop-zone-for-first-module:hover{background:rgba(0,0,0,.5)}.sek-module-drop-zone-for-first-module:hover [data-sek-click-on=pick-content]{color:#fff}.sek-module-drop-zone-for-first-module [data-sek-click-on=pick-content]{cursor:pointer;width:50px;height:50px;color:#535353;border-radius:30px;-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.sek-module-drop-zone-for-first-module [data-sek-click-on=pick-content]:hover{-webkit-box-shadow:0 2px 6px rgba(0,0,0,.2);box-shadow:0 2px 6px rgba(0,0,0,.2);color:#fff}.sek-col-10 [data-sek-click-on=pick-content],.sek-col-11 [data-sek-click-on=pick-content],.sek-col-12 [data-sek-click-on=pick-content],.sek-col-14 [data-sek-click-on=pick-content],.sek-col-16 [data-sek-click-on=pick-content],.sek-col-20 [data-sek-click-on=pick-content],.sek-col-25 [data-sek-click-on=pick-content],.sek-col-8 [data-sek-click-on=pick-content],.sek-col-9 [data-sek-click-on=pick-content]{font-size:14px}.sek-sortable-overing>.sek-no-modules-column{display:none}.sek-drop-zone{-webkit-transition:opacity,height,background .4s ease;-o-transition:opacity,height,background .4s ease;transition:opacity,height,background .4s ease;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;flex:0 0 100%;max-width:100%;text-align:center}.sek-no-drop-possible-message{margin:auto;padding:20px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#004085;background-color:#cce5ff;border:1px solid #b8daff;border-radius:.25rem;font-size:16px;line-height:1.5em;max-width:80%}.sek-active-drop-zone.sek-module-drop-zone-for-first-module [data-sek-click-on=pick-content]{display:none}.sek-dynamic-drop-zone{opacity:0}.sek-active-drop-zone.sek-dynamic-drop-zone{height:auto!important;min-height:50px}.sek-dragging .sek-module-drop-zone-for-first-module [data-sek-click-on=pick-content]{display:none}.sek-dragging .sek-drop-zone .sek-injection-instructions{display:none!important}.sek-dragging [data-sek-location=between-sections].sek-dynamic-drop-zone{height:15px}.sek-dragging .sek-dynamic-drop-zone{height:5px;-webkit-transition:all 3s ease;-o-transition:all 3s ease;transition:all 3s ease;border:2px dotted #72777c;background:#ddd;border-radius:5px}.sek-dragging .sek-drop-zone{-webkit-transition:all 1s ease;-o-transition:all 1s ease;transition:all 1s ease}.sek-dragging [data-sek-location=between-sections],.sek-dragging [data-sek-location=in-empty-location]{background:#ddd;border:2px dotted #72777c}.sek-dragging .sek-drag-is-approaching.sek-dynamic-drop-zone{height:20px}.sek-dragging .sek-drag-is-close.sek-dynamic-drop-zone{height:55px;-webkit-transition:all 1.5s ease;-o-transition:all 1.5s ease;transition:all 1.5s ease}.sek-dragging .sek-drag-is-very-close.sek-dynamic-drop-zone{height:55px;-webkit-transition:all 1.5s ease;-o-transition:all 1.5s ease;transition:all 1.5s ease}.sek-dragging .sek-drag-is-in.sek-dynamic-drop-zone{height:100px;-webkit-transition:all .75s ease;-o-transition:all .75s ease;transition:all .75s ease}.sek-dragging .sek-feed-me-seymore{-moz-box-shadow:inset 0 0 30px #000;-webkit-box-shadow:inset 0 0 30px #000;box-shadow:inset 0 0 30px #000}.sek-dragging .sek-module-drop-zone-for-first-module,.sek-dragging [data-sek-location=between-modules-and-nested-sections]{background:#dcefff;background:rgba(220,239,255,.84);border:2px dotted #1d85bb;border-radius:5px}.sek-dragging-element .sek-column-inner,.sek-dragging-element .sek-sektion-inner{min-height:50px}.sek-module-placeholder-content{text-align:center;text-transform:uppercase}.sek-module-placeholder-content>p{padding:35px 10px}.sek-add-content-button{position:absolute;top:0;width:100%;z-index:1001;display:none}.sek-empty-location-placeholder .sek-add-content-button{top:50%}.sek-add-content-button.is_last{bottom:0;top:unset}.sek-add-content-button-wrapper{position:relative;top:-5px;width:100%;border:1px dashed #ccc;height:10px;left:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-transition:.35s ease-in-out;-o-transition:.35s ease-in-out;transition:.35s ease-in-out}.is_last .sek-add-content-button-wrapper{top:10px}.sek-mouse-is-close .sek-add-content-button-wrapper{border:1px dashed #333}.sek-mouse-is-close .sek-add-content-button-wrapper .sek-add-content-btn{opacity:1}.sek-add-content-button-wrapper .sek-add-content-btn{margin:auto;padding:0;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:1000px;width:18px;height:18px;background-color:#000;color:#fff;border:none;outline:0;font-size:13px;overflow:hidden;-webkit-transition:width .5s ease,background-color .5s ease;-o-transition:width .5s ease,background-color .5s ease;transition:width .5s ease,background-color .5s ease;font-weight:400;font-style:normal;cursor:pointer;position:absolute;left:calc(50% - 12px);-webkit-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;opacity:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:13px;line-height:26px}.sek-add-content-btn.sek-mouse-is-close{z-index:10000}.sek-add-content-btn:hover{width:26px;height:26px;--sek-add-content-btn-width:65px;width:calc(var(--sek-add-content-btn-width) + 70px);background-color:#000;opacity:1;left:calc(50% - var(--sek-add-content-btn-width));-webkit-box-shadow:0 2px 6px rgba(0,0,0,.2);box-shadow:0 2px 6px rgba(0,0,0,.2)}.sek-click-on-button-icon{line-height:18px;width:18px}.sek-add-content-btn:hover .sek-click-on-button-icon{padding-left:6px;font-size:13px;line-height:26px}.action-button-text{visibility:hidden;display:none;white-space:nowrap;padding-left:5px;padding-bottom:2px;text-transform:none;letter-spacing:0;font-size:13px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.sek-add-content-btn:not(.disabled):hover .action-button-text{visibility:visible;display:inline-block}.sortable-placeholder{max-width:100%;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;background:#00a2d7;border-radius:4px;color:#fff!important;display:block;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-weight:400;font-size:12px;letter-spacing:1px;line-height:14px;margin:10px;padding:6px 8px 5px;position:relative;text-align:left;-o-text-overflow:ellipsis;text-overflow:ellipsis;text-shadow:none;text-transform:none;white-space:nowrap;overflow:hidden;z-index:10}.in-new-sektion.sortable-placeholder{background:#72777c}.sek-moving-section [data-sek-level=location]{background:#ddd;border:2px dotted #72777c;border-radius:5px}.sek-moving-section .sek-empty-location-placeholder{display:none}.sek-sortable-section-over .sortable-placeholder{background:#72777c}.ui-resizable-helper{border:2px dotted #00b846}[data-sek-level=column] .ui-resizable-e{cursor:e-resize;width:7px;right:-4px;font-size:.55em}[data-sek-level=column] .ui-resizable-e i{background:#00b846;border-radius:12px;color:#fff;padding:2px;width:auto;display:none}[data-sek-level=section]:hover .ui-resizable-e{background:#d5d5d573;background:rgba(213,213,213,.42)}[data-sek-level=section]:hover .ui-resizable-e i{display:block}[data-sek-level=column] .ui-resizable-handle{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.sek-blur,.sek-refreshing{-webkit-filter:blur(3px);filter:blur(3px);-webkit-transition:all .3s ease-in-out;-moz-transition:all,.3s ease-in-out;-ms-transition:all,.3s ease-in-out;-o-transition:all,.3s ease-in-out;transition:all .3s ease-in-out}.sek-level-clone{position:absolute!important;z-index:10000}.sek-level-clone::before{content:"";display:block;position:absolute;top:0;left:0;right:0;bottom:0;background-color:#fff;opacity:.5}#nimble-full-page-loader-wrapper{height:100vh;position:absolute;text-align:center;right:0;left:0;z-index:20;color:#fff;display:block;-webkit-transition:all .3s ease-in-out;-moz-transition:all,.3s ease-in-out;-ms-transition:all,.3s ease-in-out;-o-transition:all,.3s ease-in-out;transition:all .3s ease-in-out;opacity:.3;top:0;background:rgba(0,0,0,.8);padding:2px;z-index:99999;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;flex:0 0 100%;max-width:100%;display:none}@-webkit-keyframes sek-mr-loader{0%{-webkit-transform:scale(.1);transform:scale(.1);opacity:1}70%{-webkit-transform:scale(1);transform:scale(1);opacity:.7}100%{opacity:0}}@keyframes sek-mr-loader{0%{-webkit-transform:scale(.1);transform:scale(.1);opacity:1}70%{-webkit-transform:scale(1);transform:scale(1);opacity:.7}100%{opacity:0}}.sek-css-loader{display:none;width:50px;height:50px;position:absolute;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0);top:50%;left:50%}.csstransforms3d .sek-css-loader{display:block}.sek-mr-loader>div:nth-child(0){-webkit-animation-delay:-.8s;animation-delay:-.8s}.sek-mr-loader>div:nth-child(1){-webkit-animation-delay:-.6s;animation-delay:-.6s}.sek-mr-loader>div:nth-child(2){-webkit-animation-delay:-.4s;animation-delay:-.4s}.sek-mr-loader>div:nth-child(3){-webkit-animation-delay:-.2s;animation-delay:-.2s}.sek-mr-loader>div{-webkit-animation-fill-mode:both;animation-fill-mode:both;position:absolute;top:0;left:0;width:100%;height:100%;border-radius:100%;border:2px solid #777;-webkit-animation:sek-mr-loader 1.25s 0s infinite cubic-bezier(.21,.53,.56,.8);animation:sek-mr-loader 1.25s 0s infinite cubic-bezier(.21,.53,.56,.8)}.white-loader>.sek-mr-loader>div{border:2px solid #fff}.sek-tiny-mce-module-placeholder-text{padding:10px;border:1px dotted;background:rgba(0,0,0,.35);color:#fff;font-size:1rem;line-height:1.5rem}.nimble-unclickable{cursor:not-allowed!important}.nimble-shift-clickable{cursor:alias!important}[data-sek-is-global-location=true] .sek-empty-location-placeholder:hover{outline:2px dotted red}[data-sek-is-global-location=true] .sek-add-content-button-wrapper{border:1px dashed #ff7878}[data-sek-is-global-location=true] .sek-mouse-is-close .sek-add-content-button-wrapper{border:1px dashed red}[data-sek-is-global-location=true] .sek-add-content-button-wrapper .sek-add-content-btn{background-color:red}[data-sek-is-global-location=true] .sek-module-drop-zone-for-first-module{border:1px dotted red}[data-sek-is-global-location=true] .sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-icons,[data-sek-is-global-location=true] .sek-section>.sek-dyn-ui-wrapper .sek-dyn-ui-location-type{background:red;opacity:.75}[data-sek-is-footer-location=true]{margin-bottom:40px}[data-sek-is-header-location=true]{margin-top:0}@keyframes sek-target-highlight{0%{background-color:#0085ba}50%{background-color:#00a0d2}100%{background-color:#0085ba}}.sek-target-for-double-click-insertion .sek-drop-zone{animation:sek-target-highlight 3s infinite;background-color:#eee}.sek-injection-instructions{display:none;font-size:13px;line-height:1.5em;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;color:#fff;padding:4px}.sek-shrink-my-ui .sek-injection-instructions{font-size:10px}.sek-target-for-double-click-insertion .sek-drop-zone .sek-injection-instructions{display:inline-block}.sek-target-for-double-click-insertion .sek-drop-zone [data-sek-click-on=pick-content]{display:none}
assets/czr/sek/css/sek-tinymce-content.css ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ This stylesheet is loaded when instantiating the tinymce editor
3
+ its url is added to the list of default stylesheet urls
4
+ @see : api.czrInputMap.nimble_tinymce_editor
5
+ wp.editor.initialize( _id, {
6
+ //tinymce: nimbleTinyMCEPreInit.mceInit["czr-customize-content_editor"],
7
+ tinymce: {
8
+ //plugins:"charmap,colorpicker,hr,lists,media,paste,tabfocus,textcolor,wordpress,wpeditimage,wpemoji,wpgallery,wplink,wpdialogs,wptextpattern,wpview",
9
+ toolbar1:getToolbarBtns(),
10
+ content_css:( function() {
11
+ var default_settings = wp.editor.getDefaultSettings(),
12
+ stylesheets = [ sektionsLocalizedData.tinyMceNimbleEditorStylesheetUrl ];
13
+ if ( default_settings && default_settings.tinymce && default_settings.tinymce.content_css ) {
14
+ stylesheets = _.union( default_settings.tinymce.content_css.split(','), stylesheets );
15
+ }
16
+
17
+ return stylesheets.join(',');
18
+ })()
19
+ //toolbar2:""
20
+ },
21
+ quicktags : defaultQuickTagBtns,
22
+ mediaButtons: ( inputRegistrationParams.editor_params && false === inputRegistrationParams.editor_params.media_button ) ? false : true
23
+ });
24
+ */
25
+ body#tinymce{
26
+ font-size: 14px;
27
+ }
assets/czr/sek/css/sek-tinymce-content.min.css ADDED
@@ -0,0 +1 @@
 
1
+ body#tinymce{font-size:14px}
assets/czr/sek/js/ccat-sek-control.js CHANGED
@@ -26,6 +26,9 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
26
  // prevent hammering server + fixes https://github.com/presscustomizr/nimble-builder/issues/244
27
  self.SETTING_UPDATE_BUFFER = 100;
28
 
 
 
 
29
  // Define a default value for the sektion setting value, used when no server value has been sent
30
  // @see php function
31
  // function sek_get_default_location_model() {
@@ -66,6 +69,17 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
66
  $.extend( query, { local_skope_id : api.czr_skopeBase.getSkopeProperty( 'skope_id' ) } );
67
  });
68
 
 
 
 
 
 
 
 
 
 
 
 
69
  },// initialize()
70
 
71
 
@@ -2832,13 +2846,24 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
2832
  // Maybe set the input based value
2833
  var input_id = params.settingParams.args.input_changed;
2834
  var inputRegistrationParams;
 
 
 
 
 
 
 
2835
  if ( ! _.isUndefined( input_id ) ) {
2836
  inputRegistrationParams = self.getInputRegistrationParams( input_id, parentModuleType );
2837
  if ( ! _.isUndefined( inputRegistrationParams.refresh_stylesheet ) ) {
2838
  refresh_stylesheet = Boolean( inputRegistrationParams.refresh_stylesheet );
2839
  }
2840
  if ( ! _.isUndefined( inputRegistrationParams.refresh_markup ) ) {
2841
- refresh_markup = Boolean( inputRegistrationParams.refresh_markup );
 
 
 
 
2842
  }
2843
  if ( ! _.isUndefined( inputRegistrationParams.refresh_fonts ) ) {
2844
  refresh_fonts = Boolean( inputRegistrationParams.refresh_fonts );
@@ -2901,8 +2926,12 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
2901
  });
2902
  }
2903
 
 
2904
  // MARKUP
2905
- if ( true === refresh_markup ) {
 
 
 
2906
  api.previewer.send( 'sek-refresh-level', {
2907
  location_skope_id : true === promiseParams.is_global_location ? sektionsLocalizedData.globalSkopeId : api.czr_skopeBase.getSkopeProperty( 'skope_id' ),//<= send skope id to the preview so we can use it when ajaxing
2908
  local_skope_id : api.czr_skopeBase.getSkopeProperty( 'skope_id' ),//<= send skope id to the preview so we can use it when ajaxing
@@ -2913,6 +2942,36 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
2913
  },
2914
  skope_id : api.czr_skopeBase.getSkopeProperty( 'skope_id' ),//<= send skope id to the preview so we can use it when ajaxing
2915
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2916
  }
2917
 
2918
  // REFRESH THE PREVIEW ?
@@ -3048,7 +3107,8 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
3048
  case 'wp_color_alpha' :
3049
  case 'wp_color' :
3050
  case 'content_picker' :
3051
- case 'tiny_mce_editor' :
 
3052
  case 'password' :
3053
  case 'range' :
3054
  case 'range_slider' :
@@ -3106,6 +3166,40 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
3106
  }
3107
  }
3108
  return controlIsAlreadyRegistered;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3109
  }
3110
  });//$.extend()
3111
  })( wp.customize, jQuery );//global sektionsLocalizedData
@@ -5581,6 +5675,11 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
5581
  var self = this,
5582
  registered = $.extend( true, [], self.registered() || [] );
5583
 
 
 
 
 
 
5584
  registered = _.filter( registered, function( _reg_ ) {
5585
  if ( 'setting' !== _reg_.what ) {
5586
  if ( api[ _reg_.what ].has( _reg_.id ) ) {
@@ -7344,64 +7443,37 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
7344
  var self = this;
7345
  // OBSERVABLE VALUES
7346
  api.sekEditorExpanded = new api.Value( false );
7347
- api.sekEditorSynchronizedInput = new api.Value();
7348
 
7349
  self.editorEventsListenerSetup = false;//this status will help us ensure that we bind the shared tinyMce instance only once
7350
 
7351
- // Cache the instance and attach
7352
- var mayBeAwakeTinyMceEditor = function() {
7353
- api.sekTinyMceEditor = api.sekTinyMceEditor || tinyMCE.get( 'czr-customize-content_editor' );
7354
-
7355
- if ( false === self.editorEventsListenerSetup ) {
7356
- self.attachEventsToEditor();
7357
- self.editorEventsListenerSetup = true;
7358
- self.trigger('sek-tiny-mce-editor-bound-and-instantiated');
7359
- }
7360
- };
7361
-
7362
-
7363
- // SET THE SYNCHRONIZED INPUT
7364
- // CASE 1) When user has clicked on a tiny-mce editable content block
7365
- // CASE 2) when user click on the edit button in the module ui
7366
- // @see reactToPreviewMsg
7367
- // Each time a message is received from the preview, the corresponding action are executed
7368
- // and an event {msgId}_done is triggered on the current instance
7369
- // This is how we can listen here to 'sek-edit-module_done'
7370
- // The sek-edit-module is fired when clicking on a .sek-module wrapper @see ::scheduleUiClickReactions
7371
- self.bind( 'sek-edit-module_done', function( params ) {
7372
- params = _.isObject( params ) ? params : {};
7373
- if ( 'tiny_mce_editor' !== params.clicked_input_type && 'czr_tiny_mce_editor_module' !== params.module_type )
7374
- return;
7375
 
7376
- // @see preview::scheduleUiClickReactions()
7377
- // Fixes : https://github.com/presscustomizr/nimble-builder/issues/251
7378
- if ( _.isEmpty( params.syncedTinyMceInputId ) )
7379
- return;
7380
 
7381
- var controlId = params.id;
7382
- // When the module is a father, we need to assign the right child module id
7383
- if ( true === self.getRegisteredModuleProperty( params.module_type, 'is_father' ) ) {
7384
- var _childModules_ = self.getRegisteredModuleProperty( params.module_type, 'children' );
7385
- if ( _.isEmpty( _childModules_ ) ) {
7386
- throw new Error('::generateUIforFrontModules => a father module ' + params.module_type + ' is missing children modules ');
 
 
 
 
 
 
7387
  } else {
7388
- _.each( _childModules_, function( mod_type, optionType ){
7389
- if ( 'czr_tinymce_child' === mod_type ) {
7390
- controlId = controlId + '__' + optionType;//<= as defined when generating the ui in ::generateUIforFrontModules
7391
- }
7392
- });
7393
  }
7394
  }
7395
-
7396
- // Set a new sync input
7397
- api.sekEditorSynchronizedInput({
7398
- control_id : controlId,
7399
- input_id : params.syncedTinyMceInputId
7400
- });
7401
-
7402
- api.sekEditorExpanded( true );
7403
- api.sekTinyMceEditor.focus();
7404
- });
7405
 
7406
  // CASE 1)
7407
  // Toggle the editor visibility
@@ -7417,56 +7489,23 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
7417
  api.errare('toggle-tinymce-editor => missing input or control id');
7418
  return;
7419
  }
7420
- var currentEditorSyncData = $.extend( true, {}, api.sekEditorSynchronizedInput() ),
7421
- newEditorSyncData = _.extend( currentEditorSyncData, {
7422
- input_id : input_id,
7423
- control_id : control_id
7424
- });
7425
- api.sekEditorSynchronizedInput( newEditorSyncData );
7426
  api.sekEditorExpanded( true );
7427
- api.sekTinyMceEditor.focus();
7428
  });
7429
 
7430
 
7431
- // CASE 2)
7432
- // when the synchronized input gets changed by the user
7433
- // 1) make sure the editor is expanded
7434
- // 2) refresh the editor content with the input() one
7435
- api.sekEditorSynchronizedInput.bind( function( to, from ) {
7436
- mayBeAwakeTinyMceEditor();
7437
- //api.sekEditorExpanded( true );
7438
- //console.log('MODULE VALUE ?', self.getLevelProperty( { property : 'value', id : to.control_id } ) );
7439
-
7440
- // When initializing the module, its customized value might not be set yet
7441
- // => defer the setContent action when the api setting is instantiated
7442
- api( to.control_id, function( _setting_ ) {
7443
- var _currentModuleValue_ = _setting_(),
7444
- _currentInputContent_ = ( _.isObject( _currentModuleValue_ ) && ! _.isEmpty( _currentModuleValue_[ to.input_id ] ) ) ? _currentModuleValue_[ to.input_id ] : '';
7445
-
7446
- // automatically add line breaks when setting the content
7447
- // simplified version of php wpautop()
7448
- // fixes https://github.com/presscustomizr/nimble-builder/issues/259
7449
- _currentInputContent_ = _currentInputContent_.replace(/\r?\n/g, '<br/>');
7450
- try { api.sekTinyMceEditor.setContent( _currentInputContent_ ); } catch( er ) {
7451
- api.errare( 'Error when setting the tiny mce editor content in setupTinyMceEditor', er );
7452
- }
7453
- api.sekTinyMceEditor.focus();
7454
- });
7455
-
7456
- });//api.sekEditorSynchronizedInput.bind( function( to, from )
7457
-
7458
-
7459
-
7460
-
7461
-
7462
-
7463
-
7464
 
7465
  // REACT TO EDITOR VISIBILITY
7466
  api.sekEditorExpanded.bind( function ( expanded, from, params ) {
7467
  mayBeAwakeTinyMceEditor();
7468
  //api.infoLog('in api.sekEditorExpanded', expanded );
7469
- if ( expanded ) {
7470
  api.sekTinyMceEditor.focus();
7471
  }
7472
  $(document.body).toggleClass( 'czr-customize-content_editor-pane-open', expanded);
@@ -7562,57 +7601,8 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
7562
 
7563
 
7564
 
7565
- attachEventsToEditor : function() {
7566
  var self = this;
7567
- // Cache some dom elements
7568
- self.$editorTextArea = $( '#czr-customize-content_editor' );
7569
- self.$editorPane = $( '#czr-customize-content_editor-pane' );
7570
- self.$editorDragbar = $( '#czr-customize-content_editor-dragbar' );
7571
- self.$editorFrame = $( '#czr-customize-content_editor_ifr' );
7572
- self.$mceTools = $( '#wp-czr-customize-content_editor-tools' );
7573
- self.$mceToolbar = self.$editorPane.find( '.mce-toolbar-grp' );
7574
- self.$mceStatusbar = self.$editorPane.find( '.mce-statusbar' );
7575
-
7576
- self.$preview = $( '#customize-preview' );
7577
- self.$collapseSidebar = $( '.collapse-sidebar' );
7578
-
7579
- // REACT TO EDITOR CHANGES
7580
- // bind on / off event actions
7581
- // Problem to solve : we need to attach event to both the visual and the text editor tab ( html editor ), which have different selectors
7582
- // If we bind only the visual editor, changes made to the simple textual html editor won't be taken into account
7583
- // VISUAL EDITOR
7584
- api.sekTinyMceEditor.on( 'input change keyup', function( evt ) {
7585
- //console.log('api.sekTinyMceEditor on input change keyup', evt.type, api.sekTinyMceEditor.getContent() );
7586
- // set the input value
7587
- if ( api.control.has( api.sekEditorSynchronizedInput().control_id ) ) {
7588
- try { api.control( api.sekEditorSynchronizedInput().control_id )
7589
- .trigger( 'tinyMceEditorUpdated', {
7590
- input_id : api.sekEditorSynchronizedInput().input_id,
7591
- html_content : api.sekTinyMceEditor.getContent(),
7592
- modified_editor_element : api.sekTinyMceEditor
7593
- });
7594
- } catch( er ) {
7595
- api.errare( 'Error when triggering tinyMceEditorUpdated', er );
7596
- }
7597
- }
7598
- });
7599
-
7600
- // TEXT EDITOR
7601
- self.$editorTextArea.on( 'input', function( evt ) {
7602
- //console.log('self.$editorTextArea EVENT ', evt.type, self.$editorTextArea.val() );
7603
- try { api.control( api.sekEditorSynchronizedInput().control_id )
7604
- .trigger( 'tinyMceEditorUpdated', {
7605
- input_id : api.sekEditorSynchronizedInput().input_id,
7606
- html_content : self.$editorTextArea.val(),
7607
- modified_editor_element : self.$editorTextArea
7608
- });
7609
- } catch( er ) {
7610
- api.errare( 'Error when triggering tinyMceEditorUpdated', er );
7611
- }
7612
- });
7613
-
7614
-
7615
-
7616
  // LISTEN TO USER DRAG ACTIONS => RESIZE EDITOR
7617
  // Note : attaching event to the dragbar element was broken => the mouseup event could not be triggered for some reason, probably because adding the class "czr-customize-content_editor-pane-resize", makes us lose access to the dragbar element
7618
  // => that's why we listen for the mouse events when they have bubbled up to the parent wrapper, and then check if the target is our candidate.
@@ -7623,27 +7613,24 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
7623
  return;
7624
  switch( evt.type ) {
7625
  case 'mousedown' :
7626
- $( document ).on( 'mousemove.czr-customize-content_editor', function( event ) {
7627
  event.preventDefault();
7628
  $( document.body ).addClass( 'czr-customize-content_editor-pane-resize' );
7629
- self.$editorFrame.css( 'pointer-events', 'none' );
7630
  self.czrResizeEditor( event.pageY );
7631
  });
7632
  break;
7633
 
7634
  case 'mouseup' :
7635
- $( document ).off( 'mousemove.czr-customize-content_editor' );
7636
  $( document.body ).removeClass( 'czr-customize-content_editor-pane-resize' );
7637
- self.$editorFrame.css( 'pointer-events', '' );
7638
  break;
7639
  }
7640
  });
7641
  },
7642
 
7643
 
7644
-
7645
-
7646
-
7647
  czrResizeEditor : function( position ) {
7648
  var self = this,
7649
  //$sectionContent = input.container.closest( 'ul.accordion-section-content' ),
@@ -7658,6 +7645,11 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
7658
  args = {},
7659
  resizeHeight;
7660
 
 
 
 
 
 
7661
  if ( ! api.sekEditorExpanded() ) {
7662
  return;
7663
  }
@@ -7667,7 +7659,7 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
7667
  }
7668
 
7669
  args.height = resizeHeight;
7670
- args.components = self.$mceTools.outerHeight() + self.$mceToolbar.outerHeight() + self.$mceStatusbar.outerHeight();
7671
 
7672
  if ( resizeHeight < minScroll ) {
7673
  args.height = minScroll;
@@ -7683,10 +7675,10 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
7683
 
7684
  self.$preview.css( 'bottom', args.height );
7685
  self.$editorPane.css( 'height', args.height );
7686
- self.$editorFrame.css( 'height', args.height - args.components );
7687
  self.$collapseSidebar.css(
7688
  'bottom',
7689
- collapseMinSpacing > windowHeight - args.height ? self.$mceStatusbar.outerHeight() + collapseBottomInsideEditor : args.height + collapseBottomOutsideEditor
7690
  );
7691
 
7692
  //$sectionContent.css( 'padding-bottom', windowWidth <= mobileWidth ? args.height : '' );
@@ -9741,6 +9733,299 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
9741
 
9742
  }//revision_history
9743
  });//$.extend( api.czrInputMap, {})
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9744
  })( wp.customize, jQuery, _ );//global sektionsLocalizedData, serverControlParams
9745
  //extends api.CZRDynModule
9746
  /* ------------------------------------------------------------------------- *
@@ -11687,7 +11972,7 @@ var CZRSeksPrototype = CZRSeksPrototype || {};
11687
  initialize : function( name, options ) {
11688
  var input = this;
11689
  // Expand the editor when ready
11690
- if ( 'tiny_mce_editor' == input.type ) {
11691
  input.isReady.then( function() {
11692
  input.container.find('[data-czr-action="open-tinymce-editor"]').trigger('click');
11693
  });
26
  // prevent hammering server + fixes https://github.com/presscustomizr/nimble-builder/issues/244
27
  self.SETTING_UPDATE_BUFFER = 100;
28
 
29
+ // introduced for https://github.com/presscustomizr/nimble-builder/issues/403
30
+ self.TINYMCE_EDITOR_HEIGHT = 100;
31
+
32
  // Define a default value for the sektion setting value, used when no server value has been sent
33
  // @see php function
34
  // function sek_get_default_location_model() {
69
  $.extend( query, { local_skope_id : api.czr_skopeBase.getSkopeProperty( 'skope_id' ) } );
70
  });
71
 
72
+ // added for https://github.com/presscustomizr/nimble-builder/issues/403
73
+ // in fmk::setupTinyMceEditor => each id of newly instantiated editor is added to the [] api.czrActiveWPEditors
74
+ // We need to remove those instances when cleaning registered controls
75
+ api.bind( 'sek-before-clean-registered', function() {
76
+ if ( _.isArray( api.czrActiveWPEditors ) ) {
77
+ _.each( api.czrActiveWPEditors, function( _id ) {
78
+ wp.editor.remove( _id );
79
+ });
80
+ api.czrActiveWPEditors = [];
81
+ }
82
+ });
83
  },// initialize()
84
 
85
 
2846
  // Maybe set the input based value
2847
  var input_id = params.settingParams.args.input_changed;
2848
  var inputRegistrationParams;
2849
+
2850
+ // introduced when updating the new text editors
2851
+ // https://github.com/presscustomizr/nimble-builder/issues/403
2852
+ var refreshMarkupWhenNeededForInput = function() {
2853
+ return inputRegistrationParams && _.isString( inputRegistrationParams.refresh_markup ) && 'true' !== inputRegistrationParams.refresh_markup && 'false' !== inputRegistrationParams.refresh_markup;
2854
+ };
2855
+
2856
  if ( ! _.isUndefined( input_id ) ) {
2857
  inputRegistrationParams = self.getInputRegistrationParams( input_id, parentModuleType );
2858
  if ( ! _.isUndefined( inputRegistrationParams.refresh_stylesheet ) ) {
2859
  refresh_stylesheet = Boolean( inputRegistrationParams.refresh_stylesheet );
2860
  }
2861
  if ( ! _.isUndefined( inputRegistrationParams.refresh_markup ) ) {
2862
+ if ( refreshMarkupWhenNeededForInput() ) {
2863
+ refresh_markup = inputRegistrationParams.refresh_markup;
2864
+ } else {
2865
+ refresh_markup = Boolean( inputRegistrationParams.refresh_markup );
2866
+ }
2867
  }
2868
  if ( ! _.isUndefined( inputRegistrationParams.refresh_fonts ) ) {
2869
  refresh_fonts = Boolean( inputRegistrationParams.refresh_fonts );
2926
  });
2927
  }
2928
 
2929
+
2930
  // MARKUP
2931
+ // since https://github.com/presscustomizr/nimble-builder/issues/403, 2 cases :
2932
+ // 1) update simply by postMessage, without ajax action <= refresh_markup is a string of selectors, and the content does not include content that needs server side parsing, like shortcode or template tages
2933
+ // 2) otherwise => update the level with an ajax refresh action
2934
+ var _sendRequestForAjaxMarkupRefresh = function() {
2935
  api.previewer.send( 'sek-refresh-level', {
2936
  location_skope_id : true === promiseParams.is_global_location ? sektionsLocalizedData.globalSkopeId : api.czr_skopeBase.getSkopeProperty( 'skope_id' ),//<= send skope id to the preview so we can use it when ajaxing
2937
  local_skope_id : api.czr_skopeBase.getSkopeProperty( 'skope_id' ),//<= send skope id to the preview so we can use it when ajaxing
2942
  },
2943
  skope_id : api.czr_skopeBase.getSkopeProperty( 'skope_id' ),//<= send skope id to the preview so we can use it when ajaxing
2944
  });
2945
+ };
2946
+
2947
+ if ( true === refresh_markup ) {
2948
+ _sendRequestForAjaxMarkupRefresh();
2949
+ }
2950
+
2951
+ // @todo:
2952
+ // for multi-item modules, send the item identifier
2953
+ if ( refreshMarkupWhenNeededForInput() ) {
2954
+ var _html_content = params.settingParams.args.input_value;
2955
+ if ( ! _.isString( _html_content ) ) {
2956
+ throw new Error( '::updateAPISettingAndExecutePreviewActions => _doUpdateWithRequestedAction => refreshMarkupWhenNeededForInput => html content is not a string.');
2957
+ }
2958
+ if ( ! self.htmlIncludesShortcodesOrTmplTags( _html_content ) ) {
2959
+ api.previewer.send( 'sek-update-html-in-selector', {
2960
+ selector : inputRegistrationParams.refresh_markup,
2961
+ html : _html_content,
2962
+ id : params.uiParams.id,
2963
+ location_skope_id : true === promiseParams.is_global_location ? sektionsLocalizedData.globalSkopeId : api.czr_skopeBase.getSkopeProperty( 'skope_id' ),//<= send skope id to the preview so we can use it when ajaxing
2964
+ local_skope_id : api.czr_skopeBase.getSkopeProperty( 'skope_id' ),//<= send skope id to the preview so we can use it when ajaxing
2965
+ apiParams : {
2966
+ action : 'sek-update-html-in-selector',
2967
+ id : params.uiParams.id,
2968
+ level : params.uiParams.level
2969
+ },
2970
+ skope_id : api.czr_skopeBase.getSkopeProperty( 'skope_id' ),//<= send skope id to the preview so we can use it when ajaxing
2971
+ });
2972
+ } else {
2973
+ _sendRequestForAjaxMarkupRefresh();
2974
+ }
2975
  }
2976
 
2977
  // REFRESH THE PREVIEW ?
3107
  case 'wp_color_alpha' :
3108
  case 'wp_color' :
3109
  case 'content_picker' :
3110
+ case 'detached_tinymce_editor' :
3111
+ case 'nimble_tinymce_editor' :
3112
  case 'password' :
3113
  case 'range' :
3114
  case 'range_slider' :
3166
  }
3167
  }
3168
  return controlIsAlreadyRegistered;
3169
+ },
3170
+
3171
+
3172
+
3173
+ /**
3174
+ * Gets a list of unique shortcodes or shortcode-look-alikes in the content.
3175
+ *
3176
+ * @param {string} content The content we want to scan for shortcodes.
3177
+ */
3178
+ htmlIncludesShortcodesOrTmplTags : function( content ) {
3179
+ var shortcodes = content.match( /\[+([\w_-])+/g ),
3180
+ tmpl_tags = content.match( /\{\{+([\w_-])+/g ),
3181
+ shortcode_result = [],
3182
+ tmpl_tag_result = [];
3183
+
3184
+ if ( shortcodes ) {
3185
+ for ( var i = 0; i < shortcodes.length; i++ ) {
3186
+ var _shortcode = shortcodes[ i ].replace( /^\[+/g, '' );
3187
+
3188
+ if ( shortcode_result.indexOf( _shortcode ) === -1 ) {
3189
+ shortcode_result.push( _shortcode );
3190
+ }
3191
+ }
3192
+ }
3193
+ if ( tmpl_tags ) {
3194
+ for ( var j = 0; j < tmpl_tags.length; j++ ) {
3195
+ var _tag = tmpl_tags[ j ].replace( /^\[+/g, '' );
3196
+
3197
+ if ( tmpl_tag_result.indexOf( _tag ) === -1 ) {
3198
+ tmpl_tag_result.push( _tag );
3199
+ }
3200
+ }
3201
+ }
3202
+ return !_.isEmpty( shortcode_result ) || !_.isEmpty( tmpl_tag_result );
3203
  }
3204
  });//$.extend()
3205
  })( wp.customize, jQuery );//global sektionsLocalizedData
5675
  var self = this,
5676
  registered = $.extend( true, [], self.registered() || [] );
5677
 
5678
+ // added for https://github.com/presscustomizr/nimble-builder/issues/403
5679
+ // in order to remove all instantiations of WP editor
5680
+ // @see ::initialize()
5681
+ api.trigger('sek-before-clean-registered');
5682
+
5683
  registered = _.filter( registered, function( _reg_ ) {
5684
  if ( 'setting' !== _reg_.what ) {
5685
  if ( api[ _reg_.what ].has( _reg_.id ) ) {
7443
  var self = this;
7444
  // OBSERVABLE VALUES
7445
  api.sekEditorExpanded = new api.Value( false );
7446
+ //api.sekEditorSynchronizedInput = new api.Value();
7447
 
7448
  self.editorEventsListenerSetup = false;//this status will help us ensure that we bind the shared tinyMce instance only once
7449
 
7450
+ // Cache some dom elements
7451
+ self.$editorPane = $( '#czr-customize-content_editor-pane' );
7452
+ self.$editorDragbar = $( '#czr-customize-content_editor-dragbar' );
7453
+ self.$preview = $( '#customize-preview' );
7454
+ self.$collapseSidebar = $( '.collapse-sidebar' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7455
 
7456
+ self.attachResizeEventsToEditor();
 
 
 
7457
 
7458
+ // Cache the instance and attach
7459
+ var mayBeAwakeTinyMceEditor = function() {
7460
+ api.sekTinyMceEditor = tinyMCE.get( sektionsLocalizedData.idOfDetachedTinyMceTextArea );
7461
+ var _do = function() {
7462
+ if ( false === self.editorEventsListenerSetup ) {
7463
+ self.editorEventsListenerSetup = true;
7464
+ self.trigger('sek-tiny-mce-editor-bound-and-instantiated');
7465
+ }
7466
+ };
7467
+ if ( api.sekTinyMceEditor ) {
7468
+ if ( api.sekTinyMceEditor.initialized ) {
7469
+ _do();
7470
  } else {
7471
+ api.sekTinyMceEditor.on( 'init',function() {
7472
+ _do();
7473
+ } );
 
 
7474
  }
7475
  }
7476
+ };
 
 
 
 
 
 
 
 
 
7477
 
7478
  // CASE 1)
7479
  // Toggle the editor visibility
7489
  api.errare('toggle-tinymce-editor => missing input or control id');
7490
  return;
7491
  }
7492
+ // var currentEditorSyncData = $.extend( true, {}, api.sekEditorSynchronizedInput() ),
7493
+ // newEditorSyncData = _.extend( currentEditorSyncData, {
7494
+ // input_id : input_id,
7495
+ // control_id : control_id
7496
+ // });
7497
+ //api.sekEditorSynchronizedInput( newEditorSyncData );
7498
  api.sekEditorExpanded( true );
7499
+ //api.sekTinyMceEditor.focus();
7500
  });
7501
 
7502
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7503
 
7504
  // REACT TO EDITOR VISIBILITY
7505
  api.sekEditorExpanded.bind( function ( expanded, from, params ) {
7506
  mayBeAwakeTinyMceEditor();
7507
  //api.infoLog('in api.sekEditorExpanded', expanded );
7508
+ if ( expanded && api.sekTinyMceEditor ) {
7509
  api.sekTinyMceEditor.focus();
7510
  }
7511
  $(document.body).toggleClass( 'czr-customize-content_editor-pane-open', expanded);
7601
 
7602
 
7603
 
7604
+ attachResizeEventsToEditor : function() {
7605
  var self = this;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7606
  // LISTEN TO USER DRAG ACTIONS => RESIZE EDITOR
7607
  // Note : attaching event to the dragbar element was broken => the mouseup event could not be triggered for some reason, probably because adding the class "czr-customize-content_editor-pane-resize", makes us lose access to the dragbar element
7608
  // => that's why we listen for the mouse events when they have bubbled up to the parent wrapper, and then check if the target is our candidate.
7613
  return;
7614
  switch( evt.type ) {
7615
  case 'mousedown' :
7616
+ $( document ).on( 'mousemove.' + sektionsLocalizedData.idOfDetachedTinyMceTextArea, function( event ) {
7617
  event.preventDefault();
7618
  $( document.body ).addClass( 'czr-customize-content_editor-pane-resize' );
7619
+ $( '#czr-customize-content_editor_ifr' ).css( 'pointer-events', 'none' );
7620
  self.czrResizeEditor( event.pageY );
7621
  });
7622
  break;
7623
 
7624
  case 'mouseup' :
7625
+ $( document ).off( 'mousemove.' + sektionsLocalizedData.idOfDetachedTinyMceTextArea );
7626
  $( document.body ).removeClass( 'czr-customize-content_editor-pane-resize' );
7627
+ $( '#czr-customize-content_editor_ifr' ).css( 'pointer-events', '' );
7628
  break;
7629
  }
7630
  });
7631
  },
7632
 
7633
 
 
 
 
7634
  czrResizeEditor : function( position ) {
7635
  var self = this,
7636
  //$sectionContent = input.container.closest( 'ul.accordion-section-content' ),
7645
  args = {},
7646
  resizeHeight;
7647
 
7648
+ var $editorFrame = $( '#czr-customize-content_editor_ifr' ),
7649
+ $mceTools = $( '#wp-czr-customize-content_editor-tools' ),
7650
+ $mceToolbar = self.$editorPane.find( '.mce-toolbar-grp' ),
7651
+ $mceStatusbar = self.$editorPane.find( '.mce-statusbar' );
7652
+
7653
  if ( ! api.sekEditorExpanded() ) {
7654
  return;
7655
  }
7659
  }
7660
 
7661
  args.height = resizeHeight;
7662
+ args.components = $mceTools.outerHeight() + $mceToolbar.outerHeight() + $mceStatusbar.outerHeight();
7663
 
7664
  if ( resizeHeight < minScroll ) {
7665
  args.height = minScroll;
7675
 
7676
  self.$preview.css( 'bottom', args.height );
7677
  self.$editorPane.css( 'height', args.height );
7678
+ $editorFrame.css( 'height', args.height - args.components );
7679
  self.$collapseSidebar.css(
7680
  'bottom',
7681
+ collapseMinSpacing > windowHeight - args.height ? $mceStatusbar.outerHeight() + collapseBottomInsideEditor : args.height + collapseBottomOutsideEditor
7682
  );
7683
 
7684
  //$sectionContent.css( 'padding-bottom', windowWidth <= mobileWidth ? args.height : '' );
9733
 
9734
  }//revision_history
9735
  });//$.extend( api.czrInputMap, {})
9736
+ })( wp.customize, jQuery, _ );//global sektionsLocalizedData
9737
+ ( function ( api, $, _ ) {
9738
+ // all available input type as a map
9739
+ api.czrInputMap = api.czrInputMap || {};
9740
+
9741
+ // input_type => callback fn to fire in the Input constructor on initialize
9742
+ // the callback can receive specific params define in each module constructor
9743
+ // For example, a content picker can be given params to display only taxonomies
9744
+ // the default input_event_map can also be overriden in this callback
9745
+ $.extend( api.czrInputMap, {
9746
+ nimble_tinymce_editor : function() {
9747
+ var input = this,
9748
+ $textarea = input.container.find('textarea').first(),
9749
+ _id = $textarea.length > 0 ? $textarea.attr('id') : null,
9750
+ inputRegistrationParams = api.czr_sektions.getInputRegistrationParams( input.id, input.module.module_type ),
9751
+ // see how those buttons can be set in php class _NIMBLE_Editors
9752
+ // @see the global js var nimbleTinyMCEPreInit includes all params
9753
+ defaultToolbarBtns = sektionsLocalizedData.defaultToolbarBtns,
9754
+ //defaultQuickTagBtns = "strong,em,link,block,del,ins,img,ul,ol,li,code,more,close",
9755
+ defaultQuickTagBtns = "strong,em,link,code";
9756
+
9757
+ if ( _.isNull( _id ) ) {
9758
+ throw new Error( 'setupTinyMceEditor => missing textarea for module :' + input.module.id );
9759
+ }
9760
+ if ( tinyMCE.get( _id ) ) {
9761
+ throw new Error( 'setupTinyMceEditor => duplicate editor id.');
9762
+ }
9763
+ var getToolbarBtns = function() {
9764
+ var toolBarBtn = defaultToolbarBtns.split(',');
9765
+ if ( inputRegistrationParams.editor_params && _.isArray( inputRegistrationParams.editor_params.excludedBtns ) ) {
9766
+ var excluded = inputRegistrationParams.editor_params.excludedBtns;
9767
+ toolBarBtn = _.filter( toolBarBtn, function( _btn ) {
9768
+ return !_.contains( excluded, _btn );
9769
+ });
9770
+ }
9771
+ if ( inputRegistrationParams.editor_params && _.isArray( inputRegistrationParams.editor_params.includedBtns ) ) {
9772
+ var includedBtns = inputRegistrationParams.editor_params.includedBtns;
9773
+ toolBarBtn = _.filter( toolBarBtn, function( _btn ) {
9774
+ return _.contains( includedBtns, _btn );
9775
+ });
9776
+ }
9777
+ return toolBarBtn.join(',');
9778
+ };
9779
+ var getEditorHeight = function() {
9780
+ return ( inputRegistrationParams.editor_params && _.isNumber( inputRegistrationParams.editor_params.height ) ) ? inputRegistrationParams.editor_params.height : api.czr_sektions.TINYMCE_EDITOR_HEIGHT;
9781
+ };
9782
+ var isAutoPEnabled = function() {
9783
+ // on registration, the autop can be specified
9784
+ return inputRegistrationParams && inputRegistrationParams.editor_params && true === inputRegistrationParams.editor_params.autop;
9785
+ };
9786
+ // Set a height for the textarea before instanciation
9787
+ //$textarea.css( { 'height' : getEditorHeight() } );
9788
+
9789
+ // the plugins like colorpicker have been loaded when instantiating the detached tinymce editor
9790
+ // @see php class _NIMBLE_Editors
9791
+ // if not specified, wp.editor falls back on the ones of wp.editor.getDefaultSettings()
9792
+ // we can use them here without the need to specify them in the tinymce {} params
9793
+ // @see the tinyMCE params with this global var : nimbleTinyMCEPreInit.mceInit["czr-customize-content_editor"]
9794
+ //
9795
+ // forced_root_block added to remove <p> tags automatically added
9796
+ // @see https://stackoverflow.com/questions/20464028/how-to-remove-unwanted-p-tags-from-wordpress-editor-using-tinymce
9797
+ var init_settings = {
9798
+ //tinymce: nimbleTinyMCEPreInit.mceInit["czr-customize-content_editor"],
9799
+ tinymce: {
9800
+ //plugins:"charmap,colorpicker,hr,lists,media,paste,tabfocus,textcolor,wordpress,wpeditimage,wpemoji,wpgallery,wplink,wpdialogs,wptextpattern,wpview",
9801
+ toolbar1:getToolbarBtns(),
9802
+ //toolbar2:"",
9803
+ content_css:( function() {
9804
+ var default_settings = wp.editor.getDefaultSettings(),
9805
+ stylesheets = [ sektionsLocalizedData.tinyMceNimbleEditorStylesheetUrl ];
9806
+ if ( default_settings && default_settings.tinymce && default_settings.tinymce.content_css ) {
9807
+ stylesheets = _.union( default_settings.tinymce.content_css.split(','), stylesheets );
9808
+ }
9809
+ return stylesheets.join(',');
9810
+ })(),
9811
+ // https://www.tiny.cloud/docs/plugins/autoresize/
9812
+ min_height :40,
9813
+ height:getEditorHeight()
9814
+ },
9815
+ quicktags : {
9816
+ buttons : defaultQuickTagBtns
9817
+ },
9818
+ mediaButtons: ( inputRegistrationParams.editor_params && false === inputRegistrationParams.editor_params.media_button ) ? false : true
9819
+ };
9820
+
9821
+ // AUTOP
9822
+ init_settings.tinymce.wpautop = isAutoPEnabled();
9823
+ // forced_root_block is added to remove <p> tags automatically added
9824
+ // @see https://stackoverflow.com/questions/20464028/how-to-remove-unwanted-p-tags-from-wordpress-editor-using-tinymce
9825
+ if ( !isAutoPEnabled() ) {
9826
+ init_settings.tinymce.forced_root_block = "";
9827
+ }
9828
+
9829
+ // INITIALIZE
9830
+ wp.editor.initialize( _id, init_settings );
9831
+ // Note that an easy way to instantiate a basic editor would be to use :
9832
+ // wp.editor.initialize( _id, { tinymce : { forced_root_block : "", wpautop: false }, quicktags : true });
9833
+
9834
+ var _editor = tinyMCE.get( _id );
9835
+ if ( ! _editor ) {
9836
+ throw new Error( 'setupTinyMceEditor => missing editor instance for module :' + input.module.id );
9837
+ }
9838
+
9839
+ // Store the id of each instantiated tinyMceEditor
9840
+ // used in api.czrSektion::cleanRegistered
9841
+ api.czrActiveWPEditors = api.czrActiveWPEditors || [];
9842
+ var currentEditors = $.extend( true, [], api.czrActiveWPEditors );
9843
+ currentEditors.push(_id);
9844
+ api.czrActiveWPEditors = currentEditors;
9845
+
9846
+ // Let's set the input() value when the editor is ready
9847
+ // Because when we instantiate it, the textarea might not reflect the input value because too early
9848
+ var _doOnInit = function() {
9849
+ _editor.setContent( input() );
9850
+ //$('#wp-' + _editor.id + '-wrap' ).find('iframe').addClass('labite').css('height','50px');
9851
+ };
9852
+ if ( _editor.initialized ) {
9853
+ _doOnInit();
9854
+ } else {
9855
+ _editor.on( 'init',_doOnInit );
9856
+ }
9857
+
9858
+ // bind events
9859
+ _editor.on( 'input change keyup', function( evt ) {
9860
+ input( _editor.getContent() );
9861
+ } );
9862
+ },
9863
+
9864
+
9865
+
9866
+
9867
+ // this input setup works in collaboration with ::setupTinyMceEditor()
9868
+ // for api.sekEditorExpanded() and resizing of the editor.
9869
+ detached_tinymce_editor : function() {
9870
+ var input = this,
9871
+ $textarea = $('textarea#' + sektionsLocalizedData.idOfDetachedTinyMceTextArea ), //$('textarea#czr-customize-content_editor'),
9872
+ _id,
9873
+ inputRegistrationParams = api.czr_sektions.getInputRegistrationParams( input.id, input.module.module_type );
9874
+
9875
+ if ( $textarea.length > 0 ) {
9876
+ _id = $textarea.attr('id');
9877
+ } else {
9878
+ throw new Error( 'api.czrInputMap::detached_tinymce_editor => missing textarea element');
9879
+ }
9880
+
9881
+ // if ( _.isNull( _id ) ) {
9882
+ // throw new Error( 'setupDetachedTinyMceEditor => missing textarea for module :' + input.module.id );
9883
+ // }
9884
+ // See wp.editor.initialize() in wp-admin/js/editor.js for initialization options.
9885
+ // **
9886
+ // * Initialize TinyMCE and/or Quicktags. For use with wp_enqueue_editor() (PHP).
9887
+ // *
9888
+ // * Intended for use with an existing textarea that will become the Text editor tab.
9889
+ // * The editor width will be the width of the textarea container, height will be adjustable.
9890
+ // *
9891
+ // * Settings for both TinyMCE and Quicktags can be passed on initialization, and are "filtered"
9892
+ // * with custom jQuery events on the document element, wp-before-tinymce-init and wp-before-quicktags-init.
9893
+ // *
9894
+ // * @since 4.8.0
9895
+ // *
9896
+ // * @param {string} id The HTML id of the textarea that is used for the editor.
9897
+ // * Has to be jQuery compliant. No brackets, special chars, etc.
9898
+ // * @param {object} settings Example:
9899
+ // * settings = {
9900
+ // * // See https://www.tinymce.com/docs/configure/integration-and-setup/.
9901
+ // * // Alternatively set to `true` to use the defaults.
9902
+ // * tinymce: {
9903
+ // * setup: function( editor ) {
9904
+ // * console.log( 'Editor initialized', editor );
9905
+ // * }
9906
+ // * }
9907
+ // *
9908
+ // * // Alternatively set to `true` to use the defaults.
9909
+ // * quicktags: {
9910
+ // * buttons: 'strong,em,link'
9911
+ // * }
9912
+ // * }
9913
+ // */
9914
+
9915
+ // Remove now
9916
+ // the initial instance has been created with php inline js generated by sek_setup_nimble_editor()
9917
+ // IMPORTANT !! => don't use wp.editor.remove() @see wp-admin/js/editor.js, because it can remove the stylesheet editor.css
9918
+ // and break the style of all editors
9919
+ if ( window.tinymce ) {
9920
+ mceInstance = window.tinymce.get( _id );
9921
+ if ( mceInstance ) {
9922
+ // if ( ! mceInstance.isHidden() ) {
9923
+ // mceInstance.save();
9924
+ // }
9925
+ mceInstance.remove();
9926
+ }
9927
+ }
9928
+ // if ( window.quicktags ) {
9929
+ // qtInstance = window.QTags.getInstance( id );
9930
+
9931
+ // if ( qtInstance ) {
9932
+ // qtInstance.remove();
9933
+ // }
9934
+ // }
9935
+
9936
+ // Instantiate a new one
9937
+ // see in wp-admin/js/editor.js
9938
+ // the nimbleTinyMCEPreInit are set in php class _NIMBLE_Editors
9939
+ if ( !window.nimbleTinyMCEPreInit || !window.nimbleTinyMCEPreInit.mceInit || !window.nimbleTinyMCEPreInit.mceInit[ _id ] ) {
9940
+ throw new Error('setupDetachedTinyMceEditor => invalid nimbleTinyMCEPreInit global var');
9941
+ }
9942
+
9943
+ var init_settings = nimbleTinyMCEPreInit.mceInit[ _id ];
9944
+
9945
+ // Add the nimble editor's stylesheet to the default's ones
9946
+ init_settings.content_css = ( function() {
9947
+ var default_settings = wp.editor.getDefaultSettings(),
9948
+ stylesheets = [ sektionsLocalizedData.tinyMceNimbleEditorStylesheetUrl ];
9949
+ if ( default_settings && default_settings.tinymce && default_settings.tinymce.content_css ) {
9950
+ stylesheets = _.union( default_settings.tinymce.content_css.split(','), stylesheets );
9951
+ }
9952
+ return stylesheets.join(',');
9953
+ })();
9954
+
9955
+ // Handle wpautop param
9956
+ var item = input.input_parent;
9957
+ var isAutoPEnabled = function() {
9958
+ var parent_item_val = item();
9959
+ // 1) the module 'czr_tinymce_child' includes an autop option
9960
+ // 2) on registration, the autop can be specified
9961
+ if ( !_.isUndefined( parent_item_val.autop ) ) {
9962
+ return parent_item_val.autop;
9963
+ } else {
9964
+ return inputRegistrationParams && inputRegistrationParams.editor_params && true === inputRegistrationParams.editor_params.autop;
9965
+ }
9966
+ };
9967
+
9968
+ init_settings.wpautop = isAutoPEnabled();
9969
+ // forced_root_block is added to remove <p> tags automatically added
9970
+ // @see https://stackoverflow.com/questions/20464028/how-to-remove-unwanted-p-tags-from-wordpress-editor-using-tinymce
9971
+ if ( !isAutoPEnabled() ) {
9972
+ init_settings.forced_root_block = "";
9973
+ }
9974
+
9975
+ // TOOLBARS
9976
+ init_settings.toolbar1 = sektionsLocalizedData.defaultToolbarBtns;
9977
+ init_settings.toolbar2 = "";
9978
+
9979
+ window.tinymce.init( init_settings );
9980
+ window.QTags.getInstance( _id );
9981
+ // wp.editor.initialize( _id, {
9982
+ // //tinymce : true,
9983
+ // tinymce: nimbleTinyMCEPreInit.mceInit[_id],
9984
+ // quicktags : nimbleTinyMCEPreInit.qtInit[_id],
9985
+ // mediaButtons: true
9986
+ // });
9987
+
9988
+ var _editor = tinyMCE.get( _id );
9989
+ if ( ! _editor ) {
9990
+ throw new Error( 'setupDetachedTinyMceEditor => missing editor instance for module :' + input.module.id );
9991
+ }
9992
+
9993
+ // Let's set the input() value when the editor is ready
9994
+ // Because when we instantiate it, the textarea might not reflect the input value because too early
9995
+ var _doOnInit = function() {
9996
+ // To ensure retro-compat with content created prior to Nimble v1.5.2, in which the editor has been updated
9997
+ // @see https://github.com/presscustomizr/nimble-builder/issues/404
9998
+ // we add the <p> tag on init, if autop option is checked
9999
+ var initial_content = !isAutoPEnabled() ? input() : wp.editor.autop( input() );
10000
+ _editor.setContent( initial_content );
10001
+ api.sekEditorExpanded( true );
10002
+ };
10003
+ if ( _editor.initialized ) {
10004
+ _doOnInit();
10005
+ } else {
10006
+ _editor.on( 'init', _doOnInit );
10007
+ }
10008
+
10009
+ // bind events
10010
+ _editor.on( 'input change keyup keydown click SetContent BeforeSetContent', function( evt ) {
10011
+ //$textarea.trigger( 'change', {current_input : input} );
10012
+ input( isAutoPEnabled() ? _editor.getContent() : wp.editor.removep( _editor.getContent() ) );
10013
+ });
10014
+
10015
+ // store the current input now, so we'll always get the right one when textarea changes
10016
+ api.sekCurrentDetachedTinyMceInput = input;
10017
+
10018
+ // TEXT EDITOR => This is the original textarea element => needs to be bound separatelyn because not considered part of the tinyMce editor.
10019
+ // Bound only once
10020
+ if ( !$textarea.data('czr-bound-for-detached-editor') ) {
10021
+ $textarea.on( 'input', function( evt, params ) {
10022
+ api.sekCurrentDetachedTinyMceInput( $(this).val() );
10023
+ });
10024
+ $textarea.data('czr-bound-for-detached-editor', true );
10025
+ }
10026
+
10027
+ },//setupDetachedTinyMceEditor
10028
+ });//$.extend( api.czrInputMap, {})
10029
  })( wp.customize, jQuery, _ );//global sektionsLocalizedData, serverControlParams
10030
  //extends api.CZRDynModule
10031
  /* ------------------------------------------------------------------------- *
11972
  initialize : function( name, options ) {
11973
  var input = this;
11974
  // Expand the editor when ready
11975
+ if ( 'detached_tinymce_editor' == input.type ) {
11976
  input.isReady.then( function() {
11977
  input.container.find('[data-czr-action="open-tinymce-editor"]').trigger('click');
11978
  });
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({})}),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,_);
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.TINYMCE_EDITOR_HEIGHT=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")})}),r.bind("sek-before-clean-registered",function(){_.isArray(r.czrActiveWPEditors)&&(_.each(r.czrActiveWPEditors,function(e){wp.editor.remove(e)}),r.czrActiveWPEditors=[])})},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(y,v){v.extend(CZRSeksPrototype,{generateUI:function(e){var t=this,i=v.Deferred();switch(_.isEmpty(e.action)&&i.reject("generateUI => missing action"),e.action){case"sek-generate-module-ui":try{i=t.generateUIforFrontModules(e,i)}catch(e){y.errare("::generateUI() => error",e),i=v.Deferred()}break;case"sek-generate-level-options-ui":try{i=t.generateUIforLevelOptions(e,i)}catch(e){y.errare("::generateUI() => error",e),i=v.Deferred()}break;case"sek-generate-draggable-candidates-picker-ui":t.cleanRegistered();try{i=t.generateUIforDraggableContent(e,i)}catch(e){y.errare("::generateUI() => error",e),i=v.Deferred()}break;case"sek-generate-local-skope-options-ui":t.cleanRegistered();try{i=t.generateUIforLocalSkopeOptions(e,i)}catch(e){y.errare("::generateUI() => error",e),i=v.Deferred()}break;case"sek-generate-global-options-ui":t.cleanRegistered();try{i=t.generateUIforGlobalOptions(e,i)}catch(e){y.errare("::generateUI() => error",e),i=v.Deferred()}}return"pending"==i.state()?i.resolve().promise():i.promise()},updateAPISettingAndExecutePreviewActions:function(n){if(!_.isEmpty(n.settingParams)&&_.has(n.settingParams,"to")){var o,r=this,e=n.settingParams.to,t=null,i=!1;if(!_.isEmpty(n.settingParams.args)&&_.has(n.settingParams.args,"moduleRegistrationParams")){var s=n.settingParams.args.moduleRegistrationParams.control,a=n.settingParams.args.moduleRegistrationParams.id,c=s.czr_Module(a);if(_.isEmpty(c)?y.errare("updateAPISettingAndExecutePreviewActions => missing parentModuleInstance",n):(t=c.module_type,i=c.isMultiItem()),!i&&_.isObject(e)?o=r.normalizeAndSanitizeSingleItemInputValues(e,t):(o=[],_.each(e,function(e){o.push(r.normalizeAndSanitizeSingleItemInputValues(e,t))})),_.isEmpty(n.defaultPreviewAction))y.errare("updateAPISettingAndExecutePreviewActions => missing defaultPreviewAction in passed params. No action can be triggered to the api.previewer.",n);else{var l,d="refresh_stylesheet"===n.defaultPreviewAction,u="refresh_markup"===n.defaultPreviewAction,p="refresh_fonts"===n.defaultPreviewAction,m="refresh_preview"===n.defaultPreviewAction,f=n.settingParams.args.input_changed,g=function(){return l&&_.isString(l.refresh_markup)&&"true"!==l.refresh_markup&&"false"!==l.refresh_markup};_.isUndefined(f)||(l=r.getInputRegistrationParams(f,t),_.isUndefined(l.refresh_stylesheet)||(d=Boolean(l.refresh_stylesheet)),_.isUndefined(l.refresh_markup)||(u=g()?l.refresh_markup:Boolean(l.refresh_markup)),_.isUndefined(l.refresh_fonts)||(p=Boolean(l.refresh_fonts)),_.isUndefined(l.refresh_preview)||(m=Boolean(l.refresh_preview)));var h=function(){if(!0!==n.isGlobalOptions)return r.updateAPISetting({action:n.uiParams.action,id:n.uiParams.id,value:o,in_column:n.uiParams.in_column,in_sektion:n.uiParams.in_sektion,options_type:n.options_type,settingParams:n.settingParams}).done(function(e){!0===d&&y.previewer.send("sek-refresh-stylesheet",{location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:y.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:y.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-refresh-stylesheet",id:n.uiParams.id,level:n.uiParams.level}});var t=function(){y.previewer.send("sek-refresh-level",{location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:y.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:y.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-refresh-level",id:n.uiParams.id,level:n.uiParams.level},skope_id:y.czr_skopeBase.getSkopeProperty("skope_id")})};if(!0===u&&t(),g()){var i=n.settingParams.args.input_value;if(!_.isString(i))throw new Error("::updateAPISettingAndExecutePreviewActions => _doUpdateWithRequestedAction => refreshMarkupWhenNeededForInput => html content is not a string.");r.htmlIncludesShortcodesOrTmplTags(i)?t():y.previewer.send("sek-update-html-in-selector",{selector:l.refresh_markup,html:i,id:n.uiParams.id,location_skope_id:!0===e.is_global_location?sektionsLocalizedData.globalSkopeId:y.czr_skopeBase.getSkopeProperty("skope_id"),local_skope_id:y.czr_skopeBase.getSkopeProperty("skope_id"),apiParams:{action:"sek-update-html-in-selector",id:n.uiParams.id,level:n.uiParams.level},skope_id:y.czr_skopeBase.getSkopeProperty("skope_id")})}!0===m&&y.previewer.refresh()});if(_.isEmpty(n.options_type))y.errare("updateAPISettingAndExecutePreviewActions => error when updating the global options => missing options_type");else{var e=y(sektionsLocalizedData.optNameForGlobalOptions)(),t=v.extend(!0,{},_.isObject(e)?e:{}),i={};_.each(o||{},function(e,t){!_.isBoolean(e)&&_.isEmpty(e+"")||(i[t]=e)}),t[n.options_type]=i,y(sektionsLocalizedData.optNameForGlobalOptions)(t)}};if(!0===p){var k=n.settingParams.args.input_value;if(!_.isString(k))return void y.errare("updateAPISettingAndExecutePreviewActions => font-family must be a string",k);-1<k.indexOf("gfont")?r.updateAPISetting({action:"sek-update-fonts",font_family:k,is_global_location:r.isGlobalLocation(n.uiParams)}).always(function(){h().then(function(){r.updateAPISetting({action:"sek-update-fonts",is_global_location:r.isGlobalLocation(n.uiParams)})})}):h()}else h()}}else y.errare("updateAPISettingAndExecutePreviewActions => missing params.settingParams.args.moduleRegistrationParams The api main setting can not be updated",n)}else y.errare("updateAPISettingAndExecutePreviewActions => missing params.settingParams.to. The api main setting can not be updated",n)},normalizeAndSanitizeSingleItemInputValues:function(e,o){var i,r={},n={},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))&&y.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"detached_tinymce_editor":case"nimble_tinymce_editor":case"password":case"range":case"range_slider":case"hidden":case"h_alignment":case"h_text_alignment":case"spacing":case"bg_position":case"v_alignment":case"font_size":case"line_height":case"font_picker":default:i=e}n[t]=i}),n},isUIControlAlreadyRegistered:function(t){var e=_.filter(this.registered(),function(e){return e.id==t&&"control"===e.what}),i=!1;return _.isEmpty(e)?i=y.control.has(t):(i=!0,1<e.length&&y.errare("generateUI => why is this control registered more than once ? => "+t)),i},htmlIncludesShortcodesOrTmplTags:function(e){var t=e.match(/\[+([\w_-])+/g),i=e.match(/\{\{+([\w_-])+/g),n=[],o=[];if(t)for(var r=0;r<t.length;r++){var s=t[r].replace(/^\[+/g,"");-1===n.indexOf(s)&&n.push(s)}if(i)for(var a=0;a<i.length;a++){var c=i[a].replace(/^\[+/g,"");-1===o.indexOf(c)&&o.push(c)}return!_.isEmpty(n)||!_.isEmpty(o)}})}(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),C=_.filter(M.collection,function(e){return e.id!=I.id&&e.id!=w.id}),S=parseFloat(I.width.toFixed(3));_.isEmpty(C)||_.each(C,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))),S=parseFloat((S+e.width).toFixed(3))}),w.width=parseFloat((100-S).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,T,j;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:[],T=q.getLevelModel($.id,d.collection),j=X.extend(!0,{},T),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==j.id)s.push(j);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()||[]);n.trigger("sek-before-clean-registered"),e=_.filter(e,function(e){if("setting"!==e.what&&n[e.what].has(e.id)){if(!_.isEmpty(t)&&e.id!==t)return;_.isFunction(n[e.what](e.id).trigger)&&i.trigger("sek-ui-pre-removal",{what:e.what,id:e.id}),o.when(n[e.what](e.id).container.remove()).done(function(){n[e.what].remove(e.id),i.trigger("sek-ui-removed",{what:e.what,id:e.id})})}return"setting"===e.what}),i.registered(e)},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(l,d){d.extend(CZRSeksPrototype,{setupTinyMceEditor:function(){var n=this;l.sekEditorExpanded=new l.Value(!1),n.editorEventsListenerSetup=!1,n.$editorPane=d("#czr-customize-content_editor-pane"),n.$editorDragbar=d("#czr-customize-content_editor-dragbar"),n.$preview=d("#customize-preview"),n.$collapseSidebar=d(".collapse-sidebar"),n.attachResizeEventsToEditor();d("#customize-theme-controls").on("click",'[data-czr-action="open-tinymce-editor"]',function(){var e=d(this).data("czr-control-id"),t=d(this).data("czr-input-id");_.isEmpty(e)||_.isEmpty(t)?l.errare("toggle-tinymce-editor => missing input or control id"):l.sekEditorExpanded(!0)}),l.sekEditorExpanded.bind(function(e,t,i){!function(){l.sekTinyMceEditor=tinyMCE.get(sektionsLocalizedData.idOfDetachedTinyMceTextArea);var e=function(){!1===n.editorEventsListenerSetup&&(n.editorEventsListenerSetup=!0,n.trigger("sek-tiny-mce-editor-bound-and-instantiated"))};l.sekTinyMceEditor&&(l.sekTinyMceEditor.initialized?e():l.sekTinyMceEditor.on("init",function(){e()}))}(),e&&l.sekTinyMceEditor&&l.sekTinyMceEditor.focus(),d(document.body).toggleClass("czr-customize-content_editor-pane-open",e),d(window)[e?"on":"off"]("resize",function(){l.sekEditorExpanded()&&_.delay(function(){n.czrResizeEditor(window.innerHeight-n.$editorPane.height())},50)}),e?n.czrResizeEditor(window.innerHeight-n.$editorPane.height()):(n.$preview.css("bottom",""),n.$collapseSidebar.css("bottom",""))}),d("#czr-customize-content_editor-pane").on("click",'[data-czr-action="close-tinymce-editor"]',function(){l.sekEditorExpanded(!1)}),d("#customize-controls").on("click",function(e){"open-tinymce-editor"!=d(e.target).data("czr-action")&&l.sekEditorExpanded(!1,{context:"clicked anywhere"})}),d(document).on("keydown",_.throttle(function(e){27===e.keyCode&&l.sekEditorExpanded(!1)},50)),n.bind("sek-tiny-mce-editor-bound-and-instantiated",function(){var e=d(l.sekTinyMceEditor.iframeElement).contents().get(0);d(e).on("keydown",_.throttle(function(e){27===e.keyCode&&l.sekEditorExpanded(!1)},50))}),_.each(["sek-click-on-inactive-zone","sek-add-section","sek-add-column","sek-add-module","sek-remove","sek-move","sek-duplicate","sek-resize-columns","sek-add-content-in-new-sektion","sek-pick-content","sek-edit-options","sek-edit-module","sek-notify"],function(e){"sek-edit-module"!=e?l.previewer.bind(e,function(){l.sekEditorExpanded(!1)}):l.previewer.bind(e,function(e){l.sekEditorExpanded("czr_tiny_mce_editor_module"===e.module_type)})})},attachResizeEventsToEditor:function(){var t=this;d("#czr-customize-content_editor-pane").on("mousedown mouseup",function(e){if(("mousedown"!==e.type||"czr-customize-content_editor-dragbar"===d(e.target).attr("id")||d(e.target).hasClass("czr-resize-handle"))&&l.sekEditorExpanded())switch(e.type){case"mousedown":d(document).on("mousemove."+sektionsLocalizedData.idOfDetachedTinyMceTextArea,function(e){e.preventDefault(),d(document.body).addClass("czr-customize-content_editor-pane-resize"),d("#czr-customize-content_editor_ifr").css("pointer-events","none"),t.czrResizeEditor(e.pageY)});break;case"mouseup":d(document).off("mousemove."+sektionsLocalizedData.idOfDetachedTinyMceTextArea),d(document.body).removeClass("czr-customize-content_editor-pane-resize"),d("#czr-customize-content_editor_ifr").css("pointer-events","")}})},czrResizeEditor:function(e){var t,i=this,n=window.innerHeight,o=(window.innerWidth,{}),r=d("#czr-customize-content_editor_ifr"),s=d("#wp-czr-customize-content_editor-tools"),a=i.$editorPane.find(".mce-toolbar-grp"),c=i.$editorPane.find(".mce-statusbar");l.sekEditorExpanded()&&(_.isNaN(e)||(t=n-e),o.height=t,o.components=s.outerHeight()+a.outerHeight()+c.outerHeight(),t<40&&(o.height=40),n-1<t&&(o.height=n-1),n<i.$editorPane.outerHeight()&&(o.height=n),i.$preview.css("bottom",o.height),i.$editorPane.css("height",o.height),r.css("height",o.height-o.components),i.$collapseSidebar.css("bottom",n-o.height<56?c.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(p,_,m){p.czrInputMap=p.czrInputMap||{},_.extend(p.czrInputMap,{nimble_tinymce_editor:function(){var t=this,e=t.container.find("textarea").first(),i=0<e.length?e.attr("id"):null,n=p.czr_sektions.getInputRegistrationParams(t.id,t.module.module_type),o=sektionsLocalizedData.defaultToolbarBtns;if(m.isNull(i))throw new Error("setupTinyMceEditor => missing textarea for module :"+t.module.id);if(tinyMCE.get(i))throw new Error("setupTinyMceEditor => duplicate editor id.");var r,s,a=function(){return n&&n.editor_params&&!0===n.editor_params.autop},c={tinymce:{toolbar1:function(){var e=o.split(",");if(n.editor_params&&m.isArray(n.editor_params.excludedBtns)){var t=n.editor_params.excludedBtns;e=m.filter(e,function(e){return!m.contains(t,e)})}if(n.editor_params&&m.isArray(n.editor_params.includedBtns)){var i=n.editor_params.includedBtns;e=m.filter(e,function(e){return m.contains(i,e)})}return e.join(",")}(),content_css:(r=wp.editor.getDefaultSettings(),s=[sektionsLocalizedData.tinyMceNimbleEditorStylesheetUrl],r&&r.tinymce&&r.tinymce.content_css&&(s=m.union(r.tinymce.content_css.split(","),s)),s.join(",")),min_height:40,height:n.editor_params&&m.isNumber(n.editor_params.height)?n.editor_params.height:p.czr_sektions.TINYMCE_EDITOR_HEIGHT},quicktags:{buttons:"strong,em,link,code"},mediaButtons:!n.editor_params||!1!==n.editor_params.media_button};c.tinymce.wpautop=a(),a()||(c.tinymce.forced_root_block=""),wp.editor.initialize(i,c);var l=tinyMCE.get(i);if(!l)throw new Error("setupTinyMceEditor => missing editor instance for module :"+t.module.id);p.czrActiveWPEditors=p.czrActiveWPEditors||[];var d=_.extend(!0,[],p.czrActiveWPEditors);d.push(i),p.czrActiveWPEditors=d;var u=function(){l.setContent(t())};l.initialized?u():l.on("init",u),l.on("input change keyup",function(e){t(l.getContent())})},detached_tinymce_editor:function(){var e,t=this,i=_("textarea#"+sektionsLocalizedData.idOfDetachedTinyMceTextArea),n=p.czr_sektions.getInputRegistrationParams(t.id,t.module.module_type);if(!(0<i.length))throw new Error("api.czrInputMap::detached_tinymce_editor => missing textarea element");if(e=i.attr("id"),window.tinymce&&(mceInstance=window.tinymce.get(e),mceInstance&&mceInstance.remove()),!window.nimbleTinyMCEPreInit||!window.nimbleTinyMCEPreInit.mceInit||!window.nimbleTinyMCEPreInit.mceInit[e])throw new Error("setupDetachedTinyMceEditor => invalid nimbleTinyMCEPreInit global var");var o,r,s=nimbleTinyMCEPreInit.mceInit[e];s.content_css=(o=wp.editor.getDefaultSettings(),r=[sektionsLocalizedData.tinyMceNimbleEditorStylesheetUrl],o&&o.tinymce&&o.tinymce.content_css&&(r=m.union(o.tinymce.content_css.split(","),r)),r.join(","));var a=t.input_parent,c=function(){var e=a();return m.isUndefined(e.autop)?n&&n.editor_params&&!0===n.editor_params.autop:e.autop};s.wpautop=c(),c()||(s.forced_root_block=""),s.toolbar1=sektionsLocalizedData.defaultToolbarBtns,s.toolbar2="",window.tinymce.init(s),window.QTags.getInstance(e);var l=tinyMCE.get(e);if(!l)throw new Error("setupDetachedTinyMceEditor => missing editor instance for module :"+t.module.id);var d=function(){var e=c()?wp.editor.autop(t()):t();l.setContent(e),p.sekEditorExpanded(!0)};l.initialized?d():l.on("init",d),l.on("input change keyup keydown click SetContent BeforeSetContent",function(e){t(c()?l.getContent():wp.editor.removep(l.getContent()))}),p.sekCurrentDetachedTinyMceInput=t,i.data("czr-bound-for-detached-editor")||(i.on("input",function(e,t){p.sekCurrentDetachedTinyMceInput(_(this).val())}),i.data("czr-bound-for-detached-editor",!0))}})}(wp.customize,jQuery,_),function(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;"detached_tinymce_editor"==i.type&&i.isReady.then(function(){i.container.find('[data-czr-action="open-tinymce-editor"]').trigger("click")}),n.CZRInput.prototype.initialize.call(i,e,t)},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
@@ -1956,6 +1956,18 @@ var SekPreviewPrototype = SekPreviewPrototype || {};
1956
  },
1957
  'sek-reset-double-click-target' : function( params ) {
1958
  $('.sek-target-for-double-click-insertion').removeClass('sek-target-for-double-click-insertion');
 
 
 
 
 
 
 
 
 
 
 
 
1959
  }
1960
 
1961
  };//msgCollection
1956
  },
1957
  'sek-reset-double-click-target' : function( params ) {
1958
  $('.sek-target-for-double-click-insertion').removeClass('sek-target-for-double-click-insertion');
1959
+ },
1960
+
1961
+ // introduced for https://github.com/presscustomizr/nimble-builder/issues/403
1962
+ 'sek-update-html-in-selector' : function( params ) {
1963
+ var $level_el = $('[data-sek-id="' + params.id + '"]' ),
1964
+ $target_el = $(params.selector, $level_el);
1965
+
1966
+ if ( $level_el.length > 0 && $target_el.length > 0 ) {
1967
+ $target_el.html( params.html );
1968
+ } else {
1969
+ self.errare( 'reactToPanelMsg => sek-update-html-in-selector => missing level or target dom element', params );
1970
+ }
1971
  }
1972
 
1973
  };//msgCollection
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,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,_);
1
+ var SekPreviewPrototype=SekPreviewPrototype||{};!function(a,s,i){s.extend(SekPreviewPrototype,{initialize:function(){var t=this;try{this.skope_id=i.findWhere(_wpCustomizeSettings.czr_new_skopes,{skope:"local"}).skope_id}catch(e){return void this.errare("Preview => error when storing the skope_id",e)}this.scheduleHighlightActiveLevel(),t.setupLoader(),s(function(){t.setupSortable(),t.setupResizable(),t.setupUiHoverVisibility(),t.scheduleUiClickReactions(),t.schedulePanelMsgReactions()}),s("body").on("sek-columns-refreshed sek-modules-refreshed",function(e,t){if(!i.isUndefined(t)&&!i.isUndefined(t.in_sektion)&&0<s('[data-sek-id="'+t.in_sektion+'"]').length){var a=s('[data-sek-id="'+t.in_sektion+'"]');a.toggleClass("sek-has-modules",0<a.find('[data-sek-level="module"]').length)}}),t.deactivateLinks(),s("body").on(["sek-modules-refreshed","sek-columns-refreshed","sek-section-added","sek-level-refreshed","sek-edit-module"].join(" "),function(e){t.deactivateLinks(e)});var e=function(){var e=[];s('[data-sek-level="location"]').each(function(){e.push(s(this).data("sek-id"))}),a.preview.send("sek-active-locations-in-preview",{active_locations:e})};a.preview.bind("sek-request-active-locations",e),e()},deactivateLinks:function(e){e=e||{};s("body").find('[data-sek-level="module"]').each(function(){s(this).find("a").each(function(){try{(function(){if("yes"!==s(this).data("sek-unlinked")){var e=i.isString(s(this)[0].protocol)&&-1!==s(this)[0].protocol.indexOf("javascript");!e&&a.isLinkPreviewable(s(this)[0])?(s(this).addClass("nimble-shift-clickable"),s(this).data("sek-unlinked","yes").attr("data-nimble-href",s(this).attr("href")).attr("href","javascript:void(0)"),s(this).hover(function(){s(this).attr("title",sekPreviewLocalized.i18n["Shift-click to visit the link"])},function(){s(this).removeAttr("title")}),s(this).on("click",function(e){e.shiftKey&&(e.preventDefault(),window.location.href=s(this).attr("data-nimble-href"))})):(s(this).addClass("nimble-unclickable"),s(this).data("sek-unlinked","yes").attr("data-nimble-href",s(this).attr("href")).attr("href","javascript:void(0)"),s(this).hover(function(){s(this).attr("title",e?sekPreviewLocalized.i18n["Link deactivated while previewing"]:sekPreviewLocalized.i18n["External links are disabled when customizing"])},function(){s(this).removeAttr("title")}),s(this).on("click",function(e){e.preventDefault()}))}}).call(s(this))}catch(e){a.errare("::deactivateLinks => error ",e)}})})},scheduleHighlightActiveLevel:function(){var n=this;this.activeLevelUI=new a.Value(""),this.activeUIChangedRecently=new a.Value(!1),this.activeLevelUI.bind(function(e,t){var a=s('[data-sek-id="'+e+'"]'),i=s('[data-sek-id="'+t+'"]');0<a.length&&a.addClass("sek-active-ui sek-highlight-active-ui"),0<i.length&&i.removeClass("sek-active-ui sek-highlight-active-ui"),n.activeUIChangedRecently(Date.now())}),i.each(["sek-refresh-stylesheet","sek-refresh-level"],function(e){a.preview.bind(e,function(e){n.activeUIChangedRecently(Date.now())})}),this.activeUIChangedRecently.bind(function(e){var t=s('[data-sek-id="'+n.activeLevelUI()+'"]');s(".sek-highlight-active-ui").length&&s(".sek-highlight-active-ui").removeClass("sek-highlight-active-ui"),0<t.length&&t.toggleClass("sek-highlight-active-ui",!1!==e),clearTimeout(s.data(this,"_ui_change_timer_")),s.data(this,"_ui_change_timer_",setTimeout(function(){n.activeUIChangedRecently(!1)},3e3))})}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(m,p,h){p.extend(SekPreviewPrototype,{setupSortable:function(){var a=this;return this.sortableDefaultParams={placeholder:"sortable-placeholder",over:function(e,t){},cursorAt:{top:0,left:0},tolerance:"pointer"},p('[data-sek-level="location"]').each(function(){a.makeSektionsSortableInLocation(p(this).data("sek-id"))}),p("body").on("sek-section-added sek-level-refreshed",'[data-sek-level="location"]',function(e,t){a.makeSektionsSortableInLocation(p(this).data("sek-id"))}),p('[data-sek-level="location"]').each(function(){p(this).find('[data-sek-level="section"]').each(function(){a.makeColumnsSortableInSektion(p(this).data("sek-id"))})}),p("body").on("sek-columns-refreshed sek-section-added",'[data-sek-level="section"]',function(e){a.makeColumnsSortableInSektion(p(this).data("sek-id"))}),p("body").on("sek-level-refreshed",'[data-sek-level="location"]',function(e,t){p(this).find('[data-sek-level="section"]').each(function(){a.makeColumnsSortableInSektion(p(this).data("sek-id"))})}),p('[data-sek-level="location"]').each(function(){p(this).find('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(p(this).data("sek-id"))})}),p("body").on("sek-modules-refreshed",'[data-sek-level="column"]',function(){a.makeModulesSortableInColumn(p(this).data("sek-id"))}),p("body").on("sek-columns-refreshed",'[data-sek-level="section"]',function(){p(this).find(".sek-sektion-inner").first().children('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(p(this).data("sek-id"))})}),p("body").on("sek-level-refreshed",'[data-sek-level="location"]',function(e,t){p(this).find('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(p(this).data("sek-id"))})}),p("body").on("sek-section-added",'[data-sek-level="location"]',function(e,t){p(this).find('[data-sek-level="column"]').each(function(){a.makeModulesSortableInColumn(p(this).data("sek-id"))})}),this},makeSektionsSortableInLocation:function(e){var a,i,t,n=this,s=[],o=[];p('[data-sek-id="'+e+'"]').each(function(){!0!==p(this).data("sek-is-global-location")&&(t=p.extend(!0,{},n.sortableDefaultParams),p(this).sortable(h.extend(t,{handle:".sek-move-section",connectWith:'[data-sek-is-global-location="false"]',placeholder:{element:function(e){return p('<div class="sortable-placeholder"><div class="sek-module-placeholder-content"><p>'+sekPreviewLocalized.i18n["Insert here"]+"</p></div></div>")[0]},update:function(e,t){}},start:function(e,t){p("body").addClass("sek-moving-section"),$sourceLocation=t.item.closest('[data-sek-level="location"]'),a=$sourceLocation.data("sek-id"),$sourceLocation.children('[data-sek-level="section"]').each(function(){s.push(p(this).data("sek-id"))})},stop:function(e,t){p("body").removeClass("sek-moving-section"),o=[],$targetLocation=t.item.closest('[data-sek-level="location"]'),i=$targetLocation.data("sek-id"),$targetLocation.children('[data-sek-level="section"]').each(function(){o.push(p(this).data("sek-id"))}),m.preview.send("sek-move",{id:t.item.data("sek-id"),level:"section",newOrder:o,from_location:a,to_location:i})},over:function(e,t){t.placeholder.addClass("sek-sortable-section-over")},out:function(e,t){t.placeholder.removeClass("sek-sortable-section-over")}})))})},makeColumnsSortableInSektion:function(e){var a,i,n,s,o=this,t=p.extend(!0,{},o.sortableDefaultParams),d=[],r=[],l=p('[data-sek-id="'+e+'"]').find(".sek-sektion-inner").first(),c=function(e){if(e=p.extend({forTarget:!0},e||{}),!h.isEmpty(p(this).data("_sortable_columns_css_classes_")))return p(this).data("_sortable_columns_css_classes_");var t,a=p(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]').length,i=Math.floor(100/a);t=!0===e.forTarget?12<a+1?12:a+1:a-1<1?1:a-1;var n={current:"sek-col-"+i,next:"sek-col-"+Math.floor(100/t)};return p(this).data("_sortable_columns_css_classes_",n),n};l.sortable(h.extend(t,{handle:".sek-move-column",connectWith:".sek-sektion-inner",over:function(e,t){var a,i=p(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]');!0!==p(this).data("sek-is-sender")?(a=c.call(p(this)),h.isEmpty(a)||i.each(function(){p(this).removeClass(a.current).addClass(a.next)})):(a=c.call(p(this),{forTarget:!1}),h.isEmpty(a)||i.each(function(){p(this).addClass(a.current).removeClass(a.next)}))},out:function(e,t){var a,i=p(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]');!0!==p(this).data("sek-is-sender")?(a=c.call(p(this)),h.isEmpty(a)||i.each(function(){p(this).addClass(a.current).removeClass(a.next)})):(a=c.call(p(this),{forTarget:!1}),h.isEmpty(a)||i.each(function(){p(this).removeClass(a.current).addClass(a.next)}))},remove:function(e,t){n=t.item.closest('[data-sek-level="location"]'),to_location=n.data("sek-id"),s=!0===n.data("sek-is-global-location");var a=to_location!=from_location;return i!==s||!0===i&&!0===s&&a?(m.preview.send("sek-notify",{message:sekPreviewLocalized.i18n["Moving elements between global and local sections is not allowed."]}),!1):($targetSektionCandidate=t.item.closest('[data-sek-level="section"]'),!(0<$targetSektionCandidate.length&&12<$targetSektionCandidate.find(".sek-sektion-inner").first().children('[data-sek-level="column"]').length)||(m.preview.send("sek-notify",{message:sekPreviewLocalized.i18n["You've reached the maximum number of columns allowed in this section."]}),!1))},start:function(e,t){a=t.item.closest('[data-sek-level="location"]'),from_location=a.data("sek-id"),i=!0===a.data("sek-is-global-location"),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(p(this).data("sek-id"))}),p(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(p(this).data("sek-id"))});var a,i=p(this).closest('[data-sek-level="section"]').find(".sek-sektion-inner").first().children('[data-sek-level="column"]');!0!==p(this).data("sek-is-sender")?(a=c.call(p(this)),h.isEmpty(a)||i.each(function(){p(this).removeClass(a.current).addClass(a.next)})):(a=c.call(p(this),{forTarget:!1}),h.isEmpty(a)||i.each(function(){p(this).addClass(a.current).removeClass(a.next)})),p('[data-sek-level="section"]').find(".sek-sektion-inner").each(function(){p(this).data("sek-is-sender",null).data("_sortable_columns_css_classes_",null)}),h.isEmpty(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"):m.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=p.extend(!0,{},u.sortableDefaultParams),p('[data-sek-id="'+e+'"]').find(".sek-column-inner").first().sortable(h.extend(t,{handle:".sek-move-module",connectWith:".sek-column-inner",over:function(e,t){p('[data-sek-level="location"]').find(".sek-sortable-overing").each(function(){p(this).removeClass("sek-sortable-overing")}),p(e.target).addClass("sek-sortable-overing")},remove:function(e,t){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)||(m.preview.send("sek-notify",{message:sekPreviewLocalized.i18n["Moving elements between global and local sections is not allowed."]}),!1)},start:function(e,t){o=t.item.closest('[data-sek-level="location"]'),from_location=o.data("sek-id"),d=!0===o.data("sek-is-global-location"),c=[],k=[],p("body").addClass("sek-dragging-element"),i=t.item.closest('[data-sek-level="column"]').data("sek-id"),a=t.item.closest('[data-sek-level="section"]').data("sek-id"),t.item.closest('[data-sek-level="column"]').find(".sek-column-inner").first().children('[data-sek-level="module"]').each(function(){c.push(p(this).data("sek-id"))}),h.isEmpty(c)&&u.errare("makeModulesSortableInColumn => startOrder should not be empty")},stop:function(e,t){s=t.item.closest('[data-sek-level="column"]'),n=s.data("sek-id"),s.find(".sek-column-inner").first().children("[data-sek-id]").each(function(){k.push(p(this).data("sek-id"))}),h.isEmpty(k)?u.errare("makeModulesSortableInColumn => newOrder should not be empty"):h.isEqual(k,c)&&n===i?u.errare("preview => makeModulesSortableInColumn => start and stop positions are identical"):(m.preview.send("sek-move",{id:t.item.data("sek-id"),level:"module",newOrder:k,from_column:i,to_column:n,from_sektion:a,to_sektion:t.item.closest('[data-sek-level="section"]').data("sek-id")}),p("body").removeClass("sek-dragging-element"))}}))}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(l,c,k){c.extend(SekPreviewPrototype,{setupResizable:function(){var t=this;return c(".sektion-wrapper").find('div[data-sek-level="section"]').each(function(){t.maybeMakeColumnResizableInSektion.call(this)}),c("body").on("sek-level-refreshed sek-modules-refreshed sek-columns-refreshed sek-section-added",'[data-sek-level="location"]',function(e){c(this).find('[data-sek-level="section"]').each(function(){t.maybeMakeColumnResizableInSektion.call(this)})}),this},maybeMakeColumnResizableInSektion:function(){var a,i,n,s,o,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,p,h){p.extend(SekPreviewPrototype,{printLevelUI:function(e){var t,a,i,n;if((h.isUndefined(e)||e.length<1)&&this.errare("sekPreview::printeLevelUI => invalid level element => ",e),"location"!=(a=e.data("sek-level"))&&!(0<(n=e).children(".sek-dyn-ui-wrapper").length)){var s=n[0].getBoundingClientRect(),o=n.data("sek-level");switch(n.toggleClass("sek-shrink-my-ui",s.width&&s.width<("section"===o?350:"column"===o?300:200)),i={id:n.data("sek-id"),level:o},a){case"section":var 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 m=this.getRegisteredModuleProperty(n.data("sek-module-type"),"name");i=h.extend(i,{module_name:"not_set"!=m?m:""})}!0===p(".sektion-wrapper").data("sek-resizing-columns")&&h.contains(["column","module"],a)||(t=this.parseTemplate("#sek-dyn-ui-tmpl-"+a),p.when(n.prepend(t(i))).done(function(){n.find(".sek-dyn-ui-wrapper").stop(!0,!0).fadeIn({duration:150,complete:function(){}})}))}},setupUiHoverVisibility:function(){var i,e,t,o=this,d=function(){(e=p(this)).children(".sek-dyn-ui-wrapper").length<1||sekPreviewLocalized.isPreviewUIDebugMode||(e.data("UIisFadingOut",!0),e.children(".sek-dyn-ui-wrapper").stop(!0,!0).fadeOut({duration:150,complete:function(){p(this).remove(),e.data("UIisFadingOut",!1)}}))},a=function(){var e=p(this);clearTimeout(e.data("_toggle_ui_menu_")),e.data("_toggle_ui_menu_",setTimeout(function(){n.call(e)},1e4))},n=function(e){var t=p(this),a=p(this).closest(".sek-dyn-ui-location-type"),i=t.closest(".sek-dyn-ui-wrapper").find(".sek-dyn-ui-inner");!0===e?(t.removeClass("sek-collapsed"),i.addClass("sek-is-expanded"),a.hide()):(t.addClass("sek-collapsed"),i.removeClass("sek-is-expanded"),a.show())};p("body").on("click",".sek-dyn-ui-location-inner",function(e){var t=p(this).find(".sek-dyn-ui-hamb-menu-wrapper");p(this).closest('[data-sek-level="section"]').find(".sek-dyn-ui-hamb-menu-wrapper").each(function(){n.call(p(this))}),n.call(t,!0),a.call(t)}),p("body").on("mouseenter mouseover mouseleave",".sek-dyn-ui-wrapper",h.throttle(function(e){var t=p(this).find(".sek-dyn-ui-hamb-menu-wrapper");h.isUndefined(t.data("_toggle_ui_menu_"))||t.hasClass("sek-collapsed")||0<t.length&&a.call(t)},50)),p("body").on("click",".sek-minimize-ui",function(e){p(this).closest(".sek-dyn-ui-location-type").slideToggle("fast")}),p("body").on("mouseenter",".sek-wp-content-wrapper",function(e){0<(t=p(this)).children(".sek-dyn-ui-wrapper").length&&!0!==t.data("UIisFadingOut")||(i=o.parseTemplate("#sek-dyn-ui-tmpl-wp-content"),p.when(t.prepend(i({}))).done(function(){t.find(".sek-dyn-ui-wrapper").stop(!0,!0).fadeIn({duration:150,complete:function(){}})}))}).on("mouseleave",".sek-wp-content-wrapper",function(e){p(this).data("UIisFadingOut",!0),t=p(this),p(this).children(".sek-dyn-ui-wrapper").stop(!0,!0).fadeOut({duration:150,complete:function(){p(this).remove(),t.data("UIisFadingOut",!1)}})});var r=function(n,e){var t,s;h.isUndefined(e)||e.length<1?(t=p("body").find("[data-sek-level]"),s="printOrScheduleRemoval"):(t=e,s="mayBeRemove"),t.each(function(){var e=p(this)[0].getBoundingClientRect(),t=n.x<=e.right&&e.left<=n.x,a=n.y>=e.top&&e.bottom>=n.y,i=p(this);switch(s){case"mayBeRemove":i.data("sek-ui-removal-scheduled",!1),t&&a||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)?(p("body").stop(!0,!0).find(".sek-add-content-button").each(function(){p(this).fadeOut({duration:200,complete:function(){p(this).remove()}})}),p("body").stop(!0,!0).find("[data-sek-level]").each(function(){p(this).children(".sek-dyn-ui-wrapper").find(".sek-is-expanded").length<1&&d.call(p(this))})):(p("body").find('div[data-sek-level="location"]').each(function(){var e;$sectionCollection=p(this).children('div[data-sek-level="section"]'),i=o.parseTemplate("#sek-tmpl-add-content-button"),t=p(this).data("sek-id"),a=!0===p(this).data("sek-is-global-location"),$sectionCollection.each(function(){0<p(this).find(".sek-add-content-button").length||(p.when(p(this).prepend(i({location:t,is_global_location:a}))).done(function(){e=p(this).find(".sek-add-content-button"),p(this).data("sek-id")&&e.attr("data-sek-before-section",p(this).data("sek-id")),e.fadeIn(300)}),$sectionCollection.length==p(this).index()+1&&p.when(p(this).append(i({is_last:!0,location:t,is_global_location:a}))).done(function(){e=p(this).find(".sek-add-content-button").last(),p(this).data("sek-id")&&e.attr("data-sek-after-section",p(this).data("sek-id")),e.fadeIn(300)}))})}),p(".sek-empty-location-placeholder").each(function(){0<p(this).find(".sek-add-content-button").length||(t=p(this).closest('div[data-sek-level="location"]').data("sek-id"),a=!0===p(this).closest('div[data-sek-level="location"]').data("sek-is-global-location"),p.when(p(this).append(i({location:t,is_global_location:a}))).done(function(){$btn_el=p(this).find(".sek-add-content-button"),$btn_el.attr("data-sek-is-first-section",!0),$btn_el.fadeIn(300)}))}),k=e,p("body").find(".sek-add-content-button").each(function(){var e=p(this)[0].getBoundingClientRect(),t=k.y,a=k.x,i=Math.abs(t-e.bottom),n=Math.abs(e.top-t),s=a-e.right,o=e.left-a,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;p(this).toggleClass("sek-mouse-is-close",(d||c)&&(r||l))}),r(e))});var s=function(){clearTimeout(p(window).data("_scroll_move_timer_")),o.mouseMovedRecently.set({})};return p(window).on("mousemove scroll",h.throttle(function(e){o.mouseMovedRecently({x:e.clientX,y:e.clientY}),clearTimeout(p(window).data("_scroll_move_timer_")),p(window).data("_scroll_move_timer_",setTimeout(function(){o.mouseMovedRecently.set({})},4e3))},50)),l.preview.bind("sek-drag-start",function(){s()}),p("body").on("sek-section-added",'[data-sek-level="location"]',function(e,t){s()}),this}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(u,m,p){m.extend(SekPreviewPrototype,{scheduleUiClickReactions:function(){var k=this;m("body").on("click",function(e){u.preview.send("sek-clean-target-drop-zone");var t,a=m(e.target),i=a.closest('[data-sek-level="location"]'),n=a.closest("[data-sek-level]"),s=a.closest("[data-sek-click-on]"),o=i.data("sek-id"),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":!p.isEmpty(a.data("sek-click-on"))||0<s.length?"UIIcon":"module"==n.data("sek-level")?"moduleWrapper":"column"==n.data("sek-level")&&!0===n.data("sek-no-modules")?"noModulesColumn":a.hasClass("sek-to-json")?"sekToJson":"column"==n.data("sek-level")?"columnOutsideModules":"section"==n.data("sek-level")?"sectionOutsideColumns":p.isEmpty(a.data("sek-add"))?a.hasClass("sek-wp-content-wrapper")||a.hasClass("sek-wp-content-dyn-ui")?"wpContent":a.hasClass("sek-edit-wp-content")?"editWpContent":"inactiveZone":"addSektion"){case"addContentButton":var l=!0===a.closest("[data-sek-is-first-section]").data("sek-is-first-section");u.preview.send("sek-add-section",{location:o,level:"section",before_section:a.closest("[data-sek-before-section]").data("sek-before-section"),after_section:a.closest("[data-sek-after-section]").data("sek-after-section"),is_first_section:l,send_to_preview:!l});break;case"UIIcon":if(n.length<1)throw new Error("ERROR => sek-front-preview => No valid level dom element found");if(t=a.closest("[data-sek-click-on]").data("sek-click-on"),p.isEmpty(t))throw new Error("Invalid action");if(p.isEmpty(d)||p.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");p.isEmpty(c)||window.open(c,"_blank");break;case"inactiveZone":u.preview.send("sek-click-on-inactive-zone")}})},_send_:function(e,t){var a=m.extend(!0,{},t),i="",n=e.closest('div[data-sek-level="module"]'),s="module"===t.level?n.data("sek-module-type"):"";"module"===t.level&&"czr_tiny_mce_editor_module"===s&&(i=0<n.find("div[data-sek-input-id]").length?n.find("div[data-sek-input-id]").data("sek-input-id"):""),u.preview.send("sek-"+t.action,p.extend({location:t.location,level:t.level,id:t.id,content_type:e.data("sek-content-type"),module_type:s,in_column:0<e.closest('div[data-sek-level="column"]').length?e.closest('div[data-sek-level="column"]').data("sek-id"):"",in_sektion:0<e.closest('div[data-sek-level="section"]').length?e.closest('div[data-sek-level="section"]').data("sek-id"):"",clicked_input_type:0<e.closest("div[data-sek-input-type]").length?e.closest("div[data-sek-input-type]").data("sek-input-type"):"",clicked_input_id:0<e.closest("div[data-sek-input-id]").length?e.closest("div[data-sek-input-id]").data("sek-input-id"):"",was_triggered:t.was_triggered,syncedTinyMceInputId:i},a))}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(e,s,o){s.extend(SekPreviewPrototype,{setupLoader:function(){var t=this;this._css_loader_html='<div class="sek-css-loader sek-mr-loader" style="display:none"><div></div><div></div><div></div></div>',s("body").on(["sek-modules-refreshed","sek-columns-refreshed","sek-section-added","sek-level-refreshed","sek-stylesheet-refreshed","sek-ajax-error"].join(" "),function(e){t.cleanLoader()})},mayBePrintLoader:function(e){var t=this,a=e.loader_located_in_level_id;if(!o.isEmpty(a)){var i=s('[data-sek-id="'+a+'"]');0<i.length&&s(".sek-level-clone ").length<1&&($levelClone=s("<div>",{class:"sek-level-clone"}),i.find("[data-sek-level]").each(function(){s(this).addClass("sek-refreshing")}),i.prepend($levelClone),$levelClone.css({width:i.outerWidth()+"px",height:i.outerHeight()+"px"}).append(t._css_loader_html).find(".sek-css-loader").fadeIn("fast"),clearTimeout(s.data(this,"_nimble_loader_active_timer_")),s.data(this,"_nimble_loader_active_timer_",setTimeout(function(){t.cleanLoader()},4e3)))}if(!0===e.fullPageLoader){var n=s("<div>",{id:"nimble-full-page-loader-wrapper",class:"white-loader"});s("body").append(n),n.fadeIn("fast").append(t._css_loader_html).find(".sek-css-loader").fadeIn("fast"),s('[data-sek-level="location"]').each(function(){s(this).addClass("sek-blur")}),clearTimeout(s.data(this,"_nimble_full_page_loader_active_timer_")),s.data(this,"_nimble_full_page_loader_active_timer_",setTimeout(function(){t.cleanLoader({cleanFullPageLoader:!0})},6e3))}},cleanLoader:function(e){s(".sek-level-clone").remove(),s("[data-sek-level]").each(function(){s(this).removeClass("sek-refreshing")}),!0===(e=e||{}).cleanFullPageLoader&&(s('[data-sek-level="location"]').each(function(){s(this).removeClass("sek-blur")}),s("#nimble-full-page-loader-wrapper").remove())}})}(wp.customize,jQuery,_);SekPreviewPrototype=SekPreviewPrototype||{};!function(s,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")},"sek-update-html-in-selector":function(e){var t=d('[data-sek-id="'+e.id+'"]'),a=d(e.selector,t);0<t.length&&0<a.length?a.html(e.html):o.errare("reactToPanelMsg => sek-update-html-in-selector => missing level or target dom element",e)}};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/czr-base-fmk/assets/js/_0_ccat_czr-base-fmk.js CHANGED
@@ -2468,43 +2468,6 @@ $.extend( CZRInputMths , {
2468
  return _model;
2469
  }
2470
  });//$.extend
2471
- })( wp.customize , jQuery, _ );var CZRInputMths = CZRInputMths || {};
2472
- ( function ( api, $, _ ) {
2473
- $.extend( CZRInputMths , {
2474
- setupTinyMceEditor : function() {
2475
- var input = this;
2476
-
2477
- //do we have an html template and a input container?
2478
- if ( ! input.container ) {
2479
- throw new Error( 'The input container is not set for WP text editor in module :' + input.module.id );
2480
- }
2481
-
2482
- // This event is triggered from sektions::setupTinyMceEditor()
2483
- // @params = {
2484
- // input_id : '',
2485
- // html_content : '',
2486
- // modified_editor_element : ''//<= can be the visual / text editor tab
2487
- // }
2488
- // Note : this event is trigger when the visual AND the text tab of the editor are modified.
2489
- // This means that the modified_editor_element can be different if it is the visual editor ( or the text html editor <textarea> element
2490
- // @see sektions::setupTinyMceEditor()
2491
- input.input_parent.control.bind( 'tinyMceEditorUpdated', function( params ) {
2492
- //console.log('in input => tinyMceEditorUpdated ', api.sekEditorSynchronizedInput(), input.input_parent.control.id );
2493
- //console.log('/// api.sekEditorSynchronizedInput', params );
2494
- if ( api.sekEditorSynchronizedInput().control_id != input.input_parent.control.id || api.sekEditorSynchronizedInput().input_id != input.id )
2495
- return;
2496
- input( wp.editor.removep( params.html_content || api.sekTinyMceEditor.getContent() ) );
2497
- if ( params.modified_editor_element && params.modified_editor_element.length > 0 ) {
2498
- params.modified_editor_element.focus();
2499
- } else {
2500
- api.sekTinyMceEditor.focus();
2501
- }
2502
-
2503
- });
2504
-
2505
- },//setupTextEditor
2506
-
2507
- });//$.extend
2508
  })( wp.customize , jQuery, _ );//extends api.Value
2509
  //options:
2510
  // id : item.id,
@@ -6090,7 +6053,6 @@ $.extend( CZRBaseModuleControlMths, {
6090
  wp_color_alpha : 'setupColorPickerAlpha',
6091
  wp_color : 'setupWPColorPicker',//not used for the moment
6092
  content_picker : 'setupContentPicker',
6093
- tiny_mce_editor : 'setupTinyMceEditor',
6094
  password : '',
6095
  range : 'setupSimpleRange',
6096
  range_slider : 'setupRangeSlider',
2468
  return _model;
2469
  }
2470
  });//$.extend
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2471
  })( wp.customize , jQuery, _ );//extends api.Value
2472
  //options:
2473
  // id : item.id,
6053
  wp_color_alpha : 'setupColorPickerAlpha',
6054
  wp_color : 'setupWPColorPicker',//not used for the moment
6055
  content_picker : 'setupContentPicker',
 
6056
  password : '',
6057
  range : 'setupSimpleRange',
6058
  range_slider : 'setupRangeSlider',
inc/czr-base-fmk/assets/js/_0_ccat_czr-base-fmk.min.js CHANGED
@@ -1 +1 @@
1
- "function"!=typeof jQuery.fn.iCheck&&function(v){function _(e,t,n){var i=e[0],r=/er/.test(n)?$:/bl/.test(n)?x:I,o=n==E?{checked:i[I],disabled:i[x],indeterminate:"true"==e.attr($)||"false"==e.attr(S)}:i[r];if(/^(ch|di|in)/.test(n)&&!o)y(e,r);else if(/^(un|en|de)/.test(n)&&o)b(e,r);else if(n==E)for(r in o)o[r]?y(e,r,!0):b(e,r,!0);else t&&"toggle"!=n||(t||e[O]("ifClicked"),o?i[R]!==z&&b(e,r):y(e,r))}function y(e,t,n){var i=e[0],r=e.parent(),o=t==I,s=t==$,a=t==x,l=s?S:o?g:"enabled",c=h(e,l+m(i[R])),d=h(e,t+m(i[R]));if(!0!==i[t]){if(!n&&t==I&&i[R]==z&&i.name){var u=e.closest("form"),p='input[name="'+i.name+'"]';(p=u.length?u.find(p):v(p)).each(function(){this!==i&&v(this).data(w)&&b(v(this),t)})}s?(i[t]=!0,i[I]&&b(e,I,"force")):(n||(i[t]=!0),o&&i[$]&&b(e,$,!1)),f(e,o,t,n)}i[x]&&h(e,D,!0)&&r.find("."+M).css(D,"default"),r[A](d||h(e,t)||""),a?r.attr("aria-disabled","true"):r.attr("aria-checked",s?"mixed":"true"),r[k](c||h(e,l)||"")}function b(e,t,n){var i=e[0],r=e.parent(),o=t==I,s=t==$,a=t==x,l=s?S:o?g:"enabled",c=h(e,l+m(i[R])),d=h(e,t+m(i[R]));!1!==i[t]&&((s||!n||"force"==n)&&(i[t]=!1),f(e,o,l,n)),!i[x]&&h(e,D,!0)&&r.find("."+M).css(D,"pointer"),r[k](d||h(e,t)||""),a?r.attr("aria-disabled","false"):r.attr("aria-checked","false"),r[A](c||h(e,l)||"")}function C(e,t){e.data(w)&&(e.parent().html(e.attr("style",e.data(w).s||"")),t&&e[O](t),e.off(".i").unwrap(),v(P+'[for="'+e[0].id+'"]').add(e.closest(P)).off(".i"))}function h(e,t,n){return e.data(w)?e.data(w).o[t+(n?"":"Class")]:void 0}function m(e){return e.charAt(0).toUpperCase()+e.slice(1)}function f(e,t,n,i){i||(t&&e[O]("ifToggled"),e[O]("ifChanged")[O]("if"+m(n)))}var w="iCheck",M=w+"-helper",z="radio",I="checked",g="un"+I,x="disabled",S="determinate",$="in"+S,E="update",R="type",A="addClass",k="removeClass",O="trigger",P="label",D="cursor",j=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);v.fn[w]=function(t,n){var i='input[type="checkbox"], input[type="'+z+'"]',r=v(),e=function(e){e.each(function(){var e=v(this);r=e.is(i)?r.add(e):r.add(e.find(i))})};if(/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(t))return t=t.toLowerCase(),e(this),r.each(function(){var e=v(this);"destroy"==t?C(e,"ifDestroyed"):_(e,!0,t),v.isFunction(n)&&n()});if("object"!=typeof t&&t)return this;var d=v.extend({checkedClass:I,disabledClass:x,indeterminateClass:$,labelHover:!0,aria:!1},t),o=d.handle,u=d.hoverClass||"hover",p=d.focusClass||"focus",h=d.activeClass||"active",m=!!d.labelHover,f=d.labelHoverClass||"hover",g=0|(""+d.increaseArea).replace("%","");return("checkbox"==o||o==z)&&(i='input[type="'+o+'"]'),g<-50&&(g=-50),e(this),r.each(function(){var i=v(this);C(i);var r=this,e=r.id,t={position:"absolute",top:n=-g+"%",left:n,display:"block",width:t=100+2*g+"%",height:t,margin:0,padding:0,background:"#fff",border:0,opacity:0},n=j?{position:"absolute",visibility:"hidden"}:g?t:{position:"absolute",opacity:0},o="checkbox"==r[R]?d.checkboxClass||"icheckbox":d.radioClass||"i"+z,s=v(P+'[for="'+e+'"]').add(i.closest(P)),a=!!d.aria,l=w+"-"+Math.random().toString(36).substr(2,6),c='<div class="'+o+'" '+(a?'role="'+r[R]+'" ':"");a&&s.each(function(){c+='aria-labelledby="',this.id?c+=this.id:(this.id=l,c+=l),c+='"'}),c=i.wrap(c+"/>")[O]("ifCreated").parent().append(d.insert),t=v('<ins class="'+M+'"/>').css(t).appendTo(c),i.data(w,{o:d,s:i.attr("style")}).css(n),d.inheritClass&&c[A](r.className||""),d.inheritID&&e&&c.attr("id",w+"-"+e),"static"==c.css("position")&&c.css("position","relative"),_(i,!0,E),s.length&&s.on("click.i mouseover.i mouseout.i touchbegin.i touchend.i",function(e){var t=e[R],n=v(this);if(!r[x]){if("click"==t){if(v(e.target).is("a"))return;_(i,!1,!0)}else m&&(/ut|nd/.test(t)?(c[k](u),n[k](f)):(c[A](u),n[A](f)));if(!j)return!1;e.stopPropagation()}}),i.on("click.i focus.i blur.i keyup.i keydown.i keypress.i",function(e){var t=e[R];return e=e.keyCode,"click"!=t&&("keydown"==t&&32==e?(r[R]==z&&r[I]||(r[I]?b(i,I):y(i,I)),!1):void("keyup"==t&&r[R]==z?!r[I]&&y(i,I):/us|ur/.test(t)&&c["blur"==t?k:A](p)))}),t.on("click mousedown mouseup mouseover mouseout touchbegin.i touchend.i",function(e){var t=e[R],n=/wn|up/.test(t)?h:u;if(!r[x]){if("click"==t?_(i,!1,!0):(/wn|er|in/.test(t)?c[A](n):c[k](n+" "+h),s.length&&m&&n==u&&s[/ut|nd/.test(t)?k:A](f)),!j)return!1;e.stopPropagation()}})})}}(window.jQuery||window.Zepto),"function"!=typeof jQuery.fn.selecter&&function(d,r){"use strict";function o(e,t){if(!e.hasClass("selecter-element")){(t=d.extend({},t,e.data("selecter-options"))).external&&(t.links=!0);var n=e.find("option, optgroup"),i=n.filter("option"),r=i.filter(":selected"),o=""!==t.label?-1:i.index(r),s=t.links?"nav":"div";t.tabIndex=e[0].tabIndex,e[0].tabIndex=-1,t.multiple=e.prop("multiple"),t.disabled=e.is(":disabled");var a="<"+s+' class="selecter '+t.customClass;C?a+=" mobile":t.cover&&(a+=" cover"),a+=t.multiple?" multiple":" closed",t.disabled&&(a+=" disabled"),a+='" tabindex="'+t.tabIndex+'">',t.multiple||(a+='<span class="selecter-selected'+(""!==t.label?" placeholder":"")+'">',a+=d("<span></span").text(y(""!==t.label?t.label:r.text(),t.trim)).html(),a+="</span>"),a+='<div class="selecter-options">',a+="</div>",a+="</"+s+">",e.addClass("selecter-element").after(a);var l=e.next(".selecter"),c=d.extend({$select:e,$allOptions:n,$options:i,$selecter:l,$selected:l.find(".selecter-selected"),$itemsWrapper:l.find(".selecter-options"),index:-1,guid:b++},t);u(c),_(o,c),void 0!==d.fn.scroller&&c.$itemsWrapper.scroller(),c.$selecter.on("touchstart.selecter click.selecter",".selecter-selected",c,p).on("click.selecter",".selecter-item",c,m).on("close.selecter",c,h).data("selecter",c),c.$select.on("change.selecter",c,f),C||(c.$selecter.on("focus.selecter",c,g).on("blur.selecter",c,v),c.$select.on("focus.selecter",c,function(e){e.data.$selecter.trigger("focus")}))}}function u(e){for(var t="",n=e.links?"a":"span",i=0,r=e.$allOptions.length;i<r;i++){var o=e.$allOptions.eq(i);if("OPTGROUP"===o[0].tagName)t+='<span class="selecter-group',o.is(":disabled")&&(t+=" disabled"),t+='">'+o.attr("label")+"</span>";else{var s=o.val();o.attr("value")||o.attr("value",s),t+="<"+n+' class="selecter-item',o.is(":selected")&&""===e.label&&(t+=" selected"),o.is(":disabled")&&(t+=" disabled"),t+='" ',t+=e.links?'href="'+s+'"':'data-value="'+s+'"',t+=">"+d("<span></span>").text(y(o.text(),e.trim)).html()+"</"+n+">",0}}e.$itemsWrapper.html(t),e.$items=e.$selecter.find(".selecter-item")}function p(e){e.preventDefault(),e.stopPropagation();var t=e.data;if(!t.$select.is(":disabled"))if(d(".selecter").not(t.$selecter).trigger("close.selecter",[t]),C){var n=t.$select[0];if(r.document.createEvent){var i=r.document.createEvent("MouseEvents");i.initMouseEvent("mousedown",!1,!0,r,0,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(i)}else n.fireEvent&&n.fireEvent("onmousedown")}else t.$selecter.hasClass("closed")?function(e){e.preventDefault(),e.stopPropagation();var t=e.data;if(!t.$selecter.hasClass("open")){var n=t.$selecter.offset(),i=c.outerHeight(),r=t.$itemsWrapper.outerHeight(!0),o=0<=t.index?t.$items.eq(t.index).position():{left:0,top:0};n.top+r>i&&t.$selecter.addClass("bottom"),t.$itemsWrapper.show(),t.$selecter.removeClass("closed").addClass("open"),c.on("click.selecter-"+t.guid,":not(.selecter-options)",t,s),void 0!==d.fn.scroller?t.$itemsWrapper.scroller("scroll",t.$itemsWrapper.find(".scroller-content").scrollTop()+o.top,0).scroller("reset"):t.$itemsWrapper.scrollTop(t.$itemsWrapper.scrollTop()+o.top)}}(e):t.$selecter.hasClass("open")&&h(e)}function s(e){e.preventDefault(),e.stopPropagation(),0===d(e.currentTarget).parents(".selecter").length&&h(e)}function h(e){e.preventDefault(),e.stopPropagation();var t=e.data;t.$selecter.hasClass("open")&&(t.$itemsWrapper.hide(),t.$selecter.removeClass("open bottom").addClass("closed"),c.off(".selecter-"+t.guid))}function m(e){e.preventDefault(),e.stopPropagation();var t=d(this),n=e.data;if(!n.$select.is(":disabled")){if(n.$itemsWrapper.is(":visible"))_(n.$items.index(t),n),a(n);n.multiple||h(e)}}function f(e,t){var n=d(this),i=e.data;t||i.multiple||(_(i.$options.index(i.$options.filter("[value='"+n.val().replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1")+"']")),i),a(i))}function g(e){e.preventDefault(),e.stopPropagation();var t=e.data;t.$select.is(":disabled")||t.multiple||(t.$selecter.addClass("focus").on("keydown.selecter"+t.guid,t,n),d(".selecter").not(t.$selecter).trigger("close.selecter",[t]))}function v(e){e.preventDefault(),e.stopPropagation();var t=e.data;t.$selecter.removeClass("focus").off("keydown.selecter"+t.guid+" keyup.selecter"+t.guid),d(".selecter").not(t.$selecter).trigger("close.selecter",[t])}function n(e){var t=e.data;if(13===e.keyCode)t.$selecter.hasClass("open")&&(h(e),_(t.index,t)),a(t);else if(!(9===e.keyCode||e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)){e.preventDefault(),e.stopPropagation();var n=t.$items.length-1,i=t.index<0?0:t.index;if(-1<d.inArray(e.keyCode,l?[38,40,37,39]:[38,40]))(i+=38===e.keyCode||l&&37===e.keyCode?-1:1)<0&&(i=0),n<i&&(i=n);else{var r,o=String.fromCharCode(e.keyCode).toUpperCase();for(r=t.index+1;r<=n;r++)if(t.$options.eq(r).text().charAt(0).toUpperCase()===o){i=r;break}if(i<0)for(r=0;r<=n;r++)if(t.$options.eq(r).text().charAt(0).toUpperCase()===o){i=r;break}}0<=i&&_(i,t)}}function _(e,t){var n=t.$items.eq(e),i=n.hasClass("selected");if(!n.hasClass("disabled")){if(-1===e&&""!==t.label)t.$selected.html(t.label);else if(i)t.multiple&&(t.$options.eq(e).prop("selected",null),n.removeClass("selected"));else{var r=n.html();n.data("value"),t.multiple?t.$options.eq(e).prop("selected",!0):(t.$selected.html(r).removeClass("placeholder"),t.$items.filter(".selected").removeClass("selected"),t.$select[0].selectedIndex=e),n.addClass("selected")}(!i||t.multiple)&&(t.index=e)}}function a(e){var t,n;e.links?(n=(t=e).$select.val(),t.external?r.open(n):r.location.href=n):(e.callback.call(e.$selecter,e.$select.val(),e.index),e.$select.trigger("change",[!0]))}function y(e,t){return 0===t?e:e.length>t?e.substring(0,t)+"...":e}var b=0,l=-1<r.navigator.userAgent.toLowerCase().indexOf("firefox"),C=/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(r.navigator.userAgent||r.navigator.vendor||r.opera),c=null,w={callback:d.noop,cover:!1,customClass:"",label:"",external:!1,links:!1,trim:0},t={defaults:function(e){return w=d.extend(w,e||{}),d(this)},disable:function(r){return d(this).each(function(e,t){var n=d(t).next(".selecter").data("selecter");if(n)if(void 0!==r){var i=n.$items.index(n.$items.filter("[data-value="+r+"]"));n.$items.eq(i).addClass("disabled"),n.$options.eq(i).prop("disabled",!0)}else n.$selecter.hasClass("open")&&n.$selecter.find(".selecter-selected").trigger("click.selecter"),n.$selecter.addClass("disabled"),n.$select.prop("disabled",!0)})},enable:function(r){return d(this).each(function(e,t){var n=d(t).next(".selecter").data("selecter");if(n)if(void 0!==r){var i=n.$items.index(n.$items.filter("[data-value="+r+"]"));n.$items.eq(i).removeClass("disabled"),n.$options.eq(i).prop("disabled",!1)}else n.$selecter.removeClass("disabled"),n.$select.prop("disabled",!1)})},destroy:function(){return d(this).each(function(e,t){var n=d(t).next(".selecter").data("selecter");n&&(n.$selecter.hasClass("open")&&n.$selecter.find(".selecter-selected").trigger("click.selecter"),void 0!==d.fn.scroller&&n.$selecter.find(".selecter-options").scroller("destroy"),n.$select[0].tabIndex=n.tabIndex,n.$select.off(".selecter").removeClass("selecter-element").show(),n.$selecter.off(".selecter").remove())})},refresh:function(){return d(this).each(function(e,t){var n=d(t).next(".selecter").data("selecter");if(n){var i=n.index;n.$allOptions=n.$select.find("option, optgroup"),n.$options=n.$allOptions.filter("option"),n.index=-1,i=n.$options.index(n.$options.filter(":selected")),u(n),_(i,n)}})}};d.fn.selecter=function(e){return t[e]?t[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?this:function(e){e=d.extend({},w,e||{}),null===c&&(c=d("body"));for(var t=d(this),n=0,i=t.length;n<i;n++)o(t.eq(n),e);return t}.apply(this,arguments)},d.selecter=function(e){"defaults"===e&&t.defaults.apply(this,Array.prototype.slice.call(arguments,1))}}(jQuery,window),"function"!=typeof jQuery.fn.stepper&&function(c){"use strict";function r(e,t){if(!e.hasClass("stepper-input")){t=c.extend({},t,e.data("stepper-options"));var n=parseFloat(e.attr("min")),i=parseFloat(e.attr("max")),r=parseFloat(e.attr("step"))||1;e.addClass("stepper-input").wrap('<div class="stepper '+t.customClass+'" />').after('<span class="stepper-arrow up">'+t.labels.up+'</span><span class="stepper-arrow down">'+t.labels.down+"</span>");var o=e.parent(".stepper"),s=c.extend({$stepper:o,$input:e,$arrow:o.find(".stepper-arrow"),min:void 0!==typeof n&&!isNaN(n)&&n,max:void 0!==typeof i&&!isNaN(i)&&i,step:void 0===typeof r||isNaN(r)?1:r,timer:null},t);s.digits=(a=s.step,-1<(l=String(a)).indexOf(".")?l.length-l.indexOf(".")-1:0),e.is(":disabled")&&o.addClass("disabled"),o.on("touchstart.stepper mousedown.stepper",".stepper-arrow",s,d).data("stepper",s)}var a,l}function d(e){e.preventDefault(),e.stopPropagation(),s(e);var t,n,i,r=e.data;if(!r.$input.is(":disabled")&&!r.$stepper.hasClass("disabled")){var o=c(e.target).hasClass("up")?r.step:-r.step;r.timer=(t=r.timer,n=125,i=function(){a(r,o)},l(t),setInterval(i,n)),a(r,o),c("body").on("touchend.stepper mouseup.stepper",r,s)}}function s(e){e.preventDefault(),e.stopPropagation(),l(e.data.timer),c("body").off(".stepper")}function a(e,t){var n=parseFloat(e.$input.val()),i=t;void 0===typeof n||isNaN(n)?i=!1!==e.min?e.min:0:!1!==e.min&&n<e.min?i=e.min:i+=n;var r,o,s,a=(i-e.min)%e.step;0!==a&&(i-=a),!1!==e.min&&i<e.min&&(i=e.min),!1!==e.max&&i>e.max&&(i-=e.step),i!==n&&(r=i,o=e.digits,s=Math.pow(10,o),i=Math.round(r*s)/s,e.$input.val(i).trigger("change"))}function l(e){e&&(clearInterval(e),e=null)}var o={customClass:"",labels:{up:"Up",down:"Down"}},t={defaults:function(e){return o=c.extend(o,e||{}),c(this)},destroy:function(){return c(this).each(function(){var e=c(this).data("stepper");e&&(e.$stepper.off(".stepper").find(".stepper-arrow").remove(),e.$input.unwrap().removeClass("stepper-input"))})},disable:function(){return c(this).each(function(){var e=c(this).data("stepper");e&&(e.$input.attr("disabled","disabled"),e.$stepper.addClass("disabled"))})},enable:function(){return c(this).each(function(){var e=c(this).data("stepper");e&&(e.$input.attr("disabled",null),e.$stepper.removeClass("disabled"))})}};c.fn.stepper=function(e){return t[e]?t[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?this:function(e){e=c.extend({},o,e||{});for(var t=c(this),n=0,i=t.length;n<i;n++)r(t.eq(n),e);return t}.apply(this,arguments)},c.stepper=function(e){"defaults"===e&&t.defaults.apply(this,Array.prototype.slice.call(arguments,1))}}(jQuery),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports?require("jquery"):jQuery)}(function(n){var e=function(){if(n&&n.fn&&n.fn.czrSelect2&&n.fn.czrSelect2.amd)var e=n.fn.czrSelect2.amd;var t,r,c;return e&&e.requirejs||(e?r=e:e={},function(p){function h(e,t){return n.call(e,t)}function s(e,t){var n,i,r,o,s,a,l,c,d,u,p,h=t&&t.split("/"),m=C.map,f=m&&m["*"]||{};if(e&&"."===e.charAt(0))if(t){for(s=(e=e.split("/")).length-1,C.nodeIdCompat&&M.test(e[s])&&(e[s]=e[s].replace(M,"")),e=h.slice(0,h.length-1).concat(e),d=0;d<e.length;d+=1)if("."===(p=e[d]))e.splice(d,1),d-=1;else if(".."===p){if(1===d&&(".."===e[2]||".."===e[0]))break;0<d&&(e.splice(d-1,2),d-=2)}e=e.join("/")}else 0===e.indexOf("./")&&(e=e.substring(2));if((h||f)&&m){for(d=(n=e.split("/")).length;0<d;d-=1){if(i=n.slice(0,d).join("/"),h)for(u=h.length;0<u;u-=1)if((r=m[h.slice(0,u).join("/")])&&(r=r[i])){o=r,a=d;break}if(o)break;!l&&f&&f[i]&&(l=f[i],c=d)}!o&&l&&(o=l,a=c),o&&(n.splice(0,a,o),e=n.join("/"))}return e}function m(t,n){return function(){var e=i.call(arguments,0);return"string"!=typeof e[0]&&1===e.length&&e.push(null),l.apply(p,e.concat([t,n]))}}function f(t){return function(e){y[t]=e}}function g(e){if(h(b,e)){var t=b[e];delete b[e],w[e]=!0,o.apply(p,t)}if(!h(y,e)&&!h(w,e))throw new Error("No "+e);return y[e]}function a(e){var t,n=e?e.indexOf("!"):-1;return-1<n&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}var o,l,v,_,y={},b={},C={},w={},n=Object.prototype.hasOwnProperty,i=[].slice,M=/\.js$/;v=function(e,t){var n,i,r=a(e),o=r[0];return e=r[1],o&&(n=g(o=s(o,t))),o?e=n&&n.normalize?n.normalize(e,(i=t,function(e){return s(e,i)})):s(e,t):(o=(r=a(e=s(e,t)))[0],e=r[1],o&&(n=g(o))),{f:o?o+"!"+e:e,n:e,pr:o,p:n}},_={require:function(e){return m(e)},exports:function(e){var t=y[e];return void 0!==t?t:y[e]={}},module:function(e){return{id:e,uri:"",exports:y[e],config:(t=e,function(){return C&&C.config&&C.config[t]||{}})};var t}},o=function(e,t,n,i){var r,o,s,a,l,c,d=[],u=typeof n;if(i=i||e,"undefined"===u||"function"===u){for(t=!t.length&&n.length?["require","exports","module"]:t,l=0;l<t.length;l+=1)if("require"===(o=(a=v(t[l],i)).f))d[l]=_.require(e);else if("exports"===o)d[l]=_.exports(e),c=!0;else if("module"===o)r=d[l]=_.module(e);else if(h(y,o)||h(b,o)||h(w,o))d[l]=g(o);else{if(!a.p)throw new Error(e+" missing "+o);a.p.load(a.n,m(i,!0),f(o),{}),d[l]=y[o]}s=n?n.apply(y[e],d):void 0,e&&(r&&r.exports!==p&&r.exports!==y[e]?y[e]=r.exports:s===p&&c||(y[e]=s))}else e&&(y[e]=n)},t=r=l=function(e,t,n,i,r){if("string"==typeof e)return _[e]?_[e](t):g(v(e,t).f);if(!e.splice){if((C=e).deps&&l(C.deps,C.callback),!t)return;t.splice?(e=t,t=n,n=null):e=p}return t=t||function(){},"function"==typeof n&&(n=i,i=r),i?o(p,e,t,n):setTimeout(function(){o(p,e,t,n)},4),l},l.config=function(e){return l(e)},t._defined=y,(c=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),h(y,e)||h(b,e)||(b[e]=[e,t,n])}).amd={jQuery:!0}}(),e.requirejs=t,e.require=r,e.define=c),e.define("almond",function(){}),e.define("jquery",[],function(){var e=n||$;return null==e&&console&&console.error&&console.error("CzrSelect2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before CzrSelect2 on your web page."),e}),e.define("czrSelect2/utils",["jquery"],function(o){function d(e){var t=e.prototype,n=[];for(var i in t){"function"==typeof t[i]&&"constructor"!==i&&n.push(i)}return n}var e={Extend:function(e,t){function n(){this.constructor=e}var i={}.hasOwnProperty;for(var r in t)i.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},Decorate:function(i,r){function o(){var e=Array.prototype.unshift,t=r.prototype.constructor.length,n=i.prototype.constructor;0<t&&(e.call(arguments,i.prototype.constructor),n=r.prototype.constructor),n.apply(this,arguments)}var e=d(r),t=d(i);r.displayName=i.displayName,o.prototype=new function(){this.constructor=o};for(var n=0;n<t.length;n++){var s=t[n];o.prototype[s]=i.prototype[s]}for(var a=function(e){var t=function(){};e in o.prototype&&(t=o.prototype[e]);var n=r.prototype[e];return function(){return Array.prototype.unshift.call(arguments,t),n.apply(this,arguments)}},l=0;l<e.length;l++){var c=e[l];o.prototype[c]=a(c)}return o}},t=function(){this.listeners={}};return t.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},t.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),(n[0]._type=e)in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},t.prototype.invoke=function(e,t){for(var n=0,i=e.length;n<i;n++)e[n].apply(this,t)},e.Observable=t,e.generateChars=function(e){for(var t="",n=0;n<e;n++){t+=Math.floor(36*Math.random()).toString(36)}return t},e.bind=function(e,t){return function(){e.apply(t,arguments)}},e._convertData=function(e){for(var t in e){var n=t.split("-"),i=e;if(1!==n.length){for(var r=0;r<n.length;r++){var o=n[r];(o=o.substring(0,1).toLowerCase()+o.substring(1))in i||(i[o]={}),r==n.length-1&&(i[o]=e[t]),i=i[o]}delete e[t]}}return e},e.hasScroll=function(e,t){var n=o(t),i=t.style.overflowX,r=t.style.overflowY;return(i!==r||"hidden"!==r&&"visible"!==r)&&("scroll"===i||"scroll"===r||(n.innerHeight()<t.scrollHeight||n.innerWidth()<t.scrollWidth))},e.escapeMarkup=function(e){var t={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},e.appendMany=function(e,t){if("1.7"===o.fn.jquery.substr(0,3)){var n=o();o.map(t,function(e){n=n.add(e)}),t=n}e.append(t)},e}),e.define("czrSelect2/results",["jquery","./utils"],function(p,e){function i(e,t,n){this.$element=e,this.data=n,this.options=t,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=p('<ul class="czrSelect2-results__options" role="tree"></ul>');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},i.prototype.clear=function(){this.$results.empty()},i.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=p('<li role="treeitem" aria-live="assertive" class="czrSelect2-results__option"></li>'),i=this.options.get("translations").get(e.message);n.append(t(i(e.args))),n[0].className+=" czrSelect2-results__message",this.$results.append(n)},i.prototype.hideMessages=function(){this.$results.find(".czrSelect2-results__message").remove()},i.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var i=e.results[n],r=this.option(i);t.push(r)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},i.prototype.position=function(e,t){t.find(".czrSelect2-results").append(e)},i.prototype.sort=function(e){return this.options.get("sorter")(e)},i.prototype.highlightFirstItem=function(){var e=this.$results.find(".czrSelect2-results__option[aria-selected]"),t=e.filter("[aria-selected=true]");0<t.length?t.first().trigger("mouseenter"):e.first().trigger("mouseenter"),this.ensureHighlightVisible()},i.prototype.setClasses=function(){var t=this;this.data.current(function(e){var i=p.map(e,function(e){return e.id.toString()});t.$results.find(".czrSelect2-results__option[aria-selected]").each(function(){var e=p(this),t=p.data(this,"data"),n=""+t.id;null!=t.element&&t.element.selected||null==t.element&&-1<p.inArray(n,i)?e.attr("aria-selected","true"):e.attr("aria-selected","false")})})},i.prototype.showLoading=function(e){this.hideLoading();var t={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},n=this.option(t);n.className+=" loading-results",this.$results.prepend(n)},i.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},i.prototype.option=function(e){var t=document.createElement("li");t.className="czrSelect2-results__option";var n={role:"treeitem","aria-selected":"false"};for(var i in e.disabled&&(delete n["aria-selected"],n["aria-disabled"]="true"),null==e.id&&delete n["aria-selected"],null!=e._resultId&&(t.id=e._resultId),e.title&&(t.title=e.title),e.children&&(n.role="group",n["aria-label"]=e.text,delete n["aria-selected"]),n){var r=n[i];t.setAttribute(i,r)}if(e.children){var o=p(t),s=document.createElement("strong");s.className="czrSelect2-results__group",p(s),this.template(e,s);for(var a=[],l=0;l<e.children.length;l++){var c=e.children[l],d=this.option(c);a.push(d)}var u=p("<ul></ul>",{class:"czrSelect2-results__options czrSelect2-results__options--nested"});u.append(a),o.append(s),o.append(u)}else this.template(e,t);return p.data(t,"data",e),t},i.prototype.bind=function(t,e){var l=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){l.clear(),l.append(e.data),t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("results:append",function(e){l.append(e.data),t.isOpen()&&l.setClasses()}),t.on("query",function(e){l.hideMessages(),l.showLoading(e)}),t.on("select",function(){t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("open",function(){l.$results.attr("aria-expanded","true"),l.$results.attr("aria-hidden","false"),l.setClasses(),l.ensureHighlightVisible()}),t.on("close",function(){l.$results.attr("aria-expanded","false"),l.$results.attr("aria-hidden","true"),l.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=l.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=l.getHighlightedResults();if(0!==e.length){var t=e.data("data");"true"==e.attr("aria-selected")?l.trigger("close",{}):l.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e);if(0!==n){var i=n-1;0===e.length&&(i=0);var r=t.eq(i);r.trigger("mouseenter");var o=l.$results.offset().top,s=r.offset().top,a=l.$results.scrollTop()+(s-o);0===i?l.$results.scrollTop(0):s-o<0&&l.$results.scrollTop(a)}}),t.on("results:next",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var i=t.eq(n);i.trigger("mouseenter");var r=l.$results.offset().top+l.$results.outerHeight(!1),o=i.offset().top+i.outerHeight(!1),s=l.$results.scrollTop()+o-r;0===n?l.$results.scrollTop(0):r<o&&l.$results.scrollTop(s)}}),t.on("results:focus",function(e){e.element.addClass("czrSelect2-results__option--highlighted")}),t.on("results:message",function(e){l.displayMessage(e)}),p.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=l.$results.scrollTop(),n=l.$results.get(0).scrollHeight-t+e.deltaY,i=0<e.deltaY&&t-e.deltaY<=0,r=e.deltaY<0&&n<=l.$results.height();i?(l.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):r&&(l.$results.scrollTop(l.$results.get(0).scrollHeight-l.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".czrSelect2-results__option[aria-selected]",function(e){var t=p(this),n=t.data("data");return"true"===t.attr("aria-selected")?void(l.options.get("multiple")?l.trigger("unselect",{originalEvent:e,data:n}):l.trigger("close",{})):void l.trigger("select",{originalEvent:e,data:n})}),this.$results.on("mouseenter",".czrSelect2-results__option[aria-selected]",function(e){var t=p(this).data("data");l.getHighlightedResults().removeClass("czrSelect2-results__option--highlighted"),l.trigger("results:focus",{data:t,element:p(this)})})},i.prototype.getHighlightedResults=function(){return this.$results.find(".czrSelect2-results__option--highlighted")},i.prototype.destroy=function(){this.$results.remove()},i.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]").index(e),n=this.$results.offset().top,i=e.offset().top,r=this.$results.scrollTop()+(i-n),o=i-n;r-=2*e.outerHeight(!1),t<=2?this.$results.scrollTop(0):(o>this.$results.outerHeight()||o<0)&&this.$results.scrollTop(r)}},i.prototype.template=function(e,t){var n=this.options.get("templateResult"),i=this.options.get("escapeMarkup"),r=n(e,t);null==r?t.style.display="none":"string"==typeof r?t.innerHTML=i(r):p(t).append(r)},i}),e.define("czrSelect2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),e.define("czrSelect2/selection/base",["jquery","../utils","../keys"],function(n,e,r){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=n('<span class="czrSelect2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),this.$selection=e},i.prototype.bind=function(e,t){var n=this,i=(e.id,e.id+"-results");this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===r.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",i),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.focus(),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex)}),e.on("disable",function(){n.$selection.attr("tabindex","-1")})},i.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},i.prototype._attachCloseHandler=function(e){n(document.body).on("mousedown.czrSelect2."+e.id,function(e){var t=n(e.target).closest(".czrSelect2");n(".czrSelect2.czrSelect2-container--open").each(function(){var e=n(this);this!=t[0]&&e.data("element").czrSelect2("close")})})},i.prototype._detachCloseHandler=function(e){n(document.body).off("mousedown.czrSelect2."+e.id)},i.prototype.position=function(e,t){t.find(".selection").append(e)},i.prototype.destroy=function(){this._detachCloseHandler(this.container)},i.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},i}),e.define("czrSelect2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,i){function r(){r.__super__.constructor.apply(this,arguments)}return n.Extend(r,t),r.prototype.render=function(){var e=r.__super__.render.call(this);return e.addClass("czrSelect2-selection--single"),e.html('<span class="czrSelect2-selection__rendered"></span><span class="czrSelect2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},r.prototype.bind=function(t,e){var n=this;r.__super__.bind.apply(this,arguments);var i=t.id+"-container";this.$selection.find(".czrSelect2-selection__rendered").attr("id",i),this.$selection.attr("aria-labelledby",i),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),t.on("focus",function(e){t.isOpen()||n.$selection.focus()}),t.on("selection:update",function(e){n.update(e.data)})},r.prototype.clear=function(){this.$selection.find(".czrSelect2-selection__rendered").empty()},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return e("<span></span>")},r.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".czrSelect2-selection__rendered"),i=this.display(t,n);n.empty().append(i),n.prop("title",t.title||t.text)}else this.clear()},r}),e.define("czrSelect2/selection/multiple",["jquery","./base","../utils"],function(i,e,a){function r(e,t){r.__super__.constructor.apply(this,arguments)}return a.Extend(r,e),r.prototype.render=function(){var e=r.__super__.render.call(this);return e.addClass("czrSelect2-selection--multiple"),e.html('<ul class="czrSelect2-selection__rendered"></ul>'),e},r.prototype.bind=function(e,t){var n=this;r.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){n.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".czrSelect2-selection__choice__remove",function(e){if(!n.options.get("disabled")){var t=i(this).parent().data("data");n.trigger("unselect",{originalEvent:e,data:t})}})},r.prototype.clear=function(){this.$selection.find(".czrSelect2-selection__rendered").empty()},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return i('<li class="czrSelect2-selection__choice"><span class="czrSelect2-selection__choice__remove" role="presentation">&times;</span></li>')},r.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=0;n<e.length;n++){var i=e[n],r=this.selectionContainer(),o=this.display(i,r);r.append(o),r.prop("title",i.title||i.text),r.data("data",i),t.push(r)}var s=this.$selection.find(".czrSelect2-selection__rendered");a.appendMany(s,t)}},r}),e.define("czrSelect2/selection/placeholder",["../utils"],function(e){function t(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return t.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},t.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();return n.html(this.display(t)),n.addClass("czrSelect2-selection__placeholder").removeClass("czrSelect2-selection__choice"),n},t.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(1<t.length||n)return e.call(this,t);this.clear();var i=this.createPlaceholder(this.placeholder);this.$selection.find(".czrSelect2-selection__rendered").append(i)},t}),e.define("czrSelect2/selection/allowClear",["jquery","../keys"],function(i,r){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("CzrSelect2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".czrSelect2-selection__clear",function(e){i._handleClear(e)}),t.on("keypress",function(e){i._handleKeyboardClear(e,t)})},e.prototype._handleClear=function(e,t){if(!this.options.get("disabled")){var n=this.$selection.find(".czrSelect2-selection__clear");if(0!==n.length){t.stopPropagation();for(var i=n.data("data"),r=0;r<i.length;r++){var o={data:i[r]};if(this.trigger("unselect",o),o.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},e.prototype._handleKeyboardClear=function(e,t,n){n.isOpen()||(t.which==r.DELETE||t.which==r.BACKSPACE)&&this._handleClear(t)},e.prototype.update=function(e,t){if(e.call(this,t),!(0<this.$selection.find(".czrSelect2-selection__placeholder").length||0===t.length)){var n=i('<span class="czrSelect2-selection__clear">&times;</span>');n.data("data",t),this.$selection.find(".czrSelect2-selection__rendered").prepend(n)}},e}),e.define("czrSelect2/selection/search",["jquery","../utils","../keys"],function(i,e,s){function t(e,t,n){e.call(this,t,n)}return t.prototype.render=function(e){var t=i('<li class="czrSelect2-search czrSelect2-search--inline"><input class="czrSelect2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=t,this.$search=t.find("input");var n=e.call(this);return this._transferTabIndex(),n},t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("open",function(){i.$search.trigger("focus")}),t.on("close",function(){i.$search.val(""),i.$search.removeAttr("aria-activedescendant"),i.$search.trigger("focus")}),t.on("enable",function(){i.$search.prop("disabled",!1),i._transferTabIndex()}),t.on("disable",function(){i.$search.prop("disabled",!0)}),t.on("focus",function(e){i.$search.trigger("focus")}),t.on("results:focus",function(e){i.$search.attr("aria-activedescendant",e.id)}),this.$selection.on("focusin",".czrSelect2-search--inline",function(e){i.trigger("focus",e)}),this.$selection.on("focusout",".czrSelect2-search--inline",function(e){i._handleBlur(e)}),this.$selection.on("keydown",".czrSelect2-search--inline",function(e){if(e.stopPropagation(),i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented(),e.which===s.BACKSPACE&&""===i.$search.val()){var t=i.$searchContainer.prev(".czrSelect2-selection__choice");if(0<t.length){var n=t.data("data");i.searchRemoveChoice(n),e.preventDefault()}}});var r=document.documentMode,o=r&&r<=11;this.$selection.on("input.searchcheck",".czrSelect2-search--inline",function(e){return o?void i.$selection.off("input.search input.searchcheck"):void i.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".czrSelect2-search--inline",function(e){if(o&&"input"===e.type)i.$selection.off("input.search input.searchcheck");else{var t=e.which;t!=s.SHIFT&&t!=s.CTRL&&t!=s.ALT&&t!=s.TAB&&i.handleSearch(e)}})},t.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},t.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},t.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.$selection.find(".czrSelect2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.focus()},t.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},t.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},t.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";""!==this.$search.attr("placeholder")?e=this.$selection.find(".czrSelect2-selection__rendered").innerWidth():e=.75*(this.$search.val().length+1)+"em";this.$search.css("width",e)},t}),e.define("czrSelect2/selection/eventRelay",["jquery"],function(s){function e(){}return e.prototype.bind=function(e,t,n){var i=this,r=["open","opening","close","closing","select","selecting","unselect","unselecting"],o=["opening","closing","selecting","unselecting"];e.call(this,t,n),t.on("*",function(e,t){if(-1!==s.inArray(e,r)){t=t||{};var n=s.Event("czrSelect2:"+e,{params:t});i.$element.trigger(n),-1!==s.inArray(e,o)&&(t.prevented=n.isDefaultPrevented())}})},e}),e.define("czrSelect2/translation",["jquery","require"],function(t,n){function i(e){this.dict=e||{}}return i.prototype.all=function(){return this.dict},i.prototype.get=function(e){return this.dict[e]},i.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},i._cache={},i.loadPath=function(e){if(!(e in i._cache)){var t=n(e);i._cache[e]=t}return new i(i._cache[e])},i}),e.define("czrSelect2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),e.define("czrSelect2/data/base",["../utils"],function(i){function n(e,t){n.__super__.constructor.call(this)}return i.Extend(n,i.Observable),n.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},n.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},n.prototype.bind=function(e,t){},n.prototype.destroy=function(){},n.prototype.generateResultId=function(e,t){var n=e.id+"-result-";return(n+=i.generateChars(4))+(null!=t.id?"-"+t.id.toString():"-"+i.generateChars(4))},n}),e.define("czrSelect2/data/select",["./base","../utils","jquery"],function(e,t,a){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,e),n.prototype.current=function(e){var n=[],i=this;this.$element.find(":selected").each(function(){var e=a(this),t=i.item(e);n.push(t)}),e(n)},n.prototype.select=function(r){var o=this;if(r.selected=!0,a(r.element).is("option"))return r.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(e){var t=[];(r=[r]).push.apply(r,e);for(var n=0;n<r.length;n++){var i=r[n].id;-1===a.inArray(i,t)&&t.push(i)}o.$element.val(t),o.$element.trigger("change")});else{var e=r.id;this.$element.val(e),this.$element.trigger("change")}},n.prototype.unselect=function(r){var o=this;if(this.$element.prop("multiple"))return r.selected=!1,a(r.element).is("option")?(r.element.selected=!1,void this.$element.trigger("change")):void this.current(function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n].id;i!==r.id&&-1===a.inArray(i,t)&&t.push(i)}o.$element.val(t),o.$element.trigger("change")})},n.prototype.bind=function(e,t){var n=this;(this.container=e).on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},n.prototype.destroy=function(){this.$element.find("*").each(function(){a.removeData(this,"data")})},n.prototype.query=function(i,e){var r=[],o=this;this.$element.children().each(function(){var e=a(this);if(e.is("option")||e.is("optgroup")){var t=o.item(e),n=o.matches(i,t);null!==n&&r.push(n)}}),e({results:r})},n.prototype.addOptions=function(e){t.appendMany(this.$element,e)},n.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup")).label=e.text:void 0!==(t=document.createElement("option")).textContent?t.textContent=e.text:t.innerText=e.text,e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);var n=a(t),i=this._normalizeItem(e);return i.element=t,a.data(t,"data",i),n},n.prototype.item=function(e){var t={};if(null!=(t=a.data(e[0],"data")))return t;if(e.is("option"))t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if(e.is("optgroup")){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var n=e.children("option"),i=[],r=0;r<n.length;r++){var o=a(n[r]),s=this.item(o);i.push(s)}t.children=i}return(t=this._normalizeItem(t)).element=e[0],a.data(e[0],"data",t),t},n.prototype._normalizeItem=function(e){a.isPlainObject(e)||(e={id:e,text:e});return null!=(e=a.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),a.extend({},{selected:!1,disabled:!1},e)},n.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},n}),e.define("czrSelect2/data/array",["./select","../utils","jquery"],function(e,m,f){function i(e,t){var n=t.get("data")||[];i.__super__.constructor.call(this,e,t),this.addOptions(this.convertToOptions(n))}return m.Extend(i,e),i.prototype.select=function(n){var e=this.$element.find("option").filter(function(e,t){return t.value==n.id.toString()});0===e.length&&(e=this.option(n),this.addOptions(e)),i.__super__.select.call(this,n)},i.prototype.convertToOptions=function(e){function t(e){return function(){return f(this).val()==e.id}}for(var n=this,i=this.$element.find("option"),r=i.map(function(){return n.item(f(this)).id}).get(),o=[],s=0;s<e.length;s++){var a=this._normalizeItem(e[s]);if(0<=f.inArray(a.id,r)){var l=i.filter(t(a)),c=this.item(l),d=f.extend(!0,{},a,c),u=this.option(d);l.replaceWith(u)}else{var p=this.option(a);if(a.children){var h=this.convertToOptions(a.children);m.appendMany(p,h)}o.push(p)}}return o},i}),e.define("czrSelect2/data/ajax",["./array","../utils","jquery"],function(e,t,o){function n(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),n.__super__.constructor.call(this,e,t)}return t.Extend(n,e),n.prototype._applyDefaults=function(e){var t={data:function(e){return o.extend({},e,{q:e.term})},transport:function(e,t,n){var i=o.ajax(e);return i.then(t),i.fail(n),i}};return o.extend({},t,e,!0)},n.prototype.processResults=function(e){return e},n.prototype.query=function(n,i){function e(){var e=t.transport(t,function(e){var t=r.processResults(e,n);r.options.get("debug")&&window.console&&console.error&&(t&&t.results&&o.isArray(t.results)||console.error("CzrSelect2: The AJAX results did not return an array in the `results` key of the response.")),i(t)},function(){e.status&&"0"===e.status||r.trigger("results:message",{message:"errorLoading"})});r._request=e}var r=this;null!=this._request&&(o.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var t=o.extend({type:"GET"},this.ajaxOptions);"function"==typeof t.url&&(t.url=t.url.call(this.$element,n)),"function"==typeof t.data&&(t.data=t.data.call(this.$element,n)),this.ajaxOptions.delay&&null!=n.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(e,this.ajaxOptions.delay)):e()},n}),e.define("czrSelect2/data/tags",["jquery"],function(d){function e(e,t,n){var i=n.get("tags"),r=n.get("createTag");void 0!==r&&(this.createTag=r);var o=n.get("insertTag");if(void 0!==o&&(this.insertTag=o),e.call(this,t,n),d.isArray(i))for(var s=0;s<i.length;s++){var a=i[s],l=this._normalizeItem(a),c=this.option(l);this.$element.append(c)}}return e.prototype.query=function(e,c,d){var u=this;return this._removeOldTags(),null==c.term||null!=c.page?void e.call(this,c,d):void e.call(this,c,function e(t,n){for(var i=t.results,r=0;r<i.length;r++){var o=i[r],s=null!=o.children&&!e({results:o.children},!0);if(o.text===c.term||s)return!n&&(t.data=i,void d(t))}if(n)return!0;var a=u.createTag(c);if(null!=a){var l=u.option(a);l.attr("data-czrSelect2-tag",!0),u.addOptions([l]),u.insertTag(i,a)}t.results=i,d(t)})},e.prototype.createTag=function(e,t){var n=d.trim(t.term);return""===n?null:{id:n,text:n}},e.prototype.insertTag=function(e,t,n){t.unshift(n)},e.prototype._removeOldTags=function(e){(this._lastTag,this.$element.find("option[data-czrSelect2-tag]")).each(function(){this.selected||d(this).remove()})},e}),e.define("czrSelect2/data/tokenizer",["jquery"],function(u){function e(e,t,n){var i=n.get("tokenizer");void 0!==i&&(this.tokenizer=i),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".czrSelect2-search__field")},e.prototype.query=function(e,t,n){var r=this;t.term=t.term||"";var i=this.tokenizer(t,this.options,function(e){var t,n=r._normalizeItem(e);if(!r.$element.find("option").filter(function(){return u(this).val()===n.id}).length){var i=r.option(n);i.attr("data-czrSelect2-tag",!0),r._removeOldTags(),r.addOptions([i])}t=n,r.trigger("select",{data:t})});i.term!==t.term&&(this.$search.length&&(this.$search.val(i.term),this.$search.focus()),t.term=i.term),e.call(this,t,n)},e.prototype.tokenizer=function(e,t,n,i){for(var r=n.get("tokenSeparators")||[],o=t.term,s=0,a=this.createTag||function(e){return{id:e.term,text:e.term}};s<o.length;){var l=o[s];if(-1!==u.inArray(l,r)){var c=o.substr(0,s),d=a(u.extend({},t,{term:c}));null!=d?(i(d),o=o.substr(s+1)||"",s=0):s++}else s++}return{term:o}},e}),e.define("czrSelect2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){return t.term=t.term||"",t.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):void e.call(this,t,n)},e}),e.define("czrSelect2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){return t.term=t.term||"",0<this.maximumInputLength&&t.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):void e.call(this,t,n)},e}),e.define("czrSelect2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.query=function(n,i,r){var o=this;this.current(function(e){var t=null!=e?e.length:0;return 0<o.maximumSelectionLength&&t>=o.maximumSelectionLength?void o.trigger("results:message",{message:"maximumSelected",args:{maximum:o.maximumSelectionLength}}):void n.call(o,i,r)})},e}),e.define("czrSelect2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<span class="czrSelect2-dropdown"><span class="czrSelect2-results"></span></span>');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),e.define("czrSelect2/dropdown/search",["jquery","../utils"],function(r,e){function t(){}return t.prototype.render=function(e){var t=e.call(this),n=r('<span class="czrSelect2-search czrSelect2-search--dropdown"><input class="czrSelect2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=n,this.$search=n.find("input"),t.prepend(n),t},t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),this.$search.on("keydown",function(e){i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){r(this).off("keyup")}),this.$search.on("keyup input",function(e){i.handleSearch(e)}),t.on("open",function(){i.$search.attr("tabindex",0),i.$search.focus(),window.setTimeout(function(){i.$search.focus()},0)}),t.on("close",function(){i.$search.attr("tabindex",-1),i.$search.val("")}),t.on("focus",function(){t.isOpen()&&i.$search.focus()}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(i.showSearch(e)?i.$searchContainer.removeClass("czrSelect2-search--hide"):i.$searchContainer.addClass("czrSelect2-search--hide"))})},t.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t}),e.define("czrSelect2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,i)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),i=t.length-1;0<=i;i--){var r=t[i];this.placeholder.id===r.id&&n.splice(i,1)}return n},e}),e.define("czrSelect2/dropdown/infiniteScroll",["jquery"],function(r){function e(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&this.$results.append(this.$loadingMore)},e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("query",function(e){i.lastParams=e,i.loading=!0}),t.on("query:append",function(e){i.lastParams=e,i.loading=!0}),this.$results.on("scroll",function(){var e=r.contains(document.documentElement,i.$loadingMore[0]);if(!i.loading&&e){var t=i.$results.offset().top+i.$results.outerHeight(!1);i.$loadingMore.offset().top+i.$loadingMore.outerHeight(!1)<=t+50&&i.loadMore()}})},e.prototype.loadMore=function(){this.loading=!0;var e=r.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=r('<li class="czrSelect2-results__option czrSelect2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),e.define("czrSelect2/dropdown/attachBody",["jquery","../utils"],function(m,a){function e(e,t,n){this.$dropdownParent=n.get("dropdownParent")||m(document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var i=this,r=!1;e.call(this,t,n),t.on("open",function(){i._showDropdown(),i._attachPositioningHandler(t),r||(r=!0,t.on("results:all",function(){i._positionDropdown(),i._resizeDropdown()}),t.on("results:append",function(){i._positionDropdown(),i._resizeDropdown()}))}),t.on("close",function(){i._hideDropdown(),i._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("czrSelect2"),t.addClass("czrSelect2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=m("<span></span>"),n=e.call(this);return t.append(n),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._attachPositioningHandler=function(e,t){var n=this,i="scroll.czrSelect2."+t.id,r="resize.czrSelect2."+t.id,o="orientationchange.czrSelect2."+t.id,s=this.$container.parents().filter(a.hasScroll);s.each(function(){m(this).data("czrSelect2-scroll-position",{x:m(this).scrollLeft(),y:m(this).scrollTop()})}),s.on(i,function(e){var t=m(this).data("czrSelect2-scroll-position");m(this).scrollTop(t.y)}),m(window).on(i+" "+r+" "+o,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.czrSelect2."+t.id,i="resize.czrSelect2."+t.id,r="orientationchange.czrSelect2."+t.id;this.$container.parents().filter(a.hasScroll).off(n),m(window).off(n+" "+i+" "+r)},e.prototype._positionDropdown=function(){var e=m(window),t=this.$dropdown.hasClass("czrSelect2-dropdown--above"),n=this.$dropdown.hasClass("czrSelect2-dropdown--below"),i=null,r=this.$container.offset();r.bottom=r.top+this.$container.outerHeight(!1);var o={height:this.$container.outerHeight(!1)};o.top=r.top,o.bottom=r.top+o.height;var s=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),c=a<r.top-s,d=l>r.bottom+s,u={left:r.left,top:o.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var h=p.offset();u.top-=h.top,u.left-=h.left,t||n||(i="below"),d||!c||t?!c&&d&&t&&(i="below"):i="above",("above"==i||t&&"below"!==i)&&(u.top=o.top-h.top-s),null!=i&&(this.$dropdown.removeClass("czrSelect2-dropdown--below czrSelect2-dropdown--above").addClass("czrSelect2-dropdown--"+i),this.$container.removeClass("czrSelect2-container--below czrSelect2-container--above").addClass("czrSelect2-container--"+i)),this.$dropdownContainer.css(u)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),e.define("czrSelect2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,i)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,i=0;i<t.length;i++){var r=t[i];r.children?n+=e(r.children):n++}return n}(t.data.results)<this.minimumResultsForSearch)&&e.call(this,t)},e}),e.define("czrSelect2/dropdown/selectOnClose",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("close",function(e){i._handleSelectOnClose(e)})},e.prototype._handleSelectOnClose=function(e,t){if(t&&null!=t.originalCzrSelect2Event){var n=t.originalCzrSelect2Event;if("select"===n._type||"unselect"===n._type)return}var i=this.getHighlightedResults();if(!(i.length<1)){var r=i.data("data");null!=r.element&&r.element.selected||null==r.element&&r.selected||this.trigger("select",{data:r})}},e}),e.define("czrSelect2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",function(e){i._selectTriggered(e)}),t.on("unselect",function(e){i._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&n.ctrlKey||this.trigger("close",{originalEvent:n,originalCzrSelect2Event:t})},e}),e.define("czrSelect2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return 1!=t&&(n+="s"),n},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),e.define("czrSelect2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(m,f,g,v,_,y,b,C,w,M,z,t,I,x,S,$,E,R,A,k,O,P,D,j,T,Z,L,H,e){function n(){this.reset()}return n.prototype.apply=function(t){if(null==(t=m.extend(!0,{},this.defaults,t)).dataAdapter){if(null!=t.ajax?t.dataAdapter=S:null!=t.data?t.dataAdapter=x:t.dataAdapter=I,0<t.minimumInputLength&&(t.dataAdapter=M.Decorate(t.dataAdapter,R)),0<t.maximumInputLength&&(t.dataAdapter=M.Decorate(t.dataAdapter,A)),0<t.maximumSelectionLength&&(t.dataAdapter=M.Decorate(t.dataAdapter,k)),t.tags&&(t.dataAdapter=M.Decorate(t.dataAdapter,$)),(null!=t.tokenSeparators||null!=t.tokenizer)&&(t.dataAdapter=M.Decorate(t.dataAdapter,E)),null!=t.query){var e=f(t.amdBase+"compat/query");t.dataAdapter=M.Decorate(t.dataAdapter,e)}if(null!=t.initSelection){var n=f(t.amdBase+"compat/initSelection");t.dataAdapter=M.Decorate(t.dataAdapter,n)}}if(null==t.resultsAdapter&&(t.resultsAdapter=g,null!=t.ajax&&(t.resultsAdapter=M.Decorate(t.resultsAdapter,j)),null!=t.placeholder&&(t.resultsAdapter=M.Decorate(t.resultsAdapter,D)),t.selectOnClose&&(t.resultsAdapter=M.Decorate(t.resultsAdapter,L))),null==t.dropdownAdapter){if(t.multiple)t.dropdownAdapter=O;else{var i=M.Decorate(O,P);t.dropdownAdapter=i}if(0!==t.minimumResultsForSearch&&(t.dropdownAdapter=M.Decorate(t.dropdownAdapter,Z)),t.closeOnSelect&&(t.dropdownAdapter=M.Decorate(t.dropdownAdapter,H)),null!=t.dropdownCssClass||null!=t.dropdownCss||null!=t.adaptDropdownCssClass){var r=f(t.amdBase+"compat/dropdownCss");t.dropdownAdapter=M.Decorate(t.dropdownAdapter,r)}t.dropdownAdapter=M.Decorate(t.dropdownAdapter,T)}if(null==t.selectionAdapter){if(t.multiple?t.selectionAdapter=_:t.selectionAdapter=v,null!=t.placeholder&&(t.selectionAdapter=M.Decorate(t.selectionAdapter,y)),t.allowClear&&(t.selectionAdapter=M.Decorate(t.selectionAdapter,b)),t.multiple&&(t.selectionAdapter=M.Decorate(t.selectionAdapter,C)),null!=t.containerCssClass||null!=t.containerCss||null!=t.adaptContainerCssClass){var o=f(t.amdBase+"compat/containerCss");t.selectionAdapter=M.Decorate(t.selectionAdapter,o)}t.selectionAdapter=M.Decorate(t.selectionAdapter,w)}if("string"==typeof t.language)if(0<t.language.indexOf("-")){var s=t.language.split("-")[0];t.language=[t.language,s]}else t.language=[t.language];if(m.isArray(t.language)){var a=new z;t.language.push("en");for(var l=t.language,c=0;c<l.length;c++){var d=l[c],u={};try{u=z.loadPath(d)}catch(e){try{d=this.defaults.amdLanguageBase+d,u=z.loadPath(d)}catch(e){t.debug&&window.console&&console.warn&&console.warn('CzrSelect2: The language file for "'+d+'" could not be automatically loaded. A fallback will be used instead.');continue}}a.extend(u)}t.translations=a}else{var p=z.loadPath(this.defaults.amdLanguageBase+"en"),h=new z(t.language);h.extend(p),t.translations=h}return t},n.prototype.reset=function(){function a(e){return e.replace(/[^\u0000-\u007E]/g,function(e){return t[e]||e})}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:M.escapeMarkup,language:e,matcher:function e(t,n){if(""===m.trim(t.term))return n;if(n.children&&0<n.children.length){for(var i=m.extend(!0,{},n),r=n.children.length-1;0<=r;r--)null==e(t,n.children[r])&&i.children.splice(r,1);return 0<i.children.length?i:e(t,i)}var o=a(n.text).toUpperCase(),s=a(t.term).toUpperCase();return-1<o.indexOf(s)?n:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},n.prototype.set=function(e,t){var n={};n[m.camelCase(e)]=t;var i=M._convertData(n);m.extend(this.defaults,i)},new n}),e.define("czrSelect2/options",["require","jquery","./defaults","./utils"],function(i,o,r,s){function e(e,t){if(this.options=e,null!=t&&this.fromElement(t),this.options=r.apply(this.options),t&&t.is("input")){var n=i(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=s.Decorate(this.options.dataAdapter,n)}}return e.prototype.fromElement=function(e){var t=["czrSelect2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.language&&(e.prop("lang")?this.options.language=e.prop("lang").toLowerCase():e.closest("[lang]").prop("lang")&&(this.options.language=e.closest("[lang]").prop("lang"))),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),e.data("czrSelect2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('CzrSelect2: The `data-czrSelect2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of CzrSelect2.'),e.data("data",e.data("czrSelect2Tags")),e.data("tags",!0)),e.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("CzrSelect2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of CzrSelect2."),e.attr("ajax--url",e.data("ajaxUrl")),e.data("ajax--url",e.data("ajaxUrl")));var n;n=o.fn.jquery&&"1."==o.fn.jquery.substr(0,2)&&e[0].dataset?o.extend(!0,{},e[0].dataset,e.data()):e.data();var i=o.extend(!0,{},n);for(var r in i=s._convertData(i))-1<o.inArray(r,t)||(o.isPlainObject(this.options[r])?o.extend(this.options[r],i[r]):this.options[r]=i[r]);return this},e.prototype.get=function(e){return this.options[e]},e.prototype.set=function(e,t){this.options[e]=t},e}),e.define("czrSelect2/core",["jquery","./options","./utils","./keys"],function(r,c,n,i){var d=function(e,t){null!=e.data("czrSelect2")&&e.data("czrSelect2").destroy(),this.$element=e,this.id=this._generateId(e),t=t||{},this.options=new c(t,e),d.__super__.constructor.call(this);var n=e.attr("tabindex")||0;e.data("old-tabindex",n),e.attr("tabindex","-1");var i=this.options.get("dataAdapter");this.dataAdapter=new i(e,this.options);var r=this.render();this._placeContainer(r);var o=this.options.get("selectionAdapter");this.selection=new o(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,r);var s=this.options.get("dropdownAdapter");this.dropdown=new s(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,r);var a=this.options.get("resultsAdapter");this.results=new a(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var l=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){l.trigger("selection:update",{data:e})}),e.addClass("czrSelect2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),e.data("czrSelect2",this)};return n.Extend(d,n.Observable),d.prototype._generateId=function(e){return"czrSelect2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+n.generateChars(2):n.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},d.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},d.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var i=this._resolveWidth(e,"style");return null!=i?i:this._resolveWidth(e,"element")}if("element"==t){var r=e.outerWidth(!1);return r<=0?"auto":r+"px"}if("style"==t){var o=e.attr("style");if("string"!=typeof o)return null;for(var s=o.split(";"),a=0,l=s.length;a<l;a+=1){var c=s[a].replace(/\s/g,"").match(n);if(null!==c&&1<=c.length)return c[1]}return null}return t},d.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},d.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.czrSelect2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this.$element.on("focus.czrSelect2",function(e){t.trigger("focus",e)}),this._syncA=n.bind(this._syncAttributes,this),this._syncS=n.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=e?(this._observer=new e(function(e){r.each(e,t._syncA),r.each(e,t._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",t._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",t._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",t._syncS,!1))},d.prototype._registerDataEvents=function(){var n=this;this.dataAdapter.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerSelectionEvents=function(){var n=this,i=["toggle","focus"];this.selection.on("toggle",function(){n.toggleDropdown()}),this.selection.on("focus",function(e){n.focus(e)}),this.selection.on("*",function(e,t){-1===r.inArray(e,i)&&n.trigger(e,t)})},d.prototype._registerDropdownEvents=function(){var n=this;this.dropdown.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerResultsEvents=function(){var n=this;this.results.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerEvents=function(){var n=this;this.on("open",function(){n.$container.addClass("czrSelect2-container--open")}),this.on("close",function(){n.$container.removeClass("czrSelect2-container--open")}),this.on("enable",function(){n.$container.removeClass("czrSelect2-container--disabled")}),this.on("disable",function(){n.$container.addClass("czrSelect2-container--disabled")}),this.on("blur",function(){n.$container.removeClass("czrSelect2-container--focus")}),this.on("query",function(t){n.isOpen()||n.trigger("open",{}),this.dataAdapter.query(t,function(e){n.trigger("results:all",{data:e,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(e){n.trigger("results:append",{data:e,query:t})})}),this.on("keypress",function(e){var t=e.which;n.isOpen()?t===i.ESC||t===i.TAB||t===i.UP&&e.altKey?(n.close(),e.preventDefault()):t===i.ENTER?(n.trigger("results:select",{}),e.preventDefault()):t===i.SPACE&&e.ctrlKey?(n.trigger("results:toggle",{}),e.preventDefault()):t===i.UP?(n.trigger("results:previous",{}),e.preventDefault()):t===i.DOWN&&(n.trigger("results:next",{}),e.preventDefault()):(t===i.ENTER||t===i.SPACE||t===i.DOWN&&e.altKey)&&(n.open(),e.preventDefault())})},d.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},d.prototype._syncSubtree=function(e,t){var n=!1,i=this;if(!e||!e.target||"OPTION"===e.target.nodeName||"OPTGROUP"===e.target.nodeName){if(t)if(t.addedNodes&&0<t.addedNodes.length)for(var r=0;r<t.addedNodes.length;r++){t.addedNodes[r].selected&&(n=!0)}else t.removedNodes&&0<t.removedNodes.length&&(n=!0);else n=!0;n&&this.dataAdapter.current(function(e){i.trigger("selection:update",{data:e})})}},d.prototype.trigger=function(e,t){var n=d.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===t&&(t={}),e in i){var r=i[e],o={prevented:!1,name:e,args:t};if(n.call(this,r,o),o.prevented)return void(t.prevented=!0)}n.call(this,e,t)},d.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},d.prototype.open=function(){this.isOpen()||this.trigger("query",{})},d.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},d.prototype.isOpen=function(){return this.$container.hasClass("czrSelect2-container--open")},d.prototype.hasFocus=function(){return this.$container.hasClass("czrSelect2-container--focus")},d.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("czrSelect2-container--focus"),this.trigger("focus",{}))},d.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('CzrSelect2: The `czrSelect2("enable")` method has been deprecated and will be removed in later CzrSelect2 versions. Use $element.prop("disabled") instead.'),(null==e||0===e.length)&&(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},d.prototype.data=function(){this.options.get("debug")&&0<arguments.length&&window.console&&console.warn&&console.warn('CzrSelect2: Data can no longer be set using `czrSelect2("data")`. You should consider setting the value instead using `$element.val()`.');var t=[];return this.dataAdapter.current(function(e){t=e}),t},d.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('CzrSelect2: The `czrSelect2("val")` method has been deprecated and will be removed in later CzrSelect2 versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();var t=e[0];r.isArray(t)&&(t=r.map(t,function(e){return e.toString()})),this.$element.val(t).trigger("change")},d.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".czrSelect2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("czrSelect2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("czrSelect2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},d.prototype.render=function(){var e=r('<span class="czrSelect2 czrSelect2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("czrSelect2-container--"+this.options.get("theme")),e.data("element",this.$element),e},d}),e.define("jquery-mousewheel",["jquery"],function(e){return e}),e.define("jquery.czrSelect2",["jquery","jquery-mousewheel","./czrSelect2/core","./czrSelect2/defaults"],function(r,e,o,t){if(null==r.fn.czrSelect2){var s=["open","close","destroy"];r.fn.czrSelect2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var e=r.extend(!0,{},t);new o(r(this),e)}),this;if("string"==typeof t){var n,i=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=r(this).data("czrSelect2");null==e&&window.console&&console.error&&console.error("The czrSelect2('"+t+"') method was called on an element that is not using CzrSelect2."),n=e[t].apply(e,i)}),-1<r.inArray(t,s)?this:n}throw new Error("Invalid arguments for CzrSelect2: "+t)}}return null==r.fn.czrSelect2.defaults&&(r.fn.czrSelect2.defaults=t),o}),{define:e.define,require:e.require}}(),t=e.require("jquery.czrSelect2");return n.fn.czrSelect2.amd=e,t}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(o){"use strict";function n(e,t){function n(e){void 0!==e.open&&(e.open=!e.open)}var i=function(e){for(var t=[],n=e.parentNode;(i=n)&&(0===i.offsetWidth||0===i.offsetHeight||!1===i.open);)t.push(n),n=n.parentNode;var i;return t}(e),r=i.length,o=[],s=e[t];if(r){for(var a=0;a<r;a++)o[a]=i[a].style.cssText,i[a].style.setProperty?i[a].style.setProperty("display","block","important"):i[a].style.cssText+=";display: block !important",i[a].style.height="0",i[a].style.overflow="hidden",i[a].style.visibility="hidden",n(i[a]);s=e[t];for(var l=0;l<r;l++)i[l].style.cssText=o[l],n(i[l])}return s}function i(e,t){var n=parseFloat(e);return Number.isNaN(n)?t:n}function r(e){return e.charAt(0).toUpperCase()+e.substr(1)}function s(e,t){if(this.$window=o(window),this.$document=o(document),this.$element=o(e),this.options=o.extend({},d,t),this.polyfill=this.options.polyfill,this.orientation=this.$element[0].getAttribute("data-orientation")||this.options.orientation,this.onInit=this.options.onInit,this.onSlide=this.options.onSlide,this.onSlideEnd=this.options.onSlideEnd,this.DIMENSION=u.orientation[this.orientation].dimension,this.DIRECTION=u.orientation[this.orientation].direction,this.DIRECTION_STYLE=u.orientation[this.orientation].directionStyle,this.COORDINATE=u.orientation[this.orientation].coordinate,this.polyfill&&c)return!1;this.identifier="js-"+a+"-"+l++,this.startEvent=this.options.startEvent.join("."+this.identifier+" ")+"."+this.identifier,this.moveEvent=this.options.moveEvent.join("."+this.identifier+" ")+"."+this.identifier,this.endEvent=this.options.endEvent.join("."+this.identifier+" ")+"."+this.identifier,this.toFixed=(this.step+"").replace(".","").length-1,this.$fill=o('<div class="'+this.options.fillClass+'" />'),this.$handle=o('<div class="'+this.options.handleClass+'" />'),this.$range=o('<div class="'+this.options.rangeClass+" "+this.options[this.orientation+"Class"]+'" id="'+this.identifier+'" />').insertAfter(this.$element).prepend(this.$fill,this.$handle),this.$element.css({position:"absolute",width:"1px",height:"1px",overflow:"hidden",opacity:"0"}),this.handleDown=o.proxy(this.handleDown,this),this.handleMove=o.proxy(this.handleMove,this),this.handleEnd=o.proxy(this.handleEnd,this),this.init();var n,i,r=this;this.$window.on("resize."+this.identifier,(n=function(){!function(e,t){var n=Array.prototype.slice.call(arguments,2);setTimeout(function(){return e.apply(null,n)},t)}(function(){r.update(!1,!1)},300)},i=(i=20)||100,function(){if(!n.debouncing){var e=Array.prototype.slice.apply(arguments);n.lastReturnVal=n.apply(window,e),n.debouncing=!0}return clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(function(){n.debouncing=!1},i),n.lastReturnVal})),this.$document.on(this.startEvent,"#"+this.identifier+":not(."+this.options.disabledClass+")",this.handleDown),this.$element.on("change."+this.identifier,function(e,t){if(!t||t.origin!==r.identifier){var n=e.target.value,i=r.getPositionFromValue(n);r.setPosition(i)}})}Number.isNaN=Number.isNaN||function(e){return"number"==typeof e&&e!=e};var e,a="rangeslider",l=0,c=((e=document.createElement("input")).setAttribute("type","range"),"text"!==e.type),d={polyfill:!0,orientation:"horizontal",rangeClass:"rangeslider",disabledClass:"rangeslider--disabled",activeClass:"rangeslider--active",horizontalClass:"rangeslider--horizontal",verticalClass:"rangeslider--vertical",fillClass:"rangeslider__fill",handleClass:"rangeslider__handle",startEvent:["mousedown","touchstart","pointerdown"],moveEvent:["mousemove","touchmove","pointermove"],endEvent:["mouseup","touchend","pointerup"]},u={orientation:{horizontal:{dimension:"width",direction:"left",directionStyle:"left",coordinate:"x"},vertical:{dimension:"height",direction:"top",directionStyle:"bottom",coordinate:"y"}}};return s.prototype.init=function(){this.update(!0,!1),this.onInit&&"function"==typeof this.onInit&&this.onInit()},s.prototype.update=function(e,t){(e=e||!1)&&(this.min=i(this.$element[0].getAttribute("min"),0),this.max=i(this.$element[0].getAttribute("max"),100),this.value=i(this.$element[0].value,Math.round(this.min+(this.max-this.min)/2)),this.step=i(this.$element[0].getAttribute("step"),1)),this.handleDimension=n(this.$handle[0],"offset"+r(this.DIMENSION)),this.rangeDimension=n(this.$range[0],"offset"+r(this.DIMENSION)),this.maxHandlePos=this.rangeDimension-this.handleDimension,this.grabPos=this.handleDimension/2,this.position=this.getPositionFromValue(this.value),this.$element[0].disabled?this.$range.addClass(this.options.disabledClass):this.$range.removeClass(this.options.disabledClass),this.setPosition(this.position,t)},s.prototype.handleDown=function(e){if(e.preventDefault(),!(e.button&&0!==e.button||(this.$document.on(this.moveEvent,this.handleMove),this.$document.on(this.endEvent,this.handleEnd),this.$range.addClass(this.options.activeClass),-1<(" "+e.target.className+" ").replace(/[\n\t]/g," ").indexOf(this.options.handleClass)))){var t=this.getRelativePosition(e),n=this.$range[0].getBoundingClientRect()[this.DIRECTION],i=this.getPositionFromNode(this.$handle[0])-n,r="vertical"===this.orientation?this.maxHandlePos-(t-this.grabPos):t-this.grabPos;this.setPosition(r),i<=t&&t<i+this.handleDimension&&(this.grabPos=t-i)}},s.prototype.handleMove=function(e){e.preventDefault();var t=this.getRelativePosition(e),n="vertical"===this.orientation?this.maxHandlePos-(t-this.grabPos):t-this.grabPos;this.setPosition(n)},s.prototype.handleEnd=function(e){e.preventDefault(),this.$document.off(this.moveEvent,this.handleMove),this.$document.off(this.endEvent,this.handleEnd),this.$range.removeClass(this.options.activeClass),this.$element.trigger("change",{origin:this.identifier}),this.onSlideEnd&&"function"==typeof this.onSlideEnd&&this.onSlideEnd(this.position,this.value)},s.prototype.cap=function(e,t,n){return e<t?t:n<e?n:e},s.prototype.setPosition=function(e,t){var n,i;void 0===t&&(t=!0),n=this.getValueFromPosition(this.cap(e,0,this.maxHandlePos)),i=this.getPositionFromValue(n),this.$fill[0].style[this.DIMENSION]=i+this.grabPos+"px",this.$handle[0].style[this.DIRECTION_STYLE]=i+"px",this.setValue(n),this.position=i,this.value=n,t&&this.onSlide&&"function"==typeof this.onSlide&&this.onSlide(i,n)},s.prototype.getPositionFromNode=function(e){for(var t=0;null!==e;)t+=e.offsetLeft,e=e.offsetParent;return t},s.prototype.getRelativePosition=function(e){var t=r(this.COORDINATE),n=this.$range[0].getBoundingClientRect()[this.DIRECTION],i=0;return void 0!==e.originalEvent["client"+t]?i=e.originalEvent["client"+t]:e.originalEvent.touches&&e.originalEvent.touches[0]&&void 0!==e.originalEvent.touches[0]["client"+t]?i=e.originalEvent.touches[0]["client"+t]:e.currentPoint&&void 0!==e.currentPoint[this.COORDINATE]&&(i=e.currentPoint[this.COORDINATE]),i-n},s.prototype.getPositionFromValue=function(e){var t;return t=(e-this.min)/(this.max-this.min),Number.isNaN(t)?0:t*this.maxHandlePos},s.prototype.getValueFromPosition=function(e){var t,n;return t=e/(this.maxHandlePos||1),n=this.step*Math.round(t*(this.max-this.min)/this.step)+this.min,Number(n.toFixed(this.toFixed))},s.prototype.setValue=function(e){e===this.value&&""!==this.$element[0].value||this.$element.val(e).trigger("input",{origin:this.identifier})},s.prototype.destroy=function(){this.$document.off("."+this.identifier),this.$window.off("."+this.identifier),this.$element.off("."+this.identifier).removeAttr("style").removeData("plugin_"+a),this.$range&&this.$range.length&&this.$range[0].parentNode.removeChild(this.$range[0])},o.fn[a]=function(n){var i=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=o(this),t=e.data("plugin_"+a);t||e.data("plugin_"+a,t=new s(this,n)),"string"==typeof n&&t[n].apply(t,i)})},"rangeslider.js is available in jQuery context e.g $(selector).rangeslider(options);"}),function(l){if(!l.wp.wpColorPicker.prototype._hasAlpha){var c="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg==",t='<div class="wp-picker-holder" />',i='<div class="wp-picker-container" />',r='<input type="button" class="button button-small" />',o=void 0!==wpColorPickerL10n.current;if(o)var s='<a tabindex="0" class="wp-color-result" />';else{s='<button type="button" class="button wp-color-result" aria-expanded="false"><span class="wp-color-result-text"></span></button>';var a="<label></label>",d='<span class="screen-reader-text"></span>'}Color.fn.toString=function(){if(this._alpha<1)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var e=parseInt(this._color,10).toString(16);return this.error?"":(e.length<6&&(e=("00000"+e).substr(-6)),"#"+e)},l.widget("wp.wpColorPicker",l.wp.wpColorPicker,{_hasAlpha:!0,_create:function(){if(l.support.iris){var n=this,e=n.element;if(l.extend(n.options,e.data()),"hue"===n.options.type)return n._createHueOnly();n.close=l.proxy(n.close,n),n.initialValue=e.val(),e.addClass("wp-color-picker"),o?(e.hide().wrap(i),n.wrap=e.parent(),n.toggler=l(s).insertBefore(e).css({backgroundColor:n.initialValue}).attr("title",wpColorPickerL10n.pick).attr("data-current",wpColorPickerL10n.current),n.pickerContainer=l(t).insertAfter(e),n.button=l(r).addClass("hidden")):(e.parent("label").length||(e.wrap(a),n.wrappingLabelText=l(d).insertBefore(e).text(wpColorPickerL10n.defaultLabel)),n.wrappingLabel=e.parent(),n.wrappingLabel.wrap(i),n.wrap=n.wrappingLabel.parent(),n.toggler=l(s).insertBefore(n.wrappingLabel).css({backgroundColor:n.initialValue}),n.toggler.find(".wp-color-result-text").text(wpColorPickerL10n.pick),n.pickerContainer=l(t).insertAfter(n.wrappingLabel),n.button=l(r)),n.options.defaultColor?(n.button.addClass("wp-picker-default").val(wpColorPickerL10n.defaultString),o||n.button.attr("aria-label",wpColorPickerL10n.defaultAriaLabel)):(n.button.addClass("wp-picker-clear").val(wpColorPickerL10n.clear),o||n.button.attr("aria-label",wpColorPickerL10n.clearAriaLabel)),o?e.wrap('<span class="wp-picker-input-wrap" />').after(n.button):(n.wrappingLabel.wrap('<span class="wp-picker-input-wrap hidden" />').after(n.button),n.inputWrapper=e.closest(".wp-picker-input-wrap")),e.iris({target:n.pickerContainer,hide:n.options.hide,width:n.options.width,mode:n.options.mode,palettes:n.options.palettes,change:function(e,t){n.options.alpha?(n.toggler.css({"background-image":"url("+c+")"}),o?n.toggler.html('<span class="color-alpha" />'):(n.toggler.css({position:"relative"}),0==n.toggler.find("span.color-alpha").length&&n.toggler.append('<span class="color-alpha" />')),n.toggler.find("span.color-alpha").css({width:"30px",height:"24px",position:"absolute",top:0,left:0,"border-top-left-radius":"2px","border-bottom-left-radius":"2px",background:t.color.toString()})):n.toggler.css({backgroundColor:t.color.toString()}),l.isFunction(n.options.change)&&n.options.change.call(this,e,t)}}),e.val(n.initialValue),n._addListeners(),n.options.hide||n.toggler.click(),e.on("czr-colorpicker-close",function(){n.toggler.hasClass("wp-picker-open")&&n.close()})}},_addListeners:function(){var t=this;t.wrap.on("click.wpcolorpicker",function(e){e.stopPropagation()}),t.toggler.click(function(){t.toggler.hasClass("wp-picker-open")?t.close():t.open()}),t.element.on("change",function(e){(""===l(this).val()||t.element.hasClass("iris-error"))&&(t.options.alpha?(o&&t.toggler.removeAttr("style"),t.toggler.find("span.color-alpha").css("backgroundColor","")):t.toggler.css("backgroundColor",""),l.isFunction(t.options.clear)&&t.options.clear.call(this,e))}),t.button.on("click",function(e){l(this).hasClass("wp-picker-clear")?(t.element.val(""),t.options.alpha?(o&&t.toggler.removeAttr("style"),t.toggler.find("span.color-alpha").css("backgroundColor","")):t.toggler.css("backgroundColor",""),l.isFunction(t.options.clear)&&t.options.clear.call(this,e)):l(this).hasClass("wp-picker-default")&&t.element.val(t.options.defaultColor).change()})},open:function(){l("body").find(".wp-color-picker").not(this.element).each(function(){l(this).trigger("czr-colorpicker-close")}),this.element.iris("toggle"),this.inputWrapper.removeClass("hidden"),this.wrap.addClass("wp-picker-active"),this.toggler.addClass("wp-picker-open").attr("aria-expanded","true")},close:function(){try{this.element.iris("toggle")}catch(e){console.log("color-picker => error on ::close()",e)}this.inputWrapper.addClass("hidden"),this.wrap.removeClass("wp-picker-active"),this.toggler.removeClass("wp-picker-open").attr("aria-expanded","false")}}),l.widget("a8c.iris",l.a8c.iris,{_create:function(){if(this._super(),this.options.alpha=this.element.data("alpha")||!1,this.element.is(":input")||(this.options.alpha=!1),void 0!==this.options.alpha&&this.options.alpha){var n=this,e=n.element,t=l('<div class="iris-strip iris-slider iris-alpha-slider"><div class="iris-slider-offset iris-slider-offset-alpha"></div></div>').appendTo(n.picker.find(".iris-picker-inner")),i=t.find(".iris-slider-offset-alpha"),r={aContainer:t,aSlider:i};void 0!==e.data("custom-width")?n.options.customWidth=parseInt(e.data("custom-width"))||0:n.options.customWidth=100,n.options.defaultWidth=e.width(),(n._color._alpha<1||-1!=n._color.toString().indexOf("rgb"))&&e.width(parseInt(n.options.defaultWidth+n.options.customWidth)),l.each(r,function(e,t){n.controls[e]=t}),n.controls.square.css({"margin-right":"0"});var o=n.picker.width()-n.controls.square.width()-20,s=o/6,a=o/2-s;l.each(["aContainer","strip"],function(e,t){n.controls[t].width(a).css({"margin-left":s+"px"})}),n._initControls(),n._change()}},_initControls:function(){if(this._super(),this.options.alpha){var n=this;n.controls.aSlider.slider({orientation:"vertical",min:0,max:100,step:1,value:parseInt(100*n._color._alpha),slide:function(e,t){n._color._alpha=parseFloat(t.value/100),n._change.apply(n,arguments)}})}},_change:function(){this._super();var e=this,t=e.element;if(this.options.alpha){var n=e.controls,i=parseInt(100*e._color._alpha),r=e._color.toRgb(),o=["rgb("+r.r+","+r.g+","+r.b+") 0%","rgba("+r.r+","+r.g+","+r.b+", 0) 100%"],s=e.options.defaultWidth,a=e.options.customWidth,l=e.picker.closest(".wp-picker-container").find(".wp-color-result");n.aContainer.css({background:"linear-gradient(to bottom, "+o.join(", ")+"), url("+c+")"}),l.hasClass("wp-picker-open")&&(n.aSlider.slider("value",i),e._color._alpha<1?(n.strip.attr("style",n.strip.attr("style").replace(/rgba\(([0-9]+,)(\s+)?([0-9]+,)(\s+)?([0-9]+)(,(\s+)?[0-9\.]+)\)/g,"rgb($1$3$5)")),t.width(parseInt(s+a))):t.width(s))}(t.data("reset-alpha")||!1)&&e.picker.find(".iris-palette-container").on("click.palette",".iris-palette",function(){e._color._alpha=1,e.active="external",e._change()})},_addInputListeners:function(i){var r=this,e=function(e){var t=new Color(i.val()),n=i.val();i.removeClass("iris-error"),t.error?""!==n&&i.addClass("iris-error"):t.toString()!==r._color.toString()&&("keyup"===e.type&&n.match(/^[0-9a-fA-F]{3}$/)||r._setOption("color",t.toString()))};i.on("change",e).on("keyup",r._debounce(e,100)),r.options.hide&&i.on("focus",function(){r.show()})}})}}(jQuery),function(t,e,n){t.bind("ready",function(){t.previewedDevice&&t.previewedDevice.bind(function(e){t.previewer.send("previewed-device",e)})})}(wp.customize,jQuery,_),function(e,t,i){var r=function(e){e=i.extend({bgCol:"#5ed1f5",textCol:"#000",consoleArguments:[]},e);var t,n=Array.from(e.consoleArguments);return n=i.isEmpty(i.filter(n,function(e){return!i.isString(e)}))?n.join(" "):JSON.stringify(n.join(" ")),["%c "+(t=n,i.isString(t)?300<t.length?t.substr(0,299)+"...":t:""),["background:"+e.bgCol,"color:"+e.textCol,"display: block;"].join(";")]},n=function(e,t,n){i.isUndefined(console)&&"function"!=typeof window.console.log||(serverControlParams.isDevMode?i.isUndefined(t)?console.log.apply(console,r({bgCol:n,textCol:"#000",consoleArguments:["<"+e+">"]})):(console.log.apply(console,r({bgCol:n,textCol:"#000",consoleArguments:["<"+e+">"]})),console.log(t),console.log.apply(console,r({bgCol:n,textCol:"#000",consoleArguments:["</"+e+">"]}))):console.log.apply(console,r({bgCol:n,textCol:"#000",consoleArguments:[e]})))};e.consoleLog=function(){serverControlParams.isDevMode&&(i.isUndefined(console)&&"function"!=typeof window.console.log||(console.log.apply(console,r({consoleArguments:arguments})),console.log("Unstyled console message : ",arguments)))},e.errorLog=function(){i.isUndefined(console)&&"function"!=typeof window.console.log||console.log.apply(console,r({bgCol:"#ffd5a0",textCol:"#000",consoleArguments:arguments}))},e.errare=function(e,t){n(e,t,"#ffd5a0")},e.infoLog=function(e,t){n(e,t,"#5ed1f5")},e.czr_isChangeSetOn=function(){return serverControlParams.isChangeSetOn&&!0}}(wp.customize,jQuery,_),function(e,n,i){e.bind("ready",function(){var t=function(){i.isUndefined(window.themeServerControlParams)||i.isUndefined(themeServerControlParams.isThemeSwitchOn)||themeServerControlParams.isThemeSwitchOn||(e.panel("themes").active.callbacks=n.Callbacks(),e.panel("themes").active(themeServerControlParams.isThemeSwitchOn))};e.panel.has("themes")?t():e.panel.when("themes",function(e){t()})})}(wp.customize,jQuery,_),function(r,e,o){r.czr_activeSectionId=r.czr_activeSectionId||new r.Value(""),r.czr_activePanelId=r.czr_activePanelId||new r.Value(""),r.bind("ready",function(){if("function"!=typeof r.Section)throw new Error("Your current version of WordPress does not support the customizer sections needed for this theme. Please upgrade WordPress to the latest version.");var n=function(e,t){r.czr_activeSectionId(e?t:"")};r.section.each(function(t){"publish_settings"!=t.id&&t.expanded.bind(function(e){n(e,t.id)})}),r.section.bind("add",function(t){"publish_settings"!=t.id&&t.expanded.bind(function(e){n(e,t.id)})});var i=function(e,t){r.czr_activePanelId(e?t:""),o.isEmpty(r.czr_activePanelId())&&r.czr_activeSectionId("")};r.panel.each(function(t){t.expanded.bind(function(e){i(e,t.id)})}),r.panel.bind("add",function(t){t.expanded.bind(function(e){i(e,t.id)})})})}(wp.customize,jQuery,_),function(a,e,l){a.bind("ready",function(){serverControlParams.paramsForDynamicRegistration;l.isObject(serverControlParams.paramsForDynamicRegistration)||a.errorLog("serverControlParams.paramsForDynamicRegistration should be an array"),l.each(serverControlParams.paramsForDynamicRegistration,function(e,t){if(e.module_registration_params&&!0===e.module_registration_params.dynamic_registration)if(serverControlParams.isDevMode)n(e);else try{n(e)}catch(e){a.errorLog(e)}})});var n=function(e){if(e=l.extend({setting_id:"",module_type:"",option_value:[],setting:{},section:{id:"",title:""},control:{}},e),l.isEmpty(e.setting_id)||l.isEmpty(e.module_type))throw a.errare("registerDynamicModuleSettingControl => args",e),new Error("registerDynamicModuleSettingControl => missing params when registrating a setting");if(!l.isArray(e.option_value)&&!l.isObject(e.option_value))throw new Error("registerDynamicModuleSettingControl => the module values must be an array or an object");var t=e.setting_id,n=e.setting;a.CZR_Helpers.register({what:"setting",id:t,dirty:!l.isEmpty(e.option_value),value:e.option_value,transport:n.transport||"refresh",type:n.type||"option",track:!1});var i=e.section;if(!l.isEmpty(i)){if(!l.has(i,"id"))throw new Error("registerDynamicModuleSettingControl => missing section id for the section of setting : "+t);a.CZR_Helpers.register({what:"section",id:i.id,title:i.title||i.id,panel:l.isEmpty(i.panel)?"":i.panel,priority:i.priority||10,track:!1})}var r,o=t,s=e.control;if(r=l.isEmpty(e.section)?s.section:e.section.id,l.isEmpty(r))throw a.errare("registerDynamicModuleSettingControl => missing section id for the control",e),new Error("registerDynamicModuleSettingControl => missing section id for the section of setting : "+t);return a.CZR_Helpers.register({what:"control",id:o,label:s.label||o,type:"czr_module",module_type:e.module_type,section:r,priority:s.priority||10,settings:{default:t},track:!1}),a.section.has(r)&&a.section(r).expanded()&&a.control(o).trigger("set-module-ready"),t}}(wp.customize,jQuery,_),function(s,a,l){s.Value.prototype.set=function(t,n){var i=this._value,e=a.Deferred(),r=this,o=[];return t=this._setter.apply(this,arguments),t=this.validate(t),args=l.extend({silent:!1},l.isObject(n)?n:{}),null===t||l.isEqual(i,t)?e.resolveWith(r,[t,i,n]).promise():(this._value=t,(this._dirty=!0)===args.silent?e.resolveWith(r,[t,i,n]).promise():this._deferreds?(l.each(r._deferreds,function(e){o.push(e.apply(null,[t,i,n]))}),a.when.apply(null,o).fail(function(){s.errorLog("A deferred callback failed in api.Value::set()")}).then(function(){r.callbacks.fireWith(r,[t,i,n]),e.resolveWith(r,[t,i,n])}),e.promise(r)):(this.callbacks.fireWith(this,[t,i,n]),e.resolveWith(r,[t,i,n]).promise(r)))},s.Value.prototype.bind=function(){var t=this,n=!1,i=[];return a.each(arguments,function(e,t){n||(n=l.isObject(t)&&t.deferred),l.isFunction(t)&&i.push(t)}),n?(t._deferreds=t._deferreds||[],l.each(i,function(e){l.contains(e,t._deferreds)||t._deferreds.push(e)})):t.callbacks.add.apply(t.callbacks,arguments),this},s.Setting.prototype.silent_set=function(e,t){var n=this._value,i=s.state("saved")();return e=this._setter.apply(this,arguments),null===(e=this.validate(e))||l.isEqual(n,e)||(this._value=e,this._dirty=l.isUndefined(t)||!l.isBoolean(t)?this._dirty:t,this.callbacks.fireWith(this,[e,n,{silent:!0}]),s.state("saved")(i)),this}}(wp.customize,jQuery,_),function(s,a,l){s.Setting.prototype.preview=function(e,t,n){var i,r=this,o=a.Deferred();return i=r.transport,l.isUndefined(t)||l.isEmpty(t)||l.isNull(t)||!l.isObject(n)||!0!==n.not_preview_sent?l.has(n,"silent")&&!1!==n.silent?o.resolve(arguments).promise():("postMessage"!==i||s.state("previewerAlive").get()||(i="refresh"),"postMessage"===i?(r.previewer.send("pre_setting",{set_id:r.id,data:n,value:e}),r.previewer.send("setting",[r.id,r()]),o.resolve(arguments)):"refresh"===i&&(r.previewer.refresh(),o.resolve(arguments)),o.promise()):o.resolve(arguments).promise()}}(wp.customize,jQuery,_),function(e,r,o){if("function"==typeof e.Section){var n=e.Section.prototype.initialize;e.Section.prototype.initialize=function(e,t){n.apply(this,[e,t]);var i=this;this.expanded.callbacks.add(function(e){if(e){var t=i.container.closest(".wp-full-overlay-sidebar-content"),n=i.container.find(".accordion-section-content");_resizeContentHeight=function(){n.css("height",t.innerHeight())},_resizeContentHeight(),r(window).on("resize.customizer-section",o.debounce(_resizeContentHeight,110))}})}}}(wp.customize,jQuery,_),function(d,u,p){d.CZR_Helpers=d.CZR_Helpers||{},d.CZR_Helpers=u.extend(d.CZR_Helpers,{setupInputCollectionFromDOM:function(){var o=this;if(!p.isFunction(o))throw new Error("setupInputCollectionFromDOM => inputParentInst is not valid.");var s=o.module,a=p.has(o(),"is_mod_opt");if(p.isEmpty(o.inputCollection())){o.czr_Input=o.czr_Input||new d.Values,o.inputConstructor=a?s.inputModOptConstructor:s.inputConstructor;var e=a?o.defaultModOptModel:o.defaultItemModel;if(p.isEmpty(e)||p.isUndefined(e))throw new Error("setupInputCollectionFromDOM => No default model found in item or mod opt "+o.id+".");var l=u.extend(!0,{},o());l=p.isObject(l)?u.extend(e,l):e;var c={};return u("."+s.control.css_attr.sub_set_wrapper,o.container).length<1&&d.errare("setupInputCollectionFromDOM => no input elements found in the DOM"),u("."+s.control.css_attr.sub_set_wrapper,o.container).each(function(e){var t=u(this).find("[data-czrtype]").attr("data-czrtype"),n=p.has(l,t)?l[t]:"";if(p.isUndefined(t)||p.isEmpty(t))d.errare("setupInputCollectionFromDOM => missing data-czrtype id for input type "+u(this).data("input-type")+" in module "+s.id+". Check that the server input template is properly declared.");else{if(!p.has(l,t))throw new Error("setupInputCollectionFromDOM => The item or mod opt property : "+t+" has been found in the DOM but not in the item or mod opt model : "+o.id+". The input can not be instantiated.");var i=u(this).data("input-type"),r={id:t,type:i,transport:u(this).data("transport")||"inherit",input_value:n,input_options:p.has(s.inputOptions,i)?s.inputOptions[i]:{},container:u(this),input_parent:o,is_mod_opt:a,module:s};d.trigger("input-args-before-instantiation",r),o.czr_Input.add(t,new o.inputConstructor(t,r)),o.czr_Input(t).ready(),c[t]=n}}),o.inputCollection(c),o}}})}(wp.customize,jQuery,_),function(i,e,r){i.CZR_Helpers=i.CZR_Helpers||{},i.CZR_Helpers=e.extend(i.CZR_Helpers,{getModuleTmpl:function(t){var n=e.Deferred();if(t=r.extend({tmpl:"",module_type:"",module_id:"",cache:!0,nonce:i.settings.nonce.save},t),(r.isEmpty(t.tmpl)||r.isEmpty(t.module_type))&&n.reject("api.CZR_Helpers.getModuleTmpl => missing tmpl or module_type param"),i.CZR_Helpers.czr_cachedTmpl=i.CZR_Helpers.czr_cachedTmpl||{},i.CZR_Helpers.czr_cachedTmpl[t.module_type]=i.CZR_Helpers.czr_cachedTmpl[t.module_type]||{},!0===t.cache&&!r.isEmpty(i.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl])&&r.isString(i.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl]))n.resolve(i.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl]);else{if(r.isObject(i.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl])&&"pending"==i.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl].state())return i.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl];i.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl]=wp.ajax.post("ac_get_template",t).done(function(e){n.resolve(e),i.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl]=e}).fail(function(e){i.errare("api.CZR_Helpers.getModuleTmpl => Problem when fetching the "+t.tmpl+" tmpl from server for module : "+t.module_id+" "+t.module_type,e),n.reject(e),r.isObject(e)&&("invalid_nonce"!==e.code&&"Bad Request"!==e.statusText||window.sektionsLocalizedData&&sektionsLocalizedData.i18n&&i.previewer.trigger("sek-notify",{type:"error",duration:3e4,message:sektionsLocalizedData.i18n["Something went wrong, please refresh this page."]}))})}return n.promise()}})}(wp.customize,jQuery,_),function(p,h,m){p.CZR_Helpers=p.CZR_Helpers||{},p.CZR_Helpers=h.extend(p.CZR_Helpers,{register:function(e){if(m.has(e,"id")){var t,n={};switch(e.what){case"setting":if(p.has(e.id))break;t=h.extend(!0,{},p.Setting.prototype.defaults);var i=m.extend(t,{dirty:!m.isUndefined(e.dirty)&&e.dirty,value:m.isUndefined(e.value)?null:e.value,transport:e.transport||"refresh",type:e.type||"option"}),r=p.settingConstructor[i.type]||p.Setting;m.isObject(e.options)&&(i=m.extend(i,e.options));try{p.add(new r(e.id,i.value,i))}catch(e){p.errare("api.CZR_Helpers::register => problem when adding a setting to the api",e)}break;case"panel":if(!m.has(e,"id"))throw new Error("registerPanel => missing panel id ");if(p.panel.has(e.id))break;t=h.extend(!0,{},p.Panel.prototype.defaults);var o=m.extend(t,{id:e.id,title:e.title||e.id,priority:m.has(e,"priority")?e.priority:0}),s=m.isObject(e.constructWith)?e.constructWith:p.Panel;m.isObject(e.options)&&(o=m.extend(o,e.options)),o=m.extend({params:o},o);try{n=p.panel.add(new s(e.id,o))}catch(e){p.errare("api.CZR_Helpers::register => problem when adding a panel to the api",e)}break;case"section":if(!m.has(e,"id"))throw new Error("registerSection => missing section id ");if(p.section.has(e.id))break;t=h.extend(!0,{},p.Section.prototype.defaults);var a=m.extend(t,{content:"",id:e.id,title:e.title,panel:e.panel,priority:e.priority,description_hidden:!1,customizeAction:serverControlParams.i18n.Customizing}),l=p.Section;m.isUndefined(e.constructWith)?!m.isEmpty(e.type)&&p.sectionConstructor[e.type]&&(l=p.sectionConstructor[e.type]):l=e.constructWith,m.isObject(e.options)&&(a=m.extend(a,e.options)),a=m.extend({params:a},a);try{n=p.section.add(new l(e.id,a))}catch(e){p.errare("api.CZR_Helpers::register => problem when adding a section to the api",e)}break;case"control":if(p.control.has(e.id))break;t=h.extend(!0,{},p.Control.prototype.defaults);var c,d=m.extend(t,{content:"",label:e.label||e.id,priority:e.priority,section:e.section,settings:e.settings,type:e.type,module_type:e.module_type,input_attrs:e.input_attrs,sek_registration_params:e}),u=p.controlConstructor[d.type]||p.Control;m.isObject(e.options)&&(d=m.extend(d,e.options)),c=m.extend({params:d},d);try{n=p.control.add(new u(e.id,c))}catch(e){p.errare("api.CZR_Helpers::register => problem when adding a control to the api",e)}break;default:p.errorLog('invalid "what" when invoking the register() method')}return n=m.isEmpty(n)?{deferred:{embedded:h.Deferred(function(){this.resolve()})}}:n,!1!==e.track&&p.trigger("czr-new-registered",e),"setting"==e.what?e:n.deferred.embedded}p.errare("register => missing id ",e)}})}(wp.customize,jQuery,_),function(i,r,o){i.CZR_Helpers=i.CZR_Helpers||{},i.CZR_Helpers=r.extend(i.CZR_Helpers,{css_loader_html:'<div class="czr-css-loader czr-mr-loader" style="display:none"><div></div><div></div><div></div></div>',getControlSettingId:function(e,t){return t="default",i.control.has(e)?!o.has(i.control(e),"settings")||o.isEmpty(i.control(e).settings)?e:o.has(i.control(e).settings,t)?o.isUndefined(i.control(e).settings[t].id)?(i.consoleLog("getControlSettingId : The requested control_id has no setting id assigned : "+e),e):i.control(e).settings[t].id:(i.consoleLog("getControlSettingId : The requested control_id does not have the requested setting type : "+e+" , "+t),e):e},getDocSearchLink:function(e){var t=(e=o.isString(e)?e:"").replace(/ /g,"+");return['<a href="'+[serverControlParams.docURL,"search?query=",t].join("")+'" title="'+serverControlParams.i18n.readDocumentation+'" target="_blank">'," ",'<span class="far fa-question-circle-o"></span>'].join("")},build_setId:function(e){return o.isUndefined(window.themeServerControlParams)||!o.isArray(themeServerControlParams.wpBuiltinSettings)?e:o.contains(themeServerControlParams.wpBuiltinSettings,e)?e:o.contains(themeServerControlParams.themeSettingList,e)&&-1==e.indexOf(themeServerControlParams.themeOptions)?[themeServerControlParams.themeOptions+"[",e,"]"].join(""):e},getOptionName:function(e){if(o.isEmpty(window.themeServerControlParams)||o.isEmpty(themeServerControlParams.themeOptions))return e;return-1==e.indexOf(themeServerControlParams.themeOptions)?e:e.replace(/\[|\]/g,"").replace(themeServerControlParams.themeOptions,"")},hasPartRefresh:function(n){if(o.has(i,"czr_partials"))return o.contains(o.map(i.czr_partials(),function(e,t){return o.contains(e.settings,n)}),!0)},getSectionControlIds:function(e){return e=e||i.czr_activeSectionId(),i.section.has(e)?o.map(i.section(e).controls(),function(e){return e.id}):[]},getSectionSettingIds:function(e){if(e=e||i.czr_activeSectionId(),i.section.has(e)){var n=[],t=this.getSectionControlIds(e);return o.each(t,function(e){o.each(i.control(e).settings,function(e,t){n.push(e.id)})}),n}},capitalize:function(e){return o.isString(e)?e.charAt(0).toUpperCase()+e.slice(1):e},truncate:function(e,t,n){if(!o.isString(e))return"";t=t||20;var i=e.length>t,r=i?e.substr(0,t-1):e;return r=n&&i?r.substr(0,r.lastIndexOf(" ")):r,i?r+"...":r},isMultiItemModule:function(e,t){if(!o.isUndefined(e)||o.isObject(t)){if(o.isObject(t)&&o.has(t,"module_type"))e=t.module_type;else if(o.isUndefined(e)||o.isNull(e))return;if(o.has(i.czrModuleMap,e))return i.czrModuleMap[e].crud||i.czrModuleMap[e].multi_item||!1}},isCrudModule:function(e,t){if(!o.isUndefined(e)||o.isObject(t)){if(o.isObject(t)&&o.has(t,"module_type"))e=t.module_type;else if(o.isUndefined(e)||o.isNull(e))return;if(o.has(i.czrModuleMap,e))return i.czrModuleMap[e].crud||!1}},hasModuleModOpt:function(e,t){if(!o.isUndefined(e)||o.isObject(t)){if(o.isObject(t)&&o.has(t,"module_type"))e=t.module_type;else if(o.isUndefined(e)||o.isNull(e))return;if(o.has(i.czrModuleMap,e))return i.czrModuleMap[e].has_mod_opt||!1}},removeInputCollection:function(){var t=this;if(!o.isFunction(t))throw new Error("removeInputCollection : inputParentInst is not valid.");o.has(t,"czr_Input")&&(t.czr_Input.each(function(e){t.czr_Input.remove(e.id)}),t.inputCollection({}))},refreshModuleControl:function(e){var t=i.controlConstructor.czr_module,n=(i.control(e).params.type,i.settings.controls[e]);r.when(i.control(e).container.remove()).done(function(){i.control.remove(e),i.control.add(e,new t(e,{params:n,previewer:i.previewer}))})},isChecked:function(e){return o.isBoolean(e)?e:o.isNumber(e)?0<e:!!o.isString(e)&&("0"!==e&&""!==e&&"off"!==e)},hexToRgb:function(t){try{t=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,t,n,i){return t+t+n+n+i+i})}catch(e){return i.errorLog("Error in Helpers::hexToRgb : "+e),t}var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return"rgb("+(e=e?[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]:[]).join(",")+")"},rgbToHex:function(e,t,n){var i=function(e){var t=e.toString(16);return 1==t.length?"0"+t:t};return"#"+i(e)+i(t)+i(n)},parseTemplate:o.memoize(function(t){var n,i={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};return function(e){return(n=n||o.template(t,i))(e)}})})}(wp.customize,jQuery,_),function(a,l,c){a.CZR_Helpers=a.CZR_Helpers||{},a.CZR_Helpers=l.extend(a.CZR_Helpers,{addActions:function(e,t,n){(n=n||this)[e]=n[e]||[],new_event_map=c.clone(n[e]),n[e]=c.union(new_event_map,c.isArray(t)?t:[t])},doActions:function(e,t,n){t.trigger(e,n)},setupDOMListeners:function(e,r,o){var s=this;o=o||s,c.isArray(e)?c.isObject(r)?(r=c.extend({model:{},dom_el:{}},r)).dom_el instanceof jQuery&&!(r.dom_el.length<1)?c.map(e,function(i){if(c.isString(i.selector)&&!c.isEmpty(i.selector))if(c.isString(i.selector)&&!c.isEmpty(i.selector)){var e=i.name&&!c.isEmpty(i.name)?i.name:[i.trigger,i.selector].join(""),t=r.dom_el.data("czr-listener-collection");if(t&&c.isArray(t)){if(t=c.isArray(t)?t:[],c.contains(t,e))return void a.errare("setupDOMListeners : aborting because listener already created for event : "+e);t.push(e)}else t=[e];r.dom_el.data("czr-listener-collection",t),r.dom_el.on(i.trigger,i.selector,function(e,t){if(e.stopPropagation(),!a.utils.isKeydownButNotEnterEvent(e)){e.preventDefault();var n=l.extend(!0,{},r);if(c.has(n,"model")&&c.has(n.model,"id")&&(c.has(o,"get")?n.model=o():n.model=o.getModel(n.model.id)),l.extend(n,{event:i,dom_event:e}),l.extend(n,t),c.has(n,"event")&&c.has(n.event,"actions"))if(serverControlParams.isDevMode)s.executeEventActionChain(n,o);else try{s.executeEventActionChain(n,o)}catch(e){a.errare("In setupDOMListeners : problem when trying to fire actions : "+n.event.actions,e)}else a.errare("executeEventActionChain : missing obj.event or obj.event.actions")}})}else a.errare("setupDOMListeners : selector must be a string not empty. Aborting setup of action(s) : "+i.actions.join(","));else a.errare("setupDOMListeners : selector must be a string not empty. Aborting setup of action(s) : "+i.actions.join(","))}):a.errare("setupDomListeners : dom element should be an existing dom element",r):a.errare("setupDomListeners : args should be an object",e):a.errare("setupDomListeners : event_map should be an array",r)},executeEventActionChain:function(i,r){var o=this;if("function"==typeof i.event.actions)return i.event.actions.call(r,i);c.isArray(i.event.actions)||(i.event.actions=[i.event.actions]);var s=!1;c.map(i.event.actions,function(e){if(!s){var t=function(){};if("function"==typeof e)t=e;else{if("function"!=typeof r[e])throw new Error("executeEventActionChain : the action : "+e+" has not been found when firing event : "+i.event.selector);t=r[e]}var n=c.has(i,"dom_el")&&-1!=i.dom_el.length?i.dom_el:o.container;"string"==typeof e&&n.trigger("before_"+e,c.omit(i,"event")),!1===t.call(r,i)&&(s=!0),"string"==typeof e&&n.trigger("after_"+e,c.omit(i,"event"))}})}})}(wp.customize,jQuery,_),function(i,e,r){i.czr_wpQueryDataReady=i.czr_wpQueryDataReady||e.Deferred(),i.czr_wpQueryInfos=i.czr_wpQueryInfos||new i.Value,i.bind("ready",function(){i.previewer.bind("czr-query-data-ready",function(e){i.czr_wpQueryInfos(e),"pending"==i.czr_wpQueryDataReady.state()&&i.czr_wpQueryDataReady.resolve(e)}),i.previewer.bind("czr-partial-refresh-data",function(e){i.czr_partials=i.czr_partials||new i.Value,i.czr_partials.set(e)}),i.previewer.bind("czr-partial-refresh-done",function(e){if(r.has(e,"set_id")){var t=i.CZR_Helpers.build_setId(e.set_id);if(i.has(t)){var n=i.CZR_Helpers.getControlSettingId(t);i.control.has(n)&&i.control(n).trigger("czr-partial-refresh-done")}}})})}(wp.customize,jQuery,_);var CZRInputMths=CZRInputMths||{};!function(r,o,a){o.extend(CZRInputMths,{initialize:function(e,t){if(a.isUndefined(t.input_parent)||a.isEmpty(t.input_parent))throw new Error("No input_parent assigned to input "+t.id+". Aborting");if(a.isUndefined(t.module))throw new Error("No module assigned to input "+t.id+". Aborting");r.Value.prototype.initialize.call(this,null,t);var n=this;o.extend(n,t||{}),n.constructorOptions=o.extend(!0,{},t),n.isReady=o.Deferred(),a.isUndefined(t.input_value)||n.set(t.input_value);if(n.input_event_map=[{trigger:o.trim(["change",{text:"keyup",textarea:"keyup",password:"keyup",color:"colorpickerchange",range:"input propertychange"}[n.type]||""].join(" ")),selector:"input[data-czrtype], select[data-czrtype], textarea[data-czrtype]",name:"set_input_value",actions:function(e){if(!a.has(n.input_parent,"syncElements")||!a.has(n.input_parent.syncElements,n.id))throw new Error("WARNING : THE INPUT "+n.id+" HAS NO SYNCED ELEMENT.")}}],r.czrInputMap&&a.has(r.czrInputMap,n.type)){var i=r.czrInputMap[n.type];if(a.isFunction(n[i]))try{n[i](t.input_options||null)}catch(e){r.errare("Error in input init => for input id :"+n.id+" in module type : "+n.module.module_type,e)}else if(a.isFunction(r.czrInputMap[n.type]))try{r.czrInputMap[n.type].apply(n,[t.input_options||null])}catch(e){r.errare("Error in input init => for input id :"+n.id+" in module type : "+n.module.module_type,e)}}else r.errare("Warning the input : "+n.id+" with type "+n.type+" has no corresponding method defined in api.czrInputMap.");n.visible=new r.Value(!0),n.isReady.done(function(){n.visible.bind(function(e){e?n.container.stop(!0,!0).slideDown(200):n.container.stop(!0,!0).slideUp(200)})}),n.enabled=new r.Value(!0),n.isReady.done(function(){n.enabled.bind(function(e){n.container.toggleClass("disabled",!e)})})},ready:function(){var e=this;e.setupDOMListeners(e.input_event_map,{dom_el:e.container},e),e.callbacks.add(function(){return e.inputReact.apply(e,arguments)}),o.when(e.setupSynchronizer()).done(function(){e.isReady.resolve(e)})},setupSynchronizer:function(){var e=this,t=e.input_parent,n=e.container.find("[data-czrtype]"),i=(e.container.find("[data-czrtype]").is("textarea"),new r.Element(n));t.syncElements=t.syncElements||{},(t.syncElements[e.id]=i).sync(e),i.set(e())},inputReact:function(e,t,n){var i=this,r=i.input_parent(),o=a.clone(r),s=i.is_preItemInput;i.enabled()&&((o=!a.isObject(o)||a.isEmpty(o)?{}:o)[i.id]=e,i.input_parent.set(o,{input_changed:i.id,input_value:i(),input_transport:i.transport,not_preview_sent:"postMessage"===i.transport,inputRegistrationParams:i.constructorOptions}),s||(i.input_parent.trigger(i.id+":changed",e),a.isEmpty(t)&&(a.isUndefined(t)||"postMessage"!==i.transport)||i.module.sendInputToPreview({input_id:i.id,input_parent_id:i.input_parent.id,to:e,from:t})))},setupColorPicker:function(){this.container.find("input").iris({palettes:!0,hide:!1,change:function(e,t){o(this).val(t.color.toString()).trigger("colorpickerchange").trigger("change")}})},setupColorPickerAlpha:function(){var n=this;n.container.find("input").wpColorPicker({palettes:!0,width:1440<=window.innerWidth?271:251,change:function(e,t){o(this).val(t.color.toString()).trigger("colorpickerchange").trigger("change")},clear:function(e,t){n("")}})},setupSelect:function(){o("select",this.container).not(".no-selecter-js").each(function(){o(this).selecter({})})},setupIcheck:function(e){o("input[type=checkbox]",this.container).each(function(e){0===o(this).closest('div[class^="icheckbox"]').length&&o(this).iCheck({checkboxClass:"icheckbox_flat-grey",checkedClass:"checked",radioClass:"iradio_flat-grey"}).on("ifChanged",function(e){o(this).val(!1===o(this).is(":checked")?0:1),o(e.currentTarget).trigger("change")})})},setupGutenCheck:function(e){var t=this.container.find("input[type=checkbox]"),n=o(".czr-toggle-check",this.container),i=function(){t.closest(".czr-toggle-check").toggleClass("is-checked",t.is(":checked")),n.find("svg").remove(),n.append(t.is(":checked")?'<svg class="czr-toggle-check__on" width="2" height="6" aria-hidden="true" role="img" focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2 6"><path d="M0 0h2v6H0z"></path></svg>':'<svg class="czr-toggle-check__off" width="6" height="6" aria-hidden="true" role="img" focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 6 6"><path d="M3 1.5c.8 0 1.5.7 1.5 1.5S3.8 4.5 3 4.5 1.5 3.8 1.5 3 2.2 1.5 3 1.5M3 0C1.3 0 0 1.3 0 3s1.3 3 3 3 3-1.3 3-3-1.3-3-3-3z"></path></svg>')};t.on("change",i),i()},setupRadio:function(e){o("input[type=radio]",this.container).each(function(e){0===o(this).closest('div[class^="icheckbox"]').length&&o(this).iCheck({checkboxClass:"icheckbox_flat-grey",checkedClass:"checked",radioClass:"iradio_flat-grey"}).on("ifChanged",function(e){o(e.currentTarget).trigger("change")})})},setupStepper:function(e){o('input[type="number"]',this.container).each(function(e){o(this).stepper()})},setupSimpleRange:function(){},setupRangeSlider:function(e){var n,i=this,r=function(e,t){var n=i.container.find("input").data("unit");e.textContent=t+(a.isEmpty(i.container.find("input").data("unit"))?"":n)};o(i.container).find("input").rangeslider({polyfill:!1,rangeClass:"rangeslider",disabledClass:"rangeslider--disabled",horizontalClass:"rangeslider--horizontal",verticalClass:"rangeslider--vertical",fillClass:"rangeslider__fill",handleClass:"rangeslider__handle",onInit:function(){n=o(".rangeslider__handle",this.$range),o(".rangeslider__handle",this.$range),r(n[0],this.value)},onSlide:function(e,t){r(n[0],t)}})},setupHAlignement:function(e){var t=this,n=o(".sek-h-align-wrapper",t.container);n.find('div[data-sek-align="'+t()+'"]').addClass("selected"),n.on("click","[data-sek-align]",function(e){e.preventDefault(),n.find(".selected").removeClass("selected"),o.when(o(this).addClass("selected")).done(function(){t(o(this).data("sek-align"))})})}})}(wp.customize,jQuery,_);CZRInputMths=CZRInputMths||{};!function(r,i,o){i.extend(CZRInputMths,{setupImageUploaderSaveAsId:function(){this.setupImageUploader()},setupImageUploaderSaveAsUrl:function(){this.setupImageUploader({save_as_url:!0})},setupImageUploader:function(e){var t=this,n=t();if(e=o.extend({save_as_url:!1},e||{}),t.save_as_url=e.save_as_url,t.attachment={},!t.container)return this;t.tmplRendered=i.Deferred(),t.setupContentRendering(n,{}),t.tmplRendered.done(function(){t.czrImgUploaderBinding()}).fail(function(){r.errorLog("setupImageUploader => failed to fetch the template.")})},setupContentRendering:function(e,t){var n,i=this;i.attachment.id!=e&&t!==e?(o.isEmpty(e)?(i.attachment={},i.renderImageUploaderTemplate()):o.isNumber(e)||i.renderImageUploaderTemplate({fromUrl:!0,url:e}),n=wp.media.attachment(e),o.isObject(n)&&o.has(n,"attributes")&&o.has(n.attributes,"sizes")?(i.attachment=n.attributes,i.renderImageUploaderTemplate()):o.isNumber(e)&&wp.media.attachment(e).fetch().done(function(){i.attachment=this.attributes,i.renderImageUploaderTemplate()}).fail(function(){r.errorLog("renderImageUploaderTemplate => failed attempt to fetch an img with id : "+e)})):i.attachment.id&&i.attachment.id!==e||i.renderImageUploaderTemplate()},czrImgUploaderBinding:function(){var n=this;o.bindAll(n,"czrImgUploadRemoveFile","czrImgUploadOpenFrame","czrImgUploadSelect"),n.container.on("click keydown",".upload-button",n.czrImgUploadOpenFrame),n.container.on("click keydown",".thumbnail-image img",n.czrImgUploadOpenFrame),n.container.on("click keydown",".remove-button",n.czrImgUploadRemoveFile),n.bind(n.id+":changed",function(e,t){n.tmplRendered=i.Deferred(),n.setupContentRendering(e,t)})},czrImgUploadOpenFrame:function(e){r.utils.isKeydownButNotEnterEvent(e)||(e.preventDefault(),this.frame||this.czrImgUploadInitFrame(),this.frame.open())},czrImgUploadInitFrame:function(){var e=this.getUploaderLabels();this.frame=wp.media({button:{text:e.frame_button},states:[new wp.media.controller.Library({title:e.frame_title,library:wp.media.query({type:"image"}),multiple:!1,date:!1})]}),this.frame.on("select",this.czrImgUploadSelect)},czrImgUploadRemoveFile:function(e){r.utils.isKeydownButNotEnterEvent(e)||(e.preventDefault(),this.attachment={},this.set(""))},czrImgUploadSelect:function(){var e=this.frame.state().get("selection").first().toJSON();window._wpmejsSettings;this.attachment=e,this.set(this.save_as_url?e.url:e.id)},renderImageUploaderTemplate:function(e){var t=this;e=o.extend({fromUrl:!1,url:""},e||{});var n=t.container.find("."+t.module.control.css_attr.img_upload_container);if(n.length&&!(t.container.length<1)){var i={button_labels:t.getUploaderLabels(),settings:t.id,attachment:t.attachment,fromUrl:e.url,canUpload:!0};return r.CZR_Helpers.getModuleTmpl({tmpl:"img-uploader",module_type:"all_modules",module_id:t.module.id}).done(function(e){n.html(r.CZR_Helpers.parseTemplate(e)(i)),t.tmplRendered.resolve(),t.container.trigger(t.id+":content_rendered")}).fail(function(e){t.tmplRendered.reject("renderImageUploaderTemplate => Problem when fetching the tmpl from server for module : "+t.module.id)}),!0}},getUploaderLabels:function(){var e=serverControlParams.i18n,n=this,t={select:e.select_image,change:e.change_image,remove:e.remove_image,default:e.default_image,placeholder:e.placeholder_image,frame_title:e.frame_title_image,frame_button:e.frame_button_image},i={};return o.each(t,function(e,t){if(o.isEmpty(e))return r.errorLog("A translated string is missing ( "+t+" ) for the image uploader input in module : "+n.module.id),void(i[t]=t);i[t]=e}),i}})}(wp.customize,jQuery,_);CZRInputMths=CZRInputMths||{};!function(s,a,l){a.extend(CZRInputMths,{setupContentPicker:function(e){var r=this;a.extend(l.isObject(e)?e:{},{post:"",taxonomy:""}),r.wpObjectTypes=e,r.container.find(".czr-input").append('<select data-select-type="content-picker-select" class="js-example-basic-simple"></select>'),r.input_event_map=[{trigger:"change",selector:"select[data-select-type]",name:"set_input_value",actions:function(e){var t=a(e.dom_event.currentTarget,e.dom_el),n=a(t,e.dom_el).czrSelect2("data"),i={};n=l.isArray(n)?n[0]:n,l.isObject(n)&&!l.isEmpty(n)?(l.each({id:"",type_label:"",title:"",object_type:"",url:""},function(e,t){"_custom_"===n.id||l.has(n,t)&&!l.isEmpty(n[t])?i[t]=n[t]:s.errare("content_picker : missing input param : "+t)}),r.set(i)):s.errare("Content Picker Input : the picked value should be an object not empty.")}}],r.isReady.done(function(){r.setupContentSelecter()})},setupContentSelecter:function(){var o=this;if(!l.isEmpty(o())){var e={value:o().id||"",title:o().title||"",selected:"selected"};o.container.find("select").append(a("<option>",e))}o.currentAjaxAction=o.currentAjaxAction||new s.Value,o.currentAjaxAction.bind(function(e){o.defaultValueHasBeenPushed=!1}),o.container.find("select").on("czrSelect2:select czrSelect2:unselect czrSelect2:close czrSelect2:open",function(e){o.defaultValueHasBeenPushed=!1}),o.container.find("select").czrSelect2({placeholder:{id:"-1",title:"Select"},data:o.setupSelectedContents(),ajax:{url:wp.ajax.settings.url,type:"POST",dataType:"json",delay:250,debug:!0,data:function(e){var t=e.page?e.page:0;return t=e.term?e.page:t,o.currentAjaxAction(e.term?"search-available-content-items-customizer":"load-available-content-items-customizer"),{action:o.currentAjaxAction(),search:e.term,wp_customize:"on",page:t,wp_object_types:JSON.stringify(o.wpObjectTypes),nonce:s.settings.nonce.save}},processResults:function(e,t){var n={defaultOption:{id:"",title:"",type_label:"",object_type:"",url:""}};if(o.input_parent&&o.input_parent.module?o.input_parent.module.trigger("set_default_content_picker_options",{defaultContentPickerOption:n}):s.infoLog(' content_picker input => ::processResults => event "set_default_content_picker_option" not triggered when in pre-item'),!e.success)return s.errare("request failure in setupContentPicker => processResults",e),{results:n.defaultOption};var i=e.data.items,r=[];return i=l.isArray(i)?i:[],o.defaultValueHasBeenPushed=o.defaultValueHasBeenPushed||!1,"load-available-content-items-customizer"!==o.currentAjaxAction()||l.isEmpty(n.defaultOption)||n.defaultOption.id&&!o.defaultValueHasBeenPushed&&(r.push(n.defaultOption),o.defaultValueHasBeenPushed=!0),l.each(i,function(e){r.push({id:e.id,title:e.title,type_label:e.type_label,object_type:e.object,url:e.url})}),{results:r,pagination:{more:1<=i.length}}}},templateSelection:o.czrFormatContentSelected,templateResult:o.czrFormatContentSelected,escapeMarkup:function(e){return e}})},czrFormatContentSelected:function(e){if(e.loading)return e.text;var t="<div class='content-picker-item clearfix'><div class='content-item-bar'><span class='czr-picker-item-title'>"+e.title+"</span>";return e.type_label&&(t+="<span class='czr-picker-item-type'>"+e.type_label+"</span>"),t+="</div></div>"},setupSelectedContents:function(){return this()}})}(wp.customize,jQuery,_);CZRInputMths=CZRInputMths||{};!function(n,e,t){e.extend(CZRInputMths,{setupTinyMceEditor:function(){var t=this;if(!t.container)throw new Error("The input container is not set for WP text editor in module :"+t.module.id);t.input_parent.control.bind("tinyMceEditorUpdated",function(e){n.sekEditorSynchronizedInput().control_id==t.input_parent.control.id&&n.sekEditorSynchronizedInput().input_id==t.id&&(t(wp.editor.removep(e.html_content||n.sekTinyMceEditor.getContent())),e.modified_editor_element&&0<e.modified_editor_element.length?e.modified_editor_element.focus():n.sekTinyMceEditor.focus())})}})}(wp.customize,jQuery,_);var CZRItemMths=CZRItemMths||{};!function(r,o,s){o.extend(CZRItemMths,{initialize:function(e,t){if(s.isUndefined(t.module)||s.isEmpty(t.module))throw new Error("No module assigned to item "+e+". Aborting");var n=this;r.Value.prototype.initialize.call(n,null,t),n.isReady=o.Deferred(),n.embedded=o.Deferred(),n.container=null,n.contentContainer=null,n.czr_Input=new r.Values,n.inputCollection=new r.Value({}),n.viewState=new r.Value("closed"),n.removeDialogVisible=new r.Value(!1),o.extend(n,t||{}),n.defaultItemModel=s.clone(t.defaultItemModel)||{id:"",title:""};var i=o.extend(n.defaultItemModel,t.initial_item_model);i=n.validateItemModelOnInitialize(i),n.set(i),n.userEventMap=new r.Value([{trigger:"click keydown",selector:["."+n.module.control.css_attr.display_alert_btn,"."+n.module.control.css_attr.cancel_alert_btn].join(","),name:"toggle_remove_alert",actions:function(){var e=this.removeDialogVisible();this.module.closeRemoveDialogs(),this.removeDialogVisible(!e)}},{trigger:"click keydown",selector:"."+n.module.control.css_attr.remove_view_btn,name:"remove_item",actions:["removeItem"]},{trigger:"click keydown",selector:["."+n.module.control.css_attr.edit_view_btn,"."+n.module.control.css_attr.item_title].join(","),name:"edit_view",actions:["setViewVisibility"]},{trigger:"click keydown",selector:".tabs nav li",name:"tab_nav",actions:function(e){var t=o(e.dom_event.currentTarget,e.dom_el).data("tab-id");this.module.toggleTabVisibility.call(this,t),this.trigger("tab-switch",{id:t})}}]),n.isReady.done(function(){n.module.updateItemsCollection({item:n()}),n.callbacks.add(function(){return n.itemReact.apply(n,arguments)}),n.bind("contentRendered",function(){if(s.isEmpty(n.inputCollection()))if(serverControlParams.isDevMode)r.CZR_Helpers.setupInputCollectionFromDOM.call(n),n.module.setupTabNav.call(n);else try{r.CZR_Helpers.setupInputCollectionFromDOM.call(n),n.module.setupTabNav.call(n)}catch(e){r.errorLog("In item.isReady.done : "+e)}}),n.bind("contentRemoved",function(){s.has(n,"czr_Input")&&r.CZR_Helpers.removeInputCollection.call(n)}),n.canBeRendered()&&n.mayBeRenderItemWrapper(),n.embedded.done(function(){n.itemWrapperViewSetup(i)})})},ready:function(){this.isReady.resolve()},canBeRendered:function(){return!0},validateItemModelOnInitialize:function(e){return e},itemReact:function(e,t,n){var i=this,r=i.module;n=n||{},r.updateItemsCollection({item:e,params:n}).done(function(){i.writeItemViewTitle(e,n)})}})}(wp.customize,jQuery,_);CZRItemMths=CZRItemMths||{};!function(s,a,l){a.extend(CZRItemMths,{_sendItem:function(n,e){var t=this,i=t.module,r=[];l.each(e,function(e,t){e!=n[t]&&r.push(t)}),l.each(r,function(e){s.previewer.send("sub_setting",{set_id:i.control.id,id:n.id,changed_prop:e,value:n[e]}),i.trigger("item_sent",{item:n,dom_el:t.container,changed_prop:e})})},removeItem:function(e){var t=this,n=this.module,i=l.clone(n.itemCollection());n.trigger("pre_item_dom_remove",t()),t._destroyView(),i=l.without(i,l.findWhere(i,{id:t.id})),n.itemCollection.set(i),n.trigger("pre_item_api_remove",t());var r=a.extend(!0,{},t());if(n.czr_Item.remove(t.id),"postMessage"!=s(n.control.id).transport||!l.has(e,"dom_event")||l.has(e.dom_event,"isTrigger")||s.CZR_Helpers.hasPartRefresh(n.control.id))n.trigger("item-removed",r),n.control.trigger("item-removed",r);else{var o=function(){s.previewer.unbind("ready",o),n.trigger("item-removed",r)};s.previewer.bind("ready",o),s.previewer.refresh()}},getModel:function(e){return this()}})}(wp.customize,jQuery,_);CZRItemMths=CZRItemMths||{};!function(c,d,u){d.extend(CZRItemMths,{mayBeRenderItemWrapper:function(){var t=this;"pending"==t.embedded.state()&&(!u.isEmpty(t.container)&&0<t.container.length||d.when(t.renderItemWrapper()).done(function(e){if(t.container=e,u.isUndefined(t.container)||!t.container.length)throw new Error("In mayBeRenderItemWrapper the Item view has not been rendered : "+t.id);t.embedded.resolve()}))},renderItemWrapper:function(e){var t,n,i=this,r=i.module,o=d.Deferred(),s=d.extend(!0,{},e||i()),a=function(e){r.isMultiItem()&&(u.isEmpty(e)&&o.reject("renderItemWrapper => Missing html template for module : "+r.id),t.append(e)),t.append(d("<div/>",{class:r.control.css_attr.item_content})),o.resolve(t)};if(i.trigger("item-model-before-item-wrapper-template-injection",s),t=d("<li>",{class:r.control.css_attr.single_item,"data-id":s.id,id:s.id}),r.itemsWrapper.append(t),r.isMultiItem())if(u.isEmpty(r.rudItemPart)){var l={tmpl:"rud-item-part",module_type:"all_modules",module_id:r.id,control_id:r.control.id};i.trigger("item-wrapper-tmpl-params-before-fetching",l),u.isEmpty(r[l.tmpl])?c.CZR_Helpers.getModuleTmpl(l).done(function(e){a(c.CZR_Helpers.parseTemplate(e)({is_sortable:r.sortable}))}).fail(function(e){o.reject("renderItemWrapper => Problem when fetching the rud-item-part tmpl from server for module : "+r.id)}):(n=r.getTemplateSelectorPart(l.tmpl,s),d("#tmpl-"+n).length<1&&o.reject("Missing template for item "+i.id+". The provided template script has no been found : #tmpl-"+n),a(wp.template(n)(s)))}else n=r.getTemplateSelectorPart("rudItemPart",s),d("#tmpl-"+n).length<1&&o.reject("Missing template for item "+i.id+". The provided template script has no been found : #tmpl-"+n),a(wp.template(n)(s));else a();return o.promise()},itemWrapperViewSetup:function(e){var r=this,i=this.module;item_model=r()||r.initial_item_model,r.writeItemViewTitle();var o=function(e,t,n){if(u.isUndefined(e)||!1===e.length)throw new Error("Module : "+r.module.id+", the item content has not been rendered for "+r.id);r.contentContainer=e,r.trigger("contentRendered",{item_content:e}),r.toggleItemExpansion(t,r.module.isMultiItem()?150:0),r.cleanLoader()};r.module.isMultiItem()?r.viewState.callbacks.add(function(t,e){var n=-1!==t.indexOf("expanded");i.hasModOpt()&&n&&c.czr_ModOptVisible(!1,{module:i,focus:!1}),n?u.isObject(r.contentContainer)&&!1!==r.contentContainer.length?r.toggleItemExpansion(t):(r.printLoader(),r.renderItemContent(r()||r.initial_item_model).done(function(e){o(e,t)}).fail(function(e){c.errorLog("multi-item module => failed item.renderItemContent for module : "+i.id,e)})):r.toggleItemExpansion(t).done(function(){u.isObject(r.contentContainer)&&!1!==r.contentContainer.length&&(r.trigger("beforeContenRemoved"),d("."+i.control.css_attr.item_content,r.container).children().each(function(){d(this).remove()}),d("."+i.control.css_attr.item_content,r.container).html(""),r.contentContainer=null,r.trigger("contentRemoved"))})}):(r.viewState.callbacks.add(function(e,t){r.toggleItemExpansion.apply(r,[e,0])}),r.printLoader(),r.renderItemContent(item_model).done(function(e){o(e,!0)}).fail(function(e){c.errare("mono-item module => failed item.renderItemContent for module : "+i.id,e)})),c.CZR_Helpers.setupDOMListeners(r.userEventMap(),{model:item_model,dom_el:r.container},r),r.removeDialogVisible.bind(function(e){var t=r.module,n=d("."+t.control.css_attr.remove_alert_wrapper,r.container).first();if(e&&t.closeAllItems(),e&&t.hasModOpt()&&c.czr_ModOptVisible(!1,{module:t,focus:!1}),e&&u.has(t,"preItem")&&t.preItemExpanded(!1),d("."+t.control.css_attr.remove_alert_wrapper,r.container).not(n).each(function(){d(this).hasClass("open")&&d(this).slideToggle({duration:200,done:function(){d(this).toggleClass("open",!1),d(this).siblings().find("."+t.control.css_attr.display_alert_btn).toggleClass("active",!1)}})}),e)if(u.isEmpty(t.alertPart))c.CZR_Helpers.getModuleTmpl({tmpl:"rud-item-alert-part",module_type:"all_modules",module_id:t.id,control_id:t.control.id}).done(function(e){n.html(c.CZR_Helpers.parseTemplate(e)({title:r().title||r.id})),r.trigger("remove-dialog-rendered")}).fail(function(e){c.errare("item.removeDialogVisible => Problem when fetching the tmpl from server for module : "+t.id,e)});else{if(d("#tmpl-"+t.alertPart).length<1||u.isEmpty(r.container))return void c.errare("No removal alert template available for items in module :"+t.id);n.html(wp.template(t.alertPart)({title:r().title||r.id})),r.trigger("remove-dialog-rendered")}var i=function(e){n.toggleClass("open",e),r.container.find("."+t.control.css_attr.display_alert_btn).toggleClass("active",e),e&&t._adjustScrollExpandedBlock(r.container)};e?n.stop(!0,!0).slideDown(200,function(){i(e)}):n.stop(!0,!0).slideUp(200,function(){i(e)})})},renderItemContent:function(e){var n=this,i=this.module,r=d.Deferred(),t=d.extend(!0,{},e||n());n.trigger("item-model-before-item-content-template-injection",t);var o=function(e){u.isEmpty(e)&&r.reject("renderItemContent => Missing html template for module : "+i.id);var t=d("."+i.control.css_attr.item_content,n.container);d(e).appendTo(t),r.resolve(t)};if(!u.isEmpty(i.itemInputList)||u.isFunction(i.itemInputList)){var s=i.getTemplateSelectorPart("itemInputList",t);d("#tmpl-"+s).length<1?r.reject("renderItemContent => No itemInputList content template defined for module "+i.id+". The template script id should be : #tmpl-"+s):o(wp.template(s)(t))}else{var a={tmpl:"item-inputs",module_type:i.module_type,module_id:i.id,control_id:i.control.id,item_model:t};i.trigger("filter-request-params-before-fetching-for-item-content-tmpl",a),c.CZR_Helpers.getModuleTmpl(a).done(function(e){o(c.CZR_Helpers.parseTemplate(e)(d.extend(t,{control_id:i.control.id})))}).fail(function(e){r.reject(e)})}return r.promise()},writeItemViewTitle:function(e){var t=this,n=t.module,i=e||t(),r=u.has(i,"title")&&!u.isEmpty(i.title)?c.CZR_Helpers.capitalize(i.title):i.id;r=c.CZR_Helpers.truncate(r,20),d("."+n.control.css_attr.item_title,t.container).text(r),c.CZR_Helpers.doActions("after_writeViewTitle",t.container,i,t)},setViewVisibility:function(e,t){var n=this.module;t?this.viewState.set("expanded_noscroll"):(n.closeAllItems(this.id),u.has(n,"preItem")&&n.preItemExpanded.set(!1),this.viewState.set("expanded"==this._getViewState()?"closed":"expanded"))},_getViewState:function(){return-1==this.viewState().indexOf("expanded")?"closed":"expanded"},toggleItemExpansion:function(n,e){var t="closed"!=n,i=this,r=this.module,o=d("."+r.control.css_attr.item_content,i.container).first(),s=d.Deferred(),a=function(e){i.container.toggleClass("open",e),e&&r.closeRemoveDialogs();var t=o.siblings().find("."+r.control.css_attr.edit_view_btn);t.toggleClass("active",e),e?t.removeClass("fa-pencil-alt").addClass("fa-minus-square").attr("title",serverControlParams.i18n.close):t.removeClass("fa-minus-square").addClass("fa-pencil-alt").attr("title",serverControlParams.i18n.edit),"expanded"==n&&r._adjustScrollExpandedBlock(i.container),s.resolve()};return e=u.isUndefined(e)?150:e,t?o.stop(!0,!0).slideDown(e,function(){a(t)}):o.stop(!0,!0).slideUp(0,function(){a(t)}),s.promise()},_destroyView:function(e){this.container.fadeOut({duration:e||400,done:function(){d(this).remove()}})},printLoader:function(){var e=this;e.container.css({position:"relative"}).append(c.CZR_Helpers.css_loader_html).find(".czr-css-loader").fadeIn("fast"),clearTimeout(d.data(this,"_czr_loader_active_timer_")),d.data(this,"_czr_loader_active_timer_",setTimeout(function(){e.cleanLoader()},5e3))},cleanLoader:function(){this.container.css({"min-height":""}).find(".czr-css-loader").remove()}})}(wp.customize,jQuery,_);var CZRModOptMths=CZRModOptMths||{};!function(r,o,s){o.extend(CZRModOptMths,{initialize:function(e){if(s.isUndefined(e.module)||s.isEmpty(e.module))throw new Error("No module assigned to modOpt.");var t=this;r.Value.prototype.initialize.call(t,null,e),t.isReady=o.Deferred(),t.container=null,t.inputCollection=new r.Value({}),o.extend(t,e||{}),t.defaultModOptModel=s.clone(e.defaultModOptModel)||{is_mod_opt:!0};var n=o.extend(t.defaultModOptModel,e.initial_modOpt_model),i=t.module.control;t.set(n),t.isReady.done(function(){o("."+i.css_attr.edit_modopt_icon,i.container).length||o.when(i.container.find(".customize-control-title").first().append(o("<span/>",{class:[i.css_attr.edit_modopt_icon,"fas fa-cog"].join(" "),title:serverControlParams.i18n.Settings}))).done(function(){o("."+i.css_attr.edit_modopt_icon,i.container).fadeIn(400)}),r.CZR_Helpers.setupDOMListeners([{trigger:"click keydown",selector:"."+i.css_attr.edit_modopt_icon,name:"toggle_mod_option",actions:function(){r.czr_ModOptVisible(!r.czr_ModOptVisible(),{module:t.module,focus:!1})}}],{dom_el:i.container},t)})},ready:function(){this.isReady.resolve()}})}(wp.customize,jQuery,_);CZRModOptMths=CZRModOptMths||{};!function(o,s,a){s.extend(CZRModOptMths,{modOptWrapperViewSetup:function(e){var n=this,i=this.module,r=s.Deferred();return e=n()||n.initial_modOpt_model,n.renderModOptContent(e).done(function(e){if(a.isEmpty(e)||!(0<e.length))throw new Error("Module : "+n.module.id+", the modOpt content has not been rendered");var t;t=e,o.CZR_Helpers.setupDOMListeners([{trigger:"click keydown",selector:"."+i.control.css_attr.close_modopt_icon,name:"close_mod_option",actions:function(){o.czr_ModOptVisible(!1,{module:i,focus:!1})}},{trigger:"click keydown",selector:".tabs nav li",name:"tab_nav",actions:function(e){var t=s(e.dom_event.currentTarget,e.dom_el).data("tab-id");this.module.toggleTabVisibility.call(this,t),this.trigger("tab-switch",{id:t})}}],{dom_el:t},n),r.resolve(e)}).fail(function(e){o.errorLog("failed modOpt.renderModOptContent for module : "+i.id,e)}).then(function(){n.module.setupTabNav.call(n)}),r.promise()},renderModOptContent:function(t){var n=this.module,i=s.Deferred();t=t||this();var r=function(e){a.isEmpty(e)&&i.reject("renderModOptContent => Missing html template for module : "+n.id);var t="";try{t=[serverControlParams.i18n["Options for"],n.control.params.label].join(" ")}catch(e){o.errorLog("renderItemContent => Problem with ctrl label => "+e),t=serverControlParams.i18n.Settings}s("#widgets-left").after(s("<div/>",{class:n.control.css_attr.mod_opt_wrapper,html:[['<h2 class="mod-opt-title">',t,"</h2>"].join(""),'<span class="fas fa-times '+n.control.css_attr.close_modopt_icon+'" title="close"></span>'].join("")})),s("."+n.control.css_attr.mod_opt_wrapper).append(e),i.resolve(s("."+n.control.css_attr.mod_opt_wrapper))};if(a.isEmpty(n.itemPreAddEl))o.CZR_Helpers.getModuleTmpl({tmpl:"mod-opt",module_type:n.module_type,module_id:n.id,control_id:n.control.id}).done(function(e){r(o.CZR_Helpers.parseTemplate(e)(t))}).fail(function(e){i.reject("renderPreItemView => Problem when fetching the mod-opt tmpl from server for module : "+n.id)});else{var e=n.getTemplateSelectorPart("modOptInputList",t);s("#tmpl-"+e).length<1&&i.reject("renderModOptContent => No modOpt content template defined for module "+n.id+". The template script id should be : #tmpl-"+e),r(wp.template(e)(t))}return i.promise()},toggleModPanelView:function(e){var t=this.module,n=(t.control,s.Deferred());return t.control.container.toggleClass("czr-modopt-visible",e),s("body").toggleClass("czr-editing-modopt",e),a.delay(function(){n.resolve()},200),n.promise()}})}(wp.customize,jQuery,_);var CZRModuleMths=CZRModuleMths||{};!function(o,s,a){s.extend(CZRModuleMths,{initialize:function(e,t){if(a.isUndefined(t.control)||a.isEmpty(t.control))throw new Error("No control assigned to module "+e);var n=this;o.Value.prototype.initialize.call(this,null,t),n.isReady=s.Deferred(),s.extend(n,t||{}),s.extend(n,{crudModulePart:"",rudItemPart:"",ruItemPart:"",alertPart:"",itemInputList:"",modOptInputList:""}),n.embedded=s.Deferred(),n.itemsWrapper="",n.container=s(n.control.selector),n.renderModuleParts().done(function(e){if(!1===e.length)throw new Error("The items wrapper has not been rendered for module : "+n.id);n.itemsWrapper=e,n.embedded.resolve()}).fail(function(e){throw new Error(["initialize module => failed module.renderModuleParts() for module : ",n.id,e].join(" "))}),n.defaultAPImodOptModel={initial_modOpt_model:{},defaultModOptModel:{},control:{},module:{}},n.defaultModOptModel={},n.modOptConstructor=n.modOptConstructor||o.CZRModOpt,n.itemCollection=new o.Value([]),n.defaultAPIitemModel={id:"",initial_item_model:{},defaultItemModel:{},control:{},module:{},is_added_by_user:!1},n.defaultItemModel=o.czrModuleMap[n.module_type].defaultItemModel||{id:"",title:""},n.itemConstructor=n.itemConstructor||o.CZRItem,n.czr_Item=new o.Values,n.inputConstructor=n.inputConstructor||o.CZRInput,n.hasModOpt()&&(n.inputModOptConstructor=n.inputModOptConstructor||o.CZRInput),n.inputOptions={},n.isReady.done(function(){n.isDirty=new o.Value(t.dirty||!1),n.initializeModuleModel(t).done(function(e){n.set(e)}).fail(function(e){o.errare("Module : "+n.id+" initialize module model failed : ",e)}).always(function(e){n.callbacks.add(function(){return n.moduleReact.apply(n,arguments)}),n.control.isModuleRegistered(n.id)||n.control.updateModulesCollection({module:t,is_registered:!1}),n.bind("items-collection-populated",function(e){n.itemCollection.callbacks.add(function(){return n.itemCollectionReact.apply(n,arguments)}),!1!==n.sortable&&n._makeItemsSortable()}),n.populateSavedItemCollection(),n.hasModOpt()&&n.instantiateModOpt()})}),!0===o.czrModuleMap[n.module_type].ready_on_section_expanded&&(a.has(o,"czr_activeSectionId")&&n.control.section()==o.czr_activeSectionId()&&"resolved"!=n.isReady.state()&&n.embedded.then(function(){n.ready()}),o.section(n.control.section(),function(e){e.expanded.bind(function(e){"resolved"!=n.isReady.state()&&n.embedded.then(function(){n.ready()})})}));var i=o.czrModuleMap[n.module_type].ready_on_control_event;a.isUndefined(i)||o.control(n.control.id,function(e){e.container.on(i,function(e){"resolved"!=n.isReady.state()&&n.embedded.then(function(){n.ready()})})}),this.maybeAwakeAndBindSharedModOpt()},ready:function(){this.isReady.resolve()},initializeModuleModel:function(e){var t=s.Deferred();if(!this.isMultiItem()&&!this.isCrud()&&a.isEmpty(e.items)){var n=a.clone(this.defaultItemModel);e.items=[s.extend(n,{id:this.id})]}return t.resolve(e).promise()},itemCollectionReact:function(e,t,n){var i=this(),r=s.extend(!0,{},i);r.items=e,this.isDirty.set(!0),this.set(r,n||{})},filterItemsBeforeCoreApiSettingValue:function(e){return e},moduleReact:function(e,t,n){var i=this.control;a.size(t.items)==a.size(e.items)&&a.isEmpty(a.difference(e.items,t.items)),e.column_id,t.column_id;i.updateModulesCollection({module:s.extend(!0,{},e),data:n})},getModuleSection:function(){return this.section},isMultiItem:function(){return o.CZR_Helpers.isMultiItemModule(null,this)},isCrud:function(){return o.CZR_Helpers.isCrudModule(null,this)},hasModOpt:function(){return o.CZR_Helpers.hasModuleModOpt(null,this)},instantiateModOpt:function(){var o=this,e=o.prepareModOptForAPI(o().modOpt||{});o.czr_ModOpt=new o.modOptConstructor(e),o.czr_ModOpt.ready(),o.czr_ModOpt.callbacks.add(function(e,t,n){var i=o(),r=s.extend(!0,{},i);r.modOpt=e,o.isDirty(!0),o(r,n)})},prepareModOptForAPI:function(n){var i=this,r={};return n=a.isObject(n)?n:{},a.each(i.defaultAPImodOptModel,function(e,t){n[t];switch(t){case"initial_modOpt_model":a.each(i.getDefaultModOptModel(),function(e,t){a.has(n,t)||(n[t]=e)}),r[t]=n;break;case"defaultModOptModel":r[t]=a.clone(i.defaultModOptModel);break;case"control":r[t]=i.control;break;case"module":r[t]=i}}),r},getDefaultModOptModel:function(e){return s.extend(a.clone(this.defaultModOptModel),{is_mod_opt:!0})},sendInputToPreview:function(e){var t=this;e=a.extend({input_id:"",input_parent_id:"",to:null,from:null},e),a.isEqual(e.to,e.from)||(o.previewer.send("czr_input",{set_id:o.CZR_Helpers.getControlSettingId(t.control.id),module_id:t.id,module:{items:s.extend(!0,{},t().items),modOpt:t.hasModOpt()?s.extend(!0,{},t().modOpt):{}},input_parent_id:e.input_parent_id,input_id:e.input_id,value:e.to,isPartialRefresh:e.isPartialRefresh}),t.trigger("input_sent",{input:e.to,dom_el:t.container}))},sendModuleInputsToPreview:function(i){var r=this,t=function(){var n=this,e=s.extend(!0,{},n());e=a.omit(e,"id"),a.each(e,function(e,t){r.sendInputToPreview({input_id:t,input_parent_id:n.id,to:e,from:null,isPartialRefresh:i.isPartialRefresh})})};r.czr_Item.each(function(e){t.call(e)}),r.hasModOpt()&&t.call(r.czr_ModOpt)},maybeAwakeAndBindSharedModOpt:function(){a.isUndefined(o.czr_ModOptVisible)&&(o.czr_ModOptVisible=new o.Value(!1),o.czr_ModOptVisible.bind(function(t,e,n){if(n=n||{},a.isFunction(n.module)&&a.isFunction(n.module.czr_ModOpt)){var i=n.module.czr_ModOpt,r=n.module;t?(r.closeRemoveDialogs().closeAllItems(),i.modOptWrapperViewSetup(i()).done(function(e){i.container=e;try{o.CZR_Helpers.setupInputCollectionFromDOM.call(i).toggleModPanelView(t)}catch(e){o.consoleLog(e)}r&&n.focus&&a.delay(function(){!a.isNull(i.container)&&i.container.find('[data-tab-id="'+n.focus+'"] a').length&&i.container.find('[data-tab-id="'+n.focus+'"] a').trigger("click")},200)})):i.toggleModPanelView(t).done(function(){i.container&&0<i.container.length?s.when(i.container.remove()).done(function(){o.CZR_Helpers.removeInputCollection.call(i)}):o.CZR_Helpers.removeInputCollection.call(i),i.container=null})}else o.errare("moduleCtor::maybeAwakeAndBindSharedModOpt => api.czr_ModOptVisible.bind() => incorrect arguments",n)}))}})}(wp.customize,jQuery,_);CZRModuleMths=CZRModuleMths||{};!function(r,s,a){s.extend(CZRModuleMths,{populateSavedItemCollection:function(e){var t,i=this;a.isArray(e||i().items)?(t=s.extend(!0,[],e||i().items),a.each(t,function(e,t){if(a.has(e,"is_mod_opt"))throw new Error("populateSavedItemCollection => there should be no mod opt to instantiate here.")}),i.trigger("filterItemCandidatesBeforeInstantiation",t),a.each(t,function(t,e){var n=function(){var e=i.instantiateItem(t);a.isFunction(e)?e.ready():r.errare("populateSavedItemCollection => Could not instantiate item in module "+i.id,t)};if(serverControlParams.isDevMode)n();else try{n()}catch(e){r.errare("populateSavedItemCollection => "+e)}}),a.each(t,function(e){if(a.isObject(e)&&a.isUndefined(a.findWhere(i.itemCollection(),e.id)))throw new Error("populateSavedItemCollection => The saved items have not been properly populated in module : "+i.id)}),i.trigger("items-collection-populated")):r.errorLog("populateSavedItemCollection : The saved items collection must be an array in module :"+i.id)},instantiateItem:function(e,t){var n=this;if(e=a.isObject(e)?e:{},(e=n.validateItemBeforeAddition(e,t))&&!a.isNull(e))if(e=n.prepareItemForAPI(e),a.isObject(e)){if(e&&!a.isNull(e)){if(!a.has(e,"id"))throw new Error("CZRModule::instantiateItem() => an item has no id and could not be added in the collection of : "+this.id);if(n.czr_Item.has(e.id))throw new Error("CZRModule::instantiateItem() => the following item id "+e.id+" already exists in module.czr_Item() for module "+this.id);if(n.czr_Item.add(e.id,new n.itemConstructor(e.id,e)),!n.czr_Item.has(e.id))throw new Error("CZRModule::instantiateItem() => instantiation failed for item id "+e.id+" for module "+this.id);return n.czr_Item(e.id)}r.errare("CZRModule::instantiateItem() => item_candidate invalid in module "+n.id)}else r.errare("CZRModule::instantiateItem() => an item should be described by an object in module type : "+n.module_type,"module id : "+n.id);else r.errare("CZRModule::instantiateItem() => item_candidate did not pass validation in module "+n.id)},validateItemBeforeAddition:function(e,t){return e},prepareItemForAPI:function(i){var r=this,o={};return i=a.isObject(i)?i:{},a.each(r.defaultAPIitemModel,function(e,t){var n=i[t];switch(t){case"id":a.isEmpty(n)?o[t]=r.generateItemId(r.module_type):r.isItemRegistered(n)?r.generateItemId(n):o[t]=n;break;case"initial_item_model":a.each(r.getDefaultItemModel(),function(e,t){a.has(i,t)||(i[t]=e)}),o[t]=i;break;case"defaultItemModel":o[t]=a.clone(r.defaultItemModel);break;case"control":o[t]=r.control;break;case"module":o[t]=r;break;case"is_added_by_user":o[t]=!!a.isBoolean(n)&&n}}),a.has(o,"id")||(o.id=r.generateItemId(r.module_type)),o.initial_item_model.id=o.id,r.validateItemBeforeInstantiation(o)},validateItemBeforeInstantiation:function(e){return e},generateItemId:function(e,t,n){if(100<(n=n||1))throw new Error("Infinite loop when generating of a module id.");var i=this,r=e+"_"+(t=t||i._getNextItemKeyInCollection());if(!a.has(i,"itemCollection")||!a.isArray(i.itemCollection()))throw new Error("The item collection does not exist or is not properly set in module : "+i.id);return i.isItemRegistered(r)?(t++,n++,i.generateItemId(e,t,n)):r},_getNextItemKeyInCollection:function(){var e=this,t={},n=0;return a.isEmpty(e.itemCollection())||(t=a.isArray(e.itemCollection())&&1===a.size(e.itemCollection())?e.itemCollection()[0]:a.max(e.itemCollection(),function(e){return a.isNumber(e.id.replace(/[^\/\d]/g,""))?parseInt(e.id.replace(/[^\/\d]/g,""),10):0}),!a.isUndefined(t)&&a.isNumber(t.id.replace(/[^\/\d]/g,""))&&(n=parseInt(t.id.replace(/[^\/\d]/g,""),10)+1)),n},isItemRegistered:function(e){return!a.isUndefined(a.findWhere(this.itemCollection(),{id:e}))},updateItemsCollection:function(e){var t=this,n=t.itemCollection(),i=a.clone(n),r=s.Deferred();if(!a.has(e,"collection")){if(!a.has(e,"item"))throw new Error("updateItemsCollection, no item provided "+t.control.id+". Aborting");e=a.extend({params:{}},e);var o=a.clone(e.item);return a.each(t.defaultItemModel,function(e,t){if(!a.has(o,t))throw new Error('CZRModuleMths => updateItemsCollection : Missing property "'+t+'" for item candidate')}),a.findWhere(i,{id:o.id})?a.each(n,function(e,t){e.id==o.id&&(i[t]=o)}):i.push(o),t.itemCollection.set(i,e.params),r.resolve({collection:i,params:e.params}).promise()}t.itemCollection.set(e.collection)},_getSortedDOMItemCollection:function(){var n=a.clone(this.itemCollection()),i=[],e=s.Deferred();if(s("."+this.control.css_attr.single_item,this.container).each(function(e){var t=a.findWhere(n,{id:s(this).attr("data-id")});t&&(i[e]=t)}),n.length!=i.length)throw new Error("There was a problem when re-building the item collection from the DOM in module : "+this.id);return e.resolve(i).promise()},refreshItemCollection:function(){var t=this;t.czr_Item.each(function(e){t.czr_Item(e.id).container&&0<t.czr_Item(e.id).container.length&&s.when(t.czr_Item(e.id).container.remove()).done(function(){t.czr_Item.remove(e.id)})}),t.itemCollection=new r.Value([]),t.populateSavedItemCollection()}})}(wp.customize,jQuery,_);CZRModuleMths=CZRModuleMths||{};!function(e,o,s){o.extend(CZRModuleMths,{getDefaultItemModel:function(e){return o.extend(s.clone(this.defaultItemModel),{id:e||""})},_initNewItem:function(e,t){var n,i=this,r={id:""};return t=void 0!==t?t:s.size(i.itemCollection()),s.isNumber(t)?n=i.module_type+"_"+t:(n=t,t=0),r=e&&!s.isEmpty(e)?o.extend(e,{id:n}):this.getDefaultItemModel(n),s.has(r,"id")&&i._isItemIdPossible(n)?(s.map(i.getDefaultItemModel(),function(e,t){s.has(r,t)||(r[t]=e)}),r):i._initNewItem(r,t+1)}})}(wp.customize,jQuery,_);CZRModuleMths=CZRModuleMths||{};!function(o,s,a){s.extend(CZRModuleMths,{renderModuleParts:function(){var n=this,i=s(n.container),r=s.Deferred(),t=function(e){n.isCrud()&&(a.isEmpty(e)&&r.reject("renderModuleParts => Missing html template for module : "+n.id),i.append(e));var t=s("<ul/>",{class:[n.control.css_attr.items_wrapper,n.module_type,n.isMultiItem()?"multi-item-mod":"mono-item-mod",n.isCrud()?"crud-mod":"not-crud-mod"].join(" ")});i.append(t),r.resolve(s(t,i))};return n.isCrud()?a.isEmpty(n.crudModulePart)?o.CZR_Helpers.getModuleTmpl({tmpl:"crud-module-part",module_type:"all_modules",module_id:n.id,control_id:n.control.id}).done(function(e){t(o.CZR_Helpers.parseTemplate(e)({}))}).fail(function(e){o.errare("renderModuleParts => fail response =>",e),r.reject("renderModuleParts => Problem when fetching the crud-module-part tmpl from server for module : "+n.id)}):(s("#tmpl-"+n.crudModulePart).length<1&&r.reject("renderModuleParts => no crud Module Part template for module "+n.id+". The template script id should be : #tmpl-"+n.crudModulePart),t(wp.template(n.crudModulePart)({}))):t(),r.promise()},getTemplateSelectorPart:function(e,t){var n,i=this;switch(e){case"rudItemPart":n=i.rudItemPart;break;case"ruItemPart":n=i.ruItemPart;break;case"modOptInputList":n=i.modOptInputList;break;case"itemInputList":n=a.isFunction(i.itemInputList)?i.itemInputList(t):i.itemInputList}if(a.isEmpty(n))throw new Error("No valid template has been found in getTemplateSelectorPart() "+i.id+". Aborting");return n},getViewEl:function(e){return s('[data-id = "'+e+'"]',this.container)},closeAllItems:function(t){var n=this,e=a.clone(n.itemCollection()),i=a.filter(e,function(e){return e.id!=t});return a.each(i,function(e){n.czr_Item.has(e.id)&&"expanded"==n.czr_Item(e.id)._getViewState(e.id)&&n.czr_Item(e.id).viewState.set("closed")}),this},_adjustScrollExpandedBlock:function(e,t){if(e.length&&!a.isUndefined(this.getModuleSection())){var n,i=s(".accordion-section-content",this.section.container),r=i.scrollTop(),o=t||90;setTimeout(function(){e.offset().top+e.height()+o>s(window.top).height()&&0<(n=e.offset().top+e.height()+o-s(window.top).height())&&i.animate({scrollTop:r+n},500)},50)}},closeRemoveDialogs:function(){if(a.isArray(this.itemCollection()))return this.czr_Item.each(function(e){e.removeDialogVisible(!1)}),this},_makeItemsSortable:function(e){if(!wp.media.isTouchDevice&&s.fn.sortable){var n=this;s("."+n.control.css_attr.items_wrapper,n.container).sortable({handle:"."+n.control.css_attr.item_sort_handle,start:function(){},update:function(e,t){n._getSortedDOMItemCollection().done(function(e){n.itemCollection.set(e)}).then(function(){!function(){a.has(n,"preItem")&&n.preItemExpanded.set(!1),n.closeAllItems().closeRemoveDialogs();var e=function(){o.previewer.refresh()};"postMessage"!=o(n.control.id).transport||o.CZR_Helpers.hasPartRefresh(n.control.id)||(e=a.debounce(e,500))(),n.trigger("item-collection-sorted")}()})}})}},toggleTabVisibility:function(e){var t=this;s(t.container).find("li"),s(t.container).find("section");s(".tabs nav li",t.container).each(function(){s(this).removeClass("tab-current").addClass("tab-inactive")}),s(t.container).find('li[data-tab-id="'+e+'"]').addClass("tab-current").removeClass("tab-inactive"),s("section",t.container).each(function(){s(this).removeClass("content-current")}),s(t.container).find('section[id="'+e+'"]').addClass("content-current")},setupTabNav:function(){var i=this;setTimeout(function(){(function(){var e=s.Deferred(),t=s(".tabs nav li",i.container);t.each(function(){s(this).removeClass("tab-current").addClass("tab-inactive")}),t.first().addClass("tab-current").removeClass("tab-inactive"),s("section",i.container).first().addClass("content-current");var n=t.length;return t.each(function(){s(this).addClass(0<n?"cols-"+n:"")}),e.resolve().promise()})().done(function(){s(".tabs",i.container).show()})},20)}})}(wp.customize,jQuery,_);var CZRDynModuleMths=CZRDynModuleMths||{};!function(s,a,l){a.extend(CZRDynModuleMths,{initialize:function(e,t){var n=this;s.CZRModule.prototype.initialize.call(n,e,t),a.extend(n,{itemPreAddEl:""}),n.preItemsWrapper="",n.preItemExpanded=new s.Value(!1),n.itemAddedMessage=serverControlParams.i18n.successMessage;var i=function(e){n.addItem(e).done(function(e){n.czr_Item(e,function(e){e.embedded.then(function(){e.viewState("expanded")})})}).fail(function(e){s.errare("module.addItem failed on add_item",e)})};n.userEventMap=new s.Value([{trigger:"click keydown",selector:["."+n.control.css_attr.open_pre_add_btn,"."+n.control.css_attr.cancel_pre_add_btn].join(","),name:"pre_add_item",actions:["closeAllItems","closeRemoveDialogs",function(e){var t={addTheItem:!0};this.trigger("is-item-addition-possible",t),t.addTheItem&&this.hasPreItem?this.preItemExpanded.set(!this.preItemExpanded()):i(e)}]},{trigger:"click keydown",selector:"."+n.control.css_attr.add_new_btn,name:"add_item",actions:function(e){n.closeRemoveDialogs(e).closeAllItems(e),i(e)}}])},ready:function(){var t=this;t.setupDOMListeners(t.userEventMap(),{dom_el:t.container}),t.preItem=new s.Value(t.getDefaultItemModel()),t.preItemExpanded.callbacks.add(function(e){e?t.renderPreItemView().done(function(e){t.preItemsWrapper=e,t.preItem(t.getDefaultItemModel()),t.trigger("before-pre-item-input-collection-setup"),t.setupPreItemInputCollection()}).fail(function(e){s.errorLog("Pre-Item : "+e)}):a.when(t.preItemsWrapper.remove()).done(function(){t.preItem.czr_Input={},t.preItemsWrapper=null,t.trigger("pre-item-input-collection-destroyed")}),t._togglePreItemViewExpansion(e)}),s.CZRModule.prototype.ready.call(t)},setupPreItemInputCollection:function(){var n=this;n.preItem.czr_Input=new s.Values,a("."+n.control.css_attr.pre_add_wrapper,n.container).find("."+n.control.css_attr.sub_set_wrapper).each(function(e){var t=a(this).find("[data-czrtype]").attr("data-czrtype")||"sub_set_"+e;n.preItem.czr_Input.add(t,new n.inputConstructor(t,{id:t,type:a(this).attr("data-input-type"),container:a(this),input_parent:n.preItem,module:n,is_preItemInput:!0})),n.preItem.czr_Input(t).ready()}),n.trigger("pre-item-input-collection-ready")},itemCanBeInstantiated:function(){return!0},addItem:function(n){var t=a.Deferred();if(!this.itemCanBeInstantiated())return t.reject().promise();var i=this,r=i.preItem(),o=function(){i.preItemExpanded.set(!1)};if(l.isEmpty(r)||!l.isObject(r))return s.errorLog("addItem : an item_candidate should be an object and not empty. In : "+i.id+". Aborted."),t.reject().promise();o=l.debounce(o,200);var e=function(){var e=i.instantiateItem(r,!0);return l.isFunction(e)?e.ready():s.errare("populateSavedItemCollection => Could not instantiate item in module "+i.id,r),e};if(serverControlParams.isDevMode)e();else try{e()}catch(e){return s.errare("populateSavedItemCollection : "+e),t.reject().promise()}return i.czr_Item.has(r.id)?(a.Deferred(function(){var t=this;i.czr_Item(r.id).isReady.then(function(){o(),i.trigger("item-added",r);var e=function(){s.previewer.unbind("ready",e),t.resolve()};i.refresh_on_add_item?"postMessage"!=s(i.control.id).transport||!l.has(n,"dom_event")||l.has(n.dom_event,"isTrigger")||s.CZR_Helpers.hasPartRefresh(i.control.id)?t.resolve():(s.previewer.bind("ready",e),s.previewer.refresh()):t.resolve()})}).always(function(){t.resolve(r.id)}),t.promise()):t.reject("populateSavedItemCollection : the item "+r.id+" has not been instantiated in module "+i.id).promise()}})}(wp.customize,jQuery,_);CZRDynModuleMths=CZRDynModuleMths||{};!function(r,o,s){o.extend(CZRDynModuleMths,{renderPreItemView:function(e){var n=this,i=o.Deferred();if(s.isObject(n.preItemsWrapper)&&0<n.preItemsWrapper.length)return i.resolve(n.preItemsWrapper).promise();var t=function(e){!s.isEmpty(e)&&n.container||i.reject("renderPreItemView => Missing html template for module : "+n.id);var t=o("."+n.control.css_attr.pre_add_item_content,n.container);t.prepend(o("<div>",{class:"pre-item-wrapper"})),t.find(".pre-item-wrapper").append(e),i.resolve(t.find(".pre-item-wrapper")).promise()};return s.isEmpty(n.itemPreAddEl)?r.CZR_Helpers.getModuleTmpl({tmpl:"pre-item",module_type:n.module_type,module_id:n.id,control_id:n.control.id}).done(function(e){t(r.CZR_Helpers.parseTemplate(e)())}).fail(function(e){i.reject(["renderPreItemView for module : ",n.id,e].join(" "))}):(o("#tmpl-"+n.itemPreAddEl).length<1&&i.reject("renderPreItemView => Missing itemPreAddEl or template in module "+n.id),t(wp.template(n.itemPreAddEl)())),i.promise()},_getPreItemView:function(){return o("."+this.control.css_attr.pre_add_item_content,this.container)},_togglePreItemViewExpansion:function(t){var n=this;o("."+n.control.css_attr.pre_add_item_content,n.container).slideToggle({duration:200,done:function(){var e=o("."+n.control.css_attr.open_pre_add_btn,n.container);o(this).toggleClass("open",t),t?e.find(".fas").removeClass("fa-plus-square").addClass("fa-minus-square"):e.find(".fas").removeClass("fa-minus-square").addClass("fa-plus-square"),e.toggleClass("active",t),o(n.container).toggleClass(n.control.css_attr.adding_new,t),n._adjustScrollExpandedBlock(o(this),120)}})},toggleSuccessMessage:function(e){var t=this,n=t.itemAddedMessage,i=o("."+t.control.css_attr.pre_add_wrapper,t.container);return $_success_wrapper=o("."+t.control.css_attr.pre_add_success,t.container),"on"==e?($_success_wrapper.find("p").text(n),$_success_wrapper.css("z-index",1000001).css("height",i.height()+"px").css("line-height",i.height()+"px")):$_success_wrapper.attr("style",""),t.container.toggleClass("czr-model-added","on"==e),this}})}(wp.customize,jQuery,_);var CZRBaseControlMths=CZRBaseControlMths||{};!function(i,e,r){e.extend(CZRBaseControlMths,{initialize:function(e,t){var n=this;n.css_attr=r.has(serverControlParams,"css_attr")?serverControlParams.css_attr:{},i.Control.prototype.initialize.call(n,e,t),n.bind("czr-partial-refresh-done",function(){r.has(n,"czr_moduleCollection")&&r.each(n.czr_moduleCollection(),function(e){n.czr_Module(e.id)&&n.czr_Module(e.id).sendModuleInputsToPreview({isPartialRefresh:!0})})})},refreshPreview:function(e){this.previewer.refresh()}})}(wp.customize,jQuery,_);var CZRBaseModuleControlMths=CZRBaseModuleControlMths||{};!function(l,c,d){c.extend(CZRBaseModuleControlMths,{initialize:function(e,t){var n=this;if(!l.has(e))throw new Error("Missing a registered setting for control : "+e);n.czr_Module=new l.Values,n.czr_moduleCollection=new l.Value,n.czr_moduleCollection.set([]),n.moduleCollectionReady=c.Deferred(),n.moduleCollectionReady.done(function(e){n.czr_moduleCollection.callbacks.add(function(){return n.moduleCollectionReact.apply(n,arguments)})}),l.CZRBaseControl.prototype.initialize.call(n,e,t),l.section(n.section(),function(e){e.expanded.bind(function(e){n.czr_Module.each(function(e){e.closeAllItems().closeRemoveDialogs(),d.has(e,"preItem")&&e.preItemExpanded(!1)})})})},ready:function(){var n=this,i={};try{n.getSavedModules()}catch(e){return l.errare("api.CZRBaseControl::ready() => error on control.getSavedModules()",e),void n.moduleCollectionReady.reject()}d.each(n.getSavedModules(),function(t,e){if(i=t,serverControlParams.isDevMode)n.instantiateModule(t,{});else try{n.instantiateModule(t,{})}catch(e){return void l.errare("api.CZRBaseControl::Failed to instantiate module "+t.id,e)}n.container.attr("data-module",t.id)}),n.moduleCollectionReady.resolve(i)},getDefaultModuleApiModel:function(){return{id:"",module_type:"",modOpt:{},items:[],crud:!1,hasPreItem:!0,refresh_on_add_item:!0,multi_item:!1,sortable:!1,control:{},section:""}},getSavedModules:function(){var n=this,e=[],i=n.params.module_type,r=[],o=[],s={};l.CZR_Helpers.isMultiItemModule(i)||d.isEmpty(l(n.id)())||d.isObject(l(n.id)())||l.errare("api.CZRBaseControl::getSavedModules => module Control Init for "+n.id+" : a mono item module control value should be an object if not empty.");var t=l.CZR_Helpers.getControlSettingId(n.id),a=l(t)();return r=d.isEmpty(a)?[]:d.isArray(a)?a:[a],d.each(r,function(e,t){d.isObject(e)?(d.isEmpty(e)||d.each(e,function(e,t){d.isString(t)||l.errare("api.CZRBaseControl::::getSavedModules => item not well formed in control : "+n.id+" => module type => "+n.params.module_type,r)}),l.CZR_Helpers.hasModuleModOpt(i)&&0===t&&(d.has(e,"id")?l.errare("api.CZRBaseControl::getSavedModules : the module "+i+" in control "+n.id+" has no mod_opt defined while it should."):s=e),d.has(e,"is_mod_opt")||o.push(e)):l.errare("api.CZRBaseControl::::getSavedModules => an item must be an object in control "+n.id+" => module type => "+n.params.module_type,r)}),e.push({id:l.CZR_Helpers.getOptionName(n.id)+"_"+n.params.type,module_type:n.params.module_type,section:n.section(),modOpt:c.extend(!0,{},s),items:c.extend(!0,[],o)}),e},isModuleRegistered:function(e){return!d.isUndefined(d.findWhere(this.czr_moduleCollection(),{id:e}))}})}(wp.customize,jQuery,_);CZRBaseModuleControlMths=CZRBaseModuleControlMths||{};!function(s,e,a){e.extend(CZRBaseModuleControlMths,{instantiateModule:function(e,t){if(!a.has(e,"id"))throw new Error("CZRModule::instantiateModule() : a module has no id and could not be added in the collection of : "+this.id+". Aborted.");var n=this;if((a.isUndefined(t)||a.isEmpty(t))&&(t=n.getModuleConstructor(e)),!a.isEmpty(e.id)&&n.czr_Module.has(e.id))throw new Error("The module id already exists in the collection in control : "+n.id);var i=n.prepareModuleForAPI(e);if(n.czr_Module.add(i.id,new t(i.id,i)),!n.czr_Module.has(i.id))throw new Error("instantiateModule() : instantiation failed for module id "+i.id+" in control "+n.id);return n.czr_Module(i.id)},getModuleConstructor:function(e){var t;if(!a.has(e,"module_type"))throw new Error("CZRModule::getModuleConstructor : no module type found for module "+e.id);if(!a.has(s.czrModuleMap,e.module_type))throw new Error("Module type "+e.module_type+" is not listed in the module map api.czrModuleMap.");var n=s.czrModuleMap[e.module_type].mthds;if(t=(s.czrModuleMap[e.module_type].crud?s.CZRDynModule:s.CZRModule).extend(n),a.isUndefined(t)||a.isEmpty(t)||!t)throw new Error("CZRModule::getModuleConstructor : no constructor found for module type : "+e.module_type+".");return t},prepareModuleForAPI:function(i){if(!a.isObject(i))throw new Error("prepareModuleForAPI : a module must be an object to be instantiated.");var r=this,o={};return a.each(r.getDefaultModuleApiModel(),function(e,t){var n=i[t];switch(t){case"id":a.isEmpty(n)?o[t]=r.generateModuleId(i.module_type):o[t]=n;break;case"module_type":if(!a.isString(n)||a.isEmpty(n))throw new Error("prepareModuleForAPI : a module type must a string not empty");o[t]=n;break;case"items":if(!a.isArray(n))throw new Error("prepareModuleForAPI : a module item list must be an array");o[t]=n;break;case"modOpt":if(!a.isObject(n))throw new Error("prepareModuleForAPI : a module modOpt property must be an object");o[t]=n;break;case"crud":if(a.has(s.czrModuleMap,i.module_type))n=s.czrModuleMap[i.module_type].crud,a.isUndefined(n)&&(n=e);else if(!a.isUndefined(n)&&!a.isBoolean(n))throw new Error('prepareModuleForAPI : the module param "crud" must be a boolean');o[t]=n||!1;break;case"hasPreItem":if(a.has(s.czrModuleMap,i.module_type))n=s.czrModuleMap[i.module_type].hasPreItem,a.isUndefined(n)&&(n=e);else if(!a.isUndefined(n)&&!a.isBoolean(n))throw new Error('prepareModuleForAPI : the module param "hasPreItem" must be a boolean');o[t]=n||!1;break;case"refresh_on_add_item":if(a.has(s.czrModuleMap,i.module_type))n=s.czrModuleMap[i.module_type].refresh_on_add_item,a.isUndefined(n)&&(n=e);else if(!a.isUndefined(n)&&!a.isBoolean(n))throw new Error('prepareModuleForAPI : the module param "refresh_on_add_item" must be a boolean');o[t]=n||!1;break;case"multi_item":if(a.has(s.czrModuleMap,i.module_type))n=s.czrModuleMap[i.module_type].multi_item,a.isUndefined(n)&&(n=s.czrModuleMap[i.module_type].crud);else if(!a.isUndefined(n)&&!a.isBoolean(n))throw new Error('prepareModuleForAPI : the module param "multi_item" must be a boolean');o[t]=n||!1;break;case"sortable":if(a.has(s.czrModuleMap,i.module_type))n=s.czrModuleMap[i.module_type].sortable,a.isUndefined(n)&&(n=s.czrModuleMap[i.module_type].crud),a.isUndefined(n)&&(n=s.czrModuleMap[i.module_type].multi_item);else if(!a.isUndefined(n)&&!a.isBoolean(n))throw new Error('prepareModuleForAPI : the module param "sortable" must be a boolean');o[t]=n||!1;break;case"control":o[t]=r;break;case"section":if(!a.isString(n)||a.isEmpty(n))throw new Error("prepareModuleForAPI : a module section must be a string not empty");o[t]=n;break;case"dirty":o[t]=n||!1}}),o},generateModuleId:function(e,t,n){if(100<(n=n||1))throw new Error("Infinite loop when generating of a module id.");var i=this,r=e+"_"+(t=t||i._getNextModuleKeyInCollection());if(!a.has(i,"czr_moduleCollection")||!a.isArray(i.czr_moduleCollection()))throw new Error("The module collection does not exist or is not properly set in control : "+i.id);return i.isModuleRegistered(r)?(t++,n++,i.generateModuleId(e,t,n)):r},_getNextModuleKeyInCollection:function(){var e={},t=0;return a.isEmpty(this.czr_moduleCollection())||(e=a.max(this.czr_moduleCollection(),function(e){return parseInt(e.id.replace(/[^\/\d]/g,""),10)}),t=parseInt(e.id.replace(/[^\/\d]/g,""),10)+1),t}})}(wp.customize,jQuery,_);CZRBaseModuleControlMths=CZRBaseModuleControlMths||{};!function(s,a,l){a.extend(CZRBaseModuleControlMths,{updateModulesCollection:function(e){var t=this,n=t.czr_moduleCollection(),i=a.extend(!0,[],n);if(l.has(e,"collection"))t.czr_moduleCollection.set(e.collection,e.data||{});else{if(!l.has(e,"module"))throw new Error("updateModulesCollection, no module provided "+t.id+". Aborting");var r=t.prepareModuleForAPI(l.clone(e.module));l.findWhere(i,{id:r.id})?l.each(n,function(e,t){e.id==r.id&&(i[t]=r)}):i.push(r);var o={};l.has(e,"data")&&(o=a.extend(!0,{},e.data),a.extend(o,{module:r})),t.czr_moduleCollection.set(i,o)}},moduleCollectionReact:function(t,e,n){var i=l.size(t)>l.size(e),r=l.size(e)>l.size(t);l.size(e),l.size(t);if(is_collection_sorted=!1,r){var o=l.filter(e,function(e){return l.isUndefined(l.findWhere(t,{id:e.id}))});o=o[0],this.czr_Module.remove(o.id)}if(l.isObject(n)&&l.has(n,"module")&&(n.module_id=n.module.id,n.moduleRegistrationParams=n.module,n.module=this.prepareModuleForDB(a.extend(!0,{},n.module))),!i)if(serverControlParams.isDevMode)s(this.id).set(this.filterModuleCollectionBeforeAjax(t),n);else try{s(this.id).set(this.filterModuleCollectionBeforeAjax(t),n)}catch(e){s.errare("api.CZRBaseControl::moduleCollectionReact => error when firing control.filterModuleCollectionBeforeAjax( to )",e)}},filterModuleCollectionBeforeAjax:function(e){var t,i=this,n=a.extend(!0,[],e),r=[];if(l.each(n,function(e,t){var n=a.extend(!0,{},e);r[t]=i.prepareModuleForDB(n)}),1<l.size(n))throw new Error("There should not be several modules in the collection of control : "+i.id);if(!l.isArray(n)||l.isEmpty(n)||!l.has(n[0],"items"))throw new Error("The setting value could not be populated in control : "+i.id);var o=n[0].id;if(!i.czr_Module.has(o))throw new Error("The single module control ("+i.id+") has no module registered with the id "+o);var s=i.czr_Module(o);if(!l.isArray(s().items))throw new Error("The module "+o+" should be an array in control : "+i.id);return t=s.isMultiItem()?s().items:s().items[0]||[],t=s.filterItemsBeforeCoreApiSettingValue(t),s.hasModOpt()?l.union([s().modOpt],t):t},prepareModuleForDB:function(e){if(!l.isObject(e))throw new Error("::prepareModuleForDB : a module must be an object.");var t={};if(!l.isArray(e.items))throw new Error("::prepareModuleForDB : a module item list must be an array");return l.each(e.items,function(e){if(!l.isObject(e))throw new Error("::prepareModuleForDB : a module item must be an object")}),t.items=e.items,t}})}(wp.customize,jQuery,_),function(e,t,n){t.extend(CZRBaseControlMths,e.Events),t.extend(e.Control.prototype,e.Events),t.extend(CZRModuleMths,e.Events),t.extend(CZRItemMths,e.Events),t.extend(CZRModOptMths,e.Events),t.extend(CZRBaseControlMths,e.CZR_Helpers),t.extend(CZRInputMths,e.CZR_Helpers),t.extend(CZRModuleMths,e.CZR_Helpers),e.CZRInput=e.Value.extend(CZRInputMths),e.czrInputMap=e.czrInputMap||{},t.extend(e.czrInputMap,{text:"",textarea:"",check:"setupIcheck",checkbox:"setupIcheck",gutencheck:"setupGutenCheck",select:"setupSelect",radio:"setupRadio",number:"setupStepper",upload:"setupImageUploaderSaveAsId",upload_url:"setupImageUploaderSaveAsUrl",color:"setupColorPicker",wp_color_alpha:"setupColorPickerAlpha",wp_color:"setupWPColorPicker",content_picker:"setupContentPicker",tiny_mce_editor:"setupTinyMceEditor",password:"",range:"setupSimpleRange",range_slider:"setupRangeSlider",hidden:"",h_alignment:"setupHAlignement",h_text_alignment:"setupHAlignement"}),e.CZRItem=e.Value.extend(CZRItemMths),e.CZRModOpt=e.Value.extend(CZRModOptMths),e.CZRModule=e.Value.extend(CZRModuleMths),e.CZRDynModule=e.CZRModule.extend(CZRDynModuleMths),e.CZRBaseControl=e.Control.extend(CZRBaseControlMths),e.CZRBaseModuleControl=e.CZRBaseControl.extend(CZRBaseModuleControlMths),t.extend(e.controlConstructor,{czr_module:e.CZRBaseModuleControl})}(wp.customize,jQuery,_),function(t,e){jQuery(function(n){var i,e=t.customize||e;i=n("<span/>",{class:"customize-controls-home-or-add fas fa-home",html:'<span class="screen-reader-text">Home</span>'}),n.when(n("#customize-header-actions").append(i)).done(function(){i.keydown(function(e){9!==e.which&&(13===e.which&&this.click(),e.preventDefault())}).on("click.customize-controls-home-or-add",function(){e.section.has(e.czr_activeSectionId())?e.section(e.czr_activeSectionId()).expanded(!1):e.section.each(function(e){e.expanded(!1)}),e.panel.each(function(e){e.expanded(!1)})}),_.delay(function(){if(!i.hasClass("button-see-me")){var e=0,t=function(){n.Deferred(function(){var e=this;i.addClass("button-see-me"),_.delay(function(){i.removeClass("button-see-me"),e.resolve()},800)}).done(function(){0<=--e&&_.delay(function(){t()},50)})};t()}},2e3)})})}(wp);
1
+ "function"!=typeof jQuery.fn.iCheck&&function(v){function _(e,t,n){var i=e[0],r=/er/.test(n)?$:/bl/.test(n)?x:I,o=n==E?{checked:i[I],disabled:i[x],indeterminate:"true"==e.attr($)||"false"==e.attr(S)}:i[r];if(/^(ch|di|in)/.test(n)&&!o)y(e,r);else if(/^(un|en|de)/.test(n)&&o)b(e,r);else if(n==E)for(r in o)o[r]?y(e,r,!0):b(e,r,!0);else t&&"toggle"!=n||(t||e[O]("ifClicked"),o?i[A]!==z&&b(e,r):y(e,r))}function y(e,t,n){var i=e[0],r=e.parent(),o=t==I,s=t==$,a=t==x,l=s?S:o?g:"enabled",c=h(e,l+m(i[A])),d=h(e,t+m(i[A]));if(!0!==i[t]){if(!n&&t==I&&i[A]==z&&i.name){var u=e.closest("form"),p='input[name="'+i.name+'"]';(p=u.length?u.find(p):v(p)).each(function(){this!==i&&v(this).data(w)&&b(v(this),t)})}s?(i[t]=!0,i[I]&&b(e,I,"force")):(n||(i[t]=!0),o&&i[$]&&b(e,$,!1)),f(e,o,t,n)}i[x]&&h(e,D,!0)&&r.find("."+M).css(D,"default"),r[R](d||h(e,t)||""),a?r.attr("aria-disabled","true"):r.attr("aria-checked",s?"mixed":"true"),r[k](c||h(e,l)||"")}function b(e,t,n){var i=e[0],r=e.parent(),o=t==I,s=t==$,a=t==x,l=s?S:o?g:"enabled",c=h(e,l+m(i[A])),d=h(e,t+m(i[A]));!1!==i[t]&&((s||!n||"force"==n)&&(i[t]=!1),f(e,o,l,n)),!i[x]&&h(e,D,!0)&&r.find("."+M).css(D,"pointer"),r[k](d||h(e,t)||""),a?r.attr("aria-disabled","false"):r.attr("aria-checked","false"),r[R](c||h(e,l)||"")}function C(e,t){e.data(w)&&(e.parent().html(e.attr("style",e.data(w).s||"")),t&&e[O](t),e.off(".i").unwrap(),v(P+'[for="'+e[0].id+'"]').add(e.closest(P)).off(".i"))}function h(e,t,n){return e.data(w)?e.data(w).o[t+(n?"":"Class")]:void 0}function m(e){return e.charAt(0).toUpperCase()+e.slice(1)}function f(e,t,n,i){i||(t&&e[O]("ifToggled"),e[O]("ifChanged")[O]("if"+m(n)))}var w="iCheck",M=w+"-helper",z="radio",I="checked",g="un"+I,x="disabled",S="determinate",$="in"+S,E="update",A="type",R="addClass",k="removeClass",O="trigger",P="label",D="cursor",j=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);v.fn[w]=function(t,n){var i='input[type="checkbox"], input[type="'+z+'"]',r=v(),e=function(e){e.each(function(){var e=v(this);r=e.is(i)?r.add(e):r.add(e.find(i))})};if(/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(t))return t=t.toLowerCase(),e(this),r.each(function(){var e=v(this);"destroy"==t?C(e,"ifDestroyed"):_(e,!0,t),v.isFunction(n)&&n()});if("object"!=typeof t&&t)return this;var d=v.extend({checkedClass:I,disabledClass:x,indeterminateClass:$,labelHover:!0,aria:!1},t),o=d.handle,u=d.hoverClass||"hover",p=d.focusClass||"focus",h=d.activeClass||"active",m=!!d.labelHover,f=d.labelHoverClass||"hover",g=0|(""+d.increaseArea).replace("%","");return("checkbox"==o||o==z)&&(i='input[type="'+o+'"]'),g<-50&&(g=-50),e(this),r.each(function(){var i=v(this);C(i);var r=this,e=r.id,t={position:"absolute",top:n=-g+"%",left:n,display:"block",width:t=100+2*g+"%",height:t,margin:0,padding:0,background:"#fff",border:0,opacity:0},n=j?{position:"absolute",visibility:"hidden"}:g?t:{position:"absolute",opacity:0},o="checkbox"==r[A]?d.checkboxClass||"icheckbox":d.radioClass||"i"+z,s=v(P+'[for="'+e+'"]').add(i.closest(P)),a=!!d.aria,l=w+"-"+Math.random().toString(36).substr(2,6),c='<div class="'+o+'" '+(a?'role="'+r[A]+'" ':"");a&&s.each(function(){c+='aria-labelledby="',this.id?c+=this.id:(this.id=l,c+=l),c+='"'}),c=i.wrap(c+"/>")[O]("ifCreated").parent().append(d.insert),t=v('<ins class="'+M+'"/>').css(t).appendTo(c),i.data(w,{o:d,s:i.attr("style")}).css(n),d.inheritClass&&c[R](r.className||""),d.inheritID&&e&&c.attr("id",w+"-"+e),"static"==c.css("position")&&c.css("position","relative"),_(i,!0,E),s.length&&s.on("click.i mouseover.i mouseout.i touchbegin.i touchend.i",function(e){var t=e[A],n=v(this);if(!r[x]){if("click"==t){if(v(e.target).is("a"))return;_(i,!1,!0)}else m&&(/ut|nd/.test(t)?(c[k](u),n[k](f)):(c[R](u),n[R](f)));if(!j)return!1;e.stopPropagation()}}),i.on("click.i focus.i blur.i keyup.i keydown.i keypress.i",function(e){var t=e[A];return e=e.keyCode,"click"!=t&&("keydown"==t&&32==e?(r[A]==z&&r[I]||(r[I]?b(i,I):y(i,I)),!1):void("keyup"==t&&r[A]==z?!r[I]&&y(i,I):/us|ur/.test(t)&&c["blur"==t?k:R](p)))}),t.on("click mousedown mouseup mouseover mouseout touchbegin.i touchend.i",function(e){var t=e[A],n=/wn|up/.test(t)?h:u;if(!r[x]){if("click"==t?_(i,!1,!0):(/wn|er|in/.test(t)?c[R](n):c[k](n+" "+h),s.length&&m&&n==u&&s[/ut|nd/.test(t)?k:R](f)),!j)return!1;e.stopPropagation()}})})}}(window.jQuery||window.Zepto),"function"!=typeof jQuery.fn.selecter&&function(d,r){"use strict";function o(e,t){if(!e.hasClass("selecter-element")){(t=d.extend({},t,e.data("selecter-options"))).external&&(t.links=!0);var n=e.find("option, optgroup"),i=n.filter("option"),r=i.filter(":selected"),o=""!==t.label?-1:i.index(r),s=t.links?"nav":"div";t.tabIndex=e[0].tabIndex,e[0].tabIndex=-1,t.multiple=e.prop("multiple"),t.disabled=e.is(":disabled");var a="<"+s+' class="selecter '+t.customClass;C?a+=" mobile":t.cover&&(a+=" cover"),a+=t.multiple?" multiple":" closed",t.disabled&&(a+=" disabled"),a+='" tabindex="'+t.tabIndex+'">',t.multiple||(a+='<span class="selecter-selected'+(""!==t.label?" placeholder":"")+'">',a+=d("<span></span").text(y(""!==t.label?t.label:r.text(),t.trim)).html(),a+="</span>"),a+='<div class="selecter-options">',a+="</div>",a+="</"+s+">",e.addClass("selecter-element").after(a);var l=e.next(".selecter"),c=d.extend({$select:e,$allOptions:n,$options:i,$selecter:l,$selected:l.find(".selecter-selected"),$itemsWrapper:l.find(".selecter-options"),index:-1,guid:b++},t);u(c),_(o,c),void 0!==d.fn.scroller&&c.$itemsWrapper.scroller(),c.$selecter.on("touchstart.selecter click.selecter",".selecter-selected",c,p).on("click.selecter",".selecter-item",c,m).on("close.selecter",c,h).data("selecter",c),c.$select.on("change.selecter",c,f),C||(c.$selecter.on("focus.selecter",c,g).on("blur.selecter",c,v),c.$select.on("focus.selecter",c,function(e){e.data.$selecter.trigger("focus")}))}}function u(e){for(var t="",n=e.links?"a":"span",i=0,r=e.$allOptions.length;i<r;i++){var o=e.$allOptions.eq(i);if("OPTGROUP"===o[0].tagName)t+='<span class="selecter-group',o.is(":disabled")&&(t+=" disabled"),t+='">'+o.attr("label")+"</span>";else{var s=o.val();o.attr("value")||o.attr("value",s),t+="<"+n+' class="selecter-item',o.is(":selected")&&""===e.label&&(t+=" selected"),o.is(":disabled")&&(t+=" disabled"),t+='" ',t+=e.links?'href="'+s+'"':'data-value="'+s+'"',t+=">"+d("<span></span>").text(y(o.text(),e.trim)).html()+"</"+n+">",0}}e.$itemsWrapper.html(t),e.$items=e.$selecter.find(".selecter-item")}function p(e){e.preventDefault(),e.stopPropagation();var t=e.data;if(!t.$select.is(":disabled"))if(d(".selecter").not(t.$selecter).trigger("close.selecter",[t]),C){var n=t.$select[0];if(r.document.createEvent){var i=r.document.createEvent("MouseEvents");i.initMouseEvent("mousedown",!1,!0,r,0,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(i)}else n.fireEvent&&n.fireEvent("onmousedown")}else t.$selecter.hasClass("closed")?function(e){e.preventDefault(),e.stopPropagation();var t=e.data;if(!t.$selecter.hasClass("open")){var n=t.$selecter.offset(),i=c.outerHeight(),r=t.$itemsWrapper.outerHeight(!0),o=0<=t.index?t.$items.eq(t.index).position():{left:0,top:0};n.top+r>i&&t.$selecter.addClass("bottom"),t.$itemsWrapper.show(),t.$selecter.removeClass("closed").addClass("open"),c.on("click.selecter-"+t.guid,":not(.selecter-options)",t,s),void 0!==d.fn.scroller?t.$itemsWrapper.scroller("scroll",t.$itemsWrapper.find(".scroller-content").scrollTop()+o.top,0).scroller("reset"):t.$itemsWrapper.scrollTop(t.$itemsWrapper.scrollTop()+o.top)}}(e):t.$selecter.hasClass("open")&&h(e)}function s(e){e.preventDefault(),e.stopPropagation(),0===d(e.currentTarget).parents(".selecter").length&&h(e)}function h(e){e.preventDefault(),e.stopPropagation();var t=e.data;t.$selecter.hasClass("open")&&(t.$itemsWrapper.hide(),t.$selecter.removeClass("open bottom").addClass("closed"),c.off(".selecter-"+t.guid))}function m(e){e.preventDefault(),e.stopPropagation();var t=d(this),n=e.data;if(!n.$select.is(":disabled")){if(n.$itemsWrapper.is(":visible"))_(n.$items.index(t),n),a(n);n.multiple||h(e)}}function f(e,t){var n=d(this),i=e.data;t||i.multiple||(_(i.$options.index(i.$options.filter("[value='"+n.val().replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1")+"']")),i),a(i))}function g(e){e.preventDefault(),e.stopPropagation();var t=e.data;t.$select.is(":disabled")||t.multiple||(t.$selecter.addClass("focus").on("keydown.selecter"+t.guid,t,n),d(".selecter").not(t.$selecter).trigger("close.selecter",[t]))}function v(e){e.preventDefault(),e.stopPropagation();var t=e.data;t.$selecter.removeClass("focus").off("keydown.selecter"+t.guid+" keyup.selecter"+t.guid),d(".selecter").not(t.$selecter).trigger("close.selecter",[t])}function n(e){var t=e.data;if(13===e.keyCode)t.$selecter.hasClass("open")&&(h(e),_(t.index,t)),a(t);else if(!(9===e.keyCode||e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)){e.preventDefault(),e.stopPropagation();var n=t.$items.length-1,i=t.index<0?0:t.index;if(-1<d.inArray(e.keyCode,l?[38,40,37,39]:[38,40]))(i+=38===e.keyCode||l&&37===e.keyCode?-1:1)<0&&(i=0),n<i&&(i=n);else{var r,o=String.fromCharCode(e.keyCode).toUpperCase();for(r=t.index+1;r<=n;r++)if(t.$options.eq(r).text().charAt(0).toUpperCase()===o){i=r;break}if(i<0)for(r=0;r<=n;r++)if(t.$options.eq(r).text().charAt(0).toUpperCase()===o){i=r;break}}0<=i&&_(i,t)}}function _(e,t){var n=t.$items.eq(e),i=n.hasClass("selected");if(!n.hasClass("disabled")){if(-1===e&&""!==t.label)t.$selected.html(t.label);else if(i)t.multiple&&(t.$options.eq(e).prop("selected",null),n.removeClass("selected"));else{var r=n.html();n.data("value"),t.multiple?t.$options.eq(e).prop("selected",!0):(t.$selected.html(r).removeClass("placeholder"),t.$items.filter(".selected").removeClass("selected"),t.$select[0].selectedIndex=e),n.addClass("selected")}(!i||t.multiple)&&(t.index=e)}}function a(e){var t,n;e.links?(n=(t=e).$select.val(),t.external?r.open(n):r.location.href=n):(e.callback.call(e.$selecter,e.$select.val(),e.index),e.$select.trigger("change",[!0]))}function y(e,t){return 0===t?e:e.length>t?e.substring(0,t)+"...":e}var b=0,l=-1<r.navigator.userAgent.toLowerCase().indexOf("firefox"),C=/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(r.navigator.userAgent||r.navigator.vendor||r.opera),c=null,w={callback:d.noop,cover:!1,customClass:"",label:"",external:!1,links:!1,trim:0},t={defaults:function(e){return w=d.extend(w,e||{}),d(this)},disable:function(r){return d(this).each(function(e,t){var n=d(t).next(".selecter").data("selecter");if(n)if(void 0!==r){var i=n.$items.index(n.$items.filter("[data-value="+r+"]"));n.$items.eq(i).addClass("disabled"),n.$options.eq(i).prop("disabled",!0)}else n.$selecter.hasClass("open")&&n.$selecter.find(".selecter-selected").trigger("click.selecter"),n.$selecter.addClass("disabled"),n.$select.prop("disabled",!0)})},enable:function(r){return d(this).each(function(e,t){var n=d(t).next(".selecter").data("selecter");if(n)if(void 0!==r){var i=n.$items.index(n.$items.filter("[data-value="+r+"]"));n.$items.eq(i).removeClass("disabled"),n.$options.eq(i).prop("disabled",!1)}else n.$selecter.removeClass("disabled"),n.$select.prop("disabled",!1)})},destroy:function(){return d(this).each(function(e,t){var n=d(t).next(".selecter").data("selecter");n&&(n.$selecter.hasClass("open")&&n.$selecter.find(".selecter-selected").trigger("click.selecter"),void 0!==d.fn.scroller&&n.$selecter.find(".selecter-options").scroller("destroy"),n.$select[0].tabIndex=n.tabIndex,n.$select.off(".selecter").removeClass("selecter-element").show(),n.$selecter.off(".selecter").remove())})},refresh:function(){return d(this).each(function(e,t){var n=d(t).next(".selecter").data("selecter");if(n){var i=n.index;n.$allOptions=n.$select.find("option, optgroup"),n.$options=n.$allOptions.filter("option"),n.index=-1,i=n.$options.index(n.$options.filter(":selected")),u(n),_(i,n)}})}};d.fn.selecter=function(e){return t[e]?t[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?this:function(e){e=d.extend({},w,e||{}),null===c&&(c=d("body"));for(var t=d(this),n=0,i=t.length;n<i;n++)o(t.eq(n),e);return t}.apply(this,arguments)},d.selecter=function(e){"defaults"===e&&t.defaults.apply(this,Array.prototype.slice.call(arguments,1))}}(jQuery,window),"function"!=typeof jQuery.fn.stepper&&function(c){"use strict";function r(e,t){if(!e.hasClass("stepper-input")){t=c.extend({},t,e.data("stepper-options"));var n=parseFloat(e.attr("min")),i=parseFloat(e.attr("max")),r=parseFloat(e.attr("step"))||1;e.addClass("stepper-input").wrap('<div class="stepper '+t.customClass+'" />').after('<span class="stepper-arrow up">'+t.labels.up+'</span><span class="stepper-arrow down">'+t.labels.down+"</span>");var o=e.parent(".stepper"),s=c.extend({$stepper:o,$input:e,$arrow:o.find(".stepper-arrow"),min:void 0!==typeof n&&!isNaN(n)&&n,max:void 0!==typeof i&&!isNaN(i)&&i,step:void 0===typeof r||isNaN(r)?1:r,timer:null},t);s.digits=(a=s.step,-1<(l=String(a)).indexOf(".")?l.length-l.indexOf(".")-1:0),e.is(":disabled")&&o.addClass("disabled"),o.on("touchstart.stepper mousedown.stepper",".stepper-arrow",s,d).data("stepper",s)}var a,l}function d(e){e.preventDefault(),e.stopPropagation(),s(e);var t,n,i,r=e.data;if(!r.$input.is(":disabled")&&!r.$stepper.hasClass("disabled")){var o=c(e.target).hasClass("up")?r.step:-r.step;r.timer=(t=r.timer,n=125,i=function(){a(r,o)},l(t),setInterval(i,n)),a(r,o),c("body").on("touchend.stepper mouseup.stepper",r,s)}}function s(e){e.preventDefault(),e.stopPropagation(),l(e.data.timer),c("body").off(".stepper")}function a(e,t){var n=parseFloat(e.$input.val()),i=t;void 0===typeof n||isNaN(n)?i=!1!==e.min?e.min:0:!1!==e.min&&n<e.min?i=e.min:i+=n;var r,o,s,a=(i-e.min)%e.step;0!==a&&(i-=a),!1!==e.min&&i<e.min&&(i=e.min),!1!==e.max&&i>e.max&&(i-=e.step),i!==n&&(r=i,o=e.digits,s=Math.pow(10,o),i=Math.round(r*s)/s,e.$input.val(i).trigger("change"))}function l(e){e&&(clearInterval(e),e=null)}var o={customClass:"",labels:{up:"Up",down:"Down"}},t={defaults:function(e){return o=c.extend(o,e||{}),c(this)},destroy:function(){return c(this).each(function(){var e=c(this).data("stepper");e&&(e.$stepper.off(".stepper").find(".stepper-arrow").remove(),e.$input.unwrap().removeClass("stepper-input"))})},disable:function(){return c(this).each(function(){var e=c(this).data("stepper");e&&(e.$input.attr("disabled","disabled"),e.$stepper.addClass("disabled"))})},enable:function(){return c(this).each(function(){var e=c(this).data("stepper");e&&(e.$input.attr("disabled",null),e.$stepper.removeClass("disabled"))})}};c.fn.stepper=function(e){return t[e]?t[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?this:function(e){e=c.extend({},o,e||{});for(var t=c(this),n=0,i=t.length;n<i;n++)r(t.eq(n),e);return t}.apply(this,arguments)},c.stepper=function(e){"defaults"===e&&t.defaults.apply(this,Array.prototype.slice.call(arguments,1))}}(jQuery),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports?require("jquery"):jQuery)}(function(n){var e=function(){if(n&&n.fn&&n.fn.czrSelect2&&n.fn.czrSelect2.amd)var e=n.fn.czrSelect2.amd;var t,r,c;return e&&e.requirejs||(e?r=e:e={},function(p){function h(e,t){return n.call(e,t)}function s(e,t){var n,i,r,o,s,a,l,c,d,u,p,h=t&&t.split("/"),m=C.map,f=m&&m["*"]||{};if(e&&"."===e.charAt(0))if(t){for(s=(e=e.split("/")).length-1,C.nodeIdCompat&&M.test(e[s])&&(e[s]=e[s].replace(M,"")),e=h.slice(0,h.length-1).concat(e),d=0;d<e.length;d+=1)if("."===(p=e[d]))e.splice(d,1),d-=1;else if(".."===p){if(1===d&&(".."===e[2]||".."===e[0]))break;0<d&&(e.splice(d-1,2),d-=2)}e=e.join("/")}else 0===e.indexOf("./")&&(e=e.substring(2));if((h||f)&&m){for(d=(n=e.split("/")).length;0<d;d-=1){if(i=n.slice(0,d).join("/"),h)for(u=h.length;0<u;u-=1)if((r=m[h.slice(0,u).join("/")])&&(r=r[i])){o=r,a=d;break}if(o)break;!l&&f&&f[i]&&(l=f[i],c=d)}!o&&l&&(o=l,a=c),o&&(n.splice(0,a,o),e=n.join("/"))}return e}function m(t,n){return function(){var e=i.call(arguments,0);return"string"!=typeof e[0]&&1===e.length&&e.push(null),l.apply(p,e.concat([t,n]))}}function f(t){return function(e){y[t]=e}}function g(e){if(h(b,e)){var t=b[e];delete b[e],w[e]=!0,o.apply(p,t)}if(!h(y,e)&&!h(w,e))throw new Error("No "+e);return y[e]}function a(e){var t,n=e?e.indexOf("!"):-1;return-1<n&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}var o,l,v,_,y={},b={},C={},w={},n=Object.prototype.hasOwnProperty,i=[].slice,M=/\.js$/;v=function(e,t){var n,i,r=a(e),o=r[0];return e=r[1],o&&(n=g(o=s(o,t))),o?e=n&&n.normalize?n.normalize(e,(i=t,function(e){return s(e,i)})):s(e,t):(o=(r=a(e=s(e,t)))[0],e=r[1],o&&(n=g(o))),{f:o?o+"!"+e:e,n:e,pr:o,p:n}},_={require:function(e){return m(e)},exports:function(e){var t=y[e];return void 0!==t?t:y[e]={}},module:function(e){return{id:e,uri:"",exports:y[e],config:(t=e,function(){return C&&C.config&&C.config[t]||{}})};var t}},o=function(e,t,n,i){var r,o,s,a,l,c,d=[],u=typeof n;if(i=i||e,"undefined"===u||"function"===u){for(t=!t.length&&n.length?["require","exports","module"]:t,l=0;l<t.length;l+=1)if("require"===(o=(a=v(t[l],i)).f))d[l]=_.require(e);else if("exports"===o)d[l]=_.exports(e),c=!0;else if("module"===o)r=d[l]=_.module(e);else if(h(y,o)||h(b,o)||h(w,o))d[l]=g(o);else{if(!a.p)throw new Error(e+" missing "+o);a.p.load(a.n,m(i,!0),f(o),{}),d[l]=y[o]}s=n?n.apply(y[e],d):void 0,e&&(r&&r.exports!==p&&r.exports!==y[e]?y[e]=r.exports:s===p&&c||(y[e]=s))}else e&&(y[e]=n)},t=r=l=function(e,t,n,i,r){if("string"==typeof e)return _[e]?_[e](t):g(v(e,t).f);if(!e.splice){if((C=e).deps&&l(C.deps,C.callback),!t)return;t.splice?(e=t,t=n,n=null):e=p}return t=t||function(){},"function"==typeof n&&(n=i,i=r),i?o(p,e,t,n):setTimeout(function(){o(p,e,t,n)},4),l},l.config=function(e){return l(e)},t._defined=y,(c=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),h(y,e)||h(b,e)||(b[e]=[e,t,n])}).amd={jQuery:!0}}(),e.requirejs=t,e.require=r,e.define=c),e.define("almond",function(){}),e.define("jquery",[],function(){var e=n||$;return null==e&&console&&console.error&&console.error("CzrSelect2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before CzrSelect2 on your web page."),e}),e.define("czrSelect2/utils",["jquery"],function(o){function d(e){var t=e.prototype,n=[];for(var i in t){"function"==typeof t[i]&&"constructor"!==i&&n.push(i)}return n}var e={Extend:function(e,t){function n(){this.constructor=e}var i={}.hasOwnProperty;for(var r in t)i.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},Decorate:function(i,r){function o(){var e=Array.prototype.unshift,t=r.prototype.constructor.length,n=i.prototype.constructor;0<t&&(e.call(arguments,i.prototype.constructor),n=r.prototype.constructor),n.apply(this,arguments)}var e=d(r),t=d(i);r.displayName=i.displayName,o.prototype=new function(){this.constructor=o};for(var n=0;n<t.length;n++){var s=t[n];o.prototype[s]=i.prototype[s]}for(var a=function(e){var t=function(){};e in o.prototype&&(t=o.prototype[e]);var n=r.prototype[e];return function(){return Array.prototype.unshift.call(arguments,t),n.apply(this,arguments)}},l=0;l<e.length;l++){var c=e[l];o.prototype[c]=a(c)}return o}},t=function(){this.listeners={}};return t.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},t.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),(n[0]._type=e)in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},t.prototype.invoke=function(e,t){for(var n=0,i=e.length;n<i;n++)e[n].apply(this,t)},e.Observable=t,e.generateChars=function(e){for(var t="",n=0;n<e;n++){t+=Math.floor(36*Math.random()).toString(36)}return t},e.bind=function(e,t){return function(){e.apply(t,arguments)}},e._convertData=function(e){for(var t in e){var n=t.split("-"),i=e;if(1!==n.length){for(var r=0;r<n.length;r++){var o=n[r];(o=o.substring(0,1).toLowerCase()+o.substring(1))in i||(i[o]={}),r==n.length-1&&(i[o]=e[t]),i=i[o]}delete e[t]}}return e},e.hasScroll=function(e,t){var n=o(t),i=t.style.overflowX,r=t.style.overflowY;return(i!==r||"hidden"!==r&&"visible"!==r)&&("scroll"===i||"scroll"===r||(n.innerHeight()<t.scrollHeight||n.innerWidth()<t.scrollWidth))},e.escapeMarkup=function(e){var t={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},e.appendMany=function(e,t){if("1.7"===o.fn.jquery.substr(0,3)){var n=o();o.map(t,function(e){n=n.add(e)}),t=n}e.append(t)},e}),e.define("czrSelect2/results",["jquery","./utils"],function(p,e){function i(e,t,n){this.$element=e,this.data=n,this.options=t,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=p('<ul class="czrSelect2-results__options" role="tree"></ul>');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},i.prototype.clear=function(){this.$results.empty()},i.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=p('<li role="treeitem" aria-live="assertive" class="czrSelect2-results__option"></li>'),i=this.options.get("translations").get(e.message);n.append(t(i(e.args))),n[0].className+=" czrSelect2-results__message",this.$results.append(n)},i.prototype.hideMessages=function(){this.$results.find(".czrSelect2-results__message").remove()},i.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var i=e.results[n],r=this.option(i);t.push(r)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},i.prototype.position=function(e,t){t.find(".czrSelect2-results").append(e)},i.prototype.sort=function(e){return this.options.get("sorter")(e)},i.prototype.highlightFirstItem=function(){var e=this.$results.find(".czrSelect2-results__option[aria-selected]"),t=e.filter("[aria-selected=true]");0<t.length?t.first().trigger("mouseenter"):e.first().trigger("mouseenter"),this.ensureHighlightVisible()},i.prototype.setClasses=function(){var t=this;this.data.current(function(e){var i=p.map(e,function(e){return e.id.toString()});t.$results.find(".czrSelect2-results__option[aria-selected]").each(function(){var e=p(this),t=p.data(this,"data"),n=""+t.id;null!=t.element&&t.element.selected||null==t.element&&-1<p.inArray(n,i)?e.attr("aria-selected","true"):e.attr("aria-selected","false")})})},i.prototype.showLoading=function(e){this.hideLoading();var t={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},n=this.option(t);n.className+=" loading-results",this.$results.prepend(n)},i.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},i.prototype.option=function(e){var t=document.createElement("li");t.className="czrSelect2-results__option";var n={role:"treeitem","aria-selected":"false"};for(var i in e.disabled&&(delete n["aria-selected"],n["aria-disabled"]="true"),null==e.id&&delete n["aria-selected"],null!=e._resultId&&(t.id=e._resultId),e.title&&(t.title=e.title),e.children&&(n.role="group",n["aria-label"]=e.text,delete n["aria-selected"]),n){var r=n[i];t.setAttribute(i,r)}if(e.children){var o=p(t),s=document.createElement("strong");s.className="czrSelect2-results__group",p(s),this.template(e,s);for(var a=[],l=0;l<e.children.length;l++){var c=e.children[l],d=this.option(c);a.push(d)}var u=p("<ul></ul>",{class:"czrSelect2-results__options czrSelect2-results__options--nested"});u.append(a),o.append(s),o.append(u)}else this.template(e,t);return p.data(t,"data",e),t},i.prototype.bind=function(t,e){var l=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){l.clear(),l.append(e.data),t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("results:append",function(e){l.append(e.data),t.isOpen()&&l.setClasses()}),t.on("query",function(e){l.hideMessages(),l.showLoading(e)}),t.on("select",function(){t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("open",function(){l.$results.attr("aria-expanded","true"),l.$results.attr("aria-hidden","false"),l.setClasses(),l.ensureHighlightVisible()}),t.on("close",function(){l.$results.attr("aria-expanded","false"),l.$results.attr("aria-hidden","true"),l.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=l.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=l.getHighlightedResults();if(0!==e.length){var t=e.data("data");"true"==e.attr("aria-selected")?l.trigger("close",{}):l.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e);if(0!==n){var i=n-1;0===e.length&&(i=0);var r=t.eq(i);r.trigger("mouseenter");var o=l.$results.offset().top,s=r.offset().top,a=l.$results.scrollTop()+(s-o);0===i?l.$results.scrollTop(0):s-o<0&&l.$results.scrollTop(a)}}),t.on("results:next",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var i=t.eq(n);i.trigger("mouseenter");var r=l.$results.offset().top+l.$results.outerHeight(!1),o=i.offset().top+i.outerHeight(!1),s=l.$results.scrollTop()+o-r;0===n?l.$results.scrollTop(0):r<o&&l.$results.scrollTop(s)}}),t.on("results:focus",function(e){e.element.addClass("czrSelect2-results__option--highlighted")}),t.on("results:message",function(e){l.displayMessage(e)}),p.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=l.$results.scrollTop(),n=l.$results.get(0).scrollHeight-t+e.deltaY,i=0<e.deltaY&&t-e.deltaY<=0,r=e.deltaY<0&&n<=l.$results.height();i?(l.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):r&&(l.$results.scrollTop(l.$results.get(0).scrollHeight-l.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".czrSelect2-results__option[aria-selected]",function(e){var t=p(this),n=t.data("data");return"true"===t.attr("aria-selected")?void(l.options.get("multiple")?l.trigger("unselect",{originalEvent:e,data:n}):l.trigger("close",{})):void l.trigger("select",{originalEvent:e,data:n})}),this.$results.on("mouseenter",".czrSelect2-results__option[aria-selected]",function(e){var t=p(this).data("data");l.getHighlightedResults().removeClass("czrSelect2-results__option--highlighted"),l.trigger("results:focus",{data:t,element:p(this)})})},i.prototype.getHighlightedResults=function(){return this.$results.find(".czrSelect2-results__option--highlighted")},i.prototype.destroy=function(){this.$results.remove()},i.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]").index(e),n=this.$results.offset().top,i=e.offset().top,r=this.$results.scrollTop()+(i-n),o=i-n;r-=2*e.outerHeight(!1),t<=2?this.$results.scrollTop(0):(o>this.$results.outerHeight()||o<0)&&this.$results.scrollTop(r)}},i.prototype.template=function(e,t){var n=this.options.get("templateResult"),i=this.options.get("escapeMarkup"),r=n(e,t);null==r?t.style.display="none":"string"==typeof r?t.innerHTML=i(r):p(t).append(r)},i}),e.define("czrSelect2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),e.define("czrSelect2/selection/base",["jquery","../utils","../keys"],function(n,e,r){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=n('<span class="czrSelect2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),this.$selection=e},i.prototype.bind=function(e,t){var n=this,i=(e.id,e.id+"-results");this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===r.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",i),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.focus(),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex)}),e.on("disable",function(){n.$selection.attr("tabindex","-1")})},i.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},i.prototype._attachCloseHandler=function(e){n(document.body).on("mousedown.czrSelect2."+e.id,function(e){var t=n(e.target).closest(".czrSelect2");n(".czrSelect2.czrSelect2-container--open").each(function(){var e=n(this);this!=t[0]&&e.data("element").czrSelect2("close")})})},i.prototype._detachCloseHandler=function(e){n(document.body).off("mousedown.czrSelect2."+e.id)},i.prototype.position=function(e,t){t.find(".selection").append(e)},i.prototype.destroy=function(){this._detachCloseHandler(this.container)},i.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},i}),e.define("czrSelect2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,i){function r(){r.__super__.constructor.apply(this,arguments)}return n.Extend(r,t),r.prototype.render=function(){var e=r.__super__.render.call(this);return e.addClass("czrSelect2-selection--single"),e.html('<span class="czrSelect2-selection__rendered"></span><span class="czrSelect2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},r.prototype.bind=function(t,e){var n=this;r.__super__.bind.apply(this,arguments);var i=t.id+"-container";this.$selection.find(".czrSelect2-selection__rendered").attr("id",i),this.$selection.attr("aria-labelledby",i),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),t.on("focus",function(e){t.isOpen()||n.$selection.focus()}),t.on("selection:update",function(e){n.update(e.data)})},r.prototype.clear=function(){this.$selection.find(".czrSelect2-selection__rendered").empty()},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return e("<span></span>")},r.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".czrSelect2-selection__rendered"),i=this.display(t,n);n.empty().append(i),n.prop("title",t.title||t.text)}else this.clear()},r}),e.define("czrSelect2/selection/multiple",["jquery","./base","../utils"],function(i,e,a){function r(e,t){r.__super__.constructor.apply(this,arguments)}return a.Extend(r,e),r.prototype.render=function(){var e=r.__super__.render.call(this);return e.addClass("czrSelect2-selection--multiple"),e.html('<ul class="czrSelect2-selection__rendered"></ul>'),e},r.prototype.bind=function(e,t){var n=this;r.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){n.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".czrSelect2-selection__choice__remove",function(e){if(!n.options.get("disabled")){var t=i(this).parent().data("data");n.trigger("unselect",{originalEvent:e,data:t})}})},r.prototype.clear=function(){this.$selection.find(".czrSelect2-selection__rendered").empty()},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return i('<li class="czrSelect2-selection__choice"><span class="czrSelect2-selection__choice__remove" role="presentation">&times;</span></li>')},r.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=0;n<e.length;n++){var i=e[n],r=this.selectionContainer(),o=this.display(i,r);r.append(o),r.prop("title",i.title||i.text),r.data("data",i),t.push(r)}var s=this.$selection.find(".czrSelect2-selection__rendered");a.appendMany(s,t)}},r}),e.define("czrSelect2/selection/placeholder",["../utils"],function(e){function t(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return t.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},t.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();return n.html(this.display(t)),n.addClass("czrSelect2-selection__placeholder").removeClass("czrSelect2-selection__choice"),n},t.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(1<t.length||n)return e.call(this,t);this.clear();var i=this.createPlaceholder(this.placeholder);this.$selection.find(".czrSelect2-selection__rendered").append(i)},t}),e.define("czrSelect2/selection/allowClear",["jquery","../keys"],function(i,r){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("CzrSelect2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".czrSelect2-selection__clear",function(e){i._handleClear(e)}),t.on("keypress",function(e){i._handleKeyboardClear(e,t)})},e.prototype._handleClear=function(e,t){if(!this.options.get("disabled")){var n=this.$selection.find(".czrSelect2-selection__clear");if(0!==n.length){t.stopPropagation();for(var i=n.data("data"),r=0;r<i.length;r++){var o={data:i[r]};if(this.trigger("unselect",o),o.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},e.prototype._handleKeyboardClear=function(e,t,n){n.isOpen()||(t.which==r.DELETE||t.which==r.BACKSPACE)&&this._handleClear(t)},e.prototype.update=function(e,t){if(e.call(this,t),!(0<this.$selection.find(".czrSelect2-selection__placeholder").length||0===t.length)){var n=i('<span class="czrSelect2-selection__clear">&times;</span>');n.data("data",t),this.$selection.find(".czrSelect2-selection__rendered").prepend(n)}},e}),e.define("czrSelect2/selection/search",["jquery","../utils","../keys"],function(i,e,s){function t(e,t,n){e.call(this,t,n)}return t.prototype.render=function(e){var t=i('<li class="czrSelect2-search czrSelect2-search--inline"><input class="czrSelect2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=t,this.$search=t.find("input");var n=e.call(this);return this._transferTabIndex(),n},t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("open",function(){i.$search.trigger("focus")}),t.on("close",function(){i.$search.val(""),i.$search.removeAttr("aria-activedescendant"),i.$search.trigger("focus")}),t.on("enable",function(){i.$search.prop("disabled",!1),i._transferTabIndex()}),t.on("disable",function(){i.$search.prop("disabled",!0)}),t.on("focus",function(e){i.$search.trigger("focus")}),t.on("results:focus",function(e){i.$search.attr("aria-activedescendant",e.id)}),this.$selection.on("focusin",".czrSelect2-search--inline",function(e){i.trigger("focus",e)}),this.$selection.on("focusout",".czrSelect2-search--inline",function(e){i._handleBlur(e)}),this.$selection.on("keydown",".czrSelect2-search--inline",function(e){if(e.stopPropagation(),i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented(),e.which===s.BACKSPACE&&""===i.$search.val()){var t=i.$searchContainer.prev(".czrSelect2-selection__choice");if(0<t.length){var n=t.data("data");i.searchRemoveChoice(n),e.preventDefault()}}});var r=document.documentMode,o=r&&r<=11;this.$selection.on("input.searchcheck",".czrSelect2-search--inline",function(e){return o?void i.$selection.off("input.search input.searchcheck"):void i.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".czrSelect2-search--inline",function(e){if(o&&"input"===e.type)i.$selection.off("input.search input.searchcheck");else{var t=e.which;t!=s.SHIFT&&t!=s.CTRL&&t!=s.ALT&&t!=s.TAB&&i.handleSearch(e)}})},t.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},t.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},t.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.$selection.find(".czrSelect2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.focus()},t.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},t.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},t.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";""!==this.$search.attr("placeholder")?e=this.$selection.find(".czrSelect2-selection__rendered").innerWidth():e=.75*(this.$search.val().length+1)+"em";this.$search.css("width",e)},t}),e.define("czrSelect2/selection/eventRelay",["jquery"],function(s){function e(){}return e.prototype.bind=function(e,t,n){var i=this,r=["open","opening","close","closing","select","selecting","unselect","unselecting"],o=["opening","closing","selecting","unselecting"];e.call(this,t,n),t.on("*",function(e,t){if(-1!==s.inArray(e,r)){t=t||{};var n=s.Event("czrSelect2:"+e,{params:t});i.$element.trigger(n),-1!==s.inArray(e,o)&&(t.prevented=n.isDefaultPrevented())}})},e}),e.define("czrSelect2/translation",["jquery","require"],function(t,n){function i(e){this.dict=e||{}}return i.prototype.all=function(){return this.dict},i.prototype.get=function(e){return this.dict[e]},i.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},i._cache={},i.loadPath=function(e){if(!(e in i._cache)){var t=n(e);i._cache[e]=t}return new i(i._cache[e])},i}),e.define("czrSelect2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),e.define("czrSelect2/data/base",["../utils"],function(i){function n(e,t){n.__super__.constructor.call(this)}return i.Extend(n,i.Observable),n.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},n.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},n.prototype.bind=function(e,t){},n.prototype.destroy=function(){},n.prototype.generateResultId=function(e,t){var n=e.id+"-result-";return(n+=i.generateChars(4))+(null!=t.id?"-"+t.id.toString():"-"+i.generateChars(4))},n}),e.define("czrSelect2/data/select",["./base","../utils","jquery"],function(e,t,a){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,e),n.prototype.current=function(e){var n=[],i=this;this.$element.find(":selected").each(function(){var e=a(this),t=i.item(e);n.push(t)}),e(n)},n.prototype.select=function(r){var o=this;if(r.selected=!0,a(r.element).is("option"))return r.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(e){var t=[];(r=[r]).push.apply(r,e);for(var n=0;n<r.length;n++){var i=r[n].id;-1===a.inArray(i,t)&&t.push(i)}o.$element.val(t),o.$element.trigger("change")});else{var e=r.id;this.$element.val(e),this.$element.trigger("change")}},n.prototype.unselect=function(r){var o=this;if(this.$element.prop("multiple"))return r.selected=!1,a(r.element).is("option")?(r.element.selected=!1,void this.$element.trigger("change")):void this.current(function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n].id;i!==r.id&&-1===a.inArray(i,t)&&t.push(i)}o.$element.val(t),o.$element.trigger("change")})},n.prototype.bind=function(e,t){var n=this;(this.container=e).on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},n.prototype.destroy=function(){this.$element.find("*").each(function(){a.removeData(this,"data")})},n.prototype.query=function(i,e){var r=[],o=this;this.$element.children().each(function(){var e=a(this);if(e.is("option")||e.is("optgroup")){var t=o.item(e),n=o.matches(i,t);null!==n&&r.push(n)}}),e({results:r})},n.prototype.addOptions=function(e){t.appendMany(this.$element,e)},n.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup")).label=e.text:void 0!==(t=document.createElement("option")).textContent?t.textContent=e.text:t.innerText=e.text,e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);var n=a(t),i=this._normalizeItem(e);return i.element=t,a.data(t,"data",i),n},n.prototype.item=function(e){var t={};if(null!=(t=a.data(e[0],"data")))return t;if(e.is("option"))t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if(e.is("optgroup")){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var n=e.children("option"),i=[],r=0;r<n.length;r++){var o=a(n[r]),s=this.item(o);i.push(s)}t.children=i}return(t=this._normalizeItem(t)).element=e[0],a.data(e[0],"data",t),t},n.prototype._normalizeItem=function(e){a.isPlainObject(e)||(e={id:e,text:e});return null!=(e=a.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),a.extend({},{selected:!1,disabled:!1},e)},n.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},n}),e.define("czrSelect2/data/array",["./select","../utils","jquery"],function(e,m,f){function i(e,t){var n=t.get("data")||[];i.__super__.constructor.call(this,e,t),this.addOptions(this.convertToOptions(n))}return m.Extend(i,e),i.prototype.select=function(n){var e=this.$element.find("option").filter(function(e,t){return t.value==n.id.toString()});0===e.length&&(e=this.option(n),this.addOptions(e)),i.__super__.select.call(this,n)},i.prototype.convertToOptions=function(e){function t(e){return function(){return f(this).val()==e.id}}for(var n=this,i=this.$element.find("option"),r=i.map(function(){return n.item(f(this)).id}).get(),o=[],s=0;s<e.length;s++){var a=this._normalizeItem(e[s]);if(0<=f.inArray(a.id,r)){var l=i.filter(t(a)),c=this.item(l),d=f.extend(!0,{},a,c),u=this.option(d);l.replaceWith(u)}else{var p=this.option(a);if(a.children){var h=this.convertToOptions(a.children);m.appendMany(p,h)}o.push(p)}}return o},i}),e.define("czrSelect2/data/ajax",["./array","../utils","jquery"],function(e,t,o){function n(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),n.__super__.constructor.call(this,e,t)}return t.Extend(n,e),n.prototype._applyDefaults=function(e){var t={data:function(e){return o.extend({},e,{q:e.term})},transport:function(e,t,n){var i=o.ajax(e);return i.then(t),i.fail(n),i}};return o.extend({},t,e,!0)},n.prototype.processResults=function(e){return e},n.prototype.query=function(n,i){function e(){var e=t.transport(t,function(e){var t=r.processResults(e,n);r.options.get("debug")&&window.console&&console.error&&(t&&t.results&&o.isArray(t.results)||console.error("CzrSelect2: The AJAX results did not return an array in the `results` key of the response.")),i(t)},function(){e.status&&"0"===e.status||r.trigger("results:message",{message:"errorLoading"})});r._request=e}var r=this;null!=this._request&&(o.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var t=o.extend({type:"GET"},this.ajaxOptions);"function"==typeof t.url&&(t.url=t.url.call(this.$element,n)),"function"==typeof t.data&&(t.data=t.data.call(this.$element,n)),this.ajaxOptions.delay&&null!=n.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(e,this.ajaxOptions.delay)):e()},n}),e.define("czrSelect2/data/tags",["jquery"],function(d){function e(e,t,n){var i=n.get("tags"),r=n.get("createTag");void 0!==r&&(this.createTag=r);var o=n.get("insertTag");if(void 0!==o&&(this.insertTag=o),e.call(this,t,n),d.isArray(i))for(var s=0;s<i.length;s++){var a=i[s],l=this._normalizeItem(a),c=this.option(l);this.$element.append(c)}}return e.prototype.query=function(e,c,d){var u=this;return this._removeOldTags(),null==c.term||null!=c.page?void e.call(this,c,d):void e.call(this,c,function e(t,n){for(var i=t.results,r=0;r<i.length;r++){var o=i[r],s=null!=o.children&&!e({results:o.children},!0);if(o.text===c.term||s)return!n&&(t.data=i,void d(t))}if(n)return!0;var a=u.createTag(c);if(null!=a){var l=u.option(a);l.attr("data-czrSelect2-tag",!0),u.addOptions([l]),u.insertTag(i,a)}t.results=i,d(t)})},e.prototype.createTag=function(e,t){var n=d.trim(t.term);return""===n?null:{id:n,text:n}},e.prototype.insertTag=function(e,t,n){t.unshift(n)},e.prototype._removeOldTags=function(e){(this._lastTag,this.$element.find("option[data-czrSelect2-tag]")).each(function(){this.selected||d(this).remove()})},e}),e.define("czrSelect2/data/tokenizer",["jquery"],function(u){function e(e,t,n){var i=n.get("tokenizer");void 0!==i&&(this.tokenizer=i),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".czrSelect2-search__field")},e.prototype.query=function(e,t,n){var r=this;t.term=t.term||"";var i=this.tokenizer(t,this.options,function(e){var t,n=r._normalizeItem(e);if(!r.$element.find("option").filter(function(){return u(this).val()===n.id}).length){var i=r.option(n);i.attr("data-czrSelect2-tag",!0),r._removeOldTags(),r.addOptions([i])}t=n,r.trigger("select",{data:t})});i.term!==t.term&&(this.$search.length&&(this.$search.val(i.term),this.$search.focus()),t.term=i.term),e.call(this,t,n)},e.prototype.tokenizer=function(e,t,n,i){for(var r=n.get("tokenSeparators")||[],o=t.term,s=0,a=this.createTag||function(e){return{id:e.term,text:e.term}};s<o.length;){var l=o[s];if(-1!==u.inArray(l,r)){var c=o.substr(0,s),d=a(u.extend({},t,{term:c}));null!=d?(i(d),o=o.substr(s+1)||"",s=0):s++}else s++}return{term:o}},e}),e.define("czrSelect2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){return t.term=t.term||"",t.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):void e.call(this,t,n)},e}),e.define("czrSelect2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){return t.term=t.term||"",0<this.maximumInputLength&&t.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):void e.call(this,t,n)},e}),e.define("czrSelect2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.query=function(n,i,r){var o=this;this.current(function(e){var t=null!=e?e.length:0;return 0<o.maximumSelectionLength&&t>=o.maximumSelectionLength?void o.trigger("results:message",{message:"maximumSelected",args:{maximum:o.maximumSelectionLength}}):void n.call(o,i,r)})},e}),e.define("czrSelect2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<span class="czrSelect2-dropdown"><span class="czrSelect2-results"></span></span>');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),e.define("czrSelect2/dropdown/search",["jquery","../utils"],function(r,e){function t(){}return t.prototype.render=function(e){var t=e.call(this),n=r('<span class="czrSelect2-search czrSelect2-search--dropdown"><input class="czrSelect2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=n,this.$search=n.find("input"),t.prepend(n),t},t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),this.$search.on("keydown",function(e){i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){r(this).off("keyup")}),this.$search.on("keyup input",function(e){i.handleSearch(e)}),t.on("open",function(){i.$search.attr("tabindex",0),i.$search.focus(),window.setTimeout(function(){i.$search.focus()},0)}),t.on("close",function(){i.$search.attr("tabindex",-1),i.$search.val("")}),t.on("focus",function(){t.isOpen()&&i.$search.focus()}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(i.showSearch(e)?i.$searchContainer.removeClass("czrSelect2-search--hide"):i.$searchContainer.addClass("czrSelect2-search--hide"))})},t.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t}),e.define("czrSelect2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,i)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),i=t.length-1;0<=i;i--){var r=t[i];this.placeholder.id===r.id&&n.splice(i,1)}return n},e}),e.define("czrSelect2/dropdown/infiniteScroll",["jquery"],function(r){function e(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&this.$results.append(this.$loadingMore)},e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("query",function(e){i.lastParams=e,i.loading=!0}),t.on("query:append",function(e){i.lastParams=e,i.loading=!0}),this.$results.on("scroll",function(){var e=r.contains(document.documentElement,i.$loadingMore[0]);if(!i.loading&&e){var t=i.$results.offset().top+i.$results.outerHeight(!1);i.$loadingMore.offset().top+i.$loadingMore.outerHeight(!1)<=t+50&&i.loadMore()}})},e.prototype.loadMore=function(){this.loading=!0;var e=r.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=r('<li class="czrSelect2-results__option czrSelect2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),e.define("czrSelect2/dropdown/attachBody",["jquery","../utils"],function(m,a){function e(e,t,n){this.$dropdownParent=n.get("dropdownParent")||m(document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var i=this,r=!1;e.call(this,t,n),t.on("open",function(){i._showDropdown(),i._attachPositioningHandler(t),r||(r=!0,t.on("results:all",function(){i._positionDropdown(),i._resizeDropdown()}),t.on("results:append",function(){i._positionDropdown(),i._resizeDropdown()}))}),t.on("close",function(){i._hideDropdown(),i._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("czrSelect2"),t.addClass("czrSelect2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=m("<span></span>"),n=e.call(this);return t.append(n),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._attachPositioningHandler=function(e,t){var n=this,i="scroll.czrSelect2."+t.id,r="resize.czrSelect2."+t.id,o="orientationchange.czrSelect2."+t.id,s=this.$container.parents().filter(a.hasScroll);s.each(function(){m(this).data("czrSelect2-scroll-position",{x:m(this).scrollLeft(),y:m(this).scrollTop()})}),s.on(i,function(e){var t=m(this).data("czrSelect2-scroll-position");m(this).scrollTop(t.y)}),m(window).on(i+" "+r+" "+o,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.czrSelect2."+t.id,i="resize.czrSelect2."+t.id,r="orientationchange.czrSelect2."+t.id;this.$container.parents().filter(a.hasScroll).off(n),m(window).off(n+" "+i+" "+r)},e.prototype._positionDropdown=function(){var e=m(window),t=this.$dropdown.hasClass("czrSelect2-dropdown--above"),n=this.$dropdown.hasClass("czrSelect2-dropdown--below"),i=null,r=this.$container.offset();r.bottom=r.top+this.$container.outerHeight(!1);var o={height:this.$container.outerHeight(!1)};o.top=r.top,o.bottom=r.top+o.height;var s=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),c=a<r.top-s,d=l>r.bottom+s,u={left:r.left,top:o.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var h=p.offset();u.top-=h.top,u.left-=h.left,t||n||(i="below"),d||!c||t?!c&&d&&t&&(i="below"):i="above",("above"==i||t&&"below"!==i)&&(u.top=o.top-h.top-s),null!=i&&(this.$dropdown.removeClass("czrSelect2-dropdown--below czrSelect2-dropdown--above").addClass("czrSelect2-dropdown--"+i),this.$container.removeClass("czrSelect2-container--below czrSelect2-container--above").addClass("czrSelect2-container--"+i)),this.$dropdownContainer.css(u)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),e.define("czrSelect2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,i)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,i=0;i<t.length;i++){var r=t[i];r.children?n+=e(r.children):n++}return n}(t.data.results)<this.minimumResultsForSearch)&&e.call(this,t)},e}),e.define("czrSelect2/dropdown/selectOnClose",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("close",function(e){i._handleSelectOnClose(e)})},e.prototype._handleSelectOnClose=function(e,t){if(t&&null!=t.originalCzrSelect2Event){var n=t.originalCzrSelect2Event;if("select"===n._type||"unselect"===n._type)return}var i=this.getHighlightedResults();if(!(i.length<1)){var r=i.data("data");null!=r.element&&r.element.selected||null==r.element&&r.selected||this.trigger("select",{data:r})}},e}),e.define("czrSelect2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",function(e){i._selectTriggered(e)}),t.on("unselect",function(e){i._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&n.ctrlKey||this.trigger("close",{originalEvent:n,originalCzrSelect2Event:t})},e}),e.define("czrSelect2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return 1!=t&&(n+="s"),n},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),e.define("czrSelect2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(m,f,g,v,_,y,b,C,w,M,z,t,I,x,S,$,E,A,R,k,O,P,D,j,T,Z,L,H,e){function n(){this.reset()}return n.prototype.apply=function(t){if(null==(t=m.extend(!0,{},this.defaults,t)).dataAdapter){if(null!=t.ajax?t.dataAdapter=S:null!=t.data?t.dataAdapter=x:t.dataAdapter=I,0<t.minimumInputLength&&(t.dataAdapter=M.Decorate(t.dataAdapter,A)),0<t.maximumInputLength&&(t.dataAdapter=M.Decorate(t.dataAdapter,R)),0<t.maximumSelectionLength&&(t.dataAdapter=M.Decorate(t.dataAdapter,k)),t.tags&&(t.dataAdapter=M.Decorate(t.dataAdapter,$)),(null!=t.tokenSeparators||null!=t.tokenizer)&&(t.dataAdapter=M.Decorate(t.dataAdapter,E)),null!=t.query){var e=f(t.amdBase+"compat/query");t.dataAdapter=M.Decorate(t.dataAdapter,e)}if(null!=t.initSelection){var n=f(t.amdBase+"compat/initSelection");t.dataAdapter=M.Decorate(t.dataAdapter,n)}}if(null==t.resultsAdapter&&(t.resultsAdapter=g,null!=t.ajax&&(t.resultsAdapter=M.Decorate(t.resultsAdapter,j)),null!=t.placeholder&&(t.resultsAdapter=M.Decorate(t.resultsAdapter,D)),t.selectOnClose&&(t.resultsAdapter=M.Decorate(t.resultsAdapter,L))),null==t.dropdownAdapter){if(t.multiple)t.dropdownAdapter=O;else{var i=M.Decorate(O,P);t.dropdownAdapter=i}if(0!==t.minimumResultsForSearch&&(t.dropdownAdapter=M.Decorate(t.dropdownAdapter,Z)),t.closeOnSelect&&(t.dropdownAdapter=M.Decorate(t.dropdownAdapter,H)),null!=t.dropdownCssClass||null!=t.dropdownCss||null!=t.adaptDropdownCssClass){var r=f(t.amdBase+"compat/dropdownCss");t.dropdownAdapter=M.Decorate(t.dropdownAdapter,r)}t.dropdownAdapter=M.Decorate(t.dropdownAdapter,T)}if(null==t.selectionAdapter){if(t.multiple?t.selectionAdapter=_:t.selectionAdapter=v,null!=t.placeholder&&(t.selectionAdapter=M.Decorate(t.selectionAdapter,y)),t.allowClear&&(t.selectionAdapter=M.Decorate(t.selectionAdapter,b)),t.multiple&&(t.selectionAdapter=M.Decorate(t.selectionAdapter,C)),null!=t.containerCssClass||null!=t.containerCss||null!=t.adaptContainerCssClass){var o=f(t.amdBase+"compat/containerCss");t.selectionAdapter=M.Decorate(t.selectionAdapter,o)}t.selectionAdapter=M.Decorate(t.selectionAdapter,w)}if("string"==typeof t.language)if(0<t.language.indexOf("-")){var s=t.language.split("-")[0];t.language=[t.language,s]}else t.language=[t.language];if(m.isArray(t.language)){var a=new z;t.language.push("en");for(var l=t.language,c=0;c<l.length;c++){var d=l[c],u={};try{u=z.loadPath(d)}catch(e){try{d=this.defaults.amdLanguageBase+d,u=z.loadPath(d)}catch(e){t.debug&&window.console&&console.warn&&console.warn('CzrSelect2: The language file for "'+d+'" could not be automatically loaded. A fallback will be used instead.');continue}}a.extend(u)}t.translations=a}else{var p=z.loadPath(this.defaults.amdLanguageBase+"en"),h=new z(t.language);h.extend(p),t.translations=h}return t},n.prototype.reset=function(){function a(e){return e.replace(/[^\u0000-\u007E]/g,function(e){return t[e]||e})}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:M.escapeMarkup,language:e,matcher:function e(t,n){if(""===m.trim(t.term))return n;if(n.children&&0<n.children.length){for(var i=m.extend(!0,{},n),r=n.children.length-1;0<=r;r--)null==e(t,n.children[r])&&i.children.splice(r,1);return 0<i.children.length?i:e(t,i)}var o=a(n.text).toUpperCase(),s=a(t.term).toUpperCase();return-1<o.indexOf(s)?n:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},n.prototype.set=function(e,t){var n={};n[m.camelCase(e)]=t;var i=M._convertData(n);m.extend(this.defaults,i)},new n}),e.define("czrSelect2/options",["require","jquery","./defaults","./utils"],function(i,o,r,s){function e(e,t){if(this.options=e,null!=t&&this.fromElement(t),this.options=r.apply(this.options),t&&t.is("input")){var n=i(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=s.Decorate(this.options.dataAdapter,n)}}return e.prototype.fromElement=function(e){var t=["czrSelect2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.language&&(e.prop("lang")?this.options.language=e.prop("lang").toLowerCase():e.closest("[lang]").prop("lang")&&(this.options.language=e.closest("[lang]").prop("lang"))),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),e.data("czrSelect2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('CzrSelect2: The `data-czrSelect2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of CzrSelect2.'),e.data("data",e.data("czrSelect2Tags")),e.data("tags",!0)),e.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("CzrSelect2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of CzrSelect2."),e.attr("ajax--url",e.data("ajaxUrl")),e.data("ajax--url",e.data("ajaxUrl")));var n;n=o.fn.jquery&&"1."==o.fn.jquery.substr(0,2)&&e[0].dataset?o.extend(!0,{},e[0].dataset,e.data()):e.data();var i=o.extend(!0,{},n);for(var r in i=s._convertData(i))-1<o.inArray(r,t)||(o.isPlainObject(this.options[r])?o.extend(this.options[r],i[r]):this.options[r]=i[r]);return this},e.prototype.get=function(e){return this.options[e]},e.prototype.set=function(e,t){this.options[e]=t},e}),e.define("czrSelect2/core",["jquery","./options","./utils","./keys"],function(r,c,n,i){var d=function(e,t){null!=e.data("czrSelect2")&&e.data("czrSelect2").destroy(),this.$element=e,this.id=this._generateId(e),t=t||{},this.options=new c(t,e),d.__super__.constructor.call(this);var n=e.attr("tabindex")||0;e.data("old-tabindex",n),e.attr("tabindex","-1");var i=this.options.get("dataAdapter");this.dataAdapter=new i(e,this.options);var r=this.render();this._placeContainer(r);var o=this.options.get("selectionAdapter");this.selection=new o(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,r);var s=this.options.get("dropdownAdapter");this.dropdown=new s(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,r);var a=this.options.get("resultsAdapter");this.results=new a(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var l=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){l.trigger("selection:update",{data:e})}),e.addClass("czrSelect2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),e.data("czrSelect2",this)};return n.Extend(d,n.Observable),d.prototype._generateId=function(e){return"czrSelect2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+n.generateChars(2):n.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},d.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},d.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var i=this._resolveWidth(e,"style");return null!=i?i:this._resolveWidth(e,"element")}if("element"==t){var r=e.outerWidth(!1);return r<=0?"auto":r+"px"}if("style"==t){var o=e.attr("style");if("string"!=typeof o)return null;for(var s=o.split(";"),a=0,l=s.length;a<l;a+=1){var c=s[a].replace(/\s/g,"").match(n);if(null!==c&&1<=c.length)return c[1]}return null}return t},d.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},d.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.czrSelect2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this.$element.on("focus.czrSelect2",function(e){t.trigger("focus",e)}),this._syncA=n.bind(this._syncAttributes,this),this._syncS=n.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=e?(this._observer=new e(function(e){r.each(e,t._syncA),r.each(e,t._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",t._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",t._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",t._syncS,!1))},d.prototype._registerDataEvents=function(){var n=this;this.dataAdapter.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerSelectionEvents=function(){var n=this,i=["toggle","focus"];this.selection.on("toggle",function(){n.toggleDropdown()}),this.selection.on("focus",function(e){n.focus(e)}),this.selection.on("*",function(e,t){-1===r.inArray(e,i)&&n.trigger(e,t)})},d.prototype._registerDropdownEvents=function(){var n=this;this.dropdown.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerResultsEvents=function(){var n=this;this.results.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerEvents=function(){var n=this;this.on("open",function(){n.$container.addClass("czrSelect2-container--open")}),this.on("close",function(){n.$container.removeClass("czrSelect2-container--open")}),this.on("enable",function(){n.$container.removeClass("czrSelect2-container--disabled")}),this.on("disable",function(){n.$container.addClass("czrSelect2-container--disabled")}),this.on("blur",function(){n.$container.removeClass("czrSelect2-container--focus")}),this.on("query",function(t){n.isOpen()||n.trigger("open",{}),this.dataAdapter.query(t,function(e){n.trigger("results:all",{data:e,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(e){n.trigger("results:append",{data:e,query:t})})}),this.on("keypress",function(e){var t=e.which;n.isOpen()?t===i.ESC||t===i.TAB||t===i.UP&&e.altKey?(n.close(),e.preventDefault()):t===i.ENTER?(n.trigger("results:select",{}),e.preventDefault()):t===i.SPACE&&e.ctrlKey?(n.trigger("results:toggle",{}),e.preventDefault()):t===i.UP?(n.trigger("results:previous",{}),e.preventDefault()):t===i.DOWN&&(n.trigger("results:next",{}),e.preventDefault()):(t===i.ENTER||t===i.SPACE||t===i.DOWN&&e.altKey)&&(n.open(),e.preventDefault())})},d.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},d.prototype._syncSubtree=function(e,t){var n=!1,i=this;if(!e||!e.target||"OPTION"===e.target.nodeName||"OPTGROUP"===e.target.nodeName){if(t)if(t.addedNodes&&0<t.addedNodes.length)for(var r=0;r<t.addedNodes.length;r++){t.addedNodes[r].selected&&(n=!0)}else t.removedNodes&&0<t.removedNodes.length&&(n=!0);else n=!0;n&&this.dataAdapter.current(function(e){i.trigger("selection:update",{data:e})})}},d.prototype.trigger=function(e,t){var n=d.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===t&&(t={}),e in i){var r=i[e],o={prevented:!1,name:e,args:t};if(n.call(this,r,o),o.prevented)return void(t.prevented=!0)}n.call(this,e,t)},d.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},d.prototype.open=function(){this.isOpen()||this.trigger("query",{})},d.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},d.prototype.isOpen=function(){return this.$container.hasClass("czrSelect2-container--open")},d.prototype.hasFocus=function(){return this.$container.hasClass("czrSelect2-container--focus")},d.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("czrSelect2-container--focus"),this.trigger("focus",{}))},d.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('CzrSelect2: The `czrSelect2("enable")` method has been deprecated and will be removed in later CzrSelect2 versions. Use $element.prop("disabled") instead.'),(null==e||0===e.length)&&(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},d.prototype.data=function(){this.options.get("debug")&&0<arguments.length&&window.console&&console.warn&&console.warn('CzrSelect2: Data can no longer be set using `czrSelect2("data")`. You should consider setting the value instead using `$element.val()`.');var t=[];return this.dataAdapter.current(function(e){t=e}),t},d.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('CzrSelect2: The `czrSelect2("val")` method has been deprecated and will be removed in later CzrSelect2 versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();var t=e[0];r.isArray(t)&&(t=r.map(t,function(e){return e.toString()})),this.$element.val(t).trigger("change")},d.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".czrSelect2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("czrSelect2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("czrSelect2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},d.prototype.render=function(){var e=r('<span class="czrSelect2 czrSelect2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("czrSelect2-container--"+this.options.get("theme")),e.data("element",this.$element),e},d}),e.define("jquery-mousewheel",["jquery"],function(e){return e}),e.define("jquery.czrSelect2",["jquery","jquery-mousewheel","./czrSelect2/core","./czrSelect2/defaults"],function(r,e,o,t){if(null==r.fn.czrSelect2){var s=["open","close","destroy"];r.fn.czrSelect2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var e=r.extend(!0,{},t);new o(r(this),e)}),this;if("string"==typeof t){var n,i=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=r(this).data("czrSelect2");null==e&&window.console&&console.error&&console.error("The czrSelect2('"+t+"') method was called on an element that is not using CzrSelect2."),n=e[t].apply(e,i)}),-1<r.inArray(t,s)?this:n}throw new Error("Invalid arguments for CzrSelect2: "+t)}}return null==r.fn.czrSelect2.defaults&&(r.fn.czrSelect2.defaults=t),o}),{define:e.define,require:e.require}}(),t=e.require("jquery.czrSelect2");return n.fn.czrSelect2.amd=e,t}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(o){"use strict";function n(e,t){function n(e){void 0!==e.open&&(e.open=!e.open)}var i=function(e){for(var t=[],n=e.parentNode;(i=n)&&(0===i.offsetWidth||0===i.offsetHeight||!1===i.open);)t.push(n),n=n.parentNode;var i;return t}(e),r=i.length,o=[],s=e[t];if(r){for(var a=0;a<r;a++)o[a]=i[a].style.cssText,i[a].style.setProperty?i[a].style.setProperty("display","block","important"):i[a].style.cssText+=";display: block !important",i[a].style.height="0",i[a].style.overflow="hidden",i[a].style.visibility="hidden",n(i[a]);s=e[t];for(var l=0;l<r;l++)i[l].style.cssText=o[l],n(i[l])}return s}function i(e,t){var n=parseFloat(e);return Number.isNaN(n)?t:n}function r(e){return e.charAt(0).toUpperCase()+e.substr(1)}function s(e,t){if(this.$window=o(window),this.$document=o(document),this.$element=o(e),this.options=o.extend({},d,t),this.polyfill=this.options.polyfill,this.orientation=this.$element[0].getAttribute("data-orientation")||this.options.orientation,this.onInit=this.options.onInit,this.onSlide=this.options.onSlide,this.onSlideEnd=this.options.onSlideEnd,this.DIMENSION=u.orientation[this.orientation].dimension,this.DIRECTION=u.orientation[this.orientation].direction,this.DIRECTION_STYLE=u.orientation[this.orientation].directionStyle,this.COORDINATE=u.orientation[this.orientation].coordinate,this.polyfill&&c)return!1;this.identifier="js-"+a+"-"+l++,this.startEvent=this.options.startEvent.join("."+this.identifier+" ")+"."+this.identifier,this.moveEvent=this.options.moveEvent.join("."+this.identifier+" ")+"."+this.identifier,this.endEvent=this.options.endEvent.join("."+this.identifier+" ")+"."+this.identifier,this.toFixed=(this.step+"").replace(".","").length-1,this.$fill=o('<div class="'+this.options.fillClass+'" />'),this.$handle=o('<div class="'+this.options.handleClass+'" />'),this.$range=o('<div class="'+this.options.rangeClass+" "+this.options[this.orientation+"Class"]+'" id="'+this.identifier+'" />').insertAfter(this.$element).prepend(this.$fill,this.$handle),this.$element.css({position:"absolute",width:"1px",height:"1px",overflow:"hidden",opacity:"0"}),this.handleDown=o.proxy(this.handleDown,this),this.handleMove=o.proxy(this.handleMove,this),this.handleEnd=o.proxy(this.handleEnd,this),this.init();var n,i,r=this;this.$window.on("resize."+this.identifier,(n=function(){!function(e,t){var n=Array.prototype.slice.call(arguments,2);setTimeout(function(){return e.apply(null,n)},t)}(function(){r.update(!1,!1)},300)},i=(i=20)||100,function(){if(!n.debouncing){var e=Array.prototype.slice.apply(arguments);n.lastReturnVal=n.apply(window,e),n.debouncing=!0}return clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(function(){n.debouncing=!1},i),n.lastReturnVal})),this.$document.on(this.startEvent,"#"+this.identifier+":not(."+this.options.disabledClass+")",this.handleDown),this.$element.on("change."+this.identifier,function(e,t){if(!t||t.origin!==r.identifier){var n=e.target.value,i=r.getPositionFromValue(n);r.setPosition(i)}})}Number.isNaN=Number.isNaN||function(e){return"number"==typeof e&&e!=e};var e,a="rangeslider",l=0,c=((e=document.createElement("input")).setAttribute("type","range"),"text"!==e.type),d={polyfill:!0,orientation:"horizontal",rangeClass:"rangeslider",disabledClass:"rangeslider--disabled",activeClass:"rangeslider--active",horizontalClass:"rangeslider--horizontal",verticalClass:"rangeslider--vertical",fillClass:"rangeslider__fill",handleClass:"rangeslider__handle",startEvent:["mousedown","touchstart","pointerdown"],moveEvent:["mousemove","touchmove","pointermove"],endEvent:["mouseup","touchend","pointerup"]},u={orientation:{horizontal:{dimension:"width",direction:"left",directionStyle:"left",coordinate:"x"},vertical:{dimension:"height",direction:"top",directionStyle:"bottom",coordinate:"y"}}};return s.prototype.init=function(){this.update(!0,!1),this.onInit&&"function"==typeof this.onInit&&this.onInit()},s.prototype.update=function(e,t){(e=e||!1)&&(this.min=i(this.$element[0].getAttribute("min"),0),this.max=i(this.$element[0].getAttribute("max"),100),this.value=i(this.$element[0].value,Math.round(this.min+(this.max-this.min)/2)),this.step=i(this.$element[0].getAttribute("step"),1)),this.handleDimension=n(this.$handle[0],"offset"+r(this.DIMENSION)),this.rangeDimension=n(this.$range[0],"offset"+r(this.DIMENSION)),this.maxHandlePos=this.rangeDimension-this.handleDimension,this.grabPos=this.handleDimension/2,this.position=this.getPositionFromValue(this.value),this.$element[0].disabled?this.$range.addClass(this.options.disabledClass):this.$range.removeClass(this.options.disabledClass),this.setPosition(this.position,t)},s.prototype.handleDown=function(e){if(e.preventDefault(),!(e.button&&0!==e.button||(this.$document.on(this.moveEvent,this.handleMove),this.$document.on(this.endEvent,this.handleEnd),this.$range.addClass(this.options.activeClass),-1<(" "+e.target.className+" ").replace(/[\n\t]/g," ").indexOf(this.options.handleClass)))){var t=this.getRelativePosition(e),n=this.$range[0].getBoundingClientRect()[this.DIRECTION],i=this.getPositionFromNode(this.$handle[0])-n,r="vertical"===this.orientation?this.maxHandlePos-(t-this.grabPos):t-this.grabPos;this.setPosition(r),i<=t&&t<i+this.handleDimension&&(this.grabPos=t-i)}},s.prototype.handleMove=function(e){e.preventDefault();var t=this.getRelativePosition(e),n="vertical"===this.orientation?this.maxHandlePos-(t-this.grabPos):t-this.grabPos;this.setPosition(n)},s.prototype.handleEnd=function(e){e.preventDefault(),this.$document.off(this.moveEvent,this.handleMove),this.$document.off(this.endEvent,this.handleEnd),this.$range.removeClass(this.options.activeClass),this.$element.trigger("change",{origin:this.identifier}),this.onSlideEnd&&"function"==typeof this.onSlideEnd&&this.onSlideEnd(this.position,this.value)},s.prototype.cap=function(e,t,n){return e<t?t:n<e?n:e},s.prototype.setPosition=function(e,t){var n,i;void 0===t&&(t=!0),n=this.getValueFromPosition(this.cap(e,0,this.maxHandlePos)),i=this.getPositionFromValue(n),this.$fill[0].style[this.DIMENSION]=i+this.grabPos+"px",this.$handle[0].style[this.DIRECTION_STYLE]=i+"px",this.setValue(n),this.position=i,this.value=n,t&&this.onSlide&&"function"==typeof this.onSlide&&this.onSlide(i,n)},s.prototype.getPositionFromNode=function(e){for(var t=0;null!==e;)t+=e.offsetLeft,e=e.offsetParent;return t},s.prototype.getRelativePosition=function(e){var t=r(this.COORDINATE),n=this.$range[0].getBoundingClientRect()[this.DIRECTION],i=0;return void 0!==e.originalEvent["client"+t]?i=e.originalEvent["client"+t]:e.originalEvent.touches&&e.originalEvent.touches[0]&&void 0!==e.originalEvent.touches[0]["client"+t]?i=e.originalEvent.touches[0]["client"+t]:e.currentPoint&&void 0!==e.currentPoint[this.COORDINATE]&&(i=e.currentPoint[this.COORDINATE]),i-n},s.prototype.getPositionFromValue=function(e){var t;return t=(e-this.min)/(this.max-this.min),Number.isNaN(t)?0:t*this.maxHandlePos},s.prototype.getValueFromPosition=function(e){var t,n;return t=e/(this.maxHandlePos||1),n=this.step*Math.round(t*(this.max-this.min)/this.step)+this.min,Number(n.toFixed(this.toFixed))},s.prototype.setValue=function(e){e===this.value&&""!==this.$element[0].value||this.$element.val(e).trigger("input",{origin:this.identifier})},s.prototype.destroy=function(){this.$document.off("."+this.identifier),this.$window.off("."+this.identifier),this.$element.off("."+this.identifier).removeAttr("style").removeData("plugin_"+a),this.$range&&this.$range.length&&this.$range[0].parentNode.removeChild(this.$range[0])},o.fn[a]=function(n){var i=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=o(this),t=e.data("plugin_"+a);t||e.data("plugin_"+a,t=new s(this,n)),"string"==typeof n&&t[n].apply(t,i)})},"rangeslider.js is available in jQuery context e.g $(selector).rangeslider(options);"}),function(l){if(!l.wp.wpColorPicker.prototype._hasAlpha){var c="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg==",t='<div class="wp-picker-holder" />',i='<div class="wp-picker-container" />',r='<input type="button" class="button button-small" />',o=void 0!==wpColorPickerL10n.current;if(o)var s='<a tabindex="0" class="wp-color-result" />';else{s='<button type="button" class="button wp-color-result" aria-expanded="false"><span class="wp-color-result-text"></span></button>';var a="<label></label>",d='<span class="screen-reader-text"></span>'}Color.fn.toString=function(){if(this._alpha<1)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var e=parseInt(this._color,10).toString(16);return this.error?"":(e.length<6&&(e=("00000"+e).substr(-6)),"#"+e)},l.widget("wp.wpColorPicker",l.wp.wpColorPicker,{_hasAlpha:!0,_create:function(){if(l.support.iris){var n=this,e=n.element;if(l.extend(n.options,e.data()),"hue"===n.options.type)return n._createHueOnly();n.close=l.proxy(n.close,n),n.initialValue=e.val(),e.addClass("wp-color-picker"),o?(e.hide().wrap(i),n.wrap=e.parent(),n.toggler=l(s).insertBefore(e).css({backgroundColor:n.initialValue}).attr("title",wpColorPickerL10n.pick).attr("data-current",wpColorPickerL10n.current),n.pickerContainer=l(t).insertAfter(e),n.button=l(r).addClass("hidden")):(e.parent("label").length||(e.wrap(a),n.wrappingLabelText=l(d).insertBefore(e).text(wpColorPickerL10n.defaultLabel)),n.wrappingLabel=e.parent(),n.wrappingLabel.wrap(i),n.wrap=n.wrappingLabel.parent(),n.toggler=l(s).insertBefore(n.wrappingLabel).css({backgroundColor:n.initialValue}),n.toggler.find(".wp-color-result-text").text(wpColorPickerL10n.pick),n.pickerContainer=l(t).insertAfter(n.wrappingLabel),n.button=l(r)),n.options.defaultColor?(n.button.addClass("wp-picker-default").val(wpColorPickerL10n.defaultString),o||n.button.attr("aria-label",wpColorPickerL10n.defaultAriaLabel)):(n.button.addClass("wp-picker-clear").val(wpColorPickerL10n.clear),o||n.button.attr("aria-label",wpColorPickerL10n.clearAriaLabel)),o?e.wrap('<span class="wp-picker-input-wrap" />').after(n.button):(n.wrappingLabel.wrap('<span class="wp-picker-input-wrap hidden" />').after(n.button),n.inputWrapper=e.closest(".wp-picker-input-wrap")),e.iris({target:n.pickerContainer,hide:n.options.hide,width:n.options.width,mode:n.options.mode,palettes:n.options.palettes,change:function(e,t){n.options.alpha?(n.toggler.css({"background-image":"url("+c+")"}),o?n.toggler.html('<span class="color-alpha" />'):(n.toggler.css({position:"relative"}),0==n.toggler.find("span.color-alpha").length&&n.toggler.append('<span class="color-alpha" />')),n.toggler.find("span.color-alpha").css({width:"30px",height:"24px",position:"absolute",top:0,left:0,"border-top-left-radius":"2px","border-bottom-left-radius":"2px",background:t.color.toString()})):n.toggler.css({backgroundColor:t.color.toString()}),l.isFunction(n.options.change)&&n.options.change.call(this,e,t)}}),e.val(n.initialValue),n._addListeners(),n.options.hide||n.toggler.click(),e.on("czr-colorpicker-close",function(){n.toggler.hasClass("wp-picker-open")&&n.close()})}},_addListeners:function(){var t=this;t.wrap.on("click.wpcolorpicker",function(e){e.stopPropagation()}),t.toggler.click(function(){t.toggler.hasClass("wp-picker-open")?t.close():t.open()}),t.element.on("change",function(e){(""===l(this).val()||t.element.hasClass("iris-error"))&&(t.options.alpha?(o&&t.toggler.removeAttr("style"),t.toggler.find("span.color-alpha").css("backgroundColor","")):t.toggler.css("backgroundColor",""),l.isFunction(t.options.clear)&&t.options.clear.call(this,e))}),t.button.on("click",function(e){l(this).hasClass("wp-picker-clear")?(t.element.val(""),t.options.alpha?(o&&t.toggler.removeAttr("style"),t.toggler.find("span.color-alpha").css("backgroundColor","")):t.toggler.css("backgroundColor",""),l.isFunction(t.options.clear)&&t.options.clear.call(this,e)):l(this).hasClass("wp-picker-default")&&t.element.val(t.options.defaultColor).change()})},open:function(){l("body").find(".wp-color-picker").not(this.element).each(function(){l(this).trigger("czr-colorpicker-close")}),this.element.iris("toggle"),this.inputWrapper.removeClass("hidden"),this.wrap.addClass("wp-picker-active"),this.toggler.addClass("wp-picker-open").attr("aria-expanded","true")},close:function(){try{this.element.iris("toggle")}catch(e){console.log("color-picker => error on ::close()",e)}this.inputWrapper.addClass("hidden"),this.wrap.removeClass("wp-picker-active"),this.toggler.removeClass("wp-picker-open").attr("aria-expanded","false")}}),l.widget("a8c.iris",l.a8c.iris,{_create:function(){if(this._super(),this.options.alpha=this.element.data("alpha")||!1,this.element.is(":input")||(this.options.alpha=!1),void 0!==this.options.alpha&&this.options.alpha){var n=this,e=n.element,t=l('<div class="iris-strip iris-slider iris-alpha-slider"><div class="iris-slider-offset iris-slider-offset-alpha"></div></div>').appendTo(n.picker.find(".iris-picker-inner")),i=t.find(".iris-slider-offset-alpha"),r={aContainer:t,aSlider:i};void 0!==e.data("custom-width")?n.options.customWidth=parseInt(e.data("custom-width"))||0:n.options.customWidth=100,n.options.defaultWidth=e.width(),(n._color._alpha<1||-1!=n._color.toString().indexOf("rgb"))&&e.width(parseInt(n.options.defaultWidth+n.options.customWidth)),l.each(r,function(e,t){n.controls[e]=t}),n.controls.square.css({"margin-right":"0"});var o=n.picker.width()-n.controls.square.width()-20,s=o/6,a=o/2-s;l.each(["aContainer","strip"],function(e,t){n.controls[t].width(a).css({"margin-left":s+"px"})}),n._initControls(),n._change()}},_initControls:function(){if(this._super(),this.options.alpha){var n=this;n.controls.aSlider.slider({orientation:"vertical",min:0,max:100,step:1,value:parseInt(100*n._color._alpha),slide:function(e,t){n._color._alpha=parseFloat(t.value/100),n._change.apply(n,arguments)}})}},_change:function(){this._super();var e=this,t=e.element;if(this.options.alpha){var n=e.controls,i=parseInt(100*e._color._alpha),r=e._color.toRgb(),o=["rgb("+r.r+","+r.g+","+r.b+") 0%","rgba("+r.r+","+r.g+","+r.b+", 0) 100%"],s=e.options.defaultWidth,a=e.options.customWidth,l=e.picker.closest(".wp-picker-container").find(".wp-color-result");n.aContainer.css({background:"linear-gradient(to bottom, "+o.join(", ")+"), url("+c+")"}),l.hasClass("wp-picker-open")&&(n.aSlider.slider("value",i),e._color._alpha<1?(n.strip.attr("style",n.strip.attr("style").replace(/rgba\(([0-9]+,)(\s+)?([0-9]+,)(\s+)?([0-9]+)(,(\s+)?[0-9\.]+)\)/g,"rgb($1$3$5)")),t.width(parseInt(s+a))):t.width(s))}(t.data("reset-alpha")||!1)&&e.picker.find(".iris-palette-container").on("click.palette",".iris-palette",function(){e._color._alpha=1,e.active="external",e._change()})},_addInputListeners:function(i){var r=this,e=function(e){var t=new Color(i.val()),n=i.val();i.removeClass("iris-error"),t.error?""!==n&&i.addClass("iris-error"):t.toString()!==r._color.toString()&&("keyup"===e.type&&n.match(/^[0-9a-fA-F]{3}$/)||r._setOption("color",t.toString()))};i.on("change",e).on("keyup",r._debounce(e,100)),r.options.hide&&i.on("focus",function(){r.show()})}})}}(jQuery),function(t,e,n){t.bind("ready",function(){t.previewedDevice&&t.previewedDevice.bind(function(e){t.previewer.send("previewed-device",e)})})}(wp.customize,jQuery,_),function(e,t,i){var r=function(e){e=i.extend({bgCol:"#5ed1f5",textCol:"#000",consoleArguments:[]},e);var t,n=Array.from(e.consoleArguments);return n=i.isEmpty(i.filter(n,function(e){return!i.isString(e)}))?n.join(" "):JSON.stringify(n.join(" ")),["%c "+(t=n,i.isString(t)?300<t.length?t.substr(0,299)+"...":t:""),["background:"+e.bgCol,"color:"+e.textCol,"display: block;"].join(";")]},n=function(e,t,n){i.isUndefined(console)&&"function"!=typeof window.console.log||(serverControlParams.isDevMode?i.isUndefined(t)?console.log.apply(console,r({bgCol:n,textCol:"#000",consoleArguments:["<"+e+">"]})):(console.log.apply(console,r({bgCol:n,textCol:"#000",consoleArguments:["<"+e+">"]})),console.log(t),console.log.apply(console,r({bgCol:n,textCol:"#000",consoleArguments:["</"+e+">"]}))):console.log.apply(console,r({bgCol:n,textCol:"#000",consoleArguments:[e]})))};e.consoleLog=function(){serverControlParams.isDevMode&&(i.isUndefined(console)&&"function"!=typeof window.console.log||(console.log.apply(console,r({consoleArguments:arguments})),console.log("Unstyled console message : ",arguments)))},e.errorLog=function(){i.isUndefined(console)&&"function"!=typeof window.console.log||console.log.apply(console,r({bgCol:"#ffd5a0",textCol:"#000",consoleArguments:arguments}))},e.errare=function(e,t){n(e,t,"#ffd5a0")},e.infoLog=function(e,t){n(e,t,"#5ed1f5")},e.czr_isChangeSetOn=function(){return serverControlParams.isChangeSetOn&&!0}}(wp.customize,jQuery,_),function(e,n,i){e.bind("ready",function(){var t=function(){i.isUndefined(window.themeServerControlParams)||i.isUndefined(themeServerControlParams.isThemeSwitchOn)||themeServerControlParams.isThemeSwitchOn||(e.panel("themes").active.callbacks=n.Callbacks(),e.panel("themes").active(themeServerControlParams.isThemeSwitchOn))};e.panel.has("themes")?t():e.panel.when("themes",function(e){t()})})}(wp.customize,jQuery,_),function(r,e,o){r.czr_activeSectionId=r.czr_activeSectionId||new r.Value(""),r.czr_activePanelId=r.czr_activePanelId||new r.Value(""),r.bind("ready",function(){if("function"!=typeof r.Section)throw new Error("Your current version of WordPress does not support the customizer sections needed for this theme. Please upgrade WordPress to the latest version.");var n=function(e,t){r.czr_activeSectionId(e?t:"")};r.section.each(function(t){"publish_settings"!=t.id&&t.expanded.bind(function(e){n(e,t.id)})}),r.section.bind("add",function(t){"publish_settings"!=t.id&&t.expanded.bind(function(e){n(e,t.id)})});var i=function(e,t){r.czr_activePanelId(e?t:""),o.isEmpty(r.czr_activePanelId())&&r.czr_activeSectionId("")};r.panel.each(function(t){t.expanded.bind(function(e){i(e,t.id)})}),r.panel.bind("add",function(t){t.expanded.bind(function(e){i(e,t.id)})})})}(wp.customize,jQuery,_),function(a,e,l){a.bind("ready",function(){serverControlParams.paramsForDynamicRegistration;l.isObject(serverControlParams.paramsForDynamicRegistration)||a.errorLog("serverControlParams.paramsForDynamicRegistration should be an array"),l.each(serverControlParams.paramsForDynamicRegistration,function(e,t){if(e.module_registration_params&&!0===e.module_registration_params.dynamic_registration)if(serverControlParams.isDevMode)n(e);else try{n(e)}catch(e){a.errorLog(e)}})});var n=function(e){if(e=l.extend({setting_id:"",module_type:"",option_value:[],setting:{},section:{id:"",title:""},control:{}},e),l.isEmpty(e.setting_id)||l.isEmpty(e.module_type))throw a.errare("registerDynamicModuleSettingControl => args",e),new Error("registerDynamicModuleSettingControl => missing params when registrating a setting");if(!l.isArray(e.option_value)&&!l.isObject(e.option_value))throw new Error("registerDynamicModuleSettingControl => the module values must be an array or an object");var t=e.setting_id,n=e.setting;a.CZR_Helpers.register({what:"setting",id:t,dirty:!l.isEmpty(e.option_value),value:e.option_value,transport:n.transport||"refresh",type:n.type||"option",track:!1});var i=e.section;if(!l.isEmpty(i)){if(!l.has(i,"id"))throw new Error("registerDynamicModuleSettingControl => missing section id for the section of setting : "+t);a.CZR_Helpers.register({what:"section",id:i.id,title:i.title||i.id,panel:l.isEmpty(i.panel)?"":i.panel,priority:i.priority||10,track:!1})}var r,o=t,s=e.control;if(r=l.isEmpty(e.section)?s.section:e.section.id,l.isEmpty(r))throw a.errare("registerDynamicModuleSettingControl => missing section id for the control",e),new Error("registerDynamicModuleSettingControl => missing section id for the section of setting : "+t);return a.CZR_Helpers.register({what:"control",id:o,label:s.label||o,type:"czr_module",module_type:e.module_type,section:r,priority:s.priority||10,settings:{default:t},track:!1}),a.section.has(r)&&a.section(r).expanded()&&a.control(o).trigger("set-module-ready"),t}}(wp.customize,jQuery,_),function(s,a,l){s.Value.prototype.set=function(t,n){var i=this._value,e=a.Deferred(),r=this,o=[];return t=this._setter.apply(this,arguments),t=this.validate(t),args=l.extend({silent:!1},l.isObject(n)?n:{}),null===t||l.isEqual(i,t)?e.resolveWith(r,[t,i,n]).promise():(this._value=t,(this._dirty=!0)===args.silent?e.resolveWith(r,[t,i,n]).promise():this._deferreds?(l.each(r._deferreds,function(e){o.push(e.apply(null,[t,i,n]))}),a.when.apply(null,o).fail(function(){s.errorLog("A deferred callback failed in api.Value::set()")}).then(function(){r.callbacks.fireWith(r,[t,i,n]),e.resolveWith(r,[t,i,n])}),e.promise(r)):(this.callbacks.fireWith(this,[t,i,n]),e.resolveWith(r,[t,i,n]).promise(r)))},s.Value.prototype.bind=function(){var t=this,n=!1,i=[];return a.each(arguments,function(e,t){n||(n=l.isObject(t)&&t.deferred),l.isFunction(t)&&i.push(t)}),n?(t._deferreds=t._deferreds||[],l.each(i,function(e){l.contains(e,t._deferreds)||t._deferreds.push(e)})):t.callbacks.add.apply(t.callbacks,arguments),this},s.Setting.prototype.silent_set=function(e,t){var n=this._value,i=s.state("saved")();return e=this._setter.apply(this,arguments),null===(e=this.validate(e))||l.isEqual(n,e)||(this._value=e,this._dirty=l.isUndefined(t)||!l.isBoolean(t)?this._dirty:t,this.callbacks.fireWith(this,[e,n,{silent:!0}]),s.state("saved")(i)),this}}(wp.customize,jQuery,_),function(s,a,l){s.Setting.prototype.preview=function(e,t,n){var i,r=this,o=a.Deferred();return i=r.transport,l.isUndefined(t)||l.isEmpty(t)||l.isNull(t)||!l.isObject(n)||!0!==n.not_preview_sent?l.has(n,"silent")&&!1!==n.silent?o.resolve(arguments).promise():("postMessage"!==i||s.state("previewerAlive").get()||(i="refresh"),"postMessage"===i?(r.previewer.send("pre_setting",{set_id:r.id,data:n,value:e}),r.previewer.send("setting",[r.id,r()]),o.resolve(arguments)):"refresh"===i&&(r.previewer.refresh(),o.resolve(arguments)),o.promise()):o.resolve(arguments).promise()}}(wp.customize,jQuery,_),function(e,r,o){if("function"==typeof e.Section){var n=e.Section.prototype.initialize;e.Section.prototype.initialize=function(e,t){n.apply(this,[e,t]);var i=this;this.expanded.callbacks.add(function(e){if(e){var t=i.container.closest(".wp-full-overlay-sidebar-content"),n=i.container.find(".accordion-section-content");_resizeContentHeight=function(){n.css("height",t.innerHeight())},_resizeContentHeight(),r(window).on("resize.customizer-section",o.debounce(_resizeContentHeight,110))}})}}}(wp.customize,jQuery,_),function(d,u,p){d.CZR_Helpers=d.CZR_Helpers||{},d.CZR_Helpers=u.extend(d.CZR_Helpers,{setupInputCollectionFromDOM:function(){var o=this;if(!p.isFunction(o))throw new Error("setupInputCollectionFromDOM => inputParentInst is not valid.");var s=o.module,a=p.has(o(),"is_mod_opt");if(p.isEmpty(o.inputCollection())){o.czr_Input=o.czr_Input||new d.Values,o.inputConstructor=a?s.inputModOptConstructor:s.inputConstructor;var e=a?o.defaultModOptModel:o.defaultItemModel;if(p.isEmpty(e)||p.isUndefined(e))throw new Error("setupInputCollectionFromDOM => No default model found in item or mod opt "+o.id+".");var l=u.extend(!0,{},o());l=p.isObject(l)?u.extend(e,l):e;var c={};return u("."+s.control.css_attr.sub_set_wrapper,o.container).length<1&&d.errare("setupInputCollectionFromDOM => no input elements found in the DOM"),u("."+s.control.css_attr.sub_set_wrapper,o.container).each(function(e){var t=u(this).find("[data-czrtype]").attr("data-czrtype"),n=p.has(l,t)?l[t]:"";if(p.isUndefined(t)||p.isEmpty(t))d.errare("setupInputCollectionFromDOM => missing data-czrtype id for input type "+u(this).data("input-type")+" in module "+s.id+". Check that the server input template is properly declared.");else{if(!p.has(l,t))throw new Error("setupInputCollectionFromDOM => The item or mod opt property : "+t+" has been found in the DOM but not in the item or mod opt model : "+o.id+". The input can not be instantiated.");var i=u(this).data("input-type"),r={id:t,type:i,transport:u(this).data("transport")||"inherit",input_value:n,input_options:p.has(s.inputOptions,i)?s.inputOptions[i]:{},container:u(this),input_parent:o,is_mod_opt:a,module:s};d.trigger("input-args-before-instantiation",r),o.czr_Input.add(t,new o.inputConstructor(t,r)),o.czr_Input(t).ready(),c[t]=n}}),o.inputCollection(c),o}}})}(wp.customize,jQuery,_),function(i,e,r){i.CZR_Helpers=i.CZR_Helpers||{},i.CZR_Helpers=e.extend(i.CZR_Helpers,{getModuleTmpl:function(t){var n=e.Deferred();if(t=r.extend({tmpl:"",module_type:"",module_id:"",cache:!0,nonce:i.settings.nonce.save},t),(r.isEmpty(t.tmpl)||r.isEmpty(t.module_type))&&n.reject("api.CZR_Helpers.getModuleTmpl => missing tmpl or module_type param"),i.CZR_Helpers.czr_cachedTmpl=i.CZR_Helpers.czr_cachedTmpl||{},i.CZR_Helpers.czr_cachedTmpl[t.module_type]=i.CZR_Helpers.czr_cachedTmpl[t.module_type]||{},!0===t.cache&&!r.isEmpty(i.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl])&&r.isString(i.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl]))n.resolve(i.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl]);else{if(r.isObject(i.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl])&&"pending"==i.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl].state())return i.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl];i.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl]=wp.ajax.post("ac_get_template",t).done(function(e){n.resolve(e),i.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl]=e}).fail(function(e){i.errare("api.CZR_Helpers.getModuleTmpl => Problem when fetching the "+t.tmpl+" tmpl from server for module : "+t.module_id+" "+t.module_type,e),n.reject(e),r.isObject(e)&&("invalid_nonce"!==e.code&&"Bad Request"!==e.statusText||window.sektionsLocalizedData&&sektionsLocalizedData.i18n&&i.previewer.trigger("sek-notify",{type:"error",duration:3e4,message:sektionsLocalizedData.i18n["Something went wrong, please refresh this page."]}))})}return n.promise()}})}(wp.customize,jQuery,_),function(p,h,m){p.CZR_Helpers=p.CZR_Helpers||{},p.CZR_Helpers=h.extend(p.CZR_Helpers,{register:function(e){if(m.has(e,"id")){var t,n={};switch(e.what){case"setting":if(p.has(e.id))break;t=h.extend(!0,{},p.Setting.prototype.defaults);var i=m.extend(t,{dirty:!m.isUndefined(e.dirty)&&e.dirty,value:m.isUndefined(e.value)?null:e.value,transport:e.transport||"refresh",type:e.type||"option"}),r=p.settingConstructor[i.type]||p.Setting;m.isObject(e.options)&&(i=m.extend(i,e.options));try{p.add(new r(e.id,i.value,i))}catch(e){p.errare("api.CZR_Helpers::register => problem when adding a setting to the api",e)}break;case"panel":if(!m.has(e,"id"))throw new Error("registerPanel => missing panel id ");if(p.panel.has(e.id))break;t=h.extend(!0,{},p.Panel.prototype.defaults);var o=m.extend(t,{id:e.id,title:e.title||e.id,priority:m.has(e,"priority")?e.priority:0}),s=m.isObject(e.constructWith)?e.constructWith:p.Panel;m.isObject(e.options)&&(o=m.extend(o,e.options)),o=m.extend({params:o},o);try{n=p.panel.add(new s(e.id,o))}catch(e){p.errare("api.CZR_Helpers::register => problem when adding a panel to the api",e)}break;case"section":if(!m.has(e,"id"))throw new Error("registerSection => missing section id ");if(p.section.has(e.id))break;t=h.extend(!0,{},p.Section.prototype.defaults);var a=m.extend(t,{content:"",id:e.id,title:e.title,panel:e.panel,priority:e.priority,description_hidden:!1,customizeAction:serverControlParams.i18n.Customizing}),l=p.Section;m.isUndefined(e.constructWith)?!m.isEmpty(e.type)&&p.sectionConstructor[e.type]&&(l=p.sectionConstructor[e.type]):l=e.constructWith,m.isObject(e.options)&&(a=m.extend(a,e.options)),a=m.extend({params:a},a);try{n=p.section.add(new l(e.id,a))}catch(e){p.errare("api.CZR_Helpers::register => problem when adding a section to the api",e)}break;case"control":if(p.control.has(e.id))break;t=h.extend(!0,{},p.Control.prototype.defaults);var c,d=m.extend(t,{content:"",label:e.label||e.id,priority:e.priority,section:e.section,settings:e.settings,type:e.type,module_type:e.module_type,input_attrs:e.input_attrs,sek_registration_params:e}),u=p.controlConstructor[d.type]||p.Control;m.isObject(e.options)&&(d=m.extend(d,e.options)),c=m.extend({params:d},d);try{n=p.control.add(new u(e.id,c))}catch(e){p.errare("api.CZR_Helpers::register => problem when adding a control to the api",e)}break;default:p.errorLog('invalid "what" when invoking the register() method')}return n=m.isEmpty(n)?{deferred:{embedded:h.Deferred(function(){this.resolve()})}}:n,!1!==e.track&&p.trigger("czr-new-registered",e),"setting"==e.what?e:n.deferred.embedded}p.errare("register => missing id ",e)}})}(wp.customize,jQuery,_),function(i,r,o){i.CZR_Helpers=i.CZR_Helpers||{},i.CZR_Helpers=r.extend(i.CZR_Helpers,{css_loader_html:'<div class="czr-css-loader czr-mr-loader" style="display:none"><div></div><div></div><div></div></div>',getControlSettingId:function(e,t){return t="default",i.control.has(e)?!o.has(i.control(e),"settings")||o.isEmpty(i.control(e).settings)?e:o.has(i.control(e).settings,t)?o.isUndefined(i.control(e).settings[t].id)?(i.consoleLog("getControlSettingId : The requested control_id has no setting id assigned : "+e),e):i.control(e).settings[t].id:(i.consoleLog("getControlSettingId : The requested control_id does not have the requested setting type : "+e+" , "+t),e):e},getDocSearchLink:function(e){var t=(e=o.isString(e)?e:"").replace(/ /g,"+");return['<a href="'+[serverControlParams.docURL,"search?query=",t].join("")+'" title="'+serverControlParams.i18n.readDocumentation+'" target="_blank">'," ",'<span class="far fa-question-circle-o"></span>'].join("")},build_setId:function(e){return o.isUndefined(window.themeServerControlParams)||!o.isArray(themeServerControlParams.wpBuiltinSettings)?e:o.contains(themeServerControlParams.wpBuiltinSettings,e)?e:o.contains(themeServerControlParams.themeSettingList,e)&&-1==e.indexOf(themeServerControlParams.themeOptions)?[themeServerControlParams.themeOptions+"[",e,"]"].join(""):e},getOptionName:function(e){if(o.isEmpty(window.themeServerControlParams)||o.isEmpty(themeServerControlParams.themeOptions))return e;return-1==e.indexOf(themeServerControlParams.themeOptions)?e:e.replace(/\[|\]/g,"").replace(themeServerControlParams.themeOptions,"")},hasPartRefresh:function(n){if(o.has(i,"czr_partials"))return o.contains(o.map(i.czr_partials(),function(e,t){return o.contains(e.settings,n)}),!0)},getSectionControlIds:function(e){return e=e||i.czr_activeSectionId(),i.section.has(e)?o.map(i.section(e).controls(),function(e){return e.id}):[]},getSectionSettingIds:function(e){if(e=e||i.czr_activeSectionId(),i.section.has(e)){var n=[],t=this.getSectionControlIds(e);return o.each(t,function(e){o.each(i.control(e).settings,function(e,t){n.push(e.id)})}),n}},capitalize:function(e){return o.isString(e)?e.charAt(0).toUpperCase()+e.slice(1):e},truncate:function(e,t,n){if(!o.isString(e))return"";t=t||20;var i=e.length>t,r=i?e.substr(0,t-1):e;return r=n&&i?r.substr(0,r.lastIndexOf(" ")):r,i?r+"...":r},isMultiItemModule:function(e,t){if(!o.isUndefined(e)||o.isObject(t)){if(o.isObject(t)&&o.has(t,"module_type"))e=t.module_type;else if(o.isUndefined(e)||o.isNull(e))return;if(o.has(i.czrModuleMap,e))return i.czrModuleMap[e].crud||i.czrModuleMap[e].multi_item||!1}},isCrudModule:function(e,t){if(!o.isUndefined(e)||o.isObject(t)){if(o.isObject(t)&&o.has(t,"module_type"))e=t.module_type;else if(o.isUndefined(e)||o.isNull(e))return;if(o.has(i.czrModuleMap,e))return i.czrModuleMap[e].crud||!1}},hasModuleModOpt:function(e,t){if(!o.isUndefined(e)||o.isObject(t)){if(o.isObject(t)&&o.has(t,"module_type"))e=t.module_type;else if(o.isUndefined(e)||o.isNull(e))return;if(o.has(i.czrModuleMap,e))return i.czrModuleMap[e].has_mod_opt||!1}},removeInputCollection:function(){var t=this;if(!o.isFunction(t))throw new Error("removeInputCollection : inputParentInst is not valid.");o.has(t,"czr_Input")&&(t.czr_Input.each(function(e){t.czr_Input.remove(e.id)}),t.inputCollection({}))},refreshModuleControl:function(e){var t=i.controlConstructor.czr_module,n=(i.control(e).params.type,i.settings.controls[e]);r.when(i.control(e).container.remove()).done(function(){i.control.remove(e),i.control.add(e,new t(e,{params:n,previewer:i.previewer}))})},isChecked:function(e){return o.isBoolean(e)?e:o.isNumber(e)?0<e:!!o.isString(e)&&("0"!==e&&""!==e&&"off"!==e)},hexToRgb:function(t){try{t=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,t,n,i){return t+t+n+n+i+i})}catch(e){return i.errorLog("Error in Helpers::hexToRgb : "+e),t}var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return"rgb("+(e=e?[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]:[]).join(",")+")"},rgbToHex:function(e,t,n){var i=function(e){var t=e.toString(16);return 1==t.length?"0"+t:t};return"#"+i(e)+i(t)+i(n)},parseTemplate:o.memoize(function(t){var n,i={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};return function(e){return(n=n||o.template(t,i))(e)}})})}(wp.customize,jQuery,_),function(a,l,c){a.CZR_Helpers=a.CZR_Helpers||{},a.CZR_Helpers=l.extend(a.CZR_Helpers,{addActions:function(e,t,n){(n=n||this)[e]=n[e]||[],new_event_map=c.clone(n[e]),n[e]=c.union(new_event_map,c.isArray(t)?t:[t])},doActions:function(e,t,n){t.trigger(e,n)},setupDOMListeners:function(e,r,o){var s=this;o=o||s,c.isArray(e)?c.isObject(r)?(r=c.extend({model:{},dom_el:{}},r)).dom_el instanceof jQuery&&!(r.dom_el.length<1)?c.map(e,function(i){if(c.isString(i.selector)&&!c.isEmpty(i.selector))if(c.isString(i.selector)&&!c.isEmpty(i.selector)){var e=i.name&&!c.isEmpty(i.name)?i.name:[i.trigger,i.selector].join(""),t=r.dom_el.data("czr-listener-collection");if(t&&c.isArray(t)){if(t=c.isArray(t)?t:[],c.contains(t,e))return void a.errare("setupDOMListeners : aborting because listener already created for event : "+e);t.push(e)}else t=[e];r.dom_el.data("czr-listener-collection",t),r.dom_el.on(i.trigger,i.selector,function(e,t){if(e.stopPropagation(),!a.utils.isKeydownButNotEnterEvent(e)){e.preventDefault();var n=l.extend(!0,{},r);if(c.has(n,"model")&&c.has(n.model,"id")&&(c.has(o,"get")?n.model=o():n.model=o.getModel(n.model.id)),l.extend(n,{event:i,dom_event:e}),l.extend(n,t),c.has(n,"event")&&c.has(n.event,"actions"))if(serverControlParams.isDevMode)s.executeEventActionChain(n,o);else try{s.executeEventActionChain(n,o)}catch(e){a.errare("In setupDOMListeners : problem when trying to fire actions : "+n.event.actions,e)}else a.errare("executeEventActionChain : missing obj.event or obj.event.actions")}})}else a.errare("setupDOMListeners : selector must be a string not empty. Aborting setup of action(s) : "+i.actions.join(","));else a.errare("setupDOMListeners : selector must be a string not empty. Aborting setup of action(s) : "+i.actions.join(","))}):a.errare("setupDomListeners : dom element should be an existing dom element",r):a.errare("setupDomListeners : args should be an object",e):a.errare("setupDomListeners : event_map should be an array",r)},executeEventActionChain:function(i,r){var o=this;if("function"==typeof i.event.actions)return i.event.actions.call(r,i);c.isArray(i.event.actions)||(i.event.actions=[i.event.actions]);var s=!1;c.map(i.event.actions,function(e){if(!s){var t=function(){};if("function"==typeof e)t=e;else{if("function"!=typeof r[e])throw new Error("executeEventActionChain : the action : "+e+" has not been found when firing event : "+i.event.selector);t=r[e]}var n=c.has(i,"dom_el")&&-1!=i.dom_el.length?i.dom_el:o.container;"string"==typeof e&&n.trigger("before_"+e,c.omit(i,"event")),!1===t.call(r,i)&&(s=!0),"string"==typeof e&&n.trigger("after_"+e,c.omit(i,"event"))}})}})}(wp.customize,jQuery,_),function(i,e,r){i.czr_wpQueryDataReady=i.czr_wpQueryDataReady||e.Deferred(),i.czr_wpQueryInfos=i.czr_wpQueryInfos||new i.Value,i.bind("ready",function(){i.previewer.bind("czr-query-data-ready",function(e){i.czr_wpQueryInfos(e),"pending"==i.czr_wpQueryDataReady.state()&&i.czr_wpQueryDataReady.resolve(e)}),i.previewer.bind("czr-partial-refresh-data",function(e){i.czr_partials=i.czr_partials||new i.Value,i.czr_partials.set(e)}),i.previewer.bind("czr-partial-refresh-done",function(e){if(r.has(e,"set_id")){var t=i.CZR_Helpers.build_setId(e.set_id);if(i.has(t)){var n=i.CZR_Helpers.getControlSettingId(t);i.control.has(n)&&i.control(n).trigger("czr-partial-refresh-done")}}})})}(wp.customize,jQuery,_);var CZRInputMths=CZRInputMths||{};!function(r,o,a){o.extend(CZRInputMths,{initialize:function(e,t){if(a.isUndefined(t.input_parent)||a.isEmpty(t.input_parent))throw new Error("No input_parent assigned to input "+t.id+". Aborting");if(a.isUndefined(t.module))throw new Error("No module assigned to input "+t.id+". Aborting");r.Value.prototype.initialize.call(this,null,t);var n=this;o.extend(n,t||{}),n.constructorOptions=o.extend(!0,{},t),n.isReady=o.Deferred(),a.isUndefined(t.input_value)||n.set(t.input_value);if(n.input_event_map=[{trigger:o.trim(["change",{text:"keyup",textarea:"keyup",password:"keyup",color:"colorpickerchange",range:"input propertychange"}[n.type]||""].join(" ")),selector:"input[data-czrtype], select[data-czrtype], textarea[data-czrtype]",name:"set_input_value",actions:function(e){if(!a.has(n.input_parent,"syncElements")||!a.has(n.input_parent.syncElements,n.id))throw new Error("WARNING : THE INPUT "+n.id+" HAS NO SYNCED ELEMENT.")}}],r.czrInputMap&&a.has(r.czrInputMap,n.type)){var i=r.czrInputMap[n.type];if(a.isFunction(n[i]))try{n[i](t.input_options||null)}catch(e){r.errare("Error in input init => for input id :"+n.id+" in module type : "+n.module.module_type,e)}else if(a.isFunction(r.czrInputMap[n.type]))try{r.czrInputMap[n.type].apply(n,[t.input_options||null])}catch(e){r.errare("Error in input init => for input id :"+n.id+" in module type : "+n.module.module_type,e)}}else r.errare("Warning the input : "+n.id+" with type "+n.type+" has no corresponding method defined in api.czrInputMap.");n.visible=new r.Value(!0),n.isReady.done(function(){n.visible.bind(function(e){e?n.container.stop(!0,!0).slideDown(200):n.container.stop(!0,!0).slideUp(200)})}),n.enabled=new r.Value(!0),n.isReady.done(function(){n.enabled.bind(function(e){n.container.toggleClass("disabled",!e)})})},ready:function(){var e=this;e.setupDOMListeners(e.input_event_map,{dom_el:e.container},e),e.callbacks.add(function(){return e.inputReact.apply(e,arguments)}),o.when(e.setupSynchronizer()).done(function(){e.isReady.resolve(e)})},setupSynchronizer:function(){var e=this,t=e.input_parent,n=e.container.find("[data-czrtype]"),i=(e.container.find("[data-czrtype]").is("textarea"),new r.Element(n));t.syncElements=t.syncElements||{},(t.syncElements[e.id]=i).sync(e),i.set(e())},inputReact:function(e,t,n){var i=this,r=i.input_parent(),o=a.clone(r),s=i.is_preItemInput;i.enabled()&&((o=!a.isObject(o)||a.isEmpty(o)?{}:o)[i.id]=e,i.input_parent.set(o,{input_changed:i.id,input_value:i(),input_transport:i.transport,not_preview_sent:"postMessage"===i.transport,inputRegistrationParams:i.constructorOptions}),s||(i.input_parent.trigger(i.id+":changed",e),a.isEmpty(t)&&(a.isUndefined(t)||"postMessage"!==i.transport)||i.module.sendInputToPreview({input_id:i.id,input_parent_id:i.input_parent.id,to:e,from:t})))},setupColorPicker:function(){this.container.find("input").iris({palettes:!0,hide:!1,change:function(e,t){o(this).val(t.color.toString()).trigger("colorpickerchange").trigger("change")}})},setupColorPickerAlpha:function(){var n=this;n.container.find("input").wpColorPicker({palettes:!0,width:1440<=window.innerWidth?271:251,change:function(e,t){o(this).val(t.color.toString()).trigger("colorpickerchange").trigger("change")},clear:function(e,t){n("")}})},setupSelect:function(){o("select",this.container).not(".no-selecter-js").each(function(){o(this).selecter({})})},setupIcheck:function(e){o("input[type=checkbox]",this.container).each(function(e){0===o(this).closest('div[class^="icheckbox"]').length&&o(this).iCheck({checkboxClass:"icheckbox_flat-grey",checkedClass:"checked",radioClass:"iradio_flat-grey"}).on("ifChanged",function(e){o(this).val(!1===o(this).is(":checked")?0:1),o(e.currentTarget).trigger("change")})})},setupGutenCheck:function(e){var t=this.container.find("input[type=checkbox]"),n=o(".czr-toggle-check",this.container),i=function(){t.closest(".czr-toggle-check").toggleClass("is-checked",t.is(":checked")),n.find("svg").remove(),n.append(t.is(":checked")?'<svg class="czr-toggle-check__on" width="2" height="6" aria-hidden="true" role="img" focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2 6"><path d="M0 0h2v6H0z"></path></svg>':'<svg class="czr-toggle-check__off" width="6" height="6" aria-hidden="true" role="img" focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 6 6"><path d="M3 1.5c.8 0 1.5.7 1.5 1.5S3.8 4.5 3 4.5 1.5 3.8 1.5 3 2.2 1.5 3 1.5M3 0C1.3 0 0 1.3 0 3s1.3 3 3 3 3-1.3 3-3-1.3-3-3-3z"></path></svg>')};t.on("change",i),i()},setupRadio:function(e){o("input[type=radio]",this.container).each(function(e){0===o(this).closest('div[class^="icheckbox"]').length&&o(this).iCheck({checkboxClass:"icheckbox_flat-grey",checkedClass:"checked",radioClass:"iradio_flat-grey"}).on("ifChanged",function(e){o(e.currentTarget).trigger("change")})})},setupStepper:function(e){o('input[type="number"]',this.container).each(function(e){o(this).stepper()})},setupSimpleRange:function(){},setupRangeSlider:function(e){var n,i=this,r=function(e,t){var n=i.container.find("input").data("unit");e.textContent=t+(a.isEmpty(i.container.find("input").data("unit"))?"":n)};o(i.container).find("input").rangeslider({polyfill:!1,rangeClass:"rangeslider",disabledClass:"rangeslider--disabled",horizontalClass:"rangeslider--horizontal",verticalClass:"rangeslider--vertical",fillClass:"rangeslider__fill",handleClass:"rangeslider__handle",onInit:function(){n=o(".rangeslider__handle",this.$range),o(".rangeslider__handle",this.$range),r(n[0],this.value)},onSlide:function(e,t){r(n[0],t)}})},setupHAlignement:function(e){var t=this,n=o(".sek-h-align-wrapper",t.container);n.find('div[data-sek-align="'+t()+'"]').addClass("selected"),n.on("click","[data-sek-align]",function(e){e.preventDefault(),n.find(".selected").removeClass("selected"),o.when(o(this).addClass("selected")).done(function(){t(o(this).data("sek-align"))})})}})}(wp.customize,jQuery,_);CZRInputMths=CZRInputMths||{};!function(r,i,o){i.extend(CZRInputMths,{setupImageUploaderSaveAsId:function(){this.setupImageUploader()},setupImageUploaderSaveAsUrl:function(){this.setupImageUploader({save_as_url:!0})},setupImageUploader:function(e){var t=this,n=t();if(e=o.extend({save_as_url:!1},e||{}),t.save_as_url=e.save_as_url,t.attachment={},!t.container)return this;t.tmplRendered=i.Deferred(),t.setupContentRendering(n,{}),t.tmplRendered.done(function(){t.czrImgUploaderBinding()}).fail(function(){r.errorLog("setupImageUploader => failed to fetch the template.")})},setupContentRendering:function(e,t){var n,i=this;i.attachment.id!=e&&t!==e?(o.isEmpty(e)?(i.attachment={},i.renderImageUploaderTemplate()):o.isNumber(e)||i.renderImageUploaderTemplate({fromUrl:!0,url:e}),n=wp.media.attachment(e),o.isObject(n)&&o.has(n,"attributes")&&o.has(n.attributes,"sizes")?(i.attachment=n.attributes,i.renderImageUploaderTemplate()):o.isNumber(e)&&wp.media.attachment(e).fetch().done(function(){i.attachment=this.attributes,i.renderImageUploaderTemplate()}).fail(function(){r.errorLog("renderImageUploaderTemplate => failed attempt to fetch an img with id : "+e)})):i.attachment.id&&i.attachment.id!==e||i.renderImageUploaderTemplate()},czrImgUploaderBinding:function(){var n=this;o.bindAll(n,"czrImgUploadRemoveFile","czrImgUploadOpenFrame","czrImgUploadSelect"),n.container.on("click keydown",".upload-button",n.czrImgUploadOpenFrame),n.container.on("click keydown",".thumbnail-image img",n.czrImgUploadOpenFrame),n.container.on("click keydown",".remove-button",n.czrImgUploadRemoveFile),n.bind(n.id+":changed",function(e,t){n.tmplRendered=i.Deferred(),n.setupContentRendering(e,t)})},czrImgUploadOpenFrame:function(e){r.utils.isKeydownButNotEnterEvent(e)||(e.preventDefault(),this.frame||this.czrImgUploadInitFrame(),this.frame.open())},czrImgUploadInitFrame:function(){var e=this.getUploaderLabels();this.frame=wp.media({button:{text:e.frame_button},states:[new wp.media.controller.Library({title:e.frame_title,library:wp.media.query({type:"image"}),multiple:!1,date:!1})]}),this.frame.on("select",this.czrImgUploadSelect)},czrImgUploadRemoveFile:function(e){r.utils.isKeydownButNotEnterEvent(e)||(e.preventDefault(),this.attachment={},this.set(""))},czrImgUploadSelect:function(){var e=this.frame.state().get("selection").first().toJSON();window._wpmejsSettings;this.attachment=e,this.set(this.save_as_url?e.url:e.id)},renderImageUploaderTemplate:function(e){var t=this;e=o.extend({fromUrl:!1,url:""},e||{});var n=t.container.find("."+t.module.control.css_attr.img_upload_container);if(n.length&&!(t.container.length<1)){var i={button_labels:t.getUploaderLabels(),settings:t.id,attachment:t.attachment,fromUrl:e.url,canUpload:!0};return r.CZR_Helpers.getModuleTmpl({tmpl:"img-uploader",module_type:"all_modules",module_id:t.module.id}).done(function(e){n.html(r.CZR_Helpers.parseTemplate(e)(i)),t.tmplRendered.resolve(),t.container.trigger(t.id+":content_rendered")}).fail(function(e){t.tmplRendered.reject("renderImageUploaderTemplate => Problem when fetching the tmpl from server for module : "+t.module.id)}),!0}},getUploaderLabels:function(){var e=serverControlParams.i18n,n=this,t={select:e.select_image,change:e.change_image,remove:e.remove_image,default:e.default_image,placeholder:e.placeholder_image,frame_title:e.frame_title_image,frame_button:e.frame_button_image},i={};return o.each(t,function(e,t){if(o.isEmpty(e))return r.errorLog("A translated string is missing ( "+t+" ) for the image uploader input in module : "+n.module.id),void(i[t]=t);i[t]=e}),i}})}(wp.customize,jQuery,_);CZRInputMths=CZRInputMths||{};!function(s,a,l){a.extend(CZRInputMths,{setupContentPicker:function(e){var r=this;a.extend(l.isObject(e)?e:{},{post:"",taxonomy:""}),r.wpObjectTypes=e,r.container.find(".czr-input").append('<select data-select-type="content-picker-select" class="js-example-basic-simple"></select>'),r.input_event_map=[{trigger:"change",selector:"select[data-select-type]",name:"set_input_value",actions:function(e){var t=a(e.dom_event.currentTarget,e.dom_el),n=a(t,e.dom_el).czrSelect2("data"),i={};n=l.isArray(n)?n[0]:n,l.isObject(n)&&!l.isEmpty(n)?(l.each({id:"",type_label:"",title:"",object_type:"",url:""},function(e,t){"_custom_"===n.id||l.has(n,t)&&!l.isEmpty(n[t])?i[t]=n[t]:s.errare("content_picker : missing input param : "+t)}),r.set(i)):s.errare("Content Picker Input : the picked value should be an object not empty.")}}],r.isReady.done(function(){r.setupContentSelecter()})},setupContentSelecter:function(){var o=this;if(!l.isEmpty(o())){var e={value:o().id||"",title:o().title||"",selected:"selected"};o.container.find("select").append(a("<option>",e))}o.currentAjaxAction=o.currentAjaxAction||new s.Value,o.currentAjaxAction.bind(function(e){o.defaultValueHasBeenPushed=!1}),o.container.find("select").on("czrSelect2:select czrSelect2:unselect czrSelect2:close czrSelect2:open",function(e){o.defaultValueHasBeenPushed=!1}),o.container.find("select").czrSelect2({placeholder:{id:"-1",title:"Select"},data:o.setupSelectedContents(),ajax:{url:wp.ajax.settings.url,type:"POST",dataType:"json",delay:250,debug:!0,data:function(e){var t=e.page?e.page:0;return t=e.term?e.page:t,o.currentAjaxAction(e.term?"search-available-content-items-customizer":"load-available-content-items-customizer"),{action:o.currentAjaxAction(),search:e.term,wp_customize:"on",page:t,wp_object_types:JSON.stringify(o.wpObjectTypes),nonce:s.settings.nonce.save}},processResults:function(e,t){var n={defaultOption:{id:"",title:"",type_label:"",object_type:"",url:""}};if(o.input_parent&&o.input_parent.module?o.input_parent.module.trigger("set_default_content_picker_options",{defaultContentPickerOption:n}):s.infoLog(' content_picker input => ::processResults => event "set_default_content_picker_option" not triggered when in pre-item'),!e.success)return s.errare("request failure in setupContentPicker => processResults",e),{results:n.defaultOption};var i=e.data.items,r=[];return i=l.isArray(i)?i:[],o.defaultValueHasBeenPushed=o.defaultValueHasBeenPushed||!1,"load-available-content-items-customizer"!==o.currentAjaxAction()||l.isEmpty(n.defaultOption)||n.defaultOption.id&&!o.defaultValueHasBeenPushed&&(r.push(n.defaultOption),o.defaultValueHasBeenPushed=!0),l.each(i,function(e){r.push({id:e.id,title:e.title,type_label:e.type_label,object_type:e.object,url:e.url})}),{results:r,pagination:{more:1<=i.length}}}},templateSelection:o.czrFormatContentSelected,templateResult:o.czrFormatContentSelected,escapeMarkup:function(e){return e}})},czrFormatContentSelected:function(e){if(e.loading)return e.text;var t="<div class='content-picker-item clearfix'><div class='content-item-bar'><span class='czr-picker-item-title'>"+e.title+"</span>";return e.type_label&&(t+="<span class='czr-picker-item-type'>"+e.type_label+"</span>"),t+="</div></div>"},setupSelectedContents:function(){return this()}})}(wp.customize,jQuery,_);var CZRItemMths=CZRItemMths||{};!function(r,o,s){o.extend(CZRItemMths,{initialize:function(e,t){if(s.isUndefined(t.module)||s.isEmpty(t.module))throw new Error("No module assigned to item "+e+". Aborting");var n=this;r.Value.prototype.initialize.call(n,null,t),n.isReady=o.Deferred(),n.embedded=o.Deferred(),n.container=null,n.contentContainer=null,n.czr_Input=new r.Values,n.inputCollection=new r.Value({}),n.viewState=new r.Value("closed"),n.removeDialogVisible=new r.Value(!1),o.extend(n,t||{}),n.defaultItemModel=s.clone(t.defaultItemModel)||{id:"",title:""};var i=o.extend(n.defaultItemModel,t.initial_item_model);i=n.validateItemModelOnInitialize(i),n.set(i),n.userEventMap=new r.Value([{trigger:"click keydown",selector:["."+n.module.control.css_attr.display_alert_btn,"."+n.module.control.css_attr.cancel_alert_btn].join(","),name:"toggle_remove_alert",actions:function(){var e=this.removeDialogVisible();this.module.closeRemoveDialogs(),this.removeDialogVisible(!e)}},{trigger:"click keydown",selector:"."+n.module.control.css_attr.remove_view_btn,name:"remove_item",actions:["removeItem"]},{trigger:"click keydown",selector:["."+n.module.control.css_attr.edit_view_btn,"."+n.module.control.css_attr.item_title].join(","),name:"edit_view",actions:["setViewVisibility"]},{trigger:"click keydown",selector:".tabs nav li",name:"tab_nav",actions:function(e){var t=o(e.dom_event.currentTarget,e.dom_el).data("tab-id");this.module.toggleTabVisibility.call(this,t),this.trigger("tab-switch",{id:t})}}]),n.isReady.done(function(){n.module.updateItemsCollection({item:n()}),n.callbacks.add(function(){return n.itemReact.apply(n,arguments)}),n.bind("contentRendered",function(){if(s.isEmpty(n.inputCollection()))if(serverControlParams.isDevMode)r.CZR_Helpers.setupInputCollectionFromDOM.call(n),n.module.setupTabNav.call(n);else try{r.CZR_Helpers.setupInputCollectionFromDOM.call(n),n.module.setupTabNav.call(n)}catch(e){r.errorLog("In item.isReady.done : "+e)}}),n.bind("contentRemoved",function(){s.has(n,"czr_Input")&&r.CZR_Helpers.removeInputCollection.call(n)}),n.canBeRendered()&&n.mayBeRenderItemWrapper(),n.embedded.done(function(){n.itemWrapperViewSetup(i)})})},ready:function(){this.isReady.resolve()},canBeRendered:function(){return!0},validateItemModelOnInitialize:function(e){return e},itemReact:function(e,t,n){var i=this,r=i.module;n=n||{},r.updateItemsCollection({item:e,params:n}).done(function(){i.writeItemViewTitle(e,n)})}})}(wp.customize,jQuery,_);CZRItemMths=CZRItemMths||{};!function(s,a,l){a.extend(CZRItemMths,{_sendItem:function(n,e){var t=this,i=t.module,r=[];l.each(e,function(e,t){e!=n[t]&&r.push(t)}),l.each(r,function(e){s.previewer.send("sub_setting",{set_id:i.control.id,id:n.id,changed_prop:e,value:n[e]}),i.trigger("item_sent",{item:n,dom_el:t.container,changed_prop:e})})},removeItem:function(e){var t=this,n=this.module,i=l.clone(n.itemCollection());n.trigger("pre_item_dom_remove",t()),t._destroyView(),i=l.without(i,l.findWhere(i,{id:t.id})),n.itemCollection.set(i),n.trigger("pre_item_api_remove",t());var r=a.extend(!0,{},t());if(n.czr_Item.remove(t.id),"postMessage"!=s(n.control.id).transport||!l.has(e,"dom_event")||l.has(e.dom_event,"isTrigger")||s.CZR_Helpers.hasPartRefresh(n.control.id))n.trigger("item-removed",r),n.control.trigger("item-removed",r);else{var o=function(){s.previewer.unbind("ready",o),n.trigger("item-removed",r)};s.previewer.bind("ready",o),s.previewer.refresh()}},getModel:function(e){return this()}})}(wp.customize,jQuery,_);CZRItemMths=CZRItemMths||{};!function(c,d,u){d.extend(CZRItemMths,{mayBeRenderItemWrapper:function(){var t=this;"pending"==t.embedded.state()&&(!u.isEmpty(t.container)&&0<t.container.length||d.when(t.renderItemWrapper()).done(function(e){if(t.container=e,u.isUndefined(t.container)||!t.container.length)throw new Error("In mayBeRenderItemWrapper the Item view has not been rendered : "+t.id);t.embedded.resolve()}))},renderItemWrapper:function(e){var t,n,i=this,r=i.module,o=d.Deferred(),s=d.extend(!0,{},e||i()),a=function(e){r.isMultiItem()&&(u.isEmpty(e)&&o.reject("renderItemWrapper => Missing html template for module : "+r.id),t.append(e)),t.append(d("<div/>",{class:r.control.css_attr.item_content})),o.resolve(t)};if(i.trigger("item-model-before-item-wrapper-template-injection",s),t=d("<li>",{class:r.control.css_attr.single_item,"data-id":s.id,id:s.id}),r.itemsWrapper.append(t),r.isMultiItem())if(u.isEmpty(r.rudItemPart)){var l={tmpl:"rud-item-part",module_type:"all_modules",module_id:r.id,control_id:r.control.id};i.trigger("item-wrapper-tmpl-params-before-fetching",l),u.isEmpty(r[l.tmpl])?c.CZR_Helpers.getModuleTmpl(l).done(function(e){a(c.CZR_Helpers.parseTemplate(e)({is_sortable:r.sortable}))}).fail(function(e){o.reject("renderItemWrapper => Problem when fetching the rud-item-part tmpl from server for module : "+r.id)}):(n=r.getTemplateSelectorPart(l.tmpl,s),d("#tmpl-"+n).length<1&&o.reject("Missing template for item "+i.id+". The provided template script has no been found : #tmpl-"+n),a(wp.template(n)(s)))}else n=r.getTemplateSelectorPart("rudItemPart",s),d("#tmpl-"+n).length<1&&o.reject("Missing template for item "+i.id+". The provided template script has no been found : #tmpl-"+n),a(wp.template(n)(s));else a();return o.promise()},itemWrapperViewSetup:function(e){var r=this,i=this.module;item_model=r()||r.initial_item_model,r.writeItemViewTitle();var o=function(e,t,n){if(u.isUndefined(e)||!1===e.length)throw new Error("Module : "+r.module.id+", the item content has not been rendered for "+r.id);r.contentContainer=e,r.trigger("contentRendered",{item_content:e}),r.toggleItemExpansion(t,r.module.isMultiItem()?150:0),r.cleanLoader()};r.module.isMultiItem()?r.viewState.callbacks.add(function(t,e){var n=-1!==t.indexOf("expanded");i.hasModOpt()&&n&&c.czr_ModOptVisible(!1,{module:i,focus:!1}),n?u.isObject(r.contentContainer)&&!1!==r.contentContainer.length?r.toggleItemExpansion(t):(r.printLoader(),r.renderItemContent(r()||r.initial_item_model).done(function(e){o(e,t)}).fail(function(e){c.errorLog("multi-item module => failed item.renderItemContent for module : "+i.id,e)})):r.toggleItemExpansion(t).done(function(){u.isObject(r.contentContainer)&&!1!==r.contentContainer.length&&(r.trigger("beforeContenRemoved"),d("."+i.control.css_attr.item_content,r.container).children().each(function(){d(this).remove()}),d("."+i.control.css_attr.item_content,r.container).html(""),r.contentContainer=null,r.trigger("contentRemoved"))})}):(r.viewState.callbacks.add(function(e,t){r.toggleItemExpansion.apply(r,[e,0])}),r.printLoader(),r.renderItemContent(item_model).done(function(e){o(e,!0)}).fail(function(e){c.errare("mono-item module => failed item.renderItemContent for module : "+i.id,e)})),c.CZR_Helpers.setupDOMListeners(r.userEventMap(),{model:item_model,dom_el:r.container},r),r.removeDialogVisible.bind(function(e){var t=r.module,n=d("."+t.control.css_attr.remove_alert_wrapper,r.container).first();if(e&&t.closeAllItems(),e&&t.hasModOpt()&&c.czr_ModOptVisible(!1,{module:t,focus:!1}),e&&u.has(t,"preItem")&&t.preItemExpanded(!1),d("."+t.control.css_attr.remove_alert_wrapper,r.container).not(n).each(function(){d(this).hasClass("open")&&d(this).slideToggle({duration:200,done:function(){d(this).toggleClass("open",!1),d(this).siblings().find("."+t.control.css_attr.display_alert_btn).toggleClass("active",!1)}})}),e)if(u.isEmpty(t.alertPart))c.CZR_Helpers.getModuleTmpl({tmpl:"rud-item-alert-part",module_type:"all_modules",module_id:t.id,control_id:t.control.id}).done(function(e){n.html(c.CZR_Helpers.parseTemplate(e)({title:r().title||r.id})),r.trigger("remove-dialog-rendered")}).fail(function(e){c.errare("item.removeDialogVisible => Problem when fetching the tmpl from server for module : "+t.id,e)});else{if(d("#tmpl-"+t.alertPart).length<1||u.isEmpty(r.container))return void c.errare("No removal alert template available for items in module :"+t.id);n.html(wp.template(t.alertPart)({title:r().title||r.id})),r.trigger("remove-dialog-rendered")}var i=function(e){n.toggleClass("open",e),r.container.find("."+t.control.css_attr.display_alert_btn).toggleClass("active",e),e&&t._adjustScrollExpandedBlock(r.container)};e?n.stop(!0,!0).slideDown(200,function(){i(e)}):n.stop(!0,!0).slideUp(200,function(){i(e)})})},renderItemContent:function(e){var n=this,i=this.module,r=d.Deferred(),t=d.extend(!0,{},e||n());n.trigger("item-model-before-item-content-template-injection",t);var o=function(e){u.isEmpty(e)&&r.reject("renderItemContent => Missing html template for module : "+i.id);var t=d("."+i.control.css_attr.item_content,n.container);d(e).appendTo(t),r.resolve(t)};if(!u.isEmpty(i.itemInputList)||u.isFunction(i.itemInputList)){var s=i.getTemplateSelectorPart("itemInputList",t);d("#tmpl-"+s).length<1?r.reject("renderItemContent => No itemInputList content template defined for module "+i.id+". The template script id should be : #tmpl-"+s):o(wp.template(s)(t))}else{var a={tmpl:"item-inputs",module_type:i.module_type,module_id:i.id,control_id:i.control.id,item_model:t};i.trigger("filter-request-params-before-fetching-for-item-content-tmpl",a),c.CZR_Helpers.getModuleTmpl(a).done(function(e){o(c.CZR_Helpers.parseTemplate(e)(d.extend(t,{control_id:i.control.id})))}).fail(function(e){r.reject(e)})}return r.promise()},writeItemViewTitle:function(e){var t=this,n=t.module,i=e||t(),r=u.has(i,"title")&&!u.isEmpty(i.title)?c.CZR_Helpers.capitalize(i.title):i.id;r=c.CZR_Helpers.truncate(r,20),d("."+n.control.css_attr.item_title,t.container).text(r),c.CZR_Helpers.doActions("after_writeViewTitle",t.container,i,t)},setViewVisibility:function(e,t){var n=this.module;t?this.viewState.set("expanded_noscroll"):(n.closeAllItems(this.id),u.has(n,"preItem")&&n.preItemExpanded.set(!1),this.viewState.set("expanded"==this._getViewState()?"closed":"expanded"))},_getViewState:function(){return-1==this.viewState().indexOf("expanded")?"closed":"expanded"},toggleItemExpansion:function(n,e){var t="closed"!=n,i=this,r=this.module,o=d("."+r.control.css_attr.item_content,i.container).first(),s=d.Deferred(),a=function(e){i.container.toggleClass("open",e),e&&r.closeRemoveDialogs();var t=o.siblings().find("."+r.control.css_attr.edit_view_btn);t.toggleClass("active",e),e?t.removeClass("fa-pencil-alt").addClass("fa-minus-square").attr("title",serverControlParams.i18n.close):t.removeClass("fa-minus-square").addClass("fa-pencil-alt").attr("title",serverControlParams.i18n.edit),"expanded"==n&&r._adjustScrollExpandedBlock(i.container),s.resolve()};return e=u.isUndefined(e)?150:e,t?o.stop(!0,!0).slideDown(e,function(){a(t)}):o.stop(!0,!0).slideUp(0,function(){a(t)}),s.promise()},_destroyView:function(e){this.container.fadeOut({duration:e||400,done:function(){d(this).remove()}})},printLoader:function(){var e=this;e.container.css({position:"relative"}).append(c.CZR_Helpers.css_loader_html).find(".czr-css-loader").fadeIn("fast"),clearTimeout(d.data(this,"_czr_loader_active_timer_")),d.data(this,"_czr_loader_active_timer_",setTimeout(function(){e.cleanLoader()},5e3))},cleanLoader:function(){this.container.css({"min-height":""}).find(".czr-css-loader").remove()}})}(wp.customize,jQuery,_);var CZRModOptMths=CZRModOptMths||{};!function(r,o,s){o.extend(CZRModOptMths,{initialize:function(e){if(s.isUndefined(e.module)||s.isEmpty(e.module))throw new Error("No module assigned to modOpt.");var t=this;r.Value.prototype.initialize.call(t,null,e),t.isReady=o.Deferred(),t.container=null,t.inputCollection=new r.Value({}),o.extend(t,e||{}),t.defaultModOptModel=s.clone(e.defaultModOptModel)||{is_mod_opt:!0};var n=o.extend(t.defaultModOptModel,e.initial_modOpt_model),i=t.module.control;t.set(n),t.isReady.done(function(){o("."+i.css_attr.edit_modopt_icon,i.container).length||o.when(i.container.find(".customize-control-title").first().append(o("<span/>",{class:[i.css_attr.edit_modopt_icon,"fas fa-cog"].join(" "),title:serverControlParams.i18n.Settings}))).done(function(){o("."+i.css_attr.edit_modopt_icon,i.container).fadeIn(400)}),r.CZR_Helpers.setupDOMListeners([{trigger:"click keydown",selector:"."+i.css_attr.edit_modopt_icon,name:"toggle_mod_option",actions:function(){r.czr_ModOptVisible(!r.czr_ModOptVisible(),{module:t.module,focus:!1})}}],{dom_el:i.container},t)})},ready:function(){this.isReady.resolve()}})}(wp.customize,jQuery,_);CZRModOptMths=CZRModOptMths||{};!function(o,s,a){s.extend(CZRModOptMths,{modOptWrapperViewSetup:function(e){var n=this,i=this.module,r=s.Deferred();return e=n()||n.initial_modOpt_model,n.renderModOptContent(e).done(function(e){if(a.isEmpty(e)||!(0<e.length))throw new Error("Module : "+n.module.id+", the modOpt content has not been rendered");var t;t=e,o.CZR_Helpers.setupDOMListeners([{trigger:"click keydown",selector:"."+i.control.css_attr.close_modopt_icon,name:"close_mod_option",actions:function(){o.czr_ModOptVisible(!1,{module:i,focus:!1})}},{trigger:"click keydown",selector:".tabs nav li",name:"tab_nav",actions:function(e){var t=s(e.dom_event.currentTarget,e.dom_el).data("tab-id");this.module.toggleTabVisibility.call(this,t),this.trigger("tab-switch",{id:t})}}],{dom_el:t},n),r.resolve(e)}).fail(function(e){o.errorLog("failed modOpt.renderModOptContent for module : "+i.id,e)}).then(function(){n.module.setupTabNav.call(n)}),r.promise()},renderModOptContent:function(t){var n=this.module,i=s.Deferred();t=t||this();var r=function(e){a.isEmpty(e)&&i.reject("renderModOptContent => Missing html template for module : "+n.id);var t="";try{t=[serverControlParams.i18n["Options for"],n.control.params.label].join(" ")}catch(e){o.errorLog("renderItemContent => Problem with ctrl label => "+e),t=serverControlParams.i18n.Settings}s("#widgets-left").after(s("<div/>",{class:n.control.css_attr.mod_opt_wrapper,html:[['<h2 class="mod-opt-title">',t,"</h2>"].join(""),'<span class="fas fa-times '+n.control.css_attr.close_modopt_icon+'" title="close"></span>'].join("")})),s("."+n.control.css_attr.mod_opt_wrapper).append(e),i.resolve(s("."+n.control.css_attr.mod_opt_wrapper))};if(a.isEmpty(n.itemPreAddEl))o.CZR_Helpers.getModuleTmpl({tmpl:"mod-opt",module_type:n.module_type,module_id:n.id,control_id:n.control.id}).done(function(e){r(o.CZR_Helpers.parseTemplate(e)(t))}).fail(function(e){i.reject("renderPreItemView => Problem when fetching the mod-opt tmpl from server for module : "+n.id)});else{var e=n.getTemplateSelectorPart("modOptInputList",t);s("#tmpl-"+e).length<1&&i.reject("renderModOptContent => No modOpt content template defined for module "+n.id+". The template script id should be : #tmpl-"+e),r(wp.template(e)(t))}return i.promise()},toggleModPanelView:function(e){var t=this.module,n=(t.control,s.Deferred());return t.control.container.toggleClass("czr-modopt-visible",e),s("body").toggleClass("czr-editing-modopt",e),a.delay(function(){n.resolve()},200),n.promise()}})}(wp.customize,jQuery,_);var CZRModuleMths=CZRModuleMths||{};!function(o,s,a){s.extend(CZRModuleMths,{initialize:function(e,t){if(a.isUndefined(t.control)||a.isEmpty(t.control))throw new Error("No control assigned to module "+e);var n=this;o.Value.prototype.initialize.call(this,null,t),n.isReady=s.Deferred(),s.extend(n,t||{}),s.extend(n,{crudModulePart:"",rudItemPart:"",ruItemPart:"",alertPart:"",itemInputList:"",modOptInputList:""}),n.embedded=s.Deferred(),n.itemsWrapper="",n.container=s(n.control.selector),n.renderModuleParts().done(function(e){if(!1===e.length)throw new Error("The items wrapper has not been rendered for module : "+n.id);n.itemsWrapper=e,n.embedded.resolve()}).fail(function(e){throw new Error(["initialize module => failed module.renderModuleParts() for module : ",n.id,e].join(" "))}),n.defaultAPImodOptModel={initial_modOpt_model:{},defaultModOptModel:{},control:{},module:{}},n.defaultModOptModel={},n.modOptConstructor=n.modOptConstructor||o.CZRModOpt,n.itemCollection=new o.Value([]),n.defaultAPIitemModel={id:"",initial_item_model:{},defaultItemModel:{},control:{},module:{},is_added_by_user:!1},n.defaultItemModel=o.czrModuleMap[n.module_type].defaultItemModel||{id:"",title:""},n.itemConstructor=n.itemConstructor||o.CZRItem,n.czr_Item=new o.Values,n.inputConstructor=n.inputConstructor||o.CZRInput,n.hasModOpt()&&(n.inputModOptConstructor=n.inputModOptConstructor||o.CZRInput),n.inputOptions={},n.isReady.done(function(){n.isDirty=new o.Value(t.dirty||!1),n.initializeModuleModel(t).done(function(e){n.set(e)}).fail(function(e){o.errare("Module : "+n.id+" initialize module model failed : ",e)}).always(function(e){n.callbacks.add(function(){return n.moduleReact.apply(n,arguments)}),n.control.isModuleRegistered(n.id)||n.control.updateModulesCollection({module:t,is_registered:!1}),n.bind("items-collection-populated",function(e){n.itemCollection.callbacks.add(function(){return n.itemCollectionReact.apply(n,arguments)}),!1!==n.sortable&&n._makeItemsSortable()}),n.populateSavedItemCollection(),n.hasModOpt()&&n.instantiateModOpt()})}),!0===o.czrModuleMap[n.module_type].ready_on_section_expanded&&(a.has(o,"czr_activeSectionId")&&n.control.section()==o.czr_activeSectionId()&&"resolved"!=n.isReady.state()&&n.embedded.then(function(){n.ready()}),o.section(n.control.section(),function(e){e.expanded.bind(function(e){"resolved"!=n.isReady.state()&&n.embedded.then(function(){n.ready()})})}));var i=o.czrModuleMap[n.module_type].ready_on_control_event;a.isUndefined(i)||o.control(n.control.id,function(e){e.container.on(i,function(e){"resolved"!=n.isReady.state()&&n.embedded.then(function(){n.ready()})})}),this.maybeAwakeAndBindSharedModOpt()},ready:function(){this.isReady.resolve()},initializeModuleModel:function(e){var t=s.Deferred();if(!this.isMultiItem()&&!this.isCrud()&&a.isEmpty(e.items)){var n=a.clone(this.defaultItemModel);e.items=[s.extend(n,{id:this.id})]}return t.resolve(e).promise()},itemCollectionReact:function(e,t,n){var i=this(),r=s.extend(!0,{},i);r.items=e,this.isDirty.set(!0),this.set(r,n||{})},filterItemsBeforeCoreApiSettingValue:function(e){return e},moduleReact:function(e,t,n){var i=this.control;a.size(t.items)==a.size(e.items)&&a.isEmpty(a.difference(e.items,t.items)),e.column_id,t.column_id;i.updateModulesCollection({module:s.extend(!0,{},e),data:n})},getModuleSection:function(){return this.section},isMultiItem:function(){return o.CZR_Helpers.isMultiItemModule(null,this)},isCrud:function(){return o.CZR_Helpers.isCrudModule(null,this)},hasModOpt:function(){return o.CZR_Helpers.hasModuleModOpt(null,this)},instantiateModOpt:function(){var o=this,e=o.prepareModOptForAPI(o().modOpt||{});o.czr_ModOpt=new o.modOptConstructor(e),o.czr_ModOpt.ready(),o.czr_ModOpt.callbacks.add(function(e,t,n){var i=o(),r=s.extend(!0,{},i);r.modOpt=e,o.isDirty(!0),o(r,n)})},prepareModOptForAPI:function(n){var i=this,r={};return n=a.isObject(n)?n:{},a.each(i.defaultAPImodOptModel,function(e,t){n[t];switch(t){case"initial_modOpt_model":a.each(i.getDefaultModOptModel(),function(e,t){a.has(n,t)||(n[t]=e)}),r[t]=n;break;case"defaultModOptModel":r[t]=a.clone(i.defaultModOptModel);break;case"control":r[t]=i.control;break;case"module":r[t]=i}}),r},getDefaultModOptModel:function(e){return s.extend(a.clone(this.defaultModOptModel),{is_mod_opt:!0})},sendInputToPreview:function(e){var t=this;e=a.extend({input_id:"",input_parent_id:"",to:null,from:null},e),a.isEqual(e.to,e.from)||(o.previewer.send("czr_input",{set_id:o.CZR_Helpers.getControlSettingId(t.control.id),module_id:t.id,module:{items:s.extend(!0,{},t().items),modOpt:t.hasModOpt()?s.extend(!0,{},t().modOpt):{}},input_parent_id:e.input_parent_id,input_id:e.input_id,value:e.to,isPartialRefresh:e.isPartialRefresh}),t.trigger("input_sent",{input:e.to,dom_el:t.container}))},sendModuleInputsToPreview:function(i){var r=this,t=function(){var n=this,e=s.extend(!0,{},n());e=a.omit(e,"id"),a.each(e,function(e,t){r.sendInputToPreview({input_id:t,input_parent_id:n.id,to:e,from:null,isPartialRefresh:i.isPartialRefresh})})};r.czr_Item.each(function(e){t.call(e)}),r.hasModOpt()&&t.call(r.czr_ModOpt)},maybeAwakeAndBindSharedModOpt:function(){a.isUndefined(o.czr_ModOptVisible)&&(o.czr_ModOptVisible=new o.Value(!1),o.czr_ModOptVisible.bind(function(t,e,n){if(n=n||{},a.isFunction(n.module)&&a.isFunction(n.module.czr_ModOpt)){var i=n.module.czr_ModOpt,r=n.module;t?(r.closeRemoveDialogs().closeAllItems(),i.modOptWrapperViewSetup(i()).done(function(e){i.container=e;try{o.CZR_Helpers.setupInputCollectionFromDOM.call(i).toggleModPanelView(t)}catch(e){o.consoleLog(e)}r&&n.focus&&a.delay(function(){!a.isNull(i.container)&&i.container.find('[data-tab-id="'+n.focus+'"] a').length&&i.container.find('[data-tab-id="'+n.focus+'"] a').trigger("click")},200)})):i.toggleModPanelView(t).done(function(){i.container&&0<i.container.length?s.when(i.container.remove()).done(function(){o.CZR_Helpers.removeInputCollection.call(i)}):o.CZR_Helpers.removeInputCollection.call(i),i.container=null})}else o.errare("moduleCtor::maybeAwakeAndBindSharedModOpt => api.czr_ModOptVisible.bind() => incorrect arguments",n)}))}})}(wp.customize,jQuery,_);CZRModuleMths=CZRModuleMths||{};!function(r,s,a){s.extend(CZRModuleMths,{populateSavedItemCollection:function(e){var t,i=this;a.isArray(e||i().items)?(t=s.extend(!0,[],e||i().items),a.each(t,function(e,t){if(a.has(e,"is_mod_opt"))throw new Error("populateSavedItemCollection => there should be no mod opt to instantiate here.")}),i.trigger("filterItemCandidatesBeforeInstantiation",t),a.each(t,function(t,e){var n=function(){var e=i.instantiateItem(t);a.isFunction(e)?e.ready():r.errare("populateSavedItemCollection => Could not instantiate item in module "+i.id,t)};if(serverControlParams.isDevMode)n();else try{n()}catch(e){r.errare("populateSavedItemCollection => "+e)}}),a.each(t,function(e){if(a.isObject(e)&&a.isUndefined(a.findWhere(i.itemCollection(),e.id)))throw new Error("populateSavedItemCollection => The saved items have not been properly populated in module : "+i.id)}),i.trigger("items-collection-populated")):r.errorLog("populateSavedItemCollection : The saved items collection must be an array in module :"+i.id)},instantiateItem:function(e,t){var n=this;if(e=a.isObject(e)?e:{},(e=n.validateItemBeforeAddition(e,t))&&!a.isNull(e))if(e=n.prepareItemForAPI(e),a.isObject(e)){if(e&&!a.isNull(e)){if(!a.has(e,"id"))throw new Error("CZRModule::instantiateItem() => an item has no id and could not be added in the collection of : "+this.id);if(n.czr_Item.has(e.id))throw new Error("CZRModule::instantiateItem() => the following item id "+e.id+" already exists in module.czr_Item() for module "+this.id);if(n.czr_Item.add(e.id,new n.itemConstructor(e.id,e)),!n.czr_Item.has(e.id))throw new Error("CZRModule::instantiateItem() => instantiation failed for item id "+e.id+" for module "+this.id);return n.czr_Item(e.id)}r.errare("CZRModule::instantiateItem() => item_candidate invalid in module "+n.id)}else r.errare("CZRModule::instantiateItem() => an item should be described by an object in module type : "+n.module_type,"module id : "+n.id);else r.errare("CZRModule::instantiateItem() => item_candidate did not pass validation in module "+n.id)},validateItemBeforeAddition:function(e,t){return e},prepareItemForAPI:function(i){var r=this,o={};return i=a.isObject(i)?i:{},a.each(r.defaultAPIitemModel,function(e,t){var n=i[t];switch(t){case"id":a.isEmpty(n)?o[t]=r.generateItemId(r.module_type):r.isItemRegistered(n)?r.generateItemId(n):o[t]=n;break;case"initial_item_model":a.each(r.getDefaultItemModel(),function(e,t){a.has(i,t)||(i[t]=e)}),o[t]=i;break;case"defaultItemModel":o[t]=a.clone(r.defaultItemModel);break;case"control":o[t]=r.control;break;case"module":o[t]=r;break;case"is_added_by_user":o[t]=!!a.isBoolean(n)&&n}}),a.has(o,"id")||(o.id=r.generateItemId(r.module_type)),o.initial_item_model.id=o.id,r.validateItemBeforeInstantiation(o)},validateItemBeforeInstantiation:function(e){return e},generateItemId:function(e,t,n){if(100<(n=n||1))throw new Error("Infinite loop when generating of a module id.");var i=this,r=e+"_"+(t=t||i._getNextItemKeyInCollection());if(!a.has(i,"itemCollection")||!a.isArray(i.itemCollection()))throw new Error("The item collection does not exist or is not properly set in module : "+i.id);return i.isItemRegistered(r)?(t++,n++,i.generateItemId(e,t,n)):r},_getNextItemKeyInCollection:function(){var e=this,t={},n=0;return a.isEmpty(e.itemCollection())||(t=a.isArray(e.itemCollection())&&1===a.size(e.itemCollection())?e.itemCollection()[0]:a.max(e.itemCollection(),function(e){return a.isNumber(e.id.replace(/[^\/\d]/g,""))?parseInt(e.id.replace(/[^\/\d]/g,""),10):0}),!a.isUndefined(t)&&a.isNumber(t.id.replace(/[^\/\d]/g,""))&&(n=parseInt(t.id.replace(/[^\/\d]/g,""),10)+1)),n},isItemRegistered:function(e){return!a.isUndefined(a.findWhere(this.itemCollection(),{id:e}))},updateItemsCollection:function(e){var t=this,n=t.itemCollection(),i=a.clone(n),r=s.Deferred();if(!a.has(e,"collection")){if(!a.has(e,"item"))throw new Error("updateItemsCollection, no item provided "+t.control.id+". Aborting");e=a.extend({params:{}},e);var o=a.clone(e.item);return a.each(t.defaultItemModel,function(e,t){if(!a.has(o,t))throw new Error('CZRModuleMths => updateItemsCollection : Missing property "'+t+'" for item candidate')}),a.findWhere(i,{id:o.id})?a.each(n,function(e,t){e.id==o.id&&(i[t]=o)}):i.push(o),t.itemCollection.set(i,e.params),r.resolve({collection:i,params:e.params}).promise()}t.itemCollection.set(e.collection)},_getSortedDOMItemCollection:function(){var n=a.clone(this.itemCollection()),i=[],e=s.Deferred();if(s("."+this.control.css_attr.single_item,this.container).each(function(e){var t=a.findWhere(n,{id:s(this).attr("data-id")});t&&(i[e]=t)}),n.length!=i.length)throw new Error("There was a problem when re-building the item collection from the DOM in module : "+this.id);return e.resolve(i).promise()},refreshItemCollection:function(){var t=this;t.czr_Item.each(function(e){t.czr_Item(e.id).container&&0<t.czr_Item(e.id).container.length&&s.when(t.czr_Item(e.id).container.remove()).done(function(){t.czr_Item.remove(e.id)})}),t.itemCollection=new r.Value([]),t.populateSavedItemCollection()}})}(wp.customize,jQuery,_);CZRModuleMths=CZRModuleMths||{};!function(e,o,s){o.extend(CZRModuleMths,{getDefaultItemModel:function(e){return o.extend(s.clone(this.defaultItemModel),{id:e||""})},_initNewItem:function(e,t){var n,i=this,r={id:""};return t=void 0!==t?t:s.size(i.itemCollection()),s.isNumber(t)?n=i.module_type+"_"+t:(n=t,t=0),r=e&&!s.isEmpty(e)?o.extend(e,{id:n}):this.getDefaultItemModel(n),s.has(r,"id")&&i._isItemIdPossible(n)?(s.map(i.getDefaultItemModel(),function(e,t){s.has(r,t)||(r[t]=e)}),r):i._initNewItem(r,t+1)}})}(wp.customize,jQuery,_);CZRModuleMths=CZRModuleMths||{};!function(o,s,a){s.extend(CZRModuleMths,{renderModuleParts:function(){var n=this,i=s(n.container),r=s.Deferred(),t=function(e){n.isCrud()&&(a.isEmpty(e)&&r.reject("renderModuleParts => Missing html template for module : "+n.id),i.append(e));var t=s("<ul/>",{class:[n.control.css_attr.items_wrapper,n.module_type,n.isMultiItem()?"multi-item-mod":"mono-item-mod",n.isCrud()?"crud-mod":"not-crud-mod"].join(" ")});i.append(t),r.resolve(s(t,i))};return n.isCrud()?a.isEmpty(n.crudModulePart)?o.CZR_Helpers.getModuleTmpl({tmpl:"crud-module-part",module_type:"all_modules",module_id:n.id,control_id:n.control.id}).done(function(e){t(o.CZR_Helpers.parseTemplate(e)({}))}).fail(function(e){o.errare("renderModuleParts => fail response =>",e),r.reject("renderModuleParts => Problem when fetching the crud-module-part tmpl from server for module : "+n.id)}):(s("#tmpl-"+n.crudModulePart).length<1&&r.reject("renderModuleParts => no crud Module Part template for module "+n.id+". The template script id should be : #tmpl-"+n.crudModulePart),t(wp.template(n.crudModulePart)({}))):t(),r.promise()},getTemplateSelectorPart:function(e,t){var n,i=this;switch(e){case"rudItemPart":n=i.rudItemPart;break;case"ruItemPart":n=i.ruItemPart;break;case"modOptInputList":n=i.modOptInputList;break;case"itemInputList":n=a.isFunction(i.itemInputList)?i.itemInputList(t):i.itemInputList}if(a.isEmpty(n))throw new Error("No valid template has been found in getTemplateSelectorPart() "+i.id+". Aborting");return n},getViewEl:function(e){return s('[data-id = "'+e+'"]',this.container)},closeAllItems:function(t){var n=this,e=a.clone(n.itemCollection()),i=a.filter(e,function(e){return e.id!=t});return a.each(i,function(e){n.czr_Item.has(e.id)&&"expanded"==n.czr_Item(e.id)._getViewState(e.id)&&n.czr_Item(e.id).viewState.set("closed")}),this},_adjustScrollExpandedBlock:function(e,t){if(e.length&&!a.isUndefined(this.getModuleSection())){var n,i=s(".accordion-section-content",this.section.container),r=i.scrollTop(),o=t||90;setTimeout(function(){e.offset().top+e.height()+o>s(window.top).height()&&0<(n=e.offset().top+e.height()+o-s(window.top).height())&&i.animate({scrollTop:r+n},500)},50)}},closeRemoveDialogs:function(){if(a.isArray(this.itemCollection()))return this.czr_Item.each(function(e){e.removeDialogVisible(!1)}),this},_makeItemsSortable:function(e){if(!wp.media.isTouchDevice&&s.fn.sortable){var n=this;s("."+n.control.css_attr.items_wrapper,n.container).sortable({handle:"."+n.control.css_attr.item_sort_handle,start:function(){},update:function(e,t){n._getSortedDOMItemCollection().done(function(e){n.itemCollection.set(e)}).then(function(){!function(){a.has(n,"preItem")&&n.preItemExpanded.set(!1),n.closeAllItems().closeRemoveDialogs();var e=function(){o.previewer.refresh()};"postMessage"!=o(n.control.id).transport||o.CZR_Helpers.hasPartRefresh(n.control.id)||(e=a.debounce(e,500))(),n.trigger("item-collection-sorted")}()})}})}},toggleTabVisibility:function(e){var t=this;s(t.container).find("li"),s(t.container).find("section");s(".tabs nav li",t.container).each(function(){s(this).removeClass("tab-current").addClass("tab-inactive")}),s(t.container).find('li[data-tab-id="'+e+'"]').addClass("tab-current").removeClass("tab-inactive"),s("section",t.container).each(function(){s(this).removeClass("content-current")}),s(t.container).find('section[id="'+e+'"]').addClass("content-current")},setupTabNav:function(){var i=this;setTimeout(function(){(function(){var e=s.Deferred(),t=s(".tabs nav li",i.container);t.each(function(){s(this).removeClass("tab-current").addClass("tab-inactive")}),t.first().addClass("tab-current").removeClass("tab-inactive"),s("section",i.container).first().addClass("content-current");var n=t.length;return t.each(function(){s(this).addClass(0<n?"cols-"+n:"")}),e.resolve().promise()})().done(function(){s(".tabs",i.container).show()})},20)}})}(wp.customize,jQuery,_);var CZRDynModuleMths=CZRDynModuleMths||{};!function(s,a,l){a.extend(CZRDynModuleMths,{initialize:function(e,t){var n=this;s.CZRModule.prototype.initialize.call(n,e,t),a.extend(n,{itemPreAddEl:""}),n.preItemsWrapper="",n.preItemExpanded=new s.Value(!1),n.itemAddedMessage=serverControlParams.i18n.successMessage;var i=function(e){n.addItem(e).done(function(e){n.czr_Item(e,function(e){e.embedded.then(function(){e.viewState("expanded")})})}).fail(function(e){s.errare("module.addItem failed on add_item",e)})};n.userEventMap=new s.Value([{trigger:"click keydown",selector:["."+n.control.css_attr.open_pre_add_btn,"."+n.control.css_attr.cancel_pre_add_btn].join(","),name:"pre_add_item",actions:["closeAllItems","closeRemoveDialogs",function(e){var t={addTheItem:!0};this.trigger("is-item-addition-possible",t),t.addTheItem&&this.hasPreItem?this.preItemExpanded.set(!this.preItemExpanded()):i(e)}]},{trigger:"click keydown",selector:"."+n.control.css_attr.add_new_btn,name:"add_item",actions:function(e){n.closeRemoveDialogs(e).closeAllItems(e),i(e)}}])},ready:function(){var t=this;t.setupDOMListeners(t.userEventMap(),{dom_el:t.container}),t.preItem=new s.Value(t.getDefaultItemModel()),t.preItemExpanded.callbacks.add(function(e){e?t.renderPreItemView().done(function(e){t.preItemsWrapper=e,t.preItem(t.getDefaultItemModel()),t.trigger("before-pre-item-input-collection-setup"),t.setupPreItemInputCollection()}).fail(function(e){s.errorLog("Pre-Item : "+e)}):a.when(t.preItemsWrapper.remove()).done(function(){t.preItem.czr_Input={},t.preItemsWrapper=null,t.trigger("pre-item-input-collection-destroyed")}),t._togglePreItemViewExpansion(e)}),s.CZRModule.prototype.ready.call(t)},setupPreItemInputCollection:function(){var n=this;n.preItem.czr_Input=new s.Values,a("."+n.control.css_attr.pre_add_wrapper,n.container).find("."+n.control.css_attr.sub_set_wrapper).each(function(e){var t=a(this).find("[data-czrtype]").attr("data-czrtype")||"sub_set_"+e;n.preItem.czr_Input.add(t,new n.inputConstructor(t,{id:t,type:a(this).attr("data-input-type"),container:a(this),input_parent:n.preItem,module:n,is_preItemInput:!0})),n.preItem.czr_Input(t).ready()}),n.trigger("pre-item-input-collection-ready")},itemCanBeInstantiated:function(){return!0},addItem:function(n){var t=a.Deferred();if(!this.itemCanBeInstantiated())return t.reject().promise();var i=this,r=i.preItem(),o=function(){i.preItemExpanded.set(!1)};if(l.isEmpty(r)||!l.isObject(r))return s.errorLog("addItem : an item_candidate should be an object and not empty. In : "+i.id+". Aborted."),t.reject().promise();o=l.debounce(o,200);var e=function(){var e=i.instantiateItem(r,!0);return l.isFunction(e)?e.ready():s.errare("populateSavedItemCollection => Could not instantiate item in module "+i.id,r),e};if(serverControlParams.isDevMode)e();else try{e()}catch(e){return s.errare("populateSavedItemCollection : "+e),t.reject().promise()}return i.czr_Item.has(r.id)?(a.Deferred(function(){var t=this;i.czr_Item(r.id).isReady.then(function(){o(),i.trigger("item-added",r);var e=function(){s.previewer.unbind("ready",e),t.resolve()};i.refresh_on_add_item?"postMessage"!=s(i.control.id).transport||!l.has(n,"dom_event")||l.has(n.dom_event,"isTrigger")||s.CZR_Helpers.hasPartRefresh(i.control.id)?t.resolve():(s.previewer.bind("ready",e),s.previewer.refresh()):t.resolve()})}).always(function(){t.resolve(r.id)}),t.promise()):t.reject("populateSavedItemCollection : the item "+r.id+" has not been instantiated in module "+i.id).promise()}})}(wp.customize,jQuery,_);CZRDynModuleMths=CZRDynModuleMths||{};!function(r,o,s){o.extend(CZRDynModuleMths,{renderPreItemView:function(e){var n=this,i=o.Deferred();if(s.isObject(n.preItemsWrapper)&&0<n.preItemsWrapper.length)return i.resolve(n.preItemsWrapper).promise();var t=function(e){!s.isEmpty(e)&&n.container||i.reject("renderPreItemView => Missing html template for module : "+n.id);var t=o("."+n.control.css_attr.pre_add_item_content,n.container);t.prepend(o("<div>",{class:"pre-item-wrapper"})),t.find(".pre-item-wrapper").append(e),i.resolve(t.find(".pre-item-wrapper")).promise()};return s.isEmpty(n.itemPreAddEl)?r.CZR_Helpers.getModuleTmpl({tmpl:"pre-item",module_type:n.module_type,module_id:n.id,control_id:n.control.id}).done(function(e){t(r.CZR_Helpers.parseTemplate(e)())}).fail(function(e){i.reject(["renderPreItemView for module : ",n.id,e].join(" "))}):(o("#tmpl-"+n.itemPreAddEl).length<1&&i.reject("renderPreItemView => Missing itemPreAddEl or template in module "+n.id),t(wp.template(n.itemPreAddEl)())),i.promise()},_getPreItemView:function(){return o("."+this.control.css_attr.pre_add_item_content,this.container)},_togglePreItemViewExpansion:function(t){var n=this;o("."+n.control.css_attr.pre_add_item_content,n.container).slideToggle({duration:200,done:function(){var e=o("."+n.control.css_attr.open_pre_add_btn,n.container);o(this).toggleClass("open",t),t?e.find(".fas").removeClass("fa-plus-square").addClass("fa-minus-square"):e.find(".fas").removeClass("fa-minus-square").addClass("fa-plus-square"),e.toggleClass("active",t),o(n.container).toggleClass(n.control.css_attr.adding_new,t),n._adjustScrollExpandedBlock(o(this),120)}})},toggleSuccessMessage:function(e){var t=this,n=t.itemAddedMessage,i=o("."+t.control.css_attr.pre_add_wrapper,t.container);return $_success_wrapper=o("."+t.control.css_attr.pre_add_success,t.container),"on"==e?($_success_wrapper.find("p").text(n),$_success_wrapper.css("z-index",1000001).css("height",i.height()+"px").css("line-height",i.height()+"px")):$_success_wrapper.attr("style",""),t.container.toggleClass("czr-model-added","on"==e),this}})}(wp.customize,jQuery,_);var CZRBaseControlMths=CZRBaseControlMths||{};!function(i,e,r){e.extend(CZRBaseControlMths,{initialize:function(e,t){var n=this;n.css_attr=r.has(serverControlParams,"css_attr")?serverControlParams.css_attr:{},i.Control.prototype.initialize.call(n,e,t),n.bind("czr-partial-refresh-done",function(){r.has(n,"czr_moduleCollection")&&r.each(n.czr_moduleCollection(),function(e){n.czr_Module(e.id)&&n.czr_Module(e.id).sendModuleInputsToPreview({isPartialRefresh:!0})})})},refreshPreview:function(e){this.previewer.refresh()}})}(wp.customize,jQuery,_);var CZRBaseModuleControlMths=CZRBaseModuleControlMths||{};!function(l,c,d){c.extend(CZRBaseModuleControlMths,{initialize:function(e,t){var n=this;if(!l.has(e))throw new Error("Missing a registered setting for control : "+e);n.czr_Module=new l.Values,n.czr_moduleCollection=new l.Value,n.czr_moduleCollection.set([]),n.moduleCollectionReady=c.Deferred(),n.moduleCollectionReady.done(function(e){n.czr_moduleCollection.callbacks.add(function(){return n.moduleCollectionReact.apply(n,arguments)})}),l.CZRBaseControl.prototype.initialize.call(n,e,t),l.section(n.section(),function(e){e.expanded.bind(function(e){n.czr_Module.each(function(e){e.closeAllItems().closeRemoveDialogs(),d.has(e,"preItem")&&e.preItemExpanded(!1)})})})},ready:function(){var n=this,i={};try{n.getSavedModules()}catch(e){return l.errare("api.CZRBaseControl::ready() => error on control.getSavedModules()",e),void n.moduleCollectionReady.reject()}d.each(n.getSavedModules(),function(t,e){if(i=t,serverControlParams.isDevMode)n.instantiateModule(t,{});else try{n.instantiateModule(t,{})}catch(e){return void l.errare("api.CZRBaseControl::Failed to instantiate module "+t.id,e)}n.container.attr("data-module",t.id)}),n.moduleCollectionReady.resolve(i)},getDefaultModuleApiModel:function(){return{id:"",module_type:"",modOpt:{},items:[],crud:!1,hasPreItem:!0,refresh_on_add_item:!0,multi_item:!1,sortable:!1,control:{},section:""}},getSavedModules:function(){var n=this,e=[],i=n.params.module_type,r=[],o=[],s={};l.CZR_Helpers.isMultiItemModule(i)||d.isEmpty(l(n.id)())||d.isObject(l(n.id)())||l.errare("api.CZRBaseControl::getSavedModules => module Control Init for "+n.id+" : a mono item module control value should be an object if not empty.");var t=l.CZR_Helpers.getControlSettingId(n.id),a=l(t)();return r=d.isEmpty(a)?[]:d.isArray(a)?a:[a],d.each(r,function(e,t){d.isObject(e)?(d.isEmpty(e)||d.each(e,function(e,t){d.isString(t)||l.errare("api.CZRBaseControl::::getSavedModules => item not well formed in control : "+n.id+" => module type => "+n.params.module_type,r)}),l.CZR_Helpers.hasModuleModOpt(i)&&0===t&&(d.has(e,"id")?l.errare("api.CZRBaseControl::getSavedModules : the module "+i+" in control "+n.id+" has no mod_opt defined while it should."):s=e),d.has(e,"is_mod_opt")||o.push(e)):l.errare("api.CZRBaseControl::::getSavedModules => an item must be an object in control "+n.id+" => module type => "+n.params.module_type,r)}),e.push({id:l.CZR_Helpers.getOptionName(n.id)+"_"+n.params.type,module_type:n.params.module_type,section:n.section(),modOpt:c.extend(!0,{},s),items:c.extend(!0,[],o)}),e},isModuleRegistered:function(e){return!d.isUndefined(d.findWhere(this.czr_moduleCollection(),{id:e}))}})}(wp.customize,jQuery,_);CZRBaseModuleControlMths=CZRBaseModuleControlMths||{};!function(s,e,a){e.extend(CZRBaseModuleControlMths,{instantiateModule:function(e,t){if(!a.has(e,"id"))throw new Error("CZRModule::instantiateModule() : a module has no id and could not be added in the collection of : "+this.id+". Aborted.");var n=this;if((a.isUndefined(t)||a.isEmpty(t))&&(t=n.getModuleConstructor(e)),!a.isEmpty(e.id)&&n.czr_Module.has(e.id))throw new Error("The module id already exists in the collection in control : "+n.id);var i=n.prepareModuleForAPI(e);if(n.czr_Module.add(i.id,new t(i.id,i)),!n.czr_Module.has(i.id))throw new Error("instantiateModule() : instantiation failed for module id "+i.id+" in control "+n.id);return n.czr_Module(i.id)},getModuleConstructor:function(e){var t;if(!a.has(e,"module_type"))throw new Error("CZRModule::getModuleConstructor : no module type found for module "+e.id);if(!a.has(s.czrModuleMap,e.module_type))throw new Error("Module type "+e.module_type+" is not listed in the module map api.czrModuleMap.");var n=s.czrModuleMap[e.module_type].mthds;if(t=(s.czrModuleMap[e.module_type].crud?s.CZRDynModule:s.CZRModule).extend(n),a.isUndefined(t)||a.isEmpty(t)||!t)throw new Error("CZRModule::getModuleConstructor : no constructor found for module type : "+e.module_type+".");return t},prepareModuleForAPI:function(i){if(!a.isObject(i))throw new Error("prepareModuleForAPI : a module must be an object to be instantiated.");var r=this,o={};return a.each(r.getDefaultModuleApiModel(),function(e,t){var n=i[t];switch(t){case"id":a.isEmpty(n)?o[t]=r.generateModuleId(i.module_type):o[t]=n;break;case"module_type":if(!a.isString(n)||a.isEmpty(n))throw new Error("prepareModuleForAPI : a module type must a string not empty");o[t]=n;break;case"items":if(!a.isArray(n))throw new Error("prepareModuleForAPI : a module item list must be an array");o[t]=n;break;case"modOpt":if(!a.isObject(n))throw new Error("prepareModuleForAPI : a module modOpt property must be an object");o[t]=n;break;case"crud":if(a.has(s.czrModuleMap,i.module_type))n=s.czrModuleMap[i.module_type].crud,a.isUndefined(n)&&(n=e);else if(!a.isUndefined(n)&&!a.isBoolean(n))throw new Error('prepareModuleForAPI : the module param "crud" must be a boolean');o[t]=n||!1;break;case"hasPreItem":if(a.has(s.czrModuleMap,i.module_type))n=s.czrModuleMap[i.module_type].hasPreItem,a.isUndefined(n)&&(n=e);else if(!a.isUndefined(n)&&!a.isBoolean(n))throw new Error('prepareModuleForAPI : the module param "hasPreItem" must be a boolean');o[t]=n||!1;break;case"refresh_on_add_item":if(a.has(s.czrModuleMap,i.module_type))n=s.czrModuleMap[i.module_type].refresh_on_add_item,a.isUndefined(n)&&(n=e);else if(!a.isUndefined(n)&&!a.isBoolean(n))throw new Error('prepareModuleForAPI : the module param "refresh_on_add_item" must be a boolean');o[t]=n||!1;break;case"multi_item":if(a.has(s.czrModuleMap,i.module_type))n=s.czrModuleMap[i.module_type].multi_item,a.isUndefined(n)&&(n=s.czrModuleMap[i.module_type].crud);else if(!a.isUndefined(n)&&!a.isBoolean(n))throw new Error('prepareModuleForAPI : the module param "multi_item" must be a boolean');o[t]=n||!1;break;case"sortable":if(a.has(s.czrModuleMap,i.module_type))n=s.czrModuleMap[i.module_type].sortable,a.isUndefined(n)&&(n=s.czrModuleMap[i.module_type].crud),a.isUndefined(n)&&(n=s.czrModuleMap[i.module_type].multi_item);else if(!a.isUndefined(n)&&!a.isBoolean(n))throw new Error('prepareModuleForAPI : the module param "sortable" must be a boolean');o[t]=n||!1;break;case"control":o[t]=r;break;case"section":if(!a.isString(n)||a.isEmpty(n))throw new Error("prepareModuleForAPI : a module section must be a string not empty");o[t]=n;break;case"dirty":o[t]=n||!1}}),o},generateModuleId:function(e,t,n){if(100<(n=n||1))throw new Error("Infinite loop when generating of a module id.");var i=this,r=e+"_"+(t=t||i._getNextModuleKeyInCollection());if(!a.has(i,"czr_moduleCollection")||!a.isArray(i.czr_moduleCollection()))throw new Error("The module collection does not exist or is not properly set in control : "+i.id);return i.isModuleRegistered(r)?(t++,n++,i.generateModuleId(e,t,n)):r},_getNextModuleKeyInCollection:function(){var e={},t=0;return a.isEmpty(this.czr_moduleCollection())||(e=a.max(this.czr_moduleCollection(),function(e){return parseInt(e.id.replace(/[^\/\d]/g,""),10)}),t=parseInt(e.id.replace(/[^\/\d]/g,""),10)+1),t}})}(wp.customize,jQuery,_);CZRBaseModuleControlMths=CZRBaseModuleControlMths||{};!function(s,a,l){a.extend(CZRBaseModuleControlMths,{updateModulesCollection:function(e){var t=this,n=t.czr_moduleCollection(),i=a.extend(!0,[],n);if(l.has(e,"collection"))t.czr_moduleCollection.set(e.collection,e.data||{});else{if(!l.has(e,"module"))throw new Error("updateModulesCollection, no module provided "+t.id+". Aborting");var r=t.prepareModuleForAPI(l.clone(e.module));l.findWhere(i,{id:r.id})?l.each(n,function(e,t){e.id==r.id&&(i[t]=r)}):i.push(r);var o={};l.has(e,"data")&&(o=a.extend(!0,{},e.data),a.extend(o,{module:r})),t.czr_moduleCollection.set(i,o)}},moduleCollectionReact:function(t,e,n){var i=l.size(t)>l.size(e),r=l.size(e)>l.size(t);l.size(e),l.size(t);if(is_collection_sorted=!1,r){var o=l.filter(e,function(e){return l.isUndefined(l.findWhere(t,{id:e.id}))});o=o[0],this.czr_Module.remove(o.id)}if(l.isObject(n)&&l.has(n,"module")&&(n.module_id=n.module.id,n.moduleRegistrationParams=n.module,n.module=this.prepareModuleForDB(a.extend(!0,{},n.module))),!i)if(serverControlParams.isDevMode)s(this.id).set(this.filterModuleCollectionBeforeAjax(t),n);else try{s(this.id).set(this.filterModuleCollectionBeforeAjax(t),n)}catch(e){s.errare("api.CZRBaseControl::moduleCollectionReact => error when firing control.filterModuleCollectionBeforeAjax( to )",e)}},filterModuleCollectionBeforeAjax:function(e){var t,i=this,n=a.extend(!0,[],e),r=[];if(l.each(n,function(e,t){var n=a.extend(!0,{},e);r[t]=i.prepareModuleForDB(n)}),1<l.size(n))throw new Error("There should not be several modules in the collection of control : "+i.id);if(!l.isArray(n)||l.isEmpty(n)||!l.has(n[0],"items"))throw new Error("The setting value could not be populated in control : "+i.id);var o=n[0].id;if(!i.czr_Module.has(o))throw new Error("The single module control ("+i.id+") has no module registered with the id "+o);var s=i.czr_Module(o);if(!l.isArray(s().items))throw new Error("The module "+o+" should be an array in control : "+i.id);return t=s.isMultiItem()?s().items:s().items[0]||[],t=s.filterItemsBeforeCoreApiSettingValue(t),s.hasModOpt()?l.union([s().modOpt],t):t},prepareModuleForDB:function(e){if(!l.isObject(e))throw new Error("::prepareModuleForDB : a module must be an object.");var t={};if(!l.isArray(e.items))throw new Error("::prepareModuleForDB : a module item list must be an array");return l.each(e.items,function(e){if(!l.isObject(e))throw new Error("::prepareModuleForDB : a module item must be an object")}),t.items=e.items,t}})}(wp.customize,jQuery,_),function(e,t,n){t.extend(CZRBaseControlMths,e.Events),t.extend(e.Control.prototype,e.Events),t.extend(CZRModuleMths,e.Events),t.extend(CZRItemMths,e.Events),t.extend(CZRModOptMths,e.Events),t.extend(CZRBaseControlMths,e.CZR_Helpers),t.extend(CZRInputMths,e.CZR_Helpers),t.extend(CZRModuleMths,e.CZR_Helpers),e.CZRInput=e.Value.extend(CZRInputMths),e.czrInputMap=e.czrInputMap||{},t.extend(e.czrInputMap,{text:"",textarea:"",check:"setupIcheck",checkbox:"setupIcheck",gutencheck:"setupGutenCheck",select:"setupSelect",radio:"setupRadio",number:"setupStepper",upload:"setupImageUploaderSaveAsId",upload_url:"setupImageUploaderSaveAsUrl",color:"setupColorPicker",wp_color_alpha:"setupColorPickerAlpha",wp_color:"setupWPColorPicker",content_picker:"setupContentPicker",password:"",range:"setupSimpleRange",range_slider:"setupRangeSlider",hidden:"",h_alignment:"setupHAlignement",h_text_alignment:"setupHAlignement"}),e.CZRItem=e.Value.extend(CZRItemMths),e.CZRModOpt=e.Value.extend(CZRModOptMths),e.CZRModule=e.Value.extend(CZRModuleMths),e.CZRDynModule=e.CZRModule.extend(CZRDynModuleMths),e.CZRBaseControl=e.Control.extend(CZRBaseControlMths),e.CZRBaseModuleControl=e.CZRBaseControl.extend(CZRBaseModuleControlMths),t.extend(e.controlConstructor,{czr_module:e.CZRBaseModuleControl})}(wp.customize,jQuery,_),function(t,e){jQuery(function(n){var i,e=t.customize||e;i=n("<span/>",{class:"customize-controls-home-or-add fas fa-home",html:'<span class="screen-reader-text">Home</span>'}),n.when(n("#customize-header-actions").append(i)).done(function(){i.keydown(function(e){9!==e.which&&(13===e.which&&this.click(),e.preventDefault())}).on("click.customize-controls-home-or-add",function(){e.section.has(e.czr_activeSectionId())?e.section(e.czr_activeSectionId()).expanded(!1):e.section.each(function(e){e.expanded(!1)}),e.panel.each(function(e){e.expanded(!1)})}),_.delay(function(){if(!i.hasClass("button-see-me")){var e=0,t=function(){n.Deferred(function(){var e=this;i.addClass("button-see-me"),_.delay(function(){i.removeClass("button-see-me"),e.resolve()},800)}).done(function(){0<=--e&&_.delay(function(){t()},50)})};t()}},2e3)})})}(wp);
inc/czr-base-fmk/czr-base-fmk.php CHANGED
@@ -582,7 +582,9 @@ if ( ! class_exists( 'CZR_Fmk_Base_Tmpl_Builder' ) ) :
582
 
583
  'has_device_switcher' => false, // <= indicates if the input value shall be saved by device or not
584
 
585
- 'scope' => 'local'// <= used when resetting the sections
 
 
586
  );
587
  foreach( $tmpl_map as $input_id => $input_data ) {
588
  if ( ! is_string( $input_id ) || empty( $input_id ) ) {
@@ -791,8 +793,10 @@ if ( ! class_exists( 'CZR_Fmk_Base_Tmpl_Builder' ) ) :
791
  * TEXTAREA
792
  /* ------------------------------------------------------------------------- */
793
  case 'textarea' :
 
 
794
  ?>
795
- <textarea data-czrtype="<?php echo $input_id; ?>" class="width-100" name="textarea" rows="10" cols="">{{ data.value }}</textarea>
796
  <?php
797
  break;
798
 
@@ -807,25 +811,13 @@ if ( ! class_exists( 'CZR_Fmk_Base_Tmpl_Builder' ) ) :
807
  <?php
808
  break;
809
 
810
- /* ------------------------------------------------------------------------- *
811
- * TINY MCE EDITOR
812
- /* ------------------------------------------------------------------------- */
813
- case 'tiny_mce_editor' :
814
- ?>
815
- <# //console.log( 'IN php::ac_get_default_input_tmpl() => data sent to the tmpl => ', data ); #>
816
- <button type="button" class="button text_editor-button" data-czr-control-id="{{ data.control_id }}" data-czr-input-id="<?php echo $input_id; ?>" data-czr-action="open-tinymce-editor"><?php _e('Edit', 'nimble-builder' ); ?></button>&nbsp;
817
- <button type="button" class="button text_editor-button" data-czr-control-id="{{ data.control_id }}" data-czr-input-id="<?php echo $input_id; ?>" data-czr-action="close-tinymce-editor"><?php _e('Hide editor', 'nimble-builder' ); ?></button>
818
- <input data-czrtype="<?php echo $input_id; ?>" type="hidden" value="{{ data.value }}"/>
819
- <?php
820
- break;
821
-
822
  /* ------------------------------------------------------------------------- *
823
  * RANGE
824
  /* ------------------------------------------------------------------------- */
825
  case 'range_slider' :
826
  case 'range' :
827
  ?>
828
- <# //console.log( 'IN php::ac_get_default_input_tmpl() => data range_slide => ', data ); #>
829
  <?php
830
  printf( '<input data-czrtype="%5$s" type="range" %1$s %2$s %3$s %4$s value="{{ data[\'%5$s\'] }}" />',
831
  ! empty( $input_data['orientation'] ) ? 'data-orientation="'. $input_data['orientation'] .'"' : '',
582
 
583
  'has_device_switcher' => false, // <= indicates if the input value shall be saved by device or not
584
 
585
+ 'scope' => 'local',// <= used when resetting the sections
586
+ // introduced for https://github.com/presscustomizr/nimble-builder/issues/403
587
+ 'editor_params' => array()
588
  );
589
  foreach( $tmpl_map as $input_id => $input_data ) {
590
  if ( ! is_string( $input_id ) || empty( $input_id ) ) {
793
  * TEXTAREA
794
  /* ------------------------------------------------------------------------- */
795
  case 'textarea' :
796
+ // Added an id attribute for https://github.com/presscustomizr/nimble-builder/issues/403
797
+ // needed to instantiate wp.editor.initialize(...)
798
  ?>
799
+ <textarea id="textarea-{{ data.id }}" data-czrtype="<?php echo $input_id; ?>" class="width-100" name="textarea" rows="10" cols="">{{ data.value }}</textarea>
800
  <?php
801
  break;
802
 
811
  <?php
812
  break;
813
 
 
 
 
 
 
 
 
 
 
 
 
 
814
  /* ------------------------------------------------------------------------- *
815
  * RANGE
816
  /* ------------------------------------------------------------------------- */
817
  case 'range_slider' :
818
  case 'range' :
819
  ?>
820
+ <?php //<# //console.log( 'IN php::ac_get_default_input_tmpl() => data range_slide => ', data ); #> ?>
821
  <?php
822
  printf( '<input data-czrtype="%5$s" type="range" %1$s %2$s %3$s %4$s value="{{ data[\'%5$s\'] }}" />',
823
  ! empty( $input_data['orientation'] ) ? 'data-orientation="'. $input_data['orientation'] .'"' : '',
inc/sektions/ccat-czr-sektions.php CHANGED
@@ -78,7 +78,10 @@ function sek_enqueue_controls_js_css() {
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()
@@ -570,6 +573,31 @@ function sek_print_nimble_customizer_tmpl() {
570
  </button>
571
  </div>
572
  </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
573
  <?php
574
  }
575
  function sek_has_active_cache_plugin() {
@@ -625,6 +653,9 @@ function sek_is_plugin_active_for_network( $plugin ) {
625
 
626
  return false;
627
  }
 
 
 
628
  ?><?php
629
  /* ------------------------------------------------------------------------- *
630
  * SETUP DYNAMIC SERVER REGISTRATION FOR SETTING
@@ -733,53 +764,1719 @@ function sek_remove_callback_wp_targeted_link_rel( $wp_customize ) {
733
  };
734
 
735
  ?><?php
736
- /*
737
- * This approach has been inspired by the excellent https://github.com/xwp/wp-customize-posts
738
- */
739
-
740
- add_action( 'customize_register', '\Nimble\sek_register_tiny_mce_editor_tmpl_and_scripts');
741
- function sek_register_tiny_mce_editor_tmpl_and_scripts() {
742
- add_action( 'customize_controls_print_footer_scripts', '\Nimble\sek_print_tiny_mce_editor_template', 0 );
743
- add_action( 'customize_controls_init', '\Nimble\sek_enqueue_tiny_mce_editor' );
744
  }
745
- function sek_print_tiny_mce_editor_template() {
746
- global $wp_customize;
747
 
748
- ?>
749
- <div id="czr-customize-content_editor-pane">
750
- <div data-czr-action="close-tinymce-editor" class="czr-close-editor"><i class="fas fa-arrow-circle-down" title="<?php _e( 'Hide Editor', 'nimble-builder' ); ?>"></i>&nbsp;<span><?php _e( 'Hide Editor', 'nimble-builder');?></span></div>
751
- <div id="czr-customize-content_editor-dragbar" title="<?php _e('Resize the editor', 'nimble-builder'); ?>">
752
- <span class="screen-reader-text"><?php _e( 'Resize the editor', 'nimble-builder' ); ?></span>
753
- <i class="czr-resize-handle fas fa-arrows-alt-v"></i>
754
- </div>
755
 
756
- <?php
757
- wp_editor( '', 'czr-customize-content_editor', array(
758
- '_content_editor_dfw' => false,
759
- 'drag_drop_upload' => true,
760
- 'tabfocus_elements' => 'content-html,save-post',
761
- 'editor_height' => 200,
762
- 'default_editor' => 'tinymce',
763
- 'tinymce' => array(
764
- 'resize' => false,
765
- 'wp_autoresize_on' => false,
766
- 'add_unload_trigger' => false
767
- ),
768
- ) );
769
- ?>
770
- </div>
771
- <?php
772
- }
773
 
774
  /**
775
- * Enqueue a WP Editor instance we can use for rich text editing.
 
 
 
 
776
  */
777
- function sek_enqueue_tiny_mce_editor() {
778
- if ( false === has_action( 'customize_controls_print_footer_scripts', array( '_WP_Editors', 'enqueue_scripts' ) ) ) {
779
- add_action( 'customize_controls_print_footer_scripts', array( '_WP_Editors', 'enqueue_scripts' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
780
  }
781
- }
782
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  'moduleCollection' => sek_get_module_collection(),
79
  'moduleIconPath' => NIMBLE_MODULE_ICON_PATH,
80
 
81
+ 'hasActiveCachePlugin' => sek_has_active_cache_plugin(),
82
+ 'idOfDetachedTinyMceTextArea' => NIMBLE_DETACHED_TINYMCE_TEXTAREA_ID,
83
+ 'tinyMceNimbleEditorStylesheetUrl' => sprintf( '%1$s/assets/czr/sek/css/sek-tinymce-content.css', NIMBLE_BASE_URL ),
84
+ 'defaultToolbarBtns' => "formatselect,forecolor,bold,italic,bullist,numlist,blockquote,alignleft,aligncenter,alignright,link,spellchecker,strikethrough,hr,pastetext,removeformat,charmap,outdent,indent,undo,redo"
85
  )
86
  )
87
  );//wp_localize_script()
573
  </button>
574
  </div>
575
  </script>
576
+
577
+ <?php // Detached WP Editor => added when coding https://github.com/presscustomizr/nimble-builder/issues/403 ?>
578
+ <div id="czr-customize-content_editor-pane">
579
+ <div data-czr-action="close-tinymce-editor" class="czr-close-editor"><i class="fas fa-arrow-circle-down" title="<?php _e( 'Hide Editor', 'nimble-builder' ); ?>"></i>&nbsp;<span><?php _e( 'Hide Editor', 'nimble-builder');?></span></div>
580
+ <div id="czr-customize-content_editor-dragbar" title="<?php _e('Resize the editor', 'nimble-builder'); ?>">
581
+ <span class="screen-reader-text"><?php _e( 'Resize the editor', 'nimble-builder' ); ?></span>
582
+ <i class="czr-resize-handle fas fa-arrows-alt-v"></i>
583
+ </div>
584
+ <!-- <textarea style="height:250px;width:100%" id="czr-customize-content_editor"></textarea> -->
585
+ <?php
586
+ sek_setup_nimble_editor( '', NIMBLE_DETACHED_TINYMCE_TEXTAREA_ID , array(
587
+ '_content_editor_dfw' => false,
588
+ 'drag_drop_upload' => true,
589
+ 'tabfocus_elements' => 'content-html,save-post',
590
+ 'editor_height' => 200,
591
+ 'default_editor' => 'tinymce',
592
+ 'tinymce' => array(
593
+ 'resize' => false,
594
+ 'wp_autoresize_on' => false,
595
+ 'add_unload_trigger' => false,
596
+ 'wpautop' => true
597
+ ),
598
+ ) );
599
+ ?>
600
+ </div>
601
  <?php
602
  }
603
  function sek_has_active_cache_plugin() {
653
 
654
  return false;
655
  }
656
+
657
+
658
+
659
  ?><?php
660
  /* ------------------------------------------------------------------------- *
661
  * SETUP DYNAMIC SERVER REGISTRATION FOR SETTING
764
  };
765
 
766
  ?><?php
767
+ function sek_setup_nimble_editor( $content, $editor_id, $settings = array() ) {
768
+ _NIMBLE_Editors::nimble_editor( $content, $editor_id, $settings );
 
 
 
 
 
 
769
  }
 
 
770
 
 
 
 
 
 
 
 
771
 
772
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
773
 
774
  /**
775
+ * started from a copy of class-wp-editor.php as of March 2019
776
+ * _NIMBLE_Editors::nimble_editor() is fired with sek_setup_nimble_editor() in hook 'customize_controls_print_footer_scripts'
777
+ * the job of this class is to print the js parameters for the detached tinyMce editor for Nimble
778
+ * the editor is then destroyed and re-instantiated each time a WP text editor module is customized
779
+ * @see api.czrInputMap.detached_tinymce_editor
780
  */
781
+
782
+ final class _NIMBLE_Editors {
783
+ public static $mce_locale;
784
+
785
+ private static $mce_settings = array();
786
+ private static $qt_settings = array();
787
+ private static $plugins = array();
788
+ private static $qt_buttons = array();
789
+ private static $ext_plugins;
790
+ private static $baseurl;
791
+ private static $first_init;
792
+ private static $this_tinymce = false;
793
+ private static $this_quicktags = false;
794
+ private static $has_tinymce = false;
795
+ private static $has_quicktags = false;
796
+ private static $has_medialib = false;
797
+ private static $editor_buttons_css = true;
798
+ private static $drag_drop_upload = false;
799
+ private static $old_dfw_compat = false;
800
+ private static $translation;
801
+ private static $tinymce_scripts_printed = false;
802
+ private static $link_dialog_printed = false;
803
+
804
+ private function __construct() {}
805
+
806
+ /**
807
+ * Parse default arguments for the editor instance.
808
+ *
809
+ * @param string $editor_id ID for the current editor instance.
810
+ * @param array $settings {
811
+ * Array of editor arguments.
812
+ *
813
+ * @type bool $wpautop Whether to use wpautop(). Default true.
814
+ * @type bool $media_buttons Whether to show the Add Media/other media buttons.
815
+ * @type string $default_editor When both TinyMCE and Quicktags are used, set which
816
+ * editor is shown on page load. Default empty.
817
+ * @type bool $drag_drop_upload Whether to enable drag & drop on the editor uploading. Default false.
818
+ * Requires the media modal.
819
+ * @type string $textarea_name Give the textarea a unique name here. Square brackets
820
+ * can be used here. Default $editor_id.
821
+ * @type int $textarea_rows Number rows in the editor textarea. Default 20.
822
+ * @type string|int $tabindex Tabindex value to use. Default empty.
823
+ * @type string $tabfocus_elements The previous and next element ID to move the focus to
824
+ * when pressing the Tab key in TinyMCE. Default ':prev,:next'.
825
+ * @type string $editor_css Intended for extra styles for both Visual and Text editors.
826
+ * Should include `<style>` tags, and can use "scoped". Default empty.
827
+ * @type string $editor_class Extra classes to add to the editor textarea element. Default empty.
828
+ * @type bool $teeny Whether to output the minimal editor config. Examples include
829
+ * Press This and the Comment editor. Default false.
830
+ * @type bool $dfw Deprecated in 4.1. Since 4.3 used only to enqueue wp-fullscreen-stub.js
831
+ * for backward compatibility.
832
+ * @type bool|array $tinymce Whether to load TinyMCE. Can be used to pass settings directly to
833
+ * TinyMCE using an array. Default true.
834
+ * @type bool|array $quicktags Whether to load Quicktags. Can be used to pass settings directly to
835
+ * Quicktags using an array. Default true.
836
+ * }
837
+ * @return array Parsed arguments array.
838
+ */
839
+ public static function parse_settings( $editor_id, $settings ) {
840
+
841
+ /**
842
+ * Filters the wp_editor() settings.
843
+ *
844
+ * @since 4.0.0
845
+ *
846
+ * @see _NIMBLE_Editors::parse_settings()
847
+ *
848
+ * @param array $settings Array of editor arguments.
849
+ * @param string $editor_id ID for the current editor instance.
850
+ */
851
+ $settings = apply_filters( 'wp_editor_settings', $settings, $editor_id );
852
+
853
+ $set = wp_parse_args(
854
+ $settings,
855
+ array(
856
+ 'wpautop' => ! has_blocks(),
857
+ 'media_buttons' => true,
858
+ 'default_editor' => '',
859
+ 'drag_drop_upload' => false,
860
+ 'textarea_name' => $editor_id,
861
+ 'textarea_rows' => 20,
862
+ 'tabindex' => '',
863
+ 'tabfocus_elements' => ':prev,:next',
864
+ 'editor_css' => '',
865
+ 'editor_class' => '',
866
+ 'teeny' => false,
867
+ 'dfw' => false,
868
+ '_content_editor_dfw' => false,
869
+ 'tinymce' => true,
870
+ 'quicktags' => true,
871
+ )
872
+ );
873
+
874
+ self::$this_tinymce = ( $set['tinymce'] && user_can_richedit() );
875
+
876
+ if ( self::$this_tinymce ) {
877
+ if ( false !== strpos( $editor_id, '[' ) ) {
878
+ self::$this_tinymce = false;
879
+ _deprecated_argument( 'wp_editor()', '3.9.0', 'TinyMCE editor IDs cannot have brackets.' );
880
+ }
881
  }
 
882
 
883
+ self::$this_quicktags = (bool) $set['quicktags'];
884
+
885
+ if ( self::$this_tinymce ) {
886
+ self::$has_tinymce = true;
887
+ }
888
+
889
+ if ( self::$this_quicktags ) {
890
+ self::$has_quicktags = true;
891
+ }
892
+
893
+ if ( $set['dfw'] ) {
894
+ self::$old_dfw_compat = true;
895
+ }
896
+
897
+ if ( empty( $set['editor_height'] ) ) {
898
+ return $set;
899
+ }
900
+
901
+ if ( 'content' === $editor_id && empty( $set['tinymce']['wp_autoresize_on'] ) ) {
902
+ $cookie = (int) get_user_setting( 'ed_size' );
903
+
904
+ if ( $cookie ) {
905
+ $set['editor_height'] = $cookie;
906
+ }
907
+ }
908
+
909
+ if ( $set['editor_height'] < 50 ) {
910
+ $set['editor_height'] = 50;
911
+ } elseif ( $set['editor_height'] > 5000 ) {
912
+ $set['editor_height'] = 5000;
913
+ }
914
+
915
+ return $set;
916
+ }
917
+
918
+ /**
919
+ * Outputs the HTML for a single instance of the editor.
920
+ *
921
+ * @param string $content The initial content of the editor.
922
+ * @param string $editor_id ID for the textarea and TinyMCE and Quicktags instances (can contain only ASCII letters and numbers).
923
+ * @param array $settings See _NIMBLE_Editors::parse_settings() for description.
924
+ */
925
+ public static function nimble_editor( $content, $editor_id, $settings = array() ) {
926
+ $set = self::parse_settings( $editor_id, $settings );
927
+ $editor_class = ' class="' . trim( esc_attr( $set['editor_class'] ) . ' wp-editor-area' ) . '"';
928
+ $tabindex = $set['tabindex'] ? ' tabindex="' . (int) $set['tabindex'] . '"' : '';
929
+ $default_editor = 'html';
930
+ $buttons = $autocomplete = '';
931
+ $editor_id_attr = esc_attr( $editor_id );
932
+
933
+ if ( $set['drag_drop_upload'] ) {
934
+ self::$drag_drop_upload = true;
935
+ }
936
+
937
+ if ( ! empty( $set['editor_height'] ) ) {
938
+ $height = ' style="height: ' . (int) $set['editor_height'] . 'px"';
939
+ } else {
940
+ $height = ' rows="' . (int) $set['textarea_rows'] . '"';
941
+ }
942
+
943
+ if ( ! current_user_can( 'upload_files' ) ) {
944
+ $set['media_buttons'] = false;
945
+ }
946
+
947
+ if ( self::$this_tinymce ) {
948
+ $autocomplete = ' autocomplete="off"';
949
+
950
+ if ( self::$this_quicktags ) {
951
+ $default_editor = $set['default_editor'] ? $set['default_editor'] : wp_default_editor();
952
+ if ( 'html' !== $default_editor ) {
953
+ $default_editor = 'tinymce';
954
+ }
955
+
956
+ $buttons .= '<button type="button" id="' . $editor_id_attr . '-tmce" class="wp-switch-editor switch-tmce"' .
957
+ ' data-wp-editor-id="' . $editor_id_attr . '">' . _x( 'Visual', 'Name for the Visual editor tab', 'nimble-builder' ) . "</button>\n";
958
+ $buttons .= '<button type="button" id="' . $editor_id_attr . '-html" class="wp-switch-editor switch-html"' .
959
+ ' data-wp-editor-id="' . $editor_id_attr . '">' . _x( 'Text', 'Name for the Text editor tab (formerly HTML)', 'nimble-builder' ) . "</button>\n";
960
+ } else {
961
+ $default_editor = 'tinymce';
962
+ }
963
+ }
964
+
965
+ $switch_class = 'html' === $default_editor ? 'html-active' : 'tmce-active';
966
+ $wrap_class = 'wp-core-ui wp-editor-wrap ' . $switch_class;
967
+
968
+ if ( $set['_content_editor_dfw'] ) {
969
+ $wrap_class .= ' has-dfw';
970
+ }
971
+
972
+ echo '<div id="wp-' . $editor_id_attr . '-wrap" class="' . $wrap_class . '">';
973
+
974
+ if ( self::$editor_buttons_css ) {
975
+ wp_print_styles( 'editor-buttons' );
976
+ self::$editor_buttons_css = false;
977
+ }
978
+
979
+ if ( ! empty( $set['editor_css'] ) ) {
980
+ echo $set['editor_css'] . "\n";
981
+ }
982
+
983
+ if ( ! empty( $buttons ) || $set['media_buttons'] ) {
984
+ echo '<div id="wp-' . $editor_id_attr . '-editor-tools" class="wp-editor-tools hide-if-no-js">';
985
+
986
+ if ( $set['media_buttons'] ) {
987
+ self::$has_medialib = true;
988
+
989
+ if ( ! function_exists( 'media_buttons' ) ) {
990
+ include( ABSPATH . 'wp-admin/includes/media.php' );
991
+ }
992
+
993
+ echo '<div id="wp-' . $editor_id_attr . '-media-buttons" class="wp-media-buttons">';
994
+
995
+ /**
996
+ * Fires after the default media button(s) are displayed.
997
+ *
998
+ * @since 2.5.0
999
+ *
1000
+ * @param string $editor_id Unique editor identifier, e.g. 'content'.
1001
+ */
1002
+ do_action( 'media_buttons', $editor_id );
1003
+ echo "</div>\n";
1004
+ }
1005
+
1006
+ echo '<div class="wp-editor-tabs">' . $buttons . "</div>\n";
1007
+ echo "</div>\n";
1008
+ }
1009
+
1010
+ $quicktags_toolbar = '';
1011
+
1012
+ if ( self::$this_quicktags ) {
1013
+ if ( 'content' === $editor_id && ! empty( $GLOBALS['current_screen'] ) && $GLOBALS['current_screen']->base === 'post' ) {
1014
+ $toolbar_id = 'ed_toolbar';
1015
+ } else {
1016
+ $toolbar_id = 'qt_' . $editor_id_attr . '_toolbar';
1017
+ }
1018
+
1019
+ $quicktags_toolbar = '<div id="' . $toolbar_id . '" class="quicktags-toolbar"></div>';
1020
+ }
1021
+
1022
+ /**
1023
+ * Filters the HTML markup output that displays the editor.
1024
+ *
1025
+ * @since 2.1.0
1026
+ *
1027
+ * @param string $output Editor's HTML markup.
1028
+ */
1029
+ $the_editor = apply_filters(
1030
+ 'the_editor',
1031
+ '<div id="wp-' . $editor_id_attr . '-editor-container" class="wp-editor-container">' .
1032
+ $quicktags_toolbar .
1033
+ '<textarea' . $editor_class . $height . $tabindex . $autocomplete . ' cols="40" name="' . esc_attr( $set['textarea_name'] ) . '" ' .
1034
+ 'id="' . $editor_id_attr . '">%s</textarea></div>'
1035
+ );
1036
+ if ( self::$this_tinymce ) {
1037
+ add_filter( 'the_editor_content', 'format_for_editor', 10, 2 );
1038
+ }
1039
+
1040
+ /**
1041
+ * Filters the default editor content.
1042
+ *
1043
+ * @since 2.1.0
1044
+ *
1045
+ * @param string $content Default editor content.
1046
+ * @param string $default_editor The default editor for the current user.
1047
+ * Either 'html' or 'tinymce'.
1048
+ */
1049
+ $content = apply_filters( 'the_editor_content', $content, $default_editor );
1050
+ if ( self::$this_tinymce ) {
1051
+ remove_filter( 'the_editor_content', 'format_for_editor' );
1052
+ }
1053
+ if ( 'html' === $default_editor && has_filter( 'htmledit_pre' ) ) {
1054
+ /** This filter is documented in wp-includes/deprecated.php */
1055
+ $content = apply_filters_deprecated( 'htmledit_pre', array( $content ), '4.3.0', 'format_for_editor' );
1056
+ } elseif ( 'tinymce' === $default_editor && has_filter( 'richedit_pre' ) ) {
1057
+ /** This filter is documented in wp-includes/deprecated.php */
1058
+ $content = apply_filters_deprecated( 'richedit_pre', array( $content ), '4.3.0', 'format_for_editor' );
1059
+ }
1060
+
1061
+ if ( false !== stripos( $content, 'textarea' ) ) {
1062
+ $content = preg_replace( '%</textarea%i', '&lt;/textarea', $content );
1063
+ }
1064
+
1065
+ printf( $the_editor, $content );
1066
+ echo "\n</div>\n\n";
1067
+
1068
+ self::editor_settings( $editor_id, $set );
1069
+ }
1070
+
1071
+ /**
1072
+ * @global string $tinymce_version
1073
+ *
1074
+ * @param string $editor_id
1075
+ * @param array $set
1076
+ */
1077
+ public static function editor_settings( $editor_id, $set ) {
1078
+ global $tinymce_version;
1079
+
1080
+ if ( empty( self::$first_init ) ) {
1081
+ add_action( 'customize_controls_print_footer_scripts', array( __CLASS__, 'editor_js' ), 50 );
1082
+ add_action( 'customize_controls_print_footer_scripts', array( __CLASS__, 'force_uncompressed_tinymce' ), 1 );
1083
+ add_action( 'customize_controls_print_footer_scripts', array( __CLASS__, 'enqueue_scripts' ), 1 );
1084
+ }
1085
+
1086
+ if ( self::$this_quicktags ) {
1087
+
1088
+ $qtInit = array(
1089
+ 'id' => $editor_id,
1090
+ 'buttons' => '',
1091
+ );
1092
+
1093
+ if ( is_array( $set['quicktags'] ) ) {
1094
+ $qtInit = array_merge( $qtInit, $set['quicktags'] );
1095
+ }
1096
+
1097
+ if ( empty( $qtInit['buttons'] ) ) {
1098
+ $qtInit['buttons'] = 'strong,em,link,block,del,ins,img,ul,ol,li,code';
1099
+ }
1100
+
1101
+ if ( $set['_content_editor_dfw'] ) {
1102
+ $qtInit['buttons'] .= ',dfw';
1103
+ }
1104
+
1105
+ /**
1106
+ * Filters the Quicktags settings.
1107
+ *
1108
+ * @since 3.3.0
1109
+ *
1110
+ * @param array $qtInit Quicktags settings.
1111
+ * @param string $editor_id The unique editor ID, e.g. 'content'.
1112
+ */
1113
+ $qtInit = apply_filters( 'quicktags_settings', $qtInit, $editor_id );
1114
+
1115
+ self::$qt_settings[ $editor_id ] = $qtInit;
1116
+
1117
+ self::$qt_buttons = array_merge( self::$qt_buttons, explode( ',', $qtInit['buttons'] ) );
1118
+ }
1119
+
1120
+ if ( self::$this_tinymce ) {
1121
+
1122
+ if ( empty( self::$first_init ) ) {
1123
+ $baseurl = self::get_baseurl();
1124
+ $mce_locale = self::get_mce_locale();
1125
+ $ext_plugins = '';
1126
+
1127
+ if ( $set['teeny'] ) {
1128
+
1129
+ /**
1130
+ * Filters the list of teenyMCE plugins.
1131
+ *
1132
+ * @since 2.7.0
1133
+ *
1134
+ * @param array $plugins An array of teenyMCE plugins.
1135
+ * @param string $editor_id Unique editor identifier, e.g. 'content'.
1136
+ */
1137
+ $plugins = apply_filters( 'teeny_mce_plugins', array( 'colorpicker', 'lists', 'fullscreen', 'image', 'wordpress', 'wpeditimage', 'wplink' ), $editor_id );
1138
+ } else {
1139
+
1140
+ /**
1141
+ * Filters the list of TinyMCE external plugins.
1142
+ *
1143
+ * The filter takes an associative array of external plugins for
1144
+ * TinyMCE in the form 'plugin_name' => 'url'.
1145
+ *
1146
+ * The url should be absolute, and should include the js filename
1147
+ * to be loaded. For example:
1148
+ * 'myplugin' => 'http://mysite.com/wp-content/plugins/myfolder/mce_plugin.js'.
1149
+ *
1150
+ * If the external plugin adds a button, it should be added with
1151
+ * one of the 'mce_buttons' filters.
1152
+ *
1153
+ * @since 2.5.0
1154
+ *
1155
+ * @param array $external_plugins An array of external TinyMCE plugins.
1156
+ */
1157
+ $mce_external_plugins = apply_filters( 'mce_external_plugins', array() );
1158
+
1159
+ $plugins = array(
1160
+ 'charmap',
1161
+ 'colorpicker',
1162
+ 'hr',
1163
+ 'lists',
1164
+ 'media',
1165
+ 'paste',
1166
+ 'tabfocus',
1167
+ 'textcolor',
1168
+ 'fullscreen',
1169
+ 'wordpress',
1170
+ 'wpautoresize',
1171
+ 'wpeditimage',
1172
+ 'wpemoji',
1173
+ 'wpgallery',
1174
+ 'wplink',
1175
+ 'wpdialogs',
1176
+ 'wptextpattern',
1177
+ 'wpview',
1178
+ );
1179
+
1180
+ if ( ! self::$has_medialib ) {
1181
+ $plugins[] = 'image';
1182
+ }
1183
+
1184
+ /**
1185
+ * Filters the list of default TinyMCE plugins.
1186
+ *
1187
+ * The filter specifies which of the default plugins included
1188
+ * in WordPress should be added to the TinyMCE instance.
1189
+ *
1190
+ * @since 3.3.0
1191
+ *
1192
+ * @param array $plugins An array of default TinyMCE plugins.
1193
+ */
1194
+ $plugins = array_unique( apply_filters( 'tiny_mce_plugins', $plugins ) );
1195
+
1196
+ if ( ( $key = array_search( 'spellchecker', $plugins ) ) !== false ) {
1197
+ unset( $plugins[ $key ] );
1198
+ }
1199
+
1200
+ if ( ! empty( $mce_external_plugins ) ) {
1201
+
1202
+ /**
1203
+ * Filters the translations loaded for external TinyMCE 3.x plugins.
1204
+ *
1205
+ * The filter takes an associative array ('plugin_name' => 'path')
1206
+ * where 'path' is the include path to the file.
1207
+ *
1208
+ * The language file should follow the same format as wp_mce_translation(),
1209
+ * and should define a variable ($strings) that holds all translated strings.
1210
+ *
1211
+ * @since 2.5.0
1212
+ *
1213
+ * @param array $translations Translations for external TinyMCE plugins.
1214
+ */
1215
+ $mce_external_languages = apply_filters( 'mce_external_languages', array() );
1216
+
1217
+ $loaded_langs = array();
1218
+ $strings = '';
1219
+
1220
+ if ( ! empty( $mce_external_languages ) ) {
1221
+ foreach ( $mce_external_languages as $name => $path ) {
1222
+ if ( @is_file( $path ) && @is_readable( $path ) ) {
1223
+ include_once( $path );
1224
+ $ext_plugins .= $strings . "\n";
1225
+ $loaded_langs[] = $name;
1226
+ }
1227
+ }
1228
+ }
1229
+
1230
+ foreach ( $mce_external_plugins as $name => $url ) {
1231
+ if ( in_array( $name, $plugins, true ) ) {
1232
+ unset( $mce_external_plugins[ $name ] );
1233
+ continue;
1234
+ }
1235
+
1236
+ $url = set_url_scheme( $url );
1237
+ $mce_external_plugins[ $name ] = $url;
1238
+ $plugurl = dirname( $url );
1239
+ $strings = '';
1240
+ if ( ! in_array( $name, $loaded_langs, true ) ) {
1241
+ $path = str_replace( content_url(), '', $plugurl );
1242
+ $path = WP_CONTENT_DIR . $path . '/langs/';
1243
+
1244
+ if ( function_exists( 'realpath' ) ) {
1245
+ $path = trailingslashit( realpath( $path ) );
1246
+ }
1247
+
1248
+ if ( @is_file( $path . $mce_locale . '.js' ) ) {
1249
+ $strings .= @file_get_contents( $path . $mce_locale . '.js' ) . "\n";
1250
+ }
1251
+
1252
+ if ( @is_file( $path . $mce_locale . '_dlg.js' ) ) {
1253
+ $strings .= @file_get_contents( $path . $mce_locale . '_dlg.js' ) . "\n";
1254
+ }
1255
+
1256
+ if ( 'en' != $mce_locale && empty( $strings ) ) {
1257
+ if ( @is_file( $path . 'en.js' ) ) {
1258
+ $str1 = @file_get_contents( $path . 'en.js' );
1259
+ $strings .= preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $str1, 1 ) . "\n";
1260
+ }
1261
+
1262
+ if ( @is_file( $path . 'en_dlg.js' ) ) {
1263
+ $str2 = @file_get_contents( $path . 'en_dlg.js' );
1264
+ $strings .= preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $str2, 1 ) . "\n";
1265
+ }
1266
+ }
1267
+
1268
+ if ( ! empty( $strings ) ) {
1269
+ $ext_plugins .= "\n" . $strings . "\n";
1270
+ }
1271
+ }
1272
+
1273
+ $ext_plugins .= 'nimbleTinyMCEPreInit.load_ext("' . $plugurl . '", "' . $mce_locale . '");' . "\n";
1274
+ }
1275
+ }
1276
+ }
1277
+
1278
+ self::$plugins = $plugins;
1279
+ self::$ext_plugins = $ext_plugins;
1280
+
1281
+ $settings = self::default_settings();
1282
+ $settings['plugins'] = implode( ',', $plugins );
1283
+
1284
+ if ( ! empty( $mce_external_plugins ) ) {
1285
+ $settings['external_plugins'] = wp_json_encode( $mce_external_plugins );
1286
+ }
1287
+
1288
+ /** This filter is documented in wp-admin/includes/media.php */
1289
+ if ( apply_filters( 'disable_captions', '' ) ) {
1290
+ $settings['wpeditimage_disable_captions'] = true;
1291
+ }
1292
+
1293
+ $mce_css = $settings['content_css'];
1294
+ $editor_styles = get_editor_stylesheets();
1295
+
1296
+ if ( ! empty( $editor_styles ) ) {
1297
+ foreach ( $editor_styles as $key => $url ) {
1298
+ if ( strpos( $url, ',' ) !== false ) {
1299
+ $editor_styles[ $key ] = str_replace( ',', '%2C', $url );
1300
+ }
1301
+ }
1302
+
1303
+ $mce_css .= ',' . implode( ',', $editor_styles );
1304
+ }
1305
+
1306
+ /**
1307
+ * Filters the comma-delimited list of stylesheets to load in TinyMCE.
1308
+ *
1309
+ * @since 2.1.0
1310
+ *
1311
+ * @param string $stylesheets Comma-delimited list of stylesheets.
1312
+ */
1313
+ $mce_css = trim( apply_filters( 'mce_css', $mce_css ), ' ,' );
1314
+
1315
+ if ( ! empty( $mce_css ) ) {
1316
+ $settings['content_css'] = $mce_css;
1317
+ } else {
1318
+ unset( $settings['content_css'] );
1319
+ }
1320
+
1321
+ self::$first_init = $settings;
1322
+ }
1323
+
1324
+ if ( $set['teeny'] ) {
1325
+
1326
+ /**
1327
+ * Filters the list of teenyMCE buttons (Text tab).
1328
+ *
1329
+ * @since 2.7.0
1330
+ *
1331
+ * @param array $buttons An array of teenyMCE buttons.
1332
+ * @param string $editor_id Unique editor identifier, e.g. 'content'.
1333
+ */
1334
+ $mce_buttons = apply_filters( 'teeny_mce_buttons', array( 'bold', 'italic', 'underline', 'blockquote', 'strikethrough', 'bullist', 'numlist', 'alignleft', 'aligncenter', 'alignright', 'undo', 'redo', 'link', 'fullscreen' ), $editor_id );
1335
+ $mce_buttons_2 = $mce_buttons_3 = $mce_buttons_4 = array();
1336
+ } else {
1337
+ $mce_buttons = array( 'formatselect', 'bold', 'italic', 'bullist', 'numlist', 'blockquote', 'alignleft', 'aligncenter', 'alignright', 'link', 'spellchecker' );
1338
+
1339
+ if ( ! wp_is_mobile() ) {
1340
+ if ( $set['_content_editor_dfw'] ) {
1341
+ $mce_buttons[] = 'dfw';
1342
+ } else {
1343
+ $mce_buttons[] = 'fullscreen';
1344
+ }
1345
+ }
1346
+
1347
+ $mce_buttons[] = 'wp_adv';
1348
+
1349
+ /**
1350
+ * Filters the first-row list of TinyMCE buttons (Visual tab).
1351
+ *
1352
+ * @since 2.0.0
1353
+ *
1354
+ * @param array $buttons First-row list of buttons.
1355
+ * @param string $editor_id Unique editor identifier, e.g. 'content'.
1356
+ */
1357
+ $mce_buttons = apply_filters( 'mce_buttons', $mce_buttons, $editor_id );
1358
+
1359
+ $mce_buttons_2 = array( 'strikethrough', 'hr', 'forecolor', 'pastetext', 'removeformat', 'charmap', 'outdent', 'indent', 'undo', 'redo' );
1360
+
1361
+ /**
1362
+ * Filters the second-row list of TinyMCE buttons (Visual tab).
1363
+ *
1364
+ * @since 2.0.0
1365
+ *
1366
+ * @param array $buttons Second-row list of buttons.
1367
+ * @param string $editor_id Unique editor identifier, e.g. 'content'.
1368
+ */
1369
+ $mce_buttons_2 = apply_filters( 'mce_buttons_2', $mce_buttons_2, $editor_id );
1370
+
1371
+ /**
1372
+ * Filters the third-row list of TinyMCE buttons (Visual tab).
1373
+ *
1374
+ * @since 2.0.0
1375
+ *
1376
+ * @param array $buttons Third-row list of buttons.
1377
+ * @param string $editor_id Unique editor identifier, e.g. 'content'.
1378
+ */
1379
+ $mce_buttons_3 = apply_filters( 'mce_buttons_3', array(), $editor_id );
1380
+
1381
+ /**
1382
+ * Filters the fourth-row list of TinyMCE buttons (Visual tab).
1383
+ *
1384
+ * @since 2.5.0
1385
+ *
1386
+ * @param array $buttons Fourth-row list of buttons.
1387
+ * @param string $editor_id Unique editor identifier, e.g. 'content'.
1388
+ */
1389
+ $mce_buttons_4 = apply_filters( 'mce_buttons_4', array(), $editor_id );
1390
+ }
1391
+
1392
+ $body_class = $editor_id;
1393
+
1394
+ if ( $post = get_post() ) {
1395
+ $body_class .= ' post-type-' . sanitize_html_class( $post->post_type ) . ' post-status-' . sanitize_html_class( $post->post_status );
1396
+
1397
+ if ( post_type_supports( $post->post_type, 'post-formats' ) ) {
1398
+ $post_format = get_post_format( $post );
1399
+ if ( $post_format && ! is_wp_error( $post_format ) ) {
1400
+ $body_class .= ' post-format-' . sanitize_html_class( $post_format );
1401
+ } else {
1402
+ $body_class .= ' post-format-standard';
1403
+ }
1404
+ }
1405
+
1406
+ $page_template = get_page_template_slug( $post );
1407
+
1408
+ if ( $page_template !== false ) {
1409
+ $page_template = empty( $page_template ) ? 'default' : str_replace( '.', '-', basename( $page_template, '.php' ) );
1410
+ $body_class .= ' page-template-' . sanitize_html_class( $page_template );
1411
+ }
1412
+ }
1413
+
1414
+ $body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_user_locale() ) ) );
1415
+
1416
+ if ( ! empty( $set['tinymce']['body_class'] ) ) {
1417
+ $body_class .= ' ' . $set['tinymce']['body_class'];
1418
+ unset( $set['tinymce']['body_class'] );
1419
+ }
1420
+
1421
+ $mceInit = array(
1422
+ 'selector' => "#$editor_id",
1423
+ 'wpautop' => (bool) $set['wpautop'],
1424
+ 'indent' => ! $set['wpautop'],
1425
+ 'toolbar1' => implode( ',', $mce_buttons ),
1426
+ 'toolbar2' => implode( ',', $mce_buttons_2 ),
1427
+ 'toolbar3' => implode( ',', $mce_buttons_3 ),
1428
+ 'toolbar4' => implode( ',', $mce_buttons_4 ),
1429
+ 'tabfocus_elements' => $set['tabfocus_elements'],
1430
+ 'body_class' => $body_class,
1431
+ );
1432
+ $mceInit = array_merge( self::$first_init, $mceInit );
1433
+
1434
+ if ( is_array( $set['tinymce'] ) ) {
1435
+ $mceInit = array_merge( $mceInit, $set['tinymce'] );
1436
+ }
1437
+
1438
+ /*
1439
+ * For people who really REALLY know what they're doing with TinyMCE
1440
+ * You can modify $mceInit to add, remove, change elements of the config
1441
+ * before tinyMCE.init. Setting "valid_elements", "invalid_elements"
1442
+ * and "extended_valid_elements" can be done through this filter. Best
1443
+ * is to use the default cleanup by not specifying valid_elements,
1444
+ * as TinyMCE checks against the full set of HTML 5.0 elements and attributes.
1445
+ */
1446
+ if ( $set['teeny'] ) {
1447
+
1448
+ /**
1449
+ * Filters the teenyMCE config before init.
1450
+ *
1451
+ * @since 2.7.0
1452
+ *
1453
+ * @param array $mceInit An array with teenyMCE config.
1454
+ * @param string $editor_id Unique editor identifier, e.g. 'content'.
1455
+ */
1456
+ $mceInit = apply_filters( 'teeny_mce_before_init', $mceInit, $editor_id );
1457
+ } else {
1458
+
1459
+ /**
1460
+ * Filters the TinyMCE config before init.
1461
+ *
1462
+ * @since 2.5.0
1463
+ *
1464
+ * @param array $mceInit An array with TinyMCE config.
1465
+ * @param string $editor_id Unique editor identifier, e.g. 'content'.
1466
+ */
1467
+ $mceInit = apply_filters( 'tiny_mce_before_init', $mceInit, $editor_id );
1468
+ }
1469
+
1470
+ if ( empty( $mceInit['toolbar3'] ) && ! empty( $mceInit['toolbar4'] ) ) {
1471
+ $mceInit['toolbar3'] = $mceInit['toolbar4'];
1472
+ $mceInit['toolbar4'] = '';
1473
+ }
1474
+
1475
+ self::$mce_settings[ $editor_id ] = $mceInit;
1476
+ } // end if self::$this_tinymce
1477
+ }
1478
+
1479
+ /**
1480
+ * @param array $init
1481
+ * @return string
1482
+ */
1483
+ private static function _parse_init( $init ) {
1484
+ $options = '';
1485
+
1486
+ foreach ( $init as $key => $value ) {
1487
+ if ( is_bool( $value ) ) {
1488
+ $val = $value ? 'true' : 'false';
1489
+ $options .= $key . ':' . $val . ',';
1490
+ continue;
1491
+ } elseif ( ! empty( $value ) && is_string( $value ) && (
1492
+ ( '{' == $value{0} && '}' == $value{strlen( $value ) - 1} ) ||
1493
+ ( '[' == $value{0} && ']' == $value{strlen( $value ) - 1} ) ||
1494
+ preg_match( '/^\(?function ?\(/', $value ) ) ) {
1495
+
1496
+ $options .= $key . ':' . $value . ',';
1497
+ continue;
1498
+ }
1499
+ $options .= $key . ':"' . $value . '",';
1500
+ }
1501
+
1502
+ return '{' . trim( $options, ' ,' ) . '}';
1503
+ }
1504
+
1505
+ /**
1506
+ *
1507
+ * @static
1508
+ *
1509
+ * @param bool $default_scripts Optional. Whether default scripts should be enqueued. Default false.
1510
+ */
1511
+ public static function enqueue_scripts( $default_scripts = false ) {
1512
+ if ( $default_scripts || self::$has_tinymce ) {
1513
+ wp_enqueue_script( 'editor' );
1514
+ }
1515
+
1516
+ if ( $default_scripts || self::$has_quicktags ) {
1517
+ wp_enqueue_script( 'quicktags' );
1518
+ wp_enqueue_style( 'buttons' );
1519
+ }
1520
+
1521
+ if ( $default_scripts || in_array( 'wplink', self::$plugins, true ) || in_array( 'link', self::$qt_buttons, true ) ) {
1522
+ wp_enqueue_script( 'wplink' );
1523
+ wp_enqueue_script( 'jquery-ui-autocomplete' );
1524
+ }
1525
+
1526
+ if ( self::$old_dfw_compat ) {
1527
+ wp_enqueue_script( 'wp-fullscreen-stub' );
1528
+ }
1529
+
1530
+ if ( self::$has_medialib ) {
1531
+ add_thickbox();
1532
+ wp_enqueue_script( 'media-upload' );
1533
+ wp_enqueue_script( 'wp-embed' );
1534
+ } elseif ( $default_scripts ) {
1535
+ wp_enqueue_script( 'media-upload' );
1536
+ }
1537
+
1538
+ /**
1539
+ * Fires when scripts and styles are enqueued for the editor.
1540
+ *
1541
+ * @since 3.9.0
1542
+ *
1543
+ * @param array $to_load An array containing boolean values whether TinyMCE
1544
+ * and Quicktags are being loaded.
1545
+ */
1546
+ do_action(
1547
+ 'wp_enqueue_editor',
1548
+ array(
1549
+ 'tinymce' => ( $default_scripts || self::$has_tinymce ),
1550
+ 'quicktags' => ( $default_scripts || self::$has_quicktags ),
1551
+ )
1552
+ );
1553
+ }
1554
+
1555
+ /**
1556
+ * Enqueue all editor scripts.
1557
+ * For use when the editor is going to be initialized after page load.
1558
+ *
1559
+ * @since 4.8.0
1560
+ */
1561
+ public static function enqueue_default_editor() {
1562
+ if ( did_action( 'wp_enqueue_editor' ) ) {
1563
+ return;
1564
+ }
1565
+
1566
+ self::enqueue_scripts( true );
1567
+ wp_enqueue_style( 'editor-buttons' );
1568
+
1569
+ add_action( 'customize_controls_print_footer_scripts', array( __CLASS__, 'force_uncompressed_tinymce' ), 1 );
1570
+ add_action( 'customize_controls_print_footer_scripts', array( __CLASS__, 'print_default_editor_scripts' ), 45 );
1571
+
1572
+ }
1573
+
1574
+ /**
1575
+ * Print (output) all editor scripts and default settings.
1576
+ * For use when the editor is going to be initialized after page load.
1577
+ *
1578
+ * @since 4.8.0
1579
+ */
1580
+ public static function print_default_editor_scripts() {
1581
+ $user_can_richedit = user_can_richedit();
1582
+
1583
+ if ( $user_can_richedit ) {
1584
+ $settings = self::default_settings();
1585
+
1586
+ $settings['toolbar1'] = 'bold,italic,bullist,numlist,link';
1587
+ $settings['wpautop'] = false;
1588
+ $settings['indent'] = true;
1589
+ $settings['elementpath'] = false;
1590
+
1591
+ if ( is_rtl() ) {
1592
+ $settings['directionality'] = 'rtl';
1593
+ }
1594
+ $settings['plugins'] = implode(
1595
+ ',',
1596
+ array(
1597
+ 'charmap',
1598
+ 'colorpicker',
1599
+ 'hr',
1600
+ 'lists',
1601
+ 'paste',
1602
+ 'tabfocus',
1603
+ 'textcolor',
1604
+ 'fullscreen',
1605
+ 'wordpress',
1606
+ 'wpautoresize',
1607
+ 'wpeditimage',
1608
+ 'wpemoji',
1609
+ 'wpgallery',
1610
+ 'wplink',
1611
+ 'wptextpattern',
1612
+ )
1613
+ );
1614
+
1615
+ $settings = self::_parse_init( $settings );
1616
+ } else {
1617
+ $settings = '{}';
1618
+ }
1619
+
1620
+ ?>
1621
+ <script type="text/javascript">
1622
+ window.wp = window.wp || {};
1623
+ window.wp.editor = window.wp.editor || {};
1624
+ window.wp.editor.getDefaultSettings = function() {
1625
+ return {
1626
+ tinymce: <?php echo $settings; ?>,
1627
+ quicktags: {
1628
+ buttons: 'strong,em,link,ul,ol,li,code'
1629
+ }
1630
+ };
1631
+ };
1632
+
1633
+ <?php
1634
+
1635
+ if ( $user_can_richedit ) {
1636
+ $suffix = SCRIPT_DEBUG ? '' : '.min';
1637
+ $baseurl = self::get_baseurl();
1638
+
1639
+ ?>
1640
+ var nimbleTinyMCEPreInit = {
1641
+ baseURL: "<?php echo $baseurl; ?>",
1642
+ suffix: "<?php echo $suffix; ?>",
1643
+ mceInit: {},
1644
+ qtInit: {},
1645
+ load_ext: function(url,lang){var sl=tinymce.ScriptLoader;sl.markDone(url+'/langs/'+lang+'.js');sl.markDone(url+'/langs/'+lang+'_dlg.js');}
1646
+ };
1647
+ <?php
1648
+ }
1649
+ ?>
1650
+ </script>
1651
+ <?php
1652
+
1653
+ if ( $user_can_richedit ) {
1654
+ self::print_tinymce_scripts();
1655
+ }
1656
+
1657
+ /**
1658
+ * Fires when the editor scripts are loaded for later initialization,
1659
+ * after all scripts and settings are printed.
1660
+ *
1661
+ * @since 4.8.0
1662
+ */
1663
+ do_action( 'print_default_editor_scripts' );
1664
+
1665
+ self::wp_link_dialog();
1666
+ }
1667
+
1668
+ public static function get_mce_locale() {
1669
+ if ( empty( self::$mce_locale ) ) {
1670
+ $mce_locale = get_user_locale();
1671
+ self::$mce_locale = empty( $mce_locale ) ? 'en' : strtolower( substr( $mce_locale, 0, 2 ) ); // ISO 639-1
1672
+ }
1673
+
1674
+ return self::$mce_locale;
1675
+ }
1676
+
1677
+ public static function get_baseurl() {
1678
+ if ( empty( self::$baseurl ) ) {
1679
+ self::$baseurl = includes_url( 'js/tinymce' );
1680
+ }
1681
+
1682
+ return self::$baseurl;
1683
+ }
1684
+
1685
+ /**
1686
+ * Returns the default TinyMCE settings.
1687
+ * Doesn't include plugins, buttons, editor selector.
1688
+ *
1689
+ * @global string $tinymce_version
1690
+ *
1691
+ * @return array
1692
+ */
1693
+ private static function default_settings() {
1694
+ global $tinymce_version;
1695
+
1696
+ $shortcut_labels = array();
1697
+
1698
+ foreach ( self::get_translation() as $name => $value ) {
1699
+ if ( is_array( $value ) ) {
1700
+ $shortcut_labels[ $name ] = $value[1];
1701
+ }
1702
+ }
1703
+
1704
+ $settings = array(
1705
+ 'theme' => 'modern',
1706
+ 'skin' => 'lightgray',
1707
+ 'language' => self::get_mce_locale(),
1708
+ 'formats' => '{' .
1709
+ 'alignleft: [' .
1710
+ '{selector: "p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li", styles: {textAlign:"left"}},' .
1711
+ '{selector: "img,table,dl.wp-caption", classes: "alignleft"}' .
1712
+ '],' .
1713
+ 'aligncenter: [' .
1714
+ '{selector: "p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li", styles: {textAlign:"center"}},' .
1715
+ '{selector: "img,table,dl.wp-caption", classes: "aligncenter"}' .
1716
+ '],' .
1717
+ 'alignright: [' .
1718
+ '{selector: "p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li", styles: {textAlign:"right"}},' .
1719
+ '{selector: "img,table,dl.wp-caption", classes: "alignright"}' .
1720
+ '],' .
1721
+ 'strikethrough: {inline: "del"}' .
1722
+ '}',
1723
+ 'relative_urls' => false,
1724
+ 'remove_script_host' => false,
1725
+ 'convert_urls' => false,
1726
+ 'browser_spellcheck' => true,
1727
+ 'fix_list_elements' => true,
1728
+ 'entities' => '38,amp,60,lt,62,gt',
1729
+ 'entity_encoding' => 'raw',
1730
+ 'keep_styles' => false,
1731
+ 'cache_suffix' => 'wp-mce-' . $tinymce_version,
1732
+ 'resize' => 'vertical',
1733
+ 'menubar' => false,
1734
+ 'branding' => false,
1735
+ 'preview_styles' => 'font-family font-size font-weight font-style text-decoration text-transform',
1736
+
1737
+ 'end_container_on_empty_block' => true,
1738
+ 'wpeditimage_html5_captions' => true,
1739
+ 'wp_lang_attr' => get_bloginfo( 'language' ),
1740
+ 'wp_keep_scroll_position' => false,
1741
+ 'wp_shortcut_labels' => wp_json_encode( $shortcut_labels ),
1742
+ );
1743
+
1744
+ $suffix = SCRIPT_DEBUG ? '' : '.min';
1745
+ $version = 'ver=' . get_bloginfo( 'version' );
1746
+ $settings['content_css'] = includes_url( "css/dashicons$suffix.css?$version" ) . ',' .
1747
+ includes_url( "js/tinymce/skins/wordpress/wp-content.css?$version" );
1748
+
1749
+ return $settings;
1750
+ }
1751
+
1752
+ private static function get_translation() {
1753
+ if ( empty( self::$translation ) ) {
1754
+ self::$translation = array(
1755
+ 'New document' => __( 'New document', 'nimble-builder' ),
1756
+ 'Formats' => _x( 'Formats', 'TinyMCE', 'nimble-builder' ),
1757
+
1758
+ 'Headings' => _x( 'Headings', 'TinyMCE', 'nimble-builder' ),
1759
+ 'Heading 1' => array( __( 'Heading 1', 'nimble-builder' ), 'access1' ),
1760
+ 'Heading 2' => array( __( 'Heading 2', 'nimble-builder' ), 'access2' ),
1761
+ 'Heading 3' => array( __( 'Heading 3', 'nimble-builder' ), 'access3' ),
1762
+ 'Heading 4' => array( __( 'Heading 4', 'nimble-builder' ), 'access4' ),
1763
+ 'Heading 5' => array( __( 'Heading 5', 'nimble-builder' ), 'access5' ),
1764
+ 'Heading 6' => array( __( 'Heading 6', 'nimble-builder' ), 'access6' ),
1765
+
1766
+ /* translators: block tags */
1767
+ 'Blocks' => _x( 'Blocks', 'TinyMCE', 'nimble-builder' ),
1768
+ 'Paragraph' => array( __( 'Paragraph', 'nimble-builder' ), 'access7' ),
1769
+ 'Blockquote' => array( __( 'Blockquote', 'nimble-builder' ), 'accessQ' ),
1770
+ 'Div' => _x( 'Div', 'HTML tag', 'nimble-builder' ),
1771
+ 'Pre' => _x( 'Pre', 'HTML tag', 'nimble-builder' ),
1772
+ 'Preformatted' => _x( 'Preformatted', 'HTML tag', 'nimble-builder' ),
1773
+ 'Address' => _x( 'Address', 'HTML tag', 'nimble-builder' ),
1774
+
1775
+ 'Inline' => _x( 'Inline', 'HTML elements', 'nimble-builder' ),
1776
+ 'Underline' => array( __( 'Underline', 'nimble-builder' ), 'metaU' ),
1777
+ 'Strikethrough' => array( __( 'Strikethrough', 'nimble-builder' ), 'accessD' ),
1778
+ 'Subscript' => __( 'Subscript', 'nimble-builder' ),
1779
+ 'Superscript' => __( 'Superscript', 'nimble-builder' ),
1780
+ 'Clear formatting' => __( 'Clear formatting', 'nimble-builder' ),
1781
+ 'Bold' => array( __( 'Bold', 'nimble-builder' ), 'metaB' ),
1782
+ 'Italic' => array( __( 'Italic', 'nimble-builder' ), 'metaI' ),
1783
+ 'Code' => array( __( 'Code', 'nimble-builder' ), 'accessX' ),
1784
+ 'Source code' => __( 'Source code', 'nimble-builder' ),
1785
+ 'Font Family' => __( 'Font Family', 'nimble-builder' ),
1786
+ 'Font Sizes' => __( 'Font Sizes', 'nimble-builder' ),
1787
+
1788
+ 'Align center' => array( __( 'Align center', 'nimble-builder' ), 'accessC' ),
1789
+ 'Align right' => array( __( 'Align right', 'nimble-builder' ), 'accessR' ),
1790
+ 'Align left' => array( __( 'Align left', 'nimble-builder' ), 'accessL' ),
1791
+ 'Justify' => array( __( 'Justify', 'nimble-builder' ), 'accessJ' ),
1792
+ 'Increase indent' => __( 'Increase indent', 'nimble-builder' ),
1793
+ 'Decrease indent' => __( 'Decrease indent', 'nimble-builder' ),
1794
+
1795
+ 'Cut' => array( __( 'Cut', 'nimble-builder' ), 'metaX' ),
1796
+ 'Copy' => array( __( 'Copy', 'nimble-builder' ), 'metaC' ),
1797
+ 'Paste' => array( __( 'Paste', 'nimble-builder' ), 'metaV' ),
1798
+ 'Select all' => array( __( 'Select all', 'nimble-builder' ), 'metaA' ),
1799
+ 'Undo' => array( __( 'Undo', 'nimble-builder' ), 'metaZ' ),
1800
+ 'Redo' => array( __( 'Redo', 'nimble-builder' ), 'metaY' ),
1801
+
1802
+ 'Ok' => __( 'OK', 'nimble-builder' ),
1803
+ 'Cancel' => __( 'Cancel', 'nimble-builder' ),
1804
+ 'Close' => __( 'Close', 'nimble-builder' ),
1805
+ 'Visual aids' => __( 'Visual aids', 'nimble-builder' ),
1806
+
1807
+ 'Bullet list' => array( __( 'Bulleted list', 'nimble-builder' ), 'accessU' ),
1808
+ 'Numbered list' => array( __( 'Numbered list', 'nimble-builder' ), 'accessO' ),
1809
+ 'Square' => _x( 'Square', 'list style', 'nimble-builder' ),
1810
+ 'Default' => _x( 'Default', 'list style', 'nimble-builder' ),
1811
+ 'Circle' => _x( 'Circle', 'list style', 'nimble-builder' ),
1812
+ 'Disc' => _x( 'Disc', 'list style', 'nimble-builder' ),
1813
+ 'Lower Greek' => _x( 'Lower Greek', 'list style', 'nimble-builder' ),
1814
+ 'Lower Alpha' => _x( 'Lower Alpha', 'list style', 'nimble-builder' ),
1815
+ 'Upper Alpha' => _x( 'Upper Alpha', 'list style', 'nimble-builder' ),
1816
+ 'Upper Roman' => _x( 'Upper Roman', 'list style', 'nimble-builder' ),
1817
+ 'Lower Roman' => _x( 'Lower Roman', 'list style', 'nimble-builder' ),
1818
+ 'Name' => _x( 'Name', 'Name of link anchor (TinyMCE)', 'nimble-builder' ),
1819
+ 'Anchor' => _x( 'Anchor', 'Link anchor (TinyMCE)', 'nimble-builder' ),
1820
+ 'Anchors' => _x( 'Anchors', 'Link anchors (TinyMCE)', 'nimble-builder' ),
1821
+ 'Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.' =>
1822
+ __( 'Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.', 'nimble-builder' ),
1823
+ 'Id' => _x( 'Id', 'Id for link anchor (TinyMCE)', 'nimble-builder' ),
1824
+ 'Document properties' => __( 'Document properties', 'nimble-builder' ),
1825
+ 'Robots' => __( 'Robots', 'nimble-builder' ),
1826
+ 'Title' => __( 'Title', 'nimble-builder' ),
1827
+ 'Keywords' => __( 'Keywords', 'nimble-builder' ),
1828
+ 'Encoding' => __( 'Encoding', 'nimble-builder' ),
1829
+ 'Description' => __( 'Description', 'nimble-builder' ),
1830
+ 'Author' => __( 'Author', 'nimble-builder' ),
1831
+ 'Image' => __( 'Image', 'nimble-builder' ),
1832
+ 'Insert/edit image' => array( __( 'Insert/edit image', 'nimble-builder' ), 'accessM' ),
1833
+ 'General' => __( 'General', 'nimble-builder' ),
1834
+ 'Advanced' => __( 'Advanced', 'nimble-builder' ),
1835
+ 'Source' => __( 'Source', 'nimble-builder' ),
1836
+ 'Border' => __( 'Border', 'nimble-builder' ),
1837
+ 'Constrain proportions' => __( 'Constrain proportions', 'nimble-builder' ),
1838
+ 'Vertical space' => __( 'Vertical space', 'nimble-builder' ),
1839
+ 'Image description' => __( 'Image description', 'nimble-builder' ),
1840
+ 'Style' => __( 'Style', 'nimble-builder' ),
1841
+ 'Dimensions' => __( 'Dimensions', 'nimble-builder' ),
1842
+ 'Insert image' => __( 'Insert image', 'nimble-builder' ),
1843
+ 'Date/time' => __( 'Date/time', 'nimble-builder' ),
1844
+ 'Insert date/time' => __( 'Insert date/time', 'nimble-builder' ),
1845
+ 'Table of Contents' => __( 'Table of Contents', 'nimble-builder' ),
1846
+ 'Insert/Edit code sample' => __( 'Insert/edit code sample', 'nimble-builder' ),
1847
+ 'Language' => __( 'Language', 'nimble-builder' ),
1848
+ 'Media' => __( 'Media', 'nimble-builder' ),
1849
+ 'Insert/edit media' => __( 'Insert/edit media', 'nimble-builder' ),
1850
+ 'Poster' => __( 'Poster', 'nimble-builder' ),
1851
+ 'Alternative source' => __( 'Alternative source', 'nimble-builder' ),
1852
+ 'Paste your embed code below:' => __( 'Paste your embed code below:', 'nimble-builder' ),
1853
+ 'Insert video' => __( 'Insert video', 'nimble-builder' ),
1854
+ 'Embed' => __( 'Embed', 'nimble-builder' ),
1855
+ 'Special character' => __( 'Special character', 'nimble-builder' ),
1856
+ 'Right to left' => _x( 'Right to left', 'editor button', 'nimble-builder' ),
1857
+ 'Left to right' => _x( 'Left to right', 'editor button', 'nimble-builder' ),
1858
+ 'Emoticons' => __( 'Emoticons', 'nimble-builder' ),
1859
+ 'Nonbreaking space' => __( 'Nonbreaking space', 'nimble-builder' ),
1860
+ 'Page break' => __( 'Page break', 'nimble-builder' ),
1861
+ 'Paste as text' => __( 'Paste as text', 'nimble-builder' ),
1862
+ 'Preview' => __( 'Preview', 'nimble-builder' ),
1863
+ 'Print' => __( 'Print', 'nimble-builder' ),
1864
+ 'Save' => __( 'Save', 'nimble-builder' ),
1865
+ 'Fullscreen' => __( 'Fullscreen', 'nimble-builder' ),
1866
+ 'Horizontal line' => __( 'Horizontal line', 'nimble-builder' ),
1867
+ 'Horizontal space' => __( 'Horizontal space', 'nimble-builder' ),
1868
+ 'Restore last draft' => __( 'Restore last draft', 'nimble-builder' ),
1869
+ 'Insert/edit link' => array( __( 'Insert/edit link', 'nimble-builder' ), 'metaK' ),
1870
+ 'Remove link' => array( __( 'Remove link', 'nimble-builder' ), 'accessS' ),
1871
+ 'Link' => __( 'Link', 'nimble-builder' ),
1872
+ 'Insert link' => __( 'Insert link', 'nimble-builder' ),
1873
+ 'Insert/edit link' => __( 'Insert/edit link', 'nimble-builder' ),
1874
+ 'Target' => __( 'Target', 'nimble-builder' ),
1875
+ 'New window' => __( 'New window', 'nimble-builder' ),
1876
+ 'Text to display' => __( 'Text to display', 'nimble-builder' ),
1877
+ 'Url' => __( 'URL', 'nimble-builder' ),
1878
+ 'The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?' =>
1879
+ __( 'The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?', 'nimble-builder' ),
1880
+ 'The URL you entered seems to be an external link. Do you want to add the required http:// prefix?' =>
1881
+ __( 'The URL you entered seems to be an external link. Do you want to add the required http:// prefix?', 'nimble-builder' ),
1882
+
1883
+ 'Color' => __( 'Color', 'nimble-builder' ),
1884
+ 'Custom color' => __( 'Custom color', 'nimble-builder' ),
1885
+ 'Custom...' => _x( 'Custom...', 'label for custom color', 'nimble-builder' ), // no ellipsis
1886
+ 'No color' => __( 'No color', 'nimble-builder' ),
1887
+ 'R' => _x( 'R', 'Short for red in RGB', 'nimble-builder' ),
1888
+ 'G' => _x( 'G', 'Short for green in RGB', 'nimble-builder' ),
1889
+ 'B' => _x( 'B', 'Short for blue in RGB', 'nimble-builder' ),
1890
+ 'Could not find the specified string.' => __( 'Could not find the specified string.', 'nimble-builder' ),
1891
+ 'Replace' => _x( 'Replace', 'find/replace', 'nimble-builder' ),
1892
+ 'Next' => _x( 'Next', 'find/replace', 'nimble-builder' ),
1893
+ /* translators: previous */
1894
+ 'Prev' => _x( 'Prev', 'find/replace', 'nimble-builder' ),
1895
+ 'Whole words' => _x( 'Whole words', 'find/replace', 'nimble-builder' ),
1896
+ 'Find and replace' => __( 'Find and replace', 'nimble-builder' ),
1897
+ 'Replace with' => _x( 'Replace with', 'find/replace', 'nimble-builder' ),
1898
+ 'Find' => _x( 'Find', 'find/replace', 'nimble-builder' ),
1899
+ 'Replace all' => _x( 'Replace all', 'find/replace', 'nimble-builder' ),
1900
+ 'Match case' => __( 'Match case', 'nimble-builder' ),
1901
+ 'Spellcheck' => __( 'Check Spelling', 'nimble-builder' ),
1902
+ 'Finish' => _x( 'Finish', 'spellcheck', 'nimble-builder' ),
1903
+ 'Ignore all' => _x( 'Ignore all', 'spellcheck', 'nimble-builder' ),
1904
+ 'Ignore' => _x( 'Ignore', 'spellcheck', 'nimble-builder' ),
1905
+ 'Add to Dictionary' => __( 'Add to Dictionary', 'nimble-builder' ),
1906
+ 'Insert table' => __( 'Insert table', 'nimble-builder' ),
1907
+ 'Delete table' => __( 'Delete table', 'nimble-builder' ),
1908
+ 'Table properties' => __( 'Table properties', 'nimble-builder' ),
1909
+ 'Row properties' => __( 'Table row properties', 'nimble-builder' ),
1910
+ 'Cell properties' => __( 'Table cell properties', 'nimble-builder' ),
1911
+ 'Border color' => __( 'Border color', 'nimble-builder' ),
1912
+
1913
+ 'Row' => __( 'Row', 'nimble-builder' ),
1914
+ 'Rows' => __( 'Rows', 'nimble-builder' ),
1915
+ 'Column' => _x( 'Column', 'table column', 'nimble-builder' ),
1916
+ 'Cols' => _x( 'Cols', 'table columns', 'nimble-builder' ),
1917
+ 'Cell' => _x( 'Cell', 'table cell', 'nimble-builder' ),
1918
+ 'Header cell' => __( 'Header cell', 'nimble-builder' ),
1919
+ 'Header' => _x( 'Header', 'table header', 'nimble-builder' ),
1920
+ 'Body' => _x( 'Body', 'table body', 'nimble-builder' ),
1921
+ 'Footer' => _x( 'Footer', 'table footer', 'nimble-builder' ),
1922
+
1923
+ 'Insert row before' => __( 'Insert row before', 'nimble-builder' ),
1924
+ 'Insert row after' => __( 'Insert row after', 'nimble-builder' ),
1925
+ 'Insert column before' => __( 'Insert column before', 'nimble-builder' ),
1926
+ 'Insert column after' => __( 'Insert column after', 'nimble-builder' ),
1927
+ 'Paste row before' => __( 'Paste table row before', 'nimble-builder' ),
1928
+ 'Paste row after' => __( 'Paste table row after', 'nimble-builder' ),
1929
+ 'Delete row' => __( 'Delete row', 'nimble-builder' ),
1930
+ 'Delete column' => __( 'Delete column', 'nimble-builder' ),
1931
+ 'Cut row' => __( 'Cut table row', 'nimble-builder' ),
1932
+ 'Copy row' => __( 'Copy table row', 'nimble-builder' ),
1933
+ 'Merge cells' => __( 'Merge table cells', 'nimble-builder' ),
1934
+ 'Split cell' => __( 'Split table cell', 'nimble-builder' ),
1935
+
1936
+ 'Height' => __( 'Height', 'nimble-builder' ),
1937
+ 'Width' => __( 'Width', 'nimble-builder' ),
1938
+ 'Caption' => __( 'Caption', 'nimble-builder' ),
1939
+ 'Alignment' => __( 'Alignment', 'nimble-builder' ),
1940
+ 'H Align' => _x( 'H Align', 'horizontal table cell alignment', 'nimble-builder' ),
1941
+ 'Left' => __( 'Left', 'nimble-builder' ),
1942
+ 'Center' => __( 'Center', 'nimble-builder' ),
1943
+ 'Right' => __( 'Right', 'nimble-builder' ),
1944
+ 'None' => _x( 'None', 'table cell alignment attribute', 'nimble-builder' ),
1945
+ 'V Align' => _x( 'V Align', 'vertical table cell alignment', 'nimble-builder' ),
1946
+ 'Top' => __( 'Top', 'nimble-builder' ),
1947
+ 'Middle' => __( 'Middle', 'nimble-builder' ),
1948
+ 'Bottom' => __( 'Bottom', 'nimble-builder' ),
1949
+
1950
+ 'Row group' => __( 'Row group', 'nimble-builder' ),
1951
+ 'Column group' => __( 'Column group', 'nimble-builder' ),
1952
+ 'Row type' => __( 'Row type', 'nimble-builder' ),
1953
+ 'Cell type' => __( 'Cell type', 'nimble-builder' ),
1954
+ 'Cell padding' => __( 'Cell padding', 'nimble-builder' ),
1955
+ 'Cell spacing' => __( 'Cell spacing', 'nimble-builder' ),
1956
+ 'Scope' => _x( 'Scope', 'table cell scope attribute', 'nimble-builder' ),
1957
+
1958
+ 'Insert template' => _x( 'Insert template', 'TinyMCE', 'nimble-builder' ),
1959
+ 'Templates' => _x( 'Templates', 'TinyMCE', 'nimble-builder' ),
1960
+
1961
+ 'Background color' => __( 'Background color', 'nimble-builder' ),
1962
+ 'Text color' => __( 'Text color', 'nimble-builder' ),
1963
+ 'Show blocks' => _x( 'Show blocks', 'editor button', 'nimble-builder' ),
1964
+ 'Show invisible characters' => __( 'Show invisible characters', 'nimble-builder' ),
1965
+
1966
+ /* translators: word count */
1967
+ 'Words: {0}' => sprintf( __( 'Words: %s', 'nimble-builder' ), '{0}' ),
1968
+ 'Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.' =>
1969
+ __( 'Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.', 'nimble-builder' ) . "\n\n" .
1970
+ __( 'If you&#8217;re looking to paste rich content from Microsoft Word, try turning this option off. The editor will clean up text pasted from Word automatically.', 'nimble-builder' ),
1971
+ 'Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help' =>
1972
+ __( 'Rich Text Area. Press Alt-Shift-H for help.', 'nimble-builder' ),
1973
+ 'Rich Text Area. Press Control-Option-H for help.' => __( 'Rich Text Area. Press Control-Option-H for help.', 'nimble-builder' ),
1974
+ 'You have unsaved changes are you sure you want to navigate away?' =>
1975
+ __( 'The changes you made will be lost if you navigate away from this page.', 'nimble-builder' ),
1976
+ 'Your browser doesn\'t support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.' =>
1977
+ __( 'Your browser does not support direct access to the clipboard. Please use keyboard shortcuts or your browser&#8217;s edit menu instead.', 'nimble-builder' ),
1978
+ 'Insert' => _x( 'Insert', 'TinyMCE menu', 'nimble-builder' ),
1979
+ 'File' => _x( 'File', 'TinyMCE menu', 'nimble-builder' ),
1980
+ 'Edit' => _x( 'Edit', 'TinyMCE menu', 'nimble-builder' ),
1981
+ 'Tools' => _x( 'Tools', 'TinyMCE menu', 'nimble-builder' ),
1982
+ 'View' => _x( 'View', 'TinyMCE menu', 'nimble-builder' ),
1983
+ 'Table' => _x( 'Table', 'TinyMCE menu', 'nimble-builder' ),
1984
+ 'Format' => _x( 'Format', 'TinyMCE menu', 'nimble-builder' ),
1985
+ 'Toolbar Toggle' => array( __( 'Toolbar Toggle', 'nimble-builder' ), 'accessZ' ),
1986
+ 'Insert Read More tag' => array( __( 'Insert Read More tag', 'nimble-builder' ), 'accessT' ),
1987
+ 'Insert Page Break tag' => array( __( 'Insert Page Break tag', 'nimble-builder' ), 'accessP' ),
1988
+ 'Read more...' => __( 'Read more...', 'nimble-builder' ), // Title on the placeholder inside the editor (no ellipsis)
1989
+ 'Distraction-free writing mode' => array( __( 'Distraction-free writing mode', 'nimble-builder' ), 'accessW' ),
1990
+ 'No alignment' => __( 'No alignment', 'nimble-builder' ), // Tooltip for the 'alignnone' button in the image toolbar
1991
+ 'Remove' => __( 'Remove', 'nimble-builder' ), // Tooltip for the 'remove' button in the image toolbar
1992
+ 'Edit|button' => __( 'Edit', 'nimble-builder' ), // Tooltip for the 'edit' button in the image toolbar
1993
+ 'Paste URL or type to search' => __( 'Paste URL or type to search', 'nimble-builder' ), // Placeholder for the inline link dialog
1994
+ 'Apply' => __( 'Apply', 'nimble-builder' ), // Tooltip for the 'apply' button in the inline link dialog
1995
+ 'Link options' => __( 'Link options', 'nimble-builder' ), // Tooltip for the 'link options' button in the inline link dialog
1996
+ 'Visual' => _x( 'Visual', 'Name for the Visual editor tab', 'nimble-builder' ), // Editor switch tab label
1997
+ 'Text' => _x( 'Text', 'Name for the Text editor tab (formerly HTML)', 'nimble-builder' ), // Editor switch tab label
1998
+ 'Add Media' => array( __( 'Add Media', 'nimble-builder' ), 'accessM' ), // Tooltip for the 'Add Media' button in the Block Editor Classic block
1999
+ 'Keyboard Shortcuts' => array( __( 'Keyboard Shortcuts', 'nimble-builder' ), 'accessH' ),
2000
+ 'Classic Block Keyboard Shortcuts' => __( 'Classic Block Keyboard Shortcuts', 'nimble-builder' ),
2001
+ 'Default shortcuts,' => __( 'Default shortcuts,', 'nimble-builder' ),
2002
+ 'Additional shortcuts,' => __( 'Additional shortcuts,', 'nimble-builder' ),
2003
+ 'Focus shortcuts:' => __( 'Focus shortcuts:', 'nimble-builder' ),
2004
+ 'Inline toolbar (when an image, link or preview is selected)' => __( 'Inline toolbar (when an image, link or preview is selected)', 'nimble-builder' ),
2005
+ 'Editor menu (when enabled)' => __( 'Editor menu (when enabled)', 'nimble-builder' ),
2006
+ 'Editor toolbar' => __( 'Editor toolbar', 'nimble-builder' ),
2007
+ 'Elements path' => __( 'Elements path', 'nimble-builder' ),
2008
+ 'Ctrl + Alt + letter:' => __( 'Ctrl + Alt + letter:', 'nimble-builder' ),
2009
+ 'Shift + Alt + letter:' => __( 'Shift + Alt + letter:', 'nimble-builder' ),
2010
+ 'Cmd + letter:' => __( 'Cmd + letter:', 'nimble-builder' ),
2011
+ 'Ctrl + letter:' => __( 'Ctrl + letter:', 'nimble-builder' ),
2012
+ 'Letter' => __( 'Letter', 'nimble-builder' ),
2013
+ 'Action' => __( 'Action', 'nimble-builder' ),
2014
+ 'Warning: the link has been inserted but may have errors. Please test it.' => __( 'Warning: the link has been inserted but may have errors. Please test it.', 'nimble-builder' ),
2015
+ 'To move focus to other buttons use Tab or the arrow keys. To return focus to the editor press Escape or use one of the buttons.' =>
2016
+ __( 'To move focus to other buttons use Tab or the arrow keys. To return focus to the editor press Escape or use one of the buttons.', 'nimble-builder' ),
2017
+ 'When starting a new paragraph with one of these formatting shortcuts followed by a space, the formatting will be applied automatically. Press Backspace or Escape to undo.' =>
2018
+ __( 'When starting a new paragraph with one of these formatting shortcuts followed by a space, the formatting will be applied automatically. Press Backspace or Escape to undo.', 'nimble-builder' ),
2019
+ 'The following formatting shortcuts are replaced when pressing Enter. Press Escape or the Undo button to undo.' =>
2020
+ __( 'The following formatting shortcuts are replaced when pressing Enter. Press Escape or the Undo button to undo.', 'nimble-builder' ),
2021
+ 'The next group of formatting shortcuts are applied as you type or when you insert them around plain text in the same paragraph. Press Escape or the Undo button to undo.' =>
2022
+ __( 'The next group of formatting shortcuts are applied as you type or when you insert them around plain text in the same paragraph. Press Escape or the Undo button to undo.', 'nimble-builder' ),
2023
+ );
2024
+ }
2025
+
2026
+ /*
2027
+ Imagetools plugin (not included):
2028
+ 'Edit image' => __( 'Edit image' ),
2029
+ 'Image options' => __( 'Image options' ),
2030
+ 'Back' => __( 'Back' ),
2031
+ 'Invert' => __( 'Invert' ),
2032
+ 'Flip horizontally' => __( 'Flip horizontally' ),
2033
+ 'Flip vertically' => __( 'Flip vertically' ),
2034
+ 'Crop' => __( 'Crop' ),
2035
+ 'Orientation' => __( 'Orientation' ),
2036
+ 'Resize' => __( 'Resize' ),
2037
+ 'Rotate clockwise' => __( 'Rotate clockwise' ),
2038
+ 'Rotate counterclockwise' => __( 'Rotate counterclockwise' ),
2039
+ 'Sharpen' => __( 'Sharpen' ),
2040
+ 'Brightness' => __( 'Brightness' ),
2041
+ 'Color levels' => __( 'Color levels' ),
2042
+ 'Contrast' => __( 'Contrast' ),
2043
+ 'Gamma' => __( 'Gamma' ),
2044
+ 'Zoom in' => __( 'Zoom in' ),
2045
+ 'Zoom out' => __( 'Zoom out' ),
2046
+ */
2047
+
2048
+ return self::$translation;
2049
+ }
2050
+
2051
+ /**
2052
+ * Translates the default TinyMCE strings and returns them as JSON encoded object ready to be loaded with tinymce.addI18n(),
2053
+ * or as JS snippet that should run after tinymce.js is loaded.
2054
+ *
2055
+ * @param string $mce_locale The locale used for the editor.
2056
+ * @param bool $json_only optional Whether to include the JavaScript calls to tinymce.addI18n() and tinymce.ScriptLoader.markDone().
2057
+ * @return string Translation object, JSON encoded.
2058
+ */
2059
+ public static function wp_mce_translation( $mce_locale = '', $json_only = false ) {
2060
+ if ( ! $mce_locale ) {
2061
+ $mce_locale = self::get_mce_locale();
2062
+ }
2063
+
2064
+ $mce_translation = self::get_translation();
2065
+
2066
+ foreach ( $mce_translation as $name => $value ) {
2067
+ if ( is_array( $value ) ) {
2068
+ $mce_translation[ $name ] = $value[0];
2069
+ }
2070
+ }
2071
+
2072
+ /**
2073
+ * Filters translated strings prepared for TinyMCE.
2074
+ *
2075
+ * @since 3.9.0
2076
+ *
2077
+ * @param array $mce_translation Key/value pairs of strings.
2078
+ * @param string $mce_locale Locale.
2079
+ */
2080
+ $mce_translation = apply_filters( 'wp_mce_translation', $mce_translation, $mce_locale );
2081
+
2082
+ foreach ( $mce_translation as $key => $value ) {
2083
+ if ( $key === $value ) {
2084
+ unset( $mce_translation[ $key ] );
2085
+ continue;
2086
+ }
2087
+
2088
+ if ( false !== strpos( $value, '&' ) ) {
2089
+ $mce_translation[ $key ] = html_entity_decode( $value, ENT_QUOTES, 'UTF-8' );
2090
+ }
2091
+ }
2092
+ if ( is_rtl() ) {
2093
+ $mce_translation['_dir'] = 'rtl';
2094
+ }
2095
+
2096
+ if ( $json_only ) {
2097
+ return wp_json_encode( $mce_translation );
2098
+ }
2099
+
2100
+ $baseurl = self::get_baseurl();
2101
+
2102
+ return "tinymce.addI18n( '$mce_locale', " . wp_json_encode( $mce_translation ) . ");\n" .
2103
+ "tinymce.ScriptLoader.markDone( '$baseurl/langs/$mce_locale.js' );\n";
2104
+ }
2105
+
2106
+ /**
2107
+ * Force uncompressed TinyMCE when a custom theme has been defined.
2108
+ *
2109
+ * The compressed TinyMCE file cannot deal with custom themes, so this makes
2110
+ * sure that we use the uncompressed TinyMCE file if a theme is defined.
2111
+ * Even if we are on a production environment.
2112
+ */
2113
+ public static function force_uncompressed_tinymce() {
2114
+ $has_custom_theme = false;
2115
+ foreach ( self::$mce_settings as $init ) {
2116
+ if ( ! empty( $init['theme_url'] ) ) {
2117
+ $has_custom_theme = true;
2118
+ break;
2119
+ }
2120
+ }
2121
+
2122
+ if ( ! $has_custom_theme ) {
2123
+ return;
2124
+ }
2125
+
2126
+ $wp_scripts = wp_scripts();
2127
+
2128
+ $wp_scripts->remove( 'wp-tinymce' );
2129
+ wp_register_tinymce_scripts( $wp_scripts, true );
2130
+ }
2131
+
2132
+ /**
2133
+ * Print (output) the main TinyMCE scripts.
2134
+ *
2135
+ * @since 4.8.0
2136
+ *
2137
+ * @global string $tinymce_version
2138
+ * @global bool $concatenate_scripts
2139
+ * @global bool $compress_scripts
2140
+ */
2141
+ public static function print_tinymce_scripts() {
2142
+ global $concatenate_scripts;
2143
+
2144
+ if ( self::$tinymce_scripts_printed ) {
2145
+ return;
2146
+ }
2147
+
2148
+ self::$tinymce_scripts_printed = true;
2149
+
2150
+ if ( ! isset( $concatenate_scripts ) ) {
2151
+ script_concat_settings();
2152
+ }
2153
+
2154
+ wp_print_scripts( array( 'wp-tinymce' ) );
2155
+
2156
+ echo "<script type='text/javascript'>\n" . self::wp_mce_translation() . "</script>\n";
2157
+ }
2158
+
2159
+ /**
2160
+ * Print (output) the TinyMCE configuration and initialization scripts.
2161
+ *
2162
+ * @global string $tinymce_version
2163
+ */
2164
+ public static function editor_js() {
2165
+ global $tinymce_version;
2166
+
2167
+ $tmce_on = ! empty( self::$mce_settings );
2168
+ $mceInit = $qtInit = '';
2169
+
2170
+ if ( $tmce_on ) {
2171
+ foreach ( self::$mce_settings as $editor_id => $init ) {
2172
+ $options = self::_parse_init( $init );
2173
+ $mceInit .= "'$editor_id':{$options},";
2174
+ }
2175
+ $mceInit = '{' . trim( $mceInit, ',' ) . '}';
2176
+ } else {
2177
+ $mceInit = '{}';
2178
+ }
2179
+
2180
+ if ( ! empty( self::$qt_settings ) ) {
2181
+ foreach ( self::$qt_settings as $editor_id => $init ) {
2182
+ $options = self::_parse_init( $init );
2183
+ $qtInit .= "'$editor_id':{$options},";
2184
+ }
2185
+ $qtInit = '{' . trim( $qtInit, ',' ) . '}';
2186
+ } else {
2187
+ $qtInit = '{}';
2188
+ }
2189
+
2190
+ $ref = array(
2191
+ 'plugins' => implode( ',', self::$plugins ),
2192
+ 'theme' => 'modern',
2193
+ 'language' => self::$mce_locale,
2194
+ );
2195
+
2196
+ $suffix = SCRIPT_DEBUG ? '' : '.min';
2197
+ $baseurl = self::get_baseurl();
2198
+ $version = 'ver=' . $tinymce_version;
2199
+
2200
+ /**
2201
+ * Fires immediately before the TinyMCE settings are printed.
2202
+ *
2203
+ * @since 3.2.0
2204
+ *
2205
+ * @param array $mce_settings TinyMCE settings array.
2206
+ */
2207
+ do_action( 'before_wp_tiny_mce', self::$mce_settings );
2208
+ ?>
2209
+
2210
+ <script type="text/javascript">
2211
+ nimbleTinyMCEPreInit = {
2212
+ baseURL: "<?php echo $baseurl; ?>",
2213
+ suffix: "<?php echo $suffix; ?>",
2214
+ <?php
2215
+
2216
+ if ( self::$drag_drop_upload ) {
2217
+ echo 'dragDropUpload: true,';
2218
+ }
2219
+
2220
+ ?>
2221
+ mceInit: <?php echo $mceInit; ?>,
2222
+ qtInit: <?php echo $qtInit; ?>,
2223
+ ref: <?php echo self::_parse_init( $ref ); ?>,
2224
+ load_ext: function(url,lang){var sl=tinymce.ScriptLoader;sl.markDone(url+'/langs/'+lang+'.js');sl.markDone(url+'/langs/'+lang+'_dlg.js');}
2225
+ };
2226
+ </script>
2227
+ <?php
2228
+
2229
+ if ( $tmce_on ) {
2230
+ self::print_tinymce_scripts();
2231
+
2232
+ if ( self::$ext_plugins ) {
2233
+ echo "<script type='text/javascript' src='{$baseurl}/langs/wp-langs-en.js?$version'></script>\n";
2234
+ }
2235
+ }
2236
+
2237
+ /**
2238
+ * Fires after tinymce.js is loaded, but before any TinyMCE editor
2239
+ * instances are created.
2240
+ *
2241
+ * @since 3.9.0
2242
+ *
2243
+ * @param array $mce_settings TinyMCE settings array.
2244
+ */
2245
+ do_action( 'wp_tiny_mce_init', self::$mce_settings );
2246
+
2247
+ ?>
2248
+ <script type="text/javascript">
2249
+ <?php
2250
+
2251
+ if ( self::$ext_plugins ) {
2252
+ echo self::$ext_plugins . "\n";
2253
+ }
2254
+
2255
+ if ( ! is_admin() ) {
2256
+ echo 'var ajaxurl = "' . admin_url( 'admin-ajax.php', 'relative' ) . '";';
2257
+ }
2258
+
2259
+ ?>
2260
+
2261
+ ( function() {
2262
+ var init, id, $wrap;
2263
+
2264
+ if ( typeof tinymce !== 'undefined' ) {
2265
+ if ( tinymce.Env.ie && tinymce.Env.ie < 11 ) {
2266
+ tinymce.$( '.wp-editor-wrap ' ).removeClass( 'tmce-active' ).addClass( 'html-active' );
2267
+ return;
2268
+ }
2269
+
2270
+ for ( id in nimbleTinyMCEPreInit.mceInit ) {
2271
+ init = nimbleTinyMCEPreInit.mceInit[id];
2272
+ $wrap = tinymce.$( '#wp-' + id + '-wrap' );
2273
+
2274
+ if ( ( $wrap.hasClass( 'tmce-active' ) || ! nimbleTinyMCEPreInit.qtInit.hasOwnProperty( id ) ) && ! init.wp_skip_init ) {
2275
+ tinymce.init( init );
2276
+ if ( ! window.wpActiveEditor ) {
2277
+ window.wpActiveEditor = id;//<= where is this used ?
2278
+ }
2279
+ }
2280
+ }
2281
+ }
2282
+
2283
+ if ( typeof quicktags !== 'undefined' ) {
2284
+ for ( id in nimbleTinyMCEPreInit.qtInit ) {
2285
+ quicktags( nimbleTinyMCEPreInit.qtInit[id] );
2286
+
2287
+ if ( ! window.wpActiveEditor ) {
2288
+ window.wpActiveEditor = id;//<= where is this used ?
2289
+ }
2290
+ }
2291
+ }
2292
+ }());
2293
+ </script>
2294
+ <?php
2295
+
2296
+ if ( in_array( 'wplink', self::$plugins, true ) || in_array( 'link', self::$qt_buttons, true ) ) {
2297
+ self::wp_link_dialog();
2298
+ }
2299
+
2300
+ /**
2301
+ * Fires after any core TinyMCE editor instances are created.
2302
+ *
2303
+ * @since 3.2.0
2304
+ *
2305
+ * @param array $mce_settings TinyMCE settings array.
2306
+ */
2307
+ do_action( 'after_wp_tiny_mce', self::$mce_settings );
2308
+ }
2309
+
2310
+ /**
2311
+ * Outputs the HTML for distraction-free writing mode.
2312
+ *
2313
+ * @since 3.2.0
2314
+ * @deprecated 4.3.0
2315
+ */
2316
+ public static function wp_fullscreen_html() {
2317
+ _deprecated_function( __FUNCTION__, '4.3.0' );
2318
+ }
2319
+
2320
+ /**
2321
+ * Performs post queries for internal linking.
2322
+ *
2323
+ * @since 3.1.0
2324
+ *
2325
+ * @param array $args Optional. Accepts 'pagenum' and 's' (search) arguments.
2326
+ * @return false|array Results.
2327
+ */
2328
+ public static function wp_link_query( $args = array() ) {
2329
+ $pts = get_post_types( array( 'public' => true ), 'objects' );
2330
+ $pt_names = array_keys( $pts );
2331
+
2332
+ $query = array(
2333
+ 'post_type' => $pt_names,
2334
+ 'suppress_filters' => true,
2335
+ 'update_post_term_cache' => false,
2336
+ 'update_post_meta_cache' => false,
2337
+ 'post_status' => 'publish',
2338
+ 'posts_per_page' => 20,
2339
+ );
2340
+
2341
+ $args['pagenum'] = isset( $args['pagenum'] ) ? absint( $args['pagenum'] ) : 1;
2342
+
2343
+ if ( isset( $args['s'] ) ) {
2344
+ $query['s'] = $args['s'];
2345
+ }
2346
+
2347
+ $query['offset'] = $args['pagenum'] > 1 ? $query['posts_per_page'] * ( $args['pagenum'] - 1 ) : 0;
2348
+
2349
+ /**
2350
+ * Filters the link query arguments.
2351
+ *
2352
+ * Allows modification of the link query arguments before querying.
2353
+ *
2354
+ * @see WP_Query for a full list of arguments
2355
+ *
2356
+ * @since 3.7.0
2357
+ *
2358
+ * @param array $query An array of WP_Q