Version Description
Download this release
Release Info
Developer | themeisle |
Plugin | WP Maintenance Mode |
Version | 2.5.0 |
Comparing to | |
See all releases |
Code changes from version 2.4.7 to 2.5.0
- CHANGELOG.md +5 -0
- README.md +9 -1
- assets/css/style-admin.css +116 -4
- assets/css/style-admin.min.css +1 -1
- assets/css/style-wizard.css +283 -0
- assets/css/style-wizard.min.css +1 -0
- assets/css/style.bot.css +52 -65
- assets/css/style.bot.min.css +1 -1
- assets/css/style.css +1 -7
- assets/images/chatbot.png +0 -0
- assets/images/external.svg +4 -0
- assets/images/finish-setup.svg +45 -0
- assets/images/subscribe.svg +45 -0
- assets/js/bot.js +366 -377
- assets/js/bot.min.js +1 -1
- assets/js/scripts-admin-global.js +22 -21
- assets/js/scripts-admin-global.min.js +1 -1
- assets/js/scripts-admin.js +542 -187
- assets/js/scripts-admin.min.js +1 -1
- assets/templates/coming-soon/coming-soon-cover/blocks-export.json +6 -0
- assets/templates/coming-soon/coming-soon-cover/screenshot.png +0 -0
- assets/templates/coming-soon/coming-soon-minimal/blocks-export.json +6 -0
- assets/templates/coming-soon/coming-soon-minimal/screenshot.png +0 -0
- assets/templates/coming-soon/coming-soon-modern/blocks-export.json +6 -0
- assets/templates/coming-soon/coming-soon-modern/screenshot.png +0 -0
- assets/templates/maintenance/maintenance-cover/blocks-export.json +6 -0
- assets/templates/maintenance/maintenance-cover/screenshot.png +0 -0
- assets/templates/maintenance/maintenance-minimal/blocks-export.json +6 -0
- assets/templates/maintenance/maintenance-minimal/screenshot.png +0 -0
- assets/templates/maintenance/maintenance-modern/blocks-export.json +6 -0
- assets/templates/maintenance/maintenance-modern/screenshot.png +0 -0
- includes/classes/wp-maintenance-mode-admin.php +363 -13
- includes/classes/wp-maintenance-mode.php +215 -20
- includes/functions/helpers.php +1 -1
- includes/functions/hooks.php +2 -0
- readme.txt +9 -1
- vendor/autoload.php +1 -1
- vendor/codeinwp/themeisle-sdk/CHANGELOG.md +13 -0
- vendor/codeinwp/themeisle-sdk/assets/images/animation.jpg +0 -0
- vendor/codeinwp/themeisle-sdk/assets/images/conditions.jpg +0 -0
- vendor/codeinwp/themeisle-sdk/assets/images/css.jpg +0 -0
- vendor/codeinwp/themeisle-sdk/assets/js/build/index.asset.php +1 -0
- vendor/codeinwp/themeisle-sdk/assets/js/build/index.js +1 -0
- vendor/codeinwp/themeisle-sdk/load.php +1 -1
- vendor/codeinwp/themeisle-sdk/src/Loader.php +1 -1
- vendor/codeinwp/themeisle-sdk/src/Modules/Licenser.php +4 -0
- vendor/codeinwp/themeisle-sdk/src/Modules/Promotions.php +192 -0
- vendor/codeinwp/themeisle-sdk/src/Modules/Rollback.php +17 -1
- vendor/codeinwp/themeisle-sdk/src/Product.php +9 -0
- vendor/codeinwp/themeisle-sdk/start.php +1 -0
- vendor/composer/autoload_real.php +7 -7
- vendor/composer/autoload_static.php +2 -2
- vendor/composer/installed.json +7 -7
- vendor/composer/installed.php +7 -7
- views/maintenance.php +22 -22
- views/settings.php +240 -31
- views/sidebar.php +9 -3
- views/wpmm-page-template.php +48 -0
- wp-maintenance-mode.php +10 -1
CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
1 |
##### [Version 2.4.7](https://github.com/Codeinwp/wp-maintenance-mode/compare/v2.4.6...v2.4.7) (2022-08-08)
|
2 |
|
3 |
##### Fixes
|
1 |
+
#### [Version 2.5.0](https://github.com/Codeinwp/wp-maintenance-mode/compare/v2.4.7...v2.5.0) (2022-09-08)
|
2 |
+
|
3 |
+
- New Feature: Adds compatibility with Block Editor or any page builder for building the maintenance mode page.
|
4 |
+
- New Feature: Adds coming soon and maintenance mode starting templates.
|
5 |
+
|
6 |
##### [Version 2.4.7](https://github.com/Codeinwp/wp-maintenance-mode/compare/v2.4.6...v2.4.7) (2022-08-08)
|
7 |
|
8 |
##### Fixes
|
README.md
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
**Tags:** maintenance mode, admin, administration, unavailable, coming soon, multisite, landing page, under construction, contact form, subscribe, countdown
|
8 |
**Requires at least:** 3.5
|
9 |
**Tested up to:** 6.0
|
10 |
-
**Stable tag:** 2.
|
11 |
**Requires PHP:** 5.6
|
12 |
**License:** GPL-2.0+
|
13 |
|
@@ -91,6 +91,14 @@ Notice: `wp-cron.php` is excluded by default.
|
|
91 |
|
92 |
## Changelog ##
|
93 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
##### [Version 2.4.7](https://github.com/Codeinwp/wp-maintenance-mode/compare/v2.4.6...v2.4.7) (2022-08-08)
|
95 |
|
96 |
##### Fixes
|
7 |
**Tags:** maintenance mode, admin, administration, unavailable, coming soon, multisite, landing page, under construction, contact form, subscribe, countdown
|
8 |
**Requires at least:** 3.5
|
9 |
**Tested up to:** 6.0
|
10 |
+
**Stable tag:** 2.5.0
|
11 |
**Requires PHP:** 5.6
|
12 |
**License:** GPL-2.0+
|
13 |
|
91 |
|
92 |
## Changelog ##
|
93 |
|
94 |
+
#### [Version 2.5.0](https://github.com/Codeinwp/wp-maintenance-mode/compare/v2.4.7...v2.5.0) (2022-09-08)
|
95 |
+
|
96 |
+
- New Feature: Adds compatibility with Block Editor or any page builder for building the maintenance mode page.
|
97 |
+
- New Feature: Adds coming soon and maintenance mode starting templates.
|
98 |
+
|
99 |
+
|
100 |
+
|
101 |
+
|
102 |
##### [Version 2.4.7](https://github.com/Codeinwp/wp-maintenance-mode/compare/v2.4.6...v2.4.7) (2022-08-08)
|
103 |
|
104 |
##### Fixes
|
assets/css/style-admin.css
CHANGED
@@ -114,7 +114,7 @@ h2.wpmm-title {
|
|
114 |
|
115 |
.tabs-content td.has-inline-color-picker {
|
116 |
display: flex;
|
117 |
-
align-items: center;
|
118 |
}
|
119 |
|
120 |
.tabs-content td.has-inline-color-picker .wp-picker-container .wp-color-result {
|
@@ -145,6 +145,58 @@ h2.wpmm-title {
|
|
145 |
display: block;
|
146 |
}
|
147 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
148 |
@media screen and (max-width: 782px) {
|
149 |
.tabs-content td.has-inline-color-picker {
|
150 |
display: flex;
|
@@ -182,8 +234,8 @@ h2.wpmm-title {
|
|
182 |
color: #fff;
|
183 |
}
|
184 |
|
185 |
-
.tabs-content .bot-button {
|
186 |
-
display: inline-block;
|
187 |
}
|
188 |
|
189 |
/* SIDEBARS */
|
@@ -226,8 +278,68 @@ h2.wpmm-title {
|
|
226 |
background-image: none !important;
|
227 |
}
|
228 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
229 |
/* FOOTER RATING */
|
230 |
#footer-left .wpmm_rating:hover {
|
231 |
text-decoration: none !important;
|
232 |
color: #FFB900 !important;
|
233 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
|
115 |
.tabs-content td.has-inline-color-picker {
|
116 |
display: flex;
|
117 |
+
align-items: center;
|
118 |
}
|
119 |
|
120 |
.tabs-content td.has-inline-color-picker .wp-picker-container .wp-color-result {
|
145 |
display: block;
|
146 |
}
|
147 |
|
148 |
+
.category-select-wrap {
|
149 |
+
text-align: center;
|
150 |
+
}
|
151 |
+
|
152 |
+
.templates {
|
153 |
+
display: flex;
|
154 |
+
flex-wrap: wrap;
|
155 |
+
gap: 20px;
|
156 |
+
}
|
157 |
+
|
158 |
+
.template-wrap {
|
159 |
+
width: calc( 100% / 3 - 20px);
|
160 |
+
max-width: 380px;
|
161 |
+
}
|
162 |
+
|
163 |
+
.template-image-wrap {
|
164 |
+
background-color: #fff;
|
165 |
+
line-height: 0;
|
166 |
+
}
|
167 |
+
|
168 |
+
.template-image-wrap img {
|
169 |
+
width: 100%;
|
170 |
+
}
|
171 |
+
|
172 |
+
.template-image-wrap.can-import:hover img,
|
173 |
+
.template-image-wrap.importing img {
|
174 |
+
opacity: .1;
|
175 |
+
}
|
176 |
+
|
177 |
+
.template-image-wrap {
|
178 |
+
position: relative;
|
179 |
+
}
|
180 |
+
|
181 |
+
.template-wrap .template-image-wrap .button-import {
|
182 |
+
display: none;
|
183 |
+
position: absolute;
|
184 |
+
top: 50%;
|
185 |
+
left: 50%;
|
186 |
+
transform: translate(-50%, -50%) !important;
|
187 |
+
}
|
188 |
+
|
189 |
+
.button-import .dashicons.dashicons-update {
|
190 |
+
margin-right: 5px;
|
191 |
+
animation: spin 2s linear infinite;
|
192 |
+
}
|
193 |
+
|
194 |
+
.template-image-wrap.can-import:hover .button-import,
|
195 |
+
.template-image-wrap.importing .button-import {
|
196 |
+
display: flex;
|
197 |
+
align-items: center;
|
198 |
+
}
|
199 |
+
|
200 |
@media screen and (max-width: 782px) {
|
201 |
.tabs-content td.has-inline-color-picker {
|
202 |
display: flex;
|
234 |
color: #fff;
|
235 |
}
|
236 |
|
237 |
+
.tabs-content .bot-button {
|
238 |
+
display: inline-block;
|
239 |
}
|
240 |
|
241 |
/* SIDEBARS */
|
278 |
background-image: none !important;
|
279 |
}
|
280 |
|
281 |
+
.button-big {
|
282 |
+
min-height: 40px !important;
|
283 |
+
padding: 12px 30px !important;
|
284 |
+
font-size: 16px !important;
|
285 |
+
line-height: 18px !important;
|
286 |
+
font-weight: 700;
|
287 |
+
}
|
288 |
+
|
289 |
/* FOOTER RATING */
|
290 |
#footer-left .wpmm_rating:hover {
|
291 |
text-decoration: none !important;
|
292 |
color: #FFB900 !important;
|
293 |
+
}
|
294 |
+
|
295 |
+
/* MODAL */
|
296 |
+
.has-modal {
|
297 |
+
overflow: hidden !important;
|
298 |
+
}
|
299 |
+
|
300 |
+
.modal-overlay {
|
301 |
+
position: fixed;
|
302 |
+
top: 0;
|
303 |
+
right: 0;
|
304 |
+
bottom: 0;
|
305 |
+
left: 0;
|
306 |
+
background-color: rgba(0, 0, 0, 0.35);
|
307 |
+
z-index: 100000;
|
308 |
+
display: flex;
|
309 |
+
}
|
310 |
+
|
311 |
+
.modal-frame {
|
312 |
+
background-color: #fff;
|
313 |
+
box-shadow: 0 0 10px rgba(0,0,0,.5);
|
314 |
+
margin: auto;
|
315 |
+
max-width: 480px;
|
316 |
+
}
|
317 |
+
|
318 |
+
.modal-content {
|
319 |
+
padding: 45px 40px;
|
320 |
+
}
|
321 |
+
|
322 |
+
.modal-header {
|
323 |
+
font-weight: 700;
|
324 |
+
font-size: 20px;
|
325 |
+
line-height: 23px;
|
326 |
+
margin: 0;
|
327 |
+
}
|
328 |
+
|
329 |
+
.modal-text {
|
330 |
+
margin: 30px 0 40px 0;
|
331 |
+
}
|
332 |
+
|
333 |
+
.buttons-wrap {
|
334 |
+
gap: 10px;
|
335 |
+
display: flex;
|
336 |
+
}
|
337 |
+
|
338 |
+
@keyframes spin {
|
339 |
+
from {
|
340 |
+
transform: rotate(0deg);
|
341 |
+
}
|
342 |
+
to {
|
343 |
+
transform: rotate(360deg);
|
344 |
+
}
|
345 |
+
}
|
assets/css/style-admin.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
h2.wpmm-title{background:url(../images/icon-48.png) no-repeat 0;line-height:42px!important;margin-bottom:30px!important;height:48px;padding-left:55px!important}.wpmm-wrapper{display:table;width:100%}.wpmm-wrapper #content{min-width:800px}.wpmm-wrapper #sidebar{padding:0 0 0 20px;width:280px;vertical-align:top}.wpmm-wrapper #sidebar .sidebar_box{background:none repeat scroll 0 0 #fff;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);min-width:255px;line-height:1;margin-bottom:20px;padding:0}.wpmm-wrapper #sidebar .sidebar_box h3{margin:0;padding:8px 12px;border-bottom:1px solid #ececec}.wpmm-wrapper #sidebar .sidebar_box .inside{margin:6px 0 0;font-size:13px;line-height:1.4em;padding:0 12px 12px}.wpmm-wrapper .wrapper-cell{display:table-cell}.wpmm-wrapper .hidden{display:none}.nav-tab-wrapper{border-bottom:1px solid #ccc;padding-bottom:0;padding-top:0!important}.nav-tab-wrapper a{font-size:15px;font-weight:700;line-height:24px;padding:6px 10px;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-line-pack:center;align-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.nav-tab-wrapper a .nav-tab-icon{width:16px;height:16px;margin-right:3px}.tabs-content{margin-top:20px;padding-left:10px}.tabs-content .wp-color-result{margin-bottom:-2px}.tabs-content ul.bg_list{float:left}.tabs-content ul.bg_list li{float:left;margin-right:7px;opacity:.4}.tabs-content ul.bg_list li.active{opacity:1}.tabs-content ul.bg_list li input{display:none}.tabs-content .countdown_details input{width:70px}.tabs-content .countdown_details .margin_left{margin-left:30px}.tabs-content td.has-inline-color-picker{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.tabs-content td.has-inline-color-picker .wp-picker-container .wp-color-result{margin:0 6px}.tabs-content .shortcodes-list-wrapper{margin-top:4px;margin-bottom:0;color:#646970}.tabs-content ul.shortcodes-list{list-style-type:disc;padding-left:15px;font-size:12px;display:none}.tabs-content ul.shortcodes-list span{background-color:#d3d3d3;padding:2px 3px;margin-top:4px;display:inline-block}.tabs-content ul.shortcodes-list.show{display:block}@media screen and (max-width:782px){.tabs-content td.has-inline-color-picker{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.tabs-content td.has-inline-color-picker .wp-picker-container{margin-top:6px}.tabs-content .countdown_details .margin_left,.tabs-content td.has-inline-color-picker .wp-picker-container .wp-color-result{margin-left:0}}.tabs-content .wp-picker-holder{position:absolute;z-index:9999999}.tabs-content #subscribers_wrap .buttons{margin-top:8px}.tabs-content .bot-hint{background:#9f9f9f;padding:10px;float:right;border-radius:5px;color:#fff}.tabs-content .bot-button{display:inline-block}#sidebar .info_box ul{margin-top:10px;margin-bottom:-5px}#sidebar .resources_box ul,#sidebar .themes_box ul{margin-top:10px;margin-bottom:-15px}#sidebar .resources_box li,#sidebar .themes_box li{margin-bottom:10px}.chosen-container,.chosen-select{width:195px!important}.chosen-container-active .chosen-choices{-webkit-box-shadow:none!important;box-shadow:none!important;background-image:none!important}.chosen-container-multi .chosen-choices{border:1px solid #ddd!important;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.07) inset!important;box-shadow:inset 0 1px 2px rgba(0,0,0,.07)!important;background-image:none!important}.chosen-container .chosen-results li.highlighted{background-color:#0074a2!important;background-image:none!important}#footer-left .wpmm_rating:hover{text-decoration:none!important;color:#ffb900!important}
|
1 |
+
h2.wpmm-title{background:url(../images/icon-48.png) no-repeat 0;line-height:42px!important;margin-bottom:30px!important;height:48px;padding-left:55px!important}.wpmm-wrapper{display:table;width:100%}.wpmm-wrapper #content{min-width:800px}.wpmm-wrapper #sidebar{padding:0 0 0 20px;width:280px;vertical-align:top}.wpmm-wrapper #sidebar .sidebar_box{background:none repeat scroll 0 0 #fff;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);min-width:255px;line-height:1;margin-bottom:20px;padding:0}.wpmm-wrapper #sidebar .sidebar_box h3{margin:0;padding:8px 12px;border-bottom:1px solid #ececec}.wpmm-wrapper #sidebar .sidebar_box .inside{margin:6px 0 0;font-size:13px;line-height:1.4em;padding:0 12px 12px}.wpmm-wrapper .wrapper-cell{display:table-cell}.wpmm-wrapper .hidden{display:none}.nav-tab-wrapper{border-bottom:1px solid #ccc;padding-bottom:0;padding-top:0!important}.nav-tab-wrapper a{font-size:15px;font-weight:700;line-height:24px;padding:6px 10px;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-line-pack:center;align-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.nav-tab-wrapper a .nav-tab-icon{width:16px;height:16px;margin-right:3px}.tabs-content{margin-top:20px;padding-left:10px}.tabs-content .wp-color-result{margin-bottom:-2px}.tabs-content ul.bg_list{float:left}.tabs-content ul.bg_list li{float:left;margin-right:7px;opacity:.4}.tabs-content ul.bg_list li.active{opacity:1}.tabs-content ul.bg_list li input{display:none}.tabs-content .countdown_details input{width:70px}.tabs-content .countdown_details .margin_left{margin-left:30px}.tabs-content td.has-inline-color-picker{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.tabs-content td.has-inline-color-picker .wp-picker-container .wp-color-result{margin:0 6px}.tabs-content .shortcodes-list-wrapper{margin-top:4px;margin-bottom:0;color:#646970}.tabs-content ul.shortcodes-list{list-style-type:disc;padding-left:15px;font-size:12px;display:none}.tabs-content ul.shortcodes-list span{background-color:#d3d3d3;padding:2px 3px;margin-top:4px;display:inline-block}.tabs-content ul.shortcodes-list.show{display:block}.category-select-wrap{text-align:center}.templates{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:20px}.template-wrap{width:calc(33.33333% - 20px);max-width:380px}.template-image-wrap{background-color:#fff;line-height:0}.template-image-wrap img{width:100%}.template-image-wrap.can-import:hover img,.template-image-wrap.importing img{opacity:.1}.template-image-wrap{position:relative}.template-wrap .template-image-wrap .button-import{display:none;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%)!important;transform:translate(-50%,-50%)!important}.button-import .dashicons.dashicons-update{margin-right:5px;-webkit-animation:spin 2s linear infinite;animation:spin 2s linear infinite}.template-image-wrap.can-import:hover .button-import,.template-image-wrap.importing .button-import{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}@media screen and (max-width:782px){.tabs-content td.has-inline-color-picker{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.tabs-content td.has-inline-color-picker .wp-picker-container{margin-top:6px}.tabs-content .countdown_details .margin_left,.tabs-content td.has-inline-color-picker .wp-picker-container .wp-color-result{margin-left:0}}.tabs-content .wp-picker-holder{position:absolute;z-index:9999999}.tabs-content #subscribers_wrap .buttons{margin-top:8px}.tabs-content .bot-hint{background:#9f9f9f;padding:10px;float:right;border-radius:5px;color:#fff}.tabs-content .bot-button{display:inline-block}#sidebar .info_box ul{margin-top:10px;margin-bottom:-5px}#sidebar .resources_box ul,#sidebar .themes_box ul{margin-top:10px;margin-bottom:-15px}#sidebar .resources_box li,#sidebar .themes_box li{margin-bottom:10px}.chosen-container,.chosen-select{width:195px!important}.chosen-container-active .chosen-choices{-webkit-box-shadow:none!important;box-shadow:none!important;background-image:none!important}.chosen-container-multi .chosen-choices{border:1px solid #ddd!important;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.07) inset!important;box-shadow:inset 0 1px 2px rgba(0,0,0,.07)!important;background-image:none!important}.chosen-container .chosen-results li.highlighted{background-color:#0074a2!important;background-image:none!important}.button-big{min-height:40px!important;padding:12px 30px!important;font-size:16px!important;line-height:18px!important;font-weight:700}#footer-left .wpmm_rating:hover{text-decoration:none!important;color:#ffb900!important}.has-modal{overflow:hidden!important}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background-color:rgba(0,0,0,.35);z-index:100000;display:-webkit-box;display:-ms-flexbox;display:flex}.modal-frame{background-color:#fff;-webkit-box-shadow:0 0 10px rgba(0,0,0,.5);box-shadow:0 0 10px rgba(0,0,0,.5);margin:auto;max-width:480px}.modal-content{padding:45px 40px}.modal-header{font-weight:700;font-size:20px;line-height:23px;margin:0}.modal-text{margin:30px 0 40px}.buttons-wrap{gap:10px;display:-webkit-box;display:-ms-flexbox;display:flex}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}
|
assets/css/style-wizard.css
ADDED
@@ -0,0 +1,283 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.wpmm-wizard-fullscreen #adminmenumain,
|
2 |
+
.wpmm-wizard-fullscreen #wpadminbar,
|
3 |
+
.wpmm-wizard-fullscreen .notice,
|
4 |
+
.wpmm-wizard-fullscreen .wrap .notice,
|
5 |
+
.wpmm-wizard-fullscreen .wrap .error,
|
6 |
+
.wpmm-wizard-fullscreen .wrap .updated,
|
7 |
+
.wpmm-wizard-fullscreen #wpfooter {
|
8 |
+
display: none !important;
|
9 |
+
}
|
10 |
+
|
11 |
+
.wp-toolbar .wpmm-wizard-fullscreen {
|
12 |
+
margin-top: -32px;
|
13 |
+
}
|
14 |
+
|
15 |
+
#wpwrap {
|
16 |
+
height: 100%;
|
17 |
+
}
|
18 |
+
|
19 |
+
#wp-content {
|
20 |
+
height: 100%;
|
21 |
+
}
|
22 |
+
|
23 |
+
#wpbody {
|
24 |
+
height: 100%;
|
25 |
+
}
|
26 |
+
|
27 |
+
#wpbody-content {
|
28 |
+
height: 100%;
|
29 |
+
padding: 0;
|
30 |
+
}
|
31 |
+
|
32 |
+
.wrap {
|
33 |
+
margin: 0;
|
34 |
+
height: 100%;
|
35 |
+
display: flex;
|
36 |
+
flex-direction: column;
|
37 |
+
}
|
38 |
+
|
39 |
+
.wpmm-wrapper {
|
40 |
+
flex-grow: 1;
|
41 |
+
display: flex;
|
42 |
+
}
|
43 |
+
|
44 |
+
h2.wpmm-title {
|
45 |
+
margin: 0 !important;
|
46 |
+
padding: 8px 48px 8px 188px !important;
|
47 |
+
background-color: #fff;
|
48 |
+
background-position: 130px;
|
49 |
+
position: relative;
|
50 |
+
}
|
51 |
+
|
52 |
+
h2.wpmm-title span {
|
53 |
+
position: absolute;
|
54 |
+
right: 75px;
|
55 |
+
top: 50%;
|
56 |
+
transform: translateY(-50%);
|
57 |
+
cursor: pointer;
|
58 |
+
}
|
59 |
+
|
60 |
+
h2.wpmm-title span img {
|
61 |
+
width: 25px;
|
62 |
+
}
|
63 |
+
|
64 |
+
.wpmm-wizard-fullscreen #wpcontent {
|
65 |
+
margin: 0;
|
66 |
+
padding: 0;
|
67 |
+
}
|
68 |
+
|
69 |
+
#wpmm-wizard-wrapper {
|
70 |
+
background-color: #f4f4f4;
|
71 |
+
overflow: hidden;
|
72 |
+
color: #1b1b1b;
|
73 |
+
width: 100%;
|
74 |
+
}
|
75 |
+
|
76 |
+
#wpmm-wizard-wrapper .slider-wrap {
|
77 |
+
width: 300%;
|
78 |
+
display: flex;
|
79 |
+
transition: 0.4s ease-in-out;
|
80 |
+
height: 100%;
|
81 |
+
}
|
82 |
+
|
83 |
+
.move-to-subscribe {
|
84 |
+
transform: translateX( calc( -100% / 3 ) );
|
85 |
+
}
|
86 |
+
|
87 |
+
.move-to-finish {
|
88 |
+
transform: translateX( calc( -100% / 3 * 2 ) );
|
89 |
+
}
|
90 |
+
|
91 |
+
#wpmm-wizard-wrapper .step-wrap {
|
92 |
+
width: calc( 100% / 3 );
|
93 |
+
display: flex;
|
94 |
+
}
|
95 |
+
|
96 |
+
.step.import-step {
|
97 |
+
margin-left: 130px;
|
98 |
+
margin-top: 100px;
|
99 |
+
}
|
100 |
+
|
101 |
+
.import-step .header {
|
102 |
+
font-size: 24px;
|
103 |
+
line-height: 28px;
|
104 |
+
margin-top: 0;
|
105 |
+
margin-bottom: 10px;
|
106 |
+
}
|
107 |
+
|
108 |
+
.import-step .description {
|
109 |
+
line-height: 30px;
|
110 |
+
font-size: 18px;
|
111 |
+
font-weight: 400;
|
112 |
+
color: currentColor;
|
113 |
+
max-width: 600px;
|
114 |
+
}
|
115 |
+
|
116 |
+
.templates-radio form {
|
117 |
+
display: flex;
|
118 |
+
flex-wrap: wrap;
|
119 |
+
margin-top: 65px;
|
120 |
+
max-width: 800px;
|
121 |
+
width: 100%;
|
122 |
+
gap: 35px;
|
123 |
+
}
|
124 |
+
|
125 |
+
.templates-radio [type=radio], .bullets-wrap [type=radio] {
|
126 |
+
position: absolute;
|
127 |
+
opacity: 0;
|
128 |
+
}
|
129 |
+
|
130 |
+
.templates-radio [type=radio] + .template {
|
131 |
+
cursor: pointer;
|
132 |
+
background-color: #fff;
|
133 |
+
width: 240px;
|
134 |
+
height: 250px;
|
135 |
+
display: block;
|
136 |
+
}
|
137 |
+
|
138 |
+
.templates-radio [type=radio]:checked + .template {
|
139 |
+
outline: 2px solid #0065A6;
|
140 |
+
}
|
141 |
+
|
142 |
+
.templates-radio .template {
|
143 |
+
position: relative;
|
144 |
+
border: 1px solid rgba(0, 0, 0, 0.2);
|
145 |
+
}
|
146 |
+
|
147 |
+
.templates-radio .template img {
|
148 |
+
width: 100%;
|
149 |
+
height: 100%;
|
150 |
+
object-fit: cover;
|
151 |
+
}
|
152 |
+
|
153 |
+
.templates-radio .template p {
|
154 |
+
position: absolute;
|
155 |
+
bottom: 15px;
|
156 |
+
transform: translateX(-50%);
|
157 |
+
left: 50%;
|
158 |
+
white-space: nowrap;
|
159 |
+
}
|
160 |
+
|
161 |
+
.import-button {
|
162 |
+
margin-top: 45px;
|
163 |
+
}
|
164 |
+
|
165 |
+
.dashicons-update {
|
166 |
+
position: absolute;
|
167 |
+
top: 50%;
|
168 |
+
left: 50%;
|
169 |
+
animation: abs-spin 2s linear infinite;
|
170 |
+
}
|
171 |
+
|
172 |
+
.templates-radio .template.loading img {
|
173 |
+
opacity: .2;
|
174 |
+
}
|
175 |
+
|
176 |
+
.import-text {
|
177 |
+
color: #717A84;
|
178 |
+
}
|
179 |
+
|
180 |
+
.templates-radio [type=radio] + .template {
|
181 |
+
width: 340px;
|
182 |
+
height: 357px;
|
183 |
+
}
|
184 |
+
|
185 |
+
.templates-radio .tag {
|
186 |
+
font-size: 15px;
|
187 |
+
margin: 0 0 12px 0;
|
188 |
+
color: #7a7979;
|
189 |
+
}
|
190 |
+
|
191 |
+
.finish-step, .subscribe-step {
|
192 |
+
display: flex;
|
193 |
+
flex-direction: column;
|
194 |
+
align-items: center;
|
195 |
+
text-align: center;
|
196 |
+
margin-top: 150px;
|
197 |
+
margin-left: auto;
|
198 |
+
margin-right: auto;
|
199 |
+
}
|
200 |
+
|
201 |
+
.finish-step h4 {
|
202 |
+
font-size: 24px;
|
203 |
+
max-width: 350px;
|
204 |
+
line-height: 28px;
|
205 |
+
}
|
206 |
+
|
207 |
+
.finish-step .buttons-wrap {
|
208 |
+
margin-top: 30px;
|
209 |
+
display: flex;
|
210 |
+
column-gap: 15px;
|
211 |
+
}
|
212 |
+
|
213 |
+
#view-page-button{
|
214 |
+
color: #555D66;
|
215 |
+
border-color: #555D66;
|
216 |
+
}
|
217 |
+
|
218 |
+
.finish-step p {
|
219 |
+
font-size: 18px;
|
220 |
+
max-width: 440px;
|
221 |
+
line-height: 31px;
|
222 |
+
}
|
223 |
+
|
224 |
+
.subscribe-step {
|
225 |
+
max-width: 365px;
|
226 |
+
}
|
227 |
+
|
228 |
+
.subscribe-step .skip-link {
|
229 |
+
margin-top: 15px;
|
230 |
+
color: #717A84 !important;
|
231 |
+
font-style: italic;
|
232 |
+
padding: 0 10px;
|
233 |
+
}
|
234 |
+
|
235 |
+
.subscribe-step h4 {
|
236 |
+
font-size: 24px;
|
237 |
+
}
|
238 |
+
|
239 |
+
.subscribe-step p {
|
240 |
+
color: #272626;
|
241 |
+
font-size: 18px;
|
242 |
+
}
|
243 |
+
|
244 |
+
#email-input-wrap {
|
245 |
+
position: relative;
|
246 |
+
display: flex;
|
247 |
+
flex-direction: column;
|
248 |
+
row-gap: 9px;
|
249 |
+
width: 100%;
|
250 |
+
}
|
251 |
+
|
252 |
+
#email-input-wrap input[type=text] {
|
253 |
+
color: #757575;
|
254 |
+
height: 43px;
|
255 |
+
}
|
256 |
+
|
257 |
+
input.invalid {
|
258 |
+
border-color: red !important;
|
259 |
+
border-width: 2px !important;
|
260 |
+
}
|
261 |
+
|
262 |
+
input.invalid:focus {
|
263 |
+
box-shadow: 0 0 1px red;
|
264 |
+
}
|
265 |
+
|
266 |
+
#email-input-wrap .subscribe-message {
|
267 |
+
font-size: inherit;
|
268 |
+
position: absolute;
|
269 |
+
right: -10px;
|
270 |
+
top: 0;
|
271 |
+
transform: translate(100%, -15%);
|
272 |
+
color: #717A84;
|
273 |
+
}
|
274 |
+
|
275 |
+
@keyframes abs-spin {
|
276 |
+
from {
|
277 |
+
transform: translate(-50%, -50%) rotate(0deg);
|
278 |
+
}
|
279 |
+
to {
|
280 |
+
transform: translate(-50%, -50%) rotate(360deg);
|
281 |
+
}
|
282 |
+
}
|
283 |
+
|
assets/css/style-wizard.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.wpmm-wizard-fullscreen #adminmenumain,.wpmm-wizard-fullscreen #wpadminbar,.wpmm-wizard-fullscreen #wpfooter,.wpmm-wizard-fullscreen .notice,.wpmm-wizard-fullscreen .wrap .error,.wpmm-wizard-fullscreen .wrap .notice,.wpmm-wizard-fullscreen .wrap .updated{display:none!important}.wp-toolbar .wpmm-wizard-fullscreen{margin-top:-32px}#wp-content,#wpbody,#wpwrap{height:100%}#wpbody-content{height:100%;padding:0}.wrap{margin:0;height:100%;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.wpmm-wrapper,.wrap{display:-webkit-box;display:-ms-flexbox;display:flex}.wpmm-wrapper{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}h2.wpmm-title{margin:0!important;padding:8px 48px 8px 188px!important;background-color:#fff;background-position:130px;position:relative}h2.wpmm-title span{position:absolute;right:75px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);cursor:pointer}h2.wpmm-title span img{width:25px}.wpmm-wizard-fullscreen #wpcontent{margin:0;padding:0}#wpmm-wizard-wrapper{background-color:#f4f4f4;overflow:hidden;color:#1b1b1b;width:100%}#wpmm-wizard-wrapper .slider-wrap{width:300%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-transition:.4s ease-in-out;transition:.4s ease-in-out;height:100%}.move-to-subscribe{-webkit-transform:translateX(-33.33333%);transform:translateX(-33.33333%)}.move-to-finish{-webkit-transform:translateX(-66.66667%);transform:translateX(-66.66667%)}#wpmm-wizard-wrapper .step-wrap{width:33.33333%;display:-webkit-box;display:-ms-flexbox;display:flex}.step.import-step{margin-left:130px;margin-top:100px}.import-step .header{font-size:24px;line-height:28px;margin-top:0;margin-bottom:10px}.import-step .description{line-height:30px;font-size:18px;font-weight:400;color:currentColor;max-width:600px}.templates-radio form{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-top:65px;max-width:800px;width:100%;gap:35px}.bullets-wrap [type=radio],.templates-radio [type=radio]{position:absolute;opacity:0}.templates-radio [type=radio]+.template{cursor:pointer;background-color:#fff;width:240px;height:250px;display:block}.templates-radio [type=radio]:checked+.template{outline:2px solid #0065a6}.templates-radio .template{position:relative;border:1px solid rgba(0,0,0,.2)}.templates-radio .template img{width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.templates-radio .template p{position:absolute;bottom:15px;-webkit-transform:translateX(-50%);transform:translateX(-50%);left:50%;white-space:nowrap}.import-button{margin-top:45px}.dashicons-update{position:absolute;top:50%;left:50%;-webkit-animation:abs-spin 2s linear infinite;animation:abs-spin 2s linear infinite}.templates-radio .template.loading img{opacity:.2}.import-text{color:#717a84}.templates-radio [type=radio]+.template{width:340px;height:357px}.templates-radio .tag{font-size:15px;margin:0 0 12px;color:#7a7979}.finish-step,.subscribe-step{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;text-align:center;margin-top:150px;margin-left:auto;margin-right:auto}.finish-step h4{font-size:24px;max-width:350px;line-height:28px}.finish-step .buttons-wrap{margin-top:30px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px}#view-page-button{color:#555d66;border-color:#555d66}.finish-step p{font-size:18px;max-width:440px;line-height:31px}.subscribe-step{max-width:365px}.subscribe-step .skip-link{margin-top:15px;color:#717a84!important;font-style:italic;padding:0 10px}.subscribe-step h4{font-size:24px}.subscribe-step p{color:#272626;font-size:18px}#email-input-wrap{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;row-gap:9px;width:100%}#email-input-wrap input[type=text]{color:#757575;height:43px}input.invalid{border-color:red!important;border-width:2px!important}input.invalid:focus{-webkit-box-shadow:0 0 1px red;box-shadow:0 0 1px red}#email-input-wrap .subscribe-message{font-size:inherit;position:absolute;right:-10px;top:0;-webkit-transform:translate(100%,-15%);transform:translate(100%,-15%);color:#717a84}@-webkit-keyframes abs-spin{0%{-webkit-transform:translate(-50%,-50%) rotate(0deg);transform:translate(-50%,-50%) rotate(0deg)}to{-webkit-transform:translate(-50%,-50%) rotate(1turn);transform:translate(-50%,-50%) rotate(1turn)}}@keyframes abs-spin{0%{-webkit-transform:translate(-50%,-50%) rotate(0deg);transform:translate(-50%,-50%) rotate(0deg)}to{-webkit-transform:translate(-50%,-50%) rotate(1turn);transform:translate(-50%,-50%) rotate(1turn)}}
|
assets/css/style.bot.css
CHANGED
@@ -4,7 +4,6 @@
|
|
4 |
*/
|
5 |
.bot .wrap { margin-top: 60px; }
|
6 |
.bot .wrap h1 { margin-bottom: 50px; }
|
7 |
-
.wrap.under-bot { margin-top: 50px; }
|
8 |
.wrap.under-bot .countdown { margin-bottom: 50px; }
|
9 |
.wrap.under-bot .social { margin-bottom: 50px; }
|
10 |
|
@@ -29,17 +28,23 @@
|
|
29 |
}
|
30 |
|
31 |
.bot-container {
|
32 |
-
|
33 |
-
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
}
|
36 |
|
37 |
.background .bot-chat-wrapper {
|
38 |
border-radius: 10px;
|
39 |
background-color: rgb(255, 255, 255);
|
40 |
-
box-shadow:
|
41 |
-
max-width: 720px;
|
42 |
-
padding-left: 110px;
|
43 |
}
|
44 |
|
45 |
.chat-message-wrapper {
|
@@ -48,7 +53,6 @@
|
|
48 |
align-items: center;
|
49 |
margin-bottom: 16px;
|
50 |
width: 100%;
|
51 |
-
padding-left: 80px;
|
52 |
}
|
53 |
.chat-message-wrapper .chat-message {
|
54 |
max-width: 100%;
|
@@ -67,16 +71,6 @@
|
|
67 |
position: relative;
|
68 |
}
|
69 |
|
70 |
-
/* Show bot-avatar on last message. */
|
71 |
-
.chat-message-wrapper .bot-avatar {
|
72 |
-
display: none;
|
73 |
-
top: -18px;
|
74 |
-
}
|
75 |
-
.chat-message-wrapper:last-child .bot-avatar {
|
76 |
-
display: block;
|
77 |
-
}
|
78 |
-
/* ------------------------------ */
|
79 |
-
|
80 |
.chat-message-wrapper .message-date {
|
81 |
font-size: 12px;
|
82 |
color: #c3c3c3;
|
@@ -95,15 +89,20 @@ CHAT BOT STYLING
|
|
95 |
// CHAT BOT & TYPING WRAPPER
|
96 |
*/
|
97 |
.bot-chat-wrapper {
|
98 |
-
|
99 |
-
|
100 |
-
height: 460px;
|
101 |
-
padding-top: 45px;
|
102 |
-
padding-right: 40px;
|
103 |
-
padding-bottom: 45px;
|
104 |
-
padding-left: 75px;
|
105 |
overflow-y: scroll;
|
106 |
overflow-x: hidden;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
}
|
108 |
|
109 |
.typing-wrapper {
|
@@ -118,16 +117,20 @@ CHAT BOT STYLING
|
|
118 |
width: 60px;
|
119 |
height: 60px;
|
120 |
|
121 |
-
position:
|
122 |
-
|
123 |
-
|
124 |
|
125 |
background-size: cover;
|
126 |
background-repeat: no-repeat;
|
127 |
background-position: center;
|
128 |
|
129 |
border-radius: 50%;
|
130 |
-
|
|
|
|
|
|
|
|
|
131 |
}
|
132 |
|
133 |
.typing-wrapper .bot-name {
|
@@ -135,7 +138,6 @@ CHAT BOT STYLING
|
|
135 |
font-weight: bold;
|
136 |
}
|
137 |
|
138 |
-
|
139 |
/*
|
140 |
// CHAT MESSAGE LINE
|
141 |
*/
|
@@ -161,7 +163,6 @@ CHAT BOT STYLING
|
|
161 |
border-color: transparent #f4f4f4 transparent transparent;
|
162 |
}
|
163 |
|
164 |
-
|
165 |
/*
|
166 |
// HELPERS
|
167 |
*/
|
@@ -175,11 +176,12 @@ CHAT BOT STYLING
|
|
175 |
clear: both;
|
176 |
}
|
177 |
|
178 |
-
|
179 |
/*
|
180 |
// USER
|
181 |
*/
|
182 |
.chat-message.user {
|
|
|
|
|
183 |
animation: fade-in-right 0.2s linear 0.4s both;
|
184 |
background: #a0a0a0;
|
185 |
color: #fff;
|
@@ -197,7 +199,6 @@ CHAT BOT STYLING
|
|
197 |
color: #38a9d9;
|
198 |
}
|
199 |
|
200 |
-
|
201 |
/*
|
202 |
// USER CHOICES BUTTONS
|
203 |
*/
|
@@ -225,7 +226,6 @@ CHAT BOT STYLING
|
|
225 |
color: #fff;
|
226 |
}
|
227 |
|
228 |
-
|
229 |
/*
|
230 |
// NAME/EMAIL INPUT
|
231 |
*/
|
@@ -234,22 +234,23 @@ CHAT BOT STYLING
|
|
234 |
background: transparent;
|
235 |
border-bottom: 2px solid #6ecff9;
|
236 |
border-radius: 0;
|
237 |
-
padding: 10px;
|
|
|
|
|
238 |
}
|
239 |
|
240 |
.input { animation: fadeInGrownIn 0.5s ease; }
|
241 |
|
242 |
-
.input input {
|
|
|
243 |
border: none;
|
244 |
-
border-color: #fff;
|
245 |
color: #000;
|
246 |
background: none;
|
247 |
box-shadow: none;
|
248 |
-
margin-right: 60px;
|
249 |
font-size: 14px;
|
250 |
}
|
251 |
|
252 |
-
.input input:focus { outline: none; }
|
253 |
.input input::-webkit-input-placeholder { color: #c3c3c3; }
|
254 |
.input input:-ms-input-placeholder { color: #c3c3c3; }
|
255 |
.input input::-moz-placeholder { color: #c3c3c3; }
|
@@ -265,14 +266,19 @@ CHAT BOT STYLING
|
|
265 |
}
|
266 |
|
267 |
.bot-error {
|
268 |
-
|
269 |
-
|
270 |
-
line-height: 65px;
|
271 |
padding: 0 50px;
|
272 |
color: #fff;
|
273 |
-
font-size: 20px;
|
274 |
position: fixed;
|
275 |
-
bottom:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
276 |
}
|
277 |
|
278 |
/*
|
@@ -282,7 +288,7 @@ CHAT BOT STYLING
|
|
282 |
.typing {
|
283 |
border-radius: 5px;
|
284 |
background-color: #fff;
|
285 |
-
box-shadow:
|
286 |
width: 120px;
|
287 |
height: 40px;
|
288 |
display: flex;
|
@@ -290,7 +296,6 @@ CHAT BOT STYLING
|
|
290 |
align-items: center;
|
291 |
position: relative;
|
292 |
animation: fadeInGrownIn 0.5s ease;
|
293 |
-
/*margin-left: 90px;*/
|
294 |
}
|
295 |
|
296 |
/* Typing Dots ----*/
|
@@ -384,10 +389,7 @@ CHAT BOT STYLING
|
|
384 |
|
385 |
.bot-chat-wrapper,
|
386 |
.bg-image .bot-chat-wrapper {
|
387 |
-
|
388 |
-
padding-top: 20px;
|
389 |
-
padding-right: 20px;
|
390 |
-
padding-bottom: 20px;
|
391 |
}
|
392 |
|
393 |
.bg-image .bot-chat-wrapper {
|
@@ -403,18 +405,3 @@ CHAT BOT STYLING
|
|
403 |
font-size: 16px;
|
404 |
}
|
405 |
}
|
406 |
-
|
407 |
-
|
408 |
-
/*
|
409 |
-
// CUSTOM SCROLL BAR
|
410 |
-
*/
|
411 |
-
|
412 |
-
/* Hide scrollbar in Chrome (Webkit) */
|
413 |
-
.bot-chat-wrapper::-webkit-scrollbar {
|
414 |
-
width: 0px;
|
415 |
-
}
|
416 |
-
|
417 |
-
/* Hide scrollbar in Firefox */
|
418 |
-
.bot-chat-wrapper {
|
419 |
-
scrollbar-width: none;
|
420 |
-
}
|
4 |
*/
|
5 |
.bot .wrap { margin-top: 60px; }
|
6 |
.bot .wrap h1 { margin-bottom: 50px; }
|
|
|
7 |
.wrap.under-bot .countdown { margin-bottom: 50px; }
|
8 |
.wrap.under-bot .social { margin-bottom: 50px; }
|
9 |
|
28 |
}
|
29 |
|
30 |
.bot-container {
|
31 |
+
position: absolute;
|
32 |
+
bottom: 30px;
|
33 |
+
right: 30px;
|
34 |
+
}
|
35 |
+
|
36 |
+
.avatar-notice {
|
37 |
+
position: absolute;
|
38 |
+
top: 0;
|
39 |
+
right: 0;
|
40 |
+
border: 8px solid #df1c44;
|
41 |
+
border-radius: 100%;
|
42 |
}
|
43 |
|
44 |
.background .bot-chat-wrapper {
|
45 |
border-radius: 10px;
|
46 |
background-color: rgb(255, 255, 255);
|
47 |
+
box-shadow: 0 4px 40px rgba(0, 0, 0, 0.2);
|
|
|
|
|
48 |
}
|
49 |
|
50 |
.chat-message-wrapper {
|
53 |
align-items: center;
|
54 |
margin-bottom: 16px;
|
55 |
width: 100%;
|
|
|
56 |
}
|
57 |
.chat-message-wrapper .chat-message {
|
58 |
max-width: 100%;
|
71 |
position: relative;
|
72 |
}
|
73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
.chat-message-wrapper .message-date {
|
75 |
font-size: 12px;
|
76 |
color: #c3c3c3;
|
89 |
// CHAT BOT & TYPING WRAPPER
|
90 |
*/
|
91 |
.bot-chat-wrapper {
|
92 |
+
height: 350px;
|
93 |
+
padding: 10px 40px;
|
|
|
|
|
|
|
|
|
|
|
94 |
overflow-y: scroll;
|
95 |
overflow-x: hidden;
|
96 |
+
|
97 |
+
width: 400px;
|
98 |
+
font-size: 16px;
|
99 |
+
position: fixed;
|
100 |
+
right: 30px;
|
101 |
+
bottom: 130px;
|
102 |
+
background-color: #fff;
|
103 |
+
|
104 |
+
box-shadow: rgba(0, 0, 0, 0.1) 0 12px 24px 0;
|
105 |
+
border-radius: 8px;
|
106 |
}
|
107 |
|
108 |
.typing-wrapper {
|
117 |
width: 60px;
|
118 |
height: 60px;
|
119 |
|
120 |
+
position: fixed;
|
121 |
+
bottom: 57px;
|
122 |
+
right: 30px;
|
123 |
|
124 |
background-size: cover;
|
125 |
background-repeat: no-repeat;
|
126 |
background-position: center;
|
127 |
|
128 |
border-radius: 50%;
|
129 |
+
box-shadow: rgba(0, 0, 0, 0.1) 0 12px 24px 0;
|
130 |
+
background-color: #fff;
|
131 |
+
|
132 |
+
z-index: 1;
|
133 |
+
cursor: pointer;
|
134 |
}
|
135 |
|
136 |
.typing-wrapper .bot-name {
|
138 |
font-weight: bold;
|
139 |
}
|
140 |
|
|
|
141 |
/*
|
142 |
// CHAT MESSAGE LINE
|
143 |
*/
|
163 |
border-color: transparent #f4f4f4 transparent transparent;
|
164 |
}
|
165 |
|
|
|
166 |
/*
|
167 |
// HELPERS
|
168 |
*/
|
176 |
clear: both;
|
177 |
}
|
178 |
|
|
|
179 |
/*
|
180 |
// USER
|
181 |
*/
|
182 |
.chat-message.user {
|
183 |
+
display: flex;
|
184 |
+
align-items: center;
|
185 |
animation: fade-in-right 0.2s linear 0.4s both;
|
186 |
background: #a0a0a0;
|
187 |
color: #fff;
|
199 |
color: #38a9d9;
|
200 |
}
|
201 |
|
|
|
202 |
/*
|
203 |
// USER CHOICES BUTTONS
|
204 |
*/
|
226 |
color: #fff;
|
227 |
}
|
228 |
|
|
|
229 |
/*
|
230 |
// NAME/EMAIL INPUT
|
231 |
*/
|
234 |
background: transparent;
|
235 |
border-bottom: 2px solid #6ecff9;
|
236 |
border-radius: 0;
|
237 |
+
padding: 10px 10px 10px 0;
|
238 |
+
white-space: nowrap;
|
239 |
+
max-width: unset;
|
240 |
}
|
241 |
|
242 |
.input { animation: fadeInGrownIn 0.5s ease; }
|
243 |
|
244 |
+
.bot-container .input input {
|
245 |
+
padding: 0 10px;
|
246 |
border: none;
|
|
|
247 |
color: #000;
|
248 |
background: none;
|
249 |
box-shadow: none;
|
|
|
250 |
font-size: 14px;
|
251 |
}
|
252 |
|
253 |
+
.input input:focus { outline: none !important; box-shadow: none !important; }
|
254 |
.input input::-webkit-input-placeholder { color: #c3c3c3; }
|
255 |
.input input:-ms-input-placeholder { color: #c3c3c3; }
|
256 |
.input input::-moz-placeholder { color: #c3c3c3; }
|
266 |
}
|
267 |
|
268 |
.bot-error {
|
269 |
+
background: #000;
|
270 |
+
line-height: 50px;
|
|
|
271 |
padding: 0 50px;
|
272 |
color: #fff;
|
|
|
273 |
position: fixed;
|
274 |
+
bottom: 20px;
|
275 |
+
right: 20px;
|
276 |
+
border-radius: 5px;
|
277 |
+
z-index: 5;
|
278 |
+
}
|
279 |
+
|
280 |
+
.bot-error p {
|
281 |
+
margin: 0;
|
282 |
}
|
283 |
|
284 |
/*
|
288 |
.typing {
|
289 |
border-radius: 5px;
|
290 |
background-color: #fff;
|
291 |
+
box-shadow: 0 7px 15px 0 rgba(0, 0, 0, 0.1);
|
292 |
width: 120px;
|
293 |
height: 40px;
|
294 |
display: flex;
|
296 |
align-items: center;
|
297 |
position: relative;
|
298 |
animation: fadeInGrownIn 0.5s ease;
|
|
|
299 |
}
|
300 |
|
301 |
/* Typing Dots ----*/
|
389 |
|
390 |
.bot-chat-wrapper,
|
391 |
.bg-image .bot-chat-wrapper {
|
392 |
+
padding: 20px;
|
|
|
|
|
|
|
393 |
}
|
394 |
|
395 |
.bg-image .bot-chat-wrapper {
|
405 |
font-size: 16px;
|
406 |
}
|
407 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/css/style.bot.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.bot .wrap{margin-top:60px}.bot .wrap h1
|
1 |
+
.bot .wrap{margin-top:60px}.bot .wrap h1,.wrap.under-bot .countdown,.wrap.under-bot .social{margin-bottom:50px}.bot-container *,.bot-container :after,.bot-container :before{-webkit-box-sizing:border-box;box-sizing:border-box}.bot-container p{margin-top:0;margin-bottom:16px}.bot-container a{text-decoration:none;cursor:pointer}.bot-container ul{list-style-type:none;padding-left:0}.bot-container{position:absolute;bottom:30px;right:30px}.avatar-notice{position:absolute;top:0;right:0;border:8px solid #df1c44;border-radius:100%}.background .bot-chat-wrapper{border-radius:10px;background-color:#fff;-webkit-box-shadow:0 4px 40px rgba(0,0,0,.2);box-shadow:0 4px 40px rgba(0,0,0,.2)}.chat-message-wrapper{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:16px;width:100%}.chat-message-wrapper .chat-message{max-width:100%;width:100%;color:#3a3e45;line-height:24px}.absolute-wrapper{position:absolute;left:0;bottom:20%}.message-details{position:relative}.chat-message-wrapper .message-date{font-size:12px;color:#c3c3c3}.chat-message-wrapper p,.typing-wrapper p{margin-bottom:0}.bot-chat-wrapper{height:350px;padding:10px 40px;overflow-y:scroll;overflow-x:hidden;width:400px;font-size:16px;position:fixed;right:30px;bottom:130px;background-color:#fff;-webkit-box-shadow:rgba(0,0,0,.1) 0 12px 24px 0;box-shadow:0 12px 24px 0 rgba(0,0,0,.1);border-radius:8px}.typing-wrapper{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:16px;position:relative}.bot-avatar{width:60px;height:60px;position:fixed;bottom:57px;right:30px;background-size:cover;background-repeat:no-repeat;background-position:50%;border-radius:50%;-webkit-box-shadow:rgba(0,0,0,.1) 0 12px 24px 0;box-shadow:0 12px 24px 0 rgba(0,0,0,.1);background-color:#fff;z-index:1;cursor:pointer}.typing-wrapper .bot-name{margin-right:22px;font-weight:700}.chat-message{background-color:#f4f4f4;border-radius:5px;padding:15px;max-width:75%;clear:both;position:relative;float:left;-webkit-animation:fade-in-left .2s linear both;animation:fade-in-left .2s linear both}.chat-message:before{content:" ";position:absolute;width:0;height:0;left:-20px;bottom:20%;border:10px solid transparent;border-right-color:#f4f4f4}.cf:after,.cf:before{content:" ";display:table}.cf:after{clear:both}.chat-message.user{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-animation:fade-in-right .2s linear .4s both;animation:fade-in-right .2s linear .4s both;background:#a0a0a0;color:#fff;float:right;padding:15px;font-size:14px}.chat-message a{color:#6ecff9;text-decoration:underline;-webkit-transition:all .3s ease;transition:all .3s ease}.chat-message a:hover{color:#38a9d9}.choices{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.choices .chat-message{background:none;color:#6ecff9;border:2px solid #6ecff9;cursor:pointer;-webkit-animation:fadeInGrownIn .5s ease;animation:fadeInGrownIn .5s ease;float:none;display:inline-block;-webkit-transition:all .3s ease;transition:all .3s ease}.choices .chat-message:first-child{margin-right:10px}.choices .chat-message:hover{background:#6ecff9;color:#fff}.input .chat-message.user{background:transparent;border-bottom:2px solid #6ecff9;border-radius:0;padding:10px 10px 10px 0;white-space:nowrap;max-width:unset}.input{-webkit-animation:fadeInGrownIn .5s ease;animation:fadeInGrownIn .5s ease}.bot-container .input input{padding:0 10px;border:none;color:#000;background:none;-webkit-box-shadow:none;box-shadow:none;font-size:14px}.input input:focus{outline:none!important;-webkit-box-shadow:none!important;box-shadow:none!important}.input input::-webkit-input-placeholder{color:#c3c3c3}.input input:-ms-input-placeholder{color:#c3c3c3}.input input:-moz-placeholder,.input input::-moz-placeholder{color:#c3c3c3}.input a{color:#6ecff9;text-decoration:none;text-transform:uppercase;cursor:pointer;font-size:14px;font-weight:700}.bot-error{background:#000;line-height:50px;padding:0 50px;color:#fff;position:fixed;bottom:20px;right:20px;border-radius:5px;z-index:5}.bot-error p{margin:0}.typing{border-radius:5px;background-color:#fff;-webkit-box-shadow:0 7px 15px 0 rgba(0,0,0,.1);box-shadow:0 7px 15px 0 rgba(0,0,0,.1);width:120px;height:40px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;position:relative;-webkit-animation:fadeInGrownIn .5s ease;animation:fadeInGrownIn .5s ease}.typing .dot{border-radius:50%;width:8px;height:8px;display:block;margin-right:12px;-webkit-animation:wave .9s linear infinite;animation:wave .9s linear infinite}.typing .dot:first-child{background-color:#4f3beb}.typing .dot:nth-child(2){background-color:#6292f3;-webkit-animation-delay:-.7s;animation-delay:-.7s}.typing .dot:nth-child(3){background-color:#6ecff9;-webkit-animation-delay:-.5s;animation-delay:-.5s;margin-right:0}.bot-chat-wrapper .chat-message.user:before,.typing:before{content:"";display:none}@-webkit-keyframes fadeInGrownIn{0%{opacity:0;-webkit-transform:scale(.9);transform:scale(.9)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes fadeInGrownIn{0%{opacity:0;-webkit-transform:scale(.9);transform:scale(.9)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes fade-in-left{0%{-webkit-transform:translateX(-50px);transform:translateX(-50px);opacity:0}to{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}}@keyframes fade-in-left{0%{-webkit-transform:translateX(-50px);transform:translateX(-50px);opacity:0}to{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}}@-webkit-keyframes fade-in-right{0%{-webkit-transform:translateX(50px);transform:translateX(50px);opacity:0}to{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}}@keyframes fade-in-right{0%{-webkit-transform:translateX(50px);transform:translateX(50px);opacity:0}to{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}}@-webkit-keyframes wave{0%,60%,to{-webkit-transform:initial;transform:none}30%{-webkit-transform:translateY(-10px);transform:translateY(-10px)}}@keyframes wave{0%,60%,to{-webkit-transform:initial;transform:none}30%{-webkit-transform:translateY(-10px);transform:translateY(-10px)}}@media screen and (max-width:700px){.bot-avatar{display:none!important}.bg-image .bot-chat-wrapper,.bot-chat-wrapper{padding:20px}.bg-image .bot-chat-wrapper{margin-left:10px;margin-right:10px}.chat-message{max-width:100%}.input input{font-size:16px}}
|
assets/css/style.css
CHANGED
@@ -29,7 +29,6 @@ blockquote:before, blockquote:after, q:before, q:after {
|
|
29 |
content: none;
|
30 |
}
|
31 |
input, button {
|
32 |
-
/* -webkit-appearance: none; */
|
33 |
border-radius: 0;
|
34 |
}
|
35 |
table {
|
@@ -67,7 +66,6 @@ a {
|
|
67 |
}
|
68 |
body, html {
|
69 |
min-height: 100%;
|
70 |
-
/*height: 100%;*/
|
71 |
}
|
72 |
body {
|
73 |
background-color: #fff;
|
@@ -141,11 +139,7 @@ body {
|
|
141 |
background-color: #fff; /*2.3.0*/
|
142 |
}
|
143 |
.wrap form.subscribe_form {
|
144 |
-
/* box-sizing: border-box;
|
145 |
-
width: 450px; */
|
146 |
margin: 0 0 75px;
|
147 |
-
/* display: inline-block; */
|
148 |
-
/* border: 3px solid #e0e0e0; */
|
149 |
overflow: hidden;
|
150 |
text-align: center;
|
151 |
}
|
@@ -565,4 +559,4 @@ body {
|
|
565 |
top: 28px;
|
566 |
left: 32%;
|
567 |
}
|
568 |
-
}
|
29 |
content: none;
|
30 |
}
|
31 |
input, button {
|
|
|
32 |
border-radius: 0;
|
33 |
}
|
34 |
table {
|
66 |
}
|
67 |
body, html {
|
68 |
min-height: 100%;
|
|
|
69 |
}
|
70 |
body {
|
71 |
background-color: #fff;
|
139 |
background-color: #fff; /*2.3.0*/
|
140 |
}
|
141 |
.wrap form.subscribe_form {
|
|
|
|
|
142 |
margin: 0 0 75px;
|
|
|
|
|
143 |
overflow: hidden;
|
144 |
text-align: center;
|
145 |
}
|
559 |
top: 28px;
|
560 |
left: 32%;
|
561 |
}
|
562 |
+
}
|
assets/images/chatbot.png
ADDED
Binary file
|
assets/images/external.svg
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<svg width="21" height="21" viewBox="0 0 21 21" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.71875 6.12524C3.71875 4.79631 4.79606 3.71899 6.125 3.71899H8.96875V5.03149H6.125C5.52094 5.03149 5.03125 5.52118 5.03125 6.12524V14.8752C5.03125 15.4793 5.52094 15.969 6.125 15.969H14.875C15.4791 15.969 15.9688 15.4793 15.9688 14.8752V11.6912H17.2813V14.8752C17.2813 16.2042 16.2039 17.2815 14.875 17.2815H6.125C4.79607 17.2815 3.71875 16.2042 3.71875 14.8752V6.12524Z" fill="#1E1E1E"/>
|
3 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M16.2955 3.95486L13.0358 3.96959L13.0299 2.65711L18.5489 2.63217L18.5016 8.1315L17.1891 8.1202L17.217 4.88953L11.6301 10.4763L10.7021 9.54826L16.2955 3.95486Z" fill="#1E1E1E"/>
|
4 |
+
</svg>
|
assets/images/finish-setup.svg
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<svg width="201" height="122" viewBox="0 0 201 122" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2 |
+
<path d="M157.477 76.922C158.353 93.0649 126.793 125.889 87.892 113.74C69.7997 108.089 71.3322 98.7092 57.5751 86.3477C49.3749 78.9801 37.5928 73.4091 34.3159 62.6995C31.4851 53.4558 33.2211 43.5203 38.1288 37.0577C49.1665 22.5237 71.4494 12.5716 93.4048 35.4708C115.36 58.37 155.213 35.2883 157.477 76.922Z" fill="url(#paint0_linear_285_614)"/>
|
3 |
+
<path d="M143.782 35.5714C140.89 40.733 134.556 41.4422 124.408 40.4612C116.777 39.7221 109.817 39.1503 102.185 34.989C96.8428 32.0785 92.6141 28.1408 89.5279 24.3161C86.1834 20.173 81.515 15.4444 83.8036 10.7465C86.9484 4.2935 105.135 -1.14183 122.795 7.74617C142.195 17.5127 146.611 30.5265 143.782 35.5714Z" fill="url(#paint1_linear_285_614)"/>
|
4 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M73.7296 100.076C72.767 100.593 71.6786 100.829 70.5886 100.757C69.4985 100.685 68.4505 100.309 67.564 99.6702C66.6774 99.0319 65.988 98.1574 65.5742 97.1464C65.1604 96.1354 65.0389 95.0284 65.2235 93.9517L69.4426 69.5366L51.5748 52.2375C50.8008 51.476 50.2546 50.5137 49.9978 49.4588C49.741 48.4038 49.7837 47.2982 50.1211 46.2662C50.4585 45.2342 51.0772 44.3168 51.9076 43.6174C52.7381 42.9179 53.7472 42.4641 54.8216 42.307L79.5235 38.7442L90.5572 16.5117C91.0458 15.5353 91.7966 14.7143 92.7255 14.1404C93.6544 13.5666 94.7246 13.2627 95.8165 13.2627C96.9083 13.2627 97.9785 13.5666 98.9074 14.1404C99.8363 14.7143 100.587 15.5353 101.076 16.5117L112.109 38.7442L136.811 42.307C137.886 42.4639 138.895 42.9175 139.726 43.617C140.556 44.3164 141.175 45.2338 141.513 46.2658C141.85 47.2979 141.893 48.4037 141.636 49.4587C141.379 50.5138 140.833 51.4761 140.058 52.2375L122.181 69.527L126.4 93.9421C126.586 95.0195 126.466 96.1275 126.053 97.1398C125.64 98.1521 124.951 99.028 124.064 99.6675C123.177 100.307 122.128 100.684 121.037 100.757C119.946 100.829 118.857 100.593 117.894 100.076L95.8069 88.5612L73.7296 100.076ZM16.1462 100.434C15.67 100.689 15.1315 100.806 14.5922 100.771C14.0528 100.735 13.5343 100.549 13.0956 100.233C12.6569 99.9174 12.3158 99.4847 12.111 98.9845C11.9063 98.4842 11.8462 97.9366 11.9375 97.4038L14.025 85.3246L5.18429 76.7661C4.8012 76.3894 4.53087 75.9133 4.40374 75.3913C4.2766 74.8693 4.29772 74.3222 4.4647 73.8116C4.63169 73.3009 4.93791 72.847 5.34889 72.501C5.75987 72.155 6.25929 71.9305 6.79092 71.853L19.013 70.0903L24.4723 59.091C24.7141 58.608 25.0856 58.2018 25.5452 57.918C26.0048 57.6341 26.5343 57.4838 27.0744 57.4838C27.6146 57.4838 28.1441 57.6341 28.6037 57.918C29.0633 58.2018 29.4348 58.608 29.6766 59.091L35.1359 70.0903L47.3582 71.853C47.8898 71.9306 48.3892 72.155 48.8002 72.5011C49.2111 72.8471 49.5173 73.301 49.6843 73.8117C49.8512 74.3223 49.8723 74.8694 49.7452 75.3914C49.618 75.9133 49.3477 76.3895 48.9646 76.7661L40.1191 85.3198L42.2066 97.399C42.299 97.9321 42.2397 98.4805 42.0354 98.9815C41.8311 99.4825 41.49 99.916 41.0512 100.232C40.6123 100.549 40.0933 100.736 39.5534 100.771C39.0135 100.807 38.4745 100.69 37.9979 100.434L27.0698 94.737L16.1462 100.434ZM153.61 100.434C153.134 100.689 152.596 100.806 152.056 100.771C151.517 100.735 150.998 100.549 150.56 100.233C150.121 99.9174 149.78 99.4847 149.575 98.9845C149.37 98.4842 149.31 97.9366 149.402 97.4038L151.489 85.3246L142.648 76.7661C142.265 76.3894 141.995 75.9133 141.868 75.3913C141.741 74.8693 141.762 74.3222 141.929 73.8116C142.096 73.3009 142.402 72.847 142.813 72.501C143.224 72.155 143.723 71.9305 144.255 71.853L156.477 70.0903L161.936 59.091C162.178 58.608 162.55 58.2018 163.009 57.918C163.469 57.6341 163.998 57.4838 164.538 57.4838C165.079 57.4838 165.608 57.6341 166.068 57.918C166.527 58.2018 166.899 58.608 167.141 59.091L172.6 70.0903L184.822 71.853C185.354 71.9306 185.853 72.1551 186.264 72.5012C186.675 72.8472 186.981 73.3011 187.148 73.8117C187.315 74.3223 187.336 74.8693 187.209 75.3913C187.082 75.9133 186.812 76.3894 186.429 76.7661L177.583 85.3198L179.671 97.399C179.763 97.9321 179.704 98.4804 179.499 98.9813C179.295 99.4822 178.954 99.9156 178.515 100.232C178.076 100.548 177.557 100.735 177.017 100.771C176.478 100.806 175.939 100.69 175.462 100.434L164.534 94.737L153.61 100.434Z" fill="#63A18F" stroke="#63A18F" stroke-width="7.28784" stroke-linecap="round" stroke-linejoin="round"/>
|
5 |
+
<path d="M103.909 55.3918L93.7842 65.5166L87.7036 59.4408" stroke="white" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
|
6 |
+
<path d="M171.755 54.0817C165.947 55.4577 159.805 50.5321 159.805 50.5321C159.805 50.5321 163.082 43.3787 168.892 42.0069C174.7 40.631 180.841 45.5523 180.841 45.5523C180.841 45.5523 177.563 52.7058 171.755 54.0817Z" fill="url(#paint2_linear_285_614)"/>
|
7 |
+
<path d="M192.205 95.3401C195.64 97.7064 200.889 96.0524 200.889 96.0524C200.889 96.0524 200.564 90.5622 197.126 88.1981C193.691 85.8319 188.444 87.4836 188.444 87.4836C188.444 87.4836 188.769 92.9738 192.205 95.3401Z" fill="url(#paint3_linear_285_614)"/>
|
8 |
+
<path d="M50.8889 112.929C53.5397 115.627 58.4968 115.058 58.4968 115.058C58.4968 115.058 59.1525 110.115 56.4995 107.419C53.8487 104.721 48.8942 105.288 48.8942 105.288C48.8942 105.288 48.2382 110.231 50.8889 112.929Z" fill="url(#paint4_linear_285_614)"/>
|
9 |
+
<path d="M177.416 72.4417C175.073 72.4417 173.174 74.2584 173.174 76.4994C173.174 78.7404 175.073 80.5571 177.416 80.5571C179.759 80.5571 181.658 78.7404 181.658 76.4994C181.658 74.2584 179.759 72.4417 177.416 72.4417Z" fill="#63A18F"/>
|
10 |
+
<path d="M95.9941 110.91C92.8362 110.91 90.2762 113.387 90.2762 116.443C90.2762 119.499 92.8362 121.976 95.9941 121.976C99.152 121.976 101.712 119.499 101.712 116.443C101.712 113.387 99.152 110.91 95.9941 110.91Z" fill="#63A18F"/>
|
11 |
+
<path d="M31.216 40.3153C28.9164 40.3153 27.0521 38.4511 27.0521 36.1514C27.0521 33.8518 28.9164 31.9875 31.216 31.9875C33.5157 31.9875 35.3799 33.8518 35.3799 36.1514C35.3799 38.4511 33.5157 40.3153 31.216 40.3153Z" fill="#63A18F"/>
|
12 |
+
<path d="M122.227 25.5148C120.088 25.5148 118.354 23.7806 118.354 21.6413C118.354 19.502 120.088 17.7678 122.227 17.7678C124.366 17.7678 126.101 19.502 126.101 21.6413C126.101 23.7806 124.366 25.5148 122.227 25.5148Z" fill="#63A18F"/>
|
13 |
+
<path d="M168.916 116.566C166.992 116.566 165.432 115.007 165.432 113.083C165.432 111.159 166.992 109.599 168.916 109.599C170.84 109.599 172.399 111.159 172.399 113.083C172.399 115.007 170.84 116.566 168.916 116.566Z" fill="#E1E4E5"/>
|
14 |
+
<path d="M15.0275 99.3983C13.7844 99.3983 12.7767 98.3906 12.7767 97.1475C12.7767 95.9044 13.7844 94.8967 15.0275 94.8967C16.2706 94.8967 17.2783 95.9044 17.2783 97.1475C17.2783 98.3906 16.2706 99.3983 15.0275 99.3983Z" fill="white"/>
|
15 |
+
<path d="M75.6491 121.473C74.652 121.473 73.8436 120.664 73.8436 119.667C73.8436 118.67 74.652 117.862 75.6491 117.862C76.6462 117.862 77.4546 118.67 77.4546 119.667C77.4546 120.664 76.6462 121.473 75.6491 121.473Z" fill="#E1E4E5"/>
|
16 |
+
<path d="M150.632 25.5628C149.11 25.5628 147.877 24.3291 147.877 22.8073C147.877 21.2855 149.11 20.0518 150.632 20.0518C152.154 20.0518 153.388 21.2855 153.388 22.8073C153.388 24.3291 152.154 25.5628 150.632 25.5628Z" fill="#E1E4E5"/>
|
17 |
+
<path d="M32.9186 67.7775C33.1763 68.739 32.6057 69.7273 31.6442 69.9849C30.6827 70.2426 29.6943 69.672 29.4367 68.7105C29.1791 67.7489 29.7497 66.7606 30.7112 66.503C31.6727 66.2454 32.661 66.816 32.9186 67.7775Z" fill="white"/>
|
18 |
+
<path d="M68.9733 28.8027C67.649 28.8027 66.5754 27.7292 66.5754 26.4049C66.5754 25.0806 67.649 24.0071 68.9733 24.0071C70.2975 24.0071 71.3711 25.0806 71.3711 26.4049C71.3711 27.7292 70.2975 28.8027 68.9733 28.8027Z" fill="#E1E4E5"/>
|
19 |
+
<path d="M148.054 74.3598C147.035 74.3598 146.21 73.6991 146.21 72.8841C146.21 72.0691 147.035 71.4084 148.054 71.4084C149.073 71.4084 149.898 72.0691 149.898 72.8841C149.898 73.6991 149.073 74.3598 148.054 74.3598Z" fill="white"/>
|
20 |
+
<path d="M177.845 99.7371C176.355 100.464 174.682 100.1 174.108 98.9234C173.534 97.7471 174.277 96.2041 175.767 95.4772C177.257 94.7502 178.93 95.1145 179.504 96.2909C180.078 97.4672 179.335 99.0102 177.845 99.7371Z" fill="white"/>
|
21 |
+
<path d="M114.04 3.99403C114.539 5.8562 113.433 7.77028 111.571 8.26925C109.709 8.76821 107.795 7.66312 107.296 5.80095C106.797 3.93878 107.902 2.02471 109.764 1.52574C111.626 1.02677 113.541 2.13187 114.04 3.99403Z" fill="#E1E4E5"/>
|
22 |
+
<path d="M191.177 55.4113H191.225C191.511 59.4597 194.521 59.5219 194.521 59.5219C194.521 59.5219 191.201 59.5867 191.201 64.2646C191.201 59.5867 187.881 59.5219 187.881 59.5219C187.881 59.5219 190.891 59.4597 191.177 55.4113ZM53.2905 4.73071H53.3736C53.8657 11.8155 59.0509 11.9245 59.0509 11.9245C59.0509 11.9245 53.3331 12.038 53.3331 20.2241C53.3331 12.038 47.6152 11.9245 47.6152 11.9245C47.6152 11.9245 52.7985 11.8155 53.2905 4.73071Z" fill="#E1E4E5"/>
|
23 |
+
<defs>
|
24 |
+
<linearGradient id="paint0_linear_285_614" x1="119.756" y1="173.685" x2="60.7199" y2="-92.6641" gradientUnits="userSpaceOnUse">
|
25 |
+
<stop stop-color="white"/>
|
26 |
+
<stop offset="1" stop-color="#EEEEEE"/>
|
27 |
+
</linearGradient>
|
28 |
+
<linearGradient id="paint1_linear_285_614" x1="124.299" y1="69.023" x2="98.5207" y2="-46.813" gradientUnits="userSpaceOnUse">
|
29 |
+
<stop stop-color="white"/>
|
30 |
+
<stop offset="1" stop-color="#EEEEEE"/>
|
31 |
+
</linearGradient>
|
32 |
+
<linearGradient id="paint2_linear_285_614" x1="149.884" y1="57.5026" x2="200.726" y2="33.4834" gradientUnits="userSpaceOnUse">
|
33 |
+
<stop stop-color="white"/>
|
34 |
+
<stop offset="1" stop-color="#EEEEEE"/>
|
35 |
+
</linearGradient>
|
36 |
+
<linearGradient id="paint3_linear_285_614" x1="205.588" y1="103.105" x2="178.544" y2="74.5877" gradientUnits="userSpaceOnUse">
|
37 |
+
<stop stop-color="white"/>
|
38 |
+
<stop offset="1" stop-color="#EEEEEE"/>
|
39 |
+
</linearGradient>
|
40 |
+
<linearGradient id="paint4_linear_285_614" x1="61.465" y1="122.145" x2="42.3015" y2="92.104" gradientUnits="userSpaceOnUse">
|
41 |
+
<stop stop-color="white"/>
|
42 |
+
<stop offset="1" stop-color="#EEEEEE"/>
|
43 |
+
</linearGradient>
|
44 |
+
</defs>
|
45 |
+
</svg>
|
assets/images/subscribe.svg
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<svg width="199" height="156" viewBox="0 0 199 156" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2 |
+
<path d="M163.846 102.564C180.535 106.518 198.187 92.3636 198.187 92.3636C198.187 92.3636 188.768 71.8065 172.072 67.8649C155.382 63.9109 137.735 78.0531 137.735 78.0531C137.735 78.0531 147.155 98.6103 163.846 102.564Z" fill="url(#paint0_linear_333_629)"/>
|
3 |
+
<path d="M57.6574 62.3048C42.5258 72.7269 19.4092 65.4413 19.4092 65.4413C19.4092 65.4413 20.8405 41.2604 35.982 30.8482C51.1136 20.4261 74.2199 27.7013 74.2199 27.7013C74.2199 27.7013 72.7886 51.8823 57.6574 62.3048Z" fill="url(#paint1_linear_333_629)"/>
|
4 |
+
<path d="M91.7018 27.9272C94.567 27.9272 96.8898 25.6044 96.8898 22.7391C96.8898 19.8738 94.567 17.551 91.7018 17.551C88.8365 17.551 86.5137 19.8738 86.5137 22.7391C86.5137 25.6044 88.8365 27.9272 91.7018 27.9272Z" fill="#E1E4E5"/>
|
5 |
+
<path d="M152.147 127.577C153.723 127.577 155 126.619 155 125.437C155 124.255 153.723 123.297 152.147 123.297C150.571 123.297 149.293 124.255 149.293 125.437C149.293 126.619 150.571 127.577 152.147 127.577Z" fill="#E1E4E5"/>
|
6 |
+
<path d="M189.24 66.5866C190.816 66.5866 192.093 65.6285 192.093 64.4466C192.093 63.2648 190.816 62.3066 189.24 62.3066C187.664 62.3066 186.387 63.2648 186.387 64.4466C186.387 65.6285 187.664 66.5866 189.24 66.5866Z" fill="#E1E4E5"/>
|
7 |
+
<path d="M72.9666 121.157C74.5425 121.157 75.8199 120.199 75.8199 119.017C75.8199 117.835 74.5425 116.877 72.9666 116.877C71.3908 116.877 70.1133 117.835 70.1133 119.017C70.1133 120.199 71.3908 121.157 72.9666 121.157Z" fill="#E1E4E5"/>
|
8 |
+
<path d="M161.42 46.6133C162.996 46.6133 164.274 45.6551 164.274 44.4733C164.274 43.2914 162.996 42.3333 161.42 42.3333C159.844 42.3333 158.567 43.2914 158.567 44.4733C158.567 45.6551 159.844 46.6133 161.42 46.6133Z" fill="#E1E4E5"/>
|
9 |
+
<path d="M22.5859 98.6575H22.4995C21.9884 105.775 16.6021 105.885 16.6021 105.885C16.6021 105.885 22.5416 105.999 22.5416 114.223C22.5416 105.999 28.4812 105.885 28.4812 105.885C28.4812 105.885 23.0973 105.775 22.5859 98.6575Z" fill="#E1E4E5"/>
|
10 |
+
<path d="M111.13 146.123H94.0098V104.393H111.13V146.123Z" fill="white" stroke="#E1E4E5" stroke-width="3.92333"/>
|
11 |
+
<path d="M124.327 153.257H80.4565V142.2H124.327V153.257Z" fill="white" stroke="#E1E4E5" stroke-width="3.92333" stroke-linejoin="round"/>
|
12 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M137.602 43.2432H62.8297C49.6904 43.2432 39.0386 53.895 39.0386 67.0343V104.42C39.0386 108.173 42.0841 111.218 45.8363 111.218H154.595C158.348 111.218 161.393 108.173 161.393 104.42V67.0343C161.393 53.895 150.741 43.2432 137.602 43.2432Z" fill="white" stroke="#E1E4E5" stroke-width="3.92333"/>
|
13 |
+
<path d="M113.811 22.8511V70.4333" stroke="#E1E4E5" stroke-width="3.92333"/>
|
14 |
+
<path d="M113.804 67.8835C113.128 67.8868 112.482 68.1575 112.005 68.6365C111.529 69.1155 111.261 69.7638 111.262 70.4394C111.262 71.8465 112.404 72.9885 113.811 72.9817C114.487 72.9815 115.135 72.7128 115.613 72.2348C116.091 71.7568 116.36 71.1086 116.36 70.4326C116.36 69.0256 115.218 67.8835 113.804 67.8835Z" stroke="#E1E4E5" stroke-width="4.71906" stroke-linecap="round" stroke-linejoin="round"/>
|
15 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M62.8301 43.2432C75.9697 43.2432 86.6212 53.895 86.6212 67.0343V111.218" fill="white"/>
|
16 |
+
<path d="M62.8301 43.2432C75.9697 43.2432 86.6212 53.895 86.6212 67.0343V111.218" stroke="#E1E4E5" stroke-width="3.92333"/>
|
17 |
+
<path d="M161.88 28.0688C162.341 28.8524 161.776 29.84 160.867 29.84H112.049C111.737 29.84 111.438 29.7161 111.217 29.4957C110.997 29.2752 110.873 28.9762 110.873 28.6644V4.37897C110.873 2.48863 112.402 0.959961 114.292 0.959961H160.902C161.813 0.959961 162.377 1.94971 161.915 2.73331L154.787 14.8036C154.68 14.9844 154.624 15.1903 154.623 15.4002C154.623 15.61 154.679 15.8161 154.785 15.997L161.88 28.0688Z" fill="#63A18F"/>
|
18 |
+
<path d="M18.0887 52.5475L10.1857 80.1688C10.0569 80.6177 10.0178 81.0876 10.0707 81.5516C10.1235 82.0157 10.2673 82.4647 10.4937 82.8732C10.7201 83.2817 11.0247 83.6416 11.3902 83.9323C11.7557 84.223 12.1749 84.4389 12.6239 84.5676L60.5945 98.2903C62.0811 98.7144 63.6172 98.1259 64.4657 96.9336C64.7011 96.6044 64.8782 96.2373 64.9893 95.8482L72.8881 68.2383C73.4309 66.3505 72.3377 64.3824 70.4538 63.8438L22.4832 50.1171C20.5993 49.5782 18.6387 50.6636 18.0887 52.5475Z" fill="white" stroke="#E1E4E5" stroke-width="3.92333"/>
|
19 |
+
<path d="M10.0591 81.3844C10.1082 82.1142 10.3811 82.811 10.8406 83.38C11.3002 83.9491 11.924 84.3625 12.6271 84.5641L60.5941 98.2908C61.3004 98.4923 62.0519 98.47 62.745 98.2271C63.4382 97.9841 64.0391 97.5324 64.465 96.934L40.0344 74.6741L10.0591 81.3844Z" fill="white" stroke="#E1E4E5" stroke-width="3.92333"/>
|
20 |
+
<path d="M18.0889 52.5475L39.5652 79.2137L72.4834 69.6521L72.8882 68.2383C73.431 66.3505 72.3379 64.3824 70.4539 63.8438L22.4834 50.1171C20.5994 49.5782 18.6388 50.6636 18.0889 52.5475Z" fill="white" stroke="#E1E4E5" stroke-width="3.92333"/>
|
21 |
+
<path d="M18.7532 66.9434C28.9963 66.9434 37.2999 58.6398 37.2999 48.3968C37.2999 38.1537 28.9963 29.8501 18.7532 29.8501C8.51017 29.8501 0.206543 38.1537 0.206543 48.3968C0.206543 58.6398 8.51017 66.9434 18.7532 66.9434Z" fill="#63A18F"/>
|
22 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.5471 39.8367C11.0867 39.8367 8.7666 43.0253 8.7666 45.9945C8.7666 52.0218 18.3995 56.9567 18.5749 56.9567C18.7504 56.9567 28.3833 52.0218 28.3833 45.9945C28.3833 43.0253 26.0632 39.8367 22.6028 39.8367C20.6247 39.8367 19.3257 40.805 18.5749 41.6674C17.8242 40.805 16.5248 39.8367 14.5471 39.8367ZM141.09 155.04V142.2V155.04Z" fill="white"/>
|
23 |
+
<path d="M141.09 155.04V142.2" stroke="#E1E4E5" stroke-width="3.92333"/>
|
24 |
+
<path d="M166.057 155.04V147.193" stroke="#E1E4E5" stroke-width="3.92333"/>
|
25 |
+
<path d="M135.383 155.04V146.123" stroke="#E1E4E5" stroke-width="3.92333"/>
|
26 |
+
<path d="M160.35 155.04V149.69" stroke="#E1E4E5" stroke-width="3.92333"/>
|
27 |
+
<path d="M146.44 155.04V146.123" stroke="#E1E4E5" stroke-width="3.92333"/>
|
28 |
+
<path d="M171.407 155.04V149.69" stroke="#E1E4E5" stroke-width="3.92333"/>
|
29 |
+
<path d="M64.0498 155.04V142.2" stroke="#E1E4E5" stroke-width="3.92333"/>
|
30 |
+
<path d="M39.0835 155.04V147.193" stroke="#E1E4E5" stroke-width="3.92333"/>
|
31 |
+
<path d="M69.7568 155.04V146.123" stroke="#E1E4E5" stroke-width="3.92333"/>
|
32 |
+
<path d="M44.79 155.04V149.69" stroke="#E1E4E5" stroke-width="3.92333"/>
|
33 |
+
<path d="M58.7002 155.04V146.123" stroke="#E1E4E5" stroke-width="3.92333"/>
|
34 |
+
<path d="M33.7334 155.04V149.69" stroke="#E1E4E5" stroke-width="3.92333"/>
|
35 |
+
<defs>
|
36 |
+
<linearGradient id="paint0_linear_333_629" x1="226.695" y1="112.395" x2="80.592" y2="43.3705" gradientUnits="userSpaceOnUse">
|
37 |
+
<stop stop-color="white"/>
|
38 |
+
<stop offset="1" stop-color="#EEEEEE"/>
|
39 |
+
</linearGradient>
|
40 |
+
<linearGradient id="paint1_linear_333_629" x1="-1.28569" y1="96.5016" x2="117.825" y2="-29.0971" gradientUnits="userSpaceOnUse">
|
41 |
+
<stop stop-color="white"/>
|
42 |
+
<stop offset="1" stop-color="#EEEEEE"/>
|
43 |
+
</linearGradient>
|
44 |
+
</defs>
|
45 |
+
</svg>
|
assets/js/bot.js
CHANGED
@@ -1,13 +1,15 @@
|
|
1 |
-
|
|
|
|
|
2 |
|
3 |
// User info retrieved from chats is store in this object
|
4 |
-
|
5 |
|
6 |
// Cache conversation position
|
7 |
-
|
8 |
|
9 |
// Cache conversation status
|
10 |
-
|
11 |
|
12 |
/*
|
13 |
---------------
|
@@ -15,178 +17,167 @@ var conversationStarted = false;
|
|
15 |
---------------
|
16 |
*/
|
17 |
|
18 |
-
function getCurrentTime() {
|
19 |
-
var date = new Date();
|
20 |
-
var hours = date.getHours();
|
21 |
-
var minutes = date.getMinutes();
|
22 |
-
var ampm = hours >= 12 ? 'PM' : 'AM';
|
23 |
-
hours = hours % 12;
|
24 |
-
hours = hours ? hours : 12;
|
25 |
-
minutes = minutes < 10 ? '0' + minutes : minutes;
|
26 |
-
var strTime = hours + ':' + minutes + ' ' + ampm;
|
27 |
-
return strTime;
|
28 |
-
}
|
29 |
-
|
30 |
/**
|
31 |
* Cast string
|
32 |
-
*
|
33 |
-
* @param
|
34 |
-
* @
|
35 |
*/
|
36 |
-
function _phpCastString(value) {
|
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 |
* Strip tags from a string
|
75 |
-
*
|
76 |
* big thanks to http://locutus.io/php/strings/strip_tags/
|
77 |
-
*
|
78 |
-
* @param
|
79 |
-
* @param
|
80 |
-
* @
|
|
|
|
|
81 |
*/
|
82 |
-
function
|
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 |
-
function renderStatement(statement) {
|
108 |
-
|
109 |
-
|
110 |
|
111 |
-
|
112 |
}
|
113 |
|
114 |
function showTyping() {
|
115 |
-
|
116 |
}
|
117 |
|
118 |
function hideTyping() {
|
119 |
-
|
120 |
}
|
121 |
|
122 |
-
|
123 |
|
124 |
function scrollToBottom() {
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
}
|
129 |
|
130 |
/**
|
131 |
* Input checking
|
|
|
|
|
132 |
*/
|
133 |
-
function inputError(msg) {
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
}
|
140 |
|
141 |
-
function checkInput(option) {
|
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 |
-
inputError(botVars.validationEmail);
|
179 |
-
}
|
180 |
-
return false;
|
181 |
}
|
182 |
|
183 |
function clearChat() {
|
184 |
-
|
185 |
}
|
186 |
|
187 |
function clearFooter() {
|
188 |
-
|
189 |
-
|
190 |
}
|
191 |
|
192 |
/*
|
@@ -195,28 +186,26 @@ function clearFooter() {
|
|
195 |
------------------------
|
196 |
*/
|
197 |
|
198 |
-
function startConversation(conv, pos) {
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
conversationStarted = true;
|
205 |
|
206 |
-
|
207 |
-
clearChat();
|
208 |
|
209 |
-
|
210 |
-
|
211 |
-
conversationPos = conv;
|
212 |
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
showStatement(pos);
|
217 |
-
|
218 |
-
});
|
219 |
|
|
|
|
|
|
|
|
|
|
|
220 |
}
|
221 |
|
222 |
/*
|
@@ -224,268 +213,251 @@ function startConversation(conv, pos) {
|
|
224 |
Show Bot Statement
|
225 |
-------------------
|
226 |
*/
|
227 |
-
function showStatement(pos) {
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
|
|
|
|
|
|
248 |
------------------------
|
249 |
Render Bot Statement(s)
|
250 |
------------------------
|
251 |
Run this function over each statement
|
252 |
*/
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
hideTyping();
|
274 |
-
renderStatement(item);
|
275 |
-
scrollToBottom();
|
276 |
-
|
277 |
-
callback();
|
278 |
-
}, delay);
|
279 |
-
},
|
280 |
-
/*
|
281 |
----------------------
|
282 |
Render User Option(s)
|
283 |
----------------------
|
284 |
This is the final callback of the series
|
285 |
*/
|
286 |
-
|
287 |
-
|
288 |
-
/*
|
289 |
----------------------------
|
290 |
If User Option is Button(s)
|
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 |
-
}).appendTo('.choices');
|
337 |
-
}
|
338 |
-
|
339 |
-
}, 750);
|
340 |
-
|
341 |
-
}
|
342 |
-
|
343 |
-
/*
|
344 |
------------------------
|
345 |
If User Option is Input
|
346 |
------------------------
|
347 |
*/
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
|
352 |
-
|
353 |
|
354 |
-
|
355 |
-
/*
|
356 |
Render Input
|
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 |
If User Option is Email
|
396 |
------------------------
|
397 |
*/
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
|
402 |
-
|
403 |
|
404 |
-
|
405 |
Render Input
|
406 |
---------------
|
407 |
*/
|
408 |
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
}
|
455 |
|
456 |
/*
|
457 |
---------------------
|
458 |
Render User Response
|
459 |
---------------------
|
460 |
*/
|
461 |
-
function showResponse(option) {
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
}
|
489 |
}
|
490 |
|
491 |
/*
|
@@ -494,4 +466,21 @@ function showResponse(option) {
|
|
494 |
-------------------
|
495 |
*/
|
496 |
|
497 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* global jQuery, botVars */
|
2 |
+
|
3 |
+
const DEBUG = false;
|
4 |
|
5 |
// User info retrieved from chats is store in this object
|
6 |
+
const context = {};
|
7 |
|
8 |
// Cache conversation position
|
9 |
+
let conversationPos;
|
10 |
|
11 |
// Cache conversation status
|
12 |
+
let conversationStarted = false;
|
13 |
|
14 |
/*
|
15 |
---------------
|
17 |
---------------
|
18 |
*/
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
/**
|
21 |
* Cast string
|
22 |
+
*
|
23 |
+
* @param value
|
24 |
+
* @return string
|
25 |
*/
|
26 |
+
function _phpCastString( value ) {
|
27 |
+
const type = typeof value;
|
28 |
+
|
29 |
+
switch ( type ) {
|
30 |
+
case 'boolean':
|
31 |
+
return value ? '1' : '';
|
32 |
+
case 'string':
|
33 |
+
return value;
|
34 |
+
case 'number':
|
35 |
+
if ( isNaN( value ) ) {
|
36 |
+
return 'NAN';
|
37 |
+
}
|
38 |
+
|
39 |
+
if ( ! isFinite( value ) ) {
|
40 |
+
return ( value < 0 ? '-' : '' ) + 'INF';
|
41 |
+
}
|
42 |
+
|
43 |
+
return value + '';
|
44 |
+
case 'undefined':
|
45 |
+
return '';
|
46 |
+
case 'object':
|
47 |
+
if ( Array.isArray( value ) ) {
|
48 |
+
return 'Array';
|
49 |
+
}
|
50 |
+
|
51 |
+
if ( value !== null ) {
|
52 |
+
return 'Object';
|
53 |
+
}
|
54 |
+
|
55 |
+
return '';
|
56 |
+
case 'function':
|
57 |
+
// fall through
|
58 |
+
default:
|
59 |
+
throw new Error( 'Unsupported value type' );
|
60 |
+
}
|
61 |
}
|
62 |
|
63 |
/**
|
64 |
* Strip tags from a string
|
65 |
+
*
|
66 |
* big thanks to http://locutus.io/php/strings/strip_tags/
|
67 |
+
*
|
68 |
+
* @param string input
|
69 |
+
* @param string allowed
|
70 |
+
* @param input
|
71 |
+
* @param allowed
|
72 |
+
* @return string
|
73 |
*/
|
74 |
+
function stripTags( input, allowed ) {
|
75 |
+
// making sure the allowed arg is a string containing only tags in lowercase (<a><b><c>)
|
76 |
+
allowed = ( ( ( allowed || '' ) + '' ).toLowerCase().match( /<[a-z][a-z0-9]*>/g ) || [] ).join( '' );
|
77 |
+
|
78 |
+
const tags = /<\/?([a-z0-9]*)\b[^>]*>?/gi;
|
79 |
+
const commentsAndPhpTags = /<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi;
|
80 |
+
|
81 |
+
let after = _phpCastString( input );
|
82 |
+
// removes tha '<' char at the end of the string to replicate PHP's behaviour
|
83 |
+
after = ( after.substring( after.length - 1 ) === '<' ) ? after.substring( 0, after.length - 1 ) : after;
|
84 |
+
|
85 |
+
// recursively remove tags to ensure that the returned string doesn't contain forbidden tags after previous passes (e.g. '<<bait/>switch/>')
|
86 |
+
while ( true ) {
|
87 |
+
const before = after;
|
88 |
+
after = before.replace( commentsAndPhpTags, '' ).replace( tags, function( $0, $1 ) {
|
89 |
+
return allowed.indexOf( '<' + $1.toLowerCase() + '>' ) > -1 ? $0 : '';
|
90 |
+
} );
|
91 |
+
|
92 |
+
// return once no more tags are removed
|
93 |
+
if ( before === after ) {
|
94 |
+
return after;
|
95 |
+
}
|
96 |
+
}
|
97 |
}
|
98 |
|
99 |
+
function renderStatement( statement ) {
|
100 |
+
// Strip html tags from statement
|
101 |
+
statement = stripTags( statement );
|
102 |
|
103 |
+
jQuery( '.chat-container' ).append( '<div class="chat-message-wrapper"><p class="chat-message">' + statement + '</p></div>' );
|
104 |
}
|
105 |
|
106 |
function showTyping() {
|
107 |
+
jQuery( '.chat-container' ).append( '<div class="typing-wrapper"><p class="chat-message typing"><span class="dot"></span><span class="dot"></span><span class="dot"></span></p></div>' );
|
108 |
}
|
109 |
|
110 |
function hideTyping() {
|
111 |
+
jQuery( '.typing-wrapper' ).remove();
|
112 |
}
|
113 |
|
114 |
+
const chatWrapper = jQuery( '.bot-chat-wrapper' );
|
115 |
|
116 |
function scrollToBottom() {
|
117 |
+
chatWrapper.animate( {
|
118 |
+
scrollTop: 600,
|
119 |
+
}, 'slow' );
|
120 |
}
|
121 |
|
122 |
/**
|
123 |
* Input checking
|
124 |
+
*
|
125 |
+
* @param msg
|
126 |
*/
|
127 |
+
function inputError( msg ) {
|
128 |
+
jQuery( '.bot-error p' ).text( msg );
|
129 |
+
jQuery( '.bot-error' )
|
130 |
+
.animate( { bottom: '20px' }, 500 )
|
131 |
+
.delay( 3000 )
|
132 |
+
.animate( { bottom: '-70px' }, 500 );
|
133 |
}
|
134 |
|
135 |
+
function checkInput( option ) {
|
136 |
+
let input = jQuery( '.bot-container input[type=text]' ).val();
|
137 |
|
138 |
+
// Strip html tags from input
|
139 |
+
input = stripTags( input );
|
140 |
|
141 |
+
if ( input.length > 2 ) {
|
142 |
+
showResponse( option );
|
143 |
+
} else {
|
144 |
+
inputError( botVars.validationName );
|
145 |
+
}
|
146 |
|
147 |
+
return false;
|
148 |
}
|
149 |
|
150 |
+
function checkEmail( option ) {
|
151 |
+
const input = jQuery( '.bot-container input[type=email]' ).val();
|
152 |
+
const regex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
153 |
+
const result = regex.test( String( input.toLowerCase() ) );
|
154 |
+
|
155 |
+
if ( input.length > 7 && result === true ) {
|
156 |
+
// Add new entry to our db
|
157 |
+
const botSubscribeForm = jQuery( '.bot_subscribe_form' ).serialize();
|
158 |
+
const subscribeBotData = 'action=wpmm_add_subscriber&' + botSubscribeForm;
|
159 |
+
|
160 |
+
jQuery.post( wpmmVars.ajaxURL, subscribeBotData, function( response ) {
|
161 |
+
if ( ! response.success ) {
|
162 |
+
alert( response.data );
|
163 |
+
return false;
|
164 |
+
}
|
165 |
+
}, 'json' );
|
166 |
+
|
167 |
+
showResponse( option );
|
168 |
+
} else {
|
169 |
+
inputError( botVars.validationEmail );
|
170 |
+
}
|
171 |
+
return false;
|
|
|
|
|
|
|
172 |
}
|
173 |
|
174 |
function clearChat() {
|
175 |
+
jQuery( '.chat-container' ).empty();
|
176 |
}
|
177 |
|
178 |
function clearFooter() {
|
179 |
+
jQuery( '.choices' ).empty();
|
180 |
+
jQuery( '.input' ).empty();
|
181 |
}
|
182 |
|
183 |
/*
|
186 |
------------------------
|
187 |
*/
|
188 |
|
189 |
+
function startConversation( conv, pos ) {
|
190 |
+
/* We need this to maintain backward compatibility because we moved startConversation() from /views/maintenance.php to bot.js */
|
191 |
+
if ( conversationStarted ) {
|
192 |
+
return false;
|
193 |
+
}
|
|
|
|
|
194 |
|
195 |
+
conversationStarted = true;
|
|
|
196 |
|
197 |
+
clearFooter();
|
198 |
+
clearChat();
|
|
|
199 |
|
200 |
+
// Set conversation position
|
201 |
+
// 'conversation' is in the global scope
|
202 |
+
conversationPos = conv;
|
|
|
|
|
|
|
203 |
|
204 |
+
// Load conversation data
|
205 |
+
jQuery.getScript( botVars.uploadsBaseUrl + 'data.js', function( data ) {
|
206 |
+
// Show first bot statement
|
207 |
+
showStatement( pos );
|
208 |
+
} );
|
209 |
}
|
210 |
|
211 |
/*
|
213 |
Show Bot Statement
|
214 |
-------------------
|
215 |
*/
|
216 |
+
function showStatement( pos ) {
|
217 |
+
// Where are we in conversationData?
|
218 |
+
const node = conversationData[ conversationPos ][ pos ];
|
219 |
+
|
220 |
+
// If there is a side effect execute that within the context
|
221 |
+
if ( 'sideeffect' in node && jQuery.type( node.sideeffect === 'function' ) ) {
|
222 |
+
node.sideeffect( context );
|
223 |
+
}
|
224 |
+
|
225 |
+
// Wrap the statements in an array (if they're not already)
|
226 |
+
let statements;
|
227 |
+
if ( jQuery.type( node.statement ) === 'array' ) {
|
228 |
+
statements = node.statement;
|
229 |
+
} else if ( jQuery.type( node.statement ) === 'string' ) {
|
230 |
+
statements = [ node.statement ];
|
231 |
+
} else if ( jQuery.type( node.statement ) === 'function' ) {
|
232 |
+
statements = node.statement( context );
|
233 |
+
}
|
234 |
+
|
235 |
+
if ( pos === 1.5 || pos === 1.6 ) {
|
236 |
+
jQuery( '.avatar-notice' ).remove();
|
237 |
+
}
|
238 |
+
|
239 |
+
/*
|
240 |
------------------------
|
241 |
Render Bot Statement(s)
|
242 |
------------------------
|
243 |
Run this function over each statement
|
244 |
*/
|
245 |
+
async.eachSeries( statements, function( item, callback ) {
|
246 |
+
// Emulate typing then scroll to bottom
|
247 |
+
showTyping();
|
248 |
+
scrollToBottom();
|
249 |
+
|
250 |
+
let delay = 900;
|
251 |
+
|
252 |
+
if ( DEBUG || ! jQuery( '.bot-chat-wrapper' )[ 0 ] ) {
|
253 |
+
delay = 0;
|
254 |
+
}
|
255 |
+
|
256 |
+
setTimeout( function() {
|
257 |
+
hideTyping();
|
258 |
+
renderStatement( item );
|
259 |
+
scrollToBottom();
|
260 |
+
|
261 |
+
callback();
|
262 |
+
}, delay );
|
263 |
+
},
|
264 |
+
/*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
265 |
----------------------
|
266 |
Render User Option(s)
|
267 |
----------------------
|
268 |
This is the final callback of the series
|
269 |
*/
|
270 |
+
function( err ) {
|
271 |
+
/*
|
|
|
272 |
----------------------------
|
273 |
If User Option is Button(s)
|
274 |
----------------------------
|
275 |
*/
|
276 |
+
if ( 'options' in node ) {
|
277 |
+
jQuery( '.input' ).hide();
|
278 |
+
jQuery( '.choices' ).show();
|
279 |
+
|
280 |
+
// Get the options' data
|
281 |
+
const options = node.options;
|
282 |
+
|
283 |
+
// If there are options render them
|
284 |
+
// Otherwise this is the end
|
285 |
+
if ( options.length > 0 ) {
|
286 |
+
// Pause 750ms, then render options
|
287 |
+
setTimeout( function() {
|
288 |
+
for ( let i = 0; i < options.length; i++ ) {
|
289 |
+
const option = options[ i ];
|
290 |
+
var extraClass;
|
291 |
+
var clickFunction;
|
292 |
+
|
293 |
+
// Check option for a consequence
|
294 |
+
if ( option.consequence === null ) {
|
295 |
+
// The consequence is null meaning this is a branch we won't be exploring
|
296 |
+
// The button is given class 'disabled' and does nothing on click
|
297 |
+
clickFunction = null;
|
298 |
+
extraClass = 'disabled';
|
299 |
+
} else {
|
300 |
+
// Else, click function (showResponse) is binded to it
|
301 |
+
clickFunction = function( option ) {
|
302 |
+
showResponse( option );
|
303 |
+
}.bind( null, option );
|
304 |
+
|
305 |
+
extraClass = '';
|
306 |
+
}
|
307 |
+
|
308 |
+
// Render button
|
309 |
+
const button = jQuery( '<p/>', {
|
310 |
+
text: option.choice,
|
311 |
+
class: 'chat-message user',
|
312 |
+
click: clickFunction,
|
313 |
+
} ).appendTo( '.choices' );
|
314 |
+
}
|
315 |
+
}, 750 );
|
316 |
+
}
|
317 |
+
|
318 |
+
/*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
319 |
------------------------
|
320 |
If User Option is Input
|
321 |
------------------------
|
322 |
*/
|
323 |
+
} else if ( 'input' in node ) {
|
324 |
+
jQuery( '.input' ).show();
|
325 |
+
jQuery( '.choices' ).hide();
|
326 |
|
327 |
+
var option = node.input;
|
328 |
|
329 |
+
/*
|
|
|
330 |
Render Input
|
331 |
---------------
|
332 |
*/
|
333 |
|
334 |
+
// Create a form to hold our input and submit button
|
335 |
+
var form = jQuery( '<form/>', {
|
336 |
+
submit: checkInput.bind( null, option ),
|
337 |
+
} );
|
338 |
+
|
339 |
+
// Create a user bubble, append to form
|
340 |
+
var inputBubble = jQuery( '<p/>', {
|
341 |
+
class: 'chat-message user',
|
342 |
+
} ).appendTo( form );
|
343 |
+
|
344 |
+
// Create an input, append to user bubble
|
345 |
+
var input = jQuery( '<input/>', {
|
346 |
+
type: 'text',
|
347 |
+
placeholder: botVars.typeName,
|
348 |
+
name: option.name,
|
349 |
+
autocomplete: 'off',
|
350 |
+
required: true,
|
351 |
+
} ).appendTo( inputBubble );
|
352 |
+
|
353 |
+
// Create an input button, append to user bubble
|
354 |
+
var button = jQuery( '<a/>', {
|
355 |
+
text: botVars.send,
|
356 |
+
click: checkInput.bind( null, option ),
|
357 |
+
} ).appendTo( inputBubble );
|
358 |
+
|
359 |
+
// Append form to div.input
|
360 |
+
form.appendTo( '.input' );
|
361 |
+
|
362 |
+
// Focus on the input we just put into the DOM
|
363 |
+
async.nextTick( function() {
|
364 |
+
input.focus();
|
365 |
+
} );
|
366 |
+
|
367 |
+
/*
|
368 |
------------------------
|
369 |
If User Option is Email
|
370 |
------------------------
|
371 |
*/
|
372 |
+
} else if ( 'email' in node ) {
|
373 |
+
jQuery( '.input' ).show();
|
374 |
+
jQuery( '.choices' ).hide();
|
375 |
|
376 |
+
var option = node.email;
|
377 |
|
378 |
+
/*
|
379 |
Render Input
|
380 |
---------------
|
381 |
*/
|
382 |
|
383 |
+
// Create a form to hold our input and submit button
|
384 |
+
var form = jQuery( '<form/>', {
|
385 |
+
class: 'bot_subscribe_form',
|
386 |
+
submit: checkEmail.bind( null, option ),
|
387 |
+
} );
|
388 |
+
|
389 |
+
// Create a user bubble, append to form
|
390 |
+
var inputBubble = jQuery( '<p/>', {
|
391 |
+
class: 'chat-message user',
|
392 |
+
} ).appendTo( form );
|
393 |
+
|
394 |
+
// Create hidden input, append to user bubble
|
395 |
+
var input = jQuery( '<input/>', {
|
396 |
+
type: 'hidden',
|
397 |
+
name: '_wpnonce',
|
398 |
+
value: botVars.wpnonce,
|
399 |
+
} ).appendTo( inputBubble );
|
400 |
+
|
401 |
+
// Create email input, append to user bubble
|
402 |
+
var input = jQuery( '<input/>', {
|
403 |
+
type: 'email',
|
404 |
+
placeholder: botVars.typeEmail,
|
405 |
+
name: option.email,
|
406 |
+
autocomplete: 'off',
|
407 |
+
} ).appendTo( inputBubble );
|
408 |
+
|
409 |
+
// Create an input button, append to user bubble
|
410 |
+
var button = jQuery( '<a/>', {
|
411 |
+
text: botVars.send,
|
412 |
+
// "class": "user-email-trigger",
|
413 |
+
click: checkEmail.bind( null, option ),
|
414 |
+
} ).appendTo( inputBubble );
|
415 |
+
|
416 |
+
// Append form to div.input
|
417 |
+
form.appendTo( '.input' );
|
418 |
+
|
419 |
+
// Focus on the input we just put into the DOM
|
420 |
+
async.nextTick( function() {
|
421 |
+
input.focus();
|
422 |
+
} );
|
423 |
+
}
|
424 |
+
|
425 |
+
scrollToBottom();
|
426 |
+
} );
|
427 |
+
}
|
|
|
428 |
|
429 |
/*
|
430 |
---------------------
|
431 |
Render User Response
|
432 |
---------------------
|
433 |
*/
|
434 |
+
function showResponse( option ) {
|
435 |
+
// If there was an input element, put that into the global context
|
436 |
+
let feedback = '';
|
437 |
+
|
438 |
+
if ( 'name' in option ) {
|
439 |
+
context[ option.name ] = jQuery( '.bot-container input[type=text]' ).val();
|
440 |
+
feedback = context[ option.name ];
|
441 |
+
} else if ( 'email' in option ) {
|
442 |
+
context[ option.email ] = jQuery( '.bot-container input[type=email]' ).val();
|
443 |
+
feedback = context[ option.email ];
|
444 |
+
} else {
|
445 |
+
feedback = option.choice;
|
446 |
+
}
|
447 |
+
|
448 |
+
clearFooter();
|
449 |
+
|
450 |
+
// Strip html tags from feedback
|
451 |
+
feedback = stripTags( feedback );
|
452 |
+
|
453 |
+
// Show what the user chose
|
454 |
+
jQuery( '.chat-container' ).append( '<p class="chat-message user">' + feedback + '</p>' );
|
455 |
+
|
456 |
+
if ( 'consequence' in option ) {
|
457 |
+
showStatement( option.consequence );
|
458 |
+
} else {
|
459 |
+
// xxx
|
460 |
+
}
|
|
|
461 |
}
|
462 |
|
463 |
/*
|
466 |
-------------------
|
467 |
*/
|
468 |
|
469 |
+
let isOpen = false;
|
470 |
+
|
471 |
+
jQuery( '.bot-avatar' ).on( 'click', function() {
|
472 |
+
const chatWrap = jQuery( '.bot-chat-wrapper' )[ 0 ];
|
473 |
+
|
474 |
+
if ( ! isOpen ) {
|
475 |
+
isOpen = true;
|
476 |
+
startConversation( 'homepage', 1 );
|
477 |
+
}
|
478 |
+
|
479 |
+
if ( chatWrap.style.display !== 'none' ) {
|
480 |
+
jQuery( '.avatar-notice' ).show();
|
481 |
+
jQuery( '.bot-chat-wrapper' ).hide();
|
482 |
+
} else {
|
483 |
+
jQuery( '.bot-chat-wrapper' ).show();
|
484 |
+
jQuery( '.avatar-notice' ).hide();
|
485 |
+
}
|
486 |
+
} );
|
assets/js/bot.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(){var n,t={};function e(){}function r(n){return n}function i(n){return!!n}function o(n){return!n}var u="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||this;function a(n){return function(){if(null===n)throw new Error("Callback was already called.");n.apply(this,arguments),n=null}}function c(n){return function(){null!==n&&(n.apply(this,arguments),n=null)}}null!=u&&(n=u.async),t.noConflict=function(){return u.async=n,t};var s=Object.prototype.toString,l=Array.isArray||function(n){return"[object Array]"===s.call(n)};function f(n){return l(n)||"number"==typeof n.length&&n.length>=0&&n.length%1==0}function p(n,t){for(var e=-1,r=n.length;++e<r;)t(n[e],e,n)}function h(n,t){for(var e=-1,r=n.length,i=Array(r);++e<r;)i[e]=t(n[e],e,n);return i}function y(n){return h(Array(n),function(n,t){return t})}function m(n,t){p(v(n),function(e){t(n[e],e)})}function d(n,t){for(var e=0;e<n.length;e++)if(n[e]===t)return e;return-1}var v=Object.keys||function(n){var t=[];for(var e in n)n.hasOwnProperty(e)&&t.push(e);return t};function g(n){var t,e,r=-1;return f(n)?(t=n.length,function(){return++r<t?r:null}):(e=v(n),t=e.length,function(){return++r<t?e[r]:null})}function b(n,t){return t=null==t?n.length-1:+t,function(){for(var e=Math.max(arguments.length-t,0),r=Array(e),i=0;i<e;i++)r[i]=arguments[i+t];switch(t){case 0:return n.call(this,r);case 1:return n.call(this,arguments[0],r);case 2:return n.call(this,arguments[0],arguments[1],r)}}}function k(n){return function(t,e,r){return n(t,r)}}var w="function"==typeof setImmediate&&setImmediate,j=w?function(n){w(n)}:function(n){setTimeout(n,0)};function Q(n){return function(t,r,i){i=c(i||e);var o=g(t=t||[]);if(n<=0)return i(null);var u=!1,s=0,l=!1;!function e(){if(u&&s<=0)return i(null);for(;s<n&&!l;){var c=o();if(null===c)return u=!0,void(s<=0&&i(null));s+=1,r(t[c],c,a(function(n){s-=1,n?(i(n),l=!0):e()}))}}()}}function x(n){return function(e,r,i){return n(t.eachOf,e,r,i)}}function S(n){return function(t,e,r,i){return n(Q(e),t,r,i)}}function T(n){return function(e,r,i){return n(t.eachOfSeries,e,r,i)}}function E(n,t,r,i){i=c(i||e);var o=[];n(t,function(n,t,e){r(n,function(n,r){o[t]=r,e(n)})},function(n){i(n,o)})}function O(n,t,e,r){var i=[];n(t,function(n,t,r){e(n,function(e){e&&i.push({index:t,value:n}),r()})},function(){r(h(i.sort(function(n,t){return n.index-t.index}), |