Boxzilla - Version 3.1.10

Version Description

Download this release

Release Info

Developer DvanKooten
Plugin Icon 128x128 Boxzilla
Version 3.1.10
Comparing to
See all releases

Code changes from version 3.1.8 to 3.1.10

assets/browserify/script.js CHANGED
@@ -3,42 +3,16 @@
3
 
4
  var Boxzilla = require('boxzilla');
5
  var options = window.boxzilla_options;
6
- var isLoggedIn = document.body.className.indexOf('logged-in') > -1;
7
 
8
- // failsafe against including script twice.
9
- if( options.inited ) {
10
- return;
11
- }
12
-
13
- // print message when test mode is enabled
14
- if( isLoggedIn && options.testMode ) {
15
- console.log( 'Boxzilla: Test mode is enabled. Please disable test mode if you\'re done testing.' );
16
- }
17
-
18
- // init boxzilla
19
- Boxzilla.init();
20
-
21
- // create boxes from options
22
- for( var i=0; i < options.boxes.length; i++ ) {
23
- // get opts
24
- var boxOpts = options.boxes[i];
25
- boxOpts.testMode = isLoggedIn && options.testMode;
26
 
27
- // fix http:// links in box content....
28
- if( window.location.protocol === "https:" && window.location.host ) {
29
- var o = "http://" + window.location.host;
30
- var n = o.replace('http://', 'https://');
31
- boxOpts.content = boxOpts.content.replace(o, n);
32
  }
33
-
34
- // create box
35
- var box = Boxzilla.create( boxOpts.id, boxOpts);
36
-
37
- // add custom css to box
38
- css(box.element, boxOpts.css);
39
-
40
- box.element.firstChild.firstChild.className += " first-child";
41
- box.element.firstChild.lastChild.className += " last-child";
42
  }
43
 
44
  // helper function for setting CSS styles
@@ -68,12 +42,62 @@
68
  }
69
  }
70
 
71
- /**
72
- * If a MailChimp for WordPress form was submitted, open the box containing that form (if any)
73
- *
74
- * TODO: Just set location hash from MailChimp for WP?
75
- */
76
- window.addEventListener('load', function() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
  if( typeof(window.mc4wp_forms_config) === "object" && window.mc4wp_forms_config.submitted_form ) {
78
  var selector = '#' + window.mc4wp_forms_config.submitted_form.element_id;
79
  var boxes = Boxzilla.boxes;
@@ -86,8 +110,8 @@
86
  }
87
  }
88
  }
89
- });
90
 
91
- options.inited = true;
92
- window.Boxzilla = Boxzilla;
93
  })();
3
 
4
  var Boxzilla = require('boxzilla');
5
  var options = window.boxzilla_options;
 
6
 
7
+ // expose Boxzilla object to window
8
+ window.Boxzilla = Boxzilla;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
 
10
+ function ready(fn) {
11
+ if (document.readyState != 'loading'){
12
+ fn();
13
+ } else {
14
+ document.addEventListener('DOMContentLoaded', fn);
15
  }
 
 
 
 
 
 
 
 
 
16
  }
17
 
18
  // helper function for setting CSS styles
42
  }
43
  }
44
 
45
+ function createBoxesFromConfig() {
46
+ var isLoggedIn = document.body.className.indexOf('logged-in') > -1;
47
+
48
+ // failsafe against including script twice.
49
+ if( options.inited ) {
50
+ return;
51
+ }
52
+
53
+ // print message when test mode is enabled
54
+ if( isLoggedIn && options.testMode ) {
55
+ console.log( 'Boxzilla: Test mode is enabled. Please disable test mode if you\'re done testing.' );
56
+ }
57
+
58
+ // init boxzilla
59
+ Boxzilla.init();
60
+
61
+ // create boxes from options
62
+ for( var i=0; i < options.boxes.length; i++ ) {
63
+ // get opts
64
+ var boxOpts = options.boxes[i];
65
+ boxOpts.testMode = isLoggedIn && options.testMode;
66
+
67
+ // fix http:// links in box content....
68
+ if( window.location.protocol === "https:" && window.location.host ) {
69
+ var o = "http://" + window.location.host;
70
+ var n = o.replace('http://', 'https://');
71
+ boxOpts.content = boxOpts.content.replace(o, n);
72
+ }
73
+
74
+ // create box
75
+ var box = Boxzilla.create(boxOpts.id, boxOpts);
76
+
77
+ // add box slug to box element as classname
78
+ box.element.className = box.element.className + ' boxzilla-' + boxOpts.post.slug;
79
+
80
+ // add custom css to box
81
+ css(box.element, boxOpts.css);
82
+
83
+ box.element.firstChild.firstChild.className += " first-child";
84
+ box.element.firstChild.lastChild.className += " last-child";
85
+ }
86
+
87
+ /**
88
+ * If a MailChimp for WordPress form was submitted, open the box containing that form (if any)
89
+ *
90
+ * TODO: Just set location hash from MailChimp for WP?
91
+ */
92
+ window.addEventListener('load', openMailChimpForWordPressBox);
93
+
94
+ options.inited = true;
95
+
96
+ // trigger "done" event.
97
+ Boxzilla.trigger('done');
98
+ }
99
+
100
+ function openMailChimpForWordPressBox() {
101
  if( typeof(window.mc4wp_forms_config) === "object" && window.mc4wp_forms_config.submitted_form ) {
102
  var selector = '#' + window.mc4wp_forms_config.submitted_form.element_id;
103
  var boxes = Boxzilla.boxes;
110
  }
111
  }
112
  }
113
+ }
114
 
115
+ // create boxes as soon as document.ready fires
116
+ ready(createBoxesFromConfig);
117
  })();
assets/js/script.js CHANGED
@@ -8,42 +8,16 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
8
 
9
  var Boxzilla = require('boxzilla');
10
  var options = window.boxzilla_options;
11
- var isLoggedIn = document.body.className.indexOf('logged-in') > -1;
12
 
13
- // failsafe against including script twice.
14
- if (options.inited) {
15
- return;
16
- }
17
-
18
- // print message when test mode is enabled
19
- if (isLoggedIn && options.testMode) {
20
- console.log('Boxzilla: Test mode is enabled. Please disable test mode if you\'re done testing.');
21
- }
22
-
23
- // init boxzilla
24
- Boxzilla.init();
25
-
26
- // create boxes from options
27
- for (var i = 0; i < options.boxes.length; i++) {
28
- // get opts
29
- var boxOpts = options.boxes[i];
30
- boxOpts.testMode = isLoggedIn && options.testMode;
31
 
32
- // fix http:// links in box content....
33
- if (window.location.protocol === "https:" && window.location.host) {
34
- var o = "http://" + window.location.host;
35
- var n = o.replace('http://', 'https://');
36
- boxOpts.content = boxOpts.content.replace(o, n);
37
  }
38
-
39
- // create box
40
- var box = Boxzilla.create(boxOpts.id, boxOpts);
41
-
42
- // add custom css to box
43
- css(box.element, boxOpts.css);
44
-
45
- box.element.firstChild.firstChild.className += " first-child";
46
- box.element.firstChild.lastChild.className += " last-child";
47
  }
48
 
49
  // helper function for setting CSS styles
@@ -73,12 +47,62 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
73
  }
74
  }
75
 
76
- /**
77
- * If a MailChimp for WordPress form was submitted, open the box containing that form (if any)
78
- *
79
- * TODO: Just set location hash from MailChimp for WP?
80
- */
81
- window.addEventListener('load', function () {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  if (_typeof(window.mc4wp_forms_config) === "object" && window.mc4wp_forms_config.submitted_form) {
83
  var selector = '#' + window.mc4wp_forms_config.submitted_form.element_id;
84
  var boxes = Boxzilla.boxes;
@@ -93,10 +117,10 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
93
  }
94
  }
95
  }
96
- });
97
 
98
- options.inited = true;
99
- window.Boxzilla = Boxzilla;
100
  })();
101
 
102
  },{"boxzilla":4}],2:[function(require,module,exports){
@@ -346,7 +370,9 @@ Box.prototype.events = function () {
346
  var box = this;
347
 
348
  // attach event to "close" icon inside box
349
- this.closeIcon && this.closeIcon.addEventListener('click', box.dismiss.bind(this));
 
 
350
 
351
  this.element.addEventListener('click', function (e) {
352
  if (e.target.tagName === 'A') {
@@ -359,13 +385,6 @@ Box.prototype.events = function () {
359
  Boxzilla.trigger('box.interactions.form', [box, e.target]);
360
  }, false);
361
 
362
- window.addEventListener("hashchange", function () {
363
- var needle = "#boxzilla-" + box.id;
364
- if (location.hash === needle) {
365
- box.toggle();
366
- }
367
- });
368
-
369
  // maybe show box right away
370
  if (this.fits() && this.locationHashRefersBox()) {
371
  window.addEventListener('load', this.show.bind(this));
@@ -480,12 +499,6 @@ Box.prototype.toggle = function (show) {
480
 
481
  Animator.toggle(this.element, this.config.animation);
482
 
483
- // focus on first input field in box
484
- var firstInput = this.element.querySelector('input, textarea');
485
- if (firstInput) {
486
- firstInput.focus();
487
- }
488
-
489
  return true;
490
  };
491
 
@@ -644,6 +657,7 @@ var EventEmitter = require('wolfy87-eventemitter'),
644
  Timer = require('./timer.js'),
645
  boxes = [],
646
  overlay,
 
647
  exitIntentDelayTimer,
648
  exitIntentTriggered,
649
  siteTimer,
@@ -724,10 +738,11 @@ function checkTimeCriteria() {
724
 
725
  // check triggerHeight criteria for all boxes
726
  function checkHeightCriteria() {
727
- var scrollY = (window.scrollY || window.pageYOffset) + window.innerHeight * 0.75;
728
 
729
- boxes.forEach(function (box) {
 
730
 
 
731
  if (!box.mayAutoShow() || box.triggerHeight <= 0) {
732
  return;
733
  }
@@ -757,10 +772,10 @@ function onOverlayClick(e) {
757
  var x = e.offsetX;
758
  var y = e.offsetY;
759
 
760
- // calculate if click was near a box to avoid closing it (click error margin)
761
  boxes.forEach(function (box) {
762
  var rect = box.element.getBoundingClientRect();
763
- var margin = 100 + window.innerWidth * 0.05;
764
 
765
  // if click was not anywhere near box, dismiss it.
766
  if (x < rect.left - margin || x > rect.right + margin || y < rect.top - margin || y > rect.bottom + margin) {
@@ -813,10 +828,21 @@ function onMouseEnter() {
813
  }
814
  }
815
 
 
 
 
 
 
 
 
 
 
816
  var timers = {
817
  start: function start() {
818
- var sessionTime = sessionStorage.getItem('boxzilla_timer');
819
- if (sessionTime) siteTimer.time = sessionTime;
 
 
820
  siteTimer.start();
821
  pageTimer.start();
822
  },
@@ -829,9 +855,16 @@ var timers = {
829
 
830
  // initialise & add event listeners
831
  Boxzilla.init = function () {
832
- siteTimer = new Timer(sessionStorage.getItem('boxzilla_timer') || 0);
 
 
 
 
 
 
 
 
833
  pageTimer = new Timer(0);
834
- pageViews = sessionStorage.getItem('boxzilla_pageviews') || 0;
835
 
836
  // insert styles into DOM
837
  var styles = require('./styles.js');
@@ -847,8 +880,8 @@ Boxzilla.init = function () {
847
  document.body.appendChild(overlay);
848
 
849
  // event binds
850
- window.addEventListener('touchmove', throttle(checkHeightCriteria));
851
- window.addEventListener('scroll', throttle(checkHeightCriteria));
852
  window.addEventListener('resize', throttle(recalculateHeights));
853
  window.addEventListener('load', recalculateHeights);
854
  overlay.addEventListener('click', onOverlayClick);
@@ -939,6 +972,7 @@ Boxzilla.toggle = function (id) {
939
  // expose each individual box.
940
  Boxzilla.boxes = boxes;
941
 
 
942
  window.Boxzilla = Boxzilla;
943
 
944
  if (typeof module !== 'undefined' && module.exports) {
@@ -948,7 +982,7 @@ if (typeof module !== 'undefined' && module.exports) {
948
  },{"./box.js":3,"./styles.js":5,"./timer.js":6,"wolfy87-eventemitter":7}],5:[function(require,module,exports){
949
  "use strict";
950
 
951
- var styles = "@media(max-width:780px){body,html{-webkit-overflow-scrolling:touch!important}}#boxzilla-overlay{position:fixed;background:rgba(0,0,0,.65);width:100%;height:100%;left:0;top:0;z-index:99999}.boxzilla-center-container{position:fixed;top:0;left:0;right:0;height:0;text-align:center;z-index:999999;line-height:0}.boxzilla-center-container .boxzilla{display:inline-block;text-align:left;position:relative;line-height:normal}.boxzilla{position:fixed;z-index:999999;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background:#fff;padding:25px}.boxzilla.boxzilla-top-left{top:0;left:0}.boxzilla.boxzilla-top-right{top:0;right:0}.boxzilla.boxzilla-bottom-left{bottom:0;left:0}.boxzilla.boxzilla-bottom-right{bottom:0;right:0}.boxzilla-content>:first-child{margin-top:0;padding-top:0}.boxzilla-content>:last-child{margin-bottom:0;padding-bottom:0}.boxzilla-close-icon{position:absolute;right:0;top:0;text-align:center;padding:6px;cursor:pointer;-webkit-appearance:none;font-size:28px;font-weight:700;line-height:20px;color:#000;opacity:.5}.boxzilla-close-icon:focus,.boxzilla-close-icon:hover{opacity:.8}";
952
  module.exports = styles;
953
 
954
  },{}],6:[function(require,module,exports){
8
 
9
  var Boxzilla = require('boxzilla');
10
  var options = window.boxzilla_options;
 
11
 
12
+ // expose Boxzilla object to window
13
+ window.Boxzilla = Boxzilla;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
+ function ready(fn) {
16
+ if (document.readyState != 'loading') {
17
+ fn();
18
+ } else {
19
+ document.addEventListener('DOMContentLoaded', fn);
20
  }
 
 
 
 
 
 
 
 
 
21
  }
22
 
23
  // helper function for setting CSS styles
47
  }
48
  }
49
 
50
+ function createBoxesFromConfig() {
51
+ var isLoggedIn = document.body.className.indexOf('logged-in') > -1;
52
+
53
+ // failsafe against including script twice.
54
+ if (options.inited) {
55
+ return;
56
+ }
57
+
58
+ // print message when test mode is enabled
59
+ if (isLoggedIn && options.testMode) {
60
+ console.log('Boxzilla: Test mode is enabled. Please disable test mode if you\'re done testing.');
61
+ }
62
+
63
+ // init boxzilla
64
+ Boxzilla.init();
65
+
66
+ // create boxes from options
67
+ for (var i = 0; i < options.boxes.length; i++) {
68
+ // get opts
69
+ var boxOpts = options.boxes[i];
70
+ boxOpts.testMode = isLoggedIn && options.testMode;
71
+
72
+ // fix http:// links in box content....
73
+ if (window.location.protocol === "https:" && window.location.host) {
74
+ var o = "http://" + window.location.host;
75
+ var n = o.replace('http://', 'https://');
76
+ boxOpts.content = boxOpts.content.replace(o, n);
77
+ }
78
+
79
+ // create box
80
+ var box = Boxzilla.create(boxOpts.id, boxOpts);
81
+
82
+ // add box slug to box element as classname
83
+ box.element.className = box.element.className + ' boxzilla-' + boxOpts.post.slug;
84
+
85
+ // add custom css to box
86
+ css(box.element, boxOpts.css);
87
+
88
+ box.element.firstChild.firstChild.className += " first-child";
89
+ box.element.firstChild.lastChild.className += " last-child";
90
+ }
91
+
92
+ /**
93
+ * If a MailChimp for WordPress form was submitted, open the box containing that form (if any)
94
+ *
95
+ * TODO: Just set location hash from MailChimp for WP?
96
+ */
97
+ window.addEventListener('load', openMailChimpForWordPressBox);
98
+
99
+ options.inited = true;
100
+
101
+ // trigger "done" event.
102
+ Boxzilla.trigger('done');
103
+ }
104
+
105
+ function openMailChimpForWordPressBox() {
106
  if (_typeof(window.mc4wp_forms_config) === "object" && window.mc4wp_forms_config.submitted_form) {
107
  var selector = '#' + window.mc4wp_forms_config.submitted_form.element_id;
108
  var boxes = Boxzilla.boxes;
117
  }
118
  }
119
  }
120
+ }
121
 
122
+ // create boxes as soon as document.ready fires
123
+ ready(createBoxesFromConfig);
124
  })();
125
 
126
  },{"boxzilla":4}],2:[function(require,module,exports){
370
  var box = this;
371
 
372
  // attach event to "close" icon inside box
373
+ if (this.closeIcon) {
374
+ this.closeIcon.addEventListener('click', this.dismiss.bind(this));
375
+ }
376
 
377
  this.element.addEventListener('click', function (e) {
378
  if (e.target.tagName === 'A') {
385
  Boxzilla.trigger('box.interactions.form', [box, e.target]);
386
  }, false);
387
 
 
 
 
 
 
 
 
388
  // maybe show box right away
389
  if (this.fits() && this.locationHashRefersBox()) {
390
  window.addEventListener('load', this.show.bind(this));
499
 
500
  Animator.toggle(this.element, this.config.animation);
501
 
 
 
 
 
 
 
502
  return true;
503
  };
504
 
657
  Timer = require('./timer.js'),
658
  boxes = [],
659
  overlay,
660
+ scrollElement = window,
661
  exitIntentDelayTimer,
662
  exitIntentTriggered,
663
  siteTimer,
738
 
739
  // check triggerHeight criteria for all boxes
740
  function checkHeightCriteria() {
 
741
 
742
+ var scrollY = scrollElement.hasOwnProperty('scrollY') ? scrollElement.scrollY : scrollElement.scrollTop;
743
+ scrollY = scrollY + window.innerHeight * 0.75;
744
 
745
+ boxes.forEach(function (box) {
746
  if (!box.mayAutoShow() || box.triggerHeight <= 0) {
747
  return;
748
  }
772
  var x = e.offsetX;
773
  var y = e.offsetY;
774
 
775
+ // calculate if click was less than 40px outside box to avoid closing it by accident
776
  boxes.forEach(function (box) {
777
  var rect = box.element.getBoundingClientRect();
778
+ var margin = 40;
779
 
780
  // if click was not anywhere near box, dismiss it.
781
  if (x < rect.left - margin || x > rect.right + margin || y < rect.top - margin || y > rect.bottom + margin) {
828
  }
829
  }
830
 
831
+ function onElementClick(e) {
832
+ var el = e.target || e.srcElement;
833
+ if (el && el.tagName === 'A' && el.getAttribute('href').toLowerCase().indexOf('#boxzilla-') === 0) {
834
+ window.a = el;
835
+ var boxId = e.target.getAttribute('href').toLowerCase().substring("#boxzilla-".length);
836
+ Boxzilla.toggle(boxId);
837
+ }
838
+ }
839
+
840
  var timers = {
841
  start: function start() {
842
+ try {
843
+ var sessionTime = sessionStorage.getItem('boxzilla_timer');
844
+ if (sessionTime) siteTimer.time = sessionTime;
845
+ } catch (e) {}
846
  siteTimer.start();
847
  pageTimer.start();
848
  },
855
 
856
  // initialise & add event listeners
857
  Boxzilla.init = function () {
858
+ document.body.addEventListener('click', onElementClick, false);
859
+
860
+ try {
861
+ pageViews = sessionStorage.getItem('boxzilla_pageviews') || 0;
862
+ } catch (e) {
863
+ pageViews = 0;
864
+ }
865
+
866
+ siteTimer = new Timer(0);
867
  pageTimer = new Timer(0);
 
868
 
869
  // insert styles into DOM
870
  var styles = require('./styles.js');
880
  document.body.appendChild(overlay);
881
 
882
  // event binds
883
+ scrollElement.addEventListener('touchstart', throttle(checkHeightCriteria), true);
884
+ scrollElement.addEventListener('scroll', throttle(checkHeightCriteria), true);
885
  window.addEventListener('resize', throttle(recalculateHeights));
886
  window.addEventListener('load', recalculateHeights);
887
  overlay.addEventListener('click', onOverlayClick);
972
  // expose each individual box.
973
  Boxzilla.boxes = boxes;
974
 
975
+ // expose boxzilla object
976
  window.Boxzilla = Boxzilla;
977
 
978
  if (typeof module !== 'undefined' && module.exports) {
982
  },{"./box.js":3,"./styles.js":5,"./timer.js":6,"wolfy87-eventemitter":7}],5:[function(require,module,exports){
983
  "use strict";
984
 
985
+ var styles = "#boxzilla-overlay{position:fixed;background:rgba(0,0,0,.65);width:100%;height:100%;left:0;top:0;z-index:99999}.boxzilla-center-container{position:fixed;top:0;left:0;right:0;height:0;text-align:center;z-index:999999;line-height:0}.boxzilla-center-container .boxzilla{display:inline-block;text-align:left;position:relative;line-height:normal}.boxzilla{position:fixed;z-index:999999;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background:#fff;padding:25px}.boxzilla.boxzilla-top-left{top:0;left:0}.boxzilla.boxzilla-top-right{top:0;right:0}.boxzilla.boxzilla-bottom-left{bottom:0;left:0}.boxzilla.boxzilla-bottom-right{bottom:0;right:0}.boxzilla-content>:first-child{margin-top:0;padding-top:0}.boxzilla-content>:last-child{margin-bottom:0;padding-bottom:0}.boxzilla-close-icon{position:absolute;right:0;top:0;text-align:center;padding:6px;cursor:pointer;-webkit-appearance:none;font-size:28px;font-weight:700;line-height:20px;color:#000;opacity:.5}.boxzilla-close-icon:focus,.boxzilla-close-icon:hover{opacity:.8}";
986
  module.exports = styles;
987
 
988
  },{}],6:[function(require,module,exports){
assets/js/script.min.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(){var t=void 0,e=void 0;!function i(e,o,n){function r(l,a){if(!o[l]){if(!e[l]){var c="function"==typeof t&&t;if(!a&&c)return c(l,!0);if(s)return s(l,!0);var d=new Error("Cannot find module '"+l+"'");throw d.code="MODULE_NOT_FOUND",d}var f=o[l]={exports:{}};e[l][0].call(f.exports,function(t){var i=e[l][1][t];return r(i?i:t)},f,f.exports,i,e,o,n)}return o[l].exports}for(var s="function"==typeof t&&t,l=0;l<n.length;l++)r(n[l]);return r}({1:[function(t,e,i){"use strict";var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(){function e(t,e){e.background_color&&(t.style.background=e.background_color),e.color&&(t.style.color=e.color),e.border_color&&(t.style.borderColor=e.border_color),e.border_width&&(t.style.borderWidth=parseInt(e.border_width)+"px"),e.border_style&&(t.style.borderStyle=e.border_style),e.width&&(t.style.maxWidth=parseInt(e.width)+"px")}var i=t("boxzilla"),n=window.boxzilla_options,r=document.body.className.indexOf("logged-in")>-1;if(!n.inited){r&&n.testMode&&console.log("Boxzilla: Test mode is enabled. Please disable test mode if you're done testing."),i.init();for(var s=0;s<n.boxes.length;s++){var l=n.boxes[s];if(l.testMode=r&&n.testMode,"https:"===window.location.protocol&&window.location.host){var a="http://"+window.location.host,c=a.replace("http://","https://");l.content=l.content.replace(a,c)}var d=i.create(l.id,l);e(d.element,l.css),d.element.firstChild.firstChild.className+=" first-child",d.element.firstChild.lastChild.className+=" last-child"}window.addEventListener("load",function(){if("object"===o(window.mc4wp_forms_config)&&window.mc4wp_forms_config.submitted_form){var t="#"+window.mc4wp_forms_config.submitted_form.element_id,e=i.boxes;for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(r.element.querySelector(t))return void r.show()}}}),n.inited=!0,window.Boxzilla=i}}()},{boxzilla:4}],2:[function(t,e,i){"use strict";function o(t,e){for(var i in e)t.style[i]=e[i]}function n(t,e){for(var i={},o=0;o<t.length;o++)i[t[o]]=e;return i}function r(t,e){for(var i={},o=0;o<t.length;o++)i[t[o]]=e[t[o]];return i}function s(t){return!!t.getAttribute("data-animated")}function l(t,e){var i="none"!=t.style.display||t.offsetLeft>0,s=t.cloneNode(!0),l=function(){t.removeAttribute("data-animated"),t.setAttribute("style",s.getAttribute("style")),t.style.display=i?"none":""};t.setAttribute("data-animated","true"),i||(t.style.display="");var c,d;if("slide"===e){if(c=n(["height","borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],0),d={},!i){var f=window.getComputedStyle(t);d=r(["height","borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],f),o(t,c)}t.style.overflowY="hidden",a(t,i?c:d,l)}else c={opacity:0},d={opacity:1},i||o(t,c),a(t,i?c:d,l)}function a(t,e,i){var o=+new Date,n=window.getComputedStyle(t),r={},s={};for(var l in e){e[l]=parseFloat(e[l]);var a=e[l],d=parseFloat(n[l]);d!=a?(s[l]=(a-d)/c,r[l]=d):delete e[l]}var f=function h(){var n,l,a,c,d=+new Date,f=d-o,u=!0;for(var g in e){n=s[g],l=e[g],a=n*f,c=r[g]+a,n>0&&c>=l||n<0&&c<=l?c=l:u=!1,r[g]=c;var m="opacity"!==g?"px":"";t.style[g]=c+m}o=+new Date,u?i&&i():window.requestAnimationFrame&&requestAnimationFrame(h)||setTimeout(h,32)};f()}var c=320;e.exports={toggle:l,animate:a,animated:s}},{}],3:[function(t,e,i){"use strict";function o(t,e){var i={};for(var o in t)i[o]=t[o];for(var o in e)i[o]=e[o];return i}function n(){var t=document.body,e=document.documentElement,i=Math.max(t.scrollHeight,t.offsetHeight,e.clientHeight,e.scrollHeight,e.offsetHeight);return i}var r,s={animation:"fade",rehide:!1,content:"",cookie:null,icon:"&times",minimumScreenWidth:0,position:"center",testMode:!1,trigger:!1,closable:!0},l=t("./animator.js"),a=function(t,e){this.id=t,this.config=o(s,e),this.overlay=document.getElementById("boxzilla-overlay"),this.visible=!1,this.dismissed=!1,this.triggered=!1,this.triggerHeight=0,this.cookieSet=!1,this.element=null,this.closeIcon=null,this.config.trigger&&("percentage"!==this.config.trigger.method&&"element"!==this.config.trigger.method||(this.triggerHeight=this.calculateTriggerHeight()),this.cookieSet=this.isCookieSet()),this.dom(),this.events()};a.prototype.events=function(){var t=this;this.closeIcon&&this.closeIcon.addEventListener("click",t.dismiss.bind(this)),this.element.addEventListener("click",function(e){"A"===e.target.tagName&&r.trigger("box.interactions.link",[t,e.target])},!1),this.element.addEventListener("submit",function(e){t.setCookie(),r.trigger("box.interactions.form",[t,e.target])},!1),window.addEventListener("hashchange",function(){var e="#boxzilla-"+t.id;location.hash===e&&t.toggle()}),this.fits()&&this.locationHashRefersBox()&&window.addEventListener("load",this.show.bind(this))},a.prototype.dom=function(){var t=document.createElement("div");t.className="boxzilla-container boxzilla-"+this.config.position+"-container";var e=document.createElement("div");e.setAttribute("id","boxzilla-"+this.id),e.className="boxzilla boxzilla-"+this.id+" boxzilla-"+this.config.position,e.style.display="none",t.appendChild(e);var i=document.createElement("div");i.className="boxzilla-content",i.innerHTML=this.config.content,e.appendChild(i);var o=i.querySelectorAll("script");if(o.length){for(var n=document.createElement("script"),r=0;r<o.length;r++)n.appendChild(document.createTextNode(o[r].text)),o[r].parentNode.removeChild(o[r]);document.body.appendChild(n)}if(this.config.closable&&this.config.icon){var s=document.createElement("span");s.className="boxzilla-close-icon",s.innerHTML=this.config.icon,e.appendChild(s),this.closeIcon=s}document.body.appendChild(t),this.element=e},a.prototype.setCustomBoxStyling=function(){var t=this.element.style.display;this.element.style.display="",this.element.style.overflowY="auto",this.element.style.maxHeight="none";var e=window.innerHeight,i=this.element.clientHeight;if(i>e&&(this.element.style.maxHeight=e+"px",this.element.style.overflowY="scroll"),"center"===this.config.position){var o=(e-i)/2;o=o>=0?o:0,this.element.style.marginTop=o+"px"}this.element.style.display=t},a.prototype.toggle=function(t){if("undefined"==typeof t&&(t=!this.visible),t===this.visible)return!1;if(l.animated(this.element))return!1;if(!t&&!this.config.closable)return!1;this.visible=t,this.setCustomBoxStyling(),r.trigger("box."+(t?"show":"hide"),[this]),"center"===this.config.position&&(this.overlay.classList.toggle("boxzilla-"+this.id+"-overlay"),l.toggle(this.overlay,"fade")),l.toggle(this.element,this.config.animation);var e=this.element.querySelector("input, textarea");return e&&e.focus(),!0},a.prototype.show=function(){return this.toggle(!0)},a.prototype.hide=function(){return this.toggle(!1)},a.prototype.calculateTriggerHeight=function(){var t=0;if("element"===this.config.trigger.method){var e=document.body.querySelector(this.config.trigger.value);if(e){var i=e.getBoundingClientRect();t=i.top}}else"percentage"===this.config.trigger.method&&(t=this.config.trigger.value/100*n());return t},a.prototype.locationHashRefersBox=function(){if(!window.location.hash||0===window.location.hash.length)return!1;var t=window.location.hash.substring(1);return t===this.element.id||!!this.element.querySelector("#"+t)},a.prototype.fits=function(){return this.config.minimumScreenWidth<=0||window.innerWidth>this.config.minimumScreenWidth},a.prototype.mayAutoShow=function(){return!this.dismissed&&(!!this.fits()&&(!!this.config.trigger&&!this.cookieSet))},a.prototype.mayRehide=function(){return this.config.rehide&&this.triggered},a.prototype.isCookieSet=function(){if(this.config.testMode)return!1;if(!this.config.cookie||!this.config.cookie.triggered&&!this.config.cookie.dismissed)return!1;var t="true"===document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*boxzilla_box_"+this.id+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1");return t},a.prototype.setCookie=function(t){var e=new Date;e.setHours(e.getHours()+t),document.cookie="boxzilla_box_"+this.id+"=true; expires="+e.toUTCString()+"; path=/"},a.prototype.trigger=function(){var t=this.show();t&&(this.triggered=!0,this.config.cookie&&this.config.cookie.triggered&&this.setCookie(this.config.cookie.triggered))},a.prototype.dismiss=function(t){return t&&t.preventDefault(),!!this.visible&&(this.hide(),this.config.cookie&&this.config.cookie.dismissed&&this.setCookie(this.config.cookie.dismissed),this.dismissed=!0,r.trigger("box.dismiss",[this]),!0)},e.exports=function(t){return r=t,a}},{"./animator.js":2}],4:[function(t,e,i){"use strict";function o(t,e,i){e||(e=250);var o,n;return function(){var r=i||this,s=+new Date,l=arguments;o&&s<o+e?(clearTimeout(n),n=setTimeout(function(){o=s,t.apply(r,l)},e)):(o=s,t.apply(r,l))}}function n(t){27==t.keyCode&&E.dismiss()}function r(){h()||_.forEach(function(t){t.mayAutoShow()&&"pageviews"===t.config.trigger.method&&b>=t.config.trigger.value&&t.trigger()})}function s(){h()||_.forEach(function(t){t.mayAutoShow()&&("time_on_site"===t.config.trigger.method&&v.time>=t.config.trigger.value&&t.trigger(),"time_on_page"===t.config.trigger.method&&y.time>=t.config.trigger.value&&t.trigger())})}function l(){var t=(window.scrollY||window.pageYOffset)+.75*window.innerHeight;_.forEach(function(e){if(e.mayAutoShow()&&!(e.triggerHeight<=0))if(t>e.triggerHeight){if(h())return;e.trigger()}else e.mayRehide()&&e.hide()})}function a(){_.forEach(function(t){t.setCustomBoxStyling()})}function c(t){var e=t.offsetX,i=t.offsetY;_.forEach(function(t){var o=t.element.getBoundingClientRect(),n=100+.05*window.innerWidth;(e<o.left-n||e>o.right+n||i<o.top-n||i>o.bottom+n)&&t.dismiss()})}function d(){p||h()||(_.forEach(function(t){t.mayAutoShow()&&"exit_intent"===t.config.trigger.method&&t.trigger()}),p=!0)}function f(t){var e=400;t.clientY<=0&&(m=window.setTimeout(d,e))}function h(){for(var t=0;t<_.length;t++){var e=_[t];if(e.visible)return!0}return!1}function u(){m&&(window.clearInterval(m),m=null)}var g,m,p,v,y,b,w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},x=t("wolfy87-eventemitter"),E=Object.create(x.prototype),z=t("./box.js")(E),L=t("./timer.js"),_=[],S={start:function(){var t=sessionStorage.getItem("boxzilla_timer");t&&(v.time=t),v.start(),y.start()},stop:function(){sessionStorage.setItem("boxzilla_timer",v.time),v.stop(),y.stop()}};E.init=function(){v=new L(sessionStorage.getItem("boxzilla_timer")||0),y=new L(0),b=sessionStorage.getItem("boxzilla_pageviews")||0;var e=t("./styles.js"),i=document.createElement("style");i.setAttribute("type","text/css"),i.innerHTML=e,document.head.appendChild(i),g=document.createElement("div"),g.style.display="none",g.id="boxzilla-overlay",document.body.appendChild(g),window.addEventListener("touchmove",o(l)),window.addEventListener("scroll",o(l)),window.addEventListener("resize",o(a)),window.addEventListener("load",a),g.addEventListener("click",c),window.setInterval(s,1e3),window.setTimeout(r,1e3),document.documentElement.addEventListener("mouseleave",f),document.documentElement.addEventListener("mouseenter",u),document.addEventListener("keyup",n),S.start(),window.addEventListener("focus",S.start),window.addEventListener("beforeunload",function(){S.stop(),sessionStorage.setItem("boxzilla_pageviews",++b)}),window.addEventListener("blur",S.stop),E.trigger("ready")},E.create=function(t,e){var i=new z(t,e);return _.push(i),i},E.get=function(t){for(var e=0;e<_.length;e++){var i=_[e];if(i.id==t)return i}throw new Error("No box exists with ID "+t)},E.dismiss=function(t){"undefined"==typeof t?_.forEach(function(t){t.dismiss()}):"object"===w(_[t])&&E.get(t).dismiss()},E.hide=function(t){"undefined"==typeof t?_.forEach(function(t){t.hide()}):E.get(t).hide()},E.show=function(t){"undefined"==typeof t?_.forEach(function(t){t.show()}):E.get(t).show()},E.toggle=function(t){"undefined"==typeof t?_.forEach(function(t){t.toggle()}):E.get(t).toggle()},E.boxes=_,window.Boxzilla=E,"undefined"!=typeof e&&e.exports&&(e.exports=E)},{"./box.js":3,"./styles.js":5,"./timer.js":6,"wolfy87-eventemitter":7}],5:[function(t,e,i){"use strict";var o="@media(max-width:780px){body,html{-webkit-overflow-scrolling:touch!important}}#boxzilla-overlay{position:fixed;background:rgba(0,0,0,.65);width:100%;height:100%;left:0;top:0;z-index:99999}.boxzilla-center-container{position:fixed;top:0;left:0;right:0;height:0;text-align:center;z-index:999999;line-height:0}.boxzilla-center-container .boxzilla{display:inline-block;text-align:left;position:relative;line-height:normal}.boxzilla{position:fixed;z-index:999999;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background:#fff;padding:25px}.boxzilla.boxzilla-top-left{top:0;left:0}.boxzilla.boxzilla-top-right{top:0;right:0}.boxzilla.boxzilla-bottom-left{bottom:0;left:0}.boxzilla.boxzilla-bottom-right{bottom:0;right:0}.boxzilla-content>:first-child{margin-top:0;padding-top:0}.boxzilla-content>:last-child{margin-bottom:0;padding-bottom:0}.boxzilla-close-icon{position:absolute;right:0;top:0;text-align:center;padding:6px;cursor:pointer;-webkit-appearance:none;font-size:28px;font-weight:700;line-height:20px;color:#000;opacity:.5}.boxzilla-close-icon:focus,.boxzilla-close-icon:hover{opacity:.8}";e.exports=o},{}],6:[function(t,e,i){"use strict";var o=function(t){this.time=t,this.interval=0};o.prototype.tick=function(){this.time++},o.prototype.start=function(){this.interval||(this.interval=window.setInterval(this.tick.bind(this),1e3))},o.prototype.stop=function(){this.interval&&(window.clearInterval(this.interval),this.interval=0)},e.exports=o},{}],7:[function(t,i,o){(function(){"use strict";function t(){}function o(t,e){for(var i=t.length;i--;)if(t[i].listener===e)return i;return-1}function n(t){return function(){return this[t].apply(this,arguments)}}var r=t.prototype,s=this,l=s.EventEmitter;r.getListeners=function(t){var e,i,o=this._getEvents();if(t instanceof RegExp){e={};for(i in o)o.hasOwnProperty(i)&&t.test(i)&&(e[i]=o[i])}else e=o[t]||(o[t]=[]);return e},r.flattenListeners=function(t){var e,i=[];for(e=0;e<t.length;e+=1)i.push(t[e].listener);return i},r.getListenersAsObject=function(t){var e,i=this.getListeners(t);return i instanceof Array&&(e={},e[t]=i),e||i},r.addListener=function(t,e){var i,n=this.getListenersAsObject(t),r="object"==typeof e;for(i in n)n.hasOwnProperty(i)&&o(n[i],e)===-1&&n[i].push(r?e:{listener:e,once:!1});return this},r.on=n("addListener"),r.addOnceListener=function(t,e){return this.addListener(t,{listener:e,once:!0})},r.once=n("addOnceListener"),r.defineEvent=function(t){return this.getListeners(t),this},r.defineEvents=function(t){for(var e=0;e<t.length;e+=1)this.defineEvent(t[e]);return this},r.removeListener=function(t,e){var i,n,r=this.getListenersAsObject(t);for(n in r)r.hasOwnProperty(n)&&(i=o(r[n],e),i!==-1&&r[n].splice(i,1));return this},r.off=n("removeListener"),r.addListeners=function(t,e){return this.manipulateListeners(!1,t,e)},r.removeListeners=function(t,e){return this.manipulateListeners(!0,t,e)},r.manipulateListeners=function(t,e,i){var o,n,r=t?this.removeListener:this.addListener,s=t?this.removeListeners:this.addListeners;if("object"!=typeof e||e instanceof RegExp)for(o=i.length;o--;)r.call(this,e,i[o]);else for(o in e)e.hasOwnProperty(o)&&(n=e[o])&&("function"==typeof n?r.call(this,o,n):s.call(this,o,n));return this},r.removeEvent=function(t){var e,i=typeof t,o=this._getEvents();if("string"===i)delete o[t];else if(t instanceof RegExp)for(e in o)o.hasOwnProperty(e)&&t.test(e)&&delete o[e];else delete this._events;return this},r.removeAllListeners=n("removeEvent"),r.emitEvent=function(t,e){var i,o,n,r,s,l=this.getListenersAsObject(t);for(r in l)if(l.hasOwnProperty(r))for(i=l[r].slice(0),n=i.length;n--;)o=i[n],o.once===!0&&this.removeListener(t,o.listener),s=o.listener.apply(this,e||[]),s===this._getOnceReturnValue()&&this.removeListener(t,o.listener);return this},r.trigger=n("emitEvent"),r.emit=function(t){var e=Array.prototype.slice.call(arguments,1);return this.emitEvent(t,e)},r.setOnceReturnValue=function(t){return this._onceReturnValue=t,this},r._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},r._getEvents=function(){return this._events||(this._events={})},t.noConflict=function(){return s.EventEmitter=l,t},"function"==typeof e&&e.amd?e(function(){return t}):"object"==typeof i&&i.exports?i.exports=t:s.EventEmitter=t}).call(this)},{}]},{},[1])}();
2
  //# sourceMappingURL=script.min.js.map
1
+ !function(){var t=void 0,e=void 0;!function i(e,o,n){function r(a,l){if(!o[a]){if(!e[a]){var c="function"==typeof t&&t;if(!l&&c)return c(a,!0);if(s)return s(a,!0);var d=new Error("Cannot find module '"+a+"'");throw d.code="MODULE_NOT_FOUND",d}var f=o[a]={exports:{}};e[a][0].call(f.exports,function(t){var i=e[a][1][t];return r(i?i:t)},f,f.exports,i,e,o,n)}return o[a].exports}for(var s="function"==typeof t&&t,a=0;a<n.length;a++)r(n[a]);return r}({1:[function(t,e,i){"use strict";var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(){function e(t){"loading"!=document.readyState?t():document.addEventListener("DOMContentLoaded",t)}function i(t,e){e.background_color&&(t.style.background=e.background_color),e.color&&(t.style.color=e.color),e.border_color&&(t.style.borderColor=e.border_color),e.border_width&&(t.style.borderWidth=parseInt(e.border_width)+"px"),e.border_style&&(t.style.borderStyle=e.border_style),e.width&&(t.style.maxWidth=parseInt(e.width)+"px")}function n(){var t=document.body.className.indexOf("logged-in")>-1;if(!a.inited){t&&a.testMode&&console.log("Boxzilla: Test mode is enabled. Please disable test mode if you're done testing."),s.init();for(var e=0;e<a.boxes.length;e++){var o=a.boxes[e];if(o.testMode=t&&a.testMode,"https:"===window.location.protocol&&window.location.host){var n="http://"+window.location.host,l=n.replace("http://","https://");o.content=o.content.replace(n,l)}var c=s.create(o.id,o);c.element.className=c.element.className+" boxzilla-"+o.post.slug,i(c.element,o.css),c.element.firstChild.firstChild.className+=" first-child",c.element.firstChild.lastChild.className+=" last-child"}window.addEventListener("load",r),a.inited=!0,s.trigger("done")}}function r(){if("object"===o(window.mc4wp_forms_config)&&window.mc4wp_forms_config.submitted_form){var t="#"+window.mc4wp_forms_config.submitted_form.element_id,e=s.boxes;for(var i in e)if(e.hasOwnProperty(i)){var n=e[i];if(n.element.querySelector(t))return void n.show()}}}var s=t("boxzilla"),a=window.boxzilla_options;window.Boxzilla=s,e(n)}()},{boxzilla:4}],2:[function(t,e,i){"use strict";function o(t,e){for(var i in e)t.style[i]=e[i]}function n(t,e){for(var i={},o=0;o<t.length;o++)i[t[o]]=e;return i}function r(t,e){for(var i={},o=0;o<t.length;o++)i[t[o]]=e[t[o]];return i}function s(t){return!!t.getAttribute("data-animated")}function a(t,e){var i="none"!=t.style.display||t.offsetLeft>0,s=t.cloneNode(!0),a=function(){t.removeAttribute("data-animated"),t.setAttribute("style",s.getAttribute("style")),t.style.display=i?"none":""};t.setAttribute("data-animated","true"),i||(t.style.display="");var c,d;if("slide"===e){if(c=n(["height","borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],0),d={},!i){var f=window.getComputedStyle(t);d=r(["height","borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],f),o(t,c)}t.style.overflowY="hidden",l(t,i?c:d,a)}else c={opacity:0},d={opacity:1},i||o(t,c),l(t,i?c:d,a)}function l(t,e,i){var o=+new Date,n=window.getComputedStyle(t),r={},s={};for(var a in e){e[a]=parseFloat(e[a]);var l=e[a],d=parseFloat(n[a]);d!=l?(s[a]=(l-d)/c,r[a]=d):delete e[a]}var f=function h(){var n,a,l,c,d=+new Date,f=d-o,u=!0;for(var g in e){n=s[g],a=e[g],l=n*f,c=r[g]+l,n>0&&c>=a||n<0&&c<=a?c=a:u=!1,r[g]=c;var m="opacity"!==g?"px":"";t.style[g]=c+m}o=+new Date,u?i&&i():window.requestAnimationFrame&&requestAnimationFrame(h)||setTimeout(h,32)};f()}var c=320;e.exports={toggle:a,animate:l,animated:s}},{}],3:[function(t,e,i){"use strict";function o(t,e){var i={};for(var o in t)i[o]=t[o];for(var o in e)i[o]=e[o];return i}function n(){var t=document.body,e=document.documentElement,i=Math.max(t.scrollHeight,t.offsetHeight,e.clientHeight,e.scrollHeight,e.offsetHeight);return i}var r,s={animation:"fade",rehide:!1,content:"",cookie:null,icon:"&times",minimumScreenWidth:0,position:"center",testMode:!1,trigger:!1,closable:!0},a=t("./animator.js"),l=function(t,e){this.id=t,this.config=o(s,e),this.overlay=document.getElementById("boxzilla-overlay"),this.visible=!1,this.dismissed=!1,this.triggered=!1,this.triggerHeight=0,this.cookieSet=!1,this.element=null,this.closeIcon=null,this.config.trigger&&("percentage"!==this.config.trigger.method&&"element"!==this.config.trigger.method||(this.triggerHeight=this.calculateTriggerHeight()),this.cookieSet=this.isCookieSet()),this.dom(),this.events()};l.prototype.events=function(){var t=this;this.closeIcon&&this.closeIcon.addEventListener("click",this.dismiss.bind(this)),this.element.addEventListener("click",function(e){"A"===e.target.tagName&&r.trigger("box.interactions.link",[t,e.target])},!1),this.element.addEventListener("submit",function(e){t.setCookie(),r.trigger("box.interactions.form",[t,e.target])},!1),this.fits()&&this.locationHashRefersBox()&&window.addEventListener("load",this.show.bind(this))},l.prototype.dom=function(){var t=document.createElement("div");t.className="boxzilla-container boxzilla-"+this.config.position+"-container";var e=document.createElement("div");e.setAttribute("id","boxzilla-"+this.id),e.className="boxzilla boxzilla-"+this.id+" boxzilla-"+this.config.position,e.style.display="none",t.appendChild(e);var i=document.createElement("div");i.className="boxzilla-content",i.innerHTML=this.config.content,e.appendChild(i);var o=i.querySelectorAll("script");if(o.length){for(var n=document.createElement("script"),r=0;r<o.length;r++)n.appendChild(document.createTextNode(o[r].text)),o[r].parentNode.removeChild(o[r]);document.body.appendChild(n)}if(this.config.closable&&this.config.icon){var s=document.createElement("span");s.className="boxzilla-close-icon",s.innerHTML=this.config.icon,e.appendChild(s),this.closeIcon=s}document.body.appendChild(t),this.element=e},l.prototype.setCustomBoxStyling=function(){var t=this.element.style.display;this.element.style.display="",this.element.style.overflowY="auto",this.element.style.maxHeight="none";var e=window.innerHeight,i=this.element.clientHeight;if(i>e&&(this.element.style.maxHeight=e+"px",this.element.style.overflowY="scroll"),"center"===this.config.position){var o=(e-i)/2;o=o>=0?o:0,this.element.style.marginTop=o+"px"}this.element.style.display=t},l.prototype.toggle=function(t){return"undefined"==typeof t&&(t=!this.visible),t!==this.visible&&(!a.animated(this.element)&&(!(!t&&!this.config.closable)&&(this.visible=t,this.setCustomBoxStyling(),r.trigger("box."+(t?"show":"hide"),[this]),"center"===this.config.position&&(this.overlay.classList.toggle("boxzilla-"+this.id+"-overlay"),a.toggle(this.overlay,"fade")),a.toggle(this.element,this.config.animation),!0)))},l.prototype.show=function(){return this.toggle(!0)},l.prototype.hide=function(){return this.toggle(!1)},l.prototype.calculateTriggerHeight=function(){var t=0;if("element"===this.config.trigger.method){var e=document.body.querySelector(this.config.trigger.value);if(e){var i=e.getBoundingClientRect();t=i.top}}else"percentage"===this.config.trigger.method&&(t=this.config.trigger.value/100*n());return t},l.prototype.locationHashRefersBox=function(){if(!window.location.hash||0===window.location.hash.length)return!1;var t=window.location.hash.substring(1);return t===this.element.id||!!this.element.querySelector("#"+t)},l.prototype.fits=function(){return this.config.minimumScreenWidth<=0||window.innerWidth>this.config.minimumScreenWidth},l.prototype.mayAutoShow=function(){return!this.dismissed&&(!!this.fits()&&(!!this.config.trigger&&!this.cookieSet))},l.prototype.mayRehide=function(){return this.config.rehide&&this.triggered},l.prototype.isCookieSet=function(){if(this.config.testMode)return!1;if(!this.config.cookie||!this.config.cookie.triggered&&!this.config.cookie.dismissed)return!1;var t="true"===document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*boxzilla_box_"+this.id+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1");return t},l.prototype.setCookie=function(t){var e=new Date;e.setHours(e.getHours()+t),document.cookie="boxzilla_box_"+this.id+"=true; expires="+e.toUTCString()+"; path=/"},l.prototype.trigger=function(){var t=this.show();t&&(this.triggered=!0,this.config.cookie&&this.config.cookie.triggered&&this.setCookie(this.config.cookie.triggered))},l.prototype.dismiss=function(t){return t&&t.preventDefault(),!!this.visible&&(this.hide(),this.config.cookie&&this.config.cookie.dismissed&&this.setCookie(this.config.cookie.dismissed),this.dismissed=!0,r.trigger("box.dismiss",[this]),!0)},e.exports=function(t){return r=t,l}},{"./animator.js":2}],4:[function(t,e,i){"use strict";function o(t,e,i){e||(e=250);var o,n;return function(){var r=i||this,s=+new Date,a=arguments;o&&s<o+e?(clearTimeout(n),n=setTimeout(function(){o=s,t.apply(r,a)},e)):(o=s,t.apply(r,a))}}function n(t){27==t.keyCode&&L.dismiss()}function r(){h()||S.forEach(function(t){t.mayAutoShow()&&"pageviews"===t.config.trigger.method&&w>=t.config.trigger.value&&t.trigger()})}function s(){h()||S.forEach(function(t){t.mayAutoShow()&&("time_on_site"===t.config.trigger.method&&y.time>=t.config.trigger.value&&t.trigger(),"time_on_page"===t.config.trigger.method&&b.time>=t.config.trigger.value&&t.trigger())})}function a(){var t=k.hasOwnProperty("scrollY")?k.scrollY:k.scrollTop;t+=.75*window.innerHeight,S.forEach(function(e){if(e.mayAutoShow()&&!(e.triggerHeight<=0))if(t>e.triggerHeight){if(h())return;e.trigger()}else e.mayRehide()&&e.hide()})}function l(){S.forEach(function(t){t.setCustomBoxStyling()})}function c(t){var e=t.offsetX,i=t.offsetY;S.forEach(function(t){var o=t.element.getBoundingClientRect(),n=40;(e<o.left-n||e>o.right+n||i<o.top-n||i>o.bottom+n)&&t.dismiss()})}function d(){v||h()||(S.forEach(function(t){t.mayAutoShow()&&"exit_intent"===t.config.trigger.method&&t.trigger()}),v=!0)}function f(t){var e=400;t.clientY<=0&&(p=window.setTimeout(d,e))}function h(){for(var t=0;t<S.length;t++){var e=S[t];if(e.visible)return!0}return!1}function u(){p&&(window.clearInterval(p),p=null)}function g(t){var e=t.target||t.srcElement;if(e&&"A"===e.tagName&&0===e.getAttribute("href").toLowerCase().indexOf("#boxzilla-")){window.a=e;var i=t.target.getAttribute("href").toLowerCase().substring("#boxzilla-".length);L.toggle(i)}}var m,p,v,y,b,w,x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},E=t("wolfy87-eventemitter"),L=Object.create(E.prototype),z=t("./box.js")(L),_=t("./timer.js"),S=[],k=window,C={start:function(){try{var t=sessionStorage.getItem("boxzilla_timer");t&&(y.time=t)}catch(e){}y.start(),b.start()},stop:function(){sessionStorage.setItem("boxzilla_timer",y.time),y.stop(),b.stop()}};L.init=function(){document.body.addEventListener("click",g,!1);try{w=sessionStorage.getItem("boxzilla_pageviews")||0}catch(e){w=0}y=new _(0),b=new _(0);var i=t("./styles.js"),d=document.createElement("style");d.setAttribute("type","text/css"),d.innerHTML=i,document.head.appendChild(d),m=document.createElement("div"),m.style.display="none",m.id="boxzilla-overlay",document.body.appendChild(m),k.addEventListener("touchstart",o(a),!0),k.addEventListener("scroll",o(a),!0),window.addEventListener("resize",o(l)),window.addEventListener("load",l),m.addEventListener("click",c),window.setInterval(s,1e3),window.setTimeout(r,1e3),document.documentElement.addEventListener("mouseleave",f),document.documentElement.addEventListener("mouseenter",u),document.addEventListener("keyup",n),C.start(),window.addEventListener("focus",C.start),window.addEventListener("beforeunload",function(){C.stop(),sessionStorage.setItem("boxzilla_pageviews",++w)}),window.addEventListener("blur",C.stop),L.trigger("ready")},L.create=function(t,e){var i=new z(t,e);return S.push(i),i},L.get=function(t){for(var e=0;e<S.length;e++){var i=S[e];if(i.id==t)return i}throw new Error("No box exists with ID "+t)},L.dismiss=function(t){"undefined"==typeof t?S.forEach(function(t){t.dismiss()}):"object"===x(S[t])&&L.get(t).dismiss()},L.hide=function(t){"undefined"==typeof t?S.forEach(function(t){t.hide()}):L.get(t).hide()},L.show=function(t){"undefined"==typeof t?S.forEach(function(t){t.show()}):L.get(t).show()},L.toggle=function(t){"undefined"==typeof t?S.forEach(function(t){t.toggle()}):L.get(t).toggle()},L.boxes=S,window.Boxzilla=L,"undefined"!=typeof e&&e.exports&&(e.exports=L)},{"./box.js":3,"./styles.js":5,"./timer.js":6,"wolfy87-eventemitter":7}],5:[function(t,e,i){"use strict";var o="#boxzilla-overlay{position:fixed;background:rgba(0,0,0,.65);width:100%;height:100%;left:0;top:0;z-index:99999}.boxzilla-center-container{position:fixed;top:0;left:0;right:0;height:0;text-align:center;z-index:999999;line-height:0}.boxzilla-center-container .boxzilla{display:inline-block;text-align:left;position:relative;line-height:normal}.boxzilla{position:fixed;z-index:999999;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background:#fff;padding:25px}.boxzilla.boxzilla-top-left{top:0;left:0}.boxzilla.boxzilla-top-right{top:0;right:0}.boxzilla.boxzilla-bottom-left{bottom:0;left:0}.boxzilla.boxzilla-bottom-right{bottom:0;right:0}.boxzilla-content>:first-child{margin-top:0;padding-top:0}.boxzilla-content>:last-child{margin-bottom:0;padding-bottom:0}.boxzilla-close-icon{position:absolute;right:0;top:0;text-align:center;padding:6px;cursor:pointer;-webkit-appearance:none;font-size:28px;font-weight:700;line-height:20px;color:#000;opacity:.5}.boxzilla-close-icon:focus,.boxzilla-close-icon:hover{opacity:.8}";e.exports=o},{}],6:[function(t,e,i){"use strict";var o=function(t){this.time=t,this.interval=0};o.prototype.tick=function(){this.time++},o.prototype.start=function(){this.interval||(this.interval=window.setInterval(this.tick.bind(this),1e3))},o.prototype.stop=function(){this.interval&&(window.clearInterval(this.interval),this.interval=0)},e.exports=o},{}],7:[function(t,i,o){(function(){"use strict";function t(){}function o(t,e){for(var i=t.length;i--;)if(t[i].listener===e)return i;return-1}function n(t){return function(){return this[t].apply(this,arguments)}}var r=t.prototype,s=this,a=s.EventEmitter;r.getListeners=function(t){var e,i,o=this._getEvents();if(t instanceof RegExp){e={};for(i in o)o.hasOwnProperty(i)&&t.test(i)&&(e[i]=o[i])}else e=o[t]||(o[t]=[]);return e},r.flattenListeners=function(t){var e,i=[];for(e=0;e<t.length;e+=1)i.push(t[e].listener);return i},r.getListenersAsObject=function(t){var e,i=this.getListeners(t);return i instanceof Array&&(e={},e[t]=i),e||i},r.addListener=function(t,e){var i,n=this.getListenersAsObject(t),r="object"==typeof e;for(i in n)n.hasOwnProperty(i)&&o(n[i],e)===-1&&n[i].push(r?e:{listener:e,once:!1});return this},r.on=n("addListener"),r.addOnceListener=function(t,e){return this.addListener(t,{listener:e,once:!0})},r.once=n("addOnceListener"),r.defineEvent=function(t){return this.getListeners(t),this},r.defineEvents=function(t){for(var e=0;e<t.length;e+=1)this.defineEvent(t[e]);return this},r.removeListener=function(t,e){var i,n,r=this.getListenersAsObject(t);for(n in r)r.hasOwnProperty(n)&&(i=o(r[n],e),i!==-1&&r[n].splice(i,1));return this},r.off=n("removeListener"),r.addListeners=function(t,e){return this.manipulateListeners(!1,t,e)},r.removeListeners=function(t,e){return this.manipulateListeners(!0,t,e)},r.manipulateListeners=function(t,e,i){var o,n,r=t?this.removeListener:this.addListener,s=t?this.removeListeners:this.addListeners;if("object"!=typeof e||e instanceof RegExp)for(o=i.length;o--;)r.call(this,e,i[o]);else for(o in e)e.hasOwnProperty(o)&&(n=e[o])&&("function"==typeof n?r.call(this,o,n):s.call(this,o,n));return this},r.removeEvent=function(t){var e,i=typeof t,o=this._getEvents();if("string"===i)delete o[t];else if(t instanceof RegExp)for(e in o)o.hasOwnProperty(e)&&t.test(e)&&delete o[e];else delete this._events;return this},r.removeAllListeners=n("removeEvent"),r.emitEvent=function(t,e){var i,o,n,r,s,a=this.getListenersAsObject(t);for(r in a)if(a.hasOwnProperty(r))for(i=a[r].slice(0),n=i.length;n--;)o=i[n],o.once===!0&&this.removeListener(t,o.listener),s=o.listener.apply(this,e||[]),s===this._getOnceReturnValue()&&this.removeListener(t,o.listener);return this},r.trigger=n("emitEvent"),r.emit=function(t){var e=Array.prototype.slice.call(arguments,1);return this.emitEvent(t,e)},r.setOnceReturnValue=function(t){return this._onceReturnValue=t,this},r._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},r._getEvents=function(){return this._events||(this._events={})},t.noConflict=function(){return s.EventEmitter=a,t},"function"==typeof e&&e.amd?e(function(){return t}):"object"==typeof i&&i.exports?i.exports=t:s.EventEmitter=t}).call(this)},{}]},{},[1])}();
2
  //# sourceMappingURL=script.min.js.map
assets/js/script.min.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["script.js"],"names":["require","undefined","define","e","t","n","r","s","o","u","a","i","f","Error","code","l","exports","call","length","1","module","_typeof","Symbol","iterator","obj","constructor","prototype","css","element","styles","background_color","style","background","color","border_color","borderColor","border_width","borderWidth","parseInt","border_style","borderStyle","width","maxWidth","Boxzilla","options","window","boxzilla_options","isLoggedIn","document","body","className","indexOf","inited","testMode","console","log","init","boxes","boxOpts","location","protocol","host","replace","content","box","create","id","firstChild","lastChild","addEventListener","mc4wp_forms_config","submitted_form","selector","element_id","boxId","hasOwnProperty","querySelector","show","boxzilla","2","property","initObjectProperties","properties","value","newObject","copyObjectProperties","object","animated","getAttribute","toggle","animation","nowVisible","display","offsetLeft","clone","cloneNode","cleanup","removeAttribute","setAttribute","hiddenStyles","visibleStyles","computedStyles","getComputedStyle","overflowY","animate","opacity","targetStyles","fn","last","Date","initialStyles","currentStyles","propSteps","parseFloat","to","current","duration","tick","step","increment","newValue","now","timeSinceLastTick","done","suffix","requestAnimationFrame","setTimeout","3","merge","obj1","obj2","obj3","attrname","getDocumentHeight","html","documentElement","height","Math","max","scrollHeight","offsetHeight","clientHeight","defaults","rehide","cookie","icon","minimumScreenWidth","position","trigger","closable","Animator","Box","config","this","overlay","getElementById","visible","dismissed","triggered","triggerHeight","cookieSet","closeIcon","method","calculateTriggerHeight","isCookieSet","dom","events","dismiss","bind","target","tagName","setCookie","needle","hash","fits","locationHashRefersBox","wrapper","createElement","appendChild","innerHTML","scripts","querySelectorAll","script","createTextNode","text","parentNode","removeChild","setCustomBoxStyling","origDisplay","maxHeight","windowHeight","innerHeight","boxHeight","newTopMargin","marginTop","classList","firstInput","focus","hide","triggerElement","offset","getBoundingClientRect","top","elementId","substring","innerWidth","mayAutoShow","mayRehide","RegExp","hours","expiryDate","setHours","getHours","toUTCString","shown","preventDefault","_Boxzilla","./animator.js","4","throttle","threshhold","scope","deferTimer","context","args","arguments","clearTimeout","apply","onKeyUp","keyCode","checkPageViewsCriteria","isAnyBoxVisible","forEach","pageViews","checkTimeCriteria","siteTimer","time","pageTimer","checkHeightCriteria","scrollY","pageYOffset","recalculateHeights","onOverlayClick","x","offsetX","y","offsetY","rect","margin","left","right","bottom","triggerExitIntent","exitIntentTriggered","onMouseLeave","delay","clientY","exitIntentDelayTimer","onMouseEnter","clearInterval","EventEmitter","Object","Timer","timers","start","sessionTime","sessionStorage","getItem","stop","setItem","styleElement","head","setInterval","opts","push","get","./box.js","./styles.js","./timer.js","wolfy87-eventemitter","5","6","interval","7","indexOfListener","listeners","listener","alias","name","proto","originalGlobalValue","getListeners","evt","response","key","_getEvents","test","flattenListeners","flatListeners","getListenersAsObject","Array","addListener","listenerIsWrapped","once","on","addOnceListener","defineEvent","defineEvents","evts","removeListener","index","splice","off","addListeners","manipulateListeners","removeListeners","remove","single","multiple","removeEvent","type","_events","removeAllListeners","emitEvent","listenersMap","slice","_getOnceReturnValue","emit","setOnceReturnValue","_onceReturnValue","noConflict","amd"],"mappings":"CAAA,WAAe,GAAIA,GAAUC,OAAgEC,EAASD,QAAW,QAAUE,GAAEC,EAAEC,EAAEC,GAAG,QAASC,GAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,GAAIE,GAAkB,kBAATV,IAAqBA,CAAQ,KAAIS,GAAGC,EAAE,MAAOA,GAAEF,GAAE,EAAI,IAAGG,EAAE,MAAOA,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AAWP,EAASA,SAAS3D,MAAM1E,KAAMuE,OAErCqE,IAAa5I,KAAK6K,uBAClB7K,KAAK4J,eAAejB,EAAKN,EAASA,SAMlD,OAAOrI,OAMXwI,EAAM7I,QAAU2I,EAAM,aAUtBE,EAAMsC,KAAO,SAAcnC,GACvB,GAAIpE,GAAO4E,MAAMlR,UAAU2S,MAAMpT,KAAKgN,UAAW,EACjD,OAAOxE,MAAK0K,UAAU/B,EAAKpE,IAW/BiE,EAAMuC,mBAAqB,SAA4BrP,GAEnD,MADAsE,MAAKgL,iBAAmBtP,EACjBsE,MAWXwI,EAAMqC,oBAAsB,WACxB,OAAI7K,KAAK9E,eAAe,qBACb8E,KAAKgL,kBAapBxC,EAAMM,WAAa,WACf,MAAO9I,MAAKwK,UAAYxK,KAAKwK,aAQjC7D,EAAasE,WAAa,WAEtB,MADA1T,GAAQoP,aAAe8B,EAChB9B,GAIW,kBAAXlQ,IAAyBA,EAAOyU,IACvCzU,EAAO,WACH,MAAOkQ,KAGY,gBAAXhP,IAAuBA,EAAOJ,QAC1CI,EAAOJ,QAAUoP,EAGjBpP,EAAQoP,aAAeA,IAE7BnP,KAAKwI,gBAEI","file":"script.min.js","sourcesContent":["(function () { var require = undefined; var module = undefined; var exports = undefined; var define = undefined; (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){\n'use strict';\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n(function () {\n 'use strict';\n\n var Boxzilla = require('boxzilla');\n var options = window.boxzilla_options;\n var isLoggedIn = document.body.className.indexOf('logged-in') > -1;\n\n // failsafe against including script twice.\n if (options.inited) {\n return;\n }\n\n // print message when test mode is enabled\n if (isLoggedIn && options.testMode) {\n console.log('Boxzilla: Test mode is enabled. Please disable test mode if you\\'re done testing.');\n }\n\n // init boxzilla\n Boxzilla.init();\n\n // create boxes from options\n for (var i = 0; i < options.boxes.length; i++) {\n // get opts\n var boxOpts = options.boxes[i];\n boxOpts.testMode = isLoggedIn && options.testMode;\n\n // fix http:// links in box content....\n if (window.location.protocol === \"https:\" && window.location.host) {\n var o = \"http://\" + window.location.host;\n var n = o.replace('http://', 'https://');\n boxOpts.content = boxOpts.content.replace(o, n);\n }\n\n // create box\n var box = Boxzilla.create(boxOpts.id, boxOpts);\n\n // add custom css to box\n css(box.element, boxOpts.css);\n\n box.element.firstChild.firstChild.className += \" first-child\";\n box.element.firstChild.lastChild.className += \" last-child\";\n }\n\n // helper function for setting CSS styles\n function css(element, styles) {\n if (styles.background_color) {\n element.style.background = styles.background_color;\n }\n\n if (styles.color) {\n element.style.color = styles.color;\n }\n\n if (styles.border_color) {\n element.style.borderColor = styles.border_color;\n }\n\n if (styles.border_width) {\n element.style.borderWidth = parseInt(styles.border_width) + \"px\";\n }\n\n if (styles.border_style) {\n element.style.borderStyle = styles.border_style;\n }\n\n if (styles.width) {\n element.style.maxWidth = parseInt(styles.width) + \"px\";\n }\n }\n\n /**\n * If a MailChimp for WordPress form was submitted, open the box containing that form (if any)\n *\n * TODO: Just set location hash from MailChimp for WP?\n */\n window.addEventListener('load', function () {\n if (_typeof(window.mc4wp_forms_config) === \"object\" && window.mc4wp_forms_config.submitted_form) {\n var selector = '#' + window.mc4wp_forms_config.submitted_form.element_id;\n var boxes = Boxzilla.boxes;\n for (var boxId in boxes) {\n if (!boxes.hasOwnProperty(boxId)) {\n continue;\n }\n var box = boxes[boxId];\n if (box.element.querySelector(selector)) {\n box.show();\n return;\n }\n }\n }\n });\n\n options.inited = true;\n window.Boxzilla = Boxzilla;\n})();\n\n},{\"boxzilla\":4}],2:[function(require,module,exports){\n'use strict';\n\nvar duration = 320;\n\nfunction css(element, styles) {\n for (var property in styles) {\n element.style[property] = styles[property];\n }\n}\n\nfunction initObjectProperties(properties, value) {\n var newObject = {};\n for (var i = 0; i < properties.length; i++) {\n newObject[properties[i]] = value;\n }\n return newObject;\n}\n\nfunction copyObjectProperties(properties, object) {\n var newObject = {};\n for (var i = 0; i < properties.length; i++) {\n newObject[properties[i]] = object[properties[i]];\n }\n return newObject;\n}\n\n/**\n * Checks if the given element is currently being animated.\n *\n * @param element\n * @returns {boolean}\n */\nfunction animated(element) {\n return !!element.getAttribute('data-animated');\n}\n\n/**\n * Toggles the element using the given animation.\n *\n * @param element\n * @param animation Either \"fade\" or \"slide\"\n */\nfunction toggle(element, animation) {\n var nowVisible = element.style.display != 'none' || element.offsetLeft > 0;\n\n // create clone for reference\n var clone = element.cloneNode(true);\n var cleanup = function cleanup() {\n element.removeAttribute('data-animated');\n element.setAttribute('style', clone.getAttribute('style'));\n element.style.display = nowVisible ? 'none' : '';\n };\n\n // store attribute so everyone knows we're animating this element\n element.setAttribute('data-animated', \"true\");\n\n // toggle element visiblity right away if we're making something visible\n if (!nowVisible) {\n element.style.display = '';\n }\n\n var hiddenStyles, visibleStyles;\n\n // animate properties\n if (animation === 'slide') {\n hiddenStyles = initObjectProperties([\"height\", \"borderTopWidth\", \"borderBottomWidth\", \"paddingTop\", \"paddingBottom\"], 0);\n visibleStyles = {};\n\n if (!nowVisible) {\n var computedStyles = window.getComputedStyle(element);\n visibleStyles = copyObjectProperties([\"height\", \"borderTopWidth\", \"borderBottomWidth\", \"paddingTop\", \"paddingBottom\"], computedStyles);\n css(element, hiddenStyles);\n }\n\n // don't show a scrollbar during animation\n element.style.overflowY = 'hidden';\n animate(element, nowVisible ? hiddenStyles : visibleStyles, cleanup);\n } else {\n hiddenStyles = { opacity: 0 };\n visibleStyles = { opacity: 1 };\n if (!nowVisible) {\n css(element, hiddenStyles);\n }\n\n animate(element, nowVisible ? hiddenStyles : visibleStyles, cleanup);\n }\n}\n\nfunction animate(element, targetStyles, fn) {\n var last = +new Date();\n var initialStyles = window.getComputedStyle(element);\n var currentStyles = {};\n var propSteps = {};\n\n for (var property in targetStyles) {\n // make sure we have an object filled with floats\n targetStyles[property] = parseFloat(targetStyles[property]);\n\n // calculate step size & current value\n var to = targetStyles[property];\n var current = parseFloat(initialStyles[property]);\n\n // is there something to do?\n if (current == to) {\n delete targetStyles[property];\n continue;\n }\n\n propSteps[property] = (to - current) / duration; // points per second\n currentStyles[property] = current;\n }\n\n var tick = function tick() {\n var now = +new Date();\n var timeSinceLastTick = now - last;\n var done = true;\n\n var step, to, increment, newValue;\n for (var property in targetStyles) {\n step = propSteps[property];\n to = targetStyles[property];\n increment = step * timeSinceLastTick;\n newValue = currentStyles[property] + increment;\n\n if (step > 0 && newValue >= to || step < 0 && newValue <= to) {\n newValue = to;\n } else {\n done = false;\n }\n\n // store new value\n currentStyles[property] = newValue;\n\n var suffix = property !== \"opacity\" ? \"px\" : \"\";\n element.style[property] = newValue + suffix;\n }\n\n last = +new Date();\n\n // keep going until we're done for all props\n if (!done) {\n window.requestAnimationFrame && requestAnimationFrame(tick) || setTimeout(tick, 32);\n } else {\n // call callback\n fn && fn();\n }\n };\n\n tick();\n}\n\nmodule.exports = {\n 'toggle': toggle,\n 'animate': animate,\n 'animated': animated\n};\n\n},{}],3:[function(require,module,exports){\n'use strict';\n\nvar defaults = {\n 'animation': 'fade',\n 'rehide': false,\n 'content': '',\n 'cookie': null,\n 'icon': '&times',\n 'minimumScreenWidth': 0,\n 'position': 'center',\n 'testMode': false,\n 'trigger': false,\n 'closable': true\n},\n Boxzilla,\n Animator = require('./animator.js');\n\n/**\n * Merge 2 objects, values of the latter overwriting the former.\n *\n * @param obj1\n * @param obj2\n * @returns {*}\n */\nfunction merge(obj1, obj2) {\n var obj3 = {};\n for (var attrname in obj1) {\n obj3[attrname] = obj1[attrname];\n }\n for (var attrname in obj2) {\n obj3[attrname] = obj2[attrname];\n }\n return obj3;\n}\n\n/**\n * Get the real height of entire document.\n * @returns {number}\n */\nfunction getDocumentHeight() {\n var body = document.body,\n html = document.documentElement;\n\n var height = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);\n\n return height;\n}\n\n// Box Object\nvar Box = function Box(id, config) {\n this.id = id;\n\n // store config values\n this.config = merge(defaults, config);\n\n // store ref to overlay\n this.overlay = document.getElementById('boxzilla-overlay');\n\n // state\n this.visible = false;\n this.dismissed = false;\n this.triggered = false;\n this.triggerHeight = 0;\n this.cookieSet = false;\n this.element = null;\n this.closeIcon = null;\n\n // if a trigger was given, calculate values once and store\n if (this.config.trigger) {\n if (this.config.trigger.method === 'percentage' || this.config.trigger.method === 'element') {\n this.triggerHeight = this.calculateTriggerHeight();\n }\n\n this.cookieSet = this.isCookieSet();\n }\n\n // create dom elements for this box\n this.dom();\n\n // further initialise the box\n this.events();\n};\n\n// initialise the box\nBox.prototype.events = function () {\n var box = this;\n\n // attach event to \"close\" icon inside box\n this.closeIcon && this.closeIcon.addEventListener('click', box.dismiss.bind(this));\n\n this.element.addEventListener('click', function (e) {\n if (e.target.tagName === 'A') {\n Boxzilla.trigger('box.interactions.link', [box, e.target]);\n }\n }, false);\n\n this.element.addEventListener('submit', function (e) {\n box.setCookie();\n Boxzilla.trigger('box.interactions.form', [box, e.target]);\n }, false);\n\n window.addEventListener(\"hashchange\", function () {\n var needle = \"#boxzilla-\" + box.id;\n if (location.hash === needle) {\n box.toggle();\n }\n });\n\n // maybe show box right away\n if (this.fits() && this.locationHashRefersBox()) {\n window.addEventListener('load', this.show.bind(this));\n }\n};\n\n// generate dom elements for this box\nBox.prototype.dom = function () {\n var wrapper = document.createElement('div');\n wrapper.className = 'boxzilla-container boxzilla-' + this.config.position + '-container';\n\n var box = document.createElement('div');\n box.setAttribute('id', 'boxzilla-' + this.id);\n box.className = 'boxzilla boxzilla-' + this.id + ' boxzilla-' + this.config.position;\n box.style.display = 'none';\n wrapper.appendChild(box);\n\n var content = document.createElement('div');\n content.className = 'boxzilla-content';\n content.innerHTML = this.config.content;\n box.appendChild(content);\n\n // remove <script> from box content and append them to the document body\n var scripts = content.querySelectorAll('script');\n if (scripts.length) {\n var script = document.createElement('script');\n for (var i = 0; i < scripts.length; i++) {\n script.appendChild(document.createTextNode(scripts[i].text));\n scripts[i].parentNode.removeChild(scripts[i]);\n }\n document.body.appendChild(script);\n }\n\n if (this.config.closable && this.config.icon) {\n var closeIcon = document.createElement('span');\n closeIcon.className = \"boxzilla-close-icon\";\n closeIcon.innerHTML = this.config.icon;\n box.appendChild(closeIcon);\n this.closeIcon = closeIcon;\n }\n\n document.body.appendChild(wrapper);\n this.element = box;\n};\n\n// set (calculate) custom box styling depending on box options\nBox.prototype.setCustomBoxStyling = function () {\n\n // reset element to its initial state\n var origDisplay = this.element.style.display;\n this.element.style.display = '';\n this.element.style.overflowY = 'auto';\n this.element.style.maxHeight = 'none';\n\n // get new dimensions\n var windowHeight = window.innerHeight;\n var boxHeight = this.element.clientHeight;\n\n // add scrollbar to box and limit height\n if (boxHeight > windowHeight) {\n this.element.style.maxHeight = windowHeight + \"px\";\n this.element.style.overflowY = 'scroll';\n }\n\n // set new top margin for boxes which are centered\n if (this.config.position === 'center') {\n var newTopMargin = (windowHeight - boxHeight) / 2;\n newTopMargin = newTopMargin >= 0 ? newTopMargin : 0;\n this.element.style.marginTop = newTopMargin + \"px\";\n }\n\n this.element.style.display = origDisplay;\n};\n\n// toggle visibility of the box\nBox.prototype.toggle = function (show) {\n\n // revert visibility if no explicit argument is given\n if (typeof show === \"undefined\") {\n show = !this.visible;\n }\n\n // is box already at desired visibility?\n if (show === this.visible) {\n return false;\n }\n\n // is box being animated?\n if (Animator.animated(this.element)) {\n return false;\n }\n\n // if box should be hidden but is not closable, bail.\n if (!show && !this.config.closable) {\n return false;\n }\n\n // set new visibility status\n this.visible = show;\n\n // calculate new styling rules\n this.setCustomBoxStyling();\n\n // trigger event\n Boxzilla.trigger('box.' + (show ? 'show' : 'hide'), [this]);\n\n // show or hide box using selected animation\n if (this.config.position === 'center') {\n this.overlay.classList.toggle('boxzilla-' + this.id + '-overlay');\n Animator.toggle(this.overlay, \"fade\");\n }\n\n Animator.toggle(this.element, this.config.animation);\n\n // focus on first input field in box\n var firstInput = this.element.querySelector('input, textarea');\n if (firstInput) {\n firstInput.focus();\n }\n\n return true;\n};\n\n// show the box\nBox.prototype.show = function () {\n return this.toggle(true);\n};\n\n// hide the box\nBox.prototype.hide = function () {\n return this.toggle(false);\n};\n\n// calculate trigger height\nBox.prototype.calculateTriggerHeight = function () {\n var triggerHeight = 0;\n\n if (this.config.trigger.method === 'element') {\n var triggerElement = document.body.querySelector(this.config.trigger.value);\n if (triggerElement) {\n var offset = triggerElement.getBoundingClientRect();\n triggerHeight = offset.top;\n }\n } else if (this.config.trigger.method === 'percentage') {\n triggerHeight = this.config.trigger.value / 100 * getDocumentHeight();\n }\n\n return triggerHeight;\n};\n\n// checks whether window.location.hash equals the box element ID or that of any element inside the box\nBox.prototype.locationHashRefersBox = function () {\n\n if (!window.location.hash || 0 === window.location.hash.length) {\n return false;\n }\n\n var elementId = window.location.hash.substring(1);\n if (elementId === this.element.id) {\n return true;\n } else if (this.element.querySelector('#' + elementId)) {\n return true;\n }\n\n return false;\n};\n\nBox.prototype.fits = function () {\n if (this.config.minimumScreenWidth <= 0) {\n return true;\n }\n\n return window.innerWidth > this.config.minimumScreenWidth;\n};\n\n// is this box enabled?\nBox.prototype.mayAutoShow = function () {\n\n if (this.dismissed) {\n return false;\n }\n\n // check if box fits on given minimum screen width\n if (!this.fits()) {\n return false;\n }\n\n // if trigger empty or error in calculating triggerHeight, return false\n if (!this.config.trigger) {\n return false;\n }\n\n // rely on cookie value (show if not set, don't show if set)\n return !this.cookieSet;\n};\n\nBox.prototype.mayRehide = function () {\n return this.config.rehide && this.triggered;\n};\n\nBox.prototype.isCookieSet = function () {\n // always show on test mode\n if (this.config.testMode) {\n return false;\n }\n\n // if either cookie is null or trigger & dismiss are both falsey, don't bother checking.\n if (!this.config.cookie || !this.config.cookie.triggered && !this.config.cookie.dismissed) {\n return false;\n }\n\n var cookieSet = document.cookie.replace(new RegExp(\"(?:(?:^|.*;)\\\\s*\" + 'boxzilla_box_' + this.id + \"\\\\s*\\\\=\\\\s*([^;]*).*$)|^.*$\"), \"$1\") === \"true\";\n return cookieSet;\n};\n\n// set cookie that disables automatically showing the box\nBox.prototype.setCookie = function (hours) {\n var expiryDate = new Date();\n expiryDate.setHours(expiryDate.getHours() + hours);\n document.cookie = 'boxzilla_box_' + this.id + '=true; expires=' + expiryDate.toUTCString() + '; path=/';\n};\n\nBox.prototype.trigger = function () {\n var shown = this.show();\n if (!shown) {\n return;\n }\n\n this.triggered = true;\n if (this.config.cookie && this.config.cookie.triggered) {\n this.setCookie(this.config.cookie.triggered);\n }\n};\n\n/**\n * Dismisses the box and optionally sets a cookie.\n *\n * @param e The event that triggered this dismissal.\n * @returns {boolean}\n */\nBox.prototype.dismiss = function (e) {\n // prevent default action\n e && e.preventDefault();\n\n // only dismiss box if it's currently open.\n if (!this.visible) {\n return false;\n }\n\n // hide box element\n this.hide();\n\n // set cookie\n if (this.config.cookie && this.config.cookie.dismissed) {\n this.setCookie(this.config.cookie.dismissed);\n }\n\n this.dismissed = true;\n Boxzilla.trigger('box.dismiss', [this]);\n return true;\n};\n\nmodule.exports = function (_Boxzilla) {\n Boxzilla = _Boxzilla;\n return Box;\n};\n\n},{\"./animator.js\":2}],4:[function(require,module,exports){\n'use strict';\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar EventEmitter = require('wolfy87-eventemitter'),\n Boxzilla = Object.create(EventEmitter.prototype),\n Box = require('./box.js')(Boxzilla),\n Timer = require('./timer.js'),\n boxes = [],\n overlay,\n exitIntentDelayTimer,\n exitIntentTriggered,\n siteTimer,\n pageTimer,\n pageViews;\n\nfunction throttle(fn, threshhold, scope) {\n threshhold || (threshhold = 250);\n var last, deferTimer;\n return function () {\n var context = scope || this;\n\n var now = +new Date(),\n args = arguments;\n if (last && now < last + threshhold) {\n // hold on to it\n clearTimeout(deferTimer);\n deferTimer = setTimeout(function () {\n last = now;\n fn.apply(context, args);\n }, threshhold);\n } else {\n last = now;\n fn.apply(context, args);\n }\n };\n}\n\n// \"keyup\" listener\nfunction onKeyUp(e) {\n if (e.keyCode == 27) {\n Boxzilla.dismiss();\n }\n}\n\n// check \"pageviews\" criteria for each box\nfunction checkPageViewsCriteria() {\n\n // don't bother if another box is currently open\n if (isAnyBoxVisible()) {\n return;\n }\n\n boxes.forEach(function (box) {\n if (!box.mayAutoShow()) {\n return;\n }\n\n if (box.config.trigger.method === 'pageviews' && pageViews >= box.config.trigger.value) {\n box.trigger();\n }\n });\n}\n\n// check time trigger criteria for each box\nfunction checkTimeCriteria() {\n // don't bother if another box is currently open\n if (isAnyBoxVisible()) {\n return;\n }\n\n boxes.forEach(function (box) {\n if (!box.mayAutoShow()) {\n return;\n }\n\n // check \"time on site\" trigger\n if (box.config.trigger.method === 'time_on_site' && siteTimer.time >= box.config.trigger.value) {\n box.trigger();\n }\n\n // check \"time on page\" trigger\n if (box.config.trigger.method === 'time_on_page' && pageTimer.time >= box.config.trigger.value) {\n box.trigger();\n }\n });\n}\n\n// check triggerHeight criteria for all boxes\nfunction checkHeightCriteria() {\n var scrollY = (window.scrollY || window.pageYOffset) + window.innerHeight * 0.75;\n\n boxes.forEach(function (box) {\n\n if (!box.mayAutoShow() || box.triggerHeight <= 0) {\n return;\n }\n\n if (scrollY > box.triggerHeight) {\n // don't bother if another box is currently open\n if (isAnyBoxVisible()) {\n return;\n }\n\n // trigger box\n box.trigger();\n } else if (box.mayRehide()) {\n box.hide();\n }\n });\n}\n\n// recalculate heights and variables based on height\nfunction recalculateHeights() {\n boxes.forEach(function (box) {\n box.setCustomBoxStyling();\n });\n}\n\nfunction onOverlayClick(e) {\n var x = e.offsetX;\n var y = e.offsetY;\n\n // calculate if click was near a box to avoid closing it (click error margin)\n boxes.forEach(function (box) {\n var rect = box.element.getBoundingClientRect();\n var margin = 100 + window.innerWidth * 0.05;\n\n // if click was not anywhere near box, dismiss it.\n if (x < rect.left - margin || x > rect.right + margin || y < rect.top - margin || y > rect.bottom + margin) {\n box.dismiss();\n }\n });\n}\n\nfunction triggerExitIntent() {\n // do nothing if already triggered OR another box is visible.\n if (exitIntentTriggered || isAnyBoxVisible()) {\n return;\n }\n\n boxes.forEach(function (box) {\n if (box.mayAutoShow() && box.config.trigger.method === 'exit_intent') {\n box.trigger();\n }\n });\n\n exitIntentTriggered = true;\n}\n\nfunction onMouseLeave(e) {\n var delay = 400;\n\n // did mouse leave at top of window?\n if (e.clientY <= 0) {\n exitIntentDelayTimer = window.setTimeout(triggerExitIntent, delay);\n }\n}\n\nfunction isAnyBoxVisible() {\n\n for (var i = 0; i < boxes.length; i++) {\n var box = boxes[i];\n\n if (box.visible) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction onMouseEnter() {\n if (exitIntentDelayTimer) {\n window.clearInterval(exitIntentDelayTimer);\n exitIntentDelayTimer = null;\n }\n}\n\nvar timers = {\n start: function start() {\n var sessionTime = sessionStorage.getItem('boxzilla_timer');\n if (sessionTime) siteTimer.time = sessionTime;\n siteTimer.start();\n pageTimer.start();\n },\n stop: function stop() {\n sessionStorage.setItem('boxzilla_timer', siteTimer.time);\n siteTimer.stop();\n pageTimer.stop();\n }\n};\n\n// initialise & add event listeners\nBoxzilla.init = function () {\n siteTimer = new Timer(sessionStorage.getItem('boxzilla_timer') || 0);\n pageTimer = new Timer(0);\n pageViews = sessionStorage.getItem('boxzilla_pageviews') || 0;\n\n // insert styles into DOM\n var styles = require('./styles.js');\n var styleElement = document.createElement('style');\n styleElement.setAttribute(\"type\", \"text/css\");\n styleElement.innerHTML = styles;\n document.head.appendChild(styleElement);\n\n // add overlay element to dom\n overlay = document.createElement('div');\n overlay.style.display = 'none';\n overlay.id = 'boxzilla-overlay';\n document.body.appendChild(overlay);\n\n // event binds\n window.addEventListener('touchmove', throttle(checkHeightCriteria));\n window.addEventListener('scroll', throttle(checkHeightCriteria));\n window.addEventListener('resize', throttle(recalculateHeights));\n window.addEventListener('load', recalculateHeights);\n overlay.addEventListener('click', onOverlayClick);\n window.setInterval(checkTimeCriteria, 1000);\n window.setTimeout(checkPageViewsCriteria, 1000);\n document.documentElement.addEventListener('mouseleave', onMouseLeave);\n document.documentElement.addEventListener('mouseenter', onMouseEnter);\n document.addEventListener('keyup', onKeyUp);\n\n timers.start();\n window.addEventListener('focus', timers.start);\n window.addEventListener('beforeunload', function () {\n timers.stop();\n sessionStorage.setItem('boxzilla_pageviews', ++pageViews);\n });\n window.addEventListener('blur', timers.stop);\n\n Boxzilla.trigger('ready');\n};\n\n/**\n * Create a new Box\n *\n * @param string id\n * @param object opts\n *\n * @returns Box\n */\nBoxzilla.create = function (id, opts) {\n var box = new Box(id, opts);\n boxes.push(box);\n return box;\n};\n\nBoxzilla.get = function (id) {\n for (var i = 0; i < boxes.length; i++) {\n var box = boxes[i];\n if (box.id == id) {\n return box;\n }\n }\n\n throw new Error(\"No box exists with ID \" + id);\n};\n\n// dismiss a single box (or all by omitting id param)\nBoxzilla.dismiss = function (id) {\n // if no id given, dismiss all current open boxes\n if (typeof id === \"undefined\") {\n boxes.forEach(function (box) {\n box.dismiss();\n });\n } else if (_typeof(boxes[id]) === \"object\") {\n Boxzilla.get(id).dismiss();\n }\n};\n\nBoxzilla.hide = function (id) {\n if (typeof id === \"undefined\") {\n boxes.forEach(function (box) {\n box.hide();\n });\n } else {\n Boxzilla.get(id).hide();\n }\n};\n\nBoxzilla.show = function (id) {\n if (typeof id === \"undefined\") {\n boxes.forEach(function (box) {\n box.show();\n });\n } else {\n Boxzilla.get(id).show();\n }\n};\n\nBoxzilla.toggle = function (id) {\n if (typeof id === \"undefined\") {\n boxes.forEach(function (box) {\n box.toggle();\n });\n } else {\n Boxzilla.get(id).toggle();\n }\n};\n\n// expose each individual box.\nBoxzilla.boxes = boxes;\n\nwindow.Boxzilla = Boxzilla;\n\nif (typeof module !== 'undefined' && module.exports) {\n module.exports = Boxzilla;\n}\n\n},{\"./box.js\":3,\"./styles.js\":5,\"./timer.js\":6,\"wolfy87-eventemitter\":7}],5:[function(require,module,exports){\n\"use strict\";\n\nvar styles = \"@media(max-width:780px){body,html{-webkit-overflow-scrolling:touch!important}}#boxzilla-overlay{position:fixed;background:rgba(0,0,0,.65);width:100%;height:100%;left:0;top:0;z-index:99999}.boxzilla-center-container{position:fixed;top:0;left:0;right:0;height:0;text-align:center;z-index:999999;line-height:0}.boxzilla-center-container .boxzilla{display:inline-block;text-align:left;position:relative;line-height:normal}.boxzilla{position:fixed;z-index:999999;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background:#fff;padding:25px}.boxzilla.boxzilla-top-left{top:0;left:0}.boxzilla.boxzilla-top-right{top:0;right:0}.boxzilla.boxzilla-bottom-left{bottom:0;left:0}.boxzilla.boxzilla-bottom-right{bottom:0;right:0}.boxzilla-content>:first-child{margin-top:0;padding-top:0}.boxzilla-content>:last-child{margin-bottom:0;padding-bottom:0}.boxzilla-close-icon{position:absolute;right:0;top:0;text-align:center;padding:6px;cursor:pointer;-webkit-appearance:none;font-size:28px;font-weight:700;line-height:20px;color:#000;opacity:.5}.boxzilla-close-icon:focus,.boxzilla-close-icon:hover{opacity:.8}\";\nmodule.exports = styles;\n\n},{}],6:[function(require,module,exports){\n'use strict';\n\nvar Timer = function Timer(start) {\n this.time = start;\n this.interval = 0;\n};\n\nTimer.prototype.tick = function () {\n this.time++;\n};\n\nTimer.prototype.start = function () {\n if (!this.interval) {\n this.interval = window.setInterval(this.tick.bind(this), 1000);\n }\n};\n\nTimer.prototype.stop = function () {\n if (this.interval) {\n window.clearInterval(this.interval);\n this.interval = 0;\n }\n};\n\nmodule.exports = Timer;\n\n},{}],7:[function(require,module,exports){\n/*!\n * EventEmitter v4.2.11 - git.io/ee\n * Unlicense - http://unlicense.org/\n * Oliver Caldwell - http://oli.me.uk/\n * @preserve\n */\n\n;(function () {\n 'use strict';\n\n /**\n * Class for managing events.\n * Can be extended to provide event functionality in other classes.\n *\n * @class EventEmitter Manages event registering and emitting.\n */\n function EventEmitter() {}\n\n // Shortcuts to improve speed and size\n var proto = EventEmitter.prototype;\n var exports = this;\n var originalGlobalValue = exports.EventEmitter;\n\n /**\n * Finds the index of the listener for the event in its storage array.\n *\n * @param {Function[]} listeners Array of listeners to search through.\n * @param {Function} listener Method to look for.\n * @return {Number} Index of the specified listener, -1 if not found\n * @api private\n */\n function indexOfListener(listeners, listener) {\n var i = listeners.length;\n while (i--) {\n if (listeners[i].listener === listener) {\n return i;\n }\n }\n\n return -1;\n }\n\n /**\n * Alias a method while keeping the context correct, to allow for overwriting of target method.\n *\n * @param {String} name The name of the target method.\n * @return {Function} The aliased method\n * @api private\n */\n function alias(name) {\n return function aliasClosure() {\n return this[name].apply(this, arguments);\n };\n }\n\n /**\n * Returns the listener array for the specified event.\n * Will initialise the event object and listener arrays if required.\n * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them.\n * Each property in the object response is an array of listener functions.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Function[]|Object} All listener functions for the event.\n */\n proto.getListeners = function getListeners(evt) {\n var events = this._getEvents();\n var response;\n var key;\n\n // Return a concatenated array of all matching events if\n // the selector is a regular expression.\n if (evt instanceof RegExp) {\n response = {};\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n response[key] = events[key];\n }\n }\n }\n else {\n response = events[evt] || (events[evt] = []);\n }\n\n return response;\n };\n\n /**\n * Takes a list of listener objects and flattens it into a list of listener functions.\n *\n * @param {Object[]} listeners Raw listener objects.\n * @return {Function[]} Just the listener functions.\n */\n proto.flattenListeners = function flattenListeners(listeners) {\n var flatListeners = [];\n var i;\n\n for (i = 0; i < listeners.length; i += 1) {\n flatListeners.push(listeners[i].listener);\n }\n\n return flatListeners;\n };\n\n /**\n * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Object} All listener functions for an event in an object.\n */\n proto.getListenersAsObject = function getListenersAsObject(evt) {\n var listeners = this.getListeners(evt);\n var response;\n\n if (listeners instanceof Array) {\n response = {};\n response[evt] = listeners;\n }\n\n return response || listeners;\n };\n\n /**\n * Adds a listener function to the specified event.\n * The listener will not be added if it is a duplicate.\n * If the listener returns true then it will be removed after it is called.\n * If you pass a regular expression as the event name then the listener will be added to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListener = function addListener(evt, listener) {\n var listeners = this.getListenersAsObject(evt);\n var listenerIsWrapped = typeof listener === 'object';\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) {\n listeners[key].push(listenerIsWrapped ? listener : {\n listener: listener,\n once: false\n });\n }\n }\n\n return this;\n };\n\n /**\n * Alias of addListener\n */\n proto.on = alias('addListener');\n\n /**\n * Semi-alias of addListener. It will add a listener that will be\n * automatically removed after its first execution.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addOnceListener = function addOnceListener(evt, listener) {\n return this.addListener(evt, {\n listener: listener,\n once: true\n });\n };\n\n /**\n * Alias of addOnceListener.\n */\n proto.once = alias('addOnceListener');\n\n /**\n * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad.\n * You need to tell it what event names should be matched by a regex.\n *\n * @param {String} evt Name of the event to create.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvent = function defineEvent(evt) {\n this.getListeners(evt);\n return this;\n };\n\n /**\n * Uses defineEvent to define multiple events.\n *\n * @param {String[]} evts An array of event names to define.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvents = function defineEvents(evts) {\n for (var i = 0; i < evts.length; i += 1) {\n this.defineEvent(evts[i]);\n }\n return this;\n };\n\n /**\n * Removes a listener function from the specified event.\n * When passed a regular expression as the event name, it will remove the listener from all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to remove the listener from.\n * @param {Function} listener Method to remove from the event.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListener = function removeListener(evt, listener) {\n var listeners = this.getListenersAsObject(evt);\n var index;\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key)) {\n index = indexOfListener(listeners[key], listener);\n\n if (index !== -1) {\n listeners[key].splice(index, 1);\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of removeListener\n */\n proto.off = alias('removeListener');\n\n /**\n * Adds listeners in bulk using the manipulateListeners method.\n * If you pass an object as the second argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added.\n * You can also pass it a regular expression to add the array of listeners to all events that match it.\n * Yeah, this function does quite a bit. That's probably a bad thing.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListeners = function addListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(false, evt, listeners);\n };\n\n /**\n * Removes listeners in bulk using the manipulateListeners method.\n * If you pass an object as the second argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be removed.\n * You can also pass it a regular expression to remove the listeners from all events that match it.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListeners = function removeListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(true, evt, listeners);\n };\n\n /**\n * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level.\n * The first argument will determine if the listeners are removed (true) or added (false).\n * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be added/removed.\n * You can also pass it a regular expression to manipulate the listeners of all events that match it.\n *\n * @param {Boolean} remove True if you want to remove listeners, false if you want to add.\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add/remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) {\n var i;\n var value;\n var single = remove ? this.removeListener : this.addListener;\n var multiple = remove ? this.removeListeners : this.addListeners;\n\n // If evt is an object then pass each of its properties to this method\n if (typeof evt === 'object' && !(evt instanceof RegExp)) {\n for (i in evt) {\n if (evt.hasOwnProperty(i) && (value = evt[i])) {\n // Pass the single listener straight through to the singular method\n if (typeof value === 'function') {\n single.call(this, i, value);\n }\n else {\n // Otherwise pass back to the multiple function\n multiple.call(this, i, value);\n }\n }\n }\n }\n else {\n // So evt must be a string\n // And listeners must be an array of listeners\n // Loop over it and pass each one to the multiple method\n i = listeners.length;\n while (i--) {\n single.call(this, evt, listeners[i]);\n }\n }\n\n return this;\n };\n\n /**\n * Removes all listeners from a specified event.\n * If you do not specify an event then all listeners will be removed.\n * That means every event will be emptied.\n * You can also pass a regex to remove all events that match it.\n *\n * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeEvent = function removeEvent(evt) {\n var type = typeof evt;\n var events = this._getEvents();\n var key;\n\n // Remove different things depending on the state of evt\n if (type === 'string') {\n // Remove all listeners for the specified event\n delete events[evt];\n }\n else if (evt instanceof RegExp) {\n // Remove all events matching the regex.\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n delete events[key];\n }\n }\n }\n else {\n // Remove all listeners in all events\n delete this._events;\n }\n\n return this;\n };\n\n /**\n * Alias of removeEvent.\n *\n * Added to mirror the node API.\n */\n proto.removeAllListeners = alias('removeEvent');\n\n /**\n * Emits an event of your choice.\n * When emitted, every listener attached to that event will be executed.\n * If you pass the optional argument array then those arguments will be passed to every listener upon execution.\n * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately.\n * So they will not arrive within the array on the other side, they will be separate.\n * You can also pass a regular expression to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {Array} [args] Optional array of arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emitEvent = function emitEvent(evt, args) {\n var listenersMap = this.getListenersAsObject(evt);\n var listeners;\n var listener;\n var i;\n var key;\n var response;\n\n for (key in listenersMap) {\n if (listenersMap.hasOwnProperty(key)) {\n listeners = listenersMap[key].slice(0);\n i = listeners.length;\n\n while (i--) {\n // If the listener returns true then it shall be removed from the event\n // The function is executed either with a basic call or an apply if there is an args array\n listener = listeners[i];\n\n if (listener.once === true) {\n this.removeListener(evt, listener.listener);\n }\n\n response = listener.listener.apply(this, args || []);\n\n if (response === this._getOnceReturnValue()) {\n this.removeListener(evt, listener.listener);\n }\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of emitEvent\n */\n proto.trigger = alias('emitEvent');\n\n /**\n * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on.\n * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {...*} Optional additional arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emit = function emit(evt) {\n var args = Array.prototype.slice.call(arguments, 1);\n return this.emitEvent(evt, args);\n };\n\n /**\n * Sets the current value to check against when executing listeners. If a\n * listeners return value matches the one set here then it will be removed\n * after execution. This value defaults to true.\n *\n * @param {*} value The new value to check for when executing listeners.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.setOnceReturnValue = function setOnceReturnValue(value) {\n this._onceReturnValue = value;\n return this;\n };\n\n /**\n * Fetches the current value to check against when executing listeners. If\n * the listeners return value matches this one then it should be removed\n * automatically. It will return true by default.\n *\n * @return {*|Boolean} The current value to check for or the default, true.\n * @api private\n */\n proto._getOnceReturnValue = function _getOnceReturnValue() {\n if (this.hasOwnProperty('_onceReturnValue')) {\n return this._onceReturnValue;\n }\n else {\n return true;\n }\n };\n\n /**\n * Fetches the events object and creates one if required.\n *\n * @return {Object} The events storage object.\n * @api private\n */\n proto._getEvents = function _getEvents() {\n return this._events || (this._events = {});\n };\n\n /**\n * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version.\n *\n * @return {Function} Non conflicting EventEmitter class.\n */\n EventEmitter.noConflict = function noConflict() {\n exports.EventEmitter = originalGlobalValue;\n return EventEmitter;\n };\n\n // Expose the class either via AMD, CommonJS or the global object\n if (typeof define === 'function' && define.amd) {\n define(function () {\n return EventEmitter;\n });\n }\n else if (typeof module === 'object' && module.exports){\n module.exports = EventEmitter;\n }\n else {\n exports.EventEmitter = EventEmitter;\n }\n}.call(this));\n\n},{}]},{},[1]);\n; })();"]}
1
+ {"version":3,"sources":["script.js"],"names":["require","undefined","define","e","t","n","r","s","o","u","a","i","f","Error","code","l","exports","call","length","1","module","_typeof","Symbol","iterator","obj","constructor","prototype","ready","fn","document","readyState","addEventListener","css","element","styles","background_color","style","background","color","border_color","borderColor","border_width","borderWidth","parseInt","border_style","borderStyle","width","maxWidth","createBoxesFromConfig","isLoggedIn","body","className","indexOf","options","inited","testMode","console","log","Boxzilla","init","boxes","boxOpts","window","location","protocol","host","replace","content","box","create","id","post","slug","firstChild","lastChild","openMailChimpForWordPressBox","trigger","mc4wp_forms_config","submitted_form","selector","element_id","boxId","hasOwnProperty","querySelector","show","boxzilla_options","boxzilla","2","property","initObjectProperties","properties","value","newObject","copyObjectProperties","object","animated","getAttribute","toggle","animation","nowVisible","display","offsetLeft","clone","cloneNode","cleanup","removeAttribute","setAttribute","hiddenStyles","visibleStyles","computedStyles","getComputedStyle","overflowY","animate","opacity","targetStyles","last","Date","initialStyles","currentStyles","propSteps","parseFloat","to","current","duration","tick","step","increment","newValue","now","timeSinceLastTick","done","suffix","requestAnimationFrame","setTimeout","3","merge","obj1","obj2","obj3","attrname","getDocumentHeight","html","documentElement","height","Math","max","scrollHeight","offsetHeight","clientHeight","defaults","rehide","cookie","icon","minimumScreenWidth","position","closable","Animator","Box","config","this","overlay","getElementById","visible","dismissed","triggered","triggerHeight","cookieSet","closeIcon","method","calculateTriggerHeight","isCookieSet","dom","events","dismiss","bind","target","tagName","setCookie","fits","locationHashRefersBox","wrapper","createElement","appendChild","innerHTML","scripts","querySelectorAll","script","createTextNode","text","parentNode","removeChild","setCustomBoxStyling","origDisplay","maxHeight","windowHeight","innerHeight","boxHeight","newTopMargin","marginTop","classList","hide","triggerElement","offset","getBoundingClientRect","top","hash","elementId","substring","innerWidth","mayAutoShow","mayRehide","RegExp","hours","expiryDate","setHours","getHours","toUTCString","shown","preventDefault","_Boxzilla","./animator.js","4","throttle","threshhold","scope","deferTimer","context","args","arguments","clearTimeout","apply","onKeyUp","keyCode","checkPageViewsCriteria","isAnyBoxVisible","forEach","pageViews","checkTimeCriteria","siteTimer","time","pageTimer","checkHeightCriteria","scrollY","scrollElement","scrollTop","recalculateHeights","onOverlayClick","x","offsetX","y","offsetY","rect","margin","left","right","bottom","triggerExitIntent","exitIntentTriggered","onMouseLeave","delay","clientY","exitIntentDelayTimer","onMouseEnter","clearInterval","onElementClick","el","srcElement","toLowerCase","EventEmitter","Object","Timer","timers","start","sessionTime","sessionStorage","getItem","stop","setItem","styleElement","head","setInterval","opts","push","get","./box.js","./styles.js","./timer.js","wolfy87-eventemitter","5","6","interval","7","indexOfListener","listeners","listener","alias","name","proto","originalGlobalValue","getListeners","evt","response","key","_getEvents","test","flattenListeners","flatListeners","getListenersAsObject","Array","addListener","listenerIsWrapped","once","on","addOnceListener","defineEvent","defineEvents","evts","removeListener","index","splice","off","addListeners","manipulateListeners","removeListeners","remove","single","multiple","removeEvent","type","_events","removeAllListeners","emitEvent","listenersMap","slice","_getOnceReturnValue","emit","setOnceReturnValue","_onceReturnValue","noConflict","amd"],"mappings":"CAAA,WAAe,GAAIA,GAAUC,OAAgEC,EAASD,QAAW,QAAUE,GAAEC,EAAEC,EAAEC,GAAG,QAASC,GAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,GAAIE,GAAkB,kBAATV,IAAqBA,CAAQ,KAAIS,GAAGC,EAAE,MAAOA,GAAEF,GAAE,EAAI,IAAGG,EAAE,MAAOA,GAAEH,GAAE,EAAI,IAAII,GAAE,GAAIC,OAAM,uBAAuBL,EAAE,IAAK,MAAMI,GAAEE,KAAK,mBAAmBF,EAAE,GAAIG,GAAEV,EAAEG,IAAIQ,WAAYZ,GAAEI,GAAG,GAAGS,KAAKF,EAAEC,QAAQ,SAASb,GAAG,GAAIE,GAAED,EAAEI,GAAG,GAAGL,EAAG,OAAOI,GAAEF,EAAEA,EAAEF,IAAIY,EAAEA,EAAEC,QAAQb,EAAEC,EAAEC,EAAEC,GAAG,MAAOD,GAAEG,GAAGQ,QAAkD,IAAI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R,EAASiB,QAAS,GAClBxJ,KAAK8J,eAAejB,EAAKN,EAASA,UAGtCO,EAAWP,EAASA,SAAShE,MAAMvE,KAAMoE,OAErC0E,IAAa9I,KAAK+K,uBAClB/K,KAAK8J,eAAejB,EAAKN,EAASA,SAMlD,OAAOvI,OAMX0I,EAAM7N,QAAU2N,EAAM,aAUtBE,EAAMsC,KAAO,SAAcnC,GACvB,GAAIzE,GAAOiF,MAAM1R,UAAUmT,MAAM5T,KAAKmN,UAAW,EACjD,OAAOrE,MAAK4K,UAAU/B,EAAKzE,IAW/BsE,EAAMuC,mBAAqB,SAA4BrP,GAEnD,MADAoE,MAAKkL,iBAAmBtP,EACjBoE,MAWX0I,EAAMqC,oBAAsB,WACxB,OAAI/K,KAAK7E,eAAe,qBACb6E,KAAKkL,kBAapBxC,EAAMM,WAAa,WACf,MAAOhJ,MAAK0K,UAAY1K,KAAK0K,aAQjC7D,EAAasE,WAAa,WAEtB,MADAlU,GAAQ4P,aAAe8B,EAChB9B,GAIW,kBAAX1Q,IAAyBA,EAAOiV,IACvCjV,EAAO,WACH,MAAO0Q,KAGY,gBAAXxP,IAAuBA,EAAOJ,QAC1CI,EAAOJ,QAAU4P,EAGjB5P,EAAQ4P,aAAeA,IAE7B3P,KAAK8I,gBAEI","file":"script.min.js","sourcesContent":["(function () { var require = undefined; var module = undefined; var exports = undefined; var define = undefined; (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){\n'use strict';\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n(function () {\n 'use strict';\n\n var Boxzilla = require('boxzilla');\n var options = window.boxzilla_options;\n\n // expose Boxzilla object to window\n window.Boxzilla = Boxzilla;\n\n function ready(fn) {\n if (document.readyState != 'loading') {\n fn();\n } else {\n document.addEventListener('DOMContentLoaded', fn);\n }\n }\n\n // helper function for setting CSS styles\n function css(element, styles) {\n if (styles.background_color) {\n element.style.background = styles.background_color;\n }\n\n if (styles.color) {\n element.style.color = styles.color;\n }\n\n if (styles.border_color) {\n element.style.borderColor = styles.border_color;\n }\n\n if (styles.border_width) {\n element.style.borderWidth = parseInt(styles.border_width) + \"px\";\n }\n\n if (styles.border_style) {\n element.style.borderStyle = styles.border_style;\n }\n\n if (styles.width) {\n element.style.maxWidth = parseInt(styles.width) + \"px\";\n }\n }\n\n function createBoxesFromConfig() {\n var isLoggedIn = document.body.className.indexOf('logged-in') > -1;\n\n // failsafe against including script twice.\n if (options.inited) {\n return;\n }\n\n // print message when test mode is enabled\n if (isLoggedIn && options.testMode) {\n console.log('Boxzilla: Test mode is enabled. Please disable test mode if you\\'re done testing.');\n }\n\n // init boxzilla\n Boxzilla.init();\n\n // create boxes from options\n for (var i = 0; i < options.boxes.length; i++) {\n // get opts\n var boxOpts = options.boxes[i];\n boxOpts.testMode = isLoggedIn && options.testMode;\n\n // fix http:// links in box content....\n if (window.location.protocol === \"https:\" && window.location.host) {\n var o = \"http://\" + window.location.host;\n var n = o.replace('http://', 'https://');\n boxOpts.content = boxOpts.content.replace(o, n);\n }\n\n // create box\n var box = Boxzilla.create(boxOpts.id, boxOpts);\n\n // add box slug to box element as classname\n box.element.className = box.element.className + ' boxzilla-' + boxOpts.post.slug;\n\n // add custom css to box\n css(box.element, boxOpts.css);\n\n box.element.firstChild.firstChild.className += \" first-child\";\n box.element.firstChild.lastChild.className += \" last-child\";\n }\n\n /**\n * If a MailChimp for WordPress form was submitted, open the box containing that form (if any)\n *\n * TODO: Just set location hash from MailChimp for WP?\n */\n window.addEventListener('load', openMailChimpForWordPressBox);\n\n options.inited = true;\n\n // trigger \"done\" event.\n Boxzilla.trigger('done');\n }\n\n function openMailChimpForWordPressBox() {\n if (_typeof(window.mc4wp_forms_config) === \"object\" && window.mc4wp_forms_config.submitted_form) {\n var selector = '#' + window.mc4wp_forms_config.submitted_form.element_id;\n var boxes = Boxzilla.boxes;\n for (var boxId in boxes) {\n if (!boxes.hasOwnProperty(boxId)) {\n continue;\n }\n var box = boxes[boxId];\n if (box.element.querySelector(selector)) {\n box.show();\n return;\n }\n }\n }\n }\n\n // create boxes as soon as document.ready fires\n ready(createBoxesFromConfig);\n})();\n\n},{\"boxzilla\":4}],2:[function(require,module,exports){\n'use strict';\n\nvar duration = 320;\n\nfunction css(element, styles) {\n for (var property in styles) {\n element.style[property] = styles[property];\n }\n}\n\nfunction initObjectProperties(properties, value) {\n var newObject = {};\n for (var i = 0; i < properties.length; i++) {\n newObject[properties[i]] = value;\n }\n return newObject;\n}\n\nfunction copyObjectProperties(properties, object) {\n var newObject = {};\n for (var i = 0; i < properties.length; i++) {\n newObject[properties[i]] = object[properties[i]];\n }\n return newObject;\n}\n\n/**\n * Checks if the given element is currently being animated.\n *\n * @param element\n * @returns {boolean}\n */\nfunction animated(element) {\n return !!element.getAttribute('data-animated');\n}\n\n/**\n * Toggles the element using the given animation.\n *\n * @param element\n * @param animation Either \"fade\" or \"slide\"\n */\nfunction toggle(element, animation) {\n var nowVisible = element.style.display != 'none' || element.offsetLeft > 0;\n\n // create clone for reference\n var clone = element.cloneNode(true);\n var cleanup = function cleanup() {\n element.removeAttribute('data-animated');\n element.setAttribute('style', clone.getAttribute('style'));\n element.style.display = nowVisible ? 'none' : '';\n };\n\n // store attribute so everyone knows we're animating this element\n element.setAttribute('data-animated', \"true\");\n\n // toggle element visiblity right away if we're making something visible\n if (!nowVisible) {\n element.style.display = '';\n }\n\n var hiddenStyles, visibleStyles;\n\n // animate properties\n if (animation === 'slide') {\n hiddenStyles = initObjectProperties([\"height\", \"borderTopWidth\", \"borderBottomWidth\", \"paddingTop\", \"paddingBottom\"], 0);\n visibleStyles = {};\n\n if (!nowVisible) {\n var computedStyles = window.getComputedStyle(element);\n visibleStyles = copyObjectProperties([\"height\", \"borderTopWidth\", \"borderBottomWidth\", \"paddingTop\", \"paddingBottom\"], computedStyles);\n css(element, hiddenStyles);\n }\n\n // don't show a scrollbar during animation\n element.style.overflowY = 'hidden';\n animate(element, nowVisible ? hiddenStyles : visibleStyles, cleanup);\n } else {\n hiddenStyles = { opacity: 0 };\n visibleStyles = { opacity: 1 };\n if (!nowVisible) {\n css(element, hiddenStyles);\n }\n\n animate(element, nowVisible ? hiddenStyles : visibleStyles, cleanup);\n }\n}\n\nfunction animate(element, targetStyles, fn) {\n var last = +new Date();\n var initialStyles = window.getComputedStyle(element);\n var currentStyles = {};\n var propSteps = {};\n\n for (var property in targetStyles) {\n // make sure we have an object filled with floats\n targetStyles[property] = parseFloat(targetStyles[property]);\n\n // calculate step size & current value\n var to = targetStyles[property];\n var current = parseFloat(initialStyles[property]);\n\n // is there something to do?\n if (current == to) {\n delete targetStyles[property];\n continue;\n }\n\n propSteps[property] = (to - current) / duration; // points per second\n currentStyles[property] = current;\n }\n\n var tick = function tick() {\n var now = +new Date();\n var timeSinceLastTick = now - last;\n var done = true;\n\n var step, to, increment, newValue;\n for (var property in targetStyles) {\n step = propSteps[property];\n to = targetStyles[property];\n increment = step * timeSinceLastTick;\n newValue = currentStyles[property] + increment;\n\n if (step > 0 && newValue >= to || step < 0 && newValue <= to) {\n newValue = to;\n } else {\n done = false;\n }\n\n // store new value\n currentStyles[property] = newValue;\n\n var suffix = property !== \"opacity\" ? \"px\" : \"\";\n element.style[property] = newValue + suffix;\n }\n\n last = +new Date();\n\n // keep going until we're done for all props\n if (!done) {\n window.requestAnimationFrame && requestAnimationFrame(tick) || setTimeout(tick, 32);\n } else {\n // call callback\n fn && fn();\n }\n };\n\n tick();\n}\n\nmodule.exports = {\n 'toggle': toggle,\n 'animate': animate,\n 'animated': animated\n};\n\n},{}],3:[function(require,module,exports){\n'use strict';\n\nvar defaults = {\n 'animation': 'fade',\n 'rehide': false,\n 'content': '',\n 'cookie': null,\n 'icon': '&times',\n 'minimumScreenWidth': 0,\n 'position': 'center',\n 'testMode': false,\n 'trigger': false,\n 'closable': true\n},\n Boxzilla,\n Animator = require('./animator.js');\n\n/**\n * Merge 2 objects, values of the latter overwriting the former.\n *\n * @param obj1\n * @param obj2\n * @returns {*}\n */\nfunction merge(obj1, obj2) {\n var obj3 = {};\n for (var attrname in obj1) {\n obj3[attrname] = obj1[attrname];\n }\n for (var attrname in obj2) {\n obj3[attrname] = obj2[attrname];\n }\n return obj3;\n}\n\n/**\n * Get the real height of entire document.\n * @returns {number}\n */\nfunction getDocumentHeight() {\n var body = document.body,\n html = document.documentElement;\n\n var height = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);\n\n return height;\n}\n\n// Box Object\nvar Box = function Box(id, config) {\n this.id = id;\n\n // store config values\n this.config = merge(defaults, config);\n\n // store ref to overlay\n this.overlay = document.getElementById('boxzilla-overlay');\n\n // state\n this.visible = false;\n this.dismissed = false;\n this.triggered = false;\n this.triggerHeight = 0;\n this.cookieSet = false;\n this.element = null;\n this.closeIcon = null;\n\n // if a trigger was given, calculate values once and store\n if (this.config.trigger) {\n if (this.config.trigger.method === 'percentage' || this.config.trigger.method === 'element') {\n this.triggerHeight = this.calculateTriggerHeight();\n }\n\n this.cookieSet = this.isCookieSet();\n }\n\n // create dom elements for this box\n this.dom();\n\n // further initialise the box\n this.events();\n};\n\n// initialise the box\nBox.prototype.events = function () {\n var box = this;\n\n // attach event to \"close\" icon inside box\n if (this.closeIcon) {\n this.closeIcon.addEventListener('click', this.dismiss.bind(this));\n }\n\n this.element.addEventListener('click', function (e) {\n if (e.target.tagName === 'A') {\n Boxzilla.trigger('box.interactions.link', [box, e.target]);\n }\n }, false);\n\n this.element.addEventListener('submit', function (e) {\n box.setCookie();\n Boxzilla.trigger('box.interactions.form', [box, e.target]);\n }, false);\n\n // maybe show box right away\n if (this.fits() && this.locationHashRefersBox()) {\n window.addEventListener('load', this.show.bind(this));\n }\n};\n\n// generate dom elements for this box\nBox.prototype.dom = function () {\n var wrapper = document.createElement('div');\n wrapper.className = 'boxzilla-container boxzilla-' + this.config.position + '-container';\n\n var box = document.createElement('div');\n box.setAttribute('id', 'boxzilla-' + this.id);\n box.className = 'boxzilla boxzilla-' + this.id + ' boxzilla-' + this.config.position;\n box.style.display = 'none';\n wrapper.appendChild(box);\n\n var content = document.createElement('div');\n content.className = 'boxzilla-content';\n content.innerHTML = this.config.content;\n box.appendChild(content);\n\n // remove <script> from box content and append them to the document body\n var scripts = content.querySelectorAll('script');\n if (scripts.length) {\n var script = document.createElement('script');\n for (var i = 0; i < scripts.length; i++) {\n script.appendChild(document.createTextNode(scripts[i].text));\n scripts[i].parentNode.removeChild(scripts[i]);\n }\n document.body.appendChild(script);\n }\n\n if (this.config.closable && this.config.icon) {\n var closeIcon = document.createElement('span');\n closeIcon.className = \"boxzilla-close-icon\";\n closeIcon.innerHTML = this.config.icon;\n box.appendChild(closeIcon);\n this.closeIcon = closeIcon;\n }\n\n document.body.appendChild(wrapper);\n this.element = box;\n};\n\n// set (calculate) custom box styling depending on box options\nBox.prototype.setCustomBoxStyling = function () {\n\n // reset element to its initial state\n var origDisplay = this.element.style.display;\n this.element.style.display = '';\n this.element.style.overflowY = 'auto';\n this.element.style.maxHeight = 'none';\n\n // get new dimensions\n var windowHeight = window.innerHeight;\n var boxHeight = this.element.clientHeight;\n\n // add scrollbar to box and limit height\n if (boxHeight > windowHeight) {\n this.element.style.maxHeight = windowHeight + \"px\";\n this.element.style.overflowY = 'scroll';\n }\n\n // set new top margin for boxes which are centered\n if (this.config.position === 'center') {\n var newTopMargin = (windowHeight - boxHeight) / 2;\n newTopMargin = newTopMargin >= 0 ? newTopMargin : 0;\n this.element.style.marginTop = newTopMargin + \"px\";\n }\n\n this.element.style.display = origDisplay;\n};\n\n// toggle visibility of the box\nBox.prototype.toggle = function (show) {\n\n // revert visibility if no explicit argument is given\n if (typeof show === \"undefined\") {\n show = !this.visible;\n }\n\n // is box already at desired visibility?\n if (show === this.visible) {\n return false;\n }\n\n // is box being animated?\n if (Animator.animated(this.element)) {\n return false;\n }\n\n // if box should be hidden but is not closable, bail.\n if (!show && !this.config.closable) {\n return false;\n }\n\n // set new visibility status\n this.visible = show;\n\n // calculate new styling rules\n this.setCustomBoxStyling();\n\n // trigger event\n Boxzilla.trigger('box.' + (show ? 'show' : 'hide'), [this]);\n\n // show or hide box using selected animation\n if (this.config.position === 'center') {\n this.overlay.classList.toggle('boxzilla-' + this.id + '-overlay');\n Animator.toggle(this.overlay, \"fade\");\n }\n\n Animator.toggle(this.element, this.config.animation);\n\n return true;\n};\n\n// show the box\nBox.prototype.show = function () {\n return this.toggle(true);\n};\n\n// hide the box\nBox.prototype.hide = function () {\n return this.toggle(false);\n};\n\n// calculate trigger height\nBox.prototype.calculateTriggerHeight = function () {\n var triggerHeight = 0;\n\n if (this.config.trigger.method === 'element') {\n var triggerElement = document.body.querySelector(this.config.trigger.value);\n if (triggerElement) {\n var offset = triggerElement.getBoundingClientRect();\n triggerHeight = offset.top;\n }\n } else if (this.config.trigger.method === 'percentage') {\n triggerHeight = this.config.trigger.value / 100 * getDocumentHeight();\n }\n\n return triggerHeight;\n};\n\n// checks whether window.location.hash equals the box element ID or that of any element inside the box\nBox.prototype.locationHashRefersBox = function () {\n\n if (!window.location.hash || 0 === window.location.hash.length) {\n return false;\n }\n\n var elementId = window.location.hash.substring(1);\n if (elementId === this.element.id) {\n return true;\n } else if (this.element.querySelector('#' + elementId)) {\n return true;\n }\n\n return false;\n};\n\nBox.prototype.fits = function () {\n if (this.config.minimumScreenWidth <= 0) {\n return true;\n }\n\n return window.innerWidth > this.config.minimumScreenWidth;\n};\n\n// is this box enabled?\nBox.prototype.mayAutoShow = function () {\n\n if (this.dismissed) {\n return false;\n }\n\n // check if box fits on given minimum screen width\n if (!this.fits()) {\n return false;\n }\n\n // if trigger empty or error in calculating triggerHeight, return false\n if (!this.config.trigger) {\n return false;\n }\n\n // rely on cookie value (show if not set, don't show if set)\n return !this.cookieSet;\n};\n\nBox.prototype.mayRehide = function () {\n return this.config.rehide && this.triggered;\n};\n\nBox.prototype.isCookieSet = function () {\n // always show on test mode\n if (this.config.testMode) {\n return false;\n }\n\n // if either cookie is null or trigger & dismiss are both falsey, don't bother checking.\n if (!this.config.cookie || !this.config.cookie.triggered && !this.config.cookie.dismissed) {\n return false;\n }\n\n var cookieSet = document.cookie.replace(new RegExp(\"(?:(?:^|.*;)\\\\s*\" + 'boxzilla_box_' + this.id + \"\\\\s*\\\\=\\\\s*([^;]*).*$)|^.*$\"), \"$1\") === \"true\";\n return cookieSet;\n};\n\n// set cookie that disables automatically showing the box\nBox.prototype.setCookie = function (hours) {\n var expiryDate = new Date();\n expiryDate.setHours(expiryDate.getHours() + hours);\n document.cookie = 'boxzilla_box_' + this.id + '=true; expires=' + expiryDate.toUTCString() + '; path=/';\n};\n\nBox.prototype.trigger = function () {\n var shown = this.show();\n if (!shown) {\n return;\n }\n\n this.triggered = true;\n if (this.config.cookie && this.config.cookie.triggered) {\n this.setCookie(this.config.cookie.triggered);\n }\n};\n\n/**\n * Dismisses the box and optionally sets a cookie.\n *\n * @param e The event that triggered this dismissal.\n * @returns {boolean}\n */\nBox.prototype.dismiss = function (e) {\n // prevent default action\n e && e.preventDefault();\n\n // only dismiss box if it's currently open.\n if (!this.visible) {\n return false;\n }\n\n // hide box element\n this.hide();\n\n // set cookie\n if (this.config.cookie && this.config.cookie.dismissed) {\n this.setCookie(this.config.cookie.dismissed);\n }\n\n this.dismissed = true;\n Boxzilla.trigger('box.dismiss', [this]);\n return true;\n};\n\nmodule.exports = function (_Boxzilla) {\n Boxzilla = _Boxzilla;\n return Box;\n};\n\n},{\"./animator.js\":2}],4:[function(require,module,exports){\n'use strict';\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar EventEmitter = require('wolfy87-eventemitter'),\n Boxzilla = Object.create(EventEmitter.prototype),\n Box = require('./box.js')(Boxzilla),\n Timer = require('./timer.js'),\n boxes = [],\n overlay,\n scrollElement = window,\n exitIntentDelayTimer,\n exitIntentTriggered,\n siteTimer,\n pageTimer,\n pageViews;\n\nfunction throttle(fn, threshhold, scope) {\n threshhold || (threshhold = 250);\n var last, deferTimer;\n return function () {\n var context = scope || this;\n\n var now = +new Date(),\n args = arguments;\n if (last && now < last + threshhold) {\n // hold on to it\n clearTimeout(deferTimer);\n deferTimer = setTimeout(function () {\n last = now;\n fn.apply(context, args);\n }, threshhold);\n } else {\n last = now;\n fn.apply(context, args);\n }\n };\n}\n\n// \"keyup\" listener\nfunction onKeyUp(e) {\n if (e.keyCode == 27) {\n Boxzilla.dismiss();\n }\n}\n\n// check \"pageviews\" criteria for each box\nfunction checkPageViewsCriteria() {\n\n // don't bother if another box is currently open\n if (isAnyBoxVisible()) {\n return;\n }\n\n boxes.forEach(function (box) {\n if (!box.mayAutoShow()) {\n return;\n }\n\n if (box.config.trigger.method === 'pageviews' && pageViews >= box.config.trigger.value) {\n box.trigger();\n }\n });\n}\n\n// check time trigger criteria for each box\nfunction checkTimeCriteria() {\n // don't bother if another box is currently open\n if (isAnyBoxVisible()) {\n return;\n }\n\n boxes.forEach(function (box) {\n if (!box.mayAutoShow()) {\n return;\n }\n\n // check \"time on site\" trigger\n if (box.config.trigger.method === 'time_on_site' && siteTimer.time >= box.config.trigger.value) {\n box.trigger();\n }\n\n // check \"time on page\" trigger\n if (box.config.trigger.method === 'time_on_page' && pageTimer.time >= box.config.trigger.value) {\n box.trigger();\n }\n });\n}\n\n// check triggerHeight criteria for all boxes\nfunction checkHeightCriteria() {\n\n var scrollY = scrollElement.hasOwnProperty('scrollY') ? scrollElement.scrollY : scrollElement.scrollTop;\n scrollY = scrollY + window.innerHeight * 0.75;\n\n boxes.forEach(function (box) {\n if (!box.mayAutoShow() || box.triggerHeight <= 0) {\n return;\n }\n\n if (scrollY > box.triggerHeight) {\n // don't bother if another box is currently open\n if (isAnyBoxVisible()) {\n return;\n }\n\n // trigger box\n box.trigger();\n } else if (box.mayRehide()) {\n box.hide();\n }\n });\n}\n\n// recalculate heights and variables based on height\nfunction recalculateHeights() {\n boxes.forEach(function (box) {\n box.setCustomBoxStyling();\n });\n}\n\nfunction onOverlayClick(e) {\n var x = e.offsetX;\n var y = e.offsetY;\n\n // calculate if click was less than 40px outside box to avoid closing it by accident\n boxes.forEach(function (box) {\n var rect = box.element.getBoundingClientRect();\n var margin = 40;\n\n // if click was not anywhere near box, dismiss it.\n if (x < rect.left - margin || x > rect.right + margin || y < rect.top - margin || y > rect.bottom + margin) {\n box.dismiss();\n }\n });\n}\n\nfunction triggerExitIntent() {\n // do nothing if already triggered OR another box is visible.\n if (exitIntentTriggered || isAnyBoxVisible()) {\n return;\n }\n\n boxes.forEach(function (box) {\n if (box.mayAutoShow() && box.config.trigger.method === 'exit_intent') {\n box.trigger();\n }\n });\n\n exitIntentTriggered = true;\n}\n\nfunction onMouseLeave(e) {\n var delay = 400;\n\n // did mouse leave at top of window?\n if (e.clientY <= 0) {\n exitIntentDelayTimer = window.setTimeout(triggerExitIntent, delay);\n }\n}\n\nfunction isAnyBoxVisible() {\n\n for (var i = 0; i < boxes.length; i++) {\n var box = boxes[i];\n\n if (box.visible) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction onMouseEnter() {\n if (exitIntentDelayTimer) {\n window.clearInterval(exitIntentDelayTimer);\n exitIntentDelayTimer = null;\n }\n}\n\nfunction onElementClick(e) {\n var el = e.target || e.srcElement;\n if (el && el.tagName === 'A' && el.getAttribute('href').toLowerCase().indexOf('#boxzilla-') === 0) {\n window.a = el;\n var boxId = e.target.getAttribute('href').toLowerCase().substring(\"#boxzilla-\".length);\n Boxzilla.toggle(boxId);\n }\n}\n\nvar timers = {\n start: function start() {\n try {\n var sessionTime = sessionStorage.getItem('boxzilla_timer');\n if (sessionTime) siteTimer.time = sessionTime;\n } catch (e) {}\n siteTimer.start();\n pageTimer.start();\n },\n stop: function stop() {\n sessionStorage.setItem('boxzilla_timer', siteTimer.time);\n siteTimer.stop();\n pageTimer.stop();\n }\n};\n\n// initialise & add event listeners\nBoxzilla.init = function () {\n document.body.addEventListener('click', onElementClick, false);\n\n try {\n pageViews = sessionStorage.getItem('boxzilla_pageviews') || 0;\n } catch (e) {\n pageViews = 0;\n }\n\n siteTimer = new Timer(0);\n pageTimer = new Timer(0);\n\n // insert styles into DOM\n var styles = require('./styles.js');\n var styleElement = document.createElement('style');\n styleElement.setAttribute(\"type\", \"text/css\");\n styleElement.innerHTML = styles;\n document.head.appendChild(styleElement);\n\n // add overlay element to dom\n overlay = document.createElement('div');\n overlay.style.display = 'none';\n overlay.id = 'boxzilla-overlay';\n document.body.appendChild(overlay);\n\n // event binds\n scrollElement.addEventListener('touchstart', throttle(checkHeightCriteria), true);\n scrollElement.addEventListener('scroll', throttle(checkHeightCriteria), true);\n window.addEventListener('resize', throttle(recalculateHeights));\n window.addEventListener('load', recalculateHeights);\n overlay.addEventListener('click', onOverlayClick);\n window.setInterval(checkTimeCriteria, 1000);\n window.setTimeout(checkPageViewsCriteria, 1000);\n document.documentElement.addEventListener('mouseleave', onMouseLeave);\n document.documentElement.addEventListener('mouseenter', onMouseEnter);\n document.addEventListener('keyup', onKeyUp);\n\n timers.start();\n window.addEventListener('focus', timers.start);\n window.addEventListener('beforeunload', function () {\n timers.stop();\n sessionStorage.setItem('boxzilla_pageviews', ++pageViews);\n });\n window.addEventListener('blur', timers.stop);\n\n Boxzilla.trigger('ready');\n};\n\n/**\n * Create a new Box\n *\n * @param string id\n * @param object opts\n *\n * @returns Box\n */\nBoxzilla.create = function (id, opts) {\n var box = new Box(id, opts);\n boxes.push(box);\n return box;\n};\n\nBoxzilla.get = function (id) {\n for (var i = 0; i < boxes.length; i++) {\n var box = boxes[i];\n if (box.id == id) {\n return box;\n }\n }\n\n throw new Error(\"No box exists with ID \" + id);\n};\n\n// dismiss a single box (or all by omitting id param)\nBoxzilla.dismiss = function (id) {\n // if no id given, dismiss all current open boxes\n if (typeof id === \"undefined\") {\n boxes.forEach(function (box) {\n box.dismiss();\n });\n } else if (_typeof(boxes[id]) === \"object\") {\n Boxzilla.get(id).dismiss();\n }\n};\n\nBoxzilla.hide = function (id) {\n if (typeof id === \"undefined\") {\n boxes.forEach(function (box) {\n box.hide();\n });\n } else {\n Boxzilla.get(id).hide();\n }\n};\n\nBoxzilla.show = function (id) {\n if (typeof id === \"undefined\") {\n boxes.forEach(function (box) {\n box.show();\n });\n } else {\n Boxzilla.get(id).show();\n }\n};\n\nBoxzilla.toggle = function (id) {\n if (typeof id === \"undefined\") {\n boxes.forEach(function (box) {\n box.toggle();\n });\n } else {\n Boxzilla.get(id).toggle();\n }\n};\n\n// expose each individual box.\nBoxzilla.boxes = boxes;\n\n// expose boxzilla object\nwindow.Boxzilla = Boxzilla;\n\nif (typeof module !== 'undefined' && module.exports) {\n module.exports = Boxzilla;\n}\n\n},{\"./box.js\":3,\"./styles.js\":5,\"./timer.js\":6,\"wolfy87-eventemitter\":7}],5:[function(require,module,exports){\n\"use strict\";\n\nvar styles = \"#boxzilla-overlay{position:fixed;background:rgba(0,0,0,.65);width:100%;height:100%;left:0;top:0;z-index:99999}.boxzilla-center-container{position:fixed;top:0;left:0;right:0;height:0;text-align:center;z-index:999999;line-height:0}.boxzilla-center-container .boxzilla{display:inline-block;text-align:left;position:relative;line-height:normal}.boxzilla{position:fixed;z-index:999999;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background:#fff;padding:25px}.boxzilla.boxzilla-top-left{top:0;left:0}.boxzilla.boxzilla-top-right{top:0;right:0}.boxzilla.boxzilla-bottom-left{bottom:0;left:0}.boxzilla.boxzilla-bottom-right{bottom:0;right:0}.boxzilla-content>:first-child{margin-top:0;padding-top:0}.boxzilla-content>:last-child{margin-bottom:0;padding-bottom:0}.boxzilla-close-icon{position:absolute;right:0;top:0;text-align:center;padding:6px;cursor:pointer;-webkit-appearance:none;font-size:28px;font-weight:700;line-height:20px;color:#000;opacity:.5}.boxzilla-close-icon:focus,.boxzilla-close-icon:hover{opacity:.8}\";\nmodule.exports = styles;\n\n},{}],6:[function(require,module,exports){\n'use strict';\n\nvar Timer = function Timer(start) {\n this.time = start;\n this.interval = 0;\n};\n\nTimer.prototype.tick = function () {\n this.time++;\n};\n\nTimer.prototype.start = function () {\n if (!this.interval) {\n this.interval = window.setInterval(this.tick.bind(this), 1000);\n }\n};\n\nTimer.prototype.stop = function () {\n if (this.interval) {\n window.clearInterval(this.interval);\n this.interval = 0;\n }\n};\n\nmodule.exports = Timer;\n\n},{}],7:[function(require,module,exports){\n/*!\n * EventEmitter v4.2.11 - git.io/ee\n * Unlicense - http://unlicense.org/\n * Oliver Caldwell - http://oli.me.uk/\n * @preserve\n */\n\n;(function () {\n 'use strict';\n\n /**\n * Class for managing events.\n * Can be extended to provide event functionality in other classes.\n *\n * @class EventEmitter Manages event registering and emitting.\n */\n function EventEmitter() {}\n\n // Shortcuts to improve speed and size\n var proto = EventEmitter.prototype;\n var exports = this;\n var originalGlobalValue = exports.EventEmitter;\n\n /**\n * Finds the index of the listener for the event in its storage array.\n *\n * @param {Function[]} listeners Array of listeners to search through.\n * @param {Function} listener Method to look for.\n * @return {Number} Index of the specified listener, -1 if not found\n * @api private\n */\n function indexOfListener(listeners, listener) {\n var i = listeners.length;\n while (i--) {\n if (listeners[i].listener === listener) {\n return i;\n }\n }\n\n return -1;\n }\n\n /**\n * Alias a method while keeping the context correct, to allow for overwriting of target method.\n *\n * @param {String} name The name of the target method.\n * @return {Function} The aliased method\n * @api private\n */\n function alias(name) {\n return function aliasClosure() {\n return this[name].apply(this, arguments);\n };\n }\n\n /**\n * Returns the listener array for the specified event.\n * Will initialise the event object and listener arrays if required.\n * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them.\n * Each property in the object response is an array of listener functions.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Function[]|Object} All listener functions for the event.\n */\n proto.getListeners = function getListeners(evt) {\n var events = this._getEvents();\n var response;\n var key;\n\n // Return a concatenated array of all matching events if\n // the selector is a regular expression.\n if (evt instanceof RegExp) {\n response = {};\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n response[key] = events[key];\n }\n }\n }\n else {\n response = events[evt] || (events[evt] = []);\n }\n\n return response;\n };\n\n /**\n * Takes a list of listener objects and flattens it into a list of listener functions.\n *\n * @param {Object[]} listeners Raw listener objects.\n * @return {Function[]} Just the listener functions.\n */\n proto.flattenListeners = function flattenListeners(listeners) {\n var flatListeners = [];\n var i;\n\n for (i = 0; i < listeners.length; i += 1) {\n flatListeners.push(listeners[i].listener);\n }\n\n return flatListeners;\n };\n\n /**\n * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Object} All listener functions for an event in an object.\n */\n proto.getListenersAsObject = function getListenersAsObject(evt) {\n var listeners = this.getListeners(evt);\n var response;\n\n if (listeners instanceof Array) {\n response = {};\n response[evt] = listeners;\n }\n\n return response || listeners;\n };\n\n /**\n * Adds a listener function to the specified event.\n * The listener will not be added if it is a duplicate.\n * If the listener returns true then it will be removed after it is called.\n * If you pass a regular expression as the event name then the listener will be added to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListener = function addListener(evt, listener) {\n var listeners = this.getListenersAsObject(evt);\n var listenerIsWrapped = typeof listener === 'object';\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) {\n listeners[key].push(listenerIsWrapped ? listener : {\n listener: listener,\n once: false\n });\n }\n }\n\n return this;\n };\n\n /**\n * Alias of addListener\n */\n proto.on = alias('addListener');\n\n /**\n * Semi-alias of addListener. It will add a listener that will be\n * automatically removed after its first execution.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addOnceListener = function addOnceListener(evt, listener) {\n return this.addListener(evt, {\n listener: listener,\n once: true\n });\n };\n\n /**\n * Alias of addOnceListener.\n */\n proto.once = alias('addOnceListener');\n\n /**\n * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad.\n * You need to tell it what event names should be matched by a regex.\n *\n * @param {String} evt Name of the event to create.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvent = function defineEvent(evt) {\n this.getListeners(evt);\n return this;\n };\n\n /**\n * Uses defineEvent to define multiple events.\n *\n * @param {String[]} evts An array of event names to define.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvents = function defineEvents(evts) {\n for (var i = 0; i < evts.length; i += 1) {\n this.defineEvent(evts[i]);\n }\n return this;\n };\n\n /**\n * Removes a listener function from the specified event.\n * When passed a regular expression as the event name, it will remove the listener from all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to remove the listener from.\n * @param {Function} listener Method to remove from the event.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListener = function removeListener(evt, listener) {\n var listeners = this.getListenersAsObject(evt);\n var index;\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key)) {\n index = indexOfListener(listeners[key], listener);\n\n if (index !== -1) {\n listeners[key].splice(index, 1);\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of removeListener\n */\n proto.off = alias('removeListener');\n\n /**\n * Adds listeners in bulk using the manipulateListeners method.\n * If you pass an object as the second argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added.\n * You can also pass it a regular expression to add the array of listeners to all events that match it.\n * Yeah, this function does quite a bit. That's probably a bad thing.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListeners = function addListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(false, evt, listeners);\n };\n\n /**\n * Removes listeners in bulk using the manipulateListeners method.\n * If you pass an object as the second argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be removed.\n * You can also pass it a regular expression to remove the listeners from all events that match it.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListeners = function removeListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(true, evt, listeners);\n };\n\n /**\n * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level.\n * The first argument will determine if the listeners are removed (true) or added (false).\n * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be added/removed.\n * You can also pass it a regular expression to manipulate the listeners of all events that match it.\n *\n * @param {Boolean} remove True if you want to remove listeners, false if you want to add.\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add/remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) {\n var i;\n var value;\n var single = remove ? this.removeListener : this.addListener;\n var multiple = remove ? this.removeListeners : this.addListeners;\n\n // If evt is an object then pass each of its properties to this method\n if (typeof evt === 'object' && !(evt instanceof RegExp)) {\n for (i in evt) {\n if (evt.hasOwnProperty(i) && (value = evt[i])) {\n // Pass the single listener straight through to the singular method\n if (typeof value === 'function') {\n single.call(this, i, value);\n }\n else {\n // Otherwise pass back to the multiple function\n multiple.call(this, i, value);\n }\n }\n }\n }\n else {\n // So evt must be a string\n // And listeners must be an array of listeners\n // Loop over it and pass each one to the multiple method\n i = listeners.length;\n while (i--) {\n single.call(this, evt, listeners[i]);\n }\n }\n\n return this;\n };\n\n /**\n * Removes all listeners from a specified event.\n * If you do not specify an event then all listeners will be removed.\n * That means every event will be emptied.\n * You can also pass a regex to remove all events that match it.\n *\n * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeEvent = function removeEvent(evt) {\n var type = typeof evt;\n var events = this._getEvents();\n var key;\n\n // Remove different things depending on the state of evt\n if (type === 'string') {\n // Remove all listeners for the specified event\n delete events[evt];\n }\n else if (evt instanceof RegExp) {\n // Remove all events matching the regex.\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n delete events[key];\n }\n }\n }\n else {\n // Remove all listeners in all events\n delete this._events;\n }\n\n return this;\n };\n\n /**\n * Alias of removeEvent.\n *\n * Added to mirror the node API.\n */\n proto.removeAllListeners = alias('removeEvent');\n\n /**\n * Emits an event of your choice.\n * When emitted, every listener attached to that event will be executed.\n * If you pass the optional argument array then those arguments will be passed to every listener upon execution.\n * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately.\n * So they will not arrive within the array on the other side, they will be separate.\n * You can also pass a regular expression to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {Array} [args] Optional array of arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emitEvent = function emitEvent(evt, args) {\n var listenersMap = this.getListenersAsObject(evt);\n var listeners;\n var listener;\n var i;\n var key;\n var response;\n\n for (key in listenersMap) {\n if (listenersMap.hasOwnProperty(key)) {\n listeners = listenersMap[key].slice(0);\n i = listeners.length;\n\n while (i--) {\n // If the listener returns true then it shall be removed from the event\n // The function is executed either with a basic call or an apply if there is an args array\n listener = listeners[i];\n\n if (listener.once === true) {\n this.removeListener(evt, listener.listener);\n }\n\n response = listener.listener.apply(this, args || []);\n\n if (response === this._getOnceReturnValue()) {\n this.removeListener(evt, listener.listener);\n }\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of emitEvent\n */\n proto.trigger = alias('emitEvent');\n\n /**\n * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on.\n * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {...*} Optional additional arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emit = function emit(evt) {\n var args = Array.prototype.slice.call(arguments, 1);\n return this.emitEvent(evt, args);\n };\n\n /**\n * Sets the current value to check against when executing listeners. If a\n * listeners return value matches the one set here then it will be removed\n * after execution. This value defaults to true.\n *\n * @param {*} value The new value to check for when executing listeners.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.setOnceReturnValue = function setOnceReturnValue(value) {\n this._onceReturnValue = value;\n return this;\n };\n\n /**\n * Fetches the current value to check against when executing listeners. If\n * the listeners return value matches this one then it should be removed\n * automatically. It will return true by default.\n *\n * @return {*|Boolean} The current value to check for or the default, true.\n * @api private\n */\n proto._getOnceReturnValue = function _getOnceReturnValue() {\n if (this.hasOwnProperty('_onceReturnValue')) {\n return this._onceReturnValue;\n }\n else {\n return true;\n }\n };\n\n /**\n * Fetches the events object and creates one if required.\n *\n * @return {Object} The events storage object.\n * @api private\n */\n proto._getEvents = function _getEvents() {\n return this._events || (this._events = {});\n };\n\n /**\n * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version.\n *\n * @return {Function} Non conflicting EventEmitter class.\n */\n EventEmitter.noConflict = function noConflict() {\n exports.EventEmitter = originalGlobalValue;\n return EventEmitter;\n };\n\n // Expose the class either via AMD, CommonJS or the global object\n if (typeof define === 'function' && define.amd) {\n define(function () {\n return EventEmitter;\n });\n }\n else if (typeof module === 'object' && module.exports){\n module.exports = EventEmitter;\n }\n else {\n exports.EventEmitter = EventEmitter;\n }\n}.call(this));\n\n},{}]},{},[1]);\n; })();"]}
boxzilla.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  Plugin Name: Boxzilla
4
- Version: 3.1.8
5
  Plugin URI: https://boxzillaplugin.com/#utm_source=wp-plugin&utm_medium=boxzilla&utm_campaign=plugins-page
6
  Description: Call-To-Action Boxes that display after visitors scroll down far enough. Unobtrusive, but highly conversing!
7
  Author: ibericode
@@ -38,10 +38,10 @@ if ( ! defined( 'ABSPATH' ) ) {
38
  * @ignore
39
  * @internal
40
  */
41
- function __load_boxzilla() {
42
 
43
  define( 'BOXZILLA_FILE', __FILE__ );
44
- define( 'BOXZILLA_VERSION', '3.1.8' );
45
 
46
  require __DIR__ . '/bootstrap.php';
47
  }
@@ -62,7 +62,7 @@ if( ! function_exists( 'boxzilla' ) ) {
62
  register_activation_hook( __FILE__, array( 'Boxzilla\\Admin\\Installer', 'run' ) );
63
 
64
  // hook into plugins_loaded for boostrapping
65
- add_action( 'plugins_loaded', '__load_boxzilla', 8 );
66
 
67
 
68
 
1
  <?php
2
  /*
3
  Plugin Name: Boxzilla
4
+ Version: 3.1.10
5
  Plugin URI: https://boxzillaplugin.com/#utm_source=wp-plugin&utm_medium=boxzilla&utm_campaign=plugins-page
6
  Description: Call-To-Action Boxes that display after visitors scroll down far enough. Unobtrusive, but highly conversing!
7
  Author: ibericode
38
  * @ignore
39
  * @internal
40
  */
41
+ function _load_boxzilla() {
42
 
43
  define( 'BOXZILLA_FILE', __FILE__ );
44
+ define( 'BOXZILLA_VERSION', '3.1.10' );
45
 
46
  require __DIR__ . '/bootstrap.php';
47
  }
62
  register_activation_hook( __FILE__, array( 'Boxzilla\\Admin\\Installer', 'run' ) );
63
 
64
  // hook into plugins_loaded for boostrapping
65
+ add_action( 'plugins_loaded', '_load_boxzilla', 8 );
66
 
67
 
68
 
languages/boxzilla-ro_RO.mo ADDED
Binary file
languages/boxzilla-ro_RO.po ADDED
@@ -0,0 +1,468 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2016 boxzilla
2
+ # This file is distributed under the same license as the boxzilla package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: boxzilla\n"
6
+ "MIME-Version: 1.0\n"
7
+ "Content-Type: text/plain; charset=UTF-8\n"
8
+ "Content-Transfer-Encoding: 8bit\n"
9
+ "PO-Revision-Date: 2017-02-22 19:48+0200\n"
10
+ "X-Poedit-Basepath: ..\n"
11
+ "X-Poedit-SourceCharset: UTF-8\n"
12
+ "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
13
+ "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
14
+ "_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
15
+ "Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?"
16
+ "2:1));\n"
17
+ "POT-Creation-Date: \n"
18
+ "Language-Team: \n"
19
+ "X-Generator: Poedit 1.8.12\n"
20
+ "Last-Translator: \n"
21
+ "Language: ro\n"
22
+ "X-Poedit-SearchPath-0: .\n"
23
+ "X-Poedit-SearchPathExcluded-0: *.js\n"
24
+
25
+ #: src/admin/class-admin.php:207
26
+ msgid ""
27
+ "Awesome, you are using Boxzilla! You can now safely <a href=\"%s"
28
+ "\">deactivate the Scroll Triggered Boxes plugin</a>."
29
+ msgstr ""
30
+ "Super, folosești Boxzilla! Acum poți <a href=\"%s\">dezactiva în siguranță "
31
+ "modulul Scroll Triggered Boxes</a>."
32
+
33
+ #: src/admin/class-admin.php:341
34
+ msgid "Box ID"
35
+ msgstr "ID Casetă"
36
+
37
+ #: src/admin/class-admin.php:347
38
+ msgid "Box Title"
39
+ msgstr "Titlu Casetă"
40
+
41
+ #: src/admin/class-admin.php:415, src/admin/class-admin.php:417,
42
+ #: src/admin/views/settings.php:7
43
+ msgid "Settings"
44
+ msgstr "Setări"
45
+
46
+ #: src/admin/class-admin.php:427, src/admin/class-admin.php:429
47
+ msgid "Extensions"
48
+ msgstr "Extensii"
49
+
50
+ #: src/admin/class-admin.php:615
51
+ msgid "Enter a comma-separated list of values."
52
+ msgstr "Introdu o listă de valori separate prin virgule."
53
+
54
+ #: src/admin/class-admin.php:617
55
+ msgid "Enter a comma-separated list of post slugs or post ID's.."
56
+ msgstr ""
57
+ "Introdu o listă de post slugs sau ID-uri ale postărilor separate prin "
58
+ "virgule.."
59
+
60
+ #: src/admin/class-admin.php:619
61
+ msgid "Enter a comma-separated list of page slugs or page ID's.."
62
+ msgstr ""
63
+ "Introdu o listă de page slugs sau ID-uri ale paginilior separate prin "
64
+ "virgule.."
65
+
66
+ #: src/admin/class-admin.php:621
67
+ msgid "Enter a comma-separated list of post types.."
68
+ msgstr "Introdu o listă de tipuri de postări separate prin virgule.."
69
+
70
+ #: src/admin/class-admin.php:623
71
+ msgid "Enter a comma-separated list of relative URL's, eg /contact/"
72
+ msgstr ""
73
+ "Introdu o listă de link-uri relative, cum ar fi /contact/ separate prin "
74
+ "virgule."
75
+
76
+ #: src/admin/class-admin.php:689
77
+ msgid "Box Appearance"
78
+ msgstr "Aspect casetă"
79
+
80
+ #: src/admin/class-admin.php:707
81
+ msgid "Box Options"
82
+ msgstr "Opțiuni casetă"
83
+
84
+ #: src/admin/class-admin.php:725
85
+ msgid "Looking for help?"
86
+ msgstr "Cauți ajutor?"
87
+
88
+ #: src/admin/class-admin.php:741
89
+ msgid "Subscribe to our newsletter"
90
+ msgstr "Abonează-te la noutăți"
91
+
92
+ #: src/admin/class-review-notice.php:74
93
+ msgid "You've been using Boxzilla for some time now; we hope you love it!"
94
+ msgstr "Folosești Boxzilla de ceva timp; sperăm că îți place!"
95
+
96
+ #: src/admin/class-review-notice.php:75
97
+ msgid ""
98
+ "If you do, please <a href=\"%s\">leave us a 5★ rating on WordPress.org</a>. "
99
+ "It would be of great help to us."
100
+ msgstr ""
101
+ "Dacă da, te rugăm <a href=\"%s\">lasă-ne 5★ pe WordPress.org</a>. Ne-ar fi "
102
+ "de mare ajutor."
103
+
104
+ #: src/admin/class-review-notice.php:77
105
+ msgid "Dismiss this notice."
106
+ msgstr "Înlătură această notificare."
107
+
108
+ #: src/admin/views/extensions.php:4
109
+ msgid "Available Add-On Plugins"
110
+ msgstr "Module Add-On disponibile"
111
+
112
+ #: src/admin/views/extensions.php:6
113
+ msgid ""
114
+ "There are various add-ons available for Boxzilla which further enhance the "
115
+ "functionality of the core plugin."
116
+ msgstr ""
117
+ "Sunt disponibile diferite add-on-uri disponibile pentru Boxzilla care vor "
118
+ "îmbunătăți funcționalitatea modulului de bază."
119
+
120
+ #: src/admin/views/extensions.php:9
121
+ msgid ""
122
+ "To gain instant access the premium add-on plugins listed here, <a href=\"%s"
123
+ "\">have a look at our pricing</a>."
124
+ msgstr ""
125
+ "Pentru a primi acces instant la lista de module add-on premium listate aici, "
126
+ "<a href=\"%s\">uită-te la prețurile noastre</a>."
127
+
128
+ #: src/admin/views/extensions.php:18
129
+ msgid "You will be redirected to the Boxzilla site in a few seconds.."
130
+ msgstr "Vei fi redirecționat la site-ul Boxzilla în câteva secunde.."
131
+
132
+ #: src/admin/views/extensions.php:19
133
+ msgid "If not, please click here: %s."
134
+ msgstr "Dacă nu, te rugam dă click aici: %s."
135
+
136
+ #: src/admin/views/metaboxes/box-appearance-controls.php:2
137
+ msgid ""
138
+ "For the best experience when styling your box, please use the default "
139
+ "WordPress visual editor."
140
+ msgstr ""
141
+ "Pentru cea mai bună experiență când iți stilizezi caseta, te rugăm folosește "
142
+ "editorul vizual implicit al WordPress."
143
+
144
+ #: src/admin/views/metaboxes/box-appearance-controls.php:8
145
+ msgid "Background color"
146
+ msgstr "Culoare de fundal"
147
+
148
+ #: src/admin/views/metaboxes/box-appearance-controls.php:12
149
+ msgid "Text color"
150
+ msgstr "Culoare text"
151
+
152
+ #: src/admin/views/metaboxes/box-appearance-controls.php:16
153
+ msgid "Box width"
154
+ msgstr "Lățime casetă"
155
+
156
+ #: src/admin/views/metaboxes/box-appearance-controls.php:18,
157
+ #: src/admin/views/metaboxes/box-appearance-controls.php:29
158
+ msgid "Width in px"
159
+ msgstr "Lățime în px"
160
+
161
+ #: src/admin/views/metaboxes/box-appearance-controls.php:23
162
+ msgid "Border color"
163
+ msgstr "Culoare bordură"
164
+
165
+ #: src/admin/views/metaboxes/box-appearance-controls.php:27
166
+ msgid "Border width"
167
+ msgstr "Lățime bordură"
168
+
169
+ #: src/admin/views/metaboxes/box-appearance-controls.php:32,
170
+ #: src/admin/views/metaboxes/box-appearance-controls.php:40
171
+ msgid "Border style"
172
+ msgstr "Stil bordură"
173
+
174
+ #: src/admin/views/metaboxes/box-appearance-controls.php:46
175
+ msgid "<a href=\"%s\">Click here to reset all styling settings</a>."
176
+ msgstr ""
177
+ "<a href=\"%s\">Apasă aici pentru a reseta toate setările de stilizare</a>."
178
+
179
+ #: src/admin/views/metaboxes/box-option-controls.php:21
180
+ msgid "Select a condition"
181
+ msgstr "Alege o condiție"
182
+
183
+ #: src/admin/views/metaboxes/box-option-controls.php:23
184
+ msgid "everywhere"
185
+ msgstr "peste tot"
186
+
187
+ #: src/admin/views/metaboxes/box-option-controls.php:25
188
+ msgid "if page"
189
+ msgstr "dacă pagina"
190
+
191
+ #: src/admin/views/metaboxes/box-option-controls.php:27
192
+ msgid "if post"
193
+ msgstr "dacă postarea"
194
+
195
+ #: src/admin/views/metaboxes/box-option-controls.php:29
196
+ msgid "if post tag"
197
+ msgstr "dacă eticheta postării"
198
+
199
+ #: src/admin/views/metaboxes/box-option-controls.php:31
200
+ msgid "if post category"
201
+ msgstr "dacă categoria postării"
202
+
203
+ #: src/admin/views/metaboxes/box-option-controls.php:33
204
+ msgid "if post type"
205
+ msgstr "dacă tipul postării"
206
+
207
+ #: src/admin/views/metaboxes/box-option-controls.php:35
208
+ msgid "if URL"
209
+ msgstr "dacă URL-ul"
210
+
211
+ #: src/admin/views/metaboxes/box-option-controls.php:37
212
+ msgid "if referer"
213
+ msgstr "dacă referer-ul"
214
+
215
+ #: src/admin/views/metaboxes/box-option-controls.php:75
216
+ msgid "Load this box if"
217
+ msgstr "Încarcă această casetă dacă"
218
+
219
+ #: src/admin/views/metaboxes/box-option-controls.php:81
220
+ msgid "Request matches"
221
+ msgstr "Necesită potriviri"
222
+
223
+ #: src/admin/views/metaboxes/box-option-controls.php:85
224
+ msgid "any"
225
+ msgstr "oricare"
226
+
227
+ #: src/admin/views/metaboxes/box-option-controls.php:87
228
+ msgid "all"
229
+ msgstr "toate"
230
+
231
+ #: src/admin/views/metaboxes/box-option-controls.php:91
232
+ msgid "of the following conditions."
233
+ msgstr "dintre următoarele condiții"
234
+
235
+ #: src/admin/views/metaboxes/box-option-controls.php:133,
236
+ #: src/admin/views/metaboxes/box-option-controls.php:421
237
+ msgid "is"
238
+ msgstr "este"
239
+
240
+ #: src/admin/views/metaboxes/box-option-controls.php:135,
241
+ #: src/admin/views/metaboxes/box-option-controls.php:423
242
+ msgid "is not"
243
+ msgstr "nu este"
244
+
245
+ #: src/admin/views/metaboxes/box-option-controls.php:141,
246
+ #: src/admin/views/metaboxes/box-option-controls.php:429
247
+ msgid "Leave empty for any or enter (comma-separated) names or ID's"
248
+ msgstr ""
249
+ "Lăsați gol pentru oricare sau introdu (separate prin virgule) nume sau ID-uri"
250
+
251
+ #: src/admin/views/metaboxes/box-option-controls.php:157
252
+ msgid "Add rule"
253
+ msgstr "Adaugă regulă"
254
+
255
+ #: src/admin/views/metaboxes/box-option-controls.php:163
256
+ msgid "Box Position"
257
+ msgstr "Poziția casetei"
258
+
259
+ #: src/admin/views/metaboxes/box-option-controls.php:175
260
+ msgid "Top Left"
261
+ msgstr "Stânga sus"
262
+
263
+ #: src/admin/views/metaboxes/box-option-controls.php:189
264
+ msgid "Top Right"
265
+ msgstr "Dreapta sus"
266
+
267
+ #: src/admin/views/metaboxes/box-option-controls.php:207
268
+ msgid "Center"
269
+ msgstr "Centru"
270
+
271
+ #: src/admin/views/metaboxes/box-option-controls.php:225
272
+ msgid "Bottom Left"
273
+ msgstr "Stânga jos"
274
+
275
+ #: src/admin/views/metaboxes/box-option-controls.php:239
276
+ msgid "Bottom Right"
277
+ msgstr "Dreapta jos"
278
+
279
+ #: src/admin/views/metaboxes/box-option-controls.php:257
280
+ msgid "Animation"
281
+ msgstr "Animatie"
282
+
283
+ #: src/admin/views/metaboxes/box-option-controls.php:261
284
+ msgid "Fade In"
285
+ msgstr "Decolorare"
286
+
287
+ #: src/admin/views/metaboxes/box-option-controls.php:263
288
+ msgid "Slide In"
289
+ msgstr "Glisare"
290
+
291
+ #: src/admin/views/metaboxes/box-option-controls.php:265
292
+ msgid "Which animation type should be used to show the box when triggered?"
293
+ msgstr "Cu ce animație ar trebui să apară caseta când este activată?"
294
+
295
+ #: src/admin/views/metaboxes/box-option-controls.php:273
296
+ msgid "Auto-show box?"
297
+ msgstr "Arată automat caseta?"
298
+
299
+ #: src/admin/views/metaboxes/box-option-controls.php:277
300
+ msgid "Never"
301
+ msgstr "Niciodată."
302
+
303
+ #: src/admin/views/metaboxes/box-option-controls.php:279
304
+ msgid "Yes, after %s seconds on the page."
305
+ msgstr "Da, după %s secunde pe pagină."
306
+
307
+ #: src/admin/views/metaboxes/box-option-controls.php:281
308
+ msgid "Yes, when at %s of page height"
309
+ msgstr "Da, când este la %s din înălțimea paginii"
310
+
311
+ #: src/admin/views/metaboxes/box-option-controls.php:283
312
+ msgid "Yes, when at element %s"
313
+ msgstr "Da, când este la elementul %s"
314
+
315
+ #: src/admin/views/metaboxes/box-option-controls.php:283
316
+ msgid "Example: #comments"
317
+ msgstr "Exemplu: #comments"
318
+
319
+ #: src/admin/views/metaboxes/box-option-controls.php:295
320
+ msgid "Cookie expiration"
321
+ msgstr "Expirare cookie"
322
+
323
+ #: src/admin/views/metaboxes/box-option-controls.php:305,
324
+ #: src/admin/views/metaboxes/box-option-controls.php:315
325
+ msgid "hours"
326
+ msgstr "ore"
327
+
328
+ #: src/admin/views/metaboxes/box-option-controls.php:323
329
+ msgid ""
330
+ "After this box is triggered or dismissed, how many hours should it stay "
331
+ "hidden?"
332
+ msgstr ""
333
+ "După ce caseta este activată sau înlăturată, câte ore trebuie să fie ascunsă?"
334
+
335
+ #: src/admin/views/metaboxes/box-option-controls.php:331
336
+ msgid "Do not auto-show box on small screens?"
337
+ msgstr "Nu arăta automat casetele pe ecranele mici?"
338
+
339
+ #: src/admin/views/metaboxes/box-option-controls.php:335
340
+ msgid "Do not auto-show on screens smaller than %s."
341
+ msgstr "Nu arăta automat pe ecrane mai mici de %s."
342
+
343
+ #: src/admin/views/metaboxes/box-option-controls.php:337
344
+ msgid ""
345
+ "Leave empty if you <strong>do</strong> want to auto-show the box on small "
346
+ "screens."
347
+ msgstr ""
348
+ "Lasă gol dacă <strong>vrei</strong>să apară automat caseta pe ecranele mici."
349
+
350
+ #: src/admin/views/metaboxes/box-option-controls.php:347
351
+ msgid "Auto-hide?"
352
+ msgstr "Ascunde automat?"
353
+
354
+ #: src/admin/views/metaboxes/box-option-controls.php:355
355
+ msgid "Hide box again when visitors scroll back up?"
356
+ msgstr "Ascunde caseta când utilizatorii derulează sus?"
357
+
358
+ #: src/admin/views/metaboxes/box-option-controls.php:363,
359
+ #: src/admin/views/settings.php:20
360
+ msgid "Enable test mode?"
361
+ msgstr "Activează modul de test?"
362
+
363
+ #: src/admin/views/metaboxes/box-option-controls.php:371,
364
+ #: src/admin/views/settings.php:24
365
+ msgid ""
366
+ "If test mode is enabled, all boxes will show up regardless of whether a "
367
+ "cookie has been set."
368
+ msgstr ""
369
+ "Dacă modul de test este activat, toate castele vor apărea chiar dacă un "
370
+ "fișier cookie a fost setat."
371
+
372
+ #: src/admin/views/metaboxes/need-help.php:2
373
+ msgid "Please make sure to look at the following available resources."
374
+ msgstr "Te rugăm să te uiți la următoarele resurse disponibile."
375
+
376
+ #: src/default-actions.php:12, src/default-actions.php:24
377
+ msgid "Boxzilla"
378
+ msgstr "Boxzilla"
379
+
380
+ #: src/default-actions.php:13
381
+ msgid "Box"
382
+ msgstr "Casetă"
383
+
384
+ #: src/default-actions.php:14
385
+ msgid "Add New"
386
+ msgstr "Adaugă"
387
+
388
+ #: src/default-actions.php:15
389
+ msgid "Add New Box"
390
+ msgstr "Adaugă o casetă noua"
391
+
392
+ #: src/default-actions.php:16
393
+ msgid "Edit Box"
394
+ msgstr "Editează o casetă"
395
+
396
+ #: src/default-actions.php:17
397
+ msgid "New Box"
398
+ msgstr "Casetă nouă"
399
+
400
+ #: src/default-actions.php:18
401
+ msgid "All Boxes"
402
+ msgstr "Toate casetele"
403
+
404
+ #: src/default-actions.php:19
405
+ msgid "View Box"
406
+ msgstr "Vezi caseta"
407
+
408
+ #: src/default-actions.php:20
409
+ msgid "Search Boxes"
410
+ msgstr "Caută casete"
411
+
412
+ #: src/default-actions.php:21
413
+ msgid "No Boxes found"
414
+ msgstr "Nicio casetă găsită"
415
+
416
+ #: src/default-actions.php:22
417
+ msgid "No Boxes found in Trash"
418
+ msgstr "Nicio casetă găsită la gunoi"
419
+
420
+ #: src/licensing/class-api.php:162
421
+ msgid "The Boxzilla server returned an invalid response."
422
+ msgstr "Serverul Boxzilla a întors un răspuns invalid."
423
+
424
+ #: src/licensing/views/license-form.php:8
425
+ msgid "License & Plugin Updates"
426
+ msgstr "Licență & actualizări modul."
427
+
428
+ #: src/licensing/views/license-form.php:13
429
+ msgid ""
430
+ "Warning! You are <u>not</u> receiving plugin updates for the following "
431
+ "plugin(s):"
432
+ msgstr "Atenție! <u>Nu</u> primești actualizări pentru următoarele module:"
433
+
434
+ #: src/licensing/views/license-form.php:27
435
+ msgid "License Key"
436
+ msgstr "Licență"
437
+
438
+ #: src/licensing/views/license-form.php:29
439
+ msgid "Enter your license key.."
440
+ msgstr "Introdu codul.."
441
+
442
+ #: src/licensing/views/license-form.php:32
443
+ msgid ""
444
+ "The license key received when purchasing your premium Boxzilla plan. <a href="
445
+ "\"%s\">You can find it here</a>."
446
+ msgstr ""
447
+ "Licența este primită când achiziționezi varianta premium a BoxZilla. <a href="
448
+ "\"%s\">Îl poți găsi aici</a>."
449
+
450
+ #: src/licensing/views/license-form.php:37
451
+ msgid "License Status"
452
+ msgstr "Status licență"
453
+
454
+ #: src/licensing/views/license-form.php:41
455
+ msgid "ACTIVE"
456
+ msgstr "ACTIVĂ"
457
+
458
+ #: src/licensing/views/license-form.php:41
459
+ msgid "you are receiving plugin updates"
460
+ msgstr "primești actualizări"
461
+
462
+ #: src/licensing/views/license-form.php:43
463
+ msgid "INACTIVE"
464
+ msgstr "INACTIVĂ"
465
+
466
+ #: src/licensing/views/license-form.php:43
467
+ msgid "you are <strong>not</strong> receiving plugin updates"
468
+ msgstr "<strong>nu</strong> primești acutalizări"
languages/boxzilla.pot CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2016 boxzilla
2
  # This file is distributed under the same license as the boxzilla package.
3
  msgid ""
4
  msgstr ""
@@ -6,7 +6,7 @@ msgstr ""
6
  "MIME-Version: 1.0\n"
7
  "Content-Type: text/plain; charset=UTF-8\n"
8
  "Content-Transfer-Encoding: 8bit\n"
9
- "PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n"
10
  "X-Poedit-Basepath: ..\n"
11
  "X-Poedit-SourceCharset: UTF-8\n"
12
  "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
@@ -139,178 +139,178 @@ msgid "<a href=\"%s\">Click here to reset all styling settings</a>."
139
  msgstr ""
140
 
141
  #: src/admin/views/metaboxes/box-option-controls.php:21
142
- msgid "Select a condition"
143
- msgstr ""
144
-
145
- #: src/admin/views/metaboxes/box-option-controls.php:23
146
  msgid "everywhere"
147
  msgstr ""
148
 
149
- #: src/admin/views/metaboxes/box-option-controls.php:25
150
  msgid "if page"
151
  msgstr ""
152
 
153
- #: src/admin/views/metaboxes/box-option-controls.php:27
154
  msgid "if post"
155
  msgstr ""
156
 
157
- #: src/admin/views/metaboxes/box-option-controls.php:29
158
  msgid "if post tag"
159
  msgstr ""
160
 
161
- #: src/admin/views/metaboxes/box-option-controls.php:31
162
  msgid "if post category"
163
  msgstr ""
164
 
165
- #: src/admin/views/metaboxes/box-option-controls.php:33
166
  msgid "if post type"
167
  msgstr ""
168
 
169
- #: src/admin/views/metaboxes/box-option-controls.php:35
170
  msgid "if URL"
171
  msgstr ""
172
 
173
- #: src/admin/views/metaboxes/box-option-controls.php:37
174
  msgid "if referer"
175
  msgstr ""
176
 
177
- #: src/admin/views/metaboxes/box-option-controls.php:75
178
  msgid "Load this box if"
179
  msgstr ""
180
 
181
- #: src/admin/views/metaboxes/box-option-controls.php:81
182
  msgid "Request matches"
183
  msgstr ""
184
 
185
- #: src/admin/views/metaboxes/box-option-controls.php:85
186
  msgid "any"
187
  msgstr ""
188
 
189
- #: src/admin/views/metaboxes/box-option-controls.php:87
190
  msgid "all"
191
  msgstr ""
192
 
193
- #: src/admin/views/metaboxes/box-option-controls.php:91
194
  msgid "of the following conditions."
195
  msgstr ""
196
 
197
- #: src/admin/views/metaboxes/box-option-controls.php:133, src/admin/views/metaboxes/box-option-controls.php:421
 
 
 
 
198
  msgid "is"
199
  msgstr ""
200
 
201
- #: src/admin/views/metaboxes/box-option-controls.php:135, src/admin/views/metaboxes/box-option-controls.php:423
202
  msgid "is not"
203
  msgstr ""
204
 
205
- #: src/admin/views/metaboxes/box-option-controls.php:141, src/admin/views/metaboxes/box-option-controls.php:429
206
  msgid "Leave empty for any or enter (comma-separated) names or ID's"
207
  msgstr ""
208
 
209
- #: src/admin/views/metaboxes/box-option-controls.php:157
210
  msgid "Add rule"
211
  msgstr ""
212
 
213
- #: src/admin/views/metaboxes/box-option-controls.php:163
214
  msgid "Box Position"
215
  msgstr ""
216
 
217
- #: src/admin/views/metaboxes/box-option-controls.php:175
218
  msgid "Top Left"
219
  msgstr ""
220
 
221
- #: src/admin/views/metaboxes/box-option-controls.php:189
222
  msgid "Top Right"
223
  msgstr ""
224
 
225
- #: src/admin/views/metaboxes/box-option-controls.php:207
226
  msgid "Center"
227
  msgstr ""
228
 
229
- #: src/admin/views/metaboxes/box-option-controls.php:225
230
  msgid "Bottom Left"
231
  msgstr ""
232
 
233
- #: src/admin/views/metaboxes/box-option-controls.php:239
234
  msgid "Bottom Right"
235
  msgstr ""
236
 
237
- #: src/admin/views/metaboxes/box-option-controls.php:257
238
  msgid "Animation"
239
  msgstr ""
240
 
241
- #: src/admin/views/metaboxes/box-option-controls.php:261
242
  msgid "Fade In"
243
  msgstr ""
244
 
245
- #: src/admin/views/metaboxes/box-option-controls.php:263
246
  msgid "Slide In"
247
  msgstr ""
248
 
249
- #: src/admin/views/metaboxes/box-option-controls.php:265
250
  msgid "Which animation type should be used to show the box when triggered?"
251
  msgstr ""
252
 
253
- #: src/admin/views/metaboxes/box-option-controls.php:273
254
  msgid "Auto-show box?"
255
  msgstr ""
256
 
257
- #: src/admin/views/metaboxes/box-option-controls.php:277
258
  msgid "Never"
259
  msgstr ""
260
 
261
- #: src/admin/views/metaboxes/box-option-controls.php:279
262
  msgid "Yes, after %s seconds on the page."
263
  msgstr ""
264
 
265
- #: src/admin/views/metaboxes/box-option-controls.php:281
266
  msgid "Yes, when at %s of page height"
267
  msgstr ""
268
 
269
- #: src/admin/views/metaboxes/box-option-controls.php:283
270
  msgid "Yes, when at element %s"
271
  msgstr ""
272
 
273
- #: src/admin/views/metaboxes/box-option-controls.php:283
274
  msgid "Example: #comments"
275
  msgstr ""
276
 
277
- #: src/admin/views/metaboxes/box-option-controls.php:295
278
  msgid "Cookie expiration"
279
  msgstr ""
280
 
281
- #: src/admin/views/metaboxes/box-option-controls.php:305, src/admin/views/metaboxes/box-option-controls.php:315
282
  msgid "hours"
283
  msgstr ""
284
 
285
- #: src/admin/views/metaboxes/box-option-controls.php:323
286
  msgid "After this box is triggered or dismissed, how many hours should it stay hidden?"
287
  msgstr ""
288
 
289
- #: src/admin/views/metaboxes/box-option-controls.php:331
290
  msgid "Do not auto-show box on small screens?"
291
  msgstr ""
292
 
293
- #: src/admin/views/metaboxes/box-option-controls.php:335
294
  msgid "Do not auto-show on screens smaller than %s."
295
  msgstr ""
296
 
297
- #: src/admin/views/metaboxes/box-option-controls.php:337
298
  msgid "Leave empty if you <strong>do</strong> want to auto-show the box on small screens."
299
  msgstr ""
300
 
301
- #: src/admin/views/metaboxes/box-option-controls.php:347
302
  msgid "Auto-hide?"
303
  msgstr ""
304
 
305
- #: src/admin/views/metaboxes/box-option-controls.php:355
306
  msgid "Hide box again when visitors scroll back up?"
307
  msgstr ""
308
 
309
- #: src/admin/views/metaboxes/box-option-controls.php:363, src/admin/views/settings.php:20
310
  msgid "Enable test mode?"
311
  msgstr ""
312
 
313
- #: src/admin/views/metaboxes/box-option-controls.php:371, src/admin/views/settings.php:24
314
  msgid "If test mode is enabled, all boxes will show up regardless of whether a cookie has been set."
315
  msgstr ""
316
 
1
+ # Copyright (C) 2017 boxzilla
2
  # This file is distributed under the same license as the boxzilla package.
3
  msgid ""
4
  msgstr ""
6
  "MIME-Version: 1.0\n"
7
  "Content-Type: text/plain; charset=UTF-8\n"
8
  "Content-Transfer-Encoding: 8bit\n"
9
+ "PO-Revision-Date: 2017-MO-DA HO:MI+ZONE\n"
10
  "X-Poedit-Basepath: ..\n"
11
  "X-Poedit-SourceCharset: UTF-8\n"
12
  "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
139
  msgstr ""
140
 
141
  #: src/admin/views/metaboxes/box-option-controls.php:21
 
 
 
 
142
  msgid "everywhere"
143
  msgstr ""
144
 
145
+ #: src/admin/views/metaboxes/box-option-controls.php:23
146
  msgid "if page"
147
  msgstr ""
148
 
149
+ #: src/admin/views/metaboxes/box-option-controls.php:25
150
  msgid "if post"
151
  msgstr ""
152
 
153
+ #: src/admin/views/metaboxes/box-option-controls.php:27
154
  msgid "if post tag"
155
  msgstr ""
156
 
157
+ #: src/admin/views/metaboxes/box-option-controls.php:29
158
  msgid "if post category"
159
  msgstr ""
160
 
161
+ #: src/admin/views/metaboxes/box-option-controls.php:31
162
  msgid "if post type"
163
  msgstr ""
164
 
165
+ #: src/admin/views/metaboxes/box-option-controls.php:33
166
  msgid "if URL"
167
  msgstr ""
168
 
169
+ #: src/admin/views/metaboxes/box-option-controls.php:35
170
  msgid "if referer"
171
  msgstr ""
172
 
173
+ #: src/admin/views/metaboxes/box-option-controls.php:73
174
  msgid "Load this box if"
175
  msgstr ""
176
 
177
+ #: src/admin/views/metaboxes/box-option-controls.php:79
178
  msgid "Request matches"
179
  msgstr ""
180
 
181
+ #: src/admin/views/metaboxes/box-option-controls.php:83
182
  msgid "any"
183
  msgstr ""
184
 
185
+ #: src/admin/views/metaboxes/box-option-controls.php:85
186
  msgid "all"
187
  msgstr ""
188
 
189
+ #: src/admin/views/metaboxes/box-option-controls.php:89
190
  msgid "of the following conditions."
191
  msgstr ""
192
 
193
+ #: src/admin/views/metaboxes/box-option-controls.php:109, src/admin/views/metaboxes/box-option-controls.php:399
194
+ msgid "Remove rule"
195
+ msgstr ""
196
+
197
+ #: src/admin/views/metaboxes/box-option-controls.php:129, src/admin/views/metaboxes/box-option-controls.php:417
198
  msgid "is"
199
  msgstr ""
200
 
201
+ #: src/admin/views/metaboxes/box-option-controls.php:131, src/admin/views/metaboxes/box-option-controls.php:419
202
  msgid "is not"
203
  msgstr ""
204
 
205
+ #: src/admin/views/metaboxes/box-option-controls.php:137, src/admin/views/metaboxes/box-option-controls.php:425
206
  msgid "Leave empty for any or enter (comma-separated) names or ID's"
207
  msgstr ""
208
 
209
+ #: src/admin/views/metaboxes/box-option-controls.php:153
210
  msgid "Add rule"
211
  msgstr ""
212
 
213
+ #: src/admin/views/metaboxes/box-option-controls.php:159
214
  msgid "Box Position"
215
  msgstr ""
216
 
217
+ #: src/admin/views/metaboxes/box-option-controls.php:171
218
  msgid "Top Left"
219
  msgstr ""
220
 
221
+ #: src/admin/views/metaboxes/box-option-controls.php:185
222
  msgid "Top Right"
223
  msgstr ""
224
 
225
+ #: src/admin/views/metaboxes/box-option-controls.php:203
226
  msgid "Center"
227
  msgstr ""
228
 
229
+ #: src/admin/views/metaboxes/box-option-controls.php:221
230
  msgid "Bottom Left"
231
  msgstr ""
232
 
233
+ #: src/admin/views/metaboxes/box-option-controls.php:235
234
  msgid "Bottom Right"
235
  msgstr ""
236
 
237
+ #: src/admin/views/metaboxes/box-option-controls.php:253
238
  msgid "Animation"
239
  msgstr ""
240
 
241
+ #: src/admin/views/metaboxes/box-option-controls.php:257
242
  msgid "Fade In"
243
  msgstr ""
244
 
245
+ #: src/admin/views/metaboxes/box-option-controls.php:259
246
  msgid "Slide In"
247
  msgstr ""
248
 
249
+ #: src/admin/views/metaboxes/box-option-controls.php:261
250
  msgid "Which animation type should be used to show the box when triggered?"
251
  msgstr ""
252
 
253
+ #: src/admin/views/metaboxes/box-option-controls.php:269
254
  msgid "Auto-show box?"
255
  msgstr ""
256
 
257
+ #: src/admin/views/metaboxes/box-option-controls.php:273
258
  msgid "Never"
259
  msgstr ""
260
 
261
+ #: src/admin/views/metaboxes/box-option-controls.php:275
262
  msgid "Yes, after %s seconds on the page."
263
  msgstr ""
264
 
265
+ #: src/admin/views/metaboxes/box-option-controls.php:277
266
  msgid "Yes, when at %s of page height"
267
  msgstr ""
268
 
269
+ #: src/admin/views/metaboxes/box-option-controls.php:279
270
  msgid "Yes, when at element %s"
271
  msgstr ""
272
 
273
+ #: src/admin/views/metaboxes/box-option-controls.php:279
274
  msgid "Example: #comments"
275
  msgstr ""
276
 
277
+ #: src/admin/views/metaboxes/box-option-controls.php:291
278
  msgid "Cookie expiration"
279
  msgstr ""
280
 
281
+ #: src/admin/views/metaboxes/box-option-controls.php:301, src/admin/views/metaboxes/box-option-controls.php:311
282
  msgid "hours"
283
  msgstr ""
284
 
285
+ #: src/admin/views/metaboxes/box-option-controls.php:319
286
  msgid "After this box is triggered or dismissed, how many hours should it stay hidden?"
287
  msgstr ""
288
 
289
+ #: src/admin/views/metaboxes/box-option-controls.php:327
290
  msgid "Do not auto-show box on small screens?"
291
  msgstr ""
292
 
293
+ #: src/admin/views/metaboxes/box-option-controls.php:331
294
  msgid "Do not auto-show on screens smaller than %s."
295
  msgstr ""
296
 
297
+ #: src/admin/views/metaboxes/box-option-controls.php:333
298
  msgid "Leave empty if you <strong>do</strong> want to auto-show the box on small screens."
299
  msgstr ""
300
 
301
+ #: src/admin/views/metaboxes/box-option-controls.php:343
302
  msgid "Auto-hide?"
303
  msgstr ""
304
 
305
+ #: src/admin/views/metaboxes/box-option-controls.php:351
306
  msgid "Hide box again when visitors scroll back up?"
307
  msgstr ""
308
 
309
+ #: src/admin/views/metaboxes/box-option-controls.php:359, src/admin/views/settings.php:20
310
  msgid "Enable test mode?"
311
  msgstr ""
312
 
313
+ #: src/admin/views/metaboxes/box-option-controls.php:367, src/admin/views/settings.php:24
314
  msgid "If test mode is enabled, all boxes will show up regardless of whether a cookie has been set."
315
  msgstr ""
316
 
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: Ibericode, DvanKooten, hchouhan, lapzor
3
  Donate link: https://boxzillaplugin.com/#utm_source=wp-plugin-repo&utm_medium=boxzilla&utm_campaign=donate-link
4
  Tags: scroll triggered box, cta, social, pop-up, newsletter, call to action, mailchimp, contact form 7, social media, mc4wp, ibericode
5
- Requires at least: 3.8
6
- Tested up to: 4.7
7
- Stable tag: 3.1.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -149,8 +149,34 @@ Have a look at the [frequently asked questions](https://wordpress.org/plugins/bo
149
  == Changelog ==
150
 
151
 
 
152
 
153
- #### 3.1.8 - November 8, 2017
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
154
 
155
  **Fixes**
156
 
2
  Contributors: Ibericode, DvanKooten, hchouhan, lapzor
3
  Donate link: https://boxzillaplugin.com/#utm_source=wp-plugin-repo&utm_medium=boxzilla&utm_campaign=donate-link
4
  Tags: scroll triggered box, cta, social, pop-up, newsletter, call to action, mailchimp, contact form 7, social media, mc4wp, ibericode
5
+ Requires at least: 4.1
6
+ Tested up to: 4.7.3
7
+ Stable tag: 3.1.10
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
149
  == Changelog ==
150
 
151
 
152
+ #### 3.1.10 - March 8, 2017
153
 
154
+ **Fixes**
155
+
156
+ - Debugging statement that would log to console on every scroll event.
157
+
158
+ **Improvements**
159
+
160
+ - Reduced overlay click error margin to 40px (instead of % based).
161
+ - Minor UX improvements for "edit box" screen.
162
+
163
+
164
+ #### 3.1.9 - February 27, 2017
165
+
166
+ **Fixes**
167
+
168
+ - Compatibility error with PHP 7.1 because of function name with double underscore prefix.
169
+
170
+ **Improvements**
171
+
172
+ - Removed autofocus when box shows because of mobile browser issues & popping up keyboard.
173
+
174
+ **Additions**
175
+
176
+ - Added Romanian language files.
177
+
178
+
179
+ #### 3.1.8 - November 8, 2016
180
 
181
  **Fixes**
182
 
src/admin/views/metaboxes/box-option-controls.php CHANGED
@@ -8,7 +8,6 @@ defined( 'ABSPATH' ) or exit;
8
 
9
  /** @var array $rule_options */
10
  $rule_options = array(
11
- '' => __( "Select a condition", 'boxzilla' ),
12
  'everywhere' => __( 'everywhere', 'boxzilla' ),
13
  'is_page' => __( 'if page', 'boxzilla' ),
14
  'is_single' => __( 'if post', 'boxzilla' ),
@@ -53,13 +52,12 @@ $rule_options = apply_filters( 'boxzilla_rules_options', $rule_options );
53
  foreach( $opts['rules'] as $rule ) { if( ! array_key_exists( 'condition', $rule ) ) { continue; } ?>
54
  <tr valign="top" class="boxzilla-rule-row boxzilla-rule-row-<?php echo $key; ?>">
55
  <th style="text-align: right; font-weight: normal;">
56
- <span class="boxzilla-close boxzilla-remove-rule"><span class="dashicons dashicons-dismiss"></span></span>
57
  </th>
58
  <td>
59
  <select class="boxzilla-rule-condition" name="boxzilla_box[rules][<?php echo $key; ?>][condition]">
60
  <?php foreach( $rule_options as $value => $label ) {
61
- $readonly = $value == '' ? 'readonly': '';
62
- printf( '<option value="%s" %s %s>%s</option>', $value, $readonly, selected( $rule['condition'], $value ), $label );
63
  } ?>
64
  </select>
65
 
@@ -199,7 +197,7 @@ $rule_options = apply_filters( 'boxzilla_rules_options', $rule_options );
199
  <script type="text/html" id="tmpl-rule-row-template">
200
  <tr valign="top" class="boxzilla-rule-row boxzilla-rule-row-{{{data.key}}}">
201
  <th style="text-align: right; font-weight: normal;">
202
- <span class="boxzilla-close boxzilla-remove-rule"><span class="dashicons dashicons-dismiss"></span></span>
203
  </th>
204
  <td class="boxzilla-sm">
205
  <select class="boxzilla-rule-condition" name="boxzilla_box[rules][{{{data.key}}}][condition]">
8
 
9
  /** @var array $rule_options */
10
  $rule_options = array(
 
11
  'everywhere' => __( 'everywhere', 'boxzilla' ),
12
  'is_page' => __( 'if page', 'boxzilla' ),
13
  'is_single' => __( 'if post', 'boxzilla' ),
52
  foreach( $opts['rules'] as $rule ) { if( ! array_key_exists( 'condition', $rule ) ) { continue; } ?>
53
  <tr valign="top" class="boxzilla-rule-row boxzilla-rule-row-<?php echo $key; ?>">
54
  <th style="text-align: right; font-weight: normal;">
55
+ <span class="boxzilla-close boxzilla-remove-rule" title="<?php esc_attr_e( 'Remove rule', 'boxzilla' ); ?>"><span class="dashicons dashicons-dismiss"></span></span>
56
  </th>
57
  <td>
58
  <select class="boxzilla-rule-condition" name="boxzilla_box[rules][<?php echo $key; ?>][condition]">
59
  <?php foreach( $rule_options as $value => $label ) {
60
+ printf( '<option value="%s" %s>%s</option>', $value, selected( $rule['condition'], $value ), $label );
 
61
  } ?>
62
  </select>
63
 
197
  <script type="text/html" id="tmpl-rule-row-template">
198
  <tr valign="top" class="boxzilla-rule-row boxzilla-rule-row-{{{data.key}}}">
199
  <th style="text-align: right; font-weight: normal;">
200
+ <span class="boxzilla-close boxzilla-remove-rule" title="<?php esc_attr_e( 'Remove rule', 'boxzilla' ); ?>"><span class="dashicons dashicons-dismiss"></span></span>
201
  </th>
202
  <td class="boxzilla-sm">
203
  <select class="boxzilla-rule-condition" name="boxzilla_box[rules][{{{data.key}}}][condition]">
src/class-box.php CHANGED
@@ -31,6 +31,11 @@ class Box {
31
  */
32
  public $enabled = false;
33
 
 
 
 
 
 
34
  /**
35
  * @param WP_Post|int $post
36
  */
@@ -41,6 +46,9 @@ class Box {
41
  $post = get_post( $post );
42
  }
43
 
 
 
 
44
  // store ID in property for quick access
45
  $this->ID = $post->ID;
46
 
@@ -187,13 +195,19 @@ class Box {
187
  return $minimum_screen_size;
188
  }
189
 
 
 
 
 
 
190
  public function get_client_options() {
191
  $box = $this;
192
 
193
  $trigger = false;
194
  if( $box->options['trigger'] ) {
195
-
196
- $trigger = array( 'method' => $this->options['trigger'] );
 
197
 
198
  if( isset( $this->options[ 'trigger_' . $this->options['trigger'] ] ) ) {
199
  $trigger['value'] = $this->options[ 'trigger_' . $this->options['trigger'] ];
@@ -215,6 +229,11 @@ class Box {
215
  'position' => $box->options['css']['position'],
216
  'minimumScreenWidth' => $box->get_minimum_screen_size(),
217
  'closable' => $box->options['closable'],
 
 
 
 
 
218
  );
219
 
220
  /**
31
  */
32
  public $enabled = false;
33
 
34
+ /**
35
+ * @var WP_Post
36
+ */
37
+ private $post;
38
+
39
  /**
40
  * @param WP_Post|int $post
41
  */
46
  $post = get_post( $post );
47
  }
48
 
49
+ // store ref to post
50
+ $this->post = $post;
51
+
52
  // store ID in property for quick access
53
  $this->ID = $post->ID;
54
 
195
  return $minimum_screen_size;
196
  }
197
 
198
+ /**
199
+ * Get options object for JS script.
200
+ *
201
+ * @return array
202
+ */
203
  public function get_client_options() {