Version Description
Download this release
Release Info
Developer | DvanKooten |
Plugin | Boxzilla |
Version | 3.2.10 |
Comparing to | |
See all releases |
Code changes from version 3.2.9 to 3.2.10
- assets/js/script.js +274 -198
- assets/js/script.min.js +1 -1
- assets/js/script.min.js.map +1 -1
- bootstrap.php +1 -1
- boxzilla.php +3 -3
- languages/boxzilla.pot +72 -68
- readme.txt +13 -2
- src/admin/class-admin.php +812 -763
- src/admin/class-autocomplete.php +97 -91
- src/admin/class-installer.php +93 -88
- src/admin/class-migrations.php +21 -17
- src/admin/class-notices.php +36 -32
- src/admin/class-review-notice.php +29 -23
- src/admin/migrations/3.1-cookie-option.php +9 -9
- src/admin/migrations/3.1.11-screen-width-condition.php +11 -11
- src/admin/views/extensions.php +16 -14
- src/admin/views/metaboxes/box-appearance-controls.php +19 -19
- src/admin/views/metaboxes/box-option-controls.php +145 -142
- src/admin/views/metaboxes/email-optin.php +3 -3
- src/admin/views/metaboxes/need-help.php +2 -2
- src/admin/views/settings.php +12 -12
- src/class-bootstrapper.php +24 -22
- src/class-box.php +209 -203
- src/class-boxzilla-service-provider.php +59 -64
- src/class-boxzilla.php +3 -1
- src/class-loader.php +336 -332
- src/class-php-fallback.php +58 -56
- src/class-plugin.php +114 -105
- src/default-actions.php +26 -25
- src/default-filters.php +9 -9
- src/di/class-container-with-property-access.php +24 -19
- src/functions.php +4 -4
- src/licensing/class-api-exception.php +29 -27
- src/licensing/class-api.php +174 -168
- src/licensing/class-license-manager.php +181 -173
- src/licensing/class-license-service-provider.php +34 -34
- src/licensing/class-license.php +108 -101
- src/licensing/class-poller.php +16 -13
- src/licensing/class-update-manager.php +240 -232
- src/licensing/views/license-form.php +32 -23
assets/js/script.js
CHANGED
@@ -1,151 +1,12 @@
|
|
1 |
Â
(function () { var require = undefined; var module = undefined; var exports = undefined; var define = undefined; (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
2 |
-
"use strict";
|
3 |
-
|
4 |
-
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
5 |
-
|
6 |
-
(function () {
|
7 |
-
'use strict';
|
8 |
-
|
9 |
-
var Boxzilla = require('boxzilla');
|
10 |
-
|
11 |
-
var options = window.boxzilla_options; // expose Boxzilla object to window
|
12 |
-
|
13 |
-
window.Boxzilla = Boxzilla; // helper function for setting CSS styles
|
14 |
-
|
15 |
-
function css(element, styles) {
|
16 |
-
if (styles.background_color) {
|
17 |
-
element.style.background = styles.background_color;
|
18 |
-
}
|
19 |
-
|
20 |
-
if (styles.color) {
|
21 |
-
element.style.color = styles.color;
|
22 |
-
}
|
23 |
-
|
24 |
-
if (styles.border_color) {
|
25 |
-
element.style.borderColor = styles.border_color;
|
26 |
-
}
|
27 |
-
|
28 |
-
if (styles.border_width) {
|
29 |
-
element.style.borderWidth = parseInt(styles.border_width) + "px";
|
30 |
-
}
|
31 |
-
|
32 |
-
if (styles.border_style) {
|
33 |
-
element.style.borderStyle = styles.border_style;
|
34 |
-
}
|
35 |
-
|
36 |
-
if (styles.width) {
|
37 |
-
element.style.maxWidth = parseInt(styles.width) + "px";
|
38 |
-
}
|
39 |
-
}
|
40 |
-
|
41 |
-
function createBoxesFromConfig() {
|
42 |
-
// failsafe against including script twice.
|
43 |
-
if (options.inited) {
|
44 |
-
return;
|
45 |
-
} // create boxes from options
|
46 |
-
|
47 |
-
|
48 |
-
for (var key in options.boxes) {
|
49 |
-
// get opts
|
50 |
-
var boxOpts = options.boxes[key];
|
51 |
-
boxOpts.testMode = isLoggedIn && options.testMode; // find box content element, bail if not found
|
52 |
-
|
53 |
-
var boxContentElement = document.getElementById('boxzilla-box-' + boxOpts.id + '-content');
|
54 |
-
|
55 |
-
if (!boxContentElement) {
|
56 |
-
continue;
|
57 |
-
} // use element as content option
|
58 |
-
|
59 |
-
|
60 |
-
boxOpts.content = boxContentElement; // create box
|
61 |
-
|
62 |
-
var box = Boxzilla.create(boxOpts.id, boxOpts); // add box slug to box element as classname
|
63 |
-
|
64 |
-
box.element.className = box.element.className + ' boxzilla-' + boxOpts.post.slug; // add custom css to box
|
65 |
-
|
66 |
-
css(box.element, boxOpts.css);
|
67 |
-
box.element.firstChild.firstChild.className += " first-child";
|
68 |
-
box.element.firstChild.lastChild.className += " last-child"; // maybe show box right away
|
69 |
-
|
70 |
-
if (box.fits() && locationHashRefersBox(box)) {
|
71 |
-
box.show();
|
72 |
-
}
|
73 |
-
} // set flag to prevent initialising twice
|
74 |
-
|
75 |
-
|
76 |
-
options.inited = true; // trigger "done" event.
|
77 |
-
|
78 |
-
Boxzilla.trigger('done'); // maybe open box with MC4WP form in it
|
79 |
-
|
80 |
-
maybeOpenMailChimpForWordPressBox();
|
81 |
-
}
|
82 |
-
|
83 |
-
function locationHashRefersBox(box) {
|
84 |
-
if (!window.location.hash || 0 === window.location.hash.length) {
|
85 |
-
return false;
|
86 |
-
}
|
87 |
-
|
88 |
-
var elementId = window.location.hash.substring(1); // only attempt on strings looking like an ID
|
89 |
-
|
90 |
-
var regex = /^[a-zA-Z\-\_0-9]+$/;
|
91 |
-
|
92 |
-
if (!regex.test(elementId)) {
|
93 |
-
return false;
|
94 |
-
}
|
95 |
-
|
96 |
-
if (elementId === box.element.id) {
|
97 |
-
return true;
|
98 |
-
} else if (box.element.querySelector('#' + elementId)) {
|
99 |
-
return true;
|
100 |
-
}
|
101 |
-
|
102 |
-
return false;
|
103 |
-
}
|
104 |
-
|
105 |
-
function maybeOpenMailChimpForWordPressBox() {
|
106 |
-
if (_typeof(window.mc4wp_forms_config) !== "object" || !window.mc4wp_forms_config.submitted_form) {
|
107 |
-
return;
|
108 |
-
}
|
109 |
-
|
110 |
-
var selector = '#' + window.mc4wp_forms_config.submitted_form.element_id;
|
111 |
-
var boxes = Boxzilla.boxes;
|
112 |
-
|
113 |
-
for (var boxId in boxes) {
|
114 |
-
if (!boxes.hasOwnProperty(boxId)) {
|
115 |
-
continue;
|
116 |
-
}
|
117 |
-
|
118 |
-
var box = boxes[boxId];
|
119 |
-
|
120 |
-
if (box.element.querySelector(selector)) {
|
121 |
-
box.show();
|
122 |
-
return;
|
123 |
-
}
|
124 |
-
}
|
125 |
-
} // print message when test mode is enabled
|
126 |
-
|
127 |
-
|
128 |
-
var isLoggedIn = document.body.className.indexOf('logged-in') > -1;
|
129 |
-
|
130 |
-
if (isLoggedIn && options.testMode) {
|
131 |
-
console.log('Boxzilla: Test mode is enabled. Please disable test mode if you\'re done testing.');
|
132 |
-
} // init boxzilla
|
133 |
-
|
134 |
-
|
135 |
-
Boxzilla.init(); // on window.load, create DOM elements for boxes
|
136 |
-
|
137 |
-
window.addEventListener('load', createBoxesFromConfig);
|
138 |
-
})();
|
139 |
-
|
140 |
-
},{"boxzilla":5}],2:[function(require,module,exports){
|
141 |
Â
/*!
|
142 |
-
* EventEmitter
|
143 |
Â
* Unlicense - http://unlicense.org/
|
144 |
Â
* Oliver Caldwell - http://oli.me.uk/
|
145 |
Â
* @preserve
|
146 |
Â
*/
|
147 |
Â
|
148 |
-
;(function () {
|
149 |
Â
'use strict';
|
150 |
Â
|
151 |
Â
/**
|
@@ -158,7 +19,6 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
|
|
158 |
Â
|
159 |
Â
// Shortcuts to improve speed and size
|
160 |
Â
var proto = EventEmitter.prototype;
|
161 |
-
var exports = this;
|
162 |
Â
var originalGlobalValue = exports.EventEmitter;
|
163 |
Â
|
164 |
Â
/**
|
@@ -259,6 +119,16 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
|
|
259 |
Â
return response || listeners;
|
260 |
Â
};
|
261 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
262 |
Â
/**
|
263 |
Â
* Adds a listener function to the specified event.
|
264 |
Â
* The listener will not be added if it is a duplicate.
|
@@ -270,6 +140,10 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
|
|
270 |
Â
* @return {Object} Current instance of EventEmitter for chaining.
|
271 |
Â
*/
|
272 |
Â
proto.addListener = function addListener(evt, listener) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
273 |
Â
var listeners = this.getListenersAsObject(evt);
|
274 |
Â
var listenerIsWrapped = typeof listener === 'object';
|
275 |
Â
var key;
|
@@ -369,7 +243,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
|
|
369 |
Â
|
370 |
Â
/**
|
371 |
Â
* Adds listeners in bulk using the manipulateListeners method.
|
372 |
-
* If you pass an object as the
|
373 |
Â
* You can also pass it a regular expression to add the array of listeners to all events that match it.
|
374 |
Â
* Yeah, this function does quite a bit. That's probably a bad thing.
|
375 |
Â
*
|
@@ -384,7 +258,7 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
|
|
384 |
Â
|
385 |
Â
/**
|
386 |
Â
* Removes listeners in bulk using the manipulateListeners method.
|
387 |
-
* If you pass an object as the
|
388 |
Â
* You can also pass it an event name and an array of listeners to be removed.
|
389 |
Â
* You can also pass it a regular expression to remove the listeners from all events that match it.
|
390 |
Â
*
|
@@ -508,9 +382,8 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
|
|
508 |
Â
for (key in listenersMap) {
|
509 |
Â
if (listenersMap.hasOwnProperty(key)) {
|
510 |
Â
listeners = listenersMap[key].slice(0);
|
511 |
-
i = listeners.length;
|
512 |
Â
|
513 |
-
|
514 |
Â
// If the listener returns true then it shall be removed from the event
|
515 |
Â
// The function is executed either with a basic call or an apply if there is an args array
|
516 |
Â
listener = listeners[i];
|
@@ -611,9 +484,9 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
|
|
611 |
Â
else {
|
612 |
Â
exports.EventEmitter = EventEmitter;
|
613 |
Â
}
|
614 |
-
}
|
615 |
Â
|
616 |
-
},{}],
|
617 |
Â
"use strict";
|
618 |
Â
|
619 |
Â
var duration = 320;
|
@@ -787,7 +660,7 @@ module.exports = {
|
|
787 |
Â
'animated': animated
|
788 |
Â
};
|
789 |
Â
|
790 |
-
},{}],
|
791 |
Â
'use strict';
|
792 |
Â
|
793 |
Â
var defaults = {
|
@@ -1130,21 +1003,28 @@ module.exports = function (_Boxzilla) {
|
|
1130 |
Â
return Box;
|
1131 |
Â
};
|
1132 |
Â
|
1133 |
-
},{"./animator.js":
|
1134 |
Â
'use strict';
|
1135 |
Â
|
1136 |
-
var EventEmitter = require('wolfy87-eventemitter')
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1148 |
Â
|
1149 |
Â
function throttle(fn, threshhold, scope) {
|
1150 |
Â
threshhold || (threshhold = 250);
|
@@ -1170,7 +1050,7 @@ function throttle(fn, threshhold, scope) {
|
|
1170 |
Â
|
1171 |
Â
|
1172 |
Â
function onKeyUp(e) {
|
1173 |
-
if (e.keyCode
|
1174 |
Â
Boxzilla.dismiss();
|
1175 |
Â
}
|
1176 |
Â
} // check "pageviews" criteria for each box
|
@@ -1264,9 +1144,9 @@ function onOverlayClick(e) {
|
|
1264 |
Â
});
|
1265 |
Â
}
|
1266 |
Â
|
1267 |
-
function
|
1268 |
Â
// do nothing if already triggered OR another box is visible.
|
1269 |
-
if (
|
1270 |
Â
return;
|
1271 |
Â
}
|
1272 |
Â
|
@@ -1275,34 +1155,12 @@ function triggerExitIntent() {
|
|
1275 |
Â
box.trigger();
|
1276 |
Â
}
|
1277 |
Â
});
|
1278 |
-
exitIntentTriggered = true;
|
1279 |
-
}
|
1280 |
-
|
1281 |
-
function onMouseLeave(e) {
|
1282 |
-
var delay = 400; // did mouse leave at top of window?
|
1283 |
-
|
1284 |
-
if (e.clientY <= 0) {
|
1285 |
-
exitIntentDelayTimer = window.setTimeout(triggerExitIntent, delay);
|
1286 |
-
}
|
1287 |
Â
}
|
1288 |
Â
|
1289 |
Â
function isAnyBoxVisible() {
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
if (box.visible) {
|
1294 |
-
return true;
|
1295 |
-
}
|
1296 |
-
}
|
1297 |
-
|
1298 |
-
return false;
|
1299 |
-
}
|
1300 |
-
|
1301 |
-
function onMouseEnter() {
|
1302 |
-
if (exitIntentDelayTimer) {
|
1303 |
-
window.clearInterval(exitIntentDelayTimer);
|
1304 |
-
exitIntentDelayTimer = null;
|
1305 |
-
}
|
1306 |
Â
}
|
1307 |
Â
|
1308 |
Â
function onElementClick(e) {
|
@@ -1346,6 +1204,10 @@ var timers = {
|
|
1346 |
Â
}; // initialise & add event listeners
|
1347 |
Â
|
1348 |
Â
Boxzilla.init = function () {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1349 |
Â
document.body.addEventListener('click', onElementClick, true);
|
1350 |
Â
|
1351 |
Â
try {
|
@@ -1357,8 +1219,6 @@ Boxzilla.init = function () {
|
|
1357 |
Â
siteTimer = new Timer(0);
|
1358 |
Â
pageTimer = new Timer(0); // insert styles into DOM
|
1359 |
Â
|
1360 |
-
var styles = require('./styles.js');
|
1361 |
-
|
1362 |
Â
var styleElement = document.createElement('style');
|
1363 |
Â
styleElement.setAttribute("type", "text/css");
|
1364 |
Â
styleElement.innerHTML = styles;
|
@@ -1367,8 +1227,9 @@ Boxzilla.init = function () {
|
|
1367 |
Â
overlay = document.createElement('div');
|
1368 |
Â
overlay.style.display = 'none';
|
1369 |
Â
overlay.id = 'boxzilla-overlay';
|
1370 |
-
document.body.appendChild(overlay); //
|
1371 |
Â
|
Â
|
|
1372 |
Â
scrollElement.addEventListener('touchstart', throttle(checkHeightCriteria), true);
|
1373 |
Â
scrollElement.addEventListener('scroll', throttle(checkHeightCriteria), true);
|
1374 |
Â
window.addEventListener('resize', throttle(recalculateHeights));
|
@@ -1376,8 +1237,6 @@ Boxzilla.init = function () {
|
|
1376 |
Â
overlay.addEventListener('click', onOverlayClick);
|
1377 |
Â
window.setInterval(checkTimeCriteria, 1000);
|
1378 |
Â
window.setTimeout(checkPageViewsCriteria, 1000);
|
1379 |
-
document.documentElement.addEventListener('mouseleave', onMouseLeave);
|
1380 |
-
document.documentElement.addEventListener('mouseenter', onMouseEnter);
|
1381 |
Â
document.addEventListener('keyup', onKeyUp);
|
1382 |
Â
timers.start();
|
1383 |
Â
window.addEventListener('focus', timers.start);
|
@@ -1387,6 +1246,7 @@ Boxzilla.init = function () {
|
|
1387 |
Â
});
|
1388 |
Â
window.addEventListener('blur', timers.stop);
|
1389 |
Â
Boxzilla.trigger('ready');
|
Â
|
|
1390 |
Â
};
|
1391 |
Â
/**
|
1392 |
Â
* Create a new Box
|
@@ -1475,13 +1335,13 @@ if (typeof module !== 'undefined' && module.exports) {
|
|
1475 |
Â
module.exports = Boxzilla;
|
1476 |
Â
}
|
1477 |
Â
|
1478 |
-
},{"./box.js":
|
1479 |
Â
"use strict";
|
1480 |
Â
|
1481 |
Â
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}";
|
1482 |
Â
module.exports = styles;
|
1483 |
Â
|
1484 |
-
},{}],
|
1485 |
Â
'use strict';
|
1486 |
Â
|
1487 |
Â
var Timer = function Timer(start) {
|
@@ -1508,5 +1368,221 @@ Timer.prototype.stop = function () {
|
|
1508 |
Â
|
1509 |
Â
module.exports = Timer;
|
1510 |
Â
|
1511 |
-
},{}]
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
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1512 |
Â
; })();
|
1 |
Â
(function () { var require = undefined; var module = undefined; var exports = undefined; var define = undefined; (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
2 |
Â
/*!
|
3 |
+
* EventEmitter v5.2.5 - git.io/ee
|
4 |
Â
* Unlicense - http://unlicense.org/
|
5 |
Â
* Oliver Caldwell - http://oli.me.uk/
|
6 |
Â
* @preserve
|
7 |
Â
*/
|
8 |
Â
|
9 |
+
;(function (exports) {
|
10 |
Â
'use strict';
|
11 |
Â
|
12 |
Â
/**
|
19 |
Â
|
20 |
Â
// Shortcuts to improve speed and size
|
21 |
Â
var proto = EventEmitter.prototype;
|
Â
|
|
22 |
Â
var originalGlobalValue = exports.EventEmitter;
|
23 |
Â
|
24 |
Â
/**
|
119 |
Â
return response || listeners;
|
120 |
Â
};
|
121 |
Â
|
122 |
+
function isValidListener (listener) {
|
123 |
+
if (typeof listener === 'function' || listener instanceof RegExp) {
|
124 |
+
return true
|
125 |
+
} else if (listener && typeof listener === 'object') {
|
126 |
+
return isValidListener(listener.listener)
|
127 |
+
} else {
|
128 |
+
return false
|
129 |
+
}
|
130 |
+
}
|
131 |
+
|
132 |
Â
/**
|
133 |
Â
* Adds a listener function to the specified event.
|
134 |
Â
* The listener will not be added if it is a duplicate.
|
140 |
Â
* @return {Object} Current instance of EventEmitter for chaining.
|
141 |
Â
*/
|
142 |
Â
proto.addListener = function addListener(evt, listener) {
|
143 |
+
if (!isValidListener(listener)) {
|
144 |
+
throw new TypeError('listener must be a function');
|
145 |
+
}
|
146 |
+
|
147 |
Â
var listeners = this.getListenersAsObject(evt);
|
148 |
Â
var listenerIsWrapped = typeof listener === 'object';
|
149 |
Â
var key;
|
243 |
Â
|
244 |
Â
/**
|
245 |
Â
* Adds listeners in bulk using the manipulateListeners method.
|
246 |
+
* If you pass an object as the first 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.
|
247 |
Â
* You can also pass it a regular expression to add the array of listeners to all events that match it.
|
248 |
Â
* Yeah, this function does quite a bit. That's probably a bad thing.
|
249 |
Â
*
|
258 |
Â
|
259 |
Â
/**
|
260 |
Â
* Removes listeners in bulk using the manipulateListeners method.
|
261 |
+
* If you pass an object as the first argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.
|
262 |
Â
* You can also pass it an event name and an array of listeners to be removed.
|
263 |
Â
* You can also pass it a regular expression to remove the listeners from all events that match it.
|
264 |
Â
*
|
382 |
Â
for (key in listenersMap) {
|
383 |
Â
if (listenersMap.hasOwnProperty(key)) {
|
384 |
Â
listeners = listenersMap[key].slice(0);
|
Â
|
|
385 |
Â
|
386 |
+
for (i = 0; i < listeners.length; i++) {
|
387 |
Â
// If the listener returns true then it shall be removed from the event
|
388 |
Â
// The function is executed either with a basic call or an apply if there is an args array
|
389 |
Â
listener = listeners[i];
|
484 |
Â
else {
|
485 |
Â
exports.EventEmitter = EventEmitter;
|
486 |
Â
}
|
487 |
+
}(typeof window !== 'undefined' ? window : this || {}));
|
488 |
Â
|
489 |
+
},{}],2:[function(require,module,exports){
|
490 |
Â
"use strict";
|
491 |
Â
|
492 |
Â
var duration = 320;
|
660 |
Â
'animated': animated
|
661 |
Â
};
|
662 |
Â
|
663 |
+
},{}],3:[function(require,module,exports){
|
664 |
Â
'use strict';
|
665 |
Â
|
666 |
Â
var defaults = {
|
1003 |
Â
return Box;
|
1004 |
Â
};
|
1005 |
Â
|
1006 |
+
},{"./animator.js":2}],4:[function(require,module,exports){
|
1007 |
Â
'use strict';
|
1008 |
Â
|
1009 |
+
var EventEmitter = require('wolfy87-eventemitter');
|
1010 |
+
|
1011 |
+
var Timer = require('./timer.js');
|
1012 |
+
|
1013 |
+
var Boxzilla = Object.create(EventEmitter.prototype);
|
1014 |
+
|
1015 |
+
var Box = require('./box.js')(Boxzilla);
|
1016 |
+
|
1017 |
+
var boxes = [];
|
1018 |
+
var overlay;
|
1019 |
+
var scrollElement = window;
|
1020 |
+
var siteTimer;
|
1021 |
+
var pageTimer;
|
1022 |
+
var pageViews;
|
1023 |
+
var initialised = false;
|
1024 |
+
|
1025 |
+
var styles = require('./styles.js');
|
1026 |
+
|
1027 |
+
var ExitIntent = require('./triggers/exit-intent.js');
|
1028 |
Â
|
1029 |
Â
function throttle(fn, threshhold, scope) {
|
1030 |
Â
threshhold || (threshhold = 250);
|
1050 |
Â
|
1051 |
Â
|
1052 |
Â
function onKeyUp(e) {
|
1053 |
+
if (e.keyCode === 27) {
|
1054 |
Â
Boxzilla.dismiss();
|
1055 |
Â
}
|
1056 |
Â
} // check "pageviews" criteria for each box
|
1144 |
Â
});
|
1145 |
Â
}
|
1146 |
Â
|
1147 |
+
function showBoxesWithExitIntentTrigger() {
|
1148 |
Â
// do nothing if already triggered OR another box is visible.
|
1149 |
+
if (isAnyBoxVisible()) {
|
1150 |
Â
return;
|
1151 |
Â
}
|
1152 |
Â
|
1155 |
Â
box.trigger();
|
1156 |
Â
}
|
1157 |
Â
});
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1158 |
Â
}
|
1159 |
Â
|
1160 |
Â
function isAnyBoxVisible() {
|
1161 |
+
return boxes.filter(function (b) {
|
1162 |
+
return b.visible;
|
1163 |
+
}).length > 0;
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1164 |
Â
}
|
1165 |
Â
|
1166 |
Â
function onElementClick(e) {
|
1204 |
Â
}; // initialise & add event listeners
|
1205 |
Â
|
1206 |
Â
Boxzilla.init = function () {
|
1207 |
+
if (initialised) {
|
1208 |
+
return;
|
1209 |
+
}
|
1210 |
+
|
1211 |
Â
document.body.addEventListener('click', onElementClick, true);
|
1212 |
Â
|
1213 |
Â
try {
|
1219 |
Â
siteTimer = new Timer(0);
|
1220 |
Â
pageTimer = new Timer(0); // insert styles into DOM
|
1221 |
Â
|
Â
|
|
Â
|
|
1222 |
Â
var styleElement = document.createElement('style');
|
1223 |
Â
styleElement.setAttribute("type", "text/css");
|
1224 |
Â
styleElement.innerHTML = styles;
|
1227 |
Â
overlay = document.createElement('div');
|
1228 |
Â
overlay.style.display = 'none';
|
1229 |
Â
overlay.id = 'boxzilla-overlay';
|
1230 |
+
document.body.appendChild(overlay); // init exit intent trigger
|
1231 |
Â
|
1232 |
+
new ExitIntent(showBoxesWithExitIntentTrigger);
|
1233 |
Â
scrollElement.addEventListener('touchstart', throttle(checkHeightCriteria), true);
|
1234 |
Â
scrollElement.addEventListener('scroll', throttle(checkHeightCriteria), true);
|
1235 |
Â
window.addEventListener('resize', throttle(recalculateHeights));
|
1237 |
Â
overlay.addEventListener('click', onOverlayClick);
|
1238 |
Â
window.setInterval(checkTimeCriteria, 1000);
|
1239 |
Â
window.setTimeout(checkPageViewsCriteria, 1000);
|
Â
|
|
Â
|
|
1240 |
Â
document.addEventListener('keyup', onKeyUp);
|
1241 |
Â
timers.start();
|
1242 |
Â
window.addEventListener('focus', timers.start);
|
1246 |
Â
});
|
1247 |
Â
window.addEventListener('blur', timers.stop);
|
1248 |
Â
Boxzilla.trigger('ready');
|
1249 |
+
initialised = true; // ensure this function doesn't run again
|
1250 |
Â
};
|
1251 |
Â
/**
|
1252 |
Â
* Create a new Box
|
1335 |
Â
module.exports = Boxzilla;
|
1336 |
Â
}
|
1337 |
Â
|
1338 |
+
},{"./box.js":3,"./styles.js":5,"./timer.js":6,"./triggers/exit-intent.js":7,"wolfy87-eventemitter":1}],5:[function(require,module,exports){
|
1339 |
Â
"use strict";
|
1340 |
Â
|
1341 |
Â
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}";
|
1342 |
Â
module.exports = styles;
|
1343 |
Â
|
1344 |
+
},{}],6:[function(require,module,exports){
|
1345 |
Â
'use strict';
|
1346 |
Â
|
1347 |
Â
var Timer = function Timer(start) {
|
1368 |
Â
|
1369 |
Â
module.exports = Timer;
|
1370 |
Â
|
1371 |
+
},{}],7:[function(require,module,exports){
|
1372 |
+
'use strict';
|
1373 |
+
|
1374 |
+
module.exports = function (callback) {
|
1375 |
+
var timeout = null;
|
1376 |
+
var touchStart = {};
|
1377 |
+
|
1378 |
+
function triggerCallback() {
|
1379 |
+
document.documentElement.removeEventListener('mouseleave', onMouseLeave);
|
1380 |
+
document.documentElement.removeEventListener('mouseenter', onMouseEnter);
|
1381 |
+
document.documentElement.removeEventListener('click', clearTimeout);
|
1382 |
+
window.removeEventListener('touchstart', onTouchStart);
|
1383 |
+
window.removeEventListener('touchend', onTouchEnd);
|
1384 |
+
callback();
|
1385 |
+
}
|
1386 |
+
|
1387 |
+
function clearTimeout() {
|
1388 |
+
if (timeout === null) {
|
1389 |
+
return;
|
1390 |
+
}
|
1391 |
+
|
1392 |
+
window.clearTimeout(timeout);
|
1393 |
+
timeout = null;
|
1394 |
+
}
|
1395 |
+
|
1396 |
+
function onMouseEnter(evt) {
|
1397 |
+
clearTimeout();
|
1398 |
+
}
|
1399 |
+
|
1400 |
+
function onMouseLeave(evt) {
|
1401 |
+
clearTimeout(); // did mouse leave at top of window?
|
1402 |
+
// add small exception space in the top-right corner
|
1403 |
+
|
1404 |
+
if (evt.clientY <= 0 && evt.clientX < 0.80 * window.innerWidth) {
|
1405 |
+
timeout = window.setTimeout(triggerCallback, 400);
|
1406 |
+
}
|
1407 |
+
}
|
1408 |
+
|
1409 |
+
function onTouchStart(evt) {
|
1410 |
+
clearTimeout();
|
1411 |
+
touchStart = {
|
1412 |
+
timestamp: performance.now(),
|
1413 |
+
scrollY: window.scrollY,
|
1414 |
+
windowHeight: window.innerHeight
|
1415 |
+
};
|
1416 |
+
}
|
1417 |
+
|
1418 |
+
function onTouchEnd(evt) {
|
1419 |
+
clearTimeout(); // did address bar appear?
|
1420 |
+
|
1421 |
+
if (window.innerHeight > touchStart.windowHeight) {
|
1422 |
+
return;
|
1423 |
+
} // allow a tiny tiny margin for error, to not fire on clicks
|
1424 |
+
|
1425 |
+
|
1426 |
+
if (window.scrollY + 20 >= touchStart.scrollY) {
|
1427 |
+
return;
|
1428 |
+
}
|
1429 |
+
|
1430 |
+
if (performance.now() - touchStart.timestamp > 300) {
|
1431 |
+
return;
|
1432 |
+
}
|
1433 |
+
|
1434 |
+
if (['A', 'INPUT', 'BUTTON'].indexOf(evt.target.tagName) > -1) {
|
1435 |
+
return;
|
1436 |
+
}
|
1437 |
+
|
1438 |
+
timeout = window.setTimeout(triggerCallback, 800);
|
1439 |
+
}
|
1440 |
+
|
1441 |
+
window.addEventListener('touchstart', onTouchStart);
|
1442 |
+
window.addEventListener('touchend', onTouchEnd);
|
1443 |
+
document.documentElement.addEventListener('mouseenter', onMouseEnter);
|
1444 |
+
document.documentElement.addEventListener('mouseleave', onMouseLeave);
|
1445 |
+
document.documentElement.addEventListener('click', clearTimeout);
|
1446 |
+
};
|
1447 |
+
|
1448 |
+
},{}],8:[function(require,module,exports){
|
1449 |
+
"use strict";
|
1450 |
+
|
1451 |
+
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
1452 |
+
|
1453 |
+
(function () {
|
1454 |
+
'use strict';
|
1455 |
+
|
1456 |
+
var Boxzilla = require('boxzilla');
|
1457 |
+
|
1458 |
+
var options = window.boxzilla_options; // expose Boxzilla object to window
|
1459 |
+
|
1460 |
+
window.Boxzilla = Boxzilla; // helper function for setting CSS styles
|
1461 |
+
|
1462 |
+
function css(element, styles) {
|
1463 |
+
if (styles.background_color) {
|
1464 |
+
element.style.background = styles.background_color;
|
1465 |
+
}
|
1466 |
+
|
1467 |
+
if (styles.color) {
|
1468 |
+
element.style.color = styles.color;
|
1469 |
+
}
|
1470 |
+
|
1471 |
+
if (styles.border_color) {
|
1472 |
+
element.style.borderColor = styles.border_color;
|
1473 |
+
}
|
1474 |
+
|
1475 |
+
if (styles.border_width) {
|
1476 |
+
element.style.borderWidth = parseInt(styles.border_width) + "px";
|
1477 |
+
}
|
1478 |
+
|
1479 |
+
if (styles.border_style) {
|
1480 |
+
element.style.borderStyle = styles.border_style;
|
1481 |
+
}
|
1482 |
+
|
1483 |
+
if (styles.width) {
|
1484 |
+
element.style.maxWidth = parseInt(styles.width) + "px";
|
1485 |
+
}
|
1486 |
+
}
|
1487 |
+
|
1488 |
+
function createBoxesFromConfig() {
|
1489 |
+
// failsafe against including script twice.
|
1490 |
+
if (options.inited) {
|
1491 |
+
return;
|
1492 |
+
} // create boxes from options
|
1493 |
+
|
1494 |
+
|
1495 |
+
for (var key in options.boxes) {
|
1496 |
+
// get opts
|
1497 |
+
var boxOpts = options.boxes[key];
|
1498 |
+
boxOpts.testMode = isLoggedIn && options.testMode; // find box content element, bail if not found
|
1499 |
+
|
1500 |
+
var boxContentElement = document.getElementById('boxzilla-box-' + boxOpts.id + '-content');
|
1501 |
+
|
1502 |
+
if (!boxContentElement) {
|
1503 |
+
continue;
|
1504 |
+
} // use element as content option
|
1505 |
+
|
1506 |
+
|
1507 |
+
boxOpts.content = boxContentElement; // create box
|
1508 |
+
|
1509 |
+
var box = Boxzilla.create(boxOpts.id, boxOpts); // add box slug to box element as classname
|
1510 |
+
|
1511 |
+
box.element.className = box.element.className + ' boxzilla-' + boxOpts.post.slug; // add custom css to box
|
1512 |
+
|
1513 |
+
css(box.element, boxOpts.css);
|
1514 |
+
box.element.firstChild.firstChild.className += " first-child";
|
1515 |
+
box.element.firstChild.lastChild.className += " last-child"; // maybe show box right away
|
1516 |
+
|
1517 |
+
if (box.fits() && locationHashRefersBox(box)) {
|
1518 |
+
box.show();
|
1519 |
+
}
|
1520 |
+
} // set flag to prevent initialising twice
|
1521 |
+
|
1522 |
+
|
1523 |
+
options.inited = true; // trigger "done" event.
|
1524 |
+
|
1525 |
+
Boxzilla.trigger('done'); // maybe open box with MC4WP form in it
|
1526 |
+
|
1527 |
+
maybeOpenMailChimpForWordPressBox();
|
1528 |
+
}
|
1529 |
+
|
1530 |
+
function locationHashRefersBox(box) {
|
1531 |
+
if (!window.location.hash || 0 === window.location.hash.length) {
|
1532 |
+
return false;
|
1533 |
+
}
|
1534 |
+
|
1535 |
+
var elementId = window.location.hash.substring(1); // only attempt on strings looking like an ID
|
1536 |
+
|
1537 |
+
var regex = /^[a-zA-Z\-\_0-9]+$/;
|
1538 |
+
|
1539 |
+
if (!regex.test(elementId)) {
|
1540 |
+
return false;
|
1541 |
+
}
|
1542 |
+
|
1543 |
+
if (elementId === box.element.id) {
|
1544 |
+
return true;
|
1545 |
+
} else if (box.element.querySelector('#' + elementId)) {
|
1546 |
+
return true;
|
1547 |
+
}
|
1548 |
+
|
1549 |
+
return false;
|
1550 |
+
}
|
1551 |
+
|
1552 |
+
function maybeOpenMailChimpForWordPressBox() {
|
1553 |
+
if (_typeof(window.mc4wp_forms_config) !== "object" || !window.mc4wp_forms_config.submitted_form) {
|
1554 |
+
return;
|
1555 |
+
}
|
1556 |
+
|
1557 |
+
var selector = '#' + window.mc4wp_forms_config.submitted_form.element_id;
|
1558 |
+
var boxes = Boxzilla.boxes;
|
1559 |
+
|
1560 |
+
for (var boxId in boxes) {
|
1561 |
+
if (!boxes.hasOwnProperty(boxId)) {
|
1562 |
+
continue;
|
1563 |
+
}
|
1564 |
+
|
1565 |
+
var box = boxes[boxId];
|
1566 |
+
|
1567 |
+
if (box.element.querySelector(selector)) {
|
1568 |
+
box.show();
|
1569 |
+
return;
|
1570 |
+
}
|
1571 |
+
}
|
1572 |
+
} // print message when test mode is enabled
|
1573 |
+
|
1574 |
+
|
1575 |
+
var isLoggedIn = document.body.className.indexOf('logged-in') > -1;
|
1576 |
+
|
1577 |
+
if (isLoggedIn && options.testMode) {
|
1578 |
+
console.log('Boxzilla: Test mode is enabled. Please disable test mode if you\'re done testing.');
|
1579 |
+
} // init boxzilla
|
1580 |
+
|
1581 |
+
|
1582 |
+
Boxzilla.init(); // on window.load, create DOM elements for boxes
|
1583 |
+
|
1584 |
+
window.addEventListener('load', createBoxesFromConfig);
|
1585 |
+
})();
|
1586 |
+
|
1587 |
+
},{"boxzilla":4}]},{},[8]);
|
1588 |
Â
; })();
|
assets/js/script.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
!function(){var l=void 0;!function r(s,l,a){function c(e,t){if(!l[e]){if(!s[e]){var i=!1;if(!t&&i)return i(e,!0);if(d)return d(e,!0);var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}var o=l[e]={exports:{}};s[e][0].call(o.exports,function(t){return c(s[e][1][t]||t)},o,o.exports,r,s,l,a)}return l[e].exports}for(var d=!1,t=0;t<a.length;t++)c(a[t]);return c}({1:[function(t,e,i){"use strict";function d(t){return(d="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})(t)}!function(){var s=t("boxzilla"),l=window.boxzilla_options;function a(t){if(!window.location.hash||0===window.location.hash.length)return!1;var e=window.location.hash.substring(1);return!!/^[a-zA-Z\-\_0-9]+$/.test(e)&&(e===t.element.id||!!t.element.querySelector("#"+e))}window.Boxzilla=s;var c=-1<document.body.className.indexOf("logged-in");c&&l.testMode&&console.log("Boxzilla: Test mode is enabled. Please disable test mode if you're done testing."),s.init(),window.addEventListener("load",function(){if(!l.inited){for(var t in l.boxes){var e=l.boxes[t];e.testMode=c&&l.testMode;var i=document.getElementById("boxzilla-box-"+e.id+"-content");if(i){e.content=i;var n=s.create(e.id,e);n.element.className=n.element.className+" boxzilla-"+e.post.slug,o=n.element,(r=e.css).background_color&&(o.style.background=r.background_color),r.color&&(o.style.color=r.color),r.border_color&&(o.style.borderColor=r.border_color),r.border_width&&(o.style.borderWidth=parseInt(r.border_width)+"px"),r.border_style&&(o.style.borderStyle=r.border_style),r.width&&(o.style.maxWidth=parseInt(r.width)+"px"),n.element.firstChild.firstChild.className+=" first-child",n.element.firstChild.lastChild.className+=" last-child",n.fits()&&a(n)&&n.show()}}var o,r;l.inited=!0,s.trigger("done"),function(){if("object"===d(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 n.show()}}}()}})}()},{boxzilla:5}],2:[function(t,s,e){(function(){"use strict";function t(){}var e=t.prototype,i=this,n=i.EventEmitter;function r(t,e){for(var i=t.length;i--;)if(t[i].listener===e)return i;return-1}function o(t){return function(){return this[t].apply(this,arguments)}}e.getListeners=function(t){var e,i,n=this._getEvents();if(t instanceof RegExp)for(i in e={},n)n.hasOwnProperty(i)&&t.test(i)&&(e[i]=n[i]);else e=n[t]||(n[t]=[]);return e},e.flattenListeners=function(t){var e,i=[];for(e=0;e<t.length;e+=1)i.push(t[e].listener);return i},e.getListenersAsObject=function(t){var e,i=this.getListeners(t);return i instanceof Array&&((e={})[t]=i),e||i},e.addListener=function(t,e){var i,n=this.getListenersAsObject(t),o="object"==typeof e;for(i in n)n.hasOwnProperty(i)&&-1===r(n[i],e)&&n[i].push(o?e:{listener:e,once:!1});return this},e.on=o("addListener"),e.addOnceListener=function(t,e){return this.addListener(t,{listener:e,once:!0})},e.once=o("addOnceListener"),e.defineEvent=function(t){return this.getListeners(t),this},e.defineEvents=function(t){for(var e=0;e<t.length;e+=1)this.defineEvent(t[e]);return this},e.removeListener=function(t,e){var i,n,o=this.getListenersAsObject(t);for(n in o)o.hasOwnProperty(n)&&-1!==(i=r(o[n],e))&&o[n].splice(i,1);return this},e.off=o("removeListener"),e.addListeners=function(t,e){return this.manipulateListeners(!1,t,e)},e.removeListeners=function(t,e){return this.manipulateListeners(!0,t,e)},e.manipulateListeners=function(t,e,i){var n,o,r=t?this.removeListener:this.addListener,s=t?this.removeListeners:this.addListeners;if("object"!=typeof e||e instanceof RegExp)for(n=i.length;n--;)r.call(this,e,i[n]);else for(n in e)e.hasOwnProperty(n)&&(o=e[n])&&("function"==typeof o?r.call(this,n,o):s.call(this,n,o));return this},e.removeEvent=function(t){var e,i=typeof t,n=this._getEvents();if("string"===i)delete n[t];else if(t instanceof RegExp)for(e in n)n.hasOwnProperty(e)&&t.test(e)&&delete n[e];else delete this._events;return this},e.removeAllListeners=o("removeEvent"),e.emitEvent=function(t,e){var i,n,o,r,s=this.getListenersAsObject(t);for(r in s)if(s.hasOwnProperty(r))for(o=(i=s[r].slice(0)).length;o--;)!0===(n=i[o]).once&&this.removeListener(t,n.listener),n.listener.apply(this,e||[])===this._getOnceReturnValue()&&this.removeListener(t,n.listener);return this},e.trigger=o("emitEvent"),e.emit=function(t){var e=Array.prototype.slice.call(arguments,1);return this.emitEvent(t,e)},e.setOnceReturnValue=function(t){return this._onceReturnValue=t,this},e._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},e._getEvents=function(){return this._events||(this._events={})},t.noConflict=function(){return i.EventEmitter=n,t},"function"==typeof l&&l.amd?l(function(){return t}):"object"==typeof s&&s.exports?s.exports=t:i.EventEmitter=t}).call(this)},{}],3:[function(t,e,i){"use strict";var o=320;function c(t,e){for(var i in e)t.style[i]=e[i]}function d(c,d,h){var f=+new Date,t=window.getComputedStyle(c),u={},g={};for(var e in d){d[e]=parseFloat(d[e]);var i=d[e],n=parseFloat(t[e]);n!=i?(g[e]=(i-n)/o,u[e]=n):delete d[e]}!function t(){var e,i,n,o,r=+new Date-f,s=!0;for(var l in d){e=g[l],i=d[l],n=e*r,o=u[l]+n,0<e&&i<=o||e<0&&o<=i?o=i:s=!1,u[l]=o;var a="opacity"!==l?"px":"";c.style[l]=o+a}f=+new Date,s?h&&h():window.requestAnimationFrame&&requestAnimationFrame(t)||setTimeout(t,32)}()}e.exports={toggle:function(t,e,i){var n,o,r="none"!=t.style.display||0<t.offsetLeft,s=t.cloneNode(!0),l=function(){t.removeAttribute("data-animated"),t.setAttribute("style",s.getAttribute("style")),t.style.display=r?"none":"",i&&i()};if(t.setAttribute("data-animated","true"),r||(t.style.display=""),"slide"===e){if(n=function(t,e){for(var i={},n=0;n<t.length;n++)i[t[n]]=e;return i}(["height","borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],0),o={},!r){if(o=function(t,e){for(var i={},n=0;n<t.length;n++)i[t[n]]=e[t[n]];return i}(["height","borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],window.getComputedStyle(t)),!isFinite(o.height)){var a=t.getBoundingClientRect();o.height=a.height}c(t,n)}t.style.overflowY="hidden",d(t,r?n:o,l)}else n={opacity:0},o={opacity:1},r||c(t,n),d(t,r?n:o,l)},animate:d,animated:function(t){return!!t.getAttribute("data-animated")}}},{}],4:[function(t,e,i){"use strict";var n,o={animation:"fade",rehide:!1,content:"",cookie:null,icon:"×",screenWidthCondition:null,position:"center",testMode:!1,trigger:!1,closable:!0},r=t("./animator.js");var s=function(t,e){this.id=t,this.config=function(t,e){var i={};for(var n in t)i[n]=t[n];for(var n in e)i[n]=e[n];return i}(o,e),this.overlay=document.getElementById("boxzilla-overlay"),this.visible=!1,this.dismissed=!1,this.triggered=!1,this.triggerHeight=this.calculateTriggerHeight(),this.cookieSet=this.isCookieSet(),this.element=null,this.contentElement=null,this.closeIcon=null,this.dom(),this.events()};s.prototype.events=function(){var e=this;this.closeIcon&&this.closeIcon.addEventListener("click",this.dismiss.bind(this)),this.element.addEventListener("click",function(t){"A"===t.target.tagName&&n.trigger("box.interactions.link",[e,t.target])},!1),this.element.addEventListener("submit",function(t){e.setCookie(),n.trigger("box.interactions.form",[e,t.target])},!1)},s.prototype.dom=function(){var t=document.createElement("div");t.className="boxzilla-container boxzilla-"+this.config.position+"-container";var e,i=document.createElement("div");if(i.setAttribute("id","boxzilla-"+this.id),i.className="boxzilla boxzilla-"+this.id+" boxzilla-"+this.config.position,i.style.display="none",t.appendChild(i),"string"==typeof this.config.content?(e=document.createElement("div")).innerHTML=this.config.content:(e=this.config.content).style.display="",e.className="boxzilla-content",i.appendChild(e),this.config.closable&&this.config.icon){var n=document.createElement("span");n.className="boxzilla-close-icon",n.innerHTML=this.config.icon,i.appendChild(n),this.closeIcon=n}document.body.appendChild(t),this.contentElement=e,this.element=i},s.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(e<i&&(this.element.style.maxHeight=e+"px",this.element.style.overflowY="scroll"),"center"===this.config.position){var n=(e-i)/2;n=0<=n?n:0,this.element.style.marginTop=n+"px"}this.element.style.display=t},s.prototype.toggle=function(t){return void 0===t&&(t=!this.visible),t!==this.visible&&(!r.animated(this.element)&&(!(!t&&!this.config.closable)&&(this.visible=t,this.setCustomBoxStyling(),n.trigger("box."+(t?"show":"hide"),[this]),"center"===this.config.position&&(this.overlay.classList.toggle("boxzilla-"+this.id+"-overlay"),r.toggle(this.overlay,"fade")),r.toggle(this.element,this.config.animation,function(){this.visible||(this.contentElement.innerHTML=this.contentElement.innerHTML)}.bind(this)),!0)))},s.prototype.show=function(){return this.toggle(!0)},s.prototype.hide=function(){return this.toggle(!1)},s.prototype.calculateTriggerHeight=function(){var t,e,i=0;if(this.config.trigger)if("element"===this.config.trigger.method){var n=document.body.querySelector(this.config.trigger.value);if(n)i=n.getBoundingClientRect().top}else"percentage"===this.config.trigger.method&&(i=this.config.trigger.value/100*(t=document.body,e=document.documentElement,Math.max(t.scrollHeight,t.offsetHeight,e.clientHeight,e.scrollHeight,e.offsetHeight)));return i},s.prototype.fits=function(){if(!this.config.screenWidthCondition||!this.config.screenWidthCondition.value)return!0;switch(this.config.screenWidthCondition.condition){case"larger":return window.innerWidth>this.config.screenWidthCondition.value;case"smaller":return window.innerWidth<this.config.screenWidthCondition.value}return!0},s.prototype.onResize=function(){this.triggerHeight=this.calculateTriggerHeight(),this.setCustomBoxStyling()},s.prototype.mayAutoShow=function(){return!this.dismissed&&(!!this.fits()&&(!!this.config.trigger&&!this.cookieSet))},s.prototype.mayRehide=function(){return this.config.rehide&&this.triggered},s.prototype.isCookieSet=function(){return!(this.config.testMode||!this.config.trigger)&&(!(!this.config.cookie||!this.config.cookie.triggered&&!this.config.cookie.dismissed)&&"true"===document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*boxzilla_box_"+this.id+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))},s.prototype.setCookie=function(t){var e=new Date;e.setHours(e.getHours()+t),document.cookie="boxzilla_box_"+this.id+"=true; expires="+e.toUTCString()+"; path=/"},s.prototype.trigger=function(){this.show()&&(this.triggered=!0,this.config.cookie&&this.config.cookie.triggered&&this.setCookie(this.config.cookie.triggered))},s.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,n.trigger("box.dismiss",[this]),!0)},e.exports=function(t){return n=t,s}},{"./animator.js":3}],5:[function(i,t,e){"use strict";var n,o,r,s,l,a,c=i("wolfy87-eventemitter"),d=Object.create(c.prototype),h=i("./box.js")(d),f=i("./timer.js"),u=[],g=window;function m(n,o,r){var s,l;return o||(o=250),function(){var t=r||this,e=+new Date,i=arguments;s&&e<s+o?(clearTimeout(l),l=setTimeout(function(){s=e,n.apply(t,i)},o)):(s=e,n.apply(t,i))}}function p(t){27==t.keyCode&&d.dismiss()}function v(){L()||u.forEach(function(t){t.mayAutoShow()&&"pageviews"===t.config.trigger.method&&a>=t.config.trigger.value&&t.trigger()})}function b(){L()||u.forEach(function(t){t.mayAutoShow()&&("time_on_site"===t.config.trigger.method&&s.time>=t.config.trigger.value&&t.trigger(),"time_on_page"===t.config.trigger.method&&l.time>=t.config.trigger.value&&t.trigger())})}function y(){var e=g.hasOwnProperty("pageYOffset")?g.pageYOffset:g.scrollTop;e+=.9*window.innerHeight,u.forEach(function(t){if(t.mayAutoShow()&&!(t.triggerHeight<=0)){if(e>t.triggerHeight){if(L())return;t.trigger()}t.mayRehide()&&e<t.triggerHeight-5&&t.hide()}})}function w(){u.forEach(function(t){t.onResize()})}function x(t){var i=t.offsetX,n=t.offsetY;u.forEach(function(t){var e=t.element.getBoundingClientRect();(i<e.left-40||i>e.right+40||n<e.top-40||n>e.bottom+40)&&t.dismiss()})}function E(){r||L()||(u.forEach(function(t){t.mayAutoShow()&&"exit_intent"===t.config.trigger.method&&t.trigger()}),r=!0)}function z(t){t.clientY<=0&&(o=window.setTimeout(E,400))}function L(){for(var t=0;t<u.length;t++){if(u[t].visible)return!0}return!1}function _(){o&&(window.clearInterval(o),o=null)}function C(t){for(var e=t.target||t.srcElement,i=0;i<=3&&(e&&"A"!==e.tagName);i++)e=e.parentElement;if(e&&"A"===e.tagName&&e.getAttribute("href")&&0===e.getAttribute("href").toLowerCase().indexOf("#boxzilla-")){var n=e.getAttribute("href").toLowerCase().substring("#boxzilla-".length);d.toggle(n)}}var k=function(){try{var t=sessionStorage.getItem("boxzilla_timer");t&&(s.time=t)}catch(t){}s.start(),l.start()},S=function(){sessionStorage.setItem("boxzilla_timer",s.time),s.stop(),l.stop()};d.init=function(){document.body.addEventListener("click",C,!0);try{a=sessionStorage.getItem("boxzilla_pageviews")||0}catch(t){a=0}s=new f(0),l=new f(0);var t=i("./styles.js"),e=document.createElement("style");e.setAttribute("type","text/css"),e.innerHTML=t,document.head.appendChild(e),(n=document.createElement("div")).style.display="none",n.id="boxzilla-overlay",document.body.appendChild(n),g.addEventListener("touchstart",m(y),!0),g.addEventListener("scroll",m(y),!0),window.addEventListener("resize",m(w)),window.addEventListener("load",w),n.addEventListener("click",x),window.setInterval(b,1e3),window.setTimeout(v,1e3),document.documentElement.addEventListener("mouseleave",z),document.documentElement.addEventListener("mouseenter",_),document.addEventListener("keyup",p),k(),window.addEventListener("focus",k),window.addEventListener("beforeunload",function(){S(),sessionStorage.setItem("boxzilla_pageviews",++a)}),window.addEventListener("blur",S),d.trigger("ready")},d.create=function(t,e){void 0!==e.minimumScreenWidth&&(e.screenWidthCondition={condition:"larger",value:e.minimumScreenWidth});var i=new h(t,e);return u.push(i),i},d.get=function(t){for(var e=0;e<u.length;e++){var i=u[e];if(i.id==t)return i}throw new Error("No box exists with ID "+t)},d.dismiss=function(t){void 0===t?u.forEach(function(t){t.dismiss()}):d.get(t).dismiss()},d.hide=function(t){void 0===t?u.forEach(function(t){t.hide()}):d.get(t).hide()},d.show=function(t){void 0===t?u.forEach(function(t){t.show()}):d.get(t).show()},d.toggle=function(t){void 0===t?u.forEach(function(t){t.toggle()}):d.get(t).toggle()},d.boxes=u,window.Boxzilla=d,void 0!==t&&t.exports&&(t.exports=d)},{"./box.js":4,"./styles.js":6,"./timer.js":7,"wolfy87-eventemitter":2}],6:[function(t,e,i){"use strict";e.exports="#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}"},{}],7:[function(t,e,i){"use strict";var n=function(t){this.time=t,this.interval=0};n.prototype.tick=function(){this.time++},n.prototype.start=function(){this.interval||(this.interval=window.setInterval(this.tick.bind(this),1e3))},n.prototype.stop=function(){this.interval&&(window.clearInterval(this.interval),this.interval=0)},e.exports=n},{}]},{},[1])}();
|
2 |
Â
//# sourceMappingURL=script.min.js.map
|
1 |
+
!function(){var l=void 0;!function r(s,l,c){function a(e,t){if(!l[e]){if(!s[e]){var i=!1;if(!t&&i)return i(e,!0);if(d)return d(e,!0);var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}var o=l[e]={exports:{}};s[e][0].call(o.exports,function(t){return a(s[e][1][t]||t)},o,o.exports,r,s,l,c)}return l[e].exports}for(var d=!1,t=0;t<c.length;t++)a(c[t]);return a}({1:[function(t,s,e){!function(t){"use strict";function e(){}var i=e.prototype,n=t.EventEmitter;function r(t,e){for(var i=t.length;i--;)if(t[i].listener===e)return i;return-1}function o(t){return function(){return this[t].apply(this,arguments)}}i.getListeners=function(t){var e,i,n=this._getEvents();if(t instanceof RegExp)for(i in e={},n)n.hasOwnProperty(i)&&t.test(i)&&(e[i]=n[i]);else e=n[t]||(n[t]=[]);return e},i.flattenListeners=function(t){var e,i=[];for(e=0;e<t.length;e+=1)i.push(t[e].listener);return i},i.getListenersAsObject=function(t){var e,i=this.getListeners(t);return i instanceof Array&&((e={})[t]=i),e||i},i.addListener=function(t,e){if(!function t(e){return"function"==typeof e||e instanceof RegExp||!(!e||"object"!=typeof e)&&t(e.listener)}(e))throw new TypeError("listener must be a function");var i,n=this.getListenersAsObject(t),o="object"==typeof e;for(i in n)n.hasOwnProperty(i)&&-1===r(n[i],e)&&n[i].push(o?e:{listener:e,once:!1});return this},i.on=o("addListener"),i.addOnceListener=function(t,e){return this.addListener(t,{listener:e,once:!0})},i.once=o("addOnceListener"),i.defineEvent=function(t){return this.getListeners(t),this},i.defineEvents=function(t){for(var e=0;e<t.length;e+=1)this.defineEvent(t[e]);return this},i.removeListener=function(t,e){var i,n,o=this.getListenersAsObject(t);for(n in o)o.hasOwnProperty(n)&&-1!==(i=r(o[n],e))&&o[n].splice(i,1);return this},i.off=o("removeListener"),i.addListeners=function(t,e){return this.manipulateListeners(!1,t,e)},i.removeListeners=function(t,e){return this.manipulateListeners(!0,t,e)},i.manipulateListeners=function(t,e,i){var n,o,r=t?this.removeListener:this.addListener,s=t?this.removeListeners:this.addListeners;if("object"!=typeof e||e instanceof RegExp)for(n=i.length;n--;)r.call(this,e,i[n]);else for(n in e)e.hasOwnProperty(n)&&(o=e[n])&&("function"==typeof o?r.call(this,n,o):s.call(this,n,o));return this},i.removeEvent=function(t){var e,i=typeof t,n=this._getEvents();if("string"===i)delete n[t];else if(t instanceof RegExp)for(e in n)n.hasOwnProperty(e)&&t.test(e)&&delete n[e];else delete this._events;return this},i.removeAllListeners=o("removeEvent"),i.emitEvent=function(t,e){var i,n,o,r,s=this.getListenersAsObject(t);for(r in s)if(s.hasOwnProperty(r))for(i=s[r].slice(0),o=0;o<i.length;o++)!0===(n=i[o]).once&&this.removeListener(t,n.listener),n.listener.apply(this,e||[])===this._getOnceReturnValue()&&this.removeListener(t,n.listener);return this},i.trigger=o("emitEvent"),i.emit=function(t){var e=Array.prototype.slice.call(arguments,1);return this.emitEvent(t,e)},i.setOnceReturnValue=function(t){return this._onceReturnValue=t,this},i._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},i._getEvents=function(){return this._events||(this._events={})},e.noConflict=function(){return t.EventEmitter=n,e},"function"==typeof l&&l.amd?l(function(){return e}):"object"==typeof s&&s.exports?s.exports=e:t.EventEmitter=e}("undefined"!=typeof window?window:this||{})},{}],2:[function(t,e,i){"use strict";var o=320;function a(t,e){for(var i in e)t.style[i]=e[i]}function d(a,d,u){var h=+new Date,t=window.getComputedStyle(a),f={},g={};for(var e in d){d[e]=parseFloat(d[e]);var i=d[e],n=parseFloat(t[e]);n!=i?(g[e]=(i-n)/o,f[e]=n):delete d[e]}!function t(){var e,i,n,o,r=+new Date-h,s=!0;for(var l in d){e=g[l],i=d[l],n=e*r,o=f[l]+n,0<e&&i<=o||e<0&&o<=i?o=i:s=!1,f[l]=o;var c="opacity"!==l?"px":"";a.style[l]=o+c}h=+new Date,s?u&&u():window.requestAnimationFrame&&requestAnimationFrame(t)||setTimeout(t,32)}()}e.exports={toggle:function(t,e,i){var n,o,r="none"!=t.style.display||0<t.offsetLeft,s=t.cloneNode(!0),l=function(){t.removeAttribute("data-animated"),t.setAttribute("style",s.getAttribute("style")),t.style.display=r?"none":"",i&&i()};if(t.setAttribute("data-animated","true"),r||(t.style.display=""),"slide"===e){if(n=function(t,e){for(var i={},n=0;n<t.length;n++)i[t[n]]=e;return i}(["height","borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],0),o={},!r){if(o=function(t,e){for(var i={},n=0;n<t.length;n++)i[t[n]]=e[t[n]];return i}(["height","borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],window.getComputedStyle(t)),!isFinite(o.height)){var c=t.getBoundingClientRect();o.height=c.height}a(t,n)}t.style.overflowY="hidden",d(t,r?n:o,l)}else n={opacity:0},o={opacity:1},r||a(t,n),d(t,r?n:o,l)},animate:d,animated:function(t){return!!t.getAttribute("data-animated")}}},{}],3:[function(t,e,i){"use strict";var n,o={animation:"fade",rehide:!1,content:"",cookie:null,icon:"×",screenWidthCondition:null,position:"center",testMode:!1,trigger:!1,closable:!0},r=t("./animator.js");var s=function(t,e){this.id=t,this.config=function(t,e){var i={};for(var n in t)i[n]=t[n];for(var n in e)i[n]=e[n];return i}(o,e),this.overlay=document.getElementById("boxzilla-overlay"),this.visible=!1,this.dismissed=!1,this.triggered=!1,this.triggerHeight=this.calculateTriggerHeight(),this.cookieSet=this.isCookieSet(),this.element=null,this.contentElement=null,this.closeIcon=null,this.dom(),this.events()};s.prototype.events=function(){var e=this;this.closeIcon&&this.closeIcon.addEventListener("click",this.dismiss.bind(this)),this.element.addEventListener("click",function(t){"A"===t.target.tagName&&n.trigger("box.interactions.link",[e,t.target])},!1),this.element.addEventListener("submit",function(t){e.setCookie(),n.trigger("box.interactions.form",[e,t.target])},!1)},s.prototype.dom=function(){var t=document.createElement("div");t.className="boxzilla-container boxzilla-"+this.config.position+"-container";var e,i=document.createElement("div");if(i.setAttribute("id","boxzilla-"+this.id),i.className="boxzilla boxzilla-"+this.id+" boxzilla-"+this.config.position,i.style.display="none",t.appendChild(i),"string"==typeof this.config.content?(e=document.createElement("div")).innerHTML=this.config.content:(e=this.config.content).style.display="",e.className="boxzilla-content",i.appendChild(e),this.config.closable&&this.config.icon){var n=document.createElement("span");n.className="boxzilla-close-icon",n.innerHTML=this.config.icon,i.appendChild(n),this.closeIcon=n}document.body.appendChild(t),this.contentElement=e,this.element=i},s.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(e<i&&(this.element.style.maxHeight=e+"px",this.element.style.overflowY="scroll"),"center"===this.config.position){var n=(e-i)/2;n=0<=n?n:0,this.element.style.marginTop=n+"px"}this.element.style.display=t},s.prototype.toggle=function(t){return void 0===t&&(t=!this.visible),t!==this.visible&&(!r.animated(this.element)&&(!(!t&&!this.config.closable)&&(this.visible=t,this.setCustomBoxStyling(),n.trigger("box."+(t?"show":"hide"),[this]),"center"===this.config.position&&(this.overlay.classList.toggle("boxzilla-"+this.id+"-overlay"),r.toggle(this.overlay,"fade")),r.toggle(this.element,this.config.animation,function(){this.visible||(this.contentElement.innerHTML=this.contentElement.innerHTML)}.bind(this)),!0)))},s.prototype.show=function(){return this.toggle(!0)},s.prototype.hide=function(){return this.toggle(!1)},s.prototype.calculateTriggerHeight=function(){var t,e,i=0;if(this.config.trigger)if("element"===this.config.trigger.method){var n=document.body.querySelector(this.config.trigger.value);if(n)i=n.getBoundingClientRect().top}else"percentage"===this.config.trigger.method&&(i=this.config.trigger.value/100*(t=document.body,e=document.documentElement,Math.max(t.scrollHeight,t.offsetHeight,e.clientHeight,e.scrollHeight,e.offsetHeight)));return i},s.prototype.fits=function(){if(!this.config.screenWidthCondition||!this.config.screenWidthCondition.value)return!0;switch(this.config.screenWidthCondition.condition){case"larger":return window.innerWidth>this.config.screenWidthCondition.value;case"smaller":return window.innerWidth<this.config.screenWidthCondition.value}return!0},s.prototype.onResize=function(){this.triggerHeight=this.calculateTriggerHeight(),this.setCustomBoxStyling()},s.prototype.mayAutoShow=function(){return!this.dismissed&&(!!this.fits()&&(!!this.config.trigger&&!this.cookieSet))},s.prototype.mayRehide=function(){return this.config.rehide&&this.triggered},s.prototype.isCookieSet=function(){return!(this.config.testMode||!this.config.trigger)&&(!(!this.config.cookie||!this.config.cookie.triggered&&!this.config.cookie.dismissed)&&"true"===document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*boxzilla_box_"+this.id+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))},s.prototype.setCookie=function(t){var e=new Date;e.setHours(e.getHours()+t),document.cookie="boxzilla_box_"+this.id+"=true; expires="+e.toUTCString()+"; path=/"},s.prototype.trigger=function(){this.show()&&(this.triggered=!0,this.config.cookie&&this.config.cookie.triggered&&this.setCookie(this.config.cookie.triggered))},s.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,n.trigger("box.dismiss",[this]),!0)},e.exports=function(t){return n=t,s}},{"./animator.js":2}],4:[function(t,e,i){"use strict";var n,o,r,s,l=t("wolfy87-eventemitter"),c=t("./timer.js"),a=Object.create(l.prototype),d=t("./box.js")(a),u=[],h=window,f=!1,g=t("./styles.js"),m=t("./triggers/exit-intent.js");function p(n,o,r){var s,l;return o||(o=250),function(){var t=r||this,e=+new Date,i=arguments;s&&e<s+o?(clearTimeout(l),l=setTimeout(function(){s=e,n.apply(t,i)},o)):(s=e,n.apply(t,i))}}function v(t){27===t.keyCode&&a.dismiss()}function b(){z()||u.forEach(function(t){t.mayAutoShow()&&"pageviews"===t.config.trigger.method&&s>=t.config.trigger.value&&t.trigger()})}function w(){z()||u.forEach(function(t){t.mayAutoShow()&&("time_on_site"===t.config.trigger.method&&o.time>=t.config.trigger.value&&t.trigger(),"time_on_page"===t.config.trigger.method&&r.time>=t.config.trigger.value&&t.trigger())})}function y(){var e=h.hasOwnProperty("pageYOffset")?h.pageYOffset:h.scrollTop;e+=.9*window.innerHeight,u.forEach(function(t){if(t.mayAutoShow()&&!(t.triggerHeight<=0)){if(e>t.triggerHeight){if(z())return;t.trigger()}t.mayRehide()&&e<t.triggerHeight-5&&t.hide()}})}function x(){u.forEach(function(t){t.onResize()})}function E(t){var i=t.offsetX,n=t.offsetY;u.forEach(function(t){var e=t.element.getBoundingClientRect();(i<e.left-40||i>e.right+40||n<e.top-40||n>e.bottom+40)&&t.dismiss()})}function L(){z()||u.forEach(function(t){t.mayAutoShow()&&"exit_intent"===t.config.trigger.method&&t.trigger()})}function z(){return 0<u.filter(function(t){return t.visible}).length}function _(t){for(var e=t.target||t.srcElement,i=0;i<=3&&(e&&"A"!==e.tagName);i++)e=e.parentElement;if(e&&"A"===e.tagName&&e.getAttribute("href")&&0===e.getAttribute("href").toLowerCase().indexOf("#boxzilla-")){var n=e.getAttribute("href").toLowerCase().substring("#boxzilla-".length);a.toggle(n)}}var k=function(){try{var t=sessionStorage.getItem("boxzilla_timer");t&&(o.time=t)}catch(t){}o.start(),r.start()},C=function(){sessionStorage.setItem("boxzilla_timer",o.time),o.stop(),r.stop()};a.init=function(){if(!f){document.body.addEventListener("click",_,!0);try{s=sessionStorage.getItem("boxzilla_pageviews")||0}catch(t){s=0}o=new c(0),r=new c(0);var t=document.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=g,document.head.appendChild(t),(n=document.createElement("div")).style.display="none",n.id="boxzilla-overlay",document.body.appendChild(n),new m(L),h.addEventListener("touchstart",p(y),!0),h.addEventListener("scroll",p(y),!0),window.addEventListener("resize",p(x)),window.addEventListener("load",x),n.addEventListener("click",E),window.setInterval(w,1e3),window.setTimeout(b,1e3),document.addEventListener("keyup",v),k(),window.addEventListener("focus",k),window.addEventListener("beforeunload",function(){C(),sessionStorage.setItem("boxzilla_pageviews",++s)}),window.addEventListener("blur",C),a.trigger("ready"),f=!0}},a.create=function(t,e){void 0!==e.minimumScreenWidth&&(e.screenWidthCondition={condition:"larger",value:e.minimumScreenWidth});var i=new d(t,e);return u.push(i),i},a.get=function(t){for(var e=0;e<u.length;e++){var i=u[e];if(i.id==t)return i}throw new Error("No box exists with ID "+t)},a.dismiss=function(t){void 0===t?u.forEach(function(t){t.dismiss()}):a.get(t).dismiss()},a.hide=function(t){void 0===t?u.forEach(function(t){t.hide()}):a.get(t).hide()},a.show=function(t){void 0===t?u.forEach(function(t){t.show()}):a.get(t).show()},a.toggle=function(t){void 0===t?u.forEach(function(t){t.toggle()}):a.get(t).toggle()},a.boxes=u,window.Boxzilla=a,void 0!==e&&e.exports&&(e.exports=a)},{"./box.js":3,"./styles.js":5,"./timer.js":6,"./triggers/exit-intent.js":7,"wolfy87-eventemitter":1}],5:[function(t,e,i){"use strict";e.exports="#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}"},{}],6:[function(t,e,i){"use strict";var n=function(t){this.time=t,this.interval=0};n.prototype.tick=function(){this.time++},n.prototype.start=function(){this.interval||(this.interval=window.setInterval(this.tick.bind(this),1e3))},n.prototype.stop=function(){this.interval&&(window.clearInterval(this.interval),this.interval=0)},e.exports=n},{}],7:[function(t,e,i){"use strict";e.exports=function(t){var e=null,i={};function n(){document.documentElement.removeEventListener("mouseleave",s),document.documentElement.removeEventListener("mouseenter",r),document.documentElement.removeEventListener("click",o),window.removeEventListener("touchstart",l),window.removeEventListener("touchend",c),t()}function o(){null!==e&&(window.clearTimeout(e),e=null)}function r(t){o()}function s(t){o(),t.clientY<=0&&t.clientX<.8*window.innerWidth&&(e=window.setTimeout(n,400))}function l(t){o(),i={timestamp:performance.now(),scrollY:window.scrollY,windowHeight:window.innerHeight}}function c(t){o(),window.innerHeight>i.windowHeight||window.scrollY+20>=i.scrollY||300<performance.now()-i.timestamp||-1<["A","INPUT","BUTTON"].indexOf(t.target.tagName)||(e=window.setTimeout(n,800))}window.addEventListener("touchstart",l),window.addEventListener("touchend",c),document.documentElement.addEventListener("mouseenter",r),document.documentElement.addEventListener("mouseleave",s),document.documentElement.addEventListener("click",o)}},{}],8:[function(t,e,i){"use strict";function d(t){return(d="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})(t)}!function(){var s=t("boxzilla"),l=window.boxzilla_options;function c(t){if(!window.location.hash||0===window.location.hash.length)return!1;var e=window.location.hash.substring(1);return!!/^[a-zA-Z\-\_0-9]+$/.test(e)&&(e===t.element.id||!!t.element.querySelector("#"+e))}window.Boxzilla=s;var a=-1<document.body.className.indexOf("logged-in");a&&l.testMode&&console.log("Boxzilla: Test mode is enabled. Please disable test mode if you're done testing."),s.init(),window.addEventListener("load",function(){if(!l.inited){for(var t in l.boxes){var e=l.boxes[t];e.testMode=a&&l.testMode;var i=document.getElementById("boxzilla-box-"+e.id+"-content");if(i){e.content=i;var n=s.create(e.id,e);n.element.className=n.element.className+" boxzilla-"+e.post.slug,o=n.element,(r=e.css).background_color&&(o.style.background=r.background_color),r.color&&(o.style.color=r.color),r.border_color&&(o.style.borderColor=r.border_color),r.border_width&&(o.style.borderWidth=parseInt(r.border_width)+"px"),r.border_style&&(o.style.borderStyle=r.border_style),r.width&&(o.style.maxWidth=parseInt(r.width)+"px"),n.element.firstChild.firstChild.className+=" first-child",n.element.firstChild.lastChild.className+=" last-child",n.fits()&&c(n)&&n.show()}}var o,r;l.inited=!0,s.trigger("done"),function(){if("object"===d(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 n.show()}}}()}})}()},{boxzilla:4}]},{},[8])}();
|
2 |
Â
//# sourceMappingURL=script.min.js.map
|
assets/js/script.min.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["script.js"],"names":["define","undefined","r","e","n","t","o","i","f","c","u","a","Error","code","p","exports","call","length","1","require","module","_typeof","obj","Symbol","iterator","constructor","prototype","Boxzilla","options","window","boxzilla_options","locationHashRefersBox","box","location","hash","elementId","substring","test","element","id","querySelector","isLoggedIn","document","body","className","indexOf","testMode","console","log","init","addEventListener","inited","key","boxes","boxOpts","boxContentElement","getElementById","content","create","post","slug","styles","css","background_color","style","background","color","border_color","borderColor","border_width","borderWidth","parseInt","border_style","borderStyle","width","maxWidth","firstChild","lastChild","fits","show","trigger","mc4wp_forms_config","submitted_form","selector","element_id","boxId","hasOwnProperty","maybeOpenMailChimpForWordPressBox","boxzilla","2","EventEmitter","proto","this","originalGlobalValue","indexOfListener","listeners","listener","alias","name","apply","arguments","getListeners","evt","response","events","_getEvents","RegExp","flattenListeners","flatListeners","push","getListenersAsObject","Array","addListener","listenerIsWrapped","once","on","addOnceListener","defineEvent","defineEvents","evts","removeListener","index","splice","off","addListeners","manipulateListeners","removeListeners","remove","value","single","multiple","removeEvent","type","_events","removeAllListeners","emitEvent","args","listenersMap","slice","_getOnceReturnValue","emit","setOnceReturnValue","_onceReturnValue","noConflict","amd","3","duration","property","animate","targetStyles","fn","last","Date","initialStyles","getComputedStyle","currentStyles","propSteps","parseFloat","to","current","tick","step","increment","newValue","timeSinceLastTick","done","suffix","requestAnimationFrame","setTimeout","toggle","animation","callbackFn","hiddenStyles","visibleStyles","nowVisible","display","offsetLeft","clone","cloneNode","cleanup","removeAttribute","setAttribute","getAttribute","properties","newObject","initObjectProperties","object","copyObjectProperties","isFinite","height","clientRect","getBoundingClientRect","overflowY","opacity","animated","4","defaults","rehide","cookie","icon","screenWidthCondition","position","closable","Animator","Box","config","obj1","obj2","obj3","attrname","merge","overlay","visible","dismissed","triggered","triggerHeight","calculateTriggerHeight","cookieSet","isCookieSet","contentElement","closeIcon","dom","dismiss","bind","target","tagName","setCookie","wrapper","createElement","appendChild","innerHTML","setCustomBoxStyling","origDisplay","maxHeight","windowHeight","innerHeight","boxHeight","clientHeight","newTopMargin","marginTop","classList","hide","html","method","triggerElement","top","documentElement","Math","max","scrollHeight","offsetHeight","condition","innerWidth","onResize","mayAutoShow","mayRehide","replace","hours","expiryDate","setHours","getHours","toUTCString","preventDefault","_Boxzilla","./animator.js","5","exitIntentDelayTimer","exitIntentTriggered","siteTimer","pageTimer","pageViews","Object","Timer","scrollElement","throttle","threshhold","scope","deferTimer","context","now","clearTimeout","onKeyUp","keyCode","checkPageViewsCriteria","isAnyBoxVisible","forEach","checkTimeCriteria","time","checkHeightCriteria","scrollY","pageYOffset","scrollTop","recalculateHeights","onOverlayClick","x","offsetX","y","offsetY","rect","left","right","bottom","triggerExitIntent","onMouseLeave","clientY","onMouseEnter","clearInterval","onElementClick","el","srcElement","parentElement","toLowerCase","timers","sessionTime","sessionStorage","getItem","start","setItem","stop","styleElement","head","setInterval","opts","minimumScreenWidth","get","./box.js","./styles.js","./timer.js","wolfy87-eventemitter","6","7","interval"],"mappings":"CAAA,WAAe,IAA8EA,OAASC,GAAuB,SAASC,EAAEC,EAAEC,EAAEC,GAAG,SAASC,EAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,IAAIE,GAAE,EAAoC,IAAID,GAAGC,EAAE,OAAOA,EAAEF,GAAE,GAAI,GAAGG,EAAE,OAAOA,EAAEH,GAAE,GAAI,IAAII,EAAE,IAAIC,MAAM,uBAAuBL,EAAE,KAAK,MAAMI,EAAEE,KAAK,mBAAmBF,EAAE,IA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EAAIiN,SAGNtN,EAASyS,IAAI7R,GAAI0M,QAIrBtN,EAASoD,KAAO,SAAUxC,QACN,IAAPA,EACTc,EAAMwO,QAAQ,SAAU7P,GACtBA,EAAI+C,SAGNpD,EAASyS,IAAI7R,GAAIwC,QAIrBpD,EAAS8I,OAAS,SAAUlI,QACR,IAAPA,EACTc,EAAMwO,QAAQ,SAAU7P,GACtBA,EAAIyI,WAGN9I,EAASyS,IAAI7R,GAAIkI,UAKrB9I,EAAS0B,MAAQA,EAEjBxB,OAAOF,SAAWA,OAEI,IAAXP,GAA0BA,EAAOL,UAC1CK,EAAOL,QAAUY,IAGjB,CAAC0S,WAAW,EAAEC,cAAc,EAAEC,aAAa,EAAEC,uBAAuB,IAAIC,EAAE,CAAC,SAAStT,EAAQC,EAAOL,GACrG,aAGAK,EAAOL,QADM,0hCAGX,IAAI2T,EAAE,CAAC,SAASvT,EAAQC,EAAOL,GACjC,aAEA,IAAIiQ,EAAQ,SAAe4C,GACzBhO,KAAKmM,KAAO6B,EACZhO,KAAK+O,SAAW,GAGlB3D,EAAMtP,UAAUsI,KAAO,WACrBpE,KAAKmM,QAGPf,EAAMtP,UAAUkS,MAAQ,WACjBhO,KAAK+O,WACR/O,KAAK+O,SAAW9S,OAAOoS,YAAYrO,KAAKoE,KAAK+D,KAAKnI,MAAO,OAI7DoL,EAAMtP,UAAUoS,KAAO,WACjBlO,KAAK+O,WACP9S,OAAOqR,cAActN,KAAK+O,UAC1B/O,KAAK+O,SAAW,IAIpBvT,EAAOL,QAAUiQ,GAEf,KAAK,GAAG,CAAC,IAt+CX","file":"script.min.js","sourcesContent":["(function () { var require = undefined; var module = undefined; var exports = undefined; var define = undefined; (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){\n\"use strict\";\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n(function () {\n 'use strict';\n\n var Boxzilla = require('boxzilla');\n\n var options = window.boxzilla_options; // expose Boxzilla object to window\n\n window.Boxzilla = Boxzilla; // helper function for setting CSS styles\n\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 // failsafe against including script twice.\n if (options.inited) {\n return;\n } // create boxes from options\n\n\n for (var key in options.boxes) {\n // get opts\n var boxOpts = options.boxes[key];\n boxOpts.testMode = isLoggedIn && options.testMode; // find box content element, bail if not found\n\n var boxContentElement = document.getElementById('boxzilla-box-' + boxOpts.id + '-content');\n\n if (!boxContentElement) {\n continue;\n } // use element as content option\n\n\n boxOpts.content = boxContentElement; // create box\n\n var box = Boxzilla.create(boxOpts.id, boxOpts); // add box slug to box element as classname\n\n box.element.className = box.element.className + ' boxzilla-' + boxOpts.post.slug; // add custom css to box\n\n css(box.element, boxOpts.css);\n box.element.firstChild.firstChild.className += \" first-child\";\n box.element.firstChild.lastChild.className += \" last-child\"; // maybe show box right away\n\n if (box.fits() && locationHashRefersBox(box)) {\n box.show();\n }\n } // set flag to prevent initialising twice\n\n\n options.inited = true; // trigger \"done\" event.\n\n Boxzilla.trigger('done'); // maybe open box with MC4WP form in it\n\n maybeOpenMailChimpForWordPressBox();\n }\n\n function locationHashRefersBox(box) {\n if (!window.location.hash || 0 === window.location.hash.length) {\n return false;\n }\n\n var elementId = window.location.hash.substring(1); // only attempt on strings looking like an ID \n\n var regex = /^[a-zA-Z\\-\\_0-9]+$/;\n\n if (!regex.test(elementId)) {\n return false;\n }\n\n if (elementId === box.element.id) {\n return true;\n } else if (box.element.querySelector('#' + elementId)) {\n return true;\n }\n\n return false;\n }\n\n function maybeOpenMailChimpForWordPressBox() {\n if (_typeof(window.mc4wp_forms_config) !== \"object\" || !window.mc4wp_forms_config.submitted_form) {\n return;\n }\n\n var selector = '#' + window.mc4wp_forms_config.submitted_form.element_id;\n var boxes = Boxzilla.boxes;\n\n for (var boxId in boxes) {\n if (!boxes.hasOwnProperty(boxId)) {\n continue;\n }\n\n var box = boxes[boxId];\n\n if (box.element.querySelector(selector)) {\n box.show();\n return;\n }\n }\n } // print message when test mode is enabled\n\n\n var isLoggedIn = document.body.className.indexOf('logged-in') > -1;\n\n if (isLoggedIn && options.testMode) {\n console.log('Boxzilla: Test mode is enabled. Please disable test mode if you\\'re done testing.');\n } // init boxzilla\n\n\n Boxzilla.init(); // on window.load, create DOM elements for boxes\n\n window.addEventListener('load', createBoxesFromConfig);\n})();\n\n},{\"boxzilla\":5}],2:[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},{}],3:[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\n for (var i = 0; i < properties.length; i++) {\n newObject[properties[i]] = value;\n }\n\n return newObject;\n}\n\nfunction copyObjectProperties(properties, object) {\n var newObject = {};\n\n for (var i = 0; i < properties.length; i++) {\n newObject[properties[i]] = object[properties[i]];\n }\n\n return newObject;\n}\n/**\n * Checks if the given element is currently being animated.\n *\n * @param element\n * @returns {boolean}\n */\n\n\nfunction animated(element) {\n return !!element.getAttribute('data-animated');\n}\n/**\n * Toggles the element using the given animation.\n *\n * @param element\n * @param animation Either \"fade\" or \"slide\"\n */\n\n\nfunction toggle(element, animation, callbackFn) {\n var nowVisible = element.style.display != 'none' || element.offsetLeft > 0; // create clone for reference\n\n var clone = element.cloneNode(true);\n\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 if (callbackFn) {\n callbackFn();\n }\n }; // store attribute so everyone knows we're animating this element\n\n\n element.setAttribute('data-animated', \"true\"); // toggle element visiblity right away if we're making something visible\n\n if (!nowVisible) {\n element.style.display = '';\n }\n\n var hiddenStyles, visibleStyles; // animate properties\n\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); // in some browsers, getComputedStyle returns \"auto\" value. this falls back to getBoundingClientRect() in those browsers since we need an actual height.\n\n if (!isFinite(visibleStyles.height)) {\n var clientRect = element.getBoundingClientRect();\n visibleStyles.height = clientRect.height;\n }\n\n css(element, hiddenStyles);\n } // don't show a scrollbar during animation\n\n\n element.style.overflowY = 'hidden';\n animate(element, nowVisible ? hiddenStyles : visibleStyles, cleanup);\n } else {\n hiddenStyles = {\n opacity: 0\n };\n visibleStyles = {\n opacity: 1\n };\n\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]); // calculate step size & current value\n\n var to = targetStyles[property];\n var current = parseFloat(initialStyles[property]); // is there something to do?\n\n if (current == to) {\n delete targetStyles[property];\n continue;\n }\n\n propSteps[property] = (to - current) / duration; // points per second\n\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 var step, to, increment, newValue;\n\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 } // store new value\n\n\n currentStyles[property] = newValue;\n var suffix = property !== \"opacity\" ? \"px\" : \"\";\n element.style[property] = newValue + suffix;\n }\n\n last = +new Date(); // keep going until we're done for all props\n\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},{}],4:[function(require,module,exports){\n'use strict';\n\nvar defaults = {\n 'animation': 'fade',\n 'rehide': false,\n 'content': '',\n 'cookie': null,\n 'icon': '×',\n 'screenWidthCondition': null,\n 'position': 'center',\n 'testMode': false,\n 'trigger': false,\n 'closable': true\n},\n Boxzilla,\n Animator = require('./animator.js');\n/**\n* Merge 2 objects, values of the latter overwriting the former.\n*\n* @param obj1\n* @param obj2\n* @returns {*}\n*/\n\n\nfunction merge(obj1, obj2) {\n var obj3 = {};\n\n for (var attrname in obj1) {\n obj3[attrname] = obj1[attrname];\n }\n\n for (var attrname in obj2) {\n obj3[attrname] = obj2[attrname];\n }\n\n return obj3;\n}\n/**\n* Get the real height of entire document.\n* @returns {number}\n*/\n\n\nfunction getDocumentHeight() {\n var body = document.body,\n html = document.documentElement;\n var height = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);\n return height;\n} // Box Object\n\n\nvar Box = function Box(id, config) {\n this.id = id; // store config values\n\n this.config = merge(defaults, config); // store ref to overlay\n\n this.overlay = document.getElementById('boxzilla-overlay'); // state\n\n this.visible = false;\n this.dismissed = false;\n this.triggered = false;\n this.triggerHeight = this.calculateTriggerHeight();\n this.cookieSet = this.isCookieSet();\n this.element = null;\n this.contentElement = null;\n this.closeIcon = null; // create dom elements for this box\n\n this.dom(); // further initialise the box\n\n this.events();\n}; // initialise the box\n\n\nBox.prototype.events = function () {\n var box = this; // attach event to \"close\" icon inside box\n\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 this.element.addEventListener('submit', function (e) {\n box.setCookie();\n Boxzilla.trigger('box.interactions.form', [box, e.target]);\n }, false);\n}; // generate dom elements for this box\n\n\nBox.prototype.dom = function () {\n var wrapper = document.createElement('div');\n wrapper.className = 'boxzilla-container boxzilla-' + this.config.position + '-container';\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 var content;\n\n if (typeof this.config.content === \"string\") {\n content = document.createElement('div');\n content.innerHTML = this.config.content;\n } else {\n content = this.config.content; // make sure element is visible\n\n content.style.display = '';\n }\n\n content.className = 'boxzilla-content';\n box.appendChild(content);\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.contentElement = content;\n this.element = box;\n}; // set (calculate) custom box styling depending on box options\n\n\nBox.prototype.setCustomBoxStyling = function () {\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'; // get new dimensions\n\n var windowHeight = window.innerHeight;\n var boxHeight = this.element.clientHeight; // add scrollbar to box and limit height\n\n if (boxHeight > windowHeight) {\n this.element.style.maxHeight = windowHeight + \"px\";\n this.element.style.overflowY = 'scroll';\n } // set new top margin for boxes which are centered\n\n\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}; // toggle visibility of the box\n\n\nBox.prototype.toggle = function (show) {\n // revert visibility if no explicit argument is given\n if (typeof show === \"undefined\") {\n show = !this.visible;\n } // is box already at desired visibility?\n\n\n if (show === this.visible) {\n return false;\n } // is box being animated?\n\n\n if (Animator.animated(this.element)) {\n return false;\n } // if box should be hidden but is not closable, bail.\n\n\n if (!show && !this.config.closable) {\n return false;\n } // set new visibility status\n\n\n this.visible = show; // calculate new styling rules\n\n this.setCustomBoxStyling(); // trigger event\n\n Boxzilla.trigger('box.' + (show ? 'show' : 'hide'), [this]); // show or hide box using selected animation\n\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, function () {\n if (this.visible) {\n return;\n }\n\n this.contentElement.innerHTML = this.contentElement.innerHTML;\n }.bind(this));\n return true;\n}; // show the box\n\n\nBox.prototype.show = function () {\n return this.toggle(true);\n}; // hide the box\n\n\nBox.prototype.hide = function () {\n return this.toggle(false);\n}; // calculate trigger height\n\n\nBox.prototype.calculateTriggerHeight = function () {\n var triggerHeight = 0;\n\n if (this.config.trigger) {\n if (this.config.trigger.method === 'element') {\n var triggerElement = document.body.querySelector(this.config.trigger.value);\n\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\n return triggerHeight;\n};\n\nBox.prototype.fits = function () {\n if (!this.config.screenWidthCondition || !this.config.screenWidthCondition.value) {\n return true;\n }\n\n switch (this.config.screenWidthCondition.condition) {\n case \"larger\":\n return window.innerWidth > this.config.screenWidthCondition.value;\n\n case \"smaller\":\n return window.innerWidth < this.config.screenWidthCondition.value;\n } // meh.. condition should be \"smaller\" or \"larger\", just return true.\n\n\n return true;\n};\n\nBox.prototype.onResize = function () {\n this.triggerHeight = this.calculateTriggerHeight();\n this.setCustomBoxStyling();\n}; // is this box enabled?\n\n\nBox.prototype.mayAutoShow = function () {\n if (this.dismissed) {\n return false;\n } // check if box fits on given minimum screen width\n\n\n if (!this.fits()) {\n return false;\n } // if trigger empty or error in calculating triggerHeight, return false\n\n\n if (!this.config.trigger) {\n return false;\n } // rely on cookie value (show if not set, don't show if set)\n\n\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 or when no auto-trigger is configured\n if (this.config.testMode || !this.config.trigger) {\n return false;\n } // if either cookie is null or trigger & dismiss are both falsey, don't bother checking.\n\n\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}; // set cookie that disables automatically showing the box\n\n\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\n if (!shown) {\n return;\n }\n\n this.triggered = true;\n\n if (this.config.cookie && this.config.cookie.triggered) {\n this.setCookie(this.config.cookie.triggered);\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*/\n\n\nBox.prototype.dismiss = function (e) {\n // prevent default action\n e && e.preventDefault(); // only dismiss box if it's currently open.\n\n if (!this.visible) {\n return false;\n } // hide box element\n\n\n this.hide(); // set cookie\n\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\":3}],5:[function(require,module,exports){\n'use strict';\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 var now = +new Date(),\n args = arguments;\n\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} // \"keyup\" listener\n\n\nfunction onKeyUp(e) {\n if (e.keyCode == 27) {\n Boxzilla.dismiss();\n }\n} // check \"pageviews\" criteria for each box\n\n\nfunction checkPageViewsCriteria() {\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} // check time trigger criteria for each box\n\n\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 } // check \"time on site\" trigger\n\n\n if (box.config.trigger.method === 'time_on_site' && siteTimer.time >= box.config.trigger.value) {\n box.trigger();\n } // check \"time on page\" trigger\n\n\n if (box.config.trigger.method === 'time_on_page' && pageTimer.time >= box.config.trigger.value) {\n box.trigger();\n }\n });\n} // check triggerHeight criteria for all boxes\n\n\nfunction checkHeightCriteria() {\n var scrollY = scrollElement.hasOwnProperty('pageYOffset') ? scrollElement.pageYOffset : scrollElement.scrollTop;\n scrollY = scrollY + window.innerHeight * 0.9;\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 } // trigger box\n\n\n box.trigger();\n } // if box may auto-hide and scrollY is less than triggerHeight (with small margin of error), hide box\n\n\n if (box.mayRehide() && scrollY < box.triggerHeight - 5) {\n box.hide();\n }\n });\n} // recalculate heights and variables based on height\n\n\nfunction recalculateHeights() {\n boxes.forEach(function (box) {\n box.onResize();\n });\n}\n\nfunction onOverlayClick(e) {\n var x = e.offsetX;\n var y = e.offsetY; // calculate if click was less than 40px outside box to avoid closing it by accident\n\n boxes.forEach(function (box) {\n var rect = box.element.getBoundingClientRect();\n var margin = 40; // if click was not anywhere near box, dismiss it.\n\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 exitIntentTriggered = true;\n}\n\nfunction onMouseLeave(e) {\n var delay = 400; // did mouse leave at top of window?\n\n if (e.clientY <= 0) {\n exitIntentDelayTimer = window.setTimeout(triggerExitIntent, delay);\n }\n}\n\nfunction isAnyBoxVisible() {\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 // find <a> element in up to 3 parent elements\n var el = e.target || e.srcElement;\n var depth = 3;\n\n for (var i = 0; i <= depth; i++) {\n if (!el || el.tagName === 'A') {\n break;\n }\n\n el = el.parentElement;\n }\n\n if (!el || el.tagName !== 'A' || !el.getAttribute('href')) {\n return;\n }\n\n if (el.getAttribute('href').toLowerCase().indexOf('#boxzilla-') === 0) {\n var boxId = el.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\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}; // initialise & add event listeners\n\nBoxzilla.init = function () {\n document.body.addEventListener('click', onElementClick, true);\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); // insert styles into DOM\n\n var styles = require('./styles.js');\n\n var styleElement = document.createElement('style');\n styleElement.setAttribute(\"type\", \"text/css\");\n styleElement.innerHTML = styles;\n document.head.appendChild(styleElement); // add overlay element to dom\n\n overlay = document.createElement('div');\n overlay.style.display = 'none';\n overlay.id = 'boxzilla-overlay';\n document.body.appendChild(overlay); // event binds\n\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 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 Boxzilla.trigger('ready');\n};\n/**\n * Create a new Box\n *\n * @param string id\n * @param object opts\n *\n * @returns Box\n */\n\n\nBoxzilla.create = function (id, opts) {\n // preserve backwards compat for minimumScreenWidth option\n if (typeof opts.minimumScreenWidth !== \"undefined\") {\n opts.screenWidthCondition = {\n condition: \"larger\",\n value: opts.minimumScreenWidth\n };\n }\n\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\n if (box.id == id) {\n return box;\n }\n }\n\n throw new Error(\"No box exists with ID \" + id);\n}; // dismiss a single box (or all by omitting id param)\n\n\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 {\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}; // expose each individual box.\n\n\nBoxzilla.boxes = boxes; // expose boxzilla object\n\nwindow.Boxzilla = Boxzilla;\n\nif (typeof module !== 'undefined' && module.exports) {\n module.exports = Boxzilla;\n}\n\n},{\"./box.js\":4,\"./styles.js\":6,\"./timer.js\":7,\"wolfy87-eventemitter\":2}],6:[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},{}],7:[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},{}]},{},[1]);\n; })();"]}
|
1 |
+
{"version":3,"sources":["script.js"],"names":["define","undefined","r","e","n","t","o","i","f","c","u","a","Error","code","p","exports","call","length","1","require","module","EventEmitter","proto","prototype","originalGlobalValue","indexOfListener","listeners","listener","alias","name","this","apply","arguments","getListeners","evt","response","key","events","_getEvents","RegExp","hasOwnProperty","test","flattenListeners","flatListeners","push","getListenersAsObject","Array","addListener","isValidListener","TypeError","listenerIsWrapped","once","on","addOnceListener","defineEvent","defineEvents","evts","removeListener","index","splice","off","addListeners","manipulateListeners","removeListeners","remove","value","single","multiple","removeEvent","type","_events","removeAllListeners","emitEvent","args","listenersMap","slice","_getOnceReturnValue","trigger","emit","setOnceReturnValue","_onceReturnValue","noConflict","amd","window","2","duration","css","element","styles","property","style","animate","targetStyles","fn","last","Date","initialStyles","getComputedStyle","currentStyles","propSteps","parseFloat","to","current","tick","step","increment","newValue","timeSinceLastTick","done","suffix","requestAnimationFrame","setTimeout","toggle","animation","callbackFn","hiddenStyles","visibleStyles","nowVisible","display","offsetLeft","clone","cloneNode","cleanup","removeAttribute","setAttribute","getAttribute","properties","newObject","initObjectProperties","object","copyObjectProperties","isFinite","height","clientRect","getBoundingClientRect","overflowY","opacity","animated","3","Boxzilla","defaults","rehide","content","cookie","icon","screenWidthCondition","position","testMode","closable","Animator","Box","id","config","obj1","obj2","obj3","attrname","merge","overlay","document","getElementById","visible","dismissed","triggered","triggerHeight","calculateTriggerHeight","cookieSet","isCookieSet","contentElement","closeIcon","dom","box","addEventListener","dismiss","bind","target","tagName","setCookie","wrapper","createElement","className","appendChild","innerHTML","body","setCustomBoxStyling","origDisplay","maxHeight","windowHeight","innerHeight","boxHeight","clientHeight","newTopMargin","marginTop","show","classList","hide","html","method","triggerElement","querySelector","top","documentElement","Math","max","scrollHeight","offsetHeight","fits","condition","innerWidth","onResize","mayAutoShow","mayRehide","replace","hours","expiryDate","setHours","getHours","toUTCString","preventDefault","_Boxzilla","./animator.js","4","siteTimer","pageTimer","pageViews","Timer","Object","create","boxes","scrollElement","initialised","ExitIntent","throttle","threshhold","scope","deferTimer","context","now","clearTimeout","onKeyUp","keyCode","checkPageViewsCriteria","isAnyBoxVisible","forEach","checkTimeCriteria","time","checkHeightCriteria","scrollY","pageYOffset","scrollTop","recalculateHeights","onOverlayClick","x","offsetX","y","offsetY","rect","left","right","bottom","showBoxesWithExitIntentTrigger","filter","b","onElementClick","el","srcElement","parentElement","toLowerCase","indexOf","boxId","substring","timers","sessionTime","sessionStorage","getItem","start","setItem","stop","init","styleElement","head","setInterval","opts","minimumScreenWidth","get","./box.js","./styles.js","./timer.js","./triggers/exit-intent.js","wolfy87-eventemitter","5","6","interval","clearInterval","7","callback","timeout","touchStart","triggerCallback","removeEventListener","onMouseLeave","onMouseEnter","onTouchStart","onTouchEnd","clientY","clientX","timestamp","performance","8","_typeof","obj","Symbol","iterator","constructor","options","boxzilla_options","locationHashRefersBox","location","hash","elementId","isLoggedIn","console","log","inited","boxOpts","boxContentElement","post","slug","background_color","background","color","border_color","borderColor","border_width","borderWidth","parseInt","border_style","borderStyle","width","maxWidth","firstChild","lastChild","mc4wp_forms_config","submitted_form","selector","element_id","maybeOpenMailChimpForWordPressBox","boxzilla"],"mappings":"CAAA,WAAe,IAA8EA,OAASC,GAAuB,SAASC,EAAEC,EAAEC,EAAEC,GAAG,SAASC,EAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,IAAIE,GAAE,EAAoC,IAAID,GAAGC,EAAE,OAAOA,EAAEF,GAAE,GAAI,GAAGG,EAAE,OAAOA,EAAEH,GAAE,GAAI,IAAII,EAAE,IAAIC,MAAM,uBAAuBL,EAAE,KAAK,MAAMI,EAAEE,KAAK,mBAAmBF,EAAE,IAAIG,EAAEV,EAAEG,GAAG,CAACQ,QAAQ,IAAIZ,EAAEI,GAAG,GAAGS,KAAKF,EAAEC,QAAQ,SAASb,GAAoB,OAAOI,EAAlBH,EAAEI,GAAG,GAAGL,IAAeA,IAAIY,EAAEA,EAAEC,QAAQb,EAAEC,EAAEC,EAAEC,GAAG,OAAOD,EAAEG,GAAGQ,QAAQ,IAAI,IAAIL,GAAE,EAAoCH,EAAE,EAAEA,EAAEF,EAAEY,OAAOV,IAAID,EAAED,EAAEE,IAAI,OAAOD,EAA7b,CAA4c,CAACY,EAAE,CAAC,SAASC,EAAQC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,IACtCA,EAAIsB,QAxDV,IAAa1G,EAASC,EA6DpBkO,EAAQS,QAAS,EAEjBxL,EAAS9D,QAAQ,QA2BnB,WACE,GAA2C,WAAvCwO,EAAQlO,OAAOmQ,qBAAqCnQ,OAAOmQ,mBAAmBC,eAAlF,CAIA,IAAIC,EAAW,IAAMrQ,OAAOmQ,mBAAmBC,eAAeE,WAC1DrH,EAAQzF,EAASyF,MAErB,IAAK,IAAIyC,KAASzC,EAChB,GAAKA,EAAM5L,eAAeqO,GAA1B,CAIA,IAAIlG,EAAMyD,EAAMyC,GAEhB,GAAIlG,EAAIpF,QAAQgH,cAAciJ,GAE5B,OADA7K,EAAIsB,SAzCRyJ,MA1EJ,IAsIE,CAACC,SAAW,KAAK,GAAG,CAAC,IAljDvB","file":"script.min.js","sourcesContent":["(function () { var require = undefined; var module = undefined; var exports = undefined; var define = undefined; (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){\n/*!\n * EventEmitter v5.2.5 - git.io/ee\n * Unlicense - http://unlicense.org/\n * Oliver Caldwell - http://oli.me.uk/\n * @preserve\n */\n\n;(function (exports) {\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 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 function isValidListener (listener) {\n if (typeof listener === 'function' || listener instanceof RegExp) {\n return true\n } else if (listener && typeof listener === 'object') {\n return isValidListener(listener.listener)\n } else {\n return false\n }\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 if (!isValidListener(listener)) {\n throw new TypeError('listener must be a function');\n }\n\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 first 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 first 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\n for (i = 0; i < listeners.length; 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}(typeof window !== 'undefined' ? window : this || {}));\n\n},{}],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\n for (var i = 0; i < properties.length; i++) {\n newObject[properties[i]] = value;\n }\n\n return newObject;\n}\n\nfunction copyObjectProperties(properties, object) {\n var newObject = {};\n\n for (var i = 0; i < properties.length; i++) {\n newObject[properties[i]] = object[properties[i]];\n }\n\n return newObject;\n}\n/**\n * Checks if the given element is currently being animated.\n *\n * @param element\n * @returns {boolean}\n */\n\n\nfunction animated(element) {\n return !!element.getAttribute('data-animated');\n}\n/**\n * Toggles the element using the given animation.\n *\n * @param element\n * @param animation Either \"fade\" or \"slide\"\n */\n\n\nfunction toggle(element, animation, callbackFn) {\n var nowVisible = element.style.display != 'none' || element.offsetLeft > 0; // create clone for reference\n\n var clone = element.cloneNode(true);\n\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 if (callbackFn) {\n callbackFn();\n }\n }; // store attribute so everyone knows we're animating this element\n\n\n element.setAttribute('data-animated', \"true\"); // toggle element visiblity right away if we're making something visible\n\n if (!nowVisible) {\n element.style.display = '';\n }\n\n var hiddenStyles, visibleStyles; // animate properties\n\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); // in some browsers, getComputedStyle returns \"auto\" value. this falls back to getBoundingClientRect() in those browsers since we need an actual height.\n\n if (!isFinite(visibleStyles.height)) {\n var clientRect = element.getBoundingClientRect();\n visibleStyles.height = clientRect.height;\n }\n\n css(element, hiddenStyles);\n } // don't show a scrollbar during animation\n\n\n element.style.overflowY = 'hidden';\n animate(element, nowVisible ? hiddenStyles : visibleStyles, cleanup);\n } else {\n hiddenStyles = {\n opacity: 0\n };\n visibleStyles = {\n opacity: 1\n };\n\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]); // calculate step size & current value\n\n var to = targetStyles[property];\n var current = parseFloat(initialStyles[property]); // is there something to do?\n\n if (current == to) {\n delete targetStyles[property];\n continue;\n }\n\n propSteps[property] = (to - current) / duration; // points per second\n\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 var step, to, increment, newValue;\n\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 } // store new value\n\n\n currentStyles[property] = newValue;\n var suffix = property !== \"opacity\" ? \"px\" : \"\";\n element.style[property] = newValue + suffix;\n }\n\n last = +new Date(); // keep going until we're done for all props\n\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': '×',\n 'screenWidthCondition': null,\n 'position': 'center',\n 'testMode': false,\n 'trigger': false,\n 'closable': true\n},\n Boxzilla,\n Animator = require('./animator.js');\n/**\n* Merge 2 objects, values of the latter overwriting the former.\n*\n* @param obj1\n* @param obj2\n* @returns {*}\n*/\n\n\nfunction merge(obj1, obj2) {\n var obj3 = {};\n\n for (var attrname in obj1) {\n obj3[attrname] = obj1[attrname];\n }\n\n for (var attrname in obj2) {\n obj3[attrname] = obj2[attrname];\n }\n\n return obj3;\n}\n/**\n* Get the real height of entire document.\n* @returns {number}\n*/\n\n\nfunction getDocumentHeight() {\n var body = document.body,\n html = document.documentElement;\n var height = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);\n return height;\n} // Box Object\n\n\nvar Box = function Box(id, config) {\n this.id = id; // store config values\n\n this.config = merge(defaults, config); // store ref to overlay\n\n this.overlay = document.getElementById('boxzilla-overlay'); // state\n\n this.visible = false;\n this.dismissed = false;\n this.triggered = false;\n this.triggerHeight = this.calculateTriggerHeight();\n this.cookieSet = this.isCookieSet();\n this.element = null;\n this.contentElement = null;\n this.closeIcon = null; // create dom elements for this box\n\n this.dom(); // further initialise the box\n\n this.events();\n}; // initialise the box\n\n\nBox.prototype.events = function () {\n var box = this; // attach event to \"close\" icon inside box\n\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 this.element.addEventListener('submit', function (e) {\n box.setCookie();\n Boxzilla.trigger('box.interactions.form', [box, e.target]);\n }, false);\n}; // generate dom elements for this box\n\n\nBox.prototype.dom = function () {\n var wrapper = document.createElement('div');\n wrapper.className = 'boxzilla-container boxzilla-' + this.config.position + '-container';\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 var content;\n\n if (typeof this.config.content === \"string\") {\n content = document.createElement('div');\n content.innerHTML = this.config.content;\n } else {\n content = this.config.content; // make sure element is visible\n\n content.style.display = '';\n }\n\n content.className = 'boxzilla-content';\n box.appendChild(content);\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.contentElement = content;\n this.element = box;\n}; // set (calculate) custom box styling depending on box options\n\n\nBox.prototype.setCustomBoxStyling = function () {\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'; // get new dimensions\n\n var windowHeight = window.innerHeight;\n var boxHeight = this.element.clientHeight; // add scrollbar to box and limit height\n\n if (boxHeight > windowHeight) {\n this.element.style.maxHeight = windowHeight + \"px\";\n this.element.style.overflowY = 'scroll';\n } // set new top margin for boxes which are centered\n\n\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}; // toggle visibility of the box\n\n\nBox.prototype.toggle = function (show) {\n // revert visibility if no explicit argument is given\n if (typeof show === \"undefined\") {\n show = !this.visible;\n } // is box already at desired visibility?\n\n\n if (show === this.visible) {\n return false;\n } // is box being animated?\n\n\n if (Animator.animated(this.element)) {\n return false;\n } // if box should be hidden but is not closable, bail.\n\n\n if (!show && !this.config.closable) {\n return false;\n } // set new visibility status\n\n\n this.visible = show; // calculate new styling rules\n\n this.setCustomBoxStyling(); // trigger event\n\n Boxzilla.trigger('box.' + (show ? 'show' : 'hide'), [this]); // show or hide box using selected animation\n\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, function () {\n if (this.visible) {\n return;\n }\n\n this.contentElement.innerHTML = this.contentElement.innerHTML;\n }.bind(this));\n return true;\n}; // show the box\n\n\nBox.prototype.show = function () {\n return this.toggle(true);\n}; // hide the box\n\n\nBox.prototype.hide = function () {\n return this.toggle(false);\n}; // calculate trigger height\n\n\nBox.prototype.calculateTriggerHeight = function () {\n var triggerHeight = 0;\n\n if (this.config.trigger) {\n if (this.config.trigger.method === 'element') {\n var triggerElement = document.body.querySelector(this.config.trigger.value);\n\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\n return triggerHeight;\n};\n\nBox.prototype.fits = function () {\n if (!this.config.screenWidthCondition || !this.config.screenWidthCondition.value) {\n return true;\n }\n\n switch (this.config.screenWidthCondition.condition) {\n case \"larger\":\n return window.innerWidth > this.config.screenWidthCondition.value;\n\n case \"smaller\":\n return window.innerWidth < this.config.screenWidthCondition.value;\n } // meh.. condition should be \"smaller\" or \"larger\", just return true.\n\n\n return true;\n};\n\nBox.prototype.onResize = function () {\n this.triggerHeight = this.calculateTriggerHeight();\n this.setCustomBoxStyling();\n}; // is this box enabled?\n\n\nBox.prototype.mayAutoShow = function () {\n if (this.dismissed) {\n return false;\n } // check if box fits on given minimum screen width\n\n\n if (!this.fits()) {\n return false;\n } // if trigger empty or error in calculating triggerHeight, return false\n\n\n if (!this.config.trigger) {\n return false;\n } // rely on cookie value (show if not set, don't show if set)\n\n\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 or when no auto-trigger is configured\n if (this.config.testMode || !this.config.trigger) {\n return false;\n } // if either cookie is null or trigger & dismiss are both falsey, don't bother checking.\n\n\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}; // set cookie that disables automatically showing the box\n\n\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\n if (!shown) {\n return;\n }\n\n this.triggered = true;\n\n if (this.config.cookie && this.config.cookie.triggered) {\n this.setCookie(this.config.cookie.triggered);\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*/\n\n\nBox.prototype.dismiss = function (e) {\n // prevent default action\n e && e.preventDefault(); // only dismiss box if it's currently open.\n\n if (!this.visible) {\n return false;\n } // hide box element\n\n\n this.hide(); // set cookie\n\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 EventEmitter = require('wolfy87-eventemitter');\n\nvar Timer = require('./timer.js');\n\nvar Boxzilla = Object.create(EventEmitter.prototype);\n\nvar Box = require('./box.js')(Boxzilla);\n\nvar boxes = [];\nvar overlay;\nvar scrollElement = window;\nvar siteTimer;\nvar pageTimer;\nvar pageViews;\nvar initialised = false;\n\nvar styles = require('./styles.js');\n\nvar ExitIntent = require('./triggers/exit-intent.js');\n\nfunction throttle(fn, threshhold, scope) {\n threshhold || (threshhold = 250);\n var last, deferTimer;\n return function () {\n var context = scope || this;\n var now = +new Date(),\n args = arguments;\n\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} // \"keyup\" listener\n\n\nfunction onKeyUp(e) {\n if (e.keyCode === 27) {\n Boxzilla.dismiss();\n }\n} // check \"pageviews\" criteria for each box\n\n\nfunction checkPageViewsCriteria() {\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} // check time trigger criteria for each box\n\n\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 } // check \"time on site\" trigger\n\n\n if (box.config.trigger.method === 'time_on_site' && siteTimer.time >= box.config.trigger.value) {\n box.trigger();\n } // check \"time on page\" trigger\n\n\n if (box.config.trigger.method === 'time_on_page' && pageTimer.time >= box.config.trigger.value) {\n box.trigger();\n }\n });\n} // check triggerHeight criteria for all boxes\n\n\nfunction checkHeightCriteria() {\n var scrollY = scrollElement.hasOwnProperty('pageYOffset') ? scrollElement.pageYOffset : scrollElement.scrollTop;\n scrollY = scrollY + window.innerHeight * 0.9;\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 } // trigger box\n\n\n box.trigger();\n } // if box may auto-hide and scrollY is less than triggerHeight (with small margin of error), hide box\n\n\n if (box.mayRehide() && scrollY < box.triggerHeight - 5) {\n box.hide();\n }\n });\n} // recalculate heights and variables based on height\n\n\nfunction recalculateHeights() {\n boxes.forEach(function (box) {\n box.onResize();\n });\n}\n\nfunction onOverlayClick(e) {\n var x = e.offsetX;\n var y = e.offsetY; // calculate if click was less than 40px outside box to avoid closing it by accident\n\n boxes.forEach(function (box) {\n var rect = box.element.getBoundingClientRect();\n var margin = 40; // if click was not anywhere near box, dismiss it.\n\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 showBoxesWithExitIntentTrigger() {\n // do nothing if already triggered OR another box is visible.\n if (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\nfunction isAnyBoxVisible() {\n return boxes.filter(function (b) {\n return b.visible;\n }).length > 0;\n}\n\nfunction onElementClick(e) {\n // find <a> element in up to 3 parent elements\n var el = e.target || e.srcElement;\n var depth = 3;\n\n for (var i = 0; i <= depth; i++) {\n if (!el || el.tagName === 'A') {\n break;\n }\n\n el = el.parentElement;\n }\n\n if (!el || el.tagName !== 'A' || !el.getAttribute('href')) {\n return;\n }\n\n if (el.getAttribute('href').toLowerCase().indexOf('#boxzilla-') === 0) {\n var boxId = el.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\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}; // initialise & add event listeners\n\nBoxzilla.init = function () {\n if (initialised) {\n return;\n }\n\n document.body.addEventListener('click', onElementClick, true);\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); // insert styles into DOM\n\n var styleElement = document.createElement('style');\n styleElement.setAttribute(\"type\", \"text/css\");\n styleElement.innerHTML = styles;\n document.head.appendChild(styleElement); // add overlay element to dom\n\n overlay = document.createElement('div');\n overlay.style.display = 'none';\n overlay.id = 'boxzilla-overlay';\n document.body.appendChild(overlay); // init exit intent trigger\n\n new ExitIntent(showBoxesWithExitIntentTrigger);\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.addEventListener('keyup', onKeyUp);\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 Boxzilla.trigger('ready');\n initialised = true; // ensure this function doesn't run again\n};\n/**\n * Create a new Box\n *\n * @param string id\n * @param object opts\n *\n * @returns Box\n */\n\n\nBoxzilla.create = function (id, opts) {\n // preserve backwards compat for minimumScreenWidth option\n if (typeof opts.minimumScreenWidth !== \"undefined\") {\n opts.screenWidthCondition = {\n condition: \"larger\",\n value: opts.minimumScreenWidth\n };\n }\n\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\n if (box.id == id) {\n return box;\n }\n }\n\n throw new Error(\"No box exists with ID \" + id);\n}; // dismiss a single box (or all by omitting id param)\n\n\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 {\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}; // expose each individual box.\n\n\nBoxzilla.boxes = boxes; // expose boxzilla object\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,\"./triggers/exit-intent.js\":7,\"wolfy87-eventemitter\":1}],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'use strict';\n\nmodule.exports = function (callback) {\n var timeout = null;\n var touchStart = {};\n\n function triggerCallback() {\n document.documentElement.removeEventListener('mouseleave', onMouseLeave);\n document.documentElement.removeEventListener('mouseenter', onMouseEnter);\n document.documentElement.removeEventListener('click', clearTimeout);\n window.removeEventListener('touchstart', onTouchStart);\n window.removeEventListener('touchend', onTouchEnd);\n callback();\n }\n\n function clearTimeout() {\n if (timeout === null) {\n return;\n }\n\n window.clearTimeout(timeout);\n timeout = null;\n }\n\n function onMouseEnter(evt) {\n clearTimeout();\n }\n\n function onMouseLeave(evt) {\n clearTimeout(); // did mouse leave at top of window?\n // add small exception space in the top-right corner\n\n if (evt.clientY <= 0 && evt.clientX < 0.80 * window.innerWidth) {\n timeout = window.setTimeout(triggerCallback, 400);\n }\n }\n\n function onTouchStart(evt) {\n clearTimeout();\n touchStart = {\n timestamp: performance.now(),\n scrollY: window.scrollY,\n windowHeight: window.innerHeight\n };\n }\n\n function onTouchEnd(evt) {\n clearTimeout(); // did address bar appear?\n\n if (window.innerHeight > touchStart.windowHeight) {\n return;\n } // allow a tiny tiny margin for error, to not fire on clicks\n\n\n if (window.scrollY + 20 >= touchStart.scrollY) {\n return;\n }\n\n if (performance.now() - touchStart.timestamp > 300) {\n return;\n }\n\n if (['A', 'INPUT', 'BUTTON'].indexOf(evt.target.tagName) > -1) {\n return;\n }\n\n timeout = window.setTimeout(triggerCallback, 800);\n }\n\n window.addEventListener('touchstart', onTouchStart);\n window.addEventListener('touchend', onTouchEnd);\n document.documentElement.addEventListener('mouseenter', onMouseEnter);\n document.documentElement.addEventListener('mouseleave', onMouseLeave);\n document.documentElement.addEventListener('click', clearTimeout);\n};\n\n},{}],8:[function(require,module,exports){\n\"use strict\";\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n(function () {\n 'use strict';\n\n var Boxzilla = require('boxzilla');\n\n var options = window.boxzilla_options; // expose Boxzilla object to window\n\n window.Boxzilla = Boxzilla; // helper function for setting CSS styles\n\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 // failsafe against including script twice.\n if (options.inited) {\n return;\n } // create boxes from options\n\n\n for (var key in options.boxes) {\n // get opts\n var boxOpts = options.boxes[key];\n boxOpts.testMode = isLoggedIn && options.testMode; // find box content element, bail if not found\n\n var boxContentElement = document.getElementById('boxzilla-box-' + boxOpts.id + '-content');\n\n if (!boxContentElement) {\n continue;\n } // use element as content option\n\n\n boxOpts.content = boxContentElement; // create box\n\n var box = Boxzilla.create(boxOpts.id, boxOpts); // add box slug to box element as classname\n\n box.element.className = box.element.className + ' boxzilla-' + boxOpts.post.slug; // add custom css to box\n\n css(box.element, boxOpts.css);\n box.element.firstChild.firstChild.className += \" first-child\";\n box.element.firstChild.lastChild.className += \" last-child\"; // maybe show box right away\n\n if (box.fits() && locationHashRefersBox(box)) {\n box.show();\n }\n } // set flag to prevent initialising twice\n\n\n options.inited = true; // trigger \"done\" event.\n\n Boxzilla.trigger('done'); // maybe open box with MC4WP form in it\n\n maybeOpenMailChimpForWordPressBox();\n }\n\n function locationHashRefersBox(box) {\n if (!window.location.hash || 0 === window.location.hash.length) {\n return false;\n }\n\n var elementId = window.location.hash.substring(1); // only attempt on strings looking like an ID \n\n var regex = /^[a-zA-Z\\-\\_0-9]+$/;\n\n if (!regex.test(elementId)) {\n return false;\n }\n\n if (elementId === box.element.id) {\n return true;\n } else if (box.element.querySelector('#' + elementId)) {\n return true;\n }\n\n return false;\n }\n\n function maybeOpenMailChimpForWordPressBox() {\n if (_typeof(window.mc4wp_forms_config) !== \"object\" || !window.mc4wp_forms_config.submitted_form) {\n return;\n }\n\n var selector = '#' + window.mc4wp_forms_config.submitted_form.element_id;\n var boxes = Boxzilla.boxes;\n\n for (var boxId in boxes) {\n if (!boxes.hasOwnProperty(boxId)) {\n continue;\n }\n\n var box = boxes[boxId];\n\n if (box.element.querySelector(selector)) {\n box.show();\n return;\n }\n }\n } // print message when test mode is enabled\n\n\n var isLoggedIn = document.body.className.indexOf('logged-in') > -1;\n\n if (isLoggedIn && options.testMode) {\n console.log('Boxzilla: Test mode is enabled. Please disable test mode if you\\'re done testing.');\n } // init boxzilla\n\n\n Boxzilla.init(); // on window.load, create DOM elements for boxes\n\n window.addEventListener('load', createBoxesFromConfig);\n})();\n\n},{\"boxzilla\":4}]},{},[8]);\n; })();"]}
|
bootstrap.php
CHANGED
@@ -45,7 +45,7 @@ add_action( 'plugins_loaded', function() use( $boxzilla ) {
|
|
45 |
Â
// license manager
|
46 |
Â
if( is_admin() || ( defined( 'DOING_CRON' ) && DOING_CRON ) || ( defined( 'WP_CLI' ) && WP_CLI ) ) {
|
47 |
Â
$boxzilla['license_manager']->hook();
|
48 |
-
|
49 |
Â
if( count( $boxzilla->plugins ) > 0 ) {
|
50 |
Â
$boxzilla['update_manager']->hook();
|
51 |
Â
}
|
45 |
Â
// license manager
|
46 |
Â
if( is_admin() || ( defined( 'DOING_CRON' ) && DOING_CRON ) || ( defined( 'WP_CLI' ) && WP_CLI ) ) {
|
47 |
Â
$boxzilla['license_manager']->hook();
|
48 |
+
|
49 |
Â
if( count( $boxzilla->plugins ) > 0 ) {
|
50 |
Â
$boxzilla['update_manager']->hook();
|
51 |
Â
}
|
boxzilla.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
Â
<?php
|
2 |
Â
/*
|
3 |
Â
Plugin Name: Boxzilla
|
4 |
-
Version: 3.2.
|
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
|
@@ -11,7 +11,7 @@ Domain Path: /languages/
|
|
11 |
Â
License: GPL v3
|
12 |
Â
|
13 |
Â
Boxzilla Plugin
|
14 |
-
Copyright (C) 2013-
|
15 |
Â
|
16 |
Â
This program is free software: you can redistribute it and/or modify
|
17 |
Â
it under the terms of the GNU General Public License as published by
|
@@ -41,7 +41,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
41 |
Â
function _load_boxzilla() {
|
42 |
Â
|
43 |
Â
define( 'BOXZILLA_FILE', __FILE__ );
|
44 |
-
define( 'BOXZILLA_VERSION', '3.2.
|
45 |
Â
|
46 |
Â
require __DIR__ . '/bootstrap.php';
|
47 |
Â
}
|
1 |
Â
<?php
|
2 |
Â
/*
|
3 |
Â
Plugin Name: Boxzilla
|
4 |
+
Version: 3.2.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
|
11 |
Â
License: GPL v3
|
12 |
Â
|
13 |
Â
Boxzilla Plugin
|
14 |
+
Copyright (C) 2013-2019, Danny van Kooten, hi@dannyvankooten.com
|
15 |
Â
|
16 |
Â
This program is free software: you can redistribute it and/or modify
|
17 |
Â
it under the terms of the GNU General Public License as published by
|
41 |
Â
function _load_boxzilla() {
|
42 |
Â
|
43 |
Â
define( 'BOXZILLA_FILE', __FILE__ );
|
44 |
+
define( 'BOXZILLA_VERSION', '3.2.10' );
|
45 |
Â
|
46 |
Â
require __DIR__ . '/bootstrap.php';
|
47 |
Â
}
|
languages/boxzilla.pot
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
# Copyright (C)
|
2 |
Â
# This file is distributed under the same license as the boxzilla package.
|
3 |
Â
msgid ""
|
4 |
Â
msgstr ""
|
@@ -57,83 +57,87 @@ msgstr ""
|
|
57 |
Â
msgid "No Boxes found in Trash"
|
58 |
Â
msgstr ""
|
59 |
Â
|
60 |
-
#: src/admin/class-admin.php:
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
61 |
Â
msgid "Awesome, you are using Boxzilla! You can now safely <a href=\"%s\">deactivate the Scroll Triggered Boxes plugin</a>."
|
62 |
Â
msgstr ""
|
63 |
Â
|
64 |
-
#: src/admin/class-admin.php:
|
65 |
Â
msgid "Box ID"
|
66 |
Â
msgstr ""
|
67 |
Â
|
68 |
-
#: src/admin/class-admin.php:
|
69 |
Â
msgid "Box Title"
|
70 |
Â
msgstr ""
|
71 |
Â
|
72 |
-
#: src/admin/class-admin.php:
|
73 |
Â
msgid "Settings"
|
74 |
Â
msgstr ""
|
75 |
Â
|
76 |
-
#: src/admin/class-admin.php:
|
77 |
Â
msgid "Extensions"
|
78 |
Â
msgstr ""
|
79 |
Â
|
80 |
-
#: src/admin/class-admin.php:
|
81 |
Â
msgid "and"
|
82 |
Â
msgstr ""
|
83 |
Â
|
84 |
-
#: src/admin/class-admin.php:
|
85 |
Â
msgid "or"
|
86 |
Â
msgstr ""
|
87 |
Â
|
88 |
-
#: src/admin/class-admin.php:
|
89 |
Â
msgid "Enter a comma-separated list of values."
|
90 |
Â
msgstr ""
|
91 |
Â
|
92 |
-
#: src/admin/class-admin.php:
|
93 |
Â
msgid "Enter a comma-separated list of post slugs or post ID's.."
|
94 |
Â
msgstr ""
|
95 |
Â
|
96 |
-
#: src/admin/class-admin.php:
|
97 |
Â
msgid "Enter a comma-separated list of page slugs or page ID's.."
|
98 |
Â
msgstr ""
|
99 |
Â
|
100 |
-
#: src/admin/class-admin.php:
|
101 |
Â
msgid "Enter a comma-separated list of post types.."
|
102 |
Â
msgstr ""
|
103 |
Â
|
104 |
-
#: src/admin/class-admin.php:
|
105 |
Â
msgid "Enter a comma-separated list of relative URL's, eg /contact/"
|
106 |
Â
msgstr ""
|
107 |
Â
|
108 |
-
#: src/admin/class-admin.php:
|
109 |
Â
msgid "Box Appearance"
|
110 |
Â
msgstr ""
|
111 |
Â
|
112 |
-
#: src/admin/class-admin.php:
|
113 |
Â
msgid "Box Options"
|
114 |
Â
msgstr ""
|
115 |
Â
|
116 |
-
#: src/admin/class-admin.php:
|
117 |
Â
msgid "Looking for help?"
|
118 |
Â
msgstr ""
|
119 |
Â
|
120 |
-
#: src/admin/class-admin.php:
|
121 |
Â
msgid "Subscribe to our newsletter"
|
122 |
Â
msgstr ""
|
123 |
Â
|
124 |
-
#: src/admin/class-review-notice.php:
|
125 |
Â
msgid "You've been using Boxzilla for some time now; we hope you love it!"
|
126 |
Â
msgstr ""
|
127 |
Â
|
128 |
-
#: src/admin/class-review-notice.php:
|
129 |
Â
msgid "If you do, please <a href=\"%s\">leave us a 5★ rating on WordPress.org</a>. It would be of great help to us."
|
130 |
Â
msgstr ""
|
131 |
Â
|
132 |
-
#: src/admin/class-review-notice.php:
|
133 |
Â
msgid "Dismiss this notice."
|
134 |
Â
msgstr ""
|
135 |
Â
|
136 |
-
#: src/licensing/class-api.php:
|
137 |
Â
msgid "The Boxzilla server returned an invalid response."
|
138 |
Â
msgstr ""
|
139 |
Â
|
@@ -157,11 +161,11 @@ msgstr ""
|
|
157 |
Â
msgid "If not, please click here: %s."
|
158 |
Â
msgstr ""
|
159 |
Â
|
160 |
-
#: src/admin/views/settings.php:20, src/admin/views/metaboxes/box-option-controls.php:
|
161 |
Â
msgid "Enable test mode?"
|
162 |
Â
msgstr ""
|
163 |
Â
|
164 |
-
#: src/admin/views/settings.php:24, src/admin/views/metaboxes/box-option-controls.php:
|
165 |
Â
msgid "If test mode is enabled, all boxes will show up regardless of whether a cookie has been set."
|
166 |
Â
msgstr ""
|
167 |
Â
|
@@ -169,39 +173,39 @@ msgstr ""
|
|
169 |
Â
msgid "License & Plugin Updates"
|
170 |
Â
msgstr ""
|
171 |
Â
|
172 |
-
#: src/licensing/views/license-form.php:
|
173 |
Â
msgid "Warning! You are <u>not</u> receiving plugin updates for the following plugin(s):"
|
174 |
Â
msgstr ""
|
175 |
Â
|
176 |
-
#: src/licensing/views/license-form.php:
|
177 |
Â
msgid "License Key"
|
178 |
Â
msgstr ""
|
179 |
Â
|
180 |
-
#: src/licensing/views/license-form.php:
|
181 |
Â
msgid "Enter your license key.."
|
182 |
Â
msgstr ""
|
183 |
Â
|
184 |
-
#: src/licensing/views/license-form.php:
|
185 |
Â
msgid "The license key received when purchasing your premium Boxzilla plan. <a href=\"%s\">You can find it here</a>."
|
186 |
Â
msgstr ""
|
187 |
Â
|
188 |
-
#: src/licensing/views/license-form.php:
|
189 |
Â
msgid "License Status"
|
190 |
Â
msgstr ""
|
191 |
Â
|
192 |
-
#: src/licensing/views/license-form.php:
|
193 |
Â
msgid "ACTIVE"
|
194 |
Â
msgstr ""
|
195 |
Â
|
196 |
-
#: src/licensing/views/license-form.php:
|
197 |
Â
msgid "you are receiving plugin updates"
|
198 |
Â
msgstr ""
|
199 |
Â
|
200 |
-
#: src/licensing/views/license-form.php:
|
201 |
Â
msgid "INACTIVE"
|
202 |
Â
msgstr ""
|
203 |
Â
|
204 |
-
#: src/licensing/views/license-form.php:
|
205 |
Â
msgid "you are <strong>not</strong> receiving plugin updates"
|
206 |
Â
msgstr ""
|
207 |
Â
|
@@ -297,147 +301,147 @@ msgstr ""
|
|
297 |
Â
msgid "of the following conditions."
|
298 |
Â
msgstr ""
|
299 |
Â
|
300 |
-
#: src/admin/views/metaboxes/box-option-controls.php:
|
301 |
Â
msgid "Remove rule"
|
302 |
Â
msgstr ""
|
303 |
Â
|
304 |
-
#: src/admin/views/metaboxes/box-option-controls.php:
|
305 |
Â
msgid "is"
|
306 |
Â
msgstr ""
|
307 |
Â
|
308 |
-
#: src/admin/views/metaboxes/box-option-controls.php:
|
309 |
Â
msgid "is not"
|
310 |
Â
msgstr ""
|
311 |
Â
|
312 |
-
#: src/admin/views/metaboxes/box-option-controls.php:
|
313 |
Â
msgid "contains"
|
314 |
Â
msgstr ""
|
315 |
Â
|
316 |
-
#: src/admin/views/metaboxes/box-option-controls.php:
|
317 |
Â
msgid "does not contain"
|
318 |
Â
msgstr ""
|
319 |
Â
|
320 |
-
#: src/admin/views/metaboxes/box-option-controls.php:
|
321 |
Â
msgid "Leave empty for any or enter (comma-separated) names or ID's"
|
322 |
Â
msgstr ""
|
323 |
Â
|
324 |
-
#: src/admin/views/metaboxes/box-option-controls.php:
|
325 |
Â
msgid "Add another rule"
|
326 |
Â
msgstr ""
|
327 |
Â
|
328 |
-
#: src/admin/views/metaboxes/box-option-controls.php:
|
329 |
Â
msgid "Box Position"
|
330 |
Â
msgstr ""
|
331 |
Â
|
332 |
-
#: src/admin/views/metaboxes/box-option-controls.php:
|
333 |
Â
msgid "Top Left"
|
334 |
Â
msgstr ""
|
335 |
Â
|
336 |
-
#: src/admin/views/metaboxes/box-option-controls.php:
|
337 |
Â
msgid "Top Right"
|
338 |
Â
msgstr ""
|
339 |
Â
|
340 |
-
#: src/admin/views/metaboxes/box-option-controls.php:
|
341 |
Â
msgid "Center"
|
342 |
Â
msgstr ""
|
343 |
Â
|
344 |
-
#: src/admin/views/metaboxes/box-option-controls.php:
|
345 |
Â
msgid "Bottom Left"
|
346 |
Â
msgstr ""
|
347 |
Â
|
348 |
-
#: src/admin/views/metaboxes/box-option-controls.php:
|
349 |
Â
msgid "Bottom Right"
|
350 |
Â
msgstr ""
|
351 |
Â
|
352 |
-
#: src/admin/views/metaboxes/box-option-controls.php:
|
353 |
Â
msgid "Animation"
|
354 |
Â
msgstr ""
|
355 |
Â
|
356 |
-
#: src/admin/views/metaboxes/box-option-controls.php:
|
357 |
Â
msgid "Fade In"
|
358 |
Â
msgstr ""
|
359 |
Â
|
360 |
-
#: src/admin/views/metaboxes/box-option-controls.php:
|
361 |
Â
msgid "Slide In"
|
362 |
Â
msgstr ""
|
363 |
Â
|
364 |
-
#: src/admin/views/metaboxes/box-option-controls.php:
|
365 |
Â
msgid "Which animation type should be used to show the box when triggered?"
|
366 |
Â
msgstr ""
|
367 |
Â
|
368 |
-
#: src/admin/views/metaboxes/box-option-controls.php:
|
369 |
Â
msgid "Auto-show box?"
|
370 |
Â
msgstr ""
|
371 |
Â
|
372 |
-
#: src/admin/views/metaboxes/box-option-controls.php:
|
373 |
Â
msgid "Never"
|
374 |
Â
msgstr ""
|
375 |
Â
|
376 |
-
#: src/admin/views/metaboxes/box-option-controls.php:
|
377 |
Â
msgid "Yes, after %s seconds on the page."
|
378 |
Â
msgstr ""
|
379 |
Â
|
380 |
-
#: src/admin/views/metaboxes/box-option-controls.php:
|
381 |
Â
msgid "Yes, when at %s of page height"
|
382 |
Â
msgstr ""
|
383 |
Â
|
384 |
-
#: src/admin/views/metaboxes/box-option-controls.php:
|
385 |
Â
msgid "Yes, when at element %s"
|
386 |
Â
msgstr ""
|
387 |
Â
|
388 |
-
#: src/admin/views/metaboxes/box-option-controls.php:
|
389 |
Â
msgid "Example: #comments"
|
390 |
Â
msgstr ""
|
391 |
Â
|
392 |
-
#: src/admin/views/metaboxes/box-option-controls.php:
|
393 |
Â
msgid "Cookie expiration"
|
394 |
Â
msgstr ""
|
395 |
Â
|
396 |
-
#: src/admin/views/metaboxes/box-option-controls.php:
|
397 |
Â
msgid "hours"
|
398 |
Â
msgstr ""
|
399 |
Â
|
400 |
-
#: src/admin/views/metaboxes/box-option-controls.php:
|
401 |
Â
msgid "After this box is triggered or dismissed, how many hours should it stay hidden?"
|
402 |
Â
msgstr ""
|
403 |
Â
|
404 |
-
#: src/admin/views/metaboxes/box-option-controls.php:
|
405 |
Â
msgid "Screen width"
|
406 |
Â
msgstr ""
|
407 |
Â
|
408 |
-
#: src/admin/views/metaboxes/box-option-controls.php:
|
409 |
Â
msgid "larger"
|
410 |
Â
msgstr ""
|
411 |
Â
|
412 |
-
#: src/admin/views/metaboxes/box-option-controls.php:
|
413 |
Â
msgid "smaller"
|
414 |
Â
msgstr ""
|
415 |
Â
|
416 |
-
#: src/admin/views/metaboxes/box-option-controls.php:
|
417 |
Â
msgid "Only show on screens %s than %s."
|
418 |
Â
msgstr ""
|
419 |
Â
|
420 |
-
#: src/admin/views/metaboxes/box-option-controls.php:
|
421 |
Â
msgid "Leave empty if you want to show the box on all screen sizes."
|
422 |
Â
msgstr ""
|
423 |
Â
|
424 |
-
#: src/admin/views/metaboxes/box-option-controls.php:
|
425 |
Â
msgid "Auto-hide?"
|
426 |
Â
msgstr ""
|
427 |
Â
|
428 |
-
#: src/admin/views/metaboxes/box-option-controls.php:
|
429 |
Â
msgid "Hide box again when visitors scroll back up?"
|
430 |
Â
msgstr ""
|
431 |
Â
|
432 |
-
#: src/admin/views/metaboxes/box-option-controls.php:
|
433 |
Â
msgid "Show close icon?"
|
434 |
Â
msgstr ""
|
435 |
Â
|
436 |
-
#: src/admin/views/metaboxes/box-option-controls.php:
|
437 |
Â
msgid "If you decide to hide the close icon, make sure to offer an alternative way to close the box."
|
438 |
Â
msgstr ""
|
439 |
Â
|
440 |
-
#: src/admin/views/metaboxes/box-option-controls.php:
|
441 |
Â
msgid "Example: "
|
442 |
Â
msgstr ""
|
443 |
Â
|
1 |
+
# Copyright (C) 2019 boxzilla
|
2 |
Â
# This file is distributed under the same license as the boxzilla package.
|
3 |
Â
msgid ""
|
4 |
Â
msgstr ""
|
57 |
Â
msgid "No Boxes found in Trash"
|
58 |
Â
msgstr ""
|
59 |
Â
|
60 |
+
#: src/admin/class-admin.php:97
|
61 |
+
msgid "Duplicate box"
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
+
#: src/admin/class-admin.php:136
|
65 |
Â
msgid "Awesome, you are using Boxzilla! You can now safely <a href=\"%s\">deactivate the Scroll Triggered Boxes plugin</a>."
|
66 |
Â
msgstr ""
|
67 |
Â
|
68 |
+
#: src/admin/class-admin.php:208
|
69 |
Â
msgid "Box ID"
|
70 |
Â
msgstr ""
|
71 |
Â
|
72 |
+
#: src/admin/class-admin.php:211
|
73 |
Â
msgid "Box Title"
|
74 |
Â
msgstr ""
|
75 |
Â
|
76 |
+
#: src/admin/class-admin.php:246, src/admin/class-admin.php:247, src/admin/views/settings.php:7
|
77 |
Â
msgid "Settings"
|
78 |
Â
msgstr ""
|
79 |
Â
|
80 |
+
#: src/admin/class-admin.php:252, src/admin/class-admin.php:253
|
81 |
Â
msgid "Extensions"
|
82 |
Â
msgstr ""
|
83 |
Â
|
84 |
+
#: src/admin/class-admin.php:349, src/admin/views/metaboxes/box-option-controls.php:62
|
85 |
Â
msgid "and"
|
86 |
Â
msgstr ""
|
87 |
Â
|
88 |
+
#: src/admin/class-admin.php:350, src/admin/views/metaboxes/box-option-controls.php:61
|
89 |
Â
msgid "or"
|
90 |
Â
msgstr ""
|
91 |
Â
|
92 |
+
#: src/admin/class-admin.php:351
|
93 |
Â
msgid "Enter a comma-separated list of values."
|
94 |
Â
msgstr ""
|
95 |
Â
|
96 |
+
#: src/admin/class-admin.php:352
|
97 |
Â
msgid "Enter a comma-separated list of post slugs or post ID's.."
|
98 |
Â
msgstr ""
|
99 |
Â
|
100 |
+
#: src/admin/class-admin.php:353
|
101 |
Â
msgid "Enter a comma-separated list of page slugs or page ID's.."
|
102 |
Â
msgstr ""
|
103 |
Â
|
104 |
+
#: src/admin/class-admin.php:354
|
105 |
Â
msgid "Enter a comma-separated list of post types.."
|
106 |
Â
msgstr ""
|
107 |
Â
|
108 |
+
#: src/admin/class-admin.php:355
|
109 |
Â
msgid "Enter a comma-separated list of relative URL's, eg /contact/"
|
110 |
Â
msgstr ""
|
111 |
Â
|
112 |
+
#: src/admin/class-admin.php:386
|
113 |
Â
msgid "Box Appearance"
|
114 |
Â
msgstr ""
|
115 |
Â
|
116 |
+
#: src/admin/class-admin.php:395
|
117 |
Â
msgid "Box Options"
|
118 |
Â
msgstr ""
|
119 |
Â
|
120 |
+
#: src/admin/class-admin.php:404
|
121 |
Â
msgid "Looking for help?"
|
122 |
Â
msgstr ""
|
123 |
Â
|
124 |
+
#: src/admin/class-admin.php:412
|
125 |
Â
msgid "Subscribe to our newsletter"
|
126 |
Â
msgstr ""
|
127 |
Â
|
128 |
+
#: src/admin/class-review-notice.php:79
|
129 |
Â
msgid "You've been using Boxzilla for some time now; we hope you love it!"
|
130 |
Â
msgstr ""
|
131 |
Â
|
132 |
+
#: src/admin/class-review-notice.php:80
|
133 |
Â
msgid "If you do, please <a href=\"%s\">leave us a 5★ rating on WordPress.org</a>. It would be of great help to us."
|
134 |
Â
msgstr ""
|
135 |
Â
|
136 |
+
#: src/admin/class-review-notice.php:82
|
137 |
Â
msgid "Dismiss this notice."
|
138 |
Â
msgstr ""
|
139 |
Â
|
140 |
+
#: src/licensing/class-api.php:172
|
141 |
Â
msgid "The Boxzilla server returned an invalid response."
|
142 |
Â
msgstr ""
|
143 |
Â
|
161 |
Â
msgid "If not, please click here: %s."
|
162 |
Â
msgstr ""
|
163 |
Â
|
164 |
+
#: src/admin/views/settings.php:20, src/admin/views/metaboxes/box-option-controls.php:216
|
165 |
Â
msgid "Enable test mode?"
|
166 |
Â
msgstr ""
|
167 |
Â
|
168 |
+
#: src/admin/views/settings.php:24, src/admin/views/metaboxes/box-option-controls.php:220
|
169 |
Â
msgid "If test mode is enabled, all boxes will show up regardless of whether a cookie has been set."
|
170 |
Â
msgstr ""
|
171 |
Â
|
173 |
Â
msgid "License & Plugin Updates"
|
174 |
Â
msgstr ""
|
175 |
Â
|
176 |
+
#: src/licensing/views/license-form.php:14
|
177 |
Â
msgid "Warning! You are <u>not</u> receiving plugin updates for the following plugin(s):"
|
178 |
Â
msgstr ""
|
179 |
Â
|
180 |
+
#: src/licensing/views/license-form.php:40
|
181 |
Â
msgid "License Key"
|
182 |
Â
msgstr ""
|
183 |
Â
|
184 |
+
#: src/licensing/views/license-form.php:42
|
185 |
Â
msgid "Enter your license key.."
|
186 |
Â
msgstr ""
|
187 |
Â
|
188 |
+
#: src/licensing/views/license-form.php:47
|
189 |
Â
msgid "The license key received when purchasing your premium Boxzilla plan. <a href=\"%s\">You can find it here</a>."
|
190 |
Â
msgstr ""
|
191 |
Â
|
192 |
+
#: src/licensing/views/license-form.php:52
|
193 |
Â
msgid "License Status"
|
194 |
Â
msgstr ""
|
195 |
Â
|
196 |
+
#: src/licensing/views/license-form.php:57
|
197 |
Â
msgid "ACTIVE"
|
198 |
Â
msgstr ""
|
199 |
Â
|
200 |
+
#: src/licensing/views/license-form.php:57
|
201 |
Â
msgid "you are receiving plugin updates"
|
202 |
Â
msgstr ""
|
203 |
Â
|
204 |
+
#: src/licensing/views/license-form.php:61
|
205 |
Â
msgid "INACTIVE"
|
206 |
Â
msgstr ""
|
207 |
Â
|
208 |
+
#: src/licensing/views/license-form.php:61
|
209 |
Â
msgid "you are <strong>not</strong> receiving plugin updates"
|
210 |
Â
msgstr ""
|
211 |
Â
|
301 |
Â
msgid "of the following conditions."
|
302 |
Â
msgstr ""
|
303 |
Â
|
304 |
+
#: src/admin/views/metaboxes/box-option-controls.php:72, src/admin/views/metaboxes/box-option-controls.php:240
|
305 |
Â
msgid "Remove rule"
|
306 |
Â
msgstr ""
|
307 |
Â
|
308 |
+
#: src/admin/views/metaboxes/box-option-controls.php:82, src/admin/views/metaboxes/box-option-controls.php:249
|
309 |
Â
msgid "is"
|
310 |
Â
msgstr ""
|
311 |
Â
|
312 |
+
#: src/admin/views/metaboxes/box-option-controls.php:83, src/admin/views/metaboxes/box-option-controls.php:250
|
313 |
Â
msgid "is not"
|
314 |
Â
msgstr ""
|
315 |
Â
|
316 |
+
#: src/admin/views/metaboxes/box-option-controls.php:84, src/admin/views/metaboxes/box-option-controls.php:251
|
317 |
Â
msgid "contains"
|
318 |
Â
msgstr ""
|
319 |
Â
|
320 |
+
#: src/admin/views/metaboxes/box-option-controls.php:85, src/admin/views/metaboxes/box-option-controls.php:252
|
321 |
Â
msgid "does not contain"
|
322 |
Â
msgstr ""
|
323 |
Â
|
324 |
+
#: src/admin/views/metaboxes/box-option-controls.php:88, src/admin/views/metaboxes/box-option-controls.php:255
|
325 |
Â
msgid "Leave empty for any or enter (comma-separated) names or ID's"
|
326 |
Â
msgstr ""
|
327 |
Â
|
328 |
+
#: src/admin/views/metaboxes/box-option-controls.php:98
|
329 |
Â
msgid "Add another rule"
|
330 |
Â
msgstr ""
|
331 |
Â
|
332 |
+
#: src/admin/views/metaboxes/box-option-controls.php:101
|
333 |
Â
msgid "Box Position"
|
334 |
Â
msgstr ""
|
335 |
Â
|
336 |
+
#: src/admin/views/metaboxes/box-option-controls.php:107
|
337 |
Â
msgid "Top Left"
|
338 |
Â
msgstr ""
|
339 |
Â
|
340 |
+
#: src/admin/views/metaboxes/box-option-controls.php:114
|
341 |
Â
msgid "Top Right"
|
342 |
Â
msgstr ""
|
343 |
Â
|
344 |
+
#: src/admin/views/metaboxes/box-option-controls.php:123
|
345 |
Â
msgid "Center"
|
346 |
Â
msgstr ""
|
347 |
Â
|
348 |
+
#: src/admin/views/metaboxes/box-option-controls.php:132
|
349 |
Â
msgid "Bottom Left"
|
350 |
Â
msgstr ""
|
351 |
Â
|
352 |
+
#: src/admin/views/metaboxes/box-option-controls.php:139
|
353 |
Â
msgid "Bottom Right"
|
354 |
Â
msgstr ""
|
355 |
Â
|
356 |
+
#: src/admin/views/metaboxes/box-option-controls.php:148
|
357 |
Â
msgid "Animation"
|
358 |
Â
msgstr ""
|
359 |
Â
|
360 |
+
#: src/admin/views/metaboxes/box-option-controls.php:150
|
361 |
Â
msgid "Fade In"
|
362 |
Â
msgstr ""
|
363 |
Â
|
364 |
+
#: src/admin/views/metaboxes/box-option-controls.php:151
|
365 |
Â
msgid "Slide In"
|
366 |
Â
msgstr ""
|
367 |
Â
|
368 |
+
#: src/admin/views/metaboxes/box-option-controls.php:152
|
369 |
Â
msgid "Which animation type should be used to show the box when triggered?"
|
370 |
Â
msgstr ""
|
371 |
Â
|
372 |
+
#: src/admin/views/metaboxes/box-option-controls.php:156
|
373 |
Â
msgid "Auto-show box?"
|
374 |
Â
msgstr ""
|
375 |
Â
|
376 |
+
#: src/admin/views/metaboxes/box-option-controls.php:158
|
377 |
Â
msgid "Never"
|
378 |
Â
msgstr ""
|
379 |
Â
|
380 |
+
#: src/admin/views/metaboxes/box-option-controls.php:159
|
381 |
Â
msgid "Yes, after %s seconds on the page."
|
382 |
Â
msgstr ""
|
383 |
Â
|
384 |
+
#: src/admin/views/metaboxes/box-option-controls.php:160
|
385 |
Â
msgid "Yes, when at %s of page height"
|
386 |
Â
msgstr ""
|
387 |
Â
|
388 |
+
#: src/admin/views/metaboxes/box-option-controls.php:161
|
389 |
Â
msgid "Yes, when at element %s"
|
390 |
Â
msgstr ""
|
391 |
Â
|
392 |
+
#: src/admin/views/metaboxes/box-option-controls.php:161
|
393 |
Â
msgid "Example: #comments"
|
394 |
Â
msgstr ""
|
395 |
Â
|
396 |
+
#: src/admin/views/metaboxes/box-option-controls.php:167
|
397 |
Â
msgid "Cookie expiration"
|
398 |
Â
msgstr ""
|
399 |
Â
|
400 |
+
#: src/admin/views/metaboxes/box-option-controls.php:172, src/admin/views/metaboxes/box-option-controls.php:177
|
401 |
Â
msgid "hours"
|
402 |
Â
msgstr ""
|
403 |
Â
|
404 |
+
#: src/admin/views/metaboxes/box-option-controls.php:181
|
405 |
Â
msgid "After this box is triggered or dismissed, how many hours should it stay hidden?"
|
406 |
Â
msgstr ""
|
407 |
Â
|
408 |
+
#: src/admin/views/metaboxes/box-option-controls.php:185
|
409 |
Â
msgid "Screen width"
|
410 |
Â
msgstr ""
|
411 |
Â
|
412 |
+
#: src/admin/views/metaboxes/box-option-controls.php:190
|
413 |
Â
msgid "larger"
|
414 |
Â
msgstr ""
|
415 |
Â
|
416 |
+
#: src/admin/views/metaboxes/box-option-controls.php:190
|
417 |
Â
msgid "smaller"
|
418 |
Â
msgstr ""
|
419 |
Â
|
420 |
+
#: src/admin/views/metaboxes/box-option-controls.php:191
|
421 |
Â
msgid "Only show on screens %s than %s."
|
422 |
Â
msgstr ""
|
423 |
Â
|
424 |
+
#: src/admin/views/metaboxes/box-option-controls.php:192
|
425 |
Â
msgid "Leave empty if you want to show the box on all screen sizes."
|
426 |
Â
msgstr ""
|
427 |
Â
|
428 |
+
#: src/admin/views/metaboxes/box-option-controls.php:197
|
429 |
Â
msgid "Auto-hide?"
|
430 |
Â
msgstr ""
|
431 |
Â
|
432 |
+
#: src/admin/views/metaboxes/box-option-controls.php:201
|
433 |
Â
msgid "Hide box again when visitors scroll back up?"
|
434 |
Â
msgstr ""
|
435 |
Â
|
436 |
+
#: src/admin/views/metaboxes/box-option-controls.php:205
|
437 |
Â
msgid "Show close icon?"
|
438 |
Â
msgstr ""
|
439 |
Â
|
440 |
+
#: src/admin/views/metaboxes/box-option-controls.php:210
|
441 |
Â
msgid "If you decide to hide the close icon, make sure to offer an alternative way to close the box."
|
442 |
Â
msgstr ""
|
443 |
Â
|
444 |
+
#: src/admin/views/metaboxes/box-option-controls.php:211
|
445 |
Â
msgid "Example: "
|
446 |
Â
msgstr ""
|
447 |
Â
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ 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: 5.
|
7 |
-
Stable tag: 3.2.
|
8 |
Â
License: GPLv2 or later
|
9 |
Â
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
Â
Requires PHP: 5.3
|
@@ -130,6 +130,17 @@ Have a look at the [frequently asked questions](https://wordpress.org/plugins/bo
|
|
130 |
Â
== Changelog ==
|
131 |
Â
|
132 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
133 |
Â
#### 3.2.9 - December 5, 2018
|
134 |
Â
|
135 |
Â
**Improvements**
|
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: 5.1
|
7 |
+
Stable tag: 3.2.10
|
8 |
Â
License: GPLv2 or later
|
9 |
Â
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
Â
Requires PHP: 5.3
|
130 |
Â
== Changelog ==
|
131 |
Â
|
132 |
Â
|
133 |
+
#### 3.2.10 - February 15, 2019
|
134 |
+
|
135 |
+
**Improvements**
|
136 |
+
|
137 |
+
- Better [exit intent detection](https://boxzillaplugin.com/add-ons/exit-intent/) for mobile devices.
|
138 |
+
|
139 |
+
**Additions**
|
140 |
+
|
141 |
+
- New bulk action to quickly duplicate a box with all of its settings.
|
142 |
+
|
143 |
+
|
144 |
Â
#### 3.2.9 - December 5, 2018
|
145 |
Â
|
146 |
Â
**Improvements**
|
src/admin/class-admin.php
CHANGED
@@ -1,763 +1,812 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace Boxzilla\Admin;
|
4 |
-
|
5 |
-
use Boxzilla\Plugin
|
6 |
-
|
7 |
-
|
8 |
-
use WP_Post;
|
9 |
-
use WP_Screen;
|
10 |
-
|
11 |
-
class Admin
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|